From 188abe82e992a169ae3644d4e5450b4a594a8ca4 Mon Sep 17 00:00:00 2001 From: Louis Charette Date: Wed, 9 Oct 2013 16:21:11 -0400 Subject: [PATCH] APE_JSF 1.2 See pull request for more info --- Build/closureCompiler/apeClientJS.js | 24 - Build/closureCompiler/apeClientJS.js.map | 694 - Build/closureCompiler/apeClientMoo.js | 22 - Build/closureCompiler/apeClientMoo.js.map | 415 - Build/closureCompiler/apeCore.js | 111 - Build/closureCompiler/apeCore.js.map | 10635 --------------- Build/closureCompiler/apeCore.js.map.wtf | 1 - Build/closureCompiler/apeCoreSession.js | 116 - Build/closureCompiler/apeCoreSession.js.map | 11174 ---------------- Build/uncompressed/apeClientJS.js | 184 - Build/uncompressed/apeClientMoo.js | 131 - Build/uncompressed/apeCoreSession.js | 3575 ----- Build/yuiCompressor/apeCoreSession.js | 1 - Demos/Chat/demo.html | 8 +- {Clients => Demos/Chat}/mootools-core.js | 0 Demos/Controller/demo.html | 6 +- Demos/Controller/mootools-core.js | 4288 ++++++ Demos/Move/demo.html | 8 +- Demos/Move/mootools-core.js | 4288 ++++++ Demos/Shoutbox/demo.html | 6 +- Demos/Shoutbox/mootools-core.js | 4288 ++++++ Demos/TCPSockets/demo.html | 4 +- Demos/config.js | 12 - Tools/Check/index.html | 28 +- Tools/Check/mootools-core.js | 4288 ++++++ .../apeClientJS.js => js/apeClient.min.js | 18 +- js/apeConfig.js | 14 + .../apeCore.js => js/apeCore.min.js | 2 +- js/apeCoreSession.min.js | 1 + .../src/Client/apeClientJS.js | 3 +- .../src/Client/apeClientMoo.js | 2 +- .../src/Client/apeClientMoo.min.js | 18 +- js/src/Client/mootools-core.js | 4288 ++++++ .../src/Core/Combined}/apeCore.js | 0 .../src/Core/Combined/apeCoreSession.js | 0 {Source => js/src/Core/Sources}/Core/APE.js | 0 {Source => js/src/Core/Sources}/Core/Core.js | 0 .../src/Core/Sources}/Core/Events.js | 0 {Source => js/src/Core/Sources}/Core/JSON.js | 0 js/src/Core/Sources/Core/Session.js | 171 + .../src/Core/Sources}/Core/Utility.js | 0 {Source => js/src/Core/Sources}/Pipe/Pipe.js | 0 .../src/Core/Sources}/Pipe/PipeMulti.js | 0 .../src/Core/Sources}/Pipe/PipeProxy.js | 0 .../src/Core/Sources}/Pipe/PipeSingle.js | 0 .../Sources}/Request/Request.CycledStack.js | 0 .../Core/Sources}/Request/Request.Stack.js | 0 .../src/Core/Sources}/Request/Request.js | 0 .../Sources}/Transport/Transport.JSONP.js | 0 .../Core/Sources}/Transport/Transport.SSE.js | 0 .../Sources}/Transport/Transport.WebSocket.js | 0 .../Transport/Transport.XHRStreaming.js | 0 .../Transport/Transport.longPolling.js | 0 .../src/Core/Sources}/mootools-core.js | 0 54 files changed, 21663 insertions(+), 27161 deletions(-) delete mode 100755 Build/closureCompiler/apeClientJS.js delete mode 100755 Build/closureCompiler/apeClientJS.js.map delete mode 100755 Build/closureCompiler/apeClientMoo.js delete mode 100755 Build/closureCompiler/apeClientMoo.js.map delete mode 100755 Build/closureCompiler/apeCore.js delete mode 100755 Build/closureCompiler/apeCore.js.map delete mode 100755 Build/closureCompiler/apeCore.js.map.wtf delete mode 100755 Build/closureCompiler/apeCoreSession.js delete mode 100755 Build/closureCompiler/apeCoreSession.js.map delete mode 100755 Build/uncompressed/apeClientJS.js delete mode 100755 Build/uncompressed/apeClientMoo.js delete mode 100755 Build/uncompressed/apeCoreSession.js delete mode 100755 Build/yuiCompressor/apeCoreSession.js rename {Clients => Demos/Chat}/mootools-core.js (100%) create mode 100644 Demos/Controller/mootools-core.js create mode 100644 Demos/Move/mootools-core.js create mode 100644 Demos/Shoutbox/mootools-core.js delete mode 100644 Demos/config.js create mode 100644 Tools/Check/mootools-core.js rename Build/yuiCompressor/apeClientJS.js => js/apeClient.min.js (78%) create mode 100755 js/apeConfig.js rename Build/yuiCompressor/apeCore.js => js/apeCore.min.js (99%) create mode 100755 js/apeCoreSession.min.js rename Clients/JavaScript.js => js/src/Client/apeClientJS.js (99%) mode change 100644 => 100755 rename Clients/MooTools.js => js/src/Client/apeClientMoo.js (99%) rename Build/yuiCompressor/apeClientMoo.js => js/src/Client/apeClientMoo.min.js (66%) create mode 100644 js/src/Client/mootools-core.js rename {Build/uncompressed => js/src/Core/Combined}/apeCore.js (100%) rename Source/Core/Session.js => js/src/Core/Combined/apeCoreSession.js (100%) rename {Source => js/src/Core/Sources}/Core/APE.js (100%) rename {Source => js/src/Core/Sources}/Core/Core.js (100%) rename {Source => js/src/Core/Sources}/Core/Events.js (100%) rename {Source => js/src/Core/Sources}/Core/JSON.js (100%) create mode 100755 js/src/Core/Sources/Core/Session.js rename {Source => js/src/Core/Sources}/Core/Utility.js (100%) rename {Source => js/src/Core/Sources}/Pipe/Pipe.js (100%) rename {Source => js/src/Core/Sources}/Pipe/PipeMulti.js (100%) rename {Source => js/src/Core/Sources}/Pipe/PipeProxy.js (100%) rename {Source => js/src/Core/Sources}/Pipe/PipeSingle.js (100%) rename {Source => js/src/Core/Sources}/Request/Request.CycledStack.js (100%) rename {Source => js/src/Core/Sources}/Request/Request.Stack.js (100%) rename {Source => js/src/Core/Sources}/Request/Request.js (100%) rename {Source => js/src/Core/Sources}/Transport/Transport.JSONP.js (100%) rename {Source => js/src/Core/Sources}/Transport/Transport.SSE.js (100%) rename {Source => js/src/Core/Sources}/Transport/Transport.WebSocket.js (100%) rename {Source => js/src/Core/Sources}/Transport/Transport.XHRStreaming.js (100%) rename {Source => js/src/Core/Sources}/Transport/Transport.longPolling.js (100%) rename {Source => js/src/Core/Sources}/mootools-core.js (100%) diff --git a/Build/closureCompiler/apeClientJS.js b/Build/closureCompiler/apeClientJS.js deleted file mode 100755 index 4c21284..0000000 --- a/Build/closureCompiler/apeClientJS.js +++ /dev/null @@ -1,24 +0,0 @@ -var a,APE={Config:{identifier:"ape",init:true,frequency:0,scripts:[]},Client:function(b){if(b)this.core=b}};a=APE.Client.prototype;a.eventProxy=[];a.fireEvent=function(b,c,d){this.core.fireEvent(b,c,d)};a.addEvent=function(b,c,d){var e=c.bind(this),f=this;if(this.core==undefined)this.eventProxy.push([b,c,d]);else{f=this.core.addEvent(b,e,d);this.core.$originalEvents[b]=this.core.$originalEvents[b]||[];this.core.$originalEvents[b][c]=e}return f}; -a.removeEvent=function(b,c){return this.core.removeEvent(b,c)};a.onRaw=function(b,c,d){this.addEvent("raw_"+b.toLowerCase(),c,d)};a.onCmd=function(b,c,d){this.addEvent("cmd_"+b.toLowerCase(),c,d)};a.onError=function(b,c,d){this.addEvent("error_"+b,c,d)};a.cookie={};a.cookie.write=function(b,c){document.cookie=b+"="+encodeURIComponent(c)+"; domain="+document.domain}; -a.cookie.read=function(b){b=b+"=";for(var c=document.cookie.split(";"),d=0;d";for(var h=0;h<\/script>';d+="";c.write(d);c.close()}else{e.setAttribute("src",(b.secure?"https":"http")+"://"+b.frequency+"."+b.server+'/?[{"cmd":"script","params":{"domain":"'+document.domain+'","scripts":["'+b.scripts.join('","')+'"]}}]'); -if(navigator.product=="Gecko")e.contentWindow.location.href=e.getAttribute("src")}};if(Function.prototype.bind==null)Function.prototype.bind=function(b,c){return this.create({bind:b,arguments:c})};if(Function.prototype.create==null)Function.prototype.create=function(b){var c=this;b=b||{};return function(){var d=b.arguments||arguments;if(d&&!d.length)d=[d];function e(){return c.apply(b.bind||null,d)}return e()}}; - -/*** - * APE JSF Setup - */ - -APE.Config.baseUrl = 'http://local.ape-project.org/APE_JSF'; //APE JSF -APE.Config.domain = 'ape-project.org'; -APE.Config.server = 'ape.local.ape-project.org:6969'; //APE server URL -APE.Config.baseUrl = 'http://ape.home.efyx.io/APE_JSF'; //APE JSF -APE.Config.domain = 'efyx.io'; -APE.Config.server = 'ape.home.efyx.io:6969'; //APE server URL -APE.Config.transport = 6; - -(function(){ - for (var i = 0; i < arguments.length; i++) - APE.Config.scripts.push(APE.Config.baseUrl + '/Source/' + arguments[i] + '.js'); -})('mootools-core', 'Core/APE', 'Core/Events', 'Core/Core', 'Pipe/Pipe', 'Pipe/PipeProxy', 'Pipe/PipeMulti', 'Pipe/PipeSingle', 'Request/Request','Request/Request.Stack', 'Request/Request.CycledStack', 'Transport/Transport.longPolling','Transport/Transport.SSE', 'Transport/Transport.XHRStreaming', 'Transport/Transport.JSONP', 'Transport/Transport.WebSocket', 'Core/Utility', 'Core/JSON'); diff --git a/Build/closureCompiler/apeClientJS.js.map b/Build/closureCompiler/apeClientJS.js.map deleted file mode 100755 index 9f56732..0000000 --- a/Build/closureCompiler/apeClientJS.js.map +++ /dev/null @@ -1,694 +0,0 @@ -/** Begin line maps. **/{ "file" : "apeClientJS.js", "count": 7 } -[-1,-1,-1,-1,-1,-1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,3,3,3,3,3,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,6,6,3,3,3,3,3,3,3,3,7,7,7,3,2,2,2,2,2,2,2,8,8,8,8,8,8,8,8,9,11,11,10,13,13,13,14,14,17,17,17,17,17,16,16,16,16,16,18,18,12,2,-1,-1,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,22,22,22,21,21,21,21,21,21,21,21,21,21,21,23,23,23,26,26,25,25,25,25,25,25,25,25,25,25,27,27,27,27,27,27,27,27,28,30,30,31,31,32,32,29,38,38,38,38,38,37,37,37,37,37,36,36,36,36,36,36,36,36,36,36,39,39,40,40,41,41,34,44,44,44,43,43,43,43,43,43,43,43,43,45,45,45,45,45,45,45,45,46,48,48,49,49,50,50,47,51,51,51,51,52,52,55,55,54,54,54,54,54,56,56,56,56,56,53,57,57,58,58,58,58,58,59,59,59,61,61,61,61,61,60,60,60,60,60,59,62,62,62,62,62,62,62,62,62,62,67,67,67,67,67,66,66,66,66,66,66,66,66,66,66,66,65,65,65,65,65,68,69,69,70,70,71,71,68,63,59,59,59,59,72,74,74,78,78,78,78,78,77,77,77,77,77,76,76,76,76,76,76,76,76,76,79,79,80,80,81,81,86,86,86,86,86,86,85,85,85,85,85,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,87,87,83,91,91,91,91,91,90,90,90,90,90,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,92,92,88,82,93,93,93,99,99,99,99,99,98,98,98,98,98,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,100,100,96,101,101,95,102,102,103,103,103,103,103,103,104,104,104,51] -[107,107,106,106,106,106,106,106,106,106,106,106,106,106,108,108,108,108,108,108,108,108,109,111,111,112,112,110,114,114,114,114,114,114,118,118,118,118,118,118,117,117,117,117,117,116,116,116,116,116,116,116,116,116,116,116,116,119,119,120,120,115,123,123,123,122,122,122,122,122,122,124,124,124,124,124,124,124,124,125,127,127,128,128,129,129,126,134,134,134,134,134,133,133,133,133,133,133,133,133,133,135,135,135,135,135,135,135,138,138,137,137,137,137,137,137,137,137,137,137,137,137,136,136,139,139,140,140,131,143,143,143,142,142,142,142,142,142,144,144,144,144,144,144,144,144,145,147,147,148,148,149,149,146,154,154,154,154,154,153,153,153,153,153,153,153,153,153,155,155,155,155,155,155,155,158,158,157,157,157,157,157,157,157,157,157,157,157,157,156,156,159,159,160,160,151,163,163,163,162,162,162,162,162,162,162,162,164,164,164,164,164,164,164,164,165,167,167,168,168,169,169,166,174,174,174,174,174,173,173,173,173,173,173,173,173,173,175,175,175,175,175,175,175,175,175,176,176,177,177,178,178,171,181,181,181,180,180,180,180,180,180,180,182,182,182,185,185,185,185,185,185,185,185,185,184,184,184,184,184,184,186,186,186,186,186,186,186,186,187,189,189,190,190,188,194,194,194,194,194,194,194,194,194,193,193,193,193,193,193,193,195,195,196,196,196,196,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,199,199,197,200,200,200,200,200,200,200,200,200,200,200,200,202,202,202,202,202,202,202,202,202,201,201,201,201,201,201,201,191,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203] -[205,205,205,205,205,205,205,205,205,204,204,204,204,204,206,206,206,206,206,206,206,206,207,209,209,208,212,212,213,213,214,214,214,214,215,215,215,215,216,216,216,216,217,217,221,221,221,221,221,221,221,221,221,220,220,220,220,220,220,220,219,219,219,219,219,219,222,222,222,222,218,223,223,224,224,225,225,227,227,226,226,226,226,226,226,226,229,229,228,228,230,231,231,231,231,232,232,232,232,233,233,235,235,236,236,234,239,239,238,238,238,238,238,238,238,240,240,237,231,241,241,241,241,231,243,243,246,246,245,245,245,245,245,245,245,245,245,245,247,247,249,249,248,248,248,248,248,248,248,244,250,250,250,253,253,252,252,252,252,252,252,252,252,254,254,251,250,255,255,256,256,256,256,256,256,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,261,261,260,260,260,260,260,260,260,260,260,260,263,263,262,262,262,262,262,262,262,265,265,264,264,264,264,264,264,264,259,257,266,266,266,266,266,266,267,267,267,267,267,267,210,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268] -[270,270,269,269,269,269,269,271,271,271,271,271,271,271,271,272,274,274,273,277,277,278,278,276,279,279,279,282,282,281,281,281,281,281,281,281,281,281,281,284,284,283,283,283,283,283,283,283,283,283,283,280,287,287,287,287,286,286,286,286,286,286,286,285,285,285,285,285,285,285,285,285,285,280,288,288,291,291,290,290,290,290,290,290,290,290,290,290,293,293,292,292,292,292,292,292,292,292,292,292,289,294,294,297,297,296,296,296,296,296,296,296,299,299,298,298,298,298,298,298,298,295,302,302,302,302,301,301,301,301,301,301,301,300,300,300,300,300,300,300,295,304,304,304,304,304,304,304,304,304,303,303,303,303,303,303,307,307,307,306,306,306,306,306,306,306,306,309,309,308,308,308,308,308,308,308,308,305,312,312,312,312,311,311,311,311,311,311,311,310,310,310,310,310,310,310,315,315,315,314,314,314,314,314,314,314,317,317,316,316,316,316,316,316,316,313,320,320,320,320,319,319,319,319,319,319,319,318,318,318,318,318,318,323,323,323,322,322,322,322,322,322,322,325,325,324,324,324,324,324,324,324,324,321,328,328,328,328,327,327,327,327,327,327,327,326,326,326,326,326,326,331,331,331,330,330,330,330,330,334,334,334,334,334,334,334,334,335,337,337,336,341,341,341,341,341,340,340,340,340,340,342,342,343,343,343,343,344,344,345,345,346,346,349,349,349,349,349,348,348,348,348,348,348,348,348,348,348,348,347,347,347,347,347,347,347,351,351,350,350,356,356,356,356,356,355,355,355,355,355,355,355,355,355,354,354,354,354,354,354,357,357,357,357,357,360,360,360,360,360,359,359,359,359,359,359,359,359,359,359,359,361,361,358,352,338,333,333,333,333,333,362,362,362,362,362,332,363,363,363,365,365,364,364,364,364,364,364,364,364,364,364,363,366,366,367,368,368,368,370,370,369,369,369,369,369,369,369,368,371,371,371,371,371,371,371,374,374,374,374,374,374,374,374,374,373,373,373,373,373,373,373,376,376,375,375,375,375,375,375,375,377,377,377,379,379,378,378,378,378,378,378,378,377,380,380,380,380,380,380,380,383,383,383,383,383,383,383,383,383,382,382,382,382,382,382,382,385,385,385,385,385,385,385,385,385,384,384,384,384,384,384,384,367] -[391,391,391,391,391,390,390,390,390,390,390,390,389,389,389,389,389,392,392,392,392,392,392,392,392,392,392,392,392,392,387,393,393,395,395,395,395,395,396,396,396,396,397,397,398,398,398,398,394,399,399,399,400,400,403,403,402,402,402,402,402,402,402,402,402,402,405,405,404,404,404,404,404,404,404,404,404,404,406,406,399,399,399,399,408,408,408,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,411,411,411,412,412,412,412,413,413,413,413,413,413,413,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,415,415,415,415,417,417,417,420,420,419,419,419,419,419,419,419,419,421,421,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,424,424,423,423,423,423,423,423,423,423,423,423,429,429,429,429,429,429,428,428,428,428,428,428,428,427,427,427,427,427,427,430,430,430,430,430,430,430,430,430,430,430,430,430,431,431,425,432,432,432,432,433,433,436,436,436,436,436,436,436,436,436,435,435,435,435,435,435,435,435,435,435,435,435,435,435,437,437,437,437,437,437,437,437,437,441,441,441,440,440,440,440,440,440,440,440,440,440,440,440,440,442,442,442,442,442,443,443,443,443,443,443,443,445,445,444,444,444,444,444,444,444,444,444,444,444,449,449,449,448,448,448,448,448,448,447,447,447,447,447,447,447,447,450,450,450,450,450,450,454,454,454,453,453,453,453,453,453,452,452,452,452,452,452,452,452,452,455,455,455,455,455,455,455,455,455,455,459,459,459,458,458,458,458,458,458,457,457,457,457,457,460,460,460,460,460,460,460,460,464,464,464,463,463,463,463,463,463,462,462,462,462,465,465,465,465,465,465,465,465,465,470,470,470,470,470,470,470,470,470,469,469,469,469,469,468,468,468,468,468,468,468,468,468,468,468,468,468,471,471,475,475,475,475,475,475,475,475,475,474,474,474,474,474,473,473,473,473,473,473,473,473,473,473,473,476,476,472,477,477,477,477,477,477,477,477,477,478,478,478,479,479,486,486,485,485,485,485,485,485,485,485,485,485,485,485,485,485,484,484,484,484,483,483,483,483,483,487,487,481,480,488,488,490,490,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,494,494,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,495,495,495,495,495,495,495] -[496,496,497,497,497,497,497,497,491,488,488,488,488,500,500,500,499,499,499,499,499,499,499,499,499,499,499,499,498,503,503,502,502,502,502,502,502,502,502,502,502,502,502,504,504,504,504,504,504,504,504,504,505,505,501,506,506,506,508,508,507,507,507,507,507,507,507,507,507,507,506,509,509,510,512,512,514,514,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,515,515,515,516,517,517,519,519,522,522,521,521,521,521,521,521,521,521,521,521,521,521,521,521,520,520,520,520,520,520,520,520,526,526,526,525,525,525,525,525,523,528,528,528,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,530,530,530,530,531,531,531,531,532,532,533,533,534,534,537,537,536,536,536,536,536,536,536,536,535,535,535,535,535,535,535,539,539,538,538,541,541,540,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,545,545,544,544,544,544,544,544,544,544,546,546,543,547,547,547,547,547,547,547,547,547,547,547,547,547,547,549,549,549,548,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,554,554,554,553,553,553,553,553,553,555,555,559,559,559,558,558,558,558,558,558,556,556,510,506,506,506,560,564,564,563,563,563,563,563,563,563,563,563,563,563,563,563,565,565,565,565,565,565,561,568,568,567,567,567,567,567,567,567,569,569,569,569,569,569,569,569,570,570,570,570,570,570,570,561,571,571,571,571,571,571,573,573,572,572,572,572,572,572,572,572,572,572,574,574,574,574,576,576,575,575,575,575,575,575,575,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,579,579,579,579,579,579,579,579,579,578,578,578,578,578,578,578,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,584,584,583,583,583,583,583,583,583,583,582,582,582,582,582,585,585,585,585,585,585,581,586,586,586,586,586,586,586,586,561] -[587,587,587,589,589,589,589,589,589,589,589,589,589,588,588,588,588,588,588,588,588,587,590,590,590,590,590,590,590,590,595,595,594,594,594,594,594,594,594,594,594,594,594,594,594,594,593,593,593,593,593,593,593,593,593,592,592,592,592,592,598,598,597,597,597,597,597,597,597,597,597,597,597,597,597,599,599,599,599,599,599,596,506,268,600,600,600,603,603,603,603,603,603,603,603,603,602,602,602,602,602,602,602,602,602,602,601,601,601,601,601,600,604,604,604,604,604,608,608,608,608,608,608,608,608,608,607,607,607,607,607,607,607,607,607,607,606,606,606,606,606,609,609,609,609,609,609,609,609,610,612,612,613,613,611,615,615,615,615,615,615,618,618,618,618,618,618,617,617,617,617,617,617,617,619,619,619,619,619,619,620,620,619,619,619,619,619,619,619,619,619,619,621,621,619,616,614,622,622,622,625,625,625,625,625,625,625,625,625,624,624,624,624,624,624,624,624,624,624,623,623,623,623,623,623,623,622,626,626,626,626,626,630,630,630,630,630,630,630,630,630,629,629,629,629,629,629,629,629,629,629,628,628,628,628,628,628,628,631,631,631,631,631,631,631,631,632,634,634,633,636,636,636,636,637,637,638,638,638,638,640,640,640,641,641,639,642,642,642,643,643,643,643,643,643,644,644,644,644,644,644,644,644,644,645,646,646,648,648,648,648,649,649,651,651,650,650,650,650,650,650,650,650,650,650,649,652,652,652,652,652,652,652,652,652,652,653,653,653,654,654,653,655,657,657,656,656,656,656,656,656,656,659,659,660,661,661,660,662,662,662,662,662,662,662,662,663,663,663,664,664,666,666,666,666,666,666,669,669,669,668,668,668,668,668,668,671,671,670,670,670,670,670,667,672,672,672,672,672,673,673,667,674,674,674,674,674,674,676,676,676,675,675,647,635] -/** Begin file information. **/ -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js"] -/** Begin mapping definitions. **/ -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",1,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",1,4,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",1,10] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",2,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",3,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",4,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",5,13] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",6,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",9,17] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",9,17,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",9,17] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",9,18,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",9,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",10,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",10,6,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",10,12] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",10,12,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",10,12] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",10,24,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",1,0,"APE.Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",13,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",13,0,"eventProxy"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",13,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",13,34] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,0,"fireEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,41] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,41,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,41] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,42,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,48,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,54,"delay"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",14,61] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,1,"fireEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,1,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,21,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,27,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",15,33,"delay"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,0,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,40] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,40,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,40] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,41,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,47,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,51,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",18,61] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",19,5,"newFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",19,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",19,13,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",19,13,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",19,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",19,28,"ret"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",19,34] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",20,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",20,4,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",20,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",20,17,"undefined"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,2,"push"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,2,"eventProxy"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,24,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,30,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",21,34,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",22,6] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,6,"ret"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,12,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,12,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,12] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,31,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,37,"newFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",23,44,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,2,"$originalEvents"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,2,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,28,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,36] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,36,"$originalEvents"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,36,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,36] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,62,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",24,71] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,2,"$originalEvents"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,2,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,28,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,34,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",25,40,"newFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",27,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",27,8,"ret"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,0,"removeEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,43] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,43,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,43] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,44,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,50,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",29,54] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",30,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",30,29] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",30,8,"removeEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",30,8,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",30,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",30,30,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",30,36,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,0,"onRaw"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,37,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,38,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,44,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,48,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",33,58] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,2,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,41] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,25,"toLowerCase"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,25,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,45,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",34,49,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,0,"onCmd"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,37,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,38,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,44,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,48,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",37,58] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,2,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,41] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,25,"toLowerCase"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,25,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,45,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",38,49,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,0,"onError"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,39] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,39,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,39] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,40,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,46,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,50,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",41,60] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,2,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,27,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,33,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",42,37,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",45,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",45,0,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",45,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",45,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,0,"cookie.write"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,0,"prototype.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,45] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,45,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,45] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,46,"name"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,52,"value"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",47,59] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,1,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,1,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,19,"name"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,50] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,32,"encodeURIComponent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,51,"value"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,60] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,74,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",48,74,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,0,"cookie.read"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,0,"prototype.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,44] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,44,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,44] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,45,"name"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",51,51] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",52,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",52,5,"nameEQ"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",52,14,"name"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",52,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",53,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",53,5,"ca"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",53,31] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",53,10,"split"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",53,10,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",53,10,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",53,32] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,9,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,13,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,17,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,17,"ca"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,27,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",54,32] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",55,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",55,6,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",55,10] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",55,10,"ca"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",55,13,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,17] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,9,"charAt"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,9,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,27,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,42] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,31,"substring"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,31,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,43] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,45,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",56,45,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",57,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",57,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",57,6,"indexOf"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",57,6,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",57,16,"nameEQ"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",57,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,28] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,10,"decodeURIComponent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,40] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,29,"substring"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,29,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,41,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,41,"nameEQ"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,55,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",58,55,"c"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",61,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",61,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,0,"load"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,0,"Client.prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,36] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,36,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,36] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,37,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",64,44] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",66,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",66,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",66,10,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",66,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,1,"transport"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,20,"transport"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,20,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,40,"transport"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,40,"Config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,40,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",68,64] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",69,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",69,1,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",69,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",69,20,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",69,20,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",69,40] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,1,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,17,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,17,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,34,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,34,"Config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,34,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,55,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",70,55,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,1,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,18,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,18,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,36,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,36,"Config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",71,36,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,1,"server"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,17,"server"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,17,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,34,"server"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,34,"Config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",72,34,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,1,"secure"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,17,"sercure"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,17,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,35,"secure"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,35,"Config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",73,35,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,1,"init"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,1,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",80,7] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",80,15,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,23,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,24,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",75,29] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",76,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",76,2,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",76,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",76,14,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,10,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,17,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,21,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,21,"eventProxy"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,45] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",77,45,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,3,"apply"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,3,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,29] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,29,"eventProxy"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,29] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",78,45,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",80,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",83,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",83,5,"transport"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",83,5,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",83,25] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",83,28] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,6,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,6,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,31] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,31,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,31,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,49,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",84,49,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,6,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,6,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,31] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,31,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,31,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,49,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",85,49,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",89,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",89,5,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",89,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",89,14,"read"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",89,14,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",89,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",89,31] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",90,5,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",90,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",90,11,"eval"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",90,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",90,22,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",90,31] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",92,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",92,5,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",93,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",93,2,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",93,2,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",93,21,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",93,21,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",93,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",95,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",95,2,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",95,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",98,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",98,5,"reg"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",98,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",98,15,"RegExp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",98,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",98,48] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,1,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,10,"replace"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,10,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,25,"reg"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,47,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",99,47,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",100,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",100,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",100,1,"write"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",100,1,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",100,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",100,19] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",100,33,"cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",102,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",102,5,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",102,36] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",102,14,"createElement"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",102,14,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",102,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,1,"setAttribute"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,1,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,35,"identifier"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",103,35,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",104,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",104,1,"display"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",104,1,"style"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",104,1,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",104,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",105,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",105,1,"position"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",105,1,"style"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",105,1,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",105,25] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",106,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",106,1,"left"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",106,1,"style"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",106,1,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",106,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",107,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",107,1,"top"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",107,1,"style"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",107,1,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",107,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,1,"insertBefore"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,1,"body"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,1,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,28,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,35,"childNodes"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,35,"body"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,35,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",109,60] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",111,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",111,22,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",111,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",111,25] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",112,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",112,31] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",112,2,"init"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",112,2,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",112,2,"contentWindow"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",112,2,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",112,32,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",115,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",115,5,"addEventListener"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",115,5,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",116,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",116,25] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",116,2,"addEventListener"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",116,2,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",116,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",116,34,"initFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",116,42] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",117,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",117,12,"attachEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",117,12,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",118,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",118,2,"attachEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",118,2,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",118,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",118,31,"initFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",121,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",121,5,"transport"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",121,5,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",121,25] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",121,28] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",122,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",122,6,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",122,12,"contentDocument"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",122,12,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,6] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,7,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,12] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,12,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,18,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,18,"contentWindow"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",123,18,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",127,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",127,10] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",127,2,"open"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",127,2,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",128,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",128,6,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",128,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,7] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,11,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,18,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,22,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,22,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,22,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,45] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",129,45,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,3,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,55] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,55,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,55,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,70,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",130,75] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",132,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",132,2,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",132,13] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",133,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",133,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",133,2,"write"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",133,2,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",133,12,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",134,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",134,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",134,2,"close"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",134,2,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",135,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,2,"setAttribute"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,2,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,29] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,29,"secure"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,29,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,45] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,54] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,64] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,72,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,72,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,91] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,97,"server"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,97,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,113] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,157,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,157,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,174] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,212] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,193,"join"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,193,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,193,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,213] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",136,222] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",137,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",137,6,"product"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",137,6,"navigator"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",137,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,3,"href"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,3,"location"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,3,"contentWindow"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,3,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,59] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,40,"getAttribute"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,40,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",140,60] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",146,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",146,4,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",146,4,"prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",146,4,"Function"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",146,31] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,1,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,1,"prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,1,"Function"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,35,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,36,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,42,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",147,48] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",148,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",148,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",148,9,"create"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",148,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",148,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",148,30,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",148,49,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",151,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",151,4,"create"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",151,4,"prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",151,4,"Function"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",151,33] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,1] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,1,"create"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,1,"prototype"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,1,"Function"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,37,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,38,"options"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",152,47] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",153,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",153,7,"self"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",153,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",154,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",154,3,"options"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",154,13,"options"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",154,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",155,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",155,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",155,18,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",155,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",155,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",156,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",156,8,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",156,15,"arguments"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",156,15,"options"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",156,36,"arguments"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",157,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",157,7,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",157,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",157,16,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",157,16,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",158,5] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",158,5,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",158,12] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",158,13,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",160,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",160,26,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",160,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",160,28] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,5] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,12,"apply"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,12,"self"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,23,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,23,"options"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,39] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",161,45,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",163,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",163,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientJS.js",163,11,"returns"] diff --git a/Build/closureCompiler/apeClientMoo.js b/Build/closureCompiler/apeClientMoo.js deleted file mode 100755 index 862e5ee..0000000 --- a/Build/closureCompiler/apeClientMoo.js +++ /dev/null @@ -1,22 +0,0 @@ -var APE={Config:{identifier:"ape",init:true,frequency:0,scripts:[]}}; -APE.Client=new Class({eventProxy:[],fireEvent:function(a,b,c){return this.core.fireEvent(a,b,c)},addEvent:function(a,b,c){var d=b.bind(this),e=this;if($defined(this.core)){e=this.core.addEvent(a,d,c);this.core.$originalEvents[a]=this.core.$originalEvents[a]||[];this.core.$originalEvents[a][b]=d}else this.eventProxy.push([a,b,c]);return e},onRaw:function(a,b,c){return this.addEvent("raw_"+a.toLowerCase(),b,c)},removeEvent:function(a,b){return this.core.removeEvent(a,b)},onCmd:function(a,b,c){return this.addEvent("cmd_"+ -a.toLowerCase(),b,c)},onError:function(a,b,c){return this.addEvent("error_"+a,b,c)},load:function(a){a=$merge({},APE.Config,a);a.init=function(f){this.core=f;for(f=0;f<\/script>'; -d+="";b.write(d);b.close()}else{c.set("src",(a.secure?"https":"http")+"://"+a.frequency+"."+a.server+'/?[{"cmd":"script","params":{"domain":"'+document.domain+'","scripts":["'+a.scripts.join('","')+'"]}}]');if(Browser.Engine.gecko)c.contentWindow.location.href=c.get("src")}}}); - -/*** - * APE JSF Setup - */ - -APE.Config.baseUrl = 'http://local.ape-project.org/APE_JSF'; //APE JSF -APE.Config.domain = 'ape-project.org'; -APE.Config.server = 'ape.local.ape-project.org:6969'; //APE server URL -APE.Config.baseUrl = 'http://ape.home.efyx.io/APE_JSF'; //APE JSF -APE.Config.domain = 'efyx.io'; -APE.Config.server = 'ape.home.efyx.io:6969'; //APE server URL -APE.Config.transport = 6; - -(function(){ - for (var i = 0; i < arguments.length; i++) - APE.Config.scripts.push(APE.Config.baseUrl + '/Source/' + arguments[i] + '.js'); -})('mootools-core', 'Core/APE', 'Core/Events', 'Core/Core', 'Pipe/Pipe', 'Pipe/PipeProxy', 'Pipe/PipeMulti', 'Pipe/PipeSingle', 'Request/Request','Request/Request.Stack', 'Request/Request.CycledStack', 'Transport/Transport.longPolling','Transport/Transport.SSE', 'Transport/Transport.XHRStreaming', 'Transport/Transport.JSONP', 'Transport/Transport.WebSocket', 'Core/Utility', 'Core/JSON'); diff --git a/Build/closureCompiler/apeClientMoo.js.map b/Build/closureCompiler/apeClientMoo.js.map deleted file mode 100755 index fe4f2ef..0000000 --- a/Build/closureCompiler/apeClientMoo.js.map +++ /dev/null @@ -1,415 +0,0 @@ -/** Begin line maps. **/{ "file" : "apeClientMoo.js", "count": 5 } -[1,1,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,4,4,4,4,4,6,6,6,6,6,4,4,4,4,4,4,4,4,4,4,7,7,4,4,4,4,4,4,4,4,8,8,8,4,3,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9] -[11,11,11,11,10,10,10,10,10,10,10,12,12,12,12,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,14,14,14,14,14,14,14,14,14,14,16,16,16,16,16,16,16,16,17,19,19,20,20,21,21,18,23,23,23,23,23,23,27,27,27,27,27,27,26,26,26,26,26,25,25,25,25,25,25,25,25,25,25,28,28,29,29,30,30,24,22,14,14,14,14,14,14,14,14,14,31,31,31,31,31,31,31,31,32,34,34,35,35,36,36,33,37,37,37,37,38,38,41,41,40,40,40,40,40,42,42,42,42,42,39,43,43,44,44,44,44,44,45,45,45,47,47,47,47,47,47,47,47,47,49,49,49,49,49,48,48,48,48,48,46,50,52,52,56,56,56,56,56,55,55,55,55,55,54,54,54,54,54,54,54,54,54,57,57,58,58,59,59,64,64,64,64,64,64,63,63,63,63,63,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,65,65,61,69,69,69,69,69,68,68,68,68,68,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,70,70,66,60,71,71,71,77,77,77,77,77,76,76,76,76,76,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,78,78,74,79,79,73,80,80,50,45,45,45,85,85,85,85,85,85,84,84,84,84,84,84,84,84,84,84,84,83,83,83,83,83,86,87,87,88,88,89,89,86,90,90,90,90,90,90,90,91,91,91,37,14,14,14,14,14,14,92,92,92,92,92,92,92,92,93,95,95,96,96,97,97,94,99,99,99,99,99,99,102,102,102,102,102,102,101,101,101,101,101,101,101,101,101,103,103,103,103,103,103,103,106,106,105,105,105,105,105,105,105,105,105,105,105,105,104,104,107,107,108,108,100,98,14,14,14,14,14,14,14,14,14,14,14,14,109,109,109,109,109,109,109,109,110,112,112,113,113,111,115,115,115,115,115,115,119,119,119,119,119,119,118,118,118,118,118,117,117,117,117,117,117,117,117,117,117,117,117,120,120,121,121,116,114,14,14,14,14,14,14,122,122,122,122,122,122,122,122,123,125,125,126,126,127,127,124,129,129,129,129,129,129,132,132,132,132,132,132,131,131,131,131,131,131,131,131,131,133,133,133,133,133,133,133] -[136,136,135,135,135,135,135,135,135,135,135,135,135,135,134,134,137,137,138,138,129,122,-1,-1,-1,-1,-1,-1,-1,-1,139,139,139,139,139,139,139,139,140,142,142,143,143,144,144,141,146,146,146,146,146,146,149,149,149,149,149,149,148,148,148,148,148,148,148,148,148,150,150,150,150,150,150,150,150,150,151,151,152,152,153,153,147,145,-1,-1,-1,-1,-1,154,154,154,154,154,154,154,154,155,157,157,156,160,160,162,162,162,162,162,162,162,163,163,163,165,165,165,165,164,164,164,164,164,164,164,166,166,169,169,169,168,168,168,168,168,172,172,172,172,172,172,172,172,173,175,175,174,179,179,179,179,179,178,178,178,178,178,180,180,181,181,181,181,182,182,183,183,184,184,187,187,187,187,187,186,186,186,186,186,186,186,186,186,186,186,185,185,185,185,185,185,185,189,189,188,188,194,194,194,194,194,193,193,193,193,193,193,193,193,193,192,192,192,192,192,192,195,195,195,195,195,198,198,198,198,198,197,197,197,197,197,197,197,197,197,197,197,199,199,196,190,176,171,171,171,171,171,200,200,200,200,200,170,201,201,201,203,203,202,202,202,202,202,202,202,202,202,202,201,204,204,205,206,206,206,208,208,207,207,207,207,207,207,207,206,209,209,209,209,209,209,209,212,212,212,212,212,212,212,212,212,211,211,211,211,211,211,211,214,214,213,213,213,213,213,213,213,215,215,215,217,217,216,216,216,216,216,216,216,215,218,218,218,218,218,218,218,221,221,221,221,221,221,221,221,221,220,220,220,220,220,220,220,223,223,223,223,223,223,223,223,223,222,222,222,222,222,222,222,224,224,224,224,225,225,228,228,228,228,228,227,227,227,227,227,227,227,231,231,231,231,231,231,231,230,230,230,230,230,232,232,232,232,232,232,232,232,232,232,232,232,232,229,233,233,233,233,233,233,233,233,235,235,235,235,235,235,235,235,235,234,234,234,234,234,234,234,233,236,236,236,236,237,237,240,240,239,239,239,239,239,239,239,239,239,239,244,244,243,243,243,243,243,243,243,243,243,243,242,242,242,242,242,242,241,241,236,236,236,236,246,246,246,247,247,247,247,247,247,247,247,247,247,247,248,248,251,251,251,250,250,250,250,250,250,250,250,250,250] -[253,253,252,252,252,252,252,252,252,252,252,252,254,254,258,258,258,258,258,258,258,257,257,257,257,257,257,259,259,259,259,259,259,259,259,259,259,259,259,259,262,262,262,262,262,261,261,261,261,261,261,261,263,263,260,264,264,264,264,264,264,264,264,266,266,266,266,266,266,266,266,266,265,265,265,265,265,265,265,264,255,267,267,267,267,268,268,270,271,271,271,271,272,272,272,272,272,272,272,272,273,273,273,273,273,273,273,273,273,274,274,274,274,275,275,275,275,275,275,275,277,277,276,276,276,276,276,276,276,276,276,276,276,274,274,274,274,274,274,274,278,278,278,278,278,278,278,278,278,279,279,279,279,279,279,279,278,278,278,278,278,278,278,278,278,280,280,280,280,280,280,280,280,280,280,280,278,278,278,278,278,281,281,281,281,281,278,278,278,278,282,282,282,282,282,278,274,271,270,270,270,270,270,270,270,270,284,284,284,284,284,284,284,284,284,283,283,283,283,283,288,288,288,287,287,287,287,287,287,287,287,287,289,289,289,289,289,289,289,290,290,290,290,290,290,290,290,291,292,292,297,297,296,296,296,296,296,296,296,296,296,296,296,296,296,296,295,295,295,295,302,302,301,301,301,301,301,301,301,301,301,301,301,301,301,301,300,300,300,300,299,299,299,299,299,303,303,298,305,305,305,305,305,305,305,305,305,305,305,307,307,306,306,306,306,306,306,306,308,308,308,308,304,293,285,309,309,309,311,311,310,310,310,310,310,310,310,310,310,310,309,312,312,313,315,315,317,317,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,318,318,318,319,320,320,322,322,325,325,324,324,324,324,324,324,324,324,324,324,324,324,324,324,323,323,323,323,323,323,323,323,329,329,329,328,328,328,328,328,326,326,330,330,330,330,331,331,331,331,332,332,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,334,334,335,335,336,336,339,339,338,338,338,338,338,338,338,338,337,337,337,337,337,337,337,341,341,340,340,343,343,342,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,347,347,346,346,346,346,346,346,346,346,348,348,345,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349] -[351,351,350,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,356,356,356,355,355,355,355,355,355,357,357,361,361,361,360,360,360,360,360,360,358,358,313,309,309,309,362,366,366,365,365,365,365,367,367,367,367,367,367,363,370,370,369,369,369,369,369,369,369,371,371,371,371,371,371,371,371,372,372,372,372,372,372,372,363,373,373,373,373,373,373,375,375,374,374,374,374,374,374,374,374,374,374,376,376,376,376,378,378,377,377,377,377,377,377,377,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,381,381,381,381,381,381,381,381,381,380,380,380,380,380,380,380,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,386,386,385,385,385,385,385,385,385,385,384,384,384,384,384,387,387,387,387,387,387,383,388,388,388,388,388,388,388,388,389,389,389,389,392,392,392,392,392,392,392,392,391,391,391,391,391,391,391,390,390,390,390,390,390,397,397,396,396,396,396,396,396,396,396,396,396,396,396,396,396,395,395,395,395,395,395,395,395,395,394,394,394,394,394,400,400,399,399,399,399,401,401,401,401,401,401,398,362,154,14,0] -/** Begin file information. **/ -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js"] -/** Begin mapping definitions. **/ -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",1,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",1,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",1,4,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",1,10] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",2,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",3,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",4,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",5,13] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",6,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",10,0] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",10,0,"Client"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",10,0,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",10,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",10,17,"Class"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",10,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",12,13] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",14,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",14,20,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",14,20] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",14,21,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",14,27,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",14,33,"delay"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",14,39] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,28] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,9,"fireEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,9,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,29,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,35,"args"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",15,41,"delay"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",18,19] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",18,19,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",18,19] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",18,20,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",18,26,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",18,30,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",18,39] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",19,6,"newFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",19,21] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",19,14,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",19,14,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",19,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",19,29,"ret"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",19,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,6,"$defined"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,15,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",21,7] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,3,"ret"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,9,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,9,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,28,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,34,"newFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",22,41,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,3,"$originalEvents"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,3,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,29,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,37,"$originalEvents"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,37,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,63,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",23,72] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,3,"$originalEvents"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,3,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,29,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,35,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",24,41,"newFn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,47] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,27,"push"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,27,"eventProxy"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,48] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,49,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,55,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",20,59,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",26,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",26,9,"ret"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",29,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",29,16,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",29,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",29,17,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",29,23,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",29,27,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",29,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,9,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,48] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,32,"toLowerCase"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,32,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,52,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",30,56,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",33,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",33,22,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",33,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",33,23,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",33,29,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",33,33] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",34,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",34,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",34,9,"removeEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",34,9,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",34,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",34,31,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",34,37,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",37,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",37,16,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",37,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",37,17,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",37,23,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",37,27,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",37,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,9,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,48] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,32,"toLowerCase"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,32,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,52,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",38,56,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",41,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",41,18,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",41,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",41,19,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",41,25,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",41,29,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",41,39] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,9,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,34,"type"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,40,"fn"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",42,44,"internal"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",45,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",45,15,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",45,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",45,16,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",45,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,2,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,17] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,11,"$merge"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,22,"Config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,22,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",46,34,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,2,"init"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,2,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",54,8] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",54,16,"bind"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,24,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,25,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",49,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",50,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",50,3,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",50,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",50,15,"core"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,11,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,18,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,22,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,22,"eventProxy"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,46] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",51,46,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,4,"apply"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,4,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,30,"eventProxy"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,30] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",52,46,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",54,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",57,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",57,6,"transport"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",57,6,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",57,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",57,29] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,7,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,7,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,32] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,32,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,32,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,50,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",58,50,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,7,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,7,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,24] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,32] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,32,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,32,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,50,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",59,50,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,6,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,12,"decode"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,12,"JSON"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,24,"read"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,24,"Cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,36] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,51] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,62,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",62,62,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",64,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",64,5,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",65,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",65,3,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",65,3,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",65,41] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",65,22,"toInt"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",65,22,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",65,22,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",67,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",67,3,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",67,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",67,23] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",70,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",70,2,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",70,2,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",70,18,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",70,18,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",70,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,2,"write"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,2,"Cookie"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,40] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,29,"encode"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,29,"JSON"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,41,"tmp"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,47] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,58,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",72,58,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",74,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",74,6,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",82,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",82,15,"inject"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",74,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",74,19,"Element"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",74,27] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",74,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",75,7] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",75,16,"identifier"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",75,16,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",76,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",77,13] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",78,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",79,10] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",80,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",82,12,"body"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",82,12,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,17] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,2,"addEvent"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,2,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,18] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,35,""] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,35] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",84,38] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,8,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,8,"contentWindow"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,8,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",86,37] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",86,8,"init"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",86,8,"APE"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",86,8,"contentWindow"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",86,8,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",86,38,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,44] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,34,"setTimeout"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,45,"onload"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,45,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",85,60] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",89,2] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",89,6,"transport"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",89,6,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",89,26] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",89,29] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",90,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",90,7,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",90,13,"contentDocument"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",90,13,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,7] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,8,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,13] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,13,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,19,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,19,"contentWindow"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",91,19,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",95,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",95,11] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",95,3,"open"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",95,3,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",96,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",96,7,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",96,17] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,12,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,16] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,19,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,23,"length"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,23,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,23,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,46] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",97,46,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,4,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,15] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,33] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,33,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,33,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,48,"i"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",98,53] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",100,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",100,3,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",100,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",101,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",101,12] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",101,3,"write"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",101,3,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",101,13,"theHtml"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",102,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",102,12] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",102,3,"close"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",102,3,"doc"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",103,9] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,13] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,3,"set"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,3,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,14] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,22] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,22,"secure"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,22,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,38] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,48] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,58] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,66,"frequency"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,66,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,85] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,91,"server"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,91,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,107] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,151,"domain"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,151,"document"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,169] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,207] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,188,"join"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,188,"scripts"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,188,"config"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,208] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",104,217] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",105,3] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",105,7,"gecko"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",105,7,"Engine"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",105,7,"Browser"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,4] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,4,"href"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,4,"location"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,4,"contentWindow"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,4,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,51] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,41,"get"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,41,"iframe"] -["/home/efyx/projet/ape/APE_git/APE_JSF/Build/uncompressed/apeClientMoo.js",108,52] diff --git a/Build/closureCompiler/apeCore.js b/Build/closureCompiler/apeCore.js deleted file mode 100755 index 3bcb894..0000000 --- a/Build/closureCompiler/apeCore.js +++ /dev/null @@ -1,111 +0,0 @@ -var MooTools={version:"1.2.5",build:"008d8f0f2fcc2044e54fdd3635341aaab274e757"}; -function Native(a){a=a||{};var b=a.name,c=a.legacy,d=a.protect,e=a.implement,f=a.generics,g=a.initialize,l=a.afterImplement||function(){};a=g||c;f=f!==false;a.constructor=Native;a.$family={name:"native"};if(c&&g)a.prototype=c.prototype;a.prototype.constructor=a;if(b){b=b.toLowerCase();a.prototype.$family={name:b};Native.typize(a,b)}function j(h,i,k,m){if(!d||m||!h.prototype[i])h.prototype[i]=k;f&&Native.genericize(h,i,d);l.call(h,i,k);return h}a.alias=function(h,i,k){if(typeof h=="string")if(h=h= -this.prototype[h])return j(this,i,h,k);for(var m in h)this.alias(m,h[m],i);return this};a.implement=function(h,i,k){if(typeof h=="string")return j(this,h,i,k);for(var m in h)j(this,m,h[m],i);return this};e&&a.implement(e);return a}Native.genericize=function(a,b,c){if((!c||!a[b])&&typeof a.prototype[b]=="function")a[b]=function(){var d=Array.prototype.slice.call(arguments);return a.prototype[b].apply(d.shift(),d)}};Native.implement=function(a,b){for(var c=0,d=a.length;c-1:this.indexOf(a)>-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s+/g," ").trim()},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return"-"+a.charAt(0).toLowerCase()})},capitalize:function(){return this.replace(/\b[a-z]/g, -function(a){return a.toUpperCase()})},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(a){return parseInt(this,a||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(a){var b=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return b?b.slice(1).hexToRgb(a):null},rgbToHex:function(a){var b=this.match(/\d{1,3}/g);return b?b.rgbToHex(a):null},stripScripts:function(a){var b="",c=this.replace(/]*>([\s\S]*?)<\/script>/gi,function(d,e){b+= -e+"\n";return""});if(a===true)$exec(b);else $type(a)=="function"&&a(b,c);return c},substitute:function(a,b){return this.replace(b||/\\?\{([^{}]+)\}/g,function(c,d){if(c.charAt(0)=="\\")return c.slice(1);return a[d]!=undefined?a[d]:""})}}); -Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(a){for(var b in this)if(this.hasOwnProperty(b)&&this[b]===a)return b;return null},hasValue:function(a){return Hash.keyOf(this,a)!==null},extend:function(a){Hash.each(a||{},function(b,c){Hash.set(this,c,b)},this);return this},combine:function(a){Hash.each(a||{},function(b,c){Hash.include(this,c,b)},this);return this},erase:function(a){this.hasOwnProperty(a)&&delete this[a];return this},get:function(a){return this.hasOwnProperty(a)? -this[a]:null},set:function(a,b){if(!this[a]||this.hasOwnProperty(a))this[a]=b;return this},empty:function(){Hash.each(this,function(a,b){delete this[b]},this);return this},include:function(a,b){if(this[a]==undefined)this[a]=b;return this},map:function(a,b){var c=new Hash;Hash.each(this,function(d,e){c.set(e,a.call(b,d,e,this))},this);return c},filter:function(a,b){var c=new Hash;Hash.each(this,function(d,e){a.call(b,d,e,this)&&c.set(e,d)},this);return c},every:function(a,b){for(var c in this)if(this.hasOwnProperty(c)&& -!a.call(b,this[c],c))return false;return true},some:function(a,b){for(var c in this)if(this.hasOwnProperty(c)&&a.call(b,this[c],c))return true;return false},getKeys:function(){var a=[];Hash.each(this,function(b,c){a.push(c)});return a},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b)});return a},toQueryString:function(a){var b=[];Hash.each(this,function(c,d){if(a)d=a+"["+d+"]";switch($type(c)){case "object":d=Hash.toQueryString(c,d);break;case "array":var e={};c.each(function(f, -g){e[g]=f});d=Hash.toQueryString(e,d);break;default:d=d+"="+encodeURIComponent(c)}c!=undefined&&b.push(d)});return b.join("&")}});Hash.alias({keyOf:"indexOf",hasValue:"contains"}); -var Event=new Native({name:"Event",initialize:function(a,b){b=b||window;var c=b.document;a=a||b.event;if(a.$extended)return a;this.$extended=true;for(var d=a.type,e=a.target||a.srcElement;e&&e.nodeType==3;)e=e.parentNode;if(d.test(/key/)){var f=a.which||a.keyCode,g=Event.Keys.keyOf(f);if(d=="keydown"){b=f-111;if(b>0&&b<13)g="f"+b}g=g||String.fromCharCode(f).toLowerCase()}else if(d.match(/(click|mouse|menu)/i)){c=!c.compatMode||c.compatMode=="CSS1Compat"?c.html:c.body;var l={x:a.pageX||a.clientX+c.scrollLeft, -y:a.pageY||a.clientY+c.scrollTop},j={x:a.pageX?a.pageX-b.pageXOffset:a.clientX,y:a.pageY?a.pageY-b.pageYOffset:a.clientY};if(d.match(/DOMMouseScroll|mousewheel/))var h=a.wheelDelta?a.wheelDelta/120:-(a.detail||0)/3;var i=a.which==3||a.button==2,k=null;if(d.match(/over|out/)){switch(d){case "mouseover":k=a.relatedTarget||a.fromElement;break;case "mouseout":k=a.relatedTarget||a.toElement}(function(){for(;k&&k.nodeType==3;)k=k.parentNode;return true}).create({attempt:Browser.Engine.gecko})()||(k=false)}}return $extend(this, -{event:a,type:d,page:l,client:j,rightClick:i,wheel:h,relatedTarget:k,target:e,code:f,key:g,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.metaKey})}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46}); -Event.implement({stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this}}); -function Class(a){if(a instanceof Function)a={initialize:a};var b=function(){Object.reset(this);if(b._prototyping)return this;this._current=$empty;var c=this.initialize?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c}.extend(this);b.implement(a);b.constructor=Class;return b.prototype.constructor=b}Function.prototype.protect=function(){this._protected=true;return this}; -Object.reset=function(a,b){if(b==null){for(var c in a)Object.reset(a,c);return a}delete a[b];switch($type(a[b])){case "object":c=function(){};c.prototype=a[b];c=new c;a[b]=Object.reset(c);break;case "array":a[b]=$unlink(a[b]);break}return a}; -(new Native({name:"Class",initialize:Class})).extend({instantiate:function(a){a._prototyping=true;var b=new a;delete a._prototyping;return b},wrap:function(a,b,c){if(c._origin)c=c._origin;return function(){if(c._protected&&this._current==null)throw new Error('The method "'+b+'" cannot be called.');var d=this.caller,e=this._current;this.caller=e;this._current=arguments.callee;var f=c.apply(this,arguments);this._current=e;this.caller=d;return f}.extend({_owner:a,_origin:c,_name:b})}}); -Class.implement({implement:function(a,b){if($type(a)=="object"){for(var c in a)this.implement(c,a[c]);return this}if(c=Class.Mutators[a]){b=c.call(this,b);if(b==null)return this}c=this.prototype;switch($type(b)){case "function":if(b._hidden)return this;c[a]=Class.wrap(this,a,b);break;case "object":var d=c[a];if($type(d)=="object")$mixin(d,b);else c[a]=$unlink(b);break;case "array":c[a]=$unlink(b);break;default:c[a]=b}return this}}); -Class.Mutators={Extends:function(a){this.parent=a;this.prototype=Class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c)throw new Error('The method "'+b+'" has no parent.');return c.apply(this,arguments)}.protect())},Implements:function(a){$splat(a).each(function(b){if(b instanceof Function)b=Class.instantiate(b);this.implement(b)},this)}}; -var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this},callChain:function(){return this.$chain.length?this.$chain.shift().apply(this,arguments):false},clearChain:function(){this.$chain.empty();return this}}),Events=new Class({$events:{},addEvent:function(a,b,c){a=Events.removeOn(a);if(b!=$empty){this.$events[a]=this.$events[a]||[];this.$events[a].include(b);if(c)b.internal=true}return this},addEvents:function(a){for(var b in a)this.addEvent(b,a[b]); -return this},fireEvent:function(a,b,c){a=Events.removeOn(a);if(!this.$events||!this.$events[a])return this;this.$events[a].each(function(d){d.create({bind:this,delay:c,arguments:b})()},this);return this},removeEvent:function(a,b){a=Events.removeOn(a);if(!this.$events[a])return this;b.internal||this.$events[a].erase(b);return this},removeEvents:function(a){var b;if($type(a)=="object"){for(b in a)this.removeEvent(b,a[b]);return this}if(a)a=Events.removeOn(a);for(b in this.$events)if(!(a&&a!=b))for(var c= -this.$events[b],d=c.length;d--;)this.removeEvent(b,c[d]);return this}});Events.removeOn=function(a){return a.replace(/^on([A-Z])/,function(b,c){return c.toLowerCase()})}; -var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent)return this;for(var a in this.options)if(!($type(this.options[a])!="function"||!/^on[A-Z]/.test(a))){this.addEvent(a,this.options[a]);delete this.options[a]}return this}}),Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(a,b){this.key=a;this.setOptions(b)},write:function(a){a=encodeURIComponent(a); -if(this.options.domain)a+="; domain="+this.options.domain;if(this.options.path)a+="; path="+this.options.path;if(this.options.duration){var b=new Date;b.setTime(b.getTime()+this.options.duration*24*60*60*1E3);a+="; expires="+b.toGMTString()}if(this.options.secure)a+="; secure";this.options.document.cookie=this.key+"="+a;return this},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return a?decodeURIComponent(a[1]):null},dispose:function(){(new Cookie(this.key, -$merge(this.options,{duration:-1}))).write("");return this}});Cookie.write=function(a,b,c){return(new Cookie(a,c)).write(b)};Cookie.read=function(a){return(new Cookie(a)).read()};Cookie.dispose=function(a,b){return(new Cookie(a,b)).dispose()}; -var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,noCache:false},initialize:function(a){this.xhr=new Browser.Request;this.setOptions(a);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers= -new Hash(this.options.headers)},onStateChange:function(){if(!(this.xhr.readyState!=4||!this.running)){this.running=false;this.status=0;$try(function(){this.status=this.xhr.status}.bind(this));this.xhr.onreadystatechange=$empty;if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml)}else{this.response={text:null,xml:null};this.failure()}}},isSuccess:function(){return this.status>=200&&this.status< -300},processScripts:function(a){if(this.options.evalResponse||/(ecma|java)script/.test(this.getHeader("Content-type")))return $exec(a);return a.stripScripts(this.options.evalScripts)},success:function(a,b){this.onSuccess(this.processScripts(a),b)},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain()},failure:function(){this.onFailure()},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr)},setHeader:function(a,b){this.headers.set(a, -b);return this},getHeader:function(a){return $try(function(){return this.xhr.getResponseHeader(a)}.bind(this))},check:function(){if(!this.running)return true;switch(this.options.link){case "cancel":this.cancel();return true;case "chain":this.chain(this.caller.bind(this,arguments));return false}return false},send:function(a){if(!this.check(a))return this;this.running=true;var b=$type(a);if(b=="string"||b=="element")a={data:a};b=this.options;a=$extend({data:b.data,url:b.url,method:b.method},a);b=a.data; -var c=String(a.url);a=a.method.toLowerCase();switch($type(b)){case "element":b=document.id(b).toQueryString();break;case "object":case "hash":b=Hash.toQueryString(b)}if(this.options.format){var d="format="+this.options.format;b=b?d+"&"+b:d}if(this.options.emulation&&!["get","post"].contains(a)){a="_method="+a;b=b?a+"&"+b:a;a="post"}if(this.options.urlEncoded&&a=="post"){d=this.options.encoding?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+ -d)}if(this.options.noCache){d="noCache="+(new Date).getTime();b=b?d+"&"+b:d}d=c.lastIndexOf("/");if(d>-1&&(d=c.indexOf("#"))>-1)c=c.substr(0,d);if(b&&a=="get"){c=c+(c.contains("?")?"&":"?")+b;b=null}this.xhr.open(a.toUpperCase(),c,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(e,f){try{this.xhr.setRequestHeader(f,e)}catch(g){this.fireEvent("exception",[f,e])}},this);this.fireEvent("request");this.xhr.send(b);this.options.async||this.onStateChange(); -return this},cancel:function(){if(!this.running)return this;this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request;this.fireEvent("cancel");return this}});(function(){var a={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(b){a[b]=function(){var c=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(c,{method:b}))}});Request.implement(a)})();var APE={version:"1.1",Request:{},Transport:{}}; -APE.Events=new Class({Extends:Events,onRaw:function(a,b,c){return this.addEvent("raw_"+a.toLowerCase(),b,c)},onCmd:function(a,b,c){return this.addEvent("cmd_"+a.toLowerCase(),b,c)},onError:function(a,b,c){return this.addEvent("error_"+a,b,c)},removeEvent:function(a,b){return Events.prototype.removeEvent.run([a,this.$originalEvents[a][b]],this)}}); -APE.Core=new Class({Implements:[APE.Events,Options],$originalEvents:{},options:{server:"",pollTime:25E3,identifier:"ape",transport:0,frequency:0,cycledStackTime:350,secure:false},initialize:function(a){window.Ape=this;this.setOptions(a);this.selectTransport();this.request=new APE.Request(this);this.pipes=new $H;this.users=new $H;this.pubid=this.sessid=null;this.serverUri=(this.options.secure?"https":"http")+"://"+this.options.frequency+"."+this.options.server+"/"+this.options.transport+"/?";this.timer= -null;this.failCounter=this.status=0;this.pollerObserver=null;this.requestDisabled=false;this.onRaw("login",this.rawLogin);this.onRaw("err",this.rawErr);this.onRaw("ident",this.rawIdent);this.onRaw("quit",this.rawQuit);this.onError("003",this.clearSession);this.onError("004",this.clearSession);a.init&&a.init.apply(null,[this]);a.complete&&a.complete.apply(null,[this]);this.fireEvent("load",this);this.options.connectOptions&&this.start(this.options.connectOptions)},selectTransport:function(){for(var a= -[APE.Transport.longPolling,APE.Transport.XHRStreaming,APE.Transport.JSONP,null,null,null,APE.Transport.WebSocket],b=this.options.transport,c;c!==true;){c=a[b].browserSupport();if(c===true){this.options.transport=b;this.transport=new a[b](this)}else b=c}},poller:function(){this.pollerActive&&this.check()},startPoller:function(){this.pollerActive=true},stopPoller:function(){$clear(this.pollerObserver);this.pollerActive=false},stopRequest:function(){this.cancelRequest();this.transport.streamRequest&& -this.transport.streamRequest.cancel();this.requestDisabled=true},parseParam:function(a){return $type(a)=="object"?Hash.getValues(a):$splat(a)},cancelRequest:function(){this.transport.cancel()},requestFail:function(a){if(this.status>0){this.status=a;this.cancelRequest();this.stopPoller();this.fireEvent("apeDisconnect")}this.failCounter<6&&this.failCounter++;this.cancelRequest();a=this.failCounter*$random(300,1E3);this.check.delay(a,this)},parseResponse:function(a,b){if(a)if(this.status<0){this.failCounter= -0;this.status=1;this.startPoller();this.fireEvent("apeReconnect")}var c=false;if(a){a=JSON.parse(a);if(!a){this.check();return}for(var d=0;d0?true: -false;a[3]=true;this.send.run(a,this)}}});APE.Request.Stack=new Class({initialize:function(a){this.ape=a;this.stack=[]},add:function(a,b,c){this.stack.push({cmd:a,params:b,options:c})},send:function(){this.ape.request.send(this.stack);this.stack=[]}}); -APE.Request.CycledStack=new Class({initialize:function(a){this.ape=a;this.stack=[];this.reajustTime=false;this.timer=this.send.periodical(this.ape.options.cycledStackTime,this)},add:function(a,b,c){this.stack.push({cmd:a,params:b,sessid:c})},setTime:function(a,b){if(b){this.send();$clear(this.timer);this.timer=this.send.periodical(a,this);this.reajustTime=false}else this.reajustTime=a},send:function(){if(this.stack.length>0){this.ape.request.send(this.stack);this.stack=[];this.reajustTime&&this.setTime(this.reajustTime, -true)}}});Request=new Class({Extends:Request,send:function(a){if(Browser.Engine.webkit)this.xhr.onreadystatechange=this.onStateChange.bind(this);return this.parent(a)},onStateChange:function(){if(this.xhr.readyState==1)this.dataSent=true;this.parent()}}); -APE.Transport.longPolling=new Class({initialize:function(a){this.ape=a;this.requestFailObserver=[]},send:function(a,b){a=(new Request({url:this.ape.serverUri,onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(c){$clear(this.requestFailObserver.shift());this.ape.parseResponse(c,b.requestCallback)}.bind(this)})).send(a);a.id=$time();this.request=a;this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+1E4,this.ape,[-1,a]));return a},running:function(){return this.request? -this.request.running:false},cancel:function(){this.request&&this.request.cancel();$clear(this.requestFailObserver.shift())}});APE.Transport.longPolling.browserSupport=function(){return Browser.Features.xhr?true:2}; -APE.Request.SSE=new Class({SSESupport:typeof window.addEventStream=="function",initSSE:function(a,b,c){b=document.createElement("div");document.body.appendChild(b);b.innerHTML='';this.eventSource=document.getElementById("APE_SSE");this.eventSource.addEventListener("ape-data",function(d){c.run(d.data)},false)}}); -Request.XHRStreaming=new Class({Extends:Request,lastTextLength:0,read:0,send:function(a){if(Browser.Engine.webkit)this.xhr.onreadystatechange=this.onStateChange.bind(this);return this.parent(a)},onStateChange:function(){if(this.xhr.readyState==1)this.dataSent=true;else this.xhr.readyState==3&&this.progress(this.xhr.responseText,this.xhr.responseXML);this.parent()},onProgress:function(){this.fireEvent("progress",arguments)},progress:function(a,b){var c=a.length;this.read+=c;a=a.substr(this.lastTextLength); -this.lastTextLength=c;this.onProgress(this.processScripts(a),b)}}); -APE.Transport.XHRStreaming=new Class({maxRequestSize:1E5,Implements:APE.Request.SSE,initialize:function(a){this.ape=a;this.requestFailObserver=[];if(this.SSESupport)this.ape.options.transport=4;this.streamInfo={timeoutObserver:null,cleanClose:false,forceClose:false,callback:null}},send:function(a,b){if(this.SSESupport&&!this.eventSource){this.initSSE(a,b,this.readSSE.bind(this));if(b.requestCallback)this.streamInfo.callback=b.requestCallback}else{if((!this.streamRequest||!this.streamRequest.running)&& -!this.eventSource){this.buffer="";this.request=this.doRequest(a,b);if(b.requestCallback)this.streamInfo.callback=b.requestCallback}else{this.request=a=(new Request({url:this.ape.serverUri,onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(c){$clear(this.requestFailObserver.shift());this.request.dataSent=true;this.ape.parseResponse(c,b.callback)}.bind(this)})).send(a);this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+1E4,this.ape,[1,a]))}return this.request}}, -doRequest:function(a){this.streamInfo.forceClose=false;a=(new Request.XHRStreaming({url:this.ape.serverUri,onProgress:this.readFragment.bindWithEvent(this),onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(){$clear(this.streamInfo.timeoutObserver);if(this.ape.status>0){this.streamInfo.cleanClose?this.ape.check():this.newStream();this.streamInfo.cleanClose=false}}.bind(this)})).send(a);a.id=$time();return this.streamRequest=a},readSSE:function(a){this.ape.parseResponse(a, -this.streamInfo.callback);this.streamInfo.callback=null},readFragment:function(a){this.streamInfo.canClose=false;if(a==""){this.streamInfo.canClose=true;this.streamInfo.cleanClose=true;this.ape.parseResponse(a,this.streamInfo.callback);this.streamInfo.callback=null}else{a=this.buffer+a;var b=a.split("\n\n"),c=b.length;if(b.length>1){this.buffer="";for(a=0;a=this.maxRequestSize&&this.streamInfo.canClose},newStream:function(){$clear(this.streamInfo.timeoutObserver);this.streamRequest.cancel();this.ape.check()},cancel:function(){this.request&&this.request.cancel(); -$clear(this.streamInfo.timeoutObserver);$clear(this.requestFailObserver.shift())}});APE.Transport.XHRStreaming.browserSupport=function(){return Browser.Features.xhr&&(Browser.Engine.webkit||Browser.Engine.gecko)?true:Browser.Features.xhr?0:2}; -APE.Transport.JSONP=new Class({Implements:APE.Transport.SSE,initialize:function(a){this.ape=a;this.requestFailObserver=[];this.requests=[];window.parent.onkeyup=function(b){if(b.keyCode==27){this.cancel();this.ape.status>0&&this.ape.check()}}.bind(this)},send:function(a,b){this.callback=b.requestCallback;b=document.createElement("script");b.src=this.ape.serverUri+a;document.head.appendChild(b);this.requests.push(b);this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+ -1E4,this.ape,[-1,b]));Browser.Engine.gecko&&function(){var c=document.createElement("iframe");document.body.appendChild(c);document.body.removeChild(c)}.delay(200)},clearRequest:function(a){a.parentNode.removeChild(a);if(a.clearAttributes)a.clearAttributes();else for(var b in a)delete a[b];$clear(this.requestFailObserver.shift())},readSSE:function(a){this.ape.parseResponse(a,this.callback);this.callback=null},read:function(a){$clear(this.requestFailObserver.shift());this.clearRequest(this.requests.shift()); -this.ape.parseResponse(a,this.callback);this.callback=null},cancel:function(){this.requests.length>0&&this.clearRequest(this.requests.shift())},running:function(){return this.requests.length>0?true:false}});APE.Transport.JSONP.browserSupport=function(){return true}; -APE.Transport.WebSocket=new Class({stack:[],connRunning:false,initialize:function(a){this.ape=a;this.initWs()},initWs:function(){var a=(this.ape.options.secure?"wss":"ws")+"://"+this.ape.options.frequency+"."+this.ape.options.server+"/"+this.ape.options.transport+"/";this.ws="MozWebSocket"in window?new MozWebSocket(a):new WebSocket(a);this.connRunning=true;this.ws.onmessage=this.readWs.bind(this);this.ws.onopen=this.openWs.bind(this);this.ws.onclose=this.closeWs.bind(this);this.ws.onerror=this.errorWs.bind(this)}, -readWs:function(a){this.ape.parseResponse(a.data,this.callback);this.callback=null},openWs:function(){if(this.stack.length>0){for(var a=0;a>>18&63));b.push(B64.$tab.charAt(e>>>12&63));b.push(B64.$tab.charAt(e>>>6&63));b.push(B64.$tab.charAt(e&63))}switch(d){case 2:e=a.charCodeAt(f++)<<16|a.charCodeAt(f++)<<8;b.push(B64.$tab.charAt(e>>>18&63));b.push(B64.$tab.charAt(e>>>12&63));b.push(B64.$tab.charAt(e>>> -6&63));b.push(B64.$p);break;case 1:e=a.charCodeAt(f++)<<16;b.push(B64.$tab.charAt(e>>>18&63));b.push(B64.$tab.charAt(e>>>12&63));b.push(B64.$p);b.push(B64.$p);break}return b.join("")},decode:function(a){a=a.split("");for(var b=[],c=a.length,d=0;a[--c]==B64.$p;)++d;for(var e=0;e>>16&255));b.push(String.fromCharCode(f>>> -8&255));b.push(String.fromCharCode(f&255))}for(;d--;)b.pop();return b.join("")}});try{window.parent.setInterval();if(!Browser.Engine.trident&&!Browser.Engine.presto&&!(Browser.Engine.gecko&&Browser.Engine.version<=18)){setInterval=function(a,b){return window.parent.setInterval(a,b)};setTimeout=function(a,b){return window.parent.setTimeout(a,b)};clearInterval=function(a){return window.parent.clearInterval(a)};clearTimeout=function(a){return window.parent.clearTimeout(a)}}}catch(e$$3){} -if(!this.JSON)this.JSON={}; -(function(){function a(g){return'"'+g+'"'}function b(g,l){var j,h=d,i=l[g];if(typeof f==="function")i=f.call(l,g,i);switch(typeof i){case "string":return a(i);case "number":return isFinite(i)?String(i):"null";case "boolean":case "null":return String(i);case "object":if(!i)return"null";d+=e;g=[];if(Object.prototype.toString.apply(i)==="[object Array]"){l=i.length;for(j=0;j-1:this.indexOf(a)>-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s+/g," ").trim()},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return"-"+a.charAt(0).toLowerCase()})},capitalize:function(){return this.replace(/\b[a-z]/g, -function(a){return a.toUpperCase()})},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(a){return parseInt(this,a||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(a){var b=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return b?b.slice(1).hexToRgb(a):null},rgbToHex:function(a){var b=this.match(/\d{1,3}/g);return b?b.rgbToHex(a):null},stripScripts:function(a){var b="",c=this.replace(/]*>([\s\S]*?)<\/script>/gi,function(d,e){b+= -e+"\n";return""});if(a===true)$exec(b);else $type(a)=="function"&&a(b,c);return c},substitute:function(a,b){return this.replace(b||/\\?\{([^{}]+)\}/g,function(c,d){if(c.charAt(0)=="\\")return c.slice(1);return a[d]!=undefined?a[d]:""})}}); -Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(a){for(var b in this)if(this.hasOwnProperty(b)&&this[b]===a)return b;return null},hasValue:function(a){return Hash.keyOf(this,a)!==null},extend:function(a){Hash.each(a||{},function(b,c){Hash.set(this,c,b)},this);return this},combine:function(a){Hash.each(a||{},function(b,c){Hash.include(this,c,b)},this);return this},erase:function(a){this.hasOwnProperty(a)&&delete this[a];return this},get:function(a){return this.hasOwnProperty(a)? -this[a]:null},set:function(a,b){if(!this[a]||this.hasOwnProperty(a))this[a]=b;return this},empty:function(){Hash.each(this,function(a,b){delete this[b]},this);return this},include:function(a,b){if(this[a]==undefined)this[a]=b;return this},map:function(a,b){var c=new Hash;Hash.each(this,function(d,e){c.set(e,a.call(b,d,e,this))},this);return c},filter:function(a,b){var c=new Hash;Hash.each(this,function(d,e){a.call(b,d,e,this)&&c.set(e,d)},this);return c},every:function(a,b){for(var c in this)if(this.hasOwnProperty(c)&& -!a.call(b,this[c],c))return false;return true},some:function(a,b){for(var c in this)if(this.hasOwnProperty(c)&&a.call(b,this[c],c))return true;return false},getKeys:function(){var a=[];Hash.each(this,function(b,c){a.push(c)});return a},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b)});return a},toQueryString:function(a){var b=[];Hash.each(this,function(c,d){if(a)d=a+"["+d+"]";switch($type(c)){case "object":d=Hash.toQueryString(c,d);break;case "array":var e={};c.each(function(f, -g){e[g]=f});d=Hash.toQueryString(e,d);break;default:d=d+"="+encodeURIComponent(c)}c!=undefined&&b.push(d)});return b.join("&")}});Hash.alias({keyOf:"indexOf",hasValue:"contains"}); -var Event=new Native({name:"Event",initialize:function(a,b){b=b||window;var c=b.document;a=a||b.event;if(a.$extended)return a;this.$extended=true;for(var d=a.type,e=a.target||a.srcElement;e&&e.nodeType==3;)e=e.parentNode;if(d.test(/key/)){var f=a.which||a.keyCode,g=Event.Keys.keyOf(f);if(d=="keydown"){b=f-111;if(b>0&&b<13)g="f"+b}g=g||String.fromCharCode(f).toLowerCase()}else if(d.match(/(click|mouse|menu)/i)){c=!c.compatMode||c.compatMode=="CSS1Compat"?c.html:c.body;var l={x:a.pageX||a.clientX+c.scrollLeft, -y:a.pageY||a.clientY+c.scrollTop},j={x:a.pageX?a.pageX-b.pageXOffset:a.clientX,y:a.pageY?a.pageY-b.pageYOffset:a.clientY};if(d.match(/DOMMouseScroll|mousewheel/))var h=a.wheelDelta?a.wheelDelta/120:-(a.detail||0)/3;var i=a.which==3||a.button==2,k=null;if(d.match(/over|out/)){switch(d){case "mouseover":k=a.relatedTarget||a.fromElement;break;case "mouseout":k=a.relatedTarget||a.toElement}(function(){for(;k&&k.nodeType==3;)k=k.parentNode;return true}).create({attempt:Browser.Engine.gecko})()||(k=false)}}return $extend(this, -{event:a,type:d,page:l,client:j,rightClick:i,wheel:h,relatedTarget:k,target:e,code:f,key:g,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.metaKey})}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46}); -Event.implement({stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this}}); -function Class(a){if(a instanceof Function)a={initialize:a};var b=function(){Object.reset(this);if(b._prototyping)return this;this._current=$empty;var c=this.initialize?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c}.extend(this);b.implement(a);b.constructor=Class;return b.prototype.constructor=b}Function.prototype.protect=function(){this._protected=true;return this}; -Object.reset=function(a,b){if(b==null){for(var c in a)Object.reset(a,c);return a}delete a[b];switch($type(a[b])){case "object":c=function(){};c.prototype=a[b];c=new c;a[b]=Object.reset(c);break;case "array":a[b]=$unlink(a[b]);break}return a}; -(new Native({name:"Class",initialize:Class})).extend({instantiate:function(a){a._prototyping=true;var b=new a;delete a._prototyping;return b},wrap:function(a,b,c){if(c._origin)c=c._origin;return function(){if(c._protected&&this._current==null)throw new Error('The method "'+b+'" cannot be called.');var d=this.caller,e=this._current;this.caller=e;this._current=arguments.callee;var f=c.apply(this,arguments);this._current=e;this.caller=d;return f}.extend({_owner:a,_origin:c,_name:b})}}); -Class.implement({implement:function(a,b){if($type(a)=="object"){for(var c in a)this.implement(c,a[c]);return this}if(c=Class.Mutators[a]){b=c.call(this,b);if(b==null)return this}c=this.prototype;switch($type(b)){case "function":if(b._hidden)return this;c[a]=Class.wrap(this,a,b);break;case "object":var d=c[a];if($type(d)=="object")$mixin(d,b);else c[a]=$unlink(b);break;case "array":c[a]=$unlink(b);break;default:c[a]=b}return this}}); -Class.Mutators={Extends:function(a){this.parent=a;this.prototype=Class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c)throw new Error('The method "'+b+'" has no parent.');return c.apply(this,arguments)}.protect())},Implements:function(a){$splat(a).each(function(b){if(b instanceof Function)b=Class.instantiate(b);this.implement(b)},this)}}; -var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this},callChain:function(){return this.$chain.length?this.$chain.shift().apply(this,arguments):false},clearChain:function(){this.$chain.empty();return this}}),Events=new Class({$events:{},addEvent:function(a,b,c){a=Events.removeOn(a);if(b!=$empty){this.$events[a]=this.$events[a]||[];this.$events[a].include(b);if(c)b.internal=true}return this},addEvents:function(a){for(var b in a)this.addEvent(b,a[b]); -return this},fireEvent:function(a,b,c){a=Events.removeOn(a);if(!this.$events||!this.$events[a])return this;this.$events[a].each(function(d){d.create({bind:this,delay:c,arguments:b})()},this);return this},removeEvent:function(a,b){a=Events.removeOn(a);if(!this.$events[a])return this;b.internal||this.$events[a].erase(b);return this},removeEvents:function(a){var b;if($type(a)=="object"){for(b in a)this.removeEvent(b,a[b]);return this}if(a)a=Events.removeOn(a);for(b in this.$events)if(!(a&&a!=b))for(var c= -this.$events[b],d=c.length;d--;)this.removeEvent(b,c[d]);return this}});Events.removeOn=function(a){return a.replace(/^on([A-Z])/,function(b,c){return c.toLowerCase()})}; -var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent)return this;for(var a in this.options)if(!($type(this.options[a])!="function"||!/^on[A-Z]/.test(a))){this.addEvent(a,this.options[a]);delete this.options[a]}return this}}),Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(a,b){this.key=a;this.setOptions(b)},write:function(a){a=encodeURIComponent(a); -if(this.options.domain)a+="; domain="+this.options.domain;if(this.options.path)a+="; path="+this.options.path;if(this.options.duration){var b=new Date;b.setTime(b.getTime()+this.options.duration*24*60*60*1E3);a+="; expires="+b.toGMTString()}if(this.options.secure)a+="; secure";this.options.document.cookie=this.key+"="+a;return this},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return a?decodeURIComponent(a[1]):null},dispose:function(){(new Cookie(this.key, -$merge(this.options,{duration:-1}))).write("");return this}});Cookie.write=function(a,b,c){return(new Cookie(a,c)).write(b)};Cookie.read=function(a){return(new Cookie(a)).read()};Cookie.dispose=function(a,b){return(new Cookie(a,b)).dispose()}; -var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,noCache:false},initialize:function(a){this.xhr=new Browser.Request;this.setOptions(a);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers= -new Hash(this.options.headers)},onStateChange:function(){if(!(this.xhr.readyState!=4||!this.running)){this.running=false;this.status=0;$try(function(){this.status=this.xhr.status}.bind(this));this.xhr.onreadystatechange=$empty;if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml)}else{this.response={text:null,xml:null};this.failure()}}},isSuccess:function(){return this.status>=200&&this.status< -300},processScripts:function(a){if(this.options.evalResponse||/(ecma|java)script/.test(this.getHeader("Content-type")))return $exec(a);return a.stripScripts(this.options.evalScripts)},success:function(a,b){this.onSuccess(this.processScripts(a),b)},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain()},failure:function(){this.onFailure()},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr)},setHeader:function(a,b){this.headers.set(a, -b);return this},getHeader:function(a){return $try(function(){return this.xhr.getResponseHeader(a)}.bind(this))},check:function(){if(!this.running)return true;switch(this.options.link){case "cancel":this.cancel();return true;case "chain":this.chain(this.caller.bind(this,arguments));return false}return false},send:function(a){if(!this.check(a))return this;this.running=true;var b=$type(a);if(b=="string"||b=="element")a={data:a};b=this.options;a=$extend({data:b.data,url:b.url,method:b.method},a);b=a.data; -var c=String(a.url);a=a.method.toLowerCase();switch($type(b)){case "element":b=document.id(b).toQueryString();break;case "object":case "hash":b=Hash.toQueryString(b)}if(this.options.format){var d="format="+this.options.format;b=b?d+"&"+b:d}if(this.options.emulation&&!["get","post"].contains(a)){a="_method="+a;b=b?a+"&"+b:a;a="post"}if(this.options.urlEncoded&&a=="post"){d=this.options.encoding?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+ -d)}if(this.options.noCache){d="noCache="+(new Date).getTime();b=b?d+"&"+b:d}d=c.lastIndexOf("/");if(d>-1&&(d=c.indexOf("#"))>-1)c=c.substr(0,d);if(b&&a=="get"){c=c+(c.contains("?")?"&":"?")+b;b=null}this.xhr.open(a.toUpperCase(),c,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(e,f){try{this.xhr.setRequestHeader(f,e)}catch(g){this.fireEvent("exception",[f,e])}},this);this.fireEvent("request");this.xhr.send(b);this.options.async||this.onStateChange(); -return this},cancel:function(){if(!this.running)return this;this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request;this.fireEvent("cancel");return this}});(function(){var a={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(b){a[b]=function(){var c=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(c,{method:b}))}});Request.implement(a)})();var APE={version:"1.1",Request:{},Transport:{}}; -APE.Events=new Class({Extends:Events,onRaw:function(a,b,c){return this.addEvent("raw_"+a.toLowerCase(),b,c)},onCmd:function(a,b,c){return this.addEvent("cmd_"+a.toLowerCase(),b,c)},onError:function(a,b,c){return this.addEvent("error_"+a,b,c)},removeEvent:function(a,b){return Events.prototype.removeEvent.run([a,this.$originalEvents[a][b]],this)}}); -APE.Core=new Class({Implements:[APE.Events,Options],$originalEvents:{},options:{server:"",pollTime:25E3,identifier:"ape",transport:0,frequency:0,cycledStackTime:350,secure:false},initialize:function(a){window.Ape=this;this.setOptions(a);this.selectTransport();this.request=new APE.Request(this);this.pipes=new $H;this.users=new $H;this.pubid=this.sessid=null;this.serverUri=(this.options.secure?"https":"http")+"://"+this.options.frequency+"."+this.options.server+"/"+this.options.transport+"/?";this.timer= -null;this.failCounter=this.status=0;this.pollerObserver=null;this.requestDisabled=false;this.onRaw("login",this.rawLogin);this.onRaw("err",this.rawErr);this.onRaw("ident",this.rawIdent);this.onRaw("quit",this.rawQuit);this.onError("003",this.clearSession);this.onError("004",this.clearSession);a.init&&a.init.apply(null,[this]);a.complete&&a.complete.apply(null,[this]);this.fireEvent("load",this);this.options.connectOptions&&this.start(this.options.connectOptions)},selectTransport:function(){for(var a= -[APE.Transport.longPolling,APE.Transport.XHRStreaming,APE.Transport.JSONP,null,null,null,APE.Transport.WebSocket],b=this.options.transport,c;c!==true;){c=a[b].browserSupport();if(c===true){this.options.transport=b;this.transport=new a[b](this)}else b=c}},poller:function(){this.pollerActive&&this.check()},startPoller:function(){this.pollerActive=true},stopPoller:function(){$clear(this.pollerObserver);this.pollerActive=false},stopRequest:function(){this.cancelRequest();this.transport.streamRequest&& -this.transport.streamRequest.cancel();this.requestDisabled=true},parseParam:function(a){return $type(a)=="object"?Hash.getValues(a):$splat(a)},cancelRequest:function(){this.transport.cancel()},requestFail:function(a){if(this.status>0){this.status=a;this.cancelRequest();this.stopPoller();this.fireEvent("apeDisconnect")}this.failCounter<6&&this.failCounter++;this.cancelRequest();a=this.failCounter*$random(300,1E3);this.check.delay(a,this)},parseResponse:function(a,b){if(a)if(this.status<0){this.failCounter= -0;this.status=1;this.startPoller();this.fireEvent("apeReconnect")}var c=false;if(a){a=JSON.parse(a);if(!a){this.check();return}for(var d=0;d0?true: -false;a[3]=true;this.send.run(a,this)}}});APE.Request.Stack=new Class({initialize:function(a){this.ape=a;this.stack=[]},add:function(a,b,c){this.stack.push({cmd:a,params:b,options:c})},send:function(){this.ape.request.send(this.stack);this.stack=[]}}); -APE.Request.CycledStack=new Class({initialize:function(a){this.ape=a;this.stack=[];this.reajustTime=false;this.timer=this.send.periodical(this.ape.options.cycledStackTime,this)},add:function(a,b,c){this.stack.push({cmd:a,params:b,sessid:c})},setTime:function(a,b){if(b){this.send();$clear(this.timer);this.timer=this.send.periodical(a,this);this.reajustTime=false}else this.reajustTime=a},send:function(){if(this.stack.length>0){this.ape.request.send(this.stack);this.stack=[];this.reajustTime&&this.setTime(this.reajustTime, -true)}}});Request=new Class({Extends:Request,send:function(a){if(Browser.Engine.webkit)this.xhr.onreadystatechange=this.onStateChange.bind(this);return this.parent(a)},onStateChange:function(){if(this.xhr.readyState==1)this.dataSent=true;this.parent()}}); -APE.Transport.longPolling=new Class({initialize:function(a){this.ape=a;this.requestFailObserver=[]},send:function(a,b){a=(new Request({url:this.ape.serverUri,onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(c){$clear(this.requestFailObserver.shift());this.ape.parseResponse(c,b.requestCallback)}.bind(this)})).send(a);a.id=$time();this.request=a;this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+1E4,this.ape,[-1,a]));return a},running:function(){return this.request? -this.request.running:false},cancel:function(){this.request&&this.request.cancel();$clear(this.requestFailObserver.shift())}});APE.Transport.longPolling.browserSupport=function(){return Browser.Features.xhr?true:2}; -APE.Request.SSE=new Class({SSESupport:typeof window.addEventStream=="function",initSSE:function(a,b,c){b=document.createElement("div");document.body.appendChild(b);b.innerHTML='';this.eventSource=document.getElementById("APE_SSE");this.eventSource.addEventListener("ape-data",function(d){c.run(d.data)},false)}}); -Request.XHRStreaming=new Class({Extends:Request,lastTextLength:0,read:0,send:function(a){if(Browser.Engine.webkit)this.xhr.onreadystatechange=this.onStateChange.bind(this);return this.parent(a)},onStateChange:function(){if(this.xhr.readyState==1)this.dataSent=true;else this.xhr.readyState==3&&this.progress(this.xhr.responseText,this.xhr.responseXML);this.parent()},onProgress:function(){this.fireEvent("progress",arguments)},progress:function(a,b){var c=a.length;this.read+=c;a=a.substr(this.lastTextLength); -this.lastTextLength=c;this.onProgress(this.processScripts(a),b)}}); -APE.Transport.XHRStreaming=new Class({maxRequestSize:1E5,Implements:APE.Request.SSE,initialize:function(a){this.ape=a;this.requestFailObserver=[];if(this.SSESupport)this.ape.options.transport=4;this.streamInfo={timeoutObserver:null,cleanClose:false,forceClose:false,callback:null}},send:function(a,b){if(this.SSESupport&&!this.eventSource){this.initSSE(a,b,this.readSSE.bind(this));if(b.requestCallback)this.streamInfo.callback=b.requestCallback}else{if((!this.streamRequest||!this.streamRequest.running)&& -!this.eventSource){this.buffer="";this.request=this.doRequest(a,b);if(b.requestCallback)this.streamInfo.callback=b.requestCallback}else{this.request=a=(new Request({url:this.ape.serverUri,onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(c){$clear(this.requestFailObserver.shift());this.request.dataSent=true;this.ape.parseResponse(c,b.callback)}.bind(this)})).send(a);this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+1E4,this.ape,[1,a]))}return this.request}}, -doRequest:function(a){this.streamInfo.forceClose=false;a=(new Request.XHRStreaming({url:this.ape.serverUri,onProgress:this.readFragment.bindWithEvent(this),onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(){$clear(this.streamInfo.timeoutObserver);if(this.ape.status>0){this.streamInfo.cleanClose?this.ape.check():this.newStream();this.streamInfo.cleanClose=false}}.bind(this)})).send(a);a.id=$time();return this.streamRequest=a},readSSE:function(a){this.ape.parseResponse(a, -this.streamInfo.callback);this.streamInfo.callback=null},readFragment:function(a){this.streamInfo.canClose=false;if(a==""){this.streamInfo.canClose=true;this.streamInfo.cleanClose=true;this.ape.parseResponse(a,this.streamInfo.callback);this.streamInfo.callback=null}else{a=this.buffer+a;var b=a.split("\n\n"),c=b.length;if(b.length>1){this.buffer="";for(a=0;a=this.maxRequestSize&&this.streamInfo.canClose},newStream:function(){$clear(this.streamInfo.timeoutObserver);this.streamRequest.cancel();this.ape.check()},cancel:function(){this.request&&this.request.cancel(); -$clear(this.streamInfo.timeoutObserver);$clear(this.requestFailObserver.shift())}});APE.Transport.XHRStreaming.browserSupport=function(){return Browser.Features.xhr&&(Browser.Engine.webkit||Browser.Engine.gecko)?true:Browser.Features.xhr?0:2}; -APE.Transport.JSONP=new Class({Implements:APE.Transport.SSE,initialize:function(a){this.ape=a;this.requestFailObserver=[];this.requests=[];window.parent.onkeyup=function(b){if(b.keyCode==27){this.cancel();this.ape.status>0&&this.ape.check()}}.bind(this)},send:function(a,b){this.callback=b.requestCallback;b=document.createElement("script");b.src=this.ape.serverUri+a;document.head.appendChild(b);this.requests.push(b);this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+ -1E4,this.ape,[-1,b]));Browser.Engine.gecko&&function(){var c=document.createElement("iframe");document.body.appendChild(c);document.body.removeChild(c)}.delay(200)},clearRequest:function(a){a.parentNode.removeChild(a);if(a.clearAttributes)a.clearAttributes();else for(var b in a)delete a[b];$clear(this.requestFailObserver.shift())},readSSE:function(a){this.ape.parseResponse(a,this.callback);this.callback=null},read:function(a){$clear(this.requestFailObserver.shift());this.clearRequest(this.requests.shift()); -this.ape.parseResponse(a,this.callback);this.callback=null},cancel:function(){this.requests.length>0&&this.clearRequest(this.requests.shift())},running:function(){return this.requests.length>0?true:false}});APE.Transport.JSONP.browserSupport=function(){return true}; -APE.Transport.WebSocket=new Class({stack:[],connRunning:false,initialize:function(a){this.ape=a;this.initWs()},initWs:function(){var a=(this.ape.options.secure?"wss":"ws")+"://"+this.ape.options.frequency+"."+this.ape.options.server+"/"+this.ape.options.transport+"/";this.ws="MozWebSocket"in window?new MozWebSocket(a):new WebSocket(a);this.connRunning=true;this.ws.onmessage=this.readWs.bind(this);this.ws.onopen=this.openWs.bind(this);this.ws.onclose=this.closeWs.bind(this);this.ws.onerror=this.errorWs.bind(this)}, -readWs:function(a){this.ape.parseResponse(a.data,this.callback);this.callback=null},openWs:function(){if(this.stack.length>0){for(var a=0;a>>18&63));b.push(B64.$tab.charAt(e>>>12&63));b.push(B64.$tab.charAt(e>>>6&63));b.push(B64.$tab.charAt(e&63))}switch(d){case 2:e=a.charCodeAt(f++)<<16|a.charCodeAt(f++)<<8;b.push(B64.$tab.charAt(e>>>18&63));b.push(B64.$tab.charAt(e>>>12&63));b.push(B64.$tab.charAt(e>>> -6&63));b.push(B64.$p);break;case 1:e=a.charCodeAt(f++)<<16;b.push(B64.$tab.charAt(e>>>18&63));b.push(B64.$tab.charAt(e>>>12&63));b.push(B64.$p);b.push(B64.$p);break}return b.join("")},decode:function(a){a=a.split("");for(var b=[],c=a.length,d=0;a[--c]==B64.$p;)++d;for(var e=0;e>>16&255));b.push(String.fromCharCode(f>>> -8&255));b.push(String.fromCharCode(f&255))}for(;d--;)b.pop();return b.join("")}});try{window.parent.setInterval();if(!Browser.Engine.trident&&!Browser.Engine.presto&&!(Browser.Engine.gecko&&Browser.Engine.version<=18)){setInterval=function(a,b){return window.parent.setInterval(a,b)};setTimeout=function(a,b){return window.parent.setTimeout(a,b)};clearInterval=function(a){return window.parent.clearInterval(a)};clearTimeout=function(a){return window.parent.clearTimeout(a)}}}catch(e$$3){} -if(!this.JSON)this.JSON={}; -(function(){function a(g){return'"'+g+'"'}function b(g,l){var j,h=d,i=l[g];if(typeof f==="function")i=f.call(l,g,i);switch(typeof i){case "string":return a(i);case "number":return isFinite(i)?String(i):"null";case "boolean":case "null":return String(i);case "object":if(!i)return"null";d+=e;g=[];if(Object.prototype.toString.apply(i)==="[object Array]"){l=i.length;for(j=0;j'; - } - theHtml += ''; - doc.write(theHtml); - doc.close(); - } else { - iframe.setAttribute('src',(config.secure ? 'https': 'http') + '://' + config.frequency + '.' + config.server + '/?[{"cmd":"script","params":{"domain":"' + document.domain +'","scripts":["' + config.scripts.join('","') + '"]}}]'); - if (navigator.product == 'Gecko') { - //Firefox fix, see bug #356558 - // https://bugzilla.mozilla.org/show_bug.cgi?id=356558 - iframe.contentWindow.location.href = iframe.getAttribute('src'); - } - } - -} - -if (Function.prototype.bind == null) { - Function.prototype.bind = function(bind, args) { - return this.create({'bind': bind, 'arguments': args}); - } -} -if (Function.prototype.create == null) { - Function.prototype.create = function(options) { - var self = this; - options = options || {}; - return function(){ - var args = options.arguments || arguments; - if(args && !args.length){ - args = [args]; - } - var returns = function(){ - return self.apply(options.bind || null, args); - }; - return returns(); - }; - } -} - - -/*** - * APE JSF Setup - */ - -APE.Config.baseUrl = 'http://local.ape-project.org/APE_JSF'; //APE JSF -APE.Config.domain = 'ape-project.org'; -APE.Config.server = 'ape.local.ape-project.org:6969'; //APE server URL -APE.Config.baseUrl = 'http://ape.home.efyx.io/APE_JSF'; //APE JSF -APE.Config.domain = 'efyx.io'; -APE.Config.server = 'ape.home.efyx.io:6969'; //APE server URL -APE.Config.transport = 6; - -(function(){ - for (var i = 0; i < arguments.length; i++) - APE.Config.scripts.push(APE.Config.baseUrl + '/Source/' + arguments[i] + '.js'); -})('mootools-core', 'Core/APE', 'Core/Events', 'Core/Core', 'Pipe/Pipe', 'Pipe/PipeProxy', 'Pipe/PipeMulti', 'Pipe/PipeSingle', 'Request/Request','Request/Request.Stack', 'Request/Request.CycledStack', 'Transport/Transport.longPolling','Transport/Transport.SSE', 'Transport/Transport.XHRStreaming', 'Transport/Transport.JSONP', 'Transport/Transport.WebSocket', 'Core/Utility', 'Core/JSON'); diff --git a/Build/uncompressed/apeClientMoo.js b/Build/uncompressed/apeClientMoo.js deleted file mode 100755 index 3fd3c04..0000000 --- a/Build/uncompressed/apeClientMoo.js +++ /dev/null @@ -1,131 +0,0 @@ -var APE = { - Config: { - identifier: 'ape', - init: true, - frequency: 0, - scripts: [] - } -}; - -APE.Client = new Class({ - - eventProxy: [], - - fireEvent: function(type, args, delay){ - return this.core.fireEvent(type, args, delay); - }, - - addEvent: function(type, fn, internal){ - var newFn = fn.bind(this), ret = this; - if(!$defined(this.core)) this.eventProxy.push([type, fn, internal]); - else { - ret = this.core.addEvent(type, newFn, internal); - this.core.$originalEvents[type] = this.core.$originalEvents[type] || []; - this.core.$originalEvents[type][fn] = newFn; - } - return ret; - }, - - onRaw: function(type, fn, internal) { - return this.addEvent('raw_' + type.toLowerCase(), fn, internal); - }, - - removeEvent: function(type, fn) { - return this.core.removeEvent(type, fn); - }, - - onCmd: function(type, fn, internal) { - return this.addEvent('cmd_' + type.toLowerCase(), fn, internal); - }, - - onError: function(type, fn, internal) { - return this.addEvent('error_' + type, fn, internal); - }, - - load: function(config){ - config = $merge({}, APE.Config, config); - - // Init function called by core to init core variable - config.init = function(core){ - this.core = core; - for(var i = 0; i < this.eventProxy.length; i++){ - this.addEvent.apply(this, this.eventProxy[i]); - } - }.bind(this); - - //set document.domain - if (config.transport != 2) { - if (config.domain != 'auto') document.domain = config.domain; - if (config.domain == 'auto') document.domain = document.domain; - } - - var tmp = JSON.decode(Cookie.read('APE_Cookie'), {'domain': document.domain}); - - if(tmp) { - config.frequency = tmp.frequency.toInt(); - } else { - tmp = {'frequency': 0}; - } - - tmp.frequency = config.frequency + 1; - - Cookie.write('APE_Cookie', JSON.encode(tmp), {'domain': document.domain}); - - var iframe = new Element('iframe', { - id: 'ape_' + config.identifier, - styles: { - display: 'none', - position: 'absolute', - left: -300, - top: -300 - } - }).inject(document.body); - - iframe.addEvent('load', function() { - if (!iframe.contentWindow.APE) setTimeout(iframe.onload, 100);//Sometimes IE fire the onload event, but the iframe is not loaded -_- - else iframe.contentWindow.APE.init(config); - }); - - if (config.transport == 2) {//Special case for JSONP - var doc = iframe.contentDocument; - if (!doc) doc = iframe.contentWindow.document; - - //If the content of the iframe is created in DOM, the status bar will always load... - //using document.write() is the only way to avoid status bar loading with JSONP - doc.open(); - var theHtml = ''; - for (var i = 0; i < config.scripts.length; i++) { - theHtml += ''; - } - theHtml += ''; - doc.write(theHtml); - doc.close(); - } else { - iframe.set('src', (config.secure ? 'https' : 'http') + '://' + config.frequency + '.' + config.server + '/?[{"cmd":"script","params":{"domain":"' + document.domain + '","scripts":["' + config.scripts.join('","') + '"]}}]'); - if (Browser.Engine.gecko) { - // Firefox fix, see bug  #356558 - // https://bugzilla.mozilla.org/show_bug.cgi?id=356558 - iframe.contentWindow.location.href = iframe.get('src'); - } - } - - } - -}); - -/*** - * APE JSF Setup - */ - -APE.Config.baseUrl = 'http://local.ape-project.org/APE_JSF'; //APE JSF -APE.Config.domain = 'ape-project.org'; -APE.Config.server = 'ape.local.ape-project.org:6969'; //APE server URL -APE.Config.baseUrl = 'http://ape.home.efyx.io/APE_JSF'; //APE JSF -APE.Config.domain = 'efyx.io'; -APE.Config.server = 'ape.home.efyx.io:6969'; //APE server URL -APE.Config.transport = 6; - -(function(){ - for (var i = 0; i < arguments.length; i++) - APE.Config.scripts.push(APE.Config.baseUrl + '/Source/' + arguments[i] + '.js'); -})('mootools-core', 'Core/APE', 'Core/Events', 'Core/Core', 'Pipe/Pipe', 'Pipe/PipeProxy', 'Pipe/PipeMulti', 'Pipe/PipeSingle', 'Request/Request','Request/Request.Stack', 'Request/Request.CycledStack', 'Transport/Transport.longPolling','Transport/Transport.SSE', 'Transport/Transport.XHRStreaming', 'Transport/Transport.JSONP', 'Transport/Transport.WebSocket', 'Core/Utility', 'Core/JSON'); diff --git a/Build/uncompressed/apeCoreSession.js b/Build/uncompressed/apeCoreSession.js deleted file mode 100755 index 790e32c..0000000 --- a/Build/uncompressed/apeCoreSession.js +++ /dev/null @@ -1,3575 +0,0 @@ -/* ---- - -name: Core - -description: The core of MooTools, contains all the base functions and the Native and Hash implementations. Required by all the other scripts. - -license: MIT-style license. - -copyright: Copyright (c) 2006-2008 [Valerio Proietti](http://mad4milk.net/). - -authors: The MooTools production team (http://mootools.net/developers/) - -inspiration: - - Class implementation inspired by [Base.js](http://dean.edwards.name/weblog/2006/03/base/) Copyright (c) 2006 Dean Edwards, [GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php) - - Some functionality inspired by [Prototype.js](http://prototypejs.org) Copyright (c) 2005-2007 Sam Stephenson, [MIT License](http://opensource.org/licenses/mit-license.php) - -provides: [MooTools, Native, Hash.base, Array.each, $util] - -... -*/ - -var MooTools = { - 'version': '1.2.5', - 'build': '008d8f0f2fcc2044e54fdd3635341aaab274e757' -}; - -var Native = function(options){ - options = options || {}; - var name = options.name; - var legacy = options.legacy; - var protect = options.protect; - var methods = options.implement; - var generics = options.generics; - var initialize = options.initialize; - var afterImplement = options.afterImplement || function(){}; - var object = initialize || legacy; - generics = generics !== false; - - object.constructor = Native; - object.$family = {name: 'native'}; - if (legacy && initialize) object.prototype = legacy.prototype; - object.prototype.constructor = object; - - if (name){ - var family = name.toLowerCase(); - object.prototype.$family = {name: family}; - Native.typize(object, family); - } - - var add = function(obj, name, method, force){ - if (!protect || force || !obj.prototype[name]) obj.prototype[name] = method; - if (generics) Native.genericize(obj, name, protect); - afterImplement.call(obj, name, method); - return obj; - }; - - object.alias = function(a1, a2, a3){ - if (typeof a1 == 'string'){ - var pa1 = this.prototype[a1]; - if ((a1 = pa1)) return add(this, a2, a1, a3); - } - for (var a in a1) this.alias(a, a1[a], a2); - return this; - }; - - object.implement = function(a1, a2, a3){ - if (typeof a1 == 'string') return add(this, a1, a2, a3); - for (var p in a1) add(this, p, a1[p], a2); - return this; - }; - - if (methods) object.implement(methods); - - return object; -}; - -Native.genericize = function(object, property, check){ - if ((!check || !object[property]) && typeof object.prototype[property] == 'function') object[property] = function(){ - var args = Array.prototype.slice.call(arguments); - return object.prototype[property].apply(args.shift(), args); - }; -}; - -Native.implement = function(objects, properties){ - for (var i = 0, l = objects.length; i < l; i++) objects[i].implement(properties); -}; - -Native.typize = function(object, family){ - if (!object.type) object.type = function(item){ - return ($type(item) === family); - }; -}; - -(function(){ - var natives = {'Array': Array, 'Date': Date, 'Function': Function, 'Number': Number, 'RegExp': RegExp, 'String': String}; - for (var n in natives) new Native({name: n, initialize: natives[n], protect: true}); - - var types = {'boolean': Boolean, 'native': Native, 'object': Object}; - for (var t in types) Native.typize(types[t], t); - - var generics = { - 'Array': ["concat", "indexOf", "join", "lastIndexOf", "pop", "push", "reverse", "shift", "slice", "sort", "splice", "toString", "unshift", "valueOf"], - 'String': ["charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "match", "replace", "search", "slice", "split", "substr", "substring", "toLowerCase", "toUpperCase", "valueOf"] - }; - for (var g in generics){ - for (var i = generics[g].length; i--;) Native.genericize(natives[g], generics[g][i], true); - } -})(); - -var Hash = new Native({ - - name: 'Hash', - - initialize: function(object){ - if ($type(object) == 'hash') object = $unlink(object.getClean()); - for (var key in object) this[key] = object[key]; - return this; - } - -}); - -Hash.implement({ - - forEach: function(fn, bind){ - for (var key in this){ - if (this.hasOwnProperty(key)) fn.call(bind, this[key], key, this); - } - }, - - getClean: function(){ - var clean = {}; - for (var key in this){ - if (this.hasOwnProperty(key)) clean[key] = this[key]; - } - return clean; - }, - - getLength: function(){ - var length = 0; - for (var key in this){ - if (this.hasOwnProperty(key)) length++; - } - return length; - } - -}); - -Hash.alias('forEach', 'each'); - -Array.implement({ - - forEach: function(fn, bind){ - for (var i = 0, l = this.length; i < l; i++) fn.call(bind, this[i], i, this); - } - -}); - -Array.alias('forEach', 'each'); - -function $A(iterable){ - if (iterable.item){ - var l = iterable.length, array = new Array(l); - while (l--) array[l] = iterable[l]; - return array; - } - return Array.prototype.slice.call(iterable); -}; - -function $arguments(i){ - return function(){ - return arguments[i]; - }; -}; - -function $chk(obj){ - return !!(obj || obj === 0); -}; - -function $clear(timer){ - clearTimeout(timer); - clearInterval(timer); - return null; -}; - -function $defined(obj){ - return (obj != undefined); -}; - -function $each(iterable, fn, bind){ - var type = $type(iterable); - ((type == 'arguments' || type == 'collection' || type == 'array') ? Array : Hash).each(iterable, fn, bind); -}; - -function $empty(){}; - -function $extend(original, extended){ - for (var key in (extended || {})) original[key] = extended[key]; - return original; -}; - -function $H(object){ - return new Hash(object); -}; - -function $lambda(value){ - return ($type(value) == 'function') ? value : function(){ - return value; - }; -}; - -function $merge(){ - var args = Array.slice(arguments); - args.unshift({}); - return $mixin.apply(null, args); -}; - -function $mixin(mix){ - for (var i = 1, l = arguments.length; i < l; i++){ - var object = arguments[i]; - if ($type(object) != 'object') continue; - for (var key in object){ - var op = object[key], mp = mix[key]; - mix[key] = (mp && $type(op) == 'object' && $type(mp) == 'object') ? $mixin(mp, op) : $unlink(op); - } - } - return mix; -}; - -function $pick(){ - for (var i = 0, l = arguments.length; i < l; i++){ - if (arguments[i] != undefined) return arguments[i]; - } - return null; -}; - -function $random(min, max){ - return Math.floor(Math.random() * (max - min + 1) + min); -}; - -function $splat(obj){ - var type = $type(obj); - return (type) ? ((type != 'array' && type != 'arguments') ? [obj] : obj) : []; -}; - -var $time = Date.now || function(){ - return +new Date; -}; - -function $try(){ - for (var i = 0, l = arguments.length; i < l; i++){ - try { - return arguments[i](); - } catch(e){} - } - return null; -}; - -function $type(obj){ - if (obj == undefined) return false; - if (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name; - if (obj.nodeName){ - switch (obj.nodeType){ - case 1: return 'element'; - case 3: return (/\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace'; - } - } else if (typeof obj.length == 'number'){ - if (obj.callee) return 'arguments'; - else if (obj.item) return 'collection'; - } - return typeof obj; -}; - -function $unlink(object){ - var unlinked; - switch ($type(object)){ - case 'object': - unlinked = {}; - for (var p in object) unlinked[p] = $unlink(object[p]); - break; - case 'hash': - unlinked = new Hash(object); - break; - case 'array': - unlinked = []; - for (var i = 0, l = object.length; i < l; i++) unlinked[i] = $unlink(object[i]); - break; - default: return object; - } - return unlinked; -}; - - -/* ---- - -name: Browser - -description: The Browser Core. Contains Browser initialization, Window and Document, and the Browser Hash. - -license: MIT-style license. - -requires: [Native, $util] - -provides: [Browser, Window, Document, $exec] - -... -*/ - -var Browser = $merge({ - - Engine: {name: 'unknown', version: 0}, - - Platform: {name: (window.orientation != undefined) ? 'ipod' : (navigator.platform.match(/mac|win|linux/i) || ['other'])[0].toLowerCase()}, - - Features: {xpath: !!(document.evaluate), air: !!(window.runtime), query: !!(document.querySelector)}, - - Plugins: {}, - - Engines: { - - presto: function(){ - return (!window.opera) ? false : ((arguments.callee.caller) ? 960 : ((document.getElementsByClassName) ? 950 : 925)); - }, - - trident: function(){ - return (!window.ActiveXObject) ? false : ((window.XMLHttpRequest) ? ((document.querySelectorAll) ? 6 : 5) : 4); - }, - - webkit: function(){ - return (navigator.taintEnabled) ? false : ((Browser.Features.xpath) ? ((Browser.Features.query) ? 525 : 420) : 419); - }, - - gecko: function(){ - return (!document.getBoxObjectFor && window.mozInnerScreenX == null) ? false : ((document.getElementsByClassName) ? 19 : 18); - } - - } - -}, Browser || {}); - -Browser.Platform[Browser.Platform.name] = true; - -Browser.detect = function(){ - - for (var engine in this.Engines){ - var version = this.Engines[engine](); - if (version){ - this.Engine = {name: engine, version: version}; - this.Engine[engine] = this.Engine[engine + version] = true; - break; - } - } - - return {name: engine, version: version}; - -}; - -Browser.detect(); - -Browser.Request = function(){ - return $try(function(){ - return new XMLHttpRequest(); - }, function(){ - return new ActiveXObject('MSXML2.XMLHTTP'); - }, function(){ - return new ActiveXObject('Microsoft.XMLHTTP'); - }); -}; - -Browser.Features.xhr = !!(Browser.Request()); - -Browser.Plugins.Flash = (function(){ - var version = ($try(function(){ - return navigator.plugins['Shockwave Flash'].description; - }, function(){ - return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); - }) || '0 r0').match(/\d+/g); - return {version: parseInt(version[0] || 0 + '.' + version[1], 10) || 0, build: parseInt(version[2], 10) || 0}; -})(); - -function $exec(text){ - if (!text) return text; - if (window.execScript){ - window.execScript(text); - } else { - var script = document.createElement('script'); - script.setAttribute('type', 'text/javascript'); - script[(Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerText' : 'text'] = text; - document.head.appendChild(script); - document.head.removeChild(script); - } - return text; -}; - -Native.UID = 1; - -var $uid = (Browser.Engine.trident) ? function(item){ - return (item.uid || (item.uid = [Native.UID++]))[0]; -} : function(item){ - return item.uid || (item.uid = Native.UID++); -}; - -var Window = new Native({ - - name: 'Window', - - legacy: (Browser.Engine.trident) ? null: window.Window, - - initialize: function(win){ - $uid(win); - if (!win.Element){ - win.Element = $empty; - if (Browser.Engine.webkit) win.document.createElement("iframe"); //fixes safari 2 - win.Element.prototype = (Browser.Engine.webkit) ? window["[[DOMElement.prototype]]"] : {}; - } - win.document.window = win; - return $extend(win, Window.Prototype); - }, - - afterImplement: function(property, value){ - window[property] = Window.Prototype[property] = value; - } - -}); - -Window.Prototype = {$family: {name: 'window'}}; - -new Window(window); - -var Document = new Native({ - - name: 'Document', - - legacy: (Browser.Engine.trident) ? null: window.Document, - - initialize: function(doc){ - $uid(doc); - doc.head = doc.getElementsByTagName('head')[0]; - doc.html = doc.getElementsByTagName('html')[0]; - if (Browser.Engine.trident && Browser.Engine.version <= 4) $try(function(){ - doc.execCommand("BackgroundImageCache", false, true); - }); - if (Browser.Engine.trident) doc.window.attachEvent('onunload', function(){ - doc.window.detachEvent('onunload', arguments.callee); - doc.head = doc.html = doc.window = null; - }); - return $extend(doc, Document.Prototype); - }, - - afterImplement: function(property, value){ - document[property] = Document.Prototype[property] = value; - } - -}); - -Document.Prototype = {$family: {name: 'document'}}; - -new Document(document); - - -/* ---- - -name: Array - -description: Contains Array Prototypes like each, contains, and erase. - -license: MIT-style license. - -requires: [$util, Array.each] - -provides: Array - -... -*/ - -Array.implement({ - - every: function(fn, bind){ - for (var i = 0, l = this.length; i < l; i++){ - if (!fn.call(bind, this[i], i, this)) return false; - } - return true; - }, - - filter: function(fn, bind){ - var results = []; - for (var i = 0, l = this.length; i < l; i++){ - if (fn.call(bind, this[i], i, this)) results.push(this[i]); - } - return results; - }, - - clean: function(){ - return this.filter($defined); - }, - - indexOf: function(item, from){ - var len = this.length; - for (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){ - if (this[i] === item) return i; - } - return -1; - }, - - map: function(fn, bind){ - var results = []; - for (var i = 0, l = this.length; i < l; i++) results[i] = fn.call(bind, this[i], i, this); - return results; - }, - - some: function(fn, bind){ - for (var i = 0, l = this.length; i < l; i++){ - if (fn.call(bind, this[i], i, this)) return true; - } - return false; - }, - - associate: function(keys){ - var obj = {}, length = Math.min(this.length, keys.length); - for (var i = 0; i < length; i++) obj[keys[i]] = this[i]; - return obj; - }, - - link: function(object){ - var result = {}; - for (var i = 0, l = this.length; i < l; i++){ - for (var key in object){ - if (object[key](this[i])){ - result[key] = this[i]; - delete object[key]; - break; - } - } - } - return result; - }, - - contains: function(item, from){ - return this.indexOf(item, from) != -1; - }, - - extend: function(array){ - for (var i = 0, j = array.length; i < j; i++) this.push(array[i]); - return this; - }, - - getLast: function(){ - return (this.length) ? this[this.length - 1] : null; - }, - - getRandom: function(){ - return (this.length) ? this[$random(0, this.length - 1)] : null; - }, - - include: function(item){ - if (!this.contains(item)) this.push(item); - return this; - }, - - combine: function(array){ - for (var i = 0, l = array.length; i < l; i++) this.include(array[i]); - return this; - }, - - erase: function(item){ - for (var i = this.length; i--; i){ - if (this[i] === item) this.splice(i, 1); - } - return this; - }, - - empty: function(){ - this.length = 0; - return this; - }, - - flatten: function(){ - var array = []; - for (var i = 0, l = this.length; i < l; i++){ - var type = $type(this[i]); - if (!type) continue; - array = array.concat((type == 'array' || type == 'collection' || type == 'arguments') ? Array.flatten(this[i]) : this[i]); - } - return array; - }, - - hexToRgb: function(array){ - if (this.length != 3) return null; - var rgb = this.map(function(value){ - if (value.length == 1) value += value; - return value.toInt(16); - }); - return (array) ? rgb : 'rgb(' + rgb + ')'; - }, - - rgbToHex: function(array){ - if (this.length < 3) return null; - if (this.length == 4 && this[3] == 0 && !array) return 'transparent'; - var hex = []; - for (var i = 0; i < 3; i++){ - var bit = (this[i] - 0).toString(16); - hex.push((bit.length == 1) ? '0' + bit : bit); - } - return (array) ? hex : '#' + hex.join(''); - } - -}); - - -/* ---- - -name: Function - -description: Contains Function Prototypes like create, bind, pass, and delay. - -license: MIT-style license. - -requires: [Native, $util] - -provides: Function - -... -*/ - -try { - delete Function.prototype.bind; -} catch(e){} - -Function.implement({ - - extend: function(properties){ - for (var property in properties) this[property] = properties[property]; - return this; - }, - - create: function(options){ - var self = this; - options = options || {}; - return function(event){ - var args = options.arguments; - args = (args != undefined) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0); - if (options.event) args = [event || window.event].extend(args); - var returns = function(){ - return self.apply(options.bind || null, args); - }; - if (options.delay) return setTimeout(returns, options.delay); - if (options.periodical) return setInterval(returns, options.periodical); - if (options.attempt) return $try(returns); - return returns(); - }; - }, - - run: function(args, bind){ - return this.apply(bind, $splat(args)); - }, - - pass: function(args, bind){ - return this.create({bind: bind, arguments: args}); - }, - - bind: function(bind, args){ - return this.create({bind: bind, arguments: args}); - }, - - bindWithEvent: function(bind, args){ - return this.create({bind: bind, arguments: args, event: true}); - }, - - attempt: function(args, bind){ - return this.create({bind: bind, arguments: args, attempt: true})(); - }, - - delay: function(delay, bind, args){ - return this.create({bind: bind, arguments: args, delay: delay})(); - }, - - periodical: function(periodical, bind, args){ - return this.create({bind: bind, arguments: args, periodical: periodical})(); - } - -}); - - -/* ---- - -name: Number - -description: Contains Number Prototypes like limit, round, times, and ceil. - -license: MIT-style license. - -requires: [Native, $util] - -provides: Number - -... -*/ - -Number.implement({ - - limit: function(min, max){ - return Math.min(max, Math.max(min, this)); - }, - - round: function(precision){ - precision = Math.pow(10, precision || 0); - return Math.round(this * precision) / precision; - }, - - times: function(fn, bind){ - for (var i = 0; i < this; i++) fn.call(bind, i, this); - }, - - toFloat: function(){ - return parseFloat(this); - }, - - toInt: function(base){ - return parseInt(this, base || 10); - } - -}); - -Number.alias('times', 'each'); - -(function(math){ - var methods = {}; - math.each(function(name){ - if (!Number[name]) methods[name] = function(){ - return Math[name].apply(null, [this].concat($A(arguments))); - }; - }); - Number.implement(methods); -})(['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'max', 'min', 'pow', 'sin', 'sqrt', 'tan']); - - -/* ---- - -name: String - -description: Contains String Prototypes like camelCase, capitalize, test, and toInt. - -license: MIT-style license. - -requires: Native - -provides: String - -... -*/ - -String.implement({ - - test: function(regex, params){ - return ((typeof regex == 'string') ? new RegExp(regex, params) : regex).test(this); - }, - - contains: function(string, separator){ - return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1; - }, - - trim: function(){ - return this.replace(/^\s+|\s+$/g, ''); - }, - - clean: function(){ - return this.replace(/\s+/g, ' ').trim(); - }, - - camelCase: function(){ - return this.replace(/-\D/g, function(match){ - return match.charAt(1).toUpperCase(); - }); - }, - - hyphenate: function(){ - return this.replace(/[A-Z]/g, function(match){ - return ('-' + match.charAt(0).toLowerCase()); - }); - }, - - capitalize: function(){ - return this.replace(/\b[a-z]/g, function(match){ - return match.toUpperCase(); - }); - }, - - escapeRegExp: function(){ - return this.replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1'); - }, - - toInt: function(base){ - return parseInt(this, base || 10); - }, - - toFloat: function(){ - return parseFloat(this); - }, - - hexToRgb: function(array){ - var hex = this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); - return (hex) ? hex.slice(1).hexToRgb(array) : null; - }, - - rgbToHex: function(array){ - var rgb = this.match(/\d{1,3}/g); - return (rgb) ? rgb.rgbToHex(array) : null; - }, - - stripScripts: function(option){ - var scripts = ''; - var text = this.replace(/]*>([\s\S]*?)<\/script>/gi, function(){ - scripts += arguments[1] + '\n'; - return ''; - }); - if (option === true) $exec(scripts); - else if ($type(option) == 'function') option(scripts, text); - return text; - }, - - substitute: function(object, regexp){ - return this.replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){ - if (match.charAt(0) == '\\') return match.slice(1); - return (object[name] != undefined) ? object[name] : ''; - }); - } - -}); - - -/* ---- - -name: Hash - -description: Contains Hash Prototypes. Provides a means for overcoming the JavaScript practical impossibility of extending native Objects. - -license: MIT-style license. - -requires: Hash.base - -provides: Hash - -... -*/ - -Hash.implement({ - - has: Object.prototype.hasOwnProperty, - - keyOf: function(value){ - for (var key in this){ - if (this.hasOwnProperty(key) && this[key] === value) return key; - } - return null; - }, - - hasValue: function(value){ - return (Hash.keyOf(this, value) !== null); - }, - - extend: function(properties){ - Hash.each(properties || {}, function(value, key){ - Hash.set(this, key, value); - }, this); - return this; - }, - - combine: function(properties){ - Hash.each(properties || {}, function(value, key){ - Hash.include(this, key, value); - }, this); - return this; - }, - - erase: function(key){ - if (this.hasOwnProperty(key)) delete this[key]; - return this; - }, - - get: function(key){ - return (this.hasOwnProperty(key)) ? this[key] : null; - }, - - set: function(key, value){ - if (!this[key] || this.hasOwnProperty(key)) this[key] = value; - return this; - }, - - empty: function(){ - Hash.each(this, function(value, key){ - delete this[key]; - }, this); - return this; - }, - - include: function(key, value){ - if (this[key] == undefined) this[key] = value; - return this; - }, - - map: function(fn, bind){ - var results = new Hash; - Hash.each(this, function(value, key){ - results.set(key, fn.call(bind, value, key, this)); - }, this); - return results; - }, - - filter: function(fn, bind){ - var results = new Hash; - Hash.each(this, function(value, key){ - if (fn.call(bind, value, key, this)) results.set(key, value); - }, this); - return results; - }, - - every: function(fn, bind){ - for (var key in this){ - if (this.hasOwnProperty(key) && !fn.call(bind, this[key], key)) return false; - } - return true; - }, - - some: function(fn, bind){ - for (var key in this){ - if (this.hasOwnProperty(key) && fn.call(bind, this[key], key)) return true; - } - return false; - }, - - getKeys: function(){ - var keys = []; - Hash.each(this, function(value, key){ - keys.push(key); - }); - return keys; - }, - - getValues: function(){ - var values = []; - Hash.each(this, function(value){ - values.push(value); - }); - return values; - }, - - toQueryString: function(base){ - var queryString = []; - Hash.each(this, function(value, key){ - if (base) key = base + '[' + key + ']'; - var result; - switch ($type(value)){ - case 'object': result = Hash.toQueryString(value, key); break; - case 'array': - var qs = {}; - value.each(function(val, i){ - qs[i] = val; - }); - result = Hash.toQueryString(qs, key); - break; - default: result = key + '=' + encodeURIComponent(value); - } - if (value != undefined) queryString.push(result); - }); - - return queryString.join('&'); - } - -}); - -Hash.alias({keyOf: 'indexOf', hasValue: 'contains'}); - - -/* ---- - -name: Event - -description: Contains the Event Class, to make the event object cross-browser. - -license: MIT-style license. - -requires: [Window, Document, Hash, Array, Function, String] - -provides: Event - -... -*/ - -var Event = new Native({ - - name: 'Event', - - initialize: function(event, win){ - win = win || window; - var doc = win.document; - event = event || win.event; - if (event.$extended) return event; - this.$extended = true; - var type = event.type; - var target = event.target || event.srcElement; - while (target && target.nodeType == 3) target = target.parentNode; - - if (type.test(/key/)){ - var code = event.which || event.keyCode; - var key = Event.Keys.keyOf(code); - if (type == 'keydown'){ - var fKey = code - 111; - if (fKey > 0 && fKey < 13) key = 'f' + fKey; - } - key = key || String.fromCharCode(code).toLowerCase(); - } else if (type.match(/(click|mouse|menu)/i)){ - doc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; - var page = { - x: event.pageX || event.clientX + doc.scrollLeft, - y: event.pageY || event.clientY + doc.scrollTop - }; - var client = { - x: (event.pageX) ? event.pageX - win.pageXOffset : event.clientX, - y: (event.pageY) ? event.pageY - win.pageYOffset : event.clientY - }; - if (type.match(/DOMMouseScroll|mousewheel/)){ - var wheel = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3; - } - var rightClick = (event.which == 3) || (event.button == 2); - var related = null; - if (type.match(/over|out/)){ - switch (type){ - case 'mouseover': related = event.relatedTarget || event.fromElement; break; - case 'mouseout': related = event.relatedTarget || event.toElement; - } - if (!(function(){ - while (related && related.nodeType == 3) related = related.parentNode; - return true; - }).create({attempt: Browser.Engine.gecko})()) related = false; - } - } - - return $extend(this, { - event: event, - type: type, - - page: page, - client: client, - rightClick: rightClick, - - wheel: wheel, - - relatedTarget: related, - target: target, - - code: code, - key: key, - - shift: event.shiftKey, - control: event.ctrlKey, - alt: event.altKey, - meta: event.metaKey - }); - } - -}); - -Event.Keys = new Hash({ - 'enter': 13, - 'up': 38, - 'down': 40, - 'left': 37, - 'right': 39, - 'esc': 27, - 'space': 32, - 'backspace': 8, - 'tab': 9, - 'delete': 46 -}); - -Event.implement({ - - stop: function(){ - return this.stopPropagation().preventDefault(); - }, - - stopPropagation: function(){ - if (this.event.stopPropagation) this.event.stopPropagation(); - else this.event.cancelBubble = true; - return this; - }, - - preventDefault: function(){ - if (this.event.preventDefault) this.event.preventDefault(); - else this.event.returnValue = false; - return this; - } - -}); - - -/* ---- - -name: Class - -description: Contains the Class Function for easily creating, extending, and implementing reusable Classes. - -license: MIT-style license. - -requires: [$util, Native, Array, String, Function, Number, Hash] - -provides: Class - -... -*/ - -function Class(params){ - - if (params instanceof Function) params = {initialize: params}; - - var newClass = function(){ - Object.reset(this); - if (newClass._prototyping) return this; - this._current = $empty; - var value = (this.initialize) ? this.initialize.apply(this, arguments) : this; - delete this._current; delete this.caller; - return value; - }.extend(this); - - newClass.implement(params); - - newClass.constructor = Class; - newClass.prototype.constructor = newClass; - - return newClass; - -}; - -Function.prototype.protect = function(){ - this._protected = true; - return this; -}; - -Object.reset = function(object, key){ - - if (key == null){ - for (var p in object) Object.reset(object, p); - return object; - } - - delete object[key]; - - switch ($type(object[key])){ - case 'object': - var F = function(){}; - F.prototype = object[key]; - var i = new F; - object[key] = Object.reset(i); - break; - case 'array': object[key] = $unlink(object[key]); break; - } - - return object; - -}; - -new Native({name: 'Class', initialize: Class}).extend({ - - instantiate: function(F){ - F._prototyping = true; - var proto = new F; - delete F._prototyping; - return proto; - }, - - wrap: function(self, key, method){ - if (method._origin) method = method._origin; - - return function(){ - if (method._protected && this._current == null) throw new Error('The method "' + key + '" cannot be called.'); - var caller = this.caller, current = this._current; - this.caller = current; this._current = arguments.callee; - var result = method.apply(this, arguments); - this._current = current; this.caller = caller; - return result; - }.extend({_owner: self, _origin: method, _name: key}); - - } - -}); - -Class.implement({ - - implement: function(key, value){ - - if ($type(key) == 'object'){ - for (var p in key) this.implement(p, key[p]); - return this; - } - - var mutator = Class.Mutators[key]; - - if (mutator){ - value = mutator.call(this, value); - if (value == null) return this; - } - - var proto = this.prototype; - - switch ($type(value)){ - - case 'function': - if (value._hidden) return this; - proto[key] = Class.wrap(this, key, value); - break; - - case 'object': - var previous = proto[key]; - if ($type(previous) == 'object') $mixin(previous, value); - else proto[key] = $unlink(value); - break; - - case 'array': - proto[key] = $unlink(value); - break; - - default: proto[key] = value; - - } - - return this; - - } - -}); - -Class.Mutators = { - - Extends: function(parent){ - - this.parent = parent; - this.prototype = Class.instantiate(parent); - - this.implement('parent', function(){ - var name = this.caller._name, previous = this.caller._owner.parent.prototype[name]; - if (!previous) throw new Error('The method "' + name + '" has no parent.'); - return previous.apply(this, arguments); - }.protect()); - - }, - - Implements: function(items){ - $splat(items).each(function(item){ - if (item instanceof Function) item = Class.instantiate(item); - this.implement(item); - }, this); - - } - -}; - - -/* ---- - -name: Class.Extras - -description: Contains Utility Classes that can be implemented into your own Classes to ease the execution of many common tasks. - -license: MIT-style license. - -requires: Class - -provides: [Chain, Events, Options, Class.Extras] - -... -*/ - -var Chain = new Class({ - - $chain: [], - - chain: function(){ - this.$chain.extend(Array.flatten(arguments)); - return this; - }, - - callChain: function(){ - return (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false; - }, - - clearChain: function(){ - this.$chain.empty(); - return this; - } - -}); - -var Events = new Class({ - - $events: {}, - - addEvent: function(type, fn, internal){ - type = Events.removeOn(type); - if (fn != $empty){ - this.$events[type] = this.$events[type] || []; - this.$events[type].include(fn); - if (internal) fn.internal = true; - } - return this; - }, - - addEvents: function(events){ - for (var type in events) this.addEvent(type, events[type]); - return this; - }, - - fireEvent: function(type, args, delay){ - type = Events.removeOn(type); - if (!this.$events || !this.$events[type]) return this; - this.$events[type].each(function(fn){ - fn.create({'bind': this, 'delay': delay, 'arguments': args})(); - }, this); - return this; - }, - - removeEvent: function(type, fn){ - type = Events.removeOn(type); - if (!this.$events[type]) return this; - if (!fn.internal) this.$events[type].erase(fn); - return this; - }, - - removeEvents: function(events){ - var type; - if ($type(events) == 'object'){ - for (type in events) this.removeEvent(type, events[type]); - return this; - } - if (events) events = Events.removeOn(events); - for (type in this.$events){ - if (events && events != type) continue; - var fns = this.$events[type]; - for (var i = fns.length; i--; i) this.removeEvent(type, fns[i]); - } - return this; - } - -}); - -Events.removeOn = function(string){ - return string.replace(/^on([A-Z])/, function(full, first){ - return first.toLowerCase(); - }); -}; - -var Options = new Class({ - - setOptions: function(){ - this.options = $merge.run([this.options].extend(arguments)); - if (!this.addEvent) return this; - for (var option in this.options){ - if ($type(this.options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue; - this.addEvent(option, this.options[option]); - delete this.options[option]; - } - return this; - } - -}); - - - -/* ---- - -name: Cookie - -description: Class for creating, reading, and deleting browser Cookies. - -license: MIT-style license. - -credits: Based on the functions by Peter-Paul Koch (http://quirksmode.org). - -requires: Options - -provides: Cookie - -... -*/ - -var Cookie = new Class({ - - Implements: Options, - - options: { - path: false, - domain: false, - duration: false, - secure: false, - document: document - }, - - initialize: function(key, options){ - this.key = key; - this.setOptions(options); - }, - - write: function(value){ - value = encodeURIComponent(value); - if (this.options.domain) value += '; domain=' + this.options.domain; - if (this.options.path) value += '; path=' + this.options.path; - if (this.options.duration){ - var date = new Date(); - date.setTime(date.getTime() + this.options.duration * 24 * 60 * 60 * 1000); - value += '; expires=' + date.toGMTString(); - } - if (this.options.secure) value += '; secure'; - this.options.document.cookie = this.key + '=' + value; - return this; - }, - - read: function(){ - var value = this.options.document.cookie.match('(?:^|;)\\s*' + this.key.escapeRegExp() + '=([^;]*)'); - return (value) ? decodeURIComponent(value[1]) : null; - }, - - dispose: function(){ - new Cookie(this.key, $merge(this.options, {duration: -1})).write(''); - return this; - } - -}); - -Cookie.write = function(key, value, options){ - return new Cookie(key, options).write(value); -}; - -Cookie.read = function(key){ - return new Cookie(key).read(); -}; - -Cookie.dispose = function(key, options){ - return new Cookie(key, options).dispose(); -}; - - -/* ---- - -name: Request - -description: Powerful all purpose Request Class. Uses XMLHTTPRequest. - -license: MIT-style license. - -requires: [Element, Chain, Events, Options, Browser] - -provides: Request - -... -*/ - -var Request = new Class({ - - Implements: [Chain, Events, Options], - - options: {/* - onRequest: $empty, - onComplete: $empty, - onCancel: $empty, - onSuccess: $empty, - onFailure: $empty, - onException: $empty,*/ - url: '', - data: '', - headers: { - 'X-Requested-With': 'XMLHttpRequest', - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' - }, - async: true, - format: false, - method: 'post', - link: 'ignore', - isSuccess: null, - emulation: true, - urlEncoded: true, - encoding: 'utf-8', - evalScripts: false, - evalResponse: false, - noCache: false - }, - - initialize: function(options){ - this.xhr = new Browser.Request(); - this.setOptions(options); - this.options.isSuccess = this.options.isSuccess || this.isSuccess; - this.headers = new Hash(this.options.headers); - }, - - onStateChange: function(){ - if (this.xhr.readyState != 4 || !this.running) return; - this.running = false; - this.status = 0; - $try(function(){ - this.status = this.xhr.status; - }.bind(this)); - this.xhr.onreadystatechange = $empty; - if (this.options.isSuccess.call(this, this.status)){ - this.response = {text: this.xhr.responseText, xml: this.xhr.responseXML}; - this.success(this.response.text, this.response.xml); - } else { - this.response = {text: null, xml: null}; - this.failure(); - } - }, - - isSuccess: function(){ - return ((this.status >= 200) && (this.status < 300)); - }, - - processScripts: function(text){ - if (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) return $exec(text); - return text.stripScripts(this.options.evalScripts); - }, - - success: function(text, xml){ - this.onSuccess(this.processScripts(text), xml); - }, - - onSuccess: function(){ - this.fireEvent('complete', arguments).fireEvent('success', arguments).callChain(); - }, - - failure: function(){ - this.onFailure(); - }, - - onFailure: function(){ - this.fireEvent('complete').fireEvent('failure', this.xhr); - }, - - setHeader: function(name, value){ - this.headers.set(name, value); - return this; - }, - - getHeader: function(name){ - return $try(function(){ - return this.xhr.getResponseHeader(name); - }.bind(this)); - }, - - check: function(){ - if (!this.running) return true; - switch (this.options.link){ - case 'cancel': this.cancel(); return true; - case 'chain': this.chain(this.caller.bind(this, arguments)); return false; - } - return false; - }, - - send: function(options){ - if (!this.check(options)) return this; - this.running = true; - - var type = $type(options); - if (type == 'string' || type == 'element') options = {data: options}; - - var old = this.options; - options = $extend({data: old.data, url: old.url, method: old.method}, options); - var data = options.data, url = String(options.url), method = options.method.toLowerCase(); - - switch ($type(data)){ - case 'element': data = document.id(data).toQueryString(); break; - case 'object': case 'hash': data = Hash.toQueryString(data); - } - - if (this.options.format){ - var format = 'format=' + this.options.format; - data = (data) ? format + '&' + data : format; - } - - if (this.options.emulation && !['get', 'post'].contains(method)){ - var _method = '_method=' + method; - data = (data) ? _method + '&' + data : _method; - method = 'post'; - } - - if (this.options.urlEncoded && method == 'post'){ - var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : ''; - this.headers.set('Content-type', 'application/x-www-form-urlencoded' + encoding); - } - - if (this.options.noCache){ - var noCache = 'noCache=' + new Date().getTime(); - data = (data) ? noCache + '&' + data : noCache; - } - - var trimPosition = url.lastIndexOf('/'); - if (trimPosition > -1 && (trimPosition = url.indexOf('#')) > -1) url = url.substr(0, trimPosition); - - if (data && method == 'get'){ - url = url + (url.contains('?') ? '&' : '?') + data; - data = null; - } - - this.xhr.open(method.toUpperCase(), url, this.options.async); - - this.xhr.onreadystatechange = this.onStateChange.bind(this); - - this.headers.each(function(value, key){ - try { - this.xhr.setRequestHeader(key, value); - } catch (e){ - this.fireEvent('exception', [key, value]); - } - }, this); - - this.fireEvent('request'); - this.xhr.send(data); - if (!this.options.async) this.onStateChange(); - return this; - }, - - cancel: function(){ - if (!this.running) return this; - this.running = false; - this.xhr.abort(); - this.xhr.onreadystatechange = $empty; - this.xhr = new Browser.Request(); - this.fireEvent('cancel'); - return this; - } - -}); - -(function(){ - -var methods = {}; -['get', 'post', 'put', 'delete', 'GET', 'POST', 'PUT', 'DELETE'].each(function(method){ - methods[method] = function(){ - var params = Array.link(arguments, {url: String.type, data: $defined}); - return this.send($extend(params, {method: method})); - }; -}); - -Request.implement(methods); - -})(); -var APE = { - 'version': '1.1', - 'Request': {}, - 'Transport': {} -}; -APE.Events = new Class({ - - Extends: Events, - - onRaw: function(type, fn, internal) { - return this.addEvent('raw_' + type.toLowerCase(), fn, internal); - }, - - onCmd: function(type, fn, internal) { - return this.addEvent('cmd_' + type.toLowerCase(), fn, internal); - }, - - onError: function(type, fn, internal) { - return this.addEvent('error_' + type, fn, internal); - }, - - removeEvent: function(type, fn) { - return Events.prototype.removeEvent.run([type, this.$originalEvents[type][fn]], this); - } - -}); -/* - Copyright (C) 2008-2009 Weelya - This file is part of APE Client. - APE 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 2 of the License, or - (at your option) any later version. - - APE 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 APE ; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*/ - -/*** ________________________________________________________ - * __------__ / \ - * /~ ~\ | APE, the Ajax Push Engine made with heart (and MooTools) | - * | //^\\//^\| | http://www.weelya.net - http://www.ape-project.org | - * /~~\ || o| |o|:~\ \ _______________________________________________________/ - * | |6 ||___|_|_||:| / - * \__. / o \/' / - * | ( O )_/ - * /~~~~\ `\ \ / - * | |~~\ | ) ~------~`\ - * /' | | | / ____ /~~~)\ - * (_/' | | | /' | ( | - * | | | \ / __)/ \ - * \ \ \ \/ /' \ `\ - * \ \|\ / | |\___| - * \ | \____/ | | - * /^~> \ _/ < - * | | \ \ - * | | \ \ \ - * -^-\ \ | ) - * `\_______/^\______/ - */ -APE.Core = new Class({ - - Implements: [APE.Events, Options], - - $originalEvents: {}, - - options:{ - server: '', // APE server URL - pollTime: 25000, // Max time for a request - identifier: 'ape', // Identifier is used by cookie to differentiate ape instance - transport: 0, // Transport 0: long polling, 1 : XHRStreaming, 2: JSONP, 3 SSE / JSONP, 4 : SSE / XHR - frequency: 0, // Frequency identifier - cycledStackTime: 350, //Time before send request of cycledStack - secure: false - }, - - initialize: function(options){ - window.Ape = this; - this.setOptions(options); - - this.selectTransport(); - this.request = new APE.Request(this); - - this.pipes = new $H; - this.users = new $H; - - this.sessid = null; - this.pubid = null; - - this.serverUri = (this.options.secure ? 'https' : 'http') + '://' + this.options.frequency + '.' + this.options.server + '/' + this.options.transport + '/?', - this.timer = null; - this.status = 0; // 0 = APE is not initialized, 1 = connected, -1 = Disconnected by timeout, -2 = Disconnected by request failure - this.failCounter = 0; - this.pollerObserver = null; - this.requestDisabled = false; - - this.onRaw('login', this.rawLogin); - this.onRaw('err', this.rawErr); - this.onRaw('ident', this.rawIdent); - this.onRaw('quit', this.rawQuit); - - this.onError('003', this.clearSession); - this.onError('004', this.clearSession); - - //Set core var for APE.Client instance - if (options.init) options.init.apply(null, [this]); - - //Execute complete function of APE.Client instance - if (options.complete) options.complete.apply(null, [this]); - this.fireEvent('load', this); - - if (this.options.connectOptions) this.start(this.options.connectOptions); - }, - - selectTransport: function() { - var transports = [APE.Transport.longPolling, APE.Transport.XHRStreaming, APE.Transport.JSONP,null, null, null, APE.Transport.WebSocket]; - var transport = this.options.transport; - var support; - - while (support !== true) { - support = transports[transport].browserSupport();//Test if browser support transport - - if (support === true) { - this.options.transport = transport; - this.transport = new transports[transport](this); - } else transport = support;//Browser do not support transport, next loop will test with fallback transport returned by browserSupport(); - } - }, - poller: function() { - if (this.pollerActive) this.check(); - }, - - startPoller: function() { - this.pollerActive = true; - }, - - stopPoller: function() { - $clear(this.pollerObserver); - this.pollerActive = false; - }, - - stopRequest: function() { - this.cancelRequest(); - if (this.transport.streamRequest) this.transport.streamRequest.cancel(); - this.requestDisabled = true; - }, - - parseParam: function(param) { - return ($type(param) == 'object') ? Hash.getValues(param) : $splat(param); - }, - - cancelRequest: function() { - this.transport.cancel(); - }, - - /*** - * Function called when a request fail or timeout - */ - requestFail: function(failStatus, request) { - var reSendData = false; - if (request.request && !request.request.dataSent) reSendData = true; - if (this.status > 0) {//APE is connected but request failed - this.status = failStatus; - this.cancelRequest(); - this.stopPoller(); - this.fireEvent('apeDisconnect'); - } - - if (this.failCounter < 6) this.failCounter++; - - //Cancel last request - this.cancelRequest(); - - var delay = (this.failCounter*$random(300,1000)); - - //if (reSendData) { - // this.request.send.delay(delay, this.request, queryString); - //} else { - this.check.delay(delay, this); - //} - }, - - /*** - * Parse received data from Server - */ - parseResponse: function(raws, callback) { - if (raws) { - if (this.status < 0 ) { - this.failCounter = 0; - this.status = 1; - this.startPoller(); - this.fireEvent('apeReconnect'); - } - } - - var check = false; - var chlCallback;//Callback on challenge - - if (raws) { - raws = JSON.parse(raws); - if (!raws){ // Something went wrong, json decode failed - this.check(); - return; - } - - for (var i = 0; i < raws.length; i++){ //Read all raw - var raw = raws[i]; - - if (callback && $type(callback) == 'function') { - callback.run(raw); - } - - this.callRaw(raw); - - //Last request is finished and it's not an error - if (!this.transport.running()) { - if (!raw.data.code || (raw.data.code != '006' && raw.data.code != '007' && raw.data.code != '005' && raw.data.code!= '001' && raw.data.code != '004' && raw.data.code != '003')) { - check = true; - } - } else { - //Invalidate check if something went wrong with other raw or a new request have been launched - check = false; - } - } - } else if (!this.transport.running()) check = true; //No request running, request didn't respond correct JSON, something went wrong - if (check) this.check(); - }, - - /*** - * Fire raw event. If received raw is on a non-existing pipe, create new pipe - */ - callRaw: function(raw) { - var args; - if (raw.data.pipe) { - var pipeId = raw.data.pipe.pubid, pipe; - if (!this.pipes.has(pipeId)) { - pipe = this.newPipe(raw.data.pipe.casttype, raw.data); - } else { - pipe = this.pipes.get(pipeId); - } - if (pipe) { - args = [raw, pipe]; - pipe.fireEvent('raw_' + raw.raw.toLowerCase(), args); - } - } else { - args = raw; - } - - this.fireEvent('onRaw', args); - - if (raw.data.chl) {//Execute callback on challenge - var chlCallback = this.request.callbackChl.get(raw.data.chl); - if (chlCallback) { - this.request.callbackChl.erase(raw.data.chl); - chlCallback.run(raw); - } - } - - this.fireEvent('raw_' + raw.raw.toLowerCase(), args); - }, - - newPipe: function(type, options){ - if (options && options.pipe.pubid) { - var pipe = this.pipes.get(options.pipe.pubid) - if (pipe) return pipe; - } - - if(type == 'uni') return new APE.PipeSingle(this, options); - if(type == 'multi') return new APE.PipeMulti(this, options); - if(type == 'proxy') return new APE.PipeProxy(this, options); - }, - - getRequest: function(opt) { - if (!opt.request) return this.request.send.bind(this.request); - else return this.request[opt.request].add.bind(this.request[opt.request]); - }, - - /*** - * Add a pipe to the core pipes hash - */ - addPipe: function(pubid, pipe){ - return this.pipes.set(pubid, pipe); - }, - - getPipe: function(pubid) { - var pipe = this.pipes.get(pubid); - if (!pipe) { - pipe = this.users.get(pubid); - if (pipe) pipe = this.newPipe('uni', {'pipe': pipe}); - } - return pipe; - }, - - /*** - * Remove a pipe from the pipe hash and fire event 'pipeDelete' - */ - delPipe: function(pubid){ - var pipe = this.pipes.get(pubid); - this.pipes.erase(pubid); - this.fireEvent(pipe.type+'PipeDelete', [pipe]); - return pipe; - }, - - check: function(){ - this.request.send('CHECK'); - }, - - start: function(args, options){ - this.connect(args, options); - }, - - connect: function(args, options){ - if (!options) options = {}; - options.sessid = false; - - this.request.stack.add('CONNECT', args, options); - if (this.options.channel) { - this.request.stack.add('JOIN', {"channels": this.options.channel}, options); - } - if (!$defined(options.sendStack) && options.sendStack !== false) this.request.stack.send(); - }, - - join: function(channel, options) { - options = options || {}; - options.channels = channel; - this.request.send('JOIN', options); - }, - - left: function(pubid){ - this.request.send('LEFT', {"channel":this.pipes.get(pubid).name}); - }, - - quit: function(){ - this.request.send('QUIT'); - this.clearSession(); - }, - - getPubid: function(){ - return this.pubid; - }, - - getSessid:function(){ - return this.sessid; - }, - - setSession: function(obj, option) { - if (this.restoring) return; - - this.request.send('SESSION', {'action': 'set', 'values': obj}, option); - }, - - getSession: function(key, callback, option){ - if (!option) option = {}; - var requestOption = {}; - - if (callback) { - requestOption.callback = function(resp) { - if (resp.raw == 'SESSIONS') this.apply(null, arguments) - }.bind(callback) - } - requestOption.requestCallback = option.requestCallback || null; - - this.getRequest(option)('SESSION', { - 'action':'get', - 'values': (($type(key) == 'array') ? key : [key]) - }, requestOption); - - if (option.request && option.sendStack !== false) { - this.request[option.request].send(); - } - }, - - rawIdent: function(raw){ - this.user = raw.data.user; - this.pubid = raw.data.user.pubid; - this.user.pipes = new $H; - this.users.set(this.pubid, this.user); - }, - - rawLogin: function(param){ - this.sessid = param.data.sessid; - - this.status = 1; - this.startPoller(); - this.fireEvent('ready'); - this.fireEvent('init'); - }, - - rawErr: function(err){ - this.fireEvent('error_' + err.data.code, err); - }, - - rawQuit: function() { - this.stopRequest(); - }, - - /*** - * Clear the sessions, clean timer, remove cookies, remove events - */ - clearSession:function(){ - //Clear all APE var - this.sessid = null; - this.pubid = null; - this.$events = {}; - this.request.chl = 1; - this.status = 0; - this.options.restore = false; - - this.fireEvent('clearSession'); - this.stopPoller(); - this.cancelRequest(); - } -}); - -var Ape; -APE.init = function(config){ - //Delay of 1ms allow browser to do not show a loading message - (function() { - new APE.Core(config); - }).delay(1); -} -APE.Pipe = new Class({ - - Implements: APE.Events, - - initialize: function(ape, options){ - this.pipe = options.pipe; - this.properties = options.pipe.properties; - - this.ape = ape; - - this.initRequestMethod(); - - this.ape.addPipe(this.pipe.pubid, this); - }, - - initRequestMethod: function() { - this.request = {}; - this.request = { - send: function() { - var args = this.parsePipeCmd.apply(this, arguments); - this.ape.request.send.apply(this.ape.request, args); - }.bind(this), - cycledStack: { - add: function() { - var args = this.parsePipeCmd.apply(this, arguments); - this.ape.request.cycledStack.add.apply(this.ape.request.cycledStack, args); - }.bind(this), - send: this.ape.request.send, - setTime: this.ape.request.cycledStack.setTime.bind(this.ape.request.cycledStack) - }, - stack : { - add: function() { - var args = this.parsePipeCmd.apply(this, arguments); - this.ape.request.stack.add.apply(this.ape.request.stack, args); - }.bind(this), - send: this.ape.request.stack.send.bind(this.ape.request.stack) - } - } - }, - - parsePipeCmd: function() { - //convert arguments to a real array to avoid a bug with firefox see bug #292215 https://bugzilla.mozilla.org/show_bug.cgi?id=292215 - var args = Array.prototype.slice.call(arguments); - if ($type(arguments[0]) == 'array') { - for (var i = 0; i < args[0].length; i++) { - if (!args[0][i].params) args[0][i].params = {}; - if (this.pipe) args[0][i].pipe = this.pipe.pubid; - } - } else { - if (!args[1]) args[1] = {}; - if (this.pipe) args[1].pipe = this.pipe.pubid; - } - return args; - }, - - send: function(data){ - this.request.send('SEND', {'msg': data}); - }, - - getPubid: function(){ - return this.pipe.pubid; - }, - - fireGlobalEvent: function(type, fn, internal) { - this.fireEvent(type, fn, internal); - this.ape.fireEvent(type, fn, internal); - }, - - fireInTheHall: this.fireGlobalEvent - -}); -APE.PipeProxy = new Class({ - - Extends: APE.Pipe, - - initialize: function(core, options){ - this.core = core || window.Ape; - this.ape = this.core; - - this.initRequestMethod(); - this.type = 'proxy'; - - if (options) { - this.init(options); - } - }, - - init: function(options){ - this.pipe = options.pipe; - - this.core.addPipe(this.getPubid(), this); - - this.onRaw('proxy_event', this.rawProxyEvent); - this.ape.fireEvent('proxyPipeCreate', [this, options]); - }, - - reset: function() { - //close connection - }, - - close: function() { - //close connection - }, - - open: function(hostname, port){ - if (this.core.status == 0) this.core.start(null, false); - //Adding a callback to request response to create a new pipe if this.pipe haven't been init - this.request.stack.add('PROXY_CONNECT', {'host':hostname, 'port':port}, this.pipe ? {} : {'callback':this.callback.bind(this)}); - this.request.stack.send(); - }, - - send: function(data){ - this.request.send('SEND', {'msg':B64.encode(data)}); - }, - - rawProxyEvent: function(resp){ - switch (resp.data.event) { - case 'read': - var data = B64.decode(resp.data.data); - this.fireGlobalEvent('proxyRead', data) - if (this.onread) this.onread(data); - break; - case 'connect': - this.fireGlobalEvent('proxyConnect'); - if (this.onopen) this.onopen(); - break; - case 'close': - this.fireGlobalEvent('proxyClose'); - if (this.onclose) this.onclose(); - break; - } - }, - - callback: function(raw){ - this.init(raw.data); - this.rawProxyEvent(raw); - } -}); - -APE.Core = new Class({ - - Extends: APE.Core, - - /*** - * This allow ape to be compatible with TCPSocket - */ - TCPSocket: APE.PipeProxy -}); -APE.PipeMulti = new Class({ - - Extends: APE.Pipe, - - initialize: function(core, options) { - this.parent(core, options); - - this.type = 'multi'; - this.name = options.pipe.properties.name; - - //Test if pipe have users before sending event - //because this.users need to be defined - if (options.users) { - this.users = new $H; - var users = options.users; - } - - this.ape.fireEvent('multiPipeCreate', [this, options]); - - if (options.users) { - var l = users.length; - for (var i=0; i < l; i++) { - this.addUser(users[i].pubid, users[i]); - } - } - this.onRaw('left', this.rawLeft); - this.onRaw('join', this.rawJoin); - }, - - rawJoin: function(raw, pipe) { - this.addUser(raw.data.user.pubid, raw.data.user); - }, - - rawLeft: function(raw, pipe) { - if (pipe.name.charAt(0) != '*') this.delUser(raw.data.user.pubid); - if (raw.data.user.pubid == this.ape.user.pubid) this.ape.delPipe(pipe.pipe.pubid); - }, - - left: function() { - this.ape.left(this.pipe.pubid); - }, - - addUser: function(pubid, updatedUser) { - var user; - if (!this.ape.users.has(pubid)) { - user = updatedUser; - user.pipes = new $H; - this.ape.users.set(pubid, updatedUser); - } else { - user = this.ape.users.get(pubid); - } - user.pipes.set(this.pipe.pubid, this); - var u = {'pipes':user.pipes ,'casttype': user.casttype, 'pubid': user.pubid, 'properties': updatedUser.properties}; - this.users.set(pubid, u); - this.fireGlobalEvent('userJoin', [u, this]); - return u; - }, - - delUser: function(pubid) { - var u = this.users.get(pubid); - this.users.erase(pubid); - u.pipes.erase(this.pipe.pubid) - if (u.pipes.getLength() == 0) { - this.ape.users.erase(u.pubid); - } - this.fireGlobalEvent('userLeft', [u, this]); - return u; - }, - - getUser: function(pubid) { - return this.users.get(pubid); - }, - - getUserPipe: function(user) { - if (typeof user == 'string') user = this.users.get(users.pubid); - return this.ape.newPipe('uni', {'pipe':user}); - } -}); -APE.PipeSingle = new Class({ - - Extends: APE.Pipe, - - initialize: function(core, options){ - this.parent(core, options); - this.type = 'uni'; - this.ape.fireEvent('uniPipeCreate',[this, options]); - } -}); -APE.Request = new Class({ - initialize: function(ape) { - this.ape = ape; - this.stack = new APE.Request.Stack(ape); - this.cycledStack = new APE.Request.CycledStack(ape); - this.chl = 1; - this.callbackChl = new $H; - - //Fix presto bug (see send method) - if (Browser.Engine.presto){ - this.requestVar = { - updated: false, - args: [] - }; - this.requestObserver.periodical(10, this); - } - }, - - send: function(cmd, params, options, noWatch) { - if (this.ape.requestDisabled) return; - //Opera dirty fix - if (Browser.Engine.presto && !noWatch) { - this.requestVar.updated = true; - this.requestVar.args.push([cmd, params, options]); - return; - } - - var opt = {}; - if (!options) options = {}; - - opt.event = options.event || true; - opt.requestCallback = options.requestCallback || null; - opt.callback = options.callback; - var ret = this.ape.transport.send(this.parseCmd(cmd, params, opt), opt); - - $clear(this.ape.pollerObserver); - this.ape.pollerObserver = this.ape.poller.delay(this.ape.options.pollTime, this.ape); - - return ret; - }, - - parseCmd: function(cmd, params, options) { - var queryString = ''; - var a = []; - var o = {}; - if ($type(cmd) == 'array') { - var tmp, evParams; - for (var i = 0; i < cmd.length; i++) { - tmp = cmd[i]; - - o = {}; - o.cmd = tmp.cmd; - o.chl = this.chl++; - if (!tmp.options) tmp.options = {}; - - tmp.params ? o.params = tmp.params : null; - evParams = $extend({}, o.params); - - - if (!$defined(tmp.options.sessid) || tmp.options.sessid !== false) o.sessid = this.ape.sessid; - a.push(o); - - var ev = 'cmd_' + tmp.cmd.toLowerCase(); - - if (tmp.options.callback) this.callbackChl.set(o.chl, tmp.options.callback); - if (tmp.options.requestCallback) options.requestCallback = tmp.options.requestCallback; - if (options.event) { - //Request is on a pipe, fire the event on the pipe - if (o.params && o.params.pipe) { - var pipe = this.ape.getPipe(o.params.pipe); - if (pipe) evParams = [evParams, pipe]; - } - - this.ape.fireEvent('onCmd', [tmp.cmd, evParams]); - - if (pipe) pipe.fireEvent(ev, evParams); - - this.ape.fireEvent(ev, evParams); - } - } - } else { - o.cmd = cmd; - o.chl = this.chl++; - - params ? o.params = params : null; - var evParams = $extend({}, params); - - - if (!$defined(options.sessid) || options.sessid !== false) o.sessid = this.ape.sessid; - a.push(o); - - var ev = 'cmd_' + cmd.toLowerCase(); - if (options.callback) this.callbackChl.set(o.chl, options.callback); - - if (options.event) { - //Request is on a pipe, fire the event on the pipe - if (params && params.pipe) { - var pipe = this.ape.getPipe(params.pipe); - if (pipe) evParams = [evParams, pipe]; - } - this.ape.fireEvent('onCmd', [cmd, evParams]); - - if (pipe) pipe.fireEvent(ev, evParams); - - this.ape.fireEvent(ev, evParams); - } - } - - var transport = this.ape.options.transport; - return JSON.stringify(a, function(key, value) { - if (typeof(value) == 'string') { - value = encodeURIComponent(value); - //In case of JSONP data have to be escaped two times - if (transport == 2) value = encodeURIComponent(value); - return value; - } else return value; - }); - }, - - /**** - * This method is only used by opera. - * Opera have a bug, when request are sent trought user action (ex : a click), opera throw a security violation when trying to make a XHR. - * The only way is to set a class var and watch when this var change - */ - requestObserver: function(){ - if (this.requestVar.updated) { - var args = this.requestVar.args.shift(); - this.requestVar.updated = (this.requestVar.args.length>0) ? true : false; - args[3] = true; //Set noWatch argument to true - this.send.run(args, this); - } - } -}); -APE.Request.Stack = new Class({ - initialize: function(ape) { - this.ape = ape; - this.stack =[]; - }, - add: function(cmd, params, options) { - this.stack.push({'cmd':cmd, 'params':params, 'options': options}); - }, - send: function() { - this.ape.request.send(this.stack); - this.stack = []; - } -}); -APE.Request.CycledStack = new Class({ - initialize: function(ape) { - this.ape = ape; - - this.stack = []; - this.reajustTime = false; - - this.timer = this.send.periodical(this.ape.options.cycledStackTime, this); - }, - - add: function(cmd, params, sessid) { - this.stack.push({'cmd':cmd, 'params':params, 'sessid':sessid}); - }, - - setTime: function(time, now) { - if (now) { - this.send(); - $clear(this.timer); - this.timer = this.send.periodical(time, this); - this.reajustTime = false; - } - else this.reajustTime = time; - }, - - send: function() { - if (this.stack.length > 0) { - this.ape.request.send(this.stack); - this.stack = []; - if (this.reajustTime) { - this.setTime(this.reajustTime, true); - } - } - } -}); -Request = new Class({ - - Extends: Request, - - send: function(options) { - //mootools set onreadystatechange after xhr.open, in webkit, this cause readyState 1 to be never fired - if (Browser.Engine.webkit) this.xhr.onreadystatechange = this.onStateChange.bind(this); - return this.parent(options); - }, - - onStateChange: function() { - if (this.xhr.readyState == 1) this.dataSent = true; - this.parent(); - } -}); - -APE.Transport.longPolling = new Class({ - - initialize: function(ape) { - this.ape = ape; - this.requestFailObserver = []; - }, - - send: function(queryString, options) { - var request = new Request({ - url: this.ape.serverUri, - onFailure: this.ape.requestFail.bind(this.ape, [-2, this]), - onComplete: function(resp) { - $clear(this.requestFailObserver.shift()); - this.ape.parseResponse(resp, options.requestCallback); - }.bind(this) - }).send(queryString); - request.id = $time(); - - this.request = request; - - this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime + 10000, this.ape, [-1, request])); - - return request; - }, - - running: function() { - return this.request ? this.request.running : false; - }, - - cancel: function() { - if (this.request) this.request.cancel(); - $clear(this.requestFailObserver.shift()); - } -}); - -APE.Transport.longPolling.browserSupport = function() { return Browser.Features.xhr ? true : 2; }; -/* Notice : This class in only intended to be use as an implemented class */ -APE.Request.SSE = new Class({ - SSESupport: ((typeof window.addEventStream) == 'function'), - - initSSE: function(queryString, options, readCallback) { - var tmp = document.createElement('div'); - document.body.appendChild(tmp); - tmp.innerHTML = ''; - this.eventSource = document.getElementById('APE_SSE'); - this.eventSource.addEventListener('ape-data', function(ev) { readCallback.run(ev.data) }, false); - } -}); -Request.XHRStreaming = new Class({ - - Extends: Request, - - lastTextLength: 0, - read: 0, //Contain the amout of data read - - send: function(options) { - //mootools set onreadystatechange after xhr.open. In webkit, this cause readyState 1 to be never fired - if (Browser.Engine.webkit) this.xhr.onreadystatechange = this.onStateChange.bind(this); - return this.parent(options); - }, - - onStateChange: function() { - if (this.xhr.readyState == 1) this.dataSent = true; - else if (this.xhr.readyState == 3) this.progress(this.xhr.responseText, this.xhr.responseXML); - this.parent(); - }, - - onProgress: function(){ - this.fireEvent('progress', arguments); - }, - - progress: function(text, xml){ - var length = text.length; - this.read += length; - text = text.substr(this.lastTextLength); - this.lastTextLength = length; - this.onProgress(this.processScripts(text), xml); - } -}); -APE.Transport.XHRStreaming = new Class({ - - maxRequestSize: 100000, - - Implements: APE.Request.SSE, - - initialize: function(ape){ - this.ape = ape; - this.requestFailObserver = []; - - //If browser support servent sent event, switch to SSE / XHR transport - if (this.SSESupport) this.ape.options.transport = 4; - - this.streamInfo = { - timeoutObserver: null, - cleanClose: false, - forceClose: false, - callback: null - } - }, - - send: function(queryString, options) { - if (this.SSESupport && !this.eventSource) { - this.initSSE(queryString, options, this.readSSE.bind(this)); - if (options.requestCallback) this.streamInfo.callback = options.requestCallback; - } else { - if ((!this.streamRequest || !this.streamRequest.running) && !this.eventSource) { //Only one XHRstreaming request is allowed - this.buffer = ''; - this.request = this.doRequest(queryString, options); - - if (options.requestCallback) this.streamInfo.callback = options.requestCallback; - } else { //Simple XHR request - var request = new Request({ - url: this.ape.serverUri, - onFailure: this.ape.requestFail.bind(this.ape, [-2, this]), - onComplete: function(resp) { - $clear(this.requestFailObserver.shift()); - this.request.dataSent = true;//In the case of XHRStreaming. Request are imediatly close. - this.ape.parseResponse(resp, options.callback); - }.bind(this) - }).send(queryString); - this.request = request; - - //set up an observer to detect request timeout - this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime + 10000, this.ape, [1, request])); - - } - - return this.request; - } - }, - - doRequest: function(queryString, options) { - this.streamInfo.forceClose = false; - - var request = new Request.XHRStreaming({ - url: this.ape.serverUri, - onProgress: this.readFragment.bindWithEvent(this), - onFailure: this.ape.requestFail.bind(this.ape, [-2, this]), - onComplete: function(resp) { - $clear(this.streamInfo.timeoutObserver); - if (this.ape.status > 0) { - if (this.streamInfo.cleanClose) this.ape.check(); - else this.newStream(); - this.streamInfo.cleanClose = false; - } - }.bind(this) - }).send(queryString); - - request.id = $time(); - this.streamRequest = request; - - //this should no longer exist - //this.streamInfo.timeoutObserver = (function() { - // this.streamInfo.forceClose = true; - // //try to imediatly close stream - // if (this.checkStream()) this.newStream(); - //}).delay(1000*60, this); - - return request; - }, - - readSSE: function(data) { - this.ape.parseResponse(data, this.streamInfo.callback); - this.streamInfo.callback = null; - }, - - readFragment: function(text){ - this.streamInfo.canClose = false; - - if (text == '') { - - this.streamInfo.canClose = true; - this.streamInfo.cleanClose = true; - this.ape.parseResponse(text, this.streamInfo.callback); - - this.streamInfo.callback = null; - } else { - text = this.buffer + text; - var group = text.split("\n\n"); - var length = group.length; - - // If group.length is gretter than 1 the fragment received complete last RAW or contains more than one RAW - if (group.length > 1) { - //Clear buffer - this.buffer = ''; - - for (var i = 0; i < length-1; i++) { - this.ape.parseResponse(group[i], this.streamInfo.callback); - } - - if (group[length-1] !== '') { //Last group complete last received raw but it's not finish - this.buffer += group[length-1]; - } else { //Received fragment is complete - this.streamInfo.canClose = true; - if (this.checkStream()) this.newStream(); - } - - //Delete callback - this.streamInfo.callback = null; - } else {//Fragement received is a part of a raw - this.buffer = text; - } - } - }, - - running: function() { - return (this.streamRequest && this.streamRequest.running) ? true : this.eventSource ? true : false; - }, - - checkStream: function() { - return (this.streamInfo.forceClose && this.streamInfo.canClose) || (this.streamRequest && this.streamRequest.read >= this.maxRequestSize && this.streamInfo.canClose); - }, - - newStream: function() { -// this.ape.request.send('CLOSE');//This will close the stream request - $clear(this.streamInfo.timeoutObserver); - this.streamRequest.cancel(); - this.ape.check(); - }, - - cancel: function(){ - if (this.request) this.request.cancel(); - - $clear(this.streamInfo.timeoutObserver); - $clear(this.requestFailObserver.shift()); - } -}); -APE.Transport.XHRStreaming.browserSupport = function() { - if (Browser.Features.xhr && (Browser.Engine.webkit || Browser.Engine.gecko)) { - return true; - /* Not yet - if (Browser.Engine.presto && ((typeof window.addEventStream) == 'function')) return true; - else if (window.XDomainRequest) return true; - else return Browser.Engine.trident ? 0 : true; - */ - } else if (Browser.Features.xhr) return 0;//No XHRStreaming support switch to long polling - else return 2;//No XHR Support, switch to JSONP -} - -APE.Transport.JSONP = new Class({ - - Implements: APE.Transport.SSE, - - initialize: function(ape) { - this.ape = ape; - this.requestFailObserver = []; - this.requests = []; - - //If browser support servent sent event, switch to SSE / JSONP transport (not yet supported by APE server) - //if (this.SSESupport) this.ape.options.transport = 3; - - window.parent.onkeyup = function(ev) { - if (ev.keyCode == 27) { - this.cancel();//Escape key - if (this.ape.status > 0) { - //if (!this.SSESupport) - //this.ape.request('CLOSE'); - this.ape.check(); - } - } - }.bind(this); - }, - - send: function(queryString, options) { - //Opera has some trouble with JSONP, so opera use mix of SSE & JSONP - /*if (this.SSESupport && !this.eventSource) { //SSE not yet supported by APE server - this.initSSE(queryString, options, this.readSSE.bind(this)); - } else { */ - this.callback = options.requestCallback; - - var request = document.createElement('script'); - request.src = this.ape.serverUri + queryString; - document.head.appendChild(request); - this.requests.push(request); - //Detect timeout - this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime + 10000, this.ape, [-1, request])); - - if (Browser.Engine.gecko) { - //Firefox hack to avoid status bar always show a loading message - //Ok this hack is little bit weird but it works! - (function() { - var tmp = document.createElement('iframe'); - document.body.appendChild(tmp); - document.body.removeChild(tmp); - }).delay(200); - } - //} - }, - - clearRequest: function(request) { - request.parentNode.removeChild(request); - //Avoid memory leaks - if (request.clearAttributes) { - request.clearAttributes(); - } else { - for (var prop in request) delete request[prop]; - } - $clear(this.requestFailObserver.shift()); - }, - - readSSE: function(data) { - this.ape.parseResponse(data, this.callback); - this.callback = null; - }, - - read: function(resp) { - $clear(this.requestFailObserver.shift()); - this.clearRequest(this.requests.shift()); - this.ape.parseResponse(resp, this.callback); - this.callback = null; - }, - - cancel: function() { - if (this.requests.length > 0) { - this.clearRequest(this.requests.shift()); - } - }, - - running: function() { - /* if (this.SSESupport) { - return this.eventSource ? true : false; - } else { */ - return this.requests.length > 0 ? true : false; - //} - } - - -}); - -APE.Transport.JSONP.browserSupport = function() { return true }; -APE.Transport.WebSocket = new Class({ - - stack: [], - connRunning: false, - - initialize: function(ape) { - this.ape = ape; - this.initWs(); - }, - - initWs: function() { - var uri = (this.ape.options.secure ? 'wss' : 'ws') + '://' + this.ape.options.frequency + '.' + this.ape.options.server + '/' + this.ape.options.transport +'/'; - - this.ws = ('MozWebSocket' in window ? new MozWebSocket(uri) : new WebSocket(uri)); - this.connRunning = true; - this.ws.onmessage = this.readWs.bind(this); - this.ws.onopen = this.openWs.bind(this); - this.ws.onclose = this.closeWs.bind(this); - this.ws.onerror = this.errorWs.bind(this); - }, - - readWs: function(evt) { - this.ape.parseResponse(evt.data, this.callback); - this.callback = null; - }, - - openWs: function() { - if (this.stack.length > 0) { - for (var i = 0; i < this.stack.length; i++) this.send(this.stack[i].q, this.stack[i].options); - this.stack.length = 0; - } - }, - - closeWs: function() { - this.connRunning = false; - }, - - errorWs: function() { - this.connRunning = false; - }, - - send: function(queryString, options) { - if (this.ws.readyState == 1) { - if (options.requestCallback) this.callback = options.requestCallback; - this.ws.send(queryString); - } else {//ws not connect, stack request - this.stack.push({'q': queryString, 'options': options}); - } - }, - - running: function() { - return this.connRunning; - }, - - cancel: function() { - this.ws.close(); - } - -}); - -APE.Transport.WebSocket.browserSupport = function() { - if ('WebSocket' in window || 'MozWebSocket' in window) return true; - else return 1;//No websocket support switch to XHRStreaming -} -String.implement({ - - addSlashes: function(){ - return this.replace(/("|'|\\|\0)/g, '\\$1'); - }, - - stripSlashes: function(){ - return this.replace(/\\("|'|\\|\0)/g, '$1'); - } -}); - -var B64 = new Hash({ - - $p: '=', - $tab: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - - /*** - * Base 64 encode / Base 64 decode - * Taken from orbited project - http://www.orbited.org - */ - encode: function(ba){ - // Encode a string as a base64-encoded string - var s = [], l = ba.length; - var rm = l%3; - var x = l - rm; - var t; - for (var i = 0; i < x;){ - t = ba.charCodeAt(i++)<<16|ba.charCodeAt(i++)<<8|ba.charCodeAt(i++); - s.push(B64.$tab.charAt((t>>>18)&0x3f)); - s.push(B64.$tab.charAt((t>>>12)&0x3f)); - s.push(B64.$tab.charAt((t>>>6)&0x3f)); - s.push(B64.$tab.charAt(t&0x3f)); - } - // deal with trailers, based on patch from Peter Wood. - switch (rm){ - case 2: - t = ba.charCodeAt(i++)<<16|ba.charCodeAt(i++)<<8; - s.push(B64.$tab.charAt((t>>>18)&0x3f)); - s.push(B64.$tab.charAt((t>>>12)&0x3f)); - s.push(B64.$tab.charAt((t>>>6)&0x3f)); - s.push(B64.$p); - break; - case 1: - t = ba.charCodeAt(i++)<<16; - s.push(B64.$tab.charAt((t>>>18)&0x3f)); - s.push(B64.$tab.charAt((t>>>12)&0x3f)); - s.push(B64.$p); - s.push(B64.$p); - break; - } - - return s.join(''); // string - }, - - decode: function(str){ - var s = str.split(''), out = []; - var l = s.length; - var tl = 0; - while(s[--l] == B64.$p){ ++tl; } // strip off trailing padding - for (var i = 0; i < l;){ - var t = B64.$tab.indexOf(s[i++])<<18; - if(i <= l) t|=B64.$tab.indexOf(s[i++])<<12; - if(i <= l) t|=B64.$tab.indexOf(s[i++])<<6; - if(i <= l) t|=B64.$tab.indexOf(s[i++]); - out.push(String.fromCharCode((t>>>16)&0xff)); - out.push(String.fromCharCode((t>>>8)&0xff)); - out.push(String.fromCharCode(t&0xff)); - } - // strip off trailing padding - while(tl--){ out.pop(); } - return out.join(''); // string - } -}); -try { - //Avoid showing error if window.parent.setInterval() is not working (ie : permission denied) - window.parent.setInterval(); - - //Override setInterval to be done outside the frame (there is some issue inside the frame with FF3 and WebKit) - if (!Browser.Engine.trident && !Browser.Engine.presto && !(Browser.Engine.gecko && Browser.Engine.version<=18)) { - setInterval = function(fn,time) { - return window.parent.setInterval(fn, time); - }; - - setTimeout = function(fn,time) { - return window.parent.setTimeout(fn, time); - }; - - clearInterval = function(id) { - return window.parent.clearInterval(id); - }; - - clearTimeout = function(id) { - return window.parent.clearTimeout(id); - }; - } -} catch (e) {}; -/* - http://www.JSON.org/json2.js - 2009-09-29 - - Public Domain. - - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - - See http://www.JSON.org/js.html - - This file creates a global JSON object containing two methods: stringify - and parse. - - JSON.stringify(value, replacer, space) - value any JavaScript value, usually an object or array. - - replacer an optional parameter that determines how object - values are stringified for objects. It can be a - function or an array of strings. - - space an optional parameter that specifies the indentation - of nested structures. If it is omitted, the text will - be packed without extra whitespace. If it is a number, - it will specify the number of spaces to indent at each - level. If it is a string (such as '\t' or ' '), - it contains the characters used to indent at each level. - - This method produces a JSON text from a JavaScript value. - - When an object value is found, if the object contains a toJSON - method, its toJSON method will be called and the result will be - stringified. A toJSON method does not serialize: it returns the - value represented by the name/value pair that should be serialized, - or undefined if nothing should be serialized. The toJSON method - will be passed the key associated with the value, and this will be - bound to the value - - For example, this would serialize Dates as ISO strings. - - Date.prototype.toJSON = function (key) { - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - return this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z'; - }; - - You can provide an optional replacer method. It will be passed the - key and value of each member, with this bound to the containing - object. The value that is returned from your method will be - serialized. If your method returns undefined, then the member will - be excluded from the serialization. - - If the replacer parameter is an array of strings, then it will be - used to select the members to be serialized. It filters the results - such that only members with keys listed in the replacer array are - stringified. - - Values that do not have JSON representations, such as undefined or - functions, will not be serialized. Such values in objects will be - dropped; in arrays they will be replaced with null. You can use - a replacer function to replace those with JSON values. - JSON.stringify(undefined) returns undefined. - - The optional space parameter produces a stringification of the - value that is filled with line breaks and indentation to make it - easier to read. - - If the space parameter is a non-empty string, then that string will - be used for indentation. If the space parameter is a number, then - the indentation will be that many spaces. - - Example: - - text = JSON.stringify(['e', {pluribus: 'unum'}]); - // text is '["e",{"pluribus":"unum"}]' - - - text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); - // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' - - text = JSON.stringify([new Date()], function (key, value) { - return this[key] instanceof Date ? - 'Date(' + this[key] + ')' : value; - }); - // text is '["Date(---current time---)"]' - - - JSON.parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. - - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. - - Example: - - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. - - myData = JSON.parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); - - myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { - var d; - if (typeof value === 'string' && - value.slice(0, 5) === 'Date(' && - value.slice(-1) === ')') { - d = new Date(value.slice(5, -1)); - if (d) { - return d; - } - } - return value; - }); - - - This is a reference implementation. You are free to copy, modify, or - redistribute. - - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html - - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. -*/ - -/*jslint evil: true, strict: false */ - -/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, - call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, - lastIndex, length, parse, prototype, push, replace, slice, stringify, - test, toJSON, toString, valueOf -*/ - - -// Create a JSON object only if one does not already exist. We create the -// methods in a closure to avoid creating global variables. - -if (!this.JSON) { - this.JSON = {}; -} - -(function () { - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - rep; - - - function quote(string) { - -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. - - return '"'+string+'"'; - } - - - function str(key, holder) { - -// Produce a string from holder[key]. - - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - -// If the value has a toJSON method, call it to obtain a replacement value. - - //if (value && typeof value === 'object' && - // typeof value.toJSON === 'function') { - // value = value.toJSON(key); - //} - -// If we were called with a replacer function, then call the replacer to -// obtain a replacement value. - - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - -// What happens next depends on the value's type. - - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - -// JSON numbers must be finite. Encode non-finite numbers as null. - - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - -// If the value is a boolean or null, convert it to a string. Note: -// typeof null does not produce 'null'. The case is included here in -// the remote chance that this gets fixed someday. - - return String(value); - -// If the type is 'object', we might be dealing with an object or an array or -// null. - - case 'object': - -// Due to a specification blunder in ECMAScript, typeof null is 'object', -// so watch out for that case. - - if (!value) { - return 'null'; - } - -// Make an array to hold the partial results of stringifying this object value. - - gap += indent; - partial = []; - -// Is the value an array? - - if (Object.prototype.toString.apply(value) === '[object Array]') { - -// The value is an array. Stringify every element. Use null as a placeholder -// for non-JSON values. - - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - -// Join all of the elements together, separated with commas, and wrap them in -// brackets. - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - -// If the replacer is an array, use it to select the members to be stringified. - - -// Otherwise, iterate through all of the keys in the object. - - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - -// Join all of the member texts together, separated with commas, -// and wrap them in braces. - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - -// If the JSON object does not yet have a stringify method, give it one. - - if ( - typeof JSON.stringify !== 'function' || - ( - navigator.product == 'Gecko' && - //There is a know bug with some version of FF 3.5 with the replacer parameters, this test, is to check if the browser havent a bugy version of JSON.stringify - (function() { - var tmp = JSON.stringify({x:1}, function (k,v) { - return typeof v === 'number' ? 3 : v; - }); - return tmp.x == 1 ? true : false; - }) - ) - ) { - - JSON.stringify = function (value, replacer, space) { - rep = replacer; - return str('', {'': value}); - }; - } - - -// If the JSON object does not yet have a parse method, give it one. - - if (typeof JSON.parse !== 'function') { - JSON.parse = function (text, reviver) { - -// The parse method takes a text and an optional reviver function, and returns -// a JavaScript value if the text is a valid JSON text. - - var j; - - function walk(holder, key) { - -// The walk method is used to recursively walk the resulting structure so -// that modifications can be made. - - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - } - - -// Parsing happens in four stages. In the first stage, we replace certain -// Unicode characters with escape sequences. JavaScript handles many characters -// incorrectly, either silently deleting them, or treating them as line endings. - - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + - ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - -// In the second stage, we run the text against regular expressions that look -// for non-JSON patterns. We are especially concerned with '()' and 'new' -// because they can cause invocation, and '=' because it can cause mutation. -// But just to be safe, we want to reject all unexpected forms. - -// We split the second stage into 4 regexp operations in order to work around -// crippling inefficiencies in IE's and Safari's regexp engines. First we -// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we -// replace all simple value tokens with ']' characters. Third, we delete all -// open brackets that follow a colon or comma or that begin the text. Finally, -// we look to see that the remaining characters are only whitespace or ']' or -// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. - - if (/^[\],:{}\s]*$/. -test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). -replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). -replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - -// In the third stage we use the eval function to compile the text into a -// JavaScript structure. The '{' operator is subject to a syntactic ambiguity -// in JavaScript: it can begin a block or an object literal. We wrap the text -// in parens to eliminate the ambiguity. - - j = eval('(' + text + ')'); - -// In the optional fourth stage, we recursively walk the new structure, passing -// each name/value pair to a reviver function for possible transformation. - - return typeof reviver === 'function' ? - walk({'': j}, '') : j; - } - -// If the text is not JSON parseable, then a SyntaxError is thrown. - - throw new SyntaxError('JSON.parse'); - }; - } -}()); -APE.Core = new Class({ - - Extends: APE.Core, - - initialize: function(options){ - if (this.getInstance(options.identifier).instance) options.restore = true; - - this.parent(options); - - //Init and save cookies - if (options.restore) this.init(); - - this.addEvent('uniPipeCreate', this.saveSessionPipe); - this.addEvent('uniPipeDelete', this.saveSessionPipe); - }, - - saveSessionPipe:function(){ - var uniPipe = []; - this.pipes.each(function(pipe) { - if (pipe.type == 'uni') { - uniPipe.push({'casttype':pipe.type, 'pubid':pipe.pipe.pubid, 'properties':pipe.properties}); - } - }); - - this.setSession({'uniPipe': JSON.stringify(uniPipe)}); - }, - - restoreUniPipe: function(resp){ - var pipes = JSON.parse(decodeURIComponent(resp.data.sessions.uniPipe)); - if (pipes) { - for (var i = 0; i < pipes.length; i++){ - this.newPipe('uni',{'pipe': pipes[i]}); - } - } - this.fireEvent('restoreEnd'); - this.restoring = false; - }, - - init: function(){ - this.initCookie(); - this.createCookie();//Create cookie if needed - this.saveCookie();//Save cookie - }, - - restoreCallback: function(resp){ - if (resp.raw!='ERR' && this.status == 0) { - this.fireEvent('init'); - this.fireEvent('ready'); - this.status = 1; - } else if (this.status == 0) { - this.stopPoller(); - } - }, - - connect: function(args, options){ - var cookie = this.initCookie(); - if (!cookie) {//No cookie defined start a new connection - this.addEvent('init',this.init); - this.parent(args, options); - } else {//Cookie or instance exist - if (!options) options = {}; - if (!options.request) options.request = 'stack'; - options.requestCallback = this.restoreCallback.bind(this); - - this.restoring = true; - this.fireEvent('restoreStart'); - this.startPoller(); - this.getSession('uniPipe', this.restoreUniPipe.bind(this), options); - } - }, - - /*** - * Read the cookie APE_Cookie and try to find the application identifier - * @param String identifier, can be used to force the identifier to find ortherwhise identifier defined in the options will be used - * @return Boolean false if application identifier isn't found or an object with the instance and the cookie - */ - getInstance: function(identifier) { - var tmp = Cookie.read('APE_Cookie', {'domain': document.domain}); - identifier = identifier || this.options.identifier; - if (!tmp) return false; - tmp = JSON.parse(tmp); - //Cookie is corrupted or doest not contains instance - if (!tmp || !tmp.instance) return false; - //Get the instance of ape in cookie - for(var i = 0; i < tmp.instance.length; i++){ - if(tmp.instance[i] && tmp.instance[i].identifier == identifier){ - return {instance: tmp.instance[i], cookie: tmp}; - } - } - - //No instance found, just return the cookie - return {cookie: tmp}; - }, - - removeInstance: function(identifier){ - if (!this.cookie) return; - - for(var i = 0; i < this.cookie.instance.length; i++){ - if(this.cookie.instance[i].identifier == identifier){ - this.cookie.instance.splice(i,1); - return; - } - } - }, - - /*** - * Initialize cookie and some application variable is instance is found - * set this.cookie variable - * @return boolean true if instance is found, else false - */ - initCookie: function(){ - var tmp = this.getInstance(); - if(tmp && tmp.instance){ //Cookie exist, application instance exist - this.sessid = tmp.instance.sessid; - this.pubid = tmp.instance.pubid; - tmp.cookie.frequency = tmp.cookie.frequency.toInt() + 1; - this.cookie = tmp.cookie; - return true; - } else if (tmp.cookie) { //Cookie exist, no application instance - this.createInstance(tmp.cookie); - tmp.cookie.frequency = tmp.cookie.frequency.toInt() + 1; - this.cookie = tmp.cookie; - return false; - } else { //No cookie - this.cookie = null; - return false; - } - }, - - /*** - * Create a cookie instance (add to the instance array of the cookie the current application) - * @param object APE_Cookie - */ - createInstance: function(cookie) { - cookie.instance.push({ - identifier: this.options.identifier, - pubid: this.getPubid(), - sessid: this.getSessid() - }); - }, - - /*** - * Create ape cookie if needed (but do not write it) - */ - createCookie: function(){ - if(!this.cookie){ - //No Cookie or no ape instance in cookie, lets create the cookie - var tmp = { - frequency: 1, - instance: [] - }; - this.createInstance(tmp); - this.cookie = tmp; - } - }, - - saveCookie: function(){ - //Save cookie on the parent window (this is usefull with JSONP as domain in the iframe is different than the domain in the parent window) - Cookie.write('APE_Cookie', JSON.stringify(this.cookie), {'domain': document.domain}); - }, - - clearSession: function(){ - this.parent(); - this.removeInstance(this.options.identifier); - this.saveCookie(); - }, - - removeCookie: function(){ - Cookie.dispose('APE_Cookie', {domain:this.options.domain}); - } -}); diff --git a/Build/yuiCompressor/apeCoreSession.js b/Build/yuiCompressor/apeCoreSession.js deleted file mode 100755 index 1134fcf..0000000 --- a/Build/yuiCompressor/apeCoreSession.js +++ /dev/null @@ -1 +0,0 @@ -var MooTools={version:"1.2.5",build:"008d8f0f2fcc2044e54fdd3635341aaab274e757"};var Native=function(l){l=l||{};var a=l.name;var j=l.legacy;var b=l.protect;var c=l.implement;var i=l.generics;var g=l.initialize;var h=l.afterImplement||function(){};var d=g||j;i=i!==false;d.constructor=Native;d.$family={name:"native"};if(j&&g){d.prototype=j.prototype}d.prototype.constructor=d;if(a){var f=a.toLowerCase();d.prototype.$family={name:f};Native.typize(d,f)}var k=function(o,m,p,n){if(!b||n||!o.prototype[m]){o.prototype[m]=p}if(i){Native.genericize(o,m,b)}h.call(o,m,p);return o};d.alias=function(o,m,q){if(typeof o=="string"){var p=this.prototype[o];if((o=p)){return k(this,m,o,q)}}for(var n in o){this.alias(n,o[n],m)}return this};d.implement=function(n,m,q){if(typeof n=="string"){return k(this,n,m,q)}for(var o in n){k(this,o,n[o],m)}return this};if(c){d.implement(c)}return d};Native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=Array.prototype.slice.call(arguments);return b.prototype[c].apply(d.shift(),d)}}};Native.implement=function(d,c){for(var b=0,a=d.length;b-1:this.indexOf(a)>-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s+/g," ").trim()},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase())})},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase()})},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(a){return parseInt(this,a||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(b){var a=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(a)?a.slice(1).hexToRgb(b):null},rgbToHex:function(b){var a=this.match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null},stripScripts:function(b){var a="";var c=this.replace(/]*>([\s\S]*?)<\/script>/gi,function(){a+=arguments[1]+"\n";return""});if(b===true){$exec(a)}else{if($type(b)=="function"){b(a,c)}}return c},substitute:function(a,b){return this.replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1)}return(a[c]!=undefined)?a[c]:""})}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){for(var a in this){if(this.hasOwnProperty(a)&&this[a]===b){return a}}return null},hasValue:function(a){return(Hash.keyOf(this,a)!==null)},extend:function(a){Hash.each(a||{},function(c,b){Hash.set(this,b,c)},this);return this},combine:function(a){Hash.each(a||{},function(c,b){Hash.include(this,b,c)},this);return this},erase:function(a){if(this.hasOwnProperty(a)){delete this[a]}return this},get:function(a){return(this.hasOwnProperty(a))?this[a]:null},set:function(a,b){if(!this[a]||this.hasOwnProperty(a)){this[a]=b}return this},empty:function(){Hash.each(this,function(b,a){delete this[a]},this);return this},include:function(a,b){if(this[a]==undefined){this[a]=b}return this},map:function(b,c){var a=new Hash;Hash.each(this,function(f,d){a.set(d,b.call(c,f,d,this))},this);return a},filter:function(b,c){var a=new Hash;Hash.each(this,function(f,d){if(b.call(c,f,d,this)){a.set(d,f)}},this);return a},every:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&!b.call(c,this[a],a)){return false}}return true},some:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&b.call(c,this[a],a)){return true}}return false},getKeys:function(){var a=[];Hash.each(this,function(c,b){a.push(b)});return a},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b)});return a},toQueryString:function(a){var b=[];Hash.each(this,function(g,f){if(a){f=a+"["+f+"]"}var d;switch($type(g)){case"object":d=Hash.toQueryString(g,f);break;case"array":var c={};g.each(function(j,h){c[h]=j});d=Hash.toQueryString(c,f);break;default:d=f+"="+encodeURIComponent(g)}if(g!=undefined){b.push(d)}});return b.join("&")}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});var Event=new Native({name:"Event",initialize:function(a,g){g=g||window;var l=g.document;a=a||g.event;if(a.$extended){return a}this.$extended=true;var k=a.type;var h=a.target||a.srcElement;while(h&&h.nodeType==3){h=h.parentNode}if(k.test(/key/)){var b=a.which||a.keyCode;var n=Event.Keys.keyOf(b);if(k=="keydown"){var d=b-111;if(d>0&&d<13){n="f"+d}}n=n||String.fromCharCode(b).toLowerCase()}else{if(k.match(/(click|mouse|menu)/i)){l=(!l.compatMode||l.compatMode=="CSS1Compat")?l.html:l.body;var j={x:a.pageX||a.clientX+l.scrollLeft,y:a.pageY||a.clientY+l.scrollTop};var c={x:(a.pageX)?a.pageX-g.pageXOffset:a.clientX,y:(a.pageY)?a.pageY-g.pageYOffset:a.clientY};if(k.match(/DOMMouseScroll|mousewheel/)){var i=(a.wheelDelta)?a.wheelDelta/120:-(a.detail||0)/3}var f=(a.which==3)||(a.button==2);var m=null;if(k.match(/over|out/)){switch(k){case"mouseover":m=a.relatedTarget||a.fromElement;break;case"mouseout":m=a.relatedTarget||a.toElement}if(!(function(){while(m&&m.nodeType==3){m=m.parentNode}return true}).create({attempt:Browser.Engine.gecko})()){m=false}}}}return $extend(this,{event:a,type:k,page:j,client:c,rightClick:f,wheel:i,relatedTarget:m,target:h,code:b,key:n,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.metaKey})}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this}});function Class(b){if(b instanceof Function){b={initialize:b}}var a=function(){Object.reset(this);if(a._prototyping){return this}this._current=$empty;var c=(this.initialize)?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c}.extend(this);a.implement(b);a.constructor=Class;a.prototype.constructor=a;return a}Function.prototype.protect=function(){this._protected=true;return this};Object.reset=function(a,c){if(c==null){for(var f in a){Object.reset(a,f)}return a}delete a[c];switch($type(a[c])){case"object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=Object.reset(b);break;case"array":a[c]=$unlink(a[c]);break}return a};new Native({name:"Class",initialize:Class}).extend({instantiate:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a},wrap:function(a,b,c){if(c._origin){c=c._origin}return function(){if(c._protected&&this._current==null){throw new Error('The method "'+b+'" cannot be called.')}var f=this.caller,g=this._current;this.caller=g;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=g;this.caller=f;return d}.extend({_owner:a,_origin:c,_name:b})}});Class.implement({implement:function(a,d){if($type(a)=="object"){for(var f in a){this.implement(f,a[f])}return this}var g=Class.Mutators[a];if(g){d=g.call(this,d);if(d==null){return this}}var c=this.prototype;switch($type(d)){case"function":if(d._hidden){return this}c[a]=Class.wrap(this,a,d);break;case"object":var b=c[a];if($type(b)=="object"){$mixin(b,d)}else{c[a]=$unlink(d)}break;case"array":c[a]=$unlink(d);break;default:c[a]=d}return this}});Class.Mutators={Extends:function(a){this.parent=a;this.prototype=Class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c){throw new Error('The method "'+b+'" has no parent.')}return c.apply(this,arguments)}.protect())},Implements:function(a){$splat(a).each(function(b){if(b instanceof Function){b=Class.instantiate(b)}this.implement(b)},this)}};var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false},clearChain:function(){this.$chain.empty();return this}});var Events=new Class({$events:{},addEvent:function(c,b,a){c=Events.removeOn(c);if(b!=$empty){this.$events[c]=this.$events[c]||[];this.$events[c].include(b);if(a){b.internal=true}}return this},addEvents:function(a){for(var b in a){this.addEvent(b,a[b])}return this},fireEvent:function(c,b,a){c=Events.removeOn(c);if(!this.$events||!this.$events[c]){return this}this.$events[c].each(function(d){d.create({bind:this,delay:a,"arguments":b})()},this);return this},removeEvent:function(b,a){b=Events.removeOn(b);if(!this.$events[b]){return this}if(!a.internal){this.$events[b].erase(a)}return this},removeEvents:function(c){var d;if($type(c)=="object"){for(d in c){this.removeEvent(d,c[d])}return this}if(c){c=Events.removeOn(c)}for(d in this.$events){if(c&&c!=d){continue}var b=this.$events[d];for(var a=b.length;a--;a){this.removeEvent(d,b[a])}}return this}});Events.removeOn=function(a){return a.replace(/^on([A-Z])/,function(b,c){return c.toLowerCase()})};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this}for(var a in this.options){if($type(this.options[a])!="function"||!(/^on[A-Z]/).test(a)){continue}this.addEvent(a,this.options[a]);delete this.options[a]}return this}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(b,a){this.key=b;this.setOptions(a)},write:function(b){b=encodeURIComponent(b);if(this.options.domain){b+="; domain="+this.options.domain}if(this.options.path){b+="; path="+this.options.path}if(this.options.duration){var a=new Date();a.setTime(a.getTime()+this.options.duration*24*60*60*1000);b+="; expires="+a.toGMTString()}if(this.options.secure){b+="; secure"}this.options.document.cookie=this.key+"="+b;return this},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return(a)?decodeURIComponent(a[1]):null},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this}});Cookie.write=function(b,c,a){return new Cookie(b,a).write(c)};Cookie.read=function(a){return new Cookie(a).read()};Cookie.dispose=function(b,a){return new Cookie(b,a).dispose()};var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,noCache:false},initialize:function(a){this.xhr=new Browser.Request();this.setOptions(a);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers)},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return}this.running=false;this.status=0;$try(function(){this.status=this.xhr.status}.bind(this));this.xhr.onreadystatechange=$empty;if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml)}else{this.response={text:null,xml:null};this.failure()}},isSuccess:function(){return((this.status>=200)&&(this.status<300))},processScripts:function(a){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(a)}return a.stripScripts(this.options.evalScripts)},success:function(b,a){this.onSuccess(this.processScripts(b),a)},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain()},failure:function(){this.onFailure()},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr)},setHeader:function(a,b){this.headers.set(a,b);return this},getHeader:function(a){return $try(function(){return this.xhr.getResponseHeader(a)}.bind(this))},check:function(){if(!this.running){return true}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false}return false},send:function(l){if(!this.check(l)){return this}this.running=true;var j=$type(l);if(j=="string"||j=="element"){l={data:l}}var d=this.options;l=$extend({data:d.data,url:d.url,method:d.method},l);var h=l.data,b=String(l.url),a=l.method.toLowerCase();switch($type(h)){case"element":h=document.id(h).toQueryString();break;case"object":case"hash":h=Hash.toQueryString(h)}if(this.options.format){var k="format="+this.options.format;h=(h)?k+"&"+h:k}if(this.options.emulation&&!["get","post"].contains(a)){var i="_method="+a;h=(h)?i+"&"+h:i;a="post"}if(this.options.urlEncoded&&a=="post"){var c=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+c)}if(this.options.noCache){var g="noCache="+new Date().getTime();h=(h)?g+"&"+h:g}var f=b.lastIndexOf("/");if(f>-1&&(f=b.indexOf("#"))>-1){b=b.substr(0,f)}if(h&&a=="get"){b=b+(b.contains("?")?"&":"?")+h;h=null}this.xhr.open(a.toUpperCase(),b,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(n,m){try{this.xhr.setRequestHeader(m,n)}catch(o){this.fireEvent("exception",[m,n])}},this);this.fireEvent("request");this.xhr.send(h);if(!this.options.async){this.onStateChange()}return this},cancel:function(){if(!this.running){return this}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent("cancel");return this}});(function(){var a={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(b){a[b]=function(){var c=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(c,{method:b}))}});Request.implement(a)})();var APE={version:"1.1",Request:{},Transport:{}};APE.Events=new Class({Extends:Events,onRaw:function(c,b,a){return this.addEvent("raw_"+c.toLowerCase(),b,a)},onCmd:function(c,b,a){return this.addEvent("cmd_"+c.toLowerCase(),b,a)},onError:function(c,b,a){return this.addEvent("error_"+c,b,a)},removeEvent:function(b,a){return Events.prototype.removeEvent.run([b,this.$originalEvents[b][a]],this)}});APE.Core=new Class({Implements:[APE.Events,Options],$originalEvents:{},options:{server:"",pollTime:25000,identifier:"ape",transport:0,frequency:0,cycledStackTime:350,secure:false},initialize:function(a){window.Ape=this;this.setOptions(a);this.selectTransport();this.request=new APE.Request(this);this.pipes=new $H;this.users=new $H;this.sessid=null;this.pubid=null;this.serverUri=(this.options.secure?"https":"http")+"://"+this.options.frequency+"."+this.options.server+"/"+this.options.transport+"/?",this.timer=null;this.status=0;this.failCounter=0;this.pollerObserver=null;this.requestDisabled=false;this.onRaw("login",this.rawLogin);this.onRaw("err",this.rawErr);this.onRaw("ident",this.rawIdent);this.onRaw("quit",this.rawQuit);this.onError("003",this.clearSession);this.onError("004",this.clearSession);if(a.init){a.init.apply(null,[this])}if(a.complete){a.complete.apply(null,[this])}this.fireEvent("load",this);if(this.options.connectOptions){this.start(this.options.connectOptions)}},selectTransport:function(){var a=[APE.Transport.longPolling,APE.Transport.XHRStreaming,APE.Transport.JSONP,null,null,null,APE.Transport.WebSocket];var c=this.options.transport;var b;while(b!==true){b=a[c].browserSupport();if(b===true){this.options.transport=c;this.transport=new a[c](this)}else{c=b}}},poller:function(){if(this.pollerActive){this.check()}},startPoller:function(){this.pollerActive=true},stopPoller:function(){$clear(this.pollerObserver);this.pollerActive=false},stopRequest:function(){this.cancelRequest();if(this.transport.streamRequest){this.transport.streamRequest.cancel()}this.requestDisabled=true},parseParam:function(a){return($type(a)=="object")?Hash.getValues(a):$splat(a)},cancelRequest:function(){this.transport.cancel()},requestFail:function(d,c){var b=false;if(c.request&&!c.request.dataSent){b=true}if(this.status>0){this.status=d;this.cancelRequest();this.stopPoller();this.fireEvent("apeDisconnect")}if(this.failCounter<6){this.failCounter++}this.cancelRequest();var a=(this.failCounter*$random(300,1000));this.check.delay(a,this)},parseResponse:function(f,g){if(f){if(this.status<0){this.failCounter=0;this.status=1;this.startPoller();this.fireEvent("apeReconnect")}}var b=false;var a;if(f){f=JSON.parse(f);if(!f){this.check();return}for(var d=0;d0)?true:false;a[3]=true;this.send.run(a,this)}}});APE.Request.Stack=new Class({initialize:function(a){this.ape=a;this.stack=[]},add:function(b,c,a){this.stack.push({cmd:b,params:c,options:a})},send:function(){this.ape.request.send(this.stack);this.stack=[]}});APE.Request.CycledStack=new Class({initialize:function(a){this.ape=a;this.stack=[];this.reajustTime=false;this.timer=this.send.periodical(this.ape.options.cycledStackTime,this)},add:function(b,c,a){this.stack.push({cmd:b,params:c,sessid:a})},setTime:function(b,a){if(a){this.send();$clear(this.timer);this.timer=this.send.periodical(b,this);this.reajustTime=false}else{this.reajustTime=b}},send:function(){if(this.stack.length>0){this.ape.request.send(this.stack);this.stack=[];if(this.reajustTime){this.setTime(this.reajustTime,true)}}}});Request=new Class({Extends:Request,send:function(a){if(Browser.Engine.webkit){this.xhr.onreadystatechange=this.onStateChange.bind(this)}return this.parent(a)},onStateChange:function(){if(this.xhr.readyState==1){this.dataSent=true}this.parent()}});APE.Transport.longPolling=new Class({initialize:function(a){this.ape=a;this.requestFailObserver=[]},send:function(c,a){var b=new Request({url:this.ape.serverUri,onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(d){$clear(this.requestFailObserver.shift());this.ape.parseResponse(d,a.requestCallback)}.bind(this)}).send(c);b.id=$time();this.request=b;this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+10000,this.ape,[-1,b]));return b},running:function(){return this.request?this.request.running:false},cancel:function(){if(this.request){this.request.cancel()}$clear(this.requestFailObserver.shift())}});APE.Transport.longPolling.browserSupport=function(){return Browser.Features.xhr?true:2};APE.Request.SSE=new Class({SSESupport:((typeof window.addEventStream)=="function"),initSSE:function(d,a,c){var b=document.createElement("div");document.body.appendChild(b);b.innerHTML='';this.eventSource=document.getElementById("APE_SSE");this.eventSource.addEventListener("ape-data",function(f){c.run(f.data)},false)}});Request.XHRStreaming=new Class({Extends:Request,lastTextLength:0,read:0,send:function(a){if(Browser.Engine.webkit){this.xhr.onreadystatechange=this.onStateChange.bind(this)}return this.parent(a)},onStateChange:function(){if(this.xhr.readyState==1){this.dataSent=true}else{if(this.xhr.readyState==3){this.progress(this.xhr.responseText,this.xhr.responseXML)}}this.parent()},onProgress:function(){this.fireEvent("progress",arguments)},progress:function(c,a){var b=c.length;this.read+=b;c=c.substr(this.lastTextLength);this.lastTextLength=b;this.onProgress(this.processScripts(c),a)}});APE.Transport.XHRStreaming=new Class({maxRequestSize:100000,Implements:APE.Request.SSE,initialize:function(a){this.ape=a;this.requestFailObserver=[];if(this.SSESupport){this.ape.options.transport=4}this.streamInfo={timeoutObserver:null,cleanClose:false,forceClose:false,callback:null}},send:function(c,a){if(this.SSESupport&&!this.eventSource){this.initSSE(c,a,this.readSSE.bind(this));if(a.requestCallback){this.streamInfo.callback=a.requestCallback}}else{if((!this.streamRequest||!this.streamRequest.running)&&!this.eventSource){this.buffer="";this.request=this.doRequest(c,a);if(a.requestCallback){this.streamInfo.callback=a.requestCallback}}else{var b=new Request({url:this.ape.serverUri,onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(d){$clear(this.requestFailObserver.shift());this.request.dataSent=true;this.ape.parseResponse(d,a.callback)}.bind(this)}).send(c);this.request=b;this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+10000,this.ape,[1,b]))}return this.request}},doRequest:function(c,a){this.streamInfo.forceClose=false;var b=new Request.XHRStreaming({url:this.ape.serverUri,onProgress:this.readFragment.bindWithEvent(this),onFailure:this.ape.requestFail.bind(this.ape,[-2,this]),onComplete:function(d){$clear(this.streamInfo.timeoutObserver);if(this.ape.status>0){if(this.streamInfo.cleanClose){this.ape.check()}else{this.newStream()}this.streamInfo.cleanClose=false}}.bind(this)}).send(c);b.id=$time();this.streamRequest=b;return b},readSSE:function(a){this.ape.parseResponse(a,this.streamInfo.callback);this.streamInfo.callback=null},readFragment:function(d){this.streamInfo.canClose=false;if(d==""){this.streamInfo.canClose=true;this.streamInfo.cleanClose=true;this.ape.parseResponse(d,this.streamInfo.callback);this.streamInfo.callback=null}else{d=this.buffer+d;var c=d.split("\n\n");var b=c.length;if(c.length>1){this.buffer="";for(var a=0;a=this.maxRequestSize&&this.streamInfo.canClose)},newStream:function(){$clear(this.streamInfo.timeoutObserver);this.streamRequest.cancel();this.ape.check()},cancel:function(){if(this.request){this.request.cancel()}$clear(this.streamInfo.timeoutObserver);$clear(this.requestFailObserver.shift())}});APE.Transport.XHRStreaming.browserSupport=function(){if(Browser.Features.xhr&&(Browser.Engine.webkit||Browser.Engine.gecko)){return true}else{if(Browser.Features.xhr){return 0}else{return 2}}};APE.Transport.JSONP=new Class({Implements:APE.Transport.SSE,initialize:function(a){this.ape=a;this.requestFailObserver=[];this.requests=[];window.parent.onkeyup=function(b){if(b.keyCode==27){this.cancel();if(this.ape.status>0){this.ape.check()}}}.bind(this)},send:function(c,a){this.callback=a.requestCallback;var b=document.createElement("script");b.src=this.ape.serverUri+c;document.head.appendChild(b);this.requests.push(b);this.requestFailObserver.push(this.ape.requestFail.delay(this.ape.options.pollTime+10000,this.ape,[-1,b]));if(Browser.Engine.gecko){(function(){var d=document.createElement("iframe");document.body.appendChild(d);document.body.removeChild(d)}).delay(200)}},clearRequest:function(a){a.parentNode.removeChild(a);if(a.clearAttributes){a.clearAttributes()}else{for(var b in a){delete a[b]}}$clear(this.requestFailObserver.shift())},readSSE:function(a){this.ape.parseResponse(a,this.callback);this.callback=null},read:function(a){$clear(this.requestFailObserver.shift());this.clearRequest(this.requests.shift());this.ape.parseResponse(a,this.callback);this.callback=null},cancel:function(){if(this.requests.length>0){this.clearRequest(this.requests.shift())}},running:function(){return this.requests.length>0?true:false}});APE.Transport.JSONP.browserSupport=function(){return true};APE.Transport.WebSocket=new Class({stack:[],connRunning:false,initialize:function(a){this.ape=a;this.initWs()},initWs:function(){var a=(this.ape.options.secure?"wss":"ws")+"://"+this.ape.options.frequency+"."+this.ape.options.server+"/"+this.ape.options.transport+"/";this.ws=("MozWebSocket" in window?new MozWebSocket(a):new WebSocket(a));this.connRunning=true;this.ws.onmessage=this.readWs.bind(this);this.ws.onopen=this.openWs.bind(this);this.ws.onclose=this.closeWs.bind(this);this.ws.onerror=this.errorWs.bind(this)},readWs:function(a){this.ape.parseResponse(a.data,this.callback);this.callback=null},openWs:function(){if(this.stack.length>0){for(var a=0;a>>18)&63));f.push(B64.$tab.charAt((d>>>12)&63));f.push(B64.$tab.charAt((d>>>6)&63));f.push(B64.$tab.charAt(d&63))}switch(g){case 2:d=h.charCodeAt(c++)<<16|h.charCodeAt(c++)<<8;f.push(B64.$tab.charAt((d>>>18)&63));f.push(B64.$tab.charAt((d>>>12)&63));f.push(B64.$tab.charAt((d>>>6)&63));f.push(B64.$p);break;case 1:d=h.charCodeAt(c++)<<16;f.push(B64.$tab.charAt((d>>>18)&63));f.push(B64.$tab.charAt((d>>>12)&63));f.push(B64.$p);f.push(B64.$p);break}return f.join("")},decode:function(h){var g=h.split(""),c=[];var a=g.length;var b=0;while(g[--a]==B64.$p){++b}for(var f=0;f>>16)&255));c.push(String.fromCharCode((d>>>8)&255));c.push(String.fromCharCode(d&255))}while(b--){c.pop()}return c.join("")}});try{window.parent.setInterval();if(!Browser.Engine.trident&&!Browser.Engine.presto&&!(Browser.Engine.gecko&&Browser.Engine.version<=18)){setInterval=function(a,b){return window.parent.setInterval(a,b)};setTimeout=function(a,b){return window.parent.setTimeout(a,b)};clearInterval=function(a){return window.parent.clearInterval(a)};clearTimeout=function(a){return window.parent.clearTimeout(a)}}}catch(e){}if(!this.JSON){this.JSON={}}(function(){var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,rep;function quote(string){return'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i - - - + + +
- - + + + - - + + + diff --git a/Demos/Move/mootools-core.js b/Demos/Move/mootools-core.js new file mode 100644 index 0000000..384c393 --- /dev/null +++ b/Demos/Move/mootools-core.js @@ -0,0 +1,4288 @@ +/* +--- + +name: Core + +description: The core of MooTools, contains all the base functions and the Native and Hash implementations. Required by all the other scripts. + +license: MIT-style license. + +copyright: Copyright (c) 2006-2008 [Valerio Proietti](http://mad4milk.net/). + +authors: The MooTools production team (http://mootools.net/developers/) + +inspiration: + - Class implementation inspired by [Base.js](http://dean.edwards.name/weblog/2006/03/base/) Copyright (c) 2006 Dean Edwards, [GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php) + - Some functionality inspired by [Prototype.js](http://prototypejs.org) Copyright (c) 2005-2007 Sam Stephenson, [MIT License](http://opensource.org/licenses/mit-license.php) + +provides: [MooTools, Native, Hash.base, Array.each, $util] + +... +*/ + +var MooTools = { + 'version': '1.2.5', + 'build': '008d8f0f2fcc2044e54fdd3635341aaab274e757' +}; + +var Native = function(options){ + options = options || {}; + var name = options.name; + var legacy = options.legacy; + var protect = options.protect; + var methods = options.implement; + var generics = options.generics; + var initialize = options.initialize; + var afterImplement = options.afterImplement || function(){}; + var object = initialize || legacy; + generics = generics !== false; + + object.constructor = Native; + object.$family = {name: 'native'}; + if (legacy && initialize) object.prototype = legacy.prototype; + object.prototype.constructor = object; + + if (name){ + var family = name.toLowerCase(); + object.prototype.$family = {name: family}; + Native.typize(object, family); + } + + var add = function(obj, name, method, force){ + if (!protect || force || !obj.prototype[name]) obj.prototype[name] = method; + if (generics) Native.genericize(obj, name, protect); + afterImplement.call(obj, name, method); + return obj; + }; + + object.alias = function(a1, a2, a3){ + if (typeof a1 == 'string'){ + var pa1 = this.prototype[a1]; + if ((a1 = pa1)) return add(this, a2, a1, a3); + } + for (var a in a1) this.alias(a, a1[a], a2); + return this; + }; + + object.implement = function(a1, a2, a3){ + if (typeof a1 == 'string') return add(this, a1, a2, a3); + for (var p in a1) add(this, p, a1[p], a2); + return this; + }; + + if (methods) object.implement(methods); + + return object; +}; + +Native.genericize = function(object, property, check){ + if ((!check || !object[property]) && typeof object.prototype[property] == 'function') object[property] = function(){ + var args = Array.prototype.slice.call(arguments); + return object.prototype[property].apply(args.shift(), args); + }; +}; + +Native.implement = function(objects, properties){ + for (var i = 0, l = objects.length; i < l; i++) objects[i].implement(properties); +}; + +Native.typize = function(object, family){ + if (!object.type) object.type = function(item){ + return ($type(item) === family); + }; +}; + +(function(){ + var natives = {'Array': Array, 'Date': Date, 'Function': Function, 'Number': Number, 'RegExp': RegExp, 'String': String}; + for (var n in natives) new Native({name: n, initialize: natives[n], protect: true}); + + var types = {'boolean': Boolean, 'native': Native, 'object': Object}; + for (var t in types) Native.typize(types[t], t); + + var generics = { + 'Array': ["concat", "indexOf", "join", "lastIndexOf", "pop", "push", "reverse", "shift", "slice", "sort", "splice", "toString", "unshift", "valueOf"], + 'String': ["charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "match", "replace", "search", "slice", "split", "substr", "substring", "toLowerCase", "toUpperCase", "valueOf"] + }; + for (var g in generics){ + for (var i = generics[g].length; i--;) Native.genericize(natives[g], generics[g][i], true); + } +})(); + +var Hash = new Native({ + + name: 'Hash', + + initialize: function(object){ + if ($type(object) == 'hash') object = $unlink(object.getClean()); + for (var key in object) this[key] = object[key]; + return this; + } + +}); + +Hash.implement({ + + forEach: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key)) fn.call(bind, this[key], key, this); + } + }, + + getClean: function(){ + var clean = {}; + for (var key in this){ + if (this.hasOwnProperty(key)) clean[key] = this[key]; + } + return clean; + }, + + getLength: function(){ + var length = 0; + for (var key in this){ + if (this.hasOwnProperty(key)) length++; + } + return length; + } + +}); + +Hash.alias('forEach', 'each'); + +Array.implement({ + + forEach: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++) fn.call(bind, this[i], i, this); + } + +}); + +Array.alias('forEach', 'each'); + +function $A(iterable){ + if (iterable.item){ + var l = iterable.length, array = new Array(l); + while (l--) array[l] = iterable[l]; + return array; + } + return Array.prototype.slice.call(iterable); +}; + +function $arguments(i){ + return function(){ + return arguments[i]; + }; +}; + +function $chk(obj){ + return !!(obj || obj === 0); +}; + +function $clear(timer){ + clearTimeout(timer); + clearInterval(timer); + return null; +}; + +function $defined(obj){ + return (obj != undefined); +}; + +function $each(iterable, fn, bind){ + var type = $type(iterable); + ((type == 'arguments' || type == 'collection' || type == 'array') ? Array : Hash).each(iterable, fn, bind); +}; + +function $empty(){}; + +function $extend(original, extended){ + for (var key in (extended || {})) original[key] = extended[key]; + return original; +}; + +function $H(object){ + return new Hash(object); +}; + +function $lambda(value){ + return ($type(value) == 'function') ? value : function(){ + return value; + }; +}; + +function $merge(){ + var args = Array.slice(arguments); + args.unshift({}); + return $mixin.apply(null, args); +}; + +function $mixin(mix){ + for (var i = 1, l = arguments.length; i < l; i++){ + var object = arguments[i]; + if ($type(object) != 'object') continue; + for (var key in object){ + var op = object[key], mp = mix[key]; + mix[key] = (mp && $type(op) == 'object' && $type(mp) == 'object') ? $mixin(mp, op) : $unlink(op); + } + } + return mix; +}; + +function $pick(){ + for (var i = 0, l = arguments.length; i < l; i++){ + if (arguments[i] != undefined) return arguments[i]; + } + return null; +}; + +function $random(min, max){ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +function $splat(obj){ + var type = $type(obj); + return (type) ? ((type != 'array' && type != 'arguments') ? [obj] : obj) : []; +}; + +var $time = Date.now || function(){ + return +new Date; +}; + +function $try(){ + for (var i = 0, l = arguments.length; i < l; i++){ + try { + return arguments[i](); + } catch(e){} + } + return null; +}; + +function $type(obj){ + if (obj == undefined) return false; + if (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name; + if (obj.nodeName){ + switch (obj.nodeType){ + case 1: return 'element'; + case 3: return (/\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace'; + } + } else if (typeof obj.length == 'number'){ + if (obj.callee) return 'arguments'; + else if (obj.item) return 'collection'; + } + return typeof obj; +}; + +function $unlink(object){ + var unlinked; + switch ($type(object)){ + case 'object': + unlinked = {}; + for (var p in object) unlinked[p] = $unlink(object[p]); + break; + case 'hash': + unlinked = new Hash(object); + break; + case 'array': + unlinked = []; + for (var i = 0, l = object.length; i < l; i++) unlinked[i] = $unlink(object[i]); + break; + default: return object; + } + return unlinked; +}; + + +/* +--- + +name: Array + +description: Contains Array Prototypes like each, contains, and erase. + +license: MIT-style license. + +requires: [$util, Array.each] + +provides: Array + +... +*/ + +Array.implement({ + + every: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++){ + if (!fn.call(bind, this[i], i, this)) return false; + } + return true; + }, + + filter: function(fn, bind){ + var results = []; + for (var i = 0, l = this.length; i < l; i++){ + if (fn.call(bind, this[i], i, this)) results.push(this[i]); + } + return results; + }, + + clean: function(){ + return this.filter($defined); + }, + + indexOf: function(item, from){ + var len = this.length; + for (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){ + if (this[i] === item) return i; + } + return -1; + }, + + map: function(fn, bind){ + var results = []; + for (var i = 0, l = this.length; i < l; i++) results[i] = fn.call(bind, this[i], i, this); + return results; + }, + + some: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++){ + if (fn.call(bind, this[i], i, this)) return true; + } + return false; + }, + + associate: function(keys){ + var obj = {}, length = Math.min(this.length, keys.length); + for (var i = 0; i < length; i++) obj[keys[i]] = this[i]; + return obj; + }, + + link: function(object){ + var result = {}; + for (var i = 0, l = this.length; i < l; i++){ + for (var key in object){ + if (object[key](this[i])){ + result[key] = this[i]; + delete object[key]; + break; + } + } + } + return result; + }, + + contains: function(item, from){ + return this.indexOf(item, from) != -1; + }, + + extend: function(array){ + for (var i = 0, j = array.length; i < j; i++) this.push(array[i]); + return this; + }, + + getLast: function(){ + return (this.length) ? this[this.length - 1] : null; + }, + + getRandom: function(){ + return (this.length) ? this[$random(0, this.length - 1)] : null; + }, + + include: function(item){ + if (!this.contains(item)) this.push(item); + return this; + }, + + combine: function(array){ + for (var i = 0, l = array.length; i < l; i++) this.include(array[i]); + return this; + }, + + erase: function(item){ + for (var i = this.length; i--; i){ + if (this[i] === item) this.splice(i, 1); + } + return this; + }, + + empty: function(){ + this.length = 0; + return this; + }, + + flatten: function(){ + var array = []; + for (var i = 0, l = this.length; i < l; i++){ + var type = $type(this[i]); + if (!type) continue; + array = array.concat((type == 'array' || type == 'collection' || type == 'arguments') ? Array.flatten(this[i]) : this[i]); + } + return array; + }, + + hexToRgb: function(array){ + if (this.length != 3) return null; + var rgb = this.map(function(value){ + if (value.length == 1) value += value; + return value.toInt(16); + }); + return (array) ? rgb : 'rgb(' + rgb + ')'; + }, + + rgbToHex: function(array){ + if (this.length < 3) return null; + if (this.length == 4 && this[3] == 0 && !array) return 'transparent'; + var hex = []; + for (var i = 0; i < 3; i++){ + var bit = (this[i] - 0).toString(16); + hex.push((bit.length == 1) ? '0' + bit : bit); + } + return (array) ? hex : '#' + hex.join(''); + } + +}); + + +/* +--- + +name: String + +description: Contains String Prototypes like camelCase, capitalize, test, and toInt. + +license: MIT-style license. + +requires: Native + +provides: String + +... +*/ + +String.implement({ + + test: function(regex, params){ + return ((typeof regex == 'string') ? new RegExp(regex, params) : regex).test(this); + }, + + contains: function(string, separator){ + return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1; + }, + + trim: function(){ + return this.replace(/^\s+|\s+$/g, ''); + }, + + clean: function(){ + return this.replace(/\s+/g, ' ').trim(); + }, + + camelCase: function(){ + return this.replace(/-\D/g, function(match){ + return match.charAt(1).toUpperCase(); + }); + }, + + hyphenate: function(){ + return this.replace(/[A-Z]/g, function(match){ + return ('-' + match.charAt(0).toLowerCase()); + }); + }, + + capitalize: function(){ + return this.replace(/\b[a-z]/g, function(match){ + return match.toUpperCase(); + }); + }, + + escapeRegExp: function(){ + return this.replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1'); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + hexToRgb: function(array){ + var hex = this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); + return (hex) ? hex.slice(1).hexToRgb(array) : null; + }, + + rgbToHex: function(array){ + var rgb = this.match(/\d{1,3}/g); + return (rgb) ? rgb.rgbToHex(array) : null; + }, + + stripScripts: function(option){ + var scripts = ''; + var text = this.replace(/]*>([\s\S]*?)<\/script>/gi, function(){ + scripts += arguments[1] + '\n'; + return ''; + }); + if (option === true) $exec(scripts); + else if ($type(option) == 'function') option(scripts, text); + return text; + }, + + substitute: function(object, regexp){ + return this.replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){ + if (match.charAt(0) == '\\') return match.slice(1); + return (object[name] != undefined) ? object[name] : ''; + }); + } + +}); + + +/* +--- + +name: Function + +description: Contains Function Prototypes like create, bind, pass, and delay. + +license: MIT-style license. + +requires: [Native, $util] + +provides: Function + +... +*/ + +try { + delete Function.prototype.bind; +} catch(e){} + +Function.implement({ + + extend: function(properties){ + for (var property in properties) this[property] = properties[property]; + return this; + }, + + create: function(options){ + var self = this; + options = options || {}; + return function(event){ + var args = options.arguments; + args = (args != undefined) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0); + if (options.event) args = [event || window.event].extend(args); + var returns = function(){ + return self.apply(options.bind || null, args); + }; + if (options.delay) return setTimeout(returns, options.delay); + if (options.periodical) return setInterval(returns, options.periodical); + if (options.attempt) return $try(returns); + return returns(); + }; + }, + + run: function(args, bind){ + return this.apply(bind, $splat(args)); + }, + + pass: function(args, bind){ + return this.create({bind: bind, arguments: args}); + }, + + bind: function(bind, args){ + return this.create({bind: bind, arguments: args}); + }, + + bindWithEvent: function(bind, args){ + return this.create({bind: bind, arguments: args, event: true}); + }, + + attempt: function(args, bind){ + return this.create({bind: bind, arguments: args, attempt: true})(); + }, + + delay: function(delay, bind, args){ + return this.create({bind: bind, arguments: args, delay: delay})(); + }, + + periodical: function(periodical, bind, args){ + return this.create({bind: bind, arguments: args, periodical: periodical})(); + } + +}); + + +/* +--- + +name: Number + +description: Contains Number Prototypes like limit, round, times, and ceil. + +license: MIT-style license. + +requires: [Native, $util] + +provides: Number + +... +*/ + +Number.implement({ + + limit: function(min, max){ + return Math.min(max, Math.max(min, this)); + }, + + round: function(precision){ + precision = Math.pow(10, precision || 0); + return Math.round(this * precision) / precision; + }, + + times: function(fn, bind){ + for (var i = 0; i < this; i++) fn.call(bind, i, this); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + } + +}); + +Number.alias('times', 'each'); + +(function(math){ + var methods = {}; + math.each(function(name){ + if (!Number[name]) methods[name] = function(){ + return Math[name].apply(null, [this].concat($A(arguments))); + }; + }); + Number.implement(methods); +})(['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'max', 'min', 'pow', 'sin', 'sqrt', 'tan']); + + +/* +--- + +name: Hash + +description: Contains Hash Prototypes. Provides a means for overcoming the JavaScript practical impossibility of extending native Objects. + +license: MIT-style license. + +requires: Hash.base + +provides: Hash + +... +*/ + +Hash.implement({ + + has: Object.prototype.hasOwnProperty, + + keyOf: function(value){ + for (var key in this){ + if (this.hasOwnProperty(key) && this[key] === value) return key; + } + return null; + }, + + hasValue: function(value){ + return (Hash.keyOf(this, value) !== null); + }, + + extend: function(properties){ + Hash.each(properties || {}, function(value, key){ + Hash.set(this, key, value); + }, this); + return this; + }, + + combine: function(properties){ + Hash.each(properties || {}, function(value, key){ + Hash.include(this, key, value); + }, this); + return this; + }, + + erase: function(key){ + if (this.hasOwnProperty(key)) delete this[key]; + return this; + }, + + get: function(key){ + return (this.hasOwnProperty(key)) ? this[key] : null; + }, + + set: function(key, value){ + if (!this[key] || this.hasOwnProperty(key)) this[key] = value; + return this; + }, + + empty: function(){ + Hash.each(this, function(value, key){ + delete this[key]; + }, this); + return this; + }, + + include: function(key, value){ + if (this[key] == undefined) this[key] = value; + return this; + }, + + map: function(fn, bind){ + var results = new Hash; + Hash.each(this, function(value, key){ + results.set(key, fn.call(bind, value, key, this)); + }, this); + return results; + }, + + filter: function(fn, bind){ + var results = new Hash; + Hash.each(this, function(value, key){ + if (fn.call(bind, value, key, this)) results.set(key, value); + }, this); + return results; + }, + + every: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key) && !fn.call(bind, this[key], key)) return false; + } + return true; + }, + + some: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key) && fn.call(bind, this[key], key)) return true; + } + return false; + }, + + getKeys: function(){ + var keys = []; + Hash.each(this, function(value, key){ + keys.push(key); + }); + return keys; + }, + + getValues: function(){ + var values = []; + Hash.each(this, function(value){ + values.push(value); + }); + return values; + }, + + toQueryString: function(base){ + var queryString = []; + Hash.each(this, function(value, key){ + if (base) key = base + '[' + key + ']'; + var result; + switch ($type(value)){ + case 'object': result = Hash.toQueryString(value, key); break; + case 'array': + var qs = {}; + value.each(function(val, i){ + qs[i] = val; + }); + result = Hash.toQueryString(qs, key); + break; + default: result = key + '=' + encodeURIComponent(value); + } + if (value != undefined) queryString.push(result); + }); + + return queryString.join('&'); + } + +}); + +Hash.alias({keyOf: 'indexOf', hasValue: 'contains'}); + + +/* +--- + +name: Class + +description: Contains the Class Function for easily creating, extending, and implementing reusable Classes. + +license: MIT-style license. + +requires: [$util, Native, Array, String, Function, Number, Hash] + +provides: Class + +... +*/ + +function Class(params){ + + if (params instanceof Function) params = {initialize: params}; + + var newClass = function(){ + Object.reset(this); + if (newClass._prototyping) return this; + this._current = $empty; + var value = (this.initialize) ? this.initialize.apply(this, arguments) : this; + delete this._current; delete this.caller; + return value; + }.extend(this); + + newClass.implement(params); + + newClass.constructor = Class; + newClass.prototype.constructor = newClass; + + return newClass; + +}; + +Function.prototype.protect = function(){ + this._protected = true; + return this; +}; + +Object.reset = function(object, key){ + + if (key == null){ + for (var p in object) Object.reset(object, p); + return object; + } + + delete object[key]; + + switch ($type(object[key])){ + case 'object': + var F = function(){}; + F.prototype = object[key]; + var i = new F; + object[key] = Object.reset(i); + break; + case 'array': object[key] = $unlink(object[key]); break; + } + + return object; + +}; + +new Native({name: 'Class', initialize: Class}).extend({ + + instantiate: function(F){ + F._prototyping = true; + var proto = new F; + delete F._prototyping; + return proto; + }, + + wrap: function(self, key, method){ + if (method._origin) method = method._origin; + + return function(){ + if (method._protected && this._current == null) throw new Error('The method "' + key + '" cannot be called.'); + var caller = this.caller, current = this._current; + this.caller = current; this._current = arguments.callee; + var result = method.apply(this, arguments); + this._current = current; this.caller = caller; + return result; + }.extend({_owner: self, _origin: method, _name: key}); + + } + +}); + +Class.implement({ + + implement: function(key, value){ + + if ($type(key) == 'object'){ + for (var p in key) this.implement(p, key[p]); + return this; + } + + var mutator = Class.Mutators[key]; + + if (mutator){ + value = mutator.call(this, value); + if (value == null) return this; + } + + var proto = this.prototype; + + switch ($type(value)){ + + case 'function': + if (value._hidden) return this; + proto[key] = Class.wrap(this, key, value); + break; + + case 'object': + var previous = proto[key]; + if ($type(previous) == 'object') $mixin(previous, value); + else proto[key] = $unlink(value); + break; + + case 'array': + proto[key] = $unlink(value); + break; + + default: proto[key] = value; + + } + + return this; + + } + +}); + +Class.Mutators = { + + Extends: function(parent){ + + this.parent = parent; + this.prototype = Class.instantiate(parent); + + this.implement('parent', function(){ + var name = this.caller._name, previous = this.caller._owner.parent.prototype[name]; + if (!previous) throw new Error('The method "' + name + '" has no parent.'); + return previous.apply(this, arguments); + }.protect()); + + }, + + Implements: function(items){ + $splat(items).each(function(item){ + if (item instanceof Function) item = Class.instantiate(item); + this.implement(item); + }, this); + + } + +}; + + +/* +--- + +name: Class.Extras + +description: Contains Utility Classes that can be implemented into your own Classes to ease the execution of many common tasks. + +license: MIT-style license. + +requires: Class + +provides: [Chain, Events, Options, Class.Extras] + +... +*/ + +var Chain = new Class({ + + $chain: [], + + chain: function(){ + this.$chain.extend(Array.flatten(arguments)); + return this; + }, + + callChain: function(){ + return (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false; + }, + + clearChain: function(){ + this.$chain.empty(); + return this; + } + +}); + +var Events = new Class({ + + $events: {}, + + addEvent: function(type, fn, internal){ + type = Events.removeOn(type); + if (fn != $empty){ + this.$events[type] = this.$events[type] || []; + this.$events[type].include(fn); + if (internal) fn.internal = true; + } + return this; + }, + + addEvents: function(events){ + for (var type in events) this.addEvent(type, events[type]); + return this; + }, + + fireEvent: function(type, args, delay){ + type = Events.removeOn(type); + if (!this.$events || !this.$events[type]) return this; + this.$events[type].each(function(fn){ + fn.create({'bind': this, 'delay': delay, 'arguments': args})(); + }, this); + return this; + }, + + removeEvent: function(type, fn){ + type = Events.removeOn(type); + if (!this.$events[type]) return this; + if (!fn.internal) this.$events[type].erase(fn); + return this; + }, + + removeEvents: function(events){ + var type; + if ($type(events) == 'object'){ + for (type in events) this.removeEvent(type, events[type]); + return this; + } + if (events) events = Events.removeOn(events); + for (type in this.$events){ + if (events && events != type) continue; + var fns = this.$events[type]; + for (var i = fns.length; i--; i) this.removeEvent(type, fns[i]); + } + return this; + } + +}); + +Events.removeOn = function(string){ + return string.replace(/^on([A-Z])/, function(full, first){ + return first.toLowerCase(); + }); +}; + +var Options = new Class({ + + setOptions: function(){ + this.options = $merge.run([this.options].extend(arguments)); + if (!this.addEvent) return this; + for (var option in this.options){ + if ($type(this.options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue; + this.addEvent(option, this.options[option]); + delete this.options[option]; + } + return this; + } + +}); + + +/* +--- + +name: Browser + +description: The Browser Core. Contains Browser initialization, Window and Document, and the Browser Hash. + +license: MIT-style license. + +requires: [Native, $util] + +provides: [Browser, Window, Document, $exec] + +... +*/ + +var Browser = $merge({ + + Engine: {name: 'unknown', version: 0}, + + Platform: {name: (window.orientation != undefined) ? 'ipod' : (navigator.platform.match(/mac|win|linux/i) || ['other'])[0].toLowerCase()}, + + Features: {xpath: !!(document.evaluate), air: !!(window.runtime), query: !!(document.querySelector)}, + + Plugins: {}, + + Engines: { + + presto: function(){ + return (!window.opera) ? false : ((arguments.callee.caller) ? 960 : ((document.getElementsByClassName) ? 950 : 925)); + }, + + trident: function(){ + return (!window.ActiveXObject) ? false : ((window.XMLHttpRequest) ? ((document.querySelectorAll) ? 6 : 5) : 4); + }, + + webkit: function(){ + return (navigator.taintEnabled) ? false : ((Browser.Features.xpath) ? ((Browser.Features.query) ? 525 : 420) : 419); + }, + + gecko: function(){ + return (!document.getBoxObjectFor && window.mozInnerScreenX == null) ? false : ((document.getElementsByClassName) ? 19 : 18); + } + + } + +}, Browser || {}); + +Browser.Platform[Browser.Platform.name] = true; + +Browser.detect = function(){ + + for (var engine in this.Engines){ + var version = this.Engines[engine](); + if (version){ + this.Engine = {name: engine, version: version}; + this.Engine[engine] = this.Engine[engine + version] = true; + break; + } + } + + return {name: engine, version: version}; + +}; + +Browser.detect(); + +Browser.Request = function(){ + return $try(function(){ + return new XMLHttpRequest(); + }, function(){ + return new ActiveXObject('MSXML2.XMLHTTP'); + }, function(){ + return new ActiveXObject('Microsoft.XMLHTTP'); + }); +}; + +Browser.Features.xhr = !!(Browser.Request()); + +Browser.Plugins.Flash = (function(){ + var version = ($try(function(){ + return navigator.plugins['Shockwave Flash'].description; + }, function(){ + return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); + }) || '0 r0').match(/\d+/g); + return {version: parseInt(version[0] || 0 + '.' + version[1], 10) || 0, build: parseInt(version[2], 10) || 0}; +})(); + +function $exec(text){ + if (!text) return text; + if (window.execScript){ + window.execScript(text); + } else { + var script = document.createElement('script'); + script.setAttribute('type', 'text/javascript'); + script[(Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerText' : 'text'] = text; + document.head.appendChild(script); + document.head.removeChild(script); + } + return text; +}; + +Native.UID = 1; + +var $uid = (Browser.Engine.trident) ? function(item){ + return (item.uid || (item.uid = [Native.UID++]))[0]; +} : function(item){ + return item.uid || (item.uid = Native.UID++); +}; + +var Window = new Native({ + + name: 'Window', + + legacy: (Browser.Engine.trident) ? null: window.Window, + + initialize: function(win){ + $uid(win); + if (!win.Element){ + win.Element = $empty; + if (Browser.Engine.webkit) win.document.createElement("iframe"); //fixes safari 2 + win.Element.prototype = (Browser.Engine.webkit) ? window["[[DOMElement.prototype]]"] : {}; + } + win.document.window = win; + return $extend(win, Window.Prototype); + }, + + afterImplement: function(property, value){ + window[property] = Window.Prototype[property] = value; + } + +}); + +Window.Prototype = {$family: {name: 'window'}}; + +new Window(window); + +var Document = new Native({ + + name: 'Document', + + legacy: (Browser.Engine.trident) ? null: window.Document, + + initialize: function(doc){ + $uid(doc); + doc.head = doc.getElementsByTagName('head')[0]; + doc.html = doc.getElementsByTagName('html')[0]; + if (Browser.Engine.trident && Browser.Engine.version <= 4) $try(function(){ + doc.execCommand("BackgroundImageCache", false, true); + }); + if (Browser.Engine.trident) doc.window.attachEvent('onunload', function(){ + doc.window.detachEvent('onunload', arguments.callee); + doc.head = doc.html = doc.window = null; + }); + return $extend(doc, Document.Prototype); + }, + + afterImplement: function(property, value){ + document[property] = Document.Prototype[property] = value; + } + +}); + +Document.Prototype = {$family: {name: 'document'}}; + +new Document(document); + + +/* +--- + +name: Element + +description: One of the most important items in MooTools. Contains the dollar function, the dollars function, and an handful of cross-browser, time-saver methods to let you easily work with HTML Elements. + +license: MIT-style license. + +requires: [Window, Document, Array, String, Function, Number, Hash] + +provides: [Element, Elements, $, $$, Iframe] + +... +*/ + +var Element = new Native({ + + name: 'Element', + + legacy: window.Element, + + initialize: function(tag, props){ + var konstructor = Element.Constructors.get(tag); + if (konstructor) return konstructor(props); + if (typeof tag == 'string') return document.newElement(tag, props); + return document.id(tag).set(props); + }, + + afterImplement: function(key, value){ + Element.Prototype[key] = value; + if (Array[key]) return; + Elements.implement(key, function(){ + var items = [], elements = true; + for (var i = 0, j = this.length; i < j; i++){ + var returns = this[i][key].apply(this[i], arguments); + items.push(returns); + if (elements) elements = ($type(returns) == 'element'); + } + return (elements) ? new Elements(items) : items; + }); + } + +}); + +Element.Prototype = {$family: {name: 'element'}}; + +Element.Constructors = new Hash; + +var IFrame = new Native({ + + name: 'IFrame', + + generics: false, + + initialize: function(){ + var params = Array.link(arguments, {properties: Object.type, iframe: $defined}); + var props = params.properties || {}; + var iframe = document.id(params.iframe); + var onload = props.onload || $empty; + delete props.onload; + props.id = props.name = $pick(props.id, props.name, iframe ? (iframe.id || iframe.name) : 'IFrame_' + $time()); + iframe = new Element(iframe || 'iframe', props); + var onFrameLoad = function(){ + var host = $try(function(){ + return iframe.contentWindow.location.host; + }); + if (!host || host == window.location.host){ + var win = new Window(iframe.contentWindow); + new Document(iframe.contentWindow.document); + $extend(win.Element.prototype, Element.Prototype); + } + onload.call(iframe.contentWindow, iframe.contentWindow.document); + }; + var contentWindow = $try(function(){ + return iframe.contentWindow; + }); + ((contentWindow && contentWindow.document.body) || window.frames[props.id]) ? onFrameLoad() : iframe.addListener('load', onFrameLoad); + return iframe; + } + +}); + +var Elements = new Native({ + + initialize: function(elements, options){ + options = $extend({ddup: true, cash: true}, options); + elements = elements || []; + if (options.ddup || options.cash){ + var uniques = {}, returned = []; + for (var i = 0, l = elements.length; i < l; i++){ + var el = document.id(elements[i], !options.cash); + if (options.ddup){ + if (uniques[el.uid]) continue; + uniques[el.uid] = true; + } + if (el) returned.push(el); + } + elements = returned; + } + return (options.cash) ? $extend(elements, this) : elements; + } + +}); + +Elements.implement({ + + filter: function(filter, bind){ + if (!filter) return this; + return new Elements(Array.filter(this, (typeof filter == 'string') ? function(item){ + return item.match(filter); + } : filter, bind)); + } + +}); + +(function(){ + +/**/ +var createElementAcceptsHTML; +try { + var x = document.createElement(''); + createElementAcceptsHTML = (x.name == 'x'); +} catch(e){} + +var escapeQuotes = function(html){ + return ('' + html).replace(/&/g,'&').replace(/"/g,'"'); +}; +/**/ + +Document.implement({ + + newElement: function(tag, props){ + if (props && props.checked != null) props.defaultChecked = props.checked; + /**/// Fix for readonly name and type properties in IE < 8 + if (createElementAcceptsHTML && props){ + tag = '<' + tag; + if (props.name) tag += ' name="' + escapeQuotes(props.name) + '"'; + if (props.type) tag += ' type="' + escapeQuotes(props.type) + '"'; + tag += '>'; + delete props.name; + delete props.type; + } + /**/ + return this.id(this.createElement(tag)).set(props); + }, + + newTextNode: function(text){ + return this.createTextNode(text); + }, + + getDocument: function(){ + return this; + }, + + getWindow: function(){ + return this.window; + }, + + id: (function(){ + + var types = { + + string: function(id, nocash, doc){ + id = doc.getElementById(id); + return (id) ? types.element(id, nocash) : null; + }, + + element: function(el, nocash){ + $uid(el); + if (!nocash && !el.$family && !(/^object|embed$/i).test(el.tagName)){ + var proto = Element.Prototype; + for (var p in proto) el[p] = proto[p]; + }; + return el; + }, + + object: function(obj, nocash, doc){ + if (obj.toElement) return types.element(obj.toElement(doc), nocash); + return null; + } + + }; + + types.textnode = types.whitespace = types.window = types.document = $arguments(0); + + return function(el, nocash, doc){ + if (el && el.$family && el.uid) return el; + var type = $type(el); + return (types[type]) ? types[type](el, nocash, doc || document) : null; + }; + + })() + +}); + +})(); + +if (window.$ == null) Window.implement({ + $: function(el, nc){ + return document.id(el, nc, this.document); + } +}); + +Window.implement({ + + $$: function(selector){ + if (arguments.length == 1 && typeof selector == 'string') return this.document.getElements(selector); + var elements = []; + var args = Array.flatten(arguments); + for (var i = 0, l = args.length; i < l; i++){ + var item = args[i]; + switch ($type(item)){ + case 'element': elements.push(item); break; + case 'string': elements.extend(this.document.getElements(item, true)); + } + } + return new Elements(elements); + }, + + getDocument: function(){ + return this.document; + }, + + getWindow: function(){ + return this; + } + +}); + +Native.implement([Element, Document], { + + getElement: function(selector, nocash){ + return document.id(this.getElements(selector, true)[0] || null, nocash); + }, + + getElements: function(tags, nocash){ + tags = tags.split(','); + var elements = []; + var ddup = (tags.length > 1); + tags.each(function(tag){ + var partial = this.getElementsByTagName(tag.trim()); + (ddup) ? elements.extend(partial) : elements = partial; + }, this); + return new Elements(elements, {ddup: ddup, cash: !nocash}); + } + +}); + +(function(){ + +var collected = {}, storage = {}; +var props = {input: 'checked', option: 'selected', textarea: (Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerHTML' : 'value'}; + +var get = function(uid){ + return (storage[uid] || (storage[uid] = {})); +}; + +var clean = function(item, retain){ + if (!item) return; + var uid = item.uid; + if (retain !== true) retain = false; + if (Browser.Engine.trident){ + if (item.clearAttributes){ + var clone = retain && item.cloneNode(false); + item.clearAttributes(); + if (clone) item.mergeAttributes(clone); + } else if (item.removeEvents){ + item.removeEvents(); + } + if ((/object/i).test(item.tagName)){ + for (var p in item){ + if (typeof item[p] == 'function') item[p] = $empty; + } + Element.dispose(item); + } + } + if (!uid) return; + collected[uid] = storage[uid] = null; +}; + +var purge = function(){ + Hash.each(collected, clean); + if (Browser.Engine.trident) $A(document.getElementsByTagName('object')).each(clean); + if (window.CollectGarbage) CollectGarbage(); + collected = storage = null; +}; + +var walk = function(element, walk, start, match, all, nocash){ + var el = element[start || walk]; + var elements = []; + while (el){ + if (el.nodeType == 1 && (!match || Element.match(el, match))){ + if (!all) return document.id(el, nocash); + elements.push(el); + } + el = el[walk]; + } + return (all) ? new Elements(elements, {ddup: false, cash: !nocash}) : null; +}; + +var attributes = { + 'html': 'innerHTML', + 'class': 'className', + 'for': 'htmlFor', + 'defaultValue': 'defaultValue', + 'text': (Browser.Engine.trident || (Browser.Engine.webkit && Browser.Engine.version < 420)) ? 'innerText' : 'textContent' +}; +var bools = ['compact', 'nowrap', 'ismap', 'declare', 'noshade', 'checked', 'disabled', 'readonly', 'multiple', 'selected', 'noresize', 'defer']; +var camels = ['value', 'type', 'defaultValue', 'accessKey', 'cellPadding', 'cellSpacing', 'colSpan', 'frameBorder', 'maxLength', 'readOnly', 'rowSpan', 'tabIndex', 'useMap']; + +bools = bools.associate(bools); + +Hash.extend(attributes, bools); +Hash.extend(attributes, camels.associate(camels.map(String.toLowerCase))); + +var inserters = { + + before: function(context, element){ + if (element.parentNode) element.parentNode.insertBefore(context, element); + }, + + after: function(context, element){ + if (!element.parentNode) return; + var next = element.nextSibling; + (next) ? element.parentNode.insertBefore(context, next) : element.parentNode.appendChild(context); + }, + + bottom: function(context, element){ + element.appendChild(context); + }, + + top: function(context, element){ + var first = element.firstChild; + (first) ? element.insertBefore(context, first) : element.appendChild(context); + } + +}; + +inserters.inside = inserters.bottom; + +Hash.each(inserters, function(inserter, where){ + + where = where.capitalize(); + + Element.implement('inject' + where, function(el){ + inserter(this, document.id(el, true)); + return this; + }); + + Element.implement('grab' + where, function(el){ + inserter(document.id(el, true), this); + return this; + }); + +}); + +Element.implement({ + + set: function(prop, value){ + switch ($type(prop)){ + case 'object': + for (var p in prop) this.set(p, prop[p]); + break; + case 'string': + var property = Element.Properties.get(prop); + (property && property.set) ? property.set.apply(this, Array.slice(arguments, 1)) : this.setProperty(prop, value); + } + return this; + }, + + get: function(prop){ + var property = Element.Properties.get(prop); + return (property && property.get) ? property.get.apply(this, Array.slice(arguments, 1)) : this.getProperty(prop); + }, + + erase: function(prop){ + var property = Element.Properties.get(prop); + (property && property.erase) ? property.erase.apply(this) : this.removeProperty(prop); + return this; + }, + + setProperty: function(attribute, value){ + var key = attributes[attribute]; + if (value == undefined) return this.removeProperty(attribute); + if (key && bools[attribute]) value = !!value; + (key) ? this[key] = value : this.setAttribute(attribute, '' + value); + return this; + }, + + setProperties: function(attributes){ + for (var attribute in attributes) this.setProperty(attribute, attributes[attribute]); + return this; + }, + + getProperty: function(attribute){ + var key = attributes[attribute]; + var value = (key) ? this[key] : this.getAttribute(attribute, 2); + return (bools[attribute]) ? !!value : (key) ? value : value || null; + }, + + getProperties: function(){ + var args = $A(arguments); + return args.map(this.getProperty, this).associate(args); + }, + + removeProperty: function(attribute){ + var key = attributes[attribute]; + (key) ? this[key] = (key && bools[attribute]) ? false : '' : this.removeAttribute(attribute); + return this; + }, + + removeProperties: function(){ + Array.each(arguments, this.removeProperty, this); + return this; + }, + + hasClass: function(className){ + return this.className.contains(className, ' '); + }, + + addClass: function(className){ + if (!this.hasClass(className)) this.className = (this.className + ' ' + className).clean(); + return this; + }, + + removeClass: function(className){ + this.className = this.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)'), '$1'); + return this; + }, + + toggleClass: function(className){ + return this.hasClass(className) ? this.removeClass(className) : this.addClass(className); + }, + + adopt: function(){ + Array.flatten(arguments).each(function(element){ + element = document.id(element, true); + if (element) this.appendChild(element); + }, this); + return this; + }, + + appendText: function(text, where){ + return this.grab(this.getDocument().newTextNode(text), where); + }, + + grab: function(el, where){ + inserters[where || 'bottom'](document.id(el, true), this); + return this; + }, + + inject: function(el, where){ + inserters[where || 'bottom'](this, document.id(el, true)); + return this; + }, + + replaces: function(el){ + el = document.id(el, true); + el.parentNode.replaceChild(this, el); + return this; + }, + + wraps: function(el, where){ + el = document.id(el, true); + return this.replaces(el).grab(el, where); + }, + + getPrevious: function(match, nocash){ + return walk(this, 'previousSibling', null, match, false, nocash); + }, + + getAllPrevious: function(match, nocash){ + return walk(this, 'previousSibling', null, match, true, nocash); + }, + + getNext: function(match, nocash){ + return walk(this, 'nextSibling', null, match, false, nocash); + }, + + getAllNext: function(match, nocash){ + return walk(this, 'nextSibling', null, match, true, nocash); + }, + + getFirst: function(match, nocash){ + return walk(this, 'nextSibling', 'firstChild', match, false, nocash); + }, + + getLast: function(match, nocash){ + return walk(this, 'previousSibling', 'lastChild', match, false, nocash); + }, + + getParent: function(match, nocash){ + return walk(this, 'parentNode', null, match, false, nocash); + }, + + getParents: function(match, nocash){ + return walk(this, 'parentNode', null, match, true, nocash); + }, + + getSiblings: function(match, nocash){ + return this.getParent().getChildren(match, nocash).erase(this); + }, + + getChildren: function(match, nocash){ + return walk(this, 'nextSibling', 'firstChild', match, true, nocash); + }, + + getWindow: function(){ + return this.ownerDocument.window; + }, + + getDocument: function(){ + return this.ownerDocument; + }, + + getElementById: function(id, nocash){ + var el = this.ownerDocument.getElementById(id); + if (!el) return null; + for (var parent = el.parentNode; parent != this; parent = parent.parentNode){ + if (!parent) return null; + } + return document.id(el, nocash); + }, + + getSelected: function(){ + return new Elements($A(this.options).filter(function(option){ + return option.selected; + })); + }, + + getComputedStyle: function(property){ + if (this.currentStyle) return this.currentStyle[property.camelCase()]; + var computed = this.getDocument().defaultView.getComputedStyle(this, null); + return (computed) ? computed.getPropertyValue([property.hyphenate()]) : null; + }, + + toQueryString: function(){ + var queryString = []; + this.getElements('input, select, textarea', true).each(function(el){ + if (!el.name || el.disabled || el.type == 'submit' || el.type == 'reset' || el.type == 'file') return; + var value = (el.tagName.toLowerCase() == 'select') ? Element.getSelected(el).map(function(opt){ + return opt.value; + }) : ((el.type == 'radio' || el.type == 'checkbox') && !el.checked) ? null : el.value; + $splat(value).each(function(val){ + if (typeof val != 'undefined') queryString.push(el.name + '=' + encodeURIComponent(val)); + }); + }); + return queryString.join('&'); + }, + + clone: function(contents, keepid){ + contents = contents !== false; + var clone = this.cloneNode(contents); + var clean = function(node, element){ + if (!keepid) node.removeAttribute('id'); + if (Browser.Engine.trident){ + node.clearAttributes(); + node.mergeAttributes(element); + node.removeAttribute('uid'); + if (node.options){ + var no = node.options, eo = element.options; + for (var j = no.length; j--;) no[j].selected = eo[j].selected; + } + } + var prop = props[element.tagName.toLowerCase()]; + if (prop && element[prop]) node[prop] = element[prop]; + }; + + if (contents){ + var ce = clone.getElementsByTagName('*'), te = this.getElementsByTagName('*'); + for (var i = ce.length; i--;) clean(ce[i], te[i]); + } + + clean(clone, this); + return document.id(clone); + }, + + destroy: function(){ + Element.empty(this); + Element.dispose(this); + clean(this, true); + return null; + }, + + empty: function(){ + $A(this.childNodes).each(function(node){ + Element.destroy(node); + }); + return this; + }, + + dispose: function(){ + return (this.parentNode) ? this.parentNode.removeChild(this) : this; + }, + + hasChild: function(el){ + el = document.id(el, true); + if (!el) return false; + if (Browser.Engine.webkit && Browser.Engine.version < 420) return $A(this.getElementsByTagName(el.tagName)).contains(el); + return (this.contains) ? (this != el && this.contains(el)) : !!(this.compareDocumentPosition(el) & 16); + }, + + match: function(tag){ + return (!tag || (tag == this) || (Element.get(this, 'tag') == tag)); + } + +}); + +Native.implement([Element, Window, Document], { + + addListener: function(type, fn){ + if (type == 'unload'){ + var old = fn, self = this; + fn = function(){ + self.removeListener('unload', fn); + old(); + }; + } else { + collected[this.uid] = this; + } + if (this.addEventListener) this.addEventListener(type, fn, false); + else this.attachEvent('on' + type, fn); + return this; + }, + + removeListener: function(type, fn){ + if (this.removeEventListener) this.removeEventListener(type, fn, false); + else this.detachEvent('on' + type, fn); + return this; + }, + + retrieve: function(property, dflt){ + var storage = get(this.uid), prop = storage[property]; + if (dflt != undefined && prop == undefined) prop = storage[property] = dflt; + return $pick(prop); + }, + + store: function(property, value){ + var storage = get(this.uid); + storage[property] = value; + return this; + }, + + eliminate: function(property){ + var storage = get(this.uid); + delete storage[property]; + return this; + } + +}); + +window.addListener('unload', purge); + +})(); + +Element.Properties = new Hash; + +Element.Properties.style = { + + set: function(style){ + this.style.cssText = style; + }, + + get: function(){ + return this.style.cssText; + }, + + erase: function(){ + this.style.cssText = ''; + } + +}; + +Element.Properties.tag = { + + get: function(){ + return this.tagName.toLowerCase(); + } + +}; + +Element.Properties.html = (function(){ + var wrapper = document.createElement('div'); + + var translations = { + table: [1, '', '
'], + select: [1, ''], + tbody: [2, '', '
'], + tr: [3, '', '
'] + }; + translations.thead = translations.tfoot = translations.tbody; + + var html = { + set: function(){ + var html = Array.flatten(arguments).join(''); + var wrap = Browser.Engine.trident && translations[this.get('tag')]; + if (wrap){ + var first = wrapper; + first.innerHTML = wrap[1] + html + wrap[2]; + for (var i = wrap[0]; i--;) first = first.firstChild; + this.empty().adopt(first.childNodes); + } else { + this.innerHTML = html; + } + } + }; + + html.erase = html.set; + + return html; +})(); + +if (Browser.Engine.webkit && Browser.Engine.version < 420) Element.Properties.text = { + get: function(){ + if (this.innerText) return this.innerText; + var temp = this.ownerDocument.newElement('div', {html: this.innerHTML}).inject(this.ownerDocument.body); + var text = temp.innerText; + temp.destroy(); + return text; + } +}; + + +/* +--- + +name: Element.Dimensions + +description: Contains methods to work with size, scroll, or positioning of Elements and the window object. + +license: MIT-style license. + +credits: + - Element positioning based on the [qooxdoo](http://qooxdoo.org/) code and smart browser fixes, [LGPL License](http://www.gnu.org/licenses/lgpl.html). + - Viewport dimensions based on [YUI](http://developer.yahoo.com/yui/) code, [BSD License](http://developer.yahoo.com/yui/license.html). + +requires: Element + +provides: Element.Dimensions + +... +*/ + +(function(){ + +Element.implement({ + + scrollTo: function(x, y){ + if (isBody(this)){ + this.getWindow().scrollTo(x, y); + } else { + this.scrollLeft = x; + this.scrollTop = y; + } + return this; + }, + + getSize: function(){ + if (isBody(this)) return this.getWindow().getSize(); + return {x: this.offsetWidth, y: this.offsetHeight}; + }, + + getScrollSize: function(){ + if (isBody(this)) return this.getWindow().getScrollSize(); + return {x: this.scrollWidth, y: this.scrollHeight}; + }, + + getScroll: function(){ + if (isBody(this)) return this.getWindow().getScroll(); + return {x: this.scrollLeft, y: this.scrollTop}; + }, + + getScrolls: function(){ + var element = this, position = {x: 0, y: 0}; + while (element && !isBody(element)){ + position.x += element.scrollLeft; + position.y += element.scrollTop; + element = element.parentNode; + } + return position; + }, + + getOffsetParent: function(){ + var element = this; + if (isBody(element)) return null; + if (!Browser.Engine.trident) return element.offsetParent; + while ((element = element.parentNode) && !isBody(element)){ + if (styleString(element, 'position') != 'static') return element; + } + return null; + }, + + getOffsets: function(){ + if (this.getBoundingClientRect){ + var bound = this.getBoundingClientRect(), + html = document.id(this.getDocument().documentElement), + htmlScroll = html.getScroll(), + elemScrolls = this.getScrolls(), + elemScroll = this.getScroll(), + isFixed = (styleString(this, 'position') == 'fixed'); + + return { + x: bound.left.toInt() + elemScrolls.x - elemScroll.x + ((isFixed) ? 0 : htmlScroll.x) - html.clientLeft, + y: bound.top.toInt() + elemScrolls.y - elemScroll.y + ((isFixed) ? 0 : htmlScroll.y) - html.clientTop + }; + } + + var element = this, position = {x: 0, y: 0}; + if (isBody(this)) return position; + + while (element && !isBody(element)){ + position.x += element.offsetLeft; + position.y += element.offsetTop; + + if (Browser.Engine.gecko){ + if (!borderBox(element)){ + position.x += leftBorder(element); + position.y += topBorder(element); + } + var parent = element.parentNode; + if (parent && styleString(parent, 'overflow') != 'visible'){ + position.x += leftBorder(parent); + position.y += topBorder(parent); + } + } else if (element != this && Browser.Engine.webkit){ + position.x += leftBorder(element); + position.y += topBorder(element); + } + + element = element.offsetParent; + } + if (Browser.Engine.gecko && !borderBox(this)){ + position.x -= leftBorder(this); + position.y -= topBorder(this); + } + return position; + }, + + getPosition: function(relative){ + if (isBody(this)) return {x: 0, y: 0}; + var offset = this.getOffsets(), + scroll = this.getScrolls(); + var position = { + x: offset.x - scroll.x, + y: offset.y - scroll.y + }; + var relativePosition = (relative && (relative = document.id(relative))) ? relative.getPosition() : {x: 0, y: 0}; + return {x: position.x - relativePosition.x, y: position.y - relativePosition.y}; + }, + + getCoordinates: function(element){ + if (isBody(this)) return this.getWindow().getCoordinates(); + var position = this.getPosition(element), + size = this.getSize(); + var obj = { + left: position.x, + top: position.y, + width: size.x, + height: size.y + }; + obj.right = obj.left + obj.width; + obj.bottom = obj.top + obj.height; + return obj; + }, + + computePosition: function(obj){ + return { + left: obj.x - styleNumber(this, 'margin-left'), + top: obj.y - styleNumber(this, 'margin-top') + }; + }, + + setPosition: function(obj){ + return this.setStyles(this.computePosition(obj)); + } + +}); + + +Native.implement([Document, Window], { + + getSize: function(){ + if (Browser.Engine.presto || Browser.Engine.webkit){ + var win = this.getWindow(); + return {x: win.innerWidth, y: win.innerHeight}; + } + var doc = getCompatElement(this); + return {x: doc.clientWidth, y: doc.clientHeight}; + }, + + getScroll: function(){ + var win = this.getWindow(), doc = getCompatElement(this); + return {x: win.pageXOffset || doc.scrollLeft, y: win.pageYOffset || doc.scrollTop}; + }, + + getScrollSize: function(){ + var doc = getCompatElement(this), min = this.getSize(); + return {x: Math.max(doc.scrollWidth, min.x), y: Math.max(doc.scrollHeight, min.y)}; + }, + + getPosition: function(){ + return {x: 0, y: 0}; + }, + + getCoordinates: function(){ + var size = this.getSize(); + return {top: 0, left: 0, bottom: size.y, right: size.x, height: size.y, width: size.x}; + } + +}); + +// private methods + +var styleString = Element.getComputedStyle; + +function styleNumber(element, style){ + return styleString(element, style).toInt() || 0; +}; + +function borderBox(element){ + return styleString(element, '-moz-box-sizing') == 'border-box'; +}; + +function topBorder(element){ + return styleNumber(element, 'border-top-width'); +}; + +function leftBorder(element){ + return styleNumber(element, 'border-left-width'); +}; + +function isBody(element){ + return (/^(?:body|html)$/i).test(element.tagName); +}; + +function getCompatElement(element){ + var doc = element.getDocument(); + return (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; +}; + +})(); + +//aliases +Element.alias('setPosition', 'position'); //compatability + +Native.implement([Window, Document, Element], { + + getHeight: function(){ + return this.getSize().y; + }, + + getWidth: function(){ + return this.getSize().x; + }, + + getScrollTop: function(){ + return this.getScroll().y; + }, + + getScrollLeft: function(){ + return this.getScroll().x; + }, + + getScrollHeight: function(){ + return this.getScrollSize().y; + }, + + getScrollWidth: function(){ + return this.getScrollSize().x; + }, + + getTop: function(){ + return this.getPosition().y; + }, + + getLeft: function(){ + return this.getPosition().x; + } + +}); + + +/* +--- + +name: Event + +description: Contains the Event Class, to make the event object cross-browser. + +license: MIT-style license. + +requires: [Window, Document, Hash, Array, Function, String] + +provides: Event + +... +*/ + +var Event = new Native({ + + name: 'Event', + + initialize: function(event, win){ + win = win || window; + var doc = win.document; + event = event || win.event; + if (event.$extended) return event; + this.$extended = true; + var type = event.type; + var target = event.target || event.srcElement; + while (target && target.nodeType == 3) target = target.parentNode; + + if (type.test(/key/)){ + var code = event.which || event.keyCode; + var key = Event.Keys.keyOf(code); + if (type == 'keydown'){ + var fKey = code - 111; + if (fKey > 0 && fKey < 13) key = 'f' + fKey; + } + key = key || String.fromCharCode(code).toLowerCase(); + } else if (type.match(/(click|mouse|menu)/i)){ + doc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; + var page = { + x: event.pageX || event.clientX + doc.scrollLeft, + y: event.pageY || event.clientY + doc.scrollTop + }; + var client = { + x: (event.pageX) ? event.pageX - win.pageXOffset : event.clientX, + y: (event.pageY) ? event.pageY - win.pageYOffset : event.clientY + }; + if (type.match(/DOMMouseScroll|mousewheel/)){ + var wheel = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3; + } + var rightClick = (event.which == 3) || (event.button == 2); + var related = null; + if (type.match(/over|out/)){ + switch (type){ + case 'mouseover': related = event.relatedTarget || event.fromElement; break; + case 'mouseout': related = event.relatedTarget || event.toElement; + } + if (!(function(){ + while (related && related.nodeType == 3) related = related.parentNode; + return true; + }).create({attempt: Browser.Engine.gecko})()) related = false; + } + } + + return $extend(this, { + event: event, + type: type, + + page: page, + client: client, + rightClick: rightClick, + + wheel: wheel, + + relatedTarget: related, + target: target, + + code: code, + key: key, + + shift: event.shiftKey, + control: event.ctrlKey, + alt: event.altKey, + meta: event.metaKey + }); + } + +}); + +Event.Keys = new Hash({ + 'enter': 13, + 'up': 38, + 'down': 40, + 'left': 37, + 'right': 39, + 'esc': 27, + 'space': 32, + 'backspace': 8, + 'tab': 9, + 'delete': 46 +}); + +Event.implement({ + + stop: function(){ + return this.stopPropagation().preventDefault(); + }, + + stopPropagation: function(){ + if (this.event.stopPropagation) this.event.stopPropagation(); + else this.event.cancelBubble = true; + return this; + }, + + preventDefault: function(){ + if (this.event.preventDefault) this.event.preventDefault(); + else this.event.returnValue = false; + return this; + } + +}); + + +/* +--- + +name: Element.Event + +description: Contains Element methods for dealing with events. This file also includes mouseenter and mouseleave custom Element Events. + +license: MIT-style license. + +requires: [Element, Event] + +provides: Element.Event + +... +*/ + +Element.Properties.events = {set: function(events){ + this.addEvents(events); +}}; + +Native.implement([Element, Window, Document], { + + addEvent: function(type, fn){ + var events = this.retrieve('events', {}); + events[type] = events[type] || {'keys': [], 'values': []}; + if (events[type].keys.contains(fn)) return this; + events[type].keys.push(fn); + var realType = type, custom = Element.Events.get(type), condition = fn, self = this; + if (custom){ + if (custom.onAdd) custom.onAdd.call(this, fn); + if (custom.condition){ + condition = function(event){ + if (custom.condition.call(this, event)) return fn.call(this, event); + return true; + }; + } + realType = custom.base || realType; + } + var defn = function(){ + return fn.call(self); + }; + var nativeEvent = Element.NativeEvents[realType]; + if (nativeEvent){ + if (nativeEvent == 2){ + defn = function(event){ + event = new Event(event, self.getWindow()); + if (condition.call(self, event) === false) event.stop(); + }; + } + this.addListener(realType, defn); + } + events[type].values.push(defn); + return this; + }, + + removeEvent: function(type, fn){ + var events = this.retrieve('events'); + if (!events || !events[type]) return this; + var pos = events[type].keys.indexOf(fn); + if (pos == -1) return this; + events[type].keys.splice(pos, 1); + var value = events[type].values.splice(pos, 1)[0]; + var custom = Element.Events.get(type); + if (custom){ + if (custom.onRemove) custom.onRemove.call(this, fn); + type = custom.base || type; + } + return (Element.NativeEvents[type]) ? this.removeListener(type, value) : this; + }, + + addEvents: function(events){ + for (var event in events) this.addEvent(event, events[event]); + return this; + }, + + removeEvents: function(events){ + var type; + if ($type(events) == 'object'){ + for (type in events) this.removeEvent(type, events[type]); + return this; + } + var attached = this.retrieve('events'); + if (!attached) return this; + if (!events){ + for (type in attached) this.removeEvents(type); + this.eliminate('events'); + } else if (attached[events]){ + while (attached[events].keys[0]) this.removeEvent(events, attached[events].keys[0]); + attached[events] = null; + } + return this; + }, + + fireEvent: function(type, args, delay){ + var events = this.retrieve('events'); + if (!events || !events[type]) return this; + events[type].keys.each(function(fn){ + fn.create({'bind': this, 'delay': delay, 'arguments': args})(); + }, this); + return this; + }, + + cloneEvents: function(from, type){ + from = document.id(from); + var fevents = from.retrieve('events'); + if (!fevents) return this; + if (!type){ + for (var evType in fevents) this.cloneEvents(from, evType); + } else if (fevents[type]){ + fevents[type].keys.each(function(fn){ + this.addEvent(type, fn); + }, this); + } + return this; + } + +}); + +// IE9 +try { + if (typeof HTMLElement != 'undefined') + HTMLElement.prototype.fireEvent = Element.prototype.fireEvent; +} catch(e){} + +Element.NativeEvents = { + click: 2, dblclick: 2, mouseup: 2, mousedown: 2, contextmenu: 2, //mouse buttons + mousewheel: 2, DOMMouseScroll: 2, //mouse wheel + mouseover: 2, mouseout: 2, mousemove: 2, selectstart: 2, selectend: 2, //mouse movement + keydown: 2, keypress: 2, keyup: 2, //keyboard + focus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, //form elements + load: 1, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window + error: 1, abort: 1, scroll: 1 //misc +}; + +(function(){ + +var $check = function(event){ + var related = event.relatedTarget; + if (related == undefined) return true; + if (related === false) return false; + return ($type(this) != 'document' && related != this && related.prefix != 'xul' && !this.hasChild(related)); +}; + +Element.Events = new Hash({ + + mouseenter: { + base: 'mouseover', + condition: $check + }, + + mouseleave: { + base: 'mouseout', + condition: $check + }, + + mousewheel: { + base: (Browser.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel' + } + +}); + +})(); + + +/* +--- + +name: Element.Style + +description: Contains methods for interacting with the styles of Elements in a fashionable way. + +license: MIT-style license. + +requires: Element + +provides: Element.Style + +... +*/ + +Element.Properties.styles = {set: function(styles){ + this.setStyles(styles); +}}; + +Element.Properties.opacity = { + + set: function(opacity, novisibility){ + if (!novisibility){ + if (opacity == 0){ + if (this.style.visibility != 'hidden') this.style.visibility = 'hidden'; + } else { + if (this.style.visibility != 'visible') this.style.visibility = 'visible'; + } + } + if (!this.currentStyle || !this.currentStyle.hasLayout) this.style.zoom = 1; + if (Browser.Engine.trident) this.style.filter = (opacity == 1) ? '' : 'alpha(opacity=' + opacity * 100 + ')'; + this.style.opacity = opacity; + this.store('opacity', opacity); + }, + + get: function(){ + return this.retrieve('opacity', 1); + } + +}; + +Element.implement({ + + setOpacity: function(value){ + return this.set('opacity', value, true); + }, + + getOpacity: function(){ + return this.get('opacity'); + }, + + setStyle: function(property, value){ + switch (property){ + case 'opacity': return this.set('opacity', parseFloat(value)); + case 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat'; + } + property = property.camelCase(); + if ($type(value) != 'string'){ + var map = (Element.Styles.get(property) || '@').split(' '); + value = $splat(value).map(function(val, i){ + if (!map[i]) return ''; + return ($type(val) == 'number') ? map[i].replace('@', Math.round(val)) : val; + }).join(' '); + } else if (value == String(Number(value))){ + value = Math.round(value); + } + this.style[property] = value; + return this; + }, + + getStyle: function(property){ + switch (property){ + case 'opacity': return this.get('opacity'); + case 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat'; + } + property = property.camelCase(); + var result = this.style[property]; + if (!$chk(result)){ + result = []; + for (var style in Element.ShortStyles){ + if (property != style) continue; + for (var s in Element.ShortStyles[style]) result.push(this.getStyle(s)); + return result.join(' '); + } + result = this.getComputedStyle(property); + } + if (result){ + result = String(result); + var color = result.match(/rgba?\([\d\s,]+\)/); + if (color) result = result.replace(color[0], color[0].rgbToHex()); + } + if (Browser.Engine.presto || (Browser.Engine.trident && !$chk(parseInt(result, 10)))){ + if (property.test(/^(height|width)$/)){ + var values = (property == 'width') ? ['left', 'right'] : ['top', 'bottom'], size = 0; + values.each(function(value){ + size += this.getStyle('border-' + value + '-width').toInt() + this.getStyle('padding-' + value).toInt(); + }, this); + return this['offset' + property.capitalize()] - size + 'px'; + } + if ((Browser.Engine.presto) && String(result).test('px')) return result; + if (property.test(/(border(.+)Width|margin|padding)/)) return '0px'; + } + return result; + }, + + setStyles: function(styles){ + for (var style in styles) this.setStyle(style, styles[style]); + return this; + }, + + getStyles: function(){ + var result = {}; + Array.flatten(arguments).each(function(key){ + result[key] = this.getStyle(key); + }, this); + return result; + } + +}); + +Element.Styles = new Hash({ + left: '@px', top: '@px', bottom: '@px', right: '@px', + width: '@px', height: '@px', maxWidth: '@px', maxHeight: '@px', minWidth: '@px', minHeight: '@px', + backgroundColor: 'rgb(@, @, @)', backgroundPosition: '@px @px', color: 'rgb(@, @, @)', + fontSize: '@px', letterSpacing: '@px', lineHeight: '@px', clip: 'rect(@px @px @px @px)', + margin: '@px @px @px @px', padding: '@px @px @px @px', border: '@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)', + borderWidth: '@px @px @px @px', borderStyle: '@ @ @ @', borderColor: 'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)', + zIndex: '@', 'zoom': '@', fontWeight: '@', textIndent: '@px', opacity: '@' +}); + +Element.ShortStyles = {margin: {}, padding: {}, border: {}, borderWidth: {}, borderStyle: {}, borderColor: {}}; + +['Top', 'Right', 'Bottom', 'Left'].each(function(direction){ + var Short = Element.ShortStyles; + var All = Element.Styles; + ['margin', 'padding'].each(function(style){ + var sd = style + direction; + Short[style][sd] = All[sd] = '@px'; + }); + var bd = 'border' + direction; + Short.border[bd] = All[bd] = '@px @ rgb(@, @, @)'; + var bdw = bd + 'Width', bds = bd + 'Style', bdc = bd + 'Color'; + Short[bd] = {}; + Short.borderWidth[bdw] = Short[bd][bdw] = All[bdw] = '@px'; + Short.borderStyle[bds] = Short[bd][bds] = All[bds] = '@'; + Short.borderColor[bdc] = Short[bd][bdc] = All[bdc] = 'rgb(@, @, @)'; +}); + + +/* +--- + +name: Fx + +description: Contains the basic animation logic to be extended by all other Fx Classes. + +license: MIT-style license. + +requires: [Chain, Events, Options] + +provides: Fx + +... +*/ + +var Fx = new Class({ + + Implements: [Chain, Events, Options], + + options: { + /* + onStart: $empty, + onCancel: $empty, + onComplete: $empty, + */ + fps: 50, + unit: false, + duration: 500, + link: 'ignore' + }, + + initialize: function(options){ + this.subject = this.subject || this; + this.setOptions(options); + this.options.duration = Fx.Durations[this.options.duration] || this.options.duration.toInt(); + var wait = this.options.wait; + if (wait === false) this.options.link = 'cancel'; + }, + + getTransition: function(){ + return function(p){ + return -(Math.cos(Math.PI * p) - 1) / 2; + }; + }, + + step: function(){ + var time = $time(); + if (time < this.time + this.options.duration){ + var delta = this.transition((time - this.time) / this.options.duration); + this.set(this.compute(this.from, this.to, delta)); + } else { + this.set(this.compute(this.from, this.to, 1)); + this.complete(); + } + }, + + set: function(now){ + return now; + }, + + compute: function(from, to, delta){ + return Fx.compute(from, to, delta); + }, + + check: function(){ + if (!this.timer) return true; + switch (this.options.link){ + case 'cancel': this.cancel(); return true; + case 'chain': this.chain(this.caller.bind(this, arguments)); return false; + } + return false; + }, + + start: function(from, to){ + if (!this.check(from, to)) return this; + this.from = from; + this.to = to; + this.time = 0; + this.transition = this.getTransition(); + this.startTimer(); + this.onStart(); + return this; + }, + + complete: function(){ + if (this.stopTimer()) this.onComplete(); + return this; + }, + + cancel: function(){ + if (this.stopTimer()) this.onCancel(); + return this; + }, + + onStart: function(){ + this.fireEvent('start', this.subject); + }, + + onComplete: function(){ + this.fireEvent('complete', this.subject); + if (!this.callChain()) this.fireEvent('chainComplete', this.subject); + }, + + onCancel: function(){ + this.fireEvent('cancel', this.subject).clearChain(); + }, + + pause: function(){ + this.stopTimer(); + return this; + }, + + resume: function(){ + this.startTimer(); + return this; + }, + + stopTimer: function(){ + if (!this.timer) return false; + this.time = $time() - this.time; + this.timer = $clear(this.timer); + return true; + }, + + startTimer: function(){ + if (this.timer) return false; + this.time = $time() - this.time; + this.timer = this.step.periodical(Math.round(1000 / this.options.fps), this); + return true; + } + +}); + +Fx.compute = function(from, to, delta){ + return (to - from) * delta + from; +}; + +Fx.Durations = {'short': 250, 'normal': 500, 'long': 1000}; + + +/* +--- + +name: Fx.CSS + +description: Contains the CSS animation logic. Used by Fx.Tween, Fx.Morph, Fx.Elements. + +license: MIT-style license. + +requires: [Fx, Element.Style] + +provides: Fx.CSS + +... +*/ + +Fx.CSS = new Class({ + + Extends: Fx, + + //prepares the base from/to object + + prepare: function(element, property, values){ + values = $splat(values); + var values1 = values[1]; + if (!$chk(values1)){ + values[1] = values[0]; + values[0] = element.getStyle(property); + } + var parsed = values.map(this.parse); + return {from: parsed[0], to: parsed[1]}; + }, + + //parses a value into an array + + parse: function(value){ + value = $lambda(value)(); + value = (typeof value == 'string') ? value.split(' ') : $splat(value); + return value.map(function(val){ + val = String(val); + var found = false; + Fx.CSS.Parsers.each(function(parser, key){ + if (found) return; + var parsed = parser.parse(val); + if ($chk(parsed)) found = {value: parsed, parser: parser}; + }); + found = found || {value: val, parser: Fx.CSS.Parsers.String}; + return found; + }); + }, + + //computes by a from and to prepared objects, using their parsers. + + compute: function(from, to, delta){ + var computed = []; + (Math.min(from.length, to.length)).times(function(i){ + computed.push({value: from[i].parser.compute(from[i].value, to[i].value, delta), parser: from[i].parser}); + }); + computed.$family = {name: 'fx:css:value'}; + return computed; + }, + + //serves the value as settable + + serve: function(value, unit){ + if ($type(value) != 'fx:css:value') value = this.parse(value); + var returned = []; + value.each(function(bit){ + returned = returned.concat(bit.parser.serve(bit.value, unit)); + }); + return returned; + }, + + //renders the change to an element + + render: function(element, property, value, unit){ + element.setStyle(property, this.serve(value, unit)); + }, + + //searches inside the page css to find the values for a selector + + search: function(selector){ + if (Fx.CSS.Cache[selector]) return Fx.CSS.Cache[selector]; + var to = {}; + Array.each(document.styleSheets, function(sheet, j){ + var href = sheet.href; + if (href && href.contains('://') && !href.contains(document.domain)) return; + var rules = sheet.rules || sheet.cssRules; + Array.each(rules, function(rule, i){ + if (!rule.style) return; + var selectorText = (rule.selectorText) ? rule.selectorText.replace(/^\w+/, function(m){ + return m.toLowerCase(); + }) : null; + if (!selectorText || !selectorText.test('^' + selector + '$')) return; + Element.Styles.each(function(value, style){ + if (!rule.style[style] || Element.ShortStyles[style]) return; + value = String(rule.style[style]); + to[style] = (value.test(/^rgb/)) ? value.rgbToHex() : value; + }); + }); + }); + return Fx.CSS.Cache[selector] = to; + } + +}); + +Fx.CSS.Cache = {}; + +Fx.CSS.Parsers = new Hash({ + + Color: { + parse: function(value){ + if (value.match(/^#[0-9a-f]{3,6}$/i)) return value.hexToRgb(true); + return ((value = value.match(/(\d+),\s*(\d+),\s*(\d+)/))) ? [value[1], value[2], value[3]] : false; + }, + compute: function(from, to, delta){ + return from.map(function(value, i){ + return Math.round(Fx.compute(from[i], to[i], delta)); + }); + }, + serve: function(value){ + return value.map(Number); + } + }, + + Number: { + parse: parseFloat, + compute: Fx.compute, + serve: function(value, unit){ + return (unit) ? value + unit : value; + } + }, + + String: { + parse: $lambda(false), + compute: $arguments(1), + serve: $arguments(0) + } + +}); + + +/* +--- + +name: Fx.Morph + +description: Formerly Fx.Styles, effect to transition any number of CSS properties for an element using an object of rules, or CSS based selector rules. + +license: MIT-style license. + +requires: Fx.CSS + +provides: Fx.Morph + +... +*/ + +Fx.Morph = new Class({ + + Extends: Fx.CSS, + + initialize: function(element, options){ + this.element = this.subject = document.id(element); + this.parent(options); + }, + + set: function(now){ + if (typeof now == 'string') now = this.search(now); + for (var p in now) this.render(this.element, p, now[p], this.options.unit); + return this; + }, + + compute: function(from, to, delta){ + var now = {}; + for (var p in from) now[p] = this.parent(from[p], to[p], delta); + return now; + }, + + start: function(properties){ + if (!this.check(properties)) return this; + if (typeof properties == 'string') properties = this.search(properties); + var from = {}, to = {}; + for (var p in properties){ + var parsed = this.prepare(this.element, p, properties[p]); + from[p] = parsed.from; + to[p] = parsed.to; + } + return this.parent(from, to); + } + +}); + +Element.Properties.morph = { + + set: function(options){ + var morph = this.retrieve('morph'); + if (morph) morph.cancel(); + return this.eliminate('morph').store('morph:options', $extend({link: 'cancel'}, options)); + }, + + get: function(options){ + if (options || !this.retrieve('morph')){ + if (options || !this.retrieve('morph:options')) this.set('morph', options); + this.store('morph', new Fx.Morph(this, this.retrieve('morph:options'))); + } + return this.retrieve('morph'); + } + +}; + +Element.implement({ + + morph: function(props){ + this.get('morph').start(props); + return this; + } + +}); + + +/* +--- + +name: Fx.Transitions + +description: Contains a set of advanced transitions to be used with any of the Fx Classes. + +license: MIT-style license. + +credits: Easing Equations by Robert Penner, , modified and optimized to be used with MooTools. + +requires: Fx + +provides: Fx.Transitions + +... +*/ + +Fx.implement({ + + getTransition: function(){ + var trans = this.options.transition || Fx.Transitions.Sine.easeInOut; + if (typeof trans == 'string'){ + var data = trans.split(':'); + trans = Fx.Transitions; + trans = trans[data[0]] || trans[data[0].capitalize()]; + if (data[1]) trans = trans['ease' + data[1].capitalize() + (data[2] ? data[2].capitalize() : '')]; + } + return trans; + } + +}); + +Fx.Transition = function(transition, params){ + params = $splat(params); + return $extend(transition, { + easeIn: function(pos){ + return transition(pos, params); + }, + easeOut: function(pos){ + return 1 - transition(1 - pos, params); + }, + easeInOut: function(pos){ + return (pos <= 0.5) ? transition(2 * pos, params) / 2 : (2 - transition(2 * (1 - pos), params)) / 2; + } + }); +}; + +Fx.Transitions = new Hash({ + + linear: $arguments(0) + +}); + +Fx.Transitions.extend = function(transitions){ + for (var transition in transitions) Fx.Transitions[transition] = new Fx.Transition(transitions[transition]); +}; + +Fx.Transitions.extend({ + + Pow: function(p, x){ + return Math.pow(p, x[0] || 6); + }, + + Expo: function(p){ + return Math.pow(2, 8 * (p - 1)); + }, + + Circ: function(p){ + return 1 - Math.sin(Math.acos(p)); + }, + + Sine: function(p){ + return 1 - Math.sin((1 - p) * Math.PI / 2); + }, + + Back: function(p, x){ + x = x[0] || 1.618; + return Math.pow(p, 2) * ((x + 1) * p - x); + }, + + Bounce: function(p){ + var value; + for (var a = 0, b = 1; 1; a += b, b /= 2){ + if (p >= (7 - 4 * a) / 11){ + value = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2); + break; + } + } + return value; + }, + + Elastic: function(p, x){ + return Math.pow(2, 10 * --p) * Math.cos(20 * p * Math.PI * (x[0] || 1) / 3); + } + +}); + +['Quad', 'Cubic', 'Quart', 'Quint'].each(function(transition, i){ + Fx.Transitions[transition] = new Fx.Transition(function(p){ + return Math.pow(p, [i + 2]); + }); +}); + + +/* +--- + +name: Fx.Tween + +description: Formerly Fx.Style, effect to transition any CSS property for an element. + +license: MIT-style license. + +requires: Fx.CSS + +provides: [Fx.Tween, Element.fade, Element.highlight] + +... +*/ + +Fx.Tween = new Class({ + + Extends: Fx.CSS, + + initialize: function(element, options){ + this.element = this.subject = document.id(element); + this.parent(options); + }, + + set: function(property, now){ + if (arguments.length == 1){ + now = property; + property = this.property || this.options.property; + } + this.render(this.element, property, now, this.options.unit); + return this; + }, + + start: function(property, from, to){ + if (!this.check(property, from, to)) return this; + var args = Array.flatten(arguments); + this.property = this.options.property || args.shift(); + var parsed = this.prepare(this.element, this.property, args); + return this.parent(parsed.from, parsed.to); + } + +}); + +Element.Properties.tween = { + + set: function(options){ + var tween = this.retrieve('tween'); + if (tween) tween.cancel(); + return this.eliminate('tween').store('tween:options', $extend({link: 'cancel'}, options)); + }, + + get: function(options){ + if (options || !this.retrieve('tween')){ + if (options || !this.retrieve('tween:options')) this.set('tween', options); + this.store('tween', new Fx.Tween(this, this.retrieve('tween:options'))); + } + return this.retrieve('tween'); + } + +}; + +Element.implement({ + + tween: function(property, from, to){ + this.get('tween').start(arguments); + return this; + }, + + fade: function(how){ + var fade = this.get('tween'), o = 'opacity', toggle; + how = $pick(how, 'toggle'); + switch (how){ + case 'in': fade.start(o, 1); break; + case 'out': fade.start(o, 0); break; + case 'show': fade.set(o, 1); break; + case 'hide': fade.set(o, 0); break; + case 'toggle': + var flag = this.retrieve('fade:flag', this.get('opacity') == 1); + fade.start(o, (flag) ? 0 : 1); + this.store('fade:flag', !flag); + toggle = true; + break; + default: fade.start(o, arguments); + } + if (!toggle) this.eliminate('fade:flag'); + return this; + }, + + highlight: function(start, end){ + if (!end){ + end = this.retrieve('highlight:original', this.getStyle('background-color')); + end = (end == 'transparent') ? '#fff' : end; + } + var tween = this.get('tween'); + tween.start('background-color', start || '#ffff88', end).chain(function(){ + this.setStyle('background-color', this.retrieve('highlight:original')); + tween.callChain(); + }.bind(this)); + return this; + } + +}); + + +/* +--- + +name: Request + +description: Powerful all purpose Request Class. Uses XMLHTTPRequest. + +license: MIT-style license. + +requires: [Element, Chain, Events, Options, Browser] + +provides: Request + +... +*/ + +var Request = new Class({ + + Implements: [Chain, Events, Options], + + options: {/* + onRequest: $empty, + onComplete: $empty, + onCancel: $empty, + onSuccess: $empty, + onFailure: $empty, + onException: $empty,*/ + url: '', + data: '', + headers: { + 'X-Requested-With': 'XMLHttpRequest', + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }, + async: true, + format: false, + method: 'post', + link: 'ignore', + isSuccess: null, + emulation: true, + urlEncoded: true, + encoding: 'utf-8', + evalScripts: false, + evalResponse: false, + noCache: false + }, + + initialize: function(options){ + this.xhr = new Browser.Request(); + this.setOptions(options); + this.options.isSuccess = this.options.isSuccess || this.isSuccess; + this.headers = new Hash(this.options.headers); + }, + + onStateChange: function(){ + if (this.xhr.readyState != 4 || !this.running) return; + this.running = false; + this.status = 0; + $try(function(){ + this.status = this.xhr.status; + }.bind(this)); + this.xhr.onreadystatechange = $empty; + if (this.options.isSuccess.call(this, this.status)){ + this.response = {text: this.xhr.responseText, xml: this.xhr.responseXML}; + this.success(this.response.text, this.response.xml); + } else { + this.response = {text: null, xml: null}; + this.failure(); + } + }, + + isSuccess: function(){ + return ((this.status >= 200) && (this.status < 300)); + }, + + processScripts: function(text){ + if (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) return $exec(text); + return text.stripScripts(this.options.evalScripts); + }, + + success: function(text, xml){ + this.onSuccess(this.processScripts(text), xml); + }, + + onSuccess: function(){ + this.fireEvent('complete', arguments).fireEvent('success', arguments).callChain(); + }, + + failure: function(){ + this.onFailure(); + }, + + onFailure: function(){ + this.fireEvent('complete').fireEvent('failure', this.xhr); + }, + + setHeader: function(name, value){ + this.headers.set(name, value); + return this; + }, + + getHeader: function(name){ + return $try(function(){ + return this.xhr.getResponseHeader(name); + }.bind(this)); + }, + + check: function(){ + if (!this.running) return true; + switch (this.options.link){ + case 'cancel': this.cancel(); return true; + case 'chain': this.chain(this.caller.bind(this, arguments)); return false; + } + return false; + }, + + send: function(options){ + if (!this.check(options)) return this; + this.running = true; + + var type = $type(options); + if (type == 'string' || type == 'element') options = {data: options}; + + var old = this.options; + options = $extend({data: old.data, url: old.url, method: old.method}, options); + var data = options.data, url = String(options.url), method = options.method.toLowerCase(); + + switch ($type(data)){ + case 'element': data = document.id(data).toQueryString(); break; + case 'object': case 'hash': data = Hash.toQueryString(data); + } + + if (this.options.format){ + var format = 'format=' + this.options.format; + data = (data) ? format + '&' + data : format; + } + + if (this.options.emulation && !['get', 'post'].contains(method)){ + var _method = '_method=' + method; + data = (data) ? _method + '&' + data : _method; + method = 'post'; + } + + if (this.options.urlEncoded && method == 'post'){ + var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : ''; + this.headers.set('Content-type', 'application/x-www-form-urlencoded' + encoding); + } + + if (this.options.noCache){ + var noCache = 'noCache=' + new Date().getTime(); + data = (data) ? noCache + '&' + data : noCache; + } + + var trimPosition = url.lastIndexOf('/'); + if (trimPosition > -1 && (trimPosition = url.indexOf('#')) > -1) url = url.substr(0, trimPosition); + + if (data && method == 'get'){ + url = url + (url.contains('?') ? '&' : '?') + data; + data = null; + } + + this.xhr.open(method.toUpperCase(), url, this.options.async); + + this.xhr.onreadystatechange = this.onStateChange.bind(this); + + this.headers.each(function(value, key){ + try { + this.xhr.setRequestHeader(key, value); + } catch (e){ + this.fireEvent('exception', [key, value]); + } + }, this); + + this.fireEvent('request'); + this.xhr.send(data); + if (!this.options.async) this.onStateChange(); + return this; + }, + + cancel: function(){ + if (!this.running) return this; + this.running = false; + this.xhr.abort(); + this.xhr.onreadystatechange = $empty; + this.xhr = new Browser.Request(); + this.fireEvent('cancel'); + return this; + } + +}); + +(function(){ + +var methods = {}; +['get', 'post', 'put', 'delete', 'GET', 'POST', 'PUT', 'DELETE'].each(function(method){ + methods[method] = function(){ + var params = Array.link(arguments, {url: String.type, data: $defined}); + return this.send($extend(params, {method: method})); + }; +}); + +Request.implement(methods); + +})(); + +Element.Properties.send = { + + set: function(options){ + var send = this.retrieve('send'); + if (send) send.cancel(); + return this.eliminate('send').store('send:options', $extend({ + data: this, link: 'cancel', method: this.get('method') || 'post', url: this.get('action') + }, options)); + }, + + get: function(options){ + if (options || !this.retrieve('send')){ + if (options || !this.retrieve('send:options')) this.set('send', options); + this.store('send', new Request(this.retrieve('send:options'))); + } + return this.retrieve('send'); + } + +}; + +Element.implement({ + + send: function(url){ + var sender = this.get('send'); + sender.send({data: this, url: url || sender.options.url}); + return this; + } + +}); + + +/* +--- + +name: Request.HTML + +description: Extends the basic Request Class with additional methods for interacting with HTML responses. + +license: MIT-style license. + +requires: [Request, Element] + +provides: Request.HTML + +... +*/ + +Request.HTML = new Class({ + + Extends: Request, + + options: { + update: false, + append: false, + evalScripts: true, + filter: false + }, + + processHTML: function(text){ + var match = text.match(/]*>([\s\S]*?)<\/body>/i); + text = (match) ? match[1] : text; + + var container = new Element('div'); + + return $try(function(){ + var root = '' + text + '', doc; + if (Browser.Engine.trident){ + doc = new ActiveXObject('Microsoft.XMLDOM'); + doc.async = false; + doc.loadXML(root); + } else { + doc = new DOMParser().parseFromString(root, 'text/xml'); + } + root = doc.getElementsByTagName('root')[0]; + if (!root) return null; + for (var i = 0, k = root.childNodes.length; i < k; i++){ + var child = Element.clone(root.childNodes[i], true, true); + if (child) container.grab(child); + } + return container; + }) || container.set('html', text); + }, + + success: function(text){ + var options = this.options, response = this.response; + + response.html = text.stripScripts(function(script){ + response.javascript = script; + }); + + var temp = this.processHTML(response.html); + + response.tree = temp.childNodes; + response.elements = temp.getElements('*'); + + if (options.filter) response.tree = response.elements.filter(options.filter); + if (options.update) document.id(options.update).empty().set('html', response.html); + else if (options.append) document.id(options.append).adopt(temp.getChildren()); + if (options.evalScripts) $exec(response.javascript); + + this.onSuccess(response.tree, response.elements, response.html, response.javascript); + } + +}); + +Element.Properties.load = { + + set: function(options){ + var load = this.retrieve('load'); + if (load) load.cancel(); + return this.eliminate('load').store('load:options', $extend({data: this, link: 'cancel', update: this, method: 'get'}, options)); + }, + + get: function(options){ + if (options || ! this.retrieve('load')){ + if (options || !this.retrieve('load:options')) this.set('load', options); + this.store('load', new Request.HTML(this.retrieve('load:options'))); + } + return this.retrieve('load'); + } + +}; + +Element.implement({ + + load: function(){ + this.get('load').send(Array.link(arguments, {data: Object.type, url: String.type})); + return this; + } + +}); + + +/* +--- + +name: JSON + +description: JSON encoder and decoder. + +license: MIT-style license. + +see: + +requires: [Array, String, Number, Function, Hash] + +provides: JSON + +... +*/ + +var JSON = new Hash(this.JSON && { + stringify: JSON.stringify, + parse: JSON.parse +}).extend({ + + $specialChars: {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\'}, + + $replaceChars: function(chr){ + return JSON.$specialChars[chr] || '\\u00' + Math.floor(chr.charCodeAt() / 16).toString(16) + (chr.charCodeAt() % 16).toString(16); + }, + + encode: function(obj){ + switch ($type(obj)){ + case 'string': + return '"' + obj.replace(/[\x00-\x1f\\"]/g, JSON.$replaceChars) + '"'; + case 'array': + return '[' + String(obj.map(JSON.encode).clean()) + ']'; + case 'object': case 'hash': + var string = []; + Hash.each(obj, function(value, key){ + var json = JSON.encode(value); + if (json) string.push(JSON.encode(key) + ':' + json); + }); + return '{' + string + '}'; + case 'number': case 'boolean': return String(obj); + case false: return 'null'; + } + return null; + }, + + decode: function(string, secure){ + if ($type(string) != 'string' || !string.length) return null; + if (secure && !(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''))) return null; + return eval('(' + string + ')'); + } + +}); + + +/* +--- + +name: Request.JSON + +description: Extends the basic Request Class with additional methods for sending and receiving JSON data. + +license: MIT-style license. + +requires: [Request, JSON] + +provides: [Request.JSON] + +... +*/ + +Request.JSON = new Class({ + + Extends: Request, + + options: { + secure: true + }, + + initialize: function(options){ + this.parent(options); + this.headers.extend({'Accept': 'application/json', 'X-Request': 'JSON'}); + }, + + success: function(text){ + this.response.json = JSON.decode(text, this.options.secure); + this.onSuccess(this.response.json, text); + } + +}); + + +/* +--- + +name: Cookie + +description: Class for creating, reading, and deleting browser Cookies. + +license: MIT-style license. + +credits: Based on the functions by Peter-Paul Koch (http://quirksmode.org). + +requires: Options + +provides: Cookie + +... +*/ + +var Cookie = new Class({ + + Implements: Options, + + options: { + path: false, + domain: false, + duration: false, + secure: false, + document: document + }, + + initialize: function(key, options){ + this.key = key; + this.setOptions(options); + }, + + write: function(value){ + value = encodeURIComponent(value); + if (this.options.domain) value += '; domain=' + this.options.domain; + if (this.options.path) value += '; path=' + this.options.path; + if (this.options.duration){ + var date = new Date(); + date.setTime(date.getTime() + this.options.duration * 24 * 60 * 60 * 1000); + value += '; expires=' + date.toGMTString(); + } + if (this.options.secure) value += '; secure'; + this.options.document.cookie = this.key + '=' + value; + return this; + }, + + read: function(){ + var value = this.options.document.cookie.match('(?:^|;)\\s*' + this.key.escapeRegExp() + '=([^;]*)'); + return (value) ? decodeURIComponent(value[1]) : null; + }, + + dispose: function(){ + new Cookie(this.key, $merge(this.options, {duration: -1})).write(''); + return this; + } + +}); + +Cookie.write = function(key, value, options){ + return new Cookie(key, options).write(value); +}; + +Cookie.read = function(key){ + return new Cookie(key).read(); +}; + +Cookie.dispose = function(key, options){ + return new Cookie(key, options).dispose(); +}; + + +/* +--- + +name: DomReady + +description: Contains the custom event domready. + +license: MIT-style license. + +requires: Element.Event + +provides: DomReady + +... +*/ + +Element.Events.domready = { + + onAdd: function(fn){ + if (Browser.loaded) fn.call(this); + } + +}; + +(function(){ + + var domready = function(){ + if (Browser.loaded) return; + Browser.loaded = true; + window.fireEvent('domready'); + document.fireEvent('domready'); + }; + + window.addEvent('load', domready); + + if (Browser.Engine.trident){ + var temp = document.createElement('div'); + (function(){ + ($try(function(){ + temp.doScroll(); // Technique by Diego Perini + return document.id(temp).inject(document.body).set('html', 'temp').dispose(); + })) ? domready() : arguments.callee.delay(50); + })(); + } else if (Browser.Engine.webkit && Browser.Engine.version < 525){ + (function(){ + (['loaded', 'complete'].contains(document.readyState)) ? domready() : arguments.callee.delay(50); + })(); + } else { + document.addEvent('DOMContentLoaded', domready); + } + +})(); + + +/* +--- + +name: Selectors + +description: Adds advanced CSS-style querying capabilities for targeting HTML Elements. Includes pseudo selectors. + +license: MIT-style license. + +requires: Element + +provides: Selectors + +... +*/ + +Native.implement([Document, Element], { + + getElements: function(expression, nocash){ + expression = expression.split(','); + var items, local = {}; + for (var i = 0, l = expression.length; i < l; i++){ + var selector = expression[i], elements = Selectors.Utils.search(this, selector, local); + if (i != 0 && elements.item) elements = $A(elements); + items = (i == 0) ? elements : (items.item) ? $A(items).concat(elements) : items.concat(elements); + } + return new Elements(items, {ddup: (expression.length > 1), cash: !nocash}); + } + +}); + +Element.implement({ + + match: function(selector){ + if (!selector || (selector == this)) return true; + var tagid = Selectors.Utils.parseTagAndID(selector); + var tag = tagid[0], id = tagid[1]; + if (!Selectors.Filters.byID(this, id) || !Selectors.Filters.byTag(this, tag)) return false; + var parsed = Selectors.Utils.parseSelector(selector); + return (parsed) ? Selectors.Utils.filter(this, parsed, {}) : true; + } + +}); + +var Selectors = {Cache: {nth: {}, parsed: {}}}; + +Selectors.RegExps = { + id: (/#([\w-]+)/), + tag: (/^(\w+|\*)/), + quick: (/^(\w+|\*)$/), + splitter: (/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g), + combined: (/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g) +}; + +Selectors.Utils = { + + chk: function(item, uniques){ + if (!uniques) return true; + var uid = $uid(item); + if (!uniques[uid]) return uniques[uid] = true; + return false; + }, + + parseNthArgument: function(argument){ + if (Selectors.Cache.nth[argument]) return Selectors.Cache.nth[argument]; + var parsed = argument.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/); + if (!parsed) return false; + var inta = parseInt(parsed[1], 10); + var a = (inta || inta === 0) ? inta : 1; + var special = parsed[2] || false; + var b = parseInt(parsed[3], 10) || 0; + if (a != 0){ + b--; + while (b < 1) b += a; + while (b >= a) b -= a; + } else { + a = b; + special = 'index'; + } + switch (special){ + case 'n': parsed = {a: a, b: b, special: 'n'}; break; + case 'odd': parsed = {a: 2, b: 0, special: 'n'}; break; + case 'even': parsed = {a: 2, b: 1, special: 'n'}; break; + case 'first': parsed = {a: 0, special: 'index'}; break; + case 'last': parsed = {special: 'last-child'}; break; + case 'only': parsed = {special: 'only-child'}; break; + default: parsed = {a: (a - 1), special: 'index'}; + } + + return Selectors.Cache.nth[argument] = parsed; + }, + + parseSelector: function(selector){ + if (Selectors.Cache.parsed[selector]) return Selectors.Cache.parsed[selector]; + var m, parsed = {classes: [], pseudos: [], attributes: []}; + while ((m = Selectors.RegExps.combined.exec(selector))){ + var cn = m[1], an = m[2], ao = m[3], av = m[5], pn = m[6], pa = m[7]; + if (cn){ + parsed.classes.push(cn); + } else if (pn){ + var parser = Selectors.Pseudo.get(pn); + if (parser) parsed.pseudos.push({parser: parser, argument: pa}); + else parsed.attributes.push({name: pn, operator: '=', value: pa}); + } else if (an){ + parsed.attributes.push({name: an, operator: ao, value: av}); + } + } + if (!parsed.classes.length) delete parsed.classes; + if (!parsed.attributes.length) delete parsed.attributes; + if (!parsed.pseudos.length) delete parsed.pseudos; + if (!parsed.classes && !parsed.attributes && !parsed.pseudos) parsed = null; + return Selectors.Cache.parsed[selector] = parsed; + }, + + parseTagAndID: function(selector){ + var tag = selector.match(Selectors.RegExps.tag); + var id = selector.match(Selectors.RegExps.id); + return [(tag) ? tag[1] : '*', (id) ? id[1] : false]; + }, + + filter: function(item, parsed, local){ + var i; + if (parsed.classes){ + for (i = parsed.classes.length; i--; i){ + var cn = parsed.classes[i]; + if (!Selectors.Filters.byClass(item, cn)) return false; + } + } + if (parsed.attributes){ + for (i = parsed.attributes.length; i--; i){ + var att = parsed.attributes[i]; + if (!Selectors.Filters.byAttribute(item, att.name, att.operator, att.value)) return false; + } + } + if (parsed.pseudos){ + for (i = parsed.pseudos.length; i--; i){ + var psd = parsed.pseudos[i]; + if (!Selectors.Filters.byPseudo(item, psd.parser, psd.argument, local)) return false; + } + } + return true; + }, + + getByTagAndID: function(ctx, tag, id){ + if (id){ + var item = (ctx.getElementById) ? ctx.getElementById(id, true) : Element.getElementById(ctx, id, true); + return (item && Selectors.Filters.byTag(item, tag)) ? [item] : []; + } else { + return ctx.getElementsByTagName(tag); + } + }, + + search: function(self, expression, local){ + var splitters = []; + + var selectors = expression.trim().replace(Selectors.RegExps.splitter, function(m0, m1, m2){ + splitters.push(m1); + return ':)' + m2; + }).split(':)'); + + var items, filtered, item; + + for (var i = 0, l = selectors.length; i < l; i++){ + + var selector = selectors[i]; + + if (i == 0 && Selectors.RegExps.quick.test(selector)){ + items = self.getElementsByTagName(selector); + continue; + } + + var splitter = splitters[i - 1]; + + var tagid = Selectors.Utils.parseTagAndID(selector); + var tag = tagid[0], id = tagid[1]; + + if (i == 0){ + items = Selectors.Utils.getByTagAndID(self, tag, id); + } else { + var uniques = {}, found = []; + for (var j = 0, k = items.length; j < k; j++) found = Selectors.Getters[splitter](found, items[j], tag, id, uniques); + items = found; + } + + var parsed = Selectors.Utils.parseSelector(selector); + + if (parsed){ + filtered = []; + for (var m = 0, n = items.length; m < n; m++){ + item = items[m]; + if (Selectors.Utils.filter(item, parsed, local)) filtered.push(item); + } + items = filtered; + } + + } + + return items; + + } + +}; + +Selectors.Getters = { + + ' ': function(found, self, tag, id, uniques){ + var items = Selectors.Utils.getByTagAndID(self, tag, id); + for (var i = 0, l = items.length; i < l; i++){ + var item = items[i]; + if (Selectors.Utils.chk(item, uniques)) found.push(item); + } + return found; + }, + + '>': function(found, self, tag, id, uniques){ + var children = Selectors.Utils.getByTagAndID(self, tag, id); + for (var i = 0, l = children.length; i < l; i++){ + var child = children[i]; + if (child.parentNode == self && Selectors.Utils.chk(child, uniques)) found.push(child); + } + return found; + }, + + '+': function(found, self, tag, id, uniques){ + while ((self = self.nextSibling)){ + if (self.nodeType == 1){ + if (Selectors.Utils.chk(self, uniques) && Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self); + break; + } + } + return found; + }, + + '~': function(found, self, tag, id, uniques){ + while ((self = self.nextSibling)){ + if (self.nodeType == 1){ + if (!Selectors.Utils.chk(self, uniques)) break; + if (Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self); + } + } + return found; + } + +}; + +Selectors.Filters = { + + byTag: function(self, tag){ + return (tag == '*' || (self.tagName && self.tagName.toLowerCase() == tag)); + }, + + byID: function(self, id){ + return (!id || (self.id && self.id == id)); + }, + + byClass: function(self, klass){ + return (self.className && self.className.contains && self.className.contains(klass, ' ')); + }, + + byPseudo: function(self, parser, argument, local){ + return parser.call(self, argument, local); + }, + + byAttribute: function(self, name, operator, value){ + var result = Element.prototype.getProperty.call(self, name); + if (!result) return (operator == '!='); + if (!operator || value == undefined) return true; + switch (operator){ + case '=': return (result == value); + case '*=': return (result.contains(value)); + case '^=': return (result.substr(0, value.length) == value); + case '$=': return (result.substr(result.length - value.length) == value); + case '!=': return (result != value); + case '~=': return result.contains(value, ' '); + case '|=': return result.contains(value, '-'); + } + return false; + } + +}; + +Selectors.Pseudo = new Hash({ + + // w3c pseudo selectors + + checked: function(){ + return this.checked; + }, + + empty: function(){ + return !(this.innerText || this.textContent || '').length; + }, + + not: function(selector){ + return !Element.match(this, selector); + }, + + contains: function(text){ + return (this.innerText || this.textContent || '').contains(text); + }, + + 'first-child': function(){ + return Selectors.Pseudo.index.call(this, 0); + }, + + 'last-child': function(){ + var element = this; + while ((element = element.nextSibling)){ + if (element.nodeType == 1) return false; + } + return true; + }, + + 'only-child': function(){ + var prev = this; + while ((prev = prev.previousSibling)){ + if (prev.nodeType == 1) return false; + } + var next = this; + while ((next = next.nextSibling)){ + if (next.nodeType == 1) return false; + } + return true; + }, + + 'nth-child': function(argument, local){ + argument = (argument == undefined) ? 'n' : argument; + var parsed = Selectors.Utils.parseNthArgument(argument); + if (parsed.special != 'n') return Selectors.Pseudo[parsed.special].call(this, parsed.a, local); + var count = 0; + local.positions = local.positions || {}; + var uid = $uid(this); + if (!local.positions[uid]){ + var self = this; + while ((self = self.previousSibling)){ + if (self.nodeType != 1) continue; + count ++; + var position = local.positions[$uid(self)]; + if (position != undefined){ + count = position + count; + break; + } + } + local.positions[uid] = count; + } + return (local.positions[uid] % parsed.a == parsed.b); + }, + + // custom pseudo selectors + + index: function(index){ + var element = this, count = 0; + while ((element = element.previousSibling)){ + if (element.nodeType == 1 && ++count > index) return false; + } + return (count == index); + }, + + even: function(argument, local){ + return Selectors.Pseudo['nth-child'].call(this, '2n+1', local); + }, + + odd: function(argument, local){ + return Selectors.Pseudo['nth-child'].call(this, '2n', local); + }, + + selected: function(){ + return this.selected; + }, + + enabled: function(){ + return (this.disabled === false); + } + +}); + + +/* +--- + +name: Swiff + +description: Wrapper for embedding SWF movies. Supports External Interface Communication. + +license: MIT-style license. + +credits: Flash detection & Internet Explorer + Flash Player 9 fix inspired by SWFObject. + +requires: [Options, $util] + +provides: Swiff + +... +*/ + +var Swiff = new Class({ + + Implements: [Options], + + options: { + id: null, + height: 1, + width: 1, + container: null, + properties: {}, + params: { + quality: 'high', + allowScriptAccess: 'always', + wMode: 'transparent', + swLiveConnect: true + }, + callBacks: {}, + vars: {} + }, + + toElement: function(){ + return this.object; + }, + + initialize: function(path, options){ + this.instance = 'Swiff_' + $time(); + + this.setOptions(options); + options = this.options; + var id = this.id = options.id || this.instance; + var container = document.id(options.container); + + Swiff.CallBacks[this.instance] = {}; + + var params = options.params, vars = options.vars, callBacks = options.callBacks; + var properties = $extend({height: options.height, width: options.width}, options.properties); + + var self = this; + + for (var callBack in callBacks){ + Swiff.CallBacks[this.instance][callBack] = (function(option){ + return function(){ + return option.apply(self.object, arguments); + }; + })(callBacks[callBack]); + vars[callBack] = 'Swiff.CallBacks.' + this.instance + '.' + callBack; + } + + params.flashVars = Hash.toQueryString(vars); + if (Browser.Engine.trident){ + properties.classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; + params.movie = path; + } else { + properties.type = 'application/x-shockwave-flash'; + properties.data = path; + } + var build = ''; + } + build += ''; + this.object = ((container) ? container.empty() : new Element('div')).set('html', build).firstChild; + }, + + replaces: function(element){ + element = document.id(element, true); + element.parentNode.replaceChild(this.toElement(), element); + return this; + }, + + inject: function(element){ + document.id(element, true).appendChild(this.toElement()); + return this; + }, + + remote: function(){ + return Swiff.remote.apply(Swiff, [this.toElement()].extend(arguments)); + } + +}); + +Swiff.CallBacks = {}; + +Swiff.remote = function(obj, fn){ + var rs = obj.CallFunction('' + __flash__argumentsToXML(arguments, 2) + ''); + return eval(rs); +}; + diff --git a/Demos/Shoutbox/demo.html b/Demos/Shoutbox/demo.html index aee8aa7..93d4f3a 100755 --- a/Demos/Shoutbox/demo.html +++ b/Demos/Shoutbox/demo.html @@ -2,9 +2,9 @@ - - - + + + diff --git a/Demos/Shoutbox/mootools-core.js b/Demos/Shoutbox/mootools-core.js new file mode 100644 index 0000000..384c393 --- /dev/null +++ b/Demos/Shoutbox/mootools-core.js @@ -0,0 +1,4288 @@ +/* +--- + +name: Core + +description: The core of MooTools, contains all the base functions and the Native and Hash implementations. Required by all the other scripts. + +license: MIT-style license. + +copyright: Copyright (c) 2006-2008 [Valerio Proietti](http://mad4milk.net/). + +authors: The MooTools production team (http://mootools.net/developers/) + +inspiration: + - Class implementation inspired by [Base.js](http://dean.edwards.name/weblog/2006/03/base/) Copyright (c) 2006 Dean Edwards, [GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php) + - Some functionality inspired by [Prototype.js](http://prototypejs.org) Copyright (c) 2005-2007 Sam Stephenson, [MIT License](http://opensource.org/licenses/mit-license.php) + +provides: [MooTools, Native, Hash.base, Array.each, $util] + +... +*/ + +var MooTools = { + 'version': '1.2.5', + 'build': '008d8f0f2fcc2044e54fdd3635341aaab274e757' +}; + +var Native = function(options){ + options = options || {}; + var name = options.name; + var legacy = options.legacy; + var protect = options.protect; + var methods = options.implement; + var generics = options.generics; + var initialize = options.initialize; + var afterImplement = options.afterImplement || function(){}; + var object = initialize || legacy; + generics = generics !== false; + + object.constructor = Native; + object.$family = {name: 'native'}; + if (legacy && initialize) object.prototype = legacy.prototype; + object.prototype.constructor = object; + + if (name){ + var family = name.toLowerCase(); + object.prototype.$family = {name: family}; + Native.typize(object, family); + } + + var add = function(obj, name, method, force){ + if (!protect || force || !obj.prototype[name]) obj.prototype[name] = method; + if (generics) Native.genericize(obj, name, protect); + afterImplement.call(obj, name, method); + return obj; + }; + + object.alias = function(a1, a2, a3){ + if (typeof a1 == 'string'){ + var pa1 = this.prototype[a1]; + if ((a1 = pa1)) return add(this, a2, a1, a3); + } + for (var a in a1) this.alias(a, a1[a], a2); + return this; + }; + + object.implement = function(a1, a2, a3){ + if (typeof a1 == 'string') return add(this, a1, a2, a3); + for (var p in a1) add(this, p, a1[p], a2); + return this; + }; + + if (methods) object.implement(methods); + + return object; +}; + +Native.genericize = function(object, property, check){ + if ((!check || !object[property]) && typeof object.prototype[property] == 'function') object[property] = function(){ + var args = Array.prototype.slice.call(arguments); + return object.prototype[property].apply(args.shift(), args); + }; +}; + +Native.implement = function(objects, properties){ + for (var i = 0, l = objects.length; i < l; i++) objects[i].implement(properties); +}; + +Native.typize = function(object, family){ + if (!object.type) object.type = function(item){ + return ($type(item) === family); + }; +}; + +(function(){ + var natives = {'Array': Array, 'Date': Date, 'Function': Function, 'Number': Number, 'RegExp': RegExp, 'String': String}; + for (var n in natives) new Native({name: n, initialize: natives[n], protect: true}); + + var types = {'boolean': Boolean, 'native': Native, 'object': Object}; + for (var t in types) Native.typize(types[t], t); + + var generics = { + 'Array': ["concat", "indexOf", "join", "lastIndexOf", "pop", "push", "reverse", "shift", "slice", "sort", "splice", "toString", "unshift", "valueOf"], + 'String': ["charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "match", "replace", "search", "slice", "split", "substr", "substring", "toLowerCase", "toUpperCase", "valueOf"] + }; + for (var g in generics){ + for (var i = generics[g].length; i--;) Native.genericize(natives[g], generics[g][i], true); + } +})(); + +var Hash = new Native({ + + name: 'Hash', + + initialize: function(object){ + if ($type(object) == 'hash') object = $unlink(object.getClean()); + for (var key in object) this[key] = object[key]; + return this; + } + +}); + +Hash.implement({ + + forEach: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key)) fn.call(bind, this[key], key, this); + } + }, + + getClean: function(){ + var clean = {}; + for (var key in this){ + if (this.hasOwnProperty(key)) clean[key] = this[key]; + } + return clean; + }, + + getLength: function(){ + var length = 0; + for (var key in this){ + if (this.hasOwnProperty(key)) length++; + } + return length; + } + +}); + +Hash.alias('forEach', 'each'); + +Array.implement({ + + forEach: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++) fn.call(bind, this[i], i, this); + } + +}); + +Array.alias('forEach', 'each'); + +function $A(iterable){ + if (iterable.item){ + var l = iterable.length, array = new Array(l); + while (l--) array[l] = iterable[l]; + return array; + } + return Array.prototype.slice.call(iterable); +}; + +function $arguments(i){ + return function(){ + return arguments[i]; + }; +}; + +function $chk(obj){ + return !!(obj || obj === 0); +}; + +function $clear(timer){ + clearTimeout(timer); + clearInterval(timer); + return null; +}; + +function $defined(obj){ + return (obj != undefined); +}; + +function $each(iterable, fn, bind){ + var type = $type(iterable); + ((type == 'arguments' || type == 'collection' || type == 'array') ? Array : Hash).each(iterable, fn, bind); +}; + +function $empty(){}; + +function $extend(original, extended){ + for (var key in (extended || {})) original[key] = extended[key]; + return original; +}; + +function $H(object){ + return new Hash(object); +}; + +function $lambda(value){ + return ($type(value) == 'function') ? value : function(){ + return value; + }; +}; + +function $merge(){ + var args = Array.slice(arguments); + args.unshift({}); + return $mixin.apply(null, args); +}; + +function $mixin(mix){ + for (var i = 1, l = arguments.length; i < l; i++){ + var object = arguments[i]; + if ($type(object) != 'object') continue; + for (var key in object){ + var op = object[key], mp = mix[key]; + mix[key] = (mp && $type(op) == 'object' && $type(mp) == 'object') ? $mixin(mp, op) : $unlink(op); + } + } + return mix; +}; + +function $pick(){ + for (var i = 0, l = arguments.length; i < l; i++){ + if (arguments[i] != undefined) return arguments[i]; + } + return null; +}; + +function $random(min, max){ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +function $splat(obj){ + var type = $type(obj); + return (type) ? ((type != 'array' && type != 'arguments') ? [obj] : obj) : []; +}; + +var $time = Date.now || function(){ + return +new Date; +}; + +function $try(){ + for (var i = 0, l = arguments.length; i < l; i++){ + try { + return arguments[i](); + } catch(e){} + } + return null; +}; + +function $type(obj){ + if (obj == undefined) return false; + if (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name; + if (obj.nodeName){ + switch (obj.nodeType){ + case 1: return 'element'; + case 3: return (/\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace'; + } + } else if (typeof obj.length == 'number'){ + if (obj.callee) return 'arguments'; + else if (obj.item) return 'collection'; + } + return typeof obj; +}; + +function $unlink(object){ + var unlinked; + switch ($type(object)){ + case 'object': + unlinked = {}; + for (var p in object) unlinked[p] = $unlink(object[p]); + break; + case 'hash': + unlinked = new Hash(object); + break; + case 'array': + unlinked = []; + for (var i = 0, l = object.length; i < l; i++) unlinked[i] = $unlink(object[i]); + break; + default: return object; + } + return unlinked; +}; + + +/* +--- + +name: Array + +description: Contains Array Prototypes like each, contains, and erase. + +license: MIT-style license. + +requires: [$util, Array.each] + +provides: Array + +... +*/ + +Array.implement({ + + every: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++){ + if (!fn.call(bind, this[i], i, this)) return false; + } + return true; + }, + + filter: function(fn, bind){ + var results = []; + for (var i = 0, l = this.length; i < l; i++){ + if (fn.call(bind, this[i], i, this)) results.push(this[i]); + } + return results; + }, + + clean: function(){ + return this.filter($defined); + }, + + indexOf: function(item, from){ + var len = this.length; + for (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){ + if (this[i] === item) return i; + } + return -1; + }, + + map: function(fn, bind){ + var results = []; + for (var i = 0, l = this.length; i < l; i++) results[i] = fn.call(bind, this[i], i, this); + return results; + }, + + some: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++){ + if (fn.call(bind, this[i], i, this)) return true; + } + return false; + }, + + associate: function(keys){ + var obj = {}, length = Math.min(this.length, keys.length); + for (var i = 0; i < length; i++) obj[keys[i]] = this[i]; + return obj; + }, + + link: function(object){ + var result = {}; + for (var i = 0, l = this.length; i < l; i++){ + for (var key in object){ + if (object[key](this[i])){ + result[key] = this[i]; + delete object[key]; + break; + } + } + } + return result; + }, + + contains: function(item, from){ + return this.indexOf(item, from) != -1; + }, + + extend: function(array){ + for (var i = 0, j = array.length; i < j; i++) this.push(array[i]); + return this; + }, + + getLast: function(){ + return (this.length) ? this[this.length - 1] : null; + }, + + getRandom: function(){ + return (this.length) ? this[$random(0, this.length - 1)] : null; + }, + + include: function(item){ + if (!this.contains(item)) this.push(item); + return this; + }, + + combine: function(array){ + for (var i = 0, l = array.length; i < l; i++) this.include(array[i]); + return this; + }, + + erase: function(item){ + for (var i = this.length; i--; i){ + if (this[i] === item) this.splice(i, 1); + } + return this; + }, + + empty: function(){ + this.length = 0; + return this; + }, + + flatten: function(){ + var array = []; + for (var i = 0, l = this.length; i < l; i++){ + var type = $type(this[i]); + if (!type) continue; + array = array.concat((type == 'array' || type == 'collection' || type == 'arguments') ? Array.flatten(this[i]) : this[i]); + } + return array; + }, + + hexToRgb: function(array){ + if (this.length != 3) return null; + var rgb = this.map(function(value){ + if (value.length == 1) value += value; + return value.toInt(16); + }); + return (array) ? rgb : 'rgb(' + rgb + ')'; + }, + + rgbToHex: function(array){ + if (this.length < 3) return null; + if (this.length == 4 && this[3] == 0 && !array) return 'transparent'; + var hex = []; + for (var i = 0; i < 3; i++){ + var bit = (this[i] - 0).toString(16); + hex.push((bit.length == 1) ? '0' + bit : bit); + } + return (array) ? hex : '#' + hex.join(''); + } + +}); + + +/* +--- + +name: String + +description: Contains String Prototypes like camelCase, capitalize, test, and toInt. + +license: MIT-style license. + +requires: Native + +provides: String + +... +*/ + +String.implement({ + + test: function(regex, params){ + return ((typeof regex == 'string') ? new RegExp(regex, params) : regex).test(this); + }, + + contains: function(string, separator){ + return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1; + }, + + trim: function(){ + return this.replace(/^\s+|\s+$/g, ''); + }, + + clean: function(){ + return this.replace(/\s+/g, ' ').trim(); + }, + + camelCase: function(){ + return this.replace(/-\D/g, function(match){ + return match.charAt(1).toUpperCase(); + }); + }, + + hyphenate: function(){ + return this.replace(/[A-Z]/g, function(match){ + return ('-' + match.charAt(0).toLowerCase()); + }); + }, + + capitalize: function(){ + return this.replace(/\b[a-z]/g, function(match){ + return match.toUpperCase(); + }); + }, + + escapeRegExp: function(){ + return this.replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1'); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + hexToRgb: function(array){ + var hex = this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); + return (hex) ? hex.slice(1).hexToRgb(array) : null; + }, + + rgbToHex: function(array){ + var rgb = this.match(/\d{1,3}/g); + return (rgb) ? rgb.rgbToHex(array) : null; + }, + + stripScripts: function(option){ + var scripts = ''; + var text = this.replace(/]*>([\s\S]*?)<\/script>/gi, function(){ + scripts += arguments[1] + '\n'; + return ''; + }); + if (option === true) $exec(scripts); + else if ($type(option) == 'function') option(scripts, text); + return text; + }, + + substitute: function(object, regexp){ + return this.replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){ + if (match.charAt(0) == '\\') return match.slice(1); + return (object[name] != undefined) ? object[name] : ''; + }); + } + +}); + + +/* +--- + +name: Function + +description: Contains Function Prototypes like create, bind, pass, and delay. + +license: MIT-style license. + +requires: [Native, $util] + +provides: Function + +... +*/ + +try { + delete Function.prototype.bind; +} catch(e){} + +Function.implement({ + + extend: function(properties){ + for (var property in properties) this[property] = properties[property]; + return this; + }, + + create: function(options){ + var self = this; + options = options || {}; + return function(event){ + var args = options.arguments; + args = (args != undefined) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0); + if (options.event) args = [event || window.event].extend(args); + var returns = function(){ + return self.apply(options.bind || null, args); + }; + if (options.delay) return setTimeout(returns, options.delay); + if (options.periodical) return setInterval(returns, options.periodical); + if (options.attempt) return $try(returns); + return returns(); + }; + }, + + run: function(args, bind){ + return this.apply(bind, $splat(args)); + }, + + pass: function(args, bind){ + return this.create({bind: bind, arguments: args}); + }, + + bind: function(bind, args){ + return this.create({bind: bind, arguments: args}); + }, + + bindWithEvent: function(bind, args){ + return this.create({bind: bind, arguments: args, event: true}); + }, + + attempt: function(args, bind){ + return this.create({bind: bind, arguments: args, attempt: true})(); + }, + + delay: function(delay, bind, args){ + return this.create({bind: bind, arguments: args, delay: delay})(); + }, + + periodical: function(periodical, bind, args){ + return this.create({bind: bind, arguments: args, periodical: periodical})(); + } + +}); + + +/* +--- + +name: Number + +description: Contains Number Prototypes like limit, round, times, and ceil. + +license: MIT-style license. + +requires: [Native, $util] + +provides: Number + +... +*/ + +Number.implement({ + + limit: function(min, max){ + return Math.min(max, Math.max(min, this)); + }, + + round: function(precision){ + precision = Math.pow(10, precision || 0); + return Math.round(this * precision) / precision; + }, + + times: function(fn, bind){ + for (var i = 0; i < this; i++) fn.call(bind, i, this); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + } + +}); + +Number.alias('times', 'each'); + +(function(math){ + var methods = {}; + math.each(function(name){ + if (!Number[name]) methods[name] = function(){ + return Math[name].apply(null, [this].concat($A(arguments))); + }; + }); + Number.implement(methods); +})(['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'max', 'min', 'pow', 'sin', 'sqrt', 'tan']); + + +/* +--- + +name: Hash + +description: Contains Hash Prototypes. Provides a means for overcoming the JavaScript practical impossibility of extending native Objects. + +license: MIT-style license. + +requires: Hash.base + +provides: Hash + +... +*/ + +Hash.implement({ + + has: Object.prototype.hasOwnProperty, + + keyOf: function(value){ + for (var key in this){ + if (this.hasOwnProperty(key) && this[key] === value) return key; + } + return null; + }, + + hasValue: function(value){ + return (Hash.keyOf(this, value) !== null); + }, + + extend: function(properties){ + Hash.each(properties || {}, function(value, key){ + Hash.set(this, key, value); + }, this); + return this; + }, + + combine: function(properties){ + Hash.each(properties || {}, function(value, key){ + Hash.include(this, key, value); + }, this); + return this; + }, + + erase: function(key){ + if (this.hasOwnProperty(key)) delete this[key]; + return this; + }, + + get: function(key){ + return (this.hasOwnProperty(key)) ? this[key] : null; + }, + + set: function(key, value){ + if (!this[key] || this.hasOwnProperty(key)) this[key] = value; + return this; + }, + + empty: function(){ + Hash.each(this, function(value, key){ + delete this[key]; + }, this); + return this; + }, + + include: function(key, value){ + if (this[key] == undefined) this[key] = value; + return this; + }, + + map: function(fn, bind){ + var results = new Hash; + Hash.each(this, function(value, key){ + results.set(key, fn.call(bind, value, key, this)); + }, this); + return results; + }, + + filter: function(fn, bind){ + var results = new Hash; + Hash.each(this, function(value, key){ + if (fn.call(bind, value, key, this)) results.set(key, value); + }, this); + return results; + }, + + every: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key) && !fn.call(bind, this[key], key)) return false; + } + return true; + }, + + some: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key) && fn.call(bind, this[key], key)) return true; + } + return false; + }, + + getKeys: function(){ + var keys = []; + Hash.each(this, function(value, key){ + keys.push(key); + }); + return keys; + }, + + getValues: function(){ + var values = []; + Hash.each(this, function(value){ + values.push(value); + }); + return values; + }, + + toQueryString: function(base){ + var queryString = []; + Hash.each(this, function(value, key){ + if (base) key = base + '[' + key + ']'; + var result; + switch ($type(value)){ + case 'object': result = Hash.toQueryString(value, key); break; + case 'array': + var qs = {}; + value.each(function(val, i){ + qs[i] = val; + }); + result = Hash.toQueryString(qs, key); + break; + default: result = key + '=' + encodeURIComponent(value); + } + if (value != undefined) queryString.push(result); + }); + + return queryString.join('&'); + } + +}); + +Hash.alias({keyOf: 'indexOf', hasValue: 'contains'}); + + +/* +--- + +name: Class + +description: Contains the Class Function for easily creating, extending, and implementing reusable Classes. + +license: MIT-style license. + +requires: [$util, Native, Array, String, Function, Number, Hash] + +provides: Class + +... +*/ + +function Class(params){ + + if (params instanceof Function) params = {initialize: params}; + + var newClass = function(){ + Object.reset(this); + if (newClass._prototyping) return this; + this._current = $empty; + var value = (this.initialize) ? this.initialize.apply(this, arguments) : this; + delete this._current; delete this.caller; + return value; + }.extend(this); + + newClass.implement(params); + + newClass.constructor = Class; + newClass.prototype.constructor = newClass; + + return newClass; + +}; + +Function.prototype.protect = function(){ + this._protected = true; + return this; +}; + +Object.reset = function(object, key){ + + if (key == null){ + for (var p in object) Object.reset(object, p); + return object; + } + + delete object[key]; + + switch ($type(object[key])){ + case 'object': + var F = function(){}; + F.prototype = object[key]; + var i = new F; + object[key] = Object.reset(i); + break; + case 'array': object[key] = $unlink(object[key]); break; + } + + return object; + +}; + +new Native({name: 'Class', initialize: Class}).extend({ + + instantiate: function(F){ + F._prototyping = true; + var proto = new F; + delete F._prototyping; + return proto; + }, + + wrap: function(self, key, method){ + if (method._origin) method = method._origin; + + return function(){ + if (method._protected && this._current == null) throw new Error('The method "' + key + '" cannot be called.'); + var caller = this.caller, current = this._current; + this.caller = current; this._current = arguments.callee; + var result = method.apply(this, arguments); + this._current = current; this.caller = caller; + return result; + }.extend({_owner: self, _origin: method, _name: key}); + + } + +}); + +Class.implement({ + + implement: function(key, value){ + + if ($type(key) == 'object'){ + for (var p in key) this.implement(p, key[p]); + return this; + } + + var mutator = Class.Mutators[key]; + + if (mutator){ + value = mutator.call(this, value); + if (value == null) return this; + } + + var proto = this.prototype; + + switch ($type(value)){ + + case 'function': + if (value._hidden) return this; + proto[key] = Class.wrap(this, key, value); + break; + + case 'object': + var previous = proto[key]; + if ($type(previous) == 'object') $mixin(previous, value); + else proto[key] = $unlink(value); + break; + + case 'array': + proto[key] = $unlink(value); + break; + + default: proto[key] = value; + + } + + return this; + + } + +}); + +Class.Mutators = { + + Extends: function(parent){ + + this.parent = parent; + this.prototype = Class.instantiate(parent); + + this.implement('parent', function(){ + var name = this.caller._name, previous = this.caller._owner.parent.prototype[name]; + if (!previous) throw new Error('The method "' + name + '" has no parent.'); + return previous.apply(this, arguments); + }.protect()); + + }, + + Implements: function(items){ + $splat(items).each(function(item){ + if (item instanceof Function) item = Class.instantiate(item); + this.implement(item); + }, this); + + } + +}; + + +/* +--- + +name: Class.Extras + +description: Contains Utility Classes that can be implemented into your own Classes to ease the execution of many common tasks. + +license: MIT-style license. + +requires: Class + +provides: [Chain, Events, Options, Class.Extras] + +... +*/ + +var Chain = new Class({ + + $chain: [], + + chain: function(){ + this.$chain.extend(Array.flatten(arguments)); + return this; + }, + + callChain: function(){ + return (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false; + }, + + clearChain: function(){ + this.$chain.empty(); + return this; + } + +}); + +var Events = new Class({ + + $events: {}, + + addEvent: function(type, fn, internal){ + type = Events.removeOn(type); + if (fn != $empty){ + this.$events[type] = this.$events[type] || []; + this.$events[type].include(fn); + if (internal) fn.internal = true; + } + return this; + }, + + addEvents: function(events){ + for (var type in events) this.addEvent(type, events[type]); + return this; + }, + + fireEvent: function(type, args, delay){ + type = Events.removeOn(type); + if (!this.$events || !this.$events[type]) return this; + this.$events[type].each(function(fn){ + fn.create({'bind': this, 'delay': delay, 'arguments': args})(); + }, this); + return this; + }, + + removeEvent: function(type, fn){ + type = Events.removeOn(type); + if (!this.$events[type]) return this; + if (!fn.internal) this.$events[type].erase(fn); + return this; + }, + + removeEvents: function(events){ + var type; + if ($type(events) == 'object'){ + for (type in events) this.removeEvent(type, events[type]); + return this; + } + if (events) events = Events.removeOn(events); + for (type in this.$events){ + if (events && events != type) continue; + var fns = this.$events[type]; + for (var i = fns.length; i--; i) this.removeEvent(type, fns[i]); + } + return this; + } + +}); + +Events.removeOn = function(string){ + return string.replace(/^on([A-Z])/, function(full, first){ + return first.toLowerCase(); + }); +}; + +var Options = new Class({ + + setOptions: function(){ + this.options = $merge.run([this.options].extend(arguments)); + if (!this.addEvent) return this; + for (var option in this.options){ + if ($type(this.options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue; + this.addEvent(option, this.options[option]); + delete this.options[option]; + } + return this; + } + +}); + + +/* +--- + +name: Browser + +description: The Browser Core. Contains Browser initialization, Window and Document, and the Browser Hash. + +license: MIT-style license. + +requires: [Native, $util] + +provides: [Browser, Window, Document, $exec] + +... +*/ + +var Browser = $merge({ + + Engine: {name: 'unknown', version: 0}, + + Platform: {name: (window.orientation != undefined) ? 'ipod' : (navigator.platform.match(/mac|win|linux/i) || ['other'])[0].toLowerCase()}, + + Features: {xpath: !!(document.evaluate), air: !!(window.runtime), query: !!(document.querySelector)}, + + Plugins: {}, + + Engines: { + + presto: function(){ + return (!window.opera) ? false : ((arguments.callee.caller) ? 960 : ((document.getElementsByClassName) ? 950 : 925)); + }, + + trident: function(){ + return (!window.ActiveXObject) ? false : ((window.XMLHttpRequest) ? ((document.querySelectorAll) ? 6 : 5) : 4); + }, + + webkit: function(){ + return (navigator.taintEnabled) ? false : ((Browser.Features.xpath) ? ((Browser.Features.query) ? 525 : 420) : 419); + }, + + gecko: function(){ + return (!document.getBoxObjectFor && window.mozInnerScreenX == null) ? false : ((document.getElementsByClassName) ? 19 : 18); + } + + } + +}, Browser || {}); + +Browser.Platform[Browser.Platform.name] = true; + +Browser.detect = function(){ + + for (var engine in this.Engines){ + var version = this.Engines[engine](); + if (version){ + this.Engine = {name: engine, version: version}; + this.Engine[engine] = this.Engine[engine + version] = true; + break; + } + } + + return {name: engine, version: version}; + +}; + +Browser.detect(); + +Browser.Request = function(){ + return $try(function(){ + return new XMLHttpRequest(); + }, function(){ + return new ActiveXObject('MSXML2.XMLHTTP'); + }, function(){ + return new ActiveXObject('Microsoft.XMLHTTP'); + }); +}; + +Browser.Features.xhr = !!(Browser.Request()); + +Browser.Plugins.Flash = (function(){ + var version = ($try(function(){ + return navigator.plugins['Shockwave Flash'].description; + }, function(){ + return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); + }) || '0 r0').match(/\d+/g); + return {version: parseInt(version[0] || 0 + '.' + version[1], 10) || 0, build: parseInt(version[2], 10) || 0}; +})(); + +function $exec(text){ + if (!text) return text; + if (window.execScript){ + window.execScript(text); + } else { + var script = document.createElement('script'); + script.setAttribute('type', 'text/javascript'); + script[(Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerText' : 'text'] = text; + document.head.appendChild(script); + document.head.removeChild(script); + } + return text; +}; + +Native.UID = 1; + +var $uid = (Browser.Engine.trident) ? function(item){ + return (item.uid || (item.uid = [Native.UID++]))[0]; +} : function(item){ + return item.uid || (item.uid = Native.UID++); +}; + +var Window = new Native({ + + name: 'Window', + + legacy: (Browser.Engine.trident) ? null: window.Window, + + initialize: function(win){ + $uid(win); + if (!win.Element){ + win.Element = $empty; + if (Browser.Engine.webkit) win.document.createElement("iframe"); //fixes safari 2 + win.Element.prototype = (Browser.Engine.webkit) ? window["[[DOMElement.prototype]]"] : {}; + } + win.document.window = win; + return $extend(win, Window.Prototype); + }, + + afterImplement: function(property, value){ + window[property] = Window.Prototype[property] = value; + } + +}); + +Window.Prototype = {$family: {name: 'window'}}; + +new Window(window); + +var Document = new Native({ + + name: 'Document', + + legacy: (Browser.Engine.trident) ? null: window.Document, + + initialize: function(doc){ + $uid(doc); + doc.head = doc.getElementsByTagName('head')[0]; + doc.html = doc.getElementsByTagName('html')[0]; + if (Browser.Engine.trident && Browser.Engine.version <= 4) $try(function(){ + doc.execCommand("BackgroundImageCache", false, true); + }); + if (Browser.Engine.trident) doc.window.attachEvent('onunload', function(){ + doc.window.detachEvent('onunload', arguments.callee); + doc.head = doc.html = doc.window = null; + }); + return $extend(doc, Document.Prototype); + }, + + afterImplement: function(property, value){ + document[property] = Document.Prototype[property] = value; + } + +}); + +Document.Prototype = {$family: {name: 'document'}}; + +new Document(document); + + +/* +--- + +name: Element + +description: One of the most important items in MooTools. Contains the dollar function, the dollars function, and an handful of cross-browser, time-saver methods to let you easily work with HTML Elements. + +license: MIT-style license. + +requires: [Window, Document, Array, String, Function, Number, Hash] + +provides: [Element, Elements, $, $$, Iframe] + +... +*/ + +var Element = new Native({ + + name: 'Element', + + legacy: window.Element, + + initialize: function(tag, props){ + var konstructor = Element.Constructors.get(tag); + if (konstructor) return konstructor(props); + if (typeof tag == 'string') return document.newElement(tag, props); + return document.id(tag).set(props); + }, + + afterImplement: function(key, value){ + Element.Prototype[key] = value; + if (Array[key]) return; + Elements.implement(key, function(){ + var items = [], elements = true; + for (var i = 0, j = this.length; i < j; i++){ + var returns = this[i][key].apply(this[i], arguments); + items.push(returns); + if (elements) elements = ($type(returns) == 'element'); + } + return (elements) ? new Elements(items) : items; + }); + } + +}); + +Element.Prototype = {$family: {name: 'element'}}; + +Element.Constructors = new Hash; + +var IFrame = new Native({ + + name: 'IFrame', + + generics: false, + + initialize: function(){ + var params = Array.link(arguments, {properties: Object.type, iframe: $defined}); + var props = params.properties || {}; + var iframe = document.id(params.iframe); + var onload = props.onload || $empty; + delete props.onload; + props.id = props.name = $pick(props.id, props.name, iframe ? (iframe.id || iframe.name) : 'IFrame_' + $time()); + iframe = new Element(iframe || 'iframe', props); + var onFrameLoad = function(){ + var host = $try(function(){ + return iframe.contentWindow.location.host; + }); + if (!host || host == window.location.host){ + var win = new Window(iframe.contentWindow); + new Document(iframe.contentWindow.document); + $extend(win.Element.prototype, Element.Prototype); + } + onload.call(iframe.contentWindow, iframe.contentWindow.document); + }; + var contentWindow = $try(function(){ + return iframe.contentWindow; + }); + ((contentWindow && contentWindow.document.body) || window.frames[props.id]) ? onFrameLoad() : iframe.addListener('load', onFrameLoad); + return iframe; + } + +}); + +var Elements = new Native({ + + initialize: function(elements, options){ + options = $extend({ddup: true, cash: true}, options); + elements = elements || []; + if (options.ddup || options.cash){ + var uniques = {}, returned = []; + for (var i = 0, l = elements.length; i < l; i++){ + var el = document.id(elements[i], !options.cash); + if (options.ddup){ + if (uniques[el.uid]) continue; + uniques[el.uid] = true; + } + if (el) returned.push(el); + } + elements = returned; + } + return (options.cash) ? $extend(elements, this) : elements; + } + +}); + +Elements.implement({ + + filter: function(filter, bind){ + if (!filter) return this; + return new Elements(Array.filter(this, (typeof filter == 'string') ? function(item){ + return item.match(filter); + } : filter, bind)); + } + +}); + +(function(){ + +/**/ +var createElementAcceptsHTML; +try { + var x = document.createElement(''); + createElementAcceptsHTML = (x.name == 'x'); +} catch(e){} + +var escapeQuotes = function(html){ + return ('' + html).replace(/&/g,'&').replace(/"/g,'"'); +}; +/**/ + +Document.implement({ + + newElement: function(tag, props){ + if (props && props.checked != null) props.defaultChecked = props.checked; + /**/// Fix for readonly name and type properties in IE < 8 + if (createElementAcceptsHTML && props){ + tag = '<' + tag; + if (props.name) tag += ' name="' + escapeQuotes(props.name) + '"'; + if (props.type) tag += ' type="' + escapeQuotes(props.type) + '"'; + tag += '>'; + delete props.name; + delete props.type; + } + /**/ + return this.id(this.createElement(tag)).set(props); + }, + + newTextNode: function(text){ + return this.createTextNode(text); + }, + + getDocument: function(){ + return this; + }, + + getWindow: function(){ + return this.window; + }, + + id: (function(){ + + var types = { + + string: function(id, nocash, doc){ + id = doc.getElementById(id); + return (id) ? types.element(id, nocash) : null; + }, + + element: function(el, nocash){ + $uid(el); + if (!nocash && !el.$family && !(/^object|embed$/i).test(el.tagName)){ + var proto = Element.Prototype; + for (var p in proto) el[p] = proto[p]; + }; + return el; + }, + + object: function(obj, nocash, doc){ + if (obj.toElement) return types.element(obj.toElement(doc), nocash); + return null; + } + + }; + + types.textnode = types.whitespace = types.window = types.document = $arguments(0); + + return function(el, nocash, doc){ + if (el && el.$family && el.uid) return el; + var type = $type(el); + return (types[type]) ? types[type](el, nocash, doc || document) : null; + }; + + })() + +}); + +})(); + +if (window.$ == null) Window.implement({ + $: function(el, nc){ + return document.id(el, nc, this.document); + } +}); + +Window.implement({ + + $$: function(selector){ + if (arguments.length == 1 && typeof selector == 'string') return this.document.getElements(selector); + var elements = []; + var args = Array.flatten(arguments); + for (var i = 0, l = args.length; i < l; i++){ + var item = args[i]; + switch ($type(item)){ + case 'element': elements.push(item); break; + case 'string': elements.extend(this.document.getElements(item, true)); + } + } + return new Elements(elements); + }, + + getDocument: function(){ + return this.document; + }, + + getWindow: function(){ + return this; + } + +}); + +Native.implement([Element, Document], { + + getElement: function(selector, nocash){ + return document.id(this.getElements(selector, true)[0] || null, nocash); + }, + + getElements: function(tags, nocash){ + tags = tags.split(','); + var elements = []; + var ddup = (tags.length > 1); + tags.each(function(tag){ + var partial = this.getElementsByTagName(tag.trim()); + (ddup) ? elements.extend(partial) : elements = partial; + }, this); + return new Elements(elements, {ddup: ddup, cash: !nocash}); + } + +}); + +(function(){ + +var collected = {}, storage = {}; +var props = {input: 'checked', option: 'selected', textarea: (Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerHTML' : 'value'}; + +var get = function(uid){ + return (storage[uid] || (storage[uid] = {})); +}; + +var clean = function(item, retain){ + if (!item) return; + var uid = item.uid; + if (retain !== true) retain = false; + if (Browser.Engine.trident){ + if (item.clearAttributes){ + var clone = retain && item.cloneNode(false); + item.clearAttributes(); + if (clone) item.mergeAttributes(clone); + } else if (item.removeEvents){ + item.removeEvents(); + } + if ((/object/i).test(item.tagName)){ + for (var p in item){ + if (typeof item[p] == 'function') item[p] = $empty; + } + Element.dispose(item); + } + } + if (!uid) return; + collected[uid] = storage[uid] = null; +}; + +var purge = function(){ + Hash.each(collected, clean); + if (Browser.Engine.trident) $A(document.getElementsByTagName('object')).each(clean); + if (window.CollectGarbage) CollectGarbage(); + collected = storage = null; +}; + +var walk = function(element, walk, start, match, all, nocash){ + var el = element[start || walk]; + var elements = []; + while (el){ + if (el.nodeType == 1 && (!match || Element.match(el, match))){ + if (!all) return document.id(el, nocash); + elements.push(el); + } + el = el[walk]; + } + return (all) ? new Elements(elements, {ddup: false, cash: !nocash}) : null; +}; + +var attributes = { + 'html': 'innerHTML', + 'class': 'className', + 'for': 'htmlFor', + 'defaultValue': 'defaultValue', + 'text': (Browser.Engine.trident || (Browser.Engine.webkit && Browser.Engine.version < 420)) ? 'innerText' : 'textContent' +}; +var bools = ['compact', 'nowrap', 'ismap', 'declare', 'noshade', 'checked', 'disabled', 'readonly', 'multiple', 'selected', 'noresize', 'defer']; +var camels = ['value', 'type', 'defaultValue', 'accessKey', 'cellPadding', 'cellSpacing', 'colSpan', 'frameBorder', 'maxLength', 'readOnly', 'rowSpan', 'tabIndex', 'useMap']; + +bools = bools.associate(bools); + +Hash.extend(attributes, bools); +Hash.extend(attributes, camels.associate(camels.map(String.toLowerCase))); + +var inserters = { + + before: function(context, element){ + if (element.parentNode) element.parentNode.insertBefore(context, element); + }, + + after: function(context, element){ + if (!element.parentNode) return; + var next = element.nextSibling; + (next) ? element.parentNode.insertBefore(context, next) : element.parentNode.appendChild(context); + }, + + bottom: function(context, element){ + element.appendChild(context); + }, + + top: function(context, element){ + var first = element.firstChild; + (first) ? element.insertBefore(context, first) : element.appendChild(context); + } + +}; + +inserters.inside = inserters.bottom; + +Hash.each(inserters, function(inserter, where){ + + where = where.capitalize(); + + Element.implement('inject' + where, function(el){ + inserter(this, document.id(el, true)); + return this; + }); + + Element.implement('grab' + where, function(el){ + inserter(document.id(el, true), this); + return this; + }); + +}); + +Element.implement({ + + set: function(prop, value){ + switch ($type(prop)){ + case 'object': + for (var p in prop) this.set(p, prop[p]); + break; + case 'string': + var property = Element.Properties.get(prop); + (property && property.set) ? property.set.apply(this, Array.slice(arguments, 1)) : this.setProperty(prop, value); + } + return this; + }, + + get: function(prop){ + var property = Element.Properties.get(prop); + return (property && property.get) ? property.get.apply(this, Array.slice(arguments, 1)) : this.getProperty(prop); + }, + + erase: function(prop){ + var property = Element.Properties.get(prop); + (property && property.erase) ? property.erase.apply(this) : this.removeProperty(prop); + return this; + }, + + setProperty: function(attribute, value){ + var key = attributes[attribute]; + if (value == undefined) return this.removeProperty(attribute); + if (key && bools[attribute]) value = !!value; + (key) ? this[key] = value : this.setAttribute(attribute, '' + value); + return this; + }, + + setProperties: function(attributes){ + for (var attribute in attributes) this.setProperty(attribute, attributes[attribute]); + return this; + }, + + getProperty: function(attribute){ + var key = attributes[attribute]; + var value = (key) ? this[key] : this.getAttribute(attribute, 2); + return (bools[attribute]) ? !!value : (key) ? value : value || null; + }, + + getProperties: function(){ + var args = $A(arguments); + return args.map(this.getProperty, this).associate(args); + }, + + removeProperty: function(attribute){ + var key = attributes[attribute]; + (key) ? this[key] = (key && bools[attribute]) ? false : '' : this.removeAttribute(attribute); + return this; + }, + + removeProperties: function(){ + Array.each(arguments, this.removeProperty, this); + return this; + }, + + hasClass: function(className){ + return this.className.contains(className, ' '); + }, + + addClass: function(className){ + if (!this.hasClass(className)) this.className = (this.className + ' ' + className).clean(); + return this; + }, + + removeClass: function(className){ + this.className = this.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)'), '$1'); + return this; + }, + + toggleClass: function(className){ + return this.hasClass(className) ? this.removeClass(className) : this.addClass(className); + }, + + adopt: function(){ + Array.flatten(arguments).each(function(element){ + element = document.id(element, true); + if (element) this.appendChild(element); + }, this); + return this; + }, + + appendText: function(text, where){ + return this.grab(this.getDocument().newTextNode(text), where); + }, + + grab: function(el, where){ + inserters[where || 'bottom'](document.id(el, true), this); + return this; + }, + + inject: function(el, where){ + inserters[where || 'bottom'](this, document.id(el, true)); + return this; + }, + + replaces: function(el){ + el = document.id(el, true); + el.parentNode.replaceChild(this, el); + return this; + }, + + wraps: function(el, where){ + el = document.id(el, true); + return this.replaces(el).grab(el, where); + }, + + getPrevious: function(match, nocash){ + return walk(this, 'previousSibling', null, match, false, nocash); + }, + + getAllPrevious: function(match, nocash){ + return walk(this, 'previousSibling', null, match, true, nocash); + }, + + getNext: function(match, nocash){ + return walk(this, 'nextSibling', null, match, false, nocash); + }, + + getAllNext: function(match, nocash){ + return walk(this, 'nextSibling', null, match, true, nocash); + }, + + getFirst: function(match, nocash){ + return walk(this, 'nextSibling', 'firstChild', match, false, nocash); + }, + + getLast: function(match, nocash){ + return walk(this, 'previousSibling', 'lastChild', match, false, nocash); + }, + + getParent: function(match, nocash){ + return walk(this, 'parentNode', null, match, false, nocash); + }, + + getParents: function(match, nocash){ + return walk(this, 'parentNode', null, match, true, nocash); + }, + + getSiblings: function(match, nocash){ + return this.getParent().getChildren(match, nocash).erase(this); + }, + + getChildren: function(match, nocash){ + return walk(this, 'nextSibling', 'firstChild', match, true, nocash); + }, + + getWindow: function(){ + return this.ownerDocument.window; + }, + + getDocument: function(){ + return this.ownerDocument; + }, + + getElementById: function(id, nocash){ + var el = this.ownerDocument.getElementById(id); + if (!el) return null; + for (var parent = el.parentNode; parent != this; parent = parent.parentNode){ + if (!parent) return null; + } + return document.id(el, nocash); + }, + + getSelected: function(){ + return new Elements($A(this.options).filter(function(option){ + return option.selected; + })); + }, + + getComputedStyle: function(property){ + if (this.currentStyle) return this.currentStyle[property.camelCase()]; + var computed = this.getDocument().defaultView.getComputedStyle(this, null); + return (computed) ? computed.getPropertyValue([property.hyphenate()]) : null; + }, + + toQueryString: function(){ + var queryString = []; + this.getElements('input, select, textarea', true).each(function(el){ + if (!el.name || el.disabled || el.type == 'submit' || el.type == 'reset' || el.type == 'file') return; + var value = (el.tagName.toLowerCase() == 'select') ? Element.getSelected(el).map(function(opt){ + return opt.value; + }) : ((el.type == 'radio' || el.type == 'checkbox') && !el.checked) ? null : el.value; + $splat(value).each(function(val){ + if (typeof val != 'undefined') queryString.push(el.name + '=' + encodeURIComponent(val)); + }); + }); + return queryString.join('&'); + }, + + clone: function(contents, keepid){ + contents = contents !== false; + var clone = this.cloneNode(contents); + var clean = function(node, element){ + if (!keepid) node.removeAttribute('id'); + if (Browser.Engine.trident){ + node.clearAttributes(); + node.mergeAttributes(element); + node.removeAttribute('uid'); + if (node.options){ + var no = node.options, eo = element.options; + for (var j = no.length; j--;) no[j].selected = eo[j].selected; + } + } + var prop = props[element.tagName.toLowerCase()]; + if (prop && element[prop]) node[prop] = element[prop]; + }; + + if (contents){ + var ce = clone.getElementsByTagName('*'), te = this.getElementsByTagName('*'); + for (var i = ce.length; i--;) clean(ce[i], te[i]); + } + + clean(clone, this); + return document.id(clone); + }, + + destroy: function(){ + Element.empty(this); + Element.dispose(this); + clean(this, true); + return null; + }, + + empty: function(){ + $A(this.childNodes).each(function(node){ + Element.destroy(node); + }); + return this; + }, + + dispose: function(){ + return (this.parentNode) ? this.parentNode.removeChild(this) : this; + }, + + hasChild: function(el){ + el = document.id(el, true); + if (!el) return false; + if (Browser.Engine.webkit && Browser.Engine.version < 420) return $A(this.getElementsByTagName(el.tagName)).contains(el); + return (this.contains) ? (this != el && this.contains(el)) : !!(this.compareDocumentPosition(el) & 16); + }, + + match: function(tag){ + return (!tag || (tag == this) || (Element.get(this, 'tag') == tag)); + } + +}); + +Native.implement([Element, Window, Document], { + + addListener: function(type, fn){ + if (type == 'unload'){ + var old = fn, self = this; + fn = function(){ + self.removeListener('unload', fn); + old(); + }; + } else { + collected[this.uid] = this; + } + if (this.addEventListener) this.addEventListener(type, fn, false); + else this.attachEvent('on' + type, fn); + return this; + }, + + removeListener: function(type, fn){ + if (this.removeEventListener) this.removeEventListener(type, fn, false); + else this.detachEvent('on' + type, fn); + return this; + }, + + retrieve: function(property, dflt){ + var storage = get(this.uid), prop = storage[property]; + if (dflt != undefined && prop == undefined) prop = storage[property] = dflt; + return $pick(prop); + }, + + store: function(property, value){ + var storage = get(this.uid); + storage[property] = value; + return this; + }, + + eliminate: function(property){ + var storage = get(this.uid); + delete storage[property]; + return this; + } + +}); + +window.addListener('unload', purge); + +})(); + +Element.Properties = new Hash; + +Element.Properties.style = { + + set: function(style){ + this.style.cssText = style; + }, + + get: function(){ + return this.style.cssText; + }, + + erase: function(){ + this.style.cssText = ''; + } + +}; + +Element.Properties.tag = { + + get: function(){ + return this.tagName.toLowerCase(); + } + +}; + +Element.Properties.html = (function(){ + var wrapper = document.createElement('div'); + + var translations = { + table: [1, '', '
'], + select: [1, ''], + tbody: [2, '', '
'], + tr: [3, '', '
'] + }; + translations.thead = translations.tfoot = translations.tbody; + + var html = { + set: function(){ + var html = Array.flatten(arguments).join(''); + var wrap = Browser.Engine.trident && translations[this.get('tag')]; + if (wrap){ + var first = wrapper; + first.innerHTML = wrap[1] + html + wrap[2]; + for (var i = wrap[0]; i--;) first = first.firstChild; + this.empty().adopt(first.childNodes); + } else { + this.innerHTML = html; + } + } + }; + + html.erase = html.set; + + return html; +})(); + +if (Browser.Engine.webkit && Browser.Engine.version < 420) Element.Properties.text = { + get: function(){ + if (this.innerText) return this.innerText; + var temp = this.ownerDocument.newElement('div', {html: this.innerHTML}).inject(this.ownerDocument.body); + var text = temp.innerText; + temp.destroy(); + return text; + } +}; + + +/* +--- + +name: Element.Dimensions + +description: Contains methods to work with size, scroll, or positioning of Elements and the window object. + +license: MIT-style license. + +credits: + - Element positioning based on the [qooxdoo](http://qooxdoo.org/) code and smart browser fixes, [LGPL License](http://www.gnu.org/licenses/lgpl.html). + - Viewport dimensions based on [YUI](http://developer.yahoo.com/yui/) code, [BSD License](http://developer.yahoo.com/yui/license.html). + +requires: Element + +provides: Element.Dimensions + +... +*/ + +(function(){ + +Element.implement({ + + scrollTo: function(x, y){ + if (isBody(this)){ + this.getWindow().scrollTo(x, y); + } else { + this.scrollLeft = x; + this.scrollTop = y; + } + return this; + }, + + getSize: function(){ + if (isBody(this)) return this.getWindow().getSize(); + return {x: this.offsetWidth, y: this.offsetHeight}; + }, + + getScrollSize: function(){ + if (isBody(this)) return this.getWindow().getScrollSize(); + return {x: this.scrollWidth, y: this.scrollHeight}; + }, + + getScroll: function(){ + if (isBody(this)) return this.getWindow().getScroll(); + return {x: this.scrollLeft, y: this.scrollTop}; + }, + + getScrolls: function(){ + var element = this, position = {x: 0, y: 0}; + while (element && !isBody(element)){ + position.x += element.scrollLeft; + position.y += element.scrollTop; + element = element.parentNode; + } + return position; + }, + + getOffsetParent: function(){ + var element = this; + if (isBody(element)) return null; + if (!Browser.Engine.trident) return element.offsetParent; + while ((element = element.parentNode) && !isBody(element)){ + if (styleString(element, 'position') != 'static') return element; + } + return null; + }, + + getOffsets: function(){ + if (this.getBoundingClientRect){ + var bound = this.getBoundingClientRect(), + html = document.id(this.getDocument().documentElement), + htmlScroll = html.getScroll(), + elemScrolls = this.getScrolls(), + elemScroll = this.getScroll(), + isFixed = (styleString(this, 'position') == 'fixed'); + + return { + x: bound.left.toInt() + elemScrolls.x - elemScroll.x + ((isFixed) ? 0 : htmlScroll.x) - html.clientLeft, + y: bound.top.toInt() + elemScrolls.y - elemScroll.y + ((isFixed) ? 0 : htmlScroll.y) - html.clientTop + }; + } + + var element = this, position = {x: 0, y: 0}; + if (isBody(this)) return position; + + while (element && !isBody(element)){ + position.x += element.offsetLeft; + position.y += element.offsetTop; + + if (Browser.Engine.gecko){ + if (!borderBox(element)){ + position.x += leftBorder(element); + position.y += topBorder(element); + } + var parent = element.parentNode; + if (parent && styleString(parent, 'overflow') != 'visible'){ + position.x += leftBorder(parent); + position.y += topBorder(parent); + } + } else if (element != this && Browser.Engine.webkit){ + position.x += leftBorder(element); + position.y += topBorder(element); + } + + element = element.offsetParent; + } + if (Browser.Engine.gecko && !borderBox(this)){ + position.x -= leftBorder(this); + position.y -= topBorder(this); + } + return position; + }, + + getPosition: function(relative){ + if (isBody(this)) return {x: 0, y: 0}; + var offset = this.getOffsets(), + scroll = this.getScrolls(); + var position = { + x: offset.x - scroll.x, + y: offset.y - scroll.y + }; + var relativePosition = (relative && (relative = document.id(relative))) ? relative.getPosition() : {x: 0, y: 0}; + return {x: position.x - relativePosition.x, y: position.y - relativePosition.y}; + }, + + getCoordinates: function(element){ + if (isBody(this)) return this.getWindow().getCoordinates(); + var position = this.getPosition(element), + size = this.getSize(); + var obj = { + left: position.x, + top: position.y, + width: size.x, + height: size.y + }; + obj.right = obj.left + obj.width; + obj.bottom = obj.top + obj.height; + return obj; + }, + + computePosition: function(obj){ + return { + left: obj.x - styleNumber(this, 'margin-left'), + top: obj.y - styleNumber(this, 'margin-top') + }; + }, + + setPosition: function(obj){ + return this.setStyles(this.computePosition(obj)); + } + +}); + + +Native.implement([Document, Window], { + + getSize: function(){ + if (Browser.Engine.presto || Browser.Engine.webkit){ + var win = this.getWindow(); + return {x: win.innerWidth, y: win.innerHeight}; + } + var doc = getCompatElement(this); + return {x: doc.clientWidth, y: doc.clientHeight}; + }, + + getScroll: function(){ + var win = this.getWindow(), doc = getCompatElement(this); + return {x: win.pageXOffset || doc.scrollLeft, y: win.pageYOffset || doc.scrollTop}; + }, + + getScrollSize: function(){ + var doc = getCompatElement(this), min = this.getSize(); + return {x: Math.max(doc.scrollWidth, min.x), y: Math.max(doc.scrollHeight, min.y)}; + }, + + getPosition: function(){ + return {x: 0, y: 0}; + }, + + getCoordinates: function(){ + var size = this.getSize(); + return {top: 0, left: 0, bottom: size.y, right: size.x, height: size.y, width: size.x}; + } + +}); + +// private methods + +var styleString = Element.getComputedStyle; + +function styleNumber(element, style){ + return styleString(element, style).toInt() || 0; +}; + +function borderBox(element){ + return styleString(element, '-moz-box-sizing') == 'border-box'; +}; + +function topBorder(element){ + return styleNumber(element, 'border-top-width'); +}; + +function leftBorder(element){ + return styleNumber(element, 'border-left-width'); +}; + +function isBody(element){ + return (/^(?:body|html)$/i).test(element.tagName); +}; + +function getCompatElement(element){ + var doc = element.getDocument(); + return (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; +}; + +})(); + +//aliases +Element.alias('setPosition', 'position'); //compatability + +Native.implement([Window, Document, Element], { + + getHeight: function(){ + return this.getSize().y; + }, + + getWidth: function(){ + return this.getSize().x; + }, + + getScrollTop: function(){ + return this.getScroll().y; + }, + + getScrollLeft: function(){ + return this.getScroll().x; + }, + + getScrollHeight: function(){ + return this.getScrollSize().y; + }, + + getScrollWidth: function(){ + return this.getScrollSize().x; + }, + + getTop: function(){ + return this.getPosition().y; + }, + + getLeft: function(){ + return this.getPosition().x; + } + +}); + + +/* +--- + +name: Event + +description: Contains the Event Class, to make the event object cross-browser. + +license: MIT-style license. + +requires: [Window, Document, Hash, Array, Function, String] + +provides: Event + +... +*/ + +var Event = new Native({ + + name: 'Event', + + initialize: function(event, win){ + win = win || window; + var doc = win.document; + event = event || win.event; + if (event.$extended) return event; + this.$extended = true; + var type = event.type; + var target = event.target || event.srcElement; + while (target && target.nodeType == 3) target = target.parentNode; + + if (type.test(/key/)){ + var code = event.which || event.keyCode; + var key = Event.Keys.keyOf(code); + if (type == 'keydown'){ + var fKey = code - 111; + if (fKey > 0 && fKey < 13) key = 'f' + fKey; + } + key = key || String.fromCharCode(code).toLowerCase(); + } else if (type.match(/(click|mouse|menu)/i)){ + doc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; + var page = { + x: event.pageX || event.clientX + doc.scrollLeft, + y: event.pageY || event.clientY + doc.scrollTop + }; + var client = { + x: (event.pageX) ? event.pageX - win.pageXOffset : event.clientX, + y: (event.pageY) ? event.pageY - win.pageYOffset : event.clientY + }; + if (type.match(/DOMMouseScroll|mousewheel/)){ + var wheel = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3; + } + var rightClick = (event.which == 3) || (event.button == 2); + var related = null; + if (type.match(/over|out/)){ + switch (type){ + case 'mouseover': related = event.relatedTarget || event.fromElement; break; + case 'mouseout': related = event.relatedTarget || event.toElement; + } + if (!(function(){ + while (related && related.nodeType == 3) related = related.parentNode; + return true; + }).create({attempt: Browser.Engine.gecko})()) related = false; + } + } + + return $extend(this, { + event: event, + type: type, + + page: page, + client: client, + rightClick: rightClick, + + wheel: wheel, + + relatedTarget: related, + target: target, + + code: code, + key: key, + + shift: event.shiftKey, + control: event.ctrlKey, + alt: event.altKey, + meta: event.metaKey + }); + } + +}); + +Event.Keys = new Hash({ + 'enter': 13, + 'up': 38, + 'down': 40, + 'left': 37, + 'right': 39, + 'esc': 27, + 'space': 32, + 'backspace': 8, + 'tab': 9, + 'delete': 46 +}); + +Event.implement({ + + stop: function(){ + return this.stopPropagation().preventDefault(); + }, + + stopPropagation: function(){ + if (this.event.stopPropagation) this.event.stopPropagation(); + else this.event.cancelBubble = true; + return this; + }, + + preventDefault: function(){ + if (this.event.preventDefault) this.event.preventDefault(); + else this.event.returnValue = false; + return this; + } + +}); + + +/* +--- + +name: Element.Event + +description: Contains Element methods for dealing with events. This file also includes mouseenter and mouseleave custom Element Events. + +license: MIT-style license. + +requires: [Element, Event] + +provides: Element.Event + +... +*/ + +Element.Properties.events = {set: function(events){ + this.addEvents(events); +}}; + +Native.implement([Element, Window, Document], { + + addEvent: function(type, fn){ + var events = this.retrieve('events', {}); + events[type] = events[type] || {'keys': [], 'values': []}; + if (events[type].keys.contains(fn)) return this; + events[type].keys.push(fn); + var realType = type, custom = Element.Events.get(type), condition = fn, self = this; + if (custom){ + if (custom.onAdd) custom.onAdd.call(this, fn); + if (custom.condition){ + condition = function(event){ + if (custom.condition.call(this, event)) return fn.call(this, event); + return true; + }; + } + realType = custom.base || realType; + } + var defn = function(){ + return fn.call(self); + }; + var nativeEvent = Element.NativeEvents[realType]; + if (nativeEvent){ + if (nativeEvent == 2){ + defn = function(event){ + event = new Event(event, self.getWindow()); + if (condition.call(self, event) === false) event.stop(); + }; + } + this.addListener(realType, defn); + } + events[type].values.push(defn); + return this; + }, + + removeEvent: function(type, fn){ + var events = this.retrieve('events'); + if (!events || !events[type]) return this; + var pos = events[type].keys.indexOf(fn); + if (pos == -1) return this; + events[type].keys.splice(pos, 1); + var value = events[type].values.splice(pos, 1)[0]; + var custom = Element.Events.get(type); + if (custom){ + if (custom.onRemove) custom.onRemove.call(this, fn); + type = custom.base || type; + } + return (Element.NativeEvents[type]) ? this.removeListener(type, value) : this; + }, + + addEvents: function(events){ + for (var event in events) this.addEvent(event, events[event]); + return this; + }, + + removeEvents: function(events){ + var type; + if ($type(events) == 'object'){ + for (type in events) this.removeEvent(type, events[type]); + return this; + } + var attached = this.retrieve('events'); + if (!attached) return this; + if (!events){ + for (type in attached) this.removeEvents(type); + this.eliminate('events'); + } else if (attached[events]){ + while (attached[events].keys[0]) this.removeEvent(events, attached[events].keys[0]); + attached[events] = null; + } + return this; + }, + + fireEvent: function(type, args, delay){ + var events = this.retrieve('events'); + if (!events || !events[type]) return this; + events[type].keys.each(function(fn){ + fn.create({'bind': this, 'delay': delay, 'arguments': args})(); + }, this); + return this; + }, + + cloneEvents: function(from, type){ + from = document.id(from); + var fevents = from.retrieve('events'); + if (!fevents) return this; + if (!type){ + for (var evType in fevents) this.cloneEvents(from, evType); + } else if (fevents[type]){ + fevents[type].keys.each(function(fn){ + this.addEvent(type, fn); + }, this); + } + return this; + } + +}); + +// IE9 +try { + if (typeof HTMLElement != 'undefined') + HTMLElement.prototype.fireEvent = Element.prototype.fireEvent; +} catch(e){} + +Element.NativeEvents = { + click: 2, dblclick: 2, mouseup: 2, mousedown: 2, contextmenu: 2, //mouse buttons + mousewheel: 2, DOMMouseScroll: 2, //mouse wheel + mouseover: 2, mouseout: 2, mousemove: 2, selectstart: 2, selectend: 2, //mouse movement + keydown: 2, keypress: 2, keyup: 2, //keyboard + focus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, //form elements + load: 1, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window + error: 1, abort: 1, scroll: 1 //misc +}; + +(function(){ + +var $check = function(event){ + var related = event.relatedTarget; + if (related == undefined) return true; + if (related === false) return false; + return ($type(this) != 'document' && related != this && related.prefix != 'xul' && !this.hasChild(related)); +}; + +Element.Events = new Hash({ + + mouseenter: { + base: 'mouseover', + condition: $check + }, + + mouseleave: { + base: 'mouseout', + condition: $check + }, + + mousewheel: { + base: (Browser.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel' + } + +}); + +})(); + + +/* +--- + +name: Element.Style + +description: Contains methods for interacting with the styles of Elements in a fashionable way. + +license: MIT-style license. + +requires: Element + +provides: Element.Style + +... +*/ + +Element.Properties.styles = {set: function(styles){ + this.setStyles(styles); +}}; + +Element.Properties.opacity = { + + set: function(opacity, novisibility){ + if (!novisibility){ + if (opacity == 0){ + if (this.style.visibility != 'hidden') this.style.visibility = 'hidden'; + } else { + if (this.style.visibility != 'visible') this.style.visibility = 'visible'; + } + } + if (!this.currentStyle || !this.currentStyle.hasLayout) this.style.zoom = 1; + if (Browser.Engine.trident) this.style.filter = (opacity == 1) ? '' : 'alpha(opacity=' + opacity * 100 + ')'; + this.style.opacity = opacity; + this.store('opacity', opacity); + }, + + get: function(){ + return this.retrieve('opacity', 1); + } + +}; + +Element.implement({ + + setOpacity: function(value){ + return this.set('opacity', value, true); + }, + + getOpacity: function(){ + return this.get('opacity'); + }, + + setStyle: function(property, value){ + switch (property){ + case 'opacity': return this.set('opacity', parseFloat(value)); + case 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat'; + } + property = property.camelCase(); + if ($type(value) != 'string'){ + var map = (Element.Styles.get(property) || '@').split(' '); + value = $splat(value).map(function(val, i){ + if (!map[i]) return ''; + return ($type(val) == 'number') ? map[i].replace('@', Math.round(val)) : val; + }).join(' '); + } else if (value == String(Number(value))){ + value = Math.round(value); + } + this.style[property] = value; + return this; + }, + + getStyle: function(property){ + switch (property){ + case 'opacity': return this.get('opacity'); + case 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat'; + } + property = property.camelCase(); + var result = this.style[property]; + if (!$chk(result)){ + result = []; + for (var style in Element.ShortStyles){ + if (property != style) continue; + for (var s in Element.ShortStyles[style]) result.push(this.getStyle(s)); + return result.join(' '); + } + result = this.getComputedStyle(property); + } + if (result){ + result = String(result); + var color = result.match(/rgba?\([\d\s,]+\)/); + if (color) result = result.replace(color[0], color[0].rgbToHex()); + } + if (Browser.Engine.presto || (Browser.Engine.trident && !$chk(parseInt(result, 10)))){ + if (property.test(/^(height|width)$/)){ + var values = (property == 'width') ? ['left', 'right'] : ['top', 'bottom'], size = 0; + values.each(function(value){ + size += this.getStyle('border-' + value + '-width').toInt() + this.getStyle('padding-' + value).toInt(); + }, this); + return this['offset' + property.capitalize()] - size + 'px'; + } + if ((Browser.Engine.presto) && String(result).test('px')) return result; + if (property.test(/(border(.+)Width|margin|padding)/)) return '0px'; + } + return result; + }, + + setStyles: function(styles){ + for (var style in styles) this.setStyle(style, styles[style]); + return this; + }, + + getStyles: function(){ + var result = {}; + Array.flatten(arguments).each(function(key){ + result[key] = this.getStyle(key); + }, this); + return result; + } + +}); + +Element.Styles = new Hash({ + left: '@px', top: '@px', bottom: '@px', right: '@px', + width: '@px', height: '@px', maxWidth: '@px', maxHeight: '@px', minWidth: '@px', minHeight: '@px', + backgroundColor: 'rgb(@, @, @)', backgroundPosition: '@px @px', color: 'rgb(@, @, @)', + fontSize: '@px', letterSpacing: '@px', lineHeight: '@px', clip: 'rect(@px @px @px @px)', + margin: '@px @px @px @px', padding: '@px @px @px @px', border: '@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)', + borderWidth: '@px @px @px @px', borderStyle: '@ @ @ @', borderColor: 'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)', + zIndex: '@', 'zoom': '@', fontWeight: '@', textIndent: '@px', opacity: '@' +}); + +Element.ShortStyles = {margin: {}, padding: {}, border: {}, borderWidth: {}, borderStyle: {}, borderColor: {}}; + +['Top', 'Right', 'Bottom', 'Left'].each(function(direction){ + var Short = Element.ShortStyles; + var All = Element.Styles; + ['margin', 'padding'].each(function(style){ + var sd = style + direction; + Short[style][sd] = All[sd] = '@px'; + }); + var bd = 'border' + direction; + Short.border[bd] = All[bd] = '@px @ rgb(@, @, @)'; + var bdw = bd + 'Width', bds = bd + 'Style', bdc = bd + 'Color'; + Short[bd] = {}; + Short.borderWidth[bdw] = Short[bd][bdw] = All[bdw] = '@px'; + Short.borderStyle[bds] = Short[bd][bds] = All[bds] = '@'; + Short.borderColor[bdc] = Short[bd][bdc] = All[bdc] = 'rgb(@, @, @)'; +}); + + +/* +--- + +name: Fx + +description: Contains the basic animation logic to be extended by all other Fx Classes. + +license: MIT-style license. + +requires: [Chain, Events, Options] + +provides: Fx + +... +*/ + +var Fx = new Class({ + + Implements: [Chain, Events, Options], + + options: { + /* + onStart: $empty, + onCancel: $empty, + onComplete: $empty, + */ + fps: 50, + unit: false, + duration: 500, + link: 'ignore' + }, + + initialize: function(options){ + this.subject = this.subject || this; + this.setOptions(options); + this.options.duration = Fx.Durations[this.options.duration] || this.options.duration.toInt(); + var wait = this.options.wait; + if (wait === false) this.options.link = 'cancel'; + }, + + getTransition: function(){ + return function(p){ + return -(Math.cos(Math.PI * p) - 1) / 2; + }; + }, + + step: function(){ + var time = $time(); + if (time < this.time + this.options.duration){ + var delta = this.transition((time - this.time) / this.options.duration); + this.set(this.compute(this.from, this.to, delta)); + } else { + this.set(this.compute(this.from, this.to, 1)); + this.complete(); + } + }, + + set: function(now){ + return now; + }, + + compute: function(from, to, delta){ + return Fx.compute(from, to, delta); + }, + + check: function(){ + if (!this.timer) return true; + switch (this.options.link){ + case 'cancel': this.cancel(); return true; + case 'chain': this.chain(this.caller.bind(this, arguments)); return false; + } + return false; + }, + + start: function(from, to){ + if (!this.check(from, to)) return this; + this.from = from; + this.to = to; + this.time = 0; + this.transition = this.getTransition(); + this.startTimer(); + this.onStart(); + return this; + }, + + complete: function(){ + if (this.stopTimer()) this.onComplete(); + return this; + }, + + cancel: function(){ + if (this.stopTimer()) this.onCancel(); + return this; + }, + + onStart: function(){ + this.fireEvent('start', this.subject); + }, + + onComplete: function(){ + this.fireEvent('complete', this.subject); + if (!this.callChain()) this.fireEvent('chainComplete', this.subject); + }, + + onCancel: function(){ + this.fireEvent('cancel', this.subject).clearChain(); + }, + + pause: function(){ + this.stopTimer(); + return this; + }, + + resume: function(){ + this.startTimer(); + return this; + }, + + stopTimer: function(){ + if (!this.timer) return false; + this.time = $time() - this.time; + this.timer = $clear(this.timer); + return true; + }, + + startTimer: function(){ + if (this.timer) return false; + this.time = $time() - this.time; + this.timer = this.step.periodical(Math.round(1000 / this.options.fps), this); + return true; + } + +}); + +Fx.compute = function(from, to, delta){ + return (to - from) * delta + from; +}; + +Fx.Durations = {'short': 250, 'normal': 500, 'long': 1000}; + + +/* +--- + +name: Fx.CSS + +description: Contains the CSS animation logic. Used by Fx.Tween, Fx.Morph, Fx.Elements. + +license: MIT-style license. + +requires: [Fx, Element.Style] + +provides: Fx.CSS + +... +*/ + +Fx.CSS = new Class({ + + Extends: Fx, + + //prepares the base from/to object + + prepare: function(element, property, values){ + values = $splat(values); + var values1 = values[1]; + if (!$chk(values1)){ + values[1] = values[0]; + values[0] = element.getStyle(property); + } + var parsed = values.map(this.parse); + return {from: parsed[0], to: parsed[1]}; + }, + + //parses a value into an array + + parse: function(value){ + value = $lambda(value)(); + value = (typeof value == 'string') ? value.split(' ') : $splat(value); + return value.map(function(val){ + val = String(val); + var found = false; + Fx.CSS.Parsers.each(function(parser, key){ + if (found) return; + var parsed = parser.parse(val); + if ($chk(parsed)) found = {value: parsed, parser: parser}; + }); + found = found || {value: val, parser: Fx.CSS.Parsers.String}; + return found; + }); + }, + + //computes by a from and to prepared objects, using their parsers. + + compute: function(from, to, delta){ + var computed = []; + (Math.min(from.length, to.length)).times(function(i){ + computed.push({value: from[i].parser.compute(from[i].value, to[i].value, delta), parser: from[i].parser}); + }); + computed.$family = {name: 'fx:css:value'}; + return computed; + }, + + //serves the value as settable + + serve: function(value, unit){ + if ($type(value) != 'fx:css:value') value = this.parse(value); + var returned = []; + value.each(function(bit){ + returned = returned.concat(bit.parser.serve(bit.value, unit)); + }); + return returned; + }, + + //renders the change to an element + + render: function(element, property, value, unit){ + element.setStyle(property, this.serve(value, unit)); + }, + + //searches inside the page css to find the values for a selector + + search: function(selector){ + if (Fx.CSS.Cache[selector]) return Fx.CSS.Cache[selector]; + var to = {}; + Array.each(document.styleSheets, function(sheet, j){ + var href = sheet.href; + if (href && href.contains('://') && !href.contains(document.domain)) return; + var rules = sheet.rules || sheet.cssRules; + Array.each(rules, function(rule, i){ + if (!rule.style) return; + var selectorText = (rule.selectorText) ? rule.selectorText.replace(/^\w+/, function(m){ + return m.toLowerCase(); + }) : null; + if (!selectorText || !selectorText.test('^' + selector + '$')) return; + Element.Styles.each(function(value, style){ + if (!rule.style[style] || Element.ShortStyles[style]) return; + value = String(rule.style[style]); + to[style] = (value.test(/^rgb/)) ? value.rgbToHex() : value; + }); + }); + }); + return Fx.CSS.Cache[selector] = to; + } + +}); + +Fx.CSS.Cache = {}; + +Fx.CSS.Parsers = new Hash({ + + Color: { + parse: function(value){ + if (value.match(/^#[0-9a-f]{3,6}$/i)) return value.hexToRgb(true); + return ((value = value.match(/(\d+),\s*(\d+),\s*(\d+)/))) ? [value[1], value[2], value[3]] : false; + }, + compute: function(from, to, delta){ + return from.map(function(value, i){ + return Math.round(Fx.compute(from[i], to[i], delta)); + }); + }, + serve: function(value){ + return value.map(Number); + } + }, + + Number: { + parse: parseFloat, + compute: Fx.compute, + serve: function(value, unit){ + return (unit) ? value + unit : value; + } + }, + + String: { + parse: $lambda(false), + compute: $arguments(1), + serve: $arguments(0) + } + +}); + + +/* +--- + +name: Fx.Morph + +description: Formerly Fx.Styles, effect to transition any number of CSS properties for an element using an object of rules, or CSS based selector rules. + +license: MIT-style license. + +requires: Fx.CSS + +provides: Fx.Morph + +... +*/ + +Fx.Morph = new Class({ + + Extends: Fx.CSS, + + initialize: function(element, options){ + this.element = this.subject = document.id(element); + this.parent(options); + }, + + set: function(now){ + if (typeof now == 'string') now = this.search(now); + for (var p in now) this.render(this.element, p, now[p], this.options.unit); + return this; + }, + + compute: function(from, to, delta){ + var now = {}; + for (var p in from) now[p] = this.parent(from[p], to[p], delta); + return now; + }, + + start: function(properties){ + if (!this.check(properties)) return this; + if (typeof properties == 'string') properties = this.search(properties); + var from = {}, to = {}; + for (var p in properties){ + var parsed = this.prepare(this.element, p, properties[p]); + from[p] = parsed.from; + to[p] = parsed.to; + } + return this.parent(from, to); + } + +}); + +Element.Properties.morph = { + + set: function(options){ + var morph = this.retrieve('morph'); + if (morph) morph.cancel(); + return this.eliminate('morph').store('morph:options', $extend({link: 'cancel'}, options)); + }, + + get: function(options){ + if (options || !this.retrieve('morph')){ + if (options || !this.retrieve('morph:options')) this.set('morph', options); + this.store('morph', new Fx.Morph(this, this.retrieve('morph:options'))); + } + return this.retrieve('morph'); + } + +}; + +Element.implement({ + + morph: function(props){ + this.get('morph').start(props); + return this; + } + +}); + + +/* +--- + +name: Fx.Transitions + +description: Contains a set of advanced transitions to be used with any of the Fx Classes. + +license: MIT-style license. + +credits: Easing Equations by Robert Penner, , modified and optimized to be used with MooTools. + +requires: Fx + +provides: Fx.Transitions + +... +*/ + +Fx.implement({ + + getTransition: function(){ + var trans = this.options.transition || Fx.Transitions.Sine.easeInOut; + if (typeof trans == 'string'){ + var data = trans.split(':'); + trans = Fx.Transitions; + trans = trans[data[0]] || trans[data[0].capitalize()]; + if (data[1]) trans = trans['ease' + data[1].capitalize() + (data[2] ? data[2].capitalize() : '')]; + } + return trans; + } + +}); + +Fx.Transition = function(transition, params){ + params = $splat(params); + return $extend(transition, { + easeIn: function(pos){ + return transition(pos, params); + }, + easeOut: function(pos){ + return 1 - transition(1 - pos, params); + }, + easeInOut: function(pos){ + return (pos <= 0.5) ? transition(2 * pos, params) / 2 : (2 - transition(2 * (1 - pos), params)) / 2; + } + }); +}; + +Fx.Transitions = new Hash({ + + linear: $arguments(0) + +}); + +Fx.Transitions.extend = function(transitions){ + for (var transition in transitions) Fx.Transitions[transition] = new Fx.Transition(transitions[transition]); +}; + +Fx.Transitions.extend({ + + Pow: function(p, x){ + return Math.pow(p, x[0] || 6); + }, + + Expo: function(p){ + return Math.pow(2, 8 * (p - 1)); + }, + + Circ: function(p){ + return 1 - Math.sin(Math.acos(p)); + }, + + Sine: function(p){ + return 1 - Math.sin((1 - p) * Math.PI / 2); + }, + + Back: function(p, x){ + x = x[0] || 1.618; + return Math.pow(p, 2) * ((x + 1) * p - x); + }, + + Bounce: function(p){ + var value; + for (var a = 0, b = 1; 1; a += b, b /= 2){ + if (p >= (7 - 4 * a) / 11){ + value = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2); + break; + } + } + return value; + }, + + Elastic: function(p, x){ + return Math.pow(2, 10 * --p) * Math.cos(20 * p * Math.PI * (x[0] || 1) / 3); + } + +}); + +['Quad', 'Cubic', 'Quart', 'Quint'].each(function(transition, i){ + Fx.Transitions[transition] = new Fx.Transition(function(p){ + return Math.pow(p, [i + 2]); + }); +}); + + +/* +--- + +name: Fx.Tween + +description: Formerly Fx.Style, effect to transition any CSS property for an element. + +license: MIT-style license. + +requires: Fx.CSS + +provides: [Fx.Tween, Element.fade, Element.highlight] + +... +*/ + +Fx.Tween = new Class({ + + Extends: Fx.CSS, + + initialize: function(element, options){ + this.element = this.subject = document.id(element); + this.parent(options); + }, + + set: function(property, now){ + if (arguments.length == 1){ + now = property; + property = this.property || this.options.property; + } + this.render(this.element, property, now, this.options.unit); + return this; + }, + + start: function(property, from, to){ + if (!this.check(property, from, to)) return this; + var args = Array.flatten(arguments); + this.property = this.options.property || args.shift(); + var parsed = this.prepare(this.element, this.property, args); + return this.parent(parsed.from, parsed.to); + } + +}); + +Element.Properties.tween = { + + set: function(options){ + var tween = this.retrieve('tween'); + if (tween) tween.cancel(); + return this.eliminate('tween').store('tween:options', $extend({link: 'cancel'}, options)); + }, + + get: function(options){ + if (options || !this.retrieve('tween')){ + if (options || !this.retrieve('tween:options')) this.set('tween', options); + this.store('tween', new Fx.Tween(this, this.retrieve('tween:options'))); + } + return this.retrieve('tween'); + } + +}; + +Element.implement({ + + tween: function(property, from, to){ + this.get('tween').start(arguments); + return this; + }, + + fade: function(how){ + var fade = this.get('tween'), o = 'opacity', toggle; + how = $pick(how, 'toggle'); + switch (how){ + case 'in': fade.start(o, 1); break; + case 'out': fade.start(o, 0); break; + case 'show': fade.set(o, 1); break; + case 'hide': fade.set(o, 0); break; + case 'toggle': + var flag = this.retrieve('fade:flag', this.get('opacity') == 1); + fade.start(o, (flag) ? 0 : 1); + this.store('fade:flag', !flag); + toggle = true; + break; + default: fade.start(o, arguments); + } + if (!toggle) this.eliminate('fade:flag'); + return this; + }, + + highlight: function(start, end){ + if (!end){ + end = this.retrieve('highlight:original', this.getStyle('background-color')); + end = (end == 'transparent') ? '#fff' : end; + } + var tween = this.get('tween'); + tween.start('background-color', start || '#ffff88', end).chain(function(){ + this.setStyle('background-color', this.retrieve('highlight:original')); + tween.callChain(); + }.bind(this)); + return this; + } + +}); + + +/* +--- + +name: Request + +description: Powerful all purpose Request Class. Uses XMLHTTPRequest. + +license: MIT-style license. + +requires: [Element, Chain, Events, Options, Browser] + +provides: Request + +... +*/ + +var Request = new Class({ + + Implements: [Chain, Events, Options], + + options: {/* + onRequest: $empty, + onComplete: $empty, + onCancel: $empty, + onSuccess: $empty, + onFailure: $empty, + onException: $empty,*/ + url: '', + data: '', + headers: { + 'X-Requested-With': 'XMLHttpRequest', + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }, + async: true, + format: false, + method: 'post', + link: 'ignore', + isSuccess: null, + emulation: true, + urlEncoded: true, + encoding: 'utf-8', + evalScripts: false, + evalResponse: false, + noCache: false + }, + + initialize: function(options){ + this.xhr = new Browser.Request(); + this.setOptions(options); + this.options.isSuccess = this.options.isSuccess || this.isSuccess; + this.headers = new Hash(this.options.headers); + }, + + onStateChange: function(){ + if (this.xhr.readyState != 4 || !this.running) return; + this.running = false; + this.status = 0; + $try(function(){ + this.status = this.xhr.status; + }.bind(this)); + this.xhr.onreadystatechange = $empty; + if (this.options.isSuccess.call(this, this.status)){ + this.response = {text: this.xhr.responseText, xml: this.xhr.responseXML}; + this.success(this.response.text, this.response.xml); + } else { + this.response = {text: null, xml: null}; + this.failure(); + } + }, + + isSuccess: function(){ + return ((this.status >= 200) && (this.status < 300)); + }, + + processScripts: function(text){ + if (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) return $exec(text); + return text.stripScripts(this.options.evalScripts); + }, + + success: function(text, xml){ + this.onSuccess(this.processScripts(text), xml); + }, + + onSuccess: function(){ + this.fireEvent('complete', arguments).fireEvent('success', arguments).callChain(); + }, + + failure: function(){ + this.onFailure(); + }, + + onFailure: function(){ + this.fireEvent('complete').fireEvent('failure', this.xhr); + }, + + setHeader: function(name, value){ + this.headers.set(name, value); + return this; + }, + + getHeader: function(name){ + return $try(function(){ + return this.xhr.getResponseHeader(name); + }.bind(this)); + }, + + check: function(){ + if (!this.running) return true; + switch (this.options.link){ + case 'cancel': this.cancel(); return true; + case 'chain': this.chain(this.caller.bind(this, arguments)); return false; + } + return false; + }, + + send: function(options){ + if (!this.check(options)) return this; + this.running = true; + + var type = $type(options); + if (type == 'string' || type == 'element') options = {data: options}; + + var old = this.options; + options = $extend({data: old.data, url: old.url, method: old.method}, options); + var data = options.data, url = String(options.url), method = options.method.toLowerCase(); + + switch ($type(data)){ + case 'element': data = document.id(data).toQueryString(); break; + case 'object': case 'hash': data = Hash.toQueryString(data); + } + + if (this.options.format){ + var format = 'format=' + this.options.format; + data = (data) ? format + '&' + data : format; + } + + if (this.options.emulation && !['get', 'post'].contains(method)){ + var _method = '_method=' + method; + data = (data) ? _method + '&' + data : _method; + method = 'post'; + } + + if (this.options.urlEncoded && method == 'post'){ + var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : ''; + this.headers.set('Content-type', 'application/x-www-form-urlencoded' + encoding); + } + + if (this.options.noCache){ + var noCache = 'noCache=' + new Date().getTime(); + data = (data) ? noCache + '&' + data : noCache; + } + + var trimPosition = url.lastIndexOf('/'); + if (trimPosition > -1 && (trimPosition = url.indexOf('#')) > -1) url = url.substr(0, trimPosition); + + if (data && method == 'get'){ + url = url + (url.contains('?') ? '&' : '?') + data; + data = null; + } + + this.xhr.open(method.toUpperCase(), url, this.options.async); + + this.xhr.onreadystatechange = this.onStateChange.bind(this); + + this.headers.each(function(value, key){ + try { + this.xhr.setRequestHeader(key, value); + } catch (e){ + this.fireEvent('exception', [key, value]); + } + }, this); + + this.fireEvent('request'); + this.xhr.send(data); + if (!this.options.async) this.onStateChange(); + return this; + }, + + cancel: function(){ + if (!this.running) return this; + this.running = false; + this.xhr.abort(); + this.xhr.onreadystatechange = $empty; + this.xhr = new Browser.Request(); + this.fireEvent('cancel'); + return this; + } + +}); + +(function(){ + +var methods = {}; +['get', 'post', 'put', 'delete', 'GET', 'POST', 'PUT', 'DELETE'].each(function(method){ + methods[method] = function(){ + var params = Array.link(arguments, {url: String.type, data: $defined}); + return this.send($extend(params, {method: method})); + }; +}); + +Request.implement(methods); + +})(); + +Element.Properties.send = { + + set: function(options){ + var send = this.retrieve('send'); + if (send) send.cancel(); + return this.eliminate('send').store('send:options', $extend({ + data: this, link: 'cancel', method: this.get('method') || 'post', url: this.get('action') + }, options)); + }, + + get: function(options){ + if (options || !this.retrieve('send')){ + if (options || !this.retrieve('send:options')) this.set('send', options); + this.store('send', new Request(this.retrieve('send:options'))); + } + return this.retrieve('send'); + } + +}; + +Element.implement({ + + send: function(url){ + var sender = this.get('send'); + sender.send({data: this, url: url || sender.options.url}); + return this; + } + +}); + + +/* +--- + +name: Request.HTML + +description: Extends the basic Request Class with additional methods for interacting with HTML responses. + +license: MIT-style license. + +requires: [Request, Element] + +provides: Request.HTML + +... +*/ + +Request.HTML = new Class({ + + Extends: Request, + + options: { + update: false, + append: false, + evalScripts: true, + filter: false + }, + + processHTML: function(text){ + var match = text.match(/]*>([\s\S]*?)<\/body>/i); + text = (match) ? match[1] : text; + + var container = new Element('div'); + + return $try(function(){ + var root = '' + text + '', doc; + if (Browser.Engine.trident){ + doc = new ActiveXObject('Microsoft.XMLDOM'); + doc.async = false; + doc.loadXML(root); + } else { + doc = new DOMParser().parseFromString(root, 'text/xml'); + } + root = doc.getElementsByTagName('root')[0]; + if (!root) return null; + for (var i = 0, k = root.childNodes.length; i < k; i++){ + var child = Element.clone(root.childNodes[i], true, true); + if (child) container.grab(child); + } + return container; + }) || container.set('html', text); + }, + + success: function(text){ + var options = this.options, response = this.response; + + response.html = text.stripScripts(function(script){ + response.javascript = script; + }); + + var temp = this.processHTML(response.html); + + response.tree = temp.childNodes; + response.elements = temp.getElements('*'); + + if (options.filter) response.tree = response.elements.filter(options.filter); + if (options.update) document.id(options.update).empty().set('html', response.html); + else if (options.append) document.id(options.append).adopt(temp.getChildren()); + if (options.evalScripts) $exec(response.javascript); + + this.onSuccess(response.tree, response.elements, response.html, response.javascript); + } + +}); + +Element.Properties.load = { + + set: function(options){ + var load = this.retrieve('load'); + if (load) load.cancel(); + return this.eliminate('load').store('load:options', $extend({data: this, link: 'cancel', update: this, method: 'get'}, options)); + }, + + get: function(options){ + if (options || ! this.retrieve('load')){ + if (options || !this.retrieve('load:options')) this.set('load', options); + this.store('load', new Request.HTML(this.retrieve('load:options'))); + } + return this.retrieve('load'); + } + +}; + +Element.implement({ + + load: function(){ + this.get('load').send(Array.link(arguments, {data: Object.type, url: String.type})); + return this; + } + +}); + + +/* +--- + +name: JSON + +description: JSON encoder and decoder. + +license: MIT-style license. + +see: + +requires: [Array, String, Number, Function, Hash] + +provides: JSON + +... +*/ + +var JSON = new Hash(this.JSON && { + stringify: JSON.stringify, + parse: JSON.parse +}).extend({ + + $specialChars: {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\'}, + + $replaceChars: function(chr){ + return JSON.$specialChars[chr] || '\\u00' + Math.floor(chr.charCodeAt() / 16).toString(16) + (chr.charCodeAt() % 16).toString(16); + }, + + encode: function(obj){ + switch ($type(obj)){ + case 'string': + return '"' + obj.replace(/[\x00-\x1f\\"]/g, JSON.$replaceChars) + '"'; + case 'array': + return '[' + String(obj.map(JSON.encode).clean()) + ']'; + case 'object': case 'hash': + var string = []; + Hash.each(obj, function(value, key){ + var json = JSON.encode(value); + if (json) string.push(JSON.encode(key) + ':' + json); + }); + return '{' + string + '}'; + case 'number': case 'boolean': return String(obj); + case false: return 'null'; + } + return null; + }, + + decode: function(string, secure){ + if ($type(string) != 'string' || !string.length) return null; + if (secure && !(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''))) return null; + return eval('(' + string + ')'); + } + +}); + + +/* +--- + +name: Request.JSON + +description: Extends the basic Request Class with additional methods for sending and receiving JSON data. + +license: MIT-style license. + +requires: [Request, JSON] + +provides: [Request.JSON] + +... +*/ + +Request.JSON = new Class({ + + Extends: Request, + + options: { + secure: true + }, + + initialize: function(options){ + this.parent(options); + this.headers.extend({'Accept': 'application/json', 'X-Request': 'JSON'}); + }, + + success: function(text){ + this.response.json = JSON.decode(text, this.options.secure); + this.onSuccess(this.response.json, text); + } + +}); + + +/* +--- + +name: Cookie + +description: Class for creating, reading, and deleting browser Cookies. + +license: MIT-style license. + +credits: Based on the functions by Peter-Paul Koch (http://quirksmode.org). + +requires: Options + +provides: Cookie + +... +*/ + +var Cookie = new Class({ + + Implements: Options, + + options: { + path: false, + domain: false, + duration: false, + secure: false, + document: document + }, + + initialize: function(key, options){ + this.key = key; + this.setOptions(options); + }, + + write: function(value){ + value = encodeURIComponent(value); + if (this.options.domain) value += '; domain=' + this.options.domain; + if (this.options.path) value += '; path=' + this.options.path; + if (this.options.duration){ + var date = new Date(); + date.setTime(date.getTime() + this.options.duration * 24 * 60 * 60 * 1000); + value += '; expires=' + date.toGMTString(); + } + if (this.options.secure) value += '; secure'; + this.options.document.cookie = this.key + '=' + value; + return this; + }, + + read: function(){ + var value = this.options.document.cookie.match('(?:^|;)\\s*' + this.key.escapeRegExp() + '=([^;]*)'); + return (value) ? decodeURIComponent(value[1]) : null; + }, + + dispose: function(){ + new Cookie(this.key, $merge(this.options, {duration: -1})).write(''); + return this; + } + +}); + +Cookie.write = function(key, value, options){ + return new Cookie(key, options).write(value); +}; + +Cookie.read = function(key){ + return new Cookie(key).read(); +}; + +Cookie.dispose = function(key, options){ + return new Cookie(key, options).dispose(); +}; + + +/* +--- + +name: DomReady + +description: Contains the custom event domready. + +license: MIT-style license. + +requires: Element.Event + +provides: DomReady + +... +*/ + +Element.Events.domready = { + + onAdd: function(fn){ + if (Browser.loaded) fn.call(this); + } + +}; + +(function(){ + + var domready = function(){ + if (Browser.loaded) return; + Browser.loaded = true; + window.fireEvent('domready'); + document.fireEvent('domready'); + }; + + window.addEvent('load', domready); + + if (Browser.Engine.trident){ + var temp = document.createElement('div'); + (function(){ + ($try(function(){ + temp.doScroll(); // Technique by Diego Perini + return document.id(temp).inject(document.body).set('html', 'temp').dispose(); + })) ? domready() : arguments.callee.delay(50); + })(); + } else if (Browser.Engine.webkit && Browser.Engine.version < 525){ + (function(){ + (['loaded', 'complete'].contains(document.readyState)) ? domready() : arguments.callee.delay(50); + })(); + } else { + document.addEvent('DOMContentLoaded', domready); + } + +})(); + + +/* +--- + +name: Selectors + +description: Adds advanced CSS-style querying capabilities for targeting HTML Elements. Includes pseudo selectors. + +license: MIT-style license. + +requires: Element + +provides: Selectors + +... +*/ + +Native.implement([Document, Element], { + + getElements: function(expression, nocash){ + expression = expression.split(','); + var items, local = {}; + for (var i = 0, l = expression.length; i < l; i++){ + var selector = expression[i], elements = Selectors.Utils.search(this, selector, local); + if (i != 0 && elements.item) elements = $A(elements); + items = (i == 0) ? elements : (items.item) ? $A(items).concat(elements) : items.concat(elements); + } + return new Elements(items, {ddup: (expression.length > 1), cash: !nocash}); + } + +}); + +Element.implement({ + + match: function(selector){ + if (!selector || (selector == this)) return true; + var tagid = Selectors.Utils.parseTagAndID(selector); + var tag = tagid[0], id = tagid[1]; + if (!Selectors.Filters.byID(this, id) || !Selectors.Filters.byTag(this, tag)) return false; + var parsed = Selectors.Utils.parseSelector(selector); + return (parsed) ? Selectors.Utils.filter(this, parsed, {}) : true; + } + +}); + +var Selectors = {Cache: {nth: {}, parsed: {}}}; + +Selectors.RegExps = { + id: (/#([\w-]+)/), + tag: (/^(\w+|\*)/), + quick: (/^(\w+|\*)$/), + splitter: (/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g), + combined: (/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g) +}; + +Selectors.Utils = { + + chk: function(item, uniques){ + if (!uniques) return true; + var uid = $uid(item); + if (!uniques[uid]) return uniques[uid] = true; + return false; + }, + + parseNthArgument: function(argument){ + if (Selectors.Cache.nth[argument]) return Selectors.Cache.nth[argument]; + var parsed = argument.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/); + if (!parsed) return false; + var inta = parseInt(parsed[1], 10); + var a = (inta || inta === 0) ? inta : 1; + var special = parsed[2] || false; + var b = parseInt(parsed[3], 10) || 0; + if (a != 0){ + b--; + while (b < 1) b += a; + while (b >= a) b -= a; + } else { + a = b; + special = 'index'; + } + switch (special){ + case 'n': parsed = {a: a, b: b, special: 'n'}; break; + case 'odd': parsed = {a: 2, b: 0, special: 'n'}; break; + case 'even': parsed = {a: 2, b: 1, special: 'n'}; break; + case 'first': parsed = {a: 0, special: 'index'}; break; + case 'last': parsed = {special: 'last-child'}; break; + case 'only': parsed = {special: 'only-child'}; break; + default: parsed = {a: (a - 1), special: 'index'}; + } + + return Selectors.Cache.nth[argument] = parsed; + }, + + parseSelector: function(selector){ + if (Selectors.Cache.parsed[selector]) return Selectors.Cache.parsed[selector]; + var m, parsed = {classes: [], pseudos: [], attributes: []}; + while ((m = Selectors.RegExps.combined.exec(selector))){ + var cn = m[1], an = m[2], ao = m[3], av = m[5], pn = m[6], pa = m[7]; + if (cn){ + parsed.classes.push(cn); + } else if (pn){ + var parser = Selectors.Pseudo.get(pn); + if (parser) parsed.pseudos.push({parser: parser, argument: pa}); + else parsed.attributes.push({name: pn, operator: '=', value: pa}); + } else if (an){ + parsed.attributes.push({name: an, operator: ao, value: av}); + } + } + if (!parsed.classes.length) delete parsed.classes; + if (!parsed.attributes.length) delete parsed.attributes; + if (!parsed.pseudos.length) delete parsed.pseudos; + if (!parsed.classes && !parsed.attributes && !parsed.pseudos) parsed = null; + return Selectors.Cache.parsed[selector] = parsed; + }, + + parseTagAndID: function(selector){ + var tag = selector.match(Selectors.RegExps.tag); + var id = selector.match(Selectors.RegExps.id); + return [(tag) ? tag[1] : '*', (id) ? id[1] : false]; + }, + + filter: function(item, parsed, local){ + var i; + if (parsed.classes){ + for (i = parsed.classes.length; i--; i){ + var cn = parsed.classes[i]; + if (!Selectors.Filters.byClass(item, cn)) return false; + } + } + if (parsed.attributes){ + for (i = parsed.attributes.length; i--; i){ + var att = parsed.attributes[i]; + if (!Selectors.Filters.byAttribute(item, att.name, att.operator, att.value)) return false; + } + } + if (parsed.pseudos){ + for (i = parsed.pseudos.length; i--; i){ + var psd = parsed.pseudos[i]; + if (!Selectors.Filters.byPseudo(item, psd.parser, psd.argument, local)) return false; + } + } + return true; + }, + + getByTagAndID: function(ctx, tag, id){ + if (id){ + var item = (ctx.getElementById) ? ctx.getElementById(id, true) : Element.getElementById(ctx, id, true); + return (item && Selectors.Filters.byTag(item, tag)) ? [item] : []; + } else { + return ctx.getElementsByTagName(tag); + } + }, + + search: function(self, expression, local){ + var splitters = []; + + var selectors = expression.trim().replace(Selectors.RegExps.splitter, function(m0, m1, m2){ + splitters.push(m1); + return ':)' + m2; + }).split(':)'); + + var items, filtered, item; + + for (var i = 0, l = selectors.length; i < l; i++){ + + var selector = selectors[i]; + + if (i == 0 && Selectors.RegExps.quick.test(selector)){ + items = self.getElementsByTagName(selector); + continue; + } + + var splitter = splitters[i - 1]; + + var tagid = Selectors.Utils.parseTagAndID(selector); + var tag = tagid[0], id = tagid[1]; + + if (i == 0){ + items = Selectors.Utils.getByTagAndID(self, tag, id); + } else { + var uniques = {}, found = []; + for (var j = 0, k = items.length; j < k; j++) found = Selectors.Getters[splitter](found, items[j], tag, id, uniques); + items = found; + } + + var parsed = Selectors.Utils.parseSelector(selector); + + if (parsed){ + filtered = []; + for (var m = 0, n = items.length; m < n; m++){ + item = items[m]; + if (Selectors.Utils.filter(item, parsed, local)) filtered.push(item); + } + items = filtered; + } + + } + + return items; + + } + +}; + +Selectors.Getters = { + + ' ': function(found, self, tag, id, uniques){ + var items = Selectors.Utils.getByTagAndID(self, tag, id); + for (var i = 0, l = items.length; i < l; i++){ + var item = items[i]; + if (Selectors.Utils.chk(item, uniques)) found.push(item); + } + return found; + }, + + '>': function(found, self, tag, id, uniques){ + var children = Selectors.Utils.getByTagAndID(self, tag, id); + for (var i = 0, l = children.length; i < l; i++){ + var child = children[i]; + if (child.parentNode == self && Selectors.Utils.chk(child, uniques)) found.push(child); + } + return found; + }, + + '+': function(found, self, tag, id, uniques){ + while ((self = self.nextSibling)){ + if (self.nodeType == 1){ + if (Selectors.Utils.chk(self, uniques) && Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self); + break; + } + } + return found; + }, + + '~': function(found, self, tag, id, uniques){ + while ((self = self.nextSibling)){ + if (self.nodeType == 1){ + if (!Selectors.Utils.chk(self, uniques)) break; + if (Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self); + } + } + return found; + } + +}; + +Selectors.Filters = { + + byTag: function(self, tag){ + return (tag == '*' || (self.tagName && self.tagName.toLowerCase() == tag)); + }, + + byID: function(self, id){ + return (!id || (self.id && self.id == id)); + }, + + byClass: function(self, klass){ + return (self.className && self.className.contains && self.className.contains(klass, ' ')); + }, + + byPseudo: function(self, parser, argument, local){ + return parser.call(self, argument, local); + }, + + byAttribute: function(self, name, operator, value){ + var result = Element.prototype.getProperty.call(self, name); + if (!result) return (operator == '!='); + if (!operator || value == undefined) return true; + switch (operator){ + case '=': return (result == value); + case '*=': return (result.contains(value)); + case '^=': return (result.substr(0, value.length) == value); + case '$=': return (result.substr(result.length - value.length) == value); + case '!=': return (result != value); + case '~=': return result.contains(value, ' '); + case '|=': return result.contains(value, '-'); + } + return false; + } + +}; + +Selectors.Pseudo = new Hash({ + + // w3c pseudo selectors + + checked: function(){ + return this.checked; + }, + + empty: function(){ + return !(this.innerText || this.textContent || '').length; + }, + + not: function(selector){ + return !Element.match(this, selector); + }, + + contains: function(text){ + return (this.innerText || this.textContent || '').contains(text); + }, + + 'first-child': function(){ + return Selectors.Pseudo.index.call(this, 0); + }, + + 'last-child': function(){ + var element = this; + while ((element = element.nextSibling)){ + if (element.nodeType == 1) return false; + } + return true; + }, + + 'only-child': function(){ + var prev = this; + while ((prev = prev.previousSibling)){ + if (prev.nodeType == 1) return false; + } + var next = this; + while ((next = next.nextSibling)){ + if (next.nodeType == 1) return false; + } + return true; + }, + + 'nth-child': function(argument, local){ + argument = (argument == undefined) ? 'n' : argument; + var parsed = Selectors.Utils.parseNthArgument(argument); + if (parsed.special != 'n') return Selectors.Pseudo[parsed.special].call(this, parsed.a, local); + var count = 0; + local.positions = local.positions || {}; + var uid = $uid(this); + if (!local.positions[uid]){ + var self = this; + while ((self = self.previousSibling)){ + if (self.nodeType != 1) continue; + count ++; + var position = local.positions[$uid(self)]; + if (position != undefined){ + count = position + count; + break; + } + } + local.positions[uid] = count; + } + return (local.positions[uid] % parsed.a == parsed.b); + }, + + // custom pseudo selectors + + index: function(index){ + var element = this, count = 0; + while ((element = element.previousSibling)){ + if (element.nodeType == 1 && ++count > index) return false; + } + return (count == index); + }, + + even: function(argument, local){ + return Selectors.Pseudo['nth-child'].call(this, '2n+1', local); + }, + + odd: function(argument, local){ + return Selectors.Pseudo['nth-child'].call(this, '2n', local); + }, + + selected: function(){ + return this.selected; + }, + + enabled: function(){ + return (this.disabled === false); + } + +}); + + +/* +--- + +name: Swiff + +description: Wrapper for embedding SWF movies. Supports External Interface Communication. + +license: MIT-style license. + +credits: Flash detection & Internet Explorer + Flash Player 9 fix inspired by SWFObject. + +requires: [Options, $util] + +provides: Swiff + +... +*/ + +var Swiff = new Class({ + + Implements: [Options], + + options: { + id: null, + height: 1, + width: 1, + container: null, + properties: {}, + params: { + quality: 'high', + allowScriptAccess: 'always', + wMode: 'transparent', + swLiveConnect: true + }, + callBacks: {}, + vars: {} + }, + + toElement: function(){ + return this.object; + }, + + initialize: function(path, options){ + this.instance = 'Swiff_' + $time(); + + this.setOptions(options); + options = this.options; + var id = this.id = options.id || this.instance; + var container = document.id(options.container); + + Swiff.CallBacks[this.instance] = {}; + + var params = options.params, vars = options.vars, callBacks = options.callBacks; + var properties = $extend({height: options.height, width: options.width}, options.properties); + + var self = this; + + for (var callBack in callBacks){ + Swiff.CallBacks[this.instance][callBack] = (function(option){ + return function(){ + return option.apply(self.object, arguments); + }; + })(callBacks[callBack]); + vars[callBack] = 'Swiff.CallBacks.' + this.instance + '.' + callBack; + } + + params.flashVars = Hash.toQueryString(vars); + if (Browser.Engine.trident){ + properties.classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; + params.movie = path; + } else { + properties.type = 'application/x-shockwave-flash'; + properties.data = path; + } + var build = ''; + } + build += ''; + this.object = ((container) ? container.empty() : new Element('div')).set('html', build).firstChild; + }, + + replaces: function(element){ + element = document.id(element, true); + element.parentNode.replaceChild(this.toElement(), element); + return this; + }, + + inject: function(element){ + document.id(element, true).appendChild(this.toElement()); + return this; + }, + + remote: function(){ + return Swiff.remote.apply(Swiff, [this.toElement()].extend(arguments)); + } + +}); + +Swiff.CallBacks = {}; + +Swiff.remote = function(obj, fn){ + var rs = obj.CallFunction('' + __flash__argumentsToXML(arguments, 2) + ''); + return eval(rs); +}; + diff --git a/Demos/TCPSockets/demo.html b/Demos/TCPSockets/demo.html index 30f3697..b273b60 100755 --- a/Demos/TCPSockets/demo.html +++ b/Demos/TCPSockets/demo.html @@ -2,11 +2,11 @@ - + + - + APE Check Tool +