legacy.js 82 KB

1
  1. var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||typeof Object.defineProperties=='function'?Object.defineProperty:function(b,c,a){a=a;if(b==Array.prototype||b==Object.prototype){return}b[c]=a.value};$jscomp.getGlobal=function(a){return typeof window!='undefined'&&window===a?a:typeof global!='undefined'&&global!=null?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(i,f,j,k){if(!f){return}var a=$jscomp.global;var b=i.split('.');for(var e=0;e<b.length-1;e++){var d=b[e];if(!(d in a)){a[d]={}}a=a[d]}var g=b[b.length-1];var h=a[g];var c=f(h);if(c==h||c==null){return}$jscomp.defineProperty(a,g,{configurable:!0,writable:!0,value:c})};$jscomp.polyfill('Array.prototype.copyWithin',function(a){if(a){return a}var b=function(d,c,b){var e=this.length;d=Number(d);c=Number(c);b=Number(b!=null?b:e);if(d<c){b=Math.min(b,e);while(c<b){if(c in this){this[d++]=this[c++]}else {delete this[d++];c++}}}else {b=Math.min(b,e+c-d);d+=b-c;while(b>c){if(--b in this){this[--d]=this[b]}else {delete this[d]}}}return this};return b},'es6','es3');$jscomp.SYMBOL_PREFIX='jscomp_symbol_';$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};if(!$jscomp.global['Symbol']){$jscomp.global['Symbol']=$jscomp.Symbol}};$jscomp.Symbol=function(){var a=0;function Symbol(b){return $jscomp.SYMBOL_PREFIX+(b||'')+a++}return Symbol}();$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global['Symbol'].iterator;if(!a){a=$jscomp.global['Symbol'].iterator=$jscomp.global['Symbol']('iterator')}if(typeof Array.prototype[a]!='function'){$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}})}$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){if(b<a.length){return {done:!1,value:a[b++]}}else {return {done:!0}}})};$jscomp.iteratorPrototype=function(b){$jscomp.initSymbolIterator();var a={next:b};a[$jscomp.global['Symbol'].iterator]=function(){return this};return a};$jscomp.iteratorFromArray=function(a,d){$jscomp.initSymbolIterator();if(a instanceof String){a=a+''}var c=0;var b={next:function(){if(c<a.length){var e=c++;return {value:d(e,a[e]),done:!1}}b.next=function(){return {done:!0,value:void 0}};return b.next()}};b[Symbol.iterator]=function(){return b};return b};$jscomp.polyfill('Array.prototype.entries',function(a){if(a){return a}var b=function(){return $jscomp.iteratorFromArray(this,function(b,c){return [b,c]})};return b},'es6','es3');$jscomp.polyfill('Array.prototype.fill',function(a){if(a){return a}var b=function(f,c,b){var d=this.length||0;if(c<0){c=Math.max(0,d+c)}if(b==null||b>d){b=d}b=Number(b);if(b<0){b=Math.max(0,d+b)}for(var e=Number(c||0);e<b;e++){this[e]=f}return this};return b},'es6','es3');$jscomp.findInternal=function(a,d,e){if(a instanceof String){a=String(a)}var f=a.length;for(var b=0;b<f;b++){var c=a[b];if(d.call(e,c,b,a)){return {i:b,v:c}}}return {i:-1,v:void 0}};$jscomp.polyfill('Array.prototype.find',function(a){if(a){return a}var b=function(c,b){return $jscomp.findInternal(this,c,b).v};return b},'es6','es3');$jscomp.polyfill('Array.prototype.findIndex',function(a){if(a){return a}var b=function(c,b){return $jscomp.findInternal(this,c,b).i};return b},'es6','es3');$jscomp.polyfill('Array.from',function(a){if(a){return a}var b=function(b,c,g){$jscomp.initSymbolIterator();c=c!=null?c:function(d){return d};var e=[];var f=b[Symbol.iterator];if(typeof f=='function'){b=f.call(b);var h;var j=0;while(!(h=b.next()).done){e.push(c.call(g,h.value,j++))}}else {var i=b.length;for(var d=0;d<i;d++){e.push(c.call(g,b[d],d))}}return e};return b},'es6','es3');$jscomp.polyfill('Object.is',function(a){if(a){return a}var b=function(b,c){if(b===c){return b!==0||1/b===1/c}else {return b!==b&&c!==c}};return b},'es6','es3');$jscomp.polyfill('Array.prototype.includes',function(a){if(a){return a}var b=function(d,g){var c=this;if(c instanceof String){c=String(c)}var f=c.length;var b=g||0;if(b<0){b=Math.max(b+f,0)}for(;b<f;b++){var e=c[b];if(e===d||Object.is(e,d)){return !0}}return !1};return b},'es7','es3');$jscomp.polyfill('Array.prototype.keys',function(a){if(a){return a}var b=function(){return $jscomp.iteratorFromArray(this,function(b){return b})};return b},'es6','es3');$jscomp.polyfill('Array.of',function(a){if(a){return a}var b=function(b){return Array.from(arguments)};return b},'es6','es3');$jscomp.polyfill('Array.prototype.values',function(a){if(a){return a}var b=function(){return $jscomp.iteratorFromArray(this,function(c,b){return b})};return b},'es8','es3');$jscomp.makeIterator=function(a){$jscomp.initSymbolIterator();var b=a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.polyfill('Promise',function(c){if(c&&!$jscomp.FORCE_POLYFILL_PROMISE){return c}function AsyncExecutor(){this.batch_=null}AsyncExecutor.prototype.asyncExecute=function(a){if(this.batch_==null){this.batch_=[];this.asyncExecuteBatch_()}this.batch_.push(a);return this};AsyncExecutor.prototype.asyncExecuteBatch_=function(){var a=this;this.asyncExecuteFunction(function(){a.executeBatch_()})};var e=$jscomp.global['setTimeout'];AsyncExecutor.prototype.asyncExecuteFunction=function(a){e(a,0)};AsyncExecutor.prototype.executeBatch_=function(){while(this.batch_&&this.batch_.length){var b=this.batch_;this.batch_=[];for(var a=0;a<b.length;++a){var d=b[a];b[a]=null;try{d()}catch(f){this.asyncThrow_(f)}}}this.batch_=null};AsyncExecutor.prototype.asyncThrow_=function(a){this.asyncExecuteFunction(function(){throw a})};var b={PENDING:0,FULFILLED:1,REJECTED:2};var a=function(d){this.state_=b.PENDING;this.result_=undefined;this.onSettledCallbacks_=[];var a=this.createResolveAndReject_();try{d(a.resolve,a.reject)}catch(f){a.reject(f)}};a.prototype.createResolveAndReject_=function(){var b=this;var a=!1;function firstCallWins(d){return function(e){if(!a){a=!0;d.call(b,e)}}}return {resolve:firstCallWins(this.resolveTo_),reject:firstCallWins(this.reject_)}};a.prototype.resolveTo_=function(b){if(b===this){this.reject_(new TypeError('A Promise cannot resolve to itself'))}else {if(b instanceof a){this.settleSameAsPromise_(b)}else {if(isObject(b)){this.resolveToNonPromiseObj_(b)}else {this.fulfill_(b)}}}};a.prototype.resolveToNonPromiseObj_=function(b){var a=undefined;try{a=b.then}catch(f){this.reject_(f);return}if(typeof a=='function'){this.settleSameAsThenable_(a,b)}else {this.fulfill_(b)}};function isObject(a){switch(typeof a){case 'object':return a!=null;case 'function':return !0;default:return !1;}}a.prototype.reject_=function(a){this.settle_(b.REJECTED,a)};a.prototype.fulfill_=function(a){this.settle_(b.FULFILLED,a)};a.prototype.settle_=function(d,a){if(this.state_!=b.PENDING){throw new Error('Cannot settle('+d+', '+a+'): Promise already settled in state'+this.state_)}this.state_=d;this.result_=a;this.executeOnSettledCallbacks_()};a.prototype.executeOnSettledCallbacks_=function(){if(this.onSettledCallbacks_!=null){for(var a=0;a<this.onSettledCallbacks_.length;++a){d.asyncExecute(this.onSettledCallbacks_[a])}this.onSettledCallbacks_=null}};var d=new AsyncExecutor();a.prototype.settleSameAsPromise_=function(b){var a=this.createResolveAndReject_();b.callWhenSettled_(a.resolve,a.reject)};a.prototype.settleSameAsThenable_=function(b,d){var a=this.createResolveAndReject_();try{b.call(d,a.resolve,a.reject)}catch(f){a.reject(f)}};a.prototype.then=function(f,g){var b;var d;var e=new a(function(a,e){b=a;d=e});function createCallback(a,e){if(typeof a=='function'){return function(h){try{b(a(h))}catch(i){d(i)}}}else {return e}}this.callWhenSettled_(createCallback(f,b),createCallback(g,d));return e};a.prototype['catch']=function(a){return this.then(undefined,a)};a.prototype.callWhenSettled_=function(e,f){var a=this;function callback(){switch(a.state_){case b.FULFILLED:e(a.result_);break;case b.REJECTED:f(a.result_);break;default:throw new Error('Unexpected state: '+a.state_);}}if(this.onSettledCallbacks_==null){d.asyncExecute(callback)}else {this.onSettledCallbacks_.push(callback)}};function resolvingPromise(b){if(b instanceof a){return b}else {return new a(function(a,d){a(b)})}}a['resolve']=resolvingPromise;a['reject']=function(b){return new a(function(d,a){a(b)})};a['race']=function(b){return new a(function(e,f){var d=$jscomp.makeIterator(b);for(var a=d.next();!a.done;a=d.next()){resolvingPromise(a.value).callWhenSettled_(e,f)}})};a['all']=function(e){var d=$jscomp.makeIterator(e);var b=d.next();if(b.done){return resolvingPromise([])}else {return new a(function(g,h){var a=[];var f=0;function onFulfilled(b){return function(d){a[b]=d;f--;if(f==0){g(a)}}}do{a.push(undefined);f++;resolvingPromise(b.value).callWhenSettled_(onFulfilled(a.length-1),h);b=d.next()}while(!b.done)})}};return a},'es6','es3');$jscomp.polyfill('Promise.prototype.finally',function(a){if(a){return a}var b=function(b){return this.then(function(d){var c=Promise.resolve(b());return c.then(function(){return d})},function(d){var c=Promise.resolve(b());return c.then(function(){throw d})})};return b},'es9','es3');$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0};var a={};try{a.__proto__=b;return a.a}catch(c){}return !1};$jscomp.setPrototypeOf=typeof Object.setPrototypeOf=='function'?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(a,b){a.__proto__=b;if(a.__proto__!==b){throw new TypeError(a+' is not extensible')}return a}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(a){if(a instanceof Object){return}throw new TypeError('Iterator result '+a+' is not an object')};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=undefined;this.nextAddress=1;this.catchAddress_=0;this.finallyAddress_=0;this.abruptCompletion_=null;this.finallyContexts_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_){throw new TypeError('Generator is already running')}this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(a){this.yieldResult=a};$jscomp.generator.Context.prototype.throw_=function(a){this.abruptCompletion_={exception:a,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype['return']=function(a){this.abruptCompletion_={'return':a};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(a){this.abruptCompletion_={jumpTo:a};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,a){this.nextAddress=a;return {value:b}};$jscomp.generator.Context.prototype.yieldAll=function(d,b){var c=$jscomp.makeIterator(d);var a=c.next();$jscomp.generator.ensureIteratorResultIsObject_(a);if(a.done){this.yieldResult=a.value;this.nextAddress=b;return}this.yieldAllIterator_=c;return this.yield(a.value,b)};$jscomp.generator.Context.prototype.jumpTo=function(a){this.nextAddress=a};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,a){this.catchAddress_=b;if(a!=undefined){this.finallyAddress_=a}};$jscomp.generator.Context.prototype.setFinallyBlock=function(a){this.catchAddress_=0;this.finallyAddress_=a||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,a){this.nextAddress=b;this.catchAddress_=a||0};$jscomp.generator.Context.prototype.enterCatchBlock=function(a){this.catchAddress_=a||0;var b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(c,b,a){if(!a){this.finallyContexts_=[this.abruptCompletion_]}else {this.finallyContexts_[a]=this.abruptCompletion_}this.catchAddress_=c||0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveFinallyBlock=function(d,c){var b=this.finallyContexts_.splice(c||0)[0];var a=this.abruptCompletion_=this.abruptCompletion_||b;if(a){if(a.isException){return this.jumpToErrorHandler_()}if(a.jumpTo!=undefined&&this.finallyAddress_<a.jumpTo){this.nextAddress=a.jumpTo;this.abruptCompletion_=null}else {this.nextAddress=this.finallyAddress_}}else {this.nextAddress=d}};$jscomp.generator.Context.prototype.forIn=function(a){return new $jscomp.generator.Context.PropertyIterator(a)};$jscomp.generator.Context.PropertyIterator=function(a){this.object_=a;this.properties_=[];for(var b in a){this.properties_.push(b)}this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){while(this.properties_.length>0){var a=this.properties_.pop();if(a in this.object_){return a}}return null};$jscomp.generator.Engine_=function(a){this.context_=new $jscomp.generator.Context();this.program_=a};$jscomp.generator.Engine_.prototype.next_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_){return this.yieldAllStep_(this.context_.yieldAllIterator_.next,a,this.context_.next_)}this.context_.next_(a);return this.nextStep_()};$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var a=this.context_.yieldAllIterator_;if(a){var c='return' in a?a['return']:function(a){return {value:a,done:!0}};return this.yieldAllStep_(c,b,this.context_['return'])}this.context_['return'](b);return this.nextStep_()};$jscomp.generator.Engine_.prototype.throw_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_){return this.yieldAllStep_(this.context_.yieldAllIterator_['throw'],a,this.context_.next_)}this.context_.throw_(a);return this.nextStep_()};$jscomp.generator.Engine_.prototype.yieldAllStep_=function(d,e,c){try{var a=d.call(this.context_.yieldAllIterator_,e);$jscomp.generator.ensureIteratorResultIsObject_(a);if(!a.done){this.context_.stop_();return a}var b=a.value}catch(f){this.context_.yieldAllIterator_=null;this.context_.throw_(f);return this.nextStep_()}this.context_.yieldAllIterator_=null;c.call(this.context_,b);return this.nextStep_()};$jscomp.generator.Engine_.prototype.nextStep_=function(){while(this.context_.nextAddress){try{var b=this.program_(this.context_);if(b){this.context_.stop_();return {value:b.value,done:!1}}}catch(c){this.context_.yieldResult=undefined;this.context_.throw_(c)}}this.context_.stop_();if(this.context_.abruptCompletion_){var a=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(a.isException){throw a.exception}return {value:a['return'],done:!0}}return {value:undefined,done:!0}};$jscomp.generator.Generator_=function(a){this.next=function(b){return a.next_(b)};this['throw']=function(b){return a.throw_(b)};this['return']=function(b){return a.return_(b)};$jscomp.initSymbolIterator();this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,c){var a=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(c));if($jscomp.setPrototypeOf){$jscomp.setPrototypeOf(a,b.prototype)}return a};$jscomp.asyncExecutePromiseGenerator=function(a){function passValueToGenerator(b){return a.next(b)}function passErrorToGenerator(b){return a['throw'](b)}return new Promise(function(b,c){function handleGeneratorRecord(d){if(d.done){b(d.value)}else {Promise.resolve(d.value).then(passValueToGenerator,passErrorToGenerator).then(handleGeneratorRecord,c)}}handleGeneratorRecord(a.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(a){return $jscomp.asyncExecutePromiseGenerator(a())};$jscomp.asyncExecutePromiseGeneratorProgram=function(a){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(a)))};$jscomp.checkEs6ConformanceViaProxy=function(){try{var a={};var b=Object.create(new $jscomp.global['Proxy'](a,{'get':function(d,e,c){return d==a&&e=='q'&&c==b}}));return b['q']===!0}catch(c){return !1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.owns=function(b,a){return Object.prototype.hasOwnProperty.call(b,a)};$jscomp.polyfill('WeakMap',function(c){function isConformant(){if(!c||!Object.seal){return !1}try{var b=Object.seal({});var d=Object.seal({});var a=new c([[b,2],[d,3]]);if(a.get(b)!=2||a.get(d)!=3){return !1}a['delete'](b);a.set(d,4);return !a.has(b)&&a.get(d)==4}catch(e){return !1}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(c&&$jscomp.ES6_CONFORMANCE){return c}}else {if(isConformant()){return c}}var a='$jscomp_hidden_'+Math.random();function insert(b){if(!$jscomp.owns(b,a)){var d={};$jscomp.defineProperty(b,a,{value:d})}}function patch(a){var b=Object[a];if(b){Object[a]=function(d){insert(d);return b(d)}}}patch('freeze');patch('preventExtensions');patch('seal');var d=0;var b=function(a){this.id_=(d+=Math.random()+1).toString();if(a){$jscomp.initSymbol();$jscomp.initSymbolIterator();var f=$jscomp.makeIterator(a);var b;while(!(b=f.next()).done){var e=b.value;this.set(e[0],e[1])}}};b.prototype.set=function(b,d){insert(b);if(!$jscomp.owns(b,a)){throw new Error('WeakMap key fail: '+b)}b[a][this.id_]=d;return this};b.prototype.get=function(b){return $jscomp.owns(b,a)?b[a][this.id_]:undefined};b.prototype.has=function(b){return $jscomp.owns(b,a)&&$jscomp.owns(b[a],this.id_)};b.prototype['delete']=function(b){if(!$jscomp.owns(b,a)||!$jscomp.owns(b[a],this.id_)){return !1}return delete b[a][this.id_]};return b},'es6','es3');$jscomp.MapEntry=function(){this.previous;this.next;this.head;this.key;this.value};$jscomp.polyfill('Map',function(b){function isConformant(){if($jscomp.ASSUME_NO_NATIVE_MAP||!b||typeof b!='function'||!b.prototype.entries||typeof Object.seal!='function'){return !1}try{b=b;var e=Object.seal({x:4});var c=new b($jscomp.makeIterator([[e,'s']]));if(c.get(e)!='s'||c.size!=1||c.get({x:4})||c.set({x:4},'t')!=c||c.size!=2){return !1}var d=c.entries();var a=d.next();if(a.done||a.value[0]!=e||a.value[1]!='s'){return !1}a=d.next();if(a.done||a.value[0].x!=4||a.value[1]!='t'||!d.next().done){return !1}return !0}catch(i){return !1}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(b&&$jscomp.ES6_CONFORMANCE){return b}}else {if(isConformant()){return b}}$jscomp.initSymbol();$jscomp.initSymbolIterator();var e=new WeakMap();var a=function(a){this.data_={};this.head_=f();this.size=0;if(a){var e=$jscomp.makeIterator(a);var c;while(!(c=e.next()).done){var d=c.value;this.set(d[0],d[1])}}};a.prototype.set=function(d,e){d=d===0?0:d;var a=c(this,d);if(!a.list){a.list=this.data_[a.id]=[]}if(!a.entry){a.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:d,value:e};a.list.push(a.entry);this.head_.previous.next=a.entry;this.head_.previous=a.entry;this.size++}else {a.entry.value=e}return this};a.prototype['delete']=function(d){var a=c(this,d);if(a.entry&&a.list){a.list.splice(a.index,1);if(!a.list.length){delete this.data_[a.id]}a.entry.previous.next=a.entry.next;a.entry.next.previous=a.entry.previous;a.entry.head=null;this.size--;return !0}return !1};a.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=f();this.size=0};a.prototype.has=function(a){return !!c(this,a).entry};a.prototype.get=function(d){var a=c(this,d).entry;return a&&a.value};a.prototype.entries=function(){return d(this,function(a){return [a.key,a.value]})};a.prototype.keys=function(){return d(this,function(a){return a.key})};a.prototype.values=function(){return d(this,function(a){return a.value})};a.prototype.forEach=function(e,d){var f=this.entries();var c;while(!(c=f.next()).done){var a=c.value;e.call(d,a[1],a[0],this)}};a.prototype[Symbol.iterator]=a.prototype.entries;var c=function(g,e){var f=h(e);var a=g.data_[f];if(a&&$jscomp.owns(g.data_,f)){for(var d=0;d<a.length;d++){var c=a[d];if(e!==e&&c.key!==c.key||e===c.key){return {id:f,list:a,index:d,entry:c}}}}return {id:f,list:a,index:-1,entry:undefined}};var d=function(c,d){var a=c.head_;return $jscomp.iteratorPrototype(function(){if(a){while(a.head!=c.head_){a=a.previous}while(a.next!=a.head){a=a.next;return {done:!1,value:d(a)}}a=null}return {done:!0,value:void 0}})};var f=function(){var a={};a.previous=a.next=a.head=a;return a};var g=0;var h=function(a){var c=a&&typeof a;if(c=='object'||c=='function'){a=a;if(!e.has(a)){var d=''+ ++g;e.set(a,d);return d}return e.get(a)}return 'p_'+a};return a},'es6','es3');$jscomp.polyfill('Math.acosh',function(a){if(a){return a}var b=function(b){b=Number(b);return Math.log(b+Math.sqrt(b*b-1))};return b},'es6','es3');$jscomp.polyfill('Math.asinh',function(a){if(a){return a}var b=function(b){b=Number(b);if(b===0){return b}var c=Math.log(Math.abs(b)+Math.sqrt(b*b+1));return b<0?-c:c};return b},'es6','es3');$jscomp.polyfill('Math.log1p',function(a){if(a){return a}var b=function(b){b=Number(b);if(b<0.25&&b>-0.25){var f=b;var g=1;var c=b;var d=0;var e=1;while(d!=c){f*=b;e*=-1;c=(d=c)+e*f/++g}return c}return Math.log(1+b)};return b},'es6','es3');$jscomp.polyfill('Math.atanh',function(b){if(b){return b}var a=Math.log1p;var c=function(c){c=Number(c);return (a(c)-a(-c))/2};return c},'es6','es3');$jscomp.polyfill('Math.cbrt',function(a){if(a){return a}var b=function(b){if(b===0){return b}b=Number(b);var c=Math.pow(Math.abs(b),1/3);return b<0?-c:c};return b},'es6','es3');$jscomp.polyfill('Math.clz32',function(a){if(a){return a}var b=function(b){b=Number(b)>>>0;if(b===0){return 32}var c=0;if((b&4.29490176E9)===0){b<<=16;c+=16}if((b&4.27819008E9)===0){b<<=8;c+=8}if((b&4.02653184E9)===0){b<<=4;c+=4}if((b&3.221225472E9)===0){b<<=2;c+=2}if((b&2.147483648E9)===0){c++}return c};return b},'es6','es3');$jscomp.polyfill('Math.cosh',function(a){if(a){return a}var b=Math.exp;var c=function(c){c=Number(c);return (b(c)+b(-c))/2};return c},'es6','es3');$jscomp.polyfill('Math.expm1',function(a){if(a){return a}var b=function(b){b=Number(b);if(b<0.25&&b>-0.25){var e=b;var f=1;var c=b;var d=0;while(d!=c){e*=b/++f;c=(d=c)+e}return c}return Math.exp(b)-1};return b},'es6','es3');$jscomp.polyfill('Math.hypot',function(a){if(a){return a}var b=function(d,e,h){d=Number(d);e=Number(e);var b,g,f;var c=Math.max(Math.abs(d),Math.abs(e));for(b=2;b<arguments.length;b++){c=Math.max(c,Math.abs(arguments[b]))}if(c>1.0E100||c<1.0E-100){if(!c){return c}d=d/c;e=e/c;f=d*d+e*e;for(b=2;b<arguments.length;b++){g=Number(arguments[b])/c;f+=g*g}return Math.sqrt(f)*c}else {f=d*d+e*e;for(b=2;b<arguments.length;b++){g=Number(arguments[b]);f+=g*g}return Math.sqrt(f)}};return b},'es6','es3');$jscomp.polyfill('Math.imul',function(a){if(a){return a}var b=function(b,c){b=Number(b);c=Number(c);var f=b>>>16&65535;var d=b&65535;var g=c>>>16&65535;var e=c&65535;var h=f*e+d*g<<16>>>0;return d*e+h|0};return b},'es6','es3');$jscomp.polyfill('Math.log10',function(a){if(a){return a}var b=function(b){return Math.log(b)/Math.LN10};return b},'es6','es3');$jscomp.polyfill('Math.log2',function(a){if(a){return a}var b=function(b){return Math.log(b)/Math.LN2};return b},'es6','es3');$jscomp.polyfill('Math.sign',function(a){if(a){return a}var b=function(b){b=Number(b);return b===0||isNaN(b)?b:b>0?1:-1};return b},'es6','es3');$jscomp.polyfill('Math.sinh',function(a){if(a){return a}var b=Math.exp;var c=function(c){c=Number(c);if(c===0){return c}return (b(c)-b(-c))/2};return c},'es6','es3');$jscomp.polyfill('Math.tanh',function(a){if(a){return a}var b=function(b){b=Number(b);if(b===0){return b}var c=Math.exp(-2*Math.abs(b));var d=(1-c)/(1+c);return b<0?-d:d};return b},'es6','es3');$jscomp.polyfill('Math.trunc',function(a){if(a){return a}var b=function(b){b=Number(b);if(isNaN(b)||b===Infinity||b===-Infinity||b===0){return b}var c=Math.floor(Math.abs(b));return b<0?-c:c};return b},'es6','es3');$jscomp.polyfill('Number.EPSILON',function(a){return Math.pow(2,-52)},'es6','es3');$jscomp.polyfill('Number.MAX_SAFE_INTEGER',function(){return 9.007199254740991E15},'es6','es3');$jscomp.polyfill('Number.MIN_SAFE_INTEGER',function(){return -9.007199254740991E15},'es6','es3');$jscomp.polyfill('Number.isFinite',function(a){if(a){return a}var b=function(b){if(typeof b!=='number'){return !1}return !isNaN(b)&&b!==Infinity&&b!==-Infinity};return b},'es6','es3');$jscomp.polyfill('Number.isInteger',function(a){if(a){return a}var b=function(b){if(!Number.isFinite(b)){return !1}return b===Math.floor(b)};return b},'es6','es3');$jscomp.polyfill('Number.isNaN',function(a){if(a){return a}var b=function(b){return typeof b==='number'&&isNaN(b)};return b},'es6','es3');$jscomp.polyfill('Number.isSafeInteger',function(a){if(a){return a}var b=function(b){return Number.isInteger(b)&&Math.abs(b)<=Number.MAX_SAFE_INTEGER};return b},'es6','es3');$jscomp.polyfill('Number.parseFloat',function(a){return a||parseFloat},'es6','es3');$jscomp.polyfill('Number.parseInt',function(a){return a||parseInt},'es6','es3');$jscomp.assign=typeof Object.assign=='function'?Object.assign:function(d,e){for(var c=1;c<arguments.length;c++){var a=arguments[c];if(!a){continue}for(var b in a){if($jscomp.owns(a,b)){d[b]=a[b]}}}return d};$jscomp.polyfill('Object.assign',function(a){return a||$jscomp.assign},'es6','es3');$jscomp.polyfill('Object.entries',function(a){if(a){return a}var b=function(c){var d=[];for(var b in c){if($jscomp.owns(c,b)){d.push([b,c[b]])}}return d};return b},'es8','es3');$jscomp.polyfill('Object.getOwnPropertySymbols',function(a){if(a){return a}return function(){return []}},'es6','es5');$jscomp.polyfill('Reflect.ownKeys',function(b){if(b){return b}var a='jscomp_symbol_';function isSymbol(c){return c.substring(0,a.length)==a}var c=function(e){var f=[];var c=Object.getOwnPropertyNames(e);var d=Object.getOwnPropertySymbols(e);for(var a=0;a<c.length;a++){(isSymbol(c[a])?d:f).push(c[a])}return f.concat(d)};return c},'es6','es5');$jscomp.polyfill('Object.getOwnPropertyDescriptors',function(a){if(a){return a}var b=function(e){var d={};var c=Reflect.ownKeys(e);for(var b=0;b<c.length;b++){d[c[b]]=Object.getOwnPropertyDescriptor(e,c[b])}return d};return b},'es8','es5');$jscomp.polyfill('Object.setPrototypeOf',function(a){return a||$jscomp.setPrototypeOf},'es6','es5');$jscomp.polyfill('Object.values',function(a){if(a){return a}var b=function(b){var c=[];for(var d in b){if($jscomp.owns(b,d)){c.push(b[d])}}return c};return b},'es8','es3');$jscomp.polyfill('Reflect.apply',function(a){if(a){return a}var c=Function.prototype.apply;var b=function(e,d,b){return c.call(e,d,b)};return b},'es6','es3');$jscomp.objectCreate=$jscomp.ASSUME_ES5||typeof Object.create=='function'?Object.create:function(b){var a=function(){};a.prototype=b;return new a()};$jscomp.construct=function(){function reflectConstructWorks(){function Base(){}function Derived(){}new Base();Reflect.construct(Base,[],Derived);return new Base() instanceof Base}if(typeof Reflect!='undefined'&&Reflect.construct){if(reflectConstructWorks()){return Reflect.construct}var b=Reflect.construct;var a=function(e,d,a){var c=b(e,d);if(a){Reflect.setPrototypeOf(c,a.prototype)}return c};return a}function construct(b,d,a){if(a===undefined){a=b}var f=a.prototype||Object.prototype;var c=$jscomp.objectCreate(f);var e=Function.prototype.apply;var g=e.call(b,c,d);return g||c}return construct}();$jscomp.polyfill('Reflect.construct',function(a){return $jscomp.construct},'es6','es3');$jscomp.polyfill('Reflect.defineProperty',function(a){if(a){return a}var b=function(e,d,c){try{Object.defineProperty(e,d,c);var b=Object.getOwnPropertyDescriptor(e,d);if(!b){return !1}return b.configurable===(c.configurable||!1)&&b.enumerable===(c.enumerable||!1)&&('value' in b?b.value===c.value&&b.writable===(c.writable||!1):b.get===c.get&&b.set===c.set)}catch(f){return !1}};return b},'es6','es5');$jscomp.polyfill('Reflect.deleteProperty',function(a){if(a){return a}var b=function(c,b){if(!$jscomp.owns(c,b)){return !0}try{return delete c[b]}catch(d){return !1}};return b},'es6','es3');$jscomp.polyfill('Reflect.getOwnPropertyDescriptor',function(a){return a||Object.getOwnPropertyDescriptor},'es6','es5');$jscomp.polyfill('Reflect.getPrototypeOf',function(a){return a||Object.getPrototypeOf},'es6','es5');$jscomp.findDescriptor=function(d,c){var a=d;while(a){var b=Reflect.getOwnPropertyDescriptor(a,c);if(b){return b}a=Reflect.getPrototypeOf(a)}return undefined};$jscomp.polyfill('Reflect.get',function(a){if(a){return a}var b=function(d,c,e){if(arguments.length<=2){return d[c]}var b=$jscomp.findDescriptor(d,c);if(b){return b.get?b.get.call(e):b.value}return undefined};return b},'es6','es5');$jscomp.polyfill('Reflect.has',function(a){if(a){return a}var b=function(c,b){return b in c};return b},'es6','es3');$jscomp.polyfill('Reflect.isExtensible',function(a){if(a){return a}if($jscomp.ASSUME_ES5||typeof Object.isExtensible=='function'){return Object.isExtensible}return function(){return !0}},'es6','es3');$jscomp.polyfill('Reflect.preventExtensions',function(a){if(a){return a}if(!($jscomp.ASSUME_ES5||typeof Object.preventExtensions=='function')){return function(){return !1}}var b=function(b){Object.preventExtensions(b);return !Object.isExtensible(b)};return b},'es6','es3');$jscomp.polyfill('Reflect.set',function(a){if(a){return a}var b=function(b,d,e,f){var c=$jscomp.findDescriptor(b,d);if(!c){if(Reflect.isExtensible(b)){b[d]=e;return !0}return !1}if(c.set){c.set.call(arguments.length>3?f:b,e);return !0}else {if(c.writable&&!Object.isFrozen(b)){b[d]=e;return !0}}return !1};return b},'es6','es5');$jscomp.polyfill('Reflect.setPrototypeOf',function(a){if(a){return a}else {if($jscomp.setPrototypeOf){var b=$jscomp.setPrototypeOf;var c=function(c,d){try{b(c,d);return !0}catch(e){return !1}};return c}else {return null}}},'es6','es5');$jscomp.polyfill('Set',function(b){function isConformant(){if($jscomp.ASSUME_NO_NATIVE_SET||!b||typeof b!='function'||!b.prototype.entries||typeof Object.seal!='function'){return !1}try{b=b;var d=Object.seal({x:4});var c=new b($jscomp.makeIterator([d]));if(!c.has(d)||c.size!=1||c.add(d)!=c||c.size!=1||c.add({x:4})!=c||c.size!=2){return !1}var e=c.entries();var a=e.next();if(a.done||a.value[0]!=d||a.value[1]!=d){return !1}a=e.next();if(a.done||a.value[0]==d||a.value[0].x!=4||a.value[1]!=a.value[0]){return !1}return e.next().done}catch(f){return !1}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(b&&$jscomp.ES6_CONFORMANCE){return b}}else {if(isConformant()){return b}}$jscomp.initSymbol();$jscomp.initSymbolIterator();var a=function(a){this.map_=new Map();if(a){var e=$jscomp.makeIterator(a);var c;while(!(c=e.next()).done){var d=c.value;this.add(d)}}this.size=this.map_.size};a.prototype.add=function(a){a=a===0?0:a;this.map_.set(a,a);this.size=this.map_.size;return this};a.prototype['delete']=function(c){var a=this.map_['delete'](c);this.size=this.map_.size;return a};a.prototype.clear=function(){this.map_.clear();this.size=0};a.prototype.has=function(a){return this.map_.has(a)};a.prototype.entries=function(){return this.map_.entries()};a.prototype.values=function(){return this.map_.values()};a.prototype.keys=a.prototype.values;a.prototype[Symbol.iterator]=a.prototype.values;a.prototype.forEach=function(c,a){var d=this;this.map_.forEach(function(e){return c.call(a,e,e,d)})};return a},'es6','es3');$jscomp.checkStringArgs=function(a,c,b){if(a==null){throw new TypeError("The 'this' value for String.prototype."+b+' must not be null or undefined')}if(c instanceof RegExp){throw new TypeError('First argument to String.prototype.'+b+' must not be a regular expression')}return a+''};$jscomp.polyfill('String.prototype.codePointAt',function(a){if(a){return a}var b=function(b){var e=$jscomp.checkStringArgs(this,null,'codePointAt');var f=e.length;b=Number(b)||0;if(!(b>=0&&b<f)){return void 0}b=b|0;var c=e.charCodeAt(b);if(c<55296||c>56319||b+1===f){return c}var d=e.charCodeAt(b+1);if(d<56320||d>57343){return c}return (c-55296)*1024+d+9216};return b},'es6','es3');$jscomp.polyfill('String.prototype.endsWith',function(a){if(a){return a}var b=function(b,c){var d=$jscomp.checkStringArgs(this,b,'endsWith');b=b+'';if(c===void 0){c=d.length}var f=Math.max(0,Math.min(c|0,d.length));var e=b.length;while(e>0&&f>0){if(d[--f]!=b[--e]){return !1}}return e<=0};return b},'es6','es3');$jscomp.polyfill('String.fromCodePoint',function(a){if(a){return a}var b=function(e){var c='';for(var d=0;d<arguments.length;d++){var b=Number(arguments[d]);if(b<0||b>1114111||b!==Math.floor(b)){throw new RangeError('invalid_code_point '+b)}if(b<=65535){c+=String.fromCharCode(b)}else {b-=65536;c+=String.fromCharCode(b>>>10&1023|55296);c+=String.fromCharCode(b&1023|56320)}}return c};return b},'es6','es3');$jscomp.polyfill('String.prototype.includes',function(a){if(a){return a}var b=function(b,c){var d=$jscomp.checkStringArgs(this,b,'includes');return d.indexOf(b,c||0)!==-1};return b},'es6','es3');$jscomp.polyfill('String.prototype.repeat',function(a){if(a){return a}var b=function(b){var c=$jscomp.checkStringArgs(this,null,'repeat');if(b<0||b>1342177279){throw new RangeError('Invalid count value')}b=b|0;var d='';while(b){if(b&1){d+=c}if(b>>>=1){c+=c}}return d};return b},'es6','es3');$jscomp.stringPadding=function(c,a){var b=c!==undefined?String(c):' ';if(!(a>0)||!b){return ''}var d=Math.ceil(a/b.length);return b.repeat(d).substring(0,a)};$jscomp.polyfill('String.prototype.padEnd',function(a){if(a){return a}var b=function(d,c){var b=$jscomp.checkStringArgs(this,null,'padStart');var e=d-b.length;return b+$jscomp.stringPadding(c,e)};return b},'es8','es3');$jscomp.polyfill('String.prototype.padStart',function(a){if(a){return a}var b=function(d,c){var b=$jscomp.checkStringArgs(this,null,'padStart');var e=d-b.length;return $jscomp.stringPadding(c,e)+b};return b},'es8','es3');$jscomp.polyfill('String.prototype.startsWith',function(a){if(a){return a}var b=function(b,g){var c=$jscomp.checkStringArgs(this,b,'startsWith');b=b+'';var h=c.length;var e=b.length;var f=Math.max(0,Math.min(g|0,c.length));var d=0;while(d<e&&f<h){if(c[f++]!=b[d++]){return !1}}return d>=e};return b},'es6','es3');$jscomp.arrayFromIterator=function(c){var b;var a=[];while(!(b=c.next()).done){a.push(b.value)}return a};$jscomp.arrayFromIterable=function(a){if(a instanceof Array){return a}else {return $jscomp.arrayFromIterator($jscomp.makeIterator(a))}};$jscomp.inherits=function(a,b){a.prototype=$jscomp.objectCreate(b.prototype);a.prototype.constructor=a;if($jscomp.setPrototypeOf){var e=$jscomp.setPrototypeOf;e(a,b)}else {for(var c in b){if(c=='prototype'){continue}if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);if(d){Object.defineProperty(a,c,d)}}else {a[c]=b[c]}}}a.superClass_=b.prototype};$jscomp.polyfill('WeakSet',function(a){function isConformant(){if(!a||!Object.seal){return !1}try{var c=Object.seal({});var d=Object.seal({});var b=new a([c]);if(!b.has(c)||b.has(d)){return !1}b['delete'](c);b.add(d);return !b.has(c)&&b.has(d)}catch(e){return !1}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(a&&$jscomp.ES6_CONFORMANCE){return a}}else {if(isConformant()){return a}}var b=function(b){this.map_=new WeakMap();if(b){$jscomp.initSymbol();$jscomp.initSymbolIterator();var e=$jscomp.makeIterator(b);var c;while(!(c=e.next()).done){var d=c.value;this.add(d)}}};b.prototype.add=function(b){this.map_.set(b,!0);return this};b.prototype.has=function(b){return this.map_.has(b)};b.prototype['delete']=function(b){return this.map_['delete'](b)};return b},'es6','es3');try{if(Array.prototype.values.toString().indexOf('[native code]')==-1){delete Array.prototype.values}}catch(a){}Ext.define('Ext.data.proxy.Sql',{alias:'proxy.sql',extend:'Ext.data.proxy.Client',alternateClassName:'Ext.data.proxy.SQL',isSQLProxy:!0,config:{reader:null,writer:null,table:null,database:'Sencha'},_createOptions:{silent:!0,dirty:!1},updateModel:function(b){var a=this,d,g,c,e,f;if(b){a.uniqueIdStrategy=b.identifier.isUnique;if(!a.getTable()){d=b.entityName;a.setTable(d.slice(d.lastIndexOf('.')+1))}a.columns=e=a.getPersistedModelColumns(b);a.quotedColumns=f=[];for(c=0,g=e.length;c<g;++c){f.push('"'+e[c]+'"')}}a.callParent([b])},setException:function(a,b){a.setException(b)},create:function(a){var d=this,e=a.getRecords(),b,c;a.setStarted();d.executeTransaction(function(f){d.insertRecords(e,f,function(e,d){b=e;c=d})},function(b){a.setException(b)},function(){if(c){a.setException(statementError)}else {a.process(b)}})},read:function(a){var e=this,i=e.getModel(),f=a.getRecords(),d=f?f[0]:null,g,h,b,c;if(d&&!d.phantom){b=d.getId()}else {b=a.getId()}if(b!==undefined){c={idOnly:!0,id:b}}else {c={page:a.getPage(),start:a.getStart(),limit:a.getLimit(),sorters:a.getSorters(),filters:a.getFilters()}}a.setStarted();e.executeTransaction(function(b){e.selectRecords(b,c,function(d,c){g=d;h=c})},function(b){a.setException(b)},function(){if(h){a.setException(statementError)}else {a.process(g)}})},update:function(a){var d=this,e=a.getRecords(),b,c;a.setStarted();d.executeTransaction(function(f){d.updateRecords(f,e,function(e,d){b=e;c=d})},function(b){a.setException(b)},function(){if(c){a.setException(statementError)}else {a.process(b)}})},erase:function(a){var d=this,e=a.getRecords(),c,b;a.setStarted();d.executeTransaction(function(f){d.destroyRecords(f,e,function(e,d){c=e;b=d})},function(b){a.setException(b)},function(){if(b){a.setException(b)}else {a.process(c)}})},createTable:function(b){var a=this;if(!b){a.executeTransaction(function(c){a.createTable(c)});return}a.executeStatement(b,'CREATE TABLE IF NOT EXISTS "'+a.getTable()+'" ('+a.getSchemaString()+')',function(){a.tableExists=!0})},insertRecords:function(e,o,q){var a=this,i=a.columns,n=e.length,h=0,m=a.uniqueIdStrategy,p=a._createOptions,r=e.length,c,f,g,l,k,j,b,d;d=function(c){++h;if(h===n){q.call(a,new Ext.data.ResultSet({success:!b}),b)}};g=Ext.String.repeat('?',i.length,',');l='INSERT INTO "'+a.getTable()+'" ('+a.quotedColumns.join(',')+') VALUES ('+g+')';for(c=0;c<r;++c){f=e[c];k=a.getRecordData(f);j=a.getColumnValues(i,k);(function(c){a.executeStatement(o,l,j,function(b,a){if(!m){c.setId(a.insertId,p)}d()},function(f,a){if(!b){b=[]}b.push(a);d()})})(f)}},selectRecords:function(s,d,r,v){var e=this,m=e.getModel(),t=m.idProperty,j='SELECT * FROM "'+e.getTable()+'"',n=' WHERE ',q=' ORDER BY ',i=[],l,k,o,b,g,u,h,p,c,a,f;if(d.idOnly){j+=n+'"'+t+'" = ?';i.push(d)}else {k=d.filters;g=k&&k.length;if(g){for(b=0;b<g;b++){h=k[b];c=h.getProperty();f=e.toSqlValue(h.getValue(),m.getField(c));a=h.getOperator();if(c!==null){a=a||'=';o='?';if(a==='like'||a==='='&&h.getAnyMatch()){a='LIKE';f='%'+f+'%'}if(a==='in'||a==='notin'){if(a==='notin'){a='not in'}o='('+Ext.String.repeat('?',f.length,',')+')';i=i.concat(f)}else {i.push(f)}j+=n+'"'+c+'" '+a+' '+o;n=' AND '}}}l=d.sorters;g=l&&l.length;if(g){for(b=0;b<g;b++){p=l[b];c=p.getProperty();if(c!==null){j+=q+'"'+c+'" '+p.getDirection();q=', '}}}if(d.page!==undefined){j+=' LIMIT '+parseInt(d.start,10)+', '+parseInt(d.limit,10)}}e.executeStatement(s,j,i,function(q,p){var k=p.rows,c=k.length,i=[],j=m.fields,o=j.length,n,g,a,l,b,f,h;for(a=0,l=c;a<l;++a){n=k.item(a);g={};for(b=0;b<o;++b){f=j[b];h=f.name;g[h]=e.fromSqlValue(n[h],f)}i.push(new m(g))}r.call(e,new Ext.data.ResultSet({records:i,success:!0,total:c,count:c}))},function(b,a){r.call(e,new Ext.data.ResultSet({success:!1,total:0,count:0}),a)})},updateRecords:function(o,g,p){var a=this,q=a.columns,i=a.quotedColumns,n=g.length,j=0,k=[],s=a._createOptions,e,b,d,r,m,l,h,c,f;f=function(b){++j;if(j===n){p.call(a,new Ext.data.ResultSet({success:!c}),c)}};for(b=0,e=i.length;b<e;b++){k.push(i[b]+' = ?')}m='UPDATE "'+a.getTable()+'" SET '+k.join(', ')+' WHERE "'+a.getModel().idProperty+'" = ?';for(b=0,e=g.length;b<e;++b){d=g[b];l=a.getRecordData(d);h=a.getColumnValues(q,l);h.push(d.getId());(function(b){a.executeStatement(o,m,h,function(a,c){f()},function(d,a){if(!c){c=[]}c.push(a);f()})})(d)}},destroyRecords:function(h,d,c){var a=this,o=a.getTable(),i=a.getModel().idProperty,f=[],e=[],l=[],k=d.length,j='"'+i+'" = ?',b,n,m,g;for(b=0;b<k;b++){f.push(j);e.push(d[b].getId())}g='DELETE FROM "'+a.getTable()+'" WHERE '+f.join(' OR ');a.executeStatement(h,g,e,function(b,e){c.call(a,new Ext.data.ResultSet({success:!0}))},function(e,b){c.call(a,new Ext.data.ResultSet({success:!1}),b)})},getRecordData:function(d){var g=this,e=d.fields,i=d.idProperty,h=g.uniqueIdStrategy,f={},k=e.length,j=d.data,c,b,l,a;for(c=0;c<k;++c){a=e[c];if(a.persist!==!1){b=a.name;if(b===i&&!h){continue}f[b]=g.toSqlValue(j[b],a)}}return f},getColumnValues:function(c,f){var g=c.length,e=[],a,d,b;for(a=0;a<g;a++){d=c[a];b=f[d];if(b!==undefined){e.push(b)}}return e},getSchemaString:function(){var c=this,b=[],i=c.getModel(),e=i.idProperty,h=i.fields,j=c.uniqueIdStrategy,k=h.length,d,f,a,g;for(d=0;d<k;d++){f=h[d];a=f.getType();g=f.name;if(g===e){if(j){a=c.convertToSqlType(a);b.unshift('"'+e+'" '+a)}else {b.unshift('"'+e+'" INTEGER PRIMARY KEY AUTOINCREMENT')}}else {a=c.convertToSqlType(a);b.push('"'+g+'" '+a)}}return b.join(', ')},convertToSqlType:function(a){switch(a.toLowerCase()){case 'string':case 'auto':return 'TEXT';case 'int':case 'date':return 'INTEGER';case 'float':return 'REAL';case 'bool':return 'NUMERIC';}},dropTable:function(){var a=this;a.executeTransaction(function(b){a.executeStatement(b,'DROP TABLE "'+a.getTable()+'"',function(){a.tableExists=!1})},null,null,!1)},getDatabaseObject:function(){return window.openDatabase(this.getDatabase(),'1.0','Sencha Database',5*1024*1024)},privates:{executeStatement:function(d,f,e,b,a){var c=this;d.executeSql(f,e,b?function(){b.apply(c,arguments)}:null,a?function(){a.apply(c,arguments)}:null)},executeTransaction:function(e,c,d,b){var a=this;b=b!==!1;a.getDatabaseObject().transaction(e?function(f){if(b&&!a.tableExists){a.createTable(f)}e.apply(a,arguments)}:null,c?function(){c.apply(a,arguments)}:null,d?function(){d.apply(a,arguments)}:null)},fromSqlValue:function(a,b){if(b.isDateField){a=a?new Date(a):null}else {if(b.isBooleanField){a=a===1}}return a},getPersistedModelColumns:function(e){var d=e.fields,g=this.uniqueIdStrategy,h=e.idProperty,c=[],i=d.length,b,a,f;for(b=0;b<i;++b){a=d[b];f=a.name;if(f===h&&!g){continue}if(a.persist!==!1){c.push(a.name)}}return c},toSqlValue:function(a,b){if(b.isDateField){a=a?a.getTime():null}else {if(b.isBooleanField){a=a?1:0}}return a}}});Ext.define('Ext.device.accelerometer.Abstract',{config:{frequency:10000},getCurrentAcceleration:function(a){return a},watchAcceleration:function(a){var b=Ext.device.accelerometer.Abstract.prototype.config;a=Ext.applyIf(a,{frequency:b.frequency});return a},clearWatch:Ext.emptyFn});Ext.define('Ext.device.accelerometer.Cordova',{alternateClassName:'Ext.device.accelerometer.PhoneGap',extend:'Ext.device.accelerometer.Abstract',activeWatchID:null,getCurrentAcceleration:function(a){a=this.callParent(arguments);navigator.accelerometer.getCurrentAcceleration(a.success,a.failure);return a},watchAcceleration:function(a){a=this.callParent(arguments);if(this.activeWatchID){this.clearWatch()}this.activeWatchID=navigator.accelerometer.watchAcceleration(a.callback,a.failure,a);return a},clearWatch:function(){if(this.activeWatchID){navigator.accelerometer.clearWatch(this.activeWatchID);this.activeWatchID=null}}});Ext.define('Ext.device.accelerometer.Simulator',{extend:'Ext.device.accelerometer.Abstract'});Ext.define('Ext.device.Accelerometer',{singleton:!0,requires:['Ext.device.accelerometer.Cordova','Ext.device.accelerometer.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.accelerometer.Cordova')}return Ext.create('Ext.device.accelerometer.Simulator')}});Ext.define('Ext.device.communicator.Default',{SERVER_URL:'http://localhost:3000',callbackDataMap:{},callbackIdMap:{},idSeed:0,globalScopeId:'0',generateId:function(){return String(++this.idSeed)},getId:function(b){var a=b.$callbackId;if(!a){b.$callbackId=a=this.generateId()}return a},getCallbackId:function(f,c){var b=this.callbackIdMap,h=this.callbackDataMap,e,a,d,g;if(!c){a=this.globalScopeId}else {if(c.isIdentifiable){a=c.getId()}else {a=this.getId(c)}}d=this.getId(f);if(!b[a]){b[a]={}}if(!b[a][d]){e=this.generateId();g={callback:f,scope:c};b[a][d]=e;h[e]=g}return b[a][d]},getCallbackData:function(a){return this.callbackDataMap[a]},invoke:function(c,b){var a=this.getCallbackData(c);a.callback.apply(a.scope,b)},send:function(a){var b,f,c,d;if(!a){a={}}else {if(a.callbacks){b=a.callbacks;f=a.scope;delete a.callbacks;delete a.scope;for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(typeof d==='function'){a[c]=this.getCallbackId(d,f)}}}}}a.__source=document.location.href;var e=this.doSend(a);return e&&e.length>0?JSON.parse(e):null},doSend:function(a){var b=new XMLHttpRequest();b.open('GET',this.SERVER_URL+'?'+Ext.Object.toQueryString(a)+'&_dc='+(new Date()).getTime(),!1);try{b.send(null);return b.responseText}catch(c){if(a.failure){this.invoke(a.failure)}else {if(a.callback){this.invoke(a.callback)}}}}});Ext.define('Ext.device.communicator.Android',{extend:'Ext.device.communicator.Default',doSend:function(a){return window.Sencha.action(JSON.stringify(a))}});Ext.define('Ext.device.Communicator',{requires:['Ext.device.communicator.Default','Ext.device.communicator.Android'],singleton:!0,constructor:function(){if(Ext.os.is.Android){return new Ext.device.communicator.Android()}return new Ext.device.communicator.Default()}});Ext.define('Ext.device.analytics.Abstract',{config:{accountID:null},updateAccountID:function(a){if(a){window.plugins.googleAnalyticsPlugin.startTrackerWithAccountID(a)}},registerAccount:function(a){this.setAccountID(a)},trackEvent:Ext.emptyFn,trackPageview:Ext.emptyFn});Ext.define('Ext.device.analytics.Cordova',{extend:'Ext.device.analytics.Abstract',trackEvent:function(a){if(!this.getAccountID()){return}window.plugins.googleAnalyticsPlugin.trackEvent(a.category,a.action,a.label,a.value,a.nonInteraction)},trackPageview:function(a){if(!this.getAccountID()){return}window.plugins.googleAnalyticsPlugin.trackPageview(a)}});Ext.define('Ext.device.Analytics',{alternateClassName:'Ext.ux.device.Analytics',singleton:!0,requires:['Ext.device.Communicator','Ext.device.analytics.*'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.analytics.Cordova')}else {return Ext.create('Ext.device.analytics.Abstract')}}});Ext.define('Ext.device.browser.Abstract',{open:Ext.emptyFn,close:Ext.emptyFn});Ext.define('Ext.device.browser.Cordova',{extend:'Ext.device.browser.Abstract',open:function(a){if(!this._window){this._window=Ext.create('Ext.device.browser.Window')}this._window.open(a);return this._window},close:function(){if(!this._window){return}this._window.close()}});Ext.define('Ext.device.browser.Simulator',{open:function(a){window.open(a.url,'_blank')},close:Ext.emptyFn});Ext.define('Ext.device.Browser',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.browser.Cordova','Ext.device.browser.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.browser.Cordova')}return Ext.create('Ext.device.browser.Simulator')}});Ext.define('Ext.device.camera.Abstract',{source:{library:0,camera:1,album:2},destination:{data:0,file:1,'native':2},encoding:{jpeg:0,jpg:0,png:1},media:{picture:0,video:1,all:2},direction:{back:0,front:1},capture:Ext.emptyFn,getPicture:Ext.emptyFn,cleanup:Ext.emptyFn});Ext.define('Ext.device.camera.Cordova',{alternateClassName:'Ext.device.camera.PhoneGap',extend:'Ext.device.camera.Abstract',getPicture:function(a,b,c){try{navigator.camera.getPicture(a,b,c)}catch(d){alert(d)}},cleanup:function(a,b){try{navigator.camera.cleanup(a,b)}catch(c){alert(c)}},capture:function(a){var f=a.success,g=a.failure,h=a.scope,k=this.source,i=this.destination,j=this.encoding,e=a.source,c=a.destination,d=a.encoding,b={};if(h){f=Ext.Function.bind(f,h);g=Ext.Function.bind(g,h)}if(e!==undefined){b.sourceType=k.hasOwnProperty(e)?k[e]:e}if(c!==undefined){b.destinationType=i.hasOwnProperty(c)?i[c]:c}if(d!==undefined){b.encodingType=j.hasOwnProperty(d)?j[d]:d}if('quality' in a){b.quality=a.quality}if('width' in a){b.targetWidth=a.width}if('height' in a){b.targetHeight=a.height}this.getPicture(f,g,b)}});Ext.define('Ext.device.camera.Simulator',{extend:'Ext.device.camera.Abstract',config:{samples:[{success:'http://www.sencha.com/img/sencha-large.png'}]},constructor:function(a){this.initConfig(a)},updateSamples:function(a){this.sampleIndex=0},capture:function(b){var a=this.sampleIndex,e=this.getSamples(),h=e.length,c=e[a],g=b.scope,f=b.success,d=b.failure;if('success' in c){if(f){f.call(g,c.success)}}else {if(d){d.call(g,c.failure)}}if(++a>h-1){a=0}this.sampleIndex=a}});Ext.define('Ext.device.Camera',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.camera.Cordova','Ext.device.camera.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.camera.Cordova')}}return Ext.create('Ext.device.camera.Simulator')}});Ext.define('Ext.device.capture.Cordova',{captureAudio:function(a){var b={limit:a.limit,duration:a.maximumDuration};navigator.device.capture.captureAudio(a.success,a.failure,b)},captureVideo:function(a){var b={limit:a.limit,duration:a.maximumDuration};navigator.device.capture.captureVideo(a.success,a.failure,b)}});Ext.define('Ext.device.capture.Abstract',{alternateClassName:'Ext.device.capture.Simulator',captureAudio:Ext.emptyFn,captureVideo:Ext.emptyFn});Ext.define('Ext.device.Capture',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.capture.Cordova','Ext.device.capture.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.capture.Cordova')}return Ext.create('Ext.device.capture.Simulator')}});Ext.define('Ext.device.compass.Abstract',{config:{frequency:100},getHeadingAvailable:function(a){return a},getCurrentHeading:function(a){return a},watchHeading:function(a){var b=Ext.device.compass.Abstract.prototype.config;a=Ext.applyIf(a,{frequency:b.frequency});return a},clearWatch:Ext.emptyFn});Ext.define('Ext.device.compass.Cordova',{alternateClassName:'Ext.device.compass.PhoneGap',extend:'Ext.device.compass.Abstract',activeWatchID:null,getHeadingAvailable:function(a){var b=function(b){if(b.hasOwnProperty('code')){a.callback.call(a.scope||this,!1)}else {a.callback.call(a.scope||this,!0)}};this.getCurrentHeading({success:b,failure:b})},getCurrentHeading:function(a){a=this.callParent(arguments);navigator.compass.getCurrentHeading(a.success,a.failure);return a},watchHeading:function(a){a=this.callParent(arguments);if(this.activeWatchID){this.clearWatch()}this.activeWatchID=navigator.compass.watchHeading(a.callback,a.failure,a);return a},clearWatch:function(){if(this.activeWatchID){navigator.compass.clearWatch(this.activeWatchID);this.activeWatchID=null}}});Ext.define('Ext.device.compass.Simulator',{extend:'Ext.device.compass.Abstract'});Ext.define('Ext.device.Compass',{singleton:!0,requires:['Ext.device.compass.Cordova','Ext.device.compass.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.compass.Cordova')}return Ext.create('Ext.device.compass.Simulator')}});Ext.define('Ext.device.connection.Abstract',{extend:'Ext.Evented',mixins:['Ext.mixin.Observable'],config:{online:!1,type:null},UNKNOWN:'Unknown connection',ETHERNET:'Ethernet connection',WIFI:'WiFi connection',CELL_2G:'Cell 2G connection',CELL_3G:'Cell 3G connection',CELL_4G:'Cell 4G connection',NONE:'No network connection',isOnline:function(){return this.getOnline()}});Ext.define('Ext.device.connection.Cordova',{alternateClassName:'Ext.device.connection.PhoneGap',extend:'Ext.device.connection.Abstract',constructor:function(){var a=this;document.addEventListener('online',function(){a.fireEvent('online',a)});document.addEventListener('offline',function(){a.fireEvent('offline',a)})},syncOnline:function(){var a=navigator.connection.type;this._type=a;this._online=a!=Connection.NONE},getOnline:function(){this.syncOnline();return this._online},getType:function(){this.syncOnline();return this._type}});Ext.define('Ext.device.connection.Simulator',{extend:'Ext.device.connection.Abstract',getOnline:function(){this._online=navigator.onLine;this._type=Ext.device.Connection.UNKNOWN;return this._online}});Ext.define('Ext.device.Connection',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.connection.Cordova','Ext.device.connection.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.connection.Cordova')}}return Ext.create('Ext.device.connection.Simulator')}});Ext.define('Ext.device.contacts.Abstract',{mixins:['Ext.mixin.Observable'],config:{includeImages:!1},getContacts:function(a){if(!this._store){this._store=[{first:'Peter',last:'Venkman',emails:{work:'peter.venkman@gb.com'}},{first:'Egon',last:'Spengler',emails:{work:'egon.spengler@gb.com'}}]}a.success.call(a.scope||this,this._store)},getThumbnail:function(a){a.callback.call(a.scope||this,'')},getLocalizedLabel:function(a){a.callback.call(a.scope||this,a.label.toUpperCase(),a.label)}});Ext.define('Ext.device.contacts.Cordova',{alternateClassName:'Ext.device.contacts.PhoneGap',extend:'Ext.device.contacts.Abstract',getContacts:function(a){if(!a){Ext.Logger.warn('Ext.device.Contacts#getContacts: You must specify a `config` object.');return !1}if(!a.success){Ext.Logger.warn('Ext.device.Contacts#getContacts: You must specify a `success` method.');return !1}if(!a.fields){a.fields=['*']}if(!Ext.isArray(a.fields)){a.fields=[a.fields]}if(Ext.isEmpty(a.multiple)){a.multiple=!0}navigator.contacts.find(a.fields,a.success,a.failure,a)}});Ext.define('Ext.device.Contacts',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.contacts.Cordova'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.contacts.Cordova')}}return Ext.create('Ext.device.contacts.Abstract')}});Ext.define('Ext.device.device.Abstract',{mixins:['Ext.mixin.Observable'],name:'not available',uuid:'anonymous',platform:Ext.os.name,scheme:!1,openURL:function(a){window.location=a}});Ext.define('Ext.device.device.Cordova',{alternateClassName:'Ext.device.device.PhoneGap',extend:'Ext.device.device.Abstract',availableListeners:['pause','resume','backbutton','batterycritical','batterylow','batterystatus','menubutton','searchbutton','startcallbutton','endcallbutton','volumeupbutton','volumedownbutton'],constructor:function(){if(Ext.isReady){this.onReady()}else {Ext.onReady(this.onReady,this,{single:!0})}},onReady:function(){var b=this,a=window.device;b.name=a.name||a.model;b.cordova=a.cordova;b.platform=a.platform||Ext.os.name;b.uuid=a.uuid;b.version=a.version;b.model=a.model},privates:{doAddListener:function(b){var a=this;if(!a.addedListeners){a.addedListeners=[]}if(a.availableListeners.indexOf(b)!=-1&&a.addedListeners.indexOf(b)==-1){a.addedListeners.push(b);document.addEventListener(b,function(){a.fireEvent(b,a)})}Ext.device.Device.mixins.observable.doAddListener.apply(Ext.device.Device.mixins.observable,arguments)}}});Ext.define('Ext.device.device.Simulator',{extend:'Ext.device.device.Abstract'});Ext.define('Ext.device.Device',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.device.Cordova','Ext.device.device.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.device.Cordova')}}return Ext.create('Ext.device.device.Simulator')}});Ext.define('Ext.device.filesystem.Abstract',{config:{fileSystemType:1,fileSystemSize:0,readerType:'text',stringEncoding:'UTF8'},requestFileSystem:function(a){var b=Ext.device.filesystem.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.fileSystemType,size:b.fileSystemSize,success:Ext.emptyFn,failure:Ext.emptyFn});return a}});Ext.define('Ext.device.filesystem.HTML5',{extend:'Ext.device.filesystem.Abstract',requestFileSystem:function(a){if(!a.success){Ext.Logger.error('Ext.device.filesystem#requestFileSystem: You must specify a `success` callback.');return null}var c=this,b=function(d){var b=Ext.create('Ext.device.filesystem.FileSystem',d);a.success.call(a.scope||c,b)};window.requestFileSystem(a.type,a.size,b,a.failure||Ext.emptyFn)}},function(){Ext.define('Ext.device.filesystem.FileSystem',{fs:null,root:null,constructor:function(a){this.fs=a;this.root=Ext.create('Ext.device.filesystem.DirectoryEntry','/',this)},getRoot:function(){return this.root}},function(){Ext.define('Ext.device.filesystem.Entry',{directory:!1,path:0,fileSystem:null,entry:null,constructor:function(b,c,a){this.directory=b;this.path=c;this.fileSystem=a},isFile:function(){return !this.directory},isDirectory:function(){return this.directory},getName:function(){var b=this.path.split('/');for(var a=b.length-1;a>=0;--a){if(b[a].length>0){return b[a]}}return '/'},getFullPath:function(){return this.path},getFileSystem:function(){return this.fileSystem},getEntry:function(){return null},moveTo:function(a){if(a.parent==null){Ext.Logger.error('Ext.device.filesystem.Entry#moveTo: You must specify a new `parent` of the entry.');return null}var b=this;this.getEntry({options:a.options||{},success:function(c){a.parent.getEntry({options:a.options||{},success:function(d){if(a.copy){c.copyTo(d,a.newName,function(e){a.success.call(a.scope||b,e.isDirectory?Ext.create('Ext.device.filesystem.DirectoryEntry',e.fullPath,b.fileSystem):Ext.create('Ext.device.filesystem.FileEntry',e.fullPath,b.fileSystem))},a.failure)}else {c.moveTo(d,a.newName,function(e){a.success.call(a.scope||b,e.isDirectory?Ext.create('Ext.device.filesystem.DirectoryEntry',e.fullPath,b.fileSystem):Ext.create('Ext.device.filesystem.FileEntry',e.fullPath,b.fileSystem))},a.failure)}},failure:a.failure})},failure:a.failure})},copyTo:function(a){this.moveTo(Ext.apply(a,{copy:!0}))},remove:function(a){this.getEntry({success:function(b){if(a.recursively&&this.directory){b.removeRecursively(a.success,a.failure)}else {b.remove(a.success,a.failure)}},failure:a.failure})},getParent:function(a){if(!a.success){Ext.Logger.error('Ext.device.filesystem.Entry#getParent: You must specify a `success` callback.');return null}var b=this;this.getEntry({options:a.options||{},success:function(c){c.getParent(function(d){a.success.call(a.scope||b,d.isDirectory?Ext.create('Ext.device.filesystem.DirectoryEntry',d.fullPath,b.fileSystem):Ext.create('Ext.device.filesystem.FileEntry',d.fullPath,b.fileSystem))},a.failure)},failure:a.failure})}});Ext.define('Ext.device.filesystem.DirectoryEntry',{extend:'Ext.device.filesystem.Entry',cachedDirectory:null,constructor:function(b,a){this.callParent([!0,b,a])},getEntry:function(a){var e=this,d=a.success;if(a.options&&a.options.create&&this.path){var b=this.path.split('/');if(b[0]=='.'||b[0]==''){b=b.slice(1)}var c=function(e){if(b.length){e.getDirectory(b.shift(),a.options,c,a.failure)}else {d(e)}};c(this.fileSystem.fs.root)}else {this.fileSystem.fs.root.getDirectory(this.path,a.options,function(b){a.success.call(a.scope||e,b)},a.failure)}},readEntries:function(a){if(!a.success){Ext.Logger.error('Ext.device.filesystem.DirectoryEntry#readEntries: You must specify a `success` callback.');return null}var b=this;this.getEntry({success:function(d){var c=d.createReader();c.readEntries(function(e){var f=[],c=0,g=e.length;for(;c<g;c++){entryInfo=e[c];f[c]=entryInfo.isDirectory?Ext.create('Ext.device.filesystem.DirectoryEntry',entryInfo.fullPath,b.fileSystem):Ext.create('Ext.device.filesystem.FileEntry',entryInfo.fullPath,b.fileSystem)}a.success.call(a.scope||this,f)},function(b){if(a.failure){a.failure.call(a.scope||this,b)}})},failure:a.failure})},getFile:function(a){if(a.path==null){Ext.Logger.error('Ext.device.filesystem.DirectoryEntry#getFile: You must specify a `path` of the file.');return null}var d=this,c=this.path+a.path,b=Ext.create('Ext.device.filesystem.FileEntry',c,this.fileSystem);b.getEntry({success:function(){a.success.call(a.scope||d,b)},options:a.options||{},failure:a.failure})},getDirectory:function(a){if(a.path==null){Ext.Logger.error('Ext.device.filesystem.DirectoryEntry#getFile: You must specify a `path` of the file.');return null}var d=this,c=this.path+a.path,b=Ext.create('Ext.device.filesystem.DirectoryEntry',c,this.fileSystem);b.getEntry({success:function(){a.success.call(a.scope||d,b)},options:a.options||{},failure:a.failure})},removeRecursively:function(a){this.remove(Ext.apply(a,{recursively:!0}))}});Ext.define('Ext.device.filesystem.FileEntry',{extend:'Ext.device.filesystem.Entry',length:0,offset:0,constructor:function(b,a){this.callParent([!1,b,a]);this.offset=0;this.length=0},getEntry:function(a){var b=this,c=Ext.applyIf({},a);if(this.fileSystem){var d=function(e){if(a.options&&a.options.create&&Ext.isString(this.path)){var d=this.path.split('/');if(d[0]=='.'||d[0]==''){d=d.slice(1)}if(d.length>1&&!a.recursive===!0){d.pop();var f=Ext.create('Ext.device.filesystem.DirectoryEntry',d.join('/'),b.fileSystem);f.getEntry({options:a.options,success:function(){c.recursive=!0;b.getEntry(c)},failure:a.failure})}else {if(a.failure){a.failure.call(a.scope||b,e)}}}else {if(a.failure){a.failure.call(a.scope||b,e)}}};this.fileSystem.fs.root.getFile(this.path,a.options||null,function(e){e.file(function(d){b.length=d.size;c.success.call(a.scope||b,e)},function(c){d.call(a.scope||b,c)})},function(c){d.call(a.scope||b,c)})}else {a.failure({code:-1,message:'FileSystem not Initialized'})}},getOffset:function(){return this.offset},seek:function(a){if(a.offset==null){Ext.Logger.error('Ext.device.filesystem.FileEntry#seek: You must specify an `offset` in the file.');return null}this.offset=a.offset||0;if(a.success){a.success.call(a.scope||this)}},read:function(a){var b=this;this.getEntry({success:function(c){c.file(function(e){if(Ext.isNumber(a.length)){if(Ext.isFunction(e.slice)){e=e.slice(b.offset,a.length)}else {if(a.failure){a.failure.call(a.scope||b,{code:-2,message:'File missing slice functionality'})}return}}var d=new FileReader();d.onloadend=function(d){a.success.call(a.scope||b,d.target.result)};d.onerror=function(d){a.failure.call(a.scope||b,d)};if(a.reader){d=Ext.applyIf(d,a.reader)}a.encoding=a.encoding||'UTF8';switch(a.type){default:case 'text':d.readAsText(e,a.encoding);break;case 'dataURL':d.readAsDataURL(e);break;case 'binaryString':d.readAsBinaryString(e);break;case 'arrayBuffer':d.readAsArrayBuffer(e);break;}},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})},write:function(a){if(a.data==null){Ext.Logger.error('Ext.device.filesystem.FileEntry#write: You must specify `data` to write into the file.');return null}var b=this;this.getEntry({options:a.options||{},success:function(c){c.createWriter(function(d){d.onwriteend=function(e){b.length=e.target.length;a.success.call(a.scope||b,e.result)};d.onerror=function(e){a.failure.call(a.scope||b,e)};if(a.writer){d=Ext.applyIf(d,a.writer)}if(b.offset){d.seek(b.offset)}else {if(a.append){d.seek(b.length)}}b.writeData(d,a.data)},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})},writeData:function(a,b){a.write(new Blob([b]))},truncate:function(a){if(a.size==null){Ext.Logger.error('Ext.device.filesystem.FileEntry#write: You must specify a `size` of the file.');return null}var b=this;this.getEntry({success:function(c){c.createWriter(function(d){d.truncate(a.size);a.success.call(a.scope||b,b)},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})}})})});Ext.define('Ext.device.filesystem.Cordova',{alternateClassName:'Ext.device.filesystem.PhoneGap',extend:'Ext.device.filesystem.HTML5',constructor:function(){Ext.override(Ext.device.filesystem.Entry,{writeMetadata:function(a){var b=this;this.getEntry({options:a.options,success:function(c){c.setMetadata(function(){a.success.call(a.scope||b)},function(d){a.failure.call(a.scope||b,d)},a.metadata)},failure:function(c){a.failure.call(a.scope||b,c)}})},readMetadata:function(a){var b=this;this.getEntry({options:a.options,success:function(c){c.getMetadata(function(d){a.success.call(a.scope||b,d)},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})}});Ext.override(Ext.device.filesystem.FileEntry,{writeData:function(a,b){a.write(b.toString())},upload:function(a){var b=new FileUploadOptions();b.fileKey=a.fileKey||'file';b.fileName=this.path.substr(this.path.lastIndexOf('/')+1);b.mimeType=a.mimeType||'image/jpeg';b.params=a.params||{};b.headers=a.headers||{};b.chunkMode=a.chunkMode||!0;var c=new FileTransfer();c.upload(this.path,encodeURI(a.url),a.success,a.failure,b,a.trustAllHosts||!1);return c},download:function(a){var b=new FileTransfer();b.download(encodeURI(a.source),this.path,a.success,a.failure,a.trustAllHosts||!1,a.options||{});return b}})}});Ext.define('Ext.device.filesystem.Chrome',{extend:'Ext.device.filesystem.HTML5',requestFileSystem:function(a){var c=this;a=Ext.device.filesystem.Abstract.prototype.requestFileSystem(a);var b=function(d){var b=Ext.create('Ext.device.filesystem.FileSystem',d);a.success.call(a.scope||c,b)};if(a.type==window.PERSISTENT){if(navigator.webkitPersistentStorage){navigator.webkitPersistentStorage.requestQuota(a.size,function(c){window.webkitRequestFileSystem(a.type,c,b,a.failure)})}else {window.webkitStorageInfo.requestQuota(window.PERSISTENT,a.size,function(c){window.webkitRequestFileSystem(a.type,c,b,a.failure)})}}else {window.webkitRequestFileSystem(a.type,a.size,b,a.failure)}}});Ext.define('Ext.device.filesystem.Simulator',{extend:'Ext.device.filesystem.HTML5'});Ext.define('Ext.device.FileSystem',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.filesystem.Cordova','Ext.device.filesystem.Chrome','Ext.device.filesystem.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.filesystem.Cordova')}}else {if(a.Chrome){return Ext.create('Ext.device.filesystem.Chrome')}}return Ext.create('Ext.device.filesystem.Simulator')}});Ext.define('Ext.device.geolocation.Abstract',{config:{maximumAge:0,frequency:10000,allowHighAccuracy:!1,timeout:Infinity},getCurrentPosition:function(b){var a=Ext.device.geolocation.Abstract.prototype.config;b=Ext.applyIf(b,{maximumAge:a.maximumAge,frequency:a.frequency,allowHighAccuracy:a.allowHighAccuracy,timeout:a.timeout});return b},watchPosition:function(b){var a=Ext.device.geolocation.Abstract.prototype.config;b=Ext.applyIf(b,{maximumAge:a.maximumAge,frequency:a.frequency,allowHighAccuracy:a.allowHighAccuracy,timeout:a.timeout});return b},clearWatch:function(){}});Ext.define('Ext.device.geolocation.Cordova',{alternateClassName:'Ext.device.geolocation.PhoneGap',extend:'Ext.device.geolocation.Abstract',activeWatchID:null,getCurrentPosition:function(a){a=this.callParent(arguments);navigator.geolocation.getCurrentPosition(a.success,a.failure,a);return a},watchPosition:function(a){a=this.callParent(arguments);if(this.activeWatchID){this.clearWatch()}this.activeWatchID=navigator.geolocation.watchPosition(a.callback,a.failure,a);return a},clearWatch:function(){if(this.activeWatchID){navigator.geolocation.clearWatch(this.activeWatchID);this.activeWatchID=null}}});Ext.define('Ext.device.geolocation.Simulator',{extend:'Ext.device.geolocation.Abstract',requires:['Ext.util.Geolocation'],getCurrentPosition:function(a){a=this.callParent([a]);Ext.apply(a,{autoUpdate:!1,listeners:{scope:this,locationupdate:function(b){if(a.success){a.success.call(a.scope||this,b.position)}},locationerror:function(){if(a.failure){a.failure.call(a.scope||this)}}}});this.geolocation=Ext.create('Ext.util.Geolocation',a);this.geolocation.updateLocation();return a},watchPosition:function(a){a=this.callParent([a]);Ext.apply(a,{listeners:{scope:this,locationupdate:function(b){if(a.callback){a.callback.call(a.scope||this,b.position)}},locationerror:function(){if(a.failure){a.failure.call(a.scope||this)}}}});this.geolocation=Ext.create('Ext.util.Geolocation',a);return a},clearWatch:function(){if(this.geolocation){this.geolocation.destroy()}this.geolocation=null}});Ext.define('Ext.device.Geolocation',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.geolocation.Cordova','Ext.device.geolocation.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.geolocation.Cordova')}}return Ext.create('Ext.device.geolocation.Simulator')}});Ext.define('Ext.device.globalization.Abstract',{mixins:['Ext.mixin.Observable'],config:{formatLength:'full',selector:'date and time',dateType:'wide',items:'months',numberType:'decimal',currencyCode:'USD'},getPreferredLanguage:function(a){return a},getLocaleName:function(a){return a},dateToString:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{date:new Date(),formatLength:b.formatLength,selector:b.selector});return a},stringToDate:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{dateString:Ext.util.Format.date(new Date(),'m/d/Y'),formatLength:b.formatLength,selector:b.selector});return a},getDatePattern:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{formatLength:b.formatLength,selector:b.selector});return a},getDateNames:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.dateType,items:b.items});return a},isDayLightSavingsTime:function(a){a=Ext.applyIf(a,{date:new Date()});return a},getFirstDayOfWeek:function(a){return a},numberToString:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{number:b.number,type:b.numberType});return a},stringToNumber:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.numberType});return a},getNumberPattern:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.numberType});if(!a.success){Ext.Logger.warn('You need to specify a `success` function for #getNumberPattern')}return a},getCurrencyPattern:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{currencyCode:b.currencyCode});if(!a.success){Ext.Logger.warn('You need to specify a `success` function for #getCurrency')}return a}});Ext.define('Ext.device.globalization.Cordova',{alternateClassName:'Ext.device.globalization.PhoneGap',extend:'Ext.device.globalization.Abstract',getPreferredLanguage:function(a){a=this.callParent(arguments);navigator.globalization.getPreferredLanguage(a.success,a.error)},getLocaleName:function(a){a=this.callParent(arguments);navigator.globalization.getLocaleName(a.success,a.error)},dateToString:function(a){a=this.callParent(arguments);navigator.globalization.dateToString(a.date,a.success,a.error,a)},stringToDate:function(a){a=this.callParent(arguments);navigator.globalization.stringToDate(a.dateString,a.success,a.error,a)},getDatePattern:function(a){a=this.callParent(arguments);navigator.globalization.getDatePattern(a.success,a.error,a)},getDateNames:function(a){a=this.callParent(arguments);navigator.globalization.getDateNames(a.success,a.error,a)},isDayLightSavingsTime:function(a){a=this.callParent(arguments);navigator.globalization.isDayLightSavingsTime(a.date,a.success,a.error,a)},getFirstDayOfWeek:function(a){a=this.callParent(arguments);navigator.globalization.getFirstDayOfWeek(a.success,a.error)},numberToString:function(a){a=this.callParent(arguments);navigator.globalization.numberToString(a.number,a.success,a.error,a)},stringToNumber:function(a){a=this.callParent(arguments);navigator.globalization.stringToNumber(a.string,a.success,a.error,a)},getNumberPattern:function(a){a=this.callParent(arguments);navigator.globalization.getNumberPattern(a.success,a.error,a)},getCurrencyPattern:function(a){a=this.callParent(arguments);navigator.globalization.getCurrencyPattern(a.currencyCode,a.success,a.error)}});Ext.define('Ext.device.globalization.Simulator',{extend:'Ext.device.globalization.Abstract'});Ext.define('Ext.device.Globalization',{singleton:!0,requires:['Ext.device.globalization.Cordova','Ext.device.globalization.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.globalization.Cordova')}}return Ext.create('Ext.device.globalization.Simulator')}});Ext.define('Ext.device.media.Abstract',{mixins:['Ext.mixin.Observable'],config:{src:null},play:Ext.emptyFn,pause:Ext.emptyFn,stop:Ext.emptyFn,release:Ext.emptyFn,seekTo:Ext.emptyFn,getCurrentPosition:Ext.emptyFn,getDuration:Ext.emptyFn,startRecord:Ext.emptyFn,stopRecord:Ext.emptyFn});Ext.define('Ext.device.media.Cordova',{alternateClassName:'Ext.device.media.PhoneGap',extend:'Ext.device.media.Abstract',config:{src:null,media:null},updateSrc:function(a,b){this.setMedia(new Media(a))},play:function(){var a=this.getMedia();if(a){a.play()}},pause:function(){var a=this.getMedia();if(a){a.pause()}},stop:function(){var a=this.getMedia();if(a){a.stop()}},release:function(){var a=this.getMedia();if(a){a.release()}},seekTo:function(b){var a=this.getMedia();if(a){a.seekTo(b)}},getDuration:function(){var a=this.getMedia();if(a){a.getDuration()}},startRecord:function(){var a=this.getMedia();if(!a){this.setSrc(null)}a.startRecord()},stopRecord:function(){var a=this.getMedia();if(a){a.stopRecord()}}});Ext.define('Ext.device.Media',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.media.Cordova'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.media.Cordova')}return Ext.create('Ext.device.media.Abstract')}});Ext.define('Ext.device.notification.Abstract',{show:function(a){if(!a.message){throw '[Ext.device.Notification#show] You passed no message'}if(!a.buttons){a.buttons=['OK','Cancel']}if(!Ext.isArray(a.buttons)){a.buttons=[a.buttons]}if(!a.scope){a.scope=this}return a},alert:function(a){if(!a.message){throw '[Ext.device.Notification#alert] You passed no message'}if(!a.scope){a.scope=this}return a},confirm:function(a){if(!a.message){throw '[Ext.device.Notification#confirm] You passed no message'}if(!a.buttons){a.buttons=['OK','Cancel']}if(!Ext.isArray(a.buttons)){a.buttons=[a.buttons]}if(!a.scope){a.scope=this}return a},prompt:function(a){if(!a.message){throw '[Ext.device.Notification#prompt] You passed no message'}if(!a.buttons){a.buttons=['OK','Cancel']}if(!Ext.isArray(a.buttons)){a.buttons=[a.buttons]}if(!a.scope){a.scope=this}return a},vibrate:Ext.emptyFn,beep:Ext.emptyFn});Ext.define('Ext.device.notification.Cordova',{alternateClassName:'Ext.device.notification.PhoneGap',extend:'Ext.device.notification.Abstract',requires:['Ext.device.Communicator'],show:function(a){a=this.callParent(arguments);this.confirm(a)},confirm:function(a){a=this.callParent(arguments);var b=a.buttons,e=a.buttons.length;if(e&&typeof b[0]!=='string'){var d=[],c;for(c=0;c<e;c++){d.push(b[c].text)}b=d}var f=function(c){if(a.callback){a.callback.apply(a.scope,b?[b[c-1].toLowerCase()]:[])}};navigator.notification.confirm(a.message,f,a.title,b)},alert:function(a){navigator.notification.alert(a.message,a.callback,a.title,a.buttonName)},prompt:function(a){a=this.callParent(arguments);var b=a.buttons,e=a.buttons.length;if(e&&typeof b[0]!=='string'){var d=[],c;for(c=0;c<e;c++){d.push(b[c].text)}b=d}var f=function(c){if(a.callback){a.callback.call(a.scope,b?b[c.buttonIndex-1].toLowerCase():null,c.input1)}};navigator.notification.prompt(a.message,f,a.title,b)},vibrate:function(a){navigator.notification.vibrate(a)},beep:function(a){navigator.notification.vibrate(a)}});Ext.define('Ext.device.notification.Simulator',{extend:'Ext.device.notification.Abstract',requires:['Ext.MessageBox','Ext.util.Audio'],msg:null,show:function(){var a=this.callParent(arguments),e=[],f=a.buttons.length,c,b,d;for(b=0;b<f;b++){c=a.buttons[b];if(Ext.isString(c)){c={text:a.buttons[b],itemId:a.buttons[b].toLowerCase()}}e.push(c)}this.msg=Ext.create('Ext.MessageBox');d=function(b){if(a.callback){a.callback.apply(a.scope,[b])}};this.msg.show({title:a.title,message:a.message,scope:this.msg,buttons:e,fn:d})},alert:function(){var a=this.callParent(arguments);if(a.buttonName){a.buttons=[a.buttonName]}this.show(a)},confirm:function(){var a=this.callParent(arguments);this.show(a)},prompt:function(){var a=this.callParent(arguments),e=[],f=a.buttons.length,c,b,d;for(b=0;b<f;b++){c=a.buttons[b];if(Ext.isString(c)){c={text:a.buttons[b],itemId:a.buttons[b].toLowerCase()}}e.push(c)}this.msg=Ext.create('Ext.MessageBox');d=function(b,c){if(a.callback){a.callback.apply(a.scope,[b,c])}};this.msg.prompt(a.title,a.message,d,this.msg,a.multiLine,a.value,a.prompt)},beep:function(a){if(!Ext.isNumber(a)){a=1}var c=0,b=function(){if(c<a){Ext.defer(function(){Ext.util.Audio.beep(b)},50)}c++};b()},vibrate:function(){var c=['@-webkit-keyframes vibrate{',' from {',' -webkit-transform: rotate(-2deg);',' }',' to{',' -webkit-transform: rotate(2deg);',' }','}','body {',' -webkit-animation: vibrate 50ms linear 10 alternate;','}'],b=document.getElementsByTagName('head')[0],a=document.createElement('style');a.innerHTML=c.join('\n');b.appendChild(a);Ext.defer(function(){b.removeChild(a)},400)}});Ext.define('Ext.device.Notification',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.notification.Cordova','Ext.device.notification.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.notification.Cordova')}}return Ext.create('Ext.device.notification.Simulator')}});Ext.define('Ext.device.orientation.Abstract',{mixins:['Ext.mixin.Observable'],onDeviceOrientation:function(a){this.doFireEvent('orientationchange',[a])}});Ext.define('Ext.device.orientation.HTML5',{extend:'Ext.device.orientation.Abstract',constructor:function(){this.callParent(arguments);this.onDeviceOrientation=Ext.Function.bind(this.onDeviceOrientation,this);window.addEventListener('deviceorientation',this.onDeviceOrientation,!0)}});Ext.define('Ext.device.Orientation',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.orientation.HTML5'],constructor:function(){return Ext.create('Ext.device.orientation.HTML5')}});Ext.define('Ext.device.push.Abstract',{ALERT:1,BADGE:2,SOUND:4,register:function(a){var b=this;if(!a.received){Ext.Logger.error('Failed to pass a received callback. This is required.')}if(a.type==null){Ext.Logger.error('Failed to pass a type. This is required.')}return {success:function(c){b.onSuccess(c,a.success,a.scope||b)},failure:function(c){b.onFailure(c,a.failure,a.scope||b)},received:function(c){b.onReceived(c,a.received,a.scope||b)},type:a.type}},onSuccess:function(c,a,b){if(a){a.call(b,c)}},onFailure:function(b,a,c){if(a){a.call(c,b)}},onReceived:function(b,a,c){if(a){a.call(c,b)}}});Ext.define('Ext.device.push.Cordova',{extend:'Ext.device.push.Abstract',statics:{callbacks:{}},setPushConfig:function(a){var b=Ext.id(null,'callback');Ext.device.push.Cordova.callbacks[b]=a.callbacks.received;return {'badge':a.callbacks.type===Ext.device.Push.BADGE?'true':'false','sound':a.callbacks.type===Ext.device.Push.SOUND?'true':'false','alert':a.callbacks.type===Ext.device.Push.ALERT?'true':'false','ecb':'Ext.device.push.Cordova.callbacks.'+b,'senderID':a.senderID}},register:function(){var a=arguments[0];a.callbacks=this.callParent(arguments);var b=this.setPushConfig(a),c=window.plugins.pushNotification;c.register(a.callbacks.success,a.callbacks.failure,b)}});Ext.define('Ext.device.Push',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.push.Cordova'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.push.Cordova')}}return Ext.create('Ext.device.push.Abstract')}});Ext.define('Ext.device.splashscreen.Abstract',{show:Ext.emptyFn,hide:Ext.emptyFn});Ext.define('Ext.device.splashscreen.Cordova',{alternateClassName:'Ext.device.splashscreen.PhoneGap',extend:'Ext.device.splashscreen.Abstract',show:function(){navigator.splashscreen.show()},hide:function(){navigator.splashscreen.hide()}});Ext.define('Ext.device.splashscreen.Simulator',{extend:'Ext.device.splashscreen.Abstract'});Ext.define('Ext.device.Splashscreen',{singleton:!0,requires:['Ext.device.splashscreen.Cordova','Ext.device.splashscreen.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.splashscreen.Cordova')}}return Ext.create('Ext.device.splashscreen.Simulator')}});Ext.define('Ext.device.storage.Abstract',{config:{databaseName:'Sencha',databaseVersion:'1.0',databaseDisplayName:'Sencha Database',databaseSize:5*1024*1024},openDatabase:function(b){var a=Ext.device.storage.Abstract.prototype.config;b=Ext.applyIf(b,{name:a.databaseName,version:a.databaseVersion,displayName:a.databaseDisplayName,size:a.databaseSize});return b},numKeys:Ext.emptyFn,getKey:Ext.emptyFn,getItem:Ext.emptyFn,setItem:Ext.emptyFn,removeItem:Ext.emptyFn,clear:Ext.emptyFn});Ext.define('Ext.device.storage.HTML5.SQLStatement',{extend:'Ext.Base',sql:null,'arguments':null,success:Ext.emptyFn,failure:Ext.emptyFn,constructor:function(a){this.sql=a.sql;this.arguments=a.arguments;this.success=a.success;this.failure=a.failure}});Ext.define('Ext.device.storage.HTML5.Database',{requires:['Ext.device.storage.HTML5.SQLStatement'],db:null,constructor:function(a){this.db=window.openDatabase(a.name,a.version,a.displayName,a.size)},getVersion:function(){if(this.db){return this.db.version}return null},transaction:function(a,c,b){if(!this.db){return}if(!Ext.isArray(a)){a=[a]}var d=function(d){Ext.each(a,function(e){if(Ext.isString(e)){d.executeSql(e)}else {if(Ext.isObject(e)){d.executeSql(e.sql,e.arguments,e.success,e.failure)}}})};this.db.transaction(d,b,c)}});Ext.define('Ext.device.storage.HTML5.HTML5',{extend:'Ext.device.storage.Abstract',requires:['Ext.device.storage.HTML5.Database'],dbCache:{},openDatabase:function(a){a=this.callParent(arguments);if(!this.dbCache[a.name]||a.noCache){this.dbCache[a.name]=Ext.create('Ext.device.storage.HTML5.Database',a)}return this.dbCache[a.name]},numKeys:function(){return window.localStorage.length},getKey:function(a){return window.localStorage.key(a)},getItem:function(a){return window.localStorage.getItem(a)},setItem:function(b,a){return window.localStorage.setItem(b,a)},removeItem:function(a){return window.localStorage.removeItem(a)},clear:function(){return window.localStorage.clear()}});Ext.define('Ext.device.storage.Cordova',{alternateClassName:'Ext.device.storage.PhoneGap',extend:'Ext.device.storage.HTML5.HTML5'});Ext.define('Ext.device.storage.Simulator',{extend:'Ext.device.storage.HTML5.HTML5'});Ext.define('Ext.device.Storage',{singleton:!0,requires:['Ext.device.storage.Cordova','Ext.device.storage.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.storage.Cordova')}}return Ext.create('Ext.device.storage.Simulator')}});Ext.define('Ext.device.twitter.Abstract',{compose:Ext.emptyFn,getPublicTimeline:Ext.emptyFn,getMentions:Ext.emptyFn,getTwitterUsername:Ext.emptyFn,getTwitterRequest:Ext.emptyFn});Ext.define('Ext.device.twitter.Cordova',{compose:function(a){window.plugins.twitter.composeTweet(a.success,a.failure,a.tweet,{urlAttach:a.url,imageAttach:a.image})},getPublicTimeline:function(a){window.plugins.twitter.getPublicTimeline(a.success,a.failure)},getMentions:function(a){window.plugins.twitter.getMentions(a.success,a.failure)},getTwitterUsername:function(a){window.plugins.twitter.getTwitterUsername(a.success,a.failure)},getTwitterRequest:function(a){window.plugins.twitter.getTWRequest(a.url,a.params,a.success,a.failure,a.options)}});Ext.define('Ext.device.Twitter',{alternateClassName:'Ext.ux.device.Twitter',singleton:!0,requires:['Ext.device.Communicator','Ext.device.twitter.*'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.twitter.Cordova')}else {return Ext.create('Ext.device.twitter.Abstract')}}});Ext.define('Ext.device.browser.Window',{extend:'Ext.Evented',open:function(b){var a=this;this._window=window.open(b.url,b.showToolbar?'_blank':'_self',b.options||null);this._window.addEventListener('loadstart',function(){a.fireEvent('loadstart',a)});this._window.addEventListener('loadstop',function(){a.fireEvent('loadstop',a)});this._window.addEventListener('loaderror',function(){a.fireEvent('loaderror',a)});this._window.addEventListener('exit',function(){a.fireEvent('close',a)})},close:function(){if(!this._window){return}this._window.close()}});