From 66d47f16a6e4204b72843a6775a580b1a574fb64 Mon Sep 17 00:00:00 2001 From: David Guilherme Date: Mon, 5 Oct 2015 17:40:55 -0300 Subject: [PATCH] Release 0.2.0 --- .gitignore | 3 ++- Gulpfile.js | 15 +++++++++++---- chrome/background.js | 2 +- chrome/manifest.json | 2 +- firefox/index.js | 2 +- firefox/package.json | 2 +- player/TemplateData/About.png | Bin 0 -> 1671 bytes player/TemplateData/Close.png | Bin 0 -> 1188 bytes player/TemplateData/CounterOff.png | Bin 0 -> 414 bytes player/TemplateData/CounterOn.png | Bin 0 -> 359 bytes player/TemplateData/Gov.png | Bin 0 -> 34659 bytes player/TemplateData/LSD.png | Bin 0 -> 15718 bytes player/TemplateData/Lavid.png | Bin 0 -> 14934 bytes player/TemplateData/RNP.png | Bin 0 -> 10422 bytes player/TemplateData/ToLeft.png | Bin 0 -> 648 bytes player/TemplateData/ToRight.png | Bin 0 -> 661 bytes player/TemplateData/UF.png | Bin 0 -> 19599 bytes player/TemplateData/UFCG.png | Bin 0 -> 18324 bytes player/TemplateData/logo.png | Bin 0 -> 4402 bytes player/TemplateData/style.css | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- player/bower.json | 4 +++- player/js/loading.js | 12 +++++++----- player/js/message-box.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ player/js/message.js | 50 -------------------------------------------------- player/js/scripts.js | 36 ++++++++++++++++++++++++++++++++++++ player/js/vlibras-plugin.js | 15 ++++++++++++--- player/webgl/connect.js | 6 +++--- player/webgl/load.js | 2 +- player/webgl/verify-compatibility.js | 2 +- player/webgl/window.html | 42 ++++++++++++++++++++++++++++++++++++++++-- player/webplayer/UnityObject2.js | 1 + player/webplayer/WEBPLAYER.unity3d | Bin 2433606 -> 0 bytes player/webplayer/player.js | 15 --------------- player/webplayer/verify-compatibility.js | 17 +++++++++++++++++ player/webplayer/webplayer.js | 14 ++++++++++++++ player/webplayer/window.html | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------- safari.safariextension/Info.plist | 4 ++-- safari.safariextension/app/main.js | 56 -------------------------------------------------------- safari.safariextension/app/middleware.js | 11 +++++++++++ 39 files changed, 420 insertions(+), 193 deletions(-) create mode 100644 player/TemplateData/About.png create mode 100644 player/TemplateData/Close.png create mode 100644 player/TemplateData/CounterOff.png create mode 100644 player/TemplateData/CounterOn.png create mode 100644 player/TemplateData/Gov.png create mode 100644 player/TemplateData/LSD.png create mode 100644 player/TemplateData/Lavid.png create mode 100644 player/TemplateData/RNP.png create mode 100644 player/TemplateData/ToLeft.png create mode 100644 player/TemplateData/ToRight.png create mode 100644 player/TemplateData/UF.png create mode 100644 player/TemplateData/UFCG.png create mode 100644 player/TemplateData/logo.png create mode 100644 player/js/message-box.js delete mode 100644 player/js/message.js create mode 100644 player/js/scripts.js create mode 100644 player/webplayer/UnityObject2.js delete mode 100644 player/webplayer/player.js create mode 100644 player/webplayer/verify-compatibility.js create mode 100644 player/webplayer/webplayer.js delete mode 100644 safari.safariextension/app/main.js create mode 100644 safari.safariextension/app/middleware.js diff --git a/.gitignore b/.gitignore index 7db56de..0d5d028 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ node_modules **/Thumbs.db **/*.crx -**/*.xpi \ No newline at end of file +**/*.xpi +**/*.safariextz diff --git a/Gulpfile.js b/Gulpfile.js index d8223d1..f63c198 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -10,6 +10,7 @@ var webglFiles = [ 'connect.js', 'load.js', 'verify-compatibility.js', + 'error.js', 'window.html', 'TemplateData/*', 'Release/*' @@ -17,15 +18,17 @@ var webglFiles = [ var webplayerFiles = [ 'window.html', - 'player.js', - 'WEBPLAYER.unity3d' + 'verify-compatibility.js', + 'webplayer.js', + 'webplayer.unity3d', + 'UnityObject2.js', + '../vendors/jquery.js' ]; var playerFiles = [ 'TemplateData/*', 'js/*', - 'vendors/qdclient/qdclient.js', - 'vendors/offline/offline.js' + 'vendors/qdclient/qdclient.js' ]; var webglTask = function(dest) { @@ -40,6 +43,10 @@ var webplayerTask = function(dest) { .pipe(gulp.dest(dest)); playerTask(dest); + + // Additional dependencies + gulp.src(['vendors/jquery/dist/jquery.min.js'], {base: 'player', cwd: 'player'}) + .pipe(gulp.dest(dest)); }; var playerTask = function(dest) { diff --git a/chrome/background.js b/chrome/background.js index 58a7fde..0f20230 100644 --- a/chrome/background.js +++ b/chrome/background.js @@ -20,7 +20,7 @@ chrome.contextMenus.onClicked.addListener( function (info) { url: "app/player/window.html", top: 10, left: 10, - width: 535, + width: 400, height: 500, type: "popup" }, function (w) { diff --git a/chrome/manifest.json b/chrome/manifest.json index 4f55e77..9c101ac 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -3,7 +3,7 @@ "name": "VLibras", "description": "Um tradutor de Português para LIBRAS.", - "version": "0.1.2", + "version": "0.2.0", "background": { "scripts": ["background.js"], diff --git a/firefox/index.js b/firefox/index.js index 93b1e0d..fe46808 100644 --- a/firefox/index.js +++ b/firefox/index.js @@ -36,7 +36,7 @@ cm.Item({ app.window = browser.open( self.data.url('player/window.html'), 'VLibras Plugin', - 'width=560,height=560,menubar=no' + 'width=400,height=500,menubar=no,resizable=yes' ); } else { app.worker.port.emit('selectedText', app.selectedText); diff --git a/firefox/package.json b/firefox/package.json index 1870f12..6eb4dbe 100644 --- a/firefox/package.json +++ b/firefox/package.json @@ -1,7 +1,7 @@ { "title": "VLibras Plugin", "name": "vlibras-plugin", - "version": "0.1.2", + "version": "0.2.0", "description": "Um tradutor de Português para LIBRAS", "main": "index.js", "author": "LAViD", diff --git a/player/TemplateData/About.png b/player/TemplateData/About.png new file mode 100644 index 0000000..42a02c2 Binary files /dev/null and b/player/TemplateData/About.png differ diff --git a/player/TemplateData/Close.png b/player/TemplateData/Close.png new file mode 100644 index 0000000..d349896 Binary files /dev/null and b/player/TemplateData/Close.png differ diff --git a/player/TemplateData/CounterOff.png b/player/TemplateData/CounterOff.png new file mode 100644 index 0000000..4610392 Binary files /dev/null and b/player/TemplateData/CounterOff.png differ diff --git a/player/TemplateData/CounterOn.png b/player/TemplateData/CounterOn.png new file mode 100644 index 0000000..fcb3701 Binary files /dev/null and b/player/TemplateData/CounterOn.png differ diff --git a/player/TemplateData/Gov.png b/player/TemplateData/Gov.png new file mode 100644 index 0000000..90f49a1 Binary files /dev/null and b/player/TemplateData/Gov.png differ diff --git a/player/TemplateData/LSD.png b/player/TemplateData/LSD.png new file mode 100644 index 0000000..2efd1b1 Binary files /dev/null and b/player/TemplateData/LSD.png differ diff --git a/player/TemplateData/Lavid.png b/player/TemplateData/Lavid.png new file mode 100644 index 0000000..ca2673b Binary files /dev/null and b/player/TemplateData/Lavid.png differ diff --git a/player/TemplateData/RNP.png b/player/TemplateData/RNP.png new file mode 100644 index 0000000..6afef55 Binary files /dev/null and b/player/TemplateData/RNP.png differ diff --git a/player/TemplateData/ToLeft.png b/player/TemplateData/ToLeft.png new file mode 100644 index 0000000..42c7284 Binary files /dev/null and b/player/TemplateData/ToLeft.png differ diff --git a/player/TemplateData/ToRight.png b/player/TemplateData/ToRight.png new file mode 100644 index 0000000..1326465 Binary files /dev/null and b/player/TemplateData/ToRight.png differ diff --git a/player/TemplateData/UF.png b/player/TemplateData/UF.png new file mode 100644 index 0000000..52875e3 Binary files /dev/null and b/player/TemplateData/UF.png differ diff --git a/player/TemplateData/UFCG.png b/player/TemplateData/UFCG.png new file mode 100644 index 0000000..29ca9a6 Binary files /dev/null and b/player/TemplateData/UFCG.png differ diff --git a/player/TemplateData/logo.png b/player/TemplateData/logo.png new file mode 100644 index 0000000..6d46d07 Binary files /dev/null and b/player/TemplateData/logo.png differ diff --git a/player/TemplateData/style.css b/player/TemplateData/style.css index 01513e4..e7574fc 100644 --- a/player/TemplateData/style.css +++ b/player/TemplateData/style.css @@ -9,7 +9,7 @@ html, body, #canvas { margin: 0; overflow: hidden; font-size: 70%; - line-height: 110%; + font-family: Arial, sans-serif; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; } @@ -43,6 +43,10 @@ html, body, #canvas { z-index: 9998; } +.message-box a { + color: inherit; +} + .message-box.info { background-color: #3b8bba; color: #ffffff; @@ -63,6 +67,136 @@ html, body, #canvas { color: #8c8c8c; } +#info-screen { + position: absolute; + left: 0; + top: 0; + + padding: 1em; + + width: 100%; + height: 100%; + + background-color: white; + color: black; + font-family: Arial, sans-serif; + text-align: center; + + align-items: center; + -webkit-align-items: center; + font-size: 2em; + + display: none; + + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#info-screen.active { + display: -webkit-flex; +} + +#info-screen .arrow { + flex-grow: 1; + -webkit-flex-grow: 1; + visibility: hidden; +} + +#info-screen .arrow.active { + visibility: visible; +} + +#info-tabset { + flex-grow: 4; + display: -webkit-flex; + flex-direction: column; + -webkit-flex-direction: column; + padding: 0 1em; +} + +#info-main { + flex-direction: column; + -webkit-flex-direction: column; +} + +#info-realizadores { + flex-direction: row; + -webkit-flex-direction: row; + flex-wrap: wrap; + -webkit-flex-wrap: wrap; + justify-content: center; + -webkit-justify-content: center; +} + +#info-realizadores .logo { + margin-left: 2em; + width: 20%; + min-width: 60px; + max-width: 80px; +} + +#gov-logo.logo { + width: 100%; + margin-left: 0; + min-width: 200px; + max-width: 500px; +} + +#ufpb-logo { + width: 10%; +} + +.info-tab { + flex-grow: 3; + -webkit-flex-grow: 3; + display: none; +} + +.info-tab.active { + display: block; +} + +#info-meta p { + margin: .5em 0 0; +} + +#info-meta a { + text-decoration: none; +} + +.info-bullet:before { + content: url(CounterOff.png); +} + +.info-bullet.active:before { + content: url(CounterOn.png); +} + +#info-tab-bullets { + width: 100%; + height: 16px; + text-align: center; + flex-grow: 1; + -webkit-flex-grow: 1; + margin-top: 10%; +} + +#info-button { + position: fixed; + top: 7px; + right: 5px; + z-index: 8888; +} + +#info-button:before { + content: url(About.png); +} + +#info-button.active:before { + content: url(Close.png); +} + .message-box.active { top: 0; opacity: 1; diff --git a/player/bower.json b/player/bower.json index 1bfaeed..c088249 100644 --- a/player/bower.json +++ b/player/bower.json @@ -11,5 +11,7 @@ "devDependencies": { "qdclient": "git@git.lavid.ufpb.br:qdclient.git" }, - "dependencies": {} + "dependencies": { + "jquery": "~2.1.4" + } } diff --git a/player/js/loading.js b/player/js/loading.js index 0272c09..8ebf4be 100644 --- a/player/js/loading.js +++ b/player/js/loading.js @@ -1,19 +1,21 @@ -(function (window, document, Message) { +(function (window, document, MessageBox) { function Loading(selector, messageSelector) { this.element = document.querySelector(selector); - this.message = new Message(messageSelector); + this.box = new MessageBox(messageSelector); + + this.message = null; } Loading.prototype.show = function(message) { this.element.style.display = 'block'; - this.message.show('info', message); + this.message = this.box.show('info', message); }; Loading.prototype.hide = function() { this.element.style.display = 'none'; - this.message.hide(); + this.box.hide(this.message); }; window.Loading = Loading; -})(window, document, window.Message); \ No newline at end of file +})(window, document, window.MessageBox); \ No newline at end of file diff --git a/player/js/message-box.js b/player/js/message-box.js new file mode 100644 index 0000000..da84a48 --- /dev/null +++ b/player/js/message-box.js @@ -0,0 +1,61 @@ +(function(window, document) { + + function MessageBox(selectors) { + this.element = document.querySelector(selectors); + this.message = null; + + this.element.classList.add('message-box'); + + var self = this; + var closeElement = this.element.querySelector('.close'); + + if (closeElement) { + closeElement.addEventListener('click', function (e) { + self.hide(); + }); + } + + this.hide(); + } + + MessageBox.LEVELS = ['info', 'warning', 'success', 'default']; + + MessageBox.prototype.hide = function(message) { + if (message !== this.message) return; + + this.message = null; + this.element.classList.remove('active'); + + MessageBox.LEVELS.forEach(function(level) { + this.element.classList.remove(level); + }, this); + }; + + MessageBox.prototype.show = function(level, message, time) { + var self = this; + + level = MessageBox.LEVELS.indexOf(level) == -1 ? 'info' : level; + + this.hide(); + + self.element.classList.add('active'); + self.element.classList.add(level); + self.element.querySelector('.message').innerHTML = message; + + self.message = { + text: message + }; + + var ref = self.message; + if (time) { + setTimeout(function () { + self.hide(ref); + }, time + 1); + } + + return this.message; + }; + + // Expose + window.MessageBox = MessageBox; +})(window, document); \ No newline at end of file diff --git a/player/js/message.js b/player/js/message.js deleted file mode 100644 index 8b2c12e..0000000 --- a/player/js/message.js +++ /dev/null @@ -1,50 +0,0 @@ -(function(window, document) { - - function Message(selectors) { - this.element = document.querySelector(selectors); - - this.element.classList.add('message-box'); - - var self = this; - var closeElement = this.element.querySelector('.close'); - - if (closeElement) { - closeElement.addEventListener('click', function (e) { - self.hide(); - }); - } - - this.hide(); - } - - Message.LEVELS = ['info', 'warning', 'success', 'default']; - - Message.prototype.hide = function() { - this.element.classList.remove('active'); - - Message.LEVELS.forEach(function(level) { - this.element.classList.remove(level); - }, this); - }; - - Message.prototype.show = function(level, message, time) { - var self = this; - - level = Message.LEVELS.indexOf(level) == -1 ? 'info' : level; - - this.hide(); - - self.element.classList.add('active'); - self.element.classList.add(level); - self.element.querySelector('.message').innerHTML = message; - - if (time) { - setTimeout(function () { - self.hide(); - }, time + 1); - } - }; - - // Expose - window.Message = Message; -})(window, document); \ No newline at end of file diff --git a/player/js/scripts.js b/player/js/scripts.js new file mode 100644 index 0000000..7ee0088 --- /dev/null +++ b/player/js/scripts.js @@ -0,0 +1,36 @@ +(function() { + var info = document.getElementById('info-screen'); + var main = document.getElementById('info-main'); + var realizadores = document.getElementById('info-realizadores'); + var left = document.querySelector('.arrow-left'); + var right = document.querySelector('.arrow-right'); + var bullets = document.querySelectorAll('.info-bullet'); + var info_button = document.getElementById('info-button'); + + info_button.addEventListener('click', function() { + info.classList.toggle('active'); + this.classList.toggle('active'); + }); + + left.addEventListener('click', function() { + realizadores.classList.remove('active'); + main.classList.add('active'); + + this.classList.remove('active'); + right.classList.add('active'); + + bullets[1].classList.remove('active'); + bullets[0].classList.add('active'); + }); + + right.addEventListener('click', function() { + main.classList.remove('active'); + realizadores.classList.add('active'); + + this.classList.remove('active'); + left.classList.add('active'); + + bullets[0].classList.remove('active'); + bullets[1].classList.add('active'); + }); +})(); \ No newline at end of file diff --git a/player/js/vlibras-plugin.js b/player/js/vlibras-plugin.js index 80ba6d9..e46367c 100644 --- a/player/js/vlibras-plugin.js +++ b/player/js/vlibras-plugin.js @@ -1,10 +1,10 @@ -(function(window, document, Loading, Message) { +(function(window, document, Loading, MessageBox) { function VLibrasPlugin() { this.loaded = false; this.chooser = new qdClient.Chooser(); this.glosa = undefined; this.loading = new Loading('#loading-screen', '#message-box'); - this.message = new Message('#message-box'); + this.message = new MessageBox('#message-box'); this.lastReq = { url: null, millis: null, @@ -65,9 +65,18 @@ this.sendGlosa(); }; + VLibrasPlugin.prototype.errorHandler = function() { + console.log('ErrorHandler!'); + this.message.show('warning', 'Ops! Ocorreu um problema, por favor entre em contato com a gente.'); + }; + // Expose window.VLibrasPlugin = new VLibrasPlugin(); + window.onerror = function() { + this.VLibrasPlugin.errorHandler(); + }; + window.onLoadPlayer = function() { this.VLibrasPlugin.load(); }; -})(window, document, Loading, Message); +})(window, document, Loading, MessageBox); diff --git a/player/webgl/connect.js b/player/webgl/connect.js index e332844..46b748b 100644 --- a/player/webgl/connect.js +++ b/player/webgl/connect.js @@ -1,6 +1,6 @@ // connect to canvas var Module = { - TOTAL_MEMORY: 268435456, + TOTAL_MEMORY: 314572800, filePackagePrefixURL: "Release/", memoryInitializerPrefixURL: "Release/", preRun: [], @@ -16,7 +16,7 @@ canvas: document.getElementById('canvas'), progress: null, setStatus: function(text) { - if (this.progress == null) + if (this.progress == null) { if (typeof UnityProgress != 'function') return; @@ -28,7 +28,7 @@ var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/); if (m) this.progress.SetProgress (parseInt(m[2])/parseInt(m[4])); - if (text === "") + if (text === "") this.progress.Clear() }, totalDependencies: 0, diff --git a/player/webgl/load.js b/player/webgl/load.js index 53ce991..4242251 100644 --- a/player/webgl/load.js +++ b/player/webgl/load.js @@ -7,7 +7,7 @@ if (!(!Math.fround)) { codeXHR.open('GET', 'Release/WEBGL.js', true); codeXHR.onload = function() { var code = codeXHR.responseText; - if (!Math.fround) { + if (!Math.fround) { try { console.log('optimizing out Math.fround calls'); var m = /var ([^=]+)=global\.Math\.fround;/.exec(code); diff --git a/player/webgl/verify-compatibility.js b/player/webgl/verify-compatibility.js index 52e4d93..bd8c509 100644 --- a/player/webgl/verify-compatibility.js +++ b/player/webgl/verify-compatibility.js @@ -11,7 +11,7 @@ }; if (!checkWebGLCompability()) { - VLibrasPlugin.showMessage('warning', 'O seu computador não suporta o WebGL. Porfavor atualizar os drivers de vídeo.'); + VLibrasPlugin.showMessage('warning', 'O seu computador não suporta o WebGL. Por favor, atualize os drivers de vídeo.'); window.stop(); }; })(); \ No newline at end of file diff --git a/player/webgl/window.html b/player/webgl/window.html index 0bd6e68..5570056 100644 --- a/player/webgl/window.html +++ b/player/webgl/window.html @@ -2,7 +2,6 @@ - VLibras Plugin @@ -14,13 +13,52 @@ +
+
+
+ +
+
+
+ + +
+

O VLibras é uma ferramenta aberta de distribuição livre, desenvolvida para melhorar o acesso à informação das pessoas surdas brasileiras.

+

Qualquer dúvida ou questionamento, envie uma mensagem para o Núcleo de Pesquisa e Extensão LAViD - Centro de Informática - UFPB através do e-mail. contato@lavid.ufpb.br

+
+
+
+

Realizadores

+

+ + +

+ + +
+
+ + +
+
+
+ +
+
+ - + + diff --git a/player/webplayer/UnityObject2.js b/player/webplayer/UnityObject2.js new file mode 100644 index 0000000..3079586 --- /dev/null +++ b/player/webplayer/UnityObject2.js @@ -0,0 +1 @@ +var unityObject={javaInstallDone:function(d,a,b){var c=parseInt(d.substring(d.lastIndexOf("_")+1),10);if(!isNaN(c)){setTimeout(function(){UnityObject2.instances[c].javaInstallDoneCallback(d,a,b)},10)}}};var UnityObject2=function(K){var af=[],i=window,aa=document,Y=navigator,F=null,h=[],ai=(document.location.protocol=="https:"),z=ai?"https://ssl-webplayer.unity3d.com/":"http://webplayer.unity3d.com/",L="_unity_triedjava",H=a(L),r="_unity_triedclickonce",u=a(r),ac=false,C=[],P=false,x=null,f=null,Q=null,l=[],V=null,q=[],X=false,W="installed",M="missing",b="broken",w="unsupported",D="ready",A="start",G="error",ab="first",B="java",s="clickonce",N=false,T=null,y={pluginName:"Unity Player",pluginMimeType:"application/vnd.unity",baseDownloadUrl:z+"download_webplayer-3.x/",fullInstall:false,autoInstall:false,enableJava:true,enableJVMPreloading:false,enableClickOnce:true,enableUnityAnalytics:false,enableGoogleAnalytics:true,enableBrowserDeprecatedWarning:true,params:{},attributes:{},referrer:null,debugLevel:0,pluginVersionChecker:{container:jQuery("body")[0],hide:true,id:"version-checker"}};y=jQuery.extend(true,y,K);if(y.referrer===""){y.referrer=null}if(ai){y.enableUnityAnalytics=false}function a(aj){var ak=new RegExp(escape(aj)+"=([^;]+)");if(ak.test(aa.cookie+";")){ak.exec(aa.cookie+";");return RegExp.$1}return false}function e(aj,ak){document.cookie=escape(aj)+"="+escape(ak)+"; path=/"}function O(ap){var aq=0,al,ao,am,aj,ak;if(ap){var an=ap.toLowerCase().match(/^(\d+)(?:\.(\d+)(?:\.(\d+)([dabfr])?(\d+)?)?)?$/);if(an&&an[1]){al=an[1];ao=an[2]?an[2]:0;am=an[3]?an[3]:0;aj=an[4]?an[4]:"r";ak=an[5]?an[5]:0;aq|=((al/10)%10)<<28;aq|=(al%10)<<24;aq|=(ao%10)<<20;aq|=(am%10)<<16;aq|={d:2<<12,a:4<<12,b:6<<12,f:8<<12,r:8<<12}[aj];aq|=((ak/100)%10)<<8;aq|=((ak/10)%10)<<4;aq|=(ak%10)}}return aq}function ah(an,aj){var al=y.pluginVersionChecker.container;var ak=aa.createElement("object");var am=0;if(al&&ak){ak.setAttribute("type",y.pluginMimeType);ak.setAttribute("id",y.pluginVersionChecker.id);if(y.pluginVersionChecker.hide){ak.style.visibility="hidden"}al.appendChild(ak);(function(){if(typeof ak.GetPluginVersion==="undefined"){setTimeout(arguments.callee,100)}else{var ao={};if(aj){for(am=0;amax){return 1}}return 0}aq.java=function(){if(Y.javaEnabled()){var aw=(aq.win&&aq.ff);var az=false;if(aw||az){if(typeof Y.mimeTypes!="undefined"){var ay=aw?[1,6,0,12]:[1,4,2,0];for(var av=0;av=8){if(au("1.6.0")){for(var av=12;av<=50;++av){if(ax(av)){if(aq.ie==9&&aq.moz==5&&av<24){continue}else{return true}}}return false}}else{return au("1.6.0")||au("1.5.0")||au("1.4.2")}}}}}return false}();aq.co=function(){if(aq.win&&aq.ie){var at=al.match(/(\.NET CLR [0-9.]+)|(\.NET[0-9.]+)/g);if(at!=null){var ax=[3,5,0];for(var aw=0;aw40){aw=aw.replace("http://","");var ar=aw.split("/");var aA=ar.shift();var av=ar.pop();aw=aA+"/../"+av;while(aw.length<40&&ar.length>0){var ax=ar.pop();if(aw.length+ax.length+5<40){av=ax+"/"+av}else{av="../"+av}aw=aA+"/../"+av}}ak.push(["unity._setCustomVar",2,"GameURL",aw,3]);ak.push(["unity._setCustomVar",1,"UnityObjectVersion","2",3]);if(aq){ak.push(["unity._setCustomVar",3,"installMethod",aq,3])}ak.push(["unity._trackPageview",ay])}return{send:function(au,at,aw,aq){if(y.enableUnityAnalytics||y.enableGoogleAnalytics){n("Analytics SEND",au,at,aw,aq)}++al;var av=2;var ar=function(){if(0==--av){x=null;window.location=aq}};if(aw===null||aw===undefined){aw=""}am(au,at,aw,aq?ar:null);ao(au,at,aw,aq?ar:null)}}}();function J(al,am,an){var aj,aq,ao,ap,ak;if(t.win&&t.ie){aq="";for(aj in al){aq+=" "+aj+'="'+al[aj]+'"'}ao="";for(aj in am){ao+=''}an.outerHTML=""+ao+""}else{ap=aa.createElement("object");for(aj in al){ap.setAttribute(aj,al[aj])}for(aj in am){ak=aa.createElement("param");ak.name=aj;ak.value=am[aj];ap.appendChild(ak)}an.parentNode.replaceChild(ap,an)}}function o(aj){if(typeof aj=="undefined"){return false}if(!aj.complete){return false}if(typeof aj.naturalWidth!="undefined"&&aj.naturalWidth==0){return false}return true}function I(am){var ak=false;for(var al=0;al0&&window.console&&window.console.log){console.log(Array.prototype.slice.call(arguments))}}function n(){af.push(arguments);if(y.debugLevel>1&&window.console&&window.console.log){console.log(Array.prototype.slice.call(arguments))}}function p(aj){if(/^[-+]?[0-9]+$/.test(aj)){aj+="px"}return aj}function v(aw,ak){var au=this;var am=M;var an;Y.plugins.refresh();if(t.clientBrand==="??"||t.clientPlatform==="???"||t.mobile){am=w}else{if(t.op&&t.mac){am=w;an="OPERA-MAC"}else{if(typeof Y.plugins!="undefined"&&Y.plugins[y.pluginName]&&typeof Y.mimeTypes!="undefined"&&Y.mimeTypes[y.pluginMimeType]&&Y.mimeTypes[y.pluginMimeType].enabledPlugin){am=W;if(t.sf&&/Mac OS X 10_6/.test(Y.appVersion)){ah(function(ax){if(!ax||!ax.plugin){am=b;an="OSX10.6-SFx64"}aw(am,Q,an,ax)},ak);return}else{if(t.mac&&t.ch){ah(function(ax){if(ax&&(O(ax.plugin)<=O("2.6.1f3"))){am=b;an="OSX-CH-U<=2.6.1f3"}aw(am,Q,an,ax)},ak);return}else{if(ak){ah(function(ax){aw(am,Q,an,ax)},ak);return}}}}else{if(t.ie){var al=false;try{if(ActiveXObject.prototype!=null){al=true}}catch(ap){}if(!al){am=w;an="ActiveXFailed"}else{am=M;try{var av=new ActiveXObject("UnityWebPlayer.UnityWebPlayer.1");var aj=av.GetPluginVersion();if(ak){var aq={};for(var at=0;at0){var ao=parseFloat(ar[0].split(" ")[2]);if(ao>=6){am=b;an="WIN-U2.5.0f5"}}}}catch(ap){}}}}}}aw(am,Q,an,aq)}function R(ak,aj){v(function(am,an,ao,al){ak(am,al)},aj)}function ad(ak,aj){v(function(am,an,ao,al){E(am,an,ao);ak(am,al)},aj)}var S={getLogHistory:function(){return af},getConfig:function(){return y},getPlatformInfo:function(){return t},initPlugin:function(aj,al){y.targetEl=aj;y.src=al;n("ua:",t);var ak=this;ad(function(an,am){ak.handlePluginStatus(an,am)})},detectUnity:function(al,aj){var ak=this;R(function(an,am){al.call(ak,an,am)},aj)},handlePluginStatus:function(al,aj){var ak=y.targetEl;var an=jQuery(ak);switch(al){case W:this.notifyProgress(an);this.embedPlugin(an,y.callback);break;case M:this.notifyProgress(an);var am=this;var ao=(y.debugLevel===0)?1000:8000;setTimeout(function(){y.targetEl=ak;am.detectUnity(am.handlePluginStatus)},ao);break;case b:this.notifyProgress(an);break;case w:this.notifyProgress(an);break}},getPluginURL:function(){var aj="http://unity3d.com/webplayer/";if(t.win){aj=y.baseDownloadUrl+c()}else{if(Y.platform=="MacIntel"){aj=y.baseDownloadUrl+(y.fullInstall?"webplayer-i386.dmg":"webplayer-mini.dmg");if(y.referrer!==null){aj+="?referrer="+y.referrer}}else{if(Y.platform=="MacPPC"){aj=y.baseDownloadUrl+(y.fullInstall?"webplayer-ppc.dmg":"webplayer-mini.dmg");if(y.referrer!==null){aj+="?referrer="+y.referrer}}}}return aj},getClickOnceURL:function(){return y.baseDownloadUrl+"3.0/co/UnityWebPlayer.application?installer="+encodeURIComponent(y.baseDownloadUrl+c())},embedPlugin:function(am,aw){am=jQuery(am).empty();var au=y.src;var ak=y.width||"100%";var ap=y.height||"100%";var av=this;if(t.win&&t.ie){var al="";for(var aj in y.attributes){if(y.attributes[aj]!=Object.prototype[aj]){if(aj.toLowerCase()=="styleclass"){al+=' class="'+y.attributes[aj]+'"'}else{if(aj.toLowerCase()!="classid"){al+=" "+aj+'="'+y.attributes[aj]+'"'}}}}var ao="";ao+='';ao+='';for(var aj in y.params){if(y.params[aj]!=Object.prototype[aj]){if(aj.toLowerCase()!="classid"){ao+=''}}}var ar='"+ao+"";var aq=jQuery(ar);am.append(aq);h.push(am.attr("id"));T=aq[0]}else{var an=jQuery("").attr({src:au,type:y.pluginMimeType,width:ak,height:ap,firstFrameCallback:"UnityObject2.instances["+F+"].firstFrameCallback();"}).attr(y.attributes).attr(y.params).css({display:"block",width:p(ak),height:p(ap)}).appendTo(am);T=an[0]}if(!t.sf||!t.mac){setTimeout(function(){T.focus()},100)}if(aw){aw()}},getBestInstallMethod:function(){var aj="Manual";if(t.x64){return aj}if(y.enableJava&&t.java&&H===false){aj="JavaInstall"}else{if(y.enableClickOnce&&t.co&&u===false){aj="ClickOnceIE"}}return aj},installPlugin:function(ak){if(ak==null||ak==undefined){ak=this.getBestInstallMethod()}var aj=null;switch(ak){case"JavaInstall":this.doJavaInstall(y.targetEl.id);break;case"ClickOnceIE":u=true;e(r,u);var al=jQuery("