diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..a899ff0a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +javascript.iml +.idea diff --git a/CHANGELOG b/CHANGELOG index 640325c22..2b1c534b1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +04-16-13 +. fixed ssl leave issue on firefox +. bumping all clients to new 3.4.4 +. added new trivial phonegap demo + commit ebfb9fae11d235b509eb592c944b46fe81474108 Author: Stephen L. Blum Date: Fri Feb 15 20:20:47 2013 -0800 diff --git a/LICENSE b/LICENSE index b31276090..3efa3922e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 TopMambo Inc. +Copyright (c) 2013 PubNub Inc. http://www.pubnub.com/ http://www.pubnub.com/terms @@ -22,6 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 TopMambo Inc. +Copyright (c) 2013 PubNub Inc. http://www.pubnub.com/ http://www.pubnub.com/terms diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..47248ffec --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +SUBDIRS = web socket.io nodejs modern titanium phonegap sencha webos + +.PHONY: all +all: + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir; \ + done + +.PHONY: clean +clean: + for dir in $(SUBDIRS); do \ + $(MAKE) clean -C $$dir; \ + done + +.PHONY: test +test: + for dir in $(SUBDIRS); do \ + $(MAKE) test -C $$dir; \ + done diff --git a/Makefile.inc b/Makefile.inc new file mode 100644 index 000000000..08ccca2fd --- /dev/null +++ b/Makefile.inc @@ -0,0 +1,19 @@ +REPOS_DIR=.. +TOOLS_DIR=$(REPOS_DIR)/tools +VERSION=$(shell cat $(REPOS_DIR)/VERSION) +GOOGLE_MINIFY=/opt/minify/compiler.jar +CORE_DIR=$(REPOS_DIR)/core +ECHO=/bin/echo +PUBNUB_JS=pubnub.js +PUBNUB_MIN_JS=pubnub.min.js +PUBNUB_UNASSEMBLED_DIR=unassembled +PUBNUB_PLATFORM_JS=$(PUBNUB_UNASSEMBLED_DIR)/platform.js +PUBNUB_CRYPTO_MIN_JS=pubnub-crypto.min.js +JSON_JS=$(CORE_DIR)/json.js +PUBNUB_COMMON_JS=$(CORE_DIR)/pubnub-common.js +CRYPTO_DIR=$(CORE_DIR)/crypto +GIBBERISH_JS=$(CORE_DIR)/crypto/gibberish-aes.js +WEBSOCKET_JS=$(CORE_DIR)/websocket.js +ENCRYPT_JS=$(CORE_DIR)/crypto/encrypt-pubnub.js +PUBNUB_MIN_JS=pubnub.min.js + diff --git a/Makefile.post b/Makefile.post new file mode 100644 index 000000000..b9a91a195 --- /dev/null +++ b/Makefile.post @@ -0,0 +1,2 @@ +.PHONY: test +test: #empty diff --git a/README.md b/README.md index 44638fb11..ac06a3d3a 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![browser support](http://ci.testling.com/devendram/javascript.png)](http://ci.testling.com/devendram/javascript) # YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API. -http://www.pubnub.com/account +Create an account at http://www.pubnub.com/account -## The PubNub Network JavaScript v3.4.2 Real-time SDK +## The PubNub Network JavaScript Real-time SDK v3.4.4 http://www.pubnub.com - PubNub Real-time Push Service in the Cloud. The PubNub Network is a blazingly fast Global Messaging Service for building @@ -19,7 +19,7 @@ business collaborative solutions, and more. You may access the latest PubNub JavaScript SDK on The PubNub Network CDN. ```html - + + + @@ -214,8 +263,8 @@ are open source, you’re welcome to see how we did it). To use AES encryption in PubNub, simply do the following: ```html - - + + ``` @@ -269,7 +329,7 @@ To use AES encryption in PubNub, simply do the following: ## SSL MODE ```html
- + + + ``` +## PRESENCE + +PubNub Network offers Channel Presence which +allows you to ask the question "Who's There?" +and get back an answer with list of users and the occupancy count. + +```html +
+ + +``` + +## BACKFILL + +PubNub Network offers automatic hot-memory backfill which pulls the full +queue from the message Network to provide a response filled with a +compressed GZIP payload up to the maximum size of your queue length. +The Default Queue size is 100 for basic PubNub Accounts. +Adding backfill to a truthy value on subscribe, you can pull up to the +last 100 messages off of an in-memory queue. +Note that this queue may not always return 100 messages and you may instead wish +to use PubNub Network History API to guarantee pulling all historical messages. + +>If you need to increase your queue length, contact PubNub Network +at help@pubnub.com for larger queue length. + +Notice that we are using `backfill : true` in +the `pubnub.subscribe` call below. + +```html +
+ + +``` + + ## WebSocket Client Interface Optionally PubNub offers you the full RFC 6455 @@ -381,7 +511,7 @@ The following example opens a `new WebSocket` in ```html - + + + - -``` - -## ADVANCED STYLE -```html -
- - -``` - -## SSL MODE - -```html -
- - -``` - -## Using the PUBNUB init() Function - -Sometimes you want to use create a PubNub Instance directly in JavaScript -and pass the PubNub API Keys without using a DOM element. -To do this, simply follow this `init` example: - -```html - - -``` - diff --git a/core/3.1/comet.swf b/core/3.1/comet.swf deleted file mode 100644 index 1209542d3..000000000 Binary files a/core/3.1/comet.swf and /dev/null differ diff --git a/core/3.1/crossdomain.xml b/core/3.1/crossdomain.xml deleted file mode 100644 index 8fb3c5227..000000000 --- a/core/3.1/crossdomain.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/core/3.1/examples/simple-chat.js b/core/3.1/examples/simple-chat.js deleted file mode 100644 index 5b0192ba1..000000000 --- a/core/3.1/examples/simple-chat.js +++ /dev/null @@ -1,119 +0,0 @@ -(function(){ - -/* - PubNub Real Time Push APIs and Notifications Framework - Copyright (c) 2010 Stephen Blum - http://www.google.com/profiles/blum.stephen - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -/* - - - - - -
Loading Simple Chat
- -*/ -var P = PUBNUB -, chat = { - init : function( node_name ) { - var node = P.$(node_name); - - chat.node_name = node_name; - - // Create Nodes - chat.textbox = P.create('input'); - chat.chatbox = P.create('div'); - chat.button = P.create('button'); - - // Button Text - chat.button.innerHTML = 'Send'; - - // Capture Channel - var channel = P.attr( node, 'channel' ); - - // Add Styles - P.attr( chat.chatbox, 'id', 'simple-chat-chatbox' ); - P.attr( chat.textbox, 'id', 'simple-chat-textbox' ); - P.attr( chat.button, 'id', 'simple-chat-button' ); - - // Display Nodes - node.innerHTML = ''; - node.appendChild(chat.chatbox); - node.appendChild(chat.textbox); - node.appendChild(chat.button); - - // Send Sign-on Message - P.publish({ - channel : channel, - message : 'Someone Joined the Chat.' - }); - - function send(e) { - var key = e.keyCode || e.charCode || 0 - , message = chat.textbox.value; - - // Wait for Enter Key - if (key != 13 && e.type == 'keydown' || !message) return true; - - // Reset Value - chat.textbox.value = ''; - - // Send Message - P.publish({ - channel : node_name, - message : message - }); - } - - // Bind Events - P.bind( 'keydown', chat.textbox, send ); - P.bind( 'blur', chat.textbox, send ); - - // Register Listener - P.subscribe({ channel : node_name }, chat.subscribe ); - }, - - subscribe : function(message) { - var br = '
'; - chat.chatbox.innerHTML = message + br + chat.chatbox.innerHTML; - } - -}; - -// Startup Simple Chat -chat.init('simple-chat'); - -})() diff --git a/core/3.1/modules/player.js b/core/3.1/modules/player.js deleted file mode 100644 index 4529496a4..000000000 --- a/core/3.1/modules/player.js +++ /dev/null @@ -1,54 +0,0 @@ -(function(){ - -var PUB = PUBNUB - -/* -------- - Provide a Player Creation/Management Interface. - -------- */ - -, players = (function(){ - var players_obj = {}; - return { - add : function(player) { - players_obj[player['uuid']] = player; - return player; - }, - get : function(uuid) { - return players_obj[uuid]; - }, - all : function() { - return players_obj; - } - }; -})(); - -/* -------- - Capture Current User's Information. - -------- */ - -function current_player(ready) { - function is_ready() { - if (player['uuid'] && player['joined']) { - players.add(player); - ready(player) - } - } - - var player = { - 'uuid' : PUB.uuid(function(uuid){ - player['uuid'] = uuid; - is_ready(); - }), - 'joined' : PUB.time(function(time){ - player['joined'] = time; - is_ready(); - }) - }; -} - -PUB['player'] = { - 'players' : players, - 'current_player' : current_player -}; - -})(); diff --git a/core/3.1/modules/player.min.js b/core/3.1/modules/player.min.js deleted file mode 100644 index 7f4bbd54e..000000000 --- a/core/3.1/modules/player.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var d=PUBNUB,f=function(){var c={};return{add:function(a){return c[a.uuid]=a},a:function(a){return c[a]},all:function(){return c}}}();d.player={players:f,current_player:function(c){function a(){if(b.uuid&&b.joined){f.add(b);c(b)}}var b={uuid:d.c(function(e){b.uuid=e;a()}),joined:d.b(function(e){b.joined=e;a()})}}}})(); diff --git a/core/3.1/modules/sprite.js b/core/3.1/modules/sprite.js deleted file mode 100644 index bb8b60caa..000000000 --- a/core/3.1/modules/sprite.js +++ /dev/null @@ -1,216 +0,0 @@ -(function(){ - - -var PUB = PUBNUB -, bind = PUB.bind -, css = PUB.css -, each = PUB.each -, utility = PUB.utility -, now = utility.now -, ground = PUB.search('body')[0]; - -function painter(node) { - ground = node; -} - -function create(sprite) { - sprite.intervals = { - animate : 0, - move : {} - }; - - sprite.cell.size = Math.floor(sprite.image.width / sprite.cell.count); - sprite.node = PUB.create('div'); - sprite.opacity = sprite.opacity || 1.0; - - css( sprite.node, { - opacity : sprite.opacity, - position : 'absolute', - top : sprite.top, - left : sprite.left, - width : sprite.cell.size, - height : sprite.image.height, - backgroundRepeat : 'no-repeat', - backgroundImage : 'url(' + sprite.image.url + ')' - } ); - - setframe( sprite, 0 ); - append(sprite.node); - - return sprite; -} - -function append(node) { - ground.appendChild(node); -} - -function setframe( sprite, cell, offset ) { - var offset = offset || {}; - if (typeof offset.top == 'number') - sprite.image.offset.top = offset.top; - if (typeof offset.left == 'number') - sprite.image.offset.left = offset.left; - - css( sprite.node, { - backgroundPosition : '-' + - (sprite.cell.size * cell + sprite.image.offset.left) + - 'px -' + sprite.image.offset.top + 'px' - } ); -} - -/** - * sprite.animate( [[frame, duration], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[0, .2], [1, .4], [2, .5]] ) - */ -function animate( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_animate(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Multi format compatibility ([frame, delay]) or (frame) - var frame = pattern[position][0] || pattern[position] - , delay = pattern[position][1] || .1; - - sprite.intervals.animate = setTimeout( function() { - // Update Current Frame - setframe( sprite, frame ); - - // Next Frame - animate( sprite, pattern, loop, callback, position + 1 ); - }, delay * 1000 ); -} - - -/** - * Move and Animate Combined!!! - * - * sprite.animate( [ [left, top, duration, [animate] ], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[10, 10, .2, [ANIMATEPARAMS], loopanimate ], ... ) - * sprite.animate( [[10, 10, .2, [[frame,dur], ...], loopanimate ], ... ) - */ -function movie( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_all(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Update Animator - if (pattern[position][2]) animate( - sprite, - pattern[position][2], - pattern[position][3] || 0 - ); - - // [{top:0,opacity:.5}, 500, 0, 0], - // Update Mover - move( - sprite, - pattern[position][0], - pattern[position][1], - function() { - movie( sprite, pattern, loop, callback, position + 1 ); - } - ); -} - -/** - * move sprite from one place to another. - */ -function move( sprite, properties, duration, callback ) { - var start_time = now(); - - stop_all(sprite); - - each( properties, function( property, value ) { - var current_time = start_time - , end_time = start_time + duration - , start_prop = sprite[property] || 0 - , distance = value - start_prop - , update = {} - , ikey = property + value; - - stop_move( sprite, ikey ); - sprite.intervals.move[ikey] = setInterval( function() { - current_time = now(); - - sprite[property] = ( - end_time <= current_time - ? value - : ( distance * (current_time - start_time) - / duration + start_prop ) - ); - - update[property] = sprite[property]; - css( sprite.node, update ); - - if ( end_time <= current_time && sprite.intervals.move ) { - stop_move( sprite, ikey ); - callback && callback(); - } - - }, Math.ceil(1000 / sprite.framerate) ); - } ); -} - -/** - * Stop movie - */ -function stop_all(sprite) { - clearTimeout(sprite.intervals.animate); - each( sprite.intervals.move, function( ikey ) { - clearInterval(sprite.intervals.move[ikey]); - } ); -} - -/** - * Stop move. - */ -function stop_move( sprite, ikey ) { - clearInterval(sprite.intervals.move[ikey]); -} - -/** - * Stop animate. - */ -function stop_animate(sprite) { - clearTimeout(sprite.intervals.animate); -} - -// Expose Global 'sprite' to PUBNUB -PUB['sprite'] = { - 'painter' : painter, - 'create' : create, - 'setframe' : setframe, - 'animate' : animate, - 'move' : move, - 'movie' : movie, - 'stop_all' : stop_all, - 'stop_move' : stop_move, - 'stop_animate' : stop_animate -}; - - -})(); diff --git a/core/3.1/modules/sprite.min.js b/core/3.1/modules/sprite.min.js deleted file mode 100644 index 95d7895e4..000000000 --- a/core/3.1/modules/sprite.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function i(a,c,d){d=d||{};if(typeof d.top=="number")a.b.f.top=d.top;if(typeof d.left=="number")a.b.f.left=d.left;j(a.c,{backgroundPosition:"-"+(a.e.size*c+a.b.f.left)+"px -"+a.b.f.top+"px"})}function k(a,c,d,e,b){if(!b){b=0;p(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}var f=c[b][0]||c[b];a.a.d=setTimeout(function(){i(a,f);k(a,c,d,e,b+1)},(c[b][1]||0.1)*1E3)}function q(a,c,d,e,b){if(!b){b=0;l(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}if(c[b][2])k(a,c[b][2],c[b][3]|| -0);r(a,c[b][0],c[b][1],function(){q(a,c,d,e,b+1)})}function r(a,c,d,e){var b=s();l(a);t(c,function(f,m){var h=b,u=b+d,v=a[f]||0,y=m-v,w={},n=f+m;o(a,n);a.a.move[n]=setInterval(function(){h=s();a[f]=u<=h?m:y*(h-b)/d+v;w[f]=a[f];j(a.c,w);if(u<=h&&a.a.move){o(a,n);e&&e()}},Math.ceil(1E3/a.j))})}function l(a){clearTimeout(a.a.d);t(a.a.move,function(c){clearInterval(a.a.move[c])})}function o(a,c){clearInterval(a.a.move[c])}function p(a){clearTimeout(a.a.d)}var g=PUBNUB,j=g.h,t=g.i,s=g.k.now,x=g.search("body")[0]; -g.sprite={painter:function(a){x=a},create:function(a){a.a={d:0,move:{}};a.e.size=Math.floor(a.b.width/a.e.g);a.c=g.create("div");a.opacity=a.opacity||1;j(a.c,{opacity:a.opacity,position:"absolute",top:a.top,left:a.left,width:a.e.size,height:a.b.height,backgroundRepeat:"no-repeat",backgroundImage:"url("+a.b.url+")"});i(a,0);x.appendChild(a.c);return a},setframe:i,animate:k,move:r,movie:q,stop_all:l,stop_move:o,stop_animate:p}})(); diff --git a/core/3.1/modules/utility.js b/core/3.1/modules/utility.js deleted file mode 100644 index 81dc95abf..000000000 --- a/core/3.1/modules/utility.js +++ /dev/null @@ -1,121 +0,0 @@ -(function(){ - -/* ======================================================================== */ -/* ================================ UTILITY =============================== */ -/* ======================================================================== */ - -var db = this['localStorage'] -, PUB = PUBNUB -, now = function(){return+new Date} -, cookie = { - get : function(key) { - if (db) return db.getItem(key); - if ((document.cookie||'').indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - }, - set : function( key, value ) { - if (db) return db.setItem( key, value ); - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } -}; - -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - var right_now = now(); - - if (last + rate > right_now) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = now(); - fun(); - } - }; - - // Provide Rate Limited Function Call - return runnit; -} - -function mouse(e) { - if (!e) return [[0,0]]; - - var tch = e.touches && e.touches[0] - , mpos = []; - - if (tch) { - PUB.each( e.touches, function(touch) { - mpos.push([ touch.pageX, touch.pageY ]); - } ); - } - else if (e.pageX) { - mpos.push([ e.pageX, e.pageY ]); - } - else {try{ - mpos.push([ - e.clientX + body.scrollLeft + doc.scrollLeft, - e.clientY + body.scrollTop + doc.scrollTop - ]); - }catch(e){}} - - return mpos; -} - - -/** - * OFFSET - * ====== - * offset( search('div')[0], 'Width' ); - * offset( search('div')[0], 'Height' ); - * offset( search('div')[0], 'Top' ); - * offset( search('div')[0], 'Left' ); - */ -function offset( node, what ) { - var pos = 0 - , what = what || 'Top'; - - while (node) { - pos += node['offset'+what]; - node = node.offsetParent; - } - - return pos -} - -/** - * WINFO - * ===== - * var window_info = winfot(); - * log(window_info.height); - */ -function winfo() { - return { - height : this.innerHeight || - document.documentElement.clientHeight || - document.body.clientHeight, - scrollTop : document.documentElement.scrollTop || - document.body.scrollTop, - size : offset(search('body')[0], 'Height') - } -} - - - - -// Expose Utility to PUBNUB. -PUB['utility'] = { - 'mouse' : mouse, - 'winfo' : winfo, - 'offset' : offset, - 'now' : now, - 'cookie' : cookie, - 'updater' : updater -}; - - -})(); diff --git a/core/3.1/modules/utility.min.js b/core/3.1/modules/utility.min.js deleted file mode 100644 index 93cedae42..000000000 --- a/core/3.1/modules/utility.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function g(a,b){var c=0;for(b=b||"Top";a;){c+=a["offset"+b];a=a.offsetParent}return c}var e=this.localStorage,h=PUBNUB;function f(){return+new Date}h.utility={mouse:function(a){if(!a)return[[0,0]];var b=[];if(a.touches&&a.touches[0])h.a(a.touches,function(d){b.push([d.pageX,d.pageY])});else if(a.pageX)b.push([a.pageX,a.pageY]);else try{b.push([a.clientX+body.scrollLeft+doc.scrollLeft,a.clientY+body.scrollTop+doc.scrollTop])}catch(c){}return b},winfo:function(){return{height:this.innerHeight|| -document.documentElement.clientHeight||document.body.clientHeight,scrollTop:document.documentElement.scrollTop||document.body.scrollTop,size:g(search("body")[0],"Height")}},offset:g,now:f,cookie:{b:function(a){if(e)return e.getItem(a);if((document.cookie||"").indexOf(a)==-1)return null;return((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null},c:function(a,b){if(e)return e.setItem(a,b);document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}},updater:function(a,b){var c, -d=0;function i(){if(d+b>f()){clearTimeout(c);c=setTimeout(i,b)}else{d=f();a()}}return i}}})(); diff --git a/core/3.1/pubnub-3.1.js b/core/3.1/pubnub-3.1.js deleted file mode 100644 index 0df82d291..000000000 --- a/core/3.1/pubnub-3.1.js +++ /dev/null @@ -1,932 +0,0 @@ -/* --------------------------------------------------------------------------- -WAIT! - This file depends on instructions from the PUBNUB Cloud. -http://www.pubnub.com/account-javascript-api-include ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 PubNub Inc. -http://www.pubnub.com/ -http://www.pubnub.com/terms ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ---------------------------------------------------------------------------- */ - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= JSON =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -(window['JSON'] && window['JSON']['stringify']) || (function () { - window['JSON'] || (window['JSON'] = {}); - - if (typeof String.prototype.toJSON !== 'function') { - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - 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, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - function quote(string) { - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(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 < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - if (typeof JSON['stringify'] !== 'function') { - JSON['stringify'] = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } else if (typeof space === 'string') { - indent = space; - } - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - return str('', {'': value}); - }; - } - - if (typeof JSON['parse'] !== 'function') { - // JSON is parsed on the server for security. - JSON['parse'] = function (text) {return eval('('+text+')')}; - } -}()); - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-======================= DOM UTIL ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -window['PUBNUB'] || (function() { - -/** - * CONSOLE COMPATIBILITY - */ -window.console||(window.console=window.console||{}); -console.log||(console.log=((window.opera||{}).postError||function(){})); - -/** - * UTILITIES - */ -function unique() { return'x'+ ++NOW+''+(+new Date) } -function rnow() { return+new Date } - -/** - * LOCAL STORAGE OR COOKIE - */ -var db = (function(){ - var ls = window['localStorage']; - return { - 'get' : function(key) { - try { - if (ls) return ls.getItem(key); - if (document.cookie.indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - } catch(e) { return } - }, - 'set' : function( key, value ) { - try { - if (ls) return ls.setItem( key, value ) && 0; - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } catch(e) { return } - } - }; -})(); - -/** - * UTIL LOCALS - */ -var NOW = 1 -, SWF = 'https://dh15atwfs066y.cloudfront.net/pubnub.swf' -, REPL = /{([\w\-]+)}/g -, ASYNC = 'async' -, URLBIT = '/' -, XHRTME = 310000 -, SECOND = 1000 -, UA = navigator.userAgent -, XORIGN = UA.indexOf('MSIE 6') == -1; - -/** - * NEXTORIGIN - * ========== - * var next_origin = nextorigin(); - */ -var nextorigin = (function() { - var ori = Math.floor(Math.random() * 9) + 1; - return function(origin) { - return origin.indexOf('pubsub') > 0 - && origin.replace( - 'pubsub', 'ps' + (++ori < 10 ? ori : ori=1) - ) || origin; - } -})(); - -/** - * UPDATER - * ====== - * var timestamp = unique(); - */ -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - if (last + rate > rnow()) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = rnow(); - fun(); - } - }; - - return runnit; -} - -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * LOG - * === - * log('message'); - */ -function log(message) { console['log'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { console.log(item) } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - -/** - * GREP - * ==== - * var list = grep( [1,2,3], function(item) { return item % 2 } ) - */ -function grep( list, fun ) { - var fin = []; - each( list || [], function(l) { fun(l) && fin.push(l) } ); - return fin -} - -/** - * SUPPLANT - * ======== - * var text = supplant( 'Hello {name}!', { name : 'John' } ) - */ -function supplant( str, values ) { - return str.replace( REPL, function( _, match ) { - return values[match] || _ - } ); -} - -/** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * console.log( element, '1st anchor' ) - * } ); - */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); -} - -/** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); - */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; -} - -/** - * HEAD - * ==== - * head().appendChild(elm); - */ -function head() { return search('head')[0] } - -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); -} - -/** - * CSS - * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - -/** - * timeout - * ======= - * timeout( function(){}, 100 ); - */ -function timeout( fun, wait ) { - return setTimeout( fun, wait ); -} - -/** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); - */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } - -/** - * ENCODE - * ====== - * var encoded_path = encode('path'); - */ -function encode(path) { - return map( (encodeURIComponent(path)).split(''), function(chr) { - return "-_.!~*'()".indexOf(chr) < 0 ? chr : - "%"+chr.charCodeAt(0).toString(16).toUpperCase() - } ).join(''); -} - -/** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * - */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; - -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - script[ASYNC] = ASYNC; - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); - - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr - , finished = function() { - if (loaded) return; - loaded = 1; - - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = XHRTME; - - xhr.open( 'GET', setup.url.join(URLBIT), true ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); - } - - // Return 'done' - return done; -} - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -var PDIV = $('pubnub') || {} -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - var CHANNELS = {} - , PUBLISH_KEY = setup['publish_key'] || '' - , SUBSCRIBE_KEY = setup['subscribe_key'] || '' - , SSL = setup['ssl'] ? 's' : '' - , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') - , SELF = { - /* - PUBNUB.history({ - channel : 'my_chat_channel', - limit : 100, - callback : function(messages) { console.log(messages) } - }); - */ - 'history' : function( args, callback ) { - var callback = args['callback'] || callback - , limit = args['limit'] || 100 - , channel = args['channel'] - , jsonp = jsonp_cb(); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - - // Send Message - xdr({ - callback : jsonp, - url : [ - ORIGIN, 'history', - SUBSCRIBE_KEY, encode(channel), - jsonp, limit - ], - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - /* - PUBNUB.time(function(time){ console.log(time) }); - */ - 'time' : function(callback) { - var jsonp = jsonp_cb(); - xdr({ - callback : jsonp, - url : [ORIGIN, 'time', jsonp], - success : function(response) { callback(response[0]) }, - fail : function() { callback(0) } - }); - }, - - /* - PUBNUB.uuid(function(uuid) { console.log(uuid) }); - */ - 'uuid' : function(callback) { - var jsonp = jsonp_cb(); - xdr({ - callback : jsonp, - url : [ - 'http' + SSL + - '://pubnub-prod.appspot.com/uuid?callback=' + jsonp - ], - success : function(response) { callback(response[0]) }, - fail : function() { callback(0) } - }); - }, - - /* - PUBNUB.publish({ - channel : 'my_chat_channel', - message : 'hello!' - }); - */ - 'publish' : function( args, callback ) { - var callback = callback || args['callback'] || function(){} - , message = args['message'] - , channel = args['channel'] - , jsonp = jsonp_cb() - , url; - - if (!message) return log('Missing Message'); - if (!channel) return log('Missing Channel'); - if (!PUBLISH_KEY) return log('Missing Publish Key'); - - // If trying to send Object - message = JSON['stringify'](message); - - // Create URL - url = [ - ORIGIN, 'publish', - PUBLISH_KEY, SUBSCRIBE_KEY, - 0, encode(channel), - jsonp, encode(message) - ]; - - // Send Message - xdr({ - callback : jsonp, - success : function(response) { callback(response) }, - fail : function() { callback([ 0, 'Disconnected' ]) }, - url : url - }); - }, - - /* - PUBNUB.unsubscribe({ channel : 'my_chat' }); - */ - 'unsubscribe' : function(args) { - var channel = args['channel']; - - // Leave if there never was a channel. - if (!(channel in CHANNELS)) return; - - // Disable Channel - CHANNELS[channel].connected = 0; - - // Abort and Remove Script - CHANNELS[channel].done && - CHANNELS[channel].done(0); - }, - - /* - PUBNUB.subscribe({ - channel : 'my_chat' - callback : function(message) { console.log(message) } - }); - */ - 'subscribe' : function( args, callback ) { - - var channel = args['channel'] - , callback = callback || args['callback'] - , restore = args['restore'] - , timetoken = 0 - , error = args['error'] || function(){} - , connect = args['connect'] || function(){} - , reconnect = args['reconnect'] || function(){} - , disconnect = args['disconnect'] || function(){} - , disconnected = 0 - , connected = 0 - , origin = nextorigin(ORIGIN); - - // Reduce Status Flicker - if (!READY) return READY_BUFFER.push([ args, callback, SELF ]); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - if (!(channel in CHANNELS)) CHANNELS[channel] = {}; - - // Make sure we have a Channel - if (CHANNELS[channel].connected) return log('Already Connected'); - CHANNELS[channel].connected = 1; - - // Recurse Subscribe - function pubnub() { - var jsonp = jsonp_cb(); - - // Stop Connection - if (!CHANNELS[channel].connected) return; - - // Connect to PubNub Subscribe Servers - CHANNELS[channel].done = xdr({ - callback : jsonp, - url : [ - origin, 'subscribe', - SUBSCRIBE_KEY, encode(channel), - jsonp, timetoken - ], - fail : function() { - // Disconnect - if (!disconnected) { - disconnected = 1; - disconnect(); - } - timeout( pubnub, SECOND ); - SELF['time'](function(success){ - // Reconnect - if (success && disconnected) { - disconnected = 0; - reconnect(); - } - else { - error(); - } - }); - }, - success : function(messages) { - if (!CHANNELS[channel].connected) return; - - // Connect - if (!connected) { - connected = 1; - connect(); - } - - // Reconnect - if (disconnected) { - disconnected = 0; - reconnect(); - } - - // Restore Previous Connection Point if Needed - // Also Update Timetoken - restore = db.set( - SUBSCRIBE_KEY + channel, - timetoken = restore && db.get( - SUBSCRIBE_KEY + channel - ) || messages[1] - ); - - each( messages[0], function(msg) { - callback( msg, messages ); - } ); - - timeout( pubnub, 10 ); - } - }); - } - - // Begin Recursive Subscribe - pubnub(); - }, - - // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'each' : each, - 'map' : map, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB - }; - - return SELF; -}; - -// CREATE A PUBNUB GLOBAL OBJECT -PUBNUB = CREATE_PUBNUB({ - 'publish_key' : attr( PDIV, 'pub-key' ), - 'subscribe_key' : attr( PDIV, 'sub-key' ), - 'ssl' : attr( PDIV, 'ssl' ) == 'on', - 'origin' : attr( PDIV, 'origin' ) -}); - -// PUBNUB Flash Socket -css( PDIV, { 'position' : 'absolute', 'top' : -SECOND } ); - -if ('opera' in window || attr( PDIV, 'flash' )) PDIV['innerHTML'] = - ''; - -var pubnubs = $('pubnubs') || {}; - -// PUBNUB READY TO CONNECT -function ready() { PUBNUB['time'](rnow); -PUBNUB['time'](function(t){ timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(sub) { - sub[2]['subscribe']( sub[0], sub[1] ) - } ); -}, SECOND ); }); } - -// Bind for PUBNUB Readiness to Subscribe -bind( 'load', window, function(){ timeout( ready, 0 ) } ); - -// Create Interface for Opera Flash -PUBNUB['rdx'] = function( id, data ) { - if (!data) return FDomainRequest[id]['onerror'](); - FDomainRequest[id]['responseText'] = unescape(data); - FDomainRequest[id]['onload'](); -}; - -function FDomainRequest() { - if (!pubnubs['get']) return 0; - - var fdomainrequest = { - 'id' : FDomainRequest['id']++, - 'send' : function() {}, - 'abort' : function() { fdomainrequest['id'] = {} }, - 'open' : function( method, url ) { - FDomainRequest[fdomainrequest['id']] = fdomainrequest; - pubnubs['get']( fdomainrequest['id'], url ); - } - }; - - return fdomainrequest; -} -FDomainRequest['id'] = SECOND; - -// jQuery Interface -window['jQuery'] && (window['jQuery']['PUBNUB'] = PUBNUB); - -// For Testling.js - http://testling.com/ -typeof module !== 'undefined' && (module.exports = PUBNUB) && ready(); - -})(); diff --git a/core/3.1/pubnub-3.1.min.js b/core/3.1/pubnub-3.1.min.js deleted file mode 100644 index 2e042ecb4..000000000 --- a/core/3.1/pubnub-3.1.min.js +++ /dev/null @@ -1,19 +0,0 @@ -(function(){ -window.JSON&&window.JSON.stringify||function(){function y(s){F.lastIndex=0;return F.test(s)?'"'+s.replace(F,function(t){var j=J[t];return typeof j==="string"?j:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+s+'"'}function w(s,t){var j,q,n,z,A=m,o,g=t[s];if(g&&typeof g==="object"&&typeof g.toJSON==="function")g=g.toJSON(s);if(typeof p==="function")g=p.call(t,s,g);switch(typeof g){case "string":return y(g);case "number":return isFinite(g)?String(g):"null";case "boolean":case "null":return String(g); -case "object":if(!g)return"null";m+=r;o=[];if(Object.prototype.toString.apply(g)==="[object Array]"){z=g.length;for(j=0;jw()){clearTimeout(c);c=setTimeout(k,a)}else{f=w();b()}};return k}function m(b){return document.getElementById(b)}function r(b){console.log(b)}function J(b,a){var c=[];p(b.split(/\s+/),function(f){p((a||document).getElementsByTagName(f),function(k){c.push(k)})});return c}function p(b,a){if(b&&a)if(typeof b[0]!="undefined")for(var c=0,f=b.length;c0&&typeof a[c]=="number"?"px":"")}catch(f){}}function A(b){return document.createElement(b)}function o(){return K||x()?0:y()}function g(b){return s(encodeURIComponent(b).split(""),function(a){return"-_.!~*'()".indexOf(a)<0?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")} -function B(b){if(K||x())return Z(b);var a=A("script"),c=b.callback,f=y(),k=0,l=setTimeout(function(){e(1)},L),C=b.fail||function(){},d=b.success||function(){},e=function(h,i){if(!k){k=1;h||d(i);a.onerror=null;clearTimeout(l);setTimeout(function(){h&&C();var u=m(f),v=u&&u.parentNode;v&&v.removeChild(u)},G)}};window[c]=function(h){e(0,h)};a[P]=P;a.onerror=function(){e(1)};a.src=b.url.join(Q);n(a,"id",f);q().appendChild(a);return e}function Z(b){var a,c=function(){if(!k){k=1;clearTimeout(l);try{response= -JSON.parse(a.responseText)}catch(i){return e(1)}d(response)}},f=0,k=0,l=setTimeout(function(){e(1)},L),C=b.fail||function(){},d=b.success||function(){},e=function(i){if(!f){f=1;clearTimeout(l);if(a){a.onerror=a.onload=null;a.abort&&a.abort();a=null}i&&C()}};try{a=x()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;a.onerror=a.onabort=function(){e(1)};a.onload=a.onloadend=c;a.timeout=L;a.open("GET",b.url.join(Q),true);a.send()}catch(h){e(0);K=0;return B(b)}return e}function M(){PUBNUB.time(w); -PUBNUB.time(function(){setTimeout(function(){if(!N){N=1;p(R,function(b){b[2].subscribe(b[0],b[1])})}},G)})}function x(){if(!S.get)return 0;var b={id:x.id++,send:function(){},abort:function(){b.id={}},open:function(a,c){x[b.id]=b;S.get(b.id,c)}};return b}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||function(){});var O=function(){var b=window.localStorage;return{get:function(a){try{if(b)return b.getItem(a);if(document.cookie.indexOf(a)== --1)return null;return((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null}catch(c){}},set:function(a,c){try{if(b)return b.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(f){}}}}(),X=1,Y=/{([\w\-]+)}/g,P="async",Q="/",L=31E4,G=1E3,K=navigator.userAgent.indexOf("MSIE 6")==-1,$=function(){var b=Math.floor(Math.random()*9)+1;return function(a){return a.indexOf("pubsub")>0&&a.replace("pubsub","ps"+(++b<10?b:b=1))||a}}(),H={list:{},unbind:function(b){H.list[b]= -[]},bind:function(b,a){(H.list[b]=H.list[b]||[]).push(a)},fire:function(b,a){p(H.list[b]||[],function(c){c(a)})}},D=m("pubnub")||{},N=0,R=[],W=function(b){var a={},c=b.publish_key||"",f=b.subscribe_key||"",k=b.ssl?"s":"",l="http"+k+"://"+(b.origin||"pubsub.pubnub.com"),C={history:function(d,e){e=d.callback||e;var h=d.limit||100,i=d.channel,u=o();if(!i)return r("Missing Channel");if(!e)return r("Missing Callback");B({callback:u,url:[l,"history",f,g(i),u,h],success:function(v){e(v)},fail:function(v){r(v)}})}, -time:function(d){var e=o();B({callback:e,url:[l,"time",e],success:function(h){d(h[0])},fail:function(){d(0)}})},uuid:function(d){var e=o();B({callback:e,url:["http"+k+"://pubnub-prod.appspot.com/uuid?callback="+e],success:function(h){d(h[0])},fail:function(){d(0)}})},publish:function(d,e){e=e||d.callback||function(){};var h=d.message,i=d.channel,u=o();if(!h)return r("Missing Message");if(!i)return r("Missing Channel");if(!c)return r("Missing Publish Key");h=JSON.stringify(h);h=[l,"publish",c,f,0, -g(i),u,g(h)];B({callback:u,success:function(v){e(v)},fail:function(){e([0,"Disconnected"])},url:h})},unsubscribe:function(d){d=d.channel;if(d in a){a[d].connected=0;a[d].done&&a[d].done(0)}},subscribe:function(d,e){function h(){var T=o();if(a[i].connected)a[i].done=B({callback:T,url:[aa,"subscribe",f,g(i),T,v],fail:function(){if(!E){E=1;ba()}setTimeout(h,G);C.time(function(I){if(I&&E){E=0;U()}else ca()})},success:function(I){if(a[i].connected){if(!V){V=1;da()}if(E){E=0;U()}u=O.set(f+i,v=u&&O.get(f+ -i)||I[1]);p(I[0],function(ea){e(ea,I)});setTimeout(h,10)}}})}var i=d.channel;e=e||d.callback;var u=d.restore,v=0,ca=d.error||function(){},da=d.connect||function(){},U=d.reconnect||function(){},ba=d.disconnect||function(){},E=0,V=0,aa=$(l);if(!N)return R.push([d,e,C]);if(!i)return r("Missing Channel");if(!e)return r("Missing Callback");if(!f)return r("Missing Subscribe Key");i in a||(a[i]={});if(a[i].connected)return r("Already Connected");a[i].connected=1;h()},xdr:B,ready:M,db:O,each:p,map:s,css:z, -$:m,create:A,bind:j,supplant:t,head:q,search:J,attr:n,now:w,unique:y,events:H,updater:F,init:W};return C};PUBNUB=W({publish_key:n(D,"pub-key"),subscribe_key:n(D,"sub-key"),ssl:n(D,"ssl")=="on",origin:n(D,"origin")});z(D,{position:"absolute",top:-G});if("opera"in window||n(D,"flash"))D.innerHTML="";var S= -m("pubnubs")||{};j("load",window,function(){setTimeout(M,0)});PUBNUB.rdx=function(b,a){if(!a)return x[b].onerror();x[b].responseText=unescape(a);x[b].onload()};x.id=G;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);typeof module!=="undefined"&&(module.exports=PUBNUB)&&M()}(); -})(); diff --git a/core/3.1/pubnub.as b/core/3.1/pubnub.as deleted file mode 100644 index a10e99855..000000000 --- a/core/3.1/pubnub.as +++ /dev/null @@ -1,47 +0,0 @@ -package { - import flash.external.ExternalInterface; - import flash.display.Sprite; - import flash.net.URLLoader; - import flash.net.URLRequest; - import flash.events.Event; - import flash.events.IOErrorEvent; - import flash.events.SecurityErrorEvent; - import flash.system.Security; - import flash.utils.setTimeout; - - public class pubnub extends Sprite { - - Security.allowDomain("*"); - Security.allowInsecureDomain("*"); - - ExternalInterface.addCallback( "get", function( - id:Number, - url:String - ):void { - function handler(e:Event):void { - var loader:URLLoader = URLLoader(e.target) - , data:String = loader.data - , timeout:int = 1; - - if (e.type == 'securityError') { - data = '[1,"S"]'; - timeout = 1000; - } - - setTimeout( function delayed():void { - ExternalInterface.call( "PUBNUB.rdx", id, escape(data) ); - loader.close(); - }, timeout ); - } - - var loader:URLLoader = new URLLoader(); - - loader.addEventListener( Event.COMPLETE, handler ); - loader.addEventListener( IOErrorEvent.IO_ERROR, handler ); - loader.addEventListener( - SecurityErrorEvent.SECURITY_ERROR, handler - ); - loader.load(new URLRequest(url)); - }); - } -} diff --git a/core/3.1/pubnub.swf b/core/3.1/pubnub.swf deleted file mode 100644 index 1fce400b0..000000000 Binary files a/core/3.1/pubnub.swf and /dev/null differ diff --git a/core/3.1/tests/head-test.htm b/core/3.1/tests/head-test.htm deleted file mode 100644 index 3187050cc..000000000 --- a/core/3.1/tests/head-test.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - PubNub JavaScript HEAD INIT TEST - - - - -
- -

Head Test

-
Wait here for an alert() message.
- -
-
- diff --git a/core/3.1/tests/head.load.min.js b/core/3.1/tests/head.load.min.js deleted file mode 100644 index 6242b0fad..000000000 --- a/core/3.1/tests/head.load.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - Head JS The only script in your - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c - - - PubNub JavaScript MailTO Fix - - -
- - -
- × -

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

-
- - - -
0
- -
- - -
- diff --git a/core/3.1/tests/ssl-test.html b/core/3.1/tests/ssl-test.html deleted file mode 100644 index 1103bfb28..000000000 --- a/core/3.1/tests/ssl-test.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -
- -
- - - - - - diff --git a/core/3.1/tests/test.js b/core/3.1/tests/test.js deleted file mode 100644 index 4e90a264a..000000000 --- a/core/3.1/tests/test.js +++ /dev/null @@ -1,69 +0,0 @@ -var test = require('testling'); -var PUBNUB = require('./pubnub-3.1'); -var channel = 'unit-test-pubnub-channel'; - -test('PUBNUB JavaScript API', function (test) { - var pubnub = PUBNUB.init({ - publish_key : 'demo', - subscribe_key : 'demo' - }); - - test.plan(14); - - test.ok(PUBNUB); - - test.ok(pubnub); - test.ok(pubnub.publish); - test.ok(pubnub.subscribe); - test.ok(pubnub.history); - test.ok(pubnub.time); - - function publish_test() { - pubnub.publish({ - channel : channel, - message : { test : "test" }, - callback : function(response) { - test.ok(response[0]); - test.equal( response[1], 'Sent' ); - } - }); - } - - function time_test() { - pubnub.time(function(time){ - test.ok(time); - uuid_test(); - }); - } - - function uuid_test() { - pubnub.uuid(function(uuid){ - test.ok(uuid); - history_test(); - }); - } - - function history_test(history) { - pubnub.history({ - limit : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0].test, "test" ); - test.end(); - } - }); - } - - pubnub.subscribe({ - channel : channel, - connect : publish_test, - callback : function(message) { - test.ok(message); - test.equal( message.test, "test" ); - time_test(); - } - }); - -}); - diff --git a/core/3.1/tests/test.sh b/core/3.1/tests/test.sh deleted file mode 100755 index 7d0b4a94a..000000000 --- a/core/3.1/tests/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -## ------------------------------------------------ -## PubNub 3.1 Real-time Cloud Push API - JAVASCRIPT -## ------------------------------------------------ - -## ---------------------------------------------------- -## -## TESTLING - PubNub JavaScript API for Web Browsers -## uses Testling Cloud Service -## for QA and Deployment. -## -## http://www.testling.com/ -## You need this to run './test.sh' unit test. -## -## ---------------------------------------------------- - -if [ -z "$1" ] -then - echo -e "\n\tUSER:PASSWD Required: http://testling.com/\n" - exit -fi - -browsers='firefox/3.6' -browsers=$browsers',firefox/9.0' -browsers=$browsers',firefox/10.0' -browsers=$browsers',chrome/16.0' -browsers=$browsers',chrome/17.0' -browsers=$browsers',iexplore/7.0' -browsers=$browsers',iexplore/8.0' -browsers=$browsers',iexplore/9.0' -browsers=$browsers',safari/5.1' - -echo -e "Testing: $browsers" - -noinstrument='pubnub-3.1.js,test.js' - -tar -cf- test.js ../pubnub-3.1.js | \ - curl -u $1 -sSNT- \ - "testling.com/?noinstrument=$noinstrument&browsers=$browsers" - diff --git a/core/3.1/tests/unit-test.html b/core/3.1/tests/unit-test.html deleted file mode 100644 index fb5ea87b3..000000000 --- a/core/3.1/tests/unit-test.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - PubNub JavaScript Unit Test - - - -
- - -
- × -

PubNub Unit Tests for JavaScript on Mobile and Desktop Web Browser

-
- - -
- - - 100% Successful - Finished With Errors - ... -
- - - -
Pass/FailTest Ready -
- - - - -
- - -
- diff --git a/core/3.2/README.md b/core/3.2/README.md deleted file mode 100644 index 7b58f00b6..000000000 --- a/core/3.2/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API. -http://www.pubnub.com/account - -## TESTLING - (OPTIONAL) -PubNub JavaScript API for Web Browsers -uses Testling Cloud Service for QA and Deployment. -http://www.testling.com/ - -You need this to run './test.sh' unit test. -This is completely optional, however we love Testling. - - -## PubNub 3.1 Real-time Cloud Push API - JAVASCRIPT -http://www.pubnub.com - PubNub Real-time Push Service in the Cloud. -http://www.pubnub.com/tutorial/javascript-push-api - -PubNub is a blazingly fast cloud-hosted messaging service for building -real-time web and mobile apps. Hundreds of apps and thousands of developers -rely on PubNub for delivering human-perceptive real-time -experiences that scale to millions of users worldwide. PubNub delivers -the infrastructure needed to build amazing MMO games, social apps, -business collaborative solutions, and more. - -## SIMPLE EXAMPLE -```html -
- - -``` - -## ADVANCED STYLE -```html -
- - -``` - -## SSL MODE - -```html -
- - -``` - -## Using the PUBNUB init() Function - -Sometimes you want to use create a PubNub Instance directly in JavaScript -and pass the PubNub API Keys without using a DOM element. -To do this, simply follow this `init` example: - -```html - - -``` - diff --git a/core/3.2/comet.swf b/core/3.2/comet.swf deleted file mode 100644 index 1209542d3..000000000 Binary files a/core/3.2/comet.swf and /dev/null differ diff --git a/core/3.2/crossdomain.xml b/core/3.2/crossdomain.xml deleted file mode 100644 index 8fb3c5227..000000000 --- a/core/3.2/crossdomain.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/core/3.2/examples/presence/index.html b/core/3.2/examples/presence/index.html deleted file mode 100644 index bc9cb568e..000000000 --- a/core/3.2/examples/presence/index.html +++ /dev/null @@ -1,117 +0,0 @@ - - - PubNub Presence Demo - - - - - - - - - - - - - - -
- -

Currently Here

-
    -
-
- - - 0 people here now -
- - -
- - - - - - - -. -*/ - -/* - - - - - -
Loading Simple Chat
- -*/ -var P = PUBNUB -, chat = { - init : function( node_name ) { - var node = P.$(node_name); - - chat.node_name = node_name; - - // Create Nodes - chat.textbox = P.create('input'); - chat.chatbox = P.create('div'); - chat.button = P.create('button'); - - // Button Text - chat.button.innerHTML = 'Send'; - - // Capture Channel - var channel = P.attr( node, 'channel' ); - - // Add Styles - P.attr( chat.chatbox, 'id', 'simple-chat-chatbox' ); - P.attr( chat.textbox, 'id', 'simple-chat-textbox' ); - P.attr( chat.button, 'id', 'simple-chat-button' ); - - // Display Nodes - node.innerHTML = ''; - node.appendChild(chat.chatbox); - node.appendChild(chat.textbox); - node.appendChild(chat.button); - - // Send Sign-on Message - P.publish({ - channel : channel, - message : 'Someone Joined the Chat.' - }); - - function send(e) { - var key = e.keyCode || e.charCode || 0 - , message = chat.textbox.value; - - // Wait for Enter Key - if (key != 13 && e.type == 'keydown' || !message) return true; - - // Reset Value - chat.textbox.value = ''; - - // Send Message - P.publish({ - channel : node_name, - message : message - }); - } - - // Bind Events - P.bind( 'keydown', chat.textbox, send ); - P.bind( 'blur', chat.textbox, send ); - - // Register Listener - P.subscribe({ channel : node_name }, chat.subscribe ); - }, - - subscribe : function(message) { - var br = '
'; - chat.chatbox.innerHTML = message + br + chat.chatbox.innerHTML; - } - -}; - -// Startup Simple Chat -chat.init('simple-chat'); - -})() diff --git a/core/3.2/modules/player.js b/core/3.2/modules/player.js deleted file mode 100644 index 4529496a4..000000000 --- a/core/3.2/modules/player.js +++ /dev/null @@ -1,54 +0,0 @@ -(function(){ - -var PUB = PUBNUB - -/* -------- - Provide a Player Creation/Management Interface. - -------- */ - -, players = (function(){ - var players_obj = {}; - return { - add : function(player) { - players_obj[player['uuid']] = player; - return player; - }, - get : function(uuid) { - return players_obj[uuid]; - }, - all : function() { - return players_obj; - } - }; -})(); - -/* -------- - Capture Current User's Information. - -------- */ - -function current_player(ready) { - function is_ready() { - if (player['uuid'] && player['joined']) { - players.add(player); - ready(player) - } - } - - var player = { - 'uuid' : PUB.uuid(function(uuid){ - player['uuid'] = uuid; - is_ready(); - }), - 'joined' : PUB.time(function(time){ - player['joined'] = time; - is_ready(); - }) - }; -} - -PUB['player'] = { - 'players' : players, - 'current_player' : current_player -}; - -})(); diff --git a/core/3.2/modules/player.min.js b/core/3.2/modules/player.min.js deleted file mode 100644 index 7f4bbd54e..000000000 --- a/core/3.2/modules/player.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var d=PUBNUB,f=function(){var c={};return{add:function(a){return c[a.uuid]=a},a:function(a){return c[a]},all:function(){return c}}}();d.player={players:f,current_player:function(c){function a(){if(b.uuid&&b.joined){f.add(b);c(b)}}var b={uuid:d.c(function(e){b.uuid=e;a()}),joined:d.b(function(e){b.joined=e;a()})}}}})(); diff --git a/core/3.2/modules/sprite.js b/core/3.2/modules/sprite.js deleted file mode 100644 index bb8b60caa..000000000 --- a/core/3.2/modules/sprite.js +++ /dev/null @@ -1,216 +0,0 @@ -(function(){ - - -var PUB = PUBNUB -, bind = PUB.bind -, css = PUB.css -, each = PUB.each -, utility = PUB.utility -, now = utility.now -, ground = PUB.search('body')[0]; - -function painter(node) { - ground = node; -} - -function create(sprite) { - sprite.intervals = { - animate : 0, - move : {} - }; - - sprite.cell.size = Math.floor(sprite.image.width / sprite.cell.count); - sprite.node = PUB.create('div'); - sprite.opacity = sprite.opacity || 1.0; - - css( sprite.node, { - opacity : sprite.opacity, - position : 'absolute', - top : sprite.top, - left : sprite.left, - width : sprite.cell.size, - height : sprite.image.height, - backgroundRepeat : 'no-repeat', - backgroundImage : 'url(' + sprite.image.url + ')' - } ); - - setframe( sprite, 0 ); - append(sprite.node); - - return sprite; -} - -function append(node) { - ground.appendChild(node); -} - -function setframe( sprite, cell, offset ) { - var offset = offset || {}; - if (typeof offset.top == 'number') - sprite.image.offset.top = offset.top; - if (typeof offset.left == 'number') - sprite.image.offset.left = offset.left; - - css( sprite.node, { - backgroundPosition : '-' + - (sprite.cell.size * cell + sprite.image.offset.left) + - 'px -' + sprite.image.offset.top + 'px' - } ); -} - -/** - * sprite.animate( [[frame, duration], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[0, .2], [1, .4], [2, .5]] ) - */ -function animate( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_animate(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Multi format compatibility ([frame, delay]) or (frame) - var frame = pattern[position][0] || pattern[position] - , delay = pattern[position][1] || .1; - - sprite.intervals.animate = setTimeout( function() { - // Update Current Frame - setframe( sprite, frame ); - - // Next Frame - animate( sprite, pattern, loop, callback, position + 1 ); - }, delay * 1000 ); -} - - -/** - * Move and Animate Combined!!! - * - * sprite.animate( [ [left, top, duration, [animate] ], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[10, 10, .2, [ANIMATEPARAMS], loopanimate ], ... ) - * sprite.animate( [[10, 10, .2, [[frame,dur], ...], loopanimate ], ... ) - */ -function movie( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_all(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Update Animator - if (pattern[position][2]) animate( - sprite, - pattern[position][2], - pattern[position][3] || 0 - ); - - // [{top:0,opacity:.5}, 500, 0, 0], - // Update Mover - move( - sprite, - pattern[position][0], - pattern[position][1], - function() { - movie( sprite, pattern, loop, callback, position + 1 ); - } - ); -} - -/** - * move sprite from one place to another. - */ -function move( sprite, properties, duration, callback ) { - var start_time = now(); - - stop_all(sprite); - - each( properties, function( property, value ) { - var current_time = start_time - , end_time = start_time + duration - , start_prop = sprite[property] || 0 - , distance = value - start_prop - , update = {} - , ikey = property + value; - - stop_move( sprite, ikey ); - sprite.intervals.move[ikey] = setInterval( function() { - current_time = now(); - - sprite[property] = ( - end_time <= current_time - ? value - : ( distance * (current_time - start_time) - / duration + start_prop ) - ); - - update[property] = sprite[property]; - css( sprite.node, update ); - - if ( end_time <= current_time && sprite.intervals.move ) { - stop_move( sprite, ikey ); - callback && callback(); - } - - }, Math.ceil(1000 / sprite.framerate) ); - } ); -} - -/** - * Stop movie - */ -function stop_all(sprite) { - clearTimeout(sprite.intervals.animate); - each( sprite.intervals.move, function( ikey ) { - clearInterval(sprite.intervals.move[ikey]); - } ); -} - -/** - * Stop move. - */ -function stop_move( sprite, ikey ) { - clearInterval(sprite.intervals.move[ikey]); -} - -/** - * Stop animate. - */ -function stop_animate(sprite) { - clearTimeout(sprite.intervals.animate); -} - -// Expose Global 'sprite' to PUBNUB -PUB['sprite'] = { - 'painter' : painter, - 'create' : create, - 'setframe' : setframe, - 'animate' : animate, - 'move' : move, - 'movie' : movie, - 'stop_all' : stop_all, - 'stop_move' : stop_move, - 'stop_animate' : stop_animate -}; - - -})(); diff --git a/core/3.2/modules/sprite.min.js b/core/3.2/modules/sprite.min.js deleted file mode 100644 index 95d7895e4..000000000 --- a/core/3.2/modules/sprite.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function i(a,c,d){d=d||{};if(typeof d.top=="number")a.b.f.top=d.top;if(typeof d.left=="number")a.b.f.left=d.left;j(a.c,{backgroundPosition:"-"+(a.e.size*c+a.b.f.left)+"px -"+a.b.f.top+"px"})}function k(a,c,d,e,b){if(!b){b=0;p(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}var f=c[b][0]||c[b];a.a.d=setTimeout(function(){i(a,f);k(a,c,d,e,b+1)},(c[b][1]||0.1)*1E3)}function q(a,c,d,e,b){if(!b){b=0;l(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}if(c[b][2])k(a,c[b][2],c[b][3]|| -0);r(a,c[b][0],c[b][1],function(){q(a,c,d,e,b+1)})}function r(a,c,d,e){var b=s();l(a);t(c,function(f,m){var h=b,u=b+d,v=a[f]||0,y=m-v,w={},n=f+m;o(a,n);a.a.move[n]=setInterval(function(){h=s();a[f]=u<=h?m:y*(h-b)/d+v;w[f]=a[f];j(a.c,w);if(u<=h&&a.a.move){o(a,n);e&&e()}},Math.ceil(1E3/a.j))})}function l(a){clearTimeout(a.a.d);t(a.a.move,function(c){clearInterval(a.a.move[c])})}function o(a,c){clearInterval(a.a.move[c])}function p(a){clearTimeout(a.a.d)}var g=PUBNUB,j=g.h,t=g.i,s=g.k.now,x=g.search("body")[0]; -g.sprite={painter:function(a){x=a},create:function(a){a.a={d:0,move:{}};a.e.size=Math.floor(a.b.width/a.e.g);a.c=g.create("div");a.opacity=a.opacity||1;j(a.c,{opacity:a.opacity,position:"absolute",top:a.top,left:a.left,width:a.e.size,height:a.b.height,backgroundRepeat:"no-repeat",backgroundImage:"url("+a.b.url+")"});i(a,0);x.appendChild(a.c);return a},setframe:i,animate:k,move:r,movie:q,stop_all:l,stop_move:o,stop_animate:p}})(); diff --git a/core/3.2/modules/utility.js b/core/3.2/modules/utility.js deleted file mode 100644 index 81dc95abf..000000000 --- a/core/3.2/modules/utility.js +++ /dev/null @@ -1,121 +0,0 @@ -(function(){ - -/* ======================================================================== */ -/* ================================ UTILITY =============================== */ -/* ======================================================================== */ - -var db = this['localStorage'] -, PUB = PUBNUB -, now = function(){return+new Date} -, cookie = { - get : function(key) { - if (db) return db.getItem(key); - if ((document.cookie||'').indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - }, - set : function( key, value ) { - if (db) return db.setItem( key, value ); - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } -}; - -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - var right_now = now(); - - if (last + rate > right_now) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = now(); - fun(); - } - }; - - // Provide Rate Limited Function Call - return runnit; -} - -function mouse(e) { - if (!e) return [[0,0]]; - - var tch = e.touches && e.touches[0] - , mpos = []; - - if (tch) { - PUB.each( e.touches, function(touch) { - mpos.push([ touch.pageX, touch.pageY ]); - } ); - } - else if (e.pageX) { - mpos.push([ e.pageX, e.pageY ]); - } - else {try{ - mpos.push([ - e.clientX + body.scrollLeft + doc.scrollLeft, - e.clientY + body.scrollTop + doc.scrollTop - ]); - }catch(e){}} - - return mpos; -} - - -/** - * OFFSET - * ====== - * offset( search('div')[0], 'Width' ); - * offset( search('div')[0], 'Height' ); - * offset( search('div')[0], 'Top' ); - * offset( search('div')[0], 'Left' ); - */ -function offset( node, what ) { - var pos = 0 - , what = what || 'Top'; - - while (node) { - pos += node['offset'+what]; - node = node.offsetParent; - } - - return pos -} - -/** - * WINFO - * ===== - * var window_info = winfot(); - * log(window_info.height); - */ -function winfo() { - return { - height : this.innerHeight || - document.documentElement.clientHeight || - document.body.clientHeight, - scrollTop : document.documentElement.scrollTop || - document.body.scrollTop, - size : offset(search('body')[0], 'Height') - } -} - - - - -// Expose Utility to PUBNUB. -PUB['utility'] = { - 'mouse' : mouse, - 'winfo' : winfo, - 'offset' : offset, - 'now' : now, - 'cookie' : cookie, - 'updater' : updater -}; - - -})(); diff --git a/core/3.2/modules/utility.min.js b/core/3.2/modules/utility.min.js deleted file mode 100644 index 93cedae42..000000000 --- a/core/3.2/modules/utility.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function g(a,b){var c=0;for(b=b||"Top";a;){c+=a["offset"+b];a=a.offsetParent}return c}var e=this.localStorage,h=PUBNUB;function f(){return+new Date}h.utility={mouse:function(a){if(!a)return[[0,0]];var b=[];if(a.touches&&a.touches[0])h.a(a.touches,function(d){b.push([d.pageX,d.pageY])});else if(a.pageX)b.push([a.pageX,a.pageY]);else try{b.push([a.clientX+body.scrollLeft+doc.scrollLeft,a.clientY+body.scrollTop+doc.scrollTop])}catch(c){}return b},winfo:function(){return{height:this.innerHeight|| -document.documentElement.clientHeight||document.body.clientHeight,scrollTop:document.documentElement.scrollTop||document.body.scrollTop,size:g(search("body")[0],"Height")}},offset:g,now:f,cookie:{b:function(a){if(e)return e.getItem(a);if((document.cookie||"").indexOf(a)==-1)return null;return((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null},c:function(a,b){if(e)return e.setItem(a,b);document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}},updater:function(a,b){var c, -d=0;function i(){if(d+b>f()){clearTimeout(c);c=setTimeout(i,b)}else{d=f();a()}}return i}}})(); diff --git a/core/3.2/pubnub-3.2.js b/core/3.2/pubnub-3.2.js deleted file mode 100644 index f8e659e44..000000000 --- a/core/3.2/pubnub-3.2.js +++ /dev/null @@ -1,987 +0,0 @@ -/* --------------------------------------------------------------------------- -WAIT! - This file depends on instructions from the PUBNUB Cloud. -http://www.pubnub.com/account-javascript-api-include ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 PubNub Inc. -http://www.pubnub.com/ -http://www.pubnub.com/terms ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ---------------------------------------------------------------------------- */ - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= JSON =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -(window['JSON'] && window['JSON']['stringify']) || (function () { - window['JSON'] || (window['JSON'] = {}); - - if (typeof String.prototype.toJSON !== 'function') { - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - 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, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - function quote(string) { - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(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 < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - if (typeof JSON['stringify'] !== 'function') { - JSON['stringify'] = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } else if (typeof space === 'string') { - indent = space; - } - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - return str('', {'': value}); - }; - } - - if (typeof JSON['parse'] !== 'function') { - // JSON is parsed on the server for security. - JSON['parse'] = function (text) {return eval('('+text+')')}; - } -}()); - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-======================= DOM UTIL ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -window['PUBNUB'] || (function() { - -/** - * CONSOLE COMPATIBILITY - */ -window.console||(window.console=window.console||{}); -console.log||(console.log=((window.opera||{}).postError||function(){})); - -/** - * UTILITIES - */ -function unique() { return'x'+ ++NOW+''+(+new Date) } -function rnow() { return+new Date } - -/** - * LOCAL STORAGE OR COOKIE - */ -var db = (function(){ - var ls = window['localStorage']; - return { - 'get' : function(key) { - try { - if (ls) return ls.getItem(key); - if (document.cookie.indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - } catch(e) { return } - }, - 'set' : function( key, value ) { - try { - if (ls) return ls.setItem( key, value ) && 0; - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } catch(e) { return } - } - }; -})(); - -/** - * UTIL LOCALS - */ -var NOW = 1 -, SWF = 'https://dh15atwfs066y.cloudfront.net/pubnub.swf' -, REPL = /{([\w\-]+)}/g -, ASYNC = 'async' -, URLBIT = '/' -, XHRTME = 310000 -, SECOND = 1000 -, PRESENCE_SUFFIX = '-pnpres' -, UA = navigator.userAgent -, XORIGN = UA.indexOf('MSIE 6') == -1; - -/** - * NEXTORIGIN - * ========== - * var next_origin = nextorigin(); - */ -var nextorigin = (function() { - var ori = Math.floor(Math.random() * 9) + 1; - return function(origin) { - return origin.indexOf('pubsub') > 0 - && origin.replace( - 'pubsub', 'ps' + (++ori < 10 ? ori : ori=1) - ) || origin; - } -})(); - -/** - * UPDATER - * ====== - * var timestamp = unique(); - */ -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - if (last + rate > rnow()) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = rnow(); - fun(); - } - }; - - return runnit; -} - -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * LOG - * === - * log('message'); - */ -function log(message) { console['log'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { console.log(item) } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - -/** - * GREP - * ==== - * var list = grep( [1,2,3], function(item) { return item % 2 } ) - */ -function grep( list, fun ) { - var fin = []; - each( list || [], function(l) { fun(l) && fin.push(l) } ); - return fin -} - -/** - * SUPPLANT - * ======== - * var text = supplant( 'Hello {name}!', { name : 'John' } ) - */ -function supplant( str, values ) { - return str.replace( REPL, function( _, match ) { - return values[match] || _ - } ); -} - -/** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * console.log( element, '1st anchor' ) - * } ); - */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); -} - -/** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); - */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; -} - -/** - * HEAD - * ==== - * head().appendChild(elm); - */ -function head() { return search('head')[0] } - -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); -} - -/** - * CSS - * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - -/** - * timeout - * ======= - * timeout( function(){}, 100 ); - */ -function timeout( fun, wait ) { - return setTimeout( fun, wait ); -} - -/** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); - */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } - -/** - * ENCODE - * ====== - * var encoded_path = encode('path'); - */ -function encode(path) { - return map( (encodeURIComponent(path)).split(''), function(chr) { - return "-_.!~*'()".indexOf(chr) < 0 ? chr : - "%"+chr.charCodeAt(0).toString(16).toUpperCase() - } ).join(''); -} - -/** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * - */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; - -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - script[ASYNC] = ASYNC; - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); - if (setup.data) { - script.src += "?"; - for (key in setup.data) { - script.src += key+"="+setup.data[key]+"&"; - } - } - - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr, response - , finished = function() { - if (loaded) return; - loaded = 1; - - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = XHRTME; - - url = setup.url.join(URLBIT); - if (setup.data) { - url += "?"; - for (key in setup.data) { - url += key+"="+setup.data[key]+"&"; - } - } - - xhr.open( 'GET', url, true ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); - } - - // Return 'done' - return done; -} - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -var PDIV = $('pubnub') || {} -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - var CHANNELS = {} - , PUBLISH_KEY = setup['publish_key'] || '' - , SUBSCRIBE_KEY = setup['subscribe_key'] || '' - , SSL = setup['ssl'] ? 's' : '' - , UUID = setup['uuid'] || db.get(SUBSCRIBE_KEY+'uuid') || '' - , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') - , SELF = { - /* - PUBNUB.history({ - channel : 'my_chat_channel', - limit : 100, - callback : function(messages) { console.log(messages) } - }); - */ - 'history' : function( args, callback ) { - var callback = args['callback'] || callback - , limit = args['limit'] || 100 - , channel = args['channel'] - , jsonp = jsonp_cb(); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - - // Send Message - xdr({ - callback : jsonp, - url : [ - ORIGIN, 'history', - SUBSCRIBE_KEY, encode(channel), - jsonp, limit - ], - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - /* - PUBNUB.time(function(time){ console.log(time) }); - */ - 'time' : function(callback) { - var jsonp = jsonp_cb(); - xdr({ - callback : jsonp, - url : [ORIGIN, 'time', jsonp], - success : function(response) { callback(response[0]) }, - fail : function() { callback(0) } - }); - }, - - /* - PUBNUB.uuid(function(uuid) { console.log(uuid) }); - */ - 'uuid' : function(callback) { - var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); - return v.toString(16); - }); - if (callback) callback(u); - return u; - }, - - /* - PUBNUB.publish({ - channel : 'my_chat_channel', - message : 'hello!' - }); - */ - 'publish' : function( args, callback ) { - var callback = callback || args['callback'] || function(){} - , message = args['message'] - , channel = args['channel'] - , jsonp = jsonp_cb() - , url; - - if (!message) return log('Missing Message'); - if (!channel) return log('Missing Channel'); - if (!PUBLISH_KEY) return log('Missing Publish Key'); - - // If trying to send Object - message = JSON['stringify'](message); - - // Create URL - url = [ - ORIGIN, 'publish', - PUBLISH_KEY, SUBSCRIBE_KEY, - 0, encode(channel), - jsonp, encode(message) - ]; - - // Send Message - xdr({ - callback : jsonp, - success : function(response) { callback(response) }, - fail : function() { callback([ 0, 'Disconnected' ]) }, - url : url, - data : { uuid: UUID } - }); - }, - /* - PUBNUB.unsubscribe({ channel : 'my_chat' }); - */ - 'unsubscribe' : function(args) { - // Unsubscribe from both the Channel and the Presence Channel - _unsubscribe(args['channel']); - _unsubscribe(args['channel'] + PRESENCE_SUFFIX); - - function _unsubscribe(channel) { - // Leave if there never was a channel. - if (!(channel in CHANNELS)) return; - - // Disable Channel - CHANNELS[channel].connected = 0; - - // Abort and Remove Script - CHANNELS[channel].done && - CHANNELS[channel].done(0); - } - }, - - /* - PUBNUB.subscribe({ - channel : 'my_chat' - callback : function(message) { console.log(message) } - }); - */ - 'subscribe' : function( args, callback ) { - var channel = args['channel'] - , callback = callback || args['callback'] - , subscribe_key= args['subscribe_key'] || SUBSCRIBE_KEY - , restore = args['restore'] - , timetoken = 0 - , error = args['error'] || function(){} - , connect = args['connect'] || function(){} - , reconnect = args['reconnect'] || function(){} - , disconnect = args['disconnect'] || function(){} - , presence = args['presence'] || function(){} - , disconnected = 0 - , connected = 0 - , origin = nextorigin(ORIGIN); - - // Reduce Status Flicker - if (!READY) return READY_BUFFER.push([ args, callback, SELF ]); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - if (!(channel in CHANNELS)) CHANNELS[channel] = {}; - - // Make sure we have a Channel - if (CHANNELS[channel].connected) return log('Already Connected'); - CHANNELS[channel].connected = 1; - - // Recurse Subscribe - function _connect() { - var jsonp = jsonp_cb(); - - // Stop Connection - if (!CHANNELS[channel].connected) return; - - // Connect to PubNub Subscribe Servers - CHANNELS[channel].done = xdr({ - callback : jsonp, - url : [ - origin, 'subscribe', - subscribe_key, encode(channel), - jsonp, timetoken - ], - data : { uuid: UUID }, - fail : function() { - // Disconnect - if (!disconnected) { - disconnected = 1; - disconnect(); - } - timeout( _connect, SECOND ); - SELF['time'](function(success){ - // Reconnect - if (success && disconnected) { - disconnected = 0; - reconnect(); - } - else { - error(); - } - }); - }, - success : function(messages) { - if (!CHANNELS[channel].connected) return; - - // Connect - if (!connected) { - connected = 1; - connect(); - } - - // Reconnect - if (disconnected) { - disconnected = 0; - reconnect(); - } - - // Restore Previous Connection Point if Needed - // Also Update Timetoken - restore = db.set( - SUBSCRIBE_KEY + channel, - timetoken = restore && db.get( - subscribe_key + channel - ) || messages[1] - ); - - each( messages[0], function(msg) { - callback( msg, messages ); - } ); - - timeout( _connect, 10 ); - } - }); - } - - // Presence Subscribe - if (args['presence']) SELF.subscribe({ - channel : args['channel'] + PRESENCE_SUFFIX, - callback : presence, - restore : args['restore'] - }); - - // Begin Recursive Subscribe - _connect(); - }, - 'here_now' : function( args, callback ) { - var callback = args['callback'] || callback - , channel = args['channel'] - , jsonp = jsonp_cb() - , origin = nextorigin(ORIGIN); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - - data = null; - if (jsonp != '0') { data['callback']=jsonp; } - - // Send Message - xdr({ - callback : jsonp, - url : [ - origin, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, - 'channel', encode(channel) - ], - data: data, - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'each' : each, - 'map' : map, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB - }; - - if (UUID == '') UUID = SELF.uuid(); - db.set(SUBSCRIBE_KEY+'uuid', UUID); - - return SELF; -}; - -// CREATE A PUBNUB GLOBAL OBJECT -PUBNUB = CREATE_PUBNUB({ - 'publish_key' : attr( PDIV, 'pub-key' ), - 'subscribe_key' : attr( PDIV, 'sub-key' ), - 'ssl' : attr( PDIV, 'ssl' ) == 'on', - 'origin' : attr( PDIV, 'origin' ), - 'uuid' : attr( PDIV, 'uuid' ) -}); - -// PUBNUB Flash Socket -css( PDIV, { 'position' : 'absolute', 'top' : -SECOND } ); - -if ('opera' in window || attr( PDIV, 'flash' )) PDIV['innerHTML'] = - ''; - -var pubnubs = $('pubnubs') || {}; - -// PUBNUB READY TO CONNECT -function ready() { PUBNUB['time'](rnow); -PUBNUB['time'](function(t){ timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(sub) { - sub[2]['subscribe']( sub[0], sub[1] ) - } ); -}, SECOND ); }); } - -// Bind for PUBNUB Readiness to Subscribe -bind( 'load', window, function(){ timeout( ready, 0 ) } ); - -// Create Interface for Opera Flash -PUBNUB['rdx'] = function( id, data ) { - if (!data) return FDomainRequest[id]['onerror'](); - FDomainRequest[id]['responseText'] = unescape(data); - FDomainRequest[id]['onload'](); -}; - -function FDomainRequest() { - if (!pubnubs['get']) return 0; - - var fdomainrequest = { - 'id' : FDomainRequest['id']++, - 'send' : function() {}, - 'abort' : function() { fdomainrequest['id'] = {} }, - 'open' : function( method, url ) { - FDomainRequest[fdomainrequest['id']] = fdomainrequest; - pubnubs['get']( fdomainrequest['id'], url ); - } - }; - - return fdomainrequest; -} -FDomainRequest['id'] = SECOND; - -// jQuery Interface -window['jQuery'] && (window['jQuery']['PUBNUB'] = PUBNUB); - -// For Testling.js - http://testling.com/ -typeof module !== 'undefined' && (module.exports = PUBNUB) && ready(); - -})(); diff --git a/core/3.2/pubnub-3.2.min.js b/core/3.2/pubnub-3.2.min.js deleted file mode 100644 index 0ae25b190..000000000 --- a/core/3.2/pubnub-3.2.min.js +++ /dev/null @@ -1,18 +0,0 @@ -window.JSON&&window.JSON.stringify||function(){function t(c){v.lastIndex=0;return v.test(c)?'"'+c.replace(v,function(c){var f=D[c];return"string"===typeof f?f:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function q(r,p){var f,k,j,n,s=c,l,e=p[r];e&&("object"===typeof e&&"function"===typeof e.toJSON)&&(e=e.toJSON(r));"function"===typeof m&&(e=m.call(p,r,e));switch(typeof e){case "string":return t(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e); -case "object":if(!e)return"null";c+=h;l=[];if("[object Array]"===Object.prototype.toString.apply(e)){n=e.length;for(f=0;fq()?(clearTimeout(d),d=setTimeout(e,b)):(c=q(),a())};return e}function c(a){return document.getElementById(a)}function h(a){console.log(a)}function D(a,b){var d=[];m(a.split(/\s+/),function(a){m((b||document).getElementsByTagName(a),function(a){d.push(a)})});return d}function m(a,b){if(a&&b)if("undefined"!=typeof a[0])for(var d=0,c=a.length;d"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")} -function w(a){if(F||o()){a:{var b,d,e=function(){if(!h){h=1;clearTimeout(l);try{d=JSON.parse(b.responseText)}catch(a){return u(1)}U(d)}},f=0,h=0,l=setTimeout(function(){u(1)},G),m=a.fail||function(){},U=a.success||function(){},u=function(a){f||(f=1,clearTimeout(l),b&&(b.onerror=b.onload=null,b.abort&&b.abort(),b=null),a&&m())};try{b=o()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){u(1)};b.onload=b.onloadend=e;b.timeout=G;url=a.url.join(L);if(a.data)for(key in url+= -"?",a.data)url+=key+"="+a.data[key]+"&";b.open("GET",url,!0);b.send()}catch(V){u(0);F=0;a=w(a);break a}a=u}return a}var g=s("script"),e=a.callback,M=t(),N=0,p=setTimeout(function(){i(1)},G),q=a.fail||function(){},r=a.success||function(){},i=function(a,b){N||(N=1,a||r(b),g.onerror=null,clearTimeout(p),setTimeout(function(){a&&q();var b=c(M),u=b&&b.parentNode;u&&u.removeChild(b)},B))};window[e]=function(a){i(0,a)};g[O]=O;g.onerror=function(){i(1)};g.src=a.url.join(L);if(a.data)for(key in g.src+="?", -a.data)g.src+=key+"="+a.data[key]+"&";j(g,"id",M);k().appendChild(g);return i}function H(){PUBNUB.time(q);PUBNUB.time(function(){setTimeout(function(){I||(I=1,m(P,function(a){a[2].subscribe(a[0],a[1])}))},B)})}function o(){if(!Q.get)return 0;var a={id:o.id++,send:function(){},abort:function(){a.id={}},open:function(b,c){o[a.id]=a;Q.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||function(){});var x,E=window.localStorage; -x={get:function(a){try{return E?E.getItem(a):-1==document.cookie.indexOf(a)?null:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null}catch(b){}},set:function(a,b){try{if(E)return E.setItem(a,b)&&0;document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(c){}}};var S=1,T=/{([\w\-]+)}/g,O="async",L="/",G=31E4,B=1E3,F=-1==navigator.userAgent.indexOf("MSIE 6"),J,K=Math.floor(9*Math.random())+1;J=function(a){return 0++K? -K:K=1))||a};var C={list:{},unbind:function(a){C.list[a]=[]},bind:function(a,b){(C.list[a]=C.list[a]||[]).push(b)},fire:function(a,b){m(C.list[a]||[],function(a){a(b)})}},i=c("pubnub")||{},I=0,P=[],R=function(a){var b={},d=a.publish_key||"",i=a.subscribe_key||"",o=a.ssl?"s":"",y=a.uuid||x.get(i+"uuid")||"",z="http"+o+"://"+(a.origin||"pubsub.pubnub.com"),A={history:function(a,b){var b=a.callback||b,c=a.limit||100,g=a.channel,d=l();if(!g)return h("Missing Channel");if(!b)return h("Missing Callback"); -w({callback:d,url:[z,"history",i,e(g),d,c],success:function(a){b(a)},fail:function(a){h(a)}})},time:function(a){var b=l();w({callback:b,url:[z,"time",b],success:function(b){a(b[0])},fail:function(){a(0)}})},uuid:function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)});a&&a(b);return b},publish:function(a,b){var b=b||a.callback||function(){},c=a.message,g=a.channel,f=l();if(!c)return h("Missing Message");if(!g)return h("Missing Channel"); -if(!d)return h("Missing Publish Key");c=JSON.stringify(c);c=[z,"publish",d,i,0,e(g),f,e(c)];w({callback:f,success:function(a){b(a)},fail:function(){b([0,"Disconnected"])},url:c,data:{uuid:y}})},unsubscribe:function(a){function c(a){a in b&&(b[a].connected=0,b[a].done&&b[a].done(0))}c(a.channel);c(a.channel+"-pnpres")},subscribe:function(a,c){function d(){var a=l();b[g].connected&&(b[g].done=w({callback:a,url:[v,"subscribe",f,e(g),a,k],data:{uuid:y},fail:function(){n||(n=1,r());setTimeout(d,B);A.time(function(a){if(a&& -n){n=0;o()}else p()})},success:function(a){b[g].connected&&(s||(s=1,q()),n&&(n=0,o()),j=x.set(i+g,k=j&&x.get(f+g)||a[1]),m(a[0],function(b){c(b,a)}),setTimeout(d,10))}}))}var g=a.channel,c=c||a.callback,f=a.subscribe_key||i,j=a.restore,k=0,p=a.error||function(){},q=a.connect||function(){},o=a.reconnect||function(){},r=a.disconnect||function(){},t=a.presence||function(){},n=0,s=0,v=J(z);if(!I)return P.push([a,c,A]);if(!g)return h("Missing Channel");if(!c)return h("Missing Callback");if(!i)return h("Missing Subscribe Key"); -g in b||(b[g]={});if(b[g].connected)return h("Already Connected");b[g].connected=1;a.presence&&A.subscribe({channel:a.channel+"-pnpres",callback:t,restore:a.restore});d()},here_now:function(a,b){var b=a.callback||b,c=a.channel,d=l(),f=J(z);if(!c)return h("Missing Channel");if(!b)return h("Missing Callback");data=null;"0"!=d&&(data.callback=d);w({callback:d,url:[f,"v2","presence","sub_key",i,"channel",e(c)],data:data,success:function(a){b(a)},fail:function(a){h(a)}})},xdr:w,ready:H,db:x,each:m,map:r, -css:n,$:c,create:s,bind:f,supplant:p,head:k,search:D,attr:j,now:q,unique:t,events:C,updater:v,init:R};""==y&&(y=A.uuid());x.set(i+"uuid",y);return A};PUBNUB=R({publish_key:j(i,"pub-key"),subscribe_key:j(i,"sub-key"),ssl:"on"==j(i,"ssl"),origin:j(i,"origin"),uuid:j(i,"uuid")});n(i,{position:"absolute",top:-B});if("opera"in window||j(i,"flash"))i.innerHTML=""; -var Q=c("pubnubs")||{};f("load",window,function(){setTimeout(H,0)});PUBNUB.rdx=function(a,b){if(!b)return o[a].onerror();o[a].responseText=unescape(b);o[a].onload()};o.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&H()}(); diff --git a/core/3.2/pubnub.as b/core/3.2/pubnub.as deleted file mode 100644 index a10e99855..000000000 --- a/core/3.2/pubnub.as +++ /dev/null @@ -1,47 +0,0 @@ -package { - import flash.external.ExternalInterface; - import flash.display.Sprite; - import flash.net.URLLoader; - import flash.net.URLRequest; - import flash.events.Event; - import flash.events.IOErrorEvent; - import flash.events.SecurityErrorEvent; - import flash.system.Security; - import flash.utils.setTimeout; - - public class pubnub extends Sprite { - - Security.allowDomain("*"); - Security.allowInsecureDomain("*"); - - ExternalInterface.addCallback( "get", function( - id:Number, - url:String - ):void { - function handler(e:Event):void { - var loader:URLLoader = URLLoader(e.target) - , data:String = loader.data - , timeout:int = 1; - - if (e.type == 'securityError') { - data = '[1,"S"]'; - timeout = 1000; - } - - setTimeout( function delayed():void { - ExternalInterface.call( "PUBNUB.rdx", id, escape(data) ); - loader.close(); - }, timeout ); - } - - var loader:URLLoader = new URLLoader(); - - loader.addEventListener( Event.COMPLETE, handler ); - loader.addEventListener( IOErrorEvent.IO_ERROR, handler ); - loader.addEventListener( - SecurityErrorEvent.SECURITY_ERROR, handler - ); - loader.load(new URLRequest(url)); - }); - } -} diff --git a/core/3.2/pubnub.swf b/core/3.2/pubnub.swf deleted file mode 100644 index 1fce400b0..000000000 Binary files a/core/3.2/pubnub.swf and /dev/null differ diff --git a/core/3.2/tests/head-test.htm b/core/3.2/tests/head-test.htm deleted file mode 100644 index 3187050cc..000000000 --- a/core/3.2/tests/head-test.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - PubNub JavaScript HEAD INIT TEST - - - - -
- -

Head Test

-
Wait here for an alert() message.
- -
-
- diff --git a/core/3.2/tests/head.load.min.js b/core/3.2/tests/head.load.min.js deleted file mode 100644 index 6242b0fad..000000000 --- a/core/3.2/tests/head.load.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - Head JS The only script in your - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c - - - PubNub JavaScript MailTO Fix - - -
- - -
- × -

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

-
- - - -
0
- -
- - -
- diff --git a/core/3.2/tests/ssl-test.html b/core/3.2/tests/ssl-test.html deleted file mode 100644 index 1103bfb28..000000000 --- a/core/3.2/tests/ssl-test.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -
- -
- - - - - - diff --git a/core/3.2/tests/test.sh b/core/3.2/tests/test.sh deleted file mode 100755 index 459aef128..000000000 --- a/core/3.2/tests/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -## ------------------------------------------------ -## PubNub 3.2 Real-time Cloud Push API - JAVASCRIPT -## ------------------------------------------------ - -## ---------------------------------------------------- -## -## TESTLING - PubNub JavaScript API for Web Browsers -## uses Testling Cloud Service -## for QA and Deployment. -## -## http://www.testling.com/ -## You need this to run './test.sh' unit test. -## -## ---------------------------------------------------- - -if [ -z "$1" ] -then - echo -e "\n\tUSER:PASSWD Required: http://testling.com/\n" - exit -fi - -browsers='firefox/3.6' -browsers=$browsers',firefox/9.0' -browsers=$browsers',firefox/10.0' -browsers=$browsers',chrome/16.0' -browsers=$browsers',chrome/17.0' -browsers=$browsers',iexplore/7.0' -browsers=$browsers',iexplore/8.0' -browsers=$browsers',iexplore/9.0' -browsers=$browsers',safari/5.1' - -echo -e "Testing: $browsers" - -noinstrument='pubnub-3.2.js,test.js' - -tar -cf- test.js ../pubnub-3.2.js | \ - curl -u $1 -sSNT- \ - "testling.com/?noinstrument=$noinstrument&browsers=$browsers" - diff --git a/core/3.3.1/README.md b/core/3.3.1/README.md deleted file mode 100644 index df605a0e7..000000000 --- a/core/3.3.1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API. -http://www.pubnub.com/account - -## TESTLING - (OPTIONAL) -PubNub JavaScript API for Web Browsers -uses Testling Cloud Service for QA and Deployment. -http://www.testling.com/ - -You need this to run './test.sh' unit test. -This is completely optional, however we love Testling. - - -## PubNub 3.3.1 Real-time Cloud Push API - JAVASCRIPT -http://www.pubnub.com - PubNub Real-time Push Service in the Cloud. -http://www.pubnub.com/tutorial/javascript-push-api - -PubNub is a blazingly fast cloud-hosted messaging service for building -real-time web and mobile apps. Hundreds of apps and thousands of developers -rely on PubNub for delivering human-perceptive real-time -experiences that scale to millions of users worldwide. PubNub delivers -the infrastructure needed to build amazing MMO games, social apps, -business collaborative solutions, and more. - -## SIMPLE EXAMPLE -```html -
- - -``` - -## ADVANCED STYLE -```html -
- - - -Click Me for Here Now! // here_now() example (see console for logged output.) -
-Click Me for History! // detailedHistory() example (see console for logged output.) - - - -``` - -## SSL MODE - -```html -
- - -``` - -## Using the PUBNUB init() Function - -Sometimes you want to use create a PubNub Instance directly in JavaScript -and pass the PubNub API Keys without using a DOM element. -To do this, simply follow this `init` example: - -```html - - -``` \ No newline at end of file diff --git a/core/3.3.1/comet.swf b/core/3.3.1/comet.swf deleted file mode 100644 index 1209542d3..000000000 Binary files a/core/3.3.1/comet.swf and /dev/null differ diff --git a/core/3.3.1/crossdomain.xml b/core/3.3.1/crossdomain.xml deleted file mode 100644 index 8fb3c5227..000000000 --- a/core/3.3.1/crossdomain.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/core/3.3.1/examples/detailed_history/index.html b/core/3.3.1/examples/detailed_history/index.html deleted file mode 100644 index 836b8354d..000000000 --- a/core/3.3.1/examples/detailed_history/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - PubNub Detailed History Demo - - - - - - - - - - - - - - -
- -
- - - - - - - - Reverse ? - -
- - -
- - - - - - - diff --git a/core/3.3.1/examples/detailed_history/js/jquery.example.min.js b/core/3.3.1/examples/detailed_history/js/jquery.example.min.js deleted file mode 100755 index 5fc57814d..000000000 --- a/core/3.3.1/examples/detailed_history/js/jquery.example.min.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * jQuery Form Example Plugin 1.6.0 - * Populate form inputs with example text that disappears on focus. - * - * e.g. - * $('input#name').example('Bob Smith'); - * $('input[@title]').example(function () { - * return $(this).attr('title'); - * }); - * $('textarea#message').example('Type your message here', { - * className: 'example_text' - * }); - * - * Copyright (c) Paul Mucur (http://mudge.name), 2007-2012. - * Dual-licensed under the BSD (BSD-LICENSE.txt) and GPL (GPL-LICENSE.txt) - * licenses. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */(function(a){"use strict";var b;a.fn.on?b=function(b,c,d){a("body").on(c,b,d)}:a.fn.delegate?b=function(b,c,d){a("body").delegate(b,c,d)}:a.fn.live?b=function(b,c,d){a(b).live(c,d)}:b=function(b,c,d){a(b).bind(c,d)},a.fn.example=function(c,d){var e=a.isFunction(c),f=a.extend({},d,{example:c});return this.each(function(){var c,d=a(this);a.metadata?c=a.extend({},a.fn.example.defaults,d.metadata(),f):c=a.extend({},a.fn.example.defaults,f),a.fn.example.boundClassNames[c.className]||(a(window).bind("unload.example",function(){a("."+c.className).val("").removeClass(c.className)}),b("form","submit.example example:resetForm",function(){a(this).find("."+c.className).val("").removeClass(c.className)}),a.fn.example.boundClassNames[c.className]=!0),d.val()!==this.defaultValue&&(e||d.val()===c.example)&&d.val(this.defaultValue),d.val()===""&&!d.is(":focus")&&d.addClass(c.className).val(e?c.example.call(this):c.example),d.bind("focus.example",function(){a(this).is("."+c.className)&&a(this).val("").removeClass(c.className)}).bind("change.example",function(){a(this).is("."+c.className)&&a(this).removeClass(c.className)}).bind("blur.example",function(){a(this).val()===""&&a(this).addClass(c.className).val(e?c.example.call(this):c.example)})})},a.fn.example.defaults={className:"example"},a.fn.example.boundClassNames=[]})(jQuery); diff --git a/core/3.3.1/examples/presence/index.html b/core/3.3.1/examples/presence/index.html deleted file mode 100644 index a2363303f..000000000 --- a/core/3.3.1/examples/presence/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - PubNub Presence Demo - - - - - - - - - - - - - - -
- -

Currently Here

-
    -
-
- - - 0 people here now -
- - -
- - - - - - - - diff --git a/core/3.3.1/examples/presence/js/jquery.example.min.js b/core/3.3.1/examples/presence/js/jquery.example.min.js deleted file mode 100755 index 5fc57814d..000000000 --- a/core/3.3.1/examples/presence/js/jquery.example.min.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * jQuery Form Example Plugin 1.6.0 - * Populate form inputs with example text that disappears on focus. - * - * e.g. - * $('input#name').example('Bob Smith'); - * $('input[@title]').example(function () { - * return $(this).attr('title'); - * }); - * $('textarea#message').example('Type your message here', { - * className: 'example_text' - * }); - * - * Copyright (c) Paul Mucur (http://mudge.name), 2007-2012. - * Dual-licensed under the BSD (BSD-LICENSE.txt) and GPL (GPL-LICENSE.txt) - * licenses. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */(function(a){"use strict";var b;a.fn.on?b=function(b,c,d){a("body").on(c,b,d)}:a.fn.delegate?b=function(b,c,d){a("body").delegate(b,c,d)}:a.fn.live?b=function(b,c,d){a(b).live(c,d)}:b=function(b,c,d){a(b).bind(c,d)},a.fn.example=function(c,d){var e=a.isFunction(c),f=a.extend({},d,{example:c});return this.each(function(){var c,d=a(this);a.metadata?c=a.extend({},a.fn.example.defaults,d.metadata(),f):c=a.extend({},a.fn.example.defaults,f),a.fn.example.boundClassNames[c.className]||(a(window).bind("unload.example",function(){a("."+c.className).val("").removeClass(c.className)}),b("form","submit.example example:resetForm",function(){a(this).find("."+c.className).val("").removeClass(c.className)}),a.fn.example.boundClassNames[c.className]=!0),d.val()!==this.defaultValue&&(e||d.val()===c.example)&&d.val(this.defaultValue),d.val()===""&&!d.is(":focus")&&d.addClass(c.className).val(e?c.example.call(this):c.example),d.bind("focus.example",function(){a(this).is("."+c.className)&&a(this).val("").removeClass(c.className)}).bind("change.example",function(){a(this).is("."+c.className)&&a(this).removeClass(c.className)}).bind("blur.example",function(){a(this).val()===""&&a(this).addClass(c.className).val(e?c.example.call(this):c.example)})})},a.fn.example.defaults={className:"example"},a.fn.example.boundClassNames=[]})(jQuery); diff --git a/core/3.3.1/modules/player.js b/core/3.3.1/modules/player.js deleted file mode 100644 index 4529496a4..000000000 --- a/core/3.3.1/modules/player.js +++ /dev/null @@ -1,54 +0,0 @@ -(function(){ - -var PUB = PUBNUB - -/* -------- - Provide a Player Creation/Management Interface. - -------- */ - -, players = (function(){ - var players_obj = {}; - return { - add : function(player) { - players_obj[player['uuid']] = player; - return player; - }, - get : function(uuid) { - return players_obj[uuid]; - }, - all : function() { - return players_obj; - } - }; -})(); - -/* -------- - Capture Current User's Information. - -------- */ - -function current_player(ready) { - function is_ready() { - if (player['uuid'] && player['joined']) { - players.add(player); - ready(player) - } - } - - var player = { - 'uuid' : PUB.uuid(function(uuid){ - player['uuid'] = uuid; - is_ready(); - }), - 'joined' : PUB.time(function(time){ - player['joined'] = time; - is_ready(); - }) - }; -} - -PUB['player'] = { - 'players' : players, - 'current_player' : current_player -}; - -})(); diff --git a/core/3.3.1/modules/player.min.js b/core/3.3.1/modules/player.min.js deleted file mode 100644 index 7f4bbd54e..000000000 --- a/core/3.3.1/modules/player.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var d=PUBNUB,f=function(){var c={};return{add:function(a){return c[a.uuid]=a},a:function(a){return c[a]},all:function(){return c}}}();d.player={players:f,current_player:function(c){function a(){if(b.uuid&&b.joined){f.add(b);c(b)}}var b={uuid:d.c(function(e){b.uuid=e;a()}),joined:d.b(function(e){b.joined=e;a()})}}}})(); diff --git a/core/3.3.1/modules/sprite.js b/core/3.3.1/modules/sprite.js deleted file mode 100644 index bb8b60caa..000000000 --- a/core/3.3.1/modules/sprite.js +++ /dev/null @@ -1,216 +0,0 @@ -(function(){ - - -var PUB = PUBNUB -, bind = PUB.bind -, css = PUB.css -, each = PUB.each -, utility = PUB.utility -, now = utility.now -, ground = PUB.search('body')[0]; - -function painter(node) { - ground = node; -} - -function create(sprite) { - sprite.intervals = { - animate : 0, - move : {} - }; - - sprite.cell.size = Math.floor(sprite.image.width / sprite.cell.count); - sprite.node = PUB.create('div'); - sprite.opacity = sprite.opacity || 1.0; - - css( sprite.node, { - opacity : sprite.opacity, - position : 'absolute', - top : sprite.top, - left : sprite.left, - width : sprite.cell.size, - height : sprite.image.height, - backgroundRepeat : 'no-repeat', - backgroundImage : 'url(' + sprite.image.url + ')' - } ); - - setframe( sprite, 0 ); - append(sprite.node); - - return sprite; -} - -function append(node) { - ground.appendChild(node); -} - -function setframe( sprite, cell, offset ) { - var offset = offset || {}; - if (typeof offset.top == 'number') - sprite.image.offset.top = offset.top; - if (typeof offset.left == 'number') - sprite.image.offset.left = offset.left; - - css( sprite.node, { - backgroundPosition : '-' + - (sprite.cell.size * cell + sprite.image.offset.left) + - 'px -' + sprite.image.offset.top + 'px' - } ); -} - -/** - * sprite.animate( [[frame, duration], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[0, .2], [1, .4], [2, .5]] ) - */ -function animate( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_animate(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Multi format compatibility ([frame, delay]) or (frame) - var frame = pattern[position][0] || pattern[position] - , delay = pattern[position][1] || .1; - - sprite.intervals.animate = setTimeout( function() { - // Update Current Frame - setframe( sprite, frame ); - - // Next Frame - animate( sprite, pattern, loop, callback, position + 1 ); - }, delay * 1000 ); -} - - -/** - * Move and Animate Combined!!! - * - * sprite.animate( [ [left, top, duration, [animate] ], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[10, 10, .2, [ANIMATEPARAMS], loopanimate ], ... ) - * sprite.animate( [[10, 10, .2, [[frame,dur], ...], loopanimate ], ... ) - */ -function movie( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_all(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Update Animator - if (pattern[position][2]) animate( - sprite, - pattern[position][2], - pattern[position][3] || 0 - ); - - // [{top:0,opacity:.5}, 500, 0, 0], - // Update Mover - move( - sprite, - pattern[position][0], - pattern[position][1], - function() { - movie( sprite, pattern, loop, callback, position + 1 ); - } - ); -} - -/** - * move sprite from one place to another. - */ -function move( sprite, properties, duration, callback ) { - var start_time = now(); - - stop_all(sprite); - - each( properties, function( property, value ) { - var current_time = start_time - , end_time = start_time + duration - , start_prop = sprite[property] || 0 - , distance = value - start_prop - , update = {} - , ikey = property + value; - - stop_move( sprite, ikey ); - sprite.intervals.move[ikey] = setInterval( function() { - current_time = now(); - - sprite[property] = ( - end_time <= current_time - ? value - : ( distance * (current_time - start_time) - / duration + start_prop ) - ); - - update[property] = sprite[property]; - css( sprite.node, update ); - - if ( end_time <= current_time && sprite.intervals.move ) { - stop_move( sprite, ikey ); - callback && callback(); - } - - }, Math.ceil(1000 / sprite.framerate) ); - } ); -} - -/** - * Stop movie - */ -function stop_all(sprite) { - clearTimeout(sprite.intervals.animate); - each( sprite.intervals.move, function( ikey ) { - clearInterval(sprite.intervals.move[ikey]); - } ); -} - -/** - * Stop move. - */ -function stop_move( sprite, ikey ) { - clearInterval(sprite.intervals.move[ikey]); -} - -/** - * Stop animate. - */ -function stop_animate(sprite) { - clearTimeout(sprite.intervals.animate); -} - -// Expose Global 'sprite' to PUBNUB -PUB['sprite'] = { - 'painter' : painter, - 'create' : create, - 'setframe' : setframe, - 'animate' : animate, - 'move' : move, - 'movie' : movie, - 'stop_all' : stop_all, - 'stop_move' : stop_move, - 'stop_animate' : stop_animate -}; - - -})(); diff --git a/core/3.3.1/modules/sprite.min.js b/core/3.3.1/modules/sprite.min.js deleted file mode 100644 index 95d7895e4..000000000 --- a/core/3.3.1/modules/sprite.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function i(a,c,d){d=d||{};if(typeof d.top=="number")a.b.f.top=d.top;if(typeof d.left=="number")a.b.f.left=d.left;j(a.c,{backgroundPosition:"-"+(a.e.size*c+a.b.f.left)+"px -"+a.b.f.top+"px"})}function k(a,c,d,e,b){if(!b){b=0;p(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}var f=c[b][0]||c[b];a.a.d=setTimeout(function(){i(a,f);k(a,c,d,e,b+1)},(c[b][1]||0.1)*1E3)}function q(a,c,d,e,b){if(!b){b=0;l(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}if(c[b][2])k(a,c[b][2],c[b][3]|| -0);r(a,c[b][0],c[b][1],function(){q(a,c,d,e,b+1)})}function r(a,c,d,e){var b=s();l(a);t(c,function(f,m){var h=b,u=b+d,v=a[f]||0,y=m-v,w={},n=f+m;o(a,n);a.a.move[n]=setInterval(function(){h=s();a[f]=u<=h?m:y*(h-b)/d+v;w[f]=a[f];j(a.c,w);if(u<=h&&a.a.move){o(a,n);e&&e()}},Math.ceil(1E3/a.j))})}function l(a){clearTimeout(a.a.d);t(a.a.move,function(c){clearInterval(a.a.move[c])})}function o(a,c){clearInterval(a.a.move[c])}function p(a){clearTimeout(a.a.d)}var g=PUBNUB,j=g.h,t=g.i,s=g.k.now,x=g.search("body")[0]; -g.sprite={painter:function(a){x=a},create:function(a){a.a={d:0,move:{}};a.e.size=Math.floor(a.b.width/a.e.g);a.c=g.create("div");a.opacity=a.opacity||1;j(a.c,{opacity:a.opacity,position:"absolute",top:a.top,left:a.left,width:a.e.size,height:a.b.height,backgroundRepeat:"no-repeat",backgroundImage:"url("+a.b.url+")"});i(a,0);x.appendChild(a.c);return a},setframe:i,animate:k,move:r,movie:q,stop_all:l,stop_move:o,stop_animate:p}})(); diff --git a/core/3.3.1/modules/utility.js b/core/3.3.1/modules/utility.js deleted file mode 100644 index 81dc95abf..000000000 --- a/core/3.3.1/modules/utility.js +++ /dev/null @@ -1,121 +0,0 @@ -(function(){ - -/* ======================================================================== */ -/* ================================ UTILITY =============================== */ -/* ======================================================================== */ - -var db = this['localStorage'] -, PUB = PUBNUB -, now = function(){return+new Date} -, cookie = { - get : function(key) { - if (db) return db.getItem(key); - if ((document.cookie||'').indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - }, - set : function( key, value ) { - if (db) return db.setItem( key, value ); - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } -}; - -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - var right_now = now(); - - if (last + rate > right_now) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = now(); - fun(); - } - }; - - // Provide Rate Limited Function Call - return runnit; -} - -function mouse(e) { - if (!e) return [[0,0]]; - - var tch = e.touches && e.touches[0] - , mpos = []; - - if (tch) { - PUB.each( e.touches, function(touch) { - mpos.push([ touch.pageX, touch.pageY ]); - } ); - } - else if (e.pageX) { - mpos.push([ e.pageX, e.pageY ]); - } - else {try{ - mpos.push([ - e.clientX + body.scrollLeft + doc.scrollLeft, - e.clientY + body.scrollTop + doc.scrollTop - ]); - }catch(e){}} - - return mpos; -} - - -/** - * OFFSET - * ====== - * offset( search('div')[0], 'Width' ); - * offset( search('div')[0], 'Height' ); - * offset( search('div')[0], 'Top' ); - * offset( search('div')[0], 'Left' ); - */ -function offset( node, what ) { - var pos = 0 - , what = what || 'Top'; - - while (node) { - pos += node['offset'+what]; - node = node.offsetParent; - } - - return pos -} - -/** - * WINFO - * ===== - * var window_info = winfot(); - * log(window_info.height); - */ -function winfo() { - return { - height : this.innerHeight || - document.documentElement.clientHeight || - document.body.clientHeight, - scrollTop : document.documentElement.scrollTop || - document.body.scrollTop, - size : offset(search('body')[0], 'Height') - } -} - - - - -// Expose Utility to PUBNUB. -PUB['utility'] = { - 'mouse' : mouse, - 'winfo' : winfo, - 'offset' : offset, - 'now' : now, - 'cookie' : cookie, - 'updater' : updater -}; - - -})(); diff --git a/core/3.3.1/modules/utility.min.js b/core/3.3.1/modules/utility.min.js deleted file mode 100644 index 93cedae42..000000000 --- a/core/3.3.1/modules/utility.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function g(a,b){var c=0;for(b=b||"Top";a;){c+=a["offset"+b];a=a.offsetParent}return c}var e=this.localStorage,h=PUBNUB;function f(){return+new Date}h.utility={mouse:function(a){if(!a)return[[0,0]];var b=[];if(a.touches&&a.touches[0])h.a(a.touches,function(d){b.push([d.pageX,d.pageY])});else if(a.pageX)b.push([a.pageX,a.pageY]);else try{b.push([a.clientX+body.scrollLeft+doc.scrollLeft,a.clientY+body.scrollTop+doc.scrollTop])}catch(c){}return b},winfo:function(){return{height:this.innerHeight|| -document.documentElement.clientHeight||document.body.clientHeight,scrollTop:document.documentElement.scrollTop||document.body.scrollTop,size:g(search("body")[0],"Height")}},offset:g,now:f,cookie:{b:function(a){if(e)return e.getItem(a);if((document.cookie||"").indexOf(a)==-1)return null;return((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null},c:function(a,b){if(e)return e.setItem(a,b);document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}},updater:function(a,b){var c, -d=0;function i(){if(d+b>f()){clearTimeout(c);c=setTimeout(i,b)}else{d=f();a()}}return i}}})(); diff --git a/core/3.3.1/pubnub-3.3.1.js b/core/3.3.1/pubnub-3.3.1.js deleted file mode 100644 index 37851140a..000000000 --- a/core/3.3.1/pubnub-3.3.1.js +++ /dev/null @@ -1,1074 +0,0 @@ -/* --------------------------------------------------------------------------- -WAIT! - This file depends on instructions from the PUBNUB Cloud. -http://www.pubnub.com/account-javascript-api-include ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 PubNub Inc. -http://www.pubnub.com/ -http://www.pubnub.com/terms ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ---------------------------------------------------------------------------- */ - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= JSON =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -(window['JSON'] && window['JSON']['stringify']) || (function () { - window['JSON'] || (window['JSON'] = {}); - - if (typeof String.prototype.toJSON !== 'function') { - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - 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, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - function quote(string) { - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(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 < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - if (typeof JSON['stringify'] !== 'function') { - JSON['stringify'] = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } else if (typeof space === 'string') { - indent = space; - } - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - return str('', {'': value}); - }; - } - - if (typeof JSON['parse'] !== 'function') { - // JSON is parsed on the server for security. - JSON['parse'] = function (text) {return eval('('+text+')')}; - } -}()); - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-======================= DOM UTIL ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -window['PUBNUB'] || (function() { - -/** - * CONSOLE COMPATIBILITY - */ -window.console||(window.console=window.console||{}); -console.log||(console.log=((window.opera||{}).postError||function(){})); - -/** - * UTILITIES - */ -function unique() { return'x'+ ++NOW+''+(+new Date) } -function rnow() { return+new Date } - -/** - * LOCAL STORAGE OR COOKIE - */ -var db = (function(){ - var ls = window['localStorage']; - return { - 'get' : function(key) { - try { - if (ls) return ls.getItem(key); - if (document.cookie.indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - } catch(e) { return } - }, - 'set' : function( key, value ) { - try { - if (ls) return ls.setItem( key, value ) && 0; - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } catch(e) { return } - } - }; -})(); - -/** - * UTIL LOCALS - */ -var NOW = 1 -, SWF = 'https://dh15atwfs066y.cloudfront.net/pubnub.swf' -, REPL = /{([\w\-]+)}/g -, ASYNC = 'async' -, URLBIT = '/' -, PARAMSBIT = '&' -, XHRTME = 310000 -, SECOND = 1000 -, PRESENCE_SUFFIX = '-pnpres' -, UA = navigator.userAgent -, XORIGN = UA.indexOf('MSIE 6') == -1; - -/** - * NEXTORIGIN - * ========== - * var next_origin = nextorigin(); - */ -var nextorigin = (function() { - var ori = Math.floor(Math.random() * 9) + 1; - return function(origin) { - return origin.indexOf('pubsub') > 0 - && origin.replace( - 'pubsub', 'ps' + (++ori < 10 ? ori : ori=1) - ) || origin; - } -})(); - -/** - * UPDATER - * ====== - * var timestamp = unique(); - */ -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - if (last + rate > rnow()) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = rnow(); - fun(); - } - }; - - return runnit; -} - -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * LOG - * === - * log('message'); - */ -function log(message) { console['log'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { console.log(item) } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - -/** - * GREP - * ==== - * var list = grep( [1,2,3], function(item) { return item % 2 } ) - */ -function grep( list, fun ) { - var fin = []; - each( list || [], function(l) { fun(l) && fin.push(l) } ); - return fin -} - -/** - * SUPPLANT - * ======== - * var text = supplant( 'Hello {name}!', { name : 'John' } ) - */ -function supplant( str, values ) { - return str.replace( REPL, function( _, match ) { - return values[match] || _ - } ); -} - -/** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * console.log( element, '1st anchor' ) - * } ); - */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); -} - -/** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); - */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; -} - -/** - * HEAD - * ==== - * head().appendChild(elm); - */ -function head() { return search('head')[0] } - -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); -} - -/** - * CSS - * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - -/** - * timeout - * ======= - * timeout( function(){}, 100 ); - */ -function timeout( fun, wait ) { - return setTimeout( fun, wait ); -} - -/** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); - */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } - -/** - * ENCODE - * ====== - * var encoded_path = encode('path'); - */ -function encode(path) { - return map( (encodeURIComponent(path)).split(''), function(chr) { - return "-_.!~*'()".indexOf(chr) < 0 ? chr : - "%"+chr.charCodeAt(0).toString(16).toUpperCase() - } ).join(''); -} - -/** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * - */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; - -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - if (!setup.blocking) script[ASYNC] = ASYNC; - - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); - - if (setup.data) { - var params = []; - script.src += "?"; - for (key in setup.data) { - params.push(key+"="+setup.data[key]); - } - script.src += params.join(PARAMSBIT); - } - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr, response - , finished = function() { - if (loaded) return; - loaded = 1; - - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = XHRTME; - - var url = setup.url.join(URLBIT); - if (setup.data) { - var params = []; - var key; - url += "?"; - for (key in setup.data) { - params.push(key+"="+setup.data[key]); - } - url += params.join(PARAMSBIT); - } - - xhr.open( 'GET', url, typeof setup.blocking == 'undefined' ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); - } - - // Return 'done' - return done; -} - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -var PDIV = $('pubnub') || {} -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - var CHANNELS = {} - , PUBLISH_KEY = setup['publish_key'] || '' - , SUBSCRIBE_KEY = setup['subscribe_key'] || '' - , SSL = setup['ssl'] ? 's' : '' - , UUID = setup['uuid'] || db.get(SUBSCRIBE_KEY+'uuid') || '' - , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') - , LEAVE = function(){} - , SELF = { - /* - PUBNUB.history({ - channel : 'my_chat_channel', - limit : 100, - callback : function(messages) { console.log(messages) } - }); - */ - 'history' : function( args, callback ) { - var callback = args['callback'] || callback - , limit = args['limit'] || 100 - , channel = args['channel'] - , jsonp = jsonp_cb(); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - // Send Message - xdr({ - success : function(response) { callback(response) }, - fail : function(response) { log(response) }, - callback : jsonp, - url : [ - ORIGIN, 'history', - SUBSCRIBE_KEY, encode(channel), - jsonp, limit - ] - }); - }, - - /* - PUBNUB.detailedHistory({ - channel : 'my_chat_channel', - count : 100, - callback : function(messages) { console.log(messages) } - }); - */ - 'detailedHistory' : function( args, callback ) { - var callback = args['callback'] || callback - , count = args['count'] || 100 - , reverse = args['reverse'] || "false" - , channel = args['channel'] - , start = args['start'] - , end = args['end'] - , params = {} - , jsonp = jsonp_cb(); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - params["count"] = count; - params["reverse"] = reverse; - - if (start) params["start"] = start; - if (end) params["end"] = end; - - // Send Message - xdr({ - callback : jsonp, - data : params, - success : function(response) { callback(response) }, - fail : function(response) { log(response) }, - url : [ - ORIGIN, 'v2', 'history', - 'sub-key', SUBSCRIBE_KEY, 'channel', encode(channel) - ] - }); - }, - - /* - PUBNUB.time(function(time){ console.log(time) }); - */ - 'time' : function(callback) { - var jsonp = jsonp_cb(); - xdr({ - callback : jsonp, - url : [ORIGIN, 'time', jsonp], - success : function(response) { callback(response[0]) }, - fail : function() { callback(0) } - }); - }, - - /* - PUBNUB.uuid(function(uuid) { console.log(uuid) }); - */ - 'uuid' : function(callback) { - var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); - return v.toString(16); - }); - if (callback) callback(u); - return u; - }, - - /* - PUBNUB.publish({ - channel : 'my_chat_channel', - message : 'hello!' - }); - */ - 'publish' : function( args, callback ) { - var callback = callback || args['callback'] || function(){} - , message = args['message'] - , channel = args['channel'] - , jsonp = jsonp_cb() - , url; - - if (!message) return log('Missing Message'); - if (!channel) return log('Missing Channel'); - if (!PUBLISH_KEY) return log('Missing Publish Key'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - // If trying to send Object - message = JSON['stringify'](message); - - // Create URL - url = [ - ORIGIN, 'publish', - PUBLISH_KEY, SUBSCRIBE_KEY, - 0, encode(channel), - jsonp, encode(message) - ]; - - // Send Message - xdr({ - callback : jsonp, - success : function(response) { callback(response) }, - fail : function() { callback([ 0, 'Disconnected' ]) }, - url : url, - data : { uuid: UUID } - }); - }, - /* - PUBNUB.unsubscribe({ channel : 'my_chat' }); - */ - 'unsubscribe' : function(args) { - // Unsubscribe from both the Channel and the Presence Channel - unsubscribe(args['channel']); - unsubscribe(args['channel'] + PRESENCE_SUFFIX); - - // Announce Leave - LEAVE(args['channel']); - - function unsubscribe(channel) { - // Leave if there never was a channel. - if (!(channel in CHANNELS)) return; - - // Disable Channel - CHANNELS[channel].connected = 0; - - // Abort and Remove Script - CHANNELS[channel].done && - CHANNELS[channel].done(0); - } - }, - - /* - PUBNUB.subscribe({ - channel : 'my_chat' - callback : function(message) { console.log(message) } - }); - */ - 'subscribe' : function( args, callback ) { - var channel = args['channel'] - , callback = callback || args['callback'] - , subscribe_key = args['subscribe_key'] || SUBSCRIBE_KEY - , restore = args['restore'] - , timetoken = 0 - , error = args['error'] || function(){} - , connect = args['connect'] || function(){} - , reconnect = args['reconnect'] || function(){} - , disconnect = args['disconnect'] || function(){} - , presence = args['presence'] || function(){} - , disconnected = 0 - , connected = 0 - , origin = nextorigin(ORIGIN); - - // Reduce Status Flicker - if (!READY) return READY_BUFFER.push([ args, callback, SELF ]); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - if (!(channel in CHANNELS)) CHANNELS[channel] = {}; - - // Make sure we have a Channel - if (CHANNELS[channel].connected) return log('Already Connected'); - CHANNELS[channel].connected = 1; - - // Recurse Subscribe - function _connect() { - var jsonp = jsonp_cb(); - - // Stop Connection - if (!CHANNELS[channel].connected) return; - - // Connect to PubNub Subscribe Servers - CHANNELS[channel].done = xdr({ - callback : jsonp, - data : { uuid: UUID }, - url : [ - origin, 'subscribe', - subscribe_key, encode(channel), - jsonp, timetoken - ], - fail : function() { - // Disconnect - if (!disconnected) { - disconnected = 1; - disconnect(); - leave(); - } - timeout( _connect, SECOND ); - SELF['time'](function(success){ - // Reconnect - if (success && disconnected) { - disconnected = 0; - reconnect(); - } - else { - error(); - } - }); - }, - success : function(messages) { - if (!CHANNELS[channel].connected) return; - - // Connect - if (!connected) { - connected = 1; - connect(); - } - - // Reconnect - if (disconnected) { - disconnected = 0; - reconnect(); - } - - // Restore Previous Connection Point if Needed - // Also Update Timetoken - restore = db.set( - SUBSCRIBE_KEY + channel, - timetoken = restore && db.get( - subscribe_key + channel - ) || messages[1] - ); - - each( messages[0], function(msg) { - callback( msg, messages ); - } ); - - timeout( _connect, 10 ); - } - }); - } - - // Announce Leave Event - function leave(chan) { - var data = { uuid : UUID } - , jsonp = jsonp_cb() - , chann = chan || channel; - - if (jsonp != '0') data['callback'] = jsonp; - - xdr({ - blocking : 1, - callback : jsonp, - data : data, - url : [ - origin, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, - 'channel', encode(channel), - 'leave' - ] - }); - - return true; - } - - LEAVE = leave; - - // onBeforeUnload - bind( 'beforeunload', window, leave ); - - // Presence Subscribe - if (args['presence']) SELF.subscribe({ - channel : args['channel'] + PRESENCE_SUFFIX, - callback : presence, - restore : args['restore'], - disconnect : leave - }); - - // Begin Recursive Subscribe - _connect(); - }, - - 'here_now' : function( args, callback ) { - var callback = args['callback'] || callback - , channel = args['channel'] - , jsonp = jsonp_cb() - , data = {} - , origin = nextorigin(ORIGIN); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - if (jsonp != '0') data['callback'] = jsonp; - - // Send Message - xdr({ - callback : jsonp, - data : data, - success : function(response) { callback(response) }, - fail : function(response) { log(response) }, - url : [ - origin, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, - 'channel', encode(channel) - ] - }); - }, - - // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'each' : each, - 'map' : map, - 'grep' : grep, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB - }; - - if (!UUID) UUID = SELF.uuid(); - db.set( SUBSCRIBE_KEY + 'uuid', UUID ); - - return SELF; -}; - -// CREATE A PUBNUB GLOBAL OBJECT -PUBNUB = CREATE_PUBNUB({ - 'publish_key' : attr( PDIV, 'pub-key' ), - 'subscribe_key' : attr( PDIV, 'sub-key' ), - 'ssl' : !document.location.href.indexOf('https') || attr( PDIV, 'ssl' ) == 'on', - 'origin' : attr( PDIV, 'origin' ), - 'uuid' : attr( PDIV, 'uuid' ) -}); - -// PUBNUB Flash Socket -css( PDIV, { 'position' : 'absolute', 'top' : -SECOND } ); - -if ('opera' in window || attr( PDIV, 'flash' )) PDIV['innerHTML'] = - ''; - -var pubnubs = $('pubnubs') || {}; - -// PUBNUB READY TO CONNECT -function ready() { PUBNUB['time'](rnow); -PUBNUB['time'](function(t){ timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(sub) { - sub[2]['subscribe']( sub[0], sub[1] ) - } ); -}, SECOND ); }); } - -// Bind for PUBNUB Readiness to Subscribe -bind( 'load', window, function(){ timeout( ready, 0 ) } ); - -// Create Interface for Opera Flash -PUBNUB['rdx'] = function( id, data ) { - if (!data) return FDomainRequest[id]['onerror'](); - FDomainRequest[id]['responseText'] = unescape(data); - FDomainRequest[id]['onload'](); -}; - -function FDomainRequest() { - if (!pubnubs['get']) return 0; - - var fdomainrequest = { - 'id' : FDomainRequest['id']++, - 'send' : function() {}, - 'abort' : function() { fdomainrequest['id'] = {} }, - 'open' : function( method, url ) { - FDomainRequest[fdomainrequest['id']] = fdomainrequest; - pubnubs['get']( fdomainrequest['id'], url ); - } - }; - - return fdomainrequest; -} -FDomainRequest['id'] = SECOND; - -// jQuery Interface -window['jQuery'] && (window['jQuery']['PUBNUB'] = PUBNUB); - -// For Testling.js - http://testling.com/ -typeof module !== 'undefined' && (module.exports = PUBNUB) && ready(); - -})(); diff --git a/core/3.3.1/pubnub-3.3.1.min.js b/core/3.3.1/pubnub-3.3.1.min.js deleted file mode 100644 index 62db15813..000000000 Binary files a/core/3.3.1/pubnub-3.3.1.min.js and /dev/null differ diff --git a/core/3.3.1/pubnub.as b/core/3.3.1/pubnub.as deleted file mode 100644 index a10e99855..000000000 --- a/core/3.3.1/pubnub.as +++ /dev/null @@ -1,47 +0,0 @@ -package { - import flash.external.ExternalInterface; - import flash.display.Sprite; - import flash.net.URLLoader; - import flash.net.URLRequest; - import flash.events.Event; - import flash.events.IOErrorEvent; - import flash.events.SecurityErrorEvent; - import flash.system.Security; - import flash.utils.setTimeout; - - public class pubnub extends Sprite { - - Security.allowDomain("*"); - Security.allowInsecureDomain("*"); - - ExternalInterface.addCallback( "get", function( - id:Number, - url:String - ):void { - function handler(e:Event):void { - var loader:URLLoader = URLLoader(e.target) - , data:String = loader.data - , timeout:int = 1; - - if (e.type == 'securityError') { - data = '[1,"S"]'; - timeout = 1000; - } - - setTimeout( function delayed():void { - ExternalInterface.call( "PUBNUB.rdx", id, escape(data) ); - loader.close(); - }, timeout ); - } - - var loader:URLLoader = new URLLoader(); - - loader.addEventListener( Event.COMPLETE, handler ); - loader.addEventListener( IOErrorEvent.IO_ERROR, handler ); - loader.addEventListener( - SecurityErrorEvent.SECURITY_ERROR, handler - ); - loader.load(new URLRequest(url)); - }); - } -} diff --git a/core/3.3.1/pubnub.swf b/core/3.3.1/pubnub.swf deleted file mode 100644 index 1fce400b0..000000000 Binary files a/core/3.3.1/pubnub.swf and /dev/null differ diff --git a/core/3.3.1/tests/head-test.htm b/core/3.3.1/tests/head-test.htm deleted file mode 100644 index 788c271f4..000000000 --- a/core/3.3.1/tests/head-test.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - PubNub JavaScript HEAD INIT TEST - - - - -
- -

Head Test

-
Wait here for an alert() message.
- -
-
- diff --git a/core/3.3.1/tests/head.load.min.js b/core/3.3.1/tests/head.load.min.js deleted file mode 100644 index 6242b0fad..000000000 --- a/core/3.3.1/tests/head.load.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - Head JS The only script in your - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c - - - PubNub JavaScript MailTO Fix - - -
- - -
- × -

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

-
- - - -
0
- -
- - -
- diff --git a/core/3.3.1/tests/presence-ssl.html b/core/3.3.1/tests/presence-ssl.html deleted file mode 100644 index d76811bee..000000000 --- a/core/3.3.1/tests/presence-ssl.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - PubNub Presence SSL Test - - - - - - - -
- Open the - Developers Console - and watch the presence events section to ensure join/leave. -
- - - - -
- - - - - diff --git a/core/3.3.1/tests/ssl-test.html b/core/3.3.1/tests/ssl-test.html deleted file mode 100644 index 7f667bdf8..000000000 --- a/core/3.3.1/tests/ssl-test.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -
- -
- - - - - - diff --git a/core/3.3.1/tests/test.js b/core/3.3.1/tests/test.js deleted file mode 100644 index fae2f42cf..000000000 --- a/core/3.3.1/tests/test.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('testling'); -var PUBNUB = require('../pubnub-3.3.1'); -var channel = 'unit-test-pubnub-channel'; - -test('PUBNUB JavaScript API', function (test) { - var pubnub = PUBNUB.init({ - publish_key : 'demo', - subscribe_key : 'demo' - }); - - test.plan(14); - - test.ok(PUBNUB); - - test.ok(pubnub); - test.ok(pubnub.publish); - test.ok(pubnub.subscribe); - test.ok(pubnub.history); - test.ok(pubnub.detailedHistory); - test.ok(pubnub.time); - - function publish_test() { - pubnub.publish({ - channel : channel, - message : { test : "test" }, - callback : function(response) { - test.ok(response[0]); - test.equal( response[1], 'Sent' ); - } - }); - } - - function time_test() { - pubnub.time(function(time){ - test.ok(time); - uuid_test(); - }); - } - - function uuid_test() { - pubnub.uuid(function(uuid){ - test.ok(uuid); - history_test(); - }); - } - - function history_test(history) { - pubnub.history({ - limit : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0].test, "test" ); - test.end(); - } - }); - } - - function detailedHistory_test(history) { - pubnub.detailedHistory({ - count : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0][0].test, "test" ); - test.end(); - } - }); - } - pubnub.subscribe({ - channel : channel, - connect : publish_test, - callback : function(message) { - test.ok(message); - test.equal( message.test, "test" ); - time_test(); - } - }); - -}); - diff --git a/core/3.3.1/tests/test.sh b/core/3.3.1/tests/test.sh deleted file mode 100755 index e190f006c..000000000 --- a/core/3.3.1/tests/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -## ------------------------------------------------ -## PubNub 3.3.1 Real-time Cloud Push API - JAVASCRIPT -## ------------------------------------------------ - -## ---------------------------------------------------- -## -## TESTLING - PubNub JavaScript API for Web Browsers -## uses Testling Cloud Service -## for QA and Deployment. -## -## http://www.testling.com/ -## You need this to run './test.sh' unit test. -## -## ---------------------------------------------------- - -if [ -z "$1" ] -then - echo -e "\n\tUSER:PASSWD Required: http://testling.com/\n" - exit -fi - -browsers='firefox/3.6' -browsers=$browsers',firefox/9.0' -browsers=$browsers',firefox/10.0' -browsers=$browsers',chrome/16.0' -browsers=$browsers',chrome/17.0' -browsers=$browsers',iexplore/7.0' -browsers=$browsers',iexplore/8.0' -browsers=$browsers',iexplore/9.0' -browsers=$browsers',safari/5.1' - -echo -e "Testing: $browsers" - -noinstrument='pubnub-3.3.1.js,test.js' - -tar -cf- test.js ../pubnub-3.3.1.js | \ - curl -u $1 -sSNT- \ - "testling.com/?noinstrument=$noinstrument&browsers=$browsers" - diff --git a/core/3.3/README.md b/core/3.3/README.md deleted file mode 100644 index 4d7930b5a..000000000 --- a/core/3.3/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API. -http://www.pubnub.com/account - -## TESTLING - (OPTIONAL) -PubNub JavaScript API for Web Browsers -uses Testling Cloud Service for QA and Deployment. -http://www.testling.com/ - -You need this to run './test.sh' unit test. -This is completely optional, however we love Testling. - - -## PubNub 3.3 Real-time Cloud Push API - JAVASCRIPT -http://www.pubnub.com - PubNub Real-time Push Service in the Cloud. -http://www.pubnub.com/tutorial/javascript-push-api - -PubNub is a blazingly fast cloud-hosted messaging service for building -real-time web and mobile apps. Hundreds of apps and thousands of developers -rely on PubNub for delivering human-perceptive real-time -experiences that scale to millions of users worldwide. PubNub delivers -the infrastructure needed to build amazing MMO games, social apps, -business collaborative solutions, and more. - -## SIMPLE EXAMPLE -```html -
- - -``` - -## ADVANCED STYLE -```html -
- - -``` - -## SSL MODE - -```html -
- - -``` - -## Using the PUBNUB init() Function - -Sometimes you want to use create a PubNub Instance directly in JavaScript -and pass the PubNub API Keys without using a DOM element. -To do this, simply follow this `init` example: - -```html - - -``` - diff --git a/core/3.3/comet.swf b/core/3.3/comet.swf deleted file mode 100644 index 1209542d3..000000000 Binary files a/core/3.3/comet.swf and /dev/null differ diff --git a/core/3.3/crossdomain.xml b/core/3.3/crossdomain.xml deleted file mode 100644 index 8fb3c5227..000000000 --- a/core/3.3/crossdomain.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/core/3.3/examples/detailed_history/index.html b/core/3.3/examples/detailed_history/index.html deleted file mode 100644 index acd8a99e4..000000000 --- a/core/3.3/examples/detailed_history/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - PubNub Detailed History Demo - - - - - - - - - - - - - - -
- -
- - - - - - - - Reverse ? - -
- - -
- - - - - - - diff --git a/core/3.3/examples/detailed_history/js/jquery.example.min.js b/core/3.3/examples/detailed_history/js/jquery.example.min.js deleted file mode 100755 index 5fc57814d..000000000 --- a/core/3.3/examples/detailed_history/js/jquery.example.min.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * jQuery Form Example Plugin 1.6.0 - * Populate form inputs with example text that disappears on focus. - * - * e.g. - * $('input#name').example('Bob Smith'); - * $('input[@title]').example(function () { - * return $(this).attr('title'); - * }); - * $('textarea#message').example('Type your message here', { - * className: 'example_text' - * }); - * - * Copyright (c) Paul Mucur (http://mudge.name), 2007-2012. - * Dual-licensed under the BSD (BSD-LICENSE.txt) and GPL (GPL-LICENSE.txt) - * licenses. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */(function(a){"use strict";var b;a.fn.on?b=function(b,c,d){a("body").on(c,b,d)}:a.fn.delegate?b=function(b,c,d){a("body").delegate(b,c,d)}:a.fn.live?b=function(b,c,d){a(b).live(c,d)}:b=function(b,c,d){a(b).bind(c,d)},a.fn.example=function(c,d){var e=a.isFunction(c),f=a.extend({},d,{example:c});return this.each(function(){var c,d=a(this);a.metadata?c=a.extend({},a.fn.example.defaults,d.metadata(),f):c=a.extend({},a.fn.example.defaults,f),a.fn.example.boundClassNames[c.className]||(a(window).bind("unload.example",function(){a("."+c.className).val("").removeClass(c.className)}),b("form","submit.example example:resetForm",function(){a(this).find("."+c.className).val("").removeClass(c.className)}),a.fn.example.boundClassNames[c.className]=!0),d.val()!==this.defaultValue&&(e||d.val()===c.example)&&d.val(this.defaultValue),d.val()===""&&!d.is(":focus")&&d.addClass(c.className).val(e?c.example.call(this):c.example),d.bind("focus.example",function(){a(this).is("."+c.className)&&a(this).val("").removeClass(c.className)}).bind("change.example",function(){a(this).is("."+c.className)&&a(this).removeClass(c.className)}).bind("blur.example",function(){a(this).val()===""&&a(this).addClass(c.className).val(e?c.example.call(this):c.example)})})},a.fn.example.defaults={className:"example"},a.fn.example.boundClassNames=[]})(jQuery); diff --git a/core/3.3/examples/presence/index.html b/core/3.3/examples/presence/index.html deleted file mode 100644 index 22f971ec3..000000000 --- a/core/3.3/examples/presence/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - PubNub Presence Demo - - - - - - - - - - - - - - -
- -

Currently Here

-
    -
-
- - - 0 people here now -
- - -
- - - - - - - - diff --git a/core/3.3/examples/presence/js/jquery.example.min.js b/core/3.3/examples/presence/js/jquery.example.min.js deleted file mode 100755 index 5fc57814d..000000000 --- a/core/3.3/examples/presence/js/jquery.example.min.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * jQuery Form Example Plugin 1.6.0 - * Populate form inputs with example text that disappears on focus. - * - * e.g. - * $('input#name').example('Bob Smith'); - * $('input[@title]').example(function () { - * return $(this).attr('title'); - * }); - * $('textarea#message').example('Type your message here', { - * className: 'example_text' - * }); - * - * Copyright (c) Paul Mucur (http://mudge.name), 2007-2012. - * Dual-licensed under the BSD (BSD-LICENSE.txt) and GPL (GPL-LICENSE.txt) - * licenses. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */(function(a){"use strict";var b;a.fn.on?b=function(b,c,d){a("body").on(c,b,d)}:a.fn.delegate?b=function(b,c,d){a("body").delegate(b,c,d)}:a.fn.live?b=function(b,c,d){a(b).live(c,d)}:b=function(b,c,d){a(b).bind(c,d)},a.fn.example=function(c,d){var e=a.isFunction(c),f=a.extend({},d,{example:c});return this.each(function(){var c,d=a(this);a.metadata?c=a.extend({},a.fn.example.defaults,d.metadata(),f):c=a.extend({},a.fn.example.defaults,f),a.fn.example.boundClassNames[c.className]||(a(window).bind("unload.example",function(){a("."+c.className).val("").removeClass(c.className)}),b("form","submit.example example:resetForm",function(){a(this).find("."+c.className).val("").removeClass(c.className)}),a.fn.example.boundClassNames[c.className]=!0),d.val()!==this.defaultValue&&(e||d.val()===c.example)&&d.val(this.defaultValue),d.val()===""&&!d.is(":focus")&&d.addClass(c.className).val(e?c.example.call(this):c.example),d.bind("focus.example",function(){a(this).is("."+c.className)&&a(this).val("").removeClass(c.className)}).bind("change.example",function(){a(this).is("."+c.className)&&a(this).removeClass(c.className)}).bind("blur.example",function(){a(this).val()===""&&a(this).addClass(c.className).val(e?c.example.call(this):c.example)})})},a.fn.example.defaults={className:"example"},a.fn.example.boundClassNames=[]})(jQuery); diff --git a/core/3.3/examples/simple-chat.js b/core/3.3/examples/simple-chat.js deleted file mode 100644 index 5b0192ba1..000000000 --- a/core/3.3/examples/simple-chat.js +++ /dev/null @@ -1,119 +0,0 @@ -(function(){ - -/* - PubNub Real Time Push APIs and Notifications Framework - Copyright (c) 2010 Stephen Blum - http://www.google.com/profiles/blum.stephen - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -/* - - - - - -
Loading Simple Chat
- -*/ -var P = PUBNUB -, chat = { - init : function( node_name ) { - var node = P.$(node_name); - - chat.node_name = node_name; - - // Create Nodes - chat.textbox = P.create('input'); - chat.chatbox = P.create('div'); - chat.button = P.create('button'); - - // Button Text - chat.button.innerHTML = 'Send'; - - // Capture Channel - var channel = P.attr( node, 'channel' ); - - // Add Styles - P.attr( chat.chatbox, 'id', 'simple-chat-chatbox' ); - P.attr( chat.textbox, 'id', 'simple-chat-textbox' ); - P.attr( chat.button, 'id', 'simple-chat-button' ); - - // Display Nodes - node.innerHTML = ''; - node.appendChild(chat.chatbox); - node.appendChild(chat.textbox); - node.appendChild(chat.button); - - // Send Sign-on Message - P.publish({ - channel : channel, - message : 'Someone Joined the Chat.' - }); - - function send(e) { - var key = e.keyCode || e.charCode || 0 - , message = chat.textbox.value; - - // Wait for Enter Key - if (key != 13 && e.type == 'keydown' || !message) return true; - - // Reset Value - chat.textbox.value = ''; - - // Send Message - P.publish({ - channel : node_name, - message : message - }); - } - - // Bind Events - P.bind( 'keydown', chat.textbox, send ); - P.bind( 'blur', chat.textbox, send ); - - // Register Listener - P.subscribe({ channel : node_name }, chat.subscribe ); - }, - - subscribe : function(message) { - var br = '
'; - chat.chatbox.innerHTML = message + br + chat.chatbox.innerHTML; - } - -}; - -// Startup Simple Chat -chat.init('simple-chat'); - -})() diff --git a/core/3.3/modules/player.js b/core/3.3/modules/player.js deleted file mode 100644 index 4529496a4..000000000 --- a/core/3.3/modules/player.js +++ /dev/null @@ -1,54 +0,0 @@ -(function(){ - -var PUB = PUBNUB - -/* -------- - Provide a Player Creation/Management Interface. - -------- */ - -, players = (function(){ - var players_obj = {}; - return { - add : function(player) { - players_obj[player['uuid']] = player; - return player; - }, - get : function(uuid) { - return players_obj[uuid]; - }, - all : function() { - return players_obj; - } - }; -})(); - -/* -------- - Capture Current User's Information. - -------- */ - -function current_player(ready) { - function is_ready() { - if (player['uuid'] && player['joined']) { - players.add(player); - ready(player) - } - } - - var player = { - 'uuid' : PUB.uuid(function(uuid){ - player['uuid'] = uuid; - is_ready(); - }), - 'joined' : PUB.time(function(time){ - player['joined'] = time; - is_ready(); - }) - }; -} - -PUB['player'] = { - 'players' : players, - 'current_player' : current_player -}; - -})(); diff --git a/core/3.3/modules/player.min.js b/core/3.3/modules/player.min.js deleted file mode 100644 index 7f4bbd54e..000000000 --- a/core/3.3/modules/player.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var d=PUBNUB,f=function(){var c={};return{add:function(a){return c[a.uuid]=a},a:function(a){return c[a]},all:function(){return c}}}();d.player={players:f,current_player:function(c){function a(){if(b.uuid&&b.joined){f.add(b);c(b)}}var b={uuid:d.c(function(e){b.uuid=e;a()}),joined:d.b(function(e){b.joined=e;a()})}}}})(); diff --git a/core/3.3/modules/sprite.js b/core/3.3/modules/sprite.js deleted file mode 100644 index bb8b60caa..000000000 --- a/core/3.3/modules/sprite.js +++ /dev/null @@ -1,216 +0,0 @@ -(function(){ - - -var PUB = PUBNUB -, bind = PUB.bind -, css = PUB.css -, each = PUB.each -, utility = PUB.utility -, now = utility.now -, ground = PUB.search('body')[0]; - -function painter(node) { - ground = node; -} - -function create(sprite) { - sprite.intervals = { - animate : 0, - move : {} - }; - - sprite.cell.size = Math.floor(sprite.image.width / sprite.cell.count); - sprite.node = PUB.create('div'); - sprite.opacity = sprite.opacity || 1.0; - - css( sprite.node, { - opacity : sprite.opacity, - position : 'absolute', - top : sprite.top, - left : sprite.left, - width : sprite.cell.size, - height : sprite.image.height, - backgroundRepeat : 'no-repeat', - backgroundImage : 'url(' + sprite.image.url + ')' - } ); - - setframe( sprite, 0 ); - append(sprite.node); - - return sprite; -} - -function append(node) { - ground.appendChild(node); -} - -function setframe( sprite, cell, offset ) { - var offset = offset || {}; - if (typeof offset.top == 'number') - sprite.image.offset.top = offset.top; - if (typeof offset.left == 'number') - sprite.image.offset.left = offset.left; - - css( sprite.node, { - backgroundPosition : '-' + - (sprite.cell.size * cell + sprite.image.offset.left) + - 'px -' + sprite.image.offset.top + 'px' - } ); -} - -/** - * sprite.animate( [[frame, duration], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[0, .2], [1, .4], [2, .5]] ) - */ -function animate( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_animate(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Multi format compatibility ([frame, delay]) or (frame) - var frame = pattern[position][0] || pattern[position] - , delay = pattern[position][1] || .1; - - sprite.intervals.animate = setTimeout( function() { - // Update Current Frame - setframe( sprite, frame ); - - // Next Frame - animate( sprite, pattern, loop, callback, position + 1 ); - }, delay * 1000 ); -} - - -/** - * Move and Animate Combined!!! - * - * sprite.animate( [ [left, top, duration, [animate] ], []...] ) - * sprite.animate( [[], [], []] ) - * sprite.animate( [[10, 10, .2, [ANIMATEPARAMS], loopanimate ], ... ) - * sprite.animate( [[10, 10, .2, [[frame,dur], ...], loopanimate ], ... ) - */ -function movie( sprite, pattern, loop, callback, position ) { - // Clear Any Other Animation - if (!position) { - position = 0; - stop_all(sprite); - } - - // if last frame, and no loop, then leave, else restart - if (position === pattern.length) { - if (loop === 0) return callback && callback(); - else { - loop--; - position = 0; - } - } - - // Update Animator - if (pattern[position][2]) animate( - sprite, - pattern[position][2], - pattern[position][3] || 0 - ); - - // [{top:0,opacity:.5}, 500, 0, 0], - // Update Mover - move( - sprite, - pattern[position][0], - pattern[position][1], - function() { - movie( sprite, pattern, loop, callback, position + 1 ); - } - ); -} - -/** - * move sprite from one place to another. - */ -function move( sprite, properties, duration, callback ) { - var start_time = now(); - - stop_all(sprite); - - each( properties, function( property, value ) { - var current_time = start_time - , end_time = start_time + duration - , start_prop = sprite[property] || 0 - , distance = value - start_prop - , update = {} - , ikey = property + value; - - stop_move( sprite, ikey ); - sprite.intervals.move[ikey] = setInterval( function() { - current_time = now(); - - sprite[property] = ( - end_time <= current_time - ? value - : ( distance * (current_time - start_time) - / duration + start_prop ) - ); - - update[property] = sprite[property]; - css( sprite.node, update ); - - if ( end_time <= current_time && sprite.intervals.move ) { - stop_move( sprite, ikey ); - callback && callback(); - } - - }, Math.ceil(1000 / sprite.framerate) ); - } ); -} - -/** - * Stop movie - */ -function stop_all(sprite) { - clearTimeout(sprite.intervals.animate); - each( sprite.intervals.move, function( ikey ) { - clearInterval(sprite.intervals.move[ikey]); - } ); -} - -/** - * Stop move. - */ -function stop_move( sprite, ikey ) { - clearInterval(sprite.intervals.move[ikey]); -} - -/** - * Stop animate. - */ -function stop_animate(sprite) { - clearTimeout(sprite.intervals.animate); -} - -// Expose Global 'sprite' to PUBNUB -PUB['sprite'] = { - 'painter' : painter, - 'create' : create, - 'setframe' : setframe, - 'animate' : animate, - 'move' : move, - 'movie' : movie, - 'stop_all' : stop_all, - 'stop_move' : stop_move, - 'stop_animate' : stop_animate -}; - - -})(); diff --git a/core/3.3/modules/sprite.min.js b/core/3.3/modules/sprite.min.js deleted file mode 100644 index 95d7895e4..000000000 --- a/core/3.3/modules/sprite.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function i(a,c,d){d=d||{};if(typeof d.top=="number")a.b.f.top=d.top;if(typeof d.left=="number")a.b.f.left=d.left;j(a.c,{backgroundPosition:"-"+(a.e.size*c+a.b.f.left)+"px -"+a.b.f.top+"px"})}function k(a,c,d,e,b){if(!b){b=0;p(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}var f=c[b][0]||c[b];a.a.d=setTimeout(function(){i(a,f);k(a,c,d,e,b+1)},(c[b][1]||0.1)*1E3)}function q(a,c,d,e,b){if(!b){b=0;l(a)}if(b===c.length)if(d===0)return e&&e();else{d--;b=0}if(c[b][2])k(a,c[b][2],c[b][3]|| -0);r(a,c[b][0],c[b][1],function(){q(a,c,d,e,b+1)})}function r(a,c,d,e){var b=s();l(a);t(c,function(f,m){var h=b,u=b+d,v=a[f]||0,y=m-v,w={},n=f+m;o(a,n);a.a.move[n]=setInterval(function(){h=s();a[f]=u<=h?m:y*(h-b)/d+v;w[f]=a[f];j(a.c,w);if(u<=h&&a.a.move){o(a,n);e&&e()}},Math.ceil(1E3/a.j))})}function l(a){clearTimeout(a.a.d);t(a.a.move,function(c){clearInterval(a.a.move[c])})}function o(a,c){clearInterval(a.a.move[c])}function p(a){clearTimeout(a.a.d)}var g=PUBNUB,j=g.h,t=g.i,s=g.k.now,x=g.search("body")[0]; -g.sprite={painter:function(a){x=a},create:function(a){a.a={d:0,move:{}};a.e.size=Math.floor(a.b.width/a.e.g);a.c=g.create("div");a.opacity=a.opacity||1;j(a.c,{opacity:a.opacity,position:"absolute",top:a.top,left:a.left,width:a.e.size,height:a.b.height,backgroundRepeat:"no-repeat",backgroundImage:"url("+a.b.url+")"});i(a,0);x.appendChild(a.c);return a},setframe:i,animate:k,move:r,movie:q,stop_all:l,stop_move:o,stop_animate:p}})(); diff --git a/core/3.3/modules/utility.js b/core/3.3/modules/utility.js deleted file mode 100644 index 81dc95abf..000000000 --- a/core/3.3/modules/utility.js +++ /dev/null @@ -1,121 +0,0 @@ -(function(){ - -/* ======================================================================== */ -/* ================================ UTILITY =============================== */ -/* ======================================================================== */ - -var db = this['localStorage'] -, PUB = PUBNUB -, now = function(){return+new Date} -, cookie = { - get : function(key) { - if (db) return db.getItem(key); - if ((document.cookie||'').indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - }, - set : function( key, value ) { - if (db) return db.setItem( key, value ); - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } -}; - -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - var right_now = now(); - - if (last + rate > right_now) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = now(); - fun(); - } - }; - - // Provide Rate Limited Function Call - return runnit; -} - -function mouse(e) { - if (!e) return [[0,0]]; - - var tch = e.touches && e.touches[0] - , mpos = []; - - if (tch) { - PUB.each( e.touches, function(touch) { - mpos.push([ touch.pageX, touch.pageY ]); - } ); - } - else if (e.pageX) { - mpos.push([ e.pageX, e.pageY ]); - } - else {try{ - mpos.push([ - e.clientX + body.scrollLeft + doc.scrollLeft, - e.clientY + body.scrollTop + doc.scrollTop - ]); - }catch(e){}} - - return mpos; -} - - -/** - * OFFSET - * ====== - * offset( search('div')[0], 'Width' ); - * offset( search('div')[0], 'Height' ); - * offset( search('div')[0], 'Top' ); - * offset( search('div')[0], 'Left' ); - */ -function offset( node, what ) { - var pos = 0 - , what = what || 'Top'; - - while (node) { - pos += node['offset'+what]; - node = node.offsetParent; - } - - return pos -} - -/** - * WINFO - * ===== - * var window_info = winfot(); - * log(window_info.height); - */ -function winfo() { - return { - height : this.innerHeight || - document.documentElement.clientHeight || - document.body.clientHeight, - scrollTop : document.documentElement.scrollTop || - document.body.scrollTop, - size : offset(search('body')[0], 'Height') - } -} - - - - -// Expose Utility to PUBNUB. -PUB['utility'] = { - 'mouse' : mouse, - 'winfo' : winfo, - 'offset' : offset, - 'now' : now, - 'cookie' : cookie, - 'updater' : updater -}; - - -})(); diff --git a/core/3.3/modules/utility.min.js b/core/3.3/modules/utility.min.js deleted file mode 100644 index 93cedae42..000000000 --- a/core/3.3/modules/utility.min.js +++ /dev/null @@ -1,3 +0,0 @@ -(function(){function g(a,b){var c=0;for(b=b||"Top";a;){c+=a["offset"+b];a=a.offsetParent}return c}var e=this.localStorage,h=PUBNUB;function f(){return+new Date}h.utility={mouse:function(a){if(!a)return[[0,0]];var b=[];if(a.touches&&a.touches[0])h.a(a.touches,function(d){b.push([d.pageX,d.pageY])});else if(a.pageX)b.push([a.pageX,a.pageY]);else try{b.push([a.clientX+body.scrollLeft+doc.scrollLeft,a.clientY+body.scrollTop+doc.scrollTop])}catch(c){}return b},winfo:function(){return{height:this.innerHeight|| -document.documentElement.clientHeight||document.body.clientHeight,scrollTop:document.documentElement.scrollTop||document.body.scrollTop,size:g(search("body")[0],"Height")}},offset:g,now:f,cookie:{b:function(a){if(e)return e.getItem(a);if((document.cookie||"").indexOf(a)==-1)return null;return((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null},c:function(a,b){if(e)return e.setItem(a,b);document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}},updater:function(a,b){var c, -d=0;function i(){if(d+b>f()){clearTimeout(c);c=setTimeout(i,b)}else{d=f();a()}}return i}}})(); diff --git a/core/3.3/pubnub-3.3.js b/core/3.3/pubnub-3.3.js deleted file mode 100644 index fc028b93e..000000000 --- a/core/3.3/pubnub-3.3.js +++ /dev/null @@ -1,1037 +0,0 @@ -/* --------------------------------------------------------------------------- -WAIT! - This file depends on instructions from the PUBNUB Cloud. -http://www.pubnub.com/account-javascript-api-include ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 PubNub Inc. -http://www.pubnub.com/ -http://www.pubnub.com/terms ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ---------------------------------------------------------------------------- */ - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= JSON =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -(window['JSON'] && window['JSON']['stringify']) || (function () { - window['JSON'] || (window['JSON'] = {}); - - if (typeof String.prototype.toJSON !== 'function') { - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - 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, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - function quote(string) { - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(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 < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - if (typeof JSON['stringify'] !== 'function') { - JSON['stringify'] = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } else if (typeof space === 'string') { - indent = space; - } - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - return str('', {'': value}); - }; - } - - if (typeof JSON['parse'] !== 'function') { - // JSON is parsed on the server for security. - JSON['parse'] = function (text) {return eval('('+text+')')}; - } -}()); - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-======================= DOM UTIL ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -window['PUBNUB'] || (function() { - -/** - * CONSOLE COMPATIBILITY - */ -window.console||(window.console=window.console||{}); -console.log||(console.log=((window.opera||{}).postError||function(){})); - -/** - * UTILITIES - */ -function unique() { return'x'+ ++NOW+''+(+new Date) } -function rnow() { return+new Date } - -/** - * LOCAL STORAGE OR COOKIE - */ -var db = (function(){ - var ls = window['localStorage']; - return { - 'get' : function(key) { - try { - if (ls) return ls.getItem(key); - if (document.cookie.indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - } catch(e) { return } - }, - 'set' : function( key, value ) { - try { - if (ls) return ls.setItem( key, value ) && 0; - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } catch(e) { return } - } - }; -})(); - -/** - * UTIL LOCALS - */ -var NOW = 1 -, SWF = 'https://dh15atwfs066y.cloudfront.net/pubnub.swf' -, REPL = /{([\w\-]+)}/g -, ASYNC = 'async' -, URLBIT = '/' -, PARAMSBIT = '&' -, XHRTME = 310000 -, SECOND = 1000 -, PRESENCE_SUFFIX = '-pnpres' -, UA = navigator.userAgent -, XORIGN = UA.indexOf('MSIE 6') == -1; - -/** - * NEXTORIGIN - * ========== - * var next_origin = nextorigin(); - */ -var nextorigin = (function() { - var ori = Math.floor(Math.random() * 9) + 1; - return function(origin) { - return origin.indexOf('pubsub') > 0 - && origin.replace( - 'pubsub', 'ps' + (++ori < 10 ? ori : ori=1) - ) || origin; - } -})(); - -/** - * UPDATER - * ====== - * var timestamp = unique(); - */ -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - if (last + rate > rnow()) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = rnow(); - fun(); - } - }; - - return runnit; -} - -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * LOG - * === - * log('message'); - */ -function log(message) { console['log'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { console.log(item) } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - -/** - * GREP - * ==== - * var list = grep( [1,2,3], function(item) { return item % 2 } ) - */ -function grep( list, fun ) { - var fin = []; - each( list || [], function(l) { fun(l) && fin.push(l) } ); - return fin -} - -/** - * SUPPLANT - * ======== - * var text = supplant( 'Hello {name}!', { name : 'John' } ) - */ -function supplant( str, values ) { - return str.replace( REPL, function( _, match ) { - return values[match] || _ - } ); -} - -/** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * console.log( element, '1st anchor' ) - * } ); - */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); -} - -/** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); - */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; -} - -/** - * HEAD - * ==== - * head().appendChild(elm); - */ -function head() { return search('head')[0] } - -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); -} - -/** - * CSS - * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - -/** - * timeout - * ======= - * timeout( function(){}, 100 ); - */ -function timeout( fun, wait ) { - return setTimeout( fun, wait ); -} - -/** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); - */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } - -/** - * ENCODE - * ====== - * var encoded_path = encode('path'); - */ -function encode(path) { - return map( (encodeURIComponent(path)).split(''), function(chr) { - return "-_.!~*'()".indexOf(chr) < 0 ? chr : - "%"+chr.charCodeAt(0).toString(16).toUpperCase() - } ).join(''); -} - -/** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * - */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; - -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - script[ASYNC] = ASYNC; - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); - if (setup.data) { - var params = []; - script.src += "?"; - for (key in setup.data) { - params.push(key+"="+setup.data[key]); - } - script.src += params.join(PARAMSBIT); - } - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr, response - , finished = function() { - if (loaded) return; - loaded = 1; - - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = XHRTME; - - var url = setup.url.join(URLBIT); - if (setup.data) { - var params = []; - var key; - url += "?"; - for (key in setup.data) { - params.push(key+"="+setup.data[key]); - } - url += params.join(PARAMSBIT); - } - - xhr.open( 'GET', url, true ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); - } - - // Return 'done' - return done; -} - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -var PDIV = $('pubnub') || {} -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - var CHANNELS = {} - , PUBLISH_KEY = setup['publish_key'] || '' - , SUBSCRIBE_KEY = setup['subscribe_key'] || '' - , SSL = setup['ssl'] ? 's' : '' - , UUID = setup['uuid'] || db.get(SUBSCRIBE_KEY+'uuid') || '' - , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') - , SELF = { - /* - PUBNUB.history({ - channel : 'my_chat_channel', - limit : 100, - callback : function(messages) { console.log(messages) } - }); - */ - 'history' : function( args, callback ) { - var callback = args['callback'] || callback - , limit = args['limit'] || 100 - , channel = args['channel'] - , jsonp = jsonp_cb(); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - // Send Message - xdr({ - callback : jsonp, - url : [ - ORIGIN, 'history', - SUBSCRIBE_KEY, encode(channel), - jsonp, limit - ], - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - /* - PUBNUB.detailedHistory({ - channel : 'my_chat_channel', - count : 100, - callback : function(messages) { console.log(messages) } - }); - */ - 'detailedHistory' : function( args, callback ) { - var callback = args['callback'] || callback - , count = args['count'] || 100 - , channel = args['channel'] - , reverse = args['reverse'] || "false" - , start = args['start'] - , end = args['end'] - , jsonp = jsonp_cb(); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - var params = {}; - params["count"] = count; - params["reverse"] = reverse; - if (start) - params["start"] = start; - if (end) - params["end"] = end; - - // Send Message - xdr({ - callback : jsonp, - url : [ - ORIGIN, 'v2', 'history', - 'sub-key', SUBSCRIBE_KEY, 'channel', encode(channel) - ], - data : params, - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - /* - PUBNUB.time(function(time){ console.log(time) }); - */ - 'time' : function(callback) { - var jsonp = jsonp_cb(); - xdr({ - callback : jsonp, - url : [ORIGIN, 'time', jsonp], - success : function(response) { callback(response[0]) }, - fail : function() { callback(0) } - }); - }, - - /* - PUBNUB.uuid(function(uuid) { console.log(uuid) }); - */ - 'uuid' : function(callback) { - var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); - return v.toString(16); - }); - if (callback) callback(u); - return u; - }, - - /* - PUBNUB.publish({ - channel : 'my_chat_channel', - message : 'hello!' - }); - */ - 'publish' : function( args, callback ) { - var callback = callback || args['callback'] || function(){} - , message = args['message'] - , channel = args['channel'] - , jsonp = jsonp_cb() - , url; - - if (!message) return log('Missing Message'); - if (!channel) return log('Missing Channel'); - if (!PUBLISH_KEY) return log('Missing Publish Key'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - // If trying to send Object - message = JSON['stringify'](message); - - // Create URL - url = [ - ORIGIN, 'publish', - PUBLISH_KEY, SUBSCRIBE_KEY, - 0, encode(channel), - jsonp, encode(message) - ]; - - // Send Message - xdr({ - callback : jsonp, - success : function(response) { callback(response) }, - fail : function() { callback([ 0, 'Disconnected' ]) }, - url : url, - data : { uuid: UUID } - }); - }, - /* - PUBNUB.unsubscribe({ channel : 'my_chat' }); - */ - 'unsubscribe' : function(args) { - // Unsubscribe from both the Channel and the Presence Channel - _unsubscribe(args['channel']); - _unsubscribe(args['channel'] + PRESENCE_SUFFIX); - - function _unsubscribe(channel) { - // Leave if there never was a channel. - if (!(channel in CHANNELS)) return; - - // Disable Channel - CHANNELS[channel].connected = 0; - - // Abort and Remove Script - CHANNELS[channel].done && - CHANNELS[channel].done(0); - } - }, - - /* - PUBNUB.subscribe({ - channel : 'my_chat' - callback : function(message) { console.log(message) } - }); - */ - 'subscribe' : function( args, callback ) { - var channel = args['channel'] - , callback = callback || args['callback'] - , subscribe_key= args['subscribe_key'] || SUBSCRIBE_KEY - , restore = args['restore'] - , timetoken = 0 - , error = args['error'] || function(){} - , connect = args['connect'] || function(){} - , reconnect = args['reconnect'] || function(){} - , disconnect = args['disconnect'] || function(){} - , presence = args['presence'] || function(){} - , disconnected = 0 - , connected = 0 - , origin = nextorigin(ORIGIN); - - // Reduce Status Flicker - if (!READY) return READY_BUFFER.push([ args, callback, SELF ]); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - if (!(channel in CHANNELS)) CHANNELS[channel] = {}; - - // Make sure we have a Channel - if (CHANNELS[channel].connected) return log('Already Connected'); - CHANNELS[channel].connected = 1; - - // Recurse Subscribe - function _connect() { - var jsonp = jsonp_cb(); - - // Stop Connection - if (!CHANNELS[channel].connected) return; - - // Connect to PubNub Subscribe Servers - CHANNELS[channel].done = xdr({ - callback : jsonp, - url : [ - origin, 'subscribe', - subscribe_key, encode(channel), - jsonp, timetoken - ], - data : { uuid: UUID }, - fail : function() { - // Disconnect - if (!disconnected) { - disconnected = 1; - disconnect(); - } - timeout( _connect, SECOND ); - SELF['time'](function(success){ - // Reconnect - if (success && disconnected) { - disconnected = 0; - reconnect(); - } - else { - error(); - } - }); - }, - success : function(messages) { - if (!CHANNELS[channel].connected) return; - - // Connect - if (!connected) { - connected = 1; - connect(); - } - - // Reconnect - if (disconnected) { - disconnected = 0; - reconnect(); - } - - // Restore Previous Connection Point if Needed - // Also Update Timetoken - restore = db.set( - SUBSCRIBE_KEY + channel, - timetoken = restore && db.get( - subscribe_key + channel - ) || messages[1] - ); - - each( messages[0], function(msg) { - callback( msg, messages ); - } ); - - timeout( _connect, 10 ); - } - }); - } - - // Presence Subscribe - if (args['presence']) SELF.subscribe({ - channel : args['channel'] + PRESENCE_SUFFIX, - callback : presence, - restore : args['restore'] - }); - - // Begin Recursive Subscribe - _connect(); - }, - 'here_now' : function( args, callback ) { - var callback = args['callback'] || callback - , channel = args['channel'] - , jsonp = jsonp_cb() - , origin = nextorigin(ORIGIN); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - data = null; - if (jsonp != '0') { data['callback']=jsonp; } - - // Send Message - xdr({ - callback : jsonp, - url : [ - origin, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, - 'channel', encode(channel) - ], - data: data, - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'each' : each, - 'map' : map, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB - }; - - if (UUID == '') UUID = SELF.uuid(); - db.set(SUBSCRIBE_KEY+'uuid', UUID); - - return SELF; -}; - -// CREATE A PUBNUB GLOBAL OBJECT -PUBNUB = CREATE_PUBNUB({ - 'publish_key' : attr( PDIV, 'pub-key' ), - 'subscribe_key' : attr( PDIV, 'sub-key' ), - 'ssl' : attr( PDIV, 'ssl' ) == 'on', - 'origin' : attr( PDIV, 'origin' ), - 'uuid' : attr( PDIV, 'uuid' ) -}); - -// PUBNUB Flash Socket -css( PDIV, { 'position' : 'absolute', 'top' : -SECOND } ); - -if ('opera' in window || attr( PDIV, 'flash' )) PDIV['innerHTML'] = - ''; - -var pubnubs = $('pubnubs') || {}; - -// PUBNUB READY TO CONNECT -function ready() { PUBNUB['time'](rnow); -PUBNUB['time'](function(t){ timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(sub) { - sub[2]['subscribe']( sub[0], sub[1] ) - } ); -}, SECOND ); }); } - -// Bind for PUBNUB Readiness to Subscribe -bind( 'load', window, function(){ timeout( ready, 0 ) } ); - -// Create Interface for Opera Flash -PUBNUB['rdx'] = function( id, data ) { - if (!data) return FDomainRequest[id]['onerror'](); - FDomainRequest[id]['responseText'] = unescape(data); - FDomainRequest[id]['onload'](); -}; - -function FDomainRequest() { - if (!pubnubs['get']) return 0; - - var fdomainrequest = { - 'id' : FDomainRequest['id']++, - 'send' : function() {}, - 'abort' : function() { fdomainrequest['id'] = {} }, - 'open' : function( method, url ) { - FDomainRequest[fdomainrequest['id']] = fdomainrequest; - pubnubs['get']( fdomainrequest['id'], url ); - } - }; - - return fdomainrequest; -} -FDomainRequest['id'] = SECOND; - -// jQuery Interface -window['jQuery'] && (window['jQuery']['PUBNUB'] = PUBNUB); - -// For Testling.js - http://testling.com/ -typeof module !== 'undefined' && (module.exports = PUBNUB) && ready(); - -})(); diff --git a/core/3.3/pubnub-3.3.min.js b/core/3.3/pubnub-3.3.min.js deleted file mode 100644 index f004c32eb..000000000 --- a/core/3.3/pubnub-3.3.min.js +++ /dev/null @@ -1,19 +0,0 @@ -window.JSON&&window.JSON.stringify||function(){function u(c){w.lastIndex=0;return w.test(c)?'"'+c.replace(w,function(c){var d=D[c];return"string"===typeof d?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function q(r,p){var d,g,j,m,t=i,l,e=p[r];e&&("object"===typeof e&&"function"===typeof e.toJSON)&&(e=e.toJSON(r));"function"===typeof k&&(e=k.call(p,r,e));switch(typeof e){case "string":return u(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e); -case "object":if(!e)return"null";i+=c;l=[];if("[object Array]"===Object.prototype.toString.apply(e)){m=e.length;for(d=0;dq()?(clearTimeout(h),h=setTimeout(c,b)):(s=q(),a())};return c}function i(a){return document.getElementById(a)}function c(a){console.log(a)}function D(a,b){var h=[];k(a.split(/\s+/),function(a){k((b||document).getElementsByTagName(a),function(a){h.push(a)})});return h}function k(a,b){if(a&&b)if("undefined"!=typeof a[0])for(var h=0,c=a.length;h"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")} -function v(a){if(G||n()){a:{var b,c,e=function(){if(!l){l=1;clearTimeout(k);try{c=JSON.parse(b.responseText)}catch(a){return z(1)}X(c)}},d=0,l=0,k=setTimeout(function(){z(1)},H),p=a.fail||function(){},X=a.success||function(){},z=function(a){d||(d=1,clearTimeout(k),b&&(b.onerror=b.onload=null,b.abort&&b.abort(),b=null),a&&p())};try{b=n()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){z(1)};b.onload=b.onloadend=e;b.timeout=H;url=a.url.join(M);if(a.data){e= -[];url+="?";for(key in a.data)e.push(key+"="+a.data[key]);url+=e.join(N)}b.open("GET",url,!0);b.send()}catch(O){z(0);G=0;a=v(a);break a}a=z}return a}var f=t("script"),e=a.callback,P=u(),Q=0,q=setTimeout(function(){E(1)},H),r=a.fail||function(){},Y=a.success||function(){},E=function(a,b){Q||(Q=1,a||Y(b),f.onerror=null,clearTimeout(q),setTimeout(function(){a&&r();var b=i(P),c=b&&b.parentNode;c&&c.removeChild(b)},B))};window[e]=function(a){E(0,a)};f[R]=R;f.onerror=function(){E(1)};f.src=a.url.join(M); -if(a.data){e=[];f.src+="?";for(key in a.data)e.push(key+"="+a.data[key]);f.src+=e.join(N)}j(f,"id",P);g().appendChild(f);return E}function I(){PUBNUB.time(q);PUBNUB.time(function(){setTimeout(function(){J||(J=1,k(S,function(a){a[2].subscribe(a[0],a[1])}))},B)})}function n(){if(!T.get)return 0;var a={id:n.id++,send:function(){},abort:function(){a.id={}},open:function(b,c){n[a.id]=a;T.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera|| -{}).postError||function(){});var y,F=window.localStorage;y={get:function(a){try{return F?F.getItem(a):-1==document.cookie.indexOf(a)?null:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null}catch(b){}},set:function(a,b){try{if(F)return F.setItem(a,b)&&0;document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(c){}}};var V=1,W=/{([\w\-]+)}/g,R="async",M="/",N="&",H=31E4,B=1E3,G=-1==navigator.userAgent.indexOf("MSIE 6"),K,L=Math.floor(9*Math.random())+1;K=function(a){return 0< -a.indexOf("pubsub")&&a.replace("pubsub","ps"+(10>++L?L:L=1))||a};var C={list:{},unbind:function(a){C.list[a]=[]},bind:function(a,b){(C.list[a]=C.list[a]||[]).push(b)},fire:function(a,b){k(C.list[a]||[],function(a){a(b)})}},o=i("pubnub")||{},J=0,S=[],U=function(a){var b={},h=a.publish_key||"",s=a.subscribe_key||"",n=a.ssl?"s":"",o=a.uuid||y.get(s+"uuid")||"",x="http"+n+"://"+(a.origin||"pubsub.pubnub.com"),A={history:function(a,b){var b=a.callback||b,O=a.limit||100,f=a.channel,d=l();if(!f)return c("Missing Channel"); -if(!b)return c("Missing Callback");v({callback:d,url:[x,"history",s,e(f),d,O],success:function(a){b(a)},fail:function(a){c(a)}})},detailedHistory:function(a,b){var b=a.callback||b,d=a.count||100,f=a.channel,h=a.reverse||"false",i=a.start,k=a.end,j=l();if(!f)return c("Missing Channel");if(!b)return c("Missing Callback");var g={};g.count=d;g.reverse=h;i&&(g.start=i);k&&(g.end=k);v({callback:j,url:[x,"v2","history","sub-key",s,"channel",e(f)],data:g,success:function(a){b(a)},fail:function(a){c(a)}})}, -time:function(a){var b=l();v({callback:b,url:[x,"time",b],success:function(b){a(b[0])},fail:function(){a(0)}})},uuid:function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)});a&&a(b);return b},publish:function(a,b){var b=b||a.callback||function(){},d=a.message,f=a.channel,g=l();if(!d)return c("Missing Message");if(!f)return c("Missing Channel");if(!h)return c("Missing Publish Key");d=JSON.stringify(d);d=[x,"publish", -h,s,0,e(f),g,e(d)];v({callback:g,success:function(a){b(a)},fail:function(){b([0,"Disconnected"])},url:d,data:{uuid:o}})},unsubscribe:function(a){function c(a){a in b&&(b[a].connected=0,b[a].done&&b[a].done(0))}c(a.channel);c(a.channel+"-pnpres")},subscribe:function(a,d){function g(){var a=l();b[f].connected&&(b[f].done=v({callback:a,url:[w,"subscribe",h,e(f),a,j],data:{uuid:o},fail:function(){m||(m=1,r());setTimeout(g,B);A.time(function(a){if(a&&m){m=0;n()}else p()})},success:function(a){b[f].connected&& -(t||(t=1,q()),m&&(m=0,n()),i=y.set(s+f,j=i&&y.get(h+f)||a[1]),k(a[0],function(b){d(b,a)}),setTimeout(g,10))}}))}var f=a.channel,d=d||a.callback,h=a.subscribe_key||s,i=a.restore,j=0,p=a.error||function(){},q=a.connect||function(){},n=a.reconnect||function(){},r=a.disconnect||function(){},u=a.presence||function(){},m=0,t=0,w=K(x);if(!J)return S.push([a,d,A]);if(!f)return c("Missing Channel");if(!d)return c("Missing Callback");if(!s)return c("Missing Subscribe Key");f in b||(b[f]={});if(b[f].connected)return c("Already Connected"); -b[f].connected=1;a.presence&&A.subscribe({channel:a.channel+"-pnpres",callback:u,restore:a.restore});g()},here_now:function(a,b){var b=a.callback||b,d=a.channel,f=l(),g=K(x);if(!d)return c("Missing Channel");if(!b)return c("Missing Callback");data=null;"0"!=f&&(data.callback=f);v({callback:f,url:[g,"v2","presence","sub_key",s,"channel",e(d)],data:data,success:function(a){b(a)},fail:function(a){c(a)}})},xdr:v,ready:I,db:y,each:k,map:r,css:m,$:i,create:t,bind:d,supplant:p,head:g,search:D,attr:j,now:q, -unique:u,events:C,updater:w,init:U};""==o&&(o=A.uuid());y.set(s+"uuid",o);return A};PUBNUB=U({publish_key:j(o,"pub-key"),subscribe_key:j(o,"sub-key"),ssl:"on"==j(o,"ssl"),origin:j(o,"origin"),uuid:j(o,"uuid")});m(o,{position:"absolute",top:-B});if("opera"in window||j(o,"flash"))o.innerHTML="";var T=i("pubnubs")|| -{};d("load",window,function(){setTimeout(I,0)});PUBNUB.rdx=function(a,b){if(!b)return n[a].onerror();n[a].responseText=unescape(b);n[a].onload()};n.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&I()}(); diff --git a/core/3.3/pubnub.as b/core/3.3/pubnub.as deleted file mode 100644 index a10e99855..000000000 --- a/core/3.3/pubnub.as +++ /dev/null @@ -1,47 +0,0 @@ -package { - import flash.external.ExternalInterface; - import flash.display.Sprite; - import flash.net.URLLoader; - import flash.net.URLRequest; - import flash.events.Event; - import flash.events.IOErrorEvent; - import flash.events.SecurityErrorEvent; - import flash.system.Security; - import flash.utils.setTimeout; - - public class pubnub extends Sprite { - - Security.allowDomain("*"); - Security.allowInsecureDomain("*"); - - ExternalInterface.addCallback( "get", function( - id:Number, - url:String - ):void { - function handler(e:Event):void { - var loader:URLLoader = URLLoader(e.target) - , data:String = loader.data - , timeout:int = 1; - - if (e.type == 'securityError') { - data = '[1,"S"]'; - timeout = 1000; - } - - setTimeout( function delayed():void { - ExternalInterface.call( "PUBNUB.rdx", id, escape(data) ); - loader.close(); - }, timeout ); - } - - var loader:URLLoader = new URLLoader(); - - loader.addEventListener( Event.COMPLETE, handler ); - loader.addEventListener( IOErrorEvent.IO_ERROR, handler ); - loader.addEventListener( - SecurityErrorEvent.SECURITY_ERROR, handler - ); - loader.load(new URLRequest(url)); - }); - } -} diff --git a/core/3.3/pubnub.swf b/core/3.3/pubnub.swf deleted file mode 100644 index 1fce400b0..000000000 Binary files a/core/3.3/pubnub.swf and /dev/null differ diff --git a/core/3.3/tests/head-test.htm b/core/3.3/tests/head-test.htm deleted file mode 100644 index a8371bd47..000000000 --- a/core/3.3/tests/head-test.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - PubNub JavaScript HEAD INIT TEST - - - - -
- -

Head Test

-
Wait here for an alert() message.
- -
-
- diff --git a/core/3.3/tests/head.load.min.js b/core/3.3/tests/head.load.min.js deleted file mode 100644 index 6242b0fad..000000000 --- a/core/3.3/tests/head.load.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - Head JS The only script in your - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c - - - PubNub JavaScript MailTO Fix - - -
- - -
- × -

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

-
- - - -
0
- -
- - -
- diff --git a/core/3.3/tests/presence-ssl.html b/core/3.3/tests/presence-ssl.html deleted file mode 100644 index b9461c9df..000000000 --- a/core/3.3/tests/presence-ssl.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - PubNub Presence SSL Test - - - - - - - -
- Open the - Developers Console - and watch the presence events section to ensure join/leave. -
- - - - -
- - - - - diff --git a/core/3.3/tests/ssl-test.html b/core/3.3/tests/ssl-test.html deleted file mode 100644 index 196cfd2bd..000000000 --- a/core/3.3/tests/ssl-test.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -
- -
- - - - - - diff --git a/core/3.3/tests/test.js b/core/3.3/tests/test.js deleted file mode 100644 index d0f13de44..000000000 --- a/core/3.3/tests/test.js +++ /dev/null @@ -1,79 +0,0 @@ -var test = require('testling'); -var channel = 'unit-test-pubnub-channel'; - -test('PUBNUB JavaScript API', function (test) { - var pubnub = PUBNUB.init({ - publish_key : 'demo', - subscribe_key : 'demo' - }); - - test.plan(15); - - test.ok(PUBNUB); - - test.ok(pubnub); - test.ok(pubnub.publish); - test.ok(pubnub.subscribe); - test.ok(pubnub.history); - test.ok(pubnub.detailedHistory); - test.ok(pubnub.time); - - function publish_test() { - pubnub.publish({ - channel : channel, - message : { test : "test" }, - callback : function(response) { - test.ok(response[0]); - test.equal( response[1], 'Sent' ); - } - }); - } - - function time_test() { - pubnub.time(function(time){ - test.ok(time); - uuid_test(); - }); - } - - function uuid_test() { - pubnub.uuid(function(uuid){ - test.ok(uuid); - history_test(); - }); - } - - function history_test(history) { - pubnub.history({ - limit : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0].test, "test" ); - test.end(); - } - }); - } - - function detailedHistory_test(history) { - pubnub.detailedHistory({ - count : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0][0].test, "test" ); - test.end(); - } - }); - } - pubnub.subscribe({ - channel : channel, - connect : publish_test, - callback : function(message) { - test.ok(message); - test.equal( message.test, "test" ); - time_test(); - } - }); -}); - diff --git a/core/3.4.1/README.md b/core/3.4.1/README.md deleted file mode 100644 index 5477b9d60..000000000 --- a/core/3.4.1/README.md +++ /dev/null @@ -1,348 +0,0 @@ -# YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API. -http://www.pubnub.com/account - -## PubNub 3.4.1 Real-time Cloud Push API - JAVASCRIPT -http://www.pubnub.com - PubNub Real-time Push Service in the Cloud. -http://www.pubnub.com/tutorial/javascript-push-api - -PubNub is a blazingly fast cloud-hosted messaging service for building -real-time web and mobile apps. Hundreds of apps and thousands of developers -rely on PubNub for delivering human-perceptive real-time -experiences that scale to millions of users worldwide. PubNub delivers -the infrastructure needed to build amazing MMO games, social apps, -business collaborative solutions, and more. - -## SIMPLE EXAMPLE -```html -
- - -``` - -## ADVANCED STYLE -```html -
- - -``` - -## HISTORY AND HERE-NOW EXAMPLE -```html -Click Me for Here Now! -Click Me for History! - - -``` - -## SSL MODE -```html -
- - -``` - -## HISTORY -```html -
- - -``` - - -## REPLAY -```html -
- - -``` - -## WebSocket Client Interface - -Optionally PubNub offers you the full RFC 6455 -Support for WebSocket Client Specification. -PubNub WebSockets enables any browser (modern or not) to support -the HTML5 WebSocket standard APIs. -Use the WebSocket Client Directly in your Browser that -Now you can use `new WebSocket` anywhere! - -Here is a quick example: - -```javascript -var socket = new WebSocket('wss://pubsub.pubnub.com/PUB/SUB/CHANNEL') -``` - -The following example opens a `new WebSocket` in -**WSS Secure Socket Mode** with full **2048 Bit SSL** Encryption. - -```html - - - - - - - - -``` - -#### To Disable SSL WSS Secure Sockets: - -```html - - - - - - - - -``` - -## Using the PUBNUB init() Function - -Sometimes you want to use create a PubNub Instance directly in JavaScript -and pass the PubNub API Keys without using a DOM element. -To do this, simply follow this `init` example: - -```html - - -``` - -## Using with AES256 Encryption -This client now supports AES256 encryption out of the box! -And its super-easy to use! Check out the -file encrypted_chat_demo.html for a working example of -using encryption between this and other PubNub clients. - -##### Important Highlights - -1. Be sure to include the base pubnub.js, -gibberish, and encryption adapter: - -```html - - - -``` - -2. When instantiating your PubNub instance object, -use the .secure method instead of the .init method: - -```javascript -var cipher_key = "enigma"; -var secure_pubnub = PUBNUB.secure({ - publish_key : "demo", - subscribe_key : "demo", - cipher_key : cipher_key -}); -``` - -That's pretty much it. -Use subscribe, publish, and history as you would normally, -only the implementation is different, -being that the message traffic is now encrypted. - -## SUPER ADVANCED SETTINGS - -#### KEEPALIVE - -The JavaScript library will automatically detect disconnects -in near real-time. -However there are extra rare cases where `keepalives` are used -to detect disconnections of the network connection. -Optionally you may sacrafice bandwidth and reduce battery life -by lowering the `keepalive` value. -By reducing the `keepalive` you receive -greater percision to detect rare edge-case drops. -The Default `keepalive` is *60 seconds*. -**Reducing this value to 30 seconds will help detect -only the rare edge-case network problems -sooner under rare network disruption situations.** -It is not a good idea to reduce this value lower. -If you need it lower more, you must contact PubNub first. -Again, the JavaScript library will automatically -detect disconnects in near real-time anyway, -so it is not necessary to reduce this value further. - -```javascript -var pubnub = PUBNUB.init({ - keepalive : 30, - publish_key : 'demo', - subscribe_key : 'demo' -}); -``` - -#### WINDOWING AND MESSAGE ORDERING - -PubNub JavaScript library includes a `windowing` feature that will -automatically allow the PubNub Network the window time needed -to bundle, compress and optimize messages for high-throughput. -This means that if you specify a long window, you will be able to -receive significant performance imporvements and optimized performance. -Also with high throughput applications with many messages per second, -a long enough window will all the right amount of time for the PubNub Network -to order the messsage delivery. - - diff --git a/core/3.4.1/build-minify-pubnub b/core/3.4.1/build-minify-pubnub deleted file mode 100755 index 5950cd27e..000000000 --- a/core/3.4.1/build-minify-pubnub +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -echo $1 - -googleminify=$1 - -if [ -z "$googleminify" ]; then googleminify="/opt/minify/compiler.jar"; fi - -echo -e " " -echo -e " USING: $googleminify TO MINIFY..." -echo -e " COMPILING PUBNUB JAVASCRIPT API..." - -cat ./json.js ./websocket.js ./pubnub-3.4.1.js > ./pubnub.tmp -echo "(function(){" > ./pubnub-3.4.1.min.js -java -jar $googleminify --js=./pubnub.tmp --compilation_level=ADVANCED_OPTIMIZATIONS >> ./pubnub-3.4.1.min.js -echo "})();" >> ./pubnub-3.4.1.min.js - -echo -e " >>COMPRESSING<< PUBNUB JAVASCRIPT API..." -cat ./pubnub-3.4.1.min.js | gzip -c9 > ./pubnub-3.4.1.min.js.gz - -rm ./pubnub.tmp -echo -e " " -echo -e " DONE!\n" diff --git a/core/3.4.1/crypto/encrypt-pubnub.js b/core/3.4.1/crypto/encrypt-pubnub.js deleted file mode 100644 index 8663b5202..000000000 --- a/core/3.4.1/crypto/encrypt-pubnub.js +++ /dev/null @@ -1,238 +0,0 @@ -// ===================================================================== -// STANFORD CRYPTO Library with AES Encryption -// ===================================================================== - -PUBNUB.secure = (function () { - - GibberishAES.size(256); - var cipher_key = ""; - var iv = GibberishAES.s2a("0123456789012345"); - - - function encrypt(data) { - - var hex_message = GibberishAES.s2a(JSON.stringify(data)); - var encryptedHexArray = GibberishAES.rawEncrypt(hex_message, cipher_key, iv); - var base_64_encrypted = GibberishAES.Base64.encode(encryptedHexArray); - return base_64_encrypted || data.data.message; - } - - function decrypt(data, options) { - options = options ? options : {}; - - try { - var binary_enc = GibberishAES.Base64.decode(data); - var json_plain = GibberishAES.rawDecrypt(binary_enc, cipher_key, iv, false); - var plaintext = JSON.parse(json_plain); - - return plaintext; - } - catch (e) { - return options.parse_error || null; - } - } - - - return function (setup) { - - cipher_key = GibberishAES.s2a(SHA256(setup.cipher_key).slice(0,32)); - - var pubnub = PUBNUB.init(setup); - - return { - time: PUBNUB.time, - - publish: function (args) { - args.message = encrypt(args.message); - return pubnub.publish(args); - }, - subscribe: function (args) { - var callback = args.callback; - args.callback = function (message, envelope, channel) { - var decrypted = decrypt(message); - decrypted && callback(decrypted, envelope, channel); - } - - return pubnub.subscribe(args); - }, - history: function (args) { - - var encrypted_messages = ""; - var old_callback = args.callback; - - function new_callback(response) { - encrypted_messages = response[0]; - - var decrypted_messages = []; - - for (a = 0; a < encrypted_messages.length; a++) { - var new_message = decrypt(encrypted_messages[a], {"parse_error":"DECRYPT_ERROR"}); - decrypted_messages.push((new_message)); - } - - old_callback([decrypted_messages, response[1], response[2]]); - } - - args.callback = new_callback; - - pubnub.history(args); - - return true; - }, - - raw_encrypt: encrypt, - raw_decrypt: decrypt - }; - }; -})(); - -/** - * - * Secure Hash Algorithm (SHA256) - * http://www.webtoolkit.info/ - * - * Original code by Angel Marin, Paul Johnston. - * - **/ - -function SHA256(s) { - - var chrsz = 8; - var hexcase = 0; - - function safe_add(x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); - } - - function S(X, n) { - return ( X >>> n ) | (X << (32 - n)); - } - - function R(X, n) { - return ( X >>> n ); - } - - function Ch(x, y, z) { - return ((x & y) ^ ((~x) & z)); - } - - function Maj(x, y, z) { - return ((x & y) ^ (x & z) ^ (y & z)); - } - - function Sigma0256(x) { - return (S(x, 2) ^ S(x, 13) ^ S(x, 22)); - } - - function Sigma1256(x) { - return (S(x, 6) ^ S(x, 11) ^ S(x, 25)); - } - - function Gamma0256(x) { - return (S(x, 7) ^ S(x, 18) ^ R(x, 3)); - } - - function Gamma1256(x) { - return (S(x, 17) ^ S(x, 19) ^ R(x, 10)); - } - - function core_sha256(m, l) { - var K = new Array(0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0xFC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x6CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2); - var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); - var W = new Array(64); - var a, b, c, d, e, f, g, h, i, j; - var T1, T2; - - m[l >> 5] |= 0x80 << (24 - l % 32); - m[((l + 64 >> 9) << 4) + 15] = l; - - for (var i = 0; i < m.length; i += 16) { - a = HASH[0]; - b = HASH[1]; - c = HASH[2]; - d = HASH[3]; - e = HASH[4]; - f = HASH[5]; - g = HASH[6]; - h = HASH[7]; - - for (var j = 0; j < 64; j++) { - if (j < 16) W[j] = m[j + i]; - else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); - - T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); - T2 = safe_add(Sigma0256(a), Maj(a, b, c)); - - h = g; - g = f; - f = e; - e = safe_add(d, T1); - d = c; - c = b; - b = a; - a = safe_add(T1, T2); - } - - HASH[0] = safe_add(a, HASH[0]); - HASH[1] = safe_add(b, HASH[1]); - HASH[2] = safe_add(c, HASH[2]); - HASH[3] = safe_add(d, HASH[3]); - HASH[4] = safe_add(e, HASH[4]); - HASH[5] = safe_add(f, HASH[5]); - HASH[6] = safe_add(g, HASH[6]); - HASH[7] = safe_add(h, HASH[7]); - } - return HASH; - } - - function str2binb(str) { - var bin = Array(); - var mask = (1 << chrsz) - 1; - for (var i = 0; i < str.length * chrsz; i += chrsz) { - bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32); - } - return bin; - } - - function Utf8Encode(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; - - for (var n = 0; n < string.length; n++) { - - var c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - - return utftext; - } - - function binb2hex(binarray) { - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for (var i = 0; i < binarray.length * 4; i++) { - str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + - hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 )) & 0xF); - } - return str; - } - - s = Utf8Encode(s); - return binb2hex(core_sha256(str2binb(s), s.length * chrsz)); - -} \ No newline at end of file diff --git a/core/3.4.1/crypto/gibberish-aes.js b/core/3.4.1/crypto/gibberish-aes.js deleted file mode 100755 index c83cb3b6d..000000000 --- a/core/3.4.1/crypto/gibberish-aes.js +++ /dev/null @@ -1,998 +0,0 @@ -/** -* @license Gibberish-AES -* A lightweight Javascript Libray for OpenSSL compatible AES CBC encryption. -* -* Author: Mark Percival -* Email: mark@mpercival.com -* Copyright: Mark Percival - http://mpercival.com 2008 -* -* With thanks to: -* Josh Davis - http://www.josh-davis.org/ecmaScrypt -* Chris Veness - http://www.movable-type.co.uk/scripts/aes.html -* Michel I. Gallant - http://www.jensign.com/ -* Jean-Luc Cooke 2012-07-12: added strhex + invertArr to compress G2X/G3X/G9X/GBX/GEX/SBox/SBoxInv/Rcon saving over 7KB, and added encString, decString, also made the MD5 routine more easlier compressible using yuicompressor. -* -* License: MIT -* -* Usage: GibberishAES.enc("secret", "password") -* Outputs: AES Encrypted text encoded in Base64 -*/ - - -var GibberishAES = (function(){ - var Nr = 14, - /* Default to 256 Bit Encryption */ - Nk = 8, - Decrypt = false, - - enc_utf8 = function(s) - { - try { - return unescape(encodeURIComponent(s)); - } - catch(e) { - throw 'Error on UTF-8 encode'; - } - }, - - dec_utf8 = function(s) - { - try { - return decodeURIComponent(escape(s)); - } - catch(e) { - throw ('Bad Key'); - } - }, - - padBlock = function(byteArr) - { - var array = [], cpad, i; - if (byteArr.length < 16) { - cpad = 16 - byteArr.length; - array = [cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad]; - } - for (i = 0; i < byteArr.length; i++) - { - array[i] = byteArr[i]; - } - return array; - }, - - block2s = function(block, lastBlock) - { - var string = '', padding, i; - if (lastBlock) { - padding = block[15]; - if (padding > 16) { - throw ('Decryption error: Maybe bad key'); - } - if (padding == 16) { - return ''; - } - for (i = 0; i < 16 - padding; i++) { - string += String.fromCharCode(block[i]); - } - } else { - for (i = 0; i < 16; i++) { - string += String.fromCharCode(block[i]); - } - } - return string; - }, - - a2h = function(numArr) - { - var string = '', i; - for (i = 0; i < numArr.length; i++) { - string += (numArr[i] < 16 ? '0': '') + numArr[i].toString(16); - } - return string; - }, - - h2a = function(s) - { - var ret = []; - s.replace(/(..)/g, - function(s) { - ret.push(parseInt(s, 16)); - }); - return ret; - }, - - s2a = function(string, binary) { - var array = [], i; - - if (! binary) { - string = enc_utf8(string); - } - - for (i = 0; i < string.length; i++) - { - array[i] = string.charCodeAt(i); - } - - return array; - }, - - size = function(newsize) - { - switch (newsize) - { - case 128: - Nr = 10; - Nk = 4; - break; - case 192: - Nr = 12; - Nk = 6; - break; - case 256: - Nr = 14; - Nk = 8; - break; - default: - throw ('Invalid Key Size Specified:' + newsize); - } - }, - - randArr = function(num) { - var result = [], i; - for (i = 0; i < num; i++) { - result = result.concat(Math.floor(Math.random() * 256)); - } - return result; - }, - - openSSLKey = function(passwordArr, saltArr) { - // Number of rounds depends on the size of the AES in use - // 3 rounds for 256 - // 2 rounds for the key, 1 for the IV - // 2 rounds for 128 - // 1 round for the key, 1 round for the IV - // 3 rounds for 192 since it's not evenly divided by 128 bits - var rounds = Nr >= 12 ? 3: 2, - key = [], - iv = [], - md5_hash = [], - result = [], - data00 = passwordArr.concat(saltArr), - i; - md5_hash[0] = GibberishAES.Hash.MD5(data00); - result = md5_hash[0]; - for (i = 1; i < rounds; i++) { - md5_hash[i] = GibberishAES.Hash.MD5(md5_hash[i - 1].concat(data00)); - result = result.concat(md5_hash[i]); - } - key = result.slice(0, 4 * Nk); - iv = result.slice(4 * Nk, 4 * Nk + 16); - return { - key: key, - iv: iv - }; - }, - - rawEncrypt = function(plaintext, key, iv) { - // plaintext, key and iv as byte arrays - key = expandKey(key); - var numBlocks = Math.ceil(plaintext.length / 16), - blocks = [], - i, - cipherBlocks = []; - for (i = 0; i < numBlocks; i++) { - blocks[i] = padBlock(plaintext.slice(i * 16, i * 16 + 16)); - } - if (plaintext.length % 16 === 0) { - blocks.push([16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16]); - // CBC OpenSSL padding scheme - numBlocks++; - } - for (i = 0; i < blocks.length; i++) { - blocks[i] = (i === 0) ? xorBlocks(blocks[i], iv) : xorBlocks(blocks[i], cipherBlocks[i - 1]); - cipherBlocks[i] = encryptBlock(blocks[i], key); - } - return cipherBlocks; - }, - - rawDecrypt = function(cryptArr, key, iv, binary) { - // cryptArr, key and iv as byte arrays - key = expandKey(key); - var numBlocks = cryptArr.length / 16, - cipherBlocks = [], - i, - plainBlocks = [], - string = ''; - for (i = 0; i < numBlocks; i++) { - cipherBlocks.push(cryptArr.slice(i * 16, (i + 1) * 16)); - } - for (i = cipherBlocks.length - 1; i >= 0; i--) { - plainBlocks[i] = decryptBlock(cipherBlocks[i], key); - plainBlocks[i] = (i === 0) ? xorBlocks(plainBlocks[i], iv) : xorBlocks(plainBlocks[i], cipherBlocks[i - 1]); - } - for (i = 0; i < numBlocks - 1; i++) { - string += block2s(plainBlocks[i]); - } - string += block2s(plainBlocks[i], true); - return binary ? string : dec_utf8(string); - }, - - encryptBlock = function(block, words) { - Decrypt = false; - var state = addRoundKey(block, words, 0), - round; - for (round = 1; round < (Nr + 1); round++) { - state = subBytes(state); - state = shiftRows(state); - if (round < Nr) { - state = mixColumns(state); - } - //last round? don't mixColumns - state = addRoundKey(state, words, round); - } - - return state; - }, - - decryptBlock = function(block, words) { - Decrypt = true; - var state = addRoundKey(block, words, Nr), - round; - for (round = Nr - 1; round > -1; round--) { - state = shiftRows(state); - state = subBytes(state); - state = addRoundKey(state, words, round); - if (round > 0) { - state = mixColumns(state); - } - //last round? don't mixColumns - } - - return state; - }, - - subBytes = function(state) { - var S = Decrypt ? SBoxInv: SBox, - temp = [], - i; - for (i = 0; i < 16; i++) { - temp[i] = S[state[i]]; - } - return temp; - }, - - shiftRows = function(state) { - var temp = [], - shiftBy = Decrypt ? [0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 15, 12, 9, 6, 3] : [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11], - i; - for (i = 0; i < 16; i++) { - temp[i] = state[shiftBy[i]]; - } - return temp; - }, - - mixColumns = function(state) { - var t = [], - c; - if (!Decrypt) { - for (c = 0; c < 4; c++) { - t[c * 4] = G2X[state[c * 4]] ^ G3X[state[1 + c * 4]] ^ state[2 + c * 4] ^ state[3 + c * 4]; - t[1 + c * 4] = state[c * 4] ^ G2X[state[1 + c * 4]] ^ G3X[state[2 + c * 4]] ^ state[3 + c * 4]; - t[2 + c * 4] = state[c * 4] ^ state[1 + c * 4] ^ G2X[state[2 + c * 4]] ^ G3X[state[3 + c * 4]]; - t[3 + c * 4] = G3X[state[c * 4]] ^ state[1 + c * 4] ^ state[2 + c * 4] ^ G2X[state[3 + c * 4]]; - } - }else { - for (c = 0; c < 4; c++) { - t[c*4] = GEX[state[c*4]] ^ GBX[state[1+c*4]] ^ GDX[state[2+c*4]] ^ G9X[state[3+c*4]]; - t[1+c*4] = G9X[state[c*4]] ^ GEX[state[1+c*4]] ^ GBX[state[2+c*4]] ^ GDX[state[3+c*4]]; - t[2+c*4] = GDX[state[c*4]] ^ G9X[state[1+c*4]] ^ GEX[state[2+c*4]] ^ GBX[state[3+c*4]]; - t[3+c*4] = GBX[state[c*4]] ^ GDX[state[1+c*4]] ^ G9X[state[2+c*4]] ^ GEX[state[3+c*4]]; - } - } - - return t; - }, - - addRoundKey = function(state, words, round) { - var temp = [], - i; - for (i = 0; i < 16; i++) { - temp[i] = state[i] ^ words[round][i]; - } - return temp; - }, - - xorBlocks = function(block1, block2) { - var temp = [], - i; - for (i = 0; i < 16; i++) { - temp[i] = block1[i] ^ block2[i]; - } - return temp; - }, - - expandKey = function(key) { - // Expects a 1d number array - var w = [], - temp = [], - i, - r, - t, - flat = [], - j; - - for (i = 0; i < Nk; i++) { - r = [key[4 * i], key[4 * i + 1], key[4 * i + 2], key[4 * i + 3]]; - w[i] = r; - } - - for (i = Nk; i < (4 * (Nr + 1)); i++) { - w[i] = []; - for (t = 0; t < 4; t++) { - temp[t] = w[i - 1][t]; - } - if (i % Nk === 0) { - temp = subWord(rotWord(temp)); - temp[0] ^= Rcon[i / Nk - 1]; - } else if (Nk > 6 && i % Nk == 4) { - temp = subWord(temp); - } - for (t = 0; t < 4; t++) { - w[i][t] = w[i - Nk][t] ^ temp[t]; - } - } - for (i = 0; i < (Nr + 1); i++) { - flat[i] = []; - for (j = 0; j < 4; j++) { - flat[i].push(w[i * 4 + j][0], w[i * 4 + j][1], w[i * 4 + j][2], w[i * 4 + j][3]); - } - } - return flat; - }, - - subWord = function(w) { - // apply SBox to 4-byte word w - for (var i = 0; i < 4; i++) { - w[i] = SBox[w[i]]; - } - return w; - }, - - rotWord = function(w) { - // rotate 4-byte word w left by one byte - var tmp = w[0], - i; - for (i = 0; i < 4; i++) { - w[i] = w[i + 1]; - } - w[3] = tmp; - return w; - }, - -// jlcooke: 2012-07-12: added strhex + invertArr to compress G2X/G3X/G9X/GBX/GEX/SBox/SBoxInv/Rcon saving over 7KB, and added encString, decString - strhex = function(str,size) { - var ret = []; - for (i=0; i0x7f) ? 0x11b^(a<<1) : (a<<1); - b >>>= 1; - } - - return ret; - }, - Gx = function(x) { - var r = []; - for (var i=0; i<256; i++) - r[i] = Gxx(x, i); - return r; - }, - - // S-box -/* - SBox = [ - 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, - 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, - 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, - 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, - 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, - 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, - 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, - 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, - 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, - 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, - 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, - 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, - 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, - 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, - 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, - 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, - 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, - 22], //*/ SBox = strhex('637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16',2), - - // Precomputed lookup table for the inverse SBox -/* SBoxInv = [ - 82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, - 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, - 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, - 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, - 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, - 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, - 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, - 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, - 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, - 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, - 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, - 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, - 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, - 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, - 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, - 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, - 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, - 125], //*/ SBoxInv = invertArr(SBox), - - // Rijndael Rcon -/* - Rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, - 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145], -//*/ Rcon = strhex('01020408102040801b366cd8ab4d9a2f5ebc63c697356ad4b37dfaefc591',2), - -/* - G2X = [ - 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, - 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, - 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, - 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, - 0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 0x76, - 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84,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f1, 0xf2, - 0xe3, 0xe0, 0xe5, 0xe6, 0xef, 0xec, 0xe9, 0xea, 0xcb, 0xc8, 0xcd, 0xce, - 0xc7, 0xc4, 0xc1, 0xc2, 0xd3, 0xd0, 0xd5, 0xd6, 0xdf, 0xdc, 0xd9, 0xda, - 0x5b, 0x58, 0x5d, 0x5e, 0x57, 0x54, 0x51, 0x52, 0x43, 0x40, 0x45, 0x46, - 0x4f, 0x4c, 0x49, 0x4a, 0x6b, 0x68, 0x6d, 0x6e, 0x67, 0x64, 0x61, 0x62, - 0x73, 0x70, 0x75, 0x76, 0x7f, 0x7c, 0x79, 0x7a, 0x3b, 0x38, 0x3d, 0x3e, - 0x37, 0x34, 0x31, 0x32, 0x23, 0x20, 0x25, 0x26, 0x2f, 0x2c, 0x29, 0x2a, - 0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, - 0x1f, 0x1c, 0x19, 0x1a - ], //*/ G3X = Gx(3), - -/* - G9X = [ - 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, - 0x6c, 0x65, 0x7e, 0x77, 0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, - 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7, 0x3b, 0x32, 0x29, 0x20, - 0x1f, 0x16, 0x0d, 0x04, 0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c, - 0xab, 0xa2, 0xb9, 0xb0, 0x8f, 0x86, 0x9d, 0x94, 0xe3, 0xea, 0xf1, 0xf8, - 0xc7, 0xce, 0xd5, 0xdc, 0x76, 0x7f, 0x64, 0x6d, 0x52, 0x5b, 0x40, 0x49, - 0x3e, 0x37, 0x2c, 0x25, 0x1a, 0x13, 0x08, 0x01, 0xe6, 0xef, 0xf4, 0xfd, - 0xc2, 0xcb, 0xd0, 0xd9, 0xae, 0xa7, 0xbc, 0xb5, 0x8a, 0x83, 0x98, 0x91, - 0x4d, 0x44, 0x5f, 0x56, 0x69, 0x60, 0x7b, 0x72, 0x05, 0x0c, 0x17, 0x1e, - 0x21, 0x28, 0x33, 0x3a, 0xdd, 0xd4, 0xcf, 0xc6, 0xf9, 0xf0, 0xeb, 0xe2, - 0x95, 0x9c, 0x87, 0x8e, 0xb1, 0xb8, 0xa3, 0xaa, 0xec, 0xe5, 0xfe, 0xf7, - 0xc8, 0xc1, 0xda, 0xd3, 0xa4, 0xad, 0xb6, 0xbf, 0x80, 0x89, 0x92, 0x9b, - 0x7c, 0x75, 0x6e, 0x67, 0x58, 0x51, 0x4a, 0x43, 0x34, 0x3d, 0x26, 0x2f, - 0x10, 0x19, 0x02, 0x0b, 0xd7, 0xde, 0xc5, 0xcc, 0xf3, 0xfa, 0xe1, 0xe8, - 0x9f, 0x96, 0x8d, 0x84, 0xbb, 0xb2, 0xa9, 0xa0, 0x47, 0x4e, 0x55, 0x5c, - 0x63, 0x6a, 0x71, 0x78, 0x0f, 0x06, 0x1d, 0x14, 0x2b, 0x22, 0x39, 0x30, - 0x9a, 0x93, 0x88, 0x81, 0xbe, 0xb7, 0xac, 0xa5, 0xd2, 0xdb, 0xc0, 0xc9, - 0xf6, 0xff, 0xe4, 0xed, 0x0a, 0x03, 0x18, 0x11, 0x2e, 0x27, 0x3c, 0x35, - 0x42, 0x4b, 0x50, 0x59, 0x66, 0x6f, 0x74, 0x7d, 0xa1, 0xa8, 0xb3, 0xba, - 0x85, 0x8c, 0x97, 0x9e, 0xe9, 0xe0, 0xfb, 0xf2, 0xcd, 0xc4, 0xdf, 0xd6, - 0x31, 0x38, 0x23, 0x2a, 0x15, 0x1c, 0x07, 0x0e, 0x79, 0x70, 0x6b, 0x62, - 0x5d, 0x54, 0x4f, 0x46 - ], //*/ G9X = Gx(9), - -/* GBX = [ - 0x00, 0x0b, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 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x5e, 0x55, - 0x01, 0x0a, 0x17, 0x1c, 0x2d, 0x26, 0x3b, 0x30, 0x59, 0x52, 0x4f, 0x44, - 0x75, 0x7e, 0x63, 0x68, 0xb1, 0xba, 0xa7, 0xac, 0x9d, 0x96, 0x8b, 0x80, - 0xe9, 0xe2, 0xff, 0xf4, 0xc5, 0xce, 0xd3, 0xd8, 0x7a, 0x71, 0x6c, 0x67, - 0x56, 0x5d, 0x40, 0x4b, 0x22, 0x29, 0x34, 0x3f, 0x0e, 0x05, 0x18, 0x13, - 0xca, 0xc1, 0xdc, 0xd7, 0xe6, 0xed, 0xf0, 0xfb, 0x92, 0x99, 0x84, 0x8f, - 0xbe, 0xb5, 0xa8, 0xa3 - ], //*/ GBX = Gx(0xb), - -/* - GDX = [ - 0x00, 0x0d, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, - 0x5c, 0x51, 0x46, 0x4b, 0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9, 0xfe, 0xf3, - 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b, 0xbb, 0xb6, 0xa1, 0xac, - 0x8f, 0x82, 0x95, 0x98, 0xd3, 0xde, 0xc9, 0xc4, 0xe7, 0xea, 0xfd, 0xf0, - 0x6b, 0x66, 0x71, 0x7c, 0x5f, 0x52, 0x45, 0x48, 0x03, 0x0e, 0x19, 0x14, - 0x37, 0x3a, 0x2d, 0x20, 0x6d, 0x60, 0x77, 0x7a, 0x59, 0x54, 0x43, 0x4e, - 0x05, 0x08, 0x1f, 0x12, 0x31, 0x3c, 0x2b, 0x26, 0xbd, 0xb0, 0xa7, 0xaa, - 0x89, 0x84, 0x93, 0x9e, 0xd5, 0xd8, 0xcf, 0xc2, 0xe1, 0xec, 0xfb, 0xf6, - 0xd6, 0xdb, 0xcc, 0xc1, 0xe2, 0xef, 0xf8, 0xf5, 0xbe, 0xb3, 0xa4, 0xa9, - 0x8a, 0x87, 0x90, 0x9d, 0x06, 0x0b, 0x1c, 0x11, 0x32, 0x3f, 0x28, 0x25, - 0x6e, 0x63, 0x74, 0x79, 0x5a, 0x57, 0x40, 0x4d, 0xda, 0xd7, 0xc0, 0xcd, - 0xee, 0xe3, 0xf4, 0xf9, 0xb2, 0xbf, 0xa8, 0xa5, 0x86, 0x8b, 0x9c, 0x91, - 0x0a, 0x07, 0x10, 0x1d, 0x3e, 0x33, 0x24, 0x29, 0x62, 0x6f, 0x78, 0x75, - 0x56, 0x5b, 0x4c, 0x41, 0x61, 0x6c, 0x7b, 0x76, 0x55, 0x58, 0x4f, 0x42, - 0x09, 0x04, 0x13, 0x1e, 0x3d, 0x30, 0x27, 0x2a, 0xb1, 0xbc, 0xab, 0xa6, - 0x85, 0x88, 0x9f, 0x92, 0xd9, 0xd4, 0xc3, 0xce, 0xed, 0xe0, 0xf7, 0xfa, - 0xb7, 0xba, 0xad, 0xa0, 0x83, 0x8e, 0x99, 0x94, 0xdf, 0xd2, 0xc5, 0xc8, - 0xeb, 0xe6, 0xf1, 0xfc, 0x67, 0x6a, 0x7d, 0x70, 0x53, 0x5e, 0x49, 0x44, - 0x0f, 0x02, 0x15, 0x18, 0x3b, 0x36, 0x21, 0x2c, 0x0c, 0x01, 0x16, 0x1b, - 0x38, 0x35, 0x22, 0x2f, 0x64, 0x69, 0x7e, 0x73, 0x50, 0x5d, 0x4a, 0x47, - 0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, - 0x80, 0x8d, 0x9a, 0x97 - ], //*/ GDX = Gx(0xd), - -/* - GEX = [ - 0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, - 0x48, 0x46, 0x54, 0x5a, 0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, - 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0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 0x3a, 0x28, 0x26, - 0x7c, 0x72, 0x60, 0x6e, 0x44, 0x4a, 0x58, 0x56, 0x37, 0x39, 0x2b, 0x25, - 0x0f, 0x01, 0x13, 0x1d, 0x47, 0x49, 0x5b, 0x55, 0x7f, 0x71, 0x63, 0x6d, - 0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, - 0x9f, 0x91, 0x83, 0x8d - ], //*/ GEX = Gx(0xe), - - enc = function(string, pass, binary) { - // string, password in plaintext - var salt = randArr(8), - pbe = openSSLKey(s2a(pass, binary), salt), - key = pbe.key, - iv = pbe.iv, - cipherBlocks, - saltBlock = [[83, 97, 108, 116, 101, 100, 95, 95].concat(salt)]; - string = s2a(string, binary); - cipherBlocks = rawEncrypt(string, key, iv); - // Spells out 'Salted__' - cipherBlocks = saltBlock.concat(cipherBlocks); - return Base64.encode(cipherBlocks); - }, - - dec = function(string, pass, binary) { - // string, password in plaintext - var cryptArr = Base64.decode(string), - salt = cryptArr.slice(8, 16), - pbe = openSSLKey(s2a(pass, binary), salt), - key = pbe.key, - iv = pbe.iv; - cryptArr = cryptArr.slice(16, cryptArr.length); - // Take off the Salted__ffeeddcc - string = rawDecrypt(cryptArr, key, iv, binary); - return string; - }, - - MD5 = function(numArr) { - - function rotateLeft(lValue, iShiftBits) { - return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); - } - - function addUnsigned(lX, lY) { - var lX4, - lY4, - lX8, - lY8, - lResult; - lX8 = (lX & 0x80000000); - lY8 = (lY & 0x80000000); - lX4 = (lX & 0x40000000); - lY4 = (lY & 0x40000000); - lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); - if (lX4 & lY4) { - return (lResult ^ 0x80000000 ^ lX8 ^ lY8); - } - if (lX4 | lY4) { - if (lResult & 0x40000000) { - return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); - } else { - return (lResult ^ 0x40000000 ^ lX8 ^ lY8); - } - } else { - return (lResult ^ lX8 ^ lY8); - } - } - - function f(x, y, z) { - return (x & y) | ((~x) & z); - } - function g(x, y, z) { - return (x & z) | (y & (~z)); - } - function h(x, y, z) { - return (x ^ y ^ z); - } - function funcI(x, y, z) { - return (y ^ (x | (~z))); - } - - function ff(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(f(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function gg(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(g(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function hh(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(h(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function ii(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(funcI(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function convertToWordArray(numArr) { - var lWordCount, - lMessageLength = numArr.length, - lNumberOfWords_temp1 = lMessageLength + 8, - lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64, - lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16, - lWordArray = [], - lBytePosition = 0, - lByteCount = 0; - while (lByteCount < lMessageLength) { - lWordCount = (lByteCount - (lByteCount % 4)) / 4; - lBytePosition = (lByteCount % 4) * 8; - lWordArray[lWordCount] = (lWordArray[lWordCount] | (numArr[lByteCount] << lBytePosition)); - lByteCount++; - } - lWordCount = (lByteCount - (lByteCount % 4)) / 4; - lBytePosition = (lByteCount % 4) * 8; - lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); - lWordArray[lNumberOfWords - 2] = lMessageLength << 3; - lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; - return lWordArray; - } - - function wordToHex(lValue) { - var lByte, - lCount, - wordToHexArr = []; - for (lCount = 0; lCount <= 3; lCount++) { - lByte = (lValue >>> (lCount * 8)) & 255; - wordToHexArr = wordToHexArr.concat(lByte); - } - return wordToHexArr; - } - - /*function utf8Encode(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = "", - n, - c; - - for (n = 0; n < string.length; n++) { - - c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - - return utftext; - }*/ - - var x = [], - k, - AA, - BB, - CC, - DD, - a, - b, - c, - d, - rnd = strhex('67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391',8); - - x = convertToWordArray(numArr); - - a = rnd[0]; - b = rnd[1]; - c = rnd[2]; - d = rnd[3] - - for (k = 0; k < x.length; k += 16) { - AA = a; - BB = b; - CC = c; - DD = d; - a = ff(a, b, c, d, x[k + 0], 7, rnd[4]); - d = ff(d, a, b, c, x[k + 1], 12, rnd[5]); - c = ff(c, d, a, b, x[k + 2], 17, rnd[6]); - b = ff(b, c, d, a, x[k + 3], 22, rnd[7]); - a = ff(a, b, c, d, x[k + 4], 7, rnd[8]); - d = ff(d, a, b, c, x[k + 5], 12, rnd[9]); - c = ff(c, d, a, b, x[k + 6], 17, rnd[10]); - b = ff(b, c, d, a, x[k + 7], 22, rnd[11]); - a = ff(a, b, c, d, x[k + 8], 7, rnd[12]); - d = ff(d, a, b, c, x[k + 9], 12, rnd[13]); - c = ff(c, d, a, b, x[k + 10], 17, rnd[14]); - b = ff(b, c, d, a, x[k + 11], 22, rnd[15]); - a = ff(a, b, c, d, x[k + 12], 7, rnd[16]); - d = ff(d, a, b, c, x[k + 13], 12, rnd[17]); - c = ff(c, d, a, b, x[k + 14], 17, rnd[18]); - b = ff(b, c, d, a, x[k + 15], 22, rnd[19]); - a = gg(a, b, c, d, x[k + 1], 5, rnd[20]); - d = gg(d, a, b, c, x[k + 6], 9, rnd[21]); - c = gg(c, d, a, b, x[k + 11], 14, rnd[22]); - b = gg(b, c, d, a, x[k + 0], 20, rnd[23]); - a = gg(a, b, c, d, x[k + 5], 5, rnd[24]); - d = gg(d, a, b, c, x[k + 10], 9, rnd[25]); - c = gg(c, d, a, b, x[k + 15], 14, rnd[26]); - b = gg(b, c, d, a, x[k + 4], 20, rnd[27]); - a = gg(a, b, c, d, x[k + 9], 5, rnd[28]); - d = gg(d, a, b, c, x[k + 14], 9, rnd[29]); - c = gg(c, d, a, b, x[k + 3], 14, rnd[30]); - b = gg(b, c, d, a, x[k + 8], 20, rnd[31]); - a = gg(a, b, c, d, x[k + 13], 5, rnd[32]); - d = gg(d, a, b, c, x[k + 2], 9, rnd[33]); - c = gg(c, d, a, b, x[k + 7], 14, rnd[34]); - b = gg(b, c, d, a, x[k + 12], 20, rnd[35]); - a = hh(a, b, c, d, x[k + 5], 4, rnd[36]); - d = hh(d, a, b, c, x[k + 8], 11, rnd[37]); - c = hh(c, d, a, b, x[k + 11], 16, rnd[38]); - b = hh(b, c, d, a, x[k + 14], 23, rnd[39]); - a = hh(a, b, c, d, x[k + 1], 4, rnd[40]); - d = hh(d, a, b, c, x[k + 4], 11, rnd[41]); - c = hh(c, d, a, b, x[k + 7], 16, rnd[42]); - b = hh(b, c, d, a, x[k + 10], 23, rnd[43]); - a = hh(a, b, c, d, x[k + 13], 4, rnd[44]); - d = hh(d, a, b, c, x[k + 0], 11, rnd[45]); - c = hh(c, d, a, b, x[k + 3], 16, rnd[46]); - b = hh(b, c, d, a, x[k + 6], 23, rnd[47]); - a = hh(a, b, c, d, x[k + 9], 4, rnd[48]); - d = hh(d, a, b, c, x[k + 12], 11, rnd[49]); - c = hh(c, d, a, b, x[k + 15], 16, rnd[50]); - b = hh(b, c, d, a, x[k + 2], 23, rnd[51]); - a = ii(a, b, c, d, x[k + 0], 6, rnd[52]); - d = ii(d, a, b, c, x[k + 7], 10, rnd[53]); - c = ii(c, d, a, b, x[k + 14], 15, rnd[54]); - b = ii(b, c, d, a, x[k + 5], 21, rnd[55]); - a = ii(a, b, c, d, x[k + 12], 6, rnd[56]); - d = ii(d, a, b, c, x[k + 3], 10, rnd[57]); - c = ii(c, d, a, b, x[k + 10], 15, rnd[58]); - b = ii(b, c, d, a, x[k + 1], 21, rnd[59]); - a = ii(a, b, c, d, x[k + 8], 6, rnd[60]); - d = ii(d, a, b, c, x[k + 15], 10, rnd[61]); - c = ii(c, d, a, b, x[k + 6], 15, rnd[62]); - b = ii(b, c, d, a, x[k + 13], 21, rnd[63]); - a = ii(a, b, c, d, x[k + 4], 6, rnd[64]); - d = ii(d, a, b, c, x[k + 11], 10, rnd[65]); - c = ii(c, d, a, b, x[k + 2], 15, rnd[66]); - b = ii(b, c, d, a, x[k + 9], 21, rnd[67]); - a = addUnsigned(a, AA); - b = addUnsigned(b, BB); - c = addUnsigned(c, CC); - d = addUnsigned(d, DD); - } - - return wordToHex(a).concat(wordToHex(b), wordToHex(c), wordToHex(d)); - }, - - encString = function(plaintext, key, iv) { - plaintext = s2a(plaintext); - - key = s2a(key); - for (var i=key.length; i<32; i++) - key[i] = 0; - - if (iv == null) { - iv = genIV(); - } else { - iv = s2a(iv); - for (var i=iv.length; i<16; i++) - iv[i] = 0; - } - - var ct = rawEncrypt(plaintext, key, iv); - var ret = [iv]; - for (var i=0; i> 2]; - b64 += chars[((flatArr[i] & 3) << 4) | (flatArr[i + 1] >> 4)]; - if (! (flatArr[i + 1] === undefined)) { - b64 += chars[((flatArr[i + 1] & 15) << 2) | (flatArr[i + 2] >> 6)]; - } else { - b64 += '='; - } - if (! (flatArr[i + 2] === undefined)) { - b64 += chars[flatArr[i + 2] & 63]; - } else { - b64 += '='; - } - } - // OpenSSL is super particular about line breaks - broken_b64 = b64.slice(0, 64); // + '\n'; - for (i = 1; i < (Math.ceil(b64.length / 64)); i++) { - broken_b64 += b64.slice(i * 64, i * 64 + 64) + (Math.ceil(b64.length / 64) == i + 1 ? '': '\n'); - } - return broken_b64; - }, - - decode = function(string) { - string = string.replace(/\n/g, ''); - var flatArr = [], - c = [], - b = [], - i; - for (i = 0; i < string.length; i = i + 4) { - c[0] = _chars.indexOf(string.charAt(i)); - c[1] = _chars.indexOf(string.charAt(i + 1)); - c[2] = _chars.indexOf(string.charAt(i + 2)); - c[3] = _chars.indexOf(string.charAt(i + 3)); - - b[0] = (c[0] << 2) | (c[1] >> 4); - b[1] = ((c[1] & 15) << 4) | (c[2] >> 2); - b[2] = ((c[2] & 3) << 6) | c[3]; - flatArr.push(b[0], b[1], b[2]); - } - flatArr = flatArr.slice(0, flatArr.length - (flatArr.length % 16)); - return flatArr; - }; - - //internet explorer - if(typeof Array.indexOf === "function") { - _chars = chars; - } - - /* - //other way to solve internet explorer problem - if(!Array.indexOf){ - Array.prototype.indexOf = function(obj){ - for(var i=0; i - - - diff --git a/core/3.4.1/examples/encrypted_chat_demo.html b/core/3.4.1/examples/encrypted_chat_demo.html deleted file mode 100644 index 3d618f47b..000000000 --- a/core/3.4.1/examples/encrypted_chat_demo.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -

AES256 Encryption Demo for JavaScript

- - - -
-
- - -
- - - - - - - - - - diff --git a/core/3.4.1/examples/presence/index.html b/core/3.4.1/examples/presence/index.html deleted file mode 100644 index e54f7c52f..000000000 --- a/core/3.4.1/examples/presence/index.html +++ /dev/null @@ -1,117 +0,0 @@ - - - PubNub Presence Demo - - - - - - - - - - - - - - -
- -

Currently Here

-
    -
-
- - - 0 people here now -
- - -
- - - - - - - -. -*/ - -/* - - - - - -
Loading Simple Chat
- -*/ -var P = PUBNUB -, chat = { - init : function( node_name ) { - var node = P.$(node_name); - - chat.node_name = node_name; - - // Create Nodes - chat.textbox = P.create('input'); - chat.chatbox = P.create('div'); - chat.button = P.create('button'); - - // Button Text - chat.button.innerHTML = 'Send'; - - // Capture Channel - var channel = P.attr( node, 'channel' ); - - // Add Styles - P.attr( chat.chatbox, 'id', 'simple-chat-chatbox' ); - P.attr( chat.textbox, 'id', 'simple-chat-textbox' ); - P.attr( chat.button, 'id', 'simple-chat-button' ); - - // Display Nodes - node.innerHTML = ''; - node.appendChild(chat.chatbox); - node.appendChild(chat.textbox); - node.appendChild(chat.button); - - // Send Sign-on Message - P.publish({ - channel : channel, - message : 'Someone Joined the Chat.' - }); - - function send(e) { - var key = e.keyCode || e.charCode || 0 - , message = chat.textbox.value; - - // Wait for Enter Key - if (key != 13 && e.type == 'keydown' || !message) return true; - - // Reset Value - chat.textbox.value = ''; - - // Send Message - P.publish({ - channel : node_name, - message : message - }); - } - - // Bind Events - P.bind( 'keydown', chat.textbox, send ); - P.bind( 'blur', chat.textbox, send ); - - // Register Listener - P.subscribe({ channel : node_name }, chat.subscribe ); - }, - - subscribe : function(message) { - var br = '
'; - chat.chatbox.innerHTML = message + br + chat.chatbox.innerHTML; - } - -}; - -// Startup Simple Chat -chat.init('simple-chat'); - -})() diff --git a/core/3.4.1/examples/simple.html b/core/3.4.1/examples/simple.html deleted file mode 100644 index 0bcb853ca..000000000 --- a/core/3.4.1/examples/simple.html +++ /dev/null @@ -1,22 +0,0 @@ -
- - diff --git a/core/3.4.1/json.js b/core/3.4.1/json.js deleted file mode 100644 index 5802af653..000000000 --- a/core/3.4.1/json.js +++ /dev/null @@ -1,155 +0,0 @@ -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= JSON =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -(window['JSON'] && window['JSON']['stringify']) || (function () { - window['JSON'] || (window['JSON'] = {}); - - if (typeof String.prototype.toJSON !== 'function') { - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - 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, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - function quote(string) { - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(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 < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - if (typeof JSON['stringify'] !== 'function') { - JSON['stringify'] = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } else if (typeof space === 'string') { - indent = space; - } - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - return str('', {'': value}); - }; - } - - if (typeof JSON['parse'] !== 'function') { - // JSON is parsed on the server for security. - JSON['parse'] = function (text) {return eval('('+text+')')}; - } -}()); diff --git a/core/3.4.1/pubnub-3.4.1.min.js b/core/3.4.1/pubnub-3.4.1.min.js deleted file mode 100644 index 448dfc88c..000000000 --- a/core/3.4.1/pubnub-3.4.1.min.js +++ /dev/null @@ -1,28 +0,0 @@ -(function(){ -function l(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function a(a){b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(a){var b=k[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(b,k){var i,p,j,g,r=d,s,e=k[b];e&&("object"===typeof e&&"function"===typeof e.toJSON)&&(e=e.toJSON(b));"function"===typeof h&&(e=h.call(k,b,e));switch(typeof e){case "string":return a(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e); -case "object":if(!e)return"null";d+=f;s=[];if("[object Array]"===Object.prototype.toString.apply(e)){g=e.length;for(i=0;iq()?(clearTimeout(d),d=setTimeout(b,c)):(f=q(),a())}var d,f=0;return b},u=function(a){return document.getElementById(a)},v=function(a){console.error(a)},y=function(a,c){var b=[];x(a.split(/\s+/),function(a){x((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},x=function(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")},P=function(a){function c(a,b){w||(w=1,a||A(b),e.onerror=null,clearTimeout(m),setTimeout(function(){a&&H();var b=u(E),c=b&&b.parentNode;c&&c.removeChild(b)},O))}if(K||L()){a:{var b,d,f=function(){if(!h){h=1;clearTimeout(J);try{d=JSON.parse(b.responseText)}catch(a){return j(1)}p(d)}},k=0,h=0,t=a.timeout||ga,J=setTimeout(function(){j(1)},t),i=a.b||l(),p=a.c||l(),j=function(a){k||(k=1,clearTimeout(J), -b&&(b.onerror=b.onload=null,b.abort&&b.abort(),b=null),a&&i())};try{b=L()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){j(1)};b.onload=b.onloadend=f;b.timeout=t;var g=a.url.join(ha);if(a.data){var f=[],r,g=g+"?";for(r in a.data)f.push(r+"="+a.data[r]);g+=f.join(ka)}b.open("GET",g,typeof("undefined"===a.h));b.send()}catch(s){j(0);K=0;a=P(a);break a}a=j}return a}var e=fa("script"),g=a.a,E=n(),w=0,m=setTimeout(function(){c(1)},a.timeout||ga),H=a.b||l(), -A=a.c||l();window[g]=function(a){c(0,a)};a.h||(e[la]=la);e.onerror=function(){c(1)};e.src=a.url.join(ha);if(a.data){g=[];e.src+="?";for(f in a.data)g.push(f+"="+a.data[f]);e.src+=g.join(ka)}G(e,"id",E);F().appendChild(e);return c},ma=function(a){var c=[];x(a,function(a,d){d.g&&c.push(a)});return c.sort()},S=function(){PUBNUB.time(q);PUBNUB.time(function(){setTimeout(function(){Q||(Q=1,x(na,function(a){a()}))},O)})},L=function(){if(!oa.get)return 0;var a={id:L.id++,send:l(),abort:function(){a.id={}}, -open:function(c,b){L[a.id]=a;oa.get(a.id,b)}};return a},aa=1,da=/{([\w\-]+)}/g,la="async",ha="/",ka="&",ga=1E4,O=1E3,T="-pnpres",K=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||l());var U,V=window.localStorage;U={get:function(a){try{return V?V.getItem(a):-1==document.cookie.indexOf(a)?null:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null}catch(c){}},set:function(a, -c){try{if(V)return V.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var W,Y=Math.floor(20*Math.random());W=function(a){return 0++Y?Y:Y=1))||a};var Z={list:{},unbind:function(a){Z.list[a]=[]},bind:function(a,c){(Z.list[a]=Z.list[a]||[]).push(c)},fire:function(a,c){x(Z.list[a]||[],function(a){a(c)})}},$=u("pubnub")||{},Q=0,na=[],pa=function(a){function c(){}function b(){}function d(a){x(ma(t),function(b){(b= -t[b])&&a(b)})}function f(){!("onLine"in navigator)||navigator.onLine||h();setTimeout(f,O)}function k(){D.time(function(a){a||h();setTimeout(k,E)})}function h(){p&&p(1)}var t={},J=0,i=0,p=0,j=0,g=0,r=0,s=+a.windowing||10,e=(+a.timeout||310)*O,E=(+a.keepalive||60)*O,w=a.publish_key||"",m=a.subscribe_key||"",H=a.ssl?"s":"",A=a.uuid||U.get(m+"uuid")||"",z="http"+H+"://"+(a.origin||"pubsub.pubnub.com"),D={history:function(a,b){var b=a.callback||b,c=a.count||a.limit||100,d=a.reverse||"false",e=a.error|| -l(),f=a.channel,i=a.start,j=a.end,g={},h=M();if(!f)return v("Missing Channel");if(!b)return v("Missing Callback");if(!m)return v("Missing Subscribe Key");g.stringtoken="true";g.count=c;g.reverse=d;i&&(g.start=i);j&&(g.end=j);P({a:h,data:g,c:function(a){b(a)},b:e,url:[z,"v2","history","sub-key",m,"channel",N(f)]})},replay:function(a){var b=b||a.callback||l(),c=a.source,d=a.destination,e=a.stop,f=a.start,g=a.end,i=a.reverse,a=a.limit,j=M(),h={};if(!c)return v("Missing Source Channel");if(!d)return v("Missing Destination Channel"); -if(!w)return v("Missing Publish Key");if(!m)return v("Missing Subscribe Key");"0"!=j&&(h.callback=j);e&&(h.stop="all");i&&(h.reverse="true");f&&(h.start=f);g&&(h.end=g);a&&(h.count=a);P({a:j,c:function(a){b(a)},b:function(){b([0,"Disconnected"])},url:[z,"v1","replay",w,m,c,d],data:h})},time:function(a){var b=M();P({a:b,timeout:5*O,url:[z,"time",b],c:function(b){a(b[0])},b:function(){a(0)}})},uuid:function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()| -0;return("x"==a?b:b&3|8).toString(16)});a&&a(b);return b},publish:function(a,b){var b=b||a.callback||l(),c=a.message,d=a.channel,e=M();if(!c)return v("Missing Message");if(!d)return v("Missing Channel");if(!w)return v("Missing Publish Key");if(!m)return v("Missing Subscribe Key");c=JSON.stringify(c);c=[z,"publish",w,m,0,N(d),e,N(c)];P({a:e,c:function(a){b(a)},b:function(){b([0,"Disconnected"])},url:c,data:{uuid:A}})},unsubscribe:function(a){a=a.channel;r=0;j=1;a=B((a.join?a.join(","):""+a).split(","), -function(a){return a+","+a+T}).join(",");x(a.split(","),function(a){Q&&b(a,0);t[a]=0});Q&&c()},subscribe:function(a,b){function f(a){a?setTimeout(k,O):(ia=W(z),setTimeout(function(){D.time(f)},O));d(function(b){if(a&&b.d)return b.d=0,b.l(b.name);!a&&!b.d&&(b.d=1,b.k(b.name))})}function k(){var a=M(),b=ma(t).join(",");b&&(p=P({timeout:ra,a:a,b:function(){D.time(f)},data:{uuid:A},url:[ia,"subscribe",m,N(b),a,r],c:function(a){if(!a)return setTimeout(k,ja);d(function(a){a.f||(a.f=1,a.j(a.name))});r=!r&& -j&&U.get(m)||a[1];U.set(m,a[1]);var b,c=(2 - - - - PubNub JavaScript Unit Test - - - - -
- - - - - diff --git a/core/3.4.1/tests/head-test.htm b/core/3.4.1/tests/head-test.htm deleted file mode 100644 index 4b34dd64d..000000000 --- a/core/3.4.1/tests/head-test.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - PubNub JavaScript HEAD INIT TEST - - - - -
- -

Head Test

-
Wait here for an alert() message.
- -
-
- diff --git a/core/3.4.1/tests/head.load.min.js b/core/3.4.1/tests/head.load.min.js deleted file mode 100644 index 6242b0fad..000000000 --- a/core/3.4.1/tests/head.load.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - Head JS The only script in your - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c - - - PubNub JavaScript MailTO Fix - - -
- - -
- × -

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

-
- - - -
0
- -
- - -
- diff --git a/core/3.4.1/tests/multiplexing.html b/core/3.4.1/tests/multiplexing.html deleted file mode 100644 index e6d87ebc4..000000000 --- a/core/3.4.1/tests/multiplexing.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - PubNub JavaScript Multiplexing Test - - - - -
- -
...
- -
- - - -
- diff --git a/core/3.4.1/tests/presence-ssl.html b/core/3.4.1/tests/presence-ssl.html deleted file mode 100644 index 42fe0b810..000000000 --- a/core/3.4.1/tests/presence-ssl.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - PubNub Presence SSL Test - - - - - - - -
- Open the - Developers Console - and watch the presence events section to ensure join/leave. -
- - - - -
- - - - - diff --git a/core/3.4.1/tests/publish-test.html b/core/3.4.1/tests/publish-test.html deleted file mode 100644 index 66e72ecb2..000000000 --- a/core/3.4.1/tests/publish-test.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - PubNub JavaScript Publish IE Fix - - - - -
- - - - -
...
- -
- - - -
- diff --git a/core/3.4.1/tests/ssl-test.html b/core/3.4.1/tests/ssl-test.html deleted file mode 100644 index 1b541eb05..000000000 --- a/core/3.4.1/tests/ssl-test.html +++ /dev/null @@ -1,52 +0,0 @@ - - - -
- -
- - - - diff --git a/core/3.4.1/tests/test.js b/core/3.4.1/tests/test.js deleted file mode 100644 index 2d8de94a6..000000000 --- a/core/3.4.1/tests/test.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('testling'); -var PUBNUB = require('../pubnub-3.4.1'); -var channel = 'unit-test-pubnub-channel'; - -test('PUBNUB JavaScript API', function (test) { - var pubnub = PUBNUB.init({ - publish_key : 'demo', - subscribe_key : 'demo' - }); - - test.plan(14); - - test.ok(PUBNUB); - - test.ok(pubnub); - test.ok(pubnub.publish); - test.ok(pubnub.subscribe); - test.ok(pubnub.history); - test.ok(pubnub.detailedHistory); - test.ok(pubnub.time); - - function publish_test() { - pubnub.publish({ - channel : channel, - message : { test : "test" }, - callback : function(response) { - test.ok(response[0]); - test.equal( response[1], 'Sent' ); - } - }); - } - - function time_test() { - pubnub.time(function(time){ - test.ok(time); - uuid_test(); - }); - } - - function uuid_test() { - pubnub.uuid(function(uuid){ - test.ok(uuid); - history_test(); - }); - } - - function history_test(history) { - pubnub.history({ - limit : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0].test, "test" ); - test.end(); - } - }); - } - - function detailedHistory_test(history) { - pubnub.detailedHistory({ - count : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0][0].test, "test" ); - test.end(); - } - }); - } - pubnub.subscribe({ - channel : channel, - connect : publish_test, - callback : function(message) { - test.ok(message); - test.equal( message.test, "test" ); - time_test(); - } - }); - -}); - diff --git a/core/3.4.1/tests/test.sh b/core/3.4.1/tests/test.sh deleted file mode 100755 index 1b724fdd7..000000000 --- a/core/3.4.1/tests/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -## -------------------------------------------------- -## PubNub 3.4.1 Real-time Cloud Push API - JAVASCRIPT -## -------------------------------------------------- - -## ---------------------------------------------------- -## -## TESTLING - PubNub JavaScript API for Web Browsers -## uses Testling Cloud Service -## for QA and Deployment. -## -## http://www.testling.com/ -## You need this to run './test.sh' unit test. -## -## ---------------------------------------------------- - -if [ -z "$1" ] -then - echo -e "\n\tUSER:PASSWD Required: http://testling.com/\n" - exit -fi - -browsers='firefox/3.6' -browsers=$browsers',firefox/9.0' -browsers=$browsers',firefox/10.0' -browsers=$browsers',chrome/16.0' -browsers=$browsers',chrome/17.0' -browsers=$browsers',iexplore/7.0' -browsers=$browsers',iexplore/8.0' -browsers=$browsers',iexplore/9.0' -browsers=$browsers',safari/5.1' - -echo -e "Testing: $browsers" - -noinstrument='pubnub-3.4.1.js,test.js' - -tar -cf- test.js ../pubnub-3.4.1.js | \ - curl -u $1 -sSNT- \ - "testling.com/?noinstrument=$noinstrument&browsers=$browsers" - diff --git a/core/3.4.1/tests/unit-test.html b/core/3.4.1/tests/unit-test.html deleted file mode 100644 index 71f8e0d86..000000000 --- a/core/3.4.1/tests/unit-test.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - PubNub JavaScript Unit Test - - - - - -
- - -
- × - -

PubNub Unit Tests for JavaScript on Mobile and Desktop Web Browser

-
- - -
- - - 100% Successful - Finished With Errors - ... -
- - - - -
Pass/Fail - Test Ready -
- - - - -
- - - - - - -
- - diff --git a/core/3.4.1/tests/websocket.html b/core/3.4.1/tests/websocket.html deleted file mode 100644 index 7b5bdd40f..000000000 --- a/core/3.4.1/tests/websocket.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - PubNub JavaScript Unit Test - - - - -
- - - - - diff --git a/core/3.4.1/websocket.js b/core/3.4.1/websocket.js deleted file mode 100644 index 818faedf9..000000000 --- a/core/3.4.1/websocket.js +++ /dev/null @@ -1,109 +0,0 @@ -(function(){ - -// --------------------------------------------------------------------------- -// WEBSOCKET INTERFACE -// --------------------------------------------------------------------------- -WebSocket = function( url, protocols ) { - var self = this - , url = self.url = url || '' - , protocol = self.protocol = protocols || 'Sec-WebSocket-Protocol' - , bits = url.split('/') - , setup = { - 'ssl' : bits[0] === 'wss:' - ,'origin' : bits[2] - ,'publish_key' : bits[3] - ,'subscribe_key' : bits[4] - ,'channel' : bits[5] - }; - - // READY STATES - self['CONNECTING'] = 0; // The connection is not yet open. - self['OPEN'] = 1; // The connection is open and ready to communicate. - self['CLOSING'] = 2; // The connection is in the process of closing. - self['CLOSED'] = 3; // The connection is closed or couldn't be opened. - - // CLOSE STATES - self['CLOSE_NORMAL'] = 1000; // Normal Intended Close; completed. - self['CLOSE_GOING_AWAY'] = 1001; // Closed Unexpecttedly. - self['CLOSE_PROTOCOL_ERROR'] = 1002; // Server: Not Supported. - self['CLOSE_UNSUPPORTED'] = 1003; // Server: Unsupported Protocol. - self['CLOSE_TOO_LARGE'] = 1004; // Server: Too Much Data. - self['CLOSE_NO_STATUS'] = 1005; // Server: No reason. - self['CLOSE_ABNORMAL'] = 1006; // Abnormal Disconnect. - - // Events Default - self['onclose'] = self['onerror'] = - self['onmessage'] = self['onopen'] = - self['onsend'] = function(){}; - - // Attributes - self['binaryType'] = ''; - self['extensions'] = ''; - self['bufferedAmount'] = 0; - self['trasnmitting'] = false; - self['buffer'] = []; - self['readyState'] = self['CONNECTING']; - - // Close if no setup. - if (!url) { - self['readyState'] = self['CLOSED']; - self['onclose']({ - 'code' : self['CLOSE_ABNORMAL'], - 'reason' : 'Missing URL', - 'wasClean' : true - }); - return self; - } - - // PubNub WebSocket Emulation - self.pubnub = PUBNUB['init'](setup); - self.pubnub.setup = setup; - self.setup = setup; - - self.pubnub['subscribe']({ - 'restore' : false, - 'channel' : setup['channel'], - 'disconnect' : self['onerror'], - 'reconnect' : self['onopen'], - 'error' : function() { - self['onclose']({ - 'code' : self['CLOSE_ABNORMAL'], - 'reason' : 'Missing URL', - 'wasClean' : false - }); - }, - 'callback' : function(message) { - self['onmessage']({ 'data' : message }); - }, - 'connect' : function() { - self['readyState'] = self['OPEN']; - self['onopen'](); - } - }); -}; - -// --------------------------------------------------------------------------- -// WEBSOCKET SEND -// --------------------------------------------------------------------------- -WebSocket.prototype.send = function(data) { - var self = this; - self.pubnub['publish']({ - 'channel' : self.pubnub.setup['channel'], - 'message' : data, - 'callback' : function(response) { - self['onsend']({ 'data' : response }); - } - }); -}; - -// --------------------------------------------------------------------------- -// WEBSOCKET CLOSE -// --------------------------------------------------------------------------- -WebSocket.prototype.close = function() { - var self = this; - self.pubnub['unsubscribe']({ 'channel' : self.pubnub.setup['channel'] }); - self['readyState'] = self['CLOSED']; - self['onclose']({}); -}; - -})(); diff --git a/core/3.4/build-minify-pubnub b/core/3.4/build-minify-pubnub deleted file mode 100755 index 62877617a..000000000 --- a/core/3.4/build-minify-pubnub +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -echo $1 - -googleminify=$1 - -if [ -z "$googleminify" ]; then googleminify="/opt/minify/compiler.jar"; fi - -echo -e " " -echo -e " USING: $googleminify TO MINIFY..." -echo -e " COMPILING PUBNUB JAVASCRIPT API..." - -cat ./json.js ./pubnub-3.4.js > ./pubnub.tmp -echo "(function(){" > ./pubnub-3.4.min.js -java -jar $googleminify --js=./pubnub.tmp --compilation_level=ADVANCED_OPTIMIZATIONS >> ./pubnub-3.4.min.js -echo "})();" >> ./pubnub-3.4.min.js - -echo -e " >>COMPRESSING<< PUBNUB JAVASCRIPT API..." -cat ./pubnub-3.4.min.js | gzip -c9 > ./pubnub-3.4.min.js.gz - -rm ./pubnub.tmp -echo -e " " -echo -e " DONE!\n" diff --git a/core/3.4/crypto/encrypt-pubnub.js b/core/3.4/crypto/encrypt-pubnub.js deleted file mode 100644 index 8663b5202..000000000 --- a/core/3.4/crypto/encrypt-pubnub.js +++ /dev/null @@ -1,238 +0,0 @@ -// ===================================================================== -// STANFORD CRYPTO Library with AES Encryption -// ===================================================================== - -PUBNUB.secure = (function () { - - GibberishAES.size(256); - var cipher_key = ""; - var iv = GibberishAES.s2a("0123456789012345"); - - - function encrypt(data) { - - var hex_message = GibberishAES.s2a(JSON.stringify(data)); - var encryptedHexArray = GibberishAES.rawEncrypt(hex_message, cipher_key, iv); - var base_64_encrypted = GibberishAES.Base64.encode(encryptedHexArray); - return base_64_encrypted || data.data.message; - } - - function decrypt(data, options) { - options = options ? options : {}; - - try { - var binary_enc = GibberishAES.Base64.decode(data); - var json_plain = GibberishAES.rawDecrypt(binary_enc, cipher_key, iv, false); - var plaintext = JSON.parse(json_plain); - - return plaintext; - } - catch (e) { - return options.parse_error || null; - } - } - - - return function (setup) { - - cipher_key = GibberishAES.s2a(SHA256(setup.cipher_key).slice(0,32)); - - var pubnub = PUBNUB.init(setup); - - return { - time: PUBNUB.time, - - publish: function (args) { - args.message = encrypt(args.message); - return pubnub.publish(args); - }, - subscribe: function (args) { - var callback = args.callback; - args.callback = function (message, envelope, channel) { - var decrypted = decrypt(message); - decrypted && callback(decrypted, envelope, channel); - } - - return pubnub.subscribe(args); - }, - history: function (args) { - - var encrypted_messages = ""; - var old_callback = args.callback; - - function new_callback(response) { - encrypted_messages = response[0]; - - var decrypted_messages = []; - - for (a = 0; a < encrypted_messages.length; a++) { - var new_message = decrypt(encrypted_messages[a], {"parse_error":"DECRYPT_ERROR"}); - decrypted_messages.push((new_message)); - } - - old_callback([decrypted_messages, response[1], response[2]]); - } - - args.callback = new_callback; - - pubnub.history(args); - - return true; - }, - - raw_encrypt: encrypt, - raw_decrypt: decrypt - }; - }; -})(); - -/** - * - * Secure Hash Algorithm (SHA256) - * http://www.webtoolkit.info/ - * - * Original code by Angel Marin, Paul Johnston. - * - **/ - -function SHA256(s) { - - var chrsz = 8; - var hexcase = 0; - - function safe_add(x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); - } - - function S(X, n) { - return ( X >>> n ) | (X << (32 - n)); - } - - function R(X, n) { - return ( X >>> n ); - } - - function Ch(x, y, z) { - return ((x & y) ^ ((~x) & z)); - } - - function Maj(x, y, z) { - return ((x & y) ^ (x & z) ^ (y & z)); - } - - function Sigma0256(x) { - return (S(x, 2) ^ S(x, 13) ^ S(x, 22)); - } - - function Sigma1256(x) { - return (S(x, 6) ^ S(x, 11) ^ S(x, 25)); - } - - function Gamma0256(x) { - return (S(x, 7) ^ S(x, 18) ^ R(x, 3)); - } - - function Gamma1256(x) { - return (S(x, 17) ^ S(x, 19) ^ R(x, 10)); - } - - function core_sha256(m, l) { - var K = new Array(0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0xFC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x6CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2); - var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); - var W = new Array(64); - var a, b, c, d, e, f, g, h, i, j; - var T1, T2; - - m[l >> 5] |= 0x80 << (24 - l % 32); - m[((l + 64 >> 9) << 4) + 15] = l; - - for (var i = 0; i < m.length; i += 16) { - a = HASH[0]; - b = HASH[1]; - c = HASH[2]; - d = HASH[3]; - e = HASH[4]; - f = HASH[5]; - g = HASH[6]; - h = HASH[7]; - - for (var j = 0; j < 64; j++) { - if (j < 16) W[j] = m[j + i]; - else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); - - T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); - T2 = safe_add(Sigma0256(a), Maj(a, b, c)); - - h = g; - g = f; - f = e; - e = safe_add(d, T1); - d = c; - c = b; - b = a; - a = safe_add(T1, T2); - } - - HASH[0] = safe_add(a, HASH[0]); - HASH[1] = safe_add(b, HASH[1]); - HASH[2] = safe_add(c, HASH[2]); - HASH[3] = safe_add(d, HASH[3]); - HASH[4] = safe_add(e, HASH[4]); - HASH[5] = safe_add(f, HASH[5]); - HASH[6] = safe_add(g, HASH[6]); - HASH[7] = safe_add(h, HASH[7]); - } - return HASH; - } - - function str2binb(str) { - var bin = Array(); - var mask = (1 << chrsz) - 1; - for (var i = 0; i < str.length * chrsz; i += chrsz) { - bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32); - } - return bin; - } - - function Utf8Encode(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; - - for (var n = 0; n < string.length; n++) { - - var c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - - return utftext; - } - - function binb2hex(binarray) { - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for (var i = 0; i < binarray.length * 4; i++) { - str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + - hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 )) & 0xF); - } - return str; - } - - s = Utf8Encode(s); - return binb2hex(core_sha256(str2binb(s), s.length * chrsz)); - -} \ No newline at end of file diff --git a/core/3.4/crypto/gibberish-aes.js b/core/3.4/crypto/gibberish-aes.js deleted file mode 100755 index c83cb3b6d..000000000 --- a/core/3.4/crypto/gibberish-aes.js +++ /dev/null @@ -1,998 +0,0 @@ -/** -* @license Gibberish-AES -* A lightweight Javascript Libray for OpenSSL compatible AES CBC encryption. -* -* Author: Mark Percival -* Email: mark@mpercival.com -* Copyright: Mark Percival - http://mpercival.com 2008 -* -* With thanks to: -* Josh Davis - http://www.josh-davis.org/ecmaScrypt -* Chris Veness - http://www.movable-type.co.uk/scripts/aes.html -* Michel I. Gallant - http://www.jensign.com/ -* Jean-Luc Cooke 2012-07-12: added strhex + invertArr to compress G2X/G3X/G9X/GBX/GEX/SBox/SBoxInv/Rcon saving over 7KB, and added encString, decString, also made the MD5 routine more easlier compressible using yuicompressor. -* -* License: MIT -* -* Usage: GibberishAES.enc("secret", "password") -* Outputs: AES Encrypted text encoded in Base64 -*/ - - -var GibberishAES = (function(){ - var Nr = 14, - /* Default to 256 Bit Encryption */ - Nk = 8, - Decrypt = false, - - enc_utf8 = function(s) - { - try { - return unescape(encodeURIComponent(s)); - } - catch(e) { - throw 'Error on UTF-8 encode'; - } - }, - - dec_utf8 = function(s) - { - try { - return decodeURIComponent(escape(s)); - } - catch(e) { - throw ('Bad Key'); - } - }, - - padBlock = function(byteArr) - { - var array = [], cpad, i; - if (byteArr.length < 16) { - cpad = 16 - byteArr.length; - array = [cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad]; - } - for (i = 0; i < byteArr.length; i++) - { - array[i] = byteArr[i]; - } - return array; - }, - - block2s = function(block, lastBlock) - { - var string = '', padding, i; - if (lastBlock) { - padding = block[15]; - if (padding > 16) { - throw ('Decryption error: Maybe bad key'); - } - if (padding == 16) { - return ''; - } - for (i = 0; i < 16 - padding; i++) { - string += String.fromCharCode(block[i]); - } - } else { - for (i = 0; i < 16; i++) { - string += String.fromCharCode(block[i]); - } - } - return string; - }, - - a2h = function(numArr) - { - var string = '', i; - for (i = 0; i < numArr.length; i++) { - string += (numArr[i] < 16 ? '0': '') + numArr[i].toString(16); - } - return string; - }, - - h2a = function(s) - { - var ret = []; - s.replace(/(..)/g, - function(s) { - ret.push(parseInt(s, 16)); - }); - return ret; - }, - - s2a = function(string, binary) { - var array = [], i; - - if (! binary) { - string = enc_utf8(string); - } - - for (i = 0; i < string.length; i++) - { - array[i] = string.charCodeAt(i); - } - - return array; - }, - - size = function(newsize) - { - switch (newsize) - { - case 128: - Nr = 10; - Nk = 4; - break; - case 192: - Nr = 12; - Nk = 6; - break; - case 256: - Nr = 14; - Nk = 8; - break; - default: - throw ('Invalid Key Size Specified:' + newsize); - } - }, - - randArr = function(num) { - var result = [], i; - for (i = 0; i < num; i++) { - result = result.concat(Math.floor(Math.random() * 256)); - } - return result; - }, - - openSSLKey = function(passwordArr, saltArr) { - // Number of rounds depends on the size of the AES in use - // 3 rounds for 256 - // 2 rounds for the key, 1 for the IV - // 2 rounds for 128 - // 1 round for the key, 1 round for the IV - // 3 rounds for 192 since it's not evenly divided by 128 bits - var rounds = Nr >= 12 ? 3: 2, - key = [], - iv = [], - md5_hash = [], - result = [], - data00 = passwordArr.concat(saltArr), - i; - md5_hash[0] = GibberishAES.Hash.MD5(data00); - result = md5_hash[0]; - for (i = 1; i < rounds; i++) { - md5_hash[i] = GibberishAES.Hash.MD5(md5_hash[i - 1].concat(data00)); - result = result.concat(md5_hash[i]); - } - key = result.slice(0, 4 * Nk); - iv = result.slice(4 * Nk, 4 * Nk + 16); - return { - key: key, - iv: iv - }; - }, - - rawEncrypt = function(plaintext, key, iv) { - // plaintext, key and iv as byte arrays - key = expandKey(key); - var numBlocks = Math.ceil(plaintext.length / 16), - blocks = [], - i, - cipherBlocks = []; - for (i = 0; i < numBlocks; i++) { - blocks[i] = padBlock(plaintext.slice(i * 16, i * 16 + 16)); - } - if (plaintext.length % 16 === 0) { - blocks.push([16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16]); - // CBC OpenSSL padding scheme - numBlocks++; - } - for (i = 0; i < blocks.length; i++) { - blocks[i] = (i === 0) ? xorBlocks(blocks[i], iv) : xorBlocks(blocks[i], cipherBlocks[i - 1]); - cipherBlocks[i] = encryptBlock(blocks[i], key); - } - return cipherBlocks; - }, - - rawDecrypt = function(cryptArr, key, iv, binary) { - // cryptArr, key and iv as byte arrays - key = expandKey(key); - var numBlocks = cryptArr.length / 16, - cipherBlocks = [], - i, - plainBlocks = [], - string = ''; - for (i = 0; i < numBlocks; i++) { - cipherBlocks.push(cryptArr.slice(i * 16, (i + 1) * 16)); - } - for (i = cipherBlocks.length - 1; i >= 0; i--) { - plainBlocks[i] = decryptBlock(cipherBlocks[i], key); - plainBlocks[i] = (i === 0) ? xorBlocks(plainBlocks[i], iv) : xorBlocks(plainBlocks[i], cipherBlocks[i - 1]); - } - for (i = 0; i < numBlocks - 1; i++) { - string += block2s(plainBlocks[i]); - } - string += block2s(plainBlocks[i], true); - return binary ? string : dec_utf8(string); - }, - - encryptBlock = function(block, words) { - Decrypt = false; - var state = addRoundKey(block, words, 0), - round; - for (round = 1; round < (Nr + 1); round++) { - state = subBytes(state); - state = shiftRows(state); - if (round < Nr) { - state = mixColumns(state); - } - //last round? don't mixColumns - state = addRoundKey(state, words, round); - } - - return state; - }, - - decryptBlock = function(block, words) { - Decrypt = true; - var state = addRoundKey(block, words, Nr), - round; - for (round = Nr - 1; round > -1; round--) { - state = shiftRows(state); - state = subBytes(state); - state = addRoundKey(state, words, round); - if (round > 0) { - state = mixColumns(state); - } - //last round? don't mixColumns - } - - return state; - }, - - subBytes = function(state) { - var S = Decrypt ? SBoxInv: SBox, - temp = [], - i; - for (i = 0; i < 16; i++) { - temp[i] = S[state[i]]; - } - return temp; - }, - - shiftRows = function(state) { - var temp = [], - shiftBy = Decrypt ? [0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 15, 12, 9, 6, 3] : [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11], - i; - for (i = 0; i < 16; i++) { - temp[i] = state[shiftBy[i]]; - } - return temp; - }, - - mixColumns = function(state) { - var t = [], - c; - if (!Decrypt) { - for (c = 0; c < 4; c++) { - t[c * 4] = G2X[state[c * 4]] ^ G3X[state[1 + c * 4]] ^ state[2 + c * 4] ^ state[3 + c * 4]; - t[1 + c * 4] = state[c * 4] ^ G2X[state[1 + c * 4]] ^ G3X[state[2 + c * 4]] ^ state[3 + c * 4]; - t[2 + c * 4] = state[c * 4] ^ state[1 + c * 4] ^ G2X[state[2 + c * 4]] ^ G3X[state[3 + c * 4]]; - t[3 + c * 4] = G3X[state[c * 4]] ^ state[1 + c * 4] ^ state[2 + c * 4] ^ G2X[state[3 + c * 4]]; - } - }else { - for (c = 0; c < 4; c++) { - t[c*4] = GEX[state[c*4]] ^ GBX[state[1+c*4]] ^ GDX[state[2+c*4]] ^ G9X[state[3+c*4]]; - t[1+c*4] = G9X[state[c*4]] ^ GEX[state[1+c*4]] ^ GBX[state[2+c*4]] ^ GDX[state[3+c*4]]; - t[2+c*4] = GDX[state[c*4]] ^ G9X[state[1+c*4]] ^ GEX[state[2+c*4]] ^ GBX[state[3+c*4]]; - t[3+c*4] = GBX[state[c*4]] ^ GDX[state[1+c*4]] ^ G9X[state[2+c*4]] ^ GEX[state[3+c*4]]; - } - } - - return t; - }, - - addRoundKey = function(state, words, round) { - var temp = [], - i; - for (i = 0; i < 16; i++) { - temp[i] = state[i] ^ words[round][i]; - } - return temp; - }, - - xorBlocks = function(block1, block2) { - var temp = [], - i; - for (i = 0; i < 16; i++) { - temp[i] = block1[i] ^ block2[i]; - } - return temp; - }, - - expandKey = function(key) { - // Expects a 1d number array - var w = [], - temp = [], - i, - r, - t, - flat = [], - j; - - for (i = 0; i < Nk; i++) { - r = [key[4 * i], key[4 * i + 1], key[4 * i + 2], key[4 * i + 3]]; - w[i] = r; - } - - for (i = Nk; i < (4 * (Nr + 1)); i++) { - w[i] = []; - for (t = 0; t < 4; t++) { - temp[t] = w[i - 1][t]; - } - if (i % Nk === 0) { - temp = subWord(rotWord(temp)); - temp[0] ^= Rcon[i / Nk - 1]; - } else if (Nk > 6 && i % Nk == 4) { - temp = subWord(temp); - } - for (t = 0; t < 4; t++) { - w[i][t] = w[i - Nk][t] ^ temp[t]; - } - } - for (i = 0; i < (Nr + 1); i++) { - flat[i] = []; - for (j = 0; j < 4; j++) { - flat[i].push(w[i * 4 + j][0], w[i * 4 + j][1], w[i * 4 + j][2], w[i * 4 + j][3]); - } - } - return flat; - }, - - subWord = function(w) { - // apply SBox to 4-byte word w - for (var i = 0; i < 4; i++) { - w[i] = SBox[w[i]]; - } - return w; - }, - - rotWord = function(w) { - // rotate 4-byte word w left by one byte - var tmp = w[0], - i; - for (i = 0; i < 4; i++) { - w[i] = w[i + 1]; - } - w[3] = tmp; - return w; - }, - -// jlcooke: 2012-07-12: added strhex + invertArr to compress G2X/G3X/G9X/GBX/GEX/SBox/SBoxInv/Rcon saving over 7KB, and added encString, decString - strhex = function(str,size) { - var ret = []; - for (i=0; i0x7f) ? 0x11b^(a<<1) : (a<<1); - b >>>= 1; - } - - return ret; - }, - Gx = function(x) { - var r = []; - for (var i=0; i<256; i++) - r[i] = Gxx(x, i); - return r; - }, - - // S-box -/* - SBox = [ - 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, - 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, - 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, - 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, - 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, - 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, - 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, - 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, - 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, - 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, - 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, - 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, - 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, - 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, - 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, - 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, - 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, - 22], //*/ SBox = strhex('637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16',2), - - // Precomputed lookup table for the inverse SBox -/* SBoxInv = [ - 82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, - 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, - 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, - 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, - 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, - 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, - 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, - 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, - 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, - 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, - 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, - 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, - 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, - 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, - 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, - 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, - 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, - 125], //*/ SBoxInv = invertArr(SBox), - - // Rijndael Rcon -/* - Rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, - 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145], -//*/ Rcon = strhex('01020408102040801b366cd8ab4d9a2f5ebc63c697356ad4b37dfaefc591',2), - -/* - G2X = [ - 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, - 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, - 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, - 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, - 0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 0x76, - 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, - 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa4, 0xa6, - 0xa8, 0xaa, 0xac, 0xae, 0xb0, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 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b, 0x58, 0x5d, 0x5e, 0x57, 0x54, 0x51, 0x52, 0x43, 0x40, 0x45, 0x46, - 0x4f, 0x4c, 0x49, 0x4a, 0x6b, 0x68, 0x6d, 0x6e, 0x67, 0x64, 0x61, 0x62, - 0x73, 0x70, 0x75, 0x76, 0x7f, 0x7c, 0x79, 0x7a, 0x3b, 0x38, 0x3d, 0x3e, - 0x37, 0x34, 0x31, 0x32, 0x23, 0x20, 0x25, 0x26, 0x2f, 0x2c, 0x29, 0x2a, - 0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, - 0x1f, 0x1c, 0x19, 0x1a - ], //*/ G3X = Gx(3), - -/* - G9X = [ - 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, - 0x6c, 0x65, 0x7e, 0x77, 0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, - 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7, 0x3b, 0x32, 0x29, 0x20, - 0x1f, 0x16, 0x0d, 0x04, 0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c, - 0xab, 0xa2, 0xb9, 0xb0, 0x8f, 0x86, 0x9d, 0x94, 0xe3, 0xea, 0xf1, 0xf8, - 0xc7, 0xce, 0xd5, 0xdc, 0x76, 0x7f, 0x64, 0x6d, 0x52, 0x5b, 0x40, 0x49, - 0x3e, 0x37, 0x2c, 0x25, 0x1a, 0x13, 0x08, 0x01, 0xe6, 0xef, 0xf4, 0xfd, - 0xc2, 0xcb, 0xd0, 0xd9, 0xae, 0xa7, 0xbc, 0xb5, 0x8a, 0x83, 0x98, 0x91, - 0x4d, 0x44, 0x5f, 0x56, 0x69, 0x60, 0x7b, 0x72, 0x05, 0x0c, 0x17, 0x1e, - 0x21, 0x28, 0x33, 0x3a, 0xdd, 0xd4, 0xcf, 0xc6, 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, 0xa8, 0xa5, 0x86, 0x8b, 0x9c, 0x91, - 0x0a, 0x07, 0x10, 0x1d, 0x3e, 0x33, 0x24, 0x29, 0x62, 0x6f, 0x78, 0x75, - 0x56, 0x5b, 0x4c, 0x41, 0x61, 0x6c, 0x7b, 0x76, 0x55, 0x58, 0x4f, 0x42, - 0x09, 0x04, 0x13, 0x1e, 0x3d, 0x30, 0x27, 0x2a, 0xb1, 0xbc, 0xab, 0xa6, - 0x85, 0x88, 0x9f, 0x92, 0xd9, 0xd4, 0xc3, 0xce, 0xed, 0xe0, 0xf7, 0xfa, - 0xb7, 0xba, 0xad, 0xa0, 0x83, 0x8e, 0x99, 0x94, 0xdf, 0xd2, 0xc5, 0xc8, - 0xeb, 0xe6, 0xf1, 0xfc, 0x67, 0x6a, 0x7d, 0x70, 0x53, 0x5e, 0x49, 0x44, - 0x0f, 0x02, 0x15, 0x18, 0x3b, 0x36, 0x21, 0x2c, 0x0c, 0x01, 0x16, 0x1b, - 0x38, 0x35, 0x22, 0x2f, 0x64, 0x69, 0x7e, 0x73, 0x50, 0x5d, 0x4a, 0x47, - 0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, - 0x80, 0x8d, 0x9a, 0x97 - ], //*/ GDX = Gx(0xd), - -/* - GEX = [ - 0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, - 0x48, 0x46, 0x54, 0x5a, 0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, - 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba, 0xdb, 0xd5, 0xc7, 0xc9, - 0xe3, 0xed, 0xff, 0xf1, 0xab, 0xa5, 0xb7, 0xb9, 0x93, 0x9d, 0x8f, 0x81, - 0x3b, 0x35, 0x27, 0x29, 0x03, 0x0d, 0x1f, 0x11, 0x4b, 0x45, 0x57,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0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, - 0x9f, 0x91, 0x83, 0x8d - ], //*/ GEX = Gx(0xe), - - enc = function(string, pass, binary) { - // string, password in plaintext - var salt = randArr(8), - pbe = openSSLKey(s2a(pass, binary), salt), - key = pbe.key, - iv = pbe.iv, - cipherBlocks, - saltBlock = [[83, 97, 108, 116, 101, 100, 95, 95].concat(salt)]; - string = s2a(string, binary); - cipherBlocks = rawEncrypt(string, key, iv); - // Spells out 'Salted__' - cipherBlocks = saltBlock.concat(cipherBlocks); - return Base64.encode(cipherBlocks); - }, - - dec = function(string, pass, binary) { - // string, password in plaintext - var cryptArr = Base64.decode(string), - salt = cryptArr.slice(8, 16), - pbe = openSSLKey(s2a(pass, binary), salt), - key = pbe.key, - iv = pbe.iv; - cryptArr = cryptArr.slice(16, cryptArr.length); - // Take off the Salted__ffeeddcc - string = rawDecrypt(cryptArr, key, iv, binary); - return string; - }, - - MD5 = function(numArr) { - - function rotateLeft(lValue, iShiftBits) { - return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); - } - - function addUnsigned(lX, lY) { - var lX4, - lY4, - lX8, - lY8, - lResult; - lX8 = (lX & 0x80000000); - lY8 = (lY & 0x80000000); - lX4 = (lX & 0x40000000); - lY4 = (lY & 0x40000000); - lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); - if (lX4 & lY4) { - return (lResult ^ 0x80000000 ^ lX8 ^ lY8); - } - if (lX4 | lY4) { - if (lResult & 0x40000000) { - return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); - } else { - return (lResult ^ 0x40000000 ^ lX8 ^ lY8); - } - } else { - return (lResult ^ lX8 ^ lY8); - } - } - - function f(x, y, z) { - return (x & y) | ((~x) & z); - } - function g(x, y, z) { - return (x & z) | (y & (~z)); - } - function h(x, y, z) { - return (x ^ y ^ z); - } - function funcI(x, y, z) { - return (y ^ (x | (~z))); - } - - function ff(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(f(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function gg(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(g(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function hh(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(h(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function ii(a, b, c, d, x, s, ac) { - a = addUnsigned(a, addUnsigned(addUnsigned(funcI(b, c, d), x), ac)); - return addUnsigned(rotateLeft(a, s), b); - } - - function convertToWordArray(numArr) { - var lWordCount, - lMessageLength = numArr.length, - lNumberOfWords_temp1 = lMessageLength + 8, - lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64, - lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16, - lWordArray = [], - lBytePosition = 0, - lByteCount = 0; - while (lByteCount < lMessageLength) { - lWordCount = (lByteCount - (lByteCount % 4)) / 4; - lBytePosition = (lByteCount % 4) * 8; - lWordArray[lWordCount] = (lWordArray[lWordCount] | (numArr[lByteCount] << lBytePosition)); - lByteCount++; - } - lWordCount = (lByteCount - (lByteCount % 4)) / 4; - lBytePosition = (lByteCount % 4) * 8; - lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); - lWordArray[lNumberOfWords - 2] = lMessageLength << 3; - lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; - return lWordArray; - } - - function wordToHex(lValue) { - var lByte, - lCount, - wordToHexArr = []; - for (lCount = 0; lCount <= 3; lCount++) { - lByte = (lValue >>> (lCount * 8)) & 255; - wordToHexArr = wordToHexArr.concat(lByte); - } - return wordToHexArr; - } - - /*function utf8Encode(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = "", - n, - c; - - for (n = 0; n < string.length; n++) { - - c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - - return utftext; - }*/ - - var x = [], - k, - AA, - BB, - CC, - DD, - a, - b, - c, - d, - rnd = strhex('67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391',8); - - x = convertToWordArray(numArr); - - a = rnd[0]; - b = rnd[1]; - c = rnd[2]; - d = rnd[3] - - for (k = 0; k < x.length; k += 16) { - AA = a; - BB = b; - CC = c; - DD = d; - a = ff(a, b, c, d, x[k + 0], 7, rnd[4]); - d = ff(d, a, b, c, x[k + 1], 12, rnd[5]); - c = ff(c, d, a, b, x[k + 2], 17, rnd[6]); - b = ff(b, c, d, a, x[k + 3], 22, rnd[7]); - a = ff(a, b, c, d, x[k + 4], 7, rnd[8]); - d = ff(d, a, b, c, x[k + 5], 12, rnd[9]); - c = ff(c, d, a, b, x[k + 6], 17, rnd[10]); - b = ff(b, c, d, a, x[k + 7], 22, rnd[11]); - a = ff(a, b, c, d, x[k + 8], 7, rnd[12]); - d = ff(d, a, b, c, x[k + 9], 12, rnd[13]); - c = ff(c, d, a, b, x[k + 10], 17, rnd[14]); - b = ff(b, c, d, a, x[k + 11], 22, rnd[15]); - a = ff(a, b, c, d, x[k + 12], 7, rnd[16]); - d = ff(d, a, b, c, x[k + 13], 12, rnd[17]); - c = ff(c, d, a, b, x[k + 14], 17, rnd[18]); - b = ff(b, c, d, a, x[k + 15], 22, rnd[19]); - a = gg(a, b, c, d, x[k + 1], 5, rnd[20]); - d = gg(d, a, b, c, x[k + 6], 9, rnd[21]); - c = gg(c, d, a, b, x[k + 11], 14, rnd[22]); - b = gg(b, c, d, a, x[k + 0], 20, rnd[23]); - a = gg(a, b, c, d, x[k + 5], 5, rnd[24]); - d = gg(d, a, b, c, x[k + 10], 9, rnd[25]); - c = gg(c, d, a, b, x[k + 15], 14, rnd[26]); - b = gg(b, c, d, a, x[k + 4], 20, rnd[27]); - a = gg(a, b, c, d, x[k + 9], 5, rnd[28]); - d = gg(d, a, b, c, x[k + 14], 9, rnd[29]); - c = gg(c, d, a, b, x[k + 3], 14, rnd[30]); - b = gg(b, c, d, a, x[k + 8], 20, rnd[31]); - a = gg(a, b, c, d, x[k + 13], 5, rnd[32]); - d = gg(d, a, b, c, x[k + 2], 9, rnd[33]); - c = gg(c, d, a, b, x[k + 7], 14, rnd[34]); - b = gg(b, c, d, a, x[k + 12], 20, rnd[35]); - a = hh(a, b, c, d, x[k + 5], 4, rnd[36]); - d = hh(d, a, b, c, x[k + 8], 11, rnd[37]); - c = hh(c, d, a, b, x[k + 11], 16, rnd[38]); - b = hh(b, c, d, a, x[k + 14], 23, rnd[39]); - a = hh(a, b, c, d, x[k + 1], 4, rnd[40]); - d = hh(d, a, b, c, x[k + 4], 11, rnd[41]); - c = hh(c, d, a, b, x[k + 7], 16, rnd[42]); - b = hh(b, c, d, a, x[k + 10], 23, rnd[43]); - a = hh(a, b, c, d, x[k + 13], 4, rnd[44]); - d = hh(d, a, b, c, x[k + 0], 11, rnd[45]); - c = hh(c, d, a, b, x[k + 3], 16, rnd[46]); - b = hh(b, c, d, a, x[k + 6], 23, rnd[47]); - a = hh(a, b, c, d, x[k + 9], 4, rnd[48]); - d = hh(d, a, b, c, x[k + 12], 11, rnd[49]); - c = hh(c, d, a, b, x[k + 15], 16, rnd[50]); - b = hh(b, c, d, a, x[k + 2], 23, rnd[51]); - a = ii(a, b, c, d, x[k + 0], 6, rnd[52]); - d = ii(d, a, b, c, x[k + 7], 10, rnd[53]); - c = ii(c, d, a, b, x[k + 14], 15, rnd[54]); - b = ii(b, c, d, a, x[k + 5], 21, rnd[55]); - a = ii(a, b, c, d, x[k + 12], 6, rnd[56]); - d = ii(d, a, b, c, x[k + 3], 10, rnd[57]); - c = ii(c, d, a, b, x[k + 10], 15, rnd[58]); - b = ii(b, c, d, a, x[k + 1], 21, rnd[59]); - a = ii(a, b, c, d, x[k + 8], 6, rnd[60]); - d = ii(d, a, b, c, x[k + 15], 10, rnd[61]); - c = ii(c, d, a, b, x[k + 6], 15, rnd[62]); - b = ii(b, c, d, a, x[k + 13], 21, rnd[63]); - a = ii(a, b, c, d, x[k + 4], 6, rnd[64]); - d = ii(d, a, b, c, x[k + 11], 10, rnd[65]); - c = ii(c, d, a, b, x[k + 2], 15, rnd[66]); - b = ii(b, c, d, a, x[k + 9], 21, rnd[67]); - a = addUnsigned(a, AA); - b = addUnsigned(b, BB); - c = addUnsigned(c, CC); - d = addUnsigned(d, DD); - } - - return wordToHex(a).concat(wordToHex(b), wordToHex(c), wordToHex(d)); - }, - - encString = function(plaintext, key, iv) { - plaintext = s2a(plaintext); - - key = s2a(key); - for (var i=key.length; i<32; i++) - key[i] = 0; - - if (iv == null) { - iv = genIV(); - } else { - iv = s2a(iv); - for (var i=iv.length; i<16; i++) - iv[i] = 0; - } - - var ct = rawEncrypt(plaintext, key, iv); - var ret = [iv]; - for (var i=0; i> 2]; - b64 += chars[((flatArr[i] & 3) << 4) | (flatArr[i + 1] >> 4)]; - if (! (flatArr[i + 1] === undefined)) { - b64 += chars[((flatArr[i + 1] & 15) << 2) | (flatArr[i + 2] >> 6)]; - } else { - b64 += '='; - } - if (! (flatArr[i + 2] === undefined)) { - b64 += chars[flatArr[i + 2] & 63]; - } else { - b64 += '='; - } - } - // OpenSSL is super particular about line breaks - broken_b64 = b64.slice(0, 64); // + '\n'; - for (i = 1; i < (Math.ceil(b64.length / 64)); i++) { - broken_b64 += b64.slice(i * 64, i * 64 + 64) + (Math.ceil(b64.length / 64) == i + 1 ? '': '\n'); - } - return broken_b64; - }, - - decode = function(string) { - string = string.replace(/\n/g, ''); - var flatArr = [], - c = [], - b = [], - i; - for (i = 0; i < string.length; i = i + 4) { - c[0] = _chars.indexOf(string.charAt(i)); - c[1] = _chars.indexOf(string.charAt(i + 1)); - c[2] = _chars.indexOf(string.charAt(i + 2)); - c[3] = _chars.indexOf(string.charAt(i + 3)); - - b[0] = (c[0] << 2) | (c[1] >> 4); - b[1] = ((c[1] & 15) << 4) | (c[2] >> 2); - b[2] = ((c[2] & 3) << 6) | c[3]; - flatArr.push(b[0], b[1], b[2]); - } - flatArr = flatArr.slice(0, flatArr.length - (flatArr.length % 16)); - return flatArr; - }; - - //internet explorer - if(typeof Array.indexOf === "function") { - _chars = chars; - } - - /* - //other way to solve internet explorer problem - if(!Array.indexOf){ - Array.prototype.indexOf = function(obj){ - for(var i=0; i - - - -

AES256 Encryption Demo for JavaScript

- - - -
-
- - -
- - - - - - - - - - \ No newline at end of file diff --git a/core/3.4/json.js b/core/3.4/json.js deleted file mode 100644 index 5802af653..000000000 --- a/core/3.4/json.js +++ /dev/null @@ -1,155 +0,0 @@ -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= JSON =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -(window['JSON'] && window['JSON']['stringify']) || (function () { - window['JSON'] || (window['JSON'] = {}); - - if (typeof String.prototype.toJSON !== 'function') { - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - 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, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - function quote(string) { - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(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 < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - if (typeof JSON['stringify'] !== 'function') { - JSON['stringify'] = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } else if (typeof space === 'string') { - indent = space; - } - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - return str('', {'': value}); - }; - } - - if (typeof JSON['parse'] !== 'function') { - // JSON is parsed on the server for security. - JSON['parse'] = function (text) {return eval('('+text+')')}; - } -}()); diff --git a/core/3.4/pubnub-3.4.min.js b/core/3.4/pubnub-3.4.min.js deleted file mode 100644 index 8bd625098..000000000 --- a/core/3.4/pubnub-3.4.min.js +++ /dev/null @@ -1,25 +0,0 @@ -(function(){ -function n(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function a(a){b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(a){var b=j[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(b,j){var h,l,i,g,p=d,k,f=j[b];f&&("object"===typeof f&&"function"===typeof f.toJSON)&&(f=f.toJSON(b));"function"===typeof m&&(f=m.call(j,b,f));switch(typeof f){case "string":return a(f);case "number":return isFinite(f)?String(f):"null";case "boolean":case "null":return String(f); -case "object":if(!f)return"null";d+=e;k=[];if("[object Array]"===Object.prototype.toString.apply(f)){g=f.length;for(h=0;hr()?(clearTimeout(d),d=setTimeout(b,c)):(e=r(),a())}var d,e=0;return b},s=function(a){return document.getElementById(a)},t=function(a){console.error(a)},w=function(a,c){var b=[];u(a.split(/\s+/),function(a){u((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},u=function(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")},O=function(a){function c(a,b){D||(D=1,a||ma(b),f.onerror=null,clearTimeout(na),setTimeout(function(){a&&oa();var b=s(v),D=b&&b.parentNode;D&&D.removeChild(b)},K))}if(G||H()){a:{var b,d,e=function(){if(!m){m=1;clearTimeout(z);try{d=JSON.parse(b.responseText)}catch(a){return i(1)}l(d)}},j=0,m=0,y=a.timeout||L,z=setTimeout(function(){i(1)},y),h=a.b||n(),l=a.c||n(),i=function(a){j||(j=1,clearTimeout(z), -b&&(b.onerror=b.onload=null,b.abort&&b.abort(),b=null),a&&h())};try{b=H()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){i(1)};b.onload=b.onloadend=e;b.timeout=y;var g=a.url.join(M);if(a.data){var e=[],p,g=g+"?";for(p in a.data)e.push(p+"="+a.data[p]);g+=e.join(N)}b.open("GET",g,typeof("undefined"===a.g));b.send()}catch(k){i(0);G=0;a=O(a);break a}a=i}return a}var f=F("script"),g=a.a,v=q(),D=0,na=setTimeout(function(){c(1)},a.timeout||L),oa=a.b||n(),ma= -a.c||n();window[g]=function(a){c(0,a)};a.g||(f[Q]=Q);f.onerror=function(){c(1)};f.src=a.url.join(M);if(a.data){g=[];f.src+="?";for(key in a.data)g.push(key+"="+a.data[key]);f.src+=g.join(N)}C(f,"id",v);B().appendChild(f);return c},R=function(a){var c=[];u(a,function(a,d){d.f&&c.push(a)});return c.sort()},T=function(){PUBNUB.time(r);PUBNUB.time(function(){setTimeout(function(){S||(S=1,u(ha,function(a){a()}))},K)})},H=function(){if(!ia.get)return 0;var a={id:H.id++,send:n(),abort:function(){a.id={}}, -open:function(c,b){H[a.id]=a;ia.get(a.id,b)}};return a},aa=1,fa=/{([\w\-]+)}/g,Q="async",M="/",N="&",L=1E4,K=1E3,U="-pnpres",G=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||n());var V,W=window.localStorage;V={get:function(a){try{return W?W.getItem(a):-1==document.cookie.indexOf(a)?null:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null}catch(c){}},set:function(a,c){try{if(W)return W.setItem(a, -c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var X,Y=Math.floor(20*Math.random());X=function(a){return 0++Y?Y:Y=1))||a};var Z={list:{},unbind:function(a){Z.list[a]=[]},bind:function(a,c){(Z.list[a]=Z.list[a]||[]).push(c)},fire:function(a,c){u(Z.list[a]||[],function(a){a(c)})}},$=s("pubnub")||{},S=0,ha=[],ja=function(a){function c(){}function b(){}function d(a){u(R(e),function(b){(b=e[b])&&a(b)})}var e= -{},j=0,m=0,y=0,z=0,h=0,l=0,i=a.publish_key||"",g=a.subscribe_key||"",p=a.ssl?"s":"",k=a.uuid||V.get(g+"uuid")||"",f="http"+p+"://"+(a.origin||"pubsub.pubnub.com"),v={history:function(a,b){var b=a.callback||b,c=a.count||a.limit||100,d=a.reverse||"false",e=a.error||n(),h=a.channel,i=a.start,k=a.end,j={},l=I();if(!h)return t("Missing Channel");if(!b)return t("Missing Callback");if(!g)return t("Missing Subscribe Key");j.stringtoken="true";j.count=c;j.reverse=d;i&&(j.start=i);k&&(j.end=k);O({a:l,data:j, -c:function(a){b(a)},b:e,url:[f,"v2","history","sub-key",g,"channel",J(h)]})},replay:function(a){var b=b||a.callback||n(),c=a.source,d=a.destination,e=a.stop,h=a.start,j=a.end,k=a.reverse,a=a.limit,l=I(),m={};if(!c)return t("Missing Source Channel");if(!d)return t("Missing Destination Channel");if(!i)return t("Missing Publish Key");if(!g)return t("Missing Subscribe Key");"0"!=l&&(m.callback=l);e&&(m.stop="all");k&&(m.reverse="true");h&&(m.start=h);j&&(m.end=j);a&&(m.count=a);O({a:l,c:function(a){b(a)}, -b:function(){b([0,"Disconnected"])},url:[f,"v1","replay",i,g,c,d],data:m})},time:function(a){var b=I();O({a:b,url:[f,"time",b],c:function(b){a(b[0])},b:function(){a(0)}})},uuid:function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)});a&&a(b);return b},publish:function(a,b){var b=b||a.callback||n(),c=a.message,d=a.channel,e=I();if(!c)return t("Missing Message");if(!d)return t("Missing Channel");if(!i)return t("Missing Publish Key"); -if(!g)return t("Missing Subscribe Key");c=JSON.stringify(c);c=[f,"publish",i,g,0,J(d),e,J(c)];O({a:e,c:function(a){b(a)},b:function(){b([0,"Disconnected"])},url:c,data:{uuid:k}})},unsubscribe:function(a){a=a.channel;l=0;z=1;a=x((a.join?a.join(","):""+a).split(","),function(a){return a+","+a+U}).join(",");u(a.split(","),function(a){S&&b(a,0);e[a]=0});S&&c()},subscribe:function(a,b){function i(){var a=I(),b=R(e).join(",");b&&(y=O({timeout:ra,a:a,data:{uuid:k},url:[da,"subscribe",g,J(b),a,l],b:function(){d(function(a){a.d|| -(a.d=1,a.i(a.name))});da=X(f);setTimeout(i,K);v.time(function(a){d(function(b){a&&b.d&&(b.d=0,b.j(b.name))})})},c:function(a){if(!a)return setTimeout(i,ca);d(function(a){a.e||(a.e=1,a.h(a.name))});l=!l&&z&&V.get(g)||a[1];V.set(g,a[1]);var b,c=(2 - - - PubNub JavaScript HEAD INIT TEST - - - - -
- -

Head Test

-
Wait here for an alert() message.
- -
-
- diff --git a/core/3.4/tests/head.load.min.js b/core/3.4/tests/head.load.min.js deleted file mode 100644 index 6242b0fad..000000000 --- a/core/3.4/tests/head.load.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - Head JS The only script in your - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c - - - PubNub JavaScript MailTO Fix - - -
- - -
- × -

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

-
- - - -
0
- -
- - -
- diff --git a/core/3.4/tests/multiplexing.html b/core/3.4/tests/multiplexing.html deleted file mode 100644 index 670a6de76..000000000 --- a/core/3.4/tests/multiplexing.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - PubNub JavaScript Multiplexing Test - - - - -
- -
...
- -
- - - -
- diff --git a/core/3.4/tests/presence-ssl.html b/core/3.4/tests/presence-ssl.html deleted file mode 100644 index 4482b921e..000000000 --- a/core/3.4/tests/presence-ssl.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - PubNub Presence SSL Test - - - - - - - -
- Open the - Developers Console - and watch the presence events section to ensure join/leave. -
- - - - -
- - - - - diff --git a/core/3.4/tests/ssl-test.html b/core/3.4/tests/ssl-test.html deleted file mode 100644 index c8f125cf0..000000000 --- a/core/3.4/tests/ssl-test.html +++ /dev/null @@ -1,52 +0,0 @@ - - - -
- -
- - - - diff --git a/core/3.4/tests/test.js b/core/3.4/tests/test.js deleted file mode 100644 index 0b925cfd7..000000000 --- a/core/3.4/tests/test.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('testling'); -var PUBNUB = require('../pubnub-3.4'); -var channel = 'unit-test-pubnub-channel'; - -test('PUBNUB JavaScript API', function (test) { - var pubnub = PUBNUB.init({ - publish_key : 'demo', - subscribe_key : 'demo' - }); - - test.plan(14); - - test.ok(PUBNUB); - - test.ok(pubnub); - test.ok(pubnub.publish); - test.ok(pubnub.subscribe); - test.ok(pubnub.history); - test.ok(pubnub.detailedHistory); - test.ok(pubnub.time); - - function publish_test() { - pubnub.publish({ - channel : channel, - message : { test : "test" }, - callback : function(response) { - test.ok(response[0]); - test.equal( response[1], 'Sent' ); - } - }); - } - - function time_test() { - pubnub.time(function(time){ - test.ok(time); - uuid_test(); - }); - } - - function uuid_test() { - pubnub.uuid(function(uuid){ - test.ok(uuid); - history_test(); - }); - } - - function history_test(history) { - pubnub.history({ - limit : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0].test, "test" ); - test.end(); - } - }); - } - - function detailedHistory_test(history) { - pubnub.detailedHistory({ - count : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0][0].test, "test" ); - test.end(); - } - }); - } - pubnub.subscribe({ - channel : channel, - connect : publish_test, - callback : function(message) { - test.ok(message); - test.equal( message.test, "test" ); - time_test(); - } - }); - -}); - diff --git a/core/3.4/tests/test.sh b/core/3.4/tests/test.sh deleted file mode 100755 index 4636b2935..000000000 --- a/core/3.4/tests/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -## ------------------------------------------------ -## PubNub 3.4 Real-time Cloud Push API - JAVASCRIPT -## ------------------------------------------------ - -## ---------------------------------------------------- -## -## TESTLING - PubNub JavaScript API for Web Browsers -## uses Testling Cloud Service -## for QA and Deployment. -## -## http://www.testling.com/ -## You need this to run './test.sh' unit test. -## -## ---------------------------------------------------- - -if [ -z "$1" ] -then - echo -e "\n\tUSER:PASSWD Required: http://testling.com/\n" - exit -fi - -browsers='firefox/3.6' -browsers=$browsers',firefox/9.0' -browsers=$browsers',firefox/10.0' -browsers=$browsers',chrome/16.0' -browsers=$browsers',chrome/17.0' -browsers=$browsers',iexplore/7.0' -browsers=$browsers',iexplore/8.0' -browsers=$browsers',iexplore/9.0' -browsers=$browsers',safari/5.1' - -echo -e "Testing: $browsers" - -noinstrument='pubnub-3.4.js,test.js' - -tar -cf- test.js ../pubnub-3.4.js | \ - curl -u $1 -sSNT- \ - "testling.com/?noinstrument=$noinstrument&browsers=$browsers" - diff --git a/core/3.4/tests/unit-test.html b/core/3.4/tests/unit-test.html deleted file mode 100644 index 2659db3ce..000000000 --- a/core/3.4/tests/unit-test.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - PubNub JavaScript Unit Test - - - - - -
- - -
- × - -

PubNub Unit Tests for JavaScript on Mobile and Desktop Web Browser

-
- - -
- - - 100% Successful - Finished With Errors - ... -
- - - - -
Pass/Fail - Test Ready -
- - - - -
- - - - - - -
- - \ No newline at end of file diff --git a/core/crypto/gibberish-aes.js b/core/crypto/gibberish-aes.js index 92e468e8c..39b60883c 100755 --- a/core/crypto/gibberish-aes.js +++ b/core/crypto/gibberish-aes.js @@ -192,7 +192,7 @@ PUBNUB['crypto'] = (function(){ string += block2s(plainBlocks[i]); } string += block2s(plainBlocks[i], true); - return binary ? string : dec_utf8(string); + return binary ? string : dec_utf8(string); }, encryptBlock = function(block, words) { @@ -267,7 +267,7 @@ PUBNUB['crypto'] = (function(){ t[3+c*4] = GBX[state[c*4]] ^ GDX[state[1+c*4]] ^ G9X[state[2+c*4]] ^ GEX[state[3+c*4]]; } } - + return t; }, @@ -610,7 +610,7 @@ PUBNUB['crypto'] = (function(){ string = rawDecrypt(cryptArr, key, iv, binary); return string; }, - + MD5 = function(numArr) { function rotateLeft(lValue, iShiftBits) { @@ -873,7 +873,7 @@ PUBNUB['crypto'] = (function(){ // Takes a Nx16x1 byte array and converts it to Base64 var _chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', chars = _chars.split(''), - + encode = function(b, withBreaks) { var flatArr = [], b64 = '', @@ -904,7 +904,7 @@ PUBNUB['crypto'] = (function(){ } return broken_b64; }, - + decode = function(string) { string = string.replace(/\n/g, ''); var flatArr = [], @@ -925,12 +925,12 @@ PUBNUB['crypto'] = (function(){ flatArr = flatArr.slice(0, flatArr.length - (flatArr.length % 16)); return flatArr; }; - + //internet explorer if(typeof Array.indexOf === "function") { _chars = chars; } - + /* //other way to solve internet explorer problem if(!Array.indexOf){ @@ -944,8 +944,8 @@ PUBNUB['crypto'] = (function(){ } } */ - - + + return { "encode": encode, "decode": decode diff --git a/core/examples/presence/index.html b/core/examples/presence/index.html deleted file mode 100644 index e54f7c52f..000000000 --- a/core/examples/presence/index.html +++ /dev/null @@ -1,117 +0,0 @@ - - - PubNub Presence Demo - - - - - - - - - - - - - - -
- -

Currently Here

-
    -
-
- - - 0 people here now -
- - -
- - - - - - - - 0 - && origin.replace( - 'pubsub', 'ps' + (++ori < 10 ? ori : ori=1) - ) || origin; - } -})(); - -/** - * UPDATER - * ====== - * var timestamp = unique(); - */ -function updater( fun, rate ) { - var timeout - , last = 0 - , runnit = function() { - if (last + rate > rnow()) { - clearTimeout(timeout); - timeout = setTimeout( runnit, rate ); - } - else { - last = rnow(); - fun(); - } - }; - - return runnit; -} - -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * LOG - * === - * log('message'); - */ -function log(message) { console['log'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { console.log(item) } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - -/** - * GREP - * ==== - * var list = grep( [1,2,3], function(item) { return item % 2 } ) - */ -function grep( list, fun ) { - var fin = []; - each( list || [], function(l) { fun(l) && fin.push(l) } ); - return fin -} - -/** - * SUPPLANT - * ======== - * var text = supplant( 'Hello {name}!', { name : 'John' } ) - */ -function supplant( str, values ) { - return str.replace( REPL, function( _, match ) { - return values[match] || _ - } ); -} - -/** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * console.log( element, '1st anchor' ) - * } ); - */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); -} - -/** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); - */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; -} - -/** - * HEAD - * ==== - * head().appendChild(elm); - */ -function head() { return search('head')[0] } - -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); -} - -/** - * CSS - * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - -/** - * timeout - * ======= - * timeout( function(){}, 100 ); - */ -function timeout( fun, wait ) { - return setTimeout( fun, wait ); -} - -/** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); - */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } - -/** - * ENCODE - * ====== - * var encoded_path = encode('path'); - */ -function encode(path) { - return map( (encodeURIComponent(path)).split(''), function(chr) { - return "-_.!~*'()".indexOf(chr) < 0 ? chr : - "%"+chr.charCodeAt(0).toString(16).toUpperCase() - } ).join(''); -} - -/** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * - */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; - -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - script[ASYNC] = ASYNC; - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); - if (setup.data) { - script.src += "?"; - for (key in setup.data) { - script.src += key+"="+setup.data[key]+"&"; - } - } - - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr - , finished = function() { - if (loaded) return; - loaded = 1; - - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , timer = timeout( function(){done(1)}, XHRTME ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = XHRTME; - - url = setup.url.join(URLBIT); - if (setup.data) { - url += "?"; - for (key in setup.data) { - url += key+"="+setup.data[key]+"&"; - } - } - - xhr.open( 'GET', url, true ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); - } - - // Return 'done' - return done; -} - - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -var PDIV = $('pubnub') || {} -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - var CHANNELS = {} - , PUBLISH_KEY = setup['publish_key'] || '' - , SUBSCRIBE_KEY = setup['subscribe_key'] || '' - , SSL = setup['ssl'] ? 's' : '' - , UUID = setup['uuid'] || db.get(SUBSCRIBE_KEY+'uuid') || '' - , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') - , SELF = { - /* - PUBNUB.history({ - channel : 'my_chat_channel', - limit : 100, - callback : function(messages) { console.log(messages) } - }); - */ - 'history' : function( args, callback ) { - var callback = args['callback'] || callback - , limit = args['limit'] || 100 - , channel = args['channel'] - , jsonp = jsonp_cb(); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - - // Send Message - xdr({ - callback : jsonp, - url : [ - ORIGIN, 'history', - SUBSCRIBE_KEY, encode(channel), - jsonp, limit - ], - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - /* - PUBNUB.time(function(time){ console.log(time) }); - */ - 'time' : function(callback) { - var jsonp = jsonp_cb(); - xdr({ - callback : jsonp, - url : [ORIGIN, 'time', jsonp], - success : function(response) { callback(response[0]) }, - fail : function() { callback(0) } - }); - }, - - /* - PUBNUB.uuid(function(uuid) { console.log(uuid) }); - */ - 'uuid' : function(callback) { - var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); - return v.toString(16); - }); - if (callback) callback(u); - return u; - }, - - /* - PUBNUB.publish({ - channel : 'my_chat_channel', - message : 'hello!' - }); - */ - 'publish' : function( args, callback ) { - var callback = callback || args['callback'] || function(){} - , message = args['message'] - , channel = args['channel'] - , jsonp = jsonp_cb() - , url; - - if (!message) return log('Missing Message'); - if (!channel) return log('Missing Channel'); - if (!PUBLISH_KEY) return log('Missing Publish Key'); - - // If trying to send Object - message = JSON['stringify'](message); - - // Create URL - url = [ - ORIGIN, 'publish', - PUBLISH_KEY, SUBSCRIBE_KEY, - 0, encode(channel), - jsonp, encode(message) - ]; - - // Send Message - xdr({ - callback : jsonp, - success : function(response) { callback(response) }, - fail : function() { callback([ 0, 'Disconnected' ]) }, - url : url, - data : { uuid: UUID } - }); - }, - /* - PUBNUB.unsubscribe({ channel : 'my_chat' }); - */ - 'unsubscribe' : function(args) { - var channel = args['channel']; - - // Leave if there never was a channel. - if (!(channel in CHANNELS)) return; - - // Disable Channel - CHANNELS[channel].connected = 0; - - // Abort and Remove Script - CHANNELS[channel].done && - CHANNELS[channel].done(0); - }, - - /* - PUBNUB.subscribe({ - channel : 'my_chat' - callback : function(message) { console.log(message) } - }); - */ - 'subscribe' : function( args, callback ) { - var channel = args['channel'] - , callback = callback || args['callback'] - , subscribe_key= args['subscribe_key'] || SUBSCRIBE_KEY - , restore = args['restore'] - , timetoken = 0 - , error = args['error'] || function(){} - , connect = args['connect'] || function(){} - , reconnect = args['reconnect'] || function(){} - , disconnect = args['disconnect'] || function(){} - , presence = args['presence'] || function(){} - , disconnected = 0 - , connected = 0 - , origin = nextorigin(ORIGIN); - - // Reduce Status Flicker - if (!READY) return READY_BUFFER.push([ args, callback, SELF ]); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - if (!SUBSCRIBE_KEY) return log('Missing Subscribe Key'); - - if (!(channel in CHANNELS)) CHANNELS[channel] = {}; - - // Make sure we have a Channel - if (CHANNELS[channel].connected) return log('Already Connected'); - CHANNELS[channel].connected = 1; - - // Recurse Subscribe - function pubnub() { - var jsonp = jsonp_cb(); - - // Stop Connection - if (!CHANNELS[channel].connected) return; - - // Connect to PubNub Subscribe Servers - CHANNELS[channel].done = xdr({ - callback : jsonp, - url : [ - origin, 'subscribe', - subscribe_key, encode(channel), - jsonp, timetoken - ], - data : { uuid: UUID }, - fail : function() { - // Disconnect - if (!disconnected) { - disconnected = 1; - disconnect(); - } - timeout( pubnub, SECOND ); - SELF['time'](function(success){ - // Reconnect - if (success && disconnected) { - disconnected = 0; - reconnect(); - } - else { - error(); - } - }); - }, - success : function(messages) { - if (!CHANNELS[channel].connected) return; - - // Connect - if (!connected) { - connected = 1; - connect(); - } - - // Reconnect - if (disconnected) { - disconnected = 0; - reconnect(); - } - - // Restore Previous Connection Point if Needed - // Also Update Timetoken - restore = db.set( - SUBSCRIBE_KEY + channel, - timetoken = restore && db.get( - subscribe_key + channel - ) || messages[1] - ); - - each( messages[0], function(msg) { - callback( msg, messages ); - } ); - - timeout( pubnub, 10 ); - }, - - }); - } - - // Begin Recursive Subscribe - pubnub(); - - if (args['presence']) { - SELF.subscribe({ - channel: args['channel']+"-pnpres", - callback: presence, - restore: args['restore'] - }); - } - }, - 'here_now' : function( args, callback ) { - var callback = args['callback'] || callback - , channel = args['channel'] - , jsonp = jsonp_cb() - , origin = nextorigin(ORIGIN); - - // Make sure we have a Channel - if (!channel) return log('Missing Channel'); - if (!callback) return log('Missing Callback'); - - data = null; - if (jsonp != '0') { data['callback']=jsonp; } - - // Send Message - xdr({ - callback : jsonp, - url : [ - origin, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, - 'channel', encode(channel) - ], - data: data, - success : function(response) { callback(response) }, - fail : function(response) { log(response) } - }); - }, - - // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'each' : each, - 'map' : map, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB - }; - - if (UUID == '') UUID = SELF.uuid(); - db.set(SUBSCRIBE_KEY+'uuid', UUID); - - return SELF; -}; - -// CREATE A PUBNUB GLOBAL OBJECT -PUBNUB = CREATE_PUBNUB({ - 'publish_key' : attr( PDIV, 'pub-key' ), - 'subscribe_key' : attr( PDIV, 'sub-key' ), - 'ssl' : attr( PDIV, 'ssl' ) == 'on', - 'origin' : attr( PDIV, 'origin' ), - 'uuid' : attr( PDIV, 'uuid' ) -}); - -// PUBNUB Flash Socket -css( PDIV, { 'position' : 'absolute', 'top' : -SECOND } ); - -if ('opera' in window || attr( PDIV, 'flash' )) PDIV['innerHTML'] = - ''; - -var pubnubs = $('pubnubs') || {}; - -// PUBNUB READY TO CONNECT -function ready() { PUBNUB['time'](rnow); -PUBNUB['time'](function(t){ timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(sub) { - sub[2]['subscribe']( sub[0], sub[1] ) - } ); -}, SECOND ); }); } - -// Bind for PUBNUB Readiness to Subscribe -bind( 'load', window, function(){ timeout( ready, 0 ) } ); - -// Create Interface for Opera Flash -PUBNUB['rdx'] = function( id, data ) { - if (!data) return FDomainRequest[id]['onerror'](); - FDomainRequest[id]['responseText'] = unescape(data); - FDomainRequest[id]['onload'](); -}; - -function FDomainRequest() { - if (!pubnubs['get']) return 0; - - var fdomainrequest = { - 'id' : FDomainRequest['id']++, - 'send' : function() {}, - 'abort' : function() { fdomainrequest['id'] = {} }, - 'open' : function( method, url ) { - FDomainRequest[fdomainrequest['id']] = fdomainrequest; - pubnubs['get']( fdomainrequest['id'], url ); - } - }; - - return fdomainrequest; -} -FDomainRequest['id'] = SECOND; - -// jQuery Interface -window['jQuery'] && (window['jQuery']['PUBNUB'] = PUBNUB); - -// For Testling.js - http://testling.com/ -typeof module !== 'undefined' && (module.exports = PUBNUB) && ready(); - -})(); diff --git a/core/examples/simple-chat.js b/core/examples/simple-chat.js deleted file mode 100644 index 5b0192ba1..000000000 --- a/core/examples/simple-chat.js +++ /dev/null @@ -1,119 +0,0 @@ -(function(){ - -/* - PubNub Real Time Push APIs and Notifications Framework - Copyright (c) 2010 Stephen Blum - http://www.google.com/profiles/blum.stephen - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -/* - - - - - -
Loading Simple Chat
- -*/ -var P = PUBNUB -, chat = { - init : function( node_name ) { - var node = P.$(node_name); - - chat.node_name = node_name; - - // Create Nodes - chat.textbox = P.create('input'); - chat.chatbox = P.create('div'); - chat.button = P.create('button'); - - // Button Text - chat.button.innerHTML = 'Send'; - - // Capture Channel - var channel = P.attr( node, 'channel' ); - - // Add Styles - P.attr( chat.chatbox, 'id', 'simple-chat-chatbox' ); - P.attr( chat.textbox, 'id', 'simple-chat-textbox' ); - P.attr( chat.button, 'id', 'simple-chat-button' ); - - // Display Nodes - node.innerHTML = ''; - node.appendChild(chat.chatbox); - node.appendChild(chat.textbox); - node.appendChild(chat.button); - - // Send Sign-on Message - P.publish({ - channel : channel, - message : 'Someone Joined the Chat.' - }); - - function send(e) { - var key = e.keyCode || e.charCode || 0 - , message = chat.textbox.value; - - // Wait for Enter Key - if (key != 13 && e.type == 'keydown' || !message) return true; - - // Reset Value - chat.textbox.value = ''; - - // Send Message - P.publish({ - channel : node_name, - message : message - }); - } - - // Bind Events - P.bind( 'keydown', chat.textbox, send ); - P.bind( 'blur', chat.textbox, send ); - - // Register Listener - P.subscribe({ channel : node_name }, chat.subscribe ); - }, - - subscribe : function(message) { - var br = '
'; - chat.chatbox.innerHTML = message + br + chat.chatbox.innerHTML; - } - -}; - -// Startup Simple Chat -chat.init('simple-chat'); - -})() diff --git a/core/pubnub-common.js b/core/pubnub-common.js new file mode 100644 index 000000000..a32d8bb4f --- /dev/null +++ b/core/pubnub-common.js @@ -0,0 +1,691 @@ +var NOW = 1 +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; + +/** + * UTILITIES + */ +function unique() { return'x'+ ++NOW+''+(+new Date) } +function rnow() { return+new Date } + +/** + * NEXTORIGIN + * ========== + * var next_origin = nextorigin(); + */ +var nextorigin = (function() { + var max = 20 + , ori = Math.floor(Math.random() * max); + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 + && origin.replace( + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; + } +})(); + + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + +/** + * UPDATER + * ======= + * var timestamp = unique(); + */ +function updater( fun, rate ) { + var timeout + , last = 0 + , runnit = function() { + if (last + rate > rnow()) { + clearTimeout(timeout); + timeout = setTimeout( runnit, rate ); + } + else { + last = rnow(); + fun(); + } + }; + + return runnit; +} + +/** + * GREP + * ==== + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +function grep( list, fun ) { + var fin = []; + each( list || [], function(l) { fun(l) && fin.push(l) } ); + return fin +} + +/** + * SUPPLANT + * ======== + * var text = supplant( 'Hello {name}!', { name : 'John' } ) + */ +function supplant( str, values ) { + return str.replace( REPL, function( _, match ) { + return values[match] || _ + } ); +} + +/** + * timeout + * ======= + * timeout( function(){}, 100 ); + */ +function timeout( fun, wait ) { + return setTimeout( fun, wait ); +} + +/** + * uuid + * ==== + * var my_uuid = uuid(); + */ +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; +} + +/** + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} + +/** + * ENCODE + * ====== + * var encoded_path = encode('path'); + */ +function encode(path) { + return map( (encodeURIComponent(path)).split(''), function(chr) { + return "-_.!~*'()".indexOf(chr) < 0 ? chr : + "%"+chr.charCodeAt(0).toString(16).toUpperCase() + } ).join(''); +} + +/** + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); + */ +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} + +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } + +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, + /* + PUBNUB.history({ + channel : 'my_chat_channel', + limit : 100, + callback : function(history) { } + }); + */ + 'history' : function( args, callback ) { + var callback = args['callback'] || callback + , count = args['count'] || args['limit'] || 100 + , reverse = args['reverse'] || "false" + , err = args['error'] || function(){} + , channel = args['channel'] + , start = args['start'] + , end = args['end'] + , params = {} + , jsonp = jsonp_cb(); + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + params['stringtoken'] = 'true'; + params['count'] = count; + params['reverse'] = reverse; + + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; + + // Send Message + xdr({ + callback : jsonp, + data : params, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'history', 'sub-key', + SUBSCRIBE_KEY, 'channel', encode(channel) + ] + }); + }, + + /* + PUBNUB.replay({ + source : 'my_channel', + destination : 'new_channel' + }); + */ + 'replay' : function(args) { + var callback = callback || args['callback'] || function(){} + , source = args['source'] + , destination = args['destination'] + , stop = args['stop'] + , start = args['start'] + , end = args['end'] + , reverse = args['reverse'] + , limit = args['limit'] + , jsonp = jsonp_cb() + , data = {} + , url; + + // Check User Input + if (!source) return error('Missing Source Channel'); + if (!destination) return error('Missing Destination Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup URL Params + if (jsonp != '0') data['callback'] = jsonp; + if (stop) data['stop'] = 'all'; + if (reverse) data['reverse'] = 'true'; + if (start) data['start'] = start; + if (end) data['end'] = end; + if (limit) data['count'] = limit; + + // Compose URL Parts + url = [ + STD_ORIGIN, 'v1', 'replay', + PUBLISH_KEY, SUBSCRIBE_KEY, + source, destination + ]; + + // Start (or Stop) Replay! + xdr({ + callback : jsonp, + success : function(response) { callback(response) }, + fail : function() { callback([ 0, 'Disconnected' ]) }, + url : url, + data : data + }); + }, + + /* + PUBNUB.time(function(time){ }); + */ + 'time' : function(callback) { + var jsonp = jsonp_cb(); + xdr({ + callback : jsonp, + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], + success : function(response) { callback(response[0]) }, + fail : function() { callback(0) } + }); + }, + + /* + PUBNUB.publish({ + channel : 'my_chat_channel', + message : 'hello!' + }); + */ + 'publish' : function( args, callback ) { + var callback = callback || args['callback'] || function(){} + , msg = args['message'] + , channel = args['channel'] + , jsonp = jsonp_cb() + , url; + + if (!msg) return error('Missing Message'); + if (!channel) return error('Missing Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // If trying to send Object + msg = JSON['stringify'](msg); + + // Create URL + url = [ + STD_ORIGIN, 'publish', + PUBLISH_KEY, SUBSCRIBE_KEY, + 0, encode(channel), + jsonp, encode(msg) + ]; + + // Queue Message Send + PUB_QUEUE.push({ + callback : jsonp, + timeout : SECOND*5, + url : url, + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} + }); + + // Send Message + publish(); + }, + + /* + PUBNUB.unsubscribe({ channel : 'my_chat' }); + */ + 'unsubscribe' : function(args) { + var channel = args['channel']; + + TIMETOKEN = 0; + SUB_RESTORE = 1; + + // Prepare Channel(s) + channel = map( ( + channel.join ? channel.join(',') : ''+channel + ).split(','), function(channel) { + return channel + ',' + channel + PRESENCE_SUFFIX; + } ).join(','); + + // Iterate over Channels + each( channel.split(','), function(channel) { + if (READY) SELF['LEAVE']( channel, 0 ); + CHANNELS[channel] = 0; + } ); + + // ReOpen Connection if Any Channels Left + if (READY) CONNECT(); + }, + + /* + PUBNUB.subscribe({ + channel : 'my_chat' + callback : function(message) { } + }); + */ + 'subscribe' : function( args, callback ) { + var channel = args['channel'] + , callback = callback || args['callback'] + , callback = callback || args['message'] + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['disconnect'] || function(){} + , presence = args['presence'] || 0 + , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 + , sub_timeout = args['timeout'] || SUB_TIMEOUT + , windowing = args['windowing'] || SUB_WINDOWING + , restore = args['restore']; + + // Restore Enabled? + if (restore) SUB_RESTORE = 1; + + TIMETOKEN = 0; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup Channel(s) + each( (channel.join ? channel.join(',') : ''+channel).split(','), + function(channel) { + var settings = CHANNELS[channel] || {}; + + // Store Channel State + CHANNELS[SUB_CHANNEL = channel] = { + name : channel, + connected : settings.connected, + disconnected : settings.disconnected, + subscribed : 1, + callback : SUB_CALLBACK = callback, + connect : connect, + disconnect : disconnect, + reconnect : reconnect + }; + + // Presence Enabled? + if (!presence) return; + + // Subscribe Presence Channel + SELF['subscribe']({ + 'channel' : channel + PRESENCE_SUFFIX, + 'callback' : presence + }); + + // Presence Subscribed? + if (settings.subscribed) return; + + // See Who's Here Now? + if (noheresync) return; + SELF['here_now']({ + 'channel' : channel, + 'callback' : function(here) { + each( 'uuids' in here ? here['uuids'] : [], + function(uid) { presence( { + 'action' : 'join', + 'uuid' : uid, + 'timestamp' : rnow(), + 'occupancy' : here['occupancy'] || 1 + }, here, channel ); } ); + } + }); + } ); + + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + + // Evented Subscribe + function _connect() { + var jsonp = jsonp_cb() + , channels = generate_channel_list(CHANNELS).join(','); + + // Stop Connection + if (!channels) return; + + // Connect to PubNub Subscribe Servers + SUB_RECEIVER = xdr({ + timeout : sub_timeout, + callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, + data : { 'uuid' : UUID }, + url : [ + SUB_ORIGIN, 'subscribe', + SUBSCRIBE_KEY, encode(channels), + jsonp, TIMETOKEN + ], + success : function(messages) { + if (!messages) return timeout( _connect, windowing ); + + // Connect + each_channel(function(channel){ + if (channel.connected) return; + channel.connected = 1; + channel.connect(channel.name); + }); + + // Restore Previous Connection Point if Needed + TIMETOKEN = !TIMETOKEN && + SUB_RESTORE && + db['get'](SUBSCRIBE_KEY) || messages[1]; + + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + + // Update Saved Timetoken + db['set']( SUBSCRIBE_KEY, messages[1] ); + + // Route Channel <---> Callback for Message + var next_callback = (function() { + var channels = (messages.length>2?messages[2]:'') + , list = channels.split(','); + + return function() { + var channel = list.shift()||''; + return [ + (CHANNELS[channel]||{}) + .callback||SUB_CALLBACK, + (channel||SUB_CHANNEL) + .split(PRESENCE_SUFFIX)[0] + ]; + }; + })(); + + each( messages[0], function(msg) { + var next = next_callback(); + if (!CHANNELS[next[1]].subscribed) return; + next[0]( msg, messages, next[1] ); + } ); + + timeout( _connect, windowing ); + } + }); + } + + CONNECT = function() { + // Close Previous Subscribe Connection + _reset_offline(); + + // Begin Recursive Subscribe + clearTimeout(SUB_BUFF_WAIT); + SUB_BUFF_WAIT = timeout( _connect, 100 ); + }; + + // Reduce Status Flicker + if (!READY) return READY_BUFFER.push(CONNECT); + + // Connect Now + CONNECT(); + }, + + 'here_now' : function( args, callback ) { + var callback = args['callback'] || callback + , err = args['error'] || function(){} + , channel = args['channel'] + , jsonp = jsonp_cb() + , data = null; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } + + xdr({ + callback : jsonp, + data : data, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, + 'channel', encode(channel) + ] + }); + }, + + // Expose PUBNUB Functions + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater + }; + + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); + } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} diff --git a/core/tests/disconnect-patch-for-top-h.html b/core/tests/disconnect-patch-for-top-h.html deleted file mode 100644 index 67b4c9bb3..000000000 --- a/core/tests/disconnect-patch-for-top-h.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - PubNub JavaScript Unit Test - - - - -
- - - - - diff --git a/core/tests/head-test.htm b/core/tests/head-test.htm deleted file mode 100644 index 1c36d5a22..000000000 --- a/core/tests/head-test.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - PubNub JavaScript HEAD INIT TEST - - - - -
- -

Head Test

-
Wait here for an alert() message.
- -
-
- diff --git a/core/tests/head.load.min.js b/core/tests/head.load.min.js deleted file mode 100644 index 6242b0fad..000000000 --- a/core/tests/head.load.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - Head JS The only script in your - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c - - - PubNub JavaScript MailTO Fix - - -
- - -
- × -

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

-
- - - -
0
- -
- - -
- diff --git a/core/tests/multiplexing.html b/core/tests/multiplexing.html deleted file mode 100644 index 40756d7c3..000000000 --- a/core/tests/multiplexing.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - PubNub JavaScript Multiplexing Test - - - - -
- -
...
- -
- - - -
- diff --git a/core/tests/presence-ssl.html b/core/tests/presence-ssl.html deleted file mode 100644 index 04e838080..000000000 --- a/core/tests/presence-ssl.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - PubNub Presence SSL Test - - - - - - - -
- Open the - Developers Console - and watch the presence events section to ensure join/leave. -
- - - - -
- - - - - diff --git a/core/tests/publish-test.html b/core/tests/publish-test.html deleted file mode 100644 index 425c99fa0..000000000 --- a/core/tests/publish-test.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - PubNub JavaScript Publish IE Fix - - - - -
- - - - -
...
- -
- - - -
- diff --git a/core/tests/ssl-test.html b/core/tests/ssl-test.html deleted file mode 100644 index 729cd9081..000000000 --- a/core/tests/ssl-test.html +++ /dev/null @@ -1,52 +0,0 @@ - - - -
- -
- - - - diff --git a/core/tests/test.js b/core/tests/test.js deleted file mode 100644 index cc333cf50..000000000 --- a/core/tests/test.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('testling'); -var PUBNUB = require('../pubnub'); -var channel = 'unit-test-pubnub-channel'; - -test('PUBNUB JavaScript API', function (test) { - var pubnub = PUBNUB.init({ - publish_key : 'demo', - subscribe_key : 'demo' - }); - - test.plan(14); - - test.ok(PUBNUB); - - test.ok(pubnub); - test.ok(pubnub.publish); - test.ok(pubnub.subscribe); - test.ok(pubnub.history); - test.ok(pubnub.detailedHistory); - test.ok(pubnub.time); - - function publish_test() { - pubnub.publish({ - channel : channel, - message : { test : "test" }, - callback : function(response) { - test.ok(response[0]); - test.equal( response[1], 'Sent' ); - } - }); - } - - function time_test() { - pubnub.time(function(time){ - test.ok(time); - uuid_test(); - }); - } - - function uuid_test() { - pubnub.uuid(function(uuid){ - test.ok(uuid); - history_test(); - }); - } - - function history_test(history) { - pubnub.history({ - limit : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0].test, "test" ); - test.end(); - } - }); - } - - function detailedHistory_test(history) { - pubnub.detailedHistory({ - count : 1, - channel : channel, - callback : function(messages) { - test.ok(messages); - test.equal( messages[0][0].test, "test" ); - test.end(); - } - }); - } - pubnub.subscribe({ - channel : channel, - connect : publish_test, - callback : function(message) { - test.ok(message); - test.equal( message.test, "test" ); - time_test(); - } - }); - -}); - diff --git a/core/tests/test.sh b/core/tests/test.sh deleted file mode 100755 index dd3804dff..000000000 --- a/core/tests/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -## -------------------------------------------------- -## PubNub Real-time Cloud Push API - JAVASCRIPT -## -------------------------------------------------- - -## ---------------------------------------------------- -## -## TESTLING - PubNub JavaScript API for Web Browsers -## uses Testling Cloud Service -## for QA and Deployment. -## -## http://www.testling.com/ -## You need this to run './test.sh' unit test. -## -## ---------------------------------------------------- - -if [ -z "$1" ] -then - echo -e "\n\tUSER:PASSWD Required: http://testling.com/\n" - exit -fi - -browsers='firefox/3.6' -browsers=$browsers',firefox/9.0' -browsers=$browsers',firefox/10.0' -browsers=$browsers',chrome/16.0' -browsers=$browsers',chrome/17.0' -browsers=$browsers',iexplore/7.0' -browsers=$browsers',iexplore/8.0' -browsers=$browsers',iexplore/9.0' -browsers=$browsers',safari/5.1' - -echo -e "Testing: $browsers" - -noinstrument='pubnub.js,test.js' - -tar -cf- test.js ../pubnub.js | \ - curl -u $1 -sSNT- \ - "testling.com/?noinstrument=$noinstrument&browsers=$browsers" - diff --git a/core/tests/unit-test.html b/core/tests/unit-test.html deleted file mode 100644 index 493abec5d..000000000 --- a/core/tests/unit-test.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - PubNub JavaScript Unit Test - - - - - -
- - -
- × - -

PubNub Unit Tests for JavaScript on Mobile and Desktop Web Browser

-
- - -
- - - 100% Successful - Finished With Errors - ... -
- - - - -
Pass/Fail - Test Ready -
- - - - -
- - - - - - -
- - diff --git a/core/tests/websocket.html b/core/tests/websocket.html deleted file mode 100644 index d1409d409..000000000 --- a/core/tests/websocket.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - PubNub JavaScript Unit Test - - - - -
- - - - - diff --git a/core/websocket.js b/core/websocket.js index 486d8a328..bc8dd5dc4 100644 --- a/core/websocket.js +++ b/core/websocket.js @@ -34,7 +34,7 @@ var WS = PUBNUB['ws'] = function( url, protocols ) { self['CLOSE_ABNORMAL'] = 1006; // Abnormal Disconnect. // Events Default - self['onclose'] = self['onerror'] = + self['onclose'] = self['onerror'] = self['onmessage'] = self['onopen'] = self['onsend'] = function(){}; diff --git a/empty.js b/empty.js new file mode 100644 index 000000000..e69de29bb diff --git a/examples/ascii-player/ascii-player.html b/examples/ascii-player/ascii-player.html index 84bff1d20..798361290 100644 --- a/examples/ascii-player/ascii-player.html +++ b/examples/ascii-player/ascii-player.html @@ -66,7 +66,7 @@ function parse(data) { return data } - + })(); diff --git a/examples/audio-mosaic/audio-mosaic.html b/examples/audio-mosaic/audio-mosaic.html index d6b488b49..c56cdc777 100644 --- a/examples/audio-mosaic/audio-mosaic.html +++ b/examples/audio-mosaic/audio-mosaic.html @@ -1,14 +1,14 @@ - - - - PubNub Audio Mosaic + + + + PubNub Audio Mosaic - +
+ diff --git a/phonegap/pubnub-crypto.min.js b/phonegap/pubnub-crypto.min.js new file mode 100644 index 000000000..e43568caa --- /dev/null +++ b/phonegap/pubnub-crypto.min.js @@ -0,0 +1,25 @@ +(function(){ +PUBNUB.crypto=function(){var e=14,j=8,r=!1,u=function(b,f){var c="",d,p;if(f){d=b[15];if(16p;p++)c+=String.fromCharCode(b[p]);return c},t=function(b,f){var c=[],d;if(!f)try{b=unescape(encodeURIComponent(b))}catch(p){throw"Error on UTF-8 encode";}for(d=0;dj.length&&(s=16-j.length,q=[s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s]);for(s=0;sd;d++)c[d]=f[b[d]];return c},D=function(b){var f=[],c=r?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],d;for(d=0;16>d;d++)f[d]=b[c[d]];return f},E=function(b){var f=[],c;if(r)for(c=0;4>c;c++)f[4*c]=K[b[4*c]]^L[b[1+4*c]]^M[b[2+4*c]]^N[b[3+4*c]],f[1+4*c]=N[b[4*c]]^K[b[1+4*c]]^L[b[2+4*c]]^M[b[3+4*c]],f[2+4*c]=M[b[4*c]]^N[b[1+4*c]]^K[b[2+4*c]]^L[b[3+4*c]], +f[3+4*c]=L[b[4*c]]^M[b[1+4*c]]^N[b[2+4*c]]^K[b[3+4*c]];else for(c=0;4>c;c++)f[4*c]=O[b[4*c]]^P[b[1+4*c]]^b[2+4*c]^b[3+4*c],f[1+4*c]=b[4*c]^O[b[1+4*c]]^P[b[2+4*c]]^b[3+4*c],f[2+4*c]=b[4*c]^b[1+4*c]^O[b[2+4*c]]^P[b[3+4*c]],f[3+4*c]=P[b[4*c]]^b[1+4*c]^b[2+4*c]^O[b[3+4*c]];return f},B=function(b,f,c){var d=[],p;for(p=0;16>p;p++)d[p]=b[p]^f[c][p];return d},A=function(b,f){var c=[],d;for(d=0;16>d;d++)c[d]=b[d]^f[d];return c},w=function(b){var f=[],c=[],d,p,o=[];for(d=0;db;b++)c[b]=f[d-1][b];if(0===d%j){b=c[0];p=void 0;for(p=0;4>p;p++)c[p]=c[p+1];c[3]=b;c=F(c);c[0]^=W[d/j-1]}else 6b;b++)f[d][b]=f[d-j][b]^c[b]}for(d=0;dc;c++)o[d].push(f[4*d+c][0],f[4*d+c][1],f[4*d+c][2],f[4*d+c][3])}return o},F=function(b){for(var f=0;4>f;f++)b[f]=R[b[f]];return b},G=function(b,f){var c=[];for(i=0;ic;c++){for(var d=f,p=c,e=b,j=c,m=void 0,o=void 0,m=o=0;8>m;m++)o=1==(j&1)?o^e:o,e=127>>=1;d[p]=o}return f},R=G("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", +2),T,U=R,V=[];for(i=0;i>2],c+=J[(f[d]&3)<<4|f[d+1]>>4],c+= +void 0!==f[d+1]?J[(f[d+1]&15)<<2|f[d+2]>>6]:"=",c+=void 0!==f[d+2]?J[f[d+2]&63]:"=";b=c.slice(0,64);for(d=1;d>4,d[1]=(c[1]&15)<<4|c[2]>>2,d[2]=(c[2]&3)<<6|c[3],f.push(d[0],d[1],d[2]); +return f=f.slice(0,f.length-f.length%16)}};return{size:function(b){switch(b){case 128:e=10;j=4;break;case 192:e=12;j=6;break;case 256:e=14;j=8;break;default:throw"Invalid Key Size Specified:"+b;}},h2a:function(b){var f=[];b.replace(/(..)/g,function(b){f.push(parseInt(b,16))});return f},expandKey:w,encryptBlock:y,decryptBlock:C,Decrypt:r,s2a:t,rawEncrypt:q,rawDecrypt:v,dec:function(b,f,c){var b=Q.decode(b),d=b.slice(8,16),d=o(t(f,c),d),f=d.key,d=d.iv,b=b.slice(16,b.length);return b=v(b,f,d,c)},openSSLKey:o, +a2h:function(b){var f="",c;for(c=0;cb[c]?"0":"")+b[c].toString(16);return f},enc:function(b,f,c){var d;d=[];var e;for(e=0;8>e;e++)d=d.concat(Math.floor(256*Math.random()));e=o(t(f,c),d);f=e.key;e=e.iv;d=[[83,97,108,116,101,100,95,95].concat(d)];b=t(b,c);b=q(b,f,e);b=d.concat(b);return Q.encode(b)},Hash:{MD5:function(b){function f(b,c){var d,e,f,g,h;f=b&2147483648;g=c&2147483648;d=b&1073741824;e=c&1073741824;h=(b&1073741823)+(c&1073741823);return d&e?h^2147483648^f^g:d|e?h&1073741824? +h^3221225472^f^g:h^1073741824^f^g:h^f^g}function c(b,c,d,e,g,h,k){b=f(b,f(f(c&d|~c&e,g),k));return f(b<>>32-h,c)}function d(b,c,d,e,g,h,k){b=f(b,f(f(c&e|d&~e,g),k));return f(b<>>32-h,c)}function e(b,c,d,g,h,k,l){b=f(b,f(f(c^d^g,h),l));return f(b<>>32-k,c)}function j(b,c,d,e,g,h,k){b=f(b,f(f(d^(c|~e),g),k));return f(b<>>32-h,c)}function o(b){var c,d,e=[];for(d=0;3>=d;d++)c=b>>>8*d&255,e=e.concat(c);return e}var m=[],q,r,v,s,g,h,k,l,n=G("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", +8),m=b.length;q=m+8;r=16*((q-q%64)/64+1);v=[];for(g=s=0;g>>29;m=v;g=n[0];h=n[1];k=n[2];l=n[3];for(b=0;b>16)+(j>>16)+(o>>16)<<16|o&65535}function r(e,j){return e>>>j|e<<32-j}var u;u=e.replace(/\r\n/g,"\n");for(var e="",t=0;to?e+=String.fromCharCode(o):(127o?e+=String.fromCharCode(o>>6|192):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128)),e+=String.fromCharCode(o&63|128))}t=e;u=[];for(o=0;o<8*t.length;o+=8)u[o>>5]|=(t.charCodeAt(o/8)&255)<<24-o%32;var q=8*e.length, +t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909, +275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],o=Array(64),v,y,C,x,D,E,B,A,w,F,G;u[q>>5]|=128<<24-q%32;u[(q+64>>9<<4)+15]=q;for(A=0;Aw;w++)o[w]=16>w?u[w+A]:j(j(j(r(o[w-2],17)^r(o[w-2],19)^o[w- +2]>>>10,o[w-7]),r(o[w-15],7)^r(o[w-15],18)^o[w-15]>>>3),o[w-16]),F=j(j(j(j(B,r(x,6)^r(x,11)^r(x,25)),x&D^~x&E),t[w]),o[w]),G=j(r(q,2)^r(q,13)^r(q,22),q&v^q&y^v&y),B=E,E=D,D=x,x=j(C,F),C=y,y=v,v=q,q=j(F,G);e[0]=j(q,e[0]);e[1]=j(v,e[1]);e[2]=j(y,e[2]);e[3]=j(C,e[3]);e[4]=j(x,e[4]);e[5]=j(D,e[5]);e[6]=j(E,e[6]);e[7]=j(B,e[7])}u="";for(t=0;t<4*e.length;t++)u+="0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)+4&15)+"0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)&15);return u}; +})(); diff --git a/phonegap/pubnub.js b/phonegap/pubnub.js new file mode 100644 index 000000000..c05c6c80c --- /dev/null +++ b/phonegap/pubnub.js @@ -0,0 +1,1102 @@ +// Version: 3.4.4 +var NOW = 1 +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; + +/** + * UTILITIES + */ +function unique() { return'x'+ ++NOW+''+(+new Date) } +function rnow() { return+new Date } + +/** + * NEXTORIGIN + * ========== + * var next_origin = nextorigin(); + */ +var nextorigin = (function() { + var max = 20 + , ori = Math.floor(Math.random() * max); + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 + && origin.replace( + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; + } +})(); + + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + +/** + * UPDATER + * ======= + * var timestamp = unique(); + */ +function updater( fun, rate ) { + var timeout + , last = 0 + , runnit = function() { + if (last + rate > rnow()) { + clearTimeout(timeout); + timeout = setTimeout( runnit, rate ); + } + else { + last = rnow(); + fun(); + } + }; + + return runnit; +} + +/** + * GREP + * ==== + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +function grep( list, fun ) { + var fin = []; + each( list || [], function(l) { fun(l) && fin.push(l) } ); + return fin +} + +/** + * SUPPLANT + * ======== + * var text = supplant( 'Hello {name}!', { name : 'John' } ) + */ +function supplant( str, values ) { + return str.replace( REPL, function( _, match ) { + return values[match] || _ + } ); +} + +/** + * timeout + * ======= + * timeout( function(){}, 100 ); + */ +function timeout( fun, wait ) { + return setTimeout( fun, wait ); +} + +/** + * uuid + * ==== + * var my_uuid = uuid(); + */ +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; +} + +/** + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} + +/** + * ENCODE + * ====== + * var encoded_path = encode('path'); + */ +function encode(path) { + return map( (encodeURIComponent(path)).split(''), function(chr) { + return "-_.!~*'()".indexOf(chr) < 0 ? chr : + "%"+chr.charCodeAt(0).toString(16).toUpperCase() + } ).join(''); +} + +/** + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); + */ +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} + +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } + +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, + /* + PUBNUB.history({ + channel : 'my_chat_channel', + limit : 100, + callback : function(history) { } + }); + */ + 'history' : function( args, callback ) { + var callback = args['callback'] || callback + , count = args['count'] || args['limit'] || 100 + , reverse = args['reverse'] || "false" + , err = args['error'] || function(){} + , channel = args['channel'] + , start = args['start'] + , end = args['end'] + , params = {} + , jsonp = jsonp_cb(); + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + params['stringtoken'] = 'true'; + params['count'] = count; + params['reverse'] = reverse; + + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; + + // Send Message + xdr({ + callback : jsonp, + data : params, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'history', 'sub-key', + SUBSCRIBE_KEY, 'channel', encode(channel) + ] + }); + }, + + /* + PUBNUB.replay({ + source : 'my_channel', + destination : 'new_channel' + }); + */ + 'replay' : function(args) { + var callback = callback || args['callback'] || function(){} + , source = args['source'] + , destination = args['destination'] + , stop = args['stop'] + , start = args['start'] + , end = args['end'] + , reverse = args['reverse'] + , limit = args['limit'] + , jsonp = jsonp_cb() + , data = {} + , url; + + // Check User Input + if (!source) return error('Missing Source Channel'); + if (!destination) return error('Missing Destination Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup URL Params + if (jsonp != '0') data['callback'] = jsonp; + if (stop) data['stop'] = 'all'; + if (reverse) data['reverse'] = 'true'; + if (start) data['start'] = start; + if (end) data['end'] = end; + if (limit) data['count'] = limit; + + // Compose URL Parts + url = [ + STD_ORIGIN, 'v1', 'replay', + PUBLISH_KEY, SUBSCRIBE_KEY, + source, destination + ]; + + // Start (or Stop) Replay! + xdr({ + callback : jsonp, + success : function(response) { callback(response) }, + fail : function() { callback([ 0, 'Disconnected' ]) }, + url : url, + data : data + }); + }, + + /* + PUBNUB.time(function(time){ }); + */ + 'time' : function(callback) { + var jsonp = jsonp_cb(); + xdr({ + callback : jsonp, + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], + success : function(response) { callback(response[0]) }, + fail : function() { callback(0) } + }); + }, + + /* + PUBNUB.publish({ + channel : 'my_chat_channel', + message : 'hello!' + }); + */ + 'publish' : function( args, callback ) { + var callback = callback || args['callback'] || function(){} + , msg = args['message'] + , channel = args['channel'] + , jsonp = jsonp_cb() + , url; + + if (!msg) return error('Missing Message'); + if (!channel) return error('Missing Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // If trying to send Object + msg = JSON['stringify'](msg); + + // Create URL + url = [ + STD_ORIGIN, 'publish', + PUBLISH_KEY, SUBSCRIBE_KEY, + 0, encode(channel), + jsonp, encode(msg) + ]; + + // Queue Message Send + PUB_QUEUE.push({ + callback : jsonp, + timeout : SECOND*5, + url : url, + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} + }); + + // Send Message + publish(); + }, + + /* + PUBNUB.unsubscribe({ channel : 'my_chat' }); + */ + 'unsubscribe' : function(args) { + var channel = args['channel']; + + TIMETOKEN = 0; + SUB_RESTORE = 1; + + // Prepare Channel(s) + channel = map( ( + channel.join ? channel.join(',') : ''+channel + ).split(','), function(channel) { + return channel + ',' + channel + PRESENCE_SUFFIX; + } ).join(','); + + // Iterate over Channels + each( channel.split(','), function(channel) { + if (READY) SELF['LEAVE']( channel, 0 ); + CHANNELS[channel] = 0; + } ); + + // ReOpen Connection if Any Channels Left + if (READY) CONNECT(); + }, + + /* + PUBNUB.subscribe({ + channel : 'my_chat' + callback : function(message) { } + }); + */ + 'subscribe' : function( args, callback ) { + var channel = args['channel'] + , callback = callback || args['callback'] + , callback = callback || args['message'] + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['disconnect'] || function(){} + , presence = args['presence'] || 0 + , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 + , sub_timeout = args['timeout'] || SUB_TIMEOUT + , windowing = args['windowing'] || SUB_WINDOWING + , restore = args['restore']; + + // Restore Enabled? + if (restore) SUB_RESTORE = 1; + + TIMETOKEN = 0; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup Channel(s) + each( (channel.join ? channel.join(',') : ''+channel).split(','), + function(channel) { + var settings = CHANNELS[channel] || {}; + + // Store Channel State + CHANNELS[SUB_CHANNEL = channel] = { + name : channel, + connected : settings.connected, + disconnected : settings.disconnected, + subscribed : 1, + callback : SUB_CALLBACK = callback, + connect : connect, + disconnect : disconnect, + reconnect : reconnect + }; + + // Presence Enabled? + if (!presence) return; + + // Subscribe Presence Channel + SELF['subscribe']({ + 'channel' : channel + PRESENCE_SUFFIX, + 'callback' : presence + }); + + // Presence Subscribed? + if (settings.subscribed) return; + + // See Who's Here Now? + if (noheresync) return; + SELF['here_now']({ + 'channel' : channel, + 'callback' : function(here) { + each( 'uuids' in here ? here['uuids'] : [], + function(uid) { presence( { + 'action' : 'join', + 'uuid' : uid, + 'timestamp' : rnow(), + 'occupancy' : here['occupancy'] || 1 + }, here, channel ); } ); + } + }); + } ); + + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + + // Evented Subscribe + function _connect() { + var jsonp = jsonp_cb() + , channels = generate_channel_list(CHANNELS).join(','); + + // Stop Connection + if (!channels) return; + + // Connect to PubNub Subscribe Servers + SUB_RECEIVER = xdr({ + timeout : sub_timeout, + callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, + data : { 'uuid' : UUID }, + url : [ + SUB_ORIGIN, 'subscribe', + SUBSCRIBE_KEY, encode(channels), + jsonp, TIMETOKEN + ], + success : function(messages) { + if (!messages) return timeout( _connect, windowing ); + + // Connect + each_channel(function(channel){ + if (channel.connected) return; + channel.connected = 1; + channel.connect(channel.name); + }); + + // Restore Previous Connection Point if Needed + TIMETOKEN = !TIMETOKEN && + SUB_RESTORE && + db['get'](SUBSCRIBE_KEY) || messages[1]; + + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + + // Update Saved Timetoken + db['set']( SUBSCRIBE_KEY, messages[1] ); + + // Route Channel <---> Callback for Message + var next_callback = (function() { + var channels = (messages.length>2?messages[2]:'') + , list = channels.split(','); + + return function() { + var channel = list.shift()||''; + return [ + (CHANNELS[channel]||{}) + .callback||SUB_CALLBACK, + (channel||SUB_CHANNEL) + .split(PRESENCE_SUFFIX)[0] + ]; + }; + })(); + + each( messages[0], function(msg) { + var next = next_callback(); + if (!CHANNELS[next[1]].subscribed) return; + next[0]( msg, messages, next[1] ); + } ); + + timeout( _connect, windowing ); + } + }); + } + + CONNECT = function() { + // Close Previous Subscribe Connection + _reset_offline(); + + // Begin Recursive Subscribe + clearTimeout(SUB_BUFF_WAIT); + SUB_BUFF_WAIT = timeout( _connect, 100 ); + }; + + // Reduce Status Flicker + if (!READY) return READY_BUFFER.push(CONNECT); + + // Connect Now + CONNECT(); + }, + + 'here_now' : function( args, callback ) { + var callback = args['callback'] || callback + , err = args['error'] || function(){} + , channel = args['channel'] + , jsonp = jsonp_cb() + , data = null; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } + + xdr({ + callback : jsonp, + data : data, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, + 'channel', encode(channel) + ] + }); + }, + + // Expose PUBNUB Functions + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater + }; + + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); + } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, PNSDK = 'PubNub-JS-' + 'Phonegap' + '/' + '3.4.4' +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE + */ +var db = (function(){ + var ls = typeof localStorage != 'undefined' && localStorage; + return { + get : function(key) { + try { + if (ls) return ls.getItem(key); + if (document.cookie.indexOf(key) == -1) return null; + return ((document.cookie||'').match( + RegExp(key+'=([^;]+)') + )||[])[1] || null; + } catch(e) { return } + }, + set : function( key, value ) { + try { + if (ls) return ls.setItem( key, value ) && 0; + document.cookie = key + '=' + value + + '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; + } catch(e) { return } + } + }; +})(); + + +/** + * CORS XHR Request + * ================ + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr( setup ) { + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , data = setup.data || {} + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , async = ( typeof(setup.blocking) === 'undefined' ) + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = typeof XDomainRequest !== 'undefined' && + new XDomainRequest() || + new XMLHttpRequest(); + + xhr.onerror = xhr.onabort = function(){ done(1) }; + xhr.onload = xhr.onloadend = finished; + if (async) xhr.timeout = XHRTME; + data['pnsdk'] = PNSDK; + url = build_url(setup.url, data); + xhr.open( 'GET', url, async); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * ERROR + * === + * error('message'); + */ +function error(message) { console['error'](message) } + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/** + * ATTR + * ==== + * var attribute = attr( node, 'attribute' ); + */ +function attr( node, attribute, value ) { + if (value) node.setAttribute( attribute, value ); + else return node && node.getAttribute && node.getAttribute(attribute); +} + +/** + * $ + * = + * var div = $('divid'); + */ +function $(id) { return document.getElementById(id) } + + +/** + * SEARCH + * ====== + * var elements = search('a div span'); + */ +function search( elements, start ) { + var list = []; + each( elements.split(/\s+/), function(el) { + each( (start || document).getElementsByTagName(el), function(node) { + list.push(node); + } ); + } ); + return list; +} + +/** + * CSS + * === + * var obj = create('div'); + */ +function css( element, styles ) { + for (var style in styles) if (styles.hasOwnProperty(style)) + try {element.style[style] = styles[style] + ( + '|width|height|top|left|'.indexOf(style) > 0 && + typeof styles[style] == 'number' + ? 'px' : '' + )}catch(e){} +} + +/** + * CREATE + * ====== + * var obj = create('div'); + */ +function create(element) { return document.createElement(element) } + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = xdr; + setup['error'] = error; + var SELF = PN_API(setup); + + SELF['init'] = PN; + SELF['$'] = $; + SELF['attr'] = attr; + SELF['search'] = search; + SELF['bind'] = bind; + SELF['css'] = css; + SELF['create'] = create; + + + // Add Leave Functions + bind( 'beforeunload', window, function() { + SELF['each-channel'](function(ch){ SELF['LEAVE']( ch.name, 1 ) }); + return true; + } ); + + // Return without Testing + if (setup['notest']) return SELF; + + bind( 'offline', window, SELF['_reset_offline'] ); + bind( 'offline', document, SELF['_reset_offline'] ); + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +(function(){ + +// --------------------------------------------------------------------------- +// WEBSOCKET INTERFACE +// --------------------------------------------------------------------------- +var WS = PUBNUB['ws'] = function( url, protocols ) { + if (!(this instanceof WS)) return new WS( url, protocols ); + + var self = this + , url = self.url = url || '' + , protocol = self.protocol = protocols || 'Sec-WebSocket-Protocol' + , bits = url.split('/') + , setup = { + 'ssl' : bits[0] === 'wss:' + ,'origin' : bits[2] + ,'publish_key' : bits[3] + ,'subscribe_key' : bits[4] + ,'channel' : bits[5] + }; + + // READY STATES + self['CONNECTING'] = 0; // The connection is not yet open. + self['OPEN'] = 1; // The connection is open and ready to communicate. + self['CLOSING'] = 2; // The connection is in the process of closing. + self['CLOSED'] = 3; // The connection is closed or couldn't be opened. + + // CLOSE STATES + self['CLOSE_NORMAL'] = 1000; // Normal Intended Close; completed. + self['CLOSE_GOING_AWAY'] = 1001; // Closed Unexpecttedly. + self['CLOSE_PROTOCOL_ERROR'] = 1002; // Server: Not Supported. + self['CLOSE_UNSUPPORTED'] = 1003; // Server: Unsupported Protocol. + self['CLOSE_TOO_LARGE'] = 1004; // Server: Too Much Data. + self['CLOSE_NO_STATUS'] = 1005; // Server: No reason. + self['CLOSE_ABNORMAL'] = 1006; // Abnormal Disconnect. + + // Events Default + self['onclose'] = self['onerror'] = + self['onmessage'] = self['onopen'] = + self['onsend'] = function(){}; + + // Attributes + self['binaryType'] = ''; + self['extensions'] = ''; + self['bufferedAmount'] = 0; + self['trasnmitting'] = false; + self['buffer'] = []; + self['readyState'] = self['CONNECTING']; + + // Close if no setup. + if (!url) { + self['readyState'] = self['CLOSED']; + self['onclose']({ + 'code' : self['CLOSE_ABNORMAL'], + 'reason' : 'Missing URL', + 'wasClean' : true + }); + return self; + } + + // PubNub WebSocket Emulation + self.pubnub = PUBNUB['init'](setup); + self.pubnub.setup = setup; + self.setup = setup; + + self.pubnub['subscribe']({ + 'restore' : false, + 'channel' : setup['channel'], + 'disconnect' : self['onerror'], + 'reconnect' : self['onopen'], + 'error' : function() { + self['onclose']({ + 'code' : self['CLOSE_ABNORMAL'], + 'reason' : 'Missing URL', + 'wasClean' : false + }); + }, + 'callback' : function(message) { + self['onmessage']({ 'data' : message }); + }, + 'connect' : function() { + self['readyState'] = self['OPEN']; + self['onopen'](); + } + }); +}; + +// --------------------------------------------------------------------------- +// WEBSOCKET SEND +// --------------------------------------------------------------------------- +WS.prototype.send = function(data) { + var self = this; + self.pubnub['publish']({ + 'channel' : self.pubnub.setup['channel'], + 'message' : data, + 'callback' : function(response) { + self['onsend']({ 'data' : response }); + } + }); +}; + +// --------------------------------------------------------------------------- +// WEBSOCKET CLOSE +// --------------------------------------------------------------------------- +WS.prototype.close = function() { + var self = this; + self.pubnub['unsubscribe']({ 'channel' : self.pubnub.setup['channel'] }); + self['readyState'] = self['CLOSED']; + self['onclose']({}); +}; + +})(); diff --git a/phonegap/pubnub.min.js b/phonegap/pubnub.min.js new file mode 100644 index 000000000..7f5d47b6e --- /dev/null +++ b/phonegap/pubnub.min.js @@ -0,0 +1,24 @@ +// Version: 3.4.4 +(function(){ +var k=!1;function l(){return function(){}}var ca=1,o=k,v=[],z="-pnpres",A=1E3,da=/{([\w\-]+)}/g;function ea(){return"x"+ ++ca+""+ +new Date}function F(){return+new Date}var H,I=Math.floor(20*Math.random());H=function(a,c){return 0++I?I:I=1))||a};function fa(a,c){function b(){f+c>F()?(clearTimeout(d),d=setTimeout(b,c)):(f=F(),a())}var d,f=0;return b}function ga(a,c){var b=[];K(a||[],function(a){c(a)&&b.push(a)});return b} +function ha(a,c){return a.replace(da,function(a,d){return c[d]||a})}function J(a){var c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=16*Math.random()|0;return("x"==a?c:c&3|8).toString(16)});a&&a(c);return c}function K(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function O(a){var c=[];K(a,function(a,d){d.g&&c.push(a)});return c.sort()}function ia(){setTimeout(function(){o||(o=1,K(v,function(a){a()}))},A)} +function R(a){function c(a){f||(f=1,clearTimeout(e),d&&(d.onerror=d.onload=null,d.abort&&d.abort(),d=null),a&&P())}function b(){if(!q){q=1;clearTimeout(e);try{response=JSON.parse(d.responseText)}catch(a){return c(1)}B(response)}}var d,f=0,q=0,e;e=setTimeout(function(){c(1)},S);var C=a.data||{},P=a.b||l(),B=a.c||l(),p="undefined"===typeof a.j;try{d="undefined"!==typeof XDomainRequest&&new XDomainRequest||new XMLHttpRequest;d.onerror=d.onabort=function(){c(1)};d.onload=d.onloadend=b;p&&(d.timeout=S); +C.pnsdk=ja;var g=a.url.join("/");if(C){var r=[],g=g+"?",i;for(i in C)r.push(i+"="+N(C[i]));g+=r.join("&")}url=g;d.open("GET",url,p);d.send()}catch(w){return c(0),R(a)}return c}function T(a,c,b){K(a.split(","),function(a){function f(a){a||(a=window.event);b(a)||(a.cancelBubble=!0,a.returnValue=k,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())}c.addEventListener?c.addEventListener(a,f,k):c.attachEvent?c.attachEvent("on"+a,f):c["on"+a]=f})} +function ka(a){console.error(a)}function la(a,c,b){if(b)a.setAttribute(c,b);else return a&&a.getAttribute&&a.getAttribute(c)}function ma(a){return document.getElementById(a)}function na(a,c){var b=[];K(a.split(/\s+/),function(a){K((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b}function oa(a,c){for(var b in c)if(c.hasOwnProperty(b))try{a.style[b]=c[b]+(0<"|width|height|top|left|".indexOf(b)&&"number"==typeof c[b]?"px":"")}catch(d){}} +function pa(a){return document.createElement(a)} +function U(a){function c(){}function b(){m.time(function(a){a||x&&x(1);setTimeout(b,B)})}function d(){qa()||x&&x(1);setTimeout(d,A)}function f(a){K(O(s),function(b){(b=s[b])&&a(b)})}function q(a){a&&(t.h=0);!t.h&&t.length&&(t.h=1,u(t.shift()))}a.db=V;a.xdr=R;a.error=ka;var e,C=+a.windowing||10,P=(+a.timeout||310)*A,B=(+a.keepalive||60)*A,p=a.publish_key||"",g=a.subscribe_key||"",r=a.ssl?"s":"",i="http"+r+"://"+(a.origin||"pubsub.pubnub.com"),w=H(i),W=H(i),t=[],Z=0,$=0,x=0,Q=0,aa=0,G=0,s={},u=a.xdr, +h=a.error||l(),qa=a._is_online||function(){return 1},y=a.jsonp_cb||function(){return 0},D=a.db||{get:l(),set:l()},E=a.uuid||D&&D.get(g+"uuid")||"",m={LEAVE:function(a,b){var c={uuid:E},d=H(i),e=y();0 $(PUBNUB_JS) + cat $(PUBNUB_COMMON_JS) $(MODERN_PLATFORM_JS) $(WEBSOCKET_JS) >> $(PUBNUB_JS) + sed -i -e "s/VERSION/\'$(VERSION)\'/g" $(PUBNUB_JS) + sed -i -e "s/PLATFORM/\'$(PLATFORM)\'/g" $(PUBNUB_JS) + ## Minfied Version + $(ECHO) "// Version: $(VERSION)" > $(PUBNUB_MIN_JS) + $(ECHO) "(function(){" >> $(PUBNUB_MIN_JS) + cat $(PUBNUB_JS) | java -jar $(GOOGLE_MINIFY) --compilation_level=ADVANCED_OPTIMIZATIONS >> $(PUBNUB_MIN_JS) + $(ECHO) "})();" >> $(PUBNUB_MIN_JS) + +$(PUBNUB_CRYPTO_MIN_JS) : $(GIBBERISH_JS) $(ENCRYPTO_JS) + ## Cryptography + $(ECHO) "(function(){" > $(PUBNUB_CRYPTO_MIN_JS) + cat $(GIBBERISH_JS) $(ENCRYPT_JS) | java -jar $(GOOGLE_MINIFY) >> $(PUBNUB_CRYPTO_MIN_JS) + $(ECHO) "})();" >> $(PUBNUB_CRYPTO_MIN_JS) + +.PHONY : clean +clean: + rm -f $(OUTPUT_FILES) + +include ../Makefile.post diff --git a/sencha/README.md b/sencha/README.md new file mode 100644 index 000000000..aa4a3d826 --- /dev/null +++ b/sencha/README.md @@ -0,0 +1,3 @@ +PubNub for Sencha + +Please see usage in examples directory, and email support at pubnub or file an issue if there are any questions. diff --git a/sencha/examples/here_now/app.js b/sencha/examples/here_now/app.js new file mode 100644 index 000000000..95349df4e --- /dev/null +++ b/sencha/examples/here_now/app.js @@ -0,0 +1,50 @@ +var pubnub = PUBNUB({ + publish_key : 'demo', + subscribe_key : 'demo', + ssl : false, + origin : 'pubsub.pubnub.com' +}); + + +Ext.application({ + launch: function () { + var myStore = Ext.create('Ext.data.Store', { + storeId: 'list', + fields: ['txt'] + }); + + Ext.create('Ext.List', { + fullscreen: true, + store: 'list', + itemTpl: '{txt}', + items: [{ + xtype: 'titlebar', + docked: 'top', + items: [ + { + xtype: 'textfield', + label: 'Channel', + name: 'channel', + id: 'channel' + }, + { + text: 'Here Now', + handler: function () { + var channel = Ext.getCmp('channel').getValue() || 'sencha-demo-channel'; + myStore.removeAll(); + pubnub.here_now({ + channel: channel, + callback: function(response){ + for ( x in response["uuids"] ) { + myStore.insert(0,{txt : JSON.stringify(response["uuids"][x])}); + } + } + }); + } + } + ] + }] + }); + } +}); + diff --git a/sencha/examples/here_now/index.html b/sencha/examples/here_now/index.html new file mode 100644 index 000000000..e843402c4 --- /dev/null +++ b/sencha/examples/here_now/index.html @@ -0,0 +1,65 @@ + + + + + history + + + + + + + + +
+
+
+
+
+ + diff --git a/sencha/examples/here_now/sencha-touch-all.js b/sencha/examples/here_now/sencha-touch-all.js new file mode 100644 index 000000000..3b08d5862 --- /dev/null +++ b/sencha/examples/here_now/sencha-touch-all.js @@ -0,0 +1,32 @@ +/* +This file is part of Sencha Touch 2.0 + +Copyright (c) 2011-2012 Sencha Inc + +Contact: http://www.sencha.com/contact + +Commercial Usage +Licensees holding valid commercial licenses may use this file in accordance with the Commercial +Software License Agreement provided with the Software or, alternatively, in accordance with the +terms contained in a written agreement between you and Sencha. + +If you are unsure which license is appropriate for your use, please contact the sales department +at http://www.sencha.com/contact. + +Build date: 2012-06-04 15:34:28 (d81f71da2d56f5f71419dc892fbc85685098c6b7) +*/ +/* + +This file is part of Sencha Touch 2 + +Copyright (c) 2012 Sencha Inc + +Contact: http://www.sencha.com/contact + +Commercial Usage +Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha. + +If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. + +*/ +(function(){var global=this,objectPrototype=Object.prototype,toString=objectPrototype.toString,enumerables=true,enumerablesTest={toString:1},emptyFn=function(){},i;if(typeof Ext==="undefined"){global.Ext={}}Ext.global=global;for(i in enumerablesTest){enumerables=null}if(enumerables){enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=enumerables;Ext.apply=function(object,config,defaults){if(defaults){Ext.apply(object,defaults)}if(object&&config&&typeof config==="object"){var i,j,k;for(i in config){object[i]=config[i]}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(config.hasOwnProperty(k)){object[k]=config[k]}}}}return object};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:emptyFn,baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(object,config){var property;if(object){for(property in config){if(object[property]===undefined){object[property]=config[property]}}}return object},iterate:function(object,fn,scope){if(Ext.isEmpty(object)){return}if(scope===undefined){scope=object}if(Ext.isIterable(object)){Ext.Array.each.call(Ext.Array,object,fn,scope)}else{Ext.Object.each.call(Ext.Object,object,fn,scope)}}});Ext.apply(Ext,{extend:function(){var objectConstructor=objectPrototype.constructor,inlineOverrides=function(o){for(var m in o){if(!o.hasOwnProperty(m)){continue}this[m]=o[m]}};return function(subclass,superclass,overrides){if(Ext.isObject(superclass)){overrides=superclass;superclass=subclass;subclass=overrides.constructor!==objectConstructor?overrides.constructor:function(){superclass.apply(this,arguments)}}var F=function(){},subclassProto,superclassProto=superclass.prototype;F.prototype=superclassProto;subclassProto=subclass.prototype=new F();subclassProto.constructor=subclass;subclass.superclass=superclassProto;if(superclassProto.constructor===objectConstructor){superclassProto.constructor=superclass}subclass.override=function(overrides){Ext.override(subclass,overrides)};subclassProto.override=inlineOverrides;subclassProto.proto=subclassProto;subclass.override(overrides);subclass.extend=function(o){return Ext.extend(subclass,o)};return subclass}}(),override:function(cls,overrides){if(cls.$isClass){return cls.override(overrides)}else{Ext.apply(cls.prototype,overrides)}}});Ext.apply(Ext,{valueFrom:function(value,defaultValue,allowBlank){return Ext.isEmpty(value,allowBlank)?defaultValue:value},typeOf:function(value){if(value===null){return"null"}var type=typeof value;if(type==="undefined"||type==="string"||type==="number"||type==="boolean"){return type}var typeToString=toString.call(value);switch(typeToString){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(type==="function"){return"function"}if(type==="object"){if(value.nodeType!==undefined){if(value.nodeType===3){return(/\S/).test(value.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(value,allowEmptyString){return(value===null)||(value===undefined)||(!allowEmptyString?value==="":false)||(Ext.isArray(value)&&value.length===0)},isArray:("isArray" in Array)?Array.isArray:function(value){return toString.call(value)==="[object Array]"},isDate:function(value){return toString.call(value)==="[object Date]"},isObject:(toString.call(null)==="[object Object]")?function(value){return value!==null&&value!==undefined&&toString.call(value)==="[object Object]"&&value.ownerDocument===undefined}:function(value){return toString.call(value)==="[object Object]"},isSimpleObject:function(value){return value instanceof Object&&value.constructor===Object},isPrimitive:function(value){var type=typeof value;return type==="string"||type==="number"||type==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(value){return toString.call(value)==="[object Function]"}:function(value){return typeof value==="function"},isNumber:function(value){return typeof value==="number"&&isFinite(value)},isNumeric:function(value){return !isNaN(parseFloat(value))&&isFinite(value)},isString:function(value){return typeof value==="string"},isBoolean:function(value){return typeof value==="boolean"},isElement:function(value){return value?value.nodeType===1:false},isTextNode:function(value){return value?value.nodeName==="#text":false},isDefined:function(value){return typeof value!=="undefined"},isIterable:function(value){return(value&&typeof value!=="string")?value.length!==undefined:false}});Ext.apply(Ext,{clone:function(item){if(item===null||item===undefined){return item}if(item.nodeType&&item.cloneNode){return item.cloneNode(true)}var type=toString.call(item);if(type==="[object Date]"){return new Date(item.getTime())}var i,j,k,clone,key;if(type==="[object Array]"){i=item.length;clone=[];while(i--){clone[i]=Ext.clone(item[i])}}else{if(type==="[object Object]"&&item.constructor===Object){clone={};for(key in item){clone[key]=Ext.clone(item[key])}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];clone[k]=item[k]}}}}return clone||item},getUniqueGlobalNamespace:function(){var uniqueGlobalNamespace=this.uniqueGlobalNamespace;if(uniqueGlobalNamespace===undefined){var i=0;do{uniqueGlobalNamespace="ExtBox"+(++i)}while(Ext.global[uniqueGlobalNamespace]!==undefined);Ext.global[uniqueGlobalNamespace]=Ext;this.uniqueGlobalNamespace=uniqueGlobalNamespace}return uniqueGlobalNamespace},functionFactory:function(){var args=Array.prototype.slice.call(arguments),ln=args.length;if(ln>0){args[ln-1]="var Ext=window."+this.getUniqueGlobalNamespace()+";"+args[ln-1]}return Function.prototype.constructor.apply(Function.prototype,args)},globalEval:("execScript" in global)?function(code){global.execScript(code)}:function(code){(function(){eval(code)})()},});Ext.type=Ext.typeOf})();(function(){var a="4.1.0",b;Ext.Version=b=Ext.extend(Object,{constructor:function(d){var c=this.toNumber,f,e;if(d instanceof b){return d}this.version=this.shortVersion=String(d).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");e=this.version.search(/([^\d\.])/);if(e!==-1){this.release=this.version.substr(e,d.length);this.shortVersion=this.version.substr(0,e)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");f=this.version.split(".");this.major=c(f.shift());this.minor=c(f.shift());this.patch=c(f.shift());this.build=c(f.shift());return this},toNumber:function(c){c=parseInt(c||0,10);if(isNaN(c)){c=0}return c},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(g,f){var d,e,c;g=new b(g).toArray();f=new b(f).toArray();for(c=0;ce){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,f,d){if(b.compare(Ext.getVersion(c),e)<1){f.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,htmlEncode:(function(){var d={"&":"&",">":">","<":"<",'"':"""},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){return d[f]})}})(),htmlDecode:(function(){var d={"&":"&",">":">","<":"<",""":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){if(f in d){return d[f]}else{return String.fromCharCode(parseInt(f.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.lengthH){for(C=e;C--;){F[z+C]=F[H+C]}}}if(J&&G===B){F.length=B;F.push.apply(F,I)}else{F.length=B+J;for(C=0;C-1;y--){if(A.call(z||C[y],C[y],y,C)===false){return y}}}return true},forEach:i?function(z,y,e){return z.forEach(y,e)}:function(B,z,y){var e=0,A=B.length;for(;ee){e=z}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(B){var y=0,e,A,z;for(e=0,A=B.length;e=c){f+=c}else{if(b*2<-c){f-=c}}}return Ext.Number.constrain(f,d,g)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var a=function(){};var b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,j,d){var c=b.toQueryObjects,h=[],f,g;if(Ext.isArray(j)){for(f=0,g=j.length;f0){h=n.split("=");v=decodeURIComponent(h[0]);m=(h[1]!==undefined)?decodeURIComponent(h[1]):"";if(!q){if(t.hasOwnProperty(v)){if(!Ext.isArray(t[v])){t[v]=[t[v]]}t[v].push(m)}else{t[v]=m}}else{g=v.match(/(\[):?([^\]]*)\]/g);s=v.match(/^([^\[]+)/);v=s[0];k=[];if(g===null){t[v]=m;continue}for(o=0,c=g.length;o0){return setTimeout(e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){if(!d){d=this}if(!c){c=Array.prototype.slice.call(arguments)}if(a){clearTimeout(a);a=null}a=setTimeout(function(){e.apply(d,c)},b)}},createThrottled:function(e,b,d){var f,a,c,h,g=function(){e.apply(d||this,c);f=new Date().getTime()};return function(){a=new Date().getTime()-f;c=arguments;clearTimeout(h);if(!f||(a>=b)){g()}else{h=setTimeout(g,b-a)}}},interceptBefore:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){var e=c.apply(this,arguments);d.apply(this,arguments);return e}},interceptAfter:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){d.apply(this,arguments);return c.apply(this,arguments)}}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i0){for(d=0;d0){if(l===k){return n[l]}m=n[l];k=k.substring(l.length+1)}if(m.length>0){m+="/"}return m.replace(/\/\.\//g,"/")+k.replace(/\./g,"/")+".js"},getPrefix:function(l){var n=this.config.paths,m,k="";if(n.hasOwnProperty(l)){return l}for(m in n){if(n.hasOwnProperty(m)&&m+"."===l.substring(0,m.length+1)){if(m.length>k.length){k=m}}}return k},require:function(m,l,k,n){if(l){l.call(k)}},syncRequire:function(){},exclude:function(l){var k=this;return{require:function(o,n,m){return k.require(o,n,m,l)},syncRequire:function(o,n,m){return k.syncRequire(o,n,m,l)}}},onReady:function(n,m,o,k){var l;if(o!==false&&Ext.onDocumentReady){l=n;n=function(){Ext.onDocumentReady(l,m,k)}}n.call(m)}};Ext.apply(b,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isClassFileLoaded:{},isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},syncModeEnabled:false,scriptElements:{},refreshQueue:function(){var k=this.queue,q=k.length,n,p,l,o,m;if(q===0){this.triggerReady();return}for(n=0;nthis.numLoadedFiles){continue}l=0;do{if(a.isCreated(o[l])){f(o,l,1)}else{l++}}while(l=200&&n<300)||n==304||(n==0&&q.length>0)){Ext.globalEval(q+"\n//@ sourceURL="+l);s.call(w)}else{}u=null}},syncRequire:function(){var k=this.syncModeEnabled;if(!k){this.syncModeEnabled=true}this.require.apply(this,arguments);if(!k){this.syncModeEnabled=false}this.refreshQueue()},require:function(F,t,n,q){var v={},m={},y=this.queue,C=this.classNameToFilePathMap,A=this.isClassFileLoaded,s=[],H=[],E=[],l=[],r,G,x,w,k,p,D,B,z,u,o;if(q){q=h(q);for(B=0,u=q.length;B0){s=a.getNamesByExpression(k);for(z=0,o=s.length;z0){r=function(){var K=[],J,L,I;for(J=0,L=l.length;J0){H=a.getNamesByExpression(w);o=H.length;for(z=0;z0){if(!this.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((E.length>1)?"es":"")+": "+E.join(", "))}}else{r.call(n);return this}G=this.syncModeEnabled;if(!G){y.push({requires:E.slice(),callback:r,scope:n})}u=E.length;for(B=0;B=2){if("1496x2048" in r){e(r["1496x2048"],"(orientation: landscape)")}if("1536x2008" in r){e(r["1536x2008"],"(orientation: portrait)")}}else{if("748x1024" in r){e(r["748x1024"],"(orientation: landscape)")}if("768x1004" in r){e(r["768x1004"],"(orientation: portrait)")}}}else{if(o>=2&&Ext.os.version.gtEq("4.3")){e(r["640x920"])}else{e(r["320x460"])}}},application:function(b){var a=b.name,e,d,c;if(!b){b={}}if(!Ext.Loader.config.paths[a]){Ext.Loader.setPath(a,b.appFolder||"app")}c=Ext.Array.from(b.requires);b.requires=["Ext.app.Application"];e=b.onReady;d=b.scope;b.onReady=function(){b.requires=c;new Ext.app.Application(b);if(e){e.call(d)}};Ext.setup(b)},factoryConfig:function(a,l){var g=Ext.isSimpleObject(a);if(g&&a.xclass){var f=a.xclass;delete a.xclass;Ext.require(f,function(){Ext.factoryConfig(a,function(i){l(Ext.create(f,i))})});return}var d=Ext.isArray(a),m=[],k,j,c,e;if(g||d){if(g){for(k in a){if(a.hasOwnProperty(k)){j=a[k];if(Ext.isSimpleObject(j)||Ext.isArray(j)){m.push(k)}}}}else{for(c=0,e=a.length;c=e){l(a);return}k=m[c];j=a[k];Ext.factoryConfig(j,h)}b();return}l(a)},factory:function(b,e,a,f){var d=Ext.ClassManager,c;if(!b||b.isInstance){if(a&&a!==b){a.destroy()}return b}if(f){if(typeof b=="string"){return d.instantiateByAlias(f+"."+b)}else{if(Ext.isObject(b)&&"type" in b){return d.instantiateByAlias(f+"."+b.type,b)}}}if(b===true){return a||d.instantiate(e)}if("xtype" in b){c=d.instantiateByAlias("widget."+b.xtype,b)}else{if("xclass" in b){c=d.instantiate(b.xclass,b)}}if(c){if(a){a.destroy()}return c}if(a){return a.setConfig(b)}return d.instantiate(e,b)},deprecateClassMember:function(b,c,a,d){return this.deprecateProperty(b.prototype,c,a,d)},deprecateClassMembers:function(b,c){var d=b.prototype,e,a;for(e in c){if(c.hasOwnProperty(e)){a=c[e];this.deprecateProperty(d,e,a)}}},deprecateProperty:function(b,c,a,d){if(!d){d="'"+c+"' is deprecated"}if(a){d+=", please use '"+a+"' instead"}if(a){Ext.Object.defineProperty(b,c,{get:function(){return this[a]},set:function(e){this[a]=e},configurable:true})}},deprecatePropertyValue:function(b,a,d,c){Ext.Object.defineProperty(b,a,{get:function(){return d},configurable:true})},deprecateMethod:function(b,a,d,c){b[a]=function(){if(d){return d.apply(this,arguments)}}},deprecateClassMethod:function(a,b,h,d){if(typeof b!="string"){var g,f;for(g in b){if(b.hasOwnProperty(g)){f=b[g];Ext.deprecateClassMethod(a,g,f)}}return}var c=typeof h=="string",e;if(!d){d="'"+b+"()' is deprecated, please use '"+(c?h:h.name)+"()' instead"}if(c){e=function(){return this[h].apply(this,arguments)}}else{e=function(){return h.apply(this,arguments)}}if(b in a.prototype){Ext.Object.defineProperty(a.prototype,b,{value:null,writable:true,configurable:true})}a.addMember(b,e)},isReady:false,readyListeners:[],triggerReady:function(){var b=Ext.readyListeners,a,c,d;if(!Ext.isReady){Ext.isReady=true;for(a=0,c=b.length;a0){return b+Ext.String.capitalize(a)}return a}},function(){var a=Ext.browser=new this(Ext.global.navigator.userAgent)});Ext.define("Ext.env.OS",{requires:["Ext.Version"],statics:{names:{ios:"iOS",android:"Android",webos:"webOS",blackberry:"BlackBerry",rimTablet:"RIMTablet",mac:"MacOS",win:"Windows",linux:"Linux",bada:"Bada",other:"Other"},prefixes:{ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"}},is:Ext.emptyFn,name:null,version:null,setFlag:function(a,b){if(typeof b=="undefined"){b=true}this.is[a]=b;this.is[a.toLowerCase()]=b;return this},constructor:function(m,b){var k=this.statics(),j=k.names,c=k.prefixes,a,h="",d,g,f,l,e;e=this.is=function(i){return this.is[i]===true};for(d in c){if(c.hasOwnProperty(d)){g=c[d];f=m.match(new RegExp("(?:"+g+")([^\\s;]+)"));if(f){a=j[d];if(f[1]&&(f[1]=="HTC_"||f[1]=="Silk/")){h=new Ext.Version("2.3")}else{h=new Ext.Version(f[f.length-1])}break}}}if(!a){a=j[(m.toLowerCase().match(/mac|win|linux/)||["other"])[0]];h=new Ext.Version("")}this.name=a;this.version=h;if(b){this.setFlag(b)}this.setFlag(a);if(h){this.setFlag(a+(h.getMajor()||""));this.setFlag(a+h.getShortVersion())}for(d in j){if(j.hasOwnProperty(d)){l=j[d];if(!e.hasOwnProperty(a)){this.setFlag(l,(a===l))}}}return this}},function(){var a=Ext.global.navigator,e=a.userAgent,b,g,d;Ext.os=b=new this(e,a.platform);g=b.name;var c=window.location.search.match(/deviceType=(Tablet|Phone)/),f=window.deviceType;if(c&&c[1]){d=c[1]}else{if(f==="iPhone"){d="Phone"}else{if(f==="iPad"){d="Tablet"}else{if(!b.is.Android&&!b.is.iOS&&/Windows|Linux|MacOS/.test(g)){d="Desktop"}else{if(b.is.iPad||b.is.Android3||(b.is.Android4&&e.search(/mobile/i)==-1)){d="Tablet"}else{d="Phone"}}}}}b.setFlag(d,true);b.deviceType=d});Ext.define("Ext.env.Feature",{requires:["Ext.env.Browser","Ext.env.OS"],constructor:function(){this.testElements={};this.has=function(a){return !!this.has[a]};return this},getTestElement:function(a,b){if(a===undefined){a="div"}else{if(typeof a!=="string"){return a}}if(b){return document.createElement(a)}if(!this.testElements[a]){this.testElements[a]=document.createElement(a)}return this.testElements[a]},isStyleSupported:function(c,b){var d=this.getTestElement(b).style,a=Ext.String.capitalize(c);if(typeof d[c]!=="undefined"||typeof d[Ext.browser.getStylePrefix(c)+a]!=="undefined"){return true}return false},isEventSupported:function(c,a){if(a===undefined){a=window}var e=this.getTestElement(a),b="on"+c.toLowerCase(),d=(b in e);if(!d){if(e.setAttribute&&e.removeAttribute){e.setAttribute(b,"");d=typeof e[b]==="function";if(typeof e[b]!=="undefined"){e[b]=undefined}e.removeAttribute(b)}}return d},getSupportedPropertyName:function(b,a){var c=Ext.browser.getVendorProperyName(a);if(c in b){return c}else{if(a in b){return a}}return null},registerTest:Ext.Function.flexSetter(function(a,b){this.has[a]=b.call(this);return this})},function(){Ext.feature=new this;var a=Ext.feature.has;Ext.feature.registerTest({Canvas:function(){var b=this.getTestElement("canvas");return !!(b&&b.getContext&&b.getContext("2d"))},Svg:function(){var b=document;return !!(b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)},Vml:function(){var c=this.getTestElement(),b=false;c.innerHTML="";b=(c.childNodes.length===1);c.innerHTML="";return b},Touch:function(){return this.isEventSupported("touchstart")&&!(Ext.os&&Ext.os.name.match(/Windows|MacOS|Linux/))},Orientation:function(){return("orientation" in window)&&this.isEventSupported("orientationchange")},OrientationChange:function(){return this.isEventSupported("orientationchange")},DeviceMotion:function(){return this.isEventSupported("devicemotion")},Geolocation:function(){return"geolocation" in window.navigator},SqlDatabase:function(){return"openDatabase" in window},WebSockets:function(){return"WebSocket" in window},Range:function(){return !!document.createRange},CreateContextualFragment:function(){var b=!!document.createRange?document.createRange():false;return b&&!!b.createContextualFragment},History:function(){return("history" in window&&"pushState" in window.history)},CssTransforms:function(){return this.isStyleSupported("transform")},Css3dTransforms:function(){return this.has("CssTransforms")&&this.isStyleSupported("perspective")&&!Ext.os.is.Android2},CssAnimations:function(){return this.isStyleSupported("animationName")},CssTransitions:function(){return this.isStyleSupported("transitionProperty")},Audio:function(){return !!this.getTestElement("audio").canPlayType},Video:function(){return !!this.getTestElement("video").canPlayType},ClassList:function(){return"classList" in this.getTestElement()}})});Ext.define("Ext.dom.Query",{select:function(h,b){var g=[],d,f,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}h=h.split(",");for(f=0,c=h.length;f")}else{c.push(">");if((h=d.tpl)){h.applyOut(d.tplData,c)}if((h=d.html)){c.push(h)}if((h=d.cn||d.children)){g.generateMarkup(h,c)}f=g.closeTags;c.push(f[a]||(f[a]=""))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(a,b){Ext.fly(a).applyStyles(b)},createContextualFragment:function(c){var f=document.createElement("div"),a=document.createDocumentFragment(),b=0,d,e;f.innerHTML=c;e=f.childNodes;d=e.length;for(;b0){this.id=b=a.id}else{a.id=b=this.mixins.identifiable.getUniqueId.call(this)}this.self.cache[b]=this}return b},setId:function(c){var a=this.id,b=this.self.cache;if(a){delete b[a]}this.dom.id=c;this.id=c;b[c]=this;return this},setHtml:function(a){this.dom.innerHTML=a},getHtml:function(){return this.dom.innerHTML},setText:function(a){this.dom.textContent=a},redraw:function(){var b=this.dom,a=b.style;a.display="none";b.offsetHeight;a.display=""},isPainted:function(){var a=this.dom;return Boolean(a&&a.offsetParent)},set:function(a,b){var e=this.dom,c,d;for(c in a){if(a.hasOwnProperty(c)){d=a[c];if(c=="style"){this.applyStyles(d)}else{if(c=="cls"){e.className=d}else{if(b!==false){if(d===undefined){e.removeAttribute(c)}else{e.setAttribute(c,d)}}else{e[c]=d}}}}}return this},is:function(a){return Ext.DomQuery.is(this.dom,a)},getValue:function(b){var a=this.dom.value;return b?parseInt(a,10):a},getAttribute:function(a,b){var c=this.dom;return c.getAttributeNS(b,a)||c.getAttribute(b+":"+a)||c.getAttribute(a)||c[a]},destroy:function(){this.isDestroyed=true;var a=Ext.Element.cache,b=this.dom;if(b&&b.parentNode&&b.tagName!="BODY"){b.parentNode.removeChild(b)}delete a[this.id];delete this.dom}},function(a){Ext.elements=Ext.cache=a.cache;this.addStatics({Fly:new Ext.Class({extend:a,constructor:function(b){this.dom=b}}),_flyweights:{},fly:function(e,c){var f=null,d=a._flyweights,b;c=c||"_global";e=Ext.getDom(e);if(e){f=d[c]||(d[c]=new a.Fly());f.dom=e;f.isSynchronized=false;b=Ext.cache[e.id];if(b&&b.isElement){b.isSynchronized=false}}return f}});Ext.get=function(b){return a.get.call(a,b)};Ext.fly=function(){return a.fly.apply(a,arguments)};Ext.ClassManager.onCreated(function(){a.mixin("observable",Ext.mixin.Observable)},null,"Ext.mixin.Observable")});Ext.dom.Element.addStatics({numberRe:/\d+$/,unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(Ext.isNumber(b)||this.numberRe.test(b)){return b+(a||this.defaultUnit||"px")}else{if(!this.unitRe.test(b)){return b||""}}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(b){if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:c[0]||0,right:c[1]||0,bottom:c[2]||0,left:c[3]||0}},unitizeBox:function(c,a){var b=this;c=b.parseBox(c);return b.addUnits(c.top,a)+" "+b.addUnits(c.right,a)+" "+b.addUnits(c.bottom,a)+" "+b.addUnits(c.left,a)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});Ext.dom.Element.addMembers({appendChild:function(a){this.dom.appendChild(Ext.getDom(a));return this},removeChild:function(a){this.dom.removeChild(Ext.getDom(a));return this},append:function(){this.appendChild.apply(this,arguments)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b){var a=Ext.getDom(b),d=this.dom,c=d.firstChild;if(!c){d.appendChild(a)}else{d.insertBefore(a,c)}return this},insertSibling:function(e,c,d){var f=this,b,a=(c||"before").toLowerCase()=="after",g;if(Ext.isArray(e)){g=f;Ext.each(e,function(h){b=Ext.fly(g,"_internal").insertSibling(h,c,d);if(a){g=b}});return b}e=e||{};if(e.nodeType||e.dom){b=f.dom.parentNode.insertBefore(Ext.getDom(e),a?f.dom.nextSibling:f.dom);if(!d){b=Ext.get(b)}}else{if(a&&!f.dom.nextSibling){b=Ext.core.DomHelper.append(f.dom.parentNode,e,!d)}else{b=Ext.core.DomHelper[a?"insertAfter":"insertBefore"](f.dom,e,!d)}}return b},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.Element.addToCache(b.isFlyweight?new Ext.dom.Element(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(b,c){var e=this.dom,f=this.self.create(b,c),d=(c)?f:f.dom,a=e.parentNode;if(a){a.insertBefore(d,e)}d.appendChild(e);return f},wrapAllChildren:function(a){var d=this.dom,b=d.childNodes,e=this.self.create(a),c=e.dom;while(b.length>0){c.appendChild(d.firstChild)}d.appendChild(c);return e},unwrapAllChildren:function(){var c=this.dom,b=c.childNodes,a=c.parentNode;if(a){while(b.length>0){a.insertBefore(c,c.firstChild)}this.destroy()}},unwrap:function(){var c=this.dom,a=c.parentNode,b;if(a){b=a.parentNode;b.insertBefore(c,a);b.removeChild(a)}else{b=document.createDocumentFragment();b.appendChild(c)}return this},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});Ext.dom.Element.override({getX:function(a){return this.getXY(a)[0]},getY:function(a){return this.getXY(a)[1]},getXY:function(){var a=window.webkitConvertPointFromNodeToPage;if(a){return function(){var b=a(this.dom,new WebKitPoint(0,0));return[b.x,b.y]}}else{return function(){var c=this.dom.getBoundingClientRect(),b=Math.round;return[b(c.left+window.pageXOffset),b(c.top+window.pageYOffset)]}}}(),getOffsetsTo:function(a){var c=this.getXY(),b=Ext.fly(a,"_internal").getXY();return[c[0]-b[0],c[1]-b[1]]},setX:function(a){return this.setXY([a,this.getY()])},setY:function(a){return this.setXY([this.getX(),a])},setXY:function(d){var b=this;if(arguments.length>1){d=[d,arguments[1]]}var c=b.translatePoints(d),a=b.dom.style;for(d in c){if(!c.hasOwnProperty(d)){continue}if(!isNaN(c[d])){a[d]=c[d]+"px"}}return b},getLeft:function(){return parseInt(this.getStyle("left"),10)||0},getRight:function(){return parseInt(this.getStyle("right"),10)||0},getTop:function(){return parseInt(this.getStyle("top"),10)||0},getBottom:function(){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(a,g){g=isNaN(a[1])?g:a[1];a=isNaN(a[0])?a:a[0];var d=this,e=d.isStyle("position","relative"),f=d.getXY(),b=parseInt(d.getStyle("left"),10),c=parseInt(d.getStyle("top"),10);b=!isNaN(b)?b:(e?0:d.dom.offsetLeft);c=!isNaN(c)?c:(e?0:d.dom.offsetTop);return{left:(a-f[0]+b),top:(g-f[1]+c)}},setBox:function(d){var c=this,b=d.width,a=d.height,f=d.top,e=d.left;if(e!==undefined){c.setLeft(e)}if(f!==undefined){c.setTop(f)}if(b!==undefined){c.setWidth(b)}if(a!==undefined){c.setHeight(a)}return this},getBox:function(g,j){var h=this,e=h.dom,c=e.offsetWidth,k=e.offsetHeight,n,f,d,a,m,i;if(!j){n=h.getXY()}else{if(g){n=[0,0]}else{n=[parseInt(h.getStyle("left"),10)||0,parseInt(h.getStyle("top"),10)||0]}}if(!g){f={x:n[0],y:n[1],0:n[0],1:n[1],width:c,height:k}}else{d=h.getBorderWidth.call(h,"l")+h.getPadding.call(h,"l");a=h.getBorderWidth.call(h,"r")+h.getPadding.call(h,"r");m=h.getBorderWidth.call(h,"t")+h.getPadding.call(h,"t");i=h.getBorderWidth.call(h,"b")+h.getPadding.call(h,"b");f={x:n[0]+d,y:n[1]+m,0:n[0]+d,1:n[1]+m,width:c-(d+a),height:k-(m+i)}}f.left=f.x;f.top=f.y;f.right=f.x+f.width;f.bottom=f.y+f.height;return f},getPageBox:function(e){var g=this,c=g.dom,j=c.offsetWidth,f=c.offsetHeight,m=g.getXY(),k=m[1],a=m[0]+j,i=m[1]+f,d=m[0];if(!c){return new Ext.util.Region()}if(e){return new Ext.util.Region(k,a,i,d)}else{return{left:d,top:k,width:j,height:f,right:a,bottom:i}}}});Ext.dom.Element.addMembers({WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",VISIBILITY:1,DISPLAY:2,OFFSETS:3,SEPARATOR:"-",trimRe:/^\s+|\s+$/g,wordsRe:/\w/g,spacesRe:/\s+/,styleSplitRe:/\s*(?::|;)\s*/,transparentRe:/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,classNameSplitRegex:/[\s]+/,borders:{t:"border-top-width",r:"border-right-width",b:"border-bottom-width",l:"border-left-width"},paddings:{t:"padding-top",r:"padding-right",b:"padding-bottom",l:"padding-left"},margins:{t:"margin-top",r:"margin-right",b:"margin-bottom",l:"margin-left"},defaultUnit:"px",isSynchronized:false,synchronize:function(){var g=this.dom,a={},d=g.className,f,c,e,b;if(d.length>0){f=g.className.split(this.classNameSplitRegex);for(c=0,e=f.length;c0?a:0},getWidth:function(a){var c=this.dom,b=a?(c.clientWidth-this.getPadding("lr")):c.offsetWidth;return b>0?b:0},getBorderWidth:function(a){return this.addStyles(a,this.borders)},getPadding:function(a){return this.addStyles(a,this.paddings)},applyStyles:function(d){if(d){var e=this.dom,c,b,a;if(typeof d=="function"){d=d.call()}c=typeof d;if(c=="string"){d=Ext.util.Format.trim(d).split(this.styleSplitRe);for(b=0,a=d.length;b "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:["Ext.CompositeElementLite","Ext.CompositeElement"],requires:["Ext.dom.Element"],statics:{importElementMethods:function(){}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.Element.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a).synchronize()},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b-1){c=Ext.getDom(c);if(a){f=this.elements[b];f.parentNode.insertBefore(c,f);Ext.removeNode(f)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(c,e){var b=this,d=this.elements,a;Ext.each(c,function(f){if((a=(d[f]||d[f=b.indexOf(f)]))){if(e){if(a.dom){a.remove()}else{Ext.removeNode(a)}}Ext.Array.erase(d,f,1)}});return this}},function(){var a=Ext.dom.Element,d=a.prototype,c=this.prototype,b;for(b in d){if(typeof d[b]=="function"){(function(e){c[e]=c[e]||function(){return this.invoke(e,arguments)}}).call(c,b)}}c.on=c.addListener;if(Ext.DomQuery){a.selectorFunction=Ext.DomQuery.select}a.select=function(e,f){var g;if(typeof e=="string"){g=a.selectorFunction(e,f)}else{if(e.length!==undefined){g=e}else{}}return new Ext.CompositeElementLite(g)};Ext.select=function(){return a.select.apply(a,arguments)}});Ext.define("Ext.ComponentManager",{alternateClassName:"Ext.ComponentMgr",singleton:true,constructor:function(){var a={};this.all={map:a,getArray:function(){var b=[],c;for(c in a){b.push(a[c])}return b}};this.map=a},register:function(a){var b=a.getId();this.map[a.getId()]=a},unregister:function(a){delete this.map[a.getId()]},isRegistered:function(a){return this.map[a]!==undefined},get:function(a){return this.map[a]},create:function(a,c){if(a.isComponent){return a}else{if(Ext.isString(a)){return Ext.createByAlias("widget."+a)}else{var b=a.xtype||c;return Ext.createByAlias("widget."+b,a)}}},registerType:Ext.emptyFn});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var g=this,j=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(o,n){return n.method.apply(this,[o].concat(n.args))},a=function(p,t){var n=[],q=0,s=p.length,r,o=t!==">";for(;q\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:l},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:m},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:k},{re:/^(?:\{([^\}]+)\})/,method:j}];g.Query=Ext.extend(Object,{constructor:function(n){n=n||{};Ext.apply(this,n)},execute:function(o){var q=this.operations,r=0,s=q.length,p,n;if(!o){n=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(o)){n=o}}for(;r1){for(q=0,r=s.length;q1){r=q.length;for(p=0;p]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:["]([^"]*)["])|(?:[']([^']*)[']))\s*/g,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.app.Action",{config:{scope:null,application:null,controller:null,action:null,args:[],url:undefined,data:{},title:null,beforeFilters:[],currentFilterIndex:-1},constructor:function(a){this.initConfig(a);this.getUrl()},execute:function(){this.resume()},resume:function(){var b=this.getCurrentFilterIndex()+1,c=this.getBeforeFilters(),a=this.getController(),d=c[b];if(d){this.setCurrentFilterIndex(b);d.call(a,this)}else{a[this.getAction()].apply(a,this.getArgs())}},applyUrl:function(a){if(a===null||a===undefined){a=this.urlEncode()}return a},applyController:function(a){var c=this.getApplication(),b=c.getCurrentProfile();if(Ext.isString(a)){a=c.getController(a,b?b.getNamespace():null)}return a},urlEncode:function(){var a=this.getController(),b;if(a instanceof Ext.app.Controller){b=a.$className.split(".");a=b[b.length-1]}return a+"/"+this.getAction()}});Ext.define("Ext.app.Route",{config:{conditions:{},url:null,controller:null,action:null,initialized:false},constructor:function(a){this.initConfig(a)},recognize:function(b){if(!this.getInitialized()){this.initialize()}if(this.recognizes(b)){var c=this.matchesFor(b),a=b.match(this.matcherRegex);a.shift();return Ext.applyIf(c,{controller:this.getController(),action:this.getAction(),historyUrl:b,args:a})}},initialize:function(){this.paramMatchingRegex=new RegExp(/:([0-9A-Za-z\_]*)/g);this.paramsInMatchString=this.getUrl().match(this.paramMatchingRegex)||[];this.matcherRegex=this.createMatcherRegex(this.getUrl());this.setInitialized(true)},recognizes:function(a){return this.matcherRegex.test(a)},matchesFor:function(b){var f={},e=this.paramsInMatchString,a=b.match(this.matcherRegex),d=e.length,c;a.shift();for(c=0;c0){f.timeout=setTimeout(Ext.bind(i.handleTimeout,i,[f]),l)}i.setupErrorHandling(f);i[k]=Ext.bind(i.handleResponse,i,[f],true);i.loadScript(f);return f},abort:function(b){var c=this.statics().requests,a;if(b){if(!b.id){b=c[b]}this.abort(b)}else{for(a in c){if(c.hasOwnProperty(a)){this.abort(c[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.statics()[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).destroy();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType,b])}else{Ext.callback(b.success,b.scope,[a,b])}Ext.callback(b.callback,b.scope,[c,a,b.errorType,b])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.Operation",{config:{synchronous:true,action:null,filters:null,sorters:null,grouper:null,start:null,limit:null,batch:null,callback:null,scope:null,resultSet:null,records:null,request:null,response:null,withCredentials:null,params:null,url:null,page:null,node:null,model:undefined,addRecords:false},started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,constructor:function(a){this.initConfig(a)},applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},getRecords:function(){var a=this.getResultSet();return this._records||(a?a.getRecords():[])},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},allowWrite:function(){return this.getAction()!="read"},process:function(d,b,c,a){if(b.getSuccess()!==false){this.setResponse(a);this.setResultSet(b);this.setCompleted();this.setSuccessful()}else{return false}return this["process"+Ext.String.capitalize(d)].call(this,b,c,a)},processRead:function(d){var b=d.getRecords(),g=[],f=this.getModel(),e=b.length,c,a;for(c=0;c]+>/gi,none:function(a){return a},asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){a=parseFloat(String(a).replace(/,/g,""));return isNaN(a)?0:a},asInt:function(a){a=parseInt(String(a).replace(/,/g,""),10);return isNaN(a)?0:a}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"],stripRe:/[\$,%]/g,dashesRe:/-/g,iso8601TestRe:/\d\dT\d\d/,iso8601SplitRe:/[- :T\.Z\+]/},function(){var b=this,a=Ext.data.SortTypes;Ext.apply(b,{AUTO:{convert:function(c){return c},sortType:a.none,type:"auto"},STRING:{convert:function(c){return(c===undefined||c===null)?(this.getAllowNull()?null:""):String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?parseInt(c,10):parseInt(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?c:parseFloat(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(c){if((c===undefined||c===null||c==="")&&this.getAllowNull()){return null}return c!=="false"&&!!c},sortType:a.none,type:"bool"},DATE:{convert:function(e){var c=this.getDateFormat(),d;if(!e){return null}if(Ext.isDate(e)){return e}if(c){if(c=="timestamp"){return new Date(e*1000)}if(c=="time"){return new Date(parseInt(e,10))}return Ext.Date.parse(e,c)}d=new Date(Date.parse(e));if(isNaN(d)){if(b.iso8601TestRe.test(e)){d=e.split(b.iso8601SplitRe);d=new Date(d[0],d[1]-1,d[2],d[3],d[4],d[5])}if(isNaN(d)){d=new Date(Date.parse(e.replace(this.dashesRe,"/")))}}return isNaN(d)?null:d},sortType:a.asDate,type:"date"}});Ext.apply(b,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Validations",{alternateClassName:"Ext.data.validations",singleton:true,config:{presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address"},constructor:function(a){this.initConfig(a)},getMessage:function(a){var b=this["get"+a[0].toUpperCase()+a.slice(1)+"Message"];if(b){return b.call(this)}return""},emailRe:/^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/,presence:function(a,b){if(arguments.length===1){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&da)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){if(b===undefined||b===null){b=""}return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.identifier.Simple",{alias:"data.identifier.simple",statics:{AUTO_ID:1},config:{prefix:"ext-record-"},constructor:function(a){this.initConfig(a)},generate:function(a){return this._prefix+this.self.AUTO_ID++}});Ext.define("Ext.data.identifier.Uuid",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.uuid",isUnique:true,config:{id:undefined,salt:null,timestamp:null,version:4},applyId:function(a){if(a===undefined){return Ext.data.identifier.Uuid.Global}return a},constructor:function(){var a=this;a.callParent(arguments);a.parts=[];a.init()},reconfigure:function(a){this.setConfig(a);this.init()},generate:function(){var c=this,e=c.parts,a=c.getVersion(),b=c.getSalt(),d=c.getTimestamp();e[0]=c.toHex(d.lo,8);e[1]=c.toHex(d.hi&65535,4);e[2]=c.toHex(((d.hi>>>16)&4095)|(a<<12),4);e[3]=c.toHex(128|((c.clockSeq>>>8)&63),2)+c.toHex(c.clockSeq&255,2);e[4]=c.toHex(b.hi,4)+c.toHex(b.lo,8);if(a==4){c.init()}else{++d.lo;if(d.lo>=c.twoPow32){d.lo=0;++d.hi}}return e.join("-").toLowerCase()},init:function(){var b=this,a=b.getSalt(),c=b.getTimestamp();if(b.getVersion()==4){b.clockSeq=b.rand(0,b.twoPow14-1);if(!a){a={};b.setSalt(a)}if(!c){c={};b.setTimestamp(c)}a.lo=b.rand(0,b.twoPow32-1);a.hi=b.rand(0,b.twoPow16-1);c.lo=b.rand(0,b.twoPow32-1);c.hi=b.rand(0,b.twoPow28-1)}else{b.setSalt(b.split(b.getSalt()));b.setTimestamp(b.split(b.getTimestamp()));b.getSalt().hi|=256}},twoPow14:Math.pow(2,14),twoPow16:Math.pow(2,16),twoPow28:Math.pow(2,28),twoPow32:Math.pow(2,32),toHex:function(c,b){var a=c.toString(16);if(a.length>b){a=a.substring(a.length-b)}else{if(a.length")}for(;c");for(j in k){if(k.hasOwnProperty(j)){d.push("<",j,">",k[j],"")}}d.push("")}if(h){d.push("")}a.setXmlData(d.join(""));return a}});Ext.define("Ext.direct.RemotingMethod",{config:{name:null,params:null,formHandler:null,len:null,ordered:true},constructor:function(a){this.initConfig(a)},applyParams:function(f){if(Ext.isNumber(f)){this.setLen(f)}else{if(Ext.isArray(f)){this.setOrdered(false);var d=f.length,b=[],c,e,a;for(c=0;c0){if(a){for(c=0,d=a.length;c0){k.apply(m,l)}if(a){k.call(m,e)}if(c.length>0){k.apply(m,c)}if(b){k.call(m,e)}if(o.length>0){k.apply(m,o)}}else{for(f=0;f0){k.apply(m,l)}}if(a){k.call(m,e)}for(f=0;f0){k.apply(m,c)}}if(b){k.call(m,e)}for(f=0;f0){k.apply(m,o)}}}if(m.length===0){return this}if(!h){h=[]}d.length=0;d.push.apply(d,h);d.push(null,this);this.doFire();return this},doFire:function(){var k=this.firingListeners,c=this.firingArguments,g=c.length-2,d,f,b,o,h,n,a,j,l,e,m;this.isPausing=false;this.isPaused=false;this.isStopped=false;this.isFiring=true;for(d=0,f=k.length;d0){this.isPaused=false;this.doFire()}if(a){a.resume()}return this},isInterrupted:function(){return this.isStopped||this.isPaused},stop:function(){var a=this.connectingController;this.isStopped=true;if(a){this.connectingController=null;a.stop()}this.isFiring=false;this.listenerStacks=null;return this},pause:function(){var a=this.connectingController;this.isPausing=true;if(a){a.pause()}return this}});Ext.define("Ext.event.Event",{alternateClassName:"Ext.EventObject",isStopped:false,set:function(a,b){if(arguments.length===1&&typeof a!="string"){var c=a;for(a in c){if(c.hasOwnProperty(a)){this[a]=c[a]}}}else{this[a]=c[a]}},stopEvent:function(){return this.stopPropagation()},stopPropagation:function(){this.isStopped=true;return this}});Ext.define("Ext.event.ListenerStack",{currentOrder:"current",length:0,constructor:function(){this.listeners={before:[],current:[],after:[]};this.lateBindingMap={};return this},add:function(h,j,k,e){var a=this.lateBindingMap,g=this.getAll(e),f=g.length,b,d,c;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();b=a[c];if(b){if(b[h]){return false}else{b[h]=true}}else{a[c]=b={};b[h]=true}}else{if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){d.options=k;return false}}}}d=this.create(h,j,k,e);if(k&&k.prepend){delete k.prepend;g.unshift(d)}else{g.push(d)}this.length++;return true},getAt:function(b,a){return this.getAll(a)[b]},getAll:function(a){if(!a){a=this.currentOrder}return this.listeners[a]},count:function(a){return this.getAll(a).length},create:function(d,c,b,a){return{stack:this,fn:d,firingFn:false,boundFn:false,isLateBinding:typeof d=="string",scope:c,options:b||{},order:a}},remove:function(h,j,e){var g=this.getAll(e),f=g.length,b=false,a=this.lateBindingMap,d,c;if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){g.splice(f,1);b=true;this.length--;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();if(a[c]&&a[c][h]){delete a[c][h]}}break}}}return b}});Ext.define("Ext.event.publisher.Publisher",{targetType:"",idSelectorRegex:/^#([\w\-]+)$/i,constructor:function(){var b=this.handledEvents,a,c,e,d;a=this.handledEventsMap={};for(c=0,e=b.length;cb){this.isEnded=true;return this.getEndValue()}else{return this.getStartValue()+((a/b)*this.distance)}}});Ext.define("Ext.fx.easing.Momentum",{extend:"Ext.fx.easing.Abstract",config:{acceleration:30,friction:0,startVelocity:0},alpha:0,updateFriction:function(b){var a=Math.log(1-(b/10));this.theta=a;this.alpha=a/this.getAcceleration()},updateStartVelocity:function(a){this.velocity=a*this.getAcceleration()},updateAcceleration:function(a){this.velocity=this.getStartVelocity()*a;this.alpha=this.theta/a},getValue:function(){return this.getStartValue()-this.velocity*(1-this.getFrictionFactor())/this.theta},getFrictionFactor:function(){var a=Ext.Date.now()-this.getStartTime();return Math.exp(a*this.alpha)},getVelocity:function(){return this.getFrictionFactor()*this.velocity}});Ext.define("Ext.mixin.Mixin",{onClassExtended:function(b,e){var a=e.mixinConfig,d,f,c;if(a){d=b.superclass.mixinConfig;if(d){a=e.mixinConfig=Ext.merge({},d,a)}e.mixinId=a.id;f=a.beforeHooks;c=a.hooks||a.afterHooks;if(f||c){Ext.Function.interceptBefore(e,"onClassMixedIn",function(h){var g=this.prototype;if(f){Ext.Object.each(f,function(j,i){h.override(i,function(){if(g[j].apply(this,arguments)!==false){return this.callOverridden(arguments)}})})}if(c){Ext.Object.each(c,function(j,i){h.override(i,function(){var k=this.callOverridden(arguments);g[j].apply(this,arguments);return k})})}})}}}});Ext.define("Ext.mixin.Selectable",{extend:"Ext.mixin.Mixin",mixinConfig:{id:"selectable",hooks:{updateStore:"updateStore"}},config:{disableSelection:null,mode:"SINGLE",allowDeselect:false,lastSelected:null,lastFocused:null,deselectOnContainerClick:true},modes:{SINGLE:true,SIMPLE:true,MULTI:true},selectableEventHooks:{addrecords:"onSelectionStoreAdd",removerecords:"onSelectionStoreRemove",updaterecord:"onSelectionStoreUpdate",load:"refreshSelection",refresh:"refreshSelection"},constructor:function(){this.selected=new Ext.util.MixedCollection();this.callParent(arguments)},applyMode:function(a){a=a?a.toUpperCase():"SINGLE";return this.modes[a]?a:"SINGLE"},updateStore:function(a,c){var b=this,d=Ext.apply({},b.selectableEventHooks,{scope:b});if(c&&Ext.isObject(c)&&c.isStore){if(c.autoDestroy){c.destroy()}else{c.un(d)}}if(a){a.on(d);b.refreshSelection()}},selectAll:function(a){var e=this,c=e.getStore().getRange(),d=c.length,b=0;for(;bg){e=g;g=c;c=e}for(d=c;d<=g;d++){a.push(b.getAt(d))}this.doMultiSelect(a,h)},select:function(c,e,b){var d=this,a;if(d.getDisableSelection()){return}if(typeof c==="number"){c=[d.getStore().getAt(c)]}if(!c){return}if(d.getMode()=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doSingleSelect:function(a,b){var d=this,c=d.selected;if(d.getDisableSelection()){return}if(d.isSelected(a)){return}if(c.getCount()>0){d.deselect(d.getLastSelected(),b)}c.add(a);d.setLastSelected(a);d.onItemSelect(a,b);d.setLastFocused(a);if(!b){d.fireSelectionChange([a])}},doMultiSelect:function(a,j,h){if(a===null||this.getDisableSelection()){return}a=!Ext.isArray(a)?[a]:a;var f=this,b=f.selected,e=a.length,g=false,c=0,d;if(!j&&b.getCount()>0){g=true;f.deselect(f.getSelection(),true)}for(;c0},refreshSelection:function(){var b=this,a=b.getSelection();b.deselectAll(true);if(a.length){b.select(a,false,true)}},onSelectionStoreRemove:function(c,b){var g=this,e=g.selected,f=b.length,a,d;if(g.getDisableSelection()){return}for(d=0;d0)?a[0]:b;return this.fromTouch(c)},fromTouch:function(a){return new this(a.pageX,a.pageY)},from:function(a){if(!a){return new this(0,0)}if(!(a instanceof this)){return new this(a.x,a.y)}return a}},constructor:function(a,b){if(typeof a=="undefined"){a=0}if(typeof b=="undefined"){b=0}this.x=a;this.y=b;return this},clone:function(){return new this.self(this.x,this.y)},copy:function(){return this.clone.apply(this,arguments)},copyFrom:function(a){this.x=a.x;this.y=a.y;return this},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x===a.x&&this.y===a.y)},isCloseTo:function(c,b){if(typeof b=="number"){b={x:b};b.y=b.x}var a=c.x,f=c.y,e=b.x,d=b.y;return(this.x<=a+e&&this.x>=a-e&&this.y<=f+d&&this.y>=f-d)},isWithin:function(){return this.isCloseTo.apply(this,arguments)},translate:function(a,b){this.x+=a;this.y+=b;return this},roundedEquals:function(a){return(Math.round(this.x)===Math.round(a.x)&&Math.round(this.y)===Math.round(a.y))},getDistanceTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.sqrt(c*c+a*a)},getAngleTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.atan2(a,c)*this.radianToDegreeConstant}});Ext.define("Ext.util.Region",{statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,f,a,c){var e=this;e.top=d;e[1]=d;e.right=f;e.bottom=a;e.left=c;e[0]=c},contains:function(b){var a=this;return(b.left>=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.top,g.top),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.left,g.left);if(a>d&&e>c){return new Ext.util.Region(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.top,g.top),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.left,g.left);return new Ext.util.Region(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.util.Numbers.constrain;a.top=c(a.top,b.top,b.bottom);a.bottom=c(a.bottom,b.top,b.bottom);a.left=c(a.left,b.left,b.right);a.right=c(a.right,b.left,b.right);return a},adjust:function(d,f,a,c){var e=this;e.top+=d;e.left+=c;e.right+=f;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.left){return this.left-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.top){return this.top-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(athis.right)},isOutOfBoundY:function(a){return(athis.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.left){b-=(b-this.left)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.top){b-=(b-this.top)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.left,height:this.bottom-this.top}},copy:function(){return new Ext.util.Region(this.top,this.right,this.bottom,this.left)},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a){this.left+=a.x;this.right+=a.x;this.top+=a.y;this.bottom+=a.y;return this},round:function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.util.Sorter",{isSorter:true,config:{property:null,sorterFn:null,root:null,transform:null,direction:"ASC",id:undefined},constructor:function(a){this.initConfig(a)},applyId:function(a){if(!a){a=this.getProperty();if(!a){a=Ext.id(null,"ext-sorter-")}}return a},createSortFunction:function(b){var c=this,a=c.getDirection().toUpperCase()=="DESC"?-1:1;return function(e,d){return a*b.call(c,e,d)}},defaultSortFn:function(e,c){var g=this,f=g._transform,b=g._root,d,a,h=g._property;if(b!==null){e=e[b];c=c[b]}d=e[h];a=c[h];if(f){d=f(d);a=f(a)}return d>a?1:(d -1 || Ext.isDate(values) ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e.substr(0,7)=="parent."){c=e}else{if((e.indexOf(".")!==-1)&&(e.indexOf("-")===-1)){c="values."+e}else{c="values['"+e+"']"}}}}if(f){c="("+c+f+")"}if(g&&this.useFormat){d=d?","+d:"";if(g.substr(0,5)!="this."){g="fm."+g+"("}else{g+="("}}else{d="";g="("+c+" === undefined ? '' : "}return g+c+d+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var a=this.prototype;a.fnArgs="out,values,parent,xindex,xcount";a.callFn=".call(this,"+a.fnArgs+")"});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,config:{name:null,type:"auto",convert:undefined,dateFormat:null,allowNull:true,defaultValue:undefined,mapping:null,sortType:undefined,sortDir:"ASC",allowBlank:true,persist:true,encode:null,decode:null,bubbleEvents:"action"},constructor:function(a){if(Ext.isString(a)){a={name:a}}this.initConfig(a)},applyType:function(c){var b=Ext.data.Types,a=b.AUTO;if(c){if(Ext.isString(c)){return b[c.toUpperCase()]||a}else{return c}}return a},updateType:function(a,b){var c=this.getConvert();if(b&&c===b.convert){this.setConvert(a.convert)}},applySortType:function(d){var c=Ext.data.SortTypes,a=this.getType(),b=a.sortType;if(d){if(Ext.isString(d)){return c[d]||b}else{return d}}return b},applyConvert:function(b){var a=this.getType().convert;if(b&&b!==a){this._hasCustomConvert=true;return b}else{this._hasCustomConvert=false;return a}},hasCustomConvert:function(){return this._hasCustomConvert}});Ext.define("Ext.data.identifier.Sequential",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.sequential",config:{prefix:"",seed:1},constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.getPrefix(),""]},generate:function(b){var c=this,d=c.parts,a=c.getSeed()+1;c.setSeed(a);d[1]=a;return d.join("")}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",config:{rootProperty:undefined,encode:false,allowSingle:true,encodeRequest:false},applyRootProperty:function(a){if(!a&&(this.getEncode()||this.getEncodeRequest())){a="data"}return a},writeRecords:function(d,e){var a=this.getRootProperty(),f=d.getParams(),b=this.getAllowSingle(),c;if(this.getAllowSingle()&&e&&e.length==1){e=e[0]}if(this.getEncodeRequest()){c=d.getJsonData()||{};if(e&&(e.length||(b&&Ext.isObject(e)))){c[a]=e}d.setJsonData(Ext.apply(c,f||{}));d.setParams(null);d.setMethod("POST");return d}if(!e||!(e.length||(b&&Ext.isObject(e)))){return d}if(this.getEncode()){if(a){f[a]=Ext.encode(e)}else{}}else{c=d.getJsonData()||{};if(a){c[a]=e}else{c=e}d.setJsonData(c)}return d}});Ext.define("Ext.event.Dispatcher",{requires:["Ext.event.ListenerStack","Ext.event.Controller"],statics:{getInstance:function(){if(!this.instance){this.instance=new this()}return this.instance},setInstance:function(a){this.instance=a;return this}},config:{publishers:{}},wildcard:"*",constructor:function(a){this.listenerStacks={};this.activePublishers={};this.publishersCache={};this.noActivePublishers=[];this.controller=null;this.initConfig(a);return this},getListenerStack:function(e,g,c,b){var d=this.listenerStacks,f=d[e],a;b=Boolean(b);if(!f){if(b){d[e]=f={}}else{return null}}f=f[g];if(!f){if(b){d[e][g]=f={}}else{return null}}a=f[c];if(!a){if(b){f[c]=a=new Ext.event.ListenerStack()}else{return null}}return a},getController:function(d,f,c,b){var a=this.controller,e={targetType:d,target:f,eventName:c};if(!a){this.controller=a=new Ext.event.Controller()}if(a.isFiring){a=new Ext.event.Controller()}a.setInfo(e);if(b&&a!==b){a.connect(b)}return a},applyPublishers:function(c){var a,b;this.publishersCache={};for(a in c){if(c.hasOwnProperty(a)){b=c[a];this.registerPublisher(b)}}return c},registerPublisher:function(b){var a=this.activePublishers,c=b.getTargetType(),d=a[c];if(!d){a[c]=d=[]}d.push(b);b.setDispatcher(this);return this},getCachedActivePublishers:function(c,b){var a=this.publishersCache,d;if((d=a[c])&&(d=d[b])){return d}return null},cacheActivePublishers:function(c,b,d){var a=this.publishersCache;if(!a[c]){a[c]={}}a[c][b]=d;return d},getActivePublishers:function(f,b){var g,a,c,e,d;if((g=this.getCachedActivePublishers(f,b))){return g}a=this.activePublishers[f];if(a){g=[];for(c=0,e=a.length;c0}return false},addListener:function(d,e,a){var f=this.getActivePublishers(d,a),c=f.length,b;if(c>0){for(b=0;b0){for(b=0;b0){for(b=0;b0)){return true}delete d[f];if(--d.$length===0){delete this.subscribers[a]}return true},onBeforeComponentRenderedChange:function(b,d,g){var f=this.eventNames,c=g?f.painted:f.erased,e=this.getSubscribers(c),a;if(e&&e.$length>0){this.renderedQueue[d.getId()]=a=[];this.publish(e,d,c,a)}},onBeforeComponentHiddenChange:function(c,d){var f=this.eventNames,b=d?f.erased:f.painted,e=this.getSubscribers(b),a;if(e&&e.$length>0){this.hiddenQueue[c.getId()]=a=[];this.publish(e,c,b,a)}},onComponentRenderedChange:function(b,c){var d=this.renderedQueue,e=c.getId(),a;if(!d.hasOwnProperty(e)){return}a=d[e];delete d[e];if(a.length>0){this.dispatchQueue(a)}},onComponentHiddenChange:function(c){var b=this.hiddenQueue,d=c.getId(),a;if(!b.hasOwnProperty(d)){return}a=b[d];delete b[d];if(a.length>0){this.dispatchQueue(a)}},dispatchQueue:function(g){var l=this.dispatcher,a=this.targetType,b=this.eventNames,e=g.slice(),f=e.length,c,k,h,d,j;g.length=0;if(f>0){for(c=0;c0)){return true}delete c[i];c.$length--}else{if(!d.hasOwnProperty(i)||(!j&&--d[i]>0)){return true}delete d[i];d.$length--}}else{if(g===this.SELECTOR_ALL){if(j){a.all=0}else{a.all--}}else{if(!b.hasOwnProperty(g)||(!j&&--b[g]>0)){return true}delete b[g];Ext.Array.remove(b,g)}}a.$length--;return true},getElementTarget:function(a){if(a.nodeType!==1){a=a.parentNode;if(!a||a.nodeType!==1){return null}}return a},getBubblingTargets:function(b){var a=[];if(!b){return a}do{a[a.length]=b;b=b.parentNode}while(b&&b.nodeType===1);return a},dispatch:function(c,a,b){b.push(b[0].target);this.callParent(arguments)},publish:function(b,a,c){var d=this.getSubscribers(b),e;if(d.$length===0||!this.doPublish(d,b,a,c)){e=this.getSubscribers("*");if(e.$length>0){this.doPublish(e,b,a,c)}}return this},doPublish:function(f,h,x,u){var r=f.id,g=f.className,b=f.selector,p=r.$length>0,a=g.$length>0,l=b.length>0,o=f.all>0,y={},e=[u],q=false,m=this.classNameSplitRegex,v,k,t,d,z,n,c,w,s;for(v=0,k=x.length;v0){c=a.slice(0);a.length=0;for(b=0;b0){this.processEvent(this.mergeEvents(d));d.length=0}this.processEvent(e)}}if(d.length>0){this.processEvent(this.mergeEvents(d));d.length=0}}},mergeEvents:function(c){var b=[],f=c.length,a,e,d;d=c[f-1];if(f===1){return d}for(a=0;ah){for(d=0;dh){return}}for(d=0;da){this.end(d)}}},onTouchEnd:function(a){this.end(a)},start:function(){if(!this.isTracking){this.isTracking=true;this.isStarted=false}},end:function(a){if(this.isTracking){this.isTracking=false;if(this.isStarted){this.isStarted=false;this.fireEnd(a)}}}});Ext.define("Ext.event.recognizer.Pinch",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["pinchstart","pinch","pinchend"],startDistance:0,lastTouches:null,onTouchMove:function(c){if(!this.isTracking){return}var b=Array.prototype.slice.call(c.touches),d,a,f;d=b[0].point;a=b[1].point;f=d.getDistanceTo(a);if(f===0){return}if(!this.isStarted){this.isStarted=true;this.startDistance=f;this.fire("pinchstart",c,b,{touches:b,distance:f,scale:1})}else{this.fire("pinch",c,b,{touches:b,distance:f,scale:f/this.startDistance})}this.lastTouches=b},fireEnd:function(a){this.fire("pinchend",a,this.lastTouches)},fail:function(){return this.callParent(arguments)}});Ext.define("Ext.event.recognizer.Rotate",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["rotatestart","rotate","rotateend"],startAngle:0,lastTouches:null,lastAngle:null,onTouchMove:function(h){if(!this.isTracking){return}var g=Array.prototype.slice.call(h.touches),b=this.lastAngle,d,f,c,a,i,j;d=g[0].point;f=g[1].point;c=d.getAngleTo(f);if(b!==null){j=Math.abs(b-c);a=c+360;i=c-360;if(Math.abs(a-b)1){return this.fail(this.self.NOT_SINGLE_TOUCH)}}});Ext.define("Ext.event.recognizer.DoubleTap",{extend:"Ext.event.recognizer.SingleTouch",config:{maxDuration:300},handledEvents:["singletap","doubletap"],singleTapTimer:null,onTouchStart:function(a){if(this.callParent(arguments)===false){return false}this.startTime=a.time;clearTimeout(this.singleTapTimer)},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onEnd:function(g){var c=this,b=this.getMaxDuration(),h=g.changedTouches[0],f=g.time,a=this.lastTapTime,d;this.lastTapTime=f;if(a){d=f-a;if(d<=b){this.lastTapTime=0;this.fire("doubletap",g,[h],{touch:h,duration:d});return}}if(f-this.startTime>b){this.fireSingleTap(g,h)}else{this.singleTapTimer=setTimeout(function(){c.fireSingleTap(g,h)},b)}},fireSingleTap:function(a,b){this.fire("singletap",a,[b],{touch:b})}});Ext.define("Ext.event.recognizer.Drag",{extend:"Ext.event.recognizer.SingleTouch",isStarted:false,startPoint:null,previousPoint:null,lastPoint:null,handledEvents:["dragstart","drag","dragend"],onTouchStart:function(b){var c,a;if(this.callParent(arguments)===false){if(this.isStarted&&this.lastMoveEvent!==null){this.onTouchEnd(this.lastMoveEvent)}return false}this.startTouches=c=b.changedTouches;this.startTouch=a=c[0];this.startPoint=a.point},onTouchMove:function(d){var c=d.changedTouches,f=c[0],a=f.point,b=d.time;if(this.lastPoint){this.previousPoint=this.lastPoint}if(this.lastTime){this.previousTime=this.lastTime}this.lastTime=b;this.lastPoint=a;this.lastMoveEvent=d;if(!this.isStarted){this.isStarted=true;this.startTime=b;this.previousTime=b;this.previousPoint=this.startPoint;this.fire("dragstart",d,this.startTouches,this.getInfo(d,this.startTouch))}else{this.fire("drag",d,c,this.getInfo(d,f))}},onTouchEnd:function(c){if(this.isStarted){var b=c.changedTouches,d=b[0],a=d.point;this.isStarted=false;this.lastPoint=a;this.fire("dragend",c,b,this.getInfo(c,d));this.startTime=0;this.previousTime=0;this.lastTime=0;this.startPoint=null;this.previousPoint=null;this.lastPoint=null;this.lastMoveEvent=null}},getInfo:function(j,i){var d=j.time,a=this.startPoint,f=this.previousPoint,b=this.startTime,k=this.previousTime,l=this.lastPoint,h=l.x-a.x,g=l.y-a.y,c={touch:i,startX:a.x,startY:a.y,previousX:f.x,previousY:f.y,pageX:l.x,pageY:l.y,deltaX:h,deltaY:g,absDeltaX:Math.abs(h),absDeltaY:Math.abs(g),previousDeltaX:l.x-f.x,previousDeltaY:l.y-f.y,time:d,startTime:b,previousTime:k,deltaTime:d-b,previousDeltaTime:d-k};return c}});Ext.define("Ext.event.recognizer.LongPress",{extend:"Ext.event.recognizer.SingleTouch",inheritableStatics:{DURATION_NOT_ENOUGH:32},config:{minDuration:1000},handledEvents:["longpress"],fireLongPress:function(a){var b=a.changedTouches[0];this.fire("longpress",a,[b],{touch:b,duration:this.getMinDuration()});this.isLongPress=true},onTouchStart:function(b){var a=this;if(this.callParent(arguments)===false){return false}this.isLongPress=false;this.timer=setTimeout(function(){a.fireLongPress(b)},this.getMinDuration())},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(){if(!this.isLongPress){return this.fail(this.self.DURATION_NOT_ENOUGH)}},fail:function(){clearTimeout(this.timer);return this.callParent(arguments)}},function(){this.override({handledEvents:["longpress","taphold"],fire:function(a){if(a==="longpress"){var b=Array.prototype.slice.call(arguments);b[0]="taphold";this.fire.apply(this,b)}return this.callOverridden(arguments)}})});Ext.define("Ext.event.recognizer.Tap",{handledEvents:["tap"],extend:"Ext.event.recognizer.SingleTouch",onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(a){var b=a.changedTouches[0];this.fire("tap",a,[b])}},function(){});(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,f){return c[f]})}Ext.DateExtras={now:Date.now||function(){return +new Date()},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var f=(d||"").match(e);return f?new Date(((f[1]||"")+f[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return a.monthNames[c].substring(0,3)},getShortDayName:function(c){return a.dayNames[c].substring(0,3)},getMonthNumber:function(c){return a.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var j="Y-m-dTH:i:sP",g=[],f=0,d=j.length;f= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(l){var e=a.parseRegexes.length,m=1,f=[],k=[],j=false,d="";for(var h=0;h Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)"},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a.formatCodeToRegex("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a.formatCodeToRegex("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var f=0,d=c.length;f0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(f){var e=0,h=Ext.Date.clone(f),c=f.getMonth(),g;for(g=0,h.setDate(1),h.setMonth(0);g28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(g),"mo",h)).getDate())}i.setDate(e);i.setMonth(g.getMonth()+h);break;case Ext.Date.YEAR:i.setFullYear(g.getFullYear()+h);break}return i},between:function(d,f,c){var e=d.getTime();return f.getTime()<=e&&e<=c.getTime()}};var a=Ext.DateExtras;Ext.apply(Ext.Date,a)})();Ext.define("Ext.fx.Easing",{requires:["Ext.fx.easing.Linear"],constructor:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")}});Ext.define("Ext.fx.easing.BoundMomentum",{extend:"Ext.fx.easing.Abstract",requires:["Ext.fx.easing.Momentum","Ext.fx.easing.Bounce"],config:{momentum:null,bounce:null,minMomentumValue:0,maxMomentumValue:0,minVelocity:0.01,startVelocity:0},applyMomentum:function(a,b){return Ext.factory(a,Ext.fx.easing.Momentum,b)},applyBounce:function(a,b){return Ext.factory(a,Ext.fx.easing.Bounce,b)},updateStartTime:function(a){this.getMomentum().setStartTime(a);this.callParent(arguments)},updateStartVelocity:function(a){this.getMomentum().setStartVelocity(a)},updateStartValue:function(a){this.getMomentum().setStartValue(a)},reset:function(){this.lastValue=null;this.isBouncingBack=false;this.isOutOfBound=false;return this.callParent(arguments)},getValue:function(){var a=this.getMomentum(),j=this.getBounce(),e=a.getStartVelocity(),f=e>0?1:-1,g=this.getMinMomentumValue(),d=this.getMaxMomentumValue(),c=(f==1)?d:g,h=this.lastValue,i,b;if(e===0){return this.getStartValue()}if(!this.isOutOfBound){i=a.getValue();b=a.getVelocity();if(Math.abs(b)=g&&i<=d){return i}this.isOutOfBound=true;j.setStartTime(Ext.Date.now()).setStartVelocity(b).setStartValue(c)}i=j.getValue();if(!this.isEnded){if(!this.isBouncingBack){if(h!==null){if((f==1&&ih)){this.isBouncingBack=true}}}else{if(Math.round(i)==c){this.isEnded=true}}}this.lastValue=i;return i}});Ext.define("Ext.fx.easing.EaseIn",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-in",config:{exponent:4,duration:1500},getValue:function(){var c=Ext.Date.now()-this.getStartTime(),g=this.getDuration(),b=this.getStartValue(),a=this.getEndValue(),h=this.distance,e=c/g,d=Math.pow(e,this.getExponent()),f=b+(d*h);if(c>=g){this.isEnded=true;return a}return f}});Ext.define("Ext.fx.easing.EaseOut",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-out",config:{exponent:4,duration:1500},getValue:function(){var f=Ext.Date.now()-this.getStartTime(),d=this.getDuration(),b=this.getStartValue(),h=this.getEndValue(),a=this.distance,c=f/d,g=1-c,e=1-Math.pow(g,this.getExponent()),i=b+(e*a);if(f>=d){this.isEnded=true;return h}return i}});Ext.define("Ext.mixin.Filterable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Filter"],mixinConfig:{id:"filterable"},config:{filters:null,filterRoot:null},dirtyFilterFn:false,filterFn:null,filtered:false,applyFilters:function(a,b){if(!b){b=this.createFiltersCollection()}b.clear();this.filtered=false;this.dirtyFilterFn=true;if(a){this.addFilters(a)}return b},createFiltersCollection:function(){this._filters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._filters},addFilter:function(a){this.addFilters([a])},addFilters:function(b){var a=this.getFilters();return this.insertFilters(a?a.length:0,b)},insertFilter:function(a,b){return this.insertFilters(a,[b])},insertFilters:function(h,c){if(!Ext.isArray(c)){c=[c]}var j=c.length,a=this.getFilterRoot(),d=this.getFilters(),e=[],f,g,b;if(!d){d=this.createFiltersCollection()}for(g=0;g=200&&a<300)||a==304||(a==0&&d.responseText.length>0),b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var g=c.xhr,a={},h,d,i,e,f,b;if(c.timedout||c.aborted){c.success=false;h=[]}else{h=g.getAllResponseHeaders().replace(this.lineBreakRe,"\n").split("\n")}d=h.length;while(d--){i=h[d];e=i.indexOf(":");if(e>=0){f=i.substr(0,e).toLowerCase();if(i.charAt(e+1)==" "){++e}a[f]=i.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:g.status,statusText:g.statusText,getResponseHeader:function(j){return a[j.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:g.responseText,responseXML:g.responseXML};g=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:["Ext.mixin.Observable"],isReader:true,config:{idProperty:undefined,clientIdProperty:"clientId",totalProperty:"total",successProperty:"success",messageProperty:null,rootProperty:"",implicitIncludes:true,model:undefined},constructor:function(a){this.initConfig(a)},fieldCount:0,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},applyIdProperty:function(a){if(!a&&this.getModel()){a=this.getModel().getIdProperty()}return a},updateModel:function(a){if(a){if(!this.getIdProperty()){this.setIdProperty(a.getIdProperty())}this.buildExtractors()}},createAccessor:Ext.emptyFn,createFieldAccessExpression:function(){return"undefined"},buildExtractors:function(){if(!this.getModel()){return}var b=this,c=b.getTotalProperty(),a=b.getSuccessProperty(),d=b.getMessageProperty();if(c){b.getTotal=b.createAccessor(c)}if(a){b.getSuccess=b.createAccessor(a)}if(d){b.getMessage=b.createAccessor(d)}b.extractRecordData=b.buildRecordDataExtractor()},buildRecordDataExtractor:function(){var k=this,e=k.getModel(),g=e.getFields(),j=g.length,a=[],h=k.getModel().getClientIdProperty(),f="__field",b=["var me = this,\n"," fields = me.getModel().getFields(),\n"," idProperty = me.getIdProperty(),\n",' idPropertyIsFn = (typeof idProperty == "function"),'," value,\n"," internalId"],d,l,c,m;g=g.items;for(d=0;d=0){return Ext.functionFactory("obj","var value; try {value = obj"+(b>0?".":"")+c+"} catch(e) {}; return value;")}}return function(d){return d[c]}}}(),createFieldAccessExpression:function(g,b,c){var f=this,h=f.objectRe,e=(g.getMapping()!==null),a=e?g.getMapping():g.getName(),i,d;if(typeof a==="function"){i=b+".getMapping()("+c+", this)"}else{if(f.getUseSimpleAccessors()===true||((d=String(a).search(h))<0)){if(!e||isNaN(a)){a='"'+a+'"'}i=c+"["+a+"]"}else{i=c+(d>0?".":"")+a}}return i}});Ext.define("Ext.data.proxy.Proxy",{extend:"Ext.Evented",alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json","Ext.data.Batch","Ext.data.Operation"],config:{batchOrder:"create,update,destroy",batchActions:true,model:null,reader:{type:"json"},writer:{type:"json"}},isProxy:true,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},updateModel:function(b){if(b){var a=this.getReader();if(a&&!a.getModel()){a.setModel(b)}}},applyReader:function(b,a){return Ext.factory(b,Ext.data.Reader,a,"reader")},updateReader:function(a){if(a){var b=this.getModel();if(!b){b=a.getModel();if(b){this.setModel(b)}}else{a.setModel(b)}if(a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}}},onMetaChange:function(b){var a=this.getReader().getModel();if(!this.getModel()&&a){this.setModel(a)}this.fireEvent("metachange",this,b)},applyWriter:function(b,a){return Ext.factory(b,Ext.data.Writer,a,"writer")},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.getReader(),this.getWriter())},batch:function(e,f){var g=this,d=g.getBatchActions(),c=this.getModel(),b,a;if(e.operations===undefined){e={operations:e,batch:{listeners:f}}}if(e.batch){if(e.batch.isBatch){e.batch.setProxy(g)}else{e.batch.proxy=g}}else{e.batch={proxy:g,listeners:e.listeners||{}}}if(!b){b=new Ext.data.Batch(e.batch)}b.on("complete",Ext.bind(g.onBatchComplete,g,[e],0));Ext.each(g.getBatchOrder().split(","),function(h){a=e.operations[h];if(a){if(d){b.add(new Ext.data.Operation({action:h,records:a,model:c}))}else{Ext.each(a,function(i){b.add(new Ext.data.Operation({action:h,records:[i],model:c}))})}}},g);b.start();return b},onBatchComplete:function(a,b){var c=a.scope||this;if(b.hasException){if(Ext.isFunction(a.failure)){Ext.callback(a.failure,c,[b,a])}}else{if(Ext.isFunction(a.success)){Ext.callback(a.success,c,[b,a])}}if(Ext.isFunction(a.callback)){Ext.callback(a.callback,c,[b,a])}}},function(){});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.proxy.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",isMemoryProxy:true,config:{data:[]},finishOperation:function(b,f,d){if(b){var c=0,e=b.getRecords(),a=e.length;for(c;c0){if(o){h[e]=m[0].getProperty();h[b]=m[0].getDirection()}else{h[e]=n.encodeSorters(m)}}if(c&&f&&f.length>0){h[c]=n.encodeFilters(f)}return h},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.getNoCache()){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.getCacheString(),Ext.Date.now()))}return a},getUrl:function(a){return a?a.getUrl()||this.getApi()[a.getAction()]||this._url:this._url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],config:{defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true},doRequest:function(a,f,b){var d=this,c=d.buildRequest(a),e=c.getParams();c.setConfig({callbackKey:d.getCallbackKey(),timeout:d.getTimeout(),scope:d,callback:d.createRequestCallback(c,a,f,b)});if(d.getAutoAppendParams()){c.setParams({})}c.setJsonP(Ext.data.JsonP.request(c.getCurrentConfig()));c.setParams(e);a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(h,f,g){delete c.lastRequest;c.processResponse(h,a,d,f,e,b)}},setException:function(b,a){b.setException(b.getRequest().getJsonP().errorType)},buildUrl:function(f){var h=this,a=h.callParent(arguments),e=Ext.apply({},f.getParams()),c=e.filters,d,b,g,j;delete e.filters;if(h.getAutoAppendParams()){a=Ext.urlAppend(a,Ext.Object.toQueryString(e))}if(c&&c.length){for(g=0;g1){this.endAnimationCounter=0;this.fireEvent("animationend",this)}},applyInAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},applyOutAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},updateInAnimation:function(a){a.setScope(this)},updateOutAnimation:function(a){a.setScope(this)},onActiveItemChange:function(a,e,h,i,d){var b=this.getInAnimation(),g=this.getOutAnimation(),f,c;if(e&&h&&h.isPainted()){f=e.renderElement;c=h.renderElement;b.setElement(f);g.setElement(c);g.setOnBeforeEnd(function(j,k){if(k||Ext.Animator.hasRunningAnimations(j)){d.firingArguments[1]=null;d.firingArguments[2]=null}});g.setOnEnd(function(){d.resume()});f.dom.style.setProperty("visibility","hidden","!important");e.show();Ext.Animator.run([g,b]);d.pause()}}});Ext.define("Ext.fx.layout.card.Cover",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cover",config:{reverse:null,inAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out"},outAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1},out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Cube",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cube",config:{reverse:null,inAnimation:{type:"cube"},outAnimation:{type:"cube",out:true}}});Ext.define("Ext.fx.layout.card.Fade",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.fade",config:{reverse:null,inAnimation:{type:"fade",easing:"ease-out"},outAnimation:{type:"fade",easing:"ease-out",out:true}}});Ext.define("Ext.fx.layout.card.Flip",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.flip",config:{duration:500,inAnimation:{type:"flip",half:true,easing:"ease-out",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null}},outAnimation:{type:"flip",half:true,easing:"ease-in",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null},out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Pop",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.pop",config:{duration:500,inAnimation:{type:"pop",easing:"ease-out"},outAnimation:{type:"pop",easing:"ease-in",out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Reveal",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.reveal",config:{inAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1}},outAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Slide",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.slide",config:{inAnimation:{type:"slide",easing:"ease-out"},outAnimation:{type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.Card",{requires:["Ext.fx.layout.card.Slide","Ext.fx.layout.card.Cover","Ext.fx.layout.card.Reveal","Ext.fx.layout.card.Fade","Ext.fx.layout.card.Flip","Ext.fx.layout.card.Pop","Ext.fx.layout.card.Scroll"],constructor:function(b){var a=Ext.fx.layout.card.Abstract,c;if(!b){return null}if(typeof b=="string"){c=b;b={}}else{if(b.type){c=b.type}}b.elementBox=false;if(c){if(Ext.os.is.Android2){if(c!="fade"){c="scroll"}}else{if(c==="slide"&&Ext.browser.is.ChromeMobile){c="scroll"}}a=Ext.ClassManager.getByAlias("fx.layout.card."+c)}return Ext.factory(b,a)}});Ext.define("Ext.fx.runner.Css",{extend:"Ext.Evented",requires:["Ext.fx.Animation"],prefixedProperties:{transform:true,"transform-origin":true,perspective:true,"transform-style":true,transition:true,"transition-property":true,"transition-duration":true,"transition-timing-function":true,"transition-delay":true,animation:true,"animation-name":true,"animation-duration":true,"animation-iteration-count":true,"animation-direction":true,"animation-timing-function":true,"animation-delay":true},lengthProperties:{top:true,right:true,bottom:true,left:true,width:true,height:true,"max-height":true,"max-width":true,"min-height":true,"min-width":true,"margin-bottom":true,"margin-left":true,"margin-right":true,"margin-top":true,"padding-bottom":true,"padding-left":true,"padding-right":true,"padding-top":true,"border-bottom-width":true,"border-left-width":true,"border-right-width":true,"border-spacing":true,"border-top-width":true,"border-width":true,"outline-width":true,"letter-spacing":true,"line-height":true,"text-indent":true,"word-spacing":true,"font-size":true,translate:true,translateX:true,translateY:true,translateZ:true,translate3d:true},durationProperties:{"transition-duration":true,"transition-delay":true,"animation-duration":true,"animation-delay":true},angleProperties:{rotate:true,rotateX:true,rotateY:true,rotateZ:true,skew:true,skewX:true,skewY:true},lengthUnitRegex:/([a-z%]*)$/,DEFAULT_UNIT_LENGTH:"px",DEFAULT_UNIT_ANGLE:"deg",DEFAULT_UNIT_DURATION:"ms",formattedNameCache:{},constructor:function(){var a=Ext.feature.has.Css3dTransforms;if(a){this.transformMethods=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","scaleX","scaleY","scaleZ"]}else{this.transformMethods=["translateX","translateY","rotate","skewX","skewY","scaleX","scaleY"]}this.vendorPrefix=Ext.browser.getStyleDashPrefix();this.ruleStylesCache={};return this},getStyleSheet:function(){var c=this.styleSheet,a,b;if(!c){a=document.createElement("style");a.type="text/css";(document.head||document.getElementsByTagName("head")[0]).appendChild(a);b=document.styleSheets;this.styleSheet=c=b[b.length-1]}return c},applyRules:function(i){var g=this.getStyleSheet(),k=this.ruleStylesCache,j=g.cssRules,c,e,h,b,d,a,f;for(c in i){e=i[c];h=k[c];if(h===undefined){d=j.length;g.insertRule(c+"{}",d);h=k[c]=j.item(d).style}b=h.$cache;if(!b){b=h.$cache={}}for(a in e){f=this.formatValue(e[a],a);a=this.formatName(a);if(b[a]!==f){b[a]=f;if(f===null){h.removeProperty(a)}else{h.setProperty(a,f,"important")}}}}return this},applyStyles:function(d){var g,c,f,b,a,e;for(g in d){c=document.getElementById(g);if(!c){return this}f=c.style;b=d[g];for(a in b){e=this.formatValue(b[a],a);a=this.formatName(a);if(e===null){f.removeProperty(a)}else{f.setProperty(a,e,"important")}}}return this},formatName:function(b){var a=this.formattedNameCache,c=a[b];if(!c){if(this.prefixedProperties[b]){c=this.vendorPrefix+b}else{c=b}a[b]=c}return c},formatValue:function(j,b){var g=typeof j,l=this.DEFAULT_UNIT_LENGTH,e,a,d,f,c,k,h;if(g=="string"){if(this.lengthProperties[b]){h=j.match(this.lengthUnitRegex)[1];if(h.length>0){}else{return j+l}}return j}else{if(g=="number"){if(j==0){return"0"}if(this.lengthProperties[b]){return j+l}if(this.angleProperties[b]){return j+this.DEFAULT_UNIT_ANGLE}if(this.durationProperties[b]){return j+this.DEFAULT_UNIT_DURATION}}else{if(b==="transform"){e=this.transformMethods;c=[];for(d=0,f=e.length;d0)?k.join(", "):"none"}}}}return j}});Ext.define("Ext.fx.runner.CssTransition",{extend:"Ext.fx.runner.Css",listenersAttached:false,constructor:function(){this.runningAnimationsData={};return this.callParent(arguments)},attachListeners:function(){this.listenersAttached=true;this.getEventDispatcher().addListener("element","*","transitionend","onTransitionEnd",this)},onTransitionEnd:function(b){var a=b.target,c=a.id;if(c&&this.runningAnimationsData.hasOwnProperty(c)){this.refreshRunningAnimationsData(Ext.get(a),[b.browserEvent.propertyName])}},onAnimationEnd:function(g,f,d,j,n){var c=g.getId(),k=this.runningAnimationsData[c],o={},m={},b,h,e,l,a;d.un("stop","onAnimationStop",this);if(k){b=k.nameMap}o[c]=m;if(f.onBeforeEnd){f.onBeforeEnd.call(f.scope||this,g,j)}d.fireEvent("animationbeforeend",d,g,j);this.fireEvent("animationbeforeend",this,d,g,j);if(n||(!j&&!f.preserveEndState)){h=f.toPropertyNames;for(e=0,l=h.length;e0},refreshRunningAnimationsData:function(d,k,t,p){var g=d.getId(),q=this.runningAnimationsData,a=q[g];if(!a){return}var m=a.nameMap,s=a.nameList,b=a.sessions,f,h,e,u,l,c,r,o,n=false;t=Boolean(t);p=Boolean(p);if(!b){return this}f=b.length;if(f===0){return this}if(p){a.nameMap={};s.length=0;for(l=0;l");d.close();this.testElement=c=d.createElement("div");c.style.setProperty("position","absolute","!important");d.body.appendChild(c);this.testElementComputedStyle=window.getComputedStyle(c)}return c},getCssStyleValue:function(b,e){var d=this.getTestElement(),a=this.testElementComputedStyle,c=d.style;c.setProperty(b,e);e=a.getPropertyValue(b);c.removeProperty(b);return e},run:function(p){var F=this,h=this.lengthProperties,x={},E={},G={},d,s,y,e,u,I,v,q,r,a,A,z,o,B,l,t,g,C,H,k,f,w,n,c,D,b,m;if(!this.listenersAttached){this.attachListeners()}p=Ext.Array.from(p);for(A=0,o=p.length;A0){this.refreshRunningAnimationsData(d,Ext.Array.merge(I,v),true,G.replacePrevious)}c=a.nameMap;D=a.nameList;t={};for(z=0;z0){I=Ext.Array.difference(D,I);v=Ext.Array.merge(I,v);y["transition-property"]=I}E[s]=e=Ext.Object.chain(e);e["transition-property"]=v;e["transition-duration"]=G.duration;e["transition-timing-function"]=G.easing;e["transition-delay"]=G.delay;B.startTime=Date.now()}r=this.$className;this.applyStyles(x);q=function(i){if(i.data===r&&i.source===window){window.removeEventListener("message",q,false);F.applyStyles(E)}};window.addEventListener("message",q,false);window.postMessage(r,"*")},onAnimationStop:function(d){var f=this.runningAnimationsData,h,a,g,b,c,e;for(h in f){if(f.hasOwnProperty(h)){a=f[h];g=a.sessions;for(b=0,c=g.length;b component"})},reapply:function(){this.container.innerElement.addCls(this.cls);this.updatePack(this.getPack());this.updateAlign(this.getAlign())},unapply:function(){this.container.innerElement.removeCls(this.cls);this.updatePack(null);this.updateAlign(null)},doItemAdd:function(d,b){this.callParent(arguments);if(d.isInnerItem()){var c=d.getConfig(this.sizePropertyName),a=d.config;if(!c&&("flex" in a)){this.setItemFlex(d,a.flex)}}},doItemRemove:function(a){if(a.isInnerItem()){this.setItemFlex(a,null)}this.callParent(arguments)},onItemSizeChange:function(a){this.setItemFlex(a,null)},doItemCenteredChange:function(b,a){if(a){this.setItemFlex(b,null)}this.callParent(arguments)},doItemFloatingChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},doItemDockedChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},redrawContainer:function(){var a=this.container,b=a.renderElement.dom.parentNode;if(b&&b.nodeType!==11){a.innerElement.redraw()}},setItemFlex:function(c,a){var b=c.element,d=this.flexItemCls;if(a){b.addCls(d)}else{if(b.hasCls(d)){this.redrawContainer();b.removeCls(d)}}b.dom.style.webkitBoxFlex=a},convertPosition:function(a){if(this.positionMap.hasOwnProperty(a)){return this.positionMap[a]}return a},applyAlign:function(a){return this.convertPosition(a)},updateAlign:function(a){this.container.innerElement.dom.style.webkitBoxAlign=a},applyPack:function(a){return this.convertPosition(a)},updatePack:function(a){this.container.innerElement.dom.style.webkitBoxPack=a}});Ext.define("Ext.layout.Fit",{extend:"Ext.layout.Default",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",cls:Ext.baseCSSPrefix+"layout-fit",itemCls:Ext.baseCSSPrefix+"layout-fit-item",constructor:function(a){this.callParent(arguments);this.apply()},apply:function(){this.container.innerElement.addCls(this.cls)},reapply:function(){this.apply()},unapply:function(){this.container.innerElement.removeCls(this.cls)},doItemAdd:function(b,a){if(b.isInnerItem()){b.addCls(this.itemCls)}this.callParent(arguments)},doItemRemove:function(a){if(a.isInnerItem()){a.removeCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.Card",{extend:"Ext.layout.Fit",alternateClassName:"Ext.layout.CardLayout",isCard:true,requires:["Ext.fx.layout.Card"],alias:"layout.card",cls:Ext.baseCSSPrefix+"layout-card",itemCls:Ext.baseCSSPrefix+"layout-card-item",constructor:function(){this.callParent(arguments);this.container.onInitialized(this.onContainerInitialized,this)},applyAnimation:function(a){return new Ext.fx.layout.Card(a)},updateAnimation:function(b,a){if(b&&b.isAnimation){b.setLayout(this)}if(a){a.destroy()}},doItemAdd:function(b,a){if(b.isInnerItem()){b.hide()}this.callParent(arguments)},getInnerItemsContainer:function(){var a=this.innerItemsContainer;if(!a){this.innerItemsContainer=a=Ext.Element.create({className:this.cls+"-container"});this.container.innerElement.append(a)}return a},doItemRemove:function(c,a,b){this.callParent(arguments);if(!b&&c.isInnerItem()){c.show()}},onContainerInitialized:function(a){var b=a.getActiveItem();if(b){b.show()}a.on("activeitemchange","onContainerActiveItemChange",this)},onContainerActiveItemChange:function(a){this.relayEvent(arguments,"doActiveItemChange")},doActiveItemChange:function(b,c,a){if(a){a.hide()}if(c){c.show()}},doItemDockedChange:function(b,c){var a=b.element;if(c){a.removeCls(this.itemCls)}else{a.addCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.HBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.HBoxLayout",alias:"layout.hbox",sizePropertyName:"width",sizeChangeEventName:"widthchange",cls:Ext.baseCSSPrefix+"layout-hbox"});Ext.define("Ext.layout.VBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.VBoxLayout",alias:"layout.vbox",sizePropertyName:"height",sizeChangeEventName:"heightchange",cls:Ext.baseCSSPrefix+"layout-vbox"});Ext.define("Ext.layout.Layout",{requires:["Ext.layout.Fit","Ext.layout.Card","Ext.layout.HBox","Ext.layout.VBox"],constructor:function(a,b){var c=Ext.layout.Default,d,e;if(typeof b=="string"){d=b;b={}}else{if("type" in b){d=b.type}}if(d){c=Ext.ClassManager.getByAlias("layout."+d)}return new c(a,b)}});Ext.define("Ext.mixin.Sortable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Sorter"],mixinConfig:{id:"sortable"},config:{sorters:null,defaultSortDirection:"ASC",sortRoot:null},dirtySortFn:false,sortFn:null,sorted:false,applySorters:function(a,b){if(!b){b=this.createSortersCollection()}b.clear();this.sorted=false;if(a){this.addSorters(a)}return b},createSortersCollection:function(){this._sorters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._sorters},addSorter:function(b,a){this.addSorters([b],a)},addSorters:function(c,a){var b=this.getSorters();return this.insertSorters(b?b.length:0,c,a)},insertSorter:function(a,c,b){return this.insertSorters(a,[c],b)},insertSorters:function(e,h,a){if(!Ext.isArray(h)){h=[h]}var f=h.length,j=a||this.getDefaultSortDirection(),c=this.getSortRoot(),k=this.getSorters(),l=[],g,b,m,d;if(!k){k=this.createSortersCollection()}for(b=0;b>1;f=d(e,b[c]);if(f>=0){h=c+1}else{if(f<0){a=c-1}}}return h}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.mixin.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,f=e,c=b,a;if(arguments.length==1){f=c;c=d.getKey(f)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,f)}d.map[c]=f}d.length++;d.items.push(f);d.keys.push(c);d.fireEvent("add",d.length-1,f,c);return f},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(f){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(f)){b=arguments.length>1?arguments:f;for(a=b.length;d=d.length){return d.add(c,f)}d.length++;Ext.Array.splice(d.items,a,0,f);if(typeof c!="undefined"&&c!==null){d.map[c]=f}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,f,c);return f},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(g,b,h,a){var c=this.extractValues(g,b),f=c.length,e=0,d;h=h||0;a=(a||a===0)?a:f-1;for(d=h;d<=a;d++){e+=c[d]}return e},collect:function(j,e,g){var k=this.extractValues(j,e),a=k.length,b={},c=[],h,f,d;for(d=0;d=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,f,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:f,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(g){var m=true,n=b.length,h;for(h=0;h=e.length||(a&&e.getAutoSort())){return e.add(d,f)}if(typeof d!="undefined"&&d!==null){if(typeof g[d]!="undefined"){e.replace(d,f);return false}g[d]=f}this.all.push(f);if(b&&this.getAutoFilter()&&this.mixins.filterable.isFiltered.call(e,f)){return null}e.length++;Ext.Array.splice(e.items,c,0,f);Ext.Array.splice(e.keys,c,0,d);e.dirtyIndices=true;return f},insertAll:function(g,d){if(g>=this.items.length||(this.sorted&&this.getAutoSort())){return this.addAll(d)}var s=this,h=this.filtered,a=this.sorted,b=this.all,m=this.items,l=this.keys,r=this.map,n=this.getAutoFilter(),o=this.getAutoSort(),t=[],j=[],f=[],c=this.mixins.filterable,e=false,k,u,p,q;if(a&&this.getAutoSort()){}if(Ext.isObject(d)){for(u in d){if(d.hasOwnProperty(u)){j.push(m[u]);t.push(u)}}}else{j=d;k=d.length;for(p=0;p=0){e=a[b];c=f[b];if(typeof c!="undefined"){delete g.map[c]}Ext.Array.erase(a,b,1);Ext.Array.erase(f,b,1);Ext.Array.remove(d,e);delete g.indices[c];g.length--;this.dirtyIndices=true;return e}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[this.getKey(b)];return(a===undefined)?-1:a},indexOfKey:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[b];return(a===undefined)?-1:a},updateIndices:function(){var a=this.items,e=a.length,f=this.indices={},c,d,b;for(c=0;c=a;d--){b[b.length]=c[d]}}return b},findIndexBy:function(d,c,h){var g=this,f=g.keys,a=g.items,b=h||0,e=a.length;for(;b1){for(c=a.length;ba){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!=-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.util.Format.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.util.Format.escapeRe,"\\$1")},toggle:function(b,c,a){return b==c?a:c},trim:function(a){return a.replace(Ext.util.Format.trimRe,"")},leftPad:function(d,b,c){var a=String(d);c=c||" ";while(a.length/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},date:function(b,c){var a=b;if(!b){return""}if(!Ext.isDate(b)){a=new Date(Date.parse(b));if(isNaN(a)){if(this.iso8601TestRe.test(b)){a=b.split(this.iso8601SplitRe);a=new Date(a[0],a[1]-1,a[2],a[3],a[4],a[5])}if(isNaN(a)){a=new Date(Date.parse(b.replace(this.dashesRe,"/")))}}b=a}return Ext.Date.format(b,c||Ext.util.Format.defaultDateFormat)}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e>1){for(;cf)?1:((ba?1:(d0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,j,h){var f=this,c,e,d,g,a;if(Ext.isArray(b)){for(c=0,e=b.length;c0){Ext.Array.sort(d,f);for(c=0;cMath.max(c,b)||jMath.max(a,q)||eMath.max(p,n)||eMath.max(k,h)){return null}return new Ext.util.Point(j,e)},toString:function(){return this.point1.toString()+" "+this.point2.toString()}});Ext.define("Ext.util.SizeMonitor",{extend:"Ext.Evented",config:{element:null,detectorCls:Ext.baseCSSPrefix+"size-change-detector",callback:Ext.emptyFn,scope:null,args:[]},constructor:function(d){this.initConfig(d);this.doFireSizeChangeEvent=Ext.Function.bind(this.doFireSizeChangeEvent,this);var g=this,e=this.getElement().dom,b=this.getDetectorCls(),c=Ext.Element.create({classList:[b,b+"-expand"],children:[{}]},true),h=Ext.Element.create({classList:[b,b+"-shrink"],children:[{}]},true),a=function(i){g.onDetectorScroll("expand",i)},f=function(i){g.onDetectorScroll("shrink",i)};e.appendChild(c);e.appendChild(h);this.detectors={expand:c,shrink:h};this.position={expand:{left:0,top:0},shrink:{left:0,top:0}};this.listeners={expand:a,shrink:f};this.refresh();c.addEventListener("scroll",a,true);h.addEventListener("scroll",f,true)},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(a){a.on("destroy","destroy",this)},refreshPosition:function(b){var e=this.detectors[b],a=this.position[b],d,c;a.left=d=e.scrollWidth-e.offsetWidth;a.top=c=e.scrollHeight-e.offsetHeight;e.scrollLeft=d;e.scrollTop=c},refresh:function(){this.refreshPosition("expand");this.refreshPosition("shrink")},onDetectorScroll:function(b){var c=this.detectors[b],a=this.position[b];if(c.scrollLeft!==a.left||c.scrollTop!==a.top){this.refresh();this.fireSizeChangeEvent()}},fireSizeChangeEvent:function(){clearTimeout(this.sizeChangeThrottleTimer);this.sizeChangeThrottleTimer=setTimeout(this.doFireSizeChangeEvent,1)},doFireSizeChangeEvent:function(){this.getCallback().apply(this.getScope(),this.getArgs())},destroyDetector:function(a){var c=this.detectors[a],b=this.listeners[a];c.removeEventListener("scroll",b,true);Ext.removeNode(c)},destroy:function(){this.callParent(arguments);this.destroyDetector("expand");this.destroyDetector("shrink");delete this.listeners;delete this.detectors}});Ext.define("Ext.event.publisher.ComponentSize",{extend:"Ext.event.publisher.Publisher",requires:["Ext.ComponentManager","Ext.util.SizeMonitor"],targetType:"component",handledEvents:["resize"],constructor:function(){this.callParent(arguments);this.sizeMonitors={}},subscribe:function(g){var c=g.match(this.idSelectorRegex),f=this.subscribers,a=this.sizeMonitors,d=this.dispatcher,e=this.targetType,b;if(!c){return false}if(!f.hasOwnProperty(g)){f[g]=0;d.addListener(e,g,"painted","onComponentPainted",this,null,"before");b=Ext.ComponentManager.get(c[1]);a[g]=new Ext.util.SizeMonitor({element:b.element,callback:this.onComponentSizeChange,scope:this,args:[this,g]})}f[g]++;return true},unsubscribe:function(h,b,e){var c=h.match(this.idSelectorRegex),g=this.subscribers,d=this.dispatcher,f=this.targetType,a=this.sizeMonitors;if(!c){return false}if(!g.hasOwnProperty(h)||(!e&&--g[h]>0)){return true}a[h].destroy();delete a[h];d.removeListener(f,h,"painted","onComponentPainted",this,"before");delete g[h];return true},onComponentPainted:function(b){var c=b.getObservableId(),a=this.sizeMonitors[c];a.refresh()},onComponentSizeChange:function(a,b){this.dispatcher.doDispatchEvent(this.targetType,b,"resize",[a])}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create("Ext.util.AbstractMixedCollection",false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(g,f,c,e){var d=this,h,b,a;if(Ext.isArray(g)){e=c;c=f;a=g}else{if(Ext.isObject(g)){e=c;c=f;a=[g]}else{if(Ext.isString(g)){h=d.sorters.get(g);if(!h){h={property:g,direction:f};a=[h]}else{if(f===undefined){h.toggle()}else{h.setDirection(f)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){g=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(g)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}if(e!==false){d.onBeforeSort(a)}}if(e!==false){g=d.sorters.items;if(g.length){b=function(l,k){var j=g[0].sort(l,k),n=g.length,m;for(m=1;me?1:(f0){g=f.data.items;r=g.length;for(k=0;k0){b.create=e;f=true}if(c.length>0){b.update=c;f=true}if(a.length>0){b.destroy=a;f=true}if(f&&d.fireEvent("beforesync",this,b)!==false){d.getProxy().batch({operations:b,listeners:d.getBatchListeners()})}return{added:e,updated:c,removed:a}},first:function(){return this.data.first()},last:function(){return this.data.last()},sum:function(e){var d=0,c=0,b=this.data.items,a=b.length;for(;c0){c=b[0].get(f)}for(;d0){a=c[0].get(f)}for(;da){a=e}}return a},average:function(e){var c=0,b=this.data.items,a=b.length,d=0;if(b.length>0){for(;ce){return 1}else{if(fa.data.index)?1:-1},applyFilters:function(b){var a=this;return function(c){return a.isVisible(c)}},applyProxy:function(a){},applyNode:function(a){if(a){a=Ext.data.NodeInterface.decorate(a)}return a},updateNode:function(a,c){if(c&&!c.isDestroyed){c.un({append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad",scope:this});c.unjoin(this)}if(a){a.on({scope:this,append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad"});a.join(this);var b=[];if(a.childNodes.length){b=b.concat(this.retrieveChildNodes(a))}if(this.getRootVisible()){b.push(a)}else{if(a.isLoaded()||a.isLoading()){a.set("expanded",true)}}this.data.clear();this.fireEvent("clear",this);this.suspendEvents();this.add(b);this.resumeEvents();this.fireEvent("refresh",this,this.data)}},retrieveChildNodes:function(a){var d=this.getNode(),b=this.getRecursive(),c=[],e=a;if(!a.childNodes.length||(!b&&a!==d)){return c}if(!b){return a.childNodes}while(e){if(e._added){delete e._added;if(e===a){break}else{e=e.nextSibling||e.parentNode}}else{if(e!==a){c.push(e)}if(e.firstChild){e._added=true;e=e.firstChild}else{e=e.nextSibling||e.parentNode}}}return c},isVisible:function(b){var a=b.parentNode;if(!this.getRecursive()&&a!==this.getNode()){return false}while(a){if(!a.isExpanded()){return false}if(a===this.getNode()){break}a=a.parentNode}return true}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.NodeStore",alias:"store.tree",config:{root:undefined,clearOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",recursive:true},applyProxy:function(){return Ext.data.Store.prototype.applyProxy.apply(this,arguments)},applyRoot:function(a){var b=this;a=a||{};a=Ext.apply({},a);if(!a.isModel){Ext.applyIf(a,{id:b.getStoreId()+"-"+b.getDefaultRootId(),text:"Root",allowDrag:false});a=Ext.data.ModelManager.create(a,b.getModel())}Ext.data.NodeInterface.decorate(a);a.set(a.raw);return a},handleTreeInsertionIndex:function(a,b,d,c){if(b.parentNode){b.parentNode.sort(d.getSortFn(),true,true)}return this.callParent(arguments)},handleTreeSort:function(a,b){if(this._sorting){return a}this._sorting=true;this.getNode().sort(b.getSortFn(),true,true);delete this._sorting;return this.callParent(arguments)},updateRoot:function(a,b){if(b){b.unBefore({expand:"onNodeBeforeExpand",scope:this});b.unjoin(this)}a.onBefore({expand:"onNodeBeforeExpand",scope:this});this.onNodeAppend(null,a);this.setNode(a);if(!a.isLoaded()&&!a.isLoading()&&a.isExpanded()){this.load({node:a})}this.fireEvent("rootchange",this,a,b)},getNodeById:function(a){return this.data.getByKey(a)},onNodeBeforeExpand:function(b,a,c){if(b.isLoading()){c.pause();this.on("load",function(){c.resume()},this,{single:true})}else{if(!b.isLoaded()){c.pause();this.load({node:b,callback:function(){c.resume()}})}}},onNodeAppend:function(n,c){var l=this.getProxy(),j=l.getReader(),b=this.getModel(),g=c.raw,d=[],a=j.getRootProperty(),m,h,f,k,e;if(!c.isLeaf()){m=j.getRoot(g);if(m){h=j.extractData(m);for(f=0,k=h.length;f0){this.sendRequest(b==1?a[0]:a);this.callBuffer=[]}}});Ext.define("Ext.util.TapRepeater",{requires:["Ext.DateExtras"],mixins:{observable:"Ext.mixin.Observable"},config:{el:null,accelerate:true,interval:10,delay:250,preventDefault:true,stopDefault:false,timer:0,pressCls:null},constructor:function(a){var b=this;b.initConfig(a)},updateEl:function(c,b){var a={touchstart:"onTouchStart",touchend:"onTouchEnd",tap:"eventOptions",scope:this};if(b){b.un(a)}c.on(a)},eventOptions:function(a){if(this.getPreventDefault()){a.preventDefault()}if(this.getStopDefault()){a.stopEvent()}},destroy:function(){this.clearListeners();Ext.destroy(this.el)},onTouchStart:function(c){var b=this,a=b.getPressCls();clearTimeout(b.getTimer());if(a){b.getEl().addCls(a)}b.tapStartTime=new Date();b.fireEvent("touchstart",b,c);b.fireEvent("tap",b,c);if(b.getAccelerate()){b.delay=400}b.setTimer(Ext.defer(b.tap,b.getDelay()||b.getInterval(),b,[c]))},tap:function(b){var a=this;a.fireEvent("tap",a,b);a.setTimer(Ext.defer(a.tap,a.getAccelerate()?a.easeOutExpo(Ext.Date.getElapsed(a.tapStartTime),400,-390,12000):a.getInterval(),a,[b]))},easeOutExpo:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},onTouchEnd:function(b){var a=this;clearTimeout(a.getTimer());a.getEl().removeCls(a.getPressCls());a.fireEvent("touchend",a,b)}});Ext.define("Ext.util.translatable.Abstract",{extend:"Ext.Evented",requires:["Ext.fx.easing.Linear"],config:{element:null,easing:null,easingX:null,easingY:null,fps:60},constructor:function(a){var b;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.x=0;this.y=0;this.activeEasingX=null;this.activeEasingY=null;this.initialConfig=a;if(a&&a.element){b=a.element;this.setElement(b)}},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initConfig(this.initialConfig);this.refresh()},factoryEasing:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")},applyEasing:function(a){if(!this.getEasingX()){this.setEasingX(this.factoryEasing(a))}if(!this.getEasingY()){this.setEasingY(this.factoryEasing(a))}},applyEasingX:function(a){return this.factoryEasing(a)},applyEasingY:function(a){return this.factoryEasing(a)},updateFps:function(a){this.animationInterval=1000/a},doTranslate:function(a,b){if(typeof a=="number"){this.x=a}if(typeof b=="number"){this.y=b}return this},translate:function(a,c,b){if(!this.getElement().dom){return}if(Ext.isObject(a)){throw new Error()}this.stopAnimation();if(b){return this.translateAnimated(a,c,b)}return this.doTranslate(a,c)},animate:function(b,a){this.activeEasingX=b;this.activeEasingY=a;this.isAnimating=true;this.animationTimer=setInterval(this.doAnimationFrame,this.animationInterval);this.fireEvent("animationstart",this,this.x,this.y);return this},translateAnimated:function(b,g,e){if(Ext.isObject(b)){throw new Error()}if(!Ext.isObject(e)){e={}}var d=Ext.Date.now(),f=e.easing,c=(typeof b=="number")?(e.easingX||this.getEasingX()||f||true):null,a=(typeof g=="number")?(e.easingY||this.getEasingY()||f||true):null;if(c){c=this.factoryEasing(c);c.setStartTime(d);c.setStartValue(this.x);c.setEndValue(b);if("duration" in e){c.setDuration(e.duration)}}if(a){a=this.factoryEasing(a);a.setStartTime(d);a.setStartValue(this.y);a.setEndValue(g);if("duration" in e){a.setDuration(e.duration)}}return this.animate(c,a)},doAnimationFrame:function(){var c=this.activeEasingX,b=this.activeEasingY,d=this.getElement(),a,e;if(!this.isAnimating||!d.dom){return}if(c===null&&b===null){this.stopAnimation();return}if(c!==null){this.x=a=Math.round(c.getValue());if(c.isEnded){this.activeEasingX=null;this.fireEvent("axisanimationend",this,"x",a)}}else{a=this.x}if(b!==null){this.y=e=Math.round(b.getValue());if(b.isEnded){this.activeEasingY=null;this.fireEvent("axisanimationend",this,"y",e)}}else{e=this.y}this.doTranslate(a,e);this.fireEvent("animationframe",this,a,e)},stopAnimation:function(){if(!this.isAnimating){return}this.activeEasingX=null;this.activeEasingY=null;this.isAnimating=false;clearInterval(this.animationTimer);this.fireEvent("animationend",this,this.x,this.y)},refresh:function(){this.translate(this.x,this.y)}});Ext.define("Ext.util.translatable.CssTransform",{extend:"Ext.util.translatable.Abstract",doTranslate:function(a,c){var b=this.getElement().dom.style;if(typeof a!="number"){a=this.x}if(typeof c!="number"){c=this.y}b.webkitTransform="translate3d("+a+"px, "+c+"px, 0px)";return this.callParent(arguments)},destroy:function(){var a=this.getElement();if(a&&!a.isDestroyed){a.dom.style.webkitTransform=null}this.callParent(arguments)}});Ext.define("Ext.util.translatable.ScrollPosition",{extend:"Ext.util.translatable.Abstract",wrapperWidth:0,wrapperHeight:0,baseCls:"x-translatable",config:{useWrapper:true},getWrapper:function(){var e=this.wrapper,c=this.baseCls,b=this.getElement(),d,a;if(!e){a=b.getParent();if(!a){return null}if(this.getUseWrapper()){e=b.wrap({className:c+"-wrapper"},true)}else{e=a.dom}e.appendChild(Ext.Element.create({className:c+"-stretcher"},true));this.nestedStretcher=d=Ext.Element.create({className:c+"-nested-stretcher"},true);b.appendChild(d);b.addCls(c);a.addCls(c+"-container");this.container=a;this.wrapper=e;this.refresh()}return e},doTranslate:function(a,c){var b=this.getWrapper();if(b){if(typeof a=="number"){b.scrollLeft=this.wrapperWidth-a}if(typeof c=="number"){b.scrollTop=this.wrapperHeight-c}}return this.callParent(arguments)},refresh:function(){var a=this.getWrapper();if(a){this.wrapperWidth=a.offsetWidth;this.wrapperHeight=a.offsetHeight;this.callParent(arguments)}},destroy:function(){var b=this.getElement(),a=this.baseCls;if(this.wrapper){if(this.getUseWrapper()){b.unwrap()}this.container.removeCls(a+"-container");b.removeCls(a);b.removeChild(this.nestedStretcher)}this.callParent(arguments)}});Ext.define("Ext.util.Translatable",{requires:["Ext.util.translatable.CssTransform","Ext.util.translatable.ScrollPosition"],constructor:function(a){var c=Ext.util.translatable,e=c.CssTransform,d=c.ScrollPosition,b;if(typeof a=="object"&&"translationMethod" in a){if(a.translationMethod==="scrollposition"){b=d}else{if(a.translationMethod==="csstransform"){b=e}}}if(!b){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){b=d}else{b=e}}return new b(a)}});Ext.define("Ext.behavior.Translatable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Translatable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.translatable.refresh()},setConfig:function(c){var a=this.translatable,b=this.component;if(c){if(!a){this.translatable=a=new Ext.util.Translatable(c);a.setElement(b.renderElement);a.on("destroy","onTranslatableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getTranslatable:function(){return this.translatable},onTranslatableDestroy:function(){var a=this.component;delete this.translatable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.translatable;if(a){a.destroy()}}});Ext.define("Ext.scroll.Scroller",{extend:"Ext.Evented",requires:["Ext.fx.easing.BoundMomentum","Ext.fx.easing.EaseOut","Ext.util.SizeMonitor","Ext.util.Translatable"],config:{element:null,direction:"auto",translationMethod:"auto",fps:"auto",disabled:null,directionLock:false,momentumEasing:{momentum:{acceleration:30,friction:0.5},bounce:{acceleration:30,springTension:0.3},minVelocity:1},bounceEasing:{duration:400},outOfBoundRestrictFactor:0.5,startMomentumResetTime:300,maxAbsoluteVelocity:6,containerSize:"auto",containerScrollSize:"auto",size:"auto",autoRefresh:true,initialOffset:{x:0,y:0},slotSnapSize:{x:0,y:0},slotSnapOffset:{x:0,y:0},slotSnapEasing:{duration:150}},cls:Ext.baseCSSPrefix+"scroll-scroller",containerCls:Ext.baseCSSPrefix+"scroll-container",dragStartTime:0,dragEndTime:0,isDragging:false,isAnimating:false,constructor:function(a){var b=a&&a.element;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.stopAnimation=Ext.Function.bind(this.stopAnimation,this);this.listeners={scope:this,touchstart:"onTouchStart",touchend:"onTouchEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd"};this.minPosition={x:0,y:0};this.startPosition={x:0,y:0};this.size={x:0,y:0};this.position={x:0,y:0};this.velocity={x:0,y:0};this.isAxisEnabledFlags={x:false,y:false};this.flickStartPosition={x:0,y:0};this.flickStartTime={x:0,y:0};this.lastDragPosition={x:0,y:0};this.dragDirection={x:0,y:0};this.initialConfig=a;if(b){this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initialize();a.addCls(this.cls);if(!this.getDisabled()){this.attachListeneners()}this.onConfigUpdate(["containerSize","size"],"refreshMaxPosition");this.on("maxpositionchange","snapToBoundary");this.on("minpositionchange","snapToBoundary");return this},getTranslatable:function(){if(!this.hasOwnProperty("translatable")){var a=this.getBounceEasing();this.translatable=new Ext.util.Translatable({translationMethod:this.getTranslationMethod(),element:this.getElement(),easingX:a.x,easingY:a.y,useWrapper:false,listeners:{animationframe:"onAnimationFrame",animationend:"onAnimationEnd",axisanimationend:"onAxisAnimationEnd",scope:this}})}return this.translatable},updateFps:function(a){if(a!=="auto"){this.getTranslatable().setFps(a)}},attachListeneners:function(){this.getContainer().on(this.listeners)},detachListeners:function(){this.getContainer().un(this.listeners)},updateDisabled:function(a){if(a){this.detachListeners()}else{this.attachListeneners()}},updateInitialOffset:function(c){if(typeof c=="number"){c={x:c,y:c}}var b=this.position,a,d;b.x=a=c.x;b.y=d=c.y;this.getTranslatable().doTranslate(-a,-d)},applyDirection:function(a){var e=this.getMinPosition(),d=this.getMaxPosition(),c,b;this.givenDirection=a;if(a==="auto"){c=d.x>e.x;b=d.y>e.y;if(c&&b){a="both"}else{if(c){a="horizontal"}else{a="vertical"}}}return a},updateDirection:function(b){var a=this.isAxisEnabledFlags;a.x=(b==="both"||b==="horizontal");a.y=(b==="both"||b==="vertical")},isAxisEnabled:function(a){this.getDirection();return this.isAxisEnabledFlags[a]},applyMomentumEasing:function(b){var a=Ext.fx.easing.BoundMomentum;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applyBounceEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applySlotSnapEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},getMinPosition:function(){var a=this.minPosition;if(!a){this.minPosition=a={x:0,y:0};this.fireEvent("minpositionchange",this,a)}return a},getMaxPosition:function(){var c=this.maxPosition,a,b;if(!c){a=this.getSize();b=this.getContainerSize();this.maxPosition=c={x:Math.max(0,a.x-b.x),y:Math.max(0,a.y-b.y)};this.fireEvent("maxpositionchange",this,c)}return c},refreshMaxPosition:function(){this.maxPosition=null;this.getMaxPosition()},applyContainerSize:function(b){var c=this.getContainer().dom,a,d;if(!c){return}this.givenContainerSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applySize:function(b){var c=this.getElement().dom,a,d;if(!c){return}this.givenSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applyContainerScrollSize:function(b){var c=this.getContainer().dom,a,d;if(!c){return}this.givenContainerScrollSize=b;if(b==="auto"){a=c.scrollWidth;d=c.scrollHeight}else{a=b.x;d=b.y}return{x:a,y:d}},updateAutoRefresh:function(b){var c=Ext.util.SizeMonitor,a;if(b){this.sizeMonitors={element:new c({element:this.getElement(),callback:this.doRefresh,scope:this}),container:new c({element:this.getContainer(),callback:this.doRefresh,scope:this})}}else{a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}}},applySlotSnapSize:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},applySlotSnapOffset:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},getContainer:function(){var a=this.container;if(!a){this.container=a=this.getElement().getParent();a.addCls(this.containerCls)}return a},doRefresh:function(){this.stopAnimation();this.getTranslatable().refresh();this.setSize(this.givenSize);this.setContainerSize(this.givenContainerSize);this.setContainerScrollSize(this.givenContainerScrollSize);this.setDirection(this.givenDirection);this.fireEvent("refresh",this)},refresh:function(){var a=this.sizeMonitors;if(a){a.element.refresh();a.container.refresh()}this.doRefresh();return this},scrollTo:function(c,h,g){var b=this.getTranslatable(),a=this.position,d=false,f,e;if(this.isAxisEnabled("x")){if(typeof c!="number"){c=a.x}else{if(a.x!==c){a.x=c;d=true}}f=-c}if(this.isAxisEnabled("y")){if(typeof h!="number"){h=a.y}else{if(a.y!==h){a.y=h;d=true}}e=-h}if(d){if(g!==undefined){b.translateAnimated(f,e,g)}else{this.fireEvent("scroll",this,a.x,a.y);b.doTranslate(f,e)}}return this},scrollToTop:function(b){var a=this.getInitialOffset();return this.scrollTo(a.x,a.y,b)},scrollToEnd:function(a){return this.scrollTo(0,this.getSize().y-this.getContainerSize().y,a)},scrollBy:function(b,d,c){var a=this.position;b=(typeof b=="number")?b+a.x:null;d=(typeof d=="number")?d+a.y:null;return this.scrollTo(b,d,c)},onTouchStart:function(){this.isTouching=true;this.stopAnimation()},onTouchEnd:function(){var a=this.position;this.isTouching=false;if(!this.isDragging&&this.snapToSlot()){this.fireEvent("scrollstart",this,a.x,a.y)}},onDragStart:function(l){var o=this.getDirection(),g=l.absDeltaX,f=l.absDeltaY,j=this.getDirectionLock(),i=this.startPosition,d=this.flickStartPosition,k=this.flickStartTime,h=this.lastDragPosition,c=this.position,b=this.dragDirection,n=c.x,m=c.y,a=Ext.Date.now();this.isDragging=true;if(j&&o!=="both"){if((o==="horizontal"&&g>f)||(o==="vertical"&&f>g)){l.stopPropagation()}else{this.isDragging=false;return}}h.x=n;h.y=m;d.x=n;d.y=m;i.x=n;i.y=m;k.x=a;k.y=a;b.x=0;b.y=0;this.dragStartTime=a;this.isDragging=true;this.fireEvent("scrollstart",this,n,m)},onAxisDrag:function(i,q){if(!this.isAxisEnabled(i)){return}var h=this.flickStartPosition,l=this.flickStartTime,j=this.lastDragPosition,e=this.dragDirection,g=this.position[i],k=this.getMinPosition()[i],o=this.getMaxPosition()[i],d=this.startPosition[i],p=j[i],n=d-q,c=e[i],m=this.getOutOfBoundRestrictFactor(),f=this.getStartMomentumResetTime(),b=Ext.Date.now(),a;if(no){a=n-o;n=o+a*m}}if(n>p){e[i]=1}else{if(nf){h[i]=g;l[i]=b}j[i]=n},onDrag:function(b){if(!this.isDragging){return}var a=this.lastDragPosition;this.onAxisDrag("x",b.deltaX);this.onAxisDrag("y",b.deltaY);this.scrollTo(a.x,a.y)},onDragEnd:function(c){var b,a;if(!this.isDragging){return}this.dragEndTime=Ext.Date.now();this.onDrag(c);this.isDragging=false;b=this.getAnimationEasing("x");a=this.getAnimationEasing("y");if(b||a){this.getTranslatable().animate(b,a)}else{this.onScrollEnd()}},getAnimationEasing:function(g){if(!this.isAxisEnabled(g)){return null}var e=this.position[g],f=this.flickStartPosition[g],k=this.flickStartTime[g],c=this.getMinPosition()[g],j=this.getMaxPosition()[g],a=this.getMaxAbsoluteVelocity(),d=null,b=this.dragEndTime,l,i,h;if(ej){d=j}}if(d!==null){l=this.getBounceEasing()[g];l.setConfig({startTime:b,startValue:-e,endValue:-d});return l}h=b-k;if(h===0){return null}i=(e-f)/(b-k);if(i===0){return null}if(i<-a){i=-a}else{if(i>a){i=a}}l=this.getMomentumEasing()[g];l.setConfig({startTime:b,startValue:-e,startVelocity:-i,minMomentumValue:-j,maxMomentumValue:0});return l},onAnimationFrame:function(c,b,d){var a=this.position;a.x=-b;a.y=-d;this.fireEvent("scroll",this,a.x,a.y)},onAxisAnimationEnd:function(a){},onAnimationEnd:function(){this.snapToBoundary();this.onScrollEnd()},stopAnimation:function(){this.getTranslatable().stopAnimation()},onScrollEnd:function(){var a=this.position;if(this.isTouching||!this.snapToSlot()){this.fireEvent("scrollend",this,a.x,a.y)}},snapToSlot:function(){var b=this.getSnapPosition("x"),a=this.getSnapPosition("y"),c=this.getSlotSnapEasing();if(b!==null||a!==null){this.scrollTo(b,a,{easingX:c.x,easingY:c.y});return true}return false},getSnapPosition:function(c){var g=this.getSlotSnapSize()[c],d=null,a,f,e,b;if(g!==0&&this.isAxisEnabled(c)){a=this.position[c];f=this.getSlotSnapOffset()[c];e=this.getMaxPosition()[c];b=(a-f)%g;if(b!==0){if(Math.abs(b)>g/2){d=a+((b>0)?g-b:b-g);if(d>e){d=a-b}}else{d=a-b}}}return d},snapToBoundary:function(){var g=this.position,c=this.getMinPosition(),f=this.getMaxPosition(),e=c.x,d=c.y,b=f.x,a=f.y,i=Math.round(g.x),h=Math.round(g.y);if(ib){i=b}}if(ha){h=a}}this.scrollTo(i,h)},destroy:function(){var b=this.getElement(),a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}if(b&&!b.isDestroyed){b.removeCls(this.cls);this.getContainer().removeCls(this.containerCls)}Ext.destroy(this.translatable);this.callParent(arguments)}},function(){});Ext.define("Ext.util.Draggable",{isDraggable:true,mixins:["Ext.mixin.Observable"],requires:["Ext.util.SizeMonitor","Ext.util.Translatable"],config:{cls:Ext.baseCSSPrefix+"draggable",draggingCls:Ext.baseCSSPrefix+"dragging",element:null,constraint:"container",disabled:null,direction:"both",initialOffset:{x:0,y:0},translatable:{}},DIRECTION_BOTH:"both",DIRECTION_VERTICAL:"vertical",DIRECTION_HORIZONTAL:"horizontal",defaultConstraint:{min:{x:-Infinity,y:-Infinity},max:{x:Infinity,y:Infinity}},sizeMonitor:null,containerSizeMonitor:null,constructor:function(a){var b;this.extraConstraint={};this.initialConfig=a;this.offset={x:0,y:0};this.listeners={dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",scope:this};if(a&&a.element){b=a.element;delete a.element;this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){a.on(this.listeners);this.sizeMonitor=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.initConfig(this.initialConfig)},updateInitialOffset:function(b){if(typeof b=="number"){b={x:b,y:b}}var c=this.offset,a,d;c.x=a=b.x;c.y=d=b.y;this.getTranslatable().doTranslate(a,d)},updateCls:function(a){this.getElement().addCls(a)},applyTranslatable:function(a,b){a=Ext.factory(a,Ext.util.Translatable,b);a.setElement(this.getElement());return a},setExtraConstraint:function(a){this.extraConstraint=a||{};this.refreshConstraint();return this},addExtraConstraint:function(a){Ext.merge(this.extraConstraint,a);this.refreshConstraint();return this},applyConstraint:function(a){this.currentConstraint=a;if(!a){a=this.defaultConstraint}if(a==="container"){return Ext.merge(this.getContainerConstraint(),this.extraConstraint)}return Ext.merge({},this.extraConstraint,a)},updateConstraint:function(){this.refreshOffset()},getContainerConstraint:function(){var b=this.getContainer(),c=this.getElement();if(!b||!c.dom){return this.defaultConstraint}var h=c.dom,g=b.dom,d=h.offsetWidth,a=h.offsetHeight,f=g.offsetWidth,e=g.offsetHeight;return{min:{x:0,y:0},max:{x:f-d,y:e-a}}},getContainer:function(){var a=this.container;if(!a){a=this.getElement().getParent();if(a){this.containerSizeMonitor=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.container=a;a.on("destroy","onContainerDestroy",this)}}return a},onContainerDestroy:function(){delete this.container;delete this.containerSizeMonitor},detachListeners:function(){this.getElement().un(this.listeners)},isAxisEnabled:function(a){var b=this.getDirection();if(a==="x"){return(b===this.DIRECTION_BOTH||b===this.DIRECTION_HORIZONTAL)}return(b===this.DIRECTION_BOTH||b===this.DIRECTION_VERTICAL)},onDragStart:function(a){if(this.getDisabled()){return false}var b=this.offset;this.fireAction("dragstart",[this,a,b.x,b.y],this.initDragStart)},initDragStart:function(b,c,a,d){this.dragStartOffset={x:a,y:d};this.isDragging=true;this.getElement().addCls(this.getDraggingCls())},onDrag:function(b){if(!this.isDragging){return}var a=this.dragStartOffset;this.fireAction("drag",[this,b,a.x+b.deltaX,a.y+b.deltaY],this.doDrag)},doDrag:function(b,c,a,d){b.setOffset(a,d)},onDragEnd:function(a){if(!this.isDragging){return}this.onDrag(a);this.isDragging=false;this.getElement().removeCls(this.getDraggingCls());this.fireEvent("dragend",this,a,this.offset.x,this.offset.y)},setOffset:function(i,h,b){var f=this.offset,a=this.getConstraint(),e=a.min,c=a.max,d=Math.min,g=Math.max;if(this.isAxisEnabled("x")&&typeof i=="number"){i=d(g(i,e.x),c.x)}else{i=f.x}if(this.isAxisEnabled("y")&&typeof h=="number"){h=d(g(h,e.y),c.y)}else{h=f.y}f.x=i;f.y=h;this.getTranslatable().translate(i,h,b)},getOffset:function(){return this.offset},refreshConstraint:function(){this.setConstraint(this.currentConstraint)},refreshOffset:function(){var a=this.offset;this.setOffset(a.x,a.y)},doRefresh:function(){this.refreshConstraint();this.getTranslatable().refresh();this.refreshOffset()},refresh:function(){if(this.sizeMonitor){this.sizeMonitor.refresh()}if(this.containerSizeMonitor){this.containerSizeMonitor.refresh()}this.doRefresh()},enable:function(){return this.setDisabled(false)},disable:function(){return this.setDisabled(true)},destroy:function(){var a=this.getTranslatable();Ext.destroy(this.containerSizeMonitor,this.sizeMonitor);delete this.sizeMonitor;delete this.containerSizeMonitor;var b=this.getElement();if(b&&!b.isDestroyed){b.removeCls(this.getCls())}this.detachListeners();if(a){a.destroy()}}},function(){});Ext.define("Ext.behavior.Draggable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Draggable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.draggable.refresh()},setConfig:function(c){var a=this.draggable,b=this.component;if(c){if(!a){b.setTranslatable(true);this.draggable=a=new Ext.util.Draggable(c);a.setTranslatable(b.getTranslatable());a.setElement(b.renderElement);a.on("destroy","onDraggableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getDraggable:function(){return this.draggable},onDraggableDestroy:function(){var a=this.component;delete this.draggable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.draggable;if(a){a.destroy()}}});(function(a){Ext.define("Ext.Component",{extend:"Ext.AbstractComponent",alternateClassName:"Ext.lib.Component",mixins:["Ext.mixin.Traversable"],requires:["Ext.ComponentManager","Ext.XTemplate","Ext.dom.Element","Ext.behavior.Translatable","Ext.behavior.Draggable"],xtype:"component",observableType:"component",cachedConfig:{baseCls:null,cls:null,floatingCls:null,hiddenCls:a+"item-hidden",ui:null,margin:null,padding:null,border:null,styleHtmlCls:a+"html",styleHtmlContent:null},eventedConfig:{left:null,top:null,right:null,bottom:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,docked:null,centered:null,hidden:null,disabled:null},config:{style:null,html:null,draggable:null,translatable:null,renderTo:null,zIndex:null,tpl:null,enterAnimation:null,exitAnimation:null,showAnimation:null,hideAnimation:null,tplWriteMode:"overwrite",data:null,disabledCls:a+"item-disabled",contentEl:null,itemId:undefined,record:null,plugins:null},listenerOptionsRegex:/^(?:delegate|single|delay|buffer|args|prepend|element)$/,alignmentRegex:/^([a-z]+)-([a-z]+)(\?)?$/,isComponent:true,floating:false,rendered:false,dockPositions:{top:true,right:true,bottom:true,left:true},innerElement:null,element:null,template:[],constructor:function(c){var d=this,b=d.config,e;d.onInitializedListeners=[];d.initialConfig=c;if(c!==undefined&&"id" in c){e=c.id}else{if("id" in b){e=b.id}else{e=d.getId()}}d.id=e;d.setId(e);Ext.ComponentManager.register(d);d.initElement();d.initConfig(d.initialConfig);d.initialize();d.triggerInitialized();if(d.config.fullscreen){d.fireEvent("fullscreen",d)}d.fireEvent("initialize",d)},beforeInitConfig:function(b){this.beforeInitialize.apply(this,arguments)},beforeInitialize:Ext.emptyFn,initialize:Ext.emptyFn,getTemplate:function(){return this.template},getElementConfig:function(){return{reference:"element",children:this.getTemplate()}},triggerInitialized:function(){var c=this.onInitializedListeners,d=c.length,e,b;if(!this.initialized){this.initialized=true;if(d>0){for(b=0;b0){c.pressedTimeout=setTimeout(function(){delete c.pressedTimeout;if(a){a.addCls(b)}},d)}else{a.addCls(b)}}},onRelease:function(a){this.fireAction("release",[this,a],"doRelease")},doRelease:function(a,b){if(!a.getDisabled()){if(a.hasOwnProperty("pressedTimeout")){clearTimeout(a.pressedTimeout);delete a.pressedTimeout}else{a.element.removeCls(a.getPressedCls())}}},onTap:function(a){if(this.getDisabled()){return false}this.fireAction("tap",[this,a],"doTap")},doTap:function(c,d){var b=c.getHandler(),a=c.getScope()||c;if(!b){return}if(typeof b=="string"){b=a[b]}d.preventDefault();b.apply(a,arguments)}},function(){});Ext.define("Ext.Decorator",{extend:"Ext.Component",isDecorator:true,config:{component:{}},statics:{generateProxySetter:function(a){return function(c){var b=this.getComponent();b[a].call(b,c);return this}},generateProxyGetter:function(a){return function(){var b=this.getComponent();return b[a].call(b)}}},onClassExtended:function(c,e){if(!e.hasOwnProperty("proxyConfig")){return}var f=Ext.Class,i=e.proxyConfig,d=e.config;e.config=(d)?Ext.applyIf(d,i):i;var b,h,g,a;for(b in i){if(i.hasOwnProperty(b)){h=f.getConfigNameMap(b);g=h.set;a=h.get;e[g]=this.generateProxySetter(g);e[a]=this.generateProxyGetter(a)}}},applyComponent:function(a){return Ext.factory(a,Ext.Component)},updateComponent:function(a,b){if(b){if(this.isRendered()&&b.setRendered(false)){b.fireAction("renderedchange",[this,b,false],"doUnsetComponent",this,{args:[b]})}else{this.doUnsetComponent(b)}}if(a){if(this.isRendered()&&a.setRendered(true)){a.fireAction("renderedchange",[this,a,true],"doSetComponent",this,{args:[a]})}else{this.doSetComponent(a)}}},doUnsetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.removeChild(a.renderElement.dom)}},doSetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.appendChild(a.renderElement.dom)}},setRendered:function(b){var a;if(this.callParent(arguments)){a=this.getComponent();if(a){a.setRendered(b)}return true}return false},setDisabled:function(a){this.callParent(arguments);this.getComponent().setDisabled(a)},destroy:function(){Ext.destroy(this.getComponent());this.callParent()}});Ext.define("Ext.Img",{extend:"Ext.Component",xtype:["image","img"],config:{src:null,baseCls:Ext.baseCSSPrefix+"img",mode:"background"},beforeInitialize:function(){var a=this;a.onLoad=Ext.Function.bind(a.onLoad,a);a.onError=Ext.Function.bind(a.onError,a)},initialize:function(){var a=this;a.callParent();a.relayEvents(a.renderElement,"*");a.element.on({tap:"onTap",scope:a})},hide:function(){this.callParent();this.hiddenSrc=this.hiddenSrc||this.getSrc();this.setSrc(null)},show:function(){this.callParent();if(this.hiddenSrc){this.setSrc(this.hiddenSrc);delete this.hiddenSrc}},updateMode:function(a){if(a==="background"){if(this.imageElement){this.imageElement.destroy();delete this.imageElement;this.updateSrc(this.getSrc())}}else{this.imageElement=this.element.createChild({tag:"img"})}},onTap:function(a){this.fireEvent("tap",this,a)},onAfterRender:function(){this.updateSrc(this.getSrc())},updateSrc:function(a){var b=this,c;if(b.getMode()==="background"){c=this.imageObject||new Image()}else{c=b.imageElement.dom}this.imageObject=c;c.setAttribute("src",Ext.isString(a)?a:"");c.addEventListener("load",b.onLoad,false);c.addEventListener("error",b.onError,false)},detachListeners:function(){var a=this.imageObject;if(a){a.removeEventListener("load",this.onLoad,false);a.removeEventListener("error",this.onError,false)}},onLoad:function(a){this.detachListeners();if(this.getMode()==="background"){this.element.dom.style.backgroundImage='url("'+this.imageObject.src+'")'}this.fireEvent("load",this,a)},onError:function(a){this.detachListeners();this.fireEvent("error",this,a)},doSetWidth:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setWidth(b);this.callParent(arguments)},doSetHeight:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setHeight(b);this.callParent(arguments)},destroy:function(){this.detachListeners();Ext.destroy(this.imageObject);delete this.imageObject;this.callParent()}});Ext.define("Ext.Label",{extend:"Ext.Component",xtype:"label",config:{}});Ext.define("Ext.Map",{extend:"Ext.Component",xtype:"map",requires:["Ext.util.Geolocation"],isMap:true,config:{baseCls:Ext.baseCSSPrefix+"map",useCurrentLocation:false,map:null,geo:null,mapOptions:{}},constructor:function(){this.callParent(arguments);this.element.setVisibilityMode(Ext.Element.OFFSETS);if(!(window.google||{}).maps){this.setHtml("Google Maps API is required")}},initialize:function(){this.callParent();this.on({painted:"doResize",scope:this});this.element.on("touchstart","onTouchStart",this)},onTouchStart:function(a){a.makeUnpreventable()},applyMapOptions:function(a){return Ext.merge({},this.options,a)},updateMapOptions:function(d){var a=this,c=(window.google||{}).maps,b=this.getMap();if(c&&b){b.setOptions(d)}if(d.center&&!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[d.center]})}},getMapOptions:function(){return Ext.merge({},this.options||this.getInitialConfig("mapOptions"))},updateUseCurrentLocation:function(a){this.setGeo(a);if(!a){this.renderMap()}},applyGeo:function(a){return Ext.factory(a,Ext.util.Geolocation,this.getGeo())},updateGeo:function(b,a){var c={locationupdate:"onGeoUpdate",locationerror:"onGeoError",scope:this};if(a){a.un(c)}if(b){b.on(c);b.updateLocation()}},doResize:function(){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){b.event.trigger(a,"resize")}},renderMap:function(){var d=this,f=(window.google||{}).maps,b=d.element,a=d.getMapOptions(),e=d.getMap(),c;if(f){if(Ext.os.is.iPad){Ext.merge({navigationControlOptions:{style:f.NavigationControlStyle.ZOOM_PAN}},a)}a=Ext.merge({zoom:12,mapTypeId:f.MapTypeId.ROADMAP},a);if(!a.hasOwnProperty("center")){a.center=new f.LatLng(37.381592,-122.135672)}if(b.dom.firstChild){Ext.fly(b.dom.firstChild).destroy()}if(e){f.event.clearInstanceListeners(e)}d.setMap(new f.Map(b.dom,a));e=d.getMap();c=f.event;c.addListener(e,"zoom_changed",Ext.bind(d.onZoomChange,d));c.addListener(e,"maptypeid_changed",Ext.bind(d.onTypeChange,d));c.addListener(e,"center_changed",Ext.bind(d.onCenterChange,d));d.fireEvent("maprender",d,e)}},onGeoUpdate:function(a){if(a){this.setMapCenter(new google.maps.LatLng(a.getLatitude(),a.getLongitude()))}},onGeoError:Ext.emptyFn,setMapCenter:function(d){var a=this,c=a.getMap(),b=(window.google||{}).maps;if(b){if(!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[d]});return}d=d||new b.LatLng(37.381592,-122.135672);if(d&&!(d instanceof b.LatLng)&&"longitude" in d){d=new b.LatLng(d.latitude,d.longitude)}if(!c){a.renderMap();c=a.getMap()}if(c&&d instanceof b.LatLng){c.panTo(d)}else{this.options=Ext.apply(this.getMapOptions(),{center:d})}}},onZoomChange:function(){var a=this.getMapOptions(),c=this.getMap(),b;b=(c&&c.getZoom)?c.getZoom():a.zoom||10;this.options=Ext.apply(a,{zoom:b});this.fireEvent("zoomchange",this,c,b)},onTypeChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getMapTypeId)?c.getMapTypeId():b.mapTypeId;this.options=Ext.apply(b,{mapTypeId:a});this.fireEvent("typechange",this,c,a)},onCenterChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getCenter)?c.getCenter():b.center;this.options=Ext.apply(b,{center:a});this.fireEvent("centerchange",this,c,a)},destroy:function(){Ext.destroy(this.getGeo());var a=this.getMap();if(a&&(window.google||{}).maps){google.maps.event.clearInstanceListeners(a)}this.callParent()}},function(){});Ext.define("Ext.Mask",{extend:"Ext.Component",xtype:"mask",config:{baseCls:Ext.baseCSSPrefix+"mask",transparent:false,top:0,left:0,right:0,bottom:0},initialize:function(){this.callParent();this.on({painted:"onPainted",erased:"onErased"})},onPainted:function(){this.element.on("*","onEvent",this)},onErased:function(){this.element.un("*","onEvent",this)},onEvent:function(b){var a=arguments[arguments.length-1];if(a.info.eventName==="tap"){this.fireEvent("tap",this,b);return false}if(b&&b.stopEvent){b.stopEvent()}return false},updateTransparent:function(a){this[a?"addCls":"removeCls"](this.getBaseCls()+"-transparent")}});Ext.define("Ext.LoadMask",{extend:"Ext.Mask",xtype:"loadmask",config:{message:"Loading...",messageCls:Ext.baseCSSPrefix+"mask-message",indicator:true,listeners:{painted:"onPainted",erased:"onErased"}},getTemplate:function(){var a=Ext.baseCSSPrefix;return[{reference:"innerElement",cls:a+"mask-inner",children:[{reference:"indicatorElement",cls:a+"loading-spinner-outer",children:[{cls:a+"loading-spinner",children:[{tag:"span",cls:a+"loading-top"},{tag:"span",cls:a+"loading-right"},{tag:"span",cls:a+"loading-bottom"},{tag:"span",cls:a+"loading-left"}]}]},{reference:"messageElement"}]}]},updateMessage:function(a){this.messageElement.setHtml(a)},updateMessageCls:function(b,a){this.messageElement.replaceCls(a,b)},updateIndicator:function(a){this[a?"removeCls":"addCls"](Ext.baseCSSPrefix+"indicator-hidden")},onPainted:function(){this.getParent().on({scope:this,resize:this.refreshPosition});this.refreshPosition()},onErased:function(){this.getParent().un({scope:this,resize:this.refreshPosition})},refreshPosition:function(){var c=this.getParent(),d=c.getScrollable(),a=(d)?d.getScroller():null,f=(a)?a.position:{x:0,y:0},e=c.element.getSize(),b=this.element.getSize();this.innerElement.setStyle({marginTop:Math.round(e.height-b.height+(f.y*2))+"px",marginLeft:Math.round(e.width-b.width+f.x)+"px"})}},function(){});Ext.define("Ext.Media",{extend:"Ext.Component",xtype:"media",config:{url:"",enableControls:Ext.os.is.Android?false:true,autoResume:false,autoPause:true,preload:true,loop:false,media:null,volume:1,muted:false},initialize:function(){var a=this;a.callParent();a.on({scope:a,activate:a.onActivate,deactivate:a.onDeactivate});a.addMediaListener({canplay:"onCanPlay",play:"onPlay",pause:"onPause",ended:"onEnd",volumechange:"onVolumeChange",timeupdate:"onTimeUpdate"})},addMediaListener:function(d,b){var c=this,e=c.media.dom,f=Ext.Function.bind;if(!Ext.isObject(d)){var a=d;d={};d[a]=b}Ext.Object.each(d,function(h,g){if(typeof g!=="function"){g=c[g]}if(typeof g=="function"){g=f(g,c);e.addEventListener(h,g)}})},onPlay:function(){this.fireEvent("play",this)},onCanPlay:function(){this.fireEvent("canplay",this)},onPause:function(){this.fireEvent("pause",this,this.getCurrentTime())},onEnd:function(){this.fireEvent("ended",this,this.getCurrentTime())},onVolumeChange:function(){this.fireEvent("volumechange",this,this.media.dom.volume)},onTimeUpdate:function(){this.fireEvent("timeupdate",this,this.getCurrentTime())},isPlaying:function(){return !Boolean(this.media.dom.paused)},onActivate:function(){var a=this;if(a.getAutoResume()&&!a.isPlaying()){a.play()}},onDeactivate:function(){var a=this;if(a.getAutoResume()&&a.isPlaying()){a.pause()}},updateUrl:function(a){var b=this.media.dom;b.src=a;if("load" in b){b.load()}if(this.isPlaying()){this.play()}},updateEnableControls:function(a){this.media.dom.controls=a?"controls":false},updateLoop:function(a){this.media.dom.loop=a?"loop":false},play:function(){var a=this.media.dom;if("play" in a){a.play();setTimeout(function(){a.play()},10)}},pause:function(){var a=this.media.dom;if("pause" in a){a.pause()}},toggle:function(){if(this.isPlaying()){this.pause()}else{this.play()}},stop:function(){var a=this;a.setCurrentTime(0);a.fireEvent("stop",a);a.pause()},updateVolume:function(a){this.media.dom.volume=a},updateMuted:function(a){this.fireEvent("mutedchange",this,a);this.media.dom.muted=a},getCurrentTime:function(){return this.media.dom.currentTime},setCurrentTime:function(a){this.media.dom.currentTime=a;return a},getDuration:function(){return this.media.dom.duration},destroy:function(){var a=this;Ext.Object.each(event,function(c,b){if(typeof b!=="function"){b=a[b]}if(typeof b=="function"){b=bind(b,a);dom.removeEventListener(c,b)}})}});Ext.define("Ext.Audio",{extend:"Ext.Media",xtype:"audio",config:{cls:Ext.baseCSSPrefix+"audio"},onActivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.show()}},onDeactivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.hide()}},template:[{reference:"media",preload:"auto",tag:"audio",cls:Ext.baseCSSPrefix+"component"}]});Ext.define("Ext.Spacer",{extend:"Ext.Component",alias:"widget.spacer",config:{},constructor:function(a){a=a||{};if(!a.width){a.flex=1}this.callParent([a])}});Ext.define("Ext.Title",{extend:"Ext.Component",xtype:"title",config:{baseCls:"x-title",title:""},updateTitle:function(a){this.setHtml(a)}});Ext.define("Ext.Video",{extend:"Ext.Media",xtype:"video",config:{posterUrl:null,cls:Ext.baseCSSPrefix+"video"},template:[{reference:"ghost",classList:[Ext.baseCSSPrefix+"video-ghost"]},{tag:"video",reference:"media",classList:[Ext.baseCSSPrefix+"media"]}],initialize:function(){var a=this;a.callParent();a.media.hide();a.onBefore({erased:"onErased",scope:a});a.ghost.on({tap:"onGhostTap",scope:a});a.media.on({pause:"onPause",scope:a});if(Ext.os.is.Android4||Ext.os.is.iPad){this.isInlineVideo=true}},applyUrl:function(a){return[].concat(a)},updateUrl:function(f){var c=this,e=c.media,g=f.length,d=e.query("source"),b=d.length,a;for(a=0;a0){a.pop().destroy()}},setActiveIndex:function(b){var e=this.indicators,d=this.activeIndex,a=e[d],f=e[b],c=this.getBaseCls();if(a){a.removeCls(c,null,"active")}if(f){f.addCls(c,null,"active")}this.activeIndex=b;return this},onTap:function(f){var g=f.touch,a=this.element.getPageBox(),d=a.left+(a.width/2),b=a.top+(a.height/2),c=this.getDirection();if((c==="horizontal"&&g.pageX>=d)||(c==="vertical"&&g.pageY>=b)){this.fireEvent("next",this)}else{this.fireEvent("previous",this)}},destroy:function(){var d=this.indicators,b,c,a;for(b=0,c=d.length;bd.bottom||a.yd.right||a.x div",scope:this})},initialize:function(){this.callParent();this.doInitialize()},updateBaseCls:function(a,b){var c=this;c.callParent([a+"-container",b])},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,Ext.get(c),a,d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,Ext.get(c),a,d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtouchmove",b,Ext.get(c),a,d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtap",b,Ext.get(c),a,d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtaphold",b,Ext.get(c),a,d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemdoubletap",b,Ext.get(c),a,d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemsingletap",b,Ext.get(c),a,d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemswipe",b,Ext.get(c),a,d)},updateListItem:function(b,d){var c=this,a=c.dataview,e=a.prepareData(b.getData(true),a.getStore().indexOf(b),b);d.innerHTML=c.dataview.getItemTpl().apply(e)},addListItem:function(e,c){var h=this,d=h.dataview,a=d.prepareData(c.getData(true),d.getStore().indexOf(c),c),b=h.element,i=b.dom.childNodes,g=i.length,f;f=Ext.Element.create(this.getItemElementConfig(e,a));if(!g||e==g){f.appendTo(b)}else{f.insertBefore(i[e])}},getItemElementConfig:function(c,e){var b=this.dataview,d=b.getItemCls(),a=b.getBaseCls()+"-item";if(d){a+=" "+d}return{cls:a,html:b.getItemTpl().apply(e)}},doRemoveItemCls:function(a){var d=this.getViewItems(),c=d.length,b=0;for(;b=0;b--){c=a[f+b];c.parentNode.removeChild(c)}if(d.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(d){var g=this,b=g.dataview,c=b.getStore(),f=d.length,e,a;if(f){b.hideEmptyText()}for(e=0;eh._tmpIndex?1:-1});for(e=0;e(?:[\s]*)|(?:\s*))([\w\-]+)$/i,handledEvents:["*"],getSubscribers:function(b,a){var d=this.subscribers,c=d[b];if(!c&&a){c=d[b]={type:{$length:0},selector:[],$length:0}}return c},subscribe:function(g,f){if(this.idSelectorRegex.test(g)){return false}var e=g.match(this.optimizedSelectorRegex),a=this.getSubscribers(f,true),k=a.type,c=a.selector,d,i,j,b,h;if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=k[j];if(!b){k[j]=b={descendents:{$length:0},children:{$length:0},$length:0}}h=i?b.descendents:b.children;if(h.hasOwnProperty(d)){h[d]++;return true}h[d]=1;h.$length++;b.$length++;k.$length++}else{if(c.hasOwnProperty(g)){c[g]++;return true}c[g]=1;c.push(g)}a.$length++;return true},unsubscribe:function(g,f,k){var a=this.getSubscribers(f);if(!a){return false}var e=g.match(this.optimizedSelectorRegex),l=a.type,c=a.selector,d,i,j,b,h;k=Boolean(k);if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=l[j];if(!b){return true}h=i?b.descendents:b.children;if(!h.hasOwnProperty(d)||(!k&&--h[d]>0)){return true}delete h[d];h.$length--;b.$length--;l.$length--}else{if(!c.hasOwnProperty(g)||(!k&&--c[g]>0)){return true}delete c[g];Ext.Array.remove(c,g)}if(--a.$length===0){delete this.subscribers[f]}return true},notify:function(d,a){var c=this.getSubscribers(a),e,b;if(!c||c.$length===0){return false}e=d.substr(1);b=Ext.ComponentManager.get(e);if(b){this.dispatcher.doAddListener(this.targetType,d,a,"publish",this,{args:[a,b]},"before")}},matchesSelector:function(b,a){return Ext.ComponentQuery.is(b,a)},dispatch:function(d,b,c,a){this.dispatcher.doDispatchEvent(this.targetType,d,b,c,null,a)},publish:function(g,k){var e=this.getSubscribers(g);if(!e){return}var p=arguments[arguments.length-1],o=e.type,b=e.selector,d=Array.prototype.slice.call(arguments,2,-2),l=k.xtypesChain,s,n,t,a,m,v,r,u,h,f,q,c;for(u=0,h=l.length;u0){s=e.descendents;if(s.$length>0){if(!a){a=k.getAncestorIds()}for(q=0,c=a.length;q0){if(!t){if(a){t=a[0]}else{v=k.getParent();if(v){t=v.getId()}}}if(t){if(n.hasOwnProperty(t)){this.dispatch("#"+t+" > "+f,g,d,p)}}}}}h=b.length;if(h>0){for(u=0;uf){d=e}}c.setValue(d);d=c.getValue();c.fireEvent("spin",c,d,g);c.fireEvent("spin"+g,c,d)},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){this.setValue(this.getDefaultValue())},destroy:function(){var a=this;Ext.destroy(a.downRepeater,a.upRepeater,a.spinDownButton,a.spinUpButton);a.callParent(arguments)}},function(){});Ext.define("Ext.field.TextAreaInput",{extend:"Ext.field.Input",xtype:"textareainput",tag:"textarea"});Ext.define("Ext.field.TextArea",{extend:"Ext.field.Text",xtype:"textareafield",requires:["Ext.field.TextAreaInput"],alternateClassName:"Ext.form.TextArea",config:{ui:"textarea",autoCapitalize:false,component:{xtype:"textareainput"},maxRows:null},updateMaxRows:function(a){this.getComponent().setMaxRows(a)},doSetHeight:function(a){this.callParent(arguments);var b=this.getComponent();b.input.setHeight(a)},doSetWidth:function(b){this.callParent(arguments);var a=this.getComponent();a.input.setWidth(b)},doKeyUp:function(a){var b=a.getValue();a[b?"showClearIcon":"hideClearIcon"]()}});Ext.define("Ext.field.Url",{extend:"Ext.field.Text",xtype:"urlfield",alternateClassName:"Ext.form.Url",config:{autoCapitalize:false,component:{type:"url"}}});Ext.define("Ext.plugin.ListPaging",{extend:"Ext.Component",alias:"plugin.listpaging",config:{autoPaging:false,loadMoreText:"Load More...",noMoreRecordsText:"No More Records",loadTpl:['
','','','','',"
",'
{message}
'].join(""),loadMoreCmp:{xtype:"component",baseCls:Ext.baseCSSPrefix+"list-paging"},loadMoreCmpAdded:false,loadingCls:Ext.baseCSSPrefix+"loading",list:null,scroller:null,loading:false},init:function(c){var a=c.getScrollable().getScroller(),b=c.getStore();this.setList(c);this.setScroller(a);this.bindStore(c.getStore());if(b){this.disableDataViewMask(b)}c.updateStore=Ext.Function.createInterceptor(c.updateStore,this.bindStore,this);if(this.getAutoPaging()){a.on({scrollend:this.onScrollEnd,scope:this})}},bindStore:function(a,b){if(b){b.un({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}if(a){a.on({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}},disableDataViewMask:function(a){var b=this.getList();if(a.isAutoLoading()){b.setLoadingText(null)}else{a.on({load:{single:true,fn:function(){b.setLoadingText(null)}}})}},applyLoadTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},applyLoadMoreCmp:function(a){a=Ext.merge(a,{html:this.getLoadTpl().apply({cssPrefix:Ext.baseCSSPrefix,message:this.getLoadMoreText()}),listeners:{tap:{fn:this.loadNextPage,scope:this,element:"element"}}});return Ext.factory(a,Ext.Component,this.getLoadMoreCmp())},onScrollEnd:function(b,a,c){if(!this.getLoading()&&c>=b.maxPosition.y){this.loadNextPage()}},updateLoading:function(a){var b=this.getLoadMoreCmp(),c=this.getLoadingCls();if(a){b.addCls(c)}else{b.removeCls(c)}},onStoreBeforeLoad:function(a){if(a.getCount()===0){this.getLoadMoreCmp().hide()}},onStoreLoad:function(a){var d=this.addLoadMoreCmp(),b=this.getLoadTpl(),c=this.storeFullyLoaded()?this.getNoMoreRecordsText():this.getLoadMoreText();this.getLoadMoreCmp().show();this.setLoading(false);if(this.scrollY){this.getScroller().scrollTo(null,this.scrollY);delete this.scrollY}d.setHtml(b.apply({cssPrefix:Ext.baseCSSPrefix,message:c}))},addLoadMoreCmp:function(){var b=this.getList(),a=this.getLoadMoreCmp();if(!this.getLoadMoreCmpAdded()){b.add(a);b.fireEvent("loadmorecmpadded",this,b);this.setLoadMoreCmpAdded(true)}return a},storeFullyLoaded:function(){var a=this.getList().getStore(),b=a.getTotalCount();return b!==null?a.getTotalCount()<=(a.currentPage*a.getPageSize()):false},loadNextPage:function(){var a=this;if(!a.storeFullyLoaded()){a.setLoading(true);a.scrollY=a.getScroller().position.y;a.getList().getStore().nextPage({addRecords:true})}}});Ext.define("Ext.plugin.PullRefresh",{extend:"Ext.Component",alias:"plugin.pullrefresh",requires:["Ext.DateExtras"],config:{list:null,pullRefreshText:"Pull down to refresh...",releaseRefreshText:"Release to refresh...",loadingText:"Loading...",snappingAnimationDuration:150,refreshFn:null,pullTpl:['
','
','
','','','','',"
",'
','

{message}

','
Last Updated: {lastUpdated:date("m/d/Y h:iA")}
',"
","
"].join("")},isRefreshing:false,currentViewState:"",initialize:function(){this.callParent();this.on({painted:"onPainted",scope:this})},init:function(f){var d=this,b=f.getStore(),e=d.getPullTpl(),c=d.element,a=f.getScrollable().getScroller();d.setList(f);d.lastUpdated=new Date();f.insert(0,d);if(b){if(b.isAutoLoading()){f.setLoadingText(null)}else{b.on({load:{single:true,fn:function(){f.setLoadingText(null)}}})}}e.overwrite(c,{message:d.getPullRefreshText(),lastUpdated:d.lastUpdated},true);d.loadingElement=c.getFirstChild();d.messageEl=c.down(".x-list-pullrefresh-message");d.updatedEl=c.down(".x-list-pullrefresh-updated > span");d.maxScroller=a.getMaxPosition();a.on({maxpositionchange:d.setMaxScroller,scroll:d.onScrollChange,scope:d})},fetchLatest:function(){var b=this.getList().getStore(),c=b.getProxy(),a;a=Ext.create("Ext.data.Operation",{page:1,start:0,model:b.getModel(),limit:b.getPageSize(),action:"read",filters:b.getRemoteFilter()?b.getFilters():[]});c.read(a,this.onLatestFetched,this)},onLatestFetched:function(d){var j=this.getList().getStore(),b=j.getData(),c=d.getRecords(),a=c.length,g=[],h,f,e;for(e=0;ethis.maxScroller.y){this.onBounceBottom(c)}},applyPullTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onBounceTop:function(d){var b=this,c=b.getList(),a=c.getScrollable().getScroller();if(!b.isReleased){if(!b.isRefreshing&&-d>=b.pullHeight+10){b.isRefreshing=true;b.setViewState("release");a.getContainer().onBefore({dragend:"onScrollerDragEnd",single:true,scope:b})}else{if(b.isRefreshing&&-d=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)},setOffset:function(c){var a=this.getAxis(),b=this.element.dom.style;c=Math.round(c);if(a==="x"){b.webkitTransform="translate3d("+c+"px, 0, 0)"}else{b.webkitTransform="translate3d(0, "+c+"px, 0)"}}});Ext.define("Ext.scroll.indicator.Default",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"default"},setOffset:function(c){var b=this.getAxis(),a=this.element.dom.style;if(b==="x"){a.webkitTransform="translate3d("+c+"px, 0, 0)"}else{a.webkitTransform="translate3d(0, "+c+"px, 0)"}},applyLength:function(a){return Math.round(Math.max(0,a))},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)}});Ext.define("Ext.scroll.indicator.ScrollPosition",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"scrollposition"},getElementConfig:function(){var a=this.callParent(arguments);a.children.unshift({className:"x-scroll-bar-stretcher"});return a},updateValue:function(a){if(this.gapLength===0){if(a>1){a=a-1}this.setOffset(this.barLength*a)}else{this.setOffset(this.gapLength*a)}},setLength:function(e){var c=this.getAxis(),a=this.barLength,d=this.barElement.dom,b=this.element;this.callParent(arguments);if(c==="x"){d.scrollLeft=a;b.setLeft(a)}else{d.scrollTop=a;b.setTop(a)}},setOffset:function(d){var b=this.getAxis(),a=this.barLength,c=this.barElement.dom;d=a-d;if(b==="x"){c.scrollLeft=d}else{c.scrollTop=d}}});Ext.define("Ext.scroll.Indicator",{requires:["Ext.scroll.indicator.Default","Ext.scroll.indicator.ScrollPosition","Ext.scroll.indicator.CssTransform"],alternateClassName:"Ext.util.Indicator",constructor:function(a){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){return new Ext.scroll.indicator.ScrollPosition(a)}else{if(Ext.os.is.iOS){return new Ext.scroll.indicator.CssTransform(a)}else{return new Ext.scroll.indicator.Default(a)}}}});Ext.define("Ext.scroll.View",{extend:"Ext.Evented",alternateClassName:"Ext.util.ScrollView",requires:["Ext.scroll.Scroller","Ext.scroll.Indicator"],config:{indicatorsUi:"dark",element:null,scroller:{},indicators:{x:{axis:"x"},y:{axis:"y"}},indicatorsHidingDelay:100,cls:Ext.baseCSSPrefix+"scroll-view"},processConfig:function(c){if(!c){return null}if(typeof c=="string"){c={direction:c}}c=Ext.merge({},c);var a=c.scroller,b;if(!a){c.scroller=a={}}for(b in c){if(c.hasOwnProperty(b)){if(!this.hasConfig(b)){a[b]=c[b];delete c[b]}}}return c},constructor:function(a){a=this.processConfig(a);this.useIndicators={x:true,y:true};this.doHideIndicators=Ext.Function.bind(this.doHideIndicators,this);this.initConfig(a)},setConfig:function(a){return this.callParent([this.processConfig(a)])},updateIndicatorsUi:function(a){var b=this.getIndicators();b.x.setUi(a);b.y.setUi(a)},applyScroller:function(a,b){return Ext.factory(a,Ext.scroll.Scroller,b)},applyIndicators:function(b,d){var a=Ext.scroll.Indicator,c=this.useIndicators;if(!b){b={}}if(!b.x){c.x=false;b.x={}}if(!b.y){c.y=false;b.y={}}return{x:Ext.factory(b.x,a,d&&d.x),y:Ext.factory(b.y,a,d&&d.y)}},updateIndicators:function(a){this.indicatorsGrid=Ext.Element.create({className:"x-scroll-bar-grid-wrapper",children:[{className:"x-scroll-bar-grid",children:[{children:[{},{children:[a.y.barElement]}]},{children:[{children:[a.x.barElement]},{}]}]}]})},updateScroller:function(a){a.on({scope:this,scrollstart:"onScrollStart",scroll:"onScroll",scrollend:"onScrollEnd",refresh:"refreshIndicators"})},isAxisEnabled:function(a){return this.getScroller().isAxisEnabled(a)&&this.useIndicators[a]},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(c){var b=c.getFirstChild().getFirstChild(),a=this.getScroller();c.addCls(this.getCls());c.insertFirst(this.indicatorsGrid);a.setElement(b);this.refreshIndicators();return this},showIndicators:function(){var a=this.getIndicators();if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(this.isAxisEnabled("x")){a.x.show()}if(this.isAxisEnabled("y")){a.y.show()}},hideIndicators:function(){var a=this.getIndicatorsHidingDelay();if(a>0){this.indicatorsHidingTimer=setTimeout(this.doHideIndicators,a)}else{this.doHideIndicators()}},doHideIndicators:function(){var a=this.getIndicators();if(this.isAxisEnabled("x")){a.x.hide()}if(this.isAxisEnabled("y")){a.y.hide()}},onScrollStart:function(){this.onScroll.apply(this,arguments);this.showIndicators()},onScrollEnd:function(){this.hideIndicators()},onScroll:function(b,a,c){this.setIndicatorValue("x",a);this.setIndicatorValue("y",c)},setIndicatorValue:function(b,f){if(!this.isAxisEnabled(b)){return this}var a=this.getScroller(),c=a.getMaxPosition()[b],e=a.getContainerSize()[b],d;if(c===0){d=f/e;if(f>=0){d+=1}}else{if(f>c){d=1+((f-c)/e)}else{if(f<0){d=f/e}else{d=f/c}}}this.getIndicators()[b].setValue(d)},refreshIndicator:function(d){if(!this.isAxisEnabled(d)){return this}var a=this.getScroller(),b=this.getIndicators()[d],e=a.getContainerSize()[d],f=a.getSize()[d],c=e/f;b.setRatio(c);b.refresh()},refresh:function(){return this.getScroller().refresh()},refreshIndicators:function(){var a=this.getIndicators();a.x.setActive(this.isAxisEnabled("x"));a.y.setActive(this.isAxisEnabled("y"));this.refreshIndicator("x");this.refreshIndicator("y")},destroy:function(){var a=this.getElement(),b=this.getIndicators();if(a&&!a.isDestroyed){a.removeCls(this.getCls())}b.x.destroy();b.y.destroy();Ext.destroy(this.getScroller(),this.indicatorsGrid);delete this.indicatorsGrid;this.callParent(arguments)}});Ext.define("Ext.behavior.Scrollable",{extend:"Ext.behavior.Behavior",requires:["Ext.scroll.View"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.scrollView.refresh()},setConfig:function(d){var b=this.scrollView,c=this.component,e,a;if(d){if(!b){this.scrollView=b=new Ext.scroll.View(d);b.on("destroy","onScrollViewDestroy",this);c.setUseBodyElement(true);this.scrollerElement=a=c.innerElement;this.scrollContainer=a.wrap();this.scrollViewElement=e=c.bodyElement;b.setElement(e);if(c.isPainted()){this.onComponentPainted(c)}c.on(this.listeners)}else{if(Ext.isString(d)||Ext.isObject(d)){b.setConfig(d)}}}else{if(b){b.destroy()}}return this},getScrollView:function(){return this.scrollView},onScrollViewDestroy:function(){var b=this.component,a=this.scrollerElement;if(!a.isDestroyed){this.scrollerElement.unwrap()}this.scrollContainer.destroy();b.un(this.listeners);delete this.scrollerElement;delete this.scrollView;delete this.scrollContainer},onComponentDestroy:function(){var a=this.scrollView;if(a){a.destroy()}}});Ext.define("Ext.Container",{extend:"Ext.Component",alternateClassName:"Ext.lib.Container",requires:["Ext.layout.Layout","Ext.ItemCollection","Ext.behavior.Scrollable","Ext.Mask"],xtype:"container",eventedConfig:{activeItem:0},config:{layout:null,control:{},defaults:null,items:null,autoDestroy:true,defaultType:null,scrollable:null,useBodyElement:null,masked:null,modal:null,hideOnMaskTap:null},isContainer:true,delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange"},constructor:function(a){var b=this;b._items=b.items=new Ext.ItemCollection();b.innerItems=[];b.onItemAdd=b.onFirstItemAdd;b.callParent(arguments)},getElementConfig:function(){return{reference:"element",className:"x-container",children:[{reference:"innerElement",className:"x-inner"}]}},applyMasked:function(a,b){b=Ext.factory(a,Ext.Mask,b);if(b){this.add(b)}return b},mask:function(a){this.setMasked(a||true)},unmask:function(){this.setMasked(false)},applyModal:function(a,b){if(!a&&!b){return}return Ext.factory(a,Ext.Mask,b)},updateModal:function(c,a){var b={painted:"refreshModalMask",erased:"destroyModalMask"};if(c){this.on(b);c.on("destroy","onModalDestroy",this);if(this.getTop()===null&&this.getBottom()===null&&this.getRight()===null&&this.getLeft()===null&&!this.getCentered()){this.setTop(0);this.setLeft(0)}if(this.isPainted()){this.refreshModalMask()}}else{if(a){a.un("destroy","onModalDestroy",this);this.un(b)}}},onModalDestroy:function(){this.setModal(null)},refreshModalMask:function(){var b=this.getModal(),a=this.getParent();if(!this.painted){this.painted=true;if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1);if(this.getHideOnMaskTap()){b.on("tap","hide",this,{single:true})}}}},destroyModalMask:function(){var b=this.getModal(),a=this.getParent();if(this.painted){this.painted=false;if(b){b.un("tap","hide",this);a.remove(b,false)}}},updateZIndex:function(b){var a=this.getModal();this.callParent(arguments);if(a){a.setZIndex(b-1)}},updateBaseCls:function(a,b){var c=this,d=c.getUi();if(a){this.element.addCls(a);this.innerElement.addCls(a,null,"inner");if(d){this.element.addCls(a,null,d)}}if(b){this.element.removeCls(b);this.innerElement.removeCls(a,null,"inner");if(d){this.element.removeCls(b,null,d)}}},updateUseBodyElement:function(a){if(a){this.bodyElement=this.innerElement.wrap({cls:"x-body"});this.referenceList.push("bodyElement")}},applyItems:function(a,b){if(a){this.getDefaultType();this.getDefaults();if(this.initialized&&b.length>0){this.removeAll()}this.add(a)}},applyControl:function(c){var a,b,e,d;for(a in c){d=c[a];for(b in d){e=d[b];if(Ext.isObject(e)){e.delegate=a}}d.delegate=a;this.addListener(d)}return c},onFirstItemAdd:function(){delete this.onItemAdd;this.setLayout(new Ext.layout.Layout(this,this.getLayout()||"default"));if(this.innerHtmlElement&&!this.getHtml()){this.innerHtmlElement.destroy();delete this.innerHtmlElement}this.on(this.delegateListeners);return this.onItemAdd.apply(this,arguments)},updateDefaultType:function(a){this.defaultItemClass=Ext.ClassManager.getByAlias("widget."+a)},applyDefaults:function(a){if(a){this.factoryItem=this.factoryItemWithDefaults;return a}},factoryItem:function(a){return Ext.factory(a,this.defaultItemClass)},factoryItemWithDefaults:function(c){var b=this,d=b.getDefaults(),a;if(!d){return Ext.factory(c,b.defaultItemClass)}if(c.isComponent){a=c;if(d&&c.isInnerItem()&&!b.has(a)){a.setConfig(d,true)}}else{if(d&&!c.ignoreDefaults){if(!(c.hasOwnProperty("left")&&c.hasOwnProperty("right")&&c.hasOwnProperty("top")&&c.hasOwnProperty("bottom")&&c.hasOwnProperty("docked")&&c.hasOwnProperty("centered"))){c=Ext.mergeIf({},c,d)}}a=Ext.factory(c,b.defaultItemClass)}return a},add:function(a){var e=this,b,d,c,f;a=Ext.Array.from(a);d=a.length;for(b=0;b0&&c.isInnerItem()){f=c}}if(f){this.setActiveItem(f)}return c},doAdd:function(d){var c=this,a=c.getItems(),b;if(!a.has(d)){b=a.length;a.add(d);if(d.isInnerItem()){c.insertInner(d)}d.setParent(c);c.onItemAdd(d,b)}},remove:function(d,b){var c=this,a=c.indexOf(d),e=c.getInnerItems();if(b===undefined){b=c.getAutoDestroy()}if(a!==-1){if(!c.removingAll&&e.length>1&&d===c.getActiveItem()){c.on({activeitemchange:"doRemove",scope:c,single:true,order:"after",args:[d,a,b]});c.doResetActiveItem(e.indexOf(d))}else{c.doRemove(d,a,b);if(e.length===0){c.setActiveItem(null)}}}return c},doResetActiveItem:function(a){if(a===0){this.setActiveItem(1)}else{this.setActiveItem(0)}},doRemove:function(d,a,b){var c=this;c.items.remove(d);if(d.isInnerItem()){c.removeInner(d)}c.onItemRemove(d,a,b);d.setParent(null);if(b){d.destroy()}},removeAll:function(c,f){var a=this.items,e=a.length,b=0,d;if(c===undefined){c=this.getAutoDestroy()}f=Boolean(f);this.removingAll=true;for(;b=0;b--){c.insert(a,d[b])}return c}d=this.factoryItem(d);this.doInsert(a,d);return d},doInsert:function(d,f){var e=this,b=e.items,c=b.length,a,g;g=f.isInnerItem();if(d>c){d=c}if(b[d-1]===f){return e}a=e.indexOf(f);if(a!==-1){if(a "+a)[0]||null},down:function(a){return this.query(a)[0]||null},destroy:function(){var a=this.getModal();if(a){a.destroy()}this.removeAll(true,true);Ext.destroy(this.getScrollable(),this.bodyElement);this.callParent()}},function(){this.addMember("defaultItemClass",this)});Ext.define("Ext.Panel",{extend:"Ext.Container",requires:["Ext.util.LineSegment"],alternateClassName:"Ext.lib.Panel",xtype:"panel",isPanel:true,config:{baseCls:Ext.baseCSSPrefix+"panel",bodyPadding:null,bodyMargin:null,bodyBorder:null},getElementConfig:function(){var a=this.callParent();a.children.push({reference:"tipElement",className:"x-anchor",hidden:true});return a},applyBodyPadding:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyPadding:function(a){this.element.setStyle("padding",a)},applyBodyMargin:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyMargin:function(a){this.element.setStyle("margin",a)},applyBodyBorder:function(a){if(a===true){a=1}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyBorder:function(a){this.element.setStyle("border-width",a)},alignTo:function(m){var w=this.tipElement;w.hide();if(this.currentTipPosition){w.removeCls("x-anchor-"+this.currentTipPosition)}this.callParent(arguments);var f=Ext.util.LineSegment,d=m.isComponent?m.renderElement:m,a=this.renderElement,n=d.getPageBox(),k=a.getPageBox(),b=k.left,t=k.top,C=k.right,h=k.bottom,j=b+(k.width/2),i=t+(k.height/2),o={x:b,y:t},l={x:C,y:t},B={x:b,y:h},D={x:C,y:h},y={x:j,y:i},s=n.left+(n.width/2),q=n.top+(n.height/2),v={x:s,y:q},c=new f(y,v),g=0,A=0,e,z,r,p,x,u;w.setVisibility(false);w.show();e=w.getSize();z=e.width;r=e.height;if(c.intersects(new f(o,l))){x=Math.min(Math.max(s,b),C-(z/2));u=t;A=r+10;p="top"}else{if(c.intersects(new f(o,B))){x=b;u=Math.min(Math.max(q+(z/2),t),h);g=r+10;p="left"}else{if(c.intersects(new f(B,D))){x=Math.min(Math.max(s,b),C-(z/2));u=h;A=-r-10;p="bottom"}else{if(c.intersects(new f(l,D))){x=C;u=Math.min(Math.max(q-(z/2),t),h);g=-r-10;p="right"}}}}if(x||u){this.currentTipPosition=p;w.addCls("x-anchor-"+p);w.setLeft(x-b);w.setTop(u-t);w.setVisibility(true);this.setLeft(this.getLeft()+g);this.setTop(this.getTop()+A)}}});Ext.define("Ext.SegmentedButton",{extend:"Ext.Container",xtype:"segmentedbutton",requires:["Ext.Button"],config:{baseCls:Ext.baseCSSPrefix+"segmentedbutton",pressedCls:Ext.baseCSSPrefix+"button-pressed",allowMultiple:false,allowDepress:null,pressedButtons:[],layout:{type:"hbox",align:"stretch"},defaultType:"button"},initialize:function(){var a=this;a.callParent();a.on({delegate:"> button",scope:a,tap:"onButtonRelease"});a.onAfter({delegate:"> button",scope:a,hiddenchange:"onButtonHiddenChange"})},updateAllowMultiple:function(){if(!this.initialized&&!this.getInitialConfig().hasOwnProperty("allowDepress")){this.setAllowDepress(true)}},applyItems:function(){var e=this,f=[],d,b,c,a;e.callParent(arguments);a=this.getItems();d=a.length;for(b=0;b=0;b--){c=a.items[b];if(!c.isHidden()){c.addCls(e+"last");break}}},applyPressedButtons:function(a){var e=this,f=[],c,d,b;if(Ext.isArray(a)){d=a.length;for(b=0;bm){c.renderElement.setWidth(m)}}var j=this.spacer.renderElement.getPageBox(),k=f.getPageBox(),g=k.width-j.width,d=k.left,i=k.right,b,l,e;if(g>0){f.setWidth(j.width);b=g/2;d+=b;i-=b}l=j.left-d;e=i-j.right;if(l>0){f.setLeft(l)}else{if(e>0){f.setLeft(-e)}}f.repaint()},updateTitle:function(a){this.titleComponent.setTitle(a);if(this.isPainted()){this.refreshTitlePosition()}}});Ext.define("Ext.Toolbar",{extend:"Ext.Container",xtype:"toolbar",requires:["Ext.Button","Ext.Title","Ext.Spacer"],isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",ui:"dark",title:null,defaultType:"button",layout:{type:"hbox",align:"center"}},constructor:function(a){a=a||{};if(a.docked=="left"||a.docked=="right"){a.layout={type:"vbox",align:"stretch"}}this.callParent([a])},applyTitle:function(a){if(typeof a=="string"){a={title:a,centered:true}}return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b);this.getLayout().setItemFlex(b,1)}if(a){a.destroy()}},showTitle:function(){var a=this.getTitle();if(a){a.show()}},hideTitle:function(){var a=this.getTitle();if(a){a.hide()}}},function(){});Ext.define("Ext.MessageBox",{extend:"Ext.Sheet",requires:["Ext.Toolbar","Ext.field.Text","Ext.field.TextArea"],config:{ui:"dark",baseCls:Ext.baseCSSPrefix+"msgbox",iconCls:null,showAnimation:{type:"popIn",duration:250,easing:"ease-out"},hideAnimation:{type:"popOut",duration:250,easing:"ease-out"},zIndex:10,defaultTextHeight:75,title:null,buttons:null,message:null,prompt:null,layout:{type:"vbox",pack:"center"}},statics:{OK:{text:"OK",itemId:"ok",ui:"action"},YES:{text:"Yes",itemId:"yes",ui:"action"},NO:{text:"No",itemId:"no"},CANCEL:{text:"Cancel",itemId:"cancel"},INFO:Ext.baseCSSPrefix+"msgbox-info",WARNING:Ext.baseCSSPrefix+"msgbox-warning",QUESTION:Ext.baseCSSPrefix+"msgbox-question",ERROR:Ext.baseCSSPrefix+"msgbox-error",OKCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"OK",itemId:"ok",ui:"action"}],YESNOCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}],YESNO:[{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}]},constructor:function(a){a=a||{};if(a.hasOwnProperty("promptConfig")){Ext.applyIf(a,{prompt:a.promptConfig});delete a.promptConfig}if(a.hasOwnProperty("multiline")||a.hasOwnProperty("multiLine")){a.prompt=a.prompt||{};Ext.applyIf(a.prompt,{multiLine:a.multiline||a.multiLine});delete a.multiline;delete a.multiLine}this.defaultAllowedConfig={};var e=["ui","showAnimation","hideAnimation","title","message","prompt","iconCls","buttons","defaultTextHeight"],d=e.length,b,c;for(b=0;b=a-c&&b<=a+c)},onDragStart:function(f){var d=this.getDirection(),b=f.absDeltaX,a=f.absDeltaY,c=this.getDirectionLock();this.isDragging=true;if(c){if((d==="horizontal"&&b>a)||(d==="vertical"&&a>b)){f.stopPropagation()}else{this.isDragging=false;return}}if(this.isAnimating){this.getActiveCarouselItem().getTranslatable().stopAnimation()}this.dragStartOffset=this.offset;this.dragDirection=0},onDrag:function(j){if(!this.isDragging){return}var k=this.dragStartOffset,l=this.getDirection(),m=l==="horizontal"?j.deltaX:j.deltaY,a=this.offset,i=this.flickStartTime,c=this.dragDirection,b=Ext.Date.now(),h=this.getActiveIndex(),f=this.getMaxItemIndex(),d=c,g;if((h===0&&m>0)||(h===f&&m<0)){m*=0.5}g=k+m;if(g>a){c=1}else{if(g300){this.flickStartOffset=a;this.flickStartTime=b}this.dragDirection=c;this.setOffset(g)},onDragEnd:function(j){if(!this.isDragging){return}this.onDrag(j);this.isDragging=false;var a=Ext.Date.now(),i=this.itemLength,g=i/2,f=this.offset,m=this.getActiveIndex(),c=this.getMaxItemIndex(),h=0,l=f-this.flickStartOffset,b=a-this.flickStartTime,k=this.getIndicator(),d;if(b>0&&Math.abs(l)>=10){d=l/b;if(Math.abs(d)>=1){if(d<0&&m0&&m>0){h=1}}}}if(h===0){if(m0&&f>g){h=1}}}if(k){k.setActiveIndex(m-h)}this.animationDirection=h;this.setOffsetAnimated(h*i)},applyAnimation:function(a){a.easing=Ext.factory(a.easing,Ext.fx.easing.EaseOut);return a},updateDirection:function(b){var a=this.getIndicator();this.currentAxis=(b==="horizontal")?"x":"y";if(a){a.setDirection(b)}},setOffset:function(e){var k=this.orderedCarouselItems,c=this.getBufferSize(),g=k[c],j=this.itemLength,d=this.currentAxis,a,h,b,f;this.offset=e;e+=this.itemOffset;if(g){g.translateAxis(d,e);for(f=1,b=0;f<=c;f++){h=k[c-f];if(h){b+=j;h.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=k[c+f];if(a){b+=j;a.translateAxis(d,e+b)}}}return this},setOffsetAnimated:function(c){var b=this.orderedCarouselItems[this.getBufferSize()],a=this.getIndicator();if(a){a.setActiveIndex(this.getActiveIndex()-this.animationDirection)}this.offset=c;c+=this.itemOffset;if(b){this.isAnimating=true;b.getTranslatable().on(this.animationListeners);b.translateAxis(this.currentAxis,c,this.getAnimation())}return this},onActiveItemAnimationFrame:function(k){var j=this.orderedCarouselItems,c=this.getBufferSize(),h=this.itemLength,d=this.currentAxis,e=k[d],g,a,f,b;for(f=1,b=0;f<=c;f++){g=j[c-f];if(g){b+=h;g.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=j[c+f];if(a){b+=h;a.translateAxis(d,e+b)}}},onActiveItemAnimationEnd:function(b){var c=this.getActiveIndex(),a=this.animationDirection,e=this.currentAxis,f=b[e],d=this.itemLength,g;this.isAnimating=false;b.un(this.animationListeners);if(a===-1){g=d+f}else{if(a===1){g=f-d}else{g=f}}g-=this.itemOffset;this.offset=g;this.setActiveItem(c-a)},refresh:function(){this.refreshSizing();this.refreshActiveItem()},refreshSizing:function(){var a=this.element,b=this.getItemLength(),c,d;if(this.getDirection()==="horizontal"){d=a.getWidth()}else{d=a.getHeight()}this.hiddenTranslation=-d;if(b===null){b=d;c=0}else{c=(d-b)/2}this.itemLength=b;this.itemOffset=c},refreshOffset:function(){this.setOffset(this.offset)},refreshActiveItem:function(){this.doSetActiveItem(this.getActiveItem())},getActiveIndex:function(){return this.activeIndex},refreshActiveIndex:function(){this.activeIndex=this.getInnerItemIndex(this.getActiveItem())},refreshCarouselItems:function(){var a=this.carouselItems,b,d,c;for(b=0,d=a.length;b0){for(f=1;f<=c;f++){h=q-f;if(h>=0){a=this.getInnerItemAt(h);b=a.getId();o[b]=a;p[b]=c-f}else{break}}}if(qb){this.setActiveItem(b)}else{this.rebuildInnerIndexes(a);this.refreshActiveItem()}}},rebuildInnerIndexes:function(n){var c=this.innerIndexToItem,g=this.innerIdToIndex,j=this.innerItems.slice(),h=j.length,b=this.getBufferSize(),d=this.getMaxItemIndex(),l=[],e,k,f,a,m;if(n===undefined){this.innerIndexToItem=c={};this.innerIdToIndex=g={};for(e=0;e=0&&e<=d){if(c.hasOwnProperty(e)){Ext.Array.remove(j,c[e]);continue}l.push(e)}}for(e=0,h=l.length;e ."+Ext.baseCSSPrefix+"data-item",scope:this})},initialize:function(){this.callParent();this.doInitialize()},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,a,b.indexOf(a),d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtouchmove",b,a,b.indexOf(a),d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,a,b.indexOf(a),d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtap",b,a,b.indexOf(a),d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtaphold",b,a,b.indexOf(a),d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemsingletap",b,a,b.indexOf(a),d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemdoubletap",b,a,b.indexOf(a),d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemswipe",b,a,b.indexOf(a),d)},moveItemsToCache:function(j,k){var h=this,c=h.dataview,a=c.getMaxItemCache(),g=h.getViewItems(),f=h.itemCache,e=f.length,l=c.getPressedCls(),d=c.getSelectedCls(),b=k-j,m;for(;b>=0;b--){m=g[j+b];if(e!==a){h.remove(m,false);m.removeCls([l,d]);f.push(m);e++}else{m.destroy()}}if(h.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(b){var l=this,e=l.dataview,m=e.getStore(),k=b.length,a=e.getDefaultType(),h=e.getItemConfig(),g=l.itemCache,f=g.length,j=[],c,n,d;if(k){e.hideEmptyText()}for(c=0;ci._tmpIndex?1:-1});for(c=0;c{text}",pressedCls:"x-item-pressed",itemCls:null,selectedCls:"x-item-selected",triggerEvent:"itemtap",triggerCtEvent:"tap",deselectOnContainerClick:true,scrollable:true,inline:null,pressedDelay:100,loadingText:"Loading...",useComponents:null,itemConfig:{},maxItemCache:20,defaultType:"dataitem",scrollToTopOnRefresh:true},constructor:function(a){var b=this;b.hasLoadedStore=false;b.mixins.selectable.constructor.apply(b,arguments);b.callParent(arguments)},updateItemCls:function(c,b){var a=this.container;if(a){if(b){a.doRemoveItemCls(b)}if(c){a.doAddItemCls(c)}}},storeEventHooks:{beforeload:"onBeforeLoad",load:"onLoad",refresh:"refresh",addrecords:"onStoreAdd",removerecords:"onStoreRemove",updaterecord:"onStoreUpdate"},initialize:function(){this.callParent();var b=this,a;b.on(b.getTriggerCtEvent(),b.onContainerTrigger,b);a=b.container=this.add(new Ext.dataview[b.getUseComponents()?"component":"element"].Container({baseCls:this.getBaseCls()}));a.dataview=b;b.on(b.getTriggerEvent(),b.onItemTrigger,b);a.on({itemtouchstart:"onItemTouchStart",itemtouchend:"onItemTouchEnd",itemtap:"onItemTap",itemtaphold:"onItemTapHold",itemtouchmove:"onItemTouchMove",itemsingletap:"onItemSingleTap",itemdoubletap:"onItemDoubleTap",itemswipe:"onItemSwipe",scope:b});if(this.getStore()){this.refresh()}},applyInline:function(a){if(Ext.isObject(a)){a=Ext.apply({},a)}return a},updateInline:function(c,b){var a=this.getBaseCls();if(b){this.removeCls([a+"-inlineblock",a+"-nowrap"])}if(c){this.addCls(a+"-inlineblock");if(Ext.isObject(c)&&c.wrap===false){this.addCls(a+"-nowrap")}else{this.removeCls(a+"-nowrap")}}},prepareData:function(c,b,a){c.xindex=b+1;return c},onContainerTrigger:function(b){var a=this;if(b.target!=a.element.dom){return}if(a.getDeselectOnContainerClick()&&a.getStore()){a.deselectAll()}},onItemTrigger:function(b,a){this.selectWithEvent(this.getStore().getAt(a))},doAddPressedCls:function(a){var c=this,b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.addCls(c.getPressedCls())}},onItemTouchStart:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireAction("itemtouchstart",[f,d,h,a,g],"doItemTouchStart")},doItemTouchStart:function(c,b,e,a){var d=c.getPressedDelay();if(a){if(d>0){c.pressedTimeout=Ext.defer(c.doAddPressedCls,d,c,[a])}else{c.doAddPressedCls(a)}}},onItemTouchEnd:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(this.hasOwnProperty("pressedTimeout")){clearTimeout(this.pressedTimeout);delete this.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchend",f,d,h,a,g)},onItemTouchMove:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(f.hasOwnProperty("pressedTimeout")){clearTimeout(f.pressedTimeout);delete f.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchmove",f,d,h,a,g)},onItemTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtap",f,d,h,a,g)},onItemTapHold:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtaphold",f,d,h,a,g)},onItemSingleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemsingletap",f,d,h,a,g)},onItemDoubleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemdoubletap",f,d,h,a,g)},onItemSwipe:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemswipe",f,d,h,a,g)},onItemSelect:function(a,b){var c=this;if(b){c.doItemSelect(c,a)}else{c.fireAction("select",[c,a],"doItemSelect")}},doItemSelect:function(c,a){if(c.container&&!c.isDestroyed){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls(c.getPressedCls());b.addCls(c.getSelectedCls())}}},onItemDeselect:function(a,b){var c=this;if(c.container&&!c.isDestroyed){if(b){c.doItemDeselect(c,a)}else{c.fireAction("deselect",[c,a,b],"doItemDeselect")}}},doItemDeselect:function(c,a){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls([c.getPressedCls(),c.getSelectedCls()])}},updateData:function(b){var a=this.getStore();if(!a){this.setStore(Ext.create("Ext.data.Store",{data:b}))}else{a.add(b)}},applyStore:function(b){var d=this,e=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(b){b=Ext.data.StoreManager.lookup(b);if(b&&Ext.isObject(b)&&b.isStore){b.on(e);c=b.getProxy();if(c){a=c.getReader();if(a){a.on("exception","handleException",this)}}}}return b},handleException:function(){this.setMasked(false)},updateStore:function(b,e){var d=this,f=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(e&&Ext.isObject(e)&&e.isStore){if(e.autoDestroy){e.destroy()}else{e.un(f);c=e.getProxy();if(c){a=c.getReader();if(a){a.un("exception","handleException",this)}}}}if(b){if(b.isLoaded()){this.hasLoadedStore=true}if(b.isLoading()){d.onBeforeLoad()}if(d.container){d.refresh()}}},onBeforeLoad:function(){var b=this.getScrollable();if(b){b.getScroller().stopAnimation()}var a=this.getLoadingText();if(a){this.setMasked({xtype:"loadmask",message:a});if(b){b.getScroller().setDisabled(true)}}this.hideEmptyText()},updateEmptyText:function(c,d){var b=this,a;if(d&&b.emptyTextCmp){b.remove(b.emptyTextCmp,true);delete b.emptyTextCmp}if(c){b.emptyTextCmp=b.add({xtype:"component",cls:b.getBaseCls()+"-emptytext",html:c,hidden:true});a=b.getStore();if(a&&b.hasLoadedStore&&!a.getCount()){this.showEmptyText()}}},onLoad:function(a){var b=this.getScrollable();this.hasLoadedStore=true;this.setMasked(false);if(b){b.getScroller().setDisabled(false)}if(!a.getCount()){this.showEmptyText()}},refresh:function(){var b=this,a=b.container;if(!b.getStore()){if(!b.hasLoadedStore&&!b.getDeferEmptyText()){b.showEmptyText()}return}if(a){b.fireAction("refresh",[b],"doRefresh")}},applyItemTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onAfterRender:function(){var a=this;a.callParent(arguments);a.updateStore(a.getStore())},getViewItems:function(){return this.container.getViewItems()},doRefresh:function(f){var a=f.container,j=f.getStore(),b=j.getRange(),e=a.getViewItems(),h=b.length,l=e.length,c=h-l,g=f.getScrollable(),d,k;if(this.getScrollToTopOnRefresh()&&g){g.getScroller().scrollToTop()}if(h<1){f.onStoreClear();return}if(c<0){a.moveItemsToCache(l+c,l-1);e=a.getViewItems();l=e.length}else{if(c>0){a.moveItemsFromCache(j.getRange(l))}}for(d=0;dh.y){c=g;break}f=g}return{current:f,next:c}},doRefreshHeaders:function(){if(!this.getGrouped()||!this.container){return false}var l=this.findGroupHeaderIndices(),f=l.length,g=this.container.getViewItems(),j=this.pinHeaderInfo={offsets:[]},a=j.offsets,h=this.getScrollable(),e,k,b,d,c;if(f){for(b=0;bd.offset)||(f&&h0&&d.offset-h<=c){var k=c-(d.offset-h);this.translateHeader(k)}else{this.translateHeader(null)}},translateHeaderTransform:function(a){this.header.renderElement.dom.style.webkitTransform=(a===null)?null:"translate3d(0px, -"+a+"px, 0px)"},translateHeaderCssPosition:function(a){this.header.renderElement.dom.style.top=(a===null)?null:"-"+Math.round(a)+"px"},setActiveGroup:function(b){var a=this,c=a.header;if(c){if(b&&b.header){if(!a.activeGroup||a.activeGroup.header!=b.header){c.show();if(c.element){c.setHtml(b.header.innerHTML)}}}else{if(c&&c.element){c.hide()}}}this.activeGroup=b},onIndex:function(o,c){var r=this,s=c.toLowerCase(),b=r.getStore(),q=b.getGroups(),f=q.length,h=r.getScrollable(),n,e,m,g,k,p;if(h){n=r.getScrollable().getScroller()}else{return}for(m=0;ms){g=e;break}else{g=e}}if(h&&g){p=r.container.getViewItems()[b.indexOf(g.children[0])];n.stopAnimation();var l=n.getContainerSize().y,j=n.getSize().y,d=j-l,a=(p.offsetTop>d)?d:p.offsetTop;n.scrollTo(0,a)}},applyOnItemDisclosure:function(a){if(Ext.isFunction(a)){return{scope:this,handler:a}}return a},handleItemDisclosure:function(f){var d=this,c=f.getTarget().parentNode,b=d.container.getViewItems().indexOf(c),a=d.getStore().getAt(b);d.fireAction("disclose",[d,a,c,b,f],"doDisclose")},doDisclose:function(f,a,d,c,g){var b=f.getOnItemDisclosure();if(b&&b.handler){b.handler.call(b.scope||f,a,d,c,g)}},findGroupHeaderIndices:function(){if(!this.getGrouped()){return[]}var h=this,k=h.getStore();if(!k){return[]}var b=h.container,d=k.getGroups(),m=d.length,g=b.getViewItems(),c=[],l=b.footerClsShortCache,e,a,f,n,j;b.doRemoveHeaders();b.doRemoveFooterCls();if(g.length){for(e=0;e class="x-list-item-leaf">'+a.getItemTextTpl(b)+""},this.getListConfig())}},function(){});Ext.define("Ext.form.FieldSet",{extend:"Ext.Container",alias:"widget.fieldset",requires:["Ext.Title"],config:{baseCls:Ext.baseCSSPrefix+"form-fieldset",title:null,instructions:null},applyTitle:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"top",baseCls:this.getBaseCls()+"-title"});return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}},applyInstructions:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"bottom",baseCls:this.getBaseCls()+"-instructions"});return Ext.factory(a,Ext.Title,this.getInstructions())},updateInstructions:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}}});Ext.define("Ext.form.Panel",{alternateClassName:"Ext.form.FormPanel",extend:"Ext.Panel",xtype:"formpanel",requires:["Ext.XTemplate","Ext.field.Checkbox","Ext.Ajax"],config:{baseCls:Ext.baseCSSPrefix+"form",standardSubmit:false,url:null,baseParams:null,submitOnAction:false,record:null,method:"post",scrollable:{translationMethod:"scrollposition"}},getElementConfig:function(){var a=this.callParent();a.tag="form";return a},initialize:function(){var a=this;a.callParent();a.element.on({submit:"onSubmit",scope:a})},updateRecord:function(c){var a,b,d;if(c&&(a=c.fields)){b=this.getValues();for(d in b){if(b.hasOwnProperty(d)&&a.containsKey(d)){c.set(d,b[d])}}}return this},setRecord:function(a){var b=this;if(a&&a.data){b.setValues(a.data)}b._record=a;return this},onSubmit:function(b){var a=this;if(b&&!a.getStandardSubmit()){b.stopEvent()}else{this.submit()}},updateSubmitOnAction:function(a){if(a){this.on({action:"onFieldAction",scope:this})}else{this.un({action:"onFieldAction",scope:this})}},onFieldAction:function(a){if(this.getSubmitOnAction()){a.blur();this.submit()}},submit:function(a){var c=this,b=c.element.dom||{},d;a=Ext.apply({url:c.getUrl()||b.action,submit:false,method:c.getMethod()||b.method||"post",autoAbort:false,params:null,waitMsg:null,headers:null,success:null,failure:null},a||{});d=c.getValues(c.getStandardSubmit()||!a.submitDisabled);return c.fireAction("beforesubmit",[c,d,a],"doBeforeSubmit")},doBeforeSubmit:function(f,h,b){var e=f.element.dom||{};if(f.getStandardSubmit()){if(b.url&&Ext.isEmpty(e.action)){e.action=b.url}var a=this.query("spinnerfield"),d=a.length,c,g;for(c=0;c1;d.doChangeView(c,a,false)},onViewRemove:function(c){var d=this,b=d.backButtonStack,a;d.endAnimation();b.pop();a=b.length>1;d.doChangeView(c,a,true)},doChangeView:function(k,c,g){var r=this,o=r.leftBox,e=o.element,f=r.titleComponent,m=f.element,n=r.getBackButton(),l=r.getTitleText(),h=r.getBackButtonText(),q=r.getAnimation()&&k.getLayout().getAnimation(),p=q&&q.isAnimation&&k.isPainted(),d,i,a,j,b;if(p){i=r.createProxy(o.element);e.setStyle("opacity","0");n.setText(h);n[c?"show":"hide"]();a=r.createProxy(f.element.getParent());m.setStyle("opacity","0");r.setTitle(l);r.refreshTitlePosition();d=r.measureView(i,a,g);j=d.left;b=d.title;r.isAnimating=true;r.animate(e,j.element);r.animate(m,b.element,function(){m.setLeft(d.titleLeft);r.isAnimating=false});if(Ext.os.is.Android2&&!this.getAndroid2Transforms()){i.ghost.destroy();a.ghost.destroy()}else{r.animate(i.ghost,j.ghost);r.animate(a.ghost,b.ghost,function(){i.ghost.destroy();a.ghost.destroy()})}}else{if(c){n.setText(h);n.show()}else{n.hide()}r.setTitle(l)}},measureView:function(e,u,k){var w=this,j=w.element,v=w.leftBox.element,p=w.titleComponent.element,l=Math.min(j.getWidth()/3,200),q=v.getWidth(),c=j.getX(),m=j.getWidth(),n=p.getX(),d=p.getLeft(),s=p.getWidth(),r=e.x,t=e.width,a=e.left,h=Ext.os.is.Android2&&!this.getAndroid2Transforms(),i,b,f,x,o,g;g=c-r-t;if(k){i=g;b=Math.min(n-t,l)}else{b=g;i=Math.min(n-c,l)}if(h){f={element:{from:{left:i,opacity:1},to:{left:0,opacity:1}}}}else{f={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:0},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}g=c-n+q;if((a+s)>n){o=c-n-s}if(k){p.setLeft(0);b=c+m;if(o!==undefined){i=o}else{i=g}}else{i=m-n;if(o!==undefined){b=o}else{b=g}}if(h){x={element:{from:{left:i,opacity:1},to:{left:d,opacity:1}}}}else{x={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:d},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}return{left:f,title:x,titleLeft:d}},animate:function(b,a,e){var c=this,d;b.setLeft(0);a=Ext.apply(a,{element:b,easing:"ease-in-out",duration:c.getAnimation().duration});d=new Ext.fx.Animation(a);d.on("animationend",function(){if(e){e.call(c)}},c);Ext.Animator.run(d);c.activeAnimations.push(d)},endAnimation:function(){var a=this.activeAnimations,d,b,c;if(a){c=a.length;for(b=0;b0){if(b&&b.isAnimation){b.setReverse(true)}a.setActiveItem(d-1);a.getNavigationBar().onViewRemove(a,c[d],d)}},doRemove:function(){var a=this.getLayout().getAnimation();if(a&&a.isAnimation){a.setReverse(false)}this.callParent(arguments)},onItemAdd:function(b,a){this.doItemLayoutAdd(b,a);if(!this.isItemsInitializing&&b.isInnerItem()){this.setActiveItem(b);this.getNavigationBar().onViewAdd(this,b,a)}if(this.initialized){this.fireEvent("add",this,b,a)}},reset:function(){return this.pop(this.getInnerItems().length)}});Ext.define("Ext.picker.Slot",{extend:"Ext.dataview.DataView",xtype:"pickerslot",alternateClassName:"Ext.Picker.Slot",requires:["Ext.XTemplate","Ext.data.Store","Ext.Component","Ext.data.StoreManager"],isSlot:true,config:{title:null,showTitle:true,cls:Ext.baseCSSPrefix+"picker-slot",name:null,value:null,flex:1,align:"left",displayField:"text",valueField:"value",scrollable:{direction:"vertical",indicators:false,momentumEasing:{minVelocity:2},slotSnapEasing:{duration:100}}},constructor:function(){this.selectedIndex=0;this.callParent(arguments)},applyTitle:function(a){if(a){a=Ext.create("Ext.Component",{cls:Ext.baseCSSPrefix+"picker-slot-title",docked:"top",html:a})}return a},updateTitle:function(b,a){if(b){this.add(b);this.setupBar()}if(a){this.remove(a)}},updateShowTitle:function(a){var b=this.getTitle();if(b){b[a?"show":"hide"]();this.setupBar()}},updateDisplayField:function(a){this.setItemTpl('
'+Ext.baseCSSPrefix+'picker-invalid">{'+a+"}
")},updateAlign:function(a,c){var b=this.element;b.addCls(Ext.baseCSSPrefix+"picker-"+a);b.removeCls(Ext.baseCSSPrefix+"picker-"+c)},applyData:function(d){var f=[],c=d&&d.length,a,b,e;if(d&&Ext.isArray(d)&&c){for(a=0;a0){c[0].addCls(b+"first");c[c.length-1].addCls(b+"last")}this.updateUseTitles(this.getUseTitles())},onDoneButtonTap:function(){var a=this._value,b=this.getValue(true);if(b!=a){this.fireEvent("change",this,b)}this.hide()},onCancelButtonTap:function(){this.fireEvent("cancel",this);this.hide()},onSlotPick:function(a){this.fireEvent("pick",this,this.getValue(true),a)},onShow:function(){if(!this.isHidden()){this.setValue(this._value)}},setValue:function(k,a){var f=this,d=f.getInnerItems(),e=d.length,j,h,c,b,g;if(!k){k={};for(b=0;b{'+this.getDisplayField()+":htmlEncode}",listeners:{select:this.onListSelect,itemtap:this.onListTap,scope:this}}},a))}return this.listPanel},onMaskTap:function(){if(this.getDisabled()){return false}this.showPicker();return false},showPicker:function(){var b=this.getStore();if(!b||b.getCount()===0){return}if(this.getReadOnly()){return}this.isFocused=true;if(this.getUsePicker()){var e=this.getPhonePicker(),d=this.getName(),h={};h[d]=this.record.get(this.getValueField());e.setValue(h);if(!e.getParent()){Ext.Viewport.add(e)}e.show()}else{var f=this.getTabletPicker(),g=f.down("list"),b=g.getStore(),c=b.find(this.getValueField(),this.getValue(),null,null,null,true),a=b.getAt((c==-1)?0:c);if(!f.getParent()){Ext.Viewport.add(f)}f.showBy(this.getComponent());g.select(a,null,true)}},onListSelect:function(c,a){var b=this;if(a){b.setValue(a)}},onListTap:function(){this.listPanel.hide({type:"fade",out:true,scope:this})},onPickerChange:function(d,f){var e=this,g=f[e.getName()],b=e.getStore(),c=b.find(e.getValueField(),g,null,null,null,true),a=b.getAt(c);e.setValue(a)},onChange:function(f,h,e){var g=this,b=g.getStore(),d=(b)?b.find(g.getDisplayField(),e):-1,c=g.getValueField(),a=(b)?b.getAt(d):null,e=(a)?a.get(c):null;g.fireEvent("change",g,g.getValue(),e)},updateOptions:function(b){var a=this.getStore();if(!a){this.setStore(true);a=this._store}if(!b){a.clearData()}else{a.setData(b);this.onStoreDataChanged(a)}},applyStore:function(a){if(a===true){a=Ext.create("Ext.data.Store",{fields:[this.getValueField(),this.getDisplayField()]})}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:this,addrecords:this.onStoreDataChanged,removerecords:this.onStoreDataChanged,updaterecord:this.onStoreDataChanged,refresh:this.onStoreDataChanged})}return a},updateStore:function(a){if(a){this.onStoreDataChanged(a)}},onStoreDataChanged:function(a){var c=this.getInitialConfig(),b=this.getValue();if(Ext.isDefined(b)){this.updateValue(this.applyValue(b))}if(this.getValue()===null){if(c.hasOwnProperty("value")){this.setValue(c.value)}if(this.getValue()===null){if(a.getCount()>0){this.setValue(a.getAt(0))}}}},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){var b=this.getStore(),a=(this.originalValue)?this.originalValue:b.getAt(0);if(b&&a){this.setValue(a)}return this},onFocus:function(a){this.fireEvent("focus",this,a);this.isFocused=true;this.showPicker()},destroy:function(){this.callParent(arguments);Ext.destroy(this.listPanel,this.picker,this.hiddenField)}});Ext.define("Ext.picker.Date",{extend:"Ext.picker.Picker",xtype:"datepicker",alternateClassName:"Ext.DatePicker",requires:["Ext.DateExtras"],config:{yearFrom:1980,yearTo:new Date().getFullYear(),monthText:"Month",dayText:"Day",yearText:"Year",slotOrder:["month","day","year"]},initialize:function(){this.callParent();this.on({scope:this,delegate:"> slot",slotpick:this.onSlotPick})},setValue:function(b,a){if(Ext.isDate(b)){b={day:b.getDate(),month:b.getMonth()+1,year:b.getFullYear()}}this.callParent([b,a])},getValue:function(k){var h={},e=this.getItems().items,d=e.length,a,g,c,f,j,b;for(b=0;bf){e=m;m=f;f=e}for(d=m;d<=f;d++){g.push({text:d,value:d})}a=this.getDaysInMonth(1,new Date().getFullYear());for(d=0;d thumb",dragstart:"onThumbDragStart",drag:"onThumbDrag",dragend:"onThumbDragEnd"});this.on({painted:"refresh",resize:"refresh"})},factoryThumb:function(){return Ext.factory(this.getThumbConfig(),Ext.slider.Thumb)},getThumbs:function(){return this.innerItems},getThumb:function(a){if(typeof a!="number"){a=0}return this.innerItems[a]},refreshOffsetValueRatio:function(){var b=this.getMaxValue()-this.getMinValue(),a=this.elementWidth-this.thumbWidth;this.offsetValueRatio=a/b},refreshElementWidth:function(){this.elementWidth=this.element.dom.offsetWidth;var a=this.getThumb(0);if(a){this.thumbWidth=a.getElementWidth()}},refresh:function(){this.refreshElementWidth();this.refreshValue()},setActiveThumb:function(b){var a=this.activeThumb;if(a&&a!==b){a.setZIndex(null)}this.activeThumb=b;b.setZIndex(2);return this},onThumbDragStart:function(a,b){if(b.absDeltaX<=b.absDeltaY){return false}else{b.stopPropagation()}if(this.getAllowThumbsOverlapping()){this.setActiveThumb(a)}this.dragStartValue=this.getValue()[this.getThumbIndex(a)];this.fireEvent("dragstart",this,a,this.dragStartValue,b)},onThumbDrag:function(c,g,a){var d=this.getThumbIndex(c),f=this.offsetValueRatio,b=this.constrainValue(a/f);g.stopPropagation();this.setIndexValue(d,b);this.fireEvent("drag",this,c,this.getValue(),g);return false},setIndexValue:function(d,g,f){var c=this.getThumb(d),b=this.getValue(),e=this.offsetValueRatio,a=c.getDraggable();a.setOffset(g*e,null,f);b[d]=g},onThumbDragEnd:function(a,f){this.refreshThumbConstraints(a);var c=this.getThumbIndex(a),d=this.getValue()[c],b=this.dragStartValue;this.fireEvent("dragend",this,a,this.getValue(),f);if(b!==d){this.fireEvent("change",this,a,d,b)}},getThumbIndex:function(a){return this.getThumbs().indexOf(a)},refreshThumbConstraints:function(d){var b=this.getAllowThumbsOverlapping(),a=d.getDraggable().getOffset().x,c=this.getThumbs(),e=this.getThumbIndex(d),g=c[e-1],h=c[e+1],f=this.thumbWidth;if(g){g.getDraggable().addExtraConstraint({max:{x:a-((b)?0:f)}})}if(h){h.getDraggable().addExtraConstraint({min:{x:a+((b)?0:f)}})}},onTap:function(j){if(this.isDisabled()){return}var k=Ext.get(j.target);if(!k||k.hasCls("x-thumb")){return}var n=j.touch.point.x,h=this.element,c=h.getX(),d=n-c-(this.thumbWidth/2),o=this.constrainValue(d/this.offsetValueRatio),r=this.getValue(),q=Infinity,m=r.length,g,f,l,p,b,a;if(m===1){p=0}else{for(g=0;g=(a/2)){e+=(c>0)?a:-a}e=Math.max(d,e);e=Math.min(f,e);return e},setThumbsCount:function(e){var a=this.getThumbs(),f=a.length,c,d,b;if(f>e){for(c=0,d=f-e;c0,b=d.getMaxValueCls(),e=d.getMinValueCls();this.element.addCls(g?b:e);this.element.removeCls(g?e:b)},toggle:function(){var a=this.getValue();this.setValue((a==1)?0:1);return this},onTap:function(){if(this.isDisabled()){return}var b=this.getValue(),c=(b==1)?0:1,a=this.getThumb(0);this.setIndexValue(0,c,this.getAnimation());this.refreshThumbConstraints(a);this.fireEvent("change",this,a,c,b)}});Ext.define("Ext.field.Toggle",{extend:"Ext.field.Slider",xtype:"togglefield",alternateClassName:"Ext.form.Toggle",requires:["Ext.slider.Toggle"],config:{cls:"x-toggle-field"},proxyConfig:{minValueCls:"x-toggle-off",maxValueCls:"x-toggle-on"},applyComponent:function(a){return Ext.factory(a,Ext.slider.Toggle)},setValue:function(a){if(a===true){a=1}this.getComponent().setValue(a);return this},getValue:function(){return(this.getComponent().getValue()==1)?1:0},toggle:function(){this.getComponent().toggle();return this}});Ext.define("Ext.tab.Tab",{extend:"Ext.Button",xtype:"tab",alternateClassName:"Ext.Tab",isTab:true,config:{baseCls:Ext.baseCSSPrefix+"tab",pressedCls:Ext.baseCSSPrefix+"tab-pressed",activeCls:Ext.baseCSSPrefix+"tab-active",active:false,title:" "},template:[{tag:"span",reference:"badgeElement",hidden:true},{tag:"span",className:Ext.baseCSSPrefix+"button-icon",reference:"iconElement",style:"visibility: hidden !important"},{tag:"span",reference:"textElement",hidden:true}],updateTitle:function(a){this.setText(a)},hideIconElement:function(){this.iconElement.dom.style.setProperty("visibility","hidden","!important")},showIconElement:function(){this.iconElement.dom.style.setProperty("visibility","visible","!important")},updateActive:function(c,b){var a=this.getActiveCls();if(c&&!b){this.element.addCls(a);this.fireEvent("activate",this)}else{if(b){this.element.removeCls(a);this.fireEvent("deactivate",this)}}}},function(){this.override({activate:function(){this.setActive(true)},deactivate:function(){this.setActive(false)}})});Ext.define("Ext.tab.Bar",{extend:"Ext.Toolbar",alternateClassName:"Ext.TabBar",xtype:"tabbar",requires:["Ext.tab.Tab"],config:{baseCls:Ext.baseCSSPrefix+"tabbar",defaultType:"tab",layout:{type:"hbox",align:"middle"}},eventedConfig:{activeTab:null},initialize:function(){var a=this;a.callParent();a.on({tap:"onTabTap",delegate:"> tab",scope:a})},onTabTap:function(a){this.setActiveTab(a)},applyActiveTab:function(b,c){if(!b&&b!==0){return}var a=this.parseActiveTab(b);if(!a){return}return a},doSetDocked:function(a){var c=this.getLayout(),b=a=="bottom"?"center":"left";if(c.isLayout){c.setPack(b)}else{c.pack=(c&&c.pack)?c.pack:b}},doSetActiveTab:function(b,a){if(b){b.setActive(true)}if(a){a.setActive(false)}},parseActiveTab:function(a){if(typeof a=="number"){return this.getInnerItems()[a]}else{if(typeof a=="string"){a=Ext.getCmp(a)}}return a}});Ext.define("Ext.tab.Panel",{extend:"Ext.Container",xtype:"tabpanel",alternateClassName:"Ext.TabPanel",requires:["Ext.tab.Bar"],config:{ui:"dark",tabBar:true,tabBarPosition:"top",layout:{type:"card",animation:{type:"slide",direction:"left"}},cls:Ext.baseCSSPrefix+"tabpanel"},delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange",disabledchange:"onItemDisabledChange"},initialize:function(){this.callParent();this.on({order:"before",activetabchange:"doTabChange",delegate:"> tabbar",scope:this})},applyScrollable:function(){return false},updateUi:function(a,b){this.callParent(arguments);if(this.initialized){this.getTabBar().setUi(a)}},doSetActiveItem:function(d,j){if(d){var f=this.getInnerItems(),g=f.indexOf(j),i=f.indexOf(d),e=g>i,c=this.getLayout().getAnimation(),b=this.getTabBar(),h=b.parseActiveTab(g),a=b.parseActiveTab(i);if(c&&c.setReverse){c.setReverse(e)}this.callParent(arguments);if(i!=-1){this.forcedChange=true;b.setActiveTab(i);this.forcedChange=false;if(h){h.setActive(false)}if(a){a.setActive(true)}}}},doTabChange:function(a,d){var b=this.getActiveItem(),c;this.setActiveItem(a.indexOf(d));c=this.getActiveItem();return this.forcedChange||b!==c},applyTabBar:function(a){if(a===true){a={}}if(a){Ext.applyIf(a,{ui:this.getUi(),docked:this.getTabBarPosition()})}return Ext.factory(a,Ext.tab.Bar,this.getTabBar())},updateTabBar:function(a){if(a){this.add(a);this.setTabBarPosition(a.getDocked())}},updateTabBarPosition:function(b){var a=this.getTabBar();if(a){a.setDocked(b)}},onItemAdd:function(e){var k=this;if(!e.isInnerItem()){return k.callParent(arguments)}var c=k.getTabBar(),o=e.getInitialConfig(),d=o.tab||{},g=(e.getTitle)?e.getTitle():o.title,i=(e.getIconCls)?e.getIconCls():o.iconCls,j=(e.getHidden)?e.getHidden():o.hidden,n=(e.getDisabled)?e.getDisabled():o.disabled,p=(e.getBadgeText)?e.getBadgeText():o.badgeText,b=k.getInnerItems(),h=b.indexOf(e),l=c.getItems(),a=c.getActiveTab(),m=(l.length>=b.length)&&l.getAt(h),f;if(g&&!d.title){d.title=g}if(i&&!d.iconCls){d.iconCls=i}if(j&&!d.hidden){d.hidden=j}if(n&&!d.disabled){d.disabled=n}if(p&&!d.badgeText){d.badgeText=p}f=Ext.factory(d,Ext.tab.Tab,m);if(!m){c.insert(h,f)}e.tab=f;k.callParent(arguments);if(!a&&a!==0){c.setActiveTab(c.getActiveItem())}},onItemDisabledChange:function(a,b){if(a&&a.tab){a.tab.setDisabled(b)}},onItemRemove:function(b,a){this.getTabBar().remove(b.tab,this.getAutoDestroy());this.callParent(arguments)}},function(){});Ext.define("Ext.table.Cell",{extend:"Ext.Container",xtype:"tablecell",config:{baseCls:"x-table-cell"},getElementConfig:function(){var a=this.callParent();a.children.length=0;return a}});Ext.define("Ext.table.Row",{extend:"Ext.table.Cell",xtype:"tablerow",config:{baseCls:"x-table-row",defaultType:"tablecell"}});Ext.define("Ext.table.Table",{extend:"Ext.Container",requires:["Ext.table.Row"],xtype:"table",config:{baseCls:"x-table",defaultType:"tablerow"},cachedConfig:{fixedLayout:false},fixedLayoutCls:"x-table-fixed",updateFixedLayout:function(a){this.innerElement[a?"addCls":"removeCls"](this.fixedLayoutCls)}});Ext.define("Ext.viewport.Default",{extend:"Ext.Container",xtype:"viewport",PORTRAIT:"portrait",LANDSCAPE:"landscape",requires:["Ext.LoadMask"],config:{autoMaximize:false,autoBlurInput:true,preventPanning:true,preventZooming:false,autoRender:true,layout:"card",width:"100%",height:"100%"},isReady:false,isViewport:true,isMaximizing:false,id:"ext-viewport",isInputRegex:/^(input|textarea|select|a)$/i,focusedElement:null,fullscreenItemCls:Ext.baseCSSPrefix+"fullscreen",constructor:function(a){var b=Ext.Function.bind;this.doPreventPanning=b(this.doPreventPanning,this);this.doPreventZooming=b(this.doPreventZooming,this);this.doBlurInput=b(this.doBlurInput,this);this.maximizeOnEvents=["ready","orientationchange"];this.orientation=this.determineOrientation();this.windowWidth=this.getWindowWidth();this.windowHeight=this.getWindowHeight();this.windowOuterHeight=this.getWindowOuterHeight();if(!this.stretchHeights){this.stretchHeights={}}this.callParent([a]);if(this.supportsOrientation()){this.addWindowListener("orientationchange",b(this.onOrientationChange,this))}else{this.addWindowListener("resize",b(this.onResize,this))}document.addEventListener("focus",b(this.onElementFocus,this),true);document.addEventListener("blur",b(this.onElementBlur,this),true);Ext.onDocumentReady(this.onDomReady,this);this.on("ready",this.onReady,this,{single:true});this.getEventDispatcher().addListener("component","*","fullscreen","onItemFullscreenChange",this);return this},onDomReady:function(){this.isReady=true;this.updateSize();this.fireEvent("ready",this)},onReady:function(){if(this.getAutoRender()){this.render()}},onElementFocus:function(a){this.focusedElement=a.target},onElementBlur:function(){this.focusedElement=null},render:function(){if(!this.rendered){var a=Ext.getBody(),b=Ext.baseCSSPrefix,h=[],d=Ext.os,g=d.name.toLowerCase(),f=Ext.browser.name.toLowerCase(),e=d.version.getMajor(),c=this.getOrientation();this.renderTo(a);h.push(b+d.deviceType.toLowerCase());if(d.is.iPad){h.push(b+"ipad")}h.push(b+g);h.push(b+f);if(e){h.push(b+g+"-"+e)}if(d.is.BlackBerry){h.push(b+"bb")}if(Ext.browser.is.Standalone){h.push(b+"standalone")}h.push(b+c);a.addCls(h)}},applyAutoBlurInput:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doBlurInput,false)}else{this.removeWindowListener(b,this.doBlurInput,false)}return a},applyAutoMaximize:function(a){if(Ext.browser.is.WebView){a=false}if(a){this.on("ready","doAutoMaximizeOnReady",this,{single:true});this.on("orientationchange","doAutoMaximizeOnOrientationChange",this)}else{this.un("ready","doAutoMaximizeOnReady",this);this.un("orientationchange","doAutoMaximizeOnOrientationChange",this)}return a},applyPreventPanning:function(a){if(a){this.addWindowListener("touchmove",this.doPreventPanning,false)}else{this.removeWindowListener("touchmove",this.doPreventPanning,false)}return a},applyPreventZooming:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doPreventZooming,false)}else{this.removeWindowListener(b,this.doPreventZooming,false)}return a},doAutoMaximizeOnReady:function(){var a=arguments[arguments.length-1];a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();a.resume();this.fireEvent("ready",this)},this,{single:true});this.maximize()},doAutoMaximizeOnOrientationChange:function(){var a=arguments[arguments.length-1],b=a.firingArguments;a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();b[1]=this.windowWidth;b[2]=this.windowHeight;a.resume()},this,{single:true});this.maximize()},doBlurInput:function(b){var a=b.target,c=this.focusedElement;if(c&&!this.isInputRegex.test(a.tagName)){delete this.focusedElement;c.blur()}},doPreventPanning:function(a){a.preventDefault()},doPreventZooming:function(b){if("button" in b&&b.button!==0){return}var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)){b.preventDefault()}},addWindowListener:function(b,c,a){window.addEventListener(b,c,Boolean(a))},removeWindowListener:function(b,c,a){window.removeEventListener(b,c,Boolean(a))},doAddListener:function(a,d,c,b){if(a==="ready"&&this.isReady&&!this.isMaximizing){d.call(c);return this}this.mixins.observable.doAddListener.apply(this,arguments)},supportsOrientation:function(){return Ext.feature.has.Orientation},onResize:function(){var c=this.windowWidth,f=this.windowHeight,e=this.getWindowWidth(),a=this.getWindowHeight(),d=this.getOrientation(),b=this.determineOrientation();if((c!==e||f!==a)&&d!==b){this.fireOrientationChangeEvent(b,d)}},onOrientationChange:function(){var b=this.getOrientation(),a=this.determineOrientation();if(a!==b){this.fireOrientationChangeEvent(a,b)}},fireOrientationChangeEvent:function(b,c){var a=Ext.baseCSSPrefix;Ext.getBody().replaceCls(a+c,a+b);this.orientation=b;this.updateSize();this.fireEvent("orientationchange",this,b,this.windowWidth,this.windowHeight)},updateSize:function(b,a){this.windowWidth=b!==undefined?b:this.getWindowWidth();this.windowHeight=a!==undefined?a:this.getWindowHeight();return this},waitUntil:function(h,e,g,a,f){if(!a){a=50}if(!f){f=2000}var c=this,b=0;setTimeout(function d(){b+=a;if(h.call(c)===true){if(e){e.call(c)}}else{if(b>=f){if(g){g.call(c)}}else{setTimeout(d,a)}}},a)},maximize:function(){this.fireMaximizeEvent()},fireMaximizeEvent:function(){this.updateSize();this.fireEvent("maximize",this)},doSetHeight:function(a){Ext.getBody().setHeight(a);this.callParent(arguments)},doSetWidth:function(a){Ext.getBody().setWidth(a);this.callParent(arguments)},scrollToTop:function(){window.scrollTo(0,-1)},getWindowWidth:function(){return window.innerWidth},getWindowHeight:function(){return window.innerHeight},getWindowOuterHeight:function(){return window.outerHeight},getWindowOrientation:function(){return window.orientation},getOrientation:function(){return this.orientation},getSize:function(){return{width:this.windowWidth,height:this.windowHeight}},determineOrientation:function(){var b=this.PORTRAIT,a=this.LANDSCAPE;if(this.supportsOrientation()){if(this.getWindowOrientation()%180===0){return b}return a}else{if(this.getWindowHeight()>=this.getWindowWidth()){return b}return a}},onItemFullscreenChange:function(a){a.addCls(this.fullscreenItemCls);this.add(a)}});Ext.define("Ext.viewport.Android",{extend:"Ext.viewport.Default",constructor:function(){this.on("orientationchange","doFireOrientationChangeEvent",this,{prepend:true});this.on("orientationchange","hideKeyboardIfNeeded",this,{prepend:true});return this.callParent(arguments)},getDummyInput:function(){var a=this.dummyInput,c=this.focusedElement,b=Ext.fly(c).getPageBox();if(!a){this.dummyInput=a=document.createElement("input");a.style.position="absolute";a.style.opacity="0";document.body.appendChild(a)}a.style.left=b.left+"px";a.style.top=b.top+"px";a.style.display="";return a},doBlurInput:function(c){var b=c.target,d=this.focusedElement,a;if(d&&!this.isInputRegex.test(b.tagName)){a=this.getDummyInput();delete this.focusedElement;a.focus();setTimeout(function(){a.style.display="none"},100)}},hideKeyboardIfNeeded:function(){var a=arguments[arguments.length-1],b=this.focusedElement;if(b){delete this.focusedElement;a.pause();if(Ext.os.version.lt("4")){b.style.display="none"}else{b.blur()}setTimeout(function(){b.style.display="";a.resume()},1000)}},doFireOrientationChangeEvent:function(){var a=arguments[arguments.length-1];this.orientationChanging=true;a.pause();this.waitUntil(function(){return this.getWindowOuterHeight()!==this.windowOuterHeight},function(){this.windowOuterHeight=this.getWindowOuterHeight();this.updateSize();a.firingArguments[1]=this.windowWidth;a.firingArguments[2]=this.windowHeight;a.resume();this.orientationChanging=false},function(){});return this},applyAutoMaximize:function(a){a=this.callParent(arguments);this.on("add","fixSize",this,{single:true});if(!a){this.on("ready","fixSize",this,{single:true});this.onAfter("orientationchange","doFixSize",this)}else{this.un("ready","fixSize",this);this.unAfter("orientationchange","doFixSize",this)}},fixSize:function(){this.doFixSize()},doFixSize:function(){this.setHeight(this.getWindowHeight())},getActualWindowOuterHeight:function(){return Math.round(this.getWindowOuterHeight()/window.devicePixelRatio)},maximize:function(){var c=this.stretchHeights,b=this.orientation,a;a=c[b];if(!a){c[b]=a=this.getActualWindowOuterHeight()}if(!this.addressBarHeight){this.addressBarHeight=a-this.getWindowHeight()}this.setHeight(a);var d=Ext.Function.bind(this.isHeightMaximized,this,[a]);this.scrollToTop();this.waitUntil(d,this.fireMaximizeEvent,this.fireMaximizeEvent)},isHeightMaximized:function(a){this.scrollToTop();return this.getWindowHeight()===a}},function(){if(!Ext.os.is.Android){return}var a=Ext.os.version,b=Ext.browser.userAgent,c=/(htc|desire|incredible|ADR6300)/i.test(b)&&a.lt("2.3");if(c){this.override({constructor:function(d){if(!d){d={}}d.autoMaximize=false;this.watchDogTick=Ext.Function.bind(this.watchDogTick,this);setInterval(this.watchDogTick,1000);return this.callParent([d])},watchDogTick:function(){this.watchDogLastTick=Ext.Date.now()},doPreventPanning:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)},doPreventZooming:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)}})}if(a.match("2")){this.override({onReady:function(){this.addWindowListener("resize",Ext.Function.bind(this.onWindowResize,this));this.callParent(arguments)},scrollToTop:function(){document.body.scrollTop=100},onWindowResize:function(){var e=this.windowWidth,g=this.windowHeight,f=this.getWindowWidth(),d=this.getWindowHeight();if(this.getAutoMaximize()&&!this.isMaximizing&&!this.orientationChanging&&window.scrollY===0&&e===f&&d=g-this.addressBarHeight)||!this.focusedElement)){this.scrollToTop()}},fixSize:function(){var d=this.getOrientation(),f=window.outerHeight,g=window.outerWidth,e;if(d==="landscape"&&(f=g)){e=this.getActualWindowOuterHeight()}else{e=this.getWindowHeight()}this.waitUntil(function(){return e>this.getWindowHeight()},this.doFixSize,this.doFixSize,50,1000)}})}else{if(a.gtEq("3.1")){this.override({isHeightMaximized:function(d){this.scrollToTop();return this.getWindowHeight()===d-1}})}else{if(a.match("3")){this.override({isHeightMaximized:function(){this.scrollToTop();return true}})}}}if(a.gtEq("4")){this.override({doBlurInput:Ext.emptyFn})}});Ext.define("Ext.viewport.Ios",{extend:"Ext.viewport.Default",isFullscreen:function(){return this.isHomeScreen()},isHomeScreen:function(){return window.navigator.standalone===true},constructor:function(){this.callParent(arguments);if(this.getAutoMaximize()&&!this.isFullscreen()){this.addWindowListener("touchstart",Ext.Function.bind(this.onTouchStart,this))}},maximize:function(){if(this.isFullscreen()){return this.callParent()}var c=this.stretchHeights,b=this.orientation,d=this.getWindowHeight(),a=c[b];if(window.scrollY>0){this.scrollToTop();if(!a){c[b]=a=this.getWindowHeight()}this.setHeight(a);this.fireMaximizeEvent()}else{if(!a){a=this.getScreenHeight()}this.setHeight(a);this.waitUntil(function(){this.scrollToTop();return d!==this.getWindowHeight()},function(){if(!c[b]){a=c[b]=this.getWindowHeight();this.setHeight(a)}this.fireMaximizeEvent()},function(){a=c[b]=this.getWindowHeight();this.setHeight(a);this.fireMaximizeEvent()},50,1000)}},getScreenHeight:function(){return window.screen[this.orientation===this.PORTRAIT?"height":"width"]},onElementFocus:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){clearTimeout(this.scrollToTopTimer)}this.callParent(arguments)},onElementBlur:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){this.scrollToTopTimer=setTimeout(this.scrollToTop,500)}this.callParent(arguments)},onTouchStart:function(){if(this.focusedElement===null){this.scrollToTop()}},scrollToTop:function(){window.scrollTo(0,0)}},function(){if(!Ext.os.is.iOS){return}if(Ext.os.version.lt("3.2")){this.override({constructor:function(){var a=this.stretchHeights={};a[this.PORTRAIT]=416;a[this.LANDSCAPE]=268;return this.callOverridden(arguments)}})}if(Ext.os.version.lt("5")){this.override({fieldMaskClsTest:"-field-mask",doPreventZooming:function(b){var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)&&a.className.indexOf(this.fieldMaskClsTest)==-1){b.preventDefault()}}})}if(Ext.os.is.iPad){this.override({isFullscreen:function(){return true}})}});Ext.define("Ext.viewport.Viewport",{requires:["Ext.viewport.Ios","Ext.viewport.Android"],constructor:function(b){var c=Ext.os.name,d,a;switch(c){case"Android":d="Android";break;case"iOS":d="Ios";break;default:d="Default"}a=Ext.create("Ext.viewport."+d,b);return a}});Ext.define("Ext.event.recognizer.Swipe",{extend:"Ext.event.recognizer.SingleTouch",handledEvents:["swipe"],inheritableStatics:{MAX_OFFSET_EXCEEDED:16,MAX_DURATION_EXCEEDED:17,DISTANCE_NOT_ENOUGH:18},config:{minDistance:80,maxOffset:35,maxDuration:1000},onTouchStart:function(a){if(this.callParent(arguments)===false){return false}var b=a.changedTouches[0];this.startTime=a.time;this.isHorizontal=true;this.isVertical=true;this.startX=b.pageX;this.startY=b.pageY},onTouchMove:function(f){var h=f.changedTouches[0],b=h.pageX,g=h.pageY,c=Math.abs(b-this.startX),a=Math.abs(g-this.startY),d=f.time;if(d-this.startTime>this.getMaxDuration()){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(this.isVertical&&c>this.getMaxOffset()){this.isVertical=false}if(this.isHorizontal&&a>this.getMaxOffset()){this.isHorizontal=false}if(!this.isHorizontal&&!this.isVertical){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(i){if(this.onTouchMove(i)===false){return false}var h=i.changedTouches[0],l=h.pageX,j=h.pageY,g=l-this.startX,f=j-this.startY,c=Math.abs(g),b=Math.abs(f),m=this.getMinDistance(),d=i.time-this.startTime,k,a;if(this.isVertical&&bc){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(a>b){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(f){if(this.onTouchMove(f)!==false){var i=f.changedTouches[0],a=i.pageX,b=a-this.startX,h=Math.abs(b),d=f.time-this.startTime,g=this.getMinDistance(),c;if(h *{height:100%;width:100%;position:absolute}.x-video-ghost{-webkit-background-size:100% auto;background:black url() center center no-repeat}audio{width:100%}.x-panel,.x-msgbox,.x-panel-body{position:relative}.x-panel.x-floating,.x-msgbox.x-floating,.x-form.x-floating{padding:6px;-webkit-border-radius:0.3em;border-radius:0.3em;-webkit-box-shadow:rgba(0, 0, 0, 0.8) 0 0.2em 0.6em;background-color:#03111a;background-image:none}.x-panel.x-floating.x-floating-light,.x-msgbox.x-floating.x-floating-light,.x-form.x-floating.x-floating-light{background-color:#1985d0;background-image:none}.x-panel.x-floating > .x-panel-inner,.x-panel.x-floating .x-scroll-view,.x-panel.x-floating .x-body,.x-msgbox.x-floating > .x-panel-inner,.x-msgbox.x-floating .x-scroll-view,.x-msgbox.x-floating .x-body,.x-form.x-floating > .x-panel-inner,.x-form.x-floating .x-scroll-view,.x-form.x-floating .x-body{background-color:#fff;-webkit-border-radius:0.3em;border-radius:0.3em}.x-anchor{width:1.631em;height:0.7em;position:absolute;left:0;top:0;z-index:1;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAPCAYAAABut3YUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNpi/PX7LwOFwAyIG6HseiA+Ra5BjBQ6xg+IVwAxJ5T/HYgjgHgTOYYxUeCQUiBeh+QQBih7HVSOLiHDDMSTgTiTgLrpQJwLxH9p5RhOaLT4EakeFF3RQPyF2o6RhkaBGYkheRmIPYH4KbXSjC4QnyTDIch6danhGCcgPgwNGXKBNNQMb0ocEwXE24GYn4FyADJjI76Ej88x7UC8FIjZGKgHQDlxGtRsZmISMMjy+dBQoSXYBC0gv+NyDD80xzgx0AeAqg4fIH6NHk0qQHyMjg6B1WvHYDkNFjIgwS1ALMowMOAjEAeBHINe2Q0U+AUQYACQ10C2QNhRogAAAABJRU5ErkJggg==') no-repeat;-webkit-mask-size:1.631em 0.7em;overflow:hidden;background-color:#03111a;-webkit-transform-origin:0% 0%}.x-anchor.x-anchor-top{margin-left:-0.816em;margin-top:-0.7em}.x-anchor.x-anchor-bottom{-webkit-transform:rotate(180deg);margin-left:0.816em;margin-top:0.6em}.x-anchor.x-anchor-left{-webkit-transform:rotate(270deg);margin-left:-0.7em;margin-top:-0.1em}.x-anchor.x-anchor-right{-webkit-transform:rotate(90deg);margin-left:0.7em;margin-top:0}.x-floating.x-panel-light:after{background-color:#1985d0}.x-button{-webkit-background-clip:padding;background-clip:padding-box;-webkit-border-radius:0.4em;border-radius:0.4em;display:-webkit-box;display:box;-webkit-box-align:center;box-align:center;min-height:1.8em;padding:.3em .6em;position:relative;overflow:hidden;-webkit-user-select:none}.x-button,.x-toolbar .x-button{border:1px solid #999999;border-top-color:#a6a6a6;color:black}.x-button.x-button-back:before,.x-button.x-button-forward:before,.x-toolbar .x-button.x-button-back:before,.x-toolbar .x-button.x-button-forward:before{background:#999999}.x-button,.x-button.x-button-back:after,.x-button.x-button-forward:after,.x-toolbar .x-button,.x-toolbar .x-button.x-button-back:after,.x-toolbar .x-button.x-button-forward:after{background-color:#ccc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #dedede), color-stop(100%, #bababa));background-image:-webkit-linear-gradient(#ffffff,#dedede 2%,#bababa);background-image:linear-gradient(#ffffff,#dedede 2%,#bababa)}.x-button .x-button-icon.x-icon-mask,.x-toolbar .x-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-button.x-button-pressing,.x-button.x-button-pressing:after,.x-button.x-button-pressed,.x-button.x-button-pressed:after,.x-button.x-button-active,.x-button.x-button-active:after,.x-toolbar .x-button.x-button-pressing,.x-toolbar .x-button.x-button-pressing:after,.x-toolbar .x-button.x-button-pressed,.x-toolbar .x-button.x-button-pressed:after,.x-toolbar .x-button.x-button-active,.x-toolbar .x-button.x-button-active:after{background-color:#c4c4c4;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ababab), color-stop(10%, #b8b8b8), color-stop(65%, #c4c4c4), color-stop(100%, #c6c6c6));background-image:-webkit-linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6);background-image:linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6)}.x-button .x-button-icon{width:2.1em;height:2.1em;background-repeat:no-repeat;background-position:center;display:block}.x-button .x-button-icon.x-icon-mask{width:1.3em;height:1.3em;-webkit-mask-size:1.3em}.x-button.x-item-disabled .x-button-label,.x-button.x-item-disabled .x-hasbadge .x-badge,.x-hasbadge .x-button.x-item-disabled .x-badge,.x-button.x-item-disabled .x-button-icon{opacity:.5}.x-button-round,.x-button.x-button-action-round,.x-button.x-button-confirm-round,.x-button.x-button-decline-round{-webkit-border-radius:0.9em;border-radius:0.9em;padding:0.1em 0.9em}.x-iconalign-left,.x-icon-align-right{-webkit-box-orient:horizontal;box-orient:horizontal}.x-iconalign-top,.x-iconalign-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-iconalign-bottom,.x-iconalign-right{-webkit-box-direction:reverse;box-direction:reverse}.x-iconalign-center{-webkit-box-pack:center;box-pack:center}.x-iconalign-left .x-button-label,.x-iconalign-left .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-left .x-badge{margin-left:0.3em}.x-iconalign-right .x-button-label,.x-iconalign-right .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-right .x-badge{margin-right:0.3em}.x-iconalign-top .x-button-label,.x-iconalign-top .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-top .x-badge{margin-top:0.3em}.x-iconalign-bottom .x-button-label,.x-iconalign-bottom .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-bottom .x-badge{margin-bottom:0.3em}.x-button-label,.x-hasbadge .x-badge{-webkit-box-flex:1;box-flex:1;-webkit-box-align:center;box-align:center;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-weight:bold;line-height:1.2em;display:block;overflow:hidden}.x-toolbar .x-button{margin:0 .2em;padding:.3em .6em}.x-toolbar .x-button .x-button-label,.x-toolbar .x-button .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button .x-badge{font-size:.7em}.x-button-small,.x-button.x-button-action-small,.x-button.x-button-confirm-small,.x-button.x-button-decline-small,.x-toolbar .x-button-small,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-decline-small{-webkit-border-radius:0.3em;border-radius:0.3em;padding:.2em .4em;min-height:0}.x-button-small .x-button-label,.x-button.x-button-action-small .x-button-label,.x-button.x-button-confirm-small .x-button-label,.x-button.x-button-decline-small .x-button-label,.x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-button-small .x-badge,.x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-action-small .x-badge,.x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-confirm-small .x-badge,.x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-decline-small .x-badge,.x-toolbar .x-button-small .x-button-label,.x-toolbar .x-button.x-button-action-small .x-button-label,.x-toolbar .x-button.x-button-confirm-small .x-button-label,.x-toolbar .x-button.x-button-decline-small .x-button-label,.x-toolbar .x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button-small .x-badge,.x-toolbar .x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-action-small .x-badge,.x-toolbar .x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-confirm-small .x-badge,.x-toolbar .x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-decline-small .x-badge{font-size:.6em}.x-button-small .x-button-icon,.x-button.x-button-action-small .x-button-icon,.x-button.x-button-confirm-small .x-button-icon,.x-button.x-button-decline-small .x-button-icon,.x-toolbar .x-button-small .x-button-icon,.x-toolbar .x-button.x-button-action-small .x-button-icon,.x-toolbar .x-button.x-button-confirm-small .x-button-icon,.x-toolbar .x-button.x-button-decline-small .x-button-icon{width:.75em;height:.75em}.x-button-forward,.x-button-back{position:relative;overflow:visible;height:1.8em;z-index:1}.x-button-forward:before,.x-button-forward:after,.x-button-back:before,.x-button-back:after{content:"";position:absolute;width:0.773em;height:1.8em;top:-0.1em;left:auto;z-index:2;-webkit-mask:0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAiNJREFUeNrEWb9LQlEUvj5BcHoQvMnVKXD1D3CLwqBJbHJsazQaWoSCxgbHJiMIAiNok6AhCDdXVycnJ8EQOgeOYaG+d39998KH+HyP753zzjnfd325xfdSgVeV8B6BScuEV0IRSbxHeCMk/AVFXCA8ScQKSXxPqK0fQBBfE5r/D+Y8VzUT9jb94DPimqRYIYkrhGcpKhhxIqTxrpNcExdlQJTTTnRJnCc8ykhUSOIOoZ71ZFfEZ4S2zgUu+rguxZRHEnPbfKRVsOtUl0RtYpOLTYljIS2Z3nVk2DY9SbNCEt8RDm0rUpe4La1jvXSqmtum72raZI24KuNQIYl/nSGSOJb0Jq61M0pxhjwK9304hUjHGSKILzc5Q5drUzttdYY+I97pDH1FzG0zNFUb04gTG4kzJS5kdYauiZtZnaFr4ooKsCIVaDHxKAQxt1NBnGIVHfGCcEQYh3jGU8KBfMKLiyM+lgzAq/qT0ArVTg+Ei1B9fEPoovV4fcfQd2HedScX39GprwGTNjJn0maTELN6IuSzECLB6T5x2eM66jQgnIeSxa60GnS3uL56tr7b1Ai0JPVwYi6yho2U2lgfKym19VxjMRHzEGbvS9K+RBPzetGVUpf29lZHSl2/DMnLvwh1ZMQrKW3Ic4fvJOZS6ZMQW5hpmpT63DvtlFLfm7bBNruM2C2yXb7y3U6ZpRS5P/4jpUjihRTbCJ3q1eL3GMMfAQYAJmB6SBO619IAAAAASUVORK5CYII=') no-repeat;-webkit-mask-size:0.773em 1.8em;overflow:hidden}.x-button-back,.x-toolbar .x-button-back{margin-left:0.828em;padding-left:.4em}.x-button-back:before,.x-toolbar .x-button-back:before{left:-0.693em}.x-button-back:after,.x-toolbar .x-button-back:after{left:-0.628em}.x-button-forward,.x-toolbar .x-button-forward{margin-right:0.828em;padding-right:.4em}.x-button-forward:before,.x-button-forward:after,.x-toolbar .x-button-forward:before,.x-toolbar .x-button-forward:after{-webkit-mask:-0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXlJREFUaN7lmTFqAlEQhh8EhFSCYJXW1law9QAewMrWAwQWAmmtbPcGHiCQ1gPYCla2QsDKSsgmQecvFqImu2/fzry/2OLb9mt23vwz47Kvn5MwEFxM8DkLB6HHEIOd0GGIwUpoMcRgyRKDOUsMJizxpzBiiMFR6DPEeZl1GWKwFh4ZYvAmPDDEqmVWVQxmLPG3MGaIVcosVAz2whNDDDZCmyEG7yFlpiEGKUsMEpb4XKXMtMXeiVVb7J1YLcRgW1ZmVuLSxGopLkys1mLwwhL/mVhjie8Sayxx3kp7DPFVYo0tzhNriyEGU5Z40TjxtDE/F6WcDowHBE/msDFNImG0xZQRBAonDCvxhhH2vKZIZ9Ds+7EDfaWFnKZ4xhja5owxdcnYCAQv1p1Gi4sprn08cZbDt6ZYZasXIn5mLFHTjLCvVt1V+4rVt/M+4r3FPaJMbHaBKRKb3pyKxKZXtv/Er4yjZpRL6q042u34tzh4xV9H/FHnqBHKBQeEd6aqqwD6AAAAAElFTkSuQmCC') no-repeat}.x-button-forward:before,.x-toolbar .x-button-forward:before{right:-0.693em}.x-button-forward:after,.x-toolbar .x-button-forward:after{right:-0.628em}.x-button.x-button-plain,.x-toolbar .x-button.x-button-plain{background:none;border:0 none;-webkit-border-radius:none;border-radius:none;min-height:0;text-shadow:none;line-height:auto;height:auto;padding:0.5em}.x-button.x-button-plain > *,.x-toolbar .x-button.x-button-plain > *{overflow:visible}.x-button.x-button-plain .x-button-icon,.x-toolbar .x-button.x-button-plain .x-button-icon{-webkit-mask-size:1.4em;width:1.4em;height:1.4em}.x-button.x-button-plain.x-button-pressing,.x-button.x-button-plain.x-button-pressed,.x-toolbar .x-button.x-button-plain.x-button-pressing,.x-toolbar .x-button.x-button-plain.x-button-pressed{background:none;background-image:-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 24, color-stop(0%, rgba(182,225,255,0.7)), color-stop(100%, rgba(182,225,255,0)));background-image:-webkit-radial-gradient(rgba(182,225,255,0.7),rgba(182,225,255,0) 24px);background-image:radial-gradient(rgba(182,225,255,0.7),rgba(182,225,255,0) 24px)}.x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask{background-color:#fff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e6e6e6), color-stop(10%, #f2f2f2), color-stop(65%, #ffffff), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff);background-image:linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff)}.x-segmentedbutton .x-button{margin:0;-webkit-border-radius:0;border-radius:0}.x-segmentedbutton .x-button.x-first{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-segmentedbutton .x-button.x-last{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-segmentedbutton .x-button:not(:first-child){border-left:0}.x-hasbadge{overflow:visible}.x-hasbadge .x-badge{-webkit-background-clip:padding;background-clip:padding-box;-webkit-border-radius:0.2em;border-radius:0.2em;padding:.1em .3em;z-index:2;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-shadow:rgba(0, 0, 0, 0.5) 0 0.1em 0.1em;box-shadow:rgba(0, 0, 0, 0.5) 0 0.1em 0.1em;overflow:hidden;color:#ffcccc;border:1px solid #990000;position:absolute;width:auto;min-width:2em;line-height:1.2em;font-size:.6em;right:0px;top:-0.2em;max-width:95%;background-color:#cc0000;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff6666), color-stop(2%, #f00000), color-stop(100%, #a80000));background-image:-webkit-linear-gradient(#ff6666,#f00000 2%,#a80000);background-image:linear-gradient(#ff6666,#f00000 2%,#a80000);display:inline-block}.x-tab .x-button-icon.action,.x-button .x-button-icon.x-icon-mask.action{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFI0lEQVRoBe2YW4hVVRjHZ0yzq6lFEaMlE0PShYRAJIl6iEqKHnqI6WJB0IvdICkfEk0aIyo0KFCph8giCitI7CkoohQL7SoZDaQmXSgKo4uWNf1+zt7DOXvOOXuvvc85bc+cD36ssy/r+77/Xmt9e+3TOzIy0jORbNJEEqvWruBOH/HuCHdHuMOeQOmmdO+ozaA5oxXPunSC2Re4MbgCNiB6vvqbKbx0giNxp9BeBU/BIJqnRecLN2UVrLDj4GIYgscRfSltYSuzYMUdA/0wCI8ieglM5XduK7vgWJhTegGshucRfQHkyj1XpziLNrfmOh2ug1dhMaJn0gbZZDpNpsexQb2y3azfKXCAwns4W5dMd7m2B2ANLCT/x/A/nKknN5mUhWFp1g4Z7vM14jrbBZvgEwi1tAdkDEf3ZrgI0S/RrkP4IdqGpuA+cJo0yw7iyNfJmzAcMrokfjp93HC4XrPYCdzkgPXDPPqvJN7eRh0VrBWqfKMuev6k3Qzr4SP4HWqOFIkZ73iYA/NhLpwPZ4LLS+FZzUp+GtwAA/heS/sGwv+irWnXc9bdTRF20/8eOBWmEKwnCectOrPhSlgF2+Bb+Bl+AxP8B/6FvLn8Td8fYQXMSubgsVZU8Cv4mAeNhC7k+jLYCopzrRURlvZA9P8WLIJJlcI5zi1Ypw+Dr4oqp3EAzlsbLCjfg1PeEUxLtlnXXU4/wQboq8gpl2BHx2l5Uuyosu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add,.x-button .x-button-icon.x-icon-mask.add{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAABqUlEQVRoBe2awWnDUBBE843B4NxcQSAFOC4lJeTkoxtJDykgvRhcgCFNJCFgIs+ChEHSJX93YT6ZD4ssmR3NztNFH5Wu6+6iVynlEZpbp+4J3s5OjWm7DRxZuMMCdUB9oyzNmrJe01hEejMtM5exIh6bCI3JbFkDT27EckEDs5DI8iHCWcmy6IowC4ksHyKclSyLrgizkMjyIcJZybLoijALiSwfIpyVLItuOGFso/xiuEvAgJdeK0DqJrHEhtsTTh9ul9y/ChR2KE+Y1ruDt2ccI7d6PszcK+oFFblWELt3Cn6i/8epMW5/W+LKGrUZ/0NwboF5QxuPsfY8dmOxJs41cBOYHCZF2BFeE60i3AQmh0kRdoTXRKsIN4HJYVKEHeE10frvCNvr4RH1HojH3rGHr3hqA7VdkxPKvuKJ3AA4hn7BM3xxA5N71Fdv1gz/tax3P+hFHmsJwM/8wraMadqOh5GuXda76rVqNWb7wgeevQvRRQ1MBCPFiginxEokKsJEMFKsiHBKrESiIkwEI8WKCKfESiQqwkQwUqyIcEqsRKIiTAQjxcoVrP83/9czD9EAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_down,.x-button .x-button-icon.x-icon-mask.arrow_down{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8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lZycLT4BhUiliWfEwEbII+UeuwT4nzqNZq2Gm1gTu/ZaUIj4NTEBW7tTTY1zUwKH4vbaive6BBw2kpAa6DkA1CeBicgZhVx8McUg5WWNi+83CWiXFfE9ZeAGQR6ukBqJKyu/Gzw7TcXEiS9UuYbiWWeU8ckXYqMT2lozyFW6SeOU0K1/FhPS75RsHUlKbj3KV0WRPC1Nd5sCuxr6anNPV12zFwk2jLCCdtk81XeAIsahL+BVOgH3xrEPayA5rAixZhyj2oB2ktwpR30A5WtQh7vR4DQ+BHg7CXLdAMXrUIU26411dahClvoBVsaBF2uMsjYFRCrwt5a7kOOnjUVQg7vE43cr9VCDu8I6Nep7QIO7z3HgCTvHYXvbCXJe71hxZhyjmv1w9ahCnP/DDb1yLs9boXzGgR9rIAusCnFmHKCff6UYsw5Ymlj7QIU75AN5gz9YVuLu8eB/S+dA+v1+l83pe2Sfg/BRe2OeGfPELhUDgUtip/AgwAw4tbozZtKFwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_right,.x-button .x-button-icon.x-icon-mask.arrow_right{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJ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+IVjxZAQD1iPZK4CVGiGAZ6lOCVjFE7LhO/i0JKzUK3KImQY3S8ZKHZ4cr8A16sMQWPHkeANepF4MYqWmD2A9arcWsIonqOYafGYJK73yRDkB71nGSnd5r4jKBG9Sn47AunOb4CWq7xAr7dsA61G69wCreMK2TIMvPMFKfZ44I+ADz7DSQ9YhVgS87fiQGtdlmeBlvkNWnndYBljfGT8FgJVDbKco+CoQrBp6mrEyKfgoMOyvpxlZ4CT9vcXj0shWNe8nE8vCfzwABhhggAEGGGCATa1vAQYAZekAmr8OukgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.compose,.x-button .x-button-icon.x-icon-mask.compose{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAF/0lEQVRoBe2aW4hVVRjH54xa6nSzm92sHiZNorJowMpxrDEoyECiUUpztIkeeumpoCB6rAwi6FHwIXqKXkqiEE0no0QNLWwyspmGsruWlVqp0+9/2t9hz3Lty+mcfTnpB/9Za397Xf7//a219lr7TGVsbKztZLL2k0mstJ4S/H+P+ESfwEqlMhn/VNAJpoOjoGibAIFfwDbWnT/DZOCrex34D4b9vvw4wVScRKEu0AcWgQtBmYb9DvgsA6OganCWhgFwL/lHEf35v3ci/mqVFrAO8AT4FugJHge6URZsg0s3aDfOAe+H8f0INAo3gavD9928iT2bgqvBYVAWgWEeG+E1G0wwAeQ18hTZ/cDKSvROECnaBD9Iod9DFa2BMqSDEgAqjtiH8H3v4XwM32ZwlZUPp/jbLgHDoAziXA7r4aXIhsVqgZLYA8Atb9eK9BbQGRarvOwxEDdfdU9D/UiOUH9bwTixAWGJ/QmYuKhUojU6xomu4HgL3AV89ipO3ZdYlc3LJOJTsAeR1bAEr56V+J4H00Aa0/D+BNxPM0NW4Wcyvqe0G7+Gu5b9IhAexnrYq8A+4OMa55PoDaA6p0kjG1jHvVqnetBFQBxAP9CrJ27qxYm2OX25IhdlxxGoRgqzYFOxHAIvgHMbIKKF7i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xJcFQDU3i96LRTGoOPBGmnligsirQWre/AxZ4C1+DrpY/3PfeKcl1Gxz3AJ1inrsR3uiquBf3AZ9/g1FFMjZXBZkBCW1Sf7WSx1NEx0bSv1QZBQ7tVoYA8jeDEf7yhXNuZ4B2gSq0qeBjuM1MJViGsB6hSK4rW598BMO6/bKPE14YAFXQ2HQWtMrwVnINAYmufjqKEmr8mOIj0bVTWSUYb/qQPbBoaRUABOQz03znLwUQTkyat/hZDpZrxGjqLi4VgMbgJ6L1XFlNUPwYKymvgACL10FPbCYJT12zRgnFbyxaVFE/7lOD459P6d/8Bhs9x6sTqrJgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.delete,.x-button .x-button-icon.x-icon-mask.delete{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGcElEQVRoBdWbzYscRRjGexY1EPK9u9mVoJH4cVBPCYR8mB0IbkISyB/gOYIeFSUQQaIX8eBBDKuCsBFFxJuieFCMEb9RiZrcxKOgB7+i0RjN+vwm9Q41Nd0z1d3Vk9mGh6rufut93l93dc9katNaWlrKymytVmuD4mek7zX2YpmxqWJVwwrl2iL9qBp+LpN3okywjNYo/qh0Sjqi/ZVlxqeIdZ5HXA1HXU3xqbnDMVJGYJ+UzktMi1+le6VrY8aniMHLeeJNDdRCTWti88fCTirpSemChJHpT/Uflq6LNawah4fzwtP8aanppDQZk3sosBJNS4tSCGumf+jcMWlFjGGVGHI7D7zM12+pjRqnh+UfCKwE66SXpL8k3yDsc/4+KfmdJqfLHVMDta4bBF0IrIFrpaeloqsaQvM83S8lgyaXy2nvjdAz3KdWal5bBJ0LrAGz0rPS31KYdNA+8Y9Jtac3OVyuKjVQ+2wedB+wAqekE9Iv0iC4onNMvUelytCMdTmGTeOiGqgdhqkQugdYAdzZBakqrBXAXXlCWhkaDttnjBtb9s6at7UwwNJzp7vAOsE3KKaCfcbZwKrtP8r1oBR9p4l1Yxhb1dcfBwtMG+xCd4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aHybY5vDsfizpwB4p9TLp68p5SwhXtE+sxJhU0JeUC6Y95tkF7tBn2SGd/FxK8VcAHyjPzVLP+qwZ57XEujGMrQsNAyyHfK8eYAfNM82bsw40KwJ3Sn1/teOb5/UZ48aSoyo0tcMwH3r0ATvogwrmzwWq/Pz6nsbdLpWGteIY63KQqyw0NVP7Qcvnt7nADpq1YZYzeA5iTV9T7I1S9DT2i/H75HC5yBnrT63UXLhGXAjsoNsafFaKudOvKG6zVBvWwMnlcpJ7GDQ1Umvbxue1A4EZoO2wSzToc/ptxdwgJYO1YsnpcuNRBE1twB62cUXtUGAHzTN9TsqDflPHb5OSw1rR5HYeeIXQ1ERtuc+s5bA2CthB80yHn9P8pDIrNQbbLfQKNF54GjTPLDUVPrM23tpoYAe9S8k/kjB6VdoiNQ7bLfYKNJ54UwO17LLzMW2nWA2K3vQ/we5S8N0SL5LvZHI5enCCQPnzkcU3snukd+X/YZm0/wPdHqnTTpY+CgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.organize,.x-button .x-button-icon.x-icon-mask.organize{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEdUlEQVRoBe2aS2xMURjHjbbqUaLoI7RChQUiGo9YaEqkoolIkCASSki68dixsLIVYmHbkJA03UgkFRI2QgRBKl4RgtJFK0jUI+o5fv/p68ztmUlHzpzO9PZLfjP3fOfcO9//fOeee+69E4lGo6PCZKPDJFZaQyc4N1mGI5FIMfUVkAfZMPaVwE54yqn6i+8BllQwravgAEyEv5DppsQ8gYPw3hqsJi0bNJ4El0GZzSa6iHcbjLbpsp7DDGX5V8ByyDbLJ+CdUGQLPNGQnkzj3TDFspN68BNkwhDPIY5poG/T1lBYR+LOkuW4uSeR4KXssN48grF9h20NdeukYLRL96Y6vAD2wCwwbQyFvXARPpoVA85fKnXiN4HtvP2Gf0tPG3XWUKNYT4E6PxjvD3x1EDHPZZvgxTTSDBc8gMrKbql5gKHeJh7N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GbpzOHSC/wHSRhVOrpN3ggAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.refresh,.x-button .x-button-icon.x-icon-mask.refresh{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAG1ElEQVRoBc2aa6hVRRiGO17yrmloWpqhllH2wyKSEIsIo8QorLSbqVRgJd3DyFAQIyIiKQz61cUgpB+B0EWii4VkGFRUJpWKphZaaVZeutjz6FmwOnuvNbPWXvvs88HD2nvNzDfzrpn55tvrnLYjR44c1wpra2vrRr8jYC9j+KOzxmCnrTL7ng2LEN+rswbRSsH/ItL+Fwqij+8M0a0UrD5Fa0vg2c4Q3WrBik3sVj480WzRXUlwG4Lnw9OI7p08haqvXUmw2tzH8+AhRPf1RtXW1QSrz4i9CJYjepA3qrSuKFh9PeEWcE9XOtMtE0yyYYROojQfa0zRc8GZ7l9TWvJGj5LtCjdj0AYll6uD90HLQMizZKZ70vzOKjKypgpmkONQMxpGwWlwAvg9STLG8jlkip4FO/H3GKJ/DzXIK2/DQV554TIGdQaNpsNkmAAjoYpj5i/8rIIFjPlXruVMwY1Czy7X8+Al+B4OgU+yag7i0wjereyYqxDrDD4Ku6FqgfX87aGfR6BPGdENCabTqfAh/A31Btesez/T32LoXVR0KcF0NByeBPdSs0SF/Nr33VBIdOEoTVDyKFkCN0OlSQH+Ys2HsReMF66ueCuyJPDqzD4HvqEIzUCzyk1WtsAcKBy8opc0zgfBU+A52CwxIb+K3Qw3FJmodN0owXTgseNxsA9Cg2pm+S76vyktoOjn2D3sfjVAhFJBqmSax8km+BZ2gBnUlXAmhMyH+B3cj8DVocq55aEnROOJsB7MdIrOnnt9DVwD48G3lAPAB21evRRCPl3G22FaaKwx5blLmk4c2DNQdN+aaa2DKdAvayCULYQ8wYnYhpZxuv+QYGf3a/gnMLD0oH+h7mIYnO6o42fK/bX0MKTbpj8nYmd1bNvI98w9zHnbh8FcDSPBwcWYe/ReWMOgfEhlTbH6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Hl5jI6jWqIrHpuFl3F+oAuJ/pGxzIXoP4znRumODwPHI+BFcFm2eoZ907IEBnQcZ973QoJ1hLnnXoBWiXYZ74D50CtPXL2ywoLbRRtwloKBqDNnWrEGvOugVEZXSnC76O506o8GX8QbKZst3KPnTTi33szF3istOOmAAZgVrYBm/SeeD/MruAf6Jv2WvUadw3QUNM5q30ZcCrNhDMT8lKNapil0LayCtxG4JbNmgYLKBNsnortxccbPh+lgBuUvnlhzW3iumpaaofkzbzvXyqxSwelRIb4f3w1u58AlMA6GwNkwGEwhN4PZl0vWWLABDEr7EVr3BzxlDdl/zhnCj3tOo0oAAAAASUVORK5CYII=')}.x-tab .x-button-icon.reply,.x-button .x-button-icon.x-icon-mask.reply{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAES0lEQVRoBe2ZSWgUQRSGM24YTdSo4AYRTcxBEZJDJCoigrtGg6CIgihqogfRgEERguhB40UP6kHw4kEET4J4E9wPAdeg4ALigjuKcSMuMX7/mAmdSU/SXdM9PTPpBx/T3al67/31urq6K5G2trac3mR9epNYaQ0FZ3vFwwqHFc6yEQhv6SwraBc5YYW7DEmWXUhZhSORSC7UwKIgxzAlghE5CZFHoAEKgxTcz8/gCI3gfzHsh6l+xnLq2zfBaC0miXpYDvmgu+kXBGqeC0aohK2D7TAF+kPamKeCETseZdugGgZDSp4RxHFsnghGqKo4H/aB5uoASEtLWjBiZ6KsFlaAHlJpbUkJRmwl6rTcFKW1SktyRoIROhofdbARhlr8OTkMdBPNlWCE6iG0AA5AqRN1Nm1cxbTpn9Qlx8ERO4pIG0Br6yDDqH3pV4kvPdRewCd4C+/ZPdWx7xZxsk1LgqvIZDeUeZzRT/xJ8Dt4BQ/gGjSSVzO/3psEJ4JoY+A4fATNvVTwhjh34RSshMGJ8jO5biuWIJqrc6AJ/kIqhNrF+EFs3fqHYRoMMxFp7dNFME5Hwi5QMLskgrqmgb8M+hgZYRXh5riTYBxpFM9CUKKcxlWOSyHPjVi1jQqmYy7shQ/gNGjQ7f6Q6yWY7UY07XNK4CK0QtAiTOK/J29tLOQ7EU67nIGgtfU1mARMhz6a3zegtCfRHXOYxhXtndJBgGkOT9FQ1Z3oDsFqhBXAFngJpkGD7veN3NclEt1JcKwRHaaD3niCTt40vh6+q2N6rL+2gtUA03p8FL6AaeAg++ntsNwqNqor/kL8OZ2WgF71vEpeq8FvC36uDveJM8qqyenHwzg67oE1MAxMTeLOQyNod0SDqO2hCaDVIma6u3R9OAxq/9WxW9PT+wRsQ7RiE7Gbj4f4v9F8Fujxb1ptfR2tj/cbf04bfbbqZWgsFEM5LITNcBLc3HF6iM2IxXAlWJ0wJXEQfoFb4RJcEwtu8kv/PCiEGdAAevFQJbvL5Rh/j351uRbcLloVmA83ewgUn0TSgq2DRGzloVt9E9yDFoiPqfOvUBHN3erA7TFOtG6fBqdfVp4KtuZLDqr8DrgDdqIPcb2/UYXjAmmu1cLDBIGswX0THMuJHIrgDGglsMZu4nxI0oItgcbjUHP7MyRaanwXrHywvlAFj8E6v+dqZ8MTI9BzHO2DtaC9KY1wIEYurXCO4JrbjyA6CvzO80wwznS3tMAFDpfBKdArnkY4ECOXqwTWUqZvA1mJp4L/+4wKf8ZxDeyE26AlLBBD9HUC14GWr8mezWEc2/oiiNZM/TumGbRLkdQ6nChOT9eJWw3ffakwjjuMRF5wUg9b4QnE5hOHKTVNsSuO3qW9SosN/Yn4KmAQbnnl040f4pelVLCb5Pxq6/st7Vfipn5DwaYjlyn9wgpnSqVM8wwrbDpymdIvrHCmVMo0z15X4X9rh8wHLEjawQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.search,.x-button .x-button-icon.x-icon-mask.search{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bqKhiUavbVZdo0LCyLl3iHhGEkkZsKBYJX4RISHwQIYIPNJoQlU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w8Xl9DuGKaGbSNqbsrNCpuIX+YaFq86KfDuuA97AnorPl2Lju51TkTXoe6Dy8GyFm6CLwdysSJ0EH5CfwFZEqTNwNVO5+CtcjymRpKfDsY1UlI+6NZaiZ19CyYhhHey6WCv0egdDf4a2RKfiDzPVgI78OczvAD+mjphKYdjtmSRwMqPh1/VTWHz8g/AZK/Wcfto7MfzIO8thy0B+M6VccLHaZzD6aXQEPyjDTfc8CtcQD0eAWRtwdMBWevqB1n0FkdVbWjob2i7+GBdHwpnAZrQj3yPUoLQKMXwXowEhy4wVCPOLjT4AKMtL1qJXieDellEvgzS9GMrKgyz4ZTszZVkU4uaTobBrPB19CKcqqoXZf2fBhdhZNxGz0cphOvm5uhbL8VGVxFmYP9BAyMDW41nrpqDqGT8ZB3bVC0UsQfJfYGr73KJOXwLrS+QQM9NHo3NqLvw2hcA7aUqqYcdu/6ovG0LJM5KNwBX4LLuEz8Geh28OebMrE9T/p7yhQbKk/tCRrw55eXwaddaj/6a8VMGAP+93AyeBendOO85zr1hxNOA5+McXmIuwr8ifaklH2t5PU4tEJjdDYWfCdnHx1zyTsG1lAX6YAzIc/44ITh/epHffhQ8feqWEdnXWGTgl6VYa7Dnc7sQ8fvgiems3ov+M7u9poifSh4d8aGp+JXZ42nzibgP7eXgM5+CuOzelWlCx3udNqZvgGOg+QVQb467mMNTjlqnl87J6cMJ9+zZH+4BfZN6VSVV+pwPR1hpA+VNyFvz+vwJ7B3Pe2tSJ3UKY1dDctX1PBzTsfyxGeq26NXpRKHmZGleOEV4pLOk4Xo+XrrVfFir0r8bh4EG0E8057i3r8eTL0u/wJCZSL2DoplLgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.star,.x-button .x-button-icon.x-icon-mask.star{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz/Ujv+2mZRGZB7W6mtpFikC7+UWUZiqBD0JPFdRL1EMFPfjo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ZzhikXqsMGe51+jKcHzKcMUi9Vhky3Ov0ZTg/ZDhjkHqtMmS41+nLcH7IcMYg9VplOWY4/Md88cEtHbDOVg5Xx9jpsM9Yx52JeAcw1ontTXRdcm9pFz3vBveHdNJN6YPVRhrnivtMlruZ5g7DFxBuXLut8j7sA/d43Yr5CIpJsYAJ7DN2/27Bsw1gwAb3I8wLOp+g4w6+nw/6HddOyszqWDg/Qv2bXFwH4+1SyhyUYtI1YLc85wXn/ORAagWdPVRKUqh3AJwtdTLeWq2rbCoP76cm3bjeLG6ELjZim03XJujyJqXF6rtmeDvGNzMN/ajEAZi2rKOD67t00jVgN7+3dnFgqdsu5XRc6tiS/eUGvBTTNengBIVZPuYG7LcYPjdluYk++bTw++pGyQ34bSy9B35Vs5zEYGfgJfg+x7H/ADoy2VfnrtXoAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.maps,.x-button .x-button-icon.x-icon-mask.maps{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADl0lEQVRoBe2b24tNURzHjfutXEPycDAltwhJbuMSJUqSB/HiES/+AK9ePc6T8uCFkImQW5KGkdwSxYyMGkZu45bbDOPzyZyTrJnjnDkGrVm/+szas2bv397f33ftPS+/Vdba2toj5igj0NcfRkG/3qWIJdcIrs/AO6gDq7cKPkOjUNAmxr8ePJsix8NUWAvLoapowSQawIUzYCZUwAqohF3QAjtgGTyCy5x/nfEu1MNDCmAxuiS4Vy8ST4DZMB9WwiTIRUGC26q1gKtWwyyYBsPB5aLIL5CNTxzotDeWTeA5DUKuO4xXoQbxHpcUbSIzJFkDi0EzdLYnBNGuYJJ4ch+YAhvB5TAORsKvib4x97vwPpk2FjJuhibu85zxAlyCangBLRQib06u68t5vk4uVYVqgO+oqy9v5ASTRLd0LQNLYB24bAfBnw5zikX0HtuhGW5ANY9ylvEBvIY3FOArcz7rWHCpboBFMAxyGjguKIZy1jzYCqfAD5BLslB8J3dCP/AdOgo+fKHXd3Sebh+EctCMieBK6Oj8QuYrXZ7roQr88PiSD4b/IVyyfhB9jQy/uppTUijYhANLytJ1F/sxzL7POpg97vQdFfwVTNYtQsHdKpLg2O1ODieHI6tAWtKRGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbCI5HJmhgZzkcFCSyCaSw5EZGshJDgcliWwiORyZoYGc5HBQksgmksORGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbKLbOVx0r3E7httIbttwNvzddt//JWxIfQynYX8pgu2TbgBbjw9Ds53sNHJv49gOehu5bUe2DfjXojDVpWG/9iu4CEegBp7xfO+LFfyGC5+AiQ7BFXj/c8s+xw+Z24PwvYwKnQxLoQLccGEB7Hsu9t5ckjcU2QjuozgA5+Apz9PCmItCbvqWs2vhJpwBl8ZrEuVtOebPtiWLbf2ymyL0ZVT8XJgDbgHIgFsPOhPmr4d7oAnHue9txg6jI8EfueIaHIOrcAuafieSc/IG19vw7TYD6UEBbE4vhwxMB7cizIYhYPT6MeR+WjBFPoCToEgF1hb6bD8LNpHLwT0L56EOGkhUchc6edoNcruvQWoQ7/6GMTAa3E2zACxGNjRhH9wHV4zP9oGxqCjj7C0wA06Ay/YliRT/T4MCuGnEfQ4feJ5mfvdfaG+OXSWdju+VpAoIK3D9tAAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.locate,.x-button .x-button-icon.x-icon-mask.locate{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIDklEQVRoBe2aaaxeQxiA3eqCltpLkWotLUUtsUuJrbUFtSSaiIjljz8kQhOJiAQRQYREYvmFSPrDFiSExFpL49JSS6u0Re1bLUVRz3N7ph1z53zfud8956sf3uS5s7/zvjNzZuac7/asXr16g25IT0/PKPrZAfaFXWAMvAEL4GNYgS1/EjYqPU07jKNb4sGZcBocB0MhlYVkPAgPYM+itLDWtA43BYY6m7PBZVSFXuqd2ZQ96m3S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XOoDkRVUfh/cKX3mloM76u0QdOmA1793wSW7G0yEKTAcBiIOnndzLxvev/OSjkCappVL6hlw9NqN8PoqX4Vt3s/Hp/an6ewz3K/SmhvNDSj86T/otDZp25jU7ly6ksM2RIbADHgFBvJcNTXrOvpCYdOQnHO5vMoOh8Z0sA1cDi9Cq3fSphy1z2fhYsjuxMHWXNhy00JhqbCheWtyJ54Ox8D+0KT0ovwp0NmXcMYjc8DSscOhJxwfRnxHGAfHwQFwBIyEwcgvNNY5HyHxHF6Kox5rHcugHY57xnnPWS8t4lHmIHjEeNyMBXf67WACeJNbDH+Ag+ax5fE1D5YWcd/cVuKkR04t8g94XuILUVeybgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.home,.x-button .x-button-icon.x-icon-mask.home{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEK0lEQVRoBe2Zy28NURzHe/vwqEepYkFIQzxWaCOC2HhELEgQImhXIrqyIEXikVQi+gdIwx9AItg1NiJELMSGhKQbobY2VY9Srfp8m5lmTO/cOXN7Zu656f0ln8zMnTNnft/z+505j5sbGxurmk5WPZ3ESuu0E1xbigjncrka3jsbftClIvsU5RZ65aLK5Lj/C75SzSjHWCuJYLxqhPXwBgYhylq4sRaixChDP8EzGIJ4UwNnCR6tgFswANegKer93LsLim4herm/JKqO8O+ZRdhL42acOwunYAacg2Hu3ePYj3Ph1A1fU2ySmZSZeCiTjxaC1LAboRs6QGJl8+AKXIU1kLqlHmHEqlFboQv2gD40QdPHqx3qKdtJkD8Hb9o+TzXCXmT1cboB+cT6evTVPgIXeWYl6DoVSy3COF2Hx0rjTthp4L0a/4xXrofn33OeqH8avKMqFcE4O4uXb4ULsNfEEa+M0v00LIIuCKc/P03NrAtGrD5Iiuh10Dia1JTOR0EZsjjpw3HlrQpGbD0v3AzFig36e4CLkeAPNs6tCUbsHBxS+mpsLSayYT2KtLBqVgQjdgFe7QP1u9VWPbRc2ZQFe2LV5zSBWG7ZP+vVTUkwYhvx6DicB+fFqvWKFuyJ1QxJ00It48rCNNgnNi+N23hQaVw2YiU0cYQRq9Q9CJdBKV1q02zMeEaWSDBil1L5JTgBDeCCzcUJ8cXImfACOeqayjbBffgDfqu6cPyJP3dgVZTvwd9jdzuoSFmgicRDGAYXRIZ9+I5fPbA6KC7feUHBVKD5rJZ1EutaZMOiv+HjbWjJJ9T/LVIwDyqyh+ApuC7WFy/RCk4r5HyRwWNewRSW2N3wGv6CX2E5HBWcB9AaFOqfTxJMQa1lNewosqNQDiLDPmqv+hFsgzpfrI7/CeamVjwnQZEtV7G+eEX6MeyHGl/0hGB+1MJdYt+B/1C5H9UdX8J2qJ6IMBfz4Ri8hXIXGfZfmdoLWr5W1zJ7ktg2aId18BuiTHNvDVUumQSNxDikLSdtBzdok0yCD8MyiLNmCqhxXBL9An+egNI3yqRT9z+O92FO/O2UuOMuymoqF06bUl53489MQw21Gm8lWmkRa6R/oVaMfT6lAmrsUVMNRa2HU3I8k2orgjNp5hK+ZLwPp/x+fR+0ONfMp9BfJ+qLmulpyze1zMtC8AACbkI/xAneQZkO0JiZimUheAjPn0MfxAnWVo3RiEG5oiwLwXJsmGFDK5iCxrCnGZNSOzVLra+EPDZ9T6EMCFVZ3KWpI8XV7uBTFcEOBsWqS5UIW21OByurRNjBoFh1qRJhq83pYGWVCDsYFKsuVSJstTkdrGz8L0VTv1i+NVF2CyTJDC0LX7E8HIx7D/Vrb3wDaLvY1D5QsI/6jXZUEwk29cDlckki5bIOY9+mneB/GfbU3e4Ey5kAAAAASUVORK5CYII=')}.x-button.x-button-action,.x-toolbar .x-button.x-button-action,.x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round,.x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small{border:1px solid #002f50;border-top-color:#003e6a;color:white}.x-button.x-button-action.x-button-back:before,.x-button.x-button-action.x-button-forward:before,.x-toolbar .x-button.x-button-action.x-button-back:before,.x-toolbar .x-button.x-button-action.x-button-forward:before,.x-button.x-button-action-round.x-button-back:before,.x-button.x-button-action-round.x-button-forward:before,.x-toolbar .x-button.x-button-action-round.x-button-back:before,.x-toolbar .x-button.x-button-action-round.x-button-forward:before,.x-button.x-button-action-small.x-button-back:before,.x-button.x-button-action-small.x-button-forward:before,.x-toolbar .x-button.x-button-action-small.x-button-back:before,.x-toolbar .x-button.x-button-action-small.x-button-forward:before{background:#002f50}.x-button.x-button-action,.x-button.x-button-action.x-button-back:after,.x-button.x-button-action.x-button-forward:after,.x-toolbar .x-button.x-button-action,.x-toolbar .x-button.x-button-action.x-button-back:after,.x-toolbar .x-button.x-button-action.x-button-forward:after,.x-button.x-button-action-round,.x-button.x-button-action-round.x-button-back:after,.x-button.x-button-action-round.x-button-forward:after,.x-toolbar .x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round.x-button-back:after,.x-toolbar .x-button.x-button-action-round.x-button-forward:after,.x-button.x-button-action-small,.x-button.x-button-action-small.x-button-back:after,.x-button.x-button-action-small.x-button-forward:after,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small.x-button-back:after,.x-toolbar .x-button.x-button-action-small.x-button-forward:after{background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692)}.x-button.x-button-action .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action .x-button-icon.x-icon-mask,.x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-button.x-button-action-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dbf0ff));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dbf0ff);background-image:linear-gradient(#ffffff,#ffffff 2%,#dbf0ff)}.x-button.x-button-action.x-button-pressing,.x-button.x-button-action.x-button-pressing:after,.x-button.x-button-action.x-button-pressed,.x-button.x-button-action.x-button-pressed:after,.x-button.x-button-action.x-button-active,.x-button.x-button-action.x-button-active:after,.x-toolbar .x-button.x-button-action.x-button-pressing,.x-toolbar .x-button.x-button-action.x-button-pressing:after,.x-toolbar .x-button.x-button-action.x-button-pressed,.x-toolbar .x-button.x-button-action.x-button-pressed:after,.x-toolbar .x-button.x-button-action.x-button-active,.x-toolbar .x-button.x-button-action.x-button-active:after,.x-button.x-button-action-round.x-button-pressing,.x-button.x-button-action-round.x-button-pressing:after,.x-button.x-button-action-round.x-button-pressed,.x-button.x-button-action-round.x-button-pressed:after,.x-button.x-button-action-round.x-button-active,.x-button.x-button-action-round.x-button-active:after,.x-toolbar .x-button.x-button-action-round.x-button-pressing,.x-toolbar .x-button.x-button-action-round.x-button-pressing:after,.x-toolbar .x-button.x-button-action-round.x-button-pressed,.x-toolbar .x-button.x-button-action-round.x-button-pressed:after,.x-toolbar .x-button.x-button-action-round.x-button-active,.x-toolbar .x-button.x-button-action-round.x-button-active:after,.x-button.x-button-action-small.x-button-pressing,.x-button.x-button-action-small.x-button-pressing:after,.x-button.x-button-action-small.x-button-pressed,.x-button.x-button-action-small.x-button-pressed:after,.x-button.x-button-action-small.x-button-active,.x-button.x-button-action-small.x-button-active:after,.x-toolbar .x-button.x-button-action-small.x-button-pressing,.x-toolbar .x-button.x-button-action-small.x-button-pressing:after,.x-toolbar .x-button.x-button-action-small.x-button-pressed,.x-toolbar .x-button.x-button-action-small.x-button-pressed:after,.x-toolbar .x-button.x-button-action-small.x-button-active,.x-toolbar .x-button.x-button-action-small.x-button-active:after{background-color:#0062a7;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #004474), color-stop(10%, #00538d), color-stop(65%, #0062a7), color-stop(100%, #0064a9));background-image:-webkit-linear-gradient(#004474,#00538d 10%,#0062a7 65%,#0064a9);background-image:linear-gradient(#004474,#00538d 10%,#0062a7 65%,#0064a9)}.x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm,.x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round,.x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small{border:1px solid #263501;border-top-color:#374e02;color:white}.x-button.x-button-confirm.x-button-back:before,.x-button.x-button-confirm.x-button-forward:before,.x-toolbar .x-button.x-button-confirm.x-button-back:before,.x-toolbar .x-button.x-button-confirm.x-button-forward:before,.x-button.x-button-confirm-round.x-button-back:before,.x-button.x-button-confirm-round.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-round.x-button-back:before,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:before,.x-button.x-button-confirm-small.x-button-back:before,.x-button.x-button-confirm-small.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-small.x-button-back:before,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:before{background:#263501}.x-button.x-button-confirm,.x-button.x-button-confirm.x-button-back:after,.x-button.x-button-confirm.x-button-forward:after,.x-toolbar .x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm.x-button-back:after,.x-toolbar .x-button.x-button-confirm.x-button-forward:after,.x-button.x-button-confirm-round,.x-button.x-button-confirm-round.x-button-back:after,.x-button.x-button-confirm-round.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round.x-button-back:after,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:after,.x-button.x-button-confirm-small,.x-button.x-button-confirm-small.x-button-back:after,.x-button.x-button-confirm-small.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small.x-button-back:after,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:after{background-color:#6c9804;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c2fa3b), color-stop(2%, #85bb05), color-stop(100%, #547503));background-image:-webkit-linear-gradient(#c2fa3b,#85bb05 2%,#547503);background-image:linear-gradient(#c2fa3b,#85bb05 2%,#547503)}.x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-button.x-button-confirm-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #f4fedc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#f4fedc);background-image:linear-gradient(#ffffff,#ffffff 2%,#f4fedc)}.x-button.x-button-confirm.x-button-pressing,.x-button.x-button-confirm.x-button-pressing:after,.x-button.x-button-confirm.x-button-pressed,.x-button.x-button-confirm.x-button-pressed:after,.x-button.x-button-confirm.x-button-active,.x-button.x-button-confirm.x-button-active:after,.x-toolbar .x-button.x-button-confirm.x-button-pressing,.x-toolbar .x-button.x-button-confirm.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm.x-button-pressed,.x-toolbar .x-button.x-button-confirm.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm.x-button-active,.x-toolbar .x-button.x-button-confirm.x-button-active:after,.x-button.x-button-confirm-round.x-button-pressing,.x-button.x-button-confirm-round.x-button-pressing:after,.x-button.x-button-confirm-round.x-button-pressed,.x-button.x-button-confirm-round.x-button-pressed:after,.x-button.x-button-confirm-round.x-button-active,.x-button.x-button-confirm-round.x-button-active:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-round.x-button-active,.x-toolbar .x-button.x-button-confirm-round.x-button-active:after,.x-button.x-button-confirm-small.x-button-pressing,.x-button.x-button-confirm-small.x-button-pressing:after,.x-button.x-button-confirm-small.x-button-pressed,.x-button.x-button-confirm-small.x-button-pressed:after,.x-button.x-button-confirm-small.x-button-active,.x-button.x-button-confirm-small.x-button-active:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-small.x-button-active,.x-toolbar .x-button.x-button-confirm-small.x-button-active:after{background-color:#628904;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3e5702), color-stop(10%, #507003), color-stop(65%, #628904), color-stop(100%, #648c04));background-image:-webkit-linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04);background-image:linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04)}.x-button.x-button-decline,.x-toolbar .x-button.x-button-decline,.x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round,.x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small{border:1px solid #630303;border-top-color:#7c0303;color:white}.x-button.x-button-decline.x-button-back:before,.x-button.x-button-decline.x-button-forward:before,.x-toolbar .x-button.x-button-decline.x-button-back:before,.x-toolbar .x-button.x-button-decline.x-button-forward:before,.x-button.x-button-decline-round.x-button-back:before,.x-button.x-button-decline-round.x-button-forward:before,.x-toolbar .x-button.x-button-decline-round.x-button-back:before,.x-toolbar .x-button.x-button-decline-round.x-button-forward:before,.x-button.x-button-decline-small.x-button-back:before,.x-button.x-button-decline-small.x-button-forward:before,.x-toolbar .x-button.x-button-decline-small.x-button-back:before,.x-toolbar .x-button.x-button-decline-small.x-button-forward:before{background:#630303}.x-button.x-button-decline,.x-button.x-button-decline.x-button-back:after,.x-button.x-button-decline.x-button-forward:after,.x-toolbar .x-button.x-button-decline,.x-toolbar .x-button.x-button-decline.x-button-back:after,.x-toolbar .x-button.x-button-decline.x-button-forward:after,.x-button.x-button-decline-round,.x-button.x-button-decline-round.x-button-back:after,.x-button.x-button-decline-round.x-button-forward:after,.x-toolbar .x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round.x-button-back:after,.x-toolbar .x-button.x-button-decline-round.x-button-forward:after,.x-button.x-button-decline-small,.x-button.x-button-decline-small.x-button-back:after,.x-button.x-button-decline-small.x-button-forward:after,.x-toolbar .x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small.x-button-back:after,.x-toolbar .x-button.x-button-decline-small.x-button-forward:after{background-color:#c70505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fb6a6a), color-stop(2%, #ea0606), color-stop(100%, #a40404));background-image:-webkit-linear-gradient(#fb6a6a,#ea0606 2%,#a40404);background-image:linear-gradient(#fb6a6a,#ea0606 2%,#a40404)}.x-button.x-button-decline .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline .x-button-icon.x-icon-mask,.x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-button.x-button-decline-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #fedcdc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#fedcdc);background-image:linear-gradient(#ffffff,#ffffff 2%,#fedcdc)}.x-button.x-button-decline.x-button-pressing,.x-button.x-button-decline.x-button-pressing:after,.x-button.x-button-decline.x-button-pressed,.x-button.x-button-decline.x-button-pressed:after,.x-button.x-button-decline.x-button-active,.x-button.x-button-decline.x-button-active:after,.x-toolbar .x-button.x-button-decline.x-button-pressing,.x-toolbar .x-button.x-button-decline.x-button-pressing:after,.x-toolbar .x-button.x-button-decline.x-button-pressed,.x-toolbar .x-button.x-button-decline.x-button-pressed:after,.x-toolbar .x-button.x-button-decline.x-button-active,.x-toolbar .x-button.x-button-decline.x-button-active:after,.x-button.x-button-decline-round.x-button-pressing,.x-button.x-button-decline-round.x-button-pressing:after,.x-button.x-button-decline-round.x-button-pressed,.x-button.x-button-decline-round.x-button-pressed:after,.x-button.x-button-decline-round.x-button-active,.x-button.x-button-decline-round.x-button-active:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressing,.x-toolbar .x-button.x-button-decline-round.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressed,.x-toolbar .x-button.x-button-decline-round.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-round.x-button-active,.x-toolbar .x-button.x-button-decline-round.x-button-active:after,.x-button.x-button-decline-small.x-button-pressing,.x-button.x-button-decline-small.x-button-pressing:after,.x-button.x-button-decline-small.x-button-pressed,.x-button.x-button-decline-small.x-button-pressed:after,.x-button.x-button-decline-small.x-button-active,.x-button.x-button-decline-small.x-button-active:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressing,.x-toolbar .x-button.x-button-decline-small.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressed,.x-toolbar .x-button.x-button-decline-small.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-small.x-button-active,.x-toolbar .x-button.x-button-decline-small.x-button-active:after{background-color:#b80505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #860303), color-stop(10%, #9f0404), color-stop(65%, #b80505), color-stop(100%, #ba0505));background-image:-webkit-linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505);background-image:linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505)}.x-sheet,.x-sheet-action{padding:0.7em;border-top:1px solid #092e47;height:auto;background-color:rgba(3, 17, 26, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(20,104,162,0.9)), color-stop(2%, rgba(7,37,58,0.9)), color-stop(100%, rgba(0,0,0,0.9)));background-image:-webkit-linear-gradient(rgba(20,104,162,0.9),rgba(7,37,58,0.9) 2%,rgba(0,0,0,0.9));background-image:linear-gradient(rgba(20,104,162,0.9),rgba(7,37,58,0.9) 2%,rgba(0,0,0,0.9));-webkit-border-radius:0;border-radius:0}.x-sheet-inner > .x-button,.x-sheet-action-inner > .x-button{margin-bottom:0.5em}.x-sheet-inner > .x-button:last-child,.x-sheet-action-inner > .x-button:last-child{margin-bottom:0}.x-sheet.x-picker{padding:0}.x-sheet.x-picker .x-sheet-inner{position:relative;background-color:#fff;-webkit-border-radius:0.4em;border-radius:0.4em;-webkit-background-clip:padding;background-clip:padding-box;overflow:hidden;margin:0.7em}.x-sheet.x-picker .x-sheet-inner:before,.x-sheet.x-picker .x-sheet-inner:after{z-index:1;content:"";position:absolute;width:100%;height:30%;top:0;left:0}.x-sheet.x-picker .x-sheet-inner:before{top:auto;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;bottom:0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #bbbbbb));background-image:-webkit-linear-gradient(#ffffff,#bbbbbb);background-image:linear-gradient(#ffffff,#bbbbbb)}.x-sheet.x-picker .x-sheet-inner:after{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bbbbbb), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#bbbbbb,#ffffff);background-image:linear-gradient(#bbbbbb,#ffffff)}.x-sheet.x-picker .x-sheet-inner .x-picker-slot .x-body{border-left:1px solid #999999;border-right:1px solid #ACACAC}.x-sheet.x-picker .x-sheet-inner .x-picker-slot.x-first .x-body{border-left:0}.x-sheet.x-picker .x-sheet-inner .x-picker-slot.x-last .x-body{border-left:0;border-right:0}.x-picker-slot .x-scroll-view{z-index:2;position:relative;-webkit-box-shadow:rgba(0, 0, 0, 0.4) -1px 0 1px}.x-picker-slot .x-scroll-view:first-child{-webkit-box-shadow:none}.x-picker-mask{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3;display:-webkit-box;display:box;-webkit-box-align:stretch;box-align:stretch;-webkit-box-orient:vertical;box-orient:vertical;-webkit-box-pack:center;box-pack:center;pointer-events:none}.x-picker-bar{border-top:0.12em solid #006bb6;border-bottom:0.12em solid #006bb6;height:2.5em;background-color:rgba(13, 148, 242, 0.3);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(158,212,250,0.3)), color-stop(2%, rgba(47,163,244,0.3)), color-stop(100%, rgba(11,127,208,0.3)));background-image:-webkit-linear-gradient(rgba(158,212,250,0.3),rgba(47,163,244,0.3) 2%,rgba(11,127,208,0.3));background-image:linear-gradient(rgba(158,212,250,0.3),rgba(47,163,244,0.3) 2%,rgba(11,127,208,0.3));-webkit-box-shadow:rgba(0, 0, 0, 0.2) 0 0.2em 0.2em}.x-use-titles .x-picker-bar{margin-top:1.5em}.x-picker-slot-title{height:1.5em;position:relative;z-index:2;background-color:#1295f1;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a2d6f9), color-stop(2%, #34a4f3), color-stop(100%, #0d81d2));background-image:-webkit-linear-gradient(#a2d6f9,#34a4f3 2%,#0d81d2);background-image:linear-gradient(#a2d6f9,#34a4f3 2%,#0d81d2);border-top:1px solid #1295f1;border-bottom:1px solid #095b94;-webkit-box-shadow:0px 0.1em 0.3em rgba(0, 0, 0, 0.3);padding:0.2em 1.02em}.x-picker-slot-title > div{font-weight:bold;font-size:0.8em;color:#113b59;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-picker-slot .x-dataview-inner{width:100%}.x-picker-slot .x-dataview-item{vertical-align:middle;height:2.5em;line-height:2.5em;font-weight:bold;padding:0 10px}.x-picker-slot .x-picker-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-picker-right{text-align:right}.x-picker-center{text-align:center}.x-picker-left{text-align:left}.x-tabbar.x-docked-top{border-bottom-width:.1em;border-bottom-style:solid;height:2.6em;padding:0 .8em}.x-tabbar.x-docked-top .x-tab{padding:0.4em 0.8em;height:1.8em;-webkit-border-radius:0.9em;border-radius:0.9em}.x-tabbar.x-docked-top .x-button-label,.x-tabbar.x-docked-top .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-top .x-badge{font-size:.8em;line-height:1.2em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tabbar.x-docked-bottom{border-top-width:.1em;border-top-style:solid;height:3em;padding:0}.x-tabbar.x-docked-bottom .x-tab{-webkit-border-radius:0.25em;border-radius:0.25em;min-width:3.3em;position:relative;padding-top:.2em}.x-tabbar.x-docked-bottom .x-tab .x-button-icon{-webkit-mask-size:1.65em;width:1.65em;height:1.65em;display:block;margin:0 auto;position:relative}.x-tabbar.x-docked-bottom .x-tab .x-button-label,.x-tabbar.x-docked-bottom .x-tab .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-bottom .x-tab .x-badge{margin:0;padding:.1em 0 .2em 0;font-size:9px;line-height:12px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tab .x-button-icon.bookmarks,.x-button .x-button-icon.x-icon-mask.bookmarks{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHC0lEQVRoBe2aW4hVVRiAx8t4qXFMvGZGeLcblUVWdJEoiTIhI9KoHiIyKyh6SOvBh166vPTQQ2IXkKyIktIyLQzLUoMkSbKoVEwtK2+VZWrl9H3bs4Y1e/a5eDxzDsycHz7X2muv9f/r//+11p6zt91aWloaupJ070rO6mvd4c6e8XqGO3uGe5biYDck188y1LOGeuS3Hvs8AVrrWZ0LtUU27VbIbrCRlMVsluQwBptgHEyHS+BcGAxB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Od/Z01zPc2TP8PxKYOEKWmL1pAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.download,.x-button .x-button-icon.x-icon-mask.download{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGb0lEQVRoBd2aX4gVVRzH3V1dU5JMk9Q2wVxCo0QNTYRYS4l6CBFBomA1qjcjSOgPPUgR0VNBFBT0Bx96qAiSXipCH4rKIhGNUqE2SK3MqKwsLbXPZ7rnMo73jnPnzF6v9wefPefMnPP7/b7z58yZudtz6tSpMaNlPT09E/DdDxPhMpgNJyBtfTRG4AAchePk9BflqFhP1YIRqbCZsACWwjWwGIrYZ3TaDZ/ATjhIfh6IyqwywQhdRlaLYBVcB5Mgxn5n8HbYAjsQ/lGMs/pYz3AMOFLgG/AzeH+MBvo2xqqYXB1bSiyBe2EJvAaH4SSMhtC0T2MYy5jG7i0jvmXBBJoMj4D3VjuEpkVbN6axzWFyq6JbEkyAhfAqOJtmE2l32xzMZWErogsLxvE62As+Vtotrlk8czGndUVFFxKMw41wEM7FJdxMbNhuTua2sYjoXME4cVHwEDhZhACdWpqjufblCW8qmIHOxHfCT9CpIrN5mas5N53B8wS7kPgKOumezQrMts3VnJc1O8sNV1qsmq5k0LNwI3hZx9ovONgEPk4amcvRR+HiRjtb3KborbAB0fvOGJs9EnRwwf88HIHsESzbVuisbKzQdh/Yp6z/7DhzV8OEECOU3qd148z20FgDK+DC+o74in59Y2pm7rNPVWbualhT01T3e5pgts6D9eARrzIB3LXVzF0N60FNdasL5kj0sXUtzIf+eo/zt6IGtaytaUuU1AXTugKuhyomjsR5B/xRi5rUllgimCMwltYQzAHr3WJqUdNQTWOyuFDcpbASptnoMlOT2tQ4phfl3uBzwes9byZl93lpalLbXLV6SXtzr4BuPLvISkxtauxX8DjwW5Qv9t1qalPjOAX7vJoB3TRZIec0U5saZyl4ELr57CIvMTUOKngAqlxGJt478I8aBxQ8Hbpxds4eczVOV/BUuCC7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SgkMAgq4EZ0b/i3U0hevbGMZaGeKXKRv+cylOCxufY/xCcS3cCl5ii6AXqjCFeum+A2/D54j0Pbu0RQsOkRHu+6zP7avgJvDsz4VWxStyD7wPrsi+hP0ILfIbFl3zrTLB6TCId3KbCK6X58MSmAOuocW69jUcrmH9U9gF38NRRB6jrNT+AwkLDdxcvfCRAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.favorites,.x-button .x-button-icon.x-icon-mask.favorites{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz/Ujv+2mZRGZB7W6mtpFikC7+UWUZiqBD0JPFdRL1EMFPfjoU4baS0FUD/UWZBEVShA+BCpmWApRSkgllNpDmZWZt9//eOay72afvWfWOTPn3rvgz8yeWbPW+s/XmT379AwODtZSSQ+CryVgA/gVfIx/pelEhFMBVlvBOaBeFo6Cean8y09KsnMg932TqCOs9M2UhMfhMJVsxtHcAmcbmekLCsqjFKUkvAYG1xSwmEHZqoLyKEVJCDOCNxH9HUCbVl6mULAuXxjrOQlhgl8Bbi0h0Uen3FBS37GqVIQHiHh2SdR16jTlo0t0woycpuxiUDSdHcFeMv3uIWYanTDB3wIWVZBQHP10zuQKvbarUxDWT1HRz1E++Ds99fLtgp6jEmbExhPNcs+IbkZPiCpRCRP5TPCQJ4MJ6A3QSUqjSWzC2ozuC4j+fnSnB+gHq8YmvJKIJgVEpRPX9QH6waqxCa8PjEhHT981H2j6qno0wqzF63BhOUxsom3Zb7aJqGsUjTAONFJlpysXQz7VuXpavrBTzzEJaz1adlzNjHs6RTBvJyZhjZTF/kTaWZZCnlvhsyWgQkPZQpagzsX1bFlAXjGtDdAPUu1p3PPQhCCXkdwG/mta0PWLds060AuAnqtEOjpdbQR3VymX1P9F3UfgGJA9X9F92c/ADaQ2P8V0DJ4/kDbeYKaSvgI2AN0+OGJK1VAbSIhTOXEOybYll2kte77yD4rqrHyb85S9Cl4H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1wEOib66PAy5FPMD46+NPmqTV7CpwGGvkJPm2l8z8GWDNDloqpGQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.info,.x-button .x-button-icon.x-icon-mask.info{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHOElEQVRoBdWbXYgVZRjHXdf8ysjUQl011lbRIFEjM6Uu0iyiEDG86EItKoIuuhDJCgoioouugqKbgi4CKwulILG0mxLTUtMyTWQNPzLTPszU1cx+v+OZw9nZM3POmZl3zQd+zMz7zvs8z//MvF+z2nLhwoU+oaylpWUQvvvDYGiDdjgP1dbKRSccglNwlpxOcwxiLUULRqTCRsNUmAk3wS3QiG3hpp2wCbbDYfLzhyjMChOM0FlkNR3mw61wFeSxv2j8FayBrQjfmMdZpa1POA84UuD7cBzsHyHQtzHm58nVtpnEErgvzIB34Rj8CyGEVvs0hrGMaey+WcQ3LZhAQ+FZsG/1htBq0Z4b09jmMLRZ0U0JJsA0eAccTeOJ9Pa1OZjLtGZENywYx0tgDzit9La4pHjmYk5LGhXdkGAcLoPDcCle4SSxUbk5mduyRkSnCsaJi4IV4GARBSj6eALfR8sxunLEMUdzbU0TniiYho7ED8GvULRI/UV9cDbnrsauheXQCVnjmas5J47gaYJdSPwAIfqsPlfEnwRl/eBBOAlZROvXnGfFfUfXNQXTYCKsg38gS+B6bT6MEogfiTcKNuaIa87mPjHu2+segrnRBf8bYN+ql3jW+ntrJVNK6OJGw+VkVt+2M3c1DIrHsZ9WjPVwCxcLYQ4MqVQUf/Jjikt3VnnX4eauhoVlTZVw3QRTOhmWwjhQfCi7ppZjkjOf62FCrfomysxdDUtBTRWrCCZYK6WLYAo4aoa0JxKcu2x9CsYk1DdTrAa1LCpru9g2ese58lddD+cgT/9ppK2j8ONR7HLf9Um8B0XOCmpR04QoVmnQosDp4BHYD40kXMQ9zsPfgSI/hyNQhN+4j/34VVu/0g9b/nXbKFgJf0O8weV+rSa1tam1b3kUm0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Xic/FNbXVLLw4mNmfTuRMZi/tx8djUDYHPgAHlaSks5abs7mX/lrYI3a8ILqmwTB4G9xWZQ1uu7egHQbC/aBQR+88PpPamqs5D4t0xI89+nD1DTT0A9waOANJQeqVu+j4Ddx3u26vd3/WenM01zHVGuLnqYK9GXNeXg15RGcV0Wg7czPHjrjA+HVdwVWifRX/j6LNydzqii1pif8CSdc4HApPg0u1IqeQRp9i/D5zMBdzqjkT1NLS0BOOGuLYv+E6lWyFolZjcSGNXBvbHMxlQJRfI8emBEcOCeKo+xq4A+nNp20sYxq7PcqnmWMmwVEAgs4FR0Y32CGF69sYxpobxc9yzP3feMo7nJtJxDnWV2w6RPtsTnOZQn1118JH8A0ik/bWVNe33IKjEAh3qei87Ue5eeDTnwTNilfkbvgM1oHb1oMIdX2c2woTXJ0J4h3c3NyPgikwA9zjjigT7Xf3ce0XCfF8M+wAv3icQmQXx0LtP/qKurS9uZqyAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.more,.x-button .x-button-icon.x-icon-mask.more{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADJ0lEQVRoBe2YS2sUQRSFp5MgvmLU+CAMiBJFDBHcCeoPEFciuHMjroMK4lZBcONG0JW60U1UEgRx59IXuNMoKEElKL7GRwyIqNHxO0N66FT3UNU9IHRNFXz0VNW5t+vW6RcT1ev1Sie1rk4qVrWGgn13PDgcHPZsB8Il7ZmhqXKCw6kt8WwgOOyZoalygsOpLfFsIDjsmaGpcoLDqS3xbCA47JmhqXKCw6kt8Wyg6XAURV2wEy7BM5iFtzAKu2BB0dqJ7YEtcBYmQblfwzjshUVt5O4mfhjOwwQodw3GYA8snpd77n9pFXMYvoP+qDaZZewcVKXPAzE64Qn4CmZe9f/AFSiSu4e4IzANrXJfZ24gXjO/KxEcg9+QFZQcU/CSONh2RKsraMQhr85xE/psOeN5tCr2APyA5Bqzfl9D06tYtX3wC7KE5pg2ZX98UtsR7XZ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E+IUbX1f4AbOD2sUmrAMkLR6egHo3TWfcopGO0G9oG2ieR2t4lw92g0qIZ+iz0XzSVYjIrz4h5XtGkvqgagTmXeoFfJcb0+B/8ey5mETBNVjvClMhjjPViES1s8qy6AiKE5XnXPSCmqIE23rBsIK0PNYiIRcNn/E53jI6/08dsLem4DTcbADdMddQSYh0we6t6BeW9pIkxZOrIUJrS3Cm6EG7gJ9TE+qaFbXLP8BbOZm76mv4XonbAIg8ZacV0B/GAvDQRNdPkVfOvQe+znsJ1HXh/tY9hNL2OuV5PWu2hyqQZsIra/6FCO6gClapn6AU7AbtDfXxuUknCHRSxwTLf8Bgi31NJnvpzwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.user,.x-button .x-button-icon.x-icon-mask.user{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEWElEQVRoBe2aS0gVYRiGO1lmF8nQQlETutGFokAiqEV0ISKwgmrdMtzUpnW7drWKbFGbQAKpJIhuUGIUFUkW0T1Jq4V2U4ui7GLPexpDD+ecuX1jHqcPHseZ+f9vvnf++e8n0d/fPyZONjZOYqU1doLHRV3CiURCz5gMxTANJsJg+8XJJ+iBt9BHNdO1SCwRZR1GbAFRl8F8WAFLoRwGLME/ffAM7kETvIYPxPWDo7lFIhiheURaCVtgBywHXXOzbhJcggZoRvR7twy+76uELSEAtQsqySPwGdQN+KWDPHuh2DI2+TIVm3T455M9G0Bk6ktRvd4NBZaiTQUT3AQnSNW/VAFBzl/iZw0kq56FcOtuaQHB7QIv9ZVkrqZ2YA9Mck3pMYGZYKeh2sBz1SJb2mqcmfk0E0xQ6l9rwNoKcWjm11JwEYFVW6t1/K218mspeB5B5VsFluKnIuU88Kml4PGBo3DPqBGZiVkKNgvKRFkGJ5aCv2Z4xoi6bCm4DWUaXERhZhMJS8FfolDq+DSbRFgKjrIOa8poYpaCTQKK2sl/wSHfcFSNlll1sSzhn7ys3pAvLFP275lu+L1uKVhB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5GyCbSirCHstnQpcKulBXMK+o1frCPGgWAomwL2gLsm0z3S9ny38XARWgEXJOI7xNMiS9ns9MN5ZCQhEQ1lIGCOXmZf4ZeAW8C4IAblv3wBXAIn6sjkZ3Arc80FvGKW/nu4H/nhZDiR0IngI+LYPY3i43gWuAeNgFBQSn0UYJZejRH3CPQ8cMDi19Jp6AviuVfd48ADwRZXWG3Z9J/6fApeAJUm2TYRE02OZjPfA3WAM9HVDdvt2iXHI1HkoPQd2g7SjUHef+NyU7AXgFRD65qOcZrybQXgFmtUDIDu2xE3CBuCWWBxIU+8vk9MozdQukDUO3x4qm5IJOp36ZyW6waaJci/jrkviWEV9qiQOdd8Ebr/+T0fKkYvBp6AqOB2fnQz0SA39Kn9z6Z9mfPeze/UlUOXrB3Q2AW36a77KwP7tYCwh7Mupjk1TOmZuNInlyZqxuN8n3ItrQF1xryvRl9W/3Y3/60QGCTGF71h5JB0Tbn7vsDqyP6Vkva5dymxoVQ+lIE6+3+lJCH3Zcp+E78y2Fny7Evw7kstC8YA7BtQZRP1hiwTDKnuGun8aSiekaDxXwrbG/zOtaOT/ss3MLSjpCLc93V2Guwy3bAa6Jd2yhObodBnOTUnLGroMtyyhOTpdhnNT0rKGfwD3f6JVZi/xSQAAAABJRU5ErkJggg==')}.x-tabbar-light{background-color:#2583c4;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #97c9eb), color-stop(2%, #3495d9), color-stop(100%, #1f6fa6));background-image:-webkit-linear-gradient(#97c9eb,#3495d9 2%,#1f6fa6);background-image:linear-gradient(#97c9eb,#3495d9 2%,#1f6fa6);border-top-color:#2175af;border-bottom-color:#195884}.x-tabbar-light .x-tab{color:#c1dff4}.x-tabbar-light .x-tab-active{color:white;border-bottom:1px solid #278bd1}.x-tabbar-light .x-tab-pressed{color:white}.x-tabbar-light.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-light.x-docked-bottom .x-tab .x-button-icon{background-color:#6cb2e3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ecf5fc), color-stop(2%, #8ac2e9), color-stop(100%, #4da3de));background-image:-webkit-linear-gradient(#ecf5fc,#8ac2e9 2%,#4da3de);background-image:linear-gradient(#ecf5fc,#8ac2e9 2%,#4da3de)}.x-tabbar-light.x-docked-bottom .x-tab-active{background-color:#2175af;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #195884), color-stop(10%, #1d6699), color-stop(65%, #2175af), color-stop(100%, #2176b1));background-image:-webkit-linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);background-image:linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;-webkit-box-shadow:#1d6699 0 0 0.25em inset;box-shadow:#1d6699 0 0 0.25em inset}.x-tabbar-light.x-docked-bottom .x-tab-active .x-button-icon{background-color:#1da2ff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b6e1ff), color-stop(2%, #41b1ff), color-stop(100%, #0093f8));background-image:-webkit-linear-gradient(#b6e1ff,#41b1ff 2%,#0093f8);background-image:linear-gradient(#b6e1ff,#41b1ff 2%,#0093f8)}.x-tabbar-light.x-docked-top .x-tab-active{background-color:#2175af;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #195884), color-stop(10%, #1d6699), color-stop(65%, #2175af), color-stop(100%, #2176b1));background-image:-webkit-linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);background-image:linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);color:white}.x-tabbar-dark{background-color:#0e4b75;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #359ee7), color-stop(2%, #125f95), color-stop(100%, #0a3655));background-image:-webkit-linear-gradient(#359ee7,#125f95 2%,#0a3655);background-image:linear-gradient(#359ee7,#125f95 2%,#0a3655);border-top-color:#0b3c5e;border-bottom-color:#061f31}.x-tabbar-dark .x-tab{color:#63b4ec}.x-tabbar-dark .x-tab-active{color:white;border-bottom:1px solid #105483}.x-tabbar-dark .x-tab-pressed{color:white}.x-tabbar-dark.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-dark.x-docked-bottom .x-tab .x-button-icon{background-color:#1985d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #90caf2), color-stop(2%, #2897e5), color-stop(100%, #1571b0));background-image:-webkit-linear-gradient(#90caf2,#2897e5 2%,#1571b0);background-image:linear-gradient(#90caf2,#2897e5 2%,#1571b0)}.x-tabbar-dark.x-docked-bottom .x-tab-active{background-color:#0b3c5e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #061f31), color-stop(10%, #092e47), color-stop(65%, #0b3c5e), color-stop(100%, #0c3e60));background-image:-webkit-linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);background-image:linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-shadow:#092e47 0 0 0.25em inset;box-shadow:#092e47 0 0 0.25em inset}.x-tabbar-dark.x-docked-bottom .x-tab-active .x-button-icon{background-color:#50b7ff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e9f6ff), color-stop(2%, #74c6ff), color-stop(100%, #2ca9ff));background-image:-webkit-linear-gradient(#e9f6ff,#74c6ff 2%,#2ca9ff);background-image:linear-gradient(#e9f6ff,#74c6ff 2%,#2ca9ff)}.x-tabbar-dark.x-docked-top .x-tab-active{background-color:#0b3c5e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #061f31), color-stop(10%, #092e47), color-stop(65%, #0b3c5e), color-stop(100%, #0c3e60));background-image:-webkit-linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);background-image:linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);color:white}.x-tabbar-neutral{background-color:#e0e0e0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #f2f2f2), color-stop(100%, #cecece));background-image:-webkit-linear-gradient(#ffffff,#f2f2f2 2%,#cecece);background-image:linear-gradient(#ffffff,#f2f2f2 2%,#cecece);border-top-color:#d3d3d3;border-bottom-color:#bababa}.x-tabbar-neutral .x-tab{color:#7a7a7a}.x-tabbar-neutral .x-tab-active{color:black;border-bottom:1px solid #e8e8e8}.x-tabbar-neutral .x-tab-pressed{color:black}.x-tabbar-neutral.x-docked-bottom .x-tab{text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-tabbar-neutral.x-docked-bottom .x-tab .x-button-icon{background-color:#adadad;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa), color-stop(2%, #bfbfbf), color-stop(100%, #9b9b9b));background-image:-webkit-linear-gradient(#fafafa,#bfbfbf 2%,#9b9b9b);background-image:linear-gradient(#fafafa,#bfbfbf 2%,#9b9b9b)}.x-tabbar-neutral.x-docked-bottom .x-tab-active{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bababa), color-stop(10%, #c7c7c7), color-stop(65%, #d3d3d3), color-stop(100%, #d5d5d5));background-image:-webkit-linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);background-image:linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;-webkit-box-shadow:#c7c7c7 0 0 0.25em inset;box-shadow:#c7c7c7 0 0 0.25em inset}.x-tabbar-neutral.x-docked-bottom .x-tab-active .x-button-icon{background-color:#7a7a7a;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c7c7c7), color-stop(2%, #8c8c8c), color-stop(100%, #686868));background-image:-webkit-linear-gradient(#c7c7c7,#8c8c8c 2%,#686868);background-image:linear-gradient(#c7c7c7,#8c8c8c 2%,#686868)}.x-tabbar-neutral.x-docked-top .x-tab-active{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bababa), color-stop(10%, #c7c7c7), color-stop(65%, #d3d3d3), color-stop(100%, #d5d5d5));background-image:-webkit-linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);background-image:linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);color:black}.x-tab.x-item-disabled span.x-button-label,.x-tab.x-item-disabled .x-hasbadge span.x-badge,.x-hasbadge .x-tab.x-item-disabled span.x-badge,.x-tab.x-item-disabled .x-button-icon{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.x-tab.x-draggable{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.x-tab{-webkit-user-select:none;overflow:visible !important}.x-toolbar{padding:0 0.2em;overflow:hidden;position:relative;height:2.6em}.x-toolbar > *{z-index:1}.x-toolbar.x-docked-top{border-bottom:.1em solid}.x-toolbar.x-docked-bottom{border-top:.1em solid}.x-toolbar.x-docked-left{width:7em;height:auto;padding:0.2em;border-right:.1em solid}.x-toolbar.x-docked-right{width:7em;height:auto;padding:0.2em;border-left:.1em solid}.x-title{line-height:2.1em;font-size:1.2em;text-align:center;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0.3em;max-width:100%}.x-title .x-innerhtml{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 .3em}.x-toolbar-dark{background-color:#1468a2;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #63b4ec), color-stop(2%, #177cc2), color-stop(100%, #105483));background-image:-webkit-linear-gradient(#63b4ec,#177cc2 2%,#105483);background-image:linear-gradient(#63b4ec,#177cc2 2%,#105483);border-color:black}.x-toolbar-dark .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-dark.x-docked-top{border-bottom-color:black}.x-toolbar-dark.x-docked-bottom{border-top-color:black}.x-toolbar-dark.x-docked-left{border-right-color:black}.x-toolbar-dark.x-docked-right{border-left-color:black}.x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before{border:1px solid #061f31;border-top-color:#092e47;color:white}.x-toolbar-dark .x-button.x-button-back:before,.x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-button.x-button-back:before,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before{background:#061f31}.x-toolbar-dark .x-button,.x-toolbar-dark .x-button.x-button-back:after,.x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button.x-button-back:after,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#11598c;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4ca9e9), color-stop(2%, #156eac), color-stop(100%, #0d456c));background-image:-webkit-linear-gradient(#4ca9e9,#156eac 2%,#0d456c);background-image:linear-gradient(#4ca9e9,#156eac 2%,#0d456c)}.x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dff0fb));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dff0fb);background-image:linear-gradient(#ffffff,#ffffff 2%,#dff0fb)}.x-toolbar-dark .x-button.x-button-pressing,.x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar-dark .x-button.x-button-pressed,.x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar-dark .x-button.x-button-active,.x-toolbar-dark .x-button.x-button-active:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-button.x-button-active,.x-toolbar .x-toolbar-dark .x-button.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after{background-color:#0f517e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0a3351), color-stop(10%, #0c4267), color-stop(65%, #0f517e), color-stop(100%, #0f5280));background-image:-webkit-linear-gradient(#0a3351,#0c4267 10%,#0f517e 65%,#0f5280);background-image:linear-gradient(#0a3351,#0c4267 10%,#0f517e 65%,#0f5280)}.x-toolbar-dark .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light{background-color:#1985d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #90caf2), color-stop(2%, #2897e5), color-stop(100%, #1571b0));background-image:-webkit-linear-gradient(#90caf2,#2897e5 2%,#1571b0);background-image:linear-gradient(#90caf2,#2897e5 2%,#1571b0);border-color:black}.x-toolbar-light .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light.x-docked-top{border-bottom-color:black}.x-toolbar-light.x-docked-bottom{border-top-color:black}.x-toolbar-light.x-docked-left{border-right-color:black}.x-toolbar-light.x-docked-right{border-left-color:black}.x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before{border:1px solid #0b3c5e;border-top-color:#0e4b75;color:white}.x-toolbar-light .x-button.x-button-back:before,.x-toolbar-light .x-button.x-button-forward:before,.x-toolbar .x-toolbar-light .x-button.x-button-back:before,.x-toolbar .x-toolbar-light .x-button.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before{background:#0b3c5e}.x-toolbar-light .x-button,.x-toolbar-light .x-button.x-button-back:after,.x-toolbar-light .x-button.x-button-forward:after,.x-toolbar .x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button.x-button-back:after,.x-toolbar .x-toolbar-light .x-button.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#1676b9;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7abfef), color-stop(2%, #1a8bd9), color-stop(100%, #126299));background-image:-webkit-linear-gradient(#7abfef,#1a8bd9 2%,#126299);background-image:linear-gradient(#7abfef,#1a8bd9 2%,#126299)}.x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dff0fb));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dff0fb);background-image:linear-gradient(#ffffff,#ffffff 2%,#dff0fb)}.x-toolbar-light .x-button.x-button-pressing,.x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar-light .x-button.x-button-pressed,.x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar-light .x-button.x-button-active,.x-toolbar-light .x-button.x-button-active:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressing,.x-toolbar .x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressed,.x-toolbar .x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-button.x-button-active,.x-toolbar .x-toolbar-light .x-button.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after{background-color:#156eac;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0f517e), color-stop(10%, #125f95), color-stop(65%, #156eac), color-stop(100%, #156fae));background-image:-webkit-linear-gradient(#0f517e,#125f95 10%,#156eac 65%,#156fae);background-image:linear-gradient(#0f517e,#125f95 10%,#156eac 65%,#156fae)}.x-toolbar-light .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-neutral{background-color:#e0e0e0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #f2f2f2), color-stop(100%, #cecece));background-image:-webkit-linear-gradient(#ffffff,#f2f2f2 2%,#cecece);background-image:linear-gradient(#ffffff,#f2f2f2 2%,#cecece);border-color:#616161}.x-toolbar-neutral .x-title{color:black;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-toolbar-neutral.x-docked-top{border-bottom-color:#616161}.x-toolbar-neutral.x-docked-bottom{border-top-color:#616161}.x-toolbar-neutral.x-docked-left{border-right-color:#616161}.x-toolbar-neutral.x-docked-right{border-left-color:#616161}.x-toolbar-neutral .x-button,.x-toolbar .x-toolbar-neutral .x-button,.x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before{border:1px solid #a0a0a0;border-top-color:#adadad;color:black}.x-toolbar-neutral .x-button.x-button-back:before,.x-toolbar-neutral .x-button.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-button.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-button.x-button-forward:before,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:before{background:#a0a0a0}.x-toolbar-neutral .x-button,.x-toolbar-neutral .x-button.x-button-back:after,.x-toolbar-neutral .x-button.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-button,.x-toolbar .x-toolbar-neutral .x-button.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-forward:after,.x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #e5e5e5), color-stop(100%, #c1c1c1));background-image:-webkit-linear-gradient(#ffffff,#e5e5e5 2%,#c1c1c1);background-image:linear-gradient(#ffffff,#e5e5e5 2%,#c1c1c1)}.x-toolbar-neutral .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-button .x-button-icon.x-icon-mask,.x-toolbar-neutral .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-neutral .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-toolbar-neutral .x-button.x-button-pressing,.x-toolbar-neutral .x-button.x-button-pressing:after,.x-toolbar-neutral .x-button.x-button-pressed,.x-toolbar-neutral .x-button.x-button-pressed:after,.x-toolbar-neutral .x-button.x-button-active,.x-toolbar-neutral .x-button.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-active,.x-toolbar .x-toolbar-neutral .x-button.x-button-active:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-active,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active:after{background-color:#cccccc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b2b2b2), color-stop(10%, #bfbfbf), color-stop(65%, #cccccc), color-stop(100%, #cdcdcd));background-image:-webkit-linear-gradient(#b2b2b2,#bfbfbf 10%,#cccccc 65%,#cdcdcd);background-image:linear-gradient(#b2b2b2,#bfbfbf 10%,#cccccc 65%,#cdcdcd)}.x-toolbar-neutral .x-form-label{color:black;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-navigation-bar .x-container{overflow:visible}.x-spinner .x-input-el,.x-field-select .x-input-el{-webkit-text-fill-color:#000;-webkit-opacity:1}.x-spinner.x-item-disabled .x-input-el,.x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:currentcolor}.x-toolbar .x-field-select .x-input-el{-webkit-text-fill-color:#fff}.x-toolbar .x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:rgba(255, 255, 255, 0.6)}.x-toolbar .x-form-field-container{padding:0 .3em}.x-toolbar .x-field{width:13em;margin:.5em;min-height:0;border-bottom:0;background:transparent}.x-toolbar .x-field .x-clear-icon{background-size:50% 50%;right:-0.8em;margin-top:-1.06em}.x-toolbar .x-field-input{padding-right:1.6em !important}.x-toolbar .x-field-textarea .x-component-outer,.x-toolbar .x-field-text .x-component-outer,.x-toolbar .x-field-number .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.3em;border-radius:0.3em;background-color:white;-webkit-box-shadow:inset rgba(0, 0, 0, 0.5) 0 0.1em 0, inset rgba(0, 0, 0, 0.5) 0 -0.1em 0, inset rgba(0, 0, 0, 0.5) 0.1em 0 0, inset rgba(0, 0, 0, 0.5) -0.1em 0 0, inset rgba(0, 0, 0, 0.5) 0 0.15em 0.4em}.x-toolbar .x-form-label{background:transparent;border:0;padding:0;line-height:1.4em}.x-toolbar .x-form-field{height:1.6em;color:#6e6e6e;background:transparent;min-height:0;-webkit-appearance:none;padding:0em .3em;margin:0}.x-toolbar .x-form-field:focus{color:black}.x-toolbar .x-field-select .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.8em;border-radius:0.8em}.x-toolbar .x-field-search .x-field-input{background-position:.5em 50%}.x-toolbar .x-field-select{-webkit-box-shadow:none}.x-toolbar .x-field-select .x-form-field{height:1.4em}.x-toolbar .x-field-select{background:transparent}.x-toolbar .x-field-select .x-component-outer:after{right:.4em}.x-toolbar .x-field-select.x-item-disabled .x-component-outer:after{opacity:.6}.x-toolbar .x-field-select .x-component-outer:before{width:3em;border-left:none;-webkit-border-top-right-radius:0.8em;border-top-right-radius:0.8em;-webkit-border-bottom-right-radius:0.8em;border-bottom-right-radius:0.8em;-webkit-mask:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAABCAYAAACc0f2yAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADJJREFUeNpi/P//PwMjIyMbAwMDOxRzAjEXFHMDMQ8a5kXC6HLcSHo5kcwEmU9TABBgAOcTBAFcRiSpAAAAAElFTkSuQmCC');-webkit-mask-position:right top;-webkit-mask-repeat:repeat-y;-webkit-mask-size:3em 0.05em}.x-toolbar .x-field-select .x-input-text{color:#fff}.x-android .x-field-search .x-field-input{padding-left:.2em !important;padding-right:2.2em !important}.x-indexbar-wrapper{-webkit-box-pack:end !important;box-pack:end !important;pointer-events:none}.x-indexbar-vertical{width:1.1em;-webkit-box-orient:vertical;box-orient:vertical;margin-right:8px}.x-indexbar-horizontal{height:1.1em;-webkit-box-orient:horizontal;box-orient:horizontal;margin-bottom:8px}.x-indexbar{pointer-events:auto;z-index:2;padding:.3em 0;min-height:0 !important;height:auto !important;-webkit-box-flex:0 !important}.x-indexbar > div{color:#155988;font-size:0.6em;text-align:center;line-height:1.1em;font-weight:bold;display:block}.x-phone.x-landscape .x-indexbar > div{font-size:0.38em;line-height:1em}.x-indexbar-pressed{-webkit-border-radius:0.55em;border-radius:0.55em;background-color:rgba(143, 155, 163, 0.8)}.x-list{position:relative;background-color:#f7f7f7}.x-list .x-list-inner{width:100%}.x-list .x-list-disclosure{position:absolute;bottom:0.44em;right:0.44em}.x-list .x-list-disclosure{overflow:visible;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBi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M7lwwJNA6qCL2EpMO44iYIXNaFyMlFeu3t7Zq78ugeBbZz2d4RX2mBa/oFTRPLQs+ggfBlGA/gYV09hYvQR5eScRvF+Zt7iOm92JjMxU9snam3kLXPALvWYHlsoztBmgjtIGiazkMhw6ABC4+GpADa/QuA5bJ+Temn5sv/f4gSo/c5YNfYKd9kGVBdOCmO5hI1pkAC3t1uExKfmwTbFfoL4HACDlN/y5p+RZLfU/Fvs+BgbK1psLBXAjhR+qauh2unTfRdAa8N4D5pqQL+nwADAKGFDQ//Deb9AAAAAElFTkSuQmCC') no-repeat;-webkit-mask-size:1.7em;background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692);width:1.7em;height:1.7em}.x-list.x-list-indexed .x-list-disclosure{margin-right:1em}.x-list .x-item-selected .x-list-disclosure{background:#fff none}.x-list .x-list-item{position:relative;color:black}.x-list .x-list-item .x-list-item-label{min-height:2.6em;padding:0.65em 0.8em}.x-list .x-list-item.x-item-pressed .x-list-item-label{background:#b6e1ff none}.x-list .x-list-item.x-item-selected .x-list-item-label{background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692);color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-list-header{position:relative}.x-list-header-swap{position:absolute;left:0;width:100%;z-index:1}.x-ios .x-list-header-swap{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.x-list-normal .x-list-header{background-color:#5ab5f5;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eaf6fe), color-stop(2%, #7cc4f7), color-stop(100%, #38a6f3));background-image:-webkit-linear-gradient(#eaf6fe,#7cc4f7 2%,#38a6f3);background-image:linear-gradient(#eaf6fe,#7cc4f7 2%,#38a6f3);color:#0a6aac;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;border-top:1px solid #5ab5f5;border-bottom:1px solid #0d87dc;font-weight:bold;font-size:0.8em;padding:0.2em 1.02em;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-list-normal .x-list-item .x-list-item-label{border-top:1px solid #dedede}.x-list-normal .x-list-item:last-child .x-list-item-label{border-bottom:1px solid #dedede}.x-list-normal .x-list-item:first-child .x-list-item-label{border-top:0}.x-list-normal .x-list-item.x-item-pressed .x-list-item-label{border-top-color:#b6e1ff;background-color:#b6e1ff}.x-list-normal .x-list-item.x-item-selected .x-list-item-label{border-top-color:#006bb6;border-bottom-color:#003e6a}.x-list-round .x-scroll-view{background-color:#EEEEEE !important}.x-list-round .x-list-disclosure{overflow:hidden;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA9CAYAAAAeYmHpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXL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4DlgtUc7hozrv8nJgUCELwEfA/sd697NHv04wv78FnBS0p8BlvVBSUsdl/V91kIO3hicoIizGwU0ALYDvzrIrLDAtcyzLYevSIQCNfu/lvSA4xtutF3NEEjNtZc14EnJE5KucyC8SNKzkv4OQHhgvr2s1zwtp/XAw8DNzHMqwHCvtZGqAgTT/3KaYdb3epzlHyQ9LWmVpKtmecsrPX+Pc9FTrk15STppm3O3SLo2z497AhF22pRHUjqQIZOSthv5JZKeCeTHMg7OZ0N3B0xLRyS9KOlYoOfvLvZsaC1w0ILMQkI/sBG4ONsf/j88NwMyZI8ejiwQwhso4HxoId3QCZu9/gpf0usK7bkV2gLOmJ/sqUDCe8y2TKECxRxyT5PdW0qWmewE2X2xvmL63q7oI7vtustldj0iY293eTGEZ0tDXUazncqLC92ms6y3daLRJqlX0lQAolP27DZfV5R8X0arJXsZLY2fy2h9ZC+jXfRppG/S+Wi3xKbVRoLshZPmnOb7uPnpCRvHAzcqg5OuSPwzAGYd6fed/rrcAAAAAElFTkSuQmCC') no-repeat;-webkit-mask-size:1.5em;background-color:#419cdb;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c1dff4), color-stop(2%, #5face1), color-stop(100%, #278bd1));background-image:-webkit-linear-gradient(#c1dff4,#5face1 2%,#278bd1);background-image:linear-gradient(#c1dff4,#5face1 2%,#278bd1);width:1.5em;height:1.5em;bottom:0.5em}.x-list-round .x-list-header{color:#777;font-size:1em;font-weight:bold;padding-left:26px;line-height:1.7em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee), color-stop(30%, rgba(238,238,238,0.9)), color-stop(100%, rgba(238,238,238,0.4)));background-image:-webkit-linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4));background-image:linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4))}.x-list-round .x-list-container{padding:13px 13px 0 13px}.x-list-round .x-list-container .x-list-header{padding-left:13px;background-image:none}.x-list-round.x-list-ungrouped .x-list-item-label,.x-list-round.x-list-grouped .x-list-item-label{border:solid #DDDDDD;border-width:1px 1px 0 1px;background:#fff}.x-list-round.x-list-ungrouped .x-list-item:first-child .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-ungrouped .x-list-item:last-child{margin-bottom:13px}.x-list-round.x-list-ungrouped .x-list-item:last-child .x-list-item-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;border-width:1px}.x-list-round.x-list-grouped .x-list-header-item .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-grouped .x-list-footer-item{margin-bottom:13px}.x-list-round.x-list-grouped .x-list-footer-item .x-list-item-label{border-width:1px;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-dataview-inlineblock .x-dataview-item{display:inline-block !important}.x-dataview-nowrap .x-dataview-container{white-space:nowrap !important}.x-list-inlineblock .x-list-item{display:inline-block !important}.x-list-nowrap .x-list-inner{width:auto}.x-list-nowrap .x-list-container{white-space:nowrap !important}.x-list-paging{height:50px}.x-list-paging .x-loading-spinner{display:none;margin:auto}.x-list-paging .x-list-paging-msg{text-align:center;color:#006bb6;padding-top:10px;-webkit-border-radius:6px;border-radius:6px}.x-list-paging.x-loading .x-loading-spinner{display:block}.x-list-paging.x-loading .x-list-paging-msg{display:none}.x-list-pullrefresh{display:-webkit-box;display:box;-webkit-box-orient:horizontal;box-orient:horizontal;-webkit-box-align:center;box-align:center;-webkit-box-pack:center;box-pack:center;position:absolute;top:-5em;left:0;width:100%;height:4.5em}.x-list-pullrefresh .x-loading-spinner{display:none}.x-list-pullrefresh-arrow{width:2.5em;height:4.5em;background:center center url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAA8CAYAAAAUufjgAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrsmU8oREEYwOexdtNuKBfFwdVhCyfuysnFiXISS+1BLopyUpKLXETkRLaUi1LK3Q2lpPbiQLnIn03a/Hm+z86Ttv0zM++bfbOar36Hbad5v535Zp7v47iuy0wOpyoEHccRHV9L9NxPkUE/bhKCOKiOSPAdn69DsJ5I8E2HYA0QJRJ8Bb50CDYRCT7pEMQD0kwk+CByUFQEW4gE73UIhoA2IsFb4ENEMCQ5MdU1IxwygpT3oKNLMGyyYFVscdhusc8tDpu+xRG7xf95BW0O2kNiV1AgIvaQ2BzUJNgJNJYZGyUU7OG1cal4Bi68oqkDPszy2teEwJp5Cdyu/lZ1g8CwIYJ7wEF+2YmrNw90Byx3BizgKhaqizEP1wg7CLLxCEzy/CtauMeBlQDyEfNuGrgU6SyM8F9SyVgHdmRaH6tAb4XkToEp2d4M5mOK0TWMigU2koa8vJMRZPxEb2ss2LEVPMpPLlMRxBgDZjQJLgNbxb6Uab9tAn3EcifAeKkBMoLY+j0GWonk7oB+lmsFkwhidAGHBPmIeTcAnJcbKCuIMQEs+hScAzZEBqoIYuzyFVCJI36lMJ2CDfxibZeUu+EX/4uMIFP8ZyLejxkgK0hG5a8kP4IYSZbr1IuQVHmAX0HGX4VuGfZVJ6cQxPd1uoRcWqDW0SroFVzZAnJZ/h0LWhAjUUAw4XdSSsH8fExRTEgtGAOuOTETBb16Jk412e+bxOSwglYw6PgWYABvLk8P7zGJFwAAAABJRU5ErkJggg==') no-repeat;background-size:2em 3em;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.x-list-pullrefresh-release .x-list-pullrefresh-arrow{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.x-list-pullrefresh-wrap{width:20em;font-size:0.7em}.x-list-pullrefresh-message{font-weight:bold;font-size:1.3em;margin-bottom:0.1em;text-align:center}.x-list-pullrefresh-updated{text-align:center}html,body{width:100%;height:100%}.x-translatable{position:absolute;top:100%;left:100%;z-index:1}.x-translatable-container{position:relative}.x-translatable-wrapper{width:100%;height:100%;position:absolute;overflow:hidden}.x-translatable-stretcher{width:300%;height:300%;position:absolute;visibility:hidden;z-index:-1}.x-translatable-nested-stretcher{width:100%;height:100%;left:100%;top:100%;position:absolute;visibility:hidden;z-index:-1}.x-layout-fit,.x-layout-card{position:relative;overflow:hidden}.x-layout-fit-item,.x-layout-card-item{position:absolute !important;width:100%;height:100%}.x-layout-hbox,.x-layout-vbox{display:-webkit-box}.x-layout-hbox > *,.x-layout-vbox > *{-webkit-box-flex:0}.x-layout-hbox{-webkit-box-orient:horizontal}.x-layout-vbox{-webkit-box-orient:vertical}.x-layout-hbox > .x-layout-box-item{width:0 !important}.x-layout-vbox > .x-layout-box-item{height:0 !important}.x-table-inner{display:table !important;width:100%;height:100%}.x-table-inner.x-table-fixed{table-layout:fixed !important}.x-table-row{display:table-row !important}.x-table-row > *{display:table-cell !important;vertical-align:middle}.x-container,.x-body{display:-webkit-box}.x-body{overflow:hidden;-webkit-box-flex:1;min-width:100%;min-height:100%}.x-body > .x-inner,.x-container > .x-inner{-webkit-box-flex:1;min-width:100%;min-height:100%;position:relative}.x-docking-horizontal{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:horizontal;min-width:100%;min-height:100%}.x-docking-vertical{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:vertical;min-width:100%;min-height:100%}.x-centered{position:absolute !important;width:100%;height:100%;display:-webkit-box;-webkit-box-align:center;-webkit-box-pack:center}.x-floating{position:absolute !important}.x-centered > *{position:relative !important;-webkit-box-flex:0 !important}.x-size-change-detector{visibility:hidden;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;overflow:hidden}.x-size-change-detector > *{visibility:hidden}.x-size-change-detector-shrink > *{width:200%;height:200%}.x-size-change-detector-expand > *{width:100000px;height:100000px}.x-scroll-view{position:relative;display:block}.x-scroll-container{position:absolute;overflow:hidden;width:100%;height:100%}.x-scroll-scroller{position:absolute;min-width:100%;min-height:100%}.x-ios .x-scroll-scroller{-webkit-transform:translate3d(0, 0, 0)}.x-scroll-stretcher{position:absolute;visibility:hidden}.x-scroll-bar-grid-wrapper{position:absolute;width:100%;height:100%}.x-scroll-bar-grid{display:table;width:100%;height:100%}.x-scroll-bar-grid > *{display:table-row}.x-scroll-bar-grid > * > *{display:table-cell}.x-scroll-bar-grid > :first-child > :first-child{width:100%;height:100%}.x-scroll-bar-grid > :first-child > :nth-child(2){padding:3px 3px 0 0}.x-scroll-bar-grid > :nth-child(2) > :first-child{padding:0 0 3px 3px}.x-scroll-bar{position:relative;overflow:hidden}.x-scroll-bar-stretcher{position:absolute;visibility:hidden;width:100%;height:100%}.x-scroll-bar-x{width:100%}.x-scroll-bar-x > .x-scroll-bar-stretcher{width:300%}.x-scroll-bar-x.active{height:6px}.x-scroll-bar-y{height:100%}.x-scroll-bar-y > .x-scroll-bar-stretcher{height:300%}.x-scroll-bar-y.active{width:6px}.x-scroll-indicator{background:#333;position:absolute;z-index:2;opacity:0.5}.x-scroll-indicator.default{-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-list-light .x-scroll-indicator,.x-dataview-light .x-scroll-indicator{background:#fff;opacity:1}.x-scroll-indicator-x{height:100%}.x-scroll-indicator-y{width:100%}.x-scroll-indicator.csstransform{background:none}.x-scroll-indicator.csstransform > *{position:absolute;background-color:#333}.x-scroll-indicator.csstransform > :nth-child(2){-webkit-transform-origin:0% 0%;background:none;content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAxhgAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-light > *{background-color:#eee}.x-scroll-indicator.csstransform.x-scroll-indicator-light > :nth-child(2){content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAvXcAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-y > *{width:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :first-child{height:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :nth-child(2){height:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :last-child{height:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > *{height:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :first-child{width:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :nth-child(2){width:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :last-child{width:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-carousel{position:relative;overflow:hidden}.x-carousel-item{position:absolute;width:100%;height:100%}.x-carousel-item > *{position:absolute;width:100%;height:100%}.x-carousel-indicator{padding:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:none;background-color:transparent;background-image:none}.x-carousel-indicator{-webkit-box-flex:1;display:-webkit-box;display:box;-webkit-box-pack:center;box-pack:center;-webkit-box-align:center;box-align:center}.x-carousel-indicator span{display:block;width:0.5em;height:0.5em;-webkit-border-radius:0.25em;border-radius:0.25em;margin:0.2em}.x-carousel-indicator-horizontal{height:1.5em;width:100%}.x-carousel-indicator-vertical{-webkit-box-orient:vertical;box-orient:vertical;width:1.5em;height:100%}.x-carousel-indicator-light span{background-color:rgba(255, 255, 255, 0.1);background-image:none}.x-carousel-indicator-light span.x-carousel-indicator-active{background-color:rgba(255, 255, 255, 0.3);background-image:none}.x-carousel-indicator-dark span{background-color:rgba(0, 0, 0, 0.1);background-image:none}.x-carousel-indicator-dark span.x-carousel-indicator-active{background-color:rgba(0, 0, 0, 0.3);background-image:none}.x-form .x-scroll-container{background-color:#eeeeee}.x-form .x-scroll-container > .x-inner{padding:1em}.x-form-label{text-shadow:#fff 0 1px 1px;color:#333333;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;padding:0.6em;display:none !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#f7f7f7}.x-form-label span{font-size:.8em;font-weight:bold}.x-field{min-height:2.5em;background:#fff}.x-field .x-field-input{position:relative}.x-field .x-field-input,.x-field .x-input-el{width:100%}.x-field.x-field-labeled .x-form-label{display:block !important}.x-field:last-child{border-bottom:0}.x-label-align-left .x-component-outer,.x-label-align-right .x-component-outer{-webkit-box-flex:1;box-flex:1}.x-label-align-left:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em}.x-label-align-left:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-label-align-right{-webkit-box-direction:reverse;box-direction:reverse}.x-label-align-right:first-child .x-form-label{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-right:last-child{border-bottom:0}.x-label-align-right:last-child .x-form-label{-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-label-align-top,.x-label-align-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-label-align-top:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-bottom:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-input-el{padding:.4em;min-height:2.5em;display:block;border-width:0;background:transparent;-webkit-appearance:none}.x-field-mask{position:absolute;top:0;right:0;bottom:0;left:0}.x-field-required label:after,.x-field-required .x-form-label:after{content:"*";display:inline}.x-item-disabled label:after,.x-item-disabled .x-form-label:after{color:#666 !important}.x-field-textarea textarea{min-height:6em;padding-top:.5em}.x-checkmark-base,.x-field .x-input-radio:after,.x-field .x-input-checkbox:after,.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after,.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after,.x-select-overlay .x-item-selected .x-list-item-label:before,.x-select-overlay .x-item-selected .x-list-item-label:after{content:"";position:absolute;width:1.4em;height:1.4em;top:50%;left:auto;right:1.1em;-webkit-mask-size:1.4em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAE+klEQVRoBe2aS28URxRGsY0h2FmwCQuEWLHjvUNgZAQ4PMwrEkIRIGEgySKwB8QvYIvEP+ANO0CwsJAA88wGBEKBZJUVQkJCQrwJ5nxN31Z5pnpc7e4ZT9vT0peqqanquqfurVvlIW3Dw8NTJtPTPplgxdoCnugeb3m45eEJtgJTJwJPGw8cP8V6TfmC4/Z/H9uEAAZsIdqHZiMBn2UNbvigSw8M2AIAD6PtqBPpmYe+8t1NoL9GLfYf3bTKKhiWo9PoA9KV0dUgn/tRh8tXWg/Hnj0KUB8yz1JNnjXUuhFd264A/f0O7dKXpQ7EIiTPfkKuVyvrSlx3US+KPF26cMbwxeg8Gg3W4LWHFd6rUUepQprQnI/Rh9A25AtjmqseHVkK7w59UxpgYFdg7wH0CwqFpWvyrKI23GZ7OWluwgqwOnqOobVoWh4Tm97DwCpBHUFp2TiUX3v5QVMnLQzMmqAsUVWWyta3UX/TAmOcwjjk6KmE830W7GbU0ZTAGKY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WBf53XOb0G6XetHjQXyfv2vKLyH7qLLqMhJn5DOW5PLmBZDfRUilloGUoD/ovvXgIrT4/rkxt4XK0fw+TtYxhT6iEt4FK7L8D4locDFqnUXSadh78Bx5bEl2CLG+8AAAAASUVORK5CYII=');margin-top:-0.7em}.x-field .x-input-radio,.x-field .x-input-checkbox{position:relative}.x-field .x-input-radio:after,.x-field .x-input-checkbox:after{background-color:#dddddd}.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after{background-color:#006bb6}.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after{background-color:#9abad1}.x-spinner .x-component-outer{display:-webkit-box;display:box}.x-spinner .x-component-outer > *{width:auto}.x-spinner .x-field-input{-webkit-box-flex:1}.x-spinner .x-field-input .x-input-el{-webkit-text-fill-color:#000;width:100%;text-align:center}.x-spinner .x-field-input input::-webkit-outer-spin-button,.x-spinner .x-field-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-spinner.x-item-disabled .x-input-el{-webkit-text-fill-color:#B3B3B3}.x-spinner.x-item-disabled .x-spinner-button{color:#aaa !important}.x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button{border:1px solid #c4c4c4;border-top-color:#d0d0d0;color:black}.x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before{background:#c4c4c4}.x-spinner.x-item-disabled .x-spinner-button,.x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after{background-color:#f7f7f7;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #e5e5e5));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#e5e5e5);background-image:linear-gradient(#ffffff,#ffffff 2%,#e5e5e5)}.x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-spinner.x-item-disabled .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active:after{background-color:#efefef;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d5d5d5), color-stop(10%, #e2e2e2), color-stop(65%, #efefef), color-stop(100%, #f0f0f0));background-image:-webkit-linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0);background-image:linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0)}.x-spinner .x-spinner-button{margin-top:.25em;margin-bottom:.25em;width:2em;padding:.23em 0 .27em;font-weight:bold;text-align:center;border:1px solid #dddddd !important;-webkit-border-radius:1em;border-radius:1em}.x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button{border:1px solid #b7b7b7;border-top-color:#c4c4c4;color:black}.x-spinner .x-spinner-button.x-button-back:before,.x-spinner .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:before{background:#b7b7b7}.x-spinner .x-spinner-button,.x-spinner .x-spinner-button.x-button-back:after,.x-spinner .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:after{background-color:#eaeaea;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #fcfcfc), color-stop(100%, #d8d8d8));background-image:-webkit-linear-gradient(#ffffff,#fcfcfc 2%,#d8d8d8);background-image:linear-gradient(#ffffff,#fcfcfc 2%,#d8d8d8)}.x-spinner .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner .x-spinner-button.x-button-pressing,.x-spinner .x-spinner-button.x-button-pressing:after,.x-spinner .x-spinner-button.x-button-pressed,.x-spinner .x-spinner-button.x-button-pressed:after,.x-spinner .x-spinner-button.x-button-active,.x-spinner .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner .x-spinner-button.x-button-active,.x-toolbar .x-spinner .x-spinner-button.x-button-active:after{background-color:#e2e2e2;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c9c9c9), color-stop(10%, #d5d5d5), color-stop(65%, #e2e2e2), color-stop(100%, #e3e3e3));background-image:-webkit-linear-gradient(#c9c9c9,#d5d5d5 10%,#e2e2e2 65%,#e3e3e3);background-image:linear-gradient(#c9c9c9,#d5d5d5 10%,#e2e2e2 65%,#e3e3e3)}.x-spinner .x-spinner-button-down{margin-left:.25em}.x-spinner .x-spinner-button-up{margin-right:.25em}.x-spinner.x-field-grouped-buttons .x-input-el{text-align:left}.x-spinner.x-field-grouped-buttons .x-spinner-button-down{margin-right:.5em}.x-android .x-spinner-button{padding:.40em 0 .11em !important}.x-phone .x-select-overlay{min-width:14em;min-height:12.5em}.x-select-overlay{min-width:18em;min-height:22em}.x-select-overlay .x-list-item-label{height:2.6em}.x-select-overlay .x-list-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.x-select-overlay .x-item-selected .x-list-label{margin-right:2.6em}.x-select-overlay .x-item-selected .x-list-item-label:before{background-color:rgba(0, 0, 0, 0.3);margin-top:-0.8em}.x-select-overlay .x-item-selected .x-list-item-label:after{background-color:#dddddd}.x-slider-field .x-component-outer,.x-toggle-field .x-component-outer{padding:0.6em}.x-slider,.x-toggle{position:relative;height:2.2em;min-height:0;min-width:0}.x-slider > *,.x-toggle > *{position:absolute;width:100%;height:100%}.x-slider.x-item-disabled{opacity:.6}.x-thumb{position:absolute;height:2.2em;width:2.2em}.x-thumb:before{content:"";position:absolute;width:1.85em;height:1.85em;top:0.175em;left:0.175em;border:1px solid #919191;-webkit-border-radius:0.925em;border-radius:0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #efefef), color-stop(100%, #cbcbcb));background-image:-webkit-linear-gradient(#ffffff,#efefef 2%,#cbcbcb);background-image:linear-gradient(#ffffff,#efefef 2%,#cbcbcb);-webkit-background-clip:padding;background-clip:padding-box}.x-thumb.x-dragging{opacity:1}.x-thumb.x-dragging:before{background-color:#d0d0d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #e2e2e2), color-stop(100%, #bebebe));background-image:-webkit-linear-gradient(#ffffff,#e2e2e2 2%,#bebebe);background-image:linear-gradient(#ffffff,#e2e2e2 2%,#bebebe)}.x-slider:after{content:"";position:absolute;width:auto;height:0.8em;top:0.737em;left:0;right:0;margin:0 0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);border:0.1em solid rgba(0, 0, 0, 0.1);border-bottom:0;-webkit-box-shadow:rgba(255, 255, 255, 0.7) 0 0.1em 0;-webkit-border-radius:0.4em;border-radius:0.4em}.x-toggle{width:4.4em;-webkit-border-radius:1.1em;border-radius:1.1em;overflow:hidden;border:1px solid #b7b7b7;background-color:#ddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);-webkit-box-flex:0}.x-toggle .x-thumb.x-dragging{opacity:1}.x-toggle .x-thumb:before{top:0.175em}.x-toggle-on{background-color:#92cf00;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6e9c00), color-stop(10%, #80b500), color-stop(65%, #92cf00), color-stop(100%, #94d200));background-image:-webkit-linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200);background-image:linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200)}input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}.x-field-number input::-webkit-outer-spin-button,.x-field-number input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-field-search .x-field-input{position:relative}.x-field-search .x-field-input:before{content:"";position:absolute;width:0.86em;height:0.86em;top:50%;left:0.5em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bqKhiUavbVZdo0LCyLl3iHhGEkkZsKBYJX4RISHwQIYIPNJoQlUjTuCakUZ9oVGRF0GywslvqbgkpDarqsn7/6XsmM5n38pzzvtudeZL/nplznvM8z//cz5ktTU5OtuWRUqk0i/qdoAN0gcXgP+CkzIcx8APYBXbi82/SaZFSKGGILiTibnA+GADHgbkgSXZT8CF4GwyDEXxvI92r4k0Yoj1EeAG4CvSDEggRkX8VbID4lhADQXXUwxZgfAF4CGwFmgdFYQJb68HJljjy6mSSJZAZ4CLwESiKZJydb7A/CGblJZVWP5UwzueBB8AfIC7IovO0mK0B89KCzlOWSBinWoBeAkWTstiT3948xJLqxhLG2Xzw4jSRdQ0yiv/upMBD8xsI40Rzdu00k3WknyeO+aHk4urFEb4TJ/80CWEdYB4BhS1kdfswe+zpGNf80RYUIr9QSdgOdNCYCfaLcABpqFxBbymu3FIlDFkdD18B5wRYHaHOJvAeGCU4fa8IdnXUPAaoMZeDk4CvfEKFM7CrhswnbpxjZQX4C7j5Y0m1d64EXc5OWoqeFsPLwTvAYt/p/Iv+6jTb1rLKHMbYgWCjZxCb0T/e6qhWj3o6hz8HRMSRykp17l5WayfksyN8oafzTegfHOLQ1aG+blc6ZGQRdeVawB4GlWno7Pim1G9rB08AZzgrfRfdw3wdxelHvl/38K01Itc2Rf22Q8BPIIuoynXQL/SQ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7Hdu6VcVLUkuE5ONBR8ByDGb42sPGteBPEDcV0vK0ZZ2Z5C9oSCcZKzqfwO8OJK2FbCAunqYmrICRQaA3rLRejSvTWtGwTzc94Yj0DQS/O4C05nQd6VYhrIVMpEN6Wqv3crBngY4b582aR9DXgJCFTPt05T+AtKq2jNARzxLs/UBbnY/0onwLO97sXPuwj8cidQn8OuytAe0edjUyuluqh2vIPcNnPS1rIbOKfkRf0pKEGdqSJyFwM/AZ3j+2JGHXpZDWWf4+sMvlpaTal7e3xLYEsdQ4ITIIsras29AppxrKctRM5ZDRLUvv13GnLl1p5yjellylCb5BolvWkRQMgT6g6apXmnVgPWQrc/1/boJCaHVWyukAAAAASUVORK5CYII=');-webkit-mask-size:.86em;background-color:#ccc;-webkit-mask-repeat:no-repeat;margin-top:-0.43em}.x-field-search .x-field-input .x-form-field{margin-left:1.0em}.x-field-input .x-clear-icon{display:none;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADHmlDQ1BJQ0MgUHJvZmlsZQAAeAGFVN9r01AU/tplnbDhizpnEQk+aJFuZFN0Q5y2a1e6zVrqNrchSJumbVyaxiTtfrAH2YtvOsV38Qc++QcM2YNve5INxhRh+KyIIkz2IrOemzRNJ1MDufe73/nuOSfn5F6g+XFa0xQvDxRVU0/FwvzE5BTf8gFeHEMr/GhNi4YWSiZHQA/Tsnnvs/MOHsZsdO5v36v+Y9WalQwR8BwgvpQ1xCLhWaBpXNR0E+DWie+dMTXCzUxzWKcECR9nOG9jgeGMjSOWZjQ1QJoJwgfFQjpLuEA4mGng8w3YzoEU5CcmqZIuizyrRVIv5WRFsgz28B9zg/JfsKiU6Zut5xCNbZoZTtF8it4fOX1wjOYA1cE/Xxi9QbidcFg246M1fkLNJK4RJr3n7nRpmO1lmpdZKRIlHCS8YlSuM2xp5gsDiZrm0+30UJKwnzS/NDNZ8+PtUJUE6zHF9fZLRvS6vdfbkZMH4zU+pynWf0D+vff1corleZLw67Q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0Dx2YTtekU2ad9hoHu7u6fXJk0YEbw0hceN91E05M1zX6rm02x/nyeAzle20uGp5Z+qA07jnd0dKS3UjMA84YbgtVhGmms26ZhRXFSQZr6DdljdbY8WcWhyiYA7CXc4zoj51Xe8cCB+Bm0oLNxLWdeSe8AOwcMDXBW/8h2Z7SwlHAE7wPS94p7BeBj2WAJQgk4dZ1vH4R8XetbLrUCu0/hJk+Xyh4lYGbkuAVKtEM4spWUyoAY4nqxGai9pKYFnALdg+eHMRgVi0o0zm2M+W179uzRHjUaAdMq0PsrzJZOxGJhhEoJFox8e9euXcYLIJ6AaROv8wH0Abzqj/ojNN6vKoA9j/n6TnZDL1krwFTC63xQ/CZ+mWs8rxJiToc9p9Bn3/JqWdcM5TjsJqqevOEG6pzFb6cq/WXFAegcfsd03lhnh3ULuwpQwChqtBmFfYw4/1MpV1GIJ8q+hAqHKeqhx6TadwvLynjpC6uYThjA/2SJ9QQjVe4AyvocjvR72Q4/775bWFbe1NQ0AkfxPubfryL+axgT10SlD/rbsep5LQxY2h6qhalADrwahM2AfWjt9wC+BU/7YwdZkXPTaPFv6PiZOxU23jdTXP8VKWC5GF4g4Z0KgG7Gbwt+WwFgM57FeHLTml1gGt/8d7wxvHNmN4Dh7zp+F7nhJuuL6v0/Vc+vwPfknLsAAAAASUVORK5CYII=') no-repeat;background-position:center center;background-size:55% 55%;width:2.2em;height:2.2em;margin:.5em;margin-top:-1.1em;position:absolute;top:50%;right:-0.5em}.x-field-clearable .x-clear-icon{display:block}.x-field-clearable .x-field-input{padding-right:2.2em}.x-android .x-input-el{-webkit-text-fill-color:#000}.x-android .x-empty .x-input-el{-webkit-text-fill-color:#A9A9A9}.x-item-disabled .x-form-label span,.x-item-disabled input,.x-item-disabled .x-input-el,.x-item-disabled .x-spinner-body,.x-item-disabled select,.x-item-disabled textarea,.x-item-disabled .x-field-clear-container{color:#b3b3b3;-webkit-text-fill-color:#b3b3b3;pointer-events:none}.x-form-fieldset{margin:0 0 1.5em}.x-form-fieldset .x-form-label{border-top:1px solid white}.x-form-fieldset .x-form-fieldset-inner{border:1px solid #dddddd;background:#fff;padding:0;-webkit-border-radius:0.4em;border-radius:0.4em;overflow:hidden}.x-form-fieldset .x-field{border-bottom:1px solid #dddddd;background:transparent}.x-form-fieldset .x-field:first-child{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-form-fieldset .x-field:last-child{border-bottom:0;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-form-fieldset-title{text-shadow:#fff 0 1px 1px;color:#333333;margin:1em 0.7em 0.3em;color:#333333;font-weight:bold;white-space:nowrap}.x-form-fieldset-instructions{text-shadow:#fff 0 1px 1px;color:#333333;color:gray;margin:1em 0.7em 0.3em;font-size:.8em;text-align:center}.x-selectmark-base,.x-field-select .x-component-outer:after{content:"";position:absolute;width:1em;height:1em;top:50%;left:auto;right:0.7em;-webkit-mask-size:1em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9I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x4FinzBnJcAUl4FhP/jIgRSYKvkYCJaO2LbNv08RMMUy5nsA4COTLy0XYIqtil9iF6aflq7AwBWuAvuQ9ZKSBgNX2ieWjtKSzeXBNZgqfe8J+4W5aXtbcg0GrvibB/BhkeuhBJhigzsghT0veh+WAlMcCGHvMOMQwcCdcIntYy6WmXhIg2PuiAvsEHO97IhHGgzckb4D8L6LmZYPMHBnhiWwXVdDPF9g4A4Vwd66nFr6BAN3ygbbw1yoMzjmjplgB5hrrufSvsHAHesZDOD2JAbxVYCBOzfIAZ9JbR6qAgN3cPwP9kZy1VIlGLiTdluCmoOBO/pnS9Bk8DzmS3pL4BMcpZEe1qX0GI/atC4dQYXRMa1MU0IX4gpWsIIVrGAFK1jBCnYUPwIMAPUPAyFL+nRdAAAAAElFTkSuQmCC');margin-top:-0.5em}.x-field-select{position:relative}.x-field-select .x-component-outer:after{background-color:#dddddd;z-index:2}.x-field-select .x-component-outer:before,.x-field-select .x-component-outer:after{pointer-events:none;position:absolute;display:block}.x-field-select .x-component-outer:before{content:"";position:absolute;width:4em;height:auto;top:0;left:auto;right:0;bottom:0;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;background:-webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(255, 255, 255, 0)), color-stop(0.5, white));z-index:1}.x-msgbox{min-width:15em;max-width:20em;padding:0.8em;margin:.5em;-webkit-box-shadow:rgba(0, 0, 0, 0.4) 0 0.1em 0.5em;-webkit-border-radius:0.3em;border-radius:0.3em;border:0.15em solid #1985d0}.x-msgbox .x-icon{margin-left:1.3em}.x-msgbox .x-title{font-size:.9em;line-height:1.4em}.x-msgbox .x-body{background:transparent !important}.x-msgbox .x-toolbar{background:transparent none;-webkit-box-shadow:none}.x-msgbox .x-toolbar.x-docked-top{border-bottom:0;height:1.3em}.x-msgbox .x-toolbar.x-docked-bottom{border-top:0}.x-msgbox .x-field{min-height:2em;background:#fff;-webkit-border-radius:0.2em;border-radius:0.2em}.x-msgbox .x-form-field{min-height:1.5em;padding-right:0 !important;-webkit-appearance:none}.x-msgbox .x-field-input{padding-right:2.2em}.x-msgbox-text{text-align:center;padding:6px 0;line-height:1.4em}.x-msgbox-buttons{padding:0.4em 0;height:auto}.x-msgbox-buttons .x-button{min-width:4.5em}.x-msgbox-buttons .x-button-normal span{opacity:.7}.x-msgbox-dark .x-msgbox-text{color:rgba(190, 224, 247, 0.9);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-msgbox-dark .x-msgbox-input{background-color:rgba(190, 224, 247, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(144,202,242,0.9)), color-stop(10%, rgba(167,213,244,0.9)), color-stop(65%, rgba(190,224,247,0.9)), color-stop(100%, rgba(192,225,247,0.9)));background-image:-webkit-linear-gradient(rgba(144,202,242,0.9),rgba(167,213,244,0.9) 10%,rgba(190,224,247,0.9) 65%,rgba(192,225,247,0.9));background-image:linear-gradient(rgba(144,202,242,0.9),rgba(167,213,244,0.9) 10%,rgba(190,224,247,0.9) 65%,rgba(192,225,247,0.9));border:0.1em solid rgba(25, 133, 208, 0.9)}.x-loading-spinner{font-size:250%;height:1em;width:1em;position:relative;-webkit-transform-origin:0.5em 0.5em}.x-loading-spinner > span,.x-loading-spinner > span:before,.x-loading-spinner > span:after{display:block;position:absolute;width:0.1em;height:0.25em;top:0;-webkit-transform-origin:0.05em 0.5em;-webkit-border-radius:0.05em;border-radius:0.05em;content:" "}.x-loading-spinner > span.x-loading-top{background-color:rgba(170, 170, 170, 0.99)}.x-loading-spinner > span.x-loading-top::after{background-color:rgba(170, 170, 170, 0.9)}.x-loading-spinner > span.x-loading-left::before{background-color:rgba(170, 170, 170, 0.8)}.x-loading-spinner > span.x-loading-left{background-color:rgba(170, 170, 170, 0.7)}.x-loading-spinner > span.x-loading-left::after{background-color:rgba(170, 170, 170, 0.6)}.x-loading-spinner > span.x-loading-bottom::before{background-color:rgba(170, 170, 170, 0.5)}.x-loading-spinner > span.x-loading-bottom{background-color:rgba(170, 170, 170, 0.4)}.x-loading-spinner > span.x-loading-bottom::after{background-color:rgba(170, 170, 170, 0.35)}.x-loading-spinner > span.x-loading-right::before{background-color:rgba(170, 170, 170, 0.3)}.x-loading-spinner > span.x-loading-right{background-color:rgba(170, 170, 170, 0.25)}.x-loading-spinner > span.x-loading-right::after{background-color:rgba(170, 170, 170, 0.2)}.x-loading-spinner > span.x-loading-top::before{background-color:rgba(170, 170, 170, 0.15)}.x-loading-spinner > span{left:50%;margin-left:-0.05em}.x-loading-spinner > span.x-loading-top{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg)}.x-loading-spinner > span.x-loading-right{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.x-loading-spinner > span.x-loading-bottom{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg)}.x-loading-spinner > span.x-loading-left{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg)}.x-loading-spinner > span::before{-webkit-transform:rotate(30deg);-moz-transform:rotate(30deg)}.x-loading-spinner > span::after{-webkit-transform:rotate(-30deg);-moz-transform:rotate(-30deg)}.x-loading-spinner{-webkit-animation-name:x-loading-spinner-rotate;-webkit-animation-duration:.5s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}@-webkit-keyframes x-loading-spinner-rotate{0%{-webkit-transform:rotate(0deg)}8.32%{-webkit-transform:rotate(0deg)}8.33%{-webkit-transform:rotate(30deg)}16.65%{-webkit-transform:rotate(30deg)}16.66%{-webkit-transform:rotate(60deg)}24.99%{-webkit-transform:rotate(60deg)}25%{-webkit-transform:rotate(90deg)}33.32%{-webkit-transform:rotate(90deg)}33.33%{-webkit-transform:rotate(120deg)}41.65%{-webkit-transform:rotate(120deg)}41.66%{-webkit-transform:rotate(150deg)}49.99%{-webkit-transform:rotate(150deg)}50%{-webkit-transform:rotate(180deg)}58.32%{-webkit-transform:rotate(180deg)}58.33%{-webkit-transform:rotate(210deg)}66.65%{-webkit-transform:rotate(210deg)}66.66%{-webkit-transform:rotate(240deg)}74.99%{-webkit-transform:rotate(240deg)}75%{-webkit-transform:rotate(270deg)}83.32%{-webkit-transform:rotate(270deg)}83.33%{-webkit-transform:rotate(300deg)}91.65%{-webkit-transform:rotate(300deg)}91.66%{-webkit-transform:rotate(330deg)}100%{-webkit-transform:rotate(330deg)}} diff --git a/sencha/examples/history/app.js b/sencha/examples/history/app.js new file mode 100644 index 000000000..8964522b5 --- /dev/null +++ b/sencha/examples/history/app.js @@ -0,0 +1,93 @@ +var pubnub = PUBNUB({ + publish_key : 'demo', + subscribe_key : 'demo', + ssl : false, + origin : 'pubsub.pubnub.com' +}); + + +Ext.application({ + launch: function () { + var myStore = Ext.create('Ext.data.Store', { + storeId: 'list', + fields: ['txt'] + }); + + Ext.create('Ext.List', { + fullscreen: true, + store: 'list', + itemTpl: '{txt}', + items: [{ + xtype: 'titlebar', + docked: 'top', + border: 0, + items: [ + { + xtype: 'textfield', + name: 'channel', + id: 'channel', + label: 'Channel', + }, + { + xtype: 'textfield', + label: 'Count', + name: 'count', + id: 'count' + }, + { + xtype: 'textfield', + label: 'Start', + name: 'start', + id: 'start' + }, + { + xtype: 'textfield', + label: 'End', + name: 'end', + id: 'end' + }, + ] + }, + { + xtype: 'titlebar', + docked: 'top', + height: '70px', + border: 0, + items: [ + { + xtype: 'togglefield', + name : 'reverse', + id: 'reverse', + label: 'Reverse ?', + }, + { + text: 'Get History', + align: 'left', + handler: function () { + var channel = Ext.getCmp('channel').getValue() || 'sencha-demo-channel'; + var count = Ext.getCmp('count').getValue() || 100; + var start = Ext.getCmp('start').getValue(); + var end = Ext.getCmp('end').getValue(); + var reverse = Ext.getCmp('reverse').getValue() ; + + myStore.removeAll(); + pubnub.history({ + channel: channel, + count: count, + start: start, + end: end, + reverse: reverse?'true':'false', + callback: function(response){ + for ( x in response[0] ) { + myStore.insert(0,{txt : JSON.stringify(response[0][x])}); + } + } + }); + } + } + ] + }] + }); + } +}); + diff --git a/sencha/examples/history/index.html b/sencha/examples/history/index.html new file mode 100644 index 000000000..e843402c4 --- /dev/null +++ b/sencha/examples/history/index.html @@ -0,0 +1,65 @@ + + + + + history + + + + + + + + +
+
+
+
+
+ + diff --git a/sencha/examples/history/sencha-touch-all.js b/sencha/examples/history/sencha-touch-all.js new file mode 100644 index 000000000..3b08d5862 --- /dev/null +++ b/sencha/examples/history/sencha-touch-all.js @@ -0,0 +1,32 @@ +/* +This file is part of Sencha Touch 2.0 + +Copyright (c) 2011-2012 Sencha Inc + +Contact: http://www.sencha.com/contact + +Commercial Usage +Licensees holding valid commercial licenses may use this file in accordance with the Commercial +Software License Agreement provided with the Software or, alternatively, in accordance with the +terms contained in a written agreement between you and Sencha. + +If you are unsure which license is appropriate for your use, please contact the sales department +at http://www.sencha.com/contact. + +Build date: 2012-06-04 15:34:28 (d81f71da2d56f5f71419dc892fbc85685098c6b7) +*/ +/* + +This file is part of Sencha Touch 2 + +Copyright (c) 2012 Sencha Inc + +Contact: http://www.sencha.com/contact + +Commercial Usage +Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha. + +If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. + +*/ +(function(){var global=this,objectPrototype=Object.prototype,toString=objectPrototype.toString,enumerables=true,enumerablesTest={toString:1},emptyFn=function(){},i;if(typeof Ext==="undefined"){global.Ext={}}Ext.global=global;for(i in enumerablesTest){enumerables=null}if(enumerables){enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=enumerables;Ext.apply=function(object,config,defaults){if(defaults){Ext.apply(object,defaults)}if(object&&config&&typeof config==="object"){var i,j,k;for(i in config){object[i]=config[i]}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(config.hasOwnProperty(k)){object[k]=config[k]}}}}return object};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:emptyFn,baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(object,config){var property;if(object){for(property in config){if(object[property]===undefined){object[property]=config[property]}}}return object},iterate:function(object,fn,scope){if(Ext.isEmpty(object)){return}if(scope===undefined){scope=object}if(Ext.isIterable(object)){Ext.Array.each.call(Ext.Array,object,fn,scope)}else{Ext.Object.each.call(Ext.Object,object,fn,scope)}}});Ext.apply(Ext,{extend:function(){var objectConstructor=objectPrototype.constructor,inlineOverrides=function(o){for(var m in o){if(!o.hasOwnProperty(m)){continue}this[m]=o[m]}};return function(subclass,superclass,overrides){if(Ext.isObject(superclass)){overrides=superclass;superclass=subclass;subclass=overrides.constructor!==objectConstructor?overrides.constructor:function(){superclass.apply(this,arguments)}}var F=function(){},subclassProto,superclassProto=superclass.prototype;F.prototype=superclassProto;subclassProto=subclass.prototype=new F();subclassProto.constructor=subclass;subclass.superclass=superclassProto;if(superclassProto.constructor===objectConstructor){superclassProto.constructor=superclass}subclass.override=function(overrides){Ext.override(subclass,overrides)};subclassProto.override=inlineOverrides;subclassProto.proto=subclassProto;subclass.override(overrides);subclass.extend=function(o){return Ext.extend(subclass,o)};return subclass}}(),override:function(cls,overrides){if(cls.$isClass){return cls.override(overrides)}else{Ext.apply(cls.prototype,overrides)}}});Ext.apply(Ext,{valueFrom:function(value,defaultValue,allowBlank){return Ext.isEmpty(value,allowBlank)?defaultValue:value},typeOf:function(value){if(value===null){return"null"}var type=typeof value;if(type==="undefined"||type==="string"||type==="number"||type==="boolean"){return type}var typeToString=toString.call(value);switch(typeToString){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(type==="function"){return"function"}if(type==="object"){if(value.nodeType!==undefined){if(value.nodeType===3){return(/\S/).test(value.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(value,allowEmptyString){return(value===null)||(value===undefined)||(!allowEmptyString?value==="":false)||(Ext.isArray(value)&&value.length===0)},isArray:("isArray" in Array)?Array.isArray:function(value){return toString.call(value)==="[object Array]"},isDate:function(value){return toString.call(value)==="[object Date]"},isObject:(toString.call(null)==="[object Object]")?function(value){return value!==null&&value!==undefined&&toString.call(value)==="[object Object]"&&value.ownerDocument===undefined}:function(value){return toString.call(value)==="[object Object]"},isSimpleObject:function(value){return value instanceof Object&&value.constructor===Object},isPrimitive:function(value){var type=typeof value;return type==="string"||type==="number"||type==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(value){return toString.call(value)==="[object Function]"}:function(value){return typeof value==="function"},isNumber:function(value){return typeof value==="number"&&isFinite(value)},isNumeric:function(value){return !isNaN(parseFloat(value))&&isFinite(value)},isString:function(value){return typeof value==="string"},isBoolean:function(value){return typeof value==="boolean"},isElement:function(value){return value?value.nodeType===1:false},isTextNode:function(value){return value?value.nodeName==="#text":false},isDefined:function(value){return typeof value!=="undefined"},isIterable:function(value){return(value&&typeof value!=="string")?value.length!==undefined:false}});Ext.apply(Ext,{clone:function(item){if(item===null||item===undefined){return item}if(item.nodeType&&item.cloneNode){return item.cloneNode(true)}var type=toString.call(item);if(type==="[object Date]"){return new Date(item.getTime())}var i,j,k,clone,key;if(type==="[object Array]"){i=item.length;clone=[];while(i--){clone[i]=Ext.clone(item[i])}}else{if(type==="[object Object]"&&item.constructor===Object){clone={};for(key in item){clone[key]=Ext.clone(item[key])}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];clone[k]=item[k]}}}}return clone||item},getUniqueGlobalNamespace:function(){var uniqueGlobalNamespace=this.uniqueGlobalNamespace;if(uniqueGlobalNamespace===undefined){var i=0;do{uniqueGlobalNamespace="ExtBox"+(++i)}while(Ext.global[uniqueGlobalNamespace]!==undefined);Ext.global[uniqueGlobalNamespace]=Ext;this.uniqueGlobalNamespace=uniqueGlobalNamespace}return uniqueGlobalNamespace},functionFactory:function(){var args=Array.prototype.slice.call(arguments),ln=args.length;if(ln>0){args[ln-1]="var Ext=window."+this.getUniqueGlobalNamespace()+";"+args[ln-1]}return Function.prototype.constructor.apply(Function.prototype,args)},globalEval:("execScript" in global)?function(code){global.execScript(code)}:function(code){(function(){eval(code)})()},});Ext.type=Ext.typeOf})();(function(){var a="4.1.0",b;Ext.Version=b=Ext.extend(Object,{constructor:function(d){var c=this.toNumber,f,e;if(d instanceof b){return d}this.version=this.shortVersion=String(d).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");e=this.version.search(/([^\d\.])/);if(e!==-1){this.release=this.version.substr(e,d.length);this.shortVersion=this.version.substr(0,e)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");f=this.version.split(".");this.major=c(f.shift());this.minor=c(f.shift());this.patch=c(f.shift());this.build=c(f.shift());return this},toNumber:function(c){c=parseInt(c||0,10);if(isNaN(c)){c=0}return c},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(g,f){var d,e,c;g=new b(g).toArray();f=new b(f).toArray();for(c=0;ce){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,f,d){if(b.compare(Ext.getVersion(c),e)<1){f.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,htmlEncode:(function(){var d={"&":"&",">":">","<":"<",'"':"""},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){return d[f]})}})(),htmlDecode:(function(){var d={"&":"&",">":">","<":"<",""":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){if(f in d){return d[f]}else{return String.fromCharCode(parseInt(f.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.lengthH){for(C=e;C--;){F[z+C]=F[H+C]}}}if(J&&G===B){F.length=B;F.push.apply(F,I)}else{F.length=B+J;for(C=0;C-1;y--){if(A.call(z||C[y],C[y],y,C)===false){return y}}}return true},forEach:i?function(z,y,e){return z.forEach(y,e)}:function(B,z,y){var e=0,A=B.length;for(;ee){e=z}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(B){var y=0,e,A,z;for(e=0,A=B.length;e=c){f+=c}else{if(b*2<-c){f-=c}}}return Ext.Number.constrain(f,d,g)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var a=function(){};var b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,j,d){var c=b.toQueryObjects,h=[],f,g;if(Ext.isArray(j)){for(f=0,g=j.length;f0){h=n.split("=");v=decodeURIComponent(h[0]);m=(h[1]!==undefined)?decodeURIComponent(h[1]):"";if(!q){if(t.hasOwnProperty(v)){if(!Ext.isArray(t[v])){t[v]=[t[v]]}t[v].push(m)}else{t[v]=m}}else{g=v.match(/(\[):?([^\]]*)\]/g);s=v.match(/^([^\[]+)/);v=s[0];k=[];if(g===null){t[v]=m;continue}for(o=0,c=g.length;o0){return setTimeout(e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){if(!d){d=this}if(!c){c=Array.prototype.slice.call(arguments)}if(a){clearTimeout(a);a=null}a=setTimeout(function(){e.apply(d,c)},b)}},createThrottled:function(e,b,d){var f,a,c,h,g=function(){e.apply(d||this,c);f=new Date().getTime()};return function(){a=new Date().getTime()-f;c=arguments;clearTimeout(h);if(!f||(a>=b)){g()}else{h=setTimeout(g,b-a)}}},interceptBefore:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){var e=c.apply(this,arguments);d.apply(this,arguments);return e}},interceptAfter:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){d.apply(this,arguments);return c.apply(this,arguments)}}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i0){for(d=0;d0){if(l===k){return n[l]}m=n[l];k=k.substring(l.length+1)}if(m.length>0){m+="/"}return m.replace(/\/\.\//g,"/")+k.replace(/\./g,"/")+".js"},getPrefix:function(l){var n=this.config.paths,m,k="";if(n.hasOwnProperty(l)){return l}for(m in n){if(n.hasOwnProperty(m)&&m+"."===l.substring(0,m.length+1)){if(m.length>k.length){k=m}}}return k},require:function(m,l,k,n){if(l){l.call(k)}},syncRequire:function(){},exclude:function(l){var k=this;return{require:function(o,n,m){return k.require(o,n,m,l)},syncRequire:function(o,n,m){return k.syncRequire(o,n,m,l)}}},onReady:function(n,m,o,k){var l;if(o!==false&&Ext.onDocumentReady){l=n;n=function(){Ext.onDocumentReady(l,m,k)}}n.call(m)}};Ext.apply(b,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isClassFileLoaded:{},isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},syncModeEnabled:false,scriptElements:{},refreshQueue:function(){var k=this.queue,q=k.length,n,p,l,o,m;if(q===0){this.triggerReady();return}for(n=0;nthis.numLoadedFiles){continue}l=0;do{if(a.isCreated(o[l])){f(o,l,1)}else{l++}}while(l=200&&n<300)||n==304||(n==0&&q.length>0)){Ext.globalEval(q+"\n//@ sourceURL="+l);s.call(w)}else{}u=null}},syncRequire:function(){var k=this.syncModeEnabled;if(!k){this.syncModeEnabled=true}this.require.apply(this,arguments);if(!k){this.syncModeEnabled=false}this.refreshQueue()},require:function(F,t,n,q){var v={},m={},y=this.queue,C=this.classNameToFilePathMap,A=this.isClassFileLoaded,s=[],H=[],E=[],l=[],r,G,x,w,k,p,D,B,z,u,o;if(q){q=h(q);for(B=0,u=q.length;B0){s=a.getNamesByExpression(k);for(z=0,o=s.length;z0){r=function(){var K=[],J,L,I;for(J=0,L=l.length;J0){H=a.getNamesByExpression(w);o=H.length;for(z=0;z0){if(!this.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((E.length>1)?"es":"")+": "+E.join(", "))}}else{r.call(n);return this}G=this.syncModeEnabled;if(!G){y.push({requires:E.slice(),callback:r,scope:n})}u=E.length;for(B=0;B=2){if("1496x2048" in r){e(r["1496x2048"],"(orientation: landscape)")}if("1536x2008" in r){e(r["1536x2008"],"(orientation: portrait)")}}else{if("748x1024" in r){e(r["748x1024"],"(orientation: landscape)")}if("768x1004" in r){e(r["768x1004"],"(orientation: portrait)")}}}else{if(o>=2&&Ext.os.version.gtEq("4.3")){e(r["640x920"])}else{e(r["320x460"])}}},application:function(b){var a=b.name,e,d,c;if(!b){b={}}if(!Ext.Loader.config.paths[a]){Ext.Loader.setPath(a,b.appFolder||"app")}c=Ext.Array.from(b.requires);b.requires=["Ext.app.Application"];e=b.onReady;d=b.scope;b.onReady=function(){b.requires=c;new Ext.app.Application(b);if(e){e.call(d)}};Ext.setup(b)},factoryConfig:function(a,l){var g=Ext.isSimpleObject(a);if(g&&a.xclass){var f=a.xclass;delete a.xclass;Ext.require(f,function(){Ext.factoryConfig(a,function(i){l(Ext.create(f,i))})});return}var d=Ext.isArray(a),m=[],k,j,c,e;if(g||d){if(g){for(k in a){if(a.hasOwnProperty(k)){j=a[k];if(Ext.isSimpleObject(j)||Ext.isArray(j)){m.push(k)}}}}else{for(c=0,e=a.length;c=e){l(a);return}k=m[c];j=a[k];Ext.factoryConfig(j,h)}b();return}l(a)},factory:function(b,e,a,f){var d=Ext.ClassManager,c;if(!b||b.isInstance){if(a&&a!==b){a.destroy()}return b}if(f){if(typeof b=="string"){return d.instantiateByAlias(f+"."+b)}else{if(Ext.isObject(b)&&"type" in b){return d.instantiateByAlias(f+"."+b.type,b)}}}if(b===true){return a||d.instantiate(e)}if("xtype" in b){c=d.instantiateByAlias("widget."+b.xtype,b)}else{if("xclass" in b){c=d.instantiate(b.xclass,b)}}if(c){if(a){a.destroy()}return c}if(a){return a.setConfig(b)}return d.instantiate(e,b)},deprecateClassMember:function(b,c,a,d){return this.deprecateProperty(b.prototype,c,a,d)},deprecateClassMembers:function(b,c){var d=b.prototype,e,a;for(e in c){if(c.hasOwnProperty(e)){a=c[e];this.deprecateProperty(d,e,a)}}},deprecateProperty:function(b,c,a,d){if(!d){d="'"+c+"' is deprecated"}if(a){d+=", please use '"+a+"' instead"}if(a){Ext.Object.defineProperty(b,c,{get:function(){return this[a]},set:function(e){this[a]=e},configurable:true})}},deprecatePropertyValue:function(b,a,d,c){Ext.Object.defineProperty(b,a,{get:function(){return d},configurable:true})},deprecateMethod:function(b,a,d,c){b[a]=function(){if(d){return d.apply(this,arguments)}}},deprecateClassMethod:function(a,b,h,d){if(typeof b!="string"){var g,f;for(g in b){if(b.hasOwnProperty(g)){f=b[g];Ext.deprecateClassMethod(a,g,f)}}return}var c=typeof h=="string",e;if(!d){d="'"+b+"()' is deprecated, please use '"+(c?h:h.name)+"()' instead"}if(c){e=function(){return this[h].apply(this,arguments)}}else{e=function(){return h.apply(this,arguments)}}if(b in a.prototype){Ext.Object.defineProperty(a.prototype,b,{value:null,writable:true,configurable:true})}a.addMember(b,e)},isReady:false,readyListeners:[],triggerReady:function(){var b=Ext.readyListeners,a,c,d;if(!Ext.isReady){Ext.isReady=true;for(a=0,c=b.length;a0){return b+Ext.String.capitalize(a)}return a}},function(){var a=Ext.browser=new this(Ext.global.navigator.userAgent)});Ext.define("Ext.env.OS",{requires:["Ext.Version"],statics:{names:{ios:"iOS",android:"Android",webos:"webOS",blackberry:"BlackBerry",rimTablet:"RIMTablet",mac:"MacOS",win:"Windows",linux:"Linux",bada:"Bada",other:"Other"},prefixes:{ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"}},is:Ext.emptyFn,name:null,version:null,setFlag:function(a,b){if(typeof b=="undefined"){b=true}this.is[a]=b;this.is[a.toLowerCase()]=b;return this},constructor:function(m,b){var k=this.statics(),j=k.names,c=k.prefixes,a,h="",d,g,f,l,e;e=this.is=function(i){return this.is[i]===true};for(d in c){if(c.hasOwnProperty(d)){g=c[d];f=m.match(new RegExp("(?:"+g+")([^\\s;]+)"));if(f){a=j[d];if(f[1]&&(f[1]=="HTC_"||f[1]=="Silk/")){h=new Ext.Version("2.3")}else{h=new Ext.Version(f[f.length-1])}break}}}if(!a){a=j[(m.toLowerCase().match(/mac|win|linux/)||["other"])[0]];h=new Ext.Version("")}this.name=a;this.version=h;if(b){this.setFlag(b)}this.setFlag(a);if(h){this.setFlag(a+(h.getMajor()||""));this.setFlag(a+h.getShortVersion())}for(d in j){if(j.hasOwnProperty(d)){l=j[d];if(!e.hasOwnProperty(a)){this.setFlag(l,(a===l))}}}return this}},function(){var a=Ext.global.navigator,e=a.userAgent,b,g,d;Ext.os=b=new this(e,a.platform);g=b.name;var c=window.location.search.match(/deviceType=(Tablet|Phone)/),f=window.deviceType;if(c&&c[1]){d=c[1]}else{if(f==="iPhone"){d="Phone"}else{if(f==="iPad"){d="Tablet"}else{if(!b.is.Android&&!b.is.iOS&&/Windows|Linux|MacOS/.test(g)){d="Desktop"}else{if(b.is.iPad||b.is.Android3||(b.is.Android4&&e.search(/mobile/i)==-1)){d="Tablet"}else{d="Phone"}}}}}b.setFlag(d,true);b.deviceType=d});Ext.define("Ext.env.Feature",{requires:["Ext.env.Browser","Ext.env.OS"],constructor:function(){this.testElements={};this.has=function(a){return !!this.has[a]};return this},getTestElement:function(a,b){if(a===undefined){a="div"}else{if(typeof a!=="string"){return a}}if(b){return document.createElement(a)}if(!this.testElements[a]){this.testElements[a]=document.createElement(a)}return this.testElements[a]},isStyleSupported:function(c,b){var d=this.getTestElement(b).style,a=Ext.String.capitalize(c);if(typeof d[c]!=="undefined"||typeof d[Ext.browser.getStylePrefix(c)+a]!=="undefined"){return true}return false},isEventSupported:function(c,a){if(a===undefined){a=window}var e=this.getTestElement(a),b="on"+c.toLowerCase(),d=(b in e);if(!d){if(e.setAttribute&&e.removeAttribute){e.setAttribute(b,"");d=typeof e[b]==="function";if(typeof e[b]!=="undefined"){e[b]=undefined}e.removeAttribute(b)}}return d},getSupportedPropertyName:function(b,a){var c=Ext.browser.getVendorProperyName(a);if(c in b){return c}else{if(a in b){return a}}return null},registerTest:Ext.Function.flexSetter(function(a,b){this.has[a]=b.call(this);return this})},function(){Ext.feature=new this;var a=Ext.feature.has;Ext.feature.registerTest({Canvas:function(){var b=this.getTestElement("canvas");return !!(b&&b.getContext&&b.getContext("2d"))},Svg:function(){var b=document;return !!(b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)},Vml:function(){var c=this.getTestElement(),b=false;c.innerHTML="";b=(c.childNodes.length===1);c.innerHTML="";return b},Touch:function(){return this.isEventSupported("touchstart")&&!(Ext.os&&Ext.os.name.match(/Windows|MacOS|Linux/))},Orientation:function(){return("orientation" in window)&&this.isEventSupported("orientationchange")},OrientationChange:function(){return this.isEventSupported("orientationchange")},DeviceMotion:function(){return this.isEventSupported("devicemotion")},Geolocation:function(){return"geolocation" in window.navigator},SqlDatabase:function(){return"openDatabase" in window},WebSockets:function(){return"WebSocket" in window},Range:function(){return !!document.createRange},CreateContextualFragment:function(){var b=!!document.createRange?document.createRange():false;return b&&!!b.createContextualFragment},History:function(){return("history" in window&&"pushState" in window.history)},CssTransforms:function(){return this.isStyleSupported("transform")},Css3dTransforms:function(){return this.has("CssTransforms")&&this.isStyleSupported("perspective")&&!Ext.os.is.Android2},CssAnimations:function(){return this.isStyleSupported("animationName")},CssTransitions:function(){return this.isStyleSupported("transitionProperty")},Audio:function(){return !!this.getTestElement("audio").canPlayType},Video:function(){return !!this.getTestElement("video").canPlayType},ClassList:function(){return"classList" in this.getTestElement()}})});Ext.define("Ext.dom.Query",{select:function(h,b){var g=[],d,f,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}h=h.split(",");for(f=0,c=h.length;f")}else{c.push(">");if((h=d.tpl)){h.applyOut(d.tplData,c)}if((h=d.html)){c.push(h)}if((h=d.cn||d.children)){g.generateMarkup(h,c)}f=g.closeTags;c.push(f[a]||(f[a]=""))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(a,b){Ext.fly(a).applyStyles(b)},createContextualFragment:function(c){var f=document.createElement("div"),a=document.createDocumentFragment(),b=0,d,e;f.innerHTML=c;e=f.childNodes;d=e.length;for(;b0){this.id=b=a.id}else{a.id=b=this.mixins.identifiable.getUniqueId.call(this)}this.self.cache[b]=this}return b},setId:function(c){var a=this.id,b=this.self.cache;if(a){delete b[a]}this.dom.id=c;this.id=c;b[c]=this;return this},setHtml:function(a){this.dom.innerHTML=a},getHtml:function(){return this.dom.innerHTML},setText:function(a){this.dom.textContent=a},redraw:function(){var b=this.dom,a=b.style;a.display="none";b.offsetHeight;a.display=""},isPainted:function(){var a=this.dom;return Boolean(a&&a.offsetParent)},set:function(a,b){var e=this.dom,c,d;for(c in a){if(a.hasOwnProperty(c)){d=a[c];if(c=="style"){this.applyStyles(d)}else{if(c=="cls"){e.className=d}else{if(b!==false){if(d===undefined){e.removeAttribute(c)}else{e.setAttribute(c,d)}}else{e[c]=d}}}}}return this},is:function(a){return Ext.DomQuery.is(this.dom,a)},getValue:function(b){var a=this.dom.value;return b?parseInt(a,10):a},getAttribute:function(a,b){var c=this.dom;return c.getAttributeNS(b,a)||c.getAttribute(b+":"+a)||c.getAttribute(a)||c[a]},destroy:function(){this.isDestroyed=true;var a=Ext.Element.cache,b=this.dom;if(b&&b.parentNode&&b.tagName!="BODY"){b.parentNode.removeChild(b)}delete a[this.id];delete this.dom}},function(a){Ext.elements=Ext.cache=a.cache;this.addStatics({Fly:new Ext.Class({extend:a,constructor:function(b){this.dom=b}}),_flyweights:{},fly:function(e,c){var f=null,d=a._flyweights,b;c=c||"_global";e=Ext.getDom(e);if(e){f=d[c]||(d[c]=new a.Fly());f.dom=e;f.isSynchronized=false;b=Ext.cache[e.id];if(b&&b.isElement){b.isSynchronized=false}}return f}});Ext.get=function(b){return a.get.call(a,b)};Ext.fly=function(){return a.fly.apply(a,arguments)};Ext.ClassManager.onCreated(function(){a.mixin("observable",Ext.mixin.Observable)},null,"Ext.mixin.Observable")});Ext.dom.Element.addStatics({numberRe:/\d+$/,unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(Ext.isNumber(b)||this.numberRe.test(b)){return b+(a||this.defaultUnit||"px")}else{if(!this.unitRe.test(b)){return b||""}}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(b){if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:c[0]||0,right:c[1]||0,bottom:c[2]||0,left:c[3]||0}},unitizeBox:function(c,a){var b=this;c=b.parseBox(c);return b.addUnits(c.top,a)+" "+b.addUnits(c.right,a)+" "+b.addUnits(c.bottom,a)+" "+b.addUnits(c.left,a)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});Ext.dom.Element.addMembers({appendChild:function(a){this.dom.appendChild(Ext.getDom(a));return this},removeChild:function(a){this.dom.removeChild(Ext.getDom(a));return this},append:function(){this.appendChild.apply(this,arguments)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b){var a=Ext.getDom(b),d=this.dom,c=d.firstChild;if(!c){d.appendChild(a)}else{d.insertBefore(a,c)}return this},insertSibling:function(e,c,d){var f=this,b,a=(c||"before").toLowerCase()=="after",g;if(Ext.isArray(e)){g=f;Ext.each(e,function(h){b=Ext.fly(g,"_internal").insertSibling(h,c,d);if(a){g=b}});return b}e=e||{};if(e.nodeType||e.dom){b=f.dom.parentNode.insertBefore(Ext.getDom(e),a?f.dom.nextSibling:f.dom);if(!d){b=Ext.get(b)}}else{if(a&&!f.dom.nextSibling){b=Ext.core.DomHelper.append(f.dom.parentNode,e,!d)}else{b=Ext.core.DomHelper[a?"insertAfter":"insertBefore"](f.dom,e,!d)}}return b},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.Element.addToCache(b.isFlyweight?new Ext.dom.Element(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(b,c){var e=this.dom,f=this.self.create(b,c),d=(c)?f:f.dom,a=e.parentNode;if(a){a.insertBefore(d,e)}d.appendChild(e);return f},wrapAllChildren:function(a){var d=this.dom,b=d.childNodes,e=this.self.create(a),c=e.dom;while(b.length>0){c.appendChild(d.firstChild)}d.appendChild(c);return e},unwrapAllChildren:function(){var c=this.dom,b=c.childNodes,a=c.parentNode;if(a){while(b.length>0){a.insertBefore(c,c.firstChild)}this.destroy()}},unwrap:function(){var c=this.dom,a=c.parentNode,b;if(a){b=a.parentNode;b.insertBefore(c,a);b.removeChild(a)}else{b=document.createDocumentFragment();b.appendChild(c)}return this},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});Ext.dom.Element.override({getX:function(a){return this.getXY(a)[0]},getY:function(a){return this.getXY(a)[1]},getXY:function(){var a=window.webkitConvertPointFromNodeToPage;if(a){return function(){var b=a(this.dom,new WebKitPoint(0,0));return[b.x,b.y]}}else{return function(){var c=this.dom.getBoundingClientRect(),b=Math.round;return[b(c.left+window.pageXOffset),b(c.top+window.pageYOffset)]}}}(),getOffsetsTo:function(a){var c=this.getXY(),b=Ext.fly(a,"_internal").getXY();return[c[0]-b[0],c[1]-b[1]]},setX:function(a){return this.setXY([a,this.getY()])},setY:function(a){return this.setXY([this.getX(),a])},setXY:function(d){var b=this;if(arguments.length>1){d=[d,arguments[1]]}var c=b.translatePoints(d),a=b.dom.style;for(d in c){if(!c.hasOwnProperty(d)){continue}if(!isNaN(c[d])){a[d]=c[d]+"px"}}return b},getLeft:function(){return parseInt(this.getStyle("left"),10)||0},getRight:function(){return parseInt(this.getStyle("right"),10)||0},getTop:function(){return parseInt(this.getStyle("top"),10)||0},getBottom:function(){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(a,g){g=isNaN(a[1])?g:a[1];a=isNaN(a[0])?a:a[0];var d=this,e=d.isStyle("position","relative"),f=d.getXY(),b=parseInt(d.getStyle("left"),10),c=parseInt(d.getStyle("top"),10);b=!isNaN(b)?b:(e?0:d.dom.offsetLeft);c=!isNaN(c)?c:(e?0:d.dom.offsetTop);return{left:(a-f[0]+b),top:(g-f[1]+c)}},setBox:function(d){var c=this,b=d.width,a=d.height,f=d.top,e=d.left;if(e!==undefined){c.setLeft(e)}if(f!==undefined){c.setTop(f)}if(b!==undefined){c.setWidth(b)}if(a!==undefined){c.setHeight(a)}return this},getBox:function(g,j){var h=this,e=h.dom,c=e.offsetWidth,k=e.offsetHeight,n,f,d,a,m,i;if(!j){n=h.getXY()}else{if(g){n=[0,0]}else{n=[parseInt(h.getStyle("left"),10)||0,parseInt(h.getStyle("top"),10)||0]}}if(!g){f={x:n[0],y:n[1],0:n[0],1:n[1],width:c,height:k}}else{d=h.getBorderWidth.call(h,"l")+h.getPadding.call(h,"l");a=h.getBorderWidth.call(h,"r")+h.getPadding.call(h,"r");m=h.getBorderWidth.call(h,"t")+h.getPadding.call(h,"t");i=h.getBorderWidth.call(h,"b")+h.getPadding.call(h,"b");f={x:n[0]+d,y:n[1]+m,0:n[0]+d,1:n[1]+m,width:c-(d+a),height:k-(m+i)}}f.left=f.x;f.top=f.y;f.right=f.x+f.width;f.bottom=f.y+f.height;return f},getPageBox:function(e){var g=this,c=g.dom,j=c.offsetWidth,f=c.offsetHeight,m=g.getXY(),k=m[1],a=m[0]+j,i=m[1]+f,d=m[0];if(!c){return new Ext.util.Region()}if(e){return new Ext.util.Region(k,a,i,d)}else{return{left:d,top:k,width:j,height:f,right:a,bottom:i}}}});Ext.dom.Element.addMembers({WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",VISIBILITY:1,DISPLAY:2,OFFSETS:3,SEPARATOR:"-",trimRe:/^\s+|\s+$/g,wordsRe:/\w/g,spacesRe:/\s+/,styleSplitRe:/\s*(?::|;)\s*/,transparentRe:/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,classNameSplitRegex:/[\s]+/,borders:{t:"border-top-width",r:"border-right-width",b:"border-bottom-width",l:"border-left-width"},paddings:{t:"padding-top",r:"padding-right",b:"padding-bottom",l:"padding-left"},margins:{t:"margin-top",r:"margin-right",b:"margin-bottom",l:"margin-left"},defaultUnit:"px",isSynchronized:false,synchronize:function(){var g=this.dom,a={},d=g.className,f,c,e,b;if(d.length>0){f=g.className.split(this.classNameSplitRegex);for(c=0,e=f.length;c0?a:0},getWidth:function(a){var c=this.dom,b=a?(c.clientWidth-this.getPadding("lr")):c.offsetWidth;return b>0?b:0},getBorderWidth:function(a){return this.addStyles(a,this.borders)},getPadding:function(a){return this.addStyles(a,this.paddings)},applyStyles:function(d){if(d){var e=this.dom,c,b,a;if(typeof d=="function"){d=d.call()}c=typeof d;if(c=="string"){d=Ext.util.Format.trim(d).split(this.styleSplitRe);for(b=0,a=d.length;b "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:["Ext.CompositeElementLite","Ext.CompositeElement"],requires:["Ext.dom.Element"],statics:{importElementMethods:function(){}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.Element.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a).synchronize()},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b-1){c=Ext.getDom(c);if(a){f=this.elements[b];f.parentNode.insertBefore(c,f);Ext.removeNode(f)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(c,e){var b=this,d=this.elements,a;Ext.each(c,function(f){if((a=(d[f]||d[f=b.indexOf(f)]))){if(e){if(a.dom){a.remove()}else{Ext.removeNode(a)}}Ext.Array.erase(d,f,1)}});return this}},function(){var a=Ext.dom.Element,d=a.prototype,c=this.prototype,b;for(b in d){if(typeof d[b]=="function"){(function(e){c[e]=c[e]||function(){return this.invoke(e,arguments)}}).call(c,b)}}c.on=c.addListener;if(Ext.DomQuery){a.selectorFunction=Ext.DomQuery.select}a.select=function(e,f){var g;if(typeof e=="string"){g=a.selectorFunction(e,f)}else{if(e.length!==undefined){g=e}else{}}return new Ext.CompositeElementLite(g)};Ext.select=function(){return a.select.apply(a,arguments)}});Ext.define("Ext.ComponentManager",{alternateClassName:"Ext.ComponentMgr",singleton:true,constructor:function(){var a={};this.all={map:a,getArray:function(){var b=[],c;for(c in a){b.push(a[c])}return b}};this.map=a},register:function(a){var b=a.getId();this.map[a.getId()]=a},unregister:function(a){delete this.map[a.getId()]},isRegistered:function(a){return this.map[a]!==undefined},get:function(a){return this.map[a]},create:function(a,c){if(a.isComponent){return a}else{if(Ext.isString(a)){return Ext.createByAlias("widget."+a)}else{var b=a.xtype||c;return Ext.createByAlias("widget."+b,a)}}},registerType:Ext.emptyFn});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var g=this,j=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(o,n){return n.method.apply(this,[o].concat(n.args))},a=function(p,t){var n=[],q=0,s=p.length,r,o=t!==">";for(;q\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:l},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:m},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:k},{re:/^(?:\{([^\}]+)\})/,method:j}];g.Query=Ext.extend(Object,{constructor:function(n){n=n||{};Ext.apply(this,n)},execute:function(o){var q=this.operations,r=0,s=q.length,p,n;if(!o){n=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(o)){n=o}}for(;r1){for(q=0,r=s.length;q1){r=q.length;for(p=0;p]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:["]([^"]*)["])|(?:[']([^']*)[']))\s*/g,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.app.Action",{config:{scope:null,application:null,controller:null,action:null,args:[],url:undefined,data:{},title:null,beforeFilters:[],currentFilterIndex:-1},constructor:function(a){this.initConfig(a);this.getUrl()},execute:function(){this.resume()},resume:function(){var b=this.getCurrentFilterIndex()+1,c=this.getBeforeFilters(),a=this.getController(),d=c[b];if(d){this.setCurrentFilterIndex(b);d.call(a,this)}else{a[this.getAction()].apply(a,this.getArgs())}},applyUrl:function(a){if(a===null||a===undefined){a=this.urlEncode()}return a},applyController:function(a){var c=this.getApplication(),b=c.getCurrentProfile();if(Ext.isString(a)){a=c.getController(a,b?b.getNamespace():null)}return a},urlEncode:function(){var a=this.getController(),b;if(a instanceof Ext.app.Controller){b=a.$className.split(".");a=b[b.length-1]}return a+"/"+this.getAction()}});Ext.define("Ext.app.Route",{config:{conditions:{},url:null,controller:null,action:null,initialized:false},constructor:function(a){this.initConfig(a)},recognize:function(b){if(!this.getInitialized()){this.initialize()}if(this.recognizes(b)){var c=this.matchesFor(b),a=b.match(this.matcherRegex);a.shift();return Ext.applyIf(c,{controller:this.getController(),action:this.getAction(),historyUrl:b,args:a})}},initialize:function(){this.paramMatchingRegex=new RegExp(/:([0-9A-Za-z\_]*)/g);this.paramsInMatchString=this.getUrl().match(this.paramMatchingRegex)||[];this.matcherRegex=this.createMatcherRegex(this.getUrl());this.setInitialized(true)},recognizes:function(a){return this.matcherRegex.test(a)},matchesFor:function(b){var f={},e=this.paramsInMatchString,a=b.match(this.matcherRegex),d=e.length,c;a.shift();for(c=0;c0){f.timeout=setTimeout(Ext.bind(i.handleTimeout,i,[f]),l)}i.setupErrorHandling(f);i[k]=Ext.bind(i.handleResponse,i,[f],true);i.loadScript(f);return f},abort:function(b){var c=this.statics().requests,a;if(b){if(!b.id){b=c[b]}this.abort(b)}else{for(a in c){if(c.hasOwnProperty(a)){this.abort(c[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.statics()[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).destroy();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType,b])}else{Ext.callback(b.success,b.scope,[a,b])}Ext.callback(b.callback,b.scope,[c,a,b.errorType,b])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.Operation",{config:{synchronous:true,action:null,filters:null,sorters:null,grouper:null,start:null,limit:null,batch:null,callback:null,scope:null,resultSet:null,records:null,request:null,response:null,withCredentials:null,params:null,url:null,page:null,node:null,model:undefined,addRecords:false},started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,constructor:function(a){this.initConfig(a)},applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},getRecords:function(){var a=this.getResultSet();return this._records||(a?a.getRecords():[])},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},allowWrite:function(){return this.getAction()!="read"},process:function(d,b,c,a){if(b.getSuccess()!==false){this.setResponse(a);this.setResultSet(b);this.setCompleted();this.setSuccessful()}else{return false}return this["process"+Ext.String.capitalize(d)].call(this,b,c,a)},processRead:function(d){var b=d.getRecords(),g=[],f=this.getModel(),e=b.length,c,a;for(c=0;c]+>/gi,none:function(a){return a},asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){a=parseFloat(String(a).replace(/,/g,""));return isNaN(a)?0:a},asInt:function(a){a=parseInt(String(a).replace(/,/g,""),10);return isNaN(a)?0:a}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"],stripRe:/[\$,%]/g,dashesRe:/-/g,iso8601TestRe:/\d\dT\d\d/,iso8601SplitRe:/[- :T\.Z\+]/},function(){var b=this,a=Ext.data.SortTypes;Ext.apply(b,{AUTO:{convert:function(c){return c},sortType:a.none,type:"auto"},STRING:{convert:function(c){return(c===undefined||c===null)?(this.getAllowNull()?null:""):String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?parseInt(c,10):parseInt(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?c:parseFloat(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(c){if((c===undefined||c===null||c==="")&&this.getAllowNull()){return null}return c!=="false"&&!!c},sortType:a.none,type:"bool"},DATE:{convert:function(e){var c=this.getDateFormat(),d;if(!e){return null}if(Ext.isDate(e)){return e}if(c){if(c=="timestamp"){return new Date(e*1000)}if(c=="time"){return new Date(parseInt(e,10))}return Ext.Date.parse(e,c)}d=new Date(Date.parse(e));if(isNaN(d)){if(b.iso8601TestRe.test(e)){d=e.split(b.iso8601SplitRe);d=new Date(d[0],d[1]-1,d[2],d[3],d[4],d[5])}if(isNaN(d)){d=new Date(Date.parse(e.replace(this.dashesRe,"/")))}}return isNaN(d)?null:d},sortType:a.asDate,type:"date"}});Ext.apply(b,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Validations",{alternateClassName:"Ext.data.validations",singleton:true,config:{presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address"},constructor:function(a){this.initConfig(a)},getMessage:function(a){var b=this["get"+a[0].toUpperCase()+a.slice(1)+"Message"];if(b){return b.call(this)}return""},emailRe:/^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/,presence:function(a,b){if(arguments.length===1){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&da)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){if(b===undefined||b===null){b=""}return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.identifier.Simple",{alias:"data.identifier.simple",statics:{AUTO_ID:1},config:{prefix:"ext-record-"},constructor:function(a){this.initConfig(a)},generate:function(a){return this._prefix+this.self.AUTO_ID++}});Ext.define("Ext.data.identifier.Uuid",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.uuid",isUnique:true,config:{id:undefined,salt:null,timestamp:null,version:4},applyId:function(a){if(a===undefined){return Ext.data.identifier.Uuid.Global}return a},constructor:function(){var a=this;a.callParent(arguments);a.parts=[];a.init()},reconfigure:function(a){this.setConfig(a);this.init()},generate:function(){var c=this,e=c.parts,a=c.getVersion(),b=c.getSalt(),d=c.getTimestamp();e[0]=c.toHex(d.lo,8);e[1]=c.toHex(d.hi&65535,4);e[2]=c.toHex(((d.hi>>>16)&4095)|(a<<12),4);e[3]=c.toHex(128|((c.clockSeq>>>8)&63),2)+c.toHex(c.clockSeq&255,2);e[4]=c.toHex(b.hi,4)+c.toHex(b.lo,8);if(a==4){c.init()}else{++d.lo;if(d.lo>=c.twoPow32){d.lo=0;++d.hi}}return e.join("-").toLowerCase()},init:function(){var b=this,a=b.getSalt(),c=b.getTimestamp();if(b.getVersion()==4){b.clockSeq=b.rand(0,b.twoPow14-1);if(!a){a={};b.setSalt(a)}if(!c){c={};b.setTimestamp(c)}a.lo=b.rand(0,b.twoPow32-1);a.hi=b.rand(0,b.twoPow16-1);c.lo=b.rand(0,b.twoPow32-1);c.hi=b.rand(0,b.twoPow28-1)}else{b.setSalt(b.split(b.getSalt()));b.setTimestamp(b.split(b.getTimestamp()));b.getSalt().hi|=256}},twoPow14:Math.pow(2,14),twoPow16:Math.pow(2,16),twoPow28:Math.pow(2,28),twoPow32:Math.pow(2,32),toHex:function(c,b){var a=c.toString(16);if(a.length>b){a=a.substring(a.length-b)}else{if(a.length")}for(;c");for(j in k){if(k.hasOwnProperty(j)){d.push("<",j,">",k[j],"")}}d.push("")}if(h){d.push("")}a.setXmlData(d.join(""));return a}});Ext.define("Ext.direct.RemotingMethod",{config:{name:null,params:null,formHandler:null,len:null,ordered:true},constructor:function(a){this.initConfig(a)},applyParams:function(f){if(Ext.isNumber(f)){this.setLen(f)}else{if(Ext.isArray(f)){this.setOrdered(false);var d=f.length,b=[],c,e,a;for(c=0;c0){if(a){for(c=0,d=a.length;c0){k.apply(m,l)}if(a){k.call(m,e)}if(c.length>0){k.apply(m,c)}if(b){k.call(m,e)}if(o.length>0){k.apply(m,o)}}else{for(f=0;f0){k.apply(m,l)}}if(a){k.call(m,e)}for(f=0;f0){k.apply(m,c)}}if(b){k.call(m,e)}for(f=0;f0){k.apply(m,o)}}}if(m.length===0){return this}if(!h){h=[]}d.length=0;d.push.apply(d,h);d.push(null,this);this.doFire();return this},doFire:function(){var k=this.firingListeners,c=this.firingArguments,g=c.length-2,d,f,b,o,h,n,a,j,l,e,m;this.isPausing=false;this.isPaused=false;this.isStopped=false;this.isFiring=true;for(d=0,f=k.length;d0){this.isPaused=false;this.doFire()}if(a){a.resume()}return this},isInterrupted:function(){return this.isStopped||this.isPaused},stop:function(){var a=this.connectingController;this.isStopped=true;if(a){this.connectingController=null;a.stop()}this.isFiring=false;this.listenerStacks=null;return this},pause:function(){var a=this.connectingController;this.isPausing=true;if(a){a.pause()}return this}});Ext.define("Ext.event.Event",{alternateClassName:"Ext.EventObject",isStopped:false,set:function(a,b){if(arguments.length===1&&typeof a!="string"){var c=a;for(a in c){if(c.hasOwnProperty(a)){this[a]=c[a]}}}else{this[a]=c[a]}},stopEvent:function(){return this.stopPropagation()},stopPropagation:function(){this.isStopped=true;return this}});Ext.define("Ext.event.ListenerStack",{currentOrder:"current",length:0,constructor:function(){this.listeners={before:[],current:[],after:[]};this.lateBindingMap={};return this},add:function(h,j,k,e){var a=this.lateBindingMap,g=this.getAll(e),f=g.length,b,d,c;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();b=a[c];if(b){if(b[h]){return false}else{b[h]=true}}else{a[c]=b={};b[h]=true}}else{if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){d.options=k;return false}}}}d=this.create(h,j,k,e);if(k&&k.prepend){delete k.prepend;g.unshift(d)}else{g.push(d)}this.length++;return true},getAt:function(b,a){return this.getAll(a)[b]},getAll:function(a){if(!a){a=this.currentOrder}return this.listeners[a]},count:function(a){return this.getAll(a).length},create:function(d,c,b,a){return{stack:this,fn:d,firingFn:false,boundFn:false,isLateBinding:typeof d=="string",scope:c,options:b||{},order:a}},remove:function(h,j,e){var g=this.getAll(e),f=g.length,b=false,a=this.lateBindingMap,d,c;if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){g.splice(f,1);b=true;this.length--;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();if(a[c]&&a[c][h]){delete a[c][h]}}break}}}return b}});Ext.define("Ext.event.publisher.Publisher",{targetType:"",idSelectorRegex:/^#([\w\-]+)$/i,constructor:function(){var b=this.handledEvents,a,c,e,d;a=this.handledEventsMap={};for(c=0,e=b.length;cb){this.isEnded=true;return this.getEndValue()}else{return this.getStartValue()+((a/b)*this.distance)}}});Ext.define("Ext.fx.easing.Momentum",{extend:"Ext.fx.easing.Abstract",config:{acceleration:30,friction:0,startVelocity:0},alpha:0,updateFriction:function(b){var a=Math.log(1-(b/10));this.theta=a;this.alpha=a/this.getAcceleration()},updateStartVelocity:function(a){this.velocity=a*this.getAcceleration()},updateAcceleration:function(a){this.velocity=this.getStartVelocity()*a;this.alpha=this.theta/a},getValue:function(){return this.getStartValue()-this.velocity*(1-this.getFrictionFactor())/this.theta},getFrictionFactor:function(){var a=Ext.Date.now()-this.getStartTime();return Math.exp(a*this.alpha)},getVelocity:function(){return this.getFrictionFactor()*this.velocity}});Ext.define("Ext.mixin.Mixin",{onClassExtended:function(b,e){var a=e.mixinConfig,d,f,c;if(a){d=b.superclass.mixinConfig;if(d){a=e.mixinConfig=Ext.merge({},d,a)}e.mixinId=a.id;f=a.beforeHooks;c=a.hooks||a.afterHooks;if(f||c){Ext.Function.interceptBefore(e,"onClassMixedIn",function(h){var g=this.prototype;if(f){Ext.Object.each(f,function(j,i){h.override(i,function(){if(g[j].apply(this,arguments)!==false){return this.callOverridden(arguments)}})})}if(c){Ext.Object.each(c,function(j,i){h.override(i,function(){var k=this.callOverridden(arguments);g[j].apply(this,arguments);return k})})}})}}}});Ext.define("Ext.mixin.Selectable",{extend:"Ext.mixin.Mixin",mixinConfig:{id:"selectable",hooks:{updateStore:"updateStore"}},config:{disableSelection:null,mode:"SINGLE",allowDeselect:false,lastSelected:null,lastFocused:null,deselectOnContainerClick:true},modes:{SINGLE:true,SIMPLE:true,MULTI:true},selectableEventHooks:{addrecords:"onSelectionStoreAdd",removerecords:"onSelectionStoreRemove",updaterecord:"onSelectionStoreUpdate",load:"refreshSelection",refresh:"refreshSelection"},constructor:function(){this.selected=new Ext.util.MixedCollection();this.callParent(arguments)},applyMode:function(a){a=a?a.toUpperCase():"SINGLE";return this.modes[a]?a:"SINGLE"},updateStore:function(a,c){var b=this,d=Ext.apply({},b.selectableEventHooks,{scope:b});if(c&&Ext.isObject(c)&&c.isStore){if(c.autoDestroy){c.destroy()}else{c.un(d)}}if(a){a.on(d);b.refreshSelection()}},selectAll:function(a){var e=this,c=e.getStore().getRange(),d=c.length,b=0;for(;bg){e=g;g=c;c=e}for(d=c;d<=g;d++){a.push(b.getAt(d))}this.doMultiSelect(a,h)},select:function(c,e,b){var d=this,a;if(d.getDisableSelection()){return}if(typeof c==="number"){c=[d.getStore().getAt(c)]}if(!c){return}if(d.getMode()=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doSingleSelect:function(a,b){var d=this,c=d.selected;if(d.getDisableSelection()){return}if(d.isSelected(a)){return}if(c.getCount()>0){d.deselect(d.getLastSelected(),b)}c.add(a);d.setLastSelected(a);d.onItemSelect(a,b);d.setLastFocused(a);if(!b){d.fireSelectionChange([a])}},doMultiSelect:function(a,j,h){if(a===null||this.getDisableSelection()){return}a=!Ext.isArray(a)?[a]:a;var f=this,b=f.selected,e=a.length,g=false,c=0,d;if(!j&&b.getCount()>0){g=true;f.deselect(f.getSelection(),true)}for(;c0},refreshSelection:function(){var b=this,a=b.getSelection();b.deselectAll(true);if(a.length){b.select(a,false,true)}},onSelectionStoreRemove:function(c,b){var g=this,e=g.selected,f=b.length,a,d;if(g.getDisableSelection()){return}for(d=0;d0)?a[0]:b;return this.fromTouch(c)},fromTouch:function(a){return new this(a.pageX,a.pageY)},from:function(a){if(!a){return new this(0,0)}if(!(a instanceof this)){return new this(a.x,a.y)}return a}},constructor:function(a,b){if(typeof a=="undefined"){a=0}if(typeof b=="undefined"){b=0}this.x=a;this.y=b;return this},clone:function(){return new this.self(this.x,this.y)},copy:function(){return this.clone.apply(this,arguments)},copyFrom:function(a){this.x=a.x;this.y=a.y;return this},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x===a.x&&this.y===a.y)},isCloseTo:function(c,b){if(typeof b=="number"){b={x:b};b.y=b.x}var a=c.x,f=c.y,e=b.x,d=b.y;return(this.x<=a+e&&this.x>=a-e&&this.y<=f+d&&this.y>=f-d)},isWithin:function(){return this.isCloseTo.apply(this,arguments)},translate:function(a,b){this.x+=a;this.y+=b;return this},roundedEquals:function(a){return(Math.round(this.x)===Math.round(a.x)&&Math.round(this.y)===Math.round(a.y))},getDistanceTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.sqrt(c*c+a*a)},getAngleTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.atan2(a,c)*this.radianToDegreeConstant}});Ext.define("Ext.util.Region",{statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,f,a,c){var e=this;e.top=d;e[1]=d;e.right=f;e.bottom=a;e.left=c;e[0]=c},contains:function(b){var a=this;return(b.left>=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.top,g.top),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.left,g.left);if(a>d&&e>c){return new Ext.util.Region(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.top,g.top),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.left,g.left);return new Ext.util.Region(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.util.Numbers.constrain;a.top=c(a.top,b.top,b.bottom);a.bottom=c(a.bottom,b.top,b.bottom);a.left=c(a.left,b.left,b.right);a.right=c(a.right,b.left,b.right);return a},adjust:function(d,f,a,c){var e=this;e.top+=d;e.left+=c;e.right+=f;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.left){return this.left-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.top){return this.top-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(athis.right)},isOutOfBoundY:function(a){return(athis.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.left){b-=(b-this.left)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.top){b-=(b-this.top)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.left,height:this.bottom-this.top}},copy:function(){return new Ext.util.Region(this.top,this.right,this.bottom,this.left)},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a){this.left+=a.x;this.right+=a.x;this.top+=a.y;this.bottom+=a.y;return this},round:function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.util.Sorter",{isSorter:true,config:{property:null,sorterFn:null,root:null,transform:null,direction:"ASC",id:undefined},constructor:function(a){this.initConfig(a)},applyId:function(a){if(!a){a=this.getProperty();if(!a){a=Ext.id(null,"ext-sorter-")}}return a},createSortFunction:function(b){var c=this,a=c.getDirection().toUpperCase()=="DESC"?-1:1;return function(e,d){return a*b.call(c,e,d)}},defaultSortFn:function(e,c){var g=this,f=g._transform,b=g._root,d,a,h=g._property;if(b!==null){e=e[b];c=c[b]}d=e[h];a=c[h];if(f){d=f(d);a=f(a)}return d>a?1:(d -1 || Ext.isDate(values) ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e.substr(0,7)=="parent."){c=e}else{if((e.indexOf(".")!==-1)&&(e.indexOf("-")===-1)){c="values."+e}else{c="values['"+e+"']"}}}}if(f){c="("+c+f+")"}if(g&&this.useFormat){d=d?","+d:"";if(g.substr(0,5)!="this."){g="fm."+g+"("}else{g+="("}}else{d="";g="("+c+" === undefined ? '' : "}return g+c+d+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var a=this.prototype;a.fnArgs="out,values,parent,xindex,xcount";a.callFn=".call(this,"+a.fnArgs+")"});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,config:{name:null,type:"auto",convert:undefined,dateFormat:null,allowNull:true,defaultValue:undefined,mapping:null,sortType:undefined,sortDir:"ASC",allowBlank:true,persist:true,encode:null,decode:null,bubbleEvents:"action"},constructor:function(a){if(Ext.isString(a)){a={name:a}}this.initConfig(a)},applyType:function(c){var b=Ext.data.Types,a=b.AUTO;if(c){if(Ext.isString(c)){return b[c.toUpperCase()]||a}else{return c}}return a},updateType:function(a,b){var c=this.getConvert();if(b&&c===b.convert){this.setConvert(a.convert)}},applySortType:function(d){var c=Ext.data.SortTypes,a=this.getType(),b=a.sortType;if(d){if(Ext.isString(d)){return c[d]||b}else{return d}}return b},applyConvert:function(b){var a=this.getType().convert;if(b&&b!==a){this._hasCustomConvert=true;return b}else{this._hasCustomConvert=false;return a}},hasCustomConvert:function(){return this._hasCustomConvert}});Ext.define("Ext.data.identifier.Sequential",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.sequential",config:{prefix:"",seed:1},constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.getPrefix(),""]},generate:function(b){var c=this,d=c.parts,a=c.getSeed()+1;c.setSeed(a);d[1]=a;return d.join("")}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",config:{rootProperty:undefined,encode:false,allowSingle:true,encodeRequest:false},applyRootProperty:function(a){if(!a&&(this.getEncode()||this.getEncodeRequest())){a="data"}return a},writeRecords:function(d,e){var a=this.getRootProperty(),f=d.getParams(),b=this.getAllowSingle(),c;if(this.getAllowSingle()&&e&&e.length==1){e=e[0]}if(this.getEncodeRequest()){c=d.getJsonData()||{};if(e&&(e.length||(b&&Ext.isObject(e)))){c[a]=e}d.setJsonData(Ext.apply(c,f||{}));d.setParams(null);d.setMethod("POST");return d}if(!e||!(e.length||(b&&Ext.isObject(e)))){return d}if(this.getEncode()){if(a){f[a]=Ext.encode(e)}else{}}else{c=d.getJsonData()||{};if(a){c[a]=e}else{c=e}d.setJsonData(c)}return d}});Ext.define("Ext.event.Dispatcher",{requires:["Ext.event.ListenerStack","Ext.event.Controller"],statics:{getInstance:function(){if(!this.instance){this.instance=new this()}return this.instance},setInstance:function(a){this.instance=a;return this}},config:{publishers:{}},wildcard:"*",constructor:function(a){this.listenerStacks={};this.activePublishers={};this.publishersCache={};this.noActivePublishers=[];this.controller=null;this.initConfig(a);return this},getListenerStack:function(e,g,c,b){var d=this.listenerStacks,f=d[e],a;b=Boolean(b);if(!f){if(b){d[e]=f={}}else{return null}}f=f[g];if(!f){if(b){d[e][g]=f={}}else{return null}}a=f[c];if(!a){if(b){f[c]=a=new Ext.event.ListenerStack()}else{return null}}return a},getController:function(d,f,c,b){var a=this.controller,e={targetType:d,target:f,eventName:c};if(!a){this.controller=a=new Ext.event.Controller()}if(a.isFiring){a=new Ext.event.Controller()}a.setInfo(e);if(b&&a!==b){a.connect(b)}return a},applyPublishers:function(c){var a,b;this.publishersCache={};for(a in c){if(c.hasOwnProperty(a)){b=c[a];this.registerPublisher(b)}}return c},registerPublisher:function(b){var a=this.activePublishers,c=b.getTargetType(),d=a[c];if(!d){a[c]=d=[]}d.push(b);b.setDispatcher(this);return this},getCachedActivePublishers:function(c,b){var a=this.publishersCache,d;if((d=a[c])&&(d=d[b])){return d}return null},cacheActivePublishers:function(c,b,d){var a=this.publishersCache;if(!a[c]){a[c]={}}a[c][b]=d;return d},getActivePublishers:function(f,b){var g,a,c,e,d;if((g=this.getCachedActivePublishers(f,b))){return g}a=this.activePublishers[f];if(a){g=[];for(c=0,e=a.length;c0}return false},addListener:function(d,e,a){var f=this.getActivePublishers(d,a),c=f.length,b;if(c>0){for(b=0;b0){for(b=0;b0){for(b=0;b0)){return true}delete d[f];if(--d.$length===0){delete this.subscribers[a]}return true},onBeforeComponentRenderedChange:function(b,d,g){var f=this.eventNames,c=g?f.painted:f.erased,e=this.getSubscribers(c),a;if(e&&e.$length>0){this.renderedQueue[d.getId()]=a=[];this.publish(e,d,c,a)}},onBeforeComponentHiddenChange:function(c,d){var f=this.eventNames,b=d?f.erased:f.painted,e=this.getSubscribers(b),a;if(e&&e.$length>0){this.hiddenQueue[c.getId()]=a=[];this.publish(e,c,b,a)}},onComponentRenderedChange:function(b,c){var d=this.renderedQueue,e=c.getId(),a;if(!d.hasOwnProperty(e)){return}a=d[e];delete d[e];if(a.length>0){this.dispatchQueue(a)}},onComponentHiddenChange:function(c){var b=this.hiddenQueue,d=c.getId(),a;if(!b.hasOwnProperty(d)){return}a=b[d];delete b[d];if(a.length>0){this.dispatchQueue(a)}},dispatchQueue:function(g){var l=this.dispatcher,a=this.targetType,b=this.eventNames,e=g.slice(),f=e.length,c,k,h,d,j;g.length=0;if(f>0){for(c=0;c0)){return true}delete c[i];c.$length--}else{if(!d.hasOwnProperty(i)||(!j&&--d[i]>0)){return true}delete d[i];d.$length--}}else{if(g===this.SELECTOR_ALL){if(j){a.all=0}else{a.all--}}else{if(!b.hasOwnProperty(g)||(!j&&--b[g]>0)){return true}delete b[g];Ext.Array.remove(b,g)}}a.$length--;return true},getElementTarget:function(a){if(a.nodeType!==1){a=a.parentNode;if(!a||a.nodeType!==1){return null}}return a},getBubblingTargets:function(b){var a=[];if(!b){return a}do{a[a.length]=b;b=b.parentNode}while(b&&b.nodeType===1);return a},dispatch:function(c,a,b){b.push(b[0].target);this.callParent(arguments)},publish:function(b,a,c){var d=this.getSubscribers(b),e;if(d.$length===0||!this.doPublish(d,b,a,c)){e=this.getSubscribers("*");if(e.$length>0){this.doPublish(e,b,a,c)}}return this},doPublish:function(f,h,x,u){var r=f.id,g=f.className,b=f.selector,p=r.$length>0,a=g.$length>0,l=b.length>0,o=f.all>0,y={},e=[u],q=false,m=this.classNameSplitRegex,v,k,t,d,z,n,c,w,s;for(v=0,k=x.length;v0){c=a.slice(0);a.length=0;for(b=0;b0){this.processEvent(this.mergeEvents(d));d.length=0}this.processEvent(e)}}if(d.length>0){this.processEvent(this.mergeEvents(d));d.length=0}}},mergeEvents:function(c){var b=[],f=c.length,a,e,d;d=c[f-1];if(f===1){return d}for(a=0;ah){for(d=0;dh){return}}for(d=0;da){this.end(d)}}},onTouchEnd:function(a){this.end(a)},start:function(){if(!this.isTracking){this.isTracking=true;this.isStarted=false}},end:function(a){if(this.isTracking){this.isTracking=false;if(this.isStarted){this.isStarted=false;this.fireEnd(a)}}}});Ext.define("Ext.event.recognizer.Pinch",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["pinchstart","pinch","pinchend"],startDistance:0,lastTouches:null,onTouchMove:function(c){if(!this.isTracking){return}var b=Array.prototype.slice.call(c.touches),d,a,f;d=b[0].point;a=b[1].point;f=d.getDistanceTo(a);if(f===0){return}if(!this.isStarted){this.isStarted=true;this.startDistance=f;this.fire("pinchstart",c,b,{touches:b,distance:f,scale:1})}else{this.fire("pinch",c,b,{touches:b,distance:f,scale:f/this.startDistance})}this.lastTouches=b},fireEnd:function(a){this.fire("pinchend",a,this.lastTouches)},fail:function(){return this.callParent(arguments)}});Ext.define("Ext.event.recognizer.Rotate",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["rotatestart","rotate","rotateend"],startAngle:0,lastTouches:null,lastAngle:null,onTouchMove:function(h){if(!this.isTracking){return}var g=Array.prototype.slice.call(h.touches),b=this.lastAngle,d,f,c,a,i,j;d=g[0].point;f=g[1].point;c=d.getAngleTo(f);if(b!==null){j=Math.abs(b-c);a=c+360;i=c-360;if(Math.abs(a-b)1){return this.fail(this.self.NOT_SINGLE_TOUCH)}}});Ext.define("Ext.event.recognizer.DoubleTap",{extend:"Ext.event.recognizer.SingleTouch",config:{maxDuration:300},handledEvents:["singletap","doubletap"],singleTapTimer:null,onTouchStart:function(a){if(this.callParent(arguments)===false){return false}this.startTime=a.time;clearTimeout(this.singleTapTimer)},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onEnd:function(g){var c=this,b=this.getMaxDuration(),h=g.changedTouches[0],f=g.time,a=this.lastTapTime,d;this.lastTapTime=f;if(a){d=f-a;if(d<=b){this.lastTapTime=0;this.fire("doubletap",g,[h],{touch:h,duration:d});return}}if(f-this.startTime>b){this.fireSingleTap(g,h)}else{this.singleTapTimer=setTimeout(function(){c.fireSingleTap(g,h)},b)}},fireSingleTap:function(a,b){this.fire("singletap",a,[b],{touch:b})}});Ext.define("Ext.event.recognizer.Drag",{extend:"Ext.event.recognizer.SingleTouch",isStarted:false,startPoint:null,previousPoint:null,lastPoint:null,handledEvents:["dragstart","drag","dragend"],onTouchStart:function(b){var c,a;if(this.callParent(arguments)===false){if(this.isStarted&&this.lastMoveEvent!==null){this.onTouchEnd(this.lastMoveEvent)}return false}this.startTouches=c=b.changedTouches;this.startTouch=a=c[0];this.startPoint=a.point},onTouchMove:function(d){var c=d.changedTouches,f=c[0],a=f.point,b=d.time;if(this.lastPoint){this.previousPoint=this.lastPoint}if(this.lastTime){this.previousTime=this.lastTime}this.lastTime=b;this.lastPoint=a;this.lastMoveEvent=d;if(!this.isStarted){this.isStarted=true;this.startTime=b;this.previousTime=b;this.previousPoint=this.startPoint;this.fire("dragstart",d,this.startTouches,this.getInfo(d,this.startTouch))}else{this.fire("drag",d,c,this.getInfo(d,f))}},onTouchEnd:function(c){if(this.isStarted){var b=c.changedTouches,d=b[0],a=d.point;this.isStarted=false;this.lastPoint=a;this.fire("dragend",c,b,this.getInfo(c,d));this.startTime=0;this.previousTime=0;this.lastTime=0;this.startPoint=null;this.previousPoint=null;this.lastPoint=null;this.lastMoveEvent=null}},getInfo:function(j,i){var d=j.time,a=this.startPoint,f=this.previousPoint,b=this.startTime,k=this.previousTime,l=this.lastPoint,h=l.x-a.x,g=l.y-a.y,c={touch:i,startX:a.x,startY:a.y,previousX:f.x,previousY:f.y,pageX:l.x,pageY:l.y,deltaX:h,deltaY:g,absDeltaX:Math.abs(h),absDeltaY:Math.abs(g),previousDeltaX:l.x-f.x,previousDeltaY:l.y-f.y,time:d,startTime:b,previousTime:k,deltaTime:d-b,previousDeltaTime:d-k};return c}});Ext.define("Ext.event.recognizer.LongPress",{extend:"Ext.event.recognizer.SingleTouch",inheritableStatics:{DURATION_NOT_ENOUGH:32},config:{minDuration:1000},handledEvents:["longpress"],fireLongPress:function(a){var b=a.changedTouches[0];this.fire("longpress",a,[b],{touch:b,duration:this.getMinDuration()});this.isLongPress=true},onTouchStart:function(b){var a=this;if(this.callParent(arguments)===false){return false}this.isLongPress=false;this.timer=setTimeout(function(){a.fireLongPress(b)},this.getMinDuration())},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(){if(!this.isLongPress){return this.fail(this.self.DURATION_NOT_ENOUGH)}},fail:function(){clearTimeout(this.timer);return this.callParent(arguments)}},function(){this.override({handledEvents:["longpress","taphold"],fire:function(a){if(a==="longpress"){var b=Array.prototype.slice.call(arguments);b[0]="taphold";this.fire.apply(this,b)}return this.callOverridden(arguments)}})});Ext.define("Ext.event.recognizer.Tap",{handledEvents:["tap"],extend:"Ext.event.recognizer.SingleTouch",onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(a){var b=a.changedTouches[0];this.fire("tap",a,[b])}},function(){});(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,f){return c[f]})}Ext.DateExtras={now:Date.now||function(){return +new Date()},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var f=(d||"").match(e);return f?new Date(((f[1]||"")+f[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return a.monthNames[c].substring(0,3)},getShortDayName:function(c){return a.dayNames[c].substring(0,3)},getMonthNumber:function(c){return a.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var j="Y-m-dTH:i:sP",g=[],f=0,d=j.length;f= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(l){var e=a.parseRegexes.length,m=1,f=[],k=[],j=false,d="";for(var h=0;h Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)"},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a.formatCodeToRegex("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a.formatCodeToRegex("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var f=0,d=c.length;f0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(f){var e=0,h=Ext.Date.clone(f),c=f.getMonth(),g;for(g=0,h.setDate(1),h.setMonth(0);g28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(g),"mo",h)).getDate())}i.setDate(e);i.setMonth(g.getMonth()+h);break;case Ext.Date.YEAR:i.setFullYear(g.getFullYear()+h);break}return i},between:function(d,f,c){var e=d.getTime();return f.getTime()<=e&&e<=c.getTime()}};var a=Ext.DateExtras;Ext.apply(Ext.Date,a)})();Ext.define("Ext.fx.Easing",{requires:["Ext.fx.easing.Linear"],constructor:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")}});Ext.define("Ext.fx.easing.BoundMomentum",{extend:"Ext.fx.easing.Abstract",requires:["Ext.fx.easing.Momentum","Ext.fx.easing.Bounce"],config:{momentum:null,bounce:null,minMomentumValue:0,maxMomentumValue:0,minVelocity:0.01,startVelocity:0},applyMomentum:function(a,b){return Ext.factory(a,Ext.fx.easing.Momentum,b)},applyBounce:function(a,b){return Ext.factory(a,Ext.fx.easing.Bounce,b)},updateStartTime:function(a){this.getMomentum().setStartTime(a);this.callParent(arguments)},updateStartVelocity:function(a){this.getMomentum().setStartVelocity(a)},updateStartValue:function(a){this.getMomentum().setStartValue(a)},reset:function(){this.lastValue=null;this.isBouncingBack=false;this.isOutOfBound=false;return this.callParent(arguments)},getValue:function(){var a=this.getMomentum(),j=this.getBounce(),e=a.getStartVelocity(),f=e>0?1:-1,g=this.getMinMomentumValue(),d=this.getMaxMomentumValue(),c=(f==1)?d:g,h=this.lastValue,i,b;if(e===0){return this.getStartValue()}if(!this.isOutOfBound){i=a.getValue();b=a.getVelocity();if(Math.abs(b)=g&&i<=d){return i}this.isOutOfBound=true;j.setStartTime(Ext.Date.now()).setStartVelocity(b).setStartValue(c)}i=j.getValue();if(!this.isEnded){if(!this.isBouncingBack){if(h!==null){if((f==1&&ih)){this.isBouncingBack=true}}}else{if(Math.round(i)==c){this.isEnded=true}}}this.lastValue=i;return i}});Ext.define("Ext.fx.easing.EaseIn",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-in",config:{exponent:4,duration:1500},getValue:function(){var c=Ext.Date.now()-this.getStartTime(),g=this.getDuration(),b=this.getStartValue(),a=this.getEndValue(),h=this.distance,e=c/g,d=Math.pow(e,this.getExponent()),f=b+(d*h);if(c>=g){this.isEnded=true;return a}return f}});Ext.define("Ext.fx.easing.EaseOut",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-out",config:{exponent:4,duration:1500},getValue:function(){var f=Ext.Date.now()-this.getStartTime(),d=this.getDuration(),b=this.getStartValue(),h=this.getEndValue(),a=this.distance,c=f/d,g=1-c,e=1-Math.pow(g,this.getExponent()),i=b+(e*a);if(f>=d){this.isEnded=true;return h}return i}});Ext.define("Ext.mixin.Filterable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Filter"],mixinConfig:{id:"filterable"},config:{filters:null,filterRoot:null},dirtyFilterFn:false,filterFn:null,filtered:false,applyFilters:function(a,b){if(!b){b=this.createFiltersCollection()}b.clear();this.filtered=false;this.dirtyFilterFn=true;if(a){this.addFilters(a)}return b},createFiltersCollection:function(){this._filters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._filters},addFilter:function(a){this.addFilters([a])},addFilters:function(b){var a=this.getFilters();return this.insertFilters(a?a.length:0,b)},insertFilter:function(a,b){return this.insertFilters(a,[b])},insertFilters:function(h,c){if(!Ext.isArray(c)){c=[c]}var j=c.length,a=this.getFilterRoot(),d=this.getFilters(),e=[],f,g,b;if(!d){d=this.createFiltersCollection()}for(g=0;g=200&&a<300)||a==304||(a==0&&d.responseText.length>0),b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var g=c.xhr,a={},h,d,i,e,f,b;if(c.timedout||c.aborted){c.success=false;h=[]}else{h=g.getAllResponseHeaders().replace(this.lineBreakRe,"\n").split("\n")}d=h.length;while(d--){i=h[d];e=i.indexOf(":");if(e>=0){f=i.substr(0,e).toLowerCase();if(i.charAt(e+1)==" "){++e}a[f]=i.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:g.status,statusText:g.statusText,getResponseHeader:function(j){return a[j.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:g.responseText,responseXML:g.responseXML};g=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:["Ext.mixin.Observable"],isReader:true,config:{idProperty:undefined,clientIdProperty:"clientId",totalProperty:"total",successProperty:"success",messageProperty:null,rootProperty:"",implicitIncludes:true,model:undefined},constructor:function(a){this.initConfig(a)},fieldCount:0,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},applyIdProperty:function(a){if(!a&&this.getModel()){a=this.getModel().getIdProperty()}return a},updateModel:function(a){if(a){if(!this.getIdProperty()){this.setIdProperty(a.getIdProperty())}this.buildExtractors()}},createAccessor:Ext.emptyFn,createFieldAccessExpression:function(){return"undefined"},buildExtractors:function(){if(!this.getModel()){return}var b=this,c=b.getTotalProperty(),a=b.getSuccessProperty(),d=b.getMessageProperty();if(c){b.getTotal=b.createAccessor(c)}if(a){b.getSuccess=b.createAccessor(a)}if(d){b.getMessage=b.createAccessor(d)}b.extractRecordData=b.buildRecordDataExtractor()},buildRecordDataExtractor:function(){var k=this,e=k.getModel(),g=e.getFields(),j=g.length,a=[],h=k.getModel().getClientIdProperty(),f="__field",b=["var me = this,\n"," fields = me.getModel().getFields(),\n"," idProperty = me.getIdProperty(),\n",' idPropertyIsFn = (typeof idProperty == "function"),'," value,\n"," internalId"],d,l,c,m;g=g.items;for(d=0;d=0){return Ext.functionFactory("obj","var value; try {value = obj"+(b>0?".":"")+c+"} catch(e) {}; return value;")}}return function(d){return d[c]}}}(),createFieldAccessExpression:function(g,b,c){var f=this,h=f.objectRe,e=(g.getMapping()!==null),a=e?g.getMapping():g.getName(),i,d;if(typeof a==="function"){i=b+".getMapping()("+c+", this)"}else{if(f.getUseSimpleAccessors()===true||((d=String(a).search(h))<0)){if(!e||isNaN(a)){a='"'+a+'"'}i=c+"["+a+"]"}else{i=c+(d>0?".":"")+a}}return i}});Ext.define("Ext.data.proxy.Proxy",{extend:"Ext.Evented",alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json","Ext.data.Batch","Ext.data.Operation"],config:{batchOrder:"create,update,destroy",batchActions:true,model:null,reader:{type:"json"},writer:{type:"json"}},isProxy:true,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},updateModel:function(b){if(b){var a=this.getReader();if(a&&!a.getModel()){a.setModel(b)}}},applyReader:function(b,a){return Ext.factory(b,Ext.data.Reader,a,"reader")},updateReader:function(a){if(a){var b=this.getModel();if(!b){b=a.getModel();if(b){this.setModel(b)}}else{a.setModel(b)}if(a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}}},onMetaChange:function(b){var a=this.getReader().getModel();if(!this.getModel()&&a){this.setModel(a)}this.fireEvent("metachange",this,b)},applyWriter:function(b,a){return Ext.factory(b,Ext.data.Writer,a,"writer")},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.getReader(),this.getWriter())},batch:function(e,f){var g=this,d=g.getBatchActions(),c=this.getModel(),b,a;if(e.operations===undefined){e={operations:e,batch:{listeners:f}}}if(e.batch){if(e.batch.isBatch){e.batch.setProxy(g)}else{e.batch.proxy=g}}else{e.batch={proxy:g,listeners:e.listeners||{}}}if(!b){b=new Ext.data.Batch(e.batch)}b.on("complete",Ext.bind(g.onBatchComplete,g,[e],0));Ext.each(g.getBatchOrder().split(","),function(h){a=e.operations[h];if(a){if(d){b.add(new Ext.data.Operation({action:h,records:a,model:c}))}else{Ext.each(a,function(i){b.add(new Ext.data.Operation({action:h,records:[i],model:c}))})}}},g);b.start();return b},onBatchComplete:function(a,b){var c=a.scope||this;if(b.hasException){if(Ext.isFunction(a.failure)){Ext.callback(a.failure,c,[b,a])}}else{if(Ext.isFunction(a.success)){Ext.callback(a.success,c,[b,a])}}if(Ext.isFunction(a.callback)){Ext.callback(a.callback,c,[b,a])}}},function(){});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.proxy.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",isMemoryProxy:true,config:{data:[]},finishOperation:function(b,f,d){if(b){var c=0,e=b.getRecords(),a=e.length;for(c;c0){if(o){h[e]=m[0].getProperty();h[b]=m[0].getDirection()}else{h[e]=n.encodeSorters(m)}}if(c&&f&&f.length>0){h[c]=n.encodeFilters(f)}return h},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.getNoCache()){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.getCacheString(),Ext.Date.now()))}return a},getUrl:function(a){return a?a.getUrl()||this.getApi()[a.getAction()]||this._url:this._url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],config:{defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true},doRequest:function(a,f,b){var d=this,c=d.buildRequest(a),e=c.getParams();c.setConfig({callbackKey:d.getCallbackKey(),timeout:d.getTimeout(),scope:d,callback:d.createRequestCallback(c,a,f,b)});if(d.getAutoAppendParams()){c.setParams({})}c.setJsonP(Ext.data.JsonP.request(c.getCurrentConfig()));c.setParams(e);a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(h,f,g){delete c.lastRequest;c.processResponse(h,a,d,f,e,b)}},setException:function(b,a){b.setException(b.getRequest().getJsonP().errorType)},buildUrl:function(f){var h=this,a=h.callParent(arguments),e=Ext.apply({},f.getParams()),c=e.filters,d,b,g,j;delete e.filters;if(h.getAutoAppendParams()){a=Ext.urlAppend(a,Ext.Object.toQueryString(e))}if(c&&c.length){for(g=0;g1){this.endAnimationCounter=0;this.fireEvent("animationend",this)}},applyInAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},applyOutAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},updateInAnimation:function(a){a.setScope(this)},updateOutAnimation:function(a){a.setScope(this)},onActiveItemChange:function(a,e,h,i,d){var b=this.getInAnimation(),g=this.getOutAnimation(),f,c;if(e&&h&&h.isPainted()){f=e.renderElement;c=h.renderElement;b.setElement(f);g.setElement(c);g.setOnBeforeEnd(function(j,k){if(k||Ext.Animator.hasRunningAnimations(j)){d.firingArguments[1]=null;d.firingArguments[2]=null}});g.setOnEnd(function(){d.resume()});f.dom.style.setProperty("visibility","hidden","!important");e.show();Ext.Animator.run([g,b]);d.pause()}}});Ext.define("Ext.fx.layout.card.Cover",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cover",config:{reverse:null,inAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out"},outAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1},out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Cube",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cube",config:{reverse:null,inAnimation:{type:"cube"},outAnimation:{type:"cube",out:true}}});Ext.define("Ext.fx.layout.card.Fade",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.fade",config:{reverse:null,inAnimation:{type:"fade",easing:"ease-out"},outAnimation:{type:"fade",easing:"ease-out",out:true}}});Ext.define("Ext.fx.layout.card.Flip",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.flip",config:{duration:500,inAnimation:{type:"flip",half:true,easing:"ease-out",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null}},outAnimation:{type:"flip",half:true,easing:"ease-in",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null},out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Pop",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.pop",config:{duration:500,inAnimation:{type:"pop",easing:"ease-out"},outAnimation:{type:"pop",easing:"ease-in",out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Reveal",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.reveal",config:{inAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1}},outAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Slide",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.slide",config:{inAnimation:{type:"slide",easing:"ease-out"},outAnimation:{type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.Card",{requires:["Ext.fx.layout.card.Slide","Ext.fx.layout.card.Cover","Ext.fx.layout.card.Reveal","Ext.fx.layout.card.Fade","Ext.fx.layout.card.Flip","Ext.fx.layout.card.Pop","Ext.fx.layout.card.Scroll"],constructor:function(b){var a=Ext.fx.layout.card.Abstract,c;if(!b){return null}if(typeof b=="string"){c=b;b={}}else{if(b.type){c=b.type}}b.elementBox=false;if(c){if(Ext.os.is.Android2){if(c!="fade"){c="scroll"}}else{if(c==="slide"&&Ext.browser.is.ChromeMobile){c="scroll"}}a=Ext.ClassManager.getByAlias("fx.layout.card."+c)}return Ext.factory(b,a)}});Ext.define("Ext.fx.runner.Css",{extend:"Ext.Evented",requires:["Ext.fx.Animation"],prefixedProperties:{transform:true,"transform-origin":true,perspective:true,"transform-style":true,transition:true,"transition-property":true,"transition-duration":true,"transition-timing-function":true,"transition-delay":true,animation:true,"animation-name":true,"animation-duration":true,"animation-iteration-count":true,"animation-direction":true,"animation-timing-function":true,"animation-delay":true},lengthProperties:{top:true,right:true,bottom:true,left:true,width:true,height:true,"max-height":true,"max-width":true,"min-height":true,"min-width":true,"margin-bottom":true,"margin-left":true,"margin-right":true,"margin-top":true,"padding-bottom":true,"padding-left":true,"padding-right":true,"padding-top":true,"border-bottom-width":true,"border-left-width":true,"border-right-width":true,"border-spacing":true,"border-top-width":true,"border-width":true,"outline-width":true,"letter-spacing":true,"line-height":true,"text-indent":true,"word-spacing":true,"font-size":true,translate:true,translateX:true,translateY:true,translateZ:true,translate3d:true},durationProperties:{"transition-duration":true,"transition-delay":true,"animation-duration":true,"animation-delay":true},angleProperties:{rotate:true,rotateX:true,rotateY:true,rotateZ:true,skew:true,skewX:true,skewY:true},lengthUnitRegex:/([a-z%]*)$/,DEFAULT_UNIT_LENGTH:"px",DEFAULT_UNIT_ANGLE:"deg",DEFAULT_UNIT_DURATION:"ms",formattedNameCache:{},constructor:function(){var a=Ext.feature.has.Css3dTransforms;if(a){this.transformMethods=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","scaleX","scaleY","scaleZ"]}else{this.transformMethods=["translateX","translateY","rotate","skewX","skewY","scaleX","scaleY"]}this.vendorPrefix=Ext.browser.getStyleDashPrefix();this.ruleStylesCache={};return this},getStyleSheet:function(){var c=this.styleSheet,a,b;if(!c){a=document.createElement("style");a.type="text/css";(document.head||document.getElementsByTagName("head")[0]).appendChild(a);b=document.styleSheets;this.styleSheet=c=b[b.length-1]}return c},applyRules:function(i){var g=this.getStyleSheet(),k=this.ruleStylesCache,j=g.cssRules,c,e,h,b,d,a,f;for(c in i){e=i[c];h=k[c];if(h===undefined){d=j.length;g.insertRule(c+"{}",d);h=k[c]=j.item(d).style}b=h.$cache;if(!b){b=h.$cache={}}for(a in e){f=this.formatValue(e[a],a);a=this.formatName(a);if(b[a]!==f){b[a]=f;if(f===null){h.removeProperty(a)}else{h.setProperty(a,f,"important")}}}}return this},applyStyles:function(d){var g,c,f,b,a,e;for(g in d){c=document.getElementById(g);if(!c){return this}f=c.style;b=d[g];for(a in b){e=this.formatValue(b[a],a);a=this.formatName(a);if(e===null){f.removeProperty(a)}else{f.setProperty(a,e,"important")}}}return this},formatName:function(b){var a=this.formattedNameCache,c=a[b];if(!c){if(this.prefixedProperties[b]){c=this.vendorPrefix+b}else{c=b}a[b]=c}return c},formatValue:function(j,b){var g=typeof j,l=this.DEFAULT_UNIT_LENGTH,e,a,d,f,c,k,h;if(g=="string"){if(this.lengthProperties[b]){h=j.match(this.lengthUnitRegex)[1];if(h.length>0){}else{return j+l}}return j}else{if(g=="number"){if(j==0){return"0"}if(this.lengthProperties[b]){return j+l}if(this.angleProperties[b]){return j+this.DEFAULT_UNIT_ANGLE}if(this.durationProperties[b]){return j+this.DEFAULT_UNIT_DURATION}}else{if(b==="transform"){e=this.transformMethods;c=[];for(d=0,f=e.length;d0)?k.join(", "):"none"}}}}return j}});Ext.define("Ext.fx.runner.CssTransition",{extend:"Ext.fx.runner.Css",listenersAttached:false,constructor:function(){this.runningAnimationsData={};return this.callParent(arguments)},attachListeners:function(){this.listenersAttached=true;this.getEventDispatcher().addListener("element","*","transitionend","onTransitionEnd",this)},onTransitionEnd:function(b){var a=b.target,c=a.id;if(c&&this.runningAnimationsData.hasOwnProperty(c)){this.refreshRunningAnimationsData(Ext.get(a),[b.browserEvent.propertyName])}},onAnimationEnd:function(g,f,d,j,n){var c=g.getId(),k=this.runningAnimationsData[c],o={},m={},b,h,e,l,a;d.un("stop","onAnimationStop",this);if(k){b=k.nameMap}o[c]=m;if(f.onBeforeEnd){f.onBeforeEnd.call(f.scope||this,g,j)}d.fireEvent("animationbeforeend",d,g,j);this.fireEvent("animationbeforeend",this,d,g,j);if(n||(!j&&!f.preserveEndState)){h=f.toPropertyNames;for(e=0,l=h.length;e0},refreshRunningAnimationsData:function(d,k,t,p){var g=d.getId(),q=this.runningAnimationsData,a=q[g];if(!a){return}var m=a.nameMap,s=a.nameList,b=a.sessions,f,h,e,u,l,c,r,o,n=false;t=Boolean(t);p=Boolean(p);if(!b){return this}f=b.length;if(f===0){return this}if(p){a.nameMap={};s.length=0;for(l=0;l");d.close();this.testElement=c=d.createElement("div");c.style.setProperty("position","absolute","!important");d.body.appendChild(c);this.testElementComputedStyle=window.getComputedStyle(c)}return c},getCssStyleValue:function(b,e){var d=this.getTestElement(),a=this.testElementComputedStyle,c=d.style;c.setProperty(b,e);e=a.getPropertyValue(b);c.removeProperty(b);return e},run:function(p){var F=this,h=this.lengthProperties,x={},E={},G={},d,s,y,e,u,I,v,q,r,a,A,z,o,B,l,t,g,C,H,k,f,w,n,c,D,b,m;if(!this.listenersAttached){this.attachListeners()}p=Ext.Array.from(p);for(A=0,o=p.length;A0){this.refreshRunningAnimationsData(d,Ext.Array.merge(I,v),true,G.replacePrevious)}c=a.nameMap;D=a.nameList;t={};for(z=0;z0){I=Ext.Array.difference(D,I);v=Ext.Array.merge(I,v);y["transition-property"]=I}E[s]=e=Ext.Object.chain(e);e["transition-property"]=v;e["transition-duration"]=G.duration;e["transition-timing-function"]=G.easing;e["transition-delay"]=G.delay;B.startTime=Date.now()}r=this.$className;this.applyStyles(x);q=function(i){if(i.data===r&&i.source===window){window.removeEventListener("message",q,false);F.applyStyles(E)}};window.addEventListener("message",q,false);window.postMessage(r,"*")},onAnimationStop:function(d){var f=this.runningAnimationsData,h,a,g,b,c,e;for(h in f){if(f.hasOwnProperty(h)){a=f[h];g=a.sessions;for(b=0,c=g.length;b component"})},reapply:function(){this.container.innerElement.addCls(this.cls);this.updatePack(this.getPack());this.updateAlign(this.getAlign())},unapply:function(){this.container.innerElement.removeCls(this.cls);this.updatePack(null);this.updateAlign(null)},doItemAdd:function(d,b){this.callParent(arguments);if(d.isInnerItem()){var c=d.getConfig(this.sizePropertyName),a=d.config;if(!c&&("flex" in a)){this.setItemFlex(d,a.flex)}}},doItemRemove:function(a){if(a.isInnerItem()){this.setItemFlex(a,null)}this.callParent(arguments)},onItemSizeChange:function(a){this.setItemFlex(a,null)},doItemCenteredChange:function(b,a){if(a){this.setItemFlex(b,null)}this.callParent(arguments)},doItemFloatingChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},doItemDockedChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},redrawContainer:function(){var a=this.container,b=a.renderElement.dom.parentNode;if(b&&b.nodeType!==11){a.innerElement.redraw()}},setItemFlex:function(c,a){var b=c.element,d=this.flexItemCls;if(a){b.addCls(d)}else{if(b.hasCls(d)){this.redrawContainer();b.removeCls(d)}}b.dom.style.webkitBoxFlex=a},convertPosition:function(a){if(this.positionMap.hasOwnProperty(a)){return this.positionMap[a]}return a},applyAlign:function(a){return this.convertPosition(a)},updateAlign:function(a){this.container.innerElement.dom.style.webkitBoxAlign=a},applyPack:function(a){return this.convertPosition(a)},updatePack:function(a){this.container.innerElement.dom.style.webkitBoxPack=a}});Ext.define("Ext.layout.Fit",{extend:"Ext.layout.Default",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",cls:Ext.baseCSSPrefix+"layout-fit",itemCls:Ext.baseCSSPrefix+"layout-fit-item",constructor:function(a){this.callParent(arguments);this.apply()},apply:function(){this.container.innerElement.addCls(this.cls)},reapply:function(){this.apply()},unapply:function(){this.container.innerElement.removeCls(this.cls)},doItemAdd:function(b,a){if(b.isInnerItem()){b.addCls(this.itemCls)}this.callParent(arguments)},doItemRemove:function(a){if(a.isInnerItem()){a.removeCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.Card",{extend:"Ext.layout.Fit",alternateClassName:"Ext.layout.CardLayout",isCard:true,requires:["Ext.fx.layout.Card"],alias:"layout.card",cls:Ext.baseCSSPrefix+"layout-card",itemCls:Ext.baseCSSPrefix+"layout-card-item",constructor:function(){this.callParent(arguments);this.container.onInitialized(this.onContainerInitialized,this)},applyAnimation:function(a){return new Ext.fx.layout.Card(a)},updateAnimation:function(b,a){if(b&&b.isAnimation){b.setLayout(this)}if(a){a.destroy()}},doItemAdd:function(b,a){if(b.isInnerItem()){b.hide()}this.callParent(arguments)},getInnerItemsContainer:function(){var a=this.innerItemsContainer;if(!a){this.innerItemsContainer=a=Ext.Element.create({className:this.cls+"-container"});this.container.innerElement.append(a)}return a},doItemRemove:function(c,a,b){this.callParent(arguments);if(!b&&c.isInnerItem()){c.show()}},onContainerInitialized:function(a){var b=a.getActiveItem();if(b){b.show()}a.on("activeitemchange","onContainerActiveItemChange",this)},onContainerActiveItemChange:function(a){this.relayEvent(arguments,"doActiveItemChange")},doActiveItemChange:function(b,c,a){if(a){a.hide()}if(c){c.show()}},doItemDockedChange:function(b,c){var a=b.element;if(c){a.removeCls(this.itemCls)}else{a.addCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.HBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.HBoxLayout",alias:"layout.hbox",sizePropertyName:"width",sizeChangeEventName:"widthchange",cls:Ext.baseCSSPrefix+"layout-hbox"});Ext.define("Ext.layout.VBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.VBoxLayout",alias:"layout.vbox",sizePropertyName:"height",sizeChangeEventName:"heightchange",cls:Ext.baseCSSPrefix+"layout-vbox"});Ext.define("Ext.layout.Layout",{requires:["Ext.layout.Fit","Ext.layout.Card","Ext.layout.HBox","Ext.layout.VBox"],constructor:function(a,b){var c=Ext.layout.Default,d,e;if(typeof b=="string"){d=b;b={}}else{if("type" in b){d=b.type}}if(d){c=Ext.ClassManager.getByAlias("layout."+d)}return new c(a,b)}});Ext.define("Ext.mixin.Sortable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Sorter"],mixinConfig:{id:"sortable"},config:{sorters:null,defaultSortDirection:"ASC",sortRoot:null},dirtySortFn:false,sortFn:null,sorted:false,applySorters:function(a,b){if(!b){b=this.createSortersCollection()}b.clear();this.sorted=false;if(a){this.addSorters(a)}return b},createSortersCollection:function(){this._sorters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._sorters},addSorter:function(b,a){this.addSorters([b],a)},addSorters:function(c,a){var b=this.getSorters();return this.insertSorters(b?b.length:0,c,a)},insertSorter:function(a,c,b){return this.insertSorters(a,[c],b)},insertSorters:function(e,h,a){if(!Ext.isArray(h)){h=[h]}var f=h.length,j=a||this.getDefaultSortDirection(),c=this.getSortRoot(),k=this.getSorters(),l=[],g,b,m,d;if(!k){k=this.createSortersCollection()}for(b=0;b>1;f=d(e,b[c]);if(f>=0){h=c+1}else{if(f<0){a=c-1}}}return h}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.mixin.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,f=e,c=b,a;if(arguments.length==1){f=c;c=d.getKey(f)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,f)}d.map[c]=f}d.length++;d.items.push(f);d.keys.push(c);d.fireEvent("add",d.length-1,f,c);return f},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(f){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(f)){b=arguments.length>1?arguments:f;for(a=b.length;d=d.length){return d.add(c,f)}d.length++;Ext.Array.splice(d.items,a,0,f);if(typeof c!="undefined"&&c!==null){d.map[c]=f}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,f,c);return f},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(g,b,h,a){var c=this.extractValues(g,b),f=c.length,e=0,d;h=h||0;a=(a||a===0)?a:f-1;for(d=h;d<=a;d++){e+=c[d]}return e},collect:function(j,e,g){var k=this.extractValues(j,e),a=k.length,b={},c=[],h,f,d;for(d=0;d=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,f,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:f,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(g){var m=true,n=b.length,h;for(h=0;h=e.length||(a&&e.getAutoSort())){return e.add(d,f)}if(typeof d!="undefined"&&d!==null){if(typeof g[d]!="undefined"){e.replace(d,f);return false}g[d]=f}this.all.push(f);if(b&&this.getAutoFilter()&&this.mixins.filterable.isFiltered.call(e,f)){return null}e.length++;Ext.Array.splice(e.items,c,0,f);Ext.Array.splice(e.keys,c,0,d);e.dirtyIndices=true;return f},insertAll:function(g,d){if(g>=this.items.length||(this.sorted&&this.getAutoSort())){return this.addAll(d)}var s=this,h=this.filtered,a=this.sorted,b=this.all,m=this.items,l=this.keys,r=this.map,n=this.getAutoFilter(),o=this.getAutoSort(),t=[],j=[],f=[],c=this.mixins.filterable,e=false,k,u,p,q;if(a&&this.getAutoSort()){}if(Ext.isObject(d)){for(u in d){if(d.hasOwnProperty(u)){j.push(m[u]);t.push(u)}}}else{j=d;k=d.length;for(p=0;p=0){e=a[b];c=f[b];if(typeof c!="undefined"){delete g.map[c]}Ext.Array.erase(a,b,1);Ext.Array.erase(f,b,1);Ext.Array.remove(d,e);delete g.indices[c];g.length--;this.dirtyIndices=true;return e}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[this.getKey(b)];return(a===undefined)?-1:a},indexOfKey:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[b];return(a===undefined)?-1:a},updateIndices:function(){var a=this.items,e=a.length,f=this.indices={},c,d,b;for(c=0;c=a;d--){b[b.length]=c[d]}}return b},findIndexBy:function(d,c,h){var g=this,f=g.keys,a=g.items,b=h||0,e=a.length;for(;b1){for(c=a.length;ba){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!=-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.util.Format.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.util.Format.escapeRe,"\\$1")},toggle:function(b,c,a){return b==c?a:c},trim:function(a){return a.replace(Ext.util.Format.trimRe,"")},leftPad:function(d,b,c){var a=String(d);c=c||" ";while(a.length/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},date:function(b,c){var a=b;if(!b){return""}if(!Ext.isDate(b)){a=new Date(Date.parse(b));if(isNaN(a)){if(this.iso8601TestRe.test(b)){a=b.split(this.iso8601SplitRe);a=new Date(a[0],a[1]-1,a[2],a[3],a[4],a[5])}if(isNaN(a)){a=new Date(Date.parse(b.replace(this.dashesRe,"/")))}}b=a}return Ext.Date.format(b,c||Ext.util.Format.defaultDateFormat)}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e>1){for(;cf)?1:((ba?1:(d0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,j,h){var f=this,c,e,d,g,a;if(Ext.isArray(b)){for(c=0,e=b.length;c0){Ext.Array.sort(d,f);for(c=0;cMath.max(c,b)||jMath.max(a,q)||eMath.max(p,n)||eMath.max(k,h)){return null}return new Ext.util.Point(j,e)},toString:function(){return this.point1.toString()+" "+this.point2.toString()}});Ext.define("Ext.util.SizeMonitor",{extend:"Ext.Evented",config:{element:null,detectorCls:Ext.baseCSSPrefix+"size-change-detector",callback:Ext.emptyFn,scope:null,args:[]},constructor:function(d){this.initConfig(d);this.doFireSizeChangeEvent=Ext.Function.bind(this.doFireSizeChangeEvent,this);var g=this,e=this.getElement().dom,b=this.getDetectorCls(),c=Ext.Element.create({classList:[b,b+"-expand"],children:[{}]},true),h=Ext.Element.create({classList:[b,b+"-shrink"],children:[{}]},true),a=function(i){g.onDetectorScroll("expand",i)},f=function(i){g.onDetectorScroll("shrink",i)};e.appendChild(c);e.appendChild(h);this.detectors={expand:c,shrink:h};this.position={expand:{left:0,top:0},shrink:{left:0,top:0}};this.listeners={expand:a,shrink:f};this.refresh();c.addEventListener("scroll",a,true);h.addEventListener("scroll",f,true)},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(a){a.on("destroy","destroy",this)},refreshPosition:function(b){var e=this.detectors[b],a=this.position[b],d,c;a.left=d=e.scrollWidth-e.offsetWidth;a.top=c=e.scrollHeight-e.offsetHeight;e.scrollLeft=d;e.scrollTop=c},refresh:function(){this.refreshPosition("expand");this.refreshPosition("shrink")},onDetectorScroll:function(b){var c=this.detectors[b],a=this.position[b];if(c.scrollLeft!==a.left||c.scrollTop!==a.top){this.refresh();this.fireSizeChangeEvent()}},fireSizeChangeEvent:function(){clearTimeout(this.sizeChangeThrottleTimer);this.sizeChangeThrottleTimer=setTimeout(this.doFireSizeChangeEvent,1)},doFireSizeChangeEvent:function(){this.getCallback().apply(this.getScope(),this.getArgs())},destroyDetector:function(a){var c=this.detectors[a],b=this.listeners[a];c.removeEventListener("scroll",b,true);Ext.removeNode(c)},destroy:function(){this.callParent(arguments);this.destroyDetector("expand");this.destroyDetector("shrink");delete this.listeners;delete this.detectors}});Ext.define("Ext.event.publisher.ComponentSize",{extend:"Ext.event.publisher.Publisher",requires:["Ext.ComponentManager","Ext.util.SizeMonitor"],targetType:"component",handledEvents:["resize"],constructor:function(){this.callParent(arguments);this.sizeMonitors={}},subscribe:function(g){var c=g.match(this.idSelectorRegex),f=this.subscribers,a=this.sizeMonitors,d=this.dispatcher,e=this.targetType,b;if(!c){return false}if(!f.hasOwnProperty(g)){f[g]=0;d.addListener(e,g,"painted","onComponentPainted",this,null,"before");b=Ext.ComponentManager.get(c[1]);a[g]=new Ext.util.SizeMonitor({element:b.element,callback:this.onComponentSizeChange,scope:this,args:[this,g]})}f[g]++;return true},unsubscribe:function(h,b,e){var c=h.match(this.idSelectorRegex),g=this.subscribers,d=this.dispatcher,f=this.targetType,a=this.sizeMonitors;if(!c){return false}if(!g.hasOwnProperty(h)||(!e&&--g[h]>0)){return true}a[h].destroy();delete a[h];d.removeListener(f,h,"painted","onComponentPainted",this,"before");delete g[h];return true},onComponentPainted:function(b){var c=b.getObservableId(),a=this.sizeMonitors[c];a.refresh()},onComponentSizeChange:function(a,b){this.dispatcher.doDispatchEvent(this.targetType,b,"resize",[a])}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create("Ext.util.AbstractMixedCollection",false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(g,f,c,e){var d=this,h,b,a;if(Ext.isArray(g)){e=c;c=f;a=g}else{if(Ext.isObject(g)){e=c;c=f;a=[g]}else{if(Ext.isString(g)){h=d.sorters.get(g);if(!h){h={property:g,direction:f};a=[h]}else{if(f===undefined){h.toggle()}else{h.setDirection(f)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){g=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(g)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}if(e!==false){d.onBeforeSort(a)}}if(e!==false){g=d.sorters.items;if(g.length){b=function(l,k){var j=g[0].sort(l,k),n=g.length,m;for(m=1;me?1:(f0){g=f.data.items;r=g.length;for(k=0;k0){b.create=e;f=true}if(c.length>0){b.update=c;f=true}if(a.length>0){b.destroy=a;f=true}if(f&&d.fireEvent("beforesync",this,b)!==false){d.getProxy().batch({operations:b,listeners:d.getBatchListeners()})}return{added:e,updated:c,removed:a}},first:function(){return this.data.first()},last:function(){return this.data.last()},sum:function(e){var d=0,c=0,b=this.data.items,a=b.length;for(;c0){c=b[0].get(f)}for(;d0){a=c[0].get(f)}for(;da){a=e}}return a},average:function(e){var c=0,b=this.data.items,a=b.length,d=0;if(b.length>0){for(;ce){return 1}else{if(fa.data.index)?1:-1},applyFilters:function(b){var a=this;return function(c){return a.isVisible(c)}},applyProxy:function(a){},applyNode:function(a){if(a){a=Ext.data.NodeInterface.decorate(a)}return a},updateNode:function(a,c){if(c&&!c.isDestroyed){c.un({append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad",scope:this});c.unjoin(this)}if(a){a.on({scope:this,append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad"});a.join(this);var b=[];if(a.childNodes.length){b=b.concat(this.retrieveChildNodes(a))}if(this.getRootVisible()){b.push(a)}else{if(a.isLoaded()||a.isLoading()){a.set("expanded",true)}}this.data.clear();this.fireEvent("clear",this);this.suspendEvents();this.add(b);this.resumeEvents();this.fireEvent("refresh",this,this.data)}},retrieveChildNodes:function(a){var d=this.getNode(),b=this.getRecursive(),c=[],e=a;if(!a.childNodes.length||(!b&&a!==d)){return c}if(!b){return a.childNodes}while(e){if(e._added){delete e._added;if(e===a){break}else{e=e.nextSibling||e.parentNode}}else{if(e!==a){c.push(e)}if(e.firstChild){e._added=true;e=e.firstChild}else{e=e.nextSibling||e.parentNode}}}return c},isVisible:function(b){var a=b.parentNode;if(!this.getRecursive()&&a!==this.getNode()){return false}while(a){if(!a.isExpanded()){return false}if(a===this.getNode()){break}a=a.parentNode}return true}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.NodeStore",alias:"store.tree",config:{root:undefined,clearOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",recursive:true},applyProxy:function(){return Ext.data.Store.prototype.applyProxy.apply(this,arguments)},applyRoot:function(a){var b=this;a=a||{};a=Ext.apply({},a);if(!a.isModel){Ext.applyIf(a,{id:b.getStoreId()+"-"+b.getDefaultRootId(),text:"Root",allowDrag:false});a=Ext.data.ModelManager.create(a,b.getModel())}Ext.data.NodeInterface.decorate(a);a.set(a.raw);return a},handleTreeInsertionIndex:function(a,b,d,c){if(b.parentNode){b.parentNode.sort(d.getSortFn(),true,true)}return this.callParent(arguments)},handleTreeSort:function(a,b){if(this._sorting){return a}this._sorting=true;this.getNode().sort(b.getSortFn(),true,true);delete this._sorting;return this.callParent(arguments)},updateRoot:function(a,b){if(b){b.unBefore({expand:"onNodeBeforeExpand",scope:this});b.unjoin(this)}a.onBefore({expand:"onNodeBeforeExpand",scope:this});this.onNodeAppend(null,a);this.setNode(a);if(!a.isLoaded()&&!a.isLoading()&&a.isExpanded()){this.load({node:a})}this.fireEvent("rootchange",this,a,b)},getNodeById:function(a){return this.data.getByKey(a)},onNodeBeforeExpand:function(b,a,c){if(b.isLoading()){c.pause();this.on("load",function(){c.resume()},this,{single:true})}else{if(!b.isLoaded()){c.pause();this.load({node:b,callback:function(){c.resume()}})}}},onNodeAppend:function(n,c){var l=this.getProxy(),j=l.getReader(),b=this.getModel(),g=c.raw,d=[],a=j.getRootProperty(),m,h,f,k,e;if(!c.isLeaf()){m=j.getRoot(g);if(m){h=j.extractData(m);for(f=0,k=h.length;f0){this.sendRequest(b==1?a[0]:a);this.callBuffer=[]}}});Ext.define("Ext.util.TapRepeater",{requires:["Ext.DateExtras"],mixins:{observable:"Ext.mixin.Observable"},config:{el:null,accelerate:true,interval:10,delay:250,preventDefault:true,stopDefault:false,timer:0,pressCls:null},constructor:function(a){var b=this;b.initConfig(a)},updateEl:function(c,b){var a={touchstart:"onTouchStart",touchend:"onTouchEnd",tap:"eventOptions",scope:this};if(b){b.un(a)}c.on(a)},eventOptions:function(a){if(this.getPreventDefault()){a.preventDefault()}if(this.getStopDefault()){a.stopEvent()}},destroy:function(){this.clearListeners();Ext.destroy(this.el)},onTouchStart:function(c){var b=this,a=b.getPressCls();clearTimeout(b.getTimer());if(a){b.getEl().addCls(a)}b.tapStartTime=new Date();b.fireEvent("touchstart",b,c);b.fireEvent("tap",b,c);if(b.getAccelerate()){b.delay=400}b.setTimer(Ext.defer(b.tap,b.getDelay()||b.getInterval(),b,[c]))},tap:function(b){var a=this;a.fireEvent("tap",a,b);a.setTimer(Ext.defer(a.tap,a.getAccelerate()?a.easeOutExpo(Ext.Date.getElapsed(a.tapStartTime),400,-390,12000):a.getInterval(),a,[b]))},easeOutExpo:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},onTouchEnd:function(b){var a=this;clearTimeout(a.getTimer());a.getEl().removeCls(a.getPressCls());a.fireEvent("touchend",a,b)}});Ext.define("Ext.util.translatable.Abstract",{extend:"Ext.Evented",requires:["Ext.fx.easing.Linear"],config:{element:null,easing:null,easingX:null,easingY:null,fps:60},constructor:function(a){var b;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.x=0;this.y=0;this.activeEasingX=null;this.activeEasingY=null;this.initialConfig=a;if(a&&a.element){b=a.element;this.setElement(b)}},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initConfig(this.initialConfig);this.refresh()},factoryEasing:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")},applyEasing:function(a){if(!this.getEasingX()){this.setEasingX(this.factoryEasing(a))}if(!this.getEasingY()){this.setEasingY(this.factoryEasing(a))}},applyEasingX:function(a){return this.factoryEasing(a)},applyEasingY:function(a){return this.factoryEasing(a)},updateFps:function(a){this.animationInterval=1000/a},doTranslate:function(a,b){if(typeof a=="number"){this.x=a}if(typeof b=="number"){this.y=b}return this},translate:function(a,c,b){if(!this.getElement().dom){return}if(Ext.isObject(a)){throw new Error()}this.stopAnimation();if(b){return this.translateAnimated(a,c,b)}return this.doTranslate(a,c)},animate:function(b,a){this.activeEasingX=b;this.activeEasingY=a;this.isAnimating=true;this.animationTimer=setInterval(this.doAnimationFrame,this.animationInterval);this.fireEvent("animationstart",this,this.x,this.y);return this},translateAnimated:function(b,g,e){if(Ext.isObject(b)){throw new Error()}if(!Ext.isObject(e)){e={}}var d=Ext.Date.now(),f=e.easing,c=(typeof b=="number")?(e.easingX||this.getEasingX()||f||true):null,a=(typeof g=="number")?(e.easingY||this.getEasingY()||f||true):null;if(c){c=this.factoryEasing(c);c.setStartTime(d);c.setStartValue(this.x);c.setEndValue(b);if("duration" in e){c.setDuration(e.duration)}}if(a){a=this.factoryEasing(a);a.setStartTime(d);a.setStartValue(this.y);a.setEndValue(g);if("duration" in e){a.setDuration(e.duration)}}return this.animate(c,a)},doAnimationFrame:function(){var c=this.activeEasingX,b=this.activeEasingY,d=this.getElement(),a,e;if(!this.isAnimating||!d.dom){return}if(c===null&&b===null){this.stopAnimation();return}if(c!==null){this.x=a=Math.round(c.getValue());if(c.isEnded){this.activeEasingX=null;this.fireEvent("axisanimationend",this,"x",a)}}else{a=this.x}if(b!==null){this.y=e=Math.round(b.getValue());if(b.isEnded){this.activeEasingY=null;this.fireEvent("axisanimationend",this,"y",e)}}else{e=this.y}this.doTranslate(a,e);this.fireEvent("animationframe",this,a,e)},stopAnimation:function(){if(!this.isAnimating){return}this.activeEasingX=null;this.activeEasingY=null;this.isAnimating=false;clearInterval(this.animationTimer);this.fireEvent("animationend",this,this.x,this.y)},refresh:function(){this.translate(this.x,this.y)}});Ext.define("Ext.util.translatable.CssTransform",{extend:"Ext.util.translatable.Abstract",doTranslate:function(a,c){var b=this.getElement().dom.style;if(typeof a!="number"){a=this.x}if(typeof c!="number"){c=this.y}b.webkitTransform="translate3d("+a+"px, "+c+"px, 0px)";return this.callParent(arguments)},destroy:function(){var a=this.getElement();if(a&&!a.isDestroyed){a.dom.style.webkitTransform=null}this.callParent(arguments)}});Ext.define("Ext.util.translatable.ScrollPosition",{extend:"Ext.util.translatable.Abstract",wrapperWidth:0,wrapperHeight:0,baseCls:"x-translatable",config:{useWrapper:true},getWrapper:function(){var e=this.wrapper,c=this.baseCls,b=this.getElement(),d,a;if(!e){a=b.getParent();if(!a){return null}if(this.getUseWrapper()){e=b.wrap({className:c+"-wrapper"},true)}else{e=a.dom}e.appendChild(Ext.Element.create({className:c+"-stretcher"},true));this.nestedStretcher=d=Ext.Element.create({className:c+"-nested-stretcher"},true);b.appendChild(d);b.addCls(c);a.addCls(c+"-container");this.container=a;this.wrapper=e;this.refresh()}return e},doTranslate:function(a,c){var b=this.getWrapper();if(b){if(typeof a=="number"){b.scrollLeft=this.wrapperWidth-a}if(typeof c=="number"){b.scrollTop=this.wrapperHeight-c}}return this.callParent(arguments)},refresh:function(){var a=this.getWrapper();if(a){this.wrapperWidth=a.offsetWidth;this.wrapperHeight=a.offsetHeight;this.callParent(arguments)}},destroy:function(){var b=this.getElement(),a=this.baseCls;if(this.wrapper){if(this.getUseWrapper()){b.unwrap()}this.container.removeCls(a+"-container");b.removeCls(a);b.removeChild(this.nestedStretcher)}this.callParent(arguments)}});Ext.define("Ext.util.Translatable",{requires:["Ext.util.translatable.CssTransform","Ext.util.translatable.ScrollPosition"],constructor:function(a){var c=Ext.util.translatable,e=c.CssTransform,d=c.ScrollPosition,b;if(typeof a=="object"&&"translationMethod" in a){if(a.translationMethod==="scrollposition"){b=d}else{if(a.translationMethod==="csstransform"){b=e}}}if(!b){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){b=d}else{b=e}}return new b(a)}});Ext.define("Ext.behavior.Translatable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Translatable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.translatable.refresh()},setConfig:function(c){var a=this.translatable,b=this.component;if(c){if(!a){this.translatable=a=new Ext.util.Translatable(c);a.setElement(b.renderElement);a.on("destroy","onTranslatableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getTranslatable:function(){return this.translatable},onTranslatableDestroy:function(){var a=this.component;delete this.translatable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.translatable;if(a){a.destroy()}}});Ext.define("Ext.scroll.Scroller",{extend:"Ext.Evented",requires:["Ext.fx.easing.BoundMomentum","Ext.fx.easing.EaseOut","Ext.util.SizeMonitor","Ext.util.Translatable"],config:{element:null,direction:"auto",translationMethod:"auto",fps:"auto",disabled:null,directionLock:false,momentumEasing:{momentum:{acceleration:30,friction:0.5},bounce:{acceleration:30,springTension:0.3},minVelocity:1},bounceEasing:{duration:400},outOfBoundRestrictFactor:0.5,startMomentumResetTime:300,maxAbsoluteVelocity:6,containerSize:"auto",containerScrollSize:"auto",size:"auto",autoRefresh:true,initialOffset:{x:0,y:0},slotSnapSize:{x:0,y:0},slotSnapOffset:{x:0,y:0},slotSnapEasing:{duration:150}},cls:Ext.baseCSSPrefix+"scroll-scroller",containerCls:Ext.baseCSSPrefix+"scroll-container",dragStartTime:0,dragEndTime:0,isDragging:false,isAnimating:false,constructor:function(a){var b=a&&a.element;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.stopAnimation=Ext.Function.bind(this.stopAnimation,this);this.listeners={scope:this,touchstart:"onTouchStart",touchend:"onTouchEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd"};this.minPosition={x:0,y:0};this.startPosition={x:0,y:0};this.size={x:0,y:0};this.position={x:0,y:0};this.velocity={x:0,y:0};this.isAxisEnabledFlags={x:false,y:false};this.flickStartPosition={x:0,y:0};this.flickStartTime={x:0,y:0};this.lastDragPosition={x:0,y:0};this.dragDirection={x:0,y:0};this.initialConfig=a;if(b){this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initialize();a.addCls(this.cls);if(!this.getDisabled()){this.attachListeneners()}this.onConfigUpdate(["containerSize","size"],"refreshMaxPosition");this.on("maxpositionchange","snapToBoundary");this.on("minpositionchange","snapToBoundary");return this},getTranslatable:function(){if(!this.hasOwnProperty("translatable")){var a=this.getBounceEasing();this.translatable=new Ext.util.Translatable({translationMethod:this.getTranslationMethod(),element:this.getElement(),easingX:a.x,easingY:a.y,useWrapper:false,listeners:{animationframe:"onAnimationFrame",animationend:"onAnimationEnd",axisanimationend:"onAxisAnimationEnd",scope:this}})}return this.translatable},updateFps:function(a){if(a!=="auto"){this.getTranslatable().setFps(a)}},attachListeneners:function(){this.getContainer().on(this.listeners)},detachListeners:function(){this.getContainer().un(this.listeners)},updateDisabled:function(a){if(a){this.detachListeners()}else{this.attachListeneners()}},updateInitialOffset:function(c){if(typeof c=="number"){c={x:c,y:c}}var b=this.position,a,d;b.x=a=c.x;b.y=d=c.y;this.getTranslatable().doTranslate(-a,-d)},applyDirection:function(a){var e=this.getMinPosition(),d=this.getMaxPosition(),c,b;this.givenDirection=a;if(a==="auto"){c=d.x>e.x;b=d.y>e.y;if(c&&b){a="both"}else{if(c){a="horizontal"}else{a="vertical"}}}return a},updateDirection:function(b){var a=this.isAxisEnabledFlags;a.x=(b==="both"||b==="horizontal");a.y=(b==="both"||b==="vertical")},isAxisEnabled:function(a){this.getDirection();return this.isAxisEnabledFlags[a]},applyMomentumEasing:function(b){var a=Ext.fx.easing.BoundMomentum;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applyBounceEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applySlotSnapEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},getMinPosition:function(){var a=this.minPosition;if(!a){this.minPosition=a={x:0,y:0};this.fireEvent("minpositionchange",this,a)}return a},getMaxPosition:function(){var c=this.maxPosition,a,b;if(!c){a=this.getSize();b=this.getContainerSize();this.maxPosition=c={x:Math.max(0,a.x-b.x),y:Math.max(0,a.y-b.y)};this.fireEvent("maxpositionchange",this,c)}return c},refreshMaxPosition:function(){this.maxPosition=null;this.getMaxPosition()},applyContainerSize:function(b){var c=this.getContainer().dom,a,d;if(!c){return}this.givenContainerSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applySize:function(b){var c=this.getElement().dom,a,d;if(!c){return}this.givenSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applyContainerScrollSize:function(b){var c=this.getContainer().dom,a,d;if(!c){return}this.givenContainerScrollSize=b;if(b==="auto"){a=c.scrollWidth;d=c.scrollHeight}else{a=b.x;d=b.y}return{x:a,y:d}},updateAutoRefresh:function(b){var c=Ext.util.SizeMonitor,a;if(b){this.sizeMonitors={element:new c({element:this.getElement(),callback:this.doRefresh,scope:this}),container:new c({element:this.getContainer(),callback:this.doRefresh,scope:this})}}else{a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}}},applySlotSnapSize:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},applySlotSnapOffset:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},getContainer:function(){var a=this.container;if(!a){this.container=a=this.getElement().getParent();a.addCls(this.containerCls)}return a},doRefresh:function(){this.stopAnimation();this.getTranslatable().refresh();this.setSize(this.givenSize);this.setContainerSize(this.givenContainerSize);this.setContainerScrollSize(this.givenContainerScrollSize);this.setDirection(this.givenDirection);this.fireEvent("refresh",this)},refresh:function(){var a=this.sizeMonitors;if(a){a.element.refresh();a.container.refresh()}this.doRefresh();return this},scrollTo:function(c,h,g){var b=this.getTranslatable(),a=this.position,d=false,f,e;if(this.isAxisEnabled("x")){if(typeof c!="number"){c=a.x}else{if(a.x!==c){a.x=c;d=true}}f=-c}if(this.isAxisEnabled("y")){if(typeof h!="number"){h=a.y}else{if(a.y!==h){a.y=h;d=true}}e=-h}if(d){if(g!==undefined){b.translateAnimated(f,e,g)}else{this.fireEvent("scroll",this,a.x,a.y);b.doTranslate(f,e)}}return this},scrollToTop:function(b){var a=this.getInitialOffset();return this.scrollTo(a.x,a.y,b)},scrollToEnd:function(a){return this.scrollTo(0,this.getSize().y-this.getContainerSize().y,a)},scrollBy:function(b,d,c){var a=this.position;b=(typeof b=="number")?b+a.x:null;d=(typeof d=="number")?d+a.y:null;return this.scrollTo(b,d,c)},onTouchStart:function(){this.isTouching=true;this.stopAnimation()},onTouchEnd:function(){var a=this.position;this.isTouching=false;if(!this.isDragging&&this.snapToSlot()){this.fireEvent("scrollstart",this,a.x,a.y)}},onDragStart:function(l){var o=this.getDirection(),g=l.absDeltaX,f=l.absDeltaY,j=this.getDirectionLock(),i=this.startPosition,d=this.flickStartPosition,k=this.flickStartTime,h=this.lastDragPosition,c=this.position,b=this.dragDirection,n=c.x,m=c.y,a=Ext.Date.now();this.isDragging=true;if(j&&o!=="both"){if((o==="horizontal"&&g>f)||(o==="vertical"&&f>g)){l.stopPropagation()}else{this.isDragging=false;return}}h.x=n;h.y=m;d.x=n;d.y=m;i.x=n;i.y=m;k.x=a;k.y=a;b.x=0;b.y=0;this.dragStartTime=a;this.isDragging=true;this.fireEvent("scrollstart",this,n,m)},onAxisDrag:function(i,q){if(!this.isAxisEnabled(i)){return}var h=this.flickStartPosition,l=this.flickStartTime,j=this.lastDragPosition,e=this.dragDirection,g=this.position[i],k=this.getMinPosition()[i],o=this.getMaxPosition()[i],d=this.startPosition[i],p=j[i],n=d-q,c=e[i],m=this.getOutOfBoundRestrictFactor(),f=this.getStartMomentumResetTime(),b=Ext.Date.now(),a;if(no){a=n-o;n=o+a*m}}if(n>p){e[i]=1}else{if(nf){h[i]=g;l[i]=b}j[i]=n},onDrag:function(b){if(!this.isDragging){return}var a=this.lastDragPosition;this.onAxisDrag("x",b.deltaX);this.onAxisDrag("y",b.deltaY);this.scrollTo(a.x,a.y)},onDragEnd:function(c){var b,a;if(!this.isDragging){return}this.dragEndTime=Ext.Date.now();this.onDrag(c);this.isDragging=false;b=this.getAnimationEasing("x");a=this.getAnimationEasing("y");if(b||a){this.getTranslatable().animate(b,a)}else{this.onScrollEnd()}},getAnimationEasing:function(g){if(!this.isAxisEnabled(g)){return null}var e=this.position[g],f=this.flickStartPosition[g],k=this.flickStartTime[g],c=this.getMinPosition()[g],j=this.getMaxPosition()[g],a=this.getMaxAbsoluteVelocity(),d=null,b=this.dragEndTime,l,i,h;if(ej){d=j}}if(d!==null){l=this.getBounceEasing()[g];l.setConfig({startTime:b,startValue:-e,endValue:-d});return l}h=b-k;if(h===0){return null}i=(e-f)/(b-k);if(i===0){return null}if(i<-a){i=-a}else{if(i>a){i=a}}l=this.getMomentumEasing()[g];l.setConfig({startTime:b,startValue:-e,startVelocity:-i,minMomentumValue:-j,maxMomentumValue:0});return l},onAnimationFrame:function(c,b,d){var a=this.position;a.x=-b;a.y=-d;this.fireEvent("scroll",this,a.x,a.y)},onAxisAnimationEnd:function(a){},onAnimationEnd:function(){this.snapToBoundary();this.onScrollEnd()},stopAnimation:function(){this.getTranslatable().stopAnimation()},onScrollEnd:function(){var a=this.position;if(this.isTouching||!this.snapToSlot()){this.fireEvent("scrollend",this,a.x,a.y)}},snapToSlot:function(){var b=this.getSnapPosition("x"),a=this.getSnapPosition("y"),c=this.getSlotSnapEasing();if(b!==null||a!==null){this.scrollTo(b,a,{easingX:c.x,easingY:c.y});return true}return false},getSnapPosition:function(c){var g=this.getSlotSnapSize()[c],d=null,a,f,e,b;if(g!==0&&this.isAxisEnabled(c)){a=this.position[c];f=this.getSlotSnapOffset()[c];e=this.getMaxPosition()[c];b=(a-f)%g;if(b!==0){if(Math.abs(b)>g/2){d=a+((b>0)?g-b:b-g);if(d>e){d=a-b}}else{d=a-b}}}return d},snapToBoundary:function(){var g=this.position,c=this.getMinPosition(),f=this.getMaxPosition(),e=c.x,d=c.y,b=f.x,a=f.y,i=Math.round(g.x),h=Math.round(g.y);if(ib){i=b}}if(ha){h=a}}this.scrollTo(i,h)},destroy:function(){var b=this.getElement(),a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}if(b&&!b.isDestroyed){b.removeCls(this.cls);this.getContainer().removeCls(this.containerCls)}Ext.destroy(this.translatable);this.callParent(arguments)}},function(){});Ext.define("Ext.util.Draggable",{isDraggable:true,mixins:["Ext.mixin.Observable"],requires:["Ext.util.SizeMonitor","Ext.util.Translatable"],config:{cls:Ext.baseCSSPrefix+"draggable",draggingCls:Ext.baseCSSPrefix+"dragging",element:null,constraint:"container",disabled:null,direction:"both",initialOffset:{x:0,y:0},translatable:{}},DIRECTION_BOTH:"both",DIRECTION_VERTICAL:"vertical",DIRECTION_HORIZONTAL:"horizontal",defaultConstraint:{min:{x:-Infinity,y:-Infinity},max:{x:Infinity,y:Infinity}},sizeMonitor:null,containerSizeMonitor:null,constructor:function(a){var b;this.extraConstraint={};this.initialConfig=a;this.offset={x:0,y:0};this.listeners={dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",scope:this};if(a&&a.element){b=a.element;delete a.element;this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){a.on(this.listeners);this.sizeMonitor=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.initConfig(this.initialConfig)},updateInitialOffset:function(b){if(typeof b=="number"){b={x:b,y:b}}var c=this.offset,a,d;c.x=a=b.x;c.y=d=b.y;this.getTranslatable().doTranslate(a,d)},updateCls:function(a){this.getElement().addCls(a)},applyTranslatable:function(a,b){a=Ext.factory(a,Ext.util.Translatable,b);a.setElement(this.getElement());return a},setExtraConstraint:function(a){this.extraConstraint=a||{};this.refreshConstraint();return this},addExtraConstraint:function(a){Ext.merge(this.extraConstraint,a);this.refreshConstraint();return this},applyConstraint:function(a){this.currentConstraint=a;if(!a){a=this.defaultConstraint}if(a==="container"){return Ext.merge(this.getContainerConstraint(),this.extraConstraint)}return Ext.merge({},this.extraConstraint,a)},updateConstraint:function(){this.refreshOffset()},getContainerConstraint:function(){var b=this.getContainer(),c=this.getElement();if(!b||!c.dom){return this.defaultConstraint}var h=c.dom,g=b.dom,d=h.offsetWidth,a=h.offsetHeight,f=g.offsetWidth,e=g.offsetHeight;return{min:{x:0,y:0},max:{x:f-d,y:e-a}}},getContainer:function(){var a=this.container;if(!a){a=this.getElement().getParent();if(a){this.containerSizeMonitor=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.container=a;a.on("destroy","onContainerDestroy",this)}}return a},onContainerDestroy:function(){delete this.container;delete this.containerSizeMonitor},detachListeners:function(){this.getElement().un(this.listeners)},isAxisEnabled:function(a){var b=this.getDirection();if(a==="x"){return(b===this.DIRECTION_BOTH||b===this.DIRECTION_HORIZONTAL)}return(b===this.DIRECTION_BOTH||b===this.DIRECTION_VERTICAL)},onDragStart:function(a){if(this.getDisabled()){return false}var b=this.offset;this.fireAction("dragstart",[this,a,b.x,b.y],this.initDragStart)},initDragStart:function(b,c,a,d){this.dragStartOffset={x:a,y:d};this.isDragging=true;this.getElement().addCls(this.getDraggingCls())},onDrag:function(b){if(!this.isDragging){return}var a=this.dragStartOffset;this.fireAction("drag",[this,b,a.x+b.deltaX,a.y+b.deltaY],this.doDrag)},doDrag:function(b,c,a,d){b.setOffset(a,d)},onDragEnd:function(a){if(!this.isDragging){return}this.onDrag(a);this.isDragging=false;this.getElement().removeCls(this.getDraggingCls());this.fireEvent("dragend",this,a,this.offset.x,this.offset.y)},setOffset:function(i,h,b){var f=this.offset,a=this.getConstraint(),e=a.min,c=a.max,d=Math.min,g=Math.max;if(this.isAxisEnabled("x")&&typeof i=="number"){i=d(g(i,e.x),c.x)}else{i=f.x}if(this.isAxisEnabled("y")&&typeof h=="number"){h=d(g(h,e.y),c.y)}else{h=f.y}f.x=i;f.y=h;this.getTranslatable().translate(i,h,b)},getOffset:function(){return this.offset},refreshConstraint:function(){this.setConstraint(this.currentConstraint)},refreshOffset:function(){var a=this.offset;this.setOffset(a.x,a.y)},doRefresh:function(){this.refreshConstraint();this.getTranslatable().refresh();this.refreshOffset()},refresh:function(){if(this.sizeMonitor){this.sizeMonitor.refresh()}if(this.containerSizeMonitor){this.containerSizeMonitor.refresh()}this.doRefresh()},enable:function(){return this.setDisabled(false)},disable:function(){return this.setDisabled(true)},destroy:function(){var a=this.getTranslatable();Ext.destroy(this.containerSizeMonitor,this.sizeMonitor);delete this.sizeMonitor;delete this.containerSizeMonitor;var b=this.getElement();if(b&&!b.isDestroyed){b.removeCls(this.getCls())}this.detachListeners();if(a){a.destroy()}}},function(){});Ext.define("Ext.behavior.Draggable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Draggable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.draggable.refresh()},setConfig:function(c){var a=this.draggable,b=this.component;if(c){if(!a){b.setTranslatable(true);this.draggable=a=new Ext.util.Draggable(c);a.setTranslatable(b.getTranslatable());a.setElement(b.renderElement);a.on("destroy","onDraggableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getDraggable:function(){return this.draggable},onDraggableDestroy:function(){var a=this.component;delete this.draggable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.draggable;if(a){a.destroy()}}});(function(a){Ext.define("Ext.Component",{extend:"Ext.AbstractComponent",alternateClassName:"Ext.lib.Component",mixins:["Ext.mixin.Traversable"],requires:["Ext.ComponentManager","Ext.XTemplate","Ext.dom.Element","Ext.behavior.Translatable","Ext.behavior.Draggable"],xtype:"component",observableType:"component",cachedConfig:{baseCls:null,cls:null,floatingCls:null,hiddenCls:a+"item-hidden",ui:null,margin:null,padding:null,border:null,styleHtmlCls:a+"html",styleHtmlContent:null},eventedConfig:{left:null,top:null,right:null,bottom:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,docked:null,centered:null,hidden:null,disabled:null},config:{style:null,html:null,draggable:null,translatable:null,renderTo:null,zIndex:null,tpl:null,enterAnimation:null,exitAnimation:null,showAnimation:null,hideAnimation:null,tplWriteMode:"overwrite",data:null,disabledCls:a+"item-disabled",contentEl:null,itemId:undefined,record:null,plugins:null},listenerOptionsRegex:/^(?:delegate|single|delay|buffer|args|prepend|element)$/,alignmentRegex:/^([a-z]+)-([a-z]+)(\?)?$/,isComponent:true,floating:false,rendered:false,dockPositions:{top:true,right:true,bottom:true,left:true},innerElement:null,element:null,template:[],constructor:function(c){var d=this,b=d.config,e;d.onInitializedListeners=[];d.initialConfig=c;if(c!==undefined&&"id" in c){e=c.id}else{if("id" in b){e=b.id}else{e=d.getId()}}d.id=e;d.setId(e);Ext.ComponentManager.register(d);d.initElement();d.initConfig(d.initialConfig);d.initialize();d.triggerInitialized();if(d.config.fullscreen){d.fireEvent("fullscreen",d)}d.fireEvent("initialize",d)},beforeInitConfig:function(b){this.beforeInitialize.apply(this,arguments)},beforeInitialize:Ext.emptyFn,initialize:Ext.emptyFn,getTemplate:function(){return this.template},getElementConfig:function(){return{reference:"element",children:this.getTemplate()}},triggerInitialized:function(){var c=this.onInitializedListeners,d=c.length,e,b;if(!this.initialized){this.initialized=true;if(d>0){for(b=0;b0){c.pressedTimeout=setTimeout(function(){delete c.pressedTimeout;if(a){a.addCls(b)}},d)}else{a.addCls(b)}}},onRelease:function(a){this.fireAction("release",[this,a],"doRelease")},doRelease:function(a,b){if(!a.getDisabled()){if(a.hasOwnProperty("pressedTimeout")){clearTimeout(a.pressedTimeout);delete a.pressedTimeout}else{a.element.removeCls(a.getPressedCls())}}},onTap:function(a){if(this.getDisabled()){return false}this.fireAction("tap",[this,a],"doTap")},doTap:function(c,d){var b=c.getHandler(),a=c.getScope()||c;if(!b){return}if(typeof b=="string"){b=a[b]}d.preventDefault();b.apply(a,arguments)}},function(){});Ext.define("Ext.Decorator",{extend:"Ext.Component",isDecorator:true,config:{component:{}},statics:{generateProxySetter:function(a){return function(c){var b=this.getComponent();b[a].call(b,c);return this}},generateProxyGetter:function(a){return function(){var b=this.getComponent();return b[a].call(b)}}},onClassExtended:function(c,e){if(!e.hasOwnProperty("proxyConfig")){return}var f=Ext.Class,i=e.proxyConfig,d=e.config;e.config=(d)?Ext.applyIf(d,i):i;var b,h,g,a;for(b in i){if(i.hasOwnProperty(b)){h=f.getConfigNameMap(b);g=h.set;a=h.get;e[g]=this.generateProxySetter(g);e[a]=this.generateProxyGetter(a)}}},applyComponent:function(a){return Ext.factory(a,Ext.Component)},updateComponent:function(a,b){if(b){if(this.isRendered()&&b.setRendered(false)){b.fireAction("renderedchange",[this,b,false],"doUnsetComponent",this,{args:[b]})}else{this.doUnsetComponent(b)}}if(a){if(this.isRendered()&&a.setRendered(true)){a.fireAction("renderedchange",[this,a,true],"doSetComponent",this,{args:[a]})}else{this.doSetComponent(a)}}},doUnsetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.removeChild(a.renderElement.dom)}},doSetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.appendChild(a.renderElement.dom)}},setRendered:function(b){var a;if(this.callParent(arguments)){a=this.getComponent();if(a){a.setRendered(b)}return true}return false},setDisabled:function(a){this.callParent(arguments);this.getComponent().setDisabled(a)},destroy:function(){Ext.destroy(this.getComponent());this.callParent()}});Ext.define("Ext.Img",{extend:"Ext.Component",xtype:["image","img"],config:{src:null,baseCls:Ext.baseCSSPrefix+"img",mode:"background"},beforeInitialize:function(){var a=this;a.onLoad=Ext.Function.bind(a.onLoad,a);a.onError=Ext.Function.bind(a.onError,a)},initialize:function(){var a=this;a.callParent();a.relayEvents(a.renderElement,"*");a.element.on({tap:"onTap",scope:a})},hide:function(){this.callParent();this.hiddenSrc=this.hiddenSrc||this.getSrc();this.setSrc(null)},show:function(){this.callParent();if(this.hiddenSrc){this.setSrc(this.hiddenSrc);delete this.hiddenSrc}},updateMode:function(a){if(a==="background"){if(this.imageElement){this.imageElement.destroy();delete this.imageElement;this.updateSrc(this.getSrc())}}else{this.imageElement=this.element.createChild({tag:"img"})}},onTap:function(a){this.fireEvent("tap",this,a)},onAfterRender:function(){this.updateSrc(this.getSrc())},updateSrc:function(a){var b=this,c;if(b.getMode()==="background"){c=this.imageObject||new Image()}else{c=b.imageElement.dom}this.imageObject=c;c.setAttribute("src",Ext.isString(a)?a:"");c.addEventListener("load",b.onLoad,false);c.addEventListener("error",b.onError,false)},detachListeners:function(){var a=this.imageObject;if(a){a.removeEventListener("load",this.onLoad,false);a.removeEventListener("error",this.onError,false)}},onLoad:function(a){this.detachListeners();if(this.getMode()==="background"){this.element.dom.style.backgroundImage='url("'+this.imageObject.src+'")'}this.fireEvent("load",this,a)},onError:function(a){this.detachListeners();this.fireEvent("error",this,a)},doSetWidth:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setWidth(b);this.callParent(arguments)},doSetHeight:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setHeight(b);this.callParent(arguments)},destroy:function(){this.detachListeners();Ext.destroy(this.imageObject);delete this.imageObject;this.callParent()}});Ext.define("Ext.Label",{extend:"Ext.Component",xtype:"label",config:{}});Ext.define("Ext.Map",{extend:"Ext.Component",xtype:"map",requires:["Ext.util.Geolocation"],isMap:true,config:{baseCls:Ext.baseCSSPrefix+"map",useCurrentLocation:false,map:null,geo:null,mapOptions:{}},constructor:function(){this.callParent(arguments);this.element.setVisibilityMode(Ext.Element.OFFSETS);if(!(window.google||{}).maps){this.setHtml("Google Maps API is required")}},initialize:function(){this.callParent();this.on({painted:"doResize",scope:this});this.element.on("touchstart","onTouchStart",this)},onTouchStart:function(a){a.makeUnpreventable()},applyMapOptions:function(a){return Ext.merge({},this.options,a)},updateMapOptions:function(d){var a=this,c=(window.google||{}).maps,b=this.getMap();if(c&&b){b.setOptions(d)}if(d.center&&!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[d.center]})}},getMapOptions:function(){return Ext.merge({},this.options||this.getInitialConfig("mapOptions"))},updateUseCurrentLocation:function(a){this.setGeo(a);if(!a){this.renderMap()}},applyGeo:function(a){return Ext.factory(a,Ext.util.Geolocation,this.getGeo())},updateGeo:function(b,a){var c={locationupdate:"onGeoUpdate",locationerror:"onGeoError",scope:this};if(a){a.un(c)}if(b){b.on(c);b.updateLocation()}},doResize:function(){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){b.event.trigger(a,"resize")}},renderMap:function(){var d=this,f=(window.google||{}).maps,b=d.element,a=d.getMapOptions(),e=d.getMap(),c;if(f){if(Ext.os.is.iPad){Ext.merge({navigationControlOptions:{style:f.NavigationControlStyle.ZOOM_PAN}},a)}a=Ext.merge({zoom:12,mapTypeId:f.MapTypeId.ROADMAP},a);if(!a.hasOwnProperty("center")){a.center=new f.LatLng(37.381592,-122.135672)}if(b.dom.firstChild){Ext.fly(b.dom.firstChild).destroy()}if(e){f.event.clearInstanceListeners(e)}d.setMap(new f.Map(b.dom,a));e=d.getMap();c=f.event;c.addListener(e,"zoom_changed",Ext.bind(d.onZoomChange,d));c.addListener(e,"maptypeid_changed",Ext.bind(d.onTypeChange,d));c.addListener(e,"center_changed",Ext.bind(d.onCenterChange,d));d.fireEvent("maprender",d,e)}},onGeoUpdate:function(a){if(a){this.setMapCenter(new google.maps.LatLng(a.getLatitude(),a.getLongitude()))}},onGeoError:Ext.emptyFn,setMapCenter:function(d){var a=this,c=a.getMap(),b=(window.google||{}).maps;if(b){if(!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[d]});return}d=d||new b.LatLng(37.381592,-122.135672);if(d&&!(d instanceof b.LatLng)&&"longitude" in d){d=new b.LatLng(d.latitude,d.longitude)}if(!c){a.renderMap();c=a.getMap()}if(c&&d instanceof b.LatLng){c.panTo(d)}else{this.options=Ext.apply(this.getMapOptions(),{center:d})}}},onZoomChange:function(){var a=this.getMapOptions(),c=this.getMap(),b;b=(c&&c.getZoom)?c.getZoom():a.zoom||10;this.options=Ext.apply(a,{zoom:b});this.fireEvent("zoomchange",this,c,b)},onTypeChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getMapTypeId)?c.getMapTypeId():b.mapTypeId;this.options=Ext.apply(b,{mapTypeId:a});this.fireEvent("typechange",this,c,a)},onCenterChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getCenter)?c.getCenter():b.center;this.options=Ext.apply(b,{center:a});this.fireEvent("centerchange",this,c,a)},destroy:function(){Ext.destroy(this.getGeo());var a=this.getMap();if(a&&(window.google||{}).maps){google.maps.event.clearInstanceListeners(a)}this.callParent()}},function(){});Ext.define("Ext.Mask",{extend:"Ext.Component",xtype:"mask",config:{baseCls:Ext.baseCSSPrefix+"mask",transparent:false,top:0,left:0,right:0,bottom:0},initialize:function(){this.callParent();this.on({painted:"onPainted",erased:"onErased"})},onPainted:function(){this.element.on("*","onEvent",this)},onErased:function(){this.element.un("*","onEvent",this)},onEvent:function(b){var a=arguments[arguments.length-1];if(a.info.eventName==="tap"){this.fireEvent("tap",this,b);return false}if(b&&b.stopEvent){b.stopEvent()}return false},updateTransparent:function(a){this[a?"addCls":"removeCls"](this.getBaseCls()+"-transparent")}});Ext.define("Ext.LoadMask",{extend:"Ext.Mask",xtype:"loadmask",config:{message:"Loading...",messageCls:Ext.baseCSSPrefix+"mask-message",indicator:true,listeners:{painted:"onPainted",erased:"onErased"}},getTemplate:function(){var a=Ext.baseCSSPrefix;return[{reference:"innerElement",cls:a+"mask-inner",children:[{reference:"indicatorElement",cls:a+"loading-spinner-outer",children:[{cls:a+"loading-spinner",children:[{tag:"span",cls:a+"loading-top"},{tag:"span",cls:a+"loading-right"},{tag:"span",cls:a+"loading-bottom"},{tag:"span",cls:a+"loading-left"}]}]},{reference:"messageElement"}]}]},updateMessage:function(a){this.messageElement.setHtml(a)},updateMessageCls:function(b,a){this.messageElement.replaceCls(a,b)},updateIndicator:function(a){this[a?"removeCls":"addCls"](Ext.baseCSSPrefix+"indicator-hidden")},onPainted:function(){this.getParent().on({scope:this,resize:this.refreshPosition});this.refreshPosition()},onErased:function(){this.getParent().un({scope:this,resize:this.refreshPosition})},refreshPosition:function(){var c=this.getParent(),d=c.getScrollable(),a=(d)?d.getScroller():null,f=(a)?a.position:{x:0,y:0},e=c.element.getSize(),b=this.element.getSize();this.innerElement.setStyle({marginTop:Math.round(e.height-b.height+(f.y*2))+"px",marginLeft:Math.round(e.width-b.width+f.x)+"px"})}},function(){});Ext.define("Ext.Media",{extend:"Ext.Component",xtype:"media",config:{url:"",enableControls:Ext.os.is.Android?false:true,autoResume:false,autoPause:true,preload:true,loop:false,media:null,volume:1,muted:false},initialize:function(){var a=this;a.callParent();a.on({scope:a,activate:a.onActivate,deactivate:a.onDeactivate});a.addMediaListener({canplay:"onCanPlay",play:"onPlay",pause:"onPause",ended:"onEnd",volumechange:"onVolumeChange",timeupdate:"onTimeUpdate"})},addMediaListener:function(d,b){var c=this,e=c.media.dom,f=Ext.Function.bind;if(!Ext.isObject(d)){var a=d;d={};d[a]=b}Ext.Object.each(d,function(h,g){if(typeof g!=="function"){g=c[g]}if(typeof g=="function"){g=f(g,c);e.addEventListener(h,g)}})},onPlay:function(){this.fireEvent("play",this)},onCanPlay:function(){this.fireEvent("canplay",this)},onPause:function(){this.fireEvent("pause",this,this.getCurrentTime())},onEnd:function(){this.fireEvent("ended",this,this.getCurrentTime())},onVolumeChange:function(){this.fireEvent("volumechange",this,this.media.dom.volume)},onTimeUpdate:function(){this.fireEvent("timeupdate",this,this.getCurrentTime())},isPlaying:function(){return !Boolean(this.media.dom.paused)},onActivate:function(){var a=this;if(a.getAutoResume()&&!a.isPlaying()){a.play()}},onDeactivate:function(){var a=this;if(a.getAutoResume()&&a.isPlaying()){a.pause()}},updateUrl:function(a){var b=this.media.dom;b.src=a;if("load" in b){b.load()}if(this.isPlaying()){this.play()}},updateEnableControls:function(a){this.media.dom.controls=a?"controls":false},updateLoop:function(a){this.media.dom.loop=a?"loop":false},play:function(){var a=this.media.dom;if("play" in a){a.play();setTimeout(function(){a.play()},10)}},pause:function(){var a=this.media.dom;if("pause" in a){a.pause()}},toggle:function(){if(this.isPlaying()){this.pause()}else{this.play()}},stop:function(){var a=this;a.setCurrentTime(0);a.fireEvent("stop",a);a.pause()},updateVolume:function(a){this.media.dom.volume=a},updateMuted:function(a){this.fireEvent("mutedchange",this,a);this.media.dom.muted=a},getCurrentTime:function(){return this.media.dom.currentTime},setCurrentTime:function(a){this.media.dom.currentTime=a;return a},getDuration:function(){return this.media.dom.duration},destroy:function(){var a=this;Ext.Object.each(event,function(c,b){if(typeof b!=="function"){b=a[b]}if(typeof b=="function"){b=bind(b,a);dom.removeEventListener(c,b)}})}});Ext.define("Ext.Audio",{extend:"Ext.Media",xtype:"audio",config:{cls:Ext.baseCSSPrefix+"audio"},onActivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.show()}},onDeactivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.hide()}},template:[{reference:"media",preload:"auto",tag:"audio",cls:Ext.baseCSSPrefix+"component"}]});Ext.define("Ext.Spacer",{extend:"Ext.Component",alias:"widget.spacer",config:{},constructor:function(a){a=a||{};if(!a.width){a.flex=1}this.callParent([a])}});Ext.define("Ext.Title",{extend:"Ext.Component",xtype:"title",config:{baseCls:"x-title",title:""},updateTitle:function(a){this.setHtml(a)}});Ext.define("Ext.Video",{extend:"Ext.Media",xtype:"video",config:{posterUrl:null,cls:Ext.baseCSSPrefix+"video"},template:[{reference:"ghost",classList:[Ext.baseCSSPrefix+"video-ghost"]},{tag:"video",reference:"media",classList:[Ext.baseCSSPrefix+"media"]}],initialize:function(){var a=this;a.callParent();a.media.hide();a.onBefore({erased:"onErased",scope:a});a.ghost.on({tap:"onGhostTap",scope:a});a.media.on({pause:"onPause",scope:a});if(Ext.os.is.Android4||Ext.os.is.iPad){this.isInlineVideo=true}},applyUrl:function(a){return[].concat(a)},updateUrl:function(f){var c=this,e=c.media,g=f.length,d=e.query("source"),b=d.length,a;for(a=0;a0){a.pop().destroy()}},setActiveIndex:function(b){var e=this.indicators,d=this.activeIndex,a=e[d],f=e[b],c=this.getBaseCls();if(a){a.removeCls(c,null,"active")}if(f){f.addCls(c,null,"active")}this.activeIndex=b;return this},onTap:function(f){var g=f.touch,a=this.element.getPageBox(),d=a.left+(a.width/2),b=a.top+(a.height/2),c=this.getDirection();if((c==="horizontal"&&g.pageX>=d)||(c==="vertical"&&g.pageY>=b)){this.fireEvent("next",this)}else{this.fireEvent("previous",this)}},destroy:function(){var d=this.indicators,b,c,a;for(b=0,c=d.length;bd.bottom||a.yd.right||a.x div",scope:this})},initialize:function(){this.callParent();this.doInitialize()},updateBaseCls:function(a,b){var c=this;c.callParent([a+"-container",b])},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,Ext.get(c),a,d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,Ext.get(c),a,d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtouchmove",b,Ext.get(c),a,d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtap",b,Ext.get(c),a,d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtaphold",b,Ext.get(c),a,d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemdoubletap",b,Ext.get(c),a,d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemsingletap",b,Ext.get(c),a,d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemswipe",b,Ext.get(c),a,d)},updateListItem:function(b,d){var c=this,a=c.dataview,e=a.prepareData(b.getData(true),a.getStore().indexOf(b),b);d.innerHTML=c.dataview.getItemTpl().apply(e)},addListItem:function(e,c){var h=this,d=h.dataview,a=d.prepareData(c.getData(true),d.getStore().indexOf(c),c),b=h.element,i=b.dom.childNodes,g=i.length,f;f=Ext.Element.create(this.getItemElementConfig(e,a));if(!g||e==g){f.appendTo(b)}else{f.insertBefore(i[e])}},getItemElementConfig:function(c,e){var b=this.dataview,d=b.getItemCls(),a=b.getBaseCls()+"-item";if(d){a+=" "+d}return{cls:a,html:b.getItemTpl().apply(e)}},doRemoveItemCls:function(a){var d=this.getViewItems(),c=d.length,b=0;for(;b=0;b--){c=a[f+b];c.parentNode.removeChild(c)}if(d.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(d){var g=this,b=g.dataview,c=b.getStore(),f=d.length,e,a;if(f){b.hideEmptyText()}for(e=0;eh._tmpIndex?1:-1});for(e=0;e(?:[\s]*)|(?:\s*))([\w\-]+)$/i,handledEvents:["*"],getSubscribers:function(b,a){var d=this.subscribers,c=d[b];if(!c&&a){c=d[b]={type:{$length:0},selector:[],$length:0}}return c},subscribe:function(g,f){if(this.idSelectorRegex.test(g)){return false}var e=g.match(this.optimizedSelectorRegex),a=this.getSubscribers(f,true),k=a.type,c=a.selector,d,i,j,b,h;if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=k[j];if(!b){k[j]=b={descendents:{$length:0},children:{$length:0},$length:0}}h=i?b.descendents:b.children;if(h.hasOwnProperty(d)){h[d]++;return true}h[d]=1;h.$length++;b.$length++;k.$length++}else{if(c.hasOwnProperty(g)){c[g]++;return true}c[g]=1;c.push(g)}a.$length++;return true},unsubscribe:function(g,f,k){var a=this.getSubscribers(f);if(!a){return false}var e=g.match(this.optimizedSelectorRegex),l=a.type,c=a.selector,d,i,j,b,h;k=Boolean(k);if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=l[j];if(!b){return true}h=i?b.descendents:b.children;if(!h.hasOwnProperty(d)||(!k&&--h[d]>0)){return true}delete h[d];h.$length--;b.$length--;l.$length--}else{if(!c.hasOwnProperty(g)||(!k&&--c[g]>0)){return true}delete c[g];Ext.Array.remove(c,g)}if(--a.$length===0){delete this.subscribers[f]}return true},notify:function(d,a){var c=this.getSubscribers(a),e,b;if(!c||c.$length===0){return false}e=d.substr(1);b=Ext.ComponentManager.get(e);if(b){this.dispatcher.doAddListener(this.targetType,d,a,"publish",this,{args:[a,b]},"before")}},matchesSelector:function(b,a){return Ext.ComponentQuery.is(b,a)},dispatch:function(d,b,c,a){this.dispatcher.doDispatchEvent(this.targetType,d,b,c,null,a)},publish:function(g,k){var e=this.getSubscribers(g);if(!e){return}var p=arguments[arguments.length-1],o=e.type,b=e.selector,d=Array.prototype.slice.call(arguments,2,-2),l=k.xtypesChain,s,n,t,a,m,v,r,u,h,f,q,c;for(u=0,h=l.length;u0){s=e.descendents;if(s.$length>0){if(!a){a=k.getAncestorIds()}for(q=0,c=a.length;q0){if(!t){if(a){t=a[0]}else{v=k.getParent();if(v){t=v.getId()}}}if(t){if(n.hasOwnProperty(t)){this.dispatch("#"+t+" > "+f,g,d,p)}}}}}h=b.length;if(h>0){for(u=0;uf){d=e}}c.setValue(d);d=c.getValue();c.fireEvent("spin",c,d,g);c.fireEvent("spin"+g,c,d)},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){this.setValue(this.getDefaultValue())},destroy:function(){var a=this;Ext.destroy(a.downRepeater,a.upRepeater,a.spinDownButton,a.spinUpButton);a.callParent(arguments)}},function(){});Ext.define("Ext.field.TextAreaInput",{extend:"Ext.field.Input",xtype:"textareainput",tag:"textarea"});Ext.define("Ext.field.TextArea",{extend:"Ext.field.Text",xtype:"textareafield",requires:["Ext.field.TextAreaInput"],alternateClassName:"Ext.form.TextArea",config:{ui:"textarea",autoCapitalize:false,component:{xtype:"textareainput"},maxRows:null},updateMaxRows:function(a){this.getComponent().setMaxRows(a)},doSetHeight:function(a){this.callParent(arguments);var b=this.getComponent();b.input.setHeight(a)},doSetWidth:function(b){this.callParent(arguments);var a=this.getComponent();a.input.setWidth(b)},doKeyUp:function(a){var b=a.getValue();a[b?"showClearIcon":"hideClearIcon"]()}});Ext.define("Ext.field.Url",{extend:"Ext.field.Text",xtype:"urlfield",alternateClassName:"Ext.form.Url",config:{autoCapitalize:false,component:{type:"url"}}});Ext.define("Ext.plugin.ListPaging",{extend:"Ext.Component",alias:"plugin.listpaging",config:{autoPaging:false,loadMoreText:"Load More...",noMoreRecordsText:"No More Records",loadTpl:['
','','','','',"
",'
{message}
'].join(""),loadMoreCmp:{xtype:"component",baseCls:Ext.baseCSSPrefix+"list-paging"},loadMoreCmpAdded:false,loadingCls:Ext.baseCSSPrefix+"loading",list:null,scroller:null,loading:false},init:function(c){var a=c.getScrollable().getScroller(),b=c.getStore();this.setList(c);this.setScroller(a);this.bindStore(c.getStore());if(b){this.disableDataViewMask(b)}c.updateStore=Ext.Function.createInterceptor(c.updateStore,this.bindStore,this);if(this.getAutoPaging()){a.on({scrollend:this.onScrollEnd,scope:this})}},bindStore:function(a,b){if(b){b.un({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}if(a){a.on({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}},disableDataViewMask:function(a){var b=this.getList();if(a.isAutoLoading()){b.setLoadingText(null)}else{a.on({load:{single:true,fn:function(){b.setLoadingText(null)}}})}},applyLoadTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},applyLoadMoreCmp:function(a){a=Ext.merge(a,{html:this.getLoadTpl().apply({cssPrefix:Ext.baseCSSPrefix,message:this.getLoadMoreText()}),listeners:{tap:{fn:this.loadNextPage,scope:this,element:"element"}}});return Ext.factory(a,Ext.Component,this.getLoadMoreCmp())},onScrollEnd:function(b,a,c){if(!this.getLoading()&&c>=b.maxPosition.y){this.loadNextPage()}},updateLoading:function(a){var b=this.getLoadMoreCmp(),c=this.getLoadingCls();if(a){b.addCls(c)}else{b.removeCls(c)}},onStoreBeforeLoad:function(a){if(a.getCount()===0){this.getLoadMoreCmp().hide()}},onStoreLoad:function(a){var d=this.addLoadMoreCmp(),b=this.getLoadTpl(),c=this.storeFullyLoaded()?this.getNoMoreRecordsText():this.getLoadMoreText();this.getLoadMoreCmp().show();this.setLoading(false);if(this.scrollY){this.getScroller().scrollTo(null,this.scrollY);delete this.scrollY}d.setHtml(b.apply({cssPrefix:Ext.baseCSSPrefix,message:c}))},addLoadMoreCmp:function(){var b=this.getList(),a=this.getLoadMoreCmp();if(!this.getLoadMoreCmpAdded()){b.add(a);b.fireEvent("loadmorecmpadded",this,b);this.setLoadMoreCmpAdded(true)}return a},storeFullyLoaded:function(){var a=this.getList().getStore(),b=a.getTotalCount();return b!==null?a.getTotalCount()<=(a.currentPage*a.getPageSize()):false},loadNextPage:function(){var a=this;if(!a.storeFullyLoaded()){a.setLoading(true);a.scrollY=a.getScroller().position.y;a.getList().getStore().nextPage({addRecords:true})}}});Ext.define("Ext.plugin.PullRefresh",{extend:"Ext.Component",alias:"plugin.pullrefresh",requires:["Ext.DateExtras"],config:{list:null,pullRefreshText:"Pull down to refresh...",releaseRefreshText:"Release to refresh...",loadingText:"Loading...",snappingAnimationDuration:150,refreshFn:null,pullTpl:['
','
','
','','','','',"
",'
','

{message}

','
Last Updated: {lastUpdated:date("m/d/Y h:iA")}
',"
","
"].join("")},isRefreshing:false,currentViewState:"",initialize:function(){this.callParent();this.on({painted:"onPainted",scope:this})},init:function(f){var d=this,b=f.getStore(),e=d.getPullTpl(),c=d.element,a=f.getScrollable().getScroller();d.setList(f);d.lastUpdated=new Date();f.insert(0,d);if(b){if(b.isAutoLoading()){f.setLoadingText(null)}else{b.on({load:{single:true,fn:function(){f.setLoadingText(null)}}})}}e.overwrite(c,{message:d.getPullRefreshText(),lastUpdated:d.lastUpdated},true);d.loadingElement=c.getFirstChild();d.messageEl=c.down(".x-list-pullrefresh-message");d.updatedEl=c.down(".x-list-pullrefresh-updated > span");d.maxScroller=a.getMaxPosition();a.on({maxpositionchange:d.setMaxScroller,scroll:d.onScrollChange,scope:d})},fetchLatest:function(){var b=this.getList().getStore(),c=b.getProxy(),a;a=Ext.create("Ext.data.Operation",{page:1,start:0,model:b.getModel(),limit:b.getPageSize(),action:"read",filters:b.getRemoteFilter()?b.getFilters():[]});c.read(a,this.onLatestFetched,this)},onLatestFetched:function(d){var j=this.getList().getStore(),b=j.getData(),c=d.getRecords(),a=c.length,g=[],h,f,e;for(e=0;ethis.maxScroller.y){this.onBounceBottom(c)}},applyPullTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onBounceTop:function(d){var b=this,c=b.getList(),a=c.getScrollable().getScroller();if(!b.isReleased){if(!b.isRefreshing&&-d>=b.pullHeight+10){b.isRefreshing=true;b.setViewState("release");a.getContainer().onBefore({dragend:"onScrollerDragEnd",single:true,scope:b})}else{if(b.isRefreshing&&-d=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)},setOffset:function(c){var a=this.getAxis(),b=this.element.dom.style;c=Math.round(c);if(a==="x"){b.webkitTransform="translate3d("+c+"px, 0, 0)"}else{b.webkitTransform="translate3d(0, "+c+"px, 0)"}}});Ext.define("Ext.scroll.indicator.Default",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"default"},setOffset:function(c){var b=this.getAxis(),a=this.element.dom.style;if(b==="x"){a.webkitTransform="translate3d("+c+"px, 0, 0)"}else{a.webkitTransform="translate3d(0, "+c+"px, 0)"}},applyLength:function(a){return Math.round(Math.max(0,a))},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)}});Ext.define("Ext.scroll.indicator.ScrollPosition",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"scrollposition"},getElementConfig:function(){var a=this.callParent(arguments);a.children.unshift({className:"x-scroll-bar-stretcher"});return a},updateValue:function(a){if(this.gapLength===0){if(a>1){a=a-1}this.setOffset(this.barLength*a)}else{this.setOffset(this.gapLength*a)}},setLength:function(e){var c=this.getAxis(),a=this.barLength,d=this.barElement.dom,b=this.element;this.callParent(arguments);if(c==="x"){d.scrollLeft=a;b.setLeft(a)}else{d.scrollTop=a;b.setTop(a)}},setOffset:function(d){var b=this.getAxis(),a=this.barLength,c=this.barElement.dom;d=a-d;if(b==="x"){c.scrollLeft=d}else{c.scrollTop=d}}});Ext.define("Ext.scroll.Indicator",{requires:["Ext.scroll.indicator.Default","Ext.scroll.indicator.ScrollPosition","Ext.scroll.indicator.CssTransform"],alternateClassName:"Ext.util.Indicator",constructor:function(a){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){return new Ext.scroll.indicator.ScrollPosition(a)}else{if(Ext.os.is.iOS){return new Ext.scroll.indicator.CssTransform(a)}else{return new Ext.scroll.indicator.Default(a)}}}});Ext.define("Ext.scroll.View",{extend:"Ext.Evented",alternateClassName:"Ext.util.ScrollView",requires:["Ext.scroll.Scroller","Ext.scroll.Indicator"],config:{indicatorsUi:"dark",element:null,scroller:{},indicators:{x:{axis:"x"},y:{axis:"y"}},indicatorsHidingDelay:100,cls:Ext.baseCSSPrefix+"scroll-view"},processConfig:function(c){if(!c){return null}if(typeof c=="string"){c={direction:c}}c=Ext.merge({},c);var a=c.scroller,b;if(!a){c.scroller=a={}}for(b in c){if(c.hasOwnProperty(b)){if(!this.hasConfig(b)){a[b]=c[b];delete c[b]}}}return c},constructor:function(a){a=this.processConfig(a);this.useIndicators={x:true,y:true};this.doHideIndicators=Ext.Function.bind(this.doHideIndicators,this);this.initConfig(a)},setConfig:function(a){return this.callParent([this.processConfig(a)])},updateIndicatorsUi:function(a){var b=this.getIndicators();b.x.setUi(a);b.y.setUi(a)},applyScroller:function(a,b){return Ext.factory(a,Ext.scroll.Scroller,b)},applyIndicators:function(b,d){var a=Ext.scroll.Indicator,c=this.useIndicators;if(!b){b={}}if(!b.x){c.x=false;b.x={}}if(!b.y){c.y=false;b.y={}}return{x:Ext.factory(b.x,a,d&&d.x),y:Ext.factory(b.y,a,d&&d.y)}},updateIndicators:function(a){this.indicatorsGrid=Ext.Element.create({className:"x-scroll-bar-grid-wrapper",children:[{className:"x-scroll-bar-grid",children:[{children:[{},{children:[a.y.barElement]}]},{children:[{children:[a.x.barElement]},{}]}]}]})},updateScroller:function(a){a.on({scope:this,scrollstart:"onScrollStart",scroll:"onScroll",scrollend:"onScrollEnd",refresh:"refreshIndicators"})},isAxisEnabled:function(a){return this.getScroller().isAxisEnabled(a)&&this.useIndicators[a]},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(c){var b=c.getFirstChild().getFirstChild(),a=this.getScroller();c.addCls(this.getCls());c.insertFirst(this.indicatorsGrid);a.setElement(b);this.refreshIndicators();return this},showIndicators:function(){var a=this.getIndicators();if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(this.isAxisEnabled("x")){a.x.show()}if(this.isAxisEnabled("y")){a.y.show()}},hideIndicators:function(){var a=this.getIndicatorsHidingDelay();if(a>0){this.indicatorsHidingTimer=setTimeout(this.doHideIndicators,a)}else{this.doHideIndicators()}},doHideIndicators:function(){var a=this.getIndicators();if(this.isAxisEnabled("x")){a.x.hide()}if(this.isAxisEnabled("y")){a.y.hide()}},onScrollStart:function(){this.onScroll.apply(this,arguments);this.showIndicators()},onScrollEnd:function(){this.hideIndicators()},onScroll:function(b,a,c){this.setIndicatorValue("x",a);this.setIndicatorValue("y",c)},setIndicatorValue:function(b,f){if(!this.isAxisEnabled(b)){return this}var a=this.getScroller(),c=a.getMaxPosition()[b],e=a.getContainerSize()[b],d;if(c===0){d=f/e;if(f>=0){d+=1}}else{if(f>c){d=1+((f-c)/e)}else{if(f<0){d=f/e}else{d=f/c}}}this.getIndicators()[b].setValue(d)},refreshIndicator:function(d){if(!this.isAxisEnabled(d)){return this}var a=this.getScroller(),b=this.getIndicators()[d],e=a.getContainerSize()[d],f=a.getSize()[d],c=e/f;b.setRatio(c);b.refresh()},refresh:function(){return this.getScroller().refresh()},refreshIndicators:function(){var a=this.getIndicators();a.x.setActive(this.isAxisEnabled("x"));a.y.setActive(this.isAxisEnabled("y"));this.refreshIndicator("x");this.refreshIndicator("y")},destroy:function(){var a=this.getElement(),b=this.getIndicators();if(a&&!a.isDestroyed){a.removeCls(this.getCls())}b.x.destroy();b.y.destroy();Ext.destroy(this.getScroller(),this.indicatorsGrid);delete this.indicatorsGrid;this.callParent(arguments)}});Ext.define("Ext.behavior.Scrollable",{extend:"Ext.behavior.Behavior",requires:["Ext.scroll.View"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.scrollView.refresh()},setConfig:function(d){var b=this.scrollView,c=this.component,e,a;if(d){if(!b){this.scrollView=b=new Ext.scroll.View(d);b.on("destroy","onScrollViewDestroy",this);c.setUseBodyElement(true);this.scrollerElement=a=c.innerElement;this.scrollContainer=a.wrap();this.scrollViewElement=e=c.bodyElement;b.setElement(e);if(c.isPainted()){this.onComponentPainted(c)}c.on(this.listeners)}else{if(Ext.isString(d)||Ext.isObject(d)){b.setConfig(d)}}}else{if(b){b.destroy()}}return this},getScrollView:function(){return this.scrollView},onScrollViewDestroy:function(){var b=this.component,a=this.scrollerElement;if(!a.isDestroyed){this.scrollerElement.unwrap()}this.scrollContainer.destroy();b.un(this.listeners);delete this.scrollerElement;delete this.scrollView;delete this.scrollContainer},onComponentDestroy:function(){var a=this.scrollView;if(a){a.destroy()}}});Ext.define("Ext.Container",{extend:"Ext.Component",alternateClassName:"Ext.lib.Container",requires:["Ext.layout.Layout","Ext.ItemCollection","Ext.behavior.Scrollable","Ext.Mask"],xtype:"container",eventedConfig:{activeItem:0},config:{layout:null,control:{},defaults:null,items:null,autoDestroy:true,defaultType:null,scrollable:null,useBodyElement:null,masked:null,modal:null,hideOnMaskTap:null},isContainer:true,delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange"},constructor:function(a){var b=this;b._items=b.items=new Ext.ItemCollection();b.innerItems=[];b.onItemAdd=b.onFirstItemAdd;b.callParent(arguments)},getElementConfig:function(){return{reference:"element",className:"x-container",children:[{reference:"innerElement",className:"x-inner"}]}},applyMasked:function(a,b){b=Ext.factory(a,Ext.Mask,b);if(b){this.add(b)}return b},mask:function(a){this.setMasked(a||true)},unmask:function(){this.setMasked(false)},applyModal:function(a,b){if(!a&&!b){return}return Ext.factory(a,Ext.Mask,b)},updateModal:function(c,a){var b={painted:"refreshModalMask",erased:"destroyModalMask"};if(c){this.on(b);c.on("destroy","onModalDestroy",this);if(this.getTop()===null&&this.getBottom()===null&&this.getRight()===null&&this.getLeft()===null&&!this.getCentered()){this.setTop(0);this.setLeft(0)}if(this.isPainted()){this.refreshModalMask()}}else{if(a){a.un("destroy","onModalDestroy",this);this.un(b)}}},onModalDestroy:function(){this.setModal(null)},refreshModalMask:function(){var b=this.getModal(),a=this.getParent();if(!this.painted){this.painted=true;if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1);if(this.getHideOnMaskTap()){b.on("tap","hide",this,{single:true})}}}},destroyModalMask:function(){var b=this.getModal(),a=this.getParent();if(this.painted){this.painted=false;if(b){b.un("tap","hide",this);a.remove(b,false)}}},updateZIndex:function(b){var a=this.getModal();this.callParent(arguments);if(a){a.setZIndex(b-1)}},updateBaseCls:function(a,b){var c=this,d=c.getUi();if(a){this.element.addCls(a);this.innerElement.addCls(a,null,"inner");if(d){this.element.addCls(a,null,d)}}if(b){this.element.removeCls(b);this.innerElement.removeCls(a,null,"inner");if(d){this.element.removeCls(b,null,d)}}},updateUseBodyElement:function(a){if(a){this.bodyElement=this.innerElement.wrap({cls:"x-body"});this.referenceList.push("bodyElement")}},applyItems:function(a,b){if(a){this.getDefaultType();this.getDefaults();if(this.initialized&&b.length>0){this.removeAll()}this.add(a)}},applyControl:function(c){var a,b,e,d;for(a in c){d=c[a];for(b in d){e=d[b];if(Ext.isObject(e)){e.delegate=a}}d.delegate=a;this.addListener(d)}return c},onFirstItemAdd:function(){delete this.onItemAdd;this.setLayout(new Ext.layout.Layout(this,this.getLayout()||"default"));if(this.innerHtmlElement&&!this.getHtml()){this.innerHtmlElement.destroy();delete this.innerHtmlElement}this.on(this.delegateListeners);return this.onItemAdd.apply(this,arguments)},updateDefaultType:function(a){this.defaultItemClass=Ext.ClassManager.getByAlias("widget."+a)},applyDefaults:function(a){if(a){this.factoryItem=this.factoryItemWithDefaults;return a}},factoryItem:function(a){return Ext.factory(a,this.defaultItemClass)},factoryItemWithDefaults:function(c){var b=this,d=b.getDefaults(),a;if(!d){return Ext.factory(c,b.defaultItemClass)}if(c.isComponent){a=c;if(d&&c.isInnerItem()&&!b.has(a)){a.setConfig(d,true)}}else{if(d&&!c.ignoreDefaults){if(!(c.hasOwnProperty("left")&&c.hasOwnProperty("right")&&c.hasOwnProperty("top")&&c.hasOwnProperty("bottom")&&c.hasOwnProperty("docked")&&c.hasOwnProperty("centered"))){c=Ext.mergeIf({},c,d)}}a=Ext.factory(c,b.defaultItemClass)}return a},add:function(a){var e=this,b,d,c,f;a=Ext.Array.from(a);d=a.length;for(b=0;b0&&c.isInnerItem()){f=c}}if(f){this.setActiveItem(f)}return c},doAdd:function(d){var c=this,a=c.getItems(),b;if(!a.has(d)){b=a.length;a.add(d);if(d.isInnerItem()){c.insertInner(d)}d.setParent(c);c.onItemAdd(d,b)}},remove:function(d,b){var c=this,a=c.indexOf(d),e=c.getInnerItems();if(b===undefined){b=c.getAutoDestroy()}if(a!==-1){if(!c.removingAll&&e.length>1&&d===c.getActiveItem()){c.on({activeitemchange:"doRemove",scope:c,single:true,order:"after",args:[d,a,b]});c.doResetActiveItem(e.indexOf(d))}else{c.doRemove(d,a,b);if(e.length===0){c.setActiveItem(null)}}}return c},doResetActiveItem:function(a){if(a===0){this.setActiveItem(1)}else{this.setActiveItem(0)}},doRemove:function(d,a,b){var c=this;c.items.remove(d);if(d.isInnerItem()){c.removeInner(d)}c.onItemRemove(d,a,b);d.setParent(null);if(b){d.destroy()}},removeAll:function(c,f){var a=this.items,e=a.length,b=0,d;if(c===undefined){c=this.getAutoDestroy()}f=Boolean(f);this.removingAll=true;for(;b=0;b--){c.insert(a,d[b])}return c}d=this.factoryItem(d);this.doInsert(a,d);return d},doInsert:function(d,f){var e=this,b=e.items,c=b.length,a,g;g=f.isInnerItem();if(d>c){d=c}if(b[d-1]===f){return e}a=e.indexOf(f);if(a!==-1){if(a "+a)[0]||null},down:function(a){return this.query(a)[0]||null},destroy:function(){var a=this.getModal();if(a){a.destroy()}this.removeAll(true,true);Ext.destroy(this.getScrollable(),this.bodyElement);this.callParent()}},function(){this.addMember("defaultItemClass",this)});Ext.define("Ext.Panel",{extend:"Ext.Container",requires:["Ext.util.LineSegment"],alternateClassName:"Ext.lib.Panel",xtype:"panel",isPanel:true,config:{baseCls:Ext.baseCSSPrefix+"panel",bodyPadding:null,bodyMargin:null,bodyBorder:null},getElementConfig:function(){var a=this.callParent();a.children.push({reference:"tipElement",className:"x-anchor",hidden:true});return a},applyBodyPadding:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyPadding:function(a){this.element.setStyle("padding",a)},applyBodyMargin:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyMargin:function(a){this.element.setStyle("margin",a)},applyBodyBorder:function(a){if(a===true){a=1}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyBorder:function(a){this.element.setStyle("border-width",a)},alignTo:function(m){var w=this.tipElement;w.hide();if(this.currentTipPosition){w.removeCls("x-anchor-"+this.currentTipPosition)}this.callParent(arguments);var f=Ext.util.LineSegment,d=m.isComponent?m.renderElement:m,a=this.renderElement,n=d.getPageBox(),k=a.getPageBox(),b=k.left,t=k.top,C=k.right,h=k.bottom,j=b+(k.width/2),i=t+(k.height/2),o={x:b,y:t},l={x:C,y:t},B={x:b,y:h},D={x:C,y:h},y={x:j,y:i},s=n.left+(n.width/2),q=n.top+(n.height/2),v={x:s,y:q},c=new f(y,v),g=0,A=0,e,z,r,p,x,u;w.setVisibility(false);w.show();e=w.getSize();z=e.width;r=e.height;if(c.intersects(new f(o,l))){x=Math.min(Math.max(s,b),C-(z/2));u=t;A=r+10;p="top"}else{if(c.intersects(new f(o,B))){x=b;u=Math.min(Math.max(q+(z/2),t),h);g=r+10;p="left"}else{if(c.intersects(new f(B,D))){x=Math.min(Math.max(s,b),C-(z/2));u=h;A=-r-10;p="bottom"}else{if(c.intersects(new f(l,D))){x=C;u=Math.min(Math.max(q-(z/2),t),h);g=-r-10;p="right"}}}}if(x||u){this.currentTipPosition=p;w.addCls("x-anchor-"+p);w.setLeft(x-b);w.setTop(u-t);w.setVisibility(true);this.setLeft(this.getLeft()+g);this.setTop(this.getTop()+A)}}});Ext.define("Ext.SegmentedButton",{extend:"Ext.Container",xtype:"segmentedbutton",requires:["Ext.Button"],config:{baseCls:Ext.baseCSSPrefix+"segmentedbutton",pressedCls:Ext.baseCSSPrefix+"button-pressed",allowMultiple:false,allowDepress:null,pressedButtons:[],layout:{type:"hbox",align:"stretch"},defaultType:"button"},initialize:function(){var a=this;a.callParent();a.on({delegate:"> button",scope:a,tap:"onButtonRelease"});a.onAfter({delegate:"> button",scope:a,hiddenchange:"onButtonHiddenChange"})},updateAllowMultiple:function(){if(!this.initialized&&!this.getInitialConfig().hasOwnProperty("allowDepress")){this.setAllowDepress(true)}},applyItems:function(){var e=this,f=[],d,b,c,a;e.callParent(arguments);a=this.getItems();d=a.length;for(b=0;b=0;b--){c=a.items[b];if(!c.isHidden()){c.addCls(e+"last");break}}},applyPressedButtons:function(a){var e=this,f=[],c,d,b;if(Ext.isArray(a)){d=a.length;for(b=0;bm){c.renderElement.setWidth(m)}}var j=this.spacer.renderElement.getPageBox(),k=f.getPageBox(),g=k.width-j.width,d=k.left,i=k.right,b,l,e;if(g>0){f.setWidth(j.width);b=g/2;d+=b;i-=b}l=j.left-d;e=i-j.right;if(l>0){f.setLeft(l)}else{if(e>0){f.setLeft(-e)}}f.repaint()},updateTitle:function(a){this.titleComponent.setTitle(a);if(this.isPainted()){this.refreshTitlePosition()}}});Ext.define("Ext.Toolbar",{extend:"Ext.Container",xtype:"toolbar",requires:["Ext.Button","Ext.Title","Ext.Spacer"],isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",ui:"dark",title:null,defaultType:"button",layout:{type:"hbox",align:"center"}},constructor:function(a){a=a||{};if(a.docked=="left"||a.docked=="right"){a.layout={type:"vbox",align:"stretch"}}this.callParent([a])},applyTitle:function(a){if(typeof a=="string"){a={title:a,centered:true}}return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b);this.getLayout().setItemFlex(b,1)}if(a){a.destroy()}},showTitle:function(){var a=this.getTitle();if(a){a.show()}},hideTitle:function(){var a=this.getTitle();if(a){a.hide()}}},function(){});Ext.define("Ext.MessageBox",{extend:"Ext.Sheet",requires:["Ext.Toolbar","Ext.field.Text","Ext.field.TextArea"],config:{ui:"dark",baseCls:Ext.baseCSSPrefix+"msgbox",iconCls:null,showAnimation:{type:"popIn",duration:250,easing:"ease-out"},hideAnimation:{type:"popOut",duration:250,easing:"ease-out"},zIndex:10,defaultTextHeight:75,title:null,buttons:null,message:null,prompt:null,layout:{type:"vbox",pack:"center"}},statics:{OK:{text:"OK",itemId:"ok",ui:"action"},YES:{text:"Yes",itemId:"yes",ui:"action"},NO:{text:"No",itemId:"no"},CANCEL:{text:"Cancel",itemId:"cancel"},INFO:Ext.baseCSSPrefix+"msgbox-info",WARNING:Ext.baseCSSPrefix+"msgbox-warning",QUESTION:Ext.baseCSSPrefix+"msgbox-question",ERROR:Ext.baseCSSPrefix+"msgbox-error",OKCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"OK",itemId:"ok",ui:"action"}],YESNOCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}],YESNO:[{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}]},constructor:function(a){a=a||{};if(a.hasOwnProperty("promptConfig")){Ext.applyIf(a,{prompt:a.promptConfig});delete a.promptConfig}if(a.hasOwnProperty("multiline")||a.hasOwnProperty("multiLine")){a.prompt=a.prompt||{};Ext.applyIf(a.prompt,{multiLine:a.multiline||a.multiLine});delete a.multiline;delete a.multiLine}this.defaultAllowedConfig={};var e=["ui","showAnimation","hideAnimation","title","message","prompt","iconCls","buttons","defaultTextHeight"],d=e.length,b,c;for(b=0;b=a-c&&b<=a+c)},onDragStart:function(f){var d=this.getDirection(),b=f.absDeltaX,a=f.absDeltaY,c=this.getDirectionLock();this.isDragging=true;if(c){if((d==="horizontal"&&b>a)||(d==="vertical"&&a>b)){f.stopPropagation()}else{this.isDragging=false;return}}if(this.isAnimating){this.getActiveCarouselItem().getTranslatable().stopAnimation()}this.dragStartOffset=this.offset;this.dragDirection=0},onDrag:function(j){if(!this.isDragging){return}var k=this.dragStartOffset,l=this.getDirection(),m=l==="horizontal"?j.deltaX:j.deltaY,a=this.offset,i=this.flickStartTime,c=this.dragDirection,b=Ext.Date.now(),h=this.getActiveIndex(),f=this.getMaxItemIndex(),d=c,g;if((h===0&&m>0)||(h===f&&m<0)){m*=0.5}g=k+m;if(g>a){c=1}else{if(g300){this.flickStartOffset=a;this.flickStartTime=b}this.dragDirection=c;this.setOffset(g)},onDragEnd:function(j){if(!this.isDragging){return}this.onDrag(j);this.isDragging=false;var a=Ext.Date.now(),i=this.itemLength,g=i/2,f=this.offset,m=this.getActiveIndex(),c=this.getMaxItemIndex(),h=0,l=f-this.flickStartOffset,b=a-this.flickStartTime,k=this.getIndicator(),d;if(b>0&&Math.abs(l)>=10){d=l/b;if(Math.abs(d)>=1){if(d<0&&m0&&m>0){h=1}}}}if(h===0){if(m0&&f>g){h=1}}}if(k){k.setActiveIndex(m-h)}this.animationDirection=h;this.setOffsetAnimated(h*i)},applyAnimation:function(a){a.easing=Ext.factory(a.easing,Ext.fx.easing.EaseOut);return a},updateDirection:function(b){var a=this.getIndicator();this.currentAxis=(b==="horizontal")?"x":"y";if(a){a.setDirection(b)}},setOffset:function(e){var k=this.orderedCarouselItems,c=this.getBufferSize(),g=k[c],j=this.itemLength,d=this.currentAxis,a,h,b,f;this.offset=e;e+=this.itemOffset;if(g){g.translateAxis(d,e);for(f=1,b=0;f<=c;f++){h=k[c-f];if(h){b+=j;h.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=k[c+f];if(a){b+=j;a.translateAxis(d,e+b)}}}return this},setOffsetAnimated:function(c){var b=this.orderedCarouselItems[this.getBufferSize()],a=this.getIndicator();if(a){a.setActiveIndex(this.getActiveIndex()-this.animationDirection)}this.offset=c;c+=this.itemOffset;if(b){this.isAnimating=true;b.getTranslatable().on(this.animationListeners);b.translateAxis(this.currentAxis,c,this.getAnimation())}return this},onActiveItemAnimationFrame:function(k){var j=this.orderedCarouselItems,c=this.getBufferSize(),h=this.itemLength,d=this.currentAxis,e=k[d],g,a,f,b;for(f=1,b=0;f<=c;f++){g=j[c-f];if(g){b+=h;g.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=j[c+f];if(a){b+=h;a.translateAxis(d,e+b)}}},onActiveItemAnimationEnd:function(b){var c=this.getActiveIndex(),a=this.animationDirection,e=this.currentAxis,f=b[e],d=this.itemLength,g;this.isAnimating=false;b.un(this.animationListeners);if(a===-1){g=d+f}else{if(a===1){g=f-d}else{g=f}}g-=this.itemOffset;this.offset=g;this.setActiveItem(c-a)},refresh:function(){this.refreshSizing();this.refreshActiveItem()},refreshSizing:function(){var a=this.element,b=this.getItemLength(),c,d;if(this.getDirection()==="horizontal"){d=a.getWidth()}else{d=a.getHeight()}this.hiddenTranslation=-d;if(b===null){b=d;c=0}else{c=(d-b)/2}this.itemLength=b;this.itemOffset=c},refreshOffset:function(){this.setOffset(this.offset)},refreshActiveItem:function(){this.doSetActiveItem(this.getActiveItem())},getActiveIndex:function(){return this.activeIndex},refreshActiveIndex:function(){this.activeIndex=this.getInnerItemIndex(this.getActiveItem())},refreshCarouselItems:function(){var a=this.carouselItems,b,d,c;for(b=0,d=a.length;b0){for(f=1;f<=c;f++){h=q-f;if(h>=0){a=this.getInnerItemAt(h);b=a.getId();o[b]=a;p[b]=c-f}else{break}}}if(qb){this.setActiveItem(b)}else{this.rebuildInnerIndexes(a);this.refreshActiveItem()}}},rebuildInnerIndexes:function(n){var c=this.innerIndexToItem,g=this.innerIdToIndex,j=this.innerItems.slice(),h=j.length,b=this.getBufferSize(),d=this.getMaxItemIndex(),l=[],e,k,f,a,m;if(n===undefined){this.innerIndexToItem=c={};this.innerIdToIndex=g={};for(e=0;e=0&&e<=d){if(c.hasOwnProperty(e)){Ext.Array.remove(j,c[e]);continue}l.push(e)}}for(e=0,h=l.length;e ."+Ext.baseCSSPrefix+"data-item",scope:this})},initialize:function(){this.callParent();this.doInitialize()},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,a,b.indexOf(a),d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtouchmove",b,a,b.indexOf(a),d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,a,b.indexOf(a),d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtap",b,a,b.indexOf(a),d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtaphold",b,a,b.indexOf(a),d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemsingletap",b,a,b.indexOf(a),d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemdoubletap",b,a,b.indexOf(a),d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemswipe",b,a,b.indexOf(a),d)},moveItemsToCache:function(j,k){var h=this,c=h.dataview,a=c.getMaxItemCache(),g=h.getViewItems(),f=h.itemCache,e=f.length,l=c.getPressedCls(),d=c.getSelectedCls(),b=k-j,m;for(;b>=0;b--){m=g[j+b];if(e!==a){h.remove(m,false);m.removeCls([l,d]);f.push(m);e++}else{m.destroy()}}if(h.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(b){var l=this,e=l.dataview,m=e.getStore(),k=b.length,a=e.getDefaultType(),h=e.getItemConfig(),g=l.itemCache,f=g.length,j=[],c,n,d;if(k){e.hideEmptyText()}for(c=0;ci._tmpIndex?1:-1});for(c=0;c{text}",pressedCls:"x-item-pressed",itemCls:null,selectedCls:"x-item-selected",triggerEvent:"itemtap",triggerCtEvent:"tap",deselectOnContainerClick:true,scrollable:true,inline:null,pressedDelay:100,loadingText:"Loading...",useComponents:null,itemConfig:{},maxItemCache:20,defaultType:"dataitem",scrollToTopOnRefresh:true},constructor:function(a){var b=this;b.hasLoadedStore=false;b.mixins.selectable.constructor.apply(b,arguments);b.callParent(arguments)},updateItemCls:function(c,b){var a=this.container;if(a){if(b){a.doRemoveItemCls(b)}if(c){a.doAddItemCls(c)}}},storeEventHooks:{beforeload:"onBeforeLoad",load:"onLoad",refresh:"refresh",addrecords:"onStoreAdd",removerecords:"onStoreRemove",updaterecord:"onStoreUpdate"},initialize:function(){this.callParent();var b=this,a;b.on(b.getTriggerCtEvent(),b.onContainerTrigger,b);a=b.container=this.add(new Ext.dataview[b.getUseComponents()?"component":"element"].Container({baseCls:this.getBaseCls()}));a.dataview=b;b.on(b.getTriggerEvent(),b.onItemTrigger,b);a.on({itemtouchstart:"onItemTouchStart",itemtouchend:"onItemTouchEnd",itemtap:"onItemTap",itemtaphold:"onItemTapHold",itemtouchmove:"onItemTouchMove",itemsingletap:"onItemSingleTap",itemdoubletap:"onItemDoubleTap",itemswipe:"onItemSwipe",scope:b});if(this.getStore()){this.refresh()}},applyInline:function(a){if(Ext.isObject(a)){a=Ext.apply({},a)}return a},updateInline:function(c,b){var a=this.getBaseCls();if(b){this.removeCls([a+"-inlineblock",a+"-nowrap"])}if(c){this.addCls(a+"-inlineblock");if(Ext.isObject(c)&&c.wrap===false){this.addCls(a+"-nowrap")}else{this.removeCls(a+"-nowrap")}}},prepareData:function(c,b,a){c.xindex=b+1;return c},onContainerTrigger:function(b){var a=this;if(b.target!=a.element.dom){return}if(a.getDeselectOnContainerClick()&&a.getStore()){a.deselectAll()}},onItemTrigger:function(b,a){this.selectWithEvent(this.getStore().getAt(a))},doAddPressedCls:function(a){var c=this,b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.addCls(c.getPressedCls())}},onItemTouchStart:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireAction("itemtouchstart",[f,d,h,a,g],"doItemTouchStart")},doItemTouchStart:function(c,b,e,a){var d=c.getPressedDelay();if(a){if(d>0){c.pressedTimeout=Ext.defer(c.doAddPressedCls,d,c,[a])}else{c.doAddPressedCls(a)}}},onItemTouchEnd:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(this.hasOwnProperty("pressedTimeout")){clearTimeout(this.pressedTimeout);delete this.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchend",f,d,h,a,g)},onItemTouchMove:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(f.hasOwnProperty("pressedTimeout")){clearTimeout(f.pressedTimeout);delete f.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchmove",f,d,h,a,g)},onItemTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtap",f,d,h,a,g)},onItemTapHold:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtaphold",f,d,h,a,g)},onItemSingleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemsingletap",f,d,h,a,g)},onItemDoubleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemdoubletap",f,d,h,a,g)},onItemSwipe:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemswipe",f,d,h,a,g)},onItemSelect:function(a,b){var c=this;if(b){c.doItemSelect(c,a)}else{c.fireAction("select",[c,a],"doItemSelect")}},doItemSelect:function(c,a){if(c.container&&!c.isDestroyed){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls(c.getPressedCls());b.addCls(c.getSelectedCls())}}},onItemDeselect:function(a,b){var c=this;if(c.container&&!c.isDestroyed){if(b){c.doItemDeselect(c,a)}else{c.fireAction("deselect",[c,a,b],"doItemDeselect")}}},doItemDeselect:function(c,a){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls([c.getPressedCls(),c.getSelectedCls()])}},updateData:function(b){var a=this.getStore();if(!a){this.setStore(Ext.create("Ext.data.Store",{data:b}))}else{a.add(b)}},applyStore:function(b){var d=this,e=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(b){b=Ext.data.StoreManager.lookup(b);if(b&&Ext.isObject(b)&&b.isStore){b.on(e);c=b.getProxy();if(c){a=c.getReader();if(a){a.on("exception","handleException",this)}}}}return b},handleException:function(){this.setMasked(false)},updateStore:function(b,e){var d=this,f=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(e&&Ext.isObject(e)&&e.isStore){if(e.autoDestroy){e.destroy()}else{e.un(f);c=e.getProxy();if(c){a=c.getReader();if(a){a.un("exception","handleException",this)}}}}if(b){if(b.isLoaded()){this.hasLoadedStore=true}if(b.isLoading()){d.onBeforeLoad()}if(d.container){d.refresh()}}},onBeforeLoad:function(){var b=this.getScrollable();if(b){b.getScroller().stopAnimation()}var a=this.getLoadingText();if(a){this.setMasked({xtype:"loadmask",message:a});if(b){b.getScroller().setDisabled(true)}}this.hideEmptyText()},updateEmptyText:function(c,d){var b=this,a;if(d&&b.emptyTextCmp){b.remove(b.emptyTextCmp,true);delete b.emptyTextCmp}if(c){b.emptyTextCmp=b.add({xtype:"component",cls:b.getBaseCls()+"-emptytext",html:c,hidden:true});a=b.getStore();if(a&&b.hasLoadedStore&&!a.getCount()){this.showEmptyText()}}},onLoad:function(a){var b=this.getScrollable();this.hasLoadedStore=true;this.setMasked(false);if(b){b.getScroller().setDisabled(false)}if(!a.getCount()){this.showEmptyText()}},refresh:function(){var b=this,a=b.container;if(!b.getStore()){if(!b.hasLoadedStore&&!b.getDeferEmptyText()){b.showEmptyText()}return}if(a){b.fireAction("refresh",[b],"doRefresh")}},applyItemTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onAfterRender:function(){var a=this;a.callParent(arguments);a.updateStore(a.getStore())},getViewItems:function(){return this.container.getViewItems()},doRefresh:function(f){var a=f.container,j=f.getStore(),b=j.getRange(),e=a.getViewItems(),h=b.length,l=e.length,c=h-l,g=f.getScrollable(),d,k;if(this.getScrollToTopOnRefresh()&&g){g.getScroller().scrollToTop()}if(h<1){f.onStoreClear();return}if(c<0){a.moveItemsToCache(l+c,l-1);e=a.getViewItems();l=e.length}else{if(c>0){a.moveItemsFromCache(j.getRange(l))}}for(d=0;dh.y){c=g;break}f=g}return{current:f,next:c}},doRefreshHeaders:function(){if(!this.getGrouped()||!this.container){return false}var l=this.findGroupHeaderIndices(),f=l.length,g=this.container.getViewItems(),j=this.pinHeaderInfo={offsets:[]},a=j.offsets,h=this.getScrollable(),e,k,b,d,c;if(f){for(b=0;bd.offset)||(f&&h0&&d.offset-h<=c){var k=c-(d.offset-h);this.translateHeader(k)}else{this.translateHeader(null)}},translateHeaderTransform:function(a){this.header.renderElement.dom.style.webkitTransform=(a===null)?null:"translate3d(0px, -"+a+"px, 0px)"},translateHeaderCssPosition:function(a){this.header.renderElement.dom.style.top=(a===null)?null:"-"+Math.round(a)+"px"},setActiveGroup:function(b){var a=this,c=a.header;if(c){if(b&&b.header){if(!a.activeGroup||a.activeGroup.header!=b.header){c.show();if(c.element){c.setHtml(b.header.innerHTML)}}}else{if(c&&c.element){c.hide()}}}this.activeGroup=b},onIndex:function(o,c){var r=this,s=c.toLowerCase(),b=r.getStore(),q=b.getGroups(),f=q.length,h=r.getScrollable(),n,e,m,g,k,p;if(h){n=r.getScrollable().getScroller()}else{return}for(m=0;ms){g=e;break}else{g=e}}if(h&&g){p=r.container.getViewItems()[b.indexOf(g.children[0])];n.stopAnimation();var l=n.getContainerSize().y,j=n.getSize().y,d=j-l,a=(p.offsetTop>d)?d:p.offsetTop;n.scrollTo(0,a)}},applyOnItemDisclosure:function(a){if(Ext.isFunction(a)){return{scope:this,handler:a}}return a},handleItemDisclosure:function(f){var d=this,c=f.getTarget().parentNode,b=d.container.getViewItems().indexOf(c),a=d.getStore().getAt(b);d.fireAction("disclose",[d,a,c,b,f],"doDisclose")},doDisclose:function(f,a,d,c,g){var b=f.getOnItemDisclosure();if(b&&b.handler){b.handler.call(b.scope||f,a,d,c,g)}},findGroupHeaderIndices:function(){if(!this.getGrouped()){return[]}var h=this,k=h.getStore();if(!k){return[]}var b=h.container,d=k.getGroups(),m=d.length,g=b.getViewItems(),c=[],l=b.footerClsShortCache,e,a,f,n,j;b.doRemoveHeaders();b.doRemoveFooterCls();if(g.length){for(e=0;e class="x-list-item-leaf">'+a.getItemTextTpl(b)+""},this.getListConfig())}},function(){});Ext.define("Ext.form.FieldSet",{extend:"Ext.Container",alias:"widget.fieldset",requires:["Ext.Title"],config:{baseCls:Ext.baseCSSPrefix+"form-fieldset",title:null,instructions:null},applyTitle:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"top",baseCls:this.getBaseCls()+"-title"});return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}},applyInstructions:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"bottom",baseCls:this.getBaseCls()+"-instructions"});return Ext.factory(a,Ext.Title,this.getInstructions())},updateInstructions:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}}});Ext.define("Ext.form.Panel",{alternateClassName:"Ext.form.FormPanel",extend:"Ext.Panel",xtype:"formpanel",requires:["Ext.XTemplate","Ext.field.Checkbox","Ext.Ajax"],config:{baseCls:Ext.baseCSSPrefix+"form",standardSubmit:false,url:null,baseParams:null,submitOnAction:false,record:null,method:"post",scrollable:{translationMethod:"scrollposition"}},getElementConfig:function(){var a=this.callParent();a.tag="form";return a},initialize:function(){var a=this;a.callParent();a.element.on({submit:"onSubmit",scope:a})},updateRecord:function(c){var a,b,d;if(c&&(a=c.fields)){b=this.getValues();for(d in b){if(b.hasOwnProperty(d)&&a.containsKey(d)){c.set(d,b[d])}}}return this},setRecord:function(a){var b=this;if(a&&a.data){b.setValues(a.data)}b._record=a;return this},onSubmit:function(b){var a=this;if(b&&!a.getStandardSubmit()){b.stopEvent()}else{this.submit()}},updateSubmitOnAction:function(a){if(a){this.on({action:"onFieldAction",scope:this})}else{this.un({action:"onFieldAction",scope:this})}},onFieldAction:function(a){if(this.getSubmitOnAction()){a.blur();this.submit()}},submit:function(a){var c=this,b=c.element.dom||{},d;a=Ext.apply({url:c.getUrl()||b.action,submit:false,method:c.getMethod()||b.method||"post",autoAbort:false,params:null,waitMsg:null,headers:null,success:null,failure:null},a||{});d=c.getValues(c.getStandardSubmit()||!a.submitDisabled);return c.fireAction("beforesubmit",[c,d,a],"doBeforeSubmit")},doBeforeSubmit:function(f,h,b){var e=f.element.dom||{};if(f.getStandardSubmit()){if(b.url&&Ext.isEmpty(e.action)){e.action=b.url}var a=this.query("spinnerfield"),d=a.length,c,g;for(c=0;c1;d.doChangeView(c,a,false)},onViewRemove:function(c){var d=this,b=d.backButtonStack,a;d.endAnimation();b.pop();a=b.length>1;d.doChangeView(c,a,true)},doChangeView:function(k,c,g){var r=this,o=r.leftBox,e=o.element,f=r.titleComponent,m=f.element,n=r.getBackButton(),l=r.getTitleText(),h=r.getBackButtonText(),q=r.getAnimation()&&k.getLayout().getAnimation(),p=q&&q.isAnimation&&k.isPainted(),d,i,a,j,b;if(p){i=r.createProxy(o.element);e.setStyle("opacity","0");n.setText(h);n[c?"show":"hide"]();a=r.createProxy(f.element.getParent());m.setStyle("opacity","0");r.setTitle(l);r.refreshTitlePosition();d=r.measureView(i,a,g);j=d.left;b=d.title;r.isAnimating=true;r.animate(e,j.element);r.animate(m,b.element,function(){m.setLeft(d.titleLeft);r.isAnimating=false});if(Ext.os.is.Android2&&!this.getAndroid2Transforms()){i.ghost.destroy();a.ghost.destroy()}else{r.animate(i.ghost,j.ghost);r.animate(a.ghost,b.ghost,function(){i.ghost.destroy();a.ghost.destroy()})}}else{if(c){n.setText(h);n.show()}else{n.hide()}r.setTitle(l)}},measureView:function(e,u,k){var w=this,j=w.element,v=w.leftBox.element,p=w.titleComponent.element,l=Math.min(j.getWidth()/3,200),q=v.getWidth(),c=j.getX(),m=j.getWidth(),n=p.getX(),d=p.getLeft(),s=p.getWidth(),r=e.x,t=e.width,a=e.left,h=Ext.os.is.Android2&&!this.getAndroid2Transforms(),i,b,f,x,o,g;g=c-r-t;if(k){i=g;b=Math.min(n-t,l)}else{b=g;i=Math.min(n-c,l)}if(h){f={element:{from:{left:i,opacity:1},to:{left:0,opacity:1}}}}else{f={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:0},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}g=c-n+q;if((a+s)>n){o=c-n-s}if(k){p.setLeft(0);b=c+m;if(o!==undefined){i=o}else{i=g}}else{i=m-n;if(o!==undefined){b=o}else{b=g}}if(h){x={element:{from:{left:i,opacity:1},to:{left:d,opacity:1}}}}else{x={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:d},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}return{left:f,title:x,titleLeft:d}},animate:function(b,a,e){var c=this,d;b.setLeft(0);a=Ext.apply(a,{element:b,easing:"ease-in-out",duration:c.getAnimation().duration});d=new Ext.fx.Animation(a);d.on("animationend",function(){if(e){e.call(c)}},c);Ext.Animator.run(d);c.activeAnimations.push(d)},endAnimation:function(){var a=this.activeAnimations,d,b,c;if(a){c=a.length;for(b=0;b0){if(b&&b.isAnimation){b.setReverse(true)}a.setActiveItem(d-1);a.getNavigationBar().onViewRemove(a,c[d],d)}},doRemove:function(){var a=this.getLayout().getAnimation();if(a&&a.isAnimation){a.setReverse(false)}this.callParent(arguments)},onItemAdd:function(b,a){this.doItemLayoutAdd(b,a);if(!this.isItemsInitializing&&b.isInnerItem()){this.setActiveItem(b);this.getNavigationBar().onViewAdd(this,b,a)}if(this.initialized){this.fireEvent("add",this,b,a)}},reset:function(){return this.pop(this.getInnerItems().length)}});Ext.define("Ext.picker.Slot",{extend:"Ext.dataview.DataView",xtype:"pickerslot",alternateClassName:"Ext.Picker.Slot",requires:["Ext.XTemplate","Ext.data.Store","Ext.Component","Ext.data.StoreManager"],isSlot:true,config:{title:null,showTitle:true,cls:Ext.baseCSSPrefix+"picker-slot",name:null,value:null,flex:1,align:"left",displayField:"text",valueField:"value",scrollable:{direction:"vertical",indicators:false,momentumEasing:{minVelocity:2},slotSnapEasing:{duration:100}}},constructor:function(){this.selectedIndex=0;this.callParent(arguments)},applyTitle:function(a){if(a){a=Ext.create("Ext.Component",{cls:Ext.baseCSSPrefix+"picker-slot-title",docked:"top",html:a})}return a},updateTitle:function(b,a){if(b){this.add(b);this.setupBar()}if(a){this.remove(a)}},updateShowTitle:function(a){var b=this.getTitle();if(b){b[a?"show":"hide"]();this.setupBar()}},updateDisplayField:function(a){this.setItemTpl('
'+Ext.baseCSSPrefix+'picker-invalid">{'+a+"}
")},updateAlign:function(a,c){var b=this.element;b.addCls(Ext.baseCSSPrefix+"picker-"+a);b.removeCls(Ext.baseCSSPrefix+"picker-"+c)},applyData:function(d){var f=[],c=d&&d.length,a,b,e;if(d&&Ext.isArray(d)&&c){for(a=0;a0){c[0].addCls(b+"first");c[c.length-1].addCls(b+"last")}this.updateUseTitles(this.getUseTitles())},onDoneButtonTap:function(){var a=this._value,b=this.getValue(true);if(b!=a){this.fireEvent("change",this,b)}this.hide()},onCancelButtonTap:function(){this.fireEvent("cancel",this);this.hide()},onSlotPick:function(a){this.fireEvent("pick",this,this.getValue(true),a)},onShow:function(){if(!this.isHidden()){this.setValue(this._value)}},setValue:function(k,a){var f=this,d=f.getInnerItems(),e=d.length,j,h,c,b,g;if(!k){k={};for(b=0;b{'+this.getDisplayField()+":htmlEncode}",listeners:{select:this.onListSelect,itemtap:this.onListTap,scope:this}}},a))}return this.listPanel},onMaskTap:function(){if(this.getDisabled()){return false}this.showPicker();return false},showPicker:function(){var b=this.getStore();if(!b||b.getCount()===0){return}if(this.getReadOnly()){return}this.isFocused=true;if(this.getUsePicker()){var e=this.getPhonePicker(),d=this.getName(),h={};h[d]=this.record.get(this.getValueField());e.setValue(h);if(!e.getParent()){Ext.Viewport.add(e)}e.show()}else{var f=this.getTabletPicker(),g=f.down("list"),b=g.getStore(),c=b.find(this.getValueField(),this.getValue(),null,null,null,true),a=b.getAt((c==-1)?0:c);if(!f.getParent()){Ext.Viewport.add(f)}f.showBy(this.getComponent());g.select(a,null,true)}},onListSelect:function(c,a){var b=this;if(a){b.setValue(a)}},onListTap:function(){this.listPanel.hide({type:"fade",out:true,scope:this})},onPickerChange:function(d,f){var e=this,g=f[e.getName()],b=e.getStore(),c=b.find(e.getValueField(),g,null,null,null,true),a=b.getAt(c);e.setValue(a)},onChange:function(f,h,e){var g=this,b=g.getStore(),d=(b)?b.find(g.getDisplayField(),e):-1,c=g.getValueField(),a=(b)?b.getAt(d):null,e=(a)?a.get(c):null;g.fireEvent("change",g,g.getValue(),e)},updateOptions:function(b){var a=this.getStore();if(!a){this.setStore(true);a=this._store}if(!b){a.clearData()}else{a.setData(b);this.onStoreDataChanged(a)}},applyStore:function(a){if(a===true){a=Ext.create("Ext.data.Store",{fields:[this.getValueField(),this.getDisplayField()]})}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:this,addrecords:this.onStoreDataChanged,removerecords:this.onStoreDataChanged,updaterecord:this.onStoreDataChanged,refresh:this.onStoreDataChanged})}return a},updateStore:function(a){if(a){this.onStoreDataChanged(a)}},onStoreDataChanged:function(a){var c=this.getInitialConfig(),b=this.getValue();if(Ext.isDefined(b)){this.updateValue(this.applyValue(b))}if(this.getValue()===null){if(c.hasOwnProperty("value")){this.setValue(c.value)}if(this.getValue()===null){if(a.getCount()>0){this.setValue(a.getAt(0))}}}},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){var b=this.getStore(),a=(this.originalValue)?this.originalValue:b.getAt(0);if(b&&a){this.setValue(a)}return this},onFocus:function(a){this.fireEvent("focus",this,a);this.isFocused=true;this.showPicker()},destroy:function(){this.callParent(arguments);Ext.destroy(this.listPanel,this.picker,this.hiddenField)}});Ext.define("Ext.picker.Date",{extend:"Ext.picker.Picker",xtype:"datepicker",alternateClassName:"Ext.DatePicker",requires:["Ext.DateExtras"],config:{yearFrom:1980,yearTo:new Date().getFullYear(),monthText:"Month",dayText:"Day",yearText:"Year",slotOrder:["month","day","year"]},initialize:function(){this.callParent();this.on({scope:this,delegate:"> slot",slotpick:this.onSlotPick})},setValue:function(b,a){if(Ext.isDate(b)){b={day:b.getDate(),month:b.getMonth()+1,year:b.getFullYear()}}this.callParent([b,a])},getValue:function(k){var h={},e=this.getItems().items,d=e.length,a,g,c,f,j,b;for(b=0;bf){e=m;m=f;f=e}for(d=m;d<=f;d++){g.push({text:d,value:d})}a=this.getDaysInMonth(1,new Date().getFullYear());for(d=0;d thumb",dragstart:"onThumbDragStart",drag:"onThumbDrag",dragend:"onThumbDragEnd"});this.on({painted:"refresh",resize:"refresh"})},factoryThumb:function(){return Ext.factory(this.getThumbConfig(),Ext.slider.Thumb)},getThumbs:function(){return this.innerItems},getThumb:function(a){if(typeof a!="number"){a=0}return this.innerItems[a]},refreshOffsetValueRatio:function(){var b=this.getMaxValue()-this.getMinValue(),a=this.elementWidth-this.thumbWidth;this.offsetValueRatio=a/b},refreshElementWidth:function(){this.elementWidth=this.element.dom.offsetWidth;var a=this.getThumb(0);if(a){this.thumbWidth=a.getElementWidth()}},refresh:function(){this.refreshElementWidth();this.refreshValue()},setActiveThumb:function(b){var a=this.activeThumb;if(a&&a!==b){a.setZIndex(null)}this.activeThumb=b;b.setZIndex(2);return this},onThumbDragStart:function(a,b){if(b.absDeltaX<=b.absDeltaY){return false}else{b.stopPropagation()}if(this.getAllowThumbsOverlapping()){this.setActiveThumb(a)}this.dragStartValue=this.getValue()[this.getThumbIndex(a)];this.fireEvent("dragstart",this,a,this.dragStartValue,b)},onThumbDrag:function(c,g,a){var d=this.getThumbIndex(c),f=this.offsetValueRatio,b=this.constrainValue(a/f);g.stopPropagation();this.setIndexValue(d,b);this.fireEvent("drag",this,c,this.getValue(),g);return false},setIndexValue:function(d,g,f){var c=this.getThumb(d),b=this.getValue(),e=this.offsetValueRatio,a=c.getDraggable();a.setOffset(g*e,null,f);b[d]=g},onThumbDragEnd:function(a,f){this.refreshThumbConstraints(a);var c=this.getThumbIndex(a),d=this.getValue()[c],b=this.dragStartValue;this.fireEvent("dragend",this,a,this.getValue(),f);if(b!==d){this.fireEvent("change",this,a,d,b)}},getThumbIndex:function(a){return this.getThumbs().indexOf(a)},refreshThumbConstraints:function(d){var b=this.getAllowThumbsOverlapping(),a=d.getDraggable().getOffset().x,c=this.getThumbs(),e=this.getThumbIndex(d),g=c[e-1],h=c[e+1],f=this.thumbWidth;if(g){g.getDraggable().addExtraConstraint({max:{x:a-((b)?0:f)}})}if(h){h.getDraggable().addExtraConstraint({min:{x:a+((b)?0:f)}})}},onTap:function(j){if(this.isDisabled()){return}var k=Ext.get(j.target);if(!k||k.hasCls("x-thumb")){return}var n=j.touch.point.x,h=this.element,c=h.getX(),d=n-c-(this.thumbWidth/2),o=this.constrainValue(d/this.offsetValueRatio),r=this.getValue(),q=Infinity,m=r.length,g,f,l,p,b,a;if(m===1){p=0}else{for(g=0;g=(a/2)){e+=(c>0)?a:-a}e=Math.max(d,e);e=Math.min(f,e);return e},setThumbsCount:function(e){var a=this.getThumbs(),f=a.length,c,d,b;if(f>e){for(c=0,d=f-e;c0,b=d.getMaxValueCls(),e=d.getMinValueCls();this.element.addCls(g?b:e);this.element.removeCls(g?e:b)},toggle:function(){var a=this.getValue();this.setValue((a==1)?0:1);return this},onTap:function(){if(this.isDisabled()){return}var b=this.getValue(),c=(b==1)?0:1,a=this.getThumb(0);this.setIndexValue(0,c,this.getAnimation());this.refreshThumbConstraints(a);this.fireEvent("change",this,a,c,b)}});Ext.define("Ext.field.Toggle",{extend:"Ext.field.Slider",xtype:"togglefield",alternateClassName:"Ext.form.Toggle",requires:["Ext.slider.Toggle"],config:{cls:"x-toggle-field"},proxyConfig:{minValueCls:"x-toggle-off",maxValueCls:"x-toggle-on"},applyComponent:function(a){return Ext.factory(a,Ext.slider.Toggle)},setValue:function(a){if(a===true){a=1}this.getComponent().setValue(a);return this},getValue:function(){return(this.getComponent().getValue()==1)?1:0},toggle:function(){this.getComponent().toggle();return this}});Ext.define("Ext.tab.Tab",{extend:"Ext.Button",xtype:"tab",alternateClassName:"Ext.Tab",isTab:true,config:{baseCls:Ext.baseCSSPrefix+"tab",pressedCls:Ext.baseCSSPrefix+"tab-pressed",activeCls:Ext.baseCSSPrefix+"tab-active",active:false,title:" "},template:[{tag:"span",reference:"badgeElement",hidden:true},{tag:"span",className:Ext.baseCSSPrefix+"button-icon",reference:"iconElement",style:"visibility: hidden !important"},{tag:"span",reference:"textElement",hidden:true}],updateTitle:function(a){this.setText(a)},hideIconElement:function(){this.iconElement.dom.style.setProperty("visibility","hidden","!important")},showIconElement:function(){this.iconElement.dom.style.setProperty("visibility","visible","!important")},updateActive:function(c,b){var a=this.getActiveCls();if(c&&!b){this.element.addCls(a);this.fireEvent("activate",this)}else{if(b){this.element.removeCls(a);this.fireEvent("deactivate",this)}}}},function(){this.override({activate:function(){this.setActive(true)},deactivate:function(){this.setActive(false)}})});Ext.define("Ext.tab.Bar",{extend:"Ext.Toolbar",alternateClassName:"Ext.TabBar",xtype:"tabbar",requires:["Ext.tab.Tab"],config:{baseCls:Ext.baseCSSPrefix+"tabbar",defaultType:"tab",layout:{type:"hbox",align:"middle"}},eventedConfig:{activeTab:null},initialize:function(){var a=this;a.callParent();a.on({tap:"onTabTap",delegate:"> tab",scope:a})},onTabTap:function(a){this.setActiveTab(a)},applyActiveTab:function(b,c){if(!b&&b!==0){return}var a=this.parseActiveTab(b);if(!a){return}return a},doSetDocked:function(a){var c=this.getLayout(),b=a=="bottom"?"center":"left";if(c.isLayout){c.setPack(b)}else{c.pack=(c&&c.pack)?c.pack:b}},doSetActiveTab:function(b,a){if(b){b.setActive(true)}if(a){a.setActive(false)}},parseActiveTab:function(a){if(typeof a=="number"){return this.getInnerItems()[a]}else{if(typeof a=="string"){a=Ext.getCmp(a)}}return a}});Ext.define("Ext.tab.Panel",{extend:"Ext.Container",xtype:"tabpanel",alternateClassName:"Ext.TabPanel",requires:["Ext.tab.Bar"],config:{ui:"dark",tabBar:true,tabBarPosition:"top",layout:{type:"card",animation:{type:"slide",direction:"left"}},cls:Ext.baseCSSPrefix+"tabpanel"},delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange",disabledchange:"onItemDisabledChange"},initialize:function(){this.callParent();this.on({order:"before",activetabchange:"doTabChange",delegate:"> tabbar",scope:this})},applyScrollable:function(){return false},updateUi:function(a,b){this.callParent(arguments);if(this.initialized){this.getTabBar().setUi(a)}},doSetActiveItem:function(d,j){if(d){var f=this.getInnerItems(),g=f.indexOf(j),i=f.indexOf(d),e=g>i,c=this.getLayout().getAnimation(),b=this.getTabBar(),h=b.parseActiveTab(g),a=b.parseActiveTab(i);if(c&&c.setReverse){c.setReverse(e)}this.callParent(arguments);if(i!=-1){this.forcedChange=true;b.setActiveTab(i);this.forcedChange=false;if(h){h.setActive(false)}if(a){a.setActive(true)}}}},doTabChange:function(a,d){var b=this.getActiveItem(),c;this.setActiveItem(a.indexOf(d));c=this.getActiveItem();return this.forcedChange||b!==c},applyTabBar:function(a){if(a===true){a={}}if(a){Ext.applyIf(a,{ui:this.getUi(),docked:this.getTabBarPosition()})}return Ext.factory(a,Ext.tab.Bar,this.getTabBar())},updateTabBar:function(a){if(a){this.add(a);this.setTabBarPosition(a.getDocked())}},updateTabBarPosition:function(b){var a=this.getTabBar();if(a){a.setDocked(b)}},onItemAdd:function(e){var k=this;if(!e.isInnerItem()){return k.callParent(arguments)}var c=k.getTabBar(),o=e.getInitialConfig(),d=o.tab||{},g=(e.getTitle)?e.getTitle():o.title,i=(e.getIconCls)?e.getIconCls():o.iconCls,j=(e.getHidden)?e.getHidden():o.hidden,n=(e.getDisabled)?e.getDisabled():o.disabled,p=(e.getBadgeText)?e.getBadgeText():o.badgeText,b=k.getInnerItems(),h=b.indexOf(e),l=c.getItems(),a=c.getActiveTab(),m=(l.length>=b.length)&&l.getAt(h),f;if(g&&!d.title){d.title=g}if(i&&!d.iconCls){d.iconCls=i}if(j&&!d.hidden){d.hidden=j}if(n&&!d.disabled){d.disabled=n}if(p&&!d.badgeText){d.badgeText=p}f=Ext.factory(d,Ext.tab.Tab,m);if(!m){c.insert(h,f)}e.tab=f;k.callParent(arguments);if(!a&&a!==0){c.setActiveTab(c.getActiveItem())}},onItemDisabledChange:function(a,b){if(a&&a.tab){a.tab.setDisabled(b)}},onItemRemove:function(b,a){this.getTabBar().remove(b.tab,this.getAutoDestroy());this.callParent(arguments)}},function(){});Ext.define("Ext.table.Cell",{extend:"Ext.Container",xtype:"tablecell",config:{baseCls:"x-table-cell"},getElementConfig:function(){var a=this.callParent();a.children.length=0;return a}});Ext.define("Ext.table.Row",{extend:"Ext.table.Cell",xtype:"tablerow",config:{baseCls:"x-table-row",defaultType:"tablecell"}});Ext.define("Ext.table.Table",{extend:"Ext.Container",requires:["Ext.table.Row"],xtype:"table",config:{baseCls:"x-table",defaultType:"tablerow"},cachedConfig:{fixedLayout:false},fixedLayoutCls:"x-table-fixed",updateFixedLayout:function(a){this.innerElement[a?"addCls":"removeCls"](this.fixedLayoutCls)}});Ext.define("Ext.viewport.Default",{extend:"Ext.Container",xtype:"viewport",PORTRAIT:"portrait",LANDSCAPE:"landscape",requires:["Ext.LoadMask"],config:{autoMaximize:false,autoBlurInput:true,preventPanning:true,preventZooming:false,autoRender:true,layout:"card",width:"100%",height:"100%"},isReady:false,isViewport:true,isMaximizing:false,id:"ext-viewport",isInputRegex:/^(input|textarea|select|a)$/i,focusedElement:null,fullscreenItemCls:Ext.baseCSSPrefix+"fullscreen",constructor:function(a){var b=Ext.Function.bind;this.doPreventPanning=b(this.doPreventPanning,this);this.doPreventZooming=b(this.doPreventZooming,this);this.doBlurInput=b(this.doBlurInput,this);this.maximizeOnEvents=["ready","orientationchange"];this.orientation=this.determineOrientation();this.windowWidth=this.getWindowWidth();this.windowHeight=this.getWindowHeight();this.windowOuterHeight=this.getWindowOuterHeight();if(!this.stretchHeights){this.stretchHeights={}}this.callParent([a]);if(this.supportsOrientation()){this.addWindowListener("orientationchange",b(this.onOrientationChange,this))}else{this.addWindowListener("resize",b(this.onResize,this))}document.addEventListener("focus",b(this.onElementFocus,this),true);document.addEventListener("blur",b(this.onElementBlur,this),true);Ext.onDocumentReady(this.onDomReady,this);this.on("ready",this.onReady,this,{single:true});this.getEventDispatcher().addListener("component","*","fullscreen","onItemFullscreenChange",this);return this},onDomReady:function(){this.isReady=true;this.updateSize();this.fireEvent("ready",this)},onReady:function(){if(this.getAutoRender()){this.render()}},onElementFocus:function(a){this.focusedElement=a.target},onElementBlur:function(){this.focusedElement=null},render:function(){if(!this.rendered){var a=Ext.getBody(),b=Ext.baseCSSPrefix,h=[],d=Ext.os,g=d.name.toLowerCase(),f=Ext.browser.name.toLowerCase(),e=d.version.getMajor(),c=this.getOrientation();this.renderTo(a);h.push(b+d.deviceType.toLowerCase());if(d.is.iPad){h.push(b+"ipad")}h.push(b+g);h.push(b+f);if(e){h.push(b+g+"-"+e)}if(d.is.BlackBerry){h.push(b+"bb")}if(Ext.browser.is.Standalone){h.push(b+"standalone")}h.push(b+c);a.addCls(h)}},applyAutoBlurInput:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doBlurInput,false)}else{this.removeWindowListener(b,this.doBlurInput,false)}return a},applyAutoMaximize:function(a){if(Ext.browser.is.WebView){a=false}if(a){this.on("ready","doAutoMaximizeOnReady",this,{single:true});this.on("orientationchange","doAutoMaximizeOnOrientationChange",this)}else{this.un("ready","doAutoMaximizeOnReady",this);this.un("orientationchange","doAutoMaximizeOnOrientationChange",this)}return a},applyPreventPanning:function(a){if(a){this.addWindowListener("touchmove",this.doPreventPanning,false)}else{this.removeWindowListener("touchmove",this.doPreventPanning,false)}return a},applyPreventZooming:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doPreventZooming,false)}else{this.removeWindowListener(b,this.doPreventZooming,false)}return a},doAutoMaximizeOnReady:function(){var a=arguments[arguments.length-1];a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();a.resume();this.fireEvent("ready",this)},this,{single:true});this.maximize()},doAutoMaximizeOnOrientationChange:function(){var a=arguments[arguments.length-1],b=a.firingArguments;a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();b[1]=this.windowWidth;b[2]=this.windowHeight;a.resume()},this,{single:true});this.maximize()},doBlurInput:function(b){var a=b.target,c=this.focusedElement;if(c&&!this.isInputRegex.test(a.tagName)){delete this.focusedElement;c.blur()}},doPreventPanning:function(a){a.preventDefault()},doPreventZooming:function(b){if("button" in b&&b.button!==0){return}var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)){b.preventDefault()}},addWindowListener:function(b,c,a){window.addEventListener(b,c,Boolean(a))},removeWindowListener:function(b,c,a){window.removeEventListener(b,c,Boolean(a))},doAddListener:function(a,d,c,b){if(a==="ready"&&this.isReady&&!this.isMaximizing){d.call(c);return this}this.mixins.observable.doAddListener.apply(this,arguments)},supportsOrientation:function(){return Ext.feature.has.Orientation},onResize:function(){var c=this.windowWidth,f=this.windowHeight,e=this.getWindowWidth(),a=this.getWindowHeight(),d=this.getOrientation(),b=this.determineOrientation();if((c!==e||f!==a)&&d!==b){this.fireOrientationChangeEvent(b,d)}},onOrientationChange:function(){var b=this.getOrientation(),a=this.determineOrientation();if(a!==b){this.fireOrientationChangeEvent(a,b)}},fireOrientationChangeEvent:function(b,c){var a=Ext.baseCSSPrefix;Ext.getBody().replaceCls(a+c,a+b);this.orientation=b;this.updateSize();this.fireEvent("orientationchange",this,b,this.windowWidth,this.windowHeight)},updateSize:function(b,a){this.windowWidth=b!==undefined?b:this.getWindowWidth();this.windowHeight=a!==undefined?a:this.getWindowHeight();return this},waitUntil:function(h,e,g,a,f){if(!a){a=50}if(!f){f=2000}var c=this,b=0;setTimeout(function d(){b+=a;if(h.call(c)===true){if(e){e.call(c)}}else{if(b>=f){if(g){g.call(c)}}else{setTimeout(d,a)}}},a)},maximize:function(){this.fireMaximizeEvent()},fireMaximizeEvent:function(){this.updateSize();this.fireEvent("maximize",this)},doSetHeight:function(a){Ext.getBody().setHeight(a);this.callParent(arguments)},doSetWidth:function(a){Ext.getBody().setWidth(a);this.callParent(arguments)},scrollToTop:function(){window.scrollTo(0,-1)},getWindowWidth:function(){return window.innerWidth},getWindowHeight:function(){return window.innerHeight},getWindowOuterHeight:function(){return window.outerHeight},getWindowOrientation:function(){return window.orientation},getOrientation:function(){return this.orientation},getSize:function(){return{width:this.windowWidth,height:this.windowHeight}},determineOrientation:function(){var b=this.PORTRAIT,a=this.LANDSCAPE;if(this.supportsOrientation()){if(this.getWindowOrientation()%180===0){return b}return a}else{if(this.getWindowHeight()>=this.getWindowWidth()){return b}return a}},onItemFullscreenChange:function(a){a.addCls(this.fullscreenItemCls);this.add(a)}});Ext.define("Ext.viewport.Android",{extend:"Ext.viewport.Default",constructor:function(){this.on("orientationchange","doFireOrientationChangeEvent",this,{prepend:true});this.on("orientationchange","hideKeyboardIfNeeded",this,{prepend:true});return this.callParent(arguments)},getDummyInput:function(){var a=this.dummyInput,c=this.focusedElement,b=Ext.fly(c).getPageBox();if(!a){this.dummyInput=a=document.createElement("input");a.style.position="absolute";a.style.opacity="0";document.body.appendChild(a)}a.style.left=b.left+"px";a.style.top=b.top+"px";a.style.display="";return a},doBlurInput:function(c){var b=c.target,d=this.focusedElement,a;if(d&&!this.isInputRegex.test(b.tagName)){a=this.getDummyInput();delete this.focusedElement;a.focus();setTimeout(function(){a.style.display="none"},100)}},hideKeyboardIfNeeded:function(){var a=arguments[arguments.length-1],b=this.focusedElement;if(b){delete this.focusedElement;a.pause();if(Ext.os.version.lt("4")){b.style.display="none"}else{b.blur()}setTimeout(function(){b.style.display="";a.resume()},1000)}},doFireOrientationChangeEvent:function(){var a=arguments[arguments.length-1];this.orientationChanging=true;a.pause();this.waitUntil(function(){return this.getWindowOuterHeight()!==this.windowOuterHeight},function(){this.windowOuterHeight=this.getWindowOuterHeight();this.updateSize();a.firingArguments[1]=this.windowWidth;a.firingArguments[2]=this.windowHeight;a.resume();this.orientationChanging=false},function(){});return this},applyAutoMaximize:function(a){a=this.callParent(arguments);this.on("add","fixSize",this,{single:true});if(!a){this.on("ready","fixSize",this,{single:true});this.onAfter("orientationchange","doFixSize",this)}else{this.un("ready","fixSize",this);this.unAfter("orientationchange","doFixSize",this)}},fixSize:function(){this.doFixSize()},doFixSize:function(){this.setHeight(this.getWindowHeight())},getActualWindowOuterHeight:function(){return Math.round(this.getWindowOuterHeight()/window.devicePixelRatio)},maximize:function(){var c=this.stretchHeights,b=this.orientation,a;a=c[b];if(!a){c[b]=a=this.getActualWindowOuterHeight()}if(!this.addressBarHeight){this.addressBarHeight=a-this.getWindowHeight()}this.setHeight(a);var d=Ext.Function.bind(this.isHeightMaximized,this,[a]);this.scrollToTop();this.waitUntil(d,this.fireMaximizeEvent,this.fireMaximizeEvent)},isHeightMaximized:function(a){this.scrollToTop();return this.getWindowHeight()===a}},function(){if(!Ext.os.is.Android){return}var a=Ext.os.version,b=Ext.browser.userAgent,c=/(htc|desire|incredible|ADR6300)/i.test(b)&&a.lt("2.3");if(c){this.override({constructor:function(d){if(!d){d={}}d.autoMaximize=false;this.watchDogTick=Ext.Function.bind(this.watchDogTick,this);setInterval(this.watchDogTick,1000);return this.callParent([d])},watchDogTick:function(){this.watchDogLastTick=Ext.Date.now()},doPreventPanning:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)},doPreventZooming:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)}})}if(a.match("2")){this.override({onReady:function(){this.addWindowListener("resize",Ext.Function.bind(this.onWindowResize,this));this.callParent(arguments)},scrollToTop:function(){document.body.scrollTop=100},onWindowResize:function(){var e=this.windowWidth,g=this.windowHeight,f=this.getWindowWidth(),d=this.getWindowHeight();if(this.getAutoMaximize()&&!this.isMaximizing&&!this.orientationChanging&&window.scrollY===0&&e===f&&d=g-this.addressBarHeight)||!this.focusedElement)){this.scrollToTop()}},fixSize:function(){var d=this.getOrientation(),f=window.outerHeight,g=window.outerWidth,e;if(d==="landscape"&&(f=g)){e=this.getActualWindowOuterHeight()}else{e=this.getWindowHeight()}this.waitUntil(function(){return e>this.getWindowHeight()},this.doFixSize,this.doFixSize,50,1000)}})}else{if(a.gtEq("3.1")){this.override({isHeightMaximized:function(d){this.scrollToTop();return this.getWindowHeight()===d-1}})}else{if(a.match("3")){this.override({isHeightMaximized:function(){this.scrollToTop();return true}})}}}if(a.gtEq("4")){this.override({doBlurInput:Ext.emptyFn})}});Ext.define("Ext.viewport.Ios",{extend:"Ext.viewport.Default",isFullscreen:function(){return this.isHomeScreen()},isHomeScreen:function(){return window.navigator.standalone===true},constructor:function(){this.callParent(arguments);if(this.getAutoMaximize()&&!this.isFullscreen()){this.addWindowListener("touchstart",Ext.Function.bind(this.onTouchStart,this))}},maximize:function(){if(this.isFullscreen()){return this.callParent()}var c=this.stretchHeights,b=this.orientation,d=this.getWindowHeight(),a=c[b];if(window.scrollY>0){this.scrollToTop();if(!a){c[b]=a=this.getWindowHeight()}this.setHeight(a);this.fireMaximizeEvent()}else{if(!a){a=this.getScreenHeight()}this.setHeight(a);this.waitUntil(function(){this.scrollToTop();return d!==this.getWindowHeight()},function(){if(!c[b]){a=c[b]=this.getWindowHeight();this.setHeight(a)}this.fireMaximizeEvent()},function(){a=c[b]=this.getWindowHeight();this.setHeight(a);this.fireMaximizeEvent()},50,1000)}},getScreenHeight:function(){return window.screen[this.orientation===this.PORTRAIT?"height":"width"]},onElementFocus:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){clearTimeout(this.scrollToTopTimer)}this.callParent(arguments)},onElementBlur:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){this.scrollToTopTimer=setTimeout(this.scrollToTop,500)}this.callParent(arguments)},onTouchStart:function(){if(this.focusedElement===null){this.scrollToTop()}},scrollToTop:function(){window.scrollTo(0,0)}},function(){if(!Ext.os.is.iOS){return}if(Ext.os.version.lt("3.2")){this.override({constructor:function(){var a=this.stretchHeights={};a[this.PORTRAIT]=416;a[this.LANDSCAPE]=268;return this.callOverridden(arguments)}})}if(Ext.os.version.lt("5")){this.override({fieldMaskClsTest:"-field-mask",doPreventZooming:function(b){var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)&&a.className.indexOf(this.fieldMaskClsTest)==-1){b.preventDefault()}}})}if(Ext.os.is.iPad){this.override({isFullscreen:function(){return true}})}});Ext.define("Ext.viewport.Viewport",{requires:["Ext.viewport.Ios","Ext.viewport.Android"],constructor:function(b){var c=Ext.os.name,d,a;switch(c){case"Android":d="Android";break;case"iOS":d="Ios";break;default:d="Default"}a=Ext.create("Ext.viewport."+d,b);return a}});Ext.define("Ext.event.recognizer.Swipe",{extend:"Ext.event.recognizer.SingleTouch",handledEvents:["swipe"],inheritableStatics:{MAX_OFFSET_EXCEEDED:16,MAX_DURATION_EXCEEDED:17,DISTANCE_NOT_ENOUGH:18},config:{minDistance:80,maxOffset:35,maxDuration:1000},onTouchStart:function(a){if(this.callParent(arguments)===false){return false}var b=a.changedTouches[0];this.startTime=a.time;this.isHorizontal=true;this.isVertical=true;this.startX=b.pageX;this.startY=b.pageY},onTouchMove:function(f){var h=f.changedTouches[0],b=h.pageX,g=h.pageY,c=Math.abs(b-this.startX),a=Math.abs(g-this.startY),d=f.time;if(d-this.startTime>this.getMaxDuration()){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(this.isVertical&&c>this.getMaxOffset()){this.isVertical=false}if(this.isHorizontal&&a>this.getMaxOffset()){this.isHorizontal=false}if(!this.isHorizontal&&!this.isVertical){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(i){if(this.onTouchMove(i)===false){return false}var h=i.changedTouches[0],l=h.pageX,j=h.pageY,g=l-this.startX,f=j-this.startY,c=Math.abs(g),b=Math.abs(f),m=this.getMinDistance(),d=i.time-this.startTime,k,a;if(this.isVertical&&bc){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(a>b){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(f){if(this.onTouchMove(f)!==false){var i=f.changedTouches[0],a=i.pageX,b=a-this.startX,h=Math.abs(b),d=f.time-this.startTime,g=this.getMinDistance(),c;if(h *{height:100%;width:100%;position:absolute}.x-video-ghost{-webkit-background-size:100% auto;background:black url() center center no-repeat}audio{width:100%}.x-panel,.x-msgbox,.x-panel-body{position:relative}.x-panel.x-floating,.x-msgbox.x-floating,.x-form.x-floating{padding:6px;-webkit-border-radius:0.3em;border-radius:0.3em;-webkit-box-shadow:rgba(0, 0, 0, 0.8) 0 0.2em 0.6em;background-color:#03111a;background-image:none}.x-panel.x-floating.x-floating-light,.x-msgbox.x-floating.x-floating-light,.x-form.x-floating.x-floating-light{background-color:#1985d0;background-image:none}.x-panel.x-floating > .x-panel-inner,.x-panel.x-floating .x-scroll-view,.x-panel.x-floating .x-body,.x-msgbox.x-floating > .x-panel-inner,.x-msgbox.x-floating .x-scroll-view,.x-msgbox.x-floating .x-body,.x-form.x-floating > .x-panel-inner,.x-form.x-floating .x-scroll-view,.x-form.x-floating .x-body{background-color:#fff;-webkit-border-radius:0.3em;border-radius:0.3em}.x-anchor{width:1.631em;height:0.7em;position:absolute;left:0;top:0;z-index:1;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAPCAYAAABut3YUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNpi/PX7LwOFwAyIG6HseiA+Ra5BjBQ6xg+IVwAxJ5T/HYgjgHgTOYYxUeCQUiBeh+QQBih7HVSOLiHDDMSTgTiTgLrpQJwLxH9p5RhOaLT4EakeFF3RQPyF2o6RhkaBGYkheRmIPYH4KbXSjC4QnyTDIch6danhGCcgPgwNGXKBNNQMb0ocEwXE24GYn4FyADJjI76Ej88x7UC8FIjZGKgHQDlxGtRsZmISMMjy+dBQoSXYBC0gv+NyDD80xzgx0AeAqg4fIH6NHk0qQHyMjg6B1WvHYDkNFjIgwS1ALMowMOAjEAeBHINe2Q0U+AUQYACQ10C2QNhRogAAAABJRU5ErkJggg==') no-repeat;-webkit-mask-size:1.631em 0.7em;overflow:hidden;background-color:#03111a;-webkit-transform-origin:0% 0%}.x-anchor.x-anchor-top{margin-left:-0.816em;margin-top:-0.7em}.x-anchor.x-anchor-bottom{-webkit-transform:rotate(180deg);margin-left:0.816em;margin-top:0.6em}.x-anchor.x-anchor-left{-webkit-transform:rotate(270deg);margin-left:-0.7em;margin-top:-0.1em}.x-anchor.x-anchor-right{-webkit-transform:rotate(90deg);margin-left:0.7em;margin-top:0}.x-floating.x-panel-light:after{background-color:#1985d0}.x-button{-webkit-background-clip:padding;background-clip:padding-box;-webkit-border-radius:0.4em;border-radius:0.4em;display:-webkit-box;display:box;-webkit-box-align:center;box-align:center;min-height:1.8em;padding:.3em .6em;position:relative;overflow:hidden;-webkit-user-select:none}.x-button,.x-toolbar .x-button{border:1px solid #999999;border-top-color:#a6a6a6;color:black}.x-button.x-button-back:before,.x-button.x-button-forward:before,.x-toolbar .x-button.x-button-back:before,.x-toolbar .x-button.x-button-forward:before{background:#999999}.x-button,.x-button.x-button-back:after,.x-button.x-button-forward:after,.x-toolbar .x-button,.x-toolbar .x-button.x-button-back:after,.x-toolbar .x-button.x-button-forward:after{background-color:#ccc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #dedede), color-stop(100%, #bababa));background-image:-webkit-linear-gradient(#ffffff,#dedede 2%,#bababa);background-image:linear-gradient(#ffffff,#dedede 2%,#bababa)}.x-button .x-button-icon.x-icon-mask,.x-toolbar .x-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-button.x-button-pressing,.x-button.x-button-pressing:after,.x-button.x-button-pressed,.x-button.x-button-pressed:after,.x-button.x-button-active,.x-button.x-button-active:after,.x-toolbar .x-button.x-button-pressing,.x-toolbar .x-button.x-button-pressing:after,.x-toolbar .x-button.x-button-pressed,.x-toolbar .x-button.x-button-pressed:after,.x-toolbar .x-button.x-button-active,.x-toolbar .x-button.x-button-active:after{background-color:#c4c4c4;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ababab), color-stop(10%, #b8b8b8), color-stop(65%, #c4c4c4), color-stop(100%, #c6c6c6));background-image:-webkit-linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6);background-image:linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6)}.x-button .x-button-icon{width:2.1em;height:2.1em;background-repeat:no-repeat;background-position:center;display:block}.x-button .x-button-icon.x-icon-mask{width:1.3em;height:1.3em;-webkit-mask-size:1.3em}.x-button.x-item-disabled .x-button-label,.x-button.x-item-disabled .x-hasbadge .x-badge,.x-hasbadge .x-button.x-item-disabled .x-badge,.x-button.x-item-disabled .x-button-icon{opacity:.5}.x-button-round,.x-button.x-button-action-round,.x-button.x-button-confirm-round,.x-button.x-button-decline-round{-webkit-border-radius:0.9em;border-radius:0.9em;padding:0.1em 0.9em}.x-iconalign-left,.x-icon-align-right{-webkit-box-orient:horizontal;box-orient:horizontal}.x-iconalign-top,.x-iconalign-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-iconalign-bottom,.x-iconalign-right{-webkit-box-direction:reverse;box-direction:reverse}.x-iconalign-center{-webkit-box-pack:center;box-pack:center}.x-iconalign-left .x-button-label,.x-iconalign-left .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-left .x-badge{margin-left:0.3em}.x-iconalign-right .x-button-label,.x-iconalign-right .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-right .x-badge{margin-right:0.3em}.x-iconalign-top .x-button-label,.x-iconalign-top .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-top .x-badge{margin-top:0.3em}.x-iconalign-bottom .x-button-label,.x-iconalign-bottom .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-bottom .x-badge{margin-bottom:0.3em}.x-button-label,.x-hasbadge .x-badge{-webkit-box-flex:1;box-flex:1;-webkit-box-align:center;box-align:center;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-weight:bold;line-height:1.2em;display:block;overflow:hidden}.x-toolbar .x-button{margin:0 .2em;padding:.3em .6em}.x-toolbar .x-button .x-button-label,.x-toolbar .x-button .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button .x-badge{font-size:.7em}.x-button-small,.x-button.x-button-action-small,.x-button.x-button-confirm-small,.x-button.x-button-decline-small,.x-toolbar .x-button-small,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-decline-small{-webkit-border-radius:0.3em;border-radius:0.3em;padding:.2em .4em;min-height:0}.x-button-small .x-button-label,.x-button.x-button-action-small .x-button-label,.x-button.x-button-confirm-small .x-button-label,.x-button.x-button-decline-small .x-button-label,.x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-button-small .x-badge,.x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-action-small .x-badge,.x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-confirm-small .x-badge,.x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-decline-small .x-badge,.x-toolbar .x-button-small .x-button-label,.x-toolbar .x-button.x-button-action-small .x-button-label,.x-toolbar .x-button.x-button-confirm-small .x-button-label,.x-toolbar .x-button.x-button-decline-small .x-button-label,.x-toolbar .x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button-small .x-badge,.x-toolbar .x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-action-small .x-badge,.x-toolbar .x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-confirm-small .x-badge,.x-toolbar .x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-decline-small .x-badge{font-size:.6em}.x-button-small .x-button-icon,.x-button.x-button-action-small .x-button-icon,.x-button.x-button-confirm-small .x-button-icon,.x-button.x-button-decline-small .x-button-icon,.x-toolbar .x-button-small .x-button-icon,.x-toolbar .x-button.x-button-action-small .x-button-icon,.x-toolbar .x-button.x-button-confirm-small .x-button-icon,.x-toolbar .x-button.x-button-decline-small .x-button-icon{width:.75em;height:.75em}.x-button-forward,.x-button-back{position:relative;overflow:visible;height:1.8em;z-index:1}.x-button-forward:before,.x-button-forward:after,.x-button-back:before,.x-button-back:after{content:"";position:absolute;width:0.773em;height:1.8em;top:-0.1em;left:auto;z-index:2;-webkit-mask:0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAiNJREFUeNrEWb9LQlEUvj5BcHoQvMnVKXD1D3CLwqBJbHJsazQaWoSCxgbHJiMIAiNok6AhCDdXVycnJ8EQOgeOYaG+d39998KH+HyP753zzjnfd325xfdSgVeV8B6BScuEV0IRSbxHeCMk/AVFXCA8ScQKSXxPqK0fQBBfE5r/D+Y8VzUT9jb94DPimqRYIYkrhGcpKhhxIqTxrpNcExdlQJTTTnRJnCc8ykhUSOIOoZ71ZFfEZ4S2zgUu+rguxZRHEnPbfKRVsOtUl0RtYpOLTYljIS2Z3nVk2DY9SbNCEt8RDm0rUpe4La1jvXSqmtum72raZI24KuNQIYl/nSGSOJb0Jq61M0pxhjwK9304hUjHGSKILzc5Q5drUzttdYY+I97pDH1FzG0zNFUb04gTG4kzJS5kdYauiZtZnaFr4ooKsCIVaDHxKAQxt1NBnGIVHfGCcEQYh3jGU8KBfMKLiyM+lgzAq/qT0ArVTg+Ei1B9fEPoovV4fcfQd2HedScX39GprwGTNjJn0maTELN6IuSzECLB6T5x2eM66jQgnIeSxa60GnS3uL56tr7b1Ai0JPVwYi6yho2U2lgfKym19VxjMRHzEGbvS9K+RBPzetGVUpf29lZHSl2/DMnLvwh1ZMQrKW3Ic4fvJOZS6ZMQW5hpmpT63DvtlFLfm7bBNruM2C2yXb7y3U6ZpRS5P/4jpUjihRTbCJ3q1eL3GMMfAQYAJmB6SBO619IAAAAASUVORK5CYII=') no-repeat;-webkit-mask-size:0.773em 1.8em;overflow:hidden}.x-button-back,.x-toolbar .x-button-back{margin-left:0.828em;padding-left:.4em}.x-button-back:before,.x-toolbar .x-button-back:before{left:-0.693em}.x-button-back:after,.x-toolbar .x-button-back:after{left:-0.628em}.x-button-forward,.x-toolbar .x-button-forward{margin-right:0.828em;padding-right:.4em}.x-button-forward:before,.x-button-forward:after,.x-toolbar .x-button-forward:before,.x-toolbar .x-button-forward:after{-webkit-mask:-0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXlJREFUaN7lmTFqAlEQhh8EhFSCYJXW1law9QAewMrWAwQWAmmtbPcGHiCQ1gPYCla2QsDKSsgmQecvFqImu2/fzry/2OLb9mt23vwz47Kvn5MwEFxM8DkLB6HHEIOd0GGIwUpoMcRgyRKDOUsMJizxpzBiiMFR6DPEeZl1GWKwFh4ZYvAmPDDEqmVWVQxmLPG3MGaIVcosVAz2whNDDDZCmyEG7yFlpiEGKUsMEpb4XKXMtMXeiVVb7J1YLcRgW1ZmVuLSxGopLkys1mLwwhL/mVhjie8Sayxx3kp7DPFVYo0tzhNriyEGU5Z40TjxtDE/F6WcDowHBE/msDFNImG0xZQRBAonDCvxhhH2vKZIZ9Ds+7EDfaWFnKZ4xhja5owxdcnYCAQv1p1Gi4sprn08cZbDt6ZYZasXIn5mLFHTjLCvVt1V+4rVt/M+4r3FPaJMbHaBKRKb3pyKxKZXtv/Er4yjZpRL6q042u34tzh4xV9H/FHnqBHKBQeEd6aqqwD6AAAAAElFTkSuQmCC') no-repeat}.x-button-forward:before,.x-toolbar .x-button-forward:before{right:-0.693em}.x-button-forward:after,.x-toolbar .x-button-forward:after{right:-0.628em}.x-button.x-button-plain,.x-toolbar .x-button.x-button-plain{background:none;border:0 none;-webkit-border-radius:none;border-radius:none;min-height:0;text-shadow:none;line-height:auto;height:auto;padding:0.5em}.x-button.x-button-plain > *,.x-toolbar .x-button.x-button-plain > *{overflow:visible}.x-button.x-button-plain .x-button-icon,.x-toolbar .x-button.x-button-plain .x-button-icon{-webkit-mask-size:1.4em;width:1.4em;height:1.4em}.x-button.x-button-plain.x-button-pressing,.x-button.x-button-plain.x-button-pressed,.x-toolbar .x-button.x-button-plain.x-button-pressing,.x-toolbar .x-button.x-button-plain.x-button-pressed{background:none;background-image:-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 24, color-stop(0%, rgba(182,225,255,0.7)), color-stop(100%, rgba(182,225,255,0)));background-image:-webkit-radial-gradient(rgba(182,225,255,0.7),rgba(182,225,255,0) 24px);background-image:radial-gradient(rgba(182,225,255,0.7),rgba(182,225,255,0) 24px)}.x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask{background-color:#fff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e6e6e6), color-stop(10%, #f2f2f2), color-stop(65%, #ffffff), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff);background-image:linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff)}.x-segmentedbutton .x-button{margin:0;-webkit-border-radius:0;border-radius:0}.x-segmentedbutton .x-button.x-first{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-segmentedbutton .x-button.x-last{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-segmentedbutton .x-button:not(:first-child){border-left:0}.x-hasbadge{overflow:visible}.x-hasbadge .x-badge{-webkit-background-clip:padding;background-clip:padding-box;-webkit-border-radius:0.2em;border-radius:0.2em;padding:.1em .3em;z-index:2;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-shadow:rgba(0, 0, 0, 0.5) 0 0.1em 0.1em;box-shadow:rgba(0, 0, 0, 0.5) 0 0.1em 0.1em;overflow:hidden;color:#ffcccc;border:1px solid #990000;position:absolute;width:auto;min-width:2em;line-height:1.2em;font-size:.6em;right:0px;top:-0.2em;max-width:95%;background-color:#cc0000;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff6666), color-stop(2%, #f00000), color-stop(100%, #a80000));background-image:-webkit-linear-gradient(#ff6666,#f00000 2%,#a80000);background-image:linear-gradient(#ff6666,#f00000 2%,#a80000);display:inline-block}.x-tab .x-button-icon.action,.x-button .x-button-icon.x-icon-mask.action{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFI0lEQVRoBe2YW4hVVRjHZ0yzq6lFEaMlE0PShYRAJIl6iEqKHnqI6WJB0IvdICkfEk0aIyo0KFCph8giCitI7CkoohQL7SoZDaQmXSgKo4uWNf1+zt7DOXvOOXuvvc85bc+cD36ssy/r+77/Xmt9e+3TOzIy0jORbNJEEqvWruBOH/HuCHdHuMOeQOmmdO+ozaA5oxXPunSC2Re4MbgCNiB6vvqbKbx0giNxp9BeBU/BIJqnRecLN2UVrLDj4GIYgscRfSltYSuzYMUdA/0wCI8ieglM5XduK7vgWJhTegGshucRfQHkyj1XpziLNrfmOh2ug1dhMaJn0gbZZDpNpsexQb2y3azfKXCAwns4W5dMd7m2B2ANLCT/x/A/nKknN5mUhWFp1g4Z7vM14jrbBZvgEwi1tAdkDEf3ZrgI0S/RrkP4IdqGpuA+cJo0yw7iyNfJmzAcMrokfjp93HC4XrPYCdzkgPXDPPqvJN7eRh0VrBWqfKMuev6k3Qzr4SP4HWqOFIkZ73iYA/NhLpwPZ4LLS+FZzUp+GtwAA/heS/sGwv+irWnXc9bdTRF20/8eOBWmEKwnCectOrPhSlgF2+Bb+Bl+AxP8B/6FvLn8Td8fYQXMSubgsVZU8Cv4mAeNhC7k+jLYCopzrRURlvZA9P8WLIJJlcI5zi1Ypw+Dr4oqp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PMer+Q9LNCcV91c+jgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.add,.x-button .x-button-icon.x-icon-mask.add{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAABqUlEQVRoBe2awWnDUBBE843B4NxcQSAFOC4lJeTkoxtJDykgvRhcgCFNJCFgIs+ChEHSJX93YT6ZD4ssmR3NztNFH5Wu6+6iVynlEZpbp+4J3s5OjWm7DRxZuMMCdUB9oyzNmrJe01hEejMtM5exIh6bCI3JbFkDT27EckEDs5DI8iHCWcmy6IowC4ksHyKclSyLrgizkMjyIcJZybLoijALiSwfIpyVLItuOGFso/xiuEvAgJdeK0DqJrHEhtsTTh9ul9y/ChR2KE+Y1ruDt2ccI7d6PszcK+oFFblWELt3Cn6i/8epMW5/W+LKGrUZ/0NwboF5QxuPsfY8dmOxJs41cBOYHCZF2BFeE60i3AQmh0kRdoTXRKsIN4HJYVKEHeE10frvCNvr4RH1HojH3rGHr3hqA7VdkxPKvuKJ3AA4hn7BM3xxA5N71Fdv1gz/tax3P+hFHmsJwM/8wraMadqOh5GuXda76rVqNWb7wgeevQvRRQ1MBCPFiginxEokKsJEMFKsiHBKrESiIkwEI8WKCKfESiQqwkQwUqyIcEqsRKIiTAQjxcoVrP83/9czD9EAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_down,.x-button .x-button-icon.x-icon-mask.arrow_down{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2J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w30R+fz3LFthEs1TelZ0KlBuAIcgmRgHS5gqlm2RsNTmqbvrUlZycLT4BhUiliWfEwEbII+UeuwT4nzqNZq2Gm1gTu/ZaUIj4NTEBW7tTTY1zUwKH4vbaive6BBw2kpAa6DkA1CeBicgZhVx8McUg5WWNi+83CWiXFfE9ZeAGQR6ukBqJKyu/Gzw7TcXEiS9UuYbiWWeU8ckXYqMT2lozyFW6SeOU0K1/FhPS75RsHUlKbj3KV0WRPC1Nd5sCuxr6anNPV12zFwk2jLCCdtk81XeAIsahL+BVOgH3xrEPayA5rAixZhyj2oB2ktwpR30A5WtQh7vR4DQ+BHg7CXLdAMXrUIU26411dahClvoBVsaBF2uMsjYFRCrwt5a7kOOnjUVQg7vE43cr9VCDu8I6Nep7QIO7z3HgCTvHYXvbCXJe71hxZhyjmv1w9ahCnP/DDb1yLs9boXzGgR9rIAusCnFmHKCff6UYsw5Ymlj7QIU75AN5gz9YVuLu8eB/S+dA+v1+l83pe2Sfg/BRe2OeGfPELhUDgUtip/AgwAw4tbozZtKFwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_right,.x-button .x-button-icon.x-icon-mask.arrow_right{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi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o7h9YxTtfjwXcHoOVBjwJQYNPcmKlLk9EkODGP7FSO0TwOvU+IVjxZAQD1iPZK4CVGiGAZ6lOCVjFE7LhO/i0JKzUK3KImQY3S8ZKHZ4cr8A16sMQWPHkeANepF4MYqWmD2A9arcWsIonqOYafGYJK73yRDkB71nGSnd5r4jKBG9Sn47AunOb4CWq7xAr7dsA61G69wCreMK2TIMvPMFKfZ44I+ADz7DSQ9YhVgS87fiQGtdlmeBlvkNWnndYBljfGT8FgJVDbKco+CoQrBp6mrEyKfgoMOyvpxlZ4CT9vcXj0shWNe8nE8vCfzwABhhggAEGGGCATa1vAQYAZekAmr8OukgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.compose,.x-button .x-button-icon.x-icon-mask.compose{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAF/0lEQVRoBe2aW4hVVRjH54xa6nSzm92sHiZNorJowMpxrDEoyECiUUpztIkeeumpoCB6rAwi6FHwIXqKXkqiEE0no0QNLWwyspmGsruWlVqp0+9/2t9hz3Lty+mcfTnpB/9Za397Xf7//a219lr7TGVsbKztZLL2k0mstJ4S/H+P+ESfwEqlMhn/VNAJpoOjoGibAIFfwDbWnT/DZOCrex34D4b9vvw4wVScRKEu0AcWgQtBmYb9DvgsA6OganCWhgFwL/lHEf35v3ci/mqVFrAO8AT4FugJHge6URZsg0s3aDfOAe+H8f0INAo3gavD9928iT2bgqvBYVAWgWEeG+E1G0wwAeQ18hTZ/cDKSvROECnaBD9Iod9DFa2BMqSDEgAqjtiH8H3v4XwM32ZwlZUPp/jbLgHDoAziXA7r4aXIhsVqgZLYA8Atb9eK9BbQGRarvOwxEDdfdU9D/UiOUH9bwTixAWGJ/QmYuKhUojU6xomu4HgL3AV89ipO3ZdYlc3LJOJTsAeR1bAEr56V+J4H00Aa0/D+BNxPM0NW4Wcyvqe0G7+Gu5b9IhAexnrYq8A+4OMa55PoDaA6p0kjG1jHvVqnetBFQB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QuboAPYldtieW+A8F8p6X9VDMRHA9BPIuGyd4LG8yKfuL46WdW6xJcFQDU3i96LRTGoOPBGmnligsirQWre/AxZ4C1+DrpY/3PfeKcl1Gxz3AJ1inrsR3uiquBf3AZ9/g1FFMjZXBZkBCW1Sf7WSx1NEx0bSv1QZBQ7tVoYA8jeDEf7yhXNuZ4B2gSq0qeBjuM1MJViGsB6hSK4rW598BMO6/bKPE14YAFXQ2HQWtMrwVnINAYmufjqKEmr8mOIj0bVTWSUYb/qQPbBoaRUABOQz03znLwUQTkyat/hZDpZrxGjqLi4VgMbgJ6L1XFlNUPwYKymvgACL10FPbCYJT12zRgnFbyxaVFE/7lOD459P6d/8Bhs9x6sTqrJgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.delete,.x-button .x-button-icon.x-icon-mask.delete{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGcElEQVRoBdWbzYscRRjGexY1EPK9u9mVoJH4cVBPCYR8mB0IbkISyB/gOYIeFSUQQaIX8eBBDKuCsBFFxJuieFCMEb9RiZrcxKOgB7+i0RjN+vwm9Q41Nd0z1d3Vk9mGh6rufut93l93dc9katNaWlrKymytVmuD4mek7zX2YpmxqWJVwwrl2iL9qBp+LpN3okywjNYo/qh0Sjqi/ZVlxqeIdZ5HXA1HXU3xqbnDMVJGYJ+UzktMi1+le6VrY8aniMHLeeJNDdRCTWti88fCTirpSemChJHpT/Uflq6LNawah4fzwtP8aanppDQZk3sosBJNS4tSCGumf+jcMWlFjGGVGHI7D7zM12+pjRqnh+UfCKwE66SXpL8k3yDsc/4+KfmdJqfLHVMDta4bBF0IrIFrpaeloqsaQvM83S8lgyaXy2nvjdAz3KdWal5bBJ0LrAGz0rPS31KYdNA+8Y9Jtac3OVyuKjVQ+2wedB+wAqekE9Iv0iC4onNMvUelytCMdTmGTeOiGqgdhqkQugdYAdzZBakqrBXAXXlCWhkaDttnjBtb9s6at7UwwNJzp7vA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v/rQYZtpyTiPELTNmHDcb5zltanTnplHRRSmlErjek60PIcJ8YF5vaHybY5vDsfizpwB4p9TLp68p5SwhXtE+sxJhU0JeUC6Y95tkF7tBn2SGd/FxK8VcAHyjPzVLP+qwZ57XEujGMrQsNAyyHfK8eYAfNM82bsw40KwJ3Sn1/teOb5/UZ48aSoyo0tcMwH3r0ATvogwrmzwWq/Pz6nsbdLpWGteIY63KQqyw0NVP7Qcvnt7nADpq1YZYzeA5iTV9T7I1S9DT2i/H75HC5yBnrT63UXLhGXAjsoNsafFaKudOvKG6zVBvWwMnlcpJ7GDQ1Umvbxue1A4EZoO2wSzToc/ptxdwgJYO1YsnpcuNRBE1twB62cUXtUGAHzTN9TsqDflPHb5OSw1rR5HYeeIXQ1ERtuc+s5bA2CthB80yHn9P8pDIrNQbbLfQKNF54GjTPLDUVPrM23tpoYAe9S8k/kjB6VdoiNQ7bLfYKNJ54UwO17LLzMW2nWA2K3vQ/we5S8N0SL5LvZHI5enCCQPnzkcU3snukd+X/YZm0/wPdHqnTTpY+CgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.organize,.x-button .x-button-icon.x-icon-mask.organize{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEdUlEQVRoBe2aS2xMURjHjbbqUaLoI7RChQUiGo9YaEqkoolIkCASSki68dixsLIVYmHbkJA03UgkFRI2QgRBKl4RgtJFK0jUI+o5fv/p68ztmUlHzpzO9PZLfjP3fOfcO9//fOeee+69E4lGo6PCZKPDJFZaQyc4N1mGI5FIMfUVkAfZMPaVwE54yqn6i+8BllQwravgAEyEv5DppsQ8gYPw3hqsJi0bNJ4El0GZzSa6iHcbjLbpsp7DDGX5V8ByyDbLJ+CdUGQLPNGQnkzj3TDFspN68BNkwhDPIY5poG/T1lBYR+LOkuW4uSeR4KXssN48grF9h20NdeukYLRL96Y6vAD2wCwwbQyFvXARPpoVA85fKnXiN4HtvP2Gf0tPG3XW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OCLZ0yrByhS7DmrRaoQE0Kw5707JOf/UvH/ZKewTG/kscFrHSGbpzOHSC/wHSRhVOrpN3ggAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.refresh,.x-button .x-button-icon.x-icon-mask.refresh{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAG1ElEQVRoBc2aa6hVRRiGO17yrmloWpqhllH2wyKSEIsIo8QorLSbqVRgJd3DyFAQIyIiKQz61cUgpB+B0EWii4VkGFRUJpWKphZaaVZeutjz6FmwOnuvNbPWXvvs88HD2nvNzDfzrpn55tvrnLYjR44c1wpra2vrRr8jYC9j+KOzxmCnrTL7ng2LEN+rswbRSsH/ItL+Fwqij+8M0a0UrD5Fa0vg2c4Q3WrBik3sVj480WzRXUlwG4Lnw9OI7p08haqvXUmw2tzH8+AhRPf1RtXW1QSrz4i9CJYjepA3qrSuKFh9PeEWcE9XOtMtE0yyYYROojQfa0zRc8GZ7l9TWvJGj5LtCjdj0AYll6uD90HLQMizZKZ70vzOKjKypgpmkONQMxpGwWlwAvg9STLG8jlkip4FO/H3GKJ/DzXIK2/DQV554TIGdQaNpsNkmAAjoYpj5i/8rIIFjPlXruVMwY1Czy7X8+Al+B4OgU+yag7i0wjereyYqxDrDD4Ku6FqgfX87aGfR6BPGdENCabTqfAh/A31Btesez/T32LoXVR0KcF0NByeBPdSs0SF/Nr33VBIdOEoTVDyKFkCN0OlSQH+Ys2HsReMF66ueCuyJPDqzD4HvqEIzUCzyk1WtsAcKBy8opc0zgfBU+A52CwxIb+K3Qw3FJmodN0owXTgseNxsA9Cg2pm+S76vyktoOjn2D3sfjVAhFJBqmSax8km+BZ2gBnUlXAmhMyH+B3cj8DVocq55aEnROOJsB7MdIrOnnt9DVwD48G3lAPAB21evRRCPl3G22FaaKwx5blLmk4c2DNQdN+aaa2DKdAvayCULYQ8wYnYhpZxuv+QYGf3a/gnMLD0oH+h7mIYnO6o42fK/bX0MKTb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Cp2IAyFYVDGXE1fwAwmaEvQQWgJtM+ySYWC90PyVLvC1aPHQHl5jI6jWqIrHpuFl3F+oAuJ/pGxzIXoP4znRumODwPHI+BFcFm2eoZ907IEBnQcZ973QoJ1hLnnXoBWiXYZ74D50CtPXL2ywoLbRRtwloKBqDNnWrEGvOugVEZXSnC76O506o8GX8QbKZst3KPnTTi33szF3istOOmAAZgVrYBm/SeeD/MruAf6Jv2WvUadw3QUNM5q30ZcCrNhDMT8lKNapil0LayCtxG4JbNmgYLKBNsnortxccbPh+lgBuUvnlhzW3iumpaaofkzbzvXyqxSwelRIb4f3w1u58AlMA6GwNkwGEwhN4PZl0vWWLABDEr7EVr3BzxlDdl/zhnCj3tOo0oAAAAASUVORK5CYII=')}.x-tab .x-button-icon.reply,.x-button .x-button-icon.x-icon-mask.reply{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAES0lEQVRoBe2ZSWgUQRSGM24YTdSo4AYRTcxBEZJDJCoigrtGg6CIgihqogfRgEERguhB40UP6kHw4kEET4J4E9wPAdeg4ALigjuKcSMuMX7/mAmdSU/SXdM9PTPpBx/T3al67/31urq6K5G2trac3mR9epNYaQ0FZ3vFwwqHFc6yEQhv6SwraBc5YYW7DEmWXUhZhSORSC7UwKIgxzAlghE5CZFHoAEKgxTcz8/gCI3gfzHsh6l+xnLq2zfBaC0miXpYDvmgu+kXBGqeC0aohK2D7TAF+kPamKeCETseZdugGgZDSp4RxHFsnghGqKo4H/aB5uoASEtLWjBiZ6KsFlaAHlJpbUkJRmwl6rTcFKW1SktyRoIROhofdbARhlr8OTkMdBPNlWCE6iG0AA5AqRN1Nm1cxbTpn9Qlx8ERO4pIG0Br6yDDqH3pV4kvPdRewCd4C+/ZPdWx7xZxsk1LgqvIZDeUeZzRT/xJ8Dt4BQ/gGjSSVzO/3psEJ4JoY+A4fATNvVTwhjh34RSshMGJ8jO5biuWIJqrc6AJ/kIqhNrF+EFs3fqHYRoMMxFp7dNFME5Hwi5QMLskgrqmgb8M+hgZYRXh5riTYBxpFM9CUKKcxlWOSyHPjVi1jQqmYy7shQ/gNGjQ7f6Q6yWY7UY07XNK4CK0QtAiTOK/J29tLOQ7EU67nIGgtfU1mARMhz6a3zegtCfRHXOYxhXtndJBgGkOT9FQ1Z3oDsFqhBXAFngJpkGD7veN3NclEt1JcKwRHaaD3niCTt40vh6+q2N6rL+2gtUA03p8FL6AaeAg++ntsNwqNqor/kL8OZ2WgF71vEpeq8FvC36uDveJM8qqyenHwzg67oE1MAxMTeLOQyNod0SDqO2hCaDVIma6u3R9OAxq/9WxW9PT+wRsQ7RiE7Gbj4f4v9F8Fujxb1ptfR2tj/cbf04bfbbqZWgsFEM5LITNcBLc3HF6iM2IxXAlWJ0wJXEQfoFb4RJcEwtu8kv/PCiEGdAAevFQJbvL5Rh/j351uRbcLloVmA83ewgUn0TSgq2DRGzloVt9E9yDFoiPqfOvUBHN3erA7TFOtG6fBqdfVp4KtuZLDqr8DrgDdqIPcb2/UYXjAmmu1cLDBIGswX0THMuJHIrgDGglsMZu4nxI0oItgcbjUHP7MyRaanwXrHywvlAFj8E6v+dqZ8MTI9BzHO2DtaC9KY1wIEYurXCO4JrbjyA6CvzO80wwznS3tMAFDpfBKdArnkY4ECOXqwTWUqZvA1mJp4L/+4wKf8ZxDeyE26AlLBBD9HUC14GWr8mezWEc2/oiiNZM/TumGbRLkdQ6nChOT9eJWw3ffakwjjuMRF5wUg9b4QnE5hOHKTVNsSuO3qW9SosN/Yn4KmAQbnnl040f4pelVLCb5Pxq6/st7Vfipn5DwaYjlyn9wgpnSqVM8wwrbDpymdIvrHCmVMo0z15X4X9rh8wHLEjawQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.search,.x-button .x-button-icon.x-icon-mask.search{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bq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JCaHVWyukAAAAASUVORK5CYII=')}.x-tab .x-button-icon.settings,.x-button .x-button-icon.x-icon-mask.settings{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIkklEQVRoBdWZd6yeUxjAe2lLUbVKrFaLUhUVo1pbQtqqESOECGLGH2IkCP8YQewYtUoTKmkJ/2hVEDFixN5FadXWBjFaq0b9fl/vuc5973nf9xtvez9P8rtnPeec5zn7/W7HsmXL+vzfpKOjYxVs3hR2hlXhT/gcX94iLBYd/r+BR2vB+eBsyVJ4FPqX+eJItbUwm8rmMEZDTRAMhG1Nd4p+bABbmUZlAGwLI0D9Lmlrh7HV5boHOHuPkL6LcCisDztCEJ1aBxwYwyvgMbgfToD/pGwJ9FY5FjoZ42AuhKX7N/HX4Er4Psq33PQ0eBz+APP+gbfhAOjQl7bdvxjYH86F4Gwc/pWT74DEesYXwWWwtg6385L25J0FH0JWXOopyfrjDC+AmTj7sxWyCua1hWCgs6Ox58GPTRr1FfVmwBuhfts6rIH47NJ9Eu6BWBwM9+xU8HqaDA5OLL+ReAmm044zXZPlGzmk2iDklHUSvF4mwU4wHEbCuqDo7OdwKXgK/w4DwEfIdVC7vgjVcxnPg/fhHZjVdocWRmn8faDBKRaTf4srPoa81eFocABS9cy7ra2XNAam5BcyvZqy4vL/Er7OFsTpdnW4yK5+OBCWd+yLjw9neY04Mxsvajiru7LS3qXut2/Aq8mZ6zp0iPuOnsBeH0wYi1thL8jmW99l7ux/1G0fxHui2TiNOojdaLQt6vcF38tbwyHg0zLel57AD8Io2Ay2h+sh3r++tl6AI2AbWBv62XAlwogPoyFPVhvuJpRpyCwc/7hbQU4CPWdlMfWWEFrX2YvFpXskTIRFsD4Mgqy4Qr6gPZ+ny6XR0c/Tp7Up4GdaPBNx/KG8unn5tOV+vLOgzbj9VNwD7gHYMPRRyR5mJpyBIVDU3lD0/ISrS9B19U2A4+uqkFZywMbCYbTnqig00PJ6xYNCPCnz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orDrdTV0VbrNzVYrXS6NT3mXVdlxng7bF+mlCi3Xkuiw57QzRw8Xl9DuGKaGbSNqbsrNCpuIX+YaFq86KfDuuA97AnorPl2Lju51TkTXoe6Dy8GyFm6CLwdysSJ0EH5CfwFZEqTNwNVO5+CtcjymRpKfDsY1UlI+6NZaiZ19CyYhhHey6WCv0egdDf4a2RKfiDzPVgI78OczvAD+mjphKYdjtmSRwMqPh1/VTWHz8g/AZK/Wcfto7MfzIO8thy0B+M6VccLHaZzD6aXQEPyjDTfc8CtcQD0eAWRtwdMBWevqB1n0FkdVbWjob2i7+GBdHwpnAZrQj3yPUoLQKMXwXowEhy4wVCPOLjT4AKMtL1qJXieDellEvgzS9GMrKgyz4ZTszZVkU4uaTobBrPB19CKcqqoXZf2fBhdhZNxGz0cphOvm5uhbL8VGVxFmYP9BAyMDW41nrpqDqGT8ZB3bVC0UsQfJfYGr73KJOXwLrS+QQM9NHo3NqLvw2hcA7aUqqYcdu/6ovG0LJM5KNwBX4LLuEz8Geh28OebMrE9T/p7yhQbKk/tCRrw55eXwaddaj/6a8VMGAP+93AyeBendOO85zr1hxNOA5+McXmIuwr8ifaklH2t5PU4tEJjdDYWfCdnHx1zyTsG1lAX6YAzIc/44ITh/epHffhQ8feqWEdnXWGTgl6VYa7Dnc7sQ8fvgiems3ov+M7u9poifSh4d8aGp+JXZ42nzibgP7eXgM5+CuOzelWlCx3udNqZvgGOg+QVQb467mMNTjlqnl87J6cMJ9+zZH+4BfZN6VSVV+pwPR1hpA+VNyFvz+vwJ7B3Pe2tSJ3UKY1dDctX1PBzTsfyxGeq26NXpRKHmZGleOEV4pLOk4Xo+XrrVfFir0r8bh4EG0E8057i3r8eTL0u/wJCZSL2DoplLgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.star,.x-button .x-button-icon.x-icon-mask.star{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz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0gdfAtSjfTn+JoWQjCv2+57a4M1QaQSvZvrMsIs7RJejGcdUlLJUhzpZsYsZsJcCen6ZwCE3IaYA2021OfUdU3fJltmwni7Fvh+KDMF16KR3ux0lWuSdgjPxeNdJq/tNdKNqJaSSUyEmVK6JNPomtqbIh3eSKNsEmvAarfJ5LEzjbbR59MtpqyEb8eZjpndkhtxvNri3Er4YZxpx+yW6Jdhi8V5MOHm+n0QZ9afo0u0fQO8A5S3iPaQ1cTSG9w4f/SqesZBH/gRWI6T+gyyxfkgvw2cMdrS+/lTzpZvGnyWxsnTwHLRd4R2a/OBqQyoztKBe/P2qp6DCBOUptKHhuA+pU1fq2Co0/F0L9CVaghxXTbWW9ktKg8lrFfCrwODeh/9wgu1bEDo6OT2Fvgb+JLWq+nQEsnaa5UPJbwKBxc8A9KXPG1O3u+u6E4F24GvD3XMDjCxFcF8uTdhjGpHfwn49L42lCeAdyDZwGi3HpwAPr6+Q29htn1ZPoSwfuz3ewShXVcBNz62lzkvq6O9DjZHgQ9p72kdQljvob9VBPAN9Q+UEQmpw5b+Sf8e0FotI/4a9ZN8bIcQXlnh9AD1y3ychuhgU0tpJyhb14epn+ljN+Sk9S9G1ct50d8SdgF9x9EO3lHB5hXwPEYfA8dbGD9LuWZBtfj0inSQWUDTKzu1dAB5Dkz2tdOOHn70LvwVyMag/FYwzse295Rukq5j+G1wEOib66PAy5FPMD46+NPmqTV7CpwGGvkJPm2l8z8GWDNDloqpGQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.trash,.x-button .x-button-icon.x-icon-mask.trash{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFBElEQVRoBe2aS4gdRRRA8+L/m0QIJkYNLlQUNOAvigpRcCEIcSsiCLoLLoILcaM7QVBX4koRshDxt9CFKCoiuvGDCP5QkxCiJhInRo2Ovzie80gPNWX1dL3uesM09IUz3V1169a9daur+031aG5ubkUpGY1GK7G1Dq4Cz9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yDLh9NBkth4AzBqnXKkOGe52+DOeHDGcMUq9Vhgz3On0Zzg8ZzhikXqsMGe51+jKcHzKcMUi9Vhky3Ov0ZTg/ZDhjkHqtMmS41+nLcH7IcMYg9VplOWY4/Md88cEtHbDOVg5Xx9jpsM9Yx52JeAcw1ontTXRdcm9pFz3vBveHdNJN6YPVRhrnivtMlruZ5g7DFxBuXLut8j7sA/d43Yr5CIpJsYAJ7DN2/27Bsw1gwAb3I8wLOp+g4w6+nw/6HddOyszqWDg/Qv2bXFwH4+1SyhyUYtI1YLc85wXn/ORAagWdPVRKUqh3AJwtdTLeWq2rbCoP76cm3bjeLG6ELjZim03XJujyJqXF6rtmeDvGNzMN/ajEAZi2rKOD67t00jVgN7+3dnFgqdsu5XRc6tiS/eUGvBTTNengBIVZPuYG7LcYPjdluYk++bTw++pGyQ34bSy9B35Vs5zEYGfgJfg+x7H/ADoy2VfnrtXoAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.maps,.x-button .x-button-icon.x-icon-mask.maps{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADl0lEQVRoBe2b24tNURzHjfutXEPycDAltwhJbuMSJUqSB/HiES/+AK9ePc6T8uCFkImQW5KGkdwSxYyMGkZu45bbDOPzyZyTrJnjnDkGrVm/+szas2bv397f33ftPS+/Vdba2toj5igj0NcfRkG/3qWIJdcIrs/AO6gDq7cKPkOjUNAmxr8ePJsix8NUWAvLoapowSQawIUzYCZUwAqohF3QAjtgGTyCy5x/nfEu1MNDCmAxuiS4Vy8ST4DZMB9WwiTIRUGC26q1gKtWwyyYBsPB5aLIL5CNTxzotDeWTeA5DUKuO4xXoQbxHpcUbSIzJFkDi0EzdLYnBNGuYJJ4ch+YAhvB5TAORsKvib4x97vwPpk2FjJuhibu85zxAlyCangBLRQib06u68t5vk4uVYVqgO+oqy9v5ASTRLd0LQNLYB24bAfBnw5zikX0HtuhGW5ANY9ylvEBvIY3FOArcz7rWHCpboBFMAxyGjguKIZy1jzYCqfAD5BLslB8J3dCP/AdOgo+fKHXd3Sebh+EctCMieBK6Oj8QuYrXZ7roQr88PiSD4b/IVyyfhB9jQy/uppTUijYhANLytJ1F/sxzL7POpg97vQdFfwVTNYtQsHdKpLg2O1ODieHI6tAWtKRGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbCI5HJmhgZzkcFCSyCaSw5EZGshJDgcliWwiORyZoYGc5HBQksgmksORGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbKLbOVx0r3E7httIbttwNvzddt//JWxIfQynYX8pgu2TbgBbjw9Ds53sNHJv49gOehu5bUe2DfjXojDVpWG/9iu4CEegBp7xfO+LFfyGC5+AiQ7BFXj/c8s+xw+Z24PwvYwKnQxLoQLccGEB7Hsu9t5ckjcU2QjuozgA5+Apz9PCmItCbvqWs2vhJpwBl8ZrEuVtOebPtiWLbf2ymyL0ZVT8XJgDbgHIgFsPOhPmr4d7oAnHue9txg6jI8EfueIaHIOrcAuafieSc/IG19vw7TYD6UEBbE4vhwxMB7cizIYhYPT6MeR+WjBFPoCToEgF1hb6bD8LNpHLwT0L56EOGkhUchc6edoNcruvQWoQ7/6GMTAa3E2zACxGNjRhH9wHV4zP9oGxqCjj7C0wA06Ay/YliRT/T4MCuGnEfQ4feJ5mfvdfaG+OXSWdju+VpAoIK3D9tAAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.locate,.x-button .x-button-icon.x-icon-mask.locate{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIDklEQVRoBe2aaaxeQxiA3eqCltpLkWotLUUtsUuJrbUFtSSaiIjljz8kQhOJiAQRQYREYvmFSPrDFiSExFpL49JSS6u0Re1bLUVRz3N7ph1z53zfud8956sf3uS5s7/zvjNzZuac7/asXr16g25IT0/PKPrZAfaFXWAMvAEL4GNYgS1/EjYqPU07jKNb4sGZcBoc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ewbeOuCbQ4FdahLnUF/u9CLzfMwLuhMw5ZfPNgNp9H4NtgdXOoDkRVUfh/cKX3mloM76u0QdOmA1793wSW7G0yEKTAcBiIOnndzLxvev/OSjkCappVL6hlw9NqN8PoqX4Vt3s/Hp/an6ewz3K/SmhvNDSj86T/otDZp25jU7ly6ksM2RIbADHgFBvJcNTXrOvpCYdOQnHO5vMoOh8Z0sA1cDi9Cq3fSphy1z2fhYsjuxMHWXNhy00JhqbCheWtyJ54Ox8D+0KT0ovwp0NmXcMYjc8DSscOhJxwfRnxHGAfHwQFwBIyEwcgvNNY5HyHxHF6Kox5rHcugHY57xnnPWS8t4lHmIHjEeNyMBXf67WACeJNbDH+Ag+ax5fE1D5YWcd/cVuKkR04t8g94XuILUVeybgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.home,.x-button .x-button-icon.x-icon-mask.home{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEK0lEQVRoBe2Zy28NURzHe/vwqEepYkFIQzxWaCOC2HhELEgQImhXIrqyIEXikVQi+gdIwx9AItg1NiJELMSGhKQbobY2VY9Srfp8m5lmTO/cOXN7Zu656f0ln8zMnTNnft/z+505j5sbGxurmk5WPZ3ESuu0E1xbigjncrka3jsbftClIvsU5RZ65aLK5Lj/C75SzSjHWCuJYLxqhPXwBgYhylq4sRaixChDP8EzGIJ4UwNnCR6tgFswANegKer93LsLim4herm/JKqO8O+ZRdhL42acOwunYAacg2Hu3ePYj3Ph1A1fU2ySmZSZeCiTjxaC1LAboRs6QGJl8+AKXIU1kLqlHmHEqlFboQv2gD40QdPHqx3qKdtJkD8Hb9o+TzXCXmT1cboB+cT6evTVPgIXeWYl6DoVSy3COF2Hx0rjTthp4L0a/4xXrofn33OeqH8avKMqFcE4O4uXb4ULsNfEEa+M0v00LIIuCKc/P03NrAtGrD5Iiuh10Dia1JTOR0EZsjjpw3HlrQpGbD0v3AzFig36e4CLkeAPNs6tCUbsHBxS+mpsLSayYT2KtLBqVgQjdgFe7QP1u9VWPbRc2ZQFe2LV5zSBWG7ZP+vVTUkwYhvx6DicB+fFqvWKFuyJ1QxJ00It48rCNNgnNi+N23hQaVw2YiU0cYQRq9Q9CJdBKV1q02zMeEaWSDBil1L5JTgBDeCCzcUJ8cXImfACOeqayjbBffgDfqu6cPyJP3dgVZTvwd9jdzuoSFmgicRDGAYXRIZ9+I5fPbA6KC7feUHBVKD5rJZ1EutaZMOiv+HjbWjJJ9T/LVIwDyqyh+ApuC7WFy/RCk4r5HyRwWNewRSW2N3wGv6CX2E5HBWcB9AaFOqfTxJMQa1lNewosqNQDiLDPmqv+hFsgzpfrI7/CeamVjwnQZEtV7G+eEX6MeyHGl/0hGB+1MJdYt+B/1C5H9UdX8J2qJ6IMBfz4Ri8hXIXGfZfmdoLWr5W1zJ7ktg2aId18BuiTHNvDVUumQSNxDikLSdtBzdok0yCD8MyiLNmCqhxXBL9An+egNI3yqRT9z+O92FO/O2UuOMuymoqF06bUl53489MQw21Gm8lWmkRa6R/oVaMfT6lAmrsUVMNRa2HU3I8k2orgjNp5hK+ZLwPp/x+fR+0ONfMp9BfJ+qLmulpyze1zMtC8AACbkI/xAneQZkO0JiZimUheAjPn0MfxAnWVo3RiEG5oiwLwXJsmGFDK5iCxrCnGZNSOzVLra+EPDZ9T6EMCFVZ3KWpI8XV7uBTFcEOBsWqS5UIW21OByurRNjBoFh1qRJhq83pYGWVCDsYFKsuVSJstTkdrGz8L0VTv1i+NVF2CyTJDC0LX7E8HIx7D/Vrb3wDaLvY1D5QsI/6jXZUEwk29cDlckki5bIOY9+mneB/GfbU3e4Ey5kAAAAASUVORK5CYII=')}.x-button.x-button-action,.x-toolbar .x-button.x-button-action,.x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round,.x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small{border:1px solid #002f50;border-top-color:#003e6a;color:white}.x-button.x-button-action.x-button-back:before,.x-button.x-button-action.x-button-forward:before,.x-toolbar .x-button.x-button-action.x-button-back:before,.x-toolbar .x-button.x-button-action.x-button-forward:before,.x-button.x-button-action-round.x-button-back:before,.x-button.x-button-action-round.x-button-forward:before,.x-toolbar .x-button.x-button-action-round.x-button-back:before,.x-toolbar .x-button.x-button-action-round.x-button-forward:before,.x-button.x-button-action-small.x-button-back:before,.x-button.x-button-action-small.x-button-forward:before,.x-toolbar .x-button.x-button-action-small.x-button-back:before,.x-toolbar .x-button.x-button-action-small.x-button-forward:before{background:#002f50}.x-button.x-button-action,.x-button.x-button-action.x-button-back:after,.x-button.x-button-action.x-button-forward:after,.x-toolbar .x-button.x-button-action,.x-toolbar .x-button.x-button-action.x-button-back:after,.x-toolbar .x-button.x-button-action.x-button-forward:after,.x-button.x-button-action-round,.x-button.x-button-action-round.x-button-back:after,.x-button.x-button-action-round.x-button-forward:after,.x-toolbar .x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round.x-button-back:after,.x-toolbar .x-button.x-button-action-round.x-button-forward:after,.x-button.x-button-action-small,.x-button.x-button-action-small.x-button-back:after,.x-button.x-button-action-small.x-button-forward:after,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small.x-button-back:after,.x-toolbar .x-button.x-button-action-small.x-button-forward:after{background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692)}.x-button.x-button-action .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action .x-button-icon.x-icon-mask,.x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-button.x-button-action-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dbf0ff));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dbf0ff);background-image:linear-gradient(#ffffff,#ffffff 2%,#dbf0ff)}.x-button.x-button-action.x-button-pressing,.x-button.x-button-action.x-button-pressing:after,.x-button.x-button-action.x-button-pressed,.x-button.x-button-action.x-button-pressed:after,.x-button.x-button-action.x-button-active,.x-button.x-button-action.x-button-active:after,.x-toolbar .x-button.x-button-action.x-button-pressing,.x-toolbar .x-button.x-button-action.x-button-pressing:after,.x-toolbar .x-button.x-button-action.x-button-pressed,.x-toolbar .x-button.x-button-action.x-button-pressed:after,.x-toolbar .x-button.x-button-action.x-button-active,.x-toolbar .x-button.x-button-action.x-button-active:after,.x-button.x-button-action-round.x-button-pressing,.x-button.x-button-action-round.x-button-pressing:after,.x-button.x-button-action-round.x-button-pressed,.x-button.x-button-action-round.x-button-pressed:after,.x-button.x-button-action-round.x-button-active,.x-button.x-button-action-round.x-button-active:after,.x-toolbar .x-button.x-button-action-round.x-button-pressing,.x-toolbar .x-button.x-button-action-round.x-button-pressing:after,.x-toolbar .x-button.x-button-action-round.x-button-pressed,.x-toolbar .x-button.x-button-action-round.x-button-pressed:after,.x-toolbar .x-button.x-button-action-round.x-button-active,.x-toolbar .x-button.x-button-action-round.x-button-active:after,.x-button.x-button-action-small.x-button-pressing,.x-button.x-button-action-small.x-button-pressing:after,.x-button.x-button-action-small.x-button-pressed,.x-button.x-button-action-small.x-button-pressed:after,.x-button.x-button-action-small.x-button-active,.x-button.x-button-action-small.x-button-active:after,.x-toolbar .x-button.x-button-action-small.x-button-pressing,.x-toolbar .x-button.x-button-action-small.x-button-pressing:after,.x-toolbar .x-button.x-button-action-small.x-button-pressed,.x-toolbar .x-button.x-button-action-small.x-button-pressed:after,.x-toolbar .x-button.x-button-action-small.x-button-active,.x-toolbar .x-button.x-button-action-small.x-button-active:after{background-color:#0062a7;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #004474), color-stop(10%, #00538d), color-stop(65%, #0062a7), color-stop(100%, #0064a9));background-image:-webkit-linear-gradient(#004474,#00538d 10%,#0062a7 65%,#0064a9);background-image:linear-gradient(#004474,#00538d 10%,#0062a7 65%,#0064a9)}.x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm,.x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round,.x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small{border:1px solid #263501;border-top-color:#374e02;color:white}.x-button.x-button-confirm.x-button-back:before,.x-button.x-button-confirm.x-button-forward:before,.x-toolbar .x-button.x-button-confirm.x-button-back:before,.x-toolbar .x-button.x-button-confirm.x-button-forward:before,.x-button.x-button-confirm-round.x-button-back:before,.x-button.x-button-confirm-round.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-round.x-button-back:before,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:before,.x-button.x-button-confirm-small.x-button-back:before,.x-button.x-button-confirm-small.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-small.x-button-back:before,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:before{background:#263501}.x-button.x-button-confirm,.x-button.x-button-confirm.x-button-back:after,.x-button.x-button-confirm.x-button-forward:after,.x-toolbar .x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm.x-button-back:after,.x-toolbar .x-button.x-button-confirm.x-button-forward:after,.x-button.x-button-confirm-round,.x-button.x-button-confirm-round.x-button-back:after,.x-button.x-button-confirm-round.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round.x-button-back:after,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:after,.x-button.x-button-confirm-small,.x-button.x-button-confirm-small.x-button-back:after,.x-button.x-button-confirm-small.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small.x-button-back:after,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:after{background-color:#6c9804;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c2fa3b), color-stop(2%, #85bb05), color-stop(100%, #547503));background-image:-webkit-linear-gradient(#c2fa3b,#85bb05 2%,#547503);background-image:linear-gradient(#c2fa3b,#85bb05 2%,#547503)}.x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-button.x-button-confirm-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #f4fedc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#f4fedc);background-image:linear-gradient(#ffffff,#ffffff 2%,#f4fedc)}.x-button.x-button-confirm.x-button-pressing,.x-button.x-button-confirm.x-button-pressing:after,.x-button.x-button-confirm.x-button-pressed,.x-button.x-button-confirm.x-button-pressed:after,.x-button.x-button-confirm.x-button-active,.x-button.x-button-confirm.x-button-active:after,.x-toolbar .x-button.x-button-confirm.x-button-pressing,.x-toolbar .x-button.x-button-confirm.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm.x-button-pressed,.x-toolbar .x-button.x-button-confirm.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm.x-button-active,.x-toolbar .x-button.x-button-confirm.x-button-active:after,.x-button.x-button-confirm-round.x-button-pressing,.x-button.x-button-confirm-round.x-button-pressing:after,.x-button.x-button-confirm-round.x-button-pressed,.x-button.x-button-confirm-round.x-button-pressed:after,.x-button.x-button-confirm-round.x-button-active,.x-button.x-button-confirm-round.x-button-active:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-round.x-button-active,.x-toolbar .x-button.x-button-confirm-round.x-button-active:after,.x-button.x-button-confirm-small.x-button-pressing,.x-button.x-button-confirm-small.x-button-pressing:after,.x-button.x-button-confirm-small.x-button-pressed,.x-button.x-button-confirm-small.x-button-pressed:after,.x-button.x-button-confirm-small.x-button-active,.x-button.x-button-confirm-small.x-button-active:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-small.x-button-active,.x-toolbar .x-button.x-button-confirm-small.x-button-active:after{background-color:#628904;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3e5702), color-stop(10%, #507003), color-stop(65%, #628904), color-stop(100%, #648c04));background-image:-webkit-linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04);background-image:linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04)}.x-button.x-button-decline,.x-toolbar .x-button.x-button-decline,.x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round,.x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small{border:1px solid #630303;border-top-color:#7c0303;color:white}.x-button.x-button-decline.x-button-back:before,.x-button.x-button-decline.x-button-forward:before,.x-toolbar .x-button.x-button-decline.x-button-back:before,.x-toolbar .x-button.x-button-decline.x-button-forward:before,.x-button.x-button-decline-round.x-button-back:before,.x-button.x-button-decline-round.x-button-forward:before,.x-toolbar .x-button.x-button-decline-round.x-button-back:before,.x-toolbar .x-button.x-button-decline-round.x-button-forward:before,.x-button.x-button-decline-small.x-button-back:before,.x-button.x-button-decline-small.x-button-forward:before,.x-toolbar .x-button.x-button-decline-small.x-button-back:before,.x-toolbar .x-button.x-button-decline-small.x-button-forward:before{background:#630303}.x-button.x-button-decline,.x-button.x-button-decline.x-button-back:after,.x-button.x-button-decline.x-button-forward:after,.x-toolbar .x-button.x-button-decline,.x-toolbar .x-button.x-button-decline.x-button-back:after,.x-toolbar .x-button.x-button-decline.x-button-forward:after,.x-button.x-button-decline-round,.x-button.x-button-decline-round.x-button-back:after,.x-button.x-button-decline-round.x-button-forward:after,.x-toolbar .x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round.x-button-back:after,.x-toolbar .x-button.x-button-decline-round.x-button-forward:after,.x-button.x-button-decline-small,.x-button.x-button-decline-small.x-button-back:after,.x-button.x-button-decline-small.x-button-forward:after,.x-toolbar .x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small.x-button-back:after,.x-toolbar .x-button.x-button-decline-small.x-button-forward:after{background-color:#c70505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fb6a6a), color-stop(2%, #ea0606), color-stop(100%, #a40404));background-image:-webkit-linear-gradient(#fb6a6a,#ea0606 2%,#a40404);background-image:linear-gradient(#fb6a6a,#ea0606 2%,#a40404)}.x-button.x-button-decline .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline .x-button-icon.x-icon-mask,.x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-button.x-button-decline-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #fedcdc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#fedcdc);background-image:linear-gradient(#ffffff,#ffffff 2%,#fedcdc)}.x-button.x-button-decline.x-button-pressing,.x-button.x-button-decline.x-button-pressing:after,.x-button.x-button-decline.x-button-pressed,.x-button.x-button-decline.x-button-pressed:after,.x-button.x-button-decline.x-button-active,.x-button.x-button-decline.x-button-active:after,.x-toolbar .x-button.x-button-decline.x-button-pressing,.x-toolbar .x-button.x-button-decline.x-button-pressing:after,.x-toolbar .x-button.x-button-decline.x-button-pressed,.x-toolbar .x-button.x-button-decline.x-button-pressed:after,.x-toolbar .x-button.x-button-decline.x-button-active,.x-toolbar .x-button.x-button-decline.x-button-active:after,.x-button.x-button-decline-round.x-button-pressing,.x-button.x-button-decline-round.x-button-pressing:after,.x-button.x-button-decline-round.x-button-pressed,.x-button.x-button-decline-round.x-button-pressed:after,.x-button.x-button-decline-round.x-button-active,.x-button.x-button-decline-round.x-button-active:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressing,.x-toolbar .x-button.x-button-decline-round.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressed,.x-toolbar .x-button.x-button-decline-round.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-round.x-button-active,.x-toolbar .x-button.x-button-decline-round.x-button-active:after,.x-button.x-button-decline-small.x-button-pressing,.x-button.x-button-decline-small.x-button-pressing:after,.x-button.x-button-decline-small.x-button-pressed,.x-button.x-button-decline-small.x-button-pressed:after,.x-button.x-button-decline-small.x-button-active,.x-button.x-button-decline-small.x-button-active:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressing,.x-toolbar .x-button.x-button-decline-small.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressed,.x-toolbar .x-button.x-button-decline-small.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-small.x-button-active,.x-toolbar .x-button.x-button-decline-small.x-button-active:after{background-color:#b80505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #860303), color-stop(10%, #9f0404), color-stop(65%, #b80505), color-stop(100%, #ba0505));background-image:-webkit-linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505);background-image:linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505)}.x-sheet,.x-sheet-action{padding:0.7em;border-top:1px solid #092e47;height:auto;background-color:rgba(3, 17, 26, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(20,104,162,0.9)), color-stop(2%, rgba(7,37,58,0.9)), color-stop(100%, rgba(0,0,0,0.9)));background-image:-webkit-linear-gradient(rgba(20,104,162,0.9),rgba(7,37,58,0.9) 2%,rgba(0,0,0,0.9));background-image:linear-gradient(rgba(20,104,162,0.9),rgba(7,37,58,0.9) 2%,rgba(0,0,0,0.9));-webkit-border-radius:0;border-radius:0}.x-sheet-inner > .x-button,.x-sheet-action-inner > .x-button{margin-bottom:0.5em}.x-sheet-inner > .x-button:last-child,.x-sheet-action-inner > .x-button:last-child{margin-bottom:0}.x-sheet.x-picker{padding:0}.x-sheet.x-picker .x-sheet-inner{position:relative;background-color:#fff;-webkit-border-radius:0.4em;border-radius:0.4em;-webkit-background-clip:padding;background-clip:padding-box;overflow:hidden;margin:0.7em}.x-sheet.x-picker .x-sheet-inner:before,.x-sheet.x-picker .x-sheet-inner:after{z-index:1;content:"";position:absolute;width:100%;height:30%;top:0;left:0}.x-sheet.x-picker .x-sheet-inner:before{top:auto;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;bottom:0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #bbbbbb));background-image:-webkit-linear-gradient(#ffffff,#bbbbbb);background-image:linear-gradient(#ffffff,#bbbbbb)}.x-sheet.x-picker .x-sheet-inner:after{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bbbbbb), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#bbbbbb,#ffffff);background-image:linear-gradient(#bbbbbb,#ffffff)}.x-sheet.x-picker .x-sheet-inner .x-picker-slot .x-body{border-left:1px solid #999999;border-right:1px solid #ACACAC}.x-sheet.x-picker .x-sheet-inner .x-picker-slot.x-first .x-body{border-left:0}.x-sheet.x-picker .x-sheet-inner .x-picker-slot.x-last .x-body{border-left:0;border-right:0}.x-picker-slot .x-scroll-view{z-index:2;position:relative;-webkit-box-shadow:rgba(0, 0, 0, 0.4) -1px 0 1px}.x-picker-slot .x-scroll-view:first-child{-webkit-box-shadow:none}.x-picker-mask{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3;display:-webkit-box;display:box;-webkit-box-align:stretch;box-align:stretch;-webkit-box-orient:vertical;box-orient:vertical;-webkit-box-pack:center;box-pack:center;pointer-events:none}.x-picker-bar{border-top:0.12em solid #006bb6;border-bottom:0.12em solid #006bb6;height:2.5em;background-color:rgba(13, 148, 242, 0.3);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(158,212,250,0.3)), color-stop(2%, rgba(47,163,244,0.3)), color-stop(100%, rgba(11,127,208,0.3)));background-image:-webkit-linear-gradient(rgba(158,212,250,0.3),rgba(47,163,244,0.3) 2%,rgba(11,127,208,0.3));background-image:linear-gradient(rgba(158,212,250,0.3),rgba(47,163,244,0.3) 2%,rgba(11,127,208,0.3));-webkit-box-shadow:rgba(0, 0, 0, 0.2) 0 0.2em 0.2em}.x-use-titles .x-picker-bar{margin-top:1.5em}.x-picker-slot-title{height:1.5em;position:relative;z-index:2;background-color:#1295f1;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a2d6f9), color-stop(2%, #34a4f3), color-stop(100%, #0d81d2));background-image:-webkit-linear-gradient(#a2d6f9,#34a4f3 2%,#0d81d2);background-image:linear-gradient(#a2d6f9,#34a4f3 2%,#0d81d2);border-top:1px solid #1295f1;border-bottom:1px solid #095b94;-webkit-box-shadow:0px 0.1em 0.3em rgba(0, 0, 0, 0.3);padding:0.2em 1.02em}.x-picker-slot-title > div{font-weight:bold;font-size:0.8em;color:#113b59;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-picker-slot .x-dataview-inner{width:100%}.x-picker-slot .x-dataview-item{vertical-align:middle;height:2.5em;line-height:2.5em;font-weight:bold;padding:0 10px}.x-picker-slot .x-picker-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-picker-right{text-align:right}.x-picker-center{text-align:center}.x-picker-left{text-align:left}.x-tabbar.x-docked-top{border-bottom-width:.1em;border-bottom-style:solid;height:2.6em;padding:0 .8em}.x-tabbar.x-docked-top .x-tab{padding:0.4em 0.8em;height:1.8em;-webkit-border-radius:0.9em;border-radius:0.9em}.x-tabbar.x-docked-top .x-button-label,.x-tabbar.x-docked-top .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-top .x-badge{font-size:.8em;line-height:1.2em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tabbar.x-docked-bottom{border-top-width:.1em;border-top-style:solid;height:3em;padding:0}.x-tabbar.x-docked-bottom .x-tab{-webkit-border-radius:0.25em;border-radius:0.25em;min-width:3.3em;position:relative;padding-top:.2em}.x-tabbar.x-docked-bottom .x-tab .x-button-icon{-webkit-mask-size:1.65em;width:1.65em;height:1.65em;display:block;margin:0 auto;position:relative}.x-tabbar.x-docked-bottom .x-tab .x-button-label,.x-tabbar.x-docked-bottom .x-tab .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-bottom .x-tab .x-badge{margin:0;padding:.1em 0 .2em 0;font-size:9px;line-height:12px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tab .x-button-icon.bookmarks,.x-button .x-button-icon.x-icon-mask.bookmarks{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHC0lEQVRoBe2aW4hVVRiAx8t4qXFMvGZGeLcblUVWdJEoiTIhI9KoHiIyKyh6SOvBh166vPTQQ2IXkKyIktIyLQzLUoMkSbKoVEwtK2+VZWrl9H3bs4Y1e/a5eDxzDsycHz7X2muv9f/r//+11p6zt91aWloaupJ070rO6mvd4c6e8XqGO3uGe5biYDck188y1LOGeuS3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I5d91ZVBLtjdVj8gyJZ39WwjOHEZi3stvmvh9VwttY23MxdSuoOd/Z01zPc2TP8PxKYOEKWmL1pAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.download,.x-button .x-button-icon.x-icon-mask.download{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGb0lEQVRoBd2aX4gVVRzH3V1dU5JMk9Q2wVxCo0QNTYRYS4l6CBFBomA1qjcjSOgPPUgR0VNBFBT0Bx96qAiSXipCH4rKIhGNUqE2SK3MqKwsLbXPZ7rnMo73jnPnzF6v9wefPefMnPP7/b7z58yZudtz6tSpMaNlPT09E/DdDxPhMpgNJyBtfTRG4AAchePk9BflqFhP1YIRqbCZsACWwjWwGIrYZ3TaDZ/ATjhIfh6IyqwywQhdRlaLYBVcB5Mgxn5n8HbYAjsQ/lGMs/pYz3AMOFLgG/AzeH+MBvo2xqqYXB1bSiyBe2EJvAaH4SSMhtC0T2MYy5jG7i0jvmXBBJoMj4D3VjuEpkVbN6axzWFyq6JbEkyAhfAqOJtmE2l32xzMZWErogsLxvE62As+Vtotrlk8czGndUVFFxKMw41wEM7FJdxMbNhuTua2sYjoXME4cVHwEDhZhACdWpqjufblCW8qmIHOxHfCT9CpIrN5mas5N53B8wS7kPgKOumezQrMts3VnJc1O8sNV1qsmq5k0LNwI3hZx9ovONgEPk4amcvRR+HiRjtb3KborbAB0fvOGJs9EnRwwf88HIHsESzbVuisbKzQdh/Yp6z/7DhzV8OEECOU3qd148z20FgDK+DC+o74in59Y2pm7rNPVWbualhT01T3e5pgts6D9eARrzIB3LXVzF0N60FNdasL5kj0sXUtzIf+eo/zt6IGtaytaUuU1AXTugKuhyomjsR5B/xRi5rUllgimCMwltYQzAHr3WJqUdNQTWOyuFDcpbASptnoMlOT2tQ4phfl3uBzwes9byZl93lpalLbXLV6SXtzr4BuPLvISkxtauxX8DjwW5Qv9t1qalPjOAX7vJoB3TRZIec0U5saZyl4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Va/GWjmAxjYHcxkf8itStiQ4OCTIbHgO9kM7z7axjGns2SGfVspSgkMAgq4EZ0b/i3U0hevbGMZaGeKXKRv+cylOCxufY/xCcS3cCl5ii6AXqjCFeum+A2/D54j0Pbu0RQsOkRHu+6zP7avgJvDsz4VWxStyD7wPrsi+hP0ILfIbFl3zrTLB6TCId3KbCK6X58MSmAOuocW69jUcrmH9U9gF38NRRB6jrNT+AwkLDdxcvfCRAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.favorites,.x-button .x-button-icon.x-icon-mask.favorites{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz/Ujv+2mZRGZB7W6mtpFikC7+UWUZiqBD0JPFdRL1EMFPfjoU4baS0FUD/UWZBEVShA+BCpmWApRSkgllNpDmZWZt9//eOay72afvWfWOTPn3rvgz8yeWbPW+s/XmT379AwODtZSSQ+CryVgA/gVfIx/pelEhFMBVlvBOaBeFo6Cean8y09KsnMg932TqCOs9M2UhMfhMJVsxtHcAmcbmekLCsqjFKUkvAYG1xSwmEHZqoLyKEVJCDOCNxH9HUCbVl6mULAuXxjrOQlhgl8Bbi0h0Uen3FBS37GqVIQHiHh2SdR16jTlo0t0woycpuxiUDSdHcFeMv3uIWYanTDB3wIWVZBQHP10zuQKvbarUxDWT1HRz1E++Ds99fLtgp6jEmbExhPNcs+IbkZPiCpRCRP5TPCQJ4MJ6A3QSUqjSWzC2ozuC4j+fnSnB+gHq8YmvJKIJgVEpRPX9QH6waqxCa8PjEhHT981H2j6qno0wqzF63BhOUxsom3Zb7aJqGsUjTAONFJlpysXQz7VuXpavrBTzzEJaz1adlzNjHs6RTBvJyZhjZTF/kTaWZZCnlvhsyWgQkPZQpagzsX1bFlAXjGtDdAPUu1p3PPQhCCXkdwG/mta0PWLds060AuAnqtEOjpdbQR3VymX1P9F3UfgGJA9X9F92c/ADaQ2P8V0DJ4/kDbeYKaSv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QWUDTKzu1dAB5Dkz2tdOOHn70LvwVyMag/FYwzse295Rukq5j+G1wEOib66PAy5FPMD46+NPmqTV7CpwGGvkJPm2l8z8GWDNDloqpGQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.info,.x-button .x-button-icon.x-icon-mask.info{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHOElEQVRoBdWbXYgVZRjHXdf8ysjUQl011lbRIFEjM6Uu0iyiEDG86EItKoIuuhDJCgoioouugqKbgi4CKwulILG0mxLTUtMyTWQNPzLTPszU1cx+v+OZw9nZM3POmZl3zQd+zMz7zvs8z//MvF+z2nLhwoU+oaylpWUQvvvDYGiDdjgP1dbKRSccglNwlpxOcwxiLUULRqTCRsNUmAk3wS3QiG3hpp2wCbbDYfLzhyjMChOM0FlkNR3mw61wFeSxv2j8FayBrQjfmMdZpa1POA84UuD7cBzsHyHQtzHm58nVtpnEErgvzIB34Rj8CyGEVvs0hrGMaey+WcQ3LZhAQ+FZsG/1htBq0Z4b09jmMLRZ0U0JJsA0eAccTeOJ9Pa1OZjLtGZENywYx0tgDzit9La4pHjmYk5LGhXdkGAcLoPDcCle4SSxUbk5mduyRkSnCsaJi4IV4GARBSj6eALfR8sxunLEMUdzbU0TniiYho7ED8GvULRI/UV9cDbnrsauheXQCVnjmas5J47gaYJdSPwAIfqsPlfEnwRl/eBBOAlZROvXnGfFfUfXNQXTYCKsg38gS+B6bT6MEogfiTcKNuaIa87mPjHu2+segrnRBf8bYN+ql3jW+ntrJVNK6OJGw+VkVt+2M3c1DIrHsZ9WjPVwCxcLYQ4MqVQUf/Jjikt3VnnX4eauhoVlTZVw3QRTOhmWwjhQfCi7ppZjkjOf62FCrfomysxdDUtBTRWrCCZYK6WLYAo4aoa0JxKcu2x9CsYk1DdTrAa1LCpru9g2ese58lddD+cgT/9ppK2j8ONR7HLf9Um8B0XOCmpR04QoVmnQosDp4BHYD40kXMQ9zsPfgSI/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2pu7Gib3iBcv8BpbDJ0QOch6fB0fNf+1HOVXwD2wE7L6T2rXic/FNbXVLLw4mNmfTuRMZi/tx8djUDYHPgAHlaSks5abs7mX/lrYI3a8ILqmwTB4G9xWZQ1uu7egHQbC/aBQR+88PpPamqs5D4t0xI89+nD1DTT0A9waOANJQeqVu+j4Ddx3u26vd3/WenM01zHVGuLnqYK9GXNeXg15RGcV0Wg7czPHjrjA+HVdwVWifRX/j6LNydzqii1pif8CSdc4HApPg0u1IqeQRp9i/D5zMBdzqjkT1NLS0BOOGuLYv+E6lWyFolZjcSGNXBvbHMxlQJRfI8emBEcOCeKo+xq4A+nNp20sYxq7PcqnmWMmwVEAgs4FR0Y32CGF69sYxpobxc9yzP3feMo7nJtJxDnWV2w6RPtsTnOZQn1118JH8A0ik/bWVNe33IKjEAh3qei87Ue5eeDTnwTNilfkbvgM1oHb1oMIdX2c2woTXJ0J4h3c3NyPgikwA9zjjigT7Xf3ce0XCfF8M+wAv3icQmQXx0LtP/qKurS9uZqyAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.more,.x-button .x-button-icon.x-icon-mask.more{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADJ0lEQVRoBe2YS2sUQRSFp5MgvmLU+CAMiBJFDBHcCeoPEFciuHMjroMK4lZBcONG0JW60U1UEgRx59IXuNMoKEElKL7GRwyIqNHxO0N66FT3UNU9IHRNFXz0VNW5t+vW6RcT1ev1Sie1rk4qVrWGgn13PDgcHPZsB8Il7ZmhqXKCw6kt8WwgOOyZoalygsOpLfFsIDjsmaGpcoLDqS3xbCA47JmhqXKCw6kt8Wyg6XAURV2wEy7BM5iFtzAKu2BB0dqJ7YEtcBYmQblfwzjshUVt5O4mfhjOwwQodw3GYA8snpd77n9pFXMYvoP+qDaZZewcVKXPAzE64Qn4CmZe9f/AFSiSu4e4IzANrXJfZ24gXjO/KxEcg9+QFZQcU/CSONh2RKsraMQhr85xE/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nQJLYY+liVggVHqF4O60DDXjsezax6ETf7Xo0iTUQ6toZb4Ha4E+IUbX1f4AbOD2sUmrAMkLR6egHo3TWfcopGO0G9oG2ieR2t4lw92g0qIZ+iz0XzSVYjIrz4h5XtGkvqgagTmXeoFfJcb0+B/8ey5mETBNVjvClMhjjPViES1s8qy6AiKE5XnXPSCmqIE23rBsIK0PNYiIRcNn/E53jI6/08dsLem4DTcbADdMddQSYh0we6t6BeW9pIkxZOrIUJrS3Cm6EG7gJ9TE+qaFbXLP8BbOZm76mv4XonbAIg8ZacV0B/GAvDQRNdPkVfOvQe+znsJ1HXh/tY9hNL2OuV5PWu2hyqQZsIra/6FCO6gClapn6AU7AbtDfXxuUknCHRSxwTLf8Bgi31NJnvpzwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.user,.x-button .x-button-icon.x-icon-mask.user{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEWElEQVRoBe2aS0gVYRiGO1lmF8nQQlETutGFokAiqEV0ISKwgmrdMtzUpnW7drWKbFGbQAKpJIhuUGIUFUkW0T1Jq4V2U4ui7GLPexpDD+ecuX1jHqcPHseZ+f9vvnf++e8n0d/fPyZONjZOYqU1doLHRV3CiURCz5gMxTANJsJg+8XJJ+iBt9BHNdO1SCwRZR1GbAFRl8F8WAFLoRwGLME/ffAM7kETvIYPxPWDo7lFIhiheURaCVtgBywHXXOzbhJcggZoRvR7twy+76uELSEAtQsqySPwGdQN+KWDPHuh2DI2+TIVm3T455M9G0Bk6ktRvd4NBZaiTQUT3AQnSNW/VAFBzl/iZw0kq56FcOtuaQHB7QIv9ZVkrqZ2YA9Mck3pMYGZYKeh2sBz1SJb2mqcmfk0E0xQ6l9rwNoKcWjm11JwEYFVW6t1/K218mspeB5B5VsFluKnIuU88Kml4PGBo3DPqBGZiVkKNgvKRFkGJ5aCv2Z4xoi6bCm4DWUaXERhZhMJS8FfolDq+DSbRFgKjrIOa8poYp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8MO3NmeC+4CHlqdu1q7o25Xk5Hqynw+WBp+hpO1K4JItsnfr5GyCbSirCHstnQpcKulBXMK+o1frCPGgWAomwL2gLsm0z3S9ny38XARWgEXJOI7xNMiS9ns9MN5ZCQhEQ1lIGCOXmZf4ZeAW8C4IAblv3wBXAIn6sjkZ3Arc80FvGKW/nu4H/nhZDiR0IngI+LYPY3i43gWuAeNgFBQSn0UYJZejRH3CPQ8cMDi19Jp6AviuVfd48ADwRZXWG3Z9J/6fApeAJUm2TYRE02OZjPfA3WAM9HVDdvt2iXHI1HkoPQd2g7SjUHef+NyU7AXgFRD65qOcZrybQXgFmtUDIDu2xE3CBuCWWBxIU+8vk9MozdQukDUO3x4qm5IJOp36ZyW6waaJci/jrkviWEV9qiQOdd8Ebr/+T0fKkYvBp6AqOB2fnQz0SA39Kn9z6Z9mfPeze/UlUOXrB3Q2AW36a77KwP7tYCwh7Mupjk1TOmZuNInlyZqxuN8n3ItrQF1xryvRl9W/3Y3/60QGCTGF71h5JB0Tbn7vsDqyP6Vkva5dymxoVQ+lIE6+3+lJCH3Zcp+E78y2Fny7Evw7kstC8YA7BtQZRP1hiwTDKnuGun8aSiekaDxXwrbG/zOtaOT/ss3MLSjpCLc93V2Guwy3bAa6Jd2yhObodBnOTUnLGroMtyyhOTpdhnNT0rKGfwD3f6JVZi/xSQAAAABJRU5ErkJggg==')}.x-tabbar-light{background-color:#2583c4;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #97c9eb), color-stop(2%, #3495d9), color-stop(100%, #1f6fa6));background-image:-webkit-linear-gradient(#97c9eb,#3495d9 2%,#1f6fa6);background-image:linear-gradient(#97c9eb,#3495d9 2%,#1f6fa6);border-top-color:#2175af;border-bottom-color:#195884}.x-tabbar-light .x-tab{color:#c1dff4}.x-tabbar-light .x-tab-active{color:white;border-bottom:1px solid #278bd1}.x-tabbar-light .x-tab-pressed{color:white}.x-tabbar-light.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-light.x-docked-bottom .x-tab .x-button-icon{background-color:#6cb2e3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ecf5fc), color-stop(2%, #8ac2e9), color-stop(100%, #4da3de));background-image:-webkit-linear-gradient(#ecf5fc,#8ac2e9 2%,#4da3de);background-image:linear-gradient(#ecf5fc,#8ac2e9 2%,#4da3de)}.x-tabbar-light.x-docked-bottom .x-tab-active{background-color:#2175af;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #195884), color-stop(10%, #1d6699), color-stop(65%, #2175af), color-stop(100%, #2176b1));background-image:-webkit-linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);background-image:linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;-webkit-box-shadow:#1d6699 0 0 0.25em inset;box-shadow:#1d6699 0 0 0.25em inset}.x-tabbar-light.x-docked-bottom .x-tab-active .x-button-icon{background-color:#1da2ff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b6e1ff), color-stop(2%, #41b1ff), color-stop(100%, #0093f8));background-image:-webkit-linear-gradient(#b6e1ff,#41b1ff 2%,#0093f8);background-image:linear-gradient(#b6e1ff,#41b1ff 2%,#0093f8)}.x-tabbar-light.x-docked-top .x-tab-active{background-color:#2175af;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #195884), color-stop(10%, #1d6699), color-stop(65%, #2175af), color-stop(100%, #2176b1));background-image:-webkit-linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);background-image:linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);color:white}.x-tabbar-dark{background-color:#0e4b75;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #359ee7), color-stop(2%, #125f95), color-stop(100%, #0a3655));background-image:-webkit-linear-gradient(#359ee7,#125f95 2%,#0a3655);background-image:linear-gradient(#359ee7,#125f95 2%,#0a3655);border-top-color:#0b3c5e;border-bottom-color:#061f31}.x-tabbar-dark .x-tab{color:#63b4ec}.x-tabbar-dark .x-tab-active{color:white;border-bottom:1px solid #105483}.x-tabbar-dark .x-tab-pressed{color:white}.x-tabbar-dark.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-dark.x-docked-bottom .x-tab .x-button-icon{background-color:#1985d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #90caf2), color-stop(2%, #2897e5), color-stop(100%, #1571b0));background-image:-webkit-linear-gradient(#90caf2,#2897e5 2%,#1571b0);background-image:linear-gradient(#90caf2,#2897e5 2%,#1571b0)}.x-tabbar-dark.x-docked-bottom .x-tab-active{background-color:#0b3c5e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #061f31), color-stop(10%, #092e47), color-stop(65%, #0b3c5e), color-stop(100%, #0c3e60));background-image:-webkit-linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);background-image:linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-shadow:#092e47 0 0 0.25em inset;box-shadow:#092e47 0 0 0.25em inset}.x-tabbar-dark.x-docked-bottom .x-tab-active .x-button-icon{background-color:#50b7ff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e9f6ff), color-stop(2%, #74c6ff), color-stop(100%, #2ca9ff));background-image:-webkit-linear-gradient(#e9f6ff,#74c6ff 2%,#2ca9ff);background-image:linear-gradient(#e9f6ff,#74c6ff 2%,#2ca9ff)}.x-tabbar-dark.x-docked-top .x-tab-active{background-color:#0b3c5e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #061f31), color-stop(10%, #092e47), color-stop(65%, #0b3c5e), color-stop(100%, #0c3e60));background-image:-webkit-linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);background-image:linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);color:white}.x-tabbar-neutral{background-color:#e0e0e0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #f2f2f2), color-stop(100%, #cecece));background-image:-webkit-linear-gradient(#ffffff,#f2f2f2 2%,#cecece);background-image:linear-gradient(#ffffff,#f2f2f2 2%,#cecece);border-top-color:#d3d3d3;border-bottom-color:#bababa}.x-tabbar-neutral .x-tab{color:#7a7a7a}.x-tabbar-neutral .x-tab-active{color:black;border-bottom:1px solid #e8e8e8}.x-tabbar-neutral .x-tab-pressed{color:black}.x-tabbar-neutral.x-docked-bottom .x-tab{text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-tabbar-neutral.x-docked-bottom .x-tab .x-button-icon{background-color:#adadad;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa), color-stop(2%, #bfbfbf), color-stop(100%, #9b9b9b));background-image:-webkit-linear-gradient(#fafafa,#bfbfbf 2%,#9b9b9b);background-image:linear-gradient(#fafafa,#bfbfbf 2%,#9b9b9b)}.x-tabbar-neutral.x-docked-bottom .x-tab-active{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bababa), color-stop(10%, #c7c7c7), color-stop(65%, #d3d3d3), color-stop(100%, #d5d5d5));background-image:-webkit-linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);background-image:linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;-webkit-box-shadow:#c7c7c7 0 0 0.25em inset;box-shadow:#c7c7c7 0 0 0.25em inset}.x-tabbar-neutral.x-docked-bottom .x-tab-active .x-button-icon{background-color:#7a7a7a;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c7c7c7), color-stop(2%, #8c8c8c), color-stop(100%, #686868));background-image:-webkit-linear-gradient(#c7c7c7,#8c8c8c 2%,#686868);background-image:linear-gradient(#c7c7c7,#8c8c8c 2%,#686868)}.x-tabbar-neutral.x-docked-top .x-tab-active{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bababa), color-stop(10%, #c7c7c7), color-stop(65%, #d3d3d3), color-stop(100%, #d5d5d5));background-image:-webkit-linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);background-image:linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);color:black}.x-tab.x-item-disabled span.x-button-label,.x-tab.x-item-disabled .x-hasbadge span.x-badge,.x-hasbadge .x-tab.x-item-disabled span.x-badge,.x-tab.x-item-disabled .x-button-icon{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.x-tab.x-draggable{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.x-tab{-webkit-user-select:none;overflow:visible !important}.x-toolbar{padding:0 0.2em;overflow:hidden;position:relative;height:2.6em}.x-toolbar > *{z-index:1}.x-toolbar.x-docked-top{border-bottom:.1em solid}.x-toolbar.x-docked-bottom{border-top:.1em solid}.x-toolbar.x-docked-left{width:7em;height:auto;padding:0.2em;border-right:.1em solid}.x-toolbar.x-docked-right{width:7em;height:auto;padding:0.2em;border-left:.1em solid}.x-title{line-height:2.1em;font-size:1.2em;text-align:center;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0.3em;max-width:100%}.x-title .x-innerhtml{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 .3em}.x-toolbar-dark{background-color:#1468a2;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #63b4ec), color-stop(2%, #177cc2), color-stop(100%, #105483));background-image:-webkit-linear-gradient(#63b4ec,#177cc2 2%,#105483);background-image:linear-gradient(#63b4ec,#177cc2 2%,#105483);border-color:black}.x-toolbar-dark .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-dark.x-docked-top{border-bottom-color:black}.x-toolbar-dark.x-docked-bottom{border-top-color:black}.x-toolbar-dark.x-docked-left{border-right-color:black}.x-toolbar-dark.x-docked-right{border-left-color:black}.x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before{border:1px solid #061f31;border-top-color:#092e47;color:white}.x-toolbar-dark .x-button.x-button-back:before,.x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-button.x-button-back:before,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before{background:#061f31}.x-toolbar-dark .x-button,.x-toolbar-dark .x-button.x-button-back:after,.x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button.x-button-back:after,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#11598c;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4ca9e9), color-stop(2%, #156eac), color-stop(100%, #0d456c));background-image:-webkit-linear-gradient(#4ca9e9,#156eac 2%,#0d456c);background-image:linear-gradient(#4ca9e9,#156eac 2%,#0d456c)}.x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dff0fb));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dff0fb);background-image:linear-gradient(#ffffff,#ffffff 2%,#dff0fb)}.x-toolbar-dark .x-button.x-button-pressing,.x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar-dark .x-button.x-button-pressed,.x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar-dark .x-button.x-button-active,.x-toolbar-dark .x-button.x-button-active:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-button.x-button-active,.x-toolbar .x-toolbar-dark .x-button.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after{background-color:#0f517e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0a3351), color-stop(10%, #0c4267), color-stop(65%, #0f517e), color-stop(100%, #0f5280));background-image:-webkit-linear-gradient(#0a3351,#0c4267 10%,#0f517e 65%,#0f5280);background-image:linear-gradient(#0a3351,#0c4267 10%,#0f517e 65%,#0f5280)}.x-toolbar-dark .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light{background-color:#1985d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #90caf2), color-stop(2%, #2897e5), color-stop(100%, #1571b0));background-image:-webkit-linear-gradient(#90caf2,#2897e5 2%,#1571b0);background-image:linear-gradient(#90caf2,#2897e5 2%,#1571b0);border-color:black}.x-toolbar-light .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light.x-docked-top{border-bottom-color:black}.x-toolbar-light.x-docked-bottom{border-top-color:black}.x-toolbar-light.x-docked-left{border-right-color:black}.x-toolbar-light.x-docked-right{border-left-color:black}.x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before{border:1px solid #0b3c5e;border-top-color:#0e4b75;color:white}.x-toolbar-light .x-button.x-button-back:before,.x-toolbar-light .x-button.x-button-forward:before,.x-toolbar .x-toolbar-light .x-button.x-button-back:before,.x-toolbar .x-toolbar-light .x-button.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before{background:#0b3c5e}.x-toolbar-light .x-button,.x-toolbar-light .x-button.x-button-back:after,.x-toolbar-light .x-button.x-button-forward:after,.x-toolbar .x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button.x-button-back:after,.x-toolbar .x-toolbar-light .x-button.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#1676b9;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7abfef), color-stop(2%, #1a8bd9), color-stop(100%, #126299));background-image:-webkit-linear-gradient(#7abfef,#1a8bd9 2%,#126299);background-image:linear-gradient(#7abfef,#1a8bd9 2%,#126299)}.x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dff0fb));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dff0fb);background-image:linear-gradient(#ffffff,#ffffff 2%,#dff0fb)}.x-toolbar-light .x-button.x-button-pressing,.x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar-light .x-button.x-button-pressed,.x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar-light .x-button.x-button-active,.x-toolbar-light .x-button.x-button-active:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressing,.x-toolbar .x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressed,.x-toolbar .x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-button.x-button-active,.x-toolbar .x-toolbar-light .x-button.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after{background-color:#156eac;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0f517e), color-stop(10%, #125f95), color-stop(65%, #156eac), color-stop(100%, #156fae));background-image:-webkit-linear-gradient(#0f517e,#125f95 10%,#156eac 65%,#156fae);background-image:linear-gradient(#0f517e,#125f95 10%,#156eac 65%,#156fae)}.x-toolbar-light .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-neutral{background-color:#e0e0e0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #f2f2f2), color-stop(100%, #cecece));background-image:-webkit-linear-gradient(#ffffff,#f2f2f2 2%,#cecece);background-image:linear-gradient(#ffffff,#f2f2f2 2%,#cecece);border-color:#616161}.x-toolbar-neutral .x-title{color:black;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-toolbar-neutral.x-docked-top{border-bottom-color:#616161}.x-toolbar-neutral.x-docked-bottom{border-top-color:#616161}.x-toolbar-neutral.x-docked-left{border-right-color:#616161}.x-toolbar-neutral.x-docked-right{border-left-color:#616161}.x-toolbar-neutral .x-button,.x-toolbar .x-toolbar-neutral .x-button,.x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before{border:1px solid #a0a0a0;border-top-color:#adadad;color:black}.x-toolbar-neutral .x-button.x-button-back:before,.x-toolbar-neutral .x-button.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-button.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-button.x-button-forward:before,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:before{background:#a0a0a0}.x-toolbar-neutral .x-button,.x-toolbar-neutral .x-button.x-button-back:after,.x-toolbar-neutral .x-button.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-button,.x-toolbar .x-toolbar-neutral .x-button.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-forward:after,.x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #e5e5e5), color-stop(100%, #c1c1c1));background-image:-webkit-linear-gradient(#ffffff,#e5e5e5 2%,#c1c1c1);background-image:linear-gradient(#ffffff,#e5e5e5 2%,#c1c1c1)}.x-toolbar-neutral .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-button .x-button-icon.x-icon-mask,.x-toolbar-neutral .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-neutral .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-toolbar-neutral .x-button.x-button-pressing,.x-toolbar-neutral .x-button.x-button-pressing:after,.x-toolbar-neutral .x-button.x-button-pressed,.x-toolbar-neutral .x-button.x-button-pressed:after,.x-toolbar-neutral .x-button.x-button-active,.x-toolbar-neutral .x-button.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-active,.x-toolbar .x-toolbar-neutral .x-button.x-button-active:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-active,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active:after{background-color:#cccccc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b2b2b2), color-stop(10%, #bfbfbf), color-stop(65%, #cccccc), color-stop(100%, #cdcdcd));background-image:-webkit-linear-gradient(#b2b2b2,#bfbfbf 10%,#cccccc 65%,#cdcdcd);background-image:linear-gradient(#b2b2b2,#bfbfbf 10%,#cccccc 65%,#cdcdcd)}.x-toolbar-neutral .x-form-label{color:black;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-navigation-bar .x-container{overflow:visible}.x-spinner .x-input-el,.x-field-select .x-input-el{-webkit-text-fill-color:#000;-webkit-opacity:1}.x-spinner.x-item-disabled .x-input-el,.x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:currentcolor}.x-toolbar .x-field-select .x-input-el{-webkit-text-fill-color:#fff}.x-toolbar .x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:rgba(255, 255, 255, 0.6)}.x-toolbar .x-form-field-container{padding:0 .3em}.x-toolbar .x-field{width:13em;margin:.5em;min-height:0;border-bottom:0;background:transparent}.x-toolbar .x-field .x-clear-icon{background-size:50% 50%;right:-0.8em;margin-top:-1.06em}.x-toolbar .x-field-input{padding-right:1.6em !important}.x-toolbar .x-field-textarea .x-component-outer,.x-toolbar .x-field-text .x-component-outer,.x-toolbar .x-field-number .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.3em;border-radius:0.3em;background-color:white;-webkit-box-shadow:inset rgba(0, 0, 0, 0.5) 0 0.1em 0, inset rgba(0, 0, 0, 0.5) 0 -0.1em 0, inset rgba(0, 0, 0, 0.5) 0.1em 0 0, inset rgba(0, 0, 0, 0.5) -0.1em 0 0, inset rgba(0, 0, 0, 0.5) 0 0.15em 0.4em}.x-toolbar .x-form-label{background:transparent;border:0;padding:0;line-height:1.4em}.x-toolbar .x-form-field{height:1.6em;color:#6e6e6e;background:transparent;min-height:0;-webkit-appearance:none;padding:0em .3em;margin:0}.x-toolbar .x-form-field:focus{color:black}.x-toolbar .x-field-select .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.8em;border-radius:0.8em}.x-toolbar .x-field-search .x-field-input{background-position:.5em 50%}.x-toolbar .x-field-select{-webkit-box-shadow:none}.x-toolbar .x-field-select .x-form-field{height:1.4em}.x-toolbar .x-field-select{background:transparent}.x-toolbar .x-field-select .x-component-outer:after{right:.4em}.x-toolbar .x-field-select.x-item-disabled .x-component-outer:after{opacity:.6}.x-toolbar .x-field-select .x-component-outer:before{width:3em;border-left:none;-webkit-border-top-right-radius:0.8em;border-top-right-radius:0.8em;-webkit-border-bottom-right-radius:0.8em;border-bottom-right-radius:0.8em;-webkit-mask:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAABCAYAAACc0f2yAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADJJREFUeNpi/P//PwMjIyMbAwMDOxRzAjEXFHMDMQ8a5kXC6HLcSHo5kcwEmU9TABBgAOcTBAFcRiSpAAAAAElFTkSuQmCC');-webkit-mask-position:right top;-webkit-mask-repeat:repeat-y;-webkit-mask-size:3em 0.05em}.x-toolbar .x-field-select .x-input-text{color:#fff}.x-android .x-field-search .x-field-input{padding-left:.2em !important;padding-right:2.2em !important}.x-indexbar-wrapper{-webkit-box-pack:end !important;box-pack:end !important;pointer-events:none}.x-indexbar-vertical{width:1.1em;-webkit-box-orient:vertical;box-orient:vertical;margin-right:8px}.x-indexbar-horizontal{height:1.1em;-webkit-box-orient:horizontal;box-orient:horizontal;margin-bottom:8px}.x-indexbar{pointer-events:auto;z-index:2;padding:.3em 0;min-height:0 !important;height:auto !important;-webkit-box-flex:0 !important}.x-indexbar > div{color:#155988;font-size:0.6em;text-align:center;line-height:1.1em;font-weight:bold;display:block}.x-phone.x-landscape .x-indexbar > div{font-size:0.38em;line-height:1em}.x-indexbar-pressed{-webkit-border-radius:0.55em;border-radius:0.55em;background-color:rgba(143, 155, 163, 0.8)}.x-list{position:relative;background-color:#f7f7f7}.x-list .x-list-inner{width:100%}.x-list .x-list-disclosure{position:absolute;bottom:0.44em;right:0.44em}.x-list .x-list-disclosure{overflow:visible;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2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ylDwIFoi9U42OkjXSNLA3oj6Ykle4g/t9R0D8LZXnxU1esWRttXM7lwwJNA6qCL2EpMO44iYIXNaFyMlFeu3t7Zq78ugeBbZz2d4RX2mBa/oFTRPLQs+ggfBlGA/gYV09hYvQR5eScRvF+Zt7iOm92JjMxU9snam3kLXPALvWYHlsoztBmgjtIGiazkMhw6ABC4+GpADa/QuA5bJ+Temn5sv/f4gSo/c5YNfYKd9kGVBdOCmO5hI1pkAC3t1uExKfmwTbFfoL4HACDlN/y5p+RZLfU/Fvs+BgbK1psLBXAjhR+qauh2unTfRdAa8N4D5pqQL+nwADAKGFDQ//Deb9AAAAAElFTkSuQmCC') no-repeat;-webkit-mask-size:1.7em;background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692);width:1.7em;height:1.7em}.x-list.x-list-indexed .x-list-disclosure{margin-right:1em}.x-list .x-item-selected .x-list-disclosure{background:#fff none}.x-list .x-list-item{position:relative;color:black}.x-list .x-list-item .x-list-item-label{min-height:2.6em;padding:0.65em 0.8em}.x-list .x-list-item.x-item-pressed .x-list-item-label{background:#b6e1ff none}.x-list .x-list-item.x-item-selected .x-list-item-label{background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692);color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-list-header{position:relative}.x-list-header-swap{position:absolute;left:0;width:100%;z-index:1}.x-ios .x-list-header-swap{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.x-list-normal .x-list-header{background-color:#5ab5f5;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eaf6fe), color-stop(2%, #7cc4f7), color-stop(100%, #38a6f3));background-image:-webkit-linear-gradient(#eaf6fe,#7cc4f7 2%,#38a6f3);background-image:linear-gradient(#eaf6fe,#7cc4f7 2%,#38a6f3);color:#0a6aac;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;border-top:1px solid #5ab5f5;border-bottom:1px solid #0d87dc;font-weight:bold;font-size:0.8em;padding:0.2em 1.02em;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-list-normal .x-list-item .x-list-item-label{border-top:1px solid #dedede}.x-list-normal .x-list-item:last-child .x-list-item-label{border-bottom:1px solid #dedede}.x-list-normal .x-list-item:first-child .x-list-item-label{border-top:0}.x-list-normal .x-list-item.x-item-pressed .x-list-item-label{border-top-color:#b6e1ff;background-color:#b6e1ff}.x-list-normal .x-list-item.x-item-selected .x-list-item-label{border-top-color:#006bb6;border-bottom-color:#003e6a}.x-list-round .x-scroll-view{background-color:#EEEEEE !important}.x-list-round .x-list-disclosure{overflow:hidden;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA9CAYAAAAeYmHpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDI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jXxiOSstEDKXl95LWOJaWN0oa8lxaJqLSMhNoeyX3M/Gmo45G4DlgtUc7hozrv8nJgUCELwEfA/sd697NHv04wv78FnBS0p8BlvVBSUsdl/V91kIO3hicoIizGwU0ALYDvzrIrLDAtcyzLYevSIQCNfu/lvSA4xtutF3NEEjNtZc14EnJE5KucyC8SNKzkv4OQHhgvr2s1zwtp/XAw8DNzHMqwHCvtZGqAgTT/3KaYdb3epzlHyQ9LWmVpKtmecsrPX+Pc9FTrk15STppm3O3SLo2z497AhF22pRHUjqQIZOSthv5JZKeCeTHMg7OZ0N3B0xLRyS9KOlYoOfvLvZsaC1w0ILMQkI/sBG4ONsf/j88NwMyZI8ejiwQwhso4HxoId3QCZu9/gpf0usK7bkV2gLOmJ/sqUDCe8y2TKECxRxyT5PdW0qWmewE2X2xvmL63q7oI7vtustldj0iY293eTGEZ0tDXUazncqLC92ms6y3daLRJqlX0lQAolP27DZfV5R8X0arJXsZLY2fy2h9ZC+jXfRppG/S+Wi3xKbVRoLshZPmnOb7uPnpCRvHAzcqg5OuSPwzAGYd6fed/rrcAAAAAElFTkSuQmCC') no-repeat;-webkit-mask-size:1.5em;background-color:#419cdb;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c1dff4), color-stop(2%, #5face1), color-stop(100%, #278bd1));background-image:-webkit-linear-gradient(#c1dff4,#5face1 2%,#278bd1);background-image:linear-gradient(#c1dff4,#5face1 2%,#278bd1);width:1.5em;height:1.5em;bottom:0.5em}.x-list-round .x-list-header{color:#777;font-size:1em;font-weight:bold;padding-left:26px;line-height:1.7em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee), color-stop(30%, rgba(238,238,238,0.9)), color-stop(100%, rgba(238,238,238,0.4)));background-image:-webkit-linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4));background-image:linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4))}.x-list-round .x-list-container{padding:13px 13px 0 13px}.x-list-round .x-list-container .x-list-header{padding-left:13px;background-image:none}.x-list-round.x-list-ungrouped .x-list-item-label,.x-list-round.x-list-grouped .x-list-item-label{border:solid #DDDDDD;border-width:1px 1px 0 1px;background:#fff}.x-list-round.x-list-ungrouped .x-list-item:first-child .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-ungrouped .x-list-item:last-child{margin-bottom:13px}.x-list-round.x-list-ungrouped .x-list-item:last-child .x-list-item-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;border-width:1px}.x-list-round.x-list-grouped .x-list-header-item .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-grouped .x-list-footer-item{margin-bottom:13px}.x-list-round.x-list-grouped .x-list-footer-item .x-list-item-label{border-width:1px;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-dataview-inlineblock .x-dataview-item{display:inline-block !important}.x-dataview-nowrap .x-dataview-container{white-space:nowrap !important}.x-list-inlineblock .x-list-item{display:inline-block !important}.x-list-nowrap .x-list-inner{width:auto}.x-list-nowrap .x-list-container{white-space:nowrap !important}.x-list-paging{height:50px}.x-list-paging .x-loading-spinner{display:none;margin:auto}.x-list-paging .x-list-paging-msg{text-align:center;color:#006bb6;padding-top:10px;-webkit-border-radius:6px;border-radius:6px}.x-list-paging.x-loading .x-loading-spinner{display:block}.x-list-paging.x-loading .x-list-paging-msg{display:none}.x-list-pullrefresh{display:-webkit-box;display:box;-webkit-box-orient:horizontal;box-orient:horizontal;-webkit-box-align:center;box-align:center;-webkit-box-pack:center;box-pack:center;position:absolute;top:-5em;left:0;width:100%;height:4.5em}.x-list-pullrefresh .x-loading-spinner{display:none}.x-list-pullrefresh-arrow{width:2.5em;height:4.5em;background:center center url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAA8CAYAAAAUufjgAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrsmU8oREEYwOexdtNuKBfFwdVhCyfuysnFiXISS+1BLopyUpKLXETkRLaUi1LK3Q2lpPbiQLnIn03a/Hm+z86Ttv0zM++bfbOar36Hbad5v535Zp7v47iuy0wOpyoEHccRHV9L9NxPkUE/bhKCOKiOSPAdn69DsJ5I8E2HYA0QJRJ8Bb50CDYRCT7pEMQD0kwk+CByUFQEW4gE73UIhoA2IsFb4ENEMCQ5MdU1IxwygpT3oKNLMGyyYFVscdhusc8tDpu+xRG7xf95BW0O2kNiV1AgIvaQ2BzUJNgJNJYZGyUU7OG1cal4Bi68oqkDPszy2teEwJp5Cdyu/lZ1g8CwIYJ7wEF+2YmrNw90Byx3BizgKhaqizEP1wg7CLLxCEzy/CtauMeBlQDyEfNuGrgU6SyM8F9SyVgHdmRaH6tAb4XkToEp2d4M5mOK0TWMigU2koa8vJMRZPxEb2ss2LEVPMpPLlMRxBgDZjQJLgNbxb6Uab9tAn3EcifAeKkBMoLY+j0GWonk7oB+lmsFkwhidAGHBPmIeTcAnJcbKCuIMQEs+hScAzZEBqoIYuzyFVCJI36lMJ2CDfxibZeUu+EX/4uMIFP8ZyLejxkgK0hG5a8kP4IYSZbr1IuQVHmAX0HGX4VuGfZVJ6cQxPd1uoRcWqDW0SroFVzZAnJZ/h0LWhAjUUAw4XdSSsH8fExRTEgtGAOuOTETBb16Jk412e+bxOSwglYw6PgWYABvLk8P7zGJFwAAAABJRU5ErkJggg==') no-repeat;background-size:2em 3em;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.x-list-pullrefresh-release .x-list-pullrefresh-arrow{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.x-list-pullrefresh-wrap{width:20em;font-size:0.7em}.x-list-pullrefresh-message{font-weight:bold;font-size:1.3em;margin-bottom:0.1em;text-align:center}.x-list-pullrefresh-updated{text-align:center}html,body{width:100%;height:100%}.x-translatable{position:absolute;top:100%;left:100%;z-index:1}.x-translatable-container{position:relative}.x-translatable-wrapper{width:100%;height:100%;position:absolute;overflow:hidden}.x-translatable-stretcher{width:300%;height:300%;position:absolute;visibility:hidden;z-index:-1}.x-translatable-nested-stretcher{width:100%;height:100%;left:100%;top:100%;position:absolute;visibility:hidden;z-index:-1}.x-layout-fit,.x-layout-card{position:relative;overflow:hidden}.x-layout-fit-item,.x-layout-card-item{position:absolute !important;width:100%;height:100%}.x-layout-hbox,.x-layout-vbox{display:-webkit-box}.x-layout-hbox > *,.x-layout-vbox > *{-webkit-box-flex:0}.x-layout-hbox{-webkit-box-orient:horizontal}.x-layout-vbox{-webkit-box-orient:vertical}.x-layout-hbox > .x-layout-box-item{width:0 !important}.x-layout-vbox > .x-layout-box-item{height:0 !important}.x-table-inner{display:table !important;width:100%;height:100%}.x-table-inner.x-table-fixed{table-layout:fixed !important}.x-table-row{display:table-row !important}.x-table-row > *{display:table-cell !important;vertical-align:middle}.x-container,.x-body{display:-webkit-box}.x-body{overflow:hidden;-webkit-box-flex:1;min-width:100%;min-height:100%}.x-body > .x-inner,.x-container > .x-inner{-webkit-box-flex:1;min-width:100%;min-height:100%;position:relative}.x-docking-horizontal{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:horizontal;min-width:100%;min-height:100%}.x-docking-vertical{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:vertical;min-width:100%;min-height:100%}.x-centered{position:absolute !important;width:100%;height:100%;display:-webkit-box;-webkit-box-align:center;-webkit-box-pack:center}.x-floating{position:absolute !important}.x-centered > *{position:relative !important;-webkit-box-flex:0 !important}.x-size-change-detector{visibility:hidden;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;overflow:hidden}.x-size-change-detector > *{visibility:hidden}.x-size-change-detector-shrink > *{width:200%;height:200%}.x-size-change-detector-expand > *{width:100000px;height:100000px}.x-scroll-view{position:relative;display:block}.x-scroll-container{position:absolute;overflow:hidden;width:100%;height:100%}.x-scroll-scroller{position:absolute;min-width:100%;min-height:100%}.x-ios .x-scroll-scroller{-webkit-transform:translate3d(0, 0, 0)}.x-scroll-stretcher{position:absolute;visibility:hidden}.x-scroll-bar-grid-wrapper{position:absolute;width:100%;height:100%}.x-scroll-bar-grid{display:table;width:100%;height:100%}.x-scroll-bar-grid > *{display:table-row}.x-scroll-bar-grid > * > *{display:table-cell}.x-scroll-bar-grid > :first-child > :first-child{width:100%;height:100%}.x-scroll-bar-grid > :first-child > :nth-child(2){padding:3px 3px 0 0}.x-scroll-bar-grid > :nth-child(2) > :first-child{padding:0 0 3px 3px}.x-scroll-bar{position:relative;overflow:hidden}.x-scroll-bar-stretcher{position:absolute;visibility:hidden;width:100%;height:100%}.x-scroll-bar-x{width:100%}.x-scroll-bar-x > .x-scroll-bar-stretcher{width:300%}.x-scroll-bar-x.active{height:6px}.x-scroll-bar-y{height:100%}.x-scroll-bar-y > .x-scroll-bar-stretcher{height:300%}.x-scroll-bar-y.active{width:6px}.x-scroll-indicator{background:#333;position:absolute;z-index:2;opacity:0.5}.x-scroll-indicator.default{-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-list-light .x-scroll-indicator,.x-dataview-light .x-scroll-indicator{background:#fff;opacity:1}.x-scroll-indicator-x{height:100%}.x-scroll-indicator-y{width:100%}.x-scroll-indicator.csstransform{background:none}.x-scroll-indicator.csstransform > *{position:absolute;background-color:#333}.x-scroll-indicator.csstransform > :nth-child(2){-webkit-transform-origin:0% 0%;background:none;content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAxhgAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-light > *{background-color:#eee}.x-scroll-indicator.csstransform.x-scroll-indicator-light > :nth-child(2){content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAvXcAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-y > *{width:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :first-child{height:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :nth-child(2){height:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :last-child{height:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > *{height:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :first-child{width:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :nth-child(2){width:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :last-child{width:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-carousel{position:relative;overflow:hidden}.x-carousel-item{position:absolute;width:100%;height:100%}.x-carousel-item > *{position:absolute;width:100%;height:100%}.x-carousel-indicator{padding:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:none;background-color:transparent;background-image:none}.x-carousel-indicator{-webkit-box-flex:1;display:-webkit-box;display:box;-webkit-box-pack:center;box-pack:center;-webkit-box-align:center;box-align:center}.x-carousel-indicator span{display:block;width:0.5em;height:0.5em;-webkit-border-radius:0.25em;border-radius:0.25em;margin:0.2em}.x-carousel-indicator-horizontal{height:1.5em;width:100%}.x-carousel-indicator-vertical{-webkit-box-orient:vertical;box-orient:vertical;width:1.5em;height:100%}.x-carousel-indicator-light span{background-color:rgba(255, 255, 255, 0.1);background-image:none}.x-carousel-indicator-light span.x-carousel-indicator-active{background-color:rgba(255, 255, 255, 0.3);background-image:none}.x-carousel-indicator-dark span{background-color:rgba(0, 0, 0, 0.1);background-image:none}.x-carousel-indicator-dark span.x-carousel-indicator-active{background-color:rgba(0, 0, 0, 0.3);background-image:none}.x-form .x-scroll-container{background-color:#eeeeee}.x-form .x-scroll-container > .x-inner{padding:1em}.x-form-label{text-shadow:#fff 0 1px 1px;color:#333333;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;padding:0.6em;display:none !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#f7f7f7}.x-form-label span{font-size:.8em;font-weight:bold}.x-field{min-height:2.5em;background:#fff}.x-field .x-field-input{position:relative}.x-field .x-field-input,.x-field .x-input-el{width:100%}.x-field.x-field-labeled .x-form-label{display:block !important}.x-field:last-child{border-bottom:0}.x-label-align-left .x-component-outer,.x-label-align-right .x-component-outer{-webkit-box-flex:1;box-flex:1}.x-label-align-left:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em}.x-label-align-left:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-label-align-right{-webkit-box-direction:reverse;box-direction:reverse}.x-label-align-right:first-child .x-form-label{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-right:last-child{border-bottom:0}.x-label-align-right:last-child .x-form-label{-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-label-align-top,.x-label-align-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-label-align-top:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-bottom:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-input-el{padding:.4em;min-height:2.5em;display:block;border-width:0;background:transparent;-webkit-appearance:none}.x-field-mask{position:absolute;top:0;right:0;bottom:0;left:0}.x-field-required label:after,.x-field-required .x-form-label:after{content:"*";display:inline}.x-item-disabled label:after,.x-item-disabled .x-form-label:after{color:#666 !important}.x-field-textarea textarea{min-height:6em;padding-top:.5em}.x-checkmark-base,.x-field .x-input-radio:after,.x-field .x-input-checkbox:after,.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after,.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after,.x-select-overlay .x-item-selected .x-list-item-label:before,.x-select-overlay .x-item-selected .x-list-item-label:after{content:"";position:absolute;width:1.4em;height:1.4em;top:50%;left:auto;right:1.1em;-webkit-mask-size:1.4em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAE+klEQVRoBe2aS28URxRGsY0h2FmwCQuEWLHjvUNgZAQ4PMwrEkIRIGEgySKwB8QvYIvEP+ANO0CwsJAA88wGBEKBZJUVQkJCQrwJ5nxN31Z5pnpc7e4ZT9vT0peqqanquqfurVvlIW3Dw8NTJtPTPplgxdoCnugeb3m45eEJtgJTJwJPGw8cP8V6TfmC4/Z/H9uEAAZsIdqHZiMBn2UNbvigSw8M2AIAD6PtqBPpmYe+8t1NoL9GLfYf3bTKKhiWo9PoA9KV0dUgn/tRh8tXWg/Hnj0KUB8yz1JNnjXUuhFd264A/f0O7dKXpQ7EIiTPfkKuVyvrSlx3US+KPF26cMbwxeg8Gg3W4LWHFd6rUUepQprQnI/Rh9A25AtjmqseHVkK7w59UxpgYFdg7wH0CwqFpWvyrKI23GZ7OWluwgqwOnqOobVoWh4Tm97DwCpBHUFp2TiUX3v5QV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bdEdOlfR/TJ72AzAaHla5/QD9BnVCucvfK/fjZXtx8WzZneu/+WBf53XOb0G6XetHjQXyfv2vKLyH7qLLqMhJn5DOW5PLmBZDfRUilloGUoD/ovvXgIrT4/rkxt4XK0fw+TtYxhT6iEt4FK7L8D4locDFqnUXSadh78Bx5bEl2CLG+8AAAAASUVORK5CYII=');margin-top:-0.7em}.x-field .x-input-radio,.x-field .x-input-checkbox{position:relative}.x-field .x-input-radio:after,.x-field .x-input-checkbox:after{background-color:#dddddd}.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after{background-color:#006bb6}.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after{background-color:#9abad1}.x-spinner .x-component-outer{display:-webkit-box;display:box}.x-spinner .x-component-outer > *{width:auto}.x-spinner .x-field-input{-webkit-box-flex:1}.x-spinner .x-field-input .x-input-el{-webkit-text-fill-color:#000;width:100%;text-align:center}.x-spinner .x-field-input input::-webkit-outer-spin-button,.x-spinner .x-field-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-spinner.x-item-disabled .x-input-el{-webkit-text-fill-color:#B3B3B3}.x-spinner.x-item-disabled .x-spinner-button{color:#aaa !important}.x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button{border:1px solid #c4c4c4;border-top-color:#d0d0d0;color:black}.x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before{background:#c4c4c4}.x-spinner.x-item-disabled .x-spinner-button,.x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after{background-color:#f7f7f7;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #e5e5e5));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#e5e5e5);background-image:linear-gradient(#ffffff,#ffffff 2%,#e5e5e5)}.x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-spinner.x-item-disabled .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active:after{background-color:#efefef;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d5d5d5), color-stop(10%, #e2e2e2), color-stop(65%, #efefef), color-stop(100%, #f0f0f0));background-image:-webkit-linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0);background-image:linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0)}.x-spinner .x-spinner-button{margin-top:.25em;margin-bottom:.25em;width:2em;padding:.23em 0 .27em;font-weight:bold;text-align:center;border:1px solid #dddddd !important;-webkit-border-radius:1em;border-radius:1em}.x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button{border:1px solid #b7b7b7;border-top-color:#c4c4c4;color:black}.x-spinner .x-spinner-button.x-button-back:before,.x-spinner .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:before{background:#b7b7b7}.x-spinner .x-spinner-button,.x-spinner .x-spinner-button.x-button-back:after,.x-spinner .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:after{background-color:#eaeaea;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #fcfcfc), color-stop(100%, #d8d8d8));background-image:-webkit-linear-gradient(#ffffff,#fcfcfc 2%,#d8d8d8);background-image:linear-gradient(#ffffff,#fcfcfc 2%,#d8d8d8)}.x-spinner .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner .x-spinner-button.x-button-pressing,.x-spinner .x-spinner-button.x-button-pressing:after,.x-spinner .x-spinner-button.x-button-pressed,.x-spinner .x-spinner-button.x-button-pressed:after,.x-spinner .x-spinner-button.x-button-active,.x-spinner .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner .x-spinner-button.x-button-active,.x-toolbar .x-spinner .x-spinner-button.x-button-active:after{background-color:#e2e2e2;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c9c9c9), color-stop(10%, #d5d5d5), color-stop(65%, #e2e2e2), color-stop(100%, #e3e3e3));background-image:-webkit-linear-gradient(#c9c9c9,#d5d5d5 10%,#e2e2e2 65%,#e3e3e3);background-image:linear-gradient(#c9c9c9,#d5d5d5 10%,#e2e2e2 65%,#e3e3e3)}.x-spinner .x-spinner-button-down{margin-left:.25em}.x-spinner .x-spinner-button-up{margin-right:.25em}.x-spinner.x-field-grouped-buttons .x-input-el{text-align:left}.x-spinner.x-field-grouped-buttons .x-spinner-button-down{margin-right:.5em}.x-android .x-spinner-button{padding:.40em 0 .11em !important}.x-phone .x-select-overlay{min-width:14em;min-height:12.5em}.x-select-overlay{min-width:18em;min-height:22em}.x-select-overlay .x-list-item-label{height:2.6em}.x-select-overlay .x-list-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.x-select-overlay .x-item-selected .x-list-label{margin-right:2.6em}.x-select-overlay .x-item-selected .x-list-item-label:before{background-color:rgba(0, 0, 0, 0.3);margin-top:-0.8em}.x-select-overlay .x-item-selected .x-list-item-label:after{background-color:#dddddd}.x-slider-field .x-component-outer,.x-toggle-field .x-component-outer{padding:0.6em}.x-slider,.x-toggle{position:relative;height:2.2em;min-height:0;min-width:0}.x-slider > *,.x-toggle > *{position:absolute;width:100%;height:100%}.x-slider.x-item-disabled{opacity:.6}.x-thumb{position:absolute;height:2.2em;width:2.2em}.x-thumb:before{content:"";position:absolute;width:1.85em;height:1.85em;top:0.175em;left:0.175em;border:1px solid #919191;-webkit-border-radius:0.925em;border-radius:0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #efefef), color-stop(100%, #cbcbcb));background-image:-webkit-linear-gradient(#ffffff,#efefef 2%,#cbcbcb);background-image:linear-gradient(#ffffff,#efefef 2%,#cbcbcb);-webkit-background-clip:padding;background-clip:padding-box}.x-thumb.x-dragging{opacity:1}.x-thumb.x-dragging:before{background-color:#d0d0d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #e2e2e2), color-stop(100%, #bebebe));background-image:-webkit-linear-gradient(#ffffff,#e2e2e2 2%,#bebebe);background-image:linear-gradient(#ffffff,#e2e2e2 2%,#bebebe)}.x-slider:after{content:"";position:absolute;width:auto;height:0.8em;top:0.737em;left:0;right:0;margin:0 0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);border:0.1em solid rgba(0, 0, 0, 0.1);border-bottom:0;-webkit-box-shadow:rgba(255, 255, 255, 0.7) 0 0.1em 0;-webkit-border-radius:0.4em;border-radius:0.4em}.x-toggle{width:4.4em;-webkit-border-radius:1.1em;border-radius:1.1em;overflow:hidden;border:1px solid #b7b7b7;background-color:#ddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);-webkit-box-flex:0}.x-toggle .x-thumb.x-dragging{opacity:1}.x-toggle .x-thumb:before{top:0.175em}.x-toggle-on{background-color:#92cf00;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6e9c00), color-stop(10%, #80b500), color-stop(65%, #92cf00), color-stop(100%, #94d200));background-image:-webkit-linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200);background-image:linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200)}input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}.x-field-number input::-webkit-outer-spin-button,.x-field-number input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-field-search .x-field-input{position:relative}.x-field-search .x-field-input:before{content:"";position:absolute;width:0.86em;height:0.86em;top:50%;left:0.5em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bqKhiUavbVZdo0LCyLl3iHhGEkkZsKBYJX4RISHwQIYIPNJoQlUjTuCakUZ9oVGRF0GywslvqbgkpDarqsn7/6XsmM5n38pzzvtudeZL/nplznvM8z//cz5ktTU5OtuWRUqk0i/qdoAN0gcXgP+CkzIcx8APYBXbi82/SaZFSKGGILiTibnA+GADHgbkgSXZT8CF4GwyDEXxvI92r4k0Yoj1EeAG4CvSDEggRkX8VbID4lhADQXXUwxZgfAF4CGwFmgdFYQJb68HJljjy6mSSJZAZ4CLwESiKZJydb7A/CGblJZVWP5UwzueBB8AfIC7IovO0mK0B89KCzlOWSBinWoBeAkWTstiT3948xJLqxhLG2Xzw4jSRdQ0yiv/upMBD8xsI40Rzdu00k3WknyeO+aHk4urFEb4TJ/80CWEdYB4BhS1kdfswe+zpGNf80RYUIr9QSdgOdNCYCfaLcABpqFxBbymu3FIlDFkdD18B5wRYHaHOJvAeGCU4fa8IdnXUPAaoMZeDk4CvfEKFM7CrhswnbpxjZQX4C7j5Y0m1d64EXc5OWoqeFsPLwTvAYt/p/Iv+6jTb1rLKHMbYgWCjZxCb0T/e6qhWj3o6hz8HRMSRykp17l5WayfksyN8oafzTegfHOLQ1aG+blc6ZGQRdeVawB4GlWno7Pim1G9rB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vdHnDlKR01RQ8OrJMaAp8TnYQUA7SBsEm6pzPXgcyI6PaCG7Hdu6VcVLUkuE5ONBR8ByDGb42sPGteBPEDcV0vK0ZZ2Z5C9oSCcZKzqfwO8OJK2FbCAunqYmrICRQaA3rLRejSvTWtGwTzc94Yj0DQS/O4C05nQd6VYhrIVMpEN6Wqv3crBngY4b582aR9DXgJCFTPt05T+AtKq2jNARzxLs/UBbnY/0onwLO97sXPuwj8cidQn8OuytAe0edjUyuluqh2vIPcNnPS1rIbOKfkRf0pKEGdqSJyFwM/AZ3j+2JGHXpZDWWf4+sMvlpaTal7e3xLYEsdQ4ITIIsras29AppxrKctRM5ZDRLUvv13GnLl1p5yjellylCb5BolvWkRQMgT6g6apXmnVgPWQrc/1/boJCaHVWyukAAAAASUVORK5CYII=');-webkit-mask-size:.86em;background-color:#ccc;-webkit-mask-repeat:no-repeat;margin-top:-0.43em}.x-field-search .x-field-input .x-form-field{margin-left:1.0em}.x-field-input .x-clear-icon{display:none;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADHmlDQ1BJQ0MgUHJvZmlsZQAAeAGFVN9r01AU/tplnbDhizpnEQk+aJFuZFN0Q5y2a1e6zVrqNrchSJumbVyaxiTtfrAH2YtvOsV38Qc++QcM2YNve5INxhRh+KyIIkz2IrOemzRNJ1MDufe73/nuOSfn5F6g+XFa0xQvDxRVU0/FwvzE5BTf8gFeHEMr/GhNi4YWSiZHQA/Tsnnvs/MOHsZsdO5v36v+Y9WalQwR8BwgvpQ1xCLhWaBpXNR0E+DWie+dMTXCzUxzWKcECR9nOG9jgeGMjSOWZjQ1QJoJwgfFQjpLuEA4mGng8w3YzoEU5CcmqZIuizyrRVIv5WRFsgz28B9zg/JfsKiU6Zut5xCNbZoZTtF8it4fOX1wjOYA1cE/Xxi9QbidcFg246M1fkLNJK4RJr3n7nRpmO1lmpdZKRIlHCS8YlSuM2xp5gsDiZrm0+30UJKwnzS/NDNZ8+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/GMyWa5R2qbjlDovDiRCUjtL11QacAAy52yk26CzRM3A4xUJk3piW0Dx2YTtekU2ad9hoHu7u6fXJk0YEbw0hceN91E05M1zX6rm02x/nyeAzle20uGp5Z+qA07jnd0dKS3UjMA84YbgtVhGmms26ZhRXFSQZr6DdljdbY8WcWhyiYA7CXc4zoj51Xe8cCB+Bm0oLNxLWdeSe8AOwcMDXBW/8h2Z7SwlHAE7wPS94p7BeBj2WAJQgk4dZ1vH4R8XetbLrUCu0/hJk+Xyh4lYGbkuAVKtEM4spWUyoAY4nqxGai9pKYFnALdg+eHMRgVi0o0zm2M+W179uzRHjUaAdMq0PsrzJZOxGJhhEoJFox8e9euXcYLIJ6AaROv8wH0Abzqj/ojNN6vKoA9j/n6TnZDL1krwFTC63xQ/CZ+mWs8rxJiToc9p9Bn3/JqWdcM5TjsJqqevOEG6pzFb6cq/WXFAegcfsd03lhnh3ULuwpQwChqtBmFfYw4/1MpV1GIJ8q+hAqHKeqhx6TadwvLynjpC6uYThjA/2SJ9QQjVe4AyvocjvR72Q4/775bWFbe1NQ0AkfxPubfryL+axgT10SlD/rbsep5LQxY2h6qhalADrwahM2AfWjt9wC+BU/7YwdZkXPTaPFv6PiZOxU23jdTXP8VKWC5GF4g4Z0KgG7Gbwt+WwFgM57FeHLTml1gGt/8d7wxvHNmN4Dh7zp+F7nhJuuL6v0/Vc+vwPfknLsAAAAASUVORK5CYII=') no-repeat;background-position:center center;background-size:55% 55%;width:2.2em;height:2.2em;margin:.5em;margin-top:-1.1em;position:absolute;top:50%;right:-0.5em}.x-field-clearable .x-clear-icon{display:block}.x-field-clearable .x-field-input{padding-right:2.2em}.x-android .x-input-el{-webkit-text-fill-color:#000}.x-android .x-empty .x-input-el{-webkit-text-fill-color:#A9A9A9}.x-item-disabled .x-form-label span,.x-item-disabled input,.x-item-disabled .x-input-el,.x-item-disabled .x-spinner-body,.x-item-disabled select,.x-item-disabled textarea,.x-item-disabled .x-field-clear-container{color:#b3b3b3;-webkit-text-fill-color:#b3b3b3;pointer-events:none}.x-form-fieldset{margin:0 0 1.5em}.x-form-fieldset .x-form-label{border-top:1px solid white}.x-form-fieldset .x-form-fieldset-inner{border:1px solid #dddddd;background:#fff;padding:0;-webkit-border-radius:0.4em;border-radius:0.4em;overflow:hidden}.x-form-fieldset .x-field{border-bottom:1px solid #dddddd;background:transparent}.x-form-fieldset .x-field:first-child{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-form-fieldset .x-field:last-child{border-bottom:0;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-form-fieldset-title{text-shadow:#fff 0 1px 1px;color:#333333;margin:1em 0.7em 0.3em;color:#333333;font-weight:bold;white-space:nowrap}.x-form-fieldset-instructions{text-shadow:#fff 0 1px 1px;color:#333333;color:gray;margin:1em 0.7em 0.3em;font-size:.8em;text-align:center}.x-selectmark-base,.x-field-select .x-component-outer:after{content:"";position:absolute;width:1em;height:1em;top:50%;left:auto;right:0.7em;-webkit-mask-size:1em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YX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XBDvG3M1rpAmYYoUrFzr4ZNqTawqm2MH8Dhh7ZXJUbcAUx4FinzBnJcAUl4FhP/jIgRSYKvkYCJaO2LbNv08RMMUy5nsA4COTLy0XYIqtil9iF6aflq7AwBWuAvuQ9ZKSBgNX2ieWjtKSzeXBNZgqfe8J+4W5aXtbcg0GrvibB/BhkeuhBJhigzsghT0veh+WAlMcCGHvMOMQwcCdcIntYy6WmXhIg2PuiAvsEHO97IhHGgzckb4D8L6LmZYPMHBnhiWwXVdDPF9g4A4Vwd66nFr6BAN3ygbbw1yoMzjmjplgB5hrrufSvsHAHesZDOD2JAbxVYCBOzfIAZ9JbR6qAgN3cPwP9kZy1VIlGLiTdluCmoOBO/pnS9Bk8DzmS3pL4BMcpZEe1qX0GI/atC4dQYXRMa1MU0IX4gpWsIIVrGAFK1jBCnYUPwIMAPUPAyFL+nRdAAAAAElFTkSuQmCC');margin-top:-0.5em}.x-field-select{position:relative}.x-field-select .x-component-outer:after{background-color:#dddddd;z-index:2}.x-field-select .x-component-outer:before,.x-field-select .x-component-outer:after{pointer-events:none;position:absolute;display:block}.x-field-select .x-component-outer:before{content:"";position:absolute;width:4em;height:auto;top:0;left:auto;right:0;bottom:0;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;background:-webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(255, 255, 255, 0)), color-stop(0.5, white));z-index:1}.x-msgbox{min-width:15em;max-width:20em;padding:0.8em;margin:.5em;-webkit-box-shadow:rgba(0, 0, 0, 0.4) 0 0.1em 0.5em;-webkit-border-radius:0.3em;border-radius:0.3em;border:0.15em solid #1985d0}.x-msgbox .x-icon{margin-left:1.3em}.x-msgbox .x-title{font-size:.9em;line-height:1.4em}.x-msgbox .x-body{background:transparent !important}.x-msgbox .x-toolbar{background:transparent none;-webkit-box-shadow:none}.x-msgbox .x-toolbar.x-docked-top{border-bottom:0;height:1.3em}.x-msgbox .x-toolbar.x-docked-bottom{border-top:0}.x-msgbox .x-field{min-height:2em;background:#fff;-webkit-border-radius:0.2em;border-radius:0.2em}.x-msgbox .x-form-field{min-height:1.5em;padding-right:0 !important;-webkit-appearance:none}.x-msgbox .x-field-input{padding-right:2.2em}.x-msgbox-text{text-align:center;padding:6px 0;line-height:1.4em}.x-msgbox-buttons{padding:0.4em 0;height:auto}.x-msgbox-buttons .x-button{min-width:4.5em}.x-msgbox-buttons .x-button-normal span{opacity:.7}.x-msgbox-dark .x-msgbox-text{color:rgba(190, 224, 247, 0.9);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-msgbox-dark .x-msgbox-input{background-color:rgba(190, 224, 247, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(144,202,242,0.9)), color-stop(10%, rgba(167,213,244,0.9)), color-stop(65%, rgba(190,224,247,0.9)), color-stop(100%, rgba(192,225,247,0.9)));background-image:-webkit-linear-gradient(rgba(144,202,242,0.9),rgba(167,213,244,0.9) 10%,rgba(190,224,247,0.9) 65%,rgba(192,225,247,0.9));background-image:linear-gradient(rgba(144,202,242,0.9),rgba(167,213,244,0.9) 10%,rgba(190,224,247,0.9) 65%,rgba(192,225,247,0.9));border:0.1em solid rgba(25, 133, 208, 0.9)}.x-loading-spinner{font-size:250%;height:1em;width:1em;position:relative;-webkit-transform-origin:0.5em 0.5em}.x-loading-spinner > span,.x-loading-spinner > span:before,.x-loading-spinner > span:after{display:block;position:absolute;width:0.1em;height:0.25em;top:0;-webkit-transform-origin:0.05em 0.5em;-webkit-border-radius:0.05em;border-radius:0.05em;content:" "}.x-loading-spinner > span.x-loading-top{background-color:rgba(170, 170, 170, 0.99)}.x-loading-spinner > span.x-loading-top::after{background-color:rgba(170, 170, 170, 0.9)}.x-loading-spinner > span.x-loading-left::before{background-color:rgba(170, 170, 170, 0.8)}.x-loading-spinner > span.x-loading-left{background-color:rgba(170, 170, 170, 0.7)}.x-loading-spinner > span.x-loading-left::after{background-color:rgba(170, 170, 170, 0.6)}.x-loading-spinner > span.x-loading-bottom::before{background-color:rgba(170, 170, 170, 0.5)}.x-loading-spinner > span.x-loading-bottom{background-color:rgba(170, 170, 170, 0.4)}.x-loading-spinner > span.x-loading-bottom::after{background-color:rgba(170, 170, 170, 0.35)}.x-loading-spinner > span.x-loading-right::before{background-color:rgba(170, 170, 170, 0.3)}.x-loading-spinner > span.x-loading-right{background-color:rgba(170, 170, 170, 0.25)}.x-loading-spinner > span.x-loading-right::after{background-color:rgba(170, 170, 170, 0.2)}.x-loading-spinner > span.x-loading-top::before{background-color:rgba(170, 170, 170, 0.15)}.x-loading-spinner > span{left:50%;margin-left:-0.05em}.x-loading-spinner > span.x-loading-top{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg)}.x-loading-spinner > span.x-loading-right{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.x-loading-spinner > span.x-loading-bottom{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg)}.x-loading-spinner > span.x-loading-left{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg)}.x-loading-spinner > span::before{-webkit-transform:rotate(30deg);-moz-transform:rotate(30deg)}.x-loading-spinner > span::after{-webkit-transform:rotate(-30deg);-moz-transform:rotate(-30deg)}.x-loading-spinner{-webkit-animation-name:x-loading-spinner-rotate;-webkit-animation-duration:.5s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}@-webkit-keyframes x-loading-spinner-rotate{0%{-webkit-transform:rotate(0deg)}8.32%{-webkit-transform:rotate(0deg)}8.33%{-webkit-transform:rotate(30deg)}16.65%{-webkit-transform:rotate(30deg)}16.66%{-webkit-transform:rotate(60deg)}24.99%{-webkit-transform:rotate(60deg)}25%{-webkit-transform:rotate(90deg)}33.32%{-webkit-transform:rotate(90deg)}33.33%{-webkit-transform:rotate(120deg)}41.65%{-webkit-transform:rotate(120deg)}41.66%{-webkit-transform:rotate(150deg)}49.99%{-webkit-transform:rotate(150deg)}50%{-webkit-transform:rotate(180deg)}58.32%{-webkit-transform:rotate(180deg)}58.33%{-webkit-transform:rotate(210deg)}66.65%{-webkit-transform:rotate(210deg)}66.66%{-webkit-transform:rotate(240deg)}74.99%{-webkit-transform:rotate(240deg)}75%{-webkit-transform:rotate(270deg)}83.32%{-webkit-transform:rotate(270deg)}83.33%{-webkit-transform:rotate(300deg)}91.65%{-webkit-transform:rotate(300deg)}91.66%{-webkit-transform:rotate(330deg)}100%{-webkit-transform:rotate(330deg)}} diff --git a/sencha/examples/subscribe/app.js b/sencha/examples/subscribe/app.js new file mode 100644 index 000000000..c09e3de06 --- /dev/null +++ b/sencha/examples/subscribe/app.js @@ -0,0 +1,69 @@ +var pubnub = PUBNUB({ + publish_key : 'demo', + subscribe_key : 'demo', + ssl : false, + origin : 'pubsub.pubnub.com' +}); + + +Ext.application({ + launch: function () { + var myStore = Ext.create('Ext.data.Store', { + storeId: 'list', + fields: ['txt'] + }); // create() + + Ext.create('Ext.List', { + fullscreen: true, + store: 'list', + itemTpl: '{txt}', + items: [{ + xtype: 'titlebar', + docked: 'top', + items: [ + { + xtype: 'textfield', + label: 'Channel', + name: 'channel', + id: 'channel', + align: 'left', + }, + { + text: 'Subscribe', + align: 'left', + handler: function () { + var channel = Ext.getCmp('channel').getValue() || 'sencha-demo-channel'; + myStore.removeAll(); + pubnub.subscribe({ + channel: channel, + callback: function(message){ + myStore.insert(0,{txt : JSON.stringify(message)}); + } + }); + } + }, + { + xtype: 'textfield', + label: 'Message', + name: 'message', + id: 'message', + align: 'right' + }, + { + text: 'Publish', + align: 'right', + handler: function () { + var channel = Ext.getCmp('channel').getValue() || 'sencha-demo-channel'; + var message = Ext.getCmp('message').getValue() || 'default-dummy-message'; + pubnub.publish({ + channel: channel, + message: message + }); + } + } + ] + }] + }); + } +}); + diff --git a/sencha/examples/subscribe/index.html b/sencha/examples/subscribe/index.html new file mode 100644 index 000000000..e843402c4 --- /dev/null +++ b/sencha/examples/subscribe/index.html @@ -0,0 +1,65 @@ + + + + + history + + + + + + + + +
+
+
+
+
+ + diff --git a/sencha/examples/subscribe/sencha-touch-all.js b/sencha/examples/subscribe/sencha-touch-all.js new file mode 100644 index 000000000..3b08d5862 --- /dev/null +++ b/sencha/examples/subscribe/sencha-touch-all.js @@ -0,0 +1,32 @@ +/* +This file is part of Sencha Touch 2.0 + +Copyright (c) 2011-2012 Sencha Inc + +Contact: http://www.sencha.com/contact + +Commercial Usage +Licensees holding valid commercial licenses may use this file in accordance with the Commercial +Software License Agreement provided with the Software or, alternatively, in accordance with the +terms contained in a written agreement between you and Sencha. + +If you are unsure which license is appropriate for your use, please contact the sales department +at http://www.sencha.com/contact. + +Build date: 2012-06-04 15:34:28 (d81f71da2d56f5f71419dc892fbc85685098c6b7) +*/ +/* + +This file is part of Sencha Touch 2 + +Copyright (c) 2012 Sencha Inc + +Contact: http://www.sencha.com/contact + +Commercial Usage +Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha. + +If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. + +*/ +(function(){var global=this,objectPrototype=Object.prototype,toString=objectPrototype.toString,enumerables=true,enumerablesTest={toString:1},emptyFn=function(){},i;if(typeof Ext==="undefined"){global.Ext={}}Ext.global=global;for(i in enumerablesTest){enumerables=null}if(enumerables){enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=enumerables;Ext.apply=function(object,config,defaults){if(defaults){Ext.apply(object,defaults)}if(object&&config&&typeof config==="object"){var i,j,k;for(i in config){object[i]=config[i]}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(config.hasOwnProperty(k)){object[k]=config[k]}}}}return object};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:emptyFn,baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(object,config){var property;if(object){for(property in config){if(object[property]===undefined){object[property]=config[property]}}}return object},iterate:function(object,fn,scope){if(Ext.isEmpty(object)){return}if(scope===undefined){scope=object}if(Ext.isIterable(object)){Ext.Array.each.call(Ext.Array,object,fn,scope)}else{Ext.Object.each.call(Ext.Object,object,fn,scope)}}});Ext.apply(Ext,{extend:function(){var objectConstructor=objectPrototype.constructor,inlineOverrides=function(o){for(var m in o){if(!o.hasOwnProperty(m)){continue}this[m]=o[m]}};return function(subclass,superclass,overrides){if(Ext.isObject(superclass)){overrides=superclass;superclass=subclass;subclass=overrides.constructor!==objectConstructor?overrides.constructor:function(){superclass.apply(this,arguments)}}var F=function(){},subclassProto,superclassProto=superclass.prototype;F.prototype=superclassProto;subclassProto=subclass.prototype=new F();subclassProto.constructor=subclass;subclass.superclass=superclassProto;if(superclassProto.constructor===objectConstructor){superclassProto.constructor=superclass}subclass.override=function(overrides){Ext.override(subclass,overrides)};subclassProto.override=inlineOverrides;subclassProto.proto=subclassProto;subclass.override(overrides);subclass.extend=function(o){return Ext.extend(subclass,o)};return subclass}}(),override:function(cls,overrides){if(cls.$isClass){return cls.override(overrides)}else{Ext.apply(cls.prototype,overrides)}}});Ext.apply(Ext,{valueFrom:function(value,defaultValue,allowBlank){return Ext.isEmpty(value,allowBlank)?defaultValue:value},typeOf:function(value){if(value===null){return"null"}var type=typeof value;if(type==="undefined"||type==="string"||type==="number"||type==="boolean"){return type}var typeToString=toString.call(value);switch(typeToString){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(type==="function"){return"function"}if(type==="object"){if(value.nodeType!==undefined){if(value.nodeType===3){return(/\S/).test(value.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(value,allowEmptyString){return(value===null)||(value===undefined)||(!allowEmptyString?value==="":false)||(Ext.isArray(value)&&value.length===0)},isArray:("isArray" in Array)?Array.isArray:function(value){return toString.call(value)==="[object Array]"},isDate:function(value){return toString.call(value)==="[object Date]"},isObject:(toString.call(null)==="[object Object]")?function(value){return value!==null&&value!==undefined&&toString.call(value)==="[object Object]"&&value.ownerDocument===undefined}:function(value){return toString.call(value)==="[object Object]"},isSimpleObject:function(value){return value instanceof Object&&value.constructor===Object},isPrimitive:function(value){var type=typeof value;return type==="string"||type==="number"||type==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(value){return toString.call(value)==="[object Function]"}:function(value){return typeof value==="function"},isNumber:function(value){return typeof value==="number"&&isFinite(value)},isNumeric:function(value){return !isNaN(parseFloat(value))&&isFinite(value)},isString:function(value){return typeof value==="string"},isBoolean:function(value){return typeof value==="boolean"},isElement:function(value){return value?value.nodeType===1:false},isTextNode:function(value){return value?value.nodeName==="#text":false},isDefined:function(value){return typeof value!=="undefined"},isIterable:function(value){return(value&&typeof value!=="string")?value.length!==undefined:false}});Ext.apply(Ext,{clone:function(item){if(item===null||item===undefined){return item}if(item.nodeType&&item.cloneNode){return item.cloneNode(true)}var type=toString.call(item);if(type==="[object Date]"){return new Date(item.getTime())}var i,j,k,clone,key;if(type==="[object Array]"){i=item.length;clone=[];while(i--){clone[i]=Ext.clone(item[i])}}else{if(type==="[object Object]"&&item.constructor===Object){clone={};for(key in item){clone[key]=Ext.clone(item[key])}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];clone[k]=item[k]}}}}return clone||item},getUniqueGlobalNamespace:function(){var uniqueGlobalNamespace=this.uniqueGlobalNamespace;if(uniqueGlobalNamespace===undefined){var i=0;do{uniqueGlobalNamespace="ExtBox"+(++i)}while(Ext.global[uniqueGlobalNamespace]!==undefined);Ext.global[uniqueGlobalNamespace]=Ext;this.uniqueGlobalNamespace=uniqueGlobalNamespace}return uniqueGlobalNamespace},functionFactory:function(){var args=Array.prototype.slice.call(arguments),ln=args.length;if(ln>0){args[ln-1]="var Ext=window."+this.getUniqueGlobalNamespace()+";"+args[ln-1]}return Function.prototype.constructor.apply(Function.prototype,args)},globalEval:("execScript" in global)?function(code){global.execScript(code)}:function(code){(function(){eval(code)})()},});Ext.type=Ext.typeOf})();(function(){var a="4.1.0",b;Ext.Version=b=Ext.extend(Object,{constructor:function(d){var c=this.toNumber,f,e;if(d instanceof b){return d}this.version=this.shortVersion=String(d).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");e=this.version.search(/([^\d\.])/);if(e!==-1){this.release=this.version.substr(e,d.length);this.shortVersion=this.version.substr(0,e)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");f=this.version.split(".");this.major=c(f.shift());this.minor=c(f.shift());this.patch=c(f.shift());this.build=c(f.shift());return this},toNumber:function(c){c=parseInt(c||0,10);if(isNaN(c)){c=0}return c},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(g,f){var d,e,c;g=new b(g).toArray();f=new b(f).toArray();for(c=0;ce){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,f,d){if(b.compare(Ext.getVersion(c),e)<1){f.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,htmlEncode:(function(){var d={"&":"&",">":">","<":"<",'"':"""},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){return d[f]})}})(),htmlDecode:(function(){var d={"&":"&",">":">","<":"<",""":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){if(f in d){return d[f]}else{return String.fromCharCode(parseInt(f.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.lengthH){for(C=e;C--;){F[z+C]=F[H+C]}}}if(J&&G===B){F.length=B;F.push.apply(F,I)}else{F.length=B+J;for(C=0;C-1;y--){if(A.call(z||C[y],C[y],y,C)===false){return y}}}return true},forEach:i?function(z,y,e){return z.forEach(y,e)}:function(B,z,y){var e=0,A=B.length;for(;ee){e=z}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(B){var y=0,e,A,z;for(e=0,A=B.length;e=c){f+=c}else{if(b*2<-c){f-=c}}}return Ext.Number.constrain(f,d,g)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var a=function(){};var b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,j,d){var c=b.toQueryObjects,h=[],f,g;if(Ext.isArray(j)){for(f=0,g=j.length;f0){h=n.split("=");v=decodeURIComponent(h[0]);m=(h[1]!==undefined)?decodeURIComponent(h[1]):"";if(!q){if(t.hasOwnProperty(v)){if(!Ext.isArray(t[v])){t[v]=[t[v]]}t[v].push(m)}else{t[v]=m}}else{g=v.match(/(\[):?([^\]]*)\]/g);s=v.match(/^([^\[]+)/);v=s[0];k=[];if(g===null){t[v]=m;continue}for(o=0,c=g.length;o0){return setTimeout(e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){if(!d){d=this}if(!c){c=Array.prototype.slice.call(arguments)}if(a){clearTimeout(a);a=null}a=setTimeout(function(){e.apply(d,c)},b)}},createThrottled:function(e,b,d){var f,a,c,h,g=function(){e.apply(d||this,c);f=new Date().getTime()};return function(){a=new Date().getTime()-f;c=arguments;clearTimeout(h);if(!f||(a>=b)){g()}else{h=setTimeout(g,b-a)}}},interceptBefore:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){var e=c.apply(this,arguments);d.apply(this,arguments);return e}},interceptAfter:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){d.apply(this,arguments);return c.apply(this,arguments)}}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i0){for(d=0;d0){if(l===k){return n[l]}m=n[l];k=k.substring(l.length+1)}if(m.length>0){m+="/"}return m.replace(/\/\.\//g,"/")+k.replace(/\./g,"/")+".js"},getPrefix:function(l){var n=this.config.paths,m,k="";if(n.hasOwnProperty(l)){return l}for(m in n){if(n.hasOwnProperty(m)&&m+"."===l.substring(0,m.length+1)){if(m.length>k.length){k=m}}}return k},require:function(m,l,k,n){if(l){l.call(k)}},syncRequire:function(){},exclude:function(l){var k=this;return{require:function(o,n,m){return k.require(o,n,m,l)},syncRequire:function(o,n,m){return k.syncRequire(o,n,m,l)}}},onReady:function(n,m,o,k){var l;if(o!==false&&Ext.onDocumentReady){l=n;n=function(){Ext.onDocumentReady(l,m,k)}}n.call(m)}};Ext.apply(b,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isClassFileLoaded:{},isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},syncModeEnabled:false,scriptElements:{},refreshQueue:function(){var k=this.queue,q=k.length,n,p,l,o,m;if(q===0){this.triggerReady();return}for(n=0;nthis.numLoadedFiles){continue}l=0;do{if(a.isCreated(o[l])){f(o,l,1)}else{l++}}while(l=200&&n<300)||n==304||(n==0&&q.length>0)){Ext.globalEval(q+"\n//@ sourceURL="+l);s.call(w)}else{}u=null}},syncRequire:function(){var k=this.syncModeEnabled;if(!k){this.syncModeEnabled=true}this.require.apply(this,arguments);if(!k){this.syncModeEnabled=false}this.refreshQueue()},require:function(F,t,n,q){var v={},m={},y=this.queue,C=this.classNameToFilePathMap,A=this.isClassFileLoaded,s=[],H=[],E=[],l=[],r,G,x,w,k,p,D,B,z,u,o;if(q){q=h(q);for(B=0,u=q.length;B0){s=a.getNamesByExpression(k);for(z=0,o=s.length;z0){r=function(){var K=[],J,L,I;for(J=0,L=l.length;J0){H=a.getNamesByExpression(w);o=H.length;for(z=0;z0){if(!this.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((E.length>1)?"es":"")+": "+E.join(", "))}}else{r.call(n);return this}G=this.syncModeEnabled;if(!G){y.push({requires:E.slice(),callback:r,scope:n})}u=E.length;for(B=0;B=2){if("1496x2048" in r){e(r["1496x2048"],"(orientation: landscape)")}if("1536x2008" in r){e(r["1536x2008"],"(orientation: portrait)")}}else{if("748x1024" in r){e(r["748x1024"],"(orientation: landscape)")}if("768x1004" in r){e(r["768x1004"],"(orientation: portrait)")}}}else{if(o>=2&&Ext.os.version.gtEq("4.3")){e(r["640x920"])}else{e(r["320x460"])}}},application:function(b){var a=b.name,e,d,c;if(!b){b={}}if(!Ext.Loader.config.paths[a]){Ext.Loader.setPath(a,b.appFolder||"app")}c=Ext.Array.from(b.requires);b.requires=["Ext.app.Application"];e=b.onReady;d=b.scope;b.onReady=function(){b.requires=c;new Ext.app.Application(b);if(e){e.call(d)}};Ext.setup(b)},factoryConfig:function(a,l){var g=Ext.isSimpleObject(a);if(g&&a.xclass){var f=a.xclass;delete a.xclass;Ext.require(f,function(){Ext.factoryConfig(a,function(i){l(Ext.create(f,i))})});return}var d=Ext.isArray(a),m=[],k,j,c,e;if(g||d){if(g){for(k in a){if(a.hasOwnProperty(k)){j=a[k];if(Ext.isSimpleObject(j)||Ext.isArray(j)){m.push(k)}}}}else{for(c=0,e=a.length;c=e){l(a);return}k=m[c];j=a[k];Ext.factoryConfig(j,h)}b();return}l(a)},factory:function(b,e,a,f){var d=Ext.ClassManager,c;if(!b||b.isInstance){if(a&&a!==b){a.destroy()}return b}if(f){if(typeof b=="string"){return d.instantiateByAlias(f+"."+b)}else{if(Ext.isObject(b)&&"type" in b){return d.instantiateByAlias(f+"."+b.type,b)}}}if(b===true){return a||d.instantiate(e)}if("xtype" in b){c=d.instantiateByAlias("widget."+b.xtype,b)}else{if("xclass" in b){c=d.instantiate(b.xclass,b)}}if(c){if(a){a.destroy()}return c}if(a){return a.setConfig(b)}return d.instantiate(e,b)},deprecateClassMember:function(b,c,a,d){return this.deprecateProperty(b.prototype,c,a,d)},deprecateClassMembers:function(b,c){var d=b.prototype,e,a;for(e in c){if(c.hasOwnProperty(e)){a=c[e];this.deprecateProperty(d,e,a)}}},deprecateProperty:function(b,c,a,d){if(!d){d="'"+c+"' is deprecated"}if(a){d+=", please use '"+a+"' instead"}if(a){Ext.Object.defineProperty(b,c,{get:function(){return this[a]},set:function(e){this[a]=e},configurable:true})}},deprecatePropertyValue:function(b,a,d,c){Ext.Object.defineProperty(b,a,{get:function(){return d},configurable:true})},deprecateMethod:function(b,a,d,c){b[a]=function(){if(d){return d.apply(this,arguments)}}},deprecateClassMethod:function(a,b,h,d){if(typeof b!="string"){var g,f;for(g in b){if(b.hasOwnProperty(g)){f=b[g];Ext.deprecateClassMethod(a,g,f)}}return}var c=typeof h=="string",e;if(!d){d="'"+b+"()' is deprecated, please use '"+(c?h:h.name)+"()' instead"}if(c){e=function(){return this[h].apply(this,arguments)}}else{e=function(){return h.apply(this,arguments)}}if(b in a.prototype){Ext.Object.defineProperty(a.prototype,b,{value:null,writable:true,configurable:true})}a.addMember(b,e)},isReady:false,readyListeners:[],triggerReady:function(){var b=Ext.readyListeners,a,c,d;if(!Ext.isReady){Ext.isReady=true;for(a=0,c=b.length;a0){return b+Ext.String.capitalize(a)}return a}},function(){var a=Ext.browser=new this(Ext.global.navigator.userAgent)});Ext.define("Ext.env.OS",{requires:["Ext.Version"],statics:{names:{ios:"iOS",android:"Android",webos:"webOS",blackberry:"BlackBerry",rimTablet:"RIMTablet",mac:"MacOS",win:"Windows",linux:"Linux",bada:"Bada",other:"Other"},prefixes:{ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"}},is:Ext.emptyFn,name:null,version:null,setFlag:function(a,b){if(typeof b=="undefined"){b=true}this.is[a]=b;this.is[a.toLowerCase()]=b;return this},constructor:function(m,b){var k=this.statics(),j=k.names,c=k.prefixes,a,h="",d,g,f,l,e;e=this.is=function(i){return this.is[i]===true};for(d in c){if(c.hasOwnProperty(d)){g=c[d];f=m.match(new RegExp("(?:"+g+")([^\\s;]+)"));if(f){a=j[d];if(f[1]&&(f[1]=="HTC_"||f[1]=="Silk/")){h=new Ext.Version("2.3")}else{h=new Ext.Version(f[f.length-1])}break}}}if(!a){a=j[(m.toLowerCase().match(/mac|win|linux/)||["other"])[0]];h=new Ext.Version("")}this.name=a;this.version=h;if(b){this.setFlag(b)}this.setFlag(a);if(h){this.setFlag(a+(h.getMajor()||""));this.setFlag(a+h.getShortVersion())}for(d in j){if(j.hasOwnProperty(d)){l=j[d];if(!e.hasOwnProperty(a)){this.setFlag(l,(a===l))}}}return this}},function(){var a=Ext.global.navigator,e=a.userAgent,b,g,d;Ext.os=b=new this(e,a.platform);g=b.name;var c=window.location.search.match(/deviceType=(Tablet|Phone)/),f=window.deviceType;if(c&&c[1]){d=c[1]}else{if(f==="iPhone"){d="Phone"}else{if(f==="iPad"){d="Tablet"}else{if(!b.is.Android&&!b.is.iOS&&/Windows|Linux|MacOS/.test(g)){d="Desktop"}else{if(b.is.iPad||b.is.Android3||(b.is.Android4&&e.search(/mobile/i)==-1)){d="Tablet"}else{d="Phone"}}}}}b.setFlag(d,true);b.deviceType=d});Ext.define("Ext.env.Feature",{requires:["Ext.env.Browser","Ext.env.OS"],constructor:function(){this.testElements={};this.has=function(a){return !!this.has[a]};return this},getTestElement:function(a,b){if(a===undefined){a="div"}else{if(typeof a!=="string"){return a}}if(b){return document.createElement(a)}if(!this.testElements[a]){this.testElements[a]=document.createElement(a)}return this.testElements[a]},isStyleSupported:function(c,b){var d=this.getTestElement(b).style,a=Ext.String.capitalize(c);if(typeof d[c]!=="undefined"||typeof d[Ext.browser.getStylePrefix(c)+a]!=="undefined"){return true}return false},isEventSupported:function(c,a){if(a===undefined){a=window}var e=this.getTestElement(a),b="on"+c.toLowerCase(),d=(b in e);if(!d){if(e.setAttribute&&e.removeAttribute){e.setAttribute(b,"");d=typeof e[b]==="function";if(typeof e[b]!=="undefined"){e[b]=undefined}e.removeAttribute(b)}}return d},getSupportedPropertyName:function(b,a){var c=Ext.browser.getVendorProperyName(a);if(c in b){return c}else{if(a in b){return a}}return null},registerTest:Ext.Function.flexSetter(function(a,b){this.has[a]=b.call(this);return this})},function(){Ext.feature=new this;var a=Ext.feature.has;Ext.feature.registerTest({Canvas:function(){var b=this.getTestElement("canvas");return !!(b&&b.getContext&&b.getContext("2d"))},Svg:function(){var b=document;return !!(b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)},Vml:function(){var c=this.getTestElement(),b=false;c.innerHTML="";b=(c.childNodes.length===1);c.innerHTML="";return b},Touch:function(){return this.isEventSupported("touchstart")&&!(Ext.os&&Ext.os.name.match(/Windows|MacOS|Linux/))},Orientation:function(){return("orientation" in window)&&this.isEventSupported("orientationchange")},OrientationChange:function(){return this.isEventSupported("orientationchange")},DeviceMotion:function(){return this.isEventSupported("devicemotion")},Geolocation:function(){return"geolocation" in window.navigator},SqlDatabase:function(){return"openDatabase" in window},WebSockets:function(){return"WebSocket" in window},Range:function(){return !!document.createRange},CreateContextualFragment:function(){var b=!!document.createRange?document.createRange():false;return b&&!!b.createContextualFragment},History:function(){return("history" in window&&"pushState" in window.history)},CssTransforms:function(){return this.isStyleSupported("transform")},Css3dTransforms:function(){return this.has("CssTransforms")&&this.isStyleSupported("perspective")&&!Ext.os.is.Android2},CssAnimations:function(){return this.isStyleSupported("animationName")},CssTransitions:function(){return this.isStyleSupported("transitionProperty")},Audio:function(){return !!this.getTestElement("audio").canPlayType},Video:function(){return !!this.getTestElement("video").canPlayType},ClassList:function(){return"classList" in this.getTestElement()}})});Ext.define("Ext.dom.Query",{select:function(h,b){var g=[],d,f,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}h=h.split(",");for(f=0,c=h.length;f")}else{c.push(">");if((h=d.tpl)){h.applyOut(d.tplData,c)}if((h=d.html)){c.push(h)}if((h=d.cn||d.children)){g.generateMarkup(h,c)}f=g.closeTags;c.push(f[a]||(f[a]=""))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(a,b){Ext.fly(a).applyStyles(b)},createContextualFragment:function(c){var f=document.createElement("div"),a=document.createDocumentFragment(),b=0,d,e;f.innerHTML=c;e=f.childNodes;d=e.length;for(;b0){this.id=b=a.id}else{a.id=b=this.mixins.identifiable.getUniqueId.call(this)}this.self.cache[b]=this}return b},setId:function(c){var a=this.id,b=this.self.cache;if(a){delete b[a]}this.dom.id=c;this.id=c;b[c]=this;return this},setHtml:function(a){this.dom.innerHTML=a},getHtml:function(){return this.dom.innerHTML},setText:function(a){this.dom.textContent=a},redraw:function(){var b=this.dom,a=b.style;a.display="none";b.offsetHeight;a.display=""},isPainted:function(){var a=this.dom;return Boolean(a&&a.offsetParent)},set:function(a,b){var e=this.dom,c,d;for(c in a){if(a.hasOwnProperty(c)){d=a[c];if(c=="style"){this.applyStyles(d)}else{if(c=="cls"){e.className=d}else{if(b!==false){if(d===undefined){e.removeAttribute(c)}else{e.setAttribute(c,d)}}else{e[c]=d}}}}}return this},is:function(a){return Ext.DomQuery.is(this.dom,a)},getValue:function(b){var a=this.dom.value;return b?parseInt(a,10):a},getAttribute:function(a,b){var c=this.dom;return c.getAttributeNS(b,a)||c.getAttribute(b+":"+a)||c.getAttribute(a)||c[a]},destroy:function(){this.isDestroyed=true;var a=Ext.Element.cache,b=this.dom;if(b&&b.parentNode&&b.tagName!="BODY"){b.parentNode.removeChild(b)}delete a[this.id];delete this.dom}},function(a){Ext.elements=Ext.cache=a.cache;this.addStatics({Fly:new Ext.Class({extend:a,constructor:function(b){this.dom=b}}),_flyweights:{},fly:function(e,c){var f=null,d=a._flyweights,b;c=c||"_global";e=Ext.getDom(e);if(e){f=d[c]||(d[c]=new a.Fly());f.dom=e;f.isSynchronized=false;b=Ext.cache[e.id];if(b&&b.isElement){b.isSynchronized=false}}return f}});Ext.get=function(b){return a.get.call(a,b)};Ext.fly=function(){return a.fly.apply(a,arguments)};Ext.ClassManager.onCreated(function(){a.mixin("observable",Ext.mixin.Observable)},null,"Ext.mixin.Observable")});Ext.dom.Element.addStatics({numberRe:/\d+$/,unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(Ext.isNumber(b)||this.numberRe.test(b)){return b+(a||this.defaultUnit||"px")}else{if(!this.unitRe.test(b)){return b||""}}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(b){if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:c[0]||0,right:c[1]||0,bottom:c[2]||0,left:c[3]||0}},unitizeBox:function(c,a){var b=this;c=b.parseBox(c);return b.addUnits(c.top,a)+" "+b.addUnits(c.right,a)+" "+b.addUnits(c.bottom,a)+" "+b.addUnits(c.left,a)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});Ext.dom.Element.addMembers({appendChild:function(a){this.dom.appendChild(Ext.getDom(a));return this},removeChild:function(a){this.dom.removeChild(Ext.getDom(a));return this},append:function(){this.appendChild.apply(this,arguments)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b){var a=Ext.getDom(b),d=this.dom,c=d.firstChild;if(!c){d.appendChild(a)}else{d.insertBefore(a,c)}return this},insertSibling:function(e,c,d){var f=this,b,a=(c||"before").toLowerCase()=="after",g;if(Ext.isArray(e)){g=f;Ext.each(e,function(h){b=Ext.fly(g,"_internal").insertSibling(h,c,d);if(a){g=b}});return b}e=e||{};if(e.nodeType||e.dom){b=f.dom.parentNode.insertBefore(Ext.getDom(e),a?f.dom.nextSibling:f.dom);if(!d){b=Ext.get(b)}}else{if(a&&!f.dom.nextSibling){b=Ext.core.DomHelper.append(f.dom.parentNode,e,!d)}else{b=Ext.core.DomHelper[a?"insertAfter":"insertBefore"](f.dom,e,!d)}}return b},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.Element.addToCache(b.isFlyweight?new Ext.dom.Element(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(b,c){var e=this.dom,f=this.self.create(b,c),d=(c)?f:f.dom,a=e.parentNode;if(a){a.insertBefore(d,e)}d.appendChild(e);return f},wrapAllChildren:function(a){var d=this.dom,b=d.childNodes,e=this.self.create(a),c=e.dom;while(b.length>0){c.appendChild(d.firstChild)}d.appendChild(c);return e},unwrapAllChildren:function(){var c=this.dom,b=c.childNodes,a=c.parentNode;if(a){while(b.length>0){a.insertBefore(c,c.firstChild)}this.destroy()}},unwrap:function(){var c=this.dom,a=c.parentNode,b;if(a){b=a.parentNode;b.insertBefore(c,a);b.removeChild(a)}else{b=document.createDocumentFragment();b.appendChild(c)}return this},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});Ext.dom.Element.override({getX:function(a){return this.getXY(a)[0]},getY:function(a){return this.getXY(a)[1]},getXY:function(){var a=window.webkitConvertPointFromNodeToPage;if(a){return function(){var b=a(this.dom,new WebKitPoint(0,0));return[b.x,b.y]}}else{return function(){var c=this.dom.getBoundingClientRect(),b=Math.round;return[b(c.left+window.pageXOffset),b(c.top+window.pageYOffset)]}}}(),getOffsetsTo:function(a){var c=this.getXY(),b=Ext.fly(a,"_internal").getXY();return[c[0]-b[0],c[1]-b[1]]},setX:function(a){return this.setXY([a,this.getY()])},setY:function(a){return this.setXY([this.getX(),a])},setXY:function(d){var b=this;if(arguments.length>1){d=[d,arguments[1]]}var c=b.translatePoints(d),a=b.dom.style;for(d in c){if(!c.hasOwnProperty(d)){continue}if(!isNaN(c[d])){a[d]=c[d]+"px"}}return b},getLeft:function(){return parseInt(this.getStyle("left"),10)||0},getRight:function(){return parseInt(this.getStyle("right"),10)||0},getTop:function(){return parseInt(this.getStyle("top"),10)||0},getBottom:function(){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(a,g){g=isNaN(a[1])?g:a[1];a=isNaN(a[0])?a:a[0];var d=this,e=d.isStyle("position","relative"),f=d.getXY(),b=parseInt(d.getStyle("left"),10),c=parseInt(d.getStyle("top"),10);b=!isNaN(b)?b:(e?0:d.dom.offsetLeft);c=!isNaN(c)?c:(e?0:d.dom.offsetTop);return{left:(a-f[0]+b),top:(g-f[1]+c)}},setBox:function(d){var c=this,b=d.width,a=d.height,f=d.top,e=d.left;if(e!==undefined){c.setLeft(e)}if(f!==undefined){c.setTop(f)}if(b!==undefined){c.setWidth(b)}if(a!==undefined){c.setHeight(a)}return this},getBox:function(g,j){var h=this,e=h.dom,c=e.offsetWidth,k=e.offsetHeight,n,f,d,a,m,i;if(!j){n=h.getXY()}else{if(g){n=[0,0]}else{n=[parseInt(h.getStyle("left"),10)||0,parseInt(h.getStyle("top"),10)||0]}}if(!g){f={x:n[0],y:n[1],0:n[0],1:n[1],width:c,height:k}}else{d=h.getBorderWidth.call(h,"l")+h.getPadding.call(h,"l");a=h.getBorderWidth.call(h,"r")+h.getPadding.call(h,"r");m=h.getBorderWidth.call(h,"t")+h.getPadding.call(h,"t");i=h.getBorderWidth.call(h,"b")+h.getPadding.call(h,"b");f={x:n[0]+d,y:n[1]+m,0:n[0]+d,1:n[1]+m,width:c-(d+a),height:k-(m+i)}}f.left=f.x;f.top=f.y;f.right=f.x+f.width;f.bottom=f.y+f.height;return f},getPageBox:function(e){var g=this,c=g.dom,j=c.offsetWidth,f=c.offsetHeight,m=g.getXY(),k=m[1],a=m[0]+j,i=m[1]+f,d=m[0];if(!c){return new Ext.util.Region()}if(e){return new Ext.util.Region(k,a,i,d)}else{return{left:d,top:k,width:j,height:f,right:a,bottom:i}}}});Ext.dom.Element.addMembers({WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",VISIBILITY:1,DISPLAY:2,OFFSETS:3,SEPARATOR:"-",trimRe:/^\s+|\s+$/g,wordsRe:/\w/g,spacesRe:/\s+/,styleSplitRe:/\s*(?::|;)\s*/,transparentRe:/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,classNameSplitRegex:/[\s]+/,borders:{t:"border-top-width",r:"border-right-width",b:"border-bottom-width",l:"border-left-width"},paddings:{t:"padding-top",r:"padding-right",b:"padding-bottom",l:"padding-left"},margins:{t:"margin-top",r:"margin-right",b:"margin-bottom",l:"margin-left"},defaultUnit:"px",isSynchronized:false,synchronize:function(){var g=this.dom,a={},d=g.className,f,c,e,b;if(d.length>0){f=g.className.split(this.classNameSplitRegex);for(c=0,e=f.length;c0?a:0},getWidth:function(a){var c=this.dom,b=a?(c.clientWidth-this.getPadding("lr")):c.offsetWidth;return b>0?b:0},getBorderWidth:function(a){return this.addStyles(a,this.borders)},getPadding:function(a){return this.addStyles(a,this.paddings)},applyStyles:function(d){if(d){var e=this.dom,c,b,a;if(typeof d=="function"){d=d.call()}c=typeof d;if(c=="string"){d=Ext.util.Format.trim(d).split(this.styleSplitRe);for(b=0,a=d.length;b "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:["Ext.CompositeElementLite","Ext.CompositeElement"],requires:["Ext.dom.Element"],statics:{importElementMethods:function(){}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.Element.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a).synchronize()},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b-1){c=Ext.getDom(c);if(a){f=this.elements[b];f.parentNode.insertBefore(c,f);Ext.removeNode(f)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(c,e){var b=this,d=this.elements,a;Ext.each(c,function(f){if((a=(d[f]||d[f=b.indexOf(f)]))){if(e){if(a.dom){a.remove()}else{Ext.removeNode(a)}}Ext.Array.erase(d,f,1)}});return this}},function(){var a=Ext.dom.Element,d=a.prototype,c=this.prototype,b;for(b in d){if(typeof d[b]=="function"){(function(e){c[e]=c[e]||function(){return this.invoke(e,arguments)}}).call(c,b)}}c.on=c.addListener;if(Ext.DomQuery){a.selectorFunction=Ext.DomQuery.select}a.select=function(e,f){var g;if(typeof e=="string"){g=a.selectorFunction(e,f)}else{if(e.length!==undefined){g=e}else{}}return new Ext.CompositeElementLite(g)};Ext.select=function(){return a.select.apply(a,arguments)}});Ext.define("Ext.ComponentManager",{alternateClassName:"Ext.ComponentMgr",singleton:true,constructor:function(){var a={};this.all={map:a,getArray:function(){var b=[],c;for(c in a){b.push(a[c])}return b}};this.map=a},register:function(a){var b=a.getId();this.map[a.getId()]=a},unregister:function(a){delete this.map[a.getId()]},isRegistered:function(a){return this.map[a]!==undefined},get:function(a){return this.map[a]},create:function(a,c){if(a.isComponent){return a}else{if(Ext.isString(a)){return Ext.createByAlias("widget."+a)}else{var b=a.xtype||c;return Ext.createByAlias("widget."+b,a)}}},registerType:Ext.emptyFn});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var g=this,j=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(o,n){return n.method.apply(this,[o].concat(n.args))},a=function(p,t){var n=[],q=0,s=p.length,r,o=t!==">";for(;q\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:l},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:m},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:k},{re:/^(?:\{([^\}]+)\})/,method:j}];g.Query=Ext.extend(Object,{constructor:function(n){n=n||{};Ext.apply(this,n)},execute:function(o){var q=this.operations,r=0,s=q.length,p,n;if(!o){n=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(o)){n=o}}for(;r1){for(q=0,r=s.length;q1){r=q.length;for(p=0;p]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:["]([^"]*)["])|(?:[']([^']*)[']))\s*/g,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.app.Action",{config:{scope:null,application:null,controller:null,action:null,args:[],url:undefined,data:{},title:null,beforeFilters:[],currentFilterIndex:-1},constructor:function(a){this.initConfig(a);this.getUrl()},execute:function(){this.resume()},resume:function(){var b=this.getCurrentFilterIndex()+1,c=this.getBeforeFilters(),a=this.getController(),d=c[b];if(d){this.setCurrentFilterIndex(b);d.call(a,this)}else{a[this.getAction()].apply(a,this.getArgs())}},applyUrl:function(a){if(a===null||a===undefined){a=this.urlEncode()}return a},applyController:function(a){var c=this.getApplication(),b=c.getCurrentProfile();if(Ext.isString(a)){a=c.getController(a,b?b.getNamespace():null)}return a},urlEncode:function(){var a=this.getController(),b;if(a instanceof Ext.app.Controller){b=a.$className.split(".");a=b[b.length-1]}return a+"/"+this.getAction()}});Ext.define("Ext.app.Route",{config:{conditions:{},url:null,controller:null,action:null,initialized:false},constructor:function(a){this.initConfig(a)},recognize:function(b){if(!this.getInitialized()){this.initialize()}if(this.recognizes(b)){var c=this.matchesFor(b),a=b.match(this.matcherRegex);a.shift();return Ext.applyIf(c,{controller:this.getController(),action:this.getAction(),historyUrl:b,args:a})}},initialize:function(){this.paramMatchingRegex=new RegExp(/:([0-9A-Za-z\_]*)/g);this.paramsInMatchString=this.getUrl().match(this.paramMatchingRegex)||[];this.matcherRegex=this.createMatcherRegex(this.getUrl());this.setInitialized(true)},recognizes:function(a){return this.matcherRegex.test(a)},matchesFor:function(b){var f={},e=this.paramsInMatchString,a=b.match(this.matcherRegex),d=e.length,c;a.shift();for(c=0;c0){f.timeout=setTimeout(Ext.bind(i.handleTimeout,i,[f]),l)}i.setupErrorHandling(f);i[k]=Ext.bind(i.handleResponse,i,[f],true);i.loadScript(f);return f},abort:function(b){var c=this.statics().requests,a;if(b){if(!b.id){b=c[b]}this.abort(b)}else{for(a in c){if(c.hasOwnProperty(a)){this.abort(c[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.statics()[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).destroy();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType,b])}else{Ext.callback(b.success,b.scope,[a,b])}Ext.callback(b.callback,b.scope,[c,a,b.errorType,b])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.Operation",{config:{synchronous:true,action:null,filters:null,sorters:null,grouper:null,start:null,limit:null,batch:null,callback:null,scope:null,resultSet:null,records:null,request:null,response:null,withCredentials:null,params:null,url:null,page:null,node:null,model:undefined,addRecords:false},started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,constructor:function(a){this.initConfig(a)},applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},getRecords:function(){var a=this.getResultSet();return this._records||(a?a.getRecords():[])},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},allowWrite:function(){return this.getAction()!="read"},process:function(d,b,c,a){if(b.getSuccess()!==false){this.setResponse(a);this.setResultSet(b);this.setCompleted();this.setSuccessful()}else{return false}return this["process"+Ext.String.capitalize(d)].call(this,b,c,a)},processRead:function(d){var b=d.getRecords(),g=[],f=this.getModel(),e=b.length,c,a;for(c=0;c]+>/gi,none:function(a){return a},asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){a=parseFloat(String(a).replace(/,/g,""));return isNaN(a)?0:a},asInt:function(a){a=parseInt(String(a).replace(/,/g,""),10);return isNaN(a)?0:a}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"],stripRe:/[\$,%]/g,dashesRe:/-/g,iso8601TestRe:/\d\dT\d\d/,iso8601SplitRe:/[- :T\.Z\+]/},function(){var b=this,a=Ext.data.SortTypes;Ext.apply(b,{AUTO:{convert:function(c){return c},sortType:a.none,type:"auto"},STRING:{convert:function(c){return(c===undefined||c===null)?(this.getAllowNull()?null:""):String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?parseInt(c,10):parseInt(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?c:parseFloat(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(c){if((c===undefined||c===null||c==="")&&this.getAllowNull()){return null}return c!=="false"&&!!c},sortType:a.none,type:"bool"},DATE:{convert:function(e){var c=this.getDateFormat(),d;if(!e){return null}if(Ext.isDate(e)){return e}if(c){if(c=="timestamp"){return new Date(e*1000)}if(c=="time"){return new Date(parseInt(e,10))}return Ext.Date.parse(e,c)}d=new Date(Date.parse(e));if(isNaN(d)){if(b.iso8601TestRe.test(e)){d=e.split(b.iso8601SplitRe);d=new Date(d[0],d[1]-1,d[2],d[3],d[4],d[5])}if(isNaN(d)){d=new Date(Date.parse(e.replace(this.dashesRe,"/")))}}return isNaN(d)?null:d},sortType:a.asDate,type:"date"}});Ext.apply(b,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Validations",{alternateClassName:"Ext.data.validations",singleton:true,config:{presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address"},constructor:function(a){this.initConfig(a)},getMessage:function(a){var b=this["get"+a[0].toUpperCase()+a.slice(1)+"Message"];if(b){return b.call(this)}return""},emailRe:/^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/,presence:function(a,b){if(arguments.length===1){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&da)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){if(b===undefined||b===null){b=""}return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.identifier.Simple",{alias:"data.identifier.simple",statics:{AUTO_ID:1},config:{prefix:"ext-record-"},constructor:function(a){this.initConfig(a)},generate:function(a){return this._prefix+this.self.AUTO_ID++}});Ext.define("Ext.data.identifier.Uuid",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.uuid",isUnique:true,config:{id:undefined,salt:null,timestamp:null,version:4},applyId:function(a){if(a===undefined){return Ext.data.identifier.Uuid.Global}return a},constructor:function(){var a=this;a.callParent(arguments);a.parts=[];a.init()},reconfigure:function(a){this.setConfig(a);this.init()},generate:function(){var c=this,e=c.parts,a=c.getVersion(),b=c.getSalt(),d=c.getTimestamp();e[0]=c.toHex(d.lo,8);e[1]=c.toHex(d.hi&65535,4);e[2]=c.toHex(((d.hi>>>16)&4095)|(a<<12),4);e[3]=c.toHex(128|((c.clockSeq>>>8)&63),2)+c.toHex(c.clockSeq&255,2);e[4]=c.toHex(b.hi,4)+c.toHex(b.lo,8);if(a==4){c.init()}else{++d.lo;if(d.lo>=c.twoPow32){d.lo=0;++d.hi}}return e.join("-").toLowerCase()},init:function(){var b=this,a=b.getSalt(),c=b.getTimestamp();if(b.getVersion()==4){b.clockSeq=b.rand(0,b.twoPow14-1);if(!a){a={};b.setSalt(a)}if(!c){c={};b.setTimestamp(c)}a.lo=b.rand(0,b.twoPow32-1);a.hi=b.rand(0,b.twoPow16-1);c.lo=b.rand(0,b.twoPow32-1);c.hi=b.rand(0,b.twoPow28-1)}else{b.setSalt(b.split(b.getSalt()));b.setTimestamp(b.split(b.getTimestamp()));b.getSalt().hi|=256}},twoPow14:Math.pow(2,14),twoPow16:Math.pow(2,16),twoPow28:Math.pow(2,28),twoPow32:Math.pow(2,32),toHex:function(c,b){var a=c.toString(16);if(a.length>b){a=a.substring(a.length-b)}else{if(a.length")}for(;c");for(j in k){if(k.hasOwnProperty(j)){d.push("<",j,">",k[j],"")}}d.push("")}if(h){d.push("")}a.setXmlData(d.join(""));return a}});Ext.define("Ext.direct.RemotingMethod",{config:{name:null,params:null,formHandler:null,len:null,ordered:true},constructor:function(a){this.initConfig(a)},applyParams:function(f){if(Ext.isNumber(f)){this.setLen(f)}else{if(Ext.isArray(f)){this.setOrdered(false);var d=f.length,b=[],c,e,a;for(c=0;c0){if(a){for(c=0,d=a.length;c0){k.apply(m,l)}if(a){k.call(m,e)}if(c.length>0){k.apply(m,c)}if(b){k.call(m,e)}if(o.length>0){k.apply(m,o)}}else{for(f=0;f0){k.apply(m,l)}}if(a){k.call(m,e)}for(f=0;f0){k.apply(m,c)}}if(b){k.call(m,e)}for(f=0;f0){k.apply(m,o)}}}if(m.length===0){return this}if(!h){h=[]}d.length=0;d.push.apply(d,h);d.push(null,this);this.doFire();return this},doFire:function(){var k=this.firingListeners,c=this.firingArguments,g=c.length-2,d,f,b,o,h,n,a,j,l,e,m;this.isPausing=false;this.isPaused=false;this.isStopped=false;this.isFiring=true;for(d=0,f=k.length;d0){this.isPaused=false;this.doFire()}if(a){a.resume()}return this},isInterrupted:function(){return this.isStopped||this.isPaused},stop:function(){var a=this.connectingController;this.isStopped=true;if(a){this.connectingController=null;a.stop()}this.isFiring=false;this.listenerStacks=null;return this},pause:function(){var a=this.connectingController;this.isPausing=true;if(a){a.pause()}return this}});Ext.define("Ext.event.Event",{alternateClassName:"Ext.EventObject",isStopped:false,set:function(a,b){if(arguments.length===1&&typeof a!="string"){var c=a;for(a in c){if(c.hasOwnProperty(a)){this[a]=c[a]}}}else{this[a]=c[a]}},stopEvent:function(){return this.stopPropagation()},stopPropagation:function(){this.isStopped=true;return this}});Ext.define("Ext.event.ListenerStack",{currentOrder:"current",length:0,constructor:function(){this.listeners={before:[],current:[],after:[]};this.lateBindingMap={};return this},add:function(h,j,k,e){var a=this.lateBindingMap,g=this.getAll(e),f=g.length,b,d,c;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();b=a[c];if(b){if(b[h]){return false}else{b[h]=true}}else{a[c]=b={};b[h]=true}}else{if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){d.options=k;return false}}}}d=this.create(h,j,k,e);if(k&&k.prepend){delete k.prepend;g.unshift(d)}else{g.push(d)}this.length++;return true},getAt:function(b,a){return this.getAll(a)[b]},getAll:function(a){if(!a){a=this.currentOrder}return this.listeners[a]},count:function(a){return this.getAll(a).length},create:function(d,c,b,a){return{stack:this,fn:d,firingFn:false,boundFn:false,isLateBinding:typeof d=="string",scope:c,options:b||{},order:a}},remove:function(h,j,e){var g=this.getAll(e),f=g.length,b=false,a=this.lateBindingMap,d,c;if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){g.splice(f,1);b=true;this.length--;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();if(a[c]&&a[c][h]){delete a[c][h]}}break}}}return b}});Ext.define("Ext.event.publisher.Publisher",{targetType:"",idSelectorRegex:/^#([\w\-]+)$/i,constructor:function(){var b=this.handledEvents,a,c,e,d;a=this.handledEventsMap={};for(c=0,e=b.length;cb){this.isEnded=true;return this.getEndValue()}else{return this.getStartValue()+((a/b)*this.distance)}}});Ext.define("Ext.fx.easing.Momentum",{extend:"Ext.fx.easing.Abstract",config:{acceleration:30,friction:0,startVelocity:0},alpha:0,updateFriction:function(b){var a=Math.log(1-(b/10));this.theta=a;this.alpha=a/this.getAcceleration()},updateStartVelocity:function(a){this.velocity=a*this.getAcceleration()},updateAcceleration:function(a){this.velocity=this.getStartVelocity()*a;this.alpha=this.theta/a},getValue:function(){return this.getStartValue()-this.velocity*(1-this.getFrictionFactor())/this.theta},getFrictionFactor:function(){var a=Ext.Date.now()-this.getStartTime();return Math.exp(a*this.alpha)},getVelocity:function(){return this.getFrictionFactor()*this.velocity}});Ext.define("Ext.mixin.Mixin",{onClassExtended:function(b,e){var a=e.mixinConfig,d,f,c;if(a){d=b.superclass.mixinConfig;if(d){a=e.mixinConfig=Ext.merge({},d,a)}e.mixinId=a.id;f=a.beforeHooks;c=a.hooks||a.afterHooks;if(f||c){Ext.Function.interceptBefore(e,"onClassMixedIn",function(h){var g=this.prototype;if(f){Ext.Object.each(f,function(j,i){h.override(i,function(){if(g[j].apply(this,arguments)!==false){return this.callOverridden(arguments)}})})}if(c){Ext.Object.each(c,function(j,i){h.override(i,function(){var k=this.callOverridden(arguments);g[j].apply(this,arguments);return k})})}})}}}});Ext.define("Ext.mixin.Selectable",{extend:"Ext.mixin.Mixin",mixinConfig:{id:"selectable",hooks:{updateStore:"updateStore"}},config:{disableSelection:null,mode:"SINGLE",allowDeselect:false,lastSelected:null,lastFocused:null,deselectOnContainerClick:true},modes:{SINGLE:true,SIMPLE:true,MULTI:true},selectableEventHooks:{addrecords:"onSelectionStoreAdd",removerecords:"onSelectionStoreRemove",updaterecord:"onSelectionStoreUpdate",load:"refreshSelection",refresh:"refreshSelection"},constructor:function(){this.selected=new Ext.util.MixedCollection();this.callParent(arguments)},applyMode:function(a){a=a?a.toUpperCase():"SINGLE";return this.modes[a]?a:"SINGLE"},updateStore:function(a,c){var b=this,d=Ext.apply({},b.selectableEventHooks,{scope:b});if(c&&Ext.isObject(c)&&c.isStore){if(c.autoDestroy){c.destroy()}else{c.un(d)}}if(a){a.on(d);b.refreshSelection()}},selectAll:function(a){var e=this,c=e.getStore().getRange(),d=c.length,b=0;for(;bg){e=g;g=c;c=e}for(d=c;d<=g;d++){a.push(b.getAt(d))}this.doMultiSelect(a,h)},select:function(c,e,b){var d=this,a;if(d.getDisableSelection()){return}if(typeof c==="number"){c=[d.getStore().getAt(c)]}if(!c){return}if(d.getMode()=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doSingleSelect:function(a,b){var d=this,c=d.selected;if(d.getDisableSelection()){return}if(d.isSelected(a)){return}if(c.getCount()>0){d.deselect(d.getLastSelected(),b)}c.add(a);d.setLastSelected(a);d.onItemSelect(a,b);d.setLastFocused(a);if(!b){d.fireSelectionChange([a])}},doMultiSelect:function(a,j,h){if(a===null||this.getDisableSelection()){return}a=!Ext.isArray(a)?[a]:a;var f=this,b=f.selected,e=a.length,g=false,c=0,d;if(!j&&b.getCount()>0){g=true;f.deselect(f.getSelection(),true)}for(;c0},refreshSelection:function(){var b=this,a=b.getSelection();b.deselectAll(true);if(a.length){b.select(a,false,true)}},onSelectionStoreRemove:function(c,b){var g=this,e=g.selected,f=b.length,a,d;if(g.getDisableSelection()){return}for(d=0;d0)?a[0]:b;return this.fromTouch(c)},fromTouch:function(a){return new this(a.pageX,a.pageY)},from:function(a){if(!a){return new this(0,0)}if(!(a instanceof this)){return new this(a.x,a.y)}return a}},constructor:function(a,b){if(typeof a=="undefined"){a=0}if(typeof b=="undefined"){b=0}this.x=a;this.y=b;return this},clone:function(){return new this.self(this.x,this.y)},copy:function(){return this.clone.apply(this,arguments)},copyFrom:function(a){this.x=a.x;this.y=a.y;return this},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x===a.x&&this.y===a.y)},isCloseTo:function(c,b){if(typeof b=="number"){b={x:b};b.y=b.x}var a=c.x,f=c.y,e=b.x,d=b.y;return(this.x<=a+e&&this.x>=a-e&&this.y<=f+d&&this.y>=f-d)},isWithin:function(){return this.isCloseTo.apply(this,arguments)},translate:function(a,b){this.x+=a;this.y+=b;return this},roundedEquals:function(a){return(Math.round(this.x)===Math.round(a.x)&&Math.round(this.y)===Math.round(a.y))},getDistanceTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.sqrt(c*c+a*a)},getAngleTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.atan2(a,c)*this.radianToDegreeConstant}});Ext.define("Ext.util.Region",{statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,f,a,c){var e=this;e.top=d;e[1]=d;e.right=f;e.bottom=a;e.left=c;e[0]=c},contains:function(b){var a=this;return(b.left>=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.top,g.top),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.left,g.left);if(a>d&&e>c){return new Ext.util.Region(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.top,g.top),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.left,g.left);return new Ext.util.Region(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.util.Numbers.constrain;a.top=c(a.top,b.top,b.bottom);a.bottom=c(a.bottom,b.top,b.bottom);a.left=c(a.left,b.left,b.right);a.right=c(a.right,b.left,b.right);return a},adjust:function(d,f,a,c){var e=this;e.top+=d;e.left+=c;e.right+=f;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.left){return this.left-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.top){return this.top-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(athis.right)},isOutOfBoundY:function(a){return(athis.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.left){b-=(b-this.left)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.top){b-=(b-this.top)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.left,height:this.bottom-this.top}},copy:function(){return new Ext.util.Region(this.top,this.right,this.bottom,this.left)},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a){this.left+=a.x;this.right+=a.x;this.top+=a.y;this.bottom+=a.y;return this},round:function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.util.Sorter",{isSorter:true,config:{property:null,sorterFn:null,root:null,transform:null,direction:"ASC",id:undefined},constructor:function(a){this.initConfig(a)},applyId:function(a){if(!a){a=this.getProperty();if(!a){a=Ext.id(null,"ext-sorter-")}}return a},createSortFunction:function(b){var c=this,a=c.getDirection().toUpperCase()=="DESC"?-1:1;return function(e,d){return a*b.call(c,e,d)}},defaultSortFn:function(e,c){var g=this,f=g._transform,b=g._root,d,a,h=g._property;if(b!==null){e=e[b];c=c[b]}d=e[h];a=c[h];if(f){d=f(d);a=f(a)}return d>a?1:(d -1 || Ext.isDate(values) ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e.substr(0,7)=="parent."){c=e}else{if((e.indexOf(".")!==-1)&&(e.indexOf("-")===-1)){c="values."+e}else{c="values['"+e+"']"}}}}if(f){c="("+c+f+")"}if(g&&this.useFormat){d=d?","+d:"";if(g.substr(0,5)!="this."){g="fm."+g+"("}else{g+="("}}else{d="";g="("+c+" === undefined ? '' : "}return g+c+d+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var a=this.prototype;a.fnArgs="out,values,parent,xindex,xcount";a.callFn=".call(this,"+a.fnArgs+")"});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,config:{name:null,type:"auto",convert:undefined,dateFormat:null,allowNull:true,defaultValue:undefined,mapping:null,sortType:undefined,sortDir:"ASC",allowBlank:true,persist:true,encode:null,decode:null,bubbleEvents:"action"},constructor:function(a){if(Ext.isString(a)){a={name:a}}this.initConfig(a)},applyType:function(c){var b=Ext.data.Types,a=b.AUTO;if(c){if(Ext.isString(c)){return b[c.toUpperCase()]||a}else{return c}}return a},updateType:function(a,b){var c=this.getConvert();if(b&&c===b.convert){this.setConvert(a.convert)}},applySortType:function(d){var c=Ext.data.SortTypes,a=this.getType(),b=a.sortType;if(d){if(Ext.isString(d)){return c[d]||b}else{return d}}return b},applyConvert:function(b){var a=this.getType().convert;if(b&&b!==a){this._hasCustomConvert=true;return b}else{this._hasCustomConvert=false;return a}},hasCustomConvert:function(){return this._hasCustomConvert}});Ext.define("Ext.data.identifier.Sequential",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.sequential",config:{prefix:"",seed:1},constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.getPrefix(),""]},generate:function(b){var c=this,d=c.parts,a=c.getSeed()+1;c.setSeed(a);d[1]=a;return d.join("")}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",config:{rootProperty:undefined,encode:false,allowSingle:true,encodeRequest:false},applyRootProperty:function(a){if(!a&&(this.getEncode()||this.getEncodeRequest())){a="data"}return a},writeRecords:function(d,e){var a=this.getRootProperty(),f=d.getParams(),b=this.getAllowSingle(),c;if(this.getAllowSingle()&&e&&e.length==1){e=e[0]}if(this.getEncodeRequest()){c=d.getJsonData()||{};if(e&&(e.length||(b&&Ext.isObject(e)))){c[a]=e}d.setJsonData(Ext.apply(c,f||{}));d.setParams(null);d.setMethod("POST");return d}if(!e||!(e.length||(b&&Ext.isObject(e)))){return d}if(this.getEncode()){if(a){f[a]=Ext.encode(e)}else{}}else{c=d.getJsonData()||{};if(a){c[a]=e}else{c=e}d.setJsonData(c)}return d}});Ext.define("Ext.event.Dispatcher",{requires:["Ext.event.ListenerStack","Ext.event.Controller"],statics:{getInstance:function(){if(!this.instance){this.instance=new this()}return this.instance},setInstance:function(a){this.instance=a;return this}},config:{publishers:{}},wildcard:"*",constructor:function(a){this.listenerStacks={};this.activePublishers={};this.publishersCache={};this.noActivePublishers=[];this.controller=null;this.initConfig(a);return this},getListenerStack:function(e,g,c,b){var d=this.listenerStacks,f=d[e],a;b=Boolean(b);if(!f){if(b){d[e]=f={}}else{return null}}f=f[g];if(!f){if(b){d[e][g]=f={}}else{return null}}a=f[c];if(!a){if(b){f[c]=a=new Ext.event.ListenerStack()}else{return null}}return a},getController:function(d,f,c,b){var a=this.controller,e={targetType:d,target:f,eventName:c};if(!a){this.controller=a=new Ext.event.Controller()}if(a.isFiring){a=new Ext.event.Controller()}a.setInfo(e);if(b&&a!==b){a.connect(b)}return a},applyPublishers:function(c){var a,b;this.publishersCache={};for(a in c){if(c.hasOwnProperty(a)){b=c[a];this.registerPublisher(b)}}return c},registerPublisher:function(b){var a=this.activePublishers,c=b.getTargetType(),d=a[c];if(!d){a[c]=d=[]}d.push(b);b.setDispatcher(this);return this},getCachedActivePublishers:function(c,b){var a=this.publishersCache,d;if((d=a[c])&&(d=d[b])){return d}return null},cacheActivePublishers:function(c,b,d){var a=this.publishersCache;if(!a[c]){a[c]={}}a[c][b]=d;return d},getActivePublishers:function(f,b){var g,a,c,e,d;if((g=this.getCachedActivePublishers(f,b))){return g}a=this.activePublishers[f];if(a){g=[];for(c=0,e=a.length;c0}return false},addListener:function(d,e,a){var f=this.getActivePublishers(d,a),c=f.length,b;if(c>0){for(b=0;b0){for(b=0;b0){for(b=0;b0)){return true}delete d[f];if(--d.$length===0){delete this.subscribers[a]}return true},onBeforeComponentRenderedChange:function(b,d,g){var f=this.eventNames,c=g?f.painted:f.erased,e=this.getSubscribers(c),a;if(e&&e.$length>0){this.renderedQueue[d.getId()]=a=[];this.publish(e,d,c,a)}},onBeforeComponentHiddenChange:function(c,d){var f=this.eventNames,b=d?f.erased:f.painted,e=this.getSubscribers(b),a;if(e&&e.$length>0){this.hiddenQueue[c.getId()]=a=[];this.publish(e,c,b,a)}},onComponentRenderedChange:function(b,c){var d=this.renderedQueue,e=c.getId(),a;if(!d.hasOwnProperty(e)){return}a=d[e];delete d[e];if(a.length>0){this.dispatchQueue(a)}},onComponentHiddenChange:function(c){var b=this.hiddenQueue,d=c.getId(),a;if(!b.hasOwnProperty(d)){return}a=b[d];delete b[d];if(a.length>0){this.dispatchQueue(a)}},dispatchQueue:function(g){var l=this.dispatcher,a=this.targetType,b=this.eventNames,e=g.slice(),f=e.length,c,k,h,d,j;g.length=0;if(f>0){for(c=0;c0)){return true}delete c[i];c.$length--}else{if(!d.hasOwnProperty(i)||(!j&&--d[i]>0)){return true}delete d[i];d.$length--}}else{if(g===this.SELECTOR_ALL){if(j){a.all=0}else{a.all--}}else{if(!b.hasOwnProperty(g)||(!j&&--b[g]>0)){return true}delete b[g];Ext.Array.remove(b,g)}}a.$length--;return true},getElementTarget:function(a){if(a.nodeType!==1){a=a.parentNode;if(!a||a.nodeType!==1){return null}}return a},getBubblingTargets:function(b){var a=[];if(!b){return a}do{a[a.length]=b;b=b.parentNode}while(b&&b.nodeType===1);return a},dispatch:function(c,a,b){b.push(b[0].target);this.callParent(arguments)},publish:function(b,a,c){var d=this.getSubscribers(b),e;if(d.$length===0||!this.doPublish(d,b,a,c)){e=this.getSubscribers("*");if(e.$length>0){this.doPublish(e,b,a,c)}}return this},doPublish:function(f,h,x,u){var r=f.id,g=f.className,b=f.selector,p=r.$length>0,a=g.$length>0,l=b.length>0,o=f.all>0,y={},e=[u],q=false,m=this.classNameSplitRegex,v,k,t,d,z,n,c,w,s;for(v=0,k=x.length;v0){c=a.slice(0);a.length=0;for(b=0;b0){this.processEvent(this.mergeEvents(d));d.length=0}this.processEvent(e)}}if(d.length>0){this.processEvent(this.mergeEvents(d));d.length=0}}},mergeEvents:function(c){var b=[],f=c.length,a,e,d;d=c[f-1];if(f===1){return d}for(a=0;ah){for(d=0;dh){return}}for(d=0;da){this.end(d)}}},onTouchEnd:function(a){this.end(a)},start:function(){if(!this.isTracking){this.isTracking=true;this.isStarted=false}},end:function(a){if(this.isTracking){this.isTracking=false;if(this.isStarted){this.isStarted=false;this.fireEnd(a)}}}});Ext.define("Ext.event.recognizer.Pinch",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["pinchstart","pinch","pinchend"],startDistance:0,lastTouches:null,onTouchMove:function(c){if(!this.isTracking){return}var b=Array.prototype.slice.call(c.touches),d,a,f;d=b[0].point;a=b[1].point;f=d.getDistanceTo(a);if(f===0){return}if(!this.isStarted){this.isStarted=true;this.startDistance=f;this.fire("pinchstart",c,b,{touches:b,distance:f,scale:1})}else{this.fire("pinch",c,b,{touches:b,distance:f,scale:f/this.startDistance})}this.lastTouches=b},fireEnd:function(a){this.fire("pinchend",a,this.lastTouches)},fail:function(){return this.callParent(arguments)}});Ext.define("Ext.event.recognizer.Rotate",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["rotatestart","rotate","rotateend"],startAngle:0,lastTouches:null,lastAngle:null,onTouchMove:function(h){if(!this.isTracking){return}var g=Array.prototype.slice.call(h.touches),b=this.lastAngle,d,f,c,a,i,j;d=g[0].point;f=g[1].point;c=d.getAngleTo(f);if(b!==null){j=Math.abs(b-c);a=c+360;i=c-360;if(Math.abs(a-b)1){return this.fail(this.self.NOT_SINGLE_TOUCH)}}});Ext.define("Ext.event.recognizer.DoubleTap",{extend:"Ext.event.recognizer.SingleTouch",config:{maxDuration:300},handledEvents:["singletap","doubletap"],singleTapTimer:null,onTouchStart:function(a){if(this.callParent(arguments)===false){return false}this.startTime=a.time;clearTimeout(this.singleTapTimer)},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onEnd:function(g){var c=this,b=this.getMaxDuration(),h=g.changedTouches[0],f=g.time,a=this.lastTapTime,d;this.lastTapTime=f;if(a){d=f-a;if(d<=b){this.lastTapTime=0;this.fire("doubletap",g,[h],{touch:h,duration:d});return}}if(f-this.startTime>b){this.fireSingleTap(g,h)}else{this.singleTapTimer=setTimeout(function(){c.fireSingleTap(g,h)},b)}},fireSingleTap:function(a,b){this.fire("singletap",a,[b],{touch:b})}});Ext.define("Ext.event.recognizer.Drag",{extend:"Ext.event.recognizer.SingleTouch",isStarted:false,startPoint:null,previousPoint:null,lastPoint:null,handledEvents:["dragstart","drag","dragend"],onTouchStart:function(b){var c,a;if(this.callParent(arguments)===false){if(this.isStarted&&this.lastMoveEvent!==null){this.onTouchEnd(this.lastMoveEvent)}return false}this.startTouches=c=b.changedTouches;this.startTouch=a=c[0];this.startPoint=a.point},onTouchMove:function(d){var c=d.changedTouches,f=c[0],a=f.point,b=d.time;if(this.lastPoint){this.previousPoint=this.lastPoint}if(this.lastTime){this.previousTime=this.lastTime}this.lastTime=b;this.lastPoint=a;this.lastMoveEvent=d;if(!this.isStarted){this.isStarted=true;this.startTime=b;this.previousTime=b;this.previousPoint=this.startPoint;this.fire("dragstart",d,this.startTouches,this.getInfo(d,this.startTouch))}else{this.fire("drag",d,c,this.getInfo(d,f))}},onTouchEnd:function(c){if(this.isStarted){var b=c.changedTouches,d=b[0],a=d.point;this.isStarted=false;this.lastPoint=a;this.fire("dragend",c,b,this.getInfo(c,d));this.startTime=0;this.previousTime=0;this.lastTime=0;this.startPoint=null;this.previousPoint=null;this.lastPoint=null;this.lastMoveEvent=null}},getInfo:function(j,i){var d=j.time,a=this.startPoint,f=this.previousPoint,b=this.startTime,k=this.previousTime,l=this.lastPoint,h=l.x-a.x,g=l.y-a.y,c={touch:i,startX:a.x,startY:a.y,previousX:f.x,previousY:f.y,pageX:l.x,pageY:l.y,deltaX:h,deltaY:g,absDeltaX:Math.abs(h),absDeltaY:Math.abs(g),previousDeltaX:l.x-f.x,previousDeltaY:l.y-f.y,time:d,startTime:b,previousTime:k,deltaTime:d-b,previousDeltaTime:d-k};return c}});Ext.define("Ext.event.recognizer.LongPress",{extend:"Ext.event.recognizer.SingleTouch",inheritableStatics:{DURATION_NOT_ENOUGH:32},config:{minDuration:1000},handledEvents:["longpress"],fireLongPress:function(a){var b=a.changedTouches[0];this.fire("longpress",a,[b],{touch:b,duration:this.getMinDuration()});this.isLongPress=true},onTouchStart:function(b){var a=this;if(this.callParent(arguments)===false){return false}this.isLongPress=false;this.timer=setTimeout(function(){a.fireLongPress(b)},this.getMinDuration())},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(){if(!this.isLongPress){return this.fail(this.self.DURATION_NOT_ENOUGH)}},fail:function(){clearTimeout(this.timer);return this.callParent(arguments)}},function(){this.override({handledEvents:["longpress","taphold"],fire:function(a){if(a==="longpress"){var b=Array.prototype.slice.call(arguments);b[0]="taphold";this.fire.apply(this,b)}return this.callOverridden(arguments)}})});Ext.define("Ext.event.recognizer.Tap",{handledEvents:["tap"],extend:"Ext.event.recognizer.SingleTouch",onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(a){var b=a.changedTouches[0];this.fire("tap",a,[b])}},function(){});(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,f){return c[f]})}Ext.DateExtras={now:Date.now||function(){return +new Date()},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var f=(d||"").match(e);return f?new Date(((f[1]||"")+f[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return a.monthNames[c].substring(0,3)},getShortDayName:function(c){return a.dayNames[c].substring(0,3)},getMonthNumber:function(c){return a.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var j="Y-m-dTH:i:sP",g=[],f=0,d=j.length;f= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(l){var e=a.parseRegexes.length,m=1,f=[],k=[],j=false,d="";for(var h=0;h Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)"},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a.formatCodeToRegex("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a.formatCodeToRegex("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var f=0,d=c.length;f0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(f){var e=0,h=Ext.Date.clone(f),c=f.getMonth(),g;for(g=0,h.setDate(1),h.setMonth(0);g28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(g),"mo",h)).getDate())}i.setDate(e);i.setMonth(g.getMonth()+h);break;case Ext.Date.YEAR:i.setFullYear(g.getFullYear()+h);break}return i},between:function(d,f,c){var e=d.getTime();return f.getTime()<=e&&e<=c.getTime()}};var a=Ext.DateExtras;Ext.apply(Ext.Date,a)})();Ext.define("Ext.fx.Easing",{requires:["Ext.fx.easing.Linear"],constructor:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")}});Ext.define("Ext.fx.easing.BoundMomentum",{extend:"Ext.fx.easing.Abstract",requires:["Ext.fx.easing.Momentum","Ext.fx.easing.Bounce"],config:{momentum:null,bounce:null,minMomentumValue:0,maxMomentumValue:0,minVelocity:0.01,startVelocity:0},applyMomentum:function(a,b){return Ext.factory(a,Ext.fx.easing.Momentum,b)},applyBounce:function(a,b){return Ext.factory(a,Ext.fx.easing.Bounce,b)},updateStartTime:function(a){this.getMomentum().setStartTime(a);this.callParent(arguments)},updateStartVelocity:function(a){this.getMomentum().setStartVelocity(a)},updateStartValue:function(a){this.getMomentum().setStartValue(a)},reset:function(){this.lastValue=null;this.isBouncingBack=false;this.isOutOfBound=false;return this.callParent(arguments)},getValue:function(){var a=this.getMomentum(),j=this.getBounce(),e=a.getStartVelocity(),f=e>0?1:-1,g=this.getMinMomentumValue(),d=this.getMaxMomentumValue(),c=(f==1)?d:g,h=this.lastValue,i,b;if(e===0){return this.getStartValue()}if(!this.isOutOfBound){i=a.getValue();b=a.getVelocity();if(Math.abs(b)=g&&i<=d){return i}this.isOutOfBound=true;j.setStartTime(Ext.Date.now()).setStartVelocity(b).setStartValue(c)}i=j.getValue();if(!this.isEnded){if(!this.isBouncingBack){if(h!==null){if((f==1&&ih)){this.isBouncingBack=true}}}else{if(Math.round(i)==c){this.isEnded=true}}}this.lastValue=i;return i}});Ext.define("Ext.fx.easing.EaseIn",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-in",config:{exponent:4,duration:1500},getValue:function(){var c=Ext.Date.now()-this.getStartTime(),g=this.getDuration(),b=this.getStartValue(),a=this.getEndValue(),h=this.distance,e=c/g,d=Math.pow(e,this.getExponent()),f=b+(d*h);if(c>=g){this.isEnded=true;return a}return f}});Ext.define("Ext.fx.easing.EaseOut",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-out",config:{exponent:4,duration:1500},getValue:function(){var f=Ext.Date.now()-this.getStartTime(),d=this.getDuration(),b=this.getStartValue(),h=this.getEndValue(),a=this.distance,c=f/d,g=1-c,e=1-Math.pow(g,this.getExponent()),i=b+(e*a);if(f>=d){this.isEnded=true;return h}return i}});Ext.define("Ext.mixin.Filterable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Filter"],mixinConfig:{id:"filterable"},config:{filters:null,filterRoot:null},dirtyFilterFn:false,filterFn:null,filtered:false,applyFilters:function(a,b){if(!b){b=this.createFiltersCollection()}b.clear();this.filtered=false;this.dirtyFilterFn=true;if(a){this.addFilters(a)}return b},createFiltersCollection:function(){this._filters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._filters},addFilter:function(a){this.addFilters([a])},addFilters:function(b){var a=this.getFilters();return this.insertFilters(a?a.length:0,b)},insertFilter:function(a,b){return this.insertFilters(a,[b])},insertFilters:function(h,c){if(!Ext.isArray(c)){c=[c]}var j=c.length,a=this.getFilterRoot(),d=this.getFilters(),e=[],f,g,b;if(!d){d=this.createFiltersCollection()}for(g=0;g=200&&a<300)||a==304||(a==0&&d.responseText.length>0),b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var g=c.xhr,a={},h,d,i,e,f,b;if(c.timedout||c.aborted){c.success=false;h=[]}else{h=g.getAllResponseHeaders().replace(this.lineBreakRe,"\n").split("\n")}d=h.length;while(d--){i=h[d];e=i.indexOf(":");if(e>=0){f=i.substr(0,e).toLowerCase();if(i.charAt(e+1)==" "){++e}a[f]=i.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:g.status,statusText:g.statusText,getResponseHeader:function(j){return a[j.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:g.responseText,responseXML:g.responseXML};g=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:["Ext.mixin.Observable"],isReader:true,config:{idProperty:undefined,clientIdProperty:"clientId",totalProperty:"total",successProperty:"success",messageProperty:null,rootProperty:"",implicitIncludes:true,model:undefined},constructor:function(a){this.initConfig(a)},fieldCount:0,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},applyIdProperty:function(a){if(!a&&this.getModel()){a=this.getModel().getIdProperty()}return a},updateModel:function(a){if(a){if(!this.getIdProperty()){this.setIdProperty(a.getIdProperty())}this.buildExtractors()}},createAccessor:Ext.emptyFn,createFieldAccessExpression:function(){return"undefined"},buildExtractors:function(){if(!this.getModel()){return}var b=this,c=b.getTotalProperty(),a=b.getSuccessProperty(),d=b.getMessageProperty();if(c){b.getTotal=b.createAccessor(c)}if(a){b.getSuccess=b.createAccessor(a)}if(d){b.getMessage=b.createAccessor(d)}b.extractRecordData=b.buildRecordDataExtractor()},buildRecordDataExtractor:function(){var k=this,e=k.getModel(),g=e.getFields(),j=g.length,a=[],h=k.getModel().getClientIdProperty(),f="__field",b=["var me = this,\n"," fields = me.getModel().getFields(),\n"," idProperty = me.getIdProperty(),\n",' idPropertyIsFn = (typeof idProperty == "function"),'," value,\n"," internalId"],d,l,c,m;g=g.items;for(d=0;d=0){return Ext.functionFactory("obj","var value; try {value = obj"+(b>0?".":"")+c+"} catch(e) {}; return value;")}}return function(d){return d[c]}}}(),createFieldAccessExpression:function(g,b,c){var f=this,h=f.objectRe,e=(g.getMapping()!==null),a=e?g.getMapping():g.getName(),i,d;if(typeof a==="function"){i=b+".getMapping()("+c+", this)"}else{if(f.getUseSimpleAccessors()===true||((d=String(a).search(h))<0)){if(!e||isNaN(a)){a='"'+a+'"'}i=c+"["+a+"]"}else{i=c+(d>0?".":"")+a}}return i}});Ext.define("Ext.data.proxy.Proxy",{extend:"Ext.Evented",alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json","Ext.data.Batch","Ext.data.Operation"],config:{batchOrder:"create,update,destroy",batchActions:true,model:null,reader:{type:"json"},writer:{type:"json"}},isProxy:true,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},updateModel:function(b){if(b){var a=this.getReader();if(a&&!a.getModel()){a.setModel(b)}}},applyReader:function(b,a){return Ext.factory(b,Ext.data.Reader,a,"reader")},updateReader:function(a){if(a){var b=this.getModel();if(!b){b=a.getModel();if(b){this.setModel(b)}}else{a.setModel(b)}if(a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}}},onMetaChange:function(b){var a=this.getReader().getModel();if(!this.getModel()&&a){this.setModel(a)}this.fireEvent("metachange",this,b)},applyWriter:function(b,a){return Ext.factory(b,Ext.data.Writer,a,"writer")},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.getReader(),this.getWriter())},batch:function(e,f){var g=this,d=g.getBatchActions(),c=this.getModel(),b,a;if(e.operations===undefined){e={operations:e,batch:{listeners:f}}}if(e.batch){if(e.batch.isBatch){e.batch.setProxy(g)}else{e.batch.proxy=g}}else{e.batch={proxy:g,listeners:e.listeners||{}}}if(!b){b=new Ext.data.Batch(e.batch)}b.on("complete",Ext.bind(g.onBatchComplete,g,[e],0));Ext.each(g.getBatchOrder().split(","),function(h){a=e.operations[h];if(a){if(d){b.add(new Ext.data.Operation({action:h,records:a,model:c}))}else{Ext.each(a,function(i){b.add(new Ext.data.Operation({action:h,records:[i],model:c}))})}}},g);b.start();return b},onBatchComplete:function(a,b){var c=a.scope||this;if(b.hasException){if(Ext.isFunction(a.failure)){Ext.callback(a.failure,c,[b,a])}}else{if(Ext.isFunction(a.success)){Ext.callback(a.success,c,[b,a])}}if(Ext.isFunction(a.callback)){Ext.callback(a.callback,c,[b,a])}}},function(){});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.proxy.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",isMemoryProxy:true,config:{data:[]},finishOperation:function(b,f,d){if(b){var c=0,e=b.getRecords(),a=e.length;for(c;c0){if(o){h[e]=m[0].getProperty();h[b]=m[0].getDirection()}else{h[e]=n.encodeSorters(m)}}if(c&&f&&f.length>0){h[c]=n.encodeFilters(f)}return h},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.getNoCache()){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.getCacheString(),Ext.Date.now()))}return a},getUrl:function(a){return a?a.getUrl()||this.getApi()[a.getAction()]||this._url:this._url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],config:{defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true},doRequest:function(a,f,b){var d=this,c=d.buildRequest(a),e=c.getParams();c.setConfig({callbackKey:d.getCallbackKey(),timeout:d.getTimeout(),scope:d,callback:d.createRequestCallback(c,a,f,b)});if(d.getAutoAppendParams()){c.setParams({})}c.setJsonP(Ext.data.JsonP.request(c.getCurrentConfig()));c.setParams(e);a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(h,f,g){delete c.lastRequest;c.processResponse(h,a,d,f,e,b)}},setException:function(b,a){b.setException(b.getRequest().getJsonP().errorType)},buildUrl:function(f){var h=this,a=h.callParent(arguments),e=Ext.apply({},f.getParams()),c=e.filters,d,b,g,j;delete e.filters;if(h.getAutoAppendParams()){a=Ext.urlAppend(a,Ext.Object.toQueryString(e))}if(c&&c.length){for(g=0;g1){this.endAnimationCounter=0;this.fireEvent("animationend",this)}},applyInAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},applyOutAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},updateInAnimation:function(a){a.setScope(this)},updateOutAnimation:function(a){a.setScope(this)},onActiveItemChange:function(a,e,h,i,d){var b=this.getInAnimation(),g=this.getOutAnimation(),f,c;if(e&&h&&h.isPainted()){f=e.renderElement;c=h.renderElement;b.setElement(f);g.setElement(c);g.setOnBeforeEnd(function(j,k){if(k||Ext.Animator.hasRunningAnimations(j)){d.firingArguments[1]=null;d.firingArguments[2]=null}});g.setOnEnd(function(){d.resume()});f.dom.style.setProperty("visibility","hidden","!important");e.show();Ext.Animator.run([g,b]);d.pause()}}});Ext.define("Ext.fx.layout.card.Cover",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cover",config:{reverse:null,inAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out"},outAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1},out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Cube",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cube",config:{reverse:null,inAnimation:{type:"cube"},outAnimation:{type:"cube",out:true}}});Ext.define("Ext.fx.layout.card.Fade",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.fade",config:{reverse:null,inAnimation:{type:"fade",easing:"ease-out"},outAnimation:{type:"fade",easing:"ease-out",out:true}}});Ext.define("Ext.fx.layout.card.Flip",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.flip",config:{duration:500,inAnimation:{type:"flip",half:true,easing:"ease-out",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null}},outAnimation:{type:"flip",half:true,easing:"ease-in",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null},out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Pop",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.pop",config:{duration:500,inAnimation:{type:"pop",easing:"ease-out"},outAnimation:{type:"pop",easing:"ease-in",out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Reveal",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.reveal",config:{inAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1}},outAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Slide",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.slide",config:{inAnimation:{type:"slide",easing:"ease-out"},outAnimation:{type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.Card",{requires:["Ext.fx.layout.card.Slide","Ext.fx.layout.card.Cover","Ext.fx.layout.card.Reveal","Ext.fx.layout.card.Fade","Ext.fx.layout.card.Flip","Ext.fx.layout.card.Pop","Ext.fx.layout.card.Scroll"],constructor:function(b){var a=Ext.fx.layout.card.Abstract,c;if(!b){return null}if(typeof b=="string"){c=b;b={}}else{if(b.type){c=b.type}}b.elementBox=false;if(c){if(Ext.os.is.Android2){if(c!="fade"){c="scroll"}}else{if(c==="slide"&&Ext.browser.is.ChromeMobile){c="scroll"}}a=Ext.ClassManager.getByAlias("fx.layout.card."+c)}return Ext.factory(b,a)}});Ext.define("Ext.fx.runner.Css",{extend:"Ext.Evented",requires:["Ext.fx.Animation"],prefixedProperties:{transform:true,"transform-origin":true,perspective:true,"transform-style":true,transition:true,"transition-property":true,"transition-duration":true,"transition-timing-function":true,"transition-delay":true,animation:true,"animation-name":true,"animation-duration":true,"animation-iteration-count":true,"animation-direction":true,"animation-timing-function":true,"animation-delay":true},lengthProperties:{top:true,right:true,bottom:true,left:true,width:true,height:true,"max-height":true,"max-width":true,"min-height":true,"min-width":true,"margin-bottom":true,"margin-left":true,"margin-right":true,"margin-top":true,"padding-bottom":true,"padding-left":true,"padding-right":true,"padding-top":true,"border-bottom-width":true,"border-left-width":true,"border-right-width":true,"border-spacing":true,"border-top-width":true,"border-width":true,"outline-width":true,"letter-spacing":true,"line-height":true,"text-indent":true,"word-spacing":true,"font-size":true,translate:true,translateX:true,translateY:true,translateZ:true,translate3d:true},durationProperties:{"transition-duration":true,"transition-delay":true,"animation-duration":true,"animation-delay":true},angleProperties:{rotate:true,rotateX:true,rotateY:true,rotateZ:true,skew:true,skewX:true,skewY:true},lengthUnitRegex:/([a-z%]*)$/,DEFAULT_UNIT_LENGTH:"px",DEFAULT_UNIT_ANGLE:"deg",DEFAULT_UNIT_DURATION:"ms",formattedNameCache:{},constructor:function(){var a=Ext.feature.has.Css3dTransforms;if(a){this.transformMethods=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","scaleX","scaleY","scaleZ"]}else{this.transformMethods=["translateX","translateY","rotate","skewX","skewY","scaleX","scaleY"]}this.vendorPrefix=Ext.browser.getStyleDashPrefix();this.ruleStylesCache={};return this},getStyleSheet:function(){var c=this.styleSheet,a,b;if(!c){a=document.createElement("style");a.type="text/css";(document.head||document.getElementsByTagName("head")[0]).appendChild(a);b=document.styleSheets;this.styleSheet=c=b[b.length-1]}return c},applyRules:function(i){var g=this.getStyleSheet(),k=this.ruleStylesCache,j=g.cssRules,c,e,h,b,d,a,f;for(c in i){e=i[c];h=k[c];if(h===undefined){d=j.length;g.insertRule(c+"{}",d);h=k[c]=j.item(d).style}b=h.$cache;if(!b){b=h.$cache={}}for(a in e){f=this.formatValue(e[a],a);a=this.formatName(a);if(b[a]!==f){b[a]=f;if(f===null){h.removeProperty(a)}else{h.setProperty(a,f,"important")}}}}return this},applyStyles:function(d){var g,c,f,b,a,e;for(g in d){c=document.getElementById(g);if(!c){return this}f=c.style;b=d[g];for(a in b){e=this.formatValue(b[a],a);a=this.formatName(a);if(e===null){f.removeProperty(a)}else{f.setProperty(a,e,"important")}}}return this},formatName:function(b){var a=this.formattedNameCache,c=a[b];if(!c){if(this.prefixedProperties[b]){c=this.vendorPrefix+b}else{c=b}a[b]=c}return c},formatValue:function(j,b){var g=typeof j,l=this.DEFAULT_UNIT_LENGTH,e,a,d,f,c,k,h;if(g=="string"){if(this.lengthProperties[b]){h=j.match(this.lengthUnitRegex)[1];if(h.length>0){}else{return j+l}}return j}else{if(g=="number"){if(j==0){return"0"}if(this.lengthProperties[b]){return j+l}if(this.angleProperties[b]){return j+this.DEFAULT_UNIT_ANGLE}if(this.durationProperties[b]){return j+this.DEFAULT_UNIT_DURATION}}else{if(b==="transform"){e=this.transformMethods;c=[];for(d=0,f=e.length;d0)?k.join(", "):"none"}}}}return j}});Ext.define("Ext.fx.runner.CssTransition",{extend:"Ext.fx.runner.Css",listenersAttached:false,constructor:function(){this.runningAnimationsData={};return this.callParent(arguments)},attachListeners:function(){this.listenersAttached=true;this.getEventDispatcher().addListener("element","*","transitionend","onTransitionEnd",this)},onTransitionEnd:function(b){var a=b.target,c=a.id;if(c&&this.runningAnimationsData.hasOwnProperty(c)){this.refreshRunningAnimationsData(Ext.get(a),[b.browserEvent.propertyName])}},onAnimationEnd:function(g,f,d,j,n){var c=g.getId(),k=this.runningAnimationsData[c],o={},m={},b,h,e,l,a;d.un("stop","onAnimationStop",this);if(k){b=k.nameMap}o[c]=m;if(f.onBeforeEnd){f.onBeforeEnd.call(f.scope||this,g,j)}d.fireEvent("animationbeforeend",d,g,j);this.fireEvent("animationbeforeend",this,d,g,j);if(n||(!j&&!f.preserveEndState)){h=f.toPropertyNames;for(e=0,l=h.length;e0},refreshRunningAnimationsData:function(d,k,t,p){var g=d.getId(),q=this.runningAnimationsData,a=q[g];if(!a){return}var m=a.nameMap,s=a.nameList,b=a.sessions,f,h,e,u,l,c,r,o,n=false;t=Boolean(t);p=Boolean(p);if(!b){return this}f=b.length;if(f===0){return this}if(p){a.nameMap={};s.length=0;for(l=0;l");d.close();this.testElement=c=d.createElement("div");c.style.setProperty("position","absolute","!important");d.body.appendChild(c);this.testElementComputedStyle=window.getComputedStyle(c)}return c},getCssStyleValue:function(b,e){var d=this.getTestElement(),a=this.testElementComputedStyle,c=d.style;c.setProperty(b,e);e=a.getPropertyValue(b);c.removeProperty(b);return e},run:function(p){var F=this,h=this.lengthProperties,x={},E={},G={},d,s,y,e,u,I,v,q,r,a,A,z,o,B,l,t,g,C,H,k,f,w,n,c,D,b,m;if(!this.listenersAttached){this.attachListeners()}p=Ext.Array.from(p);for(A=0,o=p.length;A0){this.refreshRunningAnimationsData(d,Ext.Array.merge(I,v),true,G.replacePrevious)}c=a.nameMap;D=a.nameList;t={};for(z=0;z0){I=Ext.Array.difference(D,I);v=Ext.Array.merge(I,v);y["transition-property"]=I}E[s]=e=Ext.Object.chain(e);e["transition-property"]=v;e["transition-duration"]=G.duration;e["transition-timing-function"]=G.easing;e["transition-delay"]=G.delay;B.startTime=Date.now()}r=this.$className;this.applyStyles(x);q=function(i){if(i.data===r&&i.source===window){window.removeEventListener("message",q,false);F.applyStyles(E)}};window.addEventListener("message",q,false);window.postMessage(r,"*")},onAnimationStop:function(d){var f=this.runningAnimationsData,h,a,g,b,c,e;for(h in f){if(f.hasOwnProperty(h)){a=f[h];g=a.sessions;for(b=0,c=g.length;b component"})},reapply:function(){this.container.innerElement.addCls(this.cls);this.updatePack(this.getPack());this.updateAlign(this.getAlign())},unapply:function(){this.container.innerElement.removeCls(this.cls);this.updatePack(null);this.updateAlign(null)},doItemAdd:function(d,b){this.callParent(arguments);if(d.isInnerItem()){var c=d.getConfig(this.sizePropertyName),a=d.config;if(!c&&("flex" in a)){this.setItemFlex(d,a.flex)}}},doItemRemove:function(a){if(a.isInnerItem()){this.setItemFlex(a,null)}this.callParent(arguments)},onItemSizeChange:function(a){this.setItemFlex(a,null)},doItemCenteredChange:function(b,a){if(a){this.setItemFlex(b,null)}this.callParent(arguments)},doItemFloatingChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},doItemDockedChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},redrawContainer:function(){var a=this.container,b=a.renderElement.dom.parentNode;if(b&&b.nodeType!==11){a.innerElement.redraw()}},setItemFlex:function(c,a){var b=c.element,d=this.flexItemCls;if(a){b.addCls(d)}else{if(b.hasCls(d)){this.redrawContainer();b.removeCls(d)}}b.dom.style.webkitBoxFlex=a},convertPosition:function(a){if(this.positionMap.hasOwnProperty(a)){return this.positionMap[a]}return a},applyAlign:function(a){return this.convertPosition(a)},updateAlign:function(a){this.container.innerElement.dom.style.webkitBoxAlign=a},applyPack:function(a){return this.convertPosition(a)},updatePack:function(a){this.container.innerElement.dom.style.webkitBoxPack=a}});Ext.define("Ext.layout.Fit",{extend:"Ext.layout.Default",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",cls:Ext.baseCSSPrefix+"layout-fit",itemCls:Ext.baseCSSPrefix+"layout-fit-item",constructor:function(a){this.callParent(arguments);this.apply()},apply:function(){this.container.innerElement.addCls(this.cls)},reapply:function(){this.apply()},unapply:function(){this.container.innerElement.removeCls(this.cls)},doItemAdd:function(b,a){if(b.isInnerItem()){b.addCls(this.itemCls)}this.callParent(arguments)},doItemRemove:function(a){if(a.isInnerItem()){a.removeCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.Card",{extend:"Ext.layout.Fit",alternateClassName:"Ext.layout.CardLayout",isCard:true,requires:["Ext.fx.layout.Card"],alias:"layout.card",cls:Ext.baseCSSPrefix+"layout-card",itemCls:Ext.baseCSSPrefix+"layout-card-item",constructor:function(){this.callParent(arguments);this.container.onInitialized(this.onContainerInitialized,this)},applyAnimation:function(a){return new Ext.fx.layout.Card(a)},updateAnimation:function(b,a){if(b&&b.isAnimation){b.setLayout(this)}if(a){a.destroy()}},doItemAdd:function(b,a){if(b.isInnerItem()){b.hide()}this.callParent(arguments)},getInnerItemsContainer:function(){var a=this.innerItemsContainer;if(!a){this.innerItemsContainer=a=Ext.Element.create({className:this.cls+"-container"});this.container.innerElement.append(a)}return a},doItemRemove:function(c,a,b){this.callParent(arguments);if(!b&&c.isInnerItem()){c.show()}},onContainerInitialized:function(a){var b=a.getActiveItem();if(b){b.show()}a.on("activeitemchange","onContainerActiveItemChange",this)},onContainerActiveItemChange:function(a){this.relayEvent(arguments,"doActiveItemChange")},doActiveItemChange:function(b,c,a){if(a){a.hide()}if(c){c.show()}},doItemDockedChange:function(b,c){var a=b.element;if(c){a.removeCls(this.itemCls)}else{a.addCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.HBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.HBoxLayout",alias:"layout.hbox",sizePropertyName:"width",sizeChangeEventName:"widthchange",cls:Ext.baseCSSPrefix+"layout-hbox"});Ext.define("Ext.layout.VBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.VBoxLayout",alias:"layout.vbox",sizePropertyName:"height",sizeChangeEventName:"heightchange",cls:Ext.baseCSSPrefix+"layout-vbox"});Ext.define("Ext.layout.Layout",{requires:["Ext.layout.Fit","Ext.layout.Card","Ext.layout.HBox","Ext.layout.VBox"],constructor:function(a,b){var c=Ext.layout.Default,d,e;if(typeof b=="string"){d=b;b={}}else{if("type" in b){d=b.type}}if(d){c=Ext.ClassManager.getByAlias("layout."+d)}return new c(a,b)}});Ext.define("Ext.mixin.Sortable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Sorter"],mixinConfig:{id:"sortable"},config:{sorters:null,defaultSortDirection:"ASC",sortRoot:null},dirtySortFn:false,sortFn:null,sorted:false,applySorters:function(a,b){if(!b){b=this.createSortersCollection()}b.clear();this.sorted=false;if(a){this.addSorters(a)}return b},createSortersCollection:function(){this._sorters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._sorters},addSorter:function(b,a){this.addSorters([b],a)},addSorters:function(c,a){var b=this.getSorters();return this.insertSorters(b?b.length:0,c,a)},insertSorter:function(a,c,b){return this.insertSorters(a,[c],b)},insertSorters:function(e,h,a){if(!Ext.isArray(h)){h=[h]}var f=h.length,j=a||this.getDefaultSortDirection(),c=this.getSortRoot(),k=this.getSorters(),l=[],g,b,m,d;if(!k){k=this.createSortersCollection()}for(b=0;b>1;f=d(e,b[c]);if(f>=0){h=c+1}else{if(f<0){a=c-1}}}return h}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.mixin.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,f=e,c=b,a;if(arguments.length==1){f=c;c=d.getKey(f)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,f)}d.map[c]=f}d.length++;d.items.push(f);d.keys.push(c);d.fireEvent("add",d.length-1,f,c);return f},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(f){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(f)){b=arguments.length>1?arguments:f;for(a=b.length;d=d.length){return d.add(c,f)}d.length++;Ext.Array.splice(d.items,a,0,f);if(typeof c!="undefined"&&c!==null){d.map[c]=f}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,f,c);return f},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(g,b,h,a){var c=this.extractValues(g,b),f=c.length,e=0,d;h=h||0;a=(a||a===0)?a:f-1;for(d=h;d<=a;d++){e+=c[d]}return e},collect:function(j,e,g){var k=this.extractValues(j,e),a=k.length,b={},c=[],h,f,d;for(d=0;d=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,f,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:f,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(g){var m=true,n=b.length,h;for(h=0;h=e.length||(a&&e.getAutoSort())){return e.add(d,f)}if(typeof d!="undefined"&&d!==null){if(typeof g[d]!="undefined"){e.replace(d,f);return false}g[d]=f}this.all.push(f);if(b&&this.getAutoFilter()&&this.mixins.filterable.isFiltered.call(e,f)){return null}e.length++;Ext.Array.splice(e.items,c,0,f);Ext.Array.splice(e.keys,c,0,d);e.dirtyIndices=true;return f},insertAll:function(g,d){if(g>=this.items.length||(this.sorted&&this.getAutoSort())){return this.addAll(d)}var s=this,h=this.filtered,a=this.sorted,b=this.all,m=this.items,l=this.keys,r=this.map,n=this.getAutoFilter(),o=this.getAutoSort(),t=[],j=[],f=[],c=this.mixins.filterable,e=false,k,u,p,q;if(a&&this.getAutoSort()){}if(Ext.isObject(d)){for(u in d){if(d.hasOwnProperty(u)){j.push(m[u]);t.push(u)}}}else{j=d;k=d.length;for(p=0;p=0){e=a[b];c=f[b];if(typeof c!="undefined"){delete g.map[c]}Ext.Array.erase(a,b,1);Ext.Array.erase(f,b,1);Ext.Array.remove(d,e);delete g.indices[c];g.length--;this.dirtyIndices=true;return e}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[this.getKey(b)];return(a===undefined)?-1:a},indexOfKey:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[b];return(a===undefined)?-1:a},updateIndices:function(){var a=this.items,e=a.length,f=this.indices={},c,d,b;for(c=0;c=a;d--){b[b.length]=c[d]}}return b},findIndexBy:function(d,c,h){var g=this,f=g.keys,a=g.items,b=h||0,e=a.length;for(;b1){for(c=a.length;ba){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!=-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.util.Format.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.util.Format.escapeRe,"\\$1")},toggle:function(b,c,a){return b==c?a:c},trim:function(a){return a.replace(Ext.util.Format.trimRe,"")},leftPad:function(d,b,c){var a=String(d);c=c||" ";while(a.length/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},date:function(b,c){var a=b;if(!b){return""}if(!Ext.isDate(b)){a=new Date(Date.parse(b));if(isNaN(a)){if(this.iso8601TestRe.test(b)){a=b.split(this.iso8601SplitRe);a=new Date(a[0],a[1]-1,a[2],a[3],a[4],a[5])}if(isNaN(a)){a=new Date(Date.parse(b.replace(this.dashesRe,"/")))}}b=a}return Ext.Date.format(b,c||Ext.util.Format.defaultDateFormat)}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e>1){for(;cf)?1:((ba?1:(d0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,j,h){var f=this,c,e,d,g,a;if(Ext.isArray(b)){for(c=0,e=b.length;c0){Ext.Array.sort(d,f);for(c=0;cMath.max(c,b)||jMath.max(a,q)||eMath.max(p,n)||eMath.max(k,h)){return null}return new Ext.util.Point(j,e)},toString:function(){return this.point1.toString()+" "+this.point2.toString()}});Ext.define("Ext.util.SizeMonitor",{extend:"Ext.Evented",config:{element:null,detectorCls:Ext.baseCSSPrefix+"size-change-detector",callback:Ext.emptyFn,scope:null,args:[]},constructor:function(d){this.initConfig(d);this.doFireSizeChangeEvent=Ext.Function.bind(this.doFireSizeChangeEvent,this);var g=this,e=this.getElement().dom,b=this.getDetectorCls(),c=Ext.Element.create({classList:[b,b+"-expand"],children:[{}]},true),h=Ext.Element.create({classList:[b,b+"-shrink"],children:[{}]},true),a=function(i){g.onDetectorScroll("expand",i)},f=function(i){g.onDetectorScroll("shrink",i)};e.appendChild(c);e.appendChild(h);this.detectors={expand:c,shrink:h};this.position={expand:{left:0,top:0},shrink:{left:0,top:0}};this.listeners={expand:a,shrink:f};this.refresh();c.addEventListener("scroll",a,true);h.addEventListener("scroll",f,true)},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(a){a.on("destroy","destroy",this)},refreshPosition:function(b){var e=this.detectors[b],a=this.position[b],d,c;a.left=d=e.scrollWidth-e.offsetWidth;a.top=c=e.scrollHeight-e.offsetHeight;e.scrollLeft=d;e.scrollTop=c},refresh:function(){this.refreshPosition("expand");this.refreshPosition("shrink")},onDetectorScroll:function(b){var c=this.detectors[b],a=this.position[b];if(c.scrollLeft!==a.left||c.scrollTop!==a.top){this.refresh();this.fireSizeChangeEvent()}},fireSizeChangeEvent:function(){clearTimeout(this.sizeChangeThrottleTimer);this.sizeChangeThrottleTimer=setTimeout(this.doFireSizeChangeEvent,1)},doFireSizeChangeEvent:function(){this.getCallback().apply(this.getScope(),this.getArgs())},destroyDetector:function(a){var c=this.detectors[a],b=this.listeners[a];c.removeEventListener("scroll",b,true);Ext.removeNode(c)},destroy:function(){this.callParent(arguments);this.destroyDetector("expand");this.destroyDetector("shrink");delete this.listeners;delete this.detectors}});Ext.define("Ext.event.publisher.ComponentSize",{extend:"Ext.event.publisher.Publisher",requires:["Ext.ComponentManager","Ext.util.SizeMonitor"],targetType:"component",handledEvents:["resize"],constructor:function(){this.callParent(arguments);this.sizeMonitors={}},subscribe:function(g){var c=g.match(this.idSelectorRegex),f=this.subscribers,a=this.sizeMonitors,d=this.dispatcher,e=this.targetType,b;if(!c){return false}if(!f.hasOwnProperty(g)){f[g]=0;d.addListener(e,g,"painted","onComponentPainted",this,null,"before");b=Ext.ComponentManager.get(c[1]);a[g]=new Ext.util.SizeMonitor({element:b.element,callback:this.onComponentSizeChange,scope:this,args:[this,g]})}f[g]++;return true},unsubscribe:function(h,b,e){var c=h.match(this.idSelectorRegex),g=this.subscribers,d=this.dispatcher,f=this.targetType,a=this.sizeMonitors;if(!c){return false}if(!g.hasOwnProperty(h)||(!e&&--g[h]>0)){return true}a[h].destroy();delete a[h];d.removeListener(f,h,"painted","onComponentPainted",this,"before");delete g[h];return true},onComponentPainted:function(b){var c=b.getObservableId(),a=this.sizeMonitors[c];a.refresh()},onComponentSizeChange:function(a,b){this.dispatcher.doDispatchEvent(this.targetType,b,"resize",[a])}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create("Ext.util.AbstractMixedCollection",false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(g,f,c,e){var d=this,h,b,a;if(Ext.isArray(g)){e=c;c=f;a=g}else{if(Ext.isObject(g)){e=c;c=f;a=[g]}else{if(Ext.isString(g)){h=d.sorters.get(g);if(!h){h={property:g,direction:f};a=[h]}else{if(f===undefined){h.toggle()}else{h.setDirection(f)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){g=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(g)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}if(e!==false){d.onBeforeSort(a)}}if(e!==false){g=d.sorters.items;if(g.length){b=function(l,k){var j=g[0].sort(l,k),n=g.length,m;for(m=1;me?1:(f0){g=f.data.items;r=g.length;for(k=0;k0){b.create=e;f=true}if(c.length>0){b.update=c;f=true}if(a.length>0){b.destroy=a;f=true}if(f&&d.fireEvent("beforesync",this,b)!==false){d.getProxy().batch({operations:b,listeners:d.getBatchListeners()})}return{added:e,updated:c,removed:a}},first:function(){return this.data.first()},last:function(){return this.data.last()},sum:function(e){var d=0,c=0,b=this.data.items,a=b.length;for(;c0){c=b[0].get(f)}for(;d0){a=c[0].get(f)}for(;da){a=e}}return a},average:function(e){var c=0,b=this.data.items,a=b.length,d=0;if(b.length>0){for(;ce){return 1}else{if(fa.data.index)?1:-1},applyFilters:function(b){var a=this;return function(c){return a.isVisible(c)}},applyProxy:function(a){},applyNode:function(a){if(a){a=Ext.data.NodeInterface.decorate(a)}return a},updateNode:function(a,c){if(c&&!c.isDestroyed){c.un({append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad",scope:this});c.unjoin(this)}if(a){a.on({scope:this,append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad"});a.join(this);var b=[];if(a.childNodes.length){b=b.concat(this.retrieveChildNodes(a))}if(this.getRootVisible()){b.push(a)}else{if(a.isLoaded()||a.isLoading()){a.set("expanded",true)}}this.data.clear();this.fireEvent("clear",this);this.suspendEvents();this.add(b);this.resumeEvents();this.fireEvent("refresh",this,this.data)}},retrieveChildNodes:function(a){var d=this.getNode(),b=this.getRecursive(),c=[],e=a;if(!a.childNodes.length||(!b&&a!==d)){return c}if(!b){return a.childNodes}while(e){if(e._added){delete e._added;if(e===a){break}else{e=e.nextSibling||e.parentNode}}else{if(e!==a){c.push(e)}if(e.firstChild){e._added=true;e=e.firstChild}else{e=e.nextSibling||e.parentNode}}}return c},isVisible:function(b){var a=b.parentNode;if(!this.getRecursive()&&a!==this.getNode()){return false}while(a){if(!a.isExpanded()){return false}if(a===this.getNode()){break}a=a.parentNode}return true}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.NodeStore",alias:"store.tree",config:{root:undefined,clearOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",recursive:true},applyProxy:function(){return Ext.data.Store.prototype.applyProxy.apply(this,arguments)},applyRoot:function(a){var b=this;a=a||{};a=Ext.apply({},a);if(!a.isModel){Ext.applyIf(a,{id:b.getStoreId()+"-"+b.getDefaultRootId(),text:"Root",allowDrag:false});a=Ext.data.ModelManager.create(a,b.getModel())}Ext.data.NodeInterface.decorate(a);a.set(a.raw);return a},handleTreeInsertionIndex:function(a,b,d,c){if(b.parentNode){b.parentNode.sort(d.getSortFn(),true,true)}return this.callParent(arguments)},handleTreeSort:function(a,b){if(this._sorting){return a}this._sorting=true;this.getNode().sort(b.getSortFn(),true,true);delete this._sorting;return this.callParent(arguments)},updateRoot:function(a,b){if(b){b.unBefore({expand:"onNodeBeforeExpand",scope:this});b.unjoin(this)}a.onBefore({expand:"onNodeBeforeExpand",scope:this});this.onNodeAppend(null,a);this.setNode(a);if(!a.isLoaded()&&!a.isLoading()&&a.isExpanded()){this.load({node:a})}this.fireEvent("rootchange",this,a,b)},getNodeById:function(a){return this.data.getByKey(a)},onNodeBeforeExpand:function(b,a,c){if(b.isLoading()){c.pause();this.on("load",function(){c.resume()},this,{single:true})}else{if(!b.isLoaded()){c.pause();this.load({node:b,callback:function(){c.resume()}})}}},onNodeAppend:function(n,c){var l=this.getProxy(),j=l.getReader(),b=this.getModel(),g=c.raw,d=[],a=j.getRootProperty(),m,h,f,k,e;if(!c.isLeaf()){m=j.getRoot(g);if(m){h=j.extractData(m);for(f=0,k=h.length;f0){this.sendRequest(b==1?a[0]:a);this.callBuffer=[]}}});Ext.define("Ext.util.TapRepeater",{requires:["Ext.DateExtras"],mixins:{observable:"Ext.mixin.Observable"},config:{el:null,accelerate:true,interval:10,delay:250,preventDefault:true,stopDefault:false,timer:0,pressCls:null},constructor:function(a){var b=this;b.initConfig(a)},updateEl:function(c,b){var a={touchstart:"onTouchStart",touchend:"onTouchEnd",tap:"eventOptions",scope:this};if(b){b.un(a)}c.on(a)},eventOptions:function(a){if(this.getPreventDefault()){a.preventDefault()}if(this.getStopDefault()){a.stopEvent()}},destroy:function(){this.clearListeners();Ext.destroy(this.el)},onTouchStart:function(c){var b=this,a=b.getPressCls();clearTimeout(b.getTimer());if(a){b.getEl().addCls(a)}b.tapStartTime=new Date();b.fireEvent("touchstart",b,c);b.fireEvent("tap",b,c);if(b.getAccelerate()){b.delay=400}b.setTimer(Ext.defer(b.tap,b.getDelay()||b.getInterval(),b,[c]))},tap:function(b){var a=this;a.fireEvent("tap",a,b);a.setTimer(Ext.defer(a.tap,a.getAccelerate()?a.easeOutExpo(Ext.Date.getElapsed(a.tapStartTime),400,-390,12000):a.getInterval(),a,[b]))},easeOutExpo:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},onTouchEnd:function(b){var a=this;clearTimeout(a.getTimer());a.getEl().removeCls(a.getPressCls());a.fireEvent("touchend",a,b)}});Ext.define("Ext.util.translatable.Abstract",{extend:"Ext.Evented",requires:["Ext.fx.easing.Linear"],config:{element:null,easing:null,easingX:null,easingY:null,fps:60},constructor:function(a){var b;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.x=0;this.y=0;this.activeEasingX=null;this.activeEasingY=null;this.initialConfig=a;if(a&&a.element){b=a.element;this.setElement(b)}},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initConfig(this.initialConfig);this.refresh()},factoryEasing:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")},applyEasing:function(a){if(!this.getEasingX()){this.setEasingX(this.factoryEasing(a))}if(!this.getEasingY()){this.setEasingY(this.factoryEasing(a))}},applyEasingX:function(a){return this.factoryEasing(a)},applyEasingY:function(a){return this.factoryEasing(a)},updateFps:function(a){this.animationInterval=1000/a},doTranslate:function(a,b){if(typeof a=="number"){this.x=a}if(typeof b=="number"){this.y=b}return this},translate:function(a,c,b){if(!this.getElement().dom){return}if(Ext.isObject(a)){throw new Error()}this.stopAnimation();if(b){return this.translateAnimated(a,c,b)}return this.doTranslate(a,c)},animate:function(b,a){this.activeEasingX=b;this.activeEasingY=a;this.isAnimating=true;this.animationTimer=setInterval(this.doAnimationFrame,this.animationInterval);this.fireEvent("animationstart",this,this.x,this.y);return this},translateAnimated:function(b,g,e){if(Ext.isObject(b)){throw new Error()}if(!Ext.isObject(e)){e={}}var d=Ext.Date.now(),f=e.easing,c=(typeof b=="number")?(e.easingX||this.getEasingX()||f||true):null,a=(typeof g=="number")?(e.easingY||this.getEasingY()||f||true):null;if(c){c=this.factoryEasing(c);c.setStartTime(d);c.setStartValue(this.x);c.setEndValue(b);if("duration" in e){c.setDuration(e.duration)}}if(a){a=this.factoryEasing(a);a.setStartTime(d);a.setStartValue(this.y);a.setEndValue(g);if("duration" in e){a.setDuration(e.duration)}}return this.animate(c,a)},doAnimationFrame:function(){var c=this.activeEasingX,b=this.activeEasingY,d=this.getElement(),a,e;if(!this.isAnimating||!d.dom){return}if(c===null&&b===null){this.stopAnimation();return}if(c!==null){this.x=a=Math.round(c.getValue());if(c.isEnded){this.activeEasingX=null;this.fireEvent("axisanimationend",this,"x",a)}}else{a=this.x}if(b!==null){this.y=e=Math.round(b.getValue());if(b.isEnded){this.activeEasingY=null;this.fireEvent("axisanimationend",this,"y",e)}}else{e=this.y}this.doTranslate(a,e);this.fireEvent("animationframe",this,a,e)},stopAnimation:function(){if(!this.isAnimating){return}this.activeEasingX=null;this.activeEasingY=null;this.isAnimating=false;clearInterval(this.animationTimer);this.fireEvent("animationend",this,this.x,this.y)},refresh:function(){this.translate(this.x,this.y)}});Ext.define("Ext.util.translatable.CssTransform",{extend:"Ext.util.translatable.Abstract",doTranslate:function(a,c){var b=this.getElement().dom.style;if(typeof a!="number"){a=this.x}if(typeof c!="number"){c=this.y}b.webkitTransform="translate3d("+a+"px, "+c+"px, 0px)";return this.callParent(arguments)},destroy:function(){var a=this.getElement();if(a&&!a.isDestroyed){a.dom.style.webkitTransform=null}this.callParent(arguments)}});Ext.define("Ext.util.translatable.ScrollPosition",{extend:"Ext.util.translatable.Abstract",wrapperWidth:0,wrapperHeight:0,baseCls:"x-translatable",config:{useWrapper:true},getWrapper:function(){var e=this.wrapper,c=this.baseCls,b=this.getElement(),d,a;if(!e){a=b.getParent();if(!a){return null}if(this.getUseWrapper()){e=b.wrap({className:c+"-wrapper"},true)}else{e=a.dom}e.appendChild(Ext.Element.create({className:c+"-stretcher"},true));this.nestedStretcher=d=Ext.Element.create({className:c+"-nested-stretcher"},true);b.appendChild(d);b.addCls(c);a.addCls(c+"-container");this.container=a;this.wrapper=e;this.refresh()}return e},doTranslate:function(a,c){var b=this.getWrapper();if(b){if(typeof a=="number"){b.scrollLeft=this.wrapperWidth-a}if(typeof c=="number"){b.scrollTop=this.wrapperHeight-c}}return this.callParent(arguments)},refresh:function(){var a=this.getWrapper();if(a){this.wrapperWidth=a.offsetWidth;this.wrapperHeight=a.offsetHeight;this.callParent(arguments)}},destroy:function(){var b=this.getElement(),a=this.baseCls;if(this.wrapper){if(this.getUseWrapper()){b.unwrap()}this.container.removeCls(a+"-container");b.removeCls(a);b.removeChild(this.nestedStretcher)}this.callParent(arguments)}});Ext.define("Ext.util.Translatable",{requires:["Ext.util.translatable.CssTransform","Ext.util.translatable.ScrollPosition"],constructor:function(a){var c=Ext.util.translatable,e=c.CssTransform,d=c.ScrollPosition,b;if(typeof a=="object"&&"translationMethod" in a){if(a.translationMethod==="scrollposition"){b=d}else{if(a.translationMethod==="csstransform"){b=e}}}if(!b){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){b=d}else{b=e}}return new b(a)}});Ext.define("Ext.behavior.Translatable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Translatable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.translatable.refresh()},setConfig:function(c){var a=this.translatable,b=this.component;if(c){if(!a){this.translatable=a=new Ext.util.Translatable(c);a.setElement(b.renderElement);a.on("destroy","onTranslatableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getTranslatable:function(){return this.translatable},onTranslatableDestroy:function(){var a=this.component;delete this.translatable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.translatable;if(a){a.destroy()}}});Ext.define("Ext.scroll.Scroller",{extend:"Ext.Evented",requires:["Ext.fx.easing.BoundMomentum","Ext.fx.easing.EaseOut","Ext.util.SizeMonitor","Ext.util.Translatable"],config:{element:null,direction:"auto",translationMethod:"auto",fps:"auto",disabled:null,directionLock:false,momentumEasing:{momentum:{acceleration:30,friction:0.5},bounce:{acceleration:30,springTension:0.3},minVelocity:1},bounceEasing:{duration:400},outOfBoundRestrictFactor:0.5,startMomentumResetTime:300,maxAbsoluteVelocity:6,containerSize:"auto",containerScrollSize:"auto",size:"auto",autoRefresh:true,initialOffset:{x:0,y:0},slotSnapSize:{x:0,y:0},slotSnapOffset:{x:0,y:0},slotSnapEasing:{duration:150}},cls:Ext.baseCSSPrefix+"scroll-scroller",containerCls:Ext.baseCSSPrefix+"scroll-container",dragStartTime:0,dragEndTime:0,isDragging:false,isAnimating:false,constructor:function(a){var b=a&&a.element;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.stopAnimation=Ext.Function.bind(this.stopAnimation,this);this.listeners={scope:this,touchstart:"onTouchStart",touchend:"onTouchEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd"};this.minPosition={x:0,y:0};this.startPosition={x:0,y:0};this.size={x:0,y:0};this.position={x:0,y:0};this.velocity={x:0,y:0};this.isAxisEnabledFlags={x:false,y:false};this.flickStartPosition={x:0,y:0};this.flickStartTime={x:0,y:0};this.lastDragPosition={x:0,y:0};this.dragDirection={x:0,y:0};this.initialConfig=a;if(b){this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initialize();a.addCls(this.cls);if(!this.getDisabled()){this.attachListeneners()}this.onConfigUpdate(["containerSize","size"],"refreshMaxPosition");this.on("maxpositionchange","snapToBoundary");this.on("minpositionchange","snapToBoundary");return this},getTranslatable:function(){if(!this.hasOwnProperty("translatable")){var a=this.getBounceEasing();this.translatable=new Ext.util.Translatable({translationMethod:this.getTranslationMethod(),element:this.getElement(),easingX:a.x,easingY:a.y,useWrapper:false,listeners:{animationframe:"onAnimationFrame",animationend:"onAnimationEnd",axisanimationend:"onAxisAnimationEnd",scope:this}})}return this.translatable},updateFps:function(a){if(a!=="auto"){this.getTranslatable().setFps(a)}},attachListeneners:function(){this.getContainer().on(this.listeners)},detachListeners:function(){this.getContainer().un(this.listeners)},updateDisabled:function(a){if(a){this.detachListeners()}else{this.attachListeneners()}},updateInitialOffset:function(c){if(typeof c=="number"){c={x:c,y:c}}var b=this.position,a,d;b.x=a=c.x;b.y=d=c.y;this.getTranslatable().doTranslate(-a,-d)},applyDirection:function(a){var e=this.getMinPosition(),d=this.getMaxPosition(),c,b;this.givenDirection=a;if(a==="auto"){c=d.x>e.x;b=d.y>e.y;if(c&&b){a="both"}else{if(c){a="horizontal"}else{a="vertical"}}}return a},updateDirection:function(b){var a=this.isAxisEnabledFlags;a.x=(b==="both"||b==="horizontal");a.y=(b==="both"||b==="vertical")},isAxisEnabled:function(a){this.getDirection();return this.isAxisEnabledFlags[a]},applyMomentumEasing:function(b){var a=Ext.fx.easing.BoundMomentum;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applyBounceEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applySlotSnapEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},getMinPosition:function(){var a=this.minPosition;if(!a){this.minPosition=a={x:0,y:0};this.fireEvent("minpositionchange",this,a)}return a},getMaxPosition:function(){var c=this.maxPosition,a,b;if(!c){a=this.getSize();b=this.getContainerSize();this.maxPosition=c={x:Math.max(0,a.x-b.x),y:Math.max(0,a.y-b.y)};this.fireEvent("maxpositionchange",this,c)}return c},refreshMaxPosition:function(){this.maxPosition=null;this.getMaxPosition()},applyContainerSize:function(b){var c=this.getContainer().dom,a,d;if(!c){return}this.givenContainerSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applySize:function(b){var c=this.getElement().dom,a,d;if(!c){return}this.givenSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applyContainerScrollSize:function(b){var c=this.getContainer().dom,a,d;if(!c){return}this.givenContainerScrollSize=b;if(b==="auto"){a=c.scrollWidth;d=c.scrollHeight}else{a=b.x;d=b.y}return{x:a,y:d}},updateAutoRefresh:function(b){var c=Ext.util.SizeMonitor,a;if(b){this.sizeMonitors={element:new c({element:this.getElement(),callback:this.doRefresh,scope:this}),container:new c({element:this.getContainer(),callback:this.doRefresh,scope:this})}}else{a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}}},applySlotSnapSize:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},applySlotSnapOffset:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},getContainer:function(){var a=this.container;if(!a){this.container=a=this.getElement().getParent();a.addCls(this.containerCls)}return a},doRefresh:function(){this.stopAnimation();this.getTranslatable().refresh();this.setSize(this.givenSize);this.setContainerSize(this.givenContainerSize);this.setContainerScrollSize(this.givenContainerScrollSize);this.setDirection(this.givenDirection);this.fireEvent("refresh",this)},refresh:function(){var a=this.sizeMonitors;if(a){a.element.refresh();a.container.refresh()}this.doRefresh();return this},scrollTo:function(c,h,g){var b=this.getTranslatable(),a=this.position,d=false,f,e;if(this.isAxisEnabled("x")){if(typeof c!="number"){c=a.x}else{if(a.x!==c){a.x=c;d=true}}f=-c}if(this.isAxisEnabled("y")){if(typeof h!="number"){h=a.y}else{if(a.y!==h){a.y=h;d=true}}e=-h}if(d){if(g!==undefined){b.translateAnimated(f,e,g)}else{this.fireEvent("scroll",this,a.x,a.y);b.doTranslate(f,e)}}return this},scrollToTop:function(b){var a=this.getInitialOffset();return this.scrollTo(a.x,a.y,b)},scrollToEnd:function(a){return this.scrollTo(0,this.getSize().y-this.getContainerSize().y,a)},scrollBy:function(b,d,c){var a=this.position;b=(typeof b=="number")?b+a.x:null;d=(typeof d=="number")?d+a.y:null;return this.scrollTo(b,d,c)},onTouchStart:function(){this.isTouching=true;this.stopAnimation()},onTouchEnd:function(){var a=this.position;this.isTouching=false;if(!this.isDragging&&this.snapToSlot()){this.fireEvent("scrollstart",this,a.x,a.y)}},onDragStart:function(l){var o=this.getDirection(),g=l.absDeltaX,f=l.absDeltaY,j=this.getDirectionLock(),i=this.startPosition,d=this.flickStartPosition,k=this.flickStartTime,h=this.lastDragPosition,c=this.position,b=this.dragDirection,n=c.x,m=c.y,a=Ext.Date.now();this.isDragging=true;if(j&&o!=="both"){if((o==="horizontal"&&g>f)||(o==="vertical"&&f>g)){l.stopPropagation()}else{this.isDragging=false;return}}h.x=n;h.y=m;d.x=n;d.y=m;i.x=n;i.y=m;k.x=a;k.y=a;b.x=0;b.y=0;this.dragStartTime=a;this.isDragging=true;this.fireEvent("scrollstart",this,n,m)},onAxisDrag:function(i,q){if(!this.isAxisEnabled(i)){return}var h=this.flickStartPosition,l=this.flickStartTime,j=this.lastDragPosition,e=this.dragDirection,g=this.position[i],k=this.getMinPosition()[i],o=this.getMaxPosition()[i],d=this.startPosition[i],p=j[i],n=d-q,c=e[i],m=this.getOutOfBoundRestrictFactor(),f=this.getStartMomentumResetTime(),b=Ext.Date.now(),a;if(no){a=n-o;n=o+a*m}}if(n>p){e[i]=1}else{if(nf){h[i]=g;l[i]=b}j[i]=n},onDrag:function(b){if(!this.isDragging){return}var a=this.lastDragPosition;this.onAxisDrag("x",b.deltaX);this.onAxisDrag("y",b.deltaY);this.scrollTo(a.x,a.y)},onDragEnd:function(c){var b,a;if(!this.isDragging){return}this.dragEndTime=Ext.Date.now();this.onDrag(c);this.isDragging=false;b=this.getAnimationEasing("x");a=this.getAnimationEasing("y");if(b||a){this.getTranslatable().animate(b,a)}else{this.onScrollEnd()}},getAnimationEasing:function(g){if(!this.isAxisEnabled(g)){return null}var e=this.position[g],f=this.flickStartPosition[g],k=this.flickStartTime[g],c=this.getMinPosition()[g],j=this.getMaxPosition()[g],a=this.getMaxAbsoluteVelocity(),d=null,b=this.dragEndTime,l,i,h;if(ej){d=j}}if(d!==null){l=this.getBounceEasing()[g];l.setConfig({startTime:b,startValue:-e,endValue:-d});return l}h=b-k;if(h===0){return null}i=(e-f)/(b-k);if(i===0){return null}if(i<-a){i=-a}else{if(i>a){i=a}}l=this.getMomentumEasing()[g];l.setConfig({startTime:b,startValue:-e,startVelocity:-i,minMomentumValue:-j,maxMomentumValue:0});return l},onAnimationFrame:function(c,b,d){var a=this.position;a.x=-b;a.y=-d;this.fireEvent("scroll",this,a.x,a.y)},onAxisAnimationEnd:function(a){},onAnimationEnd:function(){this.snapToBoundary();this.onScrollEnd()},stopAnimation:function(){this.getTranslatable().stopAnimation()},onScrollEnd:function(){var a=this.position;if(this.isTouching||!this.snapToSlot()){this.fireEvent("scrollend",this,a.x,a.y)}},snapToSlot:function(){var b=this.getSnapPosition("x"),a=this.getSnapPosition("y"),c=this.getSlotSnapEasing();if(b!==null||a!==null){this.scrollTo(b,a,{easingX:c.x,easingY:c.y});return true}return false},getSnapPosition:function(c){var g=this.getSlotSnapSize()[c],d=null,a,f,e,b;if(g!==0&&this.isAxisEnabled(c)){a=this.position[c];f=this.getSlotSnapOffset()[c];e=this.getMaxPosition()[c];b=(a-f)%g;if(b!==0){if(Math.abs(b)>g/2){d=a+((b>0)?g-b:b-g);if(d>e){d=a-b}}else{d=a-b}}}return d},snapToBoundary:function(){var g=this.position,c=this.getMinPosition(),f=this.getMaxPosition(),e=c.x,d=c.y,b=f.x,a=f.y,i=Math.round(g.x),h=Math.round(g.y);if(ib){i=b}}if(ha){h=a}}this.scrollTo(i,h)},destroy:function(){var b=this.getElement(),a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}if(b&&!b.isDestroyed){b.removeCls(this.cls);this.getContainer().removeCls(this.containerCls)}Ext.destroy(this.translatable);this.callParent(arguments)}},function(){});Ext.define("Ext.util.Draggable",{isDraggable:true,mixins:["Ext.mixin.Observable"],requires:["Ext.util.SizeMonitor","Ext.util.Translatable"],config:{cls:Ext.baseCSSPrefix+"draggable",draggingCls:Ext.baseCSSPrefix+"dragging",element:null,constraint:"container",disabled:null,direction:"both",initialOffset:{x:0,y:0},translatable:{}},DIRECTION_BOTH:"both",DIRECTION_VERTICAL:"vertical",DIRECTION_HORIZONTAL:"horizontal",defaultConstraint:{min:{x:-Infinity,y:-Infinity},max:{x:Infinity,y:Infinity}},sizeMonitor:null,containerSizeMonitor:null,constructor:function(a){var b;this.extraConstraint={};this.initialConfig=a;this.offset={x:0,y:0};this.listeners={dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",scope:this};if(a&&a.element){b=a.element;delete a.element;this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){a.on(this.listeners);this.sizeMonitor=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.initConfig(this.initialConfig)},updateInitialOffset:function(b){if(typeof b=="number"){b={x:b,y:b}}var c=this.offset,a,d;c.x=a=b.x;c.y=d=b.y;this.getTranslatable().doTranslate(a,d)},updateCls:function(a){this.getElement().addCls(a)},applyTranslatable:function(a,b){a=Ext.factory(a,Ext.util.Translatable,b);a.setElement(this.getElement());return a},setExtraConstraint:function(a){this.extraConstraint=a||{};this.refreshConstraint();return this},addExtraConstraint:function(a){Ext.merge(this.extraConstraint,a);this.refreshConstraint();return this},applyConstraint:function(a){this.currentConstraint=a;if(!a){a=this.defaultConstraint}if(a==="container"){return Ext.merge(this.getContainerConstraint(),this.extraConstraint)}return Ext.merge({},this.extraConstraint,a)},updateConstraint:function(){this.refreshOffset()},getContainerConstraint:function(){var b=this.getContainer(),c=this.getElement();if(!b||!c.dom){return this.defaultConstraint}var h=c.dom,g=b.dom,d=h.offsetWidth,a=h.offsetHeight,f=g.offsetWidth,e=g.offsetHeight;return{min:{x:0,y:0},max:{x:f-d,y:e-a}}},getContainer:function(){var a=this.container;if(!a){a=this.getElement().getParent();if(a){this.containerSizeMonitor=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.container=a;a.on("destroy","onContainerDestroy",this)}}return a},onContainerDestroy:function(){delete this.container;delete this.containerSizeMonitor},detachListeners:function(){this.getElement().un(this.listeners)},isAxisEnabled:function(a){var b=this.getDirection();if(a==="x"){return(b===this.DIRECTION_BOTH||b===this.DIRECTION_HORIZONTAL)}return(b===this.DIRECTION_BOTH||b===this.DIRECTION_VERTICAL)},onDragStart:function(a){if(this.getDisabled()){return false}var b=this.offset;this.fireAction("dragstart",[this,a,b.x,b.y],this.initDragStart)},initDragStart:function(b,c,a,d){this.dragStartOffset={x:a,y:d};this.isDragging=true;this.getElement().addCls(this.getDraggingCls())},onDrag:function(b){if(!this.isDragging){return}var a=this.dragStartOffset;this.fireAction("drag",[this,b,a.x+b.deltaX,a.y+b.deltaY],this.doDrag)},doDrag:function(b,c,a,d){b.setOffset(a,d)},onDragEnd:function(a){if(!this.isDragging){return}this.onDrag(a);this.isDragging=false;this.getElement().removeCls(this.getDraggingCls());this.fireEvent("dragend",this,a,this.offset.x,this.offset.y)},setOffset:function(i,h,b){var f=this.offset,a=this.getConstraint(),e=a.min,c=a.max,d=Math.min,g=Math.max;if(this.isAxisEnabled("x")&&typeof i=="number"){i=d(g(i,e.x),c.x)}else{i=f.x}if(this.isAxisEnabled("y")&&typeof h=="number"){h=d(g(h,e.y),c.y)}else{h=f.y}f.x=i;f.y=h;this.getTranslatable().translate(i,h,b)},getOffset:function(){return this.offset},refreshConstraint:function(){this.setConstraint(this.currentConstraint)},refreshOffset:function(){var a=this.offset;this.setOffset(a.x,a.y)},doRefresh:function(){this.refreshConstraint();this.getTranslatable().refresh();this.refreshOffset()},refresh:function(){if(this.sizeMonitor){this.sizeMonitor.refresh()}if(this.containerSizeMonitor){this.containerSizeMonitor.refresh()}this.doRefresh()},enable:function(){return this.setDisabled(false)},disable:function(){return this.setDisabled(true)},destroy:function(){var a=this.getTranslatable();Ext.destroy(this.containerSizeMonitor,this.sizeMonitor);delete this.sizeMonitor;delete this.containerSizeMonitor;var b=this.getElement();if(b&&!b.isDestroyed){b.removeCls(this.getCls())}this.detachListeners();if(a){a.destroy()}}},function(){});Ext.define("Ext.behavior.Draggable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Draggable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.draggable.refresh()},setConfig:function(c){var a=this.draggable,b=this.component;if(c){if(!a){b.setTranslatable(true);this.draggable=a=new Ext.util.Draggable(c);a.setTranslatable(b.getTranslatable());a.setElement(b.renderElement);a.on("destroy","onDraggableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getDraggable:function(){return this.draggable},onDraggableDestroy:function(){var a=this.component;delete this.draggable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.draggable;if(a){a.destroy()}}});(function(a){Ext.define("Ext.Component",{extend:"Ext.AbstractComponent",alternateClassName:"Ext.lib.Component",mixins:["Ext.mixin.Traversable"],requires:["Ext.ComponentManager","Ext.XTemplate","Ext.dom.Element","Ext.behavior.Translatable","Ext.behavior.Draggable"],xtype:"component",observableType:"component",cachedConfig:{baseCls:null,cls:null,floatingCls:null,hiddenCls:a+"item-hidden",ui:null,margin:null,padding:null,border:null,styleHtmlCls:a+"html",styleHtmlContent:null},eventedConfig:{left:null,top:null,right:null,bottom:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,docked:null,centered:null,hidden:null,disabled:null},config:{style:null,html:null,draggable:null,translatable:null,renderTo:null,zIndex:null,tpl:null,enterAnimation:null,exitAnimation:null,showAnimation:null,hideAnimation:null,tplWriteMode:"overwrite",data:null,disabledCls:a+"item-disabled",contentEl:null,itemId:undefined,record:null,plugins:null},listenerOptionsRegex:/^(?:delegate|single|delay|buffer|args|prepend|element)$/,alignmentRegex:/^([a-z]+)-([a-z]+)(\?)?$/,isComponent:true,floating:false,rendered:false,dockPositions:{top:true,right:true,bottom:true,left:true},innerElement:null,element:null,template:[],constructor:function(c){var d=this,b=d.config,e;d.onInitializedListeners=[];d.initialConfig=c;if(c!==undefined&&"id" in c){e=c.id}else{if("id" in b){e=b.id}else{e=d.getId()}}d.id=e;d.setId(e);Ext.ComponentManager.register(d);d.initElement();d.initConfig(d.initialConfig);d.initialize();d.triggerInitialized();if(d.config.fullscreen){d.fireEvent("fullscreen",d)}d.fireEvent("initialize",d)},beforeInitConfig:function(b){this.beforeInitialize.apply(this,arguments)},beforeInitialize:Ext.emptyFn,initialize:Ext.emptyFn,getTemplate:function(){return this.template},getElementConfig:function(){return{reference:"element",children:this.getTemplate()}},triggerInitialized:function(){var c=this.onInitializedListeners,d=c.length,e,b;if(!this.initialized){this.initialized=true;if(d>0){for(b=0;b0){c.pressedTimeout=setTimeout(function(){delete c.pressedTimeout;if(a){a.addCls(b)}},d)}else{a.addCls(b)}}},onRelease:function(a){this.fireAction("release",[this,a],"doRelease")},doRelease:function(a,b){if(!a.getDisabled()){if(a.hasOwnProperty("pressedTimeout")){clearTimeout(a.pressedTimeout);delete a.pressedTimeout}else{a.element.removeCls(a.getPressedCls())}}},onTap:function(a){if(this.getDisabled()){return false}this.fireAction("tap",[this,a],"doTap")},doTap:function(c,d){var b=c.getHandler(),a=c.getScope()||c;if(!b){return}if(typeof b=="string"){b=a[b]}d.preventDefault();b.apply(a,arguments)}},function(){});Ext.define("Ext.Decorator",{extend:"Ext.Component",isDecorator:true,config:{component:{}},statics:{generateProxySetter:function(a){return function(c){var b=this.getComponent();b[a].call(b,c);return this}},generateProxyGetter:function(a){return function(){var b=this.getComponent();return b[a].call(b)}}},onClassExtended:function(c,e){if(!e.hasOwnProperty("proxyConfig")){return}var f=Ext.Class,i=e.proxyConfig,d=e.config;e.config=(d)?Ext.applyIf(d,i):i;var b,h,g,a;for(b in i){if(i.hasOwnProperty(b)){h=f.getConfigNameMap(b);g=h.set;a=h.get;e[g]=this.generateProxySetter(g);e[a]=this.generateProxyGetter(a)}}},applyComponent:function(a){return Ext.factory(a,Ext.Component)},updateComponent:function(a,b){if(b){if(this.isRendered()&&b.setRendered(false)){b.fireAction("renderedchange",[this,b,false],"doUnsetComponent",this,{args:[b]})}else{this.doUnsetComponent(b)}}if(a){if(this.isRendered()&&a.setRendered(true)){a.fireAction("renderedchange",[this,a,true],"doSetComponent",this,{args:[a]})}else{this.doSetComponent(a)}}},doUnsetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.removeChild(a.renderElement.dom)}},doSetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.appendChild(a.renderElement.dom)}},setRendered:function(b){var a;if(this.callParent(arguments)){a=this.getComponent();if(a){a.setRendered(b)}return true}return false},setDisabled:function(a){this.callParent(arguments);this.getComponent().setDisabled(a)},destroy:function(){Ext.destroy(this.getComponent());this.callParent()}});Ext.define("Ext.Img",{extend:"Ext.Component",xtype:["image","img"],config:{src:null,baseCls:Ext.baseCSSPrefix+"img",mode:"background"},beforeInitialize:function(){var a=this;a.onLoad=Ext.Function.bind(a.onLoad,a);a.onError=Ext.Function.bind(a.onError,a)},initialize:function(){var a=this;a.callParent();a.relayEvents(a.renderElement,"*");a.element.on({tap:"onTap",scope:a})},hide:function(){this.callParent();this.hiddenSrc=this.hiddenSrc||this.getSrc();this.setSrc(null)},show:function(){this.callParent();if(this.hiddenSrc){this.setSrc(this.hiddenSrc);delete this.hiddenSrc}},updateMode:function(a){if(a==="background"){if(this.imageElement){this.imageElement.destroy();delete this.imageElement;this.updateSrc(this.getSrc())}}else{this.imageElement=this.element.createChild({tag:"img"})}},onTap:function(a){this.fireEvent("tap",this,a)},onAfterRender:function(){this.updateSrc(this.getSrc())},updateSrc:function(a){var b=this,c;if(b.getMode()==="background"){c=this.imageObject||new Image()}else{c=b.imageElement.dom}this.imageObject=c;c.setAttribute("src",Ext.isString(a)?a:"");c.addEventListener("load",b.onLoad,false);c.addEventListener("error",b.onError,false)},detachListeners:function(){var a=this.imageObject;if(a){a.removeEventListener("load",this.onLoad,false);a.removeEventListener("error",this.onError,false)}},onLoad:function(a){this.detachListeners();if(this.getMode()==="background"){this.element.dom.style.backgroundImage='url("'+this.imageObject.src+'")'}this.fireEvent("load",this,a)},onError:function(a){this.detachListeners();this.fireEvent("error",this,a)},doSetWidth:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setWidth(b);this.callParent(arguments)},doSetHeight:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setHeight(b);this.callParent(arguments)},destroy:function(){this.detachListeners();Ext.destroy(this.imageObject);delete this.imageObject;this.callParent()}});Ext.define("Ext.Label",{extend:"Ext.Component",xtype:"label",config:{}});Ext.define("Ext.Map",{extend:"Ext.Component",xtype:"map",requires:["Ext.util.Geolocation"],isMap:true,config:{baseCls:Ext.baseCSSPrefix+"map",useCurrentLocation:false,map:null,geo:null,mapOptions:{}},constructor:function(){this.callParent(arguments);this.element.setVisibilityMode(Ext.Element.OFFSETS);if(!(window.google||{}).maps){this.setHtml("Google Maps API is required")}},initialize:function(){this.callParent();this.on({painted:"doResize",scope:this});this.element.on("touchstart","onTouchStart",this)},onTouchStart:function(a){a.makeUnpreventable()},applyMapOptions:function(a){return Ext.merge({},this.options,a)},updateMapOptions:function(d){var a=this,c=(window.google||{}).maps,b=this.getMap();if(c&&b){b.setOptions(d)}if(d.center&&!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[d.center]})}},getMapOptions:function(){return Ext.merge({},this.options||this.getInitialConfig("mapOptions"))},updateUseCurrentLocation:function(a){this.setGeo(a);if(!a){this.renderMap()}},applyGeo:function(a){return Ext.factory(a,Ext.util.Geolocation,this.getGeo())},updateGeo:function(b,a){var c={locationupdate:"onGeoUpdate",locationerror:"onGeoError",scope:this};if(a){a.un(c)}if(b){b.on(c);b.updateLocation()}},doResize:function(){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){b.event.trigger(a,"resize")}},renderMap:function(){var d=this,f=(window.google||{}).maps,b=d.element,a=d.getMapOptions(),e=d.getMap(),c;if(f){if(Ext.os.is.iPad){Ext.merge({navigationControlOptions:{style:f.NavigationControlStyle.ZOOM_PAN}},a)}a=Ext.merge({zoom:12,mapTypeId:f.MapTypeId.ROADMAP},a);if(!a.hasOwnProperty("center")){a.center=new f.LatLng(37.381592,-122.135672)}if(b.dom.firstChild){Ext.fly(b.dom.firstChild).destroy()}if(e){f.event.clearInstanceListeners(e)}d.setMap(new f.Map(b.dom,a));e=d.getMap();c=f.event;c.addListener(e,"zoom_changed",Ext.bind(d.onZoomChange,d));c.addListener(e,"maptypeid_changed",Ext.bind(d.onTypeChange,d));c.addListener(e,"center_changed",Ext.bind(d.onCenterChange,d));d.fireEvent("maprender",d,e)}},onGeoUpdate:function(a){if(a){this.setMapCenter(new google.maps.LatLng(a.getLatitude(),a.getLongitude()))}},onGeoError:Ext.emptyFn,setMapCenter:function(d){var a=this,c=a.getMap(),b=(window.google||{}).maps;if(b){if(!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[d]});return}d=d||new b.LatLng(37.381592,-122.135672);if(d&&!(d instanceof b.LatLng)&&"longitude" in d){d=new b.LatLng(d.latitude,d.longitude)}if(!c){a.renderMap();c=a.getMap()}if(c&&d instanceof b.LatLng){c.panTo(d)}else{this.options=Ext.apply(this.getMapOptions(),{center:d})}}},onZoomChange:function(){var a=this.getMapOptions(),c=this.getMap(),b;b=(c&&c.getZoom)?c.getZoom():a.zoom||10;this.options=Ext.apply(a,{zoom:b});this.fireEvent("zoomchange",this,c,b)},onTypeChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getMapTypeId)?c.getMapTypeId():b.mapTypeId;this.options=Ext.apply(b,{mapTypeId:a});this.fireEvent("typechange",this,c,a)},onCenterChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getCenter)?c.getCenter():b.center;this.options=Ext.apply(b,{center:a});this.fireEvent("centerchange",this,c,a)},destroy:function(){Ext.destroy(this.getGeo());var a=this.getMap();if(a&&(window.google||{}).maps){google.maps.event.clearInstanceListeners(a)}this.callParent()}},function(){});Ext.define("Ext.Mask",{extend:"Ext.Component",xtype:"mask",config:{baseCls:Ext.baseCSSPrefix+"mask",transparent:false,top:0,left:0,right:0,bottom:0},initialize:function(){this.callParent();this.on({painted:"onPainted",erased:"onErased"})},onPainted:function(){this.element.on("*","onEvent",this)},onErased:function(){this.element.un("*","onEvent",this)},onEvent:function(b){var a=arguments[arguments.length-1];if(a.info.eventName==="tap"){this.fireEvent("tap",this,b);return false}if(b&&b.stopEvent){b.stopEvent()}return false},updateTransparent:function(a){this[a?"addCls":"removeCls"](this.getBaseCls()+"-transparent")}});Ext.define("Ext.LoadMask",{extend:"Ext.Mask",xtype:"loadmask",config:{message:"Loading...",messageCls:Ext.baseCSSPrefix+"mask-message",indicator:true,listeners:{painted:"onPainted",erased:"onErased"}},getTemplate:function(){var a=Ext.baseCSSPrefix;return[{reference:"innerElement",cls:a+"mask-inner",children:[{reference:"indicatorElement",cls:a+"loading-spinner-outer",children:[{cls:a+"loading-spinner",children:[{tag:"span",cls:a+"loading-top"},{tag:"span",cls:a+"loading-right"},{tag:"span",cls:a+"loading-bottom"},{tag:"span",cls:a+"loading-left"}]}]},{reference:"messageElement"}]}]},updateMessage:function(a){this.messageElement.setHtml(a)},updateMessageCls:function(b,a){this.messageElement.replaceCls(a,b)},updateIndicator:function(a){this[a?"removeCls":"addCls"](Ext.baseCSSPrefix+"indicator-hidden")},onPainted:function(){this.getParent().on({scope:this,resize:this.refreshPosition});this.refreshPosition()},onErased:function(){this.getParent().un({scope:this,resize:this.refreshPosition})},refreshPosition:function(){var c=this.getParent(),d=c.getScrollable(),a=(d)?d.getScroller():null,f=(a)?a.position:{x:0,y:0},e=c.element.getSize(),b=this.element.getSize();this.innerElement.setStyle({marginTop:Math.round(e.height-b.height+(f.y*2))+"px",marginLeft:Math.round(e.width-b.width+f.x)+"px"})}},function(){});Ext.define("Ext.Media",{extend:"Ext.Component",xtype:"media",config:{url:"",enableControls:Ext.os.is.Android?false:true,autoResume:false,autoPause:true,preload:true,loop:false,media:null,volume:1,muted:false},initialize:function(){var a=this;a.callParent();a.on({scope:a,activate:a.onActivate,deactivate:a.onDeactivate});a.addMediaListener({canplay:"onCanPlay",play:"onPlay",pause:"onPause",ended:"onEnd",volumechange:"onVolumeChange",timeupdate:"onTimeUpdate"})},addMediaListener:function(d,b){var c=this,e=c.media.dom,f=Ext.Function.bind;if(!Ext.isObject(d)){var a=d;d={};d[a]=b}Ext.Object.each(d,function(h,g){if(typeof g!=="function"){g=c[g]}if(typeof g=="function"){g=f(g,c);e.addEventListener(h,g)}})},onPlay:function(){this.fireEvent("play",this)},onCanPlay:function(){this.fireEvent("canplay",this)},onPause:function(){this.fireEvent("pause",this,this.getCurrentTime())},onEnd:function(){this.fireEvent("ended",this,this.getCurrentTime())},onVolumeChange:function(){this.fireEvent("volumechange",this,this.media.dom.volume)},onTimeUpdate:function(){this.fireEvent("timeupdate",this,this.getCurrentTime())},isPlaying:function(){return !Boolean(this.media.dom.paused)},onActivate:function(){var a=this;if(a.getAutoResume()&&!a.isPlaying()){a.play()}},onDeactivate:function(){var a=this;if(a.getAutoResume()&&a.isPlaying()){a.pause()}},updateUrl:function(a){var b=this.media.dom;b.src=a;if("load" in b){b.load()}if(this.isPlaying()){this.play()}},updateEnableControls:function(a){this.media.dom.controls=a?"controls":false},updateLoop:function(a){this.media.dom.loop=a?"loop":false},play:function(){var a=this.media.dom;if("play" in a){a.play();setTimeout(function(){a.play()},10)}},pause:function(){var a=this.media.dom;if("pause" in a){a.pause()}},toggle:function(){if(this.isPlaying()){this.pause()}else{this.play()}},stop:function(){var a=this;a.setCurrentTime(0);a.fireEvent("stop",a);a.pause()},updateVolume:function(a){this.media.dom.volume=a},updateMuted:function(a){this.fireEvent("mutedchange",this,a);this.media.dom.muted=a},getCurrentTime:function(){return this.media.dom.currentTime},setCurrentTime:function(a){this.media.dom.currentTime=a;return a},getDuration:function(){return this.media.dom.duration},destroy:function(){var a=this;Ext.Object.each(event,function(c,b){if(typeof b!=="function"){b=a[b]}if(typeof b=="function"){b=bind(b,a);dom.removeEventListener(c,b)}})}});Ext.define("Ext.Audio",{extend:"Ext.Media",xtype:"audio",config:{cls:Ext.baseCSSPrefix+"audio"},onActivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.show()}},onDeactivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.hide()}},template:[{reference:"media",preload:"auto",tag:"audio",cls:Ext.baseCSSPrefix+"component"}]});Ext.define("Ext.Spacer",{extend:"Ext.Component",alias:"widget.spacer",config:{},constructor:function(a){a=a||{};if(!a.width){a.flex=1}this.callParent([a])}});Ext.define("Ext.Title",{extend:"Ext.Component",xtype:"title",config:{baseCls:"x-title",title:""},updateTitle:function(a){this.setHtml(a)}});Ext.define("Ext.Video",{extend:"Ext.Media",xtype:"video",config:{posterUrl:null,cls:Ext.baseCSSPrefix+"video"},template:[{reference:"ghost",classList:[Ext.baseCSSPrefix+"video-ghost"]},{tag:"video",reference:"media",classList:[Ext.baseCSSPrefix+"media"]}],initialize:function(){var a=this;a.callParent();a.media.hide();a.onBefore({erased:"onErased",scope:a});a.ghost.on({tap:"onGhostTap",scope:a});a.media.on({pause:"onPause",scope:a});if(Ext.os.is.Android4||Ext.os.is.iPad){this.isInlineVideo=true}},applyUrl:function(a){return[].concat(a)},updateUrl:function(f){var c=this,e=c.media,g=f.length,d=e.query("source"),b=d.length,a;for(a=0;a0){a.pop().destroy()}},setActiveIndex:function(b){var e=this.indicators,d=this.activeIndex,a=e[d],f=e[b],c=this.getBaseCls();if(a){a.removeCls(c,null,"active")}if(f){f.addCls(c,null,"active")}this.activeIndex=b;return this},onTap:function(f){var g=f.touch,a=this.element.getPageBox(),d=a.left+(a.width/2),b=a.top+(a.height/2),c=this.getDirection();if((c==="horizontal"&&g.pageX>=d)||(c==="vertical"&&g.pageY>=b)){this.fireEvent("next",this)}else{this.fireEvent("previous",this)}},destroy:function(){var d=this.indicators,b,c,a;for(b=0,c=d.length;bd.bottom||a.yd.right||a.x div",scope:this})},initialize:function(){this.callParent();this.doInitialize()},updateBaseCls:function(a,b){var c=this;c.callParent([a+"-container",b])},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,Ext.get(c),a,d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,Ext.get(c),a,d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtouchmove",b,Ext.get(c),a,d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtap",b,Ext.get(c),a,d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtaphold",b,Ext.get(c),a,d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemdoubletap",b,Ext.get(c),a,d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemsingletap",b,Ext.get(c),a,d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemswipe",b,Ext.get(c),a,d)},updateListItem:function(b,d){var c=this,a=c.dataview,e=a.prepareData(b.getData(true),a.getStore().indexOf(b),b);d.innerHTML=c.dataview.getItemTpl().apply(e)},addListItem:function(e,c){var h=this,d=h.dataview,a=d.prepareData(c.getData(true),d.getStore().indexOf(c),c),b=h.element,i=b.dom.childNodes,g=i.length,f;f=Ext.Element.create(this.getItemElementConfig(e,a));if(!g||e==g){f.appendTo(b)}else{f.insertBefore(i[e])}},getItemElementConfig:function(c,e){var b=this.dataview,d=b.getItemCls(),a=b.getBaseCls()+"-item";if(d){a+=" "+d}return{cls:a,html:b.getItemTpl().apply(e)}},doRemoveItemCls:function(a){var d=this.getViewItems(),c=d.length,b=0;for(;b=0;b--){c=a[f+b];c.parentNode.removeChild(c)}if(d.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(d){var g=this,b=g.dataview,c=b.getStore(),f=d.length,e,a;if(f){b.hideEmptyText()}for(e=0;eh._tmpIndex?1:-1});for(e=0;e(?:[\s]*)|(?:\s*))([\w\-]+)$/i,handledEvents:["*"],getSubscribers:function(b,a){var d=this.subscribers,c=d[b];if(!c&&a){c=d[b]={type:{$length:0},selector:[],$length:0}}return c},subscribe:function(g,f){if(this.idSelectorRegex.test(g)){return false}var e=g.match(this.optimizedSelectorRegex),a=this.getSubscribers(f,true),k=a.type,c=a.selector,d,i,j,b,h;if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=k[j];if(!b){k[j]=b={descendents:{$length:0},children:{$length:0},$length:0}}h=i?b.descendents:b.children;if(h.hasOwnProperty(d)){h[d]++;return true}h[d]=1;h.$length++;b.$length++;k.$length++}else{if(c.hasOwnProperty(g)){c[g]++;return true}c[g]=1;c.push(g)}a.$length++;return true},unsubscribe:function(g,f,k){var a=this.getSubscribers(f);if(!a){return false}var e=g.match(this.optimizedSelectorRegex),l=a.type,c=a.selector,d,i,j,b,h;k=Boolean(k);if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=l[j];if(!b){return true}h=i?b.descendents:b.children;if(!h.hasOwnProperty(d)||(!k&&--h[d]>0)){return true}delete h[d];h.$length--;b.$length--;l.$length--}else{if(!c.hasOwnProperty(g)||(!k&&--c[g]>0)){return true}delete c[g];Ext.Array.remove(c,g)}if(--a.$length===0){delete this.subscribers[f]}return true},notify:function(d,a){var c=this.getSubscribers(a),e,b;if(!c||c.$length===0){return false}e=d.substr(1);b=Ext.ComponentManager.get(e);if(b){this.dispatcher.doAddListener(this.targetType,d,a,"publish",this,{args:[a,b]},"before")}},matchesSelector:function(b,a){return Ext.ComponentQuery.is(b,a)},dispatch:function(d,b,c,a){this.dispatcher.doDispatchEvent(this.targetType,d,b,c,null,a)},publish:function(g,k){var e=this.getSubscribers(g);if(!e){return}var p=arguments[arguments.length-1],o=e.type,b=e.selector,d=Array.prototype.slice.call(arguments,2,-2),l=k.xtypesChain,s,n,t,a,m,v,r,u,h,f,q,c;for(u=0,h=l.length;u0){s=e.descendents;if(s.$length>0){if(!a){a=k.getAncestorIds()}for(q=0,c=a.length;q0){if(!t){if(a){t=a[0]}else{v=k.getParent();if(v){t=v.getId()}}}if(t){if(n.hasOwnProperty(t)){this.dispatch("#"+t+" > "+f,g,d,p)}}}}}h=b.length;if(h>0){for(u=0;uf){d=e}}c.setValue(d);d=c.getValue();c.fireEvent("spin",c,d,g);c.fireEvent("spin"+g,c,d)},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){this.setValue(this.getDefaultValue())},destroy:function(){var a=this;Ext.destroy(a.downRepeater,a.upRepeater,a.spinDownButton,a.spinUpButton);a.callParent(arguments)}},function(){});Ext.define("Ext.field.TextAreaInput",{extend:"Ext.field.Input",xtype:"textareainput",tag:"textarea"});Ext.define("Ext.field.TextArea",{extend:"Ext.field.Text",xtype:"textareafield",requires:["Ext.field.TextAreaInput"],alternateClassName:"Ext.form.TextArea",config:{ui:"textarea",autoCapitalize:false,component:{xtype:"textareainput"},maxRows:null},updateMaxRows:function(a){this.getComponent().setMaxRows(a)},doSetHeight:function(a){this.callParent(arguments);var b=this.getComponent();b.input.setHeight(a)},doSetWidth:function(b){this.callParent(arguments);var a=this.getComponent();a.input.setWidth(b)},doKeyUp:function(a){var b=a.getValue();a[b?"showClearIcon":"hideClearIcon"]()}});Ext.define("Ext.field.Url",{extend:"Ext.field.Text",xtype:"urlfield",alternateClassName:"Ext.form.Url",config:{autoCapitalize:false,component:{type:"url"}}});Ext.define("Ext.plugin.ListPaging",{extend:"Ext.Component",alias:"plugin.listpaging",config:{autoPaging:false,loadMoreText:"Load More...",noMoreRecordsText:"No More Records",loadTpl:['
','','','','',"
",'
{message}
'].join(""),loadMoreCmp:{xtype:"component",baseCls:Ext.baseCSSPrefix+"list-paging"},loadMoreCmpAdded:false,loadingCls:Ext.baseCSSPrefix+"loading",list:null,scroller:null,loading:false},init:function(c){var a=c.getScrollable().getScroller(),b=c.getStore();this.setList(c);this.setScroller(a);this.bindStore(c.getStore());if(b){this.disableDataViewMask(b)}c.updateStore=Ext.Function.createInterceptor(c.updateStore,this.bindStore,this);if(this.getAutoPaging()){a.on({scrollend:this.onScrollEnd,scope:this})}},bindStore:function(a,b){if(b){b.un({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}if(a){a.on({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}},disableDataViewMask:function(a){var b=this.getList();if(a.isAutoLoading()){b.setLoadingText(null)}else{a.on({load:{single:true,fn:function(){b.setLoadingText(null)}}})}},applyLoadTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},applyLoadMoreCmp:function(a){a=Ext.merge(a,{html:this.getLoadTpl().apply({cssPrefix:Ext.baseCSSPrefix,message:this.getLoadMoreText()}),listeners:{tap:{fn:this.loadNextPage,scope:this,element:"element"}}});return Ext.factory(a,Ext.Component,this.getLoadMoreCmp())},onScrollEnd:function(b,a,c){if(!this.getLoading()&&c>=b.maxPosition.y){this.loadNextPage()}},updateLoading:function(a){var b=this.getLoadMoreCmp(),c=this.getLoadingCls();if(a){b.addCls(c)}else{b.removeCls(c)}},onStoreBeforeLoad:function(a){if(a.getCount()===0){this.getLoadMoreCmp().hide()}},onStoreLoad:function(a){var d=this.addLoadMoreCmp(),b=this.getLoadTpl(),c=this.storeFullyLoaded()?this.getNoMoreRecordsText():this.getLoadMoreText();this.getLoadMoreCmp().show();this.setLoading(false);if(this.scrollY){this.getScroller().scrollTo(null,this.scrollY);delete this.scrollY}d.setHtml(b.apply({cssPrefix:Ext.baseCSSPrefix,message:c}))},addLoadMoreCmp:function(){var b=this.getList(),a=this.getLoadMoreCmp();if(!this.getLoadMoreCmpAdded()){b.add(a);b.fireEvent("loadmorecmpadded",this,b);this.setLoadMoreCmpAdded(true)}return a},storeFullyLoaded:function(){var a=this.getList().getStore(),b=a.getTotalCount();return b!==null?a.getTotalCount()<=(a.currentPage*a.getPageSize()):false},loadNextPage:function(){var a=this;if(!a.storeFullyLoaded()){a.setLoading(true);a.scrollY=a.getScroller().position.y;a.getList().getStore().nextPage({addRecords:true})}}});Ext.define("Ext.plugin.PullRefresh",{extend:"Ext.Component",alias:"plugin.pullrefresh",requires:["Ext.DateExtras"],config:{list:null,pullRefreshText:"Pull down to refresh...",releaseRefreshText:"Release to refresh...",loadingText:"Loading...",snappingAnimationDuration:150,refreshFn:null,pullTpl:['
','
','
','','','','',"
",'
','

{message}

','
Last Updated: {lastUpdated:date("m/d/Y h:iA")}
',"
","
"].join("")},isRefreshing:false,currentViewState:"",initialize:function(){this.callParent();this.on({painted:"onPainted",scope:this})},init:function(f){var d=this,b=f.getStore(),e=d.getPullTpl(),c=d.element,a=f.getScrollable().getScroller();d.setList(f);d.lastUpdated=new Date();f.insert(0,d);if(b){if(b.isAutoLoading()){f.setLoadingText(null)}else{b.on({load:{single:true,fn:function(){f.setLoadingText(null)}}})}}e.overwrite(c,{message:d.getPullRefreshText(),lastUpdated:d.lastUpdated},true);d.loadingElement=c.getFirstChild();d.messageEl=c.down(".x-list-pullrefresh-message");d.updatedEl=c.down(".x-list-pullrefresh-updated > span");d.maxScroller=a.getMaxPosition();a.on({maxpositionchange:d.setMaxScroller,scroll:d.onScrollChange,scope:d})},fetchLatest:function(){var b=this.getList().getStore(),c=b.getProxy(),a;a=Ext.create("Ext.data.Operation",{page:1,start:0,model:b.getModel(),limit:b.getPageSize(),action:"read",filters:b.getRemoteFilter()?b.getFilters():[]});c.read(a,this.onLatestFetched,this)},onLatestFetched:function(d){var j=this.getList().getStore(),b=j.getData(),c=d.getRecords(),a=c.length,g=[],h,f,e;for(e=0;ethis.maxScroller.y){this.onBounceBottom(c)}},applyPullTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onBounceTop:function(d){var b=this,c=b.getList(),a=c.getScrollable().getScroller();if(!b.isReleased){if(!b.isRefreshing&&-d>=b.pullHeight+10){b.isRefreshing=true;b.setViewState("release");a.getContainer().onBefore({dragend:"onScrollerDragEnd",single:true,scope:b})}else{if(b.isRefreshing&&-d=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)},setOffset:function(c){var a=this.getAxis(),b=this.element.dom.style;c=Math.round(c);if(a==="x"){b.webkitTransform="translate3d("+c+"px, 0, 0)"}else{b.webkitTransform="translate3d(0, "+c+"px, 0)"}}});Ext.define("Ext.scroll.indicator.Default",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"default"},setOffset:function(c){var b=this.getAxis(),a=this.element.dom.style;if(b==="x"){a.webkitTransform="translate3d("+c+"px, 0, 0)"}else{a.webkitTransform="translate3d(0, "+c+"px, 0)"}},applyLength:function(a){return Math.round(Math.max(0,a))},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)}});Ext.define("Ext.scroll.indicator.ScrollPosition",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"scrollposition"},getElementConfig:function(){var a=this.callParent(arguments);a.children.unshift({className:"x-scroll-bar-stretcher"});return a},updateValue:function(a){if(this.gapLength===0){if(a>1){a=a-1}this.setOffset(this.barLength*a)}else{this.setOffset(this.gapLength*a)}},setLength:function(e){var c=this.getAxis(),a=this.barLength,d=this.barElement.dom,b=this.element;this.callParent(arguments);if(c==="x"){d.scrollLeft=a;b.setLeft(a)}else{d.scrollTop=a;b.setTop(a)}},setOffset:function(d){var b=this.getAxis(),a=this.barLength,c=this.barElement.dom;d=a-d;if(b==="x"){c.scrollLeft=d}else{c.scrollTop=d}}});Ext.define("Ext.scroll.Indicator",{requires:["Ext.scroll.indicator.Default","Ext.scroll.indicator.ScrollPosition","Ext.scroll.indicator.CssTransform"],alternateClassName:"Ext.util.Indicator",constructor:function(a){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){return new Ext.scroll.indicator.ScrollPosition(a)}else{if(Ext.os.is.iOS){return new Ext.scroll.indicator.CssTransform(a)}else{return new Ext.scroll.indicator.Default(a)}}}});Ext.define("Ext.scroll.View",{extend:"Ext.Evented",alternateClassName:"Ext.util.ScrollView",requires:["Ext.scroll.Scroller","Ext.scroll.Indicator"],config:{indicatorsUi:"dark",element:null,scroller:{},indicators:{x:{axis:"x"},y:{axis:"y"}},indicatorsHidingDelay:100,cls:Ext.baseCSSPrefix+"scroll-view"},processConfig:function(c){if(!c){return null}if(typeof c=="string"){c={direction:c}}c=Ext.merge({},c);var a=c.scroller,b;if(!a){c.scroller=a={}}for(b in c){if(c.hasOwnProperty(b)){if(!this.hasConfig(b)){a[b]=c[b];delete c[b]}}}return c},constructor:function(a){a=this.processConfig(a);this.useIndicators={x:true,y:true};this.doHideIndicators=Ext.Function.bind(this.doHideIndicators,this);this.initConfig(a)},setConfig:function(a){return this.callParent([this.processConfig(a)])},updateIndicatorsUi:function(a){var b=this.getIndicators();b.x.setUi(a);b.y.setUi(a)},applyScroller:function(a,b){return Ext.factory(a,Ext.scroll.Scroller,b)},applyIndicators:function(b,d){var a=Ext.scroll.Indicator,c=this.useIndicators;if(!b){b={}}if(!b.x){c.x=false;b.x={}}if(!b.y){c.y=false;b.y={}}return{x:Ext.factory(b.x,a,d&&d.x),y:Ext.factory(b.y,a,d&&d.y)}},updateIndicators:function(a){this.indicatorsGrid=Ext.Element.create({className:"x-scroll-bar-grid-wrapper",children:[{className:"x-scroll-bar-grid",children:[{children:[{},{children:[a.y.barElement]}]},{children:[{children:[a.x.barElement]},{}]}]}]})},updateScroller:function(a){a.on({scope:this,scrollstart:"onScrollStart",scroll:"onScroll",scrollend:"onScrollEnd",refresh:"refreshIndicators"})},isAxisEnabled:function(a){return this.getScroller().isAxisEnabled(a)&&this.useIndicators[a]},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(c){var b=c.getFirstChild().getFirstChild(),a=this.getScroller();c.addCls(this.getCls());c.insertFirst(this.indicatorsGrid);a.setElement(b);this.refreshIndicators();return this},showIndicators:function(){var a=this.getIndicators();if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(this.isAxisEnabled("x")){a.x.show()}if(this.isAxisEnabled("y")){a.y.show()}},hideIndicators:function(){var a=this.getIndicatorsHidingDelay();if(a>0){this.indicatorsHidingTimer=setTimeout(this.doHideIndicators,a)}else{this.doHideIndicators()}},doHideIndicators:function(){var a=this.getIndicators();if(this.isAxisEnabled("x")){a.x.hide()}if(this.isAxisEnabled("y")){a.y.hide()}},onScrollStart:function(){this.onScroll.apply(this,arguments);this.showIndicators()},onScrollEnd:function(){this.hideIndicators()},onScroll:function(b,a,c){this.setIndicatorValue("x",a);this.setIndicatorValue("y",c)},setIndicatorValue:function(b,f){if(!this.isAxisEnabled(b)){return this}var a=this.getScroller(),c=a.getMaxPosition()[b],e=a.getContainerSize()[b],d;if(c===0){d=f/e;if(f>=0){d+=1}}else{if(f>c){d=1+((f-c)/e)}else{if(f<0){d=f/e}else{d=f/c}}}this.getIndicators()[b].setValue(d)},refreshIndicator:function(d){if(!this.isAxisEnabled(d)){return this}var a=this.getScroller(),b=this.getIndicators()[d],e=a.getContainerSize()[d],f=a.getSize()[d],c=e/f;b.setRatio(c);b.refresh()},refresh:function(){return this.getScroller().refresh()},refreshIndicators:function(){var a=this.getIndicators();a.x.setActive(this.isAxisEnabled("x"));a.y.setActive(this.isAxisEnabled("y"));this.refreshIndicator("x");this.refreshIndicator("y")},destroy:function(){var a=this.getElement(),b=this.getIndicators();if(a&&!a.isDestroyed){a.removeCls(this.getCls())}b.x.destroy();b.y.destroy();Ext.destroy(this.getScroller(),this.indicatorsGrid);delete this.indicatorsGrid;this.callParent(arguments)}});Ext.define("Ext.behavior.Scrollable",{extend:"Ext.behavior.Behavior",requires:["Ext.scroll.View"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.scrollView.refresh()},setConfig:function(d){var b=this.scrollView,c=this.component,e,a;if(d){if(!b){this.scrollView=b=new Ext.scroll.View(d);b.on("destroy","onScrollViewDestroy",this);c.setUseBodyElement(true);this.scrollerElement=a=c.innerElement;this.scrollContainer=a.wrap();this.scrollViewElement=e=c.bodyElement;b.setElement(e);if(c.isPainted()){this.onComponentPainted(c)}c.on(this.listeners)}else{if(Ext.isString(d)||Ext.isObject(d)){b.setConfig(d)}}}else{if(b){b.destroy()}}return this},getScrollView:function(){return this.scrollView},onScrollViewDestroy:function(){var b=this.component,a=this.scrollerElement;if(!a.isDestroyed){this.scrollerElement.unwrap()}this.scrollContainer.destroy();b.un(this.listeners);delete this.scrollerElement;delete this.scrollView;delete this.scrollContainer},onComponentDestroy:function(){var a=this.scrollView;if(a){a.destroy()}}});Ext.define("Ext.Container",{extend:"Ext.Component",alternateClassName:"Ext.lib.Container",requires:["Ext.layout.Layout","Ext.ItemCollection","Ext.behavior.Scrollable","Ext.Mask"],xtype:"container",eventedConfig:{activeItem:0},config:{layout:null,control:{},defaults:null,items:null,autoDestroy:true,defaultType:null,scrollable:null,useBodyElement:null,masked:null,modal:null,hideOnMaskTap:null},isContainer:true,delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange"},constructor:function(a){var b=this;b._items=b.items=new Ext.ItemCollection();b.innerItems=[];b.onItemAdd=b.onFirstItemAdd;b.callParent(arguments)},getElementConfig:function(){return{reference:"element",className:"x-container",children:[{reference:"innerElement",className:"x-inner"}]}},applyMasked:function(a,b){b=Ext.factory(a,Ext.Mask,b);if(b){this.add(b)}return b},mask:function(a){this.setMasked(a||true)},unmask:function(){this.setMasked(false)},applyModal:function(a,b){if(!a&&!b){return}return Ext.factory(a,Ext.Mask,b)},updateModal:function(c,a){var b={painted:"refreshModalMask",erased:"destroyModalMask"};if(c){this.on(b);c.on("destroy","onModalDestroy",this);if(this.getTop()===null&&this.getBottom()===null&&this.getRight()===null&&this.getLeft()===null&&!this.getCentered()){this.setTop(0);this.setLeft(0)}if(this.isPainted()){this.refreshModalMask()}}else{if(a){a.un("destroy","onModalDestroy",this);this.un(b)}}},onModalDestroy:function(){this.setModal(null)},refreshModalMask:function(){var b=this.getModal(),a=this.getParent();if(!this.painted){this.painted=true;if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1);if(this.getHideOnMaskTap()){b.on("tap","hide",this,{single:true})}}}},destroyModalMask:function(){var b=this.getModal(),a=this.getParent();if(this.painted){this.painted=false;if(b){b.un("tap","hide",this);a.remove(b,false)}}},updateZIndex:function(b){var a=this.getModal();this.callParent(arguments);if(a){a.setZIndex(b-1)}},updateBaseCls:function(a,b){var c=this,d=c.getUi();if(a){this.element.addCls(a);this.innerElement.addCls(a,null,"inner");if(d){this.element.addCls(a,null,d)}}if(b){this.element.removeCls(b);this.innerElement.removeCls(a,null,"inner");if(d){this.element.removeCls(b,null,d)}}},updateUseBodyElement:function(a){if(a){this.bodyElement=this.innerElement.wrap({cls:"x-body"});this.referenceList.push("bodyElement")}},applyItems:function(a,b){if(a){this.getDefaultType();this.getDefaults();if(this.initialized&&b.length>0){this.removeAll()}this.add(a)}},applyControl:function(c){var a,b,e,d;for(a in c){d=c[a];for(b in d){e=d[b];if(Ext.isObject(e)){e.delegate=a}}d.delegate=a;this.addListener(d)}return c},onFirstItemAdd:function(){delete this.onItemAdd;this.setLayout(new Ext.layout.Layout(this,this.getLayout()||"default"));if(this.innerHtmlElement&&!this.getHtml()){this.innerHtmlElement.destroy();delete this.innerHtmlElement}this.on(this.delegateListeners);return this.onItemAdd.apply(this,arguments)},updateDefaultType:function(a){this.defaultItemClass=Ext.ClassManager.getByAlias("widget."+a)},applyDefaults:function(a){if(a){this.factoryItem=this.factoryItemWithDefaults;return a}},factoryItem:function(a){return Ext.factory(a,this.defaultItemClass)},factoryItemWithDefaults:function(c){var b=this,d=b.getDefaults(),a;if(!d){return Ext.factory(c,b.defaultItemClass)}if(c.isComponent){a=c;if(d&&c.isInnerItem()&&!b.has(a)){a.setConfig(d,true)}}else{if(d&&!c.ignoreDefaults){if(!(c.hasOwnProperty("left")&&c.hasOwnProperty("right")&&c.hasOwnProperty("top")&&c.hasOwnProperty("bottom")&&c.hasOwnProperty("docked")&&c.hasOwnProperty("centered"))){c=Ext.mergeIf({},c,d)}}a=Ext.factory(c,b.defaultItemClass)}return a},add:function(a){var e=this,b,d,c,f;a=Ext.Array.from(a);d=a.length;for(b=0;b0&&c.isInnerItem()){f=c}}if(f){this.setActiveItem(f)}return c},doAdd:function(d){var c=this,a=c.getItems(),b;if(!a.has(d)){b=a.length;a.add(d);if(d.isInnerItem()){c.insertInner(d)}d.setParent(c);c.onItemAdd(d,b)}},remove:function(d,b){var c=this,a=c.indexOf(d),e=c.getInnerItems();if(b===undefined){b=c.getAutoDestroy()}if(a!==-1){if(!c.removingAll&&e.length>1&&d===c.getActiveItem()){c.on({activeitemchange:"doRemove",scope:c,single:true,order:"after",args:[d,a,b]});c.doResetActiveItem(e.indexOf(d))}else{c.doRemove(d,a,b);if(e.length===0){c.setActiveItem(null)}}}return c},doResetActiveItem:function(a){if(a===0){this.setActiveItem(1)}else{this.setActiveItem(0)}},doRemove:function(d,a,b){var c=this;c.items.remove(d);if(d.isInnerItem()){c.removeInner(d)}c.onItemRemove(d,a,b);d.setParent(null);if(b){d.destroy()}},removeAll:function(c,f){var a=this.items,e=a.length,b=0,d;if(c===undefined){c=this.getAutoDestroy()}f=Boolean(f);this.removingAll=true;for(;b=0;b--){c.insert(a,d[b])}return c}d=this.factoryItem(d);this.doInsert(a,d);return d},doInsert:function(d,f){var e=this,b=e.items,c=b.length,a,g;g=f.isInnerItem();if(d>c){d=c}if(b[d-1]===f){return e}a=e.indexOf(f);if(a!==-1){if(a "+a)[0]||null},down:function(a){return this.query(a)[0]||null},destroy:function(){var a=this.getModal();if(a){a.destroy()}this.removeAll(true,true);Ext.destroy(this.getScrollable(),this.bodyElement);this.callParent()}},function(){this.addMember("defaultItemClass",this)});Ext.define("Ext.Panel",{extend:"Ext.Container",requires:["Ext.util.LineSegment"],alternateClassName:"Ext.lib.Panel",xtype:"panel",isPanel:true,config:{baseCls:Ext.baseCSSPrefix+"panel",bodyPadding:null,bodyMargin:null,bodyBorder:null},getElementConfig:function(){var a=this.callParent();a.children.push({reference:"tipElement",className:"x-anchor",hidden:true});return a},applyBodyPadding:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyPadding:function(a){this.element.setStyle("padding",a)},applyBodyMargin:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyMargin:function(a){this.element.setStyle("margin",a)},applyBodyBorder:function(a){if(a===true){a=1}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyBorder:function(a){this.element.setStyle("border-width",a)},alignTo:function(m){var w=this.tipElement;w.hide();if(this.currentTipPosition){w.removeCls("x-anchor-"+this.currentTipPosition)}this.callParent(arguments);var f=Ext.util.LineSegment,d=m.isComponent?m.renderElement:m,a=this.renderElement,n=d.getPageBox(),k=a.getPageBox(),b=k.left,t=k.top,C=k.right,h=k.bottom,j=b+(k.width/2),i=t+(k.height/2),o={x:b,y:t},l={x:C,y:t},B={x:b,y:h},D={x:C,y:h},y={x:j,y:i},s=n.left+(n.width/2),q=n.top+(n.height/2),v={x:s,y:q},c=new f(y,v),g=0,A=0,e,z,r,p,x,u;w.setVisibility(false);w.show();e=w.getSize();z=e.width;r=e.height;if(c.intersects(new f(o,l))){x=Math.min(Math.max(s,b),C-(z/2));u=t;A=r+10;p="top"}else{if(c.intersects(new f(o,B))){x=b;u=Math.min(Math.max(q+(z/2),t),h);g=r+10;p="left"}else{if(c.intersects(new f(B,D))){x=Math.min(Math.max(s,b),C-(z/2));u=h;A=-r-10;p="bottom"}else{if(c.intersects(new f(l,D))){x=C;u=Math.min(Math.max(q-(z/2),t),h);g=-r-10;p="right"}}}}if(x||u){this.currentTipPosition=p;w.addCls("x-anchor-"+p);w.setLeft(x-b);w.setTop(u-t);w.setVisibility(true);this.setLeft(this.getLeft()+g);this.setTop(this.getTop()+A)}}});Ext.define("Ext.SegmentedButton",{extend:"Ext.Container",xtype:"segmentedbutton",requires:["Ext.Button"],config:{baseCls:Ext.baseCSSPrefix+"segmentedbutton",pressedCls:Ext.baseCSSPrefix+"button-pressed",allowMultiple:false,allowDepress:null,pressedButtons:[],layout:{type:"hbox",align:"stretch"},defaultType:"button"},initialize:function(){var a=this;a.callParent();a.on({delegate:"> button",scope:a,tap:"onButtonRelease"});a.onAfter({delegate:"> button",scope:a,hiddenchange:"onButtonHiddenChange"})},updateAllowMultiple:function(){if(!this.initialized&&!this.getInitialConfig().hasOwnProperty("allowDepress")){this.setAllowDepress(true)}},applyItems:function(){var e=this,f=[],d,b,c,a;e.callParent(arguments);a=this.getItems();d=a.length;for(b=0;b=0;b--){c=a.items[b];if(!c.isHidden()){c.addCls(e+"last");break}}},applyPressedButtons:function(a){var e=this,f=[],c,d,b;if(Ext.isArray(a)){d=a.length;for(b=0;bm){c.renderElement.setWidth(m)}}var j=this.spacer.renderElement.getPageBox(),k=f.getPageBox(),g=k.width-j.width,d=k.left,i=k.right,b,l,e;if(g>0){f.setWidth(j.width);b=g/2;d+=b;i-=b}l=j.left-d;e=i-j.right;if(l>0){f.setLeft(l)}else{if(e>0){f.setLeft(-e)}}f.repaint()},updateTitle:function(a){this.titleComponent.setTitle(a);if(this.isPainted()){this.refreshTitlePosition()}}});Ext.define("Ext.Toolbar",{extend:"Ext.Container",xtype:"toolbar",requires:["Ext.Button","Ext.Title","Ext.Spacer"],isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",ui:"dark",title:null,defaultType:"button",layout:{type:"hbox",align:"center"}},constructor:function(a){a=a||{};if(a.docked=="left"||a.docked=="right"){a.layout={type:"vbox",align:"stretch"}}this.callParent([a])},applyTitle:function(a){if(typeof a=="string"){a={title:a,centered:true}}return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b);this.getLayout().setItemFlex(b,1)}if(a){a.destroy()}},showTitle:function(){var a=this.getTitle();if(a){a.show()}},hideTitle:function(){var a=this.getTitle();if(a){a.hide()}}},function(){});Ext.define("Ext.MessageBox",{extend:"Ext.Sheet",requires:["Ext.Toolbar","Ext.field.Text","Ext.field.TextArea"],config:{ui:"dark",baseCls:Ext.baseCSSPrefix+"msgbox",iconCls:null,showAnimation:{type:"popIn",duration:250,easing:"ease-out"},hideAnimation:{type:"popOut",duration:250,easing:"ease-out"},zIndex:10,defaultTextHeight:75,title:null,buttons:null,message:null,prompt:null,layout:{type:"vbox",pack:"center"}},statics:{OK:{text:"OK",itemId:"ok",ui:"action"},YES:{text:"Yes",itemId:"yes",ui:"action"},NO:{text:"No",itemId:"no"},CANCEL:{text:"Cancel",itemId:"cancel"},INFO:Ext.baseCSSPrefix+"msgbox-info",WARNING:Ext.baseCSSPrefix+"msgbox-warning",QUESTION:Ext.baseCSSPrefix+"msgbox-question",ERROR:Ext.baseCSSPrefix+"msgbox-error",OKCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"OK",itemId:"ok",ui:"action"}],YESNOCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}],YESNO:[{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}]},constructor:function(a){a=a||{};if(a.hasOwnProperty("promptConfig")){Ext.applyIf(a,{prompt:a.promptConfig});delete a.promptConfig}if(a.hasOwnProperty("multiline")||a.hasOwnProperty("multiLine")){a.prompt=a.prompt||{};Ext.applyIf(a.prompt,{multiLine:a.multiline||a.multiLine});delete a.multiline;delete a.multiLine}this.defaultAllowedConfig={};var e=["ui","showAnimation","hideAnimation","title","message","prompt","iconCls","buttons","defaultTextHeight"],d=e.length,b,c;for(b=0;b=a-c&&b<=a+c)},onDragStart:function(f){var d=this.getDirection(),b=f.absDeltaX,a=f.absDeltaY,c=this.getDirectionLock();this.isDragging=true;if(c){if((d==="horizontal"&&b>a)||(d==="vertical"&&a>b)){f.stopPropagation()}else{this.isDragging=false;return}}if(this.isAnimating){this.getActiveCarouselItem().getTranslatable().stopAnimation()}this.dragStartOffset=this.offset;this.dragDirection=0},onDrag:function(j){if(!this.isDragging){return}var k=this.dragStartOffset,l=this.getDirection(),m=l==="horizontal"?j.deltaX:j.deltaY,a=this.offset,i=this.flickStartTime,c=this.dragDirection,b=Ext.Date.now(),h=this.getActiveIndex(),f=this.getMaxItemIndex(),d=c,g;if((h===0&&m>0)||(h===f&&m<0)){m*=0.5}g=k+m;if(g>a){c=1}else{if(g300){this.flickStartOffset=a;this.flickStartTime=b}this.dragDirection=c;this.setOffset(g)},onDragEnd:function(j){if(!this.isDragging){return}this.onDrag(j);this.isDragging=false;var a=Ext.Date.now(),i=this.itemLength,g=i/2,f=this.offset,m=this.getActiveIndex(),c=this.getMaxItemIndex(),h=0,l=f-this.flickStartOffset,b=a-this.flickStartTime,k=this.getIndicator(),d;if(b>0&&Math.abs(l)>=10){d=l/b;if(Math.abs(d)>=1){if(d<0&&m0&&m>0){h=1}}}}if(h===0){if(m0&&f>g){h=1}}}if(k){k.setActiveIndex(m-h)}this.animationDirection=h;this.setOffsetAnimated(h*i)},applyAnimation:function(a){a.easing=Ext.factory(a.easing,Ext.fx.easing.EaseOut);return a},updateDirection:function(b){var a=this.getIndicator();this.currentAxis=(b==="horizontal")?"x":"y";if(a){a.setDirection(b)}},setOffset:function(e){var k=this.orderedCarouselItems,c=this.getBufferSize(),g=k[c],j=this.itemLength,d=this.currentAxis,a,h,b,f;this.offset=e;e+=this.itemOffset;if(g){g.translateAxis(d,e);for(f=1,b=0;f<=c;f++){h=k[c-f];if(h){b+=j;h.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=k[c+f];if(a){b+=j;a.translateAxis(d,e+b)}}}return this},setOffsetAnimated:function(c){var b=this.orderedCarouselItems[this.getBufferSize()],a=this.getIndicator();if(a){a.setActiveIndex(this.getActiveIndex()-this.animationDirection)}this.offset=c;c+=this.itemOffset;if(b){this.isAnimating=true;b.getTranslatable().on(this.animationListeners);b.translateAxis(this.currentAxis,c,this.getAnimation())}return this},onActiveItemAnimationFrame:function(k){var j=this.orderedCarouselItems,c=this.getBufferSize(),h=this.itemLength,d=this.currentAxis,e=k[d],g,a,f,b;for(f=1,b=0;f<=c;f++){g=j[c-f];if(g){b+=h;g.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=j[c+f];if(a){b+=h;a.translateAxis(d,e+b)}}},onActiveItemAnimationEnd:function(b){var c=this.getActiveIndex(),a=this.animationDirection,e=this.currentAxis,f=b[e],d=this.itemLength,g;this.isAnimating=false;b.un(this.animationListeners);if(a===-1){g=d+f}else{if(a===1){g=f-d}else{g=f}}g-=this.itemOffset;this.offset=g;this.setActiveItem(c-a)},refresh:function(){this.refreshSizing();this.refreshActiveItem()},refreshSizing:function(){var a=this.element,b=this.getItemLength(),c,d;if(this.getDirection()==="horizontal"){d=a.getWidth()}else{d=a.getHeight()}this.hiddenTranslation=-d;if(b===null){b=d;c=0}else{c=(d-b)/2}this.itemLength=b;this.itemOffset=c},refreshOffset:function(){this.setOffset(this.offset)},refreshActiveItem:function(){this.doSetActiveItem(this.getActiveItem())},getActiveIndex:function(){return this.activeIndex},refreshActiveIndex:function(){this.activeIndex=this.getInnerItemIndex(this.getActiveItem())},refreshCarouselItems:function(){var a=this.carouselItems,b,d,c;for(b=0,d=a.length;b0){for(f=1;f<=c;f++){h=q-f;if(h>=0){a=this.getInnerItemAt(h);b=a.getId();o[b]=a;p[b]=c-f}else{break}}}if(qb){this.setActiveItem(b)}else{this.rebuildInnerIndexes(a);this.refreshActiveItem()}}},rebuildInnerIndexes:function(n){var c=this.innerIndexToItem,g=this.innerIdToIndex,j=this.innerItems.slice(),h=j.length,b=this.getBufferSize(),d=this.getMaxItemIndex(),l=[],e,k,f,a,m;if(n===undefined){this.innerIndexToItem=c={};this.innerIdToIndex=g={};for(e=0;e=0&&e<=d){if(c.hasOwnProperty(e)){Ext.Array.remove(j,c[e]);continue}l.push(e)}}for(e=0,h=l.length;e ."+Ext.baseCSSPrefix+"data-item",scope:this})},initialize:function(){this.callParent();this.doInitialize()},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,a,b.indexOf(a),d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtouchmove",b,a,b.indexOf(a),d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,a,b.indexOf(a),d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtap",b,a,b.indexOf(a),d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtaphold",b,a,b.indexOf(a),d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemsingletap",b,a,b.indexOf(a),d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemdoubletap",b,a,b.indexOf(a),d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemswipe",b,a,b.indexOf(a),d)},moveItemsToCache:function(j,k){var h=this,c=h.dataview,a=c.getMaxItemCache(),g=h.getViewItems(),f=h.itemCache,e=f.length,l=c.getPressedCls(),d=c.getSelectedCls(),b=k-j,m;for(;b>=0;b--){m=g[j+b];if(e!==a){h.remove(m,false);m.removeCls([l,d]);f.push(m);e++}else{m.destroy()}}if(h.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(b){var l=this,e=l.dataview,m=e.getStore(),k=b.length,a=e.getDefaultType(),h=e.getItemConfig(),g=l.itemCache,f=g.length,j=[],c,n,d;if(k){e.hideEmptyText()}for(c=0;ci._tmpIndex?1:-1});for(c=0;c{text}",pressedCls:"x-item-pressed",itemCls:null,selectedCls:"x-item-selected",triggerEvent:"itemtap",triggerCtEvent:"tap",deselectOnContainerClick:true,scrollable:true,inline:null,pressedDelay:100,loadingText:"Loading...",useComponents:null,itemConfig:{},maxItemCache:20,defaultType:"dataitem",scrollToTopOnRefresh:true},constructor:function(a){var b=this;b.hasLoadedStore=false;b.mixins.selectable.constructor.apply(b,arguments);b.callParent(arguments)},updateItemCls:function(c,b){var a=this.container;if(a){if(b){a.doRemoveItemCls(b)}if(c){a.doAddItemCls(c)}}},storeEventHooks:{beforeload:"onBeforeLoad",load:"onLoad",refresh:"refresh",addrecords:"onStoreAdd",removerecords:"onStoreRemove",updaterecord:"onStoreUpdate"},initialize:function(){this.callParent();var b=this,a;b.on(b.getTriggerCtEvent(),b.onContainerTrigger,b);a=b.container=this.add(new Ext.dataview[b.getUseComponents()?"component":"element"].Container({baseCls:this.getBaseCls()}));a.dataview=b;b.on(b.getTriggerEvent(),b.onItemTrigger,b);a.on({itemtouchstart:"onItemTouchStart",itemtouchend:"onItemTouchEnd",itemtap:"onItemTap",itemtaphold:"onItemTapHold",itemtouchmove:"onItemTouchMove",itemsingletap:"onItemSingleTap",itemdoubletap:"onItemDoubleTap",itemswipe:"onItemSwipe",scope:b});if(this.getStore()){this.refresh()}},applyInline:function(a){if(Ext.isObject(a)){a=Ext.apply({},a)}return a},updateInline:function(c,b){var a=this.getBaseCls();if(b){this.removeCls([a+"-inlineblock",a+"-nowrap"])}if(c){this.addCls(a+"-inlineblock");if(Ext.isObject(c)&&c.wrap===false){this.addCls(a+"-nowrap")}else{this.removeCls(a+"-nowrap")}}},prepareData:function(c,b,a){c.xindex=b+1;return c},onContainerTrigger:function(b){var a=this;if(b.target!=a.element.dom){return}if(a.getDeselectOnContainerClick()&&a.getStore()){a.deselectAll()}},onItemTrigger:function(b,a){this.selectWithEvent(this.getStore().getAt(a))},doAddPressedCls:function(a){var c=this,b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.addCls(c.getPressedCls())}},onItemTouchStart:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireAction("itemtouchstart",[f,d,h,a,g],"doItemTouchStart")},doItemTouchStart:function(c,b,e,a){var d=c.getPressedDelay();if(a){if(d>0){c.pressedTimeout=Ext.defer(c.doAddPressedCls,d,c,[a])}else{c.doAddPressedCls(a)}}},onItemTouchEnd:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(this.hasOwnProperty("pressedTimeout")){clearTimeout(this.pressedTimeout);delete this.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchend",f,d,h,a,g)},onItemTouchMove:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(f.hasOwnProperty("pressedTimeout")){clearTimeout(f.pressedTimeout);delete f.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchmove",f,d,h,a,g)},onItemTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtap",f,d,h,a,g)},onItemTapHold:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtaphold",f,d,h,a,g)},onItemSingleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemsingletap",f,d,h,a,g)},onItemDoubleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemdoubletap",f,d,h,a,g)},onItemSwipe:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemswipe",f,d,h,a,g)},onItemSelect:function(a,b){var c=this;if(b){c.doItemSelect(c,a)}else{c.fireAction("select",[c,a],"doItemSelect")}},doItemSelect:function(c,a){if(c.container&&!c.isDestroyed){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls(c.getPressedCls());b.addCls(c.getSelectedCls())}}},onItemDeselect:function(a,b){var c=this;if(c.container&&!c.isDestroyed){if(b){c.doItemDeselect(c,a)}else{c.fireAction("deselect",[c,a,b],"doItemDeselect")}}},doItemDeselect:function(c,a){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls([c.getPressedCls(),c.getSelectedCls()])}},updateData:function(b){var a=this.getStore();if(!a){this.setStore(Ext.create("Ext.data.Store",{data:b}))}else{a.add(b)}},applyStore:function(b){var d=this,e=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(b){b=Ext.data.StoreManager.lookup(b);if(b&&Ext.isObject(b)&&b.isStore){b.on(e);c=b.getProxy();if(c){a=c.getReader();if(a){a.on("exception","handleException",this)}}}}return b},handleException:function(){this.setMasked(false)},updateStore:function(b,e){var d=this,f=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(e&&Ext.isObject(e)&&e.isStore){if(e.autoDestroy){e.destroy()}else{e.un(f);c=e.getProxy();if(c){a=c.getReader();if(a){a.un("exception","handleException",this)}}}}if(b){if(b.isLoaded()){this.hasLoadedStore=true}if(b.isLoading()){d.onBeforeLoad()}if(d.container){d.refresh()}}},onBeforeLoad:function(){var b=this.getScrollable();if(b){b.getScroller().stopAnimation()}var a=this.getLoadingText();if(a){this.setMasked({xtype:"loadmask",message:a});if(b){b.getScroller().setDisabled(true)}}this.hideEmptyText()},updateEmptyText:function(c,d){var b=this,a;if(d&&b.emptyTextCmp){b.remove(b.emptyTextCmp,true);delete b.emptyTextCmp}if(c){b.emptyTextCmp=b.add({xtype:"component",cls:b.getBaseCls()+"-emptytext",html:c,hidden:true});a=b.getStore();if(a&&b.hasLoadedStore&&!a.getCount()){this.showEmptyText()}}},onLoad:function(a){var b=this.getScrollable();this.hasLoadedStore=true;this.setMasked(false);if(b){b.getScroller().setDisabled(false)}if(!a.getCount()){this.showEmptyText()}},refresh:function(){var b=this,a=b.container;if(!b.getStore()){if(!b.hasLoadedStore&&!b.getDeferEmptyText()){b.showEmptyText()}return}if(a){b.fireAction("refresh",[b],"doRefresh")}},applyItemTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onAfterRender:function(){var a=this;a.callParent(arguments);a.updateStore(a.getStore())},getViewItems:function(){return this.container.getViewItems()},doRefresh:function(f){var a=f.container,j=f.getStore(),b=j.getRange(),e=a.getViewItems(),h=b.length,l=e.length,c=h-l,g=f.getScrollable(),d,k;if(this.getScrollToTopOnRefresh()&&g){g.getScroller().scrollToTop()}if(h<1){f.onStoreClear();return}if(c<0){a.moveItemsToCache(l+c,l-1);e=a.getViewItems();l=e.length}else{if(c>0){a.moveItemsFromCache(j.getRange(l))}}for(d=0;dh.y){c=g;break}f=g}return{current:f,next:c}},doRefreshHeaders:function(){if(!this.getGrouped()||!this.container){return false}var l=this.findGroupHeaderIndices(),f=l.length,g=this.container.getViewItems(),j=this.pinHeaderInfo={offsets:[]},a=j.offsets,h=this.getScrollable(),e,k,b,d,c;if(f){for(b=0;bd.offset)||(f&&h0&&d.offset-h<=c){var k=c-(d.offset-h);this.translateHeader(k)}else{this.translateHeader(null)}},translateHeaderTransform:function(a){this.header.renderElement.dom.style.webkitTransform=(a===null)?null:"translate3d(0px, -"+a+"px, 0px)"},translateHeaderCssPosition:function(a){this.header.renderElement.dom.style.top=(a===null)?null:"-"+Math.round(a)+"px"},setActiveGroup:function(b){var a=this,c=a.header;if(c){if(b&&b.header){if(!a.activeGroup||a.activeGroup.header!=b.header){c.show();if(c.element){c.setHtml(b.header.innerHTML)}}}else{if(c&&c.element){c.hide()}}}this.activeGroup=b},onIndex:function(o,c){var r=this,s=c.toLowerCase(),b=r.getStore(),q=b.getGroups(),f=q.length,h=r.getScrollable(),n,e,m,g,k,p;if(h){n=r.getScrollable().getScroller()}else{return}for(m=0;ms){g=e;break}else{g=e}}if(h&&g){p=r.container.getViewItems()[b.indexOf(g.children[0])];n.stopAnimation();var l=n.getContainerSize().y,j=n.getSize().y,d=j-l,a=(p.offsetTop>d)?d:p.offsetTop;n.scrollTo(0,a)}},applyOnItemDisclosure:function(a){if(Ext.isFunction(a)){return{scope:this,handler:a}}return a},handleItemDisclosure:function(f){var d=this,c=f.getTarget().parentNode,b=d.container.getViewItems().indexOf(c),a=d.getStore().getAt(b);d.fireAction("disclose",[d,a,c,b,f],"doDisclose")},doDisclose:function(f,a,d,c,g){var b=f.getOnItemDisclosure();if(b&&b.handler){b.handler.call(b.scope||f,a,d,c,g)}},findGroupHeaderIndices:function(){if(!this.getGrouped()){return[]}var h=this,k=h.getStore();if(!k){return[]}var b=h.container,d=k.getGroups(),m=d.length,g=b.getViewItems(),c=[],l=b.footerClsShortCache,e,a,f,n,j;b.doRemoveHeaders();b.doRemoveFooterCls();if(g.length){for(e=0;e class="x-list-item-leaf">'+a.getItemTextTpl(b)+""},this.getListConfig())}},function(){});Ext.define("Ext.form.FieldSet",{extend:"Ext.Container",alias:"widget.fieldset",requires:["Ext.Title"],config:{baseCls:Ext.baseCSSPrefix+"form-fieldset",title:null,instructions:null},applyTitle:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"top",baseCls:this.getBaseCls()+"-title"});return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}},applyInstructions:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"bottom",baseCls:this.getBaseCls()+"-instructions"});return Ext.factory(a,Ext.Title,this.getInstructions())},updateInstructions:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}}});Ext.define("Ext.form.Panel",{alternateClassName:"Ext.form.FormPanel",extend:"Ext.Panel",xtype:"formpanel",requires:["Ext.XTemplate","Ext.field.Checkbox","Ext.Ajax"],config:{baseCls:Ext.baseCSSPrefix+"form",standardSubmit:false,url:null,baseParams:null,submitOnAction:false,record:null,method:"post",scrollable:{translationMethod:"scrollposition"}},getElementConfig:function(){var a=this.callParent();a.tag="form";return a},initialize:function(){var a=this;a.callParent();a.element.on({submit:"onSubmit",scope:a})},updateRecord:function(c){var a,b,d;if(c&&(a=c.fields)){b=this.getValues();for(d in b){if(b.hasOwnProperty(d)&&a.containsKey(d)){c.set(d,b[d])}}}return this},setRecord:function(a){var b=this;if(a&&a.data){b.setValues(a.data)}b._record=a;return this},onSubmit:function(b){var a=this;if(b&&!a.getStandardSubmit()){b.stopEvent()}else{this.submit()}},updateSubmitOnAction:function(a){if(a){this.on({action:"onFieldAction",scope:this})}else{this.un({action:"onFieldAction",scope:this})}},onFieldAction:function(a){if(this.getSubmitOnAction()){a.blur();this.submit()}},submit:function(a){var c=this,b=c.element.dom||{},d;a=Ext.apply({url:c.getUrl()||b.action,submit:false,method:c.getMethod()||b.method||"post",autoAbort:false,params:null,waitMsg:null,headers:null,success:null,failure:null},a||{});d=c.getValues(c.getStandardSubmit()||!a.submitDisabled);return c.fireAction("beforesubmit",[c,d,a],"doBeforeSubmit")},doBeforeSubmit:function(f,h,b){var e=f.element.dom||{};if(f.getStandardSubmit()){if(b.url&&Ext.isEmpty(e.action)){e.action=b.url}var a=this.query("spinnerfield"),d=a.length,c,g;for(c=0;c1;d.doChangeView(c,a,false)},onViewRemove:function(c){var d=this,b=d.backButtonStack,a;d.endAnimation();b.pop();a=b.length>1;d.doChangeView(c,a,true)},doChangeView:function(k,c,g){var r=this,o=r.leftBox,e=o.element,f=r.titleComponent,m=f.element,n=r.getBackButton(),l=r.getTitleText(),h=r.getBackButtonText(),q=r.getAnimation()&&k.getLayout().getAnimation(),p=q&&q.isAnimation&&k.isPainted(),d,i,a,j,b;if(p){i=r.createProxy(o.element);e.setStyle("opacity","0");n.setText(h);n[c?"show":"hide"]();a=r.createProxy(f.element.getParent());m.setStyle("opacity","0");r.setTitle(l);r.refreshTitlePosition();d=r.measureView(i,a,g);j=d.left;b=d.title;r.isAnimating=true;r.animate(e,j.element);r.animate(m,b.element,function(){m.setLeft(d.titleLeft);r.isAnimating=false});if(Ext.os.is.Android2&&!this.getAndroid2Transforms()){i.ghost.destroy();a.ghost.destroy()}else{r.animate(i.ghost,j.ghost);r.animate(a.ghost,b.ghost,function(){i.ghost.destroy();a.ghost.destroy()})}}else{if(c){n.setText(h);n.show()}else{n.hide()}r.setTitle(l)}},measureView:function(e,u,k){var w=this,j=w.element,v=w.leftBox.element,p=w.titleComponent.element,l=Math.min(j.getWidth()/3,200),q=v.getWidth(),c=j.getX(),m=j.getWidth(),n=p.getX(),d=p.getLeft(),s=p.getWidth(),r=e.x,t=e.width,a=e.left,h=Ext.os.is.Android2&&!this.getAndroid2Transforms(),i,b,f,x,o,g;g=c-r-t;if(k){i=g;b=Math.min(n-t,l)}else{b=g;i=Math.min(n-c,l)}if(h){f={element:{from:{left:i,opacity:1},to:{left:0,opacity:1}}}}else{f={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:0},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}g=c-n+q;if((a+s)>n){o=c-n-s}if(k){p.setLeft(0);b=c+m;if(o!==undefined){i=o}else{i=g}}else{i=m-n;if(o!==undefined){b=o}else{b=g}}if(h){x={element:{from:{left:i,opacity:1},to:{left:d,opacity:1}}}}else{x={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:d},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}return{left:f,title:x,titleLeft:d}},animate:function(b,a,e){var c=this,d;b.setLeft(0);a=Ext.apply(a,{element:b,easing:"ease-in-out",duration:c.getAnimation().duration});d=new Ext.fx.Animation(a);d.on("animationend",function(){if(e){e.call(c)}},c);Ext.Animator.run(d);c.activeAnimations.push(d)},endAnimation:function(){var a=this.activeAnimations,d,b,c;if(a){c=a.length;for(b=0;b0){if(b&&b.isAnimation){b.setReverse(true)}a.setActiveItem(d-1);a.getNavigationBar().onViewRemove(a,c[d],d)}},doRemove:function(){var a=this.getLayout().getAnimation();if(a&&a.isAnimation){a.setReverse(false)}this.callParent(arguments)},onItemAdd:function(b,a){this.doItemLayoutAdd(b,a);if(!this.isItemsInitializing&&b.isInnerItem()){this.setActiveItem(b);this.getNavigationBar().onViewAdd(this,b,a)}if(this.initialized){this.fireEvent("add",this,b,a)}},reset:function(){return this.pop(this.getInnerItems().length)}});Ext.define("Ext.picker.Slot",{extend:"Ext.dataview.DataView",xtype:"pickerslot",alternateClassName:"Ext.Picker.Slot",requires:["Ext.XTemplate","Ext.data.Store","Ext.Component","Ext.data.StoreManager"],isSlot:true,config:{title:null,showTitle:true,cls:Ext.baseCSSPrefix+"picker-slot",name:null,value:null,flex:1,align:"left",displayField:"text",valueField:"value",scrollable:{direction:"vertical",indicators:false,momentumEasing:{minVelocity:2},slotSnapEasing:{duration:100}}},constructor:function(){this.selectedIndex=0;this.callParent(arguments)},applyTitle:function(a){if(a){a=Ext.create("Ext.Component",{cls:Ext.baseCSSPrefix+"picker-slot-title",docked:"top",html:a})}return a},updateTitle:function(b,a){if(b){this.add(b);this.setupBar()}if(a){this.remove(a)}},updateShowTitle:function(a){var b=this.getTitle();if(b){b[a?"show":"hide"]();this.setupBar()}},updateDisplayField:function(a){this.setItemTpl('
'+Ext.baseCSSPrefix+'picker-invalid">{'+a+"}
")},updateAlign:function(a,c){var b=this.element;b.addCls(Ext.baseCSSPrefix+"picker-"+a);b.removeCls(Ext.baseCSSPrefix+"picker-"+c)},applyData:function(d){var f=[],c=d&&d.length,a,b,e;if(d&&Ext.isArray(d)&&c){for(a=0;a0){c[0].addCls(b+"first");c[c.length-1].addCls(b+"last")}this.updateUseTitles(this.getUseTitles())},onDoneButtonTap:function(){var a=this._value,b=this.getValue(true);if(b!=a){this.fireEvent("change",this,b)}this.hide()},onCancelButtonTap:function(){this.fireEvent("cancel",this);this.hide()},onSlotPick:function(a){this.fireEvent("pick",this,this.getValue(true),a)},onShow:function(){if(!this.isHidden()){this.setValue(this._value)}},setValue:function(k,a){var f=this,d=f.getInnerItems(),e=d.length,j,h,c,b,g;if(!k){k={};for(b=0;b{'+this.getDisplayField()+":htmlEncode}",listeners:{select:this.onListSelect,itemtap:this.onListTap,scope:this}}},a))}return this.listPanel},onMaskTap:function(){if(this.getDisabled()){return false}this.showPicker();return false},showPicker:function(){var b=this.getStore();if(!b||b.getCount()===0){return}if(this.getReadOnly()){return}this.isFocused=true;if(this.getUsePicker()){var e=this.getPhonePicker(),d=this.getName(),h={};h[d]=this.record.get(this.getValueField());e.setValue(h);if(!e.getParent()){Ext.Viewport.add(e)}e.show()}else{var f=this.getTabletPicker(),g=f.down("list"),b=g.getStore(),c=b.find(this.getValueField(),this.getValue(),null,null,null,true),a=b.getAt((c==-1)?0:c);if(!f.getParent()){Ext.Viewport.add(f)}f.showBy(this.getComponent());g.select(a,null,true)}},onListSelect:function(c,a){var b=this;if(a){b.setValue(a)}},onListTap:function(){this.listPanel.hide({type:"fade",out:true,scope:this})},onPickerChange:function(d,f){var e=this,g=f[e.getName()],b=e.getStore(),c=b.find(e.getValueField(),g,null,null,null,true),a=b.getAt(c);e.setValue(a)},onChange:function(f,h,e){var g=this,b=g.getStore(),d=(b)?b.find(g.getDisplayField(),e):-1,c=g.getValueField(),a=(b)?b.getAt(d):null,e=(a)?a.get(c):null;g.fireEvent("change",g,g.getValue(),e)},updateOptions:function(b){var a=this.getStore();if(!a){this.setStore(true);a=this._store}if(!b){a.clearData()}else{a.setData(b);this.onStoreDataChanged(a)}},applyStore:function(a){if(a===true){a=Ext.create("Ext.data.Store",{fields:[this.getValueField(),this.getDisplayField()]})}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:this,addrecords:this.onStoreDataChanged,removerecords:this.onStoreDataChanged,updaterecord:this.onStoreDataChanged,refresh:this.onStoreDataChanged})}return a},updateStore:function(a){if(a){this.onStoreDataChanged(a)}},onStoreDataChanged:function(a){var c=this.getInitialConfig(),b=this.getValue();if(Ext.isDefined(b)){this.updateValue(this.applyValue(b))}if(this.getValue()===null){if(c.hasOwnProperty("value")){this.setValue(c.value)}if(this.getValue()===null){if(a.getCount()>0){this.setValue(a.getAt(0))}}}},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){var b=this.getStore(),a=(this.originalValue)?this.originalValue:b.getAt(0);if(b&&a){this.setValue(a)}return this},onFocus:function(a){this.fireEvent("focus",this,a);this.isFocused=true;this.showPicker()},destroy:function(){this.callParent(arguments);Ext.destroy(this.listPanel,this.picker,this.hiddenField)}});Ext.define("Ext.picker.Date",{extend:"Ext.picker.Picker",xtype:"datepicker",alternateClassName:"Ext.DatePicker",requires:["Ext.DateExtras"],config:{yearFrom:1980,yearTo:new Date().getFullYear(),monthText:"Month",dayText:"Day",yearText:"Year",slotOrder:["month","day","year"]},initialize:function(){this.callParent();this.on({scope:this,delegate:"> slot",slotpick:this.onSlotPick})},setValue:function(b,a){if(Ext.isDate(b)){b={day:b.getDate(),month:b.getMonth()+1,year:b.getFullYear()}}this.callParent([b,a])},getValue:function(k){var h={},e=this.getItems().items,d=e.length,a,g,c,f,j,b;for(b=0;bf){e=m;m=f;f=e}for(d=m;d<=f;d++){g.push({text:d,value:d})}a=this.getDaysInMonth(1,new Date().getFullYear());for(d=0;d thumb",dragstart:"onThumbDragStart",drag:"onThumbDrag",dragend:"onThumbDragEnd"});this.on({painted:"refresh",resize:"refresh"})},factoryThumb:function(){return Ext.factory(this.getThumbConfig(),Ext.slider.Thumb)},getThumbs:function(){return this.innerItems},getThumb:function(a){if(typeof a!="number"){a=0}return this.innerItems[a]},refreshOffsetValueRatio:function(){var b=this.getMaxValue()-this.getMinValue(),a=this.elementWidth-this.thumbWidth;this.offsetValueRatio=a/b},refreshElementWidth:function(){this.elementWidth=this.element.dom.offsetWidth;var a=this.getThumb(0);if(a){this.thumbWidth=a.getElementWidth()}},refresh:function(){this.refreshElementWidth();this.refreshValue()},setActiveThumb:function(b){var a=this.activeThumb;if(a&&a!==b){a.setZIndex(null)}this.activeThumb=b;b.setZIndex(2);return this},onThumbDragStart:function(a,b){if(b.absDeltaX<=b.absDeltaY){return false}else{b.stopPropagation()}if(this.getAllowThumbsOverlapping()){this.setActiveThumb(a)}this.dragStartValue=this.getValue()[this.getThumbIndex(a)];this.fireEvent("dragstart",this,a,this.dragStartValue,b)},onThumbDrag:function(c,g,a){var d=this.getThumbIndex(c),f=this.offsetValueRatio,b=this.constrainValue(a/f);g.stopPropagation();this.setIndexValue(d,b);this.fireEvent("drag",this,c,this.getValue(),g);return false},setIndexValue:function(d,g,f){var c=this.getThumb(d),b=this.getValue(),e=this.offsetValueRatio,a=c.getDraggable();a.setOffset(g*e,null,f);b[d]=g},onThumbDragEnd:function(a,f){this.refreshThumbConstraints(a);var c=this.getThumbIndex(a),d=this.getValue()[c],b=this.dragStartValue;this.fireEvent("dragend",this,a,this.getValue(),f);if(b!==d){this.fireEvent("change",this,a,d,b)}},getThumbIndex:function(a){return this.getThumbs().indexOf(a)},refreshThumbConstraints:function(d){var b=this.getAllowThumbsOverlapping(),a=d.getDraggable().getOffset().x,c=this.getThumbs(),e=this.getThumbIndex(d),g=c[e-1],h=c[e+1],f=this.thumbWidth;if(g){g.getDraggable().addExtraConstraint({max:{x:a-((b)?0:f)}})}if(h){h.getDraggable().addExtraConstraint({min:{x:a+((b)?0:f)}})}},onTap:function(j){if(this.isDisabled()){return}var k=Ext.get(j.target);if(!k||k.hasCls("x-thumb")){return}var n=j.touch.point.x,h=this.element,c=h.getX(),d=n-c-(this.thumbWidth/2),o=this.constrainValue(d/this.offsetValueRatio),r=this.getValue(),q=Infinity,m=r.length,g,f,l,p,b,a;if(m===1){p=0}else{for(g=0;g=(a/2)){e+=(c>0)?a:-a}e=Math.max(d,e);e=Math.min(f,e);return e},setThumbsCount:function(e){var a=this.getThumbs(),f=a.length,c,d,b;if(f>e){for(c=0,d=f-e;c0,b=d.getMaxValueCls(),e=d.getMinValueCls();this.element.addCls(g?b:e);this.element.removeCls(g?e:b)},toggle:function(){var a=this.getValue();this.setValue((a==1)?0:1);return this},onTap:function(){if(this.isDisabled()){return}var b=this.getValue(),c=(b==1)?0:1,a=this.getThumb(0);this.setIndexValue(0,c,this.getAnimation());this.refreshThumbConstraints(a);this.fireEvent("change",this,a,c,b)}});Ext.define("Ext.field.Toggle",{extend:"Ext.field.Slider",xtype:"togglefield",alternateClassName:"Ext.form.Toggle",requires:["Ext.slider.Toggle"],config:{cls:"x-toggle-field"},proxyConfig:{minValueCls:"x-toggle-off",maxValueCls:"x-toggle-on"},applyComponent:function(a){return Ext.factory(a,Ext.slider.Toggle)},setValue:function(a){if(a===true){a=1}this.getComponent().setValue(a);return this},getValue:function(){return(this.getComponent().getValue()==1)?1:0},toggle:function(){this.getComponent().toggle();return this}});Ext.define("Ext.tab.Tab",{extend:"Ext.Button",xtype:"tab",alternateClassName:"Ext.Tab",isTab:true,config:{baseCls:Ext.baseCSSPrefix+"tab",pressedCls:Ext.baseCSSPrefix+"tab-pressed",activeCls:Ext.baseCSSPrefix+"tab-active",active:false,title:" "},template:[{tag:"span",reference:"badgeElement",hidden:true},{tag:"span",className:Ext.baseCSSPrefix+"button-icon",reference:"iconElement",style:"visibility: hidden !important"},{tag:"span",reference:"textElement",hidden:true}],updateTitle:function(a){this.setText(a)},hideIconElement:function(){this.iconElement.dom.style.setProperty("visibility","hidden","!important")},showIconElement:function(){this.iconElement.dom.style.setProperty("visibility","visible","!important")},updateActive:function(c,b){var a=this.getActiveCls();if(c&&!b){this.element.addCls(a);this.fireEvent("activate",this)}else{if(b){this.element.removeCls(a);this.fireEvent("deactivate",this)}}}},function(){this.override({activate:function(){this.setActive(true)},deactivate:function(){this.setActive(false)}})});Ext.define("Ext.tab.Bar",{extend:"Ext.Toolbar",alternateClassName:"Ext.TabBar",xtype:"tabbar",requires:["Ext.tab.Tab"],config:{baseCls:Ext.baseCSSPrefix+"tabbar",defaultType:"tab",layout:{type:"hbox",align:"middle"}},eventedConfig:{activeTab:null},initialize:function(){var a=this;a.callParent();a.on({tap:"onTabTap",delegate:"> tab",scope:a})},onTabTap:function(a){this.setActiveTab(a)},applyActiveTab:function(b,c){if(!b&&b!==0){return}var a=this.parseActiveTab(b);if(!a){return}return a},doSetDocked:function(a){var c=this.getLayout(),b=a=="bottom"?"center":"left";if(c.isLayout){c.setPack(b)}else{c.pack=(c&&c.pack)?c.pack:b}},doSetActiveTab:function(b,a){if(b){b.setActive(true)}if(a){a.setActive(false)}},parseActiveTab:function(a){if(typeof a=="number"){return this.getInnerItems()[a]}else{if(typeof a=="string"){a=Ext.getCmp(a)}}return a}});Ext.define("Ext.tab.Panel",{extend:"Ext.Container",xtype:"tabpanel",alternateClassName:"Ext.TabPanel",requires:["Ext.tab.Bar"],config:{ui:"dark",tabBar:true,tabBarPosition:"top",layout:{type:"card",animation:{type:"slide",direction:"left"}},cls:Ext.baseCSSPrefix+"tabpanel"},delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange",disabledchange:"onItemDisabledChange"},initialize:function(){this.callParent();this.on({order:"before",activetabchange:"doTabChange",delegate:"> tabbar",scope:this})},applyScrollable:function(){return false},updateUi:function(a,b){this.callParent(arguments);if(this.initialized){this.getTabBar().setUi(a)}},doSetActiveItem:function(d,j){if(d){var f=this.getInnerItems(),g=f.indexOf(j),i=f.indexOf(d),e=g>i,c=this.getLayout().getAnimation(),b=this.getTabBar(),h=b.parseActiveTab(g),a=b.parseActiveTab(i);if(c&&c.setReverse){c.setReverse(e)}this.callParent(arguments);if(i!=-1){this.forcedChange=true;b.setActiveTab(i);this.forcedChange=false;if(h){h.setActive(false)}if(a){a.setActive(true)}}}},doTabChange:function(a,d){var b=this.getActiveItem(),c;this.setActiveItem(a.indexOf(d));c=this.getActiveItem();return this.forcedChange||b!==c},applyTabBar:function(a){if(a===true){a={}}if(a){Ext.applyIf(a,{ui:this.getUi(),docked:this.getTabBarPosition()})}return Ext.factory(a,Ext.tab.Bar,this.getTabBar())},updateTabBar:function(a){if(a){this.add(a);this.setTabBarPosition(a.getDocked())}},updateTabBarPosition:function(b){var a=this.getTabBar();if(a){a.setDocked(b)}},onItemAdd:function(e){var k=this;if(!e.isInnerItem()){return k.callParent(arguments)}var c=k.getTabBar(),o=e.getInitialConfig(),d=o.tab||{},g=(e.getTitle)?e.getTitle():o.title,i=(e.getIconCls)?e.getIconCls():o.iconCls,j=(e.getHidden)?e.getHidden():o.hidden,n=(e.getDisabled)?e.getDisabled():o.disabled,p=(e.getBadgeText)?e.getBadgeText():o.badgeText,b=k.getInnerItems(),h=b.indexOf(e),l=c.getItems(),a=c.getActiveTab(),m=(l.length>=b.length)&&l.getAt(h),f;if(g&&!d.title){d.title=g}if(i&&!d.iconCls){d.iconCls=i}if(j&&!d.hidden){d.hidden=j}if(n&&!d.disabled){d.disabled=n}if(p&&!d.badgeText){d.badgeText=p}f=Ext.factory(d,Ext.tab.Tab,m);if(!m){c.insert(h,f)}e.tab=f;k.callParent(arguments);if(!a&&a!==0){c.setActiveTab(c.getActiveItem())}},onItemDisabledChange:function(a,b){if(a&&a.tab){a.tab.setDisabled(b)}},onItemRemove:function(b,a){this.getTabBar().remove(b.tab,this.getAutoDestroy());this.callParent(arguments)}},function(){});Ext.define("Ext.table.Cell",{extend:"Ext.Container",xtype:"tablecell",config:{baseCls:"x-table-cell"},getElementConfig:function(){var a=this.callParent();a.children.length=0;return a}});Ext.define("Ext.table.Row",{extend:"Ext.table.Cell",xtype:"tablerow",config:{baseCls:"x-table-row",defaultType:"tablecell"}});Ext.define("Ext.table.Table",{extend:"Ext.Container",requires:["Ext.table.Row"],xtype:"table",config:{baseCls:"x-table",defaultType:"tablerow"},cachedConfig:{fixedLayout:false},fixedLayoutCls:"x-table-fixed",updateFixedLayout:function(a){this.innerElement[a?"addCls":"removeCls"](this.fixedLayoutCls)}});Ext.define("Ext.viewport.Default",{extend:"Ext.Container",xtype:"viewport",PORTRAIT:"portrait",LANDSCAPE:"landscape",requires:["Ext.LoadMask"],config:{autoMaximize:false,autoBlurInput:true,preventPanning:true,preventZooming:false,autoRender:true,layout:"card",width:"100%",height:"100%"},isReady:false,isViewport:true,isMaximizing:false,id:"ext-viewport",isInputRegex:/^(input|textarea|select|a)$/i,focusedElement:null,fullscreenItemCls:Ext.baseCSSPrefix+"fullscreen",constructor:function(a){var b=Ext.Function.bind;this.doPreventPanning=b(this.doPreventPanning,this);this.doPreventZooming=b(this.doPreventZooming,this);this.doBlurInput=b(this.doBlurInput,this);this.maximizeOnEvents=["ready","orientationchange"];this.orientation=this.determineOrientation();this.windowWidth=this.getWindowWidth();this.windowHeight=this.getWindowHeight();this.windowOuterHeight=this.getWindowOuterHeight();if(!this.stretchHeights){this.stretchHeights={}}this.callParent([a]);if(this.supportsOrientation()){this.addWindowListener("orientationchange",b(this.onOrientationChange,this))}else{this.addWindowListener("resize",b(this.onResize,this))}document.addEventListener("focus",b(this.onElementFocus,this),true);document.addEventListener("blur",b(this.onElementBlur,this),true);Ext.onDocumentReady(this.onDomReady,this);this.on("ready",this.onReady,this,{single:true});this.getEventDispatcher().addListener("component","*","fullscreen","onItemFullscreenChange",this);return this},onDomReady:function(){this.isReady=true;this.updateSize();this.fireEvent("ready",this)},onReady:function(){if(this.getAutoRender()){this.render()}},onElementFocus:function(a){this.focusedElement=a.target},onElementBlur:function(){this.focusedElement=null},render:function(){if(!this.rendered){var a=Ext.getBody(),b=Ext.baseCSSPrefix,h=[],d=Ext.os,g=d.name.toLowerCase(),f=Ext.browser.name.toLowerCase(),e=d.version.getMajor(),c=this.getOrientation();this.renderTo(a);h.push(b+d.deviceType.toLowerCase());if(d.is.iPad){h.push(b+"ipad")}h.push(b+g);h.push(b+f);if(e){h.push(b+g+"-"+e)}if(d.is.BlackBerry){h.push(b+"bb")}if(Ext.browser.is.Standalone){h.push(b+"standalone")}h.push(b+c);a.addCls(h)}},applyAutoBlurInput:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doBlurInput,false)}else{this.removeWindowListener(b,this.doBlurInput,false)}return a},applyAutoMaximize:function(a){if(Ext.browser.is.WebView){a=false}if(a){this.on("ready","doAutoMaximizeOnReady",this,{single:true});this.on("orientationchange","doAutoMaximizeOnOrientationChange",this)}else{this.un("ready","doAutoMaximizeOnReady",this);this.un("orientationchange","doAutoMaximizeOnOrientationChange",this)}return a},applyPreventPanning:function(a){if(a){this.addWindowListener("touchmove",this.doPreventPanning,false)}else{this.removeWindowListener("touchmove",this.doPreventPanning,false)}return a},applyPreventZooming:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doPreventZooming,false)}else{this.removeWindowListener(b,this.doPreventZooming,false)}return a},doAutoMaximizeOnReady:function(){var a=arguments[arguments.length-1];a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();a.resume();this.fireEvent("ready",this)},this,{single:true});this.maximize()},doAutoMaximizeOnOrientationChange:function(){var a=arguments[arguments.length-1],b=a.firingArguments;a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();b[1]=this.windowWidth;b[2]=this.windowHeight;a.resume()},this,{single:true});this.maximize()},doBlurInput:function(b){var a=b.target,c=this.focusedElement;if(c&&!this.isInputRegex.test(a.tagName)){delete this.focusedElement;c.blur()}},doPreventPanning:function(a){a.preventDefault()},doPreventZooming:function(b){if("button" in b&&b.button!==0){return}var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)){b.preventDefault()}},addWindowListener:function(b,c,a){window.addEventListener(b,c,Boolean(a))},removeWindowListener:function(b,c,a){window.removeEventListener(b,c,Boolean(a))},doAddListener:function(a,d,c,b){if(a==="ready"&&this.isReady&&!this.isMaximizing){d.call(c);return this}this.mixins.observable.doAddListener.apply(this,arguments)},supportsOrientation:function(){return Ext.feature.has.Orientation},onResize:function(){var c=this.windowWidth,f=this.windowHeight,e=this.getWindowWidth(),a=this.getWindowHeight(),d=this.getOrientation(),b=this.determineOrientation();if((c!==e||f!==a)&&d!==b){this.fireOrientationChangeEvent(b,d)}},onOrientationChange:function(){var b=this.getOrientation(),a=this.determineOrientation();if(a!==b){this.fireOrientationChangeEvent(a,b)}},fireOrientationChangeEvent:function(b,c){var a=Ext.baseCSSPrefix;Ext.getBody().replaceCls(a+c,a+b);this.orientation=b;this.updateSize();this.fireEvent("orientationchange",this,b,this.windowWidth,this.windowHeight)},updateSize:function(b,a){this.windowWidth=b!==undefined?b:this.getWindowWidth();this.windowHeight=a!==undefined?a:this.getWindowHeight();return this},waitUntil:function(h,e,g,a,f){if(!a){a=50}if(!f){f=2000}var c=this,b=0;setTimeout(function d(){b+=a;if(h.call(c)===true){if(e){e.call(c)}}else{if(b>=f){if(g){g.call(c)}}else{setTimeout(d,a)}}},a)},maximize:function(){this.fireMaximizeEvent()},fireMaximizeEvent:function(){this.updateSize();this.fireEvent("maximize",this)},doSetHeight:function(a){Ext.getBody().setHeight(a);this.callParent(arguments)},doSetWidth:function(a){Ext.getBody().setWidth(a);this.callParent(arguments)},scrollToTop:function(){window.scrollTo(0,-1)},getWindowWidth:function(){return window.innerWidth},getWindowHeight:function(){return window.innerHeight},getWindowOuterHeight:function(){return window.outerHeight},getWindowOrientation:function(){return window.orientation},getOrientation:function(){return this.orientation},getSize:function(){return{width:this.windowWidth,height:this.windowHeight}},determineOrientation:function(){var b=this.PORTRAIT,a=this.LANDSCAPE;if(this.supportsOrientation()){if(this.getWindowOrientation()%180===0){return b}return a}else{if(this.getWindowHeight()>=this.getWindowWidth()){return b}return a}},onItemFullscreenChange:function(a){a.addCls(this.fullscreenItemCls);this.add(a)}});Ext.define("Ext.viewport.Android",{extend:"Ext.viewport.Default",constructor:function(){this.on("orientationchange","doFireOrientationChangeEvent",this,{prepend:true});this.on("orientationchange","hideKeyboardIfNeeded",this,{prepend:true});return this.callParent(arguments)},getDummyInput:function(){var a=this.dummyInput,c=this.focusedElement,b=Ext.fly(c).getPageBox();if(!a){this.dummyInput=a=document.createElement("input");a.style.position="absolute";a.style.opacity="0";document.body.appendChild(a)}a.style.left=b.left+"px";a.style.top=b.top+"px";a.style.display="";return a},doBlurInput:function(c){var b=c.target,d=this.focusedElement,a;if(d&&!this.isInputRegex.test(b.tagName)){a=this.getDummyInput();delete this.focusedElement;a.focus();setTimeout(function(){a.style.display="none"},100)}},hideKeyboardIfNeeded:function(){var a=arguments[arguments.length-1],b=this.focusedElement;if(b){delete this.focusedElement;a.pause();if(Ext.os.version.lt("4")){b.style.display="none"}else{b.blur()}setTimeout(function(){b.style.display="";a.resume()},1000)}},doFireOrientationChangeEvent:function(){var a=arguments[arguments.length-1];this.orientationChanging=true;a.pause();this.waitUntil(function(){return this.getWindowOuterHeight()!==this.windowOuterHeight},function(){this.windowOuterHeight=this.getWindowOuterHeight();this.updateSize();a.firingArguments[1]=this.windowWidth;a.firingArguments[2]=this.windowHeight;a.resume();this.orientationChanging=false},function(){});return this},applyAutoMaximize:function(a){a=this.callParent(arguments);this.on("add","fixSize",this,{single:true});if(!a){this.on("ready","fixSize",this,{single:true});this.onAfter("orientationchange","doFixSize",this)}else{this.un("ready","fixSize",this);this.unAfter("orientationchange","doFixSize",this)}},fixSize:function(){this.doFixSize()},doFixSize:function(){this.setHeight(this.getWindowHeight())},getActualWindowOuterHeight:function(){return Math.round(this.getWindowOuterHeight()/window.devicePixelRatio)},maximize:function(){var c=this.stretchHeights,b=this.orientation,a;a=c[b];if(!a){c[b]=a=this.getActualWindowOuterHeight()}if(!this.addressBarHeight){this.addressBarHeight=a-this.getWindowHeight()}this.setHeight(a);var d=Ext.Function.bind(this.isHeightMaximized,this,[a]);this.scrollToTop();this.waitUntil(d,this.fireMaximizeEvent,this.fireMaximizeEvent)},isHeightMaximized:function(a){this.scrollToTop();return this.getWindowHeight()===a}},function(){if(!Ext.os.is.Android){return}var a=Ext.os.version,b=Ext.browser.userAgent,c=/(htc|desire|incredible|ADR6300)/i.test(b)&&a.lt("2.3");if(c){this.override({constructor:function(d){if(!d){d={}}d.autoMaximize=false;this.watchDogTick=Ext.Function.bind(this.watchDogTick,this);setInterval(this.watchDogTick,1000);return this.callParent([d])},watchDogTick:function(){this.watchDogLastTick=Ext.Date.now()},doPreventPanning:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)},doPreventZooming:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)}})}if(a.match("2")){this.override({onReady:function(){this.addWindowListener("resize",Ext.Function.bind(this.onWindowResize,this));this.callParent(arguments)},scrollToTop:function(){document.body.scrollTop=100},onWindowResize:function(){var e=this.windowWidth,g=this.windowHeight,f=this.getWindowWidth(),d=this.getWindowHeight();if(this.getAutoMaximize()&&!this.isMaximizing&&!this.orientationChanging&&window.scrollY===0&&e===f&&d=g-this.addressBarHeight)||!this.focusedElement)){this.scrollToTop()}},fixSize:function(){var d=this.getOrientation(),f=window.outerHeight,g=window.outerWidth,e;if(d==="landscape"&&(f=g)){e=this.getActualWindowOuterHeight()}else{e=this.getWindowHeight()}this.waitUntil(function(){return e>this.getWindowHeight()},this.doFixSize,this.doFixSize,50,1000)}})}else{if(a.gtEq("3.1")){this.override({isHeightMaximized:function(d){this.scrollToTop();return this.getWindowHeight()===d-1}})}else{if(a.match("3")){this.override({isHeightMaximized:function(){this.scrollToTop();return true}})}}}if(a.gtEq("4")){this.override({doBlurInput:Ext.emptyFn})}});Ext.define("Ext.viewport.Ios",{extend:"Ext.viewport.Default",isFullscreen:function(){return this.isHomeScreen()},isHomeScreen:function(){return window.navigator.standalone===true},constructor:function(){this.callParent(arguments);if(this.getAutoMaximize()&&!this.isFullscreen()){this.addWindowListener("touchstart",Ext.Function.bind(this.onTouchStart,this))}},maximize:function(){if(this.isFullscreen()){return this.callParent()}var c=this.stretchHeights,b=this.orientation,d=this.getWindowHeight(),a=c[b];if(window.scrollY>0){this.scrollToTop();if(!a){c[b]=a=this.getWindowHeight()}this.setHeight(a);this.fireMaximizeEvent()}else{if(!a){a=this.getScreenHeight()}this.setHeight(a);this.waitUntil(function(){this.scrollToTop();return d!==this.getWindowHeight()},function(){if(!c[b]){a=c[b]=this.getWindowHeight();this.setHeight(a)}this.fireMaximizeEvent()},function(){a=c[b]=this.getWindowHeight();this.setHeight(a);this.fireMaximizeEvent()},50,1000)}},getScreenHeight:function(){return window.screen[this.orientation===this.PORTRAIT?"height":"width"]},onElementFocus:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){clearTimeout(this.scrollToTopTimer)}this.callParent(arguments)},onElementBlur:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){this.scrollToTopTimer=setTimeout(this.scrollToTop,500)}this.callParent(arguments)},onTouchStart:function(){if(this.focusedElement===null){this.scrollToTop()}},scrollToTop:function(){window.scrollTo(0,0)}},function(){if(!Ext.os.is.iOS){return}if(Ext.os.version.lt("3.2")){this.override({constructor:function(){var a=this.stretchHeights={};a[this.PORTRAIT]=416;a[this.LANDSCAPE]=268;return this.callOverridden(arguments)}})}if(Ext.os.version.lt("5")){this.override({fieldMaskClsTest:"-field-mask",doPreventZooming:function(b){var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)&&a.className.indexOf(this.fieldMaskClsTest)==-1){b.preventDefault()}}})}if(Ext.os.is.iPad){this.override({isFullscreen:function(){return true}})}});Ext.define("Ext.viewport.Viewport",{requires:["Ext.viewport.Ios","Ext.viewport.Android"],constructor:function(b){var c=Ext.os.name,d,a;switch(c){case"Android":d="Android";break;case"iOS":d="Ios";break;default:d="Default"}a=Ext.create("Ext.viewport."+d,b);return a}});Ext.define("Ext.event.recognizer.Swipe",{extend:"Ext.event.recognizer.SingleTouch",handledEvents:["swipe"],inheritableStatics:{MAX_OFFSET_EXCEEDED:16,MAX_DURATION_EXCEEDED:17,DISTANCE_NOT_ENOUGH:18},config:{minDistance:80,maxOffset:35,maxDuration:1000},onTouchStart:function(a){if(this.callParent(arguments)===false){return false}var b=a.changedTouches[0];this.startTime=a.time;this.isHorizontal=true;this.isVertical=true;this.startX=b.pageX;this.startY=b.pageY},onTouchMove:function(f){var h=f.changedTouches[0],b=h.pageX,g=h.pageY,c=Math.abs(b-this.startX),a=Math.abs(g-this.startY),d=f.time;if(d-this.startTime>this.getMaxDuration()){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(this.isVertical&&c>this.getMaxOffset()){this.isVertical=false}if(this.isHorizontal&&a>this.getMaxOffset()){this.isHorizontal=false}if(!this.isHorizontal&&!this.isVertical){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(i){if(this.onTouchMove(i)===false){return false}var h=i.changedTouches[0],l=h.pageX,j=h.pageY,g=l-this.startX,f=j-this.startY,c=Math.abs(g),b=Math.abs(f),m=this.getMinDistance(),d=i.time-this.startTime,k,a;if(this.isVertical&&bc){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(a>b){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(f){if(this.onTouchMove(f)!==false){var i=f.changedTouches[0],a=i.pageX,b=a-this.startX,h=Math.abs(b),d=f.time-this.startTime,g=this.getMinDistance(),c;if(h *{height:100%;width:100%;position:absolute}.x-video-ghost{-webkit-background-size:100% auto;background:black url() center center no-repeat}audio{width:100%}.x-panel,.x-msgbox,.x-panel-body{position:relative}.x-panel.x-floating,.x-msgbox.x-floating,.x-form.x-floating{padding:6px;-webkit-border-radius:0.3em;border-radius:0.3em;-webkit-box-shadow:rgba(0, 0, 0, 0.8) 0 0.2em 0.6em;background-color:#03111a;background-image:none}.x-panel.x-floating.x-floating-light,.x-msgbox.x-floating.x-floating-light,.x-form.x-floating.x-floating-light{background-color:#1985d0;background-image:none}.x-panel.x-floating > .x-panel-inner,.x-panel.x-floating .x-scroll-view,.x-panel.x-floating .x-body,.x-msgbox.x-floating > .x-panel-inner,.x-msgbox.x-floating .x-scroll-view,.x-msgbox.x-floating .x-body,.x-form.x-floating > .x-panel-inner,.x-form.x-floating .x-scroll-view,.x-form.x-floating .x-body{background-color:#fff;-webkit-border-radius:0.3em;border-radius:0.3em}.x-anchor{width:1.631em;height:0.7em;position:absolute;left:0;top:0;z-index:1;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAPCAYAAABut3YUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNpi/PX7LwOFwAyIG6HseiA+Ra5BjBQ6xg+IVwAxJ5T/HYgjgHgTOYYxUeCQUiBeh+QQBih7HVSOLiHDDMSTgTiTgLrpQJwLxH9p5RhOaLT4EakeFF3RQPyF2o6RhkaBGYkheRmIPYH4KbXSjC4QnyTDIch6danhGCcgPgwNGXKBNNQMb0ocEwXE24GYn4FyADJjI76Ej88x7UC8FIjZGKgHQDlxGtRsZmISMMjy+dBQoSXYBC0gv+NyDD80xzgx0AeAqg4fIH6NHk0qQHyMjg6B1WvHYDkNFjIgwS1ALMowMOAjEAeBHINe2Q0U+AUQYACQ10C2QNhRogAAAABJRU5ErkJggg==') no-repeat;-webkit-mask-size:1.631em 0.7em;overflow:hidden;background-color:#03111a;-webkit-transform-origin:0% 0%}.x-anchor.x-anchor-top{margin-left:-0.816em;margin-top:-0.7em}.x-anchor.x-anchor-bottom{-webkit-transform:rotate(180deg);margin-left:0.816em;margin-top:0.6em}.x-anchor.x-anchor-left{-webkit-transform:rotate(270deg);margin-left:-0.7em;margin-top:-0.1em}.x-anchor.x-anchor-right{-webkit-transform:rotate(90deg);margin-left:0.7em;margin-top:0}.x-floating.x-panel-light:after{background-color:#1985d0}.x-button{-webkit-background-clip:padding;background-clip:padding-box;-webkit-border-radius:0.4em;border-radius:0.4em;display:-webkit-box;display:box;-webkit-box-align:center;box-align:center;min-height:1.8em;padding:.3em .6em;position:relative;overflow:hidden;-webkit-user-select:none}.x-button,.x-toolbar .x-button{border:1px solid #999999;border-top-color:#a6a6a6;color:black}.x-button.x-button-back:before,.x-button.x-button-forward:before,.x-toolbar .x-button.x-button-back:before,.x-toolbar .x-button.x-button-forward:before{background:#999999}.x-button,.x-button.x-button-back:after,.x-button.x-button-forward:after,.x-toolbar .x-button,.x-toolbar .x-button.x-button-back:after,.x-toolbar .x-button.x-button-forward:after{background-color:#ccc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #dedede), color-stop(100%, #bababa));background-image:-webkit-linear-gradient(#ffffff,#dedede 2%,#bababa);background-image:linear-gradient(#ffffff,#dedede 2%,#bababa)}.x-button .x-button-icon.x-icon-mask,.x-toolbar .x-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-button.x-button-pressing,.x-button.x-button-pressing:after,.x-button.x-button-pressed,.x-button.x-button-pressed:after,.x-button.x-button-active,.x-button.x-button-active:after,.x-toolbar .x-button.x-button-pressing,.x-toolbar .x-button.x-button-pressing:after,.x-toolbar .x-button.x-button-pressed,.x-toolbar .x-button.x-button-pressed:after,.x-toolbar .x-button.x-button-active,.x-toolbar .x-button.x-button-active:after{background-color:#c4c4c4;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ababab), color-stop(10%, #b8b8b8), color-stop(65%, #c4c4c4), color-stop(100%, #c6c6c6));background-image:-webkit-linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6);background-image:linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6)}.x-button .x-button-icon{width:2.1em;height:2.1em;background-repeat:no-repeat;background-position:center;display:block}.x-button .x-button-icon.x-icon-mask{width:1.3em;height:1.3em;-webkit-mask-size:1.3em}.x-button.x-item-disabled .x-button-label,.x-button.x-item-disabled .x-hasbadge .x-badge,.x-hasbadge .x-button.x-item-disabled .x-badge,.x-button.x-item-disabled .x-button-icon{opacity:.5}.x-button-round,.x-button.x-button-action-round,.x-button.x-button-confirm-round,.x-button.x-button-decline-round{-webkit-border-radius:0.9em;border-radius:0.9em;padding:0.1em 0.9em}.x-iconalign-left,.x-icon-align-right{-webkit-box-orient:horizontal;box-orient:horizontal}.x-iconalign-top,.x-iconalign-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-iconalign-bottom,.x-iconalign-right{-webkit-box-direction:reverse;box-direction:reverse}.x-iconalign-center{-webkit-box-pack:center;box-pack:center}.x-iconalign-left .x-button-label,.x-iconalign-left .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-left .x-badge{margin-left:0.3em}.x-iconalign-right .x-button-label,.x-iconalign-right .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-right .x-badge{margin-right:0.3em}.x-iconalign-top .x-button-label,.x-iconalign-top .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-top .x-badge{margin-top:0.3em}.x-iconalign-bottom .x-button-label,.x-iconalign-bottom .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-bottom .x-badge{margin-bottom:0.3em}.x-button-label,.x-hasbadge .x-badge{-webkit-box-flex:1;box-flex:1;-webkit-box-align:center;box-align:center;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-weight:bold;line-height:1.2em;display:block;overflow:hidden}.x-toolbar .x-button{margin:0 .2em;padding:.3em .6em}.x-toolbar .x-button .x-button-label,.x-toolbar .x-button .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button .x-badge{font-size:.7em}.x-button-small,.x-button.x-button-action-small,.x-button.x-button-confirm-small,.x-button.x-button-decline-small,.x-toolbar .x-button-small,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-decline-small{-webkit-border-radius:0.3em;border-radius:0.3em;padding:.2em .4em;min-height:0}.x-button-small .x-button-label,.x-button.x-button-action-small .x-button-label,.x-button.x-button-confirm-small .x-button-label,.x-button.x-button-decline-small .x-button-label,.x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-button-small .x-badge,.x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-action-small .x-badge,.x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-confirm-small .x-badge,.x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-decline-small .x-badge,.x-toolbar .x-button-small .x-button-label,.x-toolbar .x-button.x-button-action-small .x-button-label,.x-toolbar .x-button.x-button-confirm-small .x-button-label,.x-toolbar .x-button.x-button-decline-small .x-button-label,.x-toolbar .x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button-small .x-badge,.x-toolbar .x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-action-small .x-badge,.x-toolbar .x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-confirm-small .x-badge,.x-toolbar .x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-decline-small .x-badge{font-size:.6em}.x-button-small .x-button-icon,.x-button.x-button-action-small .x-button-icon,.x-button.x-button-confirm-small .x-button-icon,.x-button.x-button-decline-small .x-button-icon,.x-toolbar .x-button-small .x-button-icon,.x-toolbar .x-button.x-button-action-small .x-button-icon,.x-toolbar .x-button.x-button-confirm-small .x-button-icon,.x-toolbar .x-button.x-button-decline-small .x-button-icon{width:.75em;height:.75em}.x-button-forward,.x-button-back{position:relative;overflow:visible;height:1.8em;z-index:1}.x-button-forward:before,.x-button-forward:after,.x-button-back:before,.x-button-back:after{content:"";position:absolute;width:0.773em;height:1.8em;top:-0.1em;left:auto;z-index:2;-webkit-mask:0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAiNJREFUeNrEWb9LQlEUvj5BcHoQvMnVKXD1D3CLwqBJbHJsazQaWoSCxgbHJiMIAiNok6AhCDdXVycnJ8EQOgeOYaG+d39998KH+HyP753zzjnfd325xfdSgVeV8B6BScuEV0IRSbxHeCMk/AVFXCA8ScQKSXxPqK0fQBBfE5r/D+Y8VzUT9jb94DPimqRYIYkrhGcpKhhxIqTxrpNcExdlQJTTTnRJnCc8ykhUSOIOoZ71ZFfEZ4S2zgUu+rguxZRHEnPbfKRVsOtUl0RtYpOLTYljIS2Z3nVk2DY9SbNCEt8RDm0rUpe4La1jvXSqmtum72raZI24KuNQIYl/nSGSOJb0Jq61M0pxhjwK9304hUjHGSKILzc5Q5drUzttdYY+I97pDH1FzG0zNFUb04gTG4kzJS5kdYauiZtZnaFr4ooKsCIVaDHxKAQxt1NBnGIVHfGCcEQYh3jGU8KBfMKLiyM+lgzAq/qT0ArVTg+Ei1B9fEPoovV4fcfQd2HedScX39GprwGTNjJn0maTELN6IuSzECLB6T5x2eM66jQgnIeSxa60GnS3uL56tr7b1Ai0JPVwYi6yho2U2lgfKym19VxjMRHzEGbvS9K+RBPzetGVUpf29lZHSl2/DMnLvwh1ZMQrKW3Ic4fvJOZS6ZMQW5hpmpT63DvtlFLfm7bBNruM2C2yXb7y3U6ZpRS5P/4jpUjihRTbCJ3q1eL3GMMfAQYAJmB6SBO619IAAAAASUVORK5CYII=') no-repeat;-webkit-mask-size:0.773em 1.8em;overflow:hidden}.x-button-back,.x-toolbar .x-button-back{margin-left:0.828em;padding-left:.4em}.x-button-back:before,.x-toolbar .x-button-back:before{left:-0.693em}.x-button-back:after,.x-toolbar .x-button-back:after{left:-0.628em}.x-button-forward,.x-toolbar .x-button-forward{margin-right:0.828em;padding-right:.4em}.x-button-forward:before,.x-button-forward:after,.x-toolbar .x-button-forward:before,.x-toolbar .x-button-forward:after{-webkit-mask:-0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXlJREFUaN7lmTFqAlEQhh8EhFSCYJXW1law9QAewMrWAwQWAmmtbPcGHiCQ1gPYCla2QsDKSsgmQecvFqImu2/fzry/2OLb9mt23vwz47Kvn5MwEFxM8DkLB6HHEIOd0GGIwUpoMcRgyRKDOUsMJizxpzBiiMFR6DPEeZl1GWKwFh4ZYvAmPDDEqmVWVQxmLPG3MGaIVcosVAz2whNDDDZCmyEG7yFlpiEGKUsMEpb4XKXMtMXeiVVb7J1YLcRgW1ZmVuLSxGopLkys1mLwwhL/mVhjie8Sayxx3kp7DPFVYo0tzhNriyEGU5Z40TjxtDE/F6WcDowHBE/msDFNImG0xZQRBAonDCvxhhH2vKZIZ9Ds+7EDfaWFnKZ4xhja5owxdcnYCAQv1p1Gi4sprn08cZbDt6ZYZasXIn5mLFHTjLCvVt1V+4rVt/M+4r3FPaJMbHaBKRKb3pyKxKZXtv/Er4yjZpRL6q042u34tzh4xV9H/FHnqBHKBQeEd6aqqwD6AAAAAElFTkSuQmCC') no-repeat}.x-button-forward:before,.x-toolbar .x-button-forward:before{right:-0.693em}.x-button-forward:after,.x-toolbar .x-button-forward:after{right:-0.628em}.x-button.x-button-plain,.x-toolbar .x-button.x-button-plain{background:none;border:0 none;-webkit-border-radius:none;border-radius:none;min-height:0;text-shadow:none;line-height:auto;height:auto;padding:0.5em}.x-button.x-button-plain > *,.x-toolbar .x-button.x-button-plain > *{overflow:visible}.x-button.x-button-plain .x-button-icon,.x-toolbar .x-button.x-button-plain .x-button-icon{-webkit-mask-size:1.4em;width:1.4em;height:1.4em}.x-button.x-button-plain.x-button-pressing,.x-button.x-button-plain.x-button-pressed,.x-toolbar .x-button.x-button-plain.x-button-pressing,.x-toolbar .x-button.x-button-plain.x-button-pressed{background:none;background-image:-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 24, color-stop(0%, rgba(182,225,255,0.7)), color-stop(100%, rgba(182,225,255,0)));background-image:-webkit-radial-gradient(rgba(182,225,255,0.7),rgba(182,225,255,0) 24px);background-image:radial-gradient(rgba(182,225,255,0.7),rgba(182,225,255,0) 24px)}.x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask{background-color:#fff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e6e6e6), color-stop(10%, #f2f2f2), color-stop(65%, #ffffff), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff);background-image:linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff)}.x-segmentedbutton .x-button{margin:0;-webkit-border-radius:0;border-radius:0}.x-segmentedbutton .x-button.x-first{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-segmentedbutton .x-button.x-last{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-segmentedbutton .x-button:not(:first-child){border-left:0}.x-hasbadge{overflow:visible}.x-hasbadge .x-badge{-webkit-background-clip:padding;background-clip:padding-box;-webkit-border-radius:0.2em;border-radius:0.2em;padding:.1em .3em;z-index:2;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-shadow:rgba(0, 0, 0, 0.5) 0 0.1em 0.1em;box-shadow:rgba(0, 0, 0, 0.5) 0 0.1em 0.1em;overflow:hidden;color:#ffcccc;border:1px solid #990000;position:absolute;width:auto;min-width:2em;line-height:1.2em;font-size:.6em;right:0px;top:-0.2em;max-width:95%;background-color:#cc0000;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff6666), color-stop(2%, #f00000), color-stop(100%, #a80000));background-image:-webkit-linear-gradient(#ff6666,#f00000 2%,#a80000);background-image:linear-gradient(#ff6666,#f00000 2%,#a80000);display:inline-block}.x-tab .x-button-icon.action,.x-button .x-button-icon.x-icon-mask.action{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFI0lEQVRoBe2YW4hVVRjHZ0yzq6lFEaMlE0PShYRAJIl6iEqKHnqI6WJB0IvdICkfEk0aIyo0KFCph8giCitI7CkoohQL7SoZDaQmXSgKo4uWNf1+zt7DOXvOOXuvvc85bc+cD36ssy/r+77/Xmt9e+3TOzIy0jORbNJEEqvWruBOH/HuCHdHuMOeQOmmdO+ozaA5oxXPunSC2Re4MbgCNiB6vvqbKbx0giNxp9BeBU/BIJqnRecLN2UVrLDj4GIYgscRfSltYSuzYMUdA/0wCI8ieglM5XduK7vgWJhTegGshucRfQHkyj1XpziLNrfmOh2ug1dhMaJn0gbZZDpNpsexQb2y3azfKXCAwns4W5dMd7m2B2ANLCT/x/A/nKknN5mUhWFp1g4Z7vM14jrbBZvgEwi1tAdkDEf3ZrgI0S/RrkP4IdqGpuA+cJo0yw7iyNfJmzAcMrokfjp93HC4XrPYCdzkgPXDPPqvJN7eRh0VrBWqfKMuev6k3Qzr4SP4HWqOFIkZ73iYA/NhLpwPZ4LLS+FZzUp+GtwAA/heS/sGwv+irWnXc9bdTRF20/8eOBWmEKwnCectOrPhSlgF2+Bb+Bl+AxP8B/6FvLn8Td8fYQXMSubgsVZU8Cv4mAeNhC7k+jLYCopzrRURlvZA9P8WLIJJlcI5zi1Ypw+Dr4oqp3EAzlsbLCjfg1PeEUxLtlnXXU4/wQboq8gpl2BHx2l5UuyosuW8I6rQb8Bp1iwRefy4VN6FReaopU3pX7jnhwSO7MmVIiNnJ3L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ORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAABqUlEQVRoBe2awWnDUBBE843B4NxcQSAFOC4lJeTkoxtJDykgvRhcgCFNJCFgIs+ChEHSJX93YT6ZD4ssmR3NztNFH5Wu6+6iVynlEZpbp+4J3s5OjWm7DRxZuMMCdUB9oyzNmrJe01hEejMtM5exIh6bCI3JbFkDT27EckEDs5DI8iHCWcmy6IowC4ksHyKclSyLrgizkMjyIcJZybLoijALiSwfIpyVLItuOGFso/xiuEvAgJdeK0DqJrHEhtsTTh9ul9y/ChR2KE+Y1ruDt2ccI7d6PszcK+oFFblWELt3Cn6i/8epMW5/W+LKGrUZ/0NwboF5QxuPsfY8dmOxJs41cBOYHCZF2BFeE60i3AQmh0kRdoTXRKsIN4HJYVKEHeE10frvCNvr4RH1HojH3rGHr3hqA7VdkxPKvuKJ3AA4hn7BM3xxA5N71Fdv1gz/tax3P+hFHmsJwM/8wraMadqOh5GuXda76rVqNWb7wgeevQvRRQ1MBCPFiginxEokKsJEMFKsiHBKrESiIkwEI8WKCKfESiQqwkQwUqyIcEqsRKIiTAQjxcoVrP83/9czD9EAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_down,.x-button .x-button-icon.x-icon-mask.arrow_down{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6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TEBW7tTTY1zUwKH4vbaive6BBw2kpAa6DkA1CeBicgZhVx8McUg5WWNi+83CWiXFfE9ZeAGQR6ukBqJKyu/Gzw7TcXEiS9UuYbiWWeU8ckXYqMT2lozyFW6SeOU0K1/FhPS75RsHUlKbj3KV0WRPC1Nd5sCuxr6anNPV12zFwk2jLCCdtk81XeAIsahL+BVOgH3xrEPayA5rAixZhyj2oB2ktwpR30A5WtQh7vR4DQ+BHg7CXLdAMXrUIU26411dahClvoBVsaBF2uMsjYFRCrwt5a7kOOnjUVQg7vE43cr9VCDu8I6Nep7QIO7z3HgCTvHYXvbCXJe71hxZhyjmv1w9ahCnP/DDb1yLs9boXzGgR9rIAusCnFmHKCff6UYsw5Ymlj7QIU75AN5gz9YVuLu8eB/S+dA+v1+l83pe2Sfg/BRe2OeGfPELhUDgUtip/AgwAw4tbozZtKFwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_right,.x-button .x-button-icon.x-icon-mask.arrow_right{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS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3S8ZKHZ4cr8A16sMQWPHkeANepF4MYqWmD2A9arcWsIonqOYafGYJK73yRDkB71nGSnd5r4jKBG9Sn47AunOb4CWq7xAr7dsA61G69wCreMK2TIMvPMFKfZ44I+ADz7DSQ9YhVgS87fiQGtdlmeBlvkNWnndYBljfGT8FgJVDbKco+CoQrBp6mrEyKfgoMOyvpxlZ4CT9vcXj0shWNe8nE8vCfzwABhhggAEGGGCATa1vAQYAZekAmr8OukgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.compose,.x-button .x-button-icon.x-icon-mask.compose{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAF/0lEQVRoBe2aW4hVVRjH54xa6nSzm92sHiZNorJowMpxrDEoyECiUUpztIkeeumpoCB6rAwi6FHwIXqKXkqiEE0no0QNLWwyspmGsruWlVqp0+9/2t9hz3Lty+mcfTnpB/9Za397Xf7//a219lr7TGVsbKztZLL2k0mstJ4S/H+P+ESfwEqlMhn/VNAJpoOjoGibAIFfwDbWnT/DZOCrex34D4b9vvw4wVScRKEu0AcWgQtBmYb9DvgsA6OganCWhgFwL/lHEf35v3ci/mqVFrAO8AT4FugJHge6URZsg0s3aDfOAe+H8f0INAo3gavD9928iT2bgqvBYVAWgWEeG+E1G0wwAeQ18hTZ/cDKSvROECnaBD9Iod9DFa2BMqSDEgAqjtiH8H3v4XwM32ZwlZUPp/jbLgHDoAziXA7r4aXIhsVqgZLYA8Atb9eK9BbQGRarvOwxEDdfdU9D/UiOUH9bwTixAWGJ/QmYuKhUojU6xomu4HgL3AV89ipO3ZdYlc3LJOJTsAeR1bAEr56V+J4H00Aa0/D+BNxPM0NW4Wcyvqe0G7+Gu5b9IhAexnrYq8A+4OMa55PoDaA6p0kjG1jHvVqnetBFQBxAP9CrJ27qxYm2OX25IhdlxxGoRgqzYFOxHAIvgHMbIKKF7iIwVe+yMtsA5F4CjYiVPu2+lhG/z3QRNRTeKGIIB4NKgXgEHI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1Gxz3AJ1inrsR3uiquBf3AZ9/g1FFMjZXBZkBCW1Sf7WSx1NEx0bSv1QZBQ7tVoYA8jeDEf7yhXNuZ4B2gSq0qeBjuM1MJViGsB6hSK4rW598BMO6/bKPE14YAFXQ2HQWtMrwVnINAYmufjqKEmr8mOIj0bVTWSUYb/qQPbBoaRUABOQz03znLwUQTkyat/hZDpZrxGjqLi4VgMbgJ6L1XFlNUPwYKymvgACL10FPbCYJT12zRgnFbyxaVFE/7lOD459P6d/8Bhs9x6sTqrJgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.delete,.x-button .x-button-icon.x-icon-mask.delete{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGcElEQVRoBdWbzYscRRjGexY1EPK9u9mVoJH4cVBPCYR8mB0IbkISyB/gOYIeFSUQQaIX8eBBDKuCsBFFxJuieFCMEb9RiZrcxKOgB7+i0RjN+vwm9Q41Nd0z1d3Vk9mGh6rufut93l93dc9katNaWlrKymytVmuD4mek7zX2YpmxqWJVwwrl2iL9qBp+LpN3okywjNYo/qh0Sjqi/ZVlxqeIdZ5HXA1HXU3xqbnDMVJGYJ+UzktMi1+le6VrY8aniMHLeeJNDdRCTWti88fCTirpSemChJHpT/Uflq6LNawah4fzwtP8aanppDQZk3sosBJNS4tSCGumf+jcMWlFjGGVGHI7D7zM12+pjRqnh+UfCKwE66SXpL8k3yDsc/4+KfmdJqfLHVMDta4bBF0IrIFrpaeloqsaQvM83S8lgyaXy2nvjdAz3KdWal5bBJ0LrAGz0rPS31KYdNA+8Y9Jtac3OVyuKjVQ+2wedB+wAqekE9Iv0iC4onNMvUelytCMdTmGTeOiGqgdhqkQugdYAdzZBakqrBXAXXlCWhkaDttnjBtb9s6at7UwwNJzp7vAOsE3KKaCfcbZwKrtP8r1oBR9p4l1Yxhb1dcfBwtMG+xCd4A5IHFHfpL8AXX7fFw8YGbDWmIlxtT19cfDBFsHWm22UVqUfpP8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Bn2SGd/FxK8VcAHyjPzVLP+qwZ57XEujGMrQsNAyyHfK8eYAfNM82bsw40KwJ3Sn1/teOb5/UZ48aSoyo0tcMwH3r0ATvogwrmzwWq/Pz6nsbdLpWGteIY63KQqyw0NVP7Qcvnt7nADpq1YZYzeA5iTV9T7I1S9DT2i/H75HC5yBnrT63UXLhGXAjsoNsafFaKudOvKG6zVBvWwMnlcpJ7GDQ1Umvbxue1A4EZoO2wSzToc/ptxdwgJYO1YsnpcuNRBE1twB62cUXtUGAHzTN9TsqDflPHb5OSw1rR5HYeeIXQ1ERtuc+s5bA2CthB80yHn9P8pDIrNQbbLfQKNF54GjTPLDUVPrM23tpoYAe9S8k/kjB6VdoiNQ7bLfYKNJ54UwO17LLzMW2nWA2K3vQ/we5S8N0SL5LvZHI5enCCQPnzkcU3snukd+X/YZm0/wPdHqnTTpY+CgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.organize,.x-button .x-button-icon.x-icon-mask.organize{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEdUlEQVRoBe2aS2xMURjHjbbqUaLoI7RChQUiGo9YaEqkoolIkCASSki68dixsLIVYmHbkJA03UgkFRI2QgRBKl4RgtJFK0jUI+o5fv/p68ztmUlHzpzO9PZLfjP3fOfcO9//fOeee+69E4lGo6PCZKPDJFZaQyc4N1mGI5FIMfUVkAfZMPaVwE54yqn6i+8BllQwravgAEyEv5DppsQ8gYPw3hqsJi0bNJ4El0GZzSa6iHcbjLbpsp7DDGX5V8ByyDbLJ+CdUGQLPNGQnkzj3TDFspN68BNkwhDPIY5poG/T1lBYR+LOkuW4uSeR4KXssN48grF9h20NdeukYLRL96Y6vAD2wCwwbQyFvXARPpoVA85fKnXiN4HtvP2Gf0tPG3XWUKNYT4E6PxjvD3x1EDHPZZvgxTTSDBc8gMrKbql5gKHeJh7NM6/AFu91/EVmjHGTFmN+HA3qYSoE7SuO8+zcEawY4vJdfr8Z/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-icon.refresh,.x-button .x-button-icon.x-icon-mask.refresh{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAG1ElEQVRoBc2aa6hVRRiGO17yrmloWpqhllH2wyKSEIsIo8QorLSbqVRgJd3DyFAQIyIiKQz61cUgpB+B0EWii4VkGFRUJpWKphZaaVZeutjz6FmwOnuvNbPWXvvs88HD2nvNzDfzrpn55tvrnLYjR44c1wpra2vrRr8jYC9j+KOzxmCnrTL7ng2LEN+rswbRSsH/ItL+Fwqij+8M0a0UrD5Fa0vg2c4Q3WrBik3sVj480WzRXUlwG4Lnw9OI7p08haqvXUmw2tzH8+AhRPf1RtXW1QSrz4i9CJYjepA3qrSuKFh9PeEWcE9XOtMtE0yyYYROojQfa0zRc8GZ7l9TWvJGj5LtCjdj0AYll6uD90HLQMizZKZ70vzOKjKypgpmkONQMxpGwWlwAvg9STLG8jlkip4FO/H3GKJ/DzXIK2/DQV554TIGdQaNpsNkmAAjoYpj5i/8rIIFjPlXruVMwY1Czy7X8+Al+B4OgU+yag7i0wjereyYqxDrDD4Ku6FqgfX87aGfR6BPGdENCabTqfAh/A31Btesez/T32LoXVR0KcF0NByeBPdSs0SF/Nr33VBIdOEoTVDyKFkCN0OlSQH+Ys2HsReMF66ueCuyJPDqzD4HvqEIzUCzyk1WtsAcKBy8opc0zgfBU+A52CwxIb+K3Qw3FJmodN0owXTgseNxsA9Cg2pm+S76vyktoOjn2D3sfjVAhFJBqmSax8km+BZ2gBnUlXAmhMyH+B3cj8DVocq55aEnROOJsB7MdIrOnnt9DVwD48G3lAPAB21evRRCPl3G22FaaKwx5blLmk4c2DNQdN+aaa2DKdAvayCULYQ8wYnYhpZxuv+QYGf3a/gnMLD0oH+h7mIYnO6o42fK/bX0MKTbpj8nYmd1bNvI98w9zHnbh8FcDSPBwcWYe/ReWMOgfEhlTbH6ugs/75Z1Urdd1tOi8qnwGcTO7j7qXgU9snym71Mva4bt70uYmq5f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2eoZ907IEBnQcZ973QoJ1hLnnXoBWiXYZ74D50CtPXL2ywoLbRRtwloKBqDNnWrEGvOugVEZXSnC76O506o8GX8QbKZst3KPnTTi33szF3istOOmAAZgVrYBm/SeeD/MruAf6Jv2WvUadw3QUNM5q30ZcCrNhDMT8lKNapil0LayCtxG4JbNmgYLKBNsnortxccbPh+lgBuUvnlhzW3iumpaaofkzbzvXyqxSwelRIb4f3w1u58AlMA6GwNkwGEwhN4PZl0vWWLABDEr7EVr3BzxlDdl/zhnCj3tOo0oAAAAASUVORK5CYII=')}.x-tab .x-button-icon.reply,.x-button .x-button-icon.x-icon-mask.reply{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAES0lEQVRoBe2ZSWgUQRSGM24YTdSo4AYRTcxBEZJDJCoigrtGg6CIgihqogfRgEERguhB40UP6kHw4kEET4J4E9wPAdeg4ALigjuKcSMuMX7/mAmdSU/SXdM9PTPpBx/T3al67/31urq6K5G2trac3mR9epNYaQ0FZ3vFwwqHFc6yEQhv6SwraBc5YYW7DEmWXUhZhSORSC7UwKIgxzAlghE5CZFHoAEKgxTcz8/gCI3gfzHsh6l+xnLq2zfBaC0miXpYDvmgu+kXBGqeC0aohK2D7TAF+kPamKeCETseZdugGgZDSp4RxHFsnghGqKo4H/aB5uoASEtLWjBiZ6KsFlaAHlJpbUkJRmwl6rTcFKW1SktyRoIROhofdbARhlr8OTkMdBPNlWCE6iG0AA5AqRN1Nm1cxbTpn9Qlx8ERO4pIG0Br6yDDqH3pV4kvPdRewCd4C+/ZPdWx7xZxsk1LgqvIZDeUeZzRT/xJ8Dt4BQ/gGjSSVzO/3psEJ4JoY+A4fATNvVTwhjh34RSshMGJ8jO5biuWIJqrc6AJ/kIqhNrF+EFs3fqHYRoMMxFp7dNFME5Hwi5QMLskgrqmgb8M+hgZYRXh5riTYBxpFM9CUKKcxlWOSyHPjVi1jQqmYy7shQ/gNGjQ7f6Q6yWY7UY07XNK4CK0QtAiTOK/J29tLOQ7EU67nIGgtfU1mARMhz6a3zegtCfRHXOYxhXtndJBgGkOT9FQ1Z3oDsFqhBXAFngJpkGD7veN3NclEt1JcKwRHaaD3niCTt40vh6+q2N6rL+2gtUA03p8FL6AaeAg++ntsNwqNqor/kL8OZ2WgF71vEpeq8FvC36uDveJM8qqyenHwzg67oE1MAxMTeLOQyNod0SDqO2hCaDVIma6u3R9OAxq/9WxW9PT+wRsQ7RiE7Gbj4f4v9F8Fujxb1ptfR2tj/cbf04bfbbqZWgsFEM5LITNcBLc3HF6iM2IxXAlWJ0wJXEQfoFb4RJcEwtu8kv/PCiEGdAAevFQJbvL5Rh/j351uRbcLloVmA83ewgUn0TSgq2DRGzloVt9E9yDFoiPqfOvUBHN3erA7TFOtG6fBqdfVp4KtuZLDqr8DrgDdqIPcb2/UYXjAmmu1cLDBIGswX0THMuJHIrgDGglsMZu4nxI0oItgcbjUHP7MyRaanwXrHywvlAFj8E6v+dqZ8MTI9BzHO2DtaC9KY1wIEYurXCO4JrbjyA6CvzO80wwznS3tMAFDpfBKdArnkY4ECOXqwTWUqZvA1mJp4L/+4wKf8ZxDeyE26AlLBBD9HUC14GWr8mezWEc2/oiiNZM/TumGbRLkdQ6nChOT9eJWw3ffakwjjuMRF5wUg9b4QnE5hOHKTVNsSuO3qW9SosN/Yn4KmAQbnnl040f4pelVLCb5Pxq6/st7Vfipn5DwaYjlyn9wgpnSqVM8wwrbDpymdIvrHCmVMo0z15X4X9rh8wHLEjawQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.search,.x-button .x-button-icon.x-icon-mask.search{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bqKhiUavbVZdo0LCyLl3iHhGEkkZsKBYJX4RISHwQIYIPNJoQlUjTuCakUZ9oVGRF0GywslvqbgkpDarqsn7/6XsmM5n38pzzvtudeZL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H723o9uTxS/3Ks+ytHk5/R3cI5LqIK2hEDw86XVkb+wV0Z+YiHDnWCjnu4Vj3Ug3DzhDn1NPacTX4HljJ6gFPr5e5RpZ74tFz6l0ezhWk5tFTYJFPEOjrLKxhrEazktWR8zVQ9vEVp1ttLYyplyeANQinN0ydIXBUnAOXR7nsrwAbgatrTbX3nu1s5Ul1oKgIRsZYMR/jy72gY0+u6a8OJMJX1P+C9MsaqDcPAseCHtANQkRTwHIoybZd21qR0Q2k1pZP0tNJSIubLhxJOr75egO/sjbekM/VIe0qY1RDb6p//PYl6/QniO0sF2tI2kBYRpBTgVrUOWqm9DPiGgghW+GWVBGj/UCvEM1E1sWinr4sKfa0/NgedhUwqsVITzvOUTOl6gxv0qmERRw5HOi/bHz2zb3VMHp28hremYQj0rq23QhGwFSQ0ZVPu8NvAfa3Use8kJkI1wzxxRhfDcYDAotrKF0GngYnRA17D599f7KVXcVzmoszLfUi7AxhfBG4GKwFPudhBacnmpfBStDwnzrkrQIhpDW8L3ExJqXV/wBA2Vs4WelquT9Qzy8FvdHnDlKR01RQ8OrJMaAp8TnYQUA7SBsEm6pzPXgcyI6PaCG7Hdu6VcVLUkuE5ONBR8ByDGb42sPGteBPEDcV0vK0ZZ2Z5C9oSCcZKzqfwO8OJK2FbCAunqYmrICRQaA3rLRejSvTWtGwTzc94Yj0DQS/O4C05nQd6VYhrIVMpEN6Wqv3crBngY4b582aR9DXgJCFTPt05T+AtKq2jNARzxLs/UBbnY/0onwLO97sXPuwj8cidQn8OuytAe0edjUyuluqh2vIPcNnPS1rIbOKfkRf0pKEGdqSJyFwM/AZ3j+2JGHXpZDWWf4+sMvlpaTal7e3xLYEsdQ4ITIIsras29AppxrKctRM5ZDRLUvv13GnLl1p5yjellylCb5BolvWkRQMgT6g6apXmnVgPWQrc/1/boJCaHVWyukAAAAASUVORK5CYII=')}.x-tab .x-button-icon.settings,.x-button .x-button-icon.x-icon-mask.settings{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoA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TkTXoe6Dy8GyFm6CLwdysSJ0EH5CfwFZEqTNwNVO5+CtcjymRpKfDsY1UlI+6NZaiZ19CyYhhHey6WCv0egdDf4a2RKfiDzPVgI78OczvAD+mjphKYdjtmSRwMqPh1/VTWHz8g/AZK/Wcfto7MfzIO8thy0B+M6VccLHaZzD6aXQEPyjDTfc8CtcQD0eAWRtwdMBWevqB1n0FkdVbWjob2i7+GBdHwpnAZrQj3yPUoLQKMXwXowEhy4wVCPOLjT4AKMtL1qJXieDellEvgzS9GMrKgyz4ZTszZVkU4uaTobBrPB19CKcqqoXZf2fBhdhZNxGz0cphOvm5uhbL8VGVxFmYP9BAyMDW41nrpqDqGT8ZB3bVC0UsQfJfYGr73KJOXwLrS+QQM9NHo3NqLvw2hcA7aUqqYcdu/6ovG0LJM5KNwBX4LLuEz8Geh28OebMrE9T/p7yhQbKk/tCRrw55eXwaddaj/6a8VMGAP+93AyeBendOO85zr1hxNOA5+McXmIuwr8ifaklH2t5PU4tEJjdDYWfCdnHx1zyTsG1lAX6YAzIc/44ITh/epHffhQ8feqWEdnXWGTgl6VYa7Dnc7sQ8fvgiems3ov+M7u9poifSh4d8aGp+JXZ42nzibgP7eXgM5+CuOzelWlCx3udNqZvgGOg+QVQb467mMNTjlqnl87J6cMJ9+zZH+4BfZN6VSVV+pwPR1hpA+VNyFvz+vwJ7B3Pe2tSJ3UKY1dDctX1PBzTsfyxGeq26NXpRKHmZGleOEV4pLOk4Xo+XrrVfFir0r8bh4EG0E8057i3r8eTL0u/wJCZSL2DoplLgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.star,.x-button .x-button-icon.x-icon-mask.star{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz/Ujv+2mZRGZB7W6mtpFikC7+UWUZiqBD0JPFdRL1EMFPfjoU4baS0FUD/UWZBEVShA+BCpmWApRSkgllNpDmZWZt9//eOay72afvWfW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mS41+nLcH7IcMYg9VplOWY4/Md88cEtHbDOVg5Xx9jpsM9Yx52JeAcw1ontTXRdcm9pFz3vBveHdNJN6YPVRhrnivtMlruZ5g7DFxBuXLut8j7sA/d43Yr5CIpJsYAJ7DN2/27Bsw1gwAb3I8wLOp+g4w6+nw/6HddOyszqWDg/Qv2bXFwH4+1SyhyUYtI1YLc85wXn/ORAagWdPVRKUqh3AJwtdTLeWq2rbCoP76cm3bjeLG6ELjZim03XJujyJqXF6rtmeDvGNzMN/ajEAZi2rKOD67t00jVgN7+3dnFgqdsu5XRc6tiS/eUGvBTTNengBIVZPuYG7LcYPjdluYk++bTw++pGyQ34bSy9B35Vs5zEYGfgJfg+x7H/ADoy2VfnrtXoAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.maps,.x-button .x-button-icon.x-icon-mask.maps{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADl0lEQVRoBe2b24tNURzHjfutXEPycDAltwhJbuMSJUqSB/HiES/+AK9ePc6T8uCFkImQW5KGkdwSxYyMGkZu45bbDOPzyZyTrJnjnDkGrVm/+szas2bv397f33ftPS+/Vdba2toj5igj0NcfRkG/3qWIJdcIrs/AO6gDq7cKPkOjUNAmxr8ePJsix8NUWAvLoapowSQawIUzYCZUwAqohF3QAjtgGTyCy5x/nfEu1MNDCmAxuiS4Vy8ST4DZMB9WwiTIRUGC26q1gKtWwyyYBsPB5aLIL5CNTxzotDeWTeA5DUKuO4xXoQbxHpcUbSIzJFkDi0EzdLYnBNGuYJJ4ch+YAhvB5TAORsKvib4x97vwPpk2FjJuhibu85zxAlyCangBLRQib06u68t5vk4uVYVqgO+oqy9v5ASTRLd0LQNLYB24bAfBnw5zikX0HtuhGW5ANY9ylvEBvIY3FOArcz7rWHCpboBFMAxyGjguKIZy1jzYCqfAD5BLslB8J3dCP/AdOgo+fKHXd3Sebh+EctCMieBK6Oj8QuYrXZ7roQr88PiSD4b/IVyyfhB9jQy/uppTUijYhANLytJ1F/sxzL7POpg97vQdFfwVTNYtQsHdKpLg2O1ODieHI6tAWtKRGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbCI5HJmhgZzkcFCSyCaSw5EZGshJDgcliWwiORyZoYGc5HBQksgmksORGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbKLbOVx0r3E7httIbttwNvzddt//JWxIfQynYX8pgu2TbgBbjw9Ds53sNHJv49gOehu5bUe2DfjXojDVpWG/9iu4CEegBp7xfO+LFfyGC5+AiQ7BFXj/c8s+xw+Z24PwvYwKnQxLoQLccGEB7Hsu9t5ckjcU2QjuozgA5+Apz9PCmItCbvqWs2vhJpwBl8ZrEuVtOebPtiWLbf2ymyL0ZVT8XJgDbgHIgFsPOhPmr4d7oAnHue9txg6jI8EfueIaHIOrcAuafieSc/IG19vw7TYD6UEBbE4vhwxMB7cizIYhYPT6MeR+WjBFPoCToEgF1hb6bD8LNpHLwT0L56EOGkhUchc6edoNcruvQWoQ7/6GMTAa3E2zACxGNjRhH9wHV4zP9oGxqCjj7C0wA06Ay/YliRT/T4MCuGnEfQ4feJ5mfvdfaG+OXSWdju+VpAoIK3D9tAAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.locate,.x-button .x-button-icon.x-icon-mask.locate{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIDklEQVRoBe2aaaxeQxiA3eqCltpLkWotLUUtsUuJrbUFtSSaiIjljz8kQhOJiAQRQYREYvmFSPrDFiSExFpL49JSS6u0Re1bLUVRz3N7ph1z53zfud8956sf3uS5s7/zvjNzZuac7/asXr16g25IT0/PKPrZAfaFXWAMvAEL4GNYgS1/EjYqPU07jKNb4sGZcBocB0MhlYVkPAgPYM+itLDWtA43BYY6m7PBZVSFXuqd2ZQ96m3S2ZkY/0lFR+PBcFlf3ZTTjTiMwQfCR4WzfxO+D8/BTxA7V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xvev/OSjkCappVL6hlw9NqN8PoqX4Vt3s/Hp/an6ewz3K/SmhvNDSj86T/otDZp25jU7ly6ksM2RIbADHgFBvJcNTXrOvpCYdOQnHO5vMoOh8Z0sA1cDi9Cq3fSphy1z2fhYsjuxMHWXNhy00JhqbCheWtyJ54Ox8D+0KT0ovwp0NmXcMYjc8DSscOhJxwfRnxHGAfHwQFwBIyEwcgvNNY5HyHxHF6Kox5rHcugHY57xnnPWS8t4lHmIHjEeNyMBXf67WACeJNbDH+Ag+ax5fE1D5YWcd/cVuKkR04t8g94XuILUVeybgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.home,.x-button .x-button-icon.x-icon-mask.home{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEK0lEQVRoBe2Zy28NURzHe/vwqEepYkFIQzxWaCOC2HhELEgQImhXIrqyIEXikVQi+gdIwx9AItg1NiJELMSGhKQbobY2VY9Srfp8m5lmTO/cOXN7Zu656f0ln8zMnTNnft/z+505j5sbGxurmk5WPZ3ESuu0E1xbigjncrka3jsbftClIvsU5RZ65aLK5Lj/C75SzSjHWCuJYLxqhPXwBgYhylq4sRaixChDP8EzGIJ4UwNnCR6tgFswANegKer93LsLim4herm/JKqO8O+ZRdhL42acOwunYAacg2Hu3ePYj3Ph1A1fU2ySmZSZeCiTjxaC1LAboRs6QGJl8+AKXIU1kLqlHmHEqlFboQv2gD40QdPHqx3qKdtJkD8Hb9o+TzXCXmT1cboB+cT6evTVPgIXeWYl6DoVSy3COF2Hx0rjTthp4L0a/4xXrofn33OeqH8avKMqFcE4O4uXb4ULsNfEEa+M0v00LIIuCKc/P03NrAtGrD5Iiuh10Dia1JTOR0EZsjjpw3HlrQpGbD0v3AzFig36e4CLkeAPNs6tCUbsHBxS+mpsLSayYT2KtLBqVgQjdgFe7QP1u9VWPbRc2ZQFe2LV5zSBWG7ZP+vVTUkwYhvx6DicB+fFqvWKFuyJ1QxJ00It48rCNNgnNi+N23hQaVw2YiU0cYQRq9Q9CJdBKV1q02zMeEaWSDBil1L5JTgBDeCCzcUJ8cXImfACOeqayjbBffgDfqu6cPyJP3dgVZTvwd9jdzuoSFmgicRDGAYXRIZ9+I5fPbA6KC7feUHBVKD5rJZ1EutaZMOiv+HjbWjJJ9T/LVIwDyqyh+ApuC7WFy/RCk4r5HyRwWNewRSW2N3wGv6CX2E5HBWcB9AaFOqfTxJMQa1lNewosqNQDiLDPmqv+hFsgzpfrI7/CeamVjwnQZEtV7G+eEX6MeyHGl/0hGB+1MJdYt+B/1C5H9UdX8J2qJ6IMBfz4Ri8hXIXGfZfmdoLWr5W1zJ7ktg2aId18BuiTHNvDVUumQSNxDikLSdtBzdok0yCD8MyiLNmCqhxXBL9An+egNI3yqRT9z+O92FO/O2UuOMuymoqF06bUl53489MQw21Gm8lWmkRa6R/oVaMfT6lAmrsUVMNRa2HU3I8k2orgjNp5hK+ZLwPp/x+fR+0ONfMp9BfJ+qLmulpyze1zMtC8AACbkI/xAneQZkO0JiZimUheAjPn0MfxAnWVo3RiEG5oiwLwXJsmGFDK5iCxrCnGZNSOzVLra+EPDZ9T6EMCFVZ3KWpI8XV7uBTFcEOBsWqS5UIW21OByurRNjBoFh1qRJhq83pYGWVCDsYFKsuVSJstTkdrGz8L0VTv1i+NVF2CyTJDC0LX7E8HIx7D/Vrb3wDaLvY1D5QsI/6jXZUEwk29cDlckki5bIOY9+mneB/GfbU3e4Ey5kAAAAASUVORK5CYII=')}.x-button.x-button-action,.x-toolbar .x-button.x-button-action,.x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round,.x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small{border:1px solid #002f50;border-top-color:#003e6a;color:white}.x-button.x-button-action.x-button-back:before,.x-button.x-button-action.x-button-forward:before,.x-toolbar .x-button.x-button-action.x-button-back:before,.x-toolbar .x-button.x-button-action.x-button-forward:before,.x-button.x-button-action-round.x-button-back:before,.x-button.x-button-action-round.x-button-forward:before,.x-toolbar .x-button.x-button-action-round.x-button-back:before,.x-toolbar .x-button.x-button-action-round.x-button-forward:before,.x-button.x-button-action-small.x-button-back:before,.x-button.x-button-action-small.x-button-forward:before,.x-toolbar .x-button.x-button-action-small.x-button-back:before,.x-toolbar .x-button.x-button-action-small.x-button-forward:before{background:#002f50}.x-button.x-button-action,.x-button.x-button-action.x-button-back:after,.x-button.x-button-action.x-button-forward:after,.x-toolbar .x-button.x-button-action,.x-toolbar .x-button.x-button-action.x-button-back:after,.x-toolbar .x-button.x-button-action.x-button-forward:after,.x-button.x-button-action-round,.x-button.x-button-action-round.x-button-back:after,.x-button.x-button-action-round.x-button-forward:after,.x-toolbar .x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round.x-button-back:after,.x-toolbar .x-button.x-button-action-round.x-button-forward:after,.x-button.x-button-action-small,.x-button.x-button-action-small.x-button-back:after,.x-button.x-button-action-small.x-button-forward:after,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small.x-button-back:after,.x-toolbar .x-button.x-button-action-small.x-button-forward:after{background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692)}.x-button.x-button-action .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action .x-button-icon.x-icon-mask,.x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-button.x-button-action-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dbf0ff));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dbf0ff);background-image:linear-gradient(#ffffff,#ffffff 2%,#dbf0ff)}.x-button.x-button-action.x-button-pressing,.x-button.x-button-action.x-button-pressing:after,.x-button.x-button-action.x-button-pressed,.x-button.x-button-action.x-button-pressed:after,.x-button.x-button-action.x-button-active,.x-button.x-button-action.x-button-active:after,.x-toolbar .x-button.x-button-action.x-button-pressing,.x-toolbar .x-button.x-button-action.x-button-pressing:after,.x-toolbar .x-button.x-button-action.x-button-pressed,.x-toolbar .x-button.x-button-action.x-button-pressed:after,.x-toolbar .x-button.x-button-action.x-button-active,.x-toolbar .x-button.x-button-action.x-button-active:after,.x-button.x-button-action-round.x-button-pressing,.x-button.x-button-action-round.x-button-pressing:after,.x-button.x-button-action-round.x-button-pressed,.x-button.x-button-action-round.x-button-pressed:after,.x-button.x-button-action-round.x-button-active,.x-button.x-button-action-round.x-button-active:after,.x-toolbar .x-button.x-button-action-round.x-button-pressing,.x-toolbar .x-button.x-button-action-round.x-button-pressing:after,.x-toolbar .x-button.x-button-action-round.x-button-pressed,.x-toolbar .x-button.x-button-action-round.x-button-pressed:after,.x-toolbar .x-button.x-button-action-round.x-button-active,.x-toolbar .x-button.x-button-action-round.x-button-active:after,.x-button.x-button-action-small.x-button-pressing,.x-button.x-button-action-small.x-button-pressing:after,.x-button.x-button-action-small.x-button-pressed,.x-button.x-button-action-small.x-button-pressed:after,.x-button.x-button-action-small.x-button-active,.x-button.x-button-action-small.x-button-active:after,.x-toolbar .x-button.x-button-action-small.x-button-pressing,.x-toolbar .x-button.x-button-action-small.x-button-pressing:after,.x-toolbar .x-button.x-button-action-small.x-button-pressed,.x-toolbar .x-button.x-button-action-small.x-button-pressed:after,.x-toolbar .x-button.x-button-action-small.x-button-active,.x-toolbar .x-button.x-button-action-small.x-button-active:after{background-color:#0062a7;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #004474), color-stop(10%, #00538d), color-stop(65%, #0062a7), color-stop(100%, #0064a9));background-image:-webkit-linear-gradient(#004474,#00538d 10%,#0062a7 65%,#0064a9);background-image:linear-gradient(#004474,#00538d 10%,#0062a7 65%,#0064a9)}.x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm,.x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round,.x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small{border:1px solid #263501;border-top-color:#374e02;color:white}.x-button.x-button-confirm.x-button-back:before,.x-button.x-button-confirm.x-button-forward:before,.x-toolbar .x-button.x-button-confirm.x-button-back:before,.x-toolbar .x-button.x-button-confirm.x-button-forward:before,.x-button.x-button-confirm-round.x-button-back:before,.x-button.x-button-confirm-round.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-round.x-button-back:before,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:before,.x-button.x-button-confirm-small.x-button-back:before,.x-button.x-button-confirm-small.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-small.x-button-back:before,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:before{background:#263501}.x-button.x-button-confirm,.x-button.x-button-confirm.x-button-back:after,.x-button.x-button-confirm.x-button-forward:after,.x-toolbar .x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm.x-button-back:after,.x-toolbar .x-button.x-button-confirm.x-button-forward:after,.x-button.x-button-confirm-round,.x-button.x-button-confirm-round.x-button-back:after,.x-button.x-button-confirm-round.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round.x-button-back:after,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:after,.x-button.x-button-confirm-small,.x-button.x-button-confirm-small.x-button-back:after,.x-button.x-button-confirm-small.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small.x-button-back:after,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:after{background-color:#6c9804;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c2fa3b), color-stop(2%, #85bb05), color-stop(100%, #547503));background-image:-webkit-linear-gradient(#c2fa3b,#85bb05 2%,#547503);background-image:linear-gradient(#c2fa3b,#85bb05 2%,#547503)}.x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-button.x-button-confirm-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #f4fedc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#f4fedc);background-image:linear-gradient(#ffffff,#ffffff 2%,#f4fedc)}.x-button.x-button-confirm.x-button-pressing,.x-button.x-button-confirm.x-button-pressing:after,.x-button.x-button-confirm.x-button-pressed,.x-button.x-button-confirm.x-button-pressed:after,.x-button.x-button-confirm.x-button-active,.x-button.x-button-confirm.x-button-active:after,.x-toolbar .x-button.x-button-confirm.x-button-pressing,.x-toolbar .x-button.x-button-confirm.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm.x-button-pressed,.x-toolbar .x-button.x-button-confirm.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm.x-button-active,.x-toolbar .x-button.x-button-confirm.x-button-active:after,.x-button.x-button-confirm-round.x-button-pressing,.x-button.x-button-confirm-round.x-button-pressing:after,.x-button.x-button-confirm-round.x-button-pressed,.x-button.x-button-confirm-round.x-button-pressed:after,.x-button.x-button-confirm-round.x-button-active,.x-button.x-button-confirm-round.x-button-active:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-round.x-button-active,.x-toolbar .x-button.x-button-confirm-round.x-button-active:after,.x-button.x-button-confirm-small.x-button-pressing,.x-button.x-button-confirm-small.x-button-pressing:after,.x-button.x-button-confirm-small.x-button-pressed,.x-button.x-button-confirm-small.x-button-pressed:after,.x-button.x-button-confirm-small.x-button-active,.x-button.x-button-confirm-small.x-button-active:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-small.x-button-active,.x-toolbar .x-button.x-button-confirm-small.x-button-active:after{background-color:#628904;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3e5702), color-stop(10%, #507003), color-stop(65%, #628904), color-stop(100%, #648c04));background-image:-webkit-linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04);background-image:linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04)}.x-button.x-button-decline,.x-toolbar .x-button.x-button-decline,.x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round,.x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small{border:1px solid #630303;border-top-color:#7c0303;color:white}.x-button.x-button-decline.x-button-back:before,.x-button.x-button-decline.x-button-forward:before,.x-toolbar .x-button.x-button-decline.x-button-back:before,.x-toolbar .x-button.x-button-decline.x-button-forward:before,.x-button.x-button-decline-round.x-button-back:before,.x-button.x-button-decline-round.x-button-forward:before,.x-toolbar .x-button.x-button-decline-round.x-button-back:before,.x-toolbar .x-button.x-button-decline-round.x-button-forward:before,.x-button.x-button-decline-small.x-button-back:before,.x-button.x-button-decline-small.x-button-forward:before,.x-toolbar .x-button.x-button-decline-small.x-button-back:before,.x-toolbar .x-button.x-button-decline-small.x-button-forward:before{background:#630303}.x-button.x-button-decline,.x-button.x-button-decline.x-button-back:after,.x-button.x-button-decline.x-button-forward:after,.x-toolbar .x-button.x-button-decline,.x-toolbar .x-button.x-button-decline.x-button-back:after,.x-toolbar .x-button.x-button-decline.x-button-forward:after,.x-button.x-button-decline-round,.x-button.x-button-decline-round.x-button-back:after,.x-button.x-button-decline-round.x-button-forward:after,.x-toolbar .x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round.x-button-back:after,.x-toolbar .x-button.x-button-decline-round.x-button-forward:after,.x-button.x-button-decline-small,.x-button.x-button-decline-small.x-button-back:after,.x-button.x-button-decline-small.x-button-forward:after,.x-toolbar .x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small.x-button-back:after,.x-toolbar .x-button.x-button-decline-small.x-button-forward:after{background-color:#c70505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fb6a6a), color-stop(2%, #ea0606), color-stop(100%, #a40404));background-image:-webkit-linear-gradient(#fb6a6a,#ea0606 2%,#a40404);background-image:linear-gradient(#fb6a6a,#ea0606 2%,#a40404)}.x-button.x-button-decline .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline .x-button-icon.x-icon-mask,.x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-button.x-button-decline-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #fedcdc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#fedcdc);background-image:linear-gradient(#ffffff,#ffffff 2%,#fedcdc)}.x-button.x-button-decline.x-button-pressing,.x-button.x-button-decline.x-button-pressing:after,.x-button.x-button-decline.x-button-pressed,.x-button.x-button-decline.x-button-pressed:after,.x-button.x-button-decline.x-button-active,.x-button.x-button-decline.x-button-active:after,.x-toolbar .x-button.x-button-decline.x-button-pressing,.x-toolbar .x-button.x-button-decline.x-button-pressing:after,.x-toolbar .x-button.x-button-decline.x-button-pressed,.x-toolbar .x-button.x-button-decline.x-button-pressed:after,.x-toolbar .x-button.x-button-decline.x-button-active,.x-toolbar .x-button.x-button-decline.x-button-active:after,.x-button.x-button-decline-round.x-button-pressing,.x-button.x-button-decline-round.x-button-pressing:after,.x-button.x-button-decline-round.x-button-pressed,.x-button.x-button-decline-round.x-button-pressed:after,.x-button.x-button-decline-round.x-button-active,.x-button.x-button-decline-round.x-button-active:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressing,.x-toolbar .x-button.x-button-decline-round.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressed,.x-toolbar .x-button.x-button-decline-round.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-round.x-button-active,.x-toolbar .x-button.x-button-decline-round.x-button-active:after,.x-button.x-button-decline-small.x-button-pressing,.x-button.x-button-decline-small.x-button-pressing:after,.x-button.x-button-decline-small.x-button-pressed,.x-button.x-button-decline-small.x-button-pressed:after,.x-button.x-button-decline-small.x-button-active,.x-button.x-button-decline-small.x-button-active:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressing,.x-toolbar .x-button.x-button-decline-small.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressed,.x-toolbar .x-button.x-button-decline-small.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-small.x-button-active,.x-toolbar .x-button.x-button-decline-small.x-button-active:after{background-color:#b80505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #860303), color-stop(10%, #9f0404), color-stop(65%, #b80505), color-stop(100%, #ba0505));background-image:-webkit-linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505);background-image:linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505)}.x-sheet,.x-sheet-action{padding:0.7em;border-top:1px solid #092e47;height:auto;background-color:rgba(3, 17, 26, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(20,104,162,0.9)), color-stop(2%, rgba(7,37,58,0.9)), color-stop(100%, rgba(0,0,0,0.9)));background-image:-webkit-linear-gradient(rgba(20,104,162,0.9),rgba(7,37,58,0.9) 2%,rgba(0,0,0,0.9));background-image:linear-gradient(rgba(20,104,162,0.9),rgba(7,37,58,0.9) 2%,rgba(0,0,0,0.9));-webkit-border-radius:0;border-radius:0}.x-sheet-inner > .x-button,.x-sheet-action-inner > .x-button{margin-bottom:0.5em}.x-sheet-inner > .x-button:last-child,.x-sheet-action-inner > .x-button:last-child{margin-bottom:0}.x-sheet.x-picker{padding:0}.x-sheet.x-picker .x-sheet-inner{position:relative;background-color:#fff;-webkit-border-radius:0.4em;border-radius:0.4em;-webkit-background-clip:padding;background-clip:padding-box;overflow:hidden;margin:0.7em}.x-sheet.x-picker .x-sheet-inner:before,.x-sheet.x-picker .x-sheet-inner:after{z-index:1;content:"";position:absolute;width:100%;height:30%;top:0;left:0}.x-sheet.x-picker .x-sheet-inner:before{top:auto;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;bottom:0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #bbbbbb));background-image:-webkit-linear-gradient(#ffffff,#bbbbbb);background-image:linear-gradient(#ffffff,#bbbbbb)}.x-sheet.x-picker .x-sheet-inner:after{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bbbbbb), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#bbbbbb,#ffffff);background-image:linear-gradient(#bbbbbb,#ffffff)}.x-sheet.x-picker .x-sheet-inner .x-picker-slot .x-body{border-left:1px solid #999999;border-right:1px solid #ACACAC}.x-sheet.x-picker .x-sheet-inner .x-picker-slot.x-first .x-body{border-left:0}.x-sheet.x-picker .x-sheet-inner .x-picker-slot.x-last .x-body{border-left:0;border-right:0}.x-picker-slot .x-scroll-view{z-index:2;position:relative;-webkit-box-shadow:rgba(0, 0, 0, 0.4) -1px 0 1px}.x-picker-slot .x-scroll-view:first-child{-webkit-box-shadow:none}.x-picker-mask{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3;display:-webkit-box;display:box;-webkit-box-align:stretch;box-align:stretch;-webkit-box-orient:vertical;box-orient:vertical;-webkit-box-pack:center;box-pack:center;pointer-events:none}.x-picker-bar{border-top:0.12em solid #006bb6;border-bottom:0.12em solid #006bb6;height:2.5em;background-color:rgba(13, 148, 242, 0.3);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(158,212,250,0.3)), color-stop(2%, rgba(47,163,244,0.3)), color-stop(100%, rgba(11,127,208,0.3)));background-image:-webkit-linear-gradient(rgba(158,212,250,0.3),rgba(47,163,244,0.3) 2%,rgba(11,127,208,0.3));background-image:linear-gradient(rgba(158,212,250,0.3),rgba(47,163,244,0.3) 2%,rgba(11,127,208,0.3));-webkit-box-shadow:rgba(0, 0, 0, 0.2) 0 0.2em 0.2em}.x-use-titles .x-picker-bar{margin-top:1.5em}.x-picker-slot-title{height:1.5em;position:relative;z-index:2;background-color:#1295f1;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a2d6f9), color-stop(2%, #34a4f3), color-stop(100%, #0d81d2));background-image:-webkit-linear-gradient(#a2d6f9,#34a4f3 2%,#0d81d2);background-image:linear-gradient(#a2d6f9,#34a4f3 2%,#0d81d2);border-top:1px solid #1295f1;border-bottom:1px solid #095b94;-webkit-box-shadow:0px 0.1em 0.3em rgba(0, 0, 0, 0.3);padding:0.2em 1.02em}.x-picker-slot-title > div{font-weight:bold;font-size:0.8em;color:#113b59;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-picker-slot .x-dataview-inner{width:100%}.x-picker-slot .x-dataview-item{vertical-align:middle;height:2.5em;line-height:2.5em;font-weight:bold;padding:0 10px}.x-picker-slot .x-picker-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-picker-right{text-align:right}.x-picker-center{text-align:center}.x-picker-left{text-align:left}.x-tabbar.x-docked-top{border-bottom-width:.1em;border-bottom-style:solid;height:2.6em;padding:0 .8em}.x-tabbar.x-docked-top .x-tab{padding:0.4em 0.8em;height:1.8em;-webkit-border-radius:0.9em;border-radius:0.9em}.x-tabbar.x-docked-top .x-button-label,.x-tabbar.x-docked-top .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-top .x-badge{font-size:.8em;line-height:1.2em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tabbar.x-docked-bottom{border-top-width:.1em;border-top-style:solid;height:3em;padding:0}.x-tabbar.x-docked-bottom .x-tab{-webkit-border-radius:0.25em;border-radius:0.25em;min-width:3.3em;position:relative;padding-top:.2em}.x-tabbar.x-docked-bottom .x-tab .x-button-icon{-webkit-mask-size:1.65em;width:1.65em;height:1.65em;display:block;margin:0 auto;position:relative}.x-tabbar.x-docked-bottom .x-tab .x-button-label,.x-tabbar.x-docked-bottom .x-tab .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-bottom .x-tab .x-badge{margin:0;padding:.1em 0 .2em 0;font-size:9px;line-height:12px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tab .x-button-icon.bookmarks,.x-button .x-button-icon.x-icon-mask.bookmarks{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHC0lEQVRoBe2aW4hVVRiAx8t4qXFMvGZGeLcblUVWdJEoiTIhI9KoHiIyKyh6SOvBh166vPTQQ2IXkKyIktIyLQzLUoMkSbKoVEwtK2+VZWrl9H3bs4Y1e/a5eDxzDsycHz7X2muv9f/r//+11p6zt91aWloaupJ070rO6mvd4c6e8XqGO3uGe5biYDck188y1LOGeuS3Hvs8AVrrWZ0LtUU27VbIbrCRlMVsluQwBptgHEyHS+BcGAxBDlLZCOvhY/gQ/oD/oFxxuw2Fy2AKTIIJ0AuUf2EbrIF18A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x-button-icon.download,.x-button .x-button-icon.x-icon-mask.download{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGb0lEQVRoBd2aX4gVVRzH3V1dU5JMk9Q2wVxCo0QNTYRYS4l6CBFBomA1qjcjSOgPPUgR0VNBFBT0Bx96qAiSXipCH4rKIhGNUqE2SK3MqKwsLbXPZ7rnMo73jnPnzF6v9wefPefMnPP7/b7z58yZudtz6tSpMaNlPT09E/DdDxPhMpgNJyBtfTRG4AAchePk9BflqFhP1YIRqbCZsACWwjWwGIrYZ3TaDZ/ATjhIfh6IyqwywQhdRlaLYBVcB5Mgxn5n8HbYAjsQ/lGMs/pYz3AMOFLgG/AzeH+MBvo2xqqYXB1bSiyBe2EJvAaH4SSMhtC0T2MYy5jG7i0jvmXBBJoMj4D3VjuEpkVbN6axzWFyq6JbEkyAhfAqOJtmE2l32xzMZWErogsLxvE62As+Vtotrlk8czGndUVFFxKMw41wEM7FJdxMbNhuTua2sYjoXME4cVHwEDhZhACdWpqjufblCW8qmIHOxHfCT9CpIrN5mas5N53B8wS7kPgKOumezQrMts3VnJc1O8sNV1qsmq5k0LNwI3hZx9ovONgEPk4amcvRR+HiRjtb3KborbAB0fvOGJs9EnRwwf88HIHsESzbVuisbKzQdh/Yp6z/7DhzV8OEECOU3qd148z20FgDK+DC+o74in59Y2pm7rNPVWbualhT01T3e5pgts6D9eARrzIB3LXVzF0N60FNdasL5kj0sXUtzIf+eo/zt6IGtaytaUuU1AXTugKuhyomjsR5B/xRi5rUllgimCMwltYQzAHr3WJqUdNQTWOyuFDcpbASptnoMlOT2tQ4phfl3uBzwes9byZl93lpalLbXLV6SXtzr4BuPLvISkxtauxX8DjwW5Qv9t1qalPjOAX7vJoB3TRZIec0U5saZyl4ELr57CIvMTUOKngAqlxGJt478I8aBxQ8Hbpxds4eczVOV/BUuCC7twvbapyq4Ha8JPQVOIBF+hRwk9slWVLm9miy8xjbj0PRA/YHfU828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l5ii6AXqjCFeum+A2/D54j0Pbu0RQsOkRHu+6zP7avgJvDsz4VWxStyD7wPrsi+hP0ILfIbFl3zrTLB6TCId3KbCK6X58MSmAOuocW69jUcrmH9U9gF38NRRB6jrNT+AwkLDdxcvfCRAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.favorites,.x-button .x-button-icon.x-icon-mask.favorites{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz/Ujv+2mZRGZB7W6mtpFikC7+UWUZiqBD0JPFdRL1EMFPfjoU4baS0FUD/UWZBEVShA+BCpmWApRSkgllNpDmZWZt9//eOay72afvWfWOTPn3rvgz8yeWbPW+s/XmT379AwODtZSSQ+CryVgA/gVfIx/pelEhFMBVlvBOaBeFo6Cean8y09KsnMg932TqCOs9M2UhMfhMJVsxtHcAmcbmekLCsqjFKUkvAYG1xSwmEHZqoLyKEVJCDOCNxH9HUCbVl6mULAuXxjrOQlhgl8Bbi0h0Uen3FBS37GqVIQHiHh2SdR16jTlo0t0woycpuxiUDSdHcFeMv3uIWYanTDB3wIWVZBQHP10zuQKvbarUxDWT1HRz1E++Ds99fLtgp6jEmbExhPNcs+IbkZPiCpRCRP5TPCQJ4MJ6A3QSUqjSWzC2ozuC4j+fnSnB+gHq8YmvJKIJgVEpRPX9QH6waqxCa8PjEhHT981H2j6qno0wqzF63BhOUxsom3Zb7aJqGsUjTAONFJlpysXQz7VuXpavrBTzzEJaz1adlzNjHs6RTBvJyZhjZTF/kTaWZZCnlvhsyWgQkPZQpagzsX1bFlAXjGtDdAPUu1p3PPQhCCXkdwG/mta0PWLds060AuAnqtEOjpdbQR3VymX1P9F3UfgGJA9X9F92c/ADaQ2P8V0DJ4/kDbeYKaSvgI2AN0+OGJK1VAbSIhTOXEOybYll2kte77yD4rqrHyb85S9Cl4HtReAyI11/A7HpRq5PSD6oR0f3Rad+H7S1DvV7UgS+tc1cU3n3V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AAAABJRU5ErkJggg==')}.x-tab .x-button-icon.info,.x-button .x-button-icon.x-icon-mask.info{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHOElEQVRoBdWbXYgVZRjHXdf8ysjUQl011lbRIFEjM6Uu0iyiEDG86EItKoIuuhDJCgoioouugqKbgi4CKwulILG0mxLTUtMyTWQNPzLTPszU1cx+v+OZw9nZM3POmZl3zQd+zMz7zvs8z//MvF+z2nLhwoU+oaylpWUQvvvDYGiDdjgP1dbKRSccglNwlpxOcwxiLUULRqTCRsNUmAk3wS3QiG3hpp2wCbbDYfLzhyjMChOM0FlkNR3mw61wFeSxv2j8FayBrQjfmMdZpa1POA84UuD7cBzsHyHQtzHm58nVtpnEErgvzIB34Rj8CyGEVvs0hrGMaey+WcQ3LZhAQ+FZsG/1htBq0Z4b09jmMLRZ0U0JJsA0eAccTeOJ9Pa1OZjLtGZENywYx0tgDzit9La4pHjmYk5LGhXdkGAcLoPDcCle4SSxUbk5mduyRkSnCsaJi4IV4GARBSj6eALfR8sxunLEMUdzbU0TniiYho7ED8GvULRI/UV9cDbnrsauheXQCVnjmas5J47gaYJdSPwAIfqsPlfEnwRl/eBBOAlZROvXnGfFfUfXNQXTYCKsg38gS+B6bT6MEogfiTcKNuaIa87mPjHu2+segrnRBf8bYN+ql3jW+ntrJVNK6OJGw+VkVt+2M3c1DIrHsZ9WjPVwCxcLYQ4MqVQUf/Jjikt3VnnX4eauhoVlTZVw3QRTOhmWwjhQfCi7ppZjkjOf62FCrfomysxdDUtBTRWrCCZYK6WLYAo4aoa0JxKcu2x9CsYk1DdTrAa1LCpru9g2ese58lddD+cgT/9ppK2j8ONR7HLf9Um8B0XOCmpR04QoVmnQosDp4BHYD40kXMQ9zsPfgSI/hyNQhN+4j/34VVu/0g9b/nXbKFgJf0O8weV+rSa1tam1b3kUm0SB77sj5KUw18OhTE1qm6RWBy07t0O4S7veto8J6FLwbng+YHC1qbE0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YI3a8ILqmwTB4G9xWZQ1uu7egHQbC/aBQR+88PpPamqs5D4t0xI89+nD1DTT0A9waOANJQeqVu+j4Ddx3u26vd3/WenM01zHVGuLnqYK9GXNeXg15RGcV0Wg7czPHjrjA+HVdwVWifRX/j6LNydzqii1pif8CSdc4HApPg0u1IqeQRp9i/D5zMBdzqjkT1NLS0BOOGuLYv+E6lWyFolZjcSGNXBvbHMxlQJRfI8emBEcOCeKo+xq4A+nNp20sYxq7PcqnmWMmwVEAgs4FR0Y32CGF69sYxpobxc9yzP3feMo7nJtJxDnWV2w6RPtsTnOZQn1118JH8A0ik/bWVNe33IKjEAh3qei87Ue5eeDTnwTNilfkbvgM1oHb1oMIdX2c2woTXJ0J4h3c3NyPgikwA9zjjigT7Xf3ce0XCfF8M+wAv3icQmQXx0LtP/qKurS9uZqyAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.more,.x-button .x-button-icon.x-icon-mask.more{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADJ0lEQVRoBe2YS2sUQRSFp5MgvmLU+CAMiBJFDBHcCeoPEFciuHMjroMK4lZBcONG0JW60U1UEgRx59IXuNMoKEElKL7GRwyIqNHxO0N66FT3UNU9IHRNFXz0VNW5t+vW6RcT1ev1Sie1rk4qVrWGgn13PDgcHPZsB8Il7ZmhqXKCw6kt8WwgOOyZoalygsOpLfFsIDjsmaGpcoLDqS3xbCA47JmhqXKCw6kt8Wyg6XAURV2wEy7BM5iFtzAKu2BB0dqJ7YEtcBYmQblfwzjshUVt5O4mfhjOwwQodw3GYA8snpd77n9pFXMYvoP+qDaZZewcVKXPAzE64Qn4CmZe9f/AFSiSu4e4IzANrXJfZ24gXjO/KxEcg9+QFZQcU/CSONh2RKsraMQhr85xE/psOeN5tCr2APyA5Bqzfl9D06tYtX3wC7KE5pg2ZX98UtsR7XZo5ayZW/1DENnyzi18CO1nyMqTNXYcrTapcitHkBLJiZW2RaGRuxc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w92g0qIZ+iz0XzSVYjIrz4h5XtGkvqgagTmXeoFfJcb0+B/8ey5mETBNVjvClMhjjPViES1s8qy6AiKE5XnXPSCmqIE23rBsIK0PNYiIRcNn/E53jI6/08dsLem4DTcbADdMddQSYh0we6t6BeW9pIkxZOrIUJrS3Cm6EG7gJ9TE+qaFbXLP8BbOZm76mv4XonbAIg8ZacV0B/GAvDQRNdPkVfOvQe+znsJ1HXh/tY9hNL2OuV5PWu2hyqQZsIra/6FCO6gClapn6AU7AbtDfXxuUknCHRSxwTLf8Bgi31NJnvpzwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.user,.x-button .x-button-icon.x-icon-mask.user{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEWElEQVRoBe2aS0gVYRiGO1lmF8nQQlETutGFokAiqEV0ISKwgmrdMtzUpnW7drWKbFGbQAKpJIhuUGIUFUkW0T1Jq4V2U4ui7GLPexpDD+ecuX1jHqcPHseZ+f9vvnf++e8n0d/fPyZONjZOYqU1doLHRV3CiURCz5gMxTANJsJg+8XJJ+iBt9BHNdO1SCwRZR1GbAFRl8F8WAFLoRwGLME/ffAM7kETvIYPxPWDo7lFIhiheURaCVtgBywHXXOzbhJcggZoRvR7twy+76uELSEAtQsqySPwGdQN+KWDPHuh2DI2+TIVm3T455M9G0Bk6ktRvd4NBZaiTQUT3AQnSNW/VAFBzl/iZw0kq56FcOtuaQHB7QIv9ZVkrqZ2YA9Mck3pMYGZYKeh2sBz1SJb2mqcmfk0E0xQ6l9rwNoKcWjm11JwEYFVW6t1/K218mspeB5B5VsFluKnIuU88Kml4PGBo3DPqBGZiVkKNgvKRFkGJ5aCv2Z4xoi6bCm4DWUaXERhZhMJS8FfolDq+DSbRFgKjrIOa8poYpaCTQKK2sl/wSHfcFSNlll1sSzhn7ys3pAvLFP275lu+L1uKVhBPfYbgMf0zz2mc01mKfgbT7vi+kT/CeT3sv9s6XNYCtbg4CJ0pX9U4Kv3yXk3cO6UjGaCWX5Rg/UArqY8I8yp1qdPQ08YJ4Pzmgl2nCqwc2DVyKjunuddqkE0MVPBBKYSuQ7tJtEhFj9apDczU8FOVB0ctZiuHYUw9obMjbxErW2bmblgApTQengVIkq1B83QEsJH2qzmgp2n3ObYCEGndZ3krbcuXcUWiWACldCjoA0yv6a8J6HJb0Yv6SMRrAcj+gmHA+B3aneDPHXk/8jR3LR3a2rOfnAlTmfDVPDb6Khrq8bPDI5PoRPxZpMSk+1SgtOKpTa8l8BC0JaLmAkloA1xr/aOhJqEtINGWeqW7jjHXrQHbRdw4WxSJf8L8Aeh2m1QaWoBfiUsA61PTwGtUYeZ1qlP1zhan3YraBSnz/0mdAUVHqiEESoxKs0a2AxloJIMI5DsWU0vQH2z2oZToAnFI7+fu2/BiF3PgzbCKqgC1bXhNH3S6rba4BocR7TquifzLBih5XjcCSrROaAGKbJWHt9uJuGq67fgAki4zrNaVsGIzCP3dNgE20B1VJ+uro8UUz3Xr39UvxugCeEZl3UzCkZsBZn1+W6HRaB6qtZ4pJp2PtTna+58DFoR3sVxqHFxyM8euFsIW6EeXoDeoPrBXEEbAlpqqoN1kD9YY6rYxSQ4DGoE9KOSXBGZLk4NYB7CfigZEP1XMBfVEJ0BJUznIFevaSBzEEolOimYkyo4AfocclVYtrjViB0C9SzJEdE+jrn+CWcTrHvdUKuRUSm0gPrZ0W7tGjjMhTiIVWFWSbAGEnGxhAT/y+HhsL9oiVWFjo3FqnRVqrETrG5pFmiSEAuTYC3TFMVCLSIzTg9H6wuIXR2OneDfMJq1NmzzbS8AAAAASUVORK5CYII=')}.x-tab .x-button-icon.team,.x-button .x-button-icon.x-icon-mask.team{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFI0lEQVRoBe2ZSYgdVRSG+yUmnagRQYU4NbZKNLYKWTgg4gQOaDYqJIIGl4LixhBwoy50LSIiulEjCkpAUBBRURpdGceFMQ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WgEXJOI7xNMiS9ns9MN5ZCQhEQ1lIGCOXmZf4ZeAW8C4IAblv3wBXAIn6sjkZ3Arc80FvGKW/nu4H/nhZDiR0IngI+LYPY3i43gWuAeNgFBQSn0UYJZejRH3CPQ8cMDi19Jp6AviuVfd48ADwRZXWG3Z9J/6fApeAJUm2TYRE02OZjPfA3WAM9HVDdvt2iXHI1HkoPQd2g7SjUHef+NyU7AXgFRD65qOcZrybQXgFmtUDIDu2xE3CBuCWWBxIU+8vk9MozdQukDUO3x4qm5IJOp36ZyW6waaJci/jrkviWEV9qiQOdd8Ebr/+T0fKkYvBp6AqOB2fnQz0SA39Kn9z6Z9mfPeze/UlUOXrB3Q2AW36a77KwP7tYCwh7Mupjk1TOmZuNInlyZqxuN8n3ItrQF1xryvRl9W/3Y3/60QGCTGF71h5JB0Tbn7vsDqyP6Vkva5dymxoVQ+lIE6+3+lJCH3Zcp+E78y2Fny7Evw7kstC8YA7BtQZRP1hiwTDKnuGun8aSiekaDxXwrbG/zOtaOT/ss3MLSjpCLc93V2Guwy3bAa6Jd2yhObodBnOTUnLGroMtyyhOTpdhnNT0rKGfwD3f6JVZi/xSQAAAABJRU5ErkJggg==')}.x-tabbar-light{background-color:#2583c4;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #97c9eb), color-stop(2%, #3495d9), color-stop(100%, #1f6fa6));background-image:-webkit-linear-gradient(#97c9eb,#3495d9 2%,#1f6fa6);background-image:linear-gradient(#97c9eb,#3495d9 2%,#1f6fa6);border-top-color:#2175af;border-bottom-color:#195884}.x-tabbar-light .x-tab{color:#c1dff4}.x-tabbar-light .x-tab-active{color:white;border-bottom:1px solid #278bd1}.x-tabbar-light .x-tab-pressed{color:white}.x-tabbar-light.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-light.x-docked-bottom .x-tab .x-button-icon{background-color:#6cb2e3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ecf5fc), color-stop(2%, #8ac2e9), color-stop(100%, #4da3de));background-image:-webkit-linear-gradient(#ecf5fc,#8ac2e9 2%,#4da3de);background-image:linear-gradient(#ecf5fc,#8ac2e9 2%,#4da3de)}.x-tabbar-light.x-docked-bottom .x-tab-active{background-color:#2175af;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #195884), color-stop(10%, #1d6699), color-stop(65%, #2175af), color-stop(100%, #2176b1));background-image:-webkit-linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);background-image:linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;-webkit-box-shadow:#1d6699 0 0 0.25em inset;box-shadow:#1d6699 0 0 0.25em inset}.x-tabbar-light.x-docked-bottom .x-tab-active .x-button-icon{background-color:#1da2ff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b6e1ff), color-stop(2%, #41b1ff), color-stop(100%, #0093f8));background-image:-webkit-linear-gradient(#b6e1ff,#41b1ff 2%,#0093f8);background-image:linear-gradient(#b6e1ff,#41b1ff 2%,#0093f8)}.x-tabbar-light.x-docked-top .x-tab-active{background-color:#2175af;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #195884), color-stop(10%, #1d6699), color-stop(65%, #2175af), color-stop(100%, #2176b1));background-image:-webkit-linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);background-image:linear-gradient(#195884,#1d6699 10%,#2175af 65%,#2176b1);color:white}.x-tabbar-dark{background-color:#0e4b75;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #359ee7), color-stop(2%, #125f95), color-stop(100%, #0a3655));background-image:-webkit-linear-gradient(#359ee7,#125f95 2%,#0a3655);background-image:linear-gradient(#359ee7,#125f95 2%,#0a3655);border-top-color:#0b3c5e;border-bottom-color:#061f31}.x-tabbar-dark .x-tab{color:#63b4ec}.x-tabbar-dark .x-tab-active{color:white;border-bottom:1px solid #105483}.x-tabbar-dark .x-tab-pressed{color:white}.x-tabbar-dark.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-dark.x-docked-bottom .x-tab .x-button-icon{background-color:#1985d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #90caf2), color-stop(2%, #2897e5), color-stop(100%, #1571b0));background-image:-webkit-linear-gradient(#90caf2,#2897e5 2%,#1571b0);background-image:linear-gradient(#90caf2,#2897e5 2%,#1571b0)}.x-tabbar-dark.x-docked-bottom .x-tab-active{background-color:#0b3c5e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #061f31), color-stop(10%, #092e47), color-stop(65%, #0b3c5e), color-stop(100%, #0c3e60));background-image:-webkit-linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);background-image:linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-shadow:#092e47 0 0 0.25em inset;box-shadow:#092e47 0 0 0.25em inset}.x-tabbar-dark.x-docked-bottom .x-tab-active .x-button-icon{background-color:#50b7ff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e9f6ff), color-stop(2%, #74c6ff), color-stop(100%, #2ca9ff));background-image:-webkit-linear-gradient(#e9f6ff,#74c6ff 2%,#2ca9ff);background-image:linear-gradient(#e9f6ff,#74c6ff 2%,#2ca9ff)}.x-tabbar-dark.x-docked-top .x-tab-active{background-color:#0b3c5e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #061f31), color-stop(10%, #092e47), color-stop(65%, #0b3c5e), color-stop(100%, #0c3e60));background-image:-webkit-linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);background-image:linear-gradient(#061f31,#092e47 10%,#0b3c5e 65%,#0c3e60);color:white}.x-tabbar-neutral{background-color:#e0e0e0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #f2f2f2), color-stop(100%, #cecece));background-image:-webkit-linear-gradient(#ffffff,#f2f2f2 2%,#cecece);background-image:linear-gradient(#ffffff,#f2f2f2 2%,#cecece);border-top-color:#d3d3d3;border-bottom-color:#bababa}.x-tabbar-neutral .x-tab{color:#7a7a7a}.x-tabbar-neutral .x-tab-active{color:black;border-bottom:1px solid #e8e8e8}.x-tabbar-neutral .x-tab-pressed{color:black}.x-tabbar-neutral.x-docked-bottom .x-tab{text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-tabbar-neutral.x-docked-bottom .x-tab .x-button-icon{background-color:#adadad;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa), color-stop(2%, #bfbfbf), color-stop(100%, #9b9b9b));background-image:-webkit-linear-gradient(#fafafa,#bfbfbf 2%,#9b9b9b);background-image:linear-gradient(#fafafa,#bfbfbf 2%,#9b9b9b)}.x-tabbar-neutral.x-docked-bottom .x-tab-active{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bababa), color-stop(10%, #c7c7c7), color-stop(65%, #d3d3d3), color-stop(100%, #d5d5d5));background-image:-webkit-linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);background-image:linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;-webkit-box-shadow:#c7c7c7 0 0 0.25em inset;box-shadow:#c7c7c7 0 0 0.25em inset}.x-tabbar-neutral.x-docked-bottom .x-tab-active .x-button-icon{background-color:#7a7a7a;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c7c7c7), color-stop(2%, #8c8c8c), color-stop(100%, #686868));background-image:-webkit-linear-gradient(#c7c7c7,#8c8c8c 2%,#686868);background-image:linear-gradient(#c7c7c7,#8c8c8c 2%,#686868)}.x-tabbar-neutral.x-docked-top .x-tab-active{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bababa), color-stop(10%, #c7c7c7), color-stop(65%, #d3d3d3), color-stop(100%, #d5d5d5));background-image:-webkit-linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);background-image:linear-gradient(#bababa,#c7c7c7 10%,#d3d3d3 65%,#d5d5d5);color:black}.x-tab.x-item-disabled span.x-button-label,.x-tab.x-item-disabled .x-hasbadge span.x-badge,.x-hasbadge .x-tab.x-item-disabled span.x-badge,.x-tab.x-item-disabled .x-button-icon{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.x-tab.x-draggable{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.x-tab{-webkit-user-select:none;overflow:visible !important}.x-toolbar{padding:0 0.2em;overflow:hidden;position:relative;height:2.6em}.x-toolbar > *{z-index:1}.x-toolbar.x-docked-top{border-bottom:.1em solid}.x-toolbar.x-docked-bottom{border-top:.1em solid}.x-toolbar.x-docked-left{width:7em;height:auto;padding:0.2em;border-right:.1em solid}.x-toolbar.x-docked-right{width:7em;height:auto;padding:0.2em;border-left:.1em solid}.x-title{line-height:2.1em;font-size:1.2em;text-align:center;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0.3em;max-width:100%}.x-title .x-innerhtml{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 .3em}.x-toolbar-dark{background-color:#1468a2;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #63b4ec), color-stop(2%, #177cc2), color-stop(100%, #105483));background-image:-webkit-linear-gradient(#63b4ec,#177cc2 2%,#105483);background-image:linear-gradient(#63b4ec,#177cc2 2%,#105483);border-color:black}.x-toolbar-dark .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-dark.x-docked-top{border-bottom-color:black}.x-toolbar-dark.x-docked-bottom{border-top-color:black}.x-toolbar-dark.x-docked-left{border-right-color:black}.x-toolbar-dark.x-docked-right{border-left-color:black}.x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before{border:1px solid #061f31;border-top-color:#092e47;color:white}.x-toolbar-dark .x-button.x-button-back:before,.x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-button.x-button-back:before,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before{background:#061f31}.x-toolbar-dark .x-button,.x-toolbar-dark .x-button.x-button-back:after,.x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button.x-button-back:after,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#11598c;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4ca9e9), color-stop(2%, #156eac), color-stop(100%, #0d456c));background-image:-webkit-linear-gradient(#4ca9e9,#156eac 2%,#0d456c);background-image:linear-gradient(#4ca9e9,#156eac 2%,#0d456c)}.x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dff0fb));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dff0fb);background-image:linear-gradient(#ffffff,#ffffff 2%,#dff0fb)}.x-toolbar-dark .x-button.x-button-pressing,.x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar-dark .x-button.x-button-pressed,.x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar-dark .x-button.x-button-active,.x-toolbar-dark .x-button.x-button-active:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-button.x-button-active,.x-toolbar .x-toolbar-dark .x-button.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after{background-color:#0f517e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0a3351), color-stop(10%, #0c4267), color-stop(65%, #0f517e), color-stop(100%, #0f5280));background-image:-webkit-linear-gradient(#0a3351,#0c4267 10%,#0f517e 65%,#0f5280);background-image:linear-gradient(#0a3351,#0c4267 10%,#0f517e 65%,#0f5280)}.x-toolbar-dark .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light{background-color:#1985d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #90caf2), color-stop(2%, #2897e5), color-stop(100%, #1571b0));background-image:-webkit-linear-gradient(#90caf2,#2897e5 2%,#1571b0);background-image:linear-gradient(#90caf2,#2897e5 2%,#1571b0);border-color:black}.x-toolbar-light .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light.x-docked-top{border-bottom-color:black}.x-toolbar-light.x-docked-bottom{border-top-color:black}.x-toolbar-light.x-docked-left{border-right-color:black}.x-toolbar-light.x-docked-right{border-left-color:black}.x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before{border:1px solid #0b3c5e;border-top-color:#0e4b75;color:white}.x-toolbar-light .x-button.x-button-back:before,.x-toolbar-light .x-button.x-button-forward:before,.x-toolbar .x-toolbar-light .x-button.x-button-back:before,.x-toolbar .x-toolbar-light .x-button.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before{background:#0b3c5e}.x-toolbar-light .x-button,.x-toolbar-light .x-button.x-button-back:after,.x-toolbar-light .x-button.x-button-forward:after,.x-toolbar .x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button.x-button-back:after,.x-toolbar .x-toolbar-light .x-button.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#1676b9;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7abfef), color-stop(2%, #1a8bd9), color-stop(100%, #126299));background-image:-webkit-linear-gradient(#7abfef,#1a8bd9 2%,#126299);background-image:linear-gradient(#7abfef,#1a8bd9 2%,#126299)}.x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #dff0fb));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#dff0fb);background-image:linear-gradient(#ffffff,#ffffff 2%,#dff0fb)}.x-toolbar-light .x-button.x-button-pressing,.x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar-light .x-button.x-button-pressed,.x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar-light .x-button.x-button-active,.x-toolbar-light .x-button.x-button-active:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressing,.x-toolbar .x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressed,.x-toolbar .x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-button.x-button-active,.x-toolbar .x-toolbar-light .x-button.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after{background-color:#156eac;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0f517e), color-stop(10%, #125f95), color-stop(65%, #156eac), color-stop(100%, #156fae));background-image:-webkit-linear-gradient(#0f517e,#125f95 10%,#156eac 65%,#156fae);background-image:linear-gradient(#0f517e,#125f95 10%,#156eac 65%,#156fae)}.x-toolbar-light .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-neutral{background-color:#e0e0e0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #f2f2f2), color-stop(100%, #cecece));background-image:-webkit-linear-gradient(#ffffff,#f2f2f2 2%,#cecece);background-image:linear-gradient(#ffffff,#f2f2f2 2%,#cecece);border-color:#616161}.x-toolbar-neutral .x-title{color:black;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-toolbar-neutral.x-docked-top{border-bottom-color:#616161}.x-toolbar-neutral.x-docked-bottom{border-top-color:#616161}.x-toolbar-neutral.x-docked-left{border-right-color:#616161}.x-toolbar-neutral.x-docked-right{border-left-color:#616161}.x-toolbar-neutral .x-button,.x-toolbar .x-toolbar-neutral .x-button,.x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before{border:1px solid #a0a0a0;border-top-color:#adadad;color:black}.x-toolbar-neutral .x-button.x-button-back:before,.x-toolbar-neutral .x-button.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-button.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-button.x-button-forward:before,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:before{background:#a0a0a0}.x-toolbar-neutral .x-button,.x-toolbar-neutral .x-button.x-button-back:after,.x-toolbar-neutral .x-button.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-button,.x-toolbar .x-toolbar-neutral .x-button.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-forward:after,.x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#d3d3d3;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #e5e5e5), color-stop(100%, #c1c1c1));background-image:-webkit-linear-gradient(#ffffff,#e5e5e5 2%,#c1c1c1);background-image:linear-gradient(#ffffff,#e5e5e5 2%,#c1c1c1)}.x-toolbar-neutral .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-button .x-button-icon.x-icon-mask,.x-toolbar-neutral .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-neutral .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-toolbar-neutral .x-button.x-button-pressing,.x-toolbar-neutral .x-button.x-button-pressing:after,.x-toolbar-neutral .x-button.x-button-pressed,.x-toolbar-neutral .x-button.x-button-pressed:after,.x-toolbar-neutral .x-button.x-button-active,.x-toolbar-neutral .x-button.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-button.x-button-active,.x-toolbar .x-toolbar-neutral .x-button.x-button-active:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-active,.x-toolbar-neutral .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-neutral .x-field-select .x-component-outer:before.x-button-active:after{background-color:#cccccc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b2b2b2), color-stop(10%, #bfbfbf), color-stop(65%, #cccccc), color-stop(100%, #cdcdcd));background-image:-webkit-linear-gradient(#b2b2b2,#bfbfbf 10%,#cccccc 65%,#cdcdcd);background-image:linear-gradient(#b2b2b2,#bfbfbf 10%,#cccccc 65%,#cdcdcd)}.x-toolbar-neutral .x-form-label{color:black;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-navigation-bar .x-container{overflow:visible}.x-spinner .x-input-el,.x-field-select .x-input-el{-webkit-text-fill-color:#000;-webkit-opacity:1}.x-spinner.x-item-disabled .x-input-el,.x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:currentcolor}.x-toolbar .x-field-select .x-input-el{-webkit-text-fill-color:#fff}.x-toolbar .x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:rgba(255, 255, 255, 0.6)}.x-toolbar .x-form-field-container{padding:0 .3em}.x-toolbar .x-field{width:13em;margin:.5em;min-height:0;border-bottom:0;background:transparent}.x-toolbar .x-field .x-clear-icon{background-size:50% 50%;right:-0.8em;margin-top:-1.06em}.x-toolbar .x-field-input{padding-right:1.6em !important}.x-toolbar .x-field-textarea .x-component-outer,.x-toolbar .x-field-text .x-component-outer,.x-toolbar .x-field-number .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.3em;border-radius:0.3em;background-color:white;-webkit-box-shadow:inset rgba(0, 0, 0, 0.5) 0 0.1em 0, inset rgba(0, 0, 0, 0.5) 0 -0.1em 0, inset rgba(0, 0, 0, 0.5) 0.1em 0 0, inset rgba(0, 0, 0, 0.5) -0.1em 0 0, inset rgba(0, 0, 0, 0.5) 0 0.15em 0.4em}.x-toolbar .x-form-label{background:transparent;border:0;padding:0;line-height:1.4em}.x-toolbar .x-form-field{height:1.6em;color:#6e6e6e;background:transparent;min-height:0;-webkit-appearance:none;padding:0em .3em;margin:0}.x-toolbar .x-form-field:focus{color:black}.x-toolbar .x-field-select .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.8em;border-radius:0.8em}.x-toolbar .x-field-search .x-field-input{background-position:.5em 50%}.x-toolbar .x-field-select{-webkit-box-shadow:none}.x-toolbar .x-field-select .x-form-field{height:1.4em}.x-toolbar .x-field-select{background:transparent}.x-toolbar .x-field-select .x-component-outer:after{right:.4em}.x-toolbar .x-field-select.x-item-disabled .x-component-outer:after{opacity:.6}.x-toolbar .x-field-select .x-component-outer:before{width:3em;border-left:none;-webkit-border-top-right-radius:0.8em;border-top-right-radius:0.8em;-webkit-border-bottom-right-radius:0.8em;border-bottom-right-radius:0.8em;-webkit-mask:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAABCAYAAACc0f2yAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADJJREFUeNpi/P//PwMjIyMbAwMDOxRzAjEXFHMDMQ8a5kXC6HLcSHo5kcwEmU9TABBgAOcTBAFcRiSpAAAAAElFTkSuQmCC');-webkit-mask-position:right top;-webkit-mask-repeat:repeat-y;-webkit-mask-size:3em 0.05em}.x-toolbar .x-field-select .x-input-text{color:#fff}.x-android .x-field-search .x-field-input{padding-left:.2em !important;padding-right:2.2em !important}.x-indexbar-wrapper{-webkit-box-pack:end !important;box-pack:end !important;pointer-events:none}.x-indexbar-vertical{width:1.1em;-webkit-box-orient:vertical;box-orient:vertical;margin-right:8px}.x-indexbar-horizontal{height:1.1em;-webkit-box-orient:horizontal;box-orient:horizontal;margin-bottom:8px}.x-indexbar{pointer-events:auto;z-index:2;padding:.3em 0;min-height:0 !important;height:auto !important;-webkit-box-flex:0 !important}.x-indexbar > div{color:#155988;font-size:0.6em;text-align:center;line-height:1.1em;font-weight:bold;display:block}.x-phone.x-landscape .x-indexbar > div{font-size:0.38em;line-height:1em}.x-indexbar-pressed{-webkit-border-radius:0.55em;border-radius:0.55em;background-color:rgba(143, 155, 163, 0.8)}.x-list{position:relative;background-color:#f7f7f7}.x-list .x-list-inner{width:100%}.x-list .x-list-disclosure{position:absolute;bottom:0.44em;right:0.44em}.x-list .x-list-disclosure{overflow:visible;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzl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RX2mBa/oFTRPLQs+ggfBlGA/gYV09hYvQR5eScRvF+Zt7iOm92JjMxU9snam3kLXPALvWYHlsoztBmgjtIGiazkMhw6ABC4+GpADa/QuA5bJ+Temn5sv/f4gSo/c5YNfYKd9kGVBdOCmO5hI1pkAC3t1uExKfmwTbFfoL4HACDlN/y5p+RZLfU/Fvs+BgbK1psLBXAjhR+qauh2unTfRdAa8N4D5pqQL+nwADAKGFDQ//Deb9AAAAAElFTkSuQmCC') no-repeat;-webkit-mask-size:1.7em;background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692);width:1.7em;height:1.7em}.x-list.x-list-indexed .x-list-disclosure{margin-right:1em}.x-list .x-item-selected .x-list-disclosure{background:#fff none}.x-list .x-list-item{position:relative;color:black}.x-list .x-list-item .x-list-item-label{min-height:2.6em;padding:0.65em 0.8em}.x-list .x-list-item.x-item-pressed .x-list-item-label{background:#b6e1ff none}.x-list .x-list-item.x-item-selected .x-list-item-label{background-color:#006bb6;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #50b7ff), color-stop(2%, #0080da), color-stop(100%, #005692));background-image:-webkit-linear-gradient(#50b7ff,#0080da 2%,#005692);background-image:linear-gradient(#50b7ff,#0080da 2%,#005692);color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-list-header{position:relative}.x-list-header-swap{position:absolute;left:0;width:100%;z-index:1}.x-ios .x-list-header-swap{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.x-list-normal .x-list-header{background-color:#5ab5f5;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eaf6fe), color-stop(2%, #7cc4f7), color-stop(100%, #38a6f3));background-image:-webkit-linear-gradient(#eaf6fe,#7cc4f7 2%,#38a6f3);background-image:linear-gradient(#eaf6fe,#7cc4f7 2%,#38a6f3);color:#0a6aac;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;border-top:1px solid #5ab5f5;border-bottom:1px solid #0d87dc;font-weight:bold;font-size:0.8em;padding:0.2em 1.02em;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-list-normal .x-list-item .x-list-item-label{border-top:1px solid #dedede}.x-list-normal .x-list-item:last-child .x-list-item-label{border-bottom:1px solid #dedede}.x-list-normal .x-list-item:first-child .x-list-item-label{border-top:0}.x-list-normal .x-list-item.x-item-pressed .x-list-item-label{border-top-color:#b6e1ff;background-color:#b6e1ff}.x-list-normal .x-list-item.x-item-selected .x-list-item-label{border-top-color:#006bb6;border-bottom-color:#003e6a}.x-list-round .x-scroll-view{background-color:#EEEEEE !important}.x-list-round .x-list-disclosure{overflow:hidden;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA9CAYAAAAeYmHpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9e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sdl/V91kIO3hicoIizGwU0ALYDvzrIrLDAtcyzLYevSIQCNfu/lvSA4xtutF3NEEjNtZc14EnJE5KucyC8SNKzkv4OQHhgvr2s1zwtp/XAw8DNzHMqwHCvtZGqAgTT/3KaYdb3epzlHyQ9LWmVpKtmecsrPX+Pc9FTrk15STppm3O3SLo2z497AhF22pRHUjqQIZOSthv5JZKeCeTHMg7OZ0N3B0xLRyS9KOlYoOfvLvZsaC1w0ILMQkI/sBG4ONsf/j88NwMyZI8ejiwQwhso4HxoId3QCZu9/gpf0usK7bkV2gLOmJ/sqUDCe8y2TKECxRxyT5PdW0qWmewE2X2xvmL63q7oI7vtustldj0iY293eTGEZ0tDXUazncqLC92ms6y3daLRJqlX0lQAolP27DZfV5R8X0arJXsZLY2fy2h9ZC+jXfRppG/S+Wi3xKbVRoLshZPmnOb7uPnpCRvHAzcqg5OuSPwzAGYd6fed/rrcAAAAAElFTkSuQmCC') no-repeat;-webkit-mask-size:1.5em;background-color:#419cdb;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c1dff4), color-stop(2%, #5face1), color-stop(100%, #278bd1));background-image:-webkit-linear-gradient(#c1dff4,#5face1 2%,#278bd1);background-image:linear-gradient(#c1dff4,#5face1 2%,#278bd1);width:1.5em;height:1.5em;bottom:0.5em}.x-list-round .x-list-header{color:#777;font-size:1em;font-weight:bold;padding-left:26px;line-height:1.7em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee), color-stop(30%, rgba(238,238,238,0.9)), color-stop(100%, rgba(238,238,238,0.4)));background-image:-webkit-linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4));background-image:linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4))}.x-list-round .x-list-container{padding:13px 13px 0 13px}.x-list-round .x-list-container .x-list-header{padding-left:13px;background-image:none}.x-list-round.x-list-ungrouped .x-list-item-label,.x-list-round.x-list-grouped .x-list-item-label{border:solid #DDDDDD;border-width:1px 1px 0 1px;background:#fff}.x-list-round.x-list-ungrouped .x-list-item:first-child .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-ungrouped .x-list-item:last-child{margin-bottom:13px}.x-list-round.x-list-ungrouped .x-list-item:last-child .x-list-item-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;border-width:1px}.x-list-round.x-list-grouped .x-list-header-item .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-grouped .x-list-footer-item{margin-bottom:13px}.x-list-round.x-list-grouped .x-list-footer-item .x-list-item-label{border-width:1px;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-dataview-inlineblock .x-dataview-item{display:inline-block !important}.x-dataview-nowrap .x-dataview-container{white-space:nowrap !important}.x-list-inlineblock .x-list-item{display:inline-block !important}.x-list-nowrap .x-list-inner{width:auto}.x-list-nowrap .x-list-container{white-space:nowrap !important}.x-list-paging{height:50px}.x-list-paging .x-loading-spinner{display:none;margin:auto}.x-list-paging .x-list-paging-msg{text-align:center;color:#006bb6;padding-top:10px;-webkit-border-radius:6px;border-radius:6px}.x-list-paging.x-loading .x-loading-spinner{display:block}.x-list-paging.x-loading .x-list-paging-msg{display:none}.x-list-pullrefresh{display:-webkit-box;display:box;-webkit-box-orient:horizontal;box-orient:horizontal;-webkit-box-align:center;box-align:center;-webkit-box-pack:center;box-pack:center;position:absolute;top:-5em;left:0;width:100%;height:4.5em}.x-list-pullrefresh .x-loading-spinner{display:none}.x-list-pullrefresh-arrow{width:2.5em;height:4.5em;background:center center url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAA8CAYAAAAUufjgAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrsmU8oREEYwOexdtNuKBfFwdVhCyfuysnFiXISS+1BLopyUpKLXETkRLaUi1LK3Q2lpPbiQLnIn03a/Hm+z86Ttv0zM++bfbOar36Hbad5v535Zp7v47iuy0wOpyoEHccRHV9L9NxPkUE/bhKCOKiOSPAdn69DsJ5I8E2HYA0QJRJ8Bb50CDYRCT7pEMQD0kwk+CByUFQEW4gE73UIhoA2IsFb4ENEMCQ5MdU1IxwygpT3oKNLMGyyYFVscdhusc8tDpu+xRG7xf95BW0O2kNiV1AgIvaQ2BzUJNgJNJYZGyUU7OG1cal4Bi68oqkDPszy2teEwJp5Cdyu/lZ1g8CwIYJ7wEF+2YmrNw90Byx3BizgKhaqizEP1wg7CLLxCEzy/CtauMeBlQDyEfNuGrgU6SyM8F9SyVgHdmRaH6tAb4XkToEp2d4M5mOK0TWMigU2koa8vJMRZPxEb2ss2LEVPMpPLlMRxBgDZjQJLgNbxb6Uab9tAn3EcifAeKkBMoLY+j0GWonk7oB+lmsFkwhidAGHBPmIeTcAnJcbKCuIMQEs+hScAzZEBqoIYuzyFVCJI36lMJ2CDfxibZeUu+EX/4uMIFP8ZyLejxkgK0hG5a8kP4IYSZbr1IuQVHmAX0HGX4VuGfZVJ6cQxPd1uoRcWqDW0SroFVzZAnJZ/h0LWhAjUUAw4XdSSsH8fExRTEgtGAOuOTETBb16Jk412e+bxOSwglYw6PgWYABvLk8P7zGJFwAAAABJRU5ErkJggg==') no-repeat;background-size:2em 3em;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.x-list-pullrefresh-release .x-list-pullrefresh-arrow{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.x-list-pullrefresh-wrap{width:20em;font-size:0.7em}.x-list-pullrefresh-message{font-weight:bold;font-size:1.3em;margin-bottom:0.1em;text-align:center}.x-list-pullrefresh-updated{text-align:center}html,body{width:100%;height:100%}.x-translatable{position:absolute;top:100%;left:100%;z-index:1}.x-translatable-container{position:relative}.x-translatable-wrapper{width:100%;height:100%;position:absolute;overflow:hidden}.x-translatable-stretcher{width:300%;height:300%;position:absolute;visibility:hidden;z-index:-1}.x-translatable-nested-stretcher{width:100%;height:100%;left:100%;top:100%;position:absolute;visibility:hidden;z-index:-1}.x-layout-fit,.x-layout-card{position:relative;overflow:hidden}.x-layout-fit-item,.x-layout-card-item{position:absolute !important;width:100%;height:100%}.x-layout-hbox,.x-layout-vbox{display:-webkit-box}.x-layout-hbox > *,.x-layout-vbox > *{-webkit-box-flex:0}.x-layout-hbox{-webkit-box-orient:horizontal}.x-layout-vbox{-webkit-box-orient:vertical}.x-layout-hbox > .x-layout-box-item{width:0 !important}.x-layout-vbox > .x-layout-box-item{height:0 !important}.x-table-inner{display:table !important;width:100%;height:100%}.x-table-inner.x-table-fixed{table-layout:fixed !important}.x-table-row{display:table-row !important}.x-table-row > *{display:table-cell !important;vertical-align:middle}.x-container,.x-body{display:-webkit-box}.x-body{overflow:hidden;-webkit-box-flex:1;min-width:100%;min-height:100%}.x-body > .x-inner,.x-container > .x-inner{-webkit-box-flex:1;min-width:100%;min-height:100%;position:relative}.x-docking-horizontal{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:horizontal;min-width:100%;min-height:100%}.x-docking-vertical{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:vertical;min-width:100%;min-height:100%}.x-centered{position:absolute !important;width:100%;height:100%;display:-webkit-box;-webkit-box-align:center;-webkit-box-pack:center}.x-floating{position:absolute !important}.x-centered > *{position:relative !important;-webkit-box-flex:0 !important}.x-size-change-detector{visibility:hidden;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;overflow:hidden}.x-size-change-detector > *{visibility:hidden}.x-size-change-detector-shrink > *{width:200%;height:200%}.x-size-change-detector-expand > *{width:100000px;height:100000px}.x-scroll-view{position:relative;display:block}.x-scroll-container{position:absolute;overflow:hidden;width:100%;height:100%}.x-scroll-scroller{position:absolute;min-width:100%;min-height:100%}.x-ios .x-scroll-scroller{-webkit-transform:translate3d(0, 0, 0)}.x-scroll-stretcher{position:absolute;visibility:hidden}.x-scroll-bar-grid-wrapper{position:absolute;width:100%;height:100%}.x-scroll-bar-grid{display:table;width:100%;height:100%}.x-scroll-bar-grid > *{display:table-row}.x-scroll-bar-grid > * > *{display:table-cell}.x-scroll-bar-grid > :first-child > :first-child{width:100%;height:100%}.x-scroll-bar-grid > :first-child > :nth-child(2){padding:3px 3px 0 0}.x-scroll-bar-grid > :nth-child(2) > :first-child{padding:0 0 3px 3px}.x-scroll-bar{position:relative;overflow:hidden}.x-scroll-bar-stretcher{position:absolute;visibility:hidden;width:100%;height:100%}.x-scroll-bar-x{width:100%}.x-scroll-bar-x > .x-scroll-bar-stretcher{width:300%}.x-scroll-bar-x.active{height:6px}.x-scroll-bar-y{height:100%}.x-scroll-bar-y > .x-scroll-bar-stretcher{height:300%}.x-scroll-bar-y.active{width:6px}.x-scroll-indicator{background:#333;position:absolute;z-index:2;opacity:0.5}.x-scroll-indicator.default{-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-list-light .x-scroll-indicator,.x-dataview-light .x-scroll-indicator{background:#fff;opacity:1}.x-scroll-indicator-x{height:100%}.x-scroll-indicator-y{width:100%}.x-scroll-indicator.csstransform{background:none}.x-scroll-indicator.csstransform > *{position:absolute;background-color:#333}.x-scroll-indicator.csstransform > :nth-child(2){-webkit-transform-origin:0% 0%;background:none;content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAxhgAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-light > *{background-color:#eee}.x-scroll-indicator.csstransform.x-scroll-indicator-light > :nth-child(2){content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAvXcAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-y > *{width:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :first-child{height:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :nth-child(2){height:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :last-child{height:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > *{height:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :first-child{width:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :nth-child(2){width:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :last-child{width:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-carousel{position:relative;overflow:hidden}.x-carousel-item{position:absolute;width:100%;height:100%}.x-carousel-item > *{position:absolute;width:100%;height:100%}.x-carousel-indicator{padding:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:none;background-color:transparent;background-image:none}.x-carousel-indicator{-webkit-box-flex:1;display:-webkit-box;display:box;-webkit-box-pack:center;box-pack:center;-webkit-box-align:center;box-align:center}.x-carousel-indicator span{display:block;width:0.5em;height:0.5em;-webkit-border-radius:0.25em;border-radius:0.25em;margin:0.2em}.x-carousel-indicator-horizontal{height:1.5em;width:100%}.x-carousel-indicator-vertical{-webkit-box-orient:vertical;box-orient:vertical;width:1.5em;height:100%}.x-carousel-indicator-light span{background-color:rgba(255, 255, 255, 0.1);background-image:none}.x-carousel-indicator-light span.x-carousel-indicator-active{background-color:rgba(255, 255, 255, 0.3);background-image:none}.x-carousel-indicator-dark span{background-color:rgba(0, 0, 0, 0.1);background-image:none}.x-carousel-indicator-dark span.x-carousel-indicator-active{background-color:rgba(0, 0, 0, 0.3);background-image:none}.x-form .x-scroll-container{background-color:#eeeeee}.x-form .x-scroll-container > .x-inner{padding:1em}.x-form-label{text-shadow:#fff 0 1px 1px;color:#333333;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;padding:0.6em;display:none !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#f7f7f7}.x-form-label span{font-size:.8em;font-weight:bold}.x-field{min-height:2.5em;background:#fff}.x-field .x-field-input{position:relative}.x-field .x-field-input,.x-field .x-input-el{width:100%}.x-field.x-field-labeled .x-form-label{display:block !important}.x-field:last-child{border-bottom:0}.x-label-align-left .x-component-outer,.x-label-align-right .x-component-outer{-webkit-box-flex:1;box-flex:1}.x-label-align-left:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em}.x-label-align-left:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-label-align-right{-webkit-box-direction:reverse;box-direction:reverse}.x-label-align-right:first-child .x-form-label{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-right:last-child{border-bottom:0}.x-label-align-right:last-child .x-form-label{-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-label-align-top,.x-label-align-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-label-align-top:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-bottom:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-input-el{padding:.4em;min-height:2.5em;display:block;border-width:0;background:transparent;-webkit-appearance:none}.x-field-mask{position:absolute;top:0;right:0;bottom:0;left:0}.x-field-required label:after,.x-field-required .x-form-label:after{content:"*";display:inline}.x-item-disabled label:after,.x-item-disabled .x-form-label:after{color:#666 !important}.x-field-textarea textarea{min-height:6em;padding-top:.5em}.x-checkmark-base,.x-field .x-input-radio:after,.x-field .x-input-checkbox:after,.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after,.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after,.x-select-overlay .x-item-selected .x-list-item-label:before,.x-select-overlay .x-item-selected .x-list-item-label:after{content:"";position:absolute;width:1.4em;height:1.4em;top:50%;left:auto;right:1.1em;-webkit-mask-size:1.4em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAE+klEQVRoBe2aS28URxRGsY0h2FmwCQuEWLHjvUNgZAQ4PMwrEkIRIGEgySKwB8QvYIvEP+ANO0CwsJAA88wGBEKBZJUVQkJCQrwJ5nxN31Z5pnpc7e4ZT9vT0peqqanquqfurVvlIW3Dw8NTJtPTPplgxdoCnugeb3m45eEJtgJTJwJPGw8cP8V6TfmC4/Z/H9uEAAZsIdqHZiMBn2UNbvigSw8M2AIAD6PtqBPpmYe+8t1NoL9GLfYf3bTKKhiWo9PoA9KV0dUgn/tRh8tXWg/Hnj0KUB8yz1JNnjXUuhFd264A/f0O7dKXpQ7EIiTPfkKuVyvrSlx3US+KPF26cMbwxeg8Gg3W4LWHFd6rUUepQprQnI/Rh9A25AtjmqseHVkK7w59UxpgYFdg7wH0CwqFpWvyrKI23GZ7OWluwgqwOnqOobVoWh4Tm97DwCpBHUFp2TiUX3v5QVMnLQzMmqAsUVWWyta3UX/TAmOcwjjk6KmE830W7GbU0ZTAGKYEJdj3yAcQ2qYw1jmsG9e0KF8122UDw/SHwFX0EYWC+fpZGG/h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illoGUoD/ovvXgIrT4/rkxt4XK0fw+TtYxhT6iEt4FK7L8D4locDFqnUXSadh78Bx5bEl2CLG+8AAAAASUVORK5CYII=');margin-top:-0.7em}.x-field .x-input-radio,.x-field .x-input-checkbox{position:relative}.x-field .x-input-radio:after,.x-field .x-input-checkbox:after{background-color:#dddddd}.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after{background-color:#006bb6}.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after{background-color:#9abad1}.x-spinner .x-component-outer{display:-webkit-box;display:box}.x-spinner .x-component-outer > *{width:auto}.x-spinner .x-field-input{-webkit-box-flex:1}.x-spinner .x-field-input .x-input-el{-webkit-text-fill-color:#000;width:100%;text-align:center}.x-spinner .x-field-input input::-webkit-outer-spin-button,.x-spinner .x-field-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-spinner.x-item-disabled .x-input-el{-webkit-text-fill-color:#B3B3B3}.x-spinner.x-item-disabled .x-spinner-button{color:#aaa !important}.x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button{border:1px solid #c4c4c4;border-top-color:#d0d0d0;color:black}.x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before{background:#c4c4c4}.x-spinner.x-item-disabled .x-spinner-button,.x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after{background-color:#f7f7f7;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #e5e5e5));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#e5e5e5);background-image:linear-gradient(#ffffff,#ffffff 2%,#e5e5e5)}.x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-spinner.x-item-disabled .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active:after{background-color:#efefef;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d5d5d5), color-stop(10%, #e2e2e2), color-stop(65%, #efefef), color-stop(100%, #f0f0f0));background-image:-webkit-linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0);background-image:linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0)}.x-spinner .x-spinner-button{margin-top:.25em;margin-bottom:.25em;width:2em;padding:.23em 0 .27em;font-weight:bold;text-align:center;border:1px solid #dddddd !important;-webkit-border-radius:1em;border-radius:1em}.x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button{border:1px solid #b7b7b7;border-top-color:#c4c4c4;color:black}.x-spinner .x-spinner-button.x-button-back:before,.x-spinner .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:before{background:#b7b7b7}.x-spinner .x-spinner-button,.x-spinner .x-spinner-button.x-button-back:after,.x-spinner .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:after{background-color:#eaeaea;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #fcfcfc), color-stop(100%, #d8d8d8));background-image:-webkit-linear-gradient(#ffffff,#fcfcfc 2%,#d8d8d8);background-image:linear-gradient(#ffffff,#fcfcfc 2%,#d8d8d8)}.x-spinner .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner .x-spinner-button.x-button-pressing,.x-spinner .x-spinner-button.x-button-pressing:after,.x-spinner .x-spinner-button.x-button-pressed,.x-spinner .x-spinner-button.x-button-pressed:after,.x-spinner .x-spinner-button.x-button-active,.x-spinner .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner .x-spinner-button.x-button-active,.x-toolbar .x-spinner .x-spinner-button.x-button-active:after{background-color:#e2e2e2;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c9c9c9), color-stop(10%, #d5d5d5), color-stop(65%, #e2e2e2), color-stop(100%, #e3e3e3));background-image:-webkit-linear-gradient(#c9c9c9,#d5d5d5 10%,#e2e2e2 65%,#e3e3e3);background-image:linear-gradient(#c9c9c9,#d5d5d5 10%,#e2e2e2 65%,#e3e3e3)}.x-spinner .x-spinner-button-down{margin-left:.25em}.x-spinner .x-spinner-button-up{margin-right:.25em}.x-spinner.x-field-grouped-buttons .x-input-el{text-align:left}.x-spinner.x-field-grouped-buttons .x-spinner-button-down{margin-right:.5em}.x-android .x-spinner-button{padding:.40em 0 .11em !important}.x-phone .x-select-overlay{min-width:14em;min-height:12.5em}.x-select-overlay{min-width:18em;min-height:22em}.x-select-overlay .x-list-item-label{height:2.6em}.x-select-overlay .x-list-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.x-select-overlay .x-item-selected .x-list-label{margin-right:2.6em}.x-select-overlay .x-item-selected .x-list-item-label:before{background-color:rgba(0, 0, 0, 0.3);margin-top:-0.8em}.x-select-overlay .x-item-selected .x-list-item-label:after{background-color:#dddddd}.x-slider-field .x-component-outer,.x-toggle-field .x-component-outer{padding:0.6em}.x-slider,.x-toggle{position:relative;height:2.2em;min-height:0;min-width:0}.x-slider > *,.x-toggle > *{position:absolute;width:100%;height:100%}.x-slider.x-item-disabled{opacity:.6}.x-thumb{position:absolute;height:2.2em;width:2.2em}.x-thumb:before{content:"";position:absolute;width:1.85em;height:1.85em;top:0.175em;left:0.175em;border:1px solid #919191;-webkit-border-radius:0.925em;border-radius:0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #efefef), color-stop(100%, #cbcbcb));background-image:-webkit-linear-gradient(#ffffff,#efefef 2%,#cbcbcb);background-image:linear-gradient(#ffffff,#efefef 2%,#cbcbcb);-webkit-background-clip:padding;background-clip:padding-box}.x-thumb.x-dragging{opacity:1}.x-thumb.x-dragging:before{background-color:#d0d0d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #e2e2e2), color-stop(100%, #bebebe));background-image:-webkit-linear-gradient(#ffffff,#e2e2e2 2%,#bebebe);background-image:linear-gradient(#ffffff,#e2e2e2 2%,#bebebe)}.x-slider:after{content:"";position:absolute;width:auto;height:0.8em;top:0.737em;left:0;right:0;margin:0 0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);border:0.1em solid rgba(0, 0, 0, 0.1);border-bottom:0;-webkit-box-shadow:rgba(255, 255, 255, 0.7) 0 0.1em 0;-webkit-border-radius:0.4em;border-radius:0.4em}.x-toggle{width:4.4em;-webkit-border-radius:1.1em;border-radius:1.1em;overflow:hidden;border:1px solid #b7b7b7;background-color:#ddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);-webkit-box-flex:0}.x-toggle .x-thumb.x-dragging{opacity:1}.x-toggle .x-thumb:before{top:0.175em}.x-toggle-on{background-color:#92cf00;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6e9c00), color-stop(10%, #80b500), color-stop(65%, #92cf00), color-stop(100%, #94d200));background-image:-webkit-linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200);background-image:linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200)}input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}.x-field-number input::-webkit-outer-spin-button,.x-field-number input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-field-search .x-field-input{position:relative}.x-field-search .x-field-input:before{content:"";position:absolute;width:0.86em;height:0.86em;top:50%;left:0.5em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bqKhiUavbVZdo0LCyLl3iHhGEkkZsKBYJX4RISHwQIYIPNJoQlUjTuCakUZ9oVGRF0GywslvqbgkpDarqsn7/6XsmM5n38pzzvtudeZL/nplznvM8z//cz5ktTU5OtuWRUqk0i/qdoAN0gcXgP+CkzIcx8APYBXbi82/SaZFSKGGILiTibnA+GADHgbkgSXZT8CF4GwyDEXxvI92r4k0Yoj1EeAG4CvSDEggRkX8VbID4lhADQXXUwxZgfAF4CGwFmgdFYQJb68HJljjy6mSSJZAZ4CLwESiKZJydb7A/CGblJZVWP5UwzueBB8AfIC7IovO0mK0B89KCzlOWSBinWoBeAkWTstiT3948xJLqxhLG2Xzw4jSRdQ0yiv/upMBD8xsI40Rzdu00k3WknyeO+aHk4urFEb4TJ/80CWEdYB4BhS1kdfswe+zpGNf80RYUIr9QSdgOdNCYCfaLcABpqFxBbymu3FIlDFkdD18B5wRYHaHOJvAeGCU4fa8IdnXUPAaoMZeDk4CvfEKFM7CrhswnbpxjZQX4C7j5Y0m1d64EXc5OWoqeFsPLwTvAYt/p/Iv+6jTb1rLKHMbYgWCjZxCb0T/e6qhWj3o6hz8HRMSRykp17l5WayfksyN8oafzTegfHOLQ1aG+blc6ZGQRdeVawB4GlWno7Pim1G9rB08AZzgrfRfdw3wdxelHvl/38K01Itc2Rf22Q8BPIIuoynXQL/SQj71DwcfA4n8nev1xjWfN0yGjD2gxsYh6432LolWHQL9F91Gj/j7oac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C9oSCcZKzqfwO8OJK2FbCAunqYmrICRQaA3rLRejSvTWtGwTzc94Yj0DQS/O4C05nQd6VYhrIVMpEN6Wqv3crBngY4b582aR9DXgJCFTPt05T+AtKq2jNARzxLs/UBbnY/0onwLO97sXPuwj8cidQn8OuytAe0edjUyuluqh2vIPcNnPS1rIbOKfkRf0pKEGdqSJyFwM/AZ3j+2JGHXpZDWWf4+sMvlpaTal7e3xLYEsdQ4ITIIsras29AppxrKctRM5ZDRLUvv13GnLl1p5yjellylCb5BolvWkRQMgT6g6apXmnVgPWQrc/1/boJCaHVWyukAAAAASUVORK5CYII=');-webkit-mask-size:.86em;background-color:#ccc;-webkit-mask-repeat:no-repeat;margin-top:-0.43em}.x-field-search .x-field-input .x-form-field{margin-left:1.0em}.x-field-input .x-clear-icon{display:none;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADHmlDQ1BJQ0MgUHJvZmlsZQAAeAGFVN9r01AU/tplnbDhizpnEQk+aJFuZFN0Q5y2a1e6zVrqNrchSJumbVyaxiTtfrAH2YtvOsV38Qc++QcM2YNve5INxhRh+KyIIkz2IrOemzRNJ1MDufe73/nuOSfn5F6g+XFa0xQvDxRVU0/FwvzE5BTf8gFeHEMr/GhNi4YWSiZHQA/Tsnnvs/MOHsZsdO5v36v+Y9WalQwR8BwgvpQ1xCLhWaBpXNR0E+DWie+dMTXCzUxzWKcECR9nOG9jgeGMjSOWZjQ1QJoJwgfFQjpLuEA4mGng8w3YzoEU5CcmqZIuizyrRVIv5WRFsgz28B9zg/JfsKiU6Zut5xCNbZoZTtF8it4fOX1wjOYA1cE/Xxi9QbidcFg246M1fkLNJK4RJr3n7nRpmO1lmpdZKRIlHCS8YlSuM2xp5gsDiZrm0+30UJKwnzS/NDNZ8+PtUJUE6zHF9fZLRvS6vdfbkZMH4zU+pynWf0D+vff1corleZLw67QejdX0W5I6Vtvb5M2mI8PEd1E/A0hCgo4cZCjgkUIMYZpjxKr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yeAzle20uGp5Z+qA07jnd0dKS3UjMA84YbgtVhGmms26ZhRXFSQZr6DdljdbY8WcWhyiYA7CXc4zoj51Xe8cCB+Bm0oLNxLWdeSe8AOwcMDXBW/8h2Z7SwlHAE7wPS94p7BeBj2WAJQgk4dZ1vH4R8XetbLrUCu0/hJk+Xyh4lYGbkuAVKtEM4spWUyoAY4nqxGai9pKYFnALdg+eHMRgVi0o0zm2M+W179uzRHjUaAdMq0PsrzJZOxGJhhEoJFox8e9euXcYLIJ6AaROv8wH0Abzqj/ojNN6vKoA9j/n6TnZDL1krwFTC63xQ/CZ+mWs8rxJiToc9p9Bn3/JqWdcM5TjsJqqevOEG6pzFb6cq/WXFAegcfsd03lhnh3ULuwpQwChqtBmFfYw4/1MpV1GIJ8q+hAqHKeqhx6TadwvLynjpC6uYThjA/2SJ9QQjVe4AyvocjvR72Q4/775bWFbe1NQ0AkfxPubfryL+axgT10SlD/rbsep5LQxY2h6qhalADrwahM2AfWjt9wC+BU/7YwdZkXPTaPFv6PiZOxU23jdTXP8VKWC5GF4g4Z0KgG7Gbwt+WwFgM57FeHLTml1gGt/8d7wxvHNmN4Dh7zp+F7nhJuuL6v0/Vc+vwPfknLsAAAAASUVORK5CYII=') no-repeat;background-position:center center;background-size:55% 55%;width:2.2em;height:2.2em;margin:.5em;margin-top:-1.1em;position:absolute;top:50%;right:-0.5em}.x-field-clearable .x-clear-icon{display:block}.x-field-clearable .x-field-input{padding-right:2.2em}.x-android .x-input-el{-webkit-text-fill-color:#000}.x-android .x-empty .x-input-el{-webkit-text-fill-color:#A9A9A9}.x-item-disabled .x-form-label span,.x-item-disabled input,.x-item-disabled .x-input-el,.x-item-disabled .x-spinner-body,.x-item-disabled select,.x-item-disabled textarea,.x-item-disabled .x-field-clear-container{color:#b3b3b3;-webkit-text-fill-color:#b3b3b3;pointer-events:none}.x-form-fieldset{margin:0 0 1.5em}.x-form-fieldset .x-form-label{border-top:1px solid white}.x-form-fieldset .x-form-fieldset-inner{border:1px solid #dddddd;background:#fff;padding:0;-webkit-border-radius:0.4em;border-radius:0.4em;overflow:hidden}.x-form-fieldset .x-field{border-bottom:1px solid #dddddd;background:transparent}.x-form-fieldset .x-field:first-child{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-form-fieldset .x-field:last-child{border-bottom:0;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-form-fieldset-title{text-shadow:#fff 0 1px 1px;color:#333333;margin:1em 0.7em 0.3em;color:#333333;font-weight:bold;white-space:nowrap}.x-form-fieldset-instructions{text-shadow:#fff 0 1px 1px;color:#333333;color:gray;margin:1em 0.7em 0.3em;font-size:.8em;text-align:center}.x-selectmark-base,.x-field-select .x-component-outer:after{content:"";position:absolute;width:1em;height:1em;top:50%;left:auto;right:0.7em;-webkit-mask-size:1em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGF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TLy0XYIqtil9iF6aflq7AwBWuAvuQ9ZKSBgNX2ieWjtKSzeXBNZgqfe8J+4W5aXtbcg0GrvibB/BhkeuhBJhigzsghT0veh+WAlMcCGHvMOMQwcCdcIntYy6WmXhIg2PuiAvsEHO97IhHGgzckb4D8L6LmZYPMHBnhiWwXVdDPF9g4A4Vwd66nFr6BAN3ygbbw1yoMzjmjplgB5hrrufSvsHAHesZDOD2JAbxVYCBOzfIAZ9JbR6qAgN3cPwP9kZy1VIlGLiTdluCmoOBO/pnS9Bk8DzmS3pL4BMcpZEe1qX0GI/atC4dQYXRMa1MU0IX4gpWsIIVrGAFK1jBCnYUPwIMAPUPAyFL+nRdAAAAAElFTkSuQmCC');margin-top:-0.5em}.x-field-select{position:relative}.x-field-select .x-component-outer:after{background-color:#dddddd;z-index:2}.x-field-select .x-component-outer:before,.x-field-select .x-component-outer:after{pointer-events:none;position:absolute;display:block}.x-field-select .x-component-outer:before{content:"";position:absolute;width:4em;height:auto;top:0;left:auto;right:0;bottom:0;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;background:-webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(255, 255, 255, 0)), color-stop(0.5, white));z-index:1}.x-msgbox{min-width:15em;max-width:20em;padding:0.8em;margin:.5em;-webkit-box-shadow:rgba(0, 0, 0, 0.4) 0 0.1em 0.5em;-webkit-border-radius:0.3em;border-radius:0.3em;border:0.15em solid #1985d0}.x-msgbox .x-icon{margin-left:1.3em}.x-msgbox .x-title{font-size:.9em;line-height:1.4em}.x-msgbox .x-body{background:transparent !important}.x-msgbox .x-toolbar{background:transparent none;-webkit-box-shadow:none}.x-msgbox .x-toolbar.x-docked-top{border-bottom:0;height:1.3em}.x-msgbox .x-toolbar.x-docked-bottom{border-top:0}.x-msgbox .x-field{min-height:2em;background:#fff;-webkit-border-radius:0.2em;border-radius:0.2em}.x-msgbox .x-form-field{min-height:1.5em;padding-right:0 !important;-webkit-appearance:none}.x-msgbox .x-field-input{padding-right:2.2em}.x-msgbox-text{text-align:center;padding:6px 0;line-height:1.4em}.x-msgbox-buttons{padding:0.4em 0;height:auto}.x-msgbox-buttons .x-button{min-width:4.5em}.x-msgbox-buttons .x-button-normal span{opacity:.7}.x-msgbox-dark .x-msgbox-text{color:rgba(190, 224, 247, 0.9);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-msgbox-dark .x-msgbox-input{background-color:rgba(190, 224, 247, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(144,202,242,0.9)), color-stop(10%, rgba(167,213,244,0.9)), color-stop(65%, rgba(190,224,247,0.9)), color-stop(100%, rgba(192,225,247,0.9)));background-image:-webkit-linear-gradient(rgba(144,202,242,0.9),rgba(167,213,244,0.9) 10%,rgba(190,224,247,0.9) 65%,rgba(192,225,247,0.9));background-image:linear-gradient(rgba(144,202,242,0.9),rgba(167,213,244,0.9) 10%,rgba(190,224,247,0.9) 65%,rgba(192,225,247,0.9));border:0.1em solid rgba(25, 133, 208, 0.9)}.x-loading-spinner{font-size:250%;height:1em;width:1em;position:relative;-webkit-transform-origin:0.5em 0.5em}.x-loading-spinner > span,.x-loading-spinner > span:before,.x-loading-spinner > span:after{display:block;position:absolute;width:0.1em;height:0.25em;top:0;-webkit-transform-origin:0.05em 0.5em;-webkit-border-radius:0.05em;border-radius:0.05em;content:" "}.x-loading-spinner > span.x-loading-top{background-color:rgba(170, 170, 170, 0.99)}.x-loading-spinner > span.x-loading-top::after{background-color:rgba(170, 170, 170, 0.9)}.x-loading-spinner > span.x-loading-left::before{background-color:rgba(170, 170, 170, 0.8)}.x-loading-spinner > span.x-loading-left{background-color:rgba(170, 170, 170, 0.7)}.x-loading-spinner > span.x-loading-left::after{background-color:rgba(170, 170, 170, 0.6)}.x-loading-spinner > span.x-loading-bottom::before{background-color:rgba(170, 170, 170, 0.5)}.x-loading-spinner > span.x-loading-bottom{background-color:rgba(170, 170, 170, 0.4)}.x-loading-spinner > span.x-loading-bottom::after{background-color:rgba(170, 170, 170, 0.35)}.x-loading-spinner > span.x-loading-right::before{background-color:rgba(170, 170, 170, 0.3)}.x-loading-spinner > span.x-loading-right{background-color:rgba(170, 170, 170, 0.25)}.x-loading-spinner > span.x-loading-right::after{background-color:rgba(170, 170, 170, 0.2)}.x-loading-spinner > span.x-loading-top::before{background-color:rgba(170, 170, 170, 0.15)}.x-loading-spinner > span{left:50%;margin-left:-0.05em}.x-loading-spinner > span.x-loading-top{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg)}.x-loading-spinner > span.x-loading-right{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.x-loading-spinner > span.x-loading-bottom{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg)}.x-loading-spinner > span.x-loading-left{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg)}.x-loading-spinner > span::before{-webkit-transform:rotate(30deg);-moz-transform:rotate(30deg)}.x-loading-spinner > span::after{-webkit-transform:rotate(-30deg);-moz-transform:rotate(-30deg)}.x-loading-spinner{-webkit-animation-name:x-loading-spinner-rotate;-webkit-animation-duration:.5s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}@-webkit-keyframes x-loading-spinner-rotate{0%{-webkit-transform:rotate(0deg)}8.32%{-webkit-transform:rotate(0deg)}8.33%{-webkit-transform:rotate(30deg)}16.65%{-webkit-transform:rotate(30deg)}16.66%{-webkit-transform:rotate(60deg)}24.99%{-webkit-transform:rotate(60deg)}25%{-webkit-transform:rotate(90deg)}33.32%{-webkit-transform:rotate(90deg)}33.33%{-webkit-transform:rotate(120deg)}41.65%{-webkit-transform:rotate(120deg)}41.66%{-webkit-transform:rotate(150deg)}49.99%{-webkit-transform:rotate(150deg)}50%{-webkit-transform:rotate(180deg)}58.32%{-webkit-transform:rotate(180deg)}58.33%{-webkit-transform:rotate(210deg)}66.65%{-webkit-transform:rotate(210deg)}66.66%{-webkit-transform:rotate(240deg)}74.99%{-webkit-transform:rotate(240deg)}75%{-webkit-transform:rotate(270deg)}83.32%{-webkit-transform:rotate(270deg)}83.33%{-webkit-transform:rotate(300deg)}91.65%{-webkit-transform:rotate(300deg)}91.66%{-webkit-transform:rotate(330deg)}100%{-webkit-transform:rotate(330deg)}} diff --git a/sencha/pubnub-crypto.min.js b/sencha/pubnub-crypto.min.js new file mode 100644 index 000000000..e43568caa --- /dev/null +++ b/sencha/pubnub-crypto.min.js @@ -0,0 +1,25 @@ +(function(){ +PUBNUB.crypto=function(){var e=14,j=8,r=!1,u=function(b,f){var c="",d,p;if(f){d=b[15];if(16p;p++)c+=String.fromCharCode(b[p]);return c},t=function(b,f){var c=[],d;if(!f)try{b=unescape(encodeURIComponent(b))}catch(p){throw"Error on UTF-8 encode";}for(d=0;dj.length&&(s=16-j.length,q=[s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s]);for(s=0;sd;d++)c[d]=f[b[d]];return c},D=function(b){var f=[],c=r?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],d;for(d=0;16>d;d++)f[d]=b[c[d]];return f},E=function(b){var f=[],c;if(r)for(c=0;4>c;c++)f[4*c]=K[b[4*c]]^L[b[1+4*c]]^M[b[2+4*c]]^N[b[3+4*c]],f[1+4*c]=N[b[4*c]]^K[b[1+4*c]]^L[b[2+4*c]]^M[b[3+4*c]],f[2+4*c]=M[b[4*c]]^N[b[1+4*c]]^K[b[2+4*c]]^L[b[3+4*c]], +f[3+4*c]=L[b[4*c]]^M[b[1+4*c]]^N[b[2+4*c]]^K[b[3+4*c]];else for(c=0;4>c;c++)f[4*c]=O[b[4*c]]^P[b[1+4*c]]^b[2+4*c]^b[3+4*c],f[1+4*c]=b[4*c]^O[b[1+4*c]]^P[b[2+4*c]]^b[3+4*c],f[2+4*c]=b[4*c]^b[1+4*c]^O[b[2+4*c]]^P[b[3+4*c]],f[3+4*c]=P[b[4*c]]^b[1+4*c]^b[2+4*c]^O[b[3+4*c]];return f},B=function(b,f,c){var d=[],p;for(p=0;16>p;p++)d[p]=b[p]^f[c][p];return d},A=function(b,f){var c=[],d;for(d=0;16>d;d++)c[d]=b[d]^f[d];return c},w=function(b){var f=[],c=[],d,p,o=[];for(d=0;db;b++)c[b]=f[d-1][b];if(0===d%j){b=c[0];p=void 0;for(p=0;4>p;p++)c[p]=c[p+1];c[3]=b;c=F(c);c[0]^=W[d/j-1]}else 6b;b++)f[d][b]=f[d-j][b]^c[b]}for(d=0;dc;c++)o[d].push(f[4*d+c][0],f[4*d+c][1],f[4*d+c][2],f[4*d+c][3])}return o},F=function(b){for(var f=0;4>f;f++)b[f]=R[b[f]];return b},G=function(b,f){var c=[];for(i=0;ic;c++){for(var d=f,p=c,e=b,j=c,m=void 0,o=void 0,m=o=0;8>m;m++)o=1==(j&1)?o^e:o,e=127>>=1;d[p]=o}return f},R=G("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", +2),T,U=R,V=[];for(i=0;i>2],c+=J[(f[d]&3)<<4|f[d+1]>>4],c+= +void 0!==f[d+1]?J[(f[d+1]&15)<<2|f[d+2]>>6]:"=",c+=void 0!==f[d+2]?J[f[d+2]&63]:"=";b=c.slice(0,64);for(d=1;d>4,d[1]=(c[1]&15)<<4|c[2]>>2,d[2]=(c[2]&3)<<6|c[3],f.push(d[0],d[1],d[2]); +return f=f.slice(0,f.length-f.length%16)}};return{size:function(b){switch(b){case 128:e=10;j=4;break;case 192:e=12;j=6;break;case 256:e=14;j=8;break;default:throw"Invalid Key Size Specified:"+b;}},h2a:function(b){var f=[];b.replace(/(..)/g,function(b){f.push(parseInt(b,16))});return f},expandKey:w,encryptBlock:y,decryptBlock:C,Decrypt:r,s2a:t,rawEncrypt:q,rawDecrypt:v,dec:function(b,f,c){var b=Q.decode(b),d=b.slice(8,16),d=o(t(f,c),d),f=d.key,d=d.iv,b=b.slice(16,b.length);return b=v(b,f,d,c)},openSSLKey:o, +a2h:function(b){var f="",c;for(c=0;cb[c]?"0":"")+b[c].toString(16);return f},enc:function(b,f,c){var d;d=[];var e;for(e=0;8>e;e++)d=d.concat(Math.floor(256*Math.random()));e=o(t(f,c),d);f=e.key;e=e.iv;d=[[83,97,108,116,101,100,95,95].concat(d)];b=t(b,c);b=q(b,f,e);b=d.concat(b);return Q.encode(b)},Hash:{MD5:function(b){function f(b,c){var d,e,f,g,h;f=b&2147483648;g=c&2147483648;d=b&1073741824;e=c&1073741824;h=(b&1073741823)+(c&1073741823);return d&e?h^2147483648^f^g:d|e?h&1073741824? +h^3221225472^f^g:h^1073741824^f^g:h^f^g}function c(b,c,d,e,g,h,k){b=f(b,f(f(c&d|~c&e,g),k));return f(b<>>32-h,c)}function d(b,c,d,e,g,h,k){b=f(b,f(f(c&e|d&~e,g),k));return f(b<>>32-h,c)}function e(b,c,d,g,h,k,l){b=f(b,f(f(c^d^g,h),l));return f(b<>>32-k,c)}function j(b,c,d,e,g,h,k){b=f(b,f(f(d^(c|~e),g),k));return f(b<>>32-h,c)}function o(b){var c,d,e=[];for(d=0;3>=d;d++)c=b>>>8*d&255,e=e.concat(c);return e}var m=[],q,r,v,s,g,h,k,l,n=G("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", +8),m=b.length;q=m+8;r=16*((q-q%64)/64+1);v=[];for(g=s=0;g>>29;m=v;g=n[0];h=n[1];k=n[2];l=n[3];for(b=0;b>16)+(j>>16)+(o>>16)<<16|o&65535}function r(e,j){return e>>>j|e<<32-j}var u;u=e.replace(/\r\n/g,"\n");for(var e="",t=0;to?e+=String.fromCharCode(o):(127o?e+=String.fromCharCode(o>>6|192):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128)),e+=String.fromCharCode(o&63|128))}t=e;u=[];for(o=0;o<8*t.length;o+=8)u[o>>5]|=(t.charCodeAt(o/8)&255)<<24-o%32;var q=8*e.length, +t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909, +275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],o=Array(64),v,y,C,x,D,E,B,A,w,F,G;u[q>>5]|=128<<24-q%32;u[(q+64>>9<<4)+15]=q;for(A=0;Aw;w++)o[w]=16>w?u[w+A]:j(j(j(r(o[w-2],17)^r(o[w-2],19)^o[w- +2]>>>10,o[w-7]),r(o[w-15],7)^r(o[w-15],18)^o[w-15]>>>3),o[w-16]),F=j(j(j(j(B,r(x,6)^r(x,11)^r(x,25)),x&D^~x&E),t[w]),o[w]),G=j(r(q,2)^r(q,13)^r(q,22),q&v^q&y^v&y),B=E,E=D,D=x,x=j(C,F),C=y,y=v,v=q,q=j(F,G);e[0]=j(q,e[0]);e[1]=j(v,e[1]);e[2]=j(y,e[2]);e[3]=j(C,e[3]);e[4]=j(x,e[4]);e[5]=j(D,e[5]);e[6]=j(E,e[6]);e[7]=j(B,e[7])}u="";for(t=0;t<4*e.length;t++)u+="0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)+4&15)+"0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)&15);return u}; +})(); diff --git a/core/3.4/pubnub-3.4.js b/sencha/pubnub.js similarity index 65% rename from core/3.4/pubnub-3.4.js rename to sencha/pubnub.js index f90f99072..6bb6072c2 100644 --- a/core/3.4/pubnub-3.4.js +++ b/sencha/pubnub.js @@ -1,68 +1,16 @@ -/* --------------------------------------------------------------------------- -WAIT! - This file depends on instructions from the PUBNUB Cloud. -http://www.pubnub.com/account-javascript-api-include ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 PubNub Inc. -http://www.pubnub.com/ -http://www.pubnub.com/terms ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ---------------------------------------------------------------------------- */ - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= UTIL =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -window['PUBNUB'] || (function() { - -/** - * UTIL LOCALS - */ +// Version: 3.4.4 var NOW = 1 -, SWF = 'https://pubnub.a.ssl.fastly.net/pubnub.swf' -, REPL = /{([\w\-]+)}/g -, ASYNC = 'async' +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. , URLBIT = '/' , PARAMSBIT = '&' -, SUB_TIMEOUT = 310000 -, DEF_TIMEOUT = 10000 -, SECOND = 1000 -, PRESENCE_SUFFIX = '-pnpres' -, UA = navigator.userAgent -, XORIGN = UA.indexOf('MSIE 6') == -1; - -/** - * CONSOLE COMPATIBILITY - */ -window.console || (window.console=window.console||{}); -console.log || ( - console.log = - console.error = - ((window.opera||{}).postError||function(){}) -); +, REPL = /{([\w\-]+)}/g; /** * UTILITIES @@ -70,31 +18,6 @@ console.log || ( function unique() { return'x'+ ++NOW+''+(+new Date) } function rnow() { return+new Date } -/** - * LOCAL STORAGE OR COOKIE - */ -var db = (function(){ - var ls = window['localStorage']; - return { - 'get' : function(key) { - try { - if (ls) return ls.getItem(key); - if (document.cookie.indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - } catch(e) { return } - }, - 'set' : function( key, value ) { - try { - if (ls) return ls.setItem( key, value ) && 0; - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } catch(e) { return } - } - }; -})(); - /** * NEXTORIGIN * ========== @@ -103,14 +26,36 @@ var db = (function(){ var nextorigin = (function() { var max = 20 , ori = Math.floor(Math.random() * max); - return function(origin) { - return origin.indexOf('pubsub') > 0 + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 && origin.replace( - 'pubsub', 'ps' + (++ori < max? ori : ori=1) - ) || origin; + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; } })(); + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + /** * UPDATER * ======= @@ -133,64 +78,6 @@ function updater( fun, rate ) { return runnit; } -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * ERROR - * ===== - * error('message'); - */ -function error(message) { console['error'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - /** * GREP * ==== @@ -214,95 +101,58 @@ function supplant( str, values ) { } /** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * ... - * } ); + * timeout + * ======= + * timeout( function(){}, 100 ); */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); +function timeout( fun, wait ) { + return setTimeout( fun, wait ); } /** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); + * uuid + * ==== + * var my_uuid = uuid(); */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; } /** - * HEAD + * EACH * ==== - * head().appendChild(elm); + * each( [1,2,3], function(item) { } ) */ -function head() { return search('head')[0] } +function each( o, f ) { + if ( !o || !f ) return; -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); } /** - * CSS + * MAP * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - -/** - * timeout - * ======= - * timeout( function(){}, 100 ); + * var list = map( [1,2,3], function(item) { return item + 1 } ) */ -function timeout( fun, wait ) { - return setTimeout( fun, wait ); +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; } -/** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); - */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } - /** * ENCODE * ====== @@ -316,210 +166,90 @@ function encode(path) { } /** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , xhrtme = setup.timeout || DEF_TIMEOUT - , timer = timeout( function(){done(1)}, xhrtme ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - if (!setup.blocking) script[ASYNC] = ASYNC; - - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } - if (setup.data) { - var params = []; - script.src += "?"; - for (key in setup.data) { - params.push(key+"="+setup.data[key]); - } - script.src += params.join(PARAMSBIT); +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); } - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr, response - , finished = function() { - if (loaded) return; - loaded = 1; - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , xhrtme = setup.timeout || DEF_TIMEOUT - , timer = timeout( function(){done(1)}, xhrtme ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = xhrtme; - - var url = setup.url.join(URLBIT); - if (setup.data) { - var params = []; - var key; - url += "?"; - for (key in setup.data) params.push(key+"="+setup.data[key]); - url += params.join(PARAMSBIT); - } - - xhr.open( 'GET', url, (typeof(setup.blocking === 'undefined')) ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); } - // Return 'done' - return done; -} + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); -/** - * Generate Subscription Channel List - * ================================== - * generate_channel_list(channels_object); - */ -function generate_channel_list(channels) { - var list = []; - each( channels, function( channel, status ) { - if (status.subscribed) list.push(channel); - } ); - return list.sort(); -} + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ + if (jsonp != '0') data['callback'] = jsonp; -var PDIV = $('pubnub') || {} -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - var CHANNELS = {} - , SUB_CALLBACK = 0 - , SUB_CHANNEL = 0 - , SUB_RECEIVER = 0 - , SUB_RESTORE = 0 - , SUB_WINDOWING = 10 - , SUB_BUFF_WAIT = 0 - , TIMETOKEN = 0 - , PUBLISH_KEY = setup['publish_key'] || '' - , SUBSCRIBE_KEY = setup['subscribe_key'] || '' - , SSL = setup['ssl'] ? 's' : '' - , UUID = setup['uuid'] || db['get'](SUBSCRIBE_KEY+'uuid') || '' - , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') - , LEAVE = function(){} - , CONNECT = function(){} - , SELF = { + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, /* PUBNUB.history({ channel : 'my_chat_channel', @@ -528,7 +258,7 @@ var PDIV = $('pubnub') || {} }); */ 'history' : function( args, callback ) { - var callback = args['callback'] || callback + var callback = args['callback'] || callback , count = args['count'] || args['limit'] || 100 , reverse = args['reverse'] || "false" , err = args['error'] || function(){} @@ -547,8 +277,9 @@ var PDIV = $('pubnub') || {} params['count'] = count; params['reverse'] = reverse; - if (start) params['start'] = start; - if (end) params['end'] = end; + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; // Send Message xdr({ @@ -557,7 +288,7 @@ var PDIV = $('pubnub') || {} success : function(response) { callback(response) }, fail : err, url : [ - ORIGIN, 'v2', 'history', 'sub-key', + STD_ORIGIN, 'v2', 'history', 'sub-key', SUBSCRIBE_KEY, 'channel', encode(channel) ] }); @@ -598,7 +329,7 @@ var PDIV = $('pubnub') || {} // Compose URL Parts url = [ - ORIGIN, 'v1', 'replay', + STD_ORIGIN, 'v1', 'replay', PUBLISH_KEY, SUBSCRIBE_KEY, source, destination ]; @@ -618,28 +349,15 @@ var PDIV = $('pubnub') || {} */ 'time' : function(callback) { var jsonp = jsonp_cb(); - xdr({ callback : jsonp, - url : [ORIGIN, 'time', jsonp], + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], success : function(response) { callback(response[0]) }, fail : function() { callback(0) } }); }, - /* - PUBNUB.uuid(function(uuid) { }); - */ - 'uuid' : function(callback) { - var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, - function(c) { - var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); - return v.toString(16); - }); - if (callback) callback(u); - return u; - }, - /* PUBNUB.publish({ channel : 'my_chat_channel', @@ -648,35 +366,39 @@ var PDIV = $('pubnub') || {} */ 'publish' : function( args, callback ) { var callback = callback || args['callback'] || function(){} - , message = args['message'] + , msg = args['message'] , channel = args['channel'] , jsonp = jsonp_cb() , url; - if (!message) return error('Missing Message'); + if (!msg) return error('Missing Message'); if (!channel) return error('Missing Channel'); if (!PUBLISH_KEY) return error('Missing Publish Key'); if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); // If trying to send Object - message = JSON['stringify'](message); + msg = JSON['stringify'](msg); // Create URL url = [ - ORIGIN, 'publish', + STD_ORIGIN, 'publish', PUBLISH_KEY, SUBSCRIBE_KEY, 0, encode(channel), - jsonp, encode(message) + jsonp, encode(msg) ]; - // Send Message - xdr({ + // Queue Message Send + PUB_QUEUE.push({ callback : jsonp, - success : function(response) { callback(response) }, - fail : function() { callback([ 0, 'Disconnected' ]) }, + timeout : SECOND*5, url : url, - data : { 'uuid' : UUID } + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} }); + + // Send Message + publish(); }, /* @@ -697,7 +419,7 @@ var PDIV = $('pubnub') || {} // Iterate over Channels each( channel.split(','), function(channel) { - if (READY) LEAVE( channel, 0 ); + if (READY) SELF['LEAVE']( channel, 0 ); CHANNELS[channel] = 0; } ); @@ -720,14 +442,16 @@ var PDIV = $('pubnub') || {} , disconnect = args['disconnect'] || function(){} , presence = args['presence'] || 0 , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 , sub_timeout = args['timeout'] || SUB_TIMEOUT , windowing = args['windowing'] || SUB_WINDOWING - , restore = args['restore'] - , origin = nextorigin(ORIGIN); + , restore = args['restore']; // Restore Enabled? if (restore) SUB_RESTORE = 1; + TIMETOKEN = 0; + // Make sure we have a Channel if (!channel) return error('Missing Channel'); if (!callback) return error('Missing Callback'); @@ -768,9 +492,9 @@ var PDIV = $('pubnub') || {} 'channel' : channel, 'callback' : function(here) { each( 'uuids' in here ? here['uuids'] : [], - function(uuid) { presence( { + function(uid) { presence( { 'action' : 'join', - 'uuid' : uuid, + 'uuid' : uid, 'timestamp' : rnow(), 'occupancy' : here['occupancy'] || 1 }, here, channel ); } ); @@ -778,6 +502,39 @@ var PDIV = $('pubnub') || {} }); } ); + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + // Evented Subscribe function _connect() { var jsonp = jsonp_cb() @@ -790,34 +547,13 @@ var PDIV = $('pubnub') || {} SUB_RECEIVER = xdr({ timeout : sub_timeout, callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, data : { 'uuid' : UUID }, url : [ - origin, 'subscribe', + SUB_ORIGIN, 'subscribe', SUBSCRIBE_KEY, encode(channels), jsonp, TIMETOKEN ], - fail : function() { - // Disconnect - each_channel(function(channel){ - if (channel.disconnected) return; - channel.disconnected = 1; - channel.disconnect(channel.name); - }); - - // New Origin on Failed Connection - origin = nextorigin(ORIGIN); - - // Reconnect - timeout( _connect, SECOND ); - SELF['time'](function(success){ - each_channel(function(channel){ - if (success && channel.disconnected){ - channel.disconnected = 0; - channel.reconnect(channel.name); - } - }); - }); - }, success : function(messages) { if (!messages) return timeout( _connect, windowing ); @@ -833,6 +569,12 @@ var PDIV = $('pubnub') || {} SUB_RESTORE && db['get'](SUBSCRIBE_KEY) || messages[1]; + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + // Update Saved Timetoken db['set']( SUBSCRIBE_KEY, messages[1] ); @@ -865,7 +607,7 @@ var PDIV = $('pubnub') || {} CONNECT = function() { // Close Previous Subscribe Connection - SUB_RECEIVER && SUB_RECEIVER(); + _reset_offline(); // Begin Recursive Subscribe clearTimeout(SUB_BUFF_WAIT); @@ -880,18 +622,21 @@ var PDIV = $('pubnub') || {} }, 'here_now' : function( args, callback ) { - var callback = args['callback'] || callback + var callback = args['callback'] || callback , err = args['error'] || function(){} , channel = args['channel'] , jsonp = jsonp_cb() - , data = {}; + , data = null; // Make sure we have a Channel if (!channel) return error('Missing Channel'); if (!callback) return error('Missing Callback'); if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); - - if (jsonp != '0') data['callback'] = jsonp; + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } xdr({ callback : jsonp, @@ -899,137 +644,459 @@ var PDIV = $('pubnub') || {} success : function(response) { callback(response) }, fail : err, url : [ - ORIGIN, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, 'channel', encode(channel) ] }); }, // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'each' : each, - 'map' : map, - 'grep' : grep, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater }; - function each_channel(callback) { - each( generate_channel_list(CHANNELS), function(channel) { - var chan = CHANNELS[channel]; - if (!chan) return; - callback(chan); - } ); + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); } if (!UUID) UUID = SELF['uuid'](); db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); - // Announce Leave Event - LEAVE = function( channel, blocking ) { - var data = { 'uuid' : UUID } - , origin = nextorigin(ORIGIN) - , jsonp = jsonp_cb(); - - // Prevent Leaving a Presence Channel - if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; - - if (jsonp != '0') data['callback'] = jsonp; - - xdr({ - blocking : blocking || SSL, - timeout : 2000, - callback : jsonp, - data : data, - url : [ - origin, 'v2', 'presence', 'sub_key', - SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' - ] - }); + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, PNSDK = 'PubNub-JS-' + 'Sencha' + '/' + '3.4.4' +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE + */ +var db = (function(){ + var ls = typeof localStorage != 'undefined' && localStorage; + return { + get : function(key) { + try { + if (ls) return ls.getItem(key); + if (document.cookie.indexOf(key) == -1) return null; + return ((document.cookie||'').match( + RegExp(key+'=([^;]+)') + )||[])[1] || null; + } catch(e) { return } + }, + set : function( key, value ) { + try { + if (ls) return ls.setItem( key, value ) && 0; + document.cookie = key + '=' + value + + '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; + } catch(e) { return } + } }; +})(); - // Add Leave Functions - bind( 'beforeunload', window, function() { - each_channel(function(ch){ LEAVE( ch.name, 1 ) }); - return true; + +/** + * CORS XHR Request + * ================ + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr( setup ) { + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , data = setup.data || {} + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , async = ( typeof(setup.blocking) === 'undefined' ) + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = typeof XDomainRequest !== 'undefined' && + new XDomainRequest() || + new XMLHttpRequest(); + + xhr.onerror = xhr.onabort = function(){ done(1) }; + xhr.onload = xhr.onloadend = finished; + if (async) xhr.timeout = XHRTME; + data['pnsdk'] = PNSDK; + url = build_url(setup.url, data); + xhr.open( 'GET', url, async); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; } ); +} - return SELF; +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * ERROR + * === + * error('message'); + */ +function error(message) { console['error'](message) } + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } }; -// CREATE A PUBNUB GLOBAL OBJECT -PUBNUB = CREATE_PUBNUB({ - 'publish_key' : attr( PDIV, 'pub-key' ), - 'subscribe_key' : attr( PDIV, 'sub-key' ), - 'ssl' : !document.location.href.indexOf('https') || - attr( PDIV, 'ssl' ) == 'on', - 'origin' : attr( PDIV, 'origin' ), - 'uuid' : attr( PDIV, 'uuid' ) -}); +/** + * ATTR + * ==== + * var attribute = attr( node, 'attribute' ); + */ +function attr( node, attribute, value ) { + if (value) node.setAttribute( attribute, value ); + else return node && node.getAttribute && node.getAttribute(attribute); +} -// PUBNUB Flash Socket -css( PDIV, { 'position' : 'absolute', 'top' : -SECOND } ); +/** + * $ + * = + * var div = $('divid'); + */ +function $(id) { return document.getElementById(id) } -if ('opera' in window || attr( PDIV, 'flash' )) PDIV['innerHTML'] = - ''; -var pubnubs = $('pubnubs') || {}; +/** + * SEARCH + * ====== + * var elements = search('a div span'); + */ +function search( elements, start ) { + var list = []; + each( elements.split(/\s+/), function(el) { + each( (start || document).getElementsByTagName(el), function(node) { + list.push(node); + } ); + } ); + return list; +} -// PUBNUB READY TO CONNECT -function ready() { PUBNUB['time'](rnow); -PUBNUB['time'](function(t){ timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(connect) { connect() } ); -}, SECOND ); }); } +/** + * CSS + * === + * var obj = create('div'); + */ +function css( element, styles ) { + for (var style in styles) if (styles.hasOwnProperty(style)) + try {element.style[style] = styles[style] + ( + '|width|height|top|left|'.indexOf(style) > 0 && + typeof styles[style] == 'number' + ? 'px' : '' + )}catch(e){} +} -// Bind for PUBNUB Readiness to Subscribe -bind( 'load', window, function(){ timeout( ready, 0 ) } ); +/** + * CREATE + * ====== + * var obj = create('div'); + */ +function create(element) { return document.createElement(element) } -// Create Interface for Opera Flash -PUBNUB['rdx'] = function( id, data ) { - if (!data) return FDomainRequest[id]['onerror'](); - FDomainRequest[id]['responseText'] = unescape(data); - FDomainRequest[id]['onload'](); -}; +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ -function FDomainRequest() { - if (!pubnubs['get']) return 0; +function PN(setup) { - var fdomainrequest = { - 'id' : FDomainRequest['id']++, - 'send' : function() {}, - 'abort' : function() { fdomainrequest['id'] = {} }, - 'open' : function( method, url ) { - FDomainRequest[fdomainrequest['id']] = fdomainrequest; - pubnubs['get']( fdomainrequest['id'], url ); - } - }; - return fdomainrequest; + setup['db'] = db; + setup['xdr'] = xdr; + setup['error'] = error; + var SELF = PN_API(setup); + + SELF['init'] = PN; + SELF['$'] = $; + SELF['attr'] = attr; + SELF['search'] = search; + SELF['bind'] = bind; + SELF['css'] = css; + SELF['create'] = create; + + + // Add Leave Functions + bind( 'beforeunload', window, function() { + SELF['each-channel'](function(ch){ SELF['LEAVE']( ch.name, 1 ) }); + return true; + } ); + + // Return without Testing + if (setup['notest']) return SELF; + + bind( 'offline', window, SELF['_reset_offline'] ); + bind( 'offline', document, SELF['_reset_offline'] ); + + SELF['ready'](); + return SELF; } -FDomainRequest['id'] = SECOND; -// jQuery Interface -window['jQuery'] && (window['jQuery']['PUBNUB'] = PUBNUB); +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +(function(){ + +// --------------------------------------------------------------------------- +// WEBSOCKET INTERFACE +// --------------------------------------------------------------------------- +var WS = PUBNUB['ws'] = function( url, protocols ) { + if (!(this instanceof WS)) return new WS( url, protocols ); + + var self = this + , url = self.url = url || '' + , protocol = self.protocol = protocols || 'Sec-WebSocket-Protocol' + , bits = url.split('/') + , setup = { + 'ssl' : bits[0] === 'wss:' + ,'origin' : bits[2] + ,'publish_key' : bits[3] + ,'subscribe_key' : bits[4] + ,'channel' : bits[5] + }; + + // READY STATES + self['CONNECTING'] = 0; // The connection is not yet open. + self['OPEN'] = 1; // The connection is open and ready to communicate. + self['CLOSING'] = 2; // The connection is in the process of closing. + self['CLOSED'] = 3; // The connection is closed or couldn't be opened. + + // CLOSE STATES + self['CLOSE_NORMAL'] = 1000; // Normal Intended Close; completed. + self['CLOSE_GOING_AWAY'] = 1001; // Closed Unexpecttedly. + self['CLOSE_PROTOCOL_ERROR'] = 1002; // Server: Not Supported. + self['CLOSE_UNSUPPORTED'] = 1003; // Server: Unsupported Protocol. + self['CLOSE_TOO_LARGE'] = 1004; // Server: Too Much Data. + self['CLOSE_NO_STATUS'] = 1005; // Server: No reason. + self['CLOSE_ABNORMAL'] = 1006; // Abnormal Disconnect. + + // Events Default + self['onclose'] = self['onerror'] = + self['onmessage'] = self['onopen'] = + self['onsend'] = function(){}; + + // Attributes + self['binaryType'] = ''; + self['extensions'] = ''; + self['bufferedAmount'] = 0; + self['trasnmitting'] = false; + self['buffer'] = []; + self['readyState'] = self['CONNECTING']; + + // Close if no setup. + if (!url) { + self['readyState'] = self['CLOSED']; + self['onclose']({ + 'code' : self['CLOSE_ABNORMAL'], + 'reason' : 'Missing URL', + 'wasClean' : true + }); + return self; + } + + // PubNub WebSocket Emulation + self.pubnub = PUBNUB['init'](setup); + self.pubnub.setup = setup; + self.setup = setup; + + self.pubnub['subscribe']({ + 'restore' : false, + 'channel' : setup['channel'], + 'disconnect' : self['onerror'], + 'reconnect' : self['onopen'], + 'error' : function() { + self['onclose']({ + 'code' : self['CLOSE_ABNORMAL'], + 'reason' : 'Missing URL', + 'wasClean' : false + }); + }, + 'callback' : function(message) { + self['onmessage']({ 'data' : message }); + }, + 'connect' : function() { + self['readyState'] = self['OPEN']; + self['onopen'](); + } + }); +}; + +// --------------------------------------------------------------------------- +// WEBSOCKET SEND +// --------------------------------------------------------------------------- +WS.prototype.send = function(data) { + var self = this; + self.pubnub['publish']({ + 'channel' : self.pubnub.setup['channel'], + 'message' : data, + 'callback' : function(response) { + self['onsend']({ 'data' : response }); + } + }); +}; -// For Modern JS + Testling.js - http://testling.com/ -typeof(module) !== 'undefined' && (module['exports'] = PUBNUB) && ready(); +// --------------------------------------------------------------------------- +// WEBSOCKET CLOSE +// --------------------------------------------------------------------------- +WS.prototype.close = function() { + var self = this; + self.pubnub['unsubscribe']({ 'channel' : self.pubnub.setup['channel'] }); + self['readyState'] = self['CLOSED']; + self['onclose']({}); +}; })(); diff --git a/sencha/pubnub.min.js b/sencha/pubnub.min.js new file mode 100644 index 000000000..cecef62e6 --- /dev/null +++ b/sencha/pubnub.min.js @@ -0,0 +1,24 @@ +// Version: 3.4.4 +(function(){ +var k=!1;function l(){return function(){}}var ca=1,o=k,v=[],z="-pnpres",A=1E3,da=/{([\w\-]+)}/g;function ea(){return"x"+ ++ca+""+ +new Date}function F(){return+new Date}var H,I=Math.floor(20*Math.random());H=function(a,c){return 0++I?I:I=1))||a};function fa(a,c){function b(){f+c>F()?(clearTimeout(d),d=setTimeout(b,c)):(f=F(),a())}var d,f=0;return b}function ga(a,c){var b=[];K(a||[],function(a){c(a)&&b.push(a)});return b} +function ha(a,c){return a.replace(da,function(a,d){return c[d]||a})}function J(a){var c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=16*Math.random()|0;return("x"==a?c:c&3|8).toString(16)});a&&a(c);return c}function K(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function O(a){var c=[];K(a,function(a,d){d.g&&c.push(a)});return c.sort()}function ia(){setTimeout(function(){o||(o=1,K(v,function(a){a()}))},A)} +function R(a){function c(a){f||(f=1,clearTimeout(e),d&&(d.onerror=d.onload=null,d.abort&&d.abort(),d=null),a&&P())}function b(){if(!q){q=1;clearTimeout(e);try{response=JSON.parse(d.responseText)}catch(a){return c(1)}B(response)}}var d,f=0,q=0,e;e=setTimeout(function(){c(1)},S);var C=a.data||{},P=a.b||l(),B=a.c||l(),p="undefined"===typeof a.j;try{d="undefined"!==typeof XDomainRequest&&new XDomainRequest||new XMLHttpRequest;d.onerror=d.onabort=function(){c(1)};d.onload=d.onloadend=b;p&&(d.timeout=S); +C.pnsdk=ja;var g=a.url.join("/");if(C){var r=[],g=g+"?",i;for(i in C)r.push(i+"="+N(C[i]));g+=r.join("&")}url=g;d.open("GET",url,p);d.send()}catch(w){return c(0),R(a)}return c}function T(a,c,b){K(a.split(","),function(a){function f(a){a||(a=window.event);b(a)||(a.cancelBubble=!0,a.returnValue=k,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())}c.addEventListener?c.addEventListener(a,f,k):c.attachEvent?c.attachEvent("on"+a,f):c["on"+a]=f})} +function ka(a){console.error(a)}function la(a,c,b){if(b)a.setAttribute(c,b);else return a&&a.getAttribute&&a.getAttribute(c)}function ma(a){return document.getElementById(a)}function na(a,c){var b=[];K(a.split(/\s+/),function(a){K((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b}function oa(a,c){for(var b in c)if(c.hasOwnProperty(b))try{a.style[b]=c[b]+(0<"|width|height|top|left|".indexOf(b)&&"number"==typeof c[b]?"px":"")}catch(d){}} +function pa(a){return document.createElement(a)} +function U(a){function c(){}function b(){m.time(function(a){a||x&&x(1);setTimeout(b,B)})}function d(){qa()||x&&x(1);setTimeout(d,A)}function f(a){K(O(s),function(b){(b=s[b])&&a(b)})}function q(a){a&&(t.h=0);!t.h&&t.length&&(t.h=1,u(t.shift()))}a.db=V;a.xdr=R;a.error=ka;var e,C=+a.windowing||10,P=(+a.timeout||310)*A,B=(+a.keepalive||60)*A,p=a.publish_key||"",g=a.subscribe_key||"",r=a.ssl?"s":"",i="http"+r+"://"+(a.origin||"pubsub.pubnub.com"),w=H(i),W=H(i),t=[],Z=0,$=0,x=0,Q=0,aa=0,G=0,s={},u=a.xdr, +h=a.error||l(),qa=a._is_online||function(){return 1},y=a.jsonp_cb||function(){return 0},D=a.db||{get:l(),set:l()},E=a.uuid||D&&D.get(g+"uuid")||"",m={LEAVE:function(a,b){var c={uuid:E},d=H(i),e=y();0 $(SOCKET_IO_TMP) + cat $(PUBNUB_MIN_JS) $(GIBBERISH_AES_JS) $(ENCRYPT_PUBNUB_JS) $(SOCKET_IO_TMP) > $(SOCKET_IO_MIN_JS) + rm $(SOCKET_IO_TMP) + +.PHONY : clean +clean: + rm -f $(OUTPUT_FILES) $(SOCKET_IO_TMP) + +include ../Makefile.post diff --git a/socket.io/README.md b/socket.io/README.md index 88e9fc5ac..233fd11b3 100644 --- a/socket.io/README.md +++ b/socket.io/README.md @@ -63,7 +63,6 @@ emit() or send() functions, the message will be broadcast. ## How to use -First, include `pubnub.js` and `socket.io.js`: ```html diff --git a/socket.io/acknowledgements/index.html b/socket.io/acknowledgements/index.html index 697086faf..df527058c 100644 --- a/socket.io/acknowledgements/index.html +++ b/socket.io/acknowledgements/index.html @@ -15,11 +15,6 @@
Hello to Web User!
- diff --git a/socket.io/bootstrap-mobile/index.html b/socket.io/bootstrap-mobile/index.html index 0cb3529d1..387822f12 100644 --- a/socket.io/bootstrap-mobile/index.html +++ b/socket.io/bootstrap-mobile/index.html @@ -8,7 +8,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/socket.io/bootstrap-web/index.html b/socket.io/bootstrap-web/index.html index 09f6a0278..df527058c 100644 --- a/socket.io/bootstrap-web/index.html +++ b/socket.io/bootstrap-web/index.html @@ -15,7 +15,7 @@
Hello to Web User!
- + diff --git a/socket.io/custom-presence/index.html b/socket.io/custom-presence/index.html index 09f6a0278..df527058c 100644 --- a/socket.io/custom-presence/index.html +++ b/socket.io/custom-presence/index.html @@ -15,7 +15,7 @@
Hello to Web User!
- + diff --git a/socket.io/encryption/index.html b/socket.io/encryption/index.html index 09f6a0278..df527058c 100644 --- a/socket.io/encryption/index.html +++ b/socket.io/encryption/index.html @@ -15,7 +15,7 @@
Hello to Web User!
- + diff --git a/socket.io/here_now/index.html b/socket.io/here_now/index.html index 6659b315e..28e4e25a5 100644 --- a/socket.io/here_now/index.html +++ b/socket.io/here_now/index.html @@ -15,9 +15,7 @@
Click me and check the console log for here now!
- - - + diff --git a/socket.io/history/index.html b/socket.io/history/index.html index 1a9f0899f..b43766b89 100644 --- a/socket.io/history/index.html +++ b/socket.io/history/index.html @@ -16,9 +16,7 @@ - - - + diff --git a/socket.io/non-socket-io-communication/index.html b/socket.io/non-socket-io-communication/index.html index 123319c56..4e60a981f 100644 --- a/socket.io/non-socket-io-communication/index.html +++ b/socket.io/non-socket-io-communication/index.html @@ -8,7 +8,7 @@ - + diff --git a/socket.io/presence/index.html b/socket.io/presence/index.html index 2884d11bd..df527058c 100644 --- a/socket.io/presence/index.html +++ b/socket.io/presence/index.html @@ -15,9 +15,7 @@
Hello to Web User!
- - - + diff --git a/socket.io/public-private-communication/public-private-communication.html b/socket.io/public-private-communication/public-private-communication.html index bfa79b373..bc6a650b1 100644 --- a/socket.io/public-private-communication/public-private-communication.html +++ b/socket.io/public-private-communication/public-private-communication.html @@ -1,6 +1,6 @@ - + PubNub Socket.IO Unit Test
- diff --git a/socket.io/simple-button/app.js b/socket.io/simple-button/app.js index d3686febc..17c51b91d 100644 --- a/socket.io/simple-button/app.js +++ b/socket.io/simple-button/app.js @@ -73,7 +73,7 @@ function advance() { var stage = indicators.stage++; setTimeout( function() { p.css( indicators[stage], { background : '#4a3' } ); - }, 400 * (stage === 2 ? (function(){ + }, 400 * (stage === 2 ? (function(){ p.css( stages, { background : '#7d6' } ); setTimeout( function() { p.css( stages, { background : '#eeeee3' } ); diff --git a/socket.io/simple-button/index.html b/socket.io/simple-button/index.html index 8e8e2f90f..328552700 100644 --- a/socket.io/simple-button/index.html +++ b/socket.io/simple-button/index.html @@ -8,7 +8,7 @@ - + diff --git a/socket.io/socket.io-base.js b/socket.io/socket.io-base.js index 53505a3b9..d5bae5ff9 100644 --- a/socket.io/socket.io-base.js +++ b/socket.io/socket.io-base.js @@ -51,7 +51,7 @@ if (socket.disconnected) return; socket.disconnected = 1; p.each( namespaces, function(ns) { - p.events.fire( ns + 'disconnect', {} ) + p.events.fire( ns + 'disconnect', {} ) } ); } socket.disconnected = 0; @@ -78,9 +78,9 @@ }, callback : function(evt) { if (socket.disconnected) p.each( namespaces, function(ns) { - p.events.fire( ns + 'reconnect', {} ) + p.events.fire( ns + 'reconnect', {} ) } ); - + socket.disconnected = 0; var data = evt.data; @@ -140,7 +140,7 @@ user.connected = false; user.socket.user_count--; - p.events.fire( ns + 'leave', user ) + p.events.fire( ns + 'leave', user ) } ); } @@ -192,7 +192,7 @@ } // ===================================================================== - // Get Here Now data for present users + // Get Here Now data for present users // ===================================================================== function here_now( namespace, callback ) { var socket = get_socket(namespace); @@ -205,13 +205,13 @@ function locate(callback) { var callback = callback || function(){}; navigator && navigator.geolocation && - navigator.geolocation.getCurrentPosition(function(position) { + navigator.geolocation.getCurrentPosition(function(position) { socket.location = [ position.coords.latitude, position.coords.longitude ]; callback(socket.location); - }) || callback([ 0, 0 ]); + }) || callback([ 0, 0 ]); } // ===================================================================== diff --git a/socket.io/socket.io.min.js b/socket.io/socket.io.min.js index 618fce894..2f2bdfd04 100644 --- a/socket.io/socket.io.min.js +++ b/socket.io/socket.io.min.js @@ -1,61 +1,1228 @@ -// 3.4.2 +// Version: 3.4.4 (function(){ -var l=null;function p(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function a(){try{return this.valueOf()}catch(a){return l}}function c(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b=w[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function b(d,k){var i,h,j,t,q,f=e,g=k[d];g&&"object"===typeof g&&(g=a.call(g));"function"===typeof n&&(g=n.call(k,d,g));switch(typeof g){case "string":return c(g);case "number":return isFinite(g)?String(g):"null";case "boolean":case "null":return String(g); -case "object":if(!g)return"null";e+=s;q=[];if("[object Array]"===Object.prototype.toString.apply(g)){t=g.length;for(i=0;iu()?(clearTimeout(d),d=setTimeout(b,c)):(e=u(),a())}var d,e=0;return b},x=function(a){return document.getElementById(a)},y=function(a){console.error(a)},ca=function(a,c){var b=[];z(a.split(/\s+/),function(a){z((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},z=function(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")},P=function(a){function c(a,b){U||(U=1,a||m(b),f.onerror=l,clearTimeout(A),setTimeout(function(){a&&B();var b=x(g),c=b&&b.parentNode;c&&c.removeChild(b)},O))}if(J||K()){a:{var b,d,e=function(){if(!w){w=1;clearTimeout(v); -try{d=JSON.parse(b.responseText)}catch(a){return h(1)}i(d)}},s=0,w=0,n=a.timeout||ja,v=setTimeout(function(){h(1)},n),k=a.b||p(),i=a.c||p(),h=function(a){s||(s=1,clearTimeout(v),b&&(b.onerror=b.onload=l,b.abort&&b.abort(),b=l),a&&k())};try{b=K()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){h(1)};b.onload=b.onloadend=e;b.timeout=n;var j=a.url.join(ka);if(a.data){var e=[],t,j=j+"?";for(t in a.data)e.push(t+"="+a.data[t]);j+=e.join(la)}b.open("GET",j, -typeof("undefined"===a.i));b.send()}catch(q){h(0);J=0;a=P(a);break a}a=h}return a}var f=ia("script"),j=a.a,g=r(),U=0,A=setTimeout(function(){c(1)},a.timeout||ja),B=a.b||p(),m=a.c||p();window[j]=function(a){c(0,a)};a.i||(f[ma]=ma);f.onerror=function(){c(1)};f.src=a.url.join(ka);if(a.data){j=[];f.src+="?";for(e in a.data)j.push(e+"="+a.data[e]);f.src+=j.join(la)}F(f,"id",g);ga().appendChild(f);return c},na=function(a){var c=[];z(a,function(a,d){d.h&&c.push(a)});return c.sort()},ra=function(){setTimeout(function(){Q|| -(Q=1,z(qa,function(a){a()}))},O)},K=function(){if(!sa||!sa.get)return 0;var a={id:K.id++,send:p(),abort:function(){a.id={}},open:function(c,b){K[a.id]=a;sa.get(a.id,b)}};return a},aa=1,ea=/{([\w\-]+)}/g,ma="async",ka="/",la="&",ja=1E4,O=1E3,R="-pnpres",J=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||p());var S,V=window.localStorage;S={get:function(a){try{return V?V.getItem(a):-1== -document.cookie.indexOf(a)?l:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||l}catch(c){}},set:function(a,c){try{if(V)return V.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var W,ta=Math.floor(20*Math.random());W=function(a,c){return 0++ta?ta:ta=1))||a};var Y={list:{},unbind:function(a){Y.list[a]=[]},bind:function(a,c){(Y.list[a]=Y.list[a]||[]).push(c)},fire:function(a, -c){z(Y.list[a]||[],function(a){a(c)})}},Z=x("pubnub")||0,Q=0,qa=[],ua=function(a){function c(){}function b(){}function d(a){a&&(k.g=0);!k.g&&k.length&&(k.g=1,P(k.shift()))}function e(a){z(na(v),function(b){(b=v[b])&&a(b)})}function s(){!("onLine"in navigator)||navigator.onLine||n();setTimeout(s,O)}function w(){D.time(function(a){a||n();setTimeout(w,A)})}function n(){j&&j(1)}a.jsonp&&(J=0);var v={},k=[],i=0,h=0,j=0,t=0,q=0,f=0,g=+a.windowing||10,U=(+a.timeout||310)*O,A=(+a.keepalive||60)*O,B=a.publish_key|| -"",m=a.subscribe_key||"",T=a.ssl?"s":"",G=a.uuid||S.get(m+"uuid")||"",L="http"+T+"://"+(a.origin||"pubsub.pubnub.com"),H=W(L),oa=W(L),D={history:function(a,b){var b=a.callback||b,c=a.count||a.limit||100,d=a.reverse||"false",e=a.error||p(),g=a.channel,j=a.start,h=a.end,f={},i=M();if(!g)return y("Missing Channel");if(!b)return y("Missing Callback");if(!m)return y("Missing Subscribe Key");f.stringtoken="true";f.count=c;f.reverse=d;i&&(f.callback=i);j&&(f.start=j);h&&(f.end=h);P({a:i,data:f,c:function(a){b(a)}, -b:e,url:[H,"v2","history","sub-key",m,"channel",N(g)]})},replay:function(a){var b=b||a.callback||p(),c=a.source,d=a.destination,e=a.stop,f=a.start,g=a.end,j=a.reverse,a=a.limit,h=M(),i={};if(!c)return y("Missing Source Channel");if(!d)return y("Missing Destination Channel");if(!B)return y("Missing Publish Key");if(!m)return y("Missing Subscribe Key");"0"!=h&&(i.callback=h);e&&(i.stop="all");j&&(i.reverse="true");f&&(i.start=f);g&&(i.end=g);a&&(i.count=a);P({a:h,c:function(a){b(a)},b:function(){b([0, -"Disconnected"])},url:[H,"v1","replay",B,m,c,d],data:i})},time:function(a){var b=M();P({a:b,timeout:5*O,url:[H,"time",b],c:function(b){a(b[0])},b:function(){a(0)}})},publish:function(a,b){var b=b||a.callback||p(),c=a.message,e=a.channel,f=M();if(!c)return y("Missing Message");if(!e)return y("Missing Channel");if(!B)return y("Missing Publish Key");if(!m)return y("Missing Subscribe Key");c=JSON.stringify(c);e=[H,"publish",B,m,0,N(e),f,N(c)];k.push({a:f,timeout:5*O,url:e,data:{uuid:G},c:function(a){b(a); -d(1)},b:function(){b([0,"Failed",c]);d(1)}});d()},unsubscribe:function(a){a=a.channel;f=0;t=1;a=C((a.join?a.join(","):""+a).split(","),function(a){return a+","+a+R}).join(",");z(a.split(","),function(a){Q&&b(a,0);v[a]=0});Q&&c()},subscribe:function(a,b){function d(a){a?setTimeout(k,O):(H=W(L,1),oa=W(L,1),setTimeout(function(){D.time(d)},O));e(function(b){if(a&&b.d)return b.d=0,b.m(b.name);!a&&!b.d&&(b.d=1,b.l(b.name))})}function k(){var a=M(),b=na(v).join(",");b&&(j=P({timeout:wa,a:a,b:function(){D.time(d)}, -data:{uuid:G},url:[oa,"subscribe",m,N(b),a,f],c:function(a){if(!a)return setTimeout(k,pa);e(function(a){a.f||(a.f=1,a.k(a.name))});f=!f&&t&&S.get(m)||a[1];S.set(m,a[1]);var b,c=(2++I?I:I=1))||a}; +function ha(a,c){var b=a.join(da);if(c){var d=[],b=b+"?",e;for(e in c)d.push(e+"="+J(c[e]));b+=d.join(ea)}return b}function ia(a,c){function b(){e+c>D()?(clearTimeout(d),d=setTimeout(b,c)):(e=D(),a())}var d,e=0;return b}function ja(a,c){var b=[];N(a||[],function(a){c(a)&&b.push(a)});return b}function ka(a,c){return a.replace(fa,function(a,d){return c[d]||a})} +function ga(a){var c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=16*Math.random()|0;return("x"==a?c:c&3|8).toString(16)});a&&a(c);return c}function N(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function la(a){var c=[];N(a,function(a,d){d.g&&c.push(a)});return c.sort()}function P(){setTimeout(function(){t||(t=1,N(ba,function(a){a()}))},A)} +if(!window.PUBNUB){var R=function(a){return document.getElementById(a)},na=function(a){console.error(a)},oa=function(a,c){var b=[];N(a.split(/\s+/),function(a){N((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},S=function(a,c,b){N(a.split(","),function(a){function e(a){a||(a=window.event);b(a)||(a.cancelBubble=!0,a.returnValue=p,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())}c.addEventListener?c.addEventListener(a,e,p):c.attachEvent?c.attachEvent("on"+ +a,e):c["on"+a]=e})},pa=function(){return oa("head")[0]},T=function(a,c,b){if(b)a.setAttribute(c,b);else return a&&a.getAttribute&&a.getAttribute(c)},sa=function(a,c){for(var b in c)if(c.hasOwnProperty(b))try{a.style[b]=c[b]+(0<"|width|height|top|left|".indexOf(b)&&"number"==typeof c[b]?"px":"")}catch(d){}},ta=function(a){return document.createElement(a)},ua=function(){return U||W()?0:B()},wa=function(a){function c(a,b){L||(L=1,a||M(b),g.onerror=m,clearTimeout(V),setTimeout(function(){a&&u();var b= +R(q),c=b&&b.parentNode;c&&c.removeChild(b)},A))}if(U||W()){a:{var b,d,e=function(){if(!v){v=1;clearTimeout(Q);try{d=JSON.parse(b.responseText)}catch(a){return l(1)}k(d)}},o=0,v=0,f=a.timeout||1E4,Q=setTimeout(function(){l(1)},f),E=a.b||s(),h=a.data||{},k=a.c||s(),j="undefined"===typeof a.h,l=function(a){o||(o=1,clearTimeout(Q),b&&(b.onerror=b.onload=m,b.abort&&b.abort(),b=m),a&&E())};try{b=W()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){l(1)};b.onload= +b.onloadend=e;j&&(b.timeout=f);h.pnsdk=va;var i=ha(a.url,h);b.open("GET",i,j);b.send()}catch(r){l(0);U=0;a=wa(a);break a}a=l}return a}var g=ta("script"),e=a.a,q=B(),L=0,V=setTimeout(function(){c(1)},a.timeout||1E4),u=a.b||s(),f=a.data||{},M=a.c||s();window[e]=function(a){c(0,a)};a.h||(g[xa]=xa);g.onerror=function(){c(1)};f.pnsdk=va;g.src=ha(a.url,f);T(g,"id",q);pa().appendChild(g);return c},ya=function(){return!("onLine"in navigator)?1:navigator.onLine},W=function(){if(!za||!za.get)return 0;var a= +{id:W.id++,send:s(),abort:function(){a.id={}},open:function(c,b){W[a.id]=a;za.get(a.id,b)}};return a},xa="async",va="PubNub-JS-Web/3.4.4",U=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||s());var Aa,X=window.localStorage;Aa={get:function(a){try{return X?X.getItem(a):-1==document.cookie.indexOf(a)?m:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||m}catch(c){}},set:function(a, +c){try{if(X)return X.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var Y={list:{},unbind:function(a){Y.list[a]=[]},bind:function(a,c){(Y.list[a]=Y.list[a]||[]).push(c)},fire:function(a,c){N(Y.list[a]||[],function(a){a(c)})}},Z=R("pubnub")||0,Ba=function(a){function c(){}function b(){z.time(function(a){a||u&&u(1);setTimeout(b,h)})}function d(){ca()||u&&u(1);setTimeout(d,A)}function e(a){N(la(x),function(b){(b=x[b])&&a(b)})}function o(a){a&&(q.i= +0);!q.i&&q.length&&(q.i=1,y(q.shift()))}a.jsonp&&(U=0);var v=a.subscribe_key||"";a.uuid||Aa.get(v+"uuid");a.xdr=wa;a.db=Aa;a.error=na;a._is_online=ya;a.jsonp_cb=ua;var f,Q=+a.windowing||10,E=(+a.timeout||310)*A,h=(+a.keepalive||60)*A,k=a.publish_key||"",j=a.subscribe_key||"",l=a.ssl?"s":"",i="http"+l+"://"+(a.origin||"pubsub.pubnub.com"),r=F(i),g=F(i),q=[],L=0,V=0,u=0,M=0,ma=0,K=0,x={},y=a.xdr,n=a.error||s(),ca=a._is_online||function(){return 1},C=a.jsonp_cb||function(){return 0},G=a.db||{get:s(), +set:s()},H=a.uuid||G&&G.get(j+"uuid")||"",z={LEAVE:function(a,b){var c={uuid:H},d=F(i),e=C();0q;q++)c+=String.fromCharCode(b[q]);return c},u=function(b,f){var c=[],d;if(!f)try{b=unescape(encodeURIComponent(b))}catch(q){throw"Error on UTF-8 encode";}for(d=0;dj.length&&(t=16-j.length,r=[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t]);for(t=0;td;d++)c[d]=f[b[d]];return c},E=function(b){var f=[],c=s?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],d;for(d=0;16>d;d++)f[d]=b[c[d]];return f},F=function(b){var f=[],c;if(s)for(c=0;4>c;c++)f[4*c]=L[b[4*c]]^M[b[1+4*c]]^N[b[2+4*c]]^O[b[3+4*c]],f[1+4*c]=O[b[4*c]]^L[b[1+4*c]]^M[b[2+4*c]]^N[b[3+4*c]],f[2+4*c]=N[b[4*c]]^O[b[1+4*c]]^L[b[2+4*c]]^M[b[3+4*c]], -f[3+4*c]=M[b[4*c]]^N[b[1+4*c]]^O[b[2+4*c]]^L[b[3+4*c]];else for(c=0;4>c;c++)f[4*c]=P[b[4*c]]^Q[b[1+4*c]]^b[2+4*c]^b[3+4*c],f[1+4*c]=b[4*c]^P[b[1+4*c]]^Q[b[2+4*c]]^b[3+4*c],f[2+4*c]=b[4*c]^b[1+4*c]^P[b[2+4*c]]^Q[b[3+4*c]],f[3+4*c]=Q[b[4*c]]^b[1+4*c]^b[2+4*c]^P[b[3+4*c]];return f},C=function(b,f,c){var d=[],q;for(q=0;16>q;q++)d[q]=b[q]^f[c][q];return d},B=function(b,f){var c=[],d;for(d=0;16>d;d++)c[d]=b[d]^f[d];return c},x=function(b){var f=[],c=[],d,q,p=[];for(d=0;db;b++)c[b]=f[d-1][b];if(0===d%j){b=c[0];q=void 0;for(q=0;4>q;q++)c[q]=c[q+1];c[3]=b;c=G(c);c[0]^=X[d/j-1]}else 6b;b++)f[d][b]=f[d-j][b]^c[b]}for(d=0;dc;c++)p[d].push(f[4*d+c][0],f[4*d+c][1],f[4*d+c][2],f[4*d+c][3])}return p},G=function(b){for(var f=0;4>f;f++)b[f]=S[b[f]];return b},H=function(b,f){var c=[];for(i=0;ic;c++){for(var d=f,q=c,e=b,j=c,m=void 0,p=void 0,m=p=0;8>m;m++)p=1==(j&1)?p^e:p,e=127>>=1;d[q]=p}return f},S=H("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", -2),U,V=S,W=[];for(i=0;i>2],c+=K[(f[d]&3)<<4|f[d+1]>>4],c=void 0!== -f[d+1]?c+K[(f[d+1]&15)<<2|f[d+2]>>6]:c+"=",c=void 0!==f[d+2]?c+K[f[d+2]&63]:c+"=";b=c.slice(0,64);for(d=1;d>4,d[1]=(c[1]&15)<<4|c[2]>>2,d[2]=(c[2]&3)<<6|c[3],f.push(d[0],d[1],d[2]); -return f=f.slice(0,f.length-f.length%16)}};return{size:function(b){switch(b){case 128:e=10;j=4;break;case 192:e=12;j=6;break;case 256:e=14;j=8;break;default:throw"Invalid Key Size Specified:"+b;}},h2a:function(b){var f=[];b.replace(/(..)/g,function(b){f.push(parseInt(b,16))});return f},expandKey:x,encryptBlock:z,decryptBlock:D,Decrypt:s,s2a:u,rawEncrypt:r,rawDecrypt:w,dec:function(b,f,c){var b=R.decode(b),d=b.slice(8,16),d=p(u(f,c),d),f=d.key,d=d.iv,b=b.slice(16,b.length);return b=w(b,f,d,c)},openSSLKey:p, -a2h:function(b){var f="",c;for(c=0;cb[c]?"0":"")+b[c].toString(16);return f},enc:function(b,f,c){var d;d=[];var e;for(e=0;8>e;e++)d=d.concat(Math.floor(256*Math.random()));e=p(u(f,c),d);f=e.key;e=e.iv;d=[[83,97,108,116,101,100,95,95].concat(d)];b=u(b,c);b=r(b,f,e);b=d.concat(b);return R.encode(b)},Hash:{MD5:function(b){function f(b,c){var d,e,f,g,h;f=b&2147483648;g=c&2147483648;d=b&1073741824;e=c&1073741824;h=(b&1073741823)+(c&1073741823);return d&e?h^2147483648^f^g:d|e?h&1073741824? -h^3221225472^f^g:h^1073741824^f^g:h^f^g}function c(b,c,d,e,g,h,k){b=f(b,f(f(c&d|~c&e,g),k));return f(b<>>32-h,c)}function d(b,c,d,e,g,h,k){b=f(b,f(f(c&e|d&~e,g),k));return f(b<>>32-h,c)}function e(b,c,d,g,h,k,l){b=f(b,f(f(c^d^g,h),l));return f(b<>>32-k,c)}function j(b,c,d,e,g,h,k){b=f(b,f(f(d^(c|~e),g),k));return f(b<>>32-h,c)}function p(b){var c,d,e=[];for(d=0;3>=d;d++)c=b>>>8*d&255,e=e.concat(c);return e}var m=[],r,s,w,t,g,h,k,l,n=H("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", -8),m=b.length;r=m+8;s=16*((r-r%64)/64+1);w=[];for(g=t=0;g>>29;m=w;g=n[0];h=n[1];k=n[2];l=n[3];for(b=0;b>16)+(j>>16)+(p>>16)<<16|p&65535}function s(e,j){return e>>>j|e<<32-j}var v;v=e.replace(/\r\n/g,"\n");for(var e="",u=0;up?e+=String.fromCharCode(p):(127p?e+=String.fromCharCode(p>>6|192):(e+=String.fromCharCode(p>>12|224),e+=String.fromCharCode(p>>6&63|128)),e+=String.fromCharCode(p&63|128))}u=e;v=[];for(p=0;p<8*u.length;p+=8)v[p>>5]|=(u.charCodeAt(p/8)&255)<<24-p%32;var r=8*e.length, -u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909, -275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],p=Array(64),w,z,D,y,E,F,C,B,x,G,H;v[r>>5]|=128<<24-r%32;v[(r+64>>9<<4)+15]=r;for(B=0;Bx;x++)p[x]=16>x?v[x+B]:j(j(j(s(p[x-2],17)^s(p[x-2],19)^p[x- -2]>>>10,p[x-7]),s(p[x-15],7)^s(p[x-15],18)^p[x-15]>>>3),p[x-16]),G=j(j(j(j(C,s(y,6)^s(y,11)^s(y,25)),y&E^~y&F),u[x]),p[x]),H=j(s(r,2)^s(r,13)^s(r,22),r&w^r&z^w&z),C=F,F=E,E=y,y=j(D,G),D=z,z=w,w=r,r=j(G,H);e[0]=j(r,e[0]);e[1]=j(w,e[1]);e[2]=j(z,e[2]);e[3]=j(D,e[3]);e[4]=j(y,e[4]);e[5]=j(E,e[5]);e[6]=j(F,e[6]);e[7]=j(C,e[7])}v="";for(u=0;u<4*e.length;u++)v+="0123456789abcdef".charAt(e[u>>2]>>8*(3-u%4)+4&15)+"0123456789abcdef".charAt(e[u>>2]>>8*(3-u%4)&15);return v}; +PUBNUB['crypto'] = (function(){ + var Nr = 14, + /* Default to 256 Bit Encryption */ + Nk = 8, + Decrypt = false, + + enc_utf8 = function(s) + { + try { + return unescape(encodeURIComponent(s)); + } + catch(e) { + throw 'Error on UTF-8 encode'; + } + }, + + dec_utf8 = function(s) + { + try { + return decodeURIComponent(escape(s)); + } + catch(e) { + throw ('Bad Key'); + } + }, + + padBlock = function(byteArr) + { + var array = [], cpad, i; + if (byteArr.length < 16) { + cpad = 16 - byteArr.length; + array = [cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad, cpad]; + } + for (i = 0; i < byteArr.length; i++) + { + array[i] = byteArr[i]; + } + return array; + }, + + block2s = function(block, lastBlock) + { + var string = '', padding, i; + if (lastBlock) { + padding = block[15]; + if (padding > 16) { + throw ('Decryption error: Maybe bad key'); + } + if (padding == 16) { + return ''; + } + for (i = 0; i < 16 - padding; i++) { + string += String.fromCharCode(block[i]); + } + } else { + for (i = 0; i < 16; i++) { + string += String.fromCharCode(block[i]); + } + } + return string; + }, + + a2h = function(numArr) + { + var string = '', i; + for (i = 0; i < numArr.length; i++) { + string += (numArr[i] < 16 ? '0': '') + numArr[i].toString(16); + } + return string; + }, + + h2a = function(s) + { + var ret = []; + s.replace(/(..)/g, + function(s) { + ret.push(parseInt(s, 16)); + }); + return ret; + }, + + s2a = function(string, binary) { + var array = [], i; + + if (! binary) { + string = enc_utf8(string); + } + + for (i = 0; i < string.length; i++) + { + array[i] = string.charCodeAt(i); + } + + return array; + }, + + size = function(newsize) + { + switch (newsize) + { + case 128: + Nr = 10; + Nk = 4; + break; + case 192: + Nr = 12; + Nk = 6; + break; + case 256: + Nr = 14; + Nk = 8; + break; + default: + throw ('Invalid Key Size Specified:' + newsize); + } + }, + + randArr = function(num) { + var result = [], i; + for (i = 0; i < num; i++) { + result = result.concat(Math.floor(Math.random() * 256)); + } + return result; + }, + + openSSLKey = function(passwordArr, saltArr) { + // Number of rounds depends on the size of the AES in use + // 3 rounds for 256 + // 2 rounds for the key, 1 for the IV + // 2 rounds for 128 + // 1 round for the key, 1 round for the IV + // 3 rounds for 192 since it's not evenly divided by 128 bits + var rounds = Nr >= 12 ? 3: 2, + key = [], + iv = [], + md5_hash = [], + result = [], + data00 = passwordArr.concat(saltArr), + i; + md5_hash[0] = GibberishAES.Hash.MD5(data00); + result = md5_hash[0]; + for (i = 1; i < rounds; i++) { + md5_hash[i] = GibberishAES.Hash.MD5(md5_hash[i - 1].concat(data00)); + result = result.concat(md5_hash[i]); + } + key = result.slice(0, 4 * Nk); + iv = result.slice(4 * Nk, 4 * Nk + 16); + return { + key: key, + iv: iv + }; + }, + + rawEncrypt = function(plaintext, key, iv) { + // plaintext, key and iv as byte arrays + key = expandKey(key); + var numBlocks = Math.ceil(plaintext.length / 16), + blocks = [], + i, + cipherBlocks = []; + for (i = 0; i < numBlocks; i++) { + blocks[i] = padBlock(plaintext.slice(i * 16, i * 16 + 16)); + } + if (plaintext.length % 16 === 0) { + blocks.push([16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16]); + // CBC OpenSSL padding scheme + numBlocks++; + } + for (i = 0; i < blocks.length; i++) { + blocks[i] = (i === 0) ? xorBlocks(blocks[i], iv) : xorBlocks(blocks[i], cipherBlocks[i - 1]); + cipherBlocks[i] = encryptBlock(blocks[i], key); + } + return cipherBlocks; + }, + + rawDecrypt = function(cryptArr, key, iv, binary) { + // cryptArr, key and iv as byte arrays + key = expandKey(key); + var numBlocks = cryptArr.length / 16, + cipherBlocks = [], + i, + plainBlocks = [], + string = ''; + for (i = 0; i < numBlocks; i++) { + cipherBlocks.push(cryptArr.slice(i * 16, (i + 1) * 16)); + } + for (i = cipherBlocks.length - 1; i >= 0; i--) { + plainBlocks[i] = decryptBlock(cipherBlocks[i], key); + plainBlocks[i] = (i === 0) ? xorBlocks(plainBlocks[i], iv) : xorBlocks(plainBlocks[i], cipherBlocks[i - 1]); + } + for (i = 0; i < numBlocks - 1; i++) { + string += block2s(plainBlocks[i]); + } + string += block2s(plainBlocks[i], true); + return binary ? string : dec_utf8(string); + }, + + encryptBlock = function(block, words) { + Decrypt = false; + var state = addRoundKey(block, words, 0), + round; + for (round = 1; round < (Nr + 1); round++) { + state = subBytes(state); + state = shiftRows(state); + if (round < Nr) { + state = mixColumns(state); + } + //last round? don't mixColumns + state = addRoundKey(state, words, round); + } + + return state; + }, + + decryptBlock = function(block, words) { + Decrypt = true; + var state = addRoundKey(block, words, Nr), + round; + for (round = Nr - 1; round > -1; round--) { + state = shiftRows(state); + state = subBytes(state); + state = addRoundKey(state, words, round); + if (round > 0) { + state = mixColumns(state); + } + //last round? don't mixColumns + } + + return state; + }, + + subBytes = function(state) { + var S = Decrypt ? SBoxInv: SBox, + temp = [], + i; + for (i = 0; i < 16; i++) { + temp[i] = S[state[i]]; + } + return temp; + }, + + shiftRows = function(state) { + var temp = [], + shiftBy = Decrypt ? [0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 15, 12, 9, 6, 3] : [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11], + i; + for (i = 0; i < 16; i++) { + temp[i] = state[shiftBy[i]]; + } + return temp; + }, + + mixColumns = function(state) { + var t = [], + c; + if (!Decrypt) { + for (c = 0; c < 4; c++) { + t[c * 4] = G2X[state[c * 4]] ^ G3X[state[1 + c * 4]] ^ state[2 + c * 4] ^ state[3 + c * 4]; + t[1 + c * 4] = state[c * 4] ^ G2X[state[1 + c * 4]] ^ G3X[state[2 + c * 4]] ^ state[3 + c * 4]; + t[2 + c * 4] = state[c * 4] ^ state[1 + c * 4] ^ G2X[state[2 + c * 4]] ^ G3X[state[3 + c * 4]]; + t[3 + c * 4] = G3X[state[c * 4]] ^ state[1 + c * 4] ^ state[2 + c * 4] ^ G2X[state[3 + c * 4]]; + } + }else { + for (c = 0; c < 4; c++) { + t[c*4] = GEX[state[c*4]] ^ GBX[state[1+c*4]] ^ GDX[state[2+c*4]] ^ G9X[state[3+c*4]]; + t[1+c*4] = G9X[state[c*4]] ^ GEX[state[1+c*4]] ^ GBX[state[2+c*4]] ^ GDX[state[3+c*4]]; + t[2+c*4] = GDX[state[c*4]] ^ G9X[state[1+c*4]] ^ GEX[state[2+c*4]] ^ GBX[state[3+c*4]]; + t[3+c*4] = GBX[state[c*4]] ^ GDX[state[1+c*4]] ^ G9X[state[2+c*4]] ^ GEX[state[3+c*4]]; + } + } + + return t; + }, + + addRoundKey = function(state, words, round) { + var temp = [], + i; + for (i = 0; i < 16; i++) { + temp[i] = state[i] ^ words[round][i]; + } + return temp; + }, + + xorBlocks = function(block1, block2) { + var temp = [], + i; + for (i = 0; i < 16; i++) { + temp[i] = block1[i] ^ block2[i]; + } + return temp; + }, + + expandKey = function(key) { + // Expects a 1d number array + var w = [], + temp = [], + i, + r, + t, + flat = [], + j; + + for (i = 0; i < Nk; i++) { + r = [key[4 * i], key[4 * i + 1], key[4 * i + 2], key[4 * i + 3]]; + w[i] = r; + } + + for (i = Nk; i < (4 * (Nr + 1)); i++) { + w[i] = []; + for (t = 0; t < 4; t++) { + temp[t] = w[i - 1][t]; + } + if (i % Nk === 0) { + temp = subWord(rotWord(temp)); + temp[0] ^= Rcon[i / Nk - 1]; + } else if (Nk > 6 && i % Nk == 4) { + temp = subWord(temp); + } + for (t = 0; t < 4; t++) { + w[i][t] = w[i - Nk][t] ^ temp[t]; + } + } + for (i = 0; i < (Nr + 1); i++) { + flat[i] = []; + for (j = 0; j < 4; j++) { + flat[i].push(w[i * 4 + j][0], w[i * 4 + j][1], w[i * 4 + j][2], w[i * 4 + j][3]); + } + } + return flat; + }, + + subWord = function(w) { + // apply SBox to 4-byte word w + for (var i = 0; i < 4; i++) { + w[i] = SBox[w[i]]; + } + return w; + }, + + rotWord = function(w) { + // rotate 4-byte word w left by one byte + var tmp = w[0], + i; + for (i = 0; i < 4; i++) { + w[i] = w[i + 1]; + } + w[3] = tmp; + return w; + }, + +// jlcooke: 2012-07-12: added strhex + invertArr to compress G2X/G3X/G9X/GBX/GEX/SBox/SBoxInv/Rcon saving over 7KB, and added encString, decString + strhex = function(str,size) { + var ret = []; + for (i=0; i0x7f) ? 0x11b^(a<<1) : (a<<1); + b >>>= 1; + } + + return ret; + }, + Gx = function(x) { + var r = []; + for (var i=0; i<256; i++) + r[i] = Gxx(x, i); + return r; + }, + + // S-box +/* + SBox = [ + 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, + 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, + 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, + 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, + 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, + 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, + 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, + 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, + 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, + 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, + 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, + 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, + 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, + 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, + 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, + 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, + 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, + 22], //*/ SBox = strhex('637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16',2), + + // Precomputed lookup table for the inverse SBox +/* SBoxInv = [ + 82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, + 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, + 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, + 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, + 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, + 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, + 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, + 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, + 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, + 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, + 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, + 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, + 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, + 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, + 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, + 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, + 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, + 125], //*/ SBoxInv = invertArr(SBox), + + // Rijndael Rcon +/* + Rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, + 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145], +//*/ Rcon = strhex('01020408102040801b366cd8ab4d9a2f5ebc63c697356ad4b37dfaefc591',2), + +/* + G2X = [ + 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, + 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, + 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, + 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, + 0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 0x76, + 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, + 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa4, 0xa6, + 0xa8, 0xaa, 0xac, 0xae, 0xb0, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, + 0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xd0, 0xd2, 0xd4, 0xd6, + 0xd8, 0xda, 0xdc, 0xde, 0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, + 0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0xfe, 0x1b, 0x19, 0x1f, 0x1d, + 0x13, 0x11, 0x17, 0x15, 0x0b, 0x09, 0x0f, 0x0d, 0x03, 0x01, 0x07, 0x05, + 0x3b, 0x39, 0x3f, 0x3d, 0x33, 0x31, 0x37, 0x35, 0x2b, 0x29, 0x2f, 0x2d, + 0x23, 0x21, 0x27, 0x25, 0x5b, 0x59, 0x5f, 0x5d, 0x53, 0x51, 0x57, 0x55, + 0x4b, 0x49, 0x4f, 0x4d, 0x43, 0x41, 0x47, 0x45, 0x7b, 0x79, 0x7f, 0x7d, + 0x73, 0x71, 0x77, 0x75, 0x6b, 0x69, 0x6f, 0x6d, 0x63, 0x61, 0x67, 0x65, + 0x9b, 0x99, 0x9f, 0x9d, 0x93, 0x91, 0x97, 0x95, 0x8b, 0x89, 0x8f, 0x8d, + 0x83, 0x81, 0x87, 0x85, 0xbb, 0xb9, 0xbf, 0xbd, 0xb3, 0xb1, 0xb7, 0xb5, + 0xab, 0xa9, 0xaf, 0xad, 0xa3, 0xa1, 0xa7, 0xa5, 0xdb, 0xd9, 0xdf, 0xdd, + 0xd3, 0xd1, 0xd7, 0xd5, 0xcb, 0xc9, 0xcf, 0xcd, 0xc3, 0xc1, 0xc7, 0xc5, + 0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, + 0xe3, 0xe1, 0xe7, 0xe5 + ], //*/ G2X = Gx(2), + +/* G3X = [ + 0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, + 0x14, 0x17, 0x12, 0x11, 0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, + 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21, 0x60, 0x63, 0x66, 0x65, + 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b, 0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71, + 0x50, 0x53, 0x56, 0x55, 0x5c, 0x5f, 0x5a, 0x59, 0x48, 0x4b, 0x4e, 0x4d, + 0x44, 0x47, 0x42, 0x41, 0xc0, 0xc3, 0xc6, 0xc5, 0xcc, 0xcf, 0x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, 0x16, + 0x1f, 0x1c, 0x19, 0x1a + ], //*/ G3X = Gx(3), + +/* + G9X = [ + 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, + 0x6c, 0x65, 0x7e, 0x77, 0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, + 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7, 0x3b, 0x32, 0x29, 0x20, + 0x1f, 0x16, 0x0d, 0x04, 0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c, + 0xab, 0xa2, 0xb9, 0xb0, 0x8f, 0x86, 0x9d, 0x94, 0xe3, 0xea, 0xf1, 0xf8, + 0xc7, 0xce, 0xd5, 0xdc, 0x76, 0x7f, 0x64, 0x6d, 0x52, 0x5b, 0x40, 0x49, + 0x3e, 0x37, 0x2c, 0x25, 0x1a, 0x13, 0x08, 0x01, 0xe6, 0xef, 0xf4, 0xfd, + 0xc2, 0xcb, 0xd0, 0xd9, 0xae, 0xa7, 0xbc, 0xb5, 0x8a, 0x83, 0x98, 0x91, + 0x4d, 0x44, 0x5f, 0x56, 0x69, 0x60, 0x7b, 0x72, 0x05, 0x0c, 0x17, 0x1e, + 0x21, 0x28, 0x33, 0x3a, 0xdd, 0xd4, 0xcf, 0xc6, 0xf9, 0xf0, 0xeb, 0xe2, + 0x95, 0x9c, 0x87, 0x8e, 0xb1, 0xb8, 0xa3, 0xaa, 0xec, 0xe5, 0xfe, 0xf7, + 0xc8, 0xc1, 0xda, 0xd3, 0xa4, 0xad, 0xb6, 0xbf, 0x80, 0x89, 0x92, 0x9b, + 0x7c, 0x75, 0x6e, 0x67, 0x58, 0x51, 0x4a, 0x43, 0x34, 0x3d, 0x26, 0x2f, + 0x10, 0x19, 0x02, 0x0b, 0xd7, 0xde, 0xc5, 0xcc, 0xf3, 0xfa, 0xe1, 0xe8, + 0x9f, 0x96, 0x8d, 0x84, 0xbb, 0xb2, 0xa9, 0xa0, 0x47, 0x4e, 0x55, 0x5c, + 0x63, 0x6a, 0x71, 0x78, 0x0f, 0x06, 0x1d, 0x14, 0x2b, 0x22, 0x39, 0x30, + 0x9a, 0x93, 0x88, 0x81, 0xbe, 0xb7, 0xac, 0xa5, 0xd2, 0xdb, 0xc0, 0xc9, + 0xf6, 0xff, 0xe4, 0xed, 0x0a, 0x03, 0x18, 0x11, 0x2e, 0x27, 0x3c, 0x35, + 0x42, 0x4b, 0x50, 0x59, 0x66, 0x6f, 0x74, 0x7d, 0xa1, 0xa8, 0xb3, 0xba, + 0x85, 0x8c, 0x97, 0x9e, 0xe9, 0xe0, 0xfb, 0xf2, 0xcd, 0xc4, 0xdf, 0xd6, + 0x31, 0x38, 0x23, 0x2a, 0x15, 0x1c, 0x07, 0x0e, 0x79, 0x70, 0x6b, 0x62, + 0x5d, 0x54, 0x4f, 0x46 + ], //*/ G9X = Gx(9), + +/* GBX = [ + 0x00, 0x0b, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, + 0x74, 0x7f, 0x62, 0x69, 0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81, + 0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9, 0x7b, 0x70, 0x6d, 0x66, + 0x57, 0x5c, 0x41, 0x4a, 0x23, 0x28, 0x35, 0x3e, 0x0f, 0x04, 0x19, 0x12, + 0xcb, 0xc0, 0xdd, 0xd6, 0xe7, 0xec, 0xf1, 0xfa, 0x93, 0x98, 0x85, 0x8e, + 0xbf, 0xb4, 0xa9, 0xa2, 0xf6, 0xfd, 0xe0, 0xeb, 0xda, 0xd1, 0xcc, 0xc7, + 0xae, 0xa5, 0xb8, 0xb3, 0x82, 0x89, 0x94, 0x9f, 0x46, 0x4d, 0x50, 0x5b, + 0x6a, 0x61, 0x7c, 0x77, 0x1e, 0x15, 0x08, 0x03, 0x32, 0x39, 0x24, 0x2f, + 0x8d, 0x86, 0x9b, 0x90, 0xa1, 0xaa, 0xb7, 0xbc, 0xd5, 0xde, 0xc3, 0xc8, + 0xf9, 0xf2, 0xef, 0xe4, 0x3d, 0x36, 0x2b, 0x20, 0x11, 0x1a, 0x07, 0x0c, + 0x65, 0x6e, 0x73, 0x78, 0x49, 0x42, 0x5f, 0x54, 0xf7, 0xfc, 0xe1, 0xea, + 0xdb, 0xd0, 0xcd, 0xc6, 0xaf, 0xa4, 0xb9, 0xb2, 0x83, 0x88, 0x95, 0x9e, + 0x47, 0x4c, 0x51, 0x5a, 0x6b, 0x60, 0x7d, 0x76, 0x1f, 0x14, 0x09, 0x02, + 0x33, 0x38, 0x25, 0x2e, 0x8c, 0x87, 0x9a, 0x91, 0xa0, 0xab, 0xb6, 0xbd, + 0xd4, 0xdf, 0xc2, 0xc9, 0xf8, 0xf3, 0xee, 0xe5, 0x3c, 0x37, 0x2a, 0x21, + 0x10, 0x1b, 0x06, 0x0d, 0x64, 0x6f, 0x72, 0x79, 0x48, 0x43, 0x5e, 0x55, + 0x01, 0x0a, 0x17, 0x1c, 0x2d, 0x26, 0x3b, 0x30, 0x59, 0x52, 0x4f, 0x44, + 0x75, 0x7e, 0x63, 0x68, 0xb1, 0xba, 0xa7, 0xac, 0x9d, 0x96, 0x8b, 0x80, + 0xe9, 0xe2, 0xff, 0xf4, 0xc5, 0xce, 0xd3, 0xd8, 0x7a, 0x71, 0x6c, 0x67, + 0x56, 0x5d, 0x40, 0x4b, 0x22, 0x29, 0x34, 0x3f, 0x0e, 0x05, 0x18, 0x13, + 0xca, 0xc1, 0xdc, 0xd7, 0xe6, 0xed, 0xf0, 0xfb, 0x92, 0x99, 0x84, 0x8f, + 0xbe, 0xb5, 0xa8, 0xa3 + ], //*/ GBX = Gx(0xb), + +/* + GDX = [ + 0x00, 0x0d, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, + 0x5c,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xad, 0xa0, 0x83, 0x8e, 0x99, 0x94, 0xdf, 0xd2, 0xc5, 0xc8, + 0xeb, 0xe6, 0xf1, 0xfc, 0x67, 0x6a, 0x7d, 0x70, 0x53, 0x5e, 0x49, 0x44, + 0x0f, 0x02, 0x15, 0x18, 0x3b, 0x36, 0x21, 0x2c, 0x0c, 0x01, 0x16, 0x1b, + 0x38, 0x35, 0x22, 0x2f, 0x64, 0x69, 0x7e, 0x73, 0x50, 0x5d, 0x4a, 0x47, + 0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, + 0x80, 0x8d, 0x9a, 0x97 + ], //*/ GDX = Gx(0xd), + +/* + GEX = [ + 0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, + 0x48, 0x46, 0x54, 0x5a, 0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, + 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba, 0xdb, 0xd5, 0xc7, 0xc9, + 0xe3, 0xed, 0xff, 0xf1, 0xab, 0xa5, 0xb7, 0xb9, 0x93, 0x9d, 0x8f, 0x81, + 0x3b, 0x35, 0x27, 0x29, 0x03, 0x0d, 0x1f, 0x11, 0x4b, 0x45, 0x57, 0x59, + 0x73, 0x7d, 0x6f, 0x61, 0xad, 0xa3, 0xb1, 0xbf, 0x95, 0x9b, 0x89, 0x87, + 0xdd, 0xd3, 0xc1, 0xcf, 0xe5, 0xeb, 0xf9, 0xf7, 0x4d, 0x43, 0x51, 0x5f, + 0x75, 0x7b, 0x69, 0x67, 0x3d, 0x33, 0x21, 0x2f, 0x05, 0x0b, 0x19, 0x17, + 0x76, 0x78, 0x6a, 0x64, 0x4e, 0x40, 0x52, 0x5c, 0x06, 0x08, 0x1a, 0x14, + 0x3e, 0x30, 0x22, 0x2c, 0x96, 0x98, 0x8a, 0x84, 0xae, 0xa0, 0xb2, 0xbc, + 0xe6, 0xe8, 0xfa, 0xf4, 0xde, 0xd0, 0xc2, 0xcc, 0x41, 0x4f, 0x5d, 0x53, + 0x79, 0x77, 0x65, 0x6b, 0x31, 0x3f, 0x2d, 0x23, 0x09, 0x07, 0x15, 0x1b, + 0xa1, 0xaf, 0xbd, 0xb3, 0x99, 0x97, 0x85, 0x8b, 0xd1, 0xdf, 0xcd, 0xc3, + 0xe9, 0xe7, 0xf5, 0xfb, 0x9a, 0x94, 0x86, 0x88, 0xa2, 0xac, 0xbe, 0xb0, + 0xea, 0xe4, 0xf6, 0xf8, 0xd2, 0xdc, 0xce, 0xc0, 0x7a, 0x74, 0x66, 0x68, + 0x42, 0x4c, 0x5e, 0x50, 0x0a, 0x04, 0x16, 0x18, 0x32, 0x3c, 0x2e, 0x20, + 0xec, 0xe2, 0xf0, 0xfe, 0xd4, 0xda, 0xc8, 0xc6, 0x9c, 0x92, 0x80, 0x8e, + 0xa4, 0xaa, 0xb8, 0xb6, 0x0c, 0x02, 0x10, 0x1e, 0x34, 0x3a, 0x28, 0x26, + 0x7c, 0x72, 0x60, 0x6e, 0x44, 0x4a, 0x58, 0x56, 0x37, 0x39, 0x2b, 0x25, + 0x0f, 0x01, 0x13, 0x1d, 0x47, 0x49, 0x5b, 0x55, 0x7f, 0x71, 0x63, 0x6d, + 0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, + 0x9f, 0x91, 0x83, 0x8d + ], //*/ GEX = Gx(0xe), + + enc = function(string, pass, binary) { + // string, password in plaintext + var salt = randArr(8), + pbe = openSSLKey(s2a(pass, binary), salt), + key = pbe.key, + iv = pbe.iv, + cipherBlocks, + saltBlock = [[83, 97, 108, 116, 101, 100, 95, 95].concat(salt)]; + string = s2a(string, binary); + cipherBlocks = rawEncrypt(string, key, iv); + // Spells out 'Salted__' + cipherBlocks = saltBlock.concat(cipherBlocks); + return Base64.encode(cipherBlocks); + }, + + dec = function(string, pass, binary) { + // string, password in plaintext + var cryptArr = Base64.decode(string), + salt = cryptArr.slice(8, 16), + pbe = openSSLKey(s2a(pass, binary), salt), + key = pbe.key, + iv = pbe.iv; + cryptArr = cryptArr.slice(16, cryptArr.length); + // Take off the Salted__ffeeddcc + string = rawDecrypt(cryptArr, key, iv, binary); + return string; + }, + + MD5 = function(numArr) { + + function rotateLeft(lValue, iShiftBits) { + return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); + } + + function addUnsigned(lX, lY) { + var lX4, + lY4, + lX8, + lY8, + lResult; + lX8 = (lX & 0x80000000); + lY8 = (lY & 0x80000000); + lX4 = (lX & 0x40000000); + lY4 = (lY & 0x40000000); + lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); + if (lX4 & lY4) { + return (lResult ^ 0x80000000 ^ lX8 ^ lY8); + } + if (lX4 | lY4) { + if (lResult & 0x40000000) { + return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); + } else { + return (lResult ^ 0x40000000 ^ lX8 ^ lY8); + } + } else { + return (lResult ^ lX8 ^ lY8); + } + } + + function f(x, y, z) { + return (x & y) | ((~x) & z); + } + function g(x, y, z) { + return (x & z) | (y & (~z)); + } + function h(x, y, z) { + return (x ^ y ^ z); + } + function funcI(x, y, z) { + return (y ^ (x | (~z))); + } + + function ff(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(f(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function gg(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(g(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function hh(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(h(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function ii(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(funcI(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function convertToWordArray(numArr) { + var lWordCount, + lMessageLength = numArr.length, + lNumberOfWords_temp1 = lMessageLength + 8, + lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64, + lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16, + lWordArray = [], + lBytePosition = 0, + lByteCount = 0; + while (lByteCount < lMessageLength) { + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + lBytePosition = (lByteCount % 4) * 8; + lWordArray[lWordCount] = (lWordArray[lWordCount] | (numArr[lByteCount] << lBytePosition)); + lByteCount++; + } + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + lBytePosition = (lByteCount % 4) * 8; + lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); + lWordArray[lNumberOfWords - 2] = lMessageLength << 3; + lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; + return lWordArray; + } + + function wordToHex(lValue) { + var lByte, + lCount, + wordToHexArr = []; + for (lCount = 0; lCount <= 3; lCount++) { + lByte = (lValue >>> (lCount * 8)) & 255; + wordToHexArr = wordToHexArr.concat(lByte); + } + return wordToHexArr; + } + + /*function utf8Encode(string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = "", + n, + c; + + for (n = 0; n < string.length; n++) { + + c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + + return utftext; + }*/ + + var x = [], + k, + AA, + BB, + CC, + DD, + a, + b, + c, + d, + rnd = strhex('67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391',8); + + x = convertToWordArray(numArr); + + a = rnd[0]; + b = rnd[1]; + c = rnd[2]; + d = rnd[3] + + for (k = 0; k < x.length; k += 16) { + AA = a; + BB = b; + CC = c; + DD = d; + a = ff(a, b, c, d, x[k + 0], 7, rnd[4]); + d = ff(d, a, b, c, x[k + 1], 12, rnd[5]); + c = ff(c, d, a, b, x[k + 2], 17, rnd[6]); + b = ff(b, c, d, a, x[k + 3], 22, rnd[7]); + a = ff(a, b, c, d, x[k + 4], 7, rnd[8]); + d = ff(d, a, b, c, x[k + 5], 12, rnd[9]); + c = ff(c, d, a, b, x[k + 6], 17, rnd[10]); + b = ff(b, c, d, a, x[k + 7], 22, rnd[11]); + a = ff(a, b, c, d, x[k + 8], 7, rnd[12]); + d = ff(d, a, b, c, x[k + 9], 12, rnd[13]); + c = ff(c, d, a, b, x[k + 10], 17, rnd[14]); + b = ff(b, c, d, a, x[k + 11], 22, rnd[15]); + a = ff(a, b, c, d, x[k + 12], 7, rnd[16]); + d = ff(d, a, b, c, x[k + 13], 12, rnd[17]); + c = ff(c, d, a, b, x[k + 14], 17, rnd[18]); + b = ff(b, c, d, a, x[k + 15], 22, rnd[19]); + a = gg(a, b, c, d, x[k + 1], 5, rnd[20]); + d = gg(d, a, b, c, x[k + 6], 9, rnd[21]); + c = gg(c, d, a, b, x[k + 11], 14, rnd[22]); + b = gg(b, c, d, a, x[k + 0], 20, rnd[23]); + a = gg(a, b, c, d, x[k + 5], 5, rnd[24]); + d = gg(d, a, b, c, x[k + 10], 9, rnd[25]); + c = gg(c, d, a, b, x[k + 15], 14, rnd[26]); + b = gg(b, c, d, a, x[k + 4], 20, rnd[27]); + a = gg(a, b, c, d, x[k + 9], 5, rnd[28]); + d = gg(d, a, b, c, x[k + 14], 9, rnd[29]); + c = gg(c, d, a, b, x[k + 3], 14, rnd[30]); + b = gg(b, c, d, a, x[k + 8], 20, rnd[31]); + a = gg(a, b, c, d, x[k + 13], 5, rnd[32]); + d = gg(d, a, b, c, x[k + 2], 9, rnd[33]); + c = gg(c, d, a, b, x[k + 7], 14, rnd[34]); + b = gg(b, c, d, a, x[k + 12], 20, rnd[35]); + a = hh(a, b, c, d, x[k + 5], 4, rnd[36]); + d = hh(d, a, b, c, x[k + 8], 11, rnd[37]); + c = hh(c, d, a, b, x[k + 11], 16, rnd[38]); + b = hh(b, c, d, a, x[k + 14], 23, rnd[39]); + a = hh(a, b, c, d, x[k + 1], 4, rnd[40]); + d = hh(d, a, b, c, x[k + 4], 11, rnd[41]); + c = hh(c, d, a, b, x[k + 7], 16, rnd[42]); + b = hh(b, c, d, a, x[k + 10], 23, rnd[43]); + a = hh(a, b, c, d, x[k + 13], 4, rnd[44]); + d = hh(d, a, b, c, x[k + 0], 11, rnd[45]); + c = hh(c, d, a, b, x[k + 3], 16, rnd[46]); + b = hh(b, c, d, a, x[k + 6], 23, rnd[47]); + a = hh(a, b, c, d, x[k + 9], 4, rnd[48]); + d = hh(d, a, b, c, x[k + 12], 11, rnd[49]); + c = hh(c, d, a, b, x[k + 15], 16, rnd[50]); + b = hh(b, c, d, a, x[k + 2], 23, rnd[51]); + a = ii(a, b, c, d, x[k + 0], 6, rnd[52]); + d = ii(d, a, b, c, x[k + 7], 10, rnd[53]); + c = ii(c, d, a, b, x[k + 14], 15, rnd[54]); + b = ii(b, c, d, a, x[k + 5], 21, rnd[55]); + a = ii(a, b, c, d, x[k + 12], 6, rnd[56]); + d = ii(d, a, b, c, x[k + 3], 10, rnd[57]); + c = ii(c, d, a, b, x[k + 10], 15, rnd[58]); + b = ii(b, c, d, a, x[k + 1], 21, rnd[59]); + a = ii(a, b, c, d, x[k + 8], 6, rnd[60]); + d = ii(d, a, b, c, x[k + 15], 10, rnd[61]); + c = ii(c, d, a, b, x[k + 6], 15, rnd[62]); + b = ii(b, c, d, a, x[k + 13], 21, rnd[63]); + a = ii(a, b, c, d, x[k + 4], 6, rnd[64]); + d = ii(d, a, b, c, x[k + 11], 10, rnd[65]); + c = ii(c, d, a, b, x[k + 2], 15, rnd[66]); + b = ii(b, c, d, a, x[k + 9], 21, rnd[67]); + a = addUnsigned(a, AA); + b = addUnsigned(b, BB); + c = addUnsigned(c, CC); + d = addUnsigned(d, DD); + } + + return wordToHex(a).concat(wordToHex(b), wordToHex(c), wordToHex(d)); + }, + + encString = function(plaintext, key, iv) { + plaintext = s2a(plaintext); + + key = s2a(key); + for (var i=key.length; i<32; i++) + key[i] = 0; + + if (iv == null) { + iv = genIV(); + } else { + iv = s2a(iv); + for (var i=iv.length; i<16; i++) + iv[i] = 0; + } + + var ct = rawEncrypt(plaintext, key, iv); + var ret = [iv]; + for (var i=0; i> 2]; + b64 += chars[((flatArr[i] & 3) << 4) | (flatArr[i + 1] >> 4)]; + if (! (flatArr[i + 1] === undefined)) { + b64 += chars[((flatArr[i + 1] & 15) << 2) | (flatArr[i + 2] >> 6)]; + } else { + b64 += '='; + } + if (! (flatArr[i + 2] === undefined)) { + b64 += chars[flatArr[i + 2] & 63]; + } else { + b64 += '='; + } + } + // OpenSSL is super particular about line breaks + broken_b64 = b64.slice(0, 64); // + '\n'; + for (i = 1; i < (Math.ceil(b64.length / 64)); i++) { + broken_b64 += b64.slice(i * 64, i * 64 + 64) + (Math.ceil(b64.length / 64) == i + 1 ? '': '\n'); + } + return broken_b64; + }, + + decode = function(string) { + string = string.replace(/\n/g, ''); + var flatArr = [], + c = [], + b = [], + i; + for (i = 0; i < string.length; i = i + 4) { + c[0] = _chars.indexOf(string.charAt(i)); + c[1] = _chars.indexOf(string.charAt(i + 1)); + c[2] = _chars.indexOf(string.charAt(i + 2)); + c[3] = _chars.indexOf(string.charAt(i + 3)); + + b[0] = (c[0] << 2) | (c[1] >> 4); + b[1] = ((c[1] & 15) << 4) | (c[2] >> 2); + b[2] = ((c[2] & 3) << 6) | c[3]; + flatArr.push(b[0], b[1], b[2]); + } + flatArr = flatArr.slice(0, flatArr.length - (flatArr.length % 16)); + return flatArr; + }; + + //internet explorer + if(typeof Array.indexOf === "function") { + _chars = chars; + } + + /* + //other way to solve internet explorer problem + if(!Array.indexOf){ + Array.prototype.indexOf = function(obj){ + for(var i=0; i> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); + } + + function S(X, n) { + return ( X >>> n ) | (X << (32 - n)); + } + + function R(X, n) { + return ( X >>> n ); + } + + function Ch(x, y, z) { + return ((x & y) ^ ((~x) & z)); + } + + function Maj(x, y, z) { + return ((x & y) ^ (x & z) ^ (y & z)); + } + + function Sigma0256(x) { + return (S(x, 2) ^ S(x, 13) ^ S(x, 22)); + } + + function Sigma1256(x) { + return (S(x, 6) ^ S(x, 11) ^ S(x, 25)); + } + + function Gamma0256(x) { + return (S(x, 7) ^ S(x, 18) ^ R(x, 3)); + } + + function Gamma1256(x) { + return (S(x, 17) ^ S(x, 19) ^ R(x, 10)); + } + + function core_sha256(m, l) { + var K = new Array(0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0xFC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x6CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2); + var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); + var W = new Array(64); + var a, b, c, d, e, f, g, h, i, j; + var T1, T2; + + m[l >> 5] |= 0x80 << (24 - l % 32); + m[((l + 64 >> 9) << 4) + 15] = l; + + for (var i = 0; i < m.length; i += 16) { + a = HASH[0]; + b = HASH[1]; + c = HASH[2]; + d = HASH[3]; + e = HASH[4]; + f = HASH[5]; + g = HASH[6]; + h = HASH[7]; + + for (var j = 0; j < 64; j++) { + if (j < 16) W[j] = m[j + i]; + else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); + + T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); + T2 = safe_add(Sigma0256(a), Maj(a, b, c)); + + h = g; + g = f; + f = e; + e = safe_add(d, T1); + d = c; + c = b; + b = a; + a = safe_add(T1, T2); + } + + HASH[0] = safe_add(a, HASH[0]); + HASH[1] = safe_add(b, HASH[1]); + HASH[2] = safe_add(c, HASH[2]); + HASH[3] = safe_add(d, HASH[3]); + HASH[4] = safe_add(e, HASH[4]); + HASH[5] = safe_add(f, HASH[5]); + HASH[6] = safe_add(g, HASH[6]); + HASH[7] = safe_add(h, HASH[7]); + } + return HASH; + } + + function str2binb(str) { + var bin = Array(); + var mask = (1 << chrsz) - 1; + for (var i = 0; i < str.length * chrsz; i += chrsz) { + bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32); + } + return bin; + } + + function Utf8Encode(string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + + return utftext; + } + + function binb2hex(binarray) { + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i++) { + str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + + hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 )) & 0xF); + } + return str; + } + + s = Utf8Encode(s); + return binb2hex(core_sha256(str2binb(s), s.length * chrsz)); +} +(function(){function n(c){b.each(d,function(a){if(a in g&&c in g[a]){var e=g[a][c];e.connected&&(e.connected=!1,e.socket.user_count--,b.events.fire(a+"leave",e))}})}function l(c,a,e,h,d){var k=j(a);b.publish({channel:k.channel,message:{name:c,ns:a,data:e,uuid:m,geo:k.location||[0,0]},callback:function(b){if(b[0])return(d||function(){})(b);var i=2*(h||500);setTimeout(function(){l(c,a,e,i,d)},5500 - + PubNub Socket.IO Unit Test $(PUBNUB_JS) + $(ECHO) $(VERSION) >> $(PUBNUB_JS) + $(ECHO) "(function(){" >> $(PUBNUB_JS) + cat $(PUBNUB_COMMON_JS) $(PUBNUB_PLATFORM_JS) >> $(PUBNUB_JS) + sed -i -e "s/VERSION/\'$(VERSION)\'/g" $(PUBNUB_JS) + sed -i -e "s/PLATFORM/\'$(PLATFORM)\'/g" $(PUBNUB_JS) + $(ECHO) "})();" >> $(PUBNUB_JS) + for f in $(EXAMPLE_RESOURCES); do cp $(PUBNUB_JS) $$f ; done + +$(PUBNUB_CRYPTO_JS) : $(GIBBERISH_JS) $(ENCRYPT_JS) + $(ECHO) "(function(){" >> $(PUBNUB_CRYPTO_JS) + cat $(GIBBERISH_JS) $(ENCRYPT_JS) >> $(PUBNUB_CRYPTO_JS) + $(ECHO) "})();" >> $(PUBNUB_CRYPTO_MIN_JS) + + +.PHONY : clean +clean: + rm -f $(OUTPUT_FILES) + +include ../Makefile.post diff --git a/titanium/README.md b/titanium/README.md new file mode 100644 index 000000000..a37dd7069 --- /dev/null +++ b/titanium/README.md @@ -0,0 +1,93 @@ +## Get your very own registration keys at http://www.pubnub.com/account + +### PubNub 3.4.4 Real-time Cloud Push API for Titanium + +PubNub is a Massively Scalable Real-time Service for Web and Mobile Games. +This is a cloud-based service for broadcasting Real-time messages +to millions of web and mobile clients simultaneously. + +#### API Usage Summary +API Usage summary follows. But checkout the real working examples in examples/mobile + +And be sure to checkout how easy it is to run the demo chat application with this quick video demo: +https://vimeo.com/57166260 + +### Init + +```javascript +Ti.include('pubnub.js'); + +var pubnub = PUBNUB({ + publish_key : 'demo', + subscribe_key : 'demo', + ssl : false, + native_tcp_socket : false, + origin : 'pubsub.pubnub.com' +}); +``` + +If you run into firewall issues on some iPhone deployments, try to set native_tcp_socket to true. + + +### Subscribe and Presence +For a given channel, subscribe to the channel (subscribe), or subscribe to the channel's join/leave events (presence) + +```javascript +pubnub.subscribe({ + channel : "hello_world", + callback : function(message) { Ti.API.log(message) } +}) +``` + +### Publish +Send messages to a channel. + +```javascript +pubnub.publish({ + channel : "hello_world", + message : "Hi." +}) +``` + +### Message History ( history() is deprecated, please migrate your apps to use detailedHistory instead. ) +Get the message history for a channel. + +```javascript + var paramobj = {}; + paramobj['channel'] = channel.value; + paramobj['callback'] = function(message) { + append_data( JSON.stringify(message)); + } + paramobj.error = function() { + append_data("Lost connection ... ","#f00"); + } + if (start.value != "Start Timestamp" && start.value != "") + paramobj['start'] = start.value; + if (end.value != "End Timestamp" && end.value != "") + paramobj['end'] = end.value; + if (count.value != "Count" && count.value != "") + paramobj['count'] = count.value; + else + paramobj['count'] = 100; + pubnub.detailedHistory(paramobj); +``` +### Here_now +Get real time occupancy stats for a channel. Used complimentarily with Presence + +```javascript + pubnub.here_now({ + channel : channel.value, + connect : function() { + append_data("Receiving Here Now data ..."); + }, + callback : function(message) { + append_data( JSON.stringify(message) ); + }, + error : function() { + append_data( "Lost Connection...", "#f00" ); + } + }); +``` + + + diff --git a/titanium/examples/desktop/app.js b/titanium/examples/desktop/app.js new file mode 100644 index 000000000..88286f5c1 --- /dev/null +++ b/titanium/examples/desktop/app.js @@ -0,0 +1,84 @@ +(function(){ + +// -- +// -- DOM ELEMENT POINTERS +// -- +var logger = PUBNUB.$('pubnub-logger') +, publish_button = PUBNUB.$('publish-button') +, subscribe_button = PUBNUB.$('subscribe-button') +, subscribe_channel = PUBNUB.$('subscribe-channel') +, publish_text = PUBNUB.$('publish-text') +, connected = PUBNUB.$('pubnub-connected') +, channel_name = ''; + + +// -- +// -- BASIC LOG OUTPUT FUNCTION +// -- +function log(data) { + logger.innerHTML = + '\n' + log.line++ + ': ' + + JSON.stringify(data) + ( + channel_name ? + ' - from "' + channel_name + '" Channel.' : + '' ) + logger.innerHTML; +} +log.line = 1; + + +// -- +// -- SEND A MESSAGE FUNCTION +// -- +function send_message(message) { + PUBNUB.publish({ + channel : channel_name, + message : message + }); +} + + +// -- +// -- LISTING FOR MESSAGES +// -- +function listen(channel) { + // -- UNSUBSCRIBE FROM PREVIOUS CHANNEL + PUBNUB.unsubscribe({ channel : channel_name}); + + // -- SAVE NEW CHANNEL NAME + channel_name = channel || 'titanium-demo'; + + // -- SUBSCRIBE TO NEW CHANNEL + PUBNUB.subscribe({ + channel : channel_name, + callback : log + }); + + // -- UPDATE CONNECTED STATUS + connected.innerHTML = 'CONNECTED to "' + channel_name + '"'; + PUBNUB.css( connected, { color : "green" } ); +} + + +// -- +// -- BIND SUBSCRIBE BUTTON +// -- +PUBNUB.bind( 'mousedown,touchstart', subscribe_button, function() { + listen(subscribe_channel.value); +} ); + + +// -- +// -- BIND PUBLISH BUTTON +// -- +PUBNUB.bind( 'mousedown,touchstart', publish_button, function() { + // -- PUBLISH THE VALUE OF THE TEXTBOX INPUT + send_message( publish_text.value || 'EMPTY MESSAGE' ); +} ); + + +// -- +// -- GENERAL STARTUP COMPLETE MESSAGE +// -- +log("Startup Complete"); + +})(); diff --git a/titanium/examples/desktop/index.html b/titanium/examples/desktop/index.html new file mode 100644 index 000000000..baf30f47a --- /dev/null +++ b/titanium/examples/desktop/index.html @@ -0,0 +1,75 @@ + + + + + + + +
+ + + + + + + + NOT CONNECTED +
+ + + +
+ + + + + +
+ + + +
...
+ + + +
+ + + + diff --git a/titanium/examples/desktop/pubnub.js b/titanium/examples/desktop/pubnub.js new file mode 100644 index 000000000..3967a2360 --- /dev/null +++ b/titanium/examples/desktop/pubnub.js @@ -0,0 +1,982 @@ +// 3.4.4 +(function(){ +var NOW = 1 +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; + +/** + * UTILITIES + */ +function unique() { return'x'+ ++NOW+''+(+new Date) } +function rnow() { return+new Date } + +/** + * NEXTORIGIN + * ========== + * var next_origin = nextorigin(); + */ +var nextorigin = (function() { + var max = 20 + , ori = Math.floor(Math.random() * max); + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 + && origin.replace( + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; + } +})(); + + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + +/** + * UPDATER + * ======= + * var timestamp = unique(); + */ +function updater( fun, rate ) { + var timeout + , last = 0 + , runnit = function() { + if (last + rate > rnow()) { + clearTimeout(timeout); + timeout = setTimeout( runnit, rate ); + } + else { + last = rnow(); + fun(); + } + }; + + return runnit; +} + +/** + * GREP + * ==== + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +function grep( list, fun ) { + var fin = []; + each( list || [], function(l) { fun(l) && fin.push(l) } ); + return fin +} + +/** + * SUPPLANT + * ======== + * var text = supplant( 'Hello {name}!', { name : 'John' } ) + */ +function supplant( str, values ) { + return str.replace( REPL, function( _, match ) { + return values[match] || _ + } ); +} + +/** + * timeout + * ======= + * timeout( function(){}, 100 ); + */ +function timeout( fun, wait ) { + return setTimeout( fun, wait ); +} + +/** + * uuid + * ==== + * var my_uuid = uuid(); + */ +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; +} + +/** + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} + +/** + * ENCODE + * ====== + * var encoded_path = encode('path'); + */ +function encode(path) { + return map( (encodeURIComponent(path)).split(''), function(chr) { + return "-_.!~*'()".indexOf(chr) < 0 ? chr : + "%"+chr.charCodeAt(0).toString(16).toUpperCase() + } ).join(''); +} + +/** + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); + */ +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} + +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } + +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, + /* + PUBNUB.history({ + channel : 'my_chat_channel', + limit : 100, + callback : function(history) { } + }); + */ + 'history' : function( args, callback ) { + var callback = args['callback'] || callback + , count = args['count'] || args['limit'] || 100 + , reverse = args['reverse'] || "false" + , err = args['error'] || function(){} + , channel = args['channel'] + , start = args['start'] + , end = args['end'] + , params = {} + , jsonp = jsonp_cb(); + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + params['stringtoken'] = 'true'; + params['count'] = count; + params['reverse'] = reverse; + + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; + + // Send Message + xdr({ + callback : jsonp, + data : params, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'history', 'sub-key', + SUBSCRIBE_KEY, 'channel', encode(channel) + ] + }); + }, + + /* + PUBNUB.replay({ + source : 'my_channel', + destination : 'new_channel' + }); + */ + 'replay' : function(args) { + var callback = callback || args['callback'] || function(){} + , source = args['source'] + , destination = args['destination'] + , stop = args['stop'] + , start = args['start'] + , end = args['end'] + , reverse = args['reverse'] + , limit = args['limit'] + , jsonp = jsonp_cb() + , data = {} + , url; + + // Check User Input + if (!source) return error('Missing Source Channel'); + if (!destination) return error('Missing Destination Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup URL Params + if (jsonp != '0') data['callback'] = jsonp; + if (stop) data['stop'] = 'all'; + if (reverse) data['reverse'] = 'true'; + if (start) data['start'] = start; + if (end) data['end'] = end; + if (limit) data['count'] = limit; + + // Compose URL Parts + url = [ + STD_ORIGIN, 'v1', 'replay', + PUBLISH_KEY, SUBSCRIBE_KEY, + source, destination + ]; + + // Start (or Stop) Replay! + xdr({ + callback : jsonp, + success : function(response) { callback(response) }, + fail : function() { callback([ 0, 'Disconnected' ]) }, + url : url, + data : data + }); + }, + + /* + PUBNUB.time(function(time){ }); + */ + 'time' : function(callback) { + var jsonp = jsonp_cb(); + xdr({ + callback : jsonp, + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], + success : function(response) { callback(response[0]) }, + fail : function() { callback(0) } + }); + }, + + /* + PUBNUB.publish({ + channel : 'my_chat_channel', + message : 'hello!' + }); + */ + 'publish' : function( args, callback ) { + var callback = callback || args['callback'] || function(){} + , msg = args['message'] + , channel = args['channel'] + , jsonp = jsonp_cb() + , url; + + if (!msg) return error('Missing Message'); + if (!channel) return error('Missing Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // If trying to send Object + msg = JSON['stringify'](msg); + + // Create URL + url = [ + STD_ORIGIN, 'publish', + PUBLISH_KEY, SUBSCRIBE_KEY, + 0, encode(channel), + jsonp, encode(msg) + ]; + + // Queue Message Send + PUB_QUEUE.push({ + callback : jsonp, + timeout : SECOND*5, + url : url, + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} + }); + + // Send Message + publish(); + }, + + /* + PUBNUB.unsubscribe({ channel : 'my_chat' }); + */ + 'unsubscribe' : function(args) { + var channel = args['channel']; + + TIMETOKEN = 0; + SUB_RESTORE = 1; + + // Prepare Channel(s) + channel = map( ( + channel.join ? channel.join(',') : ''+channel + ).split(','), function(channel) { + return channel + ',' + channel + PRESENCE_SUFFIX; + } ).join(','); + + // Iterate over Channels + each( channel.split(','), function(channel) { + if (READY) SELF['LEAVE']( channel, 0 ); + CHANNELS[channel] = 0; + } ); + + // ReOpen Connection if Any Channels Left + if (READY) CONNECT(); + }, + + /* + PUBNUB.subscribe({ + channel : 'my_chat' + callback : function(message) { } + }); + */ + 'subscribe' : function( args, callback ) { + var channel = args['channel'] + , callback = callback || args['callback'] + , callback = callback || args['message'] + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['disconnect'] || function(){} + , presence = args['presence'] || 0 + , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 + , sub_timeout = args['timeout'] || SUB_TIMEOUT + , windowing = args['windowing'] || SUB_WINDOWING + , restore = args['restore']; + + // Restore Enabled? + if (restore) SUB_RESTORE = 1; + + TIMETOKEN = 0; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup Channel(s) + each( (channel.join ? channel.join(',') : ''+channel).split(','), + function(channel) { + var settings = CHANNELS[channel] || {}; + + // Store Channel State + CHANNELS[SUB_CHANNEL = channel] = { + name : channel, + connected : settings.connected, + disconnected : settings.disconnected, + subscribed : 1, + callback : SUB_CALLBACK = callback, + connect : connect, + disconnect : disconnect, + reconnect : reconnect + }; + + // Presence Enabled? + if (!presence) return; + + // Subscribe Presence Channel + SELF['subscribe']({ + 'channel' : channel + PRESENCE_SUFFIX, + 'callback' : presence + }); + + // Presence Subscribed? + if (settings.subscribed) return; + + // See Who's Here Now? + if (noheresync) return; + SELF['here_now']({ + 'channel' : channel, + 'callback' : function(here) { + each( 'uuids' in here ? here['uuids'] : [], + function(uid) { presence( { + 'action' : 'join', + 'uuid' : uid, + 'timestamp' : rnow(), + 'occupancy' : here['occupancy'] || 1 + }, here, channel ); } ); + } + }); + } ); + + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + + // Evented Subscribe + function _connect() { + var jsonp = jsonp_cb() + , channels = generate_channel_list(CHANNELS).join(','); + + // Stop Connection + if (!channels) return; + + // Connect to PubNub Subscribe Servers + SUB_RECEIVER = xdr({ + timeout : sub_timeout, + callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, + data : { 'uuid' : UUID }, + url : [ + SUB_ORIGIN, 'subscribe', + SUBSCRIBE_KEY, encode(channels), + jsonp, TIMETOKEN + ], + success : function(messages) { + if (!messages) return timeout( _connect, windowing ); + + // Connect + each_channel(function(channel){ + if (channel.connected) return; + channel.connected = 1; + channel.connect(channel.name); + }); + + // Restore Previous Connection Point if Needed + TIMETOKEN = !TIMETOKEN && + SUB_RESTORE && + db['get'](SUBSCRIBE_KEY) || messages[1]; + + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + + // Update Saved Timetoken + db['set']( SUBSCRIBE_KEY, messages[1] ); + + // Route Channel <---> Callback for Message + var next_callback = (function() { + var channels = (messages.length>2?messages[2]:'') + , list = channels.split(','); + + return function() { + var channel = list.shift()||''; + return [ + (CHANNELS[channel]||{}) + .callback||SUB_CALLBACK, + (channel||SUB_CHANNEL) + .split(PRESENCE_SUFFIX)[0] + ]; + }; + })(); + + each( messages[0], function(msg) { + var next = next_callback(); + if (!CHANNELS[next[1]].subscribed) return; + next[0]( msg, messages, next[1] ); + } ); + + timeout( _connect, windowing ); + } + }); + } + + CONNECT = function() { + // Close Previous Subscribe Connection + _reset_offline(); + + // Begin Recursive Subscribe + clearTimeout(SUB_BUFF_WAIT); + SUB_BUFF_WAIT = timeout( _connect, 100 ); + }; + + // Reduce Status Flicker + if (!READY) return READY_BUFFER.push(CONNECT); + + // Connect Now + CONNECT(); + }, + + 'here_now' : function( args, callback ) { + var callback = args['callback'] || callback + , err = args['error'] || function(){} + , channel = args['channel'] + , jsonp = jsonp_cb() + , data = null; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } + + xdr({ + callback : jsonp, + data : data, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, + 'channel', encode(channel) + ] + }); + }, + + // Expose PUBNUB Functions + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater + }; + + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); + } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, MAGIC = /\$?{([\w\-]+)}/g +, PNSDK = 'PubNub-JS-' + 'Titanium' + '/' + '3.4.4' +, ANDROID = Ti.Platform.name.toLowerCase().indexOf('android') >= 0 +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE OR COOKIE + */ +var db = (function(){ + return { + get : function(key) { + Ti.App.Properties.getString(''+key); + }, + set : function( key, value ) { + Ti.App.Properties.setString( ''+key, ''+value ); + } + }; +})(); + + +/** + * Titanium TCP Sockets + * ==================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_tcp(setup) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + + var body = [] + , data = "" + , rbuffer = Ti.createBuffer({ length : 2048 }) + , wbuffer = Ti.createBuffer({ value : "GET " + url + " HTTP/1.0\n\n"}) + , failed = 0 + , fail = function() { + if (failed) return; + failed = 1; + (setup.fail || function(){})(); + } + , success = setup.success || function(){} + , sock = Ti.Network.Socket.createTCP({ + host : url.split(URLBIT)[2], + port : 80, + mode : Ti.Network.READ_WRITE_MODE, + timeout : XHRTME, + error : fail, + connected : function() { + sock.write(wbuffer); + read(); + } + }); + + function read() { + Ti.Stream.read( sock, rbuffer, function(stream) { + if (+stream.bytesProcessed > -1) { + data = Ti.Codec.decodeString({ + source : rbuffer, + length : +stream.bytesProcessed + }); + + body.push(data); + rbuffer.clear(); + + return timeout( read, 1 ); + } + + try { + data = JSON['parse']( + body.join('').split('\r\n').slice(-1) + ); + } + catch (r) { + return fail(); + } + + sock.close(); + success(data); + } ); + } + + try { sock.connect() } + catch(k) { return fail() } +} + +/** + * Titanium XHR Request + * ============================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_http_client( setup ) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = Ti.Network.createHTTPClient(); + xhr.onerror = function(){ done(1) }; + xhr.onload = finished; + xhr.timeout = XHRTME; + + xhr.open( 'GET', url, true ); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * LOG + * === + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +var log = function(){}; + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = setup['native_tcp_socket'] ? xdr_tcp : xdr_http_client + var SELF = PN_API(setup); + + SELF['init'] = PN; + + + // Return without Testing + if (setup['notest']) return SELF; + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +})(); diff --git a/titanium/examples/mobile/chat-example-app/.project b/titanium/examples/mobile/chat-example-app/.project new file mode 100644 index 000000000..3ea5e6552 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/.project @@ -0,0 +1,23 @@ + + + chat-example-app + + + + + + com.appcelerator.titanium.core.builder + + + + + com.aptana.ide.core.unifiedBuilder + + + + + + com.appcelerator.titanium.mobile.nature + com.aptana.projects.webnature + + diff --git a/titanium/examples/mobile/chat-example-app/CHANGELOG.txt b/titanium/examples/mobile/chat-example-app/CHANGELOG.txt new file mode 100644 index 000000000..de1e09178 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/CHANGELOG.txt @@ -0,0 +1 @@ +Place your change log text here. This file will be incorporated with your app at package time. \ No newline at end of file diff --git a/titanium/examples/mobile/chat-example-app/LICENSE b/titanium/examples/mobile/chat-example-app/LICENSE new file mode 100644 index 000000000..0ec894017 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/LICENSE @@ -0,0 +1,219 @@ +Copyright 2009 Appcelerator, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + (or the full text of the license is below) + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/titanium/examples/mobile/chat-example-app/LICENSE.txt b/titanium/examples/mobile/chat-example-app/LICENSE.txt new file mode 100644 index 000000000..4124b1d32 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/LICENSE.txt @@ -0,0 +1 @@ +Place your license text here. This file will be incorporated with your app at package time. \ No newline at end of file diff --git a/titanium/examples/mobile/chat-example-app/README b/titanium/examples/mobile/chat-example-app/README new file mode 100644 index 000000000..cb993a658 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/README @@ -0,0 +1,18 @@ +Welcome to your Appcelerator Titanium Mobile Project + +This is a blank project. Start by editing your application's app.js to +make your first mobile project using Titanium. + + + +---------------------------------- +Stuff our legal folk make us say: + +Appcelerator, Appcelerator Titanium and associated marks and logos are +trademarks of Appcelerator, Inc. + +Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. + +Titanium is licensed under the Apache Public License (Version 2). Please +see the LICENSE file for the full license. + diff --git a/titanium/examples/mobile/chat-example-app/Resources/KS_nav_ui.png b/titanium/examples/mobile/chat-example-app/Resources/KS_nav_ui.png new file mode 100644 index 000000000..28976c868 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/KS_nav_ui.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/KS_nav_views.png b/titanium/examples/mobile/chat-example-app/Resources/KS_nav_views.png new file mode 100644 index 000000000..885abd900 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/KS_nav_views.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/appicon.png b/titanium/examples/mobile/chat-example-app/Resources/android/appicon.png new file mode 100644 index 000000000..3300a00a9 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/appicon.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/default.png new file mode 100644 index 000000000..718fb3cab Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-land-hdpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-land-hdpi/default.png new file mode 100644 index 000000000..77519596a Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-land-hdpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-land-ldpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-land-ldpi/default.png new file mode 100644 index 000000000..86e7930b6 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-land-ldpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-port-hdpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-port-hdpi/default.png new file mode 100644 index 000000000..3a83cc70e Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-port-hdpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-port-ldpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-port-ldpi/default.png new file mode 100644 index 000000000..2ab10df9a Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-long-port-ldpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-hdpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-hdpi/default.png new file mode 100644 index 000000000..77519596a Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-hdpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-ldpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-ldpi/default.png new file mode 100644 index 000000000..7db10fada Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-ldpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-mdpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-mdpi/default.png new file mode 100644 index 000000000..f1268baae Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-land-mdpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-hdpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-hdpi/default.png new file mode 100644 index 000000000..3a83cc70e Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-hdpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-ldpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-ldpi/default.png new file mode 100644 index 000000000..2c2bebe27 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-ldpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-mdpi/default.png b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-mdpi/default.png new file mode 100644 index 000000000..606024d09 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/android/images/res-notlong-port-mdpi/default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/app.js b/titanium/examples/mobile/chat-example-app/Resources/app.js new file mode 100644 index 000000000..585cf59f2 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/Resources/app.js @@ -0,0 +1,26 @@ +// ------------------------------------------------------------------------- +// INCLUDE PUBNUB CHAT MODULE +// ------------------------------------------------------------------------- +Ti.include('./pubnub-chat.js'); + +// ------------------------------------------------------------------------- +// CREATE PUBNUB CHAT WINDOW +// ------------------------------------------------------------------------- +// +// Returns an Object with Titanium Window Inside +// +var pubnub_chat_window = Ti.App.Chat({ + "chat-room" : "my-random-conversation", + "window" : { + title : 'My Chat Room', + backgroundColor : '#fff' + } +}); + +// ------------------------------------------------------------------------- +// TITANIUM WINDOW OBJECT +// ------------------------------------------------------------------------- +// +// Open Chat Window +// +pubnub_chat_window.chat_window.open(); diff --git a/titanium/examples/mobile/chat-example-app/Resources/iphone/Default-Landscape.png b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default-Landscape.png new file mode 100644 index 000000000..082688aee Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default-Landscape.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/iphone/Default-Portrait.png b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default-Portrait.png new file mode 100644 index 000000000..426e1f0af Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default-Portrait.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/iphone/Default.png b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default.png new file mode 100644 index 000000000..b41d4a906 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/iphone/Default@2x.png b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default@2x.png new file mode 100644 index 000000000..11e4e4d6c Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/iphone/Default@2x.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/iphone/appicon.png b/titanium/examples/mobile/chat-example-app/Resources/iphone/appicon.png new file mode 100644 index 000000000..ac74d2739 Binary files /dev/null and b/titanium/examples/mobile/chat-example-app/Resources/iphone/appicon.png differ diff --git a/titanium/examples/mobile/chat-example-app/Resources/pubnub-chat.js b/titanium/examples/mobile/chat-example-app/Resources/pubnub-chat.js new file mode 100755 index 000000000..b2c1e19a6 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/Resources/pubnub-chat.js @@ -0,0 +1,180 @@ +// ---------------------------------- +// Detect Platform +// ---------------------------------- +var isAndroid = Ti.Platform.osname === 'android'; + +// ---------------------------------- +// INIT PUBNUB +// ---------------------------------- +var pubnub = require('pubnub')({ + publish_key : 'demo', + subscribe_key : 'demo', + ssl : false, + origin : 'pubsub.pubnub.com' +}); + +// ---------------------------------- +// RANDOM COLOR +// ---------------------------------- +function rnd_hex(light) { return Math.ceil(Math.random()*9) } +function rnd_color() { + return '#'+pubnub.map( + Array(3).join().split(','), rnd_hex + ).join(''); +} + +Ti.App.Chat = function(setup) { + // ---------------------------------- + // LISTEN FOR MESSAGES + // ---------------------------------- + pubnub.subscribe({ + channel : setup['chat-room'], + connect : function() { + append_chat_message("Entered Chat..."); + }, + callback : function(message) { + append_chat_message( message.text, message.color ); + }, + error : function() { + append_chat_message( "Lost Connection...", "#f00" ); + } + }); + + // ---------------------------------- + // SEND MESSAGE + // ---------------------------------- + function send_a_message(message) { + if (!message) return; + + pubnub.publish({ + channel : setup['chat-room'], + message : { text : message, color : this.my_color }, + callback : function(info) { + if (!info[0]) setTimeout(function() { + send_a_message(message) + }, 2000 ); + } + }); + } + + + // ---------------------------------- + // CREATE BASE UI TAB AND ROOT WINDOW + // ---------------------------------- + var chat_window = Ti.UI.createWindow(setup['window']); + var textfield = Ti.UI.createTextField({ + width : (isAndroid) ? '75%' : 247, + height : (isAndroid) ? '50dp' : 30, + left : 4, + top : 4, + color : "#111", + value : "", + border : 1, + borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, + borderRadius : 4, + font : { + fontSize : (isAndroid) ? '18dp' : 14, + fontWeight : 'bold' + } + }); + + // Text Chat History + var table = Ti.UI.createTableView({ + separatorColor : (isAndroid) ? '#000' : '#fff', + top : (isAndroid) ? '60dp' : 40, + height : '80%' + }); + + // Send Button + var button = Ti.UI.createButton({ + title : 'Send', + top : 4, + right : 4, + width : (isAndroid) ? '60dp' : 60, + height : (isAndroid) ? '50dp' : 30, + borderRadius : 6, + shadowColor : "#001", + shadowOffset : { x : 1, y : 1 }, + style : Ti.UI.iPhone.SystemButtonStyle.PLAIN, + font : { + fontSize : (isAndroid) ? '18dp' : 16, + fontWeight : 'bold' + }, + backgroundGradient : { + type : 'linear', + colors : [ '#058cf5', '#015fe6' ], + startPoint : { x : 0, y : 0 }, + endPoint : { x : 2, y : 50 }, + backFillStart : false + } + }); + + // Append First Row (Blank) + table.appendRow(Ti.UI.createTableViewRow({ + className : "pubnub_chat" + })); + + // Append New Chat Message + function append_chat_message( message, color ) { + var row = Ti.UI.createTableViewRow({ + className : "pubnub_chat", + backgroundGradient : { + type : 'linear', + colors : [ "#fff", '#eeeeed' ], + startPoint : { x : 0, y : 0 }, + endPoint : { x : 0, y : 70 }, + backFillStart : false + } + }); + + var label = Ti.UI.createLabel({ + text : message || "no-message", + height : (isAndroid) ? '50dp' : 'auto', + width : 'auto', + color : color || "#111", + left : 10, + font : { + fontSize : (isAndroid) ? '19dp' : 14, + fontWeight: (isAndroid) ? 'bold' : 'normal' + } + }); + + row.add(label); + table.insertRowBefore( 0, row ); + } + + // Listen for Send Button Touch + button.addEventListener( 'touchstart', function(e) { + send_a_message(textfield.value); + textfield.value = ""; + textfield.focus(); + }); + + // Listen for Return Key Press + textfield.addEventListener( 'return', function(e) { + send_a_message(textfield.value); + textfield.value = ""; + textfield.focus(); + }); + + // Listen for Return Key Press + chat_window.addEventListener( 'open', function(e) { + textfield.focus(); + }); + + chat_window.add(table); + chat_window.add(button); + chat_window.add(textfield); + + this.chat_window = chat_window; + this.my_color = rnd_color(); + this.pubnub = pubnub; + + append_chat_message(" "); + append_chat_message(" "); + append_chat_message(" "); + append_chat_message("Connecting..."); + + return this; +}; + diff --git a/titanium/examples/mobile/chat-example-app/Resources/pubnub.js b/titanium/examples/mobile/chat-example-app/Resources/pubnub.js new file mode 100644 index 000000000..3967a2360 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/Resources/pubnub.js @@ -0,0 +1,982 @@ +// 3.4.4 +(function(){ +var NOW = 1 +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; + +/** + * UTILITIES + */ +function unique() { return'x'+ ++NOW+''+(+new Date) } +function rnow() { return+new Date } + +/** + * NEXTORIGIN + * ========== + * var next_origin = nextorigin(); + */ +var nextorigin = (function() { + var max = 20 + , ori = Math.floor(Math.random() * max); + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 + && origin.replace( + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; + } +})(); + + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + +/** + * UPDATER + * ======= + * var timestamp = unique(); + */ +function updater( fun, rate ) { + var timeout + , last = 0 + , runnit = function() { + if (last + rate > rnow()) { + clearTimeout(timeout); + timeout = setTimeout( runnit, rate ); + } + else { + last = rnow(); + fun(); + } + }; + + return runnit; +} + +/** + * GREP + * ==== + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +function grep( list, fun ) { + var fin = []; + each( list || [], function(l) { fun(l) && fin.push(l) } ); + return fin +} + +/** + * SUPPLANT + * ======== + * var text = supplant( 'Hello {name}!', { name : 'John' } ) + */ +function supplant( str, values ) { + return str.replace( REPL, function( _, match ) { + return values[match] || _ + } ); +} + +/** + * timeout + * ======= + * timeout( function(){}, 100 ); + */ +function timeout( fun, wait ) { + return setTimeout( fun, wait ); +} + +/** + * uuid + * ==== + * var my_uuid = uuid(); + */ +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; +} + +/** + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} + +/** + * ENCODE + * ====== + * var encoded_path = encode('path'); + */ +function encode(path) { + return map( (encodeURIComponent(path)).split(''), function(chr) { + return "-_.!~*'()".indexOf(chr) < 0 ? chr : + "%"+chr.charCodeAt(0).toString(16).toUpperCase() + } ).join(''); +} + +/** + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); + */ +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} + +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } + +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, + /* + PUBNUB.history({ + channel : 'my_chat_channel', + limit : 100, + callback : function(history) { } + }); + */ + 'history' : function( args, callback ) { + var callback = args['callback'] || callback + , count = args['count'] || args['limit'] || 100 + , reverse = args['reverse'] || "false" + , err = args['error'] || function(){} + , channel = args['channel'] + , start = args['start'] + , end = args['end'] + , params = {} + , jsonp = jsonp_cb(); + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + params['stringtoken'] = 'true'; + params['count'] = count; + params['reverse'] = reverse; + + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; + + // Send Message + xdr({ + callback : jsonp, + data : params, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'history', 'sub-key', + SUBSCRIBE_KEY, 'channel', encode(channel) + ] + }); + }, + + /* + PUBNUB.replay({ + source : 'my_channel', + destination : 'new_channel' + }); + */ + 'replay' : function(args) { + var callback = callback || args['callback'] || function(){} + , source = args['source'] + , destination = args['destination'] + , stop = args['stop'] + , start = args['start'] + , end = args['end'] + , reverse = args['reverse'] + , limit = args['limit'] + , jsonp = jsonp_cb() + , data = {} + , url; + + // Check User Input + if (!source) return error('Missing Source Channel'); + if (!destination) return error('Missing Destination Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup URL Params + if (jsonp != '0') data['callback'] = jsonp; + if (stop) data['stop'] = 'all'; + if (reverse) data['reverse'] = 'true'; + if (start) data['start'] = start; + if (end) data['end'] = end; + if (limit) data['count'] = limit; + + // Compose URL Parts + url = [ + STD_ORIGIN, 'v1', 'replay', + PUBLISH_KEY, SUBSCRIBE_KEY, + source, destination + ]; + + // Start (or Stop) Replay! + xdr({ + callback : jsonp, + success : function(response) { callback(response) }, + fail : function() { callback([ 0, 'Disconnected' ]) }, + url : url, + data : data + }); + }, + + /* + PUBNUB.time(function(time){ }); + */ + 'time' : function(callback) { + var jsonp = jsonp_cb(); + xdr({ + callback : jsonp, + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], + success : function(response) { callback(response[0]) }, + fail : function() { callback(0) } + }); + }, + + /* + PUBNUB.publish({ + channel : 'my_chat_channel', + message : 'hello!' + }); + */ + 'publish' : function( args, callback ) { + var callback = callback || args['callback'] || function(){} + , msg = args['message'] + , channel = args['channel'] + , jsonp = jsonp_cb() + , url; + + if (!msg) return error('Missing Message'); + if (!channel) return error('Missing Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // If trying to send Object + msg = JSON['stringify'](msg); + + // Create URL + url = [ + STD_ORIGIN, 'publish', + PUBLISH_KEY, SUBSCRIBE_KEY, + 0, encode(channel), + jsonp, encode(msg) + ]; + + // Queue Message Send + PUB_QUEUE.push({ + callback : jsonp, + timeout : SECOND*5, + url : url, + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} + }); + + // Send Message + publish(); + }, + + /* + PUBNUB.unsubscribe({ channel : 'my_chat' }); + */ + 'unsubscribe' : function(args) { + var channel = args['channel']; + + TIMETOKEN = 0; + SUB_RESTORE = 1; + + // Prepare Channel(s) + channel = map( ( + channel.join ? channel.join(',') : ''+channel + ).split(','), function(channel) { + return channel + ',' + channel + PRESENCE_SUFFIX; + } ).join(','); + + // Iterate over Channels + each( channel.split(','), function(channel) { + if (READY) SELF['LEAVE']( channel, 0 ); + CHANNELS[channel] = 0; + } ); + + // ReOpen Connection if Any Channels Left + if (READY) CONNECT(); + }, + + /* + PUBNUB.subscribe({ + channel : 'my_chat' + callback : function(message) { } + }); + */ + 'subscribe' : function( args, callback ) { + var channel = args['channel'] + , callback = callback || args['callback'] + , callback = callback || args['message'] + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['disconnect'] || function(){} + , presence = args['presence'] || 0 + , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 + , sub_timeout = args['timeout'] || SUB_TIMEOUT + , windowing = args['windowing'] || SUB_WINDOWING + , restore = args['restore']; + + // Restore Enabled? + if (restore) SUB_RESTORE = 1; + + TIMETOKEN = 0; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup Channel(s) + each( (channel.join ? channel.join(',') : ''+channel).split(','), + function(channel) { + var settings = CHANNELS[channel] || {}; + + // Store Channel State + CHANNELS[SUB_CHANNEL = channel] = { + name : channel, + connected : settings.connected, + disconnected : settings.disconnected, + subscribed : 1, + callback : SUB_CALLBACK = callback, + connect : connect, + disconnect : disconnect, + reconnect : reconnect + }; + + // Presence Enabled? + if (!presence) return; + + // Subscribe Presence Channel + SELF['subscribe']({ + 'channel' : channel + PRESENCE_SUFFIX, + 'callback' : presence + }); + + // Presence Subscribed? + if (settings.subscribed) return; + + // See Who's Here Now? + if (noheresync) return; + SELF['here_now']({ + 'channel' : channel, + 'callback' : function(here) { + each( 'uuids' in here ? here['uuids'] : [], + function(uid) { presence( { + 'action' : 'join', + 'uuid' : uid, + 'timestamp' : rnow(), + 'occupancy' : here['occupancy'] || 1 + }, here, channel ); } ); + } + }); + } ); + + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + + // Evented Subscribe + function _connect() { + var jsonp = jsonp_cb() + , channels = generate_channel_list(CHANNELS).join(','); + + // Stop Connection + if (!channels) return; + + // Connect to PubNub Subscribe Servers + SUB_RECEIVER = xdr({ + timeout : sub_timeout, + callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, + data : { 'uuid' : UUID }, + url : [ + SUB_ORIGIN, 'subscribe', + SUBSCRIBE_KEY, encode(channels), + jsonp, TIMETOKEN + ], + success : function(messages) { + if (!messages) return timeout( _connect, windowing ); + + // Connect + each_channel(function(channel){ + if (channel.connected) return; + channel.connected = 1; + channel.connect(channel.name); + }); + + // Restore Previous Connection Point if Needed + TIMETOKEN = !TIMETOKEN && + SUB_RESTORE && + db['get'](SUBSCRIBE_KEY) || messages[1]; + + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + + // Update Saved Timetoken + db['set']( SUBSCRIBE_KEY, messages[1] ); + + // Route Channel <---> Callback for Message + var next_callback = (function() { + var channels = (messages.length>2?messages[2]:'') + , list = channels.split(','); + + return function() { + var channel = list.shift()||''; + return [ + (CHANNELS[channel]||{}) + .callback||SUB_CALLBACK, + (channel||SUB_CHANNEL) + .split(PRESENCE_SUFFIX)[0] + ]; + }; + })(); + + each( messages[0], function(msg) { + var next = next_callback(); + if (!CHANNELS[next[1]].subscribed) return; + next[0]( msg, messages, next[1] ); + } ); + + timeout( _connect, windowing ); + } + }); + } + + CONNECT = function() { + // Close Previous Subscribe Connection + _reset_offline(); + + // Begin Recursive Subscribe + clearTimeout(SUB_BUFF_WAIT); + SUB_BUFF_WAIT = timeout( _connect, 100 ); + }; + + // Reduce Status Flicker + if (!READY) return READY_BUFFER.push(CONNECT); + + // Connect Now + CONNECT(); + }, + + 'here_now' : function( args, callback ) { + var callback = args['callback'] || callback + , err = args['error'] || function(){} + , channel = args['channel'] + , jsonp = jsonp_cb() + , data = null; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } + + xdr({ + callback : jsonp, + data : data, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, + 'channel', encode(channel) + ] + }); + }, + + // Expose PUBNUB Functions + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater + }; + + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); + } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, MAGIC = /\$?{([\w\-]+)}/g +, PNSDK = 'PubNub-JS-' + 'Titanium' + '/' + '3.4.4' +, ANDROID = Ti.Platform.name.toLowerCase().indexOf('android') >= 0 +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE OR COOKIE + */ +var db = (function(){ + return { + get : function(key) { + Ti.App.Properties.getString(''+key); + }, + set : function( key, value ) { + Ti.App.Properties.setString( ''+key, ''+value ); + } + }; +})(); + + +/** + * Titanium TCP Sockets + * ==================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_tcp(setup) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + + var body = [] + , data = "" + , rbuffer = Ti.createBuffer({ length : 2048 }) + , wbuffer = Ti.createBuffer({ value : "GET " + url + " HTTP/1.0\n\n"}) + , failed = 0 + , fail = function() { + if (failed) return; + failed = 1; + (setup.fail || function(){})(); + } + , success = setup.success || function(){} + , sock = Ti.Network.Socket.createTCP({ + host : url.split(URLBIT)[2], + port : 80, + mode : Ti.Network.READ_WRITE_MODE, + timeout : XHRTME, + error : fail, + connected : function() { + sock.write(wbuffer); + read(); + } + }); + + function read() { + Ti.Stream.read( sock, rbuffer, function(stream) { + if (+stream.bytesProcessed > -1) { + data = Ti.Codec.decodeString({ + source : rbuffer, + length : +stream.bytesProcessed + }); + + body.push(data); + rbuffer.clear(); + + return timeout( read, 1 ); + } + + try { + data = JSON['parse']( + body.join('').split('\r\n').slice(-1) + ); + } + catch (r) { + return fail(); + } + + sock.close(); + success(data); + } ); + } + + try { sock.connect() } + catch(k) { return fail() } +} + +/** + * Titanium XHR Request + * ============================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_http_client( setup ) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = Ti.Network.createHTTPClient(); + xhr.onerror = function(){ done(1) }; + xhr.onload = finished; + xhr.timeout = XHRTME; + + xhr.open( 'GET', url, true ); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * LOG + * === + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +var log = function(){}; + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = setup['native_tcp_socket'] ? xdr_tcp : xdr_http_client + var SELF = PN_API(setup); + + SELF['init'] = PN; + + + // Return without Testing + if (setup['notest']) return SELF; + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +})(); diff --git a/titanium/examples/mobile/chat-example-app/manifest b/titanium/examples/mobile/chat-example-app/manifest new file mode 100644 index 000000000..7568ab0e6 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/manifest @@ -0,0 +1,8 @@ +#appname:Andriod Fix +#publisher:stephen +#url:http://www.pubnub.com/ +#image:appicon.png +#appid:com.pubnub.android +#desc:not specified +#type:ipad +#guid:42667a7c-de7a-4f61-834c-3f0fab1da412 diff --git a/titanium/examples/mobile/chat-example-app/tiapp.xml b/titanium/examples/mobile/chat-example-app/tiapp.xml new file mode 100644 index 000000000..a4d88a012 --- /dev/null +++ b/titanium/examples/mobile/chat-example-app/tiapp.xml @@ -0,0 +1,41 @@ + + + 2.1.3.GA + 327680 + + false + true + true + true + false + + com.pubnub.android + Andriod Fix + 1.0 + stephen + http://www.pubnub.com/ + not specified + 2013 by stephen + appicon.png + false + false + default + false + false + false + true + 42667a7c-de7a-4f61-834c-3f0fab1da412 + + + Ti.UI.PORTRAIT + + + Ti.UI.PORTRAIT + Ti.UI.UPSIDE_PORTRAIT + Ti.UI.LANDSCAPE_LEFT + Ti.UI.LANDSCAPE_RIGHT + + + + + diff --git a/titanium/examples/mobile/detailed-history-example-app/.project b/titanium/examples/mobile/detailed-history-example-app/.project new file mode 100644 index 000000000..0c518198a --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/.project @@ -0,0 +1,17 @@ + + + history-example-app + + + + + + com.appcelerator.titanium.core.builder + + + + + + com.appcelerator.titanium.mobile.nature + + diff --git a/titanium/examples/mobile/detailed-history-example-app/CHANGELOG.txt b/titanium/examples/mobile/detailed-history-example-app/CHANGELOG.txt new file mode 100644 index 000000000..de1e09178 --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/CHANGELOG.txt @@ -0,0 +1 @@ +Place your change log text here. This file will be incorporated with your app at package time. \ No newline at end of file diff --git a/titanium/examples/mobile/detailed-history-example-app/LICENSE b/titanium/examples/mobile/detailed-history-example-app/LICENSE new file mode 100644 index 000000000..0ec894017 --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/LICENSE @@ -0,0 +1,219 @@ +Copyright 2009 Appcelerator, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + (or the full text of the license is below) + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/titanium/examples/mobile/detailed-history-example-app/LICENSE.txt b/titanium/examples/mobile/detailed-history-example-app/LICENSE.txt new file mode 100644 index 000000000..4124b1d32 --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/LICENSE.txt @@ -0,0 +1 @@ +Place your license text here. This file will be incorporated with your app at package time. \ No newline at end of file diff --git a/titanium/examples/mobile/detailed-history-example-app/README b/titanium/examples/mobile/detailed-history-example-app/README new file mode 100644 index 000000000..cb993a658 --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/README @@ -0,0 +1,18 @@ +Welcome to your Appcelerator Titanium Mobile Project + +This is a blank project. Start by editing your application's app.js to +make your first mobile project using Titanium. + + + +---------------------------------- +Stuff our legal folk make us say: + +Appcelerator, Appcelerator Titanium and associated marks and logos are +trademarks of Appcelerator, Inc. + +Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. + +Titanium is licensed under the Apache Public License (Version 2). Please +see the LICENSE file for the full license. + diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/KS_nav_ui.png b/titanium/examples/mobile/detailed-history-example-app/Resources/KS_nav_ui.png new file mode 100644 index 000000000..28976c868 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/KS_nav_ui.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/KS_nav_views.png b/titanium/examples/mobile/detailed-history-example-app/Resources/KS_nav_views.png new file mode 100644 index 000000000..885abd900 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/KS_nav_views.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/appicon.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/appicon.png new file mode 100644 index 000000000..3300a00a9 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/appicon.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/default.png new file mode 100644 index 000000000..718fb3cab Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-land-hdpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-land-hdpi/default.png new file mode 100644 index 000000000..77519596a Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-land-hdpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-land-ldpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-land-ldpi/default.png new file mode 100644 index 000000000..86e7930b6 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-land-ldpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-port-hdpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-port-hdpi/default.png new file mode 100644 index 000000000..3a83cc70e Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-port-hdpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-port-ldpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-port-ldpi/default.png new file mode 100644 index 000000000..2ab10df9a Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-long-port-ldpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-hdpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-hdpi/default.png new file mode 100644 index 000000000..77519596a Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-hdpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-ldpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-ldpi/default.png new file mode 100644 index 000000000..7db10fada Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-ldpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-mdpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-mdpi/default.png new file mode 100644 index 000000000..f1268baae Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-land-mdpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-hdpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-hdpi/default.png new file mode 100644 index 000000000..3a83cc70e Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-hdpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-ldpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-ldpi/default.png new file mode 100644 index 000000000..2c2bebe27 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-ldpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-mdpi/default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-mdpi/default.png new file mode 100644 index 000000000..606024d09 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/android/images/res-notlong-port-mdpi/default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/app.js b/titanium/examples/mobile/detailed-history-example-app/Resources/app.js new file mode 100644 index 000000000..7d81d0e0f --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/Resources/app.js @@ -0,0 +1,26 @@ +// ------------------------------------------------------------------------- +// INCLUDE PUBNUB DETAILED HISTORY MODULE +// ------------------------------------------------------------------------- +Ti.include('./pubnub-detailed-history.js'); + +// ------------------------------------------------------------------------- +// CREATE PUBNUB DATA WINDOW +// ------------------------------------------------------------------------- +// +// Returns an Object with Titanium Window Inside +// +var pubnub_data_window = Ti.App.DetailedHistory({ + "channel" : "hello_world", + "window" : { + title : 'Data', + backgroundColor : '#fff' + } +}); + +// ------------------------------------------------------------------------- +// TITANIUM WINDOW OBJECT +// ------------------------------------------------------------------------- +// +// Open Chat Window +// +pubnub_data_window.data_window.open(); diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default-Landscape.png b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default-Landscape.png new file mode 100644 index 000000000..082688aee Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default-Landscape.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default-Portrait.png b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default-Portrait.png new file mode 100644 index 000000000..426e1f0af Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default-Portrait.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default.png b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default.png new file mode 100644 index 000000000..b41d4a906 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default@2x.png b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default@2x.png new file mode 100644 index 000000000..11e4e4d6c Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/Default@2x.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/appicon.png b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/appicon.png new file mode 100644 index 000000000..ac74d2739 Binary files /dev/null and b/titanium/examples/mobile/detailed-history-example-app/Resources/iphone/appicon.png differ diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/pubnub-detailed-history.js b/titanium/examples/mobile/detailed-history-example-app/Resources/pubnub-detailed-history.js new file mode 100755 index 000000000..3cf28afc5 --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/Resources/pubnub-detailed-history.js @@ -0,0 +1,240 @@ +// ---------------------------------- +// Detect Platform +// ---------------------------------- +var isAndroid = Ti.Platform.osname === 'android'; + +// ---------------------------------- +// INIT PUBNUB +// ---------------------------------- +var pubnub = require('pubnub')({ + publish_key : 'demo', + subscribe_key : 'demo', + ssl : false, + origin : 'pubsub.pubnub.com' +}); + +// ---------------------------------- +// RANDOM COLOR +// ---------------------------------- +function rnd_hex(light) { return Math.ceil(Math.random()*9) } +function rnd_color() { + return '#'+pubnub.map( + Array(3).join().split(','), rnd_hex + ).join(''); +} + +Ti.App.DetailedHistory = function(setup) { + + // ---------------------------------- + // CREATE BASE UI TAB AND ROOT WINDOW + // ---------------------------------- + var data_window = Ti.UI.createWindow(setup['window']); + + + function append_data( message, color ) { + var row = Ti.UI.createTableViewRow({ + className : "pubnub_data", + backgroundGradient : { + type : 'linear', + colors : [ "#fff", '#eeeeed' ], + startPoint : { x : 0, y : 0 }, + endPoint : { x : 0, y : 70 }, + backFillStart : false + } + }); + + var label = Ti.UI.createLabel({ + text : message || "no-message", + height : (isAndroid) ? '50dp' : 'auto', + width : 'auto', + color : color || "#111", + left : 10, + font : { + fontSize : (isAndroid) ? '19dp' : 14, + fontWeight: (isAndroid) ? 'bold' : 'normal' + } + }); + + row.add(label); + table.insertRowBefore( 0, row ); + } + + // Detailed history reverse false Button + var detailed_history_button = Ti.UI.createButton({ + title : 'Get Detailed History', + top : 4, + right : 80, + width : (isAndroid) ? '180dp' : 180, + height : (isAndroid) ? '50dp' : 30, + borderRadius : 6, + shadowColor : "#001", + shadowOffset : { x : 1, y : 1 }, + style : Ti.UI.iPhone.SystemButtonStyle.PLAIN, + font : { + fontSize : (isAndroid) ? '18dp' : 16, + fontWeight : 'bold' + }, + backgroundGradient : { + type : 'linear', + colors : [ '#058cf5', '#015fe6' ], + startPoint : { x : 0, y : 0 }, + endPoint : { x : 2, y : 50 }, + backFillStart : false + } + }); + // Detailed history reverse true Button + var detailed_history_reverse_button = Ti.UI.createButton({ + title : 'Get Detailed History Reverse', + top : 40, + right : 60, + width : (isAndroid) ? '230dp' : 230, + height : (isAndroid) ? '50dp' : 30, + borderRadius : 6, + shadowColor : "#001", + shadowOffset : { x : 1, y : 1 }, + style : Ti.UI.iPhone.SystemButtonStyle.PLAIN, + font : { + fontSize : (isAndroid) ? '18dp' : 16, + fontWeight : 'bold' + }, + backgroundGradient : { + type : 'linear', + colors : [ '#058cf5', '#015fe6' ], + startPoint : { x : 0, y : 0 }, + endPoint : { x : 2, y : 50 }, + backFillStart : false + } + }); + var channel = Ti.UI.createTextField({ + width : (isAndroid) ? '75%' : 247, + height : (isAndroid) ? '50dp' : 30, + left : 4, + top : 80, + color : "#111", + clearOnEdit : true, + value : setup['channel'], + border : 1, + borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, + borderRadius : 4, + font : { + fontSize : (isAndroid) ? '18dp' : 14, + fontWeight : 'bold' + } + }); + var count = Ti.UI.createTextField({ + width : (isAndroid) ? '75%' : 247, + height : (isAndroid) ? '50dp' : 30, + left : 4, + top : 120, + color : "#111", + clearOnEdit : true, + value : "Count", + border : 1, + borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, + borderRadius : 4, + font : { + fontSize : (isAndroid) ? '18dp' : 14, + fontWeight : 'bold' + } + }); + var start = Ti.UI.createTextField({ + width : (isAndroid) ? '75%' : 247, + height : (isAndroid) ? '50dp' : 30, + left : 4, + clearOnEdit : true, + top : 160, + color : "#111", + value : "Start Timestamp", + border : 1, + borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, + borderRadius : 4, + font : { + fontSize : (isAndroid) ? '18dp' : 14, + fontWeight : 'bold' + } + }); + var end = Ti.UI.createTextField({ + width : (isAndroid) ? '75%' : 247, + height : (isAndroid) ? '50dp' : 30, + left : 4, + top : 200, + clearOnEdit : true, + color : "#111", + value : "End Timestamp", + border : 1, + borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, + borderRadius : 4, + font : { + fontSize : (isAndroid) ? '18dp' : 14, + fontWeight : 'bold' + } + }); + var table = Ti.UI.createTableView({ + separatorColor : (isAndroid) ? '#000' : '#fff', + top : (isAndroid) ? '240dp' : 240, + height : '50%' + }); + + // Append First Row (Blank) + table.appendRow(Ti.UI.createTableViewRow({ + className : "pubnub_data" + })); + + // detailed history button Touch + detailed_history_button.addEventListener( 'touchstart', function(e) { + var paramobj = {}; + paramobj['channel'] = channel.value; + paramobj['callback'] = function(message) { + append_data( JSON.stringify(message), message.color ); + } + paramobj.error = function() { + append_data("Lost connection ... ","#f00"); + } + if (start.value != "Start Timestamp" && start.value != "") + paramobj['start'] = start.value; + if (end.value != "End Timestamp" && end.value != "") + paramobj['end'] = end.value; + if (count.value != "Count" && count.value != "") + paramobj['count'] = count.value; + else + paramobj['count'] = 100; + pubnub.history(paramobj); + }); + + // detailed history button reverse Touch + detailed_history_reverse_button.addEventListener( 'touchstart', function(e) { + var paramobj = {}; + paramobj['channel'] = channel.value; + paramobj['callback'] = function(message) { + append_data( JSON.stringify(message), message.color ); + } + paramobj.error = function() { + append_data("Lost connection ... ","#f00"); + } + if (start.value != "Start Timestamp" && start.value != "") + paramobj['start'] = start.value; + if (end.value != "End Timestamp" && end.value != "") + paramobj['end'] = end.value; + if (count.value != "Count" && count.value != "") + paramobj['count'] = count.value; + else + paramobj['count'] = 100; + paramobj["reverse"] = "true"; + pubnub.history(paramobj); + }); + + data_window.add(channel); + data_window.add(count); + data_window.add(start); + data_window.add(end); + data_window.add(detailed_history_button); + data_window.add(detailed_history_reverse_button); + data_window.add(table); + + this.data_window = data_window; + this.my_color = rnd_color(); + this.pubnub = pubnub; + + return this; +}; + diff --git a/titanium/examples/mobile/detailed-history-example-app/Resources/pubnub.js b/titanium/examples/mobile/detailed-history-example-app/Resources/pubnub.js new file mode 100644 index 000000000..3967a2360 --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/Resources/pubnub.js @@ -0,0 +1,982 @@ +// 3.4.4 +(function(){ +var NOW = 1 +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; + +/** + * UTILITIES + */ +function unique() { return'x'+ ++NOW+''+(+new Date) } +function rnow() { return+new Date } + +/** + * NEXTORIGIN + * ========== + * var next_origin = nextorigin(); + */ +var nextorigin = (function() { + var max = 20 + , ori = Math.floor(Math.random() * max); + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 + && origin.replace( + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; + } +})(); + + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + +/** + * UPDATER + * ======= + * var timestamp = unique(); + */ +function updater( fun, rate ) { + var timeout + , last = 0 + , runnit = function() { + if (last + rate > rnow()) { + clearTimeout(timeout); + timeout = setTimeout( runnit, rate ); + } + else { + last = rnow(); + fun(); + } + }; + + return runnit; +} + +/** + * GREP + * ==== + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +function grep( list, fun ) { + var fin = []; + each( list || [], function(l) { fun(l) && fin.push(l) } ); + return fin +} + +/** + * SUPPLANT + * ======== + * var text = supplant( 'Hello {name}!', { name : 'John' } ) + */ +function supplant( str, values ) { + return str.replace( REPL, function( _, match ) { + return values[match] || _ + } ); +} + +/** + * timeout + * ======= + * timeout( function(){}, 100 ); + */ +function timeout( fun, wait ) { + return setTimeout( fun, wait ); +} + +/** + * uuid + * ==== + * var my_uuid = uuid(); + */ +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; +} + +/** + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} + +/** + * ENCODE + * ====== + * var encoded_path = encode('path'); + */ +function encode(path) { + return map( (encodeURIComponent(path)).split(''), function(chr) { + return "-_.!~*'()".indexOf(chr) < 0 ? chr : + "%"+chr.charCodeAt(0).toString(16).toUpperCase() + } ).join(''); +} + +/** + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); + */ +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} + +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } + +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, + /* + PUBNUB.history({ + channel : 'my_chat_channel', + limit : 100, + callback : function(history) { } + }); + */ + 'history' : function( args, callback ) { + var callback = args['callback'] || callback + , count = args['count'] || args['limit'] || 100 + , reverse = args['reverse'] || "false" + , err = args['error'] || function(){} + , channel = args['channel'] + , start = args['start'] + , end = args['end'] + , params = {} + , jsonp = jsonp_cb(); + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + params['stringtoken'] = 'true'; + params['count'] = count; + params['reverse'] = reverse; + + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; + + // Send Message + xdr({ + callback : jsonp, + data : params, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'history', 'sub-key', + SUBSCRIBE_KEY, 'channel', encode(channel) + ] + }); + }, + + /* + PUBNUB.replay({ + source : 'my_channel', + destination : 'new_channel' + }); + */ + 'replay' : function(args) { + var callback = callback || args['callback'] || function(){} + , source = args['source'] + , destination = args['destination'] + , stop = args['stop'] + , start = args['start'] + , end = args['end'] + , reverse = args['reverse'] + , limit = args['limit'] + , jsonp = jsonp_cb() + , data = {} + , url; + + // Check User Input + if (!source) return error('Missing Source Channel'); + if (!destination) return error('Missing Destination Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup URL Params + if (jsonp != '0') data['callback'] = jsonp; + if (stop) data['stop'] = 'all'; + if (reverse) data['reverse'] = 'true'; + if (start) data['start'] = start; + if (end) data['end'] = end; + if (limit) data['count'] = limit; + + // Compose URL Parts + url = [ + STD_ORIGIN, 'v1', 'replay', + PUBLISH_KEY, SUBSCRIBE_KEY, + source, destination + ]; + + // Start (or Stop) Replay! + xdr({ + callback : jsonp, + success : function(response) { callback(response) }, + fail : function() { callback([ 0, 'Disconnected' ]) }, + url : url, + data : data + }); + }, + + /* + PUBNUB.time(function(time){ }); + */ + 'time' : function(callback) { + var jsonp = jsonp_cb(); + xdr({ + callback : jsonp, + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], + success : function(response) { callback(response[0]) }, + fail : function() { callback(0) } + }); + }, + + /* + PUBNUB.publish({ + channel : 'my_chat_channel', + message : 'hello!' + }); + */ + 'publish' : function( args, callback ) { + var callback = callback || args['callback'] || function(){} + , msg = args['message'] + , channel = args['channel'] + , jsonp = jsonp_cb() + , url; + + if (!msg) return error('Missing Message'); + if (!channel) return error('Missing Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // If trying to send Object + msg = JSON['stringify'](msg); + + // Create URL + url = [ + STD_ORIGIN, 'publish', + PUBLISH_KEY, SUBSCRIBE_KEY, + 0, encode(channel), + jsonp, encode(msg) + ]; + + // Queue Message Send + PUB_QUEUE.push({ + callback : jsonp, + timeout : SECOND*5, + url : url, + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} + }); + + // Send Message + publish(); + }, + + /* + PUBNUB.unsubscribe({ channel : 'my_chat' }); + */ + 'unsubscribe' : function(args) { + var channel = args['channel']; + + TIMETOKEN = 0; + SUB_RESTORE = 1; + + // Prepare Channel(s) + channel = map( ( + channel.join ? channel.join(',') : ''+channel + ).split(','), function(channel) { + return channel + ',' + channel + PRESENCE_SUFFIX; + } ).join(','); + + // Iterate over Channels + each( channel.split(','), function(channel) { + if (READY) SELF['LEAVE']( channel, 0 ); + CHANNELS[channel] = 0; + } ); + + // ReOpen Connection if Any Channels Left + if (READY) CONNECT(); + }, + + /* + PUBNUB.subscribe({ + channel : 'my_chat' + callback : function(message) { } + }); + */ + 'subscribe' : function( args, callback ) { + var channel = args['channel'] + , callback = callback || args['callback'] + , callback = callback || args['message'] + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['disconnect'] || function(){} + , presence = args['presence'] || 0 + , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 + , sub_timeout = args['timeout'] || SUB_TIMEOUT + , windowing = args['windowing'] || SUB_WINDOWING + , restore = args['restore']; + + // Restore Enabled? + if (restore) SUB_RESTORE = 1; + + TIMETOKEN = 0; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup Channel(s) + each( (channel.join ? channel.join(',') : ''+channel).split(','), + function(channel) { + var settings = CHANNELS[channel] || {}; + + // Store Channel State + CHANNELS[SUB_CHANNEL = channel] = { + name : channel, + connected : settings.connected, + disconnected : settings.disconnected, + subscribed : 1, + callback : SUB_CALLBACK = callback, + connect : connect, + disconnect : disconnect, + reconnect : reconnect + }; + + // Presence Enabled? + if (!presence) return; + + // Subscribe Presence Channel + SELF['subscribe']({ + 'channel' : channel + PRESENCE_SUFFIX, + 'callback' : presence + }); + + // Presence Subscribed? + if (settings.subscribed) return; + + // See Who's Here Now? + if (noheresync) return; + SELF['here_now']({ + 'channel' : channel, + 'callback' : function(here) { + each( 'uuids' in here ? here['uuids'] : [], + function(uid) { presence( { + 'action' : 'join', + 'uuid' : uid, + 'timestamp' : rnow(), + 'occupancy' : here['occupancy'] || 1 + }, here, channel ); } ); + } + }); + } ); + + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + + // Evented Subscribe + function _connect() { + var jsonp = jsonp_cb() + , channels = generate_channel_list(CHANNELS).join(','); + + // Stop Connection + if (!channels) return; + + // Connect to PubNub Subscribe Servers + SUB_RECEIVER = xdr({ + timeout : sub_timeout, + callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, + data : { 'uuid' : UUID }, + url : [ + SUB_ORIGIN, 'subscribe', + SUBSCRIBE_KEY, encode(channels), + jsonp, TIMETOKEN + ], + success : function(messages) { + if (!messages) return timeout( _connect, windowing ); + + // Connect + each_channel(function(channel){ + if (channel.connected) return; + channel.connected = 1; + channel.connect(channel.name); + }); + + // Restore Previous Connection Point if Needed + TIMETOKEN = !TIMETOKEN && + SUB_RESTORE && + db['get'](SUBSCRIBE_KEY) || messages[1]; + + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + + // Update Saved Timetoken + db['set']( SUBSCRIBE_KEY, messages[1] ); + + // Route Channel <---> Callback for Message + var next_callback = (function() { + var channels = (messages.length>2?messages[2]:'') + , list = channels.split(','); + + return function() { + var channel = list.shift()||''; + return [ + (CHANNELS[channel]||{}) + .callback||SUB_CALLBACK, + (channel||SUB_CHANNEL) + .split(PRESENCE_SUFFIX)[0] + ]; + }; + })(); + + each( messages[0], function(msg) { + var next = next_callback(); + if (!CHANNELS[next[1]].subscribed) return; + next[0]( msg, messages, next[1] ); + } ); + + timeout( _connect, windowing ); + } + }); + } + + CONNECT = function() { + // Close Previous Subscribe Connection + _reset_offline(); + + // Begin Recursive Subscribe + clearTimeout(SUB_BUFF_WAIT); + SUB_BUFF_WAIT = timeout( _connect, 100 ); + }; + + // Reduce Status Flicker + if (!READY) return READY_BUFFER.push(CONNECT); + + // Connect Now + CONNECT(); + }, + + 'here_now' : function( args, callback ) { + var callback = args['callback'] || callback + , err = args['error'] || function(){} + , channel = args['channel'] + , jsonp = jsonp_cb() + , data = null; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } + + xdr({ + callback : jsonp, + data : data, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, + 'channel', encode(channel) + ] + }); + }, + + // Expose PUBNUB Functions + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater + }; + + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); + } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, MAGIC = /\$?{([\w\-]+)}/g +, PNSDK = 'PubNub-JS-' + 'Titanium' + '/' + '3.4.4' +, ANDROID = Ti.Platform.name.toLowerCase().indexOf('android') >= 0 +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE OR COOKIE + */ +var db = (function(){ + return { + get : function(key) { + Ti.App.Properties.getString(''+key); + }, + set : function( key, value ) { + Ti.App.Properties.setString( ''+key, ''+value ); + } + }; +})(); + + +/** + * Titanium TCP Sockets + * ==================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_tcp(setup) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + + var body = [] + , data = "" + , rbuffer = Ti.createBuffer({ length : 2048 }) + , wbuffer = Ti.createBuffer({ value : "GET " + url + " HTTP/1.0\n\n"}) + , failed = 0 + , fail = function() { + if (failed) return; + failed = 1; + (setup.fail || function(){})(); + } + , success = setup.success || function(){} + , sock = Ti.Network.Socket.createTCP({ + host : url.split(URLBIT)[2], + port : 80, + mode : Ti.Network.READ_WRITE_MODE, + timeout : XHRTME, + error : fail, + connected : function() { + sock.write(wbuffer); + read(); + } + }); + + function read() { + Ti.Stream.read( sock, rbuffer, function(stream) { + if (+stream.bytesProcessed > -1) { + data = Ti.Codec.decodeString({ + source : rbuffer, + length : +stream.bytesProcessed + }); + + body.push(data); + rbuffer.clear(); + + return timeout( read, 1 ); + } + + try { + data = JSON['parse']( + body.join('').split('\r\n').slice(-1) + ); + } + catch (r) { + return fail(); + } + + sock.close(); + success(data); + } ); + } + + try { sock.connect() } + catch(k) { return fail() } +} + +/** + * Titanium XHR Request + * ============================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_http_client( setup ) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = Ti.Network.createHTTPClient(); + xhr.onerror = function(){ done(1) }; + xhr.onload = finished; + xhr.timeout = XHRTME; + + xhr.open( 'GET', url, true ); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * LOG + * === + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +var log = function(){}; + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = setup['native_tcp_socket'] ? xdr_tcp : xdr_http_client + var SELF = PN_API(setup); + + SELF['init'] = PN; + + + // Return without Testing + if (setup['notest']) return SELF; + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +})(); diff --git a/titanium/examples/mobile/detailed-history-example-app/manifest b/titanium/examples/mobile/detailed-history-example-app/manifest new file mode 100644 index 000000000..f2882241b --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/manifest @@ -0,0 +1,8 @@ +#appname:Detailed History Example +#publisher:stephen +#url:http://www.pubnub.com/ +#image:appicon.png +#appid:com.pubnub.detailedhistory +#desc:not specified +#type:ipad +#guid:42667a7c-de7a-4f61-834c-3f0fab1da412 diff --git a/titanium/examples/mobile/detailed-history-example-app/tiapp.xml b/titanium/examples/mobile/detailed-history-example-app/tiapp.xml new file mode 100644 index 000000000..c2cd6eccb --- /dev/null +++ b/titanium/examples/mobile/detailed-history-example-app/tiapp.xml @@ -0,0 +1,41 @@ + + + 2.1.2.GA + 327680 + + false + true + true + true + false + + com.pubnub.detailedhistory + detailed-history-example + 1.0 + stephen + http://www.pubnub.com/ + not specified + 2011 by stephen + appicon.png + false + false + default + false + false + false + true + 42667a7c-de7a-4f61-834c-3f0fab1da412 + + + Ti.UI.PORTRAIT + + + Ti.UI.PORTRAIT + Ti.UI.UPSIDE_PORTRAIT + Ti.UI.LANDSCAPE_LEFT + Ti.UI.LANDSCAPE_RIGHT + + + + + diff --git a/titanium/examples/mobile/here-now-example-app/.project b/titanium/examples/mobile/here-now-example-app/.project new file mode 100644 index 000000000..de3edde07 --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/.project @@ -0,0 +1,17 @@ + + + here-now-example-app + + + + + + com.aptana.ide.core.unifiedBuilder + + + + + + com.aptana.projects.webnature + + diff --git a/titanium/examples/mobile/here-now-example-app/CHANGELOG.txt b/titanium/examples/mobile/here-now-example-app/CHANGELOG.txt new file mode 100644 index 000000000..de1e09178 --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/CHANGELOG.txt @@ -0,0 +1 @@ +Place your change log text here. This file will be incorporated with your app at package time. \ No newline at end of file diff --git a/titanium/examples/mobile/here-now-example-app/LICENSE b/titanium/examples/mobile/here-now-example-app/LICENSE new file mode 100644 index 000000000..0ec894017 --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/LICENSE @@ -0,0 +1,219 @@ +Copyright 2009 Appcelerator, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + (or the full text of the license is below) + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/titanium/examples/mobile/here-now-example-app/LICENSE.txt b/titanium/examples/mobile/here-now-example-app/LICENSE.txt new file mode 100644 index 000000000..4124b1d32 --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/LICENSE.txt @@ -0,0 +1 @@ +Place your license text here. This file will be incorporated with your app at package time. \ No newline at end of file diff --git a/titanium/examples/mobile/here-now-example-app/README b/titanium/examples/mobile/here-now-example-app/README new file mode 100644 index 000000000..cb993a658 --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/README @@ -0,0 +1,18 @@ +Welcome to your Appcelerator Titanium Mobile Project + +This is a blank project. Start by editing your application's app.js to +make your first mobile project using Titanium. + + + +---------------------------------- +Stuff our legal folk make us say: + +Appcelerator, Appcelerator Titanium and associated marks and logos are +trademarks of Appcelerator, Inc. + +Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. + +Titanium is licensed under the Apache Public License (Version 2). Please +see the LICENSE file for the full license. + diff --git a/titanium/examples/mobile/here-now-example-app/Resources/KS_nav_ui.png b/titanium/examples/mobile/here-now-example-app/Resources/KS_nav_ui.png new file mode 100644 index 000000000..28976c868 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/KS_nav_ui.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/KS_nav_views.png b/titanium/examples/mobile/here-now-example-app/Resources/KS_nav_views.png new file mode 100644 index 000000000..885abd900 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/KS_nav_views.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/appicon.png b/titanium/examples/mobile/here-now-example-app/Resources/android/appicon.png new file mode 100644 index 000000000..3300a00a9 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/appicon.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/default.png new file mode 100644 index 000000000..718fb3cab Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-land-hdpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-land-hdpi/default.png new file mode 100644 index 000000000..77519596a Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-land-hdpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-land-ldpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-land-ldpi/default.png new file mode 100644 index 000000000..86e7930b6 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-land-ldpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-port-hdpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-port-hdpi/default.png new file mode 100644 index 000000000..3a83cc70e Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-port-hdpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-port-ldpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-port-ldpi/default.png new file mode 100644 index 000000000..2ab10df9a Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-long-port-ldpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-hdpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-hdpi/default.png new file mode 100644 index 000000000..77519596a Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-hdpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-ldpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-ldpi/default.png new file mode 100644 index 000000000..7db10fada Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-ldpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-mdpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-mdpi/default.png new file mode 100644 index 000000000..f1268baae Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-land-mdpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-hdpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-hdpi/default.png new file mode 100644 index 000000000..3a83cc70e Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-hdpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-ldpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-ldpi/default.png new file mode 100644 index 000000000..2c2bebe27 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-ldpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-mdpi/default.png b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-mdpi/default.png new file mode 100644 index 000000000..606024d09 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/android/images/res-notlong-port-mdpi/default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/app.js b/titanium/examples/mobile/here-now-example-app/Resources/app.js new file mode 100644 index 000000000..17bf060fa --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/Resources/app.js @@ -0,0 +1,26 @@ +// ------------------------------------------------------------------------- +// INCLUDE PUBNUB HERE NOW MODULE +// ------------------------------------------------------------------------- +Ti.include('./pubnub-here-now.js'); + +// ------------------------------------------------------------------------- +// CREATE PUBNUB PRESENCE DATA WINDOW +// ------------------------------------------------------------------------- +// +// Returns an Object with Titanium Window Inside +// +var pubnub_data_window = Ti.App.HereNow({ + "channel" : "hello_world", + "window" : { + title : 'Data', + backgroundColor : '#fff' + } +}); + +// ------------------------------------------------------------------------- +// TITANIUM WINDOW OBJECT +// ------------------------------------------------------------------------- +// +// Open Chat Window +// +pubnub_data_window.data_window.open(); diff --git a/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default-Landscape.png b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default-Landscape.png new file mode 100644 index 000000000..082688aee Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default-Landscape.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default-Portrait.png b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default-Portrait.png new file mode 100644 index 000000000..426e1f0af Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default-Portrait.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default.png b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default.png new file mode 100644 index 000000000..b41d4a906 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default@2x.png b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default@2x.png new file mode 100644 index 000000000..11e4e4d6c Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/iphone/Default@2x.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/iphone/appicon.png b/titanium/examples/mobile/here-now-example-app/Resources/iphone/appicon.png new file mode 100644 index 000000000..ac74d2739 Binary files /dev/null and b/titanium/examples/mobile/here-now-example-app/Resources/iphone/appicon.png differ diff --git a/titanium/examples/mobile/here-now-example-app/Resources/pubnub-here-now.js b/titanium/examples/mobile/here-now-example-app/Resources/pubnub-here-now.js new file mode 100755 index 000000000..6a0a0963e --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/Resources/pubnub-here-now.js @@ -0,0 +1,138 @@ +// ---------------------------------- +// Detect Platform +// ---------------------------------- +var isAndroid = Ti.Platform.osname === 'android'; + +// ---------------------------------- +// INIT PUBNUB +// ---------------------------------- +var pubnub = require('pubnub')({ + publish_key : 'demo', + subscribe_key : 'demo', + ssl : false, + origin : 'pubsub.pubnub.com' +}); + +// ---------------------------------- +// RANDOM COLOR +// ---------------------------------- +function rnd_hex(light) { return Math.ceil(Math.random()*9) } +function rnd_color() { + return '#'+pubnub.map( + Array(3).join().split(','), rnd_hex + ).join(''); +} + +Ti.App.HereNow = function(setup) { + + // ---------------------------------- + // CREATE BASE UI TAB AND ROOT WINDOW + // ---------------------------------- + var data_window = Ti.UI.createWindow(setup['window']); + + var table = Ti.UI.createTableView({ + separatorColor : (isAndroid) ? '#000' : '#fff', + top : (isAndroid) ? '60dp' : 80, + height : '60%' + }); + + + // Append First Row (Blank) + table.appendRow(Ti.UI.createTableViewRow({ + className : "pubnub_data" + })); + + function append_data( message, color ) { + var row = Ti.UI.createTableViewRow({ + className : "pubnub_data", + backgroundGradient : { + type : 'linear', + colors : [ "#fff", '#eeeeed' ], + startPoint : { x : 0, y : 0 }, + endPoint : { x : 0, y : 70 }, + backFillStart : false + } + }); + + var label = Ti.UI.createLabel({ + text : message || "no-message", + height : (isAndroid) ? '50dp' : 'auto', + width : 'auto', + color : color || "#111", + left : 10, + font : { + fontSize : (isAndroid) ? '19dp' : 14, + fontWeight: (isAndroid) ? 'bold' : 'normal' + } + }); + + row.add(label); + table.insertRowBefore( 0, row ); + } + + var channel = Ti.UI.createTextField({ + width : (isAndroid) ? '75%' : 247, + height : (isAndroid) ? '50dp' : 30, + left : 4, + top : 4, + color : "#111", + clearOnEdit : true, + value : setup['channel'], + border : 1, + borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, + borderRadius : 4, + font : { + fontSize : (isAndroid) ? '18dp' : 14, + fontWeight : 'bold' + } + }); + // Here Now Button + var here_now_button = Ti.UI.createButton({ + title : 'Here Now', + top : 40, + right : 150, + width : (isAndroid) ? '100dp' : 100, + height : (isAndroid) ? '50dp' : 30, + borderRadius : 6, + shadowColor : "#001", + shadowOffset : { x : 1, y : 1 }, + style : Ti.UI.iPhone.SystemButtonStyle.PLAIN, + font : { + fontSize : (isAndroid) ? '18dp' : 16, + fontWeight : 'bold' + }, + backgroundGradient : { + type : 'linear', + colors : [ '#058cf5', '#015fe6' ], + startPoint : { x : 0, y : 0 }, + endPoint : { x : 2, y : 50 }, + backFillStart : false + } + }); + // here now button Touch + here_now_button.addEventListener( 'touchstart', function(e) { + pubnub.here_now({ + channel : channel.value, + connect : function() { + append_data("Receiving Here Now data ..."); + }, + callback : function(message) { + append_data( JSON.stringify(message), message.color ); + }, + error : function() { + append_data( "Lost Connection...", "#f00" ); + } + }); + }); + + data_window.add(table); + data_window.add(channel); + data_window.add(here_now_button); + + this.data_window = data_window; + this.my_color = rnd_color(); + this.pubnub = pubnub; + + return this; +}; + diff --git a/titanium/examples/mobile/here-now-example-app/Resources/pubnub.js b/titanium/examples/mobile/here-now-example-app/Resources/pubnub.js new file mode 100644 index 000000000..3967a2360 --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/Resources/pubnub.js @@ -0,0 +1,982 @@ +// 3.4.4 +(function(){ +var NOW = 1 +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; + +/** + * UTILITIES + */ +function unique() { return'x'+ ++NOW+''+(+new Date) } +function rnow() { return+new Date } + +/** + * NEXTORIGIN + * ========== + * var next_origin = nextorigin(); + */ +var nextorigin = (function() { + var max = 20 + , ori = Math.floor(Math.random() * max); + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 + && origin.replace( + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; + } +})(); + + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + +/** + * UPDATER + * ======= + * var timestamp = unique(); + */ +function updater( fun, rate ) { + var timeout + , last = 0 + , runnit = function() { + if (last + rate > rnow()) { + clearTimeout(timeout); + timeout = setTimeout( runnit, rate ); + } + else { + last = rnow(); + fun(); + } + }; + + return runnit; +} + +/** + * GREP + * ==== + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +function grep( list, fun ) { + var fin = []; + each( list || [], function(l) { fun(l) && fin.push(l) } ); + return fin +} + +/** + * SUPPLANT + * ======== + * var text = supplant( 'Hello {name}!', { name : 'John' } ) + */ +function supplant( str, values ) { + return str.replace( REPL, function( _, match ) { + return values[match] || _ + } ); +} + +/** + * timeout + * ======= + * timeout( function(){}, 100 ); + */ +function timeout( fun, wait ) { + return setTimeout( fun, wait ); +} + +/** + * uuid + * ==== + * var my_uuid = uuid(); + */ +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; +} + +/** + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} + +/** + * ENCODE + * ====== + * var encoded_path = encode('path'); + */ +function encode(path) { + return map( (encodeURIComponent(path)).split(''), function(chr) { + return "-_.!~*'()".indexOf(chr) < 0 ? chr : + "%"+chr.charCodeAt(0).toString(16).toUpperCase() + } ).join(''); +} + +/** + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); + */ +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} + +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } + +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, + /* + PUBNUB.history({ + channel : 'my_chat_channel', + limit : 100, + callback : function(history) { } + }); + */ + 'history' : function( args, callback ) { + var callback = args['callback'] || callback + , count = args['count'] || args['limit'] || 100 + , reverse = args['reverse'] || "false" + , err = args['error'] || function(){} + , channel = args['channel'] + , start = args['start'] + , end = args['end'] + , params = {} + , jsonp = jsonp_cb(); + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + params['stringtoken'] = 'true'; + params['count'] = count; + params['reverse'] = reverse; + + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; + + // Send Message + xdr({ + callback : jsonp, + data : params, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'history', 'sub-key', + SUBSCRIBE_KEY, 'channel', encode(channel) + ] + }); + }, + + /* + PUBNUB.replay({ + source : 'my_channel', + destination : 'new_channel' + }); + */ + 'replay' : function(args) { + var callback = callback || args['callback'] || function(){} + , source = args['source'] + , destination = args['destination'] + , stop = args['stop'] + , start = args['start'] + , end = args['end'] + , reverse = args['reverse'] + , limit = args['limit'] + , jsonp = jsonp_cb() + , data = {} + , url; + + // Check User Input + if (!source) return error('Missing Source Channel'); + if (!destination) return error('Missing Destination Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup URL Params + if (jsonp != '0') data['callback'] = jsonp; + if (stop) data['stop'] = 'all'; + if (reverse) data['reverse'] = 'true'; + if (start) data['start'] = start; + if (end) data['end'] = end; + if (limit) data['count'] = limit; + + // Compose URL Parts + url = [ + STD_ORIGIN, 'v1', 'replay', + PUBLISH_KEY, SUBSCRIBE_KEY, + source, destination + ]; + + // Start (or Stop) Replay! + xdr({ + callback : jsonp, + success : function(response) { callback(response) }, + fail : function() { callback([ 0, 'Disconnected' ]) }, + url : url, + data : data + }); + }, + + /* + PUBNUB.time(function(time){ }); + */ + 'time' : function(callback) { + var jsonp = jsonp_cb(); + xdr({ + callback : jsonp, + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], + success : function(response) { callback(response[0]) }, + fail : function() { callback(0) } + }); + }, + + /* + PUBNUB.publish({ + channel : 'my_chat_channel', + message : 'hello!' + }); + */ + 'publish' : function( args, callback ) { + var callback = callback || args['callback'] || function(){} + , msg = args['message'] + , channel = args['channel'] + , jsonp = jsonp_cb() + , url; + + if (!msg) return error('Missing Message'); + if (!channel) return error('Missing Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // If trying to send Object + msg = JSON['stringify'](msg); + + // Create URL + url = [ + STD_ORIGIN, 'publish', + PUBLISH_KEY, SUBSCRIBE_KEY, + 0, encode(channel), + jsonp, encode(msg) + ]; + + // Queue Message Send + PUB_QUEUE.push({ + callback : jsonp, + timeout : SECOND*5, + url : url, + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} + }); + + // Send Message + publish(); + }, + + /* + PUBNUB.unsubscribe({ channel : 'my_chat' }); + */ + 'unsubscribe' : function(args) { + var channel = args['channel']; + + TIMETOKEN = 0; + SUB_RESTORE = 1; + + // Prepare Channel(s) + channel = map( ( + channel.join ? channel.join(',') : ''+channel + ).split(','), function(channel) { + return channel + ',' + channel + PRESENCE_SUFFIX; + } ).join(','); + + // Iterate over Channels + each( channel.split(','), function(channel) { + if (READY) SELF['LEAVE']( channel, 0 ); + CHANNELS[channel] = 0; + } ); + + // ReOpen Connection if Any Channels Left + if (READY) CONNECT(); + }, + + /* + PUBNUB.subscribe({ + channel : 'my_chat' + callback : function(message) { } + }); + */ + 'subscribe' : function( args, callback ) { + var channel = args['channel'] + , callback = callback || args['callback'] + , callback = callback || args['message'] + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['disconnect'] || function(){} + , presence = args['presence'] || 0 + , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 + , sub_timeout = args['timeout'] || SUB_TIMEOUT + , windowing = args['windowing'] || SUB_WINDOWING + , restore = args['restore']; + + // Restore Enabled? + if (restore) SUB_RESTORE = 1; + + TIMETOKEN = 0; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup Channel(s) + each( (channel.join ? channel.join(',') : ''+channel).split(','), + function(channel) { + var settings = CHANNELS[channel] || {}; + + // Store Channel State + CHANNELS[SUB_CHANNEL = channel] = { + name : channel, + connected : settings.connected, + disconnected : settings.disconnected, + subscribed : 1, + callback : SUB_CALLBACK = callback, + connect : connect, + disconnect : disconnect, + reconnect : reconnect + }; + + // Presence Enabled? + if (!presence) return; + + // Subscribe Presence Channel + SELF['subscribe']({ + 'channel' : channel + PRESENCE_SUFFIX, + 'callback' : presence + }); + + // Presence Subscribed? + if (settings.subscribed) return; + + // See Who's Here Now? + if (noheresync) return; + SELF['here_now']({ + 'channel' : channel, + 'callback' : function(here) { + each( 'uuids' in here ? here['uuids'] : [], + function(uid) { presence( { + 'action' : 'join', + 'uuid' : uid, + 'timestamp' : rnow(), + 'occupancy' : here['occupancy'] || 1 + }, here, channel ); } ); + } + }); + } ); + + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + + // Evented Subscribe + function _connect() { + var jsonp = jsonp_cb() + , channels = generate_channel_list(CHANNELS).join(','); + + // Stop Connection + if (!channels) return; + + // Connect to PubNub Subscribe Servers + SUB_RECEIVER = xdr({ + timeout : sub_timeout, + callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, + data : { 'uuid' : UUID }, + url : [ + SUB_ORIGIN, 'subscribe', + SUBSCRIBE_KEY, encode(channels), + jsonp, TIMETOKEN + ], + success : function(messages) { + if (!messages) return timeout( _connect, windowing ); + + // Connect + each_channel(function(channel){ + if (channel.connected) return; + channel.connected = 1; + channel.connect(channel.name); + }); + + // Restore Previous Connection Point if Needed + TIMETOKEN = !TIMETOKEN && + SUB_RESTORE && + db['get'](SUBSCRIBE_KEY) || messages[1]; + + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + + // Update Saved Timetoken + db['set']( SUBSCRIBE_KEY, messages[1] ); + + // Route Channel <---> Callback for Message + var next_callback = (function() { + var channels = (messages.length>2?messages[2]:'') + , list = channels.split(','); + + return function() { + var channel = list.shift()||''; + return [ + (CHANNELS[channel]||{}) + .callback||SUB_CALLBACK, + (channel||SUB_CHANNEL) + .split(PRESENCE_SUFFIX)[0] + ]; + }; + })(); + + each( messages[0], function(msg) { + var next = next_callback(); + if (!CHANNELS[next[1]].subscribed) return; + next[0]( msg, messages, next[1] ); + } ); + + timeout( _connect, windowing ); + } + }); + } + + CONNECT = function() { + // Close Previous Subscribe Connection + _reset_offline(); + + // Begin Recursive Subscribe + clearTimeout(SUB_BUFF_WAIT); + SUB_BUFF_WAIT = timeout( _connect, 100 ); + }; + + // Reduce Status Flicker + if (!READY) return READY_BUFFER.push(CONNECT); + + // Connect Now + CONNECT(); + }, + + 'here_now' : function( args, callback ) { + var callback = args['callback'] || callback + , err = args['error'] || function(){} + , channel = args['channel'] + , jsonp = jsonp_cb() + , data = null; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } + + xdr({ + callback : jsonp, + data : data, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, + 'channel', encode(channel) + ] + }); + }, + + // Expose PUBNUB Functions + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater + }; + + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); + } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, MAGIC = /\$?{([\w\-]+)}/g +, PNSDK = 'PubNub-JS-' + 'Titanium' + '/' + '3.4.4' +, ANDROID = Ti.Platform.name.toLowerCase().indexOf('android') >= 0 +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE OR COOKIE + */ +var db = (function(){ + return { + get : function(key) { + Ti.App.Properties.getString(''+key); + }, + set : function( key, value ) { + Ti.App.Properties.setString( ''+key, ''+value ); + } + }; +})(); + + +/** + * Titanium TCP Sockets + * ==================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_tcp(setup) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + + var body = [] + , data = "" + , rbuffer = Ti.createBuffer({ length : 2048 }) + , wbuffer = Ti.createBuffer({ value : "GET " + url + " HTTP/1.0\n\n"}) + , failed = 0 + , fail = function() { + if (failed) return; + failed = 1; + (setup.fail || function(){})(); + } + , success = setup.success || function(){} + , sock = Ti.Network.Socket.createTCP({ + host : url.split(URLBIT)[2], + port : 80, + mode : Ti.Network.READ_WRITE_MODE, + timeout : XHRTME, + error : fail, + connected : function() { + sock.write(wbuffer); + read(); + } + }); + + function read() { + Ti.Stream.read( sock, rbuffer, function(stream) { + if (+stream.bytesProcessed > -1) { + data = Ti.Codec.decodeString({ + source : rbuffer, + length : +stream.bytesProcessed + }); + + body.push(data); + rbuffer.clear(); + + return timeout( read, 1 ); + } + + try { + data = JSON['parse']( + body.join('').split('\r\n').slice(-1) + ); + } + catch (r) { + return fail(); + } + + sock.close(); + success(data); + } ); + } + + try { sock.connect() } + catch(k) { return fail() } +} + +/** + * Titanium XHR Request + * ============================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_http_client( setup ) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = Ti.Network.createHTTPClient(); + xhr.onerror = function(){ done(1) }; + xhr.onload = finished; + xhr.timeout = XHRTME; + + xhr.open( 'GET', url, true ); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * LOG + * === + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +var log = function(){}; + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = setup['native_tcp_socket'] ? xdr_tcp : xdr_http_client + var SELF = PN_API(setup); + + SELF['init'] = PN; + + + // Return without Testing + if (setup['notest']) return SELF; + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +})(); diff --git a/titanium/examples/mobile/here-now-example-app/manifest b/titanium/examples/mobile/here-now-example-app/manifest new file mode 100644 index 000000000..4925fafdb --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/manifest @@ -0,0 +1,8 @@ +#appname: Here Now Example +#publisher: stephen +#url: http://www.pubnub.com/ +#image: appicon.png +#appid: com.pubnub.herenow +#desc: undefined +#type: ipad +#guid: 42667a7c-de7a-4f61-834c-3f0fab1da412 diff --git a/titanium/examples/mobile/here-now-example-app/tiapp.xml b/titanium/examples/mobile/here-now-example-app/tiapp.xml new file mode 100644 index 000000000..f0993d465 --- /dev/null +++ b/titanium/examples/mobile/here-now-example-app/tiapp.xml @@ -0,0 +1,41 @@ + + + 2.1.0.GA + 327680 + + false + true + true + true + false + + com.pubnub.herenow + here-now-example + 1.0 + stephen + http://www.pubnub.com/ + not specified + 2011 by stephen + appicon.png + false + false + default + false + false + false + true + 42667a7c-de7a-4f61-834c-3f0fab1da412 + + + Ti.UI.PORTRAIT + + + Ti.UI.PORTRAIT + Ti.UI.UPSIDE_PORTRAIT + Ti.UI.LANDSCAPE_LEFT + Ti.UI.LANDSCAPE_RIGHT + + + + + diff --git a/titanium/pubnub.js b/titanium/pubnub.js new file mode 100644 index 000000000..3967a2360 --- /dev/null +++ b/titanium/pubnub.js @@ -0,0 +1,982 @@ +// 3.4.4 +(function(){ +var NOW = 1 +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' +, DEF_WINDOWING = 10 // MILLISECONDS. +, DEF_TIMEOUT = 10000 // MILLISECONDS. +, DEF_SUB_TIMEOUT = 310 // SECONDS. +, DEF_KEEPALIVE = 60 // SECONDS. +, SECOND = 1000 // A THOUSAND MILLISECONDS. +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; + +/** + * UTILITIES + */ +function unique() { return'x'+ ++NOW+''+(+new Date) } +function rnow() { return+new Date } + +/** + * NEXTORIGIN + * ========== + * var next_origin = nextorigin(); + */ +var nextorigin = (function() { + var max = 20 + , ori = Math.floor(Math.random() * max); + return function( origin, failover ) { + return origin.indexOf('pubsub.') > 0 + && origin.replace( + 'pubsub', 'ps' + ( + failover ? uuid().split('-')[0] : + (++ori < max? ori : ori=1) + ) ) || origin; + } +})(); + + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + +/** + * UPDATER + * ======= + * var timestamp = unique(); + */ +function updater( fun, rate ) { + var timeout + , last = 0 + , runnit = function() { + if (last + rate > rnow()) { + clearTimeout(timeout); + timeout = setTimeout( runnit, rate ); + } + else { + last = rnow(); + fun(); + } + }; + + return runnit; +} + +/** + * GREP + * ==== + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +function grep( list, fun ) { + var fin = []; + each( list || [], function(l) { fun(l) && fin.push(l) } ); + return fin +} + +/** + * SUPPLANT + * ======== + * var text = supplant( 'Hello {name}!', { name : 'John' } ) + */ +function supplant( str, values ) { + return str.replace( REPL, function( _, match ) { + return values[match] || _ + } ); +} + +/** + * timeout + * ======= + * timeout( function(){}, 100 ); + */ +function timeout( fun, wait ) { + return setTimeout( fun, wait ); +} + +/** + * uuid + * ==== + * var my_uuid = uuid(); + */ +function uuid(callback) { + var u = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, + function(c) { + var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); + return v.toString(16); + }); + if (callback) callback(u); + return u; +} + +/** + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} + +/** + * ENCODE + * ====== + * var encoded_path = encode('path'); + */ +function encode(path) { + return map( (encodeURIComponent(path)).split(''), function(chr) { + return "-_.!~*'()".indexOf(chr) < 0 ? chr : + "%"+chr.charCodeAt(0).toString(16).toUpperCase() + } ).join(''); +} + +/** + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); + */ +function generate_channel_list(channels) { + var list = []; + each( channels, function( channel, status ) { + if (status.subscribed) list.push(channel); + } ); + return list.sort(); +} + +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } + +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING + , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , PUBLISH_KEY = setup['publish_key'] || '' + , SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , SSL = setup['ssl'] ? 's' : '' + , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') + , STD_ORIGIN = nextorigin(ORIGIN) + , SUB_ORIGIN = nextorigin(ORIGIN) + , CONNECT = function(){} + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, + /* + PUBNUB.history({ + channel : 'my_chat_channel', + limit : 100, + callback : function(history) { } + }); + */ + 'history' : function( args, callback ) { + var callback = args['callback'] || callback + , count = args['count'] || args['limit'] || 100 + , reverse = args['reverse'] || "false" + , err = args['error'] || function(){} + , channel = args['channel'] + , start = args['start'] + , end = args['end'] + , params = {} + , jsonp = jsonp_cb(); + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + params['stringtoken'] = 'true'; + params['count'] = count; + params['reverse'] = reverse; + + if (jsonp) params['callback'] = jsonp; + if (start) params['start'] = start; + if (end) params['end'] = end; + + // Send Message + xdr({ + callback : jsonp, + data : params, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'history', 'sub-key', + SUBSCRIBE_KEY, 'channel', encode(channel) + ] + }); + }, + + /* + PUBNUB.replay({ + source : 'my_channel', + destination : 'new_channel' + }); + */ + 'replay' : function(args) { + var callback = callback || args['callback'] || function(){} + , source = args['source'] + , destination = args['destination'] + , stop = args['stop'] + , start = args['start'] + , end = args['end'] + , reverse = args['reverse'] + , limit = args['limit'] + , jsonp = jsonp_cb() + , data = {} + , url; + + // Check User Input + if (!source) return error('Missing Source Channel'); + if (!destination) return error('Missing Destination Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup URL Params + if (jsonp != '0') data['callback'] = jsonp; + if (stop) data['stop'] = 'all'; + if (reverse) data['reverse'] = 'true'; + if (start) data['start'] = start; + if (end) data['end'] = end; + if (limit) data['count'] = limit; + + // Compose URL Parts + url = [ + STD_ORIGIN, 'v1', 'replay', + PUBLISH_KEY, SUBSCRIBE_KEY, + source, destination + ]; + + // Start (or Stop) Replay! + xdr({ + callback : jsonp, + success : function(response) { callback(response) }, + fail : function() { callback([ 0, 'Disconnected' ]) }, + url : url, + data : data + }); + }, + + /* + PUBNUB.time(function(time){ }); + */ + 'time' : function(callback) { + var jsonp = jsonp_cb(); + xdr({ + callback : jsonp, + timeout : SECOND*5, + url : [STD_ORIGIN, 'time', jsonp], + success : function(response) { callback(response[0]) }, + fail : function() { callback(0) } + }); + }, + + /* + PUBNUB.publish({ + channel : 'my_chat_channel', + message : 'hello!' + }); + */ + 'publish' : function( args, callback ) { + var callback = callback || args['callback'] || function(){} + , msg = args['message'] + , channel = args['channel'] + , jsonp = jsonp_cb() + , url; + + if (!msg) return error('Missing Message'); + if (!channel) return error('Missing Channel'); + if (!PUBLISH_KEY) return error('Missing Publish Key'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // If trying to send Object + msg = JSON['stringify'](msg); + + // Create URL + url = [ + STD_ORIGIN, 'publish', + PUBLISH_KEY, SUBSCRIBE_KEY, + 0, encode(channel), + jsonp, encode(msg) + ]; + + // Queue Message Send + PUB_QUEUE.push({ + callback : jsonp, + timeout : SECOND*5, + url : url, + data : { 'uuid' : UUID }, + success : function(response){callback(response);publish(1)}, + fail : function(){callback([0,'Failed',msg]);publish(1)} + }); + + // Send Message + publish(); + }, + + /* + PUBNUB.unsubscribe({ channel : 'my_chat' }); + */ + 'unsubscribe' : function(args) { + var channel = args['channel']; + + TIMETOKEN = 0; + SUB_RESTORE = 1; + + // Prepare Channel(s) + channel = map( ( + channel.join ? channel.join(',') : ''+channel + ).split(','), function(channel) { + return channel + ',' + channel + PRESENCE_SUFFIX; + } ).join(','); + + // Iterate over Channels + each( channel.split(','), function(channel) { + if (READY) SELF['LEAVE']( channel, 0 ); + CHANNELS[channel] = 0; + } ); + + // ReOpen Connection if Any Channels Left + if (READY) CONNECT(); + }, + + /* + PUBNUB.subscribe({ + channel : 'my_chat' + callback : function(message) { } + }); + */ + 'subscribe' : function( args, callback ) { + var channel = args['channel'] + , callback = callback || args['callback'] + , callback = callback || args['message'] + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['disconnect'] || function(){} + , presence = args['presence'] || 0 + , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 + , sub_timeout = args['timeout'] || SUB_TIMEOUT + , windowing = args['windowing'] || SUB_WINDOWING + , restore = args['restore']; + + // Restore Enabled? + if (restore) SUB_RESTORE = 1; + + TIMETOKEN = 0; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + // Setup Channel(s) + each( (channel.join ? channel.join(',') : ''+channel).split(','), + function(channel) { + var settings = CHANNELS[channel] || {}; + + // Store Channel State + CHANNELS[SUB_CHANNEL = channel] = { + name : channel, + connected : settings.connected, + disconnected : settings.disconnected, + subscribed : 1, + callback : SUB_CALLBACK = callback, + connect : connect, + disconnect : disconnect, + reconnect : reconnect + }; + + // Presence Enabled? + if (!presence) return; + + // Subscribe Presence Channel + SELF['subscribe']({ + 'channel' : channel + PRESENCE_SUFFIX, + 'callback' : presence + }); + + // Presence Subscribed? + if (settings.subscribed) return; + + // See Who's Here Now? + if (noheresync) return; + SELF['here_now']({ + 'channel' : channel, + 'callback' : function(here) { + each( 'uuids' in here ? here['uuids'] : [], + function(uid) { presence( { + 'action' : 'join', + 'uuid' : uid, + 'timestamp' : rnow(), + 'occupancy' : here['occupancy'] || 1 + }, here, channel ); } ); + } + }); + } ); + + // Test Network Connection + function _test_connection(success) { + if (success) { + // Begin Next Socket Connection + timeout( _connect, SECOND ); + } + else { + // New Origin on Failed Connection + STD_ORIGIN = nextorigin( ORIGIN, 1 ); + SUB_ORIGIN = nextorigin( ORIGIN, 1 ); + + // Re-test Connection + timeout( function() { + SELF['time'](_test_connection); + }, SECOND ); + } + + // Disconnect & Reconnect + each_channel(function(channel){ + // Reconnect + if (success && channel.disconnected) { + channel.disconnected = 0; + return channel.reconnect(channel.name); + } + + // Disconnect + if (!success && !channel.disconnected) { + channel.disconnected = 1; + channel.disconnect(channel.name); + } + }); + } + + // Evented Subscribe + function _connect() { + var jsonp = jsonp_cb() + , channels = generate_channel_list(CHANNELS).join(','); + + // Stop Connection + if (!channels) return; + + // Connect to PubNub Subscribe Servers + SUB_RECEIVER = xdr({ + timeout : sub_timeout, + callback : jsonp, + fail : function() { SELF['time'](_test_connection) }, + data : { 'uuid' : UUID }, + url : [ + SUB_ORIGIN, 'subscribe', + SUBSCRIBE_KEY, encode(channels), + jsonp, TIMETOKEN + ], + success : function(messages) { + if (!messages) return timeout( _connect, windowing ); + + // Connect + each_channel(function(channel){ + if (channel.connected) return; + channel.connected = 1; + channel.connect(channel.name); + }); + + // Restore Previous Connection Point if Needed + TIMETOKEN = !TIMETOKEN && + SUB_RESTORE && + db['get'](SUBSCRIBE_KEY) || messages[1]; + + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + + // Update Saved Timetoken + db['set']( SUBSCRIBE_KEY, messages[1] ); + + // Route Channel <---> Callback for Message + var next_callback = (function() { + var channels = (messages.length>2?messages[2]:'') + , list = channels.split(','); + + return function() { + var channel = list.shift()||''; + return [ + (CHANNELS[channel]||{}) + .callback||SUB_CALLBACK, + (channel||SUB_CHANNEL) + .split(PRESENCE_SUFFIX)[0] + ]; + }; + })(); + + each( messages[0], function(msg) { + var next = next_callback(); + if (!CHANNELS[next[1]].subscribed) return; + next[0]( msg, messages, next[1] ); + } ); + + timeout( _connect, windowing ); + } + }); + } + + CONNECT = function() { + // Close Previous Subscribe Connection + _reset_offline(); + + // Begin Recursive Subscribe + clearTimeout(SUB_BUFF_WAIT); + SUB_BUFF_WAIT = timeout( _connect, 100 ); + }; + + // Reduce Status Flicker + if (!READY) return READY_BUFFER.push(CONNECT); + + // Connect Now + CONNECT(); + }, + + 'here_now' : function( args, callback ) { + var callback = args['callback'] || callback + , err = args['error'] || function(){} + , channel = args['channel'] + , jsonp = jsonp_cb() + , data = null; + + // Make sure we have a Channel + if (!channel) return error('Missing Channel'); + if (!callback) return error('Missing Callback'); + if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } + + xdr({ + callback : jsonp, + data : data, + success : function(response) { callback(response) }, + fail : err, + url : [ + STD_ORIGIN, 'v2', 'presence', + 'sub_key', SUBSCRIBE_KEY, + 'channel', encode(channel) + ] + }); + }, + + // Expose PUBNUB Functions + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater + }; + + function _poll_online() { + _is_online() || _reset_offline(); + timeout( _poll_online, SECOND ); + } + + function _poll_online2() { + SELF['time'](function(success){ + success || _reset_offline(); + timeout( _poll_online2, KEEPALIVE ); + }) + } + + function _reset_offline() { + SUB_RECEIVER && SUB_RECEIVER(1); + } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + + timeout( _poll_online, SECOND ); + timeout( _poll_online2, KEEPALIVE ); + + return SELF; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, MAGIC = /\$?{([\w\-]+)}/g +, PNSDK = 'PubNub-JS-' + 'Titanium' + '/' + '3.4.4' +, ANDROID = Ti.Platform.name.toLowerCase().indexOf('android') >= 0 +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE OR COOKIE + */ +var db = (function(){ + return { + get : function(key) { + Ti.App.Properties.getString(''+key); + }, + set : function( key, value ) { + Ti.App.Properties.setString( ''+key, ''+value ); + } + }; +})(); + + +/** + * Titanium TCP Sockets + * ==================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_tcp(setup) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + + var body = [] + , data = "" + , rbuffer = Ti.createBuffer({ length : 2048 }) + , wbuffer = Ti.createBuffer({ value : "GET " + url + " HTTP/1.0\n\n"}) + , failed = 0 + , fail = function() { + if (failed) return; + failed = 1; + (setup.fail || function(){})(); + } + , success = setup.success || function(){} + , sock = Ti.Network.Socket.createTCP({ + host : url.split(URLBIT)[2], + port : 80, + mode : Ti.Network.READ_WRITE_MODE, + timeout : XHRTME, + error : fail, + connected : function() { + sock.write(wbuffer); + read(); + } + }); + + function read() { + Ti.Stream.read( sock, rbuffer, function(stream) { + if (+stream.bytesProcessed > -1) { + data = Ti.Codec.decodeString({ + source : rbuffer, + length : +stream.bytesProcessed + }); + + body.push(data); + rbuffer.clear(); + + return timeout( read, 1 ); + } + + try { + data = JSON['parse']( + body.join('').split('\r\n').slice(-1) + ); + } + catch (r) { + return fail(); + } + + sock.close(); + success(data); + } ); + } + + try { sock.connect() } + catch(k) { return fail() } +} + +/** + * Titanium XHR Request + * ============================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_http_client( setup ) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = Ti.Network.createHTTPClient(); + xhr.onerror = function(){ done(1) }; + xhr.onload = finished; + xhr.timeout = XHRTME; + + xhr.open( 'GET', url, true ); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * LOG + * === + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +var log = function(){}; + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = setup['native_tcp_socket'] ? xdr_tcp : xdr_http_client + var SELF = PN_API(setup); + + SELF['init'] = PN; + + + // Return without Testing + if (setup['notest']) return SELF; + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +})(); diff --git a/titanium/unassembled/platform.js b/titanium/unassembled/platform.js new file mode 100644 index 000000000..20867c8e5 --- /dev/null +++ b/titanium/unassembled/platform.js @@ -0,0 +1,288 @@ +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, MAGIC = /\$?{([\w\-]+)}/g +, PNSDK = 'PubNub-JS-' + PLATFORM + '/' + VERSION +, ANDROID = Ti.Platform.name.toLowerCase().indexOf('android') >= 0 +, XHRTME = 310000; + + + +/** + * LOCAL STORAGE OR COOKIE + */ +var db = (function(){ + return { + get : function(key) { + Ti.App.Properties.getString(''+key); + }, + set : function( key, value ) { + Ti.App.Properties.setString( ''+key, ''+value ); + } + }; +})(); + + +/** + * Titanium TCP Sockets + * ==================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_tcp(setup) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + + var body = [] + , data = "" + , rbuffer = Ti.createBuffer({ length : 2048 }) + , wbuffer = Ti.createBuffer({ value : "GET " + url + " HTTP/1.0\n\n"}) + , failed = 0 + , fail = function() { + if (failed) return; + failed = 1; + (setup.fail || function(){})(); + } + , success = setup.success || function(){} + , sock = Ti.Network.Socket.createTCP({ + host : url.split(URLBIT)[2], + port : 80, + mode : Ti.Network.READ_WRITE_MODE, + timeout : XHRTME, + error : fail, + connected : function() { + sock.write(wbuffer); + read(); + } + }); + + function read() { + Ti.Stream.read( sock, rbuffer, function(stream) { + if (+stream.bytesProcessed > -1) { + data = Ti.Codec.decodeString({ + source : rbuffer, + length : +stream.bytesProcessed + }); + + body.push(data); + rbuffer.clear(); + + return timeout( read, 1 ); + } + + try { + data = JSON['parse']( + body.join('').split('\r\n').slice(-1) + ); + } + catch (r) { + return fail(); + } + + sock.close(); + success(data); + } ); + } + + try { sock.connect() } + catch(k) { return fail() } +} + +/** + * Titanium XHR Request + * ============================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr_http_client( setup ) { + + var data = setup.data || {}; + data['pnsdk'] = PNSDK; + var url = build_url(setup.url, data); + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = Ti.Network.createHTTPClient(); + xhr.onerror = function(){ done(1) }; + xhr.onload = finished; + xhr.timeout = XHRTME; + + xhr.open( 'GET', url, true ); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * LOG + * === + * var list = grep( [1,2,3], function(item) { return item % 2 } ) + */ +var log = function(){}; + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = setup['native_tcp_socket'] ? xdr_tcp : xdr_http_client + var SELF = PN_API(setup); + + SELF['init'] = PN; + + + // Return without Testing + if (setup['notest']) return SELF; + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); diff --git a/web/Makefile b/web/Makefile new file mode 100644 index 000000000..b6756201b --- /dev/null +++ b/web/Makefile @@ -0,0 +1,33 @@ +include ../Makefile.inc +OUTPUT_FILES=$(PUBNUB_MIN_JS) $(PUBNUB_CRYPTO_MIN_JS) +PLATFORM=Web + +.PHONY : all +all: build + +.PHONY : build +build: $(PUBNUB_MIN_JS) $(PUBNUB_CRYPTO_MIN_JS) + +$(PUBNUB_MIN_JS) : $(JSON_JS) $(PUBNUB_COMMON_JS) $(WEBSOCKET_JS) $(PUBNUB_PLATFORM_JS) + ## Full Version + $(ECHO) "// Version: $(VERSION)" > $(PUBNUB_JS) + cat $(JSON_JS) $(PUBNUB_COMMON_JS) $(PUBNUB_PLATFORM_JS) $(WEBSOCKET_JS) >> $(PUBNUB_JS) + sed -i -e "s/VERSION/\'$(VERSION)\'/g" $(PUBNUB_JS) + sed -i -e "s/PLATFORM/\'$(PLATFORM)\'/g" $(PUBNUB_JS) + ## Minfied Version + $(ECHO) "// Version: $(VERSION)" > $(PUBNUB_MIN_JS) + $(ECHO) "(function(){" >> $(PUBNUB_MIN_JS) + cat $(PUBNUB_JS) | java -jar $(GOOGLE_MINIFY) --compilation_level=ADVANCED_OPTIMIZATIONS >> $(PUBNUB_MIN_JS) + $(ECHO) "})();" >> $(PUBNUB_MIN_JS) + +$(PUBNUB_CRYPTO_MIN_JS) : $(GIBBERISH_JS) $(ENCRYPTO_JS) + ## Cryptography + $(ECHO) "(function(){" > $(PUBNUB_CRYPTO_MIN_JS) + cat $(GIBBERISH_JS) $(ENCRYPT_JS) | java -jar $(GOOGLE_MINIFY) >> $(PUBNUB_CRYPTO_MIN_JS) + $(ECHO) "})();" >> $(PUBNUB_CRYPTO_MIN_JS) + +.PHONY : clean +clean: + rm -f $(OUTPUT_FILES) + +include ../Makefile.post diff --git a/core/examples/advanced.html b/web/examples/advanced.html similarity index 99% rename from core/examples/advanced.html rename to web/examples/advanced.html index 65cf9fbc1..ede12616b 100644 --- a/core/examples/advanced.html +++ b/web/examples/advanced.html @@ -1,7 +1,7 @@
diff --git a/core/examples/encrypted_chat_demo.html b/web/examples/encrypted_chat_demo.html similarity index 94% rename from core/examples/encrypted_chat_demo.html rename to web/examples/encrypted_chat_demo.html index 982d9307d..bc474d324 100644 --- a/core/examples/encrypted_chat_demo.html +++ b/web/examples/encrypted_chat_demo.html @@ -31,10 +31,9 @@

AES256 Encryption Demo for JavaScript

- + - - + + diff --git a/web/pubnub-3.4.2.min.js b/web/pubnub-3.4.2.min.js deleted file mode 100644 index 110d4360a..000000000 --- a/web/pubnub-3.4.2.min.js +++ /dev/null @@ -1,30 +0,0 @@ -// 3.4.2 -(function(){ -var l=null;function p(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function a(){try{return this.valueOf()}catch(a){return l}}function c(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b=w[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function b(d,k){var i,h,j,t,q,f=e,g=k[d];g&&"object"===typeof g&&(g=a.call(g));"function"===typeof n&&(g=n.call(k,d,g));switch(typeof g){case "string":return c(g);case "number":return isFinite(g)?String(g):"null";case "boolean":case "null":return String(g); -case "object":if(!g)return"null";e+=s;q=[];if("[object Array]"===Object.prototype.toString.apply(g)){t=g.length;for(i=0;iu()?(clearTimeout(d),d=setTimeout(b,c)):(e=u(),a())}var d,e=0;return b},x=function(a){return document.getElementById(a)},y=function(a){console.error(a)},ca=function(a,c){var b=[];z(a.split(/\s+/),function(a){z((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},z=function(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")},P=function(a){function c(a,b){U||(U=1,a||m(b),f.onerror=l,clearTimeout(A),setTimeout(function(){a&&B();var b=x(g),c=b&&b.parentNode;c&&c.removeChild(b)},O))}if(J||K()){a:{var b,d,e=function(){if(!w){w=1;clearTimeout(v); -try{d=JSON.parse(b.responseText)}catch(a){return h(1)}i(d)}},s=0,w=0,n=a.timeout||ja,v=setTimeout(function(){h(1)},n),k=a.b||p(),i=a.c||p(),h=function(a){s||(s=1,clearTimeout(v),b&&(b.onerror=b.onload=l,b.abort&&b.abort(),b=l),a&&k())};try{b=K()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){h(1)};b.onload=b.onloadend=e;b.timeout=n;var j=a.url.join(ka);if(a.data){var e=[],t,j=j+"?";for(t in a.data)e.push(t+"="+a.data[t]);j+=e.join(la)}b.open("GET",j, -typeof("undefined"===a.i));b.send()}catch(q){h(0);J=0;a=P(a);break a}a=h}return a}var f=ia("script"),j=a.a,g=r(),U=0,A=setTimeout(function(){c(1)},a.timeout||ja),B=a.b||p(),m=a.c||p();window[j]=function(a){c(0,a)};a.i||(f[ma]=ma);f.onerror=function(){c(1)};f.src=a.url.join(ka);if(a.data){j=[];f.src+="?";for(e in a.data)j.push(e+"="+a.data[e]);f.src+=j.join(la)}F(f,"id",g);ga().appendChild(f);return c},na=function(a){var c=[];z(a,function(a,d){d.h&&c.push(a)});return c.sort()},ra=function(){setTimeout(function(){Q|| -(Q=1,z(qa,function(a){a()}))},O)},K=function(){if(!sa||!sa.get)return 0;var a={id:K.id++,send:p(),abort:function(){a.id={}},open:function(c,b){K[a.id]=a;sa.get(a.id,b)}};return a},aa=1,ea=/{([\w\-]+)}/g,ma="async",ka="/",la="&",ja=1E4,O=1E3,R="-pnpres",J=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||p());var S,V=window.localStorage;S={get:function(a){try{return V?V.getItem(a):-1== -document.cookie.indexOf(a)?l:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||l}catch(c){}},set:function(a,c){try{if(V)return V.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var W,ta=Math.floor(20*Math.random());W=function(a,c){return 0++ta?ta:ta=1))||a};var Y={list:{},unbind:function(a){Y.list[a]=[]},bind:function(a,c){(Y.list[a]=Y.list[a]||[]).push(c)},fire:function(a, -c){z(Y.list[a]||[],function(a){a(c)})}},Z=x("pubnub")||0,Q=0,qa=[],ua=function(a){function c(){}function b(){}function d(a){a&&(k.g=0);!k.g&&k.length&&(k.g=1,P(k.shift()))}function e(a){z(na(v),function(b){(b=v[b])&&a(b)})}function s(){!("onLine"in navigator)||navigator.onLine||n();setTimeout(s,O)}function w(){D.time(function(a){a||n();setTimeout(w,A)})}function n(){j&&j(1)}a.jsonp&&(J=0);var v={},k=[],i=0,h=0,j=0,t=0,q=0,f=0,g=+a.windowing||10,U=(+a.timeout||310)*O,A=(+a.keepalive||60)*O,B=a.publish_key|| -"",m=a.subscribe_key||"",T=a.ssl?"s":"",G=a.uuid||S.get(m+"uuid")||"",L="http"+T+"://"+(a.origin||"pubsub.pubnub.com"),H=W(L),oa=W(L),D={history:function(a,b){var b=a.callback||b,c=a.count||a.limit||100,d=a.reverse||"false",e=a.error||p(),g=a.channel,j=a.start,h=a.end,f={},i=M();if(!g)return y("Missing Channel");if(!b)return y("Missing Callback");if(!m)return y("Missing Subscribe Key");f.stringtoken="true";f.count=c;f.reverse=d;i&&(f.callback=i);j&&(f.start=j);h&&(f.end=h);P({a:i,data:f,c:function(a){b(a)}, -b:e,url:[H,"v2","history","sub-key",m,"channel",N(g)]})},replay:function(a){var b=b||a.callback||p(),c=a.source,d=a.destination,e=a.stop,f=a.start,g=a.end,j=a.reverse,a=a.limit,h=M(),i={};if(!c)return y("Missing Source Channel");if(!d)return y("Missing Destination Channel");if(!B)return y("Missing Publish Key");if(!m)return y("Missing Subscribe Key");"0"!=h&&(i.callback=h);e&&(i.stop="all");j&&(i.reverse="true");f&&(i.start=f);g&&(i.end=g);a&&(i.count=a);P({a:h,c:function(a){b(a)},b:function(){b([0, -"Disconnected"])},url:[H,"v1","replay",B,m,c,d],data:i})},time:function(a){var b=M();P({a:b,timeout:5*O,url:[H,"time",b],c:function(b){a(b[0])},b:function(){a(0)}})},publish:function(a,b){var b=b||a.callback||p(),c=a.message,e=a.channel,f=M();if(!c)return y("Missing Message");if(!e)return y("Missing Channel");if(!B)return y("Missing Publish Key");if(!m)return y("Missing Subscribe Key");c=JSON.stringify(c);e=[H,"publish",B,m,0,N(e),f,N(c)];k.push({a:f,timeout:5*O,url:e,data:{uuid:G},c:function(a){b(a); -d(1)},b:function(){b([0,"Failed",c]);d(1)}});d()},unsubscribe:function(a){a=a.channel;f=0;t=1;a=C((a.join?a.join(","):""+a).split(","),function(a){return a+","+a+R}).join(",");z(a.split(","),function(a){Q&&b(a,0);v[a]=0});Q&&c()},subscribe:function(a,b){function d(a){a?setTimeout(k,O):(H=W(L,1),oa=W(L,1),setTimeout(function(){D.time(d)},O));e(function(b){if(a&&b.d)return b.d=0,b.m(b.name);!a&&!b.d&&(b.d=1,b.l(b.name))})}function k(){var a=M(),b=na(v).join(",");b&&(j=P({timeout:wa,a:a,b:function(){D.time(d)}, -data:{uuid:G},url:[oa,"subscribe",m,N(b),a,f],c:function(a){if(!a)return setTimeout(k,pa);e(function(a){a.f||(a.f=1,a.k(a.name))});f=!f&&t&&S.get(m)||a[1];S.set(m,a[1]);var b,c=(2q;q++)c+=String.fromCharCode(b[q]);return c},u=function(b,f){var c=[],d;if(!f)try{b=unescape(encodeURIComponent(b))}catch(q){throw"Error on UTF-8 encode";}for(d=0;dj.length&&(t=16-j.length,r=[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t]);for(t=0;td;d++)c[d]=f[b[d]];return c},E=function(b){var f=[],c=s?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],d;for(d=0;16>d;d++)f[d]=b[c[d]];return f},F=function(b){var f=[],c;if(s)for(c=0;4>c;c++)f[4*c]=L[b[4*c]]^M[b[1+4*c]]^N[b[2+4*c]]^O[b[3+4*c]],f[1+4*c]=O[b[4*c]]^L[b[1+4*c]]^M[b[2+4*c]]^N[b[3+4*c]],f[2+4*c]=N[b[4*c]]^O[b[1+4*c]]^L[b[2+4*c]]^M[b[3+4*c]], -f[3+4*c]=M[b[4*c]]^N[b[1+4*c]]^O[b[2+4*c]]^L[b[3+4*c]];else for(c=0;4>c;c++)f[4*c]=P[b[4*c]]^Q[b[1+4*c]]^b[2+4*c]^b[3+4*c],f[1+4*c]=b[4*c]^P[b[1+4*c]]^Q[b[2+4*c]]^b[3+4*c],f[2+4*c]=b[4*c]^b[1+4*c]^P[b[2+4*c]]^Q[b[3+4*c]],f[3+4*c]=Q[b[4*c]]^b[1+4*c]^b[2+4*c]^P[b[3+4*c]];return f},C=function(b,f,c){var d=[],q;for(q=0;16>q;q++)d[q]=b[q]^f[c][q];return d},B=function(b,f){var c=[],d;for(d=0;16>d;d++)c[d]=b[d]^f[d];return c},x=function(b){var f=[],c=[],d,q,p=[];for(d=0;db;b++)c[b]=f[d-1][b];if(0===d%j){b=c[0];q=void 0;for(q=0;4>q;q++)c[q]=c[q+1];c[3]=b;c=G(c);c[0]^=X[d/j-1]}else 6b;b++)f[d][b]=f[d-j][b]^c[b]}for(d=0;dc;c++)p[d].push(f[4*d+c][0],f[4*d+c][1],f[4*d+c][2],f[4*d+c][3])}return p},G=function(b){for(var f=0;4>f;f++)b[f]=S[b[f]];return b},H=function(b,f){var c=[];for(i=0;ic;c++){for(var d=f,q=c,e=b,j=c,m=void 0,p=void 0,m=p=0;8>m;m++)p=1==(j&1)?p^e:p,e=127>>=1;d[q]=p}return f},S=H("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", -2),U,V=S,W=[];for(i=0;i>2],c+=K[(f[d]&3)<<4|f[d+1]>>4],c=void 0!== -f[d+1]?c+K[(f[d+1]&15)<<2|f[d+2]>>6]:c+"=",c=void 0!==f[d+2]?c+K[f[d+2]&63]:c+"=";b=c.slice(0,64);for(d=1;d>4,d[1]=(c[1]&15)<<4|c[2]>>2,d[2]=(c[2]&3)<<6|c[3],f.push(d[0],d[1],d[2]); -return f=f.slice(0,f.length-f.length%16)}};return{size:function(b){switch(b){case 128:e=10;j=4;break;case 192:e=12;j=6;break;case 256:e=14;j=8;break;default:throw"Invalid Key Size Specified:"+b;}},h2a:function(b){var f=[];b.replace(/(..)/g,function(b){f.push(parseInt(b,16))});return f},expandKey:x,encryptBlock:z,decryptBlock:D,Decrypt:s,s2a:u,rawEncrypt:r,rawDecrypt:w,dec:function(b,f,c){var b=R.decode(b),d=b.slice(8,16),d=p(u(f,c),d),f=d.key,d=d.iv,b=b.slice(16,b.length);return b=w(b,f,d,c)},openSSLKey:p, -a2h:function(b){var f="",c;for(c=0;cb[c]?"0":"")+b[c].toString(16);return f},enc:function(b,f,c){var d;d=[];var e;for(e=0;8>e;e++)d=d.concat(Math.floor(256*Math.random()));e=p(u(f,c),d);f=e.key;e=e.iv;d=[[83,97,108,116,101,100,95,95].concat(d)];b=u(b,c);b=r(b,f,e);b=d.concat(b);return R.encode(b)},Hash:{MD5:function(b){function f(b,c){var d,e,f,g,h;f=b&2147483648;g=c&2147483648;d=b&1073741824;e=c&1073741824;h=(b&1073741823)+(c&1073741823);return d&e?h^2147483648^f^g:d|e?h&1073741824? -h^3221225472^f^g:h^1073741824^f^g:h^f^g}function c(b,c,d,e,g,h,k){b=f(b,f(f(c&d|~c&e,g),k));return f(b<>>32-h,c)}function d(b,c,d,e,g,h,k){b=f(b,f(f(c&e|d&~e,g),k));return f(b<>>32-h,c)}function e(b,c,d,g,h,k,l){b=f(b,f(f(c^d^g,h),l));return f(b<>>32-k,c)}function j(b,c,d,e,g,h,k){b=f(b,f(f(d^(c|~e),g),k));return f(b<>>32-h,c)}function p(b){var c,d,e=[];for(d=0;3>=d;d++)c=b>>>8*d&255,e=e.concat(c);return e}var m=[],r,s,w,t,g,h,k,l,n=H("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", -8),m=b.length;r=m+8;s=16*((r-r%64)/64+1);w=[];for(g=t=0;g>>29;m=w;g=n[0];h=n[1];k=n[2];l=n[3];for(b=0;b>16)+(j>>16)+(p>>16)<<16|p&65535}function s(e,j){return e>>>j|e<<32-j}var v;v=e.replace(/\r\n/g,"\n");for(var e="",u=0;up?e+=String.fromCharCode(p):(127p?e+=String.fromCharCode(p>>6|192):(e+=String.fromCharCode(p>>12|224),e+=String.fromCharCode(p>>6&63|128)),e+=String.fromCharCode(p&63|128))}u=e;v=[];for(p=0;p<8*u.length;p+=8)v[p>>5]|=(u.charCodeAt(p/8)&255)<<24-p%32;var r=8*e.length, -u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909, -275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],p=Array(64),w,z,D,y,E,F,C,B,x,G,H;v[r>>5]|=128<<24-r%32;v[(r+64>>9<<4)+15]=r;for(B=0;Bx;x++)p[x]=16>x?v[x+B]:j(j(j(s(p[x-2],17)^s(p[x-2],19)^p[x- -2]>>>10,p[x-7]),s(p[x-15],7)^s(p[x-15],18)^p[x-15]>>>3),p[x-16]),G=j(j(j(j(C,s(y,6)^s(y,11)^s(y,25)),y&E^~y&F),u[x]),p[x]),H=j(s(r,2)^s(r,13)^s(r,22),r&w^r&z^w&z),C=F,F=E,E=y,y=j(D,G),D=z,z=w,w=r,r=j(G,H);e[0]=j(r,e[0]);e[1]=j(w,e[1]);e[2]=j(z,e[2]);e[3]=j(D,e[3]);e[4]=j(y,e[4]);e[5]=j(E,e[5]);e[6]=j(F,e[6]);e[7]=j(C,e[7])}v="";for(u=0;u<4*e.length;u++)v+="0123456789abcdef".charAt(e[u>>2]>>8*(3-u%4)+4&15)+"0123456789abcdef".charAt(e[u>>2]>>8*(3-u%4)&15);return v}; -})(); diff --git a/web/pubnub-crypto.min.js b/web/pubnub-crypto.min.js index 209ee5218..e43568caa 100644 --- a/web/pubnub-crypto.min.js +++ b/web/pubnub-crypto.min.js @@ -1,25 +1,25 @@ (function(){ -PUBNUB.crypto=function(){var e=14,j=8,s=!1,v=function(b,f){var c="",d,q;if(f){d=b[15];if(16q;q++)c+=String.fromCharCode(b[q]);return c},u=function(b,f){var c=[],d;if(!f)try{b=unescape(encodeURIComponent(b))}catch(q){throw"Error on UTF-8 encode";}for(d=0;dj.length&&(t=16-j.length,r=[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t]);for(t=0;td;d++)c[d]=f[b[d]];return c},E=function(b){var f=[],c=s?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],d;for(d=0;16>d;d++)f[d]=b[c[d]];return f},F=function(b){var f=[],c;if(s)for(c=0;4>c;c++)f[4*c]=L[b[4*c]]^M[b[1+4*c]]^N[b[2+4*c]]^O[b[3+4*c]],f[1+4*c]=O[b[4*c]]^L[b[1+4*c]]^M[b[2+4*c]]^N[b[3+4*c]],f[2+4*c]=N[b[4*c]]^O[b[1+4*c]]^L[b[2+4*c]]^M[b[3+4*c]], -f[3+4*c]=M[b[4*c]]^N[b[1+4*c]]^O[b[2+4*c]]^L[b[3+4*c]];else for(c=0;4>c;c++)f[4*c]=P[b[4*c]]^Q[b[1+4*c]]^b[2+4*c]^b[3+4*c],f[1+4*c]=b[4*c]^P[b[1+4*c]]^Q[b[2+4*c]]^b[3+4*c],f[2+4*c]=b[4*c]^b[1+4*c]^P[b[2+4*c]]^Q[b[3+4*c]],f[3+4*c]=Q[b[4*c]]^b[1+4*c]^b[2+4*c]^P[b[3+4*c]];return f},C=function(b,f,c){var d=[],q;for(q=0;16>q;q++)d[q]=b[q]^f[c][q];return d},B=function(b,f){var c=[],d;for(d=0;16>d;d++)c[d]=b[d]^f[d];return c},x=function(b){var f=[],c=[],d,q,p=[];for(d=0;db;b++)c[b]=f[d-1][b];if(0===d%j){b=c[0];q=void 0;for(q=0;4>q;q++)c[q]=c[q+1];c[3]=b;c=G(c);c[0]^=X[d/j-1]}else 6b;b++)f[d][b]=f[d-j][b]^c[b]}for(d=0;dc;c++)p[d].push(f[4*d+c][0],f[4*d+c][1],f[4*d+c][2],f[4*d+c][3])}return p},G=function(b){for(var f=0;4>f;f++)b[f]=S[b[f]];return b},H=function(b,f){var c=[];for(i=0;ic;c++){for(var d=f,q=c,e=b,j=c,m=void 0,p=void 0,m=p=0;8>m;m++)p=1==(j&1)?p^e:p,e=127>>=1;d[q]=p}return f},S=H("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", -2),U,V=S,W=[];for(i=0;i>2],c+=K[(f[d]&3)<<4|f[d+1]>>4],c=void 0!== -f[d+1]?c+K[(f[d+1]&15)<<2|f[d+2]>>6]:c+"=",c=void 0!==f[d+2]?c+K[f[d+2]&63]:c+"=";b=c.slice(0,64);for(d=1;d>4,d[1]=(c[1]&15)<<4|c[2]>>2,d[2]=(c[2]&3)<<6|c[3],f.push(d[0],d[1],d[2]); -return f=f.slice(0,f.length-f.length%16)}};return{size:function(b){switch(b){case 128:e=10;j=4;break;case 192:e=12;j=6;break;case 256:e=14;j=8;break;default:throw"Invalid Key Size Specified:"+b;}},h2a:function(b){var f=[];b.replace(/(..)/g,function(b){f.push(parseInt(b,16))});return f},expandKey:x,encryptBlock:z,decryptBlock:D,Decrypt:s,s2a:u,rawEncrypt:r,rawDecrypt:w,dec:function(b,f,c){var b=R.decode(b),d=b.slice(8,16),d=p(u(f,c),d),f=d.key,d=d.iv,b=b.slice(16,b.length);return b=w(b,f,d,c)},openSSLKey:p, -a2h:function(b){var f="",c;for(c=0;cb[c]?"0":"")+b[c].toString(16);return f},enc:function(b,f,c){var d;d=[];var e;for(e=0;8>e;e++)d=d.concat(Math.floor(256*Math.random()));e=p(u(f,c),d);f=e.key;e=e.iv;d=[[83,97,108,116,101,100,95,95].concat(d)];b=u(b,c);b=r(b,f,e);b=d.concat(b);return R.encode(b)},Hash:{MD5:function(b){function f(b,c){var d,e,f,g,h;f=b&2147483648;g=c&2147483648;d=b&1073741824;e=c&1073741824;h=(b&1073741823)+(c&1073741823);return d&e?h^2147483648^f^g:d|e?h&1073741824? -h^3221225472^f^g:h^1073741824^f^g:h^f^g}function c(b,c,d,e,g,h,k){b=f(b,f(f(c&d|~c&e,g),k));return f(b<>>32-h,c)}function d(b,c,d,e,g,h,k){b=f(b,f(f(c&e|d&~e,g),k));return f(b<>>32-h,c)}function e(b,c,d,g,h,k,l){b=f(b,f(f(c^d^g,h),l));return f(b<>>32-k,c)}function j(b,c,d,e,g,h,k){b=f(b,f(f(d^(c|~e),g),k));return f(b<>>32-h,c)}function p(b){var c,d,e=[];for(d=0;3>=d;d++)c=b>>>8*d&255,e=e.concat(c);return e}var m=[],r,s,w,t,g,h,k,l,n=H("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", -8),m=b.length;r=m+8;s=16*((r-r%64)/64+1);w=[];for(g=t=0;g>>29;m=w;g=n[0];h=n[1];k=n[2];l=n[3];for(b=0;bp;p++)c+=String.fromCharCode(b[p]);return c},t=function(b,f){var c=[],d;if(!f)try{b=unescape(encodeURIComponent(b))}catch(p){throw"Error on UTF-8 encode";}for(d=0;dj.length&&(s=16-j.length,q=[s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s]);for(s=0;sd;d++)c[d]=f[b[d]];return c},D=function(b){var f=[],c=r?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],d;for(d=0;16>d;d++)f[d]=b[c[d]];return f},E=function(b){var f=[],c;if(r)for(c=0;4>c;c++)f[4*c]=K[b[4*c]]^L[b[1+4*c]]^M[b[2+4*c]]^N[b[3+4*c]],f[1+4*c]=N[b[4*c]]^K[b[1+4*c]]^L[b[2+4*c]]^M[b[3+4*c]],f[2+4*c]=M[b[4*c]]^N[b[1+4*c]]^K[b[2+4*c]]^L[b[3+4*c]], +f[3+4*c]=L[b[4*c]]^M[b[1+4*c]]^N[b[2+4*c]]^K[b[3+4*c]];else for(c=0;4>c;c++)f[4*c]=O[b[4*c]]^P[b[1+4*c]]^b[2+4*c]^b[3+4*c],f[1+4*c]=b[4*c]^O[b[1+4*c]]^P[b[2+4*c]]^b[3+4*c],f[2+4*c]=b[4*c]^b[1+4*c]^O[b[2+4*c]]^P[b[3+4*c]],f[3+4*c]=P[b[4*c]]^b[1+4*c]^b[2+4*c]^O[b[3+4*c]];return f},B=function(b,f,c){var d=[],p;for(p=0;16>p;p++)d[p]=b[p]^f[c][p];return d},A=function(b,f){var c=[],d;for(d=0;16>d;d++)c[d]=b[d]^f[d];return c},w=function(b){var f=[],c=[],d,p,o=[];for(d=0;db;b++)c[b]=f[d-1][b];if(0===d%j){b=c[0];p=void 0;for(p=0;4>p;p++)c[p]=c[p+1];c[3]=b;c=F(c);c[0]^=W[d/j-1]}else 6b;b++)f[d][b]=f[d-j][b]^c[b]}for(d=0;dc;c++)o[d].push(f[4*d+c][0],f[4*d+c][1],f[4*d+c][2],f[4*d+c][3])}return o},F=function(b){for(var f=0;4>f;f++)b[f]=R[b[f]];return b},G=function(b,f){var c=[];for(i=0;ic;c++){for(var d=f,p=c,e=b,j=c,m=void 0,o=void 0,m=o=0;8>m;m++)o=1==(j&1)?o^e:o,e=127>>=1;d[p]=o}return f},R=G("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", +2),T,U=R,V=[];for(i=0;i>2],c+=J[(f[d]&3)<<4|f[d+1]>>4],c+= +void 0!==f[d+1]?J[(f[d+1]&15)<<2|f[d+2]>>6]:"=",c+=void 0!==f[d+2]?J[f[d+2]&63]:"=";b=c.slice(0,64);for(d=1;d>4,d[1]=(c[1]&15)<<4|c[2]>>2,d[2]=(c[2]&3)<<6|c[3],f.push(d[0],d[1],d[2]); +return f=f.slice(0,f.length-f.length%16)}};return{size:function(b){switch(b){case 128:e=10;j=4;break;case 192:e=12;j=6;break;case 256:e=14;j=8;break;default:throw"Invalid Key Size Specified:"+b;}},h2a:function(b){var f=[];b.replace(/(..)/g,function(b){f.push(parseInt(b,16))});return f},expandKey:w,encryptBlock:y,decryptBlock:C,Decrypt:r,s2a:t,rawEncrypt:q,rawDecrypt:v,dec:function(b,f,c){var b=Q.decode(b),d=b.slice(8,16),d=o(t(f,c),d),f=d.key,d=d.iv,b=b.slice(16,b.length);return b=v(b,f,d,c)},openSSLKey:o, +a2h:function(b){var f="",c;for(c=0;cb[c]?"0":"")+b[c].toString(16);return f},enc:function(b,f,c){var d;d=[];var e;for(e=0;8>e;e++)d=d.concat(Math.floor(256*Math.random()));e=o(t(f,c),d);f=e.key;e=e.iv;d=[[83,97,108,116,101,100,95,95].concat(d)];b=t(b,c);b=q(b,f,e);b=d.concat(b);return Q.encode(b)},Hash:{MD5:function(b){function f(b,c){var d,e,f,g,h;f=b&2147483648;g=c&2147483648;d=b&1073741824;e=c&1073741824;h=(b&1073741823)+(c&1073741823);return d&e?h^2147483648^f^g:d|e?h&1073741824? +h^3221225472^f^g:h^1073741824^f^g:h^f^g}function c(b,c,d,e,g,h,k){b=f(b,f(f(c&d|~c&e,g),k));return f(b<>>32-h,c)}function d(b,c,d,e,g,h,k){b=f(b,f(f(c&e|d&~e,g),k));return f(b<>>32-h,c)}function e(b,c,d,g,h,k,l){b=f(b,f(f(c^d^g,h),l));return f(b<>>32-k,c)}function j(b,c,d,e,g,h,k){b=f(b,f(f(d^(c|~e),g),k));return f(b<>>32-h,c)}function o(b){var c,d,e=[];for(d=0;3>=d;d++)c=b>>>8*d&255,e=e.concat(c);return e}var m=[],q,r,v,s,g,h,k,l,n=G("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", +8),m=b.length;q=m+8;r=16*((q-q%64)/64+1);v=[];for(g=s=0;g>>29;m=v;g=n[0];h=n[1];k=n[2];l=n[3];for(b=0;b>16)+(j>>16)+(p>>16)<<16|p&65535}function s(e,j){return e>>>j|e<<32-j}var v;v=e.replace(/\r\n/g,"\n");for(var e="",u=0;up?e+=String.fromCharCode(p):(127p?e+=String.fromCharCode(p>>6|192):(e+=String.fromCharCode(p>>12|224),e+=String.fromCharCode(p>>6&63|128)),e+=String.fromCharCode(p&63|128))}u=e;v=[];for(p=0;p<8*u.length;p+=8)v[p>>5]|=(u.charCodeAt(p/8)&255)<<24-p%32;var r=8*e.length, -u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909, -275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],p=Array(64),w,z,D,y,E,F,C,B,x,G,H;v[r>>5]|=128<<24-r%32;v[(r+64>>9<<4)+15]=r;for(B=0;Bx;x++)p[x]=16>x?v[x+B]:j(j(j(s(p[x-2],17)^s(p[x-2],19)^p[x- -2]>>>10,p[x-7]),s(p[x-15],7)^s(p[x-15],18)^p[x-15]>>>3),p[x-16]),G=j(j(j(j(C,s(y,6)^s(y,11)^s(y,25)),y&E^~y&F),u[x]),p[x]),H=j(s(r,2)^s(r,13)^s(r,22),r&w^r&z^w&z),C=F,F=E,E=y,y=j(D,G),D=z,z=w,w=r,r=j(G,H);e[0]=j(r,e[0]);e[1]=j(w,e[1]);e[2]=j(z,e[2]);e[3]=j(D,e[3]);e[4]=j(y,e[4]);e[5]=j(E,e[5]);e[6]=j(F,e[6]);e[7]=j(C,e[7])}v="";for(u=0;u<4*e.length;u++)v+="0123456789abcdef".charAt(e[u>>2]>>8*(3-u%4)+4&15)+"0123456789abcdef".charAt(e[u>>2]>>8*(3-u%4)&15);return v}; +11],10,n[65]),k=j(k,l,g,h,m[b+2],15,n[66]),h=j(h,k,l,g,m[b+9],21,n[67]),g=f(g,q),h=f(h,r),k=f(k,v),l=f(l,s);return o(g).concat(o(h),o(k),o(l))}},Base64:Q}}(); +PUBNUB.secure=function(){function e(e){var j=r.s2a(JSON.stringify(e)),j=r.rawEncrypt(j,u,t);return r.Base64.encode(j)||e.data.message}function j(e,j){j=j?j:{};try{var v=r.Base64.decode(e),y=r.rawDecrypt(v,u,t,!1);return JSON.parse(y)}catch(C){return j.parse_error||null}}var r=PUBNUB.crypto;r.size(256);var u="",t=r.s2a("0123456789012345");return function(o){u=r.s2a(SHA256(o.cipher_key).slice(0,32));var q=PUBNUB.init(o);return{raw_encrypt:e,raw_decrypt:j,time:PUBNUB.time,publish:function(j){j.message= +e(j.message);return q.publish(j)},subscribe:function(e){var o=e.callback||e.message;e.callback=function(e,q,r){(e=j(e))&&o(e,q,r)};return q.subscribe(e)},history:function(e){var o="",r=e.callback;e.callback=function(e){o=e[0];var q=[];for(a=0;a>16)+(j>>16)+(o>>16)<<16|o&65535}function r(e,j){return e>>>j|e<<32-j}var u;u=e.replace(/\r\n/g,"\n");for(var e="",t=0;to?e+=String.fromCharCode(o):(127o?e+=String.fromCharCode(o>>6|192):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128)),e+=String.fromCharCode(o&63|128))}t=e;u=[];for(o=0;o<8*t.length;o+=8)u[o>>5]|=(t.charCodeAt(o/8)&255)<<24-o%32;var q=8*e.length, +t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909, +275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],o=Array(64),v,y,C,x,D,E,B,A,w,F,G;u[q>>5]|=128<<24-q%32;u[(q+64>>9<<4)+15]=q;for(A=0;Aw;w++)o[w]=16>w?u[w+A]:j(j(j(r(o[w-2],17)^r(o[w-2],19)^o[w- +2]>>>10,o[w-7]),r(o[w-15],7)^r(o[w-15],18)^o[w-15]>>>3),o[w-16]),F=j(j(j(j(B,r(x,6)^r(x,11)^r(x,25)),x&D^~x&E),t[w]),o[w]),G=j(r(q,2)^r(q,13)^r(q,22),q&v^q&y^v&y),B=E,E=D,D=x,x=j(C,F),C=y,y=v,v=q,q=j(F,G);e[0]=j(q,e[0]);e[1]=j(v,e[1]);e[2]=j(y,e[2]);e[3]=j(C,e[3]);e[4]=j(x,e[4]);e[5]=j(D,e[5]);e[6]=j(E,e[6]);e[7]=j(B,e[7])}u="";for(t=0;t<4*e.length;t++)u+="0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)+4&15)+"0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)&15);return u}; })(); diff --git a/web/pubnub.js b/web/pubnub.js index d334b5c72..ee8edc121 100644 --- a/web/pubnub.js +++ b/web/pubnub.js @@ -1,4 +1,4 @@ -// 3.4.2 +// Version: 3.4.4 /* =-====================================================================-= */ /* =-====================================================================-= */ /* =-========================= JSON =============================-= */ @@ -149,73 +149,18 @@ JSON['parse'] = function (text) {return eval('('+text+')')}; } }()); -/* --------------------------------------------------------------------------- -WAIT! - This file depends on instructions from the PUBNUB Cloud. -http://www.pubnub.com/account-javascript-api-include ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 PubNub Inc. -http://www.pubnub.com/ -http://www.pubnub.com/terms ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ---------------------------------------------------------------------------- */ - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= UTIL =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -window['PUBNUB'] || (function() { - -/** - * UTIL LOCALS - */ var NOW = 1 -, SWF = 'https://pubnub.a.ssl.fastly.net/pubnub.swf' -, REPL = /{([\w\-]+)}/g -, ASYNC = 'async' -, URLBIT = '/' -, PARAMSBIT = '&' +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' , DEF_WINDOWING = 10 // MILLISECONDS. , DEF_TIMEOUT = 10000 // MILLISECONDS. , DEF_SUB_TIMEOUT = 310 // SECONDS. , DEF_KEEPALIVE = 60 // SECONDS. , SECOND = 1000 // A THOUSAND MILLISECONDS. -, PRESENCE_SUFFIX = '-pnpres' -, UA = navigator.userAgent -, XORIGN = UA.indexOf('MSIE 6') == -1; - -/** - * CONSOLE COMPATIBILITY - */ -window.console || (window.console=window.console||{}); -console.log || ( - console.log = - console.error = - ((window.opera||{}).postError||function(){}) -); +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; /** * UTILITIES @@ -223,31 +168,6 @@ console.log || ( function unique() { return'x'+ ++NOW+''+(+new Date) } function rnow() { return+new Date } -/** - * LOCAL STORAGE OR COOKIE - */ -var db = (function(){ - var ls = window['localStorage']; - return { - 'get' : function(key) { - try { - if (ls) return ls.getItem(key); - if (document.cookie.indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - } catch(e) { return } - }, - 'set' : function( key, value ) { - try { - if (ls) return ls.setItem( key, value ) && 0; - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } catch(e) { return } - } - }; -})(); - /** * NEXTORIGIN * ========== @@ -266,6 +186,26 @@ var nextorigin = (function() { } })(); + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + /** * UPDATER * ======= @@ -288,64 +228,6 @@ function updater( fun, rate ) { return runnit; } -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * ERROR - * ===== - * error('message'); - */ -function error(message) { console['error'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - /** * GREP * ==== @@ -368,80 +250,6 @@ function supplant( str, values ) { } ); } -/** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * ... - * } ); - */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); -} - -/** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); - */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; -} - -/** - * HEAD - * ==== - * head().appendChild(elm); - */ -function head() { return search('head')[0] } - -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); -} - -/** - * CSS - * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - /** * timeout * ======= @@ -467,11 +275,33 @@ function uuid(callback) { } /** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); + * EACH + * ==== + * each( [1,2,3], function(item) { } ) */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) + */ +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} /** * ENCODE @@ -486,175 +316,9 @@ function encode(path) { } /** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * - */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; - -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , xhrtme = setup.timeout || DEF_TIMEOUT - , timer = timeout( function(){done(1)}, xhrtme ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - if (!setup.blocking) script[ASYNC] = ASYNC; - - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); - - if (setup.data) { - var params = []; - script.src += "?"; - for (var key in setup.data) { - params.push(key+"="+setup.data[key]); - } - script.src += params.join(PARAMSBIT); - } - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr, response - , finished = function() { - if (loaded) return; - loaded = 1; - - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , xhrtme = setup.timeout || DEF_TIMEOUT - , timer = timeout( function(){done(1)}, xhrtme ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = xhrtme; - - var url = setup.url.join(URLBIT); - if (setup.data) { - var params = []; - var key; - url += "?"; - for (key in setup.data) params.push(key+"="+setup.data[key]); - url += params.join(PARAMSBIT); - } - - xhr.open( 'GET', url, (typeof(setup.blocking === 'undefined')) ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); - } - - // Return 'done' - return done; -} - -/** - * Generate Subscription Channel List - * ================================== - * generate_channel_list(channels_object); + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); */ function generate_channel_list(channels) { var list = []; @@ -664,41 +328,78 @@ function generate_channel_list(channels) { return list.sort(); } -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -var PDIV = $('pubnub') || 0 -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - - // Force JSONP if requested from user. - if (setup['jsonp']) XORIGN = 0; +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } - var CHANNELS = {} - , PUB_QUEUE = [] - , SUB_CALLBACK = 0 - , SUB_CHANNEL = 0 - , SUB_RECEIVER = 0 - , SUB_RESTORE = 0 - , SUB_BUFF_WAIT = 0 - , TIMETOKEN = 0 - , SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND , PUBLISH_KEY = setup['publish_key'] || '' , SUBSCRIBE_KEY = setup['subscribe_key'] || '' , SSL = setup['ssl'] ? 's' : '' - , UUID = setup['uuid'] || db['get'](SUBSCRIBE_KEY+'uuid') || '' , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') , STD_ORIGIN = nextorigin(ORIGIN) , SUB_ORIGIN = nextorigin(ORIGIN) - , LEAVE = function(){} , CONNECT = function(){} - , SELF = { + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, /* PUBNUB.history({ channel : 'my_chat_channel', @@ -707,7 +408,7 @@ var PDIV = $('pubnub') || 0 }); */ 'history' : function( args, callback ) { - var callback = args['callback'] || callback + var callback = args['callback'] || callback , count = args['count'] || args['limit'] || 100 , reverse = args['reverse'] || "false" , err = args['error'] || function(){} @@ -868,7 +569,7 @@ var PDIV = $('pubnub') || 0 // Iterate over Channels each( channel.split(','), function(channel) { - if (READY) LEAVE( channel, 0 ); + if (READY) SELF['LEAVE']( channel, 0 ); CHANNELS[channel] = 0; } ); @@ -891,6 +592,7 @@ var PDIV = $('pubnub') || 0 , disconnect = args['disconnect'] || function(){} , presence = args['presence'] || 0 , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 , sub_timeout = args['timeout'] || SUB_TIMEOUT , windowing = args['windowing'] || SUB_WINDOWING , restore = args['restore']; @@ -898,6 +600,8 @@ var PDIV = $('pubnub') || 0 // Restore Enabled? if (restore) SUB_RESTORE = 1; + TIMETOKEN = 0; + // Make sure we have a Channel if (!channel) return error('Missing Channel'); if (!callback) return error('Missing Callback'); @@ -1015,6 +719,12 @@ var PDIV = $('pubnub') || 0 SUB_RESTORE && db['get'](SUBSCRIBE_KEY) || messages[1]; + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + // Update Saved Timetoken db['set']( SUBSCRIBE_KEY, messages[1] ); @@ -1062,18 +772,21 @@ var PDIV = $('pubnub') || 0 }, 'here_now' : function( args, callback ) { - var callback = args['callback'] || callback + var callback = args['callback'] || callback , err = args['error'] || function(){} , channel = args['channel'] , jsonp = jsonp_cb() - , data = {}; + , data = null; // Make sure we have a Channel if (!channel) return error('Missing Channel'); if (!callback) return error('Missing Callback'); if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); - - if (jsonp != '0') data['callback'] = jsonp; + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } xdr({ callback : jsonp, @@ -1082,120 +795,436 @@ var PDIV = $('pubnub') || 0 fail : err, url : [ STD_ORIGIN, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, + 'sub_key', SUBSCRIBE_KEY, 'channel', encode(channel) ] }); }, // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'uuid' : uuid, - 'each' : each, - 'map' : map, - 'grep' : grep, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB - }; - - PUB_QUEUE.sending = 0; - function publish(next) { - if (next) PUB_QUEUE.sending = 0; - if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; - PUB_QUEUE.sending = 1; - xdr(PUB_QUEUE.shift()); - } - - function each_channel(callback) { - each( generate_channel_list(CHANNELS), function(channel) { - var chan = CHANNELS[channel]; - if (!chan) return; - callback(chan); - } ); - } - - if (!UUID) UUID = uuid(); - db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); - - // Return without Testing - if (setup['notest']) return SELF; - - // Announce Leave Event - LEAVE = function( channel, blocking ) { - var data = { 'uuid' : UUID } - , origin = nextorigin(ORIGIN) - , jsonp = jsonp_cb(); - - // Prevent Leaving a Presence Channel - if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; - - if (jsonp != '0') data['callback'] = jsonp; - - xdr({ - blocking : blocking || SSL, - timeout : 2000, - callback : jsonp, - data : data, - url : [ - origin, 'v2', 'presence', 'sub_key', - SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' - ] - }); + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater }; - // Add Leave Functions - bind( 'beforeunload', window, function() { - each_channel(function(ch){ LEAVE( ch.name, 1 ) }); - return true; - } ); - - // Test Connection State - function _is_online() { - if (!('onLine' in navigator)) return 1; - return navigator['onLine']; - } function _poll_online() { _is_online() || _reset_offline(); timeout( _poll_online, SECOND ); } + function _poll_online2() { SELF['time'](function(success){ success || _reset_offline(); timeout( _poll_online2, KEEPALIVE ); - }); + }) } + function _reset_offline() { SUB_RECEIVER && SUB_RECEIVER(1); } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + timeout( _poll_online, SECOND ); timeout( _poll_online2, KEEPALIVE ); - bind( 'offline', window, _reset_offline ); - bind( 'offline', document, _reset_offline ); - - // Return PUBNUB Socket Object return SELF; -}; +} +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= UTIL =============================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ -// PUBNUB READY TO CONNECT -function ready() { timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(connect) { connect() } ); -}, SECOND ); } +window['PUBNUB'] || (function() { + +/** + * UTIL LOCALS + */ + +var SWF = 'https://pubnub.a.ssl.fastly.net/pubnub.swf' +, ASYNC = 'async' +, UA = navigator.userAgent +, PNSDK = 'PubNub-JS-' + 'Web' + '/' + '3.4.4' +, XORIGN = UA.indexOf('MSIE 6') == -1; + +/** + * CONSOLE COMPATIBILITY + */ +window.console || (window.console=window.console||{}); +console.log || ( + console.log = + console.error = + ((window.opera||{}).postError||function(){}) +); + + + +/** + * LOCAL STORAGE OR COOKIE + */ +var db = (function(){ + var ls = window['localStorage']; + return { + 'get' : function(key) { + try { + if (ls) return ls.getItem(key); + if (document.cookie.indexOf(key) == -1) return null; + return ((document.cookie||'').match( + RegExp(key+'=([^;]+)') + )||[])[1] || null; + } catch(e) { return } + }, + 'set' : function( key, value ) { + try { + if (ls) return ls.setItem( key, value ) && 0; + document.cookie = key + '=' + value + + '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; + } catch(e) { return } + } + }; +})(); + + +/** + * $ + * = + * var div = $('divid'); + */ +function $(id) { return document.getElementById(id) } + +/** + * ERROR + * ===== + * error('message'); + */ +function error(message) { console['error'](message) } + +/** + * SEARCH + * ====== + * var elements = search('a div span'); + */ +function search( elements, start ) { + var list = []; + each( elements.split(/\s+/), function(el) { + each( (start || document).getElementsByTagName(el), function(node) { + list.push(node); + } ); + } ); + return list; +} + + + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * HEAD + * ==== + * head().appendChild(elm); + */ +function head() { return search('head')[0] } + +/** + * ATTR + * ==== + * var attribute = attr( node, 'attribute' ); + */ +function attr( node, attribute, value ) { + if (value) node.setAttribute( attribute, value ); + else return node && node.getAttribute && node.getAttribute(attribute); +} + +/** + * CSS + * === + * var obj = create('div'); + */ +function css( element, styles ) { + for (var style in styles) if (styles.hasOwnProperty(style)) + try {element.style[style] = styles[style] + ( + '|width|height|top|left|'.indexOf(style) > 0 && + typeof styles[style] == 'number' + ? 'px' : '' + )}catch(e){} +} + +/** + * CREATE + * ====== + * var obj = create('div'); + */ +function create(element) { return document.createElement(element) } + + +/** + * jsonp_cb + * ======== + * var callback = jsonp_cb(); + */ +function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } + + + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } +}; + +/** + * XDR Cross Domain Request + * ======================== + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr( setup ) { + if (XORIGN || FDomainRequest()) return ajax(setup); + + var script = create('script') + , callback = setup.callback + , id = unique() + , finished = 0 + , xhrtme = setup.timeout || DEF_TIMEOUT + , timer = timeout( function(){done(1)}, xhrtme ) + , fail = setup.fail || function(){} + , data = setup.data || {} + , success = setup.success || function(){} + + , append = function() { + head().appendChild(script); + } + + , done = function( failed, response ) { + if (finished) return; + finished = 1; + + failed || success(response); + script.onerror = null; + clearTimeout(timer); + + timeout( function() { + failed && fail(); + var s = $(id) + , p = s && s.parentNode; + p && p.removeChild(s); + }, SECOND ); + }; + + window[callback] = function(response) { + done( 0, response ); + }; + + if (!setup.blocking) script[ASYNC] = ASYNC; + + script.onerror = function() { done(1) }; + data['pnsdk'] = PNSDK; + script.src = build_url(setup.url,data); + + attr( script, 'id', id ); + + append(); + return done; +} + +/** + * CORS XHR Request + * ================ + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function ajax( setup ) { + var xhr, response + , finished = function() { + if (loaded) return; + loaded = 1; + + clearTimeout(timer); + + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } + + success(response); + } + , complete = 0 + , loaded = 0 + , xhrtme = setup.timeout || DEF_TIMEOUT + , timer = timeout( function(){done(1)}, xhrtme ) + , fail = setup.fail || function(){} + , data = setup.data || {} + , success = setup.success || function(){} + , async = ( typeof(setup.blocking) === 'undefined' ) + , done = function(failed) { + if (complete) return; + complete = 1; + + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } + + failed && fail(); + }; + + // Send + try { + xhr = FDomainRequest() || + window.XDomainRequest && + new XDomainRequest() || + new XMLHttpRequest(); + + xhr.onerror = xhr.onabort = function(){ done(1) }; + xhr.onload = xhr.onloadend = finished; + if (async) xhr.timeout = xhrtme; + + data['pnsdk'] = PNSDK; + var url = build_url(setup.url,data); + + xhr.open( 'GET', url, async ); + xhr.send(); + } + catch(eee) { + done(0); + XORIGN = 0; + return xdr(setup); + } + + // Return 'done' + return done; +} + + + + // Test Connection State +function _is_online() { + if (!('onLine' in navigator)) return 1; + return navigator['onLine']; +} + + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +var PDIV = $('pubnub') || 0 +, CREATE_PUBNUB = function(setup) { + + // Force JSONP if requested from user. + if (setup['jsonp']) XORIGN = 0; + + var SUBSCRIBE_KEY = setup['subscribe_key'] || '' + , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND + , UUID = setup['uuid'] || db['get'](SUBSCRIBE_KEY+'uuid')||''; + + setup['xdr'] = xdr; + setup['db'] = db; + setup['error'] = error; + setup['_is_online'] = _is_online; + setup['jsonp_cb'] = jsonp_cb; + + var SELF = PN_API(setup); + SELF['css'] = css; + SELF['$'] = $; + SELF['create'] = create; + SELF['bind'] = bind; + SELF['head'] = head; + SELF['search'] = search; + SELF['attr'] = attr; + SELF['events'] = events; + SELF['init'] = CREATE_PUBNUB; + + + // Add Leave Functions + bind( 'beforeunload', window, function() { + SELF['each-channel'](function(ch){ SELF['LEAVE']( ch.name, 1 ) }); + return true; + } ); + + // Return without Testing + if (setup['notest']) return SELF; + + bind( 'offline', window, SELF['_reset_offline'] ); + bind( 'offline', document, SELF['_reset_offline'] ); + + // Return PUBNUB Socket Object + return SELF; +}; // Bind for PUBNUB Readiness to Subscribe bind( 'load', window, function(){ timeout( ready, 0 ) } ); @@ -1293,7 +1322,7 @@ var WS = PUBNUB['ws'] = function( url, protocols ) { self['CLOSE_ABNORMAL'] = 1006; // Abnormal Disconnect. // Events Default - self['onclose'] = self['onerror'] = + self['onclose'] = self['onerror'] = self['onmessage'] = self['onopen'] = self['onsend'] = function(){}; diff --git a/web/pubnub.min.js b/web/pubnub.min.js index 110d4360a..52b59e9eb 100644 --- a/web/pubnub.min.js +++ b/web/pubnub.min.js @@ -1,30 +1,31 @@ -// 3.4.2 +// Version: 3.4.4 (function(){ -var l=null;function p(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function a(){try{return this.valueOf()}catch(a){return l}}function c(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b=w[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function b(d,k){var i,h,j,t,q,f=e,g=k[d];g&&"object"===typeof g&&(g=a.call(g));"function"===typeof n&&(g=n.call(k,d,g));switch(typeof g){case "string":return c(g);case "number":return isFinite(g)?String(g):"null";case "boolean":case "null":return String(g); -case "object":if(!g)return"null";e+=s;q=[];if("[object Array]"===Object.prototype.toString.apply(g)){t=g.length;for(i=0;iu()?(clearTimeout(d),d=setTimeout(b,c)):(e=u(),a())}var d,e=0;return b},x=function(a){return document.getElementById(a)},y=function(a){console.error(a)},ca=function(a,c){var b=[];z(a.split(/\s+/),function(a){z((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},z=function(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")},P=function(a){function c(a,b){U||(U=1,a||m(b),f.onerror=l,clearTimeout(A),setTimeout(function(){a&&B();var b=x(g),c=b&&b.parentNode;c&&c.removeChild(b)},O))}if(J||K()){a:{var b,d,e=function(){if(!w){w=1;clearTimeout(v); -try{d=JSON.parse(b.responseText)}catch(a){return h(1)}i(d)}},s=0,w=0,n=a.timeout||ja,v=setTimeout(function(){h(1)},n),k=a.b||p(),i=a.c||p(),h=function(a){s||(s=1,clearTimeout(v),b&&(b.onerror=b.onload=l,b.abort&&b.abort(),b=l),a&&k())};try{b=K()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){h(1)};b.onload=b.onloadend=e;b.timeout=n;var j=a.url.join(ka);if(a.data){var e=[],t,j=j+"?";for(t in a.data)e.push(t+"="+a.data[t]);j+=e.join(la)}b.open("GET",j, -typeof("undefined"===a.i));b.send()}catch(q){h(0);J=0;a=P(a);break a}a=h}return a}var f=ia("script"),j=a.a,g=r(),U=0,A=setTimeout(function(){c(1)},a.timeout||ja),B=a.b||p(),m=a.c||p();window[j]=function(a){c(0,a)};a.i||(f[ma]=ma);f.onerror=function(){c(1)};f.src=a.url.join(ka);if(a.data){j=[];f.src+="?";for(e in a.data)j.push(e+"="+a.data[e]);f.src+=j.join(la)}F(f,"id",g);ga().appendChild(f);return c},na=function(a){var c=[];z(a,function(a,d){d.h&&c.push(a)});return c.sort()},ra=function(){setTimeout(function(){Q|| -(Q=1,z(qa,function(a){a()}))},O)},K=function(){if(!sa||!sa.get)return 0;var a={id:K.id++,send:p(),abort:function(){a.id={}},open:function(c,b){K[a.id]=a;sa.get(a.id,b)}};return a},aa=1,ea=/{([\w\-]+)}/g,ma="async",ka="/",la="&",ja=1E4,O=1E3,R="-pnpres",J=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||p());var S,V=window.localStorage;S={get:function(a){try{return V?V.getItem(a):-1== -document.cookie.indexOf(a)?l:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||l}catch(c){}},set:function(a,c){try{if(V)return V.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var W,ta=Math.floor(20*Math.random());W=function(a,c){return 0++ta?ta:ta=1))||a};var Y={list:{},unbind:function(a){Y.list[a]=[]},bind:function(a,c){(Y.list[a]=Y.list[a]||[]).push(c)},fire:function(a, -c){z(Y.list[a]||[],function(a){a(c)})}},Z=x("pubnub")||0,Q=0,qa=[],ua=function(a){function c(){}function b(){}function d(a){a&&(k.g=0);!k.g&&k.length&&(k.g=1,P(k.shift()))}function e(a){z(na(v),function(b){(b=v[b])&&a(b)})}function s(){!("onLine"in navigator)||navigator.onLine||n();setTimeout(s,O)}function w(){D.time(function(a){a||n();setTimeout(w,A)})}function n(){j&&j(1)}a.jsonp&&(J=0);var v={},k=[],i=0,h=0,j=0,t=0,q=0,f=0,g=+a.windowing||10,U=(+a.timeout||310)*O,A=(+a.keepalive||60)*O,B=a.publish_key|| -"",m=a.subscribe_key||"",T=a.ssl?"s":"",G=a.uuid||S.get(m+"uuid")||"",L="http"+T+"://"+(a.origin||"pubsub.pubnub.com"),H=W(L),oa=W(L),D={history:function(a,b){var b=a.callback||b,c=a.count||a.limit||100,d=a.reverse||"false",e=a.error||p(),g=a.channel,j=a.start,h=a.end,f={},i=M();if(!g)return y("Missing Channel");if(!b)return y("Missing Callback");if(!m)return y("Missing Subscribe Key");f.stringtoken="true";f.count=c;f.reverse=d;i&&(f.callback=i);j&&(f.start=j);h&&(f.end=h);P({a:i,data:f,c:function(a){b(a)}, -b:e,url:[H,"v2","history","sub-key",m,"channel",N(g)]})},replay:function(a){var b=b||a.callback||p(),c=a.source,d=a.destination,e=a.stop,f=a.start,g=a.end,j=a.reverse,a=a.limit,h=M(),i={};if(!c)return y("Missing Source Channel");if(!d)return y("Missing Destination Channel");if(!B)return y("Missing Publish Key");if(!m)return y("Missing Subscribe Key");"0"!=h&&(i.callback=h);e&&(i.stop="all");j&&(i.reverse="true");f&&(i.start=f);g&&(i.end=g);a&&(i.count=a);P({a:h,c:function(a){b(a)},b:function(){b([0, -"Disconnected"])},url:[H,"v1","replay",B,m,c,d],data:i})},time:function(a){var b=M();P({a:b,timeout:5*O,url:[H,"time",b],c:function(b){a(b[0])},b:function(){a(0)}})},publish:function(a,b){var b=b||a.callback||p(),c=a.message,e=a.channel,f=M();if(!c)return y("Missing Message");if(!e)return y("Missing Channel");if(!B)return y("Missing Publish Key");if(!m)return y("Missing Subscribe Key");c=JSON.stringify(c);e=[H,"publish",B,m,0,N(e),f,N(c)];k.push({a:f,timeout:5*O,url:e,data:{uuid:G},c:function(a){b(a); -d(1)},b:function(){b([0,"Failed",c]);d(1)}});d()},unsubscribe:function(a){a=a.channel;f=0;t=1;a=C((a.join?a.join(","):""+a).split(","),function(a){return a+","+a+R}).join(",");z(a.split(","),function(a){Q&&b(a,0);v[a]=0});Q&&c()},subscribe:function(a,b){function d(a){a?setTimeout(k,O):(H=W(L,1),oa=W(L,1),setTimeout(function(){D.time(d)},O));e(function(b){if(a&&b.d)return b.d=0,b.m(b.name);!a&&!b.d&&(b.d=1,b.l(b.name))})}function k(){var a=M(),b=na(v).join(",");b&&(j=P({timeout:wa,a:a,b:function(){D.time(d)}, -data:{uuid:G},url:[oa,"subscribe",m,N(b),a,f],c:function(a){if(!a)return setTimeout(k,pa);e(function(a){a.f||(a.f=1,a.k(a.name))});f=!f&&t&&S.get(m)||a[1];S.set(m,a[1]);var b,c=(2++I?I:I=1))||a}; +function ha(a,c){var b=a.join(da);if(c){var d=[],b=b+"?",e;for(e in c)d.push(e+"="+J(c[e]));b+=d.join(ea)}return b}function ia(a,c){function b(){e+c>D()?(clearTimeout(d),d=setTimeout(b,c)):(e=D(),a())}var d,e=0;return b}function ja(a,c){var b=[];N(a||[],function(a){c(a)&&b.push(a)});return b}function ka(a,c){return a.replace(fa,function(a,d){return c[d]||a})} +function ga(a){var c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=16*Math.random()|0;return("x"==a?c:c&3|8).toString(16)});a&&a(c);return c}function N(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function la(a){var c=[];N(a,function(a,d){d.g&&c.push(a)});return c.sort()}function P(){setTimeout(function(){t||(t=1,N(ba,function(a){a()}))},A)} +if(!window.PUBNUB){var R=function(a){return document.getElementById(a)},na=function(a){console.error(a)},oa=function(a,c){var b=[];N(a.split(/\s+/),function(a){N((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},S=function(a,c,b){N(a.split(","),function(a){function e(a){a||(a=window.event);b(a)||(a.cancelBubble=!0,a.returnValue=p,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())}c.addEventListener?c.addEventListener(a,e,p):c.attachEvent?c.attachEvent("on"+ +a,e):c["on"+a]=e})},pa=function(){return oa("head")[0]},T=function(a,c,b){if(b)a.setAttribute(c,b);else return a&&a.getAttribute&&a.getAttribute(c)},sa=function(a,c){for(var b in c)if(c.hasOwnProperty(b))try{a.style[b]=c[b]+(0<"|width|height|top|left|".indexOf(b)&&"number"==typeof c[b]?"px":"")}catch(d){}},ta=function(a){return document.createElement(a)},ua=function(){return U||W()?0:B()},wa=function(a){function c(a,b){L||(L=1,a||M(b),g.onerror=m,clearTimeout(V),setTimeout(function(){a&&u();var b= +R(q),c=b&&b.parentNode;c&&c.removeChild(b)},A))}if(U||W()){a:{var b,d,e=function(){if(!v){v=1;clearTimeout(Q);try{d=JSON.parse(b.responseText)}catch(a){return l(1)}k(d)}},o=0,v=0,f=a.timeout||1E4,Q=setTimeout(function(){l(1)},f),E=a.b||s(),h=a.data||{},k=a.c||s(),j="undefined"===typeof a.h,l=function(a){o||(o=1,clearTimeout(Q),b&&(b.onerror=b.onload=m,b.abort&&b.abort(),b=m),a&&E())};try{b=W()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){l(1)};b.onload= +b.onloadend=e;j&&(b.timeout=f);h.pnsdk=va;var i=ha(a.url,h);b.open("GET",i,j);b.send()}catch(r){l(0);U=0;a=wa(a);break a}a=l}return a}var g=ta("script"),e=a.a,q=B(),L=0,V=setTimeout(function(){c(1)},a.timeout||1E4),u=a.b||s(),f=a.data||{},M=a.c||s();window[e]=function(a){c(0,a)};a.h||(g[xa]=xa);g.onerror=function(){c(1)};f.pnsdk=va;g.src=ha(a.url,f);T(g,"id",q);pa().appendChild(g);return c},ya=function(){return!("onLine"in navigator)?1:navigator.onLine},W=function(){if(!za||!za.get)return 0;var a= +{id:W.id++,send:s(),abort:function(){a.id={}},open:function(c,b){W[a.id]=a;za.get(a.id,b)}};return a},xa="async",va="PubNub-JS-Web/3.4.4",U=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||s());var Aa,X=window.localStorage;Aa={get:function(a){try{return X?X.getItem(a):-1==document.cookie.indexOf(a)?m:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||m}catch(c){}},set:function(a, +c){try{if(X)return X.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var Y={list:{},unbind:function(a){Y.list[a]=[]},bind:function(a,c){(Y.list[a]=Y.list[a]||[]).push(c)},fire:function(a,c){N(Y.list[a]||[],function(a){a(c)})}},Z=R("pubnub")||0,Ba=function(a){function c(){}function b(){z.time(function(a){a||u&&u(1);setTimeout(b,h)})}function d(){ca()||u&&u(1);setTimeout(d,A)}function e(a){N(la(x),function(b){(b=x[b])&&a(b)})}function o(a){a&&(q.i= +0);!q.i&&q.length&&(q.i=1,y(q.shift()))}a.jsonp&&(U=0);var v=a.subscribe_key||"";a.uuid||Aa.get(v+"uuid");a.xdr=wa;a.db=Aa;a.error=na;a._is_online=ya;a.jsonp_cb=ua;var f,Q=+a.windowing||10,E=(+a.timeout||310)*A,h=(+a.keepalive||60)*A,k=a.publish_key||"",j=a.subscribe_key||"",l=a.ssl?"s":"",i="http"+l+"://"+(a.origin||"pubsub.pubnub.com"),r=F(i),g=F(i),q=[],L=0,V=0,u=0,M=0,ma=0,K=0,x={},y=a.xdr,n=a.error||s(),ca=a._is_online||function(){return 1},C=a.jsonp_cb||function(){return 0},G=a.db||{get:s(), +set:s()},H=a.uuid||G&&G.get(j+"uuid")||"",z={LEAVE:function(a,b){var c={uuid:H},d=F(i),e=C();0 - - - PubNub Crypto + + + + PubNub Crypto - + + diff --git a/webos/pubnub-crypto.min.js b/webos/pubnub-crypto.min.js new file mode 100644 index 000000000..e43568caa --- /dev/null +++ b/webos/pubnub-crypto.min.js @@ -0,0 +1,25 @@ +(function(){ +PUBNUB.crypto=function(){var e=14,j=8,r=!1,u=function(b,f){var c="",d,p;if(f){d=b[15];if(16p;p++)c+=String.fromCharCode(b[p]);return c},t=function(b,f){var c=[],d;if(!f)try{b=unescape(encodeURIComponent(b))}catch(p){throw"Error on UTF-8 encode";}for(d=0;dj.length&&(s=16-j.length,q=[s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s]);for(s=0;sd;d++)c[d]=f[b[d]];return c},D=function(b){var f=[],c=r?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],d;for(d=0;16>d;d++)f[d]=b[c[d]];return f},E=function(b){var f=[],c;if(r)for(c=0;4>c;c++)f[4*c]=K[b[4*c]]^L[b[1+4*c]]^M[b[2+4*c]]^N[b[3+4*c]],f[1+4*c]=N[b[4*c]]^K[b[1+4*c]]^L[b[2+4*c]]^M[b[3+4*c]],f[2+4*c]=M[b[4*c]]^N[b[1+4*c]]^K[b[2+4*c]]^L[b[3+4*c]], +f[3+4*c]=L[b[4*c]]^M[b[1+4*c]]^N[b[2+4*c]]^K[b[3+4*c]];else for(c=0;4>c;c++)f[4*c]=O[b[4*c]]^P[b[1+4*c]]^b[2+4*c]^b[3+4*c],f[1+4*c]=b[4*c]^O[b[1+4*c]]^P[b[2+4*c]]^b[3+4*c],f[2+4*c]=b[4*c]^b[1+4*c]^O[b[2+4*c]]^P[b[3+4*c]],f[3+4*c]=P[b[4*c]]^b[1+4*c]^b[2+4*c]^O[b[3+4*c]];return f},B=function(b,f,c){var d=[],p;for(p=0;16>p;p++)d[p]=b[p]^f[c][p];return d},A=function(b,f){var c=[],d;for(d=0;16>d;d++)c[d]=b[d]^f[d];return c},w=function(b){var f=[],c=[],d,p,o=[];for(d=0;db;b++)c[b]=f[d-1][b];if(0===d%j){b=c[0];p=void 0;for(p=0;4>p;p++)c[p]=c[p+1];c[3]=b;c=F(c);c[0]^=W[d/j-1]}else 6b;b++)f[d][b]=f[d-j][b]^c[b]}for(d=0;dc;c++)o[d].push(f[4*d+c][0],f[4*d+c][1],f[4*d+c][2],f[4*d+c][3])}return o},F=function(b){for(var f=0;4>f;f++)b[f]=R[b[f]];return b},G=function(b,f){var c=[];for(i=0;ic;c++){for(var d=f,p=c,e=b,j=c,m=void 0,o=void 0,m=o=0;8>m;m++)o=1==(j&1)?o^e:o,e=127>>=1;d[p]=o}return f},R=G("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", +2),T,U=R,V=[];for(i=0;i>2],c+=J[(f[d]&3)<<4|f[d+1]>>4],c+= +void 0!==f[d+1]?J[(f[d+1]&15)<<2|f[d+2]>>6]:"=",c+=void 0!==f[d+2]?J[f[d+2]&63]:"=";b=c.slice(0,64);for(d=1;d>4,d[1]=(c[1]&15)<<4|c[2]>>2,d[2]=(c[2]&3)<<6|c[3],f.push(d[0],d[1],d[2]); +return f=f.slice(0,f.length-f.length%16)}};return{size:function(b){switch(b){case 128:e=10;j=4;break;case 192:e=12;j=6;break;case 256:e=14;j=8;break;default:throw"Invalid Key Size Specified:"+b;}},h2a:function(b){var f=[];b.replace(/(..)/g,function(b){f.push(parseInt(b,16))});return f},expandKey:w,encryptBlock:y,decryptBlock:C,Decrypt:r,s2a:t,rawEncrypt:q,rawDecrypt:v,dec:function(b,f,c){var b=Q.decode(b),d=b.slice(8,16),d=o(t(f,c),d),f=d.key,d=d.iv,b=b.slice(16,b.length);return b=v(b,f,d,c)},openSSLKey:o, +a2h:function(b){var f="",c;for(c=0;cb[c]?"0":"")+b[c].toString(16);return f},enc:function(b,f,c){var d;d=[];var e;for(e=0;8>e;e++)d=d.concat(Math.floor(256*Math.random()));e=o(t(f,c),d);f=e.key;e=e.iv;d=[[83,97,108,116,101,100,95,95].concat(d)];b=t(b,c);b=q(b,f,e);b=d.concat(b);return Q.encode(b)},Hash:{MD5:function(b){function f(b,c){var d,e,f,g,h;f=b&2147483648;g=c&2147483648;d=b&1073741824;e=c&1073741824;h=(b&1073741823)+(c&1073741823);return d&e?h^2147483648^f^g:d|e?h&1073741824? +h^3221225472^f^g:h^1073741824^f^g:h^f^g}function c(b,c,d,e,g,h,k){b=f(b,f(f(c&d|~c&e,g),k));return f(b<>>32-h,c)}function d(b,c,d,e,g,h,k){b=f(b,f(f(c&e|d&~e,g),k));return f(b<>>32-h,c)}function e(b,c,d,g,h,k,l){b=f(b,f(f(c^d^g,h),l));return f(b<>>32-k,c)}function j(b,c,d,e,g,h,k){b=f(b,f(f(d^(c|~e),g),k));return f(b<>>32-h,c)}function o(b){var c,d,e=[];for(d=0;3>=d;d++)c=b>>>8*d&255,e=e.concat(c);return e}var m=[],q,r,v,s,g,h,k,l,n=G("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", +8),m=b.length;q=m+8;r=16*((q-q%64)/64+1);v=[];for(g=s=0;g>>29;m=v;g=n[0];h=n[1];k=n[2];l=n[3];for(b=0;b>16)+(j>>16)+(o>>16)<<16|o&65535}function r(e,j){return e>>>j|e<<32-j}var u;u=e.replace(/\r\n/g,"\n");for(var e="",t=0;to?e+=String.fromCharCode(o):(127o?e+=String.fromCharCode(o>>6|192):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128)),e+=String.fromCharCode(o&63|128))}t=e;u=[];for(o=0;o<8*t.length;o+=8)u[o>>5]|=(t.charCodeAt(o/8)&255)<<24-o%32;var q=8*e.length, +t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909, +275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],o=Array(64),v,y,C,x,D,E,B,A,w,F,G;u[q>>5]|=128<<24-q%32;u[(q+64>>9<<4)+15]=q;for(A=0;Aw;w++)o[w]=16>w?u[w+A]:j(j(j(r(o[w-2],17)^r(o[w-2],19)^o[w- +2]>>>10,o[w-7]),r(o[w-15],7)^r(o[w-15],18)^o[w-15]>>>3),o[w-16]),F=j(j(j(j(B,r(x,6)^r(x,11)^r(x,25)),x&D^~x&E),t[w]),o[w]),G=j(r(q,2)^r(q,13)^r(q,22),q&v^q&y^v&y),B=E,E=D,D=x,x=j(C,F),C=y,y=v,v=q,q=j(F,G);e[0]=j(q,e[0]);e[1]=j(v,e[1]);e[2]=j(y,e[2]);e[3]=j(C,e[3]);e[4]=j(x,e[4]);e[5]=j(D,e[5]);e[6]=j(E,e[6]);e[7]=j(B,e[7])}u="";for(t=0;t<4*e.length;t++)u+="0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)+4&15)+"0123456789abcdef".charAt(e[t>>2]>>8*(3-t%4)&15);return u}; +})(); diff --git a/core/pubnub.js b/webos/pubnub.js similarity index 77% rename from core/pubnub.js rename to webos/pubnub.js index b1869046c..865997a97 100644 --- a/core/pubnub.js +++ b/webos/pubnub.js @@ -1,70 +1,16 @@ -/* --------------------------------------------------------------------------- -WAIT! - This file depends on instructions from the PUBNUB Cloud. -http://www.pubnub.com/account-javascript-api-include ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks -Copyright (c) 2011 PubNub Inc. -http://www.pubnub.com/ -http://www.pubnub.com/terms ---------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ---------------------------------------------------------------------------- */ - -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= UTIL =============================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -window['PUBNUB'] || (function() { - -/** - * UTIL LOCALS - */ +// Version: 3.4.4 var NOW = 1 -, SWF = 'https://pubnub.a.ssl.fastly.net/pubnub.swf' -, REPL = /{([\w\-]+)}/g -, ASYNC = 'async' -, URLBIT = '/' -, PARAMSBIT = '&' +, READY = false +, READY_BUFFER = [] +, PRESENCE_SUFFIX = '-pnpres' , DEF_WINDOWING = 10 // MILLISECONDS. , DEF_TIMEOUT = 10000 // MILLISECONDS. , DEF_SUB_TIMEOUT = 310 // SECONDS. , DEF_KEEPALIVE = 60 // SECONDS. , SECOND = 1000 // A THOUSAND MILLISECONDS. -, PRESENCE_SUFFIX = '-pnpres' -, UA = navigator.userAgent -, XORIGN = UA.indexOf('MSIE 6') == -1; - -/** - * CONSOLE COMPATIBILITY - */ -window.console || (window.console=window.console||{}); -console.log || ( - console.log = - console.error = - ((window.opera||{}).postError||function(){}) -); +, URLBIT = '/' +, PARAMSBIT = '&' +, REPL = /{([\w\-]+)}/g; /** * UTILITIES @@ -72,31 +18,6 @@ console.log || ( function unique() { return'x'+ ++NOW+''+(+new Date) } function rnow() { return+new Date } -/** - * LOCAL STORAGE OR COOKIE - */ -var db = (function(){ - var ls = window['localStorage']; - return { - 'get' : function(key) { - try { - if (ls) return ls.getItem(key); - if (document.cookie.indexOf(key) == -1) return null; - return ((document.cookie||'').match( - RegExp(key+'=([^;]+)') - )||[])[1] || null; - } catch(e) { return } - }, - 'set' : function( key, value ) { - try { - if (ls) return ls.setItem( key, value ) && 0; - document.cookie = key + '=' + value + - '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; - } catch(e) { return } - } - }; -})(); - /** * NEXTORIGIN * ========== @@ -115,6 +36,26 @@ var nextorigin = (function() { } })(); + +/** + * Build Url + * ======= + * + */ +function build_url(url_components, url_params) { + var url = url_components.join(URLBIT); + + if (url_params) { + var params = []; + url += "?"; + for (var key in url_params) { + params.push(key+"="+encode(url_params[key])); + } + url += params.join(PARAMSBIT); + } + return url; +} + /** * UPDATER * ======= @@ -137,64 +78,6 @@ function updater( fun, rate ) { return runnit; } -/** - * $ - * = - * var div = $('divid'); - */ -function $(id) { return document.getElementById(id) } - -/** - * ERROR - * ===== - * error('message'); - */ -function error(message) { console['error'](message) } - -/** - * SEARCH - * ====== - * var elements = search('a div span'); - */ -function search( elements, start ) { - var list = []; - each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { - list.push(node); - } ); - } ); - return list; -} - -/** - * EACH - * ==== - * each( [1,2,3], function(item) { } ) - */ -function each( o, f ) { - if ( !o || !f ) return; - - if ( typeof o[0] != 'undefined' ) - for ( var i = 0, l = o.length; i < l; ) - f.call( o[i], o[i], i++ ); - else - for ( var i in o ) - o.hasOwnProperty && - o.hasOwnProperty(i) && - f.call( o[i], i, o[i] ); -} - -/** - * MAP - * === - * var list = map( [1,2,3], function(item) { return item + 1 } ) - */ -function map( list, fun ) { - var fin = []; - each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); - return fin; -} - /** * GREP * ==== @@ -217,80 +100,6 @@ function supplant( str, values ) { } ); } -/** - * BIND - * ==== - * bind( 'keydown', search('a')[0], function(element) { - * ... - * } ); - */ -function bind( type, el, fun ) { - each( type.split(','), function(etype) { - var rapfun = function(e) { - if (!e) e = window.event; - if (!fun(e)) { - e.cancelBubble = true; - e.returnValue = false; - e.preventDefault && e.preventDefault(); - e.stopPropagation && e.stopPropagation(); - } - }; - - if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); - else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); - else el[ 'on' + etype ] = rapfun; - } ); -} - -/** - * UNBIND - * ====== - * unbind( 'keydown', search('a')[0] ); - */ -function unbind( type, el, fun ) { - if ( el.removeEventListener ) el.removeEventListener( type, false ); - else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); - else el[ 'on' + type ] = null; -} - -/** - * HEAD - * ==== - * head().appendChild(elm); - */ -function head() { return search('head')[0] } - -/** - * ATTR - * ==== - * var attribute = attr( node, 'attribute' ); - */ -function attr( node, attribute, value ) { - if (value) node.setAttribute( attribute, value ); - else return node && node.getAttribute && node.getAttribute(attribute); -} - -/** - * CSS - * === - * var obj = create('div'); - */ -function css( element, styles ) { - for (var style in styles) if (styles.hasOwnProperty(style)) - try {element.style[style] = styles[style] + ( - '|width|height|top|left|'.indexOf(style) > 0 && - typeof styles[style] == 'number' - ? 'px' : '' - )}catch(e){} -} - -/** - * CREATE - * ====== - * var obj = create('div'); - */ -function create(element) { return document.createElement(element) } - /** * timeout * ======= @@ -316,11 +125,33 @@ function uuid(callback) { } /** - * jsonp_cb - * ======== - * var callback = jsonp_cb(); + * EACH + * ==== + * each( [1,2,3], function(item) { } ) + */ +function each( o, f ) { + if ( !o || !f ) return; + + if ( typeof o[0] != 'undefined' ) + for ( var i = 0, l = o.length; i < l; ) + f.call( o[i], o[i], i++ ); + else + for ( var i in o ) + o.hasOwnProperty && + o.hasOwnProperty(i) && + f.call( o[i], i, o[i] ); +} + +/** + * MAP + * === + * var list = map( [1,2,3], function(item) { return item + 1 } ) */ -function jsonp_cb() { return XORIGN || FDomainRequest() ? 0 : unique() } +function map( list, fun ) { + var fin = []; + each( list || [], function( k, v ) { fin.push(fun( k, v )) } ); + return fin; +} /** * ENCODE @@ -335,175 +166,9 @@ function encode(path) { } /** - * EVENTS - * ====== - * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { - * // Do Stuff with message - * } ); - * - * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); - * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); - * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); - * - */ -var events = { - 'list' : {}, - 'unbind' : function( name ) { events.list[name] = [] }, - 'bind' : function( name, fun ) { - (events.list[name] = events.list[name] || []).push(fun); - }, - 'fire' : function( name, data ) { - each( - events.list[name] || [], - function(fun) { fun(data) } - ); - } -}; - -/** - * XDR Cross Domain Request - * ======================== - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function xdr( setup ) { - if (XORIGN || FDomainRequest()) return ajax(setup); - - var script = create('script') - , callback = setup.callback - , id = unique() - , finished = 0 - , xhrtme = setup.timeout || DEF_TIMEOUT - , timer = timeout( function(){done(1)}, xhrtme ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - - , append = function() { - head().appendChild(script); - } - - , done = function( failed, response ) { - if (finished) return; - finished = 1; - - failed || success(response); - script.onerror = null; - clearTimeout(timer); - - timeout( function() { - failed && fail(); - var s = $(id) - , p = s && s.parentNode; - p && p.removeChild(s); - }, SECOND ); - }; - - window[callback] = function(response) { - done( 0, response ); - }; - - if (!setup.blocking) script[ASYNC] = ASYNC; - - script.onerror = function() { done(1) }; - script.src = setup.url.join(URLBIT); - - if (setup.data) { - var params = []; - script.src += "?"; - for (var key in setup.data) { - params.push(key+"="+setup.data[key]); - } - script.src += params.join(PARAMSBIT); - } - attr( script, 'id', id ); - - append(); - return done; -} - -/** - * CORS XHR Request - * ================ - * xdr({ - * url : ['http://www.blah.com/url'], - * success : function(response) {}, - * fail : function() {} - * }); - */ -function ajax( setup ) { - var xhr, response - , finished = function() { - if (loaded) return; - loaded = 1; - - clearTimeout(timer); - - try { response = JSON['parse'](xhr.responseText); } - catch (r) { return done(1); } - - success(response); - } - , complete = 0 - , loaded = 0 - , xhrtme = setup.timeout || DEF_TIMEOUT - , timer = timeout( function(){done(1)}, xhrtme ) - , fail = setup.fail || function(){} - , success = setup.success || function(){} - , done = function(failed) { - if (complete) return; - complete = 1; - - clearTimeout(timer); - - if (xhr) { - xhr.onerror = xhr.onload = null; - xhr.abort && xhr.abort(); - xhr = null; - } - - failed && fail(); - }; - - // Send - try { - xhr = FDomainRequest() || - window.XDomainRequest && - new XDomainRequest() || - new XMLHttpRequest(); - - xhr.onerror = xhr.onabort = function(){ done(1) }; - xhr.onload = xhr.onloadend = finished; - xhr.timeout = xhrtme; - - var url = setup.url.join(URLBIT); - if (setup.data) { - var params = []; - var key; - url += "?"; - for (key in setup.data) params.push(key+"="+setup.data[key]); - url += params.join(PARAMSBIT); - } - - xhr.open( 'GET', url, (typeof(setup.blocking === 'undefined')) ); - xhr.send(); - } - catch(eee) { - done(0); - XORIGN = 0; - return xdr(setup); - } - - // Return 'done' - return done; -} - -/** - * Generate Subscription Channel List - * ================================== - * generate_channel_list(channels_object); + * Generate Subscription Channel List + * ================================== + * generate_channel_list(channels_object); */ function generate_channel_list(channels) { var list = []; @@ -513,41 +178,78 @@ function generate_channel_list(channels) { return list.sort(); } -/* =-====================================================================-= */ -/* =-====================================================================-= */ -/* =-========================= PUBNUB ===========================-= */ -/* =-====================================================================-= */ -/* =-====================================================================-= */ - -var PDIV = $('pubnub') || 0 -, READY = 0 -, READY_BUFFER = [] -, CREATE_PUBNUB = function(setup) { - - // Force JSONP if requested from user. - if (setup['jsonp']) XORIGN = 0; +// PUBNUB READY TO CONNECT +function ready() { timeout( function() { + if (READY) return; + READY = 1; + each( READY_BUFFER, function(connect) { connect() } ); +}, SECOND ); } - var CHANNELS = {} - , PUB_QUEUE = [] - , SUB_CALLBACK = 0 - , SUB_CHANNEL = 0 - , SUB_RECEIVER = 0 - , SUB_RESTORE = 0 - , SUB_BUFF_WAIT = 0 - , TIMETOKEN = 0 - , SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING +function PN_API(setup) { + var SUB_WINDOWING = +setup['windowing'] || DEF_WINDOWING , SUB_TIMEOUT = (+setup['timeout'] || DEF_SUB_TIMEOUT) * SECOND , KEEPALIVE = (+setup['keepalive'] || DEF_KEEPALIVE) * SECOND , PUBLISH_KEY = setup['publish_key'] || '' , SUBSCRIBE_KEY = setup['subscribe_key'] || '' , SSL = setup['ssl'] ? 's' : '' - , UUID = setup['uuid'] || db['get'](SUBSCRIBE_KEY+'uuid') || '' , ORIGIN = 'http'+SSL+'://'+(setup['origin']||'pubsub.pubnub.com') , STD_ORIGIN = nextorigin(ORIGIN) , SUB_ORIGIN = nextorigin(ORIGIN) - , LEAVE = function(){} , CONNECT = function(){} - , SELF = { + , PUB_QUEUE = [] + , SUB_CALLBACK = 0 + , SUB_CHANNEL = 0 + , SUB_RECEIVER = 0 + , SUB_RESTORE = 0 + , SUB_BUFF_WAIT = 0 + , TIMETOKEN = 0 + , CHANNELS = {} + , xdr = setup['xdr'] + , error = setup['error'] || function() {} + , _is_online = setup['_is_online'] || function() { return 1; } + , jsonp_cb = setup['jsonp_cb'] || function(){ return 0; } + , db = setup['db'] || {'get': function(){}, 'set': function(){}} + , UUID = setup['uuid'] || ( db && db['get'](SUBSCRIBE_KEY+'uuid') || ''); + + function publish(next) { + if (next) PUB_QUEUE.sending = 0; + if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; + PUB_QUEUE.sending = 1; + xdr(PUB_QUEUE.shift()); + } + + function each_channel(callback) { + each( generate_channel_list(CHANNELS), function(channel) { + var chan = CHANNELS[channel]; + if (!chan) return; + callback(chan); + } ); + } + + // Announce Leave Event + var SELF = { + 'LEAVE' : function( channel, blocking ) { + var data = { 'uuid' : UUID} + , origin = nextorigin(ORIGIN) + , jsonp = jsonp_cb(); + + // Prevent Leaving a Presence Channel + if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; + + if (jsonp != '0') data['callback'] = jsonp; + + + xdr({ + blocking : blocking || SSL, + timeout : 2000, + callback : jsonp, + data : data, + url : [ + origin, 'v2', 'presence', 'sub_key', + SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' + ] + }); + }, /* PUBNUB.history({ channel : 'my_chat_channel', @@ -556,7 +258,7 @@ var PDIV = $('pubnub') || 0 }); */ 'history' : function( args, callback ) { - var callback = args['callback'] || callback + var callback = args['callback'] || callback , count = args['count'] || args['limit'] || 100 , reverse = args['reverse'] || "false" , err = args['error'] || function(){} @@ -717,7 +419,7 @@ var PDIV = $('pubnub') || 0 // Iterate over Channels each( channel.split(','), function(channel) { - if (READY) LEAVE( channel, 0 ); + if (READY) SELF['LEAVE']( channel, 0 ); CHANNELS[channel] = 0; } ); @@ -740,6 +442,7 @@ var PDIV = $('pubnub') || 0 , disconnect = args['disconnect'] || function(){} , presence = args['presence'] || 0 , noheresync = args['noheresync'] || 0 + , backfill = args['backfill'] || 0 , sub_timeout = args['timeout'] || SUB_TIMEOUT , windowing = args['windowing'] || SUB_WINDOWING , restore = args['restore']; @@ -747,6 +450,8 @@ var PDIV = $('pubnub') || 0 // Restore Enabled? if (restore) SUB_RESTORE = 1; + TIMETOKEN = 0; + // Make sure we have a Channel if (!channel) return error('Missing Channel'); if (!callback) return error('Missing Callback'); @@ -864,6 +569,12 @@ var PDIV = $('pubnub') || 0 SUB_RESTORE && db['get'](SUBSCRIBE_KEY) || messages[1]; + + if (backfill) { + Timetoken = 10000; + backfill = 0; + } + // Update Saved Timetoken db['set']( SUBSCRIBE_KEY, messages[1] ); @@ -911,18 +622,21 @@ var PDIV = $('pubnub') || 0 }, 'here_now' : function( args, callback ) { - var callback = args['callback'] || callback + var callback = args['callback'] || callback , err = args['error'] || function(){} , channel = args['channel'] , jsonp = jsonp_cb() - , data = {}; + , data = null; // Make sure we have a Channel if (!channel) return error('Missing Channel'); if (!callback) return error('Missing Callback'); if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key'); - - if (jsonp != '0') data['callback'] = jsonp; + + if (jsonp != '0') { + data = {}; + data['callback'] = jsonp; + } xdr({ callback : jsonp, @@ -931,178 +645,458 @@ var PDIV = $('pubnub') || 0 fail : err, url : [ STD_ORIGIN, 'v2', 'presence', - 'sub_key', SUBSCRIBE_KEY, + 'sub_key', SUBSCRIBE_KEY, 'channel', encode(channel) ] }); }, // Expose PUBNUB Functions - 'xdr' : xdr, - 'ready' : ready, - 'db' : db, - 'uuid' : uuid, - 'each' : each, - 'map' : map, - 'grep' : grep, - 'css' : css, - '$' : $, - 'create' : create, - 'bind' : bind, - 'supplant' : supplant, - 'head' : head, - 'search' : search, - 'attr' : attr, - 'now' : rnow, - 'unique' : unique, - 'events' : events, - 'updater' : updater, - 'init' : CREATE_PUBNUB + 'xdr' : xdr, + 'ready' : ready, + 'db' : db, + 'uuid' : uuid, + 'map' : map, + 'each' : each, + 'each-channel' : each_channel, + 'grep' : grep, + 'supplant' : supplant, + 'now' : rnow, + 'unique' : unique, + 'updater' : updater }; - PUB_QUEUE.sending = 0; - function publish(next) { - if (next) PUB_QUEUE.sending = 0; - if (PUB_QUEUE.sending || !PUB_QUEUE.length) return; - PUB_QUEUE.sending = 1; - xdr(PUB_QUEUE.shift()); - } - - function each_channel(callback) { - each( generate_channel_list(CHANNELS), function(channel) { - var chan = CHANNELS[channel]; - if (!chan) return; - callback(chan); - } ); - } - - if (!UUID) UUID = uuid(); - db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); - - // Return without Testing - if (setup['notest']) return SELF; - - // Announce Leave Event - LEAVE = function( channel, blocking ) { - var data = { 'uuid' : UUID } - , origin = nextorigin(ORIGIN) - , jsonp = jsonp_cb(); - - // Prevent Leaving a Presence Channel - if (channel.indexOf(PRESENCE_SUFFIX) > 0) return; - - if (jsonp != '0') data['callback'] = jsonp; - - xdr({ - blocking : blocking || SSL, - timeout : 2000, - callback : jsonp, - data : data, - url : [ - origin, 'v2', 'presence', 'sub_key', - SUBSCRIBE_KEY, 'channel', encode(channel), 'leave' - ] - }); - }; - - // Add Leave Functions - bind( 'beforeunload', window, function() { - each_channel(function(ch){ LEAVE( ch.name, 1 ) }); - return true; - } ); - - // Test Connection State - function _is_online() { - if (!('onLine' in navigator)) return 1; - return navigator['onLine']; - } function _poll_online() { _is_online() || _reset_offline(); timeout( _poll_online, SECOND ); } + function _poll_online2() { SELF['time'](function(success){ success || _reset_offline(); timeout( _poll_online2, KEEPALIVE ); - }); + }) } + function _reset_offline() { SUB_RECEIVER && SUB_RECEIVER(1); } + + if (!UUID) UUID = SELF['uuid'](); + db['set']( SUBSCRIBE_KEY + 'uuid', UUID ); + timeout( _poll_online, SECOND ); timeout( _poll_online2, KEEPALIVE ); - bind( 'offline', window, _reset_offline ); - bind( 'offline', document, _reset_offline ); - - // Return PUBNUB Socket Object return SELF; -}; +} +/* --------------------------------------------------------------------------- +--------------------------------------------------------------------------- */ -// PUBNUB READY TO CONNECT -function ready() { timeout( function() { - if (READY) return; - READY = 1; - each( READY_BUFFER, function(connect) { connect() } ); -}, SECOND ); } +/* --------------------------------------------------------------------------- +PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks +Copyright (c) 2011 PubNub Inc. +http://www.pubnub.com/ +http://www.pubnub.com/terms +--------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +--------------------------------------------------------------------------- */ +(function(){ + +/** + * UTIL LOCALS + */ +var NOW = 1 +, PNSDK = 'PubNub-JS-' + 'Webos' + '/' + '3.4.4' +, XHRTME = 310000; -// Bind for PUBNUB Readiness to Subscribe -bind( 'load', window, function(){ timeout( ready, 0 ) } ); -var pdiv = PDIV || {}; -// CREATE A PUBNUB GLOBAL OBJECT -PUBNUB = CREATE_PUBNUB({ - 'notest' : 1, - 'publish_key' : attr( pdiv, 'pub-key' ), - 'subscribe_key' : attr( pdiv, 'sub-key' ), - 'ssl' : !document.location.href.indexOf('https') || - attr( pdiv, 'ssl' ) == 'on', - 'origin' : attr( pdiv, 'origin' ), - 'uuid' : attr( pdiv, 'uuid' ) -}); +/** + * LOCAL STORAGE + */ +var db = (function(){ + var ls = typeof localStorage != 'undefined' && localStorage; + return { + get : function(key) { + try { + if (ls) return ls.getItem(key); + if (document.cookie.indexOf(key) == -1) return null; + return ((document.cookie||'').match( + RegExp(key+'=([^;]+)') + )||[])[1] || null; + } catch(e) { return } + }, + set : function( key, value ) { + try { + if (ls) return ls.setItem( key, value ) && 0; + document.cookie = key + '=' + value + + '; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/'; + } catch(e) { return } + } + }; +})(); -// jQuery Interface -window['jQuery'] && (window['jQuery']['PUBNUB'] = PUBNUB); -// For Modern JS + Testling.js - http://testling.com/ -typeof(module) !== 'undefined' && (module['exports'] = PUBNUB) && ready(); +/** + * CORS XHR Request + * ================ + * xdr({ + * url : ['http://www.blah.com/url'], + * success : function(response) {}, + * fail : function() {} + * }); + */ +function xdr( setup ) { + var xhr + , finished = function() { + if (loaded) return; + loaded = 1; -var pubnubs = $('pubnubs') || 0; + clearTimeout(timer); -// LEAVE NOW IF NO PDIV. -if (!PDIV) return; + try { response = JSON['parse'](xhr.responseText); } + catch (r) { return done(1); } -// PUBNUB Flash Socket -css( PDIV, { 'position' : 'absolute', 'top' : -SECOND } ); + success(response); + } + , complete = 0 + , loaded = 0 + , timer = timeout( function(){done(1)}, XHRTME ) + , data = setup.data || {} + , fail = setup.fail || function(){} + , success = setup.success || function(){} + , async = ( typeof(setup.blocking) === 'undefined' ) + , done = function(failed) { + if (complete) return; + complete = 1; -if ('opera' in window || attr( PDIV, 'flash' )) PDIV['innerHTML'] = - ''; + clearTimeout(timer); + + if (xhr) { + xhr.onerror = xhr.onload = null; + xhr.abort && xhr.abort(); + xhr = null; + } -// Create Interface for Opera Flash -PUBNUB['rdx'] = function( id, data ) { - if (!data) return FDomainRequest[id]['onerror'](); - FDomainRequest[id]['responseText'] = unescape(data); - FDomainRequest[id]['onload'](); + failed && fail(); + }; + + // Send + try { + xhr = typeof XDomainRequest !== 'undefined' && + new XDomainRequest() || + new XMLHttpRequest(); + + xhr.onerror = xhr.onabort = function(){ done(1) }; + xhr.onload = xhr.onloadend = finished; + if (async) xhr.timeout = XHRTME; + data['pnsdk'] = PNSDK; + url = build_url(setup.url, data); + xhr.open( 'GET', url, async); + xhr.send(); + } + catch(eee) { + done(0); + return xdr(setup); + } + + // Return 'done' + return done; +} + +/** + * BIND + * ==== + * bind( 'keydown', search('a')[0], function(element) { + * ... + * } ); + */ +function bind( type, el, fun ) { + each( type.split(','), function(etype) { + var rapfun = function(e) { + if (!e) e = window.event; + if (!fun(e)) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + e.stopPropagation && e.stopPropagation(); + } + }; + + if ( el.addEventListener ) el.addEventListener( etype, rapfun, false ); + else if ( el.attachEvent ) el.attachEvent( 'on' + etype, rapfun ); + else el[ 'on' + etype ] = rapfun; + } ); +} + +/** + * UNBIND + * ====== + * unbind( 'keydown', search('a')[0] ); + */ +function unbind( type, el, fun ) { + if ( el.removeEventListener ) el.removeEventListener( type, false ); + else if ( el.detachEvent ) el.detachEvent( 'on' + type, false ); + else el[ 'on' + type ] = null; +} + +/** + * ERROR + * === + * error('message'); + */ +function error(message) { console['error'](message) } + +/** + * EVENTS + * ====== + * PUBNUB.events.bind( 'you-stepped-on-flower', function(message) { + * // Do Stuff with message + * } ); + * + * PUBNUB.events.fire( 'you-stepped-on-flower', "message-data" ); + * PUBNUB.events.fire( 'you-stepped-on-flower', {message:"data"} ); + * PUBNUB.events.fire( 'you-stepped-on-flower', [1,2,3] ); + * + */ +var events = { + 'list' : {}, + 'unbind' : function( name ) { events.list[name] = [] }, + 'bind' : function( name, fun ) { + (events.list[name] = events.list[name] || []).push(fun); + }, + 'fire' : function( name, data ) { + each( + events.list[name] || [], + function(fun) { fun(data) } + ); + } }; -function FDomainRequest() { - if (!pubnubs || !pubnubs['get']) return 0; +/** + * ATTR + * ==== + * var attribute = attr( node, 'attribute' ); + */ +function attr( node, attribute, value ) { + if (value) node.setAttribute( attribute, value ); + else return node && node.getAttribute && node.getAttribute(attribute); +} - var fdomainrequest = { - 'id' : FDomainRequest['id']++, - 'send' : function() {}, - 'abort' : function() { fdomainrequest['id'] = {} }, - 'open' : function( method, url ) { - FDomainRequest[fdomainrequest['id']] = fdomainrequest; - pubnubs['get']( fdomainrequest['id'], url ); - } - }; +/** + * $ + * = + * var div = $('divid'); + */ +function $(id) { return document.getElementById(id) } - return fdomainrequest; + +/** + * SEARCH + * ====== + * var elements = search('a div span'); + */ +function search( elements, start ) { + var list = []; + each( elements.split(/\s+/), function(el) { + each( (start || document).getElementsByTagName(el), function(node) { + list.push(node); + } ); + } ); + return list; } -FDomainRequest['id'] = SECOND; + +/** + * CSS + * === + * var obj = create('div'); + */ +function css( element, styles ) { + for (var style in styles) if (styles.hasOwnProperty(style)) + try {element.style[style] = styles[style] + ( + '|width|height|top|left|'.indexOf(style) > 0 && + typeof styles[style] == 'number' + ? 'px' : '' + )}catch(e){} +} + +/** + * CREATE + * ====== + * var obj = create('div'); + */ +function create(element) { return document.createElement(element) } + +/* =-====================================================================-= */ +/* =-====================================================================-= */ +/* =-========================= PUBNUB ===========================-= */ +/* =-====================================================================-= */ +/* =-====================================================================-= */ + +function PN(setup) { + + + setup['db'] = db; + setup['xdr'] = xdr; + setup['error'] = error; + var SELF = PN_API(setup); + + SELF['init'] = PN; + SELF['$'] = $; + SELF['attr'] = attr; + SELF['search'] = search; + SELF['bind'] = bind; + SELF['css'] = css; + SELF['create'] = create; + + + // Add Leave Functions + bind( 'beforeunload', window, function() { + SELF['each-channel'](function(ch){ SELF['LEAVE']( ch.name, 1 ) }); + return true; + } ); + + // Return without Testing + if (setup['notest']) return SELF; + + bind( 'offline', window, SELF['_reset_offline'] ); + bind( 'offline', document, SELF['_reset_offline'] ); + + SELF['ready'](); + return SELF; +} + +typeof module !== 'undefined' && (module.exports = PN) || +typeof exports !== 'undefined' && (exports.PN = PN) || (PUBNUB = PN); + +})(); +(function(){ + +// --------------------------------------------------------------------------- +// WEBSOCKET INTERFACE +// --------------------------------------------------------------------------- +var WS = PUBNUB['ws'] = function( url, protocols ) { + if (!(this instanceof WS)) return new WS( url, protocols ); + + var self = this + , url = self.url = url || '' + , protocol = self.protocol = protocols || 'Sec-WebSocket-Protocol' + , bits = url.split('/') + , setup = { + 'ssl' : bits[0] === 'wss:' + ,'origin' : bits[2] + ,'publish_key' : bits[3] + ,'subscribe_key' : bits[4] + ,'channel' : bits[5] + }; + + // READY STATES + self['CONNECTING'] = 0; // The connection is not yet open. + self['OPEN'] = 1; // The connection is open and ready to communicate. + self['CLOSING'] = 2; // The connection is in the process of closing. + self['CLOSED'] = 3; // The connection is closed or couldn't be opened. + + // CLOSE STATES + self['CLOSE_NORMAL'] = 1000; // Normal Intended Close; completed. + self['CLOSE_GOING_AWAY'] = 1001; // Closed Unexpecttedly. + self['CLOSE_PROTOCOL_ERROR'] = 1002; // Server: Not Supported. + self['CLOSE_UNSUPPORTED'] = 1003; // Server: Unsupported Protocol. + self['CLOSE_TOO_LARGE'] = 1004; // Server: Too Much Data. + self['CLOSE_NO_STATUS'] = 1005; // Server: No reason. + self['CLOSE_ABNORMAL'] = 1006; // Abnormal Disconnect. + + // Events Default + self['onclose'] = self['onerror'] = + self['onmessage'] = self['onopen'] = + self['onsend'] = function(){}; + + // Attributes + self['binaryType'] = ''; + self['extensions'] = ''; + self['bufferedAmount'] = 0; + self['trasnmitting'] = false; + self['buffer'] = []; + self['readyState'] = self['CONNECTING']; + + // Close if no setup. + if (!url) { + self['readyState'] = self['CLOSED']; + self['onclose']({ + 'code' : self['CLOSE_ABNORMAL'], + 'reason' : 'Missing URL', + 'wasClean' : true + }); + return self; + } + + // PubNub WebSocket Emulation + self.pubnub = PUBNUB['init'](setup); + self.pubnub.setup = setup; + self.setup = setup; + + self.pubnub['subscribe']({ + 'restore' : false, + 'channel' : setup['channel'], + 'disconnect' : self['onerror'], + 'reconnect' : self['onopen'], + 'error' : function() { + self['onclose']({ + 'code' : self['CLOSE_ABNORMAL'], + 'reason' : 'Missing URL', + 'wasClean' : false + }); + }, + 'callback' : function(message) { + self['onmessage']({ 'data' : message }); + }, + 'connect' : function() { + self['readyState'] = self['OPEN']; + self['onopen'](); + } + }); +}; + +// --------------------------------------------------------------------------- +// WEBSOCKET SEND +// --------------------------------------------------------------------------- +WS.prototype.send = function(data) { + var self = this; + self.pubnub['publish']({ + 'channel' : self.pubnub.setup['channel'], + 'message' : data, + 'callback' : function(response) { + self['onsend']({ 'data' : response }); + } + }); +}; + +// --------------------------------------------------------------------------- +// WEBSOCKET CLOSE +// --------------------------------------------------------------------------- +WS.prototype.close = function() { + var self = this; + self.pubnub['unsubscribe']({ 'channel' : self.pubnub.setup['channel'] }); + self['readyState'] = self['CLOSED']; + self['onclose']({}); +}; })(); diff --git a/webos/pubnub.min.js b/webos/pubnub.min.js new file mode 100644 index 000000000..278e08b3b --- /dev/null +++ b/webos/pubnub.min.js @@ -0,0 +1,24 @@ +// Version: 3.4.4 +(function(){ +var k=!1;function l(){return function(){}}var ca=1,o=k,v=[],z="-pnpres",A=1E3,da=/{([\w\-]+)}/g;function ea(){return"x"+ ++ca+""+ +new Date}function F(){return+new Date}var H,I=Math.floor(20*Math.random());H=function(a,c){return 0++I?I:I=1))||a};function fa(a,c){function b(){f+c>F()?(clearTimeout(d),d=setTimeout(b,c)):(f=F(),a())}var d,f=0;return b}function ga(a,c){var b=[];K(a||[],function(a){c(a)&&b.push(a)});return b} +function ha(a,c){return a.replace(da,function(a,d){return c[d]||a})}function J(a){var c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=16*Math.random()|0;return("x"==a?c:c&3|8).toString(16)});a&&a(c);return c}function K(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function O(a){var c=[];K(a,function(a,d){d.g&&c.push(a)});return c.sort()}function ia(){setTimeout(function(){o||(o=1,K(v,function(a){a()}))},A)} +function R(a){function c(a){f||(f=1,clearTimeout(e),d&&(d.onerror=d.onload=null,d.abort&&d.abort(),d=null),a&&P())}function b(){if(!q){q=1;clearTimeout(e);try{response=JSON.parse(d.responseText)}catch(a){return c(1)}B(response)}}var d,f=0,q=0,e;e=setTimeout(function(){c(1)},S);var C=a.data||{},P=a.b||l(),B=a.c||l(),p="undefined"===typeof a.j;try{d="undefined"!==typeof XDomainRequest&&new XDomainRequest||new XMLHttpRequest;d.onerror=d.onabort=function(){c(1)};d.onload=d.onloadend=b;p&&(d.timeout=S); +C.pnsdk=ja;var g=a.url.join("/");if(C){var r=[],g=g+"?",i;for(i in C)r.push(i+"="+N(C[i]));g+=r.join("&")}url=g;d.open("GET",url,p);d.send()}catch(w){return c(0),R(a)}return c}function T(a,c,b){K(a.split(","),function(a){function f(a){a||(a=window.event);b(a)||(a.cancelBubble=!0,a.returnValue=k,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())}c.addEventListener?c.addEventListener(a,f,k):c.attachEvent?c.attachEvent("on"+a,f):c["on"+a]=f})} +function ka(a){console.error(a)}function la(a,c,b){if(b)a.setAttribute(c,b);else return a&&a.getAttribute&&a.getAttribute(c)}function ma(a){return document.getElementById(a)}function na(a,c){var b=[];K(a.split(/\s+/),function(a){K((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b}function oa(a,c){for(var b in c)if(c.hasOwnProperty(b))try{a.style[b]=c[b]+(0<"|width|height|top|left|".indexOf(b)&&"number"==typeof c[b]?"px":"")}catch(d){}} +function pa(a){return document.createElement(a)} +function U(a){function c(){}function b(){m.time(function(a){a||x&&x(1);setTimeout(b,B)})}function d(){qa()||x&&x(1);setTimeout(d,A)}function f(a){K(O(s),function(b){(b=s[b])&&a(b)})}function q(a){a&&(t.h=0);!t.h&&t.length&&(t.h=1,u(t.shift()))}a.db=V;a.xdr=R;a.error=ka;var e,C=+a.windowing||10,P=(+a.timeout||310)*A,B=(+a.keepalive||60)*A,p=a.publish_key||"",g=a.subscribe_key||"",r=a.ssl?"s":"",i="http"+r+"://"+(a.origin||"pubsub.pubnub.com"),w=H(i),W=H(i),t=[],Z=0,$=0,x=0,Q=0,aa=0,G=0,s={},u=a.xdr, +h=a.error||l(),qa=a._is_online||function(){return 1},y=a.jsonp_cb||function(){return 0},D=a.db||{get:l(),set:l()},E=a.uuid||D&&D.get(g+"uuid")||"",m={LEAVE:function(a,b){var c={uuid:E},d=H(i),e=y();0