diff --git a/build/sushi.js b/build/sushi.js index 7140858..8c98ae3 100644 --- a/build/sushi.js +++ b/build/sushi.js @@ -4,46 +4,53 @@ see: http://github.com/jrburke/requirejs for details */ var require,define; -(function(){function m(f){return q.call(f)==="[object Function]"}function k(f){return q.call(f)==="[object Array]"}function r(f,g,n){for(var l in g)if(!(l in x)&&(!(l in f)||n))f[l]=g[l];return h}function y(f,g,n){var l,D,u;for(l=0;u=g[l];l++){u=typeof u==="string"?{name:u}:u;D=u.location;if(n&&(!D||D.indexOf("/")!==0&&D.indexOf(":")===-1))D=n+"/"+(D||u.name);f[u.name]={name:u.name,location:D||u.name,lib:u.lib||"lib",main:(u.main||"lib/main").replace(O,"")}}}function A(f){function g(a){var b,c;for(b= -0;c=a[b];b++)if(c==="."){a.splice(b,1);b-=1}else if(c==="..")if(b===1&&(a[2]===".."||a[0]===".."))break;else if(b>0){a.splice(b-1,2);b-=2}}function n(a,b){var c;if(a.charAt(0)===".")if(b){if(M.pkgs[b])b=[b];else{b=b.split("/");b=b.slice(0,b.length-1)}a=b.concat(a.split("/"));g(a);c=M.pkgs[b=a[0]];a=a.join("/");if(c&&a===b+"/"+c.main)a=b}return a}function l(a,b){var c=a?a.indexOf("!"):-1,e=null,i=b?b.name:null,s=a,E,t;if(c!==-1){e=a.substring(0,c);a=a.substring(c+1,a.length)}if(e){e=n(e,i);e=Ba[e]|| -e}if(a){if(e)E=(c=G[e])?c.normalize?c.normalize(a,function(N){return n(N,i)}):n(a,i):"__$p"+i+"@"+a;else E=n(a,i);t=ja[E];if(!t){t=h.toModuleUrl?h.toModuleUrl(j,a,b):j.nameToUrl(a,null,b);ja[E]=t}}return{prefix:e,name:E,parentMap:b,url:t,originalName:s,fullName:e?e+"!"+E:E}}function D(){var a=true,b=M.priorityWait,c,e;if(b){for(e=0;c=b[e];e++)if(!Q[c]){a=false;break}a&&delete M.priorityWait}return a}function u(a){return function(b){a.exports=b}}function fa(a,b,c){return function(){var e=[].concat(C.call(arguments, -0)),i;if(c&&m(i=e[e.length-1]))i.__requireJsBuild=true;e.push(b);return a.apply(null,e)}}function ra(a,b){b=fa(j.require,a,b);r(b,{nameToUrl:fa(j.nameToUrl,a),toUrl:fa(j.toUrl,a),isDefined:fa(j.isDefined,a),ready:h.ready,isBrowser:h.isBrowser});if(h.paths)b.paths=h.paths;return b}function Ca(a){var b,c,e,i,s,E,t,N=ga[a];if(N)for(i=0;c=N[i];i++){b=c.fullName;c=l(c.originalName,c.parentMap);c=c.fullName;e=P[b];if(c!==b){P[c]=e;delete P[b];for(s=0;s0)){if(M.priorityWait)if(D())ba();else return;for(i in Q)if(!(i in x)){c=true;if(!Q[i])if(b)a+=i+" ";else{e=true;break}}if(c||j.waitCount){if(b&&a){i=new Error("require.js load timeout for modules: "+a);i.requireType="timeout";i.requireModules=a;return h.onError(i)}if(e||j.scriptCount){if(H||B)setTimeout(ma, -50)}else if(j.waitCount){for(V=0;a=la[V];V++)wa(a,{});ma()}else h.checkReadyState()}}}function xa(a,b){var c=b.name,e=b.fullName;if(!(e in G)){Y[a]||(Y[a]=G[a]);Q[e]||(Q[e]=false);Y[a].load(c,ra(b.parentMap,true),function(i){require.onPluginLoad&&require.onPluginLoad(j,a,c,i);ka({prefix:b.prefix,name:b.name,fullName:b.fullName,callback:function(){return i}});Q[e]=true},M)}}function Fa(a){if(a.prefix&&a.name.indexOf("__$p")===0&&G[a.prefix])a=l(a.originalName,a.parentMap);var b=a.prefix,c=a.fullName; -if(!($[c]||c in G)){$[c]=true;if(b)if(G[b])xa(b,a);else{if(!ca[b]){ca[b]=[];(P[b]||(P[b]=[])).push({onDep:function(e){if(e===b){var i,s=ca[b];for(e=0;e0;E--){s=c.slice(0,E).join("/");if(e[s]){c.splice(0,E,e[s]);break}else if(s=i[s]){a=a===s.name?s.location+"/"+s.main:s.location+"/"+s.lib;c.splice(0,E,a);break}}b=c.join("/")+(b||".js");b=(b.charAt(0)==="/"||b.match(/^\w+:/)?"":t.baseUrl)+b}}return t.urlArgs? -b+((b.indexOf("?")===-1?"?":"&")+t.urlArgs):b}};j.jQueryCheck=va;j.resume=ba;return j}function o(){var f,g,n;if(J&&J.readyState==="interactive")return J;f=document.getElementsByTagName("script");for(g=f.length-1;g>-1&&(n=f[g]);g--)if(n.readyState==="interactive")return J=n;return null}var K=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,Z=/require\(["']([^'"\s]+)["']\)/g,O=/^\.\//,q=Object.prototype.toString,p=Array.prototype,C=p.slice,I=p.splice,H=!!(typeof window!=="undefined"&&navigator&&document),B=!H&&typeof importScripts!== -"undefined",z=H&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,d="_r@@",x={},w={},v=[],J=null,R=false,S=false,Ba={text:"require/text",i18n:"require/i18n",order:"require/order"},h;p={};var oa,F,W,ha,pa,ea,ya,T,za,ia,V,qa,Aa,X;if(typeof require!=="undefined")if(m(require))return;else p=require;h=require=function(f,g,n){var l="_",D;if(!k(f)&&typeof f!=="string"){D=f;if(k(g)){f=g;g=n}else f=[]}if(D&&D.context)l=D.context;n=w[l]||(w[l]=A(l));D&&n.configure(D);return n.require(f, -g)};h.version="0.22.0";h.isArray=k;h.isFunction=m;h.mixin=r;h.jsExtRegExp=/^\/|:|\?|\.js$/;F=h.s={contexts:w,skipAsync:{},isPageLoaded:!H,readyCalls:[]};if(h.isAsync=h.isBrowser=H){W=F.head=document.getElementsByTagName("head")[0];if(ha=document.getElementsByTagName("base")[0])W=F.head=ha.parentNode}h.onError=function(f){throw f;};h.load=function(f,g,n){var l=f.contextName,D=f.urlFetched,u=f.loaded;R=false;u[g]||(u[g]=false);if(!D[n]){f.scriptCount+=1;h.attach(n,l,g);D[n]=true;if(f.jQuery&&!f.jQueryIncremented){f.jQuery.readyWait+= -1;f.jQueryIncremented=true}}};define=h.def=function(f,g,n){var l;if(typeof f!=="string"){n=g;g=f;f=null}if(!h.isArray(g)){n=g;g=[]}if(!f&&!g.length&&h.isFunction(n))if(n.length){n.toString().replace(K,"").replace(Z,function(D,u){g.push(u)});g=["require","exports","module"].concat(g)}if(S){l=oa||o();if(!l)return h.onError(new Error("ERROR: No matching script interactive for "+n));f||(f=l.getAttribute("data-requiremodule"));l=w[l.getAttribute("data-requirecontext")]}(l?l.defQueue:v).push([f,g,n])}; -define.amd={multiversion:true,plugins:true};h.execCb=function(f,g,n){return g.apply(null,n)};h.onScriptLoad=function(f){var g=f.currentTarget||f.srcElement,n;if(f.type==="load"||z.test(g.readyState)){J=null;f=g.getAttribute("data-requirecontext");n=g.getAttribute("data-requiremodule");w[f].completeLoad(n);g.removeEventListener?g.removeEventListener("load",h.onScriptLoad,false):g.detachEvent("onreadystatechange",h.onScriptLoad)}};h.attach=function(f,g,n,l,D){var u;if(H){l=l||h.onScriptLoad;u=document.createElement("script"); -u.type=D||"text/javascript";u.charset="utf-8";u.async=!F.skipAsync[f];u.setAttribute("data-requirecontext",g);u.setAttribute("data-requiremodule",n);if(u.addEventListener)u.addEventListener("load",l,false);else{S=true;u.attachEvent("onreadystatechange",l)}u.src=f;oa=u;ha?W.insertBefore(u,ha):W.appendChild(u);oa=null;return u}else if(B){l=w[g];g=l.loaded;g[n]=false;importScripts(f);l.completeLoad(n)}return null};F.baseUrl=p.baseUrl;if(H&&(!F.baseUrl||!W)){pa=document.getElementsByTagName("script"); -ya=p.baseUrlMatch?p.baseUrlMatch:/(allplugins-)?require\.js(\W|$)/i;for(V=pa.length-1;V>-1&&(ea=pa[V]);V--){if(!W)W=ea.parentNode;if(!ia&&(ia=ea.getAttribute("data-main"))){p.deps=p.deps?p.deps.concat(ia):[ia];if(!p.baseUrl&&(T=ea.src)){T=T.split("/");T.pop();F.baseUrl=p.baseUrl=T.length?T.join("/"):"./"}}if(!F.baseUrl&&(T=ea.src))if(za=T.match(ya)){F.baseUrl=T.substring(0,za.index);break}}}h.pageLoaded=function(){if(!F.isPageLoaded){F.isPageLoaded=true;qa&&clearInterval(qa);if(Aa)document.readyState= -"complete";h.callReady()}};h.checkReadyState=function(){var f=F.contexts,g;for(g in f)if(!(g in x))if(f[g].waitCount)return;F.isDone=true;h.callReady()};h.callReady=function(){var f=F.readyCalls,g,n,l;if(F.isPageLoaded&&F.isDone){if(f.length){F.readyCalls=[];for(g=0;n=f[g];g++)n()}f=F.contexts;for(l in f)if(!(l in x)){g=f[l];if(g.jQueryIncremented){g.jQuery.readyWait-=1;g.jQueryIncremented=false}}}};h.ready=function(f){F.isPageLoaded&&F.isDone?f():F.readyCalls.push(f);return h};if(H){if(document.addEventListener){document.addEventListener("DOMContentLoaded", -h.pageLoaded,false);window.addEventListener("load",h.pageLoaded,false);if(!document.readyState){Aa=true;document.readyState="loading"}}else if(window.attachEvent){window.attachEvent("onload",h.pageLoaded);if(self===self.top)qa=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");h.pageLoaded()}}catch(f){}},30)}document.readyState==="complete"&&h.pageLoaded()}h(p);if(h.isAsync&&typeof setTimeout!=="undefined"){X=F.contexts[p.context||"_"];X.requireWait=true;setTimeout(function(){X.requireWait= -false;X.takeGlobalQueue();X.jQueryCheck();X.scriptCount||X.resume();h.checkReadyState()},0)}})();define("sushi.core",[],function(){var m={VERSION:"0.0.5",namespace:function(k){k=k.split(".");var r=m,y;if(k[0]==="Sushi")k=k.slice(1);y=0;for(len=k.length;y0){a.splice(b-1,2);b-=2}}function r(a,b){var d;if(a.charAt(0)===".")if(b){if(K.pkgs[b])b=[b];else{b=b.split("/");b=b.slice(0,b.length-1)}a=b.concat(a.split("/"));j(a);d=K.pkgs[b=a[0]];a=a.join("/");if(d&&a===b+"/"+d.main)a=b}return a}function p(a,b){var d=a?a.indexOf("!"):-1,g=null,l=b?b.name:null,v=a,D,x;if(d!==-1){g=a.substring(0,d);a=a.substring(d+1,a.length)}if(g){g=r(g,l);g=Aa[g]|| +g}if(a){if(g)D=(d=F[g])?d.normalize?d.normalize(a,function(N){return r(N,l)}):r(a,l):"__$p"+l+"@"+a;else D=r(a,l);x=ha[D];if(!x){x=k.toModuleUrl?k.toModuleUrl(o,a,b):o.nameToUrl(a,null,b);ha[D]=x}}return{prefix:g,name:D,parentMap:b,url:x,originalName:v,fullName:g?g+"!"+D:D}}function C(){var a=true,b=K.priorityWait,d,g;if(b){for(g=0;d=b[g];g++)if(!Q[d]){a=false;break}a&&delete K.priorityWait}return a}function z(a){return function(b){a.exports=b}}function da(a,b,d){return function(){var g=[].concat(B.call(arguments, +0)),l;if(d&&m(l=g[g.length-1]))l.__requireJsBuild=true;g.push(b);return a.apply(null,g)}}function pa(a,b){b=da(o.require,a,b);y(b,{nameToUrl:da(o.nameToUrl,a),toUrl:da(o.toUrl,a),isDefined:da(o.isDefined,a),ready:k.ready,isBrowser:k.isBrowser});if(k.paths)b.paths=k.paths;return b}function Ba(a){var b,d,g,l,v,D,x,N=ea[a];if(N)for(l=0;d=N[l];l++){b=d.fullName;d=p(d.originalName,d.parentMap);d=d.fullName;g=O[b];if(d!==b){O[d]=g;delete O[b];for(v=0;v0)){if(K.priorityWait)if(C())Z();else return;for(l in Q)if(!(l in H)){d=true;if(!Q[l])if(b)a+=l+" ";else{g=true;break}}if(d||o.waitCount){if(b&&a){l=new Error("require.js load timeout for modules: "+a);l.requireType="timeout";l.requireModules=a;return k.onError(l)}if(g||o.scriptCount){if(e||s)setTimeout(ka, +50)}else if(o.waitCount){for(T=0;a=ja[T];T++)ua(a,{});ka()}else k.checkReadyState()}}}function va(a,b){var d=b.name,g=b.fullName;if(!(g in F)){W[a]||(W[a]=F[a]);Q[g]||(Q[g]=false);W[a].load(d,pa(b.parentMap,true),function(l){require.onPluginLoad&&require.onPluginLoad(o,a,d,l);ia({prefix:b.prefix,name:b.name,fullName:b.fullName,callback:function(){return l}});Q[g]=true},K)}}function Ea(a){if(a.prefix&&a.name.indexOf("__$p")===0&&F[a.prefix])a=p(a.originalName,a.parentMap);var b=a.prefix,d=a.fullName; +if(!(X[d]||d in F)){X[d]=true;if(b)if(F[b])va(b,a);else{if(!$[b]){$[b]=[];(O[b]||(O[b]=[])).push({onDep:function(g){if(g===b){var l,v=$[b];for(g=0;g0;D--){v=d.slice(0,D).join("/");if(g[v]){d.splice(0,D,g[v]);break}else if(v=l[v]){a=a===v.name?v.location+"/"+v.main:v.location+"/"+v.lib;d.splice(0,D,a);break}}b=d.join("/")+(b||".js");b=(b.charAt(0)==="/"||b.match(/^\w+:/)?"":x.baseUrl)+b}}return x.urlArgs?b+ +((b.indexOf("?")===-1?"?":"&")+x.urlArgs):b}};o.jQueryCheck=ta;o.resume=Z;return o}function i(){var h,j,r;if(ba&&ba.readyState==="interactive")return ba;h=document.getElementsByTagName("script");for(j=h.length-1;j>-1&&(r=h[j]);j--)if(r.readyState==="interactive")return ba=r;return null}var A=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,J=/require\(["']([^'"\s]+)["']\)/g,M=/^\.\//,t=Object.prototype.toString,u=Array.prototype,B=u.slice,G=u.splice,e=!!(typeof window!=="undefined"&&navigator&&document),s=!e&& +typeof importScripts!=="undefined",n=e&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,w="_r@@",H={},L={},P=[],ba=null,Fa=false,wa=false,Aa={text:"require/text",i18n:"require/i18n",order:"require/order"},k;u={};var ma,E,U,fa,na,ca,xa,R,ya,ga,T,oa,za,V;if(typeof require!=="undefined")if(m(require))return;else u=require;k=require=function(h,j,r){var p="_",C;if(!q(h)&&typeof h!=="string"){C=h;if(q(j)){h=j;j=r}else h=[]}if(C&&C.context)p=C.context;r=L[p]||(L[p]=f(p));C&&r.configure(C); +return r.require(h,j)};k.version="0.22.0";k.isArray=q;k.isFunction=m;k.mixin=y;k.jsExtRegExp=/^\/|:|\?|\.js$/;E=k.s={contexts:L,skipAsync:{},isPageLoaded:!e,readyCalls:[]};if(k.isAsync=k.isBrowser=e){U=E.head=document.getElementsByTagName("head")[0];if(fa=document.getElementsByTagName("base")[0])U=E.head=fa.parentNode}k.onError=function(h){throw h;};k.load=function(h,j,r){var p=h.contextName,C=h.urlFetched,z=h.loaded;Fa=false;z[j]||(z[j]=false);if(!C[r]){h.scriptCount+=1;k.attach(r,p,j);C[r]=true; +if(h.jQuery&&!h.jQueryIncremented){h.jQuery.readyWait+=1;h.jQueryIncremented=true}}};define=k.def=function(h,j,r){var p;if(typeof h!=="string"){r=j;j=h;h=null}if(!k.isArray(j)){r=j;j=[]}if(!h&&!j.length&&k.isFunction(r))if(r.length){r.toString().replace(A,"").replace(J,function(C,z){j.push(z)});j=["require","exports","module"].concat(j)}if(wa){p=ma||i();if(!p)return k.onError(new Error("ERROR: No matching script interactive for "+r));h||(h=p.getAttribute("data-requiremodule"));p=L[p.getAttribute("data-requirecontext")]}(p? +p.defQueue:P).push([h,j,r])};define.amd={multiversion:true,plugins:true};k.execCb=function(h,j,r){return j.apply(null,r)};k.onScriptLoad=function(h){var j=h.currentTarget||h.srcElement,r;if(h.type==="load"||n.test(j.readyState)){ba=null;h=j.getAttribute("data-requirecontext");r=j.getAttribute("data-requiremodule");L[h].completeLoad(r);j.removeEventListener?j.removeEventListener("load",k.onScriptLoad,false):j.detachEvent("onreadystatechange",k.onScriptLoad)}};k.attach=function(h,j,r,p,C){var z;if(e){p= +p||k.onScriptLoad;z=document.createElement("script");z.type=C||"text/javascript";z.charset="utf-8";z.async=!E.skipAsync[h];z.setAttribute("data-requirecontext",j);z.setAttribute("data-requiremodule",r);if(z.addEventListener)z.addEventListener("load",p,false);else{wa=true;z.attachEvent("onreadystatechange",p)}z.src=h;ma=z;fa?U.insertBefore(z,fa):U.appendChild(z);ma=null;return z}else if(s){p=L[j];j=p.loaded;j[r]=false;importScripts(h);p.completeLoad(r)}return null};E.baseUrl=u.baseUrl;if(e&&(!E.baseUrl|| +!U)){na=document.getElementsByTagName("script");xa=u.baseUrlMatch?u.baseUrlMatch:/(allplugins-)?require\.js(\W|$)/i;for(T=na.length-1;T>-1&&(ca=na[T]);T--){if(!U)U=ca.parentNode;if(!ga&&(ga=ca.getAttribute("data-main"))){u.deps=u.deps?u.deps.concat(ga):[ga];if(!u.baseUrl&&(R=ca.src)){R=R.split("/");R.pop();E.baseUrl=u.baseUrl=R.length?R.join("/"):"./"}}if(!E.baseUrl&&(R=ca.src))if(ya=R.match(xa)){E.baseUrl=R.substring(0,ya.index);break}}}k.pageLoaded=function(){if(!E.isPageLoaded){E.isPageLoaded= +true;oa&&clearInterval(oa);if(za)document.readyState="complete";k.callReady()}};k.checkReadyState=function(){var h=E.contexts,j;for(j in h)if(!(j in H))if(h[j].waitCount)return;E.isDone=true;k.callReady()};k.callReady=function(){var h=E.readyCalls,j,r,p;if(E.isPageLoaded&&E.isDone){if(h.length){E.readyCalls=[];for(j=0;r=h[j];j++)r()}h=E.contexts;for(p in h)if(!(p in H)){j=h[p];if(j.jQueryIncremented){j.jQuery.readyWait-=1;j.jQueryIncremented=false}}}};k.ready=function(h){E.isPageLoaded&&E.isDone? +h():E.readyCalls.push(h);return k};if(e){if(document.addEventListener){document.addEventListener("DOMContentLoaded",k.pageLoaded,false);window.addEventListener("load",k.pageLoaded,false);if(!document.readyState){za=true;document.readyState="loading"}}else if(window.attachEvent){window.attachEvent("onload",k.pageLoaded);if(self===self.top)oa=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");k.pageLoaded()}}catch(h){}},30)}document.readyState==="complete"&&k.pageLoaded()}k(u); +if(k.isAsync&&typeof setTimeout!=="undefined"){V=E.contexts[u.context||"_"];V.requireWait=true;setTimeout(function(){V.requireWait=false;V.takeGlobalQueue();V.jQueryCheck();V.scriptCount||V.resume();k.checkReadyState()},0)}})(); +define("sushi.core",[],function(){var m=this,q={},y={VERSION:"0.0.5",namespace:function(c){c=c.split(".");var f=y,i;if(c[0]==="Sushi")c=c.slice(1);i=0;for(len=c.length;i=0;q-=1){document.createElement(m[q]);elsAvailable[m[q]]=true}return{}}}}); +require([],function(){require(["sushi.core","sushi.campus","sushi.utils","sushi.utils.collection","sushi.utils.debug","sushi.utils.json","sushi.utils.lang","sushi.event","sushi.utils.HTML5"],function(){})});define("sushi.base",function(){}); \ No newline at end of file diff --git a/docs/Data/parsed.json b/docs/Data/parsed.json new file mode 100644 index 0000000..d81bc5b --- /dev/null +++ b/docs/Data/parsed.json @@ -0,0 +1 @@ +{"majorversion": 0, "filemap": {"sushi.utils.js": {"classlist": ["Sushi.utils"], "name": "sushi.utils.js", "module": "Sushi"}, "sushi.event.js": {"classlist": ["Sushi.events"], "name": "sushi.event.js", "module": "Sushi"}, "sushi.history.js": {"classlist": [], "name": "sushi.history.js", "module": "Sushi"}, "sushi.utils.json.js": {"classlist": ["Sushi.utils.JSON"], "name": "sushi.utils.json.js", "module": "Sushi"}, "sushi.utils.HTML5.js": {"classlist": ["Sushi.utils.HTML5"], "name": "sushi.utils.HTML5.js", "module": "Sushi"}, "sushi.utils.collection.js": {"classlist": ["Sushi.utils.Collection"], "name": "sushi.utils.collection.js", "module": "Sushi"}, "sushi.core.js": {"classlist": ["Sushi.core"], "name": "sushi.core.js", "module": "Sushi"}, "sushi.base.js": {"classlist": ["Sushi.base"], "name": "sushi.base.js", "module": "Sushi"}, "sushi.campus.js": {"classlist": ["Sushi.campus"], "name": "sushi.campus.js", "module": "Sushi"}, "requireplugins-jquery-1.4.4.js": {"classlist": [], "name": "requireplugins-jquery-1.4.4.js", "module": "Sushi"}, "sushi.utils.debug.js": {"classlist": ["Sushi.utils.Debug"], "name": "sushi.utils.debug.js", "module": "Sushi"}, "sushi.utils.lang.js": {"classlist": ["Sushi.utils.Lang"], "name": "sushi.utils.lang.js", "module": "Sushi"}}, "modules": {"Sushi": {"description": "Sushi Core", "submodules": [], "classlist": ["Sushi.base", "Sushi.campus", "Sushi.core", "Sushi.events", "Sushi.utils.HTML5", "Sushi.utils.Collection", "Sushi.utils.Debug", "Sushi.utils", "Sushi.utils.JSON", "Sushi.utils.Lang"], "filelist": ["requireplugins-jquery-1.4.4.js", "sushi.base.js", "sushi.campus.js", "sushi.core.js", "sushi.event.js", "sushi.history.js", "sushi.utils.HTML5.js", "sushi.utils.collection.js", "sushi.utils.debug.js", "sushi.utils.js", "sushi.utils.json.js", "sushi.utils.lang.js"], "subdata": {}, "name": "Sushi"}}, "classmap": {"Sushi.campus": {"name": "Sushi.campus", "namespace": "Sushi", "module": "Sushi", "file": "sushi.campus.js", "shortname": "campus", "requires": "Sushi.core", "properties": {"cdn": {"type": "Object", "description": "CDN URLs. Returns an Object with the CDNs available and URLs", "guessedname": "cdn", "guessedtype": "property"}, "userID": {"type": "String", "description": "Logged User's ID", "guessedname": "userID", "guessedtype": "function"}, "loginPath": {"type": "String", "description": "Returns the address of the Login page", "guessedname": "loginPath", "guessedtype": "property"}, "campusPath": {"type": "String", "description": "Returns the Campus URL", "guessedname": "campusPath", "guessedtype": "property"}, "services": {"type": "Object", "description": "Services URLs. Returns an Object with the services available and URLs", "guessedname": "services", "guessedtype": "property"}, "feedProxy": {"type": "String", "description": "Returns the FeedProxy's URL", "guessedname": "feedProxy", "guessedtype": "property"}}, "description": "Sushi Campus"}, "Sushi.utils.HTML5": {"name": "Sushi.utils.HTML5", "namespace": "Sushi.utils", "module": "Sushi", "methods": {"shiv": {"return": {"type": "Object", "description": "HTML5 elements created with boolean value."}, "params": [{"type": "String", "name": "Optional.", "description": " List of specific objects to create (e.g.: Sushi.HTML5.shiv(\"canvas, time, aside\") );"}], "description": "Enable HTML5 Elements inside IE (8 and before)\nscript by Remy Sharp http://remysharp.com/2009/01/07/html5-enabling-script/", "guessedname": "shiv", "guessedtype": "function"}}, "extends": "Sushi.utils", "superclass": "Sushi.utils", "file": "sushi.utils.HTML5.js", "shortname": "HTML5", "description": "HTML5 utilities functions"}, "Sushi.utils.Lang": {"name": "Sushi.utils.Lang", "namespace": "Sushi.utils", "module": "Sushi", "methods": {"replaceAccents": {"return": {"type": "String", "description": "string without accented characters in lower case"}, "params": [{"type": "String", "name": "string", "description": " with accented characters"}], "description": "Converts every accented letter in a string with its non-accented equivalent.\nCurrently WIP, trying to squeeze this function as much as possible. \n(≈3ms per string, with 2 calls ≈ 1.5ms per call)", "guessedname": "replaceAccents", "guessedtype": "function"}}, "extends": "Sushi.utils", "superclass": "Sushi.utils", "file": "sushi.utils.lang.js", "shortname": "Lang", "requires": "Sushi.utils", "description": "Language handling functions"}, "Sushi.utils": {"name": "Sushi.utils", "namespace": "Sushi", "module": "Sushi", "methods": {"isArray": {"return": {"type": "Boolean", "description": "Whether argument is an array or not"}, "params": [{"type": "", "name": "array", "description": " Argument to test"}], "description": "Checks for array-ness", "guessedname": "isArray", "guessedtype": "function"}, "isRegExp": {"return": {"type": "Boolean", "description": "Whether argument is a RegExp or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is a Regular Expression", "guessedname": "isRegExp", "guessedtype": "function"}, "isDate": {"return": {"type": "Boolean", "description": "Whether variable is a date"}, "params": [{"type": "", "name": "obj", "description": " Variable to test"}], "description": "Checks whether a given variable is a date", "guessedname": "isDate", "guessedtype": "function"}, "isString": {"return": {"type": "Boolean", "description": "Whether value is a number or not."}, "params": [{"type": "String", "name": "Value", "description": " to test"}], "description": "Detects wether a value is a string", "guessedname": "isString", "guessedtype": "function"}, "keys": {"return": {"type": "", "description": "Array containing the object's key names."}, "params": [{"type": "", "name": "obj", "description": " Object to retrieve keys from"}], "description": "Retrieve the names of an object's properties.\nDefaults to ECMAScript 5's native Object.keys. Lifted from Underscore JS.", "guessedname": "keys", "guessedtype": "function"}, "isNaN": {"return": {"type": "Boolean", "description": "Whether argument is NaN or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is NaN\nNaN happens to be the only object in Javascript that is not equal to itself.", "guessedname": "isNaN", "guessedtype": "function"}, "isNull": {"return": {"type": "Boolean", "description": "Whether argument is equal to null or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object's value is equal to null", "guessedname": "isNull", "guessedtype": "function"}, "range": {"return": {"type": "", "description": "Array containing the progression."}, "params": [{"type": "", "name": "start", "description": " Value to start progression from. Defaults to 0"}, {"type": "", "name": "stop", "description": " Value to stop progression at"}, {"type": "", "name": "step", "description": " Value to increment progression by. Defaults to 1"}], "description": "Generate an integer Array containing an arithmetic progression.\nA port of the native Python range(). Lifted from Underscore JS.\nSee http://docs.python.org/library/functions.html#range for more info.", "guessedname": "range", "guessedtype": "function"}, "isEmpty": {"return": {"type": "Boolean", "description": "Whether argument is empty or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is empty", "guessedname": "isEmpty", "guessedtype": "function"}, "uniqueId": {"return": {"type": "", "description": "Unique ID"}, "params": [{"type": "", "name": "prefix", "description": " Optional prefix to prepend to the unique ID"}], "description": "Generates a unique integer ID (within the client session)", "guessedname": "uniqueId", "guessedtype": "function"}, "isEqual": {"return": {"type": "Boolean", "description": "Whether objects are equal or not"}, "params": [{"type": "", "name": "a", "description": " First object"}, {"type": "", "name": "b", "description": " Second object"}], "description": "Performs a deep comparison to check if two objects are equal.", "guessedname": "isEqual", "guessedtype": "function"}, "isElement": {"return": {"type": "Boolean", "description": "Whether argument is a DOM node or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is a DOM node", "guessedname": "isElement", "guessedtype": "function"}, "isFunction": {"return": {"type": "Boolean", "description": "Whether argument is a function or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is a function", "guessedname": "isFunction", "guessedtype": "function"}, "isNumber": {"return": {"type": "Boolean", "description": "Whether value is a number or not."}, "params": [{"type": "", "name": "number", "description": " Value to test"}], "description": "Detects whether a value is a number", "guessedname": "isNumber", "guessedtype": "function"}, "isUndefined": {"return": {"type": "Boolean", "description": "Whether argument is equal to undefined or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is equal to undefined", "guessedname": "isUndefined", "guessedtype": "function"}, "identity": {"return": {"type": "", "description": "Value passed in to the function"}, "params": [{"type": "", "name": "value", "description": " Value to return"}], "description": "Default iterator object", "guessedname": "identity", "guessedtype": "function"}, "isArguments": {"return": {"type": "Boolean", "description": "Whether variable is an arguments object"}, "params": [{"type": "", "name": "obj", "description": " Variable to test"}], "description": "Checks whether a given variable is an arguments object", "guessedname": "isArguments", "guessedtype": "function"}}, "file": "sushi.utils.js", "shortname": "utils", "description": "General purpose utility functions for the Sushi JS framework"}, "Sushi.utils.Debug": {"name": "Sushi.utils.Debug", "namespace": "Sushi.utils", "module": "Sushi", "methods": {"log": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.log()", "guessedname": "log", "guessedtype": "function"}, "_supports": {"returns": "{Object} Supported debugging methods", "description": "Returns the debugging methods the environment supports", "guessedname": "_supports", "guessedtype": "function"}, "garbageCollect": {"return": {"type": "void, Boolean", "description": "Returns false, if it's not possible to force the Garbage Collector, otherwise nothing is returned."}, "description": "Forces IE to run its garbage Collector", "guessedname": "garbageCollect", "guessedtype": "function"}, "warn": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.warn()", "guessedname": "warn", "guessedtype": "function"}, "error": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.error()", "guessedname": "error", "guessedtype": "function"}, "logHistory": {"description": "Prints the whole cached debug history to the console", "guessedname": "logHistory", "guessedtype": "function"}, "dir": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.dir()", "guessedname": "dir", "guessedtype": "function"}}, "extends": "Sushi.utils", "superclass": "Sushi.utils", "file": "sushi.utils.debug.js", "shortname": "Debug", "description": "Defines several safe debugging methods"}, "Sushi.utils.Collection": {"name": "Sushi.utils.Collection", "namespace": "Sushi.utils", "module": "Sushi", "methods": {"toArray": {"return": {"type": "Array", "description": "Old variable in array format"}, "params": [{"type": "", "name": "iterable", "description": " Variable to convert to an array"}], "description": "Safely convert anything iterable into a real, live array.", "guessedname": "toArray", "guessedtype": "function"}, "reduceRight": {"return": {"type": "Array", "description": "Reduced Array"}, "params": [{"type": "Array", "name": "Array", "description": " to reduce."}, {"type": "Function", "name": "Function", "description": " to execute on each value in the array."}, {"type": "", "name": "memo", "description": " Object to use as the first argument to the first call of the callback."}], "description": "Reduce builds up a single result from a list of values (from right-to-left). \nDelegates to ECMAScript 5's native reduceRight if available.", "guessedname": "reduceRight", "guessedtype": "function"}, "some": {"return": {"type": "Booelan", "description": "True if an object matches the truth test."}, "params": [{"type": "Object", "name": "obj", "description": " Object to search through"}, {"type": "Function", "name": "iterator", "description": " Function that produces an element of the new Array from an element of the current one."}, {"type": "Object", "name": "context", "description": " Object to use as \"this\" when executing iterator"}], "description": "Determine if at least one element in the object matches a truth test.\nDelegates to ECMAScript 5's native some if available.", "guessedname": "some", "guessedtype": "function"}, "contains": {"return": {"type": "Boolean", "description": "True if needle is present."}, "params": [{"type": "Object", "name": "heystack", "description": " Object or Array to search in."}, {"type": "", "name": "needle", "description": " Value to search heystack for"}], "description": "Determine if a given value is included in the array or object using ===.", "guessedname": "contains", "guessedtype": "function"}, "reduce": {"return": {"type": "Array", "description": "Reduced Array"}, "params": [{"type": "Array", "name": "obj", "description": " Array to reduce."}, {"type": "Function", "name": "iterator", "description": " Function to execute on each value in the array."}, {"type": "", "name": "memo", "description": " Object to use as the first argument to the first call of the callback."}], "description": "Reduce builds up a single result from a list of values \nfrom left-to-right.\nDelegates to ECMAScript 5's native reduce if available.", "guessedname": "reduce", "guessedtype": "function"}, "pluck": {"return": {"type": "Object", "description": "Property in object"}, "params": [{"type": "Object", "name": "obj", "description": " Object to search through"}, {"type": "", "name": "key", "description": " Property key to look for"}], "description": "Convenience method for Sushi.utils.map to get a property from an object.", "guessedname": "pluck", "guessedtype": "function"}, "filter": {"return": {"type": "Array", "description": "Filtered Array"}, "params": [{"type": "Array", "name": "obj", "description": " Array to filter."}, {"type": "Function", "name": "iterator", "description": " Function to execute on each value in the array."}, {"type": "", "name": "memo", "description": " Object to use as the first argument to the first call of the callback."}], "description": "Return all the elements that pass a truth test.\nDelegates to ECMAScript 5's native filter if available.", "guessedname": "filter", "guessedtype": "function"}, "map": {"return": {"type": "Array", "description": "Reduced Array"}, "params": [{"type": "Array", "name": "obj", "description": " Original array."}, {"type": "Function", "name": "iterator", "description": " Function that produces an element of the new Array from an element of the current one."}, {"type": "Object", "name": "context", "description": " Object to use as \"this\" when executing iterator"}], "description": "Creates a new array with the results of calling a provided function \non every element in this array.\nDelegates to ECMAScript 5's native map if available.", "guessedname": "map", "guessedtype": "function"}, "each": {"params": [{"type": "", "name": "obj", "description": " Object to loop through"}, {"type": "Function", "name": "iterator", "description": " Function to callback for each element"}, {"type": "Object", "name": "context", "description": " Object to use as \"this\" when executing iterator"}], "description": "Cornerstone each (forEach) implementation.\nHandles objects implementing forEach, arrays, and raw objects. \nDelegates to ECMAScript 5's native forEach if available.\nBased on the Underscore JS implementation.", "guessedname": "each", "guessedtype": "function"}}, "extends": "Sushi.utils", "superclass": "Sushi.utils", "file": "sushi.utils.collection.js", "shortname": "Collection", "description": "Sushi Collection"}, "Sushi.utils.JSON": {"name": "Sushi.utils.JSON", "namespace": "Sushi.utils", "module": "Sushi", "methods": {"parse": {"return": {"type": "Object", "description": "Well formatted JS literal"}, "params": [{"type": "String", "name": "string", "description": " JSON-formatted string"}], "description": "Converts a JSON-formatted string into a Javascript literal object", "guessedname": "parse", "guessedtype": "function"}, "stringify": {"return": {"type": "String", "description": "Well formatted JSON string"}, "params": [{"type": "Object", "name": "literal", "description": " Literal Notated Javascript Object"}], "description": "Converts a Javascript literal object into a well formatted JSON string", "guessedname": "stringify", "guessedtype": "function"}}, "extends": "Sushi.utils", "superclass": "Sushi.utils", "file": "sushi.utils.json.js", "shortname": "JSON", "description": "JSON handling functions"}, "Sushi.core": {"name": "Sushi.core", "namespace": "Sushi", "module": "Sushi", "methods": {"namespace": {"return": {"type": "Object", "description": "Namespaced object"}, "params": [{"type": "String", "name": "namespaceString", "description": " Name of namespace to create"}], "description": "A utility that non-destructively defines namespaces", "guessedname": "namespace", "guessedtype": "function"}, "noConflict": {"return": {"type": "Object", "description": "Sushi Object"}, "params": [{"type": "String", "name": "Mandatory.", "description": " New Namespace where Sushi is going to live"}, {"type": "String", "name": "Optional.", "description": " New Sugar syntax to shorthand the Sushi's namespace"}], "description": "noConflict utility. If by some reason, the Sushi's namespace must be used by some other object,\nthis function will allow to remap the Sushi's namespace to another namespace", "guessedname": "noConflict", "guessedtype": "function"}, "extend": {"return": {"type": "Object", "description": "Extended object"}, "params": [{"type": "Object", "name": "destination", "description": " Object to copy properties to"}, {"type": "Object", "name": "source", "description": " Object to copy properties from"}], "description": "Simple extending (shallow copying) utility.", "guessedname": "extend", "guessedtype": "function"}}, "file": "sushi.core.js", "shortname": "core", "description": "Sushi Core"}, "Sushi.base": {"name": "Sushi.base", "namespace": "Sushi", "module": "Sushi", "file": "sushi.base.js", "shortname": "base", "description": "Sushi JS\nCopyright (C) 2011 Bruno Abrantes\nMIT Licensed"}, "Sushi.events": {"name": "Sushi.events", "namespace": "Sushi", "module": "Sushi", "methods": {"subscribe": {"return": {"type": "Array", "description": "A handle which can be used to unsubscribe this particular subscription"}, "params": [{"type": "String", "name": "topic", "description": " The channel to subscribe to"}, {"type": "Function", "name": "callback", "description": " The handler event. Anytime something is Sushi.events.publish'ed on a \nsubscribed channel, the callback will be called with the\npublished array as ordered arguments."}], "description": "Register a callback on a named topic\nExample:\nSushi.events.subscribe(\"/some/topic\", function(a, b, c){ //handle data});", "guessedname": "subscribe", "guessedtype": "function"}, "unsubscribe": {"params": [{"type": "Array", "name": "handle", "description": " The return value from a Sushi.events.subscribe call"}], "description": "Disconnect a subscribed function for a topic\nExample:\nvar handle = Sushi.events.subscribe(\"/some/topic\", function(a, b, c){ //handle data});\nSushi.events.unsubscribe(handle);", "guessedname": "unsubscribe", "guessedtype": "function"}, "publish": {"params": [{"type": "String", "name": "topic", "description": " The channel to publish on"}, {"type": "Array", "name": "args", "description": " The data to publish. Each array item is converted into an ordered\narguments on the subscribed functions."}], "description": "Publish data on a named topic\nExample:\nSushi.events.publish(\"/some/topic\", [\"a\",\"b\",\"c\"]);", "guessedname": "publish", "guessedtype": "function"}}, "file": "sushi.event.js", "shortname": "events", "requires": "sushi.utils.collection", "description": "Sushi Events"}}, "version": "0.0.5", "namespaces": ["Sushi", "Sushi.utils"]} \ No newline at end of file diff --git a/docs/Data/requireplugins-jquery-1.4.4.js b/docs/Data/requireplugins-jquery-1.4.4.js new file mode 100644 index 0000000..ad437dc --- /dev/null +++ b/docs/Data/requireplugins-jquery-1.4.4.js @@ -0,0 +1,220 @@ +/* + RequireJS 0.15.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 T(j){return Da.call(j)==="[object Function]"}function H(j,k,s){var q=x.plugins.defined[j];if(q)q[s.name].apply(null,s.args);else{q=x.plugins.waiting[j]||(x.plugins.waiting[j]=[]);q.push(s);y(["require/"+j],k.contextName)}}function la(j,k){Ea.apply(y,j);k.loaded[j[0]]=true}function M(j,k,s){var q,u,C;for(q=0;C=k[q];q++){C=typeof C==="string"?{name:C}:C;u=C.location;if(s&&(!u||u.indexOf("/")!==0&&u.indexOf(":")===-1))C.location=s+"/"+(C.location||C.name);C.location=C.location|| +C.name;C.lib=C.lib||"lib";C.main=C.main||"main";j[C.name]=C}}function B(j){var k=true,s=j.config.priorityWait,q,u;if(s){for(u=0;q=s[u];u++)if(!j.loaded[q]){k=false;break}k&&delete j.config.priorityWait}return k}function D(j){var k,s=x.paused;if(j.scriptCount<=0){for(j.scriptCount=0;wa.length;){k=wa.shift();k[0]===null?y.onError(new Error("Mismatched anonymous require.def modules")):la(k,j)}if(!(j.config.priorityWait&&!B(j))){if(s.length){x.paused=[];for(j=0;k=s[j];j++)y.checkDeps.apply(y,k)}Fa?setTimeout(function(){y.checkLoaded(x.ctxName)}, +30):y.checkLoaded(x.ctxName)}}}function S(j,k){var s=x.plugins.callbacks[j]=[];x.plugins[j]=function(){for(var q=0,u;u=s[q];q++)if(u.apply(null,arguments)===true&&k)return true;return false}}function J(j,k){if(!j.jQuery)if((k=k||(typeof jQuery!=="undefined"?jQuery:null))&&"readyWait"in k){j.jQuery=k;if(!j.defined.jquery&&!j.jQueryDef)j.defined.jquery=k;if(j.scriptCount){k.readyWait+=1;j.jQueryIncremented=true}}}function P(j){return function(k){j.exports=k}}function ca(j,k,s){return function(){var q= +[].concat(Ga.call(arguments,0));q.push(k,s);return(j?require[j]:require).apply(null,q)}}function da(j,k){var s=j.contextName,q=ca(null,s,k);y.mixin(q,{modify:ca("modify",s,k),def:ca("def",s,k),get:ca("get",s,k),nameToUrl:ca("nameToUrl",s,k),toUrl:ca("toUrl",s,k),ready:y.ready,context:j,config:j.config,isBrowser:x.isBrowser});return q}var V={},x,W,Y=[],ja,ma,va,z,c,xa,na={},Ha,Ia=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,Oa=/require\(["']([\w\!\-_\.\/]+)["']\)/g,Ea,sa=!!(typeof window!=="undefined"&&navigator&& +document),Fa=!sa&&typeof importScripts!=="undefined",Pa=sa&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,Da=Object.prototype.toString,ya=Array.prototype,Ga=ya.slice,Ja,y,Aa,wa=[],Ka=false,Ba;if(typeof require!=="undefined")if(T(require))return;else na=require;y=require=function(j,k,s,q,u){var C;if(typeof j==="string"&&!T(k))return require.get(j,k,s,q);if(!require.isArray(j)){C=j;if(require.isArray(k)){j=k;k=s;s=q;q=u}else j=[]}Ea(null,j,k,C,s,q);(j=x.contexts[s||C&&C.context|| +x.ctxName])&&j.scriptCount===0&&D(j)};y.onError=function(j){throw j;};define=y.def=function(j,k,s,q){var u,C,F=Ba;if(typeof j!=="string"){q=s;s=k;k=j;j=null}if(!y.isArray(k)){q=s;s=k;k=[]}if(!j&&!k.length&&y.isFunction(s)){s.toString().replace(Ia,"").replace(Oa,function(K,aa){k.push(aa)});k=["require","exports","module"].concat(k)}if(!j&&Ka){u=document.getElementsByTagName("script");for(j=u.length-1;j>-1&&(C=u[j]);j--)if(C.readyState==="interactive"){F=C;break}F||y.onError(new Error("ERROR: No matching script interactive for "+ +s));j=F.getAttribute("data-requiremodule")}if(typeof j==="string")x.contexts[x.ctxName].jQueryDef=j==="jquery";wa.push([j,k,s,null,q])};Ea=function(j,k,s,q,u,C){var F,K,aa,ba,U;u=u?u:q&&q.context?q.context:x.ctxName;F=x.contexts[u];if(j){K=j.indexOf("!");if(K!==-1){aa=j.substring(0,K);j=j.substring(K+1,j.length)}else aa=F.defPlugin[j];K=F.waiting[j];if(F&&(F.defined[j]||K&&K!==ya[j]))return}if(u!==x.ctxName){K=x.contexts[x.ctxName]&&x.contexts[x.ctxName].loaded;ba=true;if(K)for(U in K)if(!(U in V))if(!K[U]){ba= +false;break}if(ba)x.ctxName=u}if(!F){F={contextName:u,config:{waitSeconds:7,baseUrl:x.baseUrl||"./",paths:{},packages:{}},waiting:[],specified:{require:true,exports:true,module:true},loaded:{},scriptCount:0,urlFetched:{},defPlugin:{},defined:{},modifiers:{}};x.plugins.newContext&&x.plugins.newContext(F);F=x.contexts[u]=F}if(q){if(q.baseUrl)if(q.baseUrl.charAt(q.baseUrl.length-1)!=="/")q.baseUrl+="/";ba=F.config.paths;K=F.config.packages;y.mixin(F.config,q,true);if(q.paths){for(U in q.paths)U in V|| +(ba[U]=q.paths[U]);F.config.paths=ba}if((ba=q.packagePaths)||q.packages){if(ba)for(U in ba)U in V||M(K,ba[U],U);q.packages&&M(K,q.packages);F.config.packages=K}if(q.priority){y(q.priority);F.config.priorityWait=q.priority}if(q.deps||q.callback)y(q.deps||[],q.callback);q.ready&&y.ready(q.ready);if(!k)return}if(k){U=k;k=[];for(q=0;q +1){j.splice(W-1,2);W-=2}j=j.join("/")}return j};y.splitPrefix=function(j,k,s){var q=j.indexOf("!"),u=null;if(q!==-1){u=j.substring(0,q);j=j.substring(q+1,j.length)}j=y.normalizeName(j,k,s);return{prefix:u,name:j,fullName:u?u+"!"+j:j}};y.nameToUrl=function(j,k,s,q){var u,C,F,K;K=x.contexts[s];s=K.config;j=y.normalizeName(j,q,K);if(y.jsExtRegExp.test(j))j=j+(k?k:"");else{u=s.paths;C=s.packages;q=j.split("/");for(K=q.length;K>0;K--){F=q.slice(0,K).join("/");if(u[F]){q.splice(0,K,u[F]);break}else if(F= +C[F]){u=F.location+"/"+F.lib;if(j===F.name)u+="/"+F.main;q.splice(0,K,u);break}}j=q.join("/")+(k||".js");j=(j.charAt(0)==="/"||j.match(/^\w+:/)?"":s.baseUrl)+j}return s.urlArgs?j+((j.indexOf("?")===-1?"?":"&")+s.urlArgs):j};y.blockCheckLoaded=true;y.checkLoaded=function(j){var k=x.contexts[j||x.ctxName],s=k.config.waitSeconds*1E3,q=s&&k.startTime+s<(new Date).getTime(),u,C=k.defined,F=k.modifiers,K="",aa=false,ba=false,U,ha=x.plugins.isWaiting,ua=x.plugins.orderDeps;if(!k.isCheckLoaded){if(k.config.priorityWait)if(B(k))D(k); +else return;k.isCheckLoaded=y.blockCheckLoaded;s=k.waiting;u=k.loaded;for(U in u)if(!(U in V)){aa=true;if(!u[U])if(q)K+=U+" ";else{ba=true;break}}if(!aa&&!s.length&&(!ha||!ha(k)))k.isCheckLoaded=false;else{if(q&&K){u=new Error("require.js load timeout for modules: "+K);u.requireType="timeout";u.requireModules=K;y.onError(u)}if(ba){k.isCheckLoaded=false;if(sa||Fa)setTimeout(function(){y.checkLoaded(j)},50)}else{k.waiting=[];k.loaded={};ua&&ua(k);for(U in F)U in V||C[U]&&y.execModifiers(U,{},s,k);for(u= +0;C=s[u];u++)y.exec(C,{},s,k);k.isCheckLoaded=false;if(k.waiting.length||ha&&ha(k))y.checkLoaded(j);else if(Y.length){u=k.loaded;k=true;for(U in u)if(!(U in V))if(!u[U]){k=false;break}if(k){x.ctxName=Y[0][1];U=Y;Y=[];for(u=0;k=U[u];u++)y.load.apply(y,k)}}else{x.ctxName="_";x.isDone=true;y.callReady&&y.callReady()}}}}};y.exec=function(j,k,s,q){if(j){var u=j.name,C=j.callback;C=j.deps;var F,K,aa=q.defined,ba,U=[],ha,ua=false;if(u){if(k[u]||u in aa)return aa[u];k[u]=true}if(C)for(F=0;K=C[F];F++){K=K.name; +if(K==="require")K=da(q,u);else if(K==="exports"){K=aa[u]={};ua=true}else if(K==="module"){ha=K={id:u,uri:u?y.nameToUrl(u,null,q.contextName):undefined};ha.setExports=P(ha)}else K=K in aa?aa[K]:k[K]?undefined:y.exec(s[s[K]],k,s,q);U.push(K)}if((C=j.callback)&&y.isFunction(C)){ba=y.execCb(u,C,U);if(u)if(ua&&ba===undefined&&(!ha||!("exports"in ha)))ba=aa[u];else if(ha&&"exports"in ha)ba=aa[u]=ha.exports;else{u in aa&&!ua&&y.onError(new Error(u+" has already been defined"));aa[u]=ba}}y.execModifiers(u, +k,s,q);return ba}};y.execCb=function(j,k,s){return k.apply(null,s)};y.execModifiers=function(j,k,s,q){var u=q.modifiers,C=u[j],F,K;if(C){for(K=0;K-1&&(ma=ja[W]);W--){if(!x.head)x.head=ma.parentNode;if(!xa&&(xa=ma.getAttribute("data-main"))){na.deps=na.deps?na.deps.concat(xa):[xa];if(!na.baseUrl&&(z=ma.src)){z=z.split("/");z.pop();x.baseUrl=na.baseUrl= +z.length?z.join("/"):"./"}}if(!x.baseUrl&&(z=ma.src))if(c=z.match(va)){x.baseUrl=z.substring(0,c.index);break}}}y.pageLoaded=function(){if(!x.isPageLoaded){x.isPageLoaded=true;Ja&&clearInterval(Ja);if(Ha)document.readyState="complete";y.callReady()}};y.callReady=function(){var j=x.readyCalls,k,s,q;if(x.isPageLoaded&&x.isDone){if(j.length){x.readyCalls=[];for(k=0;s=j[k];k++)s()}j=x.contexts;for(q in j)if(!(q in V)){k=j[q];if(k.jQueryIncremented){k.jQuery.readyWait-=1;k.jQueryIncremented=false}}}}; +y.ready=function(j){x.isPageLoaded&&x.isDone?j():x.readyCalls.push(j);return y};if(sa){if(document.addEventListener){document.addEventListener("DOMContentLoaded",y.pageLoaded,false);window.addEventListener("load",y.pageLoaded,false);if(!document.readyState){Ha=true;document.readyState="loading"}}else if(window.attachEvent){window.attachEvent("onload",y.pageLoaded);if(self===self.top)Ja=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");y.pageLoaded()}}catch(j){}}, +30)}document.readyState==="complete"&&y.pageLoaded()}y(na);typeof setTimeout!=="undefined"&&setTimeout(function(){var j=x.contexts[na.context||"_"];J(j);D(j)},0)})(); +(function(){function T(B,D){D=D.nlsWaiting;return D[B]||(D[B]=D[D.push({_name:B})-1])}function H(B,D,S,J){var P,ca,da,V,x,W,Y="root";ca=S.split("-");da=[];V=T(B,J);for(P=ca.length;P>-1;P--){x=P?ca.slice(0,P).join("-"):"root";if(W=D[x]){if(S===J.config.locale&&!V._match)V._match=x;if(Y==="root")Y=x;V[x]=x;if(W===true){W=B.split("/");W.splice(-1,0,x);W=W.join("/");if(!J.specified[W]&&!(W in J.loaded)&&!J.defined[W]){J.defPlugin[W]="i18n";da.push(W)}}}}if(Y!==S)if(J.defined[Y])J.defined[S]=J.defined[Y]; +else V[S]=Y;da.length&&require(da,J.contextName)}var la=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,M={};require.plugin({prefix:"i18n",require:function(B,D,S,J){var P,ca=J.defined[B];P=la.exec(B);if(P[5]){B=P[1]+P[5];D=T(B,J);D[P[4]]=P[4];D=J.nls[B];if(!D){J.defPlugin[B]="i18n";require([B],J.contextName);D=J.nls[B]={}}D[P[4]]=S}else{if(D=J.nls[B])require.mixin(D,ca);else D=J.nls[B]=ca;J.nlsRootLoaded[B]=true;if(P=J.nlsToLoad[B]){delete J.nlsToLoad[B];for(S=0;S0;S--){ma=da.slice(0,S).join("-"); +ma!=="root"&&ca[ma]&&require.mixin(x,ca[ma])}ca.root&&require.mixin(x,ca.root);B.defined[W+"/"+Y+"/"+V]=x}B.defined[J]=B.defined[W+"/"+ja+"/"+V];if(z)for(Y in z)Y in M||(B.defined[W+"/"+Y+"/"+V]=B.defined[W+"/"+z[Y]+"/"+V])}}})})(); +(function(){var T=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],H=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,la=/]*>\s*([\s\S]+)\s*<\/body>/im;if(!require.textStrip)require.textStrip=function(M){if(M){M=M.replace(H,"");var B=M.match(la);if(B)M=B[1]}else M="";return M};if(!require.getXhr)require.getXhr=function(){var M,B,D;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(B=0;B<3;B++){D=T[B];try{M=new ActiveXObject(D)}catch(S){}if(M){T= +[D];break}}if(!M)throw new Error("require.getXhr(): XMLHttpRequest not available");return M};if(!require.fetchText)require.fetchText=function(M,B){var D=require.getXhr();D.open("GET",M,true);D.onreadystatechange=function(){D.readyState===4&&B(D.responseText)};D.send(null)};require.plugin({prefix:"text",require:function(){},newContext:function(M){require.mixin(M,{text:{},textWaiting:[]})},load:function(M,B){var D=false,S=null,J,P=M.indexOf("."),ca=M.substring(0,P),da=M.substring(P+1,M.length),V=require.s.contexts[B], +x=V.textWaiting;P=da.indexOf("!");if(P!==-1){D=da.substring(P+1,da.length);da=da.substring(0,P);P=D.indexOf("!");if(P!==-1&&D.substring(0,P)==="strip"){S=D.substring(P+1,D.length);D="strip"}else if(D!=="strip"){S=D;D=null}}J=ca+"!"+da;P=D?J+"!"+D:J;if(S!==null&&!V.text[J])V.defined[M]=V.text[J]=S;else if(!V.text[J]&&!V.textWaiting[J]&&!V.textWaiting[P]){x[P]||(x[P]=x[x.push({name:M,key:J,fullKey:P,strip:!!D})-1]);B=require.nameToUrl(ca,"."+da,B);V.loaded[M]=false;require.fetchText(B,function(W){V.text[J]= +W;V.loaded[M]=true})}},checkDeps:function(){},isWaiting:function(M){return!!M.textWaiting.length},orderDeps:function(M){var B,D,S,J=M.textWaiting;M.textWaiting=[];for(B=0;D=J[B];B++){S=M.text[D.key];M.defined[D.name]=D.strip?require.textStrip(S):S}}})})(); +(function(){function T(M){var B=M.currentTarget||M.srcElement,D,S,J,P;if(M.type==="load"||la.test(B.readyState)){S=B.getAttribute("data-requirecontext");D=B.getAttribute("data-requiremodule");M=require.s.contexts[S];J=M.orderWaiting;P=M.orderCached;P[D]=true;for(D=0;P[J[D]];D++);D>0&&require(J.splice(0,D),S);if(!J.length)M.orderCached={};setTimeout(function(){B.parentNode.removeChild(B)},15)}}var H=document.createElement("script").async||window.opera&&Object.prototype.toString.call(window.opera)=== +"[object Opera]"||"MozAppearance"in document.documentElement.style,la=/^(complete|loaded)$/;require.plugin({prefix:"order",require:function(){},newContext:function(M){require.mixin(M,{orderWaiting:[],orderCached:{}})},load:function(M,B){var D=require.s.contexts[B],S=require.nameToUrl(M,null,B);require.s.skipAsync[S]=true;if(H)require([M],B);else{D.orderWaiting.push(M);D.loaded[M]=false;require.attach(S,B,M,T,"script/cache")}},checkDeps:function(){},isWaiting:function(M){return!!M.orderWaiting.length}, +orderDeps:function(){}})})(); +(function(T,H){function la(a,b,d){if(d===H&&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):na.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=H}return d}function M(){return false}function B(){return true}function D(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function S(a){var b,d,e,f,h,n,m,p,G,A,N,R=[];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)N=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var fa=h.live.slice(0);for(m=0;md)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;N=f.handleObj.origHandler.apply(f.elem,arguments);if(N===false||a.isPropagationStopped()){d=f.level;if(N===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function J(a,b){return(a&&a!=="*"?a+".": +"")+b.replace(Ja,"`").replace(y,"&")}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ca(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(aa.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 da(a){return c.nodeName(a,"table")? +a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(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 n in e[h])c.event.add(this,h,e[h][n],e[h][n].data)}}})}function x(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 W(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?cb:db,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 Y(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||eb.test(a)?e(a,h):Y(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){Y(a+"["+f+"]",h,d,e)});else e(a,b)}function ja(a,b){var d={};c.each(Ta.concat.apply([],Ta.slice(0,b)),function(){d[this]=a});return d}function ma(a){if(!Qa[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";Qa[a]=d}return Qa[a]}function va(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var z=T.document,c=function(){function a(){if(!b.isReady){try{z.documentElement.doScroll("left")}catch(l){setTimeout(a, +1);return}b.ready()}}var b=function(l,v){return new b.fn.init(l,v)},d=T.jQuery,e=T.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,n=/\S/,m=/^\s+/,p=/\s+$/,G=/\W/,A=/\d/,N=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,R=/^[\],:{}\s]*$/,fa=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,I=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ea=/(?:^|:|,)(?:\s*\[)+/g,oa=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,r=navigator.userAgent,t=false, +w=[],L,O=Object.prototype.toString,Z=Object.prototype.hasOwnProperty,ka=Array.prototype.push,pa=Array.prototype.slice,qa=String.prototype.trim,X=Array.prototype.indexOf,za={};b.fn=b.prototype={init:function(l,v){var E,Q;if(!l)return this;if(l.nodeType){this.context=this[0]=l;this.length=1;return this}if(l==="body"&&!v&&z.body){this.context=z;this[0]=z.body;this.selector="body";this.length=1;return this}if(typeof l==="string")if((E=h.exec(l))&&(E[1]||!v))if(E[1]){Q=v?v.ownerDocument||v:z;if(l=N.exec(l))if(b.isPlainObject(v)){l= +[z.createElement(l[1])];b.fn.attr.call(l,v,true)}else l=[Q.createElement(l[1])];else{l=b.buildFragment([E[1]],[Q]);l=(l.cacheable?l.fragment.cloneNode(true):l.fragment).childNodes}return b.merge(this,l)}else{if((v=z.getElementById(E[2]))&&v.parentNode){if(v.id!==E[2])return f.find(l);this.length=1;this[0]=v}this.context=z;this.selector=l;return this}else if(!v&&!G.test(l)){this.selector=l;this.context=z;l=z.getElementsByTagName(l);return b.merge(this,l)}else return!v||v.jquery?(v||f).find(l):b(v).find(l); +else if(b.isFunction(l))return f.ready(l);if(l.selector!==H){this.selector=l.selector;this.context=l.context}return b.makeArray(l,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},toArray:function(){return pa.call(this,0)},get:function(l){return l==null?this.toArray():l<0?this.slice(l)[0]:this[l]},pushStack:function(l,v,E){var Q=b();b.isArray(l)?ka.apply(Q,l):b.merge(Q,l);Q.prevObject=this;Q.context=this.context;if(v==="find")Q.selector=this.selector+(this.selector?" ": +"")+E;else if(v)Q.selector=this.selector+"."+v+"("+E+")";return Q},each:function(l,v){return b.each(this,l,v)},ready:function(l){b.bindReady();if(b.isReady)l.call(z,b);else w&&w.push(l);return this},eq:function(l){return l===-1?this.slice(l):this.slice(l,+l+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(pa.apply(this,arguments),"slice",pa.call(arguments).join(","))},map:function(l){return this.pushStack(b.map(this,function(v,E){return l.call(v, +E,v)}))},end:function(){return this.prevObject||b(null)},push:ka,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var l,v,E,Q,ga,$=arguments[0]||{},ia=1,ta=arguments.length,Ra=false;if(typeof $==="boolean"){Ra=$;$=arguments[1]||{};ia=2}if(typeof $!=="object"&&!b.isFunction($))$={};if(ta===ia){$=this;--ia}for(;ia0))if(w){var v=0,E=w;for(w=null;l=E[v++];)l.call(z,b);b.fn.trigger&&b(z).trigger("ready").unbind("ready")}}},bindReady:function(){if(!t){t=true;if(z.readyState=== +"complete")return setTimeout(b.ready,1);if(z.addEventListener){z.addEventListener("DOMContentLoaded",L,false);T.addEventListener("load",b.ready,false)}else if(z.attachEvent){z.attachEvent("onreadystatechange",L);T.attachEvent("onload",b.ready);var l=false;try{l=T.frameElement==null}catch(v){}z.documentElement.doScroll&&l&&a()}}},isFunction:function(l){return b.type(l)==="function"},isArray:Array.isArray||function(l){return b.type(l)==="array"},isWindow:function(l){return l&&typeof l==="object"&&"setInterval"in +l},isNaN:function(l){return l==null||!A.test(l)||isNaN(l)},type:function(l){return l==null?String(l):za[O.call(l)]||"object"},isPlainObject:function(l){if(!l||b.type(l)!=="object"||l.nodeType||b.isWindow(l))return false;if(l.constructor&&!Z.call(l,"constructor")&&!Z.call(l.constructor.prototype,"isPrototypeOf"))return false;var v;for(v in l);return v===H||Z.call(l,v)},isEmptyObject:function(l){for(var v in l)return false;return true},error:function(l){throw l;},parseJSON:function(l){if(typeof l!== +"string"||!l)return null;l=b.trim(l);if(R.test(l.replace(fa,"@").replace(I,"]").replace(ea,"")))return T.JSON&&T.JSON.parse?T.JSON.parse(l):(new Function("return "+l))();else b.error("Invalid JSON: "+l)},noop:function(){},globalEval:function(l){if(l&&n.test(l)){var v=z.getElementsByTagName("head")[0]||z.documentElement,E=z.createElement("script");E.type="text/javascript";if(b.support.scriptEval)E.appendChild(z.createTextNode(l));else E.text=l;v.insertBefore(E,v.firstChild);v.removeChild(E)}},nodeName:function(l, +v){return l.nodeName&&l.nodeName.toUpperCase()===v.toUpperCase()},each:function(l,v,E){var Q,ga=0,$=l.length,ia=$===H||b.isFunction(l);if(E)if(ia)for(Q in l){if(v.apply(l[Q],E)===false)break}else for(;ga<$;){if(v.apply(l[ga++],E)===false)break}else if(ia)for(Q in l){if(v.call(l[Q],Q,l[Q])===false)break}else for(E=l[0];ga<$&&v.call(E,ga,E)!==false;E=l[++ga]);return l},trim:qa?function(l){return l==null?"":qa.call(l)}:function(l){return l==null?"":l.toString().replace(m,"").replace(p,"")},makeArray:function(l, +v){v=v||[];if(l!=null){var E=b.type(l);l.length==null||E==="string"||E==="function"||E==="regexp"||b.isWindow(l)?ka.call(v,l):b.merge(v,l)}return v},inArray:function(l,v){if(v.indexOf)return v.indexOf(l);for(var E=0,Q=v.length;E
a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],n=z.createElement("select"),m=n.appendChild(z.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:m.selected,deleteExpando:true,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};n.disabled=true;c.support.optDisabled= +!m.disabled;b.type="text/javascript";try{b.appendChild(z.createTextNode("window."+e+"=1;"))}catch(p){}a.insertBefore(b,a.firstChild);if(T[e]){c.support.scriptEval=true;delete T[e]}try{delete b.test}catch(G){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function A(){c.support.noCloneEvent=false;d.detachEvent("onclick",A)});d.cloneNode(true).fireEvent("onclick")}d=z.createElement("div");d.innerHTML=""; +a=z.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var A=z.createElement("div");A.style.width=A.style.paddingLeft="1px";z.body.appendChild(A);c.boxModel=c.support.boxModel=A.offsetWidth===2;if("zoom"in A.style){A.style.display="inline";A.style.zoom=1;c.support.inlineBlockNeedsLayout=A.offsetWidth===2;A.style.display="";A.innerHTML="
";c.support.shrinkWrapBlocks=A.offsetWidth!== +2}A.innerHTML="
t
";var N=A.getElementsByTagName("td");c.support.reliableHiddenOffsets=N[0].offsetHeight===0;N[0].style.display="";N[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&N[0].offsetHeight===0;A.innerHTML="";z.body.removeChild(A).style.display="none"});a=function(A){var N=z.createElement("div");A="on"+A;var R=A in N;if(!R){N.setAttribute(A,"return;");R=typeof N[A]==="function"}return R}; +c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var xa={},na=/^(?:\{.*\}|\[.*\])$/;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==T?xa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===H)){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!==H)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==T?xa: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 n in a)delete a[n]}},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,n=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 N=c.makeArray(A);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),N)>=0});if(!N.length)this.selectedIndex=-1}else this.value=A}})}});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 H;if(e&&b in c.attrFn)return c(a)[b](d); +e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==H;b=e&&c.props[b]||b;var h=Ea.test(b);if((b in a||a[b]!==H)&&e&&!h){if(f){b==="type"&&sa.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:Fa.test(a.nodeName)||Pa.test(a.nodeName)&&a.href?0:H;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 H;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?H:a}});var ya=/\.(.*)$/,Ga=/^(?:textarea|input|select)$/i,Ja=/\./g,y=/ /g,Aa=/[^\w\s.|`]/g,wa=function(a){return a.replace(Aa,"\\$&")},Ka={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==T&&!a.frameElement)a= +T;if(d===false)d=M;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 n=a.nodeType?"events":"__events__",m=h[n],p=h.handle;if(typeof m==="function"){p=m.handle;m=m.events}else if(!m){a.nodeType||(h[n]=h=function(){});h.events=m={}}if(!p)h.handle=p=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(p.elem,arguments):H};p.elem=a;b=b.split(" ");for(var G=0,A;n=b[G++];){h=f?c.extend({},f):{handler:d,data:e};if(n.indexOf(".")> +-1){A=n.split(".");n=A.shift();h.namespace=A.slice(0).sort().join(".")}else{A=[];h.namespace=""}h.type=n;if(!h.guid)h.guid=d.guid;var N=m[n],R=c.event.special[n]||{};if(!N){N=m[n]=[];if(!R.setup||R.setup.call(a,e,A,p)===false)if(a.addEventListener)a.addEventListener(n,p,false);else a.attachEvent&&a.attachEvent("on"+n,p)}if(R.add){R.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}N.push(h);c.event.global[n]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType=== +8)){if(d===false)d=M;var f,h,n=0,m,p,G,A,N,R,fa=a.nodeType?"events":"__events__",I=c.data(a),ea=I&&I[fa];if(I&&ea){if(typeof ea==="function"){I=ea;ea=ea.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in ea)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[n++];){A=f;m=f.indexOf(".")<0;p=[];if(!m){p=f.split(".");f=p.shift();G=new RegExp("(^|\\.)"+c.map(p.slice(0).sort(),wa).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(N=ea[f])if(d){A=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 H;a.result=H;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 n;e=a.target;var m=f.replace(ya,""),p=c.nodeName(e,"a")&&m==="click",G=c.event.special[m]||{};if((!G._default||G._default.call(d,a)===false)&&!p&&!(e&&e.nodeName&& +c.noData[e.nodeName.toLowerCase()])){try{if(e[m]){if(n=e["on"+m])e["on"+m]=null;c.event.triggered=true;e[m]()}}catch(A){}if(n)e["on"+m]=n;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||T.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 n=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},q=function(a,b){var d=a.target,e,f;if(!(!Ga.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=s(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===H||f===e))if(e!=null||f){a.type="change";a.liveFired= +H;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:q,beforedeactivate:q,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return q.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 q.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",s(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in k)c.event.add(this,a+".specialChange",k[a]);return Ga.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return Ga.test(this.nodeName)}};k=c.event.special.change.filters;k.focus=k.beforeactivate}z.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(){Ka[b]++===0&&z.addEventListener(a,d,true)},teardown:function(){--Ka[b]=== +0&&z.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=H}var n=b==="one"?c.proxy(f,function(p){c(this).unbind(p,n);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var m=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});T.attachEvent&&!T.addEventListener&&c(T).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,o,r,t,w){t=0;for(var L=r.length;t0){Z=O;break}}O=O[g]}r[t]=Z}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,n=true;[0,0].sort(function(){n=false;return 0});var m=function(g,i,o,r){o=o||[];var t=i=i||z;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var w,L,O,Z,ka,pa=true,qa=m.isXML(i),X=[],za=g;do{d.exec("");if(w=d.exec(za)){za=w[3];X.push(w[1]);if(w[2]){Z= +w[3];break}}}while(w);if(X.length>1&&G.exec(g))if(X.length===2&&p.relative[X[0]])L=oa(X[0]+X[1],i);else for(L=p.relative[X[0]]?[i]:m(X.shift(),i);X.length;){g=X.shift();if(p.relative[g])g+=X.shift();L=oa(g,L)}else{if(!r&&X.length>1&&i.nodeType===9&&!qa&&p.match.ID.test(X[0])&&!p.match.ID.test(X[X.length-1])){w=m.find(X.shift(),i,qa);i=w.expr?m.filter(w.expr,w.set)[0]:w.set[0]}if(i){w=r?{expr:X.pop(),set:R(r)}:m.find(X.pop(),X.length===1&&(X[0]==="~"||X[0]==="+")&&i.parentNode?i.parentNode:i,qa);L= +w.expr?m.filter(w.expr,w.set):w.set;if(X.length>0)O=R(L);else pa=false;for(;X.length;){w=ka=X.pop();if(p.relative[ka])w=X.pop();else ka="";if(w==null)w=i;p.relative[ka](O,w,qa)}}else O=[]}O||(O=L);O||m.error(ka||g);if(f.call(O)==="[object Array]")if(pa)if(i&&i.nodeType===1)for(g=0;O[g]!=null;g++){if(O[g]&&(O[g]===true||O[g].nodeType===1&&m.contains(i,O[g])))o.push(L[g])}else for(g=0;O[g]!=null;g++)O[g]&&O[g].nodeType===1&&o.push(L[g]);else o.push.apply(o,O);else R(O,o);if(Z){m(Z,t,o,r);m.uniqueSort(o)}return o}; +m.uniqueSort=function(g){if(I){h=n;g.sort(I);if(h)for(var i=1;i0};m.find=function(g,i,o){var r;if(!g)return[];for(var t=0,w=p.order.length;t":function(g,i){var o,r=typeof i==="string",t=0,w=g.length;if(r&&!/\W/.test(i))for(i=i.toLowerCase();t=0))o||r.push(L);else if(o)i[w]=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,o,r,t,w){i=g[1].replace(/\\/g,"");if(!w&&p.attrMap[i])g[1]=p.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,o,r,t){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=m(g[3],null,null,i);else{g=m.filter(g[3],i,o,true^t);o||r.push.apply(r,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,o){return!!m(o[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,o,r){return i===r.length-1},even:function(g,i){return i%2=== +0},odd:function(g,i){return i%2===1},lt:function(g,i,o){return io[3]-0},nth:function(g,i,o){return o[3]-0===i},eq:function(g,i,o){return o[3]-0===i}},filter:{PSEUDO:function(g,i,o,r){var t=i[1],w=p.filters[t];if(w)return w(g,o,i,r);else if(t==="contains")return(g.textContent||g.innerText||m.getText([g])||"").indexOf(i[3])>=0;else if(t==="not"){i=i[3];o=0;for(r=i.length;o= +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 o=i[1];g=p.attrHandle[o]?p.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);o=g+"";var r=i[2];i=i[4];return g==null?r==="!=":r==="="?o===i:r==="*="?o.indexOf(i)>=0:r==="~="?(" "+o+" ").indexOf(i)>=0:!i?o&&g!==false:r==="!="?o!==i:r==="^="? +o.indexOf(i)===0:r==="$="?o.substr(o.length-i.length)===i:r==="|="?o===i||o.substr(0,i.length+1)===i+"-":false},POS:function(g,i,o,r){var t=p.setFilters[i[2]];if(t)return t(g,o,i,r)}}},G=p.match.POS,A=function(g,i){return"\\"+(i-0+1)};for(var N in p.match){p.match[N]=new RegExp(p.match[N].source+/(?![^\[]*\])(?![^\(]*\))/.source);p.leftMatch[N]=new RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[N].source.replace(/\\(\d+)/g,A))}var R=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(z.documentElement.childNodes,0)}catch(fa){R=function(g,i){var o=0;i=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(i,g);else if(typeof g.length==="number")for(var r=g.length;o";o.insertBefore(g,o.firstChild);if(z.getElementById(i)){p.find.ID=function(r,t,w){if(typeof t.getElementById!=="undefined"&&!w)return(t=t.getElementById(r[1]))?t.id===r[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue=== +r[1]?[t]:H:[]};p.filter.ID=function(r,t){var w=typeof r.getAttributeNode!=="undefined"&&r.getAttributeNode("id");return r.nodeType===1&&w&&w.nodeValue===t}}o.removeChild(g);o=g=null})();(function(){var g=z.createElement("div");g.appendChild(z.createComment(""));if(g.getElementsByTagName("*").length>0)p.find.TAG=function(i,o){o=o.getElementsByTagName(i[1]);if(i[1]==="*"){i=[];for(var r=0;o[r];r++)o[r].nodeType===1&&i.push(o[r]);o=i}return o};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})();z.querySelectorAll&&function(){var g=m,i=z.createElement("div");i.innerHTML="

";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){m=function(r,t,w,L){t=t||z;r=r.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!L&&!m.isXML(t))if(t.nodeType===9)try{return R(t.querySelectorAll(r),w)}catch(O){}else if(t.nodeType===1&&t.nodeName.toLowerCase()!== +"object"){var Z=t.getAttribute("id"),ka=Z||"__sizzle__";Z||t.setAttribute("id",ka);try{return R(t.querySelectorAll("#"+ka+" "+r),w)}catch(pa){}finally{Z||t.removeAttribute("id")}}return g(r,t,w,L)};for(var o in g)m[o]=g[o];i=null}}();(function(){var g=z.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{i.call(z.documentElement,"[test!='']:sizzle")}catch(r){o=true}if(i)m.matchesSelector=function(t,w){w=w.replace(/\=\s*([^'"\]]*)\s*\]/g, +"='$1']");if(!m.isXML(t))try{if(o||!p.match.PSEUDO.test(w)&&!/!=/.test(w))return i.call(t,w)}catch(L){}return m(w,null,null,[t]).length>0}})();(function(){var g=z.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,o,r){if(typeof o.getElementsByClassName!=="undefined"&& +!r)return o.getElementsByClassName(i[1])};g=null}}})();m.contains=z.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:z.documentElement.compareDocumentPosition?function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};m.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var oa=function(g,i){var o,r=[],t="";for(i=i.nodeType?[i]:i;o=p.match.PSEUDO.exec(g);){t+=o[0];g=g.replace(p.match.PSEUDO,"")}g= +p.relative[g]?g+"*":g;o=0;for(var w=i.length;o0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var n,m={},p=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(a))d.push({selector:n,elem:h,level:p})}h=h.parentNode;p++}}return d}n=U.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(P(a[0])||P(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);C.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||K.test(e))&&F.test(a))f=f.reverse();return this.pushStack(f,a,ba.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===H||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 ha=/ jQuery\d+="(?:\d+|null)"/g,ua=/^\s+/,Ua=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Va=/<([\w:]+)/,fb=/\s]+\/)>/g,ra={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};ra.optgroup=ra.option;ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead;ra.th=ra.td;if(!c.support.htmlSerialize)ra._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!==H)return this.empty().append((this[0]&&this[0].ownerDocument||z).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(ha,"").replace(hb,'="$1">').replace(ua,"")],e)[0]}else return this.cloneNode(true)});if(a===true){V(this,b);V(this.find("*"),b.find("*"))}return b},html:function(a){if(a===H)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ha,""):null; +else if(typeof a==="string"&&!Wa.test(a)&&(c.support.leadingWhitespace||!ua.test(a))&&!ra[(Va.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ua,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}m.length&&c.each(m, +x)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:z;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===z&&!Wa.test(a[0])&&(c.support.checkClone||!Xa.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](n);e=e.concat(n)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||z;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||z;for(var f=[],h=0,n;(n=a[h])!=null;h++){if(typeof n=== +"number")n+="";if(n){if(typeof n==="string"&&!gb.test(n))n=b.createTextNode(n);else if(typeof n==="string"){n=n.replace(Ua,"<$1>");var m=(Va.exec(n)||["",""])[1].toLowerCase(),p=ra[m]||ra._default,G=p[0],A=b.createElement("div");for(A.innerHTML=p[1]+n+p[2];G--;)A=A.lastChild;if(!c.support.tbody){G=fb.test(n);m=m==="table"&&!G?A.firstChild&&A.firstChild.childNodes:p[1]===""&&!G?A.childNodes:[];for(p=m.length-1;p>=0;--p)c.nodeName(m[p],"tbody")&&!m[p].childNodes.length&&m[p].parentNode.removeChild(m[p])}!c.support.leadingWhitespace&& +ua.test(n)&&A.insertBefore(b.createTextNode(ua.exec(n)[0]),A.firstChild);n=A.childNodes}if(n.nodeType)f.push(n);else f=c.merge(f,n)}}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,n=0,m;(m=a[n])!=null;n++)if(!(m.nodeName&&c.noData[m.nodeName.toLowerCase()]))if(d=m[c.expando]){if((b=e[d])&&b.events)for(var p in b.events)f[p]?c.event.remove(m,p):c.removeEvent(m,p,b.handle);if(h)delete m[c.expando];else m.removeAttribute&&m.removeAttribute(c.expando);delete e[d]}}});var Ya=/alpha\([^)]*\)/i,ib=/opacity=([^)]*)/,jb=/-([a-z])/ig,kb=/([A-Z])/g,Za=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},cb=["Left","Right"], +db=["Top","Bottom"],La,$a,Ma,nb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===H)return this;return c.access(this,a,b,true,function(d,e,f){return f!==H?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){a=La(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),n=a.style,m=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==H){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!m||!("set"in m)||(d=m.set(a,d))!==H)try{n[b]=d}catch(p){}}}else{if(m&&"get"in m&&(f=m.get(a,false,e))!==H)return f;return n[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))!==H)return e;else if(La)return La(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(jb,nb)}});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=W(d,b,f);else c.swap(d,mb,function(){h=W(d,b,f)});if(h<=0){h=La(d,b,b);if(h==="0px"&&Ma)h=Ma(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(Za.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 ib.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=Ya.test(d)?d.replace(Ya,b):a.filter+" "+b}};if(z.defaultView&&z.defaultView.getComputedStyle)$a= +function(a,b,d){var e;d=d.replace(kb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return H;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(z.documentElement.currentStyle)Ma=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Za.test(f)&&lb.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};La=$a||Ma;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 ob=c.now(),pb=/)<[^<]*)*<\/script>/gi,qb=/^(?:select|textarea)/i,rb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, +sb=/^(?:GET|HEAD)$/,eb=/\[\]$/,Ca=/\=\?(&|$)/,Sa=/\?/,tb=/([?&])_=[^&]*/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g,wb=/#.*$/,ab=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&ab)return ab.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(n,m){if(m==="success"||m==="notmodified")h.html(f?c("
").append(n.responseText.replace(pb,"")).find(f):n.responseText);d&&h.each(d,[n.responseText,m,n])}});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||qb.test(this.nodeName)||rb.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 T.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(),n=sb.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")Ca.test(b.url)||(b.url+=(Sa.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||!Ca.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&& +(b.data&&Ca.test(b.data)||Ca.test(b.url))){d=b.jsonpCallback||"jsonp"+ob++;if(b.data)b.data=(b.data+"").replace(Ca,"="+d+"$1");b.url=b.url.replace(Ca,"="+d+"$1");b.dataType="script";var m=T[d];T[d]=function(r){if(c.isFunction(m))m(r);else{T[d]=H;try{delete T[d]}catch(t){}}f=r;c.handleSuccess(b,I,e,f);c.handleComplete(b,I,e,f);A&&A.removeChild(N)}}if(b.dataType==="script"&&b.cache===null)b.cache=false;if(b.cache===false&&n){var p=c.now(),G=b.url.replace(tb,"$1_="+p);b.url=G+(G===b.url?(Sa.test(b.url)? +"&":"?")+"_="+p:"")}if(b.data&&n)b.url+=(Sa.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");p=(p=ub.exec(b.url))&&(p[1]&&p[1].toLowerCase()!==location.protocol||p[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&p){var A=z.getElementsByTagName("head")[0]||z.documentElement,N=z.createElement("script");if(b.scriptCharset)N.charset=b.scriptCharset;N.src=b.url;if(!d){var R=false;N.onload=N.onreadystatechange=function(){if(!R&&(!this.readyState|| +this.readyState==="loaded"||this.readyState==="complete")){R=true;c.handleSuccess(b,I,e,f);c.handleComplete(b,I,e,f);N.onload=N.onreadystatechange=null;A&&N.parentNode&&A.removeChild(N)}}}A.insertBefore(N,A.firstChild);return H}var fa=false,I=b.xhr();if(I){b.username?I.open(h,b.url,b.async,b.username,b.password):I.open(h,b.url,b.async);try{if(b.data!=null&&!n||a&&a.contentType)I.setRequestHeader("Content-Type",b.contentType);if(b.ifModified){c.lastModified[b.url]&&I.setRequestHeader("If-Modified-Since", +c.lastModified[b.url]);c.etag[b.url]&&I.setRequestHeader("If-None-Match",c.etag[b.url])}p||I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(ea){}if(b.beforeSend&&b.beforeSend.call(b.context,I,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");I.abort();return false}b.global&&c.triggerGlobal(b,"ajaxSend",[I,b]);var oa=I.onreadystatechange=function(r){if(!I|| +I.readyState===0||r==="abort"){fa||c.handleComplete(b,I,e,f);fa=true;if(I)I.onreadystatechange=c.noop}else if(!fa&&I&&(I.readyState===4||r==="timeout")){fa=true;I.onreadystatechange=c.noop;e=r==="timeout"?"timeout":!c.httpSuccess(I)?"error":b.ifModified&&c.httpNotModified(I,b.url)?"notmodified":"success";var t;if(e==="success")try{f=c.httpData(I,b.dataType,b)}catch(w){e="parsererror";t=w}if(e==="success"||e==="notmodified")d||c.handleSuccess(b,I,e,f);else c.handleError(b,I,e,t);d||c.handleComplete(b, +I,e,f);r==="timeout"&&I.abort();if(b.async)I=null}};try{var g=I.abort;I.abort=function(){I&&Function.prototype.call.call(g,I);oa("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){I&&!fa&&oa("timeout")},b.timeout);try{I.send(n||b.data==null?null:b.data)}catch(o){c.handleError(b,I,null,o);c.handleComplete(b,I,e,f)}b.async||oa();return I}},param:function(a,b){var d=[],e=function(h,n){n=c.isFunction(n)?n():n;d[d.length]=encodeURIComponent(h)+"="+encodeURIComponent(n)};if(b===H)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)Y(f,a[f],b,e);return d.join("&").replace(vb,"+")}});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(T.ActiveXObject)c.ajaxSettings.xhr=function(){if(T.location.protocol!== +"file:")try{return new T.XMLHttpRequest}catch(a){}try{return new T.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var Qa={},xb=/^(?:toggle|show|hide)$/,yb=/^([+\-]=)?([\d+.\-]+)(.*)$/,Na,Ta=[["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(ja("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:ja("show",1),slideUp:ja("hide",1),slideToggle:ja("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(n){return f.step(n)}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)&&!Na)Na=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(m,p){f.style["overflow"+p]=h.overflow[m]})}this.options.hide&& +c(this.elem).hide();if(this.options.hide||this.options.show)for(var n in this.options.curAnim)c.style(this.elem,n,this.options.orig[n]);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-1;e={};var G={};if(p)G=f.position();n=p?G.top:parseInt(n,10)||0;m=p?G.left:parseInt(m,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+n;if(b.left!=null)e.left=b.left-h.left+m;"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=bb.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|| +z.body;a&&!bb.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!==H)return this.each(function(){if(h=va(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=va(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(n){var m=c(this);m[d](e.call(this,n,m[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===H){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/docs/Data/requireplugins-jquery-1.4.4.js.highlighted b/docs/Data/requireplugins-jquery-1.4.4.js.highlighted new file mode 100644 index 0000000..b2980f9 --- /dev/null +++ b/docs/Data/requireplugins-jquery-1.4.4.js.highlighted @@ -0,0 +1,221 @@ +
/*
+ RequireJS 0.15.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 T(j){return Da.call(j)==="[object Function]"}function H(j,k,s){var q=x.plugins.defined[j];if(q)q[s.name].apply(null,s.args);else{q=x.plugins.waiting[j]||(x.plugins.waiting[j]=[]);q.push(s);y(["require/"+j],k.contextName)}}function la(j,k){Ea.apply(y,j);k.loaded[j[0]]=true}function M(j,k,s){var q,u,C;for(q=0;C=k[q];q++){C=typeof C==="string"?{name:C}:C;u=C.location;if(s&&(!u||u.indexOf("/")!==0&&u.indexOf(":")===-1))C.location=s+"/"+(C.location||C.name);C.location=C.location||
+C.name;C.lib=C.lib||"lib";C.main=C.main||"main";j[C.name]=C}}function B(j){var k=true,s=j.config.priorityWait,q,u;if(s){for(u=0;q=s[u];u++)if(!j.loaded[q]){k=false;break}k&&delete j.config.priorityWait}return k}function D(j){var k,s=x.paused;if(j.scriptCount<=0){for(j.scriptCount=0;wa.length;){k=wa.shift();k[0]===null?y.onError(new Error("Mismatched anonymous require.def modules")):la(k,j)}if(!(j.config.priorityWait&&!B(j))){if(s.length){x.paused=[];for(j=0;k=s[j];j++)y.checkDeps.apply(y,k)}Fa?setTimeout(function(){y.checkLoaded(x.ctxName)},
+30):y.checkLoaded(x.ctxName)}}}function S(j,k){var s=x.plugins.callbacks[j]=[];x.plugins[j]=function(){for(var q=0,u;u=s[q];q++)if(u.apply(null,arguments)===true&&k)return true;return false}}function J(j,k){if(!j.jQuery)if((k=k||(typeof jQuery!=="undefined"?jQuery:null))&&"readyWait"in k){j.jQuery=k;if(!j.defined.jquery&&!j.jQueryDef)j.defined.jquery=k;if(j.scriptCount){k.readyWait+=1;j.jQueryIncremented=true}}}function P(j){return function(k){j.exports=k}}function ca(j,k,s){return function(){var q=
+[].concat(Ga.call(arguments,0));q.push(k,s);return(j?require[j]:require).apply(null,q)}}function da(j,k){var s=j.contextName,q=ca(null,s,k);y.mixin(q,{modify:ca("modify",s,k),def:ca("def",s,k),get:ca("get",s,k),nameToUrl:ca("nameToUrl",s,k),toUrl:ca("toUrl",s,k),ready:y.ready,context:j,config:j.config,isBrowser:x.isBrowser});return q}var V={},x,W,Y=[],ja,ma,va,z,c,xa,na={},Ha,Ia=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,Oa=/require\(["']([\w\!\-_\.\/]+)["']\)/g,Ea,sa=!!(typeof window!=="undefined"&&navigator&&
+document),Fa=!sa&&typeof importScripts!=="undefined",Pa=sa&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,Da=Object.prototype.toString,ya=Array.prototype,Ga=ya.slice,Ja,y,Aa,wa=[],Ka=false,Ba;if(typeof require!=="undefined")if(T(require))return;else na=require;y=require=function(j,k,s,q,u){var C;if(typeof j==="string"&&!T(k))return require.get(j,k,s,q);if(!require.isArray(j)){C=j;if(require.isArray(k)){j=k;k=s;s=q;q=u}else j=[]}Ea(null,j,k,C,s,q);(j=x.contexts[s||C&&C.context||
+x.ctxName])&&j.scriptCount===0&&D(j)};y.onError=function(j){throw j;};define=y.def=function(j,k,s,q){var u,C,F=Ba;if(typeof j!=="string"){q=s;s=k;k=j;j=null}if(!y.isArray(k)){q=s;s=k;k=[]}if(!j&&!k.length&&y.isFunction(s)){s.toString().replace(Ia,"").replace(Oa,function(K,aa){k.push(aa)});k=["require","exports","module"].concat(k)}if(!j&&Ka){u=document.getElementsByTagName("script");for(j=u.length-1;j>-1&&(C=u[j]);j--)if(C.readyState==="interactive"){F=C;break}F||y.onError(new Error("ERROR: No matching script interactive for "+
+s));j=F.getAttribute("data-requiremodule")}if(typeof j==="string")x.contexts[x.ctxName].jQueryDef=j==="jquery";wa.push([j,k,s,null,q])};Ea=function(j,k,s,q,u,C){var F,K,aa,ba,U;u=u?u:q&&q.context?q.context:x.ctxName;F=x.contexts[u];if(j){K=j.indexOf("!");if(K!==-1){aa=j.substring(0,K);j=j.substring(K+1,j.length)}else aa=F.defPlugin[j];K=F.waiting[j];if(F&&(F.defined[j]||K&&K!==ya[j]))return}if(u!==x.ctxName){K=x.contexts[x.ctxName]&&x.contexts[x.ctxName].loaded;ba=true;if(K)for(U in K)if(!(U in V))if(!K[U]){ba=
+false;break}if(ba)x.ctxName=u}if(!F){F={contextName:u,config:{waitSeconds:7,baseUrl:x.baseUrl||"./",paths:{},packages:{}},waiting:[],specified:{require:true,exports:true,module:true},loaded:{},scriptCount:0,urlFetched:{},defPlugin:{},defined:{},modifiers:{}};x.plugins.newContext&&x.plugins.newContext(F);F=x.contexts[u]=F}if(q){if(q.baseUrl)if(q.baseUrl.charAt(q.baseUrl.length-1)!=="/")q.baseUrl+="/";ba=F.config.paths;K=F.config.packages;y.mixin(F.config,q,true);if(q.paths){for(U in q.paths)U in V||
+(ba[U]=q.paths[U]);F.config.paths=ba}if((ba=q.packagePaths)||q.packages){if(ba)for(U in ba)U in V||M(K,ba[U],U);q.packages&&M(K,q.packages);F.config.packages=K}if(q.priority){y(q.priority);F.config.priorityWait=q.priority}if(q.deps||q.callback)y(q.deps||[],q.callback);q.ready&&y.ready(q.ready);if(!k)return}if(k){U=k;k=[];for(q=0;q<U.length;q++)k[q]=y.splitPrefix(U[q],j||C,F)}C=F.waiting.push({name:j,deps:k,callback:s});if(j){F.waiting[j]=C-1;F.specified[j]=true;if(C=F.modifiers[j]){y(C,u);if(C=C.__deferMods)for(q=
+0;q<C.length;q++){U=C[q];K=U[U.length-1];if(K===undefined)U[U.length-1]=u;else typeof K==="string"&&C.push(u);require.def.apply(require,U)}}}if(j&&s&&!y.isFunction(s))F.defined[j]=s;aa&&H(aa,F,{name:"require",args:[j,k,s,F]});x.paused.push([aa,j,k,F]);if(j){F.loaded[j]=true;F.jQueryDef=j==="jquery"}};y.mixin=function(j,k,s){for(var q in k)if(!(q in V)&&(!(q in j)||s))j[q]=k[q];return y};y.version="0.15.0";x=y.s={ctxName:"_",contexts:{},paused:[],plugins:{defined:{},callbacks:{},waiting:{}},skipAsync:{},
+isBrowser:sa,isPageLoaded:!sa,readyCalls:[],doc:sa?document:null};y.isBrowser=x.isBrowser;if(sa){x.head=document.getElementsByTagName("head")[0];if(Aa=document.getElementsByTagName("base")[0])x.head=Aa.parentNode}y.plugin=function(j){var k,s,q,u=j.prefix,C=x.plugins.callbacks,F=x.plugins.waiting[u],K;k=x.plugins.defined;q=x.contexts;if(k[u])return y;k[u]=j;K=["newContext","isWaiting","orderDeps"];for(k=0;s=K[k];k++){x.plugins[s]||S(s,s==="isWaiting");C[s].push(j[s])}if(j.newContext)for(s in q)if(!(s in
+V)){k=q[s];j.newContext(k)}if(F){for(k=0;q=F[k];k++)j[q.name]&&j[q.name].apply(null,q.args);delete x.plugins.waiting[u]}return y};y.completeLoad=function(j,k){for(var s;wa.length;){s=wa.shift();if(s[0]===null){s[0]=j;break}else if(s[0]===j)break;else la(s,k)}s&&la(s,k);k.loaded[j]=true;J(k);k.scriptCount-=1;D(k)};y.pause=y.resume=function(){};y.checkDeps=function(j,k,s,q){if(j)H(j,q,{name:"checkDeps",args:[k,s,q]});else for(j=0;k=s[j];j++)if(!q.specified[k.fullName]){q.specified[k.fullName]=true;
+q.startTime=(new Date).getTime();k.prefix?H(k.prefix,q,{name:"load",args:[k.name,q.contextName]}):y.load(k.name,q.contextName)}};y.modify=function(j,k,s,q,u){var C,F,K=(typeof j==="string"?u:k)||x.ctxName,aa=x.contexts[K],ba=aa.modifiers;if(typeof j==="string"){F=ba[j]||(ba[j]=[]);if(!F[k]){F.push(k);F[k]=true}aa.specified[j]?y.def(k,s,q,u):(F.__deferMods||(F.__deferMods=[])).push([k,s,q,u])}else for(C in j)if(!(C in V)){k=j[C];F=ba[C]||(aa.modifiers[C]=[]);if(!F[k]){F.push(k);F[k]=true;aa.specified[C]&&
+y([k],K)}}};y.isArray=function(j){return Da.call(j)==="[object Array]"};y.isFunction=T;y.get=function(j,k,s){if(j==="require"||j==="exports"||j==="module")y.onError(new Error("Explicit require of "+j+" is not allowed."));k=k||x.ctxName;var q;q=x.contexts[k];s=y.splitPrefix(j,s,q);q=q.defined[s.name];q===undefined&&y.onError(new Error("require: module name '"+j+"' has not been loaded yet for context: "+k));return q};y.load=function(j,k){var s=x.contexts[k],q=s.urlFetched,u=s.loaded;x.isDone=false;
+u[j]||(u[j]=false);if(k!==x.ctxName)Y.push(arguments);else{u=y.nameToUrl(j,null,k);if(!q[u]){s.scriptCount+=1;y.attach(u,k,j);q[u]=true;if(s.jQuery&&!s.jQueryIncremented){s.jQuery.readyWait+=1;s.jQueryIncremented=true}}}};y.jsExtRegExp=/^\/|:|\?|\.js$/;y.normalizeName=function(j,k,s){if(j.charAt(0)===".")if(k){if(s.config.packages[k])k=[k];else{k=k.split("/");k=k.slice(0,k.length-1)}j=k.concat(j.split("/"));for(W=0;k=j[W];W++)if(k==="."){j.splice(W,1);W-=1}else if(k==="..")if(W===1)break;else if(W>
+1){j.splice(W-1,2);W-=2}j=j.join("/")}return j};y.splitPrefix=function(j,k,s){var q=j.indexOf("!"),u=null;if(q!==-1){u=j.substring(0,q);j=j.substring(q+1,j.length)}j=y.normalizeName(j,k,s);return{prefix:u,name:j,fullName:u?u+"!"+j:j}};y.nameToUrl=function(j,k,s,q){var u,C,F,K;K=x.contexts[s];s=K.config;j=y.normalizeName(j,q,K);if(y.jsExtRegExp.test(j))j=j+(k?k:"");else{u=s.paths;C=s.packages;q=j.split("/");for(K=q.length;K>0;K--){F=q.slice(0,K).join("/");if(u[F]){q.splice(0,K,u[F]);break}else if(F=
+C[F]){u=F.location+"/"+F.lib;if(j===F.name)u+="/"+F.main;q.splice(0,K,u);break}}j=q.join("/")+(k||".js");j=(j.charAt(0)==="/"||j.match(/^\w+:/)?"":s.baseUrl)+j}return s.urlArgs?j+((j.indexOf("?")===-1?"?":"&")+s.urlArgs):j};y.blockCheckLoaded=true;y.checkLoaded=function(j){var k=x.contexts[j||x.ctxName],s=k.config.waitSeconds*1E3,q=s&&k.startTime+s<(new Date).getTime(),u,C=k.defined,F=k.modifiers,K="",aa=false,ba=false,U,ha=x.plugins.isWaiting,ua=x.plugins.orderDeps;if(!k.isCheckLoaded){if(k.config.priorityWait)if(B(k))D(k);
+else return;k.isCheckLoaded=y.blockCheckLoaded;s=k.waiting;u=k.loaded;for(U in u)if(!(U in V)){aa=true;if(!u[U])if(q)K+=U+" ";else{ba=true;break}}if(!aa&&!s.length&&(!ha||!ha(k)))k.isCheckLoaded=false;else{if(q&&K){u=new Error("require.js load timeout for modules: "+K);u.requireType="timeout";u.requireModules=K;y.onError(u)}if(ba){k.isCheckLoaded=false;if(sa||Fa)setTimeout(function(){y.checkLoaded(j)},50)}else{k.waiting=[];k.loaded={};ua&&ua(k);for(U in F)U in V||C[U]&&y.execModifiers(U,{},s,k);for(u=
+0;C=s[u];u++)y.exec(C,{},s,k);k.isCheckLoaded=false;if(k.waiting.length||ha&&ha(k))y.checkLoaded(j);else if(Y.length){u=k.loaded;k=true;for(U in u)if(!(U in V))if(!u[U]){k=false;break}if(k){x.ctxName=Y[0][1];U=Y;Y=[];for(u=0;k=U[u];u++)y.load.apply(y,k)}}else{x.ctxName="_";x.isDone=true;y.callReady&&y.callReady()}}}}};y.exec=function(j,k,s,q){if(j){var u=j.name,C=j.callback;C=j.deps;var F,K,aa=q.defined,ba,U=[],ha,ua=false;if(u){if(k[u]||u in aa)return aa[u];k[u]=true}if(C)for(F=0;K=C[F];F++){K=K.name;
+if(K==="require")K=da(q,u);else if(K==="exports"){K=aa[u]={};ua=true}else if(K==="module"){ha=K={id:u,uri:u?y.nameToUrl(u,null,q.contextName):undefined};ha.setExports=P(ha)}else K=K in aa?aa[K]:k[K]?undefined:y.exec(s[s[K]],k,s,q);U.push(K)}if((C=j.callback)&&y.isFunction(C)){ba=y.execCb(u,C,U);if(u)if(ua&&ba===undefined&&(!ha||!("exports"in ha)))ba=aa[u];else if(ha&&"exports"in ha)ba=aa[u]=ha.exports;else{u in aa&&!ua&&y.onError(new Error(u+" has already been defined"));aa[u]=ba}}y.execModifiers(u,
+k,s,q);return ba}};y.execCb=function(j,k,s){return k.apply(null,s)};y.execModifiers=function(j,k,s,q){var u=q.modifiers,C=u[j],F,K;if(C){for(K=0;K<C.length;K++){F=C[K];F in s&&y.exec(s[s[F]],k,s,q)}delete u[j]}};y.onScriptLoad=function(j){var k=j.currentTarget||j.srcElement,s;if(j.type==="load"||Pa.test(k.readyState)){s=k.getAttribute("data-requirecontext");j=k.getAttribute("data-requiremodule");s=x.contexts[s];y.completeLoad(j,s);k.removeEventListener?k.removeEventListener("load",y.onScriptLoad,
+false):k.detachEvent("onreadystatechange",y.onScriptLoad)}};y.attach=function(j,k,s,q,u){var C;if(sa){q=q||y.onScriptLoad;C=document.createElement("script");C.type=u||"text/javascript";C.charset="utf-8";C.async=!x.skipAsync[j];C.setAttribute("data-requirecontext",k);C.setAttribute("data-requiremodule",s);if(C.addEventListener)C.addEventListener("load",q,false);else{Ka=true;C.attachEvent("onreadystatechange",q)}C.src=j;Ba=C;Aa?x.head.insertBefore(C,Aa):x.head.appendChild(C);Ba=null;return C}else if(Fa){q=
+x.contexts[k];k=q.loaded;k[s]=false;importScripts(j);y.completeLoad(s,q)}return null};x.baseUrl=na.baseUrl;if(sa&&(!x.baseUrl||!x.head)){ja=document.getElementsByTagName("script");va=na.baseUrlMatch?na.baseUrlMatch:/(requireplugins-|require-)?jquery[\-\d\.]*(min)?\.js(\W|$)/i;for(W=ja.length-1;W>-1&&(ma=ja[W]);W--){if(!x.head)x.head=ma.parentNode;if(!xa&&(xa=ma.getAttribute("data-main"))){na.deps=na.deps?na.deps.concat(xa):[xa];if(!na.baseUrl&&(z=ma.src)){z=z.split("/");z.pop();x.baseUrl=na.baseUrl=
+z.length?z.join("/"):"./"}}if(!x.baseUrl&&(z=ma.src))if(c=z.match(va)){x.baseUrl=z.substring(0,c.index);break}}}y.pageLoaded=function(){if(!x.isPageLoaded){x.isPageLoaded=true;Ja&&clearInterval(Ja);if(Ha)document.readyState="complete";y.callReady()}};y.callReady=function(){var j=x.readyCalls,k,s,q;if(x.isPageLoaded&&x.isDone){if(j.length){x.readyCalls=[];for(k=0;s=j[k];k++)s()}j=x.contexts;for(q in j)if(!(q in V)){k=j[q];if(k.jQueryIncremented){k.jQuery.readyWait-=1;k.jQueryIncremented=false}}}};
+y.ready=function(j){x.isPageLoaded&&x.isDone?j():x.readyCalls.push(j);return y};if(sa){if(document.addEventListener){document.addEventListener("DOMContentLoaded",y.pageLoaded,false);window.addEventListener("load",y.pageLoaded,false);if(!document.readyState){Ha=true;document.readyState="loading"}}else if(window.attachEvent){window.attachEvent("onload",y.pageLoaded);if(self===self.top)Ja=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");y.pageLoaded()}}catch(j){}},
+30)}document.readyState==="complete"&&y.pageLoaded()}y(na);typeof setTimeout!=="undefined"&&setTimeout(function(){var j=x.contexts[na.context||"_"];J(j);D(j)},0)})();
+(function(){function T(B,D){D=D.nlsWaiting;return D[B]||(D[B]=D[D.push({_name:B})-1])}function H(B,D,S,J){var P,ca,da,V,x,W,Y="root";ca=S.split("-");da=[];V=T(B,J);for(P=ca.length;P>-1;P--){x=P?ca.slice(0,P).join("-"):"root";if(W=D[x]){if(S===J.config.locale&&!V._match)V._match=x;if(Y==="root")Y=x;V[x]=x;if(W===true){W=B.split("/");W.splice(-1,0,x);W=W.join("/");if(!J.specified[W]&&!(W in J.loaded)&&!J.defined[W]){J.defPlugin[W]="i18n";da.push(W)}}}}if(Y!==S)if(J.defined[Y])J.defined[S]=J.defined[Y];
+else V[S]=Y;da.length&&require(da,J.contextName)}var la=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,M={};require.plugin({prefix:"i18n",require:function(B,D,S,J){var P,ca=J.defined[B];P=la.exec(B);if(P[5]){B=P[1]+P[5];D=T(B,J);D[P[4]]=P[4];D=J.nls[B];if(!D){J.defPlugin[B]="i18n";require([B],J.contextName);D=J.nls[B]={}}D[P[4]]=S}else{if(D=J.nls[B])require.mixin(D,ca);else D=J.nls[B]=ca;J.nlsRootLoaded[B]=true;if(P=J.nlsToLoad[B]){delete J.nlsToLoad[B];for(S=0;S<P.length;S++)H(B,D,P[S],J)}H(B,D,J.config.locale,
+J)}},newContext:function(B){require.mixin(B,{nlsWaiting:[],nls:{},nlsRootLoaded:{},nlsToLoad:{}});if(!B.config.locale)B.config.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()},load:function(B,D){var S=require.s.contexts[D],J;J=la.exec(B);var P=J[4];if(J[5]){B=J[1]+J[5];J=S.nls[B];if(S.nlsRootLoaded[B]&&J)H(B,J,P,S);else{(S.nlsToLoad[B]||(S.nlsToLoad[B]=[])).push(P);S.defPlugin[B]="i18n";require([B],D)}}else if(!S.nlsRootLoaded[B]){S.defPlugin[B]=
+"i18n";require.load(B,D)}},checkDeps:function(){},isWaiting:function(B){return!!B.nlsWaiting.length},orderDeps:function(B){var D,S,J,P,ca,da,V,x,W,Y,ja,ma,va=B.nlsWaiting,z;B.nlsWaiting=[];B.nlsToLoad={};for(D=0;P=va[D];D++){J=P._name;ca=B.nls[J];ja=null;da=J.split("/");W=da.slice(0,da.length-1).join("/");V=da[da.length-1];for(Y in P)if(Y!=="_name"&&!(Y in M))if(Y==="_match")ja=P[Y];else if(P[Y]!==Y)(z||(z={}))[Y]=P[Y];else{x={};da=Y.split("-");for(S=da.length;S>0;S--){ma=da.slice(0,S).join("-");
+ma!=="root"&&ca[ma]&&require.mixin(x,ca[ma])}ca.root&&require.mixin(x,ca.root);B.defined[W+"/"+Y+"/"+V]=x}B.defined[J]=B.defined[W+"/"+ja+"/"+V];if(z)for(Y in z)Y in M||(B.defined[W+"/"+Y+"/"+V]=B.defined[W+"/"+z[Y]+"/"+V])}}})})();
+(function(){var T=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],H=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,la=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im;if(!require.textStrip)require.textStrip=function(M){if(M){M=M.replace(H,"");var B=M.match(la);if(B)M=B[1]}else M="";return M};if(!require.getXhr)require.getXhr=function(){var M,B,D;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(B=0;B<3;B++){D=T[B];try{M=new ActiveXObject(D)}catch(S){}if(M){T=
+[D];break}}if(!M)throw new Error("require.getXhr(): XMLHttpRequest not available");return M};if(!require.fetchText)require.fetchText=function(M,B){var D=require.getXhr();D.open("GET",M,true);D.onreadystatechange=function(){D.readyState===4&&B(D.responseText)};D.send(null)};require.plugin({prefix:"text",require:function(){},newContext:function(M){require.mixin(M,{text:{},textWaiting:[]})},load:function(M,B){var D=false,S=null,J,P=M.indexOf("."),ca=M.substring(0,P),da=M.substring(P+1,M.length),V=require.s.contexts[B],
+x=V.textWaiting;P=da.indexOf("!");if(P!==-1){D=da.substring(P+1,da.length);da=da.substring(0,P);P=D.indexOf("!");if(P!==-1&&D.substring(0,P)==="strip"){S=D.substring(P+1,D.length);D="strip"}else if(D!=="strip"){S=D;D=null}}J=ca+"!"+da;P=D?J+"!"+D:J;if(S!==null&&!V.text[J])V.defined[M]=V.text[J]=S;else if(!V.text[J]&&!V.textWaiting[J]&&!V.textWaiting[P]){x[P]||(x[P]=x[x.push({name:M,key:J,fullKey:P,strip:!!D})-1]);B=require.nameToUrl(ca,"."+da,B);V.loaded[M]=false;require.fetchText(B,function(W){V.text[J]=
+W;V.loaded[M]=true})}},checkDeps:function(){},isWaiting:function(M){return!!M.textWaiting.length},orderDeps:function(M){var B,D,S,J=M.textWaiting;M.textWaiting=[];for(B=0;D=J[B];B++){S=M.text[D.key];M.defined[D.name]=D.strip?require.textStrip(S):S}}})})();
+(function(){function T(M){var B=M.currentTarget||M.srcElement,D,S,J,P;if(M.type==="load"||la.test(B.readyState)){S=B.getAttribute("data-requirecontext");D=B.getAttribute("data-requiremodule");M=require.s.contexts[S];J=M.orderWaiting;P=M.orderCached;P[D]=true;for(D=0;P[J[D]];D++);D>0&&require(J.splice(0,D),S);if(!J.length)M.orderCached={};setTimeout(function(){B.parentNode.removeChild(B)},15)}}var H=document.createElement("script").async||window.opera&&Object.prototype.toString.call(window.opera)===
+"[object Opera]"||"MozAppearance"in document.documentElement.style,la=/^(complete|loaded)$/;require.plugin({prefix:"order",require:function(){},newContext:function(M){require.mixin(M,{orderWaiting:[],orderCached:{}})},load:function(M,B){var D=require.s.contexts[B],S=require.nameToUrl(M,null,B);require.s.skipAsync[S]=true;if(H)require([M],B);else{D.orderWaiting.push(M);D.loaded[M]=false;require.attach(S,B,M,T,"script/cache")}},checkDeps:function(){},isWaiting:function(M){return!!M.orderWaiting.length},
+orderDeps:function(){}})})();
+(function(T,H){function la(a,b,d){if(d===H&&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):na.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=H}return d}function M(){return false}function B(){return true}function D(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function S(a){var b,d,e,f,h,n,m,p,G,A,N,R=[];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)N=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var fa=h.live.slice(0);for(m=0;m<fa.length;m++){h=fa[m];h.origType.replace(ya,"")===a.type?f.push(h.selector):fa.splice(m--,1)}f=c(a.target).closest(f,a.currentTarget);p=0;for(G=f.length;p<G;p++){A=f[p];for(m=0;m<fa.length;m++){h=fa[m];if(A.selector===h.selector&&(!N||N.test(h.namespace))){n=A.elem;e=null;if(h.preType===
+"mouseenter"||h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==n)R.push({elem:n,handleObj:h,level:A.level})}}}p=0;for(G=R.length;p<G;p++){f=R[p];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;N=f.handleObj.origHandler.apply(f.elem,arguments);if(N===false||a.isPropagationStopped()){d=f.level;if(N===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function J(a,b){return(a&&a!=="*"?a+".":
+"")+b.replace(Ja,"`").replace(y,"&")}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ca(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(aa.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 da(a){return c.nodeName(a,"table")?
+a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(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 n in e[h])c.event.add(this,h,e[h][n],e[h][n].data)}}})}function x(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 W(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?cb:db,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 Y(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||eb.test(a)?e(a,h):Y(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){Y(a+"["+f+"]",h,d,e)});else e(a,b)}function ja(a,b){var d={};c.each(Ta.concat.apply([],Ta.slice(0,b)),function(){d[this]=a});return d}function ma(a){if(!Qa[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";Qa[a]=d}return Qa[a]}function va(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var z=T.document,c=function(){function a(){if(!b.isReady){try{z.documentElement.doScroll("left")}catch(l){setTimeout(a,
+1);return}b.ready()}}var b=function(l,v){return new b.fn.init(l,v)},d=T.jQuery,e=T.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,n=/\S/,m=/^\s+/,p=/\s+$/,G=/\W/,A=/\d/,N=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,R=/^[\],:{}\s]*$/,fa=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,I=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ea=/(?:^|:|,)(?:\s*\[)+/g,oa=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,r=navigator.userAgent,t=false,
+w=[],L,O=Object.prototype.toString,Z=Object.prototype.hasOwnProperty,ka=Array.prototype.push,pa=Array.prototype.slice,qa=String.prototype.trim,X=Array.prototype.indexOf,za={};b.fn=b.prototype={init:function(l,v){var E,Q;if(!l)return this;if(l.nodeType){this.context=this[0]=l;this.length=1;return this}if(l==="body"&&!v&&z.body){this.context=z;this[0]=z.body;this.selector="body";this.length=1;return this}if(typeof l==="string")if((E=h.exec(l))&&(E[1]||!v))if(E[1]){Q=v?v.ownerDocument||v:z;if(l=N.exec(l))if(b.isPlainObject(v)){l=
+[z.createElement(l[1])];b.fn.attr.call(l,v,true)}else l=[Q.createElement(l[1])];else{l=b.buildFragment([E[1]],[Q]);l=(l.cacheable?l.fragment.cloneNode(true):l.fragment).childNodes}return b.merge(this,l)}else{if((v=z.getElementById(E[2]))&&v.parentNode){if(v.id!==E[2])return f.find(l);this.length=1;this[0]=v}this.context=z;this.selector=l;return this}else if(!v&&!G.test(l)){this.selector=l;this.context=z;l=z.getElementsByTagName(l);return b.merge(this,l)}else return!v||v.jquery?(v||f).find(l):b(v).find(l);
+else if(b.isFunction(l))return f.ready(l);if(l.selector!==H){this.selector=l.selector;this.context=l.context}return b.makeArray(l,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},toArray:function(){return pa.call(this,0)},get:function(l){return l==null?this.toArray():l<0?this.slice(l)[0]:this[l]},pushStack:function(l,v,E){var Q=b();b.isArray(l)?ka.apply(Q,l):b.merge(Q,l);Q.prevObject=this;Q.context=this.context;if(v==="find")Q.selector=this.selector+(this.selector?" ":
+"")+E;else if(v)Q.selector=this.selector+"."+v+"("+E+")";return Q},each:function(l,v){return b.each(this,l,v)},ready:function(l){b.bindReady();if(b.isReady)l.call(z,b);else w&&w.push(l);return this},eq:function(l){return l===-1?this.slice(l):this.slice(l,+l+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(pa.apply(this,arguments),"slice",pa.call(arguments).join(","))},map:function(l){return this.pushStack(b.map(this,function(v,E){return l.call(v,
+E,v)}))},end:function(){return this.prevObject||b(null)},push:ka,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var l,v,E,Q,ga,$=arguments[0]||{},ia=1,ta=arguments.length,Ra=false;if(typeof $==="boolean"){Ra=$;$=arguments[1]||{};ia=2}if(typeof $!=="object"&&!b.isFunction($))$={};if(ta===ia){$=this;--ia}for(;ia<ta;ia++)if((l=arguments[ia])!=null)for(v in l){E=$[v];Q=l[v];if($!==Q)if(Ra&&Q&&(b.isPlainObject(Q)||(ga=b.isArray(Q)))){if(ga){ga=false;E=E&&b.isArray(E)?
+E:[]}else E=E&&b.isPlainObject(E)?E:{};$[v]=b.extend(Ra,E,Q)}else if(Q!==H)$[v]=Q}return $};b.extend({noConflict:function(l){T.$=e;if(l)T.jQuery=d;return b},isReady:false,readyWait:1,ready:function(l){l===true&&b.readyWait--;if(!b.readyWait||l!==true&&!b.isReady){if(!z.body)return setTimeout(b.ready,1);b.isReady=true;if(!(l!==true&&--b.readyWait>0))if(w){var v=0,E=w;for(w=null;l=E[v++];)l.call(z,b);b.fn.trigger&&b(z).trigger("ready").unbind("ready")}}},bindReady:function(){if(!t){t=true;if(z.readyState===
+"complete")return setTimeout(b.ready,1);if(z.addEventListener){z.addEventListener("DOMContentLoaded",L,false);T.addEventListener("load",b.ready,false)}else if(z.attachEvent){z.attachEvent("onreadystatechange",L);T.attachEvent("onload",b.ready);var l=false;try{l=T.frameElement==null}catch(v){}z.documentElement.doScroll&&l&&a()}}},isFunction:function(l){return b.type(l)==="function"},isArray:Array.isArray||function(l){return b.type(l)==="array"},isWindow:function(l){return l&&typeof l==="object"&&"setInterval"in
+l},isNaN:function(l){return l==null||!A.test(l)||isNaN(l)},type:function(l){return l==null?String(l):za[O.call(l)]||"object"},isPlainObject:function(l){if(!l||b.type(l)!=="object"||l.nodeType||b.isWindow(l))return false;if(l.constructor&&!Z.call(l,"constructor")&&!Z.call(l.constructor.prototype,"isPrototypeOf"))return false;var v;for(v in l);return v===H||Z.call(l,v)},isEmptyObject:function(l){for(var v in l)return false;return true},error:function(l){throw l;},parseJSON:function(l){if(typeof l!==
+"string"||!l)return null;l=b.trim(l);if(R.test(l.replace(fa,"@").replace(I,"]").replace(ea,"")))return T.JSON&&T.JSON.parse?T.JSON.parse(l):(new Function("return "+l))();else b.error("Invalid JSON: "+l)},noop:function(){},globalEval:function(l){if(l&&n.test(l)){var v=z.getElementsByTagName("head")[0]||z.documentElement,E=z.createElement("script");E.type="text/javascript";if(b.support.scriptEval)E.appendChild(z.createTextNode(l));else E.text=l;v.insertBefore(E,v.firstChild);v.removeChild(E)}},nodeName:function(l,
+v){return l.nodeName&&l.nodeName.toUpperCase()===v.toUpperCase()},each:function(l,v,E){var Q,ga=0,$=l.length,ia=$===H||b.isFunction(l);if(E)if(ia)for(Q in l){if(v.apply(l[Q],E)===false)break}else for(;ga<$;){if(v.apply(l[ga++],E)===false)break}else if(ia)for(Q in l){if(v.call(l[Q],Q,l[Q])===false)break}else for(E=l[0];ga<$&&v.call(E,ga,E)!==false;E=l[++ga]);return l},trim:qa?function(l){return l==null?"":qa.call(l)}:function(l){return l==null?"":l.toString().replace(m,"").replace(p,"")},makeArray:function(l,
+v){v=v||[];if(l!=null){var E=b.type(l);l.length==null||E==="string"||E==="function"||E==="regexp"||b.isWindow(l)?ka.call(v,l):b.merge(v,l)}return v},inArray:function(l,v){if(v.indexOf)return v.indexOf(l);for(var E=0,Q=v.length;E<Q;E++)if(v[E]===l)return E;return-1},merge:function(l,v){var E=l.length,Q=0;if(typeof v.length==="number")for(var ga=v.length;Q<ga;Q++)l[E++]=v[Q];else for(;v[Q]!==H;)l[E++]=v[Q++];l.length=E;return l},grep:function(l,v,E){var Q=[],ga;E=!!E;for(var $=0,ia=l.length;$<ia;$++){ga=
+!!v(l[$],$);E!==ga&&Q.push(l[$])}return Q},map:function(l,v,E){for(var Q=[],ga,$=0,ia=l.length;$<ia;$++){ga=v(l[$],$,E);if(ga!=null)Q[Q.length]=ga}return Q.concat.apply([],Q)},guid:1,proxy:function(l,v,E){if(arguments.length===2)if(typeof v==="string"){E=l;l=E[v];v=H}else if(v&&!b.isFunction(v)){E=v;v=H}if(!v&&l)v=function(){return l.apply(E||this,arguments)};if(l)v.guid=l.guid=l.guid||v.guid||b.guid++;return v},access:function(l,v,E,Q,ga,$){var ia=l.length;if(typeof v==="object"){for(var ta in v)b.access(l,
+ta,v[ta],Q,ga,E);return l}if(E!==H){Q=!$&&Q&&b.isFunction(E);for(ta=0;ta<ia;ta++)ga(l[ta],v,Q?E.call(l[ta],ta,ga(l[ta],v)):E,$);return l}return ia?ga(l[0],v):H},now:function(){return(new Date).getTime()},uaMatch:function(l){l=l.toLowerCase();l=oa.exec(l)||g.exec(l)||i.exec(l)||l.indexOf("compatible")<0&&o.exec(l)||[];return{browser:l[1]||"",version:l[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(l,v){za["[object "+v+"]"]=v.toLowerCase()});
+r=b.uaMatch(r);if(r.browser){b.browser[r.browser]=true;b.browser.version=r.version}if(b.browser.webkit)b.browser.safari=true;if(X)b.inArray=function(l,v){return X.call(v,l)};if(!/\s/.test("\u00a0")){m=/^[\s\xA0]+/;p=/[\s\xA0]+$/}f=b(z);if(z.addEventListener)L=function(){z.removeEventListener("DOMContentLoaded",L,false);b.ready()};else if(z.attachEvent)L=function(){if(z.readyState==="complete"){z.detachEvent("onreadystatechange",L);b.ready()}};return T.jQuery=T.$=b}();(function(){c.support={};var a=
+z.documentElement,b=z.createElement("script"),d=z.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],n=z.createElement("select"),m=n.appendChild(z.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:m.selected,deleteExpando:true,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};n.disabled=true;c.support.optDisabled=
+!m.disabled;b.type="text/javascript";try{b.appendChild(z.createTextNode("window."+e+"=1;"))}catch(p){}a.insertBefore(b,a.firstChild);if(T[e]){c.support.scriptEval=true;delete T[e]}try{delete b.test}catch(G){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function A(){c.support.noCloneEvent=false;d.detachEvent("onclick",A)});d.cloneNode(true).fireEvent("onclick")}d=z.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";
+a=z.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var A=z.createElement("div");A.style.width=A.style.paddingLeft="1px";z.body.appendChild(A);c.boxModel=c.support.boxModel=A.offsetWidth===2;if("zoom"in A.style){A.style.display="inline";A.style.zoom=1;c.support.inlineBlockNeedsLayout=A.offsetWidth===2;A.style.display="";A.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=A.offsetWidth!==
+2}A.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var N=A.getElementsByTagName("td");c.support.reliableHiddenOffsets=N[0].offsetHeight===0;N[0].style.display="";N[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&N[0].offsetHeight===0;A.innerHTML="";z.body.removeChild(A).style.display="none"});a=function(A){var N=z.createElement("div");A="on"+A;var R=A in N;if(!R){N.setAttribute(A,"return;");R=typeof N[A]==="function"}return R};
+c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var xa={},na=/^(?:\{.*\}|\[.*\])$/;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==T?xa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===H)){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!==H)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==T?xa: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 n in a)delete a[n]}},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,n=e.length;h<n;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);la(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,a)});var m=a.split(".");m[1]=m[1]?"."+m[1]:"";if(b===H){d=this.triggerHandler("getData"+m[1]+"!",[m[0]]);if(d===H&&this.length){d=
+c.data(this[0],a);d=la(this[0],a,d)}return d===H&&m[1]?this.data(m[0]):d}else return this.each(function(){var p=c(this),G=[m[0],b];p.triggerHandler("setData"+m[1]+"!",G);c.data(this,a,b);p.triggerHandler("changeData"+m[1]+"!",G)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=
+b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===H)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,
+function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Ha=/[\n\t]/g,Ia=/\s+/,Oa=/\r/g,Ea=/^(?:href|src|style)$/,sa=/^(?:button|input)$/i,Fa=/^(?:button|input|object|select|textarea)$/i,Pa=/^a(?:rea)?$/i,Da=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};
+c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(G){var A=c(this);A.addClass(a.call(this,G,A.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(Ia),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1)if(f.className){for(var h=" "+f.className+" ",n=f.className,m=0,p=b.length;m<
+p;m++)if(h.indexOf(" "+b[m]+" ")<0)n+=" "+b[m];f.className=c.trim(n)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var G=c(this);G.removeClass(a.call(this,p,G.attr("class")))});if(a&&typeof a==="string"||a===H)for(var b=(a||"").split(Ia),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(Ha," "),n=0,m=b.length;n<m;n++)h=h.replace(" "+b[n]+" "," ");f.className=c.trim(h)}else f.className=
+""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,n=c(this),m=b,p=a.split(Ia);f=p[h++];){m=e?m:!n.hasClass(f);n[m?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,
+"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Ha," ").indexOf(a)>-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<e;h++){var n=f[h];if(n.selected&&
+(c.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!c.nodeName(n.parentNode,"optgroup"))){a=c(n).val();if(b)return a;d.push(a)}}return d}if(Da.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Oa,"")}return H}var m=c.isFunction(a);return this.each(function(p){var G=c(this),A=a;if(this.nodeType===1){if(m)A=a.call(this,p,G.val());if(A==null)A="";else if(typeof A==="number")A+="";else if(c.isArray(A))A=
+c.map(A,function(R){return R==null?"":R+""});if(c.isArray(A)&&Da.test(this.type))this.checked=c.inArray(G.val(),A)>=0;else if(c.nodeName(this,"select")){var N=c.makeArray(A);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),N)>=0});if(!N.length)this.selectedIndex=-1}else this.value=A}})}});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 H;if(e&&b in c.attrFn)return c(a)[b](d);
+e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==H;b=e&&c.props[b]||b;var h=Ea.test(b);if((b in a||a[b]!==H)&&e&&!h){if(f){b==="type"&&sa.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:Fa.test(a.nodeName)||Pa.test(a.nodeName)&&a.href?0:H;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 H;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?H:a}});var ya=/\.(.*)$/,Ga=/^(?:textarea|input|select)$/i,Ja=/\./g,y=/ /g,Aa=/[^\w\s.|`]/g,wa=function(a){return a.replace(Aa,"\\$&")},Ka={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==T&&!a.frameElement)a=
+T;if(d===false)d=M;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 n=a.nodeType?"events":"__events__",m=h[n],p=h.handle;if(typeof m==="function"){p=m.handle;m=m.events}else if(!m){a.nodeType||(h[n]=h=function(){});h.events=m={}}if(!p)h.handle=p=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(p.elem,arguments):H};p.elem=a;b=b.split(" ");for(var G=0,A;n=b[G++];){h=f?c.extend({},f):{handler:d,data:e};if(n.indexOf(".")>
+-1){A=n.split(".");n=A.shift();h.namespace=A.slice(0).sort().join(".")}else{A=[];h.namespace=""}h.type=n;if(!h.guid)h.guid=d.guid;var N=m[n],R=c.event.special[n]||{};if(!N){N=m[n]=[];if(!R.setup||R.setup.call(a,e,A,p)===false)if(a.addEventListener)a.addEventListener(n,p,false);else a.attachEvent&&a.attachEvent("on"+n,p)}if(R.add){R.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}N.push(h);c.event.global[n]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===
+8)){if(d===false)d=M;var f,h,n=0,m,p,G,A,N,R,fa=a.nodeType?"events":"__events__",I=c.data(a),ea=I&&I[fa];if(I&&ea){if(typeof ea==="function"){I=ea;ea=ea.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in ea)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[n++];){A=f;m=f.indexOf(".")<0;p=[];if(!m){p=f.split(".");f=p.shift();G=new RegExp("(^|\\.)"+c.map(p.slice(0).sort(),wa).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(N=ea[f])if(d){A=c.event.special[f]||
+{};for(h=e||0;h<N.length;h++){R=N[h];if(d.guid===R.guid){if(m||G.test(R.namespace)){e==null&&N.splice(h--,1);A.remove&&A.remove.call(a,R)}if(e!=null)break}}if(N.length===0||e!=null&&N.length===1){if(!A.teardown||A.teardown.call(a,p)===false)c.removeEvent(a,f,I.handle);delete ea[f]}}else for(h=0;h<N.length;h++){R=N[h];if(m||G.test(R.namespace)){c.event.remove(a,A,R.handler,h);N.splice(h--,1)}}}if(c.isEmptyObject(ea)){if(b=I.handle)b.elem=null;delete I.events;delete I.handle;if(typeof I==="function")c.removeData(a,
+fa);else c.isEmptyObject(I)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=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 H;a.result=H;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 n;e=a.target;var m=f.replace(ya,""),p=c.nodeName(e,"a")&&m==="click",G=c.event.special[m]||{};if((!G._default||G._default.call(d,a)===false)&&!p&&!(e&&e.nodeName&&
+c.noData[e.nodeName.toLowerCase()])){try{if(e[m]){if(n=e["on"+m])e["on"+m]=null;c.event.triggered=true;e[m]()}}catch(A){}if(n)e["on"+m]=n;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||T.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 n=d.length;f<n;f++){var m=d[f];if(b||e.test(m.namespace)){a.handler=m.handler;a.data=m.data;a.handleObj=m;m=m.handler.apply(this,h);if(m!==H){a.result=m;if(m===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||z;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=z.documentElement;d=z.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==H)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,J(a.origType,a.selector),c.extend({},a,{handler:S,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
+J(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=z.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
+c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=B;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=B;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=B;this.stopPropagation()},isDefaultPrevented:M,isPropagationStopped:M,isImmediatePropagationStopped:M};
+var Ba=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},j=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?j:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?j:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=H;return D("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=H;return D("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var k,
+s=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},q=function(a,b){var d=a.target,e,f;if(!(!Ga.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=s(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===H||f===e))if(e!=null||f){a.type="change";a.liveFired=
+H;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:q,beforedeactivate:q,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return q.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 q.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",s(a))}},setup:function(){if(this.type===
+"file")return false;for(var a in k)c.event.add(this,a+".specialChange",k[a]);return Ga.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return Ga.test(this.nodeName)}};k=c.event.special.change.filters;k.focus=k.beforeactivate}z.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(){Ka[b]++===0&&z.addEventListener(a,d,true)},teardown:function(){--Ka[b]===
+0&&z.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=H}var n=b==="one"?c.proxy(f,function(p){c(this).unbind(p,n);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var m=this.length;h<m;h++)c.event.add(this[h],d,n,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
+a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<
+b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var u={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var n,m=0,p,G,A=h||this.selector;h=h?this:c(this.context);if(typeof d==="object"&&
+!d.preventDefault){for(n in d)h[b](n,e,d[n],A);return this}if(c.isFunction(e)){f=e;e=H}for(d=(d||"").split(" ");(n=d[m++])!=null;){p=ya.exec(n);G="";if(p){G=p[0];n=n.replace(ya,"")}if(n==="hover")d.push("mouseenter"+G,"mouseleave"+G);else{p=n;if(n==="focus"||n==="blur"){d.push(u[n]+G);n+=G}else n=(u[n]||n)+G;if(b==="live"){G=0;for(var N=h.length;G<N;G++)c.event.add(h[G],"live."+J(n,A),{data:e,selector:A,handler:f,origType:n,origHandler:f,preType:p})}else h.unbind("live."+J(n,A),f)}}return this}});
+c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});T.attachEvent&&!T.addEventListener&&c(T).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,o,r,t,w){t=0;for(var L=r.length;t<L;t++){var O=r[t];if(O){var Z=false;for(O=O[g];O;){if(O.sizcache===o){Z=r[O.sizset];break}if(O.nodeType===1&&!w){O.sizcache=o;O.sizset=t}if(O.nodeName.toLowerCase()===i){Z=O;break}O=O[g]}r[t]=Z}}}function b(g,i,o,r,t,w){t=0;for(var L=r.length;t<L;t++){var O=r[t];if(O){var Z=false;for(O=O[g];O;){if(O.sizcache===o){Z=r[O.sizset];break}if(O.nodeType===1){if(!w){O.sizcache=o;O.sizset=t}if(typeof i!=="string"){if(O===i){Z=true;break}}else if(m.filter(i,
+[O]).length>0){Z=O;break}}O=O[g]}r[t]=Z}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,n=true;[0,0].sort(function(){n=false;return 0});var m=function(g,i,o,r){o=o||[];var t=i=i||z;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var w,L,O,Z,ka,pa=true,qa=m.isXML(i),X=[],za=g;do{d.exec("");if(w=d.exec(za)){za=w[3];X.push(w[1]);if(w[2]){Z=
+w[3];break}}}while(w);if(X.length>1&&G.exec(g))if(X.length===2&&p.relative[X[0]])L=oa(X[0]+X[1],i);else for(L=p.relative[X[0]]?[i]:m(X.shift(),i);X.length;){g=X.shift();if(p.relative[g])g+=X.shift();L=oa(g,L)}else{if(!r&&X.length>1&&i.nodeType===9&&!qa&&p.match.ID.test(X[0])&&!p.match.ID.test(X[X.length-1])){w=m.find(X.shift(),i,qa);i=w.expr?m.filter(w.expr,w.set)[0]:w.set[0]}if(i){w=r?{expr:X.pop(),set:R(r)}:m.find(X.pop(),X.length===1&&(X[0]==="~"||X[0]==="+")&&i.parentNode?i.parentNode:i,qa);L=
+w.expr?m.filter(w.expr,w.set):w.set;if(X.length>0)O=R(L);else pa=false;for(;X.length;){w=ka=X.pop();if(p.relative[ka])w=X.pop();else ka="";if(w==null)w=i;p.relative[ka](O,w,qa)}}else O=[]}O||(O=L);O||m.error(ka||g);if(f.call(O)==="[object Array]")if(pa)if(i&&i.nodeType===1)for(g=0;O[g]!=null;g++){if(O[g]&&(O[g]===true||O[g].nodeType===1&&m.contains(i,O[g])))o.push(L[g])}else for(g=0;O[g]!=null;g++)O[g]&&O[g].nodeType===1&&o.push(L[g]);else o.push.apply(o,O);else R(O,o);if(Z){m(Z,t,o,r);m.uniqueSort(o)}return o};
+m.uniqueSort=function(g){if(I){h=n;g.sort(I);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};m.matches=function(g,i){return m(g,null,null,i)};m.matchesSelector=function(g,i){return m(i,null,null,[g]).length>0};m.find=function(g,i,o){var r;if(!g)return[];for(var t=0,w=p.order.length;t<w;t++){var L,O=p.order[t];if(L=p.leftMatch[O].exec(g)){var Z=L[1];L.splice(1,1);if(Z.substr(Z.length-1)!=="\\"){L[1]=(L[1]||"").replace(/\\/g,"");r=p.find[O](L,i,o);if(r!=null){g=g.replace(p.match[O],
+"");break}}}}r||(r=i.getElementsByTagName("*"));return{set:r,expr:g}};m.filter=function(g,i,o,r){for(var t,w,L=g,O=[],Z=i,ka=i&&i[0]&&m.isXML(i[0]);g&&i.length;){for(var pa in p.filter)if((t=p.leftMatch[pa].exec(g))!=null&&t[2]){var qa,X,za=p.filter[pa];X=t[1];w=false;t.splice(1,1);if(X.substr(X.length-1)!=="\\"){if(Z===O)O=[];if(p.preFilter[pa])if(t=p.preFilter[pa](t,Z,o,O,r,ka)){if(t===true)continue}else w=qa=true;if(t)for(var l=0;(X=Z[l])!=null;l++)if(X){qa=za(X,t,l,Z);var v=r^!!qa;if(o&&qa!=null)if(v)w=
+true;else Z[l]=false;else if(v){O.push(X);w=true}}if(qa!==H){o||(Z=O);g=g.replace(p.match[pa],"");if(!w)return[];break}}}if(g===L)if(w==null)m.error(g);else break;L=g}return Z};m.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var p=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var o=typeof i==="string",r=o&&!/\W/.test(i);o=o&&!r;if(r)i=i.toLowerCase();r=0;for(var t=g.length,
+w;r<t;r++)if(w=g[r]){for(;(w=w.previousSibling)&&w.nodeType!==1;);g[r]=o||w&&w.nodeName.toLowerCase()===i?w||false:w===i}o&&m.filter(i,g,true)},">":function(g,i){var o,r=typeof i==="string",t=0,w=g.length;if(r&&!/\W/.test(i))for(i=i.toLowerCase();t<w;t++){if(o=g[t]){o=o.parentNode;g[t]=o.nodeName.toLowerCase()===i?o:false}}else{for(;t<w;t++)if(o=g[t])g[t]=r?o.parentNode:o.parentNode===i;r&&m.filter(i,g,true)}},"":function(g,i,o){var r,t=e++,w=b;if(typeof i==="string"&&!/\W/.test(i)){r=i=i.toLowerCase();
+w=a}w("parentNode",i,t,g,r,o)},"~":function(g,i,o){var r,t=e++,w=b;if(typeof i==="string"&&!/\W/.test(i)){r=i=i.toLowerCase();w=a}w("previousSibling",i,t,g,r,o)}},find:{ID:function(g,i,o){if(typeof i.getElementById!=="undefined"&&!o)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){var o=[];i=i.getElementsByName(g[1]);for(var r=0,t=i.length;r<t;r++)i[r].getAttribute("name")===g[1]&&o.push(i[r]);return o.length===0?null:o}},TAG:function(g,
+i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,o,r,t,w){g=" "+g[1].replace(/\\/g,"")+" ";if(w)return g;w=0;for(var L;(L=i[w])!=null;w++)if(L)if(t^(L.className&&(" "+L.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))o||r.push(L);else if(o)i[w]=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,o,r,t,w){i=g[1].replace(/\\/g,"");if(!w&&p.attrMap[i])g[1]=p.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,o,r,t){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=m(g[3],null,null,i);else{g=m.filter(g[3],i,o,true^t);o||r.push.apply(r,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,o){return!!m(o[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,o,r){return i===r.length-1},even:function(g,i){return i%2===
+0},odd:function(g,i){return i%2===1},lt:function(g,i,o){return i<o[3]-0},gt:function(g,i,o){return i>o[3]-0},nth:function(g,i,o){return o[3]-0===i},eq:function(g,i,o){return o[3]-0===i}},filter:{PSEUDO:function(g,i,o,r){var t=i[1],w=p.filters[t];if(w)return w(g,o,i,r);else if(t==="contains")return(g.textContent||g.innerText||m.getText([g])||"").indexOf(i[3])>=0;else if(t==="not"){i=i[3];o=0;for(r=i.length;o<r;o++)if(i[o]===g)return false;return true}else m.error("Syntax error, unrecognized expression: "+
+t)},CHILD:function(g,i){var o=i[1],r=g;switch(o){case "only":case "first":for(;r=r.previousSibling;)if(r.nodeType===1)return false;if(o==="first")return true;r=g;case "last":for(;r=r.nextSibling;)if(r.nodeType===1)return false;return true;case "nth":o=i[2];var t=i[3];if(o===1&&t===0)return true;i=i[0];var w=g.parentNode;if(w&&(w.sizcache!==i||!g.nodeIndex)){var L=0;for(r=w.firstChild;r;r=r.nextSibling)if(r.nodeType===1)r.nodeIndex=++L;w.sizcache=i}g=g.nodeIndex-t;return o===0?g===0:g%o===0&&g/o>=
+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 o=i[1];g=p.attrHandle[o]?p.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);o=g+"";var r=i[2];i=i[4];return g==null?r==="!=":r==="="?o===i:r==="*="?o.indexOf(i)>=0:r==="~="?(" "+o+" ").indexOf(i)>=0:!i?o&&g!==false:r==="!="?o!==i:r==="^="?
+o.indexOf(i)===0:r==="$="?o.substr(o.length-i.length)===i:r==="|="?o===i||o.substr(0,i.length+1)===i+"-":false},POS:function(g,i,o,r){var t=p.setFilters[i[2]];if(t)return t(g,o,i,r)}}},G=p.match.POS,A=function(g,i){return"\\"+(i-0+1)};for(var N in p.match){p.match[N]=new RegExp(p.match[N].source+/(?![^\[]*\])(?![^\(]*\))/.source);p.leftMatch[N]=new RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[N].source.replace(/\\(\d+)/g,A))}var R=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(z.documentElement.childNodes,0)}catch(fa){R=function(g,i){var o=0;i=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(i,g);else if(typeof g.length==="number")for(var r=g.length;o<r;o++)i.push(g[o]);else for(;g[o];o++)i.push(g[o]);return i}}var I,ea;if(z.documentElement.compareDocumentPosition)I=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&
+4?-1:1};else{I=function(g,i){var o,r,t=[],w=[];o=g.parentNode;r=i.parentNode;var L=o;if(g===i){h=true;return 0}else if(o===r)return ea(g,i);else if(o){if(!r)return 1}else return-1;for(;L;){t.unshift(L);L=L.parentNode}for(L=r;L;){w.unshift(L);L=L.parentNode}o=t.length;r=w.length;for(L=0;L<o&&L<r;L++)if(t[L]!==w[L])return ea(t[L],w[L]);return L===o?ea(g,w[L],-1):ea(t[L],i,1)};ea=function(g,i,o){if(g===i)return o;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}m.getText=function(g){for(var i=
+"",o,r=0;g[r];r++){o=g[r];if(o.nodeType===3||o.nodeType===4)i+=o.nodeValue;else if(o.nodeType!==8)i+=m.getText(o.childNodes)}return i};(function(){var g=z.createElement("div"),i="script"+(new Date).getTime(),o=z.documentElement;g.innerHTML="<a name='"+i+"'/>";o.insertBefore(g,o.firstChild);if(z.getElementById(i)){p.find.ID=function(r,t,w){if(typeof t.getElementById!=="undefined"&&!w)return(t=t.getElementById(r[1]))?t.id===r[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===
+r[1]?[t]:H:[]};p.filter.ID=function(r,t){var w=typeof r.getAttributeNode!=="undefined"&&r.getAttributeNode("id");return r.nodeType===1&&w&&w.nodeValue===t}}o.removeChild(g);o=g=null})();(function(){var g=z.createElement("div");g.appendChild(z.createComment(""));if(g.getElementsByTagName("*").length>0)p.find.TAG=function(i,o){o=o.getElementsByTagName(i[1]);if(i[1]==="*"){i=[];for(var r=0;o[r];r++)o[r].nodeType===1&&i.push(o[r]);o=i}return o};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!==
+"undefined"&&g.firstChild.getAttribute("href")!=="#")p.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();z.querySelectorAll&&function(){var g=m,i=z.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){m=function(r,t,w,L){t=t||z;r=r.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!L&&!m.isXML(t))if(t.nodeType===9)try{return R(t.querySelectorAll(r),w)}catch(O){}else if(t.nodeType===1&&t.nodeName.toLowerCase()!==
+"object"){var Z=t.getAttribute("id"),ka=Z||"__sizzle__";Z||t.setAttribute("id",ka);try{return R(t.querySelectorAll("#"+ka+" "+r),w)}catch(pa){}finally{Z||t.removeAttribute("id")}}return g(r,t,w,L)};for(var o in g)m[o]=g[o];i=null}}();(function(){var g=z.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{i.call(z.documentElement,"[test!='']:sizzle")}catch(r){o=true}if(i)m.matchesSelector=function(t,w){w=w.replace(/\=\s*([^'"\]]*)\s*\]/g,
+"='$1']");if(!m.isXML(t))try{if(o||!p.match.PSEUDO.test(w)&&!/!=/.test(w))return i.call(t,w)}catch(L){}return m(w,null,null,[t]).length>0}})();(function(){var g=z.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";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,o,r){if(typeof o.getElementsByClassName!=="undefined"&&
+!r)return o.getElementsByClassName(i[1])};g=null}}})();m.contains=z.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:z.documentElement.compareDocumentPosition?function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};m.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var oa=function(g,i){var o,r=[],t="";for(i=i.nodeType?[i]:i;o=p.match.PSEUDO.exec(g);){t+=o[0];g=g.replace(p.match.PSEUDO,"")}g=
+p.relative[g]?g+"*":g;o=0;for(var w=i.length;o<w;o++)m(g,i[o],r);return m.filter(t,r)};c.find=m;c.expr=m.selectors;c.expr[":"]=c.expr.filters;c.unique=m.uniqueSort;c.text=m.getText;c.isXMLDoc=m.isXML;c.contains=m.contains})();var C=/Until$/,F=/^(?:parents|prevUntil|prevAll)/,K=/,/,aa=/^.[^:#\[\.,]*$/,ba=Array.prototype.slice,U=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var n=
+0;n<d;n++)if(b[n]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(ca(this,a,false),"not",a)},filter:function(a){return this.pushStack(ca(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var n,m={},p=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){n=a[e];
+m[n]||(m[n]=c.expr.match.POS.test(n)?c(n,b||this.context):n)}for(;h&&h.ownerDocument&&h!==b;){for(n in m){a=m[n];if(a.jquery?a.index(h)>-1:c(h).is(a))d.push({selector:n,elem:h,level:p})}h=h.parentNode;p++}}return d}n=U.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(n?n.index(h)>-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(P(a[0])||P(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);C.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||K.test(e))&&F.test(a))f=f.reverse();return this.pushStack(f,a,ba.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===H||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 ha=/ jQuery\d+="(?:\d+|null)"/g,ua=/^\s+/,Ua=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Va=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&#?\w+;/,Wa=/<(?:script|object|embed|option|style)/i,
+Xa=/checked\s*(?:[^=]|=\s*.checked.)/i,hb=/\=([^="'>\s]+\/)>/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};ra.optgroup=ra.option;ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead;ra.th=ra.td;if(!c.support.htmlSerialize)ra._default=
+[1,"div<div>","</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!==H)return this.empty().append((this[0]&&this[0].ownerDocument||z).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(ha,"").replace(hb,'="$1">').replace(ua,"")],e)[0]}else return this.cloneNode(true)});if(a===true){V(this,b);V(this.find("*"),b.find("*"))}return b},html:function(a){if(a===H)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ha,""):null;
+else if(typeof a==="string"&&!Wa.test(a)&&(c.support.leadingWhitespace||!ua.test(a))&&!ra[(Va.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ua,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
+c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,n=a[0],m=[];if(!c.support.checkClone&&arguments.length===3&&typeof n==="string"&&Xa.test(n))return this.each(function(){c(this).domManip(a,
+b,d,true)});if(c.isFunction(n))return this.each(function(A){var N=c(this);a[0]=n.call(this,A,b?N.html():H);N.domManip(a,b,d)});if(this[0]){e=n&&n.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,m);h=e.fragment;if(f=h.childNodes.length===1?(h=h.firstChild):h.firstChild){b=b&&c.nodeName(f,"tr");for(var p=0,G=this.length;p<G;p++)d.call(b?da(this[p],f):this[p],p>0||e.cacheable||this.length>1?h.cloneNode(true):h)}m.length&&c.each(m,
+x)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:z;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===z&&!Wa.test(a[0])&&(c.support.checkClone||!Xa.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;f<h;f++){var n=(f>0?this.clone(true):this).get();c(d[f])[b](n);e=e.concat(n)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||z;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||z;for(var f=[],h=0,n;(n=a[h])!=null;h++){if(typeof n===
+"number")n+="";if(n){if(typeof n==="string"&&!gb.test(n))n=b.createTextNode(n);else if(typeof n==="string"){n=n.replace(Ua,"<$1></$2>");var m=(Va.exec(n)||["",""])[1].toLowerCase(),p=ra[m]||ra._default,G=p[0],A=b.createElement("div");for(A.innerHTML=p[1]+n+p[2];G--;)A=A.lastChild;if(!c.support.tbody){G=fb.test(n);m=m==="table"&&!G?A.firstChild&&A.firstChild.childNodes:p[1]==="<table>"&&!G?A.childNodes:[];for(p=m.length-1;p>=0;--p)c.nodeName(m[p],"tbody")&&!m[p].childNodes.length&&m[p].parentNode.removeChild(m[p])}!c.support.leadingWhitespace&&
+ua.test(n)&&A.insertBefore(b.createTextNode(ua.exec(n)[0]),A.firstChild);n=A.childNodes}if(n.nodeType)f.push(n);else f=c.merge(f,n)}}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,n=0,m;(m=a[n])!=null;n++)if(!(m.nodeName&&c.noData[m.nodeName.toLowerCase()]))if(d=m[c.expando]){if((b=e[d])&&b.events)for(var p in b.events)f[p]?c.event.remove(m,p):c.removeEvent(m,p,b.handle);if(h)delete m[c.expando];else m.removeAttribute&&m.removeAttribute(c.expando);delete e[d]}}});var Ya=/alpha\([^)]*\)/i,ib=/opacity=([^)]*)/,jb=/-([a-z])/ig,kb=/([A-Z])/g,Za=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},cb=["Left","Right"],
+db=["Top","Bottom"],La,$a,Ma,nb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===H)return this;return c.access(this,a,b,true,function(d,e,f){return f!==H?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){a=La(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),n=a.style,m=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==H){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!m||!("set"in m)||(d=m.set(a,d))!==H)try{n[b]=d}catch(p){}}}else{if(m&&"get"in m&&(f=m.get(a,false,e))!==H)return f;return n[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))!==H)return e;else if(La)return La(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(jb,nb)}});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=W(d,b,f);else c.swap(d,mb,function(){h=W(d,b,f)});if(h<=0){h=La(d,b,b);if(h==="0px"&&Ma)h=Ma(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(Za.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 ib.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=Ya.test(d)?d.replace(Ya,b):a.filter+" "+b}};if(z.defaultView&&z.defaultView.getComputedStyle)$a=
+function(a,b,d){var e;d=d.replace(kb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return H;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(z.documentElement.currentStyle)Ma=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Za.test(f)&&lb.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};La=$a||Ma;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 ob=c.now(),pb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,qb=/^(?:select|textarea)/i,rb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+sb=/^(?:GET|HEAD)$/,eb=/\[\]$/,Ca=/\=\?(&|$)/,Sa=/\?/,tb=/([?&])_=[^&]*/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g,wb=/#.*$/,ab=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&ab)return ab.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(n,m){if(m==="success"||m==="notmodified")h.html(f?c("<div>").append(n.responseText.replace(pb,"")).find(f):n.responseText);d&&h.each(d,[n.responseText,m,n])}});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||qb.test(this.nodeName)||rb.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 T.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(),n=sb.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")Ca.test(b.url)||(b.url+=(Sa.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||!Ca.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&
+(b.data&&Ca.test(b.data)||Ca.test(b.url))){d=b.jsonpCallback||"jsonp"+ob++;if(b.data)b.data=(b.data+"").replace(Ca,"="+d+"$1");b.url=b.url.replace(Ca,"="+d+"$1");b.dataType="script";var m=T[d];T[d]=function(r){if(c.isFunction(m))m(r);else{T[d]=H;try{delete T[d]}catch(t){}}f=r;c.handleSuccess(b,I,e,f);c.handleComplete(b,I,e,f);A&&A.removeChild(N)}}if(b.dataType==="script"&&b.cache===null)b.cache=false;if(b.cache===false&&n){var p=c.now(),G=b.url.replace(tb,"$1_="+p);b.url=G+(G===b.url?(Sa.test(b.url)?
+"&":"?")+"_="+p:"")}if(b.data&&n)b.url+=(Sa.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");p=(p=ub.exec(b.url))&&(p[1]&&p[1].toLowerCase()!==location.protocol||p[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&p){var A=z.getElementsByTagName("head")[0]||z.documentElement,N=z.createElement("script");if(b.scriptCharset)N.charset=b.scriptCharset;N.src=b.url;if(!d){var R=false;N.onload=N.onreadystatechange=function(){if(!R&&(!this.readyState||
+this.readyState==="loaded"||this.readyState==="complete")){R=true;c.handleSuccess(b,I,e,f);c.handleComplete(b,I,e,f);N.onload=N.onreadystatechange=null;A&&N.parentNode&&A.removeChild(N)}}}A.insertBefore(N,A.firstChild);return H}var fa=false,I=b.xhr();if(I){b.username?I.open(h,b.url,b.async,b.username,b.password):I.open(h,b.url,b.async);try{if(b.data!=null&&!n||a&&a.contentType)I.setRequestHeader("Content-Type",b.contentType);if(b.ifModified){c.lastModified[b.url]&&I.setRequestHeader("If-Modified-Since",
+c.lastModified[b.url]);c.etag[b.url]&&I.setRequestHeader("If-None-Match",c.etag[b.url])}p||I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(ea){}if(b.beforeSend&&b.beforeSend.call(b.context,I,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");I.abort();return false}b.global&&c.triggerGlobal(b,"ajaxSend",[I,b]);var oa=I.onreadystatechange=function(r){if(!I||
+I.readyState===0||r==="abort"){fa||c.handleComplete(b,I,e,f);fa=true;if(I)I.onreadystatechange=c.noop}else if(!fa&&I&&(I.readyState===4||r==="timeout")){fa=true;I.onreadystatechange=c.noop;e=r==="timeout"?"timeout":!c.httpSuccess(I)?"error":b.ifModified&&c.httpNotModified(I,b.url)?"notmodified":"success";var t;if(e==="success")try{f=c.httpData(I,b.dataType,b)}catch(w){e="parsererror";t=w}if(e==="success"||e==="notmodified")d||c.handleSuccess(b,I,e,f);else c.handleError(b,I,e,t);d||c.handleComplete(b,
+I,e,f);r==="timeout"&&I.abort();if(b.async)I=null}};try{var g=I.abort;I.abort=function(){I&&Function.prototype.call.call(g,I);oa("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){I&&!fa&&oa("timeout")},b.timeout);try{I.send(n||b.data==null?null:b.data)}catch(o){c.handleError(b,I,null,o);c.handleComplete(b,I,e,f)}b.async||oa();return I}},param:function(a,b){var d=[],e=function(h,n){n=c.isFunction(n)?n():n;d[d.length]=encodeURIComponent(h)+"="+encodeURIComponent(n)};if(b===H)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)Y(f,a[f],b,e);return d.join("&").replace(vb,"+")}});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(T.ActiveXObject)c.ajaxSettings.xhr=function(){if(T.location.protocol!==
+"file:")try{return new T.XMLHttpRequest}catch(a){}try{return new T.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var Qa={},xb=/^(?:toggle|show|hide)$/,yb=/^([+\-]=)?([\d+.\-]+)(.*)$/,Na,Ta=[["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(ja("show",3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=
+this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",ma(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(ja("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",d)}for(a=0;a<b;a++)this[a].style.display=
+"none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(ja("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,d,e);if(c.isEmptyObject(a))return this.each(f.complete);
+return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),n,m=this.nodeType===1,p=m&&c(this).is(":hidden"),G=this;for(n in a){var A=c.camelCase(n);if(n!==A){a[A]=a[n];delete a[n];n=A}if(a[n]==="hide"&&p||a[n]==="show"&&!p)return h.complete.call(this);if(m&&(n==="height"||n==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(ma(this.nodeName)===
+"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[n])){(h.specialEasing=h.specialEasing||{})[n]=a[n][1];a[n]=a[n][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(N,R){var fa=new c.fx(G,h,N);if(xb.test(R))fa[R==="toggle"?p?"show":"hide":R](a);else{var I=yb.exec(R),ea=fa.cur()||0;if(I){R=parseFloat(I[2]);var oa=I[3]||"px";if(oa!=="px"){c.style(G,N,(R||1)+
+oa);ea=(R||1)/fa.cur()*ea;c.style(G,N,ea+oa)}if(I[1])R=(I[1]==="-="?-1:1)*R+ea;fa.custom(ea,R,oa)}else fa.custom(ea,R,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:ja("show",1),slideUp:ja("hide",1),slideToggle:ja("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(n){return f.step(n)}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)&&!Na)Na=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(m,p){f.style["overflow"+p]=h.overflow[m]})}this.options.hide&&
+c(this.elem).hide();if(this.options.hide||this.options.show)for(var n in this.options.curAnim)c.style(this.elem,n,this.options.orig[n]);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.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(Na);Na=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=
+function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};var zb=/^t(?:able|d|h)$/i,bb=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in z.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(n){c.offset.setOffset(this,a,n)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=
+f.body;f=va(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(A){c.offset.setOffset(this,a,A)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b,h=b.ownerDocument,n=h.documentElement,
+m=h.body;d=(h=h.defaultView)?h.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,G=b.offsetLeft;(b=b.parentNode)&&b!==m&&b!==n;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=h?h.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;G-=b.scrollLeft;if(b===e){p+=b.offsetTop;G+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&zb.test(b.nodeName))){p+=parseFloat(d.borderTopWidth)||0;G+=parseFloat(d.borderLeftWidth)||0}f=e;e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&
+d.overflow!=="visible"){p+=parseFloat(d.borderTopWidth)||0;G+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){p+=m.offsetTop;G+=m.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){p+=Math.max(n.scrollTop,m.scrollTop);G+=Math.max(n.scrollLeft,m.scrollLeft)}return{top:p,left:G}};c.offset={initialize:function(){var a=z.body,b=z.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,
+margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";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(),n=c.css(a,"top"),m=c.css(a,"left"),p=e==="absolute"&&c.inArray("auto",[n,m])>-1;e={};var G={};if(p)G=f.position();n=p?G.top:parseInt(n,10)||0;m=p?G.left:parseInt(m,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+n;if(b.left!=null)e.left=b.left-h.left+m;"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=bb.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||
+z.body;a&&!bb.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!==H)return this.each(function(){if(h=va(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=va(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(n){var m=c(this);m[d](e.call(this,n,m[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===H){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/docs/Data/sushi.HTML5.js b/docs/Data/sushi.HTML5.js new file mode 100644 index 0000000..3f22f4a --- /dev/null +++ b/docs/Data/sushi.HTML5.js @@ -0,0 +1,38 @@ +define( + ['sushi.core', 'sushi.utils'], + + /** + * JSON handling functions + * + * @namespace Sushi.utils + * @class HTML5 + * @extends Sushi.utils + */ + function() { + Sushi.namespace('utils.HTML5'); + /** + * Enable HTML5 Elements inside IE (8 and before) + * script by Remy Sharp http://remysharp.com/2009/01/07/html5-enabling-script/ + * + * @method shiv + * @param {String} Optional. List of specific objects to create (e.g.: Sushi.HTML5.shiv("canvas, time, aside") ); + * @return {Object} HTML5 elements created with boolean value. + */ + var shiv = function(string) { + var e = (string) ? string : "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video", + html5els = {}; + + e.split(','); + for( var i=e.length;i >= 0; i -= 1){ + document.createElement(e[i]); + elsAvailable[e[i]] = true; + } + return html5els; + } + + return { + shiv: shiv + }; + + } +); \ No newline at end of file diff --git a/docs/Data/sushi.HTML5.js.highlighted b/docs/Data/sushi.HTML5.js.highlighted new file mode 100644 index 0000000..85eb5d0 --- /dev/null +++ b/docs/Data/sushi.HTML5.js.highlighted @@ -0,0 +1,39 @@ +
define(
+	['sushi.core', 'sushi.utils'],
+	
+	/**
+	 * JSON handling functions
+	 *
+	 *	@namespace Sushi.utils
+	 *	@class HTML5
+	 *  @extends Sushi.utils
+	 */
+	function() {
+		 Sushi.namespace('utils.HTML5');	
+		/**
+		 *	Enable HTML5 Elements inside IE (8 and before)
+		 *	script by Remy Sharp http://remysharp.com/2009/01/07/html5-enabling-script/
+		 *
+		 *	@method shiv
+		 *	@param {String} Optional. List of specific objects to create (e.g.: Sushi.HTML5.shiv("canvas, time, aside") );
+		 *	@return {Object} HTML5 elements created with boolean value.
+		 */
+		var shiv = function(string) {
+			var e = (string) ? string : "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video",
+				html5els = {};
+			
+			e.split(',');
+			for( var i=e.length;i >= 0; i -= 1){
+				document.createElement(e[i]);
+				elsAvailable[e[i]] = true;
+			}
+			return html5els;
+		}
+		
+		return {
+			shiv: shiv
+		};
+		
+	}
+);
+
diff --git a/src/sushi.Model.js b/docs/Data/sushi.Model.js similarity index 100% rename from src/sushi.Model.js rename to docs/Data/sushi.Model.js diff --git a/docs/Data/sushi.Model.js.highlighted b/docs/Data/sushi.Model.js.highlighted new file mode 100644 index 0000000..04fa588 --- /dev/null +++ b/docs/Data/sushi.Model.js.highlighted @@ -0,0 +1,241 @@ +
define(
+	['sushi.core', 'sushi.utils', 'sushi.utils.collection'],
+	
+	function() {
+		var Model = function(attributes, options) {
+			attributes || (attributes = {});
+			
+			if (this.defaults) {
+				attributes = Sushi.extend(this.defaults, attributes);
+			}
+			
+			this.attributes = {};
+			this.set(attributes, {silent : true});
+			this._previousAttributes = Sushi.extend(this.attributes);
+			this.mid = Sushi.utils.uniqueId('m');
+		    this.topic = 'model_' + this.mid + '/';
+			this.initialize(attributes, options);
+		};
+		
+		Sushi.extend(Model.prototype, (function() {
+			var _previousAttributes = null,
+			
+			_changed = false,
+			
+			_trigger = function(evt, args) {
+			    if (!evt) {
+			        return false;
+			    }
+			    
+			    Sushi.event.publish(this.topic + ':' + evt, args);
+			    
+			    return this;
+			},
+			
+			_performValidation = function(attrs, options) {
+			    var error = this.validate(attrs);
+			    
+			    if (error) {
+			        if (options.error) {
+			            options.error.call(this, error);
+			        } else {
+			            this._trigger('error', error);
+			        }
+			        
+			        return false;
+			    }
+			    
+			    return true;
+			},
+			
+			initialize = function() {},
+			
+			copyAttributes = function() {
+				return Sushi.extend({}, this.attributes);
+			},
+			
+			get = function(attr) {
+				return this.attributes[attr];
+			},
+			
+			set = function(attrs, options) {
+				
+				options || (options = {});
+				
+				if (!attrs) {
+					return this;
+				}
+				
+				if (attrs.attributes) {
+					attrs = attrs.attributes;
+				}
+				
+				var now = this.attributes;
+				
+				//Run validation...
+				if (!options.silent && this.validate && !this._performValidation(attrs, options)) {
+				    return false;
+				}
+				
+				// Check for changes of id
+				if ('id' in attrs) {
+					this.id = attrs.id;
+				}
+				
+				// Update the attributes
+				Sushi.utils.each(attrs, function(attr) {
+					var val = attrs[attr];
+
+					if (!Sushi.utils.isEqual(now[attr], val)) {
+						now[attr] = val;
+						
+						if (!options.silent) {
+							this._changed = true;
+						    this._trigger('change:' + attr, val);
+						}
+					}
+				});
+				
+				// Fire a change event in case model was changed
+				if (!options.silent && this._changed) {
+    				this.change();
+				}
+				
+				return this;
+			},
+			
+			unset = function(attr, options) {
+			    options || (options = {});
+			    var value = this.attributes[attr],
+			        validObj = {};
+			        
+			    validObj[attr] = undefined;
+			    if (!options.silent && this.validate && !this._performValidation(validObj, options)) {
+			        return false;
+			    }			    
+			    
+			    // Remove the attribute
+			    delete this.attributes[attr];
+			    
+			    // Fire changed if options.silent was not set
+			    if (!options.silent) {
+			        this._changed = true;
+			        
+			        this._trigger('change:' + attr, undefined);
+			        this.change();
+			    }
+			    
+			    return this;
+			},
+			
+			clear = function(options) {
+			    options || (options = {});
+			    
+			    var old = this.attributes,
+			        validObj = {};
+			    
+			    Sushi.utils.each(old, function(attr){
+			        validObj[attr] = undefined;
+			    });
+			    		    
+			    if (!options.silent && this.validate && !this._performValidation(validObj, options)) {
+			        return false;
+			    }
+			    
+			    this.attributes = {};
+			    
+			    // Fire change event if options.silent was not set 
+			    if (!options.silent) {
+			        this._changed = true;
+			        Sushi.utils.each(old, function(attr){
+			            this._trigger('change:' + attr, undefined);
+			        });
+			        
+			        this.change();
+			    }
+			    
+			    return this;
+			},
+			
+			fetch = function() {
+			    return true;
+			},
+			
+			save = function() {
+			    return true;
+			},
+			
+			destroy = function() {
+			    return true;
+			},
+			
+			parse = function(resp) {
+			    return resp;
+			},
+			
+			change = function() {
+			    this._previousAttributes = Sushi.extend(this.attributes);
+			    this._changed = false;
+			},
+			
+			hasChanged = function(attr) {
+			    if (attr) {
+			        if (this._previousAttributes[attr] != this.attributes[attr]) {
+			            return false;
+			        }
+			        
+			        return this._changed;
+			    }
+			},
+			
+			changedAttributes = function() {
+			    var now = this.attributes,
+			    old = this._previousAttributes,
+			    changed = false;
+			    
+			    Sushi.utils.each(now, function(attr){
+                    if (!Sushi.utils.isEqual(old[attr], now[attr])) {
+                        changed = changed || {};
+                        changed[attr] = now[attr];
+                    }
+			    });
+			    
+			    return changed;
+			},
+			
+			previous = function(attr) {
+			    if (!attr || !this._previousAttributes) {
+			        return null;
+			    }
+			    
+			    return this._previousAttributes[attr];
+			},
+			
+			previousAttributes = function() {
+			    return Sushi.extend(this._previousAttributes);
+			};
+			
+			return {
+			    initialize: initialize,
+			    copyAttributes: copyAttributes,
+			    get: get,
+			    set: set,
+			    unset: unset,
+			    clear: clear,
+			    fetch: fetch,
+			    save: save,
+			    destroy: destroy,
+			    parse: parse,
+			    change: change,
+			    hasChanged: hasChanged,
+			    changedAttributes: changedAttributes,
+			    previous: previous,
+			    previousAttributes: previousAttributes
+			};
+					
+		})());
+		
+		return Model;
+	}
+);
+
diff --git a/src/sushi.View.js b/docs/Data/sushi.View.js similarity index 100% rename from src/sushi.View.js rename to docs/Data/sushi.View.js diff --git a/docs/Data/sushi.View.js.highlighted b/docs/Data/sushi.View.js.highlighted new file mode 100644 index 0000000..7c786a2 --- /dev/null +++ b/docs/Data/sushi.View.js.highlighted @@ -0,0 +1,11 @@ +
define(
+    ['sushi.core'],
+    
+    function() {
+        var View = function(model) {
+            this.model = model;
+            
+        }
+    }
+);
+
diff --git a/docs/Data/sushi.base.js b/docs/Data/sushi.base.js new file mode 100644 index 0000000..7ea3532 --- /dev/null +++ b/docs/Data/sushi.base.js @@ -0,0 +1,13 @@ +/** + * Sushi JS + * Copyright (C) 2011 Bruno Abrantes + * MIT Licensed + * + * @namespace Sushi + * @class base + */ +// Require library-wide dependencies, not in requirejs module format +require([], function() { + // require Sushi modules in requirejs format + require(['sushi.core', 'sushi.campus', 'sushi.utils', 'sushi.utils.collection', 'sushi.utils.debug', 'sushi.utils.json', 'sushi.utils.lang', 'sushi.event', 'sushi.utils.HTML5'], function(){}); +}); \ No newline at end of file diff --git a/docs/Data/sushi.base.js.highlighted b/docs/Data/sushi.base.js.highlighted new file mode 100644 index 0000000..b75511b --- /dev/null +++ b/docs/Data/sushi.base.js.highlighted @@ -0,0 +1,14 @@ +
/**
+ * Sushi JS
+ * Copyright (C) 2011 Bruno Abrantes
+ * MIT Licensed
+ *
+ * @namespace Sushi
+ * @class base
+ */
+// Require library-wide dependencies, not in requirejs module format
+require([], function() {
+	// require Sushi modules in requirejs format
+	require(['sushi.core', 'sushi.campus', 'sushi.utils', 'sushi.utils.collection', 'sushi.utils.debug', 'sushi.utils.json', 'sushi.utils.lang', 'sushi.event', 'sushi.utils.HTML5'], function(){});
+});
+
diff --git a/docs/Data/sushi.core.js b/docs/Data/sushi.core.js new file mode 100644 index 0000000..fb3d249 --- /dev/null +++ b/docs/Data/sushi.core.js @@ -0,0 +1,95 @@ +/** + * Sushi Core + * + * @module Sushi + */ +define( + [], + + /** + * Sushi Core + * + * @namespace Sushi + * @class core + */ + function() { + var root = this, + previousSushi = {}, + $S = {}, + Sushi = { + VERSION: '0.0.5', + + /** + * A utility that non-destructively defines namespaces + * + * @method namespace + * @param {String} namespaceString Name of namespace to create + * @return {Object} Namespaced object + */ + namespace: function(namespaceString) { + var parts = namespaceString.split('.'), + parent = Sushi, + i; + + // Strip redundant leading global + if (parts[0] === 'Sushi') { + parts = parts.slice(1); + } + + for (i = 0, len = parts.length; i < len; i+=1) { + // Create a property if it doesn't exist + if (typeof parent[parts[i]] === 'undefined') { + parent[parts[i]] = {}; + } + parent = parent[parts[i]]; + } + + return parent; + }, + + /** + * Simple extending (shallow copying) utility. + * + * @method extend + * @param {Object} destination Object to copy properties to + * @param {Object} source Object to copy properties from + * @return {Object} Extended object + */ + extend: function(destination, source) { + for ( var property in source ) { + destination[property] = source[property]; + } + + return destination; + }, + /** + * noConflict utility. If by some reason, the Sushi's namespace must be used by some other object, + * this function will allow to remap the Sushi's namespace to another namespace + * + * @method noConflict + * @param {String} Mandatory. New Namespace where Sushi is going to live + * @param {String} Optional. New Sugar syntax to shorthand the Sushi's namespace + * @return {Object} Sushi Object + */ + noConflict: function(name, sugar){ + root[name] = Sushi; + root.Sushi = previousSushi; + + if(sugar){ + root[sugar] = root[name]; + } + + return root[name]; + } + }; + + // If window.Sushi is defined, merge params + if (root.Sushi) { + previousSushi = root.Sushi; + } + + // Sync global Sushi variable to namespaced one + root.Sushi = Sushi; + root.$S = root.Sushi; + } +); \ No newline at end of file diff --git a/docs/Data/sushi.core.js.highlighted b/docs/Data/sushi.core.js.highlighted new file mode 100644 index 0000000..555d3ab --- /dev/null +++ b/docs/Data/sushi.core.js.highlighted @@ -0,0 +1,96 @@ +
/**
+ * Sushi Core
+ *
+ * @module Sushi
+ */
+define(
+    [],
+    
+	/**
+	 * Sushi Core
+	 *
+	 * @namespace Sushi
+	 * @class core
+	 */
+    function() {
+    	var root = this,
+			previousSushi = {},
+			$S = {},
+			Sushi = {
+    			VERSION: '0.0.5',
+    						
+	    		/**
+	    		 * A utility that non-destructively defines namespaces
+	    		 *
+	    		 * @method namespace
+	    		 * @param {String} namespaceString Name of namespace to create
+	    		 * @return {Object} Namespaced object
+	    		 */
+	    		namespace: function(namespaceString) {
+	    			var parts = namespaceString.split('.'),
+	    				parent = Sushi,
+	    				i;
+			
+	    			// Strip redundant leading global
+	    			if (parts[0] === 'Sushi') {
+	    				parts = parts.slice(1);
+	    			}
+			
+	    			for (i = 0, len = parts.length; i < len; i+=1) {
+	    				// Create a property if it doesn't exist
+	    				if (typeof parent[parts[i]] === 'undefined') {
+	    					parent[parts[i]] = {};
+	    				}
+	    				parent = parent[parts[i]];
+	    			}
+			
+	    			return parent;			
+	    		},
+		
+	    		/**
+	    		 * Simple extending (shallow copying) utility. 
+	    		 *
+	    		 * @method extend
+	    		 * @param {Object} destination Object to copy properties to
+	    		 * @param {Object} source Object to copy properties from
+	    		 * @return {Object} Extended object
+	    		 */
+	    		extend: function(destination, source) {			
+					for ( var property in source ) {
+						destination[property] = source[property];
+					}
+								
+					return destination;
+	    		},
+				/**
+	    		 * noConflict utility. If by some reason, the Sushi's namespace must be used by some other object,
+				 * this function will allow to remap the Sushi's namespace to another namespace
+	    		 *
+	    		 * @method noConflict
+	    		 * @param {String} Mandatory. New Namespace where Sushi is going to live 
+	    		 * @param {String} Optional. New Sugar syntax to shorthand the Sushi's namespace 
+	    		 * @return {Object} Sushi Object
+	    		 */
+				noConflict: function(name, sugar){
+					root[name] = Sushi;
+					root.Sushi = previousSushi;
+					
+					if(sugar){
+						root[sugar] = root[name];
+					}
+					
+					return root[name];
+				}
+	    	};
+	
+    	// If window.Sushi is defined, merge params
+    	if (root.Sushi) {
+			previousSushi = root.Sushi;
+    	}
+	
+    	// Sync global Sushi variable to namespaced one
+    	root.Sushi = Sushi;
+    	root.$S = root.Sushi;
+    }
+);
+
diff --git a/docs/Data/sushi.event.js b/docs/Data/sushi.event.js new file mode 100644 index 0000000..fadeddc --- /dev/null +++ b/docs/Data/sushi.event.js @@ -0,0 +1,89 @@ +/* + * Sushi.events - Event management functions + * + */ + define( + // Module dependencies + ['sushi.core', 'sushi.utils.collection'], + + /** + * Sushi Events + * + * @namespace Sushi + * @class events + * @requires sushi.utils.collection + */ + function(pubsub) { + Sushi.namespace('event'); + + Sushi.extend(Sushi.event, (function() { + // the topic/subscription hash + var _cache = {}, + + /** + * Publish data on a named topic + * + * Example: + * Sushi.events.publish("/some/topic", ["a","b","c"]); + * + * @method publish + * @param {String} topic The channel to publish on + * @param {Array} args The data to publish. Each array item is converted into an ordered + * arguments on the subscribed functions. + * + */ + publish = function(topic, args){ + _cache[topic] && Sushi.utils.each(_cache[topic], function(callback){ + callback.apply(Sushi.events, args || []); + }); + }, + + /** + * Register a callback on a named topic + * + * Example: + * Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data}); + * + * @method subscribe + * @param {String} topic The channel to subscribe to + * @param {Function} callback The handler event. Anytime something is Sushi.events.publish'ed on a + * subscribed channel, the callback will be called with the + * published array as ordered arguments. + * + * @return {Array} A handle which can be used to unsubscribe this particular subscription + */ + subscribe = function(topic, callback){ + if(!_cache[topic]){ + _cache[topic] = []; + } + _cache[topic].push(callback); + return [topic, callback]; + }, + + /** + * Disconnect a subscribed function for a topic + * Example: + * var handle = Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data}); + * Sushi.events.unsubscribe(handle); + * + * @method unsubscribe + * @param {Array} handle The return value from a Sushi.events.subscribe call + * + */ + unsubscribe = function(handle){ + var t = handle[0]; + _cache[t] && Sushi.utils.each(_cache[t], function(idx){ + if(this == handle[1]){ + _cache[t].splice(idx, 1); + } + }); + }; + + return { + publish: publish, + subscribe: subscribe, + unsubscribe: unsubscribe + }; + })()); + } + ); \ No newline at end of file diff --git a/docs/Data/sushi.event.js.highlighted b/docs/Data/sushi.event.js.highlighted new file mode 100644 index 0000000..d0e9b92 --- /dev/null +++ b/docs/Data/sushi.event.js.highlighted @@ -0,0 +1,90 @@ +
/*
+ * Sushi.events - Event management functions
+ *
+ */
+ define(
+ 	// Module dependencies
+ 	['sushi.core', 'sushi.utils.collection'],
+
+ 	/**
+ 	 * Sushi Events
+ 	 *
+ 	 * @namespace Sushi
+ 	 * @class events
+     * @requires sushi.utils.collection
+ 	 */
+ 	function(pubsub) {
+        Sushi.namespace('event');
+        
+ 		Sushi.extend(Sushi.event, (function() {
+    	    // the topic/subscription hash
+        	var _cache = {},
+
+            /**
+             * Publish data on a named topic
+             * 
+             * Example:
+             * Sushi.events.publish("/some/topic", ["a","b","c"]);
+             *
+             * @method publish
+             * @param {String} topic The channel to publish on
+             * @param {Array}  args  The data to publish. Each array item is converted into an ordered
+     		 *		                 arguments on the subscribed functions.
+     		 *
+             */
+        	publish = function(topic, args){
+        		_cache[topic] && Sushi.utils.each(_cache[topic], function(callback){
+        			callback.apply(Sushi.events, args || []);
+        		});
+        	},
+
+            /**
+             * Register a callback on a named topic
+             *
+             * Example:
+             * Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data});
+             *
+             * @method subscribe
+             * @param {String}   topic     The channel to subscribe to
+             * @param {Function} callback  The handler event. Anytime something is Sushi.events.publish'ed on a 
+     		 *		                       subscribed channel, the callback will be called with the
+     		 *		                       published array as ordered arguments.
+     		 * 
+     		 * @return {Array} A handle which can be used to unsubscribe this particular subscription
+             */
+        	subscribe = function(topic, callback){
+         		if(!_cache[topic]){
+        			_cache[topic] = [];
+        		}
+        		_cache[topic].push(callback);
+        		return [topic, callback];
+        	},
+
+            /**
+             * Disconnect a subscribed function for a topic
+             * Example:
+             * var handle = Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data});
+             * Sushi.events.unsubscribe(handle);
+             *
+             * @method unsubscribe
+             * @param {Array} handle The return value from a Sushi.events.subscribe call
+             *
+             */
+        	unsubscribe = function(handle){
+        		var t = handle[0];
+        		_cache[t] && Sushi.utils.each(_cache[t], function(idx){
+        			if(this == handle[1]){
+        				_cache[t].splice(idx, 1);
+        			}
+        		});
+        	};
+
+        	return {
+        	    publish: publish,
+        	    subscribe: subscribe,
+        	    unsubscribe: unsubscribe
+        	};
+        })());
+ 	}
+ );
+
diff --git a/docs/Data/sushi.events.js b/docs/Data/sushi.events.js new file mode 100644 index 0000000..6ed4b81 --- /dev/null +++ b/docs/Data/sushi.events.js @@ -0,0 +1,20 @@ +/* + * Sushi.Events - Event management functions + * + */ + define( + // Module dependencies + ['sushi.events.pubsub'], + + /** + * Sushi Events + * + * @namespace Sushi + * @class Events + */ + function(pubsub) { + Sushi.namespace('events'); + + Sushi.extend(Sushi.events, pubsub); + } + ); \ No newline at end of file diff --git a/docs/Data/sushi.events.js.highlighted b/docs/Data/sushi.events.js.highlighted new file mode 100644 index 0000000..cc8db48 --- /dev/null +++ b/docs/Data/sushi.events.js.highlighted @@ -0,0 +1,21 @@ +
/*
+ * Sushi.Events - Event management functions
+ *
+ */
+ define(
+ 	// Module dependencies
+ 	['sushi.events.pubsub'],
+
+ 	/**
+ 	 * Sushi Events
+ 	 *
+ 	 * @namespace Sushi
+ 	 * @class Events
+ 	 */
+ 	function(pubsub) {
+        Sushi.namespace('events');
+        
+ 		Sushi.extend(Sushi.events, pubsub);
+ 	}
+ );
+
diff --git a/docs/Data/sushi.events.pubsub.js b/docs/Data/sushi.events.pubsub.js new file mode 100644 index 0000000..dcbf0b6 --- /dev/null +++ b/docs/Data/sushi.events.pubsub.js @@ -0,0 +1,83 @@ +/* + + pub/sub plugin by Peter Higgins (dante@dojotoolkit.org) + + Loosely based on Dojo publish/subscribe API, limited in scope. Rewritten blindly. + + Original is (c) Dojo Foundation 2004-2010. Released under either AFL or new BSD, see: + http://dojofoundation.org/license for more information. + +*/ +define( + ['sushi.utils.collection'], + + function() { + // the topic/subscription hash + var _cache = {}, + + /** + * Publish data on a named topic + * + * Example: + * Sushi.events.publish("/some/topic", ["a","b","c"]); + * + * @method publish + * @param {String} topic The channel to publish on + * @param {Array} args The data to publish. Each array item is converted into an ordered + * arguments on the subscribed functions. + * + */ + publish = function(topic, args){ + _cache[topic] && Sushi.utils.enumerable.each(_cache[topic], function(callback){ + callback.apply(Sushi.events, args || []); + }); + }, + + /** + * Register a callback on a named topic + * + * Example: + * Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data}); + * + * @method subscribe + * @param {String} topic The channel to subscribe to + * @param {Function} callback The handler event. Anytime something is Sushi.events.publish'ed on a + * subscribed channel, the callback will be called with the + * published array as ordered arguments. + * + * @return {Array} A handle which can be used to unsubscribe this particular subscription + */ + subscribe = function(topic, callback){ + if(!_cache[topic]){ + _cache[topic] = []; + } + _cache[topic].push(callback); + return [topic, callback]; + }, + + /** + * Disconnect a subscribed function for a topic + * Example: + * var handle = Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data}); + * Sushi.events.unsubscribe(handle); + * + * @method unsubscribe + * @param {Array} handle The return value from a Sushi.events.subscribe call + * + */ + unsubscribe = function(handle){ + var t = handle[0]; + _cache[t] && Sushi.enumerable.each(_cache[t], function(idx){ + if(this == handle[1]){ + _cache[t].splice(idx, 1); + } + }); + }; + + return { + publish: publish, + subscribe: subscribe, + unsubscribe: unsubscribe + }; + } +); \ No newline at end of file diff --git a/docs/Data/sushi.events.pubsub.js.highlighted b/docs/Data/sushi.events.pubsub.js.highlighted new file mode 100644 index 0000000..7f8fc75 --- /dev/null +++ b/docs/Data/sushi.events.pubsub.js.highlighted @@ -0,0 +1,84 @@ +
/*	
+
+	pub/sub plugin by Peter Higgins (dante@dojotoolkit.org)
+
+	Loosely based on Dojo publish/subscribe API, limited in scope. Rewritten blindly.
+
+	Original is (c) Dojo Foundation 2004-2010. Released under either AFL or new BSD, see:
+	http://dojofoundation.org/license for more information.
+
+*/
+define(
+    ['sushi.utils.collection'],
+    
+    function() {
+	    // the topic/subscription hash
+    	var _cache = {},
+        
+        /**
+         * Publish data on a named topic
+         * 
+         * Example:
+         * Sushi.events.publish("/some/topic", ["a","b","c"]);
+         *
+         * @method publish
+         * @param {String} topic The channel to publish on
+         * @param {Array}  args  The data to publish. Each array item is converted into an ordered
+ 		 *		                 arguments on the subscribed functions.
+ 		 *
+         */
+    	publish = function(topic, args){
+    		_cache[topic] && Sushi.utils.enumerable.each(_cache[topic], function(callback){
+    			callback.apply(Sushi.events, args || []);
+    		});
+    	},
+        
+        /**
+         * Register a callback on a named topic
+         *
+         * Example:
+         * Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data});
+         *
+         * @method subscribe
+         * @param {String}   topic     The channel to subscribe to
+         * @param {Function} callback  The handler event. Anytime something is Sushi.events.publish'ed on a 
+ 		 *		                       subscribed channel, the callback will be called with the
+ 		 *		                       published array as ordered arguments.
+ 		 * 
+ 		 * @return {Array} A handle which can be used to unsubscribe this particular subscription
+         */
+    	subscribe = function(topic, callback){
+     		if(!_cache[topic]){
+    			_cache[topic] = [];
+    		}
+    		_cache[topic].push(callback);
+    		return [topic, callback];
+    	},
+        
+        /**
+         * Disconnect a subscribed function for a topic
+         * Example:
+         * var handle = Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data});
+         * Sushi.events.unsubscribe(handle);
+         *
+         * @method unsubscribe
+         * @param {Array} handle The return value from a Sushi.events.subscribe call
+         *
+         */
+    	unsubscribe = function(handle){
+    		var t = handle[0];
+    		_cache[t] && Sushi.enumerable.each(_cache[t], function(idx){
+    			if(this == handle[1]){
+    				_cache[t].splice(idx, 1);
+    			}
+    		});
+    	};
+    	
+    	return {
+    	    publish: publish,
+    	    subscribe: subscribe,
+    	    unsubscribe: unsubscribe
+    	};
+    }
+);
+
diff --git a/docs/Data/sushi.history.js b/docs/Data/sushi.history.js new file mode 100644 index 0000000..fba3e60 --- /dev/null +++ b/docs/Data/sushi.history.js @@ -0,0 +1,59 @@ +define( + ['sushi.core'], + + function(){ + Sushi.namespace('history'); + + var _supports = (function(){ + if (typeof window.history.pushState === undefined) { + return false; + } + + return true; + })(), + _nativeHistory = window.history, + _pushState = _nativeHistory.pushState, + + push = function(url, stateObj, title) { + _nativeHistory.pushState(stateObj, title, url); + }, + + replace = function(url, stateObj, title) { + _nativeHistory.replaceState(stateObj, title, url); + }, + + go = function(step) { + _nativeHistory.go(step); + }, + + back = function() { + _nativeHistory.back(); + }, + + forward = function() { + _nativeHistory.forward(); + }; + + if (!_supports) { + return false; + } + + window.popstate = function() { + + } + + window.hashchange = function() { + + } + + Sushi.extend(Sushi.history, { + pushState: push, + replaceState: replace, + go: go, + back: back, + forward: forward + }); + + return Sushi.history; + } +); \ No newline at end of file diff --git a/docs/Data/sushi.history.js.highlighted b/docs/Data/sushi.history.js.highlighted new file mode 100644 index 0000000..93f8571 --- /dev/null +++ b/docs/Data/sushi.history.js.highlighted @@ -0,0 +1,60 @@ +
define(
+  ['sushi.core'],
+  
+  function(){
+      Sushi.namespace('history');
+            
+      var _supports = (function(){
+          if (typeof window.history.pushState === undefined) {
+              return false;
+          }
+          
+          return true;
+      })(),
+      _nativeHistory = window.history,
+      _pushState = _nativeHistory.pushState,
+      
+      push = function(url, stateObj, title) {
+          _nativeHistory.pushState(stateObj, title, url);
+      },
+    
+      replace = function(url, stateObj, title) {
+          _nativeHistory.replaceState(stateObj, title, url);
+      },
+    
+      go = function(step) {
+          _nativeHistory.go(step);
+      },
+    
+      back = function() {
+          _nativeHistory.back();
+      },
+    
+      forward = function() {
+          _nativeHistory.forward();
+      };
+      
+      if (!_supports) {
+          return false;
+      }
+      
+      window.popstate = function() {
+          
+      }
+      
+      window.hashchange = function() {
+          
+      }
+      
+      Sushi.extend(Sushi.history, {
+          pushState: push,
+          replaceState: replace,
+          go: go,
+          back: back,
+          forward: forward
+      });
+      
+      return Sushi.history;
+  }  
+);
+
diff --git a/docs/Data/sushi.utils.HTML5.js b/docs/Data/sushi.utils.HTML5.js new file mode 100644 index 0000000..1f8d0cb --- /dev/null +++ b/docs/Data/sushi.utils.HTML5.js @@ -0,0 +1,40 @@ +define( + ['sushi.core', 'sushi.utils'], + + /** + * HTML5 utilities functions + * + * @namespace Sushi.utils + * @class HTML5 + * @extends Sushi.utils + */ + function() { + + /** + * Enable HTML5 Elements inside IE (8 and before) + * script by Remy Sharp http://remysharp.com/2009/01/07/html5-enabling-script/ + * + * @method shiv + * @param {String} Optional. List of specific objects to create (e.g.: Sushi.HTML5.shiv("canvas, time, aside") ); + * @return {Object} HTML5 elements created with boolean value. + */ + var shiv = function(string) { + var e = (string) ? string : "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video", + html5els = {}, + i = e.length; + + e.split(','); + for( i;i >= 0; i -= 1){ + document.createElement(e[i]); + elsAvailable[e[i]] = true; + } + + return html5els; + }; + + Sushi.namespace('utils.HTML5'); + Sushi.extend(Sushi.utils.HTML5, { + shiv: shiv + }); + } +); \ No newline at end of file diff --git a/docs/Data/sushi.utils.HTML5.js.highlighted b/docs/Data/sushi.utils.HTML5.js.highlighted new file mode 100644 index 0000000..378fc44 --- /dev/null +++ b/docs/Data/sushi.utils.HTML5.js.highlighted @@ -0,0 +1,41 @@ +
define(
+	['sushi.core', 'sushi.utils'],
+	
+	/**
+	 * 	HTML5 utilities functions
+	 *
+	 *	@namespace Sushi.utils
+	 *	@class HTML5
+	 *  @extends Sushi.utils
+	 */
+	function() {
+
+		/**
+		 *	Enable HTML5 Elements inside IE (8 and before)
+		 *	script by Remy Sharp http://remysharp.com/2009/01/07/html5-enabling-script/
+		 *
+		 *	@method shiv
+		 *	@param {String} Optional. List of specific objects to create (e.g.: Sushi.HTML5.shiv("canvas, time, aside") );
+		 *	@return {Object} HTML5 elements created with boolean value.
+		 */	
+		var shiv = function(string) {
+			var e = (string) ? string : "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video",
+				html5els = {},
+				i = e.length;
+
+			e.split(',');
+			for( i;i >= 0; i -= 1){
+				document.createElement(e[i]);
+				elsAvailable[e[i]] = true;
+			}
+
+			return html5els;
+		};
+			
+		Sushi.namespace('utils.HTML5');
+		Sushi.extend(Sushi.utils.HTML5, {
+			shiv: shiv
+		});
+	}
+);
+
diff --git a/docs/Data/sushi.utils.collection.js b/docs/Data/sushi.utils.collection.js new file mode 100644 index 0000000..fa6c5b1 --- /dev/null +++ b/docs/Data/sushi.utils.collection.js @@ -0,0 +1,302 @@ +define( + ['sushi.core', 'sushi.utils'], + + /** + * Sushi Collection + * + * @namespace Sushi.utils + * @class Collection + * @extends Sushi.utils + */ + + function() { + var _collection = this, + _ArrayProto = Array.prototype, + _nativeForEach = _ArrayProto.forEach, + _nativeFilter = _ArrayProto.filter, + _nativeReduce = _ArrayProto.reduce, + _nativeReduceRight = _ArrayProto.reduceRight, + _nativeMap = _ArrayProto.map, + _nativeIndexOf = _ArrayProto.indexOf, + _nativeSome = _ArrayProto.some, + _slice = _ArrayProto.slice, + _breaker = {}, + + /* + * Retrieve the values of an object's properties. + * + * @method values + * @param obj Object to retrieve properties from + * + * @return {Array} Object properties in array format + */ + values = function(obj) { + return map(obj, Sushi.utils.identity); + }, + + /** + * Safely convert anything iterable into a real, live array. + * + * @method toArray + * @param iterable Variable to convert to an array + * + * @return {Array} Old variable in array format + */ + toArray = function(iterable) { + if (!iterable) { return []; } + if (iterable.toArray) { return iterable.toArray(); } + if (Sushi.utils.isArray(iterable)) { return iterable; } + if (Sushi.utils.isArguments(iterable)) { return _slice.call(iterable); } + + return values(iterable); + }, + + /** + * Cornerstone each (forEach) implementation. + * Handles objects implementing forEach, arrays, and raw objects. + * Delegates to ECMAScript 5's native forEach if available. + * Based on the Underscore JS implementation. + * + * @method each + * + * @param obj Object to loop through + * @param {Function} iterator Function to callback for each element + * @param {Object} context Object to use as "this" when executing iterator + */ + each = function(obj, iterator, context) { + var value; + if (obj === null) { return; } + + if (_nativeForEach && obj.forEach === _nativeForEach) { + obj.forEach(iterator, context); + } else if (Sushi.utils.isNumber(obj.length)) { + for (var i = 0, l = obj.length; i < l; i++) { + if (iterator.call(context, obj[i], i, obj) === _breaker) { return; } + } + } else { + for (var key in obj) { + if (hasOwnProperty.call(obj, key)) { + if (iterator.call(context, obj[key], key, obj) === _breaker) { return; } + } + } + } + }, + + /** + * Determine if a given value is included in the array or object using ===. + * + * @method contains + * + * @param {Object} heystack Object or Array to search in. + * @param needle Value to search heystack for + * + * @return {Boolean} True if needle is present. + */ + contains = function(heystack, needle) { + var found = false; + + if (heystack === null) { return found; } + + if (_nativeIndexOf && heystack.indexOf === _nativeIndexOf) { + return heystack.indexOf(needle) != -1; + } + + some(heystack, function(value) { + if (found = value === needle) { return true; } + }); + + return found; + }, + + /** + * Return all the elements that pass a truth test. + * Delegates to ECMAScript 5's native filter if available. + * + * @method filter + * + * @param {Array} obj Array to filter. + * @param {Function} iterator Function to execute on each value in the array. + * @param memo Object to use as the first argument to the first call of the callback. + * + * @return {Array} Filtered Array + */ + filter = function(obj, iterator, context) { + var results = []; + + if (obj === null) { return results; } + + if (_nativeFilter && obj.filter === _nativeFilter) { return obj.filter(iterator, context); } + + each(obj, function(value, index, list) { + if (iterator.call(context, value, index, list)) { + results[results.length] = value; + } + }); + + return results; + }, + + /** + * Reduce builds up a single result from a list of values + * from left-to-right. + * Delegates to ECMAScript 5's native reduce if available. + * + * @method reduce + * + * @param {Array} obj Array to reduce. + * @param {Function} iterator Function to execute on each value in the array. + * @param memo Object to use as the first argument to the first call of the callback. + * + * @return {Array} Reduced Array + */ + reduce = function(obj, iterator, memo) { + var initial = memo !== undefined; + obj = (obj === null) ? [] : obj; + + if (_nativeReduce && obj.reduce === _nativeReduce) { + //if (context) { iterator = _.bind(iterator, context); } + return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); + } + + each(obj, function(value, index, list) { + if (!initial && index === 0) { + memo = value; + initial = true; + } else { + memo = iterator.call(context, memo, value, index, list); + } + }); + + if (!initial) { + throw new TypeError("Reduce of empty array with no initial value"); + } + + return memo; + }, + + /** + * Reduce builds up a single result from a list of values (from right-to-left). + * Delegates to ECMAScript 5's native reduceRight if available. + * + * @method reduceRight + * + * @param {Array} Array to reduce. + * @param {Function} Function to execute on each value in the array. + * @param memo Object to use as the first argument to the first call of the callback. + * + * @return {Array} Reduced Array + * + */ + reduceRight = function(obj, iterator, memo) { + if (obj === null) { obj = []; } + + if (_nativeReduceRight && obj.reduceRight === _nativeReduceRight) { + //if (context) iterator = _.bind(iterator, context); + return memo !== undefined ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); + } + + var reversed = (Sushi.utils.isArray(obj) ? obj.slice() : _collection.toArray(obj)).reverse(); + + return _collection.reduce(reversed, iterator, memo); + }, + + /** + * Creates a new array with the results of calling a provided function + * on every element in this array. + * Delegates to ECMAScript 5's native map if available. + * + * @method map + * + * @param {Array} obj Original array. + * @param {Function} iterator Function that produces an element of the new Array from an element of the current one. + * @param {Object} context Object to use as "this" when executing iterator + * + * @return {Array} Reduced Array + * + */ + map = function(obj, iterator, context) { + var results = []; + + if (obj === null) { return results; } + + // Delegate to ECMAScript 5 native map() + if (_nativeMap && obj.map === _nativeMap) { return obj.map(iterator, context); } + + each(obj, function(value, index, list) { + results[results.length] = iterator.call(context, value, index, list); + }); + + return results; + }, + + /** + * Convenience method for Sushi.utils.map to get a property from an object. + * + * @method pluck + * + * @param {Object} obj Object to search through + * @param key Property key to look for + * + * @return {Object} Property in object + * + */ + pluck = function(obj, key) { + return map(obj, function(value) { return value[key]; }); + }, + + /** + * Determine if at least one element in the object matches a truth test. + * Delegates to ECMAScript 5's native some if available. + * + * @method some + * + * @param {Object} obj Object to search through + * @param {Function} iterator Function that produces an element of the new Array from an element of the current one. + * @param {Object} context Object to use as "this" when executing iterator + * + * @return {Booelan} True if an object matches the truth test. + * + */ + some = function(obj, iterator, context) { + iterator = iterator || Sushi.utils.identity; + + var result = false; + + if (obj === null) { return result; } + + if (_nativeSome && obj.some === _nativeSome) { + return obj.some(iterator, context); + } + + each(obj, function(value, index, list) { + result = iterator.call(context, value, index, list); + if (result) { + return _breaker; + } + }); + + return result; + }, + + every = function() { + //TODO: Add every logic + }, + + // Cake Set::extract + extract = function() { + //TODO: Add extract logic + }; + + Sushi.extend(Sushi.utils, { + values: values, + toArray: toArray, + each: each, + reduce: reduce, + reduceRight: reduceRight, + map: map, + filter: filter, + some: some, + pluck: pluck + }); + } +); \ No newline at end of file diff --git a/docs/Data/sushi.utils.collection.js.highlighted b/docs/Data/sushi.utils.collection.js.highlighted new file mode 100644 index 0000000..9e9f383 --- /dev/null +++ b/docs/Data/sushi.utils.collection.js.highlighted @@ -0,0 +1,303 @@ +
define(
+	['sushi.core', 'sushi.utils'],
+	
+	/**
+     * Sushi Collection
+     *
+	 * @namespace Sushi.utils
+	 * @class Collection
+	 * @extends Sushi.utils
+	 */
+     
+	function() {
+	    var _collection = this,
+	    _ArrayProto = Array.prototype,
+	    _nativeForEach = _ArrayProto.forEach,
+		_nativeFilter = _ArrayProto.filter,
+		_nativeReduce = _ArrayProto.reduce,
+		_nativeReduceRight = _ArrayProto.reduceRight,
+		_nativeMap = _ArrayProto.map,
+		_nativeIndexOf = _ArrayProto.indexOf,
+		_nativeSome = _ArrayProto.some,
+		_slice = _ArrayProto.slice,
+	    _breaker = {},
+	    
+	    /*
+	     * Retrieve the values of an object's properties.
+	     *
+	     * @method values
+	     * @param obj Object to retrieve properties from
+	     *
+	     * @return {Array} Object properties in array format
+	     */
+	    values = function(obj) {
+            return map(obj, Sushi.utils.identity);
+        },
+        
+		/**
+		 * Safely convert anything iterable into a real, live array.
+		 *
+		 * @method toArray
+		 * @param iterable Variable to convert to an array
+		 *
+		 * @return {Array} Old variable in array format
+		 */
+		toArray = function(iterable) {
+            if (!iterable) {                         return []; }
+            if (iterable.toArray) {                  return iterable.toArray(); }
+            if (Sushi.utils.isArray(iterable)) {     return iterable; }
+            if (Sushi.utils.isArguments(iterable)) { return _slice.call(iterable); }
+            
+            return values(iterable);
+        },
+	    
+	    /**
+    	 * Cornerstone each (forEach) implementation.
+    	 * Handles objects implementing forEach, arrays, and raw objects. 
+    	 * Delegates to ECMAScript 5's native forEach if available.
+    	 * Based on the Underscore JS implementation.
+    	 *
+    	 * @method each
+    	 *
+    	 * @param obj Object to loop through
+    	 * @param {Function} iterator Function to callback for each element
+    	 * @param {Object} context Object to use as "this" when executing iterator
+    	 */
+	    each = function(obj, iterator, context) {
+            var value;
+            if (obj === null) { return; }
+            
+            if (_nativeForEach && obj.forEach === _nativeForEach) {
+                obj.forEach(iterator, context);
+            } else if (Sushi.utils.isNumber(obj.length)) {
+                for (var i = 0, l = obj.length; i < l; i++) {
+                    if (iterator.call(context, obj[i], i, obj) === _breaker) { return; }
+                }
+            } else {
+                for (var key in obj) {
+                    if (hasOwnProperty.call(obj, key)) {
+                        if (iterator.call(context, obj[key], key, obj) === _breaker) { return; }
+                    }
+                }
+            }
+        },
+        
+        /**
+		 * Determine if a given value is included in the array or object using ===.
+		 *
+		 * @method contains
+		 *
+		 * @param {Object} heystack Object or Array to search in.
+		 * @param needle Value to search heystack for
+		 *
+		 * @return {Boolean} True if needle is present.
+		 */        
+        contains = function(heystack, needle) {
+            var found = false;
+            
+            if (heystack === null) { return found; }
+            
+            if (_nativeIndexOf && heystack.indexOf === _nativeIndexOf) { 
+                return heystack.indexOf(needle) != -1; 
+            }
+            
+            some(heystack, function(value) {
+                if (found = value === needle) { return true; }
+            });
+            
+            return found;
+        },
+        
+        /**
+		 * Return all the elements that pass a truth test.
+		 * Delegates to ECMAScript 5's native filter if available. 
+		 *
+		 * @method filter
+		 *
+		 * @param {Array} obj Array to filter.
+		 * @param {Function} iterator Function to execute on each value in the array.
+		 * @param memo Object to use as the first argument to the first call of the callback.
+		 *
+		 * @return {Array} Filtered Array
+		 */
+		filter = function(obj, iterator, context) {
+			var results = [];
+			
+            if (obj === null) { return results; }
+            
+            if (_nativeFilter && obj.filter === _nativeFilter) { return obj.filter(iterator, context); }
+            
+            each(obj, function(value, index, list) {
+                if (iterator.call(context, value, index, list)) { 
+                    results[results.length] = value; 
+                }
+            });
+            
+            return results;
+		},
+		
+		/**
+		 * Reduce builds up a single result from a list of values 
+		 * from left-to-right.
+		 * Delegates to ECMAScript 5's native reduce if available. 
+		 *
+		 * @method reduce
+		 *
+		 * @param {Array} obj Array to reduce.
+		 * @param {Function} iterator Function to execute on each value in the array.
+		 * @param memo Object to use as the first argument to the first call of the callback.
+		 *
+		 * @return {Array} Reduced Array
+		 */		
+		reduce = function(obj, iterator, memo) {
+			var initial = memo !== undefined;
+			obj = (obj === null) ? [] : obj;
+			
+		    if (_nativeReduce && obj.reduce === _nativeReduce) {
+		    	//if (context) { iterator = _.bind(iterator, context); }		
+		    	return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+		    }
+		
+		    each(obj, function(value, index, list) {
+		    	if (!initial && index === 0) {
+		        	memo = value;
+		        	initial = true;
+		      	} else {
+		        	memo = iterator.call(context, memo, value, index, list);
+		      	}
+		    });
+		
+		    if (!initial) {
+		        throw new TypeError("Reduce of empty array with no initial value");
+		    }
+		
+		    return memo;
+		},
+		
+		/**
+		 * Reduce builds up a single result from a list of values (from right-to-left). 
+		 * Delegates to ECMAScript 5's native reduceRight if available. 
+		 *
+		 * @method reduceRight
+		 *
+		 * @param {Array} Array to reduce.
+		 * @param {Function} Function to execute on each value in the array.
+		 * @param memo Object to use as the first argument to the first call of the callback.
+		 *
+		 * @return {Array} Reduced Array
+		 *
+		 */
+		reduceRight = function(obj, iterator, memo) {
+		    if (obj === null) { obj = []; }
+		    
+            if (_nativeReduceRight && obj.reduceRight === _nativeReduceRight) {
+                //if (context) iterator = _.bind(iterator, context);
+                return memo !== undefined ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+            }
+            
+            var reversed = (Sushi.utils.isArray(obj) ? obj.slice() : _collection.toArray(obj)).reverse();
+           
+            return _collection.reduce(reversed, iterator, memo);
+		},
+		
+		/**
+		 * Creates a new array with the results of calling a provided function 
+		 * on every element in this array.
+		 * Delegates to ECMAScript 5's native map if available. 
+		 *
+		 * @method map
+		 *
+		 * @param {Array} obj Original array.
+		 * @param {Function} iterator Function that produces an element of the new Array from an element of the current one.
+		 * @param {Object} context Object to use as "this" when executing iterator
+		 *
+		 * @return {Array} Reduced Array
+		 *
+		 */
+		map = function(obj, iterator, context) {
+			var results = [];
+			
+			if (obj === null) { return results; }
+			
+			// Delegate to ECMAScript 5 native map()
+		    if (_nativeMap && obj.map === _nativeMap) { return obj.map(iterator, context); }
+			
+		    each(obj, function(value, index, list) {
+		        results[results.length] = iterator.call(context, value, index, list);
+		    });
+		
+		    return results;
+		},
+		
+		/**
+		 * Convenience method for Sushi.utils.map to get a property from an object.
+		 *
+		 * @method pluck
+		 *
+		 * @param {Object} obj Object to search through
+		 * @param key Property key to look for
+		 *
+		 * @return {Object} Property in object
+		 *
+		 */
+		pluck = function(obj, key) {
+		    return map(obj, function(value) { return value[key]; });
+		},
+
+		/**
+		 * Determine if at least one element in the object matches a truth test.
+		 * Delegates to ECMAScript 5's native some if available. 
+		 *
+		 * @method some
+		 *
+		 * @param {Object} obj Object to search through
+		 * @param {Function} iterator Function that produces an element of the new Array from an element of the current one.
+		 * @param {Object} context Object to use as "this" when executing iterator
+		 *
+		 * @return {Booelan} True if an object matches the truth test.
+		 *
+		 */
+		some = function(obj, iterator, context) {
+		    iterator = iterator || Sushi.utils.identity;
+            
+            var result = false;
+            
+            if (obj === null) { return result; }
+            
+            if (_nativeSome && obj.some === _nativeSome) {
+                return obj.some(iterator, context);
+            }
+            
+            each(obj, function(value, index, list) {
+                result = iterator.call(context, value, index, list);
+                if (result) {
+                    return _breaker;
+                }
+            });
+            
+            return result;
+		},
+		
+		every = function() {
+		    //TODO: Add every logic
+		},
+		
+		// Cake Set::extract
+		extract = function() {
+		    //TODO: Add extract logic
+		};
+        
+        Sushi.extend(Sushi.utils, {
+            values: values,
+            toArray: toArray,
+            each: each,
+			reduce: reduce,
+			reduceRight: reduceRight,
+			map: map,
+			filter: filter,
+			some: some,
+			pluck: pluck
+        });
+	}
+);
+
diff --git a/docs/Data/sushi.utils.debug.ie.js b/docs/Data/sushi.utils.debug.ie.js new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/Data/sushi.utils.debug.ie.js @@ -0,0 +1,25 @@ +define( + ['sushi.debug'], + + /** + * Defines several safe debugging methods + * + * @namespace Sushi.utils.debug + * @class IE + * @extends Sushi.utils.debug + */ + function() { + /** + * Forces IE to run it's Garbage Collector + */ + garbageCollect = function(){ + if (typeof(CollectGarbage) == "function"){ + CollectGarbage(); + } + } + + return { + garbageCollect: garbageCollect + }; + } +); \ No newline at end of file diff --git a/docs/Data/sushi.utils.debug.ie.js.highlighted b/docs/Data/sushi.utils.debug.ie.js.highlighted new file mode 100644 index 0000000..b5f6f85 --- /dev/null +++ b/docs/Data/sushi.utils.debug.ie.js.highlighted @@ -0,0 +1,26 @@ +
define(
+    ['sushi.debug'],
+    
+    /**
+	 * Defines several safe debugging methods
+	 *
+	 * @namespace Sushi.utils.debug
+	 * @class IE
+	 *	@extends Sushi.utils.debug
+	 */
+    function() {
+		/**
+		*	Forces IE to run it's Garbage Collector
+		*/
+		garbageCollect = function(){
+			if (typeof(CollectGarbage) == "function"){
+			    CollectGarbage();
+			}
+		}
+		
+		return {
+			garbageCollect: garbageCollect
+		};
+    }
+);
+
diff --git a/docs/Data/sushi.utils.debug.js b/docs/Data/sushi.utils.debug.js new file mode 100644 index 0000000..a359e7c --- /dev/null +++ b/docs/Data/sushi.utils.debug.js @@ -0,0 +1,129 @@ +define( + ['sushi.core', 'sushi.utils'], + + /** + * Defines several safe debugging methods + * + * @namespace Sushi.utils + * @class Debug + * @extends Sushi.utils + */ + function() { + // Cached logging history + var _history = [], + + /** + * Returns the debugging methods the environment supports + * + * @returns {Object} Supported debugging methods + */ + _supports = (function(){ + return { + log: window.console.log || false, + warn: window.console.warn || false, + error: window.console.error || false, + dir: window.console.dir || false + }; + })(), + + // Local ref for easy converting to real arrays + _slice = Array.prototype.slice, + + /** + * Logs comma-separated arguments to the console using console.log() + * + * @param Values to be logged + */ + log = function() { + // Turn the arguments object into a real array + var args = _slice.call(arguments); + + if (_supports.log) { + for (var i = 0, len = args.length; i < len; i++) { + _history.push(args[i]); + console.log(args[i]); + } + } + }, + + /** + * Logs comma-separated arguments to the console using console.error() + * + * @param Values to be logged + */ + error = function() { + // Turn the arguments object into a real array + var args = _slice.call(arguments); + + if (_supports.error) { + for (var i = 0, len = args.length; i < len; i++) { + _history.push(args[i]); + console.error(args[i]); + } + } + }, + + /** + * Logs comma-separated arguments to the console using console.warn() + * + * @param Values to be logged + */ + warn = function() { + // Turn the arguments object into a real array + var args = _slice.call(arguments); + + if (_supports.warn) { + for (var i = 0, len = args.length; i < len; i++) { + _history.push(args[i]); + console.warn(args[i]); + } + } + }, + + /** + * Logs comma-separated arguments to the console using console.dir() + * + * @param Values to be logged + */ + dir = function() { + // Turn the arguments object into a real array + var args = _slice.call(arguments); + + if (_supports.dir) { + for (var i = 0, len = args.length; i < len; i++) { + _history.push(args[i]); + console.dir(args[i]); + } + } + }, + + /** + * Prints the whole cached debug history to the console + * + */ + logHistory = function() { + log(_history); + }, + /** + * Forces IE to run its garbage Collector + * @return {void, Boolean} Returns false, if it's not possible to force the Garbage Collector, otherwise nothing is returned. + */ + garbageCollect = function(){ + if (typeof(CollectGarbage) == "function"){ + CollectGarbage(); + } else { + return false; + } + }; + + Sushi.namespace('utils.debug') + Sushi.extend(Sushi.utils.debug, { + log: log, + warn: warn, + error: error, + dir: dir, + logHistory: logHistory, + garbageCollect: garbageCollect + }); + } +); \ No newline at end of file diff --git a/docs/Data/sushi.utils.debug.js.highlighted b/docs/Data/sushi.utils.debug.js.highlighted new file mode 100644 index 0000000..6fec0b3 --- /dev/null +++ b/docs/Data/sushi.utils.debug.js.highlighted @@ -0,0 +1,130 @@ +
define(
+    ['sushi.core', 'sushi.utils'],
+    
+    /**
+	 * Defines several safe debugging methods
+	 *
+	 * @namespace Sushi.utils
+	 * @class Debug
+	 * @extends Sushi.utils
+	 */
+    function() {
+		// Cached logging history
+		var _history = [],
+		
+		/**
+		 * Returns the debugging methods the environment supports
+		 *
+		 * @returns {Object} Supported debugging methods
+		 */
+		_supports = (function(){
+			return {
+				log: window.console.log || false,
+				warn: window.console.warn || false,
+				error: window.console.error || false,
+				dir: window.console.dir || false
+			};
+		})(),
+		
+		// Local ref for easy converting to real arrays
+		_slice = Array.prototype.slice,
+		
+		/**
+		 * Logs comma-separated arguments to the console using console.log()
+		 *
+		 * @param Values to be logged
+		 */
+		log = function() {
+			// Turn the arguments object into a real array
+			var args = _slice.call(arguments);
+			
+		    if (_supports.log) {
+		    	for (var i = 0, len = args.length; i < len; i++) {
+		    		_history.push(args[i]);
+					console.log(args[i]);
+				}
+		    }
+		},
+		
+		/**
+		 * Logs comma-separated arguments to the console using console.error()
+		 *
+		 * @param Values to be logged
+		 */
+		error = function() {
+			// Turn the arguments object into a real array
+			var args = _slice.call(arguments);
+			
+		    if (_supports.error) {
+		    	for (var i = 0, len = args.length; i < len; i++) {
+		    		_history.push(args[i]);
+					console.error(args[i]);
+				}
+		    }
+		},
+		
+		/**
+		 * Logs comma-separated arguments to the console using console.warn()
+		 *
+		 * @param Values to be logged
+		 */
+		warn = function() {
+			// Turn the arguments object into a real array
+			var args = _slice.call(arguments);
+			
+		    if (_supports.warn) {
+		    	for (var i = 0, len = args.length; i < len; i++) {
+		    		_history.push(args[i]);
+					console.warn(args[i]);
+				}
+		    }
+		},
+		
+		/**
+		 * Logs comma-separated arguments to the console using console.dir()
+		 *
+		 * @param Values to be logged
+		 */
+		dir = function() {
+			// Turn the arguments object into a real array
+			var args = _slice.call(arguments);
+			
+		    if (_supports.dir) {
+		    	for (var i = 0, len = args.length; i < len; i++) {
+		    		_history.push(args[i]);
+					console.dir(args[i]);
+				}
+		    }
+		},
+		
+		/**
+		 * Prints the whole cached debug history to the console
+		 *
+		 */
+		logHistory = function() {
+		    log(_history);
+		},
+		/**
+		 * Forces IE to run its garbage Collector
+		 * @return {void, Boolean}  Returns false, if it's not possible to force the Garbage Collector, otherwise nothing is returned.
+		 */
+		garbageCollect = function(){
+			if (typeof(CollectGarbage) == "function"){
+			    CollectGarbage();
+			} else {
+				return false;
+			}
+		};
+		
+		Sushi.namespace('utils.debug')
+		Sushi.extend(Sushi.utils.debug, {
+			log: log,
+			warn: warn,
+			error: error,
+			dir: dir,
+			logHistory: logHistory,
+			garbageCollect: garbageCollect
+		});
+    }
+);
+
diff --git a/docs/Data/sushi.utils.js b/docs/Data/sushi.utils.js new file mode 100644 index 0000000..d42a645 --- /dev/null +++ b/docs/Data/sushi.utils.js @@ -0,0 +1,324 @@ +/* + * Sushi.utils - General purpose utility functions for the Sushi JS framework + * + */ +define( + // Module dependencies + ['sushi.core'], + + /** + * General purpose utility functions for the Sushi JS framework + * + * @namespace Sushi + * @class utils + */ + function() { + var _utilsNs = Sushi.namespace('utils'), + _ArrayProto = Array.prototype, + _nativeIsArray = _ArrayProto.isArray, + _nativeKeys = Object.keys; + + // Generic utility methods + Sushi.extend(Sushi.utils, { + _idCounter: 0, + /** + * Generates a unique integer ID (within the client session) + * + * @method uniqueId + * @param prefix Optional prefix to prepend to the unique ID + * + * @return Unique ID + */ + uniqueId: function(prefix) { + var id = this._idCounter++; + return prefix ? prefix + id : id; + }, + + /** + * Default iterator object + * + * @method identity + * @param value Value to return + * + * @return Value passed in to the function + */ + identity: function(value) { + return value; + }, + + // Utility object methods + /** + * Generate an integer Array containing an arithmetic progression. + * A port of the native Python range(). Lifted from Underscore JS. + * See http://docs.python.org/library/functions.html#range for more info. + * + * @method range + * @param start Value to start progression from. Defaults to 0 + * @param stop Value to stop progression at + * @param step Value to increment progression by. Defaults to 1 + * + * @return Array containing the progression. + */ + range: function(start, stop, step) { + var args = Array.prototype.slice.call(arguments), + solo = args.length <= 1, + start = solo ? 0 : args[0], + stop = solo ? args[0] : args[1], + step = args[2] || 1, + len = Math.max(Math.ceil((stop - start) / step), 0), + idx = 0, + range = new Array(len); + + while (idx < len) { + range[idx++] = start; + start += step; + } + + return range; + }, + + /** + * Retrieve the names of an object's properties. + * Defaults to ECMAScript 5's native Object.keys. Lifted from Underscore JS. + * + * @method keys + * @param obj Object to retrieve keys from + * + * @return Array containing the object's key names. + */ + keys: function(obj) { + if (_nativeKeys) { + return _nativeKeys(obj); + } + + if (this.isArray(obj)) { + return this.range(0, obj.length); + } + + var keys = []; + for (var key in obj) { + if (hasOwnProperty.call(obj, key)) { + keys[keys.length] = key; + } + } + return keys; + }, + + // Utility "is" methods. Lifted from Underscore.js + /** + * Checks if an object is empty + * + * @method isEmpty + * @param obj Object to test + * + * @return {Boolean} Whether argument is empty or not + */ + isEmpty: function(obj) { + if (this.isArray(obj) || this.isString(obj)) { return (obj.length === 0); } + + for (var key in obj) { + if (hasOwnProperty.call(obj, key)) { return false; } + } + + return true; + }, + + /** + * Checks if an object is a DOM node + * + * @method isElement + * @param obj Object to test + * + * @return {Boolean} Whether argument is a DOM node or not + */ + isElement: function(obj) { + return !!(obj && obj.nodeType == 1); + }, + + /** + * Checks if an object is a function + * + * @method isFunction + * @param obj Object to test + * + * @return {Boolean} Whether argument is a function or not + */ + isFunction: function(obj) { + return !!(obj && obj.constructor && obj.call && obj.apply); + }, + + /** + * Detects wether a value is a string + * + * @method isString + * @param {String} Value to test + * + * @return {Boolean} Whether value is a number or not. + */ + isString: function(string) { + return !!(string === '' || (string && string.charCodeAt && string.substr)); + }, + + /** + * Detects whether a value is a number + * + * @method isNumber + * @param number Value to test + * + * @return {Boolean} Whether value is a number or not. + */ + isNumber: function(number) { + return (typeof number == "number"); + }, + + /** + * Checks for array-ness + * + * @method isArray + * @param array Argument to test + * + * @return {Boolean} Whether argument is an array or not + */ + isArray: function(array) { + if (_nativeIsArray && Array.isArray === _nativeIsArray) { + return Array.isArray.call(array); + } else { + return (Object.prototype.toString.call(array) === "[object Array]"); + } + }, + + /** + * Checks whether a given variable is an arguments object + * + * @method isArguments + * @param obj Variable to test + * + * @return {Boolean} Whether variable is an arguments object + */ + isArguments: function(obj) { + return !!(obj && hasOwnProperty.call(obj, 'callee')); + }, + + /** + * Checks whether a given variable is a date + * + * @method isDate + * @param obj Variable to test + * + * @return {Boolean} Whether variable is a date + */ + isDate: function(obj) { + return !!(obj && obj.getTimezoneOffset && obj.setUTCFullYear); + }, + + /** + * Performs a deep comparison to check if two objects are equal. + * + * @method isEqual + * @param a First object + * @param b Second object + * + * @return {Boolean} Whether objects are equal or not + */ + isEqual: function(a, b) { + // Check object identity. + if (a === b) { return true; } + + // Different types? + var atype = typeof(a), + btype = typeof(b); + if (atype != btype) { return false; } + + // Basic equality test (watch out for coercions). + if (a == b) { return true; } + + // One is falsy and the other truthy. + if ((!a && b) || (a && !b)) { return false; } + + // One of them implements an isEqual()? + if (a.isEqual) { return a.isEqual(b); } + + // Check dates' integer values. + if (this.isDate(a) && this.isDate(b)) { return ( a.getTime() === b.getTime() ); } + + // Both are NaN? + if (this.isNaN(a) && this.isNaN(b)) { return false; } + + // Compare regular expressions. + if (this.isRegExp(a) && this.isRegExp(b)) { + return a.source === b.source && + a.global === b.global && + a.ignoreCase === b.ignoreCase && + a.multiline === b.multiline; + } + + // If a is not an object by this point, we can't handle it. + if (atype !== 'object') { return false; } + + // Check for different array lengths before comparing contents. + if (a.length && (a.length !== b.length)) { return false; } + + // Nothing else worked, deep compare the contents. + var aKeys = this.keys(a), bKeys = this.keys(b); + // Different object sizes? + if (aKeys.length != bKeys.length) { return false; } + // Recursive comparison of contents. + for (var key in a) { + if (!(key in b) || !this.isEqual(a[key], b[key])) { return false; } + } + return true; + }, + + /** + * Checks if an object is NaN + * NaN happens to be the only object in Javascript that is not equal to itself. + * + * @method isNaN + * @param obj Object to test + * + * @return {Boolean} Whether argument is NaN or not + */ + isNaN: function(obj) { + /*jsl:ignore*/ + return obj !== obj; + /*jsl:end*/ + }, + + /** + * Checks if an object is a Regular Expression + * + * @method isRegExp + * @param obj Object to test + * + * @return {Boolean} Whether argument is a RegExp or not + */ + isRegExp: function(obj) { + return !!(obj && obj.test && obj.exec && (obj.ignoreCase || obj.ignoreCase === false)); + }, + + /** + * Checks if an object's value is equal to null + * + * @method isNull + * @param obj Object to test + * + * @return {Boolean} Whether argument is equal to null or not + */ + isNull: function(obj) { + return obj === null; + }, + + /** + * Checks if an object is equal to undefined + * + * @method isUndefined + * @param obj Object to test + * + * @return {Boolean} Whether argument is equal to undefined or not + */ + isUndefined: function(obj) { + return (obj === undefined); + } + }); + } +); \ No newline at end of file diff --git a/docs/Data/sushi.utils.js.highlighted b/docs/Data/sushi.utils.js.highlighted new file mode 100644 index 0000000..d8da1a5 --- /dev/null +++ b/docs/Data/sushi.utils.js.highlighted @@ -0,0 +1,325 @@ +
/*
+ * Sushi.utils - General purpose utility functions for the Sushi JS framework
+ *
+ */
+define(
+	// Module dependencies
+	['sushi.core'],
+	
+	/**
+	 * General purpose utility functions for the Sushi JS framework
+	 *
+	 * @namespace Sushi
+	 * @class utils
+	 */
+	function() {
+		var _utilsNs = Sushi.namespace('utils'),
+		    _ArrayProto = Array.prototype,
+		    _nativeIsArray = _ArrayProto.isArray,
+		    _nativeKeys = Object.keys;
+
+		// Generic utility methods
+		Sushi.extend(Sushi.utils, {
+		    _idCounter: 0,
+			/**
+		     * Generates a unique integer ID (within the client session)
+		     *
+		     * @method uniqueId
+		     * @param prefix Optional prefix to prepend to the unique ID
+		     *
+		     * @return Unique ID
+		     */
+			uniqueId: function(prefix) {
+				var id = this._idCounter++;
+				return prefix ? prefix + id : id;
+			},
+			
+			/**
+		     * Default iterator object
+		     *
+		     * @method identity
+		     * @param value Value to return
+		     *
+		     * @return Value passed in to the function
+		     */
+			identity: function(value) {
+				return value;
+			},
+			
+			// Utility object methods
+			/**
+		     * Generate an integer Array containing an arithmetic progression.
+		     * A port of the native Python range(). Lifted from Underscore JS.
+		     * See http://docs.python.org/library/functions.html#range for more info.
+		     *
+		     * @method range
+		     * @param start Value to start progression from. Defaults to 0
+		     * @param stop Value to stop progression at
+		     * @param step Value to increment progression by. Defaults to 1
+		     *
+		     * @return Array containing the progression.
+		     */
+			range: function(start, stop, step) {
+                var args  = Array.prototype.slice.call(arguments),
+                    solo  = args.length <= 1,
+                    start = solo ? 0 : args[0],
+                    stop  = solo ? args[0] : args[1],
+                    step  = args[2] || 1,
+                    len   = Math.max(Math.ceil((stop - start) / step), 0),
+                    idx   = 0,
+                    range = new Array(len);
+                    
+                while (idx < len) {
+                    range[idx++] = start;
+                    start += step;
+                }
+                
+                return range;
+            },
+            
+            /**
+		     * Retrieve the names of an object's properties.
+		     * Defaults to ECMAScript 5's native Object.keys. Lifted from Underscore JS.
+		     *
+		     * @method keys
+		     * @param obj Object to retrieve keys from
+		     *
+		     * @return Array containing the object's key names.
+		     */
+			keys: function(obj) {
+			    if (_nativeKeys) {
+			        return _nativeKeys(obj);
+			    }
+			    
+                if (this.isArray(obj)) {
+                    return this.range(0, obj.length);
+                }
+                
+                var keys = [];                
+                for (var key in obj) {
+                    if (hasOwnProperty.call(obj, key)) {
+                        keys[keys.length] = key;
+                    }
+                }                
+                return keys;
+            },
+			
+			// Utility "is" methods. Lifted from Underscore.js
+			/**
+			 * Checks if an object is empty
+			 *
+			 * @method isEmpty
+			 * @param obj Object to test
+			 *
+			 * @return {Boolean} Whether argument is empty or not
+			 */
+			isEmpty: function(obj) {
+				if (this.isArray(obj) || this.isString(obj)) { return (obj.length === 0); }
+				
+				for (var key in obj) {
+					if (hasOwnProperty.call(obj, key)) { return false; }
+				}
+				
+				return true;
+			},
+			
+			/**
+			 * Checks if an object is a DOM node
+			 *
+			 * @method isElement
+			 * @param obj Object to test
+			 *
+			 * @return {Boolean} Whether argument is a DOM node or not
+			 */
+			isElement: function(obj) {
+			    return !!(obj && obj.nodeType == 1);
+			},
+			
+			/**
+			 * Checks if an object is a function
+			 *
+			 * @method isFunction
+			 * @param obj Object to test
+			 *
+			 * @return {Boolean} Whether argument is a function or not
+			 */
+			isFunction: function(obj) {
+				return !!(obj && obj.constructor && obj.call && obj.apply);
+			},
+
+			/**
+			 * Detects wether a value is a string
+			 *
+			 * @method isString
+			 * @param {String} Value to test
+			 * 
+			 * @return {Boolean} Whether value is a number or not.
+			 */
+			isString: function(string) {
+				return !!(string === '' || (string && string.charCodeAt && string.substr));
+			},
+			
+			/**
+		     * Detects whether a value is a number
+		     *
+		     * @method isNumber
+		     * @param number Value to test
+		     * 
+		     * @return {Boolean} Whether value is a number or not.
+		     */
+			isNumber: function(number) {
+		        return (typeof number == "number");
+		    },
+		
+			/**
+			 * Checks for array-ness
+			 *
+			 * @method isArray
+			 * @param array Argument to test
+			 *
+			 * @return {Boolean} Whether argument is an array or not
+			 */
+			isArray: function(array) {
+			    if (_nativeIsArray && Array.isArray === _nativeIsArray) {
+			        return Array.isArray.call(array);
+			    } else {
+			        return (Object.prototype.toString.call(array) === "[object Array]");
+			    }
+			},
+
+			/**
+			 * Checks whether a given variable is an arguments object
+			 *
+			 * @method isArguments
+			 * @param obj Variable to test
+			 *
+			 * @return {Boolean} Whether variable is an arguments object
+			 */
+			isArguments: function(obj) {
+	            return !!(obj && hasOwnProperty.call(obj, 'callee'));
+	        },
+	        
+	        /**
+			 * Checks whether a given variable is a date
+			 *
+			 * @method isDate
+			 * @param obj Variable to test
+			 *
+			 * @return {Boolean} Whether variable is a date
+			 */
+	        isDate: function(obj) {
+                return !!(obj && obj.getTimezoneOffset && obj.setUTCFullYear);
+            },
+			
+			/**
+			 * Performs a deep comparison to check if two objects are equal.
+			 *
+			 * @method isEqual
+			 * @param a First object
+			 * @param b Second object
+			 *
+			 * @return {Boolean} Whether objects are equal or not
+			 */
+			isEqual: function(a, b) {
+				// Check object identity.
+				if (a === b) { return true; }
+				
+			    // Different types?
+			    var atype = typeof(a), 
+			    btype = typeof(b);
+			    if (atype != btype) { return false; }
+			    
+			    // Basic equality test (watch out for coercions).
+			    if (a == b) { return true; }
+			    
+			    // One is falsy and the other truthy.
+			    if ((!a && b) || (a && !b)) { return false; }
+			    
+			    // One of them implements an isEqual()?
+			    if (a.isEqual) { return a.isEqual(b); }
+			    
+			    // Check dates' integer values.
+			    if (this.isDate(a) && this.isDate(b)) { return ( a.getTime() === b.getTime() ); }
+			    
+			    // Both are NaN?
+			    if (this.isNaN(a) && this.isNaN(b)) { return false; }
+			    
+			    // Compare regular expressions.
+			    if (this.isRegExp(a) && this.isRegExp(b)) {
+			      return a.source     === b.source &&
+			             a.global     === b.global &&
+			             a.ignoreCase === b.ignoreCase &&
+			             a.multiline  === b.multiline;
+			    }
+			    
+			    // If a is not an object by this point, we can't handle it.
+			    if (atype !== 'object') { return false; }
+			    
+			    // Check for different array lengths before comparing contents.
+			    if (a.length && (a.length !== b.length)) { return false; }
+			    
+			    // Nothing else worked, deep compare the contents.
+			    var aKeys = this.keys(a), bKeys = this.keys(b);
+			    // Different object sizes?
+			    if (aKeys.length != bKeys.length) { return false; }
+			    // Recursive comparison of contents.
+			    for (var key in a) {
+			        if (!(key in b) || !this.isEqual(a[key], b[key])) { return false; }
+			    }
+			    return true;
+			},
+			
+			/**
+			 * Checks if an object is NaN
+			 * NaN happens to be the only object in Javascript that is not equal to itself.
+			 *
+			 * @method isNaN
+			 * @param obj Object to test
+			 *
+			 * @return {Boolean} Whether argument is NaN or not
+			 */
+			isNaN: function(obj) {
+			    /*jsl:ignore*/
+				return obj !== obj;
+				/*jsl:end*/
+			},
+			
+			/**
+			 * Checks if an object is a Regular Expression
+			 *
+			 * @method isRegExp
+			 * @param obj Object to test
+			 *
+			 * @return {Boolean} Whether argument is a RegExp or not
+			 */
+			isRegExp: function(obj) {
+				return !!(obj && obj.test && obj.exec && (obj.ignoreCase || obj.ignoreCase === false));
+			},
+			
+			/**
+			 * Checks if an object's value is equal to null
+			 *
+			 * @method isNull
+			 * @param obj Object to test
+			 *
+			 * @return {Boolean} Whether argument is equal to null or not
+			 */
+			isNull: function(obj) {
+				return obj === null;
+			},
+
+			/**
+			 * Checks if an object is equal to undefined
+			 *
+			 * @method isUndefined
+			 * @param obj Object to test
+			 *
+			 * @return {Boolean} Whether argument is equal to undefined or not
+			 */
+			isUndefined: function(obj) {
+				return (obj === undefined);
+			}
+		});
+	}
+);
+
diff --git a/docs/Data/sushi.utils.json.js b/docs/Data/sushi.utils.json.js new file mode 100644 index 0000000..81fed1b --- /dev/null +++ b/docs/Data/sushi.utils.json.js @@ -0,0 +1,39 @@ +define( + ['sushi.core', '../plugins/JSON', 'sushi.utils'], + + /** + * JSON handling functions + * @namespace Sushi.utils + * @class JSON + * @extends Sushi.utils + */ + function() { + /** + * Converts a JSON-formatted string into a Javascript literal object + * + * @param {String} string JSON-formatted string + * @return {Object} Well formatted JS literal + */ + var parse = function(string) { + return window.JSON.parse(string); + }, + + /** + * Converts a Javascript literal object into a well formatted JSON string + * + * @param {Object} literal Literal Notated Javascript Object + * @return {String} Well formatted JSON string + */ + stringify = function(literal) { + return window.JSON.stringify(literal); + }; + + Sushi.namespace('utils.JSON'); + + Sushi.extend(Sushi.utils.JSON, { + parse: parse, + stringify: stringify + }); + + } +); \ No newline at end of file diff --git a/docs/Data/sushi.utils.json.js.highlighted b/docs/Data/sushi.utils.json.js.highlighted new file mode 100644 index 0000000..85773c7 --- /dev/null +++ b/docs/Data/sushi.utils.json.js.highlighted @@ -0,0 +1,40 @@ +
define(
+	['sushi.core', '../plugins/JSON', 'sushi.utils'],
+	
+	/**
+	 * JSON handling functions
+	 * @namespace Sushi.utils
+	 * @class JSON
+	 * @extends Sushi.utils
+	 */
+	function() {	
+		/**
+		 * Converts a JSON-formatted string into a Javascript literal object
+		 *
+		 * @param {String} string JSON-formatted string
+		 * @return {Object} Well formatted JS literal
+		 */
+		var parse = function(string) {
+			return window.JSON.parse(string);
+		},
+		
+		/**
+		 * Converts a Javascript literal object into a well formatted JSON string
+		 *
+		 * @param {Object} literal Literal Notated Javascript Object
+		 * @return {String} Well formatted JSON string
+		 */
+		stringify = function(literal) {
+			return window.JSON.stringify(literal);
+		};
+		
+		Sushi.namespace('utils.JSON');
+		
+		Sushi.extend(Sushi.utils.JSON, {
+			parse: parse,
+			stringify: stringify
+		});
+		
+	}
+);
+
diff --git a/docs/Data/sushi.utils.lang.js b/docs/Data/sushi.utils.lang.js new file mode 100644 index 0000000..3cf29c4 --- /dev/null +++ b/docs/Data/sushi.utils.lang.js @@ -0,0 +1,48 @@ +define( + ['sushi.core', 'sushi.utils'], + + /** + * Language handling functions + * + * @namespace Sushi.utils + * @class Lang + * @extends Sushi.utils + * @requires Sushi.utils + */ + function() { + /** + * Converts every accented letter in a string with its non-accented equivalent. + * Currently WIP, trying to squeeze this function as much as possible. + * (≈3ms per string, with 2 calls ≈ 1.5ms per call) + * + * @param {String} string with accented characters + * @return {String} string without accented characters in lower case + */ + var replaceAccents = (function() { + var charList = /[àáâãçèéêìíîòóôõùúû]/gi, + lookupTable = { + "à": "a", "á": "a", "â": "a", "ã": "a", + "ç": "c", "è": "e", "é": "e", "ê": "e", + "í": "i", "ì": "i", "î": "i", "ó": "o", + "ò": "o", "ô": "o", "õ": "o", "ù": "u", + "ú": "u", "û": "u", "À": "A", "Á": "A", + "Â": "A", "Ã": "A", "Ç": "C", "È": "E", + "É": "E", "Ê": "E", "Í": "I", "Ì": "I", + "Î": "I", "Ó": "O", "Ò": "O", "Ô": "O", + "Õ": "O", "Ù": "U", "Ú": "U", "Û": "U" + }; + + return function(s) { + return s.replace(charList, function(match) { + return lookupTable[match]; + }); + }; + })(); + + + + Sushi.extend(Sushi.utils, { + replaceAccents: replaceAccents + }); + } +); \ No newline at end of file diff --git a/docs/Data/sushi.utils.lang.js.highlighted b/docs/Data/sushi.utils.lang.js.highlighted new file mode 100644 index 0000000..4b66d40 --- /dev/null +++ b/docs/Data/sushi.utils.lang.js.highlighted @@ -0,0 +1,49 @@ +
define(
+	['sushi.core', 'sushi.utils'],
+
+	/**
+	 * Language handling functions
+	 *
+	 * @namespace Sushi.utils
+	 * @class Lang
+	 * @extends Sushi.utils
+	 * @requires Sushi.utils
+	 */
+	function() {
+		/**
+		 * Converts every accented letter in a string with its non-accented equivalent.
+		 * Currently WIP, trying to squeeze this function as much as possible. 
+		 * (≈3ms per string, with 2 calls ≈ 1.5ms per call)
+		 *
+		 * @param {String} string with accented characters
+		 * @return {String} string without accented characters in lower case
+		 */
+		var replaceAccents = (function() {
+            var charList = /[àáâãçèéêìíîòóôõùúû]/gi,
+            lookupTable = {
+			    "à": "a", "á": "a",	"â": "a", "ã": "a",
+    			"ç": "c", "è": "e",	"é": "e", "ê": "e",
+    			"í": "i", "ì": "i",	"î": "i", "ó": "o",
+    			"ò": "o", "ô": "o",	"õ": "o", "ù": "u",
+    			"ú": "u", "û": "u",	"À": "A", "Á": "A",
+    			"Â": "A", "Ã": "A",	"Ç": "C", "È": "E",
+    			"É": "E", "Ê": "E",	"Í": "I", "Ì": "I",
+    			"Î": "I", "Ó": "O",	"Ò": "O", "Ô": "O",
+    			"Õ": "O", "Ù": "U",	"Ú": "U", "Û": "U" 
+            };
+		
+            return function(s) {
+               	return s.replace(charList, function(match) { 
+                   	return lookupTable[match]; 
+               	});
+		    };
+		})();
+		
+				
+
+		Sushi.extend(Sushi.utils, {
+			replaceAccents: replaceAccents
+		});
+	}
+);
+
diff --git a/docs/YUIdoc/CHANGES b/docs/YUIdoc/CHANGES new file mode 100644 index 0000000..86b9c38 --- /dev/null +++ b/docs/YUIdoc/CHANGES @@ -0,0 +1,10 @@ +ChangeLog +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Next + * added multi-language support + * improved international character support + * added known issues and workarounds + +1.0.0b1 + * Initial release diff --git a/docs/YUIdoc/INSTALL b/docs/YUIdoc/INSTALL new file mode 100644 index 0000000..9aad615 --- /dev/null +++ b/docs/YUIdoc/INSTALL @@ -0,0 +1,76 @@ +********************************************************************** +NOTE: 2009-10-27 -- there have been reports of easy_install trying +to pull Cheetah 2.4.0 and failing. If this occurs, download and +install version 2.2.2 (which is the current stable version): + +http://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.2.2.tar.gz#md5=e0d89113ab6bb0935d2b67395960264c +********************************************************************** + +One-time setup for python: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Unix (including cygwin): +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Check to see if setuptools is installed. + Execute this command: + which easy_install + + If it returns something, it's installed skip to step #3. + + +2. Install Setup Tools: + Extract the archive in ext and install the package + sudo python setup.py install (no sudo needed for cygwin or windows) + + setuptools + cd ext + tar xfvz setuptools-0.6c9.tar.gz + cd setuptools-0.6c9 + sudo python setup.py install + +3. Install the dependencies + + easy_install pygments + easy_install Cheetah + + * For Python version below 2.6.0, also install simplejson * + easy_install simplejson + + +4. Make a copy of yuidoc/bin/example.sh and modify the paths to suit your needs. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DOS/Windows: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Install Python + + * Use Python 2.4.3 as 2.5 generates warnings because the json parser has + not been updated yet: + + http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi + + * Extract each of the archives with WinZIP and install as described in + the unix section. + + * Copy _namemapper.pyd to C:\Python24\Lib\site-packages\Cheetah + + +2,3. Same as above + +4. Add C:\python24 to your PATH + +5. Copy yuidoc\bin\example.bat and modify the paths to suit your needs + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +See TAGS for a brief description of the supported tags. Checking out the +source for the YUI library is a good way to get to know how it works. Ex: +http://developer.yahoo.com/yui/docs/Event.js.html + +NOTE: This tool will generally work with code that has been commented for +jsdoc, with one exception: you must have at least one @module block defined +somewhere in your source. If you don't, the program will run but won't +generate anything. diff --git a/docs/YUIdoc/KNOWN_ISSUES b/docs/YUIdoc/KNOWN_ISSUES new file mode 100644 index 0000000..f050f2e --- /dev/null +++ b/docs/YUIdoc/KNOWN_ISSUES @@ -0,0 +1,26 @@ +************************************************************************** +Mapping Files to Modules: + +Because a single @module is supported for a set of files, the parser expects that all files in +the input directory belong to the same module. If multiple modules exist either in the source +directory or in any subdirectory, files may get mapped to modules incorrectly. + +For example: + +sourcedir/ + module1.js + module2.js + +sourcedir/ + module1/ + foo.js + module2/ + bar.js + +$ yuidoc.py sourcedir + +The workaround is to use the second pattern and pass the source directory for each module to yuidoc + +$ yuidoc.py module1 module2 + +************************************************************************** diff --git a/docs/YUIdoc/README b/docs/YUIdoc/README new file mode 100644 index 0000000..43110e8 --- /dev/null +++ b/docs/YUIdoc/README @@ -0,0 +1,69 @@ +yuidoc README + +yuidoc is a set of tools to generate the API documentation for the JavaScript +in the YUI library. The docs are derived completely from JavaDoc style +comment blocks; no attempt is made to understand the javascript itself. + +yuidoc requires Python 2.3+ with the following extensions: + simplejson - for reading and writing json (required for Python versions below 2.6.0) + cheetah - for generating the html docs + pygments - for colorizing the source + +The code for yuidoc is provided under a BSD license: + http://developer.yahoo.net/yui/license.html + +Project home page: + http://developer.yahoo.com/yui/yuidoc/ + +Source code: + http://github.com/yui/yuidoc + +Issue tracker: + http://yuilibrary.com/projects/yuidoc + + +Files: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +README + This file + +CHANGES + The change log + +INSTALL + Installation instructions + +KNOWN_ISSUES + Known issues and workarounds. + +TAGS + Supported tags + +license.txt + Open source license details. + +bin/yuidoc_parse.py + The comment block parser. Parses all javascript files in the the specified + directories and outputs a single file containing a json structure of the + parsed documentation. + +bin/yuidoc_highlight.py + Colorizes the script source + +bin/yuidoc_generate.py + Reads the json output from parser.py and generates HTML docs. + +bin/yuidoc.py + Wrapper for yuidoc_parse, yuidoc_highlight, and yuidoc_generate + +bin/example.sh + An example shell script to run both the parser and generator on a src tree + +bin/example.bat + An example batch for for DOS/Windows + +ext + External required packages, provided for convenience + + diff --git a/docs/YUIdoc/TAGS b/docs/YUIdoc/TAGS new file mode 100644 index 0000000..5687bd5 --- /dev/null +++ b/docs/YUIdoc/TAGS @@ -0,0 +1,135 @@ + +General Notes: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +--General Notes: + +* All comment blocks should have one, and only one, of the following tags: + module, class, property, method. If one is not supplied, the parser will + complain and the block will likely be skipped. + +* The four block types require a description. This description should appear + as the first thing in your comment block. + + /** + * My method description. Like other pieces of your comment blocks, + * this can span multiple lines. + * @method methodName + */ + + This might work too, but I have not tried it.. I like the other convention: + + /** + * @method methodName + * @description My method description. Like other pieces of your + * comment blocks, this can span multiple lines. + */ + +* It will warn about any tag that does not contain a description, with the + exception of the following: constructor, public, private, static + + +Supported Tags: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +@module modulename + Include one these blocks in one of your files for your util/widget. The + description will appear on the splash page. + + NOTE: At least one @module is required. Put one of these near the top + of your source and use it to describe your component. Do not combine + @module with @class. + +@namespace YAHOO.namespace + While it is optional to provide a namespace, it is recommended. This lets you + describe your class just with the name: YAHOO.util.Event -> Event. It only + needs to be included one time as long as this is the first file that is parsed. + Probably safer to put it in each file. + +@class ClassName + +@extends YAHOO.namespace.ClassName + +@property propertyName + +@config configName + similar to @property, but separates config items from normal properties + +@attribute configName + similar to @config, but also auto-generates the [event]Change and + the before[Event]Change events + +@method methodName + +@event + similar to @method, but no @return, and the @params define the signature + the listeners are executed with. + +@constructor + Only put this if the class can be instantiated + +@static + For classes, methods, properties, etc ... + Probably should have either @constructor or @static in the @class block + +@final + for constants (properties and read-only configs) + +@param {type} name description -or- +@param name {type} description + Supported in method blocks or class/constructor blocks. + +@for ClassName + Used to define an inner class: + /** + * An inner class + * @class foo + * @for OuterClass + */ + After the class is done, you need to inform the parser to start working on + the outer class again: + /** + * Another method for the outer class + * @method bar + * @for OuterClass + */ + +@return {type} description + for methods + +@type type + for properties and configs + +@see + This is barely supported at this point + +@deprecated explaination + The explaination does not need to be provided, but the parser will warn if + you don't. Usually you'll want to say what to use instead + +@public + Allowed to exist as a singular tag, but does nothing. Everthing is assumed + public unless marked private + +@private + Use to mark that the method/property should not be accessed by implementers + (even if it is accessible to them). By default, privates are not present + in the api docs. + +@protected + Use to indicate the method/property should not be accessed by implementers + unless they are subclassing. + +@requires module1, module2 + Supported in the @module declaration. The comma separated list of module + short names will eventually be matched against a lookup table when + cross-linking is supported + +@default + The default value of a property or config + +@uses YAHOO.namespace.ClassName [method1, method2] + For classes that use YAHOO.augment + The optional method/properties are not supported yet + + diff --git a/docs/YUIdoc/bin/const.py b/docs/YUIdoc/bin/const.py new file mode 100644 index 0000000..f601840 --- /dev/null +++ b/docs/YUIdoc/bin/const.py @@ -0,0 +1,82 @@ +''' +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.html +version: 1.0.0b1 +''' + +ACCESS='access' +ATTRIBUTE='attribute' +BEFORE='before' +BETA='beta' +BUBBLES='bubbles' +CANCELABLE='cancelable' +CHAINABLE='chainable' +CHANGEEVENT='Change' +CLASS='class' +CLASS_MAP='classmap' +CLASS_LIST='classlist' +CLASS_MODS='classmods' +CONFIG='config' +CONFIGS='configs' +CONSTRUCTOR='constructor' +CONSTRUCTORS='constructors' +DEFAULT='default' +DEPRECATED='deprecated' +DESCRIPTION='description' +EXPERIMENTAL='experimental' +EVENT='event' +EVENTS='events' +EXTENDS='extends' +FILE='file' +FILE_LIST='filelist' +FILE_MAP='filemap' +FILE_MARKER='filemarker' +FINAL='final' +FOR='for' +FUNCTION='function' +GLOBAL='global' +GUESSEDNAME='guessedname' +GUESSEDTYPE='guessedtype' +HASEVENTS='hasevents' +HOST='host' +IGNORE_PATTERNS = ('*.pyc','CVS','^.git','.svn') +LONGNAME='longname' +LOGCONFIG='yuidoclog.conf' +METHOD='method' +METHODS='methods' +MAJOR_VERSION='majorversion' +MODULE='module' +MODULE_PREFIX='module_' +MODULES='modules' +NAME='name' +NAMESPACE='namespace' +NAMESPACES='namespaces' +NBWS=' ' +OBJECT='object' +OPTIONAL='optional' +PARAM='param' +PARAMS='params' +PRIVATE='private' +PREVENTABLE='preventable' +PROPERTY='property' +PROPERTIES='properties' +PROTECTED='protected' +READONLY='readonly' # readonly is static for config properties +REQUIRES='requires' +RETURN='return' +SHORTNAME='shortname' +SUBMODULE='submodule' +SUBMODULES='submodules' +SUBDATA='subdata' +SUPERCLASS='superclass' +SEE='see' +STATIC='static' +TITLE='title' +TYPE='type' +UNKNOWN='unknown' +URL='url' +USES='uses' +VERSION='version' +VOID='void' +WRITEONCE='writeonce' diff --git a/docs/YUIdoc/bin/const.pyc b/docs/YUIdoc/bin/const.pyc new file mode 100644 index 0000000..34e3af9 Binary files /dev/null and b/docs/YUIdoc/bin/const.pyc differ diff --git a/docs/YUIdoc/bin/example.bat b/docs/YUIdoc/bin/example.bat new file mode 100644 index 0000000..f414dab --- /dev/null +++ b/docs/YUIdoc/bin/example.bat @@ -0,0 +1,32 @@ +@ECHO OFF + +REM ########################################################################## + +REM The location of your yuidoc install +SET yuidoc_home=c:\home\www\yuidoc\yuidoc + +REM The location of the files to parse. Parses subdirectories, but will fail if +REM there are duplicate file names in these directories. You can specify multiple +REM source trees: +REM SET parser_in="c:\home\www\yahoo.dev\src\js c:\home\www\Event.dev\src" +SET parser_in=c:\home\www\yahoo.dev\src\js + +REM The location to output the parser data. This output is a file containing a +REM json string, and copies of the parsed files. +SET parser_out=c:\home\www\docs\parser + +REM The directory to put the html file outputted by the generator +SET generator_out=c:\home\www\docs\generator + +REM The location of the template files. Any subdirectories here will be copied +REM verbatim to the destination directory. +SET template=%yuidoc_home%\template + +REM The project version that will be displayed in the documentation. +SET version="1.0.0" + +REM The version of YUI the project uses. +SET yuiversion="2" + +"%yuidoc_home%\bin\yuidoc.py" "%parser_in%" -p "%parser_out%" -o "%generator_out%" -t "%template%" -v %version% -Y %yuiversion% + diff --git a/docs/YUIdoc/bin/example.sh b/docs/YUIdoc/bin/example.sh new file mode 100755 index 0000000..f443623 --- /dev/null +++ b/docs/YUIdoc/bin/example.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# The location of your yuidoc install +yuidoc_home=~/Projects/yuidoc + +# The location of the files to parse. Parses subdirectories, but will fail if +# there are duplicate file names in these directories. You can specify multiple +# source trees: +# parser_in="%HOME/www/yui/src %HOME/www/event/src" +parser_in="$HOME/Desktop/" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out="$HOME/Desktop/RSS/" + +# The directory to put the html file outputted by the generator +generator_out="$HOME/Desktop/RSS" + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template/dana + +# The version of your project to display within the documentation. +version=2.0.0 + +# The version of YUI the project is using. This effects the output for +# YUI configuration attributes. This should start with '2' or '3'. +yuiversion=2 + +############################################################################## +# add -s to the end of the line to show items marked private + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -Y $yuiversion diff --git a/docs/YUIdoc/bin/yuidoc.py b/docs/YUIdoc/bin/yuidoc.py new file mode 100755 index 0000000..911a1a9 --- /dev/null +++ b/docs/YUIdoc/bin/yuidoc.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# vim: et sw=4 ts=4 + +''' +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.html +version: 1.0.0b1 +''' + +import yuidoc_parse, yuidoc_highlight, yuidoc_generate + +def main(): + from optparse import OptionParser + optparser = OptionParser("usage: %prog inputdir [options] inputdir") + optparser.set_defaults(extension=".js", + newext=".highlighted", + parseroutdir="/tmp", + outputdir="docs", + parserfile="parsed.json", + showprivate=False, + project="Yahoo! UI Library", + version="", + copyrighttag="Yahoo! Inc.", + projecturl="http://developer.yahoo.com/yui/", + yuiversion=False, + ydn=False + ) + optparser.add_option( "-p", "--parseroutdir", + action="store", dest="parseroutdir", type="string", + help="Directory to write the parser temp data" ) + optparser.add_option( "-o", "--outputdir", + action="store", dest="outputdir", type="string", + help="Directory to write the html documentation" ) + optparser.add_option( "-f", "--file", + action="store", dest="parserfile", type="string", + help="The name of the file that contains the JSON doc info" ) + optparser.add_option( "-t", "--template", + action="store", dest="templatedir", type="string", + help="The directory containing the html tmplate" ) + optparser.add_option( "-c", "--crosslink", + action="store", dest="crosslinkdir", type="string", + help="The directory containing json data for other modules to crosslink" ) + optparser.add_option( "-C", "--copyright", + action="store", dest="copyrighttag", type="string", + help="The name to use in the copyright line at the bottom of the pages." ) + optparser.add_option( "-s", "--showprivate", + action="store_true", dest="showprivate", + help="Should private properties/methods be in the docs?" ) + optparser.add_option( "-e", "--extension", + action="store", dest="extension", type="string", + help="The extension to parse" ) + optparser.add_option( "-n", "--newextension", + action="store", dest="newext", type="string", + help="The extension to append to the yuisyntax highlighted output file" ) + optparser.add_option( "-m", "--project", + action="store", dest="project", type="string", + help="The name of the project" ) + optparser.add_option( "-v", "--version", + action="store", dest="version", type="string", + help="The version of the project" ) + + optparser.add_option( "-u", "--projecturl", + action="store", dest="projecturl", type="string", + help="The project url" ) + + optparser.add_option( "-Y", "--yuiversion", + action="store", dest="yuiversion", type="string", + help="The version of YUI library used in the project. This parameter applies to the output for attributes, which differs between YUI2 and YUI3." ) + + optparser.add_option( "-y", "--ydn", + action="store_true", dest="ydn", + help="Add YDN MyBlogLog intrumentation?" ) + + (opts, inputdirs) = optparser.parse_args() + + if len(inputdirs) > 0: + docparser = yuidoc_parse.DocParser( inputdirs, + opts.parseroutdir, + opts.parserfile, + opts.extension, + opts.version, + opts.yuiversion + ) + + highlighter = yuidoc_highlight.DocHighlighter( [opts.parseroutdir], + opts.parseroutdir, + opts.extension, + opts.newext ) + + gen = yuidoc_generate.DocGenerator( opts.parseroutdir, + opts.parserfile, + opts.outputdir, + opts.templatedir, + opts.newext, + opts.showprivate, + opts.project, + opts.version, + opts.projecturl, + opts.ydn, + opts.copyrighttag + ) + gen.process() + else: + optparser.error("Incorrect number of arguments") + +if __name__ == '__main__': + main() + diff --git a/docs/YUIdoc/bin/yuidoc_generate.py b/docs/YUIdoc/bin/yuidoc_generate.py new file mode 100755 index 0000000..4ca6b3c --- /dev/null +++ b/docs/YUIdoc/bin/yuidoc_generate.py @@ -0,0 +1,814 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# vim: et sw=4 ts=4 + +''' +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.html +version: 1.0.0b1 +''' + +''' Prints documentation with htmltmpl from the json data outputted by parser.py ''' + +try: + import json as simplejson +except: + import simplejson + +import os, re, shutil, logging, logging.config, time, datetime + +from const import * +# from cStringIO import StringIO +from Cheetah.Template import Template +from sets import Set +import codecs + +try: + logging.config.fileConfig(os.path.join(sys.path[0], LOGCONFIG)) +except: + pass + +log = logging.getLogger('yuidoc.generate') + + +class DocGenerator(object): + + def __init__(self, inpath, datafile, outpath, templatepath, newext, showprivate=False, + projectname='Yahoo! UI Library', + version='', + projecturl='http://developer.yahoo.com/yui/', + ydn=False, copyrighttag='Yahoo! Inc.'): + + def _mkdir(newdir): + if os.path.isdir(newdir): pass + elif os.path.isfile(newdir): + raise OSError("a file with the same name as the desired " \ + "dir, '%s', already exists." % newdir) + else: + head, tail = os.path.split(newdir) + if head and not os.path.isdir(head): _mkdir(head) + if tail: os.mkdir(newdir) + + + self.moduleprefix = MODULE_PREFIX + self.inpath = os.path.abspath(inpath) + + # set and output path, create if needed + self.outpath = os.path.abspath(outpath) + self.newext = newext + _mkdir(self.outpath) + + self.templatepath = os.path.abspath(templatepath) + + # copy all of the directories from the template directory to the + # destination directory. + for i in os.listdir(self.templatepath): + fullname = os.path.join(self.templatepath, i) + if os.path.isdir(fullname): + targetdir = os.path.join(self.outpath, i) + try: + shutil.rmtree(targetdir) + except: pass + # requires 2.6 + # shutil.copytree(fullname, targetdir, ignore=shutil.ignore_patterns(IGNORE_PATTERNS)) + shutil.copytree(fullname, targetdir) + + self.showprivate = showprivate + + f = codecs.open(os.path.join(inpath, datafile), "r", "utf-8" ) + self.rawdata = f.read() + + # log.info('INPUT DATA: ' + self.rawdata) + + d = self.data = simplejson.loads(self.rawdata) + + self.projectname = projectname + self.projecturl = projecturl + self.copyrighttag = copyrighttag + self.ydn = ydn + self.version = version + self.modulename = "" + self.timestamp = "" # if supplied, linked script and css will have a timestamp appended to the url for cache busting + self.moduletitle = "" + self.moduledesc = "Please supply a module block somewhere in your code" + # self.requires = None + self.modules = d[MODULES] + self.modulenames = self.modules.keys() + self.modulenames.sort(lambda x,y: cmp(x.lower(), y.lower())) + self.cleansedmodulenames = {} + + for mod in self.modulenames: + self.cleansedmodulenames[mod] = self.cleanseStr(mod) + + self.cleansedmodulename = self.cleanseStr(self.modulename) + + self.classname = "" + self.filename = "" + self.pagetype = "" + self.classmap = d[CLASS_MAP] + self.classnames = "" + self.filenames = "" + self.allprops = [] + self.allprops_ext = [] + + + def cleanseStr(self, strg): + cleanregex= re.compile(r"[^\w\-]") + cleansed = cleanregex.sub('', strg.lower()) + # log.warn('cleansed module: %s' %(cleansed)); + return self.moduleprefix + cleansed + + def write(self, filename, data, template=True): + out = codecs.open( os.path.join(self.outpath, filename), "w", "utf-8" ) + + if template: + datastr = data.respond() + out.write(datastr) + else: + out.write(data) + + out.close() + + def process(self): + + def assignGlobalProperties(template): + template.projectname = self.projectname + template.projecturl = self.projecturl + template.copyrighttag = self.copyrighttag + template.ydn = self.ydn + template.version = self.version + template.modules = self.modules + template.modulenames = self.modulenames + template.cleansedmodulenames = self.cleansedmodulenames + template.modulename = self.modulename + template.moduletitle = self.moduletitle + template.cleansedmodulename = self.cleansedmodulename + template.moduledesc = self.moduledesc + + template.year = datetime.date.today().strftime('%Y') + + template.filename = self.filename + if self.filename: + template.filepath = os.path.join(self.inpath, self.filename) + template.highlightcontent = codecs.open(os.path.join(self.inpath, self.filename + self.newext), "r", "utf-8" ).read() + + template.pagetype = self.pagetype + template.classmap = self.classmap + template.classnames = self.classnames + template.filenames = self.filenames + template.classname = self.classname + template.requires = "" + template.optional = "" + template.properties = "" + template.methods = "" + template.events = "" + template.configs = "" + template.extends = "" + template.uses = "" + template.index = False # is this the index page + + def transferToTemplate(prop, dict, template, valOverride=''): + val = "" + if prop in dict: + val = dict[prop] + + if valOverride: + val = valOverride + + setattr(template, prop, val) + + def transferToDict(prop, dict1, dict2, default="", skipOverrideIfNoMatch=False): + val = "" + if prop in dict1: + val = dict1[prop] + if not val: + val = default + else: + if skipOverrideIfNoMatch: + pass + else: + val = default + + dict2[prop] = val + + def shouldShow(item): + if STATIC not in item and \ + (self.showprivate or PRIVATE not in item): + return True + else: + return False + + def shouldShowClass(item): + if self.showprivate or PRIVATE not in item: + return True + else: + return False + + def soft_sort(x, y): + return cmp(x.lower(), y.lower()) + + + def getPropsFromSuperclass(superc, classes, dict): + # get inherited data + if shouldShowClass(superc): + supercname = superc[NAME] + if PROPERTIES in superc: + inhdef = dict[PROPERTIES][supercname] = [] + keys = superc[PROPERTIES].keys() + keys.sort(soft_sort) + for prop in keys: + superprop = superc[PROPERTIES][prop] + if shouldShow(superprop): + if PRIVATE in superprop: access = PRIVATE + elif PROTECTED in superprop: access = PROTECTED + else:access = "" + inhdef.append({NAME: prop, ACCESS: access, DEPRECATED: DEPRECATED in superprop}) + if METHODS in superc: + inhdef = dict[METHODS][supercname] = [] + keys = superc[METHODS].keys() + keys.sort(soft_sort) + for method in keys: + supermethod = superc[METHODS][method] + if shouldShow(supermethod): + if PRIVATE in supermethod: access = PRIVATE + elif PROTECTED in supermethod: access = PROTECTED + else:access = "" + inhdef.append({NAME: method, ACCESS: access, DEPRECATED: DEPRECATED in supermethod}) + if EVENTS in superc: + inhdef = dict[EVENTS][supercname] = [] + keys = superc[EVENTS].keys() + keys.sort(soft_sort) + for event in keys: + superevent = superc[EVENTS][event] + if shouldShow(superevent): + # inhdef.append(event) + if PRIVATE in superevent: access = PRIVATE + elif PROTECTED in superevent: access = PROTECTED + else:access = "" + inhdef.append({NAME: event, ACCESS: access, DEPRECATED: DEPRECATED in superevent}) + if CONFIGS in superc: + inhdef = dict[CONFIGS][supercname] = [] + keys = superc[CONFIGS].keys() + keys.sort(soft_sort) + for config in keys: + superconfig = superc[CONFIGS][config] + if shouldShow(superconfig): + #inhdef.append(config) + if PRIVATE in superconfig: access = PRIVATE + elif PROTECTED in superconfig: access = PROTECTED + else:access = "" + inhdef.append({NAME: config, ACCESS: access, DEPRECATED: DEPRECATED in superconfig}) + + if EXTENDS in superc: + supercname = superc[EXTENDS] + if supercname in classes: + getPropsFromSuperclass(classes[supercname], classes, dict) + + if USES in superc: + for supercname in superc[USES]: + if supercname in classes: + getPropsFromSuperclass(classes[supercname], classes, dict) + + # build url: class, property, type + def getUrl(c, p, t=''): + return "%s.html#%s_%s" %(c, t, p) + + #sort is case insensitive and ignores puctuation for the search json file + def allprop_sort(x, y): + pat = re.compile(r"[\_\-\.]") + cx = x[NAME].lower() + cy = y[NAME].lower() + cx = pat.sub('', cx) + cy = pat.sub('', cy) + return cmp(cx, cy) + + def completeProp(main, ext): + data = main.copy() + if DESCRIPTION in ext: + data[DESCRIPTION] = ext[DESCRIPTION] + else: + data[DESCRIPTION] = '' + + if PARAMS in ext: + params = ext[PARAMS] + count = 0 + result = [] + itemtemplate = '%s <%s> %s' + for p in params: + if count > 0: + result.append(', ') + result.append(itemtemplate % (p[NAME] or 'unknown', p[TYPE] or 'Object', p[DESCRIPTION] or '')) + count+=1 + + data[PARAMS] = ''.join(result) + else: + data[PARAMS] = '' + + return data + + + log.info("-------------------------------------------------------") + + # copy the json file + # jsonname = self.cleansedmodulename + ".json" + jsonname = "raw.json" + log.info("Writing " + jsonname) + self.write(jsonname, self.rawdata, False) + + for mname in self.modules: + log.info("Generating module splash for %s" %(mname)) + + m = self.modules[mname] + self.filename = "" + self.classname = "" + classes = self.data[CLASS_MAP] + self.classnames = [] + + for i in m[CLASS_LIST]: + if shouldShowClass(classes[i]): + self.classnames.append(i) + + self.classnames.sort(soft_sort) + + t = Template(file=os.path.join(self.templatepath, "main.tmpl")) + + # @TODO add command line option for timestamp + # timestamp = time.time() + timestamp = "" + t.timestamp = timestamp + + transferToTemplate(REQUIRES, m, t) + + self.modulename = mname + self.moduletitle = mname + if TITLE in m: + self.moduletitle = m[TITLE] + self.cleansedmodulename = self.cleanseStr(mname) + + if DESCRIPTION in m: + self.moduledesc = m[DESCRIPTION] + else: + log.warn("Missing module description for " + mname) + self.moduledesc = '' + + self.filenames = m[FILE_LIST] + self.filenames.sort(soft_sort) + + assignGlobalProperties(t) + + transferToTemplate(REQUIRES, m, t) + transferToTemplate(OPTIONAL, m, t) + + transferToTemplate(BETA, m, t, "Beta") + transferToTemplate(EXPERIMENTAL, m, t, "Experimental") + + if len(m[SUBMODULES]) > 0: + strg = ', '.join(m[SUBMODULES]) + else: + strg = 'none' + + transferToTemplate(SUBMODULES, m, t, strg) + t.submodules = m[SUBMODULES] + + transferToTemplate(SUBDATA, m, t, '') + t.subdata = m[SUBDATA] + + + moduleprops = [] + classList = [] + + # class API view + #for i in classes: + for i in m[CLASS_LIST]: + self.classname = i + c = classes[i] + if shouldShowClass(c): + log.info("Generating API page for " + i) + assignGlobalProperties(t) + + # template items that need default vaules even if not included + transferToTemplate( SEE, c, t ) + transferToTemplate( DEPRECATED, c, t ) + transferToTemplate( DESCRIPTION, c, t ) + transferToTemplate( STATIC, c, t ) + if STATIC in c: t.static = STATIC + transferToTemplate( FINAL, c, t ) + if FINAL in c: t.final = FINAL + transferToTemplate( ACCESS, c, t ) + if PRIVATE in c: t.access = PRIVATE + elif PROTECTED in c: t.access = PROTECTED + + desc = '' + if DESCRIPTION in c: + desc = c[DESCRIPTION] + + + #subclasses + subclasses = self.subclasses = [] + for j in classes: + if SUPERCLASS in classes[j] and classes[j][SUPERCLASS] == i: + subclasses.append(j) + + t.subclasses = subclasses + + gName = i.replace('YAHOO.widget.', ''); + gName = gName.replace('YAHOO.util.', ''); + classInfo = { DESCRIPTION: desc, NAME: i, GUESSEDNAME: gName, EXTENDS: [] } + + + # Properties/fields + props = t.properties = [] + if PROPERTIES in c: + keys = c[PROPERTIES].keys() + keys.sort(soft_sort) + for propertykey in keys: + prop = c[PROPERTIES][propertykey] + if self.showprivate or PRIVATE not in prop: + propdata = { + NAME: propertykey, + HOST: i, + TYPE: 'property', + URL: getUrl(i, propertykey, PROPERTY) + } + + transferToDict( ACCESS, prop, propdata ) + if PRIVATE in prop: propdata[ACCESS] = PRIVATE + elif PROTECTED in prop: propdata[ACCESS] = PROTECTED + + self.allprops.append(propdata.copy()) + # completeProp(propdata, prop) + self.allprops_ext.append(completeProp(propdata, prop)) + + moduleprops.append(propdata.copy()) + + transferToDict( TYPE, prop, propdata, OBJECT ) + transferToDict( DESCRIPTION, prop, propdata ) + transferToDict( DEFAULT, prop, propdata ) + transferToDict( DEPRECATED, prop, propdata, NBWS, DEPRECATED ) + transferToDict( SEE, prop, propdata ) + transferToDict( STATIC, prop, propdata ) + if STATIC in prop: propdata[STATIC] = STATIC + transferToDict( FINAL, prop, propdata ) + if FINAL in prop: propdata[FINAL] = FINAL + props.append(propdata) + + + # Methods + methods = t.methods = [] + if METHODS in c: + keys = c[METHODS].keys() + keys.sort(soft_sort) + for methodkey in keys: + method = c[METHODS][methodkey] + if self.showprivate or PRIVATE not in method: + methoddata = {NAME: methodkey, HOST: i, TYPE: 'method', URL:getUrl(i, methodkey, METHOD)} + + transferToDict( ACCESS, method, methoddata ) + if PRIVATE in method: methoddata[ACCESS] = PRIVATE + elif PROTECTED in method: methoddata[ACCESS] = PROTECTED + + self.allprops.append(methoddata.copy()) + # completeProp(methodData, method) + self.allprops_ext.append(completeProp(methoddata, method)) + moduleprops.append(methoddata.copy()) + + transferToDict( DESCRIPTION, method, methoddata ) + transferToDict( DEPRECATED, method, methoddata, NBWS, DEPRECATED ) + transferToDict( SEE, method, methoddata ) + transferToDict( STATIC, method, methoddata ) + if STATIC in method: methoddata[STATIC] = STATIC + transferToDict( FINAL, method, methoddata ) + if FINAL in method: methoddata[FINAL] = FINAL + + transferToDict( CHAINABLE, method, methoddata ) + if CHAINABLE in method: methoddata[CHAINABLE] = CHAINABLE + + ret = methoddata[RETURN] = {NAME:"", DESCRIPTION:"", TYPE:VOID} + if RETURN in method: + transferToDict( TYPE, method[RETURN], ret, "" ) + transferToDict( DESCRIPTION, method[RETURN], ret ) + + params = methoddata[PARAMS] = [] + if PARAMS in method: + mp = method[PARAMS] + for p in mp: + param = {} + transferToDict( NAME, p, param, UNKNOWN ) + transferToDict( TYPE, p, param, OBJECT ) + transferToDict( DESCRIPTION, p, param ) + params.append(param) + + methods.append(methoddata) + + # Events + events = t.events = [] + if EVENTS in c: + keys = c[EVENTS].keys() + keys.sort(soft_sort) + for eventkey in keys: + event = c[EVENTS][eventkey] + if self.showprivate or PRIVATE not in event: + eventdata = { + NAME: eventkey, + HOST: i, + TYPE: 'event', + URL: getUrl(i, eventkey, EVENT) + } + + transferToDict( ACCESS, event, eventdata ) + if PRIVATE in event: eventdata[ACCESS] = PRIVATE + elif PROTECTED in event: eventdata[ACCESS] = PROTECTED + + self.allprops.append(eventdata.copy()) + # completeProp(eventdata, event) + self.allprops_ext.append(completeProp(eventdata, event)) + + moduleprops.append(eventdata.copy()) + + transferToDict( DESCRIPTION, event, eventdata ) + transferToDict( DEPRECATED, event, eventdata, NBWS, DEPRECATED ) + transferToDict( SEE, event, eventdata ) + transferToDict( STATIC, event, eventdata ) + if STATIC in event: eventdata[STATIC] = STATIC + transferToDict( FINAL, event, eventdata ) + if FINAL in event: eventdata[FINAL] = FINAL + + transferToDict( BUBBLES, event, eventdata ) + #Bubbles should contain a classname to bubble to + #if BUBBLES in event: eventdata[BUBBLES] = BUBBLES + + transferToDict( PREVENTABLE, event, eventdata ) + #preventable should contain a default method + #Bug #20 + #if PREVENTABLE in event: eventdata[PREVENTABLE] = PREVENTABLE + + transferToDict( CANCELABLE, event, eventdata ) + if CANCELABLE in event: eventdata[CANCELABLE] = CANCELABLE + + params = eventdata[PARAMS] = [] + if PARAMS in event: + mp = event[PARAMS] + for p in mp: + param = {} + transferToDict( NAME, p, param, UNKNOWN ) + transferToDict( TYPE, p, param, OBJECT ) + transferToDict( DESCRIPTION, p, param ) + params.append(param) + + events.append(eventdata) + + # configs + configs = t.configs = [] + if CONFIGS in c: + keys = c[CONFIGS].keys() + keys.sort(soft_sort) + for configkey in keys: + config = c[CONFIGS][configkey] + if self.showprivate or PRIVATE not in config: + configdata = {NAME: configkey, HOST: i, TYPE: 'config', URL:getUrl(i, configkey, CONFIG)} + + transferToDict( ACCESS, config, configdata ) + if PRIVATE in config: configdata[ACCESS] = PRIVATE + elif PROTECTED in config: configdata[ACCESS] = PROTECTED + + self.allprops.append(configdata.copy()) + + # completeProp(configdata, config) + self.allprops_ext.append(completeProp(configdata, config)) + + moduleprops.append(configdata.copy()) + + transferToDict( TYPE, config, configdata, OBJECT ) + transferToDict( DESCRIPTION, config, configdata ) + transferToDict( DEFAULT, config, configdata ) + transferToDict( DEPRECATED, config, configdata, NBWS, DEPRECATED ) + transferToDict( SEE, config, configdata ) + transferToDict( STATIC, config, configdata ) + if STATIC in config: configdata[STATIC] = STATIC + transferToDict( FINAL, config, configdata ) + if FINAL in config: configdata[FINAL] = READONLY + transferToDict( WRITEONCE, config, configdata ) + if WRITEONCE in config: configdata[WRITEONCE] = WRITEONCE + configs.append(configdata) + + # get inherited data + inherited = t.inherited = {PROPERTIES:{}, METHODS:{}, EVENTS:{}, CONFIGS:{}, SUPERCLASS: {} } + if EXTENDS in c: + supercname = t.extends = c[EXTENDS] + if supercname in classes: + superc = classes[supercname] + getPropsFromSuperclass(superc, classes, inherited) + + if USES in c: + for supercname in c[USES]: + t.uses = c[USES] + if supercname in classes: + superc = classes[supercname] + getPropsFromSuperclass(superc, classes, inherited) + + #Create the superclass chain and attach it to the classInfo Object + extends = {} + for i in inherited: + for a in inherited[i]: + extends[a] = a + + inherited[SUPERCLASS] = extends + classInfo[EXTENDS] = inherited + classList.append(classInfo) + + # Constructor -- technically the parser can take multiple constructors + # but that does't help here + constructordata = t.constructor = {} + if CONSTRUCTORS in c: + constructor = c[CONSTRUCTORS][0] + transferToDict( DESCRIPTION, constructor, constructordata ) + ret = constructordata[RETURN] = {} + if RETURN in constructor: + transferToDict( TYPE, constructor[RETURN], ret, VOID ) + transferToDict( DESCRIPTION, constructor[RETURN], ret ) + + params = constructordata[PARAMS] = [] + if PARAMS in constructor: + cp = constructor[PARAMS] + for p in cp: + param = {} + transferToDict( NAME, p, param, UNKNOWN ) + transferToDict( TYPE, p, param, OBJECT ) + transferToDict( DESCRIPTION, p, param ) + params.append(param) + + + # write module splash + moduleprops.sort(allprop_sort) + t.allprops_raw = moduleprops + moduleprops_json = simplejson.dumps(moduleprops, ensure_ascii=False) + t.allprops = moduleprops_json + classList.sort(allprop_sort) + t.classList_raw = classList + t.classList = simplejson.dumps(classList, ensure_ascii=False) + self.write("%s.html" %(self.classname), t) + + # clear out class name + self.classname = "" + t.classname = "" + t.filename = "" + t.properties = "" + t.methods = "" + t.events = "" + t.configs = "" + + + # write module splash + moduleprops.sort(allprop_sort) + t.allprops_raw = moduleprops + moduleprops_json = simplejson.dumps(moduleprops, ensure_ascii=False) + t.allprops = moduleprops_json + + # log.warn('cleansed module file name: %s' %(t.cleansedmodulename)); + self.write( t.cleansedmodulename + ".html", t) + + # class source view + for i in m[FILE_LIST]: + log.info("Generating source view for " + i) + self.filename = i + assignGlobalProperties(t) + self.write("%s.html" %(self.filename), t) + + + #remove dups + allprops = [] + propmap = {} + for i in self.allprops: + # for i in self.allprops_ext: + url = i[URL] + if url not in propmap: + allprops.append(i) + propmap[url] = True + + allprops.sort(allprop_sort) + + # self.allprops_ext.sort(allprop_sort) + + allprops_json = simplejson.dumps(allprops, ensure_ascii=False) + self.write("index.json", allprops_json, False) + + # index + log.info("Generating index") + t = Template(file=os.path.join(self.templatepath, "main.tmpl")) + # @TODO add command line option for timestamp + # timestamp = time.time() + timestamp = "" + t.timestamp = timestamp + self.modulename = "" + self.moduletitle = "" + self.classname = "" + self.classnames = [] + + for i in self.data[CLASS_MAP].keys(): + if shouldShowClass(self.data[CLASS_MAP][i]): + self.classnames.append(i) + self.classnames.sort(soft_sort) + + self.filenames = self.data[FILE_MAP].keys() + self.filenames.sort(soft_sort) + self.filename = "" + assignGlobalProperties(t) + t.allprops = allprops_json + t.index = True + self.write("index.html", t) + + + # map all classes to the corresponding module for external loaders + t = Template(file=os.path.join(self.templatepath, "classmap.tmpl")) + # @TODO add command line option for timestamp + # timestamp = time.time() + timestamp = "" + t.timestamp = timestamp + pkgMap = {} + keys = self.data[CLASS_MAP].keys() + keys.sort() + for i in keys: + + try: + pkgMap[i] = self.data[CLASS_MAP][i][MODULE] + except: + try: + log.warn('class map ' + i + ' failure (no module declaration?)') + except: pass + + t.pkgmap = simplejson.dumps(pkgMap, ensure_ascii=False) + self.write("classmap.js", t) + + + log.info(" ") + log.info("Done\n") + + +def main(): + from optparse import OptionParser + optparser = OptionParser("usage: %prog inputdir [options] inputdir") + optparser.set_defaults(outputdir="docs", + inputfile="parsed.json", + newext=".highlighted", + showprivate=False, + project="Yahoo! UI Library", + version="" + ) + optparser.add_option( "-o", "--outputdir", + action="store", dest="outputdir", type="string", + help="Directory to write the html documentation" ) + optparser.add_option( "-f", "--file", + action="store", dest="inputfile", type="string", + help="The name of the file that contains the JSON doc info" ) + optparser.add_option( "-t", "--template", + action="store", dest="templatedir", type="string", + help="The directory containing the html tmplate" ) + optparser.add_option( "-c", "--crosslink", + action="store", dest="crosslinkdir", type="string", + help="The directory containing json data for other modules to crosslink" ) + optparser.add_option( "-C", "--copyright", + action="store", dest="copyrighttag", type="string", + help="The name to use in the copyright line at the bottom of the pages." ) + optparser.add_option( "-s", "--showprivate", + action="store_true", dest="showprivate", + help="Should private properties/methods be in the docs?" ) + optparser.add_option( "-n", "--newextension", + action="store", dest="newext", type="string", + help="The extension to append to the syntax output file" ) + optparser.add_option( "-m", "--project", + action="store", dest="project", type="string", + help="The name of the project" ) + optparser.add_option( "-v", "--version", + action="store", dest="version", type="string", + help="The version of the project" ) + + optparser.add_option( "-u", "--projecturl", + action="store", dest="projecturl", type="string", + help="The project url" ) + optparser.add_option( "-y", "--ydn", + action="store_true", dest="ydn", + help="Add YDN MyBlogLog intrumentation?" ) + + + (options, inputdirs) = optparser.parse_args() + + if len(inputdirs) > 0: + generator = DocGenerator( inputdirs[0], + options.inputfile, + options.outputdir, + options.templatedir, + options.showprivate, + options.project, + options.version, + options.projecturl, + options.ydn, + options.copyrighttag + ) + generator.process() + else: + optparser.error("Incorrect number of arguments") + +if __name__ == '__main__': + main() + diff --git a/docs/YUIdoc/bin/yuidoc_generate.pyc b/docs/YUIdoc/bin/yuidoc_generate.pyc new file mode 100755 index 0000000..a30e01a Binary files /dev/null and b/docs/YUIdoc/bin/yuidoc_generate.pyc differ diff --git a/docs/YUIdoc/bin/yuidoc_highlight.py b/docs/YUIdoc/bin/yuidoc_highlight.py new file mode 100755 index 0000000..d766883 --- /dev/null +++ b/docs/YUIdoc/bin/yuidoc_highlight.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# vim: et sw=4 ts=4 + +''' +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.html +version: 1.0.0b1 +''' + +import os, re, string, logging, logging.config +from const import * +from optparse import OptionParser +from pygments import highlight +from pygments.formatters import HtmlFormatter +import codecs + +try: + logging.config.fileConfig(os.path.join(sys.path[0], LOGCONFIG)) +except: + pass + +log = logging.getLogger('yuidoc.highlight') + + +class DocHighlighter(object): + + def __init__(self, inputdirs, outputdir, ext, newext): + + def _mkdir(newdir): + if os.path.isdir(newdir): pass + elif os.path.isfile(newdir): + raise OSError("a file with the same name as the desired " \ + "dir, '%s', already exists." % newdir) + else: + head, tail = os.path.split(newdir) + if head and not os.path.isdir(head): _mkdir(head) + if tail: os.mkdir(newdir) + + def highlightString(src): + try: + if self.currentExt == 'php': + from pygments.lexers import PhpLexer + return highlight(src, PhpLexer(), HtmlFormatter()) + elif self.currentExt == 'py': + from pygments.lexers import PythonLexer + return highlight(src, PythonLexer(), HtmlFormatter()) + elif self.currentExt == 'rb': + from pygments.lexers import RubyLexer + return highlight(src, RubyLexer(), HtmlFormatter()) + elif self.currentExt == 'pl': + from pygments.lexers import PerlLexer + return highlight(src, PerlLexer(), HtmlFormatter()) + elif self.currentExt == 'java': + from pygments.lexers import JavaLexer + return highlight(src, JavaLexer(), HtmlFormatter()) + elif self.currentExt == 'cs': + from pygments.lexers import CSharpLexer + return highlight(src, CSharpLexer(), HtmlFormatter()) + else: + from pygments.lexers import JavascriptLexer + return highlight(src, JavascriptLexer(), HtmlFormatter()) + except: + return "File could not be highlighted" + + def highlightFile(path, file): + f=open(os.path.join(path, file)) + fileStr = codecs.open( os.path.join(path, file), "r", "utf-8" ).read() + + f.close() + log.info("highlighting " + file) + + self.currentExt = os.path.splitext(file)[1].replace('.', '') + + highlighted = highlightString(fileStr) + + out = codecs.open( os.path.join(self.outputdir, file + self.newext), "w", "utf-8" ) + out.write(highlighted) + out.close() + + def highlightDir(path): + subdirs = [] + dircontent = "" + for i in os.listdir(path): + fullname = os.path.join(path, i) + if os.path.isdir(fullname): + subdirs.append(fullname) + else: + for ext in self.ext_check: + if i.lower().endswith(ext): + highlightFile(path, i) + + for i in subdirs: + highlightDir(i) + + self.inputdirs = inputdirs + self.outputdir = os.path.abspath(outputdir) + _mkdir(self.outputdir) + self.ext = ext + self.currentExt = '' + self.ext_check = ext.split(',') + self.newext = newext + + log.info("-------------------------------------------------------") + + for i in inputdirs: + highlightDir(os.path.abspath(i)) + + +def main(): + optparser = OptionParser("usage: %prog [options] inputdir1 inputdir2 etc") + optparser.set_defaults(outputdir="out", ext=".js", newext=".highlighted") + optparser.add_option( "-o", "--outputdir", + action="store", dest="outputdir", type="string", + help="Directory to write the parser results" ) + optparser.add_option( "-e", "--extension", + action="store", dest="ext", type="string", + help="The extension for the files that should be parsed" ) + optparser.add_option( "-n", "--newextension", + action="store", dest="newext", type="string", + help="The extension to append to the output file" ) + (opts, inputdirs) = optparser.parse_args() + if len(inputdirs) > 0: + docparser = DocHighlighter( inputdirs, + opts.outputdir, + opts.ext, + opts.newext ) + else: + optparser.error("Incorrect number of arguments") + +if __name__ == '__main__': + main() diff --git a/docs/YUIdoc/bin/yuidoc_highlight.pyc b/docs/YUIdoc/bin/yuidoc_highlight.pyc new file mode 100755 index 0000000..5336f14 Binary files /dev/null and b/docs/YUIdoc/bin/yuidoc_highlight.pyc differ diff --git a/docs/YUIdoc/bin/yuidoc_parse.py b/docs/YUIdoc/bin/yuidoc_parse.py new file mode 100755 index 0000000..fc02721 --- /dev/null +++ b/docs/YUIdoc/bin/yuidoc_parse.py @@ -0,0 +1,866 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# vim: et sw=4 ts=4 + +''' +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.html +version: 1.0.0b1 +''' + +''' A class to parse Javadoc style comments out of javascript to document + an API. It is designed to parse one module at a time ''' + + +try: + import json as simplejson +except: + import simplejson + +import os, re, string, sys, pprint, logging, logging.config +from const import * +# from cStringIO import StringIO +from optparse import OptionParser +import codecs + +try: + logging.config.fileConfig(os.path.join(sys.path[0], LOGCONFIG)) +except: + pass + +log = logging.getLogger('yuidoc.parse') + + +class DocParser(object): + + def __init__(self, inputdirs, outputdir, outputfile, extension, version, yuiversion): + + def _mkdir(newdir): + if os.path.isdir(newdir): pass + elif os.path.isfile(newdir): + raise OSError("a file with the same name as the desired " \ + "dir, '%s', already exists." % newdir) + else: + head, tail = os.path.split(newdir) + if head and not os.path.isdir(head): _mkdir(head) + if tail: os.mkdir(newdir) + + def parseFile(path, file): + f = codecs.open(os.path.join(path, file), "r", "utf-8" ) + fileStr = f.read() + log.info("parsing " + file) + # add a file marker token so the parser can keep track of what is in what file + content = "\n/** @%s %s \n*/\n" % (FILE_MARKER, file) + + # copy + # out = open(os.path.join(self.outputdir, file), "w") + out = codecs.open( os.path.join(self.outputdir, file), "w", "utf-8" ) + out.writelines(fileStr) + out.close() + + return content + fileStr + + def parseDir(path): + subdirs = [] + dircontent = "" + dirfiles = os.listdir(path) + dirfiles.sort() + for i in dirfiles: + # Checking for directories that start with a '.' + # Windows doesn't hide these directories by default + if not i.startswith('.'): + # Checking for known bad directory: CVS + if i != 'CVS': + fullname = os.path.join(path, i) + if os.path.isdir(fullname): + subdirs.append(fullname) + else: + for ext in self.extension_check: + if i.lower().endswith(ext): + dircontent += parseFile(path, i) + + for i in subdirs: + dircontent += parseDir(i) + + return dircontent + + # An array containing each comment block + + # the remainder of the file with the comment blocks removed + # self.stripped = "" + + # We auto-generate documentation for events that are exposed by + # attributes. The signature for these events are different between + # YUI2 and YUI3. Specifying the YUI version that is in use will + # generate the appropriate documentation. This currently only + # differentiates between version 2 and 3 of the library, so the + # 'yuiversion' parameter should start with one or the other. If the + # 'yuiversion' parameter is not provided, the 'version' parameter is + # used instead, which is generally approprate for generating docs for + # the YUI library. If neither parameter is provided or valid, the + # default is the latest YUI major version, currently YUI3. + if yuiversion: + majorVersion = yuiversion[:1] + else: + majorVersion = version[:1] + + try: + majorVersion = int(majorVersion) + except: + majorVersion = 3 + + # Dictionary of parsed data + self.data = { + VERSION: version, + MAJOR_VERSION: majorVersion, + CLASS_MAP: {}, + MODULES: {} } + + self.inputdirs = inputdirs + self.outputdir = os.path.abspath(outputdir) + _mkdir(self.outputdir) + self.extension = extension + self.extension_check = extension.split(',') + + self.script="" + self.subModName = False + self.deferredModuleClasses=[] + self.deferredModuleFiles=[] + self.globals={} + self.currentGlobal="" + + log.info("-------------------------------------------------------") + + for i in inputdirs: + self.currentClass = "" + self.currentNamespace = "" + self.currentModule = "" + self.currentFile = "" + self.blocks = [] + self.matches = [] + path = os.path.abspath(i) + self.script = parseDir(path) + self.extract() + + # log.info("\n\n%s:\n\n%s\n" %("matches", unicode(self.matches))) + + for match in self.matches: + self.parse(self.tokenize(match)) + + + out = codecs.open( os.path.join(self.outputdir, outputfile), "w", "utf-8" ) + + out.writelines(simplejson.dumps(self.data, ensure_ascii=False)) + out.close() + + + def getClassName(self, classString, namespace): + shortName = classString.replace(namespace + ".", "") + #nss = self.data[NAMESPACES] + #for i in nss: + # log.warn('asdf ' + i); + #shortName = shortName.replace(i + ".", "") + longName = namespace + "." + shortName + return shortName, longName + + # extract string literals in case they contain the doc comment pattern + literals_pat = re.compile(r'(\'.*?(?<=[^\\])\')|(\".*?(?<=[^\\])\")') + + # extract regex literals in case they contain the doc comment pattern + regex_pat = re.compile(r'(\/[^\s\/\*][^\n]*\/)') + + # the token we will use to restore the string literals + replaceToken = '~~~%s~~~' + + # the pattern to restore the string literals + restore_pat = re.compile('~~~(\d+)~~~') + + # the pattern for extracting a documentation block and the next line + docBlock_pat = re.compile('(/\*\*)(.*?)(\*/)([\s\n]*[^\/\n]*)?|(".*?")', re.S) + + # after extracting the comment, fix it up (remove *s and leading spaces) + # blockFilter_pat = re.compile('^\s*\*', re.M) + blockFilter_pat = re.compile('^[\s|\*|\n]*', re.M) + + # the pattern used to split a comment block to create our token stream + # this will currently break if there are ampersands in the comments if there + # is a space before it + tokenize_pat = re.compile('^\s?(@\w\w*)', re.M); + + # separates compound descriptions: @param foo {int} a foo -> int, foo a foo + # also: @param {int} foo a foo -> int, foo a foo + compound_pat = re.compile('^\s*?(.*?)\{(.*)\}(.*)|^\s*?(\w+)(.*)', re.S); + + # pulls out the first word of the description parsed by compound_pat: foo, a foo + # param_pat = re.compile('^\s*?(\w+)(.*)', re.S); + param_pat = re.compile('^\s*?([^\s]+)(.*)', re.S); + + # tags that do not require a description, used by the tokenizer so that these + # tags can be used above the block description without breaking things + singleTags = "constructor public private protected static final beta experimental writeonce readonly global chainable" + + # guess the name and type of a block based upon the code following it + guess_pat = re.compile('\s*?(var|function)?\s*?(\w+)\s*?[=:]\s*?(function)?.*', re.S) + + # Extracts all of the documentation comment blocks from the script + def extract(self): + + # Array to keep track of string literals so they are not tokenized with + # the rest of the comment block + literals = [] + + # removes string literals and puts in a placeholder + def insertToken_sub(mo): + # log.info("\n\n%s: %s\n" %("extracted", unicode(mo.groups()))) + literals.append(mo.group()) + return self.replaceToken % (len(literals) - 1) + + # restores string literals + def restore_sub(mo): + # log.info("\n\n%s: %s\n" %("restore", unicode(literals[int(mo.group(1))]))) + return literals[int(mo.group(1))] + + # guesses name and type + def guess_sub(mo): + type = PROPERTY + #log.debug(mo.group(2)) + if mo.group(1) or mo.group(3): + type = FUNCTION + + self.guessedtype = type + self.guessedname = mo.group(2) + + # extracts the comment blocks + def match_sub(match): + if match.group(5): + # log.info("\n\n%s:\n\n%s\n" %("group5", unicode(match.group(5)))) + return match.group(5) + else: + # get the block and filter out unwanted chars + block = self.blockFilter_pat.sub("", match.group(2)) + + # log.info("\n\n%s:\n\n%s\n" %("block", unicode(block))) + + # restore string literals + block = self.restore_pat.sub(restore_sub, block) + + # twice + block = self.restore_pat.sub(restore_sub, block) + + # guess the name and type of the property/method based on the line + # after the comment + if match.group(4): + nextline = match.group(4) + mo = self.guess_pat.search(nextline) + if mo: + type = PROPERTY + if string.find(nextline, FUNCTION) > 0: + type = FUNCTION + + block += "@" + GUESSEDTYPE + " " + type + "\n" + block += "@" + GUESSEDNAME + " " + mo.group(2) + "\n" + + if len(block) > 0: + self.matches.append(block) + + return '' + + # remove regex literals + script = self.regex_pat.sub(insertToken_sub, self.script) + + # log.info("\n\n%s:\n\n%s\n" %("after regex extraction", unicode(script))) + + # remove string literals + script = self.literals_pat.sub(insertToken_sub, script) + + # log.info("\n\n%s:\n\n%s\n" %("after string extraction", unicode(script))) + + # extract comment blocks + self.docBlock_pat.sub(match_sub, script) + + return script + + # Tokenize a single documentation block + def tokenize(self, block): + return self.tokenize_pat.split(block) + + # Parse the token stream for a single comment block + def parse(self, tokens): + + # log.info("\n\n%s:\n\n%s\n" %("tokens", unicode(tokens))) + + tokensCopy = tokens[:] # shallow copy, we keep the orig for error msgs + + def peek(): + """ take a peek at the next token """ + if len(tokensCopy) > 0: + return tokensCopy[0].strip() + + def next(): + """ grab the next token and remove it from the stack """ + if len(tokensCopy) > 0: + return tokensCopy.pop(0).strip() + + def isTag(token): + """ identify an attribute tag vs a description block """ + return token.strip()[:1] == "@" + + def parseParams(tokenMap, dict, srctag=PARAM, desttag=PARAMS): + if srctag in tokenMap: + # params must be an array because they need to stay in order + if not desttag in dict: dict[desttag] = [] + for i in tokenMap[srctag]: + try: + # type, description = self.compound_pat.sub(compound_sub, i) + + match = self.compound_pat.match(i) + + if match: + if match.group(4): + type, description = "", match.group(4) + match.group(5) + else: + type, description = match.group(2), (match.group(1) + match.group(3)).strip() + + else: + type, description = "", "" + + + except: + log.error("\nError, a parameter could not be parsed:\n\n %s\n\n %s\n" %(i, pprint.pformat(tokenMap))) + sys.exit() + + mo = self.param_pat.match(description) + if mo: + name = mo.group(1) + description = mo.group(2) + # description.encode('utf-8', 'xmlcharrefreplace') + + dict[desttag].append({ + NAME: name, + TYPE: type, + DESCRIPTION: description + }) + else: + log.error("Error, could not parse param -- %s, %s --" %(type, description)) + + tokenMap.pop(srctag) + return dict + + def parseReturn(tokenMap, dict): + if RETURN in tokenMap: + ret = tokenMap[RETURN][0] + try: + # type, description = self.compound_pat.sub(compound_sub, ret) + + match = self.compound_pat.match(ret) + + if match: + if match.group(4): + type, description = "", match.group(4) + match.group(5) + else: + type, description = match.group(2), (match.group(1) + match.group(3)).strip() + else: + type, description = "", "" + + except: + log.error("\nError, a return statement could not be parsed:\n\n %s\n\n %s\n" %(ret, pprint.pformat(tokenMap))) + sys.exit() + + dict[RETURN] = { TYPE: type , DESCRIPTION: description } + tokenMap.pop(RETURN) + return dict + + def defineClass(name): + # log.info("\nDefine Class: " + name + ", " + self.currentModule) + if self.currentNamespace: + shortName, longName = self.getClassName(name, self.currentNamespace) + else: + shortName = longName = name + c = { SHORTNAME: shortName, NAME: longName, NAMESPACE: self.currentNamespace } + self.currentClass = longName + + if longName in self.data[CLASS_MAP]: + # print "WARNING: %s - Class %s was redefined" %(tokens, longName) + log.warn("WARNING: Class %s was redefined" %(longName)) + else: + self.data[CLASS_MAP][longName] = c + + return shortName, longName + + token = next() + tokenMap = {} + blockInfo = {} + target = None + currentFor = "" + while token != None: + if isTag(token): + token = token[1:].lower() # remove the @ and lowercase + desc = "" + + # most tags require a description after, some do not + if token not in self.singleTags and not isTag(peek()): + desc = next() + if not desc or isTag(desc): + if desc: + msg = "WARNING: expected a description block for tag @%s but \ +found another tag @%s" % (token, desc) + else: + msg = "WARNING: expected a description block for tag @%s but \ +it was empty" % token + + log.warn("\n" + self.currentFile + "\n" + msg + ":\n\n" + unicode(tokens) + "\n") + + + + + # keep a map of the different tags we have found, with an + # array to keep track of each occurrance + if token not in tokenMap: + tokenMap[token] = [] + + + tokenMap[token].append(desc) + + # There are key pieces of info we need to have before we + # can properly set up the documemtation for this block + if token == MODULE: + if desc: + + # log.info("\nModule: " + desc) + self.currentModule = desc + else: + log.warn('no name for module') + + else: + # the first block without a description should be the description + # for the block + if token and DESCRIPTION not in tokenMap: + + tokenMap[DESCRIPTION] = [token] + else: pass # I don't think this can happen any longer + + token = next() + + self.blocks.append(tokenMap); + + if NAMESPACE in tokenMap: + if not NAMESPACES in self.data: self.data[NAMESPACES] = [] + ns = tokenMap[NAMESPACE][0] + self.currentNamespace = ns + if ns not in self.data[NAMESPACES]: + self.data[NAMESPACES].append(ns) + tokenMap.pop(NAMESPACE) + + # @for tells the parser either that the class that is being parsed is an inner class + # or, in the case of it being defined outside of a class definition, that an inner + # class definition is complete and we need to resume processing the remainder of the + # outer class + if FOR in tokenMap: + name = tokenMap[FOR][0] + longName = name + currentFor = longName + if CLASS not in tokenMap: + if longName in self.data[CLASS_MAP]: + self.currentClass = longName + else: + defineClass(name) + + tokenMap.pop(FOR) + + + # use the guessed name and type if a block type was not found + if CLASS not in tokenMap \ + and METHOD not in tokenMap \ + and PROPERTY not in tokenMap \ + and CONSTRUCTOR not in tokenMap \ + and EVENT not in tokenMap \ + and CONFIG not in tokenMap \ + and ATTRIBUTE not in tokenMap \ + and MODULE not in tokenMap: + if GUESSEDNAME in tokenMap: + if GUESSEDTYPE in tokenMap: + if tokenMap[GUESSEDTYPE][0] == FUNCTION: + tokenMap[METHOD] = tokenMap[GUESSEDNAME] + else: + tokenMap[PROPERTY] = tokenMap[GUESSEDNAME] + + + + # The following tokens represent the core type of comment blocks that are + # supported. It is possible to have a comment block that does not fall into + # one of these core categories. It is assumed that these blocks are supplying + # global or contextual metadata + + def parseModule(tokenMap): + + log.debug("\n\n%s:\n\n%s\n" %("tokenMap", unicode(tokenMap))) + + target = None + self.subModName = False + if not MODULES in self.data: self.data[MODULES] = {} + for module in tokenMap[MODULE]: + if module not in self.data[MODULES]: + self.data[MODULES][module] = { NAME: module, CLASS_LIST: [], FILE_LIST: [], SUBMODULES: [], SUBDATA: {} } + + target = self.data[MODULES][module] + + if SUBMODULE in tokenMap: + + subname = tokenMap[SUBMODULE][0] + + if not target[SUBMODULES].count(subname): + target[SUBMODULES].append(subname) + + self.subModName = subname; + target[SUBDATA][subname] = { NAME: self.currentClass } + + if DESCRIPTION in tokenMap: + log.debug("\n\nSubmodule: %s, description: %s\n" %(self.subModName, tokenMap[DESCRIPTION][0])) + target[SUBDATA][subname][DESCRIPTION] = tokenMap[DESCRIPTION][0] + + tokenMap.pop(SUBMODULE) + + elif DESCRIPTION in tokenMap: + target[DESCRIPTION] = tokenMap[DESCRIPTION][0] + + if len(self.deferredModuleFiles) > 0: + for i in self.deferredModuleFiles: + self.data[FILE_MAP][i][MODULE] = self.currentModule + if not self.data[MODULES][self.currentModule][FILE_LIST].count(i): + self.data[MODULES][self.currentModule][FILE_LIST].append(i) + + self.deferredModuleFiles = [] + + if len(self.deferredModuleClasses) > 0: + for i in self.deferredModuleClasses: + self.data[CLASS_MAP][i][MODULE] = self.currentModule + if not self.data[MODULES][self.currentModule][CLASS_LIST].count(i): + self.data[MODULES][self.currentModule][CLASS_LIST].append(i) + + self.deferredModuleClasses = [] + + tokenMap.pop(MODULE) + + return target, tokenMap + + # print "DAV: %s" % tokenMap + if FILE_MARKER in tokenMap: + if not FILE_MAP in self.data: self.data[FILE_MAP] = {} + self.currentFile = desc + file_name = tokenMap[FILE_MARKER][0] + target = { NAME: file_name, CLASS_LIST:[] } + self.data[FILE_MAP][file_name] = target + + if self.currentModule: + target[MODULE] = self.currentModule + if not self.data[MODULES][self.currentModule][FILE_LIST].count(file_name): + self.data[MODULES][self.currentModule][FILE_LIST].append(file_name) + else: + """ defer the module assignment until we find the token """ + log.info('deferred module file: ' + file_name) + if not self.deferredModuleFiles.count(file_name): + self.deferredModuleFiles.append(file_name) + + + tokenMap.pop(FILE_MARKER) + + elif CLASS in tokenMap: + + name = tokenMap[CLASS][0] + + shortName, longName = defineClass(name) + + if MODULE in tokenMap: + target, tokenMap = parseModule(tokenMap) + + if self.subModName: + # provides a place to link to on the module landing page + try: + self.data[MODULES][self.currentModule][SUBDATA][self.subModName][NAME] = longName + except: + pass + + # this was overwriting the submodule description + # if DESCRIPTION in tokenMap: + # d = tokenMap[DESCRIPTION][0] + # try: + # encoded = unicode(d, 'utf-8', 'xmlcharrefreplace') + # d = encoded + # except: pass + # self.data[MODULES][self.currentModule][SUBDATA][self.subModName][DESCRIPTION] = d + + if GLOBAL in tokenMap: + self.globals[longName] = True + self.currentGlobal = longName + + target = self.data[CLASS_MAP][longName] + + if currentFor and currentFor != longName: # this is an inner class + if "innerClasses" not in target: + target["innerClasses"] = [] + if not target["innerClasses"].count(currentFor): + target["innerClasses"].append(currentFor) + + if self.currentModule: + + target[MODULE] = self.currentModule + if not self.data[MODULES][self.currentModule][CLASS_LIST].count(longName): + self.data[MODULES][self.currentModule][CLASS_LIST].append(longName) + else: + """ defer the module assignment until we find the token """ + log.info('deferred module CLASS: ' + longName) + if not self.deferredModuleClasses.count(longName): + self.deferredModuleClasses.append(longName) + + if self.currentFile: + target[FILE] = self.currentFile + + try: + if not self.data[FILE_MAP][self.currentFile][CLASS_LIST].count(longName): + self.data[FILE_MAP][self.currentFile][CLASS_LIST].append(longName) + except: + pass + + # if "mixes" in tokenMap: + if "extends" in tokenMap: + # shortName, longName = self.getClassName(tokenMap["extends"][0], self.currentNamespace) + longName = tokenMap["extends"][0] + target["superclass"] = longName + + if "uses" in tokenMap: + target["uses"] = [] + for i in tokenMap["uses"]: + # shortName, longName = self.getClassName(i, self.currentNamespace) + longName = i + if not target["uses"].count(longName): + target["uses"].append(longName) + + ############### + # if not CLASS_LIST in self.data: + # self.data[CLASS_LIST] = [] + + # self.data[CLASS_LIST].append(target) + ############ + + tokenMap.pop(CLASS) + + elif METHOD in tokenMap: + + method = tokenMap[METHOD][0] + + if not self.currentClass: + log.warn("WARNING: @method tag found before @class was found.\n****\n" + method + ", making global " + self.currentGlobal + " current class") + self.currentClass = self.currentGlobal + #sys.exit() + # if FOR in tokenMap: + # self.currentClass = tokenMap[FOR][0] + + c = self.data[CLASS_MAP][self.currentClass] + + # log.info(" @method " + method) + + if not METHODS in c: c[METHODS] = {} + + if method in c[METHODS]: + log.warn("WARNING: method %s was redefined" %(method)) + else: + c[METHODS][method] = parseParams(tokenMap, {}) + c[METHODS][method] = parseReturn(tokenMap, c[METHODS][method]) + + target = c[METHODS][method] + + tokenMap.pop(METHOD) + + elif EVENT in tokenMap: + if not self.currentClass: + log.error("Error: @event tag found before @class was found.\n****\n") + self.currentClass = self.currentGlobal + # sys.exit() + + c = self.data[CLASS_MAP][self.currentClass] + event = tokenMap[EVENT][0] + + if not EVENTS in c: c[EVENTS] = {} + + if event in c[EVENTS]: + log.warn("WARNING: event %s was redefined" %(event)) + else: + c[EVENTS][event] = parseParams(tokenMap, {}) + + target = c[EVENTS][event] + + tokenMap.pop(EVENT) + + elif PROPERTY in tokenMap: + + if not self.currentClass: + log.warn("Error: @property tag found before @class was found.\n****\n") + self.currentClass = self.currentGlobal + #sys.exit() + + c = self.data[CLASS_MAP][self.currentClass] + property = tokenMap[PROPERTY][0] + + if not PROPERTIES in c: c[PROPERTIES] = {} + + if property in c[PROPERTIES]: + log.warn("WARNING: Property %s was redefined" %(property)) + else: + c[PROPERTIES][property] = {} + + target = c[PROPERTIES][property] + + tokenMap.pop(PROPERTY) + + elif CONFIG in tokenMap or ATTRIBUTE in tokenMap: + + if not self.currentClass: + log.warn("Error: @config tag found before @class was found.\n****\n") + # sys.exit() + self.currentClass = self.currentGlobal + + c = self.data[CLASS_MAP][self.currentClass] + if ATTRIBUTE in tokenMap: + config = tokenMap[ATTRIBUTE][0] + else: + config = tokenMap[CONFIG][0] + + + if not CONFIGS in c: c[CONFIGS] = {} + + if config in c[CONFIGS]: + log.warn("WARNING: Property %s was redefined" %(config)) + else: + c[CONFIGS][config] = {} + + target = c[CONFIGS][config] + + if ATTRIBUTE in tokenMap: + tokenMap.pop(ATTRIBUTE) + + if not EVENTS in c: c[EVENTS] = {} + + def getAttEvt(eventname, desc): + + return { + NAME: eventname, + DESCRIPTION: desc, + PARAMS: [{ + NAME: EVENT, + TYPE: "{oldValue: any, newValue: any}", + DESCRIPTION: "An object containing the previous attribute value and the new value." + }] + } + + def get3xAttEvt(eventname, config): + + return { + NAME: eventname, + DESCRIPTION: 'Fires when the value for the configuration attribute \'%s\' is \ +changed. You can listen for the event using the on \ +method if you wish to be notified before the attribute\'s value has changed, or using the \ +after method if you wish to be notified after \ +the attribute\'s value has changed.' %(config), + PARAMS: [{ + NAME: EVENT, + TYPE: "Event.Facade", + DESCRIPTION: 'An Event Facade object with \ + the following attribute specific properties added:\ +
\ +
prevVal
\ +
The value of the attribute, prior to it being set
\ +
newVal
\ +
The value the attribute is to be set to
\ +
attrName
\ +
The name of the attribute being set
\ +
subAttrName
\ +
If setting a property within the attribute\'s value,\ + the name of the sub-attribute property being set
\ +
' + }] + } + + # auto-document '[configname]ChangeEvent' and 'before[Configname]ChangeEvent' + if self.data[MAJOR_VERSION] > 2: + + eventname = config + CHANGEEVENT + c[EVENTS][eventname] = get3xAttEvt(eventname, config) + + else: + + eventname = config + CHANGEEVENT + desc = "Fires when the value for the configuration attribute '" + config + "' changes." + c[EVENTS][eventname] = getAttEvt(eventname, desc) + + eventname = BEFORE + config[0].upper() + config[1:] + CHANGEEVENT + desc = "Fires before the value for the configuration attribute '" + config + "' changes." + " Return false to cancel the attribute change." + c[EVENTS][eventname] = getAttEvt(eventname, desc) + + + else: + tokenMap.pop(CONFIG) + + # module blocks won't be picked up unless they are standalone + elif MODULE in tokenMap: + target, tokenMap = parseModule(tokenMap) + + else: + msg = "WARNING: doc block type ambiguous, no @class, @module, @method, \ +@event, @property, or @config tag found. This block may be skipped" + log.warn("\n" + self.currentFile + "\n" + msg + ":\n\n" + unicode(tokens) + "\n") + + # constructors are added as an array to the currentClass. This makes it so + # multiple constructors can be supported even though that is out of scope + # for documenting javascript + if CONSTRUCTOR in tokenMap: + + if not self.currentClass: + log.error("Error: @constructor tag found but @class was not found.\n****\n") + sys.exit(1) + + c = self.data[CLASS_MAP][self.currentClass] + if not CONSTRUCTORS in c: c[CONSTRUCTORS] = [] + constructor = parseParams(tokenMap, { DESCRIPTION: tokenMap[DESCRIPTION][0] }) + if not c[CONSTRUCTORS].count(constructor): + c[CONSTRUCTORS].append(constructor) + tokenMap.pop(CONSTRUCTOR) + + # process the rest of the tags + if target != None: + for token in tokenMap: + if token not in target: + target[token] = tokenMap[token][0] + +def main(): + optparser = OptionParser("usage: %prog [options] inputdir1 inputdir2 etc") + optparser.set_defaults(outputdir="out", + outputfile="parsed.json", + extension=".js", + version="" + ) + optparser.add_option( "-o", "--outputdir", + action="store", dest="outputdir", type="string", + help="Directory to write the parser results" ) + optparser.add_option( "-f", "--file", + action="store", dest="outputfile", type="string", + help="The name of the file to write the JSON output" ) + optparser.add_option( "-e", "--extension", + action="store", dest="extension", type="string", + help="The extension for the files that should be parsed" ) + optparser.add_option( "-v", "--version", + action="store", dest="version", type="string", + help="The version of the project" ) + (opts, inputdirs) = optparser.parse_args() + if len(inputdirs) > 0: + docparser = DocParser( inputdirs, + opts.outputdir, + opts.outputfile, + opts.extension, + opts.version + ) + else: + optparser.error("Incorrect number of arguments") + +if __name__ == '__main__': + main() diff --git a/docs/YUIdoc/bin/yuidoc_parse.pyc b/docs/YUIdoc/bin/yuidoc_parse.pyc new file mode 100755 index 0000000..4b46491 Binary files /dev/null and b/docs/YUIdoc/bin/yuidoc_parse.pyc differ diff --git a/docs/YUIdoc/bin/yuidoclog.conf b/docs/YUIdoc/bin/yuidoclog.conf new file mode 100644 index 0000000..81820aa --- /dev/null +++ b/docs/YUIdoc/bin/yuidoclog.conf @@ -0,0 +1,44 @@ +[formatters] +keys: detailed,simple + +[handlers] +keys: console,syslog + +[loggers] +keys: root,parse,highlight,generate + +[formatter_simple] +#format: %(name)s:%(levelname)s: %(message)s +format: %(levelname)s: %(message)s + +[formatter_detailed] +format: %(name)s:%(levelname)s %(module)s:%(lineno)d: %(message)s + +[handler_console] +class: StreamHandler +args: [] +formatter: simple + +[handler_syslog] +class: handlers.SysLogHandler +args: [('127.0.0.1', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER] +formatter: detailed + +[logger_root] +level: INFO +handlers: syslog + +[logger_parse] +level: INFO +qualname: yuidoc.parse +handlers: console + +[logger_highlight] +level: INFO +qualname: yuidoc.highlight +handlers: console + +[logger_generate] +level: INFO +qualname: yuidoc.generate +handlers: console diff --git a/docs/YUIdoc/ext/_namemapper.pyd b/docs/YUIdoc/ext/_namemapper.pyd new file mode 100644 index 0000000..688566b Binary files /dev/null and b/docs/YUIdoc/ext/_namemapper.pyd differ diff --git a/docs/YUIdoc/ext/setuptools-0.6c9.tar.gz b/docs/YUIdoc/ext/setuptools-0.6c9.tar.gz new file mode 100644 index 0000000..74acf8d Binary files /dev/null and b/docs/YUIdoc/ext/setuptools-0.6c9.tar.gz differ diff --git a/docs/YUIdoc/license.txt b/docs/YUIdoc/license.txt new file mode 100644 index 0000000..6e8889e --- /dev/null +++ b/docs/YUIdoc/license.txt @@ -0,0 +1,31 @@ +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: + +Redistribution and use of this software 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 Yahoo! Inc. nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission of Yahoo! Inc. + +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. + + +http://developer.yahoo.net/yui/license.html diff --git a/docs/YUIdoc/sushi.doc.sh b/docs/YUIdoc/sushi.doc.sh new file mode 100755 index 0000000..24ab1e7 --- /dev/null +++ b/docs/YUIdoc/sushi.doc.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# The location of your yuidoc install +yuidoc_home=~/labs.sapo:UA/Sushi-Js/docs/YUIdoc + +# The location of the files to parse. Parses subdirectories, but will fail if +# there are duplicate file names in these directories. You can specify multiple +# source trees: +# parser_in="%HOME/www/yui/src %HOME/www/event/src" +parser_in="$HOME/labs.sapo:UA/Sushi-JS/src" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out="$HOME/labs.sapo:UA/Sushi-JS/docs/Data" + +# The directory to put the html file outputted by the generator +generator_out="$HOME/labs.sapo:UA/Sushi-JS/docs/www" + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template/dana + +# The version of your project to display within the documentation. +version=0.0.5 + +# The version of YUI the project is using. This effects the output for +# YUI configuration attributes. This should start with '2' or '3'. +yuiversion=2 + +############################################################################## +# add -s to the end of the line to show items marked private + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -m 'Sushi Javascript Library' -u http://campus.ua.sapo.pt/ -C 'Sapo Campus' -s diff --git a/docs/YUIdoc/template/assets/ac-js b/docs/YUIdoc/template/assets/ac-js new file mode 100644 index 0000000..e1d7f16 --- /dev/null +++ b/docs/YUIdoc/template/assets/ac-js @@ -0,0 +1,178 @@ +(function() { + + var Event=YAHOO.util.Event, + Dom=YAHOO.util.Dom, + oACDS, oAutoComp, + show = { + 'private': false, + 'protected': false, + 'deprecated': false + }, + + ITEM_TEMPLATE = '{host} {name}', + // ITEM_TEMPLATE = '{host} {params} {name}', + // ITEM_TEMPLATE = '{host} {params} {name}
{description}
', + yuidoc = YAHOO.namespace('yuidoc'), + propdata, + initialized = false; + +yuidoc.init = function(altdata) { + yuidoc.initUI(altdata); +}; + +yuidoc.initUI = function(altdata) { + + if (initialized) { + return; + } + + propdata = ALL_YUI_PROPS || altdata; + + //Checkboxes are available.. + var handleClick = function(e) { + var id, checked = false; + if (YAHOO.lang.isString(e)) { + id = e; + } else { + var tar = Event.getTarget(e); + id = tar.id; + } + var el = Dom.get(id); + checked = el.checked; + + var className = id; + if (checked) { + show[id.replace('show_', '')] = true; + Dom.addClass(document.body, className); + YAHOO.util.Cookie.setSub('yuidoc', id, 'checked'); + } else { + show[id.replace('show_', '')] = false; + Dom.removeClass(document.body, className); + YAHOO.util.Cookie.setSub('yuidoc', id, ''); + } + }; + + var checkCookie = function(id) { + var value = YAHOO.util.Cookie.getSub('yuidoc', id), + el = Dom.get(id), checked = (value === 'checked');; + + el.checked = checked; + return checked; + }; + + var els = ['show_deprecated', 'show_protected', 'show_private'], + reapplyHash = false; + + for (var i = 0; i < els.length; i++) { + Event.on(els[i], 'click', handleClick); + reapplyHash = checkCookie(els[i]) || reapplyHash; + handleClick(els[i]); + } + + // If we dynamically show private/protected/etc items during + // load, we need to reapply anchors so that the search feature + // works correctly for items that are initially hidden. + if (reapplyHash) { + var dl = document.location, hash = dl.hash; + if (hash) { + dl.hash = hash; + } + } + +}; + +//Starting the AutoComplete code + var getResults = function(query) { + var results = []; + if (query && query.length > 0) { + var q = query.toLowerCase(); + for (var i=0, len=propdata.length; i -1 ) { + results.push([query, prop]); + } + } + } + } + + return results; + }; + + // Define Custom Event handlers + var myOnDataReturn = function(sType, aArgs) { + var oAutoComp = aArgs[0]; + var query = aArgs[1]; + var aResults = aArgs[2]; + + if(aResults.length == 0) { + if (query.length > 0) { + oAutoComp.setBody("
Not found
"); + } + } + }; + + var myOnItemSelect = function(sType, aArgs) { + var ac = aArgs[0]; + var item = aArgs[2]; + location.href = item[1].url; + }; + + + Event.onAvailable("searchresults", function() { + + // Instantiate JS Function DataSource + oACDS = new YAHOO.widget.DS_JSFunction(getResults); + oACDS.maxCacheEntries = 30; + + // Instantiate AutoComplete + oAutoComp = new YAHOO.widget.AutoComplete('searchinput','searchresults', oACDS); + //oAutoComp.alwaysShowContainer = true; + oAutoComp.queryDelay = 0.2; + oAutoComp.maxResultsDisplayed = 200; + oAutoComp.minQueryLength = 0; + oAutoComp.formatResult = function(oResultItem, query) { + // var sMarkup = "" + oResultItem[1].host + ' ' + oResultItem[1].name + ''; + // return sMarkup; + // return "" + oResultItem[1].host + ' ' + oResultItem[1].name + ''; + return YAHOO.lang.substitute(ITEM_TEMPLATE, oResultItem[1]); + }; + + // Subscribe to Custom Events + oAutoComp.dataReturnEvent.subscribe(myOnDataReturn); + oAutoComp.itemSelectEvent.subscribe(myOnItemSelect); + + // Set initial content in the container + oAutoComp.sendQuery(Dom.get("searchinput").value); + + }); + + var validateForm = function() { + return false; + }; + + YAHOO.util.Event.onAvailable('classTab', function() { + var tabs = new YAHOO.widget.TabView('classTab'); + }); + + /* + YAHOO.util.Event.onAvailable('codeTree', function() { + var tree1 = new YAHOO.widget.TreeView('codeTree'); + tree1.render(); + }); + */ + + YAHOO.util.Event.onDOMReady(function() { + if (typeof ALL_YUI_PROPS != "undefined") { + YAHOO.yuidoc.initUI(); + } + }); + +})(); diff --git a/docs/YUIdoc/template/assets/api-js b/docs/YUIdoc/template/assets/api-js new file mode 100644 index 0000000..54c5d2d --- /dev/null +++ b/docs/YUIdoc/template/assets/api-js @@ -0,0 +1,42 @@ +/* +Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.7.0 +*/ +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G}); +},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B); +}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1796"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C);}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N-1;Q--){W=(this.removeListener(N[Q],M,V)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj;}else{U=W.overrideContext;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{if(this._interval){clearInterval(this._interval);this._interval=null;}}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P);}}O=null;}G=null;N._simpleRemove(window,"unload",N._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener; +/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ +if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E); +}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C0){if(!aCache){this._aCache=[];}else{var nCacheLength=aCache.length;if(nCacheLength>0){var oResponse=null;this.fireEvent("cacheRequestEvent",{request:oRequest,callback:oCallback,caller:oCaller});for(var i=nCacheLength-1;i>=0;i--){var oCacheElem=aCache[i];if(this.isCacheHit(oRequest,oCacheElem.request)){oResponse=oCacheElem.response;this.fireEvent("cacheResponseEvent",{request:oRequest,response:oResponse,callback:oCallback,caller:oCaller});if(i=this.maxCacheEntries){aCache.shift();}var oCacheElem={request:oRequest,response:oResponse};aCache[aCache.length]=oCacheElem;this.fireEvent("responseCacheEvent",{request:oRequest,response:oResponse});},flushCache:function(){if(this._aCache){this._aCache=[];this.fireEvent("cacheFlushEvent");}},setInterval:function(nMsec,oRequest,oCallback,oCaller){if(lang.isNumber(nMsec)&&(nMsec>=0)){var oSelf=this;var nId=setInterval(function(){oSelf.makeConnection(oRequest,oCallback,oCaller);},nMsec);this._aIntervals.push(nId);return nId;}else{}},clearInterval:function(nId){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){if(tracker[i]===nId){tracker.splice(i,1);clearInterval(nId);}}},clearAllIntervals:function(){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){clearInterval(tracker[i]);}tracker=[];},sendRequest:function(oRequest,oCallback,oCaller){var oCachedResponse=this.getCachedResponse(oRequest,oCallback,oCaller);if(oCachedResponse){DS.issueCallback(oCallback,[oRequest,oCachedResponse],false,oCaller);return null;}return this.makeConnection(oRequest,oCallback,oCaller);},makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oRawResponse=this.liveData;this.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);return tId;},handleResponse:function(oRequest,oRawResponse,oCallback,oCaller,tId){this.fireEvent("responseEvent",{tId:tId,request:oRequest,response:oRawResponse,callback:oCallback,caller:oCaller});var xhr=(this.dataType==DS.TYPE_XHR)?true:false;var oParsedResponse=null;var oFullResponse=oRawResponse;if(this.responseType===DS.TYPE_UNKNOWN){var ctype=(oRawResponse&&oRawResponse.getResponseHeader)?oRawResponse.getResponseHeader["Content-Type"]:null;if(ctype){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}else{if(ctype.indexOf("application/json")>-1){this.responseType=DS.TYPE_JSON;}else{if(ctype.indexOf("text/plain")>-1){this.responseType=DS.TYPE_TEXT;}}}}else{if(YAHOO.lang.isArray(oRawResponse)){this.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse&&oRawResponse.nodeType&&oRawResponse.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oRawResponse&&oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){this.responseType=DS.TYPE_TEXT;}}}}}}}switch(this.responseType){case DS.TYPE_JSARRAY:if(xhr&&oRawResponse&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}try{if(lang.isString(oFullResponse)){var parseArgs=[oFullResponse].concat(this.parseJSONArgs); +if(lang.JSON){oFullResponse=lang.JSON.parse.apply(lang.JSON,parseArgs);}else{if(window.JSON&&JSON.parse){oFullResponse=JSON.parse.apply(JSON,parseArgs);}else{if(oFullResponse.parseJSON){oFullResponse=oFullResponse.parseJSON.apply(oFullResponse,parseArgs.slice(1));}else{while(oFullResponse.length>0&&(oFullResponse.charAt(0)!="{")&&(oFullResponse.charAt(0)!="[")){oFullResponse=oFullResponse.substring(1,oFullResponse.length);}if(oFullResponse.length>0){var arrayEnd=Math.max(oFullResponse.lastIndexOf("]"),oFullResponse.lastIndexOf("}"));oFullResponse=oFullResponse.substring(0,arrayEnd+1);oFullResponse=eval("("+oFullResponse+")");}}}}}}catch(e1){}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseArrayData(oRequest,oFullResponse);break;case DS.TYPE_JSON:if(xhr&&oRawResponse&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}try{if(lang.isString(oFullResponse)){var parseArgs=[oFullResponse].concat(this.parseJSONArgs);if(lang.JSON){oFullResponse=lang.JSON.parse.apply(lang.JSON,parseArgs);}else{if(window.JSON&&JSON.parse){oFullResponse=JSON.parse.apply(JSON,parseArgs);}else{if(oFullResponse.parseJSON){oFullResponse=oFullResponse.parseJSON.apply(oFullResponse,parseArgs.slice(1));}else{while(oFullResponse.length>0&&(oFullResponse.charAt(0)!="{")&&(oFullResponse.charAt(0)!="[")){oFullResponse=oFullResponse.substring(1,oFullResponse.length);}if(oFullResponse.length>0){var objEnd=Math.max(oFullResponse.lastIndexOf("]"),oFullResponse.lastIndexOf("}"));oFullResponse=oFullResponse.substring(0,objEnd+1);oFullResponse=eval("("+oFullResponse+")");}}}}}}catch(e){}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseJSONData(oRequest,oFullResponse);break;case DS.TYPE_HTMLTABLE:if(xhr&&oRawResponse.responseText){var el=document.createElement("div");el.innerHTML=oRawResponse.responseText;oFullResponse=el.getElementsByTagName("table")[0];}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseHTMLTableData(oRequest,oFullResponse);break;case DS.TYPE_XML:if(xhr&&oRawResponse.responseXML){oFullResponse=oRawResponse.responseXML;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseXMLData(oRequest,oFullResponse);break;case DS.TYPE_TEXT:if(xhr&&lang.isString(oRawResponse.responseText)){oFullResponse=oRawResponse.responseText;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseTextData(oRequest,oFullResponse);break;default:oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseData(oRequest,oFullResponse);break;}oParsedResponse=oParsedResponse||{};if(!oParsedResponse.results){oParsedResponse.results=[];}if(!oParsedResponse.meta){oParsedResponse.meta={};}if(oParsedResponse&&!oParsedResponse.error){oParsedResponse=this.doBeforeCallback(oRequest,oFullResponse,oParsedResponse,oCallback);this.fireEvent("responseParseEvent",{request:oRequest,response:oParsedResponse,callback:oCallback,caller:oCaller});this.addToCache(oRequest,oParsedResponse);}else{oParsedResponse.error=true;this.fireEvent("dataErrorEvent",{request:oRequest,response:oRawResponse,callback:oCallback,caller:oCaller,message:DS.ERROR_DATANULL});}oParsedResponse.tId=tId;DS.issueCallback(oCallback,[oRequest,oParsedResponse],oParsedResponse.error,oCaller);},doBeforeParseData:function(oRequest,oFullResponse,oCallback){return oFullResponse;},doBeforeCallback:function(oRequest,oFullResponse,oParsedResponse,oCallback){return oParsedResponse;},parseData:function(oRequest,oFullResponse){if(lang.isValue(oFullResponse)){var oParsedResponse={results:oFullResponse,meta:{}};return oParsedResponse;}return null;},parseArrayData:function(oRequest,oFullResponse){if(lang.isArray(oFullResponse)){var results=[],i,j,rec,field,data;if(lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;for(i=fields.length-1;i>=0;--i){if(typeof fields[i]!=="object"){fields[i]={key:fields[i]};}}var parsers={},p;for(i=fields.length-1;i>=0;--i){p=(typeof fields[i].parser==="function"?fields[i].parser:DS.Parser[fields[i].parser+""])||fields[i].converter;if(p){parsers[fields[i].key]=p;}}var arrType=lang.isArray(oFullResponse[0]);for(i=oFullResponse.length-1;i>-1;i--){var oResult={};rec=oFullResponse[i];if(typeof rec==="object"){for(j=fields.length-1;j>-1;j--){field=fields[j];data=arrType?rec[j]:rec[field.key];if(parsers[field.key]){data=parsers[field.key].call(this,data);}if(data===undefined){data=null;}oResult[field.key]=data;}}else{if(lang.isString(rec)){for(j=fields.length-1;j>-1;j--){field=fields[j];data=rec;if(parsers[field.key]){data=parsers[field.key].call(this,data);}if(data===undefined){data=null;}oResult[field.key]=data;}}}results[i]=oResult;}}else{results=oFullResponse;}var oParsedResponse={results:results};return oParsedResponse;}return null;},parseTextData:function(oRequest,oFullResponse){if(lang.isString(oFullResponse)){if(lang.isString(this.responseSchema.recordDelim)&&lang.isString(this.responseSchema.fieldDelim)){var oParsedResponse={results:[]};var recDelim=this.responseSchema.recordDelim;var fieldDelim=this.responseSchema.fieldDelim;if(oFullResponse.length>0){var newLength=oFullResponse.length-recDelim.length;if(oFullResponse.substr(newLength)==recDelim){oFullResponse=oFullResponse.substr(0,newLength);}if(oFullResponse.length>0){var recordsarray=oFullResponse.split(recDelim);for(var i=0,len=recordsarray.length,recIdx=0;i0)){var fielddataarray=recordsarray[i].split(fieldDelim);var oResult={};if(lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;for(var j=fields.length-1;j>-1;j--){try{var data=fielddataarray[j];if(lang.isString(data)){if(data.charAt(0)=='"'){data=data.substr(1);}if(data.charAt(data.length-1)=='"'){data=data.substr(0,data.length-1);}var field=fields[j]; +var key=(lang.isValue(field.key))?field.key:field;if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}else{bError=true;}}catch(e){bError=true;}}}else{oResult=fielddataarray;}if(!bError){oParsedResponse.results[recIdx++]=oResult;}}}}}return oParsedResponse;}}return null;},parseXMLResult:function(result){var oResult={},schema=this.responseSchema;try{for(var m=schema.fields.length-1;m>=0;m--){var field=schema.fields[m];var key=(lang.isValue(field.key))?field.key:field;var data=null;var xmlAttr=result.attributes.getNamedItem(key);if(xmlAttr){data=xmlAttr.value;}else{var xmlNode=result.getElementsByTagName(key);if(xmlNode&&xmlNode.item(0)){var item=xmlNode.item(0);data=(item)?((item.text)?item.text:(item.textContent)?item.textContent:null):null;if(!data){var datapieces=[];for(var j=0,len=item.childNodes.length;j0){data=datapieces.join("");}}}}if(data===null){data="";}if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}}catch(e){}return oResult;},parseXMLData:function(oRequest,oFullResponse){var bError=false,schema=this.responseSchema,oParsedResponse={meta:{}},xmlList=null,metaNode=schema.metaNode,metaLocators=schema.metaFields||{},i,k,loc,v;try{xmlList=(schema.resultNode)?oFullResponse.getElementsByTagName(schema.resultNode):null;metaNode=metaNode?oFullResponse.getElementsByTagName(metaNode)[0]:oFullResponse;if(metaNode){for(k in metaLocators){if(lang.hasOwnProperty(metaLocators,k)){loc=metaLocators[k];v=metaNode.getElementsByTagName(loc)[0];if(v){v=v.firstChild.nodeValue;}else{v=metaNode.attributes.getNamedItem(loc);if(v){v=v.value;}}if(lang.isValue(v)){oParsedResponse.meta[k]=v;}}}}}catch(e){}if(!xmlList||!lang.isArray(schema.fields)){bError=true;}else{oParsedResponse.results=[];for(i=xmlList.length-1;i>=0;--i){var oResult=this.parseXMLResult(xmlList.item(i));oParsedResponse.results[i]=oResult;}}if(bError){oParsedResponse.error=true;}else{}return oParsedResponse;},parseJSONData:function(oRequest,oFullResponse){var oParsedResponse={results:[],meta:{}};if(lang.isObject(oFullResponse)&&this.responseSchema.resultsList){var schema=this.responseSchema,fields=schema.fields,resultsList=oFullResponse,results=[],metaFields=schema.metaFields||{},fieldParsers=[],fieldPaths=[],simpleFields=[],bError=false,i,len,j,v,key,parser,path;var buildPath=function(needle){var path=null,keys=[],i=0;if(needle){needle=needle.replace(/\[(['"])(.*?)\1\]/g,function(x,$1,$2){keys[i]=$2;return".@"+(i++);}).replace(/\[(\d+)\]/g,function(x,$1){keys[i]=parseInt($1,10)|0;return".@"+(i++);}).replace(/^\./,"");if(!/[^\w\.\$@]/.test(needle)){path=needle.split(".");for(i=path.length-1;i>=0;--i){if(path[i].charAt(0)==="@"){path[i]=keys[parseInt(path[i].substr(1),10)];}}}else{}}return path;};var walkPath=function(path,origin){var v=origin,i=0,len=path.length;for(;i1){fieldPaths[fieldPaths.length]={key:key,path:path};}else{simpleFields[simpleFields.length]={key:key,path:path[0]};}}else{}}for(i=resultsList.length-1;i>=0;--i){var r=resultsList[i],rec={};if(r){for(j=simpleFields.length-1;j>=0;--j){rec[simpleFields[j].key]=(r[simpleFields[j].path]!==undefined)?r[simpleFields[j].path]:r[j];}for(j=fieldPaths.length-1;j>=0;--j){rec[fieldPaths[j].key]=walkPath(fieldPaths[j].path,r);}for(j=fieldParsers.length-1;j>=0;--j){var p=fieldParsers[j].key;rec[p]=fieldParsers[j].parser(rec[p]);if(rec[p]===undefined){rec[p]=null;}}}results[i]=rec;}}else{results=resultsList;}for(key in metaFields){if(lang.hasOwnProperty(metaFields,key)){path=buildPath(metaFields[key]);if(path){v=walkPath(path,oFullResponse);oParsedResponse.meta[key]=v;}}}}else{oParsedResponse.error=true;}oParsedResponse.results=results;}else{oParsedResponse.error=true;}return oParsedResponse;},parseHTMLTableData:function(oRequest,oFullResponse){var bError=false;var elTable=oFullResponse;var fields=this.responseSchema.fields;var oParsedResponse={results:[]};if(lang.isArray(fields)){for(var i=0;i-1;j--){var elRow=elTbody.rows[j];var oResult={};for(var k=fields.length-1;k>-1;k--){var field=fields[k];var key=(lang.isValue(field.key))?field.key:field;var data=elRow.cells[k].innerHTML;if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}oParsedResponse.results[j]=oResult;}}}else{bError=true;}if(bError){oParsedResponse.error=true;}else{}return oParsedResponse;}};lang.augmentProto(DS,util.EventProvider);util.LocalDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_LOCAL;if(oLiveData){if(YAHOO.lang.isArray(oLiveData)){this.responseType=DS.TYPE_JSARRAY;}else{if(oLiveData.nodeType&&oLiveData.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oLiveData.nodeName&&(oLiveData.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE; +oLiveData=oLiveData.cloneNode(true);}else{if(YAHOO.lang.isString(oLiveData)){this.responseType=DS.TYPE_TEXT;}else{if(YAHOO.lang.isObject(oLiveData)){this.responseType=DS.TYPE_JSON;}}}}}}else{oLiveData=[];this.responseType=DS.TYPE_JSARRAY;}util.LocalDataSource.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.LocalDataSource,DS);lang.augmentObject(util.LocalDataSource,DS);util.FunctionDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_JSFUNCTION;oLiveData=oLiveData||function(){};util.FunctionDataSource.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.FunctionDataSource,DS,{scope:null,makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oRawResponse=(this.scope)?this.liveData.call(this.scope,oRequest,this):this.liveData(oRequest);if(this.responseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray(oRawResponse)){this.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse&&oRawResponse.nodeType&&oRawResponse.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oRawResponse&&oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){this.responseType=DS.TYPE_TEXT;}}}}}}this.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);return tId;}});lang.augmentObject(util.FunctionDataSource,DS);util.ScriptNodeDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_SCRIPTNODE;oLiveData=oLiveData||"";util.ScriptNodeDataSource.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.ScriptNodeDataSource,DS,{getUtility:util.Get,asyncMode:"allowAll",scriptCallbackParam:"callback",generateRequestCallback:function(id){return"&"+this.scriptCallbackParam+"=YAHOO.util.ScriptNodeDataSource.callbacks["+id+"]";},doBeforeGetScriptNode:function(sUri){return sUri;},makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});if(util.ScriptNodeDataSource._nPending===0){util.ScriptNodeDataSource.callbacks=[];util.ScriptNodeDataSource._nId=0;}var id=util.ScriptNodeDataSource._nId;util.ScriptNodeDataSource._nId++;var oSelf=this;util.ScriptNodeDataSource.callbacks[id]=function(oRawResponse){if((oSelf.asyncMode!=="ignoreStaleResponses")||(id===util.ScriptNodeDataSource.callbacks.length-1)){if(oSelf.responseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray(oRawResponse)){oSelf.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse.nodeType&&oRawResponse.nodeType==9){oSelf.responseType=DS.TYPE_XML;}else{if(oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){oSelf.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){oSelf.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){oSelf.responseType=DS.TYPE_TEXT;}}}}}}oSelf.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);}else{}delete util.ScriptNodeDataSource.callbacks[id];};util.ScriptNodeDataSource._nPending++;var sUri=this.liveData+oRequest+this.generateRequestCallback(id);sUri=this.doBeforeGetScriptNode(sUri);this.getUtility.script(sUri,{autopurge:true,onsuccess:util.ScriptNodeDataSource._bumpPendingDown,onfail:util.ScriptNodeDataSource._bumpPendingDown});return tId;}});lang.augmentObject(util.ScriptNodeDataSource,DS);lang.augmentObject(util.ScriptNodeDataSource,{_nId:0,_nPending:0,callbacks:[]});util.XHRDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_XHR;this.connMgr=this.connMgr||util.Connect;oLiveData=oLiveData||"";util.XHRDataSource.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.XHRDataSource,DS,{connMgr:null,connXhrMode:"allowAll",connMethodPost:false,connTimeout:0,makeConnection:function(oRequest,oCallback,oCaller){var oRawResponse=null;var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oSelf=this;var oConnMgr=this.connMgr;var oQueue=this._oQueue;var _xhrSuccess=function(oResponse){if(oResponse&&(this.connXhrMode=="ignoreStaleResponses")&&(oResponse.tId!=oQueue.conn.tId)){return null;}else{if(!oResponse){this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallback,caller:oCaller,message:DS.ERROR_DATANULL});DS.issueCallback(oCallback,[oRequest,{error:true}],true,oCaller);return null;}else{if(this.responseType===DS.TYPE_UNKNOWN){var ctype=(oResponse.getResponseHeader)?oResponse.getResponseHeader["Content-Type"]:null;if(ctype){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}else{if(ctype.indexOf("application/json")>-1){this.responseType=DS.TYPE_JSON;}else{if(ctype.indexOf("text/plain")>-1){this.responseType=DS.TYPE_TEXT;}}}}}this.handleResponse(oRequest,oResponse,oCallback,oCaller,tId);}}};var _xhrFailure=function(oResponse){this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallback,caller:oCaller,message:DS.ERROR_DATAINVALID});if(lang.isString(this.liveData)&&lang.isString(oRequest)&&(this.liveData.lastIndexOf("?")!==this.liveData.length-1)&&(oRequest.indexOf("?")!==0)){}oResponse=oResponse||{};oResponse.error=true;DS.issueCallback(oCallback,[oRequest,oResponse],true,oCaller);return null;};var _xhrCallback={success:_xhrSuccess,failure:_xhrFailure,scope:this};if(lang.isNumber(this.connTimeout)){_xhrCallback.timeout=this.connTimeout;}if(this.connXhrMode=="cancelStaleRequests"){if(oQueue.conn){if(oConnMgr.abort){oConnMgr.abort(oQueue.conn);oQueue.conn=null;}else{}}}if(oConnMgr&&oConnMgr.asyncRequest){var sLiveData=this.liveData;var isPost=this.connMethodPost;var sMethod=(isPost)?"POST":"GET";var sUri=(isPost||!lang.isValue(oRequest))?sLiveData:sLiveData+oRequest;var sRequest=(isPost)?oRequest:null;if(this.connXhrMode!="queueRequests"){oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}else{if(oQueue.conn){var allRequests=oQueue.requests; +allRequests.push({request:oRequest,callback:_xhrCallback});if(!oQueue.interval){oQueue.interval=setInterval(function(){if(oConnMgr.isCallInProgress(oQueue.conn)){return;}else{if(allRequests.length>0){sUri=(isPost||!lang.isValue(allRequests[0].request))?sLiveData:sLiveData+allRequests[0].request;sRequest=(isPost)?allRequests[0].request:null;oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,allRequests[0].callback,sRequest);allRequests.shift();}else{clearInterval(oQueue.interval);oQueue.interval=null;}}},50);}}else{oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}}}else{DS.issueCallback(oCallback,[oRequest,{error:true}],true,oCaller);}return tId;}});lang.augmentObject(util.XHRDataSource,DS);util.DataSource=function(oLiveData,oConfigs){oConfigs=oConfigs||{};var dataType=oConfigs.dataType;if(dataType){if(dataType==DS.TYPE_LOCAL){lang.augmentObject(util.DataSource,util.LocalDataSource);return new util.LocalDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_XHR){lang.augmentObject(util.DataSource,util.XHRDataSource);return new util.XHRDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_SCRIPTNODE){lang.augmentObject(util.DataSource,util.ScriptNodeDataSource);return new util.ScriptNodeDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_JSFUNCTION){lang.augmentObject(util.DataSource,util.FunctionDataSource);return new util.FunctionDataSource(oLiveData,oConfigs);}}}}}if(YAHOO.lang.isString(oLiveData)){lang.augmentObject(util.DataSource,util.XHRDataSource);return new util.XHRDataSource(oLiveData,oConfigs);}else{if(YAHOO.lang.isFunction(oLiveData)){lang.augmentObject(util.DataSource,util.FunctionDataSource);return new util.FunctionDataSource(oLiveData,oConfigs);}else{lang.augmentObject(util.DataSource,util.LocalDataSource);return new util.LocalDataSource(oLiveData,oConfigs);}}};lang.augmentObject(util.DataSource,DS);})();YAHOO.util.Number={format:function(C,G){var B=YAHOO.lang;if(!B.isValue(C)||(C==="")){return"";}G=G||{};if(!B.isNumber(C)){C*=1;}if(B.isNumber(C)){var E=(C<0);var K=C+"";var H=(G.decimalSeparator)?G.decimalSeparator:".";var I;if(B.isNumber(G.decimalPlaces)){var J=G.decimalPlaces;var D=Math.pow(10,J);K=Math.round(C*D)/D+"";I=K.lastIndexOf(".");if(J>0){if(I<0){K+=H;I=K.length-1;}else{if(H!=="."){K=K.replace(".",H);}}while((K.length-1-I)-1)?I:K.length;var L=K.substring(I);var A=-1;for(var F=I;F>0;F--){A++;if((A%3===0)&&(F!==I)&&(!E||(F>1))){L=M+L;}L=K.charAt(F-1)+L;}K=L;}K=(G.prefix)?G.prefix+K:K;K=(G.suffix)?K+G.suffix:K;return K;}else{return C;}}};(function(){var A=function(C,E,D){if(typeof D==="undefined"){D=10;}for(;parseInt(C,10)1;D/=10){C=E.toString()+C;}return C.toString();};var B={formats:{a:function(D,C){return C.a[D.getDay()];},A:function(D,C){return C.A[D.getDay()];},b:function(D,C){return C.b[D.getMonth()];},B:function(D,C){return C.B[D.getMonth()];},C:function(C){return A(parseInt(C.getFullYear()/100,10),0);},d:["getDate","0"],e:["getDate"," "],g:function(C){return A(parseInt(B.formats.G(C)%100,10),0);},G:function(E){var F=E.getFullYear();var D=parseInt(B.formats.V(E),10);var C=parseInt(B.formats.W(E),10);if(C>D){F++;}else{if(C===0&&D>=52){F--;}}return F;},H:["getHours","0"],I:function(D){var C=D.getHours()%12;return A(C===0?12:C,0);},j:function(G){var F=new Date(""+G.getFullYear()+"/1/1 GMT");var D=new Date(""+G.getFullYear()+"/"+(G.getMonth()+1)+"/"+G.getDate()+" GMT");var C=D-F;var E=parseInt(C/60000/60/24,10)+1;return A(E,0,100);},k:["getHours"," "],l:function(D){var C=D.getHours()%12;return A(C===0?12:C," ");},m:function(C){return A(C.getMonth()+1,0);},M:["getMinutes","0"],p:function(D,C){return C.p[D.getHours()>=12?1:0];},P:function(D,C){return C.P[D.getHours()>=12?1:0];},s:function(D,C){return parseInt(D.getTime()/1000,10);},S:["getSeconds","0"],u:function(C){var D=C.getDay();return D===0?7:D;},U:function(F){var C=parseInt(B.formats.j(F),10);var E=6-F.getDay();var D=parseInt((C+E)/7,10);return A(D,0);},V:function(F){var E=parseInt(B.formats.W(F),10);var C=(new Date(""+F.getFullYear()+"/1/1")).getDay();var D=E+(C>4||C<=1?0:1);if(D===53&&(new Date(""+F.getFullYear()+"/12/31")).getDay()<4){D=1;}else{if(D===0){D=B.formats.V(new Date(""+(F.getFullYear()-1)+"/12/31"));}}return A(D,0);},w:"getDay",W:function(F){var C=parseInt(B.formats.j(F),10);var E=7-B.formats.u(F);var D=parseInt((C+E)/7,10);return A(D,0,10);},y:function(C){return A(C.getFullYear()%100,0);},Y:"getFullYear",z:function(E){var D=E.getTimezoneOffset();var C=A(parseInt(Math.abs(D/60),10),0);var F=A(Math.abs(D%60),0);return(D>0?"-":"+")+C+F;},Z:function(C){var D=C.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");if(D.length>4){D=B.formats.z(C);}return D;},"%":function(C){return"%";}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"locale",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(G,F,D){F=F||{};if(!(G instanceof Date)){return YAHOO.lang.isValue(G)?G:"";}var H=F.format||"%m/%d/%Y";if(H==="YYYY/MM/DD"){H="%Y/%m/%d";}else{if(H==="DD/MM/YYYY"){H="%d/%m/%Y";}else{if(H==="MM/DD/YYYY"){H="%m/%d/%Y";}}}D=D||"en";if(!(D in YAHOO.util.DateLocale)){if(D.replace(/-[a-zA-Z]+$/,"") in YAHOO.util.DateLocale){D=D.replace(/-[a-zA-Z]+$/,"");}else{D="en";}}var J=YAHOO.util.DateLocale[D];var C=function(L,K){var M=B.aggregates[K];return(M==="locale"?J[K]:M);};var E=function(L,K){var M=B.formats[K];if(typeof M==="string"){return G[M]();}else{if(typeof M==="function"){return M.call(G,G,J);}else{if(typeof M==="object"&&typeof M[0]==="string"){return A(G[M[0]](),M[1]);}else{return K;}}}};while(H.match(/%[cDFhnrRtTxX]/)){H=H.replace(/%([cDFhnrRtTxX])/g,C);}var I=H.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,E);C=E=undefined;return I;}};YAHOO.namespace("YAHOO.util");YAHOO.util.Date=B;YAHOO.util.DateLocale={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%d/%m/%y",X:"%T"}; +YAHOO.util.DateLocale["en"]=YAHOO.lang.merge(YAHOO.util.DateLocale,{});YAHOO.util.DateLocale["en-US"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"],{c:"%a %d %b %Y %I:%M:%S %p %Z",x:"%m/%d/%Y",X:"%I:%M:%S %p"});YAHOO.util.DateLocale["en-GB"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"],{r:"%l:%M:%S %P %Z"});YAHOO.util.DateLocale["en-AU"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"]);})();YAHOO.register("datasource",YAHOO.util.DataSource,{version:"2.7.0",build:"1796"});/* +Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.7.0 +*/ +YAHOO.widget.DS_JSArray=YAHOO.util.LocalDataSource;YAHOO.widget.DS_JSFunction=YAHOO.util.FunctionDataSource;YAHOO.widget.DS_XHR=function(B,A,D){var C=new YAHOO.util.XHRDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_ScriptNode=function(B,A,D){var C=new YAHOO.util.ScriptNodeDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_XHR.TYPE_JSON=YAHOO.util.DataSourceBase.TYPE_JSON;YAHOO.widget.DS_XHR.TYPE_XML=YAHOO.util.DataSourceBase.TYPE_XML;YAHOO.widget.DS_XHR.TYPE_FLAT=YAHOO.util.DataSourceBase.TYPE_TEXT;YAHOO.widget.AutoComplete=function(G,B,J,C){if(G&&B&&J){if(J instanceof YAHOO.util.DataSourceBase){this.dataSource=J;}else{return;}this.key=0;var D=J.responseSchema;if(J._aDeprecatedSchema){var K=J._aDeprecatedSchema;if(YAHOO.lang.isArray(K)){if((J.responseType===YAHOO.util.DataSourceBase.TYPE_JSON)||(J.responseType===YAHOO.util.DataSourceBase.TYPE_UNKNOWN)){D.resultsList=K[0];this.key=K[1];D.fields=(K.length<3)?null:K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_XML){D.resultNode=K[0];this.key=K[1];D.fields=K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_TEXT){D.recordDelim=K[0];D.fieldDelim=K[1];}}}J.responseSchema=D;}}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._elTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=G;}YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input");}else{return;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._elContainer=document.getElementById(B);}else{this._elContainer=B;}if(this._elContainer.style.display=="none"){}var E=this._elContainer.parentNode;var A=E.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(E,"yui-ac");}else{}}else{return;}if(this.dataSource.dataType===YAHOO.util.DataSourceBase.TYPE_LOCAL){this.applyLocalFilter=true;}if(C&&(C.constructor==Object)){for(var I in C){if(I){this[I]=C[I];}}}this._initContainerEl();this._initProps();this._initListEl();this._initContainerHelperEls();var H=this;var F=this._elTextbox;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(B,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(B,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(B,"click",H._onContainerClick,H);YAHOO.util.Event.addListener(B,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(B,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerPopulateEvent=new YAHOO.util.CustomEvent("containerPopulate",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);this.textboxChangeEvent=new YAHOO.util.CustomEvent("textboxChange",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.applyLocalFilter=null;YAHOO.widget.AutoComplete.prototype.queryMatchCase=false;YAHOO.widget.AutoComplete.prototype.queryMatchContains=false;YAHOO.widget.AutoComplete.prototype.queryMatchSubset=false;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.typeAheadDelay=0.5;YAHOO.widget.AutoComplete.prototype.queryInterval=500;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.suppressInputUpdate=false;YAHOO.widget.AutoComplete.prototype.resultTypeList=true;YAHOO.widget.AutoComplete.prototype.queryQuestionMark=true;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.getInputEl=function(){return this._elTextbox;};YAHOO.widget.AutoComplete.prototype.getContainerEl=function(){return this._elContainer; +};YAHOO.widget.AutoComplete.prototype.isFocused=function(){return(this._bFocused===null)?false:this._bFocused;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListEl=function(){return this._elList;};YAHOO.widget.AutoComplete.prototype.getListItemMatch=function(A){if(A._sResultMatch){return A._sResultMatch;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemIndex=function(A){if(YAHOO.lang.isNumber(A._nItemIndex)){return A._nItemIndex;}else{return null;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(B){if(this._elHeader){var A=this._elHeader;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(B){if(this._elFooter){var A=this._elFooter;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(this._elBody){var B=this._elBody;YAHOO.util.Event.purgeElement(B,true);if(A){B.innerHTML=A;B.style.display="block";}else{B.innerHTML="";B.style.display="none";}this._elList=null;}};YAHOO.widget.AutoComplete.prototype.generateRequest=function(B){var A=this.dataSource.dataType;if(A===YAHOO.util.DataSourceBase.TYPE_XHR){if(!this.dataSource.connMethodPost){B=(this.queryQuestionMark?"?":"")+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}else{B=(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}else{if(A===YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE){B="&"+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}return B;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(B){this._bFocused=null;var A=(this.delimChar)?this._elTextbox.value+B:B;this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.collapseContainer=function(){this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(E){var D,C,A;for(var B=E.length;B>=this.minQueryLength;B--){A=this.generateRequest(E.substr(0,B));this.dataRequestEvent.fire(this,D,A);C=this.dataSource.getCachedResponse(A);if(C){return this.filterResults.apply(this.dataSource,[E,C,C,{scope:this}]);}}return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(C,B,A){var D=((this.responseStripAfter!=="")&&(B.indexOf))?B.indexOf(this.responseStripAfter):-1;if(D!=-1){B=B.substring(0,D);}return B;};YAHOO.widget.AutoComplete.prototype.filterResults=function(J,L,P,K){if(K&&K.argument&&K.argument.query){J=K.argument.query;}if(J&&J!==""){P=YAHOO.widget.AutoComplete._cloneObject(P);var H=K.scope,O=this,B=P.results,M=[],D=false,I=(O.queryMatchCase||H.queryMatchCase),A=(O.queryMatchContains||H.queryMatchContains);for(var C=B.length-1;C>=0;C--){var F=B[C];var E=null;if(YAHOO.lang.isString(F)){E=F;}else{if(YAHOO.lang.isArray(F)){E=F[0];}else{if(this.responseSchema.fields){var N=this.responseSchema.fields[0].key||this.responseSchema.fields[0];E=F[N];}else{if(this.key){E=F[this.key];}}}}if(YAHOO.lang.isString(E)){var G=(I)?E.indexOf(decodeURIComponent(J)):E.toLowerCase().indexOf(decodeURIComponent(J).toLowerCase());if((!A&&(G===0))||(A&&(G>-1))){M.unshift(F);}}}P.results=M;}else{}return P;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(C,A,B){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(C,A,B);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(C,A,B){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,D,A){var C=(A)?A:"";return C;};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._elTextbox;var D=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerPopulateEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();this.textboxChangeEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerPopulateEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null; +YAHOO.widget.AutoComplete.prototype.textboxChangeEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=null;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1;}var E=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(E)||(E<1)){this.maxResultsDisplayed=10;}var F=this.queryDelay;if(!YAHOO.lang.isNumber(F)||(F<0)){this.queryDelay=0.2;}var C=this.typeAheadDelay;if(!YAHOO.lang.isNumber(C)||(C<0)){this.typeAheadDelay=0.2;}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A];}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null;}}var D=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(D)||(D<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";A.style.width=0;A.style.height=0;this._elShadow=this._elContainer.appendChild(A);}if(this.useIFrame&&!this._elIFrame){var B=document.createElement("iframe");B.src=this._iFrameSrc;B.frameBorder=0;B.scrolling="no";B.style.position="absolute";B.style.width=0;B.style.height=0;B.tabIndex=-1;B.style.padding=0;this._elIFrame=this._elContainer.appendChild(B);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var C=document.createElement("div");C.className="yui-ac-content";C.style.display="none";this._elContent=this._elContainer.appendChild(C);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._elHeader=this._elContent.appendChild(B);var D=document.createElement("div");D.className="yui-ac-bd";this._elBody=this._elContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._elFooter=this._elContent.appendChild(A);}else{}};YAHOO.widget.AutoComplete.prototype._initListEl=function(){var C=this.maxResultsDisplayed;var A=this._elList||document.createElement("ul");var B;while(A.childNodes.length=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)||(A==229)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(D){if(this.minQueryLength<0){this._toggleContainer(false);return;}if(this.delimChar){var A=this._extractQuery(D);D=A.query;this._sPastSelections=A.previous;}if((D&&(D.length0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);return;}D=encodeURIComponent(D);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var C=this.getSubsetMatches(D);if(C){this.handleResponse(D,C,{query:D});return;}}if(this.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}var B=this.generateRequest(D);this.dataRequestEvent.fire(this,D,B);this.dataSource.sendRequest(B,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:D}});};YAHOO.widget.AutoComplete.prototype._populateList=function(K,F,C){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}K=(C&&C.query)?C.query:K;var H=this.doBeforeLoadData(K,F,C);if(H&&!F.error){this.dataReturnEvent.fire(this,K,F.results);if(this._bFocused||(this._bFocused===null)){var M=decodeURIComponent(K);this._sCurQuery=M; +this._bItemSelected=false;var R=F.results,A=Math.min(R.length,this.maxResultsDisplayed),J=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(A>0){if(!this._elList||(this._elList.childNodes.length=0;Q--){var P=I[Q],E=R[Q];if(this.resultTypeList){var B=[];B[0]=(YAHOO.lang.isString(E))?E:E[J]||E[this.key];var L=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(L)&&(L.length>1)){for(var N=1,S=L.length;N=A;O--){G=I[O];G.style.display="none";}}this._nDisplayedItems=A;this.containerPopulateEvent.fire(this,K,R);if(this.autoHighlight){var D=this._elList.firstChild;this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);this._typeAhead(D,K);}else{this._toggleHighlight(this._elCurListItem,"from");}H=this.doBeforeExpandContainer(this._elTextbox,this._elContainer,K,R);this._toggleContainer(H);}else{this._toggleContainer(false);}return;}}else{this.dataErrorEvent.fire(this,K);}};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var A=(this.delimChar)?this._extractQuery(this._elTextbox.value):{previous:"",query:this._elTextbox.value};this._elTextbox.value=A.previous;this.selectionEnforceEvent.fire(this,A.query);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var A=null;for(var B=0;B=0;B--){G=H.lastIndexOf(C[B]);if(G>F){F=G;}}if(C[B]==" "){for(var A=C.length-1;A>=0;A--){if(H[F-1]==C[A]){F--;break;}}}if(F>-1){E=F+1;while(H.charAt(E)==" "){E+=1;}D=H.substring(0,E);H=H.substr(E);}else{D="";}return{previous:D,query:H};};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(D){var E=this._elContent.offsetWidth+"px";var B=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var C=this._elIFrame;if(D){C.style.width=E;C.style.height=B;C.style.padding="";}else{C.style.width=0;C.style.height=0;C.style.padding=0;}}if(this.useShadow&&this._elShadow){var A=this._elShadow;if(D){A.style.width=E;A.style.height=B;}else{A.style.width=0;A.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(I){var D=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return;}if(!I){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(this._elContent.style.display=="none"){return;}}var A=this._oAnim;if(A&&A.getEl()&&(this.animHoriz||this.animVert)){if(A.isAnimated()){A.stop(true);}var G=this._elContent.cloneNode(true);D.appendChild(G);G.style.top="-9000px";G.style.width="";G.style.height="";G.style.display="";var F=G.offsetWidth;var C=G.offsetHeight;var B=(this.animHoriz)?0:F;var E=(this.animVert)?0:C;A.attributes=(I)?{width:{to:F},height:{to:C}}:{width:{to:B},height:{to:E}};if(I&&!this._bContainerOpen){this._elContent.style.width=B+"px";this._elContent.style.height=E+"px";}else{this._elContent.style.width=F+"px";this._elContent.style.height=C+"px";}D.removeChild(G);G=null;var H=this;var J=function(){A.onComplete.unsubscribeAll();if(I){H._toggleContainerHelpers(true);H._bContainerOpen=I;H.containerExpandEvent.fire(H);}else{H._elContent.style.display="none";H._bContainerOpen=I;H.containerCollapseEvent.fire(H);}};this._toggleContainerHelpers(false);this._elContent.style.display="";A.onComplete.subscribe(J);A.animate();}else{if(I){this._elContent.style.display="";this._toggleContainerHelpers(true);this._bContainerOpen=I;this.containerExpandEvent.fire(this);}else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=I;this.containerCollapseEvent.fire(this);}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){if(A){var B=this.highlightClassName;if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,B);this._elCurListItem=null;}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._elCurListItem=A;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(B,C){if(B==this._elCurListItem){return;}var A=this.prehighlightClassName;if((C=="mouseover")&&A){YAHOO.util.Dom.addClass(B,A);}else{YAHOO.util.Dom.removeClass(B,A);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(C){if(!this.suppressInputUpdate){var F=this._elTextbox;var E=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=C._sResultMatch;var D="";if(E){D=this._sPastSelections;D+=B+E;if(E!=" "){D+=" ";}}else{D=B;}F.value=D;if(F.type=="textarea"){F.scrollTop=F.scrollHeight;}var A=F.value.length;this._selectText(F,A,A);this._elCurListItem=C;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._sPastSelections=this._elTextbox.value; +this._clearInterval();this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurListItem){this._selectItem(this._elCurListItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var H=this._elCurListItem,D=-1;if(H){D=H._nItemIndex;}var E=(G==40)?(D+1):(D-1);if(E<-2||E>=this._nDisplayedItems){return;}if(H){this._toggleHighlight(H,"from");this.itemArrowFromEvent.fire(this,H);}if(E==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}else{this._elTextbox.value=this._sCurQuery;}return;}if(E==-2){this._toggleContainer(false);return;}var F=this._elList.childNodes[E],B=this._elContent,C=YAHOO.util.Dom.getStyle(B,"overflow"),I=YAHOO.util.Dom.getStyle(B,"overflowY"),A=((C=="auto")||(C=="scroll")||(I=="auto")||(I=="scroll"));if(A&&(E>-1)&&(E(B.scrollTop+B.offsetHeight)){B.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}else{if((F.offsetTop+F.offsetHeight)(B.scrollTop+B.offsetHeight)){this._elContent.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}}}}this._toggleHighlight(F,"to");this.itemArrowToEvent.fire(this,F);if(this.typeAhead){this._updateValue(F);}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseover");}else{C._toggleHighlight(D,"to");}C.itemMouseOverEvent.fire(C,D);break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=true;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseout");}else{C._toggleHighlight(D,"from");}C.itemMouseOutEvent.fire(C,D);break;case"ul":C._toggleHighlight(C._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=false;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":C._toggleHighlight(D,"to");C._selectItem(D);return;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;if(B._nTypeAheadDelayID!=-1){clearTimeout(B._nTypeAheadDelayID);}switch(C){case 9:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 27:B._toggleContainer(false);return;case 39:B._jumpSelection();break;case 38:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;case 40:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;default:B._bItemSelected=false;B._toggleHighlight(B._elCurListItem,"from");B.textboxKeyEvent.fire(B,C);break;}if(C===18){B._enableIntervalDetection();}B._nKeyCode=C;};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(C){case 9:if(B._bContainerOpen){if(B.delimChar){YAHOO.util.Event.stopEvent(A);}if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;default:break;}}else{if(C==229){B._enableIntervalDetection();}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(A,C){var B=this.value;C._initProps();var D=A.keyCode;if(C._isIgnoreKey(D)){return;}if(C._nDelayID!=-1){clearTimeout(C._nDelayID);}C._nDelayID=setTimeout(function(){C._sendQuery(B);},(C.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){if(!B._bFocused){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;B._sInitInputValue=B._elTextbox.value;B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,C){if(!C._bOverContainer||(C._nKeyCode==9)){if(!C._bItemSelected){var B=C._textMatchesOption();if(!C._bContainerOpen||(C._bContainerOpen&&(B===null))){if(C.forceSelection){C._clearSelection();}else{C.unmatchedItemSelectEvent.fire(C,C._sCurQuery);}}else{if(C.forceSelection){C._selectItem(B);}}}C._clearInterval();C._bFocused=false;if(C._sInitInputValue!==C._elTextbox.value){C.textboxChangeEvent.fire(C);}C.textboxBlurEvent.fire(C);C._toggleContainer(false);}else{C._focus();}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return this.generateRequest(A); +};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var C=[],B=this._elList.childNodes;for(var A=B.length-1;A>=0;A--){C[A]=B[A];}return C;};YAHOO.widget.AutoComplete._cloneObject=function(D){if(!YAHOO.lang.isValue(D)){return D;}var F={};if(YAHOO.lang.isFunction(D)){F=D;}else{if(YAHOO.lang.isArray(D)){var E=[];for(var C=0,B=D.length;C0){for(var B=0,A=D.length;B0){var B=(A===false?function(L){return L;}:decodeURIComponent);if(/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(J)){var H=J.split(/;\s/g),I=null,C=null,E=null;for(var D=0,F=H.length;D + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state 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 program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/docs/YUIdoc/template/dana/LICENSE_MIT.txt b/docs/YUIdoc/template/dana/LICENSE_MIT.txt new file mode 100755 index 0000000..07d27cd --- /dev/null +++ b/docs/YUIdoc/template/dana/LICENSE_MIT.txt @@ -0,0 +1,20 @@ +Copyright (c) 2010 Carlo Zottmann, http://municode.de/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/docs/YUIdoc/template/dana/README.markdown b/docs/YUIdoc/template/dana/README.markdown new file mode 100755 index 0000000..f2425fd --- /dev/null +++ b/docs/YUIdoc/template/dana/README.markdown @@ -0,0 +1,80 @@ +# YUIDoc Theme "Dana" + +I like [YUIDoc](http://developer.yahoo.com/yui/yuidoc/). I don't like its +default theme. Since I couldn't find any other themes on them internets, I +wrote my own, named "Dana". + +Since I normally use YUIDoc to document either pure Javascript or jQuery code, +I didn't keep any of the old YUI code; I've ditched pretty much everything and +started from scratch. + +Why "Dana"? Just following the lead of Evan Weaver ([RDoc theme +"Allison"](http://github.com/fauna/allison)) and Mislav ([RDoc theme +"Hanna"](http://github.com/mislav/hanna)), is all. Also it's the name of my +wife. Ah, romance. :) + +This is a work in progress. It's reasonably stable and working for me so far. +YMMV. If you encounter errors, please [create a +ticket](http://github.com/carlo/yuidoc-theme-dana/issues). + + +## Example + +Here's the original YUI documentation in its [original +look](http://developer.yahoo.com/yui/docs/index.html). + +And here is the very same documentation sporting the new [Dana +theme](http://zottmann.org/yuidoc-theme-dana-example/index.html). + +I hope you find the latter more pleasing. :) Click around a bit; check some of +the class documentations for a more in-depth comparison; play with the +filters; feel the luxurious yet cheap plastic underneath. + + +## Installation / Usage + +I assume you've got YUIDoc up and running at this point. Just +[download](http://github.com/carlo/yuidoc-theme-dana/downloads) this here +theme, unpack it, and point `yuidoc.py` to it using the script's +`-t/--template` option. + +Tested in Safari 5 (OSX), FF3.6 (OSX), IE8 (WinXP). + + +## Acknowledgements + +My thanks go to the [YUIDoc](http://developer.yahoo.com/yui/yuidoc/) guys, +obviously. The original templates might be a bit shitty unorthodox +in their free-spirited way of indention and cleanliness, but the overall +system is sound. ;) + +Also, thanks to my good friend [Mike West](http://mikewest.org/), web dev +extraordinaire, who [forked the original +YUIDoc](http://github.com/mikewest/yuidoc) and added Markdown support so I +didn't have to. Big ups, playa! + +This software uses... + +* the [Fluid 960 Grid System](http://960.gs/) by Nathan Smith, + [960.gs](http://960.gs/), dual-licensed under MIT & GNU GPL. +* [jQuery](http://jquery.com/), dual-licensed under MIT & GNU GPL. +* [jQuery-cookie](http://stilbuero.de/jquery/cookie/), by Klaus Hartl, + dual-licensed under MIT & GNU GPL. + + +## Known issues + +Code blocks (i.e. `
` tags) sometimes cause some minor layout upfuckery
+in the tables.
+
+
+## Author
+
+Carlo Zottmann, [municode.de](http://municode.de/), carlo@municode.de.  Nice
+to meet you.
+
+
+## License
+
+Dual-license, MIT & GNU GPL v2.
+
diff --git a/docs/YUIdoc/template/dana/VERSION b/docs/YUIdoc/template/dana/VERSION
new file mode 100755
index 0000000..b123147
--- /dev/null
+++ b/docs/YUIdoc/template/dana/VERSION
@@ -0,0 +1 @@
+1.1
\ No newline at end of file
diff --git a/docs/YUIdoc/template/dana/classmap.tmpl b/docs/YUIdoc/template/dana/classmap.tmpl
new file mode 100755
index 0000000..34525a4
--- /dev/null
+++ b/docs/YUIdoc/template/dana/classmap.tmpl
@@ -0,0 +1,15 @@
+YAHOO.env.classMap = ${pkgmap};
+
+YAHOO.env.resolveClass = function(className) {
+    var a=className.split('.'), ns=YAHOO.env.classMap;
+
+    for (var i=0; i div {
+  background-color: #eee;
+  margin: 0 0 1.5em 0;
+  padding: 0.5em;
+}
+
+#footer p {
+  margin: 2em 0;
+  padding: 1em 0 0 0;
+  border-top: 1px solid #eee;
+}
diff --git a/docs/generator/css/navigation.css b/docs/YUIdoc/template/dana/css/navigation.css
similarity index 89%
rename from docs/generator/css/navigation.css
rename to docs/YUIdoc/template/dana/css/navigation.css
index c2c2c03..ce201be 100755
--- a/docs/generator/css/navigation.css
+++ b/docs/YUIdoc/template/dana/css/navigation.css
@@ -21,9 +21,12 @@
 }
 
 #navigation li.selected {
-  background-color: #eef;
+  border: 1px solid #ddd;
+  background-color: #ddd;
   margin-left: 0;
-  padding-left: 1em
+  padding-left: 1em;
+  font-weight: bold;  
+  text-shadow: 0px 1px 1px white;
 }
 
 #navigation li span.access-private {
diff --git a/docs/YUIdoc/template/dana/index.tmpl b/docs/YUIdoc/template/dana/index.tmpl
new file mode 100755
index 0000000..9cd5e50
--- /dev/null
+++ b/docs/YUIdoc/template/dana/index.tmpl
@@ -0,0 +1,13 @@
+#encoding UTF-8
+
+
+
+  
+  
+  Redirecting to ${cleansedmodulename} documentation
+
+
+
+  ${cleansedmodulename} documentation
+
+
diff --git a/docs/generator/js/jquery-1.4.2.min.js b/docs/YUIdoc/template/dana/js/jquery-1.4.2.min.js
similarity index 100%
rename from docs/generator/js/jquery-1.4.2.min.js
rename to docs/YUIdoc/template/dana/js/jquery-1.4.2.min.js
diff --git a/docs/generator/js/jquery-ui-1.8.4.custom.min.js b/docs/YUIdoc/template/dana/js/jquery-ui-1.8.4.custom.min.js
similarity index 100%
rename from docs/generator/js/jquery-ui-1.8.4.custom.min.js
rename to docs/YUIdoc/template/dana/js/jquery-ui-1.8.4.custom.min.js
diff --git a/docs/generator/js/jquery.cookie.min.js b/docs/YUIdoc/template/dana/js/jquery.cookie.min.js
similarity index 100%
rename from docs/generator/js/jquery.cookie.min.js
rename to docs/YUIdoc/template/dana/js/jquery.cookie.min.js
diff --git a/docs/generator/js/main.js b/docs/YUIdoc/template/dana/js/main.js
similarity index 100%
rename from docs/generator/js/main.js
rename to docs/YUIdoc/template/dana/js/main.js
diff --git a/docs/YUIdoc/template/dana/main.tmpl b/docs/YUIdoc/template/dana/main.tmpl
new file mode 100755
index 0000000..7db9ae8
--- /dev/null
+++ b/docs/YUIdoc/template/dana/main.tmpl
@@ -0,0 +1,1079 @@
+#encoding UTF-8
+
+<%
+
+# This should probably be part of the YUIDoc Python file.  It isn't and I
+# don't feel like forking it, so bear with me. -Carlo
+
+def print_params( params ):
+  current = ""
+  arguments = []
+  
+  for param in params:
+    split_name = param["name"].split( "." )
+    name = param["name"]
+
+    if ( len( split_name ) == 2 ):
+      name = split_name[ 0 ]
+
+    if current != name:
+      arguments.append( name )
+
+    current = name
+
+  return ", ".join( arguments )
+  
+%>
+
+
+
+
+  
+
+  
+  
+
+  
+    API: $modulename
+    #if $classname#
+      → $classname class
+    #end if#
+    #if $filename#
+      → $filename (file)
+    #end if#
+  
+
+  
+  
+  
+  
+  
+  
+  
+	
+
+
+
+
+  
+ + +
+
+

+ $projectname v$version +

+
+
+ +
+
+
+ Display Filters + + + + + + + + + + + + +
+ + +
+ + + + +
+ +
+ +
+ + + + + + +
+ + #if $index +
+

+ This is the API documentation for the + $projectname. +

+

Sushi JS, is a Modular Javascript Library, that helps building large-scale Web Applications

+

Choose a module name from the list for more information.

+
+ #end if + + #if $filename + + +
+

+ file $filename +

+ + $highlightcontent +
+ + #else if $classname + +

+ #if $access# + $access + #end if# + + #if $static# + $static + #end if# + + #if $final# + $final + #end if# + + class $classname + + #if $extends + + class extends $extends + + #end if +

+ + + + #if $deprecated +
$deprecated
+ #end if + + #if $see +
+ See also: + $see +
+ #end if + +
+ $description +
+ + + #if $uses or $subclasses +
+ + #if $uses +
+

Uses…

+
    + #for $provider in $uses# +
  • + $provider +
  • + #end for +
+
+ #end if + + + #if $subclasses +
+

Known subclasses

+
    + #for $subclass in $subclasses +
  • + $subclass +
  • + #end for +
+
+ #end if + +
+ #end if + + +
+ + + #if $constructor +
+

Constructor

+ +
+ + + + + + + + + + + + + + + + + + +
+ Constructor + + Parameters + + Returns +
+ + $classname( + $print_params( $constructor.params ) + ) + + + #if $constructor.params +

Parameters:

+
    + #for $param in $constructor.params +
  • + + $param.name + <$param.type> + + $param.description +
  • + #end for +
+ #end if +
+ #if $constructor.return +

Returns:

+
    +
  • + + $constructor.return + +
  • +
+ #end if +
+ + #end if + + + #if $properties or $inherited.properties +
+ #if $properties +

Properties

+ + + + + + + + + + + #for $property in $properties + + + + + + + + + + #end for + + +
+ Properties + + Type + + Description +
+ + $property.name + + + + $property.type + + + #if $property.access# + $property.access + #end if# + #if $property.static# + $property.static + #end if# + #if $property.final# + $property.final + #end if# + + + +
+ #if $property.deprecated +
+ deprecated +
+ #end if + + $property.description + + #if $property.default +

+ Default value: + $property.default. +

+ #end if +
+
+ #end if + + #if $inherited.properties +
+ #for $superclassname in $inherited.properties +

+ Properties inherited from + $superclassname +

+ + + + + + + + + + + #for $prop in $inherited.properties[$superclassname]# + + + + + + + + + #end for + + +
+ Properties + + Notes +
+ + $prop.name + + +
+ + + #if $prop.deprecated +
+ deprecated +
+ #end if +
+
+ + #end for +
+ #end if +
+ #end if + + + #if $methods or $inherited.methods +
+ #if $methods +

Methods

+ + + + + + + + + + + #for $method in $methods + + + + + + + + + + #end for + + +
+ Methods + + Returns + + Description +
+ + $method.name( + $print_params( $method.params ) + ) + + + + $method.return.type + + + #if $method.access# + $method.access + #end if# + #if $method.static# + $method.static + #end if# + #if $method.final# + $method.final + #end if# + + + + #if $method.deprecated +
+ deprecated +
+ #end if + + $method.description + + #if $method.params +

Parameters:

+
    + #for $param in $method.params +
  • + + $param.name + <$param.type> + + $param.description +
  • + #end for +
      + #end if + + #if $method.chainable +

      + Chainable: This method is chainable. +

      + #end if + + #if $method.return.description +

      Returns:

      +
        +
      • + #if $method.return.type + + <$method.return.type> + + #end if + $method.return.description +
      • +
      + #end if +
+ + #end if + + #if $inherited.methods +
+ #for $superclassname in $inherited.methods +

+ Methods inherited from + $superclassname +

+ + + + + + + + + + + #for $method in $inherited.methods[$superclassname] + + + + + + + + + #end for + + +
+ Methods + + Notes +
+ + $method.name + + + + + #if $method.deprecated +
deprecated
+ #end if +
+ + #end for +
+ #end if + +
+ #end if + + + #if $events or $inherited.events +
+ #if $events +

Events

+ + + + + + + + + + #for $event in $events + + + + + + + + #end for + + +
+ Events + + Description +
+ + $event.name( + $print_params( $event.params ) + ) + + + #if $event.access# + $event.access + #end if# + #if $event.static# + $event.static + #end if# + #if $event.final# + $event.final + #end if# + + + + #if $event.deprecated +
+ deprecated +
+ #end if + + $event.description + + #if $event.params +

Parameters:

+
    + #for $param in $event.params +
  • + + $param.name + <$param.type> + + $param.description +
  • + #end for +
      + #end if + + #if $event.bubbles +

      + Bubbles: + This event bubbles to + $event.bubbles. + + #end if + #if $event.preventable +

      + Preventable: + This event is preventable by method e.preventDefault(). The default function executed by this event is $event.preventable. +

      + #end if +
+ + #end if + + #if $inherited.events +
+ #for $superclassname in $inherited.events +

+ Events inherited from + $superclassname +

+ + + + + + + + + + + #for $event in $inherited.events[$superclassname] + + + + + + + + + #end for + + +
+ Events + + Notes +
+ + $event.name + + + + + #if $event.deprecated +
+ deprecated +
+ #end if +
+ + #end for +
+ #end if +
+ #end if + + + #if $configs or $inherited.configs +
+ #if $configs +

Configuration Attributes

+ + + + + + + + + + + #for $config in $configs + + + + + + + + + + #end for + + +
+ Attributes + + Type + + Description +
+ + $config.name + + + + $config.type + + + #if $config.access# + $config.access + #end if# + #if $config.static# + $config.static + #end if# + #if $config.static# + $config.writeonce + #end if# + #if $config.final# + $config.final + #end if# + + + +
+ #if $config.deprecated +
+ deprecated +
+ #end if + + $config.description + + #if $config.default +
+ Default value: + $config.default +
+ #end if +
+
+ + #end if + + #if $inherited.configs +
+ #for $superclassname in $inherited.configs +

+ Configuration Attributes inherited from + $superclassname +

+ + + + + + + + + + + #for $config in $inherited.configs[$superclassname] + + + + + + + + + #end for + + +
+ Attributes + + Notes +
+ + $config.name + + + + + #if $config.deprecated +
+ deprecated +
+ #end if +
+ + #end for +
+ #end if + +
+ #end if + + + #else if $modulename + +

+ module $modulename + + #if $beta + beta + #end if + + #if $experimental + experimental + #end if +

+ +
+ $moduledesc + + #if $requires +

+ Requires: + $requires +

+ #end if + + #if $optional +

+ Optional: + $optional +

+ #end if +
+ + + + #if $classnames or len($submodules) > 0 +
+ + #if $classnames +
+

Contained Classes

+ +
+ #end if + + + #if len($submodules) > 0 +
+

Submodules

+
    + #for $info in $submodules +
  • + $info + $subdata[$info].description +
  • + #end for +
+
+ #end if + +
+ #end if + + #end if + + + +
+ + +
+ +
+ + +
+ + + + + + + + + + + diff --git a/docs/YUIdoc/template/index.tmpl b/docs/YUIdoc/template/index.tmpl new file mode 100644 index 0000000..0d4f505 --- /dev/null +++ b/docs/YUIdoc/template/index.tmpl @@ -0,0 +1,9 @@ + + + + + + + diff --git a/docs/YUIdoc/template/main.tmpl b/docs/YUIdoc/template/main.tmpl new file mode 100644 index 0000000..835c9b4 --- /dev/null +++ b/docs/YUIdoc/template/main.tmpl @@ -0,0 +1,695 @@ +#encoding UTF-8 + + + + + API: $modulename #if $classname# $classname #end if# #if $filename# $filename #end if# (YUI Library) + + + + + + + + + + +
+
+

$projectname

+

$moduletitle  $version

+ $projectname + #if $modulename + > $modulename + #if $classname# > $classname #end if# + #if $filename# > $filename (source view) #end if# + #end if +
+
+ Search: +
+   +
+
+
+
+ +
+
+
+
+
+ Filters + + + +
+
+ #if $index + +
+ This is the API documentation for the + $projectname. +

Choose a module name from the list for more information.

+
+ + #end if + + #if $filename +
+ + $highlightcontent +
+ #else if $classname +

+ #if $access#$access#end if# + + #if $static#$static#end if# + #if $final#$final#end if# + Class $classname + + #if $extends + - extends $extends + #end if + + + #if $uses + + - uses + #set $i=0 + #for $provider in $uses##if $i > 0#, #end if# + + $provider#set $i=$i+1# + + #end for# + + + #end if +

+ + + #if $subclasses +
+
Known Subclasses:
+
+ #for $subclass in $subclasses + + $subclass + + #end for +
+
+ #end if + + #if $deprecated +
Deprecated: $deprecated
+ #end if + + #if $see +
See also: $see
+ #end if + +
+ $description +
+ + #if $constructor +
+

Constructor

+
+
+ $classname + + ( + #if $constructor.params + #set $i=0 + #set $current="" + + #for $param in $constructor.params# + #if $current != $param.name + #if $i > 0#, #end if# + #set $i = $i + 1 + #set $current = $param.name + $param.name + #end if + #end for + #end if + ) + +
+ #if $constructor.params +
+
Parameters:
+ #for $param in $constructor.params +
+ $param.name + <$param.type> + + $param.description +
+ #end for +
+ #end if + + #if $constructor.return +
+
Returns:
+
+ $constructor.return +
+
+ #end if + +
+
+
+
+ #end if + +
+ #if $properties +
+

Properties

+
+ #for $property in $properties +
+

$property.name + - #if $property.access#$property.access #end if##if $property.static#$property.static #end if##if $property.final#$property.final #end if#$property.type +

+
+
+ $property.description +
+
+ + + #if $property.default +
+ Default Value: $property.default +
+ #end if + + #if $property.deprecated +
+ Deprecated: $property.deprecated +
+ #end if + +
+
+ #end for +
+
+ #end if + + #if $inherited.properties +
+ #for $superclassname in $inherited.properties +
+

Properties inherited from $superclassname:

+
+ + #set i=0 + #set l=len($inherited.properties[$superclassname])-1 + #for $prop in $inherited.properties[$superclassname]# + + $prop.name#if $i<$l#,#end if# + + #set i=i+1 + #end for# + +
+
+ #end for +
+ #end if +
+ +
+ #if $methods +
+

Methods

+
+ #for $method in $methods +
+

+ $method.name

+
+ + #if $method.access# $method.access #end if# + #if $method.static# $method.static #end if# + #if $method.final# $method.final #end if# + $method.return.type + $method.name + ( + #if $method.params + #set $i=0 + #set $current = "" + #for $param in $method.params# + #if $current != $param.name + #if $i > 0#, #end if# + #set $i = $i + 1 + #set $current = $param.name + $param.name + #end if# + #end for# + #end if + ) + + +
+ $method.description +
+ +
+ + #if $method.params +
+
Parameters:
+ #for $param in $method.params +
+ $param.name + <$param.type> + + $param.description +
+ #end for +
+ #end if + + #if $method.return.description +
+
Returns: + + #if $method.return.type + $method.return.type + #end if +
+
$method.return.description
+
+ #end if + + #if $method.chainable +
+ Chainable: This method is chainable. +
+ #end if + + + #if $method.deprecated +
+ Deprecated $method.deprecated +
+ #end if + +
+ +
+
+
+ #end for +
+
+ #end if + + #if $inherited.methods +
+ #for $superclassname in $inherited.methods +
+

Methods inherited from $superclassname:

+
+ + #set i=0 + #set l=len($inherited.methods[$superclassname])-1 + #for $method in $inherited.methods[$superclassname] + + $method.name#if $i<$l#,#end if# + + #set i=i+1 + #end for + +
+
+ #end for +
+ #end if +
+ +
+ #if $events +
+

Events

+
+ #for $event in $events +
+

+ $event.name

+
+ + #if $event.access# $event.access #end if# + #if $event.static# $event.static #end if# + #if $event.final# $event.final #end if# + $event.name + + ( + #if $event.params + #set $i=0 + #set $current = "" + #for $param in $event.params# + #if $current != $param.name + #if $i > 0#, #end if# + #set $i = $i + 1 + #set $current = $param.name + $param.name + #end if# + #end for# + #end if + ) + + + +
+ $event.description +
+ +
+ + + #if $event.params +
+
Parameters:
+ #for $param in $event.params +
+ $param.name + <$param.type> + + $param.description +
+ + #end for +
+ #end if + + #if $event.bubbles +
+ Bubbles: This event bubbles to $event.bubbles. +
+ #end if + #if $event.preventable +
+ Preventable: This event is preventable by method e.preventDefault(). The default function executed by this event is $event.preventable. +
+ #end if + + #if $event.deprecated +
+ Deprecated $event.deprecated +
+ #end if +
+ +
+
+
+ #end for +
+
+ #end if + + + #if $inherited.events +
+ #for $superclassname in $inherited.events +
+

Events inherited from $superclassname:

+
+ + #set i=0 + #set l=len($inherited.methods[$superclassname])-1 + #for $event in $inherited.events[$superclassname] + #set i=i+1 + + $event.name#if $i<$l#,#end if##set i=i+1# + + #end for# + +
+
+ #end for +
+ #end if +
+ +
+ #if $configs +
+

Configuration Attributes

+
+ #for $config in $configs +
+

$config.name + - #if $config.access#$config.access #end if##if $config.static#$config.static #end if##if $config.writeonce#$config.writeonce #end if##if $config.final#$config.final #end if#$config.type +

+
+
+ $config.description +
+
+ + #if $config.deprecated +
+ Deprecated $config.deprecated +
+ #end if + + #if $config.default +
+ Default Value: $config.default +
+ #end if + +
+
+ #end for + +
+
+ #end if + + #if $inherited.configs +
+ #for $superclassname in $inherited.configs +
+

Configuration attributes inherited from $superclassname:

+
+ + #set i=0 + #set l=len($inherited.configs[$superclassname])-1 + #for $config in $inherited.configs[$superclassname] + #set i=i+1 + + $config.name#if $i<$l#,#end if# + + #set i=i+1 + #end for# + +
+
+ #end for +
+ #end if +
+ + #else if $modulename + +

Module: $modulename + + #if $beta + Beta + #end if + + #if $experimental + Experimental + #end if + +

+
+ $moduledesc +
+ + + #if $requires +
+ Requires: $requires +
+ #end if + #if $optional +
+ Optional: $optional +
+ #end if + +
+
+ + #if $classnames +

This module contains the following classes:

+ +
+
    + #set $counter = 0 + #for $classNames in $classList_raw +
  • $classNames.guessedname
  • + #set $counter = $counter + 1 + #end for +
+
+ #end if +
+
+ #set count = 0; + #for $info in $submodules + #set count = count + 1 + #end for + #if count != 0 +
+

Submodules:

+
+ #for $info in $submodules +
$info
+
$subdata[$info].description
+ #end for +
+
+ #end if + +
+
+ + #end if +
+
+
+ +
+
+
+
+ Copyright © $year $copyrighttag All rights reserved. +
+
+ +#if $ydn + + + + +#end if + + diff --git a/docs/YUIdoc/test/apidocs.sh b/docs/YUIdoc/test/apidocs.sh new file mode 100755 index 0000000..2807cf2 --- /dev/null +++ b/docs/YUIdoc/test/apidocs.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +# The location of the files to parse. Parses subdirectories, but will fail if +# there are duplicate file names in these directories. +# parser_in="$src/animation \ +# $src/attribute \ +# $src/base \ +# $src/dd \ +# $src/dom \ +# $src/json \ +# $src/json-parse \ +# $src/json-stringify \ +# $src/node \ +# $src/queue \ +# $src/yui" +#parser_in="$src" + +parser_in="$src/yui \ + $src/anim \ + $src/attribute \ + $src/base \ + $src/cache \ + $src/classnamemanager \ + $src/collection \ + $src/console \ + $src/console-filters \ + $src/cookie \ + $src/dataschema \ + $src/datasource \ + $src/datatype \ + $src/dd \ + $src/dom \ + $src/dump \ + $src/event \ + $src/event-custom \ + $src/event-simulate \ + $src/history \ + $src/imageloader \ + $src/io \ + $src/json \ + $src/node \ + $src/node-focusmanager \ + $src/node-menunav \ + $src/oop \ + $src/overlay \ + $src/plugin \ + $src/profiler \ + $src/slider \ + $src/stylesheet \ + $src/substitute \ + $src/test \ + $src/widget \ + $src/widget-position \ + $src/widget-position-ext \ + $src/widget-stdmod \ + $src/widget-stack" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version=`cat version.txt` + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/base.sh b/docs/YUIdoc/test/base.sh new file mode 100755 index 0000000..fc70b51 --- /dev/null +++ b/docs/YUIdoc/test/base.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +parser_in="$src/base/js" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version="localtest" + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/dd.sh b/docs/YUIdoc/test/dd.sh new file mode 100755 index 0000000..9162006 --- /dev/null +++ b/docs/YUIdoc/test/dd.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +parser_in="$src/dd/js" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version="localtest" + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/event.sh b/docs/YUIdoc/test/event.sh new file mode 100755 index 0000000..a5c557f --- /dev/null +++ b/docs/YUIdoc/test/event.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +parser_in="$src/yui/js $src/event-custom/js $src/event/js $src/dump/js $src/substitute/js $src/anim/js $src/collection/js $src/base/js $src/attribute/js" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version=test + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/intl.sh b/docs/YUIdoc/test/intl.sh new file mode 100755 index 0000000..d982473 --- /dev/null +++ b/docs/YUIdoc/test/intl.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=. + +parser_in="$src/intl" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version="localtest" + +############################################################################## + +python $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/intl/intl.js b/docs/YUIdoc/test/intl/intl.js new file mode 100644 index 0000000..70359cb --- /dev/null +++ b/docs/YUIdoc/test/intl/intl.js @@ -0,0 +1,50 @@ +/** + * The text module lets you format and parse text in many languages from around the world. + *

This module uses the following identifiers: + *

    + *
  • Languages: RFC 4646 language tags, such as "en-GB" (English as used + * in the United Kingdom), "zh-Hans-CN" (simpified Chinese as used in China). + *
  • + *
  • Time zones: tz database identifiers, such as "Europe/Berlin" + * (time zone of Germany), "America/Los_Angeles" (Pacific time zone in the United States), + * "Asia/Kolkata" (time zone of India). + *
  • + *
+ *

+ * @module text + */ + +/** + * Provides functionality for formatting date and time information. + * @class DateFormat + * @constructor + * @param {Style | Style[] | String} style Style constant or pattern string for the desired date format. + * @param {String} language The RFC 4646 language tag for the language of the date format. + * @param {String} timeZone future The tz database identifier for the time zone of the date format. + * Optional - the browser time zone is used by default. + */ + +/** + * future Calendar month format. Examples: + *
    + *
  • June 2009 + *
  • 2009年6月 + *
+ * @property CALENDAR_MONTH + */ + +/** + * subclass method + * @method subclassmethod + */ + +/** + * DateFormat subclass + * @class DateFormatSubclass + * @extends DateFormat + */ + +/** + * subclass method + * @method subclassmethod + */ diff --git a/docs/YUIdoc/test/json.sh b/docs/YUIdoc/test/json.sh new file mode 100755 index 0000000..3a5e003 --- /dev/null +++ b/docs/YUIdoc/test/json.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +parser_in="$src/io/js $src/json/js" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version=test + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/lang.sh b/docs/YUIdoc/test/lang.sh new file mode 100755 index 0000000..b6c8c6c --- /dev/null +++ b/docs/YUIdoc/test/lang.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +# The location of the files to parse. Parses subdirectories, but will fail if +# there are duplicate file names in these directories. +# parser_in="$src/animation \ +# $src/attribute \ +# $src/base \ +# $src/dd \ +# $src/dom \ +# $src/json \ +# $src/json-parse \ +# $src/json-stringify \ +# $src/node \ +# $src/queue \ +# $src/yui" + +# parser_in="lang" +parser_in="lang/java lang/python lang/perl lang/ruby" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version=`test` + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -e .py,.java,.rb,.pl -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/lang/cs/test.cs b/docs/YUIdoc/test/lang/cs/test.cs new file mode 100644 index 0000000..8fdff97 --- /dev/null +++ b/docs/YUIdoc/test/lang/cs/test.cs @@ -0,0 +1,25 @@ +using System; +/** +* C# Module Description +* @module lang.csharp +*/ + +/** +* C# Class Description +* @class ReadAll +* @namespace PlayingAround +*/ +namespace PlayingAround { + class ReadAll { + /** + * Main Method + * @method Main + * @static + */ + public static void Main(string[] args) { + string contents = System.IO.File.ReadAllText(@"C:\t1"); + Console.Out.WriteLine("contents = " + contents); + } + } +} + diff --git a/docs/YUIdoc/test/lang/java/test.java b/docs/YUIdoc/test/lang/java/test.java new file mode 100644 index 0000000..0c6034b --- /dev/null +++ b/docs/YUIdoc/test/lang/java/test.java @@ -0,0 +1,36 @@ +/** +* Test Java Module Description +* @module lang.javatest +*/ +import java.util.*; + +/** +* This is the class description for this Java Class +* @class Test +* @namespace Java +* @constructor +*/ +public class Test { + /** + * x property + * @property x + * @type {Double} + */ + private double x; + /** + * y property + * @property y + * @type {Double} + */ + private double y; + + /** + * Main Method + * @method main + */ + public static void main (String[] args) { + System.out.println("Hello, World!!"); + } + +} + diff --git a/docs/YUIdoc/test/lang/perl/test.pl b/docs/YUIdoc/test/lang/perl/test.pl new file mode 100644 index 0000000..e224527 --- /dev/null +++ b/docs/YUIdoc/test/lang/perl/test.pl @@ -0,0 +1,39 @@ +#!/usr/bin/env perl +=begin +/** +* Test Perl File +* @module lang.perltest +*/ +=cut +use strict; +=begin +/** +* Test Perl Class +* @class PerlTest +* @namespace Perl +*/ +=cut + +=begin +/** +* Arith Method +* @method arith +*/ +=cut +sub arith($); + +my %h = ( + 'add' => '+', + 'sub' => '-', + 'mul' => '*', + 'div' => '/', +); + +print arith(eval $ARGV[0]), "\n"; + +sub arith($) { + my $a = shift; + ref $a ? eval join $h{$a->[0]}, map arith($_), @{$a}[1..$#$a] : $a; +} + + diff --git a/docs/YUIdoc/test/lang/php/test.php b/docs/YUIdoc/test/lang/php/test.php new file mode 100644 index 0000000..36eb555 --- /dev/null +++ b/docs/YUIdoc/test/lang/php/test.php @@ -0,0 +1,53 @@ + diff --git a/docs/YUIdoc/test/lang/python/test.py b/docs/YUIdoc/test/lang/python/test.py new file mode 100644 index 0000000..9d7a05d --- /dev/null +++ b/docs/YUIdoc/test/lang/python/test.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +''' +/** +* Test Python File +* @module testpy +*/ +''' +import os, sys, string, shutil, urllib2, urllib, pprint, simplejson, datetime +from cStringIO import StringIO +from subprocess import call, PIPE, Popen + +''' +/** +* This is a test class +* @class TestPy +* @namespace Python +*/ +''' + +''' +/** +* Test Method +* @method test +*/ +''' +def test(): + pass diff --git a/docs/YUIdoc/test/lang/ruby/test.rb b/docs/YUIdoc/test/lang/ruby/test.rb new file mode 100644 index 0000000..93dbf18 --- /dev/null +++ b/docs/YUIdoc/test/lang/ruby/test.rb @@ -0,0 +1,73 @@ +#!/usr/bin/env ruby -w + +=begin +/** +* Module Info for test Ruby File +* @module lang.rubytest +*/ +=end + +require 'rubygems' +require 'grit' +require 'optparse' +require 'logger' +require 'fileutils' + + +module RubyTest +=begin +/** +* Class Information +* @class test +* @namespace Ruby +*/ +=end + class Test +=begin +/** +* Execute desc +* @method execute +*/ +=end + + def self.execute + #foo + end +=begin +/** +* Parse desc +* @method parse +*/ +=end + + def self.parse(args) + #foo + end +=begin +/** +* Initialize Method +* @method initialize +*/ +=end + + def initialize(args) +=begin +/** +* Args Property +* @property args +*/ +=end + @args = args.foo +=begin +/** +* Bar Property +* @property bar +*/ +=end + @bar = 'Bar' + end + + end +end + + diff --git a/docs/YUIdoc/test/node.sh b/docs/YUIdoc/test/node.sh new file mode 100755 index 0000000..fd4dcdd --- /dev/null +++ b/docs/YUIdoc/test/node.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +parser_in="$src/node/js" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version="localtest" + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/queue.sh b/docs/YUIdoc/test/queue.sh new file mode 100755 index 0000000..b268372 --- /dev/null +++ b/docs/YUIdoc/test/queue.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +parser_in="$src/queue/js" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version=`cat version.txt` + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/YUIdoc/test/yui.sh b/docs/YUIdoc/test/yui.sh new file mode 100755 index 0000000..c77ef83 --- /dev/null +++ b/docs/YUIdoc/test/yui.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +############################################################################## + +# The location of your yuidoc install +# yuidoc_home=yahoo/presentation/tools/yuidoc +# yuidoc_home=~/www/yuidoc/yuidoc +yuidoc_home=.. + +src=~/src/yui3/src + +parser_in="$src/yui/js" + +# The location to output the parser data. This output is a file containing a +# json string, and copies of the parsed files. +parser_out=build_tmp/yuidoc_tmp + +# The directory to put the html file outputted by the generator +generator_out=build_tmp/api + +# The location of the template files. Any subdirectories here will be copied +# verbatim to the destination directory. +template=$yuidoc_home/template + +version="localtest" + +############################################################################## + +$yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $* + diff --git a/docs/generator/css/main.css b/docs/generator/css/main.css deleted file mode 100755 index 2b945ab..0000000 --- a/docs/generator/css/main.css +++ /dev/null @@ -1,54 +0,0 @@ -* { - line-height: 130%; -} - -body { - background-color: #eee; -} - -p, dl, hr, h1, h2, h3, h4, h5, h6, ol, ul, pre, table, address, fieldset { - margin-bottom: 0.8em; -} - - -a { - text-decoration: none; - color: #55d; -} - -code, code a[name] { - color: #007000; - font-family: "Droid Sans Mono"; -} - - -#container { - background-color: #fff; -} - - -#hd h1 { - font-size: 2.3em; - line-height: 100%; - margin: 0.5em 0 0.5em 0; - font-weight: normal; - color: #888; -} - -#hd h1 a { - color: #222; - font-weight: bold; -} - - -#sub-hd > div { - background-color: #eee; - margin: 0 0 1.5em 0; - padding: 0.5em; -} - -#footer p { - margin: 2em 0; - padding: 1em 0 0 0; - border-top: 5pt solid #eee; -} diff --git a/docs/generator/index.json b/docs/generator/index.json deleted file mode 100644 index d14fe07..0000000 --- a/docs/generator/index.json +++ /dev/null @@ -1 +0,0 @@ -[{"url": "Sushi.events.html#method_contains", "access": "", "host": "Sushi.events", "type": "method", "name": "contains"}, {"url": "Sushi.events.html#method_dir", "access": "", "host": "Sushi.events", "type": "method", "name": "dir"}, {"url": "Sushi.events.html#method_each", "access": "", "host": "Sushi.events", "type": "method", "name": "each"}, {"url": "Sushi.events.html#method_error", "access": "", "host": "Sushi.events", "type": "method", "name": "error"}, {"url": "Sushi.core.html#method_extend", "access": "", "host": "Sushi.core", "type": "method", "name": "extend"}, {"url": "Sushi.events.html#method_filter", "access": "", "host": "Sushi.events", "type": "method", "name": "filter"}, {"url": "Sushi.utils.html#method_identity", "access": "", "host": "Sushi.utils", "type": "method", "name": "identity"}, {"url": "Sushi.utils.html#method_isArguments", "access": "", "host": "Sushi.utils", "type": "method", "name": "isArguments"}, {"url": "Sushi.utils.html#method_isArray", "access": "", "host": "Sushi.utils", "type": "method", "name": "isArray"}, {"url": "Sushi.utils.html#method_isDate", "access": "", "host": "Sushi.utils", "type": "method", "name": "isDate"}, {"url": "Sushi.utils.html#method_isElement", "access": "", "host": "Sushi.utils", "type": "method", "name": "isElement"}, {"url": "Sushi.utils.html#method_isEmpty", "access": "", "host": "Sushi.utils", "type": "method", "name": "isEmpty"}, {"url": "Sushi.utils.html#method_isEqual", "access": "", "host": "Sushi.utils", "type": "method", "name": "isEqual"}, {"url": "Sushi.utils.html#method_isFunction", "access": "", "host": "Sushi.utils", "type": "method", "name": "isFunction"}, {"url": "Sushi.utils.html#method_isNaN", "access": "", "host": "Sushi.utils", "type": "method", "name": "isNaN"}, {"url": "Sushi.utils.html#method_isNull", "access": "", "host": "Sushi.utils", "type": "method", "name": "isNull"}, {"url": "Sushi.utils.html#method_isNumber", "access": "", "host": "Sushi.utils", "type": "method", "name": "isNumber"}, {"url": "Sushi.utils.html#method_isRegExp", "access": "", "host": "Sushi.utils", "type": "method", "name": "isRegExp"}, {"url": "Sushi.utils.html#method_isUndefined", "access": "", "host": "Sushi.utils", "type": "method", "name": "isUndefined"}, {"url": "Sushi.utils.html#method_keys", "access": "", "host": "Sushi.utils", "type": "method", "name": "keys"}, {"url": "Sushi.events.html#method_log", "access": "", "host": "Sushi.events", "type": "method", "name": "log"}, {"url": "Sushi.events.html#method_logHistory", "access": "", "host": "Sushi.events", "type": "method", "name": "logHistory"}, {"url": "Sushi.events.html#method_map", "access": "", "host": "Sushi.events", "type": "method", "name": "map"}, {"url": "Sushi.core.html#method_namespace", "access": "", "host": "Sushi.core", "type": "method", "name": "namespace"}, {"url": "Sushi.utils.html#method_parse", "access": "", "host": "Sushi.utils", "type": "method", "name": "parse"}, {"url": "Sushi.events.html#method_pluck", "access": "", "host": "Sushi.events", "type": "method", "name": "pluck"}, {"url": "Sushi.events.html#method_publish", "access": "", "host": "Sushi.events", "type": "method", "name": "publish"}, {"url": "Sushi.utils.html#method_range", "access": "", "host": "Sushi.utils", "type": "method", "name": "range"}, {"url": "Sushi.events.html#method_reduce", "access": "", "host": "Sushi.events", "type": "method", "name": "reduce"}, {"url": "Sushi.events.html#method_reduceRight", "access": "", "host": "Sushi.events", "type": "method", "name": "reduceRight"}, {"url": "Sushi.utils.html#method_replaceAccents", "access": "", "host": "Sushi.utils", "type": "method", "name": "replaceAccents"}, {"url": "Sushi.events.html#method_some", "access": "", "host": "Sushi.events", "type": "method", "name": "some"}, {"url": "Sushi.utils.html#method_stringify", "access": "", "host": "Sushi.utils", "type": "method", "name": "stringify"}, {"url": "Sushi.events.html#method_subscribe", "access": "", "host": "Sushi.events", "type": "method", "name": "subscribe"}, {"url": "Sushi.events.html#method__supports", "access": "", "host": "Sushi.events", "type": "method", "name": "_supports"}, {"url": "Sushi.events.html#method_toArray", "access": "", "host": "Sushi.events", "type": "method", "name": "toArray"}, {"url": "Sushi.utils.html#method_uniqueId", "access": "", "host": "Sushi.utils", "type": "method", "name": "uniqueId"}, {"url": "Sushi.events.html#method_unsubscribe", "access": "", "host": "Sushi.events", "type": "method", "name": "unsubscribe"}, {"url": "Sushi.events.html#method_warn", "access": "", "host": "Sushi.events", "type": "method", "name": "warn"}] \ No newline at end of file diff --git a/docs/generator/raw.json b/docs/generator/raw.json deleted file mode 100644 index cc90652..0000000 --- a/docs/generator/raw.json +++ /dev/null @@ -1 +0,0 @@ -{"majorversion": 0, "filemap": {"sushi.Model.js": {"classlist": [], "name": "sushi.Model.js", "module": "Sushi"}, "sushi.utils.js": {"classlist": ["Sushi.utils"], "name": "sushi.utils.js", "module": "Sushi"}, "sushi.utils.debug.js": {"classlist": [], "name": "sushi.utils.debug.js", "module": "Sushi"}, "sushi.utils.json.js": {"classlist": [], "name": "sushi.utils.json.js", "module": "Sushi"}, "sushi.events.pubsub.js": {"classlist": [], "name": "sushi.events.pubsub.js", "module": "Sushi"}, "sushi.core.js": {"classlist": ["Sushi.core"], "name": "sushi.core.js", "module": "Sushi"}, "sushi.base.js": {"classlist": ["Sushi.base"], "name": "sushi.base.js", "module": "Sushi"}, "requireplugins-jquery-1.4.4.js": {"classlist": [], "name": "requireplugins-jquery-1.4.4.js", "module": "Sushi"}, "sushi.utils.collection.js": {"classlist": [], "name": "sushi.utils.collection.js", "module": "Sushi"}, "sushi.events.js": {"classlist": ["Sushi.events"], "name": "sushi.events.js", "module": "Sushi"}, "sushi.utils.lang.js": {"classlist": [], "name": "sushi.utils.lang.js", "module": "Sushi"}}, "modules": {"Sushi": {"description": "Sushi Core", "submodules": [], "classlist": ["Sushi.base", "Sushi.core", "Sushi.events", "Sushi.utils"], "filelist": ["requireplugins-jquery-1.4.4.js", "sushi.Model.js", "sushi.base.js", "sushi.core.js", "sushi.events.js", "sushi.events.pubsub.js", "sushi.utils.collection.js", "sushi.utils.debug.js", "sushi.utils.js", "sushi.utils.json.js", "sushi.utils.lang.js"], "subdata": {}, "name": "Sushi"}}, "classmap": {"Sushi.utils": {"name": "Sushi.utils", "namespace": "Sushi", "module": "Sushi", "methods": {"isArray": {"return": {"type": "Boolean", "description": "Whether argument is an array or not"}, "params": [{"type": "", "name": "array", "description": " Argument to test"}], "description": "Checks for array-ness", "guessedname": "isArray", "guessedtype": "function"}, "isRegExp": {"return": {"type": "Boolean", "description": "Whether argument is a RegExp or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is a Regular Expression", "guessedname": "isRegExp", "guessedtype": "function"}, "isDate": {"return": {"type": "Boolean", "description": "Whether variable is a date"}, "params": [{"type": "", "name": "obj", "description": " Variable to test"}], "description": "Checks whether a given variable is a date", "guessedname": "isDate", "guessedtype": "function"}, "replaceAccents": {"return": {"type": "String", "description": "string without accented characters in lower case"}, "params": [{"type": "String", "name": "string", "description": " with accented characters"}], "description": "Converts every accented letter in a string with its non-accented equivalent.\nCurrently WIP, trying to squeeze this function as much as possible. \n(≈3ms per string, with 2 calls ≈ 1.5ms per call)", "guessedname": "replaceAccents", "guessedtype": "function"}, "stringify": {"return": {"type": "String", "description": "Well formatted JSON string"}, "params": [{"type": "Object", "name": "literal", "description": " Literal Notated Javascript Object"}], "description": "Converts a Javascript literal object into a well formatted JSON string", "guessedname": "stringify", "guessedtype": "function"}, "keys": {"return": {"type": "", "description": "Array containing the object's key names."}, "params": [{"type": "", "name": "obj", "description": " Object to retrieve keys from"}], "description": "Retrieve the names of an object's properties.\nDefaults to ECMAScript 5's native Object.keys. Lifted from Underscore JS.", "guessedname": "keys", "guessedtype": "function"}, "isNaN": {"return": {"type": "Boolean", "description": "Whether argument is NaN or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is NaN\nNaN happens to be the only object in Javascript that is not equal to itself.", "guessedname": "isNaN", "guessedtype": "function"}, "parse": {"return": {"type": "Object", "description": "Well formatted JS literal"}, "params": [{"type": "String", "name": "string", "description": " JSON-formatted string"}], "description": "Converts a JSON-formatted string into a Javascript literal object", "guessedname": "parse", "guessedtype": "function"}, "isNull": {"return": {"type": "Boolean", "description": "Whether argument is equal to null or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object's value is equal to null", "guessedname": "isNull", "guessedtype": "function"}, "range": {"return": {"type": "", "description": "Array containing the progression."}, "params": [{"type": "", "name": "start", "description": " Value to start progression from. Defaults to 0"}, {"type": "", "name": "stop", "description": " Value to stop progression at"}, {"type": "", "name": "step", "description": " Value to increment progression by. Defaults to 1"}], "description": "Generate an integer Array containing an arithmetic progression.\nA port of the native Python range(). Lifted from Underscore JS.\nSee http://docs.python.org/library/functions.html#range for more info.", "guessedname": "range", "guessedtype": "function"}, "isEmpty": {"return": {"type": "Boolean", "description": "Whether argument is empty or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is empty", "guessedname": "isEmpty", "guessedtype": "function"}, "uniqueId": {"return": {"type": "", "description": "Unique ID"}, "params": [{"type": "", "name": "prefix", "description": " Optional prefix to prepend to the unique ID"}], "description": "Generates a unique integer ID (within the client session)", "guessedname": "uniqueId", "guessedtype": "function"}, "isEqual": {"return": {"type": "Boolean", "description": "Whether objects are equal or not"}, "params": [{"type": "", "name": "a", "description": " First object"}, {"type": "", "name": "b", "description": " Second object"}], "description": "Performs a deep comparison to check if two objects are equal.", "guessedname": "isEqual", "guessedtype": "function"}, "isElement": {"return": {"type": "Boolean", "description": "Whether argument is a DOM node or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is a DOM node", "guessedname": "isElement", "guessedtype": "function"}, "isFunction": {"return": {"type": "Boolean", "description": "Whether argument is a function or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is a function", "guessedname": "isFunction", "guessedtype": "function"}, "isNumber": {"return": {"type": "Boolean", "description": "Whether value is a number or not."}, "params": [{"type": "", "name": "number", "description": " Value to test"}], "description": "Detects whether a value is a number", "guessedname": "isNumber", "guessedtype": "function"}, "isUndefined": {"return": {"type": "Boolean", "description": "Whether argument is equal to undefined or not"}, "params": [{"type": "", "name": "obj", "description": " Object to test"}], "description": "Checks if an object is equal to undefined", "guessedname": "isUndefined", "guessedtype": "function"}, "identity": {"return": {"type": "", "description": "Value passed in to the function"}, "params": [{"type": "", "name": "value", "description": " Value to return"}], "description": "Default iterator object", "guessedname": "identity", "guessedtype": "function"}, "isArguments": {"return": {"type": "Boolean", "description": "Whether variable is an arguments object"}, "params": [{"type": "", "name": "obj", "description": " Variable to test"}], "description": "Checks whether a given variable is an arguments object", "guessedname": "isArguments", "guessedtype": "function"}}, "file": "sushi.utils.js", "shortname": "utils", "description": "General purpose utility functions for the Sushi JS framework"}, "Sushi.base": {"name": "Sushi.base", "namespace": "Sushi", "module": "Sushi", "file": "sushi.base.js", "shortname": "base", "description": "Sushi JS\nCopyright (C) 2011 Bruno Abrantes\nMIT Licensed"}, "Sushi.core": {"name": "Sushi.core", "namespace": "Sushi", "module": "Sushi", "methods": {"namespace": {"return": {"type": "Object", "description": "Namespaced object"}, "params": [{"type": "String", "name": "namespaceString", "description": " Name of namespace to create"}], "description": "A utility that non-destructively defines namespaces", "guessedname": "namespace", "guessedtype": "function"}, "extend": {"return": {"type": "Object", "description": "Extended object"}, "params": [{"type": "Object", "name": "destination", "description": " Object to copy properties to"}, {"type": "Object", "name": "source", "description": " Object to copy properties from"}], "description": "Simple extending (shallow copying) utility", "guessedname": "extend", "guessedtype": "function"}}, "file": "sushi.core.js", "shortname": "core", "description": "Sushi Core"}, "Sushi.events": {"name": "Sushi.events", "namespace": "Sushi", "module": "Sushi", "methods": {"toArray": {"return": {"type": "Array", "description": "Old variable in array format"}, "params": [{"type": "", "name": "iterable", "description": " Variable to convert to an array"}], "description": "Safely convert anything iterable into a real, live array.", "guessedname": "toArray", "guessedtype": "function"}, "error": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.error()", "guessedname": "error", "guessedtype": "function"}, "log": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.log()", "guessedname": "log", "guessedtype": "function"}, "reduceRight": {"return": {"type": "Array", "description": "Reduced Array"}, "params": [{"type": "Array", "name": "Array", "description": " to reduce."}, {"type": "Function", "name": "Function", "description": " to execute on each value in the array."}, {"type": "", "name": "memo", "description": " Object to use as the first argument to the first call of the callback."}], "description": "Reduce builds up a single result from a list of values (from right-to-left). \nDelegates to ECMAScript 5's native reduceRight if available.", "guessedname": "reduceRight", "guessedtype": "function"}, "some": {"return": {"type": "Booelan", "description": "True if an object matches the truth test."}, "params": [{"type": "Object", "name": "obj", "description": " Object to search through"}, {"type": "Function", "name": "iterator", "description": " Function that produces an element of the new Array from an element of the current one."}, {"type": "Object", "name": "context", "description": " Object to use as \"this\" when executing iterator"}], "description": "Determine if at least one element in the object matches a truth test.\nDelegates to ECMAScript 5's native some if available.", "guessedname": "some", "guessedtype": "function"}, "_supports": {"returns": "{Object} Supported debugging methods", "description": "Returns the debugging methods the environment supports", "guessedname": "_supports", "guessedtype": "function"}, "contains": {"return": {"type": "Boolean", "description": "True if needle is present."}, "params": [{"type": "Object", "name": "heystack", "description": " Object or Array to search in."}, {"type": "", "name": "needle", "description": " Value to search heystack for"}], "description": "Determine if a given value is included in the array or object using ===.", "guessedname": "contains", "guessedtype": "function"}, "reduce": {"return": {"type": "Array", "description": "Reduced Array"}, "params": [{"type": "Array", "name": "obj", "description": " Array to reduce."}, {"type": "Function", "name": "iterator", "description": " Function to execute on each value in the array."}, {"type": "", "name": "memo", "description": " Object to use as the first argument to the first call of the callback."}], "description": "Reduce builds up a single result from a list of values \nfrom left-to-right.\nDelegates to ECMAScript 5's native reduce if available.", "guessedname": "reduce", "guessedtype": "function"}, "publish": {"params": [{"type": "String", "name": "topic", "description": " The channel to publish on"}, {"type": "Array", "name": "args", "description": " The data to publish. Each array item is converted into an ordered\narguments on the subscribed functions."}], "description": "Publish data on a named topic\nExample:\nSushi.events.publish(\"/some/topic\", [\"a\",\"b\",\"c\"]);", "guessedname": "publish", "guessedtype": "function"}, "warn": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.warn()", "guessedname": "warn", "guessedtype": "function"}, "filter": {"return": {"type": "Array", "description": "Filtered Array"}, "params": [{"type": "Array", "name": "obj", "description": " Array to filter."}, {"type": "Function", "name": "iterator", "description": " Function to execute on each value in the array."}, {"type": "", "name": "memo", "description": " Object to use as the first argument to the first call of the callback."}], "description": "Return all the elements that pass a truth test.\nDelegates to ECMAScript 5's native filter if available.", "guessedname": "filter", "guessedtype": "function"}, "subscribe": {"return": {"type": "Array", "description": "A handle which can be used to unsubscribe this particular subscription"}, "params": [{"type": "String", "name": "topic", "description": " The channel to subscribe to"}, {"type": "Function", "name": "callback", "description": " The handler event. Anytime something is Sushi.events.publish'ed on a \nsubscribed channel, the callback will be called with the\npublished array as ordered arguments."}], "description": "Register a callback on a named topic\nExample:\nSushi.events.subscribe(\"/some/topic\", function(a, b, c){ //handle data});", "guessedname": "subscribe", "guessedtype": "function"}, "map": {"return": {"type": "Array", "description": "Reduced Array"}, "params": [{"type": "Array", "name": "obj", "description": " Original array."}, {"type": "Function", "name": "iterator", "description": " Function that produces an element of the new Array from an element of the current one."}, {"type": "Object", "name": "context", "description": " Object to use as \"this\" when executing iterator"}], "description": "Creates a new array with the results of calling a provided function \non every element in this array.\nDelegates to ECMAScript 5's native map if available.", "guessedname": "map", "guessedtype": "function"}, "unsubscribe": {"params": [{"type": "Array", "name": "handle", "description": " The return value from a Sushi.events.subscribe call"}], "description": "Disconnect a subscribed function for a topic\nExample:\nvar handle = Sushi.events.subscribe(\"/some/topic\", function(a, b, c){ //handle data});\nSushi.events.unsubscribe(handle);", "guessedname": "unsubscribe", "guessedtype": "function"}, "pluck": {"return": {"type": "Object", "description": "Property in object"}, "params": [{"type": "Object", "name": "obj", "description": " Object to search through"}, {"type": "", "name": "key", "description": " Property key to look for"}], "description": "Convenience method for Sushi.utils.collection.map to get a property from an object.", "guessedname": "pluck", "guessedtype": "function"}, "each": {"params": [{"type": "", "name": "obj", "description": " Object to loop through"}, {"type": "Function", "name": "iterator", "description": " Function to callback for each element"}, {"type": "Object", "name": "context", "description": " Object to use as \"this\" when executing iterator"}], "description": "Cornerstone each (forEach) implementation.\nHandles objects implementing forEach, arrays, and raw objects. \nDelegates to ECMAScript 5's native forEach if available.\nBased on the Underscore JS implementation.", "guessedname": "each", "guessedtype": "function"}, "logHistory": {"description": "Prints the whole cached debug history to the console", "guessedname": "logHistory", "guessedtype": "function"}, "dir": {"params": [{"type": "", "name": "Values", "description": " to be logged"}], "description": "Logs comma-separated arguments to the console using console.dir()", "guessedname": "dir", "guessedtype": "function"}}, "file": "sushi.events.js", "shortname": "events", "description": "Sushi Events"}}, "version": "0.0.5", "namespaces": ["Sushi"]} \ No newline at end of file diff --git a/docs/generator/sushi.Model.js.html b/docs/generator/sushi.Model.js.html deleted file mode 100644 index 9d6a021..0000000 --- a/docs/generator/sushi.Model.js.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - - - - - - - API: Sushi - - - → sushi.Model.js (file) - - - - - - - - - - - - - - - -
- - -
-
-

- Sushi-JS v0.0.5 -

-
-
- -
-
-
- Display Filters - - - - - - - - - - - - -
-
- -
- - - - -
- -
- -
- - - - - - -
- - - - -
-

- file sushi.Model.js -

- -
define(
-	[],
-	
-	function() {
-		var Model = function(attributes, options) {
-			attributes || (attributes = {});
-			
-			if (this.defaults) {
-				attributes = Sushi.extend(this.defaults, attributes);
-			}
-			
-			this.attributes = {};
-			this.set(attributes, {silent : true});
-			this._previousAttributes = Sushi.extend(this.attributes);
-			this.init(attributes);
-			this.mid = Sushi.utils.uniqueId('m');
-		}
-		
-		Sushi.extend(Model.prototype, {
-			_previousAttributes: null,
-			
-			_changed: false,
-			
-			initialize: function() {},
-			
-			copyAttributes: function() {
-				return Sushi.extend({}, this.attributes);
-			},
-			
-			get: function(attr) {
-				return this.attributes[attr];
-			},
-			
-			set: function(attrs, options) {
-				
-				options || (options = {});
-				
-				if (!attrs) {
-					return this;
-				}
-				
-				if (attrs.attributes) {
-					attrs = attrs.attributes;
-				}
-				
-				var now = this.attributes;
-				
-				//Run validation...
-				
-				// Check for changes of id
-				if ('id' in attrs) {
-					this.id = attrs.id;
-				}
-				
-				// Update the attributes
-				Sushi.each(attrs, function(attr) {
-					var val = attrs[attr];
-
-					if (!Sushi.utils.isEqual(now[attr], val)) {
-						now[attr] = val;
-						
-						if (!options.silent) {
-							this._changed = true;
-						}
-					}
-				});
-				
-				// Fire a change event in case model was changed
-				if (this._changed) {
-				    this.change()
-				}
-				
-				return this;
-			},
-			
-			fetch: function() {
-			    
-			},
-			
-			save: function() {
-			    
-			},
-			
-			destroy: function() {
-			    
-			},
-			
-			parse: function(resp) {
-			    return resp;
-			}
-			
-			change: function() {
-			    // TODO: fire change event
-			    this._previousAttributes = Sushi.extend(this.attributes);
-			    this._changed = false;
-			},
-			
-			hasChanged: function(attr) {
-			    if (attr) {
-			        return (this._previousAttributes[attr] != this.attributes[attr]);
-			        return this._changed;
-			    }
-			},
-			
-			changedAttributes: function() {
-			    var now = this.attributes,
-			    old = this._previousAttributes,
-			    changed = false;
-			    
-			    Sushi.each(now, function(attr){
-                    if (!Sushi.utils.isEqual(old[attr], now[attr])) {
-                        changed = changed || {};
-                        changed[attr] = now[attr];
-                    }
-			    });
-			    
-			    return changed;
-			},
-			
-			previous: function(attr) {
-			    if (!attr || !this._previousAttributes) {
-			        return null
-			    }
-			    
-			    return this._previousAttributes[attr];
-			},
-			
-			previousAttributes: function() {
-			    return Sushi.extend(this._previousAttributes);
-			}
-		});
-		
-		return Model;
-	}
-);
-
- -
- -
- - -
- - -
- -
- - -
- -
- - - - - - - - - diff --git a/docs/generator/sushi.core.js.html b/docs/generator/sushi.core.js.html deleted file mode 100644 index 719ea95..0000000 --- a/docs/generator/sushi.core.js.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - - - API: Sushi - - - → sushi.core.js (file) - - - - - - - - - - - - - - - -
- - -
-
-

- Sushi-JS v0.0.5 -

-
-
- -
-
-
- Display Filters - - - - - - - - - - - - -
-
- -
- - - - -
- -
- -
- - - - - - -
- - - - -
-

- file sushi.core.js -

- -
/**
- * Sushi Core
- *
- * @module Sushi
- */
-define(
-    [],
-    
-	/**
-	 * Sushi Core
-	 *
-	 * @namespace Sushi
-	 * @class core
-	 */
-    function() {
-    	var $s = Sushi = {
-    		VERSION: '0.0.5',
-				
-    		/**
-    		 * A utility that non-destructively defines namespaces
-    		 *
-    		 * @method namespace
-    		 * @param {String} namespaceString Name of namespace to create
-    		 * @return {Object} Namespaced object
-    		 */
-    		namespace: function(namespaceString) {
-    			var parts = namespaceString.split('.'),
-    				parent = Sushi,
-    				i;
-			
-    			// Strip redundant leading global
-    			if (parts[0] === 'Sushi') {
-    				parts = parts.slice(1);
-    			}
-			
-    			for (i = 0, len = parts.length; i < len; i+=1) {
-    				// Create a property if it doesn't exist
-    				if (typeof parent[parts[i]] === 'undefined') {
-    					parent[parts[i]] = {};
-    				}
-    				parent = parent[parts[i]];
-    			}
-			
-    			return parent;			
-    		},
-		
-    		/**
-    		 * Simple extending (shallow copying) utility
-    		 *
-    		 * @method extend
-    		 * @param {Object} destination Object to copy properties to
-    		 * @param {Object} source Object to copy properties from
-    		 * @return {Object} Extended object
-    		 */
-    		extend: function(destination, source) {
-    		    //console.log(destination);
-    		    for ( var property in source ) {
-        			destination[property] = source[property];
-        		}
-        		return destination;
-    		}
-    	};
-	
-    	// If window.Sushi is defined, merge params
-    	if (window.Sushi) {
-    		Sushi.extend(Sushi, window.Sushi);
-    	}
-	
-    	// Sync global Sushi variable to namespaced one
-    	window.Sushi = Sushi;
-    	window.$S = Sushi;
-    }
-);
-
- -
- -
- - -
- - -
- -
- - -
- -
- - - - - - - - - diff --git a/docs/generator/Sushi.core.html b/docs/www/Sushi.Core.html similarity index 74% rename from docs/generator/Sushi.core.html rename to docs/www/Sushi.Core.html index ee5fade..2735448 100644 --- a/docs/generator/Sushi.core.html +++ b/docs/www/Sushi.Core.html @@ -37,7 +37,7 @@
@@ -73,7 +73,7 @@

- Sushi-JS + Sushi Javascript Library → module Sushi → class Sushi.core @@ -105,6 +105,9 @@

Classes

  • Sushi.base
  • +
  • + Sushi.campus +
  • Sushi.core
  • @@ -114,6 +117,21 @@

    Classes

  • Sushi.utils
  • +
  • + Sushi.utils.Collection +
  • +
  • + Sushi.utils.Debug +
  • +
  • + Sushi.utils.HTML5 +
  • +
  • + Sushi.utils.JSON +
  • +
  • + Sushi.utils.Lang +
  • @@ -127,16 +145,16 @@

    Files

    sushi.base.js
  • - sushi.core.js + sushi.campus.js
  • - sushi.events.js + sushi.core.js
  • - sushi.events.pubsub.js + sushi.event.js
  • - sushi.Model.js + sushi.history.js
  • sushi.utils.collection.js @@ -144,6 +162,9 @@

    Files

  • sushi.utils.debug.js
  • +
  • + sushi.utils.HTML5.js +
  • sushi.utils.js
  • @@ -166,6 +187,9 @@

    Methods

  • namespace
  • +
  • + noConflict +
  • @@ -251,7 +275,7 @@

    Methods

    - Simple extending (shallow copying) utility + Simple extending (shallow copying) utility.

    Parameters:

    - - - - - - dir( - Values - ) - - - - - - void - - - - - - - - - - - - Logs comma-separated arguments to the console using console.dir() - -

    Parameters:

    -
      -
    • - - Values - <object> - - to be logged -
    • -
        - - - - @@ -461,47 +386,6 @@

        Methods

        - - - - - - error( - Values - ) - - - - - - void - - - - - - - - - - - - Logs comma-separated arguments to the console using console.error() - -

        Parameters:

        -
          -
        • - - Values - <object> - - to be logged -
        • -
            - - - - @@ -567,78 +451,6 @@

            Methods

          - - - - - - log( - Values - ) - - - - - - void - - - - - - - - - - - - Logs comma-separated arguments to the console using console.log() - -

          Parameters:

          -
            -
          • - - Values - <object> - - to be logged -
          • -
              - - - - - - - - - - logHistory( - - ) - - - - - - void - - - - - - - - - - - - Prints the whole cached debug history to the console - - - - - @@ -730,7 +542,7 @@

              Methods

              - Convenience method for Sushi.utils.collection.map to get a property from an object. + Convenience method for Sushi.utils.map to get a property from an object.

              Parameters:

                @@ -762,57 +574,6 @@

                Methods

              - - - - - - publish( - topic, args - ) - - - - - - void - - - - - - - - - - - - Publish data on a named topic -Example: -Sushi.events.publish("/some/topic", ["a","b","c"]); - -

              Parameters:

              -
                -
              • - - topic - <String> - - The channel to publish on -
              • -
              • - - args - <Array> - - The data to publish. Each array item is converted into an ordered -arguments on the subscribed functions. -
              • -
                  - - - - @@ -1010,12 +771,12 @@

                  Methods

                  - + - subscribe( - topic, callback + toArray( + iterable ) @@ -1034,27 +795,16 @@

                  Methods

                  - Register a callback on a named topic -Example: -Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data}); + Safely convert anything iterable into a real, live array.

                  Parameters:

                  • - topic - <String> - - The channel to subscribe to -
                  • -
                  • - - callback - <Function> + iterable + <object> - The handler event. Anytime something is Sushi.events.publish'ed on a -subscribed channel, the callback will be called with the -published array as ordered arguments. + Variable to convert to an array
                    • @@ -1065,152 +815,296 @@

                      Methods

                      <Array> - A handle which can be used to unsubscribe this particular subscription + Old variable in array format
                    - - - - toArray( - iterable - ) - - + + - - - Array - - - - - +
                    +

                    + Methods inherited from + Sushi.utils +

                    - - + + + + + + + + - Safely convert anything iterable into a real, live array. + -

                    Parameters:

                    -
                      -
                    • - - iterable - <object> - - Variable to convert to an array -
                    • -
                        +
                    + + - - + - + - - - - - + + - Disconnect a subscribed function for a topic -Example: -var handle = Sushi.events.subscribe("/some/topic", function(a, b, c){ //handle data}); -Sushi.events.unsubscribe(handle); + -

                    Parameters:

                    -
                      -
                    • - - handle - <Array> - - The return value from a Sushi.events.subscribe call -
                    • -
                        +
                    + + - - + - + - - - - - + + - Logs comma-separated arguments to the console using console.warn() + -

                    Parameters:

                    -
                      -
                    • - - Values - <object> - - to be logged -
                    • -
                        +
                    + + - + - -
                    + Methods + + Notes +
                    + + identity + + + -

                    Returns:

                    -
                      -
                    • - - <Array> - - Old variable in array format -
                    • -
                    -
                    - - unsubscribe( - handle - ) - -
                    - - void - + + + isArguments + + + - - +
                    + + isArray + + + -
                    - - warn( - Values - ) - -
                    - - void - + + + isDate + + + - - +
                    + + isElement + + + -
                    + + + + + isEmpty + + + + + + + + + + + + + + + isEqual + + + + + + + + + + + + + + + isFunction + + + + + + + + + + + + + + + isNaN + + + + + + + + + + + + + + + isNull + + + + + + + + + + + + + + + isNumber + + + + + + + + + + + + + + + isRegExp + + + + + + + + + + + + + + + isString + + + + + + + + + + + + + + + isUndefined + + + + + + + + + + + + + + + keys + + + + + + + + + + + + + + + range + + + + + + + + + + + + + + + uniqueId + + + + + + + + + + + +
                    @@ -1228,7 +1122,7 @@

                    Methods

                  @@ -127,16 +145,16 @@

                  Files

                  sushi.base.js
                • - sushi.core.js + sushi.campus.js
                • - sushi.events.js + sushi.core.js
                • - sushi.events.pubsub.js + sushi.event.js
                • - sushi.Model.js + sushi.history.js
                • sushi.utils.collection.js @@ -144,6 +162,9 @@

                  Files

                • sushi.utils.debug.js
                • +
                • + sushi.utils.HTML5.js +
                • sushi.utils.js
                • @@ -197,23 +218,17 @@

                  Methods

                  isRegExp
                • - isUndefined + isString
                • - keys + isUndefined
                • - parse + keys
                • range
                • -
                • - replaceAccents -
                • -
                • - stringify -
                • uniqueId
                • @@ -251,6 +266,32 @@

                  +
                  + + + +
                  +

                  Known subclasses

                  + +
                  + +
                  @@ -883,12 +924,12 @@

                  Methods

                  - + - isUndefined( - obj + isString( + Value ) @@ -907,16 +948,16 @@

                  Methods

                  - Checks if an object is equal to undefined + Detects wether a value is a string

                  Parameters:

                  • - obj - <object> + Value + <String> - Object to test + to test
                    • @@ -927,17 +968,17 @@

                      Methods

                      <Boolean> - Whether argument is equal to undefined or not + Whether value is a number or not.
                    - + - keys( + isUndefined( obj ) @@ -945,7 +986,7 @@

                    Methods

                    - + Boolean @@ -957,8 +998,7 @@

                    Methods

                    - Retrieve the names of an object's properties. -Defaults to ECMAScript 5's native Object.keys. Lifted from Underscore JS. + Checks if an object is equal to undefined

                    Parameters:

                      @@ -967,7 +1007,7 @@

                      Methods

                      obj <object> - Object to retrieve keys from + Object to test
                        @@ -975,25 +1015,28 @@

                        Methods

                        Returns:

                        • - Array containing the object's key names. + + <Boolean> + + Whether argument is equal to undefined or not
                        - + - parse( - string + keys( + obj ) - Object + @@ -1005,16 +1048,17 @@

                        Methods

                        - Converts a JSON-formatted string into a Javascript literal object + Retrieve the names of an object's properties. +Defaults to ECMAScript 5's native Object.keys. Lifted from Underscore JS.

                        Parameters:

                        • - string - <String> + obj + <object> - JSON-formatted string + Object to retrieve keys from
                          • @@ -1022,10 +1066,7 @@

                            Methods

                            Returns:

                            • - - <Object> - - Well formatted JS literal + Array containing the object's key names.
                            @@ -1093,108 +1134,6 @@

                            Methods

                          - - - - - - replaceAccents( - string - ) - - - - - - String - - - - - - - - - - - - Converts every accented letter in a string with its non-accented equivalent. -Currently WIP, trying to squeeze this function as much as possible. -(≈3ms per string, with 2 calls ≈ 1.5ms per call) - -

                          Parameters:

                          -
                            -
                          • - - string - <String> - - with accented characters -
                          • -
                              - - -

                              Returns:

                              -
                                -
                              • - - <String> - - string without accented characters in lower case -
                              • -
                              - - - - - - - - stringify( - literal - ) - - - - - - String - - - - - - - - - - - - Converts a Javascript literal object into a well formatted JSON string - -

                              Parameters:

                              -
                                -
                              • - - literal - <Object> - - Literal Notated Javascript Object -
                              • -
                                  - - -

                                  Returns:

                                  -
                                    -
                                  • - - <String> - - Well formatted JSON string -
                                  • -
                                  - - @@ -1265,7 +1204,7 @@

                                  Methods

                                  @@ -98,6 +98,9 @@

                                  Classes

                                • Sushi.base
                                • +
                                • + Sushi.campus +
                                • Sushi.core
                                • @@ -107,6 +110,21 @@

                                  Classes

                                • Sushi.utils
                                • +
                                • + Sushi.utils.Collection +
                                • +
                                • + Sushi.utils.Debug +
                                • +
                                • + Sushi.utils.HTML5 +
                                • +
                                • + Sushi.utils.JSON +
                                • +
                                • + Sushi.utils.Lang +
                                @@ -120,16 +138,16 @@

                                Files

                                sushi.base.js
                              • - sushi.core.js + sushi.campus.js
                              • - sushi.events.js + sushi.core.js
                              • - sushi.events.pubsub.js + sushi.event.js
                              • - sushi.Model.js + sushi.history.js
                              • sushi.utils.collection.js @@ -137,6 +155,9 @@

                                Files

                              • sushi.utils.debug.js
                              • +
                              • + sushi.utils.HTML5.js +
                              • sushi.utils.js
                              • @@ -160,15 +181,14 @@

                                Files

                                -
                                -

                                - This is the API documentation for - Sushi-JS. -

                                -

                                - Choose a module name from the list for more information. -

                                -
                                +
                                +

                                + This is the API documentation for the + Sushi Javascript Library. +

                                +

                                Sushi JS, is a Modular Javascript Library, that helps building large-scale Web Applications

                                +

                                Choose a module name from the list for more information.

                                +
                                @@ -179,7 +199,7 @@

                                Files

                              @@ -127,16 +145,16 @@

                              Files

                              sushi.base.js
                            • - sushi.core.js + sushi.campus.js
                            • - sushi.events.js + sushi.core.js
                            • - sushi.events.pubsub.js + sushi.event.js
                            • - sushi.Model.js + sushi.history.js
                            • sushi.utils.collection.js @@ -144,6 +162,9 @@

                              Files

                            • sushi.utils.debug.js
                            • +
                            • + sushi.utils.HTML5.js +
                            • sushi.utils.js
                            • @@ -408,7 +429,7 @@

                              @@ -110,6 +114,15 @@

                              Classes

                            • Sushi.utils
                            • +
                            • + Sushi.utils.Debug +
                            • +
                            • + Sushi.utils.JSON +
                            • +
                            • + Sushi.utils.Lang +
                            @@ -126,10 +139,10 @@

                            Files

                            sushi.core.js
                          • - sushi.events.js + sushi.event.js
                          • - sushi.events.pubsub.js + sushi.history.js
                          • sushi.Model.js @@ -149,6 +162,9 @@

                            Files

                          • sushi.utils.lang.js
                          • +
                          • + sushi.View.js +
                          @@ -165,43 +181,25 @@

                          Files

                          -

                          - module Sushi - - -

                          + +
                          +

                          + file sushi.View.js +

                          -
                          - Sushi Core +
                          define(
                          +    ['sushi.core'],
                          +    
                          +    function() {
                          +        var View = function(model) {
                          +            this.model = model;
                          +            
                          +        }
                          +    }
                          +);
                          +
                          -
                          - - - -
                          - -
                          -

                          Contained Classes

                          - -
                          - - - -
                          @@ -212,7 +210,7 @@

                          Contained Classes

                        @@ -127,16 +145,16 @@

                        Files

                        sushi.base.js
                      • - sushi.core.js + sushi.campus.js
                      • - sushi.events.js + sushi.core.js
                      • - sushi.events.pubsub.js + sushi.event.js
                      • - sushi.Model.js + sushi.history.js
                      • sushi.utils.collection.js @@ -144,6 +162,9 @@

                        Files

                      • sushi.utils.debug.js
                      • +
                      • + sushi.utils.HTML5.js +
                      • sushi.utils.js
                      • @@ -186,8 +207,7 @@

                        // Require library-wide dependencies, not in requirejs module format require([], function() { // require Sushi modules in requirejs format - require(['sushi.core', 'sushi.utils', 'sushi.utils.collection', 'sushi.utils.debug', 'sushi.utils.json', 'sushi.utils.lang', 'sushi.events'], function(){ - }); + require(['sushi.core', 'sushi.campus', 'sushi.utils', 'sushi.utils.collection', 'sushi.utils.debug', 'sushi.utils.json', 'sushi.utils.lang', 'sushi.event', 'sushi.utils.HTML5'], function(){}); }); @@ -202,7 +222,7 @@

                      Files

                      Files

                      @@ -127,16 +145,16 @@

                      Files

                      sushi.base.js
                    • - sushi.core.js + sushi.campus.js
                    • - sushi.events.js + sushi.core.js
                    • - sushi.events.pubsub.js + sushi.event.js
                    • - sushi.Model.js + sushi.history.js
                    • sushi.utils.collection.js @@ -144,6 +162,9 @@

                      Files

                    • sushi.utils.debug.js
                    • +
                    • + sushi.utils.HTML5.js +
                    • sushi.utils.js
                    • @@ -176,11 +197,15 @@

                      define(
                      -	['sushi.utils'],
                      +	['sushi.core', 'sushi.utils'],
                       	
                       	/**
                            * Sushi Collection
                      -     */
                      +     *
                      +	 * @namespace Sushi.utils
                      +	 * @class Collection
                      +	 * @extends Sushi.utils
                      +	 */
                            
                       	function() {
                       	    var _collection = this,
                      @@ -403,7 +428,7 @@ 

                      }, /** - * Convenience method for Sushi.utils.collection.map to get a property from an object. + * Convenience method for Sushi.utils.map to get a property from an object. * * @method pluck * @@ -486,7 +511,7 @@

                    @@ -127,16 +145,16 @@

                    Files

                    sushi.base.js
                  • - sushi.core.js + sushi.campus.js
                  • - sushi.events.js + sushi.core.js
                  • - sushi.events.pubsub.js + sushi.event.js
                  • - sushi.Model.js + sushi.history.js
                  • sushi.utils.collection.js @@ -144,6 +162,9 @@

                    Files

                  • sushi.utils.debug.js
                  • +
                  • + sushi.utils.HTML5.js +
                  • sushi.utils.js
                  • @@ -176,10 +197,14 @@

                    define(
                    -    ['sushi.utils'],
                    +    ['sushi.core', 'sushi.utils'],
                         
                         /**
                     	 * Defines several safe debugging methods
                    +	 *
                    +	 * @namespace Sushi.utils
                    +	 * @class Debug
                    +	 * @extends Sushi.utils
                     	 */
                         function() {
                     		// Cached logging history
                    @@ -276,14 +301,27 @@ 

                    */ logHistory = function() { log(_history); + }, + /** + * Forces IE to run its garbage Collector + * @return {void, Boolean} Returns false, if it's not possible to force the Garbage Collector, otherwise nothing is returned. + */ + garbageCollect = function(){ + if (typeof(CollectGarbage) == "function"){ + CollectGarbage(); + } else { + return false; + } }; - Sushi.extend(Sushi.utils, { + Sushi.namespace('utils.debug') + Sushi.extend(Sushi.utils.debug, { log: log, warn: warn, error: error, dir: dir, - logHistory: logHistory + logHistory: logHistory, + garbageCollect: garbageCollect }); } ); @@ -300,7 +338,7 @@

                  @@ -127,16 +145,16 @@

                  Files

                  sushi.base.js
                • - sushi.core.js + sushi.campus.js
                • - sushi.events.js + sushi.core.js
                • - sushi.events.pubsub.js + sushi.event.js
                • - sushi.Model.js + sushi.history.js
                • sushi.utils.collection.js @@ -144,6 +162,9 @@

                  Files

                • sushi.utils.debug.js
                • +
                • + sushi.utils.HTML5.js +
                • sushi.utils.js
                • @@ -181,7 +202,7 @@

                  */ define( // Module dependencies - [], + ['sushi.core'], /** * General purpose utility functions for the Sushi JS framework @@ -324,9 +345,16 @@

                  return !!(obj && obj.constructor && obj.call && obj.apply); }, - // Is a given value a string? - isString: function(obj) { - return !!(obj === '' || (obj && obj.charCodeAt && obj.substr)); + /** + * Detects wether a value is a string + * + * @method isString + * @param {String} Value to test + * + * @return {Boolean} Whether value is a number or not. + */ + isString: function(string) { + return !!(string === '' || (string && string.charCodeAt && string.substr)); }, /** @@ -505,7 +533,7 @@

                @@ -127,16 +145,16 @@

                Files

                sushi.base.js
              • - sushi.core.js + sushi.campus.js
              • - sushi.events.js + sushi.core.js
              • - sushi.events.pubsub.js + sushi.event.js
              • - sushi.Model.js + sushi.history.js
              • sushi.utils.collection.js @@ -144,6 +162,9 @@

                Files

              • sushi.utils.debug.js
              • +
              • + sushi.utils.HTML5.js +
              • sushi.utils.js
              • @@ -176,10 +197,13 @@

                define(
                -	['../plugins/JSON', 'sushi.utils'],
                +	['sushi.core', '../plugins/JSON', 'sushi.utils'],
                 	
                 	/**
                 	 * JSON handling functions
                +	 * @namespace Sushi.utils
                +	 * @class JSON
                +	 * @extends Sushi.utils
                 	 */
                 	function() {	
                 		/**
                @@ -202,9 +226,9 @@ 

                return window.JSON.stringify(literal); }; - Sushi.namespace('utils.json'); + Sushi.namespace('utils.JSON'); - Sushi.extend(Sushi.utils.json, { + Sushi.extend(Sushi.utils.JSON, { parse: parse, stringify: stringify }); @@ -224,7 +248,7 @@

              @@ -127,16 +145,16 @@

              Files

              sushi.base.js
            • - sushi.core.js + sushi.campus.js
            • - sushi.events.js + sushi.core.js
            • - sushi.events.pubsub.js + sushi.event.js
            • - sushi.Model.js + sushi.history.js
            • sushi.utils.collection.js @@ -144,6 +162,9 @@

              Files

            • sushi.utils.debug.js
            • +
            • + sushi.utils.HTML5.js +
            • sushi.utils.js
            • @@ -176,10 +197,15 @@

              define(
              -	['sushi.utils'],
              +	['sushi.core', 'sushi.utils'],
               
               	/**
               	 * Language handling functions
              +	 *
              +	 * @namespace Sushi.utils
              +	 * @class Lang
              +	 * @extends Sushi.utils
              +	 * @requires Sushi.utils
               	 */
               	function() {
               		/**
              @@ -205,9 +231,9 @@ 

              }; return function(s) { - return s.replace(charList, function(match) { - return lookupTable[match]; - }); + return s.replace(charList, function(match) { + return lookupTable[match]; + }); }; })(); @@ -231,7 +257,7 @@