diff --git a/production.ini b/production.ini index b8166d8..38da65c 100644 --- a/production.ini +++ b/production.ini @@ -11,8 +11,8 @@ import = %(here)s/private.ini smtp_server = localhost error_email_from = paste@localhost -oauth_failure = /0.3.3/auth.html#oauth_failure -oauth_success = /0.3.3/auth.html#oauth_success +oauth_failure = /0.3.4/auth.html#oauth_failure +oauth_success = /0.3.4/auth.html#oauth_success # Register with twitter at http://dev.twitter.com/apps/new oauth.twitter.com.request = https://twitter.com/oauth/request_token diff --git a/setup.py b/setup.py index 9a3ba73..140f896 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ except ImportError: use_setuptools() from setuptools import setup, find_packages -VERSION='0.3.3' +VERSION='0.3.4' setup( name='linkdrop', diff --git a/staging.ini b/staging.ini index f2e8fc4..98d4647 100644 --- a/staging.ini +++ b/staging.ini @@ -11,8 +11,8 @@ import = %(here)s/private.ini smtp_server = localhost error_email_from = paste@localhost -oauth_failure = /0.3.3/auth.html#oauth_failure -oauth_success = /0.3.3/auth.html#oauth_success +oauth_failure = /0.3.4/auth.html#oauth_failure +oauth_success = /0.3.4/auth.html#oauth_success # Register with twitter at http://dev.twitter.com/apps/new oauth.twitter.com.request = https://twitter.com/oauth/request_token diff --git a/web/0.3.4/auth.html b/web/0.3.4/auth.html new file mode 100644 index 0000000..f4b9c6a --- /dev/null +++ b/web/0.3.4/auth.html @@ -0,0 +1,323 @@ + + + + + + Firefox Share OAuthorization + + + + + + + + + +
+
+ +
connecting...
+ + diff --git a/web/0.3.4/blank.html b/web/0.3.4/blank.html new file mode 100644 index 0000000..0c44a9d --- /dev/null +++ b/web/0.3.4/blank.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/web/0.3.4/build.js b/web/0.3.4/build.js new file mode 100644 index 0000000..f9cd76a --- /dev/null +++ b/web/0.3.4/build.js @@ -0,0 +1,10 @@ +({ + baseUrl: "scripts/", + paths: { + "index": "../index", + "jquery": "requireplugins-jquery" + }, + name: "index", + exclude: ['jquery'], + out: './index.js' +}) diff --git a/web/0.3.4/favicon.ico b/web/0.3.4/favicon.ico new file mode 100644 index 0000000..df18f9c Binary files /dev/null and b/web/0.3.4/favicon.ico differ diff --git a/web/0.3.4/favicon.png b/web/0.3.4/favicon.png new file mode 100644 index 0000000..216b13a Binary files /dev/null and b/web/0.3.4/favicon.png differ diff --git a/web/0.3.4/i/LinkedIn_Logo16px.png b/web/0.3.4/i/LinkedIn_Logo16px.png new file mode 100644 index 0000000..c717e80 Binary files /dev/null and b/web/0.3.4/i/LinkedIn_Logo16px.png differ diff --git a/web/0.3.4/i/check.png b/web/0.3.4/i/check.png new file mode 100644 index 0000000..acb4f7a Binary files /dev/null and b/web/0.3.4/i/check.png differ diff --git a/web/0.3.4/i/cornerBottomLeft.png b/web/0.3.4/i/cornerBottomLeft.png new file mode 100644 index 0000000..0abd7cb Binary files /dev/null and b/web/0.3.4/i/cornerBottomLeft.png differ diff --git a/web/0.3.4/i/cornerBottomRight.png b/web/0.3.4/i/cornerBottomRight.png new file mode 100644 index 0000000..b9a1888 Binary files /dev/null and b/web/0.3.4/i/cornerBottomRight.png differ diff --git a/web/0.3.4/i/cornerTopLeft.png b/web/0.3.4/i/cornerTopLeft.png new file mode 100644 index 0000000..0c80df9 Binary files /dev/null and b/web/0.3.4/i/cornerTopLeft.png differ diff --git a/web/0.3.4/i/cornerTopRight.png b/web/0.3.4/i/cornerTopRight.png new file mode 100644 index 0000000..2009a09 Binary files /dev/null and b/web/0.3.4/i/cornerTopRight.png differ diff --git a/web/0.3.4/i/f1Icon.png b/web/0.3.4/i/f1Icon.png new file mode 100644 index 0000000..f55793b Binary files /dev/null and b/web/0.3.4/i/f1Icon.png differ diff --git a/web/0.3.4/i/f1Logo.png b/web/0.3.4/i/f1Logo.png new file mode 100644 index 0000000..73cf10d Binary files /dev/null and b/web/0.3.4/i/f1Logo.png differ diff --git a/web/0.3.4/i/f1LogoVert.png b/web/0.3.4/i/f1LogoVert.png new file mode 100644 index 0000000..2a6db17 Binary files /dev/null and b/web/0.3.4/i/f1LogoVert.png differ diff --git a/web/0.3.4/i/facebookIcon.png b/web/0.3.4/i/facebookIcon.png new file mode 100644 index 0000000..28c8e1b Binary files /dev/null and b/web/0.3.4/i/facebookIcon.png differ diff --git a/web/0.3.4/i/fancybox/blank.gif b/web/0.3.4/i/fancybox/blank.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/web/0.3.4/i/fancybox/blank.gif differ diff --git a/web/0.3.4/i/fancybox/fancy_close.png b/web/0.3.4/i/fancybox/fancy_close.png new file mode 100755 index 0000000..0703530 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_close.png differ diff --git a/web/0.3.4/i/fancybox/fancy_loading.png b/web/0.3.4/i/fancybox/fancy_loading.png new file mode 100755 index 0000000..2503017 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_loading.png differ diff --git a/web/0.3.4/i/fancybox/fancy_nav_left.png b/web/0.3.4/i/fancybox/fancy_nav_left.png new file mode 100755 index 0000000..ebaa6a4 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_nav_left.png differ diff --git a/web/0.3.4/i/fancybox/fancy_nav_right.png b/web/0.3.4/i/fancybox/fancy_nav_right.png new file mode 100755 index 0000000..873294e Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_nav_right.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_e.png b/web/0.3.4/i/fancybox/fancy_shadow_e.png new file mode 100755 index 0000000..2eda089 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_e.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_n.png b/web/0.3.4/i/fancybox/fancy_shadow_n.png new file mode 100755 index 0000000..69aa10e Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_n.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_ne.png b/web/0.3.4/i/fancybox/fancy_shadow_ne.png new file mode 100755 index 0000000..79f6980 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_ne.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_nw.png b/web/0.3.4/i/fancybox/fancy_shadow_nw.png new file mode 100755 index 0000000..7182cd9 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_nw.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_s.png b/web/0.3.4/i/fancybox/fancy_shadow_s.png new file mode 100755 index 0000000..d8858bf Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_s.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_se.png b/web/0.3.4/i/fancybox/fancy_shadow_se.png new file mode 100755 index 0000000..541e3ff Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_se.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_sw.png b/web/0.3.4/i/fancybox/fancy_shadow_sw.png new file mode 100755 index 0000000..b451689 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_sw.png differ diff --git a/web/0.3.4/i/fancybox/fancy_shadow_w.png b/web/0.3.4/i/fancybox/fancy_shadow_w.png new file mode 100755 index 0000000..8a4e4a8 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_shadow_w.png differ diff --git a/web/0.3.4/i/fancybox/fancy_title_left.png b/web/0.3.4/i/fancybox/fancy_title_left.png new file mode 100755 index 0000000..6049223 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_title_left.png differ diff --git a/web/0.3.4/i/fancybox/fancy_title_main.png b/web/0.3.4/i/fancybox/fancy_title_main.png new file mode 100755 index 0000000..8044271 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_title_main.png differ diff --git a/web/0.3.4/i/fancybox/fancy_title_over.png b/web/0.3.4/i/fancybox/fancy_title_over.png new file mode 100755 index 0000000..d9f458f Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_title_over.png differ diff --git a/web/0.3.4/i/fancybox/fancy_title_right.png b/web/0.3.4/i/fancybox/fancy_title_right.png new file mode 100755 index 0000000..e36d9db Binary files /dev/null and b/web/0.3.4/i/fancybox/fancy_title_right.png differ diff --git a/web/0.3.4/i/fancybox/fancybox-x.png b/web/0.3.4/i/fancybox/fancybox-x.png new file mode 100755 index 0000000..c2130f8 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancybox-x.png differ diff --git a/web/0.3.4/i/fancybox/fancybox-y.png b/web/0.3.4/i/fancybox/fancybox-y.png new file mode 100755 index 0000000..7ef399b Binary files /dev/null and b/web/0.3.4/i/fancybox/fancybox-y.png differ diff --git a/web/0.3.4/i/fancybox/fancybox.png b/web/0.3.4/i/fancybox/fancybox.png new file mode 100755 index 0000000..65e14f6 Binary files /dev/null and b/web/0.3.4/i/fancybox/fancybox.png differ diff --git a/web/0.3.4/i/gmailIcon.png b/web/0.3.4/i/gmailIcon.png new file mode 100644 index 0000000..387d978 Binary files /dev/null and b/web/0.3.4/i/gmailIcon.png differ diff --git a/web/0.3.4/i/loader-w.gif b/web/0.3.4/i/loader-w.gif new file mode 100644 index 0000000..0247671 Binary files /dev/null and b/web/0.3.4/i/loader-w.gif differ diff --git a/web/0.3.4/i/panel/f1accounts.png b/web/0.3.4/i/panel/f1accounts.png new file mode 100644 index 0000000..74accc0 Binary files /dev/null and b/web/0.3.4/i/panel/f1accounts.png differ diff --git a/web/0.3.4/i/panel/f1panel.png b/web/0.3.4/i/panel/f1panel.png new file mode 100644 index 0000000..b8f2ad9 Binary files /dev/null and b/web/0.3.4/i/panel/f1panel.png differ diff --git a/web/0.3.4/i/panel/step-01.png b/web/0.3.4/i/panel/step-01.png new file mode 100644 index 0000000..fc5946c Binary files /dev/null and b/web/0.3.4/i/panel/step-01.png differ diff --git a/web/0.3.4/i/panel/step-02.png b/web/0.3.4/i/panel/step-02.png new file mode 100644 index 0000000..75a23d3 Binary files /dev/null and b/web/0.3.4/i/panel/step-02.png differ diff --git a/web/0.3.4/i/panel/step-022.png b/web/0.3.4/i/panel/step-022.png new file mode 100644 index 0000000..99a31f7 Binary files /dev/null and b/web/0.3.4/i/panel/step-022.png differ diff --git a/web/0.3.4/i/panel/step-03.png b/web/0.3.4/i/panel/step-03.png new file mode 100644 index 0000000..814a88f Binary files /dev/null and b/web/0.3.4/i/panel/step-03.png differ diff --git a/web/0.3.4/i/screenshot_01.png b/web/0.3.4/i/screenshot_01.png new file mode 100644 index 0000000..b5d15b7 Binary files /dev/null and b/web/0.3.4/i/screenshot_01.png differ diff --git a/web/0.3.4/i/shareIcon.png b/web/0.3.4/i/shareIcon.png new file mode 100644 index 0000000..37cd3b7 Binary files /dev/null and b/web/0.3.4/i/shareIcon.png differ diff --git a/web/0.3.4/i/sprite.png b/web/0.3.4/i/sprite.png new file mode 100644 index 0000000..6a13758 Binary files /dev/null and b/web/0.3.4/i/sprite.png differ diff --git a/web/0.3.4/i/step-01.png b/web/0.3.4/i/step-01.png new file mode 100644 index 0000000..c80578f Binary files /dev/null and b/web/0.3.4/i/step-01.png differ diff --git a/web/0.3.4/i/step-02.png b/web/0.3.4/i/step-02.png new file mode 100644 index 0000000..38611d6 Binary files /dev/null and b/web/0.3.4/i/step-02.png differ diff --git a/web/0.3.4/i/step-03.png b/web/0.3.4/i/step-03.png new file mode 100644 index 0000000..eab915e Binary files /dev/null and b/web/0.3.4/i/step-03.png differ diff --git a/web/0.3.4/i/toolbar-button.png b/web/0.3.4/i/toolbar-button.png new file mode 100644 index 0000000..e2049d5 Binary files /dev/null and b/web/0.3.4/i/toolbar-button.png differ diff --git a/web/0.3.4/i/twitterIcon.png b/web/0.3.4/i/twitterIcon.png new file mode 100644 index 0000000..0698241 Binary files /dev/null and b/web/0.3.4/i/twitterIcon.png differ diff --git a/web/0.3.4/index.html b/web/0.3.4/index.html new file mode 100644 index 0000000..740245f --- /dev/null +++ b/web/0.3.4/index.html @@ -0,0 +1,172 @@ + + + + + + + + + Mozilla F1 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

Share links fast.

+

So, what’s F1?

+ F1 is a browser extension that allows you to share links in a fast and fun way. Share links from within the browser, from any webpage, using the same services you already know and love. Mozilla F1 is made by Mozilla Messaging. + +
+
+ +
+
+ +
+
+
+ +
+
+

Share with your
favorite services

+ With support for Facebook, Twitter, Gmail, Google Apps, Yahoo Mail and LinkedIn, we have your favorite services covered—and we're adding more services with every release. +
+
+
+
+
+

Once you've installed F1 sharing is as easy as...

+
+
+ 1 Hit the F1 icon in the URL bar + +
+
+ 2 Choose your service in the menu + +
+
+ 3 Express yourself and hit share! + +
+
+
+
+ *Firefox 3.6 support: F1 uses some advanced technology + and UI capabilities that are not possible in Firefox 3.6 and earlier. + If you installed the previous version of F1 that works with Firefox 3.6, + it will continue to work while Firefox 4 is in beta. Once Firefox 4 is + released, the older 3.6 compatible extension will be phased out. +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/web/0.3.4/index.js b/web/0.3.4/index.js new file mode 100644 index 0000000..0c073e9 --- /dev/null +++ b/web/0.3.4/index.js @@ -0,0 +1,32 @@ +define("hashDispatch",[],function(){return function(b){function g(){var i=location.href.split("#")[1]||"_default",l,f;f=i.indexOf(":");if(f!==-1){l=i.substring(f+1,i.length);i=i.substring(0,f)}if(i in b)b[i](l);else b._catchAll&&b._catchAll(i,l)}g();window.addEventListener("hashchange",g,false)}}); +(function(b){var g,i,l,f,x,m,D,o,A,B,r=0,e={},p=[],q=0,d={},n=[],F=null,u=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,z=0,v="",s,k,j=false,C=b.extend(b("
")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){i.hide();u.onerror=u.onload=null;F&&F.abort();g.empty()},O=function(){if(false===e.onError(p,r,e)){i.hide();j=false}else{e.titleShow=false;e.width="auto";e.height="auto";g.html('

The requested content cannot be loaded.
Please try again later.

'); +E()}},I=function(){var a=p[r],c,h,t,G,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(p,r,e);if(w===false)j=false;else{if(typeof w=="object")e=b.extend(e,w);t=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(t===""&&e.orig&&e.titleFromAlt)t=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)|| +c=="#")c=null;if(e.type){h=e.type;if(!c)c=e.content}else if(e.content)h="html";else if(c)h=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(h){if(h=="inline"){a=c.substr(c.indexOf("#"));h=b(a).length>0?"inline":"ajax"}e.type=h;e.href=c;e.title=t;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick= +false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);g.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(m.children())});switch(h){case "html":g.html(e.content);E();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){j=false;return}b('
').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(m.children())}).bind("fancybox-cancel", +function(){b(this).replaceWith(g.children())});b(a).appendTo(g);E();break;case "image":j=false;b.fancybox.showActivity();u=new Image;u.onerror=function(){O()};u.onload=function(){j=true;u.onerror=u.onload=null;X()};u.src=c;break;case "swf":e.scrolling="no";G='';P="";b.each(e.swf,function(y,H){G+='';P+=" "+y+'="'+ +H+'"'});G+='";g.html(G);E();break;case "ajax":j=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;F=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(y){y.status>0&&O()},success:function(y,H,Q){if((typeof Q=="object"?Q:F).status==200){if(typeof e.ajax.win=="function"){w=e.ajax.win(c,y,H,Q);if(w===false){i.hide();return}else if(typeof w=="string"||typeof w== +"object")y=w}g.html(y);E()}}}));break;case "iframe":R();break}}else O()}},E=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";g.wrapInner('
'); +e.width=g.width();e.height=g.height();R()},X=function(){e.width=u.width;e.height=u.height;b("").attr({id:"fancybox-img",src:u.src,alt:e.title}).appendTo(g);R()},R=function(){var a,c;i.hide();if(f.is(":visible")&&false===d.onCleanup(n,q,d)){b.event.trigger("fancybox-cancel");j=false}else{j=true;b(m.add(l)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());n=p;q=r;d=e;if(d.overlayShow){l.css({"background-color":d.overlayColor, +opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!l.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});l.show()}}else l.hide();k=Y();Z();if(f.is(":visible")){b(D.add(A).add(B)).hide();a=f.position();s={top:a.top,left:a.left,width:f.width(),height:f.height()};c=s.width==k.width&&s.height== +k.height;m.fadeTo(d.changeFade,0.3,function(){var h=function(){m.html(g.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");m.empty().removeAttr("filter").css({"border-width":d.padding,width:k.width-d.padding*2,height:e.autoDimensions?"auto":k.height-z-d.padding*2});if(c)h();else{C.prop=0;b(C).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:h})}})}else{f.removeAttr("style");m.css("border-width",d.padding);if(d.transitionIn=="elastic"){s=V();m.html(g.contents()); +f.show();if(d.opacity)k.opacity=0;C.prop=0;b(C).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&z>0&&o.show();m.css({width:k.width-d.padding*2,height:e.autoDimensions?"auto":k.height-z-d.padding*2}).html(g.contents());f.css(k).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},$=function(a){if(a&&a.length){if(d.titlePosition=="float")return'
'+ +a+'
';return'
'+a+"
"}return false},Z=function(){v=d.title||"";z=0;o.empty().removeAttr("style").removeClass();if(d.titleShow!==false){v=b.isFunction(d.titleFormat)?d.titleFormat(v,n,q,d):$(v);if(!(!v||v==="")){o.addClass("fancybox-title-"+d.titlePosition).html(v).appendTo("body").show();switch(d.titlePosition){case "inside":o.css({width:k.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding}); +z=o.outerHeight(true);o.appendTo(x);k.height+=z;break;case "over":o.css({marginLeft:d.padding,width:k.width-d.padding*2,bottom:d.padding}).appendTo(x);break;case "float":o.css("left",parseInt((o.width()-k.width-40)/2,10)*-1).appendTo(f);break;default:o.css({width:k.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f);break}}}o.hide()},aa=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault(); +b.fancybox.close()}else if((a.keyCode==37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&n.length>1||q!==0)A.show();if(d.cyclic&&n.length>1||q!=n.length-1)B.show()}else{A.hide();B.hide()}},S=function(){if(!b.support.opacity){m.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&& +m.css("height","auto");f.css("height","auto");v&&v.length&&o.show();d.showCloseButton&&D.show();aa();d.hideOnContentClick&&m.bind("click",b.fancybox.close);d.hideOnOverlayClick&&l.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('').appendTo(m);f.show();j=false;b.fancybox.center();d.onComplete(n,q,d);ba()},ba=function(){var a,c;if(n.length-1>q){a=n[q+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(q>0){a=n[q-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(s.width+(k.width-s.width)*a,10),height:parseInt(s.height+(k.height-s.height)*a,10),top:parseInt(s.top+(k.top-s.top)*a,10),left:parseInt(s.left+(k.left- +s.left)*a,10)};if(typeof k.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);m.css({width:c.width-d.padding*2,height:c.height-z*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},Y=function(){var a=U(),c={},h=d.autoScale,t=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+t;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]* +parseFloat(d.height)/100,10):d.height+t;if(h&&(c.width>a[0]||c.height>a[1]))if(e.type=="image"||e.type=="swf"){h=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-t)/h+t,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-t)*h+t,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},ca=function(a){var c=a.offset(); +c.top+=parseInt(a.css("paddingTop"),10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){a=ca(a);c={width:a.width+d.padding*2,height:a.height+d.padding*2,top:a.top-d.padding-20,left:a.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+ +a[0]*0.5,10)}}return c},da=function(){if(i.is(":visible")){b("div",i).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!j){j=true;b(this).blur();p=[];r=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")p.push(this);else{p=b("a[rel="+c+"], area[rel="+c+"]");r=p.index(this)}I()}});return this}; +b.fancybox=function(a,c){if(!j){j=true;c=typeof c!=="undefined"?c:{};p=[];r=parseInt(c.index,10)||0;if(b.isArray(a)){for(var h=0,t=a.length;hp.length||r<0)r=0;I()}};b.fancybox.showActivity=function(){clearInterval(K); +i.show();K=setInterval(da,66)};b.fancybox.hideActivity=function(){i.hide()};b.fancybox.next=function(){return b.fancybox.pos(q+1)};b.fancybox.prev=function(){return b.fancybox.pos(q-1)};b.fancybox.pos=function(a){if(!j){a=parseInt(a);p=n;if(a>-1&&a1){r=a>=n.length?0:n.length-1;I()}}};b.fancybox.cancel=function(){if(!j){j=true;b.event.trigger("fancybox-cancel");N();e.onCancel(p,r,e);j=false}};b.fancybox.close=function(){function a(){l.fadeOut("fast");o.empty().hide(); +f.hide();b.event.trigger("fancybox-cleanup");m.empty();d.onClosed(n,q,d);n=e=[];q=r=0;d=e={};j=false}if(!(j||f.is(":hidden"))){j=true;if(d&&false===d.onCleanup(n,q,d))j=false;else{N();b(D.add(A).add(B)).hide();b(m.add(l)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");m.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&o.empty();f.stop();if(d.transitionOut=="elastic"){s=V();var c= +f.position();k={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)k.opacity=1;o.empty().hide();C.prop=1;b(C).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){l.is(":visible")&&l.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,h;if(!j){h=a===true?1:0;c=U();!h&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]- +20,c[3]+(c[1]-m.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-m.width()-40)*0.5-d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(g=b('
'),i=b('
'),l=b('
'),f=b('
'));x=b('
').append('
').appendTo(f); +x.append(m=b('
'),D=b(''),o=b('
'),A=b(''),B=b(''));D.click(b.fancybox.close);i.click(b.fancybox.cancel);A.click(function(a){a.preventDefault();b.fancybox.prev()});B.click(function(a){a.preventDefault();b.fancybox.next()}); +b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(j)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){i.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('').prependTo(x)}}}; +b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing", +easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);define("jquery.fancybox-1.3.4",function(){}); +define("index",["require","jquery","hashDispatch","jquery.fancybox-1.3.4"],function(b,g){g(function(){var i=!!navigator.buildID,l=i&&navigator.userAgent.match(/Firefox\/([^\s]+)/);if(i&&l){l=parseFloat(l[1]);i=l>3.99}if(!i){g("#downloadFF4").hide();g("#no36").show();g("#info36").show();g("#firefox").show()}g(".fancybox").fancybox({type:"iframe",href:"http://player.vimeo.com/video/21374067?title=0&byline=0&portrait=0&autoplay=true",width:700,height:468,autoScale:false,autoDimensions:false}); +g("body").delegate("#firefox","click",function(){location="http://www.mozilla.com/en-US/firefox/beta/"}).delegate(".downloadXpi","click",function(f){var x=location.href;location=x.indexOf("staging")!==-1||x.indexOf("linkdrop")!==-1?"/ffshare.xpi":"https://addons.mozilla.org/services/install.php?addon_id=252539&addon_name=F1%20by%20Mozilla%20Labs&src=external-f1home";f.preventDefault()})})}); \ No newline at end of file diff --git a/web/0.3.4/jquery.fancybox-1.3.4.css b/web/0.3.4/jquery.fancybox-1.3.4.css new file mode 100755 index 0000000..d029c0d --- /dev/null +++ b/web/0.3.4/jquery.fancybox-1.3.4.css @@ -0,0 +1,359 @@ +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +#fancybox-loading { + position: fixed; + top: 50%; + left: 50%; + width: 40px; + height: 40px; + margin-top: -20px; + margin-left: -20px; + cursor: pointer; + overflow: hidden; + z-index: 1104; + display: none; +} + +#fancybox-loading div { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 480px; + background-image: url('i/fancybox/fancybox.png'); +} + +#fancybox-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + z-index: 1100; + display: none; +} + +#fancybox-tmp { + padding: 0; + margin: 0; + border: 0; + overflow: auto; + display: none; +} + +#fancybox-wrap { + position: absolute; + top: 0; + left: 0; + padding: 20px 10px 10px 20px; + z-index: 1101; + outline: none; + display: none; +} + +#fancybox-outer { + position: relative; + width: 100%; + height: 100%; + background: #fff; +} + +#fancybox-content { + width: 0; + height: 0; + padding: 0; + outline: none; + position: relative; + overflow: hidden; + z-index: 1102; + border: 0px solid #fff; +} + +#fancybox-hide-sel-frame { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: transparent; + z-index: 1101; +} + +#fancybox-close { + position: absolute; + top: -15px; + right: -25px; + width: 30px; + height: 30px; + background: transparent url('i/fancybox/fancybox.png') -40px 0px; + cursor: pointer; + z-index: 1103; + display: none; +} + +#fancybox-error { + color: #444; + font: normal 12px/20px Arial; + padding: 14px; + margin: 0; +} + +#fancybox-img { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + border: none; + outline: none; + line-height: 0; + vertical-align: top; +} + +#fancybox-frame { + width: 100%; + height: 100%; + border: none; + display: block; +} + +#fancybox-left, #fancybox-right { + position: absolute; + bottom: 0px; + height: 100%; + width: 35%; + cursor: pointer; + outline: none; + background: transparent url('i/fancybox/blank.gif'); + z-index: 1102; + display: none; +} + +#fancybox-left { + left: 0px; +} + +#fancybox-right { + right: 0px; +} + +#fancybox-left-ico, #fancybox-right-ico { + position: absolute; + top: 50%; + left: -9999px; + width: 30px; + height: 30px; + margin-top: -15px; + cursor: pointer; + z-index: 1102; + display: block; +} + +#fancybox-left-ico { + background-image: url('i/fancybox/fancybox.png'); + background-position: -40px -30px; +} + +#fancybox-right-ico { + background-image: url('i/fancybox/fancybox.png'); + background-position: -40px -60px; +} + +#fancybox-left:hover, #fancybox-right:hover { + visibility: visible; /* IE6 */ +} + +#fancybox-left:hover span { + left: 20px; +} + +#fancybox-right:hover span { + left: auto; + right: 20px; +} + +.fancybox-bg { + position: absolute; + padding: 0; + margin: 0; + border: 0; + width: 20px; + height: 20px; + z-index: 1001; +} + +#fancybox-bg-n { + top: -20px; + left: 0; + width: 100%; + background-image: url('i/fancybox/fancybox-x.png'); +} + +#fancybox-bg-ne { + top: -20px; + right: -20px; + background-image: url('i/fancybox/fancybox.png'); + background-position: -40px -162px; +} + +#fancybox-bg-e { + top: 0; + right: -20px; + height: 100%; + background-image: url('i/fancybox/fancybox-y.png'); + background-position: -20px 0px; +} + +#fancybox-bg-se { + bottom: -20px; + right: -20px; + background-image: url('i/fancybox/fancybox.png'); + background-position: -40px -182px; +} + +#fancybox-bg-s { + bottom: -20px; + left: 0; + width: 100%; + background-image: url('i/fancybox/fancybox-x.png'); + background-position: 0px -20px; +} + +#fancybox-bg-sw { + bottom: -20px; + left: -20px; + background-image: url('i/fancybox/fancybox.png'); + background-position: -40px -142px; +} + +#fancybox-bg-w { + top: 0; + left: -20px; + height: 100%; + background-image: url('i/fancybox/fancybox-y.png'); +} + +#fancybox-bg-nw { + top: -20px; + left: -20px; + background-image: url('i/fancybox/fancybox.png'); + background-position: -40px -122px; +} + +#fancybox-title { + font-family: Helvetica; + font-size: 12px; + z-index: 1102; +} + +.fancybox-title-inside { + padding-bottom: 10px; + text-align: center; + color: #333; + background: #fff; + position: relative; +} + +.fancybox-title-outside { + padding-top: 10px; + color: #fff; +} + +.fancybox-title-over { + position: absolute; + bottom: 0; + left: 0; + color: #FFF; + text-align: left; +} + +#fancybox-title-over { + padding: 10px; + background-image: url('i/fancybox/fancy_title_over.png'); + display: block; +} + +.fancybox-title-float { + position: absolute; + left: 0; + bottom: -20px; + height: 32px; +} + +#fancybox-title-float-wrap { + border: none; + border-collapse: collapse; + width: auto; +} + +#fancybox-title-float-wrap td { + border: none; + white-space: nowrap; +} + +#fancybox-title-float-left { + padding: 0 0 0 15px; + background: url('i/fancybox/fancybox.png') -40px -90px no-repeat; +} + +#fancybox-title-float-main { + color: #FFF; + line-height: 29px; + font-weight: bold; + padding: 0 0 3px 0; + background: url('i/fancybox/fancybox-x.png') 0px -40px; +} + +#fancybox-title-float-right { + padding: 0 0 0 15px; + background: url('i/fancybox/fancybox.png') -55px -90px no-repeat; +} + +/* IE6 */ + +.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_close.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_nav_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_nav_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } +.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_main.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { + height: expression(this.parentNode.clientHeight + "px"); +} + +#fancybox-loading.fancybox-ie6 { + position: absolute; margin-top: 0; + top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); +} + +#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_loading.png', sizingMethod='scale'); } + +/* IE6, IE7, IE8 */ + +.fancybox-ie .fancybox-bg { background: transparent !important; } + +.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_n.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_e.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_se.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_s.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_w.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } \ No newline at end of file diff --git a/web/0.3.4/play/ac.html b/web/0.3.4/play/ac.html new file mode 100644 index 0000000..a590f92 --- /dev/null +++ b/web/0.3.4/play/ac.html @@ -0,0 +1,57 @@ + + + + Autocomplete test + + + + + +
+ + + +
+ + diff --git a/web/0.3.4/play/designs/i/background.gif b/web/0.3.4/play/designs/i/background.gif new file mode 100644 index 0000000..b74689c Binary files /dev/null and b/web/0.3.4/play/designs/i/background.gif differ diff --git a/web/0.3.4/play/designs/i/bryanAvatar.jpg b/web/0.3.4/play/designs/i/bryanAvatar.jpg new file mode 100644 index 0000000..cad554b Binary files /dev/null and b/web/0.3.4/play/designs/i/bryanAvatar.jpg differ diff --git a/web/0.3.4/play/designs/i/linkdropiconfaded.png b/web/0.3.4/play/designs/i/linkdropiconfaded.png new file mode 100644 index 0000000..3a2f06b Binary files /dev/null and b/web/0.3.4/play/designs/i/linkdropiconfaded.png differ diff --git a/web/0.3.4/play/designs/i/settings.png b/web/0.3.4/play/designs/i/settings.png new file mode 100644 index 0000000..51184ce Binary files /dev/null and b/web/0.3.4/play/designs/i/settings.png differ diff --git a/web/0.3.4/play/designs/nativeShare.css b/web/0.3.4/play/designs/nativeShare.css new file mode 100644 index 0000000..5c050ba --- /dev/null +++ b/web/0.3.4/play/designs/nativeShare.css @@ -0,0 +1,581 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +* { + margin: 0; + padding: 0; + outline: none; + border: none; + border-collapse: collapse; + position: relative; + font-family: inherit; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + vertical-align: top; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + list-style-type: none; +} + +body { + font-size: 11px; + font-family: "lucida grande"; + max-height: 128px; + overflow: hidden; + background-color: #fff; + background-position: bottom center; + background-repeat: no-repeat; + background-color: #fff; +} + +button::-moz-focus-inner { + border: 0; +} + +a { + text-decoration: none; + outline: none; +} + +#tabs { + overflow: hidden; + border-bottom: 1px solid #515151; +} + +#twitter, #facebook, #gmail, #settings { + /* background-image: -moz-linear-gradient(top, #d0d0d0 0%, #a8a8a8 100%); */ + background-color: #a7a7a7; +/* + border-top: 1px solid #515151; + -moz-box-shadow: 0 2px 0 -1px #e3e3e3 inset; +*/ +} + +ul.nav { + -moz-box-shadow:0 2px 0 -1px #CDCDCD inset; + background-color:#A7A7A7; + display: block; + width: 100%; + padding: 0 10px; +} + +ul.nav .username { + font-size: 11px; + line-height: 24px; + padding: 0 10px; + margin: 4px 10px; + border-left: 1px dotted #888; + display: inline-block; +} + +ul.nav .username img { + border: 1px solid #fff; + -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.25); + width: 23px; + height: 23px; + margin-right: 5px; +} + +ul.nav .username .userId { + color: #000; + font-weight: bold; + text-shadow: 1px 1px 0 #bbb; +} + +ul.nav .navWrap { + width: 960px; +/* + background-image: url("i/logo.gif"); + background-repeat: no-repeat; + background-position: right center; +*/ + position: relative; + left: 50%; + margin-left: -480px; +} + +ul.nav li { + width: auto; + display: inline-block; + float: left; + list-style-type: none; + margin: 3px 0; + font-size: 11px; + line-height: 24px; + background-image: -moz-linear-gradient(center top , #FDFDFD 0%, #AAAAAA 100%); + border-width: 1px; + border-style: solid; + border-color: #666; + -moz-box-shadow: 0 1px 0 #CDCDCD; +} + +ul.nav li:hover { + background-color: rgba(255,255,255,0.5); +} + +ul.nav li.ui-tabs-selected { + background-image: -moz-linear-gradient(center top , #bbb 0%, #aaa 100%); + -moz-box-shadow: 0 0 3px #666 inset,0 1px 0 #CDCDCD; +} + +ul.nav li:first-child { + z-index: 1; + -moz-border-radius: 3px 0 0 3px; +} + +ul.nav li:nth-child(2) { + z-index: 2; + border-left: none; + border-right: none; +} + +ul.nav li:nth-child(3) { + z-index: 1; + -moz-border-radius: 0 3px 3px 0; +} + +ul.nav li a { + color: #fff; +} + +ul.nav li a.icon { + width: 36px; + height: 24px; + background-repeat: no-repeat; + background-position: center center; + display: block; +} + +ul.nav li a.icon.twitter { + background-image: url("../share/i/twitterIcon.png"); +} + +ul.nav li a.icon.facebook { + background-image: url("../share/i/facebookIcon.png"); +} + +ul.nav li a.icon.gmail { + background-image: url("../share/i/gmailIcon.png"); +} + +ul.nav li a.icon.settings { + background-image: url("../share/i/settingsIcon.png"); +} + +ul.nav li.debug { + position: absolute; + right: 46px; + top: 0; + width: 60px; + text-align: center; +} + +ul.nav li.debug span.name { + display: block; + padding: 0; + text-align: center; + font-weight: normal; + color: #fff; +} + +ul.nav li.debug a.icon { + width: auto; +} + +ul.nav li span.name { + display: none; +} + +ul.nav li.ui-tabs-selected span.name { + display: none; +} + + +ul.nav li.settings, +ul.nav li.settings.ui-tabs-selected { + position: absolute; + right: 0; + top: 0; + text-align: center; + -moz-border-radius: 3px; +} + +ul.nav li.settings:hover span.name, +ul.nav li.settings.ui-tabs-selected span.name { + opacity: 1; +} + +ul.nav li.settings span.name { + display: none; +} + +ul.nav li.ui-tabs-selected { + +} + +ul.nav li span.name { + opacity: 0.5; +} + +ul.nav li.ui-tabs-selected a.icon, +ul.nav li.ui-tabs-selected span.name { + opacity: 1; +} + +ul.nav li span.name { + font-weight: bold; + color: #fff; +} + +ul.nav li.ui-tabs-selected span.name { + color: #0a0a0a; +} + +ul.nav span.name { + display: block; + padding-left: 24px; +} + +ul.nav li.ui-tabs-selected.settings span.name { + display: none; +} + +ul.nav li.ui-tabs-selected a.twitter, +ul.nav li:hover a.twitter { + background-image: url("../share/i/twitterIconColor.png"); +} + +ul.nav li.ui-tabs-selected a.facebook, +ul.nav li:hover a.facebook { + background-image: url("../share/i/facebookIconColor.png"); +} + +ul.nav li.ui-tabs-selected a.gmail, +ul.nav li:hover a.gmail { + background-image: url(".../share/i/gmailIconColor.png"); +} + +ul.nav li.ui-tabs-selected a { + color: #0a0a0a; +} + +div.user { + font-size: small; + width: 140px; + overflow: hidden; +} + +div.user.inactive { + opacity: 0.5; + background: -moz-repeating-linear-gradient(top left -45deg, #aaa, #aaa 5px, #fff 5px, #fff 10px) #aaa no-repeat fixed; + -moz-border-radius: 1%; + cursor: pointer; +} + +div.user .username { + color: #444; + font-weight: bold; +} + +td.image { + width: 90px; +} + +.thumbnail { + height: 71px; + padding: 4px; + border: 1px solid #999; + margin: 0 5px 0 0; + -moz-border-radius: 3px; + background-color: #ccc; +} + +div.thumb { + border: 1px solid #aaa; + background-color: #fff; + height: 61px; + width: 90px; + display: inline-block; +} + +ul.info { + display: inline-block; + width: 150px; + font-size: 11px; + padding: 0 5px 0 10px; +} + +.info .description { + color: #000; + font-size: 10px; +} + +.thumb .title { + color: #3B5998; + text-decoration: underline; + font-size: small; + cursor: pointer; +} + +.thumb .description { + color: #808080; + font-size: x-small; +} + +button { + padding: 2px 15px; + font-family: "helvetica neue", helvetica, arial, sans-serif; + font-size: 11px; + line-height:24px; + background-image: -moz-linear-gradient(top,#fdfdfd 0%,#aaa 100%); + border-width: 1px; + border-style: solid; + border-color: #5C5C5C #888 #666; + -moz-border-radius: 3px; + margin-left: 5px; + cursor: pointer; +} + +button.share { + -moz-border-radius: 0 3px 3px 0; + -moz-box-shadow: 0 1px 0 #cdcdcd; + border-left: none; + margin-left: 0; +} + +/* +button:hover, button:active { + border: 1px solid #999; +} +*/ + +button:active { + -moz-box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset, 0 0 3px rgba(0,0,0,0.75) inset; +} + +textarea, input[type="text"] { + -moz-box-shadow: 0 2px 2px -2px #555 inset, 0 1px 0 #cdcdcd; + border-width: 1px; + border-style: solid; + border-color: #5c5c5c #929292 #929292; + font-family: "lucida grande" + font-size: 12px; + line-height: 18px; + padding: 3px; + margin: 0; + width: 100%; + -moz-border-radius: 3px; +} + +textarea.message { + min-height: 71px; + -moz-border-radius: 3px 0 0 3px; + font-size: 14px; +} + +textarea:focus, input[type="text"]:focus { + +} + +.inputs { + margin: 0 5px 0 0; +} + +input[type="text"] { + height: 26px; + width: 238px; + display: block; +} + +input[type="text"]#to { + margin-bottom: 5px; +} + +.entry { + padding: 5px 0; + width: 960px; + left: 50%; + margin-left: -480px; + position: relative; + min-height: 71px; +} + +.entry .urlConfirmation { + padding: 1px 5px; + -moz-border-radius: 10px; + background-image: -moz-linear-gradient(top, #fafafa 0%, #e6e6e6 100%); + border: 1px solid #bebebe; + color: green; + position: absolute; + left: 5px; + bottom: 5px; + z-index: 1; + color: green; + font-size: 10px; + cursor: pointer; + display: none; +} + +.entry .urlConfirmation span { + color: #333; +} + +#settings .entry ul li { + display: inline-block; + float: left; +} + +#settings .entry ul li button { + margin: 0 10px 0 0; + width: 128px; +} + +.entry h1 { + margin: 0 0 10px 0; +} + +/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ +/* hbox and vbox classes */ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} +/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ + +/* clearfix */ + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} diff --git a/web/0.3.4/play/designs/nativeShare.html b/web/0.3.4/play/designs/nativeShare.html new file mode 100644 index 0000000..4c056c9 --- /dev/null +++ b/web/0.3.4/play/designs/nativeShare.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ + re-insert link +
+ +
+
+ +
+
+
+
+
    +
  • Title
  • +
  • Description
  • +
+
+ + +
+
+ +
+
+
+ + +
+
+ + re-insert link +
+ +
+
+ +
+
+

Settings

+
    +
  • +
  • +
  • +
  • +
+
+
+ +
+ + + + diff --git a/web/0.3.4/play/designs/neutralShare.css b/web/0.3.4/play/designs/neutralShare.css new file mode 100644 index 0000000..3f71186 --- /dev/null +++ b/web/0.3.4/play/designs/neutralShare.css @@ -0,0 +1,630 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +* { + margin: 0; + padding: 0; + outline: none; + border: none; + border-collapse: collapse; + position: relative; + font-family: inherit; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + vertical-align: top; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + list-style-type: none; +} + +body { + font-size: 11px; + font-family: "lucida grande"; + max-height: 128px; + overflow: hidden; + background-color: #fff; + background-position: bottom center; + background-repeat: no-repeat; + background-color: #fff; +} + +button::-moz-focus-inner { + border: 0; +} + +a { + text-decoration: none; + outline: none; + color: #00A0FF; +} + +a:hover { + text-decoration: underline; +} + +#tabs { + overflow: hidden; + width: 100%; + border-bottom: 1px solid #777; + background-color: #ddd; + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); + background-image:-moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%); +} + +#twitter, #facebook, #gmail, #settings { +} + +ul.nav { + display: block; + width: 100%; + padding: 0 10px; +} + +ul.nav .username { + font-size: 11px; + line-height: 24px; + padding: 0 10px; + margin: 4px 10px; + border-left: 1px dotted #888; + display: inline-block; +} + +ul.nav .username img { + border: 1px solid #fff; + -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.25); + width: 23px; + height: 23px; + margin-right: 5px; +} + +ul.nav .username .userId { + color: #000; + font-weight: bold; + /* text-shadow: 1px 1px 0 #bbb; */ +} + +ul.nav .navWrap { + position: relative; +/* + width: 960px; + left: 50%; + margin-left: -480px; +*/ +} + +ul.nav li { + width: auto; + display: inline-block; + float: left; + list-style-type: none; + margin: 3px 0; + font-size: 11px; + line-height: 24px; + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); + border-width: 1px; + border-style: solid; + border-color: #888; + -moz-box-shadow: 0 1px 0 #fff; +} + +ul.nav li:hover { + background-color: rgba(255,255,255,0.5); +} + +ul.nav li.ui-tabs-selected { + -moz-box-shadow:0 0 1px #666666 inset, 0 1px 0 #FFFFFF; + background-image:-moz-linear-gradient(center top , #EEEEEE 0%, #CCCCCC 100%); +} + +ul.nav li:first-child { + z-index: 1; + -moz-border-radius: 2px 0 0 2px; +} + +ul.nav li:nth-child(2) { + z-index: 2; + border-left: none; + border-right: none; +} + +ul.nav li:nth-child(3) { + z-index: 1; + -moz-border-radius: 0 2px 2px 0; +} + +ul.nav li a { + color: #fff; +} + +ul.nav li a.icon { + width: 36px; + height: 24px; + background-repeat: no-repeat; + background-position: center center; + display: block; +} + +ul.nav li a.icon.twitter { + background-image: url("../share/i/twitterIcon.png"); +} + +ul.nav li a.icon.facebook { + background-image: url("../share/i/facebookIcon.png"); +} + +ul.nav li a.icon.gmail { + background-image: url("../share/i/gmailIcon.png"); +} + +ul.nav li a.icon.settings { + background-image: url("../share/i/settingsIcon.png"); +} + +ul.nav li.debug { + position: absolute; + right: 46px; + top: 0; + width: 60px; + text-align: center; +} + +ul.nav li.debug span.name { + display: block; + padding: 0; + text-align: center; + font-weight: normal; + color: #fff; +} + +ul.nav li.debug a.icon { + width: auto; +} + +ul.nav li span.name { + display: none; +} + +ul.nav li.ui-tabs-selected span.name { + display: none; +} + + +ul.nav li.settings, +ul.nav li.settings.ui-tabs-selected { + position: absolute; + right: 0; + top: 0; + text-align: center; + -moz-border-radius: 2px; +} + +ul.nav li.settings:hover span.name, +ul.nav li.settings.ui-tabs-selected span.name { + opacity: 1; +} + +ul.nav li.settings span.name { + display: none; +} + +ul.nav li span.name { + opacity: 0.5; +} + +ul.nav li.ui-tabs-selected a.icon, +ul.nav li.ui-tabs-selected span.name { + opacity: 1; +} + +ul.nav li span.name { + font-weight: bold; + color: #fff; +} + +ul.nav li.ui-tabs-selected span.name { + color: #0a0a0a; +} + +ul.nav span.name { + display: block; + padding-left: 24px; +} + +ul.nav li.ui-tabs-selected.settings span.name { + display: none; +} + +ul.nav li.ui-tabs-selected a.twitter, +ul.nav li:hover a.twitter { + background-image: url("../share/i/twitterIconColor.png"); +} + +ul.nav li.ui-tabs-selected a.facebook, +ul.nav li:hover a.facebook { + background-image: url("../share/i/facebookIconColor.png"); +} + +ul.nav li.ui-tabs-selected a.gmail, +ul.nav li:hover a.gmail { + background-image: url("../share/i/gmailIconColor.png"); +} + +ul.nav li.ui-tabs-selected a { + color: #0a0a0a; +} + +div.user { + font-size: small; + width: 140px; + overflow: hidden; +} + +div.user.inactive { + opacity: 0.5; + background: -moz-repeating-linear-gradient(top left -45deg, #aaa, #aaa 5px, #fff 5px, #fff 10px) #aaa no-repeat fixed; + -moz-border-radius: 1%; + cursor: pointer; +} + +div.user .username { + color: #444; + font-weight: bold; +} + +td.image { + width: 90px; +} + +.thumbnail { + height: 71px; + padding: 4px; + border: 1px solid #bbb; + margin: 0 5px 0 0; + -moz-border-radius: 2px; + background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%); +} + +div.thumb { + border: 1px solid #aaa; + background-color: #fff; + height: 61px; + width: 90px; + display: inline-block; +} + +ul.info { + display: inline-block; + width: 150px; + font-size: 11px; + padding: 0 5px 0 10px; +} + +.info .description { + color: #444; + font-size: 10px; +} + +.thumb .title { + color: #3B5998; + text-decoration: underline; + font-size: small; + cursor: pointer; +} + +.thumb .description { + color: #808080; + font-size: x-small; +} + +button { + padding: 2px 15px; + background-image: -moz-linear-gradient(center top , #FAFAFA 0%, #DDDDDD 100%); + border-width: 1px; + border-style: solid; + border-color: #888; + -moz-border-radius: 2px; + margin-left: 5px; + cursor: pointer; + -moz-box-shadow: 0 1px 0 #fff; +} + +button.share { + -moz-border-radius: 0 2px 2px 0; + border-left: none; + margin-left: 0; +} + +button:active { + background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #CCCCCC 100%); + -moz-box-shadow:0 0 1px #666666 inset, 0 1px 0 #FFFFFF; +} + +textarea, input[type="text"] { + border-width: 1px; + border-style: solid; + border-color: #888; + font-family: "lucida grande" + font-size: 12px; + line-height: 18px; + padding: 3px; + margin: 0; + width: 100%; + -moz-border-radius: 2px; + -moz-box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff; +} + +textarea.message { + min-height: 71px; + -moz-border-radius: 2px 0 0 2px; + font-size: 14px; +} + +textarea:focus, input[type="text"]:focus { +} + +.inputs { + margin: 0 5px 0 0; +} + +input[type="text"] { + height: 26px; + width: 238px; + display: block; +} + +input[type="text"]#to { + margin-bottom: 5px; +} + +.entry { + padding: 5px 10px; + width: 100%; +/* + width: 960px; + left: 50%; + margin-left: -480px; +*/ + position: relative; + min-height: 71px; +} + +.entry .urlConfirmation { + padding: 1px 5px; + -moz-border-radius: 10px; + background-image: -moz-linear-gradient(top, #fafafa 0%, #e6e6e6 100%); + border: 1px solid #bebebe; + color: green; + position: absolute; + left: 5px; + bottom: 5px; + z-index: 1; + color: green; + font-size: 10px; + cursor: pointer; + display: none; +} + +.entry .urlConfirmation span { + color: #333; +} + +#settings .entry ul { + min-width: 660px; +} + +#settings .entry ul li { + display: inline-block; + float: left; + width: 220px; + min-height: 71px; +} + +#settings .entry ul li:nth-child(1) { + padding: 0 10px 0 0; +} + +#settings .entry ul li:nth-child(2) { + padding: 0 10px 0; +} + +#settings .entry ul li:nth-child(3) { + padding: 0 0 0 10px; +} + +#settings .entry ul li button { + margin: 0; + width: 100%; + padding: 5px 0; +} + +#settings .entry ul li h1 { + margin: 0 0 10px 0; +} + +.entry h1 { + font-weight: bold; + margin: 0 0 5px 0; + color: #0a0a0a; + padding: 5px 0 0 0; + /* border-top: 1px dotted #888; */ +} + +.entry h1 a { + font-weight: normal; +} + +.entry h1 img { + margin-top: -1px; +} + +#settings .entry .settings { + width: 253px; + margin: 0 0 0 10px; + padding: 0 0 0 10px; + border-left: 1px dotted #888; + color: #444; +} + +#settings .entry .success { + width: 100%; + line-height: 24px; + color: #54B851; + font-weight: bold; +} + +#settings .entry .success span.check { + width: 24px; + background-color: #54B851; + color: #fff; + -moz-border-radius: 12px; + display: inline-block; + font-size: 12px; + font-weight: normal; + text-align: center; +} + +/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ +/* hbox and vbox classes */ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} +/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ + +/* clearfix */ + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} diff --git a/web/0.3.4/play/designs/neutralShare.html b/web/0.3.4/play/designs/neutralShare.html new file mode 100644 index 0000000..7e9ac60 --- /dev/null +++ b/web/0.3.4/play/designs/neutralShare.html @@ -0,0 +1,120 @@ + + + + + F1 + + + + + + + + +
+ + + +
+
+
+ + re-insert link +
+ +
+
+ +
+
+
+
+
    +
  • Title
  • +
  • Description
  • +
+
+ + +
+
+ +
+
+
+ + +
+
+ + re-insert link +
+ +
+
+ +
+
+
    +
  • +

    Twitter

    + +
  • +
  • +

    Facebook

    + +
  • +
  • +

    Gmail - manage | add account

    +
    + 3 accounts configured +
    +
  • +
+
+

Advanced settings

+ Don't see what you need? Try the account manager to get into the nitty gritty. +
+
+
+ +
+ + + + diff --git a/web/0.3.4/play/designs/share.css b/web/0.3.4/play/designs/share.css new file mode 100644 index 0000000..8d8ed93 --- /dev/null +++ b/web/0.3.4/play/designs/share.css @@ -0,0 +1,568 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +* { + margin: 0; + padding: 0; + outline: none; + border: none; + border-collapse: collapse; + position: relative; + font-family: inherit; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + vertical-align: top; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + list-style-type: none; +} + +body { + font-size: 14px; + font-family: "helvetica neue", helvetica, arial, sans-serif; + max-height: 128px; + overflow: hidden; + background-color: #fff; + background-position: bottom center; + background-repeat: no-repeat; + background-color: #fff; +} + +button::-moz-focus-inner { + border: 0; +} + +a { + text-decoration: none; + outline: none; +} + +#tabs { + -moz-box-shadow: 0 -5px 2px -4px #DDDDDD inset; + height: 125px; + overflow: hidden; + border-bottom: 1px solid #ccc; + background-color: #f2f2f2; +} + +ul.nav { + background-image: url("i/background.gif"); + -moz-box-shadow: 0 -2px 3px rgba(0,0,0,0.5) inset; + display: block; + width: 100%; + padding: 0 10px; +} + +ul.nav .username { + height: 24px; + font-size: 12px; + color: #fff; + font-weight: bold; + line-height: 24px; + position: absolute; + right: 35px; + top: 6px; +} + +ul.nav .username img { + border: 1px solid #fff; + width: 23px; + height: 23px; + margin-left: 5px; +} + +ul.nav .navWrap { + width: 962px; + position: relative; + left: 50%; + margin-left:-481px; + border-left: 1px solid #222; + border-right: 1px solid #222; +} + +ul.nav li { + width: auto; + display: inline-block; + float: left; + list-style-type: none; + background-color: #444; + margin: 10px 0 0 0px; + font-size: 12px; + line-height: 24px; + -moz-border-radius: 5px 5px 0 0; + -moz-box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.45); +} + +ul.nav li:hover { + background-color: #555; +} + +ul.nav li:nth-child(n+2) { + margin-left: -5px; +} + +ul.nav li:nth-child(1) { + z-index: 1; +} + +ul.nav li:nth-child(2) { + z-index: 2; +} + +ul.nav li:nth-child(3) { + z-index: 1; +} + +ul.nav li a { + color: #fff; +} + +ul.nav li a.icon { + width: 24px; + height: 24px; + margin: 0 5px; + background-repeat: no-repeat; + background-position: center center; + display: block; +} + +ul.nav li a.icon.twitter { + background-image: url("../share/i/twitter_w.png"); +} + +ul.nav li a.icon.facebook { + background-image: url("../share/i/facebook_w.png"); +} + +ul.nav li a.icon.gmail { + background-image: url("../share/i/gmail_w.png"); +} + +ul.nav li a.icon.settings { + background-image: url("i/settings.png"); + background-position: top left; +} + +ul.nav li.debug { + position: absolute; + right: 46px; + top: 0; + width: 60px; + text-align: center; +} + +ul.nav li.debug span.name { + display: block; + padding: 0; + text-align: center; + font-weight: normal; + color: #fff; +} + +ul.nav li.debug a.icon { + width: auto; +} + +ul.nav li span.name { + display: none; +} + +ul.nav li.ui-tabs-selected span.name { + display: block; +} + + +ul.nav li.settings, +ul.nav li.settings.ui-tabs-selected { + position: absolute; + background-color: transparent; + background-image: none; + -moz-box-shadow: none; + right: 15px; + top: 0; + width: 16px; + text-align: center; +} + +ul.nav li.settings:hover span.name, +ul.nav li.settings.ui-tabs-selected span.name { + opacity: 1; +} + +ul.nav li.settings span.name { + display: none; +} + +ul.nav li.ui-tabs-selected { + background-color: #fff; + background-image: -moz-linear-gradient(top, #fff 0%, #f2f2f2 100%); + width: 128px; + z-index: 100; +} + +ul.nav li a.icon, +ul.nav li span.name { + opacity: 0.5; +} + +ul.nav li.ui-tabs-selected a.icon, +ul.nav li.ui-tabs-selected span.name { + opacity: 1; +} + +ul.nav li span.name { + font-weight: bold; + color: #fff; +} + +ul.nav li.ui-tabs-selected span.name { + color: #0a0a0a; +} + +ul.nav span.name { + display: block; + padding-left: 24px; +} + +ul.nav li.ui-tabs-selected.settings { + width: 16px; +} + +ul.nav li.ui-tabs-selected.settings span.name { + display: none; +} + +ul.nav li.ui-tabs-selected a.twitter { + background-image: url(".../share/i/twitter_b.png"); +} + +ul.nav li.ui-tabs-selected a.facebook { + background-image: url("../share/i/facebook_b.png"); +} + +ul.nav li.ui-tabs-selected a.gmail { + background-image: url("../share/i/gmail_b.png"); +} + +ul.nav li.ui-tabs-selected a { + color: #0a0a0a; +} + +table { + width: 100%; +} + +td.user { + width: 140px; + padding-right: 10px; + white-space: nowrap; +} + +td.thumb { + width: 220px; + padding: 0 10px; +} + +td.message { + width: 300px; + padding: 0 10px; +} + +td.button { + padding: 1px 20px; + vertical-align: bottom; +} + +div.user { + font-size: small; + width: 140px; + overflow: hidden; +} + +div.user.inactive { + opacity: 0.5; + background: -moz-repeating-linear-gradient(top left -45deg, #aaa, #aaa 5px, #fff 5px, #fff 10px) #aaa no-repeat fixed; + -moz-border-radius: 1%; + cursor: pointer; +} + +div.user .username { + color: #444; + font-weight: bold; +} + +td.image { + width: 90px; +} + +div.thumb { + border: 1px solid #aaa; + background-color: #fff; + height: 71px; + width: 90px; + display: inline-block; +} + +ul.info { + display: inline-block; + width: 150px; + font-size: 12px; + padding: 0 10px; +} + +.info .description { + color: #666; + font-size: 10px; +} + +.thumb .title { + color: #3B5998; + text-decoration: underline; + font-size: small; + cursor: pointer; +} + +.thumb .description { + color: #808080; + font-size: x-small; +} + +button { + padding: 2px 15px; + font-family: "helvetica neue", helvetica, arial, sans-serif; + font-size: 12px; + line-height:24px; + background-image: -moz-linear-gradient(top,#fafafa 0%,#e6e6e6 100%); + border: 1px solid #bebebe; + -moz-box-shadow: 0 0 0 1px #fff inset; + margin-left: 10px; + cursor: pointer; +} + +button:hover, button:active { + border: 1px solid #999; +} + +button:active { + -moz-box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset, 0 0 3px rgba(0,0,0,0.75) inset; +} + +textarea, input[type="text"] { + -moz-box-shadow: 0 0 2px #CCCCCC inset; +/* background-image: -moz-linear-gradient(center top , #FFFFFF 0%, #F2F2F2 100%); */ + border: 1px solid #BEBEBE; + font-family: "helvetica neue",helvetica,arial,sans-serif; + font-size: 14px; + line-height: 24px; + padding: 3px; + margin: 0; + width: 100%; +} + +textarea:focus, input[type="text"]:focus { + border: 1px solid #999; +} + +.inputs { + margin: 0 10px 0 0; +} + +input[type="text"] { + height: 30px; + width: 234px; + display: block; +} + +input[type="text"]#to { + margin-bottom: 11px; +} + +.entry { + padding: 10px; + width: 962px; + left: 50%; + margin-left: -481px; + position: relative; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + min-height: 70px; +} + +.entry .urlConfirmation { + padding: 1px 5px; + -moz-border-radius: 10px; + background-image: -moz-linear-gradient(top, #fafafa 0%, #e6e6e6 100%); + border: 1px solid #bebebe; + color: green; + position: absolute; + left: 5px; + bottom: 5px; + z-index: 1; + color: green; + font-size: 10px; + cursor: pointer; +} + +.entry .urlConfirmation span { + color: #333; +} + +#settings .entry ul li { + display: inline-block; + float: left; +} + +#settings .entry ul li button { + margin: 0 10px 0 0; + width: 128px; +} + +.entry h1 { + margin: 0 0 10px 0; +} + +/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ +/* hbox and vbox classes */ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} +/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ + +/* clearfix */ + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} diff --git a/web/0.3.4/play/designs/share.html b/web/0.3.4/play/designs/share.html new file mode 100644 index 0000000..6e7e9d8 --- /dev/null +++ b/web/0.3.4/play/designs/share.html @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ + re-insert link +
+ +
+
+ +
+
+
+
+
    +
  • Title
  • +
  • Description
  • +
+
+ + +
+
+ +
+
+
+ + +
+
+ + re-insert link +
+ +
+
+ +
+
+

Settings

+
    +
  • +
  • +
  • +
  • +
+
+
+ +
+ + + + diff --git a/web/0.3.4/play/designs/sidebar/i/sprite.png b/web/0.3.4/play/designs/sidebar/i/sprite.png new file mode 100644 index 0000000..57c666b Binary files /dev/null and b/web/0.3.4/play/designs/sidebar/i/sprite.png differ diff --git a/web/0.3.4/play/designs/sidebar/i/thumb.jpg b/web/0.3.4/play/designs/sidebar/i/thumb.jpg new file mode 100644 index 0000000..721d427 Binary files /dev/null and b/web/0.3.4/play/designs/sidebar/i/thumb.jpg differ diff --git a/web/0.3.4/play/designs/sidebar/index.html b/web/0.3.4/play/designs/sidebar/index.html new file mode 100644 index 0000000..429ee48 --- /dev/null +++ b/web/0.3.4/play/designs/sidebar/index.html @@ -0,0 +1,231 @@ + + + + F1: Sidebar + + + + + + + +
+ +
+ +
+

Share

+ +
+ +
+
+

F1 by Mozilla Labs

+
+ + + + + + + +
+
+
+ +
+
+

Latest from the F1 team

+
"F1 goes live!"
+
+
+
+ +
+ + + +
+ +
+

Share configuration

+ +
+ +
    +
  • manage
  • +
  • add account
  • +
  • settings
  • +
+ +
+ +
+

manage your accounts

+
    +
  • +

    + + _andychung +

    + +
  • +
  • +

    + + Andy Chung +

    + +
  • +
  • +

    + + animalyouth@gmail.com +

    + +
  • +
+
+ +
+

add more accounts

+
    +
  • +

    + + Twitter +

    + +
  • +
  • +

    + + Facebook +

    + +
  • +
  • +

    + + Google Mail +

    + +
  • +
+
+ +
+

F1 settings

+
    +
  • +
    +
  • +
  • +
    +
  • +
+
+ +
+ +
+
+ + +
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/web/0.3.4/play/designs/sidebar/js/init.js b/web/0.3.4/play/designs/sidebar/js/init.js new file mode 100644 index 0000000..223f9f4 --- /dev/null +++ b/web/0.3.4/play/designs/sidebar/js/init.js @@ -0,0 +1,103 @@ +$(document).ready(function($) { + + // set panel min-height to full browser height + $(window).bind("load resize", function(){ + var h = $(window).height(); + $("#wrapper, #panel1, #panel2").css({ "min-height" : (h) }); + }); + + // create ellipsis for gecko + $(function() { + $(".overflow").textOverflow(null,true); + }); + + // simple accordian menu + $(".accountToggle").click(function() { + $(".accountPanel:visible").slideUp(200); + if ($(this).next().is(":hidden")) { + $(this).next().slideDown(200); + } + }); + + $(".accountPanel").hide(); + $(".open").trigger("click"); + + $(".accountToggle").click(function() { + $(this).parent().toggleClass("selected"); + $(this).parent().siblings().removeClass("selected"); + }); + + // hide and display facebook form + $(".group, .list").hide(); + + $("select.facebookDropdown").change(function () { + if ($(".group, .list").is(":hidden")) { + $(".group, .list").css({ "display" : "block" }); + } + else { + $(".group, .list").css({ "display" : "none" }); + } + }); + + // account manager simple tabs + $("ul#tabs li").click(function() { + $(this).addClass("selected"); + $(this).siblings().removeClass("selected"); + }); + + $("ul#tabs li.manage").click(function() { + if ($("section#manageAccounts").is(":hidden")) { + $("section#manageAccounts").fadeIn(200); + $("section#manageAccounts").siblings().fadeOut(0); + } + else { + $("section#manageAccounts").noop(); + } + }); + + $("ul#tabs li.add").click(function() { + if ($("section#addAccounts").is(":hidden")) { + $("section#addAccounts").fadeIn(200); + $("section#addAccounts").siblings().fadeOut(0); + } + else { + $("section#addAccounts").noop(); + } + }); + + $("ul#tabs li.settings").click(function() { + if ($("section#accountSettings").is(":hidden")) { + $("section#accountSettings").fadeIn(200); + $("section#accountSettings").siblings().fadeOut(0); + } + else { + $("section#manageAccounts").noop(); + } + }); + + $("section#addAccounts, section#accountSettings").hide(); + + // 3d flip with fade fallback + $(function() { + if (jQuery.browser.webkit) { + $("a.configureToggle").bind("click", function() { + $("#panel1").toggleClass("front_flip"); + $("#panel2").toggleClass("back_flip"); + }); + } + else { + $("a.configureToggle").bind("click", function() { + if ($("#panel1").is(":visible")) { + $("#panel1").fadeOut(100); + $("#panel2").fadeIn(100); + } + else { + $("#panel1").fadeIn(100); + $("#panel2").fadeOut(100); + } + }); + } + }); + + // done! +}); diff --git a/web/0.3.4/play/designs/sidebar/js/jquery.textOverflow.js b/web/0.3.4/play/designs/sidebar/js/jquery.textOverflow.js new file mode 100644 index 0000000..e7c4957 --- /dev/null +++ b/web/0.3.4/play/designs/sidebar/js/jquery.textOverflow.js @@ -0,0 +1,108 @@ +/*! + * jQuery Text Overflow v0.7 + * + * Licensed under the new BSD License. + * Copyright 2009-2010, Bram Stein + * All rights reserved. + */ +/*global jQuery, document, setInterval*/ +(function ($) { + var style = document.documentElement.style, + hasTextOverflow = ('textOverflow' in style || 'OTextOverflow' in style), + + domSplit = function (root, maxIndex) { + var index = 0, result = [], + domSplitAux = function (nodes) { + var i = 0, tmp; + + if (index > maxIndex) { + return; + } + + for (i = 0; i < nodes.length; i += 1) { + if (nodes[i].nodeType === 1) { + tmp = nodes[i].cloneNode(false); + result[result.length - 1].appendChild(tmp); + result.push(tmp); + domSplitAux(nodes[i].childNodes); + result.pop(); + } else if (nodes[i].nodeType === 3) { + if (index + nodes[i].length < maxIndex) { + result[result.length - 1].appendChild(nodes[i].cloneNode(false)); + } else { + tmp = nodes[i].cloneNode(false); + tmp.textContent = $.trim(tmp.textContent.substring(0, maxIndex - index)); + result[result.length - 1].appendChild(tmp); + } + index += nodes[i].length; + } else { + result.appendChild(nodes[i].cloneNode(false)); + } + } + }; + result.push(root.cloneNode(false)); + domSplitAux(root.childNodes); + return $(result.pop().childNodes); + }; + + $.extend($.fn, { + textOverflow: function (str, autoUpdate) { + var more = str || '…'; + + if (!hasTextOverflow) { + return this.each(function () { + var element = $(this), + + // the clone element we modify to measure the width + clone = element.clone(), + + // we save a copy so we can restore it if necessary + originalElement = element.clone(), + originalText = element.text(), + originalWidth = element.width(), + low = 0, mid = 0, + high = originalText.length, + reflow = function () { + if (originalWidth !== element.width()) { + element.replaceWith(originalElement); + element = originalElement; + originalElement = element.clone(); + element.textOverflow(str, false); + originalWidth = element.width(); + } + }; + + element.after(clone.hide().css({ + 'position': 'absolute', + 'width': 'auto', + 'overflow': 'visible', + 'max-width': 'inherit' + })); + + if (clone.width() > originalWidth) { + while (low < high) { + mid = Math.floor(low + ((high - low) / 2)); + clone.empty().append(domSplit(originalElement.get(0), mid)).append(more); + if (clone.width() < originalWidth) { + low = mid + 1; + } else { + high = mid; + } + } + + if (low < originalText.length) { + element.empty().append(domSplit(originalElement.get(0), low - 1)).append(more); + } + } + clone.remove(); + + if (autoUpdate) { + setInterval(reflow, 200); + } + }); + } else { + return this; + } + } + }); +})(jQuery); \ No newline at end of file diff --git a/web/0.3.4/play/designs/sidebar/style.css b/web/0.3.4/play/designs/sidebar/style.css new file mode 100644 index 0000000..ee6fc0a --- /dev/null +++ b/web/0.3.4/play/designs/sidebar/style.css @@ -0,0 +1,625 @@ +* { + padding: 0; + margin: 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +/* + general +*/ + +body { + font-family: "Lucida Grande", Verdana, Sans-serif; + font-size: 11px; + line-height: 110%; +} + +#wrapper { + max-width: 400px; + min-width: 200px; + position: relative; + border-right: 1px solid #404040; + -webkit-perspective: 1500; +} + +button::-moz-focus-inner { + border: 0; +} + +button { + height: 24px; + border-width: 1px; + border-style: solid; + border-color: #aaa; + cursor: pointer; + padding: 0 10px; + + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); +} + +button:active { + -moz-box-shadow: 0 0 1px #666666 inset; + -webkit-box-shadow: 0 0 1px #666666 inset; + box-shadow: 0 0 1px #666666 inset; + + background-image: -moz-linear-gradient(center top , #eee 0%, #ccc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc)); +} + +h2 { + font-size: 13px; + color: #535f6d; + text-shadow: 1px 1px 0 rgba(255,255,255, 0.5); +} + +h3 { + font-weight: bold; + font-size: 11px; + line-height: 14px; + color: #535f6d; +} + +/* + panel settings +*/ + +#panel1, +#panel2 { + width: 100%; + color: #535f6d; + overflow: auto; + position: absolute; + top: 0; + left: 0; +} + +#panel1 { + background-color: #d4dde5; + z-index: 2; +} + +#panel1 a, +#panel2 a { + color: #535f6d; +} + +#panel2 { + background-color: #E9EEF2; + z-index: 1; + -webkit-transform: rotateY(180deg); +} + +/* + header section +*/ + +header { + width: 100%; + padding: 8px 5px 10px 10px; + background-color: #d4dde5; +} + +header h1 { + font-size: 11px; +} + +header a { + text-decoration: none; + outline: none; +} + +header a:hover { + text-decoration: underline; +} + +header nav ul { + list-style-type: none; +} + +header nav ul li { + display: inline-block; + padding: 0 5px; + float: left; +} + +header nav ul li.settings { + border-width: 0 1px 0 0; + border-style: solid; + border-color: #535f6d; +} + +header span.close { + width: 12px; + height: 13px; + background-image: url("i/sprite.png"); + background-position: center 0; + display: block; +} + +header span.close:active { + background-position: center -13px; +} + +/* + page info +*/ +section#pageInfo { + width: 100%; + padding: 10px; +} + +section#pageInfo .thumbnail { + border: 1px solid #a6afb6; + -moz-box-shadow: 1px 1px 0 rgba(255,255,255, 0.5); + -webkit-box-shadow: 1px 1px 0 rgba(255,255,255, 0.5); + box-shadow: 1px 1px 0 rgba(255,255,255, 0.5); +} + +section#pageInfo .thumbnail img { + float: left; +} + +section#pageInfo h2 { + line-height: 60px; + margin: 0 0 0 20px; +} + +/* + generic styles for account panels +*/ +section { + display: block; +} + +section.account { + color: #535F6D; + display: block; + border-width: 1px 0; + border-color: #a6afb6; + border-style: solid; + margin-top: -1px; + background-image: -moz-linear-gradient(top, #d4dde5 0%, #c6d1da 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d4dde5), color-stop(100%, #c6d1da)); +} + +section.account:hover, +section.account.selected { + background-image: none; +} + +section.account.selected { + background-color: #e9eef2; +} + +section.account .username { + display: none; +} + +section.account.selected .username { + display: block; +} + +section.account .accountToggle { + padding: 10px; + cursor: pointer; + width: 100%; +} + +span.arrow, +span.icon { + display: inline-block; + background-image: url("i/sprite.png"); + background-repeat: no-repeat; + vertical-align: middle; +} + + +span.arrow { + width: 12px; + height: 14px; +} + +span.icon { + width: 16px; + height: 14px; + margin: 0 5px; +} + +section.account .accountToggle span.arrow { + background-position: center -102px; +} + +section.account.selected .accountToggle span.arrow { + background-position: center -120px; +} + +section.account .accountPanel { + display: block; +} + +section.account .accountPanel .padding { + padding: 0 10px 10px 10px; +} + +section.account textarea, +section.account input[type="text"] { + width: 100%; + font-family: "Lucida Grande", Verdana, Sans-serif; + font-size: 11px; + padding: 5px; + border-width: 1px; + border-style: solid; + border-color: #A6AFB6; + -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset; + box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset; +} + +section.account textarea:focus, +section.account input[type="text"]:focus { + -moz-box-shadow: 0 0 0 2px #C2ECFF inset; + -webkit-box-shadow: 0 0 0 2px #C2ECFF inset; + box-shadow: 0 0 0 2px #C2ECFF inset; + outline: none; +} + +button:focus { + outline: none; + z-index: 1; + position: relative; +} + +section.account textarea { + width: 100%; + height: 80px; +} + +section.account input[type="text"] { + height: 24px; +} + +section.account .accountActions { + width: 100%; + margin: 10px 0 0 0; +} + +section.account span.count { + line-height: 24px; + color: #535F6D; +} + +section.account label { + display: block; + margin: 0 0 5px 0; +} + +/* + twitter styles +*/ +span.icon.twitter { + background-position: center -35px; +} + +/* + facebook styles +*/ +section#facebook.account .facebookActions { + margin: 0 0 10px 0; + width: 100%; +} + +section#facebook.account .facebookActions .to { + width: 100px; + margin-right: 10px; +} + +section#facebook.account .facebookActions .to .dropdownContainer { + height: 24px; + line-height: 24px; + display: block; +} + +section#facebook.account .facebookActions .to select { + width: 100%; +} + +section#facebook.account .facebookActions .list label { + visibility: hidden; +} + +section#facebook.account .facebookActions .list button { + border-left: none; + width: 24px; + background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); + background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); + background-position: center -157px, center top; + background-repeat: no-repeat; + -moz-border-radius: 0 2px 2px 0; + -webkit-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} + +section#facebook.account .facebookActions .list button:active { + background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #eee 0%, #ccc 100%); + background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc)); +} + +span.icon.facebook { + background-position: center -59px; +} + +/* + google styles +*/ +section#google.account .subject { + margin: 5px 0; +} + +span.icon.google { + background-position: center -82px; +} + +/* + account configuration +*/ + +ul#tabs { + width: 100%; + padding: 10px 10px 0 10px; + list-style-type: none; + background-color: #D4DDE5; +} + +ul#tabs li { + padding: 7px 20px; + margin: 0 3px 0 0; + display: inline-block; + font-weight: bold; + text-align: center; + background-color: #E9EEF2; + border-width: 1px 1px 0 1px; + border-style: solid; + border-color: #A6AFB6; + -moz-border-radius: 3px 3px 0 0; + -webkit-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; + float: left; + cursor: pointer; +} + +ul#tabs li.selected { + position: relative; + z-index: 100; +} + +#accountPanels { + padding: 10px 0 0; + border-top: 1px solid #a6afb6; + position: relative; + z-index: 90; + margin-top: -1px; +} + +section.configuration { + padding: 10px; + display: block; +} + +section.configuration h2 { + margin: 0 0 10px 0; +} + +section.configuration ul { + background-color: #fff; + border: 1px solid #A6AFB6; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + list-style-type: none; +} + +section.configuration ul li { + padding: 10px; + border-bottom: 1px solid #A6AFB6; + width: 100%; +} + +section.configuration ul li:last-child { + border: none; +} + +section.configuration h3 { + line-height: 24px; +} + +section.configuration h3 .username { + font-weight: normal; +} + +section.configuration input[type="checkbox"] { + margin-right: 5px; +} + +section.configuration .done { + width: 100%; +} + +section#news { + padding: 10px; + width: 100%; +} + +section#news span.icon.rss { + background-position: center -183px; + margin: 0 5px 0 0; +} + +section#news .story { + padding: 5px 0; +} + +/* + hbox & vbox +*/ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} + +/* + clearfix +*/ + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} + +/* + webkit specific styles +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + +#wrapper { + background-color: #404040; +} + +.overflow { + text-overflow: ellipsis; + overflow-x: hidden; + white-space: nowrap; +} + +.flip { + -webkit-transform-style: preserve-3d; + -webkit-backface-visibility: hidden; + -webkit-transition: -webkit-transform 0.7s ease-in-out; +} + +.front_flip { + -webkit-transform: rotateY(-180deg); + z-index: 900; +} + +.back_flip { + -webkit-transform: rotateY(0deg) !important; + z-index: 1000; +} +} \ No newline at end of file diff --git a/web/0.3.4/play/scratch/send/index.html b/web/0.3.4/play/scratch/send/index.html new file mode 100644 index 0000000..e7f452f --- /dev/null +++ b/web/0.3.4/play/scratch/send/index.html @@ -0,0 +1,152 @@ + + + + + + + Send a message + + + + + + + + +
+ +
+ + +
+
+
+
+ + Send via + Twitter + Facebook + No Service + + + + + + +
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/web/0.3.4/rdapi/f/StayPuft/COPYING.LIB b/web/0.3.4/rdapi/f/StayPuft/COPYING.LIB new file mode 100644 index 0000000..eb685a5 --- /dev/null +++ b/web/0.3.4/rdapi/f/StayPuft/COPYING.LIB @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/web/0.3.4/rdapi/f/StayPuft/README.txt b/web/0.3.4/rdapi/f/StayPuft/README.txt new file mode 100644 index 0000000..0aa6802 --- /dev/null +++ b/web/0.3.4/rdapi/f/StayPuft/README.txt @@ -0,0 +1,35 @@ +The Stay-Puft Marshmallow Font + +Copyright (c) 2003 by John Stracke + +Not a very impressive piece of work, but fun. I sat down to fiddle +with pfaedit, and started seeing what I could do freehand, with +minimal splines. The result was all rounded (not surprising), sort of +marshmallowy, and I started thinking of it as the Stay-Puft +Marshmallow Font (see Ghostbusters if you don't get it). Once I had a +name, I felt compelled to round out the font (ISO 8859-1, at least). +The outcome looks sort of like Comic Sans MS. It's kind of cute, and +might be good for frivolous stuff such as birthday cards. I've used +it on my National Academy of Silly Walks merchandise +(http://www.cafepress.com/sillywalks/). + +It is released under the terms of the GNU Lesser General Public +License (see COPYING.LIB). Where the LGPL refers to "source code", I +take that to refer to the file called StayPuft.sfd, which is a file +for editing with pfaedit (http://pfaedit.sourceforge.net/), an outline +font editor program. Thus, according to the LGPL, if you distribute +this font, you must make StayPuft.sfd available to the recipient(s) +under the terms the LGPL specifies for source availability. Each of +the download links below is an archive (tarfile or zipfile) which +includes StayPuft.sfd, the LGPL, a readme, and at least one font file +(e.g., Isabella.ttf for TrueType files). I chose the LGPL instead of +the GPL because, arguably, using the GPL might mean that PostScript +and PDF files with this font embedded would be GPLed (they're like +programs that link to a static library). + +The font has ASCII, Latin-1, and a few other useful characters: left +and right quotation marks (single and double), ellipsis, long dash, +and Euro. I don't intend to round it out as much as I did with +Isabella (http://www.thibault.org/fonts/isabella/); this is a much +less interesting project. Anyone who wants to donate extra +letterforms is welcome, of course. diff --git a/web/0.3.4/rdapi/f/StayPuft/StayPuft.ttf b/web/0.3.4/rdapi/f/StayPuft/StayPuft.ttf new file mode 100644 index 0000000..09ced57 Binary files /dev/null and b/web/0.3.4/rdapi/f/StayPuft/StayPuft.ttf differ diff --git a/web/0.3.4/rdapi/i/2709984325_f5554afd53_o2.jpeg b/web/0.3.4/rdapi/i/2709984325_f5554afd53_o2.jpeg new file mode 100644 index 0000000..0037d76 Binary files /dev/null and b/web/0.3.4/rdapi/i/2709984325_f5554afd53_o2.jpeg differ diff --git a/web/0.3.4/rdapi/index.css b/web/0.3.4/rdapi/index.css new file mode 100644 index 0000000..4ebdf87 --- /dev/null +++ b/web/0.3.4/rdapi/index.css @@ -0,0 +1,402 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/* @font-face typography */ + +@font-face { + font-family: StayPuft; + src: url("f/StayPuft/StayPuft.ttf"); + font-weight: normal; + font-style: normal; +} + +* { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +html, +body { + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; + background: #fafafa; +} + +body { + font-family: "Helvetica Neue", Helvetica, Arial, Sans-serif; + font-size: 12px; + position: relative; + background-color: #fff; + color: #0a0a0a; + line-height: 1.5; +} + +b { + font-weight: 600; +} + +a { + color: #006FFF; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +h1 { + font-weight: normal; + font-size: 21px; + margin: 0; + padding: 5px 10px; + /* border: 1px solid #884D51; */ + background-image: -moz-linear-gradient(center top , #FF7A7A 0%, #FF5C5C 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #FF7A7A), color-stop(100%, #FF5C5C)); + border: 1px solid #D94C4C; + color: #fff; +} + +h1 a { + color: #fff; +} + +h2 a { + color: #0a0a0a; +} + +h1 a:hover, +h2 a:hover { + text-decoration: none; +} + +h1 a:visited { + color: #fff; +} + +h2 a:visited { + color: black; +} + +h3 .type { + font-size: smaller; + font-weight: normal; +} + +.hidden { + display: none; +} + +#toc { + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + -moz-column-gap: 20px; + margin: 20px 0; +} + +#toc a { + display: block; +} + +#toc a.sectionToc { + font-size: 14px; + font-weight: bold; +} + +#toc a.methodToc { + font-size: 14px; +} + +#toc a.methodToc:before { + content: "- "; +} + +#toc .tocItem { + margin: 0 0 10px 0; +} + +#listing, +#play { + float: left; + width: 50%; + height: 100%; + padding: 10px; + overflow-y: auto; + overflow-x: hidden; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +#play { + overflow-x: auto; + background-color: #f2f2f2; + border-left: 1px solid #ccc; +} + +#playInstructions { + font-weight: normal; +} + +.method { + position: relative; + border-top: 1px solid #C6ADFF; + margin: 20px 0; +} + +.method .try { + font-size: 14px; + font-weight: normal; + padding: 5px 0px; + position: absolute; + right: 0; + top: 0; + -moz-border-radius: 0 40px 40px 0; + -webkit-border-radius: 0 40px 40px 0; + border-radius: 0 40px 40px 0; +} + + +.method h2 { + font-weight: normal; + font-size: 14px; + margin: 0; + padding: 5px 10px; + /* border: 1px solid #884D51; */ + background-image: -moz-linear-gradient(center top , #EDE6FF 0%, #DAC9FF 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #EDE6FF), color-stop(100%, #DAC9FF)); + border: 1px solid #C6ADFF; + border-top: none; + -moz-border-radius: 0 0 10px 10px; + -webkit-border-radius: 0 0 10px 10px; + border-radius: 0 0 10px 10px; + display: table; +} + +.method .section { + margin-left: 40px; +} + +.method .section h3 { + margin-left: -20px; + margin-bottom: 0px; +} + +.method .section > ul { + padding-left: 20px; + margin: 5px 0; +} + +.method .section p { + margin: 5px 0; +} + +.method .required { + color: red; +} + +.apiCall { + padding: 10px ; + position: relative; + border-bottom: 1px solid #ccc; +} + +.apiCall:nth-child(odd) { + background-color: #e6e6e6; +} + +.apiCallClose { + position: absolute; + top: 10px; + right: 0px; + font-weight: bold; + color: #0a0a0a; + border: 0; + font-family: "helvetica neue", helvetica, arial, sans-serif; + font-size: 14px; + background-color: transparent; +} + +.apiCall .apiUrlExpand { + position: absolute; + top: 15px; + right: 60px; +} + +.apiCall h3 { + margin: 0; +} + +.apiCall h4 { + margin: 10px 0 5px 0; +} + +.apiCall .editApiUrl { + width: 50%; + margin-top: 4px; + font-weight: bold; + font-size: larger; +} + +.apiCall .requestBody { + width: 100%; + min-height: 300px; +} + +.apiCall .output { + margin: 10px 0; +} + +.apiCall button[name=submit] { + margin: 10px 0; +} + +.jsonResult .expander { + margin: 0; + padding: 0; + border: 0; + font-size: xx-small; + background-color: transparent; + cursor: pointer; +} + + +.jsonResult ol.array, +.jsonResult ul.object { + list-style: none; +} + +.jsonResult .prop, +.jsonResult .brace, +.jsonResult .bracket { + font-weight: bold; +} + +/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ +/* hbox and vbox classes */ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} +/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ diff --git a/web/0.3.4/rdapi/index.html b/web/0.3.4/rdapi/index.html new file mode 100644 index 0000000..33eb54c --- /dev/null +++ b/web/0.3.4/rdapi/index.html @@ -0,0 +1,240 @@ + + + + + Raindrop API + + + + + +
+ +
+

Raindrop API

+

This is the Raindrop API explorer. Read the important Notes first.

+
+ +
+
+ +
+
+ +

Notes

+ +

JSON is used for all API responses. + The request arguments are normally form-urlencoded + arguments (Content-Type: application/x-www-form-urlencoded; charset=UTF-8), except + for APIs that only accept a request body. In those cases, the request body should be JSON, + and the Content-Type for the request should be application/json; charset=UTF-8. Note that UTF-8 + should be used as the charset.

+ +
+

Notes: Standard Response

+

The success version of the Standard Response is used by a few APIs for success responses. Other APIs use + a specific success object that relates to the API. See the specific API call for more information.

+ +

The error version of the Standard Response is used by all APIs to indicate error responses.

+ +

A success response will be an object with the following properties (only used by some APIs):

+
    +
  • ids (array): Any IDs affected by the API call. May be empty
  • +
  • result (boolean): Value of true
  • +
  • error (object): null
  • +
+ +

An error response will be an object with the following properties (this is the error response + returned from all APIs):

+
    +
  • ids (array): Any IDs affected by the API call. May be empty
  • +
  • result (object): null if the API call has an error
  • +
  • error (object): An object with the following properties: +
      +
    • name (string): an error type name
    • +
    • message (string): An English description of the error
    • +
    +
  • +
+
+ + + +
+
+
+
+

Use a "Try It" link to try an API in this area.

+
+ +
+

+ + + +
+

Request Parameters

+ + +
+
+
+

Request Body

+ +
+ + +
+
+ +
+

{^doc}

+ + {is(routes.length) [} +
+

URL

+
    + {routes [} +
  • {}
  • + {]} +
+
+ {]} + + {and(urlargs, urlargs.length) [} +
+

URL Arguments

+
    + {urlargs[} +
  • {name} ({type}): {doc}
  • + {]} +
+
+ {]} + + {and(queryargs, queryargs.length) [} +
+

Parameters

+
    + {queryargs[} +
  • {name} ({type}): {doc}
  • + {]} +
+
+ {]} + + {is(body) [} +
+ {body [} +

Request Body ({type})

+

{doc}

+ {]} + + {examplebody [} + Example: +
{prettyJson(_)}
+ {]} +
+ {]} + + {response [} +
+

Response ({type})

+

{^addApiHyperlinks(doc)}

+
+ {]} +
+ +
+ {section} + {methods [} + {name} + {]} +
+ +
+

{section}

+

{^doc}

+ {methods [} +
+ Try It! +

{section}: {name}

+ {^content} +
+ {]} +
+ +
+ {#jsonBranch} +
+ + + + diff --git a/web/0.3.4/rdapi/scripts/index.js b/web/0.3.4/rdapi/scripts/index.js new file mode 100644 index 0000000..1b75807 --- /dev/null +++ b/web/0.3.4/rdapi/scripts/index.js @@ -0,0 +1,504 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ +'use strict'; +/*jslint plusplus: false, regexp: false */ +/*global require: false, define: false, location: true, setTimeout: false, + alert: false, window: false, document: false */ + +define([ 'jquery', 'rdapi', 'blade/object', 'blade/jig'], +function ($, rdapi, object, jig) { + + var docs, urlSection, toc = [], + urlParamRegExp = /\{([^\}]+)\}/g, + fragLinkRegExp = /#StandardResponse|#Attachment|#Message|#Conversation/g, + apiLinks = { + '#StandardResponse': 'Standard Response', + '#Attachment': 'Attachment', + '#Message': 'Message', + '#Conversation': 'Conversation' + }; + + //Add a pretty JSON method for use in templates + jig.addFn({ + prettyJson: function (text) { + return JSON.stringify(JSON.parse(text), null, " "); + }, + addApiHyperlinks: function (text) { + var output = '', startIndex = 0, match; + fragLinkRegExp.lastIndex = 0; + while ((match = fragLinkRegExp.exec(text))) { + match = match[0]; + output += jig.htmlEscape(text.substring(startIndex, fragLinkRegExp.lastIndex - match.length)); + output += '' + apiLinks[match] + ''; + startIndex = fragLinkRegExp.lastIndex; + } + if (startIndex < text.length - 1) { + output += jig.htmlEscape(text.substring(startIndex, text.length)); + } + return output; + }, + getType: function (it) { + if (require.isArray(it)) { + return 'array'; + } else if (typeof it === "object" && it !== undefined && it !== null) { + return 'object'; + } else { + return 'other'; + } + }, + formatSimpleType: function (it) { + if (it === null) { + return 'null'; + } else if (it === 0) { + return '0'; + } else if (it === undefined) { + return 'undefined'; + } else if (it === true) { + return 'true'; + } else if (it === false) { + return 'false'; + } else { + return it; + } + } + }); + + //Array sorting method for method entries. Separated as a distinct + //function to make JSLint happy. + function methodSort(a, b) { + return a.name > b.name ? 1 : -1; + } + + function hashUpdated() { + //Hmm, an overflow div does not jump if the hash is changed, as in + //a back/forward button press, so force it. + var hash = location.href.split('#')[1] || '', + listingNode = $('#listing')[0], + targetNode; + + if (hash) { + targetNode = $('[name="' + hash + '"]')[0]; + if (!targetNode) { + if (hash.indexOf('%') !== -1) { + //Try unescaping the URL. + hash = decodeURIComponent(hash); + targetNode = $('[name="' + hash + '"]')[0]; + } else { + //Try escaping it + hash = encodeURIComponent(hash); + targetNode = $('[name="' + hash + '"]')[0]; + } + } + } + + setTimeout(function () { + if (targetNode) { + listingNode.scrollTop = listingNode.scrollTop + targetNode.getBoundingClientRect().top; + } else { + listingNode.scrollTop = 0; + } + }, 15); + } + + function updateApiUrl(form, url) { + var apiUrl = form.find('.apiUrl'), + parameterUrl = form.find('.parameterUrl'), + match, urlParam, urlParams = '', urlParamObj; + + //Show the API URL + apiUrl.html(url).removeClass('hidden'); + parameterUrl.addClass('hidden'); + + //If the URL has arguments in its path, show options for it. + if (url.indexOf('{') !== -1) { + //Put in the parameterized URL and attach the source + //URL as a property on the DOM node for better perf + parameterUrl + .removeClass('hidden') + .find('.editApiUrl') + .remove() + .end() + .prepend('')[0] + .apiUrl = url; + + //Hide the normal h2 title + apiUrl.addClass('hidden'); + + //Parse out the fields in play + urlParamRegExp.lastIndex = 0; + while ((match = urlParamRegExp.exec(url))) { + urlParam = match[1]; + urlParamObj = form[0].raindropApiMethod.urlargs && form[0].raindropApiMethod.urlargs[urlParam]; + + urlParams += '' + urlParam + ''; + + if (urlParamObj && urlParamObj.allowed) { + urlParams += ''; + } else { + urlParams += ''; + } + + urlParams += ''; + } + form.find('.urlParams').html(urlParams); + } + } + + //delegated event handler that handles changes to URL arg fields, both input text ones, + //and select elements. + function changeApiUrl(evt) { + //Handle key ups for modifying URL parameters + //Only do an update on a timed delay, so that + //the DOM is not beaten up for each key stroke. + if (!urlSection) { + urlSection = $(evt.target).parents('.parameterUrl'); + setTimeout(function () { + var apiUrl = urlSection[0].apiUrl; + + urlSection.find('.urlParam, .urlParamSelect').each(function (i, node) { + var value = node.value.trim(); + if (value) { + apiUrl = apiUrl.replace('{' + node.name + '}', value); + } + }); + + //Update the final URL + urlSection.find('.editApiUrl').val(apiUrl); + + urlSection = null; + }, 200); + } + } + + function getCsrfToken() { + var token = /csrf=([^\; ]+)/.exec(document.cookie); + return token && token[1] ? token[1] : null; + } + + rdapi('docs', { + success: function (json) { + var prop, methodName, apiSection, methods, method, tocItem, obj, + i, route, parts, urlParam; + + docs = json; + + //TOC is by API section and method name, build it up, + //as well as the content that goes for each section. + for (prop in docs) { + if (docs.hasOwnProperty(prop)) { + apiSection = docs[prop]; + methods = apiSection.methods; + + //Create the TOC item for this API section. + tocItem = { + section: prop, + doc: apiSection.doc.replace(//g, ''), + value: apiSection, + methods: [] + }; + + //Create a method section in the TOC as well as the content + //that shows up in the main document section. + for (methodName in methods) { + if (methods.hasOwnProperty(methodName)) { + method = methods[methodName]; + + //Create quick lookups for urlargs parameters + if (method.urlargs) { + method.urlargs.forEach(function (arg) { + method.urlargs[arg.name] = arg; + }); + } + + //Make sure the API routes are prefixed with /api + if (method.routes) { + for (i = 0; (route = method.routes[i]); i++) { + //For any URL methods, if only one valid value, + //then just fix it to that value. Thinking mostly + //of contacts API where @{user} is normally just @me + parts = route.split('/'); + parts.forEach(function (part, j) { + urlParamRegExp.lastIndex = 0; + parts[j] = part.replace(urlParamRegExp, function (match, p1) { + if (method.urlargs) { + urlParam = method.urlargs[p1]; + if (urlParam && urlParam.allowed && urlParam.allowed.length === 1) { + return urlParam.allowed[0]; + } + } + return match; + }); + }); + route = parts.join('/'); + + if (route.indexOf('/api') !== 0) { + method.routes[i] = '/api' + route; + } + } + } + + obj = object.create(method, [{ + name: methodName, + link: encodeURIComponent(prop) + ":" + encodeURIComponent(methodName) + }]); + + //Generate the HTML content for this section. + obj.content = jig(jig.cache('methodContent'), obj, {}).replace(//g, ''); + + tocItem.methods.push(obj); + //Store a shortcut to reference the method by name. + tocItem.methods[methodName] = obj; + } + } + + //Sort the methods + tocItem.methods.sort(methodSort); + + //Store a shortcut to reference the section by name. + toc[prop] = tocItem; + toc.push(tocItem); + } + } + + //Sort the toc contents + toc.sort(function (a, b) { + return a.section > b.section ? 1 : -1; + }); + + //Wait for page load to fill in the page content + $(function () { + var tocHtml = '', + html = '', + apiCallNode = $('.apiCall')[0], + play = $('#play'); + + //Remove the apiCall node from the DOM, since just used for clone operations. + apiCallNode.parentNode.removeChild(apiCallNode); + + toc.forEach(function (tocItem) { + //Create TOC entry + tocHtml += jig(jig.cache('sectionToc'), tocItem, {}); + + //Create content entry + html += jig(jig.cache('sectionContent'), tocItem, {}); + }); + + $("#toc").append(tocHtml); + $("#content").append(html); + + //Add the name attributes to static sections here instead of the HTML + //to avoid a weird box sizing issue in Firefox. + ['Notes', 'Conversation', 'Message', 'Attachment'].forEach(function (name) { + document.getElementById(name + 'Title').setAttribute('name', name); + }); + + //If have a location hash, then navigate to it now, since the links for + //all TOC values have been inserted. + hashUpdated(); + window.addEventListener('hashchange', hashUpdated, false); + + $('body') + //Handle the Try links + .delegate('.try', 'click', function (evt) { + evt.preventDefault(); + + //Get the API container + var form = $(apiCallNode.cloneNode(true)).appendTo('#play'), + params = '', + linkParts = evt.target.href.split("#")[1].split(':'), + method = toc[linkParts[1]].methods[decodeURIComponent(linkParts[2])], + routes = method.routes, + apiUrl = routes && routes[0] || '', + routeChoices = ''; + + //Put the API data structure on the form, for ease of referencing later. + form[0].raindropApiMethod = method; + + //If more than one route, give a choice + if (routes && routes.length > 1) { + routes.forEach(function (route) { + routeChoices += ''; + }); + + form.find('.apiUrlExpand') + .removeClass('hidden') + .append(routeChoices); + } + + updateApiUrl(form, apiUrl); + + //Request options + if (!method.queryargs || !method.queryargs.length) { + form.find('.request').addClass('hidden'); + } else { + method.queryargs.forEach(function (arg) { + params += '' + arg.name + ''; + + if (arg.allowed) { + params += ''; + } else { + params += ''; + } + + params += ''; + }); + form.find('.requestParams').html(params); + } + + //Request Body + if (!method.body) { + form.find('.body').addClass('hidden'); + } else { + if (method.examplebody) { + form.find('.requestBody').val(method.examplebody); + } + } + //Make sure the new form is visible. + play[0].scrollTop = play[0].scrollHeight; + + }) + .delegate('.apiUrlExpand', 'change', function (evt) { + //Update the API URL choice. + var item = $(evt.target), + url = item.val(), + form = item.parents('form').first(); + + if (url) { + updateApiUrl(form, url); + } + }) + .delegate('.urlParam', 'keyup', changeApiUrl) + .delegate('.urlParamSelect', 'change', changeApiUrl) + //Handle play form submissions. + .delegate('.apiCall', 'submit', function (evt) { + var form = $(evt.target), + method = form[0].raindropApiMethod, + inputs = form.find('.requestParams input, .requestParams select'), + url = form.find('.apiUrl').html(), + editableUrl = form.find('.editApiUrl'), + requestBody = form.find('.requestBody').val().trim(), + data = {}, + options, csrfToken; + + evt.preventDefault(); + + //If there was a parameterized URL, favor that + if (!form.find('.parameterUrl').hasClass('hidden') && editableUrl.length) { + url = editableUrl.val().trim(); + if (url.indexOf('{') !== -1) { + alert('Please edit URL parameters to make a valid URL'); + return; + } + } + + //Put together the request attributes. + inputs.each(function (i, node) { + var value = $(node).val(); + if (value) { + data[node.name] = value; + } + }); + + //If a request body, then favor that for the data + if (method.body && requestBody) { + if (inputs.length) { + //Already have some data, need to clear + //it out, add it to the URL as query args + //to the URL. This is actually a bit goofy, + //should just have all query args or all + //body args. prefs/set is one API that goes here. + url += (url.indexOf('?') === -1 ? '?' : '&') + + $.param(data); + } + + data = requestBody; + } + + + options = { + type: 'POST', + url: url, + data: data, + processData: !method.body, + contentType: (method.body ? + 'application/json; charset=UTF-8' : + 'application/x-www-form-urlencoded; charset=UTF-8'), + success: function (data, textStatus, xhr) { + form.find('.output').html(jig.render(jig.cache('jsonResult'), data)); + }, + error: function (xhr, textStatus, errorThrown) { + form.find('.output').html(jig.render(jig.cache('jsonResult'), { + ERROR: xhr.responseText + })); + } + }; + + csrfToken = getCsrfToken(); + if (csrfToken) { + options.beforeSend = function (xhr) { + xhr.setRequestHeader('X-CSRF', csrfToken); + }; + } + + //Construct the data call. + $.ajax(options); + }) + //Handle close action for an API Call form + .delegate('form .apiCallClose', 'click', function (evt) { + evt.preventDefault(); + $(evt.target).parents('form').remove(); + }) + //Handle expanding and closing of sections in the JSON response + //for API calls + .delegate('.expander', 'click', function (evt) { + var button = $(evt.target), + listNode = button.next('ul,ol')[0]; + if (button.hasClass('closed')) { + listNode.style.display = ''; + button.removeClass('closed'); + button.html('▼'); + } else { + listNode.style.display = 'none'; + button.addClass('closed'); + button.html('►'); + } + return false; + }); + }); + }, + error: function (xhr, textStatus, errorThrown) { + $('#content').html(jig.htmlEscape(xhr.responseText)); + } + }); +}); diff --git a/web/0.3.4/robots.txt b/web/0.3.4/robots.txt new file mode 100644 index 0000000..c4aabe3 --- /dev/null +++ b/web/0.3.4/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /api diff --git a/web/0.3.4/scripts/AutoComplete.js b/web/0.3.4/scripts/AutoComplete.js new file mode 100644 index 0000000..6e04c81 --- /dev/null +++ b/web/0.3.4/scripts/AutoComplete.js @@ -0,0 +1,241 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint plusplus: false, indent: 2 */ +/*global require: false, define: false, window: false, setTimeout: false */ +"use strict"; + +define([ 'jquery', 'blade/object', 'blade/fn', 'module', 'dispatch', + 'text!AutoCompleteRefresh.html'], +function ($, object, fn, module, dispatch, + refreshHtml) { + + function split(val) { + return val.split(/,\s*/); + } + + function extractLast(term) { + return split(term).pop(); + } + + return object(null, null, { + className: module.id.replace('/', '-'), + + refreshShowing: false, + askRefresh: true, + + init: function (node, contactService) { + this.dom = $(node); + this.attachedWidget = false; + this.acOptions = []; + + // Listen for changes to the contacts. + contactService.notify(fn.bind(this, this.attachAutoComplete)); + + this.contactService = contactService; + + dispatch.sub('optionsChanged', fn.bind(this, function (data) { + // allow refetching contacts when a new page is shared. + this.askRefresh = true; + })); + }, + + /** + * Updates the formatted autocomplete options and binds the + * autocomplete widget, but only on the first call. + */ + attachAutoComplete: function (contactService, contactList) { + contactList = contactList || []; + this.acOptions = []; + + // Update the acOptions with formatted contact values. + contactList.forEach(fn.bind(this, function (contact) { + this.acOptions.push(contactService.formatContact(contact)); + })); + + if (!this.attachedWidget) { + + this.attachedWidget = true; + + // jQuery UI autocomplete setup from the jQuery UI demo page + this.dom + // don't navigate away from the field on tab when selecting an item, + // or when tabbing to the refresh contacts button. + .bind("keydown", fn.bind(this, function (event) { + if (event.keyCode === $.ui.keyCode.ENTER) { + // Do not submit the form on enter in the autocomplete field. + event.preventDefault(); + } else if (event.keyCode === $.ui.keyCode.TAB) { + if (this.dom.data("autocomplete").menu.active) { + //autocomplete is up. + event.preventDefault(); + this.dom.autocomplete().select(); + } else if (this.open) { + // select the first item in the autocomplete. + var item = this.dom.autocomplete('widget').find('li'); + this.dom.data("autocomplete").menu.active = item; + + this.dom.autocomplete().select(); + event.preventDefault(); + } + + // close out the refresh UI immediately so user can see the + // rest of the input form. + if (this.refreshShowing) { + this.hideRefresh(); + } + } else if (event.keyCode === $.ui.keyCode.DOWN && this.refreshShowing) { + // refresh contacts showing so focus on the refresh button. + event.preventDefault(); + this.focusingOnRefresh = true; + this.refreshDom.find('button').focus(); + } else if (event.keyCode === $.ui.keyCode.ESCAPE && this.refreshShowing) { + this.askRefresh = false; + this.hideRefresh(); + } + })) + .bind('blur', fn.bind(this, function (event) { + // be sure to close down the refresh UI if open, but do it + // on a timeout to allow button clicks in the UI. A bit hacky + // since it is a timing related thing. + if (this.refreshShowing && !this.focusingOnRefresh) { + setTimeout(fn.bind(this, function () { + this.hideRefresh(); + this.focusingOnRefresh = false; + }), 500); + } + })) + .autocomplete({ + minLength: 0, + source: fn.bind(this, function (request, response) { + // delegate back to autocomplete, but extract the last term + this.filtered = $.ui.autocomplete.filter(this.acOptions, extractLast(request.term)); + + // give the user the option to refresh the contacts + // if no matches. + if (!this.filtered.length && this.askRefresh) { + setTimeout(fn.bind(this, this.showRefresh), 0); + } else if (this.refreshShowing) { + this.hideRefresh(); + } + + response(this.filtered); + }), + focus: function () { + // prevent value inserted on focus + return false; + }, + select: function (event, ui) { + var terms = split(this.value); + // remove the current input + terms.pop(); + // add the selected item + terms.push(ui.item.value); + // add placeholder to get the comma-and-space at the end + terms.push(""); + this.value = terms.join(", "); + return false; + }, + open: fn.bind(this, function (event, ui) { + // Set the width of the autocomplete once shown. + if (!this.relatedWidth) { + this.determineRelatedWidth(); + } + this.open = true; + this.dom.autocomplete('widget').width(this.relatedWidth); + }), + close: fn.bind(this, function (event, ui) { + this.open = false; + }) + }); + } + + // account for a previous search waiting on a refresh. + if (this.waitingSearch) { + this.dom.autocomplete('search', this.waitingSearch); + this.dom.focus(); + delete this.waitingSearch; + this.hideSpinner(); + } + }, + + determineRelatedWidth: function () { + // Make sure to set the size of the autocomplete to not be bigger + // than the input area it is bound to. + var widthNode = this.dom[0]; + while (widthNode && (this.relatedWidth = widthNode.getBoundingClientRect().width) <= 0) { + widthNode = widthNode.parentNode; + } + }, + + hideRefresh: function () { + this.refreshDom.hide(); + }, + + /** + * Shows UI to allow refreshing the contacts list. + */ + showRefresh: function () { + if (!this.relatedWidth) { + this.determineRelatedWidth(); + } + + if (!this.refreshDom) { + this.refreshDom = $(refreshHtml) + .css({ + width: this.relatedWidth + 'px' + }) + .insertAfter(this.dom[0]) + .find('button') + .bind('click', fn.bind(this, function (evt) { + evt.preventDefault(); + this.waitingSearch = this.dom.val().trim(); + this.showSpinner(); + this.askRefresh = false; + this.contactService.fetch(); + this.hideRefresh(); + })) + .bind('blur', fn.bind(this, function (evt) { + this.hideRefresh(); + })) + .end(); + } + + this.refreshDom.show(); + + this.refreshShowing = true; + }, + + hideSpinner: function () { + this.spinnerDom.hide(); + }, + + showSpinner: function () { + if (!this.spinnerDom) { + this.spinnerDom = $('
') + .appendTo(this.dom[0].parentNode); + } + this.spinnerDom.show(); + } + }); +}); diff --git a/web/0.3.4/scripts/AutoCompleteRefresh.html b/web/0.3.4/scripts/AutoCompleteRefresh.html new file mode 100644 index 0000000..e493381 --- /dev/null +++ b/web/0.3.4/scripts/AutoCompleteRefresh.html @@ -0,0 +1 @@ +
No matches.
\ No newline at end of file diff --git a/web/0.3.4/scripts/Contacts.js b/web/0.3.4/scripts/Contacts.js new file mode 100644 index 0000000..3b77cbd --- /dev/null +++ b/web/0.3.4/scripts/Contacts.js @@ -0,0 +1,243 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint plusplus: false, indent: 2 */ +/*global require: false, define: false, window: false */ +"use strict"; + +define([ 'jquery', 'blade/object', 'blade/fn', 'dispatch', 'rdapi', 'accounts'], +function ($, object, fn, dispatch, rdapi, accounts) { + + var Contacts; + + Contacts = object(null, null, { + init: function (svc, svcAccount) { + this.svc = svc; + this.svcAccount = svcAccount; + + this.callbacks = []; + this.lastUpdated = this.fromStore().lastUpdated; + // Time check is one day. + this.timeCheck = 24 * 60 * 60 * 1000; + + // listen for changes in the options, and if a greater than a day, + // refresh the contacts. + this.optionsChangeSub = dispatch.sub('optionsChanged', fn.bind(this, function (options) { + if (this.needFetch()) { + this.fetch(); + } + })); + }, + + /** + * Destroys this instance, not necessarily the data. For that, use + * clear(). + * Used as an opportunity to unbind event listeners. + */ + destroy: function () { + dispatch.unsub('optionsChanged', this.optionsChangeSub); + }, + + clear: function () { + var acct = this.svcAccount; + accounts.setData(acct.domain, acct.userid, acct.username, 'contacts'); + }, + + needFetch: function () { + return !this.lastUpdated || (new Date()).getTime() - this.lastUpdated > this.timeCheck; + }, + + /** + * Retrieves stored contacts. Should only be used internally or by subclasses. + */ + fromStore: function () { + var acct = this.svcAccount; + return accounts.getData(acct.domain, acct.userid, acct.username, 'contacts') || {}; + }, + + /** + * Saves contacts to storage. Should only be used internally or by + * subclasses. + * + * @param {Object} data an object with a "list" property which is this + * list of contacts to store. + */ + toStore: function (data) { + var acct = this.svcAccount; + + if (!data.lastUpdated) { + data.lastUpdated = this.lastUpdated; + } + + accounts.setData(acct.domain, acct.userid, acct.username, 'contacts', data); + + this.notifyCallbacks(); + + return data; + }, + + /** + * Includes any new names from a successful share into the autocomplete. + * By default, it does nothing, but subclasses may do something with it. + * @param {String} contactsText a comma-separated string of contacts that + * follow the format returned from findContact(). + */ + incorporate: function (contactsText) { + }, + + /** + * Notify about changes to the autocomplete list. Can be async, so callback is needed. + * @param {Function} callback called when contacts are available. + * It will receive an array of contacts. + */ + notify: function (callback) { + this.callbacks.push(callback); + this.contacts = this.fromStore().list; + + if (!this.contacts || this.needFetch()) { + this.fetch(); + } else { + this.notifyCallbacks(); + } + }, + + fetch: function () { + var acct = this.svcAccount, + svcData = accounts.getService(acct.domain, acct.userid, acct.username); + + rdapi('contacts/' + acct.domain, { + type: 'POST', + data: { + username: acct.username, + userid: acct.userid, + startindex: 0, + maxresults: 500, + account: JSON.stringify(svcData) + }, + //Only wait for 10 seconds, then give up. + timeout: 10000, + success: fn.bind(this, function (json) { + //Transform data to a form usable by the front end. + if (json && !json.error) { + var entries = json.result.entry; + + this.contacts = this.getFormattedContacts(entries); + this.lastUpdated = (new Date()).getTime(); + + this.toStore({ + list: this.contacts + }); + } + }), + error: fn.bind(this, function (xhr, textStatus, errorThrown) { + // does not matter what the error is, just eat it and hide + // the UI showing a wait. + this.notifyCallbacks(); + }) + }); + }, + + notifyCallbacks: function () { + this.callbacks.forEach(fn.bind(this, function (callback) { + callback(this, this.contacts); + })); + }, + + findContact: function (to) { + var contactId = to; + + (this.contacts || []).some(function (contact) { + if (contact.displayName === to) { + contactId = contact.email || contact.userid || contact.username; + return true; + } + return false; + }); + + return contactId; + }, + + /** + * Translates contact data from server into a format used on the client. + * @param {Array} entries + * @returns {Array} + */ + getFormattedContacts: function (entries) { + var data = []; + entries.forEach(function (entry) { + if (entry.accounts && entry.accounts.length) { + entry.accounts.forEach(function (account) { + data.push({ + displayName: entry.displayName, + email: '', + userid: account.userid, + username: account.username + }); + }); + } + }); + return data; + }, + + /** + * Converts a string that was created by formatContact to real IDs + * understood by the back-end API calls. + * + * @param {String} toText a comma-separated list of contacts. + * @returns {String} a comma-separated list of ID-based contacts. + */ + convert: function (toText) { + var newrecip = [], + result = '', + recip; + + if (this.contacts) { + recip = toText.split(','); + recip.forEach(fn.bind(this, function (to) { + var contactId = this.findContact(to.trim()); + if (contactId) { + newrecip.push(contactId); + } + })); + } + + if (newrecip.length > 0) { + result = newrecip.join(', '); + } + + return result; + }, + + /** + * Formats the contact for display, such as for use in an autocomplete. + * Overridden by Contact overlays. + */ + formatContact: function (contact) { + return contact.displayName; + } + }); + + Contacts.modelVersion = '3'; + + return Contacts; +}); diff --git a/web/0.3.4/scripts/ContactsEmail.js b/web/0.3.4/scripts/ContactsEmail.js new file mode 100644 index 0000000..ef558fd --- /dev/null +++ b/web/0.3.4/scripts/ContactsEmail.js @@ -0,0 +1,133 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2, regexp: false */ +/*global define: false */ +"use strict"; + +define([ 'blade/object', 'Contacts', 'jquery', 'accounts', 'blade/fn'], +function (object, Contacts, $, accounts, fn) { + + var bracketRegExp = /<([^>])+>/; + + /** + * Overrides the formatting of contacts and converting + * one of those formatted contacts into a user ID. + */ + return object(Contacts, null, function (parent) { + return { + formatContact: function (contact) { + var value = contact.displayName; + if (contact.email !== value) { + value += ' <' + contact.email + '>'; + } + + return value; + }, + + findContact: function (to) { + return to; + }, + + /** + * Determines if a to string is already in the contacts array. + * @param {String} to a plain email address (no name). + * @returns {Boolean} + */ + contains: function (to) { + return this.contacts.some(function (contact) { + return contact.email === to; + }); + }, + + incorporate: function (contactsText) { + var acct = this.svcAccount, + newContacts = [], + storedContacts, + contacts = contactsText.split(','); + + contacts.forEach(fn.bind(this, function (contact) { + contact = contact.trim(); + + var match = bracketRegExp.exec(contact); + + contact = (match && match[1]) || contact; + + if (!this.contains(contact)) { + newContacts.push({ + displayName: contact, + email: contact + }); + } + })); + + if (newContacts.length) { + // update storage of manually entered contacts. + storedContacts = accounts.getData(acct.domain, + acct.userid, + acct.username, + 'enteredContacts') || []; + + storedContacts = storedContacts.concat(newContacts); + accounts.setData(acct.domain, acct.userid, acct.username, + 'enteredContacts', storedContacts); + + // update the master merged list of contacts. + this.contacts = this.contacts.concat(newContacts); + this.toStore({ + list: this.contacts + }); + } + }, + + getFormattedContacts: function (entries) { + var data = [], + acct = this.svcAccount, + storedContacts = accounts.getData(acct.domain, + acct.userid, + acct.username, + 'enteredContacts'); + + // convert server data to the right format. + entries.forEach(function (entry) { + if (entry.emails && entry.emails.length) { + entry.emails.forEach(function (email) { + var displayName = entry.displayName ? entry.displayName : email.value; + data.push({ + displayName: displayName, + email: email.value + }); + }); + } + }); + + // add in any manually saved email addresses. + if (storedContacts) { + data = data.concat(storedContacts); + } + + return data; + } + }; + }); +}); diff --git a/web/0.3.4/scripts/ContactsTwitter.js b/web/0.3.4/scripts/ContactsTwitter.js new file mode 100644 index 0000000..a23a591 --- /dev/null +++ b/web/0.3.4/scripts/ContactsTwitter.js @@ -0,0 +1,61 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false */ +"use strict"; + +define([ 'blade/object', 'Contacts', 'jquery'], +function (object, Contacts, $) { + var idRegExp = /\@(\S+)/; + + /** + * Overrides the formatting of contacts and converting + * one of those formatted contacts into a user ID. + */ + return object(Contacts, null, function (parent) { + return { + formatContact: function (contact) { + var value = '@' + contact.username; + return value; + }, + + findContact: function (to) { + var match = idRegExp.exec(to), + value = '', + name = (match && match[1]) || to; + if (name) { + (this.contacts || []).some(function (contact) { + if (contact.username === name) { + value = contact.userid; + return true; + } + return false; + }); + } + + return value; + } + }; + }); +}); diff --git a/web/0.3.4/scripts/Select.css b/web/0.3.4/scripts/Select.css new file mode 100644 index 0000000..e834e31 --- /dev/null +++ b/web/0.3.4/scripts/Select.css @@ -0,0 +1,83 @@ +@charset "UTF-8"; + +/* TODO: some of these styles, like text sizing/box sizing and colors/borders + need to be set in the app that includes a Select widget. */ +.Select { + position:relative; + display: inline-block; + overflow: hidden; + padding-right: 15px; + z-index: 100; + border: 1px solid #A6AFB6; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) inset; + height: 24px; + cursor: pointer; + background-color: white; +} + +.Select.open { + overflow: visible; + padding-right: 0; + border: 0; +} + +.Select ul { + list-style: none; + z-index: 100; + background-color: white; +} + +.Select.open ul { + position: absolute; + border: 1px solid gray; +} + +.Select li { + display: none; + height: 0; + padding: 0 5px; + white-space: nowrap; +} + +.Select li.selected { + display: block; + height: 24px; + line-height: 24px; +} + +.Select.open li { + display: block; + height: 24px; + line-height: 24px; + padding-right: 20px; +} + +.Select.open li.selected { + /* background-color: grey; */ +} + +.Select.open li.selected:hover, +.Select.open li:hover { + color:white; + background-color: #535F6D; +} + +.Select .triangle { + position: absolute; + right: 0; + top: 0; + width: 18px; + height: 24px; + line-height: 24px; + padding: 0 2px; + z-index: 101; + color: #A6AFB6; + background-color: white; + background-image: url("/share/i/sprite.png"); + background-position: center -362px; + background-repeat: no-repeat; +} + +.Select.open .triangle { + display: none; +} diff --git a/web/0.3.4/scripts/Select.html b/web/0.3.4/scripts/Select.html new file mode 100644 index 0000000..f0cebfd --- /dev/null +++ b/web/0.3.4/scripts/Select.html @@ -0,0 +1,9 @@ +
+ +
    + {options [} +
  • {name}
  • + {]} +
+
+
diff --git a/web/0.3.4/scripts/Select.js b/web/0.3.4/scripts/Select.js new file mode 100644 index 0000000..4533704 --- /dev/null +++ b/web/0.3.4/scripts/Select.js @@ -0,0 +1,206 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2, */ +/*global define: false, document: false */ +"use strict"; + +define([ 'blade/object', 'blade/Widget', 'blade/array', 'jquery', 'module', + 'text!./Select.html', 'text!./Select.css'], +function (object, Widget, array, $, module, + template, css) { + + var className = module.id.replace(/\//g, '-'), + style = document.createElement('style'), + openSelect; + + //Add the css to that page. + style.type = 'text/css'; + //If class name is changed since this is an anonymous module, update the + //CSS classes. + if (className !== 'Select') { + css = css.replace(/\.Select/g, '.' + className); + } + style.textContent = css; + document.getElementsByTagName('head')[0].appendChild(style); + + //Set up event handlers. + $(function () { + $('body') + .delegate('.' + className + ' .triangle', 'click', function (evt) { + Widget.closest(module.id, evt, 'onTriangleClick'); + evt.preventDefault(); + evt.stopPropagation(); + }) + .delegate('.' + className + ' li', 'click', function (evt) { + Widget.closest(module.id, evt, 'onOptionClick'); + evt.preventDefault(); + evt.stopPropagation(); + }); + + $(document).bind('click', function (evt) { + if (openSelect) { + openSelect.close(); + } + }); + }); + + + /** + * Define the widget. + * This widget assumes its member variables include the following + * properties (passed in on create of the widget) + * + * @param {Array} options: the options to show, with each option being + * an object with "name" and "value" properties. + * @param {String} name: the name to use for the form field. + * @param {Number} selectedIndex: the index of the options that should + * be selected. + */ + return object(Widget, null, function (parent) { + return { + moduleId: module.id, + className: className, + + template: template, + + onCreate: function () { + if (this.value) { + var index, value = this.value; + // Find the matching index for the value. + this.options.some(function (item, i) { + if (item.value === value) { + index = i; + return true; + } + return false; + }); + this.selectedIndex = index; + } else { + // No default value, work it out via selectedIndex if available. + this.selectedIndex = this.selectedIndex || 0; + this.value = this.options[this.selectedIndex].value; + } + }, + + onRender: function () { + this.dom = $(this.node); + + //Apply selected style. + $('li', this.node).eq(this.selectedIndex).addClass('selected'); + }, + + destroy: function () { + delete this.dom; + parent(this, "destroy", arguments); + }, + + /** + * Selects an item based on its index. + */ + selectIndex: function (index) { + return this.val(this.options[index].value); + }, + + /** + * Get or set the value for the select. Uses the value for the option. + */ + val: function (newValue) { + if (newValue === undefined) { + // Get + return $('li.selected', this.node)[0].getAttribute('data-value'); + } else { + // Set the value. + var liNode, ulNode, index; + + // Find the li node that corresponds with the value. + array.to.apply(null, $('li', this.dom)).some(function (node, i) { + if (node.getAttribute('data-value') === newValue) { + liNode = node; + index = i; + } + return false; + }); + + this.selectedIndex = index; + + ulNode = liNode.parentNode; + + // Find the index. + this.selectedIndex = array.to.apply(null, $('li', ulNode)).indexOf(liNode); + + // Make sure the right node has the selected class + $('li', ulNode).removeClass('selected'); + $(liNode).addClass('selected'); + + this.close(); + + this.dom.trigger('change'); + + return newValue; + } + }, + + close: function () { + var liNode = $('li.selected', this.node)[0]; + + // Put the value in the hidden input + $('input', this.node).val(liNode.getAttribute('data-value')); + + // Remove the open class. + this.dom.removeClass('open'); + + // Remove the artificial width + this.node.style.width = ''; + }, + + open: function () { + if (openSelect) { + openSelect.close(); + } + + // Since the options will position absolute, give the Select + // width so that surrounding content does not collapse around it. + this.node.style.width = this.node.getBoundingClientRect().width + 'px'; + + this.dom.addClass('open'); + openSelect = this; + }, + + onTriangleClick: function (evt) { + this.open(); + }, + + onOptionClick: function (evt) { + // Open the options if not already open. + if (!this.dom.hasClass('open')) { + this.open(); + return; + } + + this.val(evt.target.getAttribute('data-value')); + } + }; + }); + +}); diff --git a/web/0.3.4/scripts/TextCounter.js b/web/0.3.4/scripts/TextCounter.js new file mode 100644 index 0000000..5ff3581 --- /dev/null +++ b/web/0.3.4/scripts/TextCounter.js @@ -0,0 +1,67 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint plusplus: false */ +/*global require: false, define: false */ +"use strict"; + +define([ 'jquery', 'blade/object', 'blade/fn'], +function ($, object, fn) { + + return object(null, null, { + init: function (node, countNode, limit) { + this.dom = $(node); + this.domPlaceholderText = this.dom[0].getAttribute('placeholder') || ''; + this.countDom = $(countNode); + this.limit = limit; + this.dom.bind('keyup', fn.bind(this, 'checkCount')); + this.checkCount(); + }, + + checkCount: function () { + var value = this.dom[0].value, + count; + + if (value.trim() === this.domPlaceholderText) { + value = ''; + } + + count = this.limit - value.length; + if (count < 0) { + this.countDom.addClass("TextCountOver"); + } else { + this.countDom.removeClass("TextCountOver"); + } + this.countDom.text(count === this.limit ? '' : count); + }, + + updateLimit: function (limit) { + this.limit = limit; + this.checkCount(); + }, + + isOver: function () { + return this.dom[0].value.length > this.limit; + } + }); +}); diff --git a/web/0.3.4/scripts/accounts.js b/web/0.3.4/scripts/accounts.js new file mode 100644 index 0000000..525a5c9 --- /dev/null +++ b/web/0.3.4/scripts/accounts.js @@ -0,0 +1,404 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2, plusplus: false */ +/*global require: false, define: false, window: false, location: true, + localStorage: false, opener: false, setTimeout: false */ +'use strict'; + +define([ 'storage', 'dispatch', 'rdapi', 'services'], +function (storage, dispatch, rdapi, services) { + + function isCacheMatch(cache, domain, userid, username) { + return cache.domain === domain && + ((userid && cache.userid === userid) || + (username && cache.username === username)); + } + + function fromJson(value) { + if (value) { + value = JSON.parse(value); + } + return value; + } + + var store = storage(), impl, + changeTypes = { + //localStorage is the most robust, since the change in localStorage + //can be listened to across windows. + + 'localStorage': { + + accounts: function (ok, error) { + // accounts now simply provides existing accounts retreived during + // the oauth dances + var accountCache = fromJson(store.accountCache) || [], + serviceCache = fromJson(store.serviceCache); + + if (!serviceCache) { + // fetch now, let the response call ok + // Set up serviceCache. This should only ever happen + // if the local store is cleared (e.g. first run, cleared cookies) + impl.fetch(ok, error); + return; + } + + serviceCache = serviceCache || []; + + //Call ok callback with current knowledge. If there is a change in the + //account info, then the fetch will trigger changed event later. + if (ok) { + ok(accountCache, serviceCache); + } + }, + + update: function (account_data) { + // XXX TODO + // get the account and push it into localstore, don't overwrite, we + // get one account at a time here + // We write into accountCache to have account.fetch continue to work. + // We also write into serviceCache which will be used by api calls + // to send the auth keys + var accountCache = fromJson(store.accountCache) || [], + serviceCache = fromJson(store.serviceCache), + existing = false, + profile, p, a, acct; + + // move the profile into accountCache + profile = account_data.profile; + for (p = 0; p < accountCache.length; p++) { + acct = accountCache[p].accounts[0]; + if (isCacheMatch(acct, account_data.domain, account_data.userid, + account_data.username)) { + accountCache[p] = profile; + existing = true; + break; + } + } + if (!existing) { + accountCache.push(profile); + } + store.accountCache = JSON.stringify(accountCache); + + // we store the entire object in serviceCache, at some point in the + // future we will remove accountCache + if (serviceCache) { + existing = false; + for (a = 0; a < serviceCache.length; a++) { + if (isCacheMatch(serviceCache[a], account_data.domain, + account_data.userid, account_data.username)) { + serviceCache[a] = account_data; + existing = true; + break; + } + } + } else { + serviceCache = []; + } + if (!existing) { + serviceCache.push(account_data); + } + store.serviceCache = JSON.stringify(serviceCache); + impl.changed(); + }, + + // remove this once there is time enough for all users + // to have been migrated over to the new cache. + fetch: function (ok, error) { + rdapi('account/get/full', { + success: function (json) { + if (json.error) { + json = []; + } + + store.serviceCache = JSON.stringify(json); + var accountCache = [], svc, p; + for (p = 0; p < json.length; p++) { + accountCache.push(json[p].profile); + + // clear the contacts cache + // remove this clearCache call when 3.6 is removed. + svc = services.domains[json[p].domain]; + svc.clearCache(store); + } + store.accountCache = JSON.stringify(accountCache); + if (ok) { + ok(accountCache, json); + } + }, + error: error || function () {} + }); + }, + + remove: function (domain, userid, username) { + var accountCache = fromJson(store.accountCache), + serviceCache = fromJson(store.serviceCache), + i, cache, a, p, s, svc; + + if (serviceCache) { + for (i = 0; (cache = serviceCache[i]); i++) { + if (isCacheMatch(cache, domain, userid, username)) { + serviceCache.splice(i, 1); + break; + } + } + store.serviceCache = JSON.stringify(serviceCache); + } + + // eventually we will deprecate accountCache + if (accountCache) { + for (p = 0; p < accountCache.length; p++) { + s = accountCache[p].accounts; + for (a = 0; a < s.length; a++) { + if (isCacheMatch(s[a], domain, userid, username)) { + accountCache.splice(p, 1); + break; + } + } + } + store.accountCache = JSON.stringify(accountCache); + } + + // clear the contacts cache + svc = services.domains[domain]; + + // remove this clearCache call when 3.6 is removed. + svc.clearCache(store); + + // Delete auxillary data. + impl.clearData(domain, userid, username); + + impl.changed(); + }, + + /** + * Set auxillary data related to an account. Deleted when the account + * is deleted. + */ + setData: function (domain, userid, username, name, value) { + var key = [domain, userid, username].join('|') + 'Data', + data = fromJson(store[key]) || {}; + + if (value === undefined || value === null) { + delete data[name]; + } else { + data[name] = value; + } + + store[key] = JSON.stringify(data); + + return value; + }, + + /** + * Get auxillary data related to an account. + */ + getData: function (domain, userid, username, name) { + var key = [domain, userid, username].join('|') + 'Data', + data = fromJson(store[key]) || {}; + + return data ? data[name] : null; + }, + + /** + * Clears auxillary data related to an account. Deleted when the account + * is deleted. + */ + clearData: function (domain, userid, username) { + var key = [domain, userid, username].join('|') + 'Data'; + delete store[key]; + }, + + getService: function (domain, userid, username) { + var serviceCache = fromJson(store.serviceCache), + i, cache; + + if (serviceCache) { + for (i = 0; (cache = serviceCache[i]); i++) { + if (isCacheMatch(cache, domain, userid, username)) { + return cache; + } + } + } + return null; + }, + + changed: function () { + store.accountChanged = (new Date()).getTime(); + //Force the onchange events to occur. Sometimes the storage + //events do not fire? + if (opener && !opener.closed) { + dispatch.pub('accountsChanged', null, opener); + } + dispatch.pub('accountsChanged'); + }, + + onChange: function (action) { + //Listen to storage changes, and if a the accountChanged key + //changes, refresh. + var lastValue = store.accountChanged; + window.addEventListener('storage', function (evt) { + //Only refresh if the accounts were changed. + if (store.accountChanged !== lastValue) { + action(); + } + }, false); + //Also use direct notification in case storage events fail. + dispatch.sub('accountsChanged', action); + } + }, + //Some extensions mess with localStorage, so in that case, fall back to + //using dispatching. + 'memory': { + + accounts: function (ok, error) { + }, + + changed: function () { + //Use dispatching. Dispatch to current window, but also to an opener + //if available. + store.accountChanged = (new Date()).getTime(); + + if (opener) { + dispatch.pub('accountsChanged', null, opener); + } + dispatch.pub('accountsChanged'); + }, + + onChange: function (action) { + dispatch.sub('accountsChanged', action); + } + } + }; + + impl = changeTypes[storage.type]; + + /** + * Gets the accounts. Can use a cached value. + * @param {Function} ok function to receive the account info. + * @param {Function} error function to call if an error. + */ + function accounts(ok, error) { + return impl.accounts(ok, error); + } + + /** + * Updates the accounts from a json account object. + * @param {Object} cookie object to update from + */ + accounts.update = function (account_data) { + impl.update(account_data); + }; + + /** + * Remove an accounts from storage. + * @param {string} domain + * @param {string} userid + * @param {string} username + */ + accounts.remove = function (account, userid, username) { + impl.remove(account, userid, username); + }; + + /** + * Fetch accounts stored on server. + * DEPRECATED, interim use for auto-adding accounts that + * users have already configured + */ + accounts.fetch = function (ok, error) { + impl.fetch(ok, error); + }; + + /** + * Get a full service account record + * @param {string} domain + * @param {string} userid + * @param {string} username + */ + accounts.getService = function (account, userid, username) { + return impl.getService(account, userid, username); + }; + + /** + * Clears the account data. Use this when it is known that the server + * info is no longer valid/expired. + */ + accounts.clear = function () { + delete store.accountCache; + delete store.serviceCache; + }; + + /** + * Sets auxillary data associated with an account. + * @param {string} domain + * @param {string} userid + * @param {string} username + */ + accounts.setData = function (account, userid, username, name, value) { + return impl.setData(account, userid, username, name, value); + }; + + /** + * Gets auxillary data associated with an account. + * @param {string} domain + * @param {string} userid + * @param {string} username + */ + accounts.getData = function (account, userid, username, name) { + return impl.getData(account, userid, username, name); + }; + + /** + * Sets auxillary data associated with an account. + * @param {string} domain + * @param {string} userid + * @param {string} username + */ + accounts.clearData = function (account, userid, username) { + return impl.clearData(account, userid, username); + }; + + /** + * Called when the cache of accounts has changed. + */ + accounts.changed = function () { + return impl.changed(); + }; + + /** + * Default action is to just reload. + */ + function defaultAction() { + location.reload(); + } + + /** + * Called to set up the action when accounts change. + * Call it with no args to get the default behavior, page reload. + */ + accounts.onChange = function (action) { + return impl.onChange(action || defaultAction); + }; + + return accounts; +}); diff --git a/web/0.3.4/scripts/blade/Widget.js b/web/0.3.4/scripts/blade/Widget.js new file mode 100644 index 0000000..0b1bafe --- /dev/null +++ b/web/0.3.4/scripts/blade/Widget.js @@ -0,0 +1,147 @@ +/** + * @license blade/Widget Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint plusplus: false, nomen: false */ +/*global define: false, document */ + +'use strict'; + +/** + * Parts of this taken from Dojo, in particular DOM work related to + * dojo._toDom() + */ + +define([ 'require', './object', './jig', 'module'], +function (require, object, jig, module) { + + var tempNode, + baseAttrName = 'data-' + module.id.replace(/\//g, '-') + '-' + + (Math.random() + '').replace(/\d\./, ''), + typeAttr = baseAttrName + '-wtype', + idAttr = baseAttrName + '-wid', + idCounter = 0, + registry = {}, + + Widget = object(null, null, { + template: null, + /** + * Creates a new instance. Should be called by any derived objects. + * data can have some special properties: + * parent: the parent node to + * + */ + init: function (data, relNode, position) { + object.mixin(this, data, true); + + //Start widget lifecycle + if (this.onCreate) { + this.onCreate(); + } + + if (this.template) { + this.node = this.render(); + if (this.onRender) { + this.onRender(relNode); + } + } + + if (relNode && this.node) { + if (position === 'before') { + relNode.parentNode.insertBefore(this.node, relNode); + } else if (position === 'after') { + relNode.parentNode.insertBefore(this.node, relNode.nextSibling); + } else if (position === 'prepend' && relNode.firstChild) { + relNode.insertBefore(this.node, relNode.firstChild); + } else { + relNode.appendChild(this.node); + } + } + }, + + render: function (relativeNode) { + var doc, child, renderedNode, id; + if (this.template) { + //Normalize template by trimming whitespace. + this.template = this.template.trim(); + + doc = relativeNode && relativeNode.ownerDocument || document; + id = 'id' + idCounter++; + + //Set up a temp node to hold template + if (!tempNode || tempNode.ownerDocument !== doc) { + tempNode = doc.createElement('div'); + } + + tempNode.innerHTML = this.templatize(); + + // one node shortcut => return the node itself + if (tempNode.childNodes.length === 1) { + renderedNode = tempNode.removeChild(tempNode.firstChild); + renderedNode.setAttribute(idAttr, id); + renderedNode.setAttribute(typeAttr, this.moduleId); + } else { + // return multiple nodes as a document fragment + renderedNode = doc.createDocumentFragment(); + while ((child = tempNode.firstChild)) { + renderedNode.appendChild(child); + if (child.nodeType === 1) { + child.setAttribute(idAttr, id); + child.setAttribute(typeAttr, this.moduleId); + } + } + } + + this._widgetId = id; + registry[id] = this; + } + + return renderedNode; + }, + + templatize: function () { + var text = this.template, + cache = jig.cache(text) || jig.cache(text, text, this.jigOptions); + + return jig.render(cache, this, this.jigOptions); + }, + + /** + * Destroys the widget. Derived objects should call this method + * after they do their destroy work. destroy is a nice time to + * clean up event handlers. + */ + destroy: function () { + if (this.node && this.node.parentNode) { + this.node.parentNode.removeChild(this.node); + } + delete this.node; + delete registry[this._widgetId]; + } + }); + + Widget.closest = function (widgetType, evt, funcName) { + var refNode = evt.target, + widget; + + //Walk up the list of nodes until a match with the type is found. + while (refNode) { + if (refNode.getAttribute(typeAttr) === widgetType) { + break; + } + refNode = refNode.parentNode; + } + + if (refNode) { + widget = registry[refNode.getAttribute(idAttr)]; + if (widget) { + widget[funcName](evt); + } + } + }; + + Widget.registry = registry; + + return Widget; +}); diff --git a/web/0.3.4/scripts/blade/array.js b/web/0.3.4/scripts/blade/array.js new file mode 100644 index 0000000..7ad85ee --- /dev/null +++ b/web/0.3.4/scripts/blade/array.js @@ -0,0 +1,38 @@ +/** + * @license blade/array Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint nomen: false, plusplus: false */ +/*global define: false */ + +'use strict'; + +define([], function () { + var ostring = Object.prototype.toString, + ap = Array.prototype, + aps = ap.slice, + + array = { + /** + * Determines if the input a function. + * @param {Object} it whatever you want to test to see if it is a function. + * @returns Boolean + */ + is: function (it) { + return ostring.call(it) === "[object Array]"; + }, + + /** + * Converts an array-like thing into a real array + * @param{ArrayLike} arrayLike something that looks like an array, + * has a length and can access members via indices. + * @returns {Array} + */ + to: function (arrayLike) { + return [].concat(aps.call(arguments, 0)); + } + }; + + return array; +}); diff --git a/web/0.3.4/scripts/blade/defer.js b/web/0.3.4/scripts/blade/defer.js new file mode 100644 index 0000000..656c5ad --- /dev/null +++ b/web/0.3.4/scripts/blade/defer.js @@ -0,0 +1,96 @@ +/** + * @license blade/defer Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint nomen: false, plusplus: false */ +/*global define: false */ + +'use strict'; + +define(['./fn', './dispatch'], function (fn, bladeDispatch) { + + /** + * Creates an object representing a deferred action. + * @param {Function} [onCancel] optional function to call if the deferred + * action is canceled + * @param {Array} otherEventNames an array of event names to also allow + * sending and notifying on this type of deferred action. This allows you + * to express more complex interactions besides something that just indicates + * "ok", "error" or "cancel". + * @returns {Object} object representing the deferred action. It contains + * two properties: + * send: a function to send events. It takes a string name for the event, + * "ok", "error" or "cancel", and a value. + * listener: an object that only exposes an "ok", "error" and "cancel" + * functions that allow listening to those respective events. If otherEventNames + * specified other events, then there are listener registration functions + * for those event names too. + */ + function defer(onCancel, otherEventNames) { + var dfd = {}, + sentName, i, evtName, + dispatch = bladeDispatch.make(), + makeCb = function (name) { + return function (obj, f) { + var cb = fn.bind(obj, f); + dispatch.onAfter(name, function (evt) { + return cb(evt.returnValue); + }, true); + return dfd.listener; + }; + }; + + //Set up the cancellation action if desired. + if (onCancel) { + dispatch.onAfter('cancel', function (evt) { + return onCancel(); + }); + } + + dfd.send = function (name, value) { + //Do not allow sending more than one message for the deferred. + if (sentName) { + throw new Error('blade/defer object already sent event: ' + sentName); + } + sentName = name; + + dispatch.send({ + name: name, + args: [value], + persist: true + }); + + //If no error handlers on this deferred, be sure to at least + //log it to allow some sort of debugging. + if (name === 'error' && + (!dispatch._dispatchAfterQ || ! dispatch._dispatchAfterQ.error) && + defer.onErrorDefault) { + defer.onErrorDefault(value); + } + + return dfd; + }; + + dfd.listener = { + ok: makeCb('ok'), + error: makeCb('error'), + cancel: makeCb('cancel') + }; + + //Allow wiring up other event names + if (otherEventNames) { + for (i = 0; (evtName = otherEventNames[i]); i++) { + dfd.listener[evtName] = makeCb[evtName]; + } + } + + return dfd; + } + + defer.onErrorDefault = function (err) { + throw err; + }; + + return defer; +}); diff --git a/web/0.3.4/scripts/blade/dispatch.js b/web/0.3.4/scripts/blade/dispatch.js new file mode 100644 index 0000000..28fb586 --- /dev/null +++ b/web/0.3.4/scripts/blade/dispatch.js @@ -0,0 +1,227 @@ +/** + * @license blade/dispatch Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint nomen: false, plusplus: false */ +/*global define: false */ + +'use strict'; + +define(['./object', './fn'], function (object, fn) { + var emptyFunc = function () {}, + mainDispatch, + slice = Array.prototype.slice, + + needBind = function (f) { + return f !== undefined && (typeof f === 'string' || fn.is(f)); + }, + + register = function (type) { + return function (name, obj, f) { + //Adjust args to allow for a bind call + if (needBind(f)) { + f = fn.bind(obj, f); + } else { + f = obj; + } + + var qName = type, + typeQ = this[qName] || (this[qName] = {}), + q = typeQ[name] || (typeQ[name] = []), index; + + index = q.push(f) - 1; + q.count = q.count ? q.count + 1 : 1; + + //Return an unregister function to allow removing + //a listener. Notice that it can make the q array sparsely + //populated. This should be a sparsely populated array + //to allow a callback to unregister itself without affecting + //other callbacks in the array. + return function () { + q[index] = null; + q.count -= 1; + if (q.count === 0) { + delete typeQ[name]; + } + + //Clean up closure references for good measure/avoid leaks. + qName = typeQ = q = null; + }; + }; + }, + + onAfter = register('_dispatchAfterQ'), + + /** + * Defines the dispatch object. You can call its methods for a general + * publish/subscribe mechanism, or mixin its prototype properties + * to another object to give that object dispatch capabilities. + */ + dispatch = { + on: register('_dispatchBeforeQ'), + onAfter: function (name, obj, f, wantValue) { + var doBind = needBind(f), result, value, callback, evt; + //Adjust args if needing a bind + if (doBind) { + callback = f = fn.bind(obj, f); + } else { + wantValue = f; + callback = obj; + } + + result = doBind ? onAfter.call(this, name, f, wantValue) : onAfter.call(this, name, obj, f); + if (wantValue) { + //value is the property on the object, unless it is something + //that should be immutable or does not exist, then only get a value from _dispatchPersisted + value = name in this ? this[name] : + (this._dispatchPersisted && name in this._dispatchPersisted ? this._dispatchPersisted[name] : undefined); + evt = { + preventDefault: emptyFunc, + stopPropagation: emptyFunc, + returnValue: value + }; + + if (value !== undefined) { + callback(evt); + } + } + return result; + }, + + /** + * Sends an event. An event can have its values modified by "before" + * listeners before the default action happens. A "before" listener + * can also prevent the default action from occurring. "after" listeners + * only get to be notified of the return value from the event. + * + * @param {Object||String} message the message can either be an object + * with the following properties: + * @param {String} message.name the name of the message + * @param {Array} message.args the array of arguments for the message + * @param {Boolean}message.persist the result of the send should be + * remembered, so that any subsequent listeners that listen after + * the result is rememberd can opt to get the last good value. + * @param {Function} [message.defaultAction] a default action to take + * if any of the "before" listeners do not call preventDefault() + * on the event object they receive. + * + * If message is a string, then that is like the "name" property mentioned + * above, and any additional function arguments are treated as the + * args array. + * + * If defaultAction is not passed, then the default action will be to + * either set the property value on this object that matches the name + * to the first arg value, or if the name maps to function property + * on the object, it will call that function with the args. + * + * @returns {Object} the returnValue from any + */ + send: function (message) { + if (typeof message === 'string') { + //Normalize message to object arg form. + message = { + name: message, + args: slice.call(arguments, 1) + }; + } + + var name = message.name, + beforeQ = this._dispatchBeforeQ && this._dispatchBeforeQ[name], + afterQ = this._dispatchAfterQ && this._dispatchAfterQ[name], + preventDefault = false, stopImmediatePropagation, + evt = { + preventDefault: function () { + preventDefault = true; + }, + stopImmediatePropagation: function () { + stopImmediatePropagation = true; + }, + args: message.args + }, + i, result, value, args, isFunc, persisted; + + //Trigger before listeners + if (beforeQ) { + for (i = 0; i < beforeQ.length; i++) { + //array can be sparse because of unregister functions + if (beforeQ[i]) { + beforeQ[i](evt); + if (stopImmediatePropagation) { + break; + } + } + } + } + + //If a before handler prevents the default action, exit + //early, using any return value found in the event that may + //have been set by a before handler. + if (preventDefault) { + return evt.returnValue; + } + + //Do the default action. + if (message.defaultAction) { + result = message.defaultAction.apply(this, evt.args); + } else { + //Only bother if the property already exists on the object, + //otherwise it is a catch all or just an event router + args = evt.args; + if (name in this) { + isFunc = fn.is(this[name]); + value = this[name]; + + if (args && args.length) { + //A set operation + result = isFunc ? value.apply(this, args) : this[name] = args[0]; + } else { + //A get operation + result = isFunc ? this[name]() : value; + } + } else if (this._dispatchCatchAll) { + //Allow the catch all to get it. + result = this._dispatchCatchAll(name, args); + } else { + result = args && args[0]; + } + } + + //Trigger mutable after listeners first, before the immutable ones + //to allow the mutable ones to modify the result. + if (afterQ) { + stopImmediatePropagation = false; + evt.returnValue = result; + for (i = 0; i < afterQ.length; i++) { + //array can be sparse because of unregister functions + if (afterQ[i]) { + afterQ[i](evt); + if (stopImmediatePropagation) { + break; + } + } + } + result = evt.returnValue; + } + + //Hold on to the result if need be. Useful for the deferred/promise + //cases where listeners can be added after the deferred completes. + if (message.persist) { + persisted = this._dispatchPersisted || (this._dispatchPersisted = {}); + persisted[message.name] = result; + } + + return result; + } + }; + + //Create a top level dispatch that can be used for "global" event routing, + //and which can make new dispatch objects that have all the methods above, + //but without the instance variables. + mainDispatch = object.create(dispatch); + mainDispatch.make = function () { + return object.create(dispatch); + }; + + return mainDispatch; +}); diff --git a/web/0.3.4/scripts/blade/fn.js b/web/0.3.4/scripts/blade/fn.js new file mode 100644 index 0000000..a5272c5 --- /dev/null +++ b/web/0.3.4/scripts/blade/fn.js @@ -0,0 +1,58 @@ +/** + * @license blade/func Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint nomen: false, plusplus: false */ +/*global define: false */ + +'use strict'; + +define([], function () { + var slice = Array.prototype.slice, + ostring = Object.prototype.toString, + + fn = { + /** + * Determines if the input a function. + * @param {Object} it whatever you want to test to see if it is a function. + * @returns Boolean + */ + is: function (it) { + return ostring.call(it) === '[object Function]'; + }, + + /** + * Different from Function.prototype.bind in ES5 -- + * it has the "this" argument listed first. This is generally + * more readable, since the "this" object is visible before + * the function body, reducing chances for error by missing it. + * If only obj has a real value then obj will be returned, + * allowing this method to be called even if you are not aware + * of the format of the obj and f types. + * It also allows the function to be a string name, in which case, + * obj[f] is used to find the function. + * @param {Object||Function} obj the "this" object, or a function. + * @param {Function||String} f the function of function name that + * should be called with obj set as the "this" value. + * @returns {Function} + */ + bind: function (obj, f) { + //Do not bother if + if (!f) { + return obj; + } + + //Make sure we have a function + if (typeof f === 'string') { + f = obj[f]; + } + var args = slice.call(arguments, 2); + return function () { + return f.apply(obj, args.concat(slice.call(arguments, 0))); + }; + } + }; + + return fn; +}); diff --git a/web/0.3.4/scripts/blade/jig.js b/web/0.3.4/scripts/blade/jig.js new file mode 100644 index 0000000..90515a5 --- /dev/null +++ b/web/0.3.4/scripts/blade/jig.js @@ -0,0 +1,858 @@ +/** + * @license blade/jig Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint nomen: false, plusplus: false */ +/*global define: false, document: false, console: false, jQuery: false */ + +'use strict'; + +define(['require', './object'], function (require, object) { + + //Fix unit test: something is wrong with it, says it passes, but + //with attachData change, the string is actually different now. + //TODO: for attachData, only generate a new ID when the data value changes, + //and similarly, only attach the data one time per data value. + + //If have browser tries to fetch + //{foo} if that is in markup. Doing a <{/}img, then FF browser treats that + //as <{/}img. Using b; + }, + gte: function (a, b) { + return a >= b; + }, + lt: function (a, b) { + return a < b; + }, + lte: function (a, b) { + return a <= b; + }, + or: function (a, b) { + return a || b; + }, + and: function (a, b) { + return a && b; + }, + is: function (a) { + return !!a; + }, + eachProp: function (obj) { + //Converts object properties into an array + //of objects that have 'prop' and 'value' properties. + var prop, ret = []; + for (prop in obj) { + if (obj.hasOwnProperty(prop)) { + ret.push({ + prop: prop, + value: obj[prop] + }); + } + } + + //Sort the names to be roughly alphabetic + return ret.sort(function (a, b) { + return a.prop > b.prop ? 1 : -1; + }); + } + }, + attachData = false, + dataIdCounter = 1, + controlIdCounter = 1, + dataRegistry = {}, + tempNode = typeof document !== 'undefined' && document.createElement ? + document.createElement('div') : null, + templateClassRegExp = /(\s*)(template)(\s*)/; + + function isArray(it) { + return ostring.call(it) === '[object Array]'; + } + + /** + * Gets a property from a context object. Allows for an alternative topContext + * object that can be used for the first part property lookup if it is not + * found in context first. + * @param {Array} parts the list of nested properties to look up on a context. + * @param {Object} context the context to start the property lookup + * @param {Object} [topContext] an object to use as an alternate context + * for the very first part property to look up if it is not found in context. + * @returns {Object} + */ + function getProp(parts, context, topContext) { + var obj = context, i, p; + for (i = 0; obj && (p = parts[i]); i++) { + obj = (typeof obj === 'object' && p in obj ? obj[p] : (topContext && i === 0 && p in topContext ? topContext[p] : undefined)); + } + return obj; // mixed + } + + function strToInt(value) { + return value ? parseInt(value, 10) : 0; + } + + function getObject(name, data, options) { + var brackRegExp = /\[([\w0-9\.'":]+)\]/, + part = name, + parent = data, + isTop = true, + match, pre, prop, obj, startIndex, endIndex, indices, result, + parenStart, parenEnd, func, funcName, arg, args, i, firstChar; + + //If asking for the default arg it means giving back the current data. + if (name === defaultArg) { + return data; + } + + //If name is just an integer, just return it. + if (wordRegExp.test(name)) { + return strToInt(name); + } + + //An empty string is just returned. + if (name === '') { + return ''; + } + + //If the name looks like a string, just return that. + firstChar = name.charAt(0); + if (firstChar === "'" || firstChar === "'") { + return name.substring(1, name.length - 1); + } + + //First check for function call. Function must be globally visible. + if ((parenStart = name.indexOf('(')) !== -1) { + parenEnd = name.lastIndexOf(')'); + funcName = name.substring(0, parenStart); + func = options.fn[funcName]; + if (!func) { + jig.error('Cannot find function named: ' + funcName + ' for ' + name); + return ''; + } + arg = name.substring(parenStart + 1, parenEnd); + if (arg.indexOf(',') !== -1) { + args = arg.split(','); + for (i = args.length - 1; i >= 0; i--) { + args[i] = getObject(args[i], data, options); + } + result = func.apply(null, args); + } else { + result = func(getObject(arg, data, options)); + } + if (parenEnd < name.length - 1) { + //More data properties after the function call, fetch them + //If the part after the paren is a dot, then skip over that part + if (name.charAt(parenEnd + 1) === '.') { + parenEnd += 1; + } + return getObject(name.substring(parenEnd + 1, name.length), result, options); + } else { + return result; + } + } + + //Now handle regular object references, which could have [] notation. + while ((match = brackRegExp.exec(part))) { + prop = match[1].replace(/['"]/g, ''); + pre = part.substring(0, match.index); + + part = part.substring(match.index + match[0].length, part.length); + if (part.indexOf('.') === 0) { + part = part.substring(1, part.length); + } + + obj = getProp(pre.split('.'), parent, isTop ? options.context : null); + isTop = false; + + if (!obj && prop) { + jig.error('blade/jig: No property "' + prop + '" on ' + obj); + return ''; + } + + if (prop.indexOf(':') !== -1) { + //An array slice action + indices = prop.split(':'); + startIndex = strToInt(indices[0]); + endIndex = strToInt(indices[1]); + + if (!endIndex) { + obj = obj.slice(startIndex); + } else { + obj = obj.slice(startIndex, endIndex); + } + } else { + if (options.strict && !(prop in obj)) { + jig.error('blade/jig: no property "' + prop + '"'); + } + obj = obj[prop]; + } + parent = obj; + } + + if (!part) { + result = parent; + } else { + result = getProp(part.split('.'), parent, isTop ? options.context : null); + } + + if (options.strict && result === undefined) { + jig.error('blade/jig: undefined value for property "' + name + '"'); + } + + return result; + } + + /** + * Gets a compiled template based on the template ID. Will look in the + * DOM for an element with that ID if a template is not found already in + * the compiled cache. + * @param {String} id the ID of the template/DOM node + * @param {Object} [options] + * + * @returns {Array} the compiled template. + */ + function compiledById(id, options) { + options = options || {}; + var compiled = jig.cache(id, options), node; + + //Did not find the text template. Maybe it is a DOM element. + if (compiled === undefined && typeof document !== 'undefined') { + node = document.getElementById(id); + if (node) { + jig.parse([node], options); + } + compiled = jig.cache(id, options); + } + if (compiled === undefined) { + throw new Error('blade/jig: no template or node with ID: ' + id); + } + return compiled; + } + + commands = { + '_default_': { + doc: 'Property reference', + action: function (args, data, options, children, render) { + var value = args[0] ? getObject(args[0], data, options) : data, + comparison = args[1] ? getObject(args[1], data, options) : undefined, + i, text = ''; + + //If comparing to some other value, then the value is the data, + //and need to compute if the values compare. + if (args[1]) { + comparison = value === comparison; + value = data; + } else { + //Just use the value, so the value is used in the comparison. + comparison = value; + } + //Want to allow returning 0 for values, so this next check is + //a bit verbose. + if (comparison === false || comparison === null || + comparison === undefined || (isArray(comparison) && !comparison.length)) { + return ''; + } else if (children) { + if (isArray(value)) { + for (i = 0; i < value.length; i++) { + text += render(children, value[i], options); + } + } else { + //If the value is true or false, then just use parent data. + //for the child rendering. + if (typeof value === 'boolean') { + value = data; + } + text = render(children, value, options); + } + } else { + text = value; + } + return text; + } + }, + '!': { + doc: 'Not', + action: function (args, data, options, children, render) { + var value = getObject(args[0], data, options), + comparison = args[1] ? getObject(args[1], data, options) : undefined; + + //If comparing to some other value, then the value is the data, + //and need to compute if the values compare. + if (args[1]) { + comparison = value === comparison; + value = data; + } else { + //Just use the value, so the value is used in the comparison. + comparison = value; + } + + if (children && !comparison) { + return render(children, data, options); + } + return ''; + } + }, + '#': { + doc: 'Template reference', + action: function (args, data, options, children, render) { + var compiled = compiledById(args[0], options); + data = getObject(args.length > 1 ? args[1] : defaultArg, data, options); + return render(compiled, data, options); + } + }, + '.': { + doc: 'Variable declaration', + action: function (args, data, options, children, render) { + options.context[args[0]] = getObject(args[1], data, options); + //TODO: allow definining a variable then doing a block with + //that variable. + return ''; + } + }, + '>': { + doc: 'Else', + action: function (args, data, options, children, render) { + if (children) { + return render(children, data, options); + } + return ''; + } + } + }; + + jig = function (text, data, options) { + var id; + if (typeof text === 'string') { + if (text.charAt(0) === '#') { + //a lookup by template ID + id = text.substring(1, text.length); + text = compiledById(id, options); + } else { + text = jig.compile(text, options); + } + } + return jig.render(text, data, options); + }; + + jig.htmlEscape = function (text) { + return text.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); + }; + + function compile(text, options) { + var compiled = [], + start = 0, + useRawHtml = false, + controlId = 0, + segment, index, match, tag, command, args, lastArg, lastChar, + children, i, tempTag; + + while ((index = text.indexOf(options.startToken, start)) !== -1) { + //Output any string that is before the template tag start + if (index !== start) { + compiled.push(text.substring(start, index)); + } + + //Find the end of the token + segment = text.substring(index); + match = options.endRegExp.exec(segment); + if (!match) { + //Just a loose start thing could be a regular punctuation. + compiled.push(segment); + return compiled; + } else { + //Command Match! + + //Increment start past the match. + start = index + match[0].length; + + //Pull out the command + tag = text.substring(index + options.startToken.length, index + match[0].length - options.endToken.length).trim(); + + //decode in case the value was in an URL field, like an href or an img src attribute + tag = decode(tag); + + //if the command is commented out end block call, that messes with stuff, + //just throw to let the user know, otherwise browser can lock up. + if (badCommentRegExp.test(tag)) { + throw new Error('blade/jig: end block tags should not be commented: ' + tag); + } + + command = tag.charAt(0); + + if (command === ']' && controlId) { + //In a control block, previous block was a related control block, + //so parse it without the starting ] character. + tempTag = tag.substring(1).trim(); + if (tempTag === '[') { + command = '>'; + } else { + command = tempTag.charAt(0); + //Remove the starting ] so it is seen as a regular tag + tag = tempTag; + } + } + + if (command && !options.propertyRegExp.test(command)) { + //Have a template command + tag = tag.substring(1).trim(); + } else { + command = '_default_'; + //Command could contain just the raw HTML indicator. + useRawHtml = (command === options.rawHtmlToken); + } + + //Allow for raw HTML output, but it is not the default. + //template references use raw by default though. + if ((useRawHtml = tag.indexOf(options.rawHtmlToken) === 0)) { + tag = tag.substring(options.rawHtmlToken.length, tag.length); + } + //However, template references use raw always + if (command === templateRefToken) { + useRawHtml = true; + } + + args = tag.split(options.argSeparator); + lastArg = args[args.length - 1]; + lastChar = lastArg.charAt(lastArg.length - 1); + children = null; + + if (command === ']') { + //If there are no other args, this is an end tag, to close + //out a block and possibly a set of control blocks. + if (lastChar !== '[') { + //End of a block. End the recursion, let the parent know + //the place where parsing stopped. + compiled.templateEnd = start; + + //Also end of a control section, indicate it as such. + compiled.endControl = true; + } else { + //End of a block. End the recursion, let the parent know + //the place where parsing stopped, before this end tag, + //so it can process it and match it to a control flow + //from previous control tag. + compiled.templateEnd = start - match[0].length; + } + + return compiled; + } else if (lastChar === '[') { + //If last arg ends with a [ it means a block element. + + //Assign a new control section ID if one is not in play already + if (!controlId) { + controlId = controlIdCounter++; + } + + //Adjust the last arg to not have the block character. + args[args.length - 1] = lastArg.substring(0, lastArg.length - 1); + + //Process the block + children = compile(text.substring(start), options); + + //Skip the part of the string that is part of the child compile. + start += children.templateEnd; + } + + //If this defines a template, save it off, + //if a comment (starts with /), then ignore it. + if (command === '+') { + options.templates[args[0]] = children; + } else if (command !== '/') { + //Adjust args if some end in commas, it means they are function + //args. + if (args.length > 1) { + for (i = args.length - 1; i >= 0; i--) { + if (args[i].charAt(args[i].length - 1) === ',') { + args[i] = args[i] + args[i + 1]; + args.splice(i + 1, 1); + } + } + } + + compiled.push({ + action: options.commands[command].action, + useRawHtml: useRawHtml, + args: args, + controlId: controlId, + children: children + }); + } + + //If the end of a block, clear the control ID + if (children && children.endControl) { + controlId = 0; + } + } + } + + if (start !== text.length - 1) { + compiled.push(text.substring(start, text.length)); + } + + return compiled; + } + + jig.compile = function (text, options) { + //Mix in defaults + options = options || {}; + object.mixin(options, { + startToken: startToken, + endToken: endToken, + rawHtmlToken: rawHtmlToken, + propertyRegExp: propertyRegExp, + commands: commands, + argSeparator: argSeparator, + templates: templateCache + }); + + options.endRegExp = new RegExp('[^\\r\\n]*?' + endToken); + + //Do some reset to avoid a number from getting too big. + controlIdCounter = 1; + + return compile(text, options); + }; + + /** + * Converts a node to a compiled template, and will store it in the cache. If already + * in the cache, it will give back the cached value. + */ + function nodeToCompiled(node, options) { + var text, compiled, clss, + id = node.id, + cache = options.templates || templateCache; + + //If the nodes has already been cached, then just get the cached value. + if (cache[id]) { + return cache[id]; + } + + //Call listener to allow processing of the node before + //template complication happens. + if (options.onBeforeParse) { + options.onBeforeParse(node); + } + + if (node.nodeName.toUpperCase() === 'SCRIPT') { + text = node.text.trim(); + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } else { + //Put node in temp node to get the innerHTML so node's element + //html is in the output. + tempNode.appendChild(node); + + //Remove the id node and the template class, since this + //template text could be duplicated many times, and a + //template class is no longer useful. + node.removeAttribute('id'); + clss = (node.getAttribute('class') || '').trim(); + if (clss) { + node.setAttribute('class', clss.replace(templateClassRegExp, '$1$3')); + } + + //Decode braces when may get URL encoded as part of hyperlinks + text = tempNode.innerHTML.replace(/%7B/g, '{').replace(/%7D/g, '}'); + + //Clear out the temp node for the next use. + tempNode.removeChild(node); + } + compiled = jig.compile(text, options); + jig.cache(id, compiled, options); + return compiled; + } + + /** + * Parses an HTML document for templates, compiles them, and stores them + * in a cache of templates to use on the page. Only useful in browser environments. + * Script tags with type="text/template" are parsed, as well as DOM elements + * that have a class of "template" on them. The found nodes will be removed + * from the DOM as part of the parse operation. + * + * @param {Array-Like} [nodes] An array-like list of nodes. Could be a NodeList. + * @param {Object} [options] A collection of options to use for compilation. + */ + jig.parse = function (nodes, options) { + //Allow nodes to not be passed in, but still have options. + if (nodes && !nodes.length) { + options = nodes; + nodes = null; + } + + options = options || {}; + nodes = nodes || document.querySelectorAll('.template, script[type="text/template"]'); + + var node, i; + + for (i = nodes.length - 1; i > -1 && (node = nodes[i]); i--) { + nodeToCompiled(node, options); + } + }; + + function render(compiled, data, options) { + var text = '', i, dataId, controlId, currentControlId, currentValue, lastValue; + if (typeof compiled === 'string') { + text = compiled; + } else if (isArray(compiled)) { + for (i = 0; i < compiled.length; i++) { + //Account for control blocks (if/elseif/else) + //control blocks all have the same control ID, so only call the next + //control block if the first one did not return a value. + currentControlId = compiled[i].controlId; + if (!currentControlId || currentControlId !== controlId || !lastValue) { + currentValue = render(compiled[i], data, options); + text += currentValue; + if (currentControlId) { + controlId = currentControlId; + lastValue = currentValue; + } + } + } + } else { + //A template command to run. + text = compiled.action(compiled.args, data, options, compiled.children, render); + if (!text) { + text = ''; + } else if (!compiled.useRawHtml && !compiled.children) { + //Only html escape commands that are not block actions. + text = jig.htmlEscape(text.toString()); + } + } + + if (options.attachData) { + if (startTagRegExp.test(text)) { + dataId = 'id' + (dataIdCounter++); + text = text.replace(startTagRegExp, '$& data-blade-jig="' + dataId + '" '); + dataRegistry[dataId] = data; + } + } + + return text; + } + + /** + * Render a compiled template. + * + * @param {Array} compiled a compiled template + * @param {Object} data the data to use in the template + * @param {Object} options options for rendering. They include: + * @param {Object} templates a cache of compiled templates that might be + * referenced by the primary template + * @param {Object} options.fn a set of functions that might be used + * by the template(s). Each property on this object is a name of a function + * that may show up in the templates, and the value should be the function + * definition. + * @returns {String} the rendered template. + */ + jig.render = function (compiled, data, options) { + var i, result = ''; + + //Normalize options, filling in defaults. + options = options || {}; + object.mixin(options, { + templates: templateCache, + attachData: attachData, + strict: jig.strict + }); + + //Mix in default functions + if (options.fn) { + object.mixin(options.fn, defaultFuncs); + } else { + options.fn = defaultFuncs; + } + + //Mix in top level context object + options.context = options.context || object.create(data); + + //If data is an array, then render should be called for each item + //in the array. + if (isArray(data)) { + for (i = 0; i < data.length; i++) { + result += render(compiled, data[i], options); + } + return result; + } + + //Default case, just render + return render(compiled, data, options); + }; + + /** + * Enable strict template rendering checks. If a property does not exist on a + * data object, then an error will be logged. + */ + jig.strict = false; + + /** + * Track errors by logging to console if available. + */ + jig.error = function (msg) { + throw msg; + }; + + /** + * Adds functions to the default set of functions that can be used inside + * a template. Newer definitions of a function will take precedence + * over the previously registered function. + * @param {Object} an object whose properties are names of functions + * and values are the functions that correspond to the names. + */ + jig.addFn = function (obj) { + object.mixin(defaultFuncs, obj, true); + }; + + /** + * Gets and sets the data bound to a particular rendered template. Setting + * the data does not change the already rendered template. + * + * @param {String||DOMNode} dataId the data ID, or a DOM node with a + * data-blade-jig attribute that was generated from a rendered template. + * @returns {Object} the bound data. Can return undefined if there is + * no data stored with that ID. + */ + jig.data = function (dataId, value) { + if (typeof dataId !== 'string') { + //Should be a DOM node or node list if it is not already a string. + if (!dataId.nodeType) { + dataId = dataId[0]; + } + dataId = dataId.getAttribute('data-blade-jig'); + } + + if (value !== undefined) { + return (dataRegistry[dataId] = value); + } else { + return dataRegistry[dataId]; + } + }; + + /** + * Removes some data that was bound to a rendered template. + * @param {String} dataId the data ID. It can be fetched from the + * data-blade-jig attribute on a rendered template. + */ + jig.removeData = function (dataId) { + delete dataRegistry[dataId]; + }; + + /** + * Gets an object given a string representation. For example, + * jig.getObject('foo.bar', baz) will return the baz.foo.bar value. + * + * @param {String} name the string value to fetch. The following formats + * are allowed: 'foo.bar', 'foo['bar']', 'foo[0]', 'foo[2:6]'. The last one + * will return an array subset. Functions are also supported: 'doSomething(foo.bar)' + * but the doSomething function needs to be defined in the options.fn + * property, as options.fn.doSomething = function (){} + * + * @param {Object} data the object to use as the basis for the object lookup. + * + * @param {Object} options. Options to the lookup. The only supported option + * at this time is options.func, and object defining functions can could be + * called. + * + * @returns {Object} it could return null if the name is not found off the data + */ + jig.getObject = getObject; + + /** + * Gets or sets a compiled template from a template cache. + * @param {String} id the template ID + * @param {String} [value] A string to compile to a template, or + * the compiled template value. + * @param {Object} [options] optional options object with a 'templates' + * property that contains some cached templates. If provided, a matching + * cache value for the ID will be used from options.templates, otherwise, + * the ID will be used to look up in the global blade/jig template cache. + * @returns {Object} a compiled template. It could return undefined if + * not match is found. + */ + jig.cache = function (id, value, options) { + //Convert the value to a compiled templated if necessary. + if (typeof value === 'string') { + value = jig.compile(value, options); + } + + //If value is not an array, then a get operation, likely an options. + if (!isArray(value)) { + options = value; + value = undefined; + } + + var cache = (options && options.templates) || templateCache; + if (value !== undefined) { + cache[id] = value; + } + + //Return the value. For get use, the template may not be in + //the local options.templates, but in the global cache, so + //be sure to check both. + return cache[id] || templateCache[id]; + }; + + function addToJQuery(jQuery) { + //Only handles queries where it is by a node ID, '#something'. + jQuery.fn.jig = function (data, options) { + //Convert this, which is a DOM node into a string of data + options = options || {}; + + var id = this.selector, + compiled; + + if (id.charAt(0) !== '#') { + throw new Error('blade/jig: only ID selectors, like "#something" are allowed with jig()'); + } + id = id.substring(1, id.length); + + //See if the template is already compiled. + compiled = (options.templates || templateCache)[id]; + + if (!compiled) { + compiled = nodeToCompiled(this[0]); + } + + return jQuery(jig.render(compiled, data, options)); + }; + } + + //Set up the plugin with a RequireJS-aware jQuery module but also + //if there is a global jQuery. + //require.modify('jquery', 'jquery-jig', ['jquery'], addToJQuery); + if (typeof jQuery !== 'undefined') { + addToJQuery(jQuery); + } + + return jig; +}); diff --git a/web/0.3.4/scripts/blade/object.js b/web/0.3.4/scripts/blade/object.js new file mode 100644 index 0000000..73ae3e4 --- /dev/null +++ b/web/0.3.4/scripts/blade/object.js @@ -0,0 +1,128 @@ +/** + * @license blade/object Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint plusplus: false */ +/*global define: false */ + +'use strict'; + +define(['./fn'], function (fn) { + + var empty = {}, + + /** + * Creates a new constructor function for generating objects of a certain type. + * + * @param {Object} base the base object to inherit from in the + * prototype chain. Pass null if no parent desired. + * + * @param {Array} mixins an array of objects to use to mix in their + * properties into the new object. Pass null if no mixins desired. + * + * @param {Function} objPropertyFunc, a function that returns an object + * whose properties should be part of this new object's prototype. + * The function will be passed the function used to call methods + * on the parent prototype used for this object. The function expects + * three arguments: + * - obj: pass the this object for this arg + * - funcName: the function name to call on the prototype object (a string) + * - args: an array of arguments. Normally just pass the arguments object. + * The parent prototype will be a combination of the base object + * with all mixins applied. + * + * @returns {Function} a constructor function. + */ + object = function (base, mixins, objPropertyFunc) { + base = base || {}; + var constructor, + + //Create the parent and its parentFunc calling wrapper. + //The parent function just makes it easier to call the parent + parent = object.create(base.prototype, mixins), + parentFunc = function (obj, funcName, args) { + return parent[funcName].apply(obj, args); + }, + + //Create a different object for the prototype instead of using + //parent, so that parent can still refer to parent object + //without the curren object's properties mixed in + //(via the objPropertyFunc) with the mixed in properties taking + //priority over the parent's properties. + proto = object.create(parent); + + object.mixin(proto, (fn.is(objPropertyFunc) ? objPropertyFunc(parentFunc) : objPropertyFunc), true); + + //Create the constructor function. Calls init if it is defined + //on the prototype (proto) + constructor = function () { + //Protect against a missing new + if (!(this instanceof constructor)) { + throw new Error('blade/object: constructor function called without "new" in front'); + } + + //Call initializer if present. + if (this.init) { + this.init.apply(this, arguments); + } + }; + + //Set the prototype for this constructor + constructor.prototype = proto; + + return constructor; + }; + + /** + * Similar to ES5 create, but instead of setting property attributes + * for the second arg, allow an array of mixins to mix in properties + * to the newly created object. + * A copy of dojo.delegate + * @param {Object} parent the parent object to use as the prototype. + * @param {Array} [mixins] array of mixin objects to mix in to the new object. + */ + function Temp() {} + + object.create = function (obj, mixins) { + Temp.prototype = obj; + var temp = new Temp(), i, mixin; + + //Avoid any extra memory hanging around + Temp.prototype = null; + + if (mixins) { + for (i = 0; (mixin = mixins[i]); i++) { + object.mixin(temp, mixin); + } + } + return temp; // Object + }; + + /** + * Simple function to mix in properties from source into target, + * but only if target does not already have a property of the same name, + * unless override is set to true. Borrowed from Dojo. + * + * To extend a prototype on a given object, pass in the prototype property + * to mixin. For example: object.mixin(func.prototype, {a: 'b'}); + * + * @param {Object} target the object receiving the mixed in properties. + * + * @param {Object} source the object that contains the properties to mix in. + * + * @param {Boolean} [override] if set to true, then the source's properties + * will be mixed in even if a property of the same name already exists on + * the target. + */ + object.mixin = function (target, source, override) { + //TODO: consider ES5 getters and setters in here. + for (var prop in source) { + if (!(prop in empty) && (!(prop in target) || override)) { + target[prop] = source[prop]; + } + } + }; + + return object; +}); diff --git a/web/0.3.4/scripts/blade/url.js b/web/0.3.4/scripts/blade/url.js new file mode 100644 index 0000000..97f9c00 --- /dev/null +++ b/web/0.3.4/scripts/blade/url.js @@ -0,0 +1,101 @@ +/** + * @license blade/url Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + * Available via the MIT, GPL or new BSD license. + * see: http://github.com/jrburke/blade for details + */ +/*jslint nomen: false, plusplus: false */ +/*global define: false */ + +'use strict'; + +define(['./array'], function (array) { + var ostring = Object.prototype.toString; + + return { + objectToQuery: function (/*Object*/ map) { + // summary: + // takes a name/value mapping object and returns a string representing + // a URL-encoded version of that object. + // example: + // this object: + // + // | { + // | blah: "blah", + // | multi: [ + // | "thud", + // | "thonk" + // | ] + // | }; + // + // yields the following query string: + // + // | "blah=blah&multi=thud&multi=thonk" + + // FIXME: need to implement encodeAscii!! + var enc = encodeURIComponent, + pairs = [], + backstop = {}, + name, value, assign, i; + for (name in map) { + if (map.hasOwnProperty(name)) { + value = map[name]; + if (value !== backstop[name]) { + assign = enc(name) + "="; + if (array.is(value)) { + for (i = 0; i < value.length; i++) { + pairs.push(assign + enc(value[i])); + } + } else { + pairs.push(assign + enc(value)); + } + } + } + } + return pairs.join("&"); // String + }, + + queryToObject: function (/*String*/ str) { + // summary: + // Create an object representing a de-serialized query section of a + // URL. Query keys with multiple values are returned in an array. + // + // example: + // This string: + // + // | "foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&" + // + // results in this object structure: + // + // | { + // | foo: [ "bar", "baz" ], + // | thinger: " spaces =blah", + // | zonk: "blarg" + // | } + // + // Note that spaces and other urlencoded entities are correctly + // handled. + var ret = {}, + qp = str.split('&'), + dec = decodeURIComponent, + parts, name, val; + + qp.forEach(function (item) { + if (item.length) { + parts = item.split('='); + name = dec(parts.shift()); + val = dec(parts.join('=')); + if (typeof ret[name] === 'string') { + ret[name] = [ret[name]]; + } + + if (ostring.call(ret[name]) === '[object Array]') { + ret[name].push(val); + } else { + ret[name] = val; + } + } + }); + return ret; + } + }; +}); diff --git a/web/0.3.4/scripts/cards.js b/web/0.3.4/scripts/cards.js new file mode 100644 index 0000000..f849cd1 --- /dev/null +++ b/web/0.3.4/scripts/cards.js @@ -0,0 +1,173 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint */ +/*global require: false, define: false, window: false, document: false, cards: true */ +'use strict'; + +define([ 'jquery', 'text!templates/cardsHeader.html'], +function ($, headerTemplate) { + var header, display, back, nlCards, + cardPosition = 0, + headerText = '', + cardTitles = []; + + function adjustCardSizes() { + var cardWidth = display.outerWidth(), + cardList = $('.card'), + totalWidth = cardWidth * cardList.length, + height = window.innerHeight - header.outerHeight(); + + //Set height + display.css('height', height + 'px'); + + //Set widths and heights of cards. Need to set the heights + //explicitly so any card using iscroll will get updated correctly. + nlCards.css({ + width: totalWidth + 'px', + height: height + 'px' + }); + + cardList.css({ + width: cardWidth + 'px', + height: height + 'px' + }); + + //Reset the scroll correctly. + cards.scroll(); + } + + function cards(nl, options) { + nl = nl.jquery ? nl : $(nl); + + $(function () { + //Insert the header before the cards + header = $(headerTemplate).insertBefore(nl); + headerText = $('#headerText'); + + back = $('#back'); + back.css('display', 'none'); + back.click((options && options.onBack) || cards.back); + + display = nl; + nlCards = display.find('#cards'); + + adjustCardSizes(); + cards.setTitle(options && options.title); + + //Detect orientation changes and size the card container size accordingly. + if ('onorientationchange' in window) { + window.addEventListener('orientationchange', adjustCardSizes, false); + } + window.addEventListener('resize', adjustCardSizes, false); + + }); + } + + cards.adjustCardSizes = adjustCardSizes; + + /** + * Adds a new card to the list of cards, at the end of the cards. + * Only adds the card, does not navigate to it. Only adds the card + * if a DOM element with the info.id does not already exist in the page. + * + * @param {Object} info the info about the card. It must have the following + * properties: + * @param {String} info.id the ID to use for the new card's DOM element. + * @param {String} info.title the text title to use for the card. + * @param {String} info.content a string of HTML to use for the content. + */ + cards.add = function (info) { + var existing = $('#' + info.id), + title = info.title; + + if (!title) { + title = info.content.match(/

([^<]+)<\/h1>/); + title = (title && title[1]) || ''; + } + + if (!existing.length) { + existing = $('
' + info.content + '
') + .appendTo('#cards'); + cards.adjustCardSizes(); + } + + return existing[0]; + }; + + cards.back = function () { + cardPosition -= 1; + if (cardPosition < 0) { + cardPosition = 0; + } + cards.scroll(); + }; + + cards.moveTo = function (id) { + cardPosition = $('.card').index(document.getElementById(id)); + if (cardPosition < 0) { + cardPosition = 0; + } + cards.scroll(); + }; + + cards.forward = function (title) { + cardPosition += 1; + cards.scroll(title); + }; + + cards.scroll = function (title) { + if (title) { + cardTitles[cardPosition] = title; + } + + cards.setTitle(title); + + var left = display.outerWidth() * cardPosition; + + nlCards.animate( + { + left: '-' + left + 'px' + }, { + duration: 300, + easing: 'linear' + } + ); + +/* + Was used for CSS -webkit-transition + nlCards.css({ + left: '-' + left + 'px' + }); +*/ + //Hide/Show back button as appropriate + back.css('display', !cardPosition ? 'none' : ''); + }; + + cards.setTitle = function (title) { + title = title || cardTitles[cardPosition] || nlCards.find('.card').eq(cardPosition).attr('title') || ''; + headerText.html(title); + }; + + return cards; +}); diff --git a/web/0.3.4/scripts/dispatch.js b/web/0.3.4/scripts/dispatch.js new file mode 100644 index 0000000..4927dbc --- /dev/null +++ b/web/0.3.4/scripts/dispatch.js @@ -0,0 +1,81 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint plusplus: false, indent: 2 */ +/*global require: false, define: false, location: false, window: false */ +"use strict"; + +/** + * A module that handles dispatching pub/sub topics, where the underlying + * dispatch is done by postMessage. This allows for chrome extensions + * to participate in the pub/sub via postMessage without having to + * participate in this particular module. + */ +define(['jquery'], function ($) { + + var origin = location.protocol + "//" + location.host; + + return { + sub: function (topic, callback, win, targetOrigin) { + win = win || window; + targetOrigin = targetOrigin || origin; + + var func = function (evt) { + //Make sure message is from this page, or from the browser extension + //that wants to communicate information back to the page. + if (evt.origin === targetOrigin || evt.origin === 'chrome://browser') { + //Assume pub/sub has JSON data with properties named + //'topic' and 'data'. + try { + var message = JSON.parse(evt.data), + pubTopic = message.topic; + if (pubTopic && pubTopic === topic) { + callback(message.data); + } + } catch (e) { + //Just ignore messages that are not JSON. There are some, like + //the oauth_success messages + } + } + }; + + win.addEventListener('message', func, false); + + //return the created function to allow unsubscribing + return func; + }, + + unsub: function (func, win) { + win = win || window; + win.removeEventListener('message', func, false); + }, + + pub: function (topic, data, win) { + win = win || window; + win.postMessage(JSON.stringify({ + topic: topic, + data: data + }), origin); + } + }; +}); diff --git a/web/0.3.4/scripts/dotCompare.js b/web/0.3.4/scripts/dotCompare.js new file mode 100644 index 0000000..f94b374 --- /dev/null +++ b/web/0.3.4/scripts/dotCompare.js @@ -0,0 +1,61 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2, plusplus: false */ +/*global define: false, window: false, location: false */ +"use strict"; + +define([], function () { + + /** + * A function that compares two "x.x.x" version numbers, and returns: + * @param {String} a value of "x.x.x". + * @param {String} b value of "x.x.x". + * @returns Number that depends on the equality: + * -1 if a is less than b + * 0 if they are the same + * 1 if a is greater than b + */ + function dotCompare(a, b) { + a = a || "0"; + b = b || "0"; + a = a.split('.'); + b = b.split('.'); + var i, ap, bp, + length = a.length > b.length ? a.length : b.length; + + for (i = 0; i < length; i++) { + ap = parseInt(a[i] || "0", 10); + bp = parseInt(b[i] || "0", 10); + if (ap > bp) { + return 1; + } else if (ap < bp) { + return -1; + } + } + + return 0; + } + + return dotCompare; +}); diff --git a/web/0.3.4/scripts/fancyzoom.js b/web/0.3.4/scripts/fancyzoom.js new file mode 100644 index 0000000..173c87a --- /dev/null +++ b/web/0.3.4/scripts/fancyzoom.js @@ -0,0 +1,174 @@ +(function($){ +$.fn.fancyZoom = function(options){ + + var options = options || {}; + var directory = options && options.directory ? options.directory : 'images'; + var zooming = false; + + if ($('#zoom').length == 0) { + var ext = $.browser.msie ? 'gif' : 'png'; + var html = ''; + + $('body').append(html); + + $('html').click(function(e){if($(e.target).parents('#zoom:visible').length == 0) hide();}); + $(document).keyup(function(event){ + if (event.keyCode == 27 && $('#zoom:visible').length > 0) hide(); + }); + + $('#zoom_close').click(hide); + } + + var zoom = $('#zoom'); + var zoom_table = $('#zoom_table'); + var zoom_close = $('#zoom_close'); + var zoom_content = $('#zoom_content'); + var middle_row = $('td.ml,td.mm,td.mr'); + + this.each(function(i) { + $($(this).attr('href')).hide(); + $(this).click(show); + }); + + return this; + + function show(e) { + if (zooming) return false; + zooming = true; + var content_div = $($(this).attr('href')); + var zoom_width = options.width; + var zoom_height = options.height; + + var width = window.innerWidth || (window.document.documentElement.clientWidth || window.document.body.clientWidth); + var height = window.innerHeight || (window.document.documentElement.clientHeight || window.document.body.clientHeight); + var x = window.pageXOffset || (window.document.documentElement.scrollLeft || window.document.body.scrollLeft); + var y = window.pageYOffset || (window.document.documentElement.scrollTop || window.document.body.scrollTop); + var window_size = {'width':width, 'height':height, 'x':x, 'y':y} + + var width = (zoom_width || content_div.width()) + 60; + var height = (zoom_height || content_div.height()) + 60; + var d = window_size; + + // ensure that newTop is at least 0 so it doesn't hide close button + var newTop = Math.max((d.height/2) - (height/2) + y, 0); + var newLeft = (d.width/2) - (width/2); + var curTop = e.pageY; + var curLeft = e.pageX; + + zoom_close.attr('curTop', curTop); + zoom_close.attr('curLeft', curLeft); + zoom_close.attr('scaleImg', options.scaleImg ? 'true' : 'false'); + + $('#zoom').hide().css({ + position : 'absolute', + top : curTop + 'px', + left : curLeft + 'px', + width : '1px', + height : '1px' + }); + + fixBackgroundsForIE(); + zoom_close.hide(); + + if (options.closeOnClick) { + $('#zoom').click(hide); + } + + if (options.scaleImg) { + zoom_content.html(content_div.html()); + $('#zoom_content img').css('width', '100%'); + } else { + zoom_content.html(''); + } + + $('#zoom').animate({ + top : newTop + 'px', + left : newLeft + 'px', + opacity : "show", + width : width, + height : height + }, 100, null, function() { + if (options.scaleImg != true) { + zoom_content.html(content_div.html()); + } + unfixBackgroundsForIE(); + zoom_close.show(); + zooming = false; + }) + return false; + } + + function hide() { + if (zooming) return false; + zooming = true; + $('#zoom').unbind('click'); + fixBackgroundsForIE(); + if (zoom_close.attr('scaleImg') != 'true') { + zoom_content.html(''); + } + zoom_close.hide(); + $('#zoom').animate({ + top : zoom_close.attr('curTop') + 'px', + left : zoom_close.attr('curLeft') + 'px', + opacity : "hide", + width : '1px', + height : '1px' + }, 100, null, function() { + if (zoom_close.attr('scaleImg') == 'true') { + zoom_content.html(''); + } + unfixBackgroundsForIE(); + zooming = false; + }); + return false; + } + + function switchBackgroundImagesTo(to) { + $('#zoom_table td').each(function(i) { + var bg = $(this).css('background-image').replace(/\.(png|gif|none)\"\)$/, '.' + to + '")'); + $(this).css('background-image', bg); + }); + var close_img = zoom_close.children('img'); + var new_img = close_img.attr('src').replace(/\.(png|gif|none)$/, '.' + to); + close_img.attr('src', new_img); + } + + function fixBackgroundsForIE() { + if ($.browser.msie && parseFloat($.browser.version) >= 7) { + switchBackgroundImagesTo('gif'); + } + } + + function unfixBackgroundsForIE() { + if ($.browser.msie && $.browser.version >= 7) { + switchBackgroundImagesTo('png'); + } + } +} +})(jQuery); \ No newline at end of file diff --git a/web/0.3.4/scripts/friendly.js b/web/0.3.4/scripts/friendly.js new file mode 100644 index 0000000..5af1fd4 --- /dev/null +++ b/web/0.3.4/scripts/friendly.js @@ -0,0 +1,128 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint plusplus: false, nomen: false */ +/*global define: false */ +"use strict"; + +define(function () { + var friendly = { + timestamp: function (timestamp) { + return friendly.date(new Date(timestamp * 1000)); + }, + + date: function (date) { + var diff = (((new Date()).getTime() - date.getTime()) / 1000), + day_diff = Math.floor(diff / 86400), + dObj = { "friendly" : date.toLocaleDateString(), + "additional" : date.toLocaleTimeString(), + "utc" : date.toUTCString(), + "locale" : date.toLocaleString() }; + /* some kind of error */ + if (day_diff < 0) { + dObj.friendly = "in the future"; + return dObj; + } else if (isNaN(day_diff)) { + dObj.friendly = dObj.additional = "unknown"; + return dObj; + } + + if (day_diff === 0) { + if (diff < 60) { + dObj.friendly = "just now"; + return dObj; + } + if (diff < 120 + 30) { /* 1 minute plus some fuzz */ + dObj.friendly = "a minute ago"; + return dObj; + } + if (diff < 3600) { + dObj.friendly = Math.floor(diff / 60) + " minutes ago"; + return dObj; + } + if (diff < (60 * 60) * 2) { + dObj.friendly = "1 hour ago"; + return dObj; + } + if (diff < 24 * 60 * 60) { + dObj.friendly = Math.floor(diff / 3600) + " hours ago"; + return dObj; + } + } + if (day_diff === 1) { + dObj.friendly = "yesterday"; + return dObj; + } + if (day_diff < 7) { + dObj.friendly = day_diff + " days ago"; + return dObj; + } + if (day_diff < 8) { + dObj.friendly = "last week"; + return dObj; + } + /* for this scope: we want day of week and the date + plus the month (if different) */ + if (day_diff < 31) { + dObj.friendly = Math.ceil(day_diff / 7) + " weeks ago"; + return dObj; + } + + /* for this scope: we want month + date */ + if (day_diff < 62) { + dObj.friendly = "a month ago"; + return dObj; + } + if (day_diff < 365) { + dObj.friendly = Math.ceil(day_diff / 31) + " months ago"; + return dObj; + } + + /* for this scope: we want month + year */ + if (day_diff >= 365 && day_diff < 730) { + dObj.additional = date.toLocaleDateString(); + dObj.friendly = "a year ago"; + return dObj; + } + if (day_diff >= 365) { + dObj.additional = date.toLocaleDateString(); + dObj.friendly = Math.ceil(day_diff / 365) + " years ago"; + return dObj; + } + return dObj; + }, + + name: function (name) { + var firstName = name.split(' ')[0]; + if (firstName.indexOf('@') !== -1) { + firstName = firstName.split('@')[0]; + } + firstName = firstName.replace(" ", ""); + firstName = firstName.replace("'", ""); + firstName = firstName.replace('"', ""); + return firstName; + } + }; + + return friendly; +}); diff --git a/web/0.3.4/scripts/hashDispatch.js b/web/0.3.4/scripts/hashDispatch.js new file mode 100644 index 0000000..f284ac8 --- /dev/null +++ b/web/0.3.4/scripts/hashDispatch.js @@ -0,0 +1,65 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +'use strict'; +/*jslint nomen: false */ +/*global define: false, location: true, window: false */ + +define([], function () { + + /** + * Registers an object to receive hash changes. Expects the object + * to have property names that match the hash values. + * It will call the actions object immediately if the current hash + * matches a method on the object. + * + * @param {Object} actions the object that has property names that + * map to hash values and values for the properties are functions + * to be called. The name '_default' is used for any default action + * (one that corresponds to no hash value). A name of '_catchAll' is + * used to catch hash changes that do not map to a specific named + * action on the actions object. + */ + return function hashDispatch(actions) { + + function hashUpdated() { + var hash = (location.href.split('#')[1] || '_default'), + arg, index; + //Only use the part of the hash before a colon to find the action + index = hash.indexOf(':'); + if (index !== -1) { + arg = hash.substring(index + 1, hash.length); + hash = hash.substring(0, index); + } + + if (hash in actions) { + actions[hash](arg); + } else if (actions._catchAll) { + actions._catchAll(hash, arg); + } + } + + hashUpdated(); + window.addEventListener('hashchange', hashUpdated, false); + }; +}); diff --git a/web/0.3.4/scripts/iscroll-min.js b/web/0.3.4/scripts/iscroll-min.js new file mode 100644 index 0000000..78e8b55 --- /dev/null +++ b/web/0.3.4/scripts/iscroll-min.js @@ -0,0 +1 @@ +(function(){function a(f,c){this.element=typeof f=="object"?f:document.getElementById(f);this.wrapper=this.element.parentNode;this.is3d=("m11" in new WebKitCSSMatrix());var e="-webkit-transition-property:-webkit-transform;-webkit-transition-timing-function:cubic-bezier(0,0,0.25,1);-webkit-transition-duration:0;-webkit-transform:"+(this.is3d?"translate3d(0,0,0)":"translate(0,0)");this.element.setAttribute("style",e);this.options={bounce:this.is3d,momentum:this.is3d,checkDOMChanges:true,topOnDOMChanges:false,hScrollBar:true,vScrollBar:true,overflow:"auto"};if(typeof c=="object"){for(var d in c){this.options[d]=c[d]}}this.wrapper.style.overflow=this.options.overflow;this.refresh();window.addEventListener("orientationchange",this,false);this.element.addEventListener("touchstart",this,false);if(this.options.checkDOMChanges){this.element.addEventListener("DOMSubtreeModified",this,false)}}a.prototype={x:0,y:0,scrollBarTimeout:null,handleEvent:function(c){switch(c.type){case"touchstart":this.touchStart(c);break;case"touchmove":this.touchMove(c);break;case"touchend":this.touchEnd(c);break;case"webkitTransitionEnd":this.transitionEnd(c);break;case"orientationchange":this.refresh();break;case"DOMSubtreeModified":this.onDOMModified(c);break}},onDOMModified:function(c){this.refresh();if(this.options.topOnDOMChanges&&(this.x!=0||this.y!=0)){this.scrollTo(0,0,"0")}},refresh:function(){this.scrollWidth=this.wrapper.clientWidth;this.scrollHeight=this.wrapper.clientHeight;this.maxScrollX=this.scrollWidth-this.element.offsetWidth;this.maxScrollY=this.scrollHeight-this.element.offsetHeight;var d=this.x,c=this.y;if(this.scrollX){if(this.maxScrollX>=0){d=0}else{if(this.x=0){c=0}else{if(this.ythis.scrollWidth?true:false;this.scrollY=this.element.offsetHeight>this.scrollHeight?true:false;if(this.options.hScrollBar&&this.scrollX){this.scrollBarX=(this.scrollBarX instanceof b)?this.scrollBarX:new b("horizontal",this.wrapper);this.scrollBarX.init(this.scrollWidth,this.element.offsetWidth)}else{if(this.scrollBarX){this.scrollBarX=this.scrollBarX.remove()}}if(this.options.vScrollBar&&this.scrollY){this.scrollBarY=(this.scrollBarY instanceof b)?this.scrollBarY:new b("vertical",this.wrapper);this.scrollBarY.init(this.scrollHeight,this.element.offsetHeight)}else{if(this.scrollBarY){this.scrollBarY=this.scrollBarY.remove()}}},setPosition:function(c,e,d){this.x=c;this.y=e;this.element.style.webkitTransform=this.is3d?"translate3d("+this.x+"px,"+this.y+"px,0px)":"translate("+this.x+"px,"+this.y+"px)";if(!d){if(this.scrollBarX){this.scrollBarX.setPosition(this.x)}if(this.scrollBarY){this.scrollBarY.setPosition(this.y)}}},setTransitionTime:function(c){c=c||"0";this.element.style.webkitTransitionDuration=c;if(this.scrollBarX){this.scrollBarX.bar.style.webkitTransitionDuration=c+(this.is3d?",200ms":"")}if(this.scrollBarY){this.scrollBarY.bar.style.webkitTransitionDuration=c+(this.is3d?",200ms":"")}},touchStart:function(d){if(d.targetTouches.length!=1){return false}d.preventDefault();d.stopPropagation();this.setTransitionTime();if(this.options.momentum){var c=new WebKitCSSMatrix(window.getComputedStyle(this.element).webkitTransform);if(c.e!=this.x||c.f!=this.y){this.element.removeEventListener("webkitTransitionEnd",this,false);this.setPosition(c.e,c.f)}}if(this.scrollBarTimeout){clearTimeout(this.scrollBarTimeout);this.scrollBarTimeout=null}this.touchStartX=d.touches[0].pageX;this.scrollStartX=this.x;this.touchStartY=d.touches[0].pageY;this.scrollStartY=this.y;this.scrollStartTime=d.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false)},touchMove:function(g){if(g.targetTouches.length!=1){return false}var d=this.scrollX===true?g.touches[0].pageX-this.touchStartX:0,c=this.scrollY===true?g.touches[0].pageY-this.touchStartY:0,h=this.x+d,f=this.y+c;if(h>0||h0||f250){this.scrollStartX=this.x;this.scrollStartY=this.y;this.scrollStartTime=g.timeStamp}},touchEnd:function(j){this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);var g=j.timeStamp-this.scrollStartTime;if(!this.moved){this.resetPosition();var k=j.changedTouches[0].target;while(k.nodeType!=1){k=k.parentNode}var l=document.createEvent("MouseEvents");l.initMouseEvent("click",true,true,j.view,1,k.screenX,k.screenY,k.clientX,k.clientY,j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,0,null);k.dispatchEvent(l);return false}if(!this.options.momentum||g>250){this.resetPosition();return false}var d=this.scrollX===true?this.momentum(this.x-this.scrollStartX,g,this.options.bounce?-this.x+this.scrollWidth/3:-this.x,this.options.bounce?this.x+this.element.offsetWidth-this.scrollWidth+this.scrollWidth/3:this.x+this.element.offsetWidth-this.scrollWidth):{dist:0,time:0};var c=this.scrollY===true?this.momentum(this.y-this.scrollStartY,g,this.options.bounce?-this.y+this.scrollHeight/3:-this.y,this.options.bounce?this.y+this.element.offsetHeight-this.scrollHeight+this.scrollHeight/3:this.y+this.element.offsetHeight-this.scrollHeight):{dist:0,time:0};if(!d.dist&&!c.dist){this.resetPosition();return false}var f=Math.max(Math.max(d.time,c.time),1);var i=this.x+d.dist;var h=this.y+c.dist;this.scrollTo(i,h,f+"ms")},transitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.resetPosition()},resetPosition:function(e){var f=this.x,d=this.y,c=this,e=e||"600ms";if(this.x>=0){f=0}else{if(this.x=0){d=0}else{if(this.y0&&f>h){e=e*h/f;f=h}if(j<0&&f>c){e=e*c/f;f=c}f=f*(j<0?-1:1);k=e/i;return{dist:Math.round(f),time:Math.round(k)}}};var b=function(c,e){this.is3d=("m11" in new WebKitCSSMatrix());this.dir=c;this.bar=document.createElement("div");this.bar.className="scrollbar "+c;var d="-webkit-transition-timing-function:cubic-bezier(0,0,0.25,1);pointer-events:none;opacity:0;"+(this.is3d?"-webkit-transition-duration:0,200ms;-webkit-transition-property:-webkit-transform,opacity;-webkit-transform:translate3d(0,0,0)":"-webkit-transition-duration:0;-webkit-transition-property:webkit-transform;-webkit-transform:translate(0,0)");this.bar.setAttribute("style",d);e.appendChild(this.bar)};b.prototype={init:function(c,d){var e=this.dir=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=c-8;this.size=Math.round(this.maxSize*this.maxSize/d)+e;this.maxScroll=this.maxSize-this.size;this.toWrapperProp=this.maxScroll/(c-d);this.bar.style[this.dir=="horizontal"?"width":"height"]=(this.size-e)+"px"},setPosition:function(d,c){if(!c&&this.bar.style.opacity!="1"){this.show()}d=this.toWrapperProp*d;if(d<0){d=0}else{if(d>this.maxScroll){d=this.maxScroll}}if(this.is3d){d=this.dir=="horizontal"?"translate3d("+Math.round(d)+"px,0,0)":"translate3d(0,"+Math.round(d)+"px,0)"}else{d=this.dir=="horizontal"?"translate("+Math.round(d)+"px,0)":"translate(0,"+Math.round(d)+"px)"}this.bar.style.webkitTransform=d},show:function(){this.bar.style.opacity="1"},hide:function(){this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};window.iScroll=a})(); \ No newline at end of file diff --git a/web/0.3.4/scripts/isoDate.js b/web/0.3.4/scripts/isoDate.js new file mode 100644 index 0000000..971da08 --- /dev/null +++ b/web/0.3.4/scripts/isoDate.js @@ -0,0 +1,172 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +//Ported directly from dojo.date.stamp +'use strict'; +/*jslint nomen: false, regexp: false, plusplus: false */ +/*global require: false */ + +define([], function () { + + // Methods to convert dates to or from a wire (string) format using well-known conventions + var _isoRegExp = /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+\-](\d{2}):(\d{2}))|Z)?)?$/, + + isoDate = function (/*String*/formattedString, /*Number?*/defaultTime) { + // summary: + // Returns a Date object given a string formatted according to a subset of the ISO-8601 standard. + // + // description: + // Accepts a string formatted according to a profile of ISO8601 as defined by + // [RFC3339](http://www.ietf.org/rfc/rfc3339.txt), except that partial input is allowed. + // Can also process dates as specified [by the W3C](http://www.w3.org/TR/NOTE-datetime) + // The following combinations are valid: + // + // * dates only + // | * yyyy + // | * yyyy-MM + // | * yyyy-MM-dd + // * times only, with an optional time zone appended + // | * THH:mm + // | * THH:mm:ss + // | * THH:mm:ss.SSS + // * and "datetimes" which could be any combination of the above + // + // timezones may be specified as Z (for UTC) or +/- followed by a time expression HH:mm + // Assumes the local time zone if not specified. Does not validate. Improperly formatted + // input may return null. Arguments which are out of bounds will be handled + // by the Date constructor (e.g. January 32nd typically gets resolved to February 1st) + // Only years between 100 and 9999 are supported. + // + // formattedString: + // A string such as 2005-06-30T08:05:00-07:00 or 2005-06-30 or T08:05:00 + // + // defaultTime: + // Used for defaults for fields omitted in the formattedString. + // Uses 1970-01-01T00:00:00.0Z by default. + + var match = _isoRegExp.exec(formattedString), + result = null, offset, zoneSign; + + if (match) { + match.shift(); + if (match[1]) { + match[1]--; // Javascript Date months are 0-based + } + if (match[6]) { + match[6] *= 1000; // Javascript Date expects fractional seconds as milliseconds + } + + if (defaultTime) { + // mix in defaultTime. Relatively expensive, so use || operators for the fast path of defaultTime === 0 + defaultTime = new Date(defaultTime); + ["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds"].map(function (prop) { + return defaultTime["get" + prop](); + }).forEach(function (value, index) { + match[index] = match[index] || value; + }); + } + result = new Date(match[0] || 1970, match[1] || 0, match[2] || 1, match[3] || 0, match[4] || 0, match[5] || 0, match[6] || 0); //TODO: UTC defaults + if (match[0] < 100) { + result.setFullYear(match[0] || 1970); + } + + offset = 0; + zoneSign = match[7] && match[7].charAt(0); + if (zoneSign !== 'Z') { + offset = ((match[8] || 0) * 60) + (Number(match[9]) || 0); + if (zoneSign !== '-') { + offset *= -1; + } + } + if (zoneSign) { + offset -= result.getTimezoneOffset(); + } + if (offset) { + result.setTime(result.getTime() + offset * 60000); + } + } + + return result; // Date or null + }; + + /*===== + __Options = function(){ + // selector: String + // "date" or "time" for partial formatting of the Date object. + // Both date and time will be formatted by default. + // zulu: Boolean + // if true, UTC/GMT is used for a timezone + // milliseconds: Boolean + // if true, output milliseconds + this.selector = selector; + this.zulu = zulu; + this.milliseconds = milliseconds; + } + =====*/ + + isoDate.toIsoString = function (/*Date*/dateObject, /*__Options?*/options) { + // summary: + // Format a Date object as a string according a subset of the ISO-8601 standard + // + // description: + // When options.selector is omitted, output follows [RFC3339](http://www.ietf.org/rfc/rfc3339.txt) + // The local time zone is included as an offset from GMT, except when selector=='time' (time without a date) + // Does not check bounds. Only years between 100 and 9999 are supported. + // + // dateObject: + // A Date object + + var _ = function (n) { + return (n < 10) ? "0" + n : n; + }, + formattedDate, getter, date, year, time, millis, timezoneOffset, absOffset; + options = options || {}; + formattedDate = []; + getter = options.zulu ? "getUTC" : "get"; + date = ""; + if (options.selector !== "time") { + year = dateObject[getter + "FullYear"](); + date = ["0000".substr((year + "").length) + year, _(dateObject[getter + "Month"]() + 1), _(dateObject[getter + "Date"]())].join('-'); + } + formattedDate.push(date); + if (options.selector !== "date") { + time = [_(dateObject[getter + "Hours"]()), _(dateObject[getter + "Minutes"]()), _(dateObject[getter + "Seconds"]())].join(':'); + millis = dateObject[getter + "Milliseconds"](); + if (options.milliseconds) { + time += "." + (millis < 100 ? "0" : "") + _(millis); + } + if (options.zulu) { + time += "Z"; + } else if (options.selector !== "time") { + timezoneOffset = dateObject.getTimezoneOffset(); + absOffset = Math.abs(timezoneOffset); + time += (timezoneOffset > 0 ? "-" : "+") + + _(Math.floor(absOffset / 60)) + ":" + _(absOffset % 60); + } + formattedDate.push(time); + } + return formattedDate.join('T'); // String + }; + + return isoDate; +}); \ No newline at end of file diff --git a/web/0.3.4/scripts/jquery-ui-1.8.6.custom.min.js b/web/0.3.4/scripts/jquery-ui-1.8.6.custom.min.js new file mode 100755 index 0000000..0350d72 --- /dev/null +++ b/web/0.3.4/scripts/jquery-ui-1.8.6.custom.min.js @@ -0,0 +1,68 @@ +/*! + * jQuery UI 1.8.6 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.6",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, +NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this, +"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position"); +if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f, +"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h, +d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}}); +c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a

",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& +e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= +d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| +(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a._sanitizeSelector(i));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=d("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(c.selected>=0&&this.anchors.length){d(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],d(a._sanitizeSelector(a.anchors[c.selected].hash))))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ +g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", +function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; +this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=d(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=-1;c.cookie&& +a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= +d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, +e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=d("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); +j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); +if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, +this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, +load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){d(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,"cache.tabs", +true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(b, +e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k=0)&&b(g).is(":focusable")}}); +b(function(){var g=document.body,e=g.appendChild(e=document.createElement("div"));b.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=e.offsetHeight===100;b.support.selectstart="onselectstart"in e;g.removeChild(e).style.display="none"});b.extend(b.ui,{plugin:{add:function(g,e,a){g=b.ui[g].prototype;for(var d in a){g.plugins[d]=g.plugins[d]||[];g.plugins[d].push([e,a[d]])}},call:function(g,e,a){if((e=g.plugins[e])&&g.element[0].parentNode)for(var d=0;d0)return true;g[e]=1;a=g[e]>0;g[e]=0;return a},isOverAxis:function(g,e,a){return g>e&&g=9)&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c); +return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;c.target==this._mouseDownEvent.target&&b.data(c.target,this.widgetName+".preventClickEvent", +true);this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +(function(b){b.widget("ui.draggable",b.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(c){var f= +this.options;if(this.helper||f.disabled||b(c.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(c);if(!this.handle)return false;return true},_mouseStart:function(c){var f=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(b.ui.ddmanager)b.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top- +this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);f.containment&&this._setContainment();if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions(); +b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,f){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!f){f=this._uiHash();if(this._trigger("drag",c,f)===false){this._mouseUp({});return false}this.position=f.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis|| +this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);return false},_mouseStop:function(c){var f=false;if(b.ui.ddmanager&&!this.options.dropBehaviour)f=b.ui.ddmanager.drop(this,c);if(this.dropped){f=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!f||this.options.revert=="valid"&&f||this.options.revert===true||b.isFunction(this.options.revert)&&this.options.revert.call(this.element, +f)){var g=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){g._trigger("stop",c)!==false&&g._clear()})}else this._trigger("stop",c)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var f=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== +c.target)f=true});return f},_createHelper:function(c){var f=this.options;c=b.isFunction(f.helper)?b(f.helper.apply(this.element[0],[c])):f.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(f.appendTo=="parent"?this.element[0].parentNode:f.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]|| +0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0], +this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top- +(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment== +"parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[(c.containment=="document"?0:b(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(c.containment=="document"?0:b(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(c.containment=="document"?0:b(window).scrollLeft())+b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c.containment=="document"? +0:b(window).scrollTop())+(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)&&c.containment.constructor!=Array){var f=b(c.containment)[0];if(f){c=b(c.containment).offset();var g=b(f).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(f).css("borderLeftWidth"),10)||0)+(parseInt(b(f).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(f).css("borderTopWidth"), +10)||0)+(parseInt(b(f).css("paddingTop"),10)||0)-this.margins.top,c.left+(g?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(b(f).css("borderLeftWidth"),10)||0)-(parseInt(b(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(g?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(b(f).css("borderTopWidth"),10)||0)-(parseInt(b(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(c.containment.constructor== +Array)this.containment=c.containment},_convertPositionTo:function(c,f){if(!f)f=this.position;c=c=="absolute"?1:-1;var g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);return{top:f.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): +e?0:g.scrollTop())*c),left:f.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())*c)}},_generatePosition:function(c){var f=this.options,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName),a=c.pageX,d=c.pageY; +if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.leftthis.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])d=this.containment[3]+this.offset.click.top}if(f.grid){d=this.originalPageY+Math.round((d-this.originalPageY)/ +f.grid[1])*f.grid[1];d=this.containment?!(d-this.offset.click.topthis.containment[3])?d:!(d-this.offset.click.topthis.containment[2])?a:!(a-this.offset.click.left
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(b(this).offset()).appendTo("body")})}, +stop:function(){b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(c,f){c=b(f.helper);f=b(this).data("draggable").options;if(c.css("opacity"))f._opacity=c.css("opacity");c.css("opacity",f.opacity)},stop:function(c,f){c=b(this).data("draggable").options;c._opacity&&b(f.helper).css("opacity",c._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(){var c=b(this).data("draggable");if(c.scrollParent[0]!= +document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var f=b(this).data("draggable"),g=f.options,e=false;if(f.scrollParent[0]!=document&&f.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x")if(f.overflowOffset.top+f.scrollParent[0].offsetHeight-c.pageY=0;n--){var q=g.snapElements[n].left,l=q+g.snapElements[n].width,k=g.snapElements[n].top,m=k+g.snapElements[n].height;if(q-a=n&&d<=q||h>=n&&h<=q||dq)&&(e>= +i&&e<=j||a>=i&&a<=j||ej);default:return false}};b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,f){var g=b.ui.ddmanager.droppables[c.options.scope]||[],e=f?f.type:null,a=(c.currentItem||c.element).find(":data(droppable)").andSelf(),d=0;a:for(;d').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=e.handles||(!b(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var a=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(h)&&i.css({zIndex:++e.zIndex});"se"==h&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(i)}}this._renderAxis=function(j){j=j||this.element;for(var n in this.handles){if(this.handles[n].constructor== +String)this.handles[n]=b(this.handles[n],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=b(this.handles[n],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(n)?q.outerHeight():q.outerWidth();q=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");j.css(q,l);this._proportionallyResize()}b(this.handles[n])}};this._renderAxis(this.element);this._handles=b(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!g.resizing){if(this.className)var j=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);g.axis=j&&j[1]?j[1]:"se"}});if(e.autoHide){this._handles.hide();b(this.element).addClass("ui-resizable-autohide").hover(function(){b(this).removeClass("ui-resizable-autohide");g._handles.show()},function(){if(!g.resizing){b(this).addClass("ui-resizable-autohide");g._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var g=function(a){b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; +if(this.elementIsWrapper){g(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);g(this.originalElement);return this},_mouseCapture:function(g){var e=false;for(var a in this.handles)if(b(this.handles[a])[0]==g.target)e=true;return!this.options.disabled&&e},_mouseStart:function(g){var e=this.options,a=this.element.position(), +d=this.element;this.resizing=true;this.documentScroll={top:b(document).scrollTop(),left:b(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:a.top,left:a.left});b.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();a=c(this.helper.css("left"));var h=c(this.helper.css("top"));if(e.containment){a+=b(e.containment).scrollLeft()||0;h+=b(e.containment).scrollTop()||0}this.offset= +this.helper.offset();this.position={left:a,top:h};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:a,top:h};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=typeof e.aspectRatio=="number"?e.aspectRatio: +this.originalSize.width/this.originalSize.height||1;e=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor",e=="auto"?this.axis+"-resize":e);d.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(g){var e=this.helper,a=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;a=d.apply(this,[g,g.pageX-a.left||0,g.pageY-a.top||0]);if(this._aspectRatio||g.shiftKey)a=this._updateRatio(a,g);a=this._respectSize(a,g);this._propagate("resize", +g);e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(a);this._trigger("resize",g,this.ui());return false},_mouseStop:function(g){this.resizing=false;var e=this.options,a=this;if(this._helper){var d=this._proportionallyResizeElements,h=d.length&&/textarea/i.test(d[0].nodeName);d=h&&b.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height; +h={width:a.size.width-(h?0:a.sizeDiff.width),height:a.size.height-d};d=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var i=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;e.animate||this.element.css(b.extend(h,{top:i,left:d}));a.helper.height(a.size.height);a.helper.width(a.size.width);this._helper&&!e.animate&&this._proportionallyResize()}b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop", +g);this._helper&&this.helper.remove();return false},_updateCache:function(g){this.offset=this.helper.offset();if(f(g.left))this.position.left=g.left;if(f(g.top))this.position.top=g.top;if(f(g.height))this.size.height=g.height;if(f(g.width))this.size.width=g.width},_updateRatio:function(g){var e=this.position,a=this.size,d=this.axis;if(g.height)g.width=a.height*this.aspectRatio;else if(g.width)g.height=a.width/this.aspectRatio;if(d=="sw"){g.left=e.left+(a.width-g.width);g.top=null}if(d=="nw"){g.top= +e.top+(a.height-g.height);g.left=e.left+(a.width-g.width)}return g},_respectSize:function(g){var e=this.options,a=this.axis,d=f(g.width)&&e.maxWidth&&e.maxWidthg.width,j=f(g.height)&&e.minHeight&&e.minHeight>g.height;if(i)g.width=e.minWidth;if(j)g.height=e.minHeight;if(d)g.width=e.maxWidth;if(h)g.height=e.maxHeight;var n=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height, +l=/sw|nw|w/.test(a);a=/nw|ne|n/.test(a);if(i&&l)g.left=n-e.minWidth;if(d&&l)g.left=n-e.maxWidth;if(j&&a)g.top=q-e.minHeight;if(h&&a)g.top=q-e.maxHeight;if((e=!g.width&&!g.height)&&!g.left&&g.top)g.top=null;else if(e&&!g.top&&g.left)g.left=null;return g},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var g=this.helper||this.element,e=0;e');var e=b.browser.msie&&b.browser.version<7,a=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-a+"px",top:this.elementOffset.top-a+"px",zIndex:++g.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(g,e){return{width:this.originalSize.width+ +e}},w:function(g,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(g,e,a){return{top:this.originalPosition.top+a,height:this.originalSize.height-a}},s:function(g,e,a){return{height:this.originalSize.height+a}},se:function(g,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,e,a]))},sw:function(g,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,e,a]))},ne:function(g,e,a){return b.extend(this._change.n.apply(this, +arguments),this._change.e.apply(this,[g,e,a]))},nw:function(g,e,a){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,e,a]))}},_propagate:function(g,e){b.ui.plugin.call(this,g,[e,this.ui()]);g!="resize"&&this._trigger(g,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});b.extend(b.ui.resizable, +{version:"1.8.7"});b.ui.plugin.add("resizable","alsoResize",{start:function(){var g=b(this).data("resizable").options,e=function(a){b(a).each(function(){var d=b(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof g.alsoResize=="object"&&!g.alsoResize.parentNode)if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];e(g.alsoResize)}else b.each(g.alsoResize, +function(a){e(a)});else e(g.alsoResize)},resize:function(g,e){var a=b(this).data("resizable");g=a.options;var d=a.originalSize,h=a.originalPosition,i={height:a.size.height-d.height||0,width:a.size.width-d.width||0,top:a.position.top-h.top||0,left:a.position.left-h.left||0},j=function(n,q){b(n).each(function(){var l=b(this),k=b(this).data("resizable-alsoresize"),m={},o=q&&q.length?q:l.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];b.each(o,function(p,s){if((p= +(k[s]||0)+(i[s]||0))&&p>=0)m[s]=p||null});if(b.browser.opera&&/relative/.test(l.css("position"))){a._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(m)})};typeof g.alsoResize=="object"&&!g.alsoResize.nodeType?b.each(g.alsoResize,function(n,q){j(n,q)}):j(g.alsoResize)},stop:function(){var g=b(this).data("resizable"),e=g.options,a=function(d){b(d).each(function(){var h=b(this);h.css({position:h.data("resizable-alsoresize").position})})};if(g._revertToRelativePosition){g._revertToRelativePosition= +false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?b.each(e.alsoResize,function(d){a(d)}):a(e.alsoResize)}b(this).removeData("resizable-alsoresize")}});b.ui.plugin.add("resizable","animate",{stop:function(g){var e=b(this).data("resizable"),a=e.options,d=e._proportionallyResizeElements,h=d.length&&/textarea/i.test(d[0].nodeName),i=h&&b.ui.hasScroll(d[0],"left")?0:e.sizeDiff.height;h={width:e.size.width-(h?0:e.sizeDiff.width),height:e.size.height-i};i=parseInt(e.element.css("left"),10)+(e.position.left- +e.originalPosition.left)||null;var j=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(b.extend(h,j&&i?{top:j,left:i}:{}),{duration:a.animateDuration,easing:a.animateEasing,step:function(){var n={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};d&&d.length&&b(d[0]).css({width:n.width,height:n.height});e._updateCache(n);e._propagate("resize", +g)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var g=b(this).data("resizable"),e=g.element,a=g.options.containment;if(e=a instanceof b?a.get(0):/parent/.test(a)?e.parent().get(0):a){g.containerElement=b(e);if(/document/.test(a)||a==document){g.containerOffset={left:0,top:0};g.containerPosition={left:0,top:0};g.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}}else{var d=b(e),h=[];b(["Top", +"Right","Left","Bottom"]).each(function(n,q){h[n]=c(d.css("padding"+q))});g.containerOffset=d.offset();g.containerPosition=d.position();g.containerSize={height:d.innerHeight()-h[3],width:d.innerWidth()-h[1]};a=g.containerOffset;var i=g.containerSize.height,j=g.containerSize.width;j=b.ui.hasScroll(e,"left")?e.scrollWidth:j;i=b.ui.hasScroll(e)?e.scrollHeight:i;g.parentData={element:e,left:a.left,top:a.top,width:j,height:i}}}},resize:function(g){var e=b(this).data("resizable"),a=e.options,d=e.containerOffset, +h=e.position;g=e._aspectRatio||g.shiftKey;var i={top:0,left:0},j=e.containerElement;if(j[0]!=document&&/static/.test(j.css("position")))i=d;if(h.left<(e._helper?d.left:0)){e.size.width+=e._helper?e.position.left-d.left:e.position.left-i.left;if(g)e.size.height=e.size.width/a.aspectRatio;e.position.left=a.helper?d.left:0}if(h.top<(e._helper?d.top:0)){e.size.height+=e._helper?e.position.top-d.top:e.position.top;if(g)e.size.width=e.size.height*a.aspectRatio;e.position.top=e._helper?d.top:0}e.offset.left= +e.parentData.left+e.position.left;e.offset.top=e.parentData.top+e.position.top;a=Math.abs((e._helper?e.offset.left-i.left:e.offset.left-i.left)+e.sizeDiff.width);d=Math.abs((e._helper?e.offset.top-i.top:e.offset.top-d.top)+e.sizeDiff.height);h=e.containerElement.get(0)==e.element.parent().get(0);i=/relative|absolute/.test(e.containerElement.css("position"));if(h&&i)a-=e.parentData.left;if(a+e.size.width>=e.parentData.width){e.size.width=e.parentData.width-a;if(g)e.size.height=e.size.width/e.aspectRatio}if(d+ +e.size.height>=e.parentData.height){e.size.height=e.parentData.height-d;if(g)e.size.width=e.size.height*e.aspectRatio}},stop:function(){var g=b(this).data("resizable"),e=g.options,a=g.containerOffset,d=g.containerPosition,h=g.containerElement,i=b(g.helper),j=i.offset(),n=i.outerWidth()-g.sizeDiff.width;i=i.outerHeight()-g.sizeDiff.height;g._helper&&!e.animate&&/relative/.test(h.css("position"))&&b(this).css({left:j.left-d.left-a.left,width:n,height:i});g._helper&&!e.animate&&/static/.test(h.css("position"))&& +b(this).css({left:j.left-d.left-a.left,width:n,height:i})}});b.ui.plugin.add("resizable","ghost",{start:function(){var g=b(this).data("resizable"),e=g.options,a=g.size;g.ghost=g.originalElement.clone();g.ghost.css({opacity:0.25,display:"block",position:"relative",height:a.height,width:a.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");g.ghost.appendTo(g.helper)},resize:function(){var g=b(this).data("resizable");g.ghost&&g.ghost.css({position:"relative", +height:g.size.height,width:g.size.width})},stop:function(){var g=b(this).data("resizable");g.ghost&&g.helper&&g.helper.get(0).removeChild(g.ghost.get(0))}});b.ui.plugin.add("resizable","grid",{resize:function(){var g=b(this).data("resizable"),e=g.options,a=g.size,d=g.originalSize,h=g.originalPosition,i=g.axis;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var j=Math.round((a.width-d.width)/(e.grid[0]||1))*(e.grid[0]||1);e=Math.round((a.height-d.height)/(e.grid[1]||1))*(e.grid[1]||1);if(/^(se|s|e)$/.test(i)){g.size.width= +d.width+j;g.size.height=d.height+e}else if(/^(ne)$/.test(i)){g.size.width=d.width+j;g.size.height=d.height+e;g.position.top=h.top-e}else{if(/^(sw)$/.test(i)){g.size.width=d.width+j;g.size.height=d.height+e}else{g.size.width=d.width+j;g.size.height=d.height+e;g.position.top=h.top-e}g.position.left=h.left-j}}});var c=function(g){return parseInt(g,10)||0},f=function(g){return!isNaN(parseInt(g,10))}})(jQuery); +(function(b){b.widget("ui.selectable",b.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=b(c.options.filter,c.element[0]);f.each(function(){var g=b(this),e=g.offset();b.data(this,"selectable-item",{element:this,$element:g,left:e.left,top:e.top,right:e.left+g.outerWidth(),bottom:e.top+g.outerHeight(),startselected:false,selected:g.hasClass("ui-selected"), +selecting:g.hasClass("ui-selecting"),unselecting:g.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=b("
    ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, +c.pageY];if(!this.options.disabled){var g=this.options;this.selectees=b(g.filter,this.element[0]);this._trigger("start",c);b(g.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});g.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=b.data(this,"selectable-item");e.startselected=true;if(!c.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;f._trigger("unselecting", +c,{unselecting:e.element})}});b(c.target).parents().andSelf().each(function(){var e=b.data(this,"selectable-item");if(e){var a=!c.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(a?"ui-unselecting":"ui-selected").addClass(a?"ui-selecting":"ui-unselecting");e.unselecting=!a;e.selecting=a;(e.selected=a)?f._trigger("selecting",c,{selecting:e.element}):f._trigger("unselecting",c,{unselecting:e.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var g= +this.options,e=this.opos[0],a=this.opos[1],d=c.pageX,h=c.pageY;if(e>d){var i=d;d=e;e=i}if(a>h){i=h;h=a;a=i}this.helper.css({left:e,top:a,width:d-e,height:h-a});this.selectees.each(function(){var j=b.data(this,"selectable-item");if(!(!j||j.element==f.element[0])){var n=false;if(g.tolerance=="touch")n=!(j.left>d||j.righth||j.bottome&&j.righta&&j.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable"); +this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--)this.items[c].item.removeData("sortable-item");return this},_setOption:function(c,f){if(c==="disabled"){this.options[c]=f;this.widget()[f?"addClass":"removeClass"]("ui-sortable-disabled")}else b.Widget.prototype._setOption.apply(this, +arguments)},_mouseCapture:function(c,f){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(c);var g=null,e=this;b(c.target).parents().each(function(){if(b.data(this,"sortable-item")==e){g=b(this);return false}});if(b.data(c.target,"sortable-item")==e)g=b(c.target);if(!g)return false;if(this.options.handle&&!f){var a=false;b(this.options.handle,g).find("*").andSelf().each(function(){if(this==c.target)a=true});if(!a)return false}this.currentItem= +g;this._removeCurrentsFromItems();return true},_mouseStart:function(c,f,g){f=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(c);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");b.extend(this.offset, +{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();f.containment&&this._setContainment(); +if(f.cursor){if(b("body").css("cursor"))this._storedCursor=b("body").css("cursor");b("body").css("cursor",f.cursor)}if(f.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",f.opacity)}if(f.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",f.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start", +c,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!g)for(g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",c,e._uiHash(this));if(b.ui.ddmanager)b.ui.ddmanager.current=this;b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(c);return true},_mouseDrag:function(c){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute"); +if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var f=this.options,g=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY=0;f--){g=this.items[f];var e=g.item[0],a=this._intersectsWithPointer(g);if(a)if(e!=this.currentItem[0]&&this.placeholder[a==1?"next":"prev"]()[0]!=e&&!b.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!b.ui.contains(this.element[0],e):true)){this.direction=a==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(g))this._rearrange(c, +g);else break;this._trigger("change",c,this._uiHash());break}}this._contactContainers(c);b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);this._trigger("sort",c,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,f){if(c){b.ui.ddmanager&&!this.options.dropBehaviour&&b.ui.ddmanager.drop(this,c);if(this.options.revert){var g=this;f=g.placeholder.offset();g.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-g.margins.left+(this.offsetParent[0]== +document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-g.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){g._clear(c)})}else this._clear(c,f);return false}},cancel:function(){var c=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var f=this.containers.length-1;f>=0;f--){this.containers[f]._trigger("deactivate", +null,c._uiHash(this));if(this.containers[f].containerCache.over){this.containers[f]._trigger("out",null,c._uiHash(this));this.containers[f].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?b(this.domPosition.prev).after(this.currentItem): +b(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(c){var f=this._getItemsAsjQuery(c&&c.connected),g=[];c=c||{};b(f).each(function(){var e=(b(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[-=_](.+)/);if(e)g.push((c.key||e[1]+"[]")+"="+(c.key&&c.expression?e[1]:e[2]))});!g.length&&c.key&&g.push(c.key+"=");return g.join("&")},toArray:function(c){var f=this._getItemsAsjQuery(c&&c.connected),g=[];c=c||{};f.each(function(){g.push(b(c.item||this).attr(c.attribute|| +"id")||"")});return g},_intersectsWith:function(c){var f=this.positionAbs.left,g=f+this.helperProportions.width,e=this.positionAbs.top,a=e+this.helperProportions.height,d=c.left,h=d+c.width,i=c.top,j=i+c.height,n=this.offset.click.top,q=this.offset.click.left;n=e+n>i&&e+nd&&f+qc[this.floating?"width":"height"]?n:d0?"down":"up")}, +_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var f=[],g=[],e=this._connectWith();if(e&&c)for(c=e.length-1;c>=0;c--)for(var a=b(e[c]),d=a.length-1;d>=0;d--){var h=b.data(a[d],"sortable");if(h&&h!= +this&&!h.options.disabled)g.push([b.isFunction(h.options.items)?h.options.items.call(h.element):b(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}g.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(c=g.length-1;c>=0;c--)g[c][0].each(function(){f.push(this)});return b(f)},_removeCurrentsFromItems:function(){for(var c= +this.currentItem.find(":data(sortable-item)"),f=0;f=0;a--)for(var d=b(e[a]),h=d.length-1;h>=0;h--){var i=b.data(d[h],"sortable"); +if(i&&i!=this&&!i.options.disabled){g.push([b.isFunction(i.options.items)?i.options.items.call(i.element[0],c,{item:this.currentItem}):b(i.options.items,i.element),i]);this.containers.push(i)}}for(a=g.length-1;a>=0;a--){c=g[a][1];e=g[a][0];h=0;for(d=e.length;h= +0;f--){var g=this.items[f],e=this.options.toleranceElement?b(this.options.toleranceElement,g.item):g.item;if(!c){g.width=e.outerWidth();g.height=e.outerHeight()}e=e.offset();g.left=e.left;g.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(f=this.containers.length-1;f>=0;f--){e=this.containers[f].element.offset();this.containers[f].containerCache.left=e.left;this.containers[f].containerCache.top=e.top;this.containers[f].containerCache.width= +this.containers[f].element.outerWidth();this.containers[f].containerCache.height=this.containers[f].element.outerHeight()}return this},_createPlaceholder:function(c){var f=c||this,g=f.options;if(!g.placeholder||g.placeholder.constructor==String){var e=g.placeholder;g.placeholder={element:function(){var a=b(document.createElement(f.currentItem[0].nodeName)).addClass(e||f.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)a.style.visibility="hidden";return a}, +update:function(a,d){if(!(e&&!g.forcePlaceholderSize)){d.height()||d.height(f.currentItem.innerHeight()-parseInt(f.currentItem.css("paddingTop")||0,10)-parseInt(f.currentItem.css("paddingBottom")||0,10));d.width()||d.width(f.currentItem.innerWidth()-parseInt(f.currentItem.css("paddingLeft")||0,10)-parseInt(f.currentItem.css("paddingRight")||0,10))}}}}f.placeholder=b(g.placeholder.element.call(f.element,f.currentItem));f.currentItem.after(f.placeholder);g.placeholder.update(f,f.placeholder)},_contactContainers:function(c){for(var f= +null,g=null,e=this.containers.length-1;e>=0;e--)if(!b.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(f&&b.ui.contains(this.containers[e].element[0],f.element[0]))){f=this.containers[e];g=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",c,this._uiHash(this));this.containers[e].containerCache.over=0}if(f)if(this.containers.length===1){this.containers[g]._trigger("over",c,this._uiHash(this)); +this.containers[g].containerCache.over=1}else if(this.currentContainer!=this.containers[g]){f=1E4;e=null;for(var a=this.positionAbs[this.containers[g].floating?"left":"top"],d=this.items.length-1;d>=0;d--)if(b.ui.contains(this.containers[g].element[0],this.items[d].item[0])){var h=this.items[d][this.containers[g].floating?"left":"top"];if(Math.abs(h-a)this.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])d=this.containment[3]+this.offset.click.top}if(f.grid){d=this.originalPageY+Math.round((d-this.originalPageY)/f.grid[1])*f.grid[1];d=this.containment?!(d-this.offset.click.topthis.containment[3])? +d:!(d-this.offset.click.topthis.containment[2])?a:!(a-this.offset.click.left=0;e--)if(b.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!f){g.push(function(a){return function(d){a._trigger("receive", +d,this._uiHash(this))}}.call(this,this.containers[e]));g.push(function(a){return function(d){a._trigger("update",d,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){f||g.push(function(a){return function(d){a._trigger("deactivate",d,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){g.push(function(a){return function(d){a._trigger("out",d,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over= +0}}this._storedCursor&&b("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",c,this._uiHash());for(e=0;e").addClass("ui-effects-wrapper").css({fontSize:"100%", +background:"transparent",border:"none",margin:0,padding:0});l.wrap(m);m=l.parent();if(l.css("position")=="static"){m.css({position:"relative"});l.css({position:"relative"})}else{b.extend(k,{position:l.css("position"),zIndex:l.css("z-index")});b.each(["top","left","bottom","right"],function(o,p){k[p]=l.css(p);if(isNaN(parseInt(k[p],10)))k[p]="auto"});l.css({position:"relative",top:0,left:0})}return m.css(k).show()},removeWrapper:function(l){if(l.parent().is(".ui-effects-wrapper"))return l.parent().replaceWith(l); +return l},setTransition:function(l,k,m,o){o=o||{};b.each(k,function(p,s){unit=l.cssUnit(s);if(unit[0]>0)o[s]=unit[0]*m+unit[1]});return o}});b.fn.extend({effect:function(l){var k=h.apply(this,arguments),m={options:k[1],duration:k[2],callback:k[3]};k=m.options.mode;var o=b.effects[l];if(b.fx.off||!o)return k?this[k](m.duration,m.callback):this.each(function(){m.callback&&m.callback.call(this)});return o.call(this,m)},_show:b.fn.show,show:function(l){if(i(l))return this._show.apply(this,arguments); +else{var k=h.apply(this,arguments);k[1].mode="show";return this.effect.apply(this,k)}},_hide:b.fn.hide,hide:function(l){if(i(l))return this._hide.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="hide";return this.effect.apply(this,k)}},__toggle:b.fn.toggle,toggle:function(l){if(i(l)||typeof l==="boolean"||b.isFunction(l))return this.__toggle.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="toggle";return this.effect.apply(this,k)}},cssUnit:function(l){var k=this.css(l), +m=[];b.each(["em","px","%","pt"],function(o,p){if(k.indexOf(p)>0)m=[parseFloat(k),p]});return m}});b.easing.jswing=b.easing.swing;b.extend(b.easing,{def:"easeOutQuad",swing:function(l,k,m,o,p){return b.easing[b.easing.def](l,k,m,o,p)},easeInQuad:function(l,k,m,o,p){return o*(k/=p)*k+m},easeOutQuad:function(l,k,m,o,p){return-o*(k/=p)*(k-2)+m},easeInOutQuad:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k+m;return-o/2*(--k*(k-2)-1)+m},easeInCubic:function(l,k,m,o,p){return o*(k/=p)*k*k+m},easeOutCubic:function(l, +k,m,o,p){return o*((k=k/p-1)*k*k+1)+m},easeInOutCubic:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k+m;return o/2*((k-=2)*k*k+2)+m},easeInQuart:function(l,k,m,o,p){return o*(k/=p)*k*k*k+m},easeOutQuart:function(l,k,m,o,p){return-o*((k=k/p-1)*k*k*k-1)+m},easeInOutQuart:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k*k+m;return-o/2*((k-=2)*k*k*k-2)+m},easeInQuint:function(l,k,m,o,p){return o*(k/=p)*k*k*k*k+m},easeOutQuint:function(l,k,m,o,p){return o*((k=k/p-1)*k*k*k*k+1)+m},easeInOutQuint:function(l, +k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k*k*k+m;return o/2*((k-=2)*k*k*k*k+2)+m},easeInSine:function(l,k,m,o,p){return-o*Math.cos(k/p*(Math.PI/2))+o+m},easeOutSine:function(l,k,m,o,p){return o*Math.sin(k/p*(Math.PI/2))+m},easeInOutSine:function(l,k,m,o,p){return-o/2*(Math.cos(Math.PI*k/p)-1)+m},easeInExpo:function(l,k,m,o,p){return k==0?m:o*Math.pow(2,10*(k/p-1))+m},easeOutExpo:function(l,k,m,o,p){return k==p?m+o:o*(-Math.pow(2,-10*k/p)+1)+m},easeInOutExpo:function(l,k,m,o,p){if(k==0)return m;if(k== +p)return m+o;if((k/=p/2)<1)return o/2*Math.pow(2,10*(k-1))+m;return o/2*(-Math.pow(2,-10*--k)+2)+m},easeInCirc:function(l,k,m,o,p){return-o*(Math.sqrt(1-(k/=p)*k)-1)+m},easeOutCirc:function(l,k,m,o,p){return o*Math.sqrt(1-(k=k/p-1)*k)+m},easeInOutCirc:function(l,k,m,o,p){if((k/=p/2)<1)return-o/2*(Math.sqrt(1-k*k)-1)+m;return o/2*(Math.sqrt(1-(k-=2)*k)+1)+m},easeInElastic:function(l,k,m,o,p){l=1.70158;var s=0,r=o;if(k==0)return m;if((k/=p)==1)return m+o;s||(s=p*0.3);if(r").css({position:"absolute",visibility:"visible",left:-j*(d/g),top:-i*(h/f)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:d/g,height:h/f,left:a.left+j*(d/g)+(c.options.mode=="show"?(j-Math.floor(g/2))*(d/g):0),top:a.top+i*(h/f)+(c.options.mode=="show"?(i-Math.floor(f/2))*(h/f):0),opacity:c.options.mode=="show"?0:1}).animate({left:a.left+j*(d/g)+(c.options.mode=="show"?0:(j-Math.floor(g/2))*(d/g)),top:a.top+ +i*(h/f)+(c.options.mode=="show"?0:(i-Math.floor(f/2))*(h/f)),opacity:c.options.mode=="show"?1:0},c.duration||500);setTimeout(function(){c.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide();c.callback&&c.callback.apply(e[0]);e.dequeue();b("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery); +(function(b){b.effects.fade=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"hide");f.animate({opacity:g},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery); +(function(b){b.effects.fold=function(c){return this.queue(function(){var f=b(this),g=["position","top","left"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.size||15,d=!!c.options.horizFirst,h=c.duration?c.duration/2:b.fx.speeds._default/2;b.effects.save(f,g);f.show();var i=b.effects.createWrapper(f).css({overflow:"hidden"}),j=e=="show"!=d,n=j?["width","height"]:["height","width"];j=j?[i.width(),i.height()]:[i.height(),i.width()];var q=/([0-9]+)%/.exec(a);if(q)a=parseInt(q[1],10)/100* +j[e=="hide"?0:1];if(e=="show")i.css(d?{height:0,width:a}:{height:a,width:0});d={};q={};d[n[0]]=e=="show"?j[0]:a;q[n[1]]=e=="show"?j[1]:0;i.animate(d,h,c.options.easing).animate(q,h,c.options.easing,function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery); +(function(b){b.effects.highlight=function(c){return this.queue(function(){var f=b(this),g=["backgroundImage","backgroundColor","opacity"],e=b.effects.setMode(f,c.options.mode||"show"),a={backgroundColor:f.css("backgroundColor")};if(e=="hide")a.opacity=0;b.effects.save(f,g);f.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(a,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);e=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery); +(function(b){b.effects.pulsate=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"show");times=(c.options.times||5)*2-1;duration=c.duration?c.duration/2:b.fx.speeds._default/2;isVisible=f.is(":visible");animateTo=0;if(!isVisible){f.css("opacity",0).show();animateTo=1}if(g=="hide"&&isVisible||g=="show"&&!isVisible)times--;for(g=0;g').appendTo(document.body).addClass(c.options.className).css({top:e.top,left:e.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,c.duration,c.options.easing,function(){a.remove();c.callback&&c.callback.apply(f[0],arguments); +f.dequeue()})})}})(jQuery); +(function(b){b.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var c=this,f=c.options;c.running=0;c.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");c.headers= +c.element.find(f.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){f.disabled||b(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){f.disabled||b(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){f.disabled||b(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){f.disabled||b(this).removeClass("ui-state-focus")});c.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); +if(f.navigation){var g=c.element.find("a").filter(f.navigationFilter).eq(0);if(g.length){var e=g.closest(".ui-accordion-header");c.active=e.length?e:g.closest(".ui-accordion-content").prev()}}c.active=c._findActive(c.active||f.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");c.active.next().addClass("ui-accordion-content-active");c._createIcons();c.resize();c.element.attr("role","tablist");c.headers.attr("role","tab").bind("keydown.accordion", +function(a){return c._keydown(a)}).next().attr("role","tabpanel");c.headers.not(c.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();c.active.length?c.active.attr({"aria-expanded":"true",tabIndex:0}):c.headers.eq(0).attr("tabIndex",0);b.browser.safari||c.headers.find("a").attr("tabIndex",-1);f.event&&c.headers.bind(f.event.split(" ").join(".accordion ")+".accordion",function(a){c._clickHandler.call(c,a,this);a.preventDefault()})},_createIcons:function(){var c=this.options;if(c.icons){b("").addClass("ui-icon "+ +c.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex"); +this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var f=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(c.autoHeight||c.fillHeight)f.css("height","");return b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c=="active"&&this.activate(f);if(c=="icons"){this._destroyIcons(); +f&&this._createIcons()}if(c=="disabled")this.headers.add(this.headers.next())[f?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(c){if(!(this.options.disabled||c.altKey||c.ctrlKey)){var f=b.ui.keyCode,g=this.headers.length,e=this.headers.index(c.target),a=false;switch(c.keyCode){case f.RIGHT:case f.DOWN:a=this.headers[(e+1)%g];break;case f.LEFT:case f.UP:a=this.headers[(e-1+g)%g];break;case f.SPACE:case f.ENTER:this._clickHandler({target:c.target},c.target); +c.preventDefault()}if(a){b(c.target).attr("tabIndex",-1);b(a).attr("tabIndex",0);a.focus();return false}return true}},resize:function(){var c=this.options,f;if(c.fillSpace){if(b.browser.msie){var g=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}f=this.element.parent().height();b.browser.msie&&this.element.parent().css("overflow",g);this.headers.each(function(){f-=b(this).outerHeight(true)});this.headers.next().each(function(){b(this).height(Math.max(0,f-b(this).innerHeight()+ +b(this).height()))}).css("overflow","auto")}else if(c.autoHeight){f=0;this.headers.next().each(function(){f=Math.max(f,b(this).height("").height())}).height(f)}return this},activate:function(c){this.options.active=c;c=this._findActive(c)[0];this._clickHandler({target:c},c);return this},_findActive:function(c){return c?typeof c==="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?b([]):this.headers.filter(":eq(0)")},_clickHandler:function(c,f){var g=this.options; +if(!g.disabled)if(c.target){c=b(c.currentTarget||f);f=c[0]===this.active[0];g.active=g.collapsible&&f?false:this.headers.index(c);if(!(this.running||!g.collapsible&&f)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);if(!f){c.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(g.icons.header).addClass(g.icons.headerSelected); +c.next().addClass("ui-accordion-content-active")}d=c.next();e=this.active.next();a={options:g,newHeader:f&&g.collapsible?b([]):c,oldHeader:this.active,newContent:f&&g.collapsible?b([]):d,oldContent:e};g=this.headers.index(this.active[0])>this.headers.index(c[0]);this.active=f?b([]):c;this._toggle(d,e,a,f,g)}}else if(g.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header); +this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),a={options:g,newHeader:b([]),oldHeader:g.active,newContent:b([]),oldContent:e},d=this.active=b([]);this._toggle(d,e,a)}},_toggle:function(c,f,g,e,a){var d=this,h=d.options;d.toShow=c;d.toHide=f;d.data=g;var i=function(){if(d)return d._completed.apply(d,arguments)};d._trigger("changestart",null,d.data);d.running=f.size()===0?c.size():f.size();if(h.animated){g={};g=h.collapsible&&e?{toShow:b([]),toHide:f,complete:i, +down:a,autoHeight:h.autoHeight||h.fillSpace}:{toShow:c,toHide:f,complete:i,down:a,autoHeight:h.autoHeight||h.fillSpace};if(!h.proxied)h.proxied=h.animated;if(!h.proxiedDuration)h.proxiedDuration=h.duration;h.animated=b.isFunction(h.proxied)?h.proxied(g):h.proxied;h.duration=b.isFunction(h.proxiedDuration)?h.proxiedDuration(g):h.proxiedDuration;e=b.ui.accordion.animations;var j=h.duration,n=h.animated;if(n&&!e[n]&&!b.easing[n])n="slide";e[n]||(e[n]=function(q){this.slide(q,{easing:n,duration:j||700})}); +e[n](g)}else{if(h.collapsible&&e)c.toggle();else{f.hide();c.show()}i(true)}f.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();c.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});b.extend(b.ui.accordion,{version:"1.8.7",animations:{slide:function(c, +f){c=b.extend({easing:"swing",duration:300},c,f);if(c.toHide.size())if(c.toShow.size()){var g=c.toShow.css("overflow"),e=0,a={},d={},h;f=c.toShow;h=f[0].style.width;f.width(parseInt(f.parent().width(),10)-parseInt(f.css("paddingLeft"),10)-parseInt(f.css("paddingRight"),10)-(parseInt(f.css("borderLeftWidth"),10)||0)-(parseInt(f.css("borderRightWidth"),10)||0));b.each(["height","paddingTop","paddingBottom"],function(i,j){d[j]="hide";i=(""+b.css(c.toShow[0],j)).match(/^([\d+-.]+)(.*)$/);a[j]={value:i[1], +unit:i[2]||"px"}});c.toShow.css({height:0,overflow:"hidden"}).show();c.toHide.filter(":hidden").each(c.complete).end().filter(":visible").animate(d,{step:function(i,j){if(j.prop=="height")e=j.end-j.start===0?0:(j.now-j.start)/(j.end-j.start);c.toShow[0].style[j.prop]=e*a[j.prop].value+a[j.prop].unit},duration:c.duration,easing:c.easing,complete:function(){c.autoHeight||c.toShow.css("height","");c.toShow.css({width:h,overflow:g});c.complete()}})}else c.toHide.animate({height:"hide",paddingTop:"hide", +paddingBottom:"hide"},c);else c.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},c)},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1E3:200})}}})})(jQuery); +(function(b){b.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var c=this,f=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!(c.options.disabled||c.element.attr("readonly"))){g=false;var a=b.ui.keyCode;switch(e.keyCode){case a.PAGE_UP:c._move("previousPage", +e);break;case a.PAGE_DOWN:c._move("nextPage",e);break;case a.UP:c._move("previous",e);e.preventDefault();break;case a.DOWN:c._move("next",e);e.preventDefault();break;case a.ENTER:case a.NUMPAD_ENTER:if(c.menu.active){g=true;e.preventDefault()}case a.TAB:if(!c.menu.active)return;c.menu.select(e);break;case a.ESCAPE:c.element.val(c.term);c.close(e);break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=c.element.val()){c.selectedItem=null;c.search(null,e)}},c.options.delay); +break}}}).bind("keypress.autocomplete",function(e){if(g){g=false;e.preventDefault()}}).bind("focus.autocomplete",function(){if(!c.options.disabled){c.selectedItem=null;c.previous=c.element.val()}}).bind("blur.autocomplete",function(e){if(!c.options.disabled){clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(e);c._change(e)},150)}});this._initSource();this.response=function(){return c._response.apply(c,arguments)};this.menu=b("
      ").addClass("ui-autocomplete").appendTo(b(this.options.appendTo|| +"body",f)[0]).mousedown(function(e){var a=c.menu.element[0];b(e.target).closest(".ui-menu-item").length||setTimeout(function(){b(document).one("mousedown",function(d){d.target!==c.element[0]&&d.target!==a&&!b.ui.contains(a,d.target)&&c.close()})},1);setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(e,a){a=a.item.data("item.autocomplete");false!==c._trigger("focus",e,{item:a})&&/^key/.test(e.originalEvent.type)&&c.element.val(a.value)},selected:function(e,a){var d=a.item.data("item.autocomplete"), +h=c.previous;if(c.element[0]!==f.activeElement){c.element.focus();c.previous=h;setTimeout(function(){c.previous=h;c.selectedItem=d},1)}false!==c._trigger("select",e,{item:d})&&c.element.val(d.value);c.term=c.element.val();c.close(e);c.selectedItem=d},blur:function(){c.menu.element.is(":visible")&&c.element.val()!==c.term&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");b.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); +this.menu.element.remove();b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c==="source"&&this._initSource();if(c==="appendTo")this.menu.element.appendTo(b(f||"body",this.element[0].ownerDocument)[0])},_initSource:function(){var c=this,f,g;if(b.isArray(this.options.source)){f=this.options.source;this.source=function(e,a){a(b.ui.autocomplete.filter(f,e.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source= +function(e,a){c.xhr&&c.xhr.abort();c.xhr=b.ajax({url:g,data:e,dataType:"json",success:function(d,h,i){i===c.xhr&&a(d);c.xhr=null},error:function(d){d===c.xhr&&a([]);c.xhr=null}})}}else this.source=this.options.source},search:function(c,f){c=c!=null?c:this.element.val();this.term=this.element.val();if(c.length").data("item.autocomplete",f).append(b("").text(f.label)).appendTo(c)},_move:function(c,f){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c)){this.element.val(this.term);this.menu.deactivate()}else this.menu[c](f);else this.search(null,f)},widget:function(){return this.menu.element}}); +b.extend(b.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(c,f){var g=new RegExp(b.ui.autocomplete.escapeRegex(f),"i");return b.grep(c,function(e){return g.test(e.label||e.value||e)})}})})(jQuery); +(function(b){b.widget("ui.menu",{_create:function(){var c=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(f){if(b(f.target).closest(".ui-menu-item a").length){f.preventDefault();c.select(f)}});this.refresh()},refresh:function(){var c=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(f){c.activate(f,b(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(c,f){this.deactivate();if(this.hasScroll()){var g=f.offset().top-this.element.offset().top,e=this.element.attr("scrollTop"),a=this.element.height();if(g<0)this.element.attr("scrollTop",e+g);else g>=a&&this.element.attr("scrollTop",e+g-a+f.height())}this.active=f.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",c,{item:f})}, +deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(c){this.move("next",".ui-menu-item:first",c)},previous:function(c){this.move("prev",".ui-menu-item:last",c)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(c,f,g){if(this.active){c=this.active[c+"All"](".ui-menu-item").eq(0); +c.length?this.activate(g,c):this.activate(g,this.element.children(f))}else this.activate(g,this.element.children(f))},nextPage:function(c){if(this.hasScroll())if(!this.active||this.last())this.activate(c,this.element.children(".ui-menu-item:first"));else{var f=this.active.offset().top,g=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var a=b(this).offset().top-f-g+b(this).height();return a<10&&a>-10});e.length||(e=this.element.children(".ui-menu-item:last"));this.activate(c, +e)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(c){if(this.hasScroll())if(!this.active||this.first())this.activate(c,this.element.children(".ui-menu-item:last"));else{var f=this.active.offset().top,g=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=b(this).offset().top-f+g-b(this).height();return e<10&&e>-10});result.length||(result=this.element.children(".ui-menu-item:first")); +this.activate(c,result)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),d=this.options.icons,h=d.primary&&d.secondary;if(d.primary||d.secondary){e.addClass("ui-button-text-icon"+(h?"s":d.primary?"-primary":"-secondary"));d.primary&&e.prepend("");d.secondary&&e.append("");if(!this.options.text){e.addClass(h?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary"); +this.hasTitle||e.attr("title",a)}}else e.addClass("ui-button-text-only")}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,a){e==="disabled"&&this.buttons.button("option",e,a);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()}, +destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery); +(function(b,c){function f(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass= +"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su", +"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10", +minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};b.extend(this._defaults,this.regional[""]);this.dpDiv=b('
      ')}function g(a,d){b.extend(a,d);for(var h in d)if(d[h]== +null||d[h]==c)a[h]=d[h];return a}b.extend(b.ui,{datepicker:{version:"1.8.7"}});var e=(new Date).getTime();b.extend(f.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){g(this._defaults,a||{});return this},_attachDatepicker:function(a,d){var h=null;for(var i in this._defaults){var j=a.getAttribute("date:"+i);if(j){h=h||{};try{h[i]=eval(j)}catch(n){h[i]=j}}}i=a.nodeName.toLowerCase(); +j=i=="div"||i=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var q=this._newInst(b(a),j);q.settings=b.extend({},d||{},h||{});if(i=="input")this._connectDatepicker(a,q);else j&&this._inlineDatepicker(a,q)},_newInst:function(a,d){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:d,dpDiv:!d?this.dpDiv:b('
      ')}}, +_connectDatepicker:function(a,d){var h=b(a);d.append=b([]);d.trigger=b([]);if(!h.hasClass(this.markerClassName)){this._attachments(h,d);h.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(i,j,n){d.settings[j]=n}).bind("getData.datepicker",function(i,j){return this._get(d,j)});this._autoSize(d);b.data(a,"datepicker",d)}},_attachments:function(a,d){var h=this._get(d,"appendText"),i=this._get(d,"isRTL");d.append&& +d.append.remove();if(h){d.append=b(''+h+"");a[i?"before":"after"](d.append)}a.unbind("focus",this._showDatepicker);d.trigger&&d.trigger.remove();h=this._get(d,"showOn");if(h=="focus"||h=="both")a.focus(this._showDatepicker);if(h=="button"||h=="both"){h=this._get(d,"buttonText");var j=this._get(d,"buttonImage");d.trigger=b(this._get(d,"buttonImageOnly")?b("").addClass(this._triggerClass).attr({src:j,alt:h,title:h}):b('').addClass(this._triggerClass).html(j== +""?h:b("").attr({src:j,alt:h,title:h})));a[i?"before":"after"](d.trigger);d.trigger.click(function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput==a[0]?b.datepicker._hideDatepicker():b.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var d=new Date(2009,11,20),h=this._get(a,"dateFormat");if(h.match(/[DM]/)){var i=function(j){for(var n=0,q=0,l=0;ln){n=j[l].length;q=l}return q};d.setMonth(i(this._get(a, +h.match(/MM/)?"monthNames":"monthNamesShort")));d.setDate(i(this._get(a,h.match(/DD/)?"dayNames":"dayNamesShort"))+20-d.getDay())}a.input.attr("size",this._formatDate(a,d).length)}},_inlineDatepicker:function(a,d){var h=b(a);if(!h.hasClass(this.markerClassName)){h.addClass(this.markerClassName).append(d.dpDiv).bind("setData.datepicker",function(i,j,n){d.settings[j]=n}).bind("getData.datepicker",function(i,j){return this._get(d,j)});b.data(a,"datepicker",d);this._setDate(d,this._getDefaultDate(d), +true);this._updateDatepicker(d);this._updateAlternate(d);d.dpDiv.show()}},_dialogDatepicker:function(a,d,h,i,j){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=b('');this._dialogInput.keydown(this._doKeyDown);b("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};b.data(this._dialogInput[0],"datepicker",a)}g(a.settings,i||{}); +d=d&&d.constructor==Date?this._formatDate(a,d):d;this._dialogInput.val(d);this._pos=j?j.length?j:[j.pageX,j.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=h;this._inDialog=true;this.dpDiv.addClass(this._dialogClass); +this._showDatepicker(this._dialogInput[0]);b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();b.removeData(a,"datepicker");if(i=="input"){h.append.remove();h.trigger.remove();d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup", +this._doKeyUp)}else if(i=="div"||i=="span")d.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=false;h.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(i=="div"||i=="span")d.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs, +function(j){return j==a?null:j})}},_disableDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=true;h.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(i=="div"||i=="span")d.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,function(j){return j==a?null: +j});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var d=0;d-1}},_doKeyUp:function(a){a=b.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,b.datepicker._getFormatConfig(a))){b.datepicker._setDateFromField(a);b.datepicker._updateAlternate(a);b.datepicker._updateDatepicker(a)}}catch(d){b.datepicker.log(d)}return true}, +_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.datepicker._isDisabledDatepicker(a)||b.datepicker._lastInput==a)){var d=b.datepicker._getInst(a);b.datepicker._curInst&&b.datepicker._curInst!=d&&b.datepicker._curInst.dpDiv.stop(true,true);var h=b.datepicker._get(d,"beforeShow");g(d.settings,h?h.apply(a,[a,d]):{});d.lastVal=null;b.datepicker._lastInput=a;b.datepicker._setDateFromField(d);if(b.datepicker._inDialog)a.value="";if(!b.datepicker._pos){b.datepicker._pos= +b.datepicker._findPos(a);b.datepicker._pos[1]+=a.offsetHeight}var i=false;b(a).parents().each(function(){i|=b(this).css("position")=="fixed";return!i});if(i&&b.browser.opera){b.datepicker._pos[0]-=document.documentElement.scrollLeft;b.datepicker._pos[1]-=document.documentElement.scrollTop}h={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=null;d.dpDiv.empty();d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(d);h=b.datepicker._checkOffset(d, +h,i);d.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":i?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"});if(!d.inline){h=b.datepicker._get(d,"showAnim");var j=b.datepicker._get(d,"duration"),n=function(){b.datepicker._datepickerShowing=true;var q=d.dpDiv.find("iframe.ui-datepicker-cover");if(q.length){var l=b.datepicker._getBorders(d.dpDiv);q.css({left:-l[0],top:-l[1],width:d.dpDiv.outerWidth(),height:d.dpDiv.outerHeight()})}};d.dpDiv.zIndex(b(a).zIndex()+1);b.effects&& +b.effects[h]?d.dpDiv.show(h,b.datepicker._get(d,"showOptions"),j,n):d.dpDiv[h||"show"](h?j:null,n);if(!h||!j)n();d.input.is(":visible")&&!d.input.is(":disabled")&&d.input.focus();b.datepicker._curInst=d}}},_updateDatepicker:function(a){var d=this,h=b.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var i=a.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-h[0],top:-h[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout", +function(){b(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!d._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!= +-1&&b(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();h=this._getNumberOfMonths(a);i=h[1];i>1?a.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(h[0]!=1||h[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a, +"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==b.datepicker._curInst&&b.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus();if(a.yearshtml){var j=a.yearshtml;setTimeout(function(){j===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);j=a.yearshtml=null},0)}},_getBorders:function(a){var d=function(h){return{thin:1,medium:2,thick:3}[h]||h};return[parseFloat(d(a.css("border-left-width"))),parseFloat(d(a.css("border-top-width")))]}, +_checkOffset:function(a,d,h){var i=a.dpDiv.outerWidth(),j=a.dpDiv.outerHeight(),n=a.input?a.input.outerWidth():0,q=a.input?a.input.outerHeight():0,l=document.documentElement.clientWidth+b(document).scrollLeft(),k=document.documentElement.clientHeight+b(document).scrollTop();d.left-=this._get(a,"isRTL")?i-n:0;d.left-=h&&d.left==a.input.offset().left?b(document).scrollLeft():0;d.top-=h&&d.top==a.input.offset().top+q?b(document).scrollTop():0;d.left-=Math.min(d.left,d.left+i>l&&l>i?Math.abs(d.left+i- +l):0);d.top-=Math.min(d.top,d.top+j>k&&k>j?Math.abs(j+q):0);return d},_findPos:function(a){for(var d=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[d?"previousSibling":"nextSibling"];a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var d=this._curInst;if(!(!d||a&&d!=b.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(d,"showAnim");var h=this._get(d,"duration"),i=function(){b.datepicker._tidyDialog(d);this._curInst=null};b.effects&&b.effects[a]? +d.dpDiv.hide(a,b.datepicker._get(d,"showOptions"),h,i):d.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?h:null,i);a||i();if(a=this._get(d,"onClose"))a.apply(d.input?d.input[0]:null,[d.input?d.input.val():"",d]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, +_checkExternalClick:function(a){if(b.datepicker._curInst){a=b(a.target);a[0].id!=b.datepicker._mainDivId&&a.parents("#"+b.datepicker._mainDivId).length==0&&!a.hasClass(b.datepicker.markerClassName)&&!a.hasClass(b.datepicker._triggerClass)&&b.datepicker._datepickerShowing&&!(b.datepicker._inDialog&&b.blockUI)&&b.datepicker._hideDatepicker()}},_adjustDate:function(a,d,h){a=b(a);var i=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(i,d+(h=="M"?this._get(i,"showCurrentAtPos"): +0),h);this._updateDatepicker(i)}},_gotoToday:function(a){a=b(a);var d=this._getInst(a[0]);if(this._get(d,"gotoCurrent")&&d.currentDay){d.selectedDay=d.currentDay;d.drawMonth=d.selectedMonth=d.currentMonth;d.drawYear=d.selectedYear=d.currentYear}else{var h=new Date;d.selectedDay=h.getDate();d.drawMonth=d.selectedMonth=h.getMonth();d.drawYear=d.selectedYear=h.getFullYear()}this._notifyChange(d);this._adjustDate(a)},_selectMonthYear:function(a,d,h){a=b(a);var i=this._getInst(a[0]);i._selectingMonthYear= +false;i["selected"+(h=="M"?"Month":"Year")]=i["draw"+(h=="M"?"Month":"Year")]=parseInt(d.options[d.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(a)},_clickMonthYear:function(a){var d=this._getInst(b(a)[0]);d.input&&d._selectingMonthYear&&setTimeout(function(){d.input.focus()},0);d._selectingMonthYear=!d._selectingMonthYear},_selectDay:function(a,d,h,i){var j=b(a);if(!(b(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0]))){j=this._getInst(j[0]);j.selectedDay=j.currentDay= +b("a",i).html();j.selectedMonth=j.currentMonth=d;j.selectedYear=j.currentYear=h;this._selectDate(a,this._formatDate(j,j.currentDay,j.currentMonth,j.currentYear))}},_clearDate:function(a){a=b(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,d){a=this._getInst(b(a)[0]);d=d!=null?d:this._formatDate(a);a.input&&a.input.val(d);this._updateAlternate(a);var h=this._get(a,"onSelect");if(h)h.apply(a.input?a.input[0]:null,[d,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a); +else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var d=this._get(a,"altField");if(d){var h=this._get(a,"altFormat")||this._get(a,"dateFormat"),i=this._getDate(a),j=this.formatDate(h,i,this._getFormatConfig(a));b(d).each(function(){b(this).val(j)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var d= +a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((d-a)/864E5)/7)+1},parseDate:function(a,d,h){if(a==null||d==null)throw"Invalid arguments";d=typeof d=="object"?d.toString():d+"";if(d=="")return null;for(var i=(h?h.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,n=(h?h.dayNames:null)||this._defaults.dayNames,q=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort,l=(h?h.monthNames:null)||this._defaults.monthNames, +k=h=-1,m=-1,o=-1,p=false,s=function(x){(x=y+1-1){k=1;m=o;do{i=this._getDaysInMonth(h,k-1);if(m<=i)break;k++;m-=i}while(1)}B=this._daylightSavingAdjust(new Date(h,k-1,m));if(B.getFullYear()!=h||B.getMonth()+1!=k||B.getDate()!=m)throw"Invalid date";return B},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y", +RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,d,h){if(!d)return"";var i=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,j=(h?h.dayNames:null)||this._defaults.dayNames,n=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort;h=(h?h.monthNames:null)||this._defaults.monthNames;var q=function(s){(s=p+112?a.getHours()+2:0);return a},_setDate:function(a,d,h){var i=!d,j=a.selectedMonth,n=a.selectedYear;d=this._restrictMinMax(a,this._determineDate(a,d,new Date));a.selectedDay= +a.currentDay=d.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=d.getMonth();a.drawYear=a.selectedYear=a.currentYear=d.getFullYear();if((j!=a.selectedMonth||n!=a.selectedYear)&&!h)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(i?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var d=new Date;d=this._daylightSavingAdjust(new Date(d.getFullYear(), +d.getMonth(),d.getDate()));var h=this._get(a,"isRTL"),i=this._get(a,"showButtonPanel"),j=this._get(a,"hideIfNoPrevNext"),n=this._get(a,"navigationAsDateFormat"),q=this._getNumberOfMonths(a),l=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),m=q[0]!=1||q[1]!=1,o=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),p=this._getMinMaxDate(a,"min"),s=this._getMinMaxDate(a,"max");l=a.drawMonth-l;var r=a.drawYear;if(l<0){l+=12;r--}if(s){var u= +this._daylightSavingAdjust(new Date(s.getFullYear(),s.getMonth()-q[0]*q[1]+1,s.getDate()));for(u=p&&uu;){l--;if(l<0){l=11;r--}}}a.drawMonth=l;a.drawYear=r;u=this._get(a,"prevText");u=!n?u:this.formatDate(u,this._daylightSavingAdjust(new Date(r,l-k,1)),this._getFormatConfig(a));u=this._canAdjustMonth(a,-1,r,l)?''+u+"":j?"":''+u+"";var v=this._get(a,"nextText");v=!n?v:this.formatDate(v,this._daylightSavingAdjust(new Date(r,l+k,1)),this._getFormatConfig(a));j=this._canAdjustMonth(a,+1,r,l)?''+v+"":j?"":''+v+"";k=this._get(a,"currentText");v=this._get(a,"gotoCurrent")&&a.currentDay?o:d;k=!n?k:this.formatDate(k,v,this._getFormatConfig(a));n=!a.inline?'":"";i=i?'
      '+(h?n:"")+(this._isInRange(a,v)?'":"")+(h?"":n)+"
      ":"";n=parseInt(this._get(a,"firstDay"),10);n=isNaN(n)?0:n;k=this._get(a,"showWeek");v=this._get(a,"dayNames");this._get(a,"dayNamesShort");var w=this._get(a,"dayNamesMin"),y= +this._get(a,"monthNames"),B=this._get(a,"monthNamesShort"),x=this._get(a,"beforeShowDay"),C=this._get(a,"showOtherMonths"),J=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),K="",G=0;G1)switch(H){case 0:D+=" ui-datepicker-group-first";A=" ui-corner-"+(h?"right":"left");break;case q[1]- +1:D+=" ui-datepicker-group-last";A=" ui-corner-"+(h?"left":"right");break;default:D+=" ui-datepicker-group-middle";A="";break}D+='">'}D+='
      '+(/all|left/.test(A)&&G==0?h?j:u:"")+(/all|right/.test(A)&&G==0?h?u:j:"")+this._generateMonthYearHeader(a,l,r,p,s,G>0||H>0,y,B)+'
      ';var E=k?'":"";for(A=0;A<7;A++){var z= +(A+n)%7;E+="=5?' class="ui-datepicker-week-end"':"")+'>'+w[z]+""}D+=E+"";E=this._getDaysInMonth(r,l);if(r==a.selectedYear&&l==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,E);A=(this._getFirstDayOfMonth(r,l)-n+7)%7;E=m?6:Math.ceil((A+E)/7);z=this._daylightSavingAdjust(new Date(r,l,1-A));for(var P=0;P";var Q=!k?"":'";for(A=0;A<7;A++){var I= +x?x.apply(a.input?a.input[0]:null,[z]):[true,""],F=z.getMonth()!=l,L=F&&!J||!I[0]||p&&zs;Q+='";z.setDate(z.getDate()+1);z=this._daylightSavingAdjust(z)}D+= +Q+""}l++;if(l>11){l=0;r++}D+="
      '+this._get(a,"weekHeader")+"
      '+this._get(a,"calculateWeek")(z)+""+(F&&!C?" ":L?''+z.getDate()+"":''+z.getDate()+"")+"
      "+(m?""+(q[0]>0&&H==q[1]-1?'
      ':""):"");N+=D}K+=N}K+=i+(b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'':"");a._keyEvent=false;return K},_generateMonthYearHeader:function(a,d,h,i,j,n,q,l){var k=this._get(a,"changeMonth"),m=this._get(a,"changeYear"),o=this._get(a,"showMonthAfterYear"),p='
      ', +s="";if(n||!k)s+=''+q[d]+"";else{q=i&&i.getFullYear()==h;var r=j&&j.getFullYear()==h;s+='"}o||(p+=s+(n||!(k&& +m)?" ":""));a.yearshtml="";if(n||!m)p+=''+h+"";else{l=this._get(a,"yearRange").split(":");var v=(new Date).getFullYear();q=function(w){w=w.match(/c[+-].*/)?h+parseInt(w.substring(1),10):w.match(/[+-].*/)?v+parseInt(w,10):parseInt(w,10);return isNaN(w)?v:w};d=q(l[0]);l=Math.max(d,q(l[1]||""));d=i?Math.max(d,i.getFullYear()):d;l=j?Math.min(l,j.getFullYear()):l;for(a.yearshtml+='";if(b.browser.mozilla)p+='";else{p+=a.yearshtml;a.yearshtml=null}}p+=this._get(a,"yearSuffix");if(o)p+=(n||!(k&&m)?" ":"")+s;p+="
      ";return p},_adjustInstDate:function(a,d,h){var i= +a.drawYear+(h=="Y"?d:0),j=a.drawMonth+(h=="M"?d:0);d=Math.min(a.selectedDay,this._getDaysInMonth(i,j))+(h=="D"?d:0);i=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(i,j,d)));a.selectedDay=i.getDate();a.drawMonth=a.selectedMonth=i.getMonth();a.drawYear=a.selectedYear=i.getFullYear();if(h=="M"||h=="Y")this._notifyChange(a)},_restrictMinMax:function(a,d){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");d=h&&da?a:d},_notifyChange:function(a){var d=this._get(a, +"onChangeMonthYear");if(d)d.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,d){return this._determineDate(a,this._get(a,d+"Date"),null)},_getDaysInMonth:function(a,d){return 32-(new Date(a,d,32)).getDate()},_getFirstDayOfMonth:function(a,d){return(new Date(a,d,1)).getDay()},_canAdjustMonth:function(a,d,h,i){var j=this._getNumberOfMonths(a); +h=this._daylightSavingAdjust(new Date(h,i+(d<0?d:j[0]*j[1]),1));d<0&&h.setDate(this._getDaysInMonth(h.getFullYear(),h.getMonth()));return this._isInRange(a,h)},_isInRange:function(a,d){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!h||d.getTime()>=h.getTime())&&(!a||d.getTime()<=a.getTime())},_getFormatConfig:function(a){var d=this._get(a,"shortYearCutoff");d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);return{shortYearCutoff:d,dayNamesShort:this._get(a, +"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,d,h,i){if(!d){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}d=d?typeof d=="object"?d:this._daylightSavingAdjust(new Date(i,h,d)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),d,this._getFormatConfig(a))}});b.fn.datepicker= +function(a){if(!b.datepicker.initialized){b(document).mousedown(b.datepicker._checkExternalClick).find("body").append(b.datepicker.dpDiv);b.datepicker.initialized=true}var d=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(d));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(d)); +return this.each(function(){typeof a=="string"?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this].concat(d)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new f;b.datepicker.initialized=false;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.8.7";window["DP_jQuery_"+e]=b})(jQuery); +(function(b,c){var f={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},g={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(e){var a=b(this).css(e).offset().top;a<0&& +b(this).css("top",e.top-a)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var e=this,a=e.options,d=a.title||" ",h=b.ui.dialog.getTitleId(e.element),i=(e.uiDialog=b("
      ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a.dialogClass).css({zIndex:a.zIndex}).attr("tabIndex", +-1).css("outline",0).keydown(function(q){if(a.closeOnEscape&&q.keyCode&&q.keyCode===b.ui.keyCode.ESCAPE){e.close(q);q.preventDefault()}}).attr({role:"dialog","aria-labelledby":h}).mousedown(function(q){e.moveToTop(false,q)});e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(i);var j=(e.uiDialogTitlebar=b("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(i),n=b('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", +"button").hover(function(){n.addClass("ui-state-hover")},function(){n.removeClass("ui-state-hover")}).focus(function(){n.addClass("ui-state-focus")}).blur(function(){n.removeClass("ui-state-focus")}).click(function(q){e.close(q);return false}).appendTo(j);(e.uiDialogTitlebarCloseText=b("")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(n);b("").addClass("ui-dialog-title").attr("id",h).html(d).prependTo(j);if(b.isFunction(a.beforeclose)&&!b.isFunction(a.beforeClose))a.beforeClose= +a.beforeclose;j.find("*").add(j).disableSelection();a.draggable&&b.fn.draggable&&e._makeDraggable();a.resizable&&b.fn.resizable&&e._makeResizable();e._createButtons(a.buttons);e._isOpen=false;b.fn.bgiframe&&i.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var e=this;e.overlay&&e.overlay.destroy();e.uiDialog.hide();e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");e.uiDialog.remove();e.originalTitle&& +e.element.attr("title",e.originalTitle);return e},widget:function(){return this.uiDialog},close:function(e){var a=this,d,h;if(false!==a._trigger("beforeClose",e)){a.overlay&&a.overlay.destroy();a.uiDialog.unbind("keypress.ui-dialog");a._isOpen=false;if(a.options.hide)a.uiDialog.hide(a.options.hide,function(){a._trigger("close",e)});else{a.uiDialog.hide();a._trigger("close",e)}b.ui.dialog.overlay.resize();if(a.options.modal){d=0;b(".ui-dialog").each(function(){if(this!==a.uiDialog[0]){h=b(this).css("z-index"); +isNaN(h)||(d=Math.max(d,h))}});b.ui.dialog.maxZ=d}return a}},isOpen:function(){return this._isOpen},moveToTop:function(e,a){var d=this,h=d.options;if(h.modal&&!e||!h.stack&&!h.modal)return d._trigger("focus",a);if(h.zIndex>b.ui.dialog.maxZ)b.ui.dialog.maxZ=h.zIndex;if(d.overlay){b.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",b.ui.dialog.maxZ); +d.element.attr(e);d._trigger("focus",a);return d},open:function(){if(!this._isOpen){var e=this,a=e.options,d=e.uiDialog;e.overlay=a.modal?new b.ui.dialog.overlay(e):null;e._size();e._position(a.position);d.show(a.show);e.moveToTop(true);a.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode===b.ui.keyCode.TAB){var i=b(":tabbable",this),j=i.filter(":first");i=i.filter(":last");if(h.target===i[0]&&!h.shiftKey){j.focus(1);return false}else if(h.target===j[0]&&h.shiftKey){i.focus(1);return false}}}); +b(e.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();e._isOpen=true;e._trigger("open");return e}},_createButtons:function(e){var a=this,d=false,h=b("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),i=b("
      ").addClass("ui-dialog-buttonset").appendTo(h);a.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&b.each(e,function(){return!(d=true)});if(d){b.each(e,function(j, +n){n=b.isFunction(n)?{click:n,text:j}:n;j=b('').attr(n,true).unbind("click").click(function(){n.click.apply(a.element[0],arguments)}).appendTo(i);b.fn.button&&j.button()});h.appendTo(a.uiDialog)}},_makeDraggable:function(){function e(j){return{position:j.position,offset:j.offset}}var a=this,d=a.options,h=b(document),i;a.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(j,n){i= +d.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");a._trigger("dragStart",j,e(n))},drag:function(j,n){a._trigger("drag",j,e(n))},stop:function(j,n){d.position=[n.position.left-h.scrollLeft(),n.position.top-h.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(i);a._trigger("dragStop",j,e(n));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function a(j){return{originalPosition:j.originalPosition,originalSize:j.originalSize, +position:j.position,size:j.size}}e=e===c?this.options.resizable:e;var d=this,h=d.options,i=d.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:h.maxWidth,maxHeight:h.maxHeight,minWidth:h.minWidth,minHeight:d._minHeight(),handles:e,start:function(j,n){b(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",j,a(n))},resize:function(j,n){d._trigger("resize",j,a(n))},stop:function(j, +n){b(this).removeClass("ui-dialog-resizing");h.height=b(this).height();h.width=b(this).width();d._trigger("resizeStop",j,a(n));b.ui.dialog.overlay.resize()}}).css("position",i).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(e){var a=[],d=[0,0],h;if(e){if(typeof e==="string"||typeof e==="object"&&"0"in e){a=e.split?e.split(" "):[e[0],e[1]];if(a.length=== +1)a[1]=a[0];b.each(["left","top"],function(i,j){if(+a[i]===a[i]){d[i]=a[i];a[i]=j}});e={my:a.join(" "),at:a.join(" "),offset:d.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else e=b.ui.dialog.prototype.options.position;(h=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(b.extend({of:window},e));h||this.uiDialog.hide()},_setOptions:function(e){var a=this,d={},h=false;b.each(e,function(i,j){a._setOption(i,j);if(i in f)h=true;if(i in +g)d[i]=j});h&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(e,a){var d=this,h=d.uiDialog;switch(e){case "beforeclose":e="beforeClose";break;case "buttons":d._createButtons(a);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+a);break;case "dialogClass":h.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a);break;case "disabled":a?h.addClass("ui-dialog-disabled"):h.removeClass("ui-dialog-disabled"); +break;case "draggable":var i=h.is(":data(draggable)");i&&!a&&h.draggable("destroy");!i&&a&&d._makeDraggable();break;case "position":d._position(a);break;case "resizable":(i=h.is(":data(resizable)"))&&!a&&h.resizable("destroy");i&&typeof a==="string"&&h.resizable("option","handles",a);!i&&a!==false&&d._makeResizable(a);break;case "title":b(".ui-dialog-title",d.uiDialogTitlebar).html(""+(a||" "));break}b.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var e=this.options,a,d,h= +this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(e.minWidth>e.width)e.width=e.minWidth;a=this.uiDialog.css({height:"auto",width:e.width}).height();d=Math.max(0,e.minHeight-a);if(e.height==="auto")if(b.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();e=this.element.css("height","auto").height();h||this.uiDialog.hide();this.element.height(Math.max(e,d))}else this.element.height(Math.max(e.height-a,0));this.uiDialog.is(":data(resizable)")&& +this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.7",uuid:0,maxZ:0,getTitleId:function(e){e=e.attr("id");if(!e){this.uuid+=1;e=this.uuid}return"ui-dialog-title-"+e},overlay:function(e){this.$el=b.ui.dialog.overlay.create(e)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length=== +0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(d){if(b(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), +height:this.height()});b.fn.bgiframe&&a.bgiframe();this.instances.push(a);return a},destroy:function(e){var a=b.inArray(e,this.instances);a!=-1&&this.oldInstances.push(this.instances.splice(a,1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");e.remove();var d=0;b.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var e,a;if(b.browser.msie&&b.browser.version<7){e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); +a=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return e0?a.left-h:Math.max(a.left-d.collisionPosition.left,a.left)},top:function(a,d){var h=b(window);h=d.collisionPosition.top+d.collisionHeight-h.height()-h.scrollTop();a.top=h>0?a.top-h:Math.max(a.top-d.collisionPosition.top,a.top)}},flip:{left:function(a,d){if(d.at[0]!=="center"){var h=b(window);h=d.collisionPosition.left+d.collisionWidth-h.width()-h.scrollLeft();var i=d.my[0]==="left"?-d.elemWidth:d.my[0]==="right"?d.elemWidth:0,j=d.at[0]==="left"?d.targetWidth:-d.targetWidth,n=-2*d.offset[0];a.left+= +d.collisionPosition.left<0?i+j+n:h>0?i+j+n:0}},top:function(a,d){if(d.at[1]!=="center"){var h=b(window);h=d.collisionPosition.top+d.collisionHeight-h.height()-h.scrollTop();var i=d.my[1]==="top"?-d.elemHeight:d.my[1]==="bottom"?d.elemHeight:0,j=d.at[1]==="top"?d.targetHeight:-d.targetHeight,n=-2*d.offset[1];a.top+=d.collisionPosition.top<0?i+j+n:h>0?i+j+n:0}}}};if(!b.offset.setOffset){b.offset.setOffset=function(a,d){if(/static/.test(b.curCSS(a,"position")))a.style.position="relative";var h=b(a), +i=h.offset(),j=parseInt(b.curCSS(a,"top",true),10)||0,n=parseInt(b.curCSS(a,"left",true),10)||0;i={top:d.top-i.top+j,left:d.left-i.left+n};"using"in d?d.using.call(a,i):h.css(i)};b.fn.offset=function(a){var d=this[0];if(!d||!d.ownerDocument)return null;if(a)return this.each(function(){b.offset.setOffset(this,a)});return e.call(this)}}})(jQuery); +(function(b,c){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
      ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(f){if(f===c)return this._value();this._setOption("value",f);return this},_setOption:function(f,g){if(f==="value"){this.options.value=g;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var f=this.options.value;if(typeof f!=="number")f=0;return Math.min(this.options.max,Math.max(this.min,f))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var f=this.value(),g=this._percentage();if(this.oldValue!==f){this.oldValue=f;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",f===this.options.max).width(g.toFixed(0)+"%");this.element.attr("aria-valuenow",f)}});b.extend(b.ui.progressbar,{version:"1.8.7"})})(jQuery); +(function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,f=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");f.disabled&&this.element.addClass("ui-slider-disabled ui-disabled"); +this.range=b([]);if(f.range){if(f.range===true){this.range=b("
      ");if(!f.values)f.values=[this._valueMin(),this._valueMin()];if(f.values.length&&f.values.length!==2)f.values=[f.values[0],f.values[0]]}else this.range=b("
      ");this.range.appendTo(this.element).addClass("ui-slider-range");if(f.range==="min"||f.range==="max")this.range.addClass("ui-slider-range-"+f.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length===0&&b("").appendTo(this.element).addClass("ui-slider-handle"); +if(f.values&&f.values.length)for(;b(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){f.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(f.disabled)b(this).blur(); +else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(g){b(this).data("index.ui-slider-handle",g)});this.handles.keydown(function(g){var e=true,a=b(this).data("index.ui-slider-handle"),d,h,i;if(!c.options.disabled){switch(g.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:e= +false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");d=c._start(g,a);if(d===false)return}break}i=c.options.step;d=c.options.values&&c.options.values.length?(h=c.values(a)):(h=c.value());switch(g.keyCode){case b.ui.keyCode.HOME:h=c._valueMin();break;case b.ui.keyCode.END:h=c._valueMax();break;case b.ui.keyCode.PAGE_UP:h=c._trimAlignValue(d+(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:h=c._trimAlignValue(d-(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(d=== +c._valueMax())return;h=c._trimAlignValue(d+i);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(d===c._valueMin())return;h=c._trimAlignValue(d-i);break}c._slide(g,a,h);return e}}).keyup(function(g){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(g,e);c._change(g,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); +this._mouseDestroy();return this},_mouseCapture:function(c){var f=this.options,g,e,a,d,h;if(f.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();g=this._normValueFromMouse({x:c.pageX,y:c.pageY});e=this._valueMax()-this._valueMin()+1;d=this;this.handles.each(function(i){var j=Math.abs(g-d.values(i));if(e>j){e=j;a=b(this);h=i}});if(f.range===true&&this.values(1)===f.min){h+=1;a=b(this.handles[h])}if(this._start(c, +h)===false)return false;this._mouseSliding=true;d._handleIndex=h;a.addClass("ui-state-active").focus();f=a.offset();this._clickOffset=!b(c.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:c.pageX-f.left-a.width()/2,top:c.pageY-f.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(c,h,g);return this._animateOff=true},_mouseStart:function(){return true}, +_mouseDrag:function(c){var f=this._normValueFromMouse({x:c.pageX,y:c.pageY});this._slide(c,this._handleIndex,f);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var f; +if(this.orientation==="horizontal"){f=this.elementSize.width;c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{f=this.elementSize.height;c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}f=c/f;if(f>1)f=1;if(f<0)f=0;if(this.orientation==="vertical")f=1-f;c=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+f*c)},_start:function(c,f){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){g.value= +this.values(f);g.values=this.values()}return this._trigger("start",c,g)},_slide:function(c,f,g){var e;if(this.options.values&&this.options.values.length){e=this.values(f?0:1);if(this.options.values.length===2&&this.options.range===true&&(f===0&&g>e||f===1&&g1){this.options.values[c]=this._trimAlignValue(f);this._refreshValue();this._change(null,c)}if(arguments.length)if(b.isArray(arguments[0])){g=this.options.values;e=arguments[0];for(a=0;a=this._valueMax())return this._valueMax();var f=this.options.step>0?this.options.step:1,g=(c-this._valueMin())%f;alignValue=c-g;if(Math.abs(g)*2>=f)alignValue+=g>0?f:-f;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, +_refreshValue:function(){var c=this.options.range,f=this.options,g=this,e=!this._animateOff?f.animate:false,a,d={},h,i,j,n;if(this.options.values&&this.options.values.length)this.handles.each(function(q){a=(g.values(q)-g._valueMin())/(g._valueMax()-g._valueMin())*100;d[g.orientation==="horizontal"?"left":"bottom"]=a+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(g.options.range===true)if(g.orientation==="horizontal"){if(q===0)g.range.stop(1,1)[e?"animate":"css"]({left:a+"%"},f.animate); +if(q===1)g.range[e?"animate":"css"]({width:a-h+"%"},{queue:false,duration:f.animate})}else{if(q===0)g.range.stop(1,1)[e?"animate":"css"]({bottom:a+"%"},f.animate);if(q===1)g.range[e?"animate":"css"]({height:a-h+"%"},{queue:false,duration:f.animate})}h=a});else{i=this.value();j=this._valueMin();n=this._valueMax();a=n!==j?(i-j)/(n-j)*100:0;d[g.orientation==="horizontal"?"left":"bottom"]=a+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);if(c==="min"&&this.orientation==="horizontal")this.range.stop(1, +1)[e?"animate":"css"]({width:a+"%"},f.animate);if(c==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-a+"%"},{queue:false,duration:f.animate});if(c==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:a+"%"},f.animate);if(c==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-a+"%"},{queue:false,duration:f.animate})}}});b.extend(b.ui.slider,{version:"1.8.7"})})(jQuery); +(function(b,c){function f(){return++e}function g(){return++a}var e=0,a=0;b.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
      ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
    • #{label}
    • "},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected")this.options.collapsible&& +h==this.options.selected||this.select(h);else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+f()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+g());return b.cookie.apply(null,[d].concat(b.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d= +b(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(d){function h(r,u){r.css("display","");!b.support.opacity&&u.opacity&&r[0].style.removeAttribute("filter")}var i=this,j=this.options,n=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=b(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return b("a",this)[0]});this.panels=b([]);this.anchors.each(function(r,u){var v=b(u).attr("href"),w=v.split("#")[0],y;if(w&&(w===location.toString().split("#")[0]|| +(y=b("base")[0])&&w===y.href)){v=u.hash;u.href=v}if(n.test(v))i.panels=i.panels.add(i.element.find(i._sanitizeSelector(v)));else if(v&&v!=="#"){b.data(u,"href.tabs",v);b.data(u,"load.tabs",v.replace(/#.*$/,""));v=i._tabId(u);u.href="#"+v;u=i.element.find("#"+v);if(!u.length){u=b(j.panelTemplate).attr("id",v).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(i.panels[r-1]||i.list);u.data("destroy.tabs",true)}i.panels=i.panels.add(u)}else j.disabled.push(r)});if(d){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(j.selected===c){location.hash&&this.anchors.each(function(r,u){if(u.hash==location.hash){j.selected=r;return false}});if(typeof j.selected!=="number"&&j.cookie)j.selected=parseInt(i._cookie(),10);if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)j.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));j.selected=j.selected||(this.lis.length?0:-1)}else if(j.selected===null)j.selected=-1;j.selected=j.selected>=0&&this.anchors[j.selected]||j.selected<0?j.selected:0;j.disabled=b.unique(j.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"),function(r){return i.lis.index(r)}))).sort();b.inArray(j.selected,j.disabled)!=-1&&j.disabled.splice(b.inArray(j.selected,j.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(j.selected>=0&&this.anchors.length){i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");i.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[j.selected],i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash))))});this.load(j.selected)}b(window).bind("unload",function(){i.lis.add(i.anchors).unbind(".tabs");i.lis=i.anchors=i.panels=null})}else j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");j.cookie&&this._cookie(j.selected,j.cookie);d=0;for(var q;q=this.lis[d];d++)b(q)[b.inArray(d,j.disabled)!=-1&&!b(q).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");j.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var l=function(r,u){u.is(":not(.ui-state-disabled)")&&u.addClass("ui-state-"+r)},k=function(r,u){u.removeClass("ui-state-"+ +r)};this.lis.bind("mouseover.tabs",function(){l("hover",b(this))});this.lis.bind("mouseout.tabs",function(){k("hover",b(this))});this.anchors.bind("focus.tabs",function(){l("focus",b(this).closest("li"))});this.anchors.bind("blur.tabs",function(){k("focus",b(this).closest("li"))})}var m,o;if(j.fx)if(b.isArray(j.fx)){m=j.fx[0];o=j.fx[1]}else m=o=j.fx;var p=o?function(r,u){b(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", +function(){h(u,o);i._trigger("show",null,i._ui(r,u[0]))})}:function(r,u){b(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.removeClass("ui-tabs-hide");i._trigger("show",null,i._ui(r,u[0]))},s=m?function(r,u){u.animate(m,m.duration||"normal",function(){i.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");h(u,m);i.element.dequeue("tabs")})}:function(r,u){i.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");i.element.dequeue("tabs")}; +this.anchors.bind(j.event+".tabs",function(){var r=this,u=b(r).closest("li"),v=i.panels.filter(":not(.ui-tabs-hide)"),w=i.element.find(i._sanitizeSelector(r.hash));if(u.hasClass("ui-tabs-selected")&&!j.collapsible||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||i.panels.filter(":animated").length||i._trigger("select",null,i._ui(this,w[0]))===false){this.blur();return false}j.selected=i.anchors.index(this);i.abort();if(j.collapsible)if(u.hasClass("ui-tabs-selected")){j.selected= +-1;j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){s(r,v)}).dequeue("tabs");this.blur();return false}else if(!v.length){j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){p(r,w)});i.load(i.anchors.index(this));this.blur();return false}j.cookie&&i._cookie(j.selected,j.cookie);if(w.length){v.length&&i.element.queue("tabs",function(){s(r,v)});i.element.queue("tabs",function(){p(r,w)});i.load(i.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +b.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string")d=this.anchors.index(this.anchors.filter("[href$="+d+"]"));return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var h= +b.data(this,"href.tabs");if(h)this.href=h;var i=b(this).unbind(".tabs");b.each(["href","load","cache"],function(j,n){i.removeData(n+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){b.data(this,"destroy.tabs")?b(this).remove():b(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(d, +h,i){if(i===c)i=this.anchors.length;var j=this,n=this.options;h=b(n.tabTemplate.replace(/#\{href\}/g,d).replace(/#\{label\}/g,h));d=!d.indexOf("#")?d.replace("#",""):this._tabId(b("a",h)[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var q=j.element.find("#"+d);q.length||(q=b(n.panelTemplate).attr("id",d).data("destroy.tabs",true));q.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(i>=this.lis.length){h.appendTo(this.list);q.appendTo(this.list[0].parentNode)}else{h.insertBefore(this.lis[i]); +q.insertBefore(this.panels[i])}n.disabled=b.map(n.disabled,function(l){return l>=i?++l:l});this._tabify();if(this.anchors.length==1){n.selected=0;h.addClass("ui-tabs-selected ui-state-active");q.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[0],j.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[i],this.panels[i]));return this},remove:function(d){d=this._getIndex(d);var h=this.options,i=this.lis.eq(d).remove(),j=this.panels.eq(d).remove(); +if(i.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(d+(d+1=d?--n:n});this._tabify();this._trigger("remove",null,this._ui(i.find("a")[0],j[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(b.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=b.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null, +this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1)if(this.options.collapsible&&this.options.selected!=-1)d=this.options.selected;else return this;this.anchors.eq(d).trigger(this.options.event+".tabs");return this}, +load:function(d){d=this._getIndex(d);var h=this,i=this.options,j=this.anchors.eq(d)[0],n=b.data(j,"load.tabs");this.abort();if(!n||this.element.queue("tabs").length!==0&&b.data(j,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(d).addClass("ui-state-processing");if(i.spinner){var q=b("span",j);q.data("label.tabs",q.html()).html(i.spinner)}this.xhr=b.ajax(b.extend({},i.ajaxOptions,{url:n,success:function(l,k){h.element.find(h._sanitizeSelector(j.hash)).html(l);h._cleanup();i.cache&&b.data(j, +"cache.tabs",true);h._trigger("load",null,h._ui(h.anchors[d],h.panels[d]));try{i.ajaxOptions.success(l,k)}catch(m){}},error:function(l,k){h._cleanup();h._trigger("load",null,h._ui(h.anchors[d],h.panels[d]));try{i.ajaxOptions.error(l,k,d,j)}catch(m){}}}));h.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, +url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:"1.8.7"});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(d,h){var i=this,j=this.options,n=i._rotate||(i._rotate=function(q){clearTimeout(i.rotation);i.rotation=setTimeout(function(){var l=j.selected;i.select(++l 1 && String(value) !== "[object Object]") { + options = jQuery.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +}; diff --git a/web/0.3.4/scripts/jquery.easing.1.3.js b/web/0.3.4/scripts/jquery.easing.1.3.js new file mode 100644 index 0000000..ef74321 --- /dev/null +++ b/web/0.3.4/scripts/jquery.easing.1.3.js @@ -0,0 +1,205 @@ +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built in easing capabilities added In jQuery 1.1 + * to offer multiple easing options + * + * TERMS OF USE - jQuery Easing + * + * Open source under the BSD License. + * + * Copyright © 2008 George McGinley Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * +*/ + +// t: current time, b: begInnIng value, c: change In value, d: duration +jQuery.easing['jswing'] = jQuery.easing['swing']; + +jQuery.extend( jQuery.easing, +{ + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + //alert(jQuery.easing.default); + return jQuery.easing[jQuery.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); + +/* + * + * TERMS OF USE - EASING EQUATIONS + * + * Open source under the BSD License. + * + * Copyright © 2001 Robert Penner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ \ No newline at end of file diff --git a/web/0.3.4/scripts/jquery.fancybox-1.3.4.js b/web/0.3.4/scripts/jquery.fancybox-1.3.4.js new file mode 100755 index 0000000..be77275 --- /dev/null +++ b/web/0.3.4/scripts/jquery.fancybox-1.3.4.js @@ -0,0 +1,1156 @@ +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +;(function($) { + var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right, + + selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [], + + ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i, + + loadingTimer, loadingFrame = 1, + + titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('
      ')[0], { prop: 0 }), + + isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest, + + /* + * Private methods + */ + + _abort = function() { + loading.hide(); + + imgPreloader.onerror = imgPreloader.onload = null; + + if (ajaxLoader) { + ajaxLoader.abort(); + } + + tmp.empty(); + }, + + _error = function() { + if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) { + loading.hide(); + busy = false; + return; + } + + selectedOpts.titleShow = false; + + selectedOpts.width = 'auto'; + selectedOpts.height = 'auto'; + + tmp.html( '

      The requested content cannot be loaded.
      Please try again later.

      ' ); + + _process_inline(); + }, + + _start = function() { + var obj = selectedArray[ selectedIndex ], + href, + type, + title, + str, + emb, + ret; + + _abort(); + + selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox'))); + + ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts); + + if (ret === false) { + busy = false; + return; + } else if (typeof ret == 'object') { + selectedOpts = $.extend(selectedOpts, ret); + } + + title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || ''; + + if (obj.nodeName && !selectedOpts.orig) { + selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj); + } + + if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) { + title = selectedOpts.orig.attr('alt'); + } + + href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null; + + if ((/^(?:javascript)/i).test(href) || href == '#') { + href = null; + } + + if (selectedOpts.type) { + type = selectedOpts.type; + + if (!href) { + href = selectedOpts.content; + } + + } else if (selectedOpts.content) { + type = 'html'; + + } else if (href) { + if (href.match(imgRegExp)) { + type = 'image'; + + } else if (href.match(swfRegExp)) { + type = 'swf'; + + } else if ($(obj).hasClass("iframe")) { + type = 'iframe'; + + } else if (href.indexOf("#") === 0) { + type = 'inline'; + + } else { + type = 'ajax'; + } + } + + if (!type) { + _error(); + return; + } + + if (type == 'inline') { + obj = href.substr(href.indexOf("#")); + type = $(obj).length > 0 ? 'inline' : 'ajax'; + } + + selectedOpts.type = type; + selectedOpts.href = href; + selectedOpts.title = title; + + if (selectedOpts.autoDimensions) { + if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') { + selectedOpts.width = 'auto'; + selectedOpts.height = 'auto'; + } else { + selectedOpts.autoDimensions = false; + } + } + + if (selectedOpts.modal) { + selectedOpts.overlayShow = true; + selectedOpts.hideOnOverlayClick = false; + selectedOpts.hideOnContentClick = false; + selectedOpts.enableEscapeButton = false; + selectedOpts.showCloseButton = false; + } + + selectedOpts.padding = parseInt(selectedOpts.padding, 10); + selectedOpts.margin = parseInt(selectedOpts.margin, 10); + + tmp.css('padding', (selectedOpts.padding + selectedOpts.margin)); + + $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() { + $(this).replaceWith(content.children()); + }); + + switch (type) { + case 'html' : + tmp.html( selectedOpts.content ); + _process_inline(); + break; + + case 'inline' : + if ( $(obj).parent().is('#fancybox-content') === true) { + busy = false; + return; + } + + $('
      ') + .hide() + .insertBefore( $(obj) ) + .bind('fancybox-cleanup', function() { + $(this).replaceWith(content.children()); + }).bind('fancybox-cancel', function() { + $(this).replaceWith(tmp.children()); + }); + + $(obj).appendTo(tmp); + + _process_inline(); + break; + + case 'image': + busy = false; + + $.fancybox.showActivity(); + + imgPreloader = new Image(); + + imgPreloader.onerror = function() { + _error(); + }; + + imgPreloader.onload = function() { + busy = true; + + imgPreloader.onerror = imgPreloader.onload = null; + + _process_image(); + }; + + imgPreloader.src = href; + break; + + case 'swf': + selectedOpts.scrolling = 'no'; + + str = ''; + emb = ''; + + $.each(selectedOpts.swf, function(name, val) { + str += ''; + emb += ' ' + name + '="' + val + '"'; + }); + + str += ''; + + tmp.html(str); + + _process_inline(); + break; + + case 'ajax': + busy = false; + + $.fancybox.showActivity(); + + selectedOpts.ajax.win = selectedOpts.ajax.success; + + ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { + url : href, + data : selectedOpts.ajax.data || {}, + error : function(XMLHttpRequest, textStatus, errorThrown) { + if ( XMLHttpRequest.status > 0 ) { + _error(); + } + }, + success : function(data, textStatus, XMLHttpRequest) { + var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; + if (o.status == 200) { + if ( typeof selectedOpts.ajax.win == 'function' ) { + ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); + + if (ret === false) { + loading.hide(); + return; + } else if (typeof ret == 'string' || typeof ret == 'object') { + data = ret; + } + } + + tmp.html( data ); + _process_inline(); + } + } + })); + + break; + + case 'iframe': + _show(); + break; + } + }, + + _process_inline = function() { + var + w = selectedOpts.width, + h = selectedOpts.height; + + if (w.toString().indexOf('%') > -1) { + w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px'; + + } else { + w = w == 'auto' ? 'auto' : w + 'px'; + } + + if (h.toString().indexOf('%') > -1) { + h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px'; + + } else { + h = h == 'auto' ? 'auto' : h + 'px'; + } + + tmp.wrapInner('
      '); + + selectedOpts.width = tmp.width(); + selectedOpts.height = tmp.height(); + + _show(); + }, + + _process_image = function() { + selectedOpts.width = imgPreloader.width; + selectedOpts.height = imgPreloader.height; + + $("").attr({ + 'id' : 'fancybox-img', + 'src' : imgPreloader.src, + 'alt' : selectedOpts.title + }).appendTo( tmp ); + + _show(); + }, + + _show = function() { + var pos, equal; + + loading.hide(); + + if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { + $.event.trigger('fancybox-cancel'); + + busy = false; + return; + } + + busy = true; + + $(content.add( overlay )).unbind(); + + $(window).unbind("resize.fb scroll.fb"); + $(document).unbind('keydown.fb'); + + if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') { + wrap.css('height', wrap.height()); + } + + currentArray = selectedArray; + currentIndex = selectedIndex; + currentOpts = selectedOpts; + + if (currentOpts.overlayShow) { + overlay.css({ + 'background-color' : currentOpts.overlayColor, + 'opacity' : currentOpts.overlayOpacity, + 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto', + 'height' : $(document).height() + }); + + if (!overlay.is(':visible')) { + if (isIE6) { + $('select:not(#fancybox-tmp select)').filter(function() { + return this.style.visibility !== 'hidden'; + }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() { + this.style.visibility = 'inherit'; + }); + } + + overlay.show(); + } + } else { + overlay.hide(); + } + + final_pos = _get_zoom_to(); + + _process_title(); + + if (wrap.is(":visible")) { + $( close.add( nav_left ).add( nav_right ) ).hide(); + + pos = wrap.position(), + + start_pos = { + top : pos.top, + left : pos.left, + width : wrap.width(), + height : wrap.height() + }; + + equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height); + + content.fadeTo(currentOpts.changeFade, 0.3, function() { + var finish_resizing = function() { + content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish); + }; + + $.event.trigger('fancybox-change'); + + content + .empty() + .removeAttr('filter') + .css({ + 'border-width' : currentOpts.padding, + 'width' : final_pos.width - currentOpts.padding * 2, + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 + }); + + if (equal) { + finish_resizing(); + + } else { + fx.prop = 0; + + $(fx).animate({prop: 1}, { + duration : currentOpts.changeSpeed, + easing : currentOpts.easingChange, + step : _draw, + complete : finish_resizing + }); + } + }); + + return; + } + + wrap.removeAttr("style"); + + content.css('border-width', currentOpts.padding); + + if (currentOpts.transitionIn == 'elastic') { + start_pos = _get_zoom_from(); + + content.html( tmp.contents() ); + + wrap.show(); + + if (currentOpts.opacity) { + final_pos.opacity = 0; + } + + fx.prop = 0; + + $(fx).animate({prop: 1}, { + duration : currentOpts.speedIn, + easing : currentOpts.easingIn, + step : _draw, + complete : _finish + }); + + return; + } + + if (currentOpts.titlePosition == 'inside' && titleHeight > 0) { + title.show(); + } + + content + .css({ + 'width' : final_pos.width - currentOpts.padding * 2, + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 + }) + .html( tmp.contents() ); + + wrap + .css(final_pos) + .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish ); + }, + + _format_title = function(title) { + if (title && title.length) { + if (currentOpts.titlePosition == 'float') { + return '
      ' + title + '
      '; + } + + return '
      ' + title + '
      '; + } + + return false; + }, + + _process_title = function() { + titleStr = currentOpts.title || ''; + titleHeight = 0; + + title + .empty() + .removeAttr('style') + .removeClass(); + + if (currentOpts.titleShow === false) { + title.hide(); + return; + } + + titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr); + + if (!titleStr || titleStr === '') { + title.hide(); + return; + } + + title + .addClass('fancybox-title-' + currentOpts.titlePosition) + .html( titleStr ) + .appendTo( 'body' ) + .show(); + + switch (currentOpts.titlePosition) { + case 'inside': + title + .css({ + 'width' : final_pos.width - (currentOpts.padding * 2), + 'marginLeft' : currentOpts.padding, + 'marginRight' : currentOpts.padding + }); + + titleHeight = title.outerHeight(true); + + title.appendTo( outer ); + + final_pos.height += titleHeight; + break; + + case 'over': + title + .css({ + 'marginLeft' : currentOpts.padding, + 'width' : final_pos.width - (currentOpts.padding * 2), + 'bottom' : currentOpts.padding + }) + .appendTo( outer ); + break; + + case 'float': + title + .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1) + .appendTo( wrap ); + break; + + default: + title + .css({ + 'width' : final_pos.width - (currentOpts.padding * 2), + 'paddingLeft' : currentOpts.padding, + 'paddingRight' : currentOpts.padding + }) + .appendTo( wrap ); + break; + } + + title.hide(); + }, + + _set_navigation = function() { + if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) { + $(document).bind('keydown.fb', function(e) { + if (e.keyCode == 27 && currentOpts.enableEscapeButton) { + e.preventDefault(); + $.fancybox.close(); + + } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') { + e.preventDefault(); + $.fancybox[ e.keyCode == 37 ? 'prev' : 'next'](); + } + }); + } + + if (!currentOpts.showNavArrows) { + nav_left.hide(); + nav_right.hide(); + return; + } + + if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) { + nav_left.show(); + } + + if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) { + nav_right.show(); + } + }, + + _finish = function () { + if (!$.support.opacity) { + content.get(0).style.removeAttribute('filter'); + wrap.get(0).style.removeAttribute('filter'); + } + + if (selectedOpts.autoDimensions) { + content.css('height', 'auto'); + } + + wrap.css('height', 'auto'); + + if (titleStr && titleStr.length) { + title.show(); + } + + if (currentOpts.showCloseButton) { + close.show(); + } + + _set_navigation(); + + if (currentOpts.hideOnContentClick) { + content.bind('click', $.fancybox.close); + } + + if (currentOpts.hideOnOverlayClick) { + overlay.bind('click', $.fancybox.close); + } + + $(window).bind("resize.fb", $.fancybox.resize); + + if (currentOpts.centerOnScroll) { + $(window).bind("scroll.fb", $.fancybox.center); + } + + if (currentOpts.type == 'iframe') { + $('').appendTo(content); + } + + wrap.show(); + + busy = false; + + $.fancybox.center(); + + currentOpts.onComplete(currentArray, currentIndex, currentOpts); + + _preload_images(); + }, + + _preload_images = function() { + var href, + objNext; + + if ((currentArray.length -1) > currentIndex) { + href = currentArray[ currentIndex + 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + + if (currentIndex > 0) { + href = currentArray[ currentIndex - 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + }, + + _draw = function(pos) { + var dim = { + width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), + height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), + + top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), + left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) + }; + + if (typeof final_pos.opacity !== 'undefined') { + dim.opacity = pos < 0.5 ? 0.5 : pos; + } + + wrap.css(dim); + + content.css({ + 'width' : dim.width - currentOpts.padding * 2, + 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 + }); + }, + + _get_viewport = function() { + return [ + $(window).width() - (currentOpts.margin * 2), + $(window).height() - (currentOpts.margin * 2), + $(document).scrollLeft() + currentOpts.margin, + $(document).scrollTop() + currentOpts.margin + ]; + }, + + _get_zoom_to = function () { + var view = _get_viewport(), + to = {}, + resize = currentOpts.autoScale, + double_padding = currentOpts.padding * 2, + ratio; + + if (currentOpts.width.toString().indexOf('%') > -1) { + to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); + } else { + to.width = currentOpts.width + double_padding; + } + + if (currentOpts.height.toString().indexOf('%') > -1) { + to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); + } else { + to.height = currentOpts.height + double_padding; + } + + if (resize && (to.width > view[0] || to.height > view[1])) { + if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') { + ratio = (currentOpts.width ) / (currentOpts.height ); + + if ((to.width ) > view[0]) { + to.width = view[0]; + to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); + } + + if ((to.height) > view[1]) { + to.height = view[1]; + to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); + } + + } else { + to.width = Math.min(to.width, view[0]); + to.height = Math.min(to.height, view[1]); + } + } + + to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); + to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); + + return to; + }, + + _get_obj_pos = function(obj) { + var pos = obj.offset(); + + pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0; + pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0; + + pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0; + pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0; + + pos.width = obj.width(); + pos.height = obj.height(); + + return pos; + }, + + _get_zoom_from = function() { + var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, + from = {}, + pos, + view; + + if (orig && orig.length) { + pos = _get_obj_pos(orig); + + from = { + width : pos.width + (currentOpts.padding * 2), + height : pos.height + (currentOpts.padding * 2), + top : pos.top - currentOpts.padding - 20, + left : pos.left - currentOpts.padding - 20 + }; + + } else { + view = _get_viewport(); + + from = { + width : currentOpts.padding * 2, + height : currentOpts.padding * 2, + top : parseInt(view[3] + view[1] * 0.5, 10), + left : parseInt(view[2] + view[0] * 0.5, 10) + }; + } + + return from; + }, + + _animate_loading = function() { + if (!loading.is(':visible')){ + clearInterval(loadingTimer); + return; + } + + $('div', loading).css('top', (loadingFrame * -40) + 'px'); + + loadingFrame = (loadingFrame + 1) % 12; + }; + + /* + * Public methods + */ + + $.fn.fancybox = function(options) { + if (!$(this).length) { + return this; + } + + $(this) + .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))) + .unbind('click.fb') + .bind('click.fb', function(e) { + e.preventDefault(); + + if (busy) { + return; + } + + busy = true; + + $(this).blur(); + + selectedArray = []; + selectedIndex = 0; + + var rel = $(this).attr('rel') || ''; + + if (!rel || rel == '' || rel === 'nofollow') { + selectedArray.push(this); + + } else { + selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]"); + selectedIndex = selectedArray.index( this ); + } + + _start(); + + return; + }); + + return this; + }; + + $.fancybox = function(obj) { + var opts; + + if (busy) { + return; + } + + busy = true; + opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; + + selectedArray = []; + selectedIndex = parseInt(opts.index, 10) || 0; + + if ($.isArray(obj)) { + for (var i = 0, j = obj.length; i < j; i++) { + if (typeof obj[i] == 'object') { + $(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); + } else { + obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); + } + } + + selectedArray = jQuery.merge(selectedArray, obj); + + } else { + if (typeof obj == 'object') { + $(obj).data('fancybox', $.extend({}, opts, obj)); + } else { + obj = $({}).data('fancybox', $.extend({content : obj}, opts)); + } + + selectedArray.push(obj); + } + + if (selectedIndex > selectedArray.length || selectedIndex < 0) { + selectedIndex = 0; + } + + _start(); + }; + + $.fancybox.showActivity = function() { + clearInterval(loadingTimer); + + loading.show(); + loadingTimer = setInterval(_animate_loading, 66); + }; + + $.fancybox.hideActivity = function() { + loading.hide(); + }; + + $.fancybox.next = function() { + return $.fancybox.pos( currentIndex + 1); + }; + + $.fancybox.prev = function() { + return $.fancybox.pos( currentIndex - 1); + }; + + $.fancybox.pos = function(pos) { + if (busy) { + return; + } + + pos = parseInt(pos); + + selectedArray = currentArray; + + if (pos > -1 && pos < currentArray.length) { + selectedIndex = pos; + _start(); + + } else if (currentOpts.cyclic && currentArray.length > 1) { + selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; + _start(); + } + + return; + }; + + $.fancybox.cancel = function() { + if (busy) { + return; + } + + busy = true; + + $.event.trigger('fancybox-cancel'); + + _abort(); + + selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); + + busy = false; + }; + + // Note: within an iframe use - parent.$.fancybox.close(); + $.fancybox.close = function() { + if (busy || wrap.is(':hidden')) { + return; + } + + busy = true; + + if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { + busy = false; + return; + } + + _abort(); + + $(close.add( nav_left ).add( nav_right )).hide(); + + $(content.add( overlay )).unbind(); + + $(window).unbind("resize.fb scroll.fb"); + $(document).unbind('keydown.fb'); + + content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank'); + + if (currentOpts.titlePosition !== 'inside') { + title.empty(); + } + + wrap.stop(); + + function _cleanup() { + overlay.fadeOut('fast'); + + title.empty().hide(); + wrap.hide(); + + $.event.trigger('fancybox-cleanup'); + + content.empty(); + + currentOpts.onClosed(currentArray, currentIndex, currentOpts); + + currentArray = selectedOpts = []; + currentIndex = selectedIndex = 0; + currentOpts = selectedOpts = {}; + + busy = false; + } + + if (currentOpts.transitionOut == 'elastic') { + start_pos = _get_zoom_from(); + + var pos = wrap.position(); + + final_pos = { + top : pos.top , + left : pos.left, + width : wrap.width(), + height : wrap.height() + }; + + if (currentOpts.opacity) { + final_pos.opacity = 1; + } + + title.empty().hide(); + + fx.prop = 1; + + $(fx).animate({ prop: 0 }, { + duration : currentOpts.speedOut, + easing : currentOpts.easingOut, + step : _draw, + complete : _cleanup + }); + + } else { + wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup); + } + }; + + $.fancybox.resize = function() { + if (overlay.is(':visible')) { + overlay.css('height', $(document).height()); + } + + $.fancybox.center(true); + }; + + $.fancybox.center = function() { + var view, align; + + if (busy) { + return; + } + + align = arguments[0] === true ? 1 : 0; + view = _get_viewport(); + + if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { + return; + } + + wrap + .stop() + .animate({ + 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)), + 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding)) + }, typeof arguments[0] == 'number' ? arguments[0] : 200); + }; + + $.fancybox.init = function() { + if ($("#fancybox-wrap").length) { + return; + } + + $('body').append( + tmp = $('
      '), + loading = $('
      '), + overlay = $('
      '), + wrap = $('
      ') + ); + + outer = $('
      ') + .append('
      ') + .appendTo( wrap ); + + outer.append( + content = $('
      '), + close = $(''), + title = $('
      '), + + nav_left = $(''), + nav_right = $('') + ); + + close.click($.fancybox.close); + loading.click($.fancybox.cancel); + + nav_left.click(function(e) { + e.preventDefault(); + $.fancybox.prev(); + }); + + nav_right.click(function(e) { + e.preventDefault(); + $.fancybox.next(); + }); + + if ($.fn.mousewheel) { + wrap.bind('mousewheel.fb', function(e, delta) { + if (busy) { + e.preventDefault(); + + } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { + e.preventDefault(); + $.fancybox[ delta > 0 ? 'prev' : 'next'](); + } + }); + } + + if (!$.support.opacity) { + wrap.addClass('fancybox-ie'); + } + + if (isIE6) { + loading.addClass('fancybox-ie6'); + wrap.addClass('fancybox-ie6'); + + $('').prependTo(outer); + } + }; + + $.fn.fancybox.defaults = { + padding : 10, + margin : 40, + opacity : false, + modal : false, + cyclic : false, + scrolling : 'auto', // 'auto', 'yes' or 'no' + + width : 560, + height : 340, + + autoScale : true, + autoDimensions : true, + centerOnScroll : false, + + ajax : {}, + swf : { wmode: 'transparent' }, + + hideOnOverlayClick : true, + hideOnContentClick : false, + + overlayShow : true, + overlayOpacity : 0.7, + overlayColor : '#777', + + titleShow : true, + titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' + titleFormat : null, + titleFromAlt : false, + + transitionIn : 'fade', // 'elastic', 'fade' or 'none' + transitionOut : 'fade', // 'elastic', 'fade' or 'none' + + speedIn : 300, + speedOut : 300, + + changeSpeed : 300, + changeFade : 'fast', + + easingIn : 'swing', + easingOut : 'swing', + + showCloseButton : true, + showNavArrows : true, + enableEscapeButton : true, + enableKeyboardNav : true, + + onStart : function(){}, + onCancel : function(){}, + onComplete : function(){}, + onCleanup : function(){}, + onClosed : function(){}, + onError : function(){} + }; + + $(document).ready(function() { + $.fancybox.init(); + }); + +})(jQuery); \ No newline at end of file diff --git a/web/0.3.4/scripts/jquery.masonry.js b/web/0.3.4/scripts/jquery.masonry.js new file mode 100644 index 0000000..fbf8425 --- /dev/null +++ b/web/0.3.4/scripts/jquery.masonry.js @@ -0,0 +1,308 @@ +/************************************************* +** jQuery Masonry version 1.2.0 +** copyright David DeSandro, licensed GPL & MIT +** http://desandro.com/resources/jquery-masonry +**************************************************/ +;(function($){ + + /*! + * smartresize: debounced resize event for jQuery + * http://github.com/lrbabe/jquery-smartresize + * + * Copyright (c) 2009 Louis-Remi Babe + * Licensed under the GPL license. + * http://docs.jquery.com/License + * + */ + var event = $.event, + resizeTimeout; + + event.special[ "smartresize" ] = { + setup: function() { + $( this ).bind( "resize", event.special.smartresize.handler ); + }, + teardown: function() { + $( this ).unbind( "resize", event.special.smartresize.handler ); + }, + handler: function( event, execAsap ) { + // Save the context + var context = this, + args = arguments; + + // set correct event type + event.type = "smartresize"; + + if(resizeTimeout) + clearTimeout(resizeTimeout); + resizeTimeout = setTimeout(function() { + jQuery.event.handle.apply( context, args ); + }, execAsap === "execAsap"? 0 : 100); + } + }; + + $.fn.smartresize = function( fn ) { + return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] ); + }; + + + + // masonry code begin + $.fn.masonry = function(options, callback) { + + function getBricks(props, opts) { + props.$bricks = opts.itemSelector == undefined ? + opts.$brickParent.children() : + opts.$brickParent.find(opts.itemSelector); + } + + function placeBrick($brick, setCount, setY, setSpan, props, opts) { + var shortCol = 0; + + for ( i=0; i < setCount; i++ ) { + if ( setY[i] < setY[ shortCol ] ) shortCol = i; + } + + var position = { + left: props.colW * shortCol + props.posLeft, + top: setY[ shortCol ] + }; + + + if( props.masoned && opts.animate ) { + $brick.animate( position, { + duration: opts.animationOptions.duration, + easing: opts.animationOptions.easing, + complete: opts.animationOptions.complete, + step: opts.animationOptions.step, + queue: opts.animationOptions.queue, + specialEasing: opts.animationOptions.specialEasing + }); + } else { + $brick.css(position); + } + + for ( i=0; i < setSpan; i++ ) { + props.colY[ shortCol + i ] = setY[ shortCol ] + $brick.outerHeight(true) ; + } + }; + + + function masonrySetup($wall, opts, props) { + getBricks(props, opts); + + if ( opts.columnWidth == undefined) { + props.colW = props.masoned ? + $wall.data('masonry').colW : + props.$bricks.outerWidth(true); + } else { + props.colW = opts.columnWidth; + } + + props.colCount = Math.floor( $wall.width() / props.colW ) ; + props.colCount = Math.max( props.colCount, 1 ); + }; + + + function masonryArrange($wall, opts, props) { + // if masonry hasn't been called before + if( !props.masoned ) $wall.css( 'position', 'relative' ); + + if ( !props.masoned || opts.appendedContent != undefined ) { + // just the new bricks + props.$bricks.css( 'position', 'absolute' ); + } + + // get top left position of where the bricks should be + var cursor = $('
      '); + $wall.prepend( cursor ); + props.posTop = Math.round( cursor.position().top ); + props.posLeft = Math.round( cursor.position().left ); + cursor.remove(); + + // set up column Y array + if ( props.masoned && opts.appendedContent != undefined ) { + // if appendedContent is set, use colY from last call + props.colY = $wall.data('masonry').colY; + + /* + * in the case that the wall is not resizeable, + * but the colCount has changed from the previous time + * masonry has been called + */ + for (i= $wall.data('masonry').colCount; i < props.colCount; i++) { + props.colY[i] = props.posTop; + }; + + } else { + props.colY = []; + for ( i=0; i < props.colCount; i++) { + props.colY[i] = props.posTop; + } + } + + + // layout logic + if ( opts.singleMode ) { + props.$bricks.each(function(){ + var $brick = $(this); + placeBrick($brick, props.colCount, props.colY, 1, props, opts); + }); + } else { + props.$bricks.each(function() { + var $brick = $(this); + + //how many columns does this brick span + var colSpan = Math.ceil( $brick.outerWidth(true) / props.colW); + colSpan = Math.min( colSpan, props.colCount ); + + + if ( colSpan == 1 ) { + // if brick spans only one column, just like singleMode + placeBrick($brick, props.colCount, props.colY, 1, props, opts); + } else { + // brick spans more than one column + + //how many different places could this brick fit horizontally + var groupCount = props.colCount + 1 - colSpan; + var groupY = [0]; + // for each group potential horizontal position + for ( i=0; i < groupCount; i++ ) { + groupY[i] = 0; + // for each column in that group + for ( j=0; j < colSpan; j++ ) { + // get the maximum column height in that group + groupY[i] = Math.max( groupY[i], props.colY[i+j] ); + } + } + + placeBrick($brick, groupCount, groupY, colSpan, props, opts); + } + }); // /props.bricks.each(function() { + } // /layout logic + + // set the height of the wall to the tallest column + props.wallH = 0; + for ( i=0; i < props.colCount; i++ ) { + props.wallH = Math.max( props.wallH, props.colY[i] ); + } + var wallCSS = { height: props.wallH - props.posTop }; + // $wall.height( props.wallH - props.posTop ); + if ( props.masoned && opts.animate ) { + $wall.animate(wallCSS, { + duration: opts.animationOptions.duration, + easing: opts.animationOptions.easing, + complete: opts.animationOptions.complete, + step: opts.animationOptions.step, + queue: opts.animationOptions.queue, + specialEasing: opts.animationOptions.specialEasing + }); + } else { + $wall.css(wallCSS); + } + + // add masoned class first time around + if ( !props.masoned ) $wall.addClass('masoned'); + + // provide props.bricks as context for the callback + callback.call( props.$bricks ); + + // set all data so we can retrieve it for appended appendedContent + // or anyone else's crazy jquery fun + $wall.data('masonry', props ); + + + }; // /masonryArrange function + + + function masonryResize($wall, opts, props) { + props.masoned = $wall.data('masonry') != undefined; + var prevColCount = $wall.data('masonry').colCount; + masonrySetup($wall, opts, props); + if ( props.colCount != prevColCount ) masonryArrange($wall, opts, props); + }; + + + /* + * let's begin + * IN A WORLD... + */ + return this.each(function() { + + var $wall = $(this); + + var props = $.extend( {}, $.masonry ); + + // checks if masonry has been called before on this object + props.masoned = $wall.data('masonry') != undefined; + + var previousOptions = props.masoned ? $wall.data('masonry').options : {}; + + var opts = $.extend( + {}, + props.defaults, + previousOptions, + options + ); + + // should we save these options for next time? + props.options = opts.saveOptions ? opts : previousOptions; + + //picked up from Paul Irish + callback = callback || function(){}; + + + if ( props.masoned && opts.appendedContent != undefined ) { + // if we're dealing with appendedContent + opts.$brickParent = opts.appendedContent; + } else { + opts.$brickParent = $wall; + } + + getBricks(props, opts); + + + if ( props.$bricks.length ) { + // call masonry layout + masonrySetup($wall, opts, props); + masonryArrange($wall, opts, props); + + // binding window resizing + var resizeOn = previousOptions.resizeable; + if ( !resizeOn && opts.resizeable ) { + $(window).bind('smartresize.masonry', function() { masonryResize($wall, opts, props); } ); + } + if ( resizeOn && !opts.resizeable ) $(window).unbind('smartresize.masonry'); + } else { + // brickParent is empty, do nothing, go back home and eat chips + return this; + } + + }); // /return this.each(function() + }; // /$.fn.masonry = function(options) + + + + $.masonry = { + defaults : { + singleMode: false, + columnWidth: undefined, + itemSelector: undefined, + appendedContent: undefined, + saveOptions: true, + resizeable: true, + animate: false, + animationOptions: {} + }, + colW: undefined, + colCount: undefined, + colY: undefined, + wallH: undefined, + masoned: undefined, + posTop: 0, + posLeft: 0, + options: undefined, + $bricks: undefined, + $brickParent: undefined + }; + +})(jQuery); \ No newline at end of file diff --git a/web/0.3.4/scripts/jquery.textOverflow.js b/web/0.3.4/scripts/jquery.textOverflow.js new file mode 100644 index 0000000..6be6e62 --- /dev/null +++ b/web/0.3.4/scripts/jquery.textOverflow.js @@ -0,0 +1,108 @@ +/*! + * jQuery Text Overflow v0.7 + * + * Licensed under the new BSD License. + * Copyright 2009-2010, Bram Stein + * All rights reserved. + */ +/*global jQuery, document, setInterval*/ +(function ($) { + var style = document.documentElement.style, + hasTextOverflow = ('textOverflow' in style || 'OTextOverflow' in style), + + domSplit = function (root, maxIndex) { + var index = 0, result = [], + domSplitAux = function (nodes) { + var i = 0, tmp; + + if (index > maxIndex) { + return; + } + + for (i = 0; i < nodes.length; i += 1) { + if (nodes[i].nodeType === 1) { + tmp = nodes[i].cloneNode(false); + result[result.length - 1].appendChild(tmp); + result.push(tmp); + domSplitAux(nodes[i].childNodes); + result.pop(); + } else if (nodes[i].nodeType === 3) { + if (index + nodes[i].length < maxIndex) { + result[result.length - 1].appendChild(nodes[i].cloneNode(false)); + } else { + tmp = nodes[i].cloneNode(false); + tmp.textContent = $.trim(tmp.textContent.substring(0, maxIndex - index)); + result[result.length - 1].appendChild(tmp); + } + index += nodes[i].length; + } else { + result.appendChild(nodes[i].cloneNode(false)); + } + } + }; + result.push(root.cloneNode(false)); + domSplitAux(root.childNodes); + return $(result.pop().childNodes); + }; + + $.extend($.fn, { + textOverflow: function (str, autoUpdate) { + var more = str || '…'; + + if (!hasTextOverflow) { + return this.each(function () { + var element = $(this), + + // the clone element we modify to measure the width + clone = element.clone(), + + // we save a copy so we can restore it if necessary + originalElement = element.clone(), + originalText = element.text(), + originalWidth = element.width(), + low = 0, mid = 0, + high = originalText.length, + reflow = function () { + if (originalWidth !== element.width()) { + element.replaceWith(originalElement); + element = originalElement; + originalElement = element.clone(); + element.textOverflow(str, false); + originalWidth = element.width(); + } + }; + + element.after(clone.hide().css({ + 'position': 'absolute', + 'width': 'auto', + 'overflow': 'visible', + 'max-width': 'inherit' + })); + + if (clone.width() > originalWidth) { + while (low < high) { + mid = Math.floor(low + ((high - low) / 2)); + clone.empty().append(domSplit(originalElement.get(0), mid)).append(more); + if (clone.width() < originalWidth) { + low = mid + 1; + } else { + high = mid; + } + } + + if (low < originalText.length) { + element.empty().append(domSplit(originalElement.get(0), low - 1)).append(more); + } + } + clone.remove(); + + if (autoUpdate) { + setInterval(reflow, 200); + } + }); + } else { + return this; + } + } + }); +})(jQuery); diff --git a/web/0.3.4/scripts/jquery.tmpl.js b/web/0.3.4/scripts/jquery.tmpl.js new file mode 100644 index 0000000..936a7bf --- /dev/null +++ b/web/0.3.4/scripts/jquery.tmpl.js @@ -0,0 +1,486 @@ + /* + * jQuery Templating Plugin + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + */ +(function( jQuery, undefined ){ + var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$/, + newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = []; + + function newTmplItem( options, parentItem, fn, data ) { + // Returns a template item data structure for a new rendered instance of a template (a 'template item'). + // The content field is a hierarchical array of strings and nested items (to be + // removed and replaced by nodes field of dom elements, once inserted in DOM). + var newItem = { + data: data || (parentItem ? parentItem.data : {}), + _wrap: parentItem ? parentItem._wrap : null, + tmpl: null, + parent: parentItem || null, + nodes: [], + calls: tiCalls, + nest: tiNest, + wrap: tiWrap, + html: tiHtml, + update: tiUpdate + }; + if ( options ) { + jQuery.extend( newItem, options, { nodes: [], parent: parentItem } ); + } + if ( fn ) { + // Build the hierarchical content to be used during insertion into DOM + newItem.tmpl = fn; + newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem ); + newItem.key = ++itemKey; + // Keep track of new template item, until it is stored as jQuery Data on DOM element + (stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem; + } + return newItem; + } + + // Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core). + jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" + }, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var ret = [], insert = jQuery( selector ), + parent = this.length === 1 && this[0].parentNode; + + appendToTmplItems = newTmplItems || {}; + if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { + insert[ original ]( this[0] ); + ret = this; + } else { + for ( var i = 0, l = insert.length; i < l; i++ ) { + cloneIndex = i; + var elems = (i > 0 ? this.clone(true) : this).get(); + jQuery.fn[ original ].apply( jQuery(insert[i]), elems ); + ret = ret.concat( elems ); + } + cloneIndex = 0; + ret = this.pushStack( ret, name, insert.selector ); + } + var tmplItems = appendToTmplItems; + appendToTmplItems = null; + jQuery.tmpl.complete( tmplItems ); + return ret; + }; + }); + + jQuery.fn.extend({ + // Use first wrapped element as template markup. + // Return wrapped set of template items, obtained by rendering template against data. + tmpl: function( data, options, parentItem ) { + return jQuery.tmpl( this[0], data, options, parentItem ); + }, + + // Find which rendered template item the first wrapped DOM element belongs to + tmplItem: function() { + return jQuery.tmplItem( this[0] ); + }, + + // Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template. + templates: function( name ) { + return jQuery.templates( name, this[0] ); + }, + + domManip: function( args, table, callback, options ) { + // This appears to be a bug in the appendTo, etc. implementation + // it should be doing .call() instead of .apply(). See #6227 + if ( args[0].nodeType ) { + var dmArgs = jQuery.makeArray( arguments ), argsLength = args.length, i = 0, tmplItem; + while ( i < argsLength && !(tmplItem = jQuery.data( args[i++], "tmplItem" ))) {}; + if ( argsLength > 1 ) { + dmArgs[0] = [jQuery.makeArray( args )]; + } + if ( tmplItem && cloneIndex ) { + dmArgs[2] = function( fragClone ) { + // Handler called by oldManip when rendered template has been inserted into DOM. + jQuery.tmpl.afterManip( this, fragClone, callback ); + } + } + oldManip.apply( this, dmArgs ); + } else { + oldManip.apply( this, arguments ); + } + cloneIndex = 0; + if ( !appendToTmplItems ) { + jQuery.tmpl.complete( newTmplItems ); + } + return this; + } + }); + + jQuery.extend({ + // Return wrapped set of template items, obtained by rendering template against data. + tmpl: function( tmpl, data, options, parentItem ) { + var ret, topLevel = !parentItem; + if ( topLevel ) { + // This is a top-level tmpl call (not from a nested template using {{tmpl}}) + parentItem = topTmplItem; + tmpl = jQuery.templates[tmpl] || jQuery.templates( null, tmpl ); + } else if ( !tmpl ) { + // The template item is already associated with DOM - this is a refresh. + // Re-evaluate rendered template for the parentItem + tmpl = parentItem.tmpl; + newTmplItems[parentItem.key] = parentItem; + parentItem.nodes = []; + updateWrapped( parentItem ); + // Rebuild, without creating a new template item + return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) )); + } + if ( !tmpl ) { + return []; // Could throw... + } + if ( typeof data === "function" ) { + data = data.call( parentItem || {} ); + } + if ( options && options.wrapped ) { + // Create template item for wrapped content, without rendering template + parentItem = newTmplItem( options, parentItem, null, data ); + parentItem.key = ++itemKey; + wrappedItems[itemKey] = parentItem; + parentItem.tmpl = tmpl; + updateWrapped( parentItem ); + } + ret = jQuery.isArray( data ) ? + jQuery.map( data, function( dataItem ) { + return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null; + }) : + [ newTmplItem( options, parentItem, tmpl, data ) ]; + + return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret; + }, + + // Return rendered template item for an element. + tmplItem: function( elem ) { + var tmplItem; + if ( elem instanceof jQuery ) { + elem = tmpl[0]; + } + while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {} + return tmplItem || topTmplItem; + }, + + // Set: + // Use $.templates( name, tmpl ) to cache a named template, + // where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc. + // Use $( "selector" ).templates( name ) to provide access by name to a script block template declaration. + + // Get: + // Use $.templates( name ) to access a cached template. + // Also $( selectorToScriptBlock ).templates(), or $.templates( null, templateString ) + // will return the compiled template, without adding a name reference. + // If templateString includes at least one HTML tag, $.templates( templateString ) is equivalent + // to $.templates( null, templateString ) + templates: function( name, tmpl ) { + if (tmpl) { + // Compile template and associate with name + if ( typeof tmpl === "string" ) { + // This is an HTML string being passed directly in. + tmpl = buildTmplFn( tmpl ) + } else if ( tmpl instanceof jQuery ) { + tmpl = tmpl[0] || {}; + } + if ( tmpl.nodeType ) { + // If this is a template block, use cached copy, or generate tmpl function and cache. + tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML )); + } + return typeof name === "string" ? (jQuery.templates[name] = tmpl) : tmpl; + } + // Return named compiled template + return typeof name !== "string" ? jQuery.templates( null, name ): + (jQuery.templates[name] || + // If not in map, treat as a selector. (If integrated with core, use quickExpr.exec) + jQuery.templates( null, htmlExpr.test( name ) ? name : jQuery( name ))); + }, + + encode: function( text ) { + // Do HTML encoding replacing < > & and ' and " by corresponding entities. + return ("" + text).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'"); + } + }); + + jQuery.extend( jQuery.tmpl, { + tags: { + "tmpl": { + _default: { $2: "null" }, + open: "if($notnull_1){_=_.concat($item.nest($1,$2));}" + // tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions) + // This means that {{tmpl foo}} treats foo as a template (which IS a function). + // Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}. + }, + "wrap": { + _default: { $2: "null" }, + open: "$item.calls(_,$1,$2);_=[];", + close: "call=$item.calls();_=call._.concat($item.wrap(call,_));" + }, + "each": { + _default: { $2: "$index, $value" }, + open: "if($notnull_1){$.each($1a,function($2){with(this){", + close: "}});}" + }, + "if": { + open: "if(($notnull_1) && $1a){", + close: "}" + }, + "else": { + open: "}else{" + }, + "html": { + open: "if($notnull_1){_.push($1a);}" + }, + "=": { + _default: { $1: "$data" }, + open: "if($notnull_1){_.push($.encode($1a));}" + } + }, + + // This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events + complete: function( items ) { + newTmplItems = {}; + }, + + // Call this from code which overrides domManip, or equivalent + // Manage cloning/storing template items etc. + afterManip: function afterManip( elem, fragClone, callback ) { + // Provides cloned fragment ready for fixup prior to and after insertion into DOM + var content = fragClone.nodeType === 11 ? + jQuery.makeArray(fragClone.childNodes) : + fragClone.nodeType === 1 ? [fragClone] : []; + + // Return fragment to original caller (e.g. append) for DOM insertion + callback.call( elem, fragClone ); + + // Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data. + storeTmplItems( content ); + cloneIndex++; + } + }); + + //========================== Private helper functions, used by code above ========================== + + function build( tmplItem, nested, content ) { + // Convert hierarchical content into flat string array + // and finally return array of fragments ready for DOM insertion + var frag, ret = jQuery.map( content, function( item ) { + return (typeof item === "string") ? + // Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM. + item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : + // This is a child template item. Build nested template. + build( item, tmplItem, item._ctnt ); + }); + if ( nested ) { + return ret; + } + // top-level template + ret = ret.join(""); + + // Support templates which have initial or final text nodes, or consist only of text + // Also support HTML entities within the HTML markup. + ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) { + frag = jQuery( middle ).get(); + + storeTmplItems( frag ); + if ( before ) { + frag = unencode( before ).concat(frag); + } + if ( after ) { + frag = frag.concat(unencode( after )); + } + }); + return frag ? frag : unencode( ret ); + } + + function unencode( text ) { + // Use createElement, since createTextNode will not render HTML entities correctly + var el = document.createElement( "div" ); + el.innerHTML = text; + return jQuery.makeArray(el.childNodes); + } + + // Generate a reusable function that will serve to render a template against data + function buildTmplFn( markup ) { + return new Function("jQuery","$item", + "var $=jQuery,_=[],$data=$item.data;" + + + // Introduce the data as local variables using with(){} + "with($data){_.push('" + + + // Convert the template into pure JavaScript + $.trim(markup) + .replace( /([\\'])/g, "\\$1" ) + .replace( /[\r\t\n]/g, " " ) + .replace( /\${([^}]*)}/g, "{{= $1}}" ) + .replace( /{{(\/?)(\w+|.)(?:\(((?:.(?!}}))*?)?\))?(?:\s+(.*?)?)?(\((.*?)\))?\s*}}/g, + function( all, slash, type, fnargs, target, parens, args ) { + var cmd = jQuery.tmpl.tags[ type ], def, expr, exprAutoFnDetect; + if ( !cmd ) { + throw "Template command not found: " + type; + } + def = cmd._default || []; + if ( target ) { + target = unescape( target ); + args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : ""); + if ( parens && target.indexOf(".") > -1 ) { + // Support for target being things like a.toLowerCase(); + // In that case don't call with template item as 'this' pointer. Just evaluate... + target += parens; + args = ""; + } + expr = args ? ("(" + target + ").call($item" + args) : target; + exprAutoFnDetect = args ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))"; + } else { + expr = def["$1"] || "null"; + } + fnargs = unescape( fnargs ); + return "');" + + cmd[ slash ? "close" : "open" ] + .split( "$notnull_1" ).join( "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" ) + .split( "$1a" ).join( exprAutoFnDetect ) + .split( "$1" ).join( expr ) + .split( "$2" ).join( fnargs ? + fnargs.replace( /\s*([^\(]+)\s*(\((.*?)\))?/g, function( all, name, parens, params ) { + params = params ? ("," + params + ")") : (parens ? ")" : ""); + return params ? ("(" + name + ").call($item" + params) : all; + }) + : (def["$2"]||"") + ) + + "_.push('"; + }) + + "');}return _;" + ); + } + + function updateWrapped( tmplItem ) { + if ( tmplItem.wrapped ) { + var wrapped = tmplItem.wrapped; + // Build the wrapped content + tmplItem._wrap = build( tmplItem, true, + jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()] + ).join(""); + } + } + + function unescape( args ) { + return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null; + } + function outerHtml( elem ) { + var div = document.createElement("div"); + div.appendChild( elem.cloneNode(true) ); + return div.innerHTML; + } + + // Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance. + function storeTmplItems( content ) { + var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}; + for ( var i = 0, l = content.length; i < l; i++ ) { + if ( (elem = content[i]).nodeType !== 1 ) { + continue; + } + elems = elem.getElementsByTagName("*"); + for ( var m = elems.length - 1; m >= 0; m-- ) { + processItemKey( elems[m] ); + } + processItemKey( elem ); + } + // Cannot remove temporary wrappedItem objects, since needed during updating of nested items. //wrappedItems = {}; + // TODO - ensure no memory leaks + + function processItemKey( el ) { + var pntKey, pntNode = el, pntItem, tmplItem, key; + // Ensure that each rendered template inserted into the DOM has its own template item, + if ( key = el.getAttribute( tmplItmAtt )) { + while ((pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { } + if ( pntKey !== key ) { + // The next ancestor with a _tmplitem expando is on a different key than this one. + // So this is a top-level element within this template item + pntNode = pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0); + if ( !(tmplItem = newTmplItems[key]) ) { + // The item is for wrapped content, and was copied from the temporary parent wrappedItem. + tmplItem = wrappedItems[key]; + tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode], null, true ); + tmplItem.key = ++itemKey; + // Note that there is a remaining issue on parenting of wrappedItems. + // ...Currently there may be additional newTmplItems items wrapped contexts, leading to duplicate rendered events. + newTmplItems[itemKey] = tmplItem; + } + if ( cloneIndex ) { + cloneTmplItem( key ); + } + } + el.removeAttribute( tmplItmAtt ); + } else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) { + // This was a rendered element, cloned during append or appendTo etc. + // TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem. + cloneTmplItem( tmplItem.key ); + newTmplItems[tmplItem.key] = tmplItem; + pntNode = jQuery.data( el.parentNode, "tmplItem" ); + pntNode = pntNode ? pntNode.key : 0; + } + if ( tmplItem ) { + pntItem = tmplItem; + // Find the template item of the parent element + while ( pntItem && pntItem.key != pntNode ) { + // Add this element as a top-level node for this rendered template item, as well as for any + // ancestor items between this item and the item of its parent element + pntItem.nodes.push( el ); + pntItem = pntItem.parent; + } + // Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering... + delete tmplItem._ctnt; + delete tmplItem._wrap; + // Store template item as jQuery data on the element + jQuery.data( el, "tmplItem", tmplItem ); + } + function cloneTmplItem( key ) { + key = key + keySuffix; + tmplItem = newClonedItems[key] + = (newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true )); + } + } + } + + //---- Helper functions for template item ---- + + function tiCalls( content, tmpl, data, options ) { + if ( !content ) { + return stack.pop(); + } + var l = stack.length; + stack.push({ _: content, tmpl: tmpl, parent: l ? stack[l - 1].item : this, item:this, data: data, options: options }); + } + + function tiNest( tmpl, data, options ) { + // nested template, using {{tmpl}} tag + return jQuery.tmpl( jQuery.templates( tmpl ), data, options, this ); + } + + function tiWrap( call, wrapped ) { + // nested template, using {{wrap}} tag + var options = call.options; + options.wrapped = wrapped; + // Apply the template, which may incorporate wrapped content, + return jQuery.tmpl( jQuery.templates( call.tmpl ), call.data, options, call.parent ); + } + + function tiHtml( filter, textOnly ) { + var wrapped = this._wrap; + return jQuery.map( + jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ), + function(e) { + return textOnly ? + e.innerText || e.textContent : + e.outerHTML || outerHtml(e); + }); + } + + function tiUpdate() { + var coll = this.nodes; + jQuery.tmpl( null, null, null, this).insertBefore( coll[0] ); + jQuery( coll ).remove(); + } +})(jQuery); diff --git a/web/0.3.4/scripts/jquery.vgrid.0.1.5.js b/web/0.3.4/scripts/jquery.vgrid.0.1.5.js new file mode 100644 index 0000000..d048205 --- /dev/null +++ b/web/0.3.4/scripts/jquery.vgrid.0.1.5.js @@ -0,0 +1,334 @@ +/** + * jQuery VGrid v0.1.5 - variable grid layout plugin + * + * Terms of Use - jQuery VGrid + * under the MIT (http://www.opensource.org/licenses/mit-license.php) License. + * + * Copyright 2009-2010 xlune.com All rights reserved. + * (http://blog.xlune.com/2009/09/jqueryvgrid.html) + */ +(function($) +{ + function makePos(self) + { + var _childs = self.data("_vgchild"); + var _width = self.width(); + var _matrix = [[0,_width,0]]; + var _hmax=0, _c, _size, _point; + _childs.each(function(i) + { + _c = $(this); + _size = getSize(_c); + _point = getAttachPoint(_matrix, _size[0]); + _matrix = updateAttachArea(_matrix, _point, _size); + _hmax = Math.max(_hmax, _point[1] + _size[1]); + _c.data("_vgleft", _point[0]); + _c.data("_vgtop", _point[1]); + }); + self.data("_vgwrapheight", _hmax); + heightTo(self); + }; + function getAttachPoint(mtx, width) + { + var _mtx = mtx.concat().sort(matrixSortDepth); + var _max = _mtx[_mtx.length-1][2]; + for(var i=0,imax=_mtx.length; i= _max) break; + if(_mtx[i][1]-_mtx[i][0] >= width) + { + return [_mtx[i][0], _mtx[i][2]]; + } + } + return [0, _max]; + }; + function updateAttachArea(mtx, point, size) + { + var _mtx = mtx.concat().sort(matrixSortDepth); + var _cell = [point[0], point[0]+size[0], point[1]+size[1]]; + for(var i=0,imax=_mtx.length; i b[0]) || a[2] > b[2]) ? 1 : -1; + }; + function matrixSortX(a, b) + { + if(!a || !b) return 0; + return (a[0] > b[0]) ? 1 : -1; + }; + function matrixJoin(mtx, cell) + { + var _mtx = mtx.concat([cell]).sort(matrixSortX); + var _mtx_join = []; + for(var i=0,imax=_mtx.length; i 0 + && _mtx_join[_mtx_join.length-1][1] == _mtx[i][0] + && _mtx_join[_mtx_join.length-1][2] == _mtx[i][2]) + { + _mtx_join[_mtx_join.length-1][1] = _mtx[i][1]; + } + else + { + _mtx_join.push(_mtx[i]); + } + } + return _mtx_join; + }; + function matrixTrimWidth(a, b) + { + if(a[0] >= b[0] && a[0] < b[1] || a[1] >= b[0] && a[1] < b[1]) + { + if(a[0] >= b[0] && a[0] < b[1]) + { + a[0] = b[1]; + } + else + { + a[1] = b[0]; + } + } + return a; + }; + function getSize(child) + { + var _w = child.width(); + var _h = child.height(); + _w += Number(child.css("margin-left").replace('px', '')) + +Number(child.css("padding-left").replace('px', '')) + +Number(child.get(0).style.borderLeftWidth.replace('px', '')) + +Number(child.css("margin-right").replace('px', '')) + +Number(child.css("padding-right").replace('px', '')) + +Number(child.get(0).style.borderRightWidth.replace('px', '')); + _h += Number(child.css("margin-top").replace('px', '')) + +Number(child.css("padding-top").replace('px', '')) + +Number(child.get(0).style.borderTopWidth.replace('px', '')) + +Number(child.css("margin-bottom").replace('px', '')) + +Number(child.css("padding-bottom").replace('px', '')) + +Number(child.get(0).style.borderBottomWidth.replace('px', '')); + return [_w, _h]; + }; + function heightTo(self) + { + var _self = self; + var _delay = _self.data("_vgchild").length + * (_self.data("_vgopt").delay || 0) + + _self.data("_vgopt").time || 500; + _self.stop(); + if(_self.height() < _self.data("_vgwrapheight")) + { + if($.browser.msie) + { + _self.height(_self.data("_vgwrapheight")); + } + else + { + _self.animate( + { + height: _self.data("_vgwrapheight")+"px" + }, + (_self.data("_vgopt").time || 500), + "easeOutQuart" + ); + } + } + else + { + clearTimeout(_self.data("_vgwraptimeout")); + _self.data("_vgwraptimeout", setTimeout(function(){ + if($.browser.msie) + { + _self.height(_self.data("_vgwrapheight")); + } + else + { + _self.animate( + { + height: _self.data("_vgwrapheight")+"px" + }, + (_self.data("_vgopt").time || 500), + "easeOutQuart" + ); + } + }, _delay)); + } + }; + function moveTo(childs) + { + var _c; + childs.each(function(i) + { + _c = $(this); + _c.css("left", ~~_c.data("_vgleft")+"px"); + _c.css("top", ~~_c.data("_vgtop")+"px"); + }); + }; + function animateTo(childs, easing, time, delay) + { + var _self = $(childs).parent(); + var isMove = false; + var imax = childs.length; + var i,_c,_pos; + for(i=0; i") + .text(" ") + .attr("id", "_vgridspan") + .hide() + .appendTo("body"); + s.data("size", s.css("font-size")); + s.data("timer", setInterval(function(){ + if(s.css("font-size") != s.data("size")) + { + s.data("size", s.css("font-size")); + $(window).resize(); + } + }, 1000)); + }; + $.fn.extend({ + vgrid: function(option) + { + var _self = $(this); + var _opt = option || {}; + _self.data("_vgopt", _opt); + _self.data("_vgchild", _self.find("> *")); + _self.data("_vgdefchild", _self.data("_vgchild")); + _self.css({ + "position": "relative", + "width": "auto" + }); + _self.data("_vgchild").css("position", "absolute"); + makePos(_self); + moveTo(_self.data("_vgchild")); + if(_self.data("_vgopt").fadeIn) + { + var _prop = (typeof(_self.data("_vgopt").fadeIn)=='object') + ? _self.data("_vgopt").fadeIn + : {time: _self.data("_vgopt").fadeIn} ; + _self.data("_vgchild").each(function(i) + { + var _c = $(this); + _c.css('display', 'none'); + setTimeout(function(){ + _c.fadeIn(_prop.time || 250); + }, i * (_prop.delay || 0)); + }); + } + $(window).resize(function(e) + { + refleshHandler(_self); + }); + setFontSizeListener(); + return _self; + }, + vgrefresh: function(easeing, time, delay, func) + { + var _obj = $(this); + if(_obj.data("_vgchild")) + { + _obj.data("_vgchild", _obj.find("> *")); + _obj.data("_vgchild").css("position", "absolute"); + makePos(_obj); + time = typeof(time)=="number" ? time : _obj.data("_vgopt").time || 500; + delay = typeof(delay)=="number" ? delay : _obj.data("_vgopt").delay || 0; + animateTo( + _obj.data("_vgchild"), + easeing || _obj.data("_vgopt").easeing || "linear", + time, + delay + ); + if(typeof(func)=='function') + { + setTimeout( + func, + _obj.data("_vgchild").length * delay + time + ); + } + } + return _obj; + }, + vgsort: function(func, easeing, time, delay) + { + var _obj = $(this); + if(_obj.data("_vgchild")) + { + _obj.data("_vgchild", _obj.data("_vgchild").sort(func)); + _obj.data("_vgchild").each(function(num){ + $(this).appendTo(_obj); + }); + makePos(_obj); + animateTo( + _obj.data("_vgchild"), + easeing || _obj.data("_vgopt").easeing || "linear", + typeof(time)=="number" ? time : _obj.data("_vgopt").time || 500, + typeof(delay)=="number" ? delay : _obj.data("_vgopt").delay || 0 + ); + } + return _obj; + } + }); +})(jQuery); diff --git a/web/0.3.4/scripts/jqueryStub.js b/web/0.3.4/scripts/jqueryStub.js new file mode 100644 index 0000000..9551bab --- /dev/null +++ b/web/0.3.4/scripts/jqueryStub.js @@ -0,0 +1,2 @@ +//A stub file used for RequireJS optimizer builds. +define({}); diff --git a/web/0.3.4/scripts/json2.js b/web/0.3.4/scripts/json2.js new file mode 100644 index 0000000..d552778 --- /dev/null +++ b/web/0.3.4/scripts/json2.js @@ -0,0 +1,7 @@ +if(!this.JSON)this.JSON={}; +(function(){function k(a){return a<10?"0"+a:a}function n(a){o.lastIndex=0;return o.test(a)?'"'+a.replace(o,function(c){var d=q[c];return typeof d==="string"?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function l(a,c){var d,f,i=g,e,b=c[a];if(b&&typeof b==="object"&&typeof b.toJSON==="function")b=b.toJSON(a);if(typeof j==="function")b=j.call(c,a,b);switch(typeof b){case "string":return n(b);case "number":return isFinite(b)?String(b):"null";case "boolean":case "null":return String(b); +case "object":if(!b)return"null";g+=m;e=[];if(Object.prototype.toString.apply(b)==="[object Array]"){f=b.length;for(a=0;a 16) bkey = binl_md5(bkey, key.length * 8); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8); + return binl2rstr(binl_md5(opad.concat(hash), 512 + 128)); +} + +/* + * Convert a raw string to a hex string + */ +function rstr2hex(input) +{ + try { hexcase } catch(e) { hexcase=0; } + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var output = ""; + var x; + for(var i = 0; i < input.length; i++) + { + x = input.charCodeAt(i); + output += hex_tab.charAt((x >>> 4) & 0x0F) + + hex_tab.charAt( x & 0x0F); + } + return output; +} + +/* + * Convert a raw string to a base-64 string + */ +function rstr2b64(input) +{ + try { b64pad } catch(e) { b64pad=''; } + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var output = ""; + var len = input.length; + for(var i = 0; i < len; i += 3) + { + var triplet = (input.charCodeAt(i) << 16) + | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0) + | (i + 2 < len ? input.charCodeAt(i+2) : 0); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > input.length * 8) output += b64pad; + else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); + } + } + return output; +} + +/* + * Convert a raw string to an arbitrary string encoding + */ +function rstr2any(input, encoding) +{ + var divisor = encoding.length; + var i, j, q, x, quotient; + + /* Convert to an array of 16-bit big-endian values, forming the dividend */ + var dividend = Array(Math.ceil(input.length / 2)); + for(i = 0; i < dividend.length; i++) + { + dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1); + } + + /* + * Repeatedly perform a long division. The binary array forms the dividend, + * the length of the encoding is the divisor. Once computed, the quotient + * forms the dividend for the next step. All remainders are stored for later + * use. + */ + var full_length = Math.ceil(input.length * 8 / + (Math.log(encoding.length) / Math.log(2))); + var remainders = Array(full_length); + for(j = 0; j < full_length; j++) + { + quotient = Array(); + x = 0; + for(i = 0; i < dividend.length; i++) + { + x = (x << 16) + dividend[i]; + q = Math.floor(x / divisor); + x -= q * divisor; + if(quotient.length > 0 || q > 0) + quotient[quotient.length] = q; + } + remainders[j] = x; + dividend = quotient; + } + + /* Convert the remainders to the output string */ + var output = ""; + for(i = remainders.length - 1; i >= 0; i--) + output += encoding.charAt(remainders[i]); + + return output; +} + +/* + * Encode a string as utf-8. + * For efficiency, this assumes the input is valid utf-16. + */ +function str2rstr_utf8(input) +{ + var output = ""; + var i = -1; + var x, y; + + while(++i < input.length) + { + /* Decode utf-16 surrogate pairs */ + x = input.charCodeAt(i); + y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0; + if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) + { + x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF); + i++; + } + + /* Encode output as utf-8 */ + if(x <= 0x7F) + output += String.fromCharCode(x); + else if(x <= 0x7FF) + output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F), + 0x80 | ( x & 0x3F)); + else if(x <= 0xFFFF) + output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F), + 0x80 | ((x >>> 6 ) & 0x3F), + 0x80 | ( x & 0x3F)); + else if(x <= 0x1FFFFF) + output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07), + 0x80 | ((x >>> 12) & 0x3F), + 0x80 | ((x >>> 6 ) & 0x3F), + 0x80 | ( x & 0x3F)); + } + return output; +} + +/* + * Encode a string as utf-16 + */ +function str2rstr_utf16le(input) +{ + var output = ""; + for(var i = 0; i < input.length; i++) + output += String.fromCharCode( input.charCodeAt(i) & 0xFF, + (input.charCodeAt(i) >>> 8) & 0xFF); + return output; +} + +function str2rstr_utf16be(input) +{ + var output = ""; + for(var i = 0; i < input.length; i++) + output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, + input.charCodeAt(i) & 0xFF); + return output; +} + +/* + * Convert a raw string to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ +function rstr2binl(input) +{ + var output = Array(input.length >> 2); + for(var i = 0; i < output.length; i++) + output[i] = 0; + for(var i = 0; i < input.length * 8; i += 8) + output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32); + return output; +} + +/* + * Convert an array of little-endian words to a string + */ +function binl2rstr(input) +{ + var output = ""; + for(var i = 0; i < input.length * 32; i += 8) + output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF); + return output; +} + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ +function binl_md5(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} diff --git a/web/0.3.4/scripts/oauth.js b/web/0.3.4/scripts/oauth.js new file mode 100644 index 0000000..9369bd4 --- /dev/null +++ b/web/0.3.4/scripts/oauth.js @@ -0,0 +1,94 @@ + +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false, window: false, location: false */ +"use strict"; + +define([ 'accounts'], +function (accounts) { + + var authDone, win, lastTime = 0; + + //Handle communication from the auth window, when it completes. + window.addEventListener("message", function (evt) { + //TODO: ideally lock down the domain check on evt.origin. + var data, status; + try { + data = JSON.parse(evt.data); + } catch (e) { + return; + } + if (data.target) { + if (data.target === 'oauth_success' && data.account) { + status = true; + accounts.update(data.account); + } else { + status = false; + } + + //Reset windows + win = null; + + if (authDone) { + authDone(status); + authDone = null; + } + } + }, false); + + return function oauth(domain, forceLogin, callback) { + if (callback) { + authDone = callback; + } + var url = location.protocol + "//" + location.host + "/0.3.4/auth.html", + currentTime = (new Date()).getTime(), + newLocation; + + //Could have a window handle, but could be closed, so account for it. + if (win && win.closed) { + win = null; + } + + //If got another request for the domain and window has not shown up yet + //for 4 seconds, or if domain is different, then try window open call. + //4 seconds is a bit arbitrary, slower systems may have a longer wait, + //but just trying to reduce the edge cases of seeing multiple windows. + if ((currentTime > lastTime + 4000)) { + lastTime = currentTime; + newLocation = url + "?domain=" + domain + (forceLogin ? '&forceLogin=1' : ''); + try { + win = window.open(newLocation, + "ffshareOAuth", + "dialog=yes, modal=yes, width=900, height=500, scrollbars=yes"); + win.focus(); + } catch (e) { + // XXX dialog=yes fails on fennec, lets just do window.location + window.location = newLocation + "&end_point_success=" + encodeURI(window.location); + } + } else if (win) { + win.focus(); + } + }; +}); diff --git a/web/0.3.4/scripts/placeholder.js b/web/0.3.4/scripts/placeholder.js new file mode 100644 index 0000000..5cf9c1c --- /dev/null +++ b/web/0.3.4/scripts/placeholder.js @@ -0,0 +1,104 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint nomen: false, plusplus: false */ +/*global define: false, clearTimeout: false, setTimeout: false */ +"use strict"; + +define(["jquery"], function ($) { + + /** + * Set the input value to use placeholder value if HTML5 placeholder + * attribute is not supported. + * @param {DOMNode} input an input element. + */ + function setPlaceholder(input) { + //If no native support for placeholder then JS to the rescue! + var missingNative = !("placeholder" in input), + placeholder = input.getAttribute("placeholder"), + trimmed = input.value.trim(); + + if (!trimmed || trimmed === placeholder) { + if (missingNative) { + $(input).addClass("placeholder"); + input.value = placeholder; + if (placeholder === "password" && input.type === "password") { + input.type = "text"; + } + } + } else { + $(input).removeClass("placeholder"); + } + } + + /** + * Handles focus events on the node to see if placehoder needs to be removed. + * @param {Event} evt + */ + function onfocus(evt) { + //Clear out placeholder, change the style. + var input = evt.target, + placeholder = input.getAttribute("placeholder"); + if (input.value === placeholder) { + if (!("placeholder" in input)) { + input.value = ""; + if (placeholder === "password" && input.type === "text") { + input.type = "password"; + } + } + $(input).removeClass("placeholder"); + } + } + + /** Handles blur events on the node to see if placeholder needs to be reinstated. + * @param {Event} evt + */ + function onblur(evt) { + //Reset placeholder text if necessary. + setPlaceholder(evt.target); + } + + /** + * Scans domNode and its children for text input/textarea elements that have a placeholder + * attribute, and attach placeholder behavior to it. + * Allow for the existence of browsers that already have placeholder support + * built in. + * + * @param {DOMNode} domNode + * @param {Widget} [widget] an optional widget that will track the connect handles. + * + */ + return function (domNode, widget) { + $('input[type="text"], input[type="password"], textarea', domNode).each(function (i, node) { + //Skip nodes that have already been bound + if (node.getAttribute("data-rdwPlaceholder") !== "set") { + $(node).focus(onfocus).blur(onblur); + + node.setAttribute("data-rdwPlaceholder", "set"); + } + + //Set up initial state. + setPlaceholder(node); + }); + }; +}); diff --git a/web/0.3.4/scripts/protovis/protovis-r3.2.js b/web/0.3.4/scripts/protovis/protovis-r3.2.js new file mode 100755 index 0000000..95bb3be --- /dev/null +++ b/web/0.3.4/scripts/protovis/protovis-r3.2.js @@ -0,0 +1,277 @@ +// fba9dc2 +var a;if(!Array.prototype.map)Array.prototype.map=function(b,c){for(var d=this.length,f=new Array(d),g=0;g>>0,f=0;f=d)throw new Error("reduce: no values, no initial value");}for(;f=0&&d=69&&m<100?1900:0)});return"([0-9]+)";case "%Y":q.push(function(m){g=m});return"([0-9]+)";case "%%":q.push(function(){}); +return"%"}return n});(f=f.match(o))&&f.forEach(function(n,m){q[m](n)});return new Date(g,h,i,j,l,k)};return c}; +pv.Format.time=function(b){function c(f){f=Number(f);switch(b){case "short":if(f>=31536E6)return(f/31536E6).toFixed(1)+" years";else if(f>=6048E5)return(f/6048E5).toFixed(1)+" weeks";else if(f>=864E5)return(f/864E5).toFixed(1)+" days";else if(f>=36E5)return(f/36E5).toFixed(1)+" hours";else if(f>=6E4)return(f/6E4).toFixed(1)+" minutes";return(f/1E3).toFixed(1)+" seconds";case "long":var g=[],h=f%36E5/6E4>>0;g.push(d("0",2,f%6E4/1E3>>0));if(f>=36E5){var i=f%864E5/36E5>>0;g.push(d("0",2,h));if(f>=864E5){g.push(d("0", +2,i));g.push(Math.floor(f/864E5).toFixed())}else g.push(i.toFixed())}else g.push(h.toFixed());return g.reverse().join(":")}}var d=pv.Format.pad;c.format=c;c.parse=function(f){switch(b){case "short":for(var g=/([0-9,.]+)\s*([a-z]+)/g,h,i=0;h=g.exec(f);){var j=parseFloat(h[0].replace(",","")),l=0;switch(h[2].toLowerCase()){case "year":case "years":l=31536E6;break;case "week":case "weeks":l=6048E5;break;case "day":case "days":l=864E5;break;case "hour":case "hours":l=36E5;break;case "minute":case "minutes":l= +6E4;break;case "second":case "seconds":l=1E3;break}i+=j*l}return i;case "long":h=f.replace(",","").split(":").reverse();i=0;if(h.length)i+=parseFloat(h[0])*1E3;if(h.length>1)i+=parseFloat(h[1])*6E4;if(h.length>2)i+=parseFloat(h[2])*36E5;if(h.length>3)i+=parseFloat(h[3])*864E5;return i}};return c}; +pv.Format.number=function(){function b(n){if(Infinity>h)n=Math.round(n*i)/i;var m=String(Math.abs(n)).split("."),r=m[0];n=n<0?"-":"";if(r.length>d)r=r.substring(r.length-d);if(k&&r.length3)r=r.replace(/\B(?=(?:\d{3})+(?!\d))/g,o);if(!k&&r.lengthd)m=m.substring(m.length-d);n=n[1]?Number("0."+n[1]):0;if(Infinity>h)n=Math.round(n*i)/i;return Math.round(m)+n};b.integerDigits=function(n,m){if(arguments.length){c=Number(n);d=arguments.length>1?Number(m):c;f=c+Math.floor(c/3)*o.length;return this}return[c,d]};b.fractionDigits=function(n,m){if(arguments.length){g= +Number(n);h=arguments.length>1?Number(m):g;i=Math.pow(10,h);return this}return[g,h]};b.integerPad=function(n){if(arguments.length){j=String(n);k=/\d/.test(j);return this}return j};b.fractionPad=function(n){if(arguments.length){l=String(n);return this}return l};b.decimal=function(n){if(arguments.length){q=String(n);return this}return q};b.group=function(n){if(arguments.length){o=n?String(n):"";f=c+Math.floor(c/3)*o.length;return this}return o};return b}; +pv.map=function(b,c){var d={};return c?b.map(function(f,g){d.index=g;return c.call(d,f)}):b.slice()};pv.repeat=function(b,c){if(arguments.length==1)c=2;return pv.blend(pv.range(c).map(function(){return b}))};pv.cross=function(b,c){for(var d=[],f=0,g=b.length,h=c.length;fc){b.length=d;for(var f=c;fc?1:0}; +pv.reverseOrder=function(b,c){return cb?1:0};pv.search=function(b,c,d){if(!d)d=pv.identity;for(var f=0,g=b.length-1;f<=g;){var h=f+g>>1,i=d(b[h]);if(ic)g=h-1;else return h}return-f-1};pv.search.index=function(b,c,d){b=pv.search(b,c,d);return b<0?-b-1:b}; +pv.range=function(b,c,d){if(arguments.length==1){c=b;b=0}if(d==undefined)d=1;if((c-b)/d==Infinity)throw new Error("range must be finite");var f=[],g=0,h;if(d<0)for(;(h=b+d*g++)>c;)f.push(h);else for(;(h=b+d*g++)f){f=i;d=h}}return d}; +pv.min=function(b,c){if(c==pv.index)return 0;return Math.min.apply(null,c?pv.map(b,c):b)};pv.min.index=function(b,c){if(!b.length)return-1;if(c==pv.index)return 0;if(!c)c=pv.identity;for(var d=0,f=Infinity,g={},h=0;h0?Math.pow(c,Math.floor(pv.log(b,c))):-Math.pow(c,-Math.floor(-pv.log(-b,c)))};pv.logCeil=function(b,c){return b>0?Math.pow(c,Math.ceil(pv.log(b,c))):-Math.pow(c,-Math.ceil(-pv.log(-b,c)))}; +(function(){var b=Math.PI/180,c=180/Math.PI;pv.radians=function(d){return b*d};pv.degrees=function(d){return c*d}})();pv.keys=function(b){var c=[];for(var d in b)c.push(d);return c};pv.entries=function(b){var c=[];for(var d in b)c.push({key:d,value:b[d]});return c};pv.values=function(b){var c=[];for(var d in b)c.push(b[d]);return c};pv.dict=function(b,c){for(var d={},f={},g=0;g=94608E6){n=31536E6;t="%Y";p=function(w){w.setFullYear(w.getFullYear()+v)}}else if(u>=7776E6){n=2592E6;t="%m/%Y";p=function(w){w.setMonth(w.getMonth()+v)}}else if(u>=18144E5){n=6048E5;t="%m/%d";p=function(w){w.setDate(w.getDate()+7*v)}}else if(u>=2592E5){n=864E5;t="%m/%d";p=function(w){w.setDate(w.getDate()+v)}}else if(u>=108E5){n=36E5;t="%I:%M %p";p=function(w){w.setHours(w.getHours()+ +v)}}else if(u>=18E4){n=6E4;t="%I:%M %p";p=function(w){w.setMinutes(w.getMinutes()+v)}}else if(u>=3E3){n=1E3;t="%I:%M:%S";p=function(w){w.setSeconds(w.getSeconds()+v)}}else{n=1;t="%S.%Qs";p=function(w){w.setTime(w.getTime()+v)}}q=pv.Format.date(t);s=new Date(s);t=[];x(s,n);u=u/n;if(u>10)switch(n){case 36E5:v=u>20?6:3;s.setHours(Math.floor(s.getHours()/v)*v);break;case 2592E6:v=3;s.setMonth(Math.floor(s.getMonth()/v)*v);break;case 6E4:v=u>30?15:u>15?10:5;s.setMinutes(Math.floor(s.getMinutes()/v)*v); +break;case 1E3:v=u>90?15:u>60?10:5;s.setSeconds(Math.floor(s.getSeconds()/v)*v);break;case 1:v=u>1E3?250:u>200?100:u>100?50:u>50?25:5;s.setMilliseconds(Math.floor(s.getMilliseconds()/v)*v);break;default:v=pv.logCeil(u/15,10);if(u/v<2)v/=5;else if(u/v<5)v/=2;s.setFullYear(Math.floor(s.getFullYear()/v)*v);break}for(;;){p(s);if(s>m)break;t.push(new Date(s))}return r?t.reverse():t}arguments.length||(o=10);v=pv.logFloor(u/o,10);n=o/(u/v);if(n<=0.15)v*=10;else if(n<=0.35)v*=5;else if(n<=0.75)v*=2;n=Math.ceil(s/ +v)*v;m=Math.floor(m/v)*v;q=pv.Format.number().fractionDigits(Math.max(0,-Math.floor(pv.log(v,10)+0.01)));m=pv.range(n,m+v,v);return r?m.reverse():m};c.tickFormat=function(o){return q(o)};c.nice=function(){if(d.length!=2)return this;var o=d[0],n=d[d.length-1],m=n0;i--)k.push(-g(-j)*i);else{for(;jh[1];l--);return k.slice(j,l)};b.tickFormat=function(h){return h.toPrecision(1)}; +b.nice=function(){var h=b.domain();return b.domain(pv.logFloor(h[0],c),pv.logCeil(h[1],c))};b.base=function(h){if(arguments.length){c=Number(h);d=Math.log(c);b.transform(f,g);return this}return c};b.domain.apply(b,arguments);return b.base(10)};pv.Scale.root=function(){var b=pv.Scale.quantitative();b.power=function(c){if(arguments.length){var d=Number(c),f=1/d;b.transform(function(g){return Math.pow(g,f)},function(g){return Math.pow(g,d)});return this}return d};b.domain.apply(b,arguments);return b.power(2)}; +pv.Scale.ordinal=function(){function b(g){g in d||(d[g]=c.push(g)-1);return f[d[g]%f.length]}var c=[],d={},f=[];b.domain=function(g,h){if(arguments.length){g=g instanceof Array?arguments.length>1?pv.map(g,h):g:Array.prototype.slice.call(arguments);c=[];for(var i={},j=0;j1?pv.map(g,h):g:Array.prototype.slice.call(arguments); +if(typeof f[0]=="string")f=f.map(pv.color);return this}return f};b.split=function(g,h){var i=(h-g)/this.domain().length;f=pv.range(g+i/2,h,i);return this};b.splitFlush=function(g,h){var i=this.domain().length,j=(h-g)/(i-1);f=i==1?[(g+h)/2]:pv.range(g,h+j/2,j);return this};b.splitBanded=function(g,h,i){if(arguments.length<3)i=1;if(i<0){var j=this.domain().length;j=(h-g- -i*j)/(j+1);f=pv.range(g+j,h,j-i);f.band=-i}else{j=(h-g)/(this.domain().length+(1-i));f=pv.range(g+j*(1-i),h,j);f.band=j*i}return this}; +b.by=function(g){function h(){return b(g.apply(this,arguments))}for(var i in b)h[i]=b[i];return h};b.domain.apply(b,arguments);return b}; +pv.Scale.quantile=function(){function b(i){return h(Math.max(0,Math.min(d,pv.search.index(f,i)-1))/d)}var c=-1,d=-1,f=[],g=[],h=pv.Scale.linear();b.quantiles=function(i){if(arguments.length){c=Number(i);if(c<0){f=[g[0]].concat(g);d=g.length-1}else{f=[];f[0]=g[0];for(var j=1;j<=c;j++)f[j]=g[~~(j*(g.length-1)/c)];d=c-1}return this}return f};b.domain=function(i,j){if(arguments.length){g=i instanceof Array?pv.map(i,j):Array.prototype.slice.call(arguments);g.sort(pv.naturalOrder);b.quantiles(c);return this}return g}; +b.range=function(){if(arguments.length){h.range.apply(h,arguments);return this}return h.range()};b.by=function(i){function j(){return b(i.apply(this,arguments))}for(var l in b)j[l]=b[l];return j};b.domain.apply(b,arguments);return b}; +pv.histogram=function(b,c){var d=true;return{bins:function(f){var g=pv.map(b,c),h=[];arguments.length||(f=pv.Scale.linear(g).ticks());for(var i=0;i360)j-=360;else if(j<0)j+=360;if(j<60)return i+(h-i)*j/60;if(j<180)return h;if(j<240)return i+(h-i)*(240-j)/60;return i}function c(j){return Math.round(b(j)*255)}var d=this.h,f=this.s,g=this.l;d%=360;if(d<0)d+=360;f=Math.max(0,Math.min(f,1));g=Math.max(0,Math.min(g,1));var h=g<=0.5?g*(1+f):g+f-g*f,i=2*g-h;return pv.rgb(c(d+120),c(d),c(d-120),this.a)}; +pv.Color.names={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",transparent:pv.Color.transparent=pv.rgb(0,0,0,0)};(function(){var b=pv.Color.names;for(var c in b)b[c]=pv.color(b[c])})(); +pv.colors=function(){var b=pv.Scale.ordinal();b.range.apply(b,arguments);return b};pv.Colors={};pv.Colors.category10=function(){var b=pv.colors("#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf");b.domain.apply(b,arguments);return b}; +pv.Colors.category20=function(){var b=pv.colors("#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5");b.domain.apply(b,arguments);return b}; +pv.Colors.category19=function(){var b=pv.colors("#9c9ede","#7375b5","#4a5584","#cedb9c","#b5cf6b","#8ca252","#637939","#e7cb94","#e7ba52","#bd9e39","#8c6d31","#e7969c","#d6616b","#ad494a","#843c39","#de9ed6","#ce6dbd","#a55194","#7b4173");b.domain.apply(b,arguments);return b};pv.ramp=function(){var b=pv.Scale.linear();b.range.apply(b,arguments);return b}; +pv.Scene=pv.SvgScene={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",scale:1,events:["DOMMouseScroll","mousewheel","mousedown","mouseup","mouseover","mouseout","mousemove","click","dblclick"],implicit:{svg:{"shape-rendering":"auto","pointer-events":"painted",x:0,y:0,dy:0,"text-anchor":"start",transform:"translate(0,0)",fill:"none","fill-opacity":1,stroke:"none","stroke-opacity":1,"stroke-width":1.5,"stroke-linejoin":"miter"}, +css:{font:"10px sans-serif"}}};pv.SvgScene.updateAll=function(b){if(b.length&&b[0].reverse&&b.type!="line"&&b.type!="area"){for(var c=pv.extend(b),d=0,f=b.length-1;f>=0;d++,f--)c[d]=b[f];b=c}this.removeSiblings(this[b.type](b))};pv.SvgScene.create=function(b){return document.createElementNS(this.svg,b)}; +pv.SvgScene.expect=function(b,c,d,f){if(b){if(b.tagName=="a")b=b.firstChild;if(b.tagName!=c){c=this.create(c);b.parentNode.replaceChild(c,b);b=c}}else b=this.create(c);for(var g in d){c=d[g];if(c==this.implicit.svg[g])c=null;c==null?b.removeAttribute(g):b.setAttribute(g,c)}for(g in f){c=f[g];if(c==this.implicit.css[g])c=null;if(c==null)b.style.removeProperty(g);else b.style[g]=c}return b}; +pv.SvgScene.append=function(b,c,d){b.$scene={scenes:c,index:d};b=this.title(b,c[d]);b.parentNode||c.$g.appendChild(b);return b.nextSibling};pv.SvgScene.title=function(b,c){var d=b.parentNode;if(d&&d.tagName!="a")d=null;if(c.title){if(!d){d=this.create("a");b.parentNode&&b.parentNode.replaceChild(d,b);d.appendChild(b)}d.setAttributeNS(this.xlink,"title",c.title);return d}d&&d.parentNode.replaceChild(b,d);return b}; +pv.SvgScene.dispatch=pv.listener(function(b){var c=b.target.$scene;if(c){var d=b.type;switch(d){case "DOMMouseScroll":d="mousewheel";b.wheel=-480*b.detail;break;case "mousewheel":b.wheel=(window.opera?12:1)*b.wheelDelta;break}pv.Mark.dispatch(d,c.scenes,c.index)&&b.preventDefault()}});pv.SvgScene.removeSiblings=function(b){for(;b;){var c=b.nextSibling;b.parentNode.removeChild(b);b=c}};pv.SvgScene.undefined=function(){}; +pv.SvgScene.pathBasis=function(){function b(f,g,h,i,j){return{x:f[0]*g.left+f[1]*h.left+f[2]*i.left+f[3]*j.left,y:f[0]*g.top+f[1]*h.top+f[2]*i.top+f[3]*j.top}}var c=[[1/6,2/3,1/6,0],[0,2/3,1/3,0],[0,1/3,2/3,0],[0,1/6,2/3,1/6]],d=function(f,g,h,i){var j=b(c[1],f,g,h,i),l=b(c[2],f,g,h,i);f=b(c[3],f,g,h,i);return"C"+j.x+","+j.y+","+l.x+","+l.y+","+f.x+","+f.y};d.segment=function(f,g,h,i){var j=b(c[0],f,g,h,i),l=b(c[1],f,g,h,i),k=b(c[2],f,g,h,i);f=b(c[3],f,g,h,i);return"M"+j.x+","+j.y+"C"+l.x+","+l.y+ +","+k.x+","+k.y+","+f.x+","+f.y};return d}();pv.SvgScene.curveBasis=function(b){if(b.length<=2)return"";var c="",d=b[0],f=d,g=d,h=b[1];c+=this.pathBasis(d,f,g,h);for(var i=2;i1){j=c[1];h=b[l];l++;f+="C"+(g.left+i.x)+","+(g.top+i.y)+","+(h.left-j.x)+","+(h.top-j.y)+","+h.left+","+h.top;for(g=2;g9){l=3/Math.sqrt(l);f[h]= +l*i*d[h];f[h+1]=l*j*d[h]}}for(h=0;h2&&(g.interpolate=="basis"||g.interpolate=="cardinal"||g.interpolate=="monotone")?d:c)(k,q-1));k=q-1}}if(!j.length)return f;f=this.expect(f,"path",{"shape-rendering":g.antialias?null:"crispEdges","pointer-events":g.events,cursor:g.cursor,d:"M"+j.join("ZM")+"Z",fill:h.color,"fill-opacity":h.opacity|| +null,stroke:i.color,"stroke-opacity":i.opacity||null,"stroke-width":i.opacity?g.lineWidth/this.scale:null});return this.append(f,b,0)}; +pv.SvgScene.areaSegment=function(b){var c=b.$g.firstChild,d=b[0],f,g;if(d.interpolate=="basis"||d.interpolate=="cardinal"||d.interpolate=="monotone"){f=[];g=[];for(var h=0,i=b.length;h2&&(d.interpolate=="basis"||d.interpolate=="cardinal"||d.interpolate=="monotone"))switch(d.interpolate){case "basis":h+=this.curveBasis(b);break;case "cardinal":h+=this.curveCardinal(b,d.tension);break;case "monotone":h+=this.curveMonotone(b); +break}else for(var i=1;i1)break;return"A"+f+","+f+" 0 0,"+d+" "+c.left+","+c.top;case "step-before":return"V"+c.top+"H"+c.left;case "step-after":return"H"+c.left+"V"+c.top}return"L"+c.left+","+c.top};pv.SvgScene.lineIntersect=function(b,c,d,f){return b.plus(c.times(d.minus(b).dot(f.perp())/c.dot(f.perp())))}; +pv.SvgScene.pathJoin=function(b,c,d,f){var g=pv.vector(c.left,c.top);d=pv.vector(d.left,d.top);var h=d.minus(g),i=h.perp().norm(),j=i.times(c.lineWidth/(2*this.scale));c=g.plus(j);var l=d.plus(j),k=d.minus(j);j=g.minus(j);if(b&&b.visible){b=g.minus(b.left,b.top).perp().norm().plus(i);j=this.lineIntersect(g,b,j,h);c=this.lineIntersect(g,b,c,h)}if(f&&f.visible){f=pv.vector(f.left,f.top).minus(d).perp().norm().plus(i);k=this.lineIntersect(d,f,k,h);l=this.lineIntersect(d,f,l,h)}return"M"+c.x+","+c.y+ +"L"+l.x+","+l.y+" "+k.x+","+k.y+" "+j.x+","+j.y}; +pv.SvgScene.panel=function(b){for(var c=b.$g,d=c&&c.firstChild,f=0;f=2*Math.PI)i=i?"M0,"+j+"A"+j+","+j+" 0 1,1 0,"+-j+"A"+j+","+j+" 0 1,1 0,"+j+"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":"M0,"+j+"A"+j+","+j+" 0 1,1 0,"+-j+"A"+j+","+j+" 0 1,1 0,"+j+"Z";else{var k=Math.min(f.startAngle,f.endAngle),q=Math.max(f.startAngle,f.endAngle), +o=Math.cos(k),n=Math.cos(q);k=Math.sin(k);q=Math.sin(q);i=i?"M"+j*o+","+j*k+"A"+j+","+j+" 0 "+(l1?c:null)}; +a.anchor=function(b){function c(g){for(var h=d,i=[];!(f=h.scene);){g=g.parent;i.push({index:g.index,childIndex:h.childIndex});h=h.parent}for(;i.length;){g=i.pop();f=f[g.index].children[g.childIndex]}if(d.hasOwnProperty("index")){i=pv.extend(f[d.index]);i.right=i.top=i.left=i.bottom=0;return[i]}return f}var d=this,f;b||(b="center");return(new pv.Anchor(this)).name(b).def("$mark.anchor",function(){f=this.scene.target=c(this)}).data(function(){return f.map(function(g){return g.data})}).visible(function(){return f[this.index].visible}).left(function(){var g= +f[this.index],h=g.width||0;switch(this.name()){case "bottom":case "top":case "center":return g.left+h/2;case "left":return null}return g.left+h}).top(function(){var g=f[this.index],h=g.height||0;switch(this.name()){case "left":case "right":case "center":return g.top+h/2;case "top":return null}return g.top+h}).right(function(){var g=f[this.index];return this.name()=="left"?g.right+(g.width||0):null}).bottom(function(){var g=f[this.index];return this.name()=="top"?g.bottom+(g.height||0):null}).textAlign(function(){switch(this.name()){case "bottom":case "top":case "center":return"center"; +case "right":return"right"}return"left"}).textBaseline(function(){switch(this.name()){case "right":case "left":case "center":return"middle";case "top":return"top"}return"bottom"})};a.anchorTarget=function(){return this.proto.anchorTarget()};a.margin=function(b){return this.left(b).right(b).top(b).bottom(b)};a.instance=function(b){var c=this.scene||this.parent.instance(-1).children[this.childIndex],d=!arguments.length||this.hasOwnProperty("index")?this.index:b;return c[d<0?c.length-1:d]};a.first=function(){return this.scene[0]}; +a.last=function(){return this.scene[this.scene.length-1]};a.sibling=function(){return this.index==0?null:this.scene[this.index-1]};a.cousin=function(){var b=this.parent;return(b=b&&b.sibling())&&b.children?b.children[this.childIndex][this.index]:null}; +a.render=function(){function b(i,j,l){i.scale=l;if(j=0;k--){var q=l[k];if(!(q.name in c)){c[q.name]=q;switch(q.name){case "data":f=q;break;case "visible":g=q;break;default:d[q.type].push(q);break}}}while(j=j.proto)}var c={},d=[[],[],[],[]],f,g;b(this);b(this.defaults);d[1].reverse();d[3].reverse();var h=this;do for(var i in h.properties)i in c||d[2].push(c[i]={name:i,type:2,value:null});while(h=h.proto);h=d[0].concat(d[1]);for(i=0;ih.id)d[g.name]={id:0,value:g.type&1?g.value.apply(this,c):g.value}}}d=this.binds.data;d=d.type&1?d.value.apply(this,c):d.value;c.unshift(null); +b.length=d.length;for(f=0;f0;k--){n=m[k];n.scale=q;q*=n.scene[n.index].transform.k}if(o.children){k=0;for(m=o.children.length;k=3*Math.PI/2};pv.Wedge.prototype.buildImplied=function(b){if(b.angle==null)b.angle=b.endAngle-b.startAngle;else if(b.endAngle==null)b.endAngle=b.startAngle+b.angle;pv.Mark.prototype.buildImplied.call(this,b)};pv.simulation=function(b){return new pv.Simulation(b)};pv.Simulation=function(b){for(var c=0;c=s,t=q.y>=u;k.leaf=false;switch((t<<1)+x){case 0:k=k.c1||(k.c1=new pv.Quadtree.Node);break;case 1:k=k.c2||(k.c2=new pv.Quadtree.Node);break;case 2:k=k.c3||(k.c3=new pv.Quadtree.Node);break;case 3:k=k.c4||(k.c4=new pv.Quadtree.Node); +break}if(x)o=s;else m=s;if(t)n=u;else r=u;c(k,q,o,n,m,r)}var f,g=Number.POSITIVE_INFINITY,h=g,i=Number.NEGATIVE_INFINITY,j=i;for(f=b;f;f=f.next){if(f.xi)i=f.x;if(f.y>j)j=f.y}f=i-g;var l=j-h;if(f>l)j=h+f;else i=g+l;this.xMin=g;this.yMin=h;this.xMax=i;this.yMax=j;this.root=new pv.Quadtree.Node;for(f=b;f;f=f.next)c(this.root,f,g,h,i,j)};pv.Quadtree.Node=function(){this.leaf=true;this.p=this.c4=this.c3=this.c2=this.c1=null};pv.Force={}; +pv.Force.charge=function(b){function c(k){function q(m){c(m);k.cn+=m.cn;o+=m.cn*m.cx;n+=m.cn*m.cy}var o=0,n=0;k.cn=0;if(!k.leaf){k.c1&&q(k.c1);k.c2&&q(k.c2);k.c3&&q(k.c3);k.c4&&q(k.c4)}if(k.p){k.cn+=b;o+=b*k.p.x;n+=b*k.p.y}k.cx=o/k.cn;k.cy=n/k.cn}function d(k,q,o,n,m,r){var s=k.cx-q.x,u=k.cy-q.y,x=1/Math.sqrt(s*s+u*u);if(k.leaf&&k.p!=q||(m-o)*xg)x=g;k=k.cn*x*x*x;s=s*k;u=u*k;q.fx+=s;q.fy+=u}}else if(!k.leaf){var t=(o+m)*0.5,p=(n+r)*0.5;k.c1&&d(k.c1,q,o,n,t,p);k.c2&&d(k.c2,q,t,n, +m,p);k.c3&&d(k.c3,q,o,p,t,r);k.c4&&d(k.c4,q,t,p,m,r);if(!(xg)x=g;if(k.p&&k.p!=q){k=b*x*x*x;s=s*k;u=u*k;q.fx+=s;q.fy+=u}}}}var f=2,g=1/f,h=500,i=1/h,j=0.9,l={};arguments.length||(b=-40);l.constant=function(k){if(arguments.length){b=Number(k);return l}return b};l.domain=function(k,q){if(arguments.length){f=Number(k);g=1/f;h=Number(q);i=1/h;return l}return[f,h]};l.theta=function(k){if(arguments.length){j=Number(k);return l}return j};l.apply=function(k,q){c(q.root);for(k=k;k;k=k.next)d(q.root, +k,q.xMin,q.yMin,q.xMax,q.yMax)};return l};pv.Force.drag=function(b){var c={};arguments.length||(b=0.1);c.constant=function(d){if(arguments.length){b=d;return c}return b};c.apply=function(d){if(b)for(d=d;d;d=d.next){d.fx-=b*d.vx;d.fy-=b*d.vy}};return c}; +pv.Force.spring=function(b){var c=0.1,d=20,f,g,h={};arguments.length||(b=0.1);h.links=function(i){if(arguments.length){f=i;g=i.map(function(j){return 1/Math.sqrt(Math.max(j.sourceNode.linkDegree,j.targetNode.linkDegree))});return h}return f};h.constant=function(i){if(arguments.length){b=Number(i);return h}return b};h.damping=function(i){if(arguments.length){c=Number(i);return h}return c};h.length=function(i){if(arguments.length){d=Number(i);return h}return d};h.apply=function(){for(var i=0;ig,p=sh){k.c1&&t&&c(k.c1,q,o,n,s,u);k.c2&&p&&c(k.c2,q,s,n,m,u)}if(x){k.c3&&t&&c(k.c3,q,o,u,s,r);k.c4&&p&&c(k.c4,q,s,u,m,r)}}if(k.p&&k.p!=q){o=q.x-k.p.x;n=q.y-k.p.y;m=Math.sqrt(o*o+n*n);r=f+b(k.p);if(mm)m=n}for(var r=0;rc.max?c.max:g.x;if(d)for(g=f;g;g=g.next)g.y=g.yd.max?d.max:g.y};return b};pv.Layout=function(){pv.Panel.call(this)};pv.Layout.prototype=pv.extend(pv.Panel); +pv.Layout.prototype.property=function(b,c){if(!this.hasOwnProperty("properties"))this.properties=pv.extend(this.properties);this.properties[b]=true;this.propertyMethod(b,false,pv.Mark.cast[b]=c);return this}; +pv.Layout.Network=function(){pv.Layout.call(this);var b=this;this.$id=pv.id();(this.node=(new pv.Mark).data(function(){return b.nodes()}).strokeStyle("#1f77b4").fillStyle("#fff").left(function(c){return c.x}).top(function(c){return c.y})).parent=this;this.link=(new pv.Mark).extend(this.node).data(function(c){return[c.sourceNode,c.targetNode]}).fillStyle(null).lineWidth(function(c,d){return d.linkValue*1.5}).strokeStyle("rgba(0,0,0,.2)");this.link.add=function(c){return b.add(pv.Panel).data(function(){return b.links()}).add(c).extend(this)}; +(this.label=(new pv.Mark).extend(this.node).textMargin(7).textBaseline("middle").text(function(c){return c.nodeName||c.nodeValue}).textAngle(function(c){c=c.midAngle;return pv.Wedge.upright(c)?c:c+Math.PI}).textAlign(function(c){return pv.Wedge.upright(c.midAngle)?"left":"right"})).parent=this}; +pv.Layout.Network.prototype=pv.extend(pv.Layout).property("nodes",function(b){return b.map(function(c,d){if(typeof c!="object")c={nodeValue:c};c.index=d;c.linkDegree=0;return c})}).property("links",function(b){return b.map(function(c){if(isNaN(c.linkValue))c.linkValue=isNaN(c.value)?1:c.value;return c})});pv.Layout.Network.prototype.reset=function(){this.$id=pv.id();return this}; +pv.Layout.Network.prototype.buildProperties=function(b,c){if((b.$id||0)=this.$id)return true;b.$id=this.$id;b.links.forEach(function(c){var d=c.linkValue;(c.sourceNode||(c.sourceNode=b.nodes[c.source])).linkDegree+=d;(c.targetNode||(c.targetNode=b.nodes[c.target])).linkDegree+=d})}; +pv.Layout.Hierarchy=function(){pv.Layout.Network.call(this);this.link.strokeStyle("#ccc")};pv.Layout.Hierarchy.prototype=pv.extend(pv.Layout.Network);pv.Layout.Hierarchy.prototype.buildImplied=function(b){if(!b.links)b.links=pv.Layout.Hierarchy.links.call(this);pv.Layout.Network.prototype.buildImplied.call(this,b)};pv.Layout.Hierarchy.links=function(){return this.nodes().filter(function(b){return b.parentNode}).map(function(b){return{sourceNode:b,targetNode:b.parentNode,linkValue:1}})}; +pv.Layout.Hierarchy.NodeLink={buildImplied:function(b){function c(m){return m.parentNode?m.depth*(o-q)+q:0}function d(m){return m.parentNode?(m.breadth-0.25)*2*Math.PI:0}function f(m){switch(i){case "left":return m.depth*l;case "right":return l-m.depth*l;case "top":return m.breadth*l;case "bottom":return l-m.breadth*l;case "radial":return l/2+c(m)*Math.cos(m.midAngle)}}function g(m){switch(i){case "left":return m.breadth*k;case "right":return k-m.breadth*k;case "top":return m.depth*k;case "bottom":return k- +m.depth*k;case "radial":return k/2+c(m)*Math.sin(m.midAngle)}}var h=b.nodes,i=b.orient,j=/^(top|bottom)$/.test(i),l=b.width,k=b.height;if(i=="radial"){var q=b.innerRadius,o=b.outerRadius;if(q==null)q=0;if(o==null)o=Math.min(l,k)/2}for(b=0;bb.dy?0:-Math.PI/2});(this.leaf=(new pv.Mark).extend(this.node).fillStyle(null).strokeStyle(null).visible(function(b){return!b.firstChild})).parent= +this;delete this.link};pv.Layout.Treemap.prototype=pv.extend(pv.Layout.Hierarchy).property("round",Boolean).property("paddingLeft",Number).property("paddingRight",Number).property("paddingTop",Number).property("paddingBottom",Number).property("mode",String).property("order",String);a=pv.Layout.Treemap.prototype;a.defaults=(new pv.Layout.Treemap).extend(pv.Layout.Hierarchy.prototype.defaults).mode("squarify").order("ascending");a.padding=function(b){return this.paddingLeft(b).paddingRight(b).paddingTop(b).paddingBottom(b)}; +a.$size=function(b){return Number(b.nodeValue)};a.size=function(b){this.$size=pv.functor(b);return this}; +a.buildImplied=function(b){function c(r,s,u,x,t,p,v){for(var w=0,y=0;wu)u=v;t+=v}t*=t;s*=s;return Math.max(s*u/t,t/(s*x))}function f(r,s){function u(A){var D=p==y,G=pv.sum(A,o),E=y?n(G/y):0;c(A,G,D,x,t,D?p:E,D?E:v);if(D){t+=E;v-=E}else{x+= +E;p-=E}y=Math.min(p,v);return D}var x=r.x+j,t=r.y+k,p=r.dx-j-l,v=r.dy-k-q;if(m!="squarify")c(r.childNodes,r.size,m=="slice"?true:m=="dice"?false:s&1,x,t,p,v);else{var w=[];s=Infinity;var y=Math.min(p,v),z=p*v/r.size;if(!(r.size<=0)){r.visitBefore(function(A){A.size*=z});for(r=r.childNodes.slice();r.length;){var C=r[r.length-1];if(C.size){w.push(C);z=d(w,y);if(z<=s){r.pop();s=z}else{w.pop();u(w);w.length=0;s=Infinity}}else r.pop()}if(u(w))for(s=0;s0){i(l(C,p,v),p,B);A+=B;D+=B}G+=C.mod;A+=y.mod;E+=w.mod;D+=z.mod;C=h(C);y=g(y)}if(C&&!h(z)){z.thread=C;z.mod+=G-D}if(y&&!g(w)){w.thread=y;w.mod+=A-E;v=p}}return v}function g(p){return p.firstChild||p.thread}function h(p){return p.lastChild||p.thread}function i(p,v,w){var y=v.number-p.number;v.change-=w/y;v.shift+=w;p.change+= +w/y;v.prelim+=w;v.mod+=w}function j(p){var v=0,w=0;for(p=p.lastChild;p;p=p.previousSibling){p.prelim+=v;p.mod+=v;w+=p.change;v+=p.shift+w}}function l(p,v,w){return p.ancestor.parentNode==v.parentNode?p.ancestor:w}function k(p,v){return(v?1:u+1)/(m=="radial"?p:1)}function q(p){return m=="radial"?p.breadth/r:0}function o(p){switch(m){case "left":return p.depth;case "right":return x-p.depth;case "top":case "bottom":return p.breadth+x/2;case "radial":return x/2+p.depth*Math.cos(q(p))}}function n(p){switch(m){case "left":case "right":return p.breadth+ +t/2;case "top":return p.depth;case "bottom":return t-p.depth;case "radial":return t/2+p.depth*Math.sin(q(p))}}if(!pv.Layout.Hierarchy.prototype.buildImplied.call(this,b)){var m=b.orient,r=b.depth,s=b.breadth,u=b.group,x=b.width,t=b.height;b=b.nodes[0];b.visitAfter(function(p,v){p.ancestor=p;p.prelim=0;p.mod=0;p.change=0;p.shift=0;p.number=p.previousSibling?p.previousSibling.number+1:0;p.depth=v});c(b);d(b,-b.prelim,0);b.visitAfter(function(p){p.breadth*=s;p.depth*=r;p.midAngle=q(p);p.x=o(p);p.y=n(p); +if(p.firstChild)p.midAngle+=Math.PI;delete p.breadth;delete p.depth;delete p.ancestor;delete p.prelim;delete p.mod;delete p.change;delete p.shift;delete p.number;delete p.thread})}};pv.Layout.Indent=function(){pv.Layout.Hierarchy.call(this);this.link.interpolate("step-after")};pv.Layout.Indent.prototype=pv.extend(pv.Layout.Hierarchy).property("depth",Number).property("breadth",Number);pv.Layout.Indent.prototype.defaults=(new pv.Layout.Indent).extend(pv.Layout.Hierarchy.prototype.defaults).depth(15).breadth(15); +pv.Layout.Indent.prototype.buildImplied=function(b){function c(i,j,l){i.x=g+l++*f;i.y=h+j++*d;i.midAngle=0;for(i=i.firstChild;i;i=i.nextSibling)j=c(i,j,l);return j}if(!pv.Layout.Hierarchy.prototype.buildImplied.call(this,b)){var d=b.breadth,f=b.depth,g=0,h=0;c(b.nodes[0],1,1)}};pv.Layout.Pack=function(){pv.Layout.Hierarchy.call(this);this.node.radius(function(b){return b.radius}).strokeStyle("rgb(31, 119, 180)").fillStyle("rgba(31, 119, 180, .25)");this.label.textAlign("center");delete this.link}; +pv.Layout.Pack.prototype=pv.extend(pv.Layout.Hierarchy).property("spacing",Number).property("order",String);pv.Layout.Pack.prototype.defaults=(new pv.Layout.Pack).extend(pv.Layout.Hierarchy.prototype.defaults).spacing(1).order("ascending");pv.Layout.Pack.prototype.$radius=function(){return 1};pv.Layout.Pack.prototype.size=function(b){this.$radius=typeof b=="function"?function(){return Math.sqrt(b.apply(this,arguments))}:(b=Math.sqrt(b),function(){return b});return this}; +pv.Layout.Pack.prototype.buildImplied=function(b){function c(o){var n=pv.Mark.stack;n.unshift(null);for(var m=0,r=o.length;m0.0010}var u=Infinity,x=-Infinity,t=Infinity,p=-Infinity,v,w,y,z,C;v=o[0];v.x=-v.radius;v.y=0;n(v);if(o.length>1){w=o[1];w.x=w.radius;w.y=0;n(w);if(o.length>2){y=o[2];g(v,w,y);n(y);m(v,y);v.p= +y;m(y,w);w=v.n;for(var A=3;A0){r(v,z);w=z;A--}else if(D<0){r(z,w);v=z;A--}}}}v=(u+x)/2;w=(t+p)/2;for(A=y=0;Ao.min){o.sim.step(); +q=true}q&&d.render()},42)}else for(l=0;lg)g=j;i.size=i.firstChild?pv.sum(i.childNodes,function(l){return l.size}):c.$size.apply(c,(f[0]=i,f))});f.shift();switch(b.order){case "ascending":d.sort(function(i,j){return i.size-j.size});break;case "descending":d.sort(function(i,j){return j.size-i.size});break}var h=1/g;d.minBreadth=0;d.breadth= +0.5;d.maxBreadth=1;d.visitBefore(function(i){for(var j=i.minBreadth,l=i.maxBreadth-j,k=i.firstChild;k;k=k.nextSibling){k.minBreadth=j;k.maxBreadth=j+=k.size/i.size*l;k.breadth=(j+k.minBreadth)/2}});d.visitAfter(function(i,j){i.minDepth=(j-1)*h;i.maxDepth=i.depth=j*h});pv.Layout.Hierarchy.NodeLink.buildImplied.call(this,b)}};pv.Layout.Partition.Fill=function(){pv.Layout.Partition.call(this);pv.Layout.Hierarchy.Fill.constructor.call(this)};pv.Layout.Partition.Fill.prototype=pv.extend(pv.Layout.Partition); +pv.Layout.Partition.Fill.prototype.buildImplied=function(b){pv.Layout.Partition.prototype.buildImplied.call(this,b)||pv.Layout.Hierarchy.Fill.buildImplied.call(this,b)};pv.Layout.Arc=function(){pv.Layout.Network.call(this);var b,c,d,f=this.buildImplied;this.buildImplied=function(g){f.call(this,g);c=g.directed;b=g.orient=="radial"?"linear":"polar";d=g.orient=="right"||g.orient=="top"};this.link.data(function(g){var h=g.sourceNode;g=g.targetNode;return d!=(c||h.breadth>1)*f:null}).bottom(function(l,k){return d=="mirror"?k&1?null:(k+1>>1)*-f:(k&1||-1)*(k+1>>1)*f}).fillStyle(function(l,k){return(k&1?h:i)((k>>1)+1)});this.band.add=function(l){return b.add(pv.Panel).extend(c).add(l).extend(this)}};pv.Layout.Horizon.prototype=pv.extend(pv.Layout).property("bands",Number).property("mode",String).property("backgroundStyle",pv.color).property("positiveStyle",pv.color).property("negativeStyle",pv.color); +pv.Layout.Horizon.prototype.defaults=(new pv.Layout.Horizon).extend(pv.Layout.prototype.defaults).bands(2).mode("offset").backgroundStyle("white").positiveStyle("#1f77b4").negativeStyle("#d62728"); +pv.Layout.Rollup=function(){pv.Layout.Network.call(this);var b=this,c,d,f=b.buildImplied;this.buildImplied=function(g){f.call(this,g);c=g.$rollup.nodes;d=g.$rollup.links};this.node.data(function(){return c}).size(function(g){return g.nodes.length*20});this.link.interpolate("polar").eccentricity(0.8);this.link.add=function(g){return b.add(pv.Panel).data(function(){return d}).add(g).extend(this)}};pv.Layout.Rollup.prototype=pv.extend(pv.Layout.Network).property("directed",Boolean); +pv.Layout.Rollup.prototype.x=function(b){this.$x=pv.functor(b);return this};pv.Layout.Rollup.prototype.y=function(b){this.$y=pv.functor(b);return this}; +pv.Layout.Rollup.prototype.buildImplied=function(b){function c(r){return i[r]+","+j[r]}if(!pv.Layout.Network.prototype.buildImplied.call(this,b)){var d=b.nodes,f=b.links,g=b.directed,h=d.length,i=[],j=[],l=0,k={},q={},o=pv.Mark.stack,n={parent:this};o.unshift(null);for(var m=0;ml.index?l.index+","+d.index:d.index+","+l.index;(o=q[h])||(o=q[h]={sourceNode:d,targetNode:l,linkValue:0,links:[]});o.links.push(f[m]);o.linkValue+=f[m].linkValue}b.$rollup={nodes:pv.values(k),links:pv.values(q)}}}; +pv.Layout.Matrix=function(){pv.Layout.Network.call(this);var b,c,d,f,g,h=this.buildImplied;this.buildImplied=function(i){h.call(this,i);b=i.nodes.length;c=i.width/b;d=i.height/b;f=i.$matrix.labels;g=i.$matrix.pairs};this.link.data(function(){return g}).left(function(){return c*(this.index%b)}).top(function(){return d*Math.floor(this.index/b)}).width(function(){return c}).height(function(){return d}).lineWidth(1.5).strokeStyle("#fff").fillStyle(function(i){return i.linkValue?"#555":"#eee"}).parent= +this;delete this.link.add;this.label.data(function(){return f}).left(function(){return this.index&1?c*((this.index>>1)+0.5):null}).top(function(){return this.index&1?null:d*((this.index>>1)+0.5)}).textMargin(4).textAlign(function(){return this.index&1?"left":"right"}).textAngle(function(){return this.index&1?-Math.PI/2:0});delete this.node};pv.Layout.Matrix.prototype=pv.extend(pv.Layout.Network).property("directed",Boolean);pv.Layout.Matrix.prototype.sort=function(b){this.$sort=b;return this}; +pv.Layout.Matrix.prototype.buildImplied=function(b){if(!pv.Layout.Network.prototype.buildImplied.call(this,b)){var c=b.nodes,d=b.links,f=this.$sort,g=c.length,h=pv.range(g),i=[],j=[],l={};b.$matrix={labels:i,pairs:j};f&&h.sort(function(m,r){return f(c[m],c[r])});for(var k=0;kl)k=null;if(g){if(k&&g.scene==k.scene&&g.index==k.index)return;pv.Mark.dispatch("unpoint",g.scene,g.index)}if(g=k){pv.Mark.dispatch("point",k.scene,k.index);pv.listen(this.root.canvas(),"mouseout",f)}}function f(k){if(g&&!pv.ancestor(this,k.relatedTarget)){pv.Mark.dispatch("unpoint",g.scene,g.index);g=null}}var g,h=null,i=1,j=1,l=arguments.length?b*b:900;d.collapse=function(k){if(arguments.length){h=String(k);switch(h){case "y":i= +1;j=0;break;case "x":i=0;j=1;break;default:j=i=1;break}return d}return h};return d}; +pv.Behavior.select=function(){function b(j){g=this.index;f=this.scene;i=this.mouse();h=j;h.x=i.x;h.y=i.y;h.dx=h.dy=0;pv.Mark.dispatch("selectstart",f,g)}function c(){if(f){f.mark.context(f,g,function(){var j=this.mouse();h.x=Math.max(0,Math.min(i.x,j.x));h.y=Math.max(0,Math.min(i.y,j.y));h.dx=Math.min(this.width(),Math.max(j.x,i.x))-h.x;h.dy=Math.min(this.height(),Math.max(j.y,i.y))-h.y;this.render()});pv.Mark.dispatch("select",f,g)}}function d(){if(f){pv.Mark.dispatch("selectend",f,g);f=null}}var f, +g,h,i;pv.listen(window,"mousemove",c);pv.listen(window,"mouseup",d);return b}; +pv.Behavior.resize=function(b){function c(l){h=this.index;g=this.scene;j=this.mouse();i=l;switch(b){case "left":j.x=i.x+i.dx;break;case "right":j.x=i.x;break;case "top":j.y=i.y+i.dy;break;case "bottom":j.y=i.y;break}pv.Mark.dispatch("resizestart",g,h)}function d(){if(g){g.mark.context(g,h,function(){var l=this.mouse();i.x=Math.max(0,Math.min(j.x,l.x));i.y=Math.max(0,Math.min(j.y,l.y));i.dx=Math.min(this.parent.width(),Math.max(l.x,j.x))-i.x;i.dy=Math.min(this.parent.height(),Math.max(l.y,j.y))-i.y; +this.render()});pv.Mark.dispatch("resize",g,h)}}function f(){if(g){pv.Mark.dispatch("resizeend",g,h);g=null}}var g,h,i,j;pv.listen(window,"mousemove",d);pv.listen(window,"mouseup",f);return c}; +pv.Behavior.pan=function(){function b(){g=this.index;f=this.scene;i=pv.vector(pv.event.pageX,pv.event.pageY);h=this.transform();j=1/(h.k*this.scale);if(l)l={x:(1-h.k)*this.width(),y:(1-h.k)*this.height()}}function c(){if(f){f.mark.context(f,g,function(){var k=h.translate((pv.event.pageX-i.x)*j,(pv.event.pageY-i.y)*j);if(l){k.x=Math.max(l.x,Math.min(0,k.x));k.y=Math.max(l.y,Math.min(0,k.y))}this.transform(k).render()});pv.Mark.dispatch("pan",f,g)}}function d(){f=null}var f,g,h,i,j,l;b.bound=function(k){if(arguments.length){l= +Boolean(k);return this}return Boolean(l)};pv.listen(window,"mousemove",c);pv.listen(window,"mouseup",d);return b}; +pv.Behavior.zoom=function(b){function c(){var f=this.mouse(),g=pv.event.wheel*b;f=this.transform().translate(f.x,f.y).scale(g<0?1E3/(1E3-g):(1E3+g)/1E3).translate(-f.x,-f.y);if(d){f.k=Math.max(1,f.k);f.x=Math.max((1-f.k)*this.width(),Math.min(0,f.x));f.y=Math.max((1-f.k)*this.height(),Math.min(0,f.y))}this.transform(f).render();pv.Mark.dispatch("zoom",this.scene,this.index)}var d;arguments.length||(b=1/48);c.bound=function(f){if(arguments.length){d=Boolean(f);return this}return Boolean(d)};return c}; +pv.Geo=function(){}; +pv.Geo.projections={mercator:{project:function(b){return{x:b.lng/180,y:b.lat>85?1:b.lat<-85?-1:Math.log(Math.tan(Math.PI/4+pv.radians(b.lat)/2))/Math.PI}},invert:function(b){return{lng:b.x*180,lat:pv.degrees(2*Math.atan(Math.exp(b.y*Math.PI))-Math.PI/2)}}},"gall-peters":{project:function(b){return{x:b.lng/180,y:Math.sin(pv.radians(b.lat))}},invert:function(b){return{lng:b.x*180,lat:pv.degrees(Math.asin(b.y))}}},sinusoidal:{project:function(b){return{x:pv.radians(b.lng)*Math.cos(pv.radians(b.lat))/Math.PI, +y:b.lat/90}},invert:function(b){return{lng:pv.degrees(b.x*Math.PI/Math.cos(b.y*Math.PI/2)),lat:b.y*90}}},aitoff:{project:function(b){var c=pv.radians(b.lng);b=pv.radians(b.lat);var d=Math.acos(Math.cos(b)*Math.cos(c/2));return{x:2*(d?Math.cos(b)*Math.sin(c/2)*d/Math.sin(d):0)/Math.PI,y:2*(d?Math.sin(b)*d/Math.sin(d):0)/Math.PI}},invert:function(b){var c=b.y*Math.PI/2;return{lng:pv.degrees(b.x*Math.PI/2/Math.cos(c)),lat:pv.degrees(c)}}},hammer:{project:function(b){var c=pv.radians(b.lng);b=pv.radians(b.lat); +var d=Math.sqrt(1+Math.cos(b)*Math.cos(c/2));return{x:2*Math.SQRT2*Math.cos(b)*Math.sin(c/2)/d/3,y:Math.SQRT2*Math.sin(b)/d/1.5}},invert:function(b){var c=b.x*3;b=b.y*1.5;var d=Math.sqrt(1-c*c/16-b*b/4);return{lng:pv.degrees(2*Math.atan2(d*c,2*(2*d*d-1))),lat:pv.degrees(Math.asin(d*b))}}},identity:{project:function(b){return{x:b.lng/180,y:b.lat/90}},invert:function(b){return{lng:b.x*180,lat:b.y*90}}}}; +pv.Geo.scale=function(b){function c(m){if(!o||m.lng!=o.lng||m.lat!=o.lat){o=m;m=d(m);n={x:l(m.x),y:k(m.y)}}return n}function d(m){return j.project({lng:m.lng-q.lng,lat:m.lat})}function f(m){m=j.invert(m);m.lng+=q.lng;return m}var g={x:0,y:0},h={x:1,y:1},i=[],j=pv.Geo.projections.identity,l=pv.Scale.linear(-1,1).range(0,1),k=pv.Scale.linear(-1,1).range(1,0),q={lng:0,lat:0},o,n;c.x=function(m){return c(m).x};c.y=function(m){return c(m).y};c.ticks={lng:function(m){var r;if(i.length>1){var s=pv.Scale.linear(); +if(m==undefined)m=10;r=s.domain(i,function(u){return u.lat}).ticks(m);m=s.domain(i,function(u){return u.lng}).ticks(m)}else{r=pv.range(-80,81,10);m=pv.range(-180,181,10)}return m.map(function(u){return r.map(function(x){return{lat:x,lng:u}})})},lat:function(m){return pv.transpose(c.ticks.lng(m))}};c.invert=function(m){return f({x:l.invert(m.x),y:k.invert(m.y)})};c.domain=function(m,r){if(arguments.length){i=m instanceof Array?arguments.length>1?pv.map(m,r):m:Array.prototype.slice.call(arguments); +if(i.length>1){var s=i.map(function(x){return x.lng}),u=i.map(function(x){return x.lat});q={lng:(pv.max(s)+pv.min(s))/2,lat:(pv.max(u)+pv.min(u))/2};s=i.map(d);l.domain(s,function(x){return x.x});k.domain(s,function(x){return x.y})}else{q={lng:0,lat:0};l.domain(-1,1);k.domain(-1,1)}o=null;return this}return i};c.range=function(m,r){if(arguments.length){if(typeof m=="object"){g={x:Number(m.x),y:Number(m.y)};h={x:Number(r.x),y:Number(r.y)}}else{g={x:0,y:0};h={x:Number(m),y:Number(r)}}l.range(g.x,h.x); +k.range(h.y,g.y);o=null;return this}return[g,h]};c.projection=function(m){if(arguments.length){j=typeof m=="string"?pv.Geo.projections[m]||pv.Geo.projections.identity:m;return this.domain(i)}return m};c.by=function(m){function r(){return c(m.apply(this,arguments))}for(var s in c)r[s]=c[s];return r};arguments.length&&c.projection(b);return c}; diff --git a/web/0.3.4/scripts/rdapi.js b/web/0.3.4/scripts/rdapi.js new file mode 100644 index 0000000..2f98bda --- /dev/null +++ b/web/0.3.4/scripts/rdapi.js @@ -0,0 +1,244 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint plusplus: false, nomen: false, regexp: false */ +/*global define: false, document: false, hex_md5: false, localStorage: false, console: false */ +"use strict"; + +define([ 'require', 'jquery', 'blade/object', 'blade/jig', 'friendly', 'isoDate', 'md5'], +function (require, $, object, jig, friendly, isoDate) { + + var rdapi, + csrfHeader = 'X-CSRF', + csrfRegExp = /csrf=([^\; ]+)/, + contacts = {}, + jigFunctions = { + contact: function (identity) { + return identity.iid && identity.domain ? contacts[identity.iid] || {} : identity; + }, + contactPhotoUrl: function (contact) { + var url = 'i/face2.png', photos, mailaddr; + contact = jigFunctions.contact(contact); + photos = contact.photos; + if (photos && photos.length) { + url = photos[0].value; + photos.forEach(function (photo) { + if (photo.primary) { + url = photo.value; + } + }); + } else + if (contact.emails && contact.emails.length) { + // gravatar as a default + mailaddr = contact.emails[0].value; + contact.emails.forEach(function (email) { + if (email.primary) { + mailaddr = email.value; + } + }); + url = 'http://www.gravatar.com/avatar/' + hex_md5(mailaddr) + '?s=24 &d=identicon'; + } + return url; + }, + allMessages: function (conversation) { + return [conversation.topic].concat(conversation.messages || []); + }, + friendlyDate: function (isoString) { + return friendly.date(isoDate(isoString)).friendly; + }, + htmlBody: function (text) { + return jig.htmlEscape(text).replace(/\n/g, '
      '); + } + }, + config = { + baseUrl: '/', + apiPath: 'api/', + saveTemplateData: true + }; + + //Register functions with jig + jig.addFn(jigFunctions); + + function normalize(options) { + if (typeof options === 'string') { + options = { + template: options + }; + } else if (options.templateId) { + options.template = jig.cache(options.templateId); + } + + if (!('attachData' in options)) { + options.attachData = rdapi.attachTemplateData; + } + + if (options.emptyTemplateId) { + options.emptyTemplate = jig.cache(options.emptyTemplateId); + } + + return options; + } + + function getCsrfToken() { + var token = csrfRegExp.exec(document.cookie); + return token && token[1] ? token[1] : null; + } + + function ajax(url, options) { + options.url = config.baseUrl + config.apiPath + url; + + object.mixin(options, { + limit: 30, + message_limit: 3, + dataType: 'json', + error: function (xhr, textStatus, errorThrown) { + throw errorThrown; + } + }); + + var oldSuccess = options.success, + csrfToken = getCsrfToken(); + + //Intercept any success calls to get a hold of contacts from + //any API call that returns them. Also be sure to remember any + //user token + options.success = function (json, textStatus, xhr) { + if (json && json.contacts) { + object.mixin(contacts, json.contacts, true); + } + if (oldSuccess) { + return oldSuccess.apply(null, arguments); + } else { + return json; + } + }; + + if (csrfToken) { + options.beforeSend = function (xhr) { + xhr.setRequestHeader(csrfHeader, csrfToken); + }; + } + + $.ajax(options); + } + + function finishApiTemplating(html, options) { + var parentNode = options.forId ? + document.getElementById(options.forId) : null; + if (parentNode) { + parentNode.innerHTML = html; + } + + if (options.onTemplateDone) { + options.onTemplateDone(html); + } + + $(document).trigger('rdapi-done', parentNode); + } + + rdapi = function (url, options) { + options = normalize(options); + + object.mixin(options, { + success: function (json) { + var template = options.template, + emptyTemplate = options.emptyTemplate, + html = ''; + + if (options.forId && template) { + if (options.prop) { + json = jig.getObject(options.prop, json, options); + } + + if (require.isArray(json)) { + if (!json.length) { + html += jig(emptyTemplate, json, options); + } else { + json.forEach(function (item) { + html += jig(template, item, options); + }); + } + } else { + html += jig(!json ? emptyTemplate : template, json, options); + } + + finishApiTemplating(html, options); + } + }, + error: function (xhr, textStatus, errorThrown) { + if (options.emptyTemplate) { + var html = jig(options.emptyTemplate, errorThrown, options); + finishApiTemplating(html, options); + } else { + throw errorThrown; + } + } + }); + + ajax(url, options); + }; + + rdapi.contactPhotoUrl = jigFunctions.contactPhotoUrl; + + rdapi.attachTemplateData = false; + + require.ready(function () { + var apiOptions = []; + + //Build up lists of templates to use. + jig.parse({ + //rdapi adds some additional semantics to some nodes, + //to allow automatic API calls, so pull off those attributes + //to use later for each template parsed. + onBeforeParse: function (node) { + var id = node.id, + api = node.getAttribute('data-rdapi'), + forId = node.getAttribute('data-rdfor'), + prop = node.getAttribute('data-rdprop'); + + if (api) { + apiOptions.push({ + templateId: id, + api: api, + forId: forId, + prop: prop + }); + } + + //Remove the data attributes specific to rdapi + ['data-rdapi', 'data-rdprop', 'data-rdfor'].forEach(function (attr) { + node.removeAttribute(attr); + }); + } + }); + + //Finally, do all the API calls. This is a separate loop because + //all templates need to be strings before the api calls execute in + //case subtemplates are needed. + apiOptions.forEach(function (apiOption) { + rdapi(apiOption.api, apiOption); + }); + }); + + return rdapi; +}); diff --git a/web/0.3.4/scripts/requireplugins-jquery.js b/web/0.3.4/scripts/requireplugins-jquery.js new file mode 100644 index 0000000..ba5655e --- /dev/null +++ b/web/0.3.4/scripts/requireplugins-jquery.js @@ -0,0 +1,214 @@ +/* + RequireJS 0.22.0 Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT or new BSD license. + see: http://github.com/jrburke/requirejs for details + RequireJS i18n Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT or new BSD license. + see: http://github.com/jrburke/requirejs for details + RequireJS text Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT or new BSD license. + see: http://github.com/jrburke/requirejs for details + RequireJS order Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT or new BSD license. + see: http://github.com/jrburke/requirejs for details + + jQuery JavaScript Library v1.4.4 + http://jquery.com/ + + Copyright 2010, John Resig + Dual licensed under the MIT or GPL Version 2 licenses. + http://jquery.org/license + + Includes Sizzle.js + http://sizzlejs.com/ + Copyright 2010, The Dojo Foundation + Released under the MIT, BSD, and GPL Licenses. + + Date: Thu Nov 11 19:04:53 2010 -0500 +*/ +var require,define; +(function(){function R(y){return ja.call(y)==="[object Function]"}function B(y){return ja.call(y)==="[object Array]"}function Aa(y,E,L){for(var M in E)if(!(M in ra)&&(!(M in y)||L))y[M]=E[M];return G}function $(y,E,L){var M,ha,S;for(M=0;S=E[M];M++){S=typeof S==="string"?{name:S}:S;ha=S.location;if(L&&(!ha||ha.indexOf("/")!==0&&ha.indexOf(":")===-1))S.location=L+"/"+(S.location||S.name);S.location=S.location||S.name;S.lib=S.lib||"lib";S.main=(S.main||"lib/main").replace(W,"");y[S.name]=S}}function J(y){function E(k){var o, +s;for(o=0;s=k[o];o++)if(s==="."){k.splice(o,1);o-=1}else if(s==="..")if(o===1&&(k[2]===".."||k[0]===".."))break;else if(o>0){k.splice(o-1,2);o-=2}}function L(k,o){var s;if(k.charAt(0)===".")if(o){if(ma.packages[o])o=[o];else{o=o.split("/");o=o.slice(0,o.length-1)}k=o.concat(k.split("/"));E(k);s=ma.packages[o=k[0]];k=k.join("/");if(s&&k===o+"/"+s.main)k=o}return k}function M(k,o){var s=k?k.indexOf("!"):-1,x=null,F=o?o.name:null,T=k,N,aa;if(s!==-1){x=k.substring(0,s);k=k.substring(s+1,k.length)}if(x){x= +L(x,F);x=Ya[x]||x}if(k){if(x)N=(s=ea[x])?s.normalize?s.normalize(k,function(ia){return L(ia,F)}):L(k,F):"__$p"+F+"@"+k;else N=L(k,F);aa=Za[N];if(!aa){aa=G.toModuleUrl?G.toModuleUrl(K,k,o):K.nameToUrl(k,null,o);Za[N]=aa}}return{prefix:x,name:N,parentMap:o,url:aa,originalName:T,fullName:x?x+"!"+N:N}}function ha(){var k=true,o=ma.priorityWait,s,x;if(o){for(x=0;s=o[x];x++)if(!va[s]){k=false;break}k&&delete ma.priorityWait}return k}function S(k){return function(o){k.exports=o}}function Qa(k,o,s){return function(){var x= +[].concat(ka.call(arguments,0)),F;if(s&&R(F=x[x.length-1]))F.__requireJsBuild=true;x.push(o);return k.apply(null,x)}}function gb(k,o){o=Qa(K.require,k,o);Aa(o,{nameToUrl:Qa(K.nameToUrl,k),toUrl:Qa(K.toUrl,k),isDefined:Qa(K.isDefined,k),ready:G.ready,isBrowser:G.isBrowser});if(G.paths)o.paths=G.paths;return o}function nb(k){var o,s,x,F,T,N,aa,ia=Ra[k];if(ia)for(F=0;s=ia[F];F++){o=s.fullName;s=M(s.originalName,s.parentMap);s=s.fullName;x=na[o];if(s!==o){na[s]=x;delete na[o];for(T=0;T0;N--){T=s.slice(0,N).join("/");if(x[T]){s.splice(0,N,x[T]);break}else if(T=F[T]){k=k===T.name?T.location+"/"+T.main:T.location+"/"+T.lib;s.splice(0,N,k);break}}o=s.join("/")+(o||".js");o=(o.charAt(0)=== +"/"||o.match(/^\w+:/)?"":aa.baseUrl)+o}}return aa.urlArgs?o+((o.indexOf("?")===-1?"?":"&")+aa.urlArgs):o}};K.jQueryCheck=ab;K.resume=la;return K}function X(){var y,E,L;if(ta&&ta.readyState==="interactive")return ta;y=document.getElementsByTagName("script");for(E=y.length-1;E>-1&&(L=y[E]);E--)if(L.readyState==="interactive")return ta=L;return null}var O=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,U=/require\(["']([^'"\s]+)["']\)/g,W=/^\.\//,ja=Object.prototype.toString,ba=Array.prototype,ka=ba.slice,oa=ba.splice, +sa=!!(typeof window!=="undefined"&&navigator&&document),wa=!sa&&typeof importScripts!=="undefined",pa=sa&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,Ca="_r@@",ra={},w={},c=[],ta=null,qb=false,db=false,Ya={text:"require/text",i18n:"require/i18n",order:"require/order"},G;ba={};var eb,ca,Ka,Ta,Ua,Fa,Va,Da,lb,Wa,Ja,Xa,fb,Ga;if(typeof require!=="undefined")if(R(require))return;else ba=require;G=require=function(y,E,L){var M="_",ha;if(!B(y)&&typeof y!=="string"){ha=y;if(B(E)){y= +E;E=L}else y=[]}if(ha&&ha.context)M=ha.context;L=w[M]||(w[M]=J(M));ha&&L.configure(ha);return L.require(y,E)};G.version="0.22.0";G.isArray=B;G.isFunction=R;G.mixin=Aa;G.jsExtRegExp=/^\/|:|\?|\.js$/;ca=G.s={contexts:w,skipAsync:{},isPageLoaded:!sa,readyCalls:[]};if(G.isAsync=G.isBrowser=sa){Ka=ca.head=document.getElementsByTagName("head")[0];if(Ta=document.getElementsByTagName("base")[0])Ka=ca.head=Ta.parentNode}G.onError=function(y){throw y;};G.load=function(y,E,L){var M=y.contextName,ha=y.urlFetched, +S=y.loaded;qb=false;S[E]||(S[E]=false);if(!ha[L]){y.scriptCount+=1;G.attach(L,M,E);ha[L]=true;if(y.jQuery&&!y.jQueryIncremented){y.jQuery.readyWait+=1;y.jQueryIncremented=true}}};define=G.def=function(y,E,L){var M;if(typeof y!=="string"){L=E;E=y;y=null}if(!G.isArray(E)){L=E;E=[]}if(!y&&!E.length&&G.isFunction(L))if(L.length){L.toString().replace(O,"").replace(U,function(ha,S){E.push(S)});E=["require","exports","module"].concat(E)}if(db){M=eb||X();if(!M)return G.onError(new Error("ERROR: No matching script interactive for "+ +L));y||(y=M.getAttribute("data-requiremodule"));M=w[M.getAttribute("data-requirecontext")]}(M?M.defQueue:c).push([y,E,L])};G.execCb=function(y,E,L){return E.apply(null,L)};G.onScriptLoad=function(y){var E=y.currentTarget||y.srcElement,L;if(y.type==="load"||pa.test(E.readyState)){ta=null;y=E.getAttribute("data-requirecontext");L=E.getAttribute("data-requiremodule");w[y].completeLoad(L);E.removeEventListener?E.removeEventListener("load",G.onScriptLoad,false):E.detachEvent("onreadystatechange",G.onScriptLoad)}}; +G.attach=function(y,E,L,M,ha){var S;if(sa){M=M||G.onScriptLoad;S=document.createElement("script");S.type=ha||"text/javascript";S.charset="utf-8";S.async=!ca.skipAsync[y];S.setAttribute("data-requirecontext",E);S.setAttribute("data-requiremodule",L);if(S.addEventListener)S.addEventListener("load",M,false);else{db=true;S.attachEvent("onreadystatechange",M)}S.src=y;eb=S;Ta?Ka.insertBefore(S,Ta):Ka.appendChild(S);eb=null;return S}else if(wa){M=w[E];E=M.loaded;E[L]=false;importScripts(y);M.completeLoad(L)}return null}; +ca.baseUrl=ba.baseUrl;if(sa&&(!ca.baseUrl||!Ka)){Ua=document.getElementsByTagName("script");Va=ba.baseUrlMatch?ba.baseUrlMatch:/(requireplugins-|require-)?jquery[\-\d\.]*(min)?\.js(\W|$)/i;for(Ja=Ua.length-1;Ja>-1&&(Fa=Ua[Ja]);Ja--){if(!Ka)Ka=Fa.parentNode;if(!Wa&&(Wa=Fa.getAttribute("data-main"))){ba.deps=ba.deps?ba.deps.concat(Wa):[Wa];if(!ba.baseUrl&&(Da=Fa.src)){Da=Da.split("/");Da.pop();ca.baseUrl=ba.baseUrl=Da.length?Da.join("/"):"./"}}if(!ca.baseUrl&&(Da=Fa.src))if(lb=Da.match(Va)){ca.baseUrl= +Da.substring(0,lb.index);break}}}G.pageLoaded=function(){if(!ca.isPageLoaded){ca.isPageLoaded=true;Xa&&clearInterval(Xa);if(fb)document.readyState="complete";G.callReady()}};G.checkReadyState=function(){var y=ca.contexts,E;for(E in y)if(!(E in ra))if(y[E].waitCount)return;ca.isDone=true;G.callReady()};G.callReady=function(){var y=ca.readyCalls,E,L,M;if(ca.isPageLoaded&&ca.isDone){if(y.length){ca.readyCalls=[];for(E=0;L=y[E];E++)L()}y=ca.contexts;for(M in y)if(!(M in ra)){E=y[M];if(E.jQueryIncremented){E.jQuery.readyWait-= +1;E.jQueryIncremented=false}}}};G.ready=function(y){ca.isPageLoaded&&ca.isDone?y():ca.readyCalls.push(y);return G};if(sa){if(document.addEventListener){document.addEventListener("DOMContentLoaded",G.pageLoaded,false);window.addEventListener("load",G.pageLoaded,false);if(!document.readyState){fb=true;document.readyState="loading"}}else if(window.attachEvent){window.attachEvent("onload",G.pageLoaded);if(self===self.top)Xa=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left"); +G.pageLoaded()}}catch(y){}},30)}document.readyState==="complete"&&G.pageLoaded()}G(ba);if(typeof setTimeout!=="undefined"){Ga=ca.contexts[ba.context||"_"];Ga.requireWait=true;setTimeout(function(){Ga.requireWait=false;Ga.takeGlobalQueue();Ga.jQueryCheck();Ga.scriptCount||Ga.resume();G.checkReadyState()},0)}})(); +(function(){function R($,J,X,O,U,W){if(J[$]){X.push($);if(J[$]===true||J[$]===1)O.push(U+$+"/"+W)}}function B($,J,X,O,U){J=O+J+"/"+U;require._fileExists($.nameToUrl(J,null))&&X.push(J)}var Aa=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("require/i18n",{load:function($,J,X,O){O=O||{};var U=Aa.exec($),W=U[1],ja=U[4],ba=U[5],ka=ja.split("-"),oa=[],sa={},wa,pa,Ca="";if(U[5]){W=U[1];$=W+ba}else{$=$;ba=U[4];ja=O.locale||(O.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage|| +"root").toLowerCase());ka=ja.split("-")}if(O.isBuild){oa.push($);B(J,"root",oa,W,ba);for(wa=0;pa=ka[wa];wa++){Ca+=(Ca?"-":"")+pa;B(J,Ca,oa,W,ba)}J(oa);X()}else J([$],function(ra){var w=[];R("root",ra,w,oa,W,ba);for(wa=0;pa=ka[wa];wa++){Ca+=(Ca?"-":"")+pa;R(Ca,ra,w,oa,W,ba)}J(oa,function(){var c,ta;for(c=w.length-1;c>-1&&(pa=w[c]);c--){ta=ra[pa];if(ta===true||ta===1)ta=J(W+pa+"/"+ba);require.mixin(sa,ta)}X(sa)})})}})})(); +(function(){var R=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],B=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,Aa=/]*>\s*([\s\S]+)\s*<\/body>/im,$=[];if(!require.textStrip)require.textStrip=function(J){if(J){J=J.replace(B,"");var X=J.match(Aa);if(X)J=X[1]}else J="";return J};if(!require.jsEscape)require.jsEscape=function(J){return J.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g, +"\\r")};if(!require.getXhr)require.getXhr=function(){var J,X,O;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(X=0;X<3;X++){O=R[X];try{J=new ActiveXObject(O)}catch(U){}if(J){R=[O];break}}if(!J)throw new Error("require.getXhr(): XMLHttpRequest not available");return J};if(!require.fetchText)require.fetchText=function(J,X){var O=require.getXhr();O.open("GET",J,true);O.onreadystatechange=function(){O.readyState===4&&X(O.responseText)};O.send(null)};define("require/text",{load:function(J, +X,O,U){var W=false,ja=J.indexOf("."),ba=J.substring(0,ja),ka=J.substring(ja+1,J.length);ja=ka.indexOf("!");if(ja!==-1){W=ka.substring(ja+1,ka.length);W=W==="strip";ka=ka.substring(0,ja)}X=X.nameToUrl(ba,"."+ka);require.fetchText(X,function(oa){oa=W?require.textStrip(oa):oa;if(U.isBuild&&U.inlineText)$[J]=oa;O(oa)})},write:function(J,X,O){if(X in $){var U=require.jsEscape($[X]);O("define('"+J+"!"+X+"', function () { return '"+U+"';});\n")}}})})(); +(function(){function R(O,U,W){U([O],function(ja){W(function(){return ja})})}function B(O){var U=O.currentTarget||O.srcElement,W;if(O.type==="load"||$.test(U.readyState)){O=U.getAttribute("data-requiremodule");X[O]=true;for(O=0;W=J[O];O++)if(X[W.name])R(W.name,W.req,W.onLoad);else break;O>0&&J.splice(0,O);setTimeout(function(){U.parentNode.removeChild(U)},15)}}var Aa=typeof document!=="undefined"&&typeof window!=="undefined"&&(document.createElement("script").async||window.opera&&Object.prototype.toString.call(window.opera)=== +"[object Opera]"||"MozAppearance"in document.documentElement.style),$=/^(complete|loaded)$/,J=[],X={};define("require/order",{load:function(O,U,W,ja){var ba=U.nameToUrl(O,null);if(ja.isBuild)R(O,U,W);else{require.s.skipAsync[ba]=true;if(Aa)U([O],function(ka){W(function(){return ka})});else if(U.isDefined(O))U([O],function(ka){W(function(){return ka})});else{J.push({name:O,req:U,onLoad:W});require.attach(ba,"",O,B,"script/cache")}}}})})(); +(function(R,B){function Aa(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):qb.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function $(){return false}function J(){return true}function X(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function O(a){var b,d,e,f,h,m,l,p,A,v,H,Q=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= +h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)H=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var fa=h.live.slice(0);for(l=0;ld)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;H=f.handleObj.origHandler.apply(f.elem,arguments);if(H===false||a.isPropagationStopped()){d=f.level;if(H===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function U(a,b){return(a&&a!=="*"?a+".": +"")+b.replace(Da,"`").replace(lb,"&")}function W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ja(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(gb.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function ba(a){return c.nodeName(a,"table")? +a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var m in e[h])c.event.add(this,h,e[h][m],e[h][m].data)}}})}function oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)} +function sa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?$a:ob,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function wa(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||T.test(a)?e(a,h):wa(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)? +e(a,""):c.each(b,function(f,h){wa(a+"["+f+"]",h,d,e)});else e(a,b)}function pa(a,b){var d={};c.each(tb.concat.apply([],tb.slice(0,b)),function(){d[this]=a});return d}function Ca(a){if(!rb[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";rb[a]=d}return rb[a]}function ra(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var w=R.document,c=function(){function a(){if(!b.isReady){try{w.documentElement.doScroll("left")}catch(j){setTimeout(a, +1);return}b.ready()}}var b=function(j,t){return new b.fn.init(j,t)},d=R.jQuery,e=R.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,m=/\S/,l=/^\s+/,p=/\s+$/,A=/\W/,v=/\d/,H=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Q=/^[\],:{}\s]*$/,fa=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,C=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,da=/(?:^|:|,)(?:\s*\[)+/g,xa=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,q=navigator.userAgent,r=false, +u=[],D,I=Object.prototype.toString,Y=Object.prototype.hasOwnProperty,ua=Array.prototype.push,ya=Array.prototype.slice,za=String.prototype.trim,V=Array.prototype.indexOf,Pa={};b.fn=b.prototype={init:function(j,t){var z,P;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!t&&w.body){this.context=w;this[0]=w.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((z=h.exec(j))&&(z[1]||!t))if(z[1]){P=t?t.ownerDocument||t:w;if(j=H.exec(j))if(b.isPlainObject(t)){j= +[w.createElement(j[1])];b.fn.attr.call(j,t,true)}else j=[P.createElement(j[1])];else{j=b.buildFragment([z[1]],[P]);j=(j.cacheable?j.fragment.cloneNode(true):j.fragment).childNodes}return b.merge(this,j)}else{if((t=w.getElementById(z[2]))&&t.parentNode){if(t.id!==z[2])return f.find(j);this.length=1;this[0]=t}this.context=w;this.selector=j;return this}else if(!t&&!A.test(j)){this.selector=j;this.context=w;j=w.getElementsByTagName(j);return b.merge(this,j)}else return!t||t.jquery?(t||f).find(j):b(t).find(j); +else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},toArray:function(){return ya.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,t,z){var P=b();b.isArray(j)?ua.apply(P,j):b.merge(P,j);P.prevObject=this;P.context=this.context;if(t==="find")P.selector=this.selector+(this.selector?" ": +"")+z;else if(t)P.selector=this.selector+"."+t+"("+z+")";return P},each:function(j,t){return b.each(this,j,t)},ready:function(j){b.bindReady();if(b.isReady)j.call(w,b);else u&&u.push(j);return this},eq:function(j){return j===-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(ya.apply(this,arguments),"slice",ya.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(t,z){return j.call(t, +z,t)}))},end:function(){return this.prevObject||b(null)},push:ua,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,t,z,P,ga,Z=arguments[0]||{},qa=1,Ba=arguments.length,sb=false;if(typeof Z==="boolean"){sb=Z;Z=arguments[1]||{};qa=2}if(typeof Z!=="object"&&!b.isFunction(Z))Z={};if(Ba===qa){Z=this;--qa}for(;qa0))if(u){var t=0,z=u;for(u=null;j=z[t++];)j.call(w,b);b.fn.trigger&&b(w).trigger("ready").unbind("ready")}}},bindReady:function(){if(!r){r=true;if(w.readyState=== +"complete")return setTimeout(b.ready,1);if(w.addEventListener){w.addEventListener("DOMContentLoaded",D,false);R.addEventListener("load",b.ready,false)}else if(w.attachEvent){w.attachEvent("onreadystatechange",D);R.attachEvent("onload",b.ready);var j=false;try{j=R.frameElement==null}catch(t){}w.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in +j},isNaN:function(j){return j==null||!v.test(j)||isNaN(j)},type:function(j){return j==null?String(j):Pa[I.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&!Y.call(j,"constructor")&&!Y.call(j.constructor.prototype,"isPrototypeOf"))return false;var t;for(t in j);return t===B||Y.call(j,t)},isEmptyObject:function(j){for(var t in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!== +"string"||!j)return null;j=b.trim(j);if(Q.test(j.replace(fa,"@").replace(C,"]").replace(da,"")))return R.JSON&&R.JSON.parse?R.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&m.test(j)){var t=w.getElementsByTagName("head")[0]||w.documentElement,z=w.createElement("script");z.type="text/javascript";if(b.support.scriptEval)z.appendChild(w.createTextNode(j));else z.text=j;t.insertBefore(z,t.firstChild);t.removeChild(z)}},nodeName:function(j, +t){return j.nodeName&&j.nodeName.toUpperCase()===t.toUpperCase()},each:function(j,t,z){var P,ga=0,Z=j.length,qa=Z===B||b.isFunction(j);if(z)if(qa)for(P in j){if(t.apply(j[P],z)===false)break}else for(;ga
      a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],m=w.createElement("select"),l=m.appendChild(w.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length, +htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:l.selected,deleteExpando:true,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};m.disabled=true;c.support.optDisabled= +!l.disabled;b.type="text/javascript";try{b.appendChild(w.createTextNode("window."+e+"=1;"))}catch(p){}a.insertBefore(b,a.firstChild);if(R[e]){c.support.scriptEval=true;delete R[e]}try{delete b.test}catch(A){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function v(){c.support.noCloneEvent=false;d.detachEvent("onclick",v)});d.cloneNode(true).fireEvent("onclick")}d=w.createElement("div");d.innerHTML=""; +a=w.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var v=w.createElement("div");v.style.width=v.style.paddingLeft="1px";w.body.appendChild(v);c.boxModel=c.support.boxModel=v.offsetWidth===2;if("zoom"in v.style){v.style.display="inline";v.style.zoom=1;c.support.inlineBlockNeedsLayout=v.offsetWidth===2;v.style.display="";v.innerHTML="
      ";c.support.shrinkWrapBlocks=v.offsetWidth!== +2}v.innerHTML="
      t
      ";var H=v.getElementsByTagName("td");c.support.reliableHiddenOffsets=H[0].offsetHeight===0;H[0].style.display="";H[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&H[0].offsetHeight===0;v.innerHTML="";w.body.removeChild(v).style.display="none"});a=function(v){var H=w.createElement("div");v="on"+v;var Q=v in H;if(!Q){H.setAttribute(v,"return;");Q=typeof H[v]==="function"}return Q}; +c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ta={},qb=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==R?ta:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h, +b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==R?ta:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var m in a)delete a[m]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()]; +if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,m=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var H=c.makeArray(v);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),H)>=0});if(!H.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d); +e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=eb.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&ca.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ka.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&& +e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var Fa=/\.(.*)$/,Va=/^(?:textarea|input|select)$/i,Da=/\./g,lb=/ /g,Wa=/[^\w\s.|`]/g,Ja=function(a){return a.replace(Wa,"\\$&")},Xa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==R&&!a.frameElement)a= +R;if(d===false)d=$;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var m=a.nodeType?"events":"__events__",l=h[m],p=h.handle;if(typeof l==="function"){p=l.handle;l=l.events}else if(!l){a.nodeType||(h[m]=h=function(){});h.events=l={}}if(!p)h.handle=p=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(p.elem,arguments):B};p.elem=a;b=b.split(" ");for(var A=0,v;m=b[A++];){h=f?c.extend({},f):{handler:d,data:e};if(m.indexOf(".")> +-1){v=m.split(".");m=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=m;if(!h.guid)h.guid=d.guid;var H=l[m],Q=c.event.special[m]||{};if(!H){H=l[m]=[];if(!Q.setup||Q.setup.call(a,e,v,p)===false)if(a.addEventListener)a.addEventListener(m,p,false);else a.attachEvent&&a.attachEvent("on"+m,p)}if(Q.add){Q.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}H.push(h);c.event.global[m]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType=== +8)){if(d===false)d=$;var f,h,m=0,l,p,A,v,H,Q,fa=a.nodeType?"events":"__events__",C=c.data(a),da=C&&C[fa];if(C&&da){if(typeof da==="function"){C=da;da=da.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in da)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[m++];){v=f;l=f.indexOf(".")<0;p=[];if(!l){p=f.split(".");f=p.shift();A=new RegExp("(^|\\.)"+c.map(p.slice(0).sort(),Ja).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(H=da[f])if(d){v=c.event.special[f]|| +{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType? +c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var m;e=a.target;var l=f.replace(Fa,""),p=c.nodeName(e,"a")&&l==="click",A=c.event.special[l]||{};if((!A._default||A._default.call(d,a)===false)&&!p&&!(e&&e.nodeName&& +c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(m=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(m)e["on"+l]=m;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||R.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType? +"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var m=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},L=function(a,b){var d=a.target,e,f;if(!(!Va.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=E(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= +B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:L,beforedeactivate:L,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return L.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return L.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",E(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in y)c.event.add(this,a+".specialChange",y[a]);return Va.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return Va.test(this.nodeName)}};y=c.event.special.change.filters;y.focus=y.beforeactivate}w.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){Xa[b]++===0&&w.addEventListener(a,d,true)},teardown:function(){--Xa[b]=== +0&&w.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var m=b==="one"?c.proxy(f,function(p){c(this).unbind(p,m);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});R.attachEvent&&!R.addEventListener&&c(R).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); +(function(){function a(g,i,n,q,r,u){r=0;for(var D=q.length;r0){Y=I;break}}I=I[g]}q[r]=Y}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,m=true;[0,0].sort(function(){m=false;return 0});var l=function(g,i,n,q){n=n||[];var r=i=i||w;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var u,D,I,Y,ua,ya=true,za=l.isXML(i),V=[],Pa=g;do{d.exec("");if(u=d.exec(Pa)){Pa=u[3];V.push(u[1]);if(u[2]){Y= +u[3];break}}}while(u);if(V.length>1&&A.exec(g))if(V.length===2&&p.relative[V[0]])D=xa(V[0]+V[1],i);else for(D=p.relative[V[0]]?[i]:l(V.shift(),i);V.length;){g=V.shift();if(p.relative[g])g+=V.shift();D=xa(g,D)}else{if(!q&&V.length>1&&i.nodeType===9&&!za&&p.match.ID.test(V[0])&&!p.match.ID.test(V[V.length-1])){u=l.find(V.shift(),i,za);i=u.expr?l.filter(u.expr,u.set)[0]:u.set[0]}if(i){u=q?{expr:V.pop(),set:Q(q)}:l.find(V.pop(),V.length===1&&(V[0]==="~"||V[0]==="+")&&i.parentNode?i.parentNode:i,za);D= +u.expr?l.filter(u.expr,u.set):u.set;if(V.length>0)I=Q(D);else ya=false;for(;V.length;){u=ua=V.pop();if(p.relative[ua])u=V.pop();else ua="";if(u==null)u=i;p.relative[ua](I,u,za)}}else I=[]}I||(I=D);I||l.error(ua||g);if(f.call(I)==="[object Array]")if(ya)if(i&&i.nodeType===1)for(g=0;I[g]!=null;g++){if(I[g]&&(I[g]===true||I[g].nodeType===1&&l.contains(i,I[g])))n.push(D[g])}else for(g=0;I[g]!=null;g++)I[g]&&I[g].nodeType===1&&n.push(D[g]);else n.push.apply(n,I);else Q(I,n);if(Y){l(Y,r,n,q);l.uniqueSort(n)}return n}; +l.uniqueSort=function(g){if(C){h=m;g.sort(C);if(h)for(var i=1;i0};l.find=function(g,i,n){var q;if(!g)return[];for(var r=0,u=p.order.length;r":function(g,i){var n,q=typeof i==="string",r=0,u=g.length;if(q&&!/\W/.test(i))for(i=i.toLowerCase();r=0))n||q.push(D);else if(n)i[u]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&& +"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,q,r,u){i=g[1].replace(/\\/g,"");if(!u&&p.attrMap[i])g[1]=p.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,q,r){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,i);else{g=l.filter(g[3],i,n,true^r);n||q.push.apply(q,g);return false}else if(p.match.POS.test(g[0])||p.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}}, +filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!l(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== +g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,q){return i===q.length-1},even:function(g,i){return i%2=== +0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]-0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,q){var r=i[1],u=p.filters[r];if(u)return u(g,n,i,q);else if(r==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(i[3])>=0;else if(r==="not"){i=i[3];n=0;for(q=i.length;n= +0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];g=p.attrHandle[n]?p.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);n=g+"";var q=i[2];i=i[4];return g==null?q==="!=":q==="="?n===i:q==="*="?n.indexOf(i)>=0:q==="~="?(" "+n+" ").indexOf(i)>=0:!i?n&&g!==false:q==="!="?n!==i:q==="^="? +n.indexOf(i)===0:q==="$="?n.substr(n.length-i.length)===i:q==="|="?n===i||n.substr(0,i.length+1)===i+"-":false},POS:function(g,i,n,q){var r=p.setFilters[i[2]];if(r)return r(g,n,i,q)}}},A=p.match.POS,v=function(g,i){return"\\"+(i-0+1)};for(var H in p.match){p.match[H]=new RegExp(p.match[H].source+/(?![^\[]*\])(?![^\(]*\))/.source);p.leftMatch[H]=new RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[H].source.replace(/\\(\d+)/g,v))}var Q=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g); +return i}return g};try{Array.prototype.slice.call(w.documentElement.childNodes,0)}catch(fa){Q=function(g,i){var n=0;i=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(i,g);else if(typeof g.length==="number")for(var q=g.length;n";n.insertBefore(g,n.firstChild);if(w.getElementById(i)){p.find.ID=function(q,r,u){if(typeof r.getElementById!=="undefined"&&!u)return(r=r.getElementById(q[1]))?r.id===q[1]||typeof r.getAttributeNode!=="undefined"&&r.getAttributeNode("id").nodeValue=== +q[1]?[r]:B:[]};p.filter.ID=function(q,r){var u=typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id");return q.nodeType===1&&u&&u.nodeValue===r}}n.removeChild(g);n=g=null})();(function(){var g=w.createElement("div");g.appendChild(w.createComment(""));if(g.getElementsByTagName("*").length>0)p.find.TAG=function(i,n){n=n.getElementsByTagName(i[1]);if(i[1]==="*"){i=[];for(var q=0;n[q];q++)n[q].nodeType===1&&i.push(n[q]);n=i}return n};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!== +"undefined"&&g.firstChild.getAttribute("href")!=="#")p.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();w.querySelectorAll&&function(){var g=l,i=w.createElement("div");i.innerHTML="

      ";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){l=function(q,r,u,D){r=r||w;q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!D&&!l.isXML(r))if(r.nodeType===9)try{return Q(r.querySelectorAll(q),u)}catch(I){}else if(r.nodeType===1&&r.nodeName.toLowerCase()!== +"object"){var Y=r.getAttribute("id"),ua=Y||"__sizzle__";Y||r.setAttribute("id",ua);try{return Q(r.querySelectorAll("#"+ua+" "+q),u)}catch(ya){}finally{Y||r.removeAttribute("id")}}return g(q,r,u,D)};for(var n in g)l[n]=g[n];i=null}}();(function(){var g=w.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(w.documentElement,"[test!='']:sizzle")}catch(q){n=true}if(i)l.matchesSelector=function(r,u){u=u.replace(/\=\s*([^'"\]]*)\s*\]/g, +"='$1']");if(!l.isXML(r))try{if(n||!p.match.PSEUDO.test(u)&&!/!=/.test(u))return i.call(r,u)}catch(D){}return l(u,null,null,[r]).length>0}})();(function(){var g=w.createElement("div");g.innerHTML="
      ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){p.order.splice(1,0,"CLASS");p.find.CLASS=function(i,n,q){if(typeof n.getElementsByClassName!=="undefined"&& +!q)return n.getElementsByClassName(i[1])};g=null}}})();l.contains=w.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:w.documentElement.compareDocumentPosition?function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var xa=function(g,i){var n,q=[],r="";for(i=i.nodeType?[i]:i;n=p.match.PSEUDO.exec(g);){r+=n[0];g=g.replace(p.match.PSEUDO,"")}g= +p.relative[g]?g+"*":g;n=0;for(var u=i.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var m,l={},p=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(a))d.push({selector:m,elem:h,level:p})}h=h.parentNode;p++}}return d}m=hb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a|| +typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(W(a[0])||W(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);ha.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Qa.test(e))&&S.test(a))f=f.reverse();return this.pushStack(f,a,nb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a= +a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Sa=/ jQuery\d+="(?:\d+|null)"/g,Na=/^\s+/,La=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ab=/<([\w:]+)/,jb=/\s]+\/)>/g,la={option:[1,""],legend:[1,"
      ","
      "],thead:[1,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],col:[2,"","
      "],area:[1,"",""],_default:[0,"",""]};la.optgroup=la.option;la.tbody=la.tfoot=la.colgroup=la.caption=la.thead;la.th=la.td;if(!c.support.htmlSerialize)la._default= +[1,"div
      ","
      "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||w).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d= +this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments, +true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, +false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Sa,"").replace(K,'="$1">').replace(Na,"")],e)[0]}else return this.cloneNode(true)});if(a===true){ka(this,b);ka(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Sa,""):null; +else if(typeof a==="string"&&!cb.test(a)&&(c.support.leadingWhitespace||!Na.test(a))&&!la[(ab.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(La,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}l.length&&c.each(l, +oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:w;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===w&&!cb.test(a[0])&&(c.support.checkClone||!kb.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"}, +function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](m);e=e.concat(m)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||w;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||w;for(var f=[],h=0,m;(m=a[h])!=null;h++){if(typeof m=== +"number")m+="";if(m){if(typeof m==="string"&&!bb.test(m))m=b.createTextNode(m);else if(typeof m==="string"){m=m.replace(La,"<$1>");var l=(ab.exec(m)||["",""])[1].toLowerCase(),p=la[l]||la._default,A=p[0],v=b.createElement("div");for(v.innerHTML=p[1]+m+p[2];A--;)v=v.lastChild;if(!c.support.tbody){A=jb.test(m);l=l==="table"&&!A?v.firstChild&&v.firstChild.childNodes:p[1]===""&&!A?v.childNodes:[];for(p=l.length-1;p>=0;--p)c.nodeName(l[p],"tbody")&&!l[p].childNodes.length&&l[p].parentNode.removeChild(l[p])}!c.support.leadingWhitespace&& +Na.test(m)&&v.insertBefore(b.createTextNode(Na.exec(m)[0]),v.firstChild);m=v.childNodes}if(m.nodeType)f.push(m);else f=c.merge(f,m)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special, +h=c.support.deleteExpando,m=0,l;(l=a[m])!=null;m++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var p in b.events)f[p]?c.event.remove(l,p):c.removeEvent(l,p,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var ma=/alpha\([^)]*\)/i,Oa=/opacity=([^)]*)/,Ma=/-([a-z])/ig,Za=/([A-Z])/g,ea=/^-?\d+(?:px)?$/i,va=/^-?\d/,Ia={position:"absolute",visibility:"hidden",display:"block"},$a=["Left","Right"], +ob=["Top","Bottom"],na,Ha,Ea,Ra=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){a=na(a,"opacity","opacity");return a===""?"1":a}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a, +b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),m=a.style,l=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==B)try{m[b]=d}catch(p){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==B)return f;return m[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(na)return na(a, +b,f)},swap:function(a,b,d){var e={};for(var f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(Ma,Ra)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=sa(d,b,f);else c.swap(d,Ia,function(){h=sa(d,b,f)});if(h<=0){h=na(d,b,b);if(h==="0px"&&Ea)h=Ea(d,b,b);if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px": +h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(ea.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return Oa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){a=a.style;a.zoom=1;b=c.isNaN(b)?"":"alpha(opacity="+b*100+")";var d=a.filter||"";a.filter=ma.test(d)?d.replace(ma,b):a.filter+" "+b}};if(w.defaultView&&w.defaultView.getComputedStyle)Ha= +function(a,b,d){var e;d=d.replace(Za,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(w.documentElement.currentStyle)Ea=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!ea.test(f)&&va.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left= +d;a.runtimeStyle.left=e}return f===""?"auto":f};na=Ha||Ea;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var k=c.now(),o=/)<[^<]*)*<\/script>/gi,s=/^(?:select|textarea)/i,x=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, +F=/^(?:GET|HEAD)$/,T=/\[\]$/,N=/\=\?(&|$)/,aa=/\?/,ia=/([?&])_=[^&]*/,ib=/^(\w+:)?\/\/([^\/?#]+)/,pb=/%20/g,wb=/#.*$/,ub=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&ub)return ub.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b, +complete:function(m,l){if(l==="success"||l==="notmodified")h.html(f?c("
      ").append(m.responseText.replace(o,"")).find(f):m.responseText);d&&h.each(d,[m.responseText,l,m])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||s.test(this.nodeName)||x.test(this.type))}).map(function(a,b){a=c(this).val(); +return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a, +b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new R.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}}, +ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),m=F.test(h);b.url=b.url.replace(wb,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")N.test(b.url)||(b.url+=(aa.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||!N.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&& +(b.data&&N.test(b.data)||N.test(b.url))){d=b.jsonpCallback||"jsonp"+k++;if(b.data)b.data=(b.data+"").replace(N,"="+d+"$1");b.url=b.url.replace(N,"="+d+"$1");b.dataType="script";var l=R[d];R[d]=function(q){if(c.isFunction(l))l(q);else{R[d]=B;try{delete R[d]}catch(r){}}f=q;c.handleSuccess(b,C,e,f);c.handleComplete(b,C,e,f);v&&v.removeChild(H)}}if(b.dataType==="script"&&b.cache===null)b.cache=false;if(b.cache===false&&m){var p=c.now(),A=b.url.replace(ia,"$1_="+p);b.url=A+(A===b.url?(aa.test(b.url)?"&": +"?")+"_="+p:"")}if(b.data&&m)b.url+=(aa.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");p=(p=ib.exec(b.url))&&(p[1]&&p[1].toLowerCase()!==location.protocol||p[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&p){var v=w.getElementsByTagName("head")[0]||w.documentElement,H=w.createElement("script");if(b.scriptCharset)H.charset=b.scriptCharset;H.src=b.url;if(!d){var Q=false;H.onload=H.onreadystatechange=function(){if(!Q&&(!this.readyState||this.readyState=== +"loaded"||this.readyState==="complete")){Q=true;c.handleSuccess(b,C,e,f);c.handleComplete(b,C,e,f);H.onload=H.onreadystatechange=null;v&&H.parentNode&&v.removeChild(H)}}}v.insertBefore(H,v.firstChild);return B}var fa=false,C=b.xhr();if(C){b.username?C.open(h,b.url,b.async,b.username,b.password):C.open(h,b.url,b.async);try{if(b.data!=null&&!m||a&&a.contentType)C.setRequestHeader("Content-Type",b.contentType);if(b.ifModified){c.lastModified[b.url]&&C.setRequestHeader("If-Modified-Since",c.lastModified[b.url]); +c.etag[b.url]&&C.setRequestHeader("If-None-Match",c.etag[b.url])}p||C.setRequestHeader("X-Requested-With","XMLHttpRequest");C.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(da){}if(b.beforeSend&&b.beforeSend.call(b.context,C,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");C.abort();return false}b.global&&c.triggerGlobal(b,"ajaxSend",[C,b]);var xa=C.onreadystatechange=function(q){if(!C||C.readyState===0|| +q==="abort"){fa||c.handleComplete(b,C,e,f);fa=true;if(C)C.onreadystatechange=c.noop}else if(!fa&&C&&(C.readyState===4||q==="timeout")){fa=true;C.onreadystatechange=c.noop;e=q==="timeout"?"timeout":!c.httpSuccess(C)?"error":b.ifModified&&c.httpNotModified(C,b.url)?"notmodified":"success";var r;if(e==="success")try{f=c.httpData(C,b.dataType,b)}catch(u){e="parsererror";r=u}if(e==="success"||e==="notmodified")d||c.handleSuccess(b,C,e,f);else c.handleError(b,C,e,r);d||c.handleComplete(b,C,e,f);q==="timeout"&& +C.abort();if(b.async)C=null}};try{var g=C.abort;C.abort=function(){C&&Function.prototype.call.call(g,C);xa("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){C&&!fa&&xa("timeout")},b.timeout);try{C.send(m||b.data==null?null:b.data)}catch(n){c.handleError(b,C,null,n);c.handleComplete(b,C,e,f)}b.async||xa();return C}},param:function(a,b){var d=[],e=function(h,m){m=c.isFunction(m)?m():m;d[d.length]=encodeURIComponent(h)+"="+encodeURIComponent(m)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)|| +a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)wa(f,a[f],b,e);return d.join("&").replace(pb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a, +"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304}, +httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});if(R.ActiveXObject)c.ajaxSettings.xhr=function(){if(R.location.protocol!=="file:")try{return new R.XMLHttpRequest}catch(a){}try{return new R.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}; +c.support.ajax=!!c.ajaxSettings.xhr();var rb={},xb=/^(?:toggle|show|hide)$/,yb=/^([+\-]=)?([\d+.\-]+)(.*)$/,mb,tb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(pa("show",3),a,b,d);else{d=0;for(var e=this.length;d=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:pa("show",1),slideUp:pa("hide",1),slideToggle:pa("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a, +easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype= +{update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-10000?a:0},custom:function(a,b,d){function e(m){return f.step(m)}var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos= +this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!mb)mb=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(l,p){f.style["overflow"+p]=h.overflow[l]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var m in this.options.curAnim)c.style(this.elem,m,this.options.orig[m]);this.options.complete.call(this.elem)}return false}else{a= +b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
      "; +a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),m=c.css(a,"top"),l=c.css(a,"left"),p=e==="absolute"&&c.inArray("auto",[m,l])>-1;e={};var A={};if(p)A=f.position();m=p?A.top:parseInt(m, +10)||0;l=p?A.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+m;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a,e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=vb.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0], +"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||w.body;a&&!vb.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=ra(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=ra(f))?"pageXOffset"in +h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(m){var l=c(this);l[d](e.call(this, +m,l[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}});typeof define!=="undefined"&&define("jquery",[],function(){return c})})(window); diff --git a/web/0.3.4/scripts/rssFeed.js b/web/0.3.4/scripts/rssFeed.js new file mode 100644 index 0000000..44e8594 --- /dev/null +++ b/web/0.3.4/scripts/rssFeed.js @@ -0,0 +1,71 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2, plusplus: false */ +/*global define: false, window: false, document: false */ +"use strict"; + +define([], function () { + + var masterCallback; + + //Callback handler for JSONP feed response from Google. + window.onRssFeedLoad = function (x, data) { + var title, link, i, entry; + if (data && data.feed && data.feed.entries) { + for (i = 0; (entry = data.feed.entries[i]); i++) { + if (entry.categories && entry.categories.indexOf('Sharing') !== -1) { + link = entry.link; + title = entry.title; + break; + } + } + } + + if (link && masterCallback) { + masterCallback(title, link); + } + }; + + /** + * Fetches RSS feed and gives back the title and link for the first + * "Sharing" category RSS feed entry. Calls the callback with the + * string values for title and link as function arguments. + * Only calls the callback if there is a match found. + * @param {Function} callback + */ + function rssFeed(callback) { + masterCallback = callback; + + //Fetch the feed. + var node = document.createElement("script"); + node.charset = "utf-8"; + node.async = true; + node.src = 'https://www.google.com/uds/Gfeeds?v=1.0&callback=onRssFeedLoad&context=' + + '&output=json&' + + 'q=http%3A%2F%2Fmozillalabs.com%2Fmessaging%2Ffeed%2F'; + document.getElementsByTagName('head')[0].appendChild(node); + } + + return rssFeed; +}); diff --git a/web/0.3.4/scripts/services.js b/web/0.3.4/scripts/services.js new file mode 100644 index 0000000..0eaea8a --- /dev/null +++ b/web/0.3.4/scripts/services.js @@ -0,0 +1,290 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false, window: false, location: true, localStorage: false, + opener: false, setTimeout: false, navigator: false */ + +'use strict'; + +define([ 'blade/object', 'storage'], +function (object, storage) { + + var newHotness = parseFloat(navigator.userAgent.split('Firefox/')[1]) >= 4, + store = storage(), + svcs, prop; + + function SvcBase(name, options) { + if (!name) { + return; + } + this.name = name; + this.type = name.replace(/\s/g, '').toLowerCase(); + this.tabName = this.type + 'Tab'; + this.icon = 'i/' + this.type + 'Icon.png'; + + // set features + this.features = { + counter: false, + direct: false, + subject: false + }; + + object.mixin(this, options, true); + } + SvcBase.constructor = SvcBase; + SvcBase.prototype = { + clearCache: function (store) { + //This first delete is only needed for 3.6 support. + //Remove the call in accounts.js when it is removed. + delete store[this.type + 'Contacts']; + }, + //This method can be removed once 3.6 support is dropped. + getContacts: function (store) { + if (store[this.type + 'Contacts']) { + var contacts = JSON.parse(store[this.type + 'Contacts']); + return contacts; + } + return null; + }, + //This method can be removed once 3.6 support is dropped. + setContacts: function (store, contacts) { + store[this.type + 'Contacts'] = JSON.stringify(contacts); + }, + + // stub function that should not return data for non-mail services + // for the FF 3.6 extension. + get36FormattedContacts: function () { + return null; + } + }; + + /* common functionality for email based services */ + function EmailSvcBase() { + SvcBase.constructor.apply(this, arguments); + this.features.direct = true; + this.features.subject = true; + } + + EmailSvcBase.prototype = new SvcBase(); + EmailSvcBase.constructor = EmailSvcBase; + EmailSvcBase.prototype.validate = function (sendData) { + if (!sendData.to || !sendData.to.trim()) { + return false; + } + return true; + }; + + // The old top browser UI in the 3.6 extension expects the contacts data + // as an array. + // TODO: remove when Firefox 3.6 is no longer supported. + EmailSvcBase.prototype.get36FormattedContacts = function (entries) { + var data = []; + entries.forEach(function (entry) { + if (entry.emails && entry.emails.length) { + entry.emails.forEach(function (email) { + var displayName = entry.displayName ? entry.displayName : email.value; + data.push({ + displayName: displayName, + email: email.value + }); + }); + } + }); + return data; + }; + + EmailSvcBase.prototype.overlays = { + 'Contacts': 'ContactsEmail' + }; + + svcs = { + domains: { + 'twitter.com': new SvcBase('Twitter', { + features: { + //TODO: remove direct when old UI is no longer in use, + //or remove it from use. + direct: true, + subject: false, + counter: true + }, + shareTypes: [{ + type: 'public', + name: 'public' + }, { + type: 'direct', + name: 'direct message', + showTo: true, + toLabel: 'type in name of recipient' + }], + textLimit: 140, + shorten: true, + serviceUrl: 'http://twitter.com', + revokeUrl: 'http://twitter.com/settings/connections', + signOutUrl: 'http://twitter.com/logout', + accountLink: function (account) { + return 'http://twitter.com/' + account.username; + }, + forceLogin: { + name: 'force_login', + value: true + }, + overlays: { + 'Contacts': 'ContactsTwitter' + } + }), + 'facebook.com': new SvcBase('Facebook', { + features: { + //TODO: remove direct when old UI is no longer in use, + //or remove it from use. + direct: true, + subject: false, + counter: true, + medium: true + }, + shareTypes: [{ + type: 'wall', + name: 'my wall' + }, { + type: 'groupWall', + name: 'group wall', + showTo: true, + toLabel: 'type in the name of the group' + }], + textLimit: 420, + serviceUrl: 'http://facebook.com', + revokeUrl: 'http://www.facebook.com/editapps.php?v=allowed', + signOutUrl: 'http://facebook.com', + accountLink: function (account) { + return 'http://www.facebook.com/profile.php?id=' + account.userid; + }, + overlays: { + 'widgets/AccountPanel': 'widgets/AccountPanelFaceBook' + } + }), + 'google.com': new EmailSvcBase('Gmail', { + shareTypes: [{ + type: 'direct', + name: 'direct', + showTo: true + }], + serviceUrl: 'https://mail.google.com', + revokeUrl: 'https://www.google.com/accounts/IssuedAuthSubTokens', + signOutUrl: 'http://google.com/preferences', + accountLink: function (account) { + return 'http://google.com/profiles/' + account.username; + }, + forceLogin: { + name: 'pape_max_auth_age', + value: 0 + } + }), + 'googleapps.com': new EmailSvcBase('Google Apps', { + shareTypes: [{ + type: 'direct', + name: 'direct', + showTo: true + }], + icon: 'i/gmailIcon.png', + serviceUrl: 'https://mail.google.com', + revokeUrl: 'https://www.google.com/accounts/IssuedAuthSubTokens', + signOutUrl: 'http://google.com/preferences', + accountLink: function (account) { + return 'http://google.com/profiles/' + account.username; + }, + forceLogin: { + name: 'pape_max_auth_age', + value: 0 + } + }), + 'yahoo.com': new EmailSvcBase('Yahoo', { + shareTypes: [{ + type: 'direct', + name: 'direct', + showTo: true + }], + name: 'Yahoo!', + serviceUrl: 'http://mail.yahoo.com', // XXX yahoo doesn't have ssl enabled mail? + revokeUrl: 'https://api.login.yahoo.com/WSLogin/V1/unlink', + signOutUrl: 'https://login.yahoo.com/config/login?logout=1', + accountLink: function (account) { + return 'http://profiles.yahoo.com/' + account.username; + } + }), + 'linkedin.com': new SvcBase('LinkedIn', { + isNew: true, + features: { + //TODO: remove direct when old UI is no longer in use, + //or remove it from use. + direct: true, + subject: true, + counter: false + }, + shareTypes: [{ + type: 'public', + name: 'anyone' + }, { + type: 'myConnections', + name: 'connections only', + specialTo: 'connections-only' + }, { + type: 'contact', + name: 'send message', + showTo: true, + toLabel: 'type in the name of the contact' + }], + serviceUrl: 'http://linkedin.com', + revokeUrl: 'http://linkedin.com/settings/connections', + signOutUrl: 'https://www.linkedin.com/secure/login?session_full_logout=&trk=hb_signout', + accountLink: function (account) { + return 'http://linkedin.com/' + account.username; + }, + overlays: { + 'widgets/AccountPanel': 'widgets/AccountPanelLinkedIn' + } + }) + }, + domainList: [], + + //Patch to allow old share UI to work + //Remove when it goes away. + svcBaseProto: SvcBase.prototype + }; + + // Build up an list of services + for (prop in svcs.domains) { + if (svcs.domains.hasOwnProperty(prop)) { + svcs.domainList.push(prop); + + // Clear out the old contacts model. + // TODO: Remove this once the 3.6 add-on/UI is finally + // shut off. + if (newHotness) { + delete store[svcs.domains[prop].type + 'Contacts']; + delete store.contactsModelVersion; + } + } + } + + return svcs; +}); diff --git a/web/0.3.4/scripts/shareOptions.js b/web/0.3.4/scripts/shareOptions.js new file mode 100644 index 0000000..1728198 --- /dev/null +++ b/web/0.3.4/scripts/shareOptions.js @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false, location: false */ +"use strict"; + +define(['storage', 'blade/url'], function (storage, url) { + var cache = {}; + + function shareOptions(str) { + str = str || + (typeof location !== 'undefined' && location.href.split('#')[1]) || + ''; + + //If a cached value is available, return that, since the cached + //options value may have properties added/adjusted by the other modules. + if (cache[str]) { + return cache[str]; + } + + var options = {}, + store = storage(), + vimeoCdnRegExp = /vimeocdn\.com\//, + vimeoSourceRegExp = /clip_id=(\d+)/, + urlArgs, prop, source, videoId; + + if (str) { + urlArgs = url.queryToObject(str); + if (urlArgs.options) { + options = JSON.parse(urlArgs.options); + } + } + + options.prefs = options.prefs || {}; + + if (!options.title) { + options.title = options.url; + } + + if (!options.prefs.system) { + options.prefs.system = 'prod'; + } + + source = options.source; + + //If the source is larger than ~4KB then it will exceed the GET size + //limits in most browsers, so discard it. + if (source && source.length > 4000) { + source = ''; + delete options.source; + } + + //START domain-specific hacks + // vimeo.com does not give a usable video embed, fix it up here. + if (source && vimeoCdnRegExp.test(source)) { + videoId = vimeoSourceRegExp.exec(source); + videoId = videoId && videoId[1]; + if (videoId) { + options.source = 'http://vimeo.com/moogaloop.swf?clip_id=' + videoId + '&server=vimeo.com&show_title=1&show_byline=1&show_portrait=1&color=00dcdc&fullscreen=1&autoplay=0&loop=0'; + } else { + delete options.source; + } + } + //END domain-specific hacks. + + //Save the extension version in the localStorage, for use in + //other pages like settings. + if (options.version) { + store.extensionVersion = options.version; + } + + //Save the preferences in localStorage, for use in + //other ppages like setting. + if (options.prefs) { + for (prop in options.prefs) { + if (options.prefs.hasOwnProperty(prop)) { + store['prefs.' + prop] = options.prefs[prop]; + } + } + } + + cache[str] = options; + + return options; + } + + return shareOptions; +}); diff --git a/web/0.3.4/scripts/storage.js b/web/0.3.4/scripts/storage.js new file mode 100644 index 0000000..1f801ac --- /dev/null +++ b/web/0.3.4/scripts/storage.js @@ -0,0 +1,52 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false, localStorage: false */ +"use strict"; + +define([], function () { + var store = localStorage, type = 'localStorage'; + + //Capability detect for localStorage. At least one add-on does weird things + //with it. + try { + store.tempVar = 'temp'; + //Test reading. + if (store.tempVar === 'temp') {} + //Test deletion. + delete store.tempVar; + } catch (e) { + //Just use a simple in-memory object. Not as nice, but code will still work. + store = {}; + type = 'memory'; + } + + function storage() { + return store; + } + + storage.type = type; + + return storage; +}); \ No newline at end of file diff --git a/web/0.3.4/scripts/templates/cardsHeader.html b/web/0.3.4/scripts/templates/cardsHeader.html new file mode 100644 index 0000000..54edc32 --- /dev/null +++ b/web/0.3.4/scripts/templates/cardsHeader.html @@ -0,0 +1,8 @@ + diff --git a/web/0.3.4/scripts/webtrends.js b/web/0.3.4/scripts/webtrends.js new file mode 100644 index 0000000..3e15ea7 --- /dev/null +++ b/web/0.3.4/scripts/webtrends.js @@ -0,0 +1,741 @@ +// WebTrends SmartSource Data Collector Tag +// Version: 9.3.0 +// Tag Builder Version: 3.1 +// Created: 3/15/2011 5:10:56 PM + +function WebTrends(){ + var that=this; + // begin: user modifiable + this.dcsid="dcsjd66bq10000k73ngwoin8k_7d1l"; + this.domain="statse.webtrendslive.com"; + this.timezone=0; + this.fpcdom=".mozillamessaging.com"; + this.onsitedoms=""; + this.downloadtypes="xls,doc,pdf,txt,csv,zip"; + this.navigationtag="div,table"; + this.trackevents=true; + this.trimoffsiteparams=true; + this.enabled=true; + this.i18n=false; + this.fpc="WT_FPC"; + this.paidsearchparams="gclid"; + this.splitvalue=""; + this.preserve=true; + // end: user modifiable + this.DCS={}; + this.WT={}; + this.DCSext={}; + this.images=[]; + this.index=0; + this.exre=(function(){return(window.RegExp?new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)","i"):"");})(); + this.re=(function(){return(window.RegExp?(that.i18n?{"%25":/\%/g,"%26":/\&/g}:{"%09":/\t/g,"%20":/ /g,"%23":/\#/g,"%26":/\&/g,"%2B":/\+/g,"%3F":/\?/g,"%5C":/\\/g,"%22":/\"/g,"%7F":/\x7F/g,"%A0":/\xA0/g}):"");})(); +} +WebTrends.prototype.dcsGetId=function(){ + if (this.enabled&&(document.cookie.indexOf(this.fpc+"=")==-1)&&(document.cookie.indexOf("WTLOPTOUT=")==-1)){ + document.write("<\/scr"+"ipt>"); + } +} +WebTrends.prototype.dcsGetCookie=function(name){ + var cookies=document.cookie.split("; "); + var cmatch=[]; + var idx=0; + var i=0; + var namelen=name.length; + var clen=cookies.length; + for (i=0;i0){ + idx=0; + if ((cmatchCount>1)&&(name==this.fpc)){ + var dLatest=new Date(0); + for (i=0;idLatest){ + dLatest.setTime(dLst.getTime()); + idx=i; + } + } + } + return unescape(cmatch[idx].substring(namelen+1)); + } + else{ + return null; + } +} +WebTrends.prototype.dcsGetCrumb=function(cval,crumb,sep){ + var aCookie=cval.split(sep||":"); + for (var i=0;i(dLst.getTime()+1800000))||(dCur.getTime()>(dSes.getTime()+28800000))){ + WT.vt_f_tlv=Math.floor((dSes.getTime()-adj)/1000); + dSes.setTime(dCur.getTime()); + WT.vt_f_s="1"; + } + if ((dCur.getDay()!=dLst.getDay())||(dCur.getMonth()!=dLst.getMonth())||(dCur.getYear()!=dLst.getYear())){ + WT.vt_f_d="1"; + } + } + WT.co_f=escape(WT.co_f); + WT.vtid=(typeof(this.vtid)=="undefined")?WT.co_f:(this.vtid||""); + WT.vtvs=(dSes.getTime()-adj).toString(); + var expiry="; expires="+dExp.toGMTString(); + var cur=dCur.getTime().toString(); + var ses=dSes.getTime().toString(); + document.cookie=name+"="+"id="+WT.co_f+":lv="+cur+":ss="+ses+expiry+"; path=/"+(((this.fpcdom!=""))?("; domain="+this.fpcdom):("")); + var rc=this.dcsIsFpcSet(name,WT.co_f,cur,ses); + if (rc!=0){ + WT.co_f=WT.vtvs=WT.vt_f_s=WT.vt_f_d=WT.vt_f_tlh=WT.vt_f_tlv=""; + if (typeof(this.vtid)=="undefined"){ + WT.vtid=""; + } + WT.vt_f=WT.vt_f_a=rc; + } +} +WebTrends.prototype.dcsIsOnsite=function(host){ + if (host.length>0){ + host=host.toLowerCase(); + if (host==window.location.hostname.toLowerCase()){ + return true; + } + if (typeof(this.onsitedoms.test)=="function"){ + return this.onsitedoms.test(host); + } + else if (this.onsitedoms.length>0){ + var doms=this.dcsSplit(this.onsitedoms); + var len=doms.length; + for (var i=0;i0)&&(pr.indexOf("http")==0)&&!this.dcsIsOnsite(hn)){ + var qry=e.search?e.search.substring(e.search.indexOf("?")+1,e.search.length):""; + var pth=e.pathname?((e.pathname.indexOf("/")!=0)?"/"+e.pathname:e.pathname):"/"; + this.dcsMultiTrack("DCS.dcssip", hn, "DCS.dcsuri", pth, "DCS.dcsqry", this.trimoffsiteparams ? "" : qry, "DCS.dcsref", window.location, "WT.ti", "Offsite:" + hn + pth + (qry.length ? ("?" + qry) : ""), "WT.dl", "24", "WT.nv", this.dcsNavigation(evt)); + } + } + } +} + +WebTrends.prototype.dcsAdv=function(){ + if (this.trackevents&&(typeof(this.dcsET)=="function")){ + if (window.addEventListener){ + window.addEventListener("load",this.dcsET.wtbind(this),false); + } + else if (window.attachEvent){ + window.attachEvent("onload",this.dcsET.wtbind(this)); + } + } + this.dcsFPC(); +} +WebTrends.prototype.dcsVar=function(){ + var dCurrent=new Date(); + var WT=this.WT; + var DCS=this.DCS; + WT.tz=parseInt(dCurrent.getTimezoneOffset()/60*-1)||"0"; + WT.bh=dCurrent.getHours()||"0"; + WT.ul=navigator.appName=="Netscape"?navigator.language:navigator.userLanguage; + if (typeof(screen)=="object"){ + WT.cd=navigator.appName=="Netscape"?screen.pixelDepth:screen.colorDepth; + WT.sr=screen.width+"x"+screen.height; + } + if (typeof(navigator.javaEnabled())=="boolean"){ + WT.jo=navigator.javaEnabled()?"Yes":"No"; + } + if (document.title){ + if (window.RegExp){ + var tire=new RegExp("^"+window.location.protocol+"//"+window.location.hostname+"\\s-\\s"); + WT.ti=document.title.replace(tire,""); + } + else{ + WT.ti=document.title; + } + } + WT.js="Yes"; + WT.jv=(function(){ + var agt=navigator.userAgent.toLowerCase(); + var major=parseInt(navigator.appVersion); + var mac=(agt.indexOf("mac")!=-1); + var ff=(agt.indexOf("firefox")!=-1); + var ff0=(agt.indexOf("firefox/0.")!=-1); + var ff10=(agt.indexOf("firefox/1.0")!=-1); + var ff15=(agt.indexOf("firefox/1.5")!=-1); + var ff20=(agt.indexOf("firefox/2.0")!=-1); + var ff3up=(ff&&!ff0&&!ff10&!ff15&!ff20); + var nn=(!ff&&(agt.indexOf("mozilla")!=-1)&&(agt.indexOf("compatible")==-1)); + var nn4=(nn&&(major==4)); + var nn6up=(nn&&(major>=5)); + var ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1)); + var ie4=(ie&&(major==4)&&(agt.indexOf("msie 4")!=-1)); + var ie5up=(ie&&!ie4); + var op=(agt.indexOf("opera")!=-1); + var op5=(agt.indexOf("opera 5")!=-1||agt.indexOf("opera/5")!=-1); + var op6=(agt.indexOf("opera 6")!=-1||agt.indexOf("opera/6")!=-1); + var op7up=(op&&!op5&&!op6); + var jv="1.1"; + if (ff3up){ + jv="1.8"; + } + else if (ff20){ + jv="1.7"; + } + else if (ff15){ + jv="1.6"; + } + else if (ff0||ff10||nn6up||op7up){ + jv="1.5"; + } + else if ((mac&&ie5up)||op6){ + jv="1.4"; + } + else if (ie5up||nn4||op5){ + jv="1.3"; + } + else if (ie4){ + jv="1.2"; + } + return jv; + })(); + WT.ct="unknown"; + if (document.body&&document.body.addBehavior){ + try{ + document.body.addBehavior("#default#clientCaps"); + WT.ct=document.body.connectionType||"unknown"; + document.body.addBehavior("#default#homePage"); + WT.hp=document.body.isHomePage(location.href)?"1":"0"; + } + catch(e){ + } + } + if (document.all){ + WT.bs=document.body?document.body.offsetWidth+"x"+document.body.offsetHeight:"unknown"; + } + else{ + WT.bs=window.innerWidth+"x"+window.innerHeight; + } + WT.fv=(function(){ + var i,flash; + if (window.ActiveXObject){ + for(i=15;i>0;i--){ + try{ + flash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i); + return i+".0"; + } + catch(e){ + } + } + } + else if (navigator.plugins&&navigator.plugins.length){ + for (i=0;i0;i--){ + M=i; + if (Silverlight.isInstalled(M+".0")){ + break; + } + if (slv==M){ + break; + } + } + for (m=9;m>=0;m--){ + F=M+"."+m; + if (Silverlight.isInstalled(F)){ + slv=F; + break; + } + if (slv==F){ + break; + } + } + } + } + return slv; + })(); + if (this.i18n){ + if (typeof(document.defaultCharset)=="string"){ + WT.le=document.defaultCharset; + } + else if (typeof(document.characterSet)=="string"){ + WT.le=document.characterSet; + } + else{ + WT.le="unknown"; + } + } + WT.tv="9.3.0"; + WT.sp=this.splitvalue; + WT.dl="0"; + WT.ssl=(window.location.protocol.indexOf('https:')==0)?"1":"0"; + DCS.dcsdat=dCurrent.getTime(); + DCS.dcssip=window.location.hostname; + DCS.dcsuri=window.location.pathname; + WT.es=DCS.dcssip+DCS.dcsuri; + if (window.location.search){ + DCS.dcsqry=window.location.search; + } + if (DCS.dcsqry){ + var dcsqry=DCS.dcsqry.toLowerCase(); + var params=this.paidsearchparams.length?this.paidsearchparams.toLowerCase().split(","):[]; + for (var i=0;i'); + } +} +WebTrends.prototype.dcsMeta=function(){ + var elems; + if (document.documentElement){ + elems=document.getElementsByTagName("meta"); + } + else if (document.all){ + elems=document.all.tags("meta"); + } + if (typeof(elems)!="undefined"){ + var length=elems.length; + for (var i=0;i0){ + if (name.toUpperCase().indexOf("WT.")==0){ + this.WT[name.substring(3)]=content; + } + else if (name.toUpperCase().indexOf("DCSEXT.")==0){ + this.DCSext[name.substring(7)]=content; + } + else if (name.toUpperCase().indexOf("DCS.")==0){ + this.DCS[name.substring(4)]=content; + } + } + } + } +} +WebTrends.prototype.dcsTag=function(){ + if (document.cookie.indexOf("WTLOPTOUT=")!=-1){ + return; + } + var WT=this.WT; + var DCS=this.DCS; + var DCSext=this.DCSext; + var i18n=this.i18n; + var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+this.domain+(this.dcsid==""?'':'/'+this.dcsid)+"/dcs.gif?"; + if (i18n){ + WT.dep=""; + } + for (var N in DCS){ + if (DCS[N]&&(typeof DCS[N]!="function")){ + P+=this.dcsA(N,DCS[N]); + } + } + for (N in WT){ + if (WT[N]&&(typeof WT[N]!="function")){ + P+=this.dcsA("WT."+N,WT[N]); + } + } + for (N in DCSext){ + if (DCSext[N]&&(typeof DCSext[N]!="function")){ + if (i18n){ + WT.dep=(WT.dep.length==0)?N:(WT.dep+";"+N); + } + P+=this.dcsA(N,DCSext[N]); + } + } + if (i18n&&(WT.dep.length>0)){ + P+=this.dcsA("WT.dep",WT.dep); + } + if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){ + P=P.substring(0,2040)+"&WT.tu=1"; + } + this.dcsCreateImage(P); + this.WT.ad=""; +} +WebTrends.prototype.dcsDebug=function(){ + var t=this; + var i=t.images[0].src; + var q=i.indexOf("?"); + var r=i.substring(0,q).split("/"); + var m="Protocol
      "+r[0]+"
      "; + m+="Domain
      "+r[2]+"
      "; + m+="Path
      /"+r[3]+"/"+r[4]+"
      "; + m+="Query Params"+i.substring(q+1).replace(/\&/g,"
      ")+"
      "; + m+="
      Cookies
      "+document.cookie.replace(/\;/g,"
      ")+"
      "; + if (t.w&&!t.w.closed){ + t.w.close(); + } + t.w=window.open("","dcsDebug","width=500,height=650,scrollbars=yes,resizable=yes"); + t.w.document.write(m); + t.w.focus(); +} +WebTrends.prototype.dcsCollect=function(){ + if (this.enabled){ + this.dcsVar(); + this.dcsMeta(); + this.dcsAdv(); + if (typeof(this.dcsCustom)=="function"){ + this.dcsCustom(); + } + this.dcsTag(); + } +} + +function dcsMultiTrack(){ + if (typeof(_tag)!="undefined"){ + return(_tag.dcsMultiTrack()); + } +} + +function dcsDebug(){ + if (typeof(_tag)!="undefined"){ + return(_tag.dcsDebug()); + } +} + +Function.prototype.wtbind = function(obj){ + var method=this; + var temp=function(){ + return method.apply(obj,arguments); + }; + return temp; +} \ No newline at end of file diff --git a/web/0.3.4/service/down.html b/web/0.3.4/service/down.html new file mode 100644 index 0000000..a7c35f6 --- /dev/null +++ b/web/0.3.4/service/down.html @@ -0,0 +1,112 @@ + + + + + + + F1 Down + + + + +
      + +
      + The F1 service is unavailable at the moment. +
      +
      + + + + diff --git a/web/0.3.4/service/favicon.png b/web/0.3.4/service/favicon.png new file mode 100644 index 0000000..216b13a Binary files /dev/null and b/web/0.3.4/service/favicon.png differ diff --git a/web/0.3.4/service/i/f1Logo.png b/web/0.3.4/service/i/f1Logo.png new file mode 100644 index 0000000..0cb3265 Binary files /dev/null and b/web/0.3.4/service/i/f1Logo.png differ diff --git a/web/0.3.4/service/privacy.html b/web/0.3.4/service/privacy.html new file mode 100644 index 0000000..426dc53 --- /dev/null +++ b/web/0.3.4/service/privacy.html @@ -0,0 +1,94 @@ + + + + Privacy Policy + + + + +
      + +

      Mozilla F1 Privacy policy data collection, analysis, and retention

      + +F1 is an experiment by Mozilla to understand how people like to share links they find on the web. It consists of an add-on for Firefox and a web service, with which Firefox users can easily send links and commentary about those links to their contacts on a variety of service providers. In this beta phase, three services are provided: Twitter, Facebook, and Gmail. + +F1 uses OAuth to ask the user for permission to access their profile data on these services, and to send messages on their behalf each time they choose to share a link. + +

      Data collection

      + +

      Authentication Data

      + +

      To use F1, the user authenticates F1 to their service provider (gmail, twitter, facebook, etc.). Doing so results in the service provider sending F1:

      + +
        +
      • the user's username on the service
      • +
      • the user's userid
      • +
      • the user's profile information, including their name and profile image. The kind of data included in the profile will differ from service to service, but typically does include personally identifiable information by design, including name, email addresses and userids.
      • +
      • OAuth "tokens" which F1 can then use to do later authorized transactions on the user's behalf (tweeting, posting on a wall, emailing).
      • +
      + +

      In order to function, F1 needs to store all of the above information to be able to send on the user's behalf without asking for a reauthorization each time.

      + +

      Sharing Data

      + +

      When a user sends a link, information about the action is stored, including: who sent it, to whom was it sent, using what service, when, and including the message and the link.

      + +

      Mozilla collects this information to understand the usage of the service, and to improve it. Mozilla will not look at individual records, but instead run aggregate queries on data sets to understand the usage of the service on a population basis. Example aggregate analyses include: general number of shares/day, number of users/day, which service is more popular when, what is the distribution of number of sharing events per day per user.

      + +

      Publication of the data

      + +

      Mozilla will not publish any individual records from this service. We will publish summary graphs showing aggregate service usage.

      + +

      Data retention

      + +

      Sharing data records will be discarded after 30 days. Authentication data is retained forever, but users can revoke the authentication of F1 by their service provider using links provided by the F1 user interface.

      + +

      URL Shortening via bit.ly

      + +

      When sharing via twitter, F1 shortens the URLs so that users have more room for their own words in the tweets. F1 currently uses the bit.ly service to do that shortening and redirection. See http://bit.ly/pages/terms-of-service for the terms of service of bit.ly and http://bit.ly/pages/privacy for their privacy policy

      + +
      + + + diff --git a/web/0.3.4/service/style.css b/web/0.3.4/service/style.css new file mode 100644 index 0000000..72c4357 --- /dev/null +++ b/web/0.3.4/service/style.css @@ -0,0 +1,26 @@ +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; +} + +#container { + position: absolute; + width: 300px; + top: 50%; + left: 50%; + margin-top: -45px; + margin-left: -150px; +} + +#container .logo { + width: 62px; + height: 56px; + margin: 10px auto; + display: block; + background-image: url("i/f1logo.png"); +} + +#container .errorMsg { + text-align: center; + color: #00A0FF; +} \ No newline at end of file diff --git a/web/0.3.4/settings/build.js b/web/0.3.4/settings/build.js new file mode 100644 index 0000000..7bf04e9 --- /dev/null +++ b/web/0.3.4/settings/build.js @@ -0,0 +1,10 @@ +({ + baseUrl: "../scripts/", + paths: { + "index": "../settings/index", + "jquery": "requireplugins-jquery" + }, + name: "index", + exclude: ['jquery'], + out: './index.js' +}) diff --git a/web/0.3.4/settings/i/LinkedIn_Logo16px.png b/web/0.3.4/settings/i/LinkedIn_Logo16px.png new file mode 100644 index 0000000..c717e80 Binary files /dev/null and b/web/0.3.4/settings/i/LinkedIn_Logo16px.png differ diff --git a/web/0.3.4/settings/i/f1Logo.png b/web/0.3.4/settings/i/f1Logo.png new file mode 100644 index 0000000..73cf10d Binary files /dev/null and b/web/0.3.4/settings/i/f1Logo.png differ diff --git a/web/0.3.4/settings/i/sprite.png b/web/0.3.4/settings/i/sprite.png new file mode 100644 index 0000000..6a13758 Binary files /dev/null and b/web/0.3.4/settings/i/sprite.png differ diff --git a/web/0.3.4/settings/i/thumb.jpg b/web/0.3.4/settings/i/thumb.jpg new file mode 100644 index 0000000..721d427 Binary files /dev/null and b/web/0.3.4/settings/i/thumb.jpg differ diff --git a/web/0.3.4/settings/index.html b/web/0.3.4/settings/index.html new file mode 100644 index 0000000..a23b42d --- /dev/null +++ b/web/0.3.4/settings/index.html @@ -0,0 +1,173 @@ + + + + Mozilla F1: Configuration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Feedback + +
      + + + + + + + + +
        +
      • accounts
      • + + +
      + +
      + +
      +

      My accounts

      + + +

      Add accounts

      + +
      + + + + +
      + +
      +
      + +
      + + + +
      +
      + +
      + We care about your privacy, seriously. +
      +
      +
      + +
      + + + + + + + + + diff --git a/web/0.3.4/settings/index.js b/web/0.3.4/settings/index.js new file mode 100644 index 0000000..2041856 --- /dev/null +++ b/web/0.3.4/settings/index.js @@ -0,0 +1,99 @@ +/* + blade/func Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/object Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/jig Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/array Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/url Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details +*/ +define("blade/fn",[],function(){var f=Array.prototype.slice,b=Object.prototype.toString;return{is:function(d){return b.call(d)==="[object Function]"},bind:function(d,c){if(!c)return d;if(typeof c==="string")c=d[c];var a=f.call(arguments,2);return function(){return c.apply(d,a.concat(f.call(arguments,0)))}}}}); +define("blade/object",["./fn"],function(f){function b(){}var d={},c=function(a,e,h){a=a||{};var j,p=c.create(a.prototype,e);a=function(q,m,n){return p[m].apply(q,n)};e=c.create(p);c.mixin(e,f.is(h)?h(a):h,true);j=function(){if(!(this instanceof j))throw new Error('blade/object: constructor function called without "new" in front');this.init&&this.init.apply(this,arguments)};j.prototype=e;return j};c.create=function(a,e){b.prototype=a;a=new b;var h,j;b.prototype=null;if(e)for(h=0;j=e[h];h++)c.mixin(a, +j);return a};c.mixin=function(a,e,h){for(var j in e)if(!(j in d)&&(!(j in a)||h))a[j]=e[j]};return c}); +define("blade/jig",["require","./object"],function(f,b){function d(g){return v.call(g)==="[object Array]"}function c(g,i,l){i=i;var k,o;for(k=0;i&&(o=g[k]);k++)i=typeof i==="object"&&o in i?i[o]:l&&k===0&&o in l?l[o]:undefined;return i}function a(g){return g?parseInt(g,10):0}function e(g,i,l){var k=/\[([\w0-9\.'":]+)\]/,o=g,r=i,t=true,x,A;if(g===w)return i;if(E.test(g))return a(g);if(g==="")return"";x=g.charAt(0);if(x==="'"||x==="'")return g.substring(1,g.length-1);if((x=g.indexOf("("))!==-1){k=g.lastIndexOf(")"); +t=g.substring(0,x);o=l.fn[t];if(!o){n.error("Cannot find function named: "+t+" for "+g);return""}t=g.substring(x+1,k);if(t.indexOf(",")!==-1){t=t.split(",");for(r=t.length-1;r>=0;r--)t[r]=e(t[r],i,l);o=o.apply(null,t)}else o=o(e(t,i,l));if(k";else{t=o.charAt(0);A=o}}if(t&&!i.propertyRegExp.test(t))A=A.substring(1).trim();else t="_default_";if(o=A.indexOf(i.rawHtmlToken)===0)A=A.substring(i.rawHtmlToken.length,A.length);if(t===y)o=true;A=A.split(i.argSeparator);L=A[A.length-1];N=L.charAt(L.length-1);J=null;if(t==="]"){if(N!=="["){l.templateEnd=k;l.endControl=true}else l.templateEnd=k-x[0].length;return l}else if(N==="["){r||(r=H++);A[A.length-1]=L.substring(0,L.length- +1);J=j(g.substring(k),i);k+=J.templateEnd}if(t==="+")i.templates[A[0]]=J;else if(t!=="/"){if(A.length>1)for(x=A.length-1;x>=0;x--)if(A[x].charAt(A[x].length-1)===","){A[x]+=A[x+1];A.splice(x+1,1)}l.push({action:i.commands[t].action,useRawHtml:o,args:A,controlId:r,children:J})}if(J&&J.endControl)r=0}else{l.push(k);return l}}k!==g.length-1&&l.push(g.substring(k,g.length));return l}function p(g,i){var l,k=g.id;l=i.templates||G;if(l[k])return l[k];i.onBeforeParse&&i.onBeforeParse(g);if(g.nodeName.toUpperCase()=== +"SCRIPT"){l=g.text.trim();g.parentNode&&g.parentNode.removeChild(g)}else{K.appendChild(g);g.removeAttribute("id");(l=(g.getAttribute("class")||"").trim())&&g.setAttribute("class",l.replace(M,"$1$3"));l=K.innerHTML.replace(/%7B/g,"{").replace(/%7D/g,"}");K.removeChild(g)}g=n.compile(l,i);n.cache(k,g,i);return g}function q(g,i,l){var k="",o,r,t,x,A;if(typeof g==="string")k=g;else if(d(g))for(o=0;oi},gte:function(g,i){return g>=i},lt:function(g,i){return go.prop?1:-1})}},F=1,H=1,I={},K=typeof document!=="undefined"&&document.createElement?document.createElement("div"):null,M=/(\s*)(template)(\s*)/;u={_default_:{doc:"Property reference",action:function(g,i,l,k,o){var r=g[0]?e(g[0],i,l):i,t=g[1]?e(g[1],i,l):undefined,x="";if(g[1]){t=r===t;r=i}else t=r;if(t===false||t===null||t===undefined||d(t)&&!t.length)return"";else if(k)if(d(r))for(g=0;g1?g[1]:w,i,l);return o(k,i,l)}},".":{doc:"Variable declaration",action:function(g,i,l){l.context[g[0]]=e(g[1],i,l);return""}},">":{doc:"Else",action:function(g,i,l,k,o){if(k)return o(k,i,l);return""}}};n=function(g,i,l){if(typeof g==="string")if(g.charAt(0)=== +"#"){g=g.substring(1,g.length);g=h(g,l)}else g=n.compile(g,l);return n.render(g,i,l)};n.htmlEscape=function(g){return g.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};n.compile=function(g,i){i=i||{};b.mixin(i,{startToken:"{",endToken:"}",rawHtmlToken:"^",propertyRegExp:s,commands:u,argSeparator:" ",templates:G});i.endRegExp=/[^\r\n]*?}/;H=1;return j(g,i)};n.parse=function(g,i){if(g&&!g.length){i=g;g=null}i=i||{};g=g||document.querySelectorAll('.template, script[type="text/template"]'); +var l,k;for(k=g.length-1;k>-1&&(l=g[k]);k--)p(l,i)};n.render=function(g,i,l){var k,o="";l=l||{};b.mixin(l,{templates:G,attachData:false,strict:n.strict});if(l.fn)b.mixin(l.fn,D);else l.fn=D;l.context=l.context||b.create(i);if(d(i)){for(k=0;k=365&&c<730){a.additional=b.toLocaleDateString(); +a.friendly="a year ago";return a}if(c>=365){a.additional=b.toLocaleDateString();a.friendly=Math.ceil(c/365)+" years ago";return a}return a},name:function(b){b=b.split(" ")[0];if(b.indexOf("@")!==-1)b=b.split("@")[0];b=b.replace(" ","");b=b.replace("'","");return b=b.replace('"',"")}};return f}); +define("isoDate",[],function(){var f=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+\-](\d{2}):(\d{2}))|Z)?)?$/,b=function(d,c){var a=f.exec(d);d=null;var e,h;if(a){a.shift();a[1]&&a[1]--;if(a[6])a[6]*=1E3;if(c){c=new Date(c);["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"].map(function(j){return c["get"+j]()}).forEach(function(j,p){a[p]=a[p]||j})}d=new Date(a[0]||1970,a[1]||0,a[2]||1,a[3]||0,a[4]||0,a[5]||0,a[6]||0);if(a[0]<100)d.setFullYear(a[0]|| +1970);e=0;h=a[7]&&a[7].charAt(0);if(h!=="Z"){e=(a[8]||0)*60+(Number(a[9])||0);if(h!=="-")e*=-1}if(h)e-=d.getTimezoneOffset();e&&d.setTime(d.getTime()+e*6E4)}return d};b.toIsoString=function(d,c){var a=function(p){return p<10?"0"+p:p},e,h,j;c=c||{};e=[];h=c.zulu?"getUTC":"get";j="";if(c.selector!=="time"){j=d[h+"FullYear"]();j=["0000".substr((j+"").length)+j,a(d[h+"Month"]()+1),a(d[h+"Date"]())].join("-")}e.push(j);if(c.selector!=="date"){j=[a(d[h+"Hours"]()),a(d[h+"Minutes"]()),a(d[h+"Seconds"]())].join(":"); +h=d[h+"Milliseconds"]();if(c.milliseconds)j+="."+(h<100?"0":"")+a(h);if(c.zulu)j+="Z";else if(c.selector!=="time"){d=d.getTimezoneOffset();c=Math.abs(d);j+=(d>0?"-":"+")+a(Math.floor(c/60))+":"+a(c%60)}e.push(j)}return e.join("T")};return b});var EXPORTED_SYMBOLS=["hex_md5"],hexcase=0,b64pad="";function hex_md5(f){return rstr2hex(rstr_md5(str2rstr_utf8(f)))}function b64_md5(f){return rstr2b64(rstr_md5(str2rstr_utf8(f)))}function any_md5(f,b){return rstr2any(rstr_md5(str2rstr_utf8(f)),b)} +function hex_hmac_md5(f,b){return rstr2hex(rstr_hmac_md5(str2rstr_utf8(f),str2rstr_utf8(b)))}function b64_hmac_md5(f,b){return rstr2b64(rstr_hmac_md5(str2rstr_utf8(f),str2rstr_utf8(b)))}function any_hmac_md5(f,b,d){return rstr2any(rstr_hmac_md5(str2rstr_utf8(f),str2rstr_utf8(b)),d)}function md5_vm_test(){return hex_md5("abc").toLowerCase()=="900150983cd24fb0d6963f7d28e17f72"}function rstr_md5(f){return binl2rstr(binl_md5(rstr2binl(f),f.length*8))} +function rstr_hmac_md5(f,b){var d=rstr2binl(f);if(d.length>16)d=binl_md5(d,f.length*8);var c=Array(16);f=Array(16);for(var a=0;a<16;a++){c[a]=d[a]^909522486;f[a]=d[a]^1549556828}b=binl_md5(c.concat(rstr2binl(b)),512+b.length*8);return binl2rstr(binl_md5(f.concat(b),640))}function rstr2hex(f){for(var b=hexcase?"0123456789ABCDEF":"0123456789abcdef",d="",c,a=0;a>>4&15)+b.charAt(c&15)}return d} +function rstr2b64(f){for(var b="",d=f.length,c=0;cf.length*8?b64pad:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>>6*(3-e)&63);return b} +function rstr2any(f,b){var d=b.length,c,a,e,h,j,p=Array(Math.ceil(f.length/2));for(c=0;c0||e>0)j[j.length]=e}f[a]=h;p=j}d="";for(c=f.length-1;c>=0;c--)d+=b.charAt(f[c]);return d} +function str2rstr_utf8(f){for(var b="",d=-1,c,a;++d>>6&31,128|c&63);else if(c<=65535)b+=String.fromCharCode(224|c>>>12&15,128|c>>>6&63,128|c&63);else if(c<=2097151)b+=String.fromCharCode(240|c>>>18&7,128|c>>>12&63,128|c>>>6&63,128|c&63)}return b} +function str2rstr_utf16le(f){for(var b="",d=0;d>>8&255);return b}function str2rstr_utf16be(f){for(var b="",d=0;d>>8&255,f.charCodeAt(d)&255);return b}function rstr2binl(f){for(var b=Array(f.length>>2),d=0;d>5]|=(f.charCodeAt(d/8)&255)<>5]>>>d%32&255);return b} +function binl_md5(f,b){f[b>>5]|=128<>>9<<4)+14]=b;b=1732584193;for(var d=-271733879,c=-1732584194,a=271733878,e=0;e>16)+(b>>16)+(d>>16)<<16|d&65535}function bit_rol(f,b){return f<>>32-b}define("md5",function(){}); +define("rdapi",["require","jquery","blade/object","blade/jig","friendly","isoDate","md5"],function(f,b,d,c,a,e){function h(s){if(typeof s==="string")s={template:s};else if(s.templateId)s.template=c.cache(s.templateId);if(!("attachData"in s))s.attachData=m.attachTemplateData;if(s.emptyTemplateId)s.emptyTemplate=c.cache(s.emptyTemplateId);return s}function j(){var s=u.exec(document.cookie);return s&&s[1]?s[1]:null}function p(s,w){w.url=y.baseUrl+y.apiPath+s;d.mixin(w,{limit:30,message_limit:3,dataType:"json", +error:function(C,G,D){throw D;}});var B=w.success,E=j();w.success=function(C){C&&C.contacts&&d.mixin(v,C.contacts,true);return B?B.apply(null,arguments):C};if(E)w.beforeSend=function(C){C.setRequestHeader(n,E)};b.ajax(w)}function q(s,w){var B=w.forId?document.getElementById(w.forId):null;if(B)B.innerHTML=s;w.onTemplateDone&&w.onTemplateDone(s);b(document).trigger("rdapi-done",B)}var m,n="X-CSRF",u=/csrf=([^\; ]+)/,v={},z={contact:function(s){return s.iid&&s.domain?v[s.iid]||{}:s},contactPhotoUrl:function(s){var w= +"i/face2.png",B,E;s=z.contact(s);if((B=s.photos)&&B.length){w=B[0].value;B.forEach(function(C){if(C.primary)w=C.value})}else if(s.emails&&s.emails.length){E=s.emails[0].value;s.emails.forEach(function(C){if(C.primary)E=C.value});w="http://www.gravatar.com/avatar/"+hex_md5(E)+"?s=24 &d=identicon"}return w},allMessages:function(s){return[s.topic].concat(s.messages||[])},friendlyDate:function(s){return a.date(e(s)).friendly},htmlBody:function(s){return c.htmlEscape(s).replace(/\n/g,"
      ")}},y={baseUrl:"/", +apiPath:"api/",saveTemplateData:true};c.addFn(z);m=function(s,w){w=h(w);d.mixin(w,{success:function(B){var E=w.template,C=w.emptyTemplate,G="";if(w.forId&&E){if(w.prop)B=c.getObject(w.prop,B,w);if(f.isArray(B))if(B.length)B.forEach(function(D){G+=c(E,D,w)});else G+=c(C,B,w);else G+=c(!B?C:E,B,w);q(G,w)}},error:function(B,E,C){if(w.emptyTemplate){B=c(w.emptyTemplate,C,w);q(B,w)}else throw C;}});p(s,w)};m.contactPhotoUrl=z.contactPhotoUrl;m.attachTemplateData=false;f.ready(function(){var s=[];c.parse({onBeforeParse:function(w){var B= +w.id,E=w.getAttribute("data-rdapi"),C=w.getAttribute("data-rdfor"),G=w.getAttribute("data-rdprop");E&&s.push({templateId:B,api:E,forId:C,prop:G});["data-rdapi","data-rdprop","data-rdfor"].forEach(function(D){w.removeAttribute(D)})}});s.forEach(function(w){m(w.api,w)})});return m});define("storage",[],function(){function f(){return b}var b=localStorage,d="localStorage";try{b.tempVar="temp";delete b.tempVar}catch(c){b={};d="memory"}f.type=d;return f}); +define("dispatch",["jquery"],function(){var f=location.protocol+"//"+location.host;return{sub:function(b,d,c,a){c=c||window;a=a||f;var e=function(h){if(h.origin===a||h.origin==="chrome://browser")try{var j=JSON.parse(h.data),p=j.topic;p&&p===b&&d(j.data)}catch(q){}};c.addEventListener("message",e,false);return e},unsub:function(b,d){d=d||window;d.removeEventListener("message",b,false)},pub:function(b,d,c){c=c||window;c.postMessage(JSON.stringify({topic:b,data:d}),f)}}}); +define("services",["blade/object","storage"],function(f,b){function d(j,p){if(j){this.name=j;this.type=j.replace(/\s/g,"").toLowerCase();this.tabName=this.type+"Tab";this.icon="i/"+this.type+"Icon.png";this.features={counter:false,direct:false,subject:false};f.mixin(this,p,true)}}function c(){d.constructor.apply(this,arguments);this.features.direct=true;this.features.subject=true}var a=parseFloat(navigator.userAgent.split("Firefox/")[1])>=4;b=b();var e,h;d.constructor=d;d.prototype={clearCache:function(j){delete j[this.type+ +"Contacts"]},getContacts:function(j){if(j[this.type+"Contacts"])return JSON.parse(j[this.type+"Contacts"]);return null},setContacts:function(j,p){j[this.type+"Contacts"]=JSON.stringify(p)},get36FormattedContacts:function(){return null}};c.prototype=new d;c.constructor=c;c.prototype.validate=function(j){if(!j.to||!j.to.trim())return false;return true};c.prototype.get36FormattedContacts=function(j){var p=[];j.forEach(function(q){q.emails&&q.emails.length&&q.emails.forEach(function(m){p.push({displayName:q.displayName? +q.displayName:m.value,email:m.value})})});return p};c.prototype.overlays={Contacts:"ContactsEmail"};e={domains:{"twitter.com":new d("Twitter",{features:{direct:true,subject:false,counter:true},shareTypes:[{type:"public",name:"public"},{type:"direct",name:"direct message",showTo:true,toLabel:"type in name of recipient"}],textLimit:140,shorten:true,serviceUrl:"http://twitter.com",revokeUrl:"http://twitter.com/settings/connections",signOutUrl:"http://twitter.com/logout",accountLink:function(j){return"http://twitter.com/"+ +j.username},forceLogin:{name:"force_login",value:true},overlays:{Contacts:"ContactsTwitter"}}),"facebook.com":new d("Facebook",{features:{direct:true,subject:false,counter:true,medium:true},shareTypes:[{type:"wall",name:"my wall"},{type:"groupWall",name:"group wall",showTo:true,toLabel:"type in the name of the group"}],textLimit:420,serviceUrl:"http://facebook.com",revokeUrl:"http://www.facebook.com/editapps.php?v=allowed",signOutUrl:"http://facebook.com",accountLink:function(j){return"http://www.facebook.com/profile.php?id="+ +j.userid},overlays:{"widgets/AccountPanel":"widgets/AccountPanelFaceBook"}}),"google.com":new c("Gmail",{shareTypes:[{type:"direct",name:"direct",showTo:true}],serviceUrl:"https://mail.google.com",revokeUrl:"https://www.google.com/accounts/IssuedAuthSubTokens",signOutUrl:"http://google.com/preferences",accountLink:function(j){return"http://google.com/profiles/"+j.username},forceLogin:{name:"pape_max_auth_age",value:0}}),"googleapps.com":new c("Google Apps",{shareTypes:[{type:"direct",name:"direct", +showTo:true}],icon:"i/gmailIcon.png",serviceUrl:"https://mail.google.com",revokeUrl:"https://www.google.com/accounts/IssuedAuthSubTokens",signOutUrl:"http://google.com/preferences",accountLink:function(j){return"http://google.com/profiles/"+j.username},forceLogin:{name:"pape_max_auth_age",value:0}}),"yahoo.com":new c("Yahoo",{shareTypes:[{type:"direct",name:"direct",showTo:true}],name:"Yahoo!",serviceUrl:"http://mail.yahoo.com",revokeUrl:"https://api.login.yahoo.com/WSLogin/V1/unlink",signOutUrl:"https://login.yahoo.com/config/login?logout=1", +accountLink:function(j){return"http://profiles.yahoo.com/"+j.username}}),"linkedin.com":new d("LinkedIn",{isNew:true,features:{direct:true,subject:true,counter:false},shareTypes:[{type:"public",name:"anyone"},{type:"myConnections",name:"connections only",specialTo:"connections-only"},{type:"contact",name:"send message",showTo:true,toLabel:"type in the name of the contact"}],serviceUrl:"http://linkedin.com",revokeUrl:"http://linkedin.com/settings/connections",signOutUrl:"https://www.linkedin.com/secure/login?session_full_logout=&trk=hb_signout", +accountLink:function(j){return"http://linkedin.com/"+j.username},overlays:{"widgets/AccountPanel":"widgets/AccountPanelLinkedIn"}})},domainList:[],svcBaseProto:d.prototype};for(h in e.domains)if(e.domains.hasOwnProperty(h)){e.domainList.push(h);if(a){delete b[e.domains[h].type+"Contacts"];delete b.contactsModelVersion}}return e}); +define("accounts",["storage","dispatch","rdapi","services"],function(f,b,d,c){function a(m,n,u,v){return m.domain===n&&(u&&m.userid===u||v&&m.username===v)}function e(m){if(m)m=JSON.parse(m);return m}function h(m,n){return q.accounts(m,n)}function j(){location.reload()}var p=f(),q;q={localStorage:{accounts:function(m,n){var u=e(p.accountCache)||[],v=e(p.serviceCache);if(v){v=v||[];m&&m(u,v)}else q.fetch(m,n)},update:function(m){var n=e(p.accountCache)||[],u=e(p.serviceCache),v=false,z,y,s;z=m.profile; +for(y=0;yc+4E3){c=j;a=h+"?domain="+a+(e?"&forceLogin=1":"");try{d=window.open(a,"ffshareOAuth", +"dialog=yes, modal=yes, width=900, height=500, scrollbars=yes");d.focus()}catch(p){window.location=a+"&end_point_success="+encodeURI(window.location)}}else d&&d.focus()}});define("dotCompare",[],function(){function f(b,d){b=b||"0";d=d||"0";b=b.split(".");d=d.split(".");var c,a,e,h=b.length>d.length?b.length:d.length;for(c=0;ce)return 1;else if(ae))for(m=0;mn){for(;u-1,B=q(y.extensionVersion,"0.7.4")>-1,E=m.queryToObject(location.href.split("#")[1]|| +"")||{},C={},G=E.show==="new";e.addFn({domainType:function(D){return(D=n.domains[D.accounts[0].domain])?D.type:""},domainName:function(D){return(D=n.domains[D.accounts[0].domain])?D.name:""},accountName:function(D,F){return F.username&&F.username!==D?D+", "+F.username:D}});p.onChange();p(function(D){b(function(){var F="";D.forEach(function(H){F+=e("#accountTemplate",H);C[H.accounts[0].domain]=true});if(F){b("#existingHeader").removeClass("hidden");b("#existing").append(F).removeClass("hidden")}F= +"";n.domainList.forEach(function(H){var I=n.domains[H];if(B||!C[H]){I.domain=H;I.enableSignOut=!I.forceLogin&&C[H];F+=e("#addTemplate",n.domains[H])}});if(F){b("#availableHeader").removeClass("hidden");b("#available").append(F).removeClass("hidden")}G&&b(function(){b("li.newItem").animate({backgroundColor:"#ffff99"},200).delay(1E3).animate({backgroundColor:"#fafafa"},3E3)})})});b(function(){function D(){var k={};g.find(".error").addClass("hidden");b.each(g[0].elements,function(o,r){o=b(r).val().trim(); +if(r.getAttribute("placeholder")===o)o="";r.value=o;if(r.value)k[r.name]=r.value});if(k.login&&k.apiKey)return k;else if(k.login&&!k.apiKey)b("#bitlyApiKeyMissing").removeClass("hidden");else k.apiKey&&!k.login&&b("#bitlyLoginMissing").removeClass("hidden");return null}function F(){g.find('[name="login"]').val("");g.find('[name="apiKey"]').val("");g.find('[name="domain"]').val("")}function H(k){b.each(g[0].elements,function(o,r){(o=k[r.getAttribute("name")])&&b(r).val(o)});u(g[0])}function I(){i[0].checked= +true;g.slideDown("100")}function K(){i[0].checked=false;g.slideUp("100",function(){g.css({display:"none"})})}function M(){F();delete y.shortenPrefs;K()}if(G){delete E.show;location.replace(location.href.split("#")[0]+"#"+m.objectToQuery(E))}var g=b("#shortenForm"),i=b("#bitlyCheckbox"),l;b(window).bind("load resize",function(){var k=b(window).height();b("#wrapper").css({"min-height":k})});if(s){s=JSON.parse(s);H(s);I()}else K();b("body").delegate("#bitlyCheckbox","click",function(){i[0].checked?I(): +M()}).delegate("#shortenForm","submit",function(k){var o=D();o?b.ajax({url:"http://api.bitly.com/v3/validate",type:"GET",data:{format:"json",login:o.login,x_login:o.login,x_apiKey:o.apiKey,apiKey:o.apiKey},dataType:"json",success:function(r){if(r.status_code===200&&r.data.valid)y.shortenPrefs=JSON.stringify(o);else{b("#bitlyNotValid").removeClass("hidden");delete y.shortenPrefs}},error:function(){b("#bitlyNotValid").removeClass("hidden");delete y.shortenPrefs}}):M();k.preventDefault()}).delegate(".close", +"click",function(){window.close()}).delegate(".auth","click",function(k){k=k.target.getAttribute("data-domain");var o=n.domains[k].type;v();a(k,C[k],function(r){if(r)y.lastSelection=o;else z("statusOAuthFailed")})}).delegate(".remove","click",function(k){var o=k.target,r=o.getAttribute("data-domain"),t=o.getAttribute("data-username");o=o.getAttribute("data-userid");try{v();p.remove(r,o,t)}catch(x){p.clear()}k.preventDefault()}).delegate('#settings [type="checkbox"]',"click",function(k){var o=k.target; +k=o.id;o=o.checked;y["prefs."+k]=o;opener&&!opener.closed&&h.pub("prefChanged",{name:k,value:o},opener)});l=(l=y["prefs.use_accel_key"])?JSON.parse(l):false;b("#use_accel_key")[0].checked=l||false;l=(l=y["prefs.bookmarking"])?JSON.parse(l):false;b("#bookmarking")[0].checked=l||false;b(function(){b(".overflow").textOverflow(null,true)});w&&b('li[data-tab="settings"]').removeClass("hidden");B&&b('li[data-tab="advanced"]').removeClass("hidden");b("body").delegate("ul#tabs li","click",function(){var k= +b(this),o=b("#"+k.attr("data-tab"));v();k.addClass("selected");k.siblings().removeClass("selected");if(o.is(":hidden")){o.fadeIn(200);o.siblings().fadeOut(0)}});window.onFeedLoad=function(k,o){var r,t,x;if(o&&o.feed&&o.feed.entries)for(k=0;x=o.feed.entries[k];k++)if(x.categories&&x.categories.indexOf("Sharing")!==-1){t=x.link;r=x.title;break}if(t){b("#newsFooter .headline").removeClass("invisible");b("#rssLink").attr("href",t).text(r)}};l=document.createElement("script");l.charset="utf-8";l.async= +true;l.src="https://www.google.com/uds/Gfeeds?v=1.0&callback=onFeedLoad&context=&output=json&q=http%3A%2F%2Fmozillalabs.com%2Fmessaging%2Ffeed%2F";b("head")[0].appendChild(l)})}); \ No newline at end of file diff --git a/web/0.3.4/settings/style.css b/web/0.3.4/settings/style.css new file mode 100644 index 0000000..ee3d62e --- /dev/null +++ b/web/0.3.4/settings/style.css @@ -0,0 +1,558 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +* { + margin: 0; + padding: 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + list-style-type: none; +} + +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 21px; + color: #0a0a0a; + overflow-y: scroll; +} + +.hidden, +#tabs li.hidden, +.hbox > *.hidden { + display: none; +} + +.invisible { + visibility: hidden; +} + +button::-moz-focus-inner { + border: 0; +} + +button { + height: 24px; + border-width: 1px; + border-style: solid; + border-color: #aaa; + cursor: pointer; + padding: 0 10px; + + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); +} + +button:active { + -moz-box-shadow: 0 0 1px #666666 inset; + -webkit-box-shadow: 0 0 1px #666666 inset; + box-shadow: 0 0 1px #666666 inset; + + background-image: -moz-linear-gradient(center top , #eee 0%, #ccc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc)); +} + +button span.remove, +button span.add { + color: #fff; + font-weight: bold; + width: 14px; + height: 14px; + display: inline-block; + background-image: url("i/sprite.png"); + background-repeat: no-repeat; + vertical-align: text-bottom; + margin: 0 0 0 5px; +} + +button.done { + height: 32px; + font-size: 14px; + padding: 0 20px; + margin-bottom: 40px; +} + +button.config { + width: 100px; + text-align: center; +} + +button span.remove { + background-position: center -305px; +} + +button span.add { + background-position: center -339px; +} + +a { + color: #00a0ff; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.status.error { + text-align: center; +} + +.error { + color: #FF0000; +} +/* From the uservoice feedback button */ +#feedback { + position: fixed; + top: 40%; + left: 0; + width: 25px; + height: 98px; + padding: 0; + margin: -45px 0 0; + text-indent: -1000px; + background-image: url("https://cdn.uservoice.com/images/widgets/en/feedback_tab_white.png"); + background-position: 2px 50%; + background-color: red; + border-color: #FF0000 #FF0000 #FF0000 -moz-use-text-color; + border-style: outset outset outset none; + border-width: 1px 1px 1px medium; + z-index: 500; +} +#feedback:hover { + text-decoration: none; + background-color: #0066CC; + border-color: #0066CC #0066CC #0066CC -moz-use-text-color; +} + +strong { + font-weight: bold; +} + +#wrapper { + width: 720px; + margin: 0 auto; + overflow: hidden; + position: relative; +} + +#shortenForm label.text { + line-height: 24px; +} + +#shortenForm input { + width: 220px; + height: 24px; + border-color: #aaa; + border-style: solid; + border-width: 1px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) inset; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + padding: 2px 5px; +} + +#shortenForm select { + width: 220px; +} + +/* + grid +*/ + +.c1, .c2, .c3 { + display: inline-block; + float: left; + min-height: 1%; + margin: 0 10px; + position: relative; +} + +.c1 { + width: 220px; +} + +.c2 { + width: 460px; +} + +.c3 { + width: 700px; +} + +.row { + float: left; + margin: 10px 0; +} + +.row.about { + margin: 20px 0; +} + +h1 { + font-size: 18px; + font-weight: normal; + color: #00A0FF; +} + +span.micro { + font-size: 12px; + margin: 5px 0 10px 0; + display: block; + color: #666; +} + +a.micro { + margin: 0 10px; +} + +/* + header +*/ + +#header.row { + margin: 36px 0; +} + +#header.row .c3, +#header.row .c2, +#header.row .c1 { + height: 90px; + line-height: 90px; + text-align: right; +} + +#header.row .logo { + background-image: url("i/f1Logo.png"); + background-repeat: no-repeat; + background-position: 0 -9px; +} + +/* + tabs +*/ + +ul#tabs { + display: block; + margin: 10px 10px 0 10px; +} + +ul#tabs li { + display: inline-block; + padding: 7px 20px; + border-width: 1px 1px 0 1px; + border-color: #ccc; + border-style: solid; + float: left; + margin: 0 5px; + background-color: #fff; + cursor: pointer; + -moz-border-radius: 3px 3px 0 0; + -webkit-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} + +ul#tabs li.selected { + background-color: #fafafa; + position: relative; + z-index: 2; +} + +/* + config +*/ + +#config { + border-top: 1px solid #ccc; + margin: -1px 10px 0 10px; + position: relative; + z-index: 1; + background-image: -moz-linear-gradient(top, #fafafa 0%, #fff 20px); +} + +.icon { + width: 16px; + height: 16px; + margin-right: 10px; + display: inline-block; + background-image: url("i/sprite.png"); + background-repeat: no-repeat; + vertical-align: text-bottom; +} + +.icon.twitter { + background-position: center -36px; +} + +.icon.facebook { + background-position: center -69px; +} + +.icon.gmail { + background-position: center -101px; +} + +.icon.yahoo { + background-position: center -132px; +} + +.icon.googleapps { + background-position: center -165px; +} + +.icon.linkedin { + background-image: url("i/LinkedIn_Logo16px.png"); + background-position: center; +} + +.icon.rss { + background-position: center -271px; + margin: 0; +} + +#done { + padding: 0 10px; +} + +.panel { + width: 100%; + margin: 20px 0; +} + +#config .about { + color: #444; + text-align: center; +} + +#config .username { + color: #aaa; +} + +#config .new { + color: #ff5959; + font-style: italic; +} + +#config ul { + margin: 10px 0 20px; + border: 1px solid #ccc; + background-color: #fafafa; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +#config ul li { + width: 100%; + padding: 10px 20px; + border-bottom: 1px solid #ccc; +} + +#config ul li .accountType { + line-height: 24px; +} + +.accountType .multipleSignOut { + float: right; + margin-right: 10px; + color: #AAAAAA; +} + +#config ul li:last-child { + border-bottom: none; + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} + +#settings .key { + margin-right: 10px; + padding: 0 3px 0 5px; + -moz-border-radius: 4px; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(0, 0, 0, 0.3); + background: -moz-linear-gradient(#f8f8f8, #dddee0) repeat scroll 0 0 #ecedef; + color: #434343; + font-weight: bold; + text-align: center; + text-shadow: 0 1px 1px white; + -moz-user-select: none; +} + +#newsFooter { + padding: 0 10px; + margin: 10px 0; + position: absolute; + bottom: 0; + width: 720px; +} + +#newsFooter .privacy { + margin: 0 0 0 10px; + color: #444; +} + +/* + hbox & vbox +*/ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; + + width: 100%; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} + +/* + clearfix +*/ + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} + +/* + webkit specific styles +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + +.overflow { + text-overflow: ellipsis; + overflow-x: hidden; + white-space: nowrap; +} + +} diff --git a/web/0.3.4/share/build.js b/web/0.3.4/share/build.js new file mode 100644 index 0000000..6bdae6b --- /dev/null +++ b/web/0.3.4/share/build.js @@ -0,0 +1,10 @@ +({ + baseUrl: "../scripts/", + paths: { + "index": "../share/index", + "jquery": "requireplugins-jquery" + }, + name: "index", + exclude: ['jquery'], + out: './index.js' +}) diff --git a/web/0.3.4/share/i/LinkedIn_Logo16px.png b/web/0.3.4/share/i/LinkedIn_Logo16px.png new file mode 100644 index 0000000..c717e80 Binary files /dev/null and b/web/0.3.4/share/i/LinkedIn_Logo16px.png differ diff --git a/web/0.3.4/share/i/bug_b.png b/web/0.3.4/share/i/bug_b.png new file mode 100644 index 0000000..cb693b1 Binary files /dev/null and b/web/0.3.4/share/i/bug_b.png differ diff --git a/web/0.3.4/share/i/bug_w.png b/web/0.3.4/share/i/bug_w.png new file mode 100644 index 0000000..b2e9ece Binary files /dev/null and b/web/0.3.4/share/i/bug_w.png differ diff --git a/web/0.3.4/share/i/f1-icon-grey.png b/web/0.3.4/share/i/f1-icon-grey.png new file mode 100644 index 0000000..e4c0ffd Binary files /dev/null and b/web/0.3.4/share/i/f1-icon-grey.png differ diff --git a/web/0.3.4/share/i/face2.png b/web/0.3.4/share/i/face2.png new file mode 100644 index 0000000..af46e82 Binary files /dev/null and b/web/0.3.4/share/i/face2.png differ diff --git a/web/0.3.4/share/i/loader.gif b/web/0.3.4/share/i/loader.gif new file mode 100644 index 0000000..2acb45e Binary files /dev/null and b/web/0.3.4/share/i/loader.gif differ diff --git a/web/0.3.4/share/i/sprite.png b/web/0.3.4/share/i/sprite.png new file mode 100644 index 0000000..c61ed04 Binary files /dev/null and b/web/0.3.4/share/i/sprite.png differ diff --git a/web/0.3.4/share/index.html b/web/0.3.4/share/index.html new file mode 100644 index 0000000..e791710 --- /dev/null +++ b/web/0.3.4/share/index.html @@ -0,0 +1,226 @@ + + + + + F1 Alpha + + + + + + + + + + + + + + + + + + + + + + +
      + Try me! +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/0.3.4/share/index.js b/web/0.3.4/share/index.js new file mode 100644 index 0000000..60e223d --- /dev/null +++ b/web/0.3.4/share/index.js @@ -0,0 +1,139 @@ +/* + blade/func Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/object Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/jig Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/array Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/url Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details +*/ +define("blade/fn",[],function(){var b=Array.prototype.slice,d=Object.prototype.toString;return{is:function(e){return d.call(e)==="[object Function]"},bind:function(e,c){if(!c)return e;if(typeof c==="string")c=e[c];var a=b.call(arguments,2);return function(){return c.apply(e,a.concat(b.call(arguments,0)))}}}}); +define("blade/object",["./fn"],function(b){function d(){}var e={},c=function(a,f,g){a=a||{};var h,j=c.create(a.prototype,f);a=function(k,l,o){return j[l].apply(k,o)};f=c.create(j);c.mixin(f,b.is(g)?g(a):g,true);h=function(){if(!(this instanceof h))throw new Error('blade/object: constructor function called without "new" in front');this.init&&this.init.apply(this,arguments)};h.prototype=f;return h};c.create=function(a,f){d.prototype=a;a=new d;var g,h;d.prototype=null;if(f)for(g=0;h=f[g];g++)c.mixin(a, +h);return a};c.mixin=function(a,f,g){for(var h in f)if(!(h in e)&&(!(h in a)||g))a[h]=f[h]};return c}); +define("blade/jig",["require","./object"],function(b,d){function e(i){return z.call(i)==="[object Array]"}function c(i,m,n){m=m;var r,p;for(r=0;m&&(p=i[r]);r++)m=typeof m==="object"&&p in m?m[p]:n&&r===0&&p in n?n[p]:undefined;return m}function a(i){return i?parseInt(i,10):0}function f(i,m,n){var r=/\[([\w0-9\.'":]+)\]/,p=i,B=m,y=true,E,G;if(i===A)return m;if(x.test(i))return a(i);if(i==="")return"";E=i.charAt(0);if(E==="'"||E==="'")return i.substring(1,i.length-1);if((E=i.indexOf("("))!==-1){r=i.lastIndexOf(")"); +y=i.substring(0,E);p=n.fn[y];if(!p){o.error("Cannot find function named: "+y+" for "+i);return""}y=i.substring(E+1,r);if(y.indexOf(",")!==-1){y=y.split(",");for(B=y.length-1;B>=0;B--)y[B]=f(y[B],m,n);p=p.apply(null,y)}else p=p(f(y,m,n));if(r";else{y=p.charAt(0);G=p}}if(y&&!m.propertyRegExp.test(y))G=G.substring(1).trim();else y="_default_";if(p=G.indexOf(m.rawHtmlToken)===0)G=G.substring(m.rawHtmlToken.length,G.length);if(y===F)p=true;G=G.split(m.argSeparator);R=G[G.length-1];S=R.charAt(R.length-1);P=null;if(y==="]"){if(S!=="["){n.templateEnd=r;n.endControl=true}else n.templateEnd=r-E[0].length;return n}else if(S==="["){B||(B=Z++);G[G.length-1]=R.substring(0,R.length- +1);P=h(i.substring(r),m);r+=P.templateEnd}if(y==="+")m.templates[G[0]]=P;else if(y!=="/"){if(G.length>1)for(E=G.length-1;E>=0;E--)if(G[E].charAt(G[E].length-1)===","){G[E]+=G[E+1];G.splice(E+1,1)}n.push({action:m.commands[y].action,useRawHtml:p,args:G,controlId:B,children:P})}if(P&&P.endControl)B=0}else{n.push(r);return n}}r!==i.length-1&&n.push(i.substring(r,i.length));return n}function j(i,m){var n,r=i.id;n=m.templates||K;if(n[r])return n[r];m.onBeforeParse&&m.onBeforeParse(i);if(i.nodeName.toUpperCase()=== +"SCRIPT"){n=i.text.trim();i.parentNode&&i.parentNode.removeChild(i)}else{V.appendChild(i);i.removeAttribute("id");(n=(i.getAttribute("class")||"").trim())&&i.setAttribute("class",n.replace(aa,"$1$3"));n=V.innerHTML.replace(/%7B/g,"{").replace(/%7D/g,"}");V.removeChild(i)}i=o.compile(n,m);o.cache(r,i,m);return i}function k(i,m,n){var r="",p,B,y,E,G;if(typeof i==="string")r=i;else if(e(i))for(p=0;pm},gte:function(i,m){return i>=m},lt:function(i,m){return ip.prop?1:-1})}},Y=1,Z=1,T={},V=typeof document!=="undefined"&&document.createElement?document.createElement("div"):null,aa=/(\s*)(template)(\s*)/;s={_default_:{doc:"Property reference",action:function(i,m,n,r,p){var B=i[0]?f(i[0],m,n):m,y=i[1]?f(i[1],m,n):undefined,E="";if(i[1]){y=B===y;B=m}else y=B;if(y===false||y===null||y===undefined||e(y)&&!y.length)return"";else if(r)if(e(B))for(i=0;i1?i[1]:A,m,n);return p(r,m,n)}},".":{doc:"Variable declaration",action:function(i,m,n){n.context[i[0]]=f(i[1],m,n);return""}},">":{doc:"Else",action:function(i,m,n,r,p){if(r)return p(r,m,n);return""}}};o=function(i,m,n){if(typeof i==="string")if(i.charAt(0)=== +"#"){i=i.substring(1,i.length);i=g(i,n)}else i=o.compile(i,n);return o.render(i,m,n)};o.htmlEscape=function(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};o.compile=function(i,m){m=m||{};d.mixin(m,{startToken:"{",endToken:"}",rawHtmlToken:"^",propertyRegExp:v,commands:s,argSeparator:" ",templates:K});m.endRegExp=/[^\r\n]*?}/;Z=1;return h(i,m)};o.parse=function(i,m){if(i&&!i.length){m=i;i=null}m=m||{};i=i||document.querySelectorAll('.template, script[type="text/template"]'); +var n,r;for(r=i.length-1;r>-1&&(n=i[r]);r--)j(n,m)};o.render=function(i,m,n){var r,p="";n=n||{};d.mixin(n,{templates:K,attachData:false,strict:o.strict});if(n.fn)d.mixin(n.fn,O);else n.fn=O;n.context=n.context||d.create(m);if(e(m)){for(r=0;r=365&&c<730){a.additional=d.toLocaleDateString(); +a.friendly="a year ago";return a}if(c>=365){a.additional=d.toLocaleDateString();a.friendly=Math.ceil(c/365)+" years ago";return a}return a},name:function(d){d=d.split(" ")[0];if(d.indexOf("@")!==-1)d=d.split("@")[0];d=d.replace(" ","");d=d.replace("'","");return d=d.replace('"',"")}};return b}); +define("isoDate",[],function(){var b=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+\-](\d{2}):(\d{2}))|Z)?)?$/,d=function(e,c){var a=b.exec(e);e=null;var f,g;if(a){a.shift();a[1]&&a[1]--;if(a[6])a[6]*=1E3;if(c){c=new Date(c);["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"].map(function(h){return c["get"+h]()}).forEach(function(h,j){a[j]=a[j]||h})}e=new Date(a[0]||1970,a[1]||0,a[2]||1,a[3]||0,a[4]||0,a[5]||0,a[6]||0);if(a[0]<100)e.setFullYear(a[0]|| +1970);f=0;g=a[7]&&a[7].charAt(0);if(g!=="Z"){f=(a[8]||0)*60+(Number(a[9])||0);if(g!=="-")f*=-1}if(g)f-=e.getTimezoneOffset();f&&e.setTime(e.getTime()+f*6E4)}return e};d.toIsoString=function(e,c){var a=function(j){return j<10?"0"+j:j},f,g,h;c=c||{};f=[];g=c.zulu?"getUTC":"get";h="";if(c.selector!=="time"){h=e[g+"FullYear"]();h=["0000".substr((h+"").length)+h,a(e[g+"Month"]()+1),a(e[g+"Date"]())].join("-")}f.push(h);if(c.selector!=="date"){h=[a(e[g+"Hours"]()),a(e[g+"Minutes"]()),a(e[g+"Seconds"]())].join(":"); +g=e[g+"Milliseconds"]();if(c.milliseconds)h+="."+(g<100?"0":"")+a(g);if(c.zulu)h+="Z";else if(c.selector!=="time"){e=e.getTimezoneOffset();c=Math.abs(e);h+=(e>0?"-":"+")+a(Math.floor(c/60))+":"+a(c%60)}f.push(h)}return f.join("T")};return d});var EXPORTED_SYMBOLS=["hex_md5"],hexcase=0,b64pad="";function hex_md5(b){return rstr2hex(rstr_md5(str2rstr_utf8(b)))}function b64_md5(b){return rstr2b64(rstr_md5(str2rstr_utf8(b)))}function any_md5(b,d){return rstr2any(rstr_md5(str2rstr_utf8(b)),d)} +function hex_hmac_md5(b,d){return rstr2hex(rstr_hmac_md5(str2rstr_utf8(b),str2rstr_utf8(d)))}function b64_hmac_md5(b,d){return rstr2b64(rstr_hmac_md5(str2rstr_utf8(b),str2rstr_utf8(d)))}function any_hmac_md5(b,d,e){return rstr2any(rstr_hmac_md5(str2rstr_utf8(b),str2rstr_utf8(d)),e)}function md5_vm_test(){return hex_md5("abc").toLowerCase()=="900150983cd24fb0d6963f7d28e17f72"}function rstr_md5(b){return binl2rstr(binl_md5(rstr2binl(b),b.length*8))} +function rstr_hmac_md5(b,d){var e=rstr2binl(b);if(e.length>16)e=binl_md5(e,b.length*8);var c=Array(16);b=Array(16);for(var a=0;a<16;a++){c[a]=e[a]^909522486;b[a]=e[a]^1549556828}d=binl_md5(c.concat(rstr2binl(d)),512+d.length*8);return binl2rstr(binl_md5(b.concat(d),640))}function rstr2hex(b){for(var d=hexcase?"0123456789ABCDEF":"0123456789abcdef",e="",c,a=0;a>>4&15)+d.charAt(c&15)}return e} +function rstr2b64(b){for(var d="",e=b.length,c=0;cb.length*8?b64pad:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>>6*(3-f)&63);return d} +function rstr2any(b,d){var e=d.length,c,a,f,g,h,j=Array(Math.ceil(b.length/2));for(c=0;c0||f>0)h[h.length]=f}b[a]=g;j=h}e="";for(c=b.length-1;c>=0;c--)e+=d.charAt(b[c]);return e} +function str2rstr_utf8(b){for(var d="",e=-1,c,a;++e>>6&31,128|c&63);else if(c<=65535)d+=String.fromCharCode(224|c>>>12&15,128|c>>>6&63,128|c&63);else if(c<=2097151)d+=String.fromCharCode(240|c>>>18&7,128|c>>>12&63,128|c>>>6&63,128|c&63)}return d} +function str2rstr_utf16le(b){for(var d="",e=0;e>>8&255);return d}function str2rstr_utf16be(b){for(var d="",e=0;e>>8&255,b.charCodeAt(e)&255);return d}function rstr2binl(b){for(var d=Array(b.length>>2),e=0;e>5]|=(b.charCodeAt(e/8)&255)<>5]>>>e%32&255);return d} +function binl_md5(b,d){b[d>>5]|=128<>>9<<4)+14]=d;d=1732584193;for(var e=-271733879,c=-1732584194,a=271733878,f=0;f>16)+(d>>16)+(e>>16)<<16|e&65535}function bit_rol(b,d){return b<>>32-d}define("md5",function(){}); +define("rdapi",["require","jquery","blade/object","blade/jig","friendly","isoDate","md5"],function(b,d,e,c,a,f){function g(v){if(typeof v==="string")v={template:v};else if(v.templateId)v.template=c.cache(v.templateId);if(!("attachData"in v))v.attachData=l.attachTemplateData;if(v.emptyTemplateId)v.emptyTemplate=c.cache(v.emptyTemplateId);return v}function h(){var v=s.exec(document.cookie);return v&&v[1]?v[1]:null}function j(v,A){A.url=F.baseUrl+F.apiPath+v;e.mixin(A,{limit:30,message_limit:3,dataType:"json", +error:function(D,K,O){throw O;}});var w=A.success,x=h();A.success=function(D){D&&D.contacts&&e.mixin(z,D.contacts,true);return w?w.apply(null,arguments):D};if(x)A.beforeSend=function(D){D.setRequestHeader(o,x)};d.ajax(A)}function k(v,A){var w=A.forId?document.getElementById(A.forId):null;if(w)w.innerHTML=v;A.onTemplateDone&&A.onTemplateDone(v);d(document).trigger("rdapi-done",w)}var l,o="X-CSRF",s=/csrf=([^\; ]+)/,z={},C={contact:function(v){return v.iid&&v.domain?z[v.iid]||{}:v},contactPhotoUrl:function(v){var A= +"i/face2.png",w,x;v=C.contact(v);if((w=v.photos)&&w.length){A=w[0].value;w.forEach(function(D){if(D.primary)A=D.value})}else if(v.emails&&v.emails.length){x=v.emails[0].value;v.emails.forEach(function(D){if(D.primary)x=D.value});A="http://www.gravatar.com/avatar/"+hex_md5(x)+"?s=24 &d=identicon"}return A},allMessages:function(v){return[v.topic].concat(v.messages||[])},friendlyDate:function(v){return a.date(f(v)).friendly},htmlBody:function(v){return c.htmlEscape(v).replace(/\n/g,"
      ")}},F={baseUrl:"/", +apiPath:"api/",saveTemplateData:true};c.addFn(C);l=function(v,A){A=g(A);e.mixin(A,{success:function(w){var x=A.template,D=A.emptyTemplate,K="";if(A.forId&&x){if(A.prop)w=c.getObject(A.prop,w,A);if(b.isArray(w))if(w.length)w.forEach(function(O){K+=c(x,O,A)});else K+=c(D,w,A);else K+=c(!w?D:x,w,A);k(K,A)}},error:function(w,x,D){if(A.emptyTemplate){w=c(A.emptyTemplate,D,A);k(w,A)}else throw D;}});j(v,A)};l.contactPhotoUrl=C.contactPhotoUrl;l.attachTemplateData=false;b.ready(function(){var v=[];c.parse({onBeforeParse:function(A){var w= +A.id,x=A.getAttribute("data-rdapi"),D=A.getAttribute("data-rdfor"),K=A.getAttribute("data-rdprop");x&&v.push({templateId:w,api:x,forId:D,prop:K});["data-rdapi","data-rdprop","data-rdfor"].forEach(function(O){A.removeAttribute(O)})}});v.forEach(function(A){l(A.api,A)})});return l});define("storage",[],function(){function b(){return d}var d=localStorage,e="localStorage";try{d.tempVar="temp";delete d.tempVar}catch(c){d={};e="memory"}b.type=e;return b}); +define("dispatch",["jquery"],function(){var b=location.protocol+"//"+location.host;return{sub:function(d,e,c,a){c=c||window;a=a||b;var f=function(g){if(g.origin===a||g.origin==="chrome://browser")try{var h=JSON.parse(g.data),j=h.topic;j&&j===d&&e(h.data)}catch(k){}};c.addEventListener("message",f,false);return f},unsub:function(d,e){e=e||window;e.removeEventListener("message",d,false)},pub:function(d,e,c){c=c||window;c.postMessage(JSON.stringify({topic:d,data:e}),b)}}}); +define("services",["blade/object","storage"],function(b,d){function e(h,j){if(h){this.name=h;this.type=h.replace(/\s/g,"").toLowerCase();this.tabName=this.type+"Tab";this.icon="i/"+this.type+"Icon.png";this.features={counter:false,direct:false,subject:false};b.mixin(this,j,true)}}function c(){e.constructor.apply(this,arguments);this.features.direct=true;this.features.subject=true}var a=parseFloat(navigator.userAgent.split("Firefox/")[1])>=4;d=d();var f,g;e.constructor=e;e.prototype={clearCache:function(h){delete h[this.type+ +"Contacts"]},getContacts:function(h){if(h[this.type+"Contacts"])return JSON.parse(h[this.type+"Contacts"]);return null},setContacts:function(h,j){h[this.type+"Contacts"]=JSON.stringify(j)},get36FormattedContacts:function(){return null}};c.prototype=new e;c.constructor=c;c.prototype.validate=function(h){if(!h.to||!h.to.trim())return false;return true};c.prototype.get36FormattedContacts=function(h){var j=[];h.forEach(function(k){k.emails&&k.emails.length&&k.emails.forEach(function(l){j.push({displayName:k.displayName? +k.displayName:l.value,email:l.value})})});return j};c.prototype.overlays={Contacts:"ContactsEmail"};f={domains:{"twitter.com":new e("Twitter",{features:{direct:true,subject:false,counter:true},shareTypes:[{type:"public",name:"public"},{type:"direct",name:"direct message",showTo:true,toLabel:"type in name of recipient"}],textLimit:140,shorten:true,serviceUrl:"http://twitter.com",revokeUrl:"http://twitter.com/settings/connections",signOutUrl:"http://twitter.com/logout",accountLink:function(h){return"http://twitter.com/"+ +h.username},forceLogin:{name:"force_login",value:true},overlays:{Contacts:"ContactsTwitter"}}),"facebook.com":new e("Facebook",{features:{direct:true,subject:false,counter:true,medium:true},shareTypes:[{type:"wall",name:"my wall"},{type:"groupWall",name:"group wall",showTo:true,toLabel:"type in the name of the group"}],textLimit:420,serviceUrl:"http://facebook.com",revokeUrl:"http://www.facebook.com/editapps.php?v=allowed",signOutUrl:"http://facebook.com",accountLink:function(h){return"http://www.facebook.com/profile.php?id="+ +h.userid},overlays:{"widgets/AccountPanel":"widgets/AccountPanelFaceBook"}}),"google.com":new c("Gmail",{shareTypes:[{type:"direct",name:"direct",showTo:true}],serviceUrl:"https://mail.google.com",revokeUrl:"https://www.google.com/accounts/IssuedAuthSubTokens",signOutUrl:"http://google.com/preferences",accountLink:function(h){return"http://google.com/profiles/"+h.username},forceLogin:{name:"pape_max_auth_age",value:0}}),"googleapps.com":new c("Google Apps",{shareTypes:[{type:"direct",name:"direct", +showTo:true}],icon:"i/gmailIcon.png",serviceUrl:"https://mail.google.com",revokeUrl:"https://www.google.com/accounts/IssuedAuthSubTokens",signOutUrl:"http://google.com/preferences",accountLink:function(h){return"http://google.com/profiles/"+h.username},forceLogin:{name:"pape_max_auth_age",value:0}}),"yahoo.com":new c("Yahoo",{shareTypes:[{type:"direct",name:"direct",showTo:true}],name:"Yahoo!",serviceUrl:"http://mail.yahoo.com",revokeUrl:"https://api.login.yahoo.com/WSLogin/V1/unlink",signOutUrl:"https://login.yahoo.com/config/login?logout=1", +accountLink:function(h){return"http://profiles.yahoo.com/"+h.username}}),"linkedin.com":new e("LinkedIn",{isNew:true,features:{direct:true,subject:true,counter:false},shareTypes:[{type:"public",name:"anyone"},{type:"myConnections",name:"connections only",specialTo:"connections-only"},{type:"contact",name:"send message",showTo:true,toLabel:"type in the name of the contact"}],serviceUrl:"http://linkedin.com",revokeUrl:"http://linkedin.com/settings/connections",signOutUrl:"https://www.linkedin.com/secure/login?session_full_logout=&trk=hb_signout", +accountLink:function(h){return"http://linkedin.com/"+h.username},overlays:{"widgets/AccountPanel":"widgets/AccountPanelLinkedIn"}})},domainList:[],svcBaseProto:e.prototype};for(g in f.domains)if(f.domains.hasOwnProperty(g)){f.domainList.push(g);if(a){delete d[f.domains[g].type+"Contacts"];delete d.contactsModelVersion}}return f}); +define("accounts",["storage","dispatch","rdapi","services"],function(b,d,e,c){function a(l,o,s,z){return l.domain===o&&(s&&l.userid===s||z&&l.username===z)}function f(l){if(l)l=JSON.parse(l);return l}function g(l,o){return k.accounts(l,o)}function h(){location.reload()}var j=b(),k;k={localStorage:{accounts:function(l,o){var s=f(j.accountCache)||[],z=f(j.serviceCache);if(z){z=z||[];l&&l(s,z)}else k.fetch(l,o)},update:function(l){var o=f(j.accountCache)||[],s=f(j.serviceCache),z=false,C,F,v;C=l.profile; +for(F=0;Fc+4E3){c=h;a=g+"?domain="+a+(f?"&forceLogin=1":"");try{e=window.open(a,"ffshareOAuth", +"dialog=yes, modal=yes, width=900, height=500, scrollbars=yes");e.focus()}catch(j){window.location=a+"&end_point_success="+encodeURI(window.location)}}else e&&e.focus()}});define("blade/array",[],function(){var b=Object.prototype.toString,d=Array.prototype.slice;return{is:function(e){return b.call(e)==="[object Array]"},to:function(){return[].concat(d.call(arguments,0))}}}); +define("blade/url",["./array"],function(b){var d=Object.prototype.toString;return{objectToQuery:function(e){var c=encodeURIComponent,a=[],f={},g,h,j,k;for(g in e)if(e.hasOwnProperty(g)){h=e[g];if(h!==f[g]){j=c(g)+"=";if(b.is(h))for(k=0;kthis.limit}})}); +(function(b,d){function e(c){return!b(c).parents().andSelf().filter(function(){return b.curCSS(this,"visibility")==="hidden"||b.expr.filters.hidden(this)}).length}b.ui=b.ui||{};if(!b.ui.version){b.extend(b.ui,{version:"1.8.6",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109, +PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});b.fn.extend({_focus:b.fn.focus,focus:function(c,a){return typeof c==="number"?this.each(function(){var f=this;setTimeout(function(){b(f).focus();a&&a.call(f)},c)}):this._focus.apply(this,arguments)},scrollParent:function(){var c;c=b.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.curCSS(this, +"position",1))&&/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?b(document):c},zIndex:function(c){if(c!==d)return this.css("zIndex",c);if(this.length){c=b(this[0]);for(var a;c.length&&c[0]!==document;){a=c.css("position"); +if(a==="absolute"||a==="relative"||a==="fixed"){a=parseInt(c.css("zIndex"),10);if(!isNaN(a)&&a!==0)return a}c=c.parent()}}return 0},disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(c){c.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.each(["Width","Height"],function(c,a){function f(k,l,o,s){b.each(g,function(){l-=parseFloat(b.curCSS(k,"padding"+this,true))||0;if(o)l-=parseFloat(b.curCSS(k, +"border"+this+"Width",true))||0;if(s)l-=parseFloat(b.curCSS(k,"margin"+this,true))||0});return l}var g=a==="Width"?["Left","Right"]:["Top","Bottom"],h=a.toLowerCase(),j={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};b.fn["inner"+a]=function(k){if(k===d)return j["inner"+a].call(this);return this.each(function(){b(this).css(h,f(this,k)+"px")})};b.fn["outer"+a]=function(k,l){if(typeof k!=="number")return j["outer"+a].call(this,k);return this.each(function(){b(this).css(h, +f(this,k,true,l)+"px")})}});b.extend(b.expr[":"],{data:function(c,a,f){return!!b.data(c,f[3])},focusable:function(c){var a=c.nodeName.toLowerCase(),f=b.attr(c,"tabindex");if("area"===a){a=c.parentNode;f=a.name;if(!c.href||!f||a.nodeName.toLowerCase()!=="map")return false;c=b("img[usemap=#"+f+"]")[0];return!!c&&e(c)}return(/input|select|textarea|button|object/.test(a)?!c.disabled:"a"==a?c.href||!isNaN(f):!isNaN(f))&&e(c)},tabbable:function(c){var a=b.attr(c,"tabindex");return(isNaN(a)||a>=0)&&b(c).is(":focusable")}}); +b(function(){var c=document.body,a=c.appendChild(a=document.createElement("div"));b.extend(a.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=a.offsetHeight===100;b.support.selectstart="onselectstart"in a;c.removeChild(a).style.display="none"});b.extend(b.ui,{plugin:{add:function(c,a,f){c=b.ui[c].prototype;for(var g in f){c.plugins[g]=c.plugins[g]||[];c.plugins[g].push([a,f[g]])}},call:function(c,a,f){if((a=c.plugins[a])&&c.element[0].parentNode)for(var g=0;g0)return true;c[a]=1;f=c[a]>0;c[a]=0;return f},isOverAxis:function(c,a,f){return c>a&&c
      ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
    • #{label}
    • "},_create:function(){this._tabify(true)},_setOption:function(g,h){if(g=="selected")this.options.collapsible&& +h==this.options.selected||this.select(h);else{this.options[g]=h;this._tabify()}},_tabId:function(g){return g.title&&g.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(g){return g.replace(/:/g,"\\:")},_cookie:function(){var g=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+c());return b.cookie.apply(null,[g].concat(b.makeArray(arguments)))},_ui:function(g,h){return{tab:g,panel:h,index:this.anchors.index(g)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var g= +b(this);g.html(g.data("label.tabs")).removeData("label.tabs")})},_tabify:function(g){function h(w,x){w.css("display","");!b.support.opacity&&x.opacity&&w[0].style.removeAttribute("filter")}var j=this,k=this.options,l=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=b(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return b("a",this)[0]});this.panels=b([]);this.anchors.each(function(w,x){var D=b(x).attr("href"),K=D.split("#")[0],O;if(K&&(K===location.toString().split("#")[0]|| +(O=b("base")[0])&&K===O.href)){D=x.hash;x.href=D}if(l.test(D))j.panels=j.panels.add(j._sanitizeSelector(D));else if(D&&D!=="#"){b.data(x,"href.tabs",D);b.data(x,"load.tabs",D.replace(/#.*$/,""));D=j._tabId(x);x.href="#"+D;x=b("#"+D);if(!x.length){x=b(k.panelTemplate).attr("id",D).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(j.panels[w-1]||j.list);x.data("destroy.tabs",true)}j.panels=j.panels.add(x)}else k.disabled.push(w)});if(g){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(k.selected===d){location.hash&&this.anchors.each(function(w,x){if(x.hash==location.hash){k.selected=w;return false}});if(typeof k.selected!=="number"&&k.cookie)k.selected=parseInt(j._cookie(),10);if(typeof k.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)k.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));k.selected=k.selected||(this.lis.length?0:-1)}else if(k.selected===null)k.selected=-1;k.selected=k.selected>=0&&this.anchors[k.selected]||k.selected<0?k.selected:0;k.disabled=b.unique(k.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"),function(w){return j.lis.index(w)}))).sort();b.inArray(k.selected,k.disabled)!=-1&&k.disabled.splice(b.inArray(k.selected,k.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(k.selected>=0&&this.anchors.length){b(j._sanitizeSelector(j.anchors[k.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(k.selected).addClass("ui-tabs-selected ui-state-active");j.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[k.selected],b(j._sanitizeSelector(j.anchors[k.selected].hash))))});this.load(k.selected)}b(window).bind("unload",function(){j.lis.add(j.anchors).unbind(".tabs");j.lis=j.anchors=j.panels=null})}else k.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[k.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");k.cookie&&this._cookie(k.selected,k.cookie);g=0;for(var o;o=this.lis[g];g++)b(o)[b.inArray(g,k.disabled)!=-1&&!b(o).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");k.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(k.event!=="mouseover"){var s=function(w,x){x.is(":not(.ui-state-disabled)")&&x.addClass("ui-state-"+w)},z=function(w,x){x.removeClass("ui-state-"+ +w)};this.lis.bind("mouseover.tabs",function(){s("hover",b(this))});this.lis.bind("mouseout.tabs",function(){z("hover",b(this))});this.anchors.bind("focus.tabs",function(){s("focus",b(this).closest("li"))});this.anchors.bind("blur.tabs",function(){z("focus",b(this).closest("li"))})}var C,F;if(k.fx)if(b.isArray(k.fx)){C=k.fx[0];F=k.fx[1]}else C=F=k.fx;var v=F?function(w,x){b(w).closest("li").addClass("ui-tabs-selected ui-state-active");x.hide().removeClass("ui-tabs-hide").animate(F,F.duration||"normal", +function(){h(x,F);j._trigger("show",null,j._ui(w,x[0]))})}:function(w,x){b(w).closest("li").addClass("ui-tabs-selected ui-state-active");x.removeClass("ui-tabs-hide");j._trigger("show",null,j._ui(w,x[0]))},A=C?function(w,x){x.animate(C,C.duration||"normal",function(){j.lis.removeClass("ui-tabs-selected ui-state-active");x.addClass("ui-tabs-hide");h(x,C);j.element.dequeue("tabs")})}:function(w,x){j.lis.removeClass("ui-tabs-selected ui-state-active");x.addClass("ui-tabs-hide");j.element.dequeue("tabs")}; +this.anchors.bind(k.event+".tabs",function(){var w=this,x=b(w).closest("li"),D=j.panels.filter(":not(.ui-tabs-hide)"),K=b(j._sanitizeSelector(w.hash));if(x.hasClass("ui-tabs-selected")&&!k.collapsible||x.hasClass("ui-state-disabled")||x.hasClass("ui-state-processing")||j.panels.filter(":animated").length||j._trigger("select",null,j._ui(this,K[0]))===false){this.blur();return false}k.selected=j.anchors.index(this);j.abort();if(k.collapsible)if(x.hasClass("ui-tabs-selected")){k.selected=-1;k.cookie&& +j._cookie(k.selected,k.cookie);j.element.queue("tabs",function(){A(w,D)}).dequeue("tabs");this.blur();return false}else if(!D.length){k.cookie&&j._cookie(k.selected,k.cookie);j.element.queue("tabs",function(){v(w,K)});j.load(j.anchors.index(this));this.blur();return false}k.cookie&&j._cookie(k.selected,k.cookie);if(K.length){D.length&&j.element.queue("tabs",function(){A(w,D)});j.element.queue("tabs",function(){v(w,K)});j.load(j.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +b.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(g){if(typeof g=="string")g=this.anchors.index(this.anchors.filter("[href$="+g+"]"));return g},destroy:function(){var g=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var h= +b.data(this,"href.tabs");if(h)this.href=h;var j=b(this).unbind(".tabs");b.each(["href","load","cache"],function(k,l){j.removeData(l+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){b.data(this,"destroy.tabs")?b(this).remove():b(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});g.cookie&&this._cookie(null,g.cookie);return this},add:function(g, +h,j){if(j===d)j=this.anchors.length;var k=this,l=this.options;h=b(l.tabTemplate.replace(/#\{href\}/g,g).replace(/#\{label\}/g,h));g=!g.indexOf("#")?g.replace("#",""):this._tabId(b("a",h)[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var o=b("#"+g);o.length||(o=b(l.panelTemplate).attr("id",g).data("destroy.tabs",true));o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(j>=this.lis.length){h.appendTo(this.list);o.appendTo(this.list[0].parentNode)}else{h.insertBefore(this.lis[j]); +o.insertBefore(this.panels[j])}l.disabled=b.map(l.disabled,function(s){return s>=j?++s:s});this._tabify();if(this.anchors.length==1){l.selected=0;h.addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){k._trigger("show",null,k._ui(k.anchors[0],k.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[j],this.panels[j]));return this},remove:function(g){g=this._getIndex(g);var h=this.options,j=this.lis.eq(g).remove(),k=this.panels.eq(g).remove(); +if(j.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(g+(g+1=g?--l:l});this._tabify();this._trigger("remove",null,this._ui(j.find("a")[0],k[0]));return this},enable:function(g){g=this._getIndex(g);var h=this.options;if(b.inArray(g,h.disabled)!=-1){this.lis.eq(g).removeClass("ui-state-disabled");h.disabled=b.grep(h.disabled,function(j){return j!=g});this._trigger("enable",null, +this._ui(this.anchors[g],this.panels[g]));return this}},disable:function(g){g=this._getIndex(g);var h=this.options;if(g!=h.selected){this.lis.eq(g).addClass("ui-state-disabled");h.disabled.push(g);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[g],this.panels[g]))}return this},select:function(g){g=this._getIndex(g);if(g==-1)if(this.options.collapsible&&this.options.selected!=-1)g=this.options.selected;else return this;this.anchors.eq(g).trigger(this.options.event+".tabs");return this}, +load:function(g){g=this._getIndex(g);var h=this,j=this.options,k=this.anchors.eq(g)[0],l=b.data(k,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&b.data(k,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(g).addClass("ui-state-processing");if(j.spinner){var o=b("span",k);o.data("label.tabs",o.html()).html(j.spinner)}this.xhr=b.ajax(b.extend({},j.ajaxOptions,{url:l,success:function(s,z){b(h._sanitizeSelector(k.hash)).html(s);h._cleanup();j.cache&&b.data(k,"cache.tabs", +true);h._trigger("load",null,h._ui(h.anchors[g],h.panels[g]));try{j.ajaxOptions.success(s,z)}catch(C){}},error:function(s,z){h._cleanup();h._trigger("load",null,h._ui(h.anchors[g],h.panels[g]));try{j.ajaxOptions.error(s,z,g,k)}catch(C){}}}));h.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(g, +h){this.anchors.eq(g).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:"1.8.6"});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(g,h){var j=this,k=this.options,l=j._rotate||(j._rotate=function(o){clearTimeout(j.rotation);j.rotation=setTimeout(function(){var s=k.selected;j.select(++sf))for(l=0;lo){for(;s/g,">").replace(/"/g,"""):q}function F(){k.pub("hide")}function v(){E.addClass("hidden");d("div.status").addClass("hidden");h()}function A(){var q=n&&n.domain||"twitter.com",u= +p.siteName,H=p.url||"",J=H.indexOf("//")+2;d("#statusShared").empty().append(f("#sharedTemplate",{domain:u||H.slice(J,H.indexOf("/",J)),service:m[q].name,href:m[q].serviceUrl})).find(".shareTitle").textOverflow(null,true);i("statusShared",true)}function w(q,u){d("#captchaImage").attr("src",q.imageurl);u&&d("#captchaMsg").text(u.message);d("#captchaSound").attr("src",q.audiourl);i("statusCaptcha",false)}function x(){var q={link:n.link,domain:n.domain,formData:m[n.domain].getFormData()};L.sessionRestore= +JSON.stringify(q);i("statusAuth")}function D(){i("statusSharing");if(m[n.domain].validate(n)){var q=l.getService(n.domain,n.userid,n.username);n.account=JSON.stringify(q);c("send",{type:"POST",data:n,success:function(u){if(u.error&&u.error.status){var H=u.error.status;if(H===401||H===535)x();else if(u.error.code==="Client.HumanVerificationRequired")w(u.error.detail);else u.error.code==="Client.WrongInput"?w(u.error.detail,u.error):i("statusError",u.error.message)}else if(u.error)i("statusError",u.error.message); +else{L.lastSelection=m[n.domain].type;A()}delete L.sessionRestore},error:function(u,H,J){if(u.status===403)x();else u.status===503?i("statusServerBusy"):i("statusError",J)}})}else i("statusToError")}function K(q){var u=s.domains[q];d("#"+u.type).find('[name="to"]');(u=u.getContacts(L))||(u=[]);q==="google.com"&&k.pub("autoCompleteData",u)}function O(q,u){var H=u.accounts[0],J=s.domains[H.domain];if(J.getContacts(L))K(H.domain);else{q=l.getService(H.domain,H.userid,H.username);c("contacts/"+H.domain, +{type:"POST",data:{username:H.username,userid:H.userid,startindex:0,maxresults:500,account:JSON.stringify(q)},success:function(M){if(M&&!M.error){var N=[];N=J.get36FormattedContacts(M.result.entry);J.setContacts(L,N);K(H.domain)}}})}}function Y(q,u){var H=q="",J=true,M="",N=u.panel.id,I=d(".user-info");if(N!=="debug"){q=d(u.panel).find("div.user img.avatar").attr("src");H=d(u.panel).find("div.user .username").text();J=d(u.panel).find("div.user").hasClass("inactive");M=d(u.panel).find("div.user input[type='hidden'][name='domain']").val()}d(".user-info img.avatar").attr("src", +q);q?I.show():I.hide();d(".user-info .status").toggleClass("inactive",J);d(".user-info .username").text(H);d(".user-info").attr("data-domain",M)}function Z(q,u){d(function(){var H=u.displayName,J=u.accounts[0],M=u.photos&&u.photos[0]&&u.photos[0].value,N=d("#"+q),I;if((I=J.username)&&I!==H)H=H+" <"+I+">";d("."+q+"Tab").removeClass("hidden");H&&N.find(".username").text(H);M&&N.find(".avatar").attr("src",M);N.find('input[name="userid"]').val(J.userid);N.find('input[name="username"]').val(J.username); +N.find("div.user").removeClass("inactive")})}function T(){var q,u;if(L.lastSelection)q="#"+L.lastSelection;else if(S&&S.length){u=S[0].accounts[0].domain;if(m[u])if(u=m[u].type)q="#"+u}return q}function V(){d(".ui-tabs-nav > li").removeClass("first").removeClass("last").filter(function(){var q=d(this),u=q.hasClass("hidden");q=q.hasClass("debugTab");return!u&&!q}).first().addClass("first").end().last().addClass("last")}function aa(q){var u=false,H={},J=L.sessionRestore,M;q&&q.length&&q.forEach(function(N){var I= +N.accounts[0].domain;if(I&&m[I]){u||(u=m[I].type===L.lastSelection);H[m[I].type]=N}});!u&&!L.accountAdded&&L.lastSelection&&delete L.lastSelection;L.accountAdded&&delete L.accountAdded;for(M in H)if(H.hasOwnProperty(M)){Z(M,H[M]);O(M,H[M])}if(J){J=JSON.parse(J);if(p.link!==J.link){J=null;delete L.sessionRestore}if(J){m[J.domain].setFormData(J.formData);h()}}if(G){q=T();B.tabs("select",q);Y(null,{panel:d(q)[0]})}V()}var i,m=s.domains;b=location.href.split("#")[1];var n,r,p={},B,y,E,G=true,R,S,P,L= +o();z.mixin(s.svcBaseProto,{validate:function(){if(this.counter)return!this.counter||!this.counter.isOver();return true},startCounter:function(q){if(!(this.textLimit<1)){if(!this.counter)this.counter=new j(d("#"+this.type+" textarea.message"),d("#"+this.type+" .counter"),this.textLimit-26);this.counter.updateLimit(q.shortUrl?this.textLimit-(q.shortUrl.length+1):this.textLimit-26)}},getFormData:function(){var q=d("#"+this.type);return{to:q.find('[name="to"]').val().trim()||"",subject:q.find('[name="subject"]').val().trim()|| +"",message:q.find("textarea.message").val().trim()||"",picture:q.find('[name="picture"]').val().trim()||"",canonicalUrl:q.find('[name="link"]').val().trim()||"",title:q.find('[name="title"]').val().trim()||"",description:q.find('[name="description"]').val().trim()||"",shortUrl:(q.find('[name="surl"]').val()||"").trim()}},setFormData:function(q){var u=d("#"+this.type);q.to&&u.find('[name="to"]').val(q.to);q.subject&&u.find('[name="subject"]').val(q.subject);q.message&&u.find("textarea.message").val(q.message); +q.previews&&q.previews.length&&u.find('[name="picture"]').val(q.previews[0]);if(q.canonicalUrl||q.url)u.find('[name="link"]').val(q.canonicalUrl||q.url);q.title&&u.find('[name="title"]').val(q.title);q.description&&u.find('[name="description"]').val(q.description);q.shortUrl&&u.find('[name="surl"]').val(q.shortUrl);this.startCounter(q)}});f.addFn({profilePic:function(q){return q&&q[0]&&q[0].value||"i/face2.png"},serviceName:function(q){return m[q].name}});window.closeShare=F;i=function(q,u){d("div.status").addClass("hidden"); +E.removeClass("hidden");d("#"+q).removeClass("hidden");if(u===true)setTimeout(function(){k.pub("success",{domain:n.domain,username:n.username,userid:n.userid})},2E3);else u&&d("#"+q+"Message").text(u)};window.showStatus=i;window.showStatusShared=A;window.handleCaptcha=w;if(b){g=g.queryToObject(b);if(g.options)p=JSON.parse(g.options)}p.prefs=p.prefs||{};if(!p.title)p.title=p.url;if(!p.prefs.system)p.prefs.system="prod";if(p.version)L.extensionVersion=p.version;if(p.prefs)for(r in p.prefs)if(p.prefs.hasOwnProperty(r))L["prefs."+ +r]=p.prefs[r];if(r=L.newTimerV2){r=JSON.parse(r);if((new Date).getTime()-r<2592E5)P=true}else{L.newTimerV1=(new Date).getTime();P=true}d(function(){var q,u=L.sessionRestore,H,J="",M="",N;s.domainList.forEach(function(I){var Q=s.domains[I];Q.domain=I;if(I==="linkedin.com")Q.features.subject=false;J+=f("#tabsTemplate",Q);M+=f("#panelsTemplate",Q)});d(".nav .debugTab").before(J);d("#tabs #debug").before(M);q=d("img.thumb");y=d("body");E=d("#clickBlock");p.prefs.system&&d(document.documentElement).addClass(p.prefs.system); +if(p.prefs.system==="dev"){d("#debugOutput").val(JSON.stringify(p));d("#debugCurrentLocation").val(location.href)}P&&d("#newLink").removeClass("hidden");y.delegate("#statusAuthButton, .statusErrorButton","click",function(){v()}).delegate(".statusErrorCloseButton","click",function(){F()}).delegate(".statusResetErrorButton","click",function(){location.reload()}).delegate(".nav .close","click",F);d("#authOkButton").click(function(){a(n.domain,false,function(I){if(I){l.clear();l()}else i("statusOAuthFailed")})}); +d("#captchaButton").click(function(){v();E.removeClass("hidden");n.HumanVerification=d("#captcha").attr("value");n.HumanVerificationImage=d("#captchaImage").attr("src");D()});l.onChange();if(o.type==="memory")i("statusEnableLocalStorage");else{l(function(I){S=I;G=false;aa(S);G=true;if(R=T()){d("."+R.slice(1)+"Tab").addClass("ui-tabs-selected ui-state-active");H=d(R);H.removeClass("ui-tabs-hide");Y(null,{panel:H[0]});B=d("#tabs");B.tabs({fx:{opacity:"toggle",duration:100}});B.bind("tabsselect",Y); +B.removeClass("invisible");y.removeClass("loading");V()}else i("statusSettings")},function(I,Q,U){I.status===503?i("statusServerBusyClose"):i("statusServerError",U)});for(N in s.domains)s.domains.hasOwnProperty(N)&&s.domains[N].setFormData(p);if(u)u=JSON.parse(u);p.title&&d(".title").text(p.title);p.description&&d(".description").text(p.description);if(p.previews&&p.previews.length){u=C(p.previews[0]);q.attr("src",u)}else p.thumbnail&&q.attr("src",C(p.thumbnail));d(".title").textOverflow(null,true); +d(".description").textOverflow(null,true);d(".url").textOverflow(null,true);d(".surl").textOverflow(null,true);d("form.messageForm").submit(function(I){I=I.target;var Q,U,$;n={};d.each(I.elements,function(W,X){W=X.value.trim();if(X.getAttribute("placeholder")===W)W="";X.value=W;if(X.value)n[X.name]=X.value});I=s.domains[n.domain];if(p.shortUrl)n.shorturl=p.shortUrl;else if(I.shorten)n.shorten=true;if(n.to){Q=I.getContacts(L);$=[];if(Q){I=n.to.split(",");I.forEach(function(W){if((U=Q[W.trim()])&&!U.email)$.push(U.userid? +U.userid:U.username)})}if($.length>0)n.to=$.join(", ")}D();return false}).each(function(I,Q){h(Q)})}})}); \ No newline at end of file diff --git a/web/0.3.4/share/panel/build.js b/web/0.3.4/share/panel/build.js new file mode 100644 index 0000000..83b8c28 --- /dev/null +++ b/web/0.3.4/share/panel/build.js @@ -0,0 +1,12 @@ +({ + baseUrl: "../../scripts/", + paths: { + "index": "../share/panel/index", + "jquery": "jqueryStub", + "widgets": "../share/panel/scripts/widgets" + }, + name: "index", + include: ['widgets/AccountPanelLinkedIn', 'widgets/AccountPanelFaceBook', 'ContactsEmail', 'ContactsTwitter'], + exclude: ['jquery', 'require/text'], + out: './index.js' +}) diff --git a/web/0.3.4/share/panel/i/sprite.png b/web/0.3.4/share/panel/i/sprite.png new file mode 100644 index 0000000..57c666b Binary files /dev/null and b/web/0.3.4/share/panel/i/sprite.png differ diff --git a/web/0.3.4/share/panel/i/thumb.jpg b/web/0.3.4/share/panel/i/thumb.jpg new file mode 100644 index 0000000..721d427 Binary files /dev/null and b/web/0.3.4/share/panel/i/thumb.jpg differ diff --git a/web/0.3.4/share/panel/index.html b/web/0.3.4/share/panel/index.html new file mode 100644 index 0000000..d3a005a --- /dev/null +++ b/web/0.3.4/share/panel/index.html @@ -0,0 +1,208 @@ + + + + F1: Popup + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + diff --git a/web/0.3.4/share/panel/index.js b/web/0.3.4/share/panel/index.js new file mode 100644 index 0000000..c910772 --- /dev/null +++ b/web/0.3.4/share/panel/index.js @@ -0,0 +1,540 @@ +/* + blade/func Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/object Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/jig Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/array Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/url Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details + blade/Widget Copyright (c) 2010, The Dojo Foundation All Rights Reserved. + Available via the MIT, GPL or new BSD license. + see: http://github.com/jrburke/blade for details +*/ +define("blade/fn",[],function(){var b=Array.prototype.slice,c=Object.prototype.toString;return{is:function(f){return c.call(f)==="[object Function]"},bind:function(f,d){if(!d)return f;if(typeof d==="string")d=f[d];var e=b.call(arguments,2);return function(){return d.apply(f,e.concat(b.call(arguments,0)))}}}}); +define("blade/object",["./fn"],function(b){function c(){}var f={},d=function(e,a,g){e=e||{};var h,i=d.create(e.prototype,a);e=function(j,l,o){return i[l].apply(j,o)};a=d.create(i);d.mixin(a,b.is(g)?g(e):g,true);h=function(){if(!(this instanceof h))throw new Error('blade/object: constructor function called without "new" in front');this.init&&this.init.apply(this,arguments)};h.prototype=a;return h};d.create=function(e,a){c.prototype=e;e=new c;var g,h;c.prototype=null;if(a)for(g=0;h=a[g];g++)d.mixin(e, +h);return e};d.mixin=function(e,a,g){for(var h in a)if(!(h in f)&&(!(h in e)||g))e[h]=a[h]};return d}); +define("blade/jig",["require","./object"],function(b,c){function f(r){return k.call(r)==="[object Array]"}function d(r,w,y){w=w;var z,F;for(z=0;w&&(F=r[z]);z++)w=typeof w==="object"&&F in w?w[F]:y&&z===0&&F in y?y[F]:undefined;return w}function e(r){return r?parseInt(r,10):0}function a(r,w,y){var z=/\[([\w0-9\.'":]+)\]/,F=r,E=w,C=true,H,B;if(r===u)return w;if(s.test(r))return e(r);if(r==="")return"";H=r.charAt(0);if(H==="'"||H==="'")return r.substring(1,r.length-1);if((H=r.indexOf("("))!==-1){z=r.lastIndexOf(")"); +C=r.substring(0,H);F=y.fn[C];if(!F){o.error("Cannot find function named: "+C+" for "+r);return""}C=r.substring(H+1,z);if(C.indexOf(",")!==-1){C=C.split(",");for(E=C.length-1;E>=0;E--)C[E]=a(C[E],w,y);F=F.apply(null,C)}else F=F(a(C,w,y));if(z";else{C=F.charAt(0);B=F}}if(C&&!w.propertyRegExp.test(C))B=B.substring(1).trim();else C="_default_";if(F=B.indexOf(w.rawHtmlToken)===0)B=B.substring(w.rawHtmlToken.length,B.length);if(C===q)F=true;B=B.split(w.argSeparator);S=B[B.length-1];L=S.charAt(S.length-1);P=null;if(C==="]"){if(L!=="["){y.templateEnd=z;y.endControl=true}else y.templateEnd=z-H[0].length;return y}else if(L==="["){E||(E=K++);B[B.length-1]=S.substring(0,S.length- +1);P=h(r.substring(z),w);z+=P.templateEnd}if(C==="+")w.templates[B[0]]=P;else if(C!=="/"){if(B.length>1)for(H=B.length-1;H>=0;H--)if(B[H].charAt(B[H].length-1)===","){B[H]+=B[H+1];B.splice(H+1,1)}y.push({action:w.commands[C].action,useRawHtml:F,args:B,controlId:E,children:P})}if(P&&P.endControl)E=0}else{y.push(z);return y}}z!==r.length-1&&y.push(r.substring(z,r.length));return y}function i(r,w){var y,z=r.id;y=w.templates||A;if(y[z])return y[z];w.onBeforeParse&&w.onBeforeParse(r);if(r.nodeName.toUpperCase()=== +"SCRIPT"){y=r.text.trim();r.parentNode&&r.parentNode.removeChild(r)}else{V.appendChild(r);r.removeAttribute("id");(y=(r.getAttribute("class")||"").trim())&&r.setAttribute("class",y.replace(X,"$1$3"));y=V.innerHTML.replace(/%7B/g,"{").replace(/%7D/g,"}");V.removeChild(r)}r=o.compile(y,w);o.cache(z,r,w);return r}function j(r,w,y){var z="",F,E,C,H,B;if(typeof r==="string")z=r;else if(f(r))for(F=0;Fw},gte:function(r,w){return r>=w},lt:function(r,w){return rF.prop?1:-1})}},I=1,K=1,M={},V=typeof document!=="undefined"&&document.createElement?document.createElement("div"):null,X=/(\s*)(template)(\s*)/;m={_default_:{doc:"Property reference",action:function(r,w,y,z,F){var E=r[0]?a(r[0],w,y):w,C=r[1]?a(r[1],w,y):undefined,H="";if(r[1]){C=E===C;E=w}else C=E;if(C===false||C===null||C===undefined||f(C)&&!C.length)return"";else if(z)if(f(E))for(r=0;r1?r[1]:u,w,y);return F(z,w,y)}},".":{doc:"Variable declaration",action:function(r,w,y){y.context[r[0]]=a(r[1],w,y);return""}},">":{doc:"Else",action:function(r,w,y,z,F){if(z)return F(z,w,y);return""}}};o=function(r,w,y){if(typeof r==="string")if(r.charAt(0)=== +"#"){r=r.substring(1,r.length);r=g(r,y)}else r=o.compile(r,y);return o.render(r,w,y)};o.htmlEscape=function(r){return r.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};o.compile=function(r,w){w=w||{};c.mixin(w,{startToken:"{",endToken:"}",rawHtmlToken:"^",propertyRegExp:p,commands:m,argSeparator:" ",templates:A});w.endRegExp=/[^\r\n]*?}/;K=1;return h(r,w)};o.parse=function(r,w){if(r&&!r.length){w=r;r=null}w=w||{};r=r||document.querySelectorAll('.template, script[type="text/template"]'); +var y,z;for(z=r.length-1;z>-1&&(y=r[z]);z--)i(y,w)};o.render=function(r,w,y){var z,F="";y=y||{};c.mixin(y,{templates:A,attachData:false,strict:o.strict});if(y.fn)c.mixin(y.fn,D);else y.fn=D;y.context=y.context||c.create(w);if(f(w)){for(z=0;z=365&&d<730){e.additional=c.toLocaleDateString(); +e.friendly="a year ago";return e}if(d>=365){e.additional=c.toLocaleDateString();e.friendly=Math.ceil(d/365)+" years ago";return e}return e},name:function(c){c=c.split(" ")[0];if(c.indexOf("@")!==-1)c=c.split("@")[0];c=c.replace(" ","");c=c.replace("'","");return c=c.replace('"',"")}};return b}); +define("isoDate",[],function(){var b=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+\-](\d{2}):(\d{2}))|Z)?)?$/,c=function(f,d){var e=b.exec(f);f=null;var a,g;if(e){e.shift();e[1]&&e[1]--;if(e[6])e[6]*=1E3;if(d){d=new Date(d);["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"].map(function(h){return d["get"+h]()}).forEach(function(h,i){e[i]=e[i]||h})}f=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0);if(e[0]<100)f.setFullYear(e[0]|| +1970);a=0;g=e[7]&&e[7].charAt(0);if(g!=="Z"){a=(e[8]||0)*60+(Number(e[9])||0);if(g!=="-")a*=-1}if(g)a-=f.getTimezoneOffset();a&&f.setTime(f.getTime()+a*6E4)}return f};c.toIsoString=function(f,d){var e=function(i){return i<10?"0"+i:i},a,g,h;d=d||{};a=[];g=d.zulu?"getUTC":"get";h="";if(d.selector!=="time"){h=f[g+"FullYear"]();h=["0000".substr((h+"").length)+h,e(f[g+"Month"]()+1),e(f[g+"Date"]())].join("-")}a.push(h);if(d.selector!=="date"){h=[e(f[g+"Hours"]()),e(f[g+"Minutes"]()),e(f[g+"Seconds"]())].join(":"); +g=f[g+"Milliseconds"]();if(d.milliseconds)h+="."+(g<100?"0":"")+e(g);if(d.zulu)h+="Z";else if(d.selector!=="time"){f=f.getTimezoneOffset();d=Math.abs(f);h+=(f>0?"-":"+")+e(Math.floor(d/60))+":"+e(d%60)}a.push(h)}return a.join("T")};return c});var EXPORTED_SYMBOLS=["hex_md5"],hexcase=0,b64pad="";function hex_md5(b){return rstr2hex(rstr_md5(str2rstr_utf8(b)))}function b64_md5(b){return rstr2b64(rstr_md5(str2rstr_utf8(b)))}function any_md5(b,c){return rstr2any(rstr_md5(str2rstr_utf8(b)),c)} +function hex_hmac_md5(b,c){return rstr2hex(rstr_hmac_md5(str2rstr_utf8(b),str2rstr_utf8(c)))}function b64_hmac_md5(b,c){return rstr2b64(rstr_hmac_md5(str2rstr_utf8(b),str2rstr_utf8(c)))}function any_hmac_md5(b,c,f){return rstr2any(rstr_hmac_md5(str2rstr_utf8(b),str2rstr_utf8(c)),f)}function md5_vm_test(){return hex_md5("abc").toLowerCase()=="900150983cd24fb0d6963f7d28e17f72"}function rstr_md5(b){return binl2rstr(binl_md5(rstr2binl(b),b.length*8))} +function rstr_hmac_md5(b,c){var f=rstr2binl(b);if(f.length>16)f=binl_md5(f,b.length*8);var d=Array(16);b=Array(16);for(var e=0;e<16;e++){d[e]=f[e]^909522486;b[e]=f[e]^1549556828}c=binl_md5(d.concat(rstr2binl(c)),512+c.length*8);return binl2rstr(binl_md5(b.concat(c),640))}function rstr2hex(b){for(var c=hexcase?"0123456789ABCDEF":"0123456789abcdef",f="",d,e=0;e>>4&15)+c.charAt(d&15)}return f} +function rstr2b64(b){for(var c="",f=b.length,d=0;db.length*8?b64pad:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>>6*(3-a)&63);return c} +function rstr2any(b,c){var f=c.length,d,e,a,g,h,i=Array(Math.ceil(b.length/2));for(d=0;d0||a>0)h[h.length]=a}b[e]=g;i=h}f="";for(d=b.length-1;d>=0;d--)f+=c.charAt(b[d]);return f} +function str2rstr_utf8(b){for(var c="",f=-1,d,e;++f>>6&31,128|d&63);else if(d<=65535)c+=String.fromCharCode(224|d>>>12&15,128|d>>>6&63,128|d&63);else if(d<=2097151)c+=String.fromCharCode(240|d>>>18&7,128|d>>>12&63,128|d>>>6&63,128|d&63)}return c} +function str2rstr_utf16le(b){for(var c="",f=0;f>>8&255);return c}function str2rstr_utf16be(b){for(var c="",f=0;f>>8&255,b.charCodeAt(f)&255);return c}function rstr2binl(b){for(var c=Array(b.length>>2),f=0;f>5]|=(b.charCodeAt(f/8)&255)<>5]>>>f%32&255);return c} +function binl_md5(b,c){b[c>>5]|=128<>>9<<4)+14]=c;c=1732584193;for(var f=-271733879,d=-1732584194,e=271733878,a=0;a>16)+(c>>16)+(f>>16)<<16|f&65535}function bit_rol(b,c){return b<>>32-c}define("md5",function(){}); +define("rdapi",["require","jquery","blade/object","blade/jig","friendly","isoDate","md5"],function(b,c,f,d,e,a){function g(p){if(typeof p==="string")p={template:p};else if(p.templateId)p.template=d.cache(p.templateId);if(!("attachData"in p))p.attachData=l.attachTemplateData;if(p.emptyTemplateId)p.emptyTemplate=d.cache(p.emptyTemplateId);return p}function h(){var p=m.exec(document.cookie);return p&&p[1]?p[1]:null}function i(p,u){u.url=q.baseUrl+q.apiPath+p;f.mixin(u,{limit:30,message_limit:3,dataType:"json", +error:function(x,A,D){throw D;}});var v=u.success,s=h();u.success=function(x){x&&x.contacts&&f.mixin(k,x.contacts,true);return v?v.apply(null,arguments):x};if(s)u.beforeSend=function(x){x.setRequestHeader(o,s)};c.ajax(u)}function j(p,u){var v=u.forId?document.getElementById(u.forId):null;if(v)v.innerHTML=p;u.onTemplateDone&&u.onTemplateDone(p);c(document).trigger("rdapi-done",v)}var l,o="X-CSRF",m=/csrf=([^\; ]+)/,k={},n={contact:function(p){return p.iid&&p.domain?k[p.iid]||{}:p},contactPhotoUrl:function(p){var u= +"i/face2.png",v,s;p=n.contact(p);if((v=p.photos)&&v.length){u=v[0].value;v.forEach(function(x){if(x.primary)u=x.value})}else if(p.emails&&p.emails.length){s=p.emails[0].value;p.emails.forEach(function(x){if(x.primary)s=x.value});u="http://www.gravatar.com/avatar/"+hex_md5(s)+"?s=24 &d=identicon"}return u},allMessages:function(p){return[p.topic].concat(p.messages||[])},friendlyDate:function(p){return e.date(a(p)).friendly},htmlBody:function(p){return d.htmlEscape(p).replace(/\n/g,"
      ")}},q={baseUrl:"/", +apiPath:"api/",saveTemplateData:true};d.addFn(n);l=function(p,u){u=g(u);f.mixin(u,{success:function(v){var s=u.template,x=u.emptyTemplate,A="";if(u.forId&&s){if(u.prop)v=d.getObject(u.prop,v,u);if(b.isArray(v))if(v.length)v.forEach(function(D){A+=d(s,D,u)});else A+=d(x,v,u);else A+=d(!v?x:s,v,u);j(A,u)}},error:function(v,s,x){if(u.emptyTemplate){v=d(u.emptyTemplate,x,u);j(v,u)}else throw x;}});i(p,u)};l.contactPhotoUrl=n.contactPhotoUrl;l.attachTemplateData=false;b.ready(function(){var p=[];d.parse({onBeforeParse:function(u){var v= +u.id,s=u.getAttribute("data-rdapi"),x=u.getAttribute("data-rdfor"),A=u.getAttribute("data-rdprop");s&&p.push({templateId:v,api:s,forId:x,prop:A});["data-rdapi","data-rdprop","data-rdfor"].forEach(function(D){u.removeAttribute(D)})}});p.forEach(function(u){l(u.api,u)})});return l});define("storage",[],function(){function b(){return c}var c=localStorage,f="localStorage";try{c.tempVar="temp";delete c.tempVar}catch(d){c={};f="memory"}b.type=f;return b}); +define("dispatch",["jquery"],function(){var b=location.protocol+"//"+location.host;return{sub:function(c,f,d,e){d=d||window;e=e||b;var a=function(g){if(g.origin===e||g.origin==="chrome://browser")try{var h=JSON.parse(g.data),i=h.topic;i&&i===c&&f(h.data)}catch(j){}};d.addEventListener("message",a,false);return a},unsub:function(c,f){f=f||window;f.removeEventListener("message",c,false)},pub:function(c,f,d){d=d||window;d.postMessage(JSON.stringify({topic:c,data:f}),b)}}}); +define("services",["blade/object","storage"],function(b,c){function f(h,i){if(h){this.name=h;this.type=h.replace(/\s/g,"").toLowerCase();this.tabName=this.type+"Tab";this.icon="i/"+this.type+"Icon.png";this.features={counter:false,direct:false,subject:false};b.mixin(this,i,true)}}function d(){f.constructor.apply(this,arguments);this.features.direct=true;this.features.subject=true}var e=parseFloat(navigator.userAgent.split("Firefox/")[1])>=4;c=c();var a,g;f.constructor=f;f.prototype={clearCache:function(h){delete h[this.type+ +"Contacts"]},getContacts:function(h){if(h[this.type+"Contacts"])return JSON.parse(h[this.type+"Contacts"]);return null},setContacts:function(h,i){h[this.type+"Contacts"]=JSON.stringify(i)},get36FormattedContacts:function(){return null}};d.prototype=new f;d.constructor=d;d.prototype.validate=function(h){if(!h.to||!h.to.trim())return false;return true};d.prototype.get36FormattedContacts=function(h){var i=[];h.forEach(function(j){j.emails&&j.emails.length&&j.emails.forEach(function(l){i.push({displayName:j.displayName? +j.displayName:l.value,email:l.value})})});return i};d.prototype.overlays={Contacts:"ContactsEmail"};a={domains:{"twitter.com":new f("Twitter",{features:{direct:true,subject:false,counter:true},shareTypes:[{type:"public",name:"public"},{type:"direct",name:"direct message",showTo:true,toLabel:"type in name of recipient"}],textLimit:140,shorten:true,serviceUrl:"http://twitter.com",revokeUrl:"http://twitter.com/settings/connections",signOutUrl:"http://twitter.com/logout",accountLink:function(h){return"http://twitter.com/"+ +h.username},forceLogin:{name:"force_login",value:true},overlays:{Contacts:"ContactsTwitter"}}),"facebook.com":new f("Facebook",{features:{direct:true,subject:false,counter:true,medium:true},shareTypes:[{type:"wall",name:"my wall"},{type:"groupWall",name:"group wall",showTo:true,toLabel:"type in the name of the group"}],textLimit:420,serviceUrl:"http://facebook.com",revokeUrl:"http://www.facebook.com/editapps.php?v=allowed",signOutUrl:"http://facebook.com",accountLink:function(h){return"http://www.facebook.com/profile.php?id="+ +h.userid},overlays:{"widgets/AccountPanel":"widgets/AccountPanelFaceBook"}}),"google.com":new d("Gmail",{shareTypes:[{type:"direct",name:"direct",showTo:true}],serviceUrl:"https://mail.google.com",revokeUrl:"https://www.google.com/accounts/IssuedAuthSubTokens",signOutUrl:"http://google.com/preferences",accountLink:function(h){return"http://google.com/profiles/"+h.username},forceLogin:{name:"pape_max_auth_age",value:0}}),"googleapps.com":new d("Google Apps",{shareTypes:[{type:"direct",name:"direct", +showTo:true}],icon:"i/gmailIcon.png",serviceUrl:"https://mail.google.com",revokeUrl:"https://www.google.com/accounts/IssuedAuthSubTokens",signOutUrl:"http://google.com/preferences",accountLink:function(h){return"http://google.com/profiles/"+h.username},forceLogin:{name:"pape_max_auth_age",value:0}}),"yahoo.com":new d("Yahoo",{shareTypes:[{type:"direct",name:"direct",showTo:true}],name:"Yahoo!",serviceUrl:"http://mail.yahoo.com",revokeUrl:"https://api.login.yahoo.com/WSLogin/V1/unlink",signOutUrl:"https://login.yahoo.com/config/login?logout=1", +accountLink:function(h){return"http://profiles.yahoo.com/"+h.username}}),"linkedin.com":new f("LinkedIn",{isNew:true,features:{direct:true,subject:true,counter:false},shareTypes:[{type:"public",name:"anyone"},{type:"myConnections",name:"connections only",specialTo:"connections-only"},{type:"contact",name:"send message",showTo:true,toLabel:"type in the name of the contact"}],serviceUrl:"http://linkedin.com",revokeUrl:"http://linkedin.com/settings/connections",signOutUrl:"https://www.linkedin.com/secure/login?session_full_logout=&trk=hb_signout", +accountLink:function(h){return"http://linkedin.com/"+h.username},overlays:{"widgets/AccountPanel":"widgets/AccountPanelLinkedIn"}})},domainList:[],svcBaseProto:f.prototype};for(g in a.domains)if(a.domains.hasOwnProperty(g)){a.domainList.push(g);if(e){delete c[a.domains[g].type+"Contacts"];delete c.contactsModelVersion}}return a}); +define("accounts",["storage","dispatch","rdapi","services"],function(b,c,f,d){function e(l,o,m,k){return l.domain===o&&(m&&l.userid===m||k&&l.username===k)}function a(l){if(l)l=JSON.parse(l);return l}function g(l,o){return j.accounts(l,o)}function h(){location.reload()}var i=b(),j;j={localStorage:{accounts:function(l,o){var m=a(i.accountCache)||[],k=a(i.serviceCache);if(k){k=k||[];l&&l(m,k)}else j.fetch(l,o)},update:function(l){var o=a(i.accountCache)||[],m=a(i.serviceCache),k=false,n,q,p;n=l.profile; +for(q=0;qd+4E3){d=h;e=g+"?domain="+e+(a?"&forceLogin=1":"");try{f=window.open(e,"ffshareOAuth", +"dialog=yes, modal=yes, width=900, height=500, scrollbars=yes");f.focus()}catch(i){window.location=e+"&end_point_success="+encodeURI(window.location)}}else f&&f.focus()}});define("blade/array",[],function(){var b=Object.prototype.toString,c=Array.prototype.slice;return{is:function(f){return b.call(f)==="[object Array]"},to:function(){return[].concat(c.call(arguments,0))}}}); +define("blade/url",["./array"],function(b){var c=Object.prototype.toString;return{objectToQuery:function(f){var d=encodeURIComponent,e=[],a={},g,h,i,j;for(g in f)if(f.hasOwnProperty(g)){h=f[g];if(h!==a[g]){i=d(g)+"=";if(b.is(h))for(j=0;jNo matches.
      \n'}); +define("AutoComplete",["jquery","blade/object","blade/fn","module","dispatch","text!AutoCompleteRefresh.html"],function(b,c,f,d,e,a){function g(i){return i.split(/,\s*/)}function h(i){return g(i).pop()}return c(null,null,{className:d.id.replace("/","-"),refreshShowing:false,askRefresh:true,init:function(i,j){this.dom=b(i);this.attachedWidget=false;this.acOptions=[];j.notify(f.bind(this,this.attachAutoComplete));this.contactService=j;e.sub("optionsChanged",f.bind(this,function(){this.askRefresh=true}))}, +attachAutoComplete:function(i,j){j=j||[];this.acOptions=[];j.forEach(f.bind(this,function(l){this.acOptions.push(i.formatContact(l))}));if(!this.attachedWidget){this.attachedWidget=true;this.dom.bind("keydown",f.bind(this,function(l){if(l.keyCode===b.ui.keyCode.ENTER)l.preventDefault();else if(l.keyCode===b.ui.keyCode.TAB){if(this.dom.data("autocomplete").menu.active){l.preventDefault();this.dom.autocomplete().select()}else if(this.open){var o=this.dom.autocomplete("widget").find("li");this.dom.data("autocomplete").menu.active= +o;this.dom.autocomplete().select();l.preventDefault()}this.refreshShowing&&this.hideRefresh()}else if(l.keyCode===b.ui.keyCode.DOWN&&this.refreshShowing){l.preventDefault();this.focusingOnRefresh=true;this.refreshDom.find("button").focus()}else if(l.keyCode===b.ui.keyCode.ESCAPE&&this.refreshShowing){this.askRefresh=false;this.hideRefresh()}})).bind("blur",f.bind(this,function(){this.refreshShowing&&!this.focusingOnRefresh&&setTimeout(f.bind(this,function(){this.hideRefresh();this.focusingOnRefresh= +false}),500)})).autocomplete({minLength:0,source:f.bind(this,function(l,o){this.filtered=b.ui.autocomplete.filter(this.acOptions,h(l.term));if(!this.filtered.length&&this.askRefresh)setTimeout(f.bind(this,this.showRefresh),0);else this.refreshShowing&&this.hideRefresh();o(this.filtered)}),focus:function(){return false},select:function(l,o){l=g(this.value);l.pop();l.push(o.item.value);l.push("");this.value=l.join(", ");return false},open:f.bind(this,function(){this.relatedWidth||this.determineRelatedWidth(); +this.open=true;this.dom.autocomplete("widget").width(this.relatedWidth)}),close:f.bind(this,function(){this.open=false})})}if(this.waitingSearch){this.dom.autocomplete("search",this.waitingSearch);this.dom.focus();delete this.waitingSearch;this.hideSpinner()}},determineRelatedWidth:function(){for(var i=this.dom[0];i&&(this.relatedWidth=i.getBoundingClientRect().width)<=0;)i=i.parentNode},hideRefresh:function(){this.refreshDom.hide()},showRefresh:function(){this.relatedWidth||this.determineRelatedWidth(); +if(!this.refreshDom)this.refreshDom=b(a).css({width:this.relatedWidth+"px"}).insertAfter(this.dom[0]).find("button").bind("click",f.bind(this,function(i){i.preventDefault();this.waitingSearch=this.dom.val().trim();this.showSpinner();this.askRefresh=false;this.contactService.fetch();this.hideRefresh()})).bind("blur",f.bind(this,function(){this.hideRefresh()})).end();this.refreshDom.show();this.refreshShowing=true},hideSpinner:function(){this.spinnerDom.hide()},showSpinner:function(){if(!this.spinnerDom)this.spinnerDom= +b('
      ').appendTo(this.dom[0].parentNode);this.spinnerDom.show()}})}); +define("shareOptions",["storage","blade/url"],function(b,c){function f(e){e=e||typeof location!=="undefined"&&location.href.split("#")[1]||"";if(d[e])return d[e];var a={},g=b(),h=/vimeocdn\.com\//,i=/clip_id=(\d+)/,j,l;if(e){j=c.queryToObject(e);if(j.options)a=JSON.parse(j.options)}a.prefs=a.prefs||{};if(!a.title)a.title=a.url;if(!a.prefs.system)a.prefs.system="prod";if((j=a.source)&&j.length>4E3){j="";delete a.source}if(j&&h.test(j))if(h=(h=i.exec(j))&&h[1])a.source="http://vimeo.com/moogaloop.swf?clip_id="+ +h+"&server=vimeo.com&show_title=1&show_byline=1&show_portrait=1&color=00dcdc&fullscreen=1&autoplay=0&loop=0";else delete a.source;if(a.version)g.extensionVersion=a.version;if(a.prefs)for(l in a.prefs)if(a.prefs.hasOwnProperty(l))g["prefs."+l]=a.prefs[l];return d[e]=a}var d={};return f}); +define("blade/Widget",["require","./object","./jig","module"],function(b,c,f,d){var e;b="data-"+d.id.replace(/\//g,"-")+"-"+(Math.random()+"").replace(/\d\./,"");var a=b+"-wtype",g=b+"-wid",h=0,i={};b=c(null,null,{template:null,init:function(j,l,o){c.mixin(this,j,true);this.onCreate&&this.onCreate();if(this.template){this.node=this.render();this.onRender&&this.onRender(l)}if(l&&this.node)if(o==="before")l.parentNode.insertBefore(this.node,l);else if(o==="after")l.parentNode.insertBefore(this.node, +l.nextSibling);else o==="prepend"&&l.firstChild?l.insertBefore(this.node,l.firstChild):l.appendChild(this.node)},render:function(j){var l,o;if(this.template){this.template=this.template.trim();l=j&&j.ownerDocument||document;j="id"+h++;if(!e||e.ownerDocument!==l)e=l.createElement("div");e.innerHTML=this.templatize();if(e.childNodes.length===1){l=e.removeChild(e.firstChild);l.setAttribute(g,j);l.setAttribute(a,this.moduleId)}else for(l=l.createDocumentFragment();o=e.firstChild;){l.appendChild(o);if(o.nodeType=== +1){o.setAttribute(g,j);o.setAttribute(a,this.moduleId)}}this._widgetId=j;i[j]=this}return l},templatize:function(){var j=this.template;j=f.cache(j)||f.cache(j,j,this.jigOptions);return f.render(j,this,this.jigOptions)},destroy:function(){this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node);delete this.node;delete i[this._widgetId]}});b.closest=function(j,l,o){for(var m=l.target;m;){if(m.getAttribute(a)===j)break;m=m.parentNode}if(m)(j=i[m.getAttribute(g)])&&j[o](l)};b.registry= +i;return b}); +define("widgets/jigFuncs",["blade/jig","services"],function(b,c){var f={thumb:function(d){d=d.previews&&d.previews[0];if(!d)return"";if(d.http_url)return b.htmlEscape(d.http_url);return d.base64},preview:function(d){return(d=d.previews&&d.previews[0])&&d.http_url},preview_base64:function(d){return(d=d.previews&&d.previews[0])&&f.rawBase64(d.base64)},link:function(d){return d.canonicalUrl||d.url},cleanLink:function(d){return d?d.replace(/^https?:\/\//,"").replace(/^www\./,""):d},profilePic:function(d){return d&&d[0]&& +d[0].value||"/share/i/face2.png"},serviceName:function(d){return c.domains[d].name},lastToShareType:function(d){var e,a;for(e=d.length-1;a=d[e];e--)if(a.showTo)return a;return null},rawBase64:function(d){return d&&d.replace("data:image/png;base64,","")}};b.addFn(f);return f});define("require/text!widgets/PageInfo.html",function(){return'
      \n
      \n
      \n
      \n
      \n
      \n
      {options.title}
      \n
      {options.description}
      \n {cleanLink(options.url)}\n {cleanLink(options.shortUrl)}\n
      \n
      \n
      \n'}); +(function(b){var c=document.documentElement.style,f="textOverflow"in c||"OTextOverflow"in c,d=function(e,a){var g=0,h=[],i=function(j){var l=0,o;if(!(g>a))for(l=0;lo){for(;m\n \n \n

      debug

      \n developer\n
      \n
      \n
      \n \n \n \n \n \n \n \n \n \n
      \n
      \n'}); +define("widgets/DebugPanel",["blade/object","blade/Widget","jquery","text!./DebugPanel.html"],function(b,c,f,d){return b(c,null,function(){return{template:d}})});define("require/text!widgets/AccountPanel.html",function(){return'
      \n \n \n

      {svc.name}

      \n {displayName}\n
      \n\n
      \n
      \n
      \n
      \n \n \n \n \n \n \n \n \n \n {svc.features.medium [}\n \n \n {]}\n \n
      \n
      \n {gt(svc.shareTypes.length, 1) [}\n
      \n
      \n \n
      \n {eq(svc.shareTypes.length, 2) [}\n send to {svc.shareTypes[1].name} instead?\n {]}\n
      \n {. lastType lastToShareType(svc.shareTypes)}\n \n \n
      \n
      \n {] [}\n {svc.features.direct [}\n \n {svc.features.subject [}\n \n {]}\n {]}\n {]}\n \n
      \n
      \n {svc.features.counter [}\n
      \n {]}\n
      \n \n
      \n
      \n
      \n
      \n
      \n'}); +define("TextCounter",["jquery","blade/object","blade/fn"],function(b,c,f){return c(null,null,{init:function(d,e,a){this.dom=b(d);this.domPlaceholderText=this.dom[0].getAttribute("placeholder")||"";this.countDom=b(e);this.limit=a;this.dom.bind("keyup",f.bind(this,"checkCount"));this.checkCount()},checkCount:function(){var d=this.dom[0].value;if(d.trim()===this.domPlaceholderText)d="";d=this.limit-d.length;d<0?this.countDom.addClass("TextCountOver"):this.countDom.removeClass("TextCountOver");this.countDom.text(d=== +this.limit?"":d)},updateLimit:function(d){this.limit=d;this.checkCount()},isOver:function(){return this.dom[0].value.length>this.limit}})});define("require/text!Select.html",function(){return'
      \n \n
        \n {options [}\n
      • {name}
      • \n {]}\n
      \n
      \n
      \n'});define("require/text!Select.css",function(){return'@charset "UTF-8";\n\n/* TODO: some of these styles, like text sizing/box sizing and colors/borders\n need to be set in the app that includes a Select widget. */\n.Select {\n position:relative;\n display: inline-block;\n overflow: hidden;\n padding-right: 15px;\n z-index: 100;\n border: 1px solid #A6AFB6;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) inset;\n height: 24px;\n cursor: pointer;\n background-color: white;\n}\n\n.Select.open {\n overflow: visible;\n padding-right: 0;\n border: 0;\n}\n\n.Select ul {\n list-style: none;\n z-index: 100;\n background-color: white;\n}\n\n.Select.open ul {\n position: absolute;\n border: 1px solid gray;\n}\n\n.Select li {\n display: none;\n height: 0;\n padding: 0 5px;\n white-space: nowrap;\n}\n\n.Select li.selected {\n display: block;\n height: 24px;\n line-height: 24px;\n}\n\n.Select.open li {\n display: block;\n height: 24px;\n line-height: 24px;\n padding-right: 20px;\n}\n\n.Select.open li.selected {\n /* background-color: grey; */\n}\n\n.Select.open li.selected:hover,\n.Select.open li:hover {\n color:white;\n background-color: #535F6D;\n}\n\n.Select .triangle {\n position: absolute;\n right: 0;\n top: 0;\n width: 18px;\n height: 24px;\n line-height: 24px;\n padding: 0 2px;\n z-index: 101;\n color: #A6AFB6;\n background-color: white;\n background-image: url("/share/i/sprite.png");\n background-position: center -362px;\n background-repeat: no-repeat;\n}\n\n.Select.open .triangle {\n display: none;\n}\n'}); +define("Select",["blade/object","blade/Widget","blade/array","jquery","module","text!./Select.html","text!./Select.css"],function(b,c,f,d,e,a,g){var h=e.id.replace(/\//g,"-"),i=document.createElement("style"),j;i.type="text/css";if(h!=="Select")g=g.replace(/\.Select/g,"."+h);i.textContent=g;document.getElementsByTagName("head")[0].appendChild(i);d(function(){d("body").delegate("."+h+" .triangle","click",function(l){c.closest(e.id,l,"onTriangleClick");l.preventDefault();l.stopPropagation()}).delegate("."+ +h+" li","click",function(l){c.closest(e.id,l,"onOptionClick");l.preventDefault();l.stopPropagation()});d(document).bind("click",function(){j&&j.close()})});return b(c,null,function(l){return{moduleId:e.id,className:h,template:a,onCreate:function(){if(this.value){var o,m=this.value;this.options.some(function(k,n){if(k.value===m){o=n;return true}return false});this.selectedIndex=o}else{this.selectedIndex=this.selectedIndex||0;this.value=this.options[this.selectedIndex].value}},onRender:function(){this.dom= +d(this.node);d("li",this.node).eq(this.selectedIndex).addClass("selected")},destroy:function(){delete this.dom;l(this,"destroy",arguments)},selectIndex:function(o){return this.val(this.options[o].value)},val:function(o){if(o===undefined)return d("li.selected",this.node)[0].getAttribute("data-value");else{var m,k,n;f.to.apply(null,d("li",this.dom)).some(function(q,p){if(q.getAttribute("data-value")===o){m=q;n=p}return false});this.selectedIndex=n;k=m.parentNode;this.selectedIndex=f.to.apply(null,d("li", +k)).indexOf(m);d("li",k).removeClass("selected");d(m).addClass("selected");this.close();this.dom.trigger("change");return o}},close:function(){var o=d("li.selected",this.node)[0];d("input",this.node).val(o.getAttribute("data-value"));this.dom.removeClass("open");this.node.style.width=""},open:function(){j&&j.close();this.node.style.width=this.node.getBoundingClientRect().width+"px";this.dom.addClass("open");j=this},onTriangleClick:function(){this.open()},onOptionClick:function(o){this.dom.hasClass("open")? +this.val(o.target.getAttribute("data-value")):this.open()}}})}); +define("widgets/AccountPanel",["blade/object","blade/Widget","jquery","text!./AccountPanel.html","TextCounter","storage","module","placeholder","dispatch","accounts","require","AutoComplete","rdapi","blade/fn","./jigFuncs","Select","jquery.textOverflow"],function(b,c,f,d,e,a,g,h,i,j,l,o,m,k,n,q){var p=a(),u=g.id.replace(/\//g,"-");f(function(){f("body").delegate("."+u+" form.messageForm","submit",function(v){c.closest(g.id,v,"onSubmit")}).delegate("."+u+" .shareType2","click",function(v){c.closest(g.id, +v,"selectSecondShareType");v.preventDefault()})});return b(c,null,function(v){return{moduleId:g.id,className:u,counter:null,urlSize:26,template:d,contactsName:"Contacts",strings:{shareTypeLabel:"send to"},onCreate:function(){var s=this.account.displayName,x;this.svcAccount=this.account.accounts[0];this.storeId="AccountPanel-"+this.svcAccount.domain;this.memStore={};if(x=p[this.storeId]){x=JSON.parse(x);if(this.theGameHasChanged(x)){this.clearSavedData();x=null}else this.options=b.create(this.options, +[x])}this.photo=this.account.photos&&this.account.photos[0]&&this.account.photos[0].value;if((x=this.svcAccount.username)&&x!==s)s=s+" ("+x+")";this.displayName=s;this.contactsName=this.svc.overlays&&this.svc.overlays[this.contactsName]||this.contactsName;this.optionsChangedSub=i.sub("optionsChanged",k.bind(this,function(A){this.options=A;this.optionsChanged()}));this.base64PreviewSub=i.sub("base64Preview",k.bind(this,function(A){f('[name="picture_base64"]',this.bodyNode).val(n.rawBase64(A))}));this.sendCompleteSub= +i.sub("sendComplete",k.bind(this,function(A){var D=this.svcAccount;A.to&&D.domain===A.domain&&D.userid===A.userid&&D.username===A.username&&this.contacts.incorporate(A.to)}))},destroy:function(){i.unsub(this.optionsChangedSub);i.unsub(this.base64PreviewSub);i.unsub(this.sendCompleteSub);this.select.dom.unbind("change",this.selectChangeFunc);delete this.selectChangeFunc;this.select.destroy();this.select=null;v(this,"destroy")},onRender:function(){var s,x,A;for(s=0;x=this.node.childNodes[s];s++)if(x.nodeType=== +1&&x.className.indexOf(this.className)!==-1){this.bodyNode=x;break}if(this.svc.shareTypes.length>1){this.select=new q({name:"shareType",value:this.options.shareType,options:this.svc.shareTypes.map(function(D){return{name:D.name,value:D.type}})},f(".shareTypeSelectSection",this.bodyNode)[0]);this.selectChangeFunc=k.bind(this,function(D){this.onShareTypeChange(D)});this.select.dom.bind("change",this.selectChangeFunc);this.options.shareType&&this.changeShareType(this.getShareType(this.options.shareType))}this.svc.textLimit&& +this.startCounter();h(this.bodyNode);(A=f('[name="to"]',this.bodyNode)[0])&&l([this.contactsName],k.bind(this,function(D){this.contacts=new D(this.svc,this.svcAccount);this.autoComplete=new o(A,this.contacts)}));f(".overflow",this.node).textOverflow()},theGameHasChanged:function(s){return s.link!==n.link(this.options)||s.userid!==String(this.svcAccount.userid)||s.domain!==String(this.svcAccount.domain)||s.username!==String(this.svcAccount.username)},clearSavedData:function(){this.memStore={};delete p[this.storeId]; +var s=f(this.bodyNode);s.find('[name="to"]').val("");s.find('[name="subject"]').val("");s.find('[name="message"]').val("");this.svc.textLimit&&s.find(".counter").html("");h(this.bodyNode)},saveData:function(){var s=this.getFormData();p[this.storeId]=JSON.stringify(s)},validate:function(){return!this.counter||!this.counter.isOver()},startCounter:function(){if(!this.counter)this.counter=new e(f("textarea.message",this.bodyNode),f(".counter",this.bodyNode),this.svc.textLimit-this.urlSize);this.updateCounter()}, +updateCounter:function(){this.counter.updateLimit(this.options.shortUrl?this.svc.textLimit-(this.options.shortUrl.length+1):this.svc.textLimit-this.urlSize)},optionsChanged:function(){var s=f(this.bodyNode),x=this.options,A=n.link(x),D=this.memStore[A],I;I=this.getFormData();if(I.to||I.message||I.subject)this.memStore[I.link]=I;if(D&&this.theGameHasChanged(D)){D=null;delete this.memStore[A]}if(D)x=b.create(x,[{to:D.to,subject:D.subject,message:D.message,shareType:D.shareType}]);s.find('[name="picture"]').val(n.preview(x)); +s.find('[name="picture_base64"]').val(n.preview_base64(x));s.find('[name="link"]').val(A);s.find('[name="title"]').val(x.title);s.find('[name="caption"]').val(x.caption);s.find('[name="description"]').val(x.description);s.find('[name="medium"]').val(x.medium);s.find('[name="source"]').val(x.source);if(this.select)if(x.shareType){this.select.val(x.shareType);this.changeShareType(this.getShareType(x.shareType))}else this.selectFirstShareType();s.find('[name="to"]').val(x.to);s.find('[name="subject"]').val(x.subject); +s.find('[name="message"]').val(x.message);this.counter&&this.updateCounter();h(this.bodyNode)},getFormData:function(){var s=f("form",this.bodyNode),x={};f.each(s[0].elements,function(A,D){A=D.value.trim();if(D.getAttribute("placeholder")===A)A="";D.value=A;if(D.value)x[D.name]=D.value});return x},getShareType:function(s){for(var x=0,A;A=this.svc.shareTypes[x];x++)if(A.type===s)return A;return null},selectFirstShareType:function(){this.select.selectIndex(0);this.changeShareType(this.svc.shareTypes[0])}, +selectSecondShareType:function(){this.select.selectIndex(1);this.changeShareType(this.svc.shareTypes[1])},changeShareType:function(s){var x=f(".toSection",this.bodyNode),A=f(".shareTypeSelectSection",this.bodyNode),D=f(".shareType2",this.bodyNode),I=f(".toSection input",this.bodyNode);I.val(s.specialTo?s.specialTo:"");h(I[0]);if(s.showTo){x.removeClass("hiddenImportant");A.addClass("fixedSize");D.addClass("hiddenImportant");I.focus()}else{x.addClass("hiddenImportant");A.removeClass("fixedSize");D.removeClass("hiddenImportant")}}, +onShareTypeChange:function(){this.changeShareType(this.getShareType(this.select.val()))},onSubmit:function(s){s.preventDefault();s=this.getFormData();if(this.validate(s)){if(this.options.shortUrl)s.shorturl=this.options.shortUrl;else if(this.svc.shorten)s.shorten=true;if(s.to)s.to=this.contacts.convert(s.to);i.pub("sendMessage",s)}}}})}); +define("dotCompare",[],function(){function b(c,f){c=c||"0";f=f||"0";c=c.split(".");f=f.split(".");var d,e,a,g=c.length>f.length?c.length:f.length;for(d=0;da)return 1;else if(e=0)&&b(d).is(":focusable")}}); +b(function(){var d=document.body,e=d.appendChild(e=document.createElement("div"));b.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=e.offsetHeight===100;b.support.selectstart="onselectstart"in e;d.removeChild(e).style.display="none"});b.extend(b.ui,{plugin:{add:function(d,e,a){d=b.ui[d].prototype;for(var g in a){d.plugins[g]=d.plugins[g]||[];d.plugins[g].push([e,a[g]])}},call:function(d,e,a){if((e=d.plugins[e])&&d.element[0].parentNode)for(var g=0;g0)return true;d[e]=1;a=d[e]>0;d[e]=0;return a},isOverAxis:function(d,e,a){return d>e&&d=9)&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c); +return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;c.target==this._mouseDownEvent.target&&b.data(c.target,this.widgetName+".preventClickEvent", +true);this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +(function(b){b.widget("ui.draggable",b.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(c){var f= +this.options;if(this.helper||f.disabled||b(c.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(c);if(!this.handle)return false;return true},_mouseStart:function(c){var f=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(b.ui.ddmanager)b.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top- +this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);f.containment&&this._setContainment();if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions(); +b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,f){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!f){f=this._uiHash();if(this._trigger("drag",c,f)===false){this._mouseUp({});return false}this.position=f.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis|| +this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);return false},_mouseStop:function(c){var f=false;if(b.ui.ddmanager&&!this.options.dropBehaviour)f=b.ui.ddmanager.drop(this,c);if(this.dropped){f=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!f||this.options.revert=="valid"&&f||this.options.revert===true||b.isFunction(this.options.revert)&&this.options.revert.call(this.element, +f)){var d=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",c)!==false&&d._clear()})}else this._trigger("stop",c)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var f=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== +c.target)f=true});return f},_createHelper:function(c){var f=this.options;c=b.isFunction(f.helper)?b(f.helper.apply(this.element[0],[c])):f.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(f.appendTo=="parent"?this.element[0].parentNode:f.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]|| +0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0], +this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top- +(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment== +"parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[(c.containment=="document"?0:b(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(c.containment=="document"?0:b(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(c.containment=="document"?0:b(window).scrollLeft())+b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c.containment=="document"? +0:b(window).scrollTop())+(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)&&c.containment.constructor!=Array){var f=b(c.containment)[0];if(f){c=b(c.containment).offset();var d=b(f).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(f).css("borderLeftWidth"),10)||0)+(parseInt(b(f).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(f).css("borderTopWidth"), +10)||0)+(parseInt(b(f).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(b(f).css("borderLeftWidth"),10)||0)-(parseInt(b(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(b(f).css("borderTopWidth"),10)||0)-(parseInt(b(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(c.containment.constructor== +Array)this.containment=c.containment},_convertPositionTo:function(c,f){if(!f)f=this.position;c=c=="absolute"?1:-1;var d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);return{top:f.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): +e?0:d.scrollTop())*c),left:f.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())*c)}},_generatePosition:function(c){var f=this.options,d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),a=c.pageX,g=c.pageY; +if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.leftthis.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(f.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/ +f.grid[1])*f.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?a:!(a-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(b(this).offset()).appendTo("body")})}, +stop:function(){b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(c,f){c=b(f.helper);f=b(this).data("draggable").options;if(c.css("opacity"))f._opacity=c.css("opacity");c.css("opacity",f.opacity)},stop:function(c,f){c=b(this).data("draggable").options;c._opacity&&b(f.helper).css("opacity",c._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(){var c=b(this).data("draggable");if(c.scrollParent[0]!= +document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var f=b(this).data("draggable"),d=f.options,e=false;if(f.scrollParent[0]!=document&&f.scrollParent[0].tagName!="HTML"){if(!d.axis||d.axis!="x")if(f.overflowOffset.top+f.scrollParent[0].offsetHeight-c.pageY=0;l--){var o=d.snapElements[l].left,m=o+d.snapElements[l].width,k=d.snapElements[l].top,n=k+d.snapElements[l].height;if(o-a=l&&g<=o||h>=l&&h<=o||go)&&(e>=i&&e<=j||a>=i&&a<=j||ej); +default:return false}};b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,f){var d=b.ui.ddmanager.droppables[c.options.scope]||[],e=f?f.type:null,a=(c.currentItem||c.element).find(":data(droppable)").andSelf(),g=0;a:for(;g').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=e.handles||(!b(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var a=this.handles.split(",");this.handles={};for(var g=0;g');/sw|se|ne|nw/.test(h)&&i.css({zIndex:++e.zIndex});"se"==h&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(i)}}this._renderAxis=function(j){j=j||this.element;for(var l in this.handles){if(this.handles[l].constructor== +String)this.handles[l]=b(this.handles[l],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=b(this.handles[l],this.element),m=0;m=/sw|ne|nw|se|n|s/.test(l)?o.outerHeight():o.outerWidth();o=["padding",/ne|nw|n/.test(l)?"Top":/se|sw|s/.test(l)?"Bottom":/^e$/.test(l)?"Right":"Left"].join("");j.css(o,m);this._proportionallyResize()}b(this.handles[l])}};this._renderAxis(this.element);this._handles=b(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!d.resizing){if(this.className)var j=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);d.axis=j&&j[1]?j[1]:"se"}});if(e.autoHide){this._handles.hide();b(this.element).addClass("ui-resizable-autohide").hover(function(){b(this).removeClass("ui-resizable-autohide");d._handles.show()},function(){if(!d.resizing){b(this).addClass("ui-resizable-autohide");d._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(a){b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; +if(this.elementIsWrapper){d(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement);return this},_mouseCapture:function(d){var e=false;for(var a in this.handles)if(b(this.handles[a])[0]==d.target)e=true;return!this.options.disabled&&e},_mouseStart:function(d){var e=this.options,a=this.element.position(), +g=this.element;this.resizing=true;this.documentScroll={top:b(document).scrollTop(),left:b(document).scrollLeft()};if(g.is(".ui-draggable")||/absolute/.test(g.css("position")))g.css({position:"absolute",top:a.top,left:a.left});b.browser.opera&&/relative/.test(g.css("position"))&&g.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();a=c(this.helper.css("left"));var h=c(this.helper.css("top"));if(e.containment){a+=b(e.containment).scrollLeft()||0;h+=b(e.containment).scrollTop()||0}this.offset= +this.helper.offset();this.position={left:a,top:h};this.size=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalPosition={left:a,top:h};this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()};this.originalMousePosition={left:d.pageX,top:d.pageY};this.aspectRatio=typeof e.aspectRatio=="number"?e.aspectRatio: +this.originalSize.width/this.originalSize.height||1;e=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor",e=="auto"?this.axis+"-resize":e);g.addClass("ui-resizable-resizing");this._propagate("start",d);return true},_mouseDrag:function(d){var e=this.helper,a=this.originalMousePosition,g=this._change[this.axis];if(!g)return false;a=g.apply(this,[d,d.pageX-a.left||0,d.pageY-a.top||0]);if(this._aspectRatio||d.shiftKey)a=this._updateRatio(a,d);a=this._respectSize(a,d);this._propagate("resize", +d);e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(a);this._trigger("resize",d,this.ui());return false},_mouseStop:function(d){this.resizing=false;var e=this.options;if(this._helper){var a=this._proportionallyResizeElements,g=a.length&&/textarea/i.test(a[0].nodeName);a=g&&b.ui.hasScroll(a[0],"left")?0:this.sizeDiff.height; +g={width:this.size.width-(g?0:this.sizeDiff.width),height:this.size.height-a};a=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null;var h=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;e.animate||this.element.css(b.extend(g,{top:h,left:a}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!e.animate&&this._proportionallyResize()}b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); +this._propagate("stop",d);this._helper&&this.helper.remove();return false},_updateCache:function(d){this.offset=this.helper.offset();if(f(d.left))this.position.left=d.left;if(f(d.top))this.position.top=d.top;if(f(d.height))this.size.height=d.height;if(f(d.width))this.size.width=d.width},_updateRatio:function(d){var e=this.position,a=this.size,g=this.axis;if(d.height)d.width=a.height*this.aspectRatio;else if(d.width)d.height=a.width/this.aspectRatio;if(g=="sw"){d.left=e.left+(a.width-d.width);d.top= +null}if(g=="nw"){d.top=e.top+(a.height-d.height);d.left=e.left+(a.width-d.width)}return d},_respectSize:function(d){var e=this.options,a=this.axis,g=f(d.width)&&e.maxWidth&&e.maxWidthd.width,j=f(d.height)&&e.minHeight&&e.minHeight>d.height;if(i)d.width=e.minWidth;if(j)d.height=e.minHeight;if(g)d.width=e.maxWidth;if(h)d.height=e.maxHeight;var l=this.originalPosition.left+this.originalSize.width,o=this.position.top+ +this.size.height,m=/sw|nw|w/.test(a);a=/nw|ne|n/.test(a);if(i&&m)d.left=l-e.minWidth;if(g&&m)d.left=l-e.maxWidth;if(j&&a)d.top=o-e.minHeight;if(h&&a)d.top=o-e.maxHeight;if((e=!d.width&&!d.height)&&!d.left&&d.top)d.top=null;else if(e&&!d.top&&d.left)d.left=null;return d},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var d=this.helper||this.element,e=0;e');var e=b.browser.msie&&b.browser.version<7,a=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-a+"px",top:this.elementOffset.top-a+"px",zIndex:++d.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(d, +e){return{width:this.originalSize.width+e}},w:function(d,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(d,e,a){return{top:this.originalPosition.top+a,height:this.originalSize.height-a}},s:function(d,e,a){return{height:this.originalSize.height+a}},se:function(d,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[d,e,a]))},sw:function(d,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[d,e, +a]))},ne:function(d,e,a){return b.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[d,e,a]))},nw:function(d,e,a){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[d,e,a]))}},_propagate:function(d,e){b.ui.plugin.call(this,d,[e,this.ui()]);d!="resize"&&this._trigger(d,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize, +originalPosition:this.originalPosition}}});b.extend(b.ui.resizable,{version:"1.8.7"});b.ui.plugin.add("resizable","alsoResize",{start:function(){var d=b(this).data("resizable").options,e=function(a){b(a).each(function(){var g=b(this);g.data("resizable-alsoresize",{width:parseInt(g.width(),10),height:parseInt(g.height(),10),left:parseInt(g.css("left"),10),top:parseInt(g.css("top"),10),position:g.css("position")})})};if(typeof d.alsoResize=="object"&&!d.alsoResize.parentNode)if(d.alsoResize.length){d.alsoResize= +d.alsoResize[0];e(d.alsoResize)}else b.each(d.alsoResize,function(a){e(a)});else e(d.alsoResize)},resize:function(d,e){var a=b(this).data("resizable");d=a.options;var g=a.originalSize,h=a.originalPosition,i={height:a.size.height-g.height||0,width:a.size.width-g.width||0,top:a.position.top-h.top||0,left:a.position.left-h.left||0},j=function(l,o){b(l).each(function(){var m=b(this),k=b(this).data("resizable-alsoresize"),n={},q=o&&o.length?o:m.parents(e.originalElement[0]).length?["width","height"]:["width", +"height","top","left"];b.each(q,function(p,u){if((p=(k[u]||0)+(i[u]||0))&&p>=0)n[u]=p||null});if(b.browser.opera&&/relative/.test(m.css("position"))){a._revertToRelativePosition=true;m.css({position:"absolute",top:"auto",left:"auto"})}m.css(n)})};typeof d.alsoResize=="object"&&!d.alsoResize.nodeType?b.each(d.alsoResize,function(l,o){j(l,o)}):j(d.alsoResize)},stop:function(){var d=b(this).data("resizable"),e=d.options,a=function(g){b(g).each(function(){var h=b(this);h.css({position:h.data("resizable-alsoresize").position})})}; +if(d._revertToRelativePosition){d._revertToRelativePosition=false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?b.each(e.alsoResize,function(g){a(g)}):a(e.alsoResize)}b(this).removeData("resizable-alsoresize")}});b.ui.plugin.add("resizable","animate",{stop:function(d){var e=b(this).data("resizable"),a=e.options,g=e._proportionallyResizeElements,h=g.length&&/textarea/i.test(g[0].nodeName),i=h&&b.ui.hasScroll(g[0],"left")?0:e.sizeDiff.height;h={width:e.size.width-(h?0:e.sizeDiff.width),height:e.size.height- +i};i=parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left)||null;var j=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(b.extend(h,j&&i?{top:j,left:i}:{}),{duration:a.animateDuration,easing:a.animateEasing,step:function(){var l={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};g&&g.length&&b(g[0]).css({width:l.width, +height:l.height});e._updateCache(l);e._propagate("resize",d)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var d=b(this).data("resizable"),e=d.element,a=d.options.containment;if(e=a instanceof b?a.get(0):/parent/.test(a)?e.parent().get(0):a){d.containerElement=b(e);if(/document/.test(a)||a==document){d.containerOffset={left:0,top:0};d.containerPosition={left:0,top:0};d.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}}else{var g= +b(e),h=[];b(["Top","Right","Left","Bottom"]).each(function(l,o){h[l]=c(g.css("padding"+o))});d.containerOffset=g.offset();d.containerPosition=g.position();d.containerSize={height:g.innerHeight()-h[3],width:g.innerWidth()-h[1]};a=d.containerOffset;var i=d.containerSize.height,j=d.containerSize.width;j=b.ui.hasScroll(e,"left")?e.scrollWidth:j;i=b.ui.hasScroll(e)?e.scrollHeight:i;d.parentData={element:e,left:a.left,top:a.top,width:j,height:i}}}},resize:function(d){var e=b(this).data("resizable"),a=e.options, +g=e.containerOffset,h=e.position;d=e._aspectRatio||d.shiftKey;var i={top:0,left:0},j=e.containerElement;if(j[0]!=document&&/static/.test(j.css("position")))i=g;if(h.left<(e._helper?g.left:0)){e.size.width+=e._helper?e.position.left-g.left:e.position.left-i.left;if(d)e.size.height=e.size.width/a.aspectRatio;e.position.left=a.helper?g.left:0}if(h.top<(e._helper?g.top:0)){e.size.height+=e._helper?e.position.top-g.top:e.position.top;if(d)e.size.width=e.size.height*a.aspectRatio;e.position.top=e._helper? +g.top:0}e.offset.left=e.parentData.left+e.position.left;e.offset.top=e.parentData.top+e.position.top;a=Math.abs((e._helper?e.offset.left-i.left:e.offset.left-i.left)+e.sizeDiff.width);g=Math.abs((e._helper?e.offset.top-i.top:e.offset.top-g.top)+e.sizeDiff.height);h=e.containerElement.get(0)==e.element.parent().get(0);i=/relative|absolute/.test(e.containerElement.css("position"));if(h&&i)a-=e.parentData.left;if(a+e.size.width>=e.parentData.width){e.size.width=e.parentData.width-a;if(d)e.size.height= +e.size.width/e.aspectRatio}if(g+e.size.height>=e.parentData.height){e.size.height=e.parentData.height-g;if(d)e.size.width=e.size.height*e.aspectRatio}},stop:function(){var d=b(this).data("resizable"),e=d.options,a=d.containerOffset,g=d.containerPosition,h=d.containerElement,i=b(d.helper),j=i.offset(),l=i.outerWidth()-d.sizeDiff.width;i=i.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(h.css("position"))&&b(this).css({left:j.left-g.left-a.left,width:l,height:i});d._helper&&!e.animate&& +/static/.test(h.css("position"))&&b(this).css({left:j.left-g.left-a.left,width:l,height:i})}});b.ui.plugin.add("resizable","ghost",{start:function(){var d=b(this).data("resizable"),e=d.options,a=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:a.height,width:a.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");d.ghost.appendTo(d.helper)},resize:function(){var d=b(this).data("resizable"); +d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(){var d=b(this).data("resizable");d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}});b.ui.plugin.add("resizable","grid",{resize:function(){var d=b(this).data("resizable"),e=d.options,a=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var j=Math.round((a.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1);e=Math.round((a.height-g.height)/ +(e.grid[1]||1))*(e.grid[1]||1);if(/^(se|s|e)$/.test(i)){d.size.width=g.width+j;d.size.height=g.height+e}else if(/^(ne)$/.test(i)){d.size.width=g.width+j;d.size.height=g.height+e;d.position.top=h.top-e}else{if(/^(sw)$/.test(i)){d.size.width=g.width+j;d.size.height=g.height+e}else{d.size.width=g.width+j;d.size.height=g.height+e;d.position.top=h.top-e}d.position.left=h.left-j}}});var c=function(d){return parseInt(d,10)||0},f=function(d){return!isNaN(parseInt(d,10))}})(jQuery); +(function(b){b.widget("ui.selectable",b.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=b(c.options.filter,c.element[0]);f.each(function(){var d=b(this),e=d.offset();b.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), +selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=b("
      ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, +c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=b(d.filter,this.element[0]);this._trigger("start",c);b(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=b.data(this,"selectable-item");e.startselected=true;if(!c.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;f._trigger("unselecting", +c,{unselecting:e.element})}});b(c.target).parents().andSelf().each(function(){var e=b.data(this,"selectable-item");if(e){var a=!c.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(a?"ui-unselecting":"ui-selected").addClass(a?"ui-selecting":"ui-unselecting");e.unselecting=!a;e.selecting=a;(e.selected=a)?f._trigger("selecting",c,{selecting:e.element}):f._trigger("unselecting",c,{unselecting:e.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= +this.options,e=this.opos[0],a=this.opos[1],g=c.pageX,h=c.pageY;if(e>g){var i=g;g=e;e=i}if(a>h){i=h;h=a;a=i}this.helper.css({left:e,top:a,width:g-e,height:h-a});this.selectees.each(function(){var j=b.data(this,"selectable-item");if(!(!j||j.element==f.element[0])){var l=false;if(d.tolerance=="touch")l=!(j.left>g||j.righth||j.bottome&&j.righta&&j.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable"); +this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--)this.items[c].item.removeData("sortable-item");return this},_setOption:function(c,f){if(c==="disabled"){this.options[c]=f;this.widget()[f?"addClass":"removeClass"]("ui-sortable-disabled")}else b.Widget.prototype._setOption.apply(this, +arguments)},_mouseCapture:function(c,f){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(c);var d=null,e=this;b(c.target).parents().each(function(){if(b.data(this,"sortable-item")==e){d=b(this);return false}});if(b.data(c.target,"sortable-item")==e)d=b(c.target);if(!d)return false;if(this.options.handle&&!f){var a=false;b(this.options.handle,d).find("*").andSelf().each(function(){if(this==c.target)a=true});if(!a)return false}this.currentItem= +d;this._removeCurrentsFromItems();return true},_mouseStart:function(c,f,d){f=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(c);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");b.extend(this.offset, +{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();f.containment&&this._setContainment(); +if(f.cursor){if(b("body").css("cursor"))this._storedCursor=b("body").css("cursor");b("body").css("cursor",f.cursor)}if(f.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",f.opacity)}if(f.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",f.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start", +c,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(d=this.containers.length-1;d>=0;d--)this.containers[d]._trigger("activate",c,this._uiHash(this));if(b.ui.ddmanager)b.ui.ddmanager.current=this;b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(c);return true},_mouseDrag:function(c){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute"); +if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var f=this.options,d=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY=0;f--){d=this.items[f];var e=d.item[0],a=this._intersectsWithPointer(d);if(a)if(e!=this.currentItem[0]&&this.placeholder[a==1?"next":"prev"]()[0]!=e&&!b.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!b.ui.contains(this.element[0],e):true)){this.direction=a==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(d))this._rearrange(c, +d);else break;this._trigger("change",c,this._uiHash());break}}this._contactContainers(c);b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);this._trigger("sort",c,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,f){if(c){b.ui.ddmanager&&!this.options.dropBehaviour&&b.ui.ddmanager.drop(this,c);if(this.options.revert){var d=this;f=d.placeholder.offset();d.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]== +document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(c)})}else this._clear(c,f);return false}},cancel:function(){if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate", +null,this._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,this._uiHash(this));this.containers[c].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?b(this.domPosition.prev).after(this.currentItem): +b(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(c){var f=this._getItemsAsjQuery(c&&c.connected),d=[];c=c||{};b(f).each(function(){var e=(b(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[-=_](.+)/);if(e)d.push((c.key||e[1]+"[]")+"="+(c.key&&c.expression?e[1]:e[2]))});!d.length&&c.key&&d.push(c.key+"=");return d.join("&")},toArray:function(c){var f=this._getItemsAsjQuery(c&&c.connected),d=[];c=c||{};f.each(function(){d.push(b(c.item||this).attr(c.attribute|| +"id")||"")});return d},_intersectsWith:function(c){var f=this.positionAbs.left,d=f+this.helperProportions.width,e=this.positionAbs.top,a=e+this.helperProportions.height,g=c.left,h=g+c.width,i=c.top,j=i+c.height,l=this.offset.click.top,o=this.offset.click.left;l=e+l>i&&e+lg&&f+oc[this.floating?"width":"height"]?l:g0?"down":"up")}, +_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var f=[],d=[],e=this._connectWith();if(e&&c)for(c=e.length-1;c>=0;c--)for(var a=b(e[c]),g=a.length-1;g>=0;g--){var h=b.data(a[g],"sortable");if(h&&h!= +this&&!h.options.disabled)d.push([b.isFunction(h.options.items)?h.options.items.call(h.element):b(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}d.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(c=d.length-1;c>=0;c--)d[c][0].each(function(){f.push(this)});return b(f)},_removeCurrentsFromItems:function(){for(var c= +this.currentItem.find(":data(sortable-item)"),f=0;f=0;a--)for(var g=b(e[a]),h=g.length-1;h>=0;h--){var i=b.data(g[h],"sortable"); +if(i&&i!=this&&!i.options.disabled){d.push([b.isFunction(i.options.items)?i.options.items.call(i.element[0],c,{item:this.currentItem}):b(i.options.items,i.element),i]);this.containers.push(i)}}for(a=d.length-1;a>=0;a--){c=d[a][1];e=d[a][0];h=0;for(g=e.length;h= +0;f--){var d=this.items[f],e=this.options.toleranceElement?b(this.options.toleranceElement,d.item):d.item;if(!c){d.width=e.outerWidth();d.height=e.outerHeight()}e=e.offset();d.left=e.left;d.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(f=this.containers.length-1;f>=0;f--){e=this.containers[f].element.offset();this.containers[f].containerCache.left=e.left;this.containers[f].containerCache.top=e.top;this.containers[f].containerCache.width= +this.containers[f].element.outerWidth();this.containers[f].containerCache.height=this.containers[f].element.outerHeight()}return this},_createPlaceholder:function(c){var f=c||this,d=f.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var a=b(document.createElement(f.currentItem[0].nodeName)).addClass(e||f.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)a.style.visibility="hidden";return a}, +update:function(a,g){if(!(e&&!d.forcePlaceholderSize)){g.height()||g.height(f.currentItem.innerHeight()-parseInt(f.currentItem.css("paddingTop")||0,10)-parseInt(f.currentItem.css("paddingBottom")||0,10));g.width()||g.width(f.currentItem.innerWidth()-parseInt(f.currentItem.css("paddingLeft")||0,10)-parseInt(f.currentItem.css("paddingRight")||0,10))}}}}f.placeholder=b(d.placeholder.element.call(f.element,f.currentItem));f.currentItem.after(f.placeholder);d.placeholder.update(f,f.placeholder)},_contactContainers:function(c){for(var f= +null,d=null,e=this.containers.length-1;e>=0;e--)if(!b.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(f&&b.ui.contains(this.containers[e].element[0],f.element[0]))){f=this.containers[e];d=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",c,this._uiHash(this));this.containers[e].containerCache.over=0}if(f)if(this.containers.length===1){this.containers[d]._trigger("over",c,this._uiHash(this)); +this.containers[d].containerCache.over=1}else if(this.currentContainer!=this.containers[d]){f=1E4;e=null;for(var a=this.positionAbs[this.containers[d].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(b.ui.contains(this.containers[d].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[d].floating?"left":"top"];if(Math.abs(h-a)this.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(f.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/f.grid[1])*f.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])? +g:!(g-this.offset.click.topthis.containment[2])?a:!(a-this.offset.click.left=0;e--)if(b.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!f){d.push(function(a){return function(g){a._trigger("receive", +g,this._uiHash(this))}}.call(this,this.containers[e]));d.push(function(a){return function(g){a._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){f||d.push(function(a){return function(g){a._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){d.push(function(a){return function(g){a._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over= +0}}this._storedCursor&&b("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",c,this._uiHash());for(e=0;e").addClass("ui-effects-wrapper").css({fontSize:"100%", +background:"transparent",border:"none",margin:0,padding:0});m.wrap(n);n=m.parent();if(m.css("position")=="static"){n.css({position:"relative"});m.css({position:"relative"})}else{b.extend(k,{position:m.css("position"),zIndex:m.css("z-index")});b.each(["top","left","bottom","right"],function(q,p){k[p]=m.css(p);if(isNaN(parseInt(k[p],10)))k[p]="auto"});m.css({position:"relative",top:0,left:0})}return n.css(k).show()},removeWrapper:function(m){if(m.parent().is(".ui-effects-wrapper"))return m.parent().replaceWith(m); +return m},setTransition:function(m,k,n,q){q=q||{};b.each(k,function(p,u){unit=m.cssUnit(u);if(unit[0]>0)q[u]=unit[0]*n+unit[1]});return q}});b.fn.extend({effect:function(m){var k=h.apply(this,arguments),n={options:k[1],duration:k[2],callback:k[3]};k=n.options.mode;var q=b.effects[m];if(b.fx.off||!q)return k?this[k](n.duration,n.callback):this.each(function(){n.callback&&n.callback.call(this)});return q.call(this,n)},_show:b.fn.show,show:function(m){if(i(m))return this._show.apply(this,arguments); +else{var k=h.apply(this,arguments);k[1].mode="show";return this.effect.apply(this,k)}},_hide:b.fn.hide,hide:function(m){if(i(m))return this._hide.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="hide";return this.effect.apply(this,k)}},__toggle:b.fn.toggle,toggle:function(m){if(i(m)||typeof m==="boolean"||b.isFunction(m))return this.__toggle.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="toggle";return this.effect.apply(this,k)}},cssUnit:function(m){var k=this.css(m), +n=[];b.each(["em","px","%","pt"],function(q,p){if(k.indexOf(p)>0)n=[parseFloat(k),p]});return n}});b.easing.jswing=b.easing.swing;b.extend(b.easing,{def:"easeOutQuad",swing:function(m,k,n,q,p){return b.easing[b.easing.def](m,k,n,q,p)},easeInQuad:function(m,k,n,q,p){return q*(k/=p)*k+n},easeOutQuad:function(m,k,n,q,p){return-q*(k/=p)*(k-2)+n},easeInOutQuad:function(m,k,n,q,p){if((k/=p/2)<1)return q/2*k*k+n;return-q/2*(--k*(k-2)-1)+n},easeInCubic:function(m,k,n,q,p){return q*(k/=p)*k*k+n},easeOutCubic:function(m, +k,n,q,p){return q*((k=k/p-1)*k*k+1)+n},easeInOutCubic:function(m,k,n,q,p){if((k/=p/2)<1)return q/2*k*k*k+n;return q/2*((k-=2)*k*k+2)+n},easeInQuart:function(m,k,n,q,p){return q*(k/=p)*k*k*k+n},easeOutQuart:function(m,k,n,q,p){return-q*((k=k/p-1)*k*k*k-1)+n},easeInOutQuart:function(m,k,n,q,p){if((k/=p/2)<1)return q/2*k*k*k*k+n;return-q/2*((k-=2)*k*k*k-2)+n},easeInQuint:function(m,k,n,q,p){return q*(k/=p)*k*k*k*k+n},easeOutQuint:function(m,k,n,q,p){return q*((k=k/p-1)*k*k*k*k+1)+n},easeInOutQuint:function(m, +k,n,q,p){if((k/=p/2)<1)return q/2*k*k*k*k*k+n;return q/2*((k-=2)*k*k*k*k+2)+n},easeInSine:function(m,k,n,q,p){return-q*Math.cos(k/p*(Math.PI/2))+q+n},easeOutSine:function(m,k,n,q,p){return q*Math.sin(k/p*(Math.PI/2))+n},easeInOutSine:function(m,k,n,q,p){return-q/2*(Math.cos(Math.PI*k/p)-1)+n},easeInExpo:function(m,k,n,q,p){return k==0?n:q*Math.pow(2,10*(k/p-1))+n},easeOutExpo:function(m,k,n,q,p){return k==p?n+q:q*(-Math.pow(2,-10*k/p)+1)+n},easeInOutExpo:function(m,k,n,q,p){if(k==0)return n;if(k== +p)return n+q;if((k/=p/2)<1)return q/2*Math.pow(2,10*(k-1))+n;return q/2*(-Math.pow(2,-10*--k)+2)+n},easeInCirc:function(m,k,n,q,p){return-q*(Math.sqrt(1-(k/=p)*k)-1)+n},easeOutCirc:function(m,k,n,q,p){return q*Math.sqrt(1-(k=k/p-1)*k)+n},easeInOutCirc:function(m,k,n,q,p){if((k/=p/2)<1)return-q/2*(Math.sqrt(1-k*k)-1)+n;return q/2*(Math.sqrt(1-(k-=2)*k)+1)+n},easeInElastic:function(m,k,n,q,p){var u=0,v=q;if(k==0)return n;if((k/=p)==1)return n+q;u||(u=p*0.3);if(v").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/f)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/f,left:a.left+j*(g/d)+(c.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:a.top+i*(h/f)+(c.options.mode=="show"?(i-Math.floor(f/2))*(h/f):0),opacity:c.options.mode=="show"?0:1}).animate({left:a.left+j*(g/d)+(c.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:a.top+ +i*(h/f)+(c.options.mode=="show"?0:(i-Math.floor(f/2))*(h/f)),opacity:c.options.mode=="show"?1:0},c.duration||500);setTimeout(function(){c.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide();c.callback&&c.callback.apply(e[0]);e.dequeue();b("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery); +(function(b){b.effects.fade=function(c){return this.queue(function(){var f=b(this),d=b.effects.setMode(f,c.options.mode||"hide");f.animate({opacity:d},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery); +(function(b){b.effects.fold=function(c){return this.queue(function(){var f=b(this),d=["position","top","left"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.size||15,g=!!c.options.horizFirst,h=c.duration?c.duration/2:b.fx.speeds._default/2;b.effects.save(f,d);f.show();var i=b.effects.createWrapper(f).css({overflow:"hidden"}),j=e=="show"!=g,l=j?["width","height"]:["height","width"];j=j?[i.width(),i.height()]:[i.height(),i.width()];var o=/([0-9]+)%/.exec(a);if(o)a=parseInt(o[1],10)/100* +j[e=="hide"?0:1];if(e=="show")i.css(g?{height:0,width:a}:{height:a,width:0});g={};o={};g[l[0]]=e=="show"?j[0]:a;o[l[1]]=e=="show"?j[1]:0;i.animate(g,h,c.options.easing).animate(o,h,c.options.easing,function(){e=="hide"&&f.hide();b.effects.restore(f,d);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery); +(function(b){b.effects.highlight=function(c){return this.queue(function(){var f=b(this),d=["backgroundImage","backgroundColor","opacity"],e=b.effects.setMode(f,c.options.mode||"show"),a={backgroundColor:f.css("backgroundColor")};if(e=="hide")a.opacity=0;b.effects.save(f,d);f.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(a,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,d);e=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery); +(function(b){b.effects.pulsate=function(c){return this.queue(function(){var f=b(this),d=b.effects.setMode(f,c.options.mode||"show");times=(c.options.times||5)*2-1;duration=c.duration?c.duration/2:b.fx.speeds._default/2;isVisible=f.is(":visible");animateTo=0;if(!isVisible){f.css("opacity",0).show();animateTo=1}if(d=="hide"&&isVisible||d=="show"&&!isVisible)times--;for(d=0;d').appendTo(document.body).addClass(c.options.className).css({top:e.top,left:e.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(d,c.duration,c.options.easing,function(){a.remove();c.callback&&c.callback.apply(f[0],arguments); +f.dequeue()})})}})(jQuery); +(function(b){b.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var c=this,f=c.options;c.running=0;c.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");c.headers= +c.element.find(f.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){f.disabled||b(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){f.disabled||b(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){f.disabled||b(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){f.disabled||b(this).removeClass("ui-state-focus")});c.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); +if(f.navigation){var d=c.element.find("a").filter(f.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");c.active=e.length?e:d.closest(".ui-accordion-content").prev()}}c.active=c._findActive(c.active||f.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");c.active.next().addClass("ui-accordion-content-active");c._createIcons();c.resize();c.element.attr("role","tablist");c.headers.attr("role","tab").bind("keydown.accordion", +function(a){return c._keydown(a)}).next().attr("role","tabpanel");c.headers.not(c.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();c.active.length?c.active.attr({"aria-expanded":"true",tabIndex:0}):c.headers.eq(0).attr("tabIndex",0);b.browser.safari||c.headers.find("a").attr("tabIndex",-1);f.event&&c.headers.bind(f.event.split(" ").join(".accordion ")+".accordion",function(a){c._clickHandler.call(c,a,this);a.preventDefault()})},_createIcons:function(){var c=this.options;if(c.icons){b("").addClass("ui-icon "+ +c.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex"); +this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var f=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(c.autoHeight||c.fillHeight)f.css("height","");return b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c=="active"&&this.activate(f);if(c=="icons"){this._destroyIcons(); +f&&this._createIcons()}if(c=="disabled")this.headers.add(this.headers.next())[f?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(c){if(!(this.options.disabled||c.altKey||c.ctrlKey)){var f=b.ui.keyCode,d=this.headers.length,e=this.headers.index(c.target),a=false;switch(c.keyCode){case f.RIGHT:case f.DOWN:a=this.headers[(e+1)%d];break;case f.LEFT:case f.UP:a=this.headers[(e-1+d)%d];break;case f.SPACE:case f.ENTER:this._clickHandler({target:c.target},c.target); +c.preventDefault()}if(a){b(c.target).attr("tabIndex",-1);b(a).attr("tabIndex",0);a.focus();return false}return true}},resize:function(){var c=this.options,f;if(c.fillSpace){if(b.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}f=this.element.parent().height();b.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){f-=b(this).outerHeight(true)});this.headers.next().each(function(){b(this).height(Math.max(0,f-b(this).innerHeight()+ +b(this).height()))}).css("overflow","auto")}else if(c.autoHeight){f=0;this.headers.next().each(function(){f=Math.max(f,b(this).height("").height())}).height(f)}return this},activate:function(c){this.options.active=c;c=this._findActive(c)[0];this._clickHandler({target:c},c);return this},_findActive:function(c){return c?typeof c==="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?b([]):this.headers.filter(":eq(0)")},_clickHandler:function(c,f){var d=this.options; +if(!d.disabled)if(c.target){c=b(c.currentTarget||f);f=c[0]===this.active[0];d.active=d.collapsible&&f?false:this.headers.index(c);if(!(this.running||!d.collapsible&&f)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);if(!f){c.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected); +c.next().addClass("ui-accordion-content-active")}g=c.next();e=this.active.next();a={options:d,newHeader:f&&d.collapsible?b([]):c,oldHeader:this.active,newContent:f&&d.collapsible?b([]):g,oldContent:e};d=this.headers.index(this.active[0])>this.headers.index(c[0]);this.active=f?b([]):c;this._toggle(g,e,a,f,d)}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); +this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),a={options:d,newHeader:b([]),oldHeader:d.active,newContent:b([]),oldContent:e},g=this.active=b([]);this._toggle(g,e,a)}},_toggle:function(c,f,d,e,a){var g=this,h=g.options;g.toShow=c;g.toHide=f;g.data=d;var i=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=f.size()===0?c.size():f.size();if(h.animated){d={};d=h.collapsible&&e?{toShow:b([]),toHide:f,complete:i, +down:a,autoHeight:h.autoHeight||h.fillSpace}:{toShow:c,toHide:f,complete:i,down:a,autoHeight:h.autoHeight||h.fillSpace};if(!h.proxied)h.proxied=h.animated;if(!h.proxiedDuration)h.proxiedDuration=h.duration;h.animated=b.isFunction(h.proxied)?h.proxied(d):h.proxied;h.duration=b.isFunction(h.proxiedDuration)?h.proxiedDuration(d):h.proxiedDuration;e=b.ui.accordion.animations;var j=h.duration,l=h.animated;if(l&&!e[l]&&!b.easing[l])l="slide";e[l]||(e[l]=function(o){this.slide(o,{easing:l,duration:j||700})}); +e[l](d)}else{if(h.collapsible&&e)c.toggle();else{f.hide();c.show()}i(true)}f.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();c.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});b.extend(b.ui.accordion,{version:"1.8.7",animations:{slide:function(c, +f){c=b.extend({easing:"swing",duration:300},c,f);if(c.toHide.size())if(c.toShow.size()){var d=c.toShow.css("overflow"),e=0,a={},g={},h;f=c.toShow;h=f[0].style.width;f.width(parseInt(f.parent().width(),10)-parseInt(f.css("paddingLeft"),10)-parseInt(f.css("paddingRight"),10)-(parseInt(f.css("borderLeftWidth"),10)||0)-(parseInt(f.css("borderRightWidth"),10)||0));b.each(["height","paddingTop","paddingBottom"],function(i,j){g[j]="hide";i=(""+b.css(c.toShow[0],j)).match(/^([\d+-.]+)(.*)$/);a[j]={value:i[1], +unit:i[2]||"px"}});c.toShow.css({height:0,overflow:"hidden"}).show();c.toHide.filter(":hidden").each(c.complete).end().filter(":visible").animate(g,{step:function(i,j){if(j.prop=="height")e=j.end-j.start===0?0:(j.now-j.start)/(j.end-j.start);c.toShow[0].style[j.prop]=e*a[j.prop].value+a[j.prop].unit},duration:c.duration,easing:c.easing,complete:function(){c.autoHeight||c.toShow.css("height","");c.toShow.css({width:h,overflow:d});c.complete()}})}else c.toHide.animate({height:"hide",paddingTop:"hide", +paddingBottom:"hide"},c);else c.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},c)},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1E3:200})}}})})(jQuery); +(function(b){b.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var c=this,f=this.element[0].ownerDocument,d;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!(c.options.disabled||c.element.attr("readonly"))){d=false;var a=b.ui.keyCode;switch(e.keyCode){case a.PAGE_UP:c._move("previousPage", +e);break;case a.PAGE_DOWN:c._move("nextPage",e);break;case a.UP:c._move("previous",e);e.preventDefault();break;case a.DOWN:c._move("next",e);e.preventDefault();break;case a.ENTER:case a.NUMPAD_ENTER:if(c.menu.active){d=true;e.preventDefault()}case a.TAB:if(!c.menu.active)return;c.menu.select(e);break;case a.ESCAPE:c.element.val(c.term);c.close(e);break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=c.element.val()){c.selectedItem=null;c.search(null,e)}},c.options.delay); +break}}}).bind("keypress.autocomplete",function(e){if(d){d=false;e.preventDefault()}}).bind("focus.autocomplete",function(){if(!c.options.disabled){c.selectedItem=null;c.previous=c.element.val()}}).bind("blur.autocomplete",function(e){if(!c.options.disabled){clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(e);c._change(e)},150)}});this._initSource();this.response=function(){return c._response.apply(c,arguments)};this.menu=b("
        ").addClass("ui-autocomplete").appendTo(b(this.options.appendTo|| +"body",f)[0]).mousedown(function(e){var a=c.menu.element[0];b(e.target).closest(".ui-menu-item").length||setTimeout(function(){b(document).one("mousedown",function(g){g.target!==c.element[0]&&g.target!==a&&!b.ui.contains(a,g.target)&&c.close()})},1);setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(e,a){a=a.item.data("item.autocomplete");false!==c._trigger("focus",e,{item:a})&&/^key/.test(e.originalEvent.type)&&c.element.val(a.value)},selected:function(e,a){var g=a.item.data("item.autocomplete"), +h=c.previous;if(c.element[0]!==f.activeElement){c.element.focus();c.previous=h;setTimeout(function(){c.previous=h;c.selectedItem=g},1)}false!==c._trigger("select",e,{item:g})&&c.element.val(g.value);c.term=c.element.val();c.close(e);c.selectedItem=g},blur:function(){c.menu.element.is(":visible")&&c.element.val()!==c.term&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");b.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); +this.menu.element.remove();b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c==="source"&&this._initSource();if(c==="appendTo")this.menu.element.appendTo(b(f||"body",this.element[0].ownerDocument)[0])},_initSource:function(){var c=this,f,d;if(b.isArray(this.options.source)){f=this.options.source;this.source=function(e,a){a(b.ui.autocomplete.filter(f,e.term))}}else if(typeof this.options.source==="string"){d=this.options.source;this.source= +function(e,a){c.xhr&&c.xhr.abort();c.xhr=b.ajax({url:d,data:e,dataType:"json",success:function(g,h,i){i===c.xhr&&a(g);c.xhr=null},error:function(g){g===c.xhr&&a([]);c.xhr=null}})}}else this.source=this.options.source},search:function(c,f){c=c!=null?c:this.element.val();this.term=this.element.val();if(c.length").data("item.autocomplete",f).append(b("").text(f.label)).appendTo(c)},_move:function(c,f){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c)){this.element.val(this.term);this.menu.deactivate()}else this.menu[c](f);else this.search(null,f)},widget:function(){return this.menu.element}}); +b.extend(b.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(c,f){var d=new RegExp(b.ui.autocomplete.escapeRegex(f),"i");return b.grep(c,function(e){return d.test(e.label||e.value||e)})}})})(jQuery); +(function(b){b.widget("ui.menu",{_create:function(){var c=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(f){if(b(f.target).closest(".ui-menu-item a").length){f.preventDefault();c.select(f)}});this.refresh()},refresh:function(){var c=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(f){c.activate(f,b(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(c,f){this.deactivate();if(this.hasScroll()){var d=f.offset().top-this.element.offset().top,e=this.element.attr("scrollTop"),a=this.element.height();if(d<0)this.element.attr("scrollTop",e+d);else d>=a&&this.element.attr("scrollTop",e+d-a+f.height())}this.active=f.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",c,{item:f})}, +deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(c){this.move("next",".ui-menu-item:first",c)},previous:function(c){this.move("prev",".ui-menu-item:last",c)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(c,f,d){if(this.active){c=this.active[c+"All"](".ui-menu-item").eq(0); +c.length?this.activate(d,c):this.activate(d,this.element.children(f))}else this.activate(d,this.element.children(f))},nextPage:function(c){if(this.hasScroll())if(!this.active||this.last())this.activate(c,this.element.children(".ui-menu-item:first"));else{var f=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var a=b(this).offset().top-f-d+b(this).height();return a<10&&a>-10});e.length||(e=this.element.children(".ui-menu-item:last"));this.activate(c, +e)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(c){if(this.hasScroll())if(!this.active||this.first())this.activate(c,this.element.children(".ui-menu-item:last"));else{var f=this.active.offset().top,d=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=b(this).offset().top-f+d-b(this).height();return e<10&&e>-10});result.length||(result=this.element.children(".ui-menu-item:first")); +this.activate(c,result)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),g=this.options.icons,h=g.primary&&g.secondary;if(g.primary||g.secondary){e.addClass("ui-button-text-icon"+(h?"s":g.primary?"-primary":"-secondary"));g.primary&&e.prepend("");g.secondary&&e.append("");if(!this.options.text){e.addClass(h?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary"); +this.hasTitle||e.attr("title",a)}}else e.addClass("ui-button-text-only")}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,a){e==="disabled"&&this.buttons.button("option",e,a);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()}, +destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery); +(function(b,c){function f(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass= +"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su", +"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10", +minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};b.extend(this._defaults,this.regional[""]);this.dpDiv=b('
        ')}function d(a,g){b.extend(a,g);for(var h in g)if(g[h]== +null||g[h]==c)a[h]=g[h];return a}b.extend(b.ui,{datepicker:{version:"1.8.7"}});var e=(new Date).getTime();b.extend(f.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){d(this._defaults,a||{});return this},_attachDatepicker:function(a,g){var h=null;for(var i in this._defaults){var j=a.getAttribute("date:"+i);if(j){h=h||{};try{h[i]=eval(j)}catch(l){h[i]=j}}}i=a.nodeName.toLowerCase(); +j=i=="div"||i=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var o=this._newInst(b(a),j);o.settings=b.extend({},g||{},h||{});if(i=="input")this._connectDatepicker(a,o);else j&&this._inlineDatepicker(a,o)},_newInst:function(a,g){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:g,dpDiv:!g?this.dpDiv:b('
        ')}}, +_connectDatepicker:function(a,g){var h=b(a);g.append=b([]);g.trigger=b([]);if(!h.hasClass(this.markerClassName)){this._attachments(h,g);h.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(i,j,l){g.settings[j]=l}).bind("getData.datepicker",function(i,j){return this._get(g,j)});this._autoSize(g);b.data(a,"datepicker",g)}},_attachments:function(a,g){var h=this._get(g,"appendText"),i=this._get(g,"isRTL");g.append&& +g.append.remove();if(h){g.append=b(''+h+"");a[i?"before":"after"](g.append)}a.unbind("focus",this._showDatepicker);g.trigger&&g.trigger.remove();h=this._get(g,"showOn");if(h=="focus"||h=="both")a.focus(this._showDatepicker);if(h=="button"||h=="both"){h=this._get(g,"buttonText");var j=this._get(g,"buttonImage");g.trigger=b(this._get(g,"buttonImageOnly")?b("").addClass(this._triggerClass).attr({src:j,alt:h,title:h}):b('').addClass(this._triggerClass).html(j== +""?h:b("").attr({src:j,alt:h,title:h})));a[i?"before":"after"](g.trigger);g.trigger.click(function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput==a[0]?b.datepicker._hideDatepicker():b.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var g=new Date(2009,11,20),h=this._get(a,"dateFormat");if(h.match(/[DM]/)){var i=function(j){for(var l=0,o=0,m=0;ml){l=j[m].length;o=m}return o};g.setMonth(i(this._get(a, +h.match(/MM/)?"monthNames":"monthNamesShort")));g.setDate(i(this._get(a,h.match(/DD/)?"dayNames":"dayNamesShort"))+20-g.getDay())}a.input.attr("size",this._formatDate(a,g).length)}},_inlineDatepicker:function(a,g){var h=b(a);if(!h.hasClass(this.markerClassName)){h.addClass(this.markerClassName).append(g.dpDiv).bind("setData.datepicker",function(i,j,l){g.settings[j]=l}).bind("getData.datepicker",function(i,j){return this._get(g,j)});b.data(a,"datepicker",g);this._setDate(g,this._getDefaultDate(g), +true);this._updateDatepicker(g);this._updateAlternate(g);g.dpDiv.show()}},_dialogDatepicker:function(a,g,h,i,j){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=b('');this._dialogInput.keydown(this._doKeyDown);b("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};b.data(this._dialogInput[0],"datepicker",a)}d(a.settings,i||{}); +g=g&&g.constructor==Date?this._formatDate(a,g):g;this._dialogInput.val(g);this._pos=j?j.length?j:[j.pageX,j.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=h;this._inDialog=true;this.dpDiv.addClass(this._dialogClass); +this._showDatepicker(this._dialogInput[0]);b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var g=b(a),h=b.data(a,"datepicker");if(g.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();b.removeData(a,"datepicker");if(i=="input"){h.append.remove();h.trigger.remove();g.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup", +this._doKeyUp)}else if(i=="div"||i=="span")g.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var g=b(a),h=b.data(a,"datepicker");if(g.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=false;h.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(i=="div"||i=="span")g.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs, +function(j){return j==a?null:j})}},_disableDatepicker:function(a){var g=b(a),h=b.data(a,"datepicker");if(g.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=true;h.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(i=="div"||i=="span")g.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,function(j){return j==a?null: +j});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var g=0;g-1}},_doKeyUp:function(a){a=b.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,b.datepicker._getFormatConfig(a))){b.datepicker._setDateFromField(a);b.datepicker._updateAlternate(a);b.datepicker._updateDatepicker(a)}}catch(g){b.datepicker.log(g)}return true}, +_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.datepicker._isDisabledDatepicker(a)||b.datepicker._lastInput==a)){var g=b.datepicker._getInst(a);b.datepicker._curInst&&b.datepicker._curInst!=g&&b.datepicker._curInst.dpDiv.stop(true,true);var h=b.datepicker._get(g,"beforeShow");d(g.settings,h?h.apply(a,[a,g]):{});g.lastVal=null;b.datepicker._lastInput=a;b.datepicker._setDateFromField(g);if(b.datepicker._inDialog)a.value="";if(!b.datepicker._pos){b.datepicker._pos= +b.datepicker._findPos(a);b.datepicker._pos[1]+=a.offsetHeight}var i=false;b(a).parents().each(function(){i|=b(this).css("position")=="fixed";return!i});if(i&&b.browser.opera){b.datepicker._pos[0]-=document.documentElement.scrollLeft;b.datepicker._pos[1]-=document.documentElement.scrollTop}h={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=null;g.dpDiv.empty();g.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(g);h=b.datepicker._checkOffset(g, +h,i);g.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":i?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"});if(!g.inline){h=b.datepicker._get(g,"showAnim");var j=b.datepicker._get(g,"duration"),l=function(){b.datepicker._datepickerShowing=true;var o=g.dpDiv.find("iframe.ui-datepicker-cover");if(o.length){var m=b.datepicker._getBorders(g.dpDiv);o.css({left:-m[0],top:-m[1],width:g.dpDiv.outerWidth(),height:g.dpDiv.outerHeight()})}};g.dpDiv.zIndex(b(a).zIndex()+1);b.effects&& +b.effects[h]?g.dpDiv.show(h,b.datepicker._get(g,"showOptions"),j,l):g.dpDiv[h||"show"](h?j:null,l);if(!h||!j)l();g.input.is(":visible")&&!g.input.is(":disabled")&&g.input.focus();b.datepicker._curInst=g}}},_updateDatepicker:function(a){var g=this,h=b.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var i=a.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-h[0],top:-h[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout", +function(){b(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!g._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!= +-1&&b(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();h=this._getNumberOfMonths(a);i=h[1];i>1?a.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(h[0]!=1||h[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a, +"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==b.datepicker._curInst&&b.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus();if(a.yearshtml){var j=a.yearshtml;setTimeout(function(){j===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);j=a.yearshtml=null},0)}},_getBorders:function(a){var g=function(h){return{thin:1,medium:2,thick:3}[h]||h};return[parseFloat(g(a.css("border-left-width"))),parseFloat(g(a.css("border-top-width")))]}, +_checkOffset:function(a,g,h){var i=a.dpDiv.outerWidth(),j=a.dpDiv.outerHeight(),l=a.input?a.input.outerWidth():0,o=a.input?a.input.outerHeight():0,m=document.documentElement.clientWidth+b(document).scrollLeft(),k=document.documentElement.clientHeight+b(document).scrollTop();g.left-=this._get(a,"isRTL")?i-l:0;g.left-=h&&g.left==a.input.offset().left?b(document).scrollLeft():0;g.top-=h&&g.top==a.input.offset().top+o?b(document).scrollTop():0;g.left-=Math.min(g.left,g.left+i>m&&m>i?Math.abs(g.left+i- +m):0);g.top-=Math.min(g.top,g.top+j>k&&k>j?Math.abs(j+o):0);return g},_findPos:function(a){for(var g=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[g?"previousSibling":"nextSibling"];a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var g=this._curInst;if(!(!g||a&&g!=b.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(g,"showAnim");var h=this._get(g,"duration"),i=function(){b.datepicker._tidyDialog(g);this._curInst=null};b.effects&&b.effects[a]? +g.dpDiv.hide(a,b.datepicker._get(g,"showOptions"),h,i):g.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?h:null,i);a||i();if(a=this._get(g,"onClose"))a.apply(g.input?g.input[0]:null,[g.input?g.input.val():"",g]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, +_checkExternalClick:function(a){if(b.datepicker._curInst){a=b(a.target);a[0].id!=b.datepicker._mainDivId&&a.parents("#"+b.datepicker._mainDivId).length==0&&!a.hasClass(b.datepicker.markerClassName)&&!a.hasClass(b.datepicker._triggerClass)&&b.datepicker._datepickerShowing&&!(b.datepicker._inDialog&&b.blockUI)&&b.datepicker._hideDatepicker()}},_adjustDate:function(a,g,h){a=b(a);var i=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(i,g+(h=="M"?this._get(i,"showCurrentAtPos"): +0),h);this._updateDatepicker(i)}},_gotoToday:function(a){a=b(a);var g=this._getInst(a[0]);if(this._get(g,"gotoCurrent")&&g.currentDay){g.selectedDay=g.currentDay;g.drawMonth=g.selectedMonth=g.currentMonth;g.drawYear=g.selectedYear=g.currentYear}else{var h=new Date;g.selectedDay=h.getDate();g.drawMonth=g.selectedMonth=h.getMonth();g.drawYear=g.selectedYear=h.getFullYear()}this._notifyChange(g);this._adjustDate(a)},_selectMonthYear:function(a,g,h){a=b(a);var i=this._getInst(a[0]);i._selectingMonthYear= +false;i["selected"+(h=="M"?"Month":"Year")]=i["draw"+(h=="M"?"Month":"Year")]=parseInt(g.options[g.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(a)},_clickMonthYear:function(a){var g=this._getInst(b(a)[0]);g.input&&g._selectingMonthYear&&setTimeout(function(){g.input.focus()},0);g._selectingMonthYear=!g._selectingMonthYear},_selectDay:function(a,g,h,i){var j=b(a);if(!(b(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0]))){j=this._getInst(j[0]);j.selectedDay=j.currentDay= +b("a",i).html();j.selectedMonth=j.currentMonth=g;j.selectedYear=j.currentYear=h;this._selectDate(a,this._formatDate(j,j.currentDay,j.currentMonth,j.currentYear))}},_clearDate:function(a){a=b(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,g){a=this._getInst(b(a)[0]);g=g!=null?g:this._formatDate(a);a.input&&a.input.val(g);this._updateAlternate(a);var h=this._get(a,"onSelect");if(h)h.apply(a.input?a.input[0]:null,[g,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a); +else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var g=this._get(a,"altField");if(g){var h=this._get(a,"altFormat")||this._get(a,"dateFormat"),i=this._getDate(a),j=this.formatDate(h,i,this._getFormatConfig(a));b(g).each(function(){b(this).val(j)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var g= +a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((g-a)/864E5)/7)+1},parseDate:function(a,g,h){if(a==null||g==null)throw"Invalid arguments";g=typeof g=="object"?g.toString():g+"";if(g=="")return null;for(var i=(h?h.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,l=(h?h.dayNames:null)||this._defaults.dayNames,o=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort,m=(h?h.monthNames:null)||this._defaults.monthNames, +k=h=-1,n=-1,q=-1,p=false,u=function(K){(K=D+1-1){k=1;n=q;do{i=this._getDaysInMonth(h,k-1);if(n<=i)break;k++;n-=i}while(1)}I=this._daylightSavingAdjust(new Date(h,k-1,n));if(I.getFullYear()!=h||I.getMonth()+1!=k||I.getDate()!=n)throw"Invalid date";return I},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y", +RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,g,h){if(!g)return"";var i=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,j=(h?h.dayNames:null)||this._defaults.dayNames,l=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort;h=(h?h.monthNames:null)||this._defaults.monthNames;var o=function(u){(u=p+112?a.getHours()+2:0);return a},_setDate:function(a,g,h){var i=!g,j=a.selectedMonth,l=a.selectedYear;g=this._restrictMinMax(a,this._determineDate(a,g,new Date));a.selectedDay= +a.currentDay=g.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth();a.drawYear=a.selectedYear=a.currentYear=g.getFullYear();if((j!=a.selectedMonth||l!=a.selectedYear)&&!h)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(i?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var g=new Date;g=this._daylightSavingAdjust(new Date(g.getFullYear(), +g.getMonth(),g.getDate()));var h=this._get(a,"isRTL"),i=this._get(a,"showButtonPanel"),j=this._get(a,"hideIfNoPrevNext"),l=this._get(a,"navigationAsDateFormat"),o=this._getNumberOfMonths(a),m=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),n=o[0]!=1||o[1]!=1,q=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),p=this._getMinMaxDate(a,"min"),u=this._getMinMaxDate(a,"max");m=a.drawMonth-m;var v=a.drawYear;if(m<0){m+=12;v--}if(u){var s= +this._daylightSavingAdjust(new Date(u.getFullYear(),u.getMonth()-o[0]*o[1]+1,u.getDate()));for(s=p&&ss;){m--;if(m<0){m=11;v--}}}a.drawMonth=m;a.drawYear=v;s=this._get(a,"prevText");s=!l?s:this.formatDate(s,this._daylightSavingAdjust(new Date(v,m-k,1)),this._getFormatConfig(a));s=this._canAdjustMonth(a,-1,v,m)?''+s+"":j?"":''+s+"";var x=this._get(a,"nextText");x=!l?x:this.formatDate(x,this._daylightSavingAdjust(new Date(v,m+k,1)),this._getFormatConfig(a));j=this._canAdjustMonth(a,+1,v,m)?''+x+"":j?"":''+x+"";k=this._get(a,"currentText");x=this._get(a,"gotoCurrent")&&a.currentDay?q:g;k=!l?k:this.formatDate(k,x,this._getFormatConfig(a));l=!a.inline?'":"";i=i?'
        '+(h?l:"")+(this._isInRange(a,x)?'":"")+(h?"":l)+"
        ":"";l=parseInt(this._get(a,"firstDay"),10);l=isNaN(l)?0:l;k=this._get(a,"showWeek");x=this._get(a,"dayNames");this._get(a,"dayNamesShort");var A=this._get(a,"dayNamesMin"),D= +this._get(a,"monthNames"),I=this._get(a,"monthNamesShort"),K=this._get(a,"beforeShowDay"),M=this._get(a,"showOtherMonths"),V=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var X=this._getDefaultDate(a),r="",w=0;w1)switch(z){case 0:C+=" ui-datepicker-group-first";E=" ui-corner-"+(h?"right":"left");break;case o[1]- +1:C+=" ui-datepicker-group-last";E=" ui-corner-"+(h?"left":"right");break;default:C+=" ui-datepicker-group-middle";E="";break}C+='">'}C+='
        '+(/all|left/.test(E)&&w==0?h?j:s:"")+(/all|right/.test(E)&&w==0?h?s:j:"")+this._generateMonthYearHeader(a,m,v,p,u,w>0||z>0,D,I)+'
        ';var H=k?'":"";for(E=0;E<7;E++){var B= +(E+l)%7;H+="=5?' class="ui-datepicker-week-end"':"")+'>'+A[B]+""}C+=H+"";H=this._getDaysInMonth(v,m);if(v==a.selectedYear&&m==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,H);E=(this._getFirstDayOfMonth(v,m)-l+7)%7;H=n?6:Math.ceil((E+H)/7);B=this._daylightSavingAdjust(new Date(v,m,1-E));for(var S=0;S";var L=!k?"":'";for(E=0;E<7;E++){var P= +K?K.apply(a.input?a.input[0]:null,[B]):[true,""],T=B.getMonth()!=m,O=T&&!V||!P[0]||p&&Bu;L+='";B.setDate(B.getDate()+1);B=this._daylightSavingAdjust(B)}C+= +L+""}m++;if(m>11){m=0;v++}C+="
        '+this._get(a,"weekHeader")+"
        '+this._get(a,"calculateWeek")(B)+""+(T&&!M?" ":O?''+B.getDate()+"":''+B.getDate()+"")+"
        "+(n?""+(o[0]>0&&z==o[1]-1?'
        ':""):"");y+=C}r+=y}r+=i+(b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'':"");a._keyEvent=false;return r},_generateMonthYearHeader:function(a,g,h,i,j,l,o,m){var k=this._get(a,"changeMonth"),n=this._get(a,"changeYear"),q=this._get(a,"showMonthAfterYear"),p='
        ', +u="";if(l||!k)u+=''+o[g]+"";else{o=i&&i.getFullYear()==h;var v=j&&j.getFullYear()==h;u+='"}q||(p+=u+(l||!(k&& +n)?" ":""));a.yearshtml="";if(l||!n)p+=''+h+"";else{m=this._get(a,"yearRange").split(":");var x=(new Date).getFullYear();o=function(A){A=A.match(/c[+-].*/)?h+parseInt(A.substring(1),10):A.match(/[+-].*/)?x+parseInt(A,10):parseInt(A,10);return isNaN(A)?x:A};g=o(m[0]);m=Math.max(g,o(m[1]||""));g=i?Math.max(g,i.getFullYear()):g;m=j?Math.min(m,j.getFullYear()):m;for(a.yearshtml+='";if(b.browser.mozilla)p+='";else{p+=a.yearshtml;a.yearshtml=null}}p+=this._get(a,"yearSuffix");if(q)p+=(l||!(k&&n)?" ":"")+u;p+="
        ";return p},_adjustInstDate:function(a,g,h){var i= +a.drawYear+(h=="Y"?g:0),j=a.drawMonth+(h=="M"?g:0);g=Math.min(a.selectedDay,this._getDaysInMonth(i,j))+(h=="D"?g:0);i=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(i,j,g)));a.selectedDay=i.getDate();a.drawMonth=a.selectedMonth=i.getMonth();a.drawYear=a.selectedYear=i.getFullYear();if(h=="M"||h=="Y")this._notifyChange(a)},_restrictMinMax:function(a,g){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");g=h&&ga?a:g},_notifyChange:function(a){var g=this._get(a, +"onChangeMonthYear");if(g)g.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,g){return this._determineDate(a,this._get(a,g+"Date"),null)},_getDaysInMonth:function(a,g){return 32-(new Date(a,g,32)).getDate()},_getFirstDayOfMonth:function(a,g){return(new Date(a,g,1)).getDay()},_canAdjustMonth:function(a,g,h,i){var j=this._getNumberOfMonths(a); +h=this._daylightSavingAdjust(new Date(h,i+(g<0?g:j[0]*j[1]),1));g<0&&h.setDate(this._getDaysInMonth(h.getFullYear(),h.getMonth()));return this._isInRange(a,h)},_isInRange:function(a,g){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!h||g.getTime()>=h.getTime())&&(!a||g.getTime()<=a.getTime())},_getFormatConfig:function(a){var g=this._get(a,"shortYearCutoff");g=typeof g!="string"?g:(new Date).getFullYear()%100+parseInt(g,10);return{shortYearCutoff:g,dayNamesShort:this._get(a, +"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,g,h,i){if(!g){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}g=g?typeof g=="object"?g:this._daylightSavingAdjust(new Date(i,h,g)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),g,this._getFormatConfig(a))}});b.fn.datepicker= +function(a){if(!b.datepicker.initialized){b(document).mousedown(b.datepicker._checkExternalClick).find("body").append(b.datepicker.dpDiv);b.datepicker.initialized=true}var g=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(g));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(g)); +return this.each(function(){typeof a=="string"?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this].concat(g)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new f;b.datepicker.initialized=false;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.8.7";window["DP_jQuery_"+e]=b})(jQuery); +(function(b,c){var f={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},d={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(e){var a=b(this).css(e).offset().top;a<0&& +b(this).css("top",e.top-a)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var e=this,a=e.options,g=a.title||" ",h=b.ui.dialog.getTitleId(e.element),i=(e.uiDialog=b("
        ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a.dialogClass).css({zIndex:a.zIndex}).attr("tabIndex", +-1).css("outline",0).keydown(function(o){if(a.closeOnEscape&&o.keyCode&&o.keyCode===b.ui.keyCode.ESCAPE){e.close(o);o.preventDefault()}}).attr({role:"dialog","aria-labelledby":h}).mousedown(function(o){e.moveToTop(false,o)});e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(i);var j=(e.uiDialogTitlebar=b("
        ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(i),l=b('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", +"button").hover(function(){l.addClass("ui-state-hover")},function(){l.removeClass("ui-state-hover")}).focus(function(){l.addClass("ui-state-focus")}).blur(function(){l.removeClass("ui-state-focus")}).click(function(o){e.close(o);return false}).appendTo(j);(e.uiDialogTitlebarCloseText=b("")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(l);b("").addClass("ui-dialog-title").attr("id",h).html(g).prependTo(j);if(b.isFunction(a.beforeclose)&&!b.isFunction(a.beforeClose))a.beforeClose= +a.beforeclose;j.find("*").add(j).disableSelection();a.draggable&&b.fn.draggable&&e._makeDraggable();a.resizable&&b.fn.resizable&&e._makeResizable();e._createButtons(a.buttons);e._isOpen=false;b.fn.bgiframe&&i.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove(); +this.originalTitle&&this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(e){var a=this,g,h;if(false!==a._trigger("beforeClose",e)){a.overlay&&a.overlay.destroy();a.uiDialog.unbind("keypress.ui-dialog");a._isOpen=false;if(a.options.hide)a.uiDialog.hide(a.options.hide,function(){a._trigger("close",e)});else{a.uiDialog.hide();a._trigger("close",e)}b.ui.dialog.overlay.resize();if(a.options.modal){g=0;b(".ui-dialog").each(function(){if(this!== +a.uiDialog[0]){h=b(this).css("z-index");isNaN(h)||(g=Math.max(g,h))}});b.ui.dialog.maxZ=g}return a}},isOpen:function(){return this._isOpen},moveToTop:function(e,a){var g=this.options;if(g.modal&&!e||!g.stack&&!g.modal)return this._trigger("focus",a);if(g.zIndex>b.ui.dialog.maxZ)b.ui.dialog.maxZ=g.zIndex;if(this.overlay){b.ui.dialog.maxZ+=1;this.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")}; +b.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",b.ui.dialog.maxZ);this.element.attr(e);this._trigger("focus",a);return this},open:function(){if(!this._isOpen){var e=this.options,a=this.uiDialog;this.overlay=e.modal?new b.ui.dialog.overlay(this):null;this._size();this._position(e.position);a.show(e.show);this.moveToTop(true);e.modal&&a.bind("keypress.ui-dialog",function(g){if(g.keyCode===b.ui.keyCode.TAB){var h=b(":tabbable",this),i=h.filter(":first");h=h.filter(":last");if(g.target===h[0]&&!g.shiftKey){i.focus(1); +return false}else if(g.target===i[0]&&g.shiftKey){h.focus(1);return false}}});b(this.element.find(":tabbable").get().concat(a.find(".ui-dialog-buttonpane :tabbable").get().concat(a.get()))).eq(0).focus();this._isOpen=true;this._trigger("open");return this}},_createButtons:function(e){var a=this,g=false,h=b("
        ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),i=b("
        ").addClass("ui-dialog-buttonset").appendTo(h);a.uiDialog.find(".ui-dialog-buttonpane").remove(); +typeof e==="object"&&e!==null&&b.each(e,function(){return!(g=true)});if(g){b.each(e,function(j,l){l=b.isFunction(l)?{click:l,text:j}:l;j=b('').attr(l,true).unbind("click").click(function(){l.click.apply(a.element[0],arguments)}).appendTo(i);b.fn.button&&j.button()});h.appendTo(a.uiDialog)}},_makeDraggable:function(){function e(j){return{position:j.position,offset:j.offset}}var a=this,g=a.options,h=b(document),i;a.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", +handle:".ui-dialog-titlebar",containment:"document",start:function(j,l){i=g.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");a._trigger("dragStart",j,e(l))},drag:function(j,l){a._trigger("drag",j,e(l))},stop:function(j,l){g.position=[l.position.left-h.scrollLeft(),l.position.top-h.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(i);a._trigger("dragStop",j,e(l));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function a(j){return{originalPosition:j.originalPosition, +originalSize:j.originalSize,position:j.position,size:j.size}}e=e===c?this.options.resizable:e;var g=this,h=g.options,i=g.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";g.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:g.element,maxWidth:h.maxWidth,maxHeight:h.maxHeight,minWidth:h.minWidth,minHeight:g._minHeight(),handles:e,start:function(j,l){b(this).addClass("ui-dialog-resizing");g._trigger("resizeStart",j,a(l))},resize:function(j,l){g._trigger("resize", +j,a(l))},stop:function(j,l){b(this).removeClass("ui-dialog-resizing");h.height=b(this).height();h.width=b(this).width();g._trigger("resizeStop",j,a(l));b.ui.dialog.overlay.resize()}}).css("position",i).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(e){var a=[],g=[0,0],h;if(e){if(typeof e==="string"||typeof e==="object"&&"0"in e){a=e.split?e.split(" "): +[e[0],e[1]];if(a.length===1)a[1]=a[0];b.each(["left","top"],function(i,j){if(+a[i]===a[i]){g[i]=a[i];a[i]=j}});e={my:a.join(" "),at:a.join(" "),offset:g.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else e=b.ui.dialog.prototype.options.position;(h=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(b.extend({of:window},e));h||this.uiDialog.hide()},_setOptions:function(e){var a=this,g={},h=false;b.each(e,function(i,j){a._setOption(i,j); +if(i in f)h=true;if(i in d)g[i]=j});h&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",g)},_setOption:function(e,a){var g=this.uiDialog;switch(e){case "beforeclose":e="beforeClose";break;case "buttons":this._createButtons(a);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+a);break;case "dialogClass":g.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a);break;case "disabled":a?g.addClass("ui-dialog-disabled"): +g.removeClass("ui-dialog-disabled");break;case "draggable":var h=g.is(":data(draggable)");h&&!a&&g.draggable("destroy");!h&&a&&this._makeDraggable();break;case "position":this._position(a);break;case "resizable":(h=g.is(":data(resizable)"))&&!a&&g.resizable("destroy");h&&typeof a==="string"&&g.resizable("option","handles",a);!h&&a!==false&&this._makeResizable(a);break;case "title":b(".ui-dialog-title",this.uiDialogTitlebar).html(""+(a||" "));break}b.Widget.prototype._setOption.apply(this,arguments)}, +_size:function(){var e=this.options,a,g,h=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(e.minWidth>e.width)e.width=e.minWidth;a=this.uiDialog.css({height:"auto",width:e.width}).height();g=Math.max(0,e.minHeight-a);if(e.height==="auto")if(b.support.minHeight)this.element.css({minHeight:g,height:"auto"});else{this.uiDialog.show();e=this.element.css("height","auto").height();h||this.uiDialog.hide();this.element.height(Math.max(e,g))}else this.element.height(Math.max(e.height- +a,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.7",uuid:0,maxZ:0,getTitleId:function(e){e=e.attr("id");if(!e){this.uuid+=1;e=this.uuid}return"ui-dialog-title-"+e},overlay:function(e){this.$el=b.ui.dialog.overlay.create(e)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "), +create:function(e){if(this.instances.length===0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(g){if(b(g.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), +height:this.height()});b.fn.bgiframe&&a.bgiframe();this.instances.push(a);return a},destroy:function(e){var a=b.inArray(e,this.instances);a!=-1&&this.oldInstances.push(this.instances.splice(a,1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");e.remove();var g=0;b.each(this.instances,function(){g=Math.max(g,this.css("z-index"))});this.maxZ=g},height:function(){var e,a;if(b.browser.msie&&b.browser.version<7){e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); +a=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return e0?a.left-h:Math.max(a.left-g.collisionPosition.left,a.left)},top:function(a,g){var h=b(window);h=g.collisionPosition.top+g.collisionHeight-h.height()-h.scrollTop();a.top=h>0?a.top-h:Math.max(a.top-g.collisionPosition.top,a.top)}},flip:{left:function(a,g){if(g.at[0]!=="center"){var h=b(window);h=g.collisionPosition.left+g.collisionWidth-h.width()-h.scrollLeft();var i=g.my[0]==="left"?-g.elemWidth:g.my[0]==="right"?g.elemWidth:0,j=g.at[0]==="left"?g.targetWidth:-g.targetWidth,l=-2*g.offset[0];a.left+= +g.collisionPosition.left<0?i+j+l:h>0?i+j+l:0}},top:function(a,g){if(g.at[1]!=="center"){var h=b(window);h=g.collisionPosition.top+g.collisionHeight-h.height()-h.scrollTop();var i=g.my[1]==="top"?-g.elemHeight:g.my[1]==="bottom"?g.elemHeight:0,j=g.at[1]==="top"?g.targetHeight:-g.targetHeight,l=-2*g.offset[1];a.top+=g.collisionPosition.top<0?i+j+l:h>0?i+j+l:0}}}};if(!b.offset.setOffset){b.offset.setOffset=function(a,g){if(/static/.test(b.curCSS(a,"position")))a.style.position="relative";var h=b(a), +i=h.offset(),j=parseInt(b.curCSS(a,"top",true),10)||0,l=parseInt(b.curCSS(a,"left",true),10)||0;i={top:g.top-i.top+j,left:g.left-i.left+l};"using"in g?g.using.call(a,i):h.css(i)};b.fn.offset=function(a){var g=this[0];if(!g||!g.ownerDocument)return null;if(a)return this.each(function(){b.offset.setOffset(this,a)});return e.call(this)}}})(jQuery); +(function(b,c){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
        ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(f){if(f===c)return this._value();this._setOption("value",f);return this},_setOption:function(f,d){if(f==="value"){this.options.value=d;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var f=this.options.value;if(typeof f!=="number")f=0;return Math.min(this.options.max,Math.max(this.min,f))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var f=this.value(),d=this._percentage();if(this.oldValue!==f){this.oldValue=f;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",f===this.options.max).width(d.toFixed(0)+"%");this.element.attr("aria-valuenow",f)}});b.extend(b.ui.progressbar,{version:"1.8.7"})})(jQuery); +(function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,f=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");f.disabled&&this.element.addClass("ui-slider-disabled ui-disabled"); +this.range=b([]);if(f.range){if(f.range===true){this.range=b("
        ");if(!f.values)f.values=[this._valueMin(),this._valueMin()];if(f.values.length&&f.values.length!==2)f.values=[f.values[0],f.values[0]]}else this.range=b("
        ");this.range.appendTo(this.element).addClass("ui-slider-range");if(f.range==="min"||f.range==="max")this.range.addClass("ui-slider-range-"+f.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length===0&&b("").appendTo(this.element).addClass("ui-slider-handle"); +if(f.values&&f.values.length)for(;b(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){f.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(f.disabled)b(this).blur(); +else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(d){b(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(d){var e=true,a=b(this).data("index.ui-slider-handle"),g,h,i;if(!c.options.disabled){switch(d.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:e= +false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");g=c._start(d,a);if(g===false)return}break}i=c.options.step;g=c.options.values&&c.options.values.length?(h=c.values(a)):(h=c.value());switch(d.keyCode){case b.ui.keyCode.HOME:h=c._valueMin();break;case b.ui.keyCode.END:h=c._valueMax();break;case b.ui.keyCode.PAGE_UP:h=c._trimAlignValue(g+(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:h=c._trimAlignValue(g-(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(g=== +c._valueMax())return;h=c._trimAlignValue(g+i);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(g===c._valueMin())return;h=c._trimAlignValue(g-i);break}c._slide(d,a,h);return e}}).keyup(function(d){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(d,e);c._change(d,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); +this._mouseDestroy();return this},_mouseCapture:function(c){var f=this.options,d,e,a,g,h;if(f.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();d=this._normValueFromMouse({x:c.pageX,y:c.pageY});e=this._valueMax()-this._valueMin()+1;g=this;this.handles.each(function(i){var j=Math.abs(d-g.values(i));if(e>j){e=j;a=b(this);h=i}});if(f.range===true&&this.values(1)===f.min){h+=1;a=b(this.handles[h])}if(this._start(c, +h)===false)return false;this._mouseSliding=true;g._handleIndex=h;a.addClass("ui-state-active").focus();f=a.offset();this._clickOffset=!b(c.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:c.pageX-f.left-a.width()/2,top:c.pageY-f.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(c,h,d);return this._animateOff=true},_mouseStart:function(){return true}, +_mouseDrag:function(c){var f=this._normValueFromMouse({x:c.pageX,y:c.pageY});this._slide(c,this._handleIndex,f);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var f; +if(this.orientation==="horizontal"){f=this.elementSize.width;c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{f=this.elementSize.height;c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}f=c/f;if(f>1)f=1;if(f<0)f=0;if(this.orientation==="vertical")f=1-f;c=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+f*c)},_start:function(c,f){var d={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){d.value= +this.values(f);d.values=this.values()}return this._trigger("start",c,d)},_slide:function(c,f,d){var e;if(this.options.values&&this.options.values.length){e=this.values(f?0:1);if(this.options.values.length===2&&this.options.range===true&&(f===0&&d>e||f===1&&d1){this.options.values[c]=this._trimAlignValue(f);this._refreshValue();this._change(null,c)}if(arguments.length)if(b.isArray(arguments[0])){d=this.options.values;e=arguments[0];for(a=0;a=this._valueMax())return this._valueMax();var f=this.options.step>0?this.options.step:1,d=(c-this._valueMin())%f;alignValue=c-d;if(Math.abs(d)*2>=f)alignValue+=d>0?f:-f;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, +_refreshValue:function(){var c=this.options.range,f=this.options,d=this,e=!this._animateOff?f.animate:false,a,g={},h,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(o){a=(d.values(o)-d._valueMin())/(d._valueMax()-d._valueMin())*100;g[d.orientation==="horizontal"?"left":"bottom"]=a+"%";b(this).stop(1,1)[e?"animate":"css"](g,f.animate);if(d.options.range===true)if(d.orientation==="horizontal"){if(o===0)d.range.stop(1,1)[e?"animate":"css"]({left:a+"%"},f.animate); +if(o===1)d.range[e?"animate":"css"]({width:a-h+"%"},{queue:false,duration:f.animate})}else{if(o===0)d.range.stop(1,1)[e?"animate":"css"]({bottom:a+"%"},f.animate);if(o===1)d.range[e?"animate":"css"]({height:a-h+"%"},{queue:false,duration:f.animate})}h=a});else{i=this.value();j=this._valueMin();l=this._valueMax();a=l!==j?(i-j)/(l-j)*100:0;g[d.orientation==="horizontal"?"left":"bottom"]=a+"%";this.handle.stop(1,1)[e?"animate":"css"](g,f.animate);if(c==="min"&&this.orientation==="horizontal")this.range.stop(1, +1)[e?"animate":"css"]({width:a+"%"},f.animate);if(c==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-a+"%"},{queue:false,duration:f.animate});if(c==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:a+"%"},f.animate);if(c==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-a+"%"},{queue:false,duration:f.animate})}}});b.extend(b.ui.slider,{version:"1.8.7"})})(jQuery); +(function(b,c){function f(){return++e}function d(){return++a}var e=0,a=0;b.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
        ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
      • #{label}
      • "},_create:function(){this._tabify(true)},_setOption:function(g,h){if(g=="selected")this.options.collapsible&& +h==this.options.selected||this.select(h);else{this.options[g]=h;this._tabify()}},_tabId:function(g){return g.title&&g.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+f()},_sanitizeSelector:function(g){return g.replace(/:/g,"\\:")},_cookie:function(){var g=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+d());return b.cookie.apply(null,[g].concat(b.makeArray(arguments)))},_ui:function(g,h){return{tab:g,panel:h,index:this.anchors.index(g)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var g= +b(this);g.html(g.data("label.tabs")).removeData("label.tabs")})},_tabify:function(g){function h(v,s){v.css("display","");!b.support.opacity&&s.opacity&&v[0].style.removeAttribute("filter")}var i=this,j=this.options,l=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=b(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return b("a",this)[0]});this.panels=b([]);this.anchors.each(function(v,s){var x=b(s).attr("href"),A=x.split("#")[0],D;if(A&&(A===location.toString().split("#")[0]|| +(D=b("base")[0])&&A===D.href)){x=s.hash;s.href=x}if(l.test(x))i.panels=i.panels.add(i.element.find(i._sanitizeSelector(x)));else if(x&&x!=="#"){b.data(s,"href.tabs",x);b.data(s,"load.tabs",x.replace(/#.*$/,""));x=i._tabId(s);s.href="#"+x;s=i.element.find("#"+x);if(!s.length){s=b(j.panelTemplate).attr("id",x).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(i.panels[v-1]||i.list);s.data("destroy.tabs",true)}i.panels=i.panels.add(s)}else j.disabled.push(v)});if(g){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(j.selected===c){location.hash&&this.anchors.each(function(v,s){if(s.hash==location.hash){j.selected=v;return false}});if(typeof j.selected!=="number"&&j.cookie)j.selected=parseInt(i._cookie(),10);if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)j.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));j.selected=j.selected||(this.lis.length?0:-1)}else if(j.selected===null)j.selected=-1;j.selected=j.selected>=0&&this.anchors[j.selected]||j.selected<0?j.selected:0;j.disabled=b.unique(j.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"),function(v){return i.lis.index(v)}))).sort();b.inArray(j.selected,j.disabled)!=-1&&j.disabled.splice(b.inArray(j.selected,j.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(j.selected>=0&&this.anchors.length){i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");i.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[j.selected],i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash))))});this.load(j.selected)}b(window).bind("unload",function(){i.lis.add(i.anchors).unbind(".tabs");i.lis=i.anchors=i.panels=null})}else j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");j.cookie&&this._cookie(j.selected,j.cookie);g=0;for(var o;o=this.lis[g];g++)b(o)[b.inArray(g,j.disabled)!=-1&&!b(o).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");j.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var m=function(v,s){s.is(":not(.ui-state-disabled)")&&s.addClass("ui-state-"+v)},k=function(v,s){s.removeClass("ui-state-"+ +v)};this.lis.bind("mouseover.tabs",function(){m("hover",b(this))});this.lis.bind("mouseout.tabs",function(){k("hover",b(this))});this.anchors.bind("focus.tabs",function(){m("focus",b(this).closest("li"))});this.anchors.bind("blur.tabs",function(){k("focus",b(this).closest("li"))})}var n,q;if(j.fx)if(b.isArray(j.fx)){n=j.fx[0];q=j.fx[1]}else n=q=j.fx;var p=q?function(v,s){b(v).closest("li").addClass("ui-tabs-selected ui-state-active");s.hide().removeClass("ui-tabs-hide").animate(q,q.duration||"normal", +function(){h(s,q);i._trigger("show",null,i._ui(v,s[0]))})}:function(v,s){b(v).closest("li").addClass("ui-tabs-selected ui-state-active");s.removeClass("ui-tabs-hide");i._trigger("show",null,i._ui(v,s[0]))},u=n?function(v,s){s.animate(n,n.duration||"normal",function(){i.lis.removeClass("ui-tabs-selected ui-state-active");s.addClass("ui-tabs-hide");h(s,n);i.element.dequeue("tabs")})}:function(v,s){i.lis.removeClass("ui-tabs-selected ui-state-active");s.addClass("ui-tabs-hide");i.element.dequeue("tabs")}; +this.anchors.bind(j.event+".tabs",function(){var v=this,s=b(v).closest("li"),x=i.panels.filter(":not(.ui-tabs-hide)"),A=i.element.find(i._sanitizeSelector(v.hash));if(s.hasClass("ui-tabs-selected")&&!j.collapsible||s.hasClass("ui-state-disabled")||s.hasClass("ui-state-processing")||i.panels.filter(":animated").length||i._trigger("select",null,i._ui(this,A[0]))===false){this.blur();return false}j.selected=i.anchors.index(this);i.abort();if(j.collapsible)if(s.hasClass("ui-tabs-selected")){j.selected= +-1;j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){u(v,x)}).dequeue("tabs");this.blur();return false}else if(!x.length){j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){p(v,A)});i.load(i.anchors.index(this));this.blur();return false}j.cookie&&i._cookie(j.selected,j.cookie);if(A.length){x.length&&i.element.queue("tabs",function(){u(v,x)});i.element.queue("tabs",function(){p(v,A)});i.load(i.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +b.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(g){if(typeof g=="string")g=this.anchors.index(this.anchors.filter("[href$="+g+"]"));return g},destroy:function(){var g=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var h= +b.data(this,"href.tabs");if(h)this.href=h;var i=b(this).unbind(".tabs");b.each(["href","load","cache"],function(j,l){i.removeData(l+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){b.data(this,"destroy.tabs")?b(this).remove():b(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});g.cookie&&this._cookie(null,g.cookie);return this},add:function(g, +h,i){if(i===c)i=this.anchors.length;var j=this,l=this.options;h=b(l.tabTemplate.replace(/#\{href\}/g,g).replace(/#\{label\}/g,h));g=!g.indexOf("#")?g.replace("#",""):this._tabId(b("a",h)[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var o=j.element.find("#"+g);o.length||(o=b(l.panelTemplate).attr("id",g).data("destroy.tabs",true));o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(i>=this.lis.length){h.appendTo(this.list);o.appendTo(this.list[0].parentNode)}else{h.insertBefore(this.lis[i]); +o.insertBefore(this.panels[i])}l.disabled=b.map(l.disabled,function(m){return m>=i?++m:m});this._tabify();if(this.anchors.length==1){l.selected=0;h.addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[0],j.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[i],this.panels[i]));return this},remove:function(g){g=this._getIndex(g);var h=this.options,i=this.lis.eq(g).remove(),j=this.panels.eq(g).remove(); +if(i.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(g+(g+1=g?--l:l});this._tabify();this._trigger("remove",null,this._ui(i.find("a")[0],j[0]));return this},enable:function(g){g=this._getIndex(g);var h=this.options;if(b.inArray(g,h.disabled)!=-1){this.lis.eq(g).removeClass("ui-state-disabled");h.disabled=b.grep(h.disabled,function(i){return i!=g});this._trigger("enable",null, +this._ui(this.anchors[g],this.panels[g]));return this}},disable:function(g){g=this._getIndex(g);var h=this.options;if(g!=h.selected){this.lis.eq(g).addClass("ui-state-disabled");h.disabled.push(g);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[g],this.panels[g]))}return this},select:function(g){g=this._getIndex(g);if(g==-1)if(this.options.collapsible&&this.options.selected!=-1)g=this.options.selected;else return this;this.anchors.eq(g).trigger(this.options.event+".tabs");return this}, +load:function(g){g=this._getIndex(g);var h=this,i=this.options,j=this.anchors.eq(g)[0],l=b.data(j,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&b.data(j,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(g).addClass("ui-state-processing");if(i.spinner){var o=b("span",j);o.data("label.tabs",o.html()).html(i.spinner)}this.xhr=b.ajax(b.extend({},i.ajaxOptions,{url:l,success:function(m,k){h.element.find(h._sanitizeSelector(j.hash)).html(m);h._cleanup();i.cache&&b.data(j, +"cache.tabs",true);h._trigger("load",null,h._ui(h.anchors[g],h.panels[g]));try{i.ajaxOptions.success(m,k)}catch(n){}},error:function(m,k){h._cleanup();h._trigger("load",null,h._ui(h.anchors[g],h.panels[g]));try{i.ajaxOptions.error(m,k,g,j)}catch(n){}}}));h.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, +url:function(g,h){this.anchors.eq(g).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:"1.8.7"});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(g,h){var i=this,j=this.options,l=i._rotate||(i._rotate=function(o){clearTimeout(i.rotation);i.rotation=setTimeout(function(){var m=j.selected;i.select(++m-1;window.hideShare=s;window.closeShare=x;window.updateChromeStatus=A;window.showStatus=I;l.sub("shareState",V);window.showStatusShared=X;window.handleCaptcha=r;delete O.newTimerV1; +delete O.newTimerV2;if(d=O.newTimerV3){d=JSON.parse(d);if((new Date).getTime()-d<2592E5)P=true}else{O.newTimerV3=(new Date).getTime();P=true}c(function(){B.prefs.system&&c(document.documentElement).addClass(B.prefs.system);if(B.ui==="sidebar"){c("#panelHeader").text("");c("#closeLink").addClass("hidden")}P&&c("#newLink").removeClass("hidden");l.sub("sendMessage",function(J){F(J)});S=c("body");S.delegate("#statusAuthButton, .statusErrorButton","click",function(){M()}).delegate(".statusErrorCloseButton", +"click",function(){M()}).delegate(".statusResetErrorButton","click",function(){location.reload()}).delegate("nav .close","click",x);c("#authOkButton").click(function(){a(L.domain,false,function(J){if(J){o.clear();o()}else I("statusOAuthFailed")})});c("#captchaButton").click(function(){M();c("#clickBlock").removeClass("hidden");L.HumanVerification=c("#captcha").attr("value");L.HumanVerificationImage=c("#captchaImage").attr("src");F(L)});o.onChange();if(m.type==="memory")I("statusEnableLocalStorage"); +else{new q({options:B},c(".sharebox")[0],"prepend");o(C,function(J,N,Q){J.status===503?I("statusServerBusyClose"):I("statusServerError",Q)});var G=(new Date).getTime();window.addEventListener("hashchange",function(){if((new Date).getTime()-G>864E5)location.reload(true);else{B=n();l.pub("getShareState",null);l.pub("optionsChanged",B);y();o();l.pub("sizeToContent")}},false)}})}); +define("widgets/AccountPanelLinkedIn",["blade/object","./AccountPanel","jquery"],function(b,c,f){return b(c,null,function(d){return{onCreate:function(){d(this,"onCreate",arguments);this.strings.shareTypeLabel="visible to"},onRender:function(){d(this,"onRender",arguments);f('option[value="contact"]',this.bodyNode).addClass("lineSeparatorOption")}}})}); +define("widgets/AccountPanelFaceBook",["blade/object","./AccountPanel","jquery"],function(b,c,f){return b(c,null,function(d){return{onRender:function(){d(this,"onRender",arguments);this.sourceInputDom=f('[name="source"]',this.bodyNode);this.formatVideoShare()},optionsChanged:function(){d(this,"optionsChanged",arguments);this.formatVideoShare()},formatVideoShare:function(){if(!this.options.previews||!this.options.previews[0]||!this.options.previews[0].http_url)this.sourceInputDom.val("")}}})}); +define("Contacts",["jquery","blade/object","blade/fn","dispatch","rdapi","accounts"],function(b,c,f,d,e,a){b=c(null,null,{init:function(g,h){this.svc=g;this.svcAccount=h;this.callbacks=[];this.lastUpdated=this.fromStore().lastUpdated;this.timeCheck=864E5;this.optionsChangeSub=d.sub("optionsChanged",f.bind(this,function(){this.needFetch()&&this.fetch()}))},destroy:function(){d.unsub("optionsChanged",this.optionsChangeSub)},clear:function(){var g=this.svcAccount;a.setData(g.domain,g.userid,g.username, +"contacts")},needFetch:function(){return!this.lastUpdated||(new Date).getTime()-this.lastUpdated>this.timeCheck},fromStore:function(){var g=this.svcAccount;return a.getData(g.domain,g.userid,g.username,"contacts")||{}},toStore:function(g){var h=this.svcAccount;if(!g.lastUpdated)g.lastUpdated=this.lastUpdated;a.setData(h.domain,h.userid,h.username,"contacts",g);this.notifyCallbacks();return g},incorporate:function(){},notify:function(g){this.callbacks.push(g);this.contacts=this.fromStore().list;!this.contacts|| +this.needFetch()?this.fetch():this.notifyCallbacks()},fetch:function(){var g=this.svcAccount,h=a.getService(g.domain,g.userid,g.username);e("contacts/"+g.domain,{type:"POST",data:{username:g.username,userid:g.userid,startindex:0,maxresults:500,account:JSON.stringify(h)},timeout:1E4,success:f.bind(this,function(i){if(i&&!i.error){this.contacts=this.getFormattedContacts(i.result.entry);this.lastUpdated=(new Date).getTime();this.toStore({list:this.contacts})}}),error:f.bind(this,function(){this.notifyCallbacks()})})}, +notifyCallbacks:function(){this.callbacks.forEach(f.bind(this,function(g){g(this,this.contacts)}))},findContact:function(g){var h=g;(this.contacts||[]).some(function(i){if(i.displayName===g){h=i.email||i.userid||i.username;return true}return false});return h},getFormattedContacts:function(g){var h=[];g.forEach(function(i){i.accounts&&i.accounts.length&&i.accounts.forEach(function(j){h.push({displayName:i.displayName,email:"",userid:j.userid,username:j.username})})});return h},convert:function(g){var h= +[],i="";if(this.contacts){g=g.split(",");g.forEach(f.bind(this,function(j){(j=this.findContact(j.trim()))&&h.push(j)}))}if(h.length>0)i=h.join(", ");return i},formatContact:function(g){return g.displayName}});b.modelVersion="3";return b}); +define("ContactsEmail",["blade/object","Contacts","jquery","accounts","blade/fn"],function(b,c,f,d,e){var a=/<([^>])+>/;return b(c,null,function(){return{formatContact:function(g){var h=g.displayName;if(g.email!==h)h+=" <"+g.email+">";return h},findContact:function(g){return g},contains:function(g){return this.contacts.some(function(h){return h.email===g})},incorporate:function(g){var h=this.svcAccount,i=[];g.split(",").forEach(e.bind(this,function(j){j=j.trim();var l=a.exec(j);j=l&&l[1]||j;this.contains(j)|| +i.push({displayName:j,email:j})}));if(i.length){g=d.getData(h.domain,h.userid,h.username,"enteredContacts")||[];g=g.concat(i);d.setData(h.domain,h.userid,h.username,"enteredContacts",g);this.contacts=this.contacts.concat(i);this.toStore({list:this.contacts})}},getFormattedContacts:function(g){var h=[],i=this.svcAccount;i=d.getData(i.domain,i.userid,i.username,"enteredContacts");g.forEach(function(j){j.emails&&j.emails.length&&j.emails.forEach(function(l){h.push({displayName:j.displayName?j.displayName: +l.value,email:l.value})})});if(i)h=h.concat(i);return h}}})});define("ContactsTwitter",["blade/object","Contacts","jquery"],function(b,c){var f=/\@(\S+)/;return b(c,null,function(){return{formatContact:function(d){return"@"+d.username},findContact:function(d){var e=f.exec(d),a="",g=e&&e[1]||d;if(g)(this.contacts||[]).some(function(h){if(h.username===g){a=h.userid;return true}return false});return a}}})}); \ No newline at end of file diff --git a/web/0.3.4/share/panel/js/jquery.textOverflow.js b/web/0.3.4/share/panel/js/jquery.textOverflow.js new file mode 100644 index 0000000..e7c4957 --- /dev/null +++ b/web/0.3.4/share/panel/js/jquery.textOverflow.js @@ -0,0 +1,108 @@ +/*! + * jQuery Text Overflow v0.7 + * + * Licensed under the new BSD License. + * Copyright 2009-2010, Bram Stein + * All rights reserved. + */ +/*global jQuery, document, setInterval*/ +(function ($) { + var style = document.documentElement.style, + hasTextOverflow = ('textOverflow' in style || 'OTextOverflow' in style), + + domSplit = function (root, maxIndex) { + var index = 0, result = [], + domSplitAux = function (nodes) { + var i = 0, tmp; + + if (index > maxIndex) { + return; + } + + for (i = 0; i < nodes.length; i += 1) { + if (nodes[i].nodeType === 1) { + tmp = nodes[i].cloneNode(false); + result[result.length - 1].appendChild(tmp); + result.push(tmp); + domSplitAux(nodes[i].childNodes); + result.pop(); + } else if (nodes[i].nodeType === 3) { + if (index + nodes[i].length < maxIndex) { + result[result.length - 1].appendChild(nodes[i].cloneNode(false)); + } else { + tmp = nodes[i].cloneNode(false); + tmp.textContent = $.trim(tmp.textContent.substring(0, maxIndex - index)); + result[result.length - 1].appendChild(tmp); + } + index += nodes[i].length; + } else { + result.appendChild(nodes[i].cloneNode(false)); + } + } + }; + result.push(root.cloneNode(false)); + domSplitAux(root.childNodes); + return $(result.pop().childNodes); + }; + + $.extend($.fn, { + textOverflow: function (str, autoUpdate) { + var more = str || '…'; + + if (!hasTextOverflow) { + return this.each(function () { + var element = $(this), + + // the clone element we modify to measure the width + clone = element.clone(), + + // we save a copy so we can restore it if necessary + originalElement = element.clone(), + originalText = element.text(), + originalWidth = element.width(), + low = 0, mid = 0, + high = originalText.length, + reflow = function () { + if (originalWidth !== element.width()) { + element.replaceWith(originalElement); + element = originalElement; + originalElement = element.clone(); + element.textOverflow(str, false); + originalWidth = element.width(); + } + }; + + element.after(clone.hide().css({ + 'position': 'absolute', + 'width': 'auto', + 'overflow': 'visible', + 'max-width': 'inherit' + })); + + if (clone.width() > originalWidth) { + while (low < high) { + mid = Math.floor(low + ((high - low) / 2)); + clone.empty().append(domSplit(originalElement.get(0), mid)).append(more); + if (clone.width() < originalWidth) { + low = mid + 1; + } else { + high = mid; + } + } + + if (low < originalText.length) { + element.empty().append(domSplit(originalElement.get(0), low - 1)).append(more); + } + } + clone.remove(); + + if (autoUpdate) { + setInterval(reflow, 200); + } + }); + } else { + return this; + } + } + }); +})(jQuery); \ No newline at end of file diff --git a/web/0.3.4/share/panel/scripts/widgets/AccountPanel.html b/web/0.3.4/share/panel/scripts/widgets/AccountPanel.html new file mode 100644 index 0000000..218ff5d --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/AccountPanel.html @@ -0,0 +1,62 @@ +
        + + +

        {svc.name}

        + {displayName} +
        + +
        +
        +
        +
        + + + + + + + + + + {svc.features.medium [} + + + {]} + +
        +
        + {gt(svc.shareTypes.length, 1) [} +
        +
        + +
        + {eq(svc.shareTypes.length, 2) [} + send to {svc.shareTypes[1].name} instead? + {]} +
        + {. lastType lastToShareType(svc.shareTypes)} + + +
        +
        + {] [} + {svc.features.direct [} + + {svc.features.subject [} + + {]} + {]} + {]} + +
        +
        + {svc.features.counter [} +
        + {]} +
        + +
        +
        +
        +
        +
        diff --git a/web/0.3.4/share/panel/scripts/widgets/AccountPanel.js b/web/0.3.4/share/panel/scripts/widgets/AccountPanel.js new file mode 100644 index 0000000..e14b33c --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/AccountPanel.js @@ -0,0 +1,435 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2, plusplus: false, nomen: false */ +/*global define: false, document: false */ +"use strict"; + +define([ 'blade/object', 'blade/Widget', 'jquery', 'text!./AccountPanel.html', + 'TextCounter', 'storage', 'module', 'placeholder', 'dispatch', 'accounts', + 'require', 'AutoComplete', 'rdapi', 'blade/fn', './jigFuncs', 'Select', + 'jquery.textOverflow'], +function (object, Widget, $, template, + TextCounter, storage, module, placeholder, dispatch, accounts, + require, AutoComplete, rdapi, fn, jigFuncs, Select) { + + var store = storage(), + className = module.id.replace(/\//g, '-'); + + //Set up event handlers. + $(function () { + $('body') + .delegate('.' + className + ' form.messageForm', 'submit', function (evt) { + Widget.closest(module.id, evt, 'onSubmit'); + }) + .delegate('.' + className + ' .shareType2', 'click', function (evt) { + Widget.closest(module.id, evt, 'selectSecondShareType'); + evt.preventDefault(); + }); + }); + + /** + * Define the widget. + * This widget assumes its member variables include the following objects: + * + * options: the options for the URL/page being shared. + * account: the account returned from /account/get + * svc: The share service config, from services module. + */ + return object(Widget, null, function (parent) { + return { + moduleId: module.id, + className: className, + + // text counter support + counter: null, + urlSize: 26, + + template: template, + + // The module name for the Contacts module + contactsName: 'Contacts', + + strings: { + shareTypeLabel: 'send to' + }, + + onCreate: function () { + var name = this.account.displayName, + userName, savedOptions; + + //Set up the svcAccount property + this.svcAccount = this.account.accounts[0]; + this.storeId = 'AccountPanel-' + this.svcAccount.domain; + + //Set up memory store for when user switches tabs, their messages for + //old URLs is retained in case they are doing a composition. + //This needs to be in onCreate and not + //on the prototype since each instance should get its own object. + this.memStore = {}; + + //Check for saved data. Only use if the URL + //and the account match + savedOptions = store[this.storeId]; + if (savedOptions) { + savedOptions = JSON.parse(savedOptions); + + if (this.theGameHasChanged(savedOptions)) { + this.clearSavedData(); + savedOptions = null; + } else { + //Mix in the savedOptions with options. + this.options = object.create(this.options, [savedOptions]); + } + } + + //Set up the photo property + this.photo = this.account.photos && this.account.photos[0] && this.account.photos[0].value; + + //Set up nicer display name + // XXX for email services, we should show the email account, but we + // cannot rely on userid being a 'pretty' name we can display + userName = this.svcAccount.username; + if (userName && userName !== name) { + name = name + " (" + userName + ")"; + } + + this.displayName = name; + + // Figure out what module will handle contacts. + this.contactsName = (this.svc.overlays && + this.svc.overlays[this.contactsName]) || + this.contactsName; + + //Listen for options changes and update the account. + this.optionsChangedSub = dispatch.sub('optionsChanged', fn.bind(this, function (options) { + this.options = options; + this.optionsChanged(); + })); + + //Listen for updates to base64Preview + this.base64PreviewSub = dispatch.sub('base64Preview', fn.bind(this, function (dataUrl) { + $('[name="picture_base64"]', this.bodyNode).val(jigFuncs.rawBase64(dataUrl)); + })); + + // listen for successful send, and if so, update contacts list, if + // the send matches this account. + this.sendCompleteSub = dispatch.sub('sendComplete', fn.bind(this, function (data) { + var acct = this.svcAccount; + if (data.to && acct.domain === data.domain && + acct.userid === data.userid && + acct.username === data.username) { + this.contacts.incorporate(data.to); + } + })); + }, + + destroy: function () { + dispatch.unsub(this.optionsChangedSub); + dispatch.unsub(this.base64PreviewSub); + dispatch.unsub(this.sendCompleteSub); + this.select.dom.unbind('change', this.selectChangeFunc); + delete this.selectChangeFunc; + this.select.destroy(); + this.select = null; + parent(this, 'destroy'); + }, + + onRender: function () { + var i, tempNode, acNode; + + //Get a handle on the accordion body + for (i = 0; (tempNode = this.node.childNodes[i]); i++) { + if (tempNode.nodeType === 1 && + tempNode.className.indexOf(this.className) !== -1) { + this.bodyNode = tempNode; + break; + } + } + + if (this.svc.shareTypes.length > 1) { + //Insert a Select widget if it is desired. + this.select = new Select({ + name: 'shareType', + value: this.options.shareType, + options: this.svc.shareTypes.map(function (item) { + return { + name: item.name, + value: item.type + }; + }) + }, $('.shareTypeSelectSection', this.bodyNode)[0]); + + // Listen to changes in the Select + this.selectChangeFunc = fn.bind(this, function (evt) { + this.onShareTypeChange(evt); + }); + this.select.dom.bind('change', this.selectChangeFunc); + + // Update the display that is linked to the select. + if (this.options.shareType) { + this.changeShareType(this.getShareType(this.options.shareType)); + } + } + + if (this.svc.textLimit) { + this.startCounter(); + } + placeholder(this.bodyNode); + + // Set up autocomplete and contacts used for autocomplete. + // Since contacts can have a different + // format/display per service, allow for service overrides. + acNode = $('[name="to"]', this.bodyNode)[0]; + if (acNode) { + require([this.contactsName], fn.bind(this, function (Contacts) { + this.contacts = new Contacts(this.svc, this.svcAccount); + this.autoComplete = new AutoComplete(acNode, this.contacts); + })); + } + + //Create ellipsis for anything wanting ... overflow + $(".overflow", this.node).textOverflow(); + }, + + //Tron Legacy soundtrack anyone? + theGameHasChanged: function (data) { + //If the account/url has changed the data should no + //longer be tracked. + //Convert svcAccount fields to strings because the + //form data will be in strings, even though the + //account data can have things like integers, and want + //string equality operators to stay for linting. + return data.link !== jigFuncs.link(this.options) || + data.userid !== String(this.svcAccount.userid) || + data.domain !== String(this.svcAccount.domain) || + data.username !== String(this.svcAccount.username); + }, + + clearSavedData: function () { + this.memStore = {}; + delete store[this.storeId]; + + //Also clear up the form data. + var root = $(this.bodyNode); + root.find('[name="to"]').val(''); + root.find('[name="subject"]').val(''); + root.find('[name="message"]').val(''); + if (this.svc.textLimit) { + root.find('.counter').html(''); + } + + placeholder(this.bodyNode); + }, + + saveData: function () { + var data = this.getFormData(); + store[this.storeId] = JSON.stringify(data); + }, + + validate: function (sendData) { + return !this.counter || !this.counter.isOver(); + }, + + startCounter: function () { + //Set up text counter + if (!this.counter) { + this.counter = new TextCounter($('textarea.message', this.bodyNode), + $('.counter', this.bodyNode), + this.svc.textLimit - this.urlSize); + } + this.updateCounter(); + }, + + updateCounter: function () { + // Update counter. If using a short url from the web page itself, it could + // potentially be a different length than a bit.ly url so account for + // that. The + 1 is to account for a space before adding the URL to the + // tweet. + this.counter.updateLimit(this.options.shortUrl ? + (this.svc.textLimit - (this.options.shortUrl.length + 1)) : + this.svc.textLimit - this.urlSize); + }, + + //The page options have changed, update the relevant HTML bits. + optionsChanged: function () { + var root = $(this.bodyNode), + opts = this.options, + formLink = jigFuncs.link(opts), + restoredData = this.memStore[formLink], + oldData; + + //Save off previous form data for old URL. + oldData = this.getFormData(); + if (oldData.to || oldData.message || oldData.subject) { + this.memStore[oldData.link] = oldData; + } + + //Delete memory data for current URL if the account changed. + if (restoredData && this.theGameHasChanged(restoredData)) { + restoredData = null; + delete this.memStore[formLink]; + } + + //Mix in any saved data for the new URL if it was in storage. + if (restoredData) { + //Create a temp object so we do not mess with pristine options. + opts = object.create(opts, [{ + to: restoredData.to, + subject: restoredData.subject, + message: restoredData.message, + shareType: restoredData.shareType + }]); + } + + //Update the DOM. + root.find('[name="picture"]').val(jigFuncs.preview(opts)); + root.find('[name="picture_base64"]').val(jigFuncs.preview_base64(opts)); + root.find('[name="link"]').val(formLink); + root.find('[name="title"]').val(opts.title); + root.find('[name="caption"]').val(opts.caption); + root.find('[name="description"]').val(opts.description); + root.find('[name="medium"]').val(opts.medium); + root.find('[name="source"]').val(opts.source); + + //Only set share types if they are available for this type of account. + if (this.select) { + + if (opts.shareType) { + this.select.val(opts.shareType); + this.changeShareType(this.getShareType(opts.shareType)); + } else { + this.selectFirstShareType(); + } + } + + root.find('[name="to"]').val(opts.to); + root.find('[name="subject"]').val(opts.subject); + root.find('[name="message"]').val(opts.message); + + // update text limit for the text counter, if enabled. + if (this.counter) { + this.updateCounter(); + } + + //Kick the placeholder logic to recompute, to avoid gray text issues. + placeholder(this.bodyNode); + }, + + getFormData: function () { + var dom = $('form', this.bodyNode), + data = {}; + //Make sure all form elements are trimmed and username exists. + //Then collect the form values into the data object. + $.each(dom[0].elements, function (i, node) { + var trimmed = node.value.trim(); + + if (node.getAttribute("placeholder") === trimmed) { + trimmed = ""; + } + + node.value = trimmed; + + if (node.value) { + data[node.name] = node.value; + } + }); + + return data; + }, + + getShareType: function (shareTypeValue) { + for (var i = 0, item; (item = this.svc.shareTypes[i]); i++) { + if (item.type === shareTypeValue) { + return item; + } + } + return null; + }, + + selectFirstShareType: function () { + this.select.selectIndex(0); + this.changeShareType(this.svc.shareTypes[0]); + }, + + selectSecondShareType: function () { + this.select.selectIndex(1); + this.changeShareType(this.svc.shareTypes[1]); + }, + + changeShareType: function (shareType) { + var toSectionDom = $('.toSection', this.bodyNode), + shareTypeSectionDom = $('.shareTypeSelectSection', this.bodyNode), + shareType2Dom = $('.shareType2', this.bodyNode), + toInputDom = $('.toSection input', this.bodyNode); + + //If there is a special to value (like linkedin my connections), drop it in + toInputDom.val(shareType.specialTo ? shareType.specialTo : ''); + placeholder(toInputDom[0]); + + if (shareType.showTo) { + toSectionDom.removeClass('hiddenImportant'); + shareTypeSectionDom.addClass('fixedSize'); + shareType2Dom.addClass('hiddenImportant'); + toInputDom.focus(); + } else { + toSectionDom.addClass('hiddenImportant'); + shareTypeSectionDom.removeClass('fixedSize'); + shareType2Dom.removeClass('hiddenImportant'); + } + }, + + onShareTypeChange: function (evt) { + var shareType = this.getShareType(this.select.val()); + this.changeShareType(shareType); + }, + + onSubmit: function (evt) { + //Do not submit the form as-is. + evt.preventDefault(); + + //Make sure all form elements are trimmed and username exists. + //Then collect the form values into the data object. + var sendData = this.getFormData(); + + if (!this.validate(sendData)) { + return; + } + + if (this.options.shortUrl) { + sendData.shorturl = this.options.shortUrl; + } else if (this.svc.shorten) { + sendData.shorten = true; + } + + // fixup to addressing if necessary + if (sendData.to) { + sendData.to = this.contacts.convert(sendData.to); + } + + //Notify the page of a send. + dispatch.pub('sendMessage', sendData); + } + }; + }); +}); diff --git a/web/0.3.4/share/panel/scripts/widgets/AccountPanelFaceBook.js b/web/0.3.4/share/panel/scripts/widgets/AccountPanelFaceBook.js new file mode 100644 index 0000000..e7d24da --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/AccountPanelFaceBook.js @@ -0,0 +1,58 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false */ +"use strict"; + +define([ 'blade/object', './AccountPanel', 'jquery'], +function (object, AccountPanel, $) { + /** + * Just overrides a text string. + */ + return object(AccountPanel, null, function (parent) { + return { + + onRender: function () { + //Call Parent logic + parent(this, "onRender", arguments); + + this.sourceInputDom = $('[name="source"]', this.bodyNode); + this.formatVideoShare(); + }, + + optionsChanged: function () { + parent(this, "optionsChanged", arguments); + this.formatVideoShare(); + }, + + formatVideoShare: function () { + // facebook will not allow a video share unless there is an image preview, + // so if no image preview, remove the source value. + if (!this.options.previews || !this.options.previews[0] || !this.options.previews[0].http_url) { + this.sourceInputDom.val(''); + } + } + }; + }); +}); diff --git a/web/0.3.4/share/panel/scripts/widgets/AccountPanelLinkedIn.js b/web/0.3.4/share/panel/scripts/widgets/AccountPanelLinkedIn.js new file mode 100644 index 0000000..9292c55 --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/AccountPanelLinkedIn.js @@ -0,0 +1,47 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false */ +"use strict"; + +define([ 'blade/object', './AccountPanel', 'jquery'], +function (object, AccountPanel, $) { + /** + * Just overrides a text string. + */ + return object(AccountPanel, null, function (parent) { + return { + onCreate: function () { + //Call Parent logic + parent(this, "onCreate", arguments); + this.strings.shareTypeLabel = 'visible to'; + }, + onRender: function () { + parent(this, "onRender", arguments); + //Add styling to last item in "visible to" dropdown + $('option[value="contact"]', this.bodyNode).addClass('lineSeparatorOption'); + } + }; + }); +}); diff --git a/web/0.3.4/share/panel/scripts/widgets/DebugPanel.html b/web/0.3.4/share/panel/scripts/widgets/DebugPanel.html new file mode 100644 index 0000000..56e4bea --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/DebugPanel.html @@ -0,0 +1,19 @@ +
        + + +

        debug

        + developer +
        +
        +
        + + + + + + + + + +
        +
        diff --git a/web/0.3.4/share/panel/scripts/widgets/DebugPanel.js b/web/0.3.4/share/panel/scripts/widgets/DebugPanel.js new file mode 100644 index 0000000..e6bd075 --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/DebugPanel.js @@ -0,0 +1,37 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false */ +"use strict"; + +define([ 'blade/object', 'blade/Widget', 'jquery', 'text!./DebugPanel.html'], +function (object, Widget, $, template) { + + //Define the widget. + return object(Widget, null, function (parent) { + return { + template: template + }; + }); +}); diff --git a/web/0.3.4/share/panel/scripts/widgets/PageInfo.html b/web/0.3.4/share/panel/scripts/widgets/PageInfo.html new file mode 100644 index 0000000..e817684 --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/PageInfo.html @@ -0,0 +1,13 @@ +
        +
        +
        +
        +
        +
        +
        {options.title}
        +
        {options.description}
        + {cleanLink(options.url)} + {cleanLink(options.shortUrl)} +
        +
        +
        diff --git a/web/0.3.4/share/panel/scripts/widgets/PageInfo.js b/web/0.3.4/share/panel/scripts/widgets/PageInfo.js new file mode 100644 index 0000000..fe199bd --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/PageInfo.js @@ -0,0 +1,78 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2 */ +/*global define: false */ +"use strict"; + +define([ 'blade/object', 'blade/Widget', 'blade/fn', 'jquery', 'dispatch', + './jigFuncs', 'text!./PageInfo.html', 'jquery.textOverflow'], +function (object, Widget, fn, $, dispatch, + jigFuncs, template) { + + //Define any global handlers + $(function () { + $('body').delegate('#pageInfo .nofollow', 'click', function (evt) { + evt.preventDefault(); + }); + }); + + //Define the widget. + return object(Widget, null, function (parent) { + return { + template: template, + + optionsChanged: function () { + //options have updated, update the UI. + var root = $(this.node), + opts = this.options; + + root.find('.thumb').attr('src', jigFuncs.thumb(opts)); + root.find('.title').text(opts.title); + root.find('.description').text(opts.description); + root.find('.url').text(jigFuncs.cleanLink(opts.url)); + root.find('.shorturl').text(jigFuncs.cleanLink(opts.shortUrl)); + + //Update text overflow. + $(".overflow", this.node).textOverflow(); + }, + + onCreate: function () { + this.optionsChangedSub = dispatch.sub('optionsChanged', fn.bind(this, function (options) { + this.options = options; + this.optionsChanged(); + })); + }, + + onRender: function () { + //Create ellipsis for anything wanting ... overflow + $(".overflow", this.node).textOverflow(); + }, + + destroy: function () { + dispatch.unsub(this.optionsChangedSub); + parent(this, 'destroy'); + } + }; + }); +}); diff --git a/web/0.3.4/share/panel/scripts/widgets/jigFuncs.js b/web/0.3.4/share/panel/scripts/widgets/jigFuncs.js new file mode 100644 index 0000000..9d339f7 --- /dev/null +++ b/web/0.3.4/share/panel/scripts/widgets/jigFuncs.js @@ -0,0 +1,81 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint indent: 2, plusplus: false */ +/*global define: false */ +"use strict"; + +define(['blade/jig', 'services'], function (jig, services) { + + var funcs = { + thumb: function (options) { + var preview = options.previews && options.previews[0]; + if (!preview) { + return ""; + } + if (preview.http_url) { + return jig.htmlEscape(preview.http_url); + } + // Return our data url, this is the thumbnail + return preview.base64; + }, + preview: function (options) { + var preview = options.previews && options.previews[0]; + return preview && preview.http_url; + }, + preview_base64: function (options) { + // Strip the URL down to just the base64 content + var preview = options.previews && options.previews[0]; + return preview && funcs.rawBase64(preview.base64); + }, + link: function (options) { + return options.canonicalUrl || options.url; + }, + cleanLink: function (url) { + return url ? url.replace(/^https?:\/\//, '').replace(/^www\./, '') : url; + }, + profilePic: function (photos) { + //TODO: check for a thumbnail picture, hopefully one that is square. + return photos && photos[0] && photos[0].value || '/share/i/face2.png'; + }, + serviceName: function (domain) { + return services.domains[domain].name; + }, + lastToShareType: function (shareTypes) { + var i, shareType; + for (i = shareTypes.length - 1; (shareType = shareTypes[i]); i--) { + if (shareType.showTo) { + return shareType; + } + } + return null; + }, + rawBase64: function (dataUrl) { + return dataUrl && dataUrl.replace("data:image/png;base64,", ""); + } + }; + + jig.addFn(funcs); + + return funcs; +}); \ No newline at end of file diff --git a/web/0.3.4/share/panel/style.css b/web/0.3.4/share/panel/style.css new file mode 100644 index 0000000..9c9e654 --- /dev/null +++ b/web/0.3.4/share/panel/style.css @@ -0,0 +1,1082 @@ + +/* + jQuery UI autocomplete styles +*/ +.ui-autocomplete.ui-widget-content { + background-color: white; + border: 1px solid #A6AFB6; + color: #222222; +} + +/* Fix the height of the autocomplete */ +.ui-autocomplete { + max-height: 85px; + overflow-x: hidden; + overflow-y: auto; + + position: absolute; + cursor: default; +} + +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} + + +/* Interaction states +----------------------------------*/ +.ui-autocomplete .ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { +} +.ui-autocomplete .ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + text-decoration: none; +} + +.ui-autocomplete .ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #535F6D; + background-color: #535F6D; + color: white; +} + +.ui-autocomplete .ui-state-hover a, +.ui-state-hover a:hover { + text-decoration: none; +} + +.ui-autocomplete .ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #535F6D; + background-color: #535F6D; + color: white; +} + +.ui-autocomplete .ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: white; + text-decoration: none; +} + +.ui-autocomplete .ui-widget :active { + outline: none; +} + +.AutoCompleteRefresh { + position: absolute; + right: 0; + display: none; + border-color: #A6AFB6; + border-style: solid; + border-width: 0 1px 1px 1px; + margin: 0; + padding: 2px; + background: white; + line-height: 24px; + z-index: 100; +} + +.addressing .AutoCompleteRefresh { + top: 26px; +} + +.addressing .toSection .AutoCompleteRefresh { + top: 45px; +} + +.AutoCompleteRefresh button { + float: right; +} + +.addressing .AutoCompleteSpinner { + position: absolute; + top: 6px; + right: 3px; + width: 16px; + height: 16px; + background-image: url('/share/i/loader.gif'); + z-index: 200; +} + +.addressing .toSection .AutoCompleteSpinner { + top: 25px; +} + +* { + padding: 0; + margin: 0; + + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* + general +*/ + +body { + font-family: "Lucida Grande", Verdana, Sans-serif; + font-size: 11px; + line-height: 110%; + overflow: hidden; + max-width: 400px; + width: 100%; + height: 100%; + background-color: #d4dde5; +} + +noscript { + display: block; + padding: 20px; + font-size: 14px; + line-height: 16px; +} + +#wrapper { + width: 100%; + max-width: 400px; + min-height: 180px; + height: 100%; +} + +button::-moz-focus-inner { + border: 0; +} + +button { + height: 24px; + border-width: 1px; + border-style: solid; + border-color: #aaa; + cursor: pointer; + padding: 0 10px; + + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); +} + +button:active { + -webkit-box-shadow: 0 0 1px #666666 inset; + -moz-box-shadow: 0 0 1px #666666 inset; + box-shadow: 0 0 1px #666666 inset; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc)); + background-image: -moz-linear-gradient(center top , #eee 0%, #ccc 100%); +} + +h2 { + font-size: 13px; + color: #535f6d; + text-shadow: 1px 1px 0 rgba(255,255,255, 0.5); +} + +h3 { + font-weight: bold; + font-size: 11px; + line-height: 14px; + color: #535f6d; +} + +/* + header +*/ + +header { + width: 100%; + padding: 8px 5px 10px 10px; + background-color: #d4dde5; +} + +header h1 { + font-size: 11px; +} + +header a { + text-decoration: none; + outline: none; + color: #535F6D; +} + +header a:hover { + text-decoration: underline; +} + +header nav ul { + list-style-type: none; +} + +header nav ul li { + display: inline-block; + padding: 0 5px; + float: left; +} + +header nav ul li.settings { + border-width: 0 1px 0 0; + border-style: solid; + border-color: #535f6d; +} + +header span.close { + width: 12px; + height: 13px; + background-image: url("i/sprite.png"); + background-position: center 0; + display: block; + cursor: pointer; +} + +header span.close:active { + background-position: center -13px; +} + +header a.new { + color: #ff5959; + font-weight: bold; +} + +#pageInfo, #accounts { + width: 100%; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d4dde5), color-stop(100%, #c6d1da)); + background-image: -moz-linear-gradient(top, #d4dde5 0%, #c6d1da 100%); +} + +/* + page info +*/ +#pageInfo { + padding: 10px 10px 20px; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d4dde5), color-stop(100%, #c6d1da)); + background-image: -moz-linear-gradient(top, #d4dde5 0%, #c6d1da 100%); +} + +#pageInfo .thumbContainer { + /* Set to be the max values for .thumbnail img */ + width: 90px; + height: 60px; + overflow:hidden; +} + +#pageInfo .thumbnail { + margin: 0 auto; +} + +#pageInfo .thumbnail img { + border: none; + margin: 0 auto; + + /* See .thumbContainer styles if these values changed. */ + max-width: 90px; + max-height: 60px; + display: block; + + border: 1px solid #a6afb6; + + -webkit-box-shadow: 1px 1px 0 rgba(255,255,255, 0.5); + -moz-box-shadow: 1px 1px 0 rgba(255,255,255, 0.5); + box-shadow: 1px 1px 0 rgba(255,255,255, 0.5); +} + +#pageInfo .shareInfo { + padding: 0 0 0 10px; +} + +#pageInfo .pageTitle { + line-height: 18px; + font-size: 13px; + color: #535f6d; + text-shadow: 1px 1px 0 rgba(255,255,255, 0.5); +} + +#pageInfo .pageDescription { + padding: 5px 0; + font-size: 10px; + color: #535F6D; +} + +#pageInfo .pageDescription:empty { + display: none; +} + +#pageInfo .url, +#pageInfo .shorturl { + font-size: 10px; + color: #A6AFB6; + display: table; + text-decoration: none; + padding: 3px 5px; + cursor: default; +} + +#pageInfo .url.selected, +#pageInfo .shorturl.selected { + background-color: #E1E7ED; + color: #848B91; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +/* + generic styles for account panels +*/ + +.ui-accordion-header { + color: #535F6D; + display: block; + border-width: 1px 0; + border-color: #a6afb6; + border-style: solid; + margin-top: -1px; + outline: none; + padding: 10px; + cursor: pointer; + width: 100%; + + -moz-user-select: none; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d4dde5), color-stop(100%, #c6d1da)); + background-image: -moz-linear-gradient(top, #d4dde5 0%, #c6d1da 100%); +} + +.ui-accordion-header.ui-state-active { + background-image: none; + border-bottom: 1px solid transparent; + background-color: #E9EEF2; +} + +.ui-accordion-content { + background-color: #e9eef2; +} + +.share { + float: right; +} + +img.avatar { + border: 1px solid #FFFFFF; + height: 23px; + margin: 2px 10px 0 0; + width: 23px; + + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); +} + +.shareTypeSection { + padding: 2px 0 5px; + height: 52px; +} + +.widgets-AccountPanel .addressing { + position: relative; +} + +.hidden { + display: none; +} + +.hiddenImportant { + display: none !important; +} + +span.arrow, +span.icon { + display: inline-block; + background-image: url("i/sprite.png"); + background-repeat: no-repeat; + vertical-align: middle; +} + +span.arrow { + width: 12px; + height: 14px; +} + +span.icon { + width: 16px; + height: 14px; + margin: 0 5px; +} + + + +span.icon.settings { + background-image: url("/share/i/sprite.png"); + background-position: center 4px; +} + +span.icon.twitter { + background-image: url("/share/i/sprite.png"); + background-position: center -37px; +} + +span.icon.facebook { + background-image: url("/share/i/sprite.png"); + background-position: center -70px; +} + +span.icon.gmail { + background-image: url("/share/i/sprite.png"); + background-position: center -103px; +} + +span.icon.yahoo { + background-image: url("/share/i/sprite.png"); + background-position: center -134px; +} + +span.icon.googleapps { + background-image: url("/share/i/sprite.png"); + background-position: center -166px; +} + +span.icon.linkedin { + background-image: url("/share/i/LinkedIn_Logo16px.png"); + background-position: center; +} + +span.icon.debug { + background-image: url("/share/i/bug_b.png"); + background-position: center; +} + + +.ui-accordion-header span.arrow { + background-position: center -102px; +} + +.ui-accordion-header.ui-state-active span.arrow { + background-position: center -120px; +} + +.ui-accordion-header:not(.ui-state-active) .username { + opacity: 0.5; +} + +.ui-accordion-header.ui-state-hover .username { + opacity: 1.0; +} + +.ui-accordion-content .padding { + padding: 0 10px 10px; +} + +.ui-accordion-content textarea, +.ui-accordion-content input[type="text"] { + width: 100%; + font-family: "Lucida Grande", Verdana, Sans-serif; + font-size: 11px; + padding: 2px; + margin: 2px 0; + border-width: 1px; + border-style: solid; + border-color: #A6AFB6; + + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset; + -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset; + box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset; +} + +.placeholder { + color: #aaa; +} + +.ui-accordion-content textarea:focus, +.ui-accordion-content input[type="text"]:focus { + outline: none; + + -webkit-box-shadow: 0 0 0 2px #C2ECFF inset; + -moz-box-shadow: 0 0 0 2px #C2ECFF inset; + box-shadow: 0 0 0 2px #C2ECFF inset; +} + +button:focus { + outline: 0; +} + +.account textarea { + width: 100%; + height: 80px; +} + +.ui-accordion-content input[type="text"] { + height: 24px; +} + +.ui-accordion-content .accountActions { + width: 100%; + margin: 8px 0 0 0; +} + +.ui-accordion-content span.count { + line-height: 24px; + color: #535F6D; +} +.ui-accordion-content div.counter { + line-height: 24px; + color: #535F6D; +} + +.ui-accordion-content div.counter.TextCountOver { + color: #880000 +} + +.ui-accordion-content label { + display: block; + margin: 0 0 5px 0; +} + +/* Generic AccountPanel styles */ + +.shareTypeSection label { + color: #535F6D; +} + +.shareTypeSelectSection.fixedSize { + width: 100px; +} + +.Select { + margin: 2px 0 0 0; +} + +.shareTypeSelectSection.fixedSize select { + width: 100px; + margin: 2px 0 0 0; +} + +.toSection { + padding-left: 10px; +} + +body .toSection input[type="text"] { + width: 100%; +} + +.shareType2 { + line-height: 64px; + padding: 0 0 0 10px; + text-decoration: none; + font-style: italic; + color: #535F6D; +} + +.lineSeparatorOption { + border-top: 1px solid #CCCCCC; +} + +.widgets-AccountPanel button:focus { + box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.25); +} + +/* + twitter styles + +span.icon.twitter { + background-position: center -35px; +} + +*/ + + +/* + facebook styles +*/ + +.facebook .facebookActions { + margin: 0 0 10px 0; + width: 100%; +} + +.facebook .facebookActions .to { + width: 100px; + margin-right: 10px; +} + +.facebook .facebookActions .to .dropdownContainer { + height: 24px; + line-height: 24px; + display: block; +} + +.facebook .facebookActions .to select { + width: 100%; +} + +.facebook .facebookActions .list label { + visibility: hidden; +} + +.facebook .facebookActions .list button { + border-left: none; + width: 24px; + background-position: center -157px, center top; + background-repeat: no-repeat; + + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; + + background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); + background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); +} + +.facebook .facebookActions .list button:active { + background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc)); + background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #eee 0%, #ccc 100%); +} + +/* + +span.icon.facebook { + background-position: center -59px; +} +*/ + +/* + google styles +*/ + +.google .subject { + margin: 5px 0; +} + +span.icon.google { + background-position: center -82px; +} + +#news { + padding: 10px; + width: 100%; +} + +#news span.icon.rss { + background-position: center -183px; + margin: 0 5px 0 0; +} + +#news .story { + padding: 5px 0; +} + +/* + hbox & vbox +*/ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; + width: 100%; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} + +/* + clearfix +*/ + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} + +/* + webkit specific styles +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + + #wrapper { + background-color: #404040; + } + + .overflow { + text-overflow: ellipsis; + overflow-x: hidden; + white-space: nowrap; + } + + div.title { + white-space: wrap; + } + + .flip { + -webkit-transform-style: preserve-3d; + -webkit-backface-visibility: hidden; + -webkit-transition: -webkit-transform 0.7s ease-in-out; + } + + .front_flip { + -webkit-transform: rotateY(-180deg); + z-index: 900; + } + + .back_flip { + -webkit-transform: rotateY(0deg) !important; + z-index: 1000; + } + +} + +/* === STATUS MESSAGES === */ + +div.status { + position: absolute; + height: 100%; + width: 100%; + min-height: 180px; + top: 0; + left: 0; + color: #0a0a0a; + font-size: 14px; + text-align: center; + line-height: 18px; + z-index: 500; +} + +div.status table { + width: 100%; + height: 100%; + padding: 10px; +} + +div.status td { + vertical-align: center; + height: 100%; +} + +#statusCaptcha { + line-height: normal; + background-color: #f2f2f2; +} + +div.captcha-wrap { + /* we need this to take up the full height of the status bar */ +} + +div.captcha-wrap img { + width: 200px; + height: 55px; + margin: 0 10px; +} + +div.captcha-wrap .text, +div.captcha-wrap .subtext { + font-size: smaller; + color: #444; + text-align: left; +} + +div.captcha-wrap .subtext { + color: #666; +} + +div.captcha-wrap .controls { + width: 100%; +} + +div.captcha-wrap button { + height: 30px; + border-width: 1px 1px 1px 0; + border-style: solid; + border-color: #888; + cursor: pointer; + padding: 0 10px; + margin: 0; + + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); +} + +div.captcha-wrap button:active { + -webkit-box-shadow: 0 0 1px #666666 inset; + -moz-box-shadow: 0 0 1px #666666 inset; + box-shadow: 0 0 1px #666666 inset; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc)); + background-image: -moz-linear-gradient(center top , #eee 0%, #ccc 100%); +} + +div.captcha-wrap input { + border-width: 1px; + border-style: solid; + border-color: #888; + font-family: "Lucida Grande", Verdana, sans-serif; + font-size: 12px; + line-height: 18px; + padding: 3px; + margin: 0; + + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; + + -webkit-box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff; + -moz-box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff; + box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff; +} + +#captchaSuround { + max-height: 80px; +} +#captchaImage { + border: 1px solid #888; +} + +#captchaSound { + border: 1px solid #888; + width: 10px; + height: 10px; +} + +div.status img { + vertical-align: middle; +} + +#statusSharing { + background-color: #f2f2f2; + + -webkit-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + -moz-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; +} + +#statusShared { + background-color: #77E069; + + -webkit-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + -moz-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; +} + +#statusShared a { + color: #0a0a0a; + text-decoration: underline; +} + +.shareDomain { + display: inline-block; + max-width: 200px; + font-weight: bold; +} + +div.status.error, +div.status.warning { + background-color: #ff5959; + color: #fff; + text-align: center; + + -webkit-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + -moz-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; +} + +div.status.intermediate.error { + background-color: #FFA770; + + -webkit-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + -moz-box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; + box-shadow: 0 0 200px rgba(0,0,0,0.25) inset; +} + +div.status.intermediate.error .statusButton { + border-color: #AB4D00; +} + +div.status.noConfig { + text-shadow: 1px 1px 0 rgba(255,255,255,0.75); + line-height: 18px; + background-color: #f2f2f2; +} + +div.status.noConfig img { + display: block; + margin: 0 auto 5px; +} + +div.status.noConfig a { + color: #00A0FF; + text-decoration: none; +} + +div.status.noConfig a:hover { + text-decoration: underline; +} + +.statusButton { + font-size: 11px; + vertical-align: baseline; + font-weight: normal; + border-color: maroon; + position: absolute; + right: 10px; + bottom: 10px; + + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.statusButton:active { + -webkit-box-shadow: 0 0 1px #666666 inset, 0 1px 0 rgba(255,255,255,0.25); + -moz-box-shadow: 0 0 1px #666666 inset, 0 1px 0 rgba(255,255,255,0.25); + box-shadow: 0 0 1px #666666 inset, 0 1px 0 rgba(255,255,255,0.25); +} + +#statusErrorMessage { + display: inline-block; +} diff --git a/web/0.3.4/share/share.css b/web/0.3.4/share/share.css new file mode 100644 index 0000000..348e4a1 --- /dev/null +++ b/web/0.3.4/share/share.css @@ -0,0 +1,1038 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +* { + margin: 0; + padding: 0; + outline: none; + border: none; + border-collapse: collapse; + position: relative; + font-family: inherit; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + vertical-align: top; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + list-style-type: none; +} + +noscript { + display: block; + text-align: center; + padding: 20px; + font-size: larger; +} + +body { + font-size: 11px; + font-family: "Lucida Grande", Verdana, sans-serif; + max-height: 113px; + overflow: hidden; + background-color: #fff; + background-position: bottom center; + background-repeat: no-repeat; + background-color: #fff; +} + +body.loading { + background-color: #ddd; + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); + background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%); +} + +body.status { + height: 37px; + max-height: 37px; +} + +/* Turn off some things if not in dev */ +html.staging body li.debugTab, +html.prod body li.debugTab { + display: none; +} + +a { + text-decoration: none; + outline: none; + color: #00A0FF; +} + +.hidden, +ul.nav li.hidden { + display: none; +} + +.invisible, +body #tabs.invisible { + visibility: hidden; +} + +#tabs { + min-height: 113px; + padding: 0 10px; + overflow: hidden; + border-bottom: 1px solid #777; + background-color: #ddd; + background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%); +} + +button::-moz-focus-inner { + border: 0; +} + +button { + padding: 2px 15px; + background-image: -moz-linear-gradient(center top , #FAFAFA 0%, #DDDDDD 100%); + border-width: 1px; + border-style: solid; + border-color: #888; + -moz-border-radius: 2px; + margin-left: 5px; + cursor: pointer; + -moz-box-shadow: 0 1px 0 #fff; +} + +button:active { + background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #CCCCCC 100%); + -moz-box-shadow:0 0 1px #666666 inset, 0 1px 0 #FFFFFF; +} + +/* === TABS === */ + +ul.nav { + display: block; + width: 100%; + /* min-height for when all tabs are hidden on first config. */ + min-height: 32px; +} + +ul.nav li { + width: auto; + display: inline-block; + float: left; + list-style-type: none; + margin: 3px 0; + font-size: 11px; + line-height: 24px; + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); + border-width: 1px; + border-style: solid; + border-color: #888; + -moz-box-shadow: 0 1px 0 #fff; + position: relative; +} + +ul.nav li.ui-state-focus { + -moz-box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.25); + z-index: 1000; + position: relative; +} + +ul.nav li:nth-child(n+2) { + border-left: none; + -moz-border-radius: 0; +} + +ul.nav li.first { + -moz-border-radius-topleft: 2px; + -moz-border-radius-bottomleft: 2px; + border-left: 1px solid #888888; +} + +ul.nav li.last { + -moz-border-radius-topright: 2px; + -moz-border-radius-bottomright: 2px; +} + +ul.nav li.first.last { + border-left: 1px solid #888; +} + +ul.nav li a.icon { + font-weight: bold; + color: #333; + text-shadow: 1px 1px 0 rgba(255,255,255,0.25); + height: 24px; + background-repeat: no-repeat; + background-position: left center; + display: block; + background-image: url("i/sprite.png"); + background-repeat: no-repeat; + padding: 0 17px 0 17px; + text-indent: -1000px; + position: relative; +} + +ul.nav li a.icon:hover:before { + content: "\25B2"; + position: absolute; + left: 12px; + top: 14px; + color: rgba(0,0,0,0.75); + display: block; + text-indent: 0; + text-shadow: none; + z-index: 100000; +} + +ul.nav li a.icon:hover:after { + content: attr(name); + position: absolute; + left: 0; + top: 30px; + color: #fafafa; + padding: 0 10px; + display: block; + text-indent: 0; + background-color: rgba(0,0,0,0.75); + text-shadow: none; + text-align: center; + white-space: nowrap; + overflow: visible; + z-index: 100000; +} + +ul.nav li a.icon.settings { + background-position: center 4px; +} + +ul.nav li a.icon.twitter { + background-position: center -31px; +} + +ul.nav li a.icon.facebook { + background-position: center -65px; +} + +ul.nav li a.icon.gmail { + background-position: center -98px; +} + +ul.nav li a.icon.yahoo { + background-position: center -128px; +} + +ul.nav li a.icon.googleapps { + background-position: center -161px; +} + +ul.nav li a.icon.linkedin { + background-image: url("i/LinkedIn_Logo16px.png"); + background-position: center; +} + +ul.nav li a.icon.debug { + background-image: url("i/bug_b.png"); + background-position: center; +} + +ul.nav .rightActions { + position: absolute; + top: 8px; + right: 0; + height: 16px; + line-height: 16px; +} + +ul.nav .rightActions a { + padding: 0 5px; + border-right: 1px dotted #888; +} + +ul.nav .rightActions a:hover { + text-decoration: underline; +} + +ul.nav .rightActions a.new { + color: #ff5959; + font-weight: bold; +} + +ul.nav .rightActions span.close { + width: 16px; + height: 16px; + display: inline-block; + margin-left: 3px; + cursor: pointer; + background-image: url("i/sprite.png"); + background-position: left -237px; + background-repeat: no-repeat; +} + +ul.nav .rightActions span.close:hover { + background-image: url("i/sprite.png"); + background-position: left -201px; + background-repeat: no-repeat; +} + +/* === TAB TOOLTIP === */ + +#tabToolTip { + position: absolute; + background-color: rgba(0,0,0,0.8); + color: #fff; + top: 2px; + left: 52px; + width: 70px; + text-align: center; + z-index: 100; + display: none; + line-height: 20px; +} + +#tabToolTip span.arrow { + border-color:transparent rgba(0,0,0,0.8) transparent transparent; + border-style: solid; + border-width: 10px; + height: 0; + left: -20px; + position: absolute; + top: 0; + width: 0; +} + +/* === USER INFO TAB THING === */ + +ul.nav .user-info { + border-left: 1px dotted #888888; + display: inline-block; + font-size: 11px; + line-height: 21px; + margin: 4px 10px; + padding: 0 10px; +} + +ul.nav .user-info .status { + display: none; + -moz-border-radius: 100px; + width: 8px; + height: 8px; + vertical-align: middle; + background-image: -moz-radial-gradient(center, circle cover, #44aaff 0% , #2288ff 50%, #0066dd 90%, #444 100%); +} + +ul.nav .user-info .status.inactive { + background-image: -moz-radial-gradient(center, circle cover, #ddd 0%, #999 50%, #777 90%, #444 100%); +} + +ul.nav .user-info .username { + font-size: 11px; + vertical-align: middle; + font-weight: bold; +} + +ul.nav .user-info img.avatar { + -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); + border: 1px solid #FFFFFF; + height: 23px; + margin-right: 5px; + width: 23px; +} + +/* === SETTINGS TAB === */ + +ul.nav li.settings, +ul.nav li.settings.ui-tabs-selected { + text-align: center; + -moz-border-radius: 2px; +} + +ul.nav li.settings { + border: 1px solid #888; +} + +ul.nav .navSpacer { + border-left: 1px dotted #888888; + display: inline-block; + min-height: 24px; + float: left; + margin: 4px 10px; +} + +/* === TAB SELECTED === */ + +ul.nav li.ui-tabs-selected { + -moz-box-shadow:0 0 5px #444 inset, 0 1px 0 #FFFFFF; + background-image:-moz-linear-gradient(center top , #bbb 0%, #aaa 100%); + border-color: #666; +} + +ul.nav li.ui-tabs-selected a.debug { + background-image: url("i/bug_b.png"); +} + +/* === TAB PANELS === */ + +.messageForm { + min-height: 71px; + padding: 5px 0; + width: 100%; +} + +.ui-tabs .ui-tabs-hide { + display: none; +} + +.ui-tabs-panel .user { + display: none; +} + +.thumb { + -moz-border-radius: 2px 2px 2px 2px; + -moz-box-shadow: 0 1px 0 #fff; + background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%); + border: 1px solid #BBBBBB; + height: 71px; + margin: 0 5px 0 0; + padding: 4px; +} + +.thumb .image { + background-color: #FFFFFF; + border: 1px solid #AAAAAA; + display: inline-block; + height: 61px; + width: 90px; + text-align: center; +} + +.thumb .image .thumb { + -moz-border-radius: 0px; + background-image: none; + border: none; + height: auto; + margin: 0; + padding: 0; + max-width: 90px; +} + +div.image, +div.meta { + display: inline-block; + overflow: hidden; +} + +.meta { + padding: 0 3px; + width: 150px; + line-height: 14px; +} + +.meta .title { + font-size: 11px; + font-weight: bold; + white-space: nowrap; +} + +.meta .description { + color: #444; + white-space: normal; + font-size: 9px; + overflow: hidden; +} + +.meta .url, +.meta .surl { + font-size: 9px; + text-decoration: none; + display: block; + white-space: nowrap; + color: #00A0FF; +} + +.addressing { + margin: 0 5px 0 0; + width: 253px; +} + +button.share { + -moz-border-radius: 0 2px 2px 0; + border-left: medium none; + margin-left: 0; +} + +button.share:focus { + -moz-box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.25); +} + +/* Disable user resizing of text area since it covers the twitter count. */ +textarea { + resize: none; +} + +textarea, input[type="text"] { + border-width: 1px; + border-style: solid; + border-color: #888; + font-family: "Lucida Grande", Verdana, sans-serif; + font-size: 12px; + line-height: 18px; + padding: 3px; + margin: 0; + width: 100%; + -moz-border-radius: 2px; + -moz-box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff; +} + +textarea:focus, input[type="text"]:focus { + -moz-box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.25) inset, 0 1px 0 #fff; +} + + +textarea.message { + -moz-border-radius: 2px 0 0 2px; + font-size: 14px; + min-height: 71px; +} + +input[type="text"] { + height: 33px; + width: 100%; + margin-bottom: 5px; +} + +input[type="text"]:last-child { + margin-bottom: 0; +} + +input[type="text"].placeholder, +input[type="password"].placeholder, +textarea.placeholder { + color: #888; +} + +/* === TWITTER PANEL === */ +.message .counter { + position: absolute; + bottom: 3px; + right: 5px; + color: #888; + font-weight: bold; +} + +.TextCountOver { + color: red !important; +} + +/* === AUTOCOMPLETE === */ +ul.ui-autocomplete { + background-color: #fff; + min-width: 253px; + width: 253px; + border: 1px solid #aaa; + border-top: none; + -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.5); +} + +ul.ui-autocomplete li.ui-menu-item a { + padding: 5px; + width: 100%; + overflow-x: hidden; + white-space: nowrap; + cursor: pointer; + display: block; +} + +ul.ui-autocomplete li.ui-menu-item a.ui-state-hover { + background-color: #00A0FF; + background-image: -moz-linear-gradient(top, #00a0ff 0%, #0D93E0 100%); + color: white; + font-weight: bold; +} + +/* === SETTINGS PANEL === */ + +#settings .aboutLink { + display: block; +} + +#settings .account { + display: inline-block; + width: 100%; + line-height: 22px; + color: #54B851; + font-weight: bold; +} + +#settings .account img { + width: 22px; + height: 22px; +} + +#settings .account .name, +#settings .account .accountDomain { + +} + +#settings ul { + min-width: 660px; +} + +#settings ul li { + display: inline-block; + float: left; + width: 140px; + min-height: 71px; +} + +#settings ul li { + padding: 0 10px 0; + border-width: 0 1px; + border-left-style: dotted; + border-color: #888; +} + +#settings ul li:nth-child(1) { + padding: 0 10px 0 0; + border: none; +} + +#settings ul li:nth-child(4) { + padding: 0 0 0 10px; +} + +#settings ul li button { + margin: 0; + width: 100%; + padding: 5px 0; +} + + +#settings ul li h1 { + margin: 0 0 10px 0; +} + +#settings ul li h1 span.accountIcon { + width: 16px; + height: 16px; + display: inline-block; +} + +#settings ul li h1 .twitterIcon { + background-image: url("i/sprite.png"); + background-position: left -36px; + background-repeat: no-repeat; +} + +#settings ul li h1 .facebookIcon { + background-image: url("i/sprite.png"); + background-position: left -70px; + background-repeat: no-repeat; +} + +#settings ul li h1 .gmailIcon { + background-image: url("i/sprite.png"); + background-position: left -103px; + background-repeat: no-repeat; +} + +#settings ul li h1 .yahooIcon { + background-image: url("i/sprite.png"); + background-position: left -132px; + background-repeat: no-repeat; +} + +#settings ul li h1 .googleappsIcon { + background-image: url("i/sprite.png"); + background-position: left -165px; + background-repeat: no-repeat; +} + +#settings ul li h1 .linkedinIcon { + background-image: url("i/LinkedIn_Logo16px.png"); + background-position: left -192px; + background-repeat: no-repeat; +} + +h1 { + font-weight: bold; + margin: 0 0 5px 0; + color: #0a0a0a; + padding: 5px 0 0 0; + /* border-top: 1px dotted #888; */ +} + +h1 a { + font-weight: normal; +} + +h1 img { + margin-top: -1px; +} + +#settings .settings { + width: 253px; + margin: 0 0 0 10px; + padding: 0 0 0 10px; + border-left: 1px dotted #888; + color: #444; +} + +#settings .success { + width: 100%; + line-height: 24px; + color: #54B851; + font-weight: bold; +} + +#settings span.check { + width: 22px; + background-color: #54B851; + color: #fff; + -moz-border-radius: 12px; + display: inline-block; + font-size: 12px; + font-weight: normal; + text-align: center; +} + +#settings .config { + color: #444444; + margin: 0 0 0 10px; + padding: 0 0 0 10px; + border-left: 1px dotted #888; + width: 220px; +} + +#settings .config ul { + width: auto; + min-width: 0; +} + +#settings .config ul li { + display: block; + border: none; + width: auto; + min-height: 0; + height: auto; + float: none; + padding: 4px 0; +} + +#settings .config ul li input[type="checkbox"] { + margin: 0 5px 0 0; +} + +#settings .remove { + font-weight: normal; + line-height: 7px; + padding-left: 26px; + display: block; +} + + +#settings .remove a:hover { + color: red; +} + +/* === STATUS MESSAGES === */ + +#clickBlock { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image:-moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%); +} + +div.status { + position: absolute; + width: 100%; + height: 113px; + line-height: 113px; + top: 0; + left: 0; + color: #0a0a0a; + font-size: 14px; + text-align: center; +} + +#statusCaptcha { + line-height: normal; +} + +div.captcha-wrap { + /* we need this to take up the full height of the status bar */ + height: 113px; +} + +div.captcha-wrap img { + width: 200px; + height: 55px; + margin: 0 10px; +} + +div.captcha-wrap .text, +div.captcha-wrap .subtext { + font-size: smaller; + color: #444; + text-align: left; +} + +div.captcha-wrap .subtext { + color: #666; +} + +div.captcha-wrap .controls { + width: 100%; +} + +div.captcha-wrap button { + height: 30px; + border-width: 1px 1px 1px 0; + border-style: solid; + border-color: #888; + cursor: pointer; + padding: 0 10px; + margin: 0; + -moz-border-radius: 0 2px 2px 0; + -webkit-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); +} + +div.captcha-wrap button:active { + -moz-box-shadow: 0 0 1px #666666 inset; + -webkit-box-shadow: 0 0 1px #666666 inset; + box-shadow: 0 0 1px #666666 inset; + background-image: -moz-linear-gradient(center top , #eee 0%, #ccc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc)); +} + +div.captcha-wrap input { + border-width: 1px; + border-style: solid; + border-color: #888; + font-family: "Lucida Grande", Verdana, sans-serif; + font-size: 12px; + line-height: 18px; + padding: 3px; + margin: 0; + -moz-border-radius: 2px 0 0 2px; + -moz-box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff; +} + +#captchaSuround { + max-height: 80px; +} +#captchaImage { + border: 1px solid #888; +} + +#captchaSound { + border: 1px solid #888; + width: 10px; + height: 10px; +} + +div.status img { + vertical-align: middle; +} + +#statusSharing { + background-color: transparent; +} + +#statusShared { + background-color: rgba(0,255,0,0.4); +} + +#statusShared a { + color: #0a0a0a; + text-decoration: underline; +} + +.shareDomain { + display: inline-block; + max-width: 200px; + font-weight: bold; +} + +div.status.error, +div.status.warning { + background-color: rgba(255,0,0,0.5); + color: #fff; +} + +div.status.intermediate.error { + background-color: rgba(255,115,0,0.75); +} + +div.status.intermediate.error .statusButton { + border-color: #AB4D00; +} + +div.status.noConfig { + text-shadow: 1px 1px 0 rgba(255,255,255,0.75); + line-height: 18px; +} + +div.status.noConfig img { + display: block; + margin: 20px auto 5px; +} + +.statusButton { + font-size: 11px; + vertical-align: baseline; + font-weight: normal; + -moz-box-shadow: none; + border-color: maroon; +} + +.statusButton:active { + -moz-box-shadow: 0 0 1px #666666 inset, 0 1px 0 rgba(255,255,255,0.25); +} + +#statusErrorMessage { + display: inline-block; +} + +/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ +/* hbox and vbox classes */ + +.hbox { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + + display: box; + box-orient: horizontal; + box-align: stretch; +} + +.hbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.vbox { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + + display: box; + box-orient: vertical; + box-align: stretch; +} + +.vbox > * { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + display: block; +} + +.spacer { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.reverse { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} + +.boxFlex0 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; +} + +.boxFlex1, .boxFlex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.boxFlex2 { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +.boxGroup1 { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} + +.boxGroup2 { + -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; + box-flex-group: 2; +} + +.start { + -webkit-box-pack: start; + -moz-box-pack: start; + box-pack: start; +} + +.end { + -webkit-box-pack: end; + -moz-box-pack: end; + box-pack: end; +} + +.center { + -webkit-box-pack: center; + -moz-box-pack: center; + box-pack: center; +} +/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */ + +/* clearfix */ + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} diff --git a/web/0.3.4/share/testframe.html b/web/0.3.4/share/testframe.html new file mode 100644 index 0000000..f8c954b --- /dev/null +++ b/web/0.3.4/share/testframe.html @@ -0,0 +1,82 @@ + + + + + Test IFrame + + + + + + + +
        +
        +
        + Options: + + +
        + + diff --git a/web/0.3.4/stats/index.html b/web/0.3.4/stats/index.html new file mode 100644 index 0000000..b771bcb --- /dev/null +++ b/web/0.3.4/stats/index.html @@ -0,0 +1,48 @@ + + + + Share History + + + + + + + + +

        Statistics

        + +
        There was an error: {message}
        +
        +
        +
        Accounts per domain
        +
        +
        +
        +
        Shares per domain
        +
        +
        +
        +
        +
        +
        Shares per day
        +
        +
        +
        +
        +
        + + diff --git a/web/0.3.4/stats/index.js b/web/0.3.4/stats/index.js new file mode 100644 index 0000000..964a882 --- /dev/null +++ b/web/0.3.4/stats/index.js @@ -0,0 +1,180 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +/*jslint plusplus: false */ +/*global define: false, location: true, window: false, alert: false */ +"use strict"; + +define([ "require", "jquery", "rdapi", "blade/jig"], +function (require, $, rdapi, jig) { + rdapi('stats/accounts', { + data: { + opts: 'domain' + }, + success: function (json) { + if (json.error) { + $('#notifications').append(jig('#error', json.error)); + } else { + $('#notifications').append(jig('#error', json.result)); + + var w = 200, + h = 200, + r = w / 2 + + var sum = pv.sum(json.map(function (d) d[0])); + + var vis = new pv.Panel() + .width(w) + .height(h) + .canvas("accounts_per_domain"); + + vis.add(pv.Wedge) + .data(json) + .left(w/2) + .bottom(w/2) + .outerRadius(r) + .angle(function(d) d[0] / sum * 2 * Math.PI) + .strokeStyle("white") + .lineWidth(4) + .anchor("center").add(pv.Label) + .text(function(d) d[1]+": "+(d[0] / sum * 100).toFixed(2)+"%"); + vis.render(); + + } + } + }); + + rdapi('stats/history', { + data: { + opts: 'domain' + }, + success: function (json) { + if (json.error) { + $('#notifications').append(jig('#error', json.error)); + } else { + $('#notifications').append(jig('#error', json.result)); + + var w = 200, + h = 200, + r = w / 2 + + var sum = pv.sum(json.map(function (d) d[0])); + + var vis = new pv.Panel() + .width(w) + .height(h) + .canvas("shares_per_domain"); + + vis.add(pv.Wedge) + .data(json) + .left(w/2) + .bottom(w/2) + .outerRadius(r) + .angle(function(d) d[0] / sum * 2 * Math.PI) + .strokeStyle("white") + .lineWidth(4) + .anchor("center").add(pv.Label) + .text(function(d) d[1]+": "+(d[0] / sum * 100).toFixed(2)+"%"); + vis.render(); + + } + } + }); + + rdapi('stats/history', { + data: { + opts: 'perday' + }, + success: function (json) { + if (json.error) { + $('#notifications').append(jig('#error', json.error)); + } else { + $('#notifications').append(jig('#error', json.result)); +// test data +//json = [["2010-11-10", 242], ["2010-11-11", 6321], ["2010-11-12", 6059], +// ["2010-11-13", 3585], ["2010-11-14", 2391], ["2010-11-15", 3222], +// ["2010-11-16", 3403], ["2010-11-17", 2950], ["2010-11-18", 2788], +// ["2010-11-19", 2369], ["2010-11-20", 1458], ["2010-11-21", 1415], +// ["2010-11-22", 2039], ["2010-11-23", 1945], ["2010-11-24", 1966], +// ["2010-11-25", 1880], ["2010-11-26", 1784], ["2010-11-27", 1121], +// ["2010-11-28", 1221], ["2010-11-29", 1782], ["2010-11-30", 1875], +// ["2010-12-01", 1798], ["2010-12-02", 1601]]; + var max = pv.max(json.map(function (d) d[1])); + var days = json.map(function (d) d[0]); + + /* Sizing and scales. */ + var w = 800, + h = 400, + left = 40, + btm = 100, + bsp = 2, + bw = (w/json.length-2) - bsp; + + /* The root panel. */ + var vis = new pv.Panel() + .width(w) + .height(h) + .canvas("shares_per_day"); + + /* The bars. */ + vis.add(pv.Bar) + .data(json) + .bottom(btm-10).width(bw) + .height(function(d) (d[1] / max) * h) + .left(function() this.index * (bw+bsp) + left); + + /* y-axis and ticks. */ + var hmarks = 10; + var interval = max/hmarks; + var hspace = ((h-btm)/interval)/(hmarks-1); + vis.add(pv.Rule) + .data(pv.range(0, max, interval)) + .bottom(function(d) d * hspace + btm -10) + .strokeStyle("lightgrey") + .left(left) + .width(w-left) + .anchor("left").add(pv.Label) + .visible(function(d) d > 0) + .text(function (d) d.toFixed()); + + /* X-axis and ticks. */ + vis.add(pv.Rule) + .data(days) + .left(function() this.index * (bw+bsp) + left + bw/2) + .bottom(80) + .height(5) + .anchor("bottom").add(pv.Label) + .text(function (d) d) + .textAlign("left") + .textBaseline("middle") + .textAngle(Math.PI / 2) + + + vis.render(); + + } + } + }); + + +}); diff --git a/web/0.3.4/style.css b/web/0.3.4/style.css new file mode 100644 index 0000000..5f082fb --- /dev/null +++ b/web/0.3.4/style.css @@ -0,0 +1,339 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Raindrop. + * + * The Initial Developer of the Original Code is + * Mozilla Messaging, Inc.. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * */ + +* { + margin: 0; + padding: 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + list-style-type: none; +} + +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 21px; + color: #0a0a0a; +} + +button::-moz-focus-inner { + border: 0; +} + +a { + color: #00a0ff; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +strong { + font-weight: bold; +} + +.textRight { + text-align: right; +} + +hr { + display: block; + width: 700px; + height: 1px; + background-color: #e6e6e6; + color: #e6e6e6; + border: none; + margin: 0 auto 20px; +} + +/* grid */ + +.c1, .c2, .c3 { + display: inline-block; + float: left; + min-height: 1%; + margin: 0 10px; + position: relative; +} + +.c1 { + width: 220px; +} + +.c2 { + width: 460px; +} + +.c3 { + width: 700px; +} + +.row { + float: left; + margin: 10px 0; +} + +.row.about { + margin: 20px 0; +} + +/* end grid */ + +#wrapper { + width: 720px; + margin: 0 auto; + overflow: hidden; +} + +#header.row { + margin: 36px 0; +} + +#header.row .c1, +#header.row .c2 { + height: 90px; +} + +#header.row .logo { + background-image: url("i/f1Logo.png"); + background-repeat: no-repeat; + background-position: 0 -9px; + line-height: 80px; + font-size: 15px; + font-weight: bold; + padding: 0 0 0 185px; + color: #00a0ff; +} + +#header.row button.download { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 18px; + color: #004607; + text-shadow: 1px 1px 0 rgba(255,255,255,0.4); + width: 100%; + border: 1px solid #004607; + padding: 5px 0; + cursor: pointer; + + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + + background-image: -moz-linear-gradient(center top , #84c63c 0%, #5ea330 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #84c63c), color-stop(100%, #5ea330)); +} + +#header.row button.download:hover { + -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.5); + -moz-box-shadow: 0 0 10px rgba(0,0,0,0.5); + box-shadow: 0 0 10px rgba(0,0,0,0.5); +} + +#header.row button.download:active { + -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.5) inset; + -moz-box-shadow: 0 0 5px rgba(0,0,0,0.5) inset; + box-shadow: 0 0 5px rgba(0,0,0,0.5) inset; +} + +#header.row button.download img { + vertical-align: middle; + margin: -1px 4px 0 0; +} + +#header.row button.download span.meta { + display: block; + font-size: 10px; + color: #004607; +} + +#header.row #firefox { + display: none; + font-size: 14px; + padding: 10px 0; +} + +#header.row #no36 { + display: none; + font-size: 11px; +} + +#header.row #noButtonFF4 { + display: none; +} + +.row.headline h1 { + margin: 100px 0 20px; + color: #00A0FF; + font-weight: normal; + font-size: 24px; +} + +.row.headline button { + display: block; + width: 100%; + height: 40px; + margin: 20px 0 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + + background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd)); + + border: 1px solid #888888; + padding: 5px 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + cursor: pointer; +} + +.row.headline button:hover { + border: 1px solid #444; +} + +.row.headline button:active { + -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.5) inset; + -moz-box-shadow: 0 0 5px rgba(0,0,0,0.5) inset; +} + +#movie.c3 { + -moz-box-shadow: 0 5px 10px 0 #666; + -webkit-box-shadow: 0 5px 10px 0 #666; + position: relative; + overflow-x: hidden; +} + +#movie.c3 .corner { + position: absolute; + width: 5px; + height: 5px; + display: block; + z-index: 1; +} + +#movie.c3 .corner.tl { + top: 0; + left: 0; + background-image: url("i/cornerTopLeft.png"); +} + +#movie.c3 .corner.tr { + top: 0; + right: 0; + background-image: url("i/cornerTopRight.png"); +} + +/* +#movie.c3 .corner.br { + bottom: 0; + right: 0; + background-image: url("i/cornerBottomRight.png"); +} + +#movie.c3 .corner.bl { + bottom: 0; + left: 0; + background-image: url("i/cornerBottomLeft.png"); +} +*/ + +#movie.c3 iframe { + float: left; + z-index: 0; + position: relative; +} + +#tagline.c3 { + padding: 10px 0; + border-width: 0 0 1px 0; + border-color: #e6e6e6; + border-style: solid; + font-style: italic; + font-size: 16px; + color: #00A0FF; +} + +#tagline.c3 span.watch { + color: #888; + font-size: 12px; + float: right; + font-style: normal +} + +.description { + font-size: 12px; + color: #666; +} + +.description h1, +.description h2 { + font-size: 14px; + color: #0a0a0a; +} + +.description h3 { + color:#00A0FF; + margin-top:10px; + font-size: 12px; +} + +.description.steps { + margin-top: 14px +} + +.description.steps img { + margin-top: 7px; +} + +.description.steps span.step { + color: #fff; + background-color: orange; + width: 21px; + font-family: monospace; + -moz-border-radius: 12px; + -webkit-border-radius: 12px; + display: inline-block; + text-align: center; + margin-right: 5px; +} + +#footer.row { + font-size: 10px; + color: #888; +} + +#footer .c3 { + border-top: 1px solid #e6e6e6; + padding: 10px 0 0 0; +} + +#info36 { + display: none; + color: #888; + font-size: 11px; + line-height: 11px; +} + +#installFrame { + display: none; +}