/*
This file is part of Ext JS 4.1

Copyright (c) 2011-2012 Sencha Inc

Contact:  http://www.sencha.com/contact

GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

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-04-20 14:10:47 (19f55ab932145a3443b228045fa80950dfeaf9cc)
*/
var Ext=Ext||{};Ext._startTime=new Date().getTime();(function(){var h=this,a=Object.prototype,j=a.toString,b=true,g={toString:1},e=function(){},d=function(){var i=d.caller.caller;return i.$owner.prototype[i.$name].apply(this,arguments)},c;Ext.global=h;for(c in g){b=null}if(b){b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=b;Ext.apply=function(o,n,q){if(q){Ext.apply(o,q)}if(o&&n&&typeof n==="object"){var p,m,l;for(p in n){o[p]=n[p]}if(b){for(m=b.length;m--;){l=b[m];if(n.hasOwnProperty(l)){o[l]=n[l]}}}}return o};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{name:Ext.sandboxName||"Ext",emptyFn:e,emptyString:new String(),baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(k,i){var l;if(k){for(l in i){if(k[l]===undefined){k[l]=i[l]}}}return k},iterate:function(i,l,k){if(Ext.isEmpty(i)){return}if(k===undefined){k=i}if(Ext.isIterable(i)){Ext.Array.each.call(Ext.Array,i,l,k)}else{Ext.Object.each.call(Ext.Object,i,l,k)}}});Ext.apply(Ext,{extend:(function(){var i=a.constructor,k=function(n){for(var l in n){if(!n.hasOwnProperty(l)){continue}this[l]=n[l]}};return function(l,q,o){if(Ext.isObject(q)){o=q;q=l;l=o.constructor!==i?o.constructor:function(){q.apply(this,arguments)}}var n=function(){},m,p=q.prototype;n.prototype=p;m=l.prototype=new n();m.constructor=l;l.superclass=p;if(p.constructor===i){p.constructor=q}l.override=function(r){Ext.override(l,r)};m.override=k;m.proto=m;l.override(o);l.extend=function(r){return Ext.extend(l,r)};return l}}()),override:function(m,n){if(m.$isClass){m.override(n)}else{if(typeof m=="function"){Ext.apply(m.prototype,n)}else{var i=m.self,k,l;if(i&&i.$isClass){for(k in n){if(n.hasOwnProperty(k)){l=n[k];if(typeof l=="function"){l.$name=k;l.$owner=i;l.$previous=m.hasOwnProperty(k)?m[k]:d}m[k]=l}}}else{Ext.apply(m,n)}}}return m}});Ext.apply(Ext,{valueFrom:function(l,i,k){return Ext.isEmpty(l,k)?i:l},typeOf:function(k){var i,l;if(k===null){return"null"}i=typeof k;if(i==="undefined"||i==="string"||i==="number"||i==="boolean"){return i}l=j.call(k);switch(l){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(i==="function"){return"function"}if(i==="object"){if(k.nodeType!==undefined){if(k.nodeType===3){return(/\S/).test(k.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(i,k){return(i===null)||(i===undefined)||(!k?i==="":false)||(Ext.isArray(i)&&i.length===0)},isArray:("isArray" in Array)?Array.isArray:function(i){return j.call(i)==="[object Array]"},isDate:function(i){return j.call(i)==="[object Date]"},isObject:(j.call(null)==="[object Object]")?function(i){return i!==null&&i!==undefined&&j.call(i)==="[object Object]"&&i.ownerDocument===undefined}:function(i){return j.call(i)==="[object Object]"},isSimpleObject:function(i){return i instanceof Object&&i.constructor===Object},isPrimitive:function(k){var i=typeof k;return i==="string"||i==="number"||i==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(i){return j.call(i)==="[object Function]"}:function(i){return typeof i==="function"},isNumber:function(i){return typeof i==="number"&&isFinite(i)},isNumeric:function(i){return !isNaN(parseFloat(i))&&isFinite(i)},isString:function(i){return typeof i==="string"},isBoolean:function(i){return typeof i==="boolean"},isElement:function(i){return i?i.nodeType===1:false},isTextNode:function(i){return i?i.nodeName==="#text":false},isDefined:function(i){return typeof i!=="undefined"},isIterable:function(k){var i=typeof k,l=false;if(k&&i!="string"){if(i=="function"){if(Ext.isSafari){l=k instanceof NodeList||k instanceof HTMLCollection}}else{l=true}}return l?k.length!==undefined:false}});Ext.apply(Ext,{clone:function(q){var p,o,m,l,r,n;if(q===null||q===undefined){return q}if(q.nodeType&&q.cloneNode){return q.cloneNode(true)}p=j.call(q);if(p==="[object Date]"){return new Date(q.getTime())}if(p==="[object Array]"){o=q.length;r=[];while(o--){r[o]=Ext.clone(q[o])}}else{if(p==="[object Object]"&&q.constructor===Object){r={};for(n in q){r[n]=Ext.clone(q[n])}if(b){for(m=b.length;m--;){l=b[m];r[l]=q[l]}}}}return r||q},getUniqueGlobalNamespace:function(){var l=this.uniqueGlobalNamespace,k;if(l===undefined){k=0;do{l="ExtBox"+(++k)}while(Ext.global[l]!==undefined);Ext.global[l]=Ext;this.uniqueGlobalNamespace=l}return l},functionFactoryCache:{},cacheableFunctionFactory:function(){var o=this,l=Array.prototype.slice.call(arguments),k=o.functionFactoryCache,i,m,n;if(Ext.isSandboxed){n=l.length;if(n>0){n--;l[n]="var Ext=window."+Ext.name+";"+l[n]}}i=l.join("");m=k[i];if(!m){m=Function.prototype.constructor.apply(Function.prototype,l);k[i]=m}return m},functionFactory:function(){var l=this,i=Array.prototype.slice.call(arguments),k;if(Ext.isSandboxed){k=i.length;if(k>0){k--;i[k]="var Ext=window."+Ext.name+";"+i[k]}}return Function.prototype.constructor.apply(Function.prototype,i)},Logger:{verbose:e,log:e,info:e,warn:e,error:function(i){throw new Error(i)},deprecate:e}});Ext.type=Ext.typeOf}());Ext.globalEval=Ext.global.execScript?function(a){execScript(a)}:function($$code){(function(){eval($$code)}())};(function(){var a="4.1.0",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},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(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;c<Math.max(h.length,g.length);c++){d=this.getComponentValue(h[c]);e=this.getComponentValue(g[c]);if(d<e){return -1}else{if(d>e){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,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)}());Ext.String=(function(){var i=/^[\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,m=/('|\\)/g,h=/\{(\d+)\}/g,b=/([-.*+?\^${}()|\[\]\/\\])/g,n=/^\s+|\s+$/g,j=/\s+/,l=/(^[^a-z]*|[^\w])/gi,d,a,g,c,e=function(p,o){return d[o]},k=function(p,o){return(o in a)?a[o]:String.fromCharCode(parseInt(o.substr(2),10))};return{createVarName:function(o){return o.replace(l,"")},htmlEncode:function(o){return(!o)?o:String(o).replace(g,e)},htmlDecode:function(o){return(!o)?o:String(o).replace(c,k)},addCharacterEntities:function(p){var o=[],s=[],q,r;for(q in p){r=p[q];a[q]=r;d[r]=q;o.push(r);s.push(q)}g=new RegExp("("+o.join("|")+")","g");c=new RegExp("("+s.join("|")+"|&#[0-9]{1,5};)","g")},resetCharacterEntities:function(){d={};a={};this.addCharacterEntities({"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"',"&#39;":"'"})},urlAppend:function(p,o){if(!Ext.isEmpty(o)){return p+(p.indexOf("?")===-1?"?":"&")+o}return p},trim:function(o){return o.replace(i,"")},capitalize:function(o){return o.charAt(0).toUpperCase()+o.substr(1)},uncapitalize:function(o){return o.charAt(0).toLowerCase()+o.substr(1)},ellipsis:function(q,o,r){if(q&&q.length>o){if(r){var s=q.substr(0,o-2),p=Math.max(s.lastIndexOf(" "),s.lastIndexOf("."),s.lastIndexOf("!"),s.lastIndexOf("?"));if(p!==-1&&p>=(o-15)){return s.substr(0,p)+"..."}}return q.substr(0,o-3)+"..."}return q},escapeRegex:function(o){return o.replace(b,"\\$1")},escape:function(o){return o.replace(m,"\\$1")},toggle:function(p,q,o){return p===q?o:q},leftPad:function(p,q,r){var o=String(p);r=r||" ";while(o.length<q){o=r+o}return o},format:function(p){var o=Ext.Array.toArray(arguments,1);return p.replace(h,function(q,r){return o[r]})},repeat:function(s,r,p){for(var o=[],q=r;q--;){o.push(s)}return o.join(p||"")},splitWords:function(o){if(o&&typeof o=="string"){return o.replace(n,"").split(j)}return o||[]}}}());Ext.String.resetCharacterEntities();Ext.htmlEncode=Ext.String.htmlEncode;Ext.htmlDecode=Ext.String.htmlDecode;Ext.urlAppend=Ext.String.urlAppend;Ext.Number=new function(){var b=this,c=(0.9).toFixed()!=="1",a=Math;Ext.apply(this,{constrain:function(h,g,e){var d=parseFloat(h);return(d<g)?g:((d>e)?e:d)},snap:function(h,e,g,i){var d;if(h===undefined||h<g){return g||0}if(e){d=h%e;if(d!==0){h-=d;if(d*2>=e){h+=e}else{if(d*2<-e){h-=e}}}}return b.constrain(h,g,i)},snapInRange:function(h,d,g,i){var e;g=(g||0);if(h===undefined||h<g){return g}if(d&&(e=((h-g)%d))){h-=e;e*=2;if(e>=d){h+=d}}if(i!==undefined){if(h>(i=b.snapInRange(i,d,g))){h=i}}return h},toFixed:c?function(g,d){d=d||0;var e=a.pow(10,d);return(a.round(g*e)/e).toFixed(d)}:function(e,d){return e.toFixed(d)},from:function(e,d){if(isFinite(e)){e=parseFloat(e)}return !isNaN(e)?e:d},randomInt:function(e,d){return a.floor(a.random()*(d-e+1)+e)}});Ext.num=function(){return b.from.apply(this,arguments)}};(function(){var g=Array.prototype,o=g.slice,q=(function(){var A=[],e,z=20;if(!A.splice){return false}while(z--){A.push("A")}A.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=A.length;A.splice(13,0,"XXX");if(e+1!=A.length){return false}return true}()),j="forEach" in g,u="map" in g,p="indexOf" in g,y="every" in g,c="some" in g,d="filter" in g,n=(function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}()),k=true,a,w,t,v;try{if(typeof document!=="undefined"){o.call(document.getElementsByTagName("body"))}}catch(s){k=false}function m(z,e){return(e<0)?Math.max(0,z.length+e):Math.min(z.length,e)}function x(G,F,z,J){var K=J?J.length:0,B=G.length,H=m(G,F),E,I,A,e,C,D;if(H===B){if(K){G.push.apply(G,J)}}else{E=Math.min(z,B-H);I=H+E;A=I+K-E;e=B-I;C=B-E;if(A<I){for(D=0;D<e;++D){G[A+D]=G[I+D]}}else{if(A>I){for(D=e;D--;){G[A+D]=G[I+D]}}}if(K&&H===C){G.length=C;G.push.apply(G,J)}else{G.length=C+K;for(D=0;D<K;++D){G[H+D]=J[D]}}}return G}function i(B,e,A,z){if(z&&z.length){if(e<B.length){B.splice.apply(B,[e,A].concat(z))}else{B.push.apply(B,z)}}else{B.splice(e,A)}return B}function b(A,e,z){return x(A,e,z)}function r(A,e,z){A.splice(e,z);return A}function l(C,e,A){var B=m(C,e),z=C.slice(e,m(C,B+A));if(arguments.length<4){x(C,B,A)}else{x(C,B,A,o.call(arguments,3))}return z}function h(e){return e.splice.apply(e,o.call(arguments,1))}w=q?r:b;t=q?i:x;v=q?h:l;a=Ext.Array={each:function(D,B,A,e){D=a.from(D);var z,C=D.length;if(e!==true){for(z=0;z<C;z++){if(B.call(A||D[z],D[z],z,D)===false){return z}}}else{for(z=C-1;z>-1;z--){if(B.call(A||D[z],D[z],z,D)===false){return z}}}return true},forEach:j?function(A,z,e){return A.forEach(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;e++){A.call(z,C[e],e,C)}},indexOf:p?function(A,e,z){return A.indexOf(e,z)}:function(C,A,B){var e,z=C.length;for(e=(B<0)?Math.max(0,z+B):B||0;e<z;e++){if(C[e]===A){return e}}return -1},contains:p?function(z,e){return z.indexOf(e)!==-1}:function(B,A){var e,z;for(e=0,z=B.length;e<z;e++){if(B[e]===A){return true}}return false},toArray:function(A,C,e){if(!A||!A.length){return[]}if(typeof A==="string"){A=A.split("")}if(k){return o.call(A,C||0,e||A.length)}var B=[],z;C=C||0;e=e?((e<0)?A.length+e:e):A.length;for(z=C;z<e;z++){B.push(A[z])}return B},pluck:function(D,e){var z=[],A,C,B;for(A=0,C=D.length;A<C;A++){B=D[A];z.push(B[e])}return z},map:u?function(A,z,e){return A.map(z,e)}:function(D,C,B){var A=[],z=0,e=D.length;for(;z<e;z++){A[z]=C.call(B,D[z],z,D)}return A},every:y?function(A,z,e){return A.every(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;++e){if(!A.call(z,C[e],e,C)){return false}}return true},some:c?function(A,z,e){return A.some(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;++e){if(A.call(z,C[e],e,C)){return true}}return false},clean:function(C){var z=[],e=0,B=C.length,A;for(;e<B;e++){A=C[e];if(!Ext.isEmpty(A)){z.push(A)}}return z},unique:function(C){var B=[],e=0,A=C.length,z;for(;e<A;e++){z=C[e];if(a.indexOf(B,z)===-1){B.push(z)}}return B},filter:d?function(A,z,e){return A.filter(z,e)}:function(D,B,A){var z=[],e=0,C=D.length;for(;e<C;e++){if(B.call(A,D[e],e,D)){z.push(D[e])}}return z},from:function(A,z){if(A===undefined||A===null){return[]}if(Ext.isArray(A)){return(z)?o.call(A):A}var e=typeof A;if(A&&A.length!==undefined&&e!=="string"&&(e!=="function"||!A.apply)){return a.toArray(A)}return[A]},remove:function(A,z){var e=a.indexOf(A,z);if(e!==-1){w(A,e,1)}return A},include:function(z,e){if(!a.contains(z,e)){z.push(e)}},clone:function(e){return o.call(e)},merge:function(){var e=o.call(arguments),B=[],z,A;for(z=0,A=e.length;z<A;z++){B=B.concat(e[z])}return a.unique(B)},intersect:function(){var e=[],A=o.call(arguments),L,J,F,I,M,B,z,H,K,C,G,E,D;if(!A.length){return e}L=A.length;for(G=M=0;G<L;G++){B=A[G];if(!I||B.length<I.length){I=B;M=G}}I=a.unique(I);w(A,M,1);z=I.length;L=A.length;for(G=0;G<z;G++){H=I[G];C=0;for(E=0;E<L;E++){J=A[E];F=J.length;for(D=0;D<F;D++){K=J[D];if(H===K){C++;break}}}if(C===L){e.push(H)}}return e},difference:function(z,e){var E=o.call(z),C=E.length,B,A,D;for(B=0,D=e.length;B<D;B++){for(A=0;A<C;A++){if(E[A]===e[B]){w(E,A,1);A--;C--}}}return E},slice:([1,2].slice(1,undefined).length?function(A,z,e){return o.call(A,z,e)}:function(A,z,e){if(typeof z==="undefined"){return o.call(A)}if(typeof e==="undefined"){return o.call(A,z)}return o.call(A,z,e)}),sort:n?function(z,e){if(e){return z.sort(e)}else{return z.sort()}}:function(F,E){var C=F.length,B=0,D,e,A,z;for(;B<C;B++){A=B;for(e=B+1;e<C;e++){if(E){D=E(F[e],F[A]);if(D<0){A=e}}else{if(F[e]<F[A]){A=e}}}if(A!==B){z=F[B];F[B]=F[A];F[A]=z}}return F},flatten:function(A){var z=[];function e(B){var D,E,C;for(D=0,E=B.length;D<E;D++){C=B[D];if(Ext.isArray(C)){e(C)}else{z.push(C)}}return z}return e(A)},min:function(D,C){var z=D[0],e,B,A;for(e=0,B=D.length;e<B;e++){A=D[e];if(C){if(C(z,A)===1){z=A}}else{if(A<z){z=A}}}return z},max:function(D,C){var e=D[0],z,B,A;for(z=0,B=D.length;z<B;z++){A=D[z];if(C){if(C(e,A)===-1){e=A}}else{if(A>e){e=A}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(C){var z=0,e,B,A;for(e=0,B=C.length;e<B;e++){A=C[e];z+=A}return z},toMap:function(C,e,A){var B={},z=C.length;if(!e){while(z--){B[C[z]]=z+1}}else{if(typeof e=="string"){while(z--){B[C[z][e]]=z+1}}else{while(z--){B[e.call(A,C[z])]=z+1}}}return B},erase:w,insert:function(A,z,e){return t(A,z,0,e)},replace:t,splice:v,push:function(B){var e=arguments.length,A=1,z;if(B===undefined){B=[]}else{if(!Ext.isArray(B)){B=[B]}}for(;A<e;A++){z=arguments[A];Array.prototype.push[Ext.isArray(z)?"apply":"call"](B,z)}return B}};Ext.each=a.each;a.union=a.merge;Ext.min=a.min;Ext.max=a.max;Ext.sum=a.sum;Ext.mean=a.mean;Ext.flatten=a.flatten;Ext.clean=a.clean;Ext.unique=a.unique;Ext.pluck=a.pluck;Ext.toArray=function(){return a.toArray.apply(a,arguments)}}());Ext.Function={flexSetter:function(a){return function(d,c){var e,g;if(d===null){return this}if(typeof d!=="string"){for(e in d){if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}if(Ext.enumerables){for(g=Ext.enumerables.length;g--;){e=Ext.enumerables[g];if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}}}else{a.call(this,d,c)}return this}},bind:function(d,c,b,a){if(arguments.length===2){return function(){return d.apply(c,arguments)}}var g=d,e=Array.prototype.slice;return function(){var h=b||arguments;if(a===true){h=e.call(arguments,0);h=h.concat(b)}else{if(typeof a=="number"){h=e.call(arguments,0);Ext.Array.insert(h,a,b)}}return g.apply(c||Ext.global,h)}},pass:function(c,a,b){if(!Ext.isArray(a)){if(Ext.isIterable(a)){a=Ext.Array.clone(a)}else{a=a!==undefined?[a]:[]}}return function(){var d=[].concat(a);d.push.apply(d,arguments);return c.apply(b||this,d)}},alias:function(b,a){return function(){return b[a].apply(b,arguments)}},clone:function(a){return function(){return a.apply(this,arguments)}},createInterceptor:function(d,c,b,a){var e=d;if(!Ext.isFunction(c)){return d}else{return function(){var h=this,g=arguments;c.target=h;c.method=d;return(c.apply(b||h||Ext.global,g)!==false)?d.apply(h||Ext.global,g):a||null}}},createDelayed:function(e,c,d,b,a){if(d||b){e=Ext.Function.bind(e,d,b,a)}return function(){var h=this,g=Array.prototype.slice.call(arguments);setTimeout(function(){e.apply(h,g)},c)}},defer:function(e,c,d,b,a){e=Ext.Function.bind(e,d,b,a);if(c>0){return setTimeout(Ext.supports.TimeoutActualLateness?function(){e()}: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(){var h=c||Array.prototype.slice.call(arguments,0),g=d||this;if(a){clearTimeout(a)}a=setTimeout(function(){e.apply(g,h)},b)}},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){var g=d.apply(c||this,arguments);e.apply(this,arguments);return g})},interceptAfter:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){e.apply(this,arguments);return d.apply(c||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");(function(){var a=function(){},b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,k,d){var c=b.toQueryObjects,j=[],g,h;if(Ext.isArray(k)){for(g=0,h=k.length;g<h;g++){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}else{if(Ext.isObject(k)){for(g in k){if(k.hasOwnProperty(g)){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}}else{j.push({name:e,value:k})}}return j},toQueryString:function(g,d){var h=[],e=[],l,k,m,c,n;for(l in g){if(g.hasOwnProperty(l)){h=h.concat(b.toQueryObjects(l,g[l],d))}}for(k=0,m=h.length;k<m;k++){c=h[k];n=c.value;if(Ext.isEmpty(n)){n=""}else{if(Ext.isDate(n)){n=Ext.Date.toString(n)}}e.push(encodeURIComponent(c.name)+"="+encodeURIComponent(String(n)))}return e.join("&")},fromQueryString:function(d,r){var m=d.replace(/^\?/,"").split("&"),u={},s,k,w,n,q,g,o,p,c,h,t,l,v,e;for(q=0,g=m.length;q<g;q++){o=m[q];if(o.length>0){k=o.split("=");w=decodeURIComponent(k[0]);n=(k[1]!==undefined)?decodeURIComponent(k[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(n)}else{u[w]=n}}else{h=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];l=[];if(h===null){u[w]=n;continue}for(p=0,c=h.length;p<c;p++){v=h[p];v=(v.length===2)?"":v.substring(1,v.length-1);l.push(v)}l.unshift(w);s=u;for(p=0,c=l.length;p<c;p++){v=l[p];if(p===c-1){if(Ext.isArray(s)&&v===""){s.push(n)}else{s[v]=n}}else{if(s[v]===undefined||typeof s[v]==="string"){e=l[p+1];s[v]=(Ext.isNumeric(e)||e==="")?[]:{}}s=s[v]}}}}}return u},each:function(c,e,d){for(var g in c){if(c.hasOwnProperty(g)){if(e.call(d||c,g,c[g],c)===false){return}}}},merge:function(k){var h=1,j=arguments.length,c=b.merge,e=Ext.clone,g,m,l,d;for(;h<j;h++){g=arguments[h];for(m in g){l=g[m];if(l&&l.constructor===Object){d=k[m];if(d&&d.constructor===Object){c(d,l)}else{k[m]=e(l)}}else{k[m]=l}}}return k},mergeIf:function(c){var h=1,j=arguments.length,e=Ext.clone,d,g,k;for(;h<j;h++){d=arguments[h];for(g in d){if(!(g in c)){k=d[g];if(k&&k.constructor===Object){c[g]=e(k)}else{c[g]=k}}}}return c},getKey:function(c,e){for(var d in c){if(c.hasOwnProperty(d)&&c[d]===e){return d}}return null},getValues:function(d){var c=[],e;for(e in d){if(d.hasOwnProperty(e)){c.push(d[e])}}return c},getKeys:(typeof Object.keys=="function")?function(c){if(!c){return[]}return Object.keys(c)}:function(c){var d=[],e;for(e in c){if(c.hasOwnProperty(e)){d.push(e)}}return d},getSize:function(c){var d=0,e;for(e in c){if(c.hasOwnProperty(e)){d++}}return d},classify:function(g){var e=g,i=[],d={},c=function(){var k=0,l=i.length,m;for(;k<l;k++){m=i[k];this[m]=new d[m]()}},h,j;for(h in g){if(g.hasOwnProperty(h)){j=g[h];if(j&&j.constructor===Object){i.push(h);d[h]=b.classify(j)}}}c.prototype=e;return c}};Ext.merge=Ext.Object.merge;Ext.mergeIf=Ext.Object.mergeIf;Ext.urlEncode=function(){var c=Ext.Array.from(arguments),d="";if((typeof c[1]==="string")){d=c[1]+"&";c[1]=false}return d+b.toQueryString.apply(b,c)};Ext.urlDecode=function(){return b.fromQueryString.apply(b,arguments)}}());(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Ext.Date={now:Date.now||function(){return +new Date()},toString:function(c){var d=Ext.String.leftPad;return c.getFullYear()+"-"+d(c.getMonth()+1,2,"0")+"-"+d(c.getDate(),2,"0")+"T"+d(c.getHours(),2,"0")+":"+d(c.getMinutes(),2,"0")+":"+d(c.getSeconds(),2,"0")},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})?\\)\\/"),g=(d||"").match(e);return g?new Date(((g[1]||"")+g[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:{January:0,Jan:0,February:1,Feb:1,March:2,Mar:2,April:3,Apr:3,May:4,June:5,Jun:5,July:6,Jul:6,August:7,Aug:7,September:8,Sep:8,October:9,Oct:9,November:10,Nov:10,December:11,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return Ext.Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Ext.Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Ext.Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|MS)/;return function(e){return c.test(e.replace(d,""))}}()),formatContainsDateInfo:(function(){var d=/(\\.)/g,c=/([djzmnYycU]|MS)/;return function(e){return c.test(e.replace(d,""))}}()),unescapeFormat:(function(){var c=/\\/gi;return function(d){return d.replace(c,"")}}()),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(){var k,h,g,d,j;for(k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){j=k.charAt(g);h.push(j=="T"?"'T'":a.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(o,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=a.add(new Date(o<100?100:o,c-1,n,k,g,j,e),a.YEAR,o<100?o-100:0);return o==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parse:function(d,g,c){var e=a.parseFunctions;if(e[g]==null){a.createParser(g)}return e[g](d,Ext.isDefined(c)?c:a.useStrict)},parseDate:function(d,e,c){return a.parse(d,e,c)},getFormatCode:function(d){var c=a.formatCodes[d];if(c){c=typeof c=="function"?c():c;a.formatCodes[d]=c}return c||("'"+Ext.String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="",d;for(d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+Ext.String.escape(e)+"'")}else{g.push(a.getFormatCode(e))}}}a.formatFunctions[h]=Ext.functionFactory("return "+g.join("+"))},createParser:(function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Ext.Date.defaults,","results = String(input).match(Ext.Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = Ext.Date.clearTime(new Date);","y = Ext.Number.from(y, Ext.Number.from(def.y, dt.getFullYear()));","m = Ext.Number.from(m, Ext.Number.from(def.m - 1, dt.getMonth()));","d = Ext.Number.from(d, Ext.Number.from(def.d, dt.getDate()));","h  = Ext.Number.from(h, Ext.Number.from(def.h, dt.getHours()));","i  = Ext.Number.from(i, Ext.Number.from(def.i, dt.getMinutes()));","s  = Ext.Number.from(s, Ext.Number.from(def.s, dt.getSeconds()));","ms = Ext.Number.from(ms, Ext.Number.from(def.ms, dt.getMilliseconds()));","if(z >= 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(o){var e=a.parseRegexes.length,p=1,g=[],n=[],l=false,d="",j=0,k=o.length,m=[],h;for(;j<k;++j){d=o.charAt(j);if(!l&&d=="\\"){l=true}else{if(l){l=false;n.push(Ext.String.escape(d))}else{h=a.formatCodeToRegex(d,p);p+=h.g;n.push(h.s);if(h.g&&h.c){if(h.calcAtEnd){m.push(h.c)}else{g.push(h.c)}}}}}g=g.concat(m);a.parseRegexes[e]=new RegExp("^"+n.join("")+"$","i");a.parseFunctions[o]=Ext.functionFactory("input","strict",b(c,e,g.join("")))}}()),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|0[1-9])"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|[1-9])"},D:function(){for(var c=[],d=0;d<7;c.push(a.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+a.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Ext.Date.getMonthNumber(results[{0}]), 10);\n",s:"("+a.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(a.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|0[1-9])"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|[1-9])"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a.formatCodeToRegex("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > 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)",calcAtEnd:true},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)",calcAtEnd:true},g:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|[0-9])"},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|1[0-9]|[0-9])"},h:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|0[1-9])"},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|[0-1][0-9])"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},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")}],g,d;for(g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},dateFormat:function(c,d){return a.format(c,d)},isEqual:function(d,c){if(d&&c){return(d.getTime()===c.getTime())}return !(d||c)},format:function(d,e){var c=a.formatFunctions;if(!Ext.isDate(d)){return""}if(c[e]==null){a.createFormat(e)}return c[e].call(d)+""},getTimezone:function(c){return c.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(c,d){var e=c.getTimezoneOffset();return(e>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(g){var e=0,j=Ext.Date.clone(g),c=g.getMonth(),h;for(h=0,j.setDate(1),j.setMonth(0);h<c;j.setMonth(++h)){e+=a.getDaysInMonth(j)}return e+g.getDate()-1},getWeekOfYear:(function(){var c=86400000,d=7*c;return function(g){var h=Date.UTC(g.getFullYear(),g.getMonth(),g.getDate()+3)/c,e=Math.floor(h/7),i=new Date(e*d).getUTCFullYear();return e-Math.floor(Date.UTC(i,0,7)/d)+1}}()),isLeapYear:function(c){var d=c.getFullYear();return !!((d&3)==0&&(d%100||(d%400==0&&d)))},getFirstDayOfMonth:function(d){var c=(d.getDay()-(d.getDate()-1))%7;return(c<0)?(c+7):c},getLastDayOfMonth:function(c){return a.getLastDateOfMonth(c).getDay()},getFirstDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),1)},getLastDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),a.getDaysInMonth(c))},getDaysInMonth:(function(){var c=[31,28,31,30,31,30,31,31,30,31,30,31];return function(e){var d=e.getMonth();return d==1&&a.isLeapYear(e)?29:c[d]}}()),getSuffix:function(c){switch(c.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(c){return new Date(c.getTime())},isDST:function(c){return new Date(c.getFullYear(),0,1).getTimezoneOffset()!=c.getTimezoneOffset()},clearTime:function(e,j){if(j){return Ext.Date.clearTime(Ext.Date.clone(e))}var h=e.getDate(),g,i;e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);if(e.getDate()!=h){for(g=1,i=a.add(e,Ext.Date.HOUR,g);i.getDate()!=h;g++,i=a.add(e,Ext.Date.HOUR,g)){}e.setDate(h);e.setHours(i.getHours())}return e},add:function(h,g,i){var j=Ext.Date.clone(h),c=Ext.Date,e;if(!g||i===0){return j}switch(g.toLowerCase()){case Ext.Date.MILLI:j.setMilliseconds(j.getMilliseconds()+i);break;case Ext.Date.SECOND:j.setSeconds(j.getSeconds()+i);break;case Ext.Date.MINUTE:j.setMinutes(j.getMinutes()+i);break;case Ext.Date.HOUR:j.setHours(j.getHours()+i);break;case Ext.Date.DAY:j.setDate(j.getDate()+i);break;case Ext.Date.MONTH:e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.MONTH,i)).getDate())}j.setDate(e);j.setMonth(h.getMonth()+i);break;case Ext.Date.YEAR:e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.YEAR,i)).getDate())}j.setDate(e);j.setFullYear(h.getFullYear()+i);break}return j},between:function(d,g,c){var e=d.getTime();return g.getTime()<=e&&e<=c.getTime()},compat:function(){var d=window.Date,c,l,j=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],h=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"],i=j.length,e=h.length,g,k,m;for(m=0;m<i;m++){g=j[m];d[g]=a[g]}for(c=0;c<e;c++){k=h[c];d.prototype[k]=function(){var n=Array.prototype.slice.call(arguments);n.unshift(this);return a[k].apply(a,n)}}}};var a=Ext.Date}());(function(a){var c=[],b=function(){};Ext.apply(b,{$className:"Ext.Base",$isClass:true,create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},extend:function(j){var d=j.prototype,m,g,h,k,e,l;g=this.prototype=Ext.Object.chain(d);g.self=this;this.superclass=g.superclass=d;if(!j.$isClass){m=Ext.Base.prototype;for(h in m){if(h in g){g[h]=m[h]}}}l=d.$inheritableStatics;if(l){for(h=0,k=l.length;h<k;h++){e=l[h];if(!this.hasOwnProperty(e)){this[e]=j[e]}}}if(j.$onExtended){this.$onExtended=j.$onExtended.slice()}g.config=new g.configClass();g.initConfigList=g.initConfigList.slice();g.initConfigMap=Ext.clone(g.initConfigMap);g.configMap=Ext.Object.chain(g.configMap)},$onExtended:[],triggerExtended:function(){var g=this.$onExtended,e=g.length,d,h;if(e>0){for(d=0;d<e;d++){h=g[d];h.fn.apply(h.scope||this,arguments)}}},onExtended:function(e,d){this.$onExtended.push({fn:e,scope:d});return this},addConfig:function(h,l){var n=this.prototype,m=Ext.Class.configNameCache,i=n.configMap,j=n.initConfigList,g=n.initConfigMap,k=n.config,d,e,o;for(e in h){if(h.hasOwnProperty(e)){if(!i[e]){i[e]=true}o=h[e];d=m[e].initialized;if(!g[e]&&o!==null&&!n[d]){g[e]=true;j.push(e)}}}if(l){Ext.merge(k,h)}else{Ext.mergeIf(k,h)}n.configClass=Ext.Object.classify(k)},addStatics:function(d){var g,e;for(e in d){if(d.hasOwnProperty(e)){g=d[e];this[e]=g}}return this},addInheritableStatics:function(e){var i,d,h=this.prototype,g,j;i=h.$inheritableStatics;d=h.$hasInheritableStatics;if(!i){i=h.$inheritableStatics=[];d=h.$hasInheritableStatics={}}for(g in e){if(e.hasOwnProperty(g)){j=e[g];this[g]=j;if(!d[g]){d[g]=true;i.push(g)}}}return this},addMembers:function(e){var h=this.prototype,d=Ext.enumerables,l=[],j,k,g,m;for(g in e){l.push(g)}if(d){l.push.apply(l,d)}for(j=0,k=l.length;j<k;j++){g=l[j];if(e.hasOwnProperty(g)){m=e[g];if(typeof m=="function"&&!m.$isClass&&m!==Ext.emptyFn){m.$owner=this;m.$name=g}h[g]=m}}return this},addMember:function(d,e){if(typeof e=="function"&&!e.$isClass&&e!==Ext.emptyFn){e.$owner=this;e.$name=d}this.prototype[d]=e;return this},implement:function(){this.addMembers.apply(this,arguments)},borrow:function(j,g){var n=this.prototype,m=j.prototype,h,k,e,l,d;g=Ext.Array.from(g);for(h=0,k=g.length;h<k;h++){e=g[h];d=m[e];if(typeof d=="function"){l=Ext.Function.clone(d);l.$owner=this;l.$name=e;n[e]=l}else{n[e]=d}}return this},override:function(e){var m=this,o=Ext.enumerables,k=m.prototype,h=Ext.Function.clone,d,j,g,n,l,i;if(arguments.length===2){d=e;e={};e[d]=arguments[1];o=null}do{l=[];n=null;for(d in e){if(d=="statics"){n=e[d]}else{if(d=="config"){m.addConfig(e[d],true)}else{l.push(d)}}}if(o){l.push.apply(l,o)}for(j=l.length;j--;){d=l[j];if(e.hasOwnProperty(d)){g=e[d];if(typeof g=="function"&&!g.$className&&g!==Ext.emptyFn){if(typeof g.$owner!="undefined"){g=h(g)}g.$owner=m;g.$name=d;i=k[d];if(i){g.$previous=i}}k[d]=g}}k=m;e=n}while(e);return this},callParent:function(d){var e;return(e=this.callParent.caller)&&(e.$previous||((e=e.$owner?e:e.caller)&&e.$owner.superclass.$class[e.$name])).apply(this,d||c)},mixin:function(g,i){var d=i.prototype,e=this.prototype,h;if(typeof d.onClassMixedIn!="undefined"){d.onClassMixedIn.call(i,this)}if(!e.hasOwnProperty("mixins")){if("mixins" in e){e.mixins=Ext.Object.chain(e.mixins)}else{e.mixins={}}}for(h in d){if(h==="mixins"){Ext.merge(e.mixins,d[h])}else{if(typeof e[h]=="undefined"&&h!="mixinId"&&h!="config"){e[h]=d[h]}}}if("config" in d){this.addConfig(d.config,false)}e.mixins[g]=d},getName:function(){return Ext.getClassName(this)},createAlias:a(function(e,d){this.override(e,function(){return this[d].apply(this,arguments)})}),addXtype:function(i){var e=this.prototype,h=e.xtypesMap,g=e.xtypes,d=e.xtypesChain;if(!e.hasOwnProperty("xtypesMap")){h=e.xtypesMap=Ext.merge({},e.xtypesMap||{});g=e.xtypes=e.xtypes?[].concat(e.xtypes):[];d=e.xtypesChain=e.xtypesChain?[].concat(e.xtypesChain):[];e.xtype=i}if(!h[i]){h[i]=true;g.push(i);d.push(i);Ext.ClassManager.setAlias(this,"widget."+i)}return this}});b.implement({isInstance:true,$className:"Ext.Base",configClass:Ext.emptyFn,initConfigList:[],configMap:{},initConfigMap:{},statics:function(){var e=this.statics.caller,d=this.self;if(!e){return d}return e.$owner},callParent:function(e){var g,d=(g=this.callParent.caller)&&(g.$previous||((g=g.$owner?g:g.caller)&&g.$owner.superclass[g.$name]));return d.apply(this,e||c)},self:b,constructor:function(){return this},initConfig:function(g){var m=g,l=Ext.Class.configNameCache,j=new this.configClass(),p=this.initConfigList,h=this.configMap,o,k,n,e,d;this.initConfig=Ext.emptyFn;this.initialConfig=m||{};this.config=g=(m)?Ext.merge(j,g):j;if(m){p=p.slice();for(e in m){if(h[e]){if(m[e]!==null){p.push(e);this[l[e].initialized]=false}}}}for(k=0,n=p.length;k<n;k++){e=p[k];o=l[e];d=o.initialized;if(!this[d]){this[d]=true;this[o.set].call(this,g[e])}}return this},hasConfig:function(d){return Boolean(this.configMap[d])},setConfig:function(h,l){if(!h){return this}var g=Ext.Class.configNameCache,d=this.config,k=this.configMap,j=this.initialConfig,e,i;l=Boolean(l);for(e in h){if(l&&j.hasOwnProperty(e)){continue}i=h[e];d[e]=i;if(k[e]){this[g[e].set](i)}}return this},getConfig:function(e){var d=Ext.Class.configNameCache;return this[d[e].get]()},getInitialConfig:function(e){var d=this.config;if(!e){return d}else{return d[e]}},onConfigUpdate:function(k,m,n){var o=this.self,g,j,d,h,l,e;k=Ext.Array.from(k);n=n||this;for(g=0,j=k.length;g<j;g++){d=k[g];h="update"+Ext.String.capitalize(d);l=this[h]||Ext.emptyFn;e=function(){l.apply(this,arguments);n[m].apply(n,arguments)};e.$name=h;e.$owner=o;this[h]=e}},destroy:function(){this.destroy=Ext.emptyFn}});b.prototype.callOverridden=b.prototype.callParent;Ext.Base=b}(Ext.Function.flexSetter));(function(){var c,b=Ext.Base,g=[],e,d;for(e in b){if(b.hasOwnProperty(e)){g.push(e)}}d=g.length;function a(i){function h(){return this.constructor.apply(this,arguments)||null}return h}Ext.Class=c=function(i,j,h){if(typeof i!="function"){h=j;j=i;i=null}if(!j){j={}}i=c.create(i,j);c.process(i,j,h);return i};Ext.apply(c,{onBeforeCreated:function(i,j,h){i.addMembers(j);h.onCreated.call(i,i)},create:function(h,l){var j,k;if(!h){h=a()}for(k=0;k<d;k++){j=g[k];h[j]=b[j]}return h},process:function(h,q,m){var l=q.preprocessors||c.defaultPreprocessors,t=this.preprocessors,w={onBeforeCreated:this.onBeforeCreated},v=[],x,p,o,u,n,s,r,k;delete q.preprocessors;for(o=0,u=l.length;o<u;o++){x=l[o];if(typeof x=="string"){x=t[x];p=x.properties;if(p===true){v.push(x.fn)}else{if(p){for(n=0,s=p.length;n<s;n++){r=p[n];if(q.hasOwnProperty(r)){v.push(x.fn);break}}}}}else{v.push(x)}}w.onCreated=m?m:Ext.emptyFn;w.preprocessors=v;this.doProcess(h,q,w)},doProcess:function(i,l,h){var k=this,j=h.preprocessors.shift();if(!j){h.onBeforeCreated.apply(k,arguments);return}if(j.call(k,i,l,h,k.doProcess)!==false){k.doProcess(i,l,h)}},preprocessors:{},registerPreprocessor:function(i,l,j,h,k){if(!h){h="last"}if(!j){j=[i]}this.preprocessors[i]={name:i,properties:j||false,fn:l};this.setDefaultPreprocessorPosition(i,h,k);return this},getPreprocessor:function(h){return this.preprocessors[h]},getPreprocessors:function(){return this.preprocessors},defaultPreprocessors:[],getDefaultPreprocessors:function(){return this.defaultPreprocessors},setDefaultPreprocessors:function(h){this.defaultPreprocessors=Ext.Array.from(h);return this},setDefaultPreprocessorPosition:function(j,l,k){var h=this.defaultPreprocessors,i;if(typeof l=="string"){if(l==="first"){h.unshift(j);return this}else{if(l==="last"){h.push(j);return this}}l=(l==="after")?1:-1}i=Ext.Array.indexOf(h,k);if(i!==-1){Ext.Array.splice(h,Math.max(0,i+l),0,j)}return this},configNameCache:{},getConfigNameMap:function(j){var i=this.configNameCache,k=i[j],h;if(!k){h=j.charAt(0).toUpperCase()+j.substr(1);k=i[j]={internal:j,initialized:"_is"+h+"Initialized",apply:"apply"+h,update:"update"+h,set:"set"+h,get:"get"+h,doSet:"doSet"+h,changeEvent:j.toLowerCase()+"change"}}return k}});c.registerPreprocessor("extend",function(j,n){var m=Ext.Base,o=m.prototype,p=n.extend,l,h,k;delete n.extend;if(p&&p!==Object){l=p}else{l=m}h=l.prototype;if(!l.$isClass){for(k in o){if(!h[k]){h[k]=o[k]}}}j.extend(l);j.triggerExtended.apply(j,arguments);if(n.onClassExtended){j.onExtended(n.onClassExtended,j);delete n.onClassExtended}},true);c.registerPreprocessor("statics",function(h,i){h.addStatics(i.statics);delete i.statics});c.registerPreprocessor("inheritableStatics",function(h,i){h.addInheritableStatics(i.inheritableStatics);delete i.inheritableStatics});c.registerPreprocessor("config",function(h,k){var j=k.config,i=h.prototype;delete k.config;Ext.Object.each(j,function(n,w){var u=c.getConfigNameMap(n),q=u.internal,l=u.initialized,v=u.apply,o=u.update,t=u.set,m=u.get,y=(t in i)||k.hasOwnProperty(t),p=(v in i)||k.hasOwnProperty(v),r=(o in i)||k.hasOwnProperty(o),x,s;if(w===null||(!y&&!p&&!r)){i[q]=w;i[l]=true}else{i[l]=false}if(!y){k[t]=function(B){var A=this[q],z=this[v],C=this[o];if(!this[l]){this[l]=true}if(z){B=z.call(this,B,A)}if(typeof B!="undefined"){this[q]=B;if(C&&B!==A){C.call(this,B,A)}}return this}}if(!(m in i)||k.hasOwnProperty(m)){s=k[m]||false;if(s){x=function(){return s.apply(this,arguments)}}else{x=function(){return this[q]}}k[m]=function(){var z;if(!this[l]){this[l]=true;this[t](this.config[n])}z=this[m];if("$previous" in z){z.$previous=x}else{this[m]=x}return x.apply(this,arguments)}}});h.addConfig(j,true)});c.registerPreprocessor("mixins",function(l,p,h){var j=p.mixins,m,k,n,o;delete p.mixins;Ext.Function.interceptBefore(h,"onCreated",function(){if(j instanceof Array){for(n=0,o=j.length;n<o;n++){k=j[n];m=k.prototype.mixinId||k.$className;l.mixin(m,k)}}else{for(var i in j){if(j.hasOwnProperty(i)){l.mixin(i,j[i])}}}})});Ext.extend=function(j,k,i){if(arguments.length===2&&Ext.isObject(k)){i=k;k=j;j=null}var h;if(!k){throw new Error("[Ext.extend] Attempting to extend from a class which has not been loaded on the page.")}i.extend=k;i.preprocessors=["extend","statics","inheritableStatics","mixins","config"];if(j){h=new c(j,i)}else{h=new c(i)}h.prototype.override=function(n){for(var l in n){if(n.hasOwnProperty(l)){this[l]=n[l]}}};return h}}());(function(b,d,g,c,e){var a=Ext.ClassManager={classes:{},existCache:{},namespaceRewrites:[{from:"Ext.",to:Ext}],maps:{alternateToName:{},aliasToName:{},nameToAliases:{},nameToAlternates:{}},enableNamespaceParseCache:true,namespaceParseCache:{},instantiators:[],isCreated:function(m){var l=this.existCache,k,n,j,h,o;if(this.classes[m]||l[m]){return true}h=e;o=this.parseNamespace(m);for(k=0,n=o.length;k<n;k++){j=o[k];if(typeof j!="string"){h=j}else{if(!h||!h[j]){return false}h=h[j]}}l[m]=true;this.triggerCreated(m);return true},createdListeners:[],nameCreatedListeners:{},triggerCreated:function(r){var t=this.createdListeners,l=this.nameCreatedListeners,m=this.maps.nameToAlternates[r],s=[r],o,q,n,p,k,h;for(o=0,q=t.length;o<q;o++){k=t[o];k.fn.call(k.scope,r)}if(m){s.push.apply(s,m)}for(o=0,q=s.length;o<q;o++){h=s[o];t=l[h];if(t){for(n=0,p=t.length;n<p;n++){k=t[n];k.fn.call(k.scope,h)}delete l[h]}}},onCreated:function(l,k,j){var i=this.createdListeners,h=this.nameCreatedListeners,m={fn:l,scope:k};if(j){if(this.isCreated(j)){l.call(k,j);return}if(!h[j]){h[j]=[]}h[j].push(m)}else{i.push(m)}},parseNamespace:function(k){var h=this.namespaceParseCache,l,n,p,j,s,r,q,m,o;if(this.enableNamespaceParseCache){if(h.hasOwnProperty(k)){return h[k]}}l=[];n=this.namespaceRewrites;p=e;j=k;for(m=0,o=n.length;m<o;m++){s=n[m];r=s.from;q=s.to;if(j===r||j.substring(0,r.length)===r){j=j.substring(r.length);if(typeof q!="string"){p=q}else{l=l.concat(q.split("."))}break}}l.push(p);l=l.concat(j.split("."));if(this.enableNamespaceParseCache){h[k]=l}return l},setNamespace:function(l,o){var j=e,p=this.parseNamespace(l),n=p.length-1,h=p[n],m,k;for(m=0;m<n;m++){k=p[m];if(typeof k!="string"){j=k}else{if(!j[k]){j[k]={}}j=j[k]}}j[h]=o;return j[h]},createNamespaces:function(){var h=e,o,l,m,k,n,p;for(m=0,n=arguments.length;m<n;m++){o=this.parseNamespace(arguments[m]);for(k=0,p=o.length;k<p;k++){l=o[k];if(typeof l!="string"){h=l}else{if(!h[l]){h[l]={}}h=h[l]}}}return h},set:function(h,l){var k=this,n=k.maps,m=n.nameToAlternates,j=k.getName(l),i;k.classes[h]=k.setNamespace(h,l);if(j&&j!==h){n.alternateToName[h]=j;i=m[j]||(m[j]=[]);i.push(h)}return this},get:function(k){var m=this.classes,h,o,j,l,n;if(m[k]){return m[k]}h=e;o=this.parseNamespace(k);for(l=0,n=o.length;l<n;l++){j=o[l];if(typeof j!="string"){h=j}else{if(!h||!h[j]){return null}h=h[j]}}return h},setAlias:function(h,i){var k=this.maps.aliasToName,l=this.maps.nameToAliases,j;if(typeof h=="string"){j=h}else{j=this.getName(h)}if(i&&k[i]!==j){k[i]=j}if(!l[j]){l[j]=[]}if(i){Ext.Array.include(l[j],i)}return this},getByAlias:function(h){return this.get(this.getNameByAlias(h))},getNameByAlias:function(h){return this.maps.aliasToName[h]||""},getNameByAlternate:function(h){return this.maps.alternateToName[h]||""},getAliasesByName:function(h){return this.maps.nameToAliases[h]||[]},getName:function(h){return h&&h.$className||""},getClass:function(h){return h&&h.self||null},create:function(i,j,h){j.$className=i;return new b(j,function(){var k=j.postprocessors||a.defaultPostprocessors,r=a.postprocessors,s=[],q,m,p,l,o,n,t;delete j.postprocessors;for(m=0,p=k.length;m<p;m++){q=k[m];if(typeof q=="string"){q=r[q];n=q.properties;if(n===true){s.push(q.fn)}else{if(n){for(l=0,o=n.length;l<o;l++){t=n[l];if(j.hasOwnProperty(t)){s.push(q.fn);break}}}}}else{s.push(q)}}j.postprocessors=s;j.createdFn=h;a.processCreate(i,this,j)})},processCreate:function(k,i,m){var l=this,h=m.postprocessors.shift(),j=m.createdFn;if(!h){l.set(k,i);if(j){j.call(i,i)}l.triggerCreated(k);return}if(h.call(l,k,i,m,l.processCreate)!==false){l.processCreate(k,i,m)}},createOverride:function(k,o,i){var n=this,m=o.override,j=o.requires,h=o.uses,l=function(){var p,q;if(j){q=j;j=null;Ext.Loader.require(q,l)}else{p=n.get(m);delete o.override;delete o.requires;delete o.uses;Ext.override(p,o);n.triggerCreated(k);if(h){Ext.Loader.addUsedClasses(h)}if(i){i.call(p)}}};n.existCache[k]=true;n.onCreated(l,n,m);return n},instantiateByAlias:function(){var i=arguments[0],h=g.call(arguments),j=this.getNameByAlias(i);if(!j){j=this.maps.aliasToName[i];Ext.syncRequire(j)}h[0]=j;return this.instantiate.apply(this,h)},instantiate:function(){var j=arguments[0],l=typeof j,i=g.call(arguments,1),k=j,m,h;if(l!="function"){if(l!="string"&&i.length===0){i=[j];j=j.xclass}h=this.get(j)}else{h=j}if(!h){m=this.getNameByAlias(j);if(m){j=m;h=this.get(j)}}if(!h){m=this.getNameByAlternate(j);if(m){j=m;h=this.get(j)}}if(!h){Ext.syncRequire(j);h=this.get(j)}return this.getInstantiator(i.length)(h,i)},dynInstantiate:function(i,h){h=c(h,true);h.unshift(i);return this.instantiate.apply(this,h)},getInstantiator:function(l){var k=this.instantiators,m,j,h;m=k[l];if(!m){j=l;h=[];for(j=0;j<l;j++){h.push("a["+j+"]")}m=k[l]=new Function("c","a","return new c("+h.join(",")+")")}return m},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(i,l,j,h,k){if(!h){h="last"}if(!j){j=[i]}this.postprocessors[i]={name:i,properties:j||false,fn:l};this.setDefaultPostprocessorPosition(i,h,k);return this},setDefaultPostprocessors:function(h){this.defaultPostprocessors=c(h);return this},setDefaultPostprocessorPosition:function(i,l,k){var j=this.defaultPostprocessors,h;if(typeof l=="string"){if(l==="first"){j.unshift(i);return this}else{if(l==="last"){j.push(i);return this}}l=(l==="after")?1:-1}h=Ext.Array.indexOf(j,k);if(h!==-1){Ext.Array.splice(j,Math.max(0,h+l),0,i)}return this},getNamesByExpression:function(p){var n=this.maps.nameToAliases,q=[],h,m,k,j,r,l,o;if(p.indexOf("*")!==-1){p=p.replace(/\*/g,"(.*?)");r=new RegExp("^"+p+"$");for(h in n){if(n.hasOwnProperty(h)){k=n[h];if(h.search(r)!==-1){q.push(h)}else{for(l=0,o=k.length;l<o;l++){m=k[l];if(m.search(r)!==-1){q.push(h);break}}}}}}else{j=this.getNameByAlias(p);if(j){q.push(j)}else{j=this.getNameByAlternate(p);if(j){q.push(j)}else{q.push(p)}}}return q}};a.registerPostprocessor("alias",function(k,j,n){var h=n.alias,l,m;for(l=0,m=h.length;l<m;l++){d=h[l];this.setAlias(j,d)}},["xtype","alias"]);a.registerPostprocessor("singleton",function(i,h,k,j){j.call(this,i,new h(),k);return false});a.registerPostprocessor("alternateClassName",function(j,h,n){var l=n.alternateClassName,k,m,o;if(!(l instanceof Array)){l=[l]}for(k=0,m=l.length;k<m;k++){o=l[k];this.set(o,h)}});Ext.apply(Ext,{create:d(a,"instantiate"),widget:function(j,i){var n=j,k,l,h,m;if(typeof n!="string"){i=j;n=i.xtype}else{i=i||{}}if(i.isComponent){return i}k="widget."+n;l=a.getNameByAlias(k);if(!l){m=true}h=a.get(l);if(m||!h){return a.instantiateByAlias(k,i)}return new h(i)},createByAlias:d(a,"instantiateByAlias"),define:function(i,j,h){if(j.override){return a.createOverride.apply(a,arguments)}return a.create.apply(a,arguments)},getClassName:d(a,"getName"),getDisplayName:function(h){if(h){if(h.displayName){return h.displayName}if(h.$name&&h.$class){return Ext.getClassName(h.$class)+"#"+h.$name}if(h.$className){return h.$className}}return"Anonymous"},getClass:d(a,"getClass"),namespace:d(a,"createNamespaces")});Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;b.registerPreprocessor("className",function(h,i){if(i.$className){h.$className=i.$className}},true,"first");b.registerPreprocessor("alias",function(t,n){var r=t.prototype,k=c(n.xtype),h=c(n.alias),u="widget.",s=u.length,o=Array.prototype.slice.call(r.xtypesChain||[]),l=Ext.merge({},r.xtypesMap||{}),m,q,p,j;for(m=0,q=h.length;m<q;m++){p=h[m];if(p.substring(0,s)===u){j=p.substring(s);Ext.Array.include(k,j)}}t.xtype=n.xtype=k[0];n.xtypes=k;for(m=0,q=k.length;m<q;m++){j=k[m];if(!l[j]){l[j]=true;o.push(j)}}n.xtypesChain=o;n.xtypesMap=l;Ext.Function.interceptAfter(n,"onClassCreated",function(){var i=r.mixins,w,v;for(w in i){if(i.hasOwnProperty(w)){v=i[w];k=v.xtypes;if(k){for(m=0,q=k.length;m<q;m++){j=k[m];if(!l[j]){l[j]=true;o.push(j)}}}}}});for(m=0,q=k.length;m<q;m++){j=k[m];Ext.Array.include(h,u+j)}n.alias=h},["xtype","alias"])}(Ext.Class,Ext.Function.alias,Array.prototype.slice,Ext.Array.from,Ext.global));Ext.Loader=new function(){var j=this,b=Ext.ClassManager,r=Ext.Class,e=Ext.Function.flexSetter,m=Ext.Function.alias,a=Ext.Function.pass,d=Ext.Function.defer,h=Ext.Array.erase,l=["extend","mixins","requires"],t={},k=[],c=/\/\.\//g,g=/\./g;Ext.apply(j,{isInHistory:t,history:k,config:{enabled:false,scriptChainDelay:false,disableCaching:true,disableCachingParam:"_dc",garbageCollect:false,paths:{Ext:"."},preserveScripts:true,scriptCharset:undefined},setConfig:function(w,x){if(Ext.isObject(w)&&arguments.length===1){Ext.merge(j.config,w)}else{j.config[w]=(Ext.isObject(x))?Ext.merge(j.config[w],x):x}return j},getConfig:function(w){if(w){return j.config[w]}return j.config},setPath:e(function(w,x){j.config.paths[w]=x;return j}),getPath:function(w){var y="",z=j.config.paths,x=j.getPrefix(w);if(x.length>0){if(x===w){return z[x]}y=z[x];w=w.substring(x.length+1)}if(y.length>0){y+="/"}return y.replace(c,"/")+w.replace(g,"/")+".js"},getPrefix:function(x){var z=j.config.paths,y,w="";if(z.hasOwnProperty(x)){return x}for(y in z){if(z.hasOwnProperty(y)&&y+"."===x.substring(0,y.length+1)){if(y.length>w.length){w=y}}}return w},isAClassNameWithAKnownPrefix:function(w){var x=j.getPrefix(w);return x!==""&&x!==w},require:function(y,x,w,z){if(x){x.call(w)}},syncRequire:function(){},exclude:function(w){return{require:function(z,y,x){return j.require(z,y,x,w)},syncRequire:function(z,y,x){return j.syncRequire(z,y,x,w)}}},onReady:function(z,y,A,w){var x;if(A!==false&&Ext.onDocumentReady){x=z;z=function(){Ext.onDocumentReady(x,y,w)}}z.call(y)}});var o=[],p={},s={},q={},n={},u=[],v=[],i={};Ext.apply(j,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:o,isClassFileLoaded:p,isFileLoaded:s,readyListeners:u,optionalRequires:v,requiresMap:i,numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:q,scriptsLoading:0,syncModeEnabled:false,scriptElements:n,refreshQueue:function(){var A=o.length,x,z,w,y;if(!A&&!j.scriptsLoading){return j.triggerReady()}for(x=0;x<A;x++){z=o[x];if(z){y=z.requires;if(y.length>j.numLoadedFiles){continue}for(w=0;w<y.length;){if(b.isCreated(y[w])){h(y,w,1)}else{w++}}if(z.requires.length===0){h(o,x,1);z.callback.call(z.scope);j.refreshQueue();break}}}return j},injectScriptElement:function(w,D,A,F,y){var E=document.createElement("script"),B=false,x=j.config,C=function(){if(!B){B=true;E.onload=E.onreadystatechange=E.onerror=null;if(typeof x.scriptChainDelay=="number"){d(D,x.scriptChainDelay,F)}else{D.call(F)}j.cleanupScriptElement(E,x.preserveScripts===false,x.garbageCollect)}},z=function(G){d(A,1,F);j.cleanupScriptElement(E,x.preserveScripts===false,x.garbageCollect)};E.type="text/javascript";E.onerror=z;y=y||x.scriptCharset;if(y){E.charset=y}if("addEventListener" in E){E.onload=C}else{if("readyState" in E){E.onreadystatechange=function(){if(this.readyState=="loaded"||this.readyState=="complete"){C()}}}else{E.onload=C}}E.src=w;(j.documentHead||document.getElementsByTagName("head")[0]).appendChild(E);return E},removeScriptElement:function(w){if(n[w]){j.cleanupScriptElement(n[w],true,!!j.getConfig("garbageCollect"));delete n[w]}return j},cleanupScriptElement:function(y,x,z){var A;y.onload=y.onreadystatechange=y.onerror=null;if(x){Ext.removeNode(y);if(z){for(A in y){try{y[A]=null;delete y[A]}catch(w){}}}}return j},loadScript:function(F){var z=j.getConfig(),y=typeof F=="string",x=y?F:F.url,B=!y&&F.onError,C=!y&&F.onLoad,E=!y&&F.scope,D=function(){j.numPendingFiles--;j.scriptsLoading--;if(B){B.call(E,"Failed loading '"+x+"', please verify that the file exists")}if(j.numPendingFiles+j.scriptsLoading===0){j.refreshQueue()}},A=function(){j.numPendingFiles--;j.scriptsLoading--;if(C){C.call(E)}if(j.numPendingFiles+j.scriptsLoading===0){j.refreshQueue()}},w;j.isLoading=true;j.numPendingFiles++;j.scriptsLoading++;w=z.disableCaching?(x+"?"+z.disableCachingParam+"="+Ext.Date.now()):x;n[x]=j.injectScriptElement(w,A,D)},loadScriptFile:function(x,D,B,G,w){if(s[x]){return j}var z=j.getConfig(),H=x+(z.disableCaching?("?"+z.disableCachingParam+"="+Ext.Date.now()):""),y=false,F,A,E;G=G||j;j.isLoading=true;if(!w){E=function(){};n[x]=j.injectScriptElement(H,D,E,G)}else{if(typeof XMLHttpRequest!="undefined"){F=new XMLHttpRequest()}else{F=new ActiveXObject("Microsoft.XMLHTTP")}try{F.open("GET",H,false);F.send(null)}catch(C){y=true}A=(F.status===1223)?204:(F.status===0&&(self.location||{}).protocol=="file:")?200:F.status;y=y||(A===0);if(y){}else{if((A>=200&&A<300)||(A===304)){Ext.globalEval(F.responseText+"\n//@ sourceURL="+x);D.call(G)}else{}}F=null}},syncRequire:function(){var w=j.syncModeEnabled;if(!w){j.syncModeEnabled=true}j.require.apply(j,arguments);if(!w){j.syncModeEnabled=false}j.refreshQueue()},require:function(O,F,z,B){var H={},y={},E=[],Q=[],N=[],x=[],D,P,J,I,w,C,M,L,K,G,A;if(B){B=(typeof B==="string")?[B]:B;for(L=0,G=B.length;L<G;L++){w=B[L];if(typeof w=="string"&&w.length>0){E=b.getNamesByExpression(w);for(K=0,A=E.length;K<A;K++){H[E[K]]=true}}}}O=(typeof O==="string")?[O]:(O?O:[]);if(F){if(F.length>0){D=function(){var S=[],R,T;for(R=0,T=x.length;R<T;R++){S.push(b.get(x[R]))}return F.apply(this,S)}}else{D=F}}else{D=Ext.emptyFn}z=z||Ext.global;for(L=0,G=O.length;L<G;L++){I=O[L];if(typeof I=="string"&&I.length>0){Q=b.getNamesByExpression(I);A=Q.length;for(K=0;K<A;K++){M=Q[K];if(H[M]!==true){x.push(M);if(!b.isCreated(M)&&!y[M]){y[M]=true;N.push(M)}}}}}if(N.length>0){if(!j.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((N.length>1)?"es":"")+": "+N.join(", "))}}else{D.call(z);return j}P=j.syncModeEnabled;if(!P){o.push({requires:N.slice(),callback:D,scope:z})}G=N.length;for(L=0;L<G;L++){C=N[L];J=j.getPath(C);if(P&&p.hasOwnProperty(C)){j.numPendingFiles--;j.removeScriptElement(J);delete p[C]}if(!p.hasOwnProperty(C)){p[C]=false;q[C]=J;j.numPendingFiles++;j.loadScriptFile(J,a(j.onFileLoaded,[C,J],j),a(j.onFileLoadError,[C,J],j),j,P)}}if(P){D.call(z);if(G===1){return b.get(C)}}return j},onFileLoaded:function(x,w){j.numLoadedFiles++;p[x]=true;s[w]=true;j.numPendingFiles--;if(j.numPendingFiles===0){j.refreshQueue()}},onFileLoadError:function(y,x,w,z){j.numPendingFiles--;j.hasFileLoadError=true},addUsedClasses:function(y){var w,x,z;if(y){y=(typeof y=="string")?[y]:y;for(x=0,z=y.length;x<z;x++){w=y[x];if(typeof w=="string"&&!Ext.Array.contains(v,w)){v.push(w)}}}return j},triggerReady:function(){var x,w,y=v;if(j.isLoading){j.isLoading=false;if(y.length!==0){y=y.slice();v.length=0;j.require(y,j.triggerReady,j);return j}}while(u.length&&!j.isLoading){x=u.shift();x.fn.call(x.scope)}return j},onReady:function(z,y,A,w){var x;if(A!==false&&Ext.onDocumentReady){x=z;z=function(){Ext.onDocumentReady(x,y,w)}}if(!j.isLoading){z.call(y)}else{u.push({fn:z,scope:y})}},historyPush:function(w){if(w&&p.hasOwnProperty(w)&&!t[w]){t[w]=true;k.push(w)}return j}});Ext.disableCacheBuster=function(x,y){var w=new Date();w.setTime(w.getTime()+(x?10*365:-1)*24*60*60*1000);w=w.toGMTString();document.cookie="ext-cache=1; expires="+w+"; path="+(y||"/")};Ext.require=m(j,"require");Ext.syncRequire=m(j,"syncRequire");Ext.exclude=m(j,"exclude");Ext.onReady=function(y,x,w){j.onReady(y,x,true,w)};r.registerPreprocessor("loader",function(M,A,L,K){var H=this,F=[],w,G=b.getName(M),z,y,E,D,J,C,x,I,B;for(z=0,E=l.length;z<E;z++){C=l[z];if(A.hasOwnProperty(C)){x=A[C];if(typeof x=="string"){F.push(x)}else{if(x instanceof Array){for(y=0,D=x.length;y<D;y++){J=x[y];if(typeof J=="string"){F.push(J)}}}else{if(typeof x!="function"){for(y in x){if(x.hasOwnProperty(y)){J=x[y];if(typeof J=="string"){F.push(J)}}}}}}}}if(F.length===0){return}j.require(F,function(){for(z=0,E=l.length;z<E;z++){C=l[z];if(A.hasOwnProperty(C)){x=A[C];if(typeof x=="string"){A[C]=b.get(x)}else{if(x instanceof Array){for(y=0,D=x.length;y<D;y++){J=x[y];if(typeof J=="string"){A[C][y]=b.get(J)}}}else{if(typeof x!="function"){for(var N in x){if(x.hasOwnProperty(N)){J=x[N];if(typeof J=="string"){A[C][N]=b.get(J)}}}}}}}}K.call(H,M,A,L)});return false},true,"after","className");b.registerPostprocessor("uses",function(y,x,z){var w=z.uses;if(w){j.addUsedClasses(w)}});b.onCreated(j.historyPush)};Ext.Error=Ext.extend(Error,{statics:{ignore:false,raise:function(a){a=a||{};if(Ext.isString(a)){a={msg:a}}var c=this.raise.caller,b;if(c){if(c.$name){a.sourceMethod=c.$name}if(c.$owner){a.sourceClass=c.$owner.$className}}if(Ext.Error.handle(a)!==true){b=Ext.Error.prototype.toString.call(a);Ext.log({msg:b,level:"error",dump:a,stack:true});throw new Ext.Error(a)}},handle:function(){return Ext.Error.ignore}},name:"Ext.Error",constructor:function(a){if(Ext.isString(a)){a={msg:a}}var b=this;Ext.apply(b,a);b.message=b.message||b.msg},toString:function(){var c=this,b=c.sourceClass?c.sourceClass:"",a=c.sourceMethod?"."+c.sourceMethod+"(): ":"",d=c.msg||"(No description provided)";return b+a+d}});Ext.deprecated=function(a){return Ext.emptyFn};Ext.JSON=(new (function(){var me=this,encodingFunction,decodingFunction,useNative=null,useHasOwn=!!{}.hasOwnProperty,isNative=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,newline){if(o===null||o===undefined){return"null"}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(o.toJSON){return o.toJSON()}else{if(Ext.isArray(o)){return encodeArray(o,newline)}else{if(Ext.isObject(o)){return encodeObject(o,newline)}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,newline){var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(doEncode(o[i]),",")}a[a.length-1]="]";return a.join("")},encodeObject=function(o,newline){var a=["{",""],i;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){a.push(doEncode(i),":",doEncode(o[i]),",")}}a[a.length-1]="}";return a.join("")};me.encodeValue=doEncode;me.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};me.encode=function(o){if(!encodingFunction){encodingFunction=isNative()?JSON.stringify:me.encodeValue}return encodingFunction(o)};me.decode=function(json,safe){if(!decodingFunction){decodingFunction=isNative()?JSON.parse:doDecode}try{return decodingFunction(json)}catch(e){if(safe===true){return null}Ext.Error.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}}})());Ext.encode=Ext.JSON.encode;Ext.decode=Ext.JSON.decode;Ext.apply(Ext,{userAgent:navigator.userAgent.toLowerCase(),cache:{},idSeed:1000,windowId:"ext-window",documentId:"ext-document",isReady:false,enableGarbageCollector:true,enableListenerCollection:true,addCacheEntry:function(e,b,d){d=d||b.dom;var a=e||(b&&b.id)||d.id,c=Ext.cache[a]||(Ext.cache[a]={data:{},events:{},dom:d,skipGarbageCollection:!!(d.getElementById||d.navigator)});if(b){b.$cache=c;c.el=b}return c},id:function(a,c){var b=this,d="";a=Ext.getDom(a,true)||{};if(a===document){a.id=b.documentId}else{if(a===window){a.id=b.windowId}}if(!a.id){if(b.isSandboxed){d=Ext.sandboxName.toLowerCase()+"-"}a.id=d+(c||"ext-gen")+(++Ext.idSeed)}return a.id},escapeId:(function(){var c=/^[a-zA-Z_][a-zA-Z0-9_\-]*$/i,d=/([\W]{1})/g,b=/^(\d)/g,a=function(h,g){return"\\"+g},e=function(h,g){return"\\00"+g.charCodeAt(0).toString(16)+" "};return function(g){return c.test(g)?g:g.replace(d,a).replace(b,e)}}()),getBody:(function(){var a;return function(){return a||(a=Ext.get(document.body))}}()),getHead:(function(){var a;return function(){return a||(a=Ext.get(document.getElementsByTagName("head")[0]))}}()),getDoc:(function(){var a;return function(){return a||(a=Ext.get(document))}}()),getCmp:function(a){return Ext.ComponentManager.get(a)},getOrientation:function(){return window.innerHeight>window.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b<c;b++){a=arguments[b];if(a){if(Ext.isArray(a)){this.destroy.apply(this,a)}else{if(Ext.isFunction(a.destroy)){a.destroy()}else{if(a.dom){a.remove()}}}}}},callback:function(d,c,b,a){if(Ext.isFunction(d)){b=b||[];c=c||window;if(a){Ext.defer(d,a,c,b)}else{d.apply(c,b)}}},htmlEncode:function(a){return Ext.String.htmlEncode(a)},htmlDecode:function(a){return Ext.String.htmlDecode(a)},urlAppend:function(a,b){return Ext.String.urlAppend(a,b)}});Ext.ns=Ext.namespace;window.undefined=window.undefined;(function(){var o=function(e){return e.test(Ext.userAgent)},t=document.compatMode=="CSS1Compat",F=function(R,Q){var e;return(R&&(e=Q.exec(Ext.userAgent)))?parseFloat(e[1]):0},p=document.documentMode,a=o(/opera/),v=a&&o(/version\/10\.5/),K=o(/\bchrome\b/),z=o(/webkit/),c=!K&&o(/safari/),I=c&&o(/applewebkit\/4/),G=c&&o(/version\/3/),D=c&&o(/version\/4/),j=c&&o(/version\/5\.0/),C=c&&o(/version\/5/),i=!a&&o(/msie/),J=i&&((o(/msie 7/)&&p!=8&&p!=9)||p==7),H=i&&((o(/msie 8/)&&p!=7&&p!=9)||p==8),E=i&&((o(/msie 9/)&&p!=7&&p!=8)||p==9),M=i&&o(/msie 6/),b=!z&&o(/gecko/),P=b&&o(/rv:1\.9/),O=b&&o(/rv:2\.0/),N=b&&o(/rv:5\./),r=b&&o(/rv:10\./),y=P&&o(/rv:1\.9\.0/),w=P&&o(/rv:1\.9\.1/),u=P&&o(/rv:1\.9\.2/),g=o(/windows|win32/),B=o(/macintosh|mac os x/),x=o(/linux/),l=null,m=F(true,/\bchrome\/(\d+\.\d+)/),h=F(true,/\bfirefox\/(\d+\.\d+)/),n=F(i,/msie (\d+\.\d+)/),s=F(a,/version\/(\d+\.\d+)/),d=F(c,/version\/(\d+\.\d+)/),A=F(z,/webkit\/(\d+\.\d+)/),q=/^https/i.test(window.location.protocol),k;try{document.execCommand("BackgroundImageCache",false,true)}catch(L){}k=function(){};k.info=k.warn=k.error=Ext.emptyFn;Ext.setVersion("extjs","4.1.0");Ext.apply(Ext,{SSL_SECURE_URL:q&&i?"javascript:''":"about:blank",scopeResetCSS:Ext.buildSettings.scopeResetCSS,resetCls:Ext.buildSettings.baseCSSPrefix+"reset",enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,getDom:function(R,Q){if(!R||!document){return null}if(R.dom){return R.dom}else{if(typeof R=="string"){var S=Ext.getElementById(R);if(S&&i&&Q){if(R==S.getAttribute("id")){return S}else{return null}}return S}else{return R}}},removeNode:M||J||H?(function(){var e;return function(S){if(S&&S.tagName.toUpperCase()!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(S):Ext.EventManager.removeAll(S);var Q=Ext.cache,R=S.id;if(Q[R]){delete Q[R].dom;delete Q[R]}if(S.tagName.toUpperCase()!="IFRAME"){if(H&&S.parentNode){S.parentNode.removeChild(S)}e=e||document.createElement("div");e.appendChild(S);e.innerHTML=""}}}}()):function(R){if(R&&R.parentNode&&R.tagName.toUpperCase()!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(R):Ext.EventManager.removeAll(R);var e=Ext.cache,Q=R.id;if(e[Q]){delete e[Q].dom;delete e[Q]}R.parentNode.removeChild(R)}},isStrict:t,isIEQuirks:i&&!t,isOpera:a,isOpera10_5:v,isWebKit:z,isChrome:K,isSafari:c,isSafari3:G,isSafari4:D,isSafari5:C,isSafari5_0:j,isSafari2:I,isIE:i,isIE6:M,isIE7:J,isIE8:H,isIE9:E,isGecko:b,isGecko3:P,isGecko4:O,isGecko5:N,isGecko10:r,isFF3_0:y,isFF3_5:w,isFF3_6:u,isFF4:4<=h&&h<5,isFF5:5<=h&&h<6,isFF10:10<=h&&h<11,isLinux:x,isWindows:g,isMac:B,chromeVersion:m,firefoxVersion:h,ieVersion:n,operaVersion:s,safariVersion:d,webKitVersion:A,isSecure:q,BLANK_IMAGE_URL:(M||J)?"//www.sencha.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",value:function(R,e,Q){return Ext.isEmpty(R,Q)?e:R},escapeRe:function(e){return e.replace(/([-.*+?\^${}()|\[\]\/\\])/g,"\\$1")},addBehaviors:function(T){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(T)})}else{var Q={},S,e,R;for(e in T){if((S=e.split("@"))[1]){R=S[0];if(!Q[R]){Q[R]=Ext.select(R)}Q[R].on(S[1],T[e])}}Q=null}},getScrollbarSize:function(Q){if(!Ext.isReady){return{}}if(Q||!l){var e=document.body,R=document.createElement("div");R.style.width=R.style.height="100px";R.style.overflow="scroll";R.style.position="absolute";e.appendChild(R);l={width:R.offsetWidth-R.clientWidth,height:R.offsetHeight-R.clientHeight};e.removeChild(R)}return l},getScrollBarWidth:function(Q){var e=Ext.getScrollbarSize(Q);return e.width+2},copyTo:function(Q,S,U,T){if(typeof U=="string"){U=U.split(/[,;\s]/)}var V,R=U.length,e;for(V=0;V<R;V++){e=U[V];if(T||S.hasOwnProperty(e)){Q[e]=S[e]}}return Q},destroyMembers:function(S){for(var R=1,Q=arguments,e=Q.length;R<e;R++){Ext.destroy(S[Q[R]]);delete S[Q[R]]}},log:k,partition:function(e,T){var U=[[],[]],Q,S,R=e.length;for(Q=0;Q<R;Q++){S=e[Q];U[(T&&T(S,Q,e))||(!T&&S)?0:1].push(S)}return U},invoke:function(e,T){var V=[],U=Array.prototype.slice.call(arguments,2),Q,S,R=e.length;for(Q=0;Q<R;Q++){S=e[Q];if(S&&typeof S[T]=="function"){V.push(S[T].apply(S,U))}else{V.push(undefined)}}return V},zip:function(){var W=Ext.partition(arguments,function(X){return typeof X!="function"}),T=W[0],V=W[1][0],e=Ext.max(Ext.pluck(T,"length")),S=[],U,R,Q;for(U=0;U<e;U++){S[U]=[];if(V){S[U]=V.apply(V,Ext.pluck(T,U))}else{for(R=0,Q=T.length;R<Q;R++){S[U].push(T[R][U])}}}return S},toSentence:function(Q,e){var T=Q.length,S,R;if(T<=1){return Q[0]}else{S=Q.slice(0,T-1);R=Q[T-1];return Ext.util.Format.format("{0} {1} {2}",S.join(", "),e||"and",R)}},useShims:M})}());Ext.application=function(a){Ext.require("Ext.app.Application");Ext.onReady(function(){new Ext.app.Application(a)})};(function(){Ext.ns("Ext.util");Ext.util.Format={};var g=Ext.util.Format,e=/<\/?[^>]+>/gi,c=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:"ab".substr(-1)!="b"?function(i,k,h){var j=String(i);return(k<0)?j.substr(Math.max(j.length+k,0),h):j.substr(k,h)}:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var o="",n=",0",l=0;k=k-0;if(k<0){k=-k;o="-"}j=Ext.isDefined(j)?j:g.currencyPrecision;n+=n+(j>0?".":"");for(;l<j;l++){n+="0"}k=g.number(k,n);if((h||g.currencyAtEnd)===true){return Ext.String.format("{0}{1}{2}",o,k,m||g.currencySign)}else{return Ext.String.format("{0}{1}{2}",o,m||g.currencySign,k)}},date:function(h,i){if(!h){return""}if(!Ext.isDate(h)){h=new Date(Date.parse(h))}return Ext.Date.dateFormat(h,i||Ext.Date.defaultFormat)},dateRenderer:function(h){return function(i){return g.date(i,h)}},stripTags:function(h){return !h?h:String(h).replace(e,"")},stripScripts:function(h){return !h?h:String(h).replace(c,"")},fileSize:function(h){if(h<1024){return h+" bytes"}else{if(h<1048576){return(Math.round(((h*10)/1024))/10)+" KB"}else{return(Math.round(((h*10)/1048576))/10)+" MB"}}},math:(function(){var h={};return function(j,i){if(!h[i]){h[i]=Ext.functionFactory("v","return v "+i+";")}return h[i](j)}}()),round:function(j,i){var h=Number(j);if(typeof i=="number"){i=Math.pow(10,i);h=Math.round(j*i)/i}return h},number:function(y,s){if(!s){return y}y=Ext.Number.from(y,NaN);if(isNaN(y)){return""}var A=g.thousandSeparator,q=g.decimalSeparator,z=false,r=y<0,k,h,x,w,p,t,o,l,u;y=Math.abs(y);if(s.substr(s.length-2)=="/i"){if(!a){a=new RegExp("[^\\d\\"+g.decimalSeparator+"]","g")}s=s.substr(0,s.length-2);z=true;k=s.indexOf(A)!=-1;h=s.replace(a,"").split(q)}else{k=s.indexOf(",")!=-1;h=s.replace(d,"").split(".")}if(h.length>2){}else{if(h.length>1){y=Ext.Number.toFixed(y,h[1].length)}else{y=Ext.Number.toFixed(y,0)}}x=y.toString();h=x.split(".");if(k){w=h[0];p=[];t=w.length;o=Math.floor(t/3);l=w.length%3||3;for(u=0;u<t;u+=l){if(u!==0){l=3}p[p.length]=w.substr(u,l);o-=1}x=p.join(A);if(h[1]){x+=q+h[1]}}else{if(h[1]){x=h[0]+q+h[1]}}if(r){r=x.replace(/[^1-9]/g,"")!==""}return(r?"-":"")+s.replace(/[\d,?\.?]+/,x)},numberRenderer:function(h){return function(i){return g.number(i,h)}},plural:function(h,i,j){return h+" "+(h==1?i:(j?j:i+"s"))},nl2br:function(h){return Ext.isEmpty(h)?"":h.replace(b,"<br/>")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){i=Ext.isEmpty(i)?"":i;if(Ext.isNumber(i)){i=i.toString()}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})}());Ext.define("Ext.util.TaskRunner",{interval:10,timerId:null,constructor:function(a){var b=this;if(typeof a=="number"){b.interval=a}else{if(a){Ext.apply(b,a)}}b.tasks=[];b.timerFn=Ext.Function.bind(b.onTick,b)},newTask:function(b){var a=new Ext.util.TaskRunner.Task(b);a.manager=this;return a},start:function(a){var c=this,b=new Date().getTime();if(!a.pending){c.tasks.push(a);a.pending=true}a.stopped=false;a.taskStartTime=b;a.taskRunTime=a.fireOnStart!==false?0:a.taskStartTime;a.taskRunCount=0;if(!c.firing){if(a.fireOnStart!==false){c.startTimer(0,b)}else{c.startTimer(a.interval,b)}}return a},stop:function(a){if(!a.stopped){a.stopped=true;if(a.onStop){a.onStop.call(a.scope||a,a)}}return a},stopAll:function(){Ext.each(this.tasks,this.stop,this)},firing:false,nextExpires:1e+99,onTick:function(){var m=this,e=m.tasks,a=new Date().getTime(),n=1e+99,k=e.length,c,o,h,b,d,g;m.timerId=null;m.firing=true;for(h=0;h<k||h<(k=e.length);++h){b=e[h];if(!(g=b.stopped)){c=b.taskRunTime+b.interval;if(c<=a){d=1;try{d=b.run.apply(b.scope||b,b.args||[++b.taskRunCount])}catch(j){try{if(b.onError){d=b.onError.call(b.scope||b,b,j)}}catch(l){}}b.taskRunTime=a;if(d===false||b.taskRunCount===b.repeat){m.stop(b);g=true}else{g=b.stopped;c=a+b.interval}}if(!g&&b.duration&&b.duration<=(a-b.taskStartTime)){m.stop(b);g=true}}if(g){b.pending=false;if(!o){o=e.slice(0,h)}}else{if(o){o.push(b)}if(n>c){n=c}}}if(o){m.tasks=o}m.firing=false;if(m.tasks.length){m.startTimer(n-a,new Date().getTime())}},startTimer:function(e,c){var d=this,b=c+e,a=d.timerId;if(a&&d.nextExpires-b>d.interval){clearTimeout(a);a=null}if(!a){if(e<d.interval){e=d.interval}d.timerId=setTimeout(d.timerFn,e);d.nextExpires=b}}},function(){var b=this,a=b.prototype;a.destroy=a.stopAll;Ext.util.TaskManager=Ext.TaskManager=new b();b.Task=new Ext.Class({isTask:true,stopped:true,fireOnStart:false,constructor:function(c){Ext.apply(this,c)},restart:function(c){if(c!==undefined){this.interval=c}this.manager.start(this)},start:function(c){if(this.stopped){this.restart(c)}},stop:function(){this.manager.stop(this)}});a=b.Task.prototype;a.destroy=a.stop});Ext.define("Ext.perf.Accumulator",(function(){var c=null,h=Ext.global.chrome,d,b=function(){b=function(){return new Date().getTime()};var l,m;if(Ext.isChrome&&h&&h.Interval){l=new h.Interval();l.start();b=function(){return l.microseconds()/1000}}else{if(window.ActiveXObject){try{m=new ActiveXObject("SenchaToolbox.Toolbox");Ext.senchaToolbox=m;b=function(){return m.milliseconds}}catch(n){}}else{if(Date.now){b=Date.now}}}Ext.perf.getTimestamp=Ext.perf.Accumulator.getTimestamp=b;return b()};function i(m,l){m.sum+=l;m.min=Math.min(m.min,l);m.max=Math.max(m.max,l)}function e(o){var m=o?o:(b()-this.time),n=this,l=n.accum;++l.count;if(!--l.depth){i(l.total,m)}i(l.pure,m-n.childTime);c=n.parent;if(c){++c.accum.childCount;c.childTime+=m}}function a(){return{min:Number.MAX_VALUE,max:0,sum:0}}function j(m,l){return function(){var o=m.enter(),n=l.apply(this,arguments);o.leave();return n}}function k(l){return Math.round(l*100)/100}function g(n,m,l,p){var o={avg:0,min:p.min,max:p.max,sum:0};if(n){l=l||0;o.sum=p.sum-m*l;o.avg=o.sum/n}return o}return{constructor:function(l){var m=this;m.count=m.childCount=m.depth=m.maxDepth=0;m.pure=a();m.total=a();m.name=l},statics:{getTimestamp:b},format:function(l){if(!d){d=new Ext.XTemplate(["{name} - {count} call(s)",'<tpl if="count">','<tpl if="childCount">'," ({childCount} children)","</tpl>",'<tpl if="depth - 1">'," ({depth} deep)","</tpl>",'<tpl for="times">',", {type}: {[this.time(values.sum)]} msec (","avg={[this.time(values.sum / parent.count)]}",")","</tpl>","</tpl>"].join(""),{time:function(n){return Math.round(n*100)/100}})}var m=this.getData(l);m.name=this.name;m.pure.type="Pure";m.total.type="Total";m.times=[m.pure,m.total];return d.apply(m)},getData:function(l){var m=this;return{count:m.count,childCount:m.childCount,depth:m.maxDepth,pure:g(m.count,m.childCount,l,m.pure),total:g(m.count,m.childCount,l,m.total)}},enter:function(){var l=this,m={accum:l,leave:e,childTime:0,parent:c};++l.depth;if(l.maxDepth<l.depth){l.maxDepth=l.depth}c=m;m.time=b();return m},monitor:function(n,m,l){var o=this.enter();if(l){n.apply(m,l)}else{n.call(m)}o.leave()},report:function(){Ext.log(this.format())},tap:function(t,v){var u=this,o=typeof v=="string"?[v]:v,s,w,q,p,n,m,l,r;r=function(){if(typeof t=="string"){s=Ext.global;p=t.split(".");for(q=0,n=p.length;q<n;++q){s=s[p[q]]}}else{s=t}for(q=0,n=o.length;q<n;++q){m=o[q];w=m.charAt(0)=="!";if(w){m=m.substring(1)}else{w=!(m in s.prototype)}l=w?s:s.prototype;l[m]=j(u,l[m])}};Ext.ClassManager.onCreated(r,u,t);return u}}}()),function(){Ext.perf.getTimestamp=this.getTimestamp});Ext.define("Ext.perf.Monitor",{singleton:true,alternateClassName:"Ext.Perf",requires:["Ext.perf.Accumulator"],constructor:function(){this.accumulators=[];this.accumulatorsByName={}},calibrate:function(){var b=new Ext.perf.Accumulator("$"),g=b.total,c=Ext.perf.Accumulator.getTimestamp,e=0,h,a,d;d=c();do{h=b.enter();h.leave();++e}while(g.sum<100);a=c();return(a-d)/e},get:function(b){var c=this,a=c.accumulatorsByName[b];if(!a){c.accumulatorsByName[b]=a=new Ext.perf.Accumulator(b);c.accumulators.push(a)}return a},enter:function(a){return this.get(a).enter()},monitor:function(a,c,b){this.get(a).monitor(c,b)},report:function(){var c=this,b=c.accumulators,a=c.calibrate();b.sort(function(e,d){return(e.name<d.name)?-1:((d.name<e.name)?1:0)});c.updateGC();Ext.log("Calibration: "+Math.round(a*100)/100+" msec/sample");Ext.each(b,function(d){Ext.log(d.format(a))})},getData:function(c){var b={},a=this.accumulators;Ext.each(a,function(d){if(c||d.count){b[d.name]=d.getData()}});return b},updateGC:function(){var a=this.accumulatorsByName.GC,b=Ext.senchaToolbox,c;if(a){a.count=b.garbageCollectionCounter||0;if(a.count){c=a.pure;a.total.sum=c.sum=b.garbageCollectionMilliseconds;c.min=c.max=c.sum/a.count;c=a.total;c.min=c.max=c.sum/a.count}}},watchGC:function(){Ext.perf.getTimestamp();var a=Ext.senchaToolbox;if(a){this.get("GC");a.watchGarbageCollector(false)}},setup:function(c){if(!c){c={render:{"Ext.AbstractComponent":"render"},layout:{"Ext.layout.Context":"run"}}}this.currentConfig=c;var d,g,b,e,a;for(d in c){if(c.hasOwnProperty(d)){g=c[d];b=Ext.Perf.get(d);for(e in g){if(g.hasOwnProperty(e)){a=g[e];b.tap(e,a)}}}}this.watchGC()}});Ext.is={init:function(b){var c=this.platforms,e=c.length,d,a;b=b||window.navigator;for(d=0;d<e;d++){a=c[d];this[a.identity]=a.regex.test(b[a.property])}this.Desktop=this.Mac||this.Windows||(this.Linux&&!this.Android);this.Tablet=this.iPad;this.Phone=!this.Desktop&&!this.Tablet;this.iOS=this.iPhone||this.iPad||this.iPod;this.Standalone=!!window.navigator.standalone},platforms:[{property:"platform",regex:/iPhone/i,identity:"iPhone"},{property:"platform",regex:/iPod/i,identity:"iPod"},{property:"userAgent",regex:/iPad/i,identity:"iPad"},{property:"userAgent",regex:/Blackberry/i,identity:"Blackberry"},{property:"userAgent",regex:/Android/i,identity:"Android"},{property:"platform",regex:/Mac/i,identity:"Mac"},{property:"platform",regex:/Win/i,identity:"Windows"},{property:"platform",regex:/Linux/i,identity:"Linux"}]};Ext.is.init();(function(){var a=function(d,c){var b=d.ownerDocument.defaultView,e=(b?b.getComputedStyle(d,null):d.currentStyle)||d.style;return e[c]};Ext.supports={init:function(){var d=this,e=document,c=d.tests,i=c.length,h=i&&Ext.isReady&&e.createElement("div"),g,b=[];if(h){h.innerHTML=['<div style="height:30px;width:50px;">','<div style="height:20px;width:20px;"></div>',"</div>",'<div style="width: 200px; height: 200px; position: relative; padding: 5px;">','<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div>',"</div>",'<div style="position: absolute; left: 10%; top: 10%;"></div>','<div style="float:left; background-color:transparent;"></div>'].join("");e.body.appendChild(h)}while(i--){g=c[i];if(h||g.early){d[g.identity]=g.fn.call(d,e,h)}else{b.push(g)}}if(h){e.body.removeChild(h)}d.tests=b},PointerEvents:"pointerEvents" in document.documentElement.style,CSS3BoxShadow:"boxShadow" in document.documentElement.style||"WebkitBoxShadow" in document.documentElement.style||"MozBoxShadow" in document.documentElement.style,ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),TimeoutActualLateness:(function(){setTimeout(function(){Ext.supports.TimeoutActualLateness=arguments.length!==0},0)}()),tests:[{identity:"Transitions",fn:function(h,k){var g=["webkit","Moz","o","ms","khtml"],j="TransitionEnd",b=[g[0]+j,"transitionend",g[2]+j,g[3]+j,g[4]+j],e=g.length,d=0,c=false;for(;d<e;d++){if(a(k,g[d]+"TransitionProperty")){Ext.supports.CSS3Prefix=g[d];Ext.supports.CSS3TransitionEnd=b[d];c=true;break}}return c}},{identity:"RightMargin",fn:function(c,d){var b=c.defaultView;return !(b&&b.getComputedStyle(d.firstChild.firstChild,null).marginRight!="0px")}},{identity:"DisplayChangeInputSelectionBug",early:true,fn:function(){var b=Ext.webKitVersion;return 0<b&&b<533}},{identity:"DisplayChangeTextAreaSelectionBug",early:true,fn:function(){var b=Ext.webKitVersion;return 0<b&&b<534.24}},{identity:"TransparentColor",fn:function(c,d,b){b=c.defaultView;return !(b&&b.getComputedStyle(d.lastChild,null).backgroundColor!="transparent")}},{identity:"ComputedStyle",fn:function(c,d,b){b=c.defaultView;return b&&b.getComputedStyle}},{identity:"Svg",fn:function(b){return !!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}},{identity:"Canvas",fn:function(b){return !!b.createElement("canvas").getContext}},{identity:"Vml",fn:function(b){var c=b.createElement("div");c.innerHTML="<!--[if vml]><br/><br/><![endif]-->";return(c.childNodes.length==2)}},{identity:"Float",fn:function(b,c){return !!c.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(b){return !!b.createElement("audio").canPlayType}},{identity:"History",fn:function(){var b=window.history;return !!(b&&b.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(h,j){var g="background-image:",d="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",i="linear-gradient(left top, black, white)",e="-moz-"+i,b="-o-"+i,c=[g+d,g+i,g+e,g+b];j.style.cssText=c.join(";");return(""+j.style.backgroundImage).indexOf("gradient")!==-1}},{identity:"CSS3BorderRadius",fn:function(e,g){var c=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],d=false,b;for(b=0;b<c.length;b++){if(document.body.style[c[b]]!==undefined){return true}}return d}},{identity:"GeoLocation",fn:function(){return(typeof navigator!="undefined"&&typeof navigator.geolocation!="undefined")||(typeof google!="undefined"&&typeof google.gears!="undefined")}},{identity:"MouseEnterLeave",fn:function(b,c){return("onmouseenter" in c&&"onmouseleave" in c)}},{identity:"MouseWheel",fn:function(b,c){return("onmousewheel" in c)}},{identity:"Opacity",fn:function(b,c){if(Ext.isIE6||Ext.isIE7||Ext.isIE8){return false}c.firstChild.style.cssText="opacity:0.73";return c.firstChild.style.opacity=="0.73"}},{identity:"Placeholder",fn:function(b){return"placeholder" in b.createElement("input")}},{identity:"Direct2DBug",fn:function(){return Ext.isString(document.body.style.msTransformOrigin)}},{identity:"BoundingClientRect",fn:function(b,c){return Ext.isFunction(c.getBoundingClientRect)}},{identity:"IncludePaddingInWidthCalculation",fn:function(b,c){return c.childNodes[1].firstChild.offsetWidth==210}},{identity:"IncludePaddingInHeightCalculation",fn:function(b,c){return c.childNodes[1].firstChild.offsetHeight==210}},{identity:"ArraySort",fn:function(){var b=[1,2,3,4,5].sort(function(){return 0});return b[0]===1&&b[1]===2&&b[2]===3&&b[3]===4&&b[4]===5}},{identity:"Range",fn:function(){return !!document.createRange}},{identity:"CreateContextualFragment",fn:function(){var b=Ext.supports.Range?document.createRange():false;return b&&!!b.createContextualFragment}},{identity:"WindowOnError",fn:function(){return Ext.isIE||Ext.isGecko||Ext.webKitVersion>=534.16}},{identity:"TextAreaMaxLength",fn:function(){var b=document.createElement("textarea");return("maxlength" in b)}},{identity:"GetPositionPercentage",fn:function(b,c){return a(c.childNodes[2],"left")=="10%"}}]}}());Ext.supports.init();Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};this.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};this.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.require("Ext.util.DelayedTask",function(){Ext.util.Event=Ext.extend(Object,(function(){function c(g,h,i,e){return function(){if(i.target===arguments[0]){g.apply(e,arguments)}}}function b(g,h,i,e){h.task=new Ext.util.DelayedTask();return function(){h.task.delay(i.buffer,g,e,Ext.Array.toArray(arguments))}}function a(g,h,i,e){return function(){var j=new Ext.util.DelayedTask();if(!h.tasks){h.tasks=[]}h.tasks.push(j);j.delay(i.delay||10,g,e,Ext.Array.toArray(arguments))}}function d(g,h,i,e){return function(){var j=h.ev;if(j.removeListener(h.fn,e)&&j.observable){j.observable.hasListeners[j.name]--}return g.apply(e,arguments)}}return{isEvent:true,constructor:function(g,e){this.name=e;this.observable=g;this.listeners=[]},addListener:function(h,g,e){var i=this,j;g=g||i.observable;if(!i.isListening(h,g)){j=i.createListener(h,g,e);if(i.firing){i.listeners=i.listeners.slice(0)}i.listeners.push(j)}},createListener:function(h,g,j){j=j||{};g=g||this.observable;var i={fn:h,scope:g,o:j,ev:this},e=h;if(j.single){e=d(e,i,j,g)}if(j.target){e=c(e,i,j,g)}if(j.delay){e=a(e,i,j,g)}if(j.buffer){e=b(e,i,j,g)}i.fireFn=e;return i},findListener:function(k,j){var h=this.listeners,e=h.length,l,g;while(e--){l=h[e];if(l){g=l.scope;if(l.fn==k&&(g==j||g==this.observable)){return e}}}return -1},isListening:function(g,e){return this.findListener(g,e)!==-1},removeListener:function(i,h){var j=this,g,l,e;g=j.findListener(i,h);if(g!=-1){l=j.listeners[g];if(j.firing){j.listeners=j.listeners.slice(0)}if(l.task){l.task.cancel();delete l.task}e=l.tasks&&l.tasks.length;if(e){while(e--){l.tasks[e].cancel()}delete l.tasks}Ext.Array.erase(j.listeners,g,1);return true}return false},clearListeners:function(){var g=this.listeners,e=g.length;while(e--){this.removeListener(g[e].fn,g[e].scope)}},fire:function(){var k=this,h=k.listeners,j=h.length,g,e,l;if(j>0){k.firing=true;for(g=0;g<j;g++){l=h[g];e=arguments.length?Array.prototype.slice.call(arguments,0):[];if(l.o){e.push(l.o)}if(l&&l.fireFn.apply(l.scope||k.observable,e)===false){return(k.firing=false)}}}k.firing=false;return true}}}()))});Ext.EventManager=new function(){var a=this,d=document,c=window,b=function(){var j=d.body||d.getElementsByTagName("body")[0],i=Ext.baseCSSPrefix,g=[i+"body"],e=[],h;if(!j){return false}h=j.parentNode;function k(l){g.push(i+l)}if(Ext.isIE){k("ie");if(Ext.isIE6){k("ie6")}else{k("ie7p");if(Ext.isIE7){k("ie7")}else{k("ie8p");if(Ext.isIE8){k("ie8")}else{k("ie9p");if(Ext.isIE9){k("ie9")}}}}if(Ext.isIE6||Ext.isIE7){k("ie7m")}if(Ext.isIE6||Ext.isIE7||Ext.isIE8){k("ie8m")}if(Ext.isIE7||Ext.isIE8){k("ie78")}}if(Ext.isGecko){k("gecko");if(Ext.isGecko3){k("gecko3")}if(Ext.isGecko4){k("gecko4")}if(Ext.isGecko5){k("gecko5")}}if(Ext.isOpera){k("opera")}if(Ext.isWebKit){k("webkit")}if(Ext.isSafari){k("safari");if(Ext.isSafari2){k("safari2")}if(Ext.isSafari3){k("safari3")}if(Ext.isSafari4){k("safari4")}if(Ext.isSafari5){k("safari5")}if(Ext.isSafari5_0){k("safari5_0")}}if(Ext.isChrome){k("chrome")}if(Ext.isMac){k("mac")}if(Ext.isLinux){k("linux")}if(!Ext.supports.CSS3BorderRadius){k("nbr")}if(!Ext.supports.CSS3LinearGradient){k("nlg")}if(!Ext.scopeResetCSS){k("reset")}if(h){if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){Ext.isBorderBox=false}else{Ext.isBorderBox=true}if(Ext.isBorderBox){e.push(i+"border-box")}if(Ext.isStrict){e.push(i+"strict")}else{e.push(i+"quirks")}Ext.fly(h,"_internal").addCls(e)}Ext.fly(j,"_internal").addCls(g);return true};Ext.apply(a,{hasBoundOnReady:false,hasFiredReady:false,deferReadyEvent:1,onReadyChain:[],readyEvent:(function(){var e=new Ext.util.Event();e.fire=function(){Ext._beforeReadyTime=Ext._beforeReadyTime||new Date().getTime();e.self.prototype.fire.apply(e,arguments);Ext._afterReadytime=new Date().getTime()};return e}()),idleEvent:new Ext.util.Event(),isReadyPaused:function(){return(/[?&]ext-pauseReadyFire\b/i.test(location.search)&&!Ext._continueFireReady)},bindReadyEvent:function(){if(a.hasBoundOnReady){return}if(d.readyState=="complete"){a.onReadyEvent({type:d.readyState||"body"})}else{document.addEventListener("DOMContentLoaded",a.onReadyEvent,false);window.addEventListener("load",a.onReadyEvent,false);a.hasBoundOnReady=true}},onReadyEvent:function(g){if(g&&g.type){a.onReadyChain.push(g.type)}if(a.hasBoundOnReady){document.removeEventListener("DOMContentLoaded",a.onReadyEvent,false);window.removeEventListener("load",a.onReadyEvent,false)}if(!Ext.isReady){a.fireDocReady()}},fireDocReady:function(){if(!Ext.isReady){Ext._readyTime=new Date().getTime();Ext.isReady=true;Ext.supports.init();a.onWindowUnload();a.readyEvent.onReadyChain=a.onReadyChain;if(Ext.isNumber(a.deferReadyEvent)){Ext.Function.defer(a.fireReadyEvent,a.deferReadyEvent);a.hasDocReadyTimer=true}else{a.fireReadyEvent()}}},fireReadyEvent:function(){var e=a.readyEvent;a.hasDocReadyTimer=false;a.isFiring=true;while(e.listeners.length&&!a.isReadyPaused()){e.fire()}a.isFiring=false;a.hasFiredReady=true},onDocumentReady:function(h,g,e){e=e||{};e.single=true;a.readyEvent.addListener(h,g,e);if(!(a.isFiring||a.hasDocReadyTimer)){if(Ext.isReady){a.fireReadyEvent()}else{a.bindReadyEvent()}}},stoppedMouseDownEvent:new Ext.util.Event(),propRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|freezeEvent)$/,getId:function(e){var g;e=Ext.getDom(e);if(e===d||e===c){g=e===d?Ext.documentId:Ext.windowId}else{g=Ext.id(e)}if(!Ext.cache[g]){Ext.addCacheEntry(g,null,e)}return g},prepareListenerConfig:function(i,g,k){var l=a.propRe,h,j,e;for(h in g){if(g.hasOwnProperty(h)){if(!l.test(h)){j=g[h];if(typeof j=="function"){e=[i,h,j,g.scope,g]}else{e=[i,h,j.fn,j.scope,j]}if(k){a.removeListener.apply(a,e)}else{a.addListener.apply(a,e)}}}}},mouseEnterLeaveRe:/mouseenter|mouseleave/,normalizeEvent:function(e,g){if(a.mouseEnterLeaveRe.test(e)&&!Ext.supports.MouseEnterLeave){if(g){g=Ext.Function.createInterceptor(g,a.contains)}e=e=="mouseenter"?"mouseover":"mouseout"}else{if(e=="mousewheel"&&!Ext.supports.MouseWheel&&!Ext.isOpera){e="DOMMouseScroll"}}return{eventName:e,fn:g}},contains:function(g){var e=g.browserEvent.currentTarget,h=a.getRelatedTarget(g);if(e&&e.firstChild){while(h){if(h===e){return false}h=h.parentNode;if(h&&(h.nodeType!=1)){h=null}}}return true},addListener:function(h,e,k,j,g){if(typeof e!=="string"){a.prepareListenerConfig(h,e);return}var l=h.dom||Ext.getDom(h),m,i;g=g||{};m=a.normalizeEvent(e,k);i=a.createListenerWrap(l,e,m.fn,j,g);if(l.attachEvent){l.attachEvent("on"+m.eventName,i)}else{l.addEventListener(m.eventName,i,g.capture||false)}if(l==d&&e=="mousedown"){a.stoppedMouseDownEvent.addListener(i)}a.getEventListenerCache(h.dom?h:l,e).push({fn:k,wrap:i,scope:j})},removeListener:function(p,q,r,t){if(typeof q!=="string"){a.prepareListenerConfig(p,q,true);return}var n=Ext.getDom(p),h=p.dom?p:Ext.get(n),e=a.getEventListenerCache(h,q),s=a.normalizeEvent(q).eventName,o=e.length,m,k,g,l;while(o--){k=e[o];if(k&&(!r||k.fn==r)&&(!t||k.scope===t)){g=k.wrap;if(g.task){clearTimeout(g.task);delete g.task}m=g.tasks&&g.tasks.length;if(m){while(m--){clearTimeout(g.tasks[m])}delete g.tasks}if(n.detachEvent){n.detachEvent("on"+s,g)}else{n.removeEventListener(s,g,false)}if(g&&n==d&&q=="mousedown"){a.stoppedMouseDownEvent.removeListener(g)}Ext.Array.erase(e,o,1)}}},removeAll:function(i){var j=i.dom?i:Ext.get(i),g,h,e;if(!j){return}g=(j.$cache||j.getCache());h=g.events;for(e in h){if(h.hasOwnProperty(e)){a.removeListener(j,e)}}g.events={}},purgeElement:function(j,g){var k=Ext.getDom(j),h=0,e;if(g){a.removeListener(j,g)}else{a.removeAll(j)}if(k&&k.childNodes){for(e=j.childNodes.length;h<e;h++){a.purgeElement(j.childNodes[h],g)}}},createListenerWrap:function(i,h,l,m,n){n=n||{};var k,j,e=/\\/g,g=function(p,o){if(!j){k=["if(!"+Ext.name+") {return;}"];if(n.buffer||n.delay||n.freezeEvent){k.push("e = new X.EventObjectImpl(e, "+(n.freezeEvent?"true":"false")+");")}else{k.push("e = X.EventObject.setEvent(e);")}if(n.delegate){k.push('var t = e.getTarget("'+(n.delegate+"").replace(e,"\\\\")+'", this);');k.push("if(!t) {return;}")}else{k.push("var t = e.target;")}if(n.target){k.push("if(e.target !== options.target) {return;}")}if(n.stopEvent){k.push("e.stopEvent();")}else{if(n.preventDefault){k.push("e.preventDefault();")}if(n.stopPropagation){k.push("e.stopPropagation();")}}if(n.normalized===false){k.push("e = e.browserEvent;")}if(n.buffer){k.push("(wrap.task && clearTimeout(wrap.task));");k.push("wrap.task = setTimeout(function() {")}if(n.delay){k.push("wrap.tasks = wrap.tasks || [];");k.push("wrap.tasks.push(setTimeout(function() {")}k.push("fn.call(scope || dom, e, t, options);");if(n.single){k.push("evtMgr.removeListener(dom, ename, fn, scope);")}if(h!=="mousemove"){k.push("if (evtMgr.idleEvent.listeners.length) {");k.push("evtMgr.idleEvent.fire();");k.push("}")}if(n.delay){k.push("}, "+n.delay+"));")}if(n.buffer){k.push("}, "+n.buffer+");")}j=Ext.cacheableFunctionFactory("e","options","fn","scope","ename","dom","wrap","args","X","evtMgr",k.join("\n"))}j.call(i,p,n,l,m,h,i,g,o,Ext,a)};return g},getEventListenerCache:function(i,e){var h,g;if(!i){return[]}if(i.$cache){h=i.$cache}else{h=Ext.cache[a.getId(i)]}g=h.events||(h.events={});return g[e]||(g[e]=[])},mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,stopEvent:function(e){a.stopPropagation(e);a.preventDefault(e)},stopPropagation:function(e){e=e.browserEvent||e;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}},preventDefault:function(g){g=g.browserEvent||g;if(g.preventDefault){g.preventDefault()}else{g.returnValue=false;try{if(g.ctrlKey||g.keyCode>111&&g.keyCode<124){g.keyCode=-1}}catch(h){}}},getRelatedTarget:function(e){e=e.browserEvent||e;var g=e.relatedTarget;if(!g){if(a.mouseLeaveRe.test(e.type)){g=e.toElement}else{if(a.mouseEnterRe.test(e.type)){g=e.fromElement}}}return a.resolveTextNode(g)},getPageX:function(e){return a.getPageXY(e)[0]},getPageY:function(e){return a.getPageXY(e)[1]},getPageXY:function(h){h=h.browserEvent||h;var g=h.pageX,j=h.pageY,i=d.documentElement,e=d.body;if(!g&&g!==0){g=h.clientX+(i&&i.scrollLeft||e&&e.scrollLeft||0)-(i&&i.clientLeft||e&&e.clientLeft||0);j=h.clientY+(i&&i.scrollTop||e&&e.scrollTop||0)-(i&&i.clientTop||e&&e.clientTop||0)}return[g,j]},getTarget:function(e){e=e.browserEvent||e;return a.resolveTextNode(e.target||e.srcElement)},resolveTextNode:Ext.isGecko?function(g){if(!g){return}var e=HTMLElement.prototype.toString.call(g);if(e=="[xpconnect wrapped native prototype]"||e=="[object XULElement]"){return}return g.nodeType==3?g.parentNode:g}:function(e){return e&&e.nodeType==3?e.parentNode:e},curWidth:0,curHeight:0,onWindowResize:function(i,h,g){var e=a.resizeEvent;if(!e){a.resizeEvent=e=new Ext.util.Event();a.on(c,"resize",a.fireResize,null,{buffer:100})}e.addListener(i,h,g)},fireResize:function(){var e=Ext.Element.getViewWidth(),g=Ext.Element.getViewHeight();if(a.curHeight!=g||a.curWidth!=e){a.curHeight=g;a.curWidth=e;a.resizeEvent.fire(e,g)}},removeResizeListener:function(h,g){var e=a.resizeEvent;if(e){e.removeListener(h,g)}},onWindowUnload:function(i,h,g){var e=a.unloadEvent;if(!e){a.unloadEvent=e=new Ext.util.Event();a.addListener(c,"unload",a.fireUnload)}if(i){e.addListener(i,h,g)}},fireUnload:function(){try{d=c=undefined;var m,h,k,j,g;a.unloadEvent.fire();if(Ext.isGecko3){m=Ext.ComponentQuery.query("gridview");h=0;k=m.length;for(;h<k;h++){m[h].scrollToTop()}}g=Ext.cache;for(j in g){if(g.hasOwnProperty(j)){a.removeAll(j)}}}catch(l){}},removeUnloadListener:function(h,g){var e=a.unloadEvent;if(e){e.removeListener(h,g)}},useKeyDown:Ext.isWebKit?parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1],10)>=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return a.useKeyDown?"keydown":"keypress"}});if(!("addEventListener" in document)&&document.attachEvent){Ext.apply(a,{pollScroll:function(){var g=true;try{document.documentElement.doScroll("left")}catch(h){g=false}if(g){a.onReadyEvent({type:"doScroll"})}else{a.scrollTimeout=setTimeout(a.pollScroll,20)}return g},scrollTimeout:null,readyStatesRe:/complete/i,checkReadyState:function(){var e=document.readyState;if(a.readyStatesRe.test(e)){a.onReadyEvent({type:e})}},bindReadyEvent:function(){var g=true;if(a.hasBoundOnReady){return}try{g=!window.frameElement}catch(h){}if(!g||!d.documentElement.doScroll){a.pollScroll=Ext.emptyFn}if(a.pollScroll()===true){return}if(d.readyState=="complete"){a.onReadyEvent({type:"already "+(d.readyState||"body")})}else{d.attachEvent("onreadystatechange",a.checkReadyState);window.attachEvent("onload",a.onReadyEvent);a.hasBoundOnReady=true}},onReadyEvent:function(g){if(g&&g.type){a.onReadyChain.push(g.type)}if(a.hasBoundOnReady){document.detachEvent("onreadystatechange",a.checkReadyState);window.detachEvent("onload",a.onReadyEvent)}if(Ext.isNumber(a.scrollTimeout)){clearTimeout(a.scrollTimeout);delete a.scrollTimeout}if(!Ext.isReady){a.fireDocReady()}},onReadyChain:[]})}Ext.onReady=function(h,g,e){Ext.Loader.onReady(h,g,true,e)};Ext.onDocumentReady=a.onDocumentReady;a.on=a.addListener;a.un=a.removeListener;Ext.onReady(b)};Ext.define("Ext.EventObjectImpl",{uses:["Ext.util.Point"],BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a}()),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d==c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return new Ext.util.Point(a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:(function(){var d,e={},c;if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(u,s,m,l,o,k,i,j,g,r,q,n,p){var h=u.createEvent("MouseEvents"),t=u.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(s,m,l,t,o,k,i,k,i,j,g,r,q,n,p)}else{h=u.createEvent("UIEvents");h.initEvent(s,m,l);h.view=t;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=q;h.shiftKey=r;h.button=n;h.relatedTarget=p}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(t,s,m,l,o,k,i,j,g,r,q,n,p){var h=t.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=r;h.metaKey=q;h.button=c[n]||n;h.relatedTarget=p;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:function(g){return g}}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}())},function(){Ext.EventObject=new Ext.EventObjectImpl()});Ext.define("Ext.dom.AbstractQuery",{select:function(k,b){var h=[],d,g,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}k=k.split(",");for(g=0,c=k.length;g<c;g++){if(typeof k[g]=="string"){if(typeof k[g][0]=="@"){d=b.getAttributeNode(k[g].substring(1));h.push(d)}else{d=b.querySelectorAll(k[g]);for(e=0,a=d.length;e<a;e++){h.push(d[e])}}}}return h},selectNode:function(b,a){return this.select(b,a)[0]},is:function(a,b){if(typeof a=="string"){a=document.getElementById(a)}return this.select(b).indexOf(a)!==-1}});Ext.define("Ext.dom.AbstractHelper",{emptyTags:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,confRe:/tag|children|cn|html|tpl|tplData$/i,endRe:/end/i,attribXlat:{cls:"class",htmlFor:"for"},closeTags:{},decamelizeName:(function(){var c=/([a-z])([A-Z])/g,b={};function a(d,g,e){return g+"-"+e.toLowerCase()}return function(d){return b[d]||(b[d]=d.replace(c,a))}}()),generateMarkup:function(d,c){var h=this,b,j,a,e,g;if(typeof d=="string"){c.push(d)}else{if(Ext.isArray(d)){for(e=0;e<d.length;e++){if(d[e]){h.generateMarkup(d[e],c)}}}else{a=d.tag||"div";c.push("<",a);for(b in d){if(d.hasOwnProperty(b)){j=d[b];if(!h.confRe.test(b)){if(typeof j=="object"){c.push(" ",b,'="');h.generateStyles(j,c).push('"')}else{c.push(" ",h.attribXlat[b]||b,'="',j,'"')}}}}if(h.emptyTags.test(a)){c.push("/>")}else{c.push(">");if((j=d.tpl)){j.applyOut(d.tplData,c)}if((j=d.html)){c.push(j)}if((j=d.cn||d.children)){h.generateMarkup(j,c)}g=h.closeTags;c.push(g[a]||(g[a]="</"+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(d,e){if(e){var b=0,a,c;d=Ext.fly(d);if(typeof e=="function"){e=e.call()}if(typeof e=="string"){e=Ext.util.Format.trim(e).split(/\s*(?::|;)\s*/);for(a=e.length;b<a;){d.setStyle(e[b++],e[b++])}}else{if(Ext.isObject(e)){d.setStyle(e)}}}},insertHtml:function(g,a,h){var e={},c,j,i,k,d,b;g=g.toLowerCase();e.beforebegin=["BeforeBegin","previousSibling"];e.afterend=["AfterEnd","nextSibling"];i=a.ownerDocument.createRange();j="setStart"+(this.endRe.test(g)?"After":"Before");if(e[g]){i[j](a);k=i.createContextualFragment(h);a.parentNode.insertBefore(k,g=="beforebegin"?a:a.nextSibling);return a[(g=="beforebegin"?"previous":"next")+"Sibling"]}else{d=(g=="afterbegin"?"first":"last")+"Child";if(a.firstChild){i[j](a[d]);k=i.createContextualFragment(h);if(g=="afterbegin"){a.insertBefore(k,a.firstChild)}else{a.appendChild(k)}}else{a.innerHTML=h}return a[d]}throw'Illegal insertion point -> "'+g+'"'},insertBefore:function(a,c,b){return this.doInsert(a,c,b,"beforebegin")},insertAfter:function(a,c,b){return this.doInsert(a,c,b,"afterend","nextSibling")},insertFirst:function(a,c,b){return this.doInsert(a,c,b,"afterbegin","firstChild")},append:function(a,c,b){return this.doInsert(a,c,b,"beforeend","",true)},overwrite:function(a,c,b){a=Ext.getDom(a);a.innerHTML=this.markup(c);return b?Ext.get(a.firstChild):a.firstChild},doInsert:function(d,g,e,h,c,a){var b=this.insertHtml(h,Ext.getDom(d),this.markup(g));return e?Ext.get(b,true):b}});(function(){var a=window.document,b=/^\s+|\s+$/g,c=/\s/;if(!Ext.cache){Ext.cache={}}Ext.define("Ext.dom.AbstractElement",{inheritableStatics:{get:function(e){var g=this,h=Ext.dom.Element,d,j,i,k;if(!e){return null}if(typeof e=="string"){if(e==Ext.windowId){return h.get(window)}else{if(e==Ext.documentId){return h.get(a)}}d=Ext.cache[e];if(d&&d.skipGarbageCollection){j=d.el;return j}if(!(i=a.getElementById(e))){return null}if(d&&d.el){j=d.el;j.dom=i}else{j=new h(i,!!d)}return j}else{if(e.tagName){if(!(k=e.id)){k=Ext.id(e)}d=Ext.cache[k];if(d&&d.el){j=Ext.cache[k].el;j.dom=e}else{j=new h(e,!!d)}return j}else{if(e instanceof g){if(e!=g.docEl&&e!=g.winEl){e.dom=a.getElementById(e.id)||e.dom}return e}else{if(e.isComposite){return e}else{if(Ext.isArray(e)){return g.select(e)}else{if(e===a){if(!g.docEl){g.docEl=Ext.Object.chain(h.prototype);g.docEl.dom=a;g.docEl.id=Ext.id(a);g.addToCache(g.docEl)}return g.docEl}else{if(e===window){if(!g.winEl){g.winEl=Ext.Object.chain(h.prototype);g.winEl.dom=window;g.winEl.id=Ext.id(window);g.addToCache(g.winEl)}return g.winEl}}}}}}}return null},addToCache:function(d,e){if(d){Ext.addCacheEntry(e,d)}return d},addMethods:function(){this.override.apply(this,arguments)},mergeClsList:function(){var n,m={},k,d,g,l,e,o=[],h=false;for(k=0,d=arguments.length;k<d;k++){n=arguments[k];if(Ext.isString(n)){n=n.replace(b,"").split(c)}if(n){for(g=0,l=n.length;g<l;g++){e=n[g];if(!m[e]){if(k){h=true}m[e]=true}}}}for(e in m){o.push(e)}o.changed=h;return o},removeCls:function(g,l){var e={},h,k,j,d=[],m=false;if(g){if(Ext.isString(g)){g=g.replace(b,"").split(c)}for(h=0,k=g.length;h<k;h++){e[g[h]]=true}}if(l){if(Ext.isString(l)){l=l.split(c)}for(h=0,k=l.length;h<k;h++){j=l[h];if(e[j]){m=true;delete e[j]}}}for(j in e){d.push(j)}d.changed=m;return d},VISIBILITY:1,DISPLAY:2,OFFSETS:3,ASCLASS:4},constructor:function(d,e){var g=this,h=typeof d=="string"?a.getElementById(d):d,i;if(!h){return null}i=h.id;if(!e&&i&&Ext.cache[i]){return Ext.cache[i].el}g.dom=h;g.id=i||Ext.id(h);g.self.addToCache(g)},set:function(i,e){var g=this.dom,d,h;for(d in i){if(i.hasOwnProperty(d)){h=i[d];if(d=="style"){this.applyStyles(h)}else{if(d=="cls"){g.className=h}else{if(e!==false){if(h===undefined){g.removeAttribute(d)}else{g.setAttribute(d,h)}}else{g[d]=h}}}}}return this},defaultUnit:"px",is:function(d){return Ext.DomQuery.is(this.dom,d)},getValue:function(d){var e=this.dom.value;return d?parseInt(e,10):e},remove:function(){var d=this,e=d.dom;if(e){Ext.removeNode(e);delete d.dom}},contains:function(d){if(!d){return false}var e=this,g=d.dom||d;return(g===e.dom)||Ext.dom.AbstractElement.isAncestor(e.dom,g)},getAttribute:function(d,e){var g=this.dom;return g.getAttributeNS(e,d)||g.getAttribute(e+":"+d)||g.getAttribute(d)||g[d]},update:function(d){if(this.dom){this.dom.innerHTML=d}return this},setHTML:function(d){if(this.dom){this.dom.innerHTML=d}return this},getHTML:function(){return this.dom?this.dom.innerHTML:""},hide:function(){this.setVisible(false);return this},show:function(){this.setVisible(true);return this},setVisible:function(j,d){var e=this,i=e.self,h=e.getVisibilityMode(),g=Ext.baseCSSPrefix;switch(h){case i.VISIBILITY:e.removeCls([g+"hidden-display",g+"hidden-offsets"]);e[j?"removeCls":"addCls"](g+"hidden-visibility");break;case i.DISPLAY:e.removeCls([g+"hidden-visibility",g+"hidden-offsets"]);e[j?"removeCls":"addCls"](g+"hidden-display");break;case i.OFFSETS:e.removeCls([g+"hidden-visibility",g+"hidden-display"]);e[j?"removeCls":"addCls"](g+"hidden-offsets");break}return e},getVisibilityMode:function(){var e=(this.$cache||this.getCache()).data,d=e.visibilityMode;if(d===undefined){e.visibilityMode=d=this.self.DISPLAY}return d},setVisibilityMode:function(d){(this.$cache||this.getCache()).data.visibilityMode=d;return this},getCache:function(){var d=this,e=d.dom.id||Ext.id(d.dom);d.$cache=Ext.cache[e]||Ext.addCacheEntry(e,null,d.dom);return d.$cache}},function(){var d=this;Ext.getDetachedBody=function(){var e=d.detachedBodyEl;if(!e){e=a.createElement("div");d.detachedBodyEl=e=new d.Fly(e);e.isDetachedBody=true}return e};Ext.getElementById=function(h){var g=a.getElementById(h),e;if(!g&&(e=d.detachedBodyEl)){g=e.dom.querySelector("#"+Ext.escapeId(h))}return g};Ext.get=function(e){return Ext.dom.Element.get(e)};this.addStatics({Fly:new Ext.Class({extend:d,isFly:true,constructor:function(e){this.dom=e},attach:function(e){this.dom=e;this.$cache=e.id?Ext.cache[e.id]:null;return this}}),_flyweights:{},fly:function(i,g){var h=null,e=d._flyweights;g=g||"_global";i=Ext.getDom(i);if(i){h=e[g]||(e[g]=new d.Fly());h.dom=i;h.$cache=i.id?Ext.cache[i.id]:null}return h}});Ext.fly=function(){return d.fly.apply(d,arguments)};(function(e){e.destroy=e.remove;if(a.querySelector){e.getById=function(i,g){var h=a.getElementById(i)||this.dom.querySelector("#"+Ext.escapeId(i));return g?h:(h?Ext.get(h):null)}}else{e.getById=function(i,g){var h=a.getElementById(i);return g?h:(h?Ext.get(h):null)}}}(this.prototype))})}());Ext.dom.AbstractElement.addInheritableStatics({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(typeof b=="number"){return b+(a||this.defaultUnit||"px")}if(b===""||b=="auto"||b===undefined||b===null){return b||""}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:parseFloat(c[0])||0,right:parseFloat(c[1])||0,bottom:parseFloat(c[2])||0,left:parseFloat(c[3])||0}},unitizeBox:function(g,e){var d=this.addUnits,c=this.parseBox(g);return d(c.top,e)+" "+d(c.right,e)+" "+d(c.bottom,e)+" "+d(c.left,e)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){if(a=="float"){a=Ext.supports.Float?"cssFloat":"styleFloat"}return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},getDocumentHeight:function(){return Math.max(!Ext.isStrict?document.body.scrollHeight:document.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return Math.max(!Ext.isStrict?document.body.scrollWidth:document.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return window.innerHeight},getViewportWidth:function(){return window.innerWidth},getViewSize:function(){return{width:window.innerWidth,height:window.innerHeight}},getOrientation:function(){if(Ext.supports.OrientationChange){return(window.orientation==0)?"portrait":"landscape"}return(window.innerHeight>window.innerWidth)?"portrait":"landscape"},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}});(function(){var g=document,a=Ext.dom.AbstractElement,e=null,d=g.compatMode=="CSS1Compat",c,b=function(i){if(!c){c=new a.Fly()}c.attach(i);return c};if(!("activeElement" in g)&&g.addEventListener){g.addEventListener("focus",function(i){if(i&&i.target){e=(i.target==g)?null:i.target}},true)}function h(j,k,i){return function(){j.selectionStart=k;j.selectionEnd=i}}a.addInheritableStatics({getActiveElement:function(){return g.activeElement||e},getRightMarginFixCleaner:function(n){var k=Ext.supports,l=k.DisplayChangeInputSelectionBug,m=k.DisplayChangeTextAreaSelectionBug,o,i,p,j;if(l||m){o=g.activeElement||e;i=o&&o.tagName;if((m&&i=="TEXTAREA")||(l&&i=="INPUT"&&o.type=="text")){if(Ext.dom.Element.isAncestor(n,o)){p=o.selectionStart;j=o.selectionEnd;if(Ext.isNumber(p)&&Ext.isNumber(j)){return h(o,p,j)}}}}return Ext.emptyFn},getViewWidth:function(i){return i?Ext.dom.Element.getDocumentWidth():Ext.dom.Element.getViewportWidth()},getViewHeight:function(i){return i?Ext.dom.Element.getDocumentHeight():Ext.dom.Element.getViewportHeight()},getDocumentHeight:function(){return Math.max(!d?g.body.scrollHeight:g.documentElement.scrollHeight,Ext.dom.Element.getViewportHeight())},getDocumentWidth:function(){return Math.max(!d?g.body.scrollWidth:g.documentElement.scrollWidth,Ext.dom.Element.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?g.documentElement.clientHeight:g.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?g.body.clientWidth:Ext.isIE?g.documentElement.clientWidth:self.innerWidth},getY:function(i){return Ext.dom.Element.getXY(i)[1]},getX:function(i){return Ext.dom.Element.getXY(i)[0]},getXY:function(k){var n=g.body,j=g.documentElement,i=0,l=0,o=[0,0],r=Math.round,m,q;k=Ext.getDom(k);if(k!=g&&k!=n){if(Ext.isIE){try{m=k.getBoundingClientRect();l=j.clientTop||n.clientTop;i=j.clientLeft||n.clientLeft}catch(p){m={left:0,top:0}}}else{m=k.getBoundingClientRect()}q=b(document).getScroll();o=[r(m.left+q.left-i),r(m.top+q.top-l)]}return o},setXY:function(j,k){(j=Ext.fly(j,"_setXY")).position();var l=j.translatePoints(k),i=j.dom.style,m;for(m in l){if(!isNaN(l[m])){i[m]=l[m]+"px"}}},setX:function(j,i){Ext.dom.Element.setXY(j,[i,false])},setY:function(i,j){Ext.dom.Element.setXY(i,[false,j])},serializeForm:function(k){var l=k.elements||(document.forms[k]||Ext.getDom(k)).elements,v=false,u=encodeURIComponent,p="",n=l.length,q,i,t,x,w,r,m,s,j;for(r=0;r<n;r++){q=l[r];i=q.name;t=q.type;x=q.options;if(!q.disabled&&i){if(/select-(one|multiple)/i.test(t)){s=x.length;for(m=0;m<s;m++){j=x[m];if(j.selected){w=j.hasAttribute?j.hasAttribute("value"):j.getAttributeNode("value").specified;p+=Ext.String.format("{0}={1}&",u(i),u(w?j.value:j.text))}}}else{if(!(/file|undefined|reset|button/i.test(t))){if(!(/radio|checkbox/i.test(t)&&!q.checked)&&!(t=="submit"&&v)){p+=u(i)+"="+u(q.value)+"&";v=/submit/i.test(t)}}}}}return p.substr(0,p.length-1)}})}());Ext.dom.AbstractElement.override({getAnchorXY:function(g,k,n){g=(g||"tl").toLowerCase();n=n||{};var j=this,a=j.dom==document.body||j.dom==document,b=n.width||a?window.innerWidth:j.getWidth(),l=n.height||a?window.innerHeight:j.getHeight(),m,c=Math.round,d=j.getXY(),i=a?0:!k?d[0]:0,h=a?0:!k?d[1]:0,e={c:[c(b*0.5),c(l*0.5)],t:[c(b*0.5),0],l:[0,c(l*0.5)],r:[b,c(l*0.5)],b:[c(b*0.5),l],tl:[0,0],bl:[0,l],br:[b,l],tr:[b,0]};m=e[g];return[m[0]+i,m[1]+h]},alignToRe:/^([a-z]+)-([a-z]+)(\?)?$/,getAlignToXY:function(e,z,i,s){s=!!s;e=Ext.get(e);i=i||[0,0];if(!z||z=="?"){z="tl-bl?"}else{if(!(/-/).test(z)&&z!==""){z="tl-"+z}}z=z.toLowerCase();var v=this,d=z.match(this.alignToRe),n=window.innerWidth,u=window.innerHeight,c="",b="",A,w,m,l,q,o,g,a,k,j,r,p,h,t;if(!d){throw"Element.alignTo with an invalid alignment "+z}c=d[1];b=d[2];t=!!d[3];A=v.getAnchorXY(c,true);w=e.getAnchorXY(b,s);m=w[0]-A[0]+i[0];l=w[1]-A[1]+i[1];if(t){r=v.getWidth();p=v.getHeight();h=e.getPageBox();a=c.charAt(0);g=c.charAt(c.length-1);j=b.charAt(0);k=b.charAt(b.length-1);o=((a=="t"&&j=="b")||(a=="b"&&j=="t"));q=((g=="r"&&k=="l")||(g=="l"&&k=="r"));if(m+r>n){m=q?h.left-r:n-r}if(m<0){m=q?h.right:0}if(l+p>u){l=o?h.top-p:u-p}if(l<0){l=o?h.bottom:0}}return[m,l]},getAnchor:function(){var b=(this.$cache||this.getCache()).data,a;if(!this.dom){return}a=b._anchor;if(!a){a=b._anchor={}}return a},adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c}});Ext.dom.AbstractElement.addMethods({appendChild:function(a){return Ext.get(a).appendTo(this)},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,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(b,g,j){var i=this,k=(g||"before").toLowerCase()=="after",d,a,c,h;if(Ext.isArray(b)){a=i;c=b.length;for(h=0;h<c;h++){d=Ext.fly(a,"_internal").insertSibling(b[h],g,j);if(k){a=d}}return d}b=b||{};if(b.nodeType||b.dom){d=i.dom.parentNode.insertBefore(Ext.getDom(b),k?i.dom.nextSibling:i.dom);if(!j){d=Ext.get(d)}}else{if(k&&!i.dom.nextSibling){d=Ext.core.DomHelper.append(i.dom.parentNode,b,!j)}else{d=Ext.core.DomHelper[k?"insertAfter":"insertBefore"](i.dom,b,!j)}}return d},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.AbstractElement.addToCache(b.isFlyweight?new Ext.dom.AbstractElement(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(a,b){var e=Ext.core.DomHelper.insertBefore(this.dom,a||{tag:"div"},!b),c=e.dom||e;c.appendChild(this.dom);return e},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});(function(){var a=Ext.dom.AbstractElement;a.override({getX:function(b){return this.getXY(b)[0]},getY:function(b){return this.getXY(b)[1]},getXY:function(){var b=window.webkitConvertPointFromNodeToPage(this.dom,new WebKitPoint(0,0));return[b.x,b.y]},getOffsetsTo:function(b){var d=this.getXY(),c=Ext.fly(b,"_internal").getXY();return[d[0]-c[0],d[1]-c[1]]},setX:function(b){return this.setXY([b,this.getY()])},setY:function(b){return this.setXY([this.getX(),b])},setLeft:function(b){this.setStyle("left",a.addUnits(b));return this},setTop:function(b){this.setStyle("top",a.addUnits(b));return this},setRight:function(b){this.setStyle("right",a.addUnits(b));return this},setBottom:function(b){this.setStyle("bottom",a.addUnits(b));return this},setXY:function(g){var c=this,e,b,d;if(arguments.length>1){g=[g,arguments[1]]}e=c.translatePoints(g);b=c.dom.style;for(d in e){if(!e.hasOwnProperty(d)){continue}if(!isNaN(e[d])){b[d]=e[d]+"px"}}return c},getLeft:function(b){return parseInt(this.getStyle("left"),10)||0},getRight:function(b){return parseInt(this.getStyle("right"),10)||0},getTop:function(b){return parseInt(this.getStyle("top"),10)||0},getBottom:function(b){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(b,i){i=isNaN(b[1])?i:b[1];b=isNaN(b[0])?b:b[0];var e=this,g=e.isStyle("position","relative"),h=e.getXY(),c=parseInt(e.getStyle("left"),10),d=parseInt(e.getStyle("top"),10);c=!isNaN(c)?c:(g?0:e.dom.offsetLeft);d=!isNaN(d)?d:(g?0:e.dom.offsetTop);return{left:(b-h[0]+c),top:(i-h[1]+d)}},setBox:function(e){var d=this,c=e.width,b=e.height,h=e.top,g=e.left;if(g!==undefined){d.setLeft(g)}if(h!==undefined){d.setTop(h)}if(c!==undefined){d.setWidth(c)}if(b!==undefined){d.setHeight(b)}return this},getBox:function(i,m){var j=this,g=j.dom,d=g.offsetWidth,n=g.offsetHeight,p,h,e,c,o,k;if(!m){p=j.getXY()}else{if(i){p=[0,0]}else{p=[parseInt(j.getStyle("left"),10)||0,parseInt(j.getStyle("top"),10)||0]}}if(!i){h={x:p[0],y:p[1],0:p[0],1:p[1],width:d,height:n}}else{e=j.getBorderWidth.call(j,"l")+j.getPadding.call(j,"l");c=j.getBorderWidth.call(j,"r")+j.getPadding.call(j,"r");o=j.getBorderWidth.call(j,"t")+j.getPadding.call(j,"t");k=j.getBorderWidth.call(j,"b")+j.getPadding.call(j,"b");h={x:p[0]+e,y:p[1]+o,0:p[0]+e,1:p[1]+o,width:d-(e+c),height:n-(o+k)}}h.left=h.x;h.top=h.y;h.right=h.x+h.width;h.bottom=h.y+h.height;return h},getPageBox:function(g){var j=this,d=j.dom,m=d.offsetWidth,i=d.offsetHeight,o=j.getXY(),n=o[1],c=o[0]+m,k=o[1]+i,e=o[0];if(!d){return new Ext.util.Region()}if(g){return new Ext.util.Region(n,c,k,e)}else{return{left:e,top:n,width:m,height:i,right:c,bottom:k}}}})}());(function(){var q=Ext.dom.AbstractElement,o=document.defaultView,n=Ext.Array,m=/^\s+|\s+$/g,b=/\w/g,p=/\s+/,t=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,h=Ext.supports.ClassList,e="padding",d="margin",s="border",k="-left",r="-right",l="-top",c="-bottom",i="-width",j={l:s+k+i,r:s+r+i,t:s+l+i,b:s+c+i},g={l:e+k,r:e+r,t:e+l,b:e+c},a={l:d+k,r:d+r,t:d+l,b:d+c};q.override({styleHooks:{},addStyles:function(B,A){var w=0,z=(B||"").match(b),y,u=z.length,x,v=[];if(u==1){w=Math.abs(parseFloat(this.getStyle(A[z[0]]))||0)}else{if(u){for(y=0;y<u;y++){x=z[y];v.push(A[x])}v=this.getStyle(v);for(y=0;y<u;y++){x=z[y];w+=Math.abs(parseFloat(v[A[x]])||0)}}}return w},addCls:h?function(x){var z=this,B=z.dom,A,y,w,u,v;if(typeof(x)=="string"){x=x.replace(m,"").split(p)}if(B&&x&&!!(u=x.length)){if(!B.className){B.className=x.join(" ")}else{A=B.classList;for(w=0;w<u;++w){v=x[w];if(v){if(!A.contains(v)){if(y){y.push(v)}else{y=B.className.replace(m,"");y=y?[y,v]:[v]}}}}if(y){B.className=y.join(" ")}}}return z}:function(v){var w=this,y=w.dom,x,u;if(y&&v&&v.length){u=Ext.Element.mergeClsList(y.className,v);if(u.changed){y.className=u.join(" ")}}return w},removeCls:function(w){var x=this,y=x.dom,u,v;if(typeof(w)=="string"){w=w.replace(m,"").split(p)}if(y&&y.className&&w&&!!(u=w.length)){if(u==1&&h){if(w[0]){y.classList.remove(w[0])}}else{v=Ext.Element.removeCls(y.className,w);if(v.changed){y.className=v.join(" ")}}}return x},radioCls:function(y){var z=this.dom.parentNode.childNodes,w,x,u;y=Ext.isArray(y)?y:[y];for(x=0,u=z.length;x<u;x++){w=z[x];if(w&&w.nodeType==1){Ext.fly(w,"_internal").removeCls(y)}}return this.addCls(y)},toggleCls:h?function(u){var v=this,w=v.dom;if(w){u=u.replace(m,"");if(u){w.classList.toggle(u)}}return v}:function(u){var v=this;return v.hasCls(u)?v.removeCls(u):v.addCls(u)},hasCls:h?function(u){var v=this.dom;return(v&&u)?v.classList.contains(u):false}:function(u){var v=this.dom;return v?u&&(" "+v.className+" ").indexOf(" "+u+" ")!=-1:false},replaceCls:function(v,u){return this.removeCls(v).addCls(u)},isStyle:function(u,v){return this.getStyle(u)==v},getStyle:function(G,B){var C=this,x=C.dom,J=typeof G!="string",H=C.styleHooks,v=G,D=v,A=1,z,I,F,E,w,u,y;if(J){F={};v=D[0];y=0;if(!(A=D.length)){return F}}if(!x||x.documentElement){return F||""}z=x.style;if(B){u=z}else{u=x.ownerDocument.defaultView.getComputedStyle(x,null);if(!u){B=true;u=z}}do{E=H[v];if(!E){H[v]=E={name:q.normalize(v)}}if(E.get){w=E.get(x,C,B,u)}else{I=E.name;w=u[I]}if(!J){return w}F[v]=w;v=D[++y]}while(y<A);return F},getStyles:function(){var v=Ext.Array.slice(arguments),u=v.length,w;if(u&&typeof v[u-1]=="boolean"){w=v.pop()}return this.getStyle(v,w)},isTransparent:function(v){var u=this.getStyle(v);return u?t.test(u):false},setStyle:function(B,z){var x=this,A=x.dom,u=x.styleHooks,w=A.style,v=B,y;if(typeof v=="string"){y=u[v];if(!y){u[v]=y={name:q.normalize(v)}}z=(z==null)?"":z;if(y.set){y.set(A,z,x)}else{w[y.name]=z}if(y.afterSet){y.afterSet(A,z,x)}}else{for(v in B){if(B.hasOwnProperty(v)){y=u[v];if(!y){u[v]=y={name:q.normalize(v)}}z=B[v];z=(z==null)?"":z;if(y.set){y.set(A,z,x)}else{w[y.name]=z}if(y.afterSet){y.afterSet(A,z,x)}}}}return x},getHeight:function(v){var w=this.dom,u=v?(w.clientHeight-this.getPadding("tb")):w.offsetHeight;return u>0?u:0},getWidth:function(u){var w=this.dom,v=u?(w.clientWidth-this.getPadding("lr")):w.offsetWidth;return v>0?v:0},setWidth:function(u){var v=this;v.dom.style.width=q.addUnits(u);return v},setHeight:function(u){var v=this;v.dom.style.height=q.addUnits(u);return v},getBorderWidth:function(u){return this.addStyles(u,j)},getPadding:function(u){return this.addStyles(u,g)},margins:a,applyStyles:function(w){if(w){var v,u,x=this.dom;if(typeof w=="function"){w=w.call()}if(typeof w=="string"){w=Ext.util.Format.trim(w).split(/\s*(?::|;)\s*/);for(v=0,u=w.length;v<u;){x.style[q.normalize(w[v++])]=w[v++]}}else{if(typeof w=="object"){this.setStyle(w)}}}},setSize:function(w,u){var x=this,v=x.dom.style;if(Ext.isObject(w)){u=w.height;w=w.width}v.width=q.addUnits(w);v.height=q.addUnits(u);return x},getViewSize:function(){var u=document,v=this.dom;if(v==u||v==u.body){return{width:q.getViewportWidth(),height:q.getViewportHeight()}}else{return{width:v.clientWidth,height:v.clientHeight}}},getSize:function(v){var u=this.dom;return{width:Math.max(0,v?(u.clientWidth-this.getPadding("lr")):u.offsetWidth),height:Math.max(0,v?(u.clientHeight-this.getPadding("tb")):u.offsetHeight)}},repaint:function(){var u=this.dom;this.addCls(Ext.baseCSSPrefix+"repaint");setTimeout(function(){Ext.fly(u).removeCls(Ext.baseCSSPrefix+"repaint")},1);return this},getMargin:function(v){var w=this,y={t:"top",l:"left",r:"right",b:"bottom"},u,z,x;if(!v){x=[];for(u in w.margins){if(w.margins.hasOwnProperty(u)){x.push(w.margins[u])}}z=w.getStyle(x);if(z&&typeof z=="object"){for(u in w.margins){if(w.margins.hasOwnProperty(u)){z[y[u]]=parseFloat(z[w.margins[u]])||0}}}return z}else{return w.addStyles.call(w,v,w.margins)}},mask:function(v,z,D){var A=this,w=A.dom,x=(A.$cache||A.getCache()).data,u=x.mask,E,C,B="",y=Ext.baseCSSPrefix;A.addCls(y+"masked");if(A.getStyle("position")=="static"){A.addCls(y+"masked-relative")}if(u){u.remove()}if(z&&typeof z=="string"){B=" "+z}else{B=" "+y+"mask-gray"}E=A.createChild({cls:y+"mask"+((D!==false)?"":(" "+y+"mask-gray")),html:v?('<div class="'+(z||(y+"mask-message"))+'">'+v+"</div>"):""});C=A.getSize();x.mask=E;if(w===document.body){C.height=window.innerHeight;if(A.orientationHandler){Ext.EventManager.unOrientationChange(A.orientationHandler,A)}A.orientationHandler=function(){C=A.getSize();C.height=window.innerHeight;E.setSize(C)};Ext.EventManager.onOrientationChange(A.orientationHandler,A)}E.setSize(C);if(Ext.is.iPad){Ext.repaint()}},unmask:function(){var v=this,x=(v.$cache||v.getCache()).data,u=x.mask,w=Ext.baseCSSPrefix;if(u){u.remove();delete x.mask}v.removeCls([w+"masked",w+"masked-relative"]);if(v.dom===document.body){Ext.EventManager.unOrientationChange(v.orientationHandler,v);delete v.orientationHandler}}});q.populateStyleMap=function(B,u){var A=["margin-","padding-","border-width-"],z=["before","after"],w,y,v,x;for(w=A.length;w--;){for(x=2;x--;){y=A[w]+z[x];B[q.normalize(y)]=B[y]={name:q.normalize(A[w]+u[x])}}}};Ext.onReady(function(){var C=Ext.supports,u,A,y,v,B;function z(H,E,G,D){var F=D[this.name]||"";return t.test(F)?"transparent":F}function x(J,G,I,F){var D=F.marginRight,E,H;if(D!="0px"){E=J.style;H=E.display;E.display="inline-block";D=(I?F:J.ownerDocument.defaultView.getComputedStyle(J,null)).marginRight;E.display=H}return D}function w(K,H,J,G){var D=G.marginRight,F,E,I;if(D!="0px"){F=K.style;E=q.getRightMarginFixCleaner(K);I=F.display;F.display="inline-block";D=(J?G:K.ownerDocument.defaultView.getComputedStyle(K,"")).marginRight;F.display=I;E()}return D}u=q.prototype.styleHooks;q.populateStyleMap(u,["left","right"]);if(C.init){C.init()}if(!C.RightMargin){u.marginRight=u["margin-right"]={name:"marginRight",get:(C.DisplayChangeInputSelectionBug||C.DisplayChangeTextAreaSelectionBug)?w:x}}if(!C.TransparentColor){A=["background-color","border-color","color","outline-color"];for(y=A.length;y--;){v=A[y];B=q.normalize(v);u[v]=u[B]={name:B,get:z}}}})}());Ext.dom.AbstractElement.override({findParent:function(h,b,a){var e=this.dom,c=document.documentElement,g=0,d;b=b||50;if(isNaN(b)){d=Ext.getDom(b);b=Number.MAX_VALUE}while(e&&e.nodeType==1&&g<b&&e!=c&&e!=d){if(Ext.DomQuery.is(e,h)){return a?Ext.get(e):e}g++;e=e.parentNode}return null},findParentNode:function(d,b,a){var c=Ext.fly(this.dom.parentNode,"_internal");return c?c.findParent(d,b,a):null},up:function(b,a){return this.findParentNode(b,a,true)},select:function(a,b){return Ext.dom.Element.select(a,this.dom,b)},query:function(a){return Ext.DomQuery.select(a,this.dom)},down:function(a,b){var c=Ext.DomQuery.selectNode(a,this.dom);return b?c:Ext.get(c)},child:function(a,b){var d,c=this,e;e=Ext.id(c.dom);e=e.replace(/[\.:]/g,"\\$0");d=Ext.DomQuery.selectNode("#"+e+" > "+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)}});(function(){var b="afterbegin",i="afterend",a="beforebegin",o="beforeend",l="<table>",h="</table>",c=l+"<tbody>",n="</tbody>"+h,k=c+"<tr>",e="</tr>"+n,p=document.createElement("div"),m=["BeforeBegin","previousSibling"],j=["AfterEnd","nextSibling"],d={beforebegin:m,afterend:j},g={beforebegin:m,afterend:j,afterbegin:["AfterBegin","firstChild"],beforeend:["BeforeEnd","lastChild"]};Ext.define("Ext.dom.Helper",{extend:"Ext.dom.AbstractHelper",tableRe:/^table|tbody|tr|td$/i,tableElRe:/td|tr|tbody/i,useDom:false,createDom:function(q,w){var r,z=document,u,x,s,y,v,t;if(Ext.isArray(q)){r=z.createDocumentFragment();for(v=0,t=q.length;v<t;v++){this.createDom(q[v],r)}}else{if(typeof q=="string"){r=z.createTextNode(q)}else{r=z.createElement(q.tag||"div");u=!!r.setAttribute;for(x in q){if(!this.confRe.test(x)){s=q[x];if(x=="cls"){r.className=s}else{if(u){r.setAttribute(x,s)}else{r[x]=s}}}}Ext.DomHelper.applyStyles(r,q.style);if((y=q.children||q.cn)){this.createDom(y,r)}else{if(q.html){r.innerHTML=q.html}}}}if(w){w.appendChild(r)}return r},ieTable:function(v,q,w,u){p.innerHTML=[q,w,u].join("");var r=-1,t=p,s;while(++r<v){t=t.firstChild}s=t.nextSibling;if(s){t=document.createDocumentFragment();while(s){t.appendChild(s);s=s.nextSibling}}return t},insertIntoTable:function(z,s,r,t){var q,w,v=s==a,y=s==b,u=s==o,x=s==i;if(z=="td"&&(y||u)||!this.tableElRe.test(z)&&(v||x)){return null}w=v?r:x?r.nextSibling:y?r.firstChild:null;if(v||x){r=r.parentNode}if(z=="td"||(z=="tr"&&(u||y))){q=this.ieTable(4,k,t,e)}else{if((z=="tbody"&&(u||y))||(z=="tr"&&(v||x))){q=this.ieTable(3,c,t,n)}else{q=this.ieTable(2,l,t,h)}}r.insertBefore(q,w);return q},createContextualFragment:function(r){var q=document.createDocumentFragment(),s,t;p.innerHTML=r;t=p.childNodes;s=t.length;while(s--){q.appendChild(t[0])}return q},applyStyles:function(q,r){if(r){q=Ext.fly(q);if(typeof r=="function"){r=r.call()}if(typeof r=="string"){r=Ext.dom.Element.parseStyles(r)}if(typeof r=="object"){q.setStyle(r)}}},createHtml:function(q){return this.markup(q)},doInsert:function(t,v,u,w,s,q){t=t.dom||Ext.getDom(t);var r;if(this.useDom){r=this.createDom(v,null);if(q){t.appendChild(r)}else{(s=="firstChild"?t:t.parentNode).insertBefore(r,t[s]||t)}}else{r=this.insertHtml(w,t,this.markup(v))}return u?Ext.get(r,true):r},overwrite:function(s,r,t){var q;s=Ext.getDom(s);r=this.markup(r);if(Ext.isIE&&this.tableRe.test(s.tagName)){while(s.firstChild){s.removeChild(s.firstChild)}if(r){q=this.insertHtml("afterbegin",s,r);return t?Ext.get(q):q}return null}s.innerHTML=r;return t?Ext.get(s.firstChild):s.firstChild},insertHtml:function(s,v,t){var x,r,u,q,w;s=s.toLowerCase();if(v.insertAdjacentHTML){if(Ext.isIE&&this.tableRe.test(v.tagName)&&(w=this.insertIntoTable(v.tagName.toLowerCase(),s,v,t))){return w}if((x=g[s])){v.insertAdjacentHTML(x[0],t);return v[x[1]]}}else{if(v.nodeType===3){s=s==="afterbegin"?"beforebegin":s;s=s==="beforeend"?"afterend":s}r=Ext.supports.CreateContextualFragment?v.ownerDocument.createRange():undefined;q="setStart"+(this.endRe.test(s)?"After":"Before");if(d[s]){if(r){r[q](v);w=r.createContextualFragment(t)}else{w=this.createContextualFragment(t)}v.parentNode.insertBefore(w,s==a?v:v.nextSibling);return v[(s==a?"previous":"next")+"Sibling"]}else{u=(s==b?"first":"last")+"Child";if(v.firstChild){if(r){r[q](v[u]);w=r.createContextualFragment(t)}else{w=this.createContextualFragment(t)}if(s==b){v.insertBefore(w,v.firstChild)}else{v.appendChild(w)}}else{v.innerHTML=t}return v[u]}}},createTemplate:function(r){var q=this.markup(r);return new Ext.Template(q)}},function(){Ext.ns("Ext.core");Ext.DomHelper=Ext.core.DomHelper=new this})}());Ext.ns("Ext.core");Ext.dom.Query=Ext.core.DomQuery=Ext.DomQuery=(function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*\\]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*\#/,isIE=window.ActiveXObject?true:false,key=30803,longHex=/\\([0-9a-fA-F]{6})/g,shortHex=/\\([0-9a-fA-F]{1,6})\s{0,1}/g,nonHex=/\\([^0-9a-fA-F]{1})/g,escapes=/\\/g,num,hasEscapes,longHexToChar=function($0,$1){return String.fromCharCode(parseInt($1,16))},shortToLongHex=function($0,$1){while($1.length<6){$1="0"+$1}return"\\"+$1},charToLongHex=function($0,$1){num=$1.charCodeAt(0).toString(16);if(num.length===1){num="0"+num}return"\\0000"+num},unescapeCssSelector=function(selector){return(hasEscapes)?selector.replace(longHex,longHexToChar):selector};eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}var result=[],ri=-1,i,ci;for(i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs,i,ni,j,ci,cn,utag,n,cj;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){utag=tagName.toUpperCase();for(i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var result=[],ri=-1,i,ci;tagName=tagName.toLowerCase();for(i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}return result}function byId(cs,id){id=unescapeCssSelector(id);if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var result=[],ri=-1,i,ci;for(i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}return result}function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=Ext.DomQuery.operators[op],a,xml,hasXml,i,ci;value=unescapeCssSelector(value);for(i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}if(!hasXml){xml=Ext.DomQuery.isXml(ci);hasXml=true}if(!xml){if(useGetStyle){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}}else{a=ci.getAttribute(attr)}if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}return result}function byPseudo(cs,name,value){value=unescapeCssSelector(value);return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r,i,len,c;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(i=1,len=cs.length;i<len;i++){c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1,d,j;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[],i,len;for(i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[],i,len;if(!len1){return c2}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}for(i=0;i<len1;i++){c1[i]._qdiff=d}for(i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){id=unescapeCssSelector(id);var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],mode,lastPath,matchers=Ext.DomQuery.matchers,matchersLn=matchers.length,modeMatch,lmode=path.match(modeRe),tokenMatch,matched,j,t,m;hasEscapes=(path.indexOf("\\")>-1);if(hasEscapes){path=path.replace(shortHex,shortToLongHex).replace(nonHex,charToLongHex).replace(escapes,"\\\\")}if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(path&&lastPath!=path){lastPath=path;tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}else{if(path.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}}while(!(modeMatch=path.match(modeRe))){matched=false;for(j=0;j<matchersLn;j++){t=matchers[j];m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=true;break}}if(!matched){Ext.Error.raise({sourceClass:"Ext.DomQuery",sourceMethod:"compile",msg:'Error parsing selector. Parsing failed at "'+path+'"'})}}if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||document;if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[],i,len,subPath,result;for(i=0,len=paths.length;i<len;i++){subPath=paths[i].replace(trimRe,"");if(!cache[subPath]){cache[subPath]=Ext.DomQuery.compile(subPath,type);if(!cache[subPath]){Ext.Error.raise({sourceClass:"Ext.DomQuery",sourceMethod:"jsSelect",msg:subPath+" is not a valid selector"})}}result=cache[subPath](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{if(root.parentNode&&(root.nodeType!==9)&&path.indexOf(",")===-1&&!startIdRe.test(path)){path="#"+Ext.escapeId(Ext.id(root))+" "+path;root=root.parentNode}return Ext.Array.toArray(root.querySelectorAll(path))}catch(e){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-\\]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w\-\\]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0,i,n,j,cn,pn;for(i=0;n=c[i];i++){pn=n.parentNode;if(batch!=pn._batch){j=0;for(cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1,i,ci,cns,j,cn,empty;for(i=0,ci;ci=c[i];i++){cns=ci.childNodes;j=0;empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if((ci.textContent||ci.innerText||ci.text||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s,i,ci,j;for(i=0;ci=c[i];i++){for(j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}());Ext.query=Ext.DomQuery.select;(function(){var HIDDEN="hidden",DOC=document,VISIBILITY="visibility",DISPLAY="display",NONE="none",XMASKED=Ext.baseCSSPrefix+"masked",XMASKEDRELATIVE=Ext.baseCSSPrefix+"masked-relative",EXTELMASKMSG=Ext.baseCSSPrefix+"mask-msg",bodyRe=/^body/i,visFly,noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1},isScrolled=function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.scrollTop>0||ci.scrollLeft>0){r[++ri]=ci}}return r},Element=Ext.define("Ext.dom.Element",{extend:"Ext.dom.AbstractElement",alternateClassName:["Ext.Element","Ext.core.Element"],addUnits:function(){return this.self.addUnits.apply(this.self,arguments)},focus:function(defer,dom){var me=this,scrollTop,body;dom=dom||me.dom;body=(dom.ownerDocument||DOC).body||DOC.body;try{if(Number(defer)){Ext.defer(me.focus,defer,me,[null,dom])}else{if(dom.offsetHeight>Element.getViewHeight()){scrollTop=body.scrollTop}dom.focus();if(scrollTop!==undefined){body.scrollTop=scrollTop}}}catch(e){}return me},blur:function(){try{this.dom.blur()}catch(e){}return this},isBorderBox:function(){var box=Ext.isBorderBox;if(box){box=!((this.dom.tagName||"").toLowerCase() in noBoxAdjust)}return box},hover:function(overFn,outFn,scope,options){var me=this;me.on("mouseenter",overFn,scope||me.dom,options);me.on("mouseleave",outFn,scope||me.dom,options);return me},getAttributeNS:function(ns,name){return this.getAttribute(name,ns)},getAttribute:(Ext.isIE&&!(Ext.isIE9&&DOC.documentMode===9))?function(name,ns){var d=this.dom,type;if(ns){type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]||null}return null}if(name==="for"){name="htmlFor"}return d[name]||null}:function(name,ns){var d=this.dom;if(ns){return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)}return d.getAttribute(name)||d[name]||null},cacheScrollValues:function(){var me=this,scrolledDescendants,el,i,scrollValues=[],result=function(){for(i=0;i<scrolledDescendants.length;i++){el=scrolledDescendants[i];el.scrollLeft=scrollValues[i][0];el.scrollTop=scrollValues[i][1]}};if(!Ext.DomQuery.pseudos.isScrolled){Ext.DomQuery.pseudos.isScrolled=isScrolled}scrolledDescendants=me.query(":isScrolled");for(i=0;i<scrolledDescendants.length;i++){el=scrolledDescendants[i];scrollValues[i]=[el.scrollLeft,el.scrollTop]}return result},autoBoxAdjust:true,isVisible:function(deep){var me=this,dom=me.dom,stopNode=dom.ownerDocument.documentElement;if(!visFly){visFly=new Element.Fly()}while(dom!==stopNode){if(!dom||dom.nodeType===11||(visFly.attach(dom)).isStyle(VISIBILITY,HIDDEN)||visFly.isStyle(DISPLAY,NONE)){return false}if(!deep){break}dom=dom.parentNode}return true},isDisplayed:function(){return !this.isStyle(DISPLAY,NONE)},enableDisplayMode:function(display){var me=this;me.setVisibilityMode(Element.DISPLAY);if(!Ext.isEmpty(display)){(me.$cache||me.getCache()).data.originalDisplay=display}return me},mask:function(msg,msgCls,elHeight){var me=this,dom=me.dom,setExpression=dom.style.setExpression,data=(me.$cache||me.getCache()).data,maskEl=data.maskEl,maskMsg=data.maskMsg;if(!(bodyRe.test(dom.tagName)&&me.getStyle("position")=="static")){me.addCls(XMASKEDRELATIVE)}if(maskEl){maskEl.remove()}if(maskMsg){maskMsg.remove()}Ext.DomHelper.append(dom,[{cls:Ext.baseCSSPrefix+"mask"},{cls:msgCls?EXTELMASKMSG+" "+msgCls:EXTELMASKMSG,cn:{tag:"div",html:msg||""}}]);maskMsg=Ext.get(dom.lastChild);maskEl=Ext.get(maskMsg.dom.previousSibling);data.maskMsg=maskMsg;data.maskEl=maskEl;me.addCls(XMASKED);maskEl.setDisplayed(true);if(typeof msg=="string"){maskMsg.setDisplayed(true);maskMsg.center(me)}else{maskMsg.setDisplayed(false)}if(!Ext.supports.IncludePaddingInWidthCalculation&&setExpression){maskEl.dom.style.setExpression("width",'this.parentNode.clientWidth + "px"')}if(!Ext.supports.IncludePaddingInHeightCalculation&&setExpression){maskEl.dom.style.setExpression("height","this.parentNode."+(dom==DOC.body?"scrollHeight":"offsetHeight")+' + "px"')}else{if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&me.getStyle("height")=="auto"){maskEl.setSize(undefined,elHeight||me.getHeight())}}return maskEl},unmask:function(){var me=this,data=(me.$cache||me.getCache()).data,maskEl=data.maskEl,maskMsg=data.maskMsg,style;if(maskEl){style=maskEl.dom.style;if(style.clearExpression){style.clearExpression("width");style.clearExpression("height")}if(maskEl){maskEl.remove();delete data.maskEl}if(maskMsg){maskMsg.remove();delete data.maskMsg}me.removeCls([XMASKED,XMASKEDRELATIVE])}},isMasked:function(){var me=this,data=(me.$cache||me.getCache()).data,maskEl=data.maskEl,maskMsg=data.maskMsg,hasMask=false;if(maskEl&&maskEl.isVisible()){if(maskMsg){maskMsg.center(me)}hasMask=true}return hasMask},createShim:function(){var el=DOC.createElement("iframe"),shim;el.frameBorder="0";el.className=Ext.baseCSSPrefix+"shim";el.src=Ext.SSL_SECURE_URL;shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},addKeyListener:function(key,fn,scope){var config;if(typeof key!="object"||Ext.isArray(key)){config={target:this,key:key,fn:fn,scope:scope}}else{config={target:this,key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}}return new Ext.util.KeyMap(config)},addKeyMap:function(config){return new Ext.util.KeyMap(Ext.apply({target:this},config))},on:function(eventName,fn,scope,options){Ext.EventManager.on(this,eventName,fn,scope||this,options);return this},un:function(eventName,fn,scope){Ext.EventManager.un(this,eventName,fn,scope||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this);return this}},function(){var EC=Ext.cache,El=this,AbstractElement=Ext.dom.AbstractElement,focusRe=/a|button|embed|iframe|img|input|object|select|textarea/i,nonSpaceRe=/\S/,scriptTagRe=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,replaceScriptTagRe=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,useDocForId=!(Ext.isIE6||Ext.isIE7||Ext.isIE8);El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';function garbageCollect(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThreadId)}else{var eid,d,o,t;for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}o=EC[eid];if(o.skipGarbageCollection){continue}d=o.dom;if(!d.parentNode||(!d.offsetParent&&!Ext.getElementById(eid))){if(d&&Ext.enableListenerCollection){Ext.EventManager.removeAll(d)}delete EC[eid]}}if(Ext.isIE){t={};for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}t[eid]=EC[eid]}EC=Ext.cache=t}}}El.collectorThreadId=setInterval(garbageCollect,30000);El.addMethods({monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this,e,eLen;function fn(e){e.stopPropagation();if(preventDefault){e.preventDefault()}}if(Ext.isArray(eventName)){eLen=eventName.length;for(e=0;e<eLen;e++){me.on(eventName[e],fn)}return me}me.on(eventName,fn);return me},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},clean:function(forceReclean){var me=this,dom=me.dom,data=(me.$cache||me.getCache()).data,n=dom.firstChild,ni=-1,nx;if(data.isCleaned&&forceReclean!==true){return me}while(n){nx=n.nextSibling;if(n.nodeType==3){if(!(nonSpaceRe.test(n.nodeValue))){dom.removeChild(n)}else{if(nx&&nx.nodeType==3){n.appendData(Ext.String.trim(nx.data));dom.removeChild(nx);nx=n.nextSibling;n.nodeIndex=++ni}}}else{Ext.fly(n).clean();n.nodeIndex=++ni}n=nx}data.isCleaned=true;return me},load:function(options){this.getLoader().load(options);return this},getLoader:function(){var me=this,data=(me.$cache||me.getCache()).data,loader=data.loader;if(!loader){data.loader=loader=new Ext.ElementLoader({target:me})}return loader},update:function(html,loadScripts,callback){var me=this,id,dom,interval;if(!me.dom){return me}html=html||"";dom=me.dom;if(loadScripts!==true){dom.innerHTML=html;Ext.callback(callback,me);return me}id=Ext.id();html+='<span id="'+id+'"></span>';interval=setInterval(function(){var hd,match,attrs,srcMatch,typeMatch,el,s;if(!(el=DOC.getElementById(id))){return false}clearInterval(interval);Ext.removeNode(el);hd=Ext.getHead().dom;while((match=scriptTagRe.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(replaceScriptTagRe,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},getScopeParent:function(){var parent=this.dom.parentNode;return Ext.scopeResetCSS?parent.parentNode:parent},needsTabIndex:function(){if(this.dom){if((this.dom.nodeName==="a")&&(!this.dom.href)){return true}return !focusRe.test(this.dom.nodeName)}},focusable:function(){var dom=this.dom,nodeName=dom.nodeName,canFocus=false;if(!dom.disabled){if(focusRe.test(nodeName)){if((nodeName!=="a")||dom.href){canFocus=true}}else{canFocus=!isNaN(dom.tabIndex)}}return canFocus&&this.isVisible(true)}});if(Ext.isIE){El.prototype.getById=function(id,asDom){var dom=this.dom,cached,el,ret;if(dom){el=(useDocForId&&DOC.getElementById(id))||dom.all[id];if(el){if(asDom){ret=el}else{cached=EC[id];if(cached&&cached.el){ret=cached.el;ret.dom=el}else{ret=new Element(el)}}return ret}}return asDom?Ext.getDom(id):El.get(id)}}El.createAlias({addListener:"on",removeListener:"un",clearListeners:"removeAllListeners"});El.Fly=AbstractElement.Fly=new Ext.Class({extend:El,constructor:function(dom){this.dom=dom},attach:AbstractElement.Fly.prototype.attach});if(Ext.isIE){Ext.getElementById=function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=AbstractElement.detachedBodyEl)){el=detachedBodyEl.dom.all[id]}return el}}else{if(!DOC.querySelector){Ext.getDetachedBody=Ext.getBody;Ext.getElementById=function(id){return DOC.getElementById(id)}}}})}());Ext.dom.Element.override((function(){var d=document,c=window,a=/^([a-z]+)-([a-z]+)(\?)?$/,b=Math.round;return{getAnchorXY:function(j,o,h){j=(j||"tl").toLowerCase();h=h||{};var m=this,i=m.dom==d.body||m.dom==d,e=h.width||i?Ext.dom.Element.getViewWidth():m.getWidth(),g=h.height||i?Ext.dom.Element.getViewHeight():m.getHeight(),q,n=m.getXY(),p=m.getScroll(),l=i?p.left:!o?n[0]:0,k=i?p.top:!o?n[1]:0;switch(j){case"tl":q=[0,0];break;case"bl":q=[0,g];break;case"tr":q=[e,0];break;case"c":q=[b(e*0.5),b(g*0.5)];break;case"t":q=[b(e*0.5),0];break;case"l":q=[0,b(g*0.5)];break;case"r":q=[e,b(g*0.5)];break;case"b":q=[b(e*0.5),g];break;case"br":q=[e,g]}return[q[0]+l,q[1]+k]},getAlignToXY:function(m,G,j){m=Ext.get(m);if(!m||!m.dom){}j=j||[0,0];G=(!G||G=="?"?"tl-bl?":(!(/-/).test(G)&&G!==""?"tl-"+G:G||"tl-bl")).toLowerCase();var H=this,l,w,q,o,k,z,A,E=Ext.dom.Element.getViewWidth()-10,i=Ext.dom.Element.getViewHeight()-10,g,h,n,p,u,v,F=d.documentElement,s=d.body,D=(F.scrollLeft||s.scrollLeft||0),B=(F.scrollTop||s.scrollTop||0),C,t,r,e=G.match(a);t=e[1];r=e[2];C=!!e[3];l=H.getAnchorXY(t,true);w=m.getAnchorXY(r,false);q=w[0]-l[0]+j[0];o=w[1]-l[1]+j[1];if(C){k=H.getWidth();z=H.getHeight();A=m.getRegion();g=t.charAt(0);h=t.charAt(t.length-1);n=r.charAt(0);p=r.charAt(r.length-1);u=((g=="t"&&n=="b")||(g=="b"&&n=="t"));v=((h=="r"&&p=="l")||(h=="l"&&p=="r"));if(q+k>E+D){q=v?A.left-k:E+D-k}if(q<D){q=v?A.right:D}if(o+z>i+B){o=u?A.top-z:i+B-z}if(o<B){o=u?A.bottom:B}}return[q,o]},anchorTo:function(g,l,h,e,o,p){var m=this,j=m.dom,n=!Ext.isEmpty(o),i=function(){Ext.fly(j).alignTo(g,l,h,e);Ext.callback(p,Ext.fly(j))},k=this.getAnchor();this.removeAnchor();Ext.apply(k,{fn:i,scroll:n});Ext.EventManager.onWindowResize(i,null);if(n){Ext.EventManager.on(c,"scroll",i,null,{buffer:!isNaN(o)?o:50})}i.call(m);return m},removeAnchor:function(){var g=this,e=this.getAnchor();if(e&&e.fn){Ext.EventManager.removeResizeListener(e.fn);if(e.scroll){Ext.EventManager.un(c,"scroll",e.fn)}delete e.fn}return g},getAlignVector:function(h,g,j){var i=this,e=i.getXY(),k=i.getAlignToXY(h,g,j);h=Ext.get(h);k[0]-=e[0];k[1]-=e[1];return k},alignTo:function(h,e,j,g){var i=this;return i.setXY(i.getAlignToXY(h,e,j),i.anim&&!!g?i.anim(g):false)},getConstrainVector:function(i,g){if(!(i instanceof Ext.util.Region)){i=Ext.get(i).getViewRegion()}var k=this.getRegion(),e=[0,0],j=this.shadow&&this.shadow.offset,h=false;if(g){k.translateBy(g[0]-k.x,g[1]-k.y)}if(j){i.adjust(0,-j,-j,j)}if(k.right>i.right){h=true;e[0]=(i.right-k.right)}if(k.left+e[0]<i.left){h=true;e[0]=(i.left-k.left)}if(k.bottom>i.bottom){h=true;e[1]=(i.bottom-k.bottom)}if(k.top+e[1]<i.top){h=true;e[1]=(i.top-k.top)}return h?e:false},getCenterXY:function(){return this.getAlignToXY(d,"c-c")},center:function(e){return this.alignTo(e||d,"c-c")}}}()));Ext.dom.Element.override({animate:function(b){var d=this,c,e,a=d.dom.id||Ext.id(d.dom);if(!Ext.fx.Manager.hasFxBlock(a)){if(b.listeners){c=b.listeners;delete b.listeners}if(b.internalListeners){b.listeners=b.internalListeners;delete b.internalListeners}e=new Ext.fx.Anim(d.anim(b));if(c){e.on(c)}Ext.fx.Manager.queueFx(e)}return d},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this,c=a.duration||Ext.fx.Anim.prototype.duration,e=a.easing||"ease",d;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));Ext.fx.Manager.setFxDefaults(b.id,{delay:0});d={target:b.dom,remove:a.remove,alternate:a.alternate||false,duration:c,easing:e,callback:a.callback,listeners:a.listeners,iterations:a.iterations||1,scope:a.scope,block:a.block,concurrent:a.concurrent,delay:a.delay||0,paused:true,keyframes:a.keyframes,from:a.from||{},to:Ext.apply({},a)};Ext.apply(d.to,a.to);delete d.to.to;delete d.to.from;delete d.to.remove;delete d.to.alternate;delete d.to.keyframes;delete d.to.iterations;delete d.to.listeners;delete d.to.target;delete d.to.paused;delete d.to.callback;delete d.to.scope;delete d.to.duration;delete d.to.easing;delete d.to.concurrent;delete d.to.block;delete d.to.stopAnimation;delete d.to.delay;return d},slideIn:function(c,b,d){var g=this,j=g.dom.style,i,a,e,h;c=c||"t";b=b||{};i=function(){var n=this,m=b.listeners,o,k,p,l;if(!d){g.fixDisplay()}o=g.getBox();if((c=="t"||c=="b")&&o.height===0){o.height=g.dom.scrollHeight}else{if((c=="l"||c=="r")&&o.width===0){o.width=g.dom.scrollWidth}}k=g.getStyles("width","height","left","right","top","bottom","position","z-index",true);g.setSize(o.width,o.height);if(b.preserveScroll){e=g.cacheScrollValues()}l=g.wrap({id:Ext.id()+"-anim-wrap-for-"+g.id,style:{visibility:d?"visible":"hidden"}});h=l.dom.parentNode;l.setPositioning(g.getPositioning());if(l.isStyle("position","static")){l.position("relative")}g.clearPositioning("auto");l.clip();if(e){e()}g.setStyle({visibility:"",position:"absolute"});if(d){l.setSize(o.width,o.height)}switch(c){case"t":p={from:{width:o.width+"px",height:"0px"},to:{width:o.width+"px",height:o.height+"px"}};j.bottom="0px";break;case"l":p={from:{width:"0px",height:o.height+"px"},to:{width:o.width+"px",height:o.height+"px"}};j.right="0px";break;case"r":p={from:{x:o.x+o.width,width:"0px",height:o.height+"px"},to:{x:o.x,width:o.width+"px",height:o.height+"px"}};break;case"b":p={from:{y:o.y+o.height,width:o.width+"px",height:"0px"},to:{y:o.y,width:o.width+"px",height:o.height+"px"}};break;case"tl":p={from:{x:o.x,y:o.y,width:"0px",height:"0px"},to:{width:o.width+"px",height:o.height+"px"}};j.bottom="0px";j.right="0px";break;case"bl":p={from:{x:o.x+o.width,width:"0px",height:"0px"},to:{x:o.x,width:o.width+"px",height:o.height+"px"}};j.right="0px";break;case"br":p={from:{x:o.x+o.width,y:o.y+o.height,width:"0px",height:"0px"},to:{x:o.x,y:o.y,width:o.width+"px",height:o.height+"px"}};break;case"tr":p={from:{y:o.y+o.height,width:"0px",height:"0px"},to:{y:o.y,width:o.width+"px",height:o.height+"px"}};j.bottom="0px";break}l.show();a=Ext.apply({},b);delete a.listeners;a=new Ext.fx.Anim(Ext.applyIf(a,{target:l,duration:500,easing:"ease-out",from:d?p.to:p.from,to:d?p.from:p.to}));a.on("afteranimate",function(){g.setStyle(k);if(d){if(b.useDisplay){g.setDisplayed(false)}else{g.hide()}}if(l.dom){if(l.dom.parentNode){l.dom.parentNode.insertBefore(g.dom,l.dom)}else{h.appendChild(g.dom)}l.remove()}if(e){e()}n.end()});if(m){a.on(m)}};g.animate({duration:b.duration?Math.max(b.duration,500)*2:1000,listeners:{beforeanimate:i}});return g},slideOut:function(a,b){return this.slideIn(a,b,true)},puff:function(e){var d=this,b,c=d.getBox(),a=d.getStyles("width","height","left","right","top","bottom","position","z-index","font-size","opacity",true);e=Ext.applyIf(e||{},{easing:"ease-out",duration:500,useDisplay:false});b=function(){d.clearOpacity();d.show();this.to={width:c.width*2,height:c.height*2,x:c.x-(c.width/2),y:c.y-(c.height/2),opacity:0,fontSize:"200%"};this.on("afteranimate",function(){if(d.dom){if(e.useDisplay){d.setDisplayed(false)}else{d.hide()}d.setStyle(a);e.callback.call(e.scope)}})};d.animate({duration:e.duration,easing:e.easing,listeners:{beforeanimate:{fn:b}}});return d},switchOff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-in",duration:500,remove:false,useDisplay:false});a=function(){var h=this,g=b.getSize(),i=b.getXY(),e,d;b.clearOpacity();b.clip();d=b.getPositioning();e=new Ext.fx.Animator({target:b,duration:c.duration,easing:c.easing,keyframes:{33:{opacity:0.3},66:{height:1,y:i[1]+g.height/2},100:{width:1,x:i[0]+g.width/2}}});e.on("afteranimate",function(){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setSize(g);h.end()})};b.animate({duration:(Math.max(c.duration,500)*2),listeners:{beforeanimate:{fn:a}}});return b},frame:function(a,d,e){var c=this,b;a=a||"#C3DAF9";d=d||1;e=e||{};b=function(){c.show();var i=this,j=c.getBox(),h=Ext.getBody().createChild({id:c.id+"-anim-proxy",style:{position:"absolute","pointer-events":"none","z-index":35000,border:"0px solid "+a}}),g;g=new Ext.fx.Anim({target:h,duration:e.duration||1000,iterations:d,from:{top:j.y,left:j.x,borderWidth:0,opacity:1,height:j.height,width:j.width},to:{top:j.y-20,left:j.x-20,borderWidth:10,opacity:0,height:j.height+40,width:j.width+40}});g.on("afteranimate",function(){h.remove();i.end()})};c.animate({duration:(Math.max(e.duration,500)*2)||2000,listeners:{beforeanimate:{fn:b}}});return c},ghost:function(a,d){var c=this,b;a=a||"b";b=function(){var h=c.getWidth(),g=c.getHeight(),i=c.getXY(),e=c.getPositioning(),j={opacity:0};switch(a){case"t":j.y=i[1]-g;break;case"l":j.x=i[0]-h;break;case"r":j.x=i[0]+h;break;case"b":j.y=i[1]+g;break;case"tl":j.x=i[0]-h;j.y=i[1]-g;break;case"bl":j.x=i[0]-h;j.y=i[1]+g;break;case"br":j.x=i[0]+h;j.y=i[1]+g;break;case"tr":j.x=i[0]+h;j.y=i[1]-g;break}this.to=j;this.on("afteranimate",function(){if(c.dom){c.hide();c.clearOpacity();c.setPositioning(e)}})};c.animate(Ext.applyIf(d||{},{duration:500,easing:"ease-out",listeners:{beforeanimate:{fn:b}}}));return c},highlight:function(d,b){var i=this,e=i.dom,k={},h,l,g,c,a,j;b=b||{};c=b.listeners||{};g=b.attr||"backgroundColor";k[g]=d||"ffff9c";if(!b.to){l={};l[g]=b.endColor||i.getColor(g,"ffffff","")}else{l=b.to}b.listeners=Ext.apply(Ext.apply({},c),{beforeanimate:function(){h=e.style[g];i.clearOpacity();i.show();a=c.beforeanimate;if(a){j=a.fn||a;return j.apply(a.scope||c.scope||window,arguments)}},afteranimate:function(){if(e){e.style[g]=h}a=c.afteranimate;if(a){j=a.fn||a;j.apply(a.scope||c.scope||window,arguments)}}});i.animate(Ext.apply({},b,{duration:1000,easing:"ease-in",from:k,to:l}));return i},pause:function(a){var b=this;Ext.fx.Manager.setFxDefaults(b.id,{delay:a});return b},fadeIn:function(b){var a=this;a.animate(Ext.apply({},b,{opacity:1,internalListeners:{beforeanimate:function(c){if(a.isStyle("display","none")){a.setDisplayed("")}else{a.show()}}}}));return this},fadeOut:function(b){var a=this;b=Ext.apply({opacity:0,internalListeners:{afteranimate:function(c){var d=a.dom;if(d&&c.to.opacity===0){if(b.useDisplay){a.setDisplayed(false)}else{a.hide()}}}}},b);a.animate(b);return a},scale:function(a,b,c){this.animate(Ext.apply({},c,{width:a,height:b}));return this},shift:function(a){this.animate(a);return this}});Ext.dom.Element.override({initDD:function(c,b,d){var a=new Ext.dd.DD(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDProxy:function(c,b,d){var a=new Ext.dd.DDProxy(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDTarget:function(c,b,d){var a=new Ext.dd.DDTarget(Ext.id(this.dom),c,b);return Ext.apply(a,d)}});(function(){var b=Ext.dom.Element,i="visibility",g="display",n="none",e="hidden",m="visible",o="offsets",j="asclass",a="nosize",c="originalDisplay",d="visibilityMode",h="isVisible",l=Ext.baseCSSPrefix+"hide-offsets",k=function(q){var r=(q.$cache||q.getCache()).data,s=r[c];if(s===undefined){r[c]=s=""}return s},p=function(r){var s=(r.$cache||r.getCache()).data,q=s[d];if(q===undefined){s[d]=q=b.VISIBILITY}return q};b.override({originalDisplay:"",visibilityMode:1,setVisible:function(u,q){var s=this,t=s.dom,r=p(s);if(typeof q=="string"){switch(q){case g:r=b.DISPLAY;break;case i:r=b.VISIBILITY;break;case o:r=b.OFFSETS;break;case a:case j:r=b.ASCLASS;break}s.setVisibilityMode(r);q=false}if(!q||!s.anim){if(r==b.DISPLAY){return s.setDisplayed(u)}else{if(r==b.OFFSETS){s[u?"removeCls":"addCls"](l)}else{if(r==b.VISIBILITY){s.fixDisplay();t.style.visibility=u?"":e}else{if(r==b.ASCLASS){s[u?"removeCls":"addCls"](s.visibilityCls||b.visibilityCls)}}}}}else{if(u){s.setOpacity(0.01);s.setVisible(true)}if(!Ext.isObject(q)){q={duration:350,easing:"ease-in"}}s.animate(Ext.applyIf({callback:function(){if(!u){s.setVisible(false).setOpacity(1)}},to:{opacity:(u)?1:0}},q))}(s.$cache||s.getCache()).data[h]=u;return s},hasMetrics:function(){var q=p(this);return this.isVisible()||(q==b.OFFSETS)||(q==b.VISIBILITY)},toggle:function(q){var r=this;r.setVisible(!r.isVisible(),r.anim(q));return r},setDisplayed:function(q){if(typeof q=="boolean"){q=q?k(this):n}this.setStyle(g,q);return this},fixDisplay:function(){var q=this;if(q.isStyle(g,n)){q.setStyle(i,e);q.setStyle(g,k(q));if(q.isStyle(g,n)){q.setStyle(g,"block")}}},hide:function(q){if(typeof q=="string"){this.setVisible(false,q);return this}this.setVisible(false,this.anim(q));return this},show:function(q){if(typeof q=="string"){this.setVisible(true,q);return this}this.setVisible(true,this.anim(q));return this}})}());(function(){var r=Ext.dom.Element,n="left",k="right",q="top",h="bottom",o="position",j="static",x="relative",p="auto",v="z-index",u="BODY",c="padding",t="border",s="-left",m="-right",a="-top",l="-bottom",g="-width",e={l:t+s+g,r:t+m+g,t:t+a+g,b:t+l+g},d={l:c+s,r:c+m,t:c+a,b:c+l},w=[d.l,d.r,d.t,d.b],b=[e.l,e.r,e.t,e.b],i=["position","top","left"];r.override({getX:function(){return r.getX(this.dom)},getY:function(){return r.getY(this.dom)},getXY:function(){return r.getXY(this.dom)},getOffsetsTo:function(y){var A=this.getXY(),z=Ext.fly(y,"_internal").getXY();return[A[0]-z[0],A[1]-z[1]]},setX:function(y,z){return this.setXY([y,this.getY()],z)},setY:function(A,z){return this.setXY([this.getX(),A],z)},setLeft:function(y){this.setStyle(n,this.addUnits(y));return this},setTop:function(y){this.setStyle(q,this.addUnits(y));return this},setRight:function(y){this.setStyle(k,this.addUnits(y));return this},setBottom:function(y){this.setStyle(h,this.addUnits(y));return this},setXY:function(A,y){var z=this;if(!y||!z.anim){r.setXY(z.dom,A)}else{if(!Ext.isObject(y)){y={}}z.animate(Ext.applyIf({to:{x:A[0],y:A[1]}},y))}return z},getLeft:function(y){return !y?this.getX():parseFloat(this.getStyle(n))||0},getRight:function(y){var z=this;return !y?z.getX()+z.getWidth():(z.getLeft(true)+z.getWidth())||0},getTop:function(y){return !y?this.getY():parseFloat(this.getStyle(q))||0},getBottom:function(y){var z=this;return !y?z.getY()+z.getHeight():(z.getTop(true)+z.getHeight())||0},translatePoints:function(z,G){var B=this,A=B.getStyle(i),C=A.position=="relative",F=parseFloat(A.left),E=parseFloat(A.top),D=B.getXY();if(Ext.isArray(z)){G=z[1];z=z[0]}if(isNaN(F)){F=C?0:B.dom.offsetLeft}if(isNaN(E)){E=C?0:B.dom.offsetTop}F=(typeof z=="number")?z-D[0]+F:undefined;E=(typeof G=="number")?G-D[1]+E:undefined;return{left:F,top:E}},setBox:function(C,D,z){var B=this,y=C.width,A=C.height;if((D&&!B.autoBoxAdjust)&&!B.isBorderBox()){y-=(B.getBorderWidth("lr")+B.getPadding("lr"));A-=(B.getBorderWidth("tb")+B.getPadding("tb"))}B.setBounds(C.x,C.y,y,A,z);return B},getBox:function(D,I){var F=this,M,z,H,C,K,A,y,L,G,J,B,E;if(!I){M=F.getXY()}else{M=F.getStyle([n,q]);M=[parseFloat(M.left)||0,parseFloat(M.top)||0]}J=F.getWidth();B=F.getHeight();if(!D){E={x:M[0],y:M[1],0:M[0],1:M[1],width:J,height:B}}else{C=F.getStyle(w);K=F.getStyle(b);A=(parseFloat(K[e.l])||0)+(parseFloat(C[d.l])||0);y=(parseFloat(K[e.r])||0)+(parseFloat(C[d.r])||0);L=(parseFloat(K[e.t])||0)+(parseFloat(C[d.t])||0);G=(parseFloat(K[e.b])||0)+(parseFloat(C[d.b])||0);E={x:M[0]+A,y:M[1]+L,0:M[0]+A,1:M[1]+L,width:J-(A+y),height:B-(L+G)}}E.right=E.x+E.width;E.bottom=E.y+E.height;return E},getPageBox:function(B){var D=this,z=D.dom,F=z.nodeName==u,G=F?Ext.dom.AbstractElement.getViewWidth():z.offsetWidth,C=F?Ext.dom.AbstractElement.getViewHeight():z.offsetHeight,I=D.getXY(),H=I[1],y=I[0]+G,E=I[1]+C,A=I[0];if(B){return new Ext.util.Region(H,y,E,A)}else{return{left:A,top:H,width:G,height:C,right:y,bottom:E}}},setLocation:function(z,B,A){return this.setXY([z,B],A)},moveTo:function(z,B,A){return this.setXY([z,B],A)},position:function(D,C,z,B){var A=this;if(!D&&A.isStyle(o,j)){A.setStyle(o,x)}else{if(D){A.setStyle(o,D)}}if(C){A.setStyle(v,C)}if(z||B){A.setXY([z||false,B||false])}},clearPositioning:function(y){y=y||"";this.setStyle({left:y,right:y,top:y,bottom:y,"z-index":"",position:j});return this},getPositioning:function(){var y=this.getStyle([n,q,o,k,h,v]);y[k]=y[n]?"":y[k];y[h]=y[q]?"":y[h];return y},setPositioning:function(y){var A=this,z=A.dom.style;A.setStyle(y);if(y.right==p){z.right=""}if(y.bottom==p){z.bottom=""}return A},move:function(H,A,B){var E=this,K=E.getXY(),I=K[0],G=K[1],C=[I-A,G],J=[I+A,G],F=[I,G-A],z=[I,G+A],D={l:C,left:C,r:J,right:J,t:F,top:F,up:F,b:z,bottom:z,down:z};H=H.toLowerCase();E.moveTo(D[H][0],D[H][1],B)},setLeftTop:function(A,z){var y=this.dom.style;y.left=r.addUnits(A);y.top=r.addUnits(z);return this},getRegion:function(){return this.getPageBox(true)},getViewRegion:function(){var C=this,A=C.dom.nodeName==u,z,F,E,D,B,y;if(A){z=C.getScroll();D=z.left;E=z.top;B=Ext.dom.AbstractElement.getViewportWidth();y=Ext.dom.AbstractElement.getViewportHeight()}else{F=C.getXY();D=F[0]+C.getBorderWidth("l")+C.getPadding("l");E=F[1]+C.getBorderWidth("t")+C.getPadding("t");B=C.getWidth(true);y=C.getHeight(true)}return new Ext.util.Region(E,D+B,E+y,D)},setBounds:function(A,E,C,z,B){var D=this;if(!B||!D.anim){D.setSize(C,z);D.setLocation(A,E)}else{if(!Ext.isObject(B)){B={}}D.animate(Ext.applyIf({to:{x:A,y:E,width:D.adjustWidth(C),height:D.adjustHeight(z)}},B))}return D},setRegion:function(z,y){return this.setBounds(z.left,z.top,z.right-z.left,z.bottom-z.top,y)}})}());Ext.dom.Element.override({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e},scrollBy:function(b,a,c){var d=this,e=d.dom;if(b.length){c=a;a=b[1];b=b[0]}else{if(typeof b!="number"){c=a;a=b.y;b=b.x}}if(b){d.scrollTo("left",Math.max(Math.min(e.scrollLeft+b,e.scrollWidth-e.clientWidth),0),c)}if(a){d.scrollTo("top",Math.max(Math.min(e.scrollTop+a,e.scrollHeight-e.clientHeight),0),c)}return d},scrollTo:function(b,d,a){var g=/top/i.test(b),c=this,h=c.dom,e={},i;if(!a||!c.anim){i="scroll"+(g?"Top":"Left");h[i]=d}else{if(!Ext.isObject(a)){a={}}e["scroll"+(g?"Top":"Left")]=d;c.animate(Ext.applyIf({to:e},a))}return c},scrollIntoView:function(b,e){b=Ext.getDom(b)||Ext.getBody().dom;var c=this.dom,h=this.getOffsetsTo(b),g=h[0]+b.scrollLeft,j=h[1]+b.scrollTop,a=j+c.offsetHeight,k=g+c.offsetWidth,n=b.clientHeight,m=parseInt(b.scrollTop,10),d=parseInt(b.scrollLeft,10),i=m+n,l=d+b.clientWidth;if(c.offsetHeight>n||j<m){b.scrollTop=j}else{if(a>i){b.scrollTop=a-n}}b.scrollTop=b.scrollTop;if(e!==false){if(c.offsetWidth>b.clientWidth||g<d){b.scrollLeft=g}else{if(k>l){b.scrollLeft=k-b.clientWidth}}b.scrollLeft=b.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.anim(d))}return c}});(function(){var p=Ext.dom.Element,m=document.defaultView,n=/table-row|table-.*-group/,a="_internal",r="hidden",o="height",g="width",e="isClipped",i="overflow",l="overflow-x",j="overflow-y",s="originalClip",b=/#document|body/i,t,d,q,h,u;if(!m||!m.getComputedStyle){p.prototype.getStyle=function(z,y){var L=this,G=L.dom,J=typeof z!="string",k=L.styleHooks,w=z,x=w,F=1,B=y,K,C,v,A,E,H,D;if(J){v={};w=x[0];D=0;if(!(F=x.length)){return v}}if(!G||G.documentElement){return v||""}C=G.style;if(y){H=C}else{H=G.currentStyle;if(!H){B=true;H=C}}do{A=k[w];if(!A){k[w]=A={name:p.normalize(w)}}if(A.get){E=A.get(G,L,B,H)}else{K=A.name;if(A.canThrow){try{E=H[K]}catch(I){E=""}}else{E=H?H[K]:""}}if(!J){return E}v[w]=E;w=x[++D]}while(D<F);return v}}p.override({getHeight:function(x,v){var w=this,z=w.dom,y=w.isStyle("display","none"),k,A;if(y){return 0}k=Math.max(z.offsetHeight,z.clientHeight)||0;if(Ext.supports.Direct2DBug){A=w.adjustDirect2DDimension(o);if(v){k+=A}else{if(A>0&&A<0.5){k++}}}if(x){k-=w.getBorderWidth("tb")+w.getPadding("tb")}return(k<0)?0:k},getWidth:function(k,z){var x=this,A=x.dom,y=x.isStyle("display","none"),w,v,B;if(y){return 0}if(Ext.supports.BoundingClientRect){w=A.getBoundingClientRect();v=w.right-w.left;v=z?v:Math.ceil(v)}else{v=A.offsetWidth}v=Math.max(v,A.clientWidth)||0;if(Ext.supports.Direct2DBug){B=x.adjustDirect2DDimension(g);if(z){v+=B}else{if(B>0&&B<0.5){v++}}}if(k){v-=x.getBorderWidth("lr")+x.getPadding("lr")}return(v<0)?0:v},setWidth:function(v,k){var w=this;v=w.adjustWidth(v);if(!k||!w.anim){w.dom.style.width=w.addUnits(v)}else{if(!Ext.isObject(k)){k={}}w.animate(Ext.applyIf({to:{width:v}},k))}return w},setHeight:function(k,v){var w=this;k=w.adjustHeight(k);if(!v||!w.anim){w.dom.style.height=w.addUnits(k)}else{if(!Ext.isObject(v)){v={}}w.animate(Ext.applyIf({to:{height:k}},v))}return w},applyStyles:function(k){Ext.DomHelper.applyStyles(this.dom,k);return this},setSize:function(w,k,v){var x=this;if(Ext.isObject(w)){v=k;k=w.height;w=w.width}w=x.adjustWidth(w);k=x.adjustHeight(k);if(!v||!x.anim){x.dom.style.width=x.addUnits(w);x.dom.style.height=x.addUnits(k)}else{if(v===true){v={}}x.animate(Ext.applyIf({to:{width:w,height:k}},v))}return x},getViewSize:function(){var w=this,x=w.dom,v=b.test(x.nodeName),k;if(v){k={width:p.getViewWidth(),height:p.getViewHeight()}}else{k={width:x.clientWidth,height:x.clientHeight}}return k},getSize:function(k){return{width:this.getWidth(k),height:this.getHeight(k)}},adjustWidth:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("lr")+v.getPadding("lr"))}return(w&&k<0)?0:k},adjustHeight:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("tb")+v.getPadding("tb"))}return(w&&k<0)?0:k},getColor:function(w,x,C){var z=this.getStyle(w),y=C||C===""?C:"#",B,k,A=0;if(!z||(/transparent|inherit/.test(z))){return x}if(/^r/.test(z)){z=z.slice(4,z.length-1).split(",");k=z.length;for(;A<k;A++){B=parseInt(z[A],10);y+=(B<16?"0":"")+B.toString(16)}}else{z=z.replace("#","");y+=z.length==3?z.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):z}return(y.length>5?y.toLowerCase():x)},setOpacity:function(v,k){var w=this;if(!w.dom){return w}if(!k||!w.anim){w.setStyle("opacity",v)}else{if(typeof k!="object"){k={duration:350,easing:"ease-in"}}w.animate(Ext.applyIf({to:{opacity:v}},k))}return w},clearOpacity:function(){return this.setOpacity("")},adjustDirect2DDimension:function(w){var B=this,v=B.dom,z=B.getStyle("display"),y=v.style.display,C=v.style.position,A=w===g?0:1,k=v.currentStyle,x;if(z==="inline"){v.style.display="inline-block"}v.style.position=z.match(n)?"absolute":"static";x=(parseFloat(k[w])||parseFloat(k.msTransformOrigin.split(" ")[A])*2)%1;v.style.position=C;if(z==="inline"){v.style.display=y}return x},clip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(!w[e]){w[e]=true;k=v.getStyle([i,l,j]);w[s]={o:k[i],x:k[l],y:k[j]};v.setStyle(i,r);v.setStyle(l,r);v.setStyle(j,r)}return v},unclip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(w[e]){w[e]=false;k=w[s];if(k.o){v.setStyle(i,k.o)}if(k.x){v.setStyle(l,k.x)}if(k.y){v.setStyle(j,k.y)}}return v},boxWrap:function(k){k=k||Ext.baseCSSPrefix+"box";var v=Ext.get(this.insertHtml("beforeBegin","<div class='"+k+"'>"+Ext.String.format(p.boxMarkup,k)+"</div>"));Ext.DomQuery.selectNode("."+k+"-mc",v.dom).appendChild(this.dom);return v},getComputedHeight:function(){var v=this,k=Math.max(v.dom.offsetHeight,v.dom.clientHeight);if(!k){k=parseFloat(v.getStyle(o))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("tb")}}return k},getComputedWidth:function(){var v=this,k=Math.max(v.dom.offsetWidth,v.dom.clientWidth);if(!k){k=parseFloat(v.getStyle(g))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("lr")}}return k},getFrameWidth:function(v,k){return(k&&this.isBorderBox())?0:(this.getPadding(v)+this.getBorderWidth(v))},addClsOnOver:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.hover(function(){if(k&&z.call(v||x,x)===false){return}Ext.fly(y,a).addCls(w)},function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnFocus:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("focus",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w)});x.on("blur",function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnClick:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("mousedown",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w);var B=Ext.getDoc(),A=function(){Ext.fly(y,a).removeCls(w);B.removeListener("mouseup",A)};B.on("mouseup",A)});return x},getStyleSize:function(){var z=this,A=this.dom,v=b.test(A.nodeName),y,k,x;if(v){return{width:p.getViewWidth(),height:p.getViewHeight()}}y=z.getStyle([o,g],true);if(y.width&&y.width!="auto"){k=parseFloat(y.width);if(z.isBorderBox()){k-=z.getFrameWidth("lr")}}if(y.height&&y.height!="auto"){x=parseFloat(y.height);if(z.isBorderBox()){x-=z.getFrameWidth("tb")}}return{width:k||z.getWidth(true),height:x||z.getHeight(true)}},selectable:function(){var k=this;k.dom.unselectable="off";k.on("selectstart",function(v){v.stopPropagation();return true});k.applyStyles("-moz-user-select: text; -khtml-user-select: text;");k.removeCls(Ext.baseCSSPrefix+"unselectable");return k},unselectable:function(){var k=this;k.dom.unselectable="on";k.swallowEvent("selectstart",true);k.applyStyles("-moz-user-select:-moz-none;-khtml-user-select:none;");k.addCls(Ext.baseCSSPrefix+"unselectable");return k}});p.prototype.styleHooks=t=Ext.dom.AbstractElement.prototype.styleHooks;if(Ext.isIE6){t.fontSize=t["font-size"]={name:"fontSize",canThrow:true}}if(Ext.isIEQuirks||Ext.isIE&&Ext.ieVersion<=8){function c(x,v,w,k){if(k[this.styleName]=="none"){return"0px"}return k[this.name]}d=["Top","Right","Bottom","Left"];q=d.length;while(q--){h=d[q];u="border"+h+"Width";t["border-"+h.toLowerCase()+"-width"]=t[u]={name:u,styleName:"border"+h+"Style",get:c}}}}());Ext.onReady(function(){var c=/alpha\(opacity=(.*)\)/i,b=/^\s+|\s+$/g,a=Ext.dom.Element.prototype.styleHooks;a.opacity={name:"opacity",afterSet:function(g,e,d){if(d.isLayer){d.onOpacitySet(e)}}};if(!Ext.supports.Opacity&&Ext.isIE){Ext.apply(a.opacity,{get:function(h){var g=h.style.filter,e,d;if(g.match){e=g.match(c);if(e){d=parseFloat(e[1]);if(!isNaN(d)){return d?d/100:0}}}return 1},set:function(h,e){var d=h.style,g=d.filter.replace(c,"").replace(b,"");d.zoom=1;if(typeof(e)=="number"&&e>=0&&e<1){e*=100;d.filter=g+(g.length?" ":"")+"alpha(opacity="+e+")"}else{d.filter=g}}})}});Ext.dom.Element.override({select:function(a){return Ext.dom.Element.select(a,false,this.dom)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:"Ext.CompositeElementLite",requires:["Ext.dom.Element"],statics:{importElementMethods:function(){var b,c=Ext.dom.Element.prototype,a=this.prototype;for(b in c){if(typeof c[b]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,b)}}}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.AbstractElement.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a)},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<d;++b){e.push(this.transformElement(c[b]))}return this},invoke:function(d,a){var g=this.elements,e=g.length,c,b;d=Ext.dom.Element.prototype[d];for(b=0;b<e;b++){c=g[b];if(c){d.apply(this.getElement(c),a)}}return this},item:function(b){var c=this.elements[b],a=null;if(c){a=this.getElement(c)}return a},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g)}}return this},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)===false){break}}}return h},fill:function(a){var b=this;b.elements=[];b.add(a);return b},filter:function(b){var h=this,c=h.elements,g=c.length,d=[],e=0,j=typeof b=="function",k,a;for(;e<g;e++){a=c[e];k=false;if(a){a=h.getElement(a);if(j){k=b.call(a,a,h,e)!==false}else{k=a.is(b)}if(k){d.push(h.transformElement(a))}}}h.elements=d;return h},indexOf:function(a){return Ext.Array.indexOf(this.elements,this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(d,b){if(!d){return this}if(typeof d=="string"){d=Ext.dom.Element.selectorFunction(d,b)}var c=this.elements,a=d.length,g;for(g=0;g<a;g++){c.push(Ext.get(d[g]))}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(e,i){e=[].concat(e);var d=this,g=d.elements,c=e.length,h,b,a;for(a=0;a<c;a++){h=e[a];if((b=(g[h]||g[h=d.indexOf(h)]))){if(i){if(b.dom){b.remove()}else{Ext.removeNode(b)}}Ext.Array.erase(g,h,1)}}return d}},function(){this.importElementMethods();this.prototype.on=this.prototype.addListener;if(Ext.DomQuery){Ext.dom.Element.selectorFunction=Ext.DomQuery.select}Ext.dom.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return new Ext.CompositeElementLite(c)};Ext.select=function(){return Ext.dom.Element.select.apply(Ext.dom.Element,arguments)}});Ext.define("Ext.dom.CompositeElement",{alternateClassName:"Ext.CompositeElement",extend:"Ext.dom.CompositeElementLite",getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}},function(){Ext.dom.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)}});Ext.select=Ext.Element.select;Ext.define("Ext.AbstractPlugin",{disabled:false,constructor:function(a){Ext.apply(this,a)},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var h=this,k=["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(p,o){return o.method.apply(this,[p].concat(o.args))},a=function(q,u){var o=[],r=0,t=q.length,s,p=u!==">";for(;r<t;r++){s=q[r];if(s.getRefItems){o=o.concat(s.getRefItems(p))}}return o},g=function(p){var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];while(!!(r=(r.ownerCt||r.floatParent))){o.push(r)}}return o},m=function(p,u,t){if(u==="*"){return p.slice()}else{var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];if(r.isXType(u,t)){o.push(r)}}return o}},j=function(p,s){var u=Ext.Array,o=[],q=0,t=p.length,r;for(;q<t;q++){r=p[q];if(r.hasCls(s)){o.push(r)}}return o},n=function(q,v,p,u){var o=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];if(!u?!!s[v]:(String(s[v])===u)){o.push(s)}}return o},d=function(p,t){var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];if(r.getItemId()===t){o.push(r)}}return o},l=function(o,p,q){return h.pseudos[p](o,q)},i=/^(\s?([>\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:m},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:l},{re:/^(?:\{([^\}]+)\})/,method:k}];h.Query=Ext.extend(Object,{constructor:function(o){o=o||{};Ext.apply(this,o)},execute:function(p){var r=this.operations,s=0,t=r.length,q,o;if(!p){o=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(p)){o=p}else{if(p.isMixedCollection){o=p.items}}}for(;s<t;s++){q=r[s];if(q.mode==="^"){o=g(o||[p])}else{if(q.mode){o=a(o||[p],q.mode)}else{o=e(o||a([p]),q)}}if(s===t-1){return o}}return[]},is:function(q){var p=this.operations,t=Ext.isArray(q)?q:[q],o=t.length,u=p[p.length-1],s,r;t=e(t,u);if(t.length===o){if(p.length>1){for(r=0,s=t.length;r<s;r++){if(Ext.Array.indexOf(this.execute(),t[r])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(u,o){var v=Ext.ComponentQuery,s=0,t=u.length,r=[],q=-1,p;for(;s<t;++s){p=u[s];if(!v.is(p,o)){r[++q]=p}}return r},last:function(o){return o[o.length-1]}},query:function(p,w){var x=p.split(","),o=x.length,q=0,r=[],y=[],v={},t,s,u;for(;q<o;q++){p=Ext.String.trim(x[q]);t=this.cache[p]||(this.cache[p]=this.parse(p));r=r.concat(t.execute(w))}if(o>1){s=r.length;for(q=0;q<s;q++){u=r[q];if(!v[u.id]){y.push(u);v[u.id]=true}}r=y}return r},is:function(p,o){if(!o){return true}var r=o.split(","),s=r.length,q=0,t;for(;q<s;q++){o=Ext.String.trim(r[q]);t=this.cache[o]||(this.cache[o]=this.parse(o));if(t.is(p)){return true}}},parse:function(r){var p=[],q=b.length,v,s,w,x,y,t,u,o;while(r&&v!==r){v=r;s=r.match(c);if(s){w=s[1];if(w==="#"){p.push({method:d,args:[Ext.String.trim(s[2])]})}else{if(w==="."){p.push({method:j,args:[Ext.String.trim(s[2])]})}else{p.push({method:m,args:[Ext.String.trim(s[2]),Boolean(s[3])]})}}r=r.replace(s[0],"")}while(!(x=r.match(i))){for(t=0;r&&t<q;t++){u=b[t];y=r.match(u.re);o=u.method;if(y){p.push({method:Ext.isString(u.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[o].concat(y.slice(1)))):u.method,args:y.slice(1)});r=r.replace(y[0],"");break}if(t===(q-1)){Ext.Error.raise('Invalid ComponentQuery selector: "'+arguments[0]+'"')}}}if(x[1]){p.push({mode:x[2]||x[1]});r=r.replace(x[0],"")}}return new h.Query({operations:p})}})});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 g=this,b=arguments,a=[],c=0,e=b.length,h;g.initialConfig={};if(e===1&&Ext.isArray(d)){b=d;e=b.length}if(e>1){for(;c<e;c++){h=b[c];if(typeof h=="object"){Ext.apply(g.initialConfig,h);Ext.apply(g,h)}else{a.push(h)}}}else{a.push(d)}g.html=a.join("");if(g.compiled){g.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,apply:function(a){var h=this,d=h.disableFormats!==true,g=Ext.util.Format,c=h,b;if(h.compiled){return h.compiled(a).join("")}function e(i,k,l,j){if(l&&d){if(j){j=[a[k]].concat(Ext.functionFactory("return ["+j+"];")())}else{j=[a[k]]}if(l.substr(0,5)=="this."){return c[l.substr(5)].apply(c,j)}else{return g[l].apply(g,j)}}else{return a[k]!==undefined?a[k]:""}}b=h.html.replace(h.re,e);return b},applyOut:function(a,b){var c=this;if(c.compiled){b.push.apply(b,c.compiled(a))}else{b.push(c.apply(a))}return b},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'];};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(b,d,a,e){var c=Ext.DomHelper.insertHtml(b,Ext.getDom(d),this.apply(a));return e?Ext.get(c):c},overwrite:function(c,a,d){var b=Ext.DomHelper.overwrite(Ext.getDom(c),this.apply(a));return d?Ext.get(b):b}});Ext.define("Ext.XTemplateParser",{constructor:function(a){Ext.apply(this,a)},doTpl:Ext.emptyFn,parse:function(l){var v=this,p=l.length,o={elseif:"elif"},q=v.topRe,c=v.actionsRe,e,d,j,n,h,k,i,u,r,b,g,a;v.level=0;v.stack=d=[];for(e=0;e<p;e=b){q.lastIndex=e;n=q.exec(l);if(!n){v.doText(l.substring(e,p));break}r=n.index;b=q.lastIndex;if(e<r){v.doText(l.substring(e,r))}if(n[1]){b=l.indexOf("%}",r+2);v.doEval(l.substring(r+2,b));b+=2}else{if(n[2]){b=l.indexOf("]}",r+2);v.doExpr(l.substring(r+2,b));b+=2}else{if(n[3]){v.doTag(n[3])}else{if(n[4]){g=null;while((u=c.exec(n[4]))!==null){j=u[2]||u[3];if(j){j=Ext.String.htmlDecode(j);h=u[1];h=o[h]||h;g=g||{};k=g[h];if(typeof k=="string"){g[h]=[k,j]}else{if(k){g[h].push(j)}else{g[h]=j}}}}if(!g){if(v.elseRe.test(n[4])){v.doElse()}else{if(v.defaultRe.test(n[4])){v.doDefault()}else{v.doTpl();d.push({type:"tpl"})}}}else{if(g["if"]){v.doIf(g["if"],g);d.push({type:"if"})}else{if(g["switch"]){v.doSwitch(g["switch"],g);d.push({type:"switch"})}else{if(g["case"]){v.doCase(g["case"],g)}else{if(g.elif){v.doElseIf(g.elif,g)}else{if(g["for"]){++v.level;if(a=v.propRe.exec(n[4])){g.propName=a[1]||a[2]}v.doFor(g["for"],g);d.push({type:"for",actions:g})}else{if(g.exec){v.doExec(g.exec,g);d.push({type:"exec",actions:g})}}}}}}}}else{if(n[0].length===5){d.push({type:"tpl"})}else{i=d.pop();v.doEnd(i.type,i.actions);if(i.type=="for"){--v.level}}}}}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]*)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.chart.Callout",{constructor:function(a){if(a.callouts){a.callouts.styles=Ext.applyIf(a.callouts.styles||{},{color:"#000",font:"11px Helvetica, sans-serif"});this.callouts=Ext.apply(this.callouts||{},a.callouts);this.calloutsArray=[]}},renderCallouts:function(){if(!this.callouts){return}var v=this,m=v.items,a=v.chart.animate,u=v.callouts,h=u.styles,e=v.calloutsArray,b=v.chart.store,s=b.getCount(),d=m.length/s,l=[],r,c,q,n,t,g,k,o;for(r=0,c=0;r<s;r++){for(q=0;q<d;q++){t=m[c];g=e[c];k=b.getAt(r);o=u.filter(k);if(!o&&!g){c++;continue}if(!g){e[c]=g=v.onCreateCallout(k,t,r,o,q,c)}for(n in g){if(g[n]&&g[n].setAttributes){g[n].setAttributes(h,true)}}if(!o){for(n in g){if(g[n]){if(g[n].setAttributes){g[n].setAttributes({hidden:true},true)}else{if(g[n].setVisible){g[n].setVisible(false)}}}}}u.renderer(g,k);v.onPlaceCallout(g,k,t,r,o,a,q,c,l);l.push(g);c++}}this.hideCallouts(c)},onCreateCallout:function(g,n,e,j){var k=this,l=k.calloutsGroup,d=k.callouts,o=d.styles,c=o.width,m=o.height,h=k.chart,b=h.surface,a={lines:false};a.lines=b.add(Ext.apply({},{type:"path",path:"M0,0",stroke:k.getLegendColor()||"#555"},o));if(d.items){a.panel=new Ext.Panel({style:"position: absolute;",width:c,height:m,items:d.items,renderTo:h.el})}return a},hideCallouts:function(b){var d=this.calloutsArray,a=d.length,e,c;while(a-->b){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});Ext.define("Ext.chart.Navigation",{constructor:function(){this.originalStore=this.store},setZoom:function(k){var j=this,g=j.axes,a=g.items,e,h,c,p=j.chartBBox,o=1/p.width,b=1/p.height,d={x:k.x*o,y:k.y*b,width:k.width*o,height:k.height*b},l,n,m;for(e=0,h=a.length;e<h;e++){c=a[e];l=c.calcEnds();if(c.position=="bottom"||c.position=="top"){n=(l.to-l.from)*d.x+l.from;m=(l.to-l.from)*d.width+n;c.minimum=n;c.maximum=m}else{m=(l.to-l.from)*(1-d.y)+l.from;n=m-(l.to-l.from)*d.height;c.minimum=n;c.maximum=m}}j.redraw(false)},restoreZoom:function(){if(this.originalStore){this.store=this.substore=this.originalStore;this.redraw(true)}}});Ext.define("Ext.chart.Shape",{singleton:true,circle:function(a,b){return a.add(Ext.apply({type:"circle",x:b.x,y:b.y,stroke:null,radius:b.radius},b))},line:function(a,b){return a.add(Ext.apply({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius/5},b))},square:function(a,b){return a.add(Ext.applyIf({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius,radius:null},b))},triangle:function(a,b){b.radius*=1.75;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(b.x,",",b.y,"m0-",b.radius*0.58,"l",b.radius*0.5,",",b.radius*0.87,"-",b.radius,",0z")},b))},diamond:function(a,c){var b=c.radius;b*=1.5;return a.add(Ext.apply({type:"path",stroke:null,path:["M",c.x,c.y-b,"l",b,b,-b,b,-b,-b,b,-b,"z"]},c))},cross:function(a,c){var b=c.radius;b=b/1.7;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b,",",c.y,"l",[-b,-b,b,-b,b,b,b,-b,b,b,-b,b,b,b,-b,b,-b,-b,-b,b,-b,-b,"z"])},c))},plus:function(a,c){var b=c.radius/1.3;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b/2,",",c.y-b/2,"l",[0,-b,b,0,0,b,b,0,0,b,-b,0,0,b,-b,0,0,-b,-b,0,0,-b,"z"])},c))},arrow:function(a,c){var b=c.radius;return a.add(Ext.apply({type:"path",path:"M".concat(c.x-b*0.7,",",c.y-b*0.4,"l",[b*0.6,0,0,-b*0.4,b,b*0.8,-b,b*0.8,0,-b*0.4,-b*0.6,0],"z")},c))},drop:function(b,a,g,e,c,d){c=c||30;d=d||0;b.add({type:"path",path:["M",a,g,"l",c,0,"A",c*0.4,c*0.4,0,1,0,a+c*0.7,g-c*0.7,"z"],fill:"#000",stroke:"none",rotate:{degrees:22.5-d,x:a,y:g}});d=(d+90)*Math.PI/180;b.add({type:"text",x:a+c*Math.sin(d)-10,y:g+c*Math.cos(d)+5,text:e,"font-size":c*12/40,stroke:"none",fill:"#fff"})}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.id){Ext.data.IdGenerator.all[b.id]=b}},getRecId:function(a){return a.modelName+"-"+a.internalId},statics:{all:{},get:function(a){var c,d,b;if(typeof a=="string"){d=b=a;a=null}else{if(a.isGenerator){return a}else{d=a.id||a.type;b=a.type}}c=this.all[d];if(!c){c=Ext.create("idgen."+b,a)}return c}}});Ext.define("Ext.data.JsonP",{singleton:true,statics:{requestCount:0,requests:{}},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);var j=this,d=Ext.isDefined(n.disableCaching)?n.disableCaching:j.disableCaching,h=n.disableCachingParam||j.disableCachingParam,c=++j.statics().requestCount,l=n.callbackName||"callback"+c,i=n.callbackKey||j.callbackKey,m=Ext.isDefined(n.timeout)?n.timeout:j.timeout,e=Ext.apply({},n.params),b=n.url,a=Ext.name,g,k;e[i]=a+".data.JsonP."+l;if(d){e[h]=new Date().getTime()}k=j.createScript(b,e,n);j.statics().requests[c]=g={url:b,params:e,script:k,id:c,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackKey:i,callbackName:l};if(m>0){g.timeout=setTimeout(Ext.bind(j.handleTimeout,j,[g]),m)}j.setupErrorHandling(g);j[l]=Ext.bind(j.handleResponse,j,[g],true);j.loadScript(g);return g},abort:function(c){var b=this,d=b.statics().requests,a;if(c){if(!c.id){c=d[c]}b.handleAbort(c)}else{for(a in d){if(d.hasOwnProperty(a)){b.abort(d[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().requests[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).remove();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType])},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",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,groupers:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(a){Ext.apply(this,a||{})},commitRecords:function(b){var g=this,h,c,d,e,a;if(!g.actionSkipSyncRe.test(g.action)){d=g.records;if(d&&d.length){if(d.length>1){h=new Ext.util.MixedCollection();h.addAll(b);for(c=d.length;c--;){a=d[c];e=h.findBy(g.matchClientRec,a);a.copyFrom(e)}}else{a=d[0];e=b[0];if(e&&(a.phantom||a.getId()===e.getId())){a.copyFrom(e)}}if(g.actionCommitRecordsRe.test(g.action)){for(c=d.length;c--;){d[c].commit()}}}}},matchClientRec:function(c){var a=this,b=a.getId();if(b&&c.getId()===b){return true}return c.internalId===a.internalId},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},getRecords:function(){var a=this.getResultSet();return this.records||(a?a.records:null)},getResultSet:function(){return this.resultSet},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},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.data.SequentialIdGenerator",{extend:"Ext.data.IdGenerator",alias:"idgen.sequential",constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.prefix,""]},prefix:"",seed:1,generate:function(){var a=this,b=a.parts;b[1]=a.seed++;return b.join("")}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,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){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.UuidGenerator",(function(){var h=Math.pow(2,14),g=Math.pow(2,16),e=Math.pow(2,28),c=Math.pow(2,32);function a(k,j){var i=k.toString(16);if(i.length>j){i=i.substring(i.length-j)}else{if(i.length<j){i=Ext.String.leftPad(i,j,"0")}}return i}function d(k,j){var i=Math.random()*(j-k+1);return Math.floor(i)+k}function b(j){if(typeof(j)=="number"){var i=Math.floor(j/c);return{lo:Math.floor(j-i*c),hi:i}}return j}return{extend:"Ext.data.IdGenerator",alias:"idgen.uuid",id:"uuid",version:4,constructor:function(){var i=this;i.callParent(arguments);i.parts=[];i.init()},generate:function(){var j=this,k=j.parts,i=j.timestamp;k[0]=a(i.lo,8);k[1]=a(i.hi&65535,4);k[2]=a(((i.hi>>>16)&4095)|(j.version<<12),4);k[3]=a(128|((j.clockSeq>>>8)&63),2)+a(j.clockSeq&255,2);k[4]=a(j.salt.hi,4)+a(j.salt.lo,8);if(j.version==4){j.init()}else{++i.lo;if(i.lo>=c){i.lo=0;++i.hi}}return k.join("-").toLowerCase()},getRecId:function(i){return i.getId()},init:function(){var j=this,i,k;if(j.version==4){j.clockSeq=d(0,h-1);i=j.salt||(j.salt={});k=j.timestamp||(j.timestamp={});i.lo=d(0,c-1);i.hi=d(0,g-1);k.lo=d(0,c-1);k.hi=d(0,e-1)}else{j.salt=b(j.salt);j.timestamp=b(j.timestamp);j.salt.hi|=256}},reconfigure:function(i){Ext.apply(this,i);this.init()}}}()));Ext.define("Ext.data.validations",{singleton:true,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",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,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&&d<c)||(a&&d>a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,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.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",defaultReaderType:"json",statics:{AUTO_ID:1000,create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return new Ext.data.association.BelongsTo(a);case"hasMany":return new Ext.data.association.HasMany(a);case"hasOne":return new Ext.data.association.HasOne(a);default:}}return a}},constructor:function(b){Ext.apply(this,b);var c=Ext.ModelManager.types,d=b.ownerModel,g=b.associatedModel,e=c[d],h=c[g],a;this.ownerModel=e;this.associatedModel=h;Ext.applyIf(this,{ownerName:d,associatedName:g});this.associationId="association"+(++this.statics().AUTO_ID)},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.data.association.BelongsTo",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.BelongsToAssociation",alias:"association.belongsto",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"BelongsToInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var b=this,a=b.foreignKey;return function(e,c,d){if(e&&e.isModel){e=e.getId()}this.set(a,e);if(Ext.isFunction(c)){c={callback:c,scope:d||this}}if(Ext.isObject(c)){return this.save(c)}}},createGetter:function(){var d=this,e=d.associatedName,g=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(k,l){k=k||{};var j=this,m=j.get(c),n,h,i;if(k.reload===true||j[a]===undefined){h=Ext.ModelManager.create({},e);h.set(b,m);if(typeof k=="function"){k={callback:k,scope:l||j}}n=k.success;k.success=function(o){j[a]=o;if(n){n.apply(this,arguments)}};g.load(m,k);j[a]=h;return h}else{h=j[a];i=[h];l=l||k.scope||j;Ext.callback(k,l,i);Ext.callback(k.success,l,i);Ext.callback(k.failure,l,i);Ext.callback(k.callback,l,i);return h}}},read:function(b,a,c){b[this.instanceName]=a.read([c]).records[0]}});Ext.define("Ext.data.association.HasOne",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasOneAssociation",alias:"association.hasone",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"HasOneInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var b=this,c=b.ownerModel,a=b.foreignKey;return function(g,d,e){if(g&&g.isModel){g=g.getId()}this.set(a,g);if(Ext.isFunction(d)){d={callback:d,scope:e||this}}if(Ext.isObject(d)){return this.save(d)}}},createGetter:function(){var d=this,g=d.ownerModel,e=d.associatedName,h=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(l,m){l=l||{};var k=this,n=k.get(c),o,i,j;if(l.reload===true||k[a]===undefined){i=Ext.ModelManager.create({},e);i.set(b,n);if(typeof l=="function"){l={callback:l,scope:m||k}}o=l.success;l.success=function(p){k[a]=p;if(o){o.call(this,arguments)}};h.load(n,l);k[a]=i;return i}else{i=k[a];j=[i];m=m||k;Ext.callback(l,m,j);Ext.callback(l.success,m,j);Ext.callback(l.failure,m,j);Ext.callback(l.callback,m,j);return i}}},read:function(c,a,e){var b=this.associatedModel.prototype.associations.findBy(function(g){return g.type==="belongsTo"&&g.associatedName===c.$className}),d=a.read([e]).records[0];c[this.instanceName]=d;if(b){d[b.instanceName]=c}}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",isWriter:true,constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,g=[];for(;d<a;d++){g.push(this.getRecordData(b[d],c))}return this.writeRecords(e,g)},getRecordData:function(g,d){var m=g.phantom===true,b=this.writeAllFields||m,c=this.nameProperty,h=g.fields,o=h.items,e={},l=g.clientIdProperty,k,a,j,n,i,p;if(b){p=o.length;for(i=0;i<p;i++){j=o[i];if(j.persist){a=j[c]||j.name;e[a]=g.get(j.name)}}}else{k=g.getChanges();for(n in k){if(k.hasOwnProperty(n)){j=h.get(n);a=j[c]||j.name;e[a]=k[n]}}}if(m){if(l&&d&&d.records.length>1){e[l]=g.internalId}}else{e[g.idProperty]=g.getId()}return e}});Ext.define("Ext.data.writer.Xml",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record",writeRecords:function(a,b){var h=this,d=[],c=0,g=b.length,j=h.documentRoot,e=h.record,m=b.length!==1,l,k;d.push(h.header||"");if(!j&&m){j=h.defaultDocumentRoot}if(j){d.push("<",j,">")}for(;c<g;++c){l=b[c];d.push("<",e,">");for(k in l){if(l.hasOwnProperty(k)){d.push("<",k,">",l[k],"</",k,">")}}d.push("</",e,">")}if(j){d.push("</",j,">")}a.xmlData=d.join("");return a}});Ext.define("Ext.direct.RemotingMethod",{constructor:function(c){var d=this,h=Ext.isDefined(c.params)?c.params:c.len,b,a,e,g;d.name=c.name;d.formHandler=c.formHandler;if(Ext.isNumber(h)){d.len=h;d.ordered=true}else{d.params=[];a=h.length;for(e=0;e<a;e++){g=h[e];b=Ext.isObject(g)?g.name:g;d.params.push(b)}}},getArgs:function(e,b,g){var c=[],d,a;if(this.ordered){if(this.len>0){if(b){for(d=0,a=b.length;d<a;d++){c.push(e[b[d]])}}else{if(g){c.push(e)}}}}else{c.push(e)}return c},getCallData:function(c){var e=this,g=null,a=e.len,h=e.params,i,d,b;if(e.ordered){i=c[a];d=c[a+1];if(a!==0){g=c.slice(0,a)}}else{g=Ext.apply({},c[0]);i=c[1];d=c[2];for(b in g){if(g.hasOwnProperty(b)){if(!Ext.Array.contains(h,b)){delete g[b]}}}}return{data:g,callback:i,scope:d}}});Ext.define("Ext.direct.Transaction",{alias:"direct.transaction",alternateClassName:"Ext.Direct.Transaction",statics:{TRANSACTION_ID:0},constructor:function(a){var b=this;Ext.apply(b,a);b.id=b.tid=++b.self.TRANSACTION_ID;b.retryCount=0},send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var j=this,a=j.r/255,i=j.g/255,k=j.b/255,m=Math.max(a,i,k),d=Math.min(a,i,k),n=m-d,e,o=0,c=0.5*(m+d);if(d!=m){o=(c<0.5)?n/(m+d):n/(2-m-d);if(a==m){e=60*(i-k)/n}else{if(i==m){e=120+60*(k-a)/n}else{e=240+60*(a-i)/n}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,o,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var h=this,c=Math.round,e=c(h.r).toString(16),d=c(h.g).toString(16),a=c(h.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b),g,d,a,c;if(Ext.isArray(e)){g=parseInt(e[2],10);d=parseInt(e[3],10);a=parseInt(e[4],10);c=a|(d<<8)|(g<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return b}},fromString:function(i){var c,e,d,a,h=parseInt;if((i.length==4||i.length==7)&&i.substr(0,1)==="#"){c=i.match(this.hexRe);if(c){e=h(c[1],16)>>0;d=h(c[2],16)>>0;a=h(c[3],16)>>0;if(i.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=i.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:new Ext.draw.Color(e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(g,o,d){var a,b,c,e,k=[],n=Math.abs,j=Math.floor;if(o==0||g==null){k=[d,d,d]}else{g/=60;a=o*(1-n(2*d-1));b=a*(1-n(g-2*j(g/2)-1));c=d-a/2;switch(j(g)){case 0:k=[a,b,0];break;case 1:k=[b,a,0];break;case 2:k=[0,a,b];break;case 3:k=[0,b,a];break;case 4:k=[b,0,a];break;case 5:k=[a,0,b];break}k=[k[0]+c,k[1]+c,k[2]+c]}return new Ext.draw.Color(k[0]*255,k[1]*255,k[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}L{2},{1},{2},{3},{0},{3}z",a.x,a.y,a.width+a.x,a.height+a.y)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(a){return a.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(g,e,j){var i=[],h=e.toLowerCase();j.replace(b.pathValuesRE,function(l,k){k&&i.push(+k)});if(h=="m"&&i.length>2){c.push([e].concat(Ext.Array.splice(i,0,2)));h="l";e=(e=="m")?"l":"L"}while(i.length>=d[h]){c.push([e].concat(Ext.Array.splice(i,0,d[h])));if(!d[h]){break}}})}c.toString=b.path2string;return c},mapPath:function(l,g){if(!g){return l}var h,e,c,k,a,d,b;l=this.path2curve(l);for(c=0,k=l.length;c<k;c++){b=l[c];for(a=1,d=b.length;a<d-1;a+=2){h=g.x(b[a],b[a+1]);e=g.y(b[a],b[a+1]);b[a]=h;b[a+1]=e}}return l},pathClone:function(g){var c=[],a,e,b,d;if(!this.is(g,"array")||!this.is(g&&g[0],"array")){g=this.parsePathString(g)}for(b=0,d=g.length;b<d;b++){c[b]=[];for(a=0,e=g[b].length;a<e;a++){c[b][a]=g[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(c){if(!this.is(c,"array")||!this.is(c&&c[0],"array")){c=this.parsePathString(c)}var k=[],m=0,l=0,o=0,n=0,g=0,h=c.length,b,d,e,a;if(h&&c[0][0]=="M"){m=+c[0][1];l=+c[0][2];o=m;n=l;g++;k[0]=["M",m,l]}for(;g<h;g++){b=k[g]=[];d=c[g];if(d[0]!=d[0].toUpperCase()){b[0]=d[0].toUpperCase();switch(b[0]){case"A":b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=+(d[6]+m);b[7]=+(d[7]+l);break;case"V":b[1]=+d[1]+l;break;case"H":b[1]=+d[1]+m;break;case"M":o=+d[1]+m;n=+d[2]+l;default:e=1;a=d.length;for(;e<a;e++){b[e]=+d[e]+((e%2)?m:l)}}}else{e=0;a=d.length;for(;e<a;e++){k[g][e]=d[e]}}switch(b[0]){case"Z":m=o;l=n;break;case"H":m=b[1];break;case"V":l=b[1];break;case"M":d=k[g];a=d.length;o=d[a-2];n=d[a-1];default:d=k[g];a=d.length;m=d[a-2];l=d[a-1]}}k.toString=this.path2string;return k},pathToRelative:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var n=[],p=0,o=0,t=0,s=0,c=0,a,q,h,g,e,m,u,l,b;if(d[0][0]=="M"){p=d[0][1];o=d[0][2];t=p;s=o;c++;n.push(["M",p,o])}for(h=c,u=d.length;h<u;h++){a=n[h]=[];q=d[h];if(q[0]!=q[0].toLowerCase()){a[0]=q[0].toLowerCase();switch(a[0]){case"a":a[1]=q[1];a[2]=q[2];a[3]=q[3];a[4]=q[4];a[5]=q[5];a[6]=+(q[6]-p).toFixed(3);a[7]=+(q[7]-o).toFixed(3);break;case"v":a[1]=+(q[1]-o).toFixed(3);break;case"m":t=q[1];s=q[2];default:for(g=1,l=q.length;g<l;g++){a[g]=+(q[g]-((g%2)?p:o)).toFixed(3)}}}else{a=n[h]=[];if(q[0]=="m"){t=q[1]+p;s=q[2]+o}for(e=0,b=q.length;e<b;e++){n[h][e]=q[e]}}m=n[h].length;switch(n[h][0]){case"z":p=t;o=s;break;case"h":p+=+n[h][m-1];break;case"v":o+=+n[h][m-1];break;default:p+=+n[h][m-2];o+=+n[h][m-1]}}n.toString=this.path2string;return n},path2curve:function(k){var d=this,h=d.pathToAbsolute(k),c=h.length,j={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,g,e;for(b=0;b<c;b++){h[b]=d.command2curve(h[b],j);if(h[b].length>7){h[b].shift();e=h[b];while(e.length){Ext.Array.splice(h,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(h,b,1);c=h.length;b--}a=h[b];g=a.length;j.x=a[g-2];j.y=a[g-1];j.bx=parseFloat(a[g-4])||j.x;j.by=parseFloat(a[g-3])||j.y}return h},interpolatePaths:function(r,l){var j=this,d=j.pathToAbsolute(r),m=j.pathToAbsolute(l),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,s){if(p[s].length>7){p[s].shift();var t=p[s];while(t.length){Ext.Array.splice(p,s++,0,["C"].concat(Ext.Array.splice(t,0,6)))}Ext.Array.erase(p,s,1);o=Math.max(d.length,m.length||0)}},c=function(v,u,s,p,t){if(v&&u&&v[t][0]=="M"&&u[t][0]!="M"){Ext.Array.splice(u,t,0,["M",p.x,p.y]);s.bx=0;s.by=0;s.x=v[t][1];s.y=v[t][2];o=Math.max(d.length,m.length||0)}},h,o,g,q,e,k;for(h=0,o=Math.max(d.length,m.length||0);h<o;h++){d[h]=j.command2curve(d[h],n);b(d,h);(m[h]=j.command2curve(m[h],a));b(m,h);c(d,m,n,a,h);c(m,d,a,n,h);g=d[h];q=m[h];e=g.length;k=q.length;n.x=g[e-2];n.y=g[e-1];n.bx=parseFloat(g[e-4])||n.x;n.by=parseFloat(g[e-3])||n.y;a.bx=(parseFloat(q[k-4])||a.x);a.by=(parseFloat(q[k-3])||a.y);a.x=q[k-2];a.y=q[k-1]}return[d,m]},command2curve:function(c,b){var a=this;if(!c){return["C",b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!="T"&&c[0]!="Q"){b.qx=b.qy=null}switch(c[0]){case"M":b.X=c[1];b.Y=c[2];break;case"A":c=["C"].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case"S":c=["C",b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=["C"].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case"Q":b.qx=c[1];b.qy=c[2];c=["C"].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case"L":c=["C"].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case"H":c=["C"].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case"V":c=["C"].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case"Z":c=["C"].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,h,e,a,c){var g=1/3,i=2/3;return[g*b+i*h,g*d+i*e,g*a+i*h,g*c+i*e,a,c]},rotate:function(b,h,a){var d=Math.cos(a),c=Math.sin(a),g=b*d-h*c,e=b*c+h*d;return{x:g,y:e}},arc2curve:function(v,ah,J,H,B,o,j,u,ag,C){var z=this,e=Math.PI,A=z.radian,G=e*120/180,b=A*(+B||0),O=[],L=Math,V=L.cos,a=L.sin,X=L.sqrt,w=L.abs,p=L.asin,K,c,r,Q,P,ac,d,T,W,E,D,n,m,s,l,af,g,ae,R,U,S,ad,ab,aa,Y,N,Z,M,F,I,q;if(!C){K=z.rotate(v,ah,-b);v=K.x;ah=K.y;K=z.rotate(u,ag,-b);u=K.x;ag=K.y;c=V(A*B);r=a(A*B);Q=(v-u)/2;P=(ah-ag)/2;ac=(Q*Q)/(J*J)+(P*P)/(H*H);if(ac>1){ac=X(ac);J=ac*J;H=ac*H}d=J*J;T=H*H;W=(o==j?-1:1)*X(w((d*T-d*P*P-T*Q*Q)/(d*P*P+T*Q*Q)));E=W*J*P/H+(v+u)/2;D=W*-H*Q/J+(ah+ag)/2;n=p(((ah-D)/H).toFixed(7));m=p(((ag-D)/H).toFixed(7));n=v<E?e-n:n;m=u<E?e-m:m;if(n<0){n=e*2+n}if(m<0){m=e*2+m}if(j&&n>m){n=n-e*2}if(!j&&m>n){m=m-e*2}}else{n=C[0];m=C[1];E=C[2];D=C[3]}s=m-n;if(w(s)>G){F=m;I=u;q=ag;m=n+G*(j&&m>n?1:-1);u=E+J*V(m);ag=D+H*a(m);O=z.arc2curve(u,ag,J,H,B,0,j,I,q,[m,F,E,D])}s=m-n;l=V(n);af=a(n);g=V(m);ae=a(m);R=L.tan(s/4);U=4/3*J*R;S=4/3*H*R;ad=[v,ah];ab=[v+U*af,ah-S*l];aa=[u+U*ae,ag-S*g];Y=[u,ag];ab[0]=2*ad[0]-ab[0];ab[1]=2*ad[1]-ab[1];if(C){return[ab,aa,Y].concat(O)}else{O=[ab,aa,Y].concat(O).join().split(",");N=[];M=O.length;for(Z=0;Z<M;Z++){N[Z]=Z%2?z.rotate(O[Z-1],O[Z],b).y:z.rotate(O[Z],O[Z+1],b).x}return N}},rotateAndTranslatePath:function(k){var c=k.rotation.degrees,d=k.rotation.x,b=k.rotation.y,o=k.translation.x,l=k.translation.y,n,g,a,m,e,h=[];if(!c&&!o&&!l){return this.pathToAbsolute(k.attr.path)}o=o||0;l=l||0;n=this.pathToAbsolute(k.attr.path);for(g=n.length;g--;){a=h[g]=n[g].slice();if(a[0]=="A"){m=this.rotatePoint(a[6],a[7],c,d,b);a[6]=m.x+o;a[7]=m.y+l}else{e=1;while(a[e+1]!=null){m=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=m.x+o;a[e+1]=m.y+l;e+=2}}}return h},rotatePoint:function(b,h,e,a,g){if(!e){return{x:b,y:h}}a=a||0;g=g||0;b=b-a;h=h-g;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-h*c+a,y:b*c+h*d+g}},pathDimensions:function(m){if(!m||!(m+"")){return{x:0,y:0,width:0,height:0}}m=this.path2curve(m);var k=0,j=0,d=[],b=[],e=0,h=m.length,c,a,l,g;for(;e<h;e++){c=m[e];if(c[0]=="M"){k=c[1];j=c[2];d.push(k);b.push(j)}else{g=this.curveDim(k,j,c[1],c[2],c[3],c[4],c[5],c[6]);d=d.concat(g.min.x,g.max.x);b=b.concat(g.min.y,g.max.y);k=c[5];j=c[6]}}a=Math.min.apply(0,d);l=Math.min.apply(0,b);return{x:a,y:l,path:m,width:Math.max.apply(0,d)-a,height:Math.max.apply(0,b)-l}},intersectInside:function(b,c,a){return(a[0]-c[0])*(b[1]-c[1])>(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(n,m,g,d){var c=[],b=g[0]-d[0],a=g[1]-d[1],k=n[0]-m[0],i=n[1]-m[1],l=g[0]*d[1]-g[1]*d[0],j=n[0]*m[1]-n[1]*m[0],h=1/(b*i-a*k);c[0]=(l*k-j*b)*h;c[1]=(l*i-j*a)*h;return c},intersect:function(o,c){var n=this,k=0,m=c.length,h=c[m-1],q=o,g,r,l,p,a,b,d;for(;k<m;++k){g=c[k];b=q;q=[];r=b[b.length-1];d=0;a=b.length;for(;d<a;d++){l=b[d];if(n.intersectInside(l,h,g)){if(!n.intersectInside(r,h,g)){q.push(n.intersectIntersection(r,l,h,g))}q.push(l)}else{if(n.intersectInside(r,h,g)){q.push(n.intersectIntersection(r,l,h,g))}}r=l}h=g}return q},bezier:function(h,g,m,l,e){if(e===0){return h}else{if(e===1){return l}}var j=1-e,i=j*j*j,k=e/j;return i*(h+k*(3*g+k*(3*m+l*k)))},bezierDim:function(t,q,n,m){var v=[],g,j,p,h,u,e,w,k,o,l;if(t+3*n==m+3*q){g=t-q;g/=2*(t-q-q+n);if(g<1&&g>0){v.push(g)}}else{j=t-3*q+3*n-m;p=2*(t-q-q+n);h=t-q;u=p*p-4*j*h;e=j+j;if(u===0){g=p/e;if(g<1&&g>0){v.push(g)}}else{if(u>0){w=Math.sqrt(u);g=(w+p)/e;if(g<1&&g>0){v.push(g)}g=(p-w)/e;if(g<1&&g>0){v.push(g)}}}}k=Math.min(t,m);o=Math.max(t,m);for(l=0;l<v.length;l++){k=Math.min(k,this.bezier(t,q,n,m,v[l]));o=Math.max(o,this.bezier(t,q,n,m,v[l]))}return[k,o]},curveDim:function(b,a,d,c,k,j,h,e){var i=this.bezierDim(b,d,k,h),g=this.bezierDim(a,c,j,e);return{min:{x:i[0],y:g[0]},max:{x:i[1],y:g[1]}}},getAnchors:function(e,d,k,j,v,u,q){q=q||4;var i=Math,p=i.PI,r=p/2,m=i.abs,a=i.sin,b=i.cos,g=i.atan,t,s,h,l,o,n,x,w,c;t=(k-e)/q;s=(v-k)/q;if((j>=d&&j>=u)||(j<=d&&j<=u)){h=l=r}else{h=g((k-e)/m(j-d));if(d<j){h=p-h}l=g((v-k)/m(j-u));if(u<j){l=p-l}}c=r-((h+l)%(p*2))/2;if(c>r){c-=p}h+=c;l+=c;o=k-t*a(h);n=j+t*b(h);x=k+s*a(l);w=j+s*b(l);if((j>d&&n<d)||(j<d&&n>d)){o+=m(d-n)*(o-k)/(n-j);n=d}if((j>u&&w<u)||(j<u&&w>u)){x-=m(u-w)*(x-k)/(w-j);w=u}return{x1:o,y1:n,x2:x,y2:w}},smooth:function(a,r){var q=this.path2curve(a),e=[q[0]],k=q[0][1],h=q[0][2],s,u,v=1,l=q.length,g=1,n=k,m=h,c=0,b=0,A,z,w,o,t,p,d;for(;v<l;v++){A=q[v];z=A.length;w=q[v-1];o=w.length;t=q[v+1];p=t&&t.length;if(A[0]=="M"){n=A[1];m=A[2];s=v+1;while(q[s][0]!="C"){s++}c=q[s][5];b=q[s][6];e.push(["M",n,m]);g=e.length;k=n;h=m;continue}if(A[z-2]==n&&A[z-1]==m&&(!t||t[0]=="M")){d=e[g].length;u=this.getAnchors(w[o-2],w[o-1],n,m,e[g][d-2],e[g][d-1],r);e[g][1]=u.x2;e[g][2]=u.y2}else{if(!t||t[0]=="M"){u={x1:A[z-2],y1:A[z-1]}}else{u=this.getAnchors(w[o-2],w[o-1],A[z-2],A[z-1],t[p-2],t[p-1],r)}}e.push(["C",k,h,u.x1,u.y1,A[z-2],A[z-1]]);k=u.x2;h=u.y2}return e},findDotAtSegment:function(b,a,d,c,j,i,h,g,k){var e=1-k;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*k*d+e*3*k*k*j+Math.pow(k,3)*h,y:Math.pow(e,3)*a+Math.pow(e,2)*3*k*c+e*3*k*k*i+Math.pow(k,3)*g}},snapEnds:function(r,s,d,n){if(Ext.isDate(r)){return this.snapEndsByDate(r,s,d)}var c=(s-r)/d,a=Math.floor(Math.log(c)/Math.LN10)+1,e=Math.pow(10,a),t,p=Math.round((c%e)*Math.pow(10,2-a)),b=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],h=0,q,k,j,g,l=1000000000,o=b.length;t=r=Math.floor(r/e)*e;if(n){for(j=0;j<o;j++){q=b[j][0];k=(q-p)<0?1000000:(q-p)/b[j][1];if(k<l){g=q;l=k}}c=Math.floor(c*Math.pow(10,-a))*Math.pow(10,a)+g*Math.pow(10,a-2);while(t<s){t+=c;h++}s=+t.toFixed(10)}else{h=d}return{from:r,to:s,power:a,step:c,steps:h}},snapEndsByDate:function(k,l,b,m){var e=false,h=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],g=h.length,i=false,c,d,a,n;for(n=0;n<g;n++){c=h[n];if(!i){for(d=0;d<c[1].length;d++){if(l<Ext.Date.add(k,c[0],c[1][d]*b)){e=[c[0],c[1][d]];i=true;break}}}}if(!e){a=this.snapEnds(k.getFullYear(),l.getFullYear()+1,b,m);e=[Date.YEAR,Math.round(a.step)]}return this.snapEndsByDateAndStep(k,l,e,m)},snapEndsByDateAndStep:function(i,h,e,a){var d=[i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()],b=0,g,c;if(a){g=i}else{switch(e[0]){case Ext.Date.MILLI:g=new Date(d[0],d[1],d[2],d[3],d[4],d[5],Math.floor(d[6]/e[1])*e[1]);break;case Ext.Date.SECOND:g=new Date(d[0],d[1],d[2],d[3],d[4],Math.floor(d[5]/e[1])*e[1],0);break;case Ext.Date.MINUTE:g=new Date(d[0],d[1],d[2],d[3],Math.floor(d[4]/e[1])*e[1],0,0);break;case Ext.Date.HOUR:g=new Date(d[0],d[1],d[2],Math.floor(d[3]/e[1])*e[1],0,0,0);break;case Ext.Date.DAY:g=new Date(d[0],d[1],Math.floor(d[2]-1/e[1])*e[1]+1,0,0,0,0);break;case Ext.Date.MONTH:g=new Date(d[0],Math.floor(d[1]/e[1])*e[1],1,0,0,0,0);break;default:g=new Date(Math.floor(d[0]/e[1])*e[1],0,1,0,0,0,0);break}}c=g;while(c<h){c=Ext.Date.add(c,e[0],e[1]);b++}if(a){c=h}return{from:+g,to:+c,step:(c-g)/b,steps:b}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a>=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(k){var e=this,g=k.type||"linear",c=k.angle||0,i=e.radian,l=k.stops,a=[],j,b,h,d;if(g=="linear"){b=[0,0,Math.cos(c*i),Math.sin(c*i)];h=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=h;b[3]*=h;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(j in l){if(l.hasOwnProperty(j)&&e.stopsRE.test(j)){d={offset:parseInt(j,10),color:Ext.draw.Color.toHex(l[j].color)||"#ffffff",opacity:l[j].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(g=="linear"){return{id:k.id,type:g,vector:b,stops:a}}else{return{id:k.id,type:g,centerX:k.centerX,centerY:k.centerY,focalX:k.focalX,focalY:k.focalY,radius:k.radius,vector:b,stops:a}}}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(1,0,0,1,a,d);c.add(b,0,0,e,0,0);c.add(1,0,0,1,-a,-d)},rotate:function(c,b,h){c=Ext.draw.Draw.rad(c);var e=this,g=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(g,d,-d,g,b,h);e.add(1,0,0,1,-b,-h)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(b,a){var c=this;b=b||0;a=a||0;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', filterType='bilinear', M11="+c.get(0,0)+", M12="+c.get(0,1)+", M21="+c.get(1,0)+", M22="+c.get(1,1)+", Dx="+(c.get(0,2)+b)+", Dy="+(c.get(1,2)+a)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(g){return g[0]*g[0]+g[1]*g[1]}function b(g){var h=Math.sqrt(d(g));g[0]/=h;g[1]/=h}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][1],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.engine.ImageExporter",{singleton:true,statics:(function(){var d={"image/png":1,"image/jpeg":1},l=function(m){if(m.hasOwnProperty("width")){b=m.width}if(m.hasOwnProperty("height")){i=m.height}if(m.hasOwnProperty("type")&&d[m.type]){e=m.type}else{return false}if(k&&j&&a&&g&&h){return true}k=k||Ext.get(document.createElement("form"));k.set({action:"http://svg.sencha.io",method:"POST"});j=j||Ext.get(document.createElement("input"));j.set({name:"svg",type:"hidden"});a=a||Ext.get(document.createElement("input"));a.set({name:"type",type:"hidden"});g=g||Ext.get(document.createElement("input"));g.set({name:"width",type:"hidden"});h=h||Ext.get(document.createElement("input"));h.set({name:"height",type:"hidden"});k.appendChild(j);k.appendChild(a);k.appendChild(g);k.appendChild(h);Ext.getBody().appendChild(k);return true},c=function(m){var n=Ext.draw.engine.SvgExporter.self.generate({},m);g.set({value:b||m.width});h.set({value:i||m.height});if(e){a.set({value:e})}j.set({value:n});k.dom.submit()},k,a,j,g,h,e,b,i;return{generate:function(n,m){if(l(n)){c(m)}else{return false}}}}())});Ext.define("Ext.draw.engine.SvgExporter",{singleton:true,statics:(function(){var d,e,c,i,j=function(k){d=k;e=d.length;c=d.width;i=d.height},g={path:function(n){var k=n.attr,r=k.path,m="",o,q,l;if(Ext.isArray(r[0])){l=r.length;for(q=0;q<l;q++){m+=r[q].join(" ")}}else{if(Ext.isArray(r)){m=r.join(" ")}else{m=r.replace(/,/g," ")}}o=b({d:m,fill:k.fill||"none",stroke:k.stroke,"fill-opacity":k.opacity,"stroke-width":k["stroke-width"],"stroke-opacity":k["stroke-opacity"],"z-index":k.zIndex,transform:n.matrix.toSvg()});return"<path "+o+"/>"},text:function(r){var o=r.attr,k=/(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)\s('*.*'*)/,n=k.exec(o.font),t=(n&&n[1])||"12",m=(n&&n[3])||"Arial",s=o.text,q=(Ext.isFF3_0||Ext.isFF3_5)?2:4,l="",p;r.getBBox();l+='<tspan x="'+(o.x||"")+'" dy="';l+=(t/q)+'">';l+=Ext.htmlEncode(s)+"</tspan>";p=b({x:o.x,y:o.y,"font-size":t,"font-family":m,"font-weight":o["font-weight"],"text-anchor":o["text-anchor"],fill:o.fill||"#000","fill-opacity":o.opacity,transform:r.matrix.toSvg()});return"<text "+p+">"+l+"</text>"},rect:function(l){var k=l.attr,m=b({x:k.x,y:k.y,rx:k.rx,ry:k.ry,width:k.width,height:k.height,fill:k.fill||"none","fill-opacity":k.opacity,stroke:k.stroke,"stroke-opacity":k["stroke-opacity"],"stroke-width":k["stroke-width"],transform:l.matrix&&l.matrix.toSvg()});return"<rect "+m+"/>"},circle:function(l){var k=l.attr,m=b({cx:k.x,cy:k.y,r:k.radius,fill:k.translation.fill||k.fill||"none","fill-opacity":k.opacity,stroke:k.stroke,"stroke-opacity":k["stroke-opacity"],"stroke-width":k["stroke-width"],transform:l.matrix.toSvg()});return"<circle "+m+" />"},image:function(l){var k=l.attr,m=b({x:k.x-(k.width/2>>0),y:k.y-(k.height/2>>0),width:k.width,height:k.height,"xlink:href":k.src,transform:l.matrix.toSvg()});return"<image "+m+" />"}},a=function(){var k='<?xml version="1.0" standalone="yes"?>';k+='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return k},h=function(){var t='<svg width="'+c+'px" height="'+i+'px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">',m="",E,C,s,n,D,G,w,u,q,v,y,l,H,r,B,z,F,A,p,o;s=d.items.items;C=s.length;D=function(K){var R=K.childNodes,O=R.length,N=0,L,M,k="",I,Q,J,P;for(;N<O;N++){I=R[N];Q=I.attributes;J=I.tagName;k+="<"+J;for(M=0,L=Q.length;M<L;M++){P=Q.item(M);k+=" "+P.name+'="'+P.value+'"'}k+=">";if(I.childNodes.length>0){k+=D(I)}k+="</"+J+">"}return k};if(d.getDefs){m=D(d.getDefs())}else{u=d.gradientsColl;if(u){q=u.keys;v=u.items;y=0;l=q.length}for(;y<l;y++){H=q[y];r=v[y];n=d.gradientsColl.getByKey(H);m+='<linearGradient id="'+H+'" x1="0" y1="0" x2="1" y2="1">';var x=n.colors.replace(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,"rgb($1|$2|$3)");x=x.replace(/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,([\d\.]+)\)/g,"rgba($1|$2|$3|$4)");G=x.split(",");for(B=0,F=G.length;B<F;B++){w=G[B].split(" ");x=Ext.draw.Color.fromString(w[1].replace(/\|/g,","));m+='<stop offset="'+w[0]+'" stop-color="'+x.toString()+'" stop-opacity="1"></stop>'}m+="</linearGradient>"}}t+="<defs>"+m+"</defs>";t+=g.rect({attr:{width:"100%",height:"100%",fill:"#fff",stroke:"none",opacity:"0"}});A=new Array(C);for(B=0;B<C;B++){A[B]=B}A.sort(function(I,k){p=s[I].attr.zIndex||0;o=s[k].attr.zIndex||0;if(p==o){return I-k}return p-o});for(B=0;B<C;B++){E=s[A[B]];if(!E.attr.hidden){t+=g[E.type](E)}}t+="</svg>";return t},b=function(m){var l="",k;for(k in m){if(m.hasOwnProperty(k)&&m[k]!=null){l+=k+'="'+m[k]+'" '}}return l};return{generate:function(l,k){j(k);return a()+h()}}}())});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(o,d,b,n,m,i){var j=3*d,l=3*(n-d)-j,a=1-j-l,h=3*b,k=3*(m-b)-h,p=1-h-k;function g(q){return((a*q+l)*q+j)*q}function c(q,s){var r=e(q,s);return((p*r+k)*r+h)*r}function e(q,y){var w,v,t,r,u,s;for(t=q,s=0;s<8;s++){r=g(t)-q;if(Math.abs(r)<y){return t}u=(3*a*t+2*l)*t+j;if(Math.abs(u)<0.000001){break}t=t-r/u}w=0;v=1;t=q;if(t<w){return w}if(t>v){return v}while(w<v){r=g(t);if(Math.abs(r-q)<y){return t}if(q>r){w=t}else{v=t}t=(v-w)/2+w}return t}return c(o,1/(200*i))},cubicBezier:function(b,e,a,c){var d=function(g){return Ext.fx.CubicBezier.cubicBezierAtTime(g,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,c,a,g,i){a=(typeof a=="number")?a:1;var h=this.unitRE,d=h.exec(j),b,e;if(d){j=d[1];e=d[2];if(!this.scrollRE.test(i)&&!e&&this.pixelDefaultsRE.test(i)){e="px"}}j=+j||0;d=h.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(g!=null)?g:j;return{from:j,delta:(c-b)*a,units:e}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){if(n){h=n[e][1].from}if(Ext.isArray(o[e][1])&&Ext.isArray(b)){l=[];c=0;g=o[e][1].length;for(;c<g;c++){l.push(this.computeDelta(o[e][1][c],b[c],a,h,k))}d.push([o[e][0],l])}else{d.push([o[e][0],this.computeDelta(o[e][1],b,a,h,k)])}}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];if(Ext.isArray(a)){k=[];b=0;e=a.length;for(;b<e;b++){k.push(a[b].from+a[b].delta*g+(a[b].units||0))}c.push([l[d][0],k])}else{c.push([l[d][0],a.from+a.delta*g+(a.units||0)])}}return c}},stringHandler:{computeDelta:function(e,b,d,c,a){return{from:e,delta:b}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){d.push([o[e][0],this.computeDelta(o[e][1],b,a,h,k)])}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];c.push([l[d][0],a.delta])}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(e,a){a=(typeof a=="number")?a:1;var g=false,c=[this.hexRE,this.rgbRE,this.hex3RE],d=c.length,j,b,k,h;for(h=0;h<d;h++){k=c[h];b=(h%2===0)?16:10;j=k.exec(e);if(j&&j.length===4){if(h===2){j[1]+=j[1];j[2]+=j[2];j[3]+=j[3]}g={red:parseInt(j[1],b),green:parseInt(j[2],b),blue:parseInt(j[3],b)};break}}return g||e},computeDelta:function(h,a,e,c){h=this.parseColor(h);a=this.parseColor(a,e);var g=c?c:h,b=typeof g,d=typeof a;if(b=="string"||b=="undefined"||d=="string"||d=="undefined"){return a||g}return{from:h,delta:{red:Math.round((a.red-g.red)*e),green:Math.round((a.green-g.green)*e),blue:Math.round((a.blue-g.blue)*e)}}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(k,e){var g=k.length,c=[],d,b,a,h,j;for(d=0;d<g;d++){b=k[d][1];if(b){h=b.from;j=b.delta;b=(typeof b=="object"&&"red" in b)?"rgb("+b.red+", "+b.green+", "+b.blue+")":b;b=(typeof b=="object"&&b.length)?b[0]:b;if(typeof b=="undefined"){return[]}a=typeof b=="string"?b:"rgb("+[(h.red+Math.round(j.red*e))%256,(h.green+Math.round(j.green*e))%256,(h.blue+Math.round(j.blue*e))%256].join(",")+")";c.push([k[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b=="number")?b:1;var a={},c;for(c in d){a[c]=parseFloat(d[c])*b}return a},computeDelta:function(h,a,c,b){h=this.interpolate(h);a=this.interpolate(a,c);var g=b?b:h,e={},d;for(d in a){e[d]=a[d]-g[d]}return{from:h,delta:e}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(l,g){var h=l.length,c=[],e={},d,j,k,b,a;for(d=0;d<h;d++){b=l[d][1];j=b.from;k=b.delta;for(a in j){e[a]=j[a]+k[a]*g}c.push([l[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c=="number")?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&&!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,l,a,q){var c=this.forcePath(l),n=[],s=b.length,d,h,o,g,p,m,e,t,r;for(o=0;o<s;o++){r=this.forcePath(b[o][1]);g=Ext.draw.Draw.interpolatePaths(r,c);r=g[0];c=g[1];d=r.length;t=[];for(m=0;m<d;m++){g=[r[m][0]];h=r[m].length;for(e=1;e<h;e++){p=q&&q[0][1][m][e].from;g.push(this.computeDelta(r[m][e],c[m][e],a,p))}t.push(g)}n.push([b[o][0],t])}return n},set:function(p,n){var o=p.length,e=[],h,g,d,l,m,c,a,b;for(h=0;h<o;h++){c=p[h][1];l=[];a=c.length;for(g=0;g<a;g++){m=[c[g][0]];b=c[g].length;for(d=1;d<b;d++){m.push(c[g][d].from+c[g][d].delta*n)}l.push(m.join(","))}e.push([p[h][0],l.join(",")])}return e}}}},function(){var b=["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],c=b.length,a=0,d;for(;a<c;a++){d=b[a];this[d]=this.color}b=["cursor"];c=b.length;a=0;for(;a<c;a++){d=b[a];this[d]=this.stringHandler}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.layout.ClassList",(function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{dirty:false,constructor:function(c){this.owner=c;this.map=a(this.classes=b(c.el.className))},add:function(c){var d=this;if(!d.map[c]){d.map[c]=true;d.classes.push(c);if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},addMany:function(c){Ext.each(b(c),this.add,this)},contains:function(c){return this.map[c]},flush:function(){this.owner.el.className=this.classes.join(" ");this.dirty=false},remove:function(c){var d=this;if(d.map[c]){delete d.map[c];d.classes=Ext.Array.filter(d.classes,function(e){return e!=c});if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},removeMany:function(d){var e=this,c=a(b(d));e.classes=Ext.Array.filter(e.classes,function(g){if(!c[g]){return true}delete e.map[g];if(!e.dirty){e.dirty=true;e.owner.markDirty()}return false})}}}()));Ext.define("Ext.layout.ContextItem",{requires:["Ext.layout.ClassList"],heightModel:null,widthModel:null,sizeModel:null,boxChildren:null,boxParent:null,children:[],dirty:null,dirtyCount:0,hasRawContent:true,isContextItem:true,isTopLevel:false,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildLayouts:0,remainingComponentChildLayouts:0,remainingContainerChildLayouts:0,wrapsComponent:false,constructor:function(a){var d=this,e=a.target,c,b;Ext.apply(d,a);c=d.el;d.id=c.id;d.lastBox=c.lastBox;d.blocks={};d.domBlocks={};d.triggers={};d.domTriggers={};d.flushedProps={};d.props={};d.state={};d.styles={};if(e.isComponent){d.wrapsComponent=true;d.sizeModel=b=e.getSizeModel(d.ownerCtContext&&d.ownerCtContext.sizeModel);d.widthModel=b.width;d.heightModel=b.height;d.frameBodyContext=d.getEl("frameBody")}},init:function(c){var d=this,b,a;if(c){d.ownerCtContext=c;d.isBoxParent=d.target.ownerLayout.isItemBoxParent(d);a=d.widthModel;if(a.shrinkWrap){b=c.isBoxParent?c:c.boxParent;if(b){b.addBoxChild(d)}}else{if(a.natural){d.boxParent=c}}}else{d.isTopLevel=true}},initAnimatePolicy:function(){var b=this,c=b.target,a=b.ownerCtContext;if(a&&a.isTopLevel){b.animatePolicy=c.ownerLayout.getAnimatePolicy(b)}else{if(!a&&c.isCollapsingOrExpanding&&c.animCollapse){b.animatePolicy=c.componentLayout.getAnimatePolicy(b)}}if(b.animatePolicy){b.context.queueAnimation(b)}},noFraming:{left:0,top:0,right:0,bottom:0,width:0,height:0},addCls:function(a){this.getClassList().addMany(a)},removeCls:function(a){this.getClassList().removeMany(a)},addBlock:function(b,d,e){var c=this,g=c[b],a=g[e]||(g[e]={});if(!a[d.id]){a[d.id]=d;++d.blockCount;++c.context.blockCount}},addBoxChild:function(d){var c=this,b,a=d.widthModel;d.boxParent=this;d.measuresBox=a.shrinkWrap?d.hasRawContent:a.natural;if(d.measuresBox){b=c.boxChildren;if(b){b.push(d)}else{c.boxChildren=[d]}}},addTrigger:function(e,g){var d=this,h=g?d.domTriggers:d.triggers,a=d.context,c=a.currentLayout,b=h[e]||(h[e]={});if(!b[c.id]){b[c.id]=c;++c.triggerCount;b=a.triggers[g?"dom":"data"];(b[c.id]||(b[c.id]=[])).push({item:this,prop:e});if(d.props[e]!==undefined){if(!g||!(d.dirty&&(e in d.dirty))){++c.firedTriggers}}}},boxChildMeasured:function(){var b=this,c=b.state,a=(c.boxesMeasured=(c.boxesMeasured||0)+1);if(a==b.boxChildren.length){c.clearBoxWidth=1;++b.context.progressCount;b.markDirty()}},borderNames:["border-top-width","border-right-width","border-bottom-width","border-left-width"],marginNames:["margin-top","margin-right","margin-bottom","margin-left"],paddingNames:["padding-top","padding-right","padding-bottom","padding-left"],trblNames:["top","right","bottom","left"],cacheMissHandlers:{borderInfo:function(a){var b=a.getStyles(a.borderNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},marginInfo:function(a){var b=a.getStyles(a.marginNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},paddingInfo:function(b){var a=b.frameBodyContext||b,c=a.getStyles(b.paddingNames,b.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c}},checkCache:function(a){return this.cacheMissHandlers[a](this)},clearAllBlocks:function(a){var c=this[a],b;if(c){for(b in c){this.clearBlocks(a,b)}}},clearBlocks:function(c,g){var h=this[c],b=h&&h[g],d,e,a;if(b){delete h[g];d=this.context;for(a in b){e=b[a];--d.blockCount;if(!--e.blockCount&&!e.pending&&!e.done){d.queueLayout(e)}}}},block:function(a,b){this.addBlock("blocks",a,b)},domBlock:function(a,b){this.addBlock("domBlocks",a,b)},doInvalidate:function(c){var d=this,b=d.props,a=d.dirty,e=d.target.ownerLayout;d.dirty=d.invalid=false;d.props={};d.state={};d.clearAllBlocks("blocks");d.clearAllBlocks("domBlocks");if(d.wrapsComponent){if(!c){d.recoverProp("x",b,a);d.recoverProp("y",b,a);if(d.widthModel.calculated){d.recoverProp("width",b,a)}if(d.heightModel.calculated){d.recoverProp("height",b,a)}}else{d.widthModel=d.sizeModel.width;d.heightModel=d.sizeModel.height}}if(e&&e.manageMargins){d.recoverProp("margin-top",b,a);d.recoverProp("margin-right",b,a);d.recoverProp("margin-bottom",b,a);d.recoverProp("margin-left",b,a)}},fireTriggers:function(b,g){var d=this[b][g],c=this.context,e,a;if(d){for(a in d){e=d[a];++e.firedTriggers;if(!e.done&&!e.blockCount&&!e.pending){c.queueLayout(e)}}}},flush:function(){var b=this,a=b.dirty,c=b.state,d=b.el;b.dirtyCount=0;if(b.classList&&b.classList.dirty){b.classList.flush()}if("attributes" in b){d.set(b.attributes);delete b.attributes}if("innerHTML" in b){d.innerHTML=b.innerHTML;delete b.innerHTML}if(c.clearBoxWidth){c.clearBoxWidth=0;b.el.setStyle("width",null);if(!--c.blocks){b.context.queueItemLayouts(b)}}if(a){delete b.dirty;b.writeProps(a,true)}},flushAnimations:function(){var o=this,c=o.lastBox,l,n,e,h,g,d,i,m,k,a,b;if(c){l=o.target;n=l.layout&&l.layout.animate;if(n){e=Ext.isNumber(n)?n:n.duration}h=Ext.Object.getKeys(o.animatePolicy);g=Ext.apply({},{from:{},to:{},duration:e||Ext.fx.Anim.prototype.duration},n);for(d=0,i=0,m=h.length;i<m;i++){k=h[i];a=c[k];b=o.peek(k);if(a!=b){k=o.translateProps[k]||k;g.from[k]=a;g.to[k]=b;++d}}if(d){if(o.isCollapsingOrExpanding===1){l.componentLayout.undoLayout(o)}else{o.writeProps(g.from)}o.el.animate(g);Ext.fx.Manager.getFxQueue(o.el.id)[0].on({afteranimate:function(){if(o.isCollapsingOrExpanding===1){l.componentLayout.redoLayout(o);l.afterCollapse(true)}else{if(o.isCollapsingOrExpanding===2){l.afterExpand(true)}}}})}}},getBorderInfo:function(){var a=this,b=a.borderInfo;if(!b){a.borderInfo=b=a.checkCache("borderInfo")}return b},getClassList:function(){return this.classList||(this.classList=new Ext.layout.ClassList(this))},getEl:function(c,a){var e=this,g,d,b;if(c){if(c.dom){d=c}else{g=e.target;if(a){g=a}d=g[c];if(typeof d=="function"){d=d.call(g);if(d===e.el){return this}}}if(d){b=e.context.getEl(e,d)}}return b||null},getFraming:function(){var a=this;if(!a.framingInfo){a.framingInfo=a.target.frameSize||a.noFraming}return a.framingInfo},getFrameInfo:function(){var b=this,c=b.frameInfo,d,a;if(!c){d=b.getFraming();a=b.getBorderInfo();b.frameInfo=c={top:d.top+a.top,right:d.right+a.right,bottom:d.bottom+a.bottom,left:d.left+a.left,width:d.width+a.width,height:d.height+a.height}}return c},getMarginInfo:function(){var d=this,h=d.marginInfo,b,a,g,e,c;if(!h){if(!d.wrapsComponent){h=d.checkCache("marginInfo")}else{b=d.target;e=b.ownerLayout;c=e?e.id:null;a=e&&e.manageMargins;h=b.margin$;if(h&&h.ownerId!==c){h=null}if(!h){h=d.parseMargins(b.margin)||d.checkCache("marginInfo");if(a){g=d.parseMargins(b.margins,e.defaultMargins);if(g){h={top:h.top+g.top,right:h.right+g.right,bottom:h.bottom+g.bottom,left:h.left+g.left}}d.setProp("margin-top",0);d.setProp("margin-right",0);d.setProp("margin-bottom",0);d.setProp("margin-left",0)}h.ownerId=c;b.margin$=h}h.width=h.left+h.right;h.height=h.top+h.bottom}d.marginInfo=h}return h},clearMarginCache:function(){delete this.marginInfo;delete this.target.margin$},getPaddingInfo:function(){var a=this,b=a.paddingInfo;if(!b){a.paddingInfo=b=a.checkCache("paddingInfo")}return b},getProp:function(c){var b=this,a=b.props[c];b.addTrigger(c);return a},getDomProp:function(c){var b=this,a=(b.dirty&&(c in b.dirty))?undefined:b.props[c];b.addTrigger(c,true);return a},getStyle:function(a){var c=this,b=c.styles,e,d;if(a in b){d=b[a]}else{e=c.styleInfo[a];d=c.el.getStyle(a);if(e&&e.parseInt){d=parseInt(d,10)||0}b[a]=d}return d},getStyles:function(p,b){var m=this,e=m.styles,q={},g=0,d=p.length,k,j,l,a,c,h,r,o;b=b||p;for(k=0;k<d;++k){a=p[k];if(a in e){q[b[k]]=e[a];++g;if(k&&g==1){j=p.slice(0,k);l=b.slice(0,k)}}else{if(g){(j||(j=[])).push(a);(l||(l=[])).push(b[k])}}}if(g<d){j=j||p;l=l||b;h=m.styleInfo;r=m.el.getStyle(j);for(k=j.length;k--;){a=j[k];c=h[a];o=r[a];if(c&&c.parseInt){o=parseInt(o,10)||0}q[l[k]]=o;e[a]=o}}return q},hasProp:function(b){var a=this.getProp(b);return typeof a!="undefined"},hasDomProp:function(b){var a=this.getDomProp(b);return typeof a!="undefined"},invalidate:function(a){this.invalid=true;this.context.queueInvalidate(this,a)},markDirty:function(){if(++this.dirtyCount==1){this.context.queueFlush(this)}},onBoxMeasured:function(){var a=this.boxParent,b=this.state;if(a&&a.widthModel.shrinkWrap&&!b.boxMeasured&&this.measuresBox){b.boxMeasured=1;a.boxChildMeasured()}},parseMargins:function(d,c){if(d===true){d=5}var b=typeof d,a;if(b=="string"||b=="number"){a=Ext.util.Format.parseBox(d)}else{if(d||c){a={top:0,right:0,bottom:0,left:0};if(c){Ext.apply(a,this.parseMargins(c))}Ext.apply(a,d)}}return a},peek:function(a){return this.props[a]},recoverProp:function(g,b,a){var e=this,d=e.props,c;if(g in b){d[g]=b[g];if(a&&g in a){c=e.dirty||(e.dirty={});c[g]=a[g]}}},redo:function(b){var e=this,c,a,d;e.revertProps(e.props);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].redo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].redo()}}},revertProps:function(d){var a,b=this.flushedProps,c={};for(a in d){if(b.hasOwnProperty(a)){c[a]=d[a]}}this.writeProps(c)},setAttribute:function(a,c){var b=this;if(!b.attributes){b.attributes={}}b.attributes[a]=c;b.markDirty()},setBox:function(b){var a=this;if("left" in b){a.setProp("x",b.left)}if("top" in b){a.setProp("y",b.top)}a.setSize(b.width,b.height)},setContentHeight:function(a,b){if(!b&&this.hasRawContent){return 1}return this.setProp("contentHeight",a)},setContentWidth:function(b,a){if(!a&&this.hasRawContent){return 1}return this.setProp("contentWidth",b)},setContentSize:function(c,a,b){return this.setContentWidth(c,b)+this.setContentHeight(a,b)==2},setProp:function(d,c,a){var b=this,h=typeof c,g,e;if(h=="undefined"||(h==="number"&&isNaN(c))){return 0}if(b.props[d]===c){return 1}b.props[d]=c;++b.context.progressCount;if(a===false){b.fireTriggers("domTriggers",d);b.clearBlocks("domBlocks",d)}else{e=b.styleInfo[d];if(e){if(!b.dirty){b.dirty={}}if(d=="width"||d=="height"){g=b.isBorderBoxValue;if(g==null){b.isBorderBoxValue=g=!!b.el.isBorderBox()}if(!g){b.borderInfo||b.getBorderInfo();b.paddingInfo||b.getPaddingInfo()}}b.dirty[d]=c;b.markDirty()}}b.fireTriggers("triggers",d);b.clearBlocks("blocks",d);return 1},setHeight:function(a,c){var e=this,b=e.target,h,d,g;if(a<0){a=0}if(!e.wrapsComponent){if(!e.setProp("height",a,c)){return NaN}}else{a=Ext.Number.constrain(a,b.minHeight||0,b.maxHeight);if(!e.setProp("height",a,c)){return NaN}h=e.frameBodyContext;if(h){d=e.getFrameInfo();h.setHeight(a-d.height,c)}}return a},setWidth:function(c,b){var e=this,a=e.target,h,d,g;if(c<0){c=0}if(!e.wrapsComponent){if(!e.setProp("width",c,b)){return NaN}}else{c=Ext.Number.constrain(c,a.minWidth||0,a.maxWidth);if(!e.setProp("width",c,b)){return NaN}h=e.frameBodyContext;if(h){d=e.getFrameInfo();h.setWidth(c-d.width,b)}}return c},setSize:function(c,a,b){this.setWidth(c,b);this.setHeight(a,b)},translateProps:{x:"left",y:"top"},undo:function(b){var e=this,c,a,d;e.revertProps(e.lastBox);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].undo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].undo()}}},unsetProp:function(b){var a=this.dirty;delete this.props[b];if(a){delete a[b]}},writeProps:function(d,c){if(!(d&&typeof d=="object")){return}var u=this,b=u.el,g={},e=0,a=u.styleInfo,t,l,o,k="x" in d,j="y" in d,i=d.x,h=d.y,p=d.width,n=d.height,s=u.isBorderBoxValue,v=u.target,q=Math.max,r=0,m=0;if("displayed" in d){b.setDisplayed(d.displayed)}for(l in d){if(c){u.fireTriggers("domTriggers",l);u.clearBlocks("domBlocks",l);u.flushedProps[l]=1}t=a[l];if(t&&t.dom){if(t.suffix&&(o=parseInt(d[l],10))){g[l]=o+t.suffix}else{g[l]=d[l]}++e}}if(k||j){if(v.isComponent){v.setPosition(i||u.props.x,h||u.props.y)}else{if(k){g.left=i+"px";++e}if(j){g.top=h+"px";++e}}}if(!s&&(p>0||n>0)){if(!u.frameBodyContext){r=u.paddingInfo.width;m=u.paddingInfo.height}if(p){p=q(parseInt(p,10)-(u.borderInfo.width+r),0);g.width=p+"px";++e}if(n){n=q(parseInt(n,10)-(u.borderInfo.height+m),0);g.height=n+"px";++e}}if(e){b.setStyle(g)}}},function(){var c={dom:true,parseInt:true,suffix:"px"},b={dom:true},a={dom:false};this.prototype.styleInfo={childrenDone:a,componentChildrenDone:a,containerChildrenDone:a,containerLayoutDone:a,displayed:a,done:a,x:a,y:a,left:c,top:c,right:c,bottom:c,width:c,height:c,"border-top-width":c,"border-right-width":c,"border-bottom-width":c,"border-left-width":c,"margin-top":c,"margin-right":c,"margin-bottom":c,"margin-left":c,"padding-top":c,"padding-right":c,"padding-bottom":c,"padding-left":c,"line-height":b,display:b}});Ext.define("Ext.util.Bindable",{bindStore:function(a,b){var c=this,d=c.store;if(!b&&c.store){if(a!==d&&d.autoDestroy){d.destroyStore()}else{c.unbindStoreListeners(d)}c.onUnbindStore(d,b)}if(a){a=Ext.data.StoreManager.lookup(a);c.bindStoreListeners(a);c.onBindStore(a,b)}c.store=a||null;return c},getStore:function(){return this.store},unbindStoreListeners:function(a){var b=this.storeListeners;if(b){a.un(b)}},bindStoreListeners:function(a){var c=this,b=Ext.apply({},c.getStoreListeners());if(!b.scope){b.scope=c}c.storeListeners=b;a.on(b)},getStoreListeners:Ext.emptyFn,onUnbindStore:Ext.emptyFn,onBindStore:Ext.emptyFn});Ext.define("Ext.util.ElementContainer",{childEls:[],constructor:function(){var b=this,a;if(b.hasOwnProperty("childEls")){a=b.childEls;delete b.childEls;b.addChildEls.apply(b,a)}},destroy:function(){var e=this,d=e.getChildEls(),g,a,c,b;for(c=d.length;c--;){a=d[c];if(typeof a!="string"){a=a.name}g=e[a];if(g){e[a]=null;g.remove()}}},addChildEls:function(){var b=this,a=arguments;if(b.hasOwnProperty("childEls")){b.childEls.push.apply(b.childEls,a)}else{b.childEls=b.getChildEls().concat(Array.prototype.slice.call(a))}b.prune(b.childEls,false)},applyChildEls:function(b,a){var e=this,g=e.getChildEls(),j,k,d,c,h;j=(a||e.id)+"-";for(d=g.length;d--;){k=g[d];if(typeof k=="string"){h=b.getById(j+k)}else{if((c=k.select)){h=Ext.select(c,true,b.dom)}else{if((c=k.selectNode)){h=Ext.get(Ext.DomQuery.selectNode(c,b.dom))}else{h=b.getById(k.id||(j+k.itemId))}}k=k.name}e[k]=h}},getChildEls:function(){var b=this,a;if(b.hasOwnProperty("childEls")){return b.childEls}a=b.self;return a.$childEls||b.getClassChildEls(a)},getClassChildEls:function(o){var k=this,p=o.$childEls,m,d,b,j,n,h,a,c,e,g,l;if(!p){g=o.superclass;if(g){g=g.self;c=[g.$childEls||k.getClassChildEls(g)];l=g.prototype.mixins||{}}else{c=[];l={}}e=o.prototype;h=e.mixins;for(a in h){if(h.hasOwnProperty(a)&&!l.hasOwnProperty(a)){n=h[a].self;c.push(n.$childEls||k.getClassChildEls(n))}}c.push(e.hasOwnProperty("childEls")&&e.childEls);for(d=0,b=c.length;d<b;++d){m=c[d];if(m&&m.length){if(!p){p=m}else{if(!j){j=true;p=p.slice(0)}p.push.apply(p,m)}}}o.$childEls=p=(p?k.prune(p,!j):[])}return p},prune:function(c,e){var b=c.length,d={},a;while(b--){a=c[b];if(typeof a!="string"){a=a.name}if(!d[a]){d[a]=1}else{if(e){e=false;c=c.slice(0)}Ext.Array.erase(c,b,1)}}return c},removeChildEls:function(g){var e=this,a=e.getChildEls(),d=(e.childEls=[]),h,b,c;for(b=0,h=a.length;b<h;++b){c=a[b];if(!g(c)){d.push(c)}}}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(g){if(this.isTransnumeral(g)){return g}var e=this.plurals,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},singularize:function(g){if(this.isTransnumeral(g)){return g}var e=this.singulars,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},classify:function(a){return Ext.String.capitalize(this.singularize(a))},ordinalize:function(d){var b=parseInt(d,10),c=b%10,a=b%100;if(11<=a&&a<=13){return d+"th"}else{switch(c){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd";default:return d+"th"}}}},function(){var b={alumnus:"alumni",cactus:"cacti",focus:"foci",nucleus:"nuclei",radius:"radii",stimulus:"stimuli",ellipsis:"ellipses",paralysis:"paralyses",oasis:"oases",appendix:"appendices",index:"indexes",beau:"beaux",bureau:"bureaux",tableau:"tableaux",woman:"women",child:"children",man:"men",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",phenomenon:"phenomena",foot:"feet",goose:"geese",tooth:"teeth",antenna:"antennae",formula:"formulae",nebula:"nebulae",vertebra:"vertebrae",vita:"vitae"},a;for(a in b){this.plural(a,b[a]);this.singular(b[a],a)}});Ext.define("Ext.util.Memento",(function(){function d(i,h,j,g){i[g?g+j:j]=h[j]}function c(h,g,i){delete h[i]}function e(k,j,l,i){var g=i?i+l:l,h=k[g];if(h||k.hasOwnProperty(g)){a(j,l,h)}}function a(h,i,g){if(Ext.isDefined(g)){h[i]=g}else{delete h[i]}}function b(h,m,l,i,j){if(m){if(Ext.isArray(i)){var k,g=i.length;for(k=0;k<g;k++){h(m,l,i[k],j)}}else{h(m,l,i,j)}}}return{data:null,target:null,constructor:function(h,g){if(h){this.target=h;if(g){this.capture(g)}}},capture:function(g,j,i){var h=this;b(d,h.data||(h.data={}),j||h.target,g,i)},remove:function(g){b(c,this.data,null,g)},restore:function(h,g,j,i){b(e,this.data,j||this.target,h,i);if(g!==false){this.remove(h)}},restoreAll:function(g,k){var i=this,h=k||this.target,j=i.data,l;for(l in j){if(j.hasOwnProperty(l)){a(h,l,j[l])}}if(g!==false){delete i.data}}}}()));Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}}return a},prepareClass:function(d,c){if(!d.HasListeners){var b=Ext.util.Observable,e=function(){},a=d.superclass.HasListeners||(c&&c.HasListeners)||b.HasListeners;d.prototype.HasListeners=d.HasListeners=e;e.prototype=d.hasListeners=new a()}}},isObservable:true,constructor:function(a){var b=this;Ext.apply(b,a);if(!b.hasListeners){b.hasListeners=new b.HasListeners()}b.events=b.events||{};if(b.listeners){b.on(b.listeners);b.listeners=null}if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},onClassExtended:function(a){if(!a.HasListeners){Ext.util.Observable.prepareClass(a)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(i,d,g,e,c){var h=this,a=h.managedListeners=h.managedListeners||[],b;if(typeof d!=="string"){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!h.eventOptionsRe.test(d)){h.addManagedListener(i,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:i,ename:d,fn:g,scope:e,options:c});i.on(d,g,e,c)}},removeManagedListener:function(j,c,g,k){var e=this,l,b,h,a,d;if(typeof c!=="string"){l=c;for(c in l){if(l.hasOwnProperty(c)){b=l[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(j,c,b.fn||b,b.scope||l.scope)}}}}h=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=h.length;d<a;d++){e.removeManagedListenerItem(false,h[d],j,c,g,k)}},fireEvent:function(a){a=a.toLowerCase();var e=this,c=e.events,d=c&&c[a],b=true;if(d&&e.hasListeners[a]){b=e.continueFireEvent(a,Ext.Array.slice(arguments,1),d.bubble)}return b},continueFireEvent:function(c,e,b){var h=this,a,g,d=true;do{if(h.eventsSuspended){if((a=h.eventQueue)){a.push([c,e,b])}return d}else{g=h.events[c];if(g&&g!=true){if((d=g.fire.apply(g,e))===false){break}}}}while(b&&(h=h.getBubbleParent()));return d},getBubbleParent:function(){var b=this,a=b.getBubbleTarget&&b.getBubbleTarget();if(a&&a.isObservable){return a}return null},addListener:function(d,g,e,c){var i=this,b,h,a;if(typeof d!=="string"){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!i.eventOptionsRe.test(d)){i.addListener(d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{d=d.toLowerCase();i.events[d]=i.events[d]||true;h=i.events[d]||true;if(Ext.isBoolean(h)){i.events[d]=h=new Ext.util.Event(i,d)}if(typeof g==="string"){g=e[g]||i[g]}h.addListener(g,e,Ext.isObject(c)?c:{});a=i.hasListeners;if(a.hasOwnProperty(d)){++a[d]}else{a[d]=1}}},removeListener:function(c,e,d){var h=this,b,g,a;if(typeof c!=="string"){a=c;for(c in a){if(a.hasOwnProperty(c)){b=a[c];if(!h.eventOptionsRe.test(c)){h.removeListener(c,b.fn||b,b.scope||a.scope)}}}}else{c=c.toLowerCase();g=h.events[c];if(g&&g.isEvent){g.removeListener(e,d);if(!--h.hasListeners[c]){delete h.hasListeners[c]}}}},clearListeners:function(){var b=this.events,c,a;for(a in b){if(b.hasOwnProperty(a)){c=b[a];if(c.isEvent){c.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var b=this.managedListeners||[],c=0,a=b.length;for(;c<a;c++){this.removeManagedListenerItem(true,b[c])}this.managedListeners=[]},removeManagedListenerItem:function(b,a,g,c,e,d){if(b||(a.item===g&&a.ename===c&&(!e||a.fn===e)&&(!d||a.scope===d))){a.item.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(this.managedListeners,a)}}},addEvents:function(g){var e=this,d=e.events||(e.events={}),a,b,c;if(typeof g=="string"){for(b=arguments,c=b.length;c--;){a=b[c];if(!d[a]){d[a]=true}}}else{Ext.applyIf(e.events,g)}},hasListener:function(a){return !!this.hasListeners[a.toLowerCase()]},suspendEvents:function(a){this.eventsSuspended=true;if(a&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,d=a.eventQueue,c,b;a.eventsSuspended=false;delete a.eventQueue;if(d){c=d.length;for(b=0;b<c;b++){a.continueFireEvent.apply(a,d[b])}}},relayEvents:function(c,e,j){j=j||"";var h=this,a=e.length,d=0,g,b;for(;d<a;d++){g=e[d];b=j+g;h.events[b]=h.events[b]||true;c.on(g,h.createRelayer(b))}},createRelayer:function(a,b){var c=this;return function(){return c.fireEvent.apply(c,[a].concat(Array.prototype.slice.apply(arguments,b||[0,-1])))}},enableBubble:function(j){if(j){var g=this,h=(typeof j=="string")?arguments:j,e=h.length,c=g.events,b,d,a;for(a=0;a<e;++a){b=h[a].toLowerCase();d=c[b];if(!d||typeof d=="boolean"){c[b]=d=new Ext.util.Event(g,b)}g.hasListeners[b]=(g.hasListeners[b]||0)+1;d.bubble=true}}}},function(){var a=this,d=a.prototype,b=function(){},e=function(g){if(!g.HasListeners){var h=g.prototype;a.prepareClass(g,this);g.onExtended(function(i){a.prepareClass(i)});if(h.onClassMixedIn){Ext.override(g,{onClassMixedIn:function(i){e.call(this,i);this.callParent(arguments)}})}else{h.onClassMixedIn=function(i){e.call(this,i)}}}};b.prototype={};d.HasListeners=a.HasListeners=b;a.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});a.observeClass=a.observe;function c(m){var l=(this.methodEvents=this.methodEvents||{})[m],i,h,j,k=this,g;if(!l){this.methodEvents[m]=l={};l.originalFn=this[m];l.methodName=m;l.before=[];l.after=[];g=function(p,o,n){if((h=p.apply(o||k,n))!==undefined){if(typeof h=="object"){if(h.returnValue!==undefined){i=h.returnValue}else{i=h}j=!!h.cancel}else{if(h===false){j=true}else{i=h}}}};this[m]=function(){var p=Array.prototype.slice.call(arguments,0),o,q,n;i=h=undefined;j=false;for(q=0,n=l.before.length;q<n;q++){o=l.before[q];g(o.fn,o.scope,p);if(j){return i}}if((h=l.originalFn.apply(k,p))!==undefined){i=h}for(q=0,n=l.after.length;q<n;q++){o=l.after[q];g(o.fn,o.scope,p);if(j){return i}}return i}}return l}Ext.apply(d,{onClassMixedIn:e,beforeMethod:function(i,h,g){c.call(this,i).before.push({fn:h,scope:g})},afterMethod:function(i,h,g){c.call(this,i).after.push({fn:h,scope:g})},removeMethodListener:function(m,k,j){var l=this.getMethodEvent(m),h,g;for(h=0,g=l.before.length;h<g;h++){if(l.before[h].fn==k&&l.before[h].scope==j){Ext.Array.erase(l.before,h,1);return}}for(h=0,g=l.after.length;h<g;h++){if(l.after[h].fn==k&&l.after[h].scope==j){Ext.Array.erase(l.after,h,1);return}}},toggleEventLogging:function(g){Ext.util.Observable[g?"capture":"releaseCapture"](this,function(h){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(h,arguments)}})}})});Ext.define("Ext.util.Offset",{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&&!isNaN(a))?a:0;this.y=(b!=null&&!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.util.ProtoElement",(function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{isProtoEl:true,clsProp:"cls",styleProp:"style",removedProp:"removed",styleIsText:false,constructor:function(c){var d=this;Ext.apply(d,c);d.classList=b(d.cls);d.classMap=a(d.classList);delete d.cls;if(Ext.isFunction(d.style)){d.styleFn=d.style;delete d.style}else{if(typeof d.style=="string"){d.style=Ext.Element.parseStyles(d.style)}else{if(d.style){d.style=Ext.apply({},d.style)}}}},flush:function(){this.flushClassList=[];this.removedClasses={};delete this.style},addCls:function(n){var l=this,m=b(n),e=m.length,j=l.classList,d=l.classMap,g=l.flushClassList,h=0,k;for(;h<e;++h){k=m[h];if(!d[k]){d[k]=true;j.push(k);if(g){g.push(k);delete l.removedClasses[k]}}}return l},hasCls:function(c){return c in this.classMap},removeCls:function(o){var n=this,l=n.classList,g=(n.classList=[]),j=a(b(o)),e=l.length,d=n.classMap,k=n.removedClasses,h,m;for(h=0;h<e;++h){m=l[h];if(j[m]){if(k){if(d[m]){k[m]=true;Ext.Array.remove(n.flushClassList,m)}}delete d[m]}else{g.push(m)}}return n},setStyle:function(g,e){var d=this,c=d.style||(d.style={});if(typeof g=="string"){if(arguments.length===1){d.setStyle(Ext.Element.parseStyles(g))}else{c[g]=e}}else{Ext.apply(c,g)}return d},writeTo:function(h){var e=this,g=e.flushClassList||e.classList,d=e.removedClasses,c;if(e.styleFn){c=Ext.apply({},e.styleFn());Ext.apply(c,e.style)}else{c=e.style}h[e.clsProp]=g.join(" ");if(c){h[e.styleProp]=e.styleIsText?Ext.DomHelper.generateStyles(c):c}if(d){d=Ext.Object.getKeys(d);if(d.length){h[e.removedProp]=d.join(" ")}}return h}}}()));Ext.define("Ext.util.Queue",{constructor:function(){this.clear()},add:function(c){var b=this,a=b.getKey(c);if(!b.map[a]){++b.length;b.items.push(c);b.map[a]=c}return c},clear:function(){var b=this,a=b.items;b.items=[];b.map={};b.length=0;return a},contains:function(b){var a=this.getKey(b);return this.map.hasOwnProperty(a)},getCount:function(){return this.length},getKey:function(a){return a.id},remove:function(e){var d=this,c=d.getKey(e),a=d.items,b;if(d.map[c]){b=Ext.Array.indexOf(a,e);Ext.Array.erase(a,b,1);delete d.map[c];--d.length}return e}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],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,g,a,c){var e=this;e.y=e.top=e[1]=d;e.right=g;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x>=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(h){var g=this,d=Math.max(g.y,h.y),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.x,h.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(h){var g=this,d=Math.min(g.y,h.y),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.x,h.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,g,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=g;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.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-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(a<this.x||a>this.right)},isOutOfBoundY:function(a){return(a<this.y||a>this.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.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.util.Renderable",{requires:["Ext.dom.Element"],frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[\-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameElNames:["TL","TC","TR","ML","MC","MR","BL","BC","BR"],frameTpl:["{%this.renderDockedItems(out,values,0);%}",'<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</div>",'<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}","<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" style="background-position: 0 0;" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</td>",'<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var b=this,c={},e=b.protoEl,d=b.getTargetEl(),a;b.finishRenderChildren();if(b.styleHtmlContent){d.addCls(b.styleHtmlCls)}e.writeTo(c);a=c.removed;if(a){d.removeCls(a)}a=c.cls;if(a.length){d.addCls(a)}a=c.style;if(c.style){d.setStyle(a)}b.protoEl=null;if(!b.ownerCt){b.updateLayout()}},afterFirstLayout:function(d,a){var e=this,c=Ext.isDefined(e.x),b=Ext.isDefined(e.y),h,g;if(e.floating&&(!c||!b)){if(e.floatParent){g=e.el.getAlignToXY(e.floatParent.getTargetEl(),"c-c");h=e.floatParent.getTargetEl().translatePoints(g[0],g[1])}else{g=e.el.getAlignToXY(e.container,"c-c");h=e.container.translatePoints(g[0],g[1])}e.x=c?e.x:h.left;e.y=b?e.y:h.top;c=b=true}if(c||b){e.setPosition(e.x,e.y)}e.onBoxReady(d,a);if(e.hasListeners.boxready){e.fireEvent("boxready",e,d,a)}},onBoxReady:Ext.emptyFn,applyRenderSelectors:function(){var d=this,b=d.renderSelectors,c=d.el,e=c.dom,a;d.applyChildEls(c);if(b){for(a in b){if(b.hasOwnProperty(a)&&b[a]){d[a]=Ext.get(Ext.DomQuery.selectNode(b[a],e))}}}},beforeRender:function(){var b=this,c=b.getTargetEl(),a=b.getComponentLayout();b.frame=b.frame||b.alwaysFramed;if(!a.initialized){a.initLayout()}if(c){c.setStyle(b.getOverflowStyle());b.overflowStyleSet=true}b.setUI(b.ui);if(b.disabled){b.disable(true)}},doApplyRenderTpl:function(c,a){var d=a.$comp,b;if(!d.rendered){b=d.initRenderTpl();b.applyOut(a.renderData,c)}},doAutoRender:function(){var a=this;if(!a.rendered){if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}}},doRenderContent:function(a,c){var b=c.$comp;if(b.html){Ext.DomHelper.generateMarkup(b.html,a);delete b.html}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=new Ext.XTemplate(b.tpl)}if(b.data){b.tpl.applyOut(b.data,a);delete b.data}}},doRenderFramingDockedItems:function(a,c,d){var b=c.$comp;if(!b.rendered&&b.doRenderDockedItems){c.renderData.$skipDockedItems=true;b.doRenderDockedItems.call(this,a,c,d)}},finishRender:function(a){var g=this,b,h,e,d,i,c;if(!g.el||g.$pid){if(g.container){d=g.container.getById(g.id,true)}else{d=Ext.getDom(g.id)}if(!g.el){g.wrapPrimaryEl(d)}else{delete g.$pid;if(!g.el.dom){g.wrapPrimaryEl(g.el)}d.parentNode.insertBefore(g.el.dom,d);Ext.removeNode(d)}}else{if(!g.rendering){b=g.initRenderTpl();if(b){h=g.initRenderData();b.insertFirst(g.getTargetEl(),h)}}}if(!g.container){g.container=Ext.get(g.el.dom.parentNode)}if(g.ctCls){g.container.addCls(g.ctCls)}g.onRender(g.container,a);if(!g.overflowStyleSet){g.getTargetEl().setStyle(g.getOverflowStyle())}g.el.setVisibilityMode(Ext.Element[g.hideMode.toUpperCase()]);if(g.overCls){g.el.hover(g.addOverCls,g.removeOverCls,g)}if(g.hasListeners.render){g.fireEvent("render",g)}if(g.contentEl){i=Ext.baseCSSPrefix;c=i+"hide-";e=Ext.get(g.contentEl);e.removeCls([i+"hidden",c+"display",c+"offsets",c+"nosize"]);g.getTargetEl().appendChild(e.dom)}g.afterRender();if(g.hasListeners.afterrender){g.fireEvent("afterrender",g)}g.initEvents();if(g.hidden){g.el.hide()}},finishRenderChildren:function(){var a=this.getComponentLayout();a.finishRender()},getElConfig:function(){var h=this,j=h.autoEl,e=h.getFrameInfo(),a={tag:"div",id:h.id,tpl:e?h.initFramingTpl(e.table):h.initRenderTpl()},b,d,g,k,c;h.initStyles(h.protoEl);h.protoEl.writeTo(a);h.protoEl.flush();if(Ext.isString(j)){a.tag=j}else{Ext.apply(a,j)}if(a.tpl){if(e){d=h.frameElNames;g=d.length;c=h.id+"-frame1";h.frameGenId=1;a.tplData=Ext.apply({},{$comp:h,fgid:c,ui:h.ui,uiCls:h.uiCls,frameCls:h.frameCls,baseCls:h.baseCls,frameWidth:e.maxWidth,top:!!e.top,left:!!e.left,right:!!e.right,bottom:!!e.bottom,renderData:h.initRenderData()},h.getFramePositions(e));for(b=0;b<g;b++){k=d[b];h.addChildEls({name:"frame"+k,id:c+k})}h.addChildEls({name:"frameBody",id:c+"MC"})}else{a.tplData=h.initRenderData()}}return a},initFramingTpl:function(b){var a=b?this.getTpl("frameTableTpl"):this.getTpl("frameTpl");if(a&&!a.applyRenderTpl){this.setupFramingTpl(a)}return a},setupFramingTpl:function(a){a.applyRenderTpl=this.doApplyRenderTpl;a.renderDockedItems=this.doRenderFramingDockedItems},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},getRenderTree:function(){var a=this;if(!a.hasListeners.beforerender||a.fireEvent("beforerender",a)!==false){a.beforeRender();a.rendering=true;if(a.el){return{tag:"div",id:(a.$pid=Ext.id())}}return a.getElConfig()}return null},initContainer:function(a){var b=this;if(!a&&b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=a.dom?a:Ext.get(a);return b.container},initRenderData:function(){var a=this;return Ext.apply({$comp:a,id:a.id,ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame},a.renderData)},initRenderTpl:function(){var a=this.getTpl("renderTpl");if(a&&!a.renderContent){this.setupRenderTpl(a)}return a},onRender:function(d,e){var g=this,i=g.x,h=g.y,c,a,j,b=g.el;if(Ext.scopeResetCSS&&!g.ownerCt){if(b.dom==Ext.getBody().dom){b.parent().addCls(Ext.resetCls)}else{g.resetEl=b.wrap({cls:Ext.resetCls})}}g.applyRenderSelectors();delete g.rendering;g.rendered=true;c=null;if(i!==undefined){c=c||{};c.x=i}if(h!==undefined){c=c||{};c.y=h}if(!g.getFrameInfo()&&Ext.isBorderBox){a=g.width;j=g.height;if(typeof a=="number"){c=c||{};c.width=a}if(typeof j=="number"){c=c||{};c.height=j}}g.lastBox=g.el.lastBox=c},render:function(c,b){var e=this,d=e.el&&(e.el=Ext.get(e.el)),a,g;Ext.suspendLayouts();c=e.initContainer(c);g=e.getInsertPosition(b);if(!d){a=e.getRenderTree();if(a){if(g){d=Ext.DomHelper.insertBefore(g,a)}else{d=Ext.DomHelper.append(c,a)}e.wrapPrimaryEl(d)}}else{e.initStyles(d);if(e.allowDomMove!==false){if(g){c.dom.insertBefore(d.dom,g)}else{c.dom.appendChild(d.dom)}}}if(d){e.finishRender(b)}Ext.resumeLayouts(!c.isDetachedBody)},ensureAttachedToBody:function(c){var b=this,a;while(b.ownerCt){b=b.ownerCt}if(b.container.isDetachedBody){b.container=a=Ext.getBody();a.appendChild(b.el.dom);if(c){b.updateLayout()}if(typeof b.x=="number"||typeof b.y=="number"){b.setPosition(b.x,b.y)}}},setupRenderTpl:function(a){a.renderBody=a.renderContent=this.doRenderContent},wrapPrimaryEl:function(a){this.el=Ext.get(a,true)},initFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var h=this,e=h.getFrameInfo(),j,a,c,b,d=h.frameElNames,g=d.length,k;if(e){j=e.maxWidth;a=h.getFrameTpl(e.table);h.frameGenId=c=(h.frameGenId||0)+1;c=h.id+"-frame"+c;a.insertFirst(h.el,Ext.apply({$comp:h,fgid:c,ui:h.ui,uiCls:h.uiCls,frameCls:h.frameCls,baseCls:h.baseCls,frameWidth:j,top:!!e.top,left:!!e.left,right:!!e.right,bottom:!!e.bottom},h.getFramePositions(e)));h.frameBody=h.el.down("."+h.frameCls+"-mc");h.removeChildEls(function(i){return i.id&&h.frameIdRegex.test(i.id)});for(b=0;b<g;b++){k=d[b];h["frame"+k]=h.el.getById(c+k)}}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var e=this,h=this.frameSize&&this.frameSize.table,g=this.frameTL,d=this.frameBL,c=this.frameML,a=this.frameMC,b;this.initFrame();if(a){if(e.frame){b=this.frameMC.dom.className;a.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=a;a.dom.className=b;if(h){e.el.query("> table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}if(c){c.remove()}}}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return false}var g=this,i=g.frameInfoCache,a=g.el||g.protoEl,j=a.dom?a.dom.className:a.classList.join(" "),d=i[j],e,c,h,b;if(d==null){e=Ext.fly(g.getStyleProxy(j),"frame-style-el");c=e.getStyle("background-position-x");h=e.getStyle("background-position-y");if(!c&&!h){b=e.getStyle("background-position").split(" ");c=b[0];h=b[1]}d=g.calculateFrame(c,h);if(d){a.setStyle("background-image","none")}i[j]=d}g.frame=!!d;g.frameSize=d;return d},calculateFrame:function(h,g){if(!(parseInt(h,10)>=1000000&&parseInt(g,10)>=1000000)){return false}var a=Math.max,b=parseInt(h.substr(3,2),10),e=parseInt(h.substr(5,2),10),c=parseInt(g.substr(3,2),10),i=parseInt(g.substr(5,2),10),d={table:h.substr(0,3)=="110",vertical:g.substr(0,3)=="110",top:a(b,e),right:a(e,c),bottom:a(i,c),left:a(b,i)};d.maxWidth=a(d.top,d.right,d.bottom,d.left);d.width=d.left+d.right;d.height=d.top+d.bottom;return d},getStyleProxy:function(b){var a=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.getBody().createChild({style:{position:"absolute",top:"-10000px"}},null,true));a.className=b;return a},getFramePositions:function(e){var h=this,i=e.maxWidth,j=h.dock,d,b,g,c,a;if(e.vertical){b="0 -"+(i*0)+"px";g="0 -"+(i*1)+"px";if(j&&j=="right"){b="right -"+(i*0)+"px";g="right -"+(i*1)+"px"}d={tl:"0 -"+(i*0)+"px",tr:"0 -"+(i*1)+"px",bl:"0 -"+(i*2)+"px",br:"0 -"+(i*3)+"px",ml:"-"+(i*1)+"px 0",mr:"right 0",tc:b,bc:g}}else{c="-"+(i*0)+"px 0";a="right 0";if(j&&j=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(i*2)+"px",tr:"right -"+(i*3)+"px",bl:"0 -"+(i*4)+"px",br:"right -"+(i*5)+"px",ml:c,mr:a,tc:"0 -"+(i*0)+"px",bc:"0 -"+(i*1)+"px"}}return d},getFrameTpl:function(a){return this.getTpl(a?"frameTableTpl":"frameTpl")},frameInfoCache:{}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.property,e=c.direction||"ASC",a=e.toUpperCase()=="DESC"?-1:1;return function(h,g){return a*b.call(c,h,g)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,g=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){g=a(g);e=a(e)}return g>e?1:(g<e?-1:0)},getRoot:function(a){return this.root===undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,"ASC","DESC");a.updateSortFunction()},updateSortFunction:function(a){var b=this;a=a||b.sorterFn||b.defaultSorterFn;b.sort=b.createSortFunction(a)}});Ext.define("Ext.Action",{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconCls:function(a){this.initialConfig.iconCls=a;this.callEach("setIconCls",[a])},getIconCls:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,c){var b=this.items,d=0,a=b.length;for(;d<a;d++){b[d][e].apply(b[d],c)}},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){Ext.Array.remove(this.items,a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||Ext.global,arguments)}});Ext.define("Ext.Layer",{extend:"Ext.Element",uses:["Ext.Shadow"],statics:{shims:[]},isLayer:true,constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,g=b.parentEl,e=g?Ext.getDom(g):document.body,h=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}Ext.Element.addToCache(c);if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(h){c.setVisibilityMode(Ext.Element[h.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=new Ext.Shadow({offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var j=this,n=j.shadow,i,e,a,d,c,o,m,g,k;if(!j.updating&&j.isVisible()&&(n||j.useShim)){d=j.getShim();c=j.getLeft(true);o=j.getTop(true);m=j.dom.offsetWidth;g=j.dom.offsetHeight;if(n&&!j.shadowDisabled){if(b&&!n.isVisible()){n.show(j)}else{n.realign(c,o,m,g)}if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();if(n.isVisible()){i=n.el.getXY();e=d.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;i[0]-=2;i[1]-=4}e.left=(i[0])+"px";e.top=(i[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(m,g);d.setLeftTop(c,o)}}}else{if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();d.setSize(m,g);d.setLeftTop(c,o)}}}return j},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i<l.left){i=l.left;d=true}if(e<l.top){e=l.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[i,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,h,g){var c=this,a;a=function(){if(e){c.sync(true)}if(h){h()}};if(!e){c.hideUnders(true)}c.callParent([e,b,d,h,g]);if(!b){a()}return c},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setXY:function(d,a,c,g,e){var b=this;g=b.createCB(g);b.fixDisplay();b.beforeAction();b.callParent([d,a,c,g,e]);if(!a){g()}return b},createCB:function(c){var a=this,b=a.shadow&&a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,e,i,g){var d=this;i=d.createCB(i);d.beforeAction();d.callParent([a,c,b,e,i,g]);if(!b){i()}return d},setWidth:function(a,b,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([a,b,d,g,e]);if(!b){g()}return c},setHeight:function(b,a,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([b,a,d,g,e]);if(!a){g()}return c},setBounds:function(h,g,a,j,b,c,i,d){var e=this;i=e.createCB(i);e.beforeAction();if(!b){Ext.Layer.superclass.setXY.call(e,[h,g]);Ext.Layer.superclass.setSize.call(e,a,j);i()}else{e.callParent([h,g,a,j,b,c,i,d])}return e},setZIndex:function(a){var b=this;b.zindex=a;if(b.getShim()){b.shim.setStyle("z-index",a++)}if(b.shadow){b.shadow.setZIndex(a++)}return b.setStyle("z-index",a)},onOpacitySet:function(a){var b=this.shadow;if(b){b.setOpacity(a)}}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:(function(){return Ext.String.format('<div class="{0}{1}-shadow" role="presentation"></div>',Ext.baseCSSPrefix,Ext.isIE&&!Ext.supports.CSS3BoxShadow?"ie":"css")}()),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){var c=[].concat(this.shadows),b,a=c.length;for(b=0;b<a;b++){c[b].remove()}this.shadows=[]}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on("resize",b._onContainerResize,b);b.zseed=Ext.Number.from(b.rendered?a.getEl().getStyle("zIndex"):undefined,b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(b){this.zseed=b;var a=this.assignZIndices();this._activateLast();return a},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,g=this.zseed,d;for(;e<b;e++){d=c[e];if(d&&!d.hidden){g=d.setZIndex(g)}}this._activateLast();return g},_setActiveChild:function(b,a){var c=this.front;if(b!==c){if(c&&!c.destroying){c.setActive(false,b)}this.front=b;if(b&&b!=a){b.setActive(true);if(b.modal){this._showModalMask(b)}}}},onComponentHide:function(a){a.setActive(false);this._activateLast()},_activateLast:function(){var e=this,a=e.zIndexStack,d=a.length-1,c=e.front,b;e.front=undefined;for(;d>=0&&a[d].hidden;--d){}if((b=a[d])){e._setActiveChild(b,c);if(b.modal){return}}for(;d>=0;--d){b=a[d];if(b.isVisible()&&b.modal){e._showModalMask(b);return}}e._hideModalMask()},_showModalMask:function(a){var c=this,e=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():a.container,d=b.getBox();if(b.dom===document.body){d.height=Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight());d.width=Math.max(document.body.scrollWidth,d.width)}if(!c.mask){c.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});c.mask.setVisibilityMode(Ext.Element.DISPLAY);c.mask.on("click",c._onMaskClick,c)}c.mask.maskTarget=b;b.addCls(Ext.baseCSSPrefix+"body-masked");c.mask.setBox(d);c.mask.setStyle("zIndex",e);c.mask.show()},_hideModalMask:function(){var a=this.mask;if(a&&a.isVisible()){a.maskTarget.removeCls(Ext.baseCSSPrefix+"body-masked");a.maskTarget=undefined;a.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){var a=this.mask,b,c;if(a&&a.isVisible()){a.hide();b=a.maskTarget;if(b.dom===document.body){c={height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth)}}else{c=b.getViewSize(true)}a.setSize(c);a.show()}},register:function(a){var b=this;if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=b;b.list[a.id]=a;b.zIndexStack.push(a);a.on("hide",b.onComponentHide,b)},unregister:function(a){var b=this,c=b.list;delete a.zIndexManager;if(c&&c[a.id]){delete c[a.id];a.un("hide",b.onComponentHide);Ext.Array.remove(b.zIndexStack,a);b._activateLast()}},get:function(a){return a.isComponent?a:this.list[a]},bringToFront:function(b){var c=this,a=false,d=c.zIndexStack;b=c.get(b);if(b!==c.front){Ext.Array.remove(d,b);if(b.preventBringToFront){d.unshift(b)}else{d.push(b)}c.assignZIndices();a=true;this.front=b}if(a&&b.modal){c._showModalMask(b)}return a},sendToBack:function(a){var b=this;a=b.get(a);Ext.Array.remove(b.zIndexStack,a);b.zIndexStack.unshift(a);b.assignZIndices();this._activateLast();return a},hideAll:function(){var b=this.list,a,c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(a.isComponent&&a.isVisible()){a.hide()}}}},hide:function(){var d=0,b=this.zIndexStack,a=b.length,c;this.tempHidden=[];for(;d<a;d++){c=b[d];if(c.isVisible()){this.tempHidden.push(c);c.el.hide()}}},show:function(){var c=0,d=this.tempHidden,a=d?d.length:0,b;for(;c<a;c++){b=d[c];b.el.show();b.setPosition(b.x,b.y)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(g,e){var h=[],d=0,b=this.zIndexStack,a=b.length,c;for(;d<a;d++){c=b[d];if(g.call(e||c,c)!==false){h.push(c)}}return h},each:function(c,b){var d=this.list,e,a;for(e in d){if(d.hasOwnProperty(e)){a=d[e];if(a.isComponent&&c.call(b||a,a)===false){return}}}},eachBottomUp:function(g,e){var b=this.zIndexStack,d=0,a=b.length,c;for(;d<a;d++){c=b[d];if(c.isComponent&&g.call(e||c,c)===false){return}}},eachTopDown:function(e,d){var a=this.zIndexStack,c=a.length,b;for(;c-->0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){var b=this,c=b.list,a,d;for(d in c){if(c.hasOwnProperty(d)){a=c[d];if(a.isComponent){a.destroy()}}}delete b.zIndexStack;delete b.list;delete b.container;delete b.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,notifyOccluded:false,_execOnAll:function(c,b){var d,a,e;for(d in this.ids){for(a in this.ids[d]){e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(g,b){var e=[],d,c,a;for(d in g.groups){for(c in this.ids[d]){a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true),c,a;for(c=0,a=b.length;c<a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&&a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&&this.handleIds[b][a])},getDDById:function(d){var c=this,b,a;for(b in this.ids){a=this.ids[b][d];if(a instanceof Ext.dd.DDTarget){return a}}return null},handleMouseDown:function(c,b){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(c)}this.currentTarget=c.getTarget();this.dragCurrent=b;var a=b.getEl();this.startX=c.getPageX();this.startY=c.getPageY();this.deltaX=this.startX-a.offsetLeft;this.deltaY=this.startY-a.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var d=Ext.dd.DragDropManager;d.startDrag(d.startX,d.startY)},this.clickTimeThresh)},startDrag:function(a,b){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(a,b);this.dragCurrent.startDrag(a,b)}this.dragThreshMet=true},handleMouseUp:function(a){if(Ext.tip&&Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(a,true)}this.stopDrag(a);this.stopEvent(a)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(a){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(a);this.dragCurrent.endDrag(a)}this.dragCurrent.onMouseUp(a)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(c){if(!this.dragCurrent){return true}if(Ext.isIE&&(c.button!==0&&c.button!==1&&c.button!==2)){this.stopEvent(c);return this.handleMouseUp(c)}var b,a;if(!this.dragThreshMet){b=Math.abs(this.startX-c.getPageX());a=Math.abs(this.startY-c.getPageY());if(b>this.clickPixelThresh||a>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(c);this.dragCurrent.onDrag(c);if(!this.dragCurrent.moveOnly){this.fireEvents(c,false)}}this.stopEvent(c);return true},fireEvents:function(n,q){var p=this,k=p.dragCurrent,r=n.getPoint(),b,t,d=[],a=[],g=[],l=[],j=[],c=[],o,h,m,s;if(!k||k.isLocked()){return}for(h in p.dragOvers){b=p.dragOvers[h];if(!p.isTypeOfDD(b)){continue}if(!this.isOverTarget(r,b,p.mode)){g.push(b)}a[h]=true;delete p.dragOvers[h]}for(s in k.groups){if("string"!=typeof s){continue}for(h in p.ids[s]){b=p.ids[s][h];if(p.isTypeOfDD(b)&&(t=b.getEl())&&(b.isTarget)&&(!b.isLocked())&&(Ext.fly(t).isVisible(true))&&((b!=k)||(k.ignoreSelf===false))){if((b.zIndex=p.getZIndex(t))!==-1){o=true}d.push(b)}}}if(o){Ext.Array.sort(d,p.byZIndex)}for(h=0,m=d.length;h<m;h++){b=d[h];if(p.isOverTarget(r,b,p.mode)){if(q){j.push(b)}else{if(!a[b.id]){c.push(b)}else{l.push(b)}p.dragOvers[b.id]=b}if(!p.notifyOccluded){break}}}if(p.mode){if(g.length){k.b4DragOut(n,g);k.onDragOut(n,g)}if(c.length){k.onDragEnter(n,c)}if(l.length){k.b4DragOver(n,l);k.onDragOver(n,l)}if(j.length){k.b4DragDrop(n,j);k.onDragDrop(n,j)}}else{for(h=0,m=g.length;h<m;++h){k.b4DragOut(n,g[h].id);k.onDragOut(n,g[h].id)}for(h=0,m=c.length;h<m;++h){k.onDragEnter(n,c[h].id)}for(h=0,m=l.length;h<m;++h){k.b4DragOver(n,l[h].id);k.onDragOver(n,l[h].id)}for(h=0,m=j.length;h<m;++h){k.b4DragDrop(n,j[h].id);k.onDragDrop(n,j[h].id)}}if(q&&!j.length){k.onInvalidDrop(n)}},getZIndex:function(b){var a=document.body,c,d=-1;b=Ext.getDom(b);while(b!==a){if(!isNaN(c=Number(Ext.fly(b).getStyle("zIndex")))){d=c}b=b.parentNode}return d},byZIndex:function(b,a){return b.zIndex<a.zIndex},getBestMatch:function(c){var e=null,b=c.length,d,a;if(b==1){e=c[0]}else{for(d=0;d<b;++d){a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()<a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){var a,c,d,e;for(a in b){if("string"!=typeof a){continue}for(c in this.ids[a]){d=this.ids[a][c];if(this.isTypeOfDD(d)){e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}if(i.getRegion){return i.getRegion()}var g=i.getEl(),m,d,c,o,n,p,a,k,h;try{m=Ext.Element.getXY(g)}catch(j){}if(!m){return null}d=m[0];c=d+g.offsetWidth;o=m[1];n=o+g.offsetHeight;p=o-i.padding[0];a=c+i.padding[1];k=n+i.padding[2];h=d-i.padding[3];return new Ext.util.Region(p,a,k,h)},isOverTarget:function(j,a,c){var e=this.locationCache[a.id],i,g,b,d,h;if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(j);i=this.dragCurrent;if(!i||!i.getTargetCoord||(!c&&!i.constrainX&&!i.constrainY)){return a.cursorIsOver}a.overlap=null;g=i.getTargetCoord(j.x,j.y);b=i.getDragEl();d=new Ext.util.Region(g.y,g.x+b.offsetWidth,g.y+b.offsetHeight,g.x);h=d.intersect(e);if(h){a.overlap=h;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&&a.id;this.css=this.el&&a.style},getPosX:function(a){return Ext.Element.getX(a)},getPosY:function(a){return Ext.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode,b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&&(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.Element.getXY(c);Ext.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount<=2000){setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");this.dragRegion=new Ext.util.Region(0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(a){this.el=Ext.get(a);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent("mouseover",a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(a){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent("mouseout",this,a)}},onMouseDown:function(b,a){if(this.disabled||b.dragTracked){return}this.dragTarget=this.delegate?a:this.handle.dom;this.startXY=this.lastXY=b.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent("mousedown",this,b)===false||this.fireEvent("beforedragstart",this,b)===false||this.onBeforeStart(b)===false){return}this.mouseIsDown=true;b.dragTracked=true;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[b])}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.max(Math.abs(a[0]-b[0]),Math.abs(a[1]-b[1]))>this.tolerance){this.triggerStart(d)}else{return}}if(this.fireEvent("mousemove",this,d)===false){this.onMouseUp(d)}else{this.onDrag(d);this.fireEvent("drag",this,d)}},onMouseUp:function(a){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(a)}a.preventDefault();this.fireEvent("mouseup",this,a);this.endDrag(a)},endDrag:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,g){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return g}e.translateBy(g[0]-b[0],g[1]-b[1]);if(e.right>a.right){g[0]+=d=(a.right-e.right);e.left+=d}if(e.left<a.left){g[0]+=(a.left-e.left)}if(e.bottom>a.bottom){g[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top<a.top){g[1]+=(a.top-e.top)}return g}}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b=="string"){return b}var c=b.id;if(!c&&a!==false){c="extdd-"+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d=="string"){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles,b,a;for(b=0,a=c.length;b<a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var g=this.getId(d,false),e=this.elements[g],c,b,a;if(e){delete this.elements[g];if(e.handles){c=e.handles;for(b=0,a=c.length;b<a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!="string"){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!="string"){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=""},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&&b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(h,k){if(k||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var l=h.getXY(),m=h.getPoint(),i=this.proc,g=this.els,b,d,a,j;for(b in g){d=g[b];a=d._region;j=d.ddScrollConfig?d.ddScrollConfig:this;if(a&&a.contains(m)&&d.isScrollable()){if(a.bottom-m.y<=j.vthresh){if(i.el!=d){this.startProc(d,"down")}return}else{if(a.right-m.x<=j.hthresh){if(i.el!=d){this.startProc(d,"left")}return}else{if(m.y-a.top<=j.vthresh){if(i.el!=d){this.startProc(d,"up")}return}else{if(m.x-a.left<=j.hthresh){if(i.el!=d){this.startProc(d,"right")}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]=="object"){a[b]._region=a[b].getRegion()}}}});Ext.define("Ext.form.FieldAncestor",{initFieldAncestor:function(){var a=this,b=a.onFieldAncestorSubtreeChange;a.addEvents("fieldvaliditychange","fielderrorchange");a.on("add",b,a);a.on("remove",b,a);a.initFieldDefaults()},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},onFieldAncestorSubtreeChange:function(b,e){var c=this,d=!!e.ownerCt;function a(g){var h=g.isFieldLabelable,i=g.isFormField;if(h||i){if(h){c["onLabelable"+(d?"Added":"Removed")](g)}if(i){c["onField"+(d?"Added":"Removed")](g)}}else{if(g.isContainer){Ext.Array.forEach(g.getRefItems(),a)}}}a(e)},onLabelableAdded:function(a){var b=this;b.mon(a,"errorchange",b.handleFieldErrorChange,b,{buffer:10});a.setFieldDefaults(b.fieldDefaults)},onFieldAdded:function(b){var a=this;a.mon(b,"validitychange",a.handleFieldValidityChange,a)},onLabelableRemoved:function(a){var b=this;b.mun(a,"errorchange",b.handleFieldErrorChange,b)},onFieldRemoved:function(b){var a=this;a.mun(b,"validitychange",a.handleFieldValidityChange,a)},handleFieldValidityChange:function(c,b){var a=this;a.fireEvent("fieldvaliditychange",a,c,b);a.onFieldValidityChange(c,b)},handleFieldErrorChange:function(b,a){var c=this;c.fireEvent("fielderrorchange",c,b,a);c.onFieldErrorChange(b,a)},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.form.action.Submit",{extend:"Ext.form.action.Action",alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var k=[],i,q,e=this.form,d=this.getParams(),c=[],g=e.getFields().items,h,r=g.length,j,o,m,n,l,p,b;for(h=0;h<r;h++){j=g[h];if(j.isFileUpload()){c.push(j)}}function a(s,t){k.push({tag:"input",type:"hidden",name:s,value:Ext.String.htmlEncode(t)})}for(o in d){if(d.hasOwnProperty(o)){m=d[o];if(Ext.isArray(m)){l=m.length;for(n=0;n<l;n++){a(o,m[n])}}else{a(o,m)}}}i={tag:"form",action:this.getUrl(),method:this.getMethod(),target:this.target||"_self",style:"display:none",cn:k};if(c.length){i.encoding=i.enctype="multipart/form-data"}q=Ext.DomHelper.append(Ext.getBody(),i);b=c.length;for(p=0;p<b;p++){j=c[p];if(j.rendered){q.appendChild(j.extractFileInput())}}return q},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&&!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var h=this.form,e=h.errorReader,c,j,g,a,b;if(e){c=e.read(d);b=c.records;j=[];if(b){for(g=0,a=b.length;g<a;g++){j[g]=b[g].data}}if(j.length<1){j=null}return{success:c.success,errors:j}}return Ext.decode(d.responseText)}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.form.field.VTypes",(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}()));Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var g=this,i=[],a=g.eventRelayRe,b=c.locked.getView(),h=c.normal.getView(),d,e;Ext.apply(g,{lockedView:b,normalView:h,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});g.mixins.observable.constructor.call(g,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){i.push(e)}}g.relayEvents(b,i);g.relayEvents(h,i);h.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter});b.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter})},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(a){return this.getViewForColumn(a).getEl()},getViewForColumn:function(b){var a=this.lockedView,c;a.headerCt.cascade(function(d){if(d===b){c=true;return false}});return c?a:this.normalView},onItemMouseEnter:function(c,b){var g=this,d=g.lockedView,a=g.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b||[]);a=this.normalView;a[c].apply(a,b||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(a){return this.normalView.getNode(a)},getCell:function(b,c){var a=this.getViewForColumn(c),d;d=a.getNode(b);return Ext.fly(d).down(c.getCellSelector())},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!b){a=this.normalView.getRecord(b)}return a},addElListener:function(a,c,b){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.grid.PagingScroller",{percentageFromEdge:0.35,numFromEdge:2,trailingBufferZone:5,leadingBufferZone:15,scrollToLoadBuffer:200,viewSize:0,rowHeight:21,tableStart:0,tableEnd:0,constructor:function(a){var b=this;b.variableRowHeight=a.variableRowHeight;b.bindView(a.view);Ext.apply(b,a);b.callParent(arguments)},bindView:function(b){var e=this,d={scroll:{fn:e.onViewScroll,element:"el",scope:e},render:e.onViewRender,resize:e.onViewResize,boxready:{fn:e.onViewResize,scope:e,single:true},refresh:e.onViewRefresh,scope:e},a={guaranteedrange:e.onGuaranteedRange,scope:e},c={reconfigure:e.onGridReconfigure,scope:e};if(e.variableRowHeight){d.beforerefresh=e.beforeViewRefresh}if(e.view){e.view.el.un("scroll",e.onViewScroll,e);e.view.un(d);e.store.un(a);if(e.grid){e.grid.un(c)}delete e.view.refreshSize}e.view=b;e.grid=e.view.up("tablepanel");e.store=b.store;if(b.rendered){e.viewSize=e.store.viewSize=Math.ceil(b.getHeight()/e.rowHeight)+e.trailingBufferZone+(e.numFromEdge*2)+e.leadingBufferZone}e.view.refreshSize=Ext.Function.createInterceptor(e.view.refreshSize,e.beforeViewrefreshSize,e);e.position=0;if(e.grid){e.grid.on(c)}else{e.view.on({added:function(){e.grid=e.view.up("tablepanel");e.grid.on(c)},single:true})}e.view.on(e.viewListeners=d);e.store.on(a)},onGridReconfigure:function(a){this.bindView(a.view)},onViewRender:function(){var b=this,a=b.view.el;a.setStyle("position","relative");b.stretcher=a.createChild({style:{position:"absolute",width:"1px",height:0,top:0,left:0}},a.dom.firstChild)},onViewResize:function(b,d,a){var e=this,c;c=Math.ceil(a/e.rowHeight)+e.trailingBufferZone+(e.numFromEdge*2)+e.leadingBufferZone;if(c>e.viewSize){e.viewSize=e.store.viewSize=c;e.handleViewScroll(e.lastScrollDirection||1)}},beforeViewRefresh:function(){var b=this,a=b.view,c,d=b.lastScrollDirection;b.commonRecordIndex=undefined;if(d&&(b.previousStart!==undefined)&&(b.scrollProportion===undefined)){c=a.getNodes();if(d===1){if(b.tableStart<=b.previousEnd){b.commonRecordIndex=c.length-1}}else{if(d===-1){if(b.tableEnd>=b.previousStart){b.commonRecordIndex=0}}}b.scrollOffset=-a.el.getOffsetsTo(c[b.commonRecordIndex])[1];b.commonRecordIndex-=(b.tableStart-b.previousStart)}else{b.scrollOffset=undefined}},onViewRefresh:function(){var d=this,g=d.store,c,e=d.view,j=e.el,k=j.dom,m,i,b,l=j.child("table",true),h,a;d.disabled=true;if(g.getCount()===g.getTotalCount()||(g.isFiltered()&&!g.remoteFilter)){d.stretcher.setHeight(0);d.position=k.scrollTop=0;l.style.position="absolute";return}d.stretcher.setHeight(c=d.getScrollHeight());a=k.scrollTop;d.isScrollRefresh=(a>0);if(d.scrollProportion!==undefined){d.scrollProportion=a/(c-l.offsetHeight);l.style.position="absolute";l.style.top=(d.scrollProportion?(c*d.scrollProportion)-(l.offsetHeight*d.scrollProportion):0)+"px"}else{l.style.position="absolute";l.style.top=(h=(d.tableStart||0)*d.rowHeight)+"px";if(d.scrollOffset){m=e.getNodes();i=-j.getOffsetsTo(m[d.commonRecordIndex])[1];b=i-d.scrollOffset;d.position=(a+=b)}else{if((h>a)||((h+l.offsetHeight)<a+k.clientHeight)){d.lastScrollDirection=-1;d.position=k.scrollTop=h}}}d.disabled=false},beforeViewrefreshSize:function(){if(this.isScrollRefresh){return(this.isScrollRefresh=false)}},onGuaranteedRange:function(b,e,a){var c=this,d=c.store;if(b.length&&c.visibleStart<b[0].index){return}c.previousStart=c.tableStart;c.previousEnd=c.tableEnd;c.tableStart=e;c.tableEnd=a;d.loadRecords(b)},onViewScroll:function(g,c){var d=this,a=d.view,b=d.position;d.position=a.el.dom.scrollTop;if(!d.disabled){d.lastScrollDirection=d.position>b?1:-1;if(b!==d.position){d.handleViewScroll(d.lastScrollDirection)}}},handleViewScroll:function(h){var d=this,j=d.store,g=d.view,e=d.viewSize,k=j.getTotalCount(),c=k-e,b=d.getFirstVisibleRowIndex(),i=d.getLastVisibleRowIndex(),a,l;if(k>=e){d.scrollProportion=undefined;if(h==-1){if(b!==undefined){if(b<(d.tableStart+d.numFromEdge)){a=Math.max(0,i+d.trailingBufferZone-e)}}else{d.scrollProportion=g.el.dom.scrollTop/(g.el.dom.scrollHeight-g.el.dom.clientHeight);a=Math.max(0,k*d.scrollProportion-(e/2)-d.numFromEdge-((d.leadingBufferZone+d.trailingBufferZone)/2))}}else{if(b!==undefined){if(i>(d.tableEnd-d.numFromEdge)){a=Math.max(0,b-d.trailingBufferZone)}}else{d.scrollProportion=g.el.dom.scrollTop/(g.el.dom.scrollHeight-g.el.dom.clientHeight);a=k*d.scrollProportion-(e/2)-d.numFromEdge-((d.leadingBufferZone+d.trailingBufferZone)/2)}}if(a!==undefined){if(a>c){a=c&~1;l=k-1}else{a=a&~1;l=a+e-1}if(j.rangeCached(a,l)){d.cancelLoad();j.guaranteeRange(a,l)}else{d.attemptLoad(a,l)}}}},getFirstVisibleRowIndex:function(){var e=this,b=e.store,a=e.view,j=a.el.dom.scrollTop,g,d,c,h;if(e.variableRowHeight){g=a.getNodes();d=b.getCount();for(c=0;c<d;c++){h=Ext.fly(g[c]).getOffsetsTo(a.el)[1]+g[c].offsetHeight;if(h>a.el.dom.clientHeight){return}if(h>0){return c+e.tableStart}}}else{return Math.floor(j/e.rowHeight)}},getLastVisibleRowIndex:function(){var h=this,c=h.store,a=h.view,b=a.el.dom.clientHeight,j,g,e,d;if(h.variableRowHeight){j=a.getNodes();g=c.getCount();for(e=g-1;e>=0;e--){d=Ext.fly(j[e]).getOffsetsTo(a.el)[1];if(d<0){return}if(d<b){return e+h.tableStart}}}else{return h.getFirstVisibleRowIndex()+Math.ceil(b/h.rowHeight)+1}},getScrollHeight:function(){var e=this,a=e.view,d,h,b=e.store,g=0,c=!e.hasOwnProperty("rowHeight");if(e.variableRowHeight){d=e.view.el.down("table",true);if(c){e.initialTableHeight=d.offsetHeight;e.rowHeight=e.initialTableHeight/e.store.getCount()}else{g=d.offsetHeight-e.initialTableHeight}}else{if(c){h=a.el.down(a.getItemSelector());if(h){e.rowHeight=h.getHeight(false,true)}}}return Math.floor(b.getTotalCount()*e.rowHeight)+g},attemptLoad:function(c,a){var b=this;if(b.scrollToLoadBuffer){if(!b.loadTask){b.loadTask=new Ext.util.DelayedTask(b.doAttemptLoad,b,[])}b.loadTask.delay(b.scrollToLoadBuffer,b.doAttemptLoad,b,[c,a])}else{b.store.guaranteeRange(c,a)}},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(b,a){this.store.guaranteeRange(b,a)},destroy:function(){var b=this,a=b.viewListeners.scroll;b.store.un({guaranteedrange:b.onGuaranteedRange,scope:b});b.view.un(b.viewListeners);if(b.view.rendered){b.stretcher.remove();b.view.el.un("scroll",a.fn,a.scope)}}});Ext.define("Ext.grid.feature.Feature",{extend:"Ext.util.Observable",alias:"feature.feature",isFeature:true,disabled:false,hasFeatureEvent:true,eventPrefix:null,eventSelector:null,view:null,grid:null,collectData:false,init:Ext.emptyFn,getFeatureTpl:function(){return""},getFireEventArgs:function(b,a,c,d){return[b,a,c,d]},attachEvents:function(){},getFragmentTpl:Ext.emptyFn,mutateMetaRowTpl:Ext.emptyFn,getMetaRowTplFragments:function(){return{}},getTableFragments:function(){return{}},getAdditionalData:function(c,a,b,d){return{}},enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.grid.feature.Grouping",{extend:"Ext.grid.feature.Feature",alias:"feature.grouping",eventPrefix:"group",eventSelector:"."+Ext.baseCSSPrefix+"grid-group-hd",bodySelector:"."+Ext.baseCSSPrefix+"grid-group-body",constructor:function(){var a=this;a.collapsedState={};a.callParent(arguments)},groupHeaderTpl:"{columnName}: {name}",depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+"grid-group-collapsed",hdCollapsedCls:Ext.baseCSSPrefix+"grid-group-hd-collapsed",groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedHeader:false,startCollapsed:false,enableGroupingMenu:true,enableNoGroups:true,enable:function(){var c=this,a=c.view,b=a.store,d;c.lastGroupField=c.getGroupField();if(c.lastGroupIndex){b.group(c.lastGroupIndex)}c.callParent();d=c.view.headerCt.getMenu().down("#groupToggleMenuItem");d.setChecked(true,true);c.refreshIf()},disable:function(){var d=this,a=d.view,b=a.store,g=b.remoteGroup,e,c;c=b.groupers.first();if(c){d.lastGroupIndex=c.property;d.block();b.clearGrouping();d.unblock()}d.callParent();e=d.view.headerCt.getMenu().down("#groupToggleMenuItem");e.setChecked(true,true);e.setChecked(false,true);if(!g){a.refresh()}},refreshIf:function(){if(this.blockRefresh!==true){if(this.grid.ownerCt&&this.grid.ownerCt.lockable){this.grid.ownerCt.view.refresh()}else{this.view.refresh()}}},getFeatureTpl:function(b,c,a,e){var d=this;return["<tpl if=\"typeof rows !== 'undefined'\">",'<tr id="{groupHeaderId}" class="'+Ext.baseCSSPrefix+"grid-group-hd "+(d.startCollapsed?d.hdCollapsedCls:"")+' {hdCollapsedCls}"><td class="'+Ext.baseCSSPrefix+'grid-cell" colspan="'+c.columns.length+'" {[this.indentByDepth(values)]}><div class="'+Ext.baseCSSPrefix+'grid-cell-inner"><div class="'+Ext.baseCSSPrefix+'grid-group-title">{collapsed}{[this.renderGroupHeaderTpl(values)]}</div></div></td></tr>','<tr id="{groupBodyId}" class="'+Ext.baseCSSPrefix+"grid-group-body "+(d.startCollapsed?d.collapsedCls:"")+' {collapsedCls}"><td colspan="'+c.columns.length+'">{[this.recurse(values)]}</td></tr>',"</tpl>"].join("")},getFragmentTpl:function(){var a=this;return{indentByDepth:a.indentByDepth,depthToIndent:a.depthToIndent,renderGroupHeaderTpl:function(b){return Ext.XTemplate.getTpl(a,"groupHeaderTpl").apply(b)}}},indentByDepth:function(a){return'style="padding-left:'+((a.depth||0)*this.depthToIndent)+'px;"'},destroy:function(){delete this.view;delete this.prunedHeader},attachEvents:function(){var b=this,a=b.view;a.on({scope:b,groupclick:b.onGroupClick,rowfocus:b.onRowFocus});a.mon(a.store,{scope:b,groupchange:b.onGroupChange,remove:b.onRemove,add:b.onAdd,update:b.onUpdate});if(b.enableGroupingMenu){b.injectGroupingMenu()}b.pruneGroupedHeader();b.lastGroupField=b.getGroupField();b.block();b.onGroupChange();b.unblock()},onAdd:function(l,c){var j=this,k=j.view,a=j.getGroupField(),g=0,h=c.length,n,d,b,e,m;if(k.rendered){d={};n={};for(;g<h;++g){m=c[g].get(a);if(d[m]===undefined){d[m]=0}d[m]+=1}b=l.getGroups();for(g=0,h=b.length;g<h;++g){m=b[g];n[m.name]=m.children.length}for(m in d){if(d[m]===n[m]){e=true;break}}if(e){k.refresh()}}},onUpdate:function(c,b,d,e){var a=this.view;if(a.rendered&&!e||Ext.Array.contains(e,this.getGroupField())){a.refresh()}},onRemove:function(d,c){var e=this,b=e.getGroupField(),g=c.get(b),a=e.view;if(a.rendered){if(d.findExact(b,g)===-1){e.view.refresh()}}},injectGroupingMenu:function(){var b=this,a=b.view,c=a.headerCt;c.showMenuBy=b.showMenuBy;c.getMenuItems=b.getMenuItems()},showMenuBy:function(b,e){var d=this.getMenu(),c=d.down("#groupMenuItem"),a=e.groupable===false?"disable":"enable";c[a]();Ext.grid.header.Container.prototype.showMenuBy.apply(this,arguments)},getMenuItems:function(){var e=this,b=e.groupByText,d=e.disabled||!e.getGroupField(),a=e.showGroupsText,c=e.enableNoGroups,h=Ext.Function.bind(e.onGroupMenuItemClick,e),g=Ext.Function.bind(e.onGroupToggleMenuItemClick,e);return function(){var i=Ext.grid.header.Container.prototype.getMenuItems.call(this);i.push("-",{iconCls:Ext.baseCSSPrefix+"group-by-icon",itemId:"groupMenuItem",text:b,handler:h});if(c){i.push({itemId:"groupToggleMenuItem",text:a,checked:!d,checkHandler:g})}return i}},onGroupMenuItemClick:function(c,h){var d=this,i=c.parentMenu,j=i.activeHeader,a=d.view,b=a.store,g=b.remoteGroup;delete d.lastGroupIndex;d.block();d.enable();b.group(j.dataIndex);d.pruneGroupedHeader();d.unblock();if(!g){a.refresh()}},block:function(){this.blockRefresh=this.view.blockRefresh=true},unblock:function(){this.blockRefresh=this.view.blockRefresh=false},onGroupToggleMenuItemClick:function(a,b){this[b?"enable":"disable"]()},pruneGroupedHeader:function(){var a=this,b=a.getGroupedHeader();if(a.hideGroupedHeader&&b){if(a.prunedHeader){a.prunedHeader.show()}a.prunedHeader=b;b.hide()}},getGroupedHeader:function(){var a=this.getGroupField(),b=this.view.headerCt;return a?b.down("[dataIndex="+a+"]"):null},getGroupField:function(){var a=this.view.store.groupers.first();if(a){return a.property}return""},onRowFocus:function(c){var b=this.view.getNode(c),a=Ext.fly(b).up("."+this.collapsedCls);if(a){this.expand(a)}},expand:function(g,e){var c=this,a=c.view,d,b=c.lockingPartner;if(Ext.isString(g)){d=Ext.fly(c.getGroupBodyId(g),"_grouping")}else{d=Ext.fly(g,"_grouping");g=c.getGroupName(d)}if(c.collapsedState[g]){d.removeCls(c.collapsedCls);d.prev().removeCls(c.hdCollapsedCls);if(e!==true){a.refreshSize()}a.fireEvent("groupexpand");c.collapsedState[g]=false;if(b){b.expand(g,e)}}},expandAll:function(){var d=this,b=d.view,c=b.el.select(d.eventSelector).elements,g,a=c.length;for(g=0;g<a;g++){d.expand(Ext.fly(c[g]).next(),true)}b.refreshSize()},collapse:function(g,e){var c=this,a=c.view,d,b=c.lockingPartner;if(Ext.isString(g)){d=Ext.fly(c.getGroupBodyId(g),"_grouping")}else{d=Ext.fly(g,"_grouping");g=c.getGroupName(d)}if(!c.collapsedState[g]){d.addCls(c.collapsedCls);d.prev().addCls(c.hdCollapsedCls);if(e!==true){a.refreshSize()}a.fireEvent("groupcollapse");c.collapsedState[g]=true;if(b){b.collapse(g,e)}}},collapseAll:function(){var d=this,b=d.view,c=b.el.select(d.eventSelector).elements,g,a=c.length;for(g=0;g<a;g++){d.collapse(Ext.fly(c[g]).next(),true)}b.refreshSize()},onGroupChange:function(){var d=this,e=d.getGroupField(),c,a,b;if(d.hideGroupedHeader){if(d.lastGroupField){c=d.getMenuItem(d.lastGroupField);if(c){c.setChecked(true)}}if(e){a=d.view.headerCt.getVisibleGridColumns();b=((a.length===1)&&(a[0].dataIndex==e));c=d.getMenuItem(e);if(c&&!b){c.setChecked(false)}}}if(d.blockRefresh!==true){d.view.refresh()}d.lastGroupField=e},getMenuItem:function(b){var a=this.view,d=a.headerCt.down("gridcolumn[dataIndex="+b+"]"),c=a.headerCt.getMenu();return d?c.down("menuitem[headerId="+d.id+"]"):null},onGroupClick:function(a,c,g,d){var b=this;if(b.collapsedState[g]){b.expand(g)}else{b.collapse(g)}},getMetaRowTplFragments:function(){return{isRow:this.isRow,closeRow:this.closeRow}},isRow:function(){return"<tpl if=\"typeof rows === 'undefined'\">"},closeRow:function(){return"</tpl>"},mutateMetaRowTpl:function(a){a.unshift("{[this.isRow()]}");a.push("{[this.closeRow()]}")},getAdditionalData:function(e,j,g,i){var h=this.view,d=h.headerCt,c=d.items.getAt(0),b={},a;if(c){a=c.id+"-tdAttr";b[a]=this.indentByDepth(e)+" "+(i[a]?i[a]:"");b.collapsed="true";b.data=g.getData()}return b},getGroupRows:function(m,d,n,k){var i=this,c=m.children,o=m.rows=[],j=i.view,g=i.getGroupedHeader(),b=i.getGroupField(),h=-1,a,l=d.length,e;m.viewId=j.id;for(a=0;a<l;a++){e=d[a];if(e.get(b)==m.name){h=a}if(Ext.Array.indexOf(c,e)!=-1){o.push(Ext.apply(n[a],{depth:1}))}}m.groupHeaderId=i.getGroupHeaderId(m.name);m.groupBodyId=i.getGroupBodyId(m.name);m.fullWidth=k;m.columnName=g?g.text:b;m.groupValue=m.name;if(g&&h>-1){m.name=m.renderedValue=n[h][g.id]}if(i.collapsedState[m.name]){m.collapsedCls=i.collapsedCls;m.hdCollapsedCls=i.hdCollapsedCls}return m},getGroupHeaderId:function(a){return this.view.id+"-hd-"+a},getGroupBodyId:function(a){return this.view.id+"-bd-"+a},getGroupName:function(a){var b=this,c;c=Ext.fly(a).findParent(b.eventSelector);if(c){return c.id.split(this.view.id+"-hd-")[1]}c=Ext.fly(a).findParent(b.bodySelector);if(c){return c.id.split(this.view.id+"-bd-")[1]}},collectData:function(c,m,l,i,a){var e=this,j=e.view.store,d,b,h,k;if(!e.disabled&&j.isGrouped()){b=j.getGroups();h=b.length;for(d=0;d<h;d++){k=b[d];e.getGroupRows(k,c,m,i)}return{rows:b,fullWidth:i}}return a},getFireEventArgs:function(b,a,d,c){return[b,a,d,this.getGroupName(d),c]}});Ext.define("Ext.grid.feature.RowBody",{extend:"Ext.grid.feature.Feature",alias:"feature.rowbody",rowBodyHiddenCls:Ext.baseCSSPrefix+"grid-row-body-hidden",rowBodyTrCls:Ext.baseCSSPrefix+"grid-rowbody-tr",rowBodyTdCls:Ext.baseCSSPrefix+"grid-cell-rowbody",rowBodyDivCls:Ext.baseCSSPrefix+"grid-rowbody",eventPrefix:"rowbody",eventSelector:"."+Ext.baseCSSPrefix+"grid-rowbody-tr",getRowBody:function(a){return['<tr class="'+this.rowBodyTrCls+' {rowBodyCls}">','<td class="'+this.rowBodyTdCls+'" colspan="{rowBodyColspan}">','<div class="'+this.rowBodyDivCls+'">{rowBody}</div>',"</td>","</tr>"].join("")},getMetaRowTplFragments:function(){return{getRowBody:this.getRowBody,rowBodyTrCls:this.rowBodyTrCls,rowBodyTdCls:this.rowBodyTdCls,rowBodyDivCls:this.rowBodyDivCls}},mutateMetaRowTpl:function(a){a.push("{[this.getRowBody(values)]}")},getAdditionalData:function(c,a,b,g){var d=this.view.headerCt,e=d.getColumnCount();return{rowBody:"",rowBodyCls:this.rowBodyCls,rowBodyColspan:e}}});Ext.define("Ext.grid.feature.RowWrap",{extend:"Ext.grid.feature.Feature",alias:"feature.rowwrap",hasFeatureEvent:false,init:function(){if(!this.disabled){this.enable()}},getRowSelector:function(){return"tr:has(> "+this.view.cellSelector+")"},enable:function(){var b=this,a=b.view;b.callParent();b.savedRowSelector=a.rowSelector;a.rowSelector=b.getRowSelector();a.onHeaderResize=Ext.Function.createSequence(a.onHeaderResize,b.onHeaderResize,b)},disable:function(){var c=this,a=c.view,b=c.savedRowSelector;c.callParent();if(b){a.rowSelector=b}delete c.savedRowSelector;delete a.onHeaderResize},mutateMetaRowTpl:function(a){var b=Ext.baseCSSPrefix;a[0]=a[0].replace(b+"grid-row","");a[0]=a[0].replace("{[this.embedRowCls()]}","");a.unshift('<table class="'+b+"grid-table "+b+'grid-table-resizer" style="width: {[this.embedFullWidth()]}px;">');a.unshift('<tr class="'+b+'grid-row {[this.embedRowCls()]}"><td colspan="{[this.embedColSpan()]}"><div class="'+b+'grid-rowwrap-div">');a.push("</table>");a.push("</div></td></tr>")},embedColSpan:function(){return"{colspan}"},embedFullWidth:function(){return"{fullWidth}"},getAdditionalData:function(h,p,k,m){var d=this.view.headerCt,c=d.getColumnCount(),n=d.getFullWidth(),l=d.query("gridcolumn"),q=l.length,g=0,b={colspan:c,fullWidth:n},a,j,e;for(;g<q;g++){a=l[g].id;j=a+"-tdCls";e=Ext.baseCSSPrefix+"grid-col-resizer-"+a;b[j]=e+" "+(m[j]?m[j]:"");b[a+"-tdAttr"]=' style="width: '+(l[g].hidden?0:l[g].getDesiredWidth())+'px;" ';if(m[a+"-tdAttr"]){b[a+"-tdAttr"]+=m[a+"-tdAttr"]}}return b},getMetaRowTplFragments:function(){return{embedFullWidth:this.embedFullWidth,embedColSpan:this.embedColSpan}},onHeaderResize:function(d,a,c){var b=this.view.el;if(b){b.select("td."+Ext.baseCSSPrefix+"grid-col-resizer-"+d.id).setWidth(a)}}});Ext.define("Ext.grid.plugin.DragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.gridviewdragdrop",uses:["Ext.view.DragZone","Ext.grid.ViewDropZone"],dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var a=this;if(a.dragZone){a.dragZone.unlock()}if(a.dropZone){a.dropZone.unlock()}a.callParent()},disable:function(){var a=this;if(a.dragZone){a.dragZone.lock()}if(a.dropZone){a.dropZone.lock()}a.callParent()},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=new Ext.view.DragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText})}if(b.enableDrop){b.dropZone=new Ext.grid.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup})}}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.util.Observable",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,config:{dynamic:false},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=new Ext.dd.DragTracker({disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(b,k){var d=this,a,i,j,g,c,h;if(d.headerCt.dragging){if(d.activeHd){d.activeHd.el.dom.style.cursor="";delete d.activeHd}}else{i=b.getTarget("."+d.colHeaderCls,3,true);if(i){j=Ext.getCmp(i.id);if(j.isOnLeftEdge(b)){g=j.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(g){h=d.headerCt.up("tablepanel");c=g.up("tablepanel");if(!((c===h)||((h.ownerCt.isXType("tablepanel"))&&h.ownerCt.view.lockedGrid===c))){g=null}}}else{if(j.isOnRightEdge(b)){g=j}else{g=null}}if(g){if(g.isGroupHeader){a=g.getGridColumns();g=a[a.length-1]}if(g&&!(g.fixed||(g.resizable===false)||d.disabled)){d.activeHd=g;j.el.dom.style.cursor=d.eResizeCursor}}else{j.el.dom.style.cursor="";delete d.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(a).hasCls(Ext.baseCSSPrefix+"column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var c=this,a=c.dragHd.el,d=Ext.util.Region.getRegion(a),b;if(c.headerCt.forceFit){b=c.dragHd.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])")}return d.adjust(0,c.headerCt.forceFit?(b?b.getWidth()-c.minColWidth:0):c.maxColWidth-a.getWidth(),0,c.minColWidth)},onStart:function(u){var v=this,h=v.dragHd,b=h.el,o=b.getWidth(),j=v.headerCt,l=u.getTarget(),d,r,g,k,c,n,a,i,s,q,p,m;if(v.dragHd&&!Ext.fly(l).hasCls(Ext.baseCSSPrefix+"column-header-trigger")){j.dragging=true}v.origWidth=o;if(!v.dynamic){d=b.getXY();r=j.up("[scrollerOwner]");g=v.dragHd.up(":not([isGroupHeader])");k=g.up();c=r.getLhsMarker();n=r.getRhsMarker();a=n.parent();i=a.getLeft(true);s=a.getTop(true);q=a.translatePoints(d);p=k.body.getHeight()+j.getHeight();m=q.top-s;c.setTop(m);n.setTop(m);c.setHeight(p);n.setHeight(p);c.setLeft(q.left-i);n.setLeft(q.left+o-i)}},onDrag:function(h){if(!this.dynamic){var g=this.tracker.getXY("point"),a=this.headerCt.up("[scrollerOwner]"),i=a.getRhsMarker(),c=i.parent(),b=c.translatePoints(g),d=c.getLeft(true);i.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(g){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var d=this.dragHd,b=this.headerCt.up("[scrollerOwner]"),c=b.getLhsMarker(),h=b.getRhsMarker(),a=-9999;c.setLeft(a);h.setLeft(a)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset("point");if(b.flex){delete b.flex}Ext.suspendLayouts();b.setWidth(this.origWidth+c[0]);if(this.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(a){delete a.flex;a.setWidth(a.getWidth()-c[0])}}Ext.resumeLayouts(true)}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(b,a){this.layout=b;Ext.apply(this,a)},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,finishedLayout:Ext.emptyFn,completeLayout:function(b){var a=this,c=b.state.boxPlan,d;if(c&&c.tooNarrow){d=a.handleOverflow(b);if(d){if(d.reservedSpace){a.layout.publishInnerCtSize(b,d.reservedSpace)}}}else{a.clearOverflow()}},onRemove:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)},getOwnerType:function(a){var b="";if(a.is("toolbar")){b="toolbar"}else{if(a.is("tabbar")){b="tabbar"}else{b=a.getXType()}}return b},getPrefixConfig:Ext.emptyFn,getSuffixConfig:Ext.emptyFn,getOverflowCls:function(){return""}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",moveOnDrag:true,constructor:function(a,b){var c=this;c.panel=a;c.id=c.panel.id+"-ddproxy";Ext.apply(c,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var a=this;if(a.ghost){if(a.proxy){a.proxy.remove();delete a.proxy}a.panel.unghost(null,a.moveOnDrag);delete a.ghost}},show:function(){var b=this,a;if(!b.ghost){a=b.panel.getSize();b.panel.el.setVisibilityMode(Ext.Element.DISPLAY);b.ghost=b.panel.ghost();if(b.insertProxy){b.proxy=b.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});b.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();Ext.callback(c,a||this)},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(b){var k=this,j,o,q,p=k.handles,c,n,g,d=0,m,l=[],h,a,e;k.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(b)||Ext.isElement(b)||b.dom){j=b;b=arguments[1]||{};b.target=j}k.mixins.observable.constructor.call(k,b);j=k.target;if(j){if(j.isComponent){k.el=j.getEl();if(j.minWidth){k.minWidth=j.minWidth}if(j.minHeight){k.minHeight=j.minHeight}if(j.maxWidth){k.maxWidth=j.maxWidth}if(j.maxHeight){k.maxHeight=j.maxHeight}if(j.floating){if(!k.hasOwnProperty("handles")){k.handles="n ne e se s sw w nw"}}}else{k.el=k.target=Ext.get(j)}}else{k.target=k.el=Ext.get(k.el)}q=k.el.dom.tagName.toUpperCase();if(q=="TEXTAREA"||q=="IMG"||q=="TABLE"){k.originalTarget=k.target;o=k.el;e=o.getBox();k.target=k.el=k.el.wrap({cls:k.wrapCls,id:k.el.id+"-rzwrap",style:o.getStyles("margin-top","margin-bottom")});k.el.setPositioning(o.getPositioning());o.clearPositioning();k.el.setBox(e);o.setStyle("position","absolute")}k.el.position();if(k.pinned){k.el.addCls(k.pinnedCls)}k.resizeTracker=new Ext.resizer.ResizeTracker({disabled:k.disabled,target:k.target,constrainTo:k.constrainTo,overCls:k.overCls,throttle:k.throttle,originalTarget:k.originalTarget,delegate:"."+k.handleCls,dynamic:k.dynamic,preserveRatio:k.preserveRatio,heightIncrement:k.heightIncrement,widthIncrement:k.widthIncrement,minHeight:k.minHeight,maxHeight:k.maxHeight,minWidth:k.minWidth,maxWidth:k.maxWidth});k.resizeTracker.on({mousedown:k.onBeforeResize,drag:k.onResize,dragend:k.onResizeEnd,scope:k});if(k.handles=="all"){k.handles="n s e w ne nw se sw"}p=k.handles=k.handles.split(/ |\s*?[,;]\s*?/);n=k.possiblePositions;g=p.length;c=k.handleCls+" "+(k.target.isComponent?(k.target.baseCls+"-handle "):"")+k.handleCls+"-";h=Ext.isIE6?' style="height:'+k.el.getHeight()+'px"':"";for(;d<g;d++){if(p[d]&&n[p[d]]){m=n[p[d]];if(m==="east"||m==="west"){a=h}else{a=""}l.push('<div id="'+k.el.id+"-"+m+'-handle" class="'+c+m+" "+Ext.baseCSSPrefix+'unselectable"'+a+"></div>")}}Ext.DomHelper.append(k.el,l.join(""));for(d=0;d<g;d++){if(p[d]&&n[p[d]]){m=n[p[d]];k[m]=k.el.getById(k.el.id+"-"+m+"-handle");k[m].region=m;k[m].unselectable();if(k.transparent){k[m].setOpacity(0)}}}if(Ext.isNumber(k.width)){k.width=Ext.Number.constrain(k.width,k.minWidth,k.maxWidth)}if(Ext.isNumber(k.height)){k.height=Ext.Number.constrain(k.height,k.minHeight,k.maxHeight)}if(k.width!==null||k.height!==null){if(k.originalTarget){k.originalTarget.setWidth(k.width);k.originalTarget.setHeight(k.height)}k.resizeTo(k.width,k.height)}k.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(b,c){var a=this.el.getBox();return this.fireEvent("beforeresize",this,a.width,a.height,c)},onResize:function(c,d){var b=this,a=b.el.getBox();b.forceHandlesHeight();return b.fireEvent("resizedrag",b,a.width,a.height,d)},onResizeEnd:function(c,d){var b=this,a=b.el.getBox();b.forceHandlesHeight();return b.fireEvent("resize",b,a.width,a.height,d)},resizeTo:function(b,a){var c=this;c.target.setSize(b,a);c.fireEvent("resize",c,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var d=0,c=this.handles,a=c.length,b=this.possiblePositions;for(;d<a;d++){this[b[c[d]]].remove()}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(b){var d=this,c,a,e;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){c=d.minWidth/d.el.getWidth();a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(h,i,g){if(g){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.resetCls})}b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},d)}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(s,m){var t=this,c=t.activeResizeHandle.region,g=t.getOffset(t.constrainTo?"dragTarget":null),k=t.startBox,h,p=0,u=0,j,q,a=0,w=0,v,n=g[0]<0?"right":"left",r=g[1]<0?"down":"up",i,b,d,o,l;switch(c){case"south":u=g[1];b=2;break;case"north":u=-g[1];w=-u;b=2;break;case"east":p=g[0];b=1;break;case"west":p=-g[0];a=-p;b=1;break;case"northeast":u=-g[1];w=-u;p=g[0];i=[k.x,k.y+k.height];b=3;break;case"southeast":u=g[1];p=g[0];i=[k.x,k.y];b=3;break;case"southwest":p=-g[0];a=-p;u=g[1];i=[k.x+k.width,k.y];b=3;break;case"northwest":u=-g[1];w=-u;p=-g[0];a=-p;i=[k.x+k.width,k.y+k.height];b=3;break}d={width:k.width+p,height:k.height+u,x:k.x+a,y:k.y+w};j=Ext.Number.snap(d.width,t.widthIncrement);q=Ext.Number.snap(d.height,t.heightIncrement);if(j!=d.width||q!=d.height){switch(c){case"northeast":d.y-=q-d.height;break;case"north":d.y-=q-d.height;break;case"southwest":d.x-=j-d.width;break;case"west":d.x-=j-d.width;break;case"northwest":d.x-=j-d.width;d.y-=q-d.height}d.width=j;d.height=q}if(d.width<t.minWidth||d.width>t.maxWidth){d.width=Ext.Number.constrain(d.width,t.minWidth,t.maxWidth);if(a){d.x=k.x+(k.width-d.width)}}else{t.lastX=d.x}if(d.height<t.minHeight||d.height>t.maxHeight){d.height=Ext.Number.constrain(d.height,t.minHeight,t.maxHeight);if(w){d.y=k.y+(k.height-d.height)}}else{t.lastY=d.y}if(t.preserveRatio||s.shiftKey){h=t.startBox.width/t.startBox.height;o=Math.min(Math.max(t.minHeight,d.width/h),t.maxHeight);l=Math.min(Math.max(t.minWidth,d.height*h),t.maxWidth);if(b==1){d.height=o}else{if(b==2){d.width=l}else{v=Math.abs(i[0]-this.lastXY[0])/Math.abs(i[1]-this.lastXY[1]);if(v>h){d.height=o}else{d.width=l}if(c=="northeast"){d.y=k.y-(d.height-k.height)}else{if(c=="northwest"){d.y=k.y-(d.height-k.height);d.x=k.x-(d.width-k.width)}else{if(c=="southwest"){d.x=k.x-(d.width-k.width)}}}}}}if(u===0){r="none"}if(p===0){n="none"}t.resize(d,{horizontal:n,vertical:r},m)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){c.setSize(b.width,b.height);if(c.floating){c.setPagePosition(b.x,b.y)}}else{c.setBox(b)}c=this.originalTarget;if(c&&(this.dynamic||a)){if(c.isComponent){c.setSize(b.width,b.height);if(c.floating){c.setPagePosition(b.x,b.y)}}else{c.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",createDragOverlay:function(){var a;a=this.overlay=Ext.getBody().createChild({cls:this.overlayCls,html:"&#160;"});a.unselectable();a.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));a.show()},getPrevCmp:function(){var a=this.getSplitter();return a.previousSibling()},getNextCmp:function(){var a=this.getSplitter();return a.nextSibling()},onBeforeStart:function(i){var d=this,g=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,h=i.getTarget(),b;if(c&&h===d.getSplitter().collapseEl.dom){return false}if(a.collapsed||g.collapsed){return false}d.prevBox=g.getEl().getBox();d.nextBox=a.getEl().getBox();d.constrainTo=b=d.calculateConstrainRegion();if(!b){return false}d.createDragOverlay();return b},onStart:function(b){var a=this.getSplitter();a.addCls(a.baseCls+"-active")},calculateConstrainRegion:function(){var g=this,a=g.getSplitter(),h=a.getWidth(),i=a.defaultSplitMin,b=a.orientation,d=g.prevBox,j=g.getPrevCmp(),c=g.nextBox,e=g.getNextCmp(),l,k;if(b==="vertical"){l=new Ext.util.Region(d.y,(j.maxWidth?d.x+j.maxWidth:c.right-(e.minWidth||i))+h,d.bottom,d.x+(j.minWidth||i));k=new Ext.util.Region(c.y,c.right-(e.minWidth||i),c.bottom,(e.maxWidth?c.right-e.maxWidth:d.x+(d.minWidth||i))-h)}else{l=new Ext.util.Region(d.y+(j.minHeight||i),d.right,(j.maxHeight?d.y+j.maxHeight:c.bottom-(e.minHeight||i))+h,d.x);k=new Ext.util.Region((e.maxHeight?c.bottom-e.maxHeight:d.y+(j.minHeight||i))-h,c.right,c.bottom-(e.minHeight||i),c.x)}return l.intersect(k)},performResize:function(m,g){var o=this,a=o.getSplitter(),h=a.orientation,p=o.getPrevCmp(),n=o.getNextCmp(),b=a.ownerCt,k=b.query(">[flex]"),l=k.length,j=0,d,q,c=0;for(;j<l;j++){q=k[j].getWidth();c+=q;k[j].flex=q}g=g||o.getOffset("dragTarget");if(h==="vertical"){g=g[0];d="width"}else{d="height";g=g[1]}if(p){q=o.prevBox[d]+g;if(p.flex){p.flex=q}else{p[d]=q}}if(n){q=o.nextBox[d]-g;if(n.flex){n.flex=q}else{n[d]=q}}b.updateLayout()},endDrag:function(){var a=this;if(a.overlay){a.overlay.remove();delete a.overlay}a.callParent(arguments)},onEnd:function(c){var a=this,b=a.getSplitter();b.removeCls(b.baseCls+"-active");a.performResize(c,a.getOffset("dragTarget"))},onDrag:function(g){var c=this,h=c.getOffset("dragTarget"),d=c.getSplitter(),b=d.getEl(),a=d.orientation;if(a==="vertical"){b.setX(c.startRegion.left+h[0])}else{b.setY(c.startRegion.top+h[1])}},getSplitter:function(){return this.splitter}});Ext.define("Ext.slider.Thumb",{requires:["Ext.dd.DragTracker","Ext.util.Format"],topZIndex:10000,constructor:function(a){var b=this;Ext.apply(b,a||{},{cls:Ext.baseCSSPrefix+"slider-thumb",constrain:false});b.callParent([a])},render:function(){var a=this;a.el=a.slider.innerEl.insertFirst(a.getElConfig());a.onRender()},onRender:function(){if(this.disabled){this.disable()}this.initEvents()},getElConfig:function(){var c=this,b=c.slider,a={};a[b.vertical?"bottom":"left"]=b.calculateThumbPosition(b.normalizeValue(c.value))+"%";return{style:a,id:this.id,cls:this.cls}},move:function(c,b){var d=this.el,a=this.slider.vertical?"bottom":"left",g,e;c+="%";if(!b){d.dom.style[a]=c}else{g={};g[a]=c;if(!Ext.supports.GetPositionPercentage){e={};e[a]=d.dom.style[a]}new Ext.fx.Anim({target:d,duration:350,from:e,to:g})}},bringToFront:function(){this.el.setStyle("zIndex",this.topZIndex)},sendToBack:function(){this.el.setStyle("zIndex","")},enable:function(){var a=this;a.disabled=false;if(a.el){a.el.removeCls(a.slider.disabledCls)}},disable:function(){var a=this;a.disabled=true;if(a.el){a.el.addCls(a.slider.disabledCls)}},initEvents:function(){var b=this,a=b.el;b.tracker=new Ext.dd.DragTracker({onBeforeStart:Ext.Function.bind(b.onBeforeDragStart,b),onStart:Ext.Function.bind(b.onDragStart,b),onDrag:Ext.Function.bind(b.onDrag,b),onEnd:Ext.Function.bind(b.onDragEnd,b),tolerance:3,autoStart:300,overCls:Ext.baseCSSPrefix+"slider-thumb-over"});b.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(b){var a=this;a.el.addCls(Ext.baseCSSPrefix+"slider-thumb-drag");a.dragging=a.slider.dragging=true;a.dragStartValue=a.value;a.slider.fireEvent("dragstart",a.slider,b,a)},onDrag:function(h){var d=this,c=d.slider,b=d.index,g=d.getValueFromTracker(),a,i;if(g!==undefined){if(d.constrain){a=c.thumbs[b+1];i=c.thumbs[b-1];if(i!==undefined&&g<=i.value){g=i.value}if(a!==undefined&&g>=a.value){g=a.value}}c.setValue(b,g,false);c.fireEvent("drag",c,h,d)}},getValueFromTracker:function(){var a=this.slider,b=a.getTrackpoint(this.tracker.getXY());if(b!==undefined){return a.reversePixelValue(b)}},onDragEnd:function(d){var b=this,a=b.slider,c=b.value;b.el.removeCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=a.dragging=false;a.fireEvent("dragend",a,d);if(b.dragStartValue!=c){a.fireEvent("changecomplete",a,c,b)}},destroy:function(){Ext.destroy(this.tracker)}});Ext.define("Ext.tree.plugin.TreeViewDragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.treeviewdragdrop",uses:["Ext.tree.ViewDragZone","Ext.tree.ViewDropZone"],dragText:"{0} selected node{1}",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,ddGroup:"TreeDD",expandDelay:1000,enableDrop:true,enableDrag:true,nodeHighlightColor:"c3daf9",nodeHighlightOnDrop:Ext.enableFx,nodeHighlightOnRepair:Ext.enableFx,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=new Ext.tree.ViewDragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText,repairHighlightColor:b.nodeHighlightColor,repairHighlight:b.nodeHighlightOnRepair})}if(b.enableDrop){b.dropZone=new Ext.tree.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup,allowContainerDrops:b.allowContainerDrops,appendOnly:b.appendOnly,allowParentInserts:b.allowParentInserts,expandDelay:b.expandDelay,dropHighlightColor:b.nodeHighlightColor,dropHighlight:b.nodeHighlightOnDrop})}}});Ext.define("Ext.util.Animate",{uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(new Ext.fx.Anim(b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(b,a){var c=this;c.el=Ext.get(b);c.el.unselectable();Ext.apply(c,a);c.callParent();c.addEvents("mousedown","click","mouseup");if(!c.disabled){c.disabled=true;c.enable()}if(c.handler){c.on("click",c.handler,c.scope||c)}},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent("click",this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,a)}});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.el.getXY();if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}if(a.beginDrag){a.beginDrag()}},calculateConstrainRegion:function(){var d=this,a=d.comp,h=d.initialConstrainTo,e,g,b=a.el.shadow?a.el.shadow.offset:0;if(!(h instanceof Ext.util.Region)){h=Ext.fly(h).getViewRegion()}if(b){h.adjust(0,-b,-b,b)}if(!d.constrainDelegate){e=Ext.fly(d.dragTarget).getRegion();g=d.proxy?d.proxy.el.getRegion():a.el.getRegion();h.adjust(e.top-g.top,e.right-g.right,e.bottom-g.bottom,e.left-g.left)}return h},onDrag:function(c){var b=this,a=(b.proxy&&!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?"dragTarget":null);a.setPagePosition(b.startPosition[0]+d[0],b.startPosition[1]+d[1])},onEnd:function(b){var a=this.comp;if(this.proxy&&!a.liveDrag){a.unghost()}if(a.endDrag){a.endDrag()}}});Ext.define("Ext.util.Cookies",{singleton:true,set:function(c,e){var a=arguments,i=arguments.length,b=(i>2)?a[2]:null,h=(i>3)?a[3]:"/",d=(i>4)?a[4]:null,g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=",g=b.length,a=document.cookie.length,e=0,c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return this.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a,b){if(this.get(a)){b=b||"/";document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+b}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}});Ext.define("Ext.util.CSS",(function(){var d=null,c=document,b=/(-[a-z])/gi,a=function(e,g){return g.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(i,l){var h,g=c.getElementsByTagName("head")[0],k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=document.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(i,e){var h=document,g;this.removeStyleSheet(i);g=h.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",i);g.setAttribute("href",e);h.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(l){if(!d){d={}}try{var o=l.cssRules||l.rules,m,k=o.length-1,g,h;for(;k>=0;--k){m=o[k].selectorText;if(m){m=m.split(",");h=m.length;for(g=0;g<h;g++){d[Ext.String.trim(m[g]).toLowerCase()]=o[k]}}}}catch(n){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets,j=0,g=k.length;for(;j<g;j++){try{if(!k[j].disabled){this.cacheStyleSheet(k[j])}}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h),j;if(!Ext.isArray(e)){return g[e.toLowerCase()]}for(j=0;j<e.length;j++){if(g[e[j]]){return g[e[j].toLowerCase()]}}return null},updateRule:function(e,j,h){var k,g;if(!Ext.isArray(e)){k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){return true}}}return false}}}()));Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(b){var a=this;a.el=new Ext.Layer(Ext.apply({hideMode:a.hideMode,hidden:a.hidden,shadow:(typeof a.shadow!="undefined")?a.shadow:"sides",shadowOffset:a.shadowOffset,constrain:false,shim:(a.shim===false)?false:undefined},a.floating),b);a.floating=true;a.registerWithOwnerCt()},registerWithOwnerCt:function(){var a=this;if(a.zIndexParent){a.zIndexParent.unregisterFloatingItem(a)}a.zIndexParent=a.up("[floating]");a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onAfterFloatLayout:function(){this.syncShadow()},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false&&a.isVisible()){a.hide();a.showOnParentShow=true}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingItems){a=Math.floor(b.floatingItems.setBase(a)/100)*100+10000}return a},doConstrain:function(b){var c=this,a=c.getConstrainVector(b),d;if(a){d=c.getPosition();d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(a){var b=this;if(b.constrain||b.constrainHeader){a=a||(b.floatParent&&b.floatParent.getTargetEl())||b.container||b.el.getScopeParent();return(b.constrainHeader?b.header.el:b.el).getConstrainVector(a)}},alignTo:function(b,a,c){this.setPagePosition(this.el.getAlignToXY(b.el||b,a,c));return this},toFront:function(b){var a=this;if(a.zIndexParent&&a.bringParentToFront!==false){a.zIndexParent.toFront(true)}if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(b){a.preventFocusOnActivate=true}if(a.zIndexManager.bringToFront(a)){if(!b){a.focus(false,true)}}delete a.preventFocusOnActivate;return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}if(a.modal&&!a.preventFocusOnActivate){a.focus(false,true)}a.fireEvent("activate",a)}else{if(a.isWindow&&(c&&c.isWindow)){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b;if(a.isVisible()){b=a.el.getAlignToXY(a.container,"c-c");a.setPagePosition(b)}else{a.needsCenter=true}return a},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this.floatParent,a=c?c.getTargetEl():this.container,b=a.getViewSize(false);this.setSize(b)}});Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:"Ext.util.Observable"},useTopWindow:true,fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",constructor:function(){var a=this;a.oldIEMode=Ext.isIE6||Ext.isIE7||!Ext.isStrict&&Ext.isIE8;a.iframe=null;a.hiddenField=null;a.ready=false;a.currentToken=null;a.mixins.observable.constructor.call(a)},getHash:function(){var a=window.location.href,b=a.indexOf("#");return b>=0?a.substr(b+1):null},setHash:function(d){var a=this,c=a.useTopWindow?window.top:window;try{c.location.hash=d}catch(b){}},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(a){this.currentToken=a;this.fireEvent("change",a)},updateIFrame:function(b){var a='<html><body><div id="state">'+Ext.util.Format.htmlEncode(b)+"</div></body></html>",d;try{d=this.iframe.contentWindow.document;d.open();d.write(a);d.close();return true}catch(c){return false}},checkIFrame:function(){var d=this,b=d.iframe.contentWindow,e,c,a,g;if(!b||!b.document){Ext.Function.defer(this.checkIFrame,10,this);return}e=b.document;c=e.getElementById("state");a=c?c.innerText:null;g=d.getHash();Ext.TaskManager.start({run:function(){var k=b.document,j=k.getElementById("state"),h=j?j.innerText:null,i=d.getHash();if(h!==a){a=h;d.handleStateChange(h);d.setHash(h);g=h;d.doSave()}else{if(i!==g){g=i;d.updateIFrame(i)}}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)},startUp:function(){var a=this,b;a.currentToken=a.hiddenField.value||this.getHash();if(a.oldIEMode){a.checkIFrame()}else{b=a.getHash();Ext.TaskManager.start({run:function(){var c=a.getHash();if(c!==b){b=c;a.handleStateChange(b);a.doSave()}},interval:50,scope:a});a.ready=true;a.fireEvent("ready",a)}},init:function(d,b){var c=this,a=Ext.DomHelper;if(c.ready){Ext.callback(d,b,[c]);return}if(!Ext.isReady){Ext.onReady(function(){c.init(d,b)});return}c.hiddenField=Ext.getDom(c.fieldId);if(!c.hiddenField){c.hiddenField=Ext.getBody().createChild({id:Ext.id(),tag:"form",cls:Ext.baseCSSPrefix+"hide-display",children:[{tag:"input",type:"hidden",id:c.fieldId}]},false,true).firstChild}if(c.oldIEMode){c.iframe=Ext.getDom(c.iframeId);if(!c.iframe){c.iframe=a.append(c.hiddenField.parentNode,{tag:"iframe",id:c.iframeId})}}c.addEvents("ready","change");if(d){c.on("ready",d,b,{single:true})}c.startUp()},add:function(a,c){var b=this;if(c!==false){if(b.getToken()===a){return true}}if(b.oldIEMode){return b.updateIFrame(a)}else{b.setHash(a);return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",eventName:"keydown",constructor:function(a){var b=this;if((arguments.length!==1)||(typeof a==="string")||a.dom||a.tagName||a===document||a.isComponent){b.legacyConstructor.apply(b,arguments);return}Ext.apply(b,a);b.bindings=[];if(!b.target.isComponent){b.target=Ext.get(b.target)}if(b.binding){b.addBinding(b.binding)}else{if(a.key){b.addBinding(a)}}b.enable()},legacyConstructor:function(b,d,a){var c=this;Ext.apply(c,{target:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},addBinding:function(h){var g=h.key,j=false,d,e,b,c,a;if(Ext.isArray(h)){for(c=0,a=h.length;c<a;c++){this.addBinding(h[c])}return}if(Ext.isString(g)){e=[];b=g.toUpperCase();for(c=0,a=b.length;c<a;++c){e.push(b.charCodeAt(c))}g=e;j=true}if(!Ext.isArray(g)){g=[g]}if(!j){for(c=0,a=g.length;c<a;++c){d=g[c];if(Ext.isString(d)){g[c]=d.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:g},h))},handleKeyDown:function(d){var c=this,e,b,a;if(this.enabled){e=this.bindings;b=0;a=e.length;d=c.processEvent.apply(c||c.processEventScope,arguments);if(!d.getKey){return d}for(;b<a;++b){this.processBinding(e[b],d)}}},processEvent:function(a){return a},processBinding:function(g,a){if(this.checkModifiers(g,a)){var h=a.getKey(),k=g.fn||g.handler,l=g.scope||this,j=g.keyCode,b=g.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=j.length;c<e;++c){if(h===j[c]){if(k.call(l,h,a)!==true&&b){d[b]()}break}}}},checkModifiers:function(j,g){var d=["shift","ctrl","alt"],c=0,a=d.length,h,b;for(;c<a;++c){b=d[c];h=j[b];if(!(h===undefined||(h===g[b+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(Ext.isObject(b)&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){var a=this;if(!a.enabled){a.target.on(a.eventName,a.handleKeyDown,a);a.enabled=true}},disable:function(){var a=this;if(a.enabled){a.target.removeListener(a.eventName,a.handleKeyDown,a);a.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(b){var a=this;a.bindings=[];a.disable();if(b===true){a.target.isComponent?a.target.destroy():a.target.remove()}delete a.target}});Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(a){var b=this;if(arguments.length===2){b.legacyConstructor.apply(b,arguments);return}b.setConfig(a)},legacyConstructor:function(b,a){this.setConfig(Ext.apply({target:b},a))},setConfig:function(b){var e=this,c={target:b.target,eventName:e.getKeyEvent("forceKeyDown" in b?b.forceKeyDown:e.forceKeyDown,b.eventName)},g,a,i,d,h;if(e.map){e.map.destroy()}if(b.processEvent){c.processEvent=b.processEvent;c.processEventScope=b.processEventScope||e}g=e.map=new Ext.util.KeyMap(c);a=Ext.util.KeyNav.keyOptions;i=b.scope||e;for(d in a){if(a.hasOwnProperty(d)){if(h=b[d]){if(typeof h==="function"){h={handler:h,defaultAction:(b.defaultEventAction!==undefined)?b.defaultEventAction:e.defaultEventAction}}g.addBinding({key:a[d],handler:Ext.Function.bind(e.handleEvent,h.scope||i,h.handler||h.fn,true),defaultEventAction:(h.defaultEventAction!==undefined)?h.defaultAction:e.defaultEventAction})}}}g.disable();if(!b.disabled){g.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,eventName:"keypress",destroy:function(a){this.map.destroy(a);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(b,a){if(b||(Ext.EventManager.useKeyDown&&!a)){return"keydown"}else{return a||this.eventName}}});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||"auto");return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"textmetrics"});this.el=Ext.get(a);b.position("absolute");b.setLeftTop(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update("");return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width="auto";return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents("beforeload","exception","load");c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&&a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(i){i=Ext.apply({},i);var e=this,d=e.target,j=Ext.isDefined(i.loadMask)?i.loadMask:e.loadMask,b=Ext.apply({},i.params),a=Ext.apply({},i.ajaxOptions),g=i.callback||e.callback,h=i.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(i,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(i,{url:e.url});Ext.apply(i,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent("beforeload",e,i)===false){return}if(j){e.addMask(j)}c=Ext.Ajax.request(i);e.active={request:c,options:i,mask:j,scope:h,callback:g,success:i.success||e.success,failure:i.failure||e.failure,renderer:i.renderer||e.renderer,scripts:Ext.isDefined(i.scripts)?i.scripts:e.scripts};e.setOptions(e.active,i)},setOptions:Ext.emptyFn,onComplete:function(b,h,a){var d=this,g=d.active,c=g.scope,e=d.getRenderer(g.renderer);if(h){h=e.call(d,d,a,g)!==false}if(h){Ext.callback(g.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(g.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(g.callback,c,[d,h,a,b]);if(g.mask){d.removeMask()}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(a,b,d){var g=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){g=false}return g},Component:function(a,c,h){var i=true,g=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){i=false}if(i){g.suspendLayouts();if(h.removeAll){g.removeAll()}g.add(b);g.resumeLayouts(true)}return i}}},target:null,loadMask:false,renderer:"html",setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&&a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case"component":return a.Component;case"data":return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useIndex:Ext.isIE6||Ext.isIE7,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var d=this,b="var fm=Ext.util.Format,ts=Object.prototype.toString;",c;d.maxLevel=0;d.body=["var c0=values, a0="+d.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, v;\n"];if(d.definitions){if(typeof d.definitions==="string"){d.definitions=[d.definitions,b]}else{d.definitions.push(b)}}else{d.definitions=[b]}d.switches=[];d.parse(a);d.definitions.push((d.useEval?"$=":"return")+" function ("+d.fnArgs+") {",d.body.join(""),"}");c=d.definitions.join("\n");d.definitions.length=d.body.length=d.switches.length=0;delete d.definitions;delete d.body;delete d.switches;return c},doText:function(c){var b=this,a=b.body;c=c.replace(b.aposRe,"\\'").replace(b.newLineRe,"\\n");if(b.useIndex){a.push("out[out.length]='",c,"'\n")}else{a.push("out.push('",c,"')\n")}},doExpr:function(b){var a=this.body;a.push("if ((v="+b+")!==undefined) out");if(this.useIndex){a.push("[out.length]=v+''\n")}else{a.push(".push(v+'')\n")}},doTag:function(a){this.doExpr(this.parseTag(a))},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(b==="."){a.body.push("if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(b==="."){a.body.push("else if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(b==="."){a.body.push("switch (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],g=d.switches.length-1,a,b;if(d.switches[g]){d.body.push("break;\n")}else{d.switches[g]++}for(b=0,g=c.length;b<g;++b){a=d.intRe.exec(c[b]);c[b]=a?a[1]:("'"+c[b].replace(d.aposRe,"\\'")+"'")}d.body.push("case ",c.join(": case "),":\n")},doDefault:function(){var a=this,b=a.switches.length-1;if(a.switches[b]){a.body.push("break;\n")}else{a.switches[b]++}a.body.push("default:\n")},doEnd:function(b,d){var c=this,a=c.level-1;if(b=="for"){if(d.exec){c.doExec(d.exec)}c.body.push("}\n");c.body.push("parent=p",a,";values=r",a+1,";xcount=n",a,";xindex=i",a,"\n")}else{if(b=="if"||b=="switch"){c.body.push("}\n")}}},doFor:function(g,i){var e=this,d,b=e.level,a=b-1,c="p"+b,h;if(g==="."){d="values"}else{if(e.propNameRe.test(g)){d=e.parseTag(g)}else{d=e.addFn(g)+e.callFn}}if(e.maxLevel<b){e.maxLevel=b;e.body.push("var ")}if(g=="."){h="c"+b}else{h="a"+a+"?c"+a+"[i"+a+"]:p"+b}e.body.push("i",b,"=0,n",b,"=0,c",b,"=",d,",a",b,"=",e.createArrayTest(b),",p",b,"=c",a,",r",b,"=values;\n","parent=",h,"\n","if (c",b,"){if(a",b,"){n",b,"=c",b,".length;}else if (c",b,".isMixedCollection){c",b,"=c",b,".items;n",b,"=c",b,".length;}else if(c",b,".isStore){c",b,"=c",b,".data.items;n",b,"=c",b,".length;}else{c",b,"=[c",b,"];n",b,"=1;}}\n","for (xcount=n",b,";i",b,"<n"+b+";++i",b,"){\n","values=c",b,"[i",b,"]");if(i.propName){e.body.push(".",i.propName)}e.body.push("\n","xindex=i",b,"+1\n")},createArrayTest:("isArray" in Array)?function(a){return"Array.isArray(c"+a+")"}:function(a){return"ts.call(c"+a+')==="[object Array]"'},doExec:function(c,d){var b=this,a="f"+b.definitions.length;b.definitions.push("function "+a+"("+b.fnArgs+") {"," try { with(values) {","  "+c," }} catch(e) {","}","}");b.body.push(a+b.callFn+"\n")},addFn:function(a){var c=this,b="f"+c.definitions.length;if(a==="."){c.definitions.push("function "+b+"("+c.fnArgs+") {"," return values","}")}else{if(a===".."){c.definitions.push("function "+b+"("+c.fnArgs+") {"," return parent","}")}else{c.definitions.push("function "+b+"("+c.fnArgs+") {"," try { with(values) {","  return("+a+")"," }} catch(e) {","}","}")}}return b},parseTag:function(b){var h=this,a=h.tagRe.exec(b),e=a[1],i=a[2],d=a[3],g=a[4],c;if(e=="."){if(!h.validTypes){h.definitions.push("var validTypes={string:1,number:1,boolean:1};");h.validTypes=true}c='validTypes[typeof values] || ts.call(values) === "[object Date]" ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e.substr(0,7)=="parent."){c=e}else{if(isNaN(e)&&e.indexOf("-")==-1&&e.indexOf(".")!=-1){c="values."+e}else{c="values['"+e+"']"}}}}if(g){c="("+c+g+")"}if(i&&h.useFormat){d=d?","+d:"";if(i.substr(0,5)!="this."){i="fm."+i+"("}else{i+="("}}else{return c}return i+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.XTemplate",{extend:"Ext.Template",requires:"Ext.XTemplateCompiler",apply:function(a){return this.applyOut(a,[]).join("")},applyOut:function(a,b){var d=this,c;if(!d.fn){c=new Ext.XTemplateCompiler({useFormat:d.disableFormats!==true,definitions:d.definitions});d.fn=c.compile(d.html)}try{d.fn.call(d,b,a,{},1,1)}catch(g){}return b},compile:function(){return this},statics:{getTpl:function(a,c){var b=a[c],d;if(b&&!b.isTemplate){b=Ext.ClassManager.dynInstantiate("Ext.XTemplate",b);if(a.hasOwnProperty(c)){a[c]=b}else{for(d=a.self.prototype;d;d=d.superclass){if(d.hasOwnProperty(c)){d[c]=b;break}}}}return b||null}}});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(j,c,i){var h=Ext.getClassName(j),d=h.match(/^(.*)\.controller\./),b,g,k,a,e;if(d!==null){b=Ext.Loader.getPrefix(h)||d[1];g=i.onBeforeCreated;k=[];a=["model","view","store"];i.onBeforeCreated=function(t,n){var o,q,l,r,m,p,s;for(o=0,q=a.length;o<q;o++){l=a[o];e=b+"."+l+".";r=Ext.Array.from(n[l+"s"]);for(m=0,p=r.length;m<p;m++){s=r[m];if(s.indexOf(".")!==-1&&(Ext.ClassManager.isCreated(s)||Ext.Loader.isAClassNameWithAKnownPrefix(s))){k.push(s)}else{k.push(e+s)}}}Ext.require(k,Ext.Function.pass(g,arguments,this))}}},constructor:function(a){this.mixins.observable.constructor.call(this,a);Ext.apply(this,a||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:function(a){},onLaunch:function(a){},createGetters:function(g,j){g=Ext.String.capitalize(g);var e=0,a=(j)?j.length:0,h,b,c,k,d;for(;e<a;e++){h="get";b=j[e];c=b.split(".");d=c.length;for(k=0;k<d;k++){h+=Ext.String.capitalize(c[k])}h+=g;if(!this[h]){this[h]=Ext.Function.pass(this["get"+g],[b],this)}this[h](b)}},ref:function(a){a=Ext.Array.from(a);var g=this,b=0,e=a.length,h,d,c;for(;b<e;b++){h=a[b];d=h.ref;c="get"+Ext.String.capitalize(d);if(!g[c]){g[c]=Ext.Function.pass(g.getRef,[d,h],g)}g.references=g.references||[];g.references.push(d.toLowerCase())}},addRef:function(a){return this.ref([a])},getRef:function(d,e,a){this.refCache=this.refCache||{};e=e||{};a=a||{};Ext.apply(e,a);if(e.forceCreate){return Ext.ComponentManager.create(e,"component")}var c=this,b=c.refCache[d];if(!b){c.refCache[d]=b=Ext.ComponentQuery.query(e.selector)[0];if(!b&&e.autoCreate){c.refCache[d]=b=Ext.ComponentManager.create(e,"component")}if(b){b.on("beforedestroy",function(){c.refCache[d]=null})}}return b},hasRef:function(a){return this.references&&this.references.indexOf(a.toLowerCase())!==-1},control:function(a,b){this.application.control(a,b,this)},getController:function(a){return this.application.getController(a)},getStore:function(a){return this.application.getStore(a)},getModel:function(a){return this.application.getModel(a)},getView:function(a){return this.application.getView(a)}});Ext.define("Ext.chart.Label",{requires:["Ext.draw.Color"],colorStringRe:/url\s*\(\s*#([^\/)]+)\s*\)/,constructor:function(a){var b=this;b.label=Ext.applyIf(b.label||{},{display:"none",color:"#000",field:"name",minMargin:50,font:"11px Helvetica, sans-serif",orientation:"horizontal",renderer:function(c){return c}});if(b.label.display!=="none"){b.labelsGroup=b.chart.surface.getGroup(b.seriesId+"-labels")}},renderLabels:function(){var o=this,L=o.chart,x=L.gradients,r=o.items,H=L.animate,A=o.label,u=A.display,v=A.color,d=[].concat(A.field),q=o.labelsGroup,l=(q||0)&&q.length,b=o.chart.getChartStore(),p=b.getCount(),h=(r||0)&&r.length,D=h/p,z=(x||0)&&x.length,m=Ext.draw.Color,K=[],n,J,E,c,y,I,G,e,g,t,w,F,M,s,N,C,B,a;if(u=="none"){return}if(h==0){while(l--){K.push(l)}}else{for(J=0,E=0,c=0;J<p;J++){y=0;for(I=0;I<D;I++){w=r[E];F=q.getAt(c);M=b.getAt(J);while(this.__excludes&&this.__excludes[y]){y++}if(!w&&F){F.hide(true);c++}if(w&&d[I]){if(!F){F=o.onCreateLabel(M,w,J,u,I,y)}o.onPlaceLabel(F,M,w,J,u,H,I,y);c++;if(A.contrast&&w.sprite){s=w.sprite;if(s._endStyle){a=s._endStyle.fill}else{if(s._to){a=s._to.fill}else{a=s.attr.fill}}a=a||s.attr.fill;N=m.fromString(a);if(a&&!N){a=a.match(o.colorStringRe)[1];for(G=0;G<z;G++){n=x[G];if(n.id==a){t=0;e=0;for(g in n.stops){t++;e+=m.fromString(n.stops[g].color).getGrayscale()}C=(e/t)/255;break}}}else{C=N.getGrayscale()/255}if(F.isOutside){C=1}B=m.fromString(F.attr.color||F.attr.fill).getHSL();B[2]=C>0.5?0.2:0.8;F.setAttributes({fill:String(m.fromHSL.apply({},B))},true)}}E++;y++}}l=q.length;while(l>c){K.push(c);c++}}o.hideLabels(K)},hideLabels:function(b){var a=this.labelsGroup,c=!!b&&b.length;if(!a){return}if(c===false){c=a.getCount();while(c--){a.getAt(c).hide(true)}}else{while(c--){a.getAt(b[c]).hide(true)}}}});Ext.define("Ext.chart.theme.Theme",{requires:["Ext.draw.Color"],theme:"Base",themeAttrs:false,initTheme:function(e){var d=this,b=Ext.chart.theme,c,a;if(e){e=e.split(":");for(c in b){if(c==e[0]){a=e[1]=="gradients";d.themeAttrs=new b[c]({useGradients:a});if(a){d.gradients=d.themeAttrs.gradients}if(d.themeAttrs.background){d.background=d.themeAttrs.background}return}}}}},function(){(function(){Ext.chart.theme=function(c,b){c=c||{};var m=0,p=+new Date(),j,a,k,r,s,g,o,q,n=[],e,h;if(c.baseColor){e=Ext.draw.Color.fromString(c.baseColor);h=e.getHSL()[2];if(h<0.15){e=e.getLighter(0.3)}else{if(h<0.3){e=e.getLighter(0.15)}else{if(h>0.85){e=e.getDarker(0.3)}else{if(h>0.7){e=e.getDarker(0.15)}}}}c.colors=[e.getDarker(0.3).toString(),e.getDarker(0.15).toString(),e.toString(),e.getLighter(0.15).toString(),e.getLighter(0.3).toString()];delete c.baseColor}if(c.colors){a=c.colors.slice();s=b.markerThemes;r=b.seriesThemes;j=a.length;b.colors=a;for(;m<j;m++){k=a[m];o=s[m]||{};g=r[m]||{};o.fill=g.fill=o.stroke=g.stroke=k;s[m]=o;r[m]=g}b.markerThemes=s.slice(0,j);b.seriesThemes=r.slice(0,j)}for(q in b){if(q in c){if(Ext.isObject(c[q])&&Ext.isObject(b[q])){Ext.apply(b[q],c[q])}else{b[q]=c[q]}}}if(c.useGradients){a=b.colors||(function(){var d=[];for(m=0,r=b.seriesThemes,j=r.length;m<j;m++){d.push(r[m].fill||r[m].stroke)}return d}());for(m=0,j=a.length;m<j;m++){e=Ext.draw.Color.fromString(a[m]);if(e){k=e.getDarker(0.1).toString();e=e.toString();q="theme-"+e.substr(1)+"-"+k.substr(1)+"-"+p;n.push({id:q,angle:45,stops:{0:{color:e.toString()},100:{color:k.toString()}}});a[m]="url(#"+q+")"}}b.gradients=n;b.colors=a}Ext.apply(this,b)}}())});Ext.define("Ext.chart.theme.Base",{requires:["Ext.chart.theme.Theme"],constructor:function(a){Ext.chart.theme.call(this,a,{background:false,axis:{stroke:"#444","stroke-width":1},axisLabelTop:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelRight:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelBottom:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelLeft:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisTitleTop:{font:"bold 18px Arial",fill:"#444"},axisTitleRight:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},axisTitleBottom:{font:"bold 18px Arial",fill:"#444"},axisTitleLeft:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},series:{"stroke-width":0},seriesLabel:{font:"12px Arial",fill:"#333"},marker:{stroke:"#555",radius:3,size:3},colors:["#94ae0a","#115fa6","#a61120","#ff8809","#ffd13e","#a61187","#24ad9a","#7c7474","#a66111"],seriesThemes:[{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#a66111"}],markerThemes:[{fill:"#115fa6",type:"circle"},{fill:"#94ae0a",type:"cross"},{fill:"#115fa6",type:"plus"},{fill:"#94ae0a",type:"circle"},{fill:"#a61120",type:"cross"}]})}},function(){var c=["#b1da5a","#4ce0e7","#e84b67","#da5abd","#4d7fe6","#fec935"],k=["Green","Sky","Red","Purple","Blue","Yellow"],h=0,g=0,b=c.length,a=Ext.chart.theme,d=[["#f0a50a","#c20024","#2044ba","#810065","#7eae29"],["#6d9824","#87146e","#2a9196","#d39006","#1e40ac"],["#fbbc29","#ce2e4e","#7e0062","#158b90","#57880e"],["#ef5773","#fcbd2a","#4f770d","#1d3eaa","#9b001f"],["#7eae29","#fdbe2a","#910019","#27b4bc","#d74dbc"],["#44dce1","#0b2592","#996e05","#7fb325","#b821a1"]],e=d.length;for(;h<b;h++){a[k[h]]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({baseColor:i},j))}})}(c[h]))}for(h=0;h<e;h++){a["Category"+(h+1)]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({colors:i},j))}})}(d[h]))}});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,pauseOnException:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.operations=[];b.exceptions=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a);return this},start:function(a){var b=this;if(b.isRunning){return b}b.exceptions.length=0;b.hasException=false;b.isRunning=true;return b.runOperation(Ext.isDefined(a)?a:b.current+1)},retry:function(){return this.start(this.current)},runNextOperation:function(){return this.runOperation(this.current+1)},pause:function(){this.isRunning=false;return this},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(g){var h=g.hasException();if(h){e.hasException=true;e.exceptions.push(g);e.fireEvent("exception",e,g)}if(h&&e.pauseOnException){e.pause()}else{g.setCompleted();e.fireEvent("operationcomplete",e,g);e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}return e}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var g=this,j=k.scope||window,e=k.username||g.username,h=k.password||g.password||"",b,c,d,a,i;if(g.fireEvent("beforerequest",g,k)!==false){c=g.setOptions(k,j);if(g.isFormUpload(k)){g.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort||g.autoAbort){g.abort()}b=k.async!==false?(k.async||g.async):false;i=g.openRequest(k,c,b,e,h);a=g.setupHeaders(i,k,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,timeout:setTimeout(function(){d.timedout=true;g.abort(d)},k.timeout||g.timeout)};g.requests[d.id]=d;g.latestId=d.id;if(b){i.onreadystatechange=Ext.Function.bind(g.onStateChange,g,[d])}i.send(c.data);if(!b){return g.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(b,g,s,e){b=Ext.getDom(b);e=e||{};var n=Ext.id(),l=document.createElement("iframe"),c=[],d="multipart/form-data",r={target:b.target,method:b.method,encoding:b.encoding,enctype:b.enctype,action:b.action},a=function(h,u){i=document.createElement("input");Ext.fly(i).set({type:"hidden",value:u,name:h});b.appendChild(i);c.push(i)},i,k,p,t,o,j,m,q;Ext.fly(l).set({id:n,name:n,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(l);if(document.frames){document.frames[n].name=n}Ext.fly(b).set({target:n,method:"POST",enctype:d,encoding:d,action:g||r.action});if(s){k=Ext.Object.fromQueryString(s)||{};for(t in k){if(k.hasOwnProperty(t)){p=k[t];if(Ext.isArray(p)){o=p.length;for(j=0;j<o;j++){a(t,p[j])}}else{a(t,p)}}}}Ext.fly(l).on("load",Ext.Function.bind(this.onUploadComplete,this,[l,e]),null,{single:true});b.submit();Ext.fly(b).set(r);m=c.length;for(q=0;q<m;q++){Ext.removeNode(c[q])}},onUploadComplete:function(i,b){var c=this,a={responseText:"",responseXML:null},h,g;try{h=i.contentWindow.document||i.contentDocument||window.frames[i.id].document;if(h){if(h.body){if(/textarea/i.test((g=h.body.firstChild||{}).tagName)){a.responseText=g.value}else{a.responseText=h.body.innerHTML}}a.responseXML=h.XMLDocument||h}}catch(d){}c.fireEvent("requestcomplete",c,a,b);Ext.callback(b.success,b.scope,[a,b]);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(i)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(l,k){var i=this,e=l.params||{},h=i.extraParams,d=l.urlParams,c=l.url||i.url,j=l.jsonData,b,a,g;if(Ext.isFunction(e)){e=e.call(k,l)}if(Ext.isFunction(c)){c=c.call(k,l)}c=this.setupUrl(l,c);g=l.rawData||l.xmlData||j||null;if(j&&!Ext.isPrimitive(j)){g=Ext.encode(g)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(h)){h=Ext.Object.toQueryString(h)}e=e+((h)?((e)?"&":"")+h:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(l,e);b=(l.method||i.method||((e||g)?"POST":"GET")).toUpperCase();this.setupMethod(l,b);a=l.disableCaching!==false?(l.disableCaching||i.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(l.disableCachingParam||i.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||g)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:g||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(m,n,d,c){var i=this,b=Ext.apply({},n.headers||{},i.defaultHeaders||{}),l=i.defaultPostHeader,j=n.jsonData,a=n.xmlData,k,g;if(!b["Content-Type"]&&(d||c)){if(d){if(n.rawData){l="text/plain"}else{if(a&&Ext.isDefined(a)){l="text/xml"}else{if(j&&Ext.isDefined(j)){l="application/json"}}}}b["Content-Type"]=l}if(i.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=i.defaultXhrHeader}try{for(k in b){if(b.hasOwnProperty(k)){g=b[k];m.setRequestHeader(k,g)}}}catch(h){i.fireEvent("exception",k,g)}return b},newRequest:function(a){var b;if((a.cors||this.cors)&&Ext.isIE&&Ext.ieVersion>=8){b=new XDomainRequest()}else{b=this.getXhrInstance()}return b},openRequest:function(c,a,d,g,b){var e=this.newRequest(c);if(g){e.open(a.method,a.url,d,g,b)}else{e.open(a.method,a.url,d)}if(c.withCredentials||this.withCredentials){e.withCredentials=true}return e},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c<a;++c){try{g=b[c];g();break}catch(d){}}return g}()),isLoading:function(a){if(!a){a=this.getLatest()}if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this,d;if(!b){b=a.getLatest()}if(b&&a.isLoading(b)){d=b.xhr;try{d.onreadystatechange=null}catch(c){d=Ext.emptyFn}d.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}},abortAll:function(){var b=this.requests,a;for(a in b){if(b.hasOwnProperty(a)){this.abort(b[a])}}},getLatest:function(){var b=this.latestId,a;if(b){a=this.requests[b]}return a||null},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(g){var d=this,c=g.options,a,i,b;try{a=d.parseStatus(g.xhr.status)}catch(h){a={success:false,isException:false}}i=a.success;if(i){b=d.createResponse(g);d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||g.aborted||g.timedout){b=d.createException(g)}else{b=d.createResponse(g)}d.fireEvent("requestexception",d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,i,b]);delete d.requests[g.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304,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 i=c.xhr,a={},j=i.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=j.length,k,e,h,g,b;while(d--){k=j[d];e=k.indexOf(":");if(e>=0){h=k.substr(0,e).toLowerCase();if(k.charAt(e+1)==" "){++e}a[h]=k.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:i.status,statusText:i.statusText,getResponseHeader:function(l){return a[l.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:i.responseText,responseXML:i.responseXML};i=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.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",constructor:function(b){if(Ext.isString(b)){b={name:b}}Ext.apply(this,b);var c=Ext.data.Types,a=this.sortType;if(this.type){if(Ext.isString(this.type)){this.type=c[this.type.toUpperCase()]||c.AUTO}}else{this.type=c.AUTO}if(Ext.isString(a)){this.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){this.sortType=this.type.sortType}}if(!b.hasOwnProperty("convert")){this.convert=this.type.convert}else{if(!this.convert&&!b.hasOwnProperty("defaultValue")){this.defaultValue=this.type.convert(this.defaultValue)}}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(b){var a,c;if(typeof b=="string"){b=Ext.ModelManager.getModel(b)}else{if(b.isModel){b=Ext.ModelManager.getModel(b.modelName)}}if(b.prototype.isNode){return}a=b.prototype.idProperty;c=b.prototype.fields.get(a).type.type;b.override(this.getPrototypeBody());this.applyFields(b,[{name:"parentId",type:c,defaultValue:null},{name:"index",type:"int",defaultValue:null,persist:false},{name:"depth",type:"int",defaultValue:0,persist:false},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null,persist:false},{name:"leaf",type:"bool",defaultValue:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"icon",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false},{name:"children",type:"auto",defaultValue:null,persist:false}])},applyFields:function(c,b){var h=c.prototype,a=h.fields,g=a.keys,e=b.length,j,d;for(d=0;d<e;d++){j=b[d];if(!Ext.Array.contains(g,j.name)){a.add(new Ext.data.Field(j))}}},getPrototypeBody:function(){return{isNode:true,constructor:function(){var a=this;this.callParent(arguments);Ext.applyIf(a,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});a.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort"]);return a},createNode:function(a){if(Ext.isObject(a)&&!a.isModel){a=Ext.ModelManager.create(a,this.modelName)}return a},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},updateInfo:function(g){var m=this,b=m.isRoot(),k=m.parentNode,d=(!k||b?true:k.firstChild===m),j=(!k||b?true:k.lastChild===m),h=0,n=m,a=m.childNodes,l=a.length,e=0,c=m.phantom;while(n.parentNode){++h;n=n.parentNode}m.beginEdit();m.set({isFirst:d,isLast:j,depth:h,index:k?k.indexOf(m):0,parentId:k?k.getId():null});m.endEdit(true);if(g){m.commit();m.phantom=c}for(e=0;e<l;e++){a[e].updateInfo(g)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,k,c){var h=this,d,g,e,j,a;if(Ext.isArray(b)){h.callStore("suspendAutoSync");for(d=0,g=b.length-1;d<g;d++){h.appendChild(b[d])}h.callStore("resumeAutoSync");h.appendChild(b[g])}else{b=h.createNode(b);if(k!==true&&(!h.hasListeners.beforeappend||h.fireEvent("beforeappend",h,b)===false)){return false}e=h.childNodes.length;j=b.parentNode;if(j){if(k!==true&&(!h.hasListeners.beforeremove||b.fireEvent("beforemove",b,j,h,e)===false)){return false}j.removeChild(b,false,false,true)}e=h.childNodes.length;if(e===0){h.setFirstChild(b)}h.childNodes.push(b);b.parentNode=h;b.nextSibling=null;h.setLastChild(b);a=h.childNodes[e-1];if(a){b.previousSibling=a;a.nextSibling=b;a.updateInfo(c)}else{b.previousSibling=null}b.updateInfo(c);if(!h.isLoaded()){h.set("loaded",true)}else{if(h.childNodes.length===1){h.afterEdit([])}}if(!b.isLeaf()&&b.phantom){b.set("loaded",true)}if(k!==true){h.fireEvent("append",h,b,e);if(j){b.fireEvent("move",b,j,h,e)}}return b}},getBubbleTarget:function(){return this.parentNode},removeChild:function(j,e,g,b){var h=this,c=h.indexOf(j),d,a;if(c==-1||(g!==true&&(!h.hasListeners.beforeremove||h.fireEvent("beforeremove",h,j,!!b)===false))){return false}Ext.Array.erase(h.childNodes,c,1);if(h.firstChild==j){h.setFirstChild(j.nextSibling)}if(h.lastChild==j){h.setLastChild(j.previousSibling)}if(j.previousSibling){j.previousSibling.nextSibling=j.nextSibling}if(j.nextSibling){j.nextSibling.previousSibling=j.previousSibling}for(d=c>0?c-1:0,a=h.childNodes.length;d<a;d++){h.childNodes[d].updateInfo()}if(!h.childNodes.length){h.set("loaded",h.isLoaded())}if(g!==true){if(h.hasListeners.remove){h.fireEvent("remove",h,j,!!b)}}if(e){j.destroy(true)}else{j.clear()}return j},copy:function(d,c){var g=this,b=g.callOverridden(arguments),a=g.childNodes?g.childNodes.length:0,e;if(c){for(e=0;e<a;e++){b.appendChild(g.childNodes[e].copy(true))}}return b},clear:function(a){var b=this;b.parentNode=b.previousSibling=b.nextSibling=null;if(a){b.firstChild=b.lastChild=null}},destroy:function(b){var d=this,c=d.destroyOptions,a=d.childNodes,e=a.length,g;if(b===true){d.clear(true);for(g=0;g<e;g++){a[g].destroy(true)}d.childNodes=null;delete d.destroyOptions;d.callOverridden([c])}else{d.destroyOptions=b;d.remove(true)}},insertBefore:function(b,g,l){var h=this,e=h.indexOf(g),j=b.parentNode,k=e,c,a,d;if(!g){return h.appendChild(b)}if(b==g){return false}b=h.createNode(b);if(l!==true&&(!h.hasListeners.beforeinsert||h.fireEvent("beforeinsert",h,b,g)===false)){return false}if(j==h&&h.indexOf(b)<e){k--}if(j){if(l!==true&&(!h.hasListeners.beforeremove||b.fireEvent("beforemove",b,j,h,e,g)===false)){return false}j.removeChild(b,false,false,true)}if(k===0){h.setFirstChild(b)}Ext.Array.splice(h.childNodes,k,0,b);b.parentNode=h;b.nextSibling=g;g.previousSibling=b;a=h.childNodes[k-1];if(a){b.previousSibling=a;a.nextSibling=b}else{b.previousSibling=null}for(d=k>0?k-1:0,c=h.childNodes.length;d<c;d++){h.childNodes[d].updateInfo()}if(!h.isLoaded()){h.set("loaded",true)}else{if(h.childNodes.length===1){h.set("loaded",h.isLoaded())}}if(!b.isLeaf()&&b.phantom){b.set("loaded",true)}if(l!==true){if(h.hasListeners.insert){h.fireEvent("insert",h,b,g)}if(j&&h.hasListeners.move){b.fireEvent("move",b,j,h,k,g)}}return b},insertChild:function(a,c){var b=this.childNodes[a];if(b){return this.insertBefore(c,b)}else{return this.appendChild(c)}},remove:function(b,c){var a=this.parentNode;if(a){a.removeChild(this,b,c)}return this},removeAll:function(a,b){var d=this.childNodes,c;while((c=d[0])){this.removeChild(c,a,b)}return this},getChildAt:function(a){return this.childNodes[a]},replaceChild:function(a,d,c){var b=d?d.nextSibling:null;this.removeChild(d,false,c);this.insertBefore(a,b,c);return d},indexOf:function(a){return Ext.Array.indexOf(this.childNodes,a)},indexOfId:function(d){var c=this.childNodes,a=c.length,b=0;for(;b<a;++b){if(c[b].getId()===d){return b}}return -1},getPath:function(d,c){d=d||this.idProperty;c=c||"/";var b=[this.get(d)],a=this.parentNode;while(a){b.unshift(a.get(d));a=a.parentNode}return c+b.join(c)},getDepth:function(){return this.get("depth")},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(d,c,a){if(d.apply(c||this,a||[this])!==false){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){g[b].cascadeBy(d,c,a)}}},eachChild:function(d,c,a){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){if(d.apply(c||this,a||[g[b]])===false){break}}},findChild:function(b,c,a){return this.findChildBy(function(){return this.get(b)==c},null,a)},findChildBy:function(h,g,b){var e=this.childNodes,a=e.length,d=0,j,c;for(;d<a;d++){j=e[d];if(h.call(g||j,j)===true){return j}else{if(b){c=j.findChildBy(h,g,b);if(c!==null){return c}}}}return null},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},sort:function(g,b,a){var d=this.childNodes,e=d.length,c,h;if(e>0){Ext.Array.sort(d,g);for(c=0;c<e;c++){h=d[c];h.previousSibling=d[c-1];h.nextSibling=d[c+1];if(c===0){this.setFirstChild(h)}if(c==e-1){this.setLastChild(h)}h.updateInfo();if(b&&!h.isLeaf()){h.sort(g,true,true)}}if(a!==true){this.fireEvent("sort",this,d)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var a=this.parentNode;while(a){if(!a.isExpanded()){return false}a=a.parentNode}return true},expand:function(a,d,b){var c=this;if(!c.isLeaf()){if(c.isLoading()){c.on("expand",function(){c.expand(a,d,b)},c,{single:true})}else{if(!c.isExpanded()){c.fireEvent("beforeexpand",c,function(){c.set("expanded",true);if(c.hasListeners.expand){c.fireEvent("expand",c,c.childNodes,false)}if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}}}}else{Ext.callback(d,b||c)}},expandChildren:function(d,j,k){var h=this,e=0,a=h.childNodes,g=a.length,c,b=0;for(;e<g;++e){c=a[e];if(!c.isLeaf()&&!c.isExpanded()){b++;a[e].expand(d,function(){b--;if(j&&!b){Ext.callback(j,k||h,[h.childNodes])}})}}if(!b&&j){Ext.callback(j,k||h,[h.childNodes])}},collapse:function(a,d,b){var c=this;if(!c.isLeaf()){if(!c.collapsing&&c.isExpanded()){c.fireEvent("beforecollapse",c,function(){c.set("expanded",false);if(c.hasListeners.collapse){c.fireEvent("collapse",c,c.childNodes,false)}if(a){c.collapseChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.collapseChildren(true,d,b)}}}else{Ext.callback(d,b||c,[c.childNodes])}},collapseChildren:function(d,j,k){var h=this,e=0,b=h.childNodes,g=b.length,c,a=0;for(;e<g;++e){c=b[e];if(!c.isLeaf()&&c.isExpanded()){a++;b[e].collapse(d,function(){a--;if(j&&!a){Ext.callback(j,k||h,[h.childNodes])}})}}if(!a&&j){Ext.callback(j,k||h,[h.childNodes])}}}}}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:"Ext.util.Observable"},root:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b);if(a){b.setRootNode(a)}},getRootNode:function(){return this.root},setRootNode:function(b){var a=this;a.root=b;if(a.fireEvent("beforeappend",null,b)!==false){b.set("root",true);b.updateInfo();b.commit();b.on({scope:a,insert:a.onNodeInsert,append:a.onNodeAppend,remove:a.onNodeRemove});a.relayEvents(b,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);a.nodeHash={};a.registerNode(b);a.fireEvent("append",null,b);a.fireEvent("rootchange",b)}return b},flatten:function(){var a=[],c=this.nodeHash,b;for(b in c){if(c.hasOwnProperty(b)){a.push(c[b])}}return a},onNodeInsert:function(a,b){this.registerNode(b,true)},onNodeAppend:function(a,b){this.registerNode(b,true)},onNodeRemove:function(a,b){this.unregisterNode(b,true)},onNodeIdChanged:function(c,d,a){var b=this.nodeHash;b[a]=c;delete b[d||c.internalId]},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(c,a){var b=this;b.nodeHash[c.getId()||c.internalId]=c;c.on("idchanged",b.onNodeIdChanged,b);if(a===true){c.eachChild(function(d){b.registerNode(d,true)})}},unregisterNode:function(b,a){delete this.nodeHash[b.getId()||b.internalId];if(a===true){b.eachChild(function(c){this.unregisterNode(c,true)},this)}},sort:function(b,a){this.getRootNode().sort(b,a)},filter:function(b,a){this.getRootNode().filter(b,a)}});Ext.define("Ext.data.association.HasMany",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasManyAssociation",requires:["Ext.util.Inflector"],alias:"association.hasmany",constructor:function(c){var d=this,a,b;d.callParent(arguments);d.name=d.name||Ext.util.Inflector.pluralize(d.associatedName.toLowerCase());a=d.ownerModel.prototype;b=d.name;Ext.applyIf(d,{storeName:b+"Store",foreignKey:d.ownerName.toLowerCase()+"_id"});a[b]=d.createStore()},createStore:function(){var h=this,i=h.associatedModel,c=h.storeName,d=h.foreignKey,a=h.primaryKey,g=h.filterProperty,b=h.autoLoad,e=h.storeConfig||{};return function(){var m=this,k,l,j={};if(m[c]===undefined){if(g){l={property:g,value:m.get(g),exactMatch:true}}else{l={property:d,value:m.get(a),exactMatch:true}}j[d]=m.get(a);k=Ext.apply({},e,{model:i,filters:[l],remoteFilter:false,modelDefaults:j});m[c]=new Ext.data.Store(k);if(b){m[c].load()}}return m[c]}},read:function(d,b,j){var g=d[this.name](),c,e,a,h;g.add(b.read(j).records);c=this.associatedModel.prototype.associations.findBy(function(i){return i.type==="belongsTo"&&i.associatedName===d.$className});if(c){e=g.data.items;a=e.length;for(h=0;h<a;h++){e[h][c.instanceName]=d}}}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(a){a=a||{};if(a.model===undefined){delete a.model}Ext.apply(this,a);this.mixins.observable.constructor.call(this);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(b,c){this.model=Ext.ModelManager.getModel(b);var a=this.reader,d=this.writer;this.setReader(a);this.setWriter(d);if(c&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(a){var b=this;if(a===undefined||typeof a=="string"){a={type:a}}if(a.isReader){a.setModel(b.model)}else{Ext.applyIf(a,{proxy:b,model:b.model,type:b.defaultReaderType});a=Ext.createByAlias("reader."+a.type,a)}if(a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}b.reader=a;return b.reader},getReader:function(){return this.reader},onMetaChange:function(a){this.fireEvent("metachange",this,a)},setWriter:function(a){if(a===undefined||typeof a=="string"){a={type:a}}if(!a.isWriter){Ext.applyIf(a,{model:this.model,type:this.defaultWriterType});a=Ext.createByAlias("writer."+a.type,a)}this.writer=a;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(o,l){var k=this,j=k.batchActions,h,c,g,d,e,m,b,n,i;if(o.operations===undefined){o={operations:o,listeners:l}}if(o.batch){if(Ext.isDefined(o.batch.runOperation)){h=Ext.applyIf(o.batch,{proxy:k,listeners:{}})}}else{o.batch={proxy:k,listeners:o.listeners||{}}}if(!h){h=new Ext.data.Batch(o.batch)}h.on("complete",Ext.bind(k.onBatchComplete,k,[o],0));g=k.batchOrder.split(",");d=g.length;for(m=0;m<d;m++){e=g[m];c=o.operations[e];if(c){if(j){h.add(new Ext.data.Operation({action:e,records:c}))}else{n=c.length;for(b=0;b<n;b++){i=c[b];h.add(new Ext.data.Operation({action:e,records:[i]}))}}}}h.start();return h},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.data.DataProxy=this});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},updateOperation:function(b,g,d){var c=0,e=b.getRecords(),a=e.length;for(c;c<a;c++){e[c].commit()}b.setCompleted();b.setSuccessful();Ext.callback(g,d||this,[b])},create:function(){this.updateOperation.apply(this,arguments)},update:function(){this.updateOperation.apply(this,arguments)},destroy:function(){this.updateOperation.apply(this,arguments)},read:function(c,g,d){var e=this,b=e.getReader(),a=b.read(e.data);Ext.apply(c,{resultSet:a});c.setCompleted();c.setSuccessful();Ext.callback(g,d||e,[c])},clear:Ext.emptyFn});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};b.callParent([a]);b.extraParams=a.extraParams||{};b.api=Ext.apply({},a.api||b.api);b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(a,b){this.extraParams[a]=b},buildRequest:function(a){var c=this,d=Ext.applyIf(a.params||{},c.extraParams||{}),b;d=Ext.applyIf(d,c.getParams(a));if(a.id&&!d.id){d.id=a.id}b=new Ext.data.Request({params:d,action:a.action,records:a.records,operation:a,url:a.url,proxy:c});b.url=c.buildUrl(b);a.request=b;return b},processResponse:function(h,a,c,b,g,i){var e=this,d,j;if(h===true){d=e.getReader();d.applyDefaults=a.action==="read";j=d.read(e.extractResponseData(b));if(j.success!==false){Ext.apply(a,{response:b,resultSet:j});a.commitRecords(j.records);a.setCompleted();a.setSuccessful()}else{a.setException(j.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof g=="function"){g.call(i||e,a)}e.afterRequest(c,h)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(l){var s=this,r={},o=Ext.isDefined,p=l.groupers,a=l.sorters,j=l.filters,h=l.page,g=l.start,q=l.limit,i=s.simpleSortMode,n=s.pageParam,d=s.startParam,b=s.limitParam,c=s.groupParam,e=s.sortParam,m=s.filterParam,k=s.directionParam;if(n&&o(h)){r[n]=h}if(d&&o(g)){r[d]=g}if(b&&o(q)){r[b]=q}if(c&&p&&p.length>0){r[c]=s.encodeSorters(p)}if(e&&a&&a.length>0){if(i){r[e]=a[0].property;r[k]=a[0].direction}else{r[e]=s.encodeSorters(a)}}if(m&&j&&j.length>0){r[m]=s.encodeFilters(j)}return r},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true,constructor:function(){this.addEvents("exception");this.callParent(arguments)},doRequest:function(a,h,b){var d=this,e=d.getWriter(),c=d.buildRequest(a),g=c.params;if(a.allowWrite()){c=e.write(c)}Ext.apply(c,{callbackKey:d.callbackKey,timeout:d.timeout,scope:d,disableCaching:false,callback:d.createRequestCallback(c,a,h,b)});if(d.autoAppendParams){c.params={}}c.jsonp=Ext.data.JsonP.request(c);c.params=g;a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(i,g,h){delete c.lastRequest;c.processResponse(i,a,d,g,e,b)}},setException:function(b,a){b.setException(b.request.jsonp.errorType)},buildUrl:function(h){var g=this,b=g.callParent(arguments),j=Ext.apply({},h.params),e=j.filters,a,d,c;delete j.filters;if(g.autoAppendParams){b=Ext.urlAppend(b,Ext.Object.toQueryString(j))}if(e&&e.length){for(c=0;c<e.length;c++){d=e[c];if(d.value){b=Ext.urlAppend(b,d.property+"="+d.value)}}}a=h.records;if(Ext.isArray(a)&&a.length>0){b=Ext.urlAppend(b,Ext.String.format("{0}={1}",g.recordParam,g.encodeRecords(a)))}return b},destroy:function(){this.abort();this.callParent(arguments)},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.jsonp)}},encodeRecords:function(b){var d="",c=0,a=b.length;for(;c<a;c++){d+=Ext.Object.toQueryString(b[c].getData())}return d}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",requires:["Ext.data.SequentialIdGenerator"],id:undefined,constructor:function(a){this.callParent(arguments);this.cache={};this.id=this.id||(this.store?this.store.storeId:undefined);this.initialize()},create:function(e,k,l){var j=this,d=e.records,c=d.length,a=j.getIds(),b,h,g;e.setStarted();if(j.isHierarchical===undefined){j.isHierarchical=!!d[0].isNode;if(j.isHierarchical){j.getStorageObject().setItem(j.getTreeKey(),true)}}for(g=0;g<c;g++){h=d[g];if(h.phantom){h.phantom=false;b=j.getNextId()}else{b=h.getId()}j.setRecord(h,b);h.commit();a.push(b)}j.setIds(a);e.setCompleted();e.setSuccessful();if(typeof k=="function"){k.call(l||j,e)}},read:function(g,m,o){var l=this,e=[],j=0,n=true,d=l.model,a,c,k,h,b;g.setStarted();if(l.isHierarchical){e=l.getTreeData()}else{a=l.getIds();c=a.length;b=g.id;if(b){h=l.getRecord(b);k=new d(h,b,h);if(k){e.push(k)}else{n=false}}else{for(;j<c;j++){b=a[j];h=l.getRecord(b);e.push(new d(h,b,h))}}}if(n){g.setSuccessful()}g.setCompleted();g.resultSet=Ext.create("Ext.data.ResultSet",{records:e,total:e.length,loaded:true});if(typeof m=="function"){m.call(o||l,g)}},update:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),h,b,g;e.setStarted();for(g=0;g<c;g++){h=d[g];this.setRecord(h);h.commit();b=h.getId();if(b!==undefined&&Ext.Array.indexOf(a,b)==-1){a.push(b)}}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},destroy:function(d,k,l){var g=this,c=d.records,a=g.getIds(),h=a.length,m=[],j={},e=c.length,b;d.setStarted();for(;e--;){Ext.apply(j,g.removeRecord(c[e]))}for(e=0;e<h;e++){b=a[e];if(!j[b]){m.push(b)}}g.setIds(m);d.setCompleted();d.setSuccessful();if(typeof k=="function"){k.call(l||g,d)}},getRecord:function(d){var b=this,a=b.cache,c=!a[d]?Ext.decode(b.getStorageObject().getItem(b.getRecordKey(d))):a[d];if(!c){return null}a[d]=c;c[b.model.prototype.idProperty]=d;return c},setRecord:function(k,c){if(c){k.setId(c)}else{c=k.getId()}var m=this,a=k.data,h={},j=m.model,l=j.prototype.fields.items,d=l.length,g=0,n,b,e,o;for(;g<d;g++){n=l[g];b=n.name;if(n.persist){h[b]=a[b]}}delete h[m.model.prototype.idProperty];if(k.isNode&&k.get("depth")===1){delete h.parentId}e=m.getStorageObject();o=m.getRecordKey(c);m.cache[c]=h;e.removeItem(o);e.setItem(o,Ext.encode(h))},removeRecord:function(a){var d=this,g=a.getId(),b={},c,e;b[g]=a;d.getStorageObject().removeItem(d.getRecordKey(g));delete d.cache[g];if(a.childNodes){e=a.childNodes;for(c=e.length;c--;){Ext.apply(b,d.removeRecord(e[c]))}}return b},getRecordKey:function(a){if(a.isModel){a=a.getId()}return Ext.String.format("{0}-{1}",this.id,a)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getTreeKey:function(){return Ext.String.format("{0}-tree",this.id)},getIds:function(){var g=this,d=(g.getStorageObject().getItem(g.id)||"").split(","),b=g.model,e=d.length,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",c;if(e==1&&d[0]===""){d=[]}else{for(c=0;c<e;c++){d[c]=a?d[c]:+d[c]}}return d},setIds:function(a){var b=this.getStorageObject(),c=a.join(",");b.removeItem(this.id);if(!Ext.isEmpty(c)){b.setItem(this.id,c)}},getNextId:function(){var d=this,e=d.getStorageObject(),c=d.getRecordCounterKey(),b=d.model,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",g;g=d.idGenerator.generate();e.setItem(c,g);if(!a){g=+g}return g},getTreeData:function(){var n=this,a=n.getIds(),e=a.length,j=[],b={},o=[],k=0,h=n.model,q=h.prototype.idProperty,g,m,p,l,d,c;for(;k<e;k++){c=a[k];m=n.getRecord(c);j.push(m);b[c]=m;if(!m.parentId){o.push(m)}}g=o.length;Ext.Array.sort(j,n.sortByParentId);for(k=g;k<e;k++){m=j[k];l=m.parentId;if(!p||p[q]!==l){p=b[l];p.children=d=[]}d.push(m)}for(k=e;k--;){m=j[k];if(!m.children&&!m.leaf){m.loaded=true}}for(k=g;k--;){m=o[k];o[k]=new h(m,m[q],m)}return o},sortByParentId:function(b,a){return(b.parentId||0)-(a.parentId||0)},initialize:function(){var b=this,a=b.getStorageObject(),c=+a.getItem(b.getRecordCounterKey());a.setItem(b.id,a.getItem(b.id)||"");if(a.getItem(b.getTreeKey())){b.isHierarchical=true}b.idGenerator=new Ext.data.SequentialIdGenerator({seed:c?c+1:1})},clear:function(){var d=this,e=d.getStorageObject(),c=d.getIds(),a=c.length,b;for(b=0;b<a;b++){e.removeItem(d.getRecordKey(c[b]))}e.removeItem(d.getRecordCounterKey());e.removeItem(d.getTreeKey());e.removeItem(d.id);d.cache={}},getStorageObject:function(){}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Ext.data.proxy.SessionStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.sessionstorage",alternateClassName:"Ext.data.SessionStorageProxy",getStorageObject:function(){return window.sessionStorage}});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:{observable:"Ext.util.Observable"},totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,readRecordsOnFailure:true,isReader:true,applyDefaults:true,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.fieldCount=0;b.model=Ext.ModelManager.getModel(b.model);if(b.model&&b.model.prototype.fields){b.buildExtractors()}this.addEvents("exception")},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b;if(a){b=a.responseText?this.getResponseData(a):this.readRecords(a)}return b||this.nullResultSet},readRecords:function(c){var d=this,i,b,a,g,e,h,j;if(d.fieldCount!==d.getFields().length){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);i=true;b=0;a=[];if(d.successProperty){h=d.getSuccess(c);if(h===false||h==="false"){i=false}}if(d.messageProperty){j=d.getMessage(c)}if(d.readRecordsOnFailure||i){g=Ext.isArray(c)?c:d.getRoot(c);if(g){e=g.length}if(d.totalProperty){h=parseInt(d.getTotal(c),10);if(!isNaN(h)){e=h}}if(g){a=d.extractData(g);b=a.length}}return new Ext.data.ResultSet({total:e||b,count:b,records:a,success:i,message:j})},extractData:function(k){var j=this,d=[],b=j.model,a=k.length,e,c,h,g;if(!k.length&&Ext.isObject(k)){k=[k];a=1}for(g=0;g<a;g++){c=k[g];h=new b(undefined,j.getId(c),c,e={});h.phantom=false;j.convertRecordData(e,c,h);d.push(h);if(j.implicitIncludes){j.readAssociated(h,c)}}return d},readAssociated:function(h,e){var d=h.associations.items,g=0,a=d.length,c,b,k,j;for(;g<a;g++){c=d[g];b=this.getAssociatedDataRoot(e,c.associationKey||c.name);if(b){j=c.getReader();if(!j){k=c.associatedModel.proxy;if(k){j=k.getReader()}else{j=new this.constructor({model:c.associatedName})}}c.read(h,j,b)}}},getAssociatedDataRoot:function(b,a){return b[a]},getFields:function(){return this.model.prototype.fields.items},getData:function(a){return a},getRoot:function(a){return a},getResponseData:function(a){},onMetaChange:function(e){var d=this,b=e.fields||d.getFields(),c,a;d.metaData=e;d.root=e.root||d.root;d.idProperty=e.idProperty||d.idProperty;d.totalProperty=e.totalProperty||d.totalProperty;d.successProperty=e.successProperty||d.successProperty;d.messageProperty=e.messageProperty||d.messageProperty;a=e.clientIdProperty;if(d.model){d.model.setFields(b,d.idProperty,a);d.setModel(d.model,true)}else{c=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:b,clientIdProperty:a});if(d.idProperty){c.idProperty=d.idProperty}d.setModel(c,true)}},getIdProperty:function(){return this.idProperty||this.model.prototype.idProperty},buildExtractors:function(b){var g=this,j=g.getIdProperty(),i=g.totalProperty,e=g.successProperty,h=g.messageProperty,d,c,a;if(b===true){delete g.convertRecordData}if(g.convertRecordData){return}if(i){g.getTotal=g.createAccessor(i)}if(e){g.getSuccess=g.createAccessor(e)}if(h){g.getMessage=g.createAccessor(h)}if(j){c=g.model.prototype.fields.get(j);if(c){a=c.mapping;j=(a!==undefined&&a!==null)?a:j}d=g.createAccessor(j);g.getId=function(k){var l=d.call(g,k);return(l===undefined||l==="")?null:l}}else{g.getId=function(){return null}}g.convertRecordData=g.buildRecordDataExtractor()},buildRecordDataExtractor:function(){var j=this,l=j.model.prototype,h=l.clientIdProperty,g=l.fields.items,d=g.length,a=[],c,e=0,k,b=["var me = this,\n","    fields = me.model.prototype.fields,\n","    value,\n","    internalId"];for(e=0;e<d;e++){k=g[e];a[e]="__field"+e;b.push(",\n    ",a[e],' = fields.get("',k.name,'")')}b.push(";\n\n    return function(dest, source, record) {\n");for(e=0;e<d;e++){k=g[e];c=a[e];b.push("        value = ",j.createFieldAccessExpression(k,c,"source"),";\n");if(k.defaultValue!==undefined){b.push("        if (value === undefined) {\n");b.push("            if (me.applyDefaults) {\n");b.push('                dest["'+k.name+'"] = ',(k.convert?a[e]+".convert("+a[e]+".defaultValue, record)":(a[e]+".defaultValue")),";\n");b.push("            }\n");b.push("        } else {\n");b.push('            dest["'+k.name+'"] = ',(k.convert?a[e]+".convert(value, record)":"value"),";\n");b.push("        }\n")}else{b.push("        if (value !== undefined) {\n");b.push('            dest["'+k.name+'"] = ',(k.convert?a[e]+".convert(value, record)":"value"),";\n");b.push("        }\n")}}if(h){b.push("        if (record && (internalId = "+j.createFieldAccessExpression({mapping:h},null,"source")+")) {\n");b.push("            record.internalId = internalId;\n        }\n")}b.push("    };");return Ext.functionFactory(b.join("")).call(j)},destroyReader:function(){var a=this;delete a.proxy;delete a.model;delete a.convertRecordData;delete a.getId;delete a.getTotal;delete a.getSuccess;delete a.getMessage}},function(){Ext.apply(this.prototype,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){var d,b;try{d=Ext.decode(a.responseText);return this.readRecords(d)}catch(c){b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:c.message});this.fireEvent("exception",this,a,b);Ext.Logger.warn("Unable to parse the JSON returned by the server");return b}},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:(function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()),createFieldAccessExpression:(function(){var a=/[\[\.]/;return function(i,d,c){var e=this,g=(i.mapping!==null),h=g?i.mapping:i.name,b,j;if(typeof h==="function"){b=d+".mapping("+c+", this)"}else{if(this.useSimpleAccessors===true||((j=String(h).search(a))<0)){if(!g||isNaN(h)){h='"'+h+'"'}b=c+"["+h+"]"}else{b=c+(j>0?".":"")+h}}return b}}())});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",totalProperty:undefined,successProperty:undefined,createFieldAccessExpression:function(e,c,b){var d=(e.mapping==null)?e.originalIndex:e.mapping,a;if(typeof d==="function"){a=c+".mapping("+b+", this)"}else{if(isNaN(d)){d='"'+d+'"'}a=b+"["+d+"]"}return a}});Ext.define("Ext.data.reader.Xml",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a&&a.firstChild){return a.firstChild.nodeValue}return undefined},getResponseData:function(a){var c=a.responseXML,b,d;if(!c){d="XML data not found in the response";b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:d});this.fireEvent("exception",this,a,b);Ext.Logger.warn(d);return b}return this.readRecords(c)},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.root;if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.record;if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}this.xmlData=a;return this.callParent([a])},createFieldAccessExpression:function(e,d,c){var b=e.mapping||e.name,a;if(typeof b==="function"){a=d+".mapping("+c+", this)"}else{a='me.getNodeValue(Ext.DomQuery.selectNode("'+b+'", '+c+"))"}return a}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&&c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.direct.Provider",{alias:"direct.provider",mixins:{observable:"Ext.util.Observable"},constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("connect","disconnect","data","exception");b.mixins.observable.constructor.call(b,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.define("Ext.direct.JsonProvider",{extend:"Ext.direct.Provider",alias:"direct.jsonprovider",uses:["Ext.direct.ExceptionEvent"],parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(Ext.isObject(a.responseText)){return a.responseText}return Ext.decode(a.responseText)}return null},createEvents:function(b){var h=null,d=[],g,c=0,a;try{h=this.parseResponse(b)}catch(j){g=new Ext.direct.ExceptionEvent({data:j,xhr:b,code:Ext.direct.Manager.self.exceptions.PARSE,message:"Error parsing json response: \n\n "+h});return[g]}if(Ext.isArray(h)){for(a=h.length;c<a;++c){d.push(this.createEvent(h[c]))}}else{d.push(this.createEvent(h))}return d},createEvent:function(a){return Ext.create("direct."+a.type,a)}});Ext.define("Ext.direct.PollingProvider",{extend:"Ext.direct.JsonProvider",alias:"direct.pollingprovider",uses:["Ext.direct.ExceptionEvent"],requires:["Ext.Ajax","Ext.util.DelayedTask"],interval:3000,constructor:function(a){this.callParent(arguments);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){var b=this,a=b.url;if(a&&!b.pollTask){b.pollTask=Ext.TaskManager.start({run:function(){if(b.fireEvent("beforepoll",b)!==false){if(Ext.isFunction(a)){a(b.baseParams)}else{Ext.Ajax.request({url:a,callback:b.onData,scope:b,params:b.baseParams})}}},interval:b.interval,scope:b});b.fireEvent("connect",b)}else{if(!a){}}},disconnect:function(){var a=this;if(a.pollTask){Ext.TaskManager.stop(a.pollTask);delete a.pollTask;a.fireEvent("disconnect",a)}},onData:function(e,h,b){var g=this,d=0,a,c;if(h){c=g.createEvents(b);for(a=c.length;d<a;++d){g.fireEvent("data",g,c[d])}}else{g.fireEvent("data",g,new Ext.direct.ExceptionEvent({data:null,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:b}))}}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var e=Math,h=e.PI,d=e.pow,b=e.sin,g=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(i){return i},ease:function(l){var i=0.07813-l/2,m=-0.25,o=g(0.0066+i*i),r=o-i,k=d(a(r),1/3)*(r<0?-1:1),p=-o-i,j=d(a(p),1/3)*(p<0?-1:1),s=k+j+0.25;return d(1-s,2)*3*s*0.1+(1-s)*3*s*s+s*s*s},easeIn:function(i){return d(i,1.7)},easeOut:function(i){return d(i,0.48)},easeInOut:function(r){var l=0.48-r/1.04,k=g(0.1734+l*l),i=k-l,p=d(a(i),1/3)*(i<0?-1:1),o=-k-l,m=d(a(o),1/3)*(o<0?-1:1),j=p+m+0.5;return(1-j)*3*j*j+j*j*j},backIn:function(i){return i*i*((c+1)*i-c)},backOut:function(i){i=i-1;return i*i*((c+1)*i+c)+1},elasticIn:function(k){if(k===0||k===1){return k}var j=0.3,i=j/4;return d(2,-10*k)*b((k-i)*(2*h)/j)+1},elasticOut:function(i){return 1-Ext.fx.Easing.elasticIn(1-i)},bounceIn:function(i){return 1-Ext.fx.Easing.bounceOut(1-i)},bounceOut:function(m){var j=7.5625,k=2.75,i;if(m<(1/k)){i=j*m*m}else{if(m<(2/k)){m-=(1.5/k);i=j*m*m+0.75}else{if(m<(2.5/k)){m-=(2.25/k);i=j*m*m+0.9375}else{m-=(2.625/k);i=j*m*m+0.984375}}}return i}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(t,e,b){var r=this,m=r.target,q=t.length,v,n,a,g,d,p,l,c,s,u,k;for(g=0;g<q;g++){v=t[g].attrs;for(n in v){l=v[n].length;p={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(d=0;d<l;d++){a=v[n][d];p[r.compMethod[n]].target=a[0];p[r.compMethod[n]][n]=a[1]}if(p.setPosition.target){a=p.setPosition;c=(a.left===undefined)?undefined:parseFloat(a.left);s=(a.top===undefined)?undefined:parseFloat(a.top);a.target.setPosition(c,s)}if(p.setPagePosition.target){a=p.setPagePosition;a.target.setPagePosition(a.x,a.y)}if(p.setSize.target){a=p.setSize;u=(a.width===undefined)?a.target.getWidth():parseFloat(a.width);k=(a.height===undefined)?a.target.getHeight():parseFloat(a.height);if(b||r.dynamic){a.target.setSize(u,k)}else{a.target.el.setSize(u,k)}}if(p.setOpacity.target){a=p.setOpacity;a.target.el.setStyle("opacity",a.opacity)}}}}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(b,a,c){if(c==undefined){if(a==="x"){c=b.getX()}else{if(a==="y"){c=b.getY()}else{if(a==="scrollTop"){c=b.getScroll().top}else{if(a==="scrollLeft"){c=b.getScroll().left}else{if(a==="height"){c=b.getHeight()}else{if(a==="width"){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(l){var g=this.target,k=l.length,n,h,b,e,c,a,d,m;for(e=0;e<k;e++){n=l[e].attrs;for(h in n){if(n.hasOwnProperty(h)){a=n[h].length;for(c=0;c<a;c++){b=n[h][c];d=b[0];m=b[1];if(h==="x"){d.setX(m)}else{if(h==="y"){d.setY(m)}else{if(h==="scrollTop"){d.scrollTo("top",m)}else{if(h==="scrollLeft"){d.scrollTo("left",m)}else{if(h==="width"){d.setWidth(m)}else{if(h==="height"){d.setHeight(m)}else{d.setStyle(h,m)}}}}}}}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,"ext-composite-");this.callParent([a])},getAttr:function(a,h){var b=[],g=this.target.elements,e=g.length,c,d;for(c=0;c<e;c++){d=g[c];if(d){d=this.target.getElement(d);b.push([d,this.getElVal(d,a,h)])}}return b}});Ext.define("Ext.fx.target.ElementCSS",{extend:"Ext.fx.target.Element",setAttr:function(n,e){var q={attrs:[],duration:[],easing:[]},m=n.length,g,p,k,l,c,b,h,d,a;for(h=0;h<m;h++){p=n[h];c=p.duration;l=p.easing;p=p.attrs;for(k in p){if(Ext.Array.indexOf(q.attrs,k)==-1){q.attrs.push(k.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()}));q.duration.push(c+"ms");q.easing.push(l)}}}g=q.attrs.join(",");c=q.duration.join(",");l=q.easing.join(", ");for(h=0;h<m;h++){p=n[h].attrs;for(k in p){a=p[k].length;for(d=0;d<a;d++){b=p[k][d];b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",e?"":g);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",e?"":c);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",e?"":l);b[0].setStyle(k,b[1]);if(e){b=b[0].dom.offsetWidth}else{b[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},b[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:"Ext.fx.target.CompositeElement",requires:["Ext.fx.target.ElementCSS"],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(b,a){var c;switch(a){case"rotate":case"rotation":c=b.attr.rotation;return{x:c.x||0,y:c.y||0,degrees:c.degrees||0};case"scale":case"scaling":c=b.attr.scaling;return{x:c.x||1,y:c.y||1,cx:c.cx||0,cy:c.cy||0};case"translate":case"translation":c=b.attr.translation;return{x:c.x||0,y:c.y||0};default:return b.attr[a]}},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(m){var g=m.length,k=[],b,e,p,r,q,o,n,d,c,l,h,a;for(d=0;d<g;d++){b=m[d].attrs;for(e in b){p=b[e];a=p.length;for(c=0;c<a;c++){q=p[c][0];r=p[c][1];if(e==="translate"||e==="translation"){n={x:r.x,y:r.y}}else{if(e==="rotate"||e==="rotation"){l=r.x;if(isNaN(l)){l=null}h=r.y;if(isNaN(h)){h=null}n={degrees:r.degrees,x:l,y:h}}else{if(e==="scale"||e==="scaling"){l=r.x;if(isNaN(l)){l=null}h=r.y;if(isNaN(h)){h=null}n={x:l,y:h,cx:r.cx,cy:r.cy}}else{if(e==="width"||e==="height"||e==="x"||e==="y"){n=parseFloat(r)}else{n=r}}}}o=Ext.Array.indexOf(k,q);if(o==-1){k.push([q,{}]);o=k.length-1}k[o][1][e]=n}}}g=k.length;for(d=0;d<g;d++){k[d][0].setAttributes(k[d][1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(a,h){var b=[],g=[].concat(this.target.items),e=g.length,d,c;for(d=0;d<e;d++){c=g[d];b.push([c,h!=undefined?h:this.getFromPrim(c,a)])}return b}});Ext.define("Ext.layout.Layout",{requires:["Ext.XTemplate"],uses:["Ext.layout.Context"],isLayout:true,initialized:false,running:false,autoSizePolicy:{setsWidth:0,setsHeight:0},statics:{layoutsByType:{},create:function(g,e){var k=Ext.ClassManager,c=this.layoutsByType,d,h,b,a,i,j;if(!g||typeof g==="string"){i=g||e;b={}}else{if(g.isLayout){return g}else{b=g;i=g.type||e}}if(!(a=c[i])){d="layout."+i;h=k.getNameByAlias(d);if(!h){j=true}a=k.get(h);if(j||!a){return k.instantiateByAlias(d,b||{})}c[i]=a}return new a(b)}},constructor:function(a){var b=this;b.id=Ext.id(null,b.type+"-");Ext.apply(b,a);b.layoutCount=0},beginLayout:Ext.emptyFn,beginLayoutCycle:function(c){var b=this,a=b.context,d;if(b.lastWidthModel!=c.widthModel){if(b.lastWidthModel){d=true}b.lastWidthModel=c.widthModel}if(b.lastHeightModel!=c.heightModel){if(b.lastWidthModel){d=true}b.lastHeightModel=c.heightModel}if(d){(a=c.context).clearTriggers(b,false);a.clearTriggers(b,true);b.triggerCount=0}},finishedLayout:function(){this.ownerContext=null},redoLayout:Ext.emptyFn,undoLayout:Ext.emptyFn,getAnimatePolicy:function(){return this.animatePolicy},getItemSizePolicy:function(a){return this.autoSizePolicy},isItemBoxParent:function(a){return false},isItemLayoutRoot:function(d){var c=d.getSizeModel(),b=c.width,a=c.height;if(!d.componentLayout.lastComponentSize&&(b.calculated||a.calculated)){return false}return !b.shrinkWrap&&!a.shrinkWrap},isItemShrinkWrap:function(a){return a.shrinkWrap},isRunning:function(){return !!this.ownerContext},getItemsRenderTree:function(d,b){var h=d.length,e,g,c,a;if(h){a=[];for(e=0;e<h;++e){g=d[e];if(!g.rendered){if(b&&(b[g.id]!==undefined)){c=b[g.id]}else{this.configureItem(g);c=g.getRenderTree();if(b){b[g.id]=c}}if(c){a.push(c)}}}}return a},finishRender:Ext.emptyFn,finishRenderItems:function(e,a){var d=a.length,b,c;for(b=0;b<d;b++){c=a[b];if(c.rendering){c.finishRender(b);this.afterRenderItem(c)}}},renderChildren:function(){var b=this,a=b.getLayoutItems(),c=b.getRenderTarget();b.renderItems(a,c)},renderItems:function(a,g){var e=this,d=a.length,b=0,c;if(d){Ext.suspendLayouts();for(;b<d;b++){c=a[b];if(c&&!c.rendered){e.renderItem(c,g,b)}else{if(!e.isValidParent(c,g,b)){e.moveItem(c,g,b)}else{e.configureItem(c)}}}Ext.resumeLayouts(true)}},isValidParent:function(d,e,a){var b=d.el?d.el.dom:Ext.getDom(d),c=(e&&e.dom)||e;if(b.parentNode&&b.parentNode.className.indexOf(Ext.baseCSSPrefix+"resizable-wrap")!==-1){b=b.parentNode}if(b&&c){if(typeof a=="number"){return b===c.childNodes[a]}return b.parentNode===c}return false},configureItem:function(a){a.ownerLayout=this},renderItem:function(b,c,a){if(!b.rendered){this.configureItem(b);b.render(c,a);this.afterRenderItem(b)}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a=="number"){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b)},onContentChange:function(){this.owner.updateLayout();return true},initLayout:function(){this.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},afterRenderItem:Ext.emptyFn,onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,afterRemove:function(e){var d=this,c=e.el,b=d.owner,a;if(e.rendered){a=[].concat(d.itemCls||[]);if(b.itemCls){a=Ext.Array.push(a,b.itemCls)}if(a.length){c.removeCls(a)}}delete e.ownerLayout},destroy:function(){var a=this,b;if(a.targetCls){b=a.getTarget();if(b){b.removeCls(a.targetCls)}}a.onDestroy()},sortWeightedItems:function(a,d){for(var b=0,c=a.length;b<c;++b){a[b].$i=b}Ext.Array.sort(a,function(g,e){var h=e.weight-g.weight;if(!h){h=g.$i-e.$i;if(g[d]){h=-h}}return h});for(b=0;b<c;++b){delete a[b].$i}}},function(){var c=this,b={};c.prototype.sizeModels=c.sizeModels=b;var a=function(g){var h=this,e=g.name;Ext.apply(Ext.apply(h,d),g);h[e]=true;a[e]=b[e]=h;h.fixed=!(h.auto=h.natural||h.shrinkWrap)};Ext.layout.SizeModel=a;var d={calculated:false,configured:false,constrainedMax:false,constrainedMin:false,natural:false,shrinkWrap:false,calculatedFromConfigured:false,calculatedFromNatural:false,calculatedFromShrinkWrap:false,names:null};new a({name:"calculated"});new a({name:"configured",names:{width:"width",height:"height"}});new a({name:"natural"});new a({name:"shrinkWrap"});new a({name:"calculatedFromConfigured",configured:true,names:{width:"width",height:"height"}});new a({name:"calculatedFromNatural",natural:true});new a({name:"calculatedFromShrinkWrap",shrinkWrap:true});new a({name:"constrainedMax",configured:true,constrained:true,names:{width:"maxWidth",height:"maxHeight"}});new a({name:"constrainedMin",configured:true,constrained:true,names:{width:"minWidth",height:"minHeight"}})});Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",isComponentLayout:true,nullBox:{},usesContentHeight:true,usesContentWidth:true,usesHeight:true,usesWidth:true,beginLayoutCycle:function(c,p){var k=this,b=k.owner,e=c.ownerCtContext,g=c.heightModel,h=c.widthModel,i=b.el.dom===document.body,d=b.lastBox||k.nullBox,n=b.el.lastBox||k.nullBox,a=!i,m,o,l,j;k.callParent(arguments);if(p){if(k.usesContentWidth){++c.consumersContentWidth}if(k.usesContentHeight){++c.consumersContentHeight}if(k.usesWidth){++c.consumersWidth}if(k.usesHeight){++c.consumersHeight}if(e&&!e.hasRawContent){m=b.ownerLayout;if(m.usesWidth){++c.consumersWidth}if(m.usesHeight){++c.consumersHeight}}}if(h.configured){l=h.names.width;if(!i){a=p?b[l]!==n.width:h.constrained}c.setWidth(b[l],a)}else{if(c.isTopLevel){if(h.calculated){o=d.width;c.setWidth(o,o!=n.width)}o=d.x;c.setProp("x",o,o!=n.x)}}if(g.configured){j=g.names.height;if(!i){a=p?b[j]!==n.height:g.constrained}c.setHeight(b[j],a)}else{if(c.isTopLevel){if(g.calculated){o=d.height;c.setHeight(o,o!=n.height)}o=d.y;c.setProp("y",o,o!=n.y)}}},finishedLayout:function(b){var h=this,l=b.children,a=h.owner,e,c,k,d,g,j;if(l){e=l.length;for(c=0;c<e;c++){k=l[c];k.el.lastBox=k.props}}b.previousSize=h.lastComponentSize;h.lastComponentSize=a.el.lastBox=g=b.props;a.lastBox=d={};j=g.x;if(j!==undefined){d.x=j}j=g.y;if(j!==undefined){d.y=j}j=g.width;if(j!==undefined){d.width=j}j=g.height;if(j!==undefined){d.height=j}h.callParent(arguments)},notifyOwner:function(d){var c=this,a=c.lastComponentSize,e=d.previousSize,b=[a.width,a.height];if(e){b.push(e.width,e.height)}c.owner.afterComponentLayout.apply(c.owner,b)},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},cacheTargetInfo:function(b){var a=this,d=a.targetInfo,c;if(!d){c=b.getEl("getTarget",a);a.targetInfo=d={padding:c.getPaddingInfo(),border:c.getBorderInfo()}}return d},measureAutoDimensions:function(m,i){var r=this,a=r.owner,d=m.heightModel,h=m.widthModel,c=m.boxParent,n=m.isBoxParent,b=m.props,j,s={gotWidth:false,gotHeight:false,isContainer:(j=!m.hasRawContent)},q=i||3,p,e,k=0,g=0,l,o;if(h.shrinkWrap&&m.consumersContentWidth){++k;p=!(q&1);if(j){if(p){s.contentWidth=0;s.gotWidth=true;++g}else{if((s.contentWidth=m.getProp("contentWidth"))!==undefined){s.gotWidth=true;++g}}}else{o=b.contentWidth;if(typeof o=="number"){s.contentWidth=o;s.gotWidth=true;++g}else{if(p){l=true}else{if(!m.hasDomProp("containerChildrenDone")){l=false}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}if(l){if(!isNaN(s.contentWidth=p?0:r.measureContentWidth(m))){m.setContentWidth(s.contentWidth,true);s.gotWidth=true;++g}}}}}else{if(h.natural&&m.consumersWidth){++k;o=b.width;if(typeof o=="number"){s.width=o;s.gotWidth=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(s.width=r.measureOwnerWidth(m))){m.setWidth(s.width,false);s.gotWidth=true;++g}}}}}if(d.shrinkWrap&&m.consumersContentHeight){++k;e=!(q&2);if(j){if(e){s.contentHeight=0;s.gotHeight=true;++g}else{if((s.contentHeight=m.getProp("contentHeight"))!==undefined){s.gotHeight=true;++g}}}else{o=b.contentHeight;if(typeof o=="number"){s.contentHeight=o;s.gotHeight=true;++g}else{if(e){l=true}else{if(!m.hasDomProp("containerChildrenDone")){l=false}else{if(a.noWrap){l=true}else{if(!h.shrinkWrap){l=(m.bodyContext||m).hasDomProp("width")}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}}}if(l){if(!isNaN(s.contentHeight=e?0:r.measureContentHeight(m))){m.setContentHeight(s.contentHeight,true);s.gotHeight=true;++g}}}}}else{if(d.natural&&m.consumersHeight){++k;o=b.height;if(typeof o=="number"){s.height=o;s.gotHeight=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(s.height=r.measureOwnerHeight(m))){m.setHeight(s.height,false);s.gotHeight=true;++g}}}}}if(c){m.onBoxMeasured()}s.gotAll=g==k;return s},measureContentWidth:function(a){return a.el.getWidth()-a.getFrameInfo().width},measureContentHeight:function(a){return a.el.getHeight()-a.getFrameInfo().height},measureOwnerHeight:function(a){return a.el.getHeight()},measureOwnerWidth:function(a){return a.el.getWidth()}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",setHeightInDom:false,setWidthInDom:false,waitForOuterHeightInDom:false,waitForOuterWidthInDom:false,beginLayoutCycle:function(d,b){var c=this,g=c.lastWidthModel,e=c.lastHeightModel,a=c.owner;c.callParent(arguments);if(g&&g.fixed&&d.widthModel.shrinkWrap){a.el.setWidth(null)}if(e&&e.fixed&&d.heightModel.shrinkWrap){a.el.setHeight(null)}},calculate:function(h){var g=this,e=g.measureAutoDimensions(h),b=h.heightModel,c=h.widthModel,d,a;if(e.gotWidth){if(c.shrinkWrap){g.publishOwnerWidth(h,e.contentWidth)}else{if(g.publishInnerWidth){g.publishInnerWidth(h,e.width)}}}else{if(!c.auto&&g.publishInnerWidth){d=g.waitForOuterWidthInDom?h.getDomProp("width"):h.getProp("width");if(d===undefined){g.done=false}else{g.publishInnerWidth(h,d)}}}if(e.gotHeight){if(b.shrinkWrap){g.publishOwnerHeight(h,e.contentHeight)}else{if(g.publishInnerHeight){g.publishInnerHeight(h,e.height)}}}else{if(!b.auto&&g.publishInnerHeight){a=g.waitForOuterHeightInDom?h.getDomProp("height"):h.getProp("height");if(a===undefined){g.done=false}else{g.publishInnerHeight(h,a)}}}if(!e.gotAll){g.done=false}},calculateOwnerHeightFromContentHeight:function(b,a){return a+b.getFrameInfo().height},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getFrameInfo().width},onConstrainSize:function(d,c){var a=c.heightModel,b=c.widthModel;if(a){d.heightModel=a}if(b){d.widthModel=b}},publishOwnerHeight:function(i,g){var e=this,b=e.owner,a=e.calculateOwnerHeightFromContentHeight(i,g),c,h,d;if(isNaN(a)){e.done=false}else{h=Ext.Number.constrain(a,b.minHeight,b.maxHeight);if(h==a){d=e.setHeightInDom}else{c=e.sizeModels[(h<a)?"constrainedMax":"constrainedMin"];a=h;if(i.heightModel.calculatedFromShrinkWrap){i.heightModel=c}else{i.invalidate({before:e.onConstrainSize,heightModel:c})}}i.setHeight(a,d)}},publishOwnerWidth:function(h,b){var g=this,a=g.owner,e=g.calculateOwnerWidthFromContentWidth(h,b),c,i,d;if(isNaN(e)){g.done=false}else{i=Ext.Number.constrain(e,a.minWidth,a.maxWidth);if(i==e){d=g.setWidthInDom}else{c=g.sizeModels[(i<e)?"constrainedMax":"constrainedMin"];e=i;if(h.widthModel.calculatedFromShrinkWrap){h.widthModel=c}else{h.invalidate({before:g.onConstrainSize,widthModel:c})}}h.setWidth(e,d)}}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",measureContentWidth:function(c){var d=c.target,a=d.surface,b=c.getPaddingInfo(),e=c.surfaceBBox||(c.surfaceBBox=a.items.getBBox());if(!d.viewBox){if(d.autoSize){return e.width+b.width}else{return e.x+e.width+b.width}}else{if(c.heightModel.shrinkWrap){return b.width}else{return e.width/e.height*(c.getProp("contentHeight")-b.height)+b.width}}},measureContentHeight:function(c){var d=c.target,a=d.surface,b=c.getPaddingInfo(),e=c.surfaceBBox||(c.surfaceBBox=a.items.getBBox());if(!c.target.viewBox){if(d.autoSize){return e.height+b.height}else{return e.y+e.height+b.height}}else{if(c.widthModel.shrinkWrap){return b.height}else{return e.height/e.width*(c.getProp("contentWidth")-b.width)+b.height}}},publishInnerWidth:function(b,a){b.setContentWidth(a-b.getFrameInfo().width,true)},publishInnerHeight:function(b,a){b.setContentHeight(a-b.getFrameInfo().height,true)},finishedLayout:function(c){var b=c.props,a=c.getPaddingInfo();this.owner.setSurfaceSize(b.contentWidth-a.width,b.contentHeight-a.height);this.callParent(arguments)}});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var c=this,k=/^(a|n|d|b|s|o|e)\:(.*)$/,b=k.exec(unescape(g)),h,d,a,j,e,i;if(!b||!b[1]){return}d=b[1];g=b[2];switch(d){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":h=[];if(g!=""){j=g.split("^");e=j.length;for(i=0;i<e;i++){g=j[i];h.push(c.decodeValue(g))}}return h;case"o":h={};if(g!=""){j=g.split("^");e=j.length;for(i=0;i<e;i++){g=j[i];a=g.split("=");h[a[0]]=c.decodeValue(a[1])}}return h;default:return g}},encodeValue:function(e){var g="",d=0,b,a,c;if(e==null){return"e:1"}else{if(typeof e=="number"){b="n:"+e}else{if(typeof e=="boolean"){b="b:"+(e?"1":"0")}else{if(Ext.isDate(e)){b="d:"+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d<a;d++){g+=this.encodeValue(e[d]);if(d!=a-1){g+="^"}}b="a:"+g}else{if(typeof e=="object"){for(c in e){if(typeof e[c]!="function"&&e[c]!==undefined){g+=c+"="+this.encodeValue(e[c])+"^"}}b="o:"+g.substring(0,g.length-1)}else{b="s:"+e}}}}}}return escape(b)}});Ext.define("Ext.state.CookieProvider",{extend:"Ext.state.Provider",constructor:function(a){var b=this;b.path="/";b.expires=new Date(new Date().getTime()+(1000*60*60*24*7));b.domain=null;b.secure=false;b.callParent(arguments);b.state=b.readCookies()},set:function(a,c){var b=this;if(typeof c=="undefined"||c===null){b.clear(a);return}b.setCookie(a,c);b.callParent(arguments)},clear:function(a){this.clearCookie(a);this.callParent(arguments)},readCookies:function(){var e={},j=document.cookie+";",d=/\s?(.*?)=(.*?);/g,i=this.prefix,a=i.length,h,b,g;while((h=d.exec(j))!=null){b=h[1];g=h[2];if(b&&b.substring(0,a)==i){e[b.substr(a)]=this.decodeValue(g)}}return e},setCookie:function(a,c){var b=this;document.cookie=b.prefix+a+"="+b.encodeValue(c)+((b.expires==null)?"":("; expires="+b.expires.toGMTString()))+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")},clearCookie:function(a){var b=this;document.cookie=b.prefix+a+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")}});Ext.define("Ext.state.LocalStorageProvider",{extend:"Ext.state.Provider",alias:"state.localstorage",constructor:function(){var a=this;a.callParent(arguments);a.store=a.getStorageObject();a.state=a.readLocalStorage()},readLocalStorage:function(){var c=this.store,e=0,a=c.length,h=this.prefix,b=h.length,g={},d;for(;e<a;++e){d=c.key(e);if(d.substring(0,b)==h){g[d.substr(b)]=this.decodeValue(c.getItem(d))}}return g},set:function(a,c){var b=this;b.clear(a);if(typeof c=="undefined"||c===null){return}b.store.setItem(b.prefix+a,b.encodeValue(c));b.callParent(arguments)},clear:function(a){this.store.removeItem(this.prefix+a);this.callParent(arguments)},getStorageObject:function(){try{var a="localStorage" in window&&window.localStorage!==null;if(a){return window.localStorage}}catch(b){return false}}});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=new Ext.state.Provider()},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:false,saveDelay:100,constructor:function(a){var b=this;a=a||{};if(a.stateful!==undefined){b.stateful=a.stateful}if(a.saveDelay!==undefined){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.addStateEvents(b.stateEvents);b.initState()}},addStateEvents:function(c){var e=this,b,d,a;if(e.stateful&&e.getStateId()){if(typeof c=="string"){c=Array.prototype.slice.call(arguments,0)}a=e.stateEventsByName||(e.stateEventsByName={});for(b=c.length;b--;){d=c[b];if(!a[d]){a[d]=1;e.on(d,e.onStateChange,e)}}}},onStateChange:function(){var c=this,a=c.saveDelay,d,b;if(!c.stateful){return}if(a){if(!c.stateTask){d=Ext.state.Stateful;b=d.runner||(d.runner=new Ext.util.TaskRunner());c.stateTask=b.newTask({run:c.saveState,scope:c,interval:a,repeat:1})}c.stateTask.start()}else{c.saveState()}},saveState:function(){var b=this,d=b.stateful&&b.getStateId(),a=b.hasListeners,c;if(d){c=b.getState()||{};if(!a.beforestatesave||b.fireEvent("beforestatesave",b,c)!==false){Ext.state.Manager.set(d,c);if(a.statesave){b.fireEvent("statesave",b,c)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this;return a.stateId||(a.autoGenId?null:a.id)},initState:function(){var b=this,d=b.stateful&&b.getStateId(),a=b.hasListeners,c;if(d){c=Ext.state.Manager.get(d);if(c){c=Ext.apply({},c);if(!a.beforestaterestore||b.fireEvent("beforestaterestore",b,c)!==false){b.applyState(c);if(a.staterestore){b.fireEvent("staterestore",b,c)}}}}},savePropToState:function(g,e,d){var b=this,c=b[g],a=b.initialConfig;if(b.hasOwnProperty(g)){if(!a||a[g]!==c){if(e){e[d||g]=c}return true}}return false},savePropsToState:function(e,c){var b=this,a,d;if(typeof e=="string"){b.savePropToState(e,c)}else{for(a=0,d=e.length;a<d;++a){b.savePropToState(e[a],c)}}return c},destroy:function(){var b=this,a=b.stateTask;if(a){a.destroy();b.stateTask=null}b.clearListeners()}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},isMixedCollection:true,generation:0,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,g=e,c=b,a;if(arguments.length==1){g=c;c=d.getKey(g)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,g)}d.map[c]=g}d.generation++;d.length++;d.items.push(g);d.keys.push(c);if(d.hasListeners.add){d.fireEvent("add",d.length-1,g,c)}return g},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)}d.generation++;b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;if(d.hasListeners.replace){d.fireEvent("replace",c,a,e)}return e},addAll:function(g){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(g)){b=arguments.length>1?arguments:g;for(a=b.length;d<a;d++){e.add(b[d])}}else{for(c in g){if(g.hasOwnProperty(c)){if(e.allowFunctions||typeof g[c]!="function"){e.add(c,g[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,g;for(;c<a;c++){g=b[c];if(e.call(d||g,g,c,a)===false){break}}},eachKey:function(e,d){var g=this.keys,b=this.items,c=0,a=g.length;for(;c<a;c++){e.call(d||window,g[c],b[c],c,a)}},findBy:function(e,d){var g=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],g[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(a,b,e){var d=this,c=b,g=e;if(arguments.length==2){g=c;c=d.getKey(g)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a>=d.length){return d.add(c,g)}d.generation++;d.length++;Ext.Array.splice(d.items,a,0,g);if(typeof c!="undefined"&&c!==null){d.map[c]=g}Ext.Array.splice(d.keys,a,0,c);if(d.hasListeners.add){d.fireEvent("add",a,g,c)}return g},remove:function(a){this.generation++;return this.removeAt(this.indexOf(a))},removeAll:function(b){b=[].concat(b);var c,a=b.length;for(c=0;c<a;c++){this.remove(b[c])}return this},removeAt:function(a){var c=this,d,b;if(a<c.length&&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);if(c.hasListeners.remove){c.fireEvent("remove",d,b)}c.generation++;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 typeof this.map[this.getKey(a)]!="undefined"},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.generation++;if(a.hasListeners.clear){a.fireEvent("clear")}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d<a;d++){j=l[d];g=String(j);if((h||!Ext.isEmpty(j))&&!b[g]){b[g]=true;c.push(j)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(g,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}g=g||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(g<=a){for(d=g;d<=a;d++){b[b.length]=c[d]}}else{for(d=g;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,g,a){var b=[],e;if(Ext.isString(d)){b.push(new Ext.util.Filter({property:d,value:c,anyMatch:g,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(h){var n=true,o=b.length,j,m,l,k;for(j=0;j<o;j++){m=b[j];l=m.filterFn;k=m.scope;n=n&&l.call(k,h)}return n};return this.filterBy(e)},filterBy:function(e,d){var j=this,a=new this.self(),h=j.keys,b=j.items,g=b.length,c;a.getKey=j.getKey;for(c=0;c<g;c++){if(e.call(d||j,b[c],h[c])){a.add(h[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(e,d,j){var h=this,g=h.keys,b=h.items,c=j||0,a=b.length;for(;c<a;c++){if(e.call(d||h,b[c],g[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=this,g=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c<a;c++){g.add(d[c],b[c])}g.getKey=e.getKey;return g}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",getGroupString:function(a){return a.get(this.property)}});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.addEvents("add","clear","remove","replace");c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,c){var b=this;if(c===undefined){c=a;a=b.getKey(c)}if(b.containsKey(a)){return b.replace(a,c)}b.map[a]=c;++b.length;if(b.hasListeners.add){b.fireEvent("add",b,a,c)}return c},replace:function(b,d){var c=this,e=c.map,a;if(d===undefined){d=b;b=c.getKey(d)}if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;if(c.hasListeners.replace){c.fireEvent("replace",c,b,d,a)}return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;if(b.hasListeners.remove){b.fireEvent("remove",b,a,c)}return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true&&b.hasListeners.clear){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=new Ext.util.HashMap();this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(e,c,b){var a=this.all,d;if(a.containsKey(e)){d=a.get(e);c.call(b||d,d)}else{a.on("add",function(i,g,h){if(g==e){c.call(b||h,h);a.un("add",c,b)}})}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(a,b){if(typeof a=="string"){return Ext.widget(a)}if(a.isComponent){return a}return Ext.widget(a.xtype||b,a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager","Ext.util.ProtoElement"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",elementCt:"Ext.util.ElementContainer",renderable:"Ext.util.Renderable",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Context","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000,pendingLayouts:null,layoutSuspendCount:0,cancelLayout:function(a){var b=this.runningLayoutContext||this.pendingLayouts;if(b){b.cancelComponent(a)}},flushLayouts:function(){var b=this,a=b.pendingLayouts;if(a&&a.invalidQueue.length){b.pendingLayouts=null;b.runningLayoutContext=a;Ext.override(a,{runComplete:function(){b.runningLayoutContext=null;return this.callParent()}});a.run()}},resumeLayouts:function(a){if(this.layoutSuspendCount&&!--this.layoutSuspendCount){if(a){this.flushLayouts()}}},suspendLayouts:function(){++this.layoutSuspendCount},updateLayout:function(b,e){var c=this,a=c.runningLayoutContext,d;if(a){a.queueInvalidate(b)}else{d=c.pendingLayouts||(c.pendingLayouts=new Ext.layout.Context());d.queueInvalidate(b);if(!e&&!c.layoutSuspendCount&&!b.isLayoutSuspended()){c.flushLayouts()}}}},isComponent:true,getAutoId:function(){this.autoGenId=true;return ++Ext.AbstractComponent.AUTO_ID},deferLayouts:false,autoGenId:false,renderTpl:"{%this.renderContent(out,values)%}",frameSize:{left:0,top:0,right:0,bottom:0,width:0,height:0},tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,shrinkWrap:2,weight:0,maskOnDisable:true,_isLayoutRoot:false,constructor:function(c){var e=this,d,a,b;if(c){Ext.apply(e,c);b=e.xhooks;if(b){delete e.xhooks;Ext.override(e,b)}}else{c={}}e.initialConfig=c;e.mixins.elementCt.constructor.call(e);e.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","boxready","beforedestroy","destroy","resize","move","focus","blur");e.getId();e.setupProtoEl();if(e.cls){e.initialCls=e.cls;e.protoEl.addCls(e.cls)}if(e.style){e.initialStyle=e.style;e.protoEl.setStyle(e.style)}e.mons=[];e.renderData=e.renderData||{};e.renderSelectors=e.renderSelectors||{};if(e.plugins){e.plugins=[].concat(e.plugins);e.constructPlugins()}if(!e.hasListeners){e.hasListeners=new e.HasListeners()}e.initComponent();Ext.ComponentManager.register(e);e.mixins.observable.constructor.call(e);e.mixins.state.constructor.call(e,c);this.addStateEvents("resize");if(e.plugins){e.plugins=[].concat(e.plugins);for(d=0,a=e.plugins.length;d<a;d++){e.plugins[d]=e.initPlugin(e.plugins[d])}}e.loader=e.getLoader();if(e.renderTo){e.render(e.renderTo)}if(e.autoShow){e.show()}},initComponent:function(){this.constructPlugins();this.setSize(this.width,this.height)},getState:function(){var b=this,c=null,a=b.getSizeModel();if(a.width.configured){c=b.addPropertyToState(c,"width")}if(a.height.configured){c=b.addPropertyToState(c,"height")}return c},addPropertyToState:function(e,d,c){var b=this,a=arguments.length;if(a==3||b.hasOwnProperty(d)){if(a<3){c=b[d]}if(c!==b.initialConfig[d]){(e||(e={}))[d]=c}}return e},show:Ext.emptyFn,animate:function(b){var k=this,e,g,d,p,o,m,l,j,n,i,c,a;b=b||{};o=b.to||{};if(Ext.fx.Manager.hasFxBlock(k.id)){return k}e=Ext.isDefined(o.width);if(e){p=Ext.Number.constrain(o.width,k.minWidth,k.maxWidth)}g=Ext.isDefined(o.height);if(g){d=Ext.Number.constrain(o.height,k.minHeight,k.maxHeight)}if(!b.dynamic&&(e||g)){j=(b.from?b.from.width:undefined)||k.getWidth();n=j;i=(b.from?b.from.height:undefined)||k.getHeight();c=i;a=false;if(g&&d>i){c=d;a=true}if(e&&p>j){n=p;a=true}if(a){m=!Ext.isNumber(k.width);l=!Ext.isNumber(k.height);k.setSize(n,c);k.el.setSize(j,i);if(m){delete k.width}if(l){delete k.height}}if(e){o.width=p}if(g){o.height=d}}return k.mixins.animate.animate.apply(k,arguments)},onHide:function(){this.updateLayout({isRoot:false})},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var d=this,b=d.plugins,c,a;if(b){for(c=0,a=b.length;c<a;c++){b[c]=d.constructPlugin(b[c])}}},initPlugin:function(a){a.init(this);return a},updateAria:Ext.emptyFn,registerFloatingItem:function(b){var a=this;if(!a.floatingItems){a.floatingItems=new Ext.ZIndexManager(a)}a.floatingItems.register(b)},unregisterFloatingItem:function(b){var a=this;if(a.floatingItems){a.floatingItems.unregister(b)}},layoutSuspendCount:0,suspendLayouts:function(){var a=this;if(!a.rendered){return}if(++a.layoutSuspendCount==1){a.suspendLayout=true}},resumeLayouts:function(b){var a=this;if(!a.rendered){return}if(!--a.layoutSuspendCount){a.suspendLayout=false;if(b&&!a.isLayoutSuspended()){a.updateLayout(b)}}},setupProtoEl:function(){var b=this,a=[b.baseCls,b.getComponentLayout().targetCls];if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}b.protoEl=new Ext.util.ProtoElement({cls:a.join(" ")})},setUI:function(g){var e=this,b=Ext.Array.clone(e.uiCls),h=[],d=[],a,c;for(c=0;c<b.length;c++){a=b[c];d=d.concat(e.removeClsWithUI(a,true));h.push(a)}if(d.length){e.removeCls(d)}e.removeUIFromElement();e.ui=g;e.addUIToElement();d=[];for(c=0;c<h.length;c++){a=h[c];d=d.concat(e.addClsWithUI(a,true))}if(d.length){e.addCls(d)}if(e.rendered){e.updateLayout()}},addClsWithUI:function(c,h){var g=this,e=[],d,b=0,a;if(typeof c==="string"){c=(c.indexOf(" ")<0)?[c]:Ext.String.splitWords(c)}d=c.length;g.uiCls=Ext.Array.clone(g.uiCls);for(;b<d;b++){a=c[b];if(a&&!g.hasUICls(a)){g.uiCls.push(a);e=e.concat(g.addUIClsToElement(a))}}if(h!==true){g.addCls(e)}return e},removeClsWithUI:function(c,h){var g=this,e=[],b=0,d,a;if(typeof c==="string"){c=(c.indexOf(" ")<0)?[c]:Ext.String.splitWords(c)}d=c.length;for(b=0;b<d;b++){a=c[b];if(a&&g.hasUICls(a)){g.uiCls=Ext.Array.remove(g.uiCls,a);e=e.concat(g.removeUIClsFromElement(a))}}if(h!==true){g.removeCls(e)}return e},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},frameElementsArray:["tl","tc","tr","ml","mc","mr","bl","bc","br"],addUIClsToElement:function(m){var k=this,b=k.baseCls+"-"+k.ui+"-"+m,n=[Ext.baseCSSPrefix+m,k.baseCls+"-"+m,b],l=k.frameElementCls,h,g,e,a,d,j;if(k.frame&&!Ext.supports.CSS3BorderRadius){h=k.frameElementsArray;g=h.length;e=0;for(;e<g;e++){d=h[e];a=k["frame"+d.toUpperCase()];j=b+"-"+d;if(a&&a.dom){a.addCls(j)}else{if(Ext.Array.indexOf(l[d],j)==-1){l[d].push(j)}}}}k.frameElementCls=l;return n},removeUIClsFromElement:function(m){var k=this,b=k.baseCls+"-"+k.ui+"-"+m,n=[Ext.baseCSSPrefix+m,k.baseCls+"-"+m,b],l=k.frameElementCls,h,g,e,a,d,j;if(k.frame&&!Ext.supports.CSS3BorderRadius){h=k.frameElementsArray;g=h.length;e=0;for(;e<g;e++){d=h[e];a=k["frame"+d.toUpperCase()];j=b+"-"+d;if(a&&a.dom){a.addCls(j)}else{Ext.Array.remove(l[d],j)}}}k.frameElementCls=l;return n},addUIToElement:function(){var j=this,k=j.baseCls+"-"+j.ui,l=j.frameElementCls,g,e,d,a,b,h;j.addCls(k);if(j.frame&&!Ext.supports.CSS3BorderRadius){g=j.frameElementsArray;e=g.length;d=0;for(;d<e;d++){b=g[d];a=j["frame"+b.toUpperCase()];h=k+"-"+b;if(a){a.addCls(h)}else{if(!Ext.Array.contains(l[b],h)){l[b].push(h)}}}}},removeUIFromElement:function(){var j=this,k=j.baseCls+"-"+j.ui,l=j.frameElementCls,g,e,d,a,b,h;j.removeCls(k);if(j.frame&&!Ext.supports.CSS3BorderRadius){g=j.frameElementsArray;e=g.length;d=0;for(;d<e;d++){b=g[d];a=j["frame"+b.toUpperCase()];h=k+"-"+b;if(a){a.removeCls(h)}else{Ext.Array.remove(l[b],h)}}}},getTpl:function(a){return Ext.XTemplate.getTpl(this,a)},initStyles:function(j){var d=this,b=Ext.Element,g=d.padding,c=d.margin,h=d.x,e=d.y,a,i;if(g!==undefined){j.setStyle("padding",b.unitizeBox((g===true)?5:g))}if(c!==undefined){j.setStyle("margin",b.unitizeBox((c===true)?5:c))}if(d.border!==undefined){d.setBorder(d.border,j)}if(d.cls&&d.cls!=d.initialCls){j.addCls(d.cls);delete d.cls;delete d.initialCls}if(d.style&&d.style!=d.initialStyle){j.setStyle(d.style);delete d.style;delete d.initialStyle}if(h!==undefined){j.setStyle("left",h+"px")}if(e!==undefined){j.setStyle("top",e+"px")}if(!d.getFrameInfo()&&Ext.isBorderBox){a=d.width;i=d.height;if(a!==undefined){j.setStyle("width",(typeof a==="number")?a+"px":a)}if(i!==undefined){j.setStyle("height",(typeof i==="number")?i+"px":i)}}},initEvents:function(){var c=this,e=c.afterRenderEvents,b,d,a=function(g){c.mon(b,g)};if(e){for(d in e){if(e.hasOwnProperty(d)){b=c[d];if(b&&b.on){Ext.each(e[d],a)}}}}c.addFocusListener()},addFocusListener:function(){var c=this,b=c.getFocusEl(),a;if(b){if(b.isComponent){return b.addFocusListener()}a=b.needsTabIndex();if(!c.focusListenerAdded&&(!a||Ext.FocusManager.enabled)){if(a){b.dom.tabIndex=-1}b.on({focus:c.onFocus,blur:c.onBlur,scope:c});c.focusListenerAdded=true}}},getFocusEl:Ext.emptyFn,isFocusable:function(d){var b=this,a;if((b.focusable!==false)&&(a=b.getFocusEl())&&b.rendered&&!b.destroying&&!b.isDestroyed&&!b.disabled&&b.isVisible(true)){if(a.isComponent){return a.isFocusable()}return a&&a.dom&&a.isVisible()}},preFocus:Ext.emptyFn,onFocus:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(!c.disabled){c.preFocus(d);if(b&&a){a.addCls(c.addClsWithUI(b,true))}if(!c.hasFocus){c.hasFocus=true;c.fireEvent("focus",c,d)}}},beforeBlur:Ext.emptyFn,onBlur:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(c.destroying){return}c.beforeBlur(d);if(b&&a){a.removeCls(c.removeClsWithUI(b,true))}if(c.validateOnBlur){c.validate()}c.hasFocus=false;c.fireEvent("blur",c,d);c.postBlur(d)},postBlur:Ext.emptyFn,is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.getBubbleTarget();if(b){for(;a;a=a.getBubbleTarget()){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},nextSibling:function(b){var g=this.ownerCt,d,e,a,h;if(g){d=g.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a<e;a++){if((h=d.getAt(a)).is(b)){return h}}}else{if(a<d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,g;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a>=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(b,d){var h=this,a,g,e,c;if(d&&h.is(b)){return h}if(h.ownerCt){for(g=h.ownerCt.items.items,e=Ext.Array.indexOf(g,h)-1;e>-1;e--){c=g[e];if(c.query){a=c.query(b);a=a[a.length-1];if(a){return a}if(c.is(b)){return c}}}return h.ownerCt.previousNode(b,true)}},nextNode:function(c,e){var j=this,b,h,a,g,d;if(e&&j.is(c)){return j}if(j.ownerCt){for(h=j.ownerCt.items,g=h.indexOf(j)+1,h=h.items,a=h.length;g<a;g++){d=h[g];if(d.is(c)){return d}if(d.down){b=d.down(c);if(b){return b}}}return j.ownerCt.nextNode(c)}},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},getOverflowStyle:function(){var b=this,a=null;if(typeof b.autoScroll=="boolean"){a={overflow:b.autoScroll?"auto":""}}else{if(b.overflowX!==undefined||b.overflowY!==undefined){a={"overflow-x":(b.overflowX||""),"overflow-y":(b.overflowY||"")}}}if(a&&(Ext.isIE6||Ext.isIE7)){a.position="relative"}return a},isXType:function(b,a){if(a){return this.xtype===b}else{return this.xtypesMap[b]}},getXTypes:function(){var c=this.self,d,b,a;if(!c.xtypes){d=[];b=this;while(b){a=b.xtypes;if(a!==undefined){d.unshift.apply(d,a)}b=b.superclass}c.xtypeChain=d;c.xtypes=d.join("/")}return c.xtypes},update:function(b,c,a){var d=this;if(d.tpl&&!Ext.isString(b)){d.data=b;if(d.rendered){d.tpl[d.tplWriteMode](d.getTargetEl(),b||{})}}else{d.html=Ext.isObject(b)?Ext.DomHelper.markup(b):b;if(d.rendered){d.getTargetEl().update(d.html,c,a)}}if(d.rendered){d.updateLayout()}},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(a){var c=this,e=c,d=c.rendered&&!c.hidden,b=c.ownerCt;c.hiddenAncestor=false;if(c.destroyed){return false}if(a&&d&&b){while(b){if(b.hidden||(b.collapsed&&!(b.getDockedItems&&Ext.Array.contains(b.getDockedItems(),e)))){c.hiddenAncestor=b;d=false;break}e=b;b=b.ownerCt}}return d},onBoxReady:function(){var a=this;if(a.disableOnBoxReady){a.onDisable()}else{if(a.enableOnBoxReady){a.onEnable()}}if(a.resizable){a.initResizable(a.resizable)}if(a.draggable){a.initDraggable()}},enable:function(a){var b=this;delete b.disableOnBoxReady;b.removeCls(b.disabledCls);if(b.rendered){b.onEnable()}else{b.enableOnBoxReady=true}b.disabled=false;delete b.resetDisable;if(a!==true){b.fireEvent("enable",b)}return b},disable:function(a){var b=this;delete b.enableOnBoxReady;b.addCls(b.disabledCls);if(b.rendered){b.onDisable()}else{b.disableOnBoxReady=true}b.disabled=true;if(a!==true){delete b.resetDisable;b.fireEvent("disable",b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.dom.disabled=false;this.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.dom.disabled=true;this.mask()}},mask:function(){var b=this.lastBox,c=this.getMaskTarget(),a=[];if(b){a[2]=b.height}c.mask.apply(c,a)},unmask:function(){this.getMaskTarget().unmask()},getMaskTarget:function(){return this.el},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.addCls.apply(b,arguments);return c},addClass:function(){return this.addCls.apply(this,arguments)},hasCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;return b.hasCls.apply(b,arguments)},removeCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.removeCls.apply(b,arguments);return c},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,g,e,a){var h=this,d,c;if(Ext.isString(b)&&(Ext.isObject(g)||a&&a.element)){if(a.element){d=g;g={};g[b]=d;b=a.element;if(e){g.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(h.eventOptionsRe.test(c)){g[c]=a[c]}}}}if(h[b]&&h[b].on){h.mon(h[b],g)}else{h.afterRenderEvents=h.afterRenderEvents||{};if(!h.afterRenderEvents[b]){h.afterRenderEvents[b]=[]}h.afterRenderEvents[b].push(g)}}return h.mixins.observable.addListener.apply(h,arguments)},removeManagedListenerItem:function(b,a,i,d,g,e){var h=this,c=a.options?a.options.element:null;if(c){c=h[c];if(c&&c.un){if(b||(a.item===i&&a.ename===d&&(!g||a.fn===g)&&(!e||a.scope===e))){c.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(h.managedListeners,a)}}}}else{return h.mixins.observable.removeManagedListenerItem.apply(h,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,c){var b=this;b.ownerCt=a;if(b.hasListeners.added){b.fireEvent("added",b,a,c)}},onRemoved:function(b){var a=this;if(a.hasListeners.removed){a.fireEvent("removed",a,a.ownerCt)}delete a.ownerCt;delete a.ownerLayout},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(b,a){var c=this;if(b&&typeof b=="object"){a=b.height;b=b.width}if(typeof b=="number"){c.width=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}else{if(b===null){delete c.width}}if(typeof a=="number"){c.height=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}else{if(a===null){delete c.height}}if(c.rendered&&c.isVisible()){c.updateLayout({isRoot:false})}return c},isLayoutRoot:function(){var a=this,b=a.ownerLayout;if(!b||a._isLayoutRoot||a.floating){return true}return b.isItemLayoutRoot(a)},isLayoutSuspended:function(){var a=this,b;while(a){if(a.layoutSuspendCount||a.suspendLayout){return true}b=a.ownerLayout;if(!b){break}a=b.owner}return false},updateLayout:function(b){var c=this,d,a=b&&b.isRoot;if(!c.rendered||c.layoutSuspendCount||c.suspendLayout){return}if(c.hidden){Ext.AbstractComponent.cancelLayout(c)}else{if(typeof a!="boolean"){a=c.isLayoutRoot()}}if(a||!c.ownerLayout||!c.ownerLayout.onContentChange(c)){if(!c.isLayoutSuspended()){d=(b&&b.hasOwnProperty("defer"))?b.defer:c.deferLayouts;Ext.AbstractComponent.updateLayout(c,d)}}},getSizeModel:function(e){var i=this,a=Ext.layout.SizeModel,k=i.componentLayout.ownerContext,b,l,c,j,g,h,d;if(k){d=k.widthModel;c=k.heightModel}if(!d||!c){b=(typeof i.width=="number");l=(typeof i.height=="number");if(i.floating||!(j=i.ownerLayout)){if(b){d=a.configured}if(l){c=a.configured}g=Ext.layout.Layout.prototype.autoSizePolicy;h=i.floating?3:i.shrinkWrap}else{g=j.getItemSizePolicy(i,e);h=j.isItemShrinkWrap(i)}h=(h===true)?3:(h||0);if(h!==3){if(!e){e=i.ownerCt&&i.ownerCt.getSizeModel()}if(e){h|=(e.width.shrinkWrap?1:0)|(e.height.shrinkWrap?2:0)}}if(!d){if(!g.setsWidth){if(b){d=a.configured}else{d=(h&1)?a.shrinkWrap:a.natural}}else{if(g.readsWidth){if(b){d=a.calculatedFromConfigured}else{d=(h&1)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}}else{d=a.calculated}}}if(!c){if(!g.setsHeight){if(l){c=a.configured}else{c=(h&2)?a.shrinkWrap:a.natural}}else{if(g.readsHeight){if(l){c=a.calculatedFromConfigured}else{c=(h&2)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}}else{c=a.calculated}}}}return{width:d,height:c}},isDescendant:function(a){if(a.isContainer){for(var b=this.ownerCt;b;b=b.ownerCt){if(b===a){return true}}}return false},doComponentLayout:function(){this.updateLayout();return this},forceComponentLayout:function(){this.updateLayout()},setComponentLayout:function(b){var a=this.componentLayout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,"autocomponent"))}return a.componentLayout},afterComponentLayout:function(c,a,b,e){var d=this;if(++d.componentLayoutCounter===1){d.afterFirstLayout(c,a)}if(d.hasListeners.resize&&(c!==b||a!==e)){d.fireEvent("resize",d,c,a,b,e)}},beforeComponentLayout:function(b,a){return true},setPosition:function(a,e,b){var c=this,d=c.beforeSetPosition.apply(c,arguments);if(d&&c.rendered){d=c.convertPosition(d);if(b){c.stopAnimation();c.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(c.afterSetPosition,c,[d.left,d.top])},to:d},b))}else{if(d.left!==undefined&&d.top!==undefined){c.el.setLeftTop(d.left,d.top)}else{if(d.left!==undefined){c.el.setLeft(d.left)}else{if(d.top!==undefined){c.el.setTop(d.top)}}}c.afterSetPosition(d.left,d.top)}}return c},beforeSetPosition:function(a,e,b){var d,c;if(!a||Ext.isNumber(a)){d={x:a,y:e,anim:b}}else{if(Ext.isNumber(c=a[0])){d={x:c,y:a[1],anim:e}}else{d={x:a.x,y:a.y,anim:e}}}d.hasX=Ext.isNumber(d.x);d.hasY=Ext.isNumber(d.y);this.x=d.x;this.y=d.y;return(d.hasX||d.hasY)?d:null},afterSetPosition:function(a,c){var b=this;b.onPosition(a,c);if(b.hasListeners.move){b.fireEvent("move",b,a,c)}},convertPosition:function(d,b){var a={},c=Ext.Element;if(d.hasX){a.left=b?c.addUnits(d.x):d.x}if(d.hasY){a.top=b?c.addUnits(d.y):d.y}return a},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=new Ext.ComponentLoader(Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setDocked:function(b,c){var a=this;a.dock=b;if(c&&a.ownerCt&&a.rendered){a.ownerCt.updateLayout()}return a},setBorder:function(b,d){var c=this,a=!!d;if(c.rendered||a){if(!a){d=c.el}if(!b){b=0}else{b=Ext.Element.unitizeBox((b===true)?1:b)}d.setStyle("border-width",b);if(!a){c.updateLayout()}}c.border=b},onDestroy:function(){var a=this;if(a.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask,a.floatingItems)},destroy:function(){var d=this,b=d.renderSelectors,a,c;if(!d.isDestroyed){if(!d.hasListeners.beforedestroy||d.fireEvent("beforedestroy",d)!==false){d.destroying=true;d.beforeDestroy();if(d.floating){delete d.floatParent;if(d.zIndexManager){d.zIndexManager.unregister(d)}}else{if(d.ownerCt&&d.ownerCt.remove){d.ownerCt.remove(d,false)}}d.onDestroy();Ext.destroy(d.plugins);if(d.hasListeners.destroy){d.fireEvent("destroy",d)}Ext.ComponentManager.unregister(d);d.mixins.state.destroy.call(d);d.clearListeners();if(d.rendered){Ext.AbstractComponent.cancelLayout(d);if(!d.preserveElOnDestroy){d.el.remove()}d.mixins.elementCt.destroy.call(d);if(b){for(a in b){if(b.hasOwnProperty(a)){c=d[a];if(c){delete d[a];c.remove()}}}}delete d.el;delete d.frameBody;delete d.rendered}d.destroying=false;d.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c<d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})}},function(){var a=this;a.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"});Ext.resumeLayouts=function(b){a.resumeLayouts(b)};Ext.suspendLayouts=function(){a.suspendLayouts()};Ext.batchLayouts=function(c,b){a.suspendLayouts();c.call(b);a.resumeLayouts(true)}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.association.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d<g;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,g=e.length;d<g;d++){h=e[d];this.types[h.ownerModel].prototype.associations.add(Ext.data.association.Association.create(h));Ext.Array.remove(a,h)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a]}return a},create:function(b,a,d){var c=typeof a=="function"?a:this.types[a||b.name];return new c(b,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(a,b){if(a.init){return a}else{return Ext.createByAlias("plugin."+(a.ptype||b),a)}},findByType:function(c,g){var e=[],b=this.types,a,d;for(a in b){if(!b.hasOwnProperty(a)){continue}d=b[a];if(d.type==c&&(!g||(g===true&&d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=new Ext.util.HashMap();this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&&!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&&a[0]&&a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!="element"){d.target.on("destroy",function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on("afteranimate",function(){d.paused=false})}}else{d.paused=false}d.on("afteranimate",function(){Ext.Array.remove(a,d);if(d.remove){if(e.type=="element"){var g=Ext.get(e.id);if(g){g.remove()}}}},this);a.push(d)}});Ext.define("Ext.util.LruCache",{extend:"Ext.util.HashMap",constructor:function(a){Ext.apply(this,a);this.callParent([a])},add:function(b,e){var d=this,a=d.findKey(e),c;if(a){d.unlinkEntry(c=d.map[a]);c.prev=d.last;c.next=null}else{c={prev:d.last,next:null,key:b,value:e}}if(d.last){d.last.next=c}else{d.first=c}d.last=c;d.callParent([b,c]);d.prune();return e},insertBefore:function(b,g,c){var e=this,a,d;if(c=this.map[this.findKey(c)]){a=e.findKey(g);if(a){e.unlinkEntry(d=e.map[a])}else{d={prev:c.prev,next:c,key:b,value:g}}if(c.prev){d.prev.next=d}else{e.first=d}d.next=c;c.prev=d;e.prune();return g}else{return e.add(b,g)}},get:function(a){var b=this.map[a];if(b){if(b.next){this.moveToEnd(b)}return b.value}},removeAtKey:function(a){this.unlinkEntry(this.map[a]);return this.callParent(arguments)},clear:function(a){this.first=this.last=null;return this.callParent(arguments)},unlinkEntry:function(a){if(a){if(a.next){a.next.prev=a.prev}else{this.last=a.prev}if(a.prev){a.prev.next=a.next}else{this.first=a.next}a.prev=a.next=null}},moveToEnd:function(a){this.unlinkEntry(a);if(a.prev=this.last){this.last.next=a}else{this.first=a}this.last=a},getArray:function(c){var a=[],b=this.first;while(b){a.push(c?b.key:b.value);b=b.next}return a},each:function(c,b,a){var g=this,e=a?g.last:g.first,d=g.length;b=b||g;while(e){if(c.call(b,e.key,e.value,d)===false){break}e=a?e.prev:e.next}return g},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a].value===b){return a}}return undefined},prune:function(){var a=this,b=a.maxSize?(a.length-a.maxSize):0;if(b>0){for(;a.first&&b;b--){a.removeAtKey(a.first.key)}}}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(a){a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=new Ext.util.AbstractMixedCollection(false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(h,g,c,e){var d=this,i,b,a;if(Ext.isArray(h)){e=c;c=g;a=h}else{if(Ext.isObject(h)){e=c;c=g;a=[h]}else{if(Ext.isString(h)){i=d.sorters.get(h);if(!i){i={property:h,direction:g};a=[i]}else{if(g===undefined){i.toggle()}else{i.setDirection(g)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){h=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(h)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}}if(e!==false){d.onBeforeSort(a);h=d.sorters.items;if(h.length){d.doSort(d.generateComparator())}}return h},generateComparator:function(){var a=this.sorters.getRange();return a.length?this.createComparator(a):this.emptyComparator},createComparator:function(a){return function(d,c){var b=a[0].sort(d,c),g=a.length,e=1;for(;e<g;e++){b=b||a[e].sort.call(this,d,c)}return b}},emptyComparator:function(){return 0},onBeforeSort:Ext.emptyFn,decodeSorters:function(g){if(!Ext.isArray(g)){if(g===undefined){g=[]}else{g=[g]}}var d=g.length,h=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=g[c];if(!(b instanceof h)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}g[c]=new Ext.util.Sorter(b)}}return g},getSorters:function(){return this.sorters.items}});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var a=this;a.callParent(arguments);a.addEvents("sort");a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(l,a,k){var j=this,d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],m=j.keys,g=j.items;k=k||function(i,c){return i-c};for(d=0,e=g.length;d<e;d++){h[h.length]={key:m[d],value:g[d],index:d}}Ext.Array.sort(h,function(i,c){var n=k(i[l],c[l])*b;if(n===0){n=(i.index<c.index?-1:1)}return n});for(d=0,e=h.length;d<e;d++){g[d]=h[d].value;m[d]=h[d].key}j.fireEvent("sort",j)},sortBy:function(c){var h=this,b=h.items,g=h.keys,e=b.length,a=[],d;for(d=0;d<e;d++){a[d]={key:g[d],value:b[d],index:d}}Ext.Array.sort(a,function(j,i){var k=c(j.value,i.value);if(k===0){k=(j.index<i.index?-1:1)}return k});for(d=0;d<e;d++){b[d]=a[d].value;g[d]=a[d].key}h.fireEvent("sort",h,b,g)},findInsertionIndex:function(e,d){var g=this,b=g.items,i=0,a=b.length-1,c,h;if(!d){d=g.generateComparator()}while(i<=a){c=(i+a)>>1;h=d(e,b[c]);if(h>=0){i=c+1}else{if(h<0){a=c-1}}}return i},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;c<g;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<g;c++){if(a[c]==undefined){a[c]=e.shift()}}h.clear();h.addAll(a);h.resumeEvents();h.fireEvent("sort",h)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})}});Ext.define("Ext.container.DockingContainer",{requires:["Ext.util.MixedCollection","Ext.Element"],isDockingContainer:true,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},dockOrder:{top:-1,left:-1,right:1,bottom:1},addDocked:function(a,g){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b<c;b++){d=a[b];d.dock=d.dock||"top";if(g!==undefined){e.dockedItems.insert(g+b,d)}else{e.dockedItems.add(d)}if(d.onAdded!==Ext.emptyFn){d.onAdded(e,b)}if(e.onDockedAdd!==Ext.emptyFn){e.onDockedAdd(d)}}if(e.rendered&&!e.suspendLayout){e.updateLayout()}return a},destroyDockedItems:function(){var a=this.dockedItems,b;if(a){while((b=a.first())){this.removeDocked(b,true)}}},doRenderDockedItems:function(c,g,h){var e=g.$comp,d=e.componentLayout,b,a;if(d.getDockedItems&&!g.$skipDockedItems){b=d.getDockedItems("render",!h);a=b&&d.getItemsRenderTree(b);if(a){Ext.DomHelper.generateMarkup(a,c)}}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getDockedItems:function(a,c){var b=this.getComponentLayout().getDockedItems("render",c);if(a&&b.length){b=Ext.ComponentQuery.query(a,b)}return b},getDockingRefItems:function(b,e){var a=b&&"*,* *",d=this.getDockedItems(a,true),c;d.push.apply(d,e);c=this.getDockedItems(a,false);d.push.apply(d,c);return d},initDockingItems:function(){var b=this,a=b.dockedItems;b.dockedItems=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){b.addDocked(a)}},insertDocked:function(b,a){this.addDocked(a,b)},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,removeDocked:function(e,b){var d=this,c,a;if(!d.dockedItems.contains(e)){return e}c=d.componentLayout;a=c&&d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved();d.onDockedRemove(e);if(b===true||(b!==false&&d.autoDestroy)){e.destroy()}else{if(a){c.afterRemove(e)}}if(!d.destroying&&!d.suspendLayout){d.updateLayout()}return e},setupDockingRenderTpl:function(a){a.renderDockedItems=this.doRenderDockedItems}});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.proxy.Proxy","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},remoteSort:false,remoteFilter:false,autoLoad:undefined,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(a){var c=this,b;Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:{}});if(!c.model&&c.fields){c.model=Ext.define("Ext.data.Store.ImplicitModel-"+(c.storeId||Ext.id()),{extend:"Ext.data.Model",fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());c.proxy.on("metachange",c.onMetaChange,c);if(c.id&&!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=new Ext.util.MixedCollection();c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},onMetaChange:function(a,b){this.fireEvent("metachange",this,b)},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=new Ext.data.Operation(c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=new Ext.data.Operation(b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},onCreateRecords:Ext.emptyFn,onUpdateRecords:Ext.emptyFn,onDestroyRecords:function(b,a,c){if(c){this.removed=[]}},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=new Ext.data.Operation(b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var g=this,b=c.operations,e=b.length,d;g.suspendEvents();for(d=0;d<e;d++){g.onProxyWrite(b[d])}g.resumeEvents();g.fireEvent("datachanged",g);g.fireEvent("refresh",g)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&&a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},getModifiedRecords:function(){return[].concat(this.getNewRecords(),this.getUpdatedRecords())},filterUpdated:function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c<d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:"data"});if(b.fn){b.filterFn=b.fn}if(typeof b=="function"){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(c){var e=this,b={},g=e.getNewRecords(),d=e.getUpdatedRecords(),a=e.getRemovedRecords(),h=false;if(g.length>0){b.create=g;h=true}if(d.length>0){b.update=d;h=true}if(a.length>0){b.destroy=a;h=true}if(h&&e.fireEvent("beforesync",b)!==false){c=c||{};e.proxy.batch(Ext.apply(c,{operations:b,listeners:e.getBatchListeners()}))}return e},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=b||{};b.action=b.action||"read";b.filters=b.filters||c.filters.items;b.sorters=b.sorters||c.getSorters();a=new Ext.data.Operation(b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},afterEdit:function(a,e){var d=this,b,c;if(d.autoSync&&!d.autoSyncSuspended){for(b=e.length;b--;){if(a.fields.get(e[b]).persist){c=true;break}}if(c){d.sync()}}d.fireEvent("update",d,a,Ext.data.Model.EDIT,e)},afterReject:function(a){this.fireEvent("update",this,a,Ext.data.Model.REJECT,null)},afterCommit:function(a){this.fireEvent("update",this,a,Ext.data.Model.COMMIT,null)},destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=a.tree=a.sorters=a.filters=a.groupers=null;if(a.reader){a.reader.destroyReader()}a.proxy=a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}else{a.model=null}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}},clearData:Ext.emptyFn,getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading},suspendAutoSync:function(){this.autoSyncSuspended=true},resumeAutoSync:function(){this.autoSyncSuspended=false}});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.field==e){d.push(a)}}return d}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.util.MixedCollection"],compareConvertFields:function(a,d){var c=a.convert&&a.type&&a.convert!==a.type.convert,b=d.convert&&d.type&&d.convert!==d.type.convert;if(c&&!b){return 1}if(!c&&b){return -1}return 0},itemNameFn:function(a){return a.name},onClassExtended:function(b,c,a){var d=a.onBeforeCreated;a.onBeforeCreated=function(g,C){var B=this,D=Ext.getClassName(g),q=g.prototype,w=g.prototype.superclass,h=C.validations||[],s=C.fields||[],x=C.associations||[],e=function(F,H){var G=0,E,I;if(F){F=Ext.Array.from(F);for(E=F.length;G<E;++G){I=F[G];if(!Ext.isObject(I)){I={model:I}}I.type=H;x.push(I)}}},t=C.idgen,z=new Ext.util.MixedCollection(false,q.itemNameFn),y=new Ext.util.MixedCollection(false,q.itemNameFn),p=w.validations,A=w.fields,l=w.associations,j,v,n,o=[],m=C.idProperty||g.prototype.idProperty,u=function(F,E,i){var G,H;if(z.events.add.firing){H=F;G=E}else{G=i;H=E.originalIndex}G.originalIndex=H;if(G.mapping===m||(G.mapping==null&&G.name===m)){G.defaultValue=undefined}},r=C.proxy||g.prototype.proxy||g.prototype.defaultProxyType,k=function(){z.sortBy(q.compareConvertFields)};g.modelName=D;q.modelName=D;if(p){h=p.concat(h)}C.validations=h;if(A){s=A.items.concat(s)}z.on({add:u,replace:u});for(v=0,n=s.length;v<n;++v){z.add(new Ext.data.Field(s[v]))}if(!z.get(m)){z.add(new Ext.data.Field(m))}k();z.on({add:k,replace:k});C.fields=z;if(t){C.idgen=Ext.data.IdGenerator.get(t)}e(C.belongsTo,"belongsTo");delete C.belongsTo;e(C.hasMany,"hasMany");delete C.hasMany;e(C.hasOne,"hasOne");delete C.hasOne;if(l){x=l.items.concat(x)}for(v=0,n=x.length;v<n;++v){o.push("association."+x[v].type.toLowerCase())}if(r&&!r.isProxy){o.push("proxy."+(typeof r==="string"?r:r.type))}Ext.require(o,function(){Ext.ModelManager.registerType(D,g);for(v=0,n=x.length;v<n;++v){j=x[v];Ext.apply(j,{ownerModel:D,associatedModel:j.model});if(Ext.ModelManager.getModel(j.model)===undefined){Ext.ModelManager.registerDeferredAssociation(j)}else{y.add(Ext.data.association.Association.create(j))}}C.associations=y;d.call(B,g,C,a);g.setProxy(r);Ext.ModelManager.onModelDefined(g)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a=="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){return this.proxy},setFields:function(c,d,b){var j=this,h=j.prototype,g=h.fields,a=c?c.length:0,e=0;if(d){h.idProperty=d}if(b){h.clientIdProperty=b}if(g){g.clear()}else{g=j.prototype.fields=new Ext.util.MixedCollection(false,function(i){return i.name})}for(;e<a;e++){g.add(new Ext.data.Field(c[e]))}if(!g.get(h.idProperty)){g.add(new Ext.data.Field(h.idProperty))}j.fields=g;return g},getFields:function(){return this.prototype.fields.items},load:function(g,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:"read",id:g});var b=new Ext.data.Operation(c),d=c.scope||this,a=null,e;e=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};this.proxy.read(b,e,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(a){var b=[this.PREFIX,"-",this.AUTO_ID++].join("");a.phantom=true;a.internalId=b;return b}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(a){return a.modelName+"-"+a.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",clientIdProperty:null,defaultProxyType:"ajax",constructor:function(j,d,o,b){j=j||{};var l=this,k,e,m,a,n,g,c,h;l.internalId=(d||d===0)?d:Ext.data.Model.id(l);l.raw=o;if(!l.data){l.data={}}l.modified={};if(l.persistanceProperty){l.persistenceProperty=l.persistanceProperty}l[l.persistenceProperty]=b||{};l.mixins.observable.constructor.call(l);if(!b){k=l.fields.items;e=k.length;h=0;c=l[l.persistenceProperty];if(Ext.isArray(j)){for(;h<e;h++){m=k[h];a=m.name;n=j[h];if(n===undefined){n=m.defaultValue}if(m.convert){n=m.convert(n,l)}if(n!==undefined){c[a]=n}}}else{for(;h<e;h++){m=k[h];a=m.name;n=j[a];if(n===undefined){n=m.defaultValue}if(m.convert){n=m.convert(n,l)}if(n!==undefined){c[a]=n}}}}l.stores=[];if(l.getId()){l.phantom=false}else{if(l.phantom){g=l.idgen.generate();if(g!==null){l.setId(g)}}}l.dirty=false;l.modified={};if(typeof l.init=="function"){l.init()}l.id=l.idgen.getRecId(l)},get:function(a){return this[this.persistenceProperty][a]},_singleProp:{},set:function(r,b){var j=this,h=j[j.persistenceProperty],i=j.fields,q=j.modified,o=(typeof r=="string"),p,k,g,n,e,a,c,d,l,m;if(o){m=j._singleProp;m[r]=b}else{m=r}for(a in m){if(m.hasOwnProperty(a)){l=m[a];if(i&&(k=i.get(a))&&k.convert){l=k.convert(l,j)}p=h[a];if(j.isEqual(p,l)){continue}h[a]=l;(e||(e=[])).push(a);if(k&&k.persist){if(q.hasOwnProperty(a)){if(j.isEqual(q[a],l)){delete q[a];j.dirty=false;for(n in q){if(q.hasOwnProperty(n)){j.dirty=true;break}}}}else{j.dirty=true;q[a]=p}}if(a==j.idProperty){g=true;c=p;d=l}}}if(o){delete m[r]}if(g){j.fireEvent("idchanged",j,c,d)}if(!j.editing&&e){j.afterEdit(e)}return e||null},copyFrom:function(g){if(g){var e=this,c=e.fields.items,k=c.length,h,a=0,d=e[e.persistenceProperty],b=g[g.persistenceProperty],j;for(;a<k;a++){h=c[a];j=b[h.name];if(j!==undefined){d[h.name]=j}}if(e.phantom&&!g.phantom){e.setId(g.getId())}}},isEqual:function(d,c){if(Ext.isDate(d)&&Ext.isDate(c)){return Ext.Date.isEqual(d,c)}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a[a.persistenceProperty]);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistenceProperty]=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a,c){var b=this,d;if(b.editing){b.editing=false;if(!c){c=b.getModifiedFieldNames()}d=b.dirty||c.length>0;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(d&&a!==true){b.afterEdit(c)}}},getModifiedFieldNames:function(){var d=this,c=d.dataSave,e=d[d.persistenceProperty],a=[],b;for(b in e){if(e.hasOwnProperty(b)){if(!d.isEqual(e[b],c[b])){a.push(b)}}}return a},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var c=this,a=c.fields.items,g=a.length,e,b,d;c.dirty=true;for(d=0;d<g;d++){e=a[d];if(e.persist){b=e.name;c.modified[b]=c.get(b)}}},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c[c.persistenceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var b=this;b.phantom=b.dirty=b.editing=false;b.modified={};if(a!==true){b.afterCommit()}},copy:function(a){var b=this;return new b.self(Ext.apply({},b[b.persistenceProperty]),a)},setProxy:function(a){if(!a.isProxy){if(typeof a==="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.proxy},validate:function(){var k=new Ext.data.Errors(),c=this.validations,e=Ext.data.validations,b,d,j,a,h,g;if(c){b=c.length;for(g=0;g<b;g++){d=c[g];j=d.field||d.name;h=d.type;a=e[h](d,this.get(j));if(!a){k.add({field:j,message:d.message||e[h+"Message"]})}}}return k},isValid:function(){return this.validate().isValid()},save:function(m){m=Ext.apply({},m);var g=this,b=g.phantom?"create":"update",l=m.scope||g,j=g.stores,c=0,e,h,d,a,k;Ext.apply(m,{records:[g],action:b});a=new Ext.data.Operation(m);k=function(i){d=[g,i];if(i.wasSuccessful()){for(e=j.length;c<e;c++){h=j[c];h.fireEvent("write",h,i);h.fireEvent("datachanged",h)}Ext.callback(m.success,l,d)}else{Ext.callback(m.failure,l,d)}Ext.callback(m.callback,l,d)};g.getProxy()[b](a,k,g);return g},destroy:function(l){l=Ext.apply({},l);var e=this,k=l.scope||e,h=e.stores,b=0,d,g,c,a,j;Ext.apply(l,{records:[e],action:"destroy"});a=new Ext.data.Operation(l);j=function(i){c=[e,i];if(i.wasSuccessful()){for(d=h.length;b<d;b++){g=h[b];g.fireEvent("write",g,i);g.fireEvent("datachanged",g)}e.clearListeners();Ext.callback(l.success,k,c)}else{Ext.callback(l.failure,k,c)}Ext.callback(l.callback,k,c)};e.getProxy().destroy(a,j,e);return e},getId:function(){return this.get(this.idProperty)},getObservableId:function(){return this.id},setId:function(a){this.set(this.idProperty,a);this.phantom=!(a||a===0)},join:function(a){Ext.Array.include(this.stores,a);this.store=this.stores[0]},unjoin:function(a){Ext.Array.remove(this.stores,a);this.store=this.stores[0]||null},afterEdit:function(a){this.callStore("afterEdit",a)},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(g){var d=Ext.Array.clone(arguments),b=this.stores,e=0,a=b.length,c,h;d[0]=this;for(;e<a;++e){c=b[e];if(c&&typeof c[g]=="function"){c[g].apply(c,d)}h=c.treeStore;if(h&&typeof h[g]=="function"){h[g].apply(h,d)}}},getData:function(c){var d=this,a=d.fields.items,h=a.length,g={},b,e;for(e=0;e<h;e++){b=a[e].name;g[b]=d.get(b)}if(c===true){Ext.apply(g,d.getAssociatedData())}return g},getAssociatedData:function(){return this.prepareAssociatedData({},1)},prepareAssociatedData:function(w,z){var y=this,t=y.associations.items,e=t.length,x={},q=[],v=[],m=[],p,b,a,n,g,l,k,u,h,c,s,r,d,A;for(s=0;s<e;s++){c=t[s];u=c.associationId;k=w[u];if(k&&k!==z){continue}w[u]=z;d=c.type;A=c.name;if(d=="hasMany"){p=y[c.storeName];x[A]=[];if(p&&p.getCount()>0){b=p.data.items;h=b.length;for(r=0;r<h;r++){a=b[r];x[A][r]=a.getData();q.push(a);v.push(A);m.push(r)}}}else{if(d=="belongsTo"||d=="hasOne"){a=y[c.instanceName];if(a!==undefined){x[A]=a.getData();q.push(a);v.push(A);m.push(-1)}}}}for(s=0,h=q.length;s<h;++s){a=q[s];n=x[v[s]];g=m[s];l=a.prepareAssociatedData(w,z+1);if(g===-1){Ext.apply(n,l)}else{Ext.apply(n[g],l)}}return x}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),g=c,d,a;if(e){g=[];for(d=0,a=c.length;d<a;++d){g.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return new Ext.data.ArrayStore({data:g,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=new Ext.data.Store(b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.AbstractStore",alias:"store.tree",requires:["Ext.util.Sorter","Ext.data.Tree","Ext.data.NodeInterface"],clearOnLoad:true,clearRemovedOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",folderSort:false,constructor:function(c){var d=this,b,a;c=Ext.apply({},c);a=c.fields||d.fields;if(!a){c.fields=[{name:"text",type:"string"}]}d.callParent([c]);d.tree=new Ext.data.Tree();d.relayEvents(d.tree,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);d.tree.on({scope:d,remove:d.onNodeRemove,beforeexpand:d.onBeforeNodeExpand,beforecollapse:d.onBeforeNodeCollapse,append:d.onNodeAdded,insert:d.onNodeAdded,sort:d.onNodeSort});d.onBeforeSort();b=d.root;if(b){delete d.root;d.setRootNode(b)}if(Ext.isDefined(d.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}d.nodeParam=d.nodeParameter;delete d.nodeParameter}},setProxy:function(c){var a,b;if(c instanceof Ext.data.proxy.Proxy){b=Ext.isEmpty(c.getReader().root)}else{if(Ext.isString(c)){b=true}else{a=c.reader;b=!(a&&!Ext.isEmpty(a.root))}}c=this.callParent(arguments);if(b){a=c.getReader();a.root=this.defaultRootProperty;a.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(b,c,a){if(b.isLoaded()){Ext.callback(c,a||b,[b.childNodes])}else{if(b.isLoading()){this.on("load",function(){Ext.callback(c,a||b,[b.childNodes])},this,{single:true})}else{this.read({node:b,callback:function(){Ext.callback(c,a||b,[b.childNodes])}})}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onBeforeNodeCollapse:function(b,c,a){c.call(a||b,b.childNodes)},onNodeRemove:function(b,d,a){var c=this,e=c.removed;if(!d.isReplace&&Ext.Array.indexOf(e,d)==-1){e.push(d)}if(c.autoSync&&!c.autoSyncSuspended&&!a){c.sync()}},onNodeAdded:function(c,e){var d=this,b=d.getProxy(),a=b.getReader(),g=e.raw||e[e.persistenceProperty],h;Ext.Array.remove(d.removed,e);if(!e.isLeaf()){h=a.getRoot(g);if(h){d.fillNode(e,a.extractData(h));delete g[a.root]}}if(d.autoSync&&!d.autoSyncSuspended&&(e.phantom||e.dirty)){d.sync()}},onNodeSort:function(){if(this.autoSync&&!this.autoSyncSuspended){this.sync()}},setRootNode:function(a,c){var b=this;a=a||{};if(!a.isModel){Ext.applyIf(a,{id:b.defaultRootId,text:"Root",allowDrag:false});Ext.data.NodeInterface.decorate(b.model);a=Ext.ModelManager.create(a,b.model)}else{if(a.isModel&&!a.isNode){Ext.data.NodeInterface.decorate(b.model)}}b.getProxy().getReader().buildExtractors(true);b.tree.setRootNode(a);if(c!==true&&!a.isLoaded()&&(b.autoLoad===true||a.isExpanded())){b.load({node:a})}return a},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(a){return this.tree.getNodeById(a)},load:function(b){b=b||{};b.params=b.params||{};var d=this,c=b.node||d.tree.getRootNode(),a;if(!c){c=d.setRootNode({expanded:true},true)}if(d.clearOnLoad){if(d.clearRemovedOnLoad){d.clearRemoved(c)}d.tree.un("remove",d.onNodeRemove,d);c.removeAll(false);d.tree.on("remove",d.onNodeRemove,d)}Ext.applyIf(b,{node:c});b.params[d.nodeParam]=c?c.getId():"root";if(c){c.set("loading",true)}return d.callParent([b])},clearRemoved:function(b){var k=this,e=k.removed,a=b.getId(),d=e.length,c=d,n={},h=[],m={},j,g,l;if(b===k.getRootNode()){k.removed=[];return}for(;c--;){j=e[c];m[j.getId()]=j}for(c=d;c--;){j=e[c];g=j;while(g&&g.getId()!==a){l=g.get("parentId");g=g.parentNode||k.getNodeById(l)||m[l]}if(g){n[j.getId()]=j}}for(c=0;c<d;c++){j=e[c];if(!n[j.getId()]){h.push(j)}}k.removed=h},fillNode:function(b,c){var h=this,e=c?c.length:0,g=h.sorters,d,k,j=false,a=e&&h.sortOnLoad&&!h.remoteSort&&g&&g.items&&g.items.length,m,l;for(d=1;d<e;d++){m=c[d];l=c[d-1];j=m[m.persistenceProperty].index!=l[l.persistenceProperty].index;if(j){break}}if(a){if(j){h.sorters.insert(0,h.indexSorter)}k=new Ext.util.MixedCollection();k.addAll(c);k.sort(h.sorters.items);c=k.items;h.sorters.remove(h.indexSorter)}else{if(j){Ext.Array.sort(c,h.sortByIndex)}}b.set("loaded",true);for(d=0;d<e;d++){b.appendChild(c[d],undefined,true)}return c},sortByIndex:function(b,a){return b[b.persistenceProperty].index-a[a.persistenceProperty].index},onProxyLoad:function(c){var j=this,e=c.wasSuccessful(),b=c.getRecords(),a=c.node,h,k,g,d;j.loading=false;a.set("loading",false);if(e){if(!j.clearOnLoad){b=j.cleanRecords(a,b)}b=j.fillNode(a,b)}j.fireEvent("read",j,c.node,b,e);j.fireEvent("load",j,c.node,b,e);Ext.callback(c.callback,c.scope||j,[b,c,e])},cleanRecords:function(g,b){var e={},j=g.childNodes,d=0,a=j.length,c=[],h;for(;d<a;++d){e[j[d].getId()]=true}for(d=0,a=b.length;d<a;++d){h=b[d];if(!e[h.getId()]){c.push(h)}}return c},removeAll:function(){var a=this.getRootNode();if(a){a.destroy(true)}this.fireEvent("clear",this)},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.tree.sort(a,true);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}b.fireEvent("sort",b)}},function(){var a=this.prototype;a.indexSorter=new Ext.util.Sorter({sorterFn:a.sortByIndex})});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(h,i,g){c.processResponse(i,a,d,g,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.data.Model","Ext.data.proxy.Ajax","Ext.data.proxy.Memory","Ext.data.reader.Json","Ext.data.writer.Json","Ext.util.LruCache"],uses:["Ext.ModelManager","Ext.util.Grouper"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",trailingBufferZone:25,leadingBufferZone:200,pageSize:undefined,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,clearRemovedOnLoad:true,defaultPageSize:25,statics:{recordIdFn:function(a){return a.internalId},recordIndexFn:function(a){return a.index}},onClassExtended:function(b,d,a){var c=d.model,e;if(typeof c=="string"){e=a.onBeforeCreated;a.onBeforeCreated=function(){var h=this,g=arguments;Ext.require(c,function(){e.apply(h,g)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,g=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;e=b.data||d.data;d.data=new Ext.util.MixedCollection(false,Ext.data.Store.recordIdFn);if(e){d.inlineData=e;delete b.data}if(!g&&a){g=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=new Ext.util.MixedCollection();d.groupers.addAll(d.decodeGroupers(g));this.callParent([b]);if(d.buffered){d.pageMap=new d.PageMap({pageSize:d.pageSize,maxSize:d.purgePageCount,listeners:{clear:d.cancelAllPrefetches,scope:d}});d.pageRequests={};d.sortOnLoad=false;d.filterOnLoad=false}if(d.groupers.items.length){d.sort(d.groupers.items,"prepend",false)}c=d.proxy;e=d.inlineData;if(!d.buffered&&!d.pageSize){d.pageSize=d.defaultPageSize}if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,[e])}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}},destroy:function(){if(this.pageMap){this.pageMap.clear()}this.callParent(arguments)},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,g=Ext.util.Grouper,b,c,a=[];for(c=0;c<d;c++){b=e[c];if(!(b instanceof g)){if(Ext.isString(b)){b={property:b}}b=Ext.apply({root:"data",direction:"ASC"},b);if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}a.push(new g(b))}else{a.push(b)}}return a},group:function(e,g){var d=this,c=false,b,a;if(Ext.isArray(e)){a=e}else{if(Ext.isObject(e)){a=[e]}else{if(Ext.isString(e)){b=d.groupers.get(e);if(!b){b={property:e,direction:g};a=[b]}else{if(g===undefined){b.toggle()}else{b.setDirection(g)}}}}}if(a&&a.length){c=true;a=d.decodeGroupers(a);d.groupers.clear();d.groupers.addAll(a)}if(d.remoteGroup){d.load({scope:d,callback:d.fireGroupChange})}else{d.sort(null,null,null,c);d.fireGroupChange()}},clearGrouping:function(){var d=this,e=d.groupers.items,c=e.length,a,b;for(b=0;b<c;b++){a=e[b];d.sorters.remove(a)}d.groupers.clear();if(d.remoteGroup){d.load({scope:d,callback:d.fireGroupChange})}else{d.sort();d.fireEvent("groupchange",d,d.groupers)}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],k={},g,h,j,e;for(e=0;e<a;e++){g=d[e];h=this.getGroupString(g);j=k[h];if(j===undefined){j={name:h,children:[]};c.push(j);k[h]=j}j.children.push(g)}return b?k[b]:c},getGroupsForGrouper:function(g,b){var d=g.length,e=[],a,c,j,k,h;for(h=0;h<d;h++){j=g[h];c=b.getGroupString(j);if(c!==a){k={name:c,grouper:b,records:[]};e.push(k)}k.records.push(j);a=c}return e},getGroupsForGrouperIndex:function(c,j){var g=this,h=g.groupers,b=h.getAt(j),a=g.getGroupsForGrouper(c,b),e=a.length,d;if(j+1<h.length){for(d=0;d<e;d++){a[d].children=g.getGroupsForGrouperIndex(a[d].records,j+1)}}for(d=0;d<e;d++){a[d].depth=j}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return a.get(b.property)}return""},insert:function(d,c){var h=this,g=false,e,b,a;c=[].concat(c);for(e=0,a=c.length;e<a;e++){b=h.createModel(c[e]);b.set(h.modelDefaults);c[e]=b;h.data.insert(d+e,b);b.join(h);g=g||b.phantom===true}if(h.snapshot){h.snapshot.addAll(c)}if(h.requireSort){h.suspendEvents();h.sort();h.resumeEvents()}h.fireEvent("add",h,c,d);h.fireEvent("datachanged",h);if(h.autoSync&&g&&!h.autoSyncSuspended){h.sync()}},add:function(b){if(!Ext.isArray(b)){b=Array.prototype.slice.apply(arguments)}else{b=b.slice(0)}var e=this,c=0,d=b.length,a,g=e.sorters&&e.sorters.items.length;if(g&&d===1){return[e.addSorted(e.createModel(b[0]))]}for(;c<d;c++){a=e.createModel(b[c]);b[c]=a}if(g){e.requireSort=true}e.insert(e.data.length,b);delete e.requireSort;return b},addSorted:function(a){var c=this,b=c.data.findInsertionIndex(a,c.generateComparator());c.insert(b,a);return a},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},each:function(e,c){var g=this.data.items,b=g.length,a,h;for(h=0;h<b;h++){a=g[h];if(e.call(c||a,a,h,b)===false){break}}},remove:function(b,k){if(!Ext.isArray(b)){b=[b]}k=k===true;var g=this,h=false,c=0,a=b.length,j,e,d;for(;c<a;c++){d=b[c];e=g.data.indexOf(d);if(g.snapshot){g.snapshot.remove(d)}if(e>-1){j=d.phantom===true;if(!k&&!j){g.removed.push(d)}d.unjoin(g);g.data.remove(d);h=h||!j;g.fireEvent("remove",g,d,e)}}g.fireEvent("datachanged",g);if(!k&&g.autoSync&&h&&!g.autoSyncSuspended){g.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(typeof a=="function"){a={callback:a}}a.groupers=a.groupers||b.groupers.items;a.page=a.page||b.currentPage;a.start=(a.start!==undefined)?a.start:(b.currentPage-1)*b.pageSize;a.limit=a.limit||b.pageSize;a.addRecords=a.addRecords||false;if(b.buffered){return b.loadToPrefetch(a)}return b.callParent([a])},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;d.fireEvent("load",d,a,e);d.fireEvent("read",d,a,b.wasSuccessful());Ext.callback(b.callback,b.scope||d,[a,b,e])},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,g){if(Ext.isString(e)){e={property:e,value:g}}var d=this,a=d.decodeFilters(e),b=0,h=d.sorters.length&&d.sortOnFilter&&!d.remoteSort,c=a.length;for(;b<c;b++){d.filters.replace(a[b])}if(d.remoteFilter){if(d.buffered){d.pageMap.clear();d.loadPage(1)}else{d.currentPage=1;d.load()}}else{if(d.filters.getCount()){d.snapshot=d.snapshot||d.data.clone();d.data=d.data.filter(d.filters.items);if(h){d.sort()}else{d.fireEvent("datachanged",d);d.fireEvent("refresh",d)}}}},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){if(a){return}if(b.buffered){b.pageMap.clear();b.loadPage(1)}else{b.currentPage=1;b.load()}}else{if(b.isFiltered()){b.data=b.snapshot.clone();delete b.snapshot;if(a!==true){b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}}}},isFiltered:function(){var a=this.snapshot;return !!a&&a!==this.data},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)},queryBy:function(b,a){var c=this,d=c.snapshot||c.data;return d.filterBy(b,a||c)},loadData:function(h,a){var c=this.model,g=h.length,e=[],d,b;for(d=0;d<g;d++){b=h[d];if(!(b instanceof Ext.data.Model)){b=Ext.ModelManager.create(b,c)}e.push(b)}this.loadRecords(e,{addRecords:a})},loadRawData:function(e,b){var d=this,a=d.proxy.reader.read(e),c=a.records;if(a.success){d.totalCount=a.total;d.loadRecords(c,{addRecords:b});d.fireEvent("load",d,c,true)}},loadRecords:function(b,c){var g=this,d=0,e=b.length,h=(c=c||{}).start,a=g.snapshot;if(!c.addRecords){delete g.snapshot;g.clearData(true)}else{if(a){a.addAll(b)}}g.data.addAll(b);if(typeof h!="undefined"){for(;d<e;d++){b[d].index=h+d;b[d].join(g)}}else{for(;d<e;d++){b[d].join(g)}}g.suspendEvents();if(g.filterOnLoad&&!g.remoteFilter){g.filter()}if(g.sortOnLoad&&!g.remoteSort){g.sort()}g.resumeEvents();g.fireEvent("datachanged",g);g.fireEvent("refresh",g)},loadPage:function(c,a){var b=this;b.currentPage=c;a=Ext.apply({page:c,start:(c-1)*b.pageSize,limit:b.pageSize,addRecords:!b.clearOnPageLoad},a);if(b.buffered){return b.loadToPrefetch(a)}b.read(a)},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)},clearData:function(d){var c=this,a=c.data.items,b=a.length;while(b--){a[b].unjoin(c)}c.data.clear();if(d!==true||c.clearRemovedOnLoad){c.removed=[]}},loadToPrefetch:function(a){var c=this,b=function(){if(c.rangeCached(a.start,a.limit-1)){c.pageMap.un("pageAdded",b);c.guaranteeRange(a.start,(c.viewSize||c.pageSize)-1)}};c.pageMap.on("pageAdded",b);return c.prefetch(a||{})},prefetch:function(c){var d=this,a=d.pageSize,b;if(a){if(d.lastPageSize&&a!=d.lastPageSize){Ext.error.raise("pageSize cannot be dynamically altered")}if(!d.pageMap.pageSize){d.pageMap.pageSize=a}}else{d.pageSize=d.pageMap.pageSize=a=c.limit}d.lastPageSize=a;if(!c.page){c.page=d.getPageFromRecordIndex(c.start);c.start=(c.page-1)*a;c.limit=Math.ceil(c.limit/a)*a}if(!d.pageRequests[c.page]){c=Ext.apply({action:"read",filters:d.filters.items,sorters:d.sorters.items,generation:d.pageMap.generation},c);b=new Ext.data.Operation(c);if(d.fireEvent("beforeprefetch",d,b)!==false){d.loading=true;d.pageRequests[c.page]=d.proxy.read(b,d.onProxyPrefetch,d)}}return d},cancelAllPrefetches:function(){var c=this,a=c.pageRequests,b,d;if(c.pageMap.events.pageadded){c.pageMap.events.pageadded.clearListeners()}for(d in a){if(a.hasOwnProperty(d)){b=a[d];delete a[d];delete b.callback}}},prefetchPage:function(e,b){var d=this,a=d.pageSize||d.defaultPageSize,g=(e-1)*d.pageSize,c=d.totalCount;if(c!==undefined&&d.getCount()===c){return}d.prefetch(Ext.apply({page:e,start:g,limit:a},b))},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),g=b.wasSuccessful(),e=b.page;if(b.generation===d.pageMap.generation){if(c){d.totalCount=c.total;d.fireEvent("totalcountchange",d.totalCount)}if(e!==undefined){delete d.pageRequests[e]}if(g){d.cachePage(a,b.page)}d.loading=false;d.fireEvent("prefetch",d,a,g,b);Ext.callback(b.callback,b.scope||d,[a,b,g])}},cachePage:function(a,c){var b=this;if(!Ext.isDefined(b.totalCount)){b.totalCount=a.length;b.fireEvent("totalcountchange",b.totalCount)}b.pageMap.addPage(c,a)},rangeCached:function(b,a){return this.pageMap&&this.pageMap.hasRange(b,a)},pageCached:function(a){return this.pageMap&&this.pageMap.hasPage(a)},rangeSatisfied:function(b,a){return this.rangeCached(b,a)},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(d){var e=this,b=e.getTotalCount(),g=d.prefetchStart,a=((b-1)<d.prefetchEnd)?b-1:d.prefetchEnd,c;a=Math.max(0,a);c=e.pageMap.getRange(g,a);e.fireEvent("guaranteedrange",c,g,a);if(d.cb){d.cb.call(d.scope||e,c,g,a)}},prefetchRange:function(g,b){var d=this,c,a,e;if(!d.rangeCached(g,b)){c=d.getPageFromRecordIndex(g);a=d.getPageFromRecordIndex(b);d.pageMap.maxSize=d.purgePageCount?(a-c+1)+d.purgePageCount:0;for(e=c;e<=a;e++){if(!d.pageCached(e)){d.prefetchPage(e)}}}},guaranteeRange:function(i,c,a,g){c=(c>this.totalCount)?this.totalCount-1:c;var h=this,e=h.lastRequestStart,d={prefetchStart:i,prefetchEnd:c,cb:a,scope:g},b;h.lastRequestStart=i;if(h.rangeCached(i,c)){if(i<e){i=Math.max(i-h.leadingBufferZone,0);c=Math.min(c+h.trailingBufferZone,h.totalCount-1)}else{i=Math.max(Math.min(i-h.trailingBufferZone,h.totalCount-h.pageSize),0);c=Math.min(c+h.leadingBufferZone,h.totalCount-1)}if(!h.rangeCached(i,c)){h.prefetchRange(i,c)}h.onGuaranteedRange(d)}else{h.fireEvent("cachemiss",h,i,c);i=Math.min(Math.max(Math.floor(i-((h.leadingBufferZone+h.trailingBufferZone)/2)),0),h.totalCount-h.pageSize);c=Math.min(Math.max(Math.ceil(c+((h.leadingBufferZone+h.trailingBufferZone)/2)),0),h.totalCount-1);b=function(k,j){if(h.rangeCached(d.prefetchStart,d.prefetchEnd)){h.fireEvent("cachefilled",h,i,c);h.pageMap.un("pageAdded",b);h.onGuaranteedRange(d)}};h.pageMap.on("pageAdded",b);h.prefetchRange(d.prefetchStart,d.prefetchEnd);h.prefetchRange(i,c)}},sort:function(){var b=this,a=b.pageMap;if(b.buffered){if(b.remoteSort){a.clear();b.callParent(arguments)}else{b.callParent(arguments)}}else{b.callParent(arguments)}},doSort:function(b){var e=this,a,d,c;if(e.remoteSort){if(e.buffered){e.pageMap.clear();e.loadPage(1)}else{e.load()}}else{e.data.sortBy(b);if(!e.buffered){a=e.getRange();d=a.length;c=0;for(;c<d;c++){a[c].index=c}}e.fireEvent("datachanged",e);e.fireEvent("refresh",e)}},find:function(e,d,h,g,a,c){var b=this.createFilterFn(e,d,g,a,c);return b?this.data.findIndexBy(b,null,h):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(g){return c.test(g.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.isEqual(d.get(b),a)},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&&d.snapshot)?d.snapshot:d.data;return e.collect(b,"data",a)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount||0},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return(this.snapshot||this.data).findBy(function(b){return b.getId()===a})},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){var b=a.index;if(b||b===0){return b}return this.indexOf(a)},indexOfId:function(a){return this.indexOf(this.getById(a))},removeAll:function(a){var b=this;b.clearData();if(b.snapshot){b.snapshot.clear()}if(b.pageMap){b.pageMap.clear()}if(a!==true){b.fireEvent("clear",b)}},first:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,g){var d=1,a=b.length,e,c;if(a>0){c=b[0].get(g)}for(;d<a;++d){e=b[d].get(g);if(e<c){c=e}}return c},max:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,g){var d=1,b=c.length,e,a;if(b>0){a=c[0].get(g)}for(;d<b;++d){e=c[d].get(g);if(e>a){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(h,k,e,g){g=g||[];if(e&&this.isGrouped()){var a=this.getGroups(),c=0,d=a.length,b={},j;for(;c<d;++c){j=a[c];b[j.name]=h.apply(k||this,[j.children].concat(g))}return b}else{return h.apply(k||this,[this.data.items].concat(g))}},commitChanges:function(){var c=this,d=c.getModifiedRecords(),a=d.length,b=0;for(;b<a;b++){d[b].commit()}c.removed.length=0},filterNewOnly:function(a){return a.phantom===true},getRejectRecords:function(){var a=this.data.filterBy(this.filterNewOnly).items;return a.concat(this.getUpdatedRecords())},rejectChanges:function(){var c=this,d=c.getRejectRecords(),a=d.length,b=0,e;for(;b<a;b++){e=d[b];e.reject();if(e.phantom){c.remove(e)}}d=c.removed;a=d.length;for(b=0;b<a;b++){e=d[b];c.insert(e.index||0,e);e.reject()}c.removed.length=0}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"memory"});this.prototype.PageMap=new Ext.Class({extend:"Ext.util.LruCache",clear:function(a){this.generation=(this.generation||0)+1;this.callParent(arguments)},getPageFromRecordIndex:this.prototype.getPageFromRecordIndex,addPage:function(b,a){this.add(b,a);this.fireEvent("pageAdded",b,a)},getPage:function(a){return this.get(a)},hasRange:function(d,b){var c=this.getPageFromRecordIndex(d),a=this.getPageFromRecordIndex(b);for(;c<=a;c++){if(!this.hasPage(c)){return false}}return true},hasPage:function(a){return !!this.map[a]},getRange:function(a,b){if(!this.hasRange(a,b)){Ext.Error.raise("PageMap asked for range which it does not have")}var k=this,g=k.getPageFromRecordIndex(a),n=k.getPageFromRecordIndex(b),c=(g-1)*k.pageSize,o=(n*k.pageSize)-1,j=g,p=[],m,h,l,d=0,e;for(;j<=n;j++){if(j==g){m=a-c;l=true}else{m=0;l=false}if(j==n){h=k.pageSize-(o-b);l=true}if(l){Ext.Array.push(p,Ext.Array.slice(k.getPage(j),m,h))}else{Ext.Array.push(p,k.getPage(j))}}for(e=p.length;d<e;d++){p[d].index=a++}return p}})});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",requires:["Ext.data.proxy.Memory","Ext.data.reader.Array"],constructor:function(a){a=Ext.apply({proxy:{type:"memory",reader:"array"}},a);this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b<c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.data.BufferStore",{extend:"Ext.data.Store",alias:"store.buffer",sortOnLoad:false,filterOnLoad:false,constructor:function(){Ext.Error.raise("The BufferStore class has been deprecated. Instead, specify the buffered config option on Ext.data.Store")}});Ext.define("Ext.data.JsonPStore",{extend:"Ext.data.Store",alias:"store.jsonp",requires:["Ext.data.proxy.JsonP","Ext.data.reader.Json"],constructor:function(a){a=Ext.apply({proxy:{type:"jsonp",reader:"json"}},a);this.callParent([a])}});Ext.define("Ext.data.JsonStore",{extend:"Ext.data.Store",alias:"store.json",requires:["Ext.data.proxy.Ajax","Ext.data.reader.Json","Ext.data.writer.Json"],constructor:function(a){a=Ext.apply({proxy:{type:"ajax",reader:"json",writer:"json"}},a);this.callParent([a])}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],node:null,recursive:false,rootVisible:false,constructor:function(a){var c=this,b;a=a||{};Ext.apply(c,a);a.proxy={type:"proxy"};c.callParent([a]);b=c.node;if(b){c.node=null;c.setNode(b)}},setNode:function(b){var a=this;if(a.node&&a.node!=b){a.mun(a.node,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=null}if(b){Ext.data.NodeInterface.decorate(b.self);a.removeAll();if(a.rootVisible){a.add(b)}else{if(!b.isExpanded()&&a.treeStore.autoLoad!==false){b.expand()}}a.mon(b,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=b;if(b.isExpanded()&&b.isLoaded()){a.onNodeExpand(b,b.childNodes,true)}}},onNodeSort:function(b,c){var a=this;if((a.indexOf(b)!==-1||(b===a.node&&!a.rootVisible)&&b.isExpanded())){a.onNodeCollapse(b,c,true);a.onNodeExpand(b,c,true)}},onNodeExpand:function(g,d,c){var j=this,a=j.indexOf(g)+1,h=d?d.length:0,e,b;if(!j.recursive&&g!==j.node){return}if(g!==this.node&&!j.isVisible(g)){return}if(!c&&j.fireEvent("beforeexpand",g,d,a)===false){return}if(h){j.insert(a,d);for(e=0;e<h;e++){b=d[e];if(b.isExpanded()){if(b.isLoaded()){j.onNodeExpand(b,b.childNodes,true)}else{b.set("expanded",false);b.expand()}}}}if(!c){j.fireEvent("expand",g,d)}},onNodeCollapse:function(g,c,b){var j=this,h=c.length,e=j.indexOf(g)+1,d,a;if(!j.recursive&&g!==j.node){return}if(!b&&j.fireEvent("beforecollapse",g,c,e)===false){return}for(d=0;d<h;d++){a=c[d];j.remove(a);if(a.isExpanded()){j.onNodeCollapse(a,a.childNodes,true)}}if(!b){j.fireEvent("collapse",g,c,e)}},onNodeAppend:function(d,g,b){var e=this,a,c;if(e.isVisible(g)){if(b===0){a=d}else{c=g.previousSibling;while(c.isExpanded()&&c.lastChild){c=c.lastChild}a=c}e.insert(e.indexOf(a)+1,g);if(!g.isLeaf()&&g.isExpanded()){if(g.isLoaded()){e.onNodeExpand(g,g.childNodes,true)}else{g.set("expanded",false);g.expand()}}}},onNodeInsert:function(c,e,a){var d=this,b=this.indexOf(a);if(b!=-1&&d.isVisible(e)){d.insert(b,e);if(!e.isLeaf()&&e.isExpanded()){if(e.isLoaded()){d.onNodeExpand(e,e.childNodes,true)}else{e.set("expanded",false);e.expand()}}}},onNodeRemove:function(b,d,a){var c=this;if(c.indexOf(d)!=-1){if(!d.isLeaf()&&d.isExpanded()){c.onNodeCollapse(d,d.childNodes,true)}c.remove(d)}},isVisible:function(b){var a=b.parentNode;while(a){if(a===this.node&&!this.rootVisible&&a.isExpanded()){return true}if(this.indexOf(a)===-1||!a.isExpanded()){return false}a=a.parentNode}return true}});Ext.define("Ext.data.XmlStore",{extend:"Ext.data.Store",alias:"store.xml",requires:["Ext.data.proxy.Ajax","Ext.data.reader.Xml","Ext.data.writer.Xml"],constructor:function(a){a=Ext.apply({proxy:{type:"ajax",reader:"xml",writer:"xml"}},a);this.callParent([a])}});Ext.define("Ext.data.proxy.Rest",{extend:"Ext.data.proxy.Ajax",alternateClassName:"Ext.data.RestProxy",alias:"proxy.rest",appendId:true,batchActions:false,buildUrl:function(g){var e=this,c=g.operation,b=c.records||[],a=b[0],h=e.format,d=e.getUrl(g),i=a?a.getId():c.id;if(e.appendId&&i){if(!d.match(/\/$/)){d+="/"}d+=i}if(h){if(!d.match(/\.$/)){d+="."}d+=h}g.url=d;return e.callParent(arguments)}},function(){Ext.apply(this.prototype,{actionMethods:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"}})});Ext.define("Ext.direct.Manager",{singleton:true,mixins:{observable:"Ext.util.Observable"},requires:["Ext.util.MixedCollection"],statics:{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"}},constructor:function(){var a=this;a.addEvents("event","exception");a.transactions=new Ext.util.MixedCollection();a.providers=new Ext.util.MixedCollection();a.mixins.observable.constructor.call(a)},addProvider:function(e){var d=this,b=arguments,c=0,a;if(b.length>1){for(a=b.length;c<a;++c){d.addProvider(b[c])}return}if(!e.isProvider){e=Ext.create("direct."+e.type+"provider",e)}d.providers.add(e);e.on("data",d.onProviderData,d);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return a.isProvider?a:this.providers.get(a)},removeProvider:function(c){var b=this,a=b.providers;c=c.isProvider?c:a.get(c);if(c){c.un("data",b.onProviderData,b);a.remove(c);return c}return null},addTransaction:function(a){this.transactions.add(a);return a},removeTransaction:function(a){a=this.getTransaction(a);this.transactions.remove(a);return a},getTransaction:function(a){return Ext.isObject(a)?a:this.transactions.get(a)},onProviderData:function(e,d){var c=this,b=0,a;if(Ext.isArray(d)){for(a=d.length;b<a;++b){c.onProviderData(e,d[b])}return}if(d.name&&d.name!="event"&&d.name!="exception"){c.fireEvent(d.name,d)}else{if(d.status===false){c.fireEvent("exception",d)}}c.fireEvent("event",d,e)},parseMethod:function(c){if(Ext.isString(c)){var e=c.split("."),b=0,a=e.length,d=window;while(d&&b<a){d=d[e[b]];++b}c=Ext.isFunction(d)?d:null}return c||null}},function(){Ext.Direct=Ext.direct.Manager});Ext.define("Ext.data.proxy.Direct",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.DirectProxy",alias:"proxy.direct",requires:["Ext.direct.Manager"],paramOrder:undefined,paramsAsHash:true,directFn:undefined,paramOrderRe:/[\s,|]/,constructor:function(b){var e=this,a,d,c;e.callParent(arguments);a=e.paramOrder;if(Ext.isString(a)){e.paramOrder=a.split(e.paramOrderRe)}d=e.directFn;if(d){e.directFn=Ext.direct.Manager.parseMethod(d)}c=e.api;for(d in c){if(c.hasOwnProperty(d)){c[d]=Ext.direct.Manager.parseMethod(c[d])}}},doRequest:function(d,j,k){var h=this,b=h.getWriter(),e=h.buildRequest(d,j,k),i=h.api[e.action]||h.directFn,c=e.params,g=[],a;if(d.allowWrite()){e=b.write(e)}if(d.action=="read"){a=i.directCfg.method;g=a.getArgs(c,h.paramOrder,h.paramsAsHash)}else{g.push(e.jsonData)}Ext.apply(e,{args:g,directFn:i});g.push(h.createRequestCallback(e,d,j,k),h);i.apply(window,g)},applyEncoding:function(a){return a},createRequestCallback:function(d,a,e,b){var c=this;return function(h,g){c.processResponse(g.status,a,d,g,e,b)}},extractResponseData:function(a){return Ext.isDefined(a.result)?a.result:a.data},setException:function(b,a){b.setException(a.message)},buildUrl:function(){return""}});Ext.define("Ext.data.DirectStore",{extend:"Ext.data.Store",alias:"store.direct",requires:["Ext.data.proxy.Direct"],constructor:function(a){a=Ext.apply({},a);if(!a.proxy){var b={type:"direct",reader:{type:"json"}};Ext.copyTo(b,a,"paramOrder,paramsAsHash,directFn,api,simpleSortMode");Ext.copyTo(b.reader,a,"totalProperty,root,idProperty");a.proxy=b}this.callParent([a])}});Ext.define("Ext.direct.Event",{alias:"direct.event",requires:["Ext.direct.Manager"],status:true,constructor:function(a){Ext.apply(this,a)},getData:function(){return this.data}});Ext.define("Ext.direct.RemotingEvent",{extend:"Ext.direct.Event",alias:"direct.rpc",getTransaction:function(){return this.transaction||Ext.direct.Manager.getTransaction(this.tid)}});Ext.define("Ext.direct.ExceptionEvent",{extend:"Ext.direct.RemotingEvent",alias:"direct.exception",status:false});Ext.define("Ext.direct.RemotingProvider",{alias:"direct.remotingprovider",extend:"Ext.direct.JsonProvider",requires:["Ext.util.MixedCollection","Ext.util.DelayedTask","Ext.direct.Transaction","Ext.direct.RemotingMethod"],enableBuffer:10,maxRetries:1,timeout:undefined,constructor:function(a){var b=this;b.callParent(arguments);b.addEvents("beforecall","call");b.namespace=(Ext.isString(b.namespace))?Ext.ns(b.namespace):b.namespace||window;b.transactions=new Ext.util.MixedCollection();b.callBuffer=[]},initAPI:function(){var h=this.actions,e=this.namespace,g,b,c,d,a,j;for(g in h){if(h.hasOwnProperty(g)){b=e[g];if(!b){b=e[g]={}}c=h[g];for(d=0,a=c.length;d<a;++d){j=new Ext.direct.RemotingMethod(c[d]);b[j.name]=this.createHandler(g,j)}}}},createHandler:function(c,d){var b=this,a;if(!d.formHandler){a=function(){b.configureRequest(c,d,Array.prototype.slice.call(arguments,0))}}else{a=function(g,h,e){b.configureFormRequest(c,d,g,h,e)}}a.directCfg={action:c,method:d};return a},isConnected:function(){return !!this.connected},connect:function(){var a=this;if(a.url){a.initAPI();a.connected=true;a.fireEvent("connect",a)}else{if(!a.url){}}},disconnect:function(){var a=this;if(a.connected){a.connected=false;a.fireEvent("disconnect",a)}},runCallback:function(e,b){var d=!!b.status,c=d?"success":"failure",g,a;if(e&&e.callback){g=e.callback;a=Ext.isDefined(b.result)?b.result:b.data;if(Ext.isFunction(g)){g(a,b,d)}else{Ext.callback(g[c],g.scope,[a,b,d]);Ext.callback(g.callback,g.scope,[a,b,d])}}},onData:function(l,j,c){var g=this,d=0,e,k,a,b,h;if(j){k=g.createEvents(c);for(e=k.length;d<e;++d){a=k[d];b=g.getTransaction(a);g.fireEvent("data",g,a);if(b){g.runCallback(b,a,true);Ext.direct.Manager.removeTransaction(b)}}}else{h=[].concat(l.transaction);for(e=h.length;d<e;++d){b=g.getTransaction(h[d]);if(b&&b.retryCount<g.maxRetries){b.retry()}else{a=new Ext.direct.ExceptionEvent({data:null,transaction:b,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:c});g.fireEvent("data",g,a);if(b){g.runCallback(b,a,false);Ext.direct.Manager.removeTransaction(b)}}}}},getTransaction:function(a){return a&&a.tid?Ext.direct.Manager.getTransaction(a.tid):null},configureRequest:function(d,a,g){var h=this,c=a.getCallData(g),e=c.data,i=c.callback,j=c.scope,b;b=new Ext.direct.Transaction({provider:h,args:g,action:d,method:a.name,data:e,callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i});if(h.fireEvent("beforecall",h,b,a)!==false){Ext.direct.Manager.addTransaction(b);h.queueTransaction(b);h.fireEvent("call",h,b,a)}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.id}},sendRequest:function(h){var g=this,e={url:g.url,callback:g.onData,scope:g,transaction:h,timeout:g.timeout},b,d=g.enableUrlEncode,c=0,a,j;if(Ext.isArray(h)){b=[];for(a=h.length;c<a;++c){b.push(g.getCallData(h[c]))}}else{b=g.getCallData(h)}if(d){j={};j[Ext.isString(d)?d:"data"]=Ext.encode(b);e.params=j}else{e.jsonData=b}Ext.Ajax.request(e)},queueTransaction:function(c){var b=this,a=b.enableBuffer;if(c.form){b.sendFormRequest(c);return}b.callBuffer.push(c);if(a){if(!b.callTask){b.callTask=new Ext.util.DelayedTask(b.combineAndSend,b)}b.callTask.delay(Ext.isNumber(a)?a:10)}else{b.combineAndSend()}},combineAndSend:function(){var b=this.callBuffer,a=b.length;if(a>0){this.sendRequest(a==1?b[0]:b);this.callBuffer=[]}},configureFormRequest:function(e,a,b,i,j){var h=this,c=new Ext.direct.Transaction({provider:h,action:e,method:a.name,args:[b,i,j],callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i,isForm:true}),g,d;if(h.fireEvent("beforecall",h,c,a)!==false){Ext.direct.Manager.addTransaction(c);g=String(b.getAttribute("enctype")).toLowerCase()=="multipart/form-data";d={extTID:c.id,extAction:e,extMethod:a.name,extType:"rpc",extUpload:String(g)};Ext.apply(c,{form:Ext.getDom(b),isUpload:g,params:i&&Ext.isObject(i.params)?Ext.apply(d,i.params):d});h.fireEvent("call",h,c,a);h.sendFormRequest(c)}},sendFormRequest:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,transaction:a})}});Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},autoDestroy:false,isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,n,j,k=this.items,g=this.length,h=Infinity,c=h,m=-h,b=h,l=-h,d,a;for(;e<g;e++){n=k[e];if(n.el&&!n.bboxExcluded){j=n.getBBox();c=Math.min(c,j.x);b=Math.min(b,j.y);m=Math.max(m,j.height+j.y);l=Math.max(l,j.width+j.x)}}return{x:c,y:b,height:m-b,width:l-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].setAttributes(c,e)}return this},hide:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].hide(d)}return this},show:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].show(d)}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d<a;d++){b.renderItem(c[d])}}return e},setStyle:function(g){var c=0,b=this.items,a=this.length,e,d;for(;c<a;c++){e=b[c];d=e.el;if(d){d.setStyle(g)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var d=this,a=d.getSurface(),c=d.autoDestroy,b;if(a){while(d.getCount()>0){b=d.first();d.remove(b);a.remove(b,c)}}d.clearListeners()}});Ext.define("Ext.chart.LegendItem",{extend:"Ext.draw.CompositeSprite",requires:["Ext.chart.Shape"],x:0,y:0,zIndex:500,boldRe:/bold\s\d{1,}.*/i,constructor:function(a){this.callParent(arguments);this.createLegend(a)},createLegend:function(s){var t=this,i=s.yFieldIndex,l=t.series,a=l.type,m=t.yFieldIndex,d=t.legend,p=t.surface,q=d.x+t.x,n=d.y+t.y,c,k=t.zIndex,b,j,r,e,o=false,h=Ext.apply(l.seriesStyle,l.style);function g(u){var v=l[u];return(Ext.isArray(v)?v[m]:v)}j=t.add("label",p.add({type:"text",x:20,y:0,zIndex:(k||0)+2,fill:d.labelColor,font:d.labelFont,text:g("title")||g("yField"),style:{cursor:"pointer"}}));if(a==="line"||a==="scatter"){if(a==="line"){t.add("line",p.add({type:"path",path:"M0.5,0.5L16.5,0.5",zIndex:(k||0)+2,"stroke-width":l.lineWidth,"stroke-linejoin":"round","stroke-dasharray":l.dash,stroke:h.stroke||l.getLegendColor(i)||"#000",style:{cursor:"pointer"}}))}if(l.showMarkers||a==="scatter"){b=Ext.apply(l.markerStyle,l.markerConfig||{},{fill:l.getLegendColor(i)});t.add("marker",Ext.chart.Shape[b.type](p,{fill:b.fill,x:8.5,y:0.5,zIndex:(k||0)+2,radius:b.radius||b.size,style:{cursor:"pointer"}}))}}else{t.add("box",p.add({type:"rect",zIndex:(k||0)+2,x:0,y:0,width:12,height:12,fill:l.getLegendColor(i),style:{cursor:"pointer"}}))}t.setAttributes({hidden:false},true);c=t.getBBox();r=t.add("mask",p.add({type:"rect",x:c.x,y:c.y,width:c.width||20,height:c.height||20,zIndex:(k||0)+1,fill:t.legend.boxFill,style:{cursor:"pointer"}}));t.on("mouseover",function(){j.setStyle({"font-weight":"bold"});r.setStyle({cursor:"pointer"});l._index=i;l.highlightItem()},t);t.on("mouseout",function(){j.setStyle({"font-weight":d.labelFont&&t.boldRe.test(d.labelFont)?"bold":"normal"});l._index=i;l.unHighlightItem()},t);if(!l.visibleInLegend(i)){o=true;j.setAttributes({opacity:0.5},true)}t.on("mousedown",function(){if(!o){l.hideAll(i);j.setAttributes({opacity:0.5},true)}else{l.showAll(i);j.setAttributes({opacity:1},true)}o=!o},t);t.updatePosition({x:0,y:0})},updatePosition:function(c){var g=this,a=g.items,e=a.length,b=0,d;if(!c){c=g.legend}for(;b<e;b++){d=a[b];switch(d.type){case"text":d.setAttributes({x:20+c.x+g.x,y:c.y+g.y},true);break;case"rect":d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y-6}},true);break;default:d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y}},true)}}}});Ext.define("Ext.chart.Legend",{requires:["Ext.chart.LegendItem"],visible:true,update:true,position:"bottom",x:0,y:0,labelColor:"#000",labelFont:"12px Helvetica, sans-serif",boxStroke:"#000",boxStrokeWidth:1,boxFill:"#FFF",itemSpacing:10,padding:5,width:0,height:0,boxZIndex:100,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.items=[];b.isVertical=("left|right|float".indexOf(b.position)!==-1);b.origX=b.x;b.origY=b.y},create:function(){var e=this,a=e.chart.series.items,c,d,b;e.createBox();if(e.rebuild!==false){e.createItems()}if(!e.created&&e.isDisplayed()){e.created=true;for(c=0,d=a.length;c<d;c++){b=a[c];b.on("titlechange",function(){e.create();e.updatePosition()})}}},isDisplayed:function(){return this.visible&&this.chart.series.findIndex("showInLegend",true)!==-1},createItems:function(){var H=this,s=H.chart,b=s.series.items,o,q,A=s.surface,u=H.items,r=H.padding,K=H.itemSpacing,m=2,E=0,z=0,h=0,G=0,d=H.isVertical,g=Math,e=g.floor,J=g.max,l=0,C=0,D=u?u.length:0,p,n,k,F,a,t,w,v,c,I,B;if(D){for(;C<D;C++){u[C].destroy()}}u.length=[];for(C=0,o=b.length;C<o;C++){q=b[C];if(q.showInLegend){v=[].concat(q.yField);for(B=0,I=v.length;B<I;B++){c=v[B];F=new Ext.chart.LegendItem({legend:this,series:q,surface:s.surface,yFieldIndex:B});a=F.getBBox();w=a.width;t=a.height;if(C+B===0){k=d?r+t/2:r}else{k=K/(d?2:1)}F.x=e(d?r:h+k);F.y=e(d?G+k:r+t/2);h+=w+k;G+=t+k;E=J(E,w);z=J(z,t);u.push(F)}}}H.width=e((d?E:h)+r*2);if(d&&u.length===1){m=1}H.height=e((d?G-m*k:z)+(r*2));H.itemHeight=z},getBBox:function(){var a=this;return{x:Math.round(a.x)-a.boxStrokeWidth/2,y:Math.round(a.y)-a.boxStrokeWidth/2,width:a.width,height:a.height}},createBox:function(){var b=this,a,c;if(b.boxSprite){b.boxSprite.destroy()}c=b.getBBox();if(isNaN(c.width)||isNaN(c.height)){b.boxSprite=false;return}a=b.boxSprite=b.chart.surface.add(Ext.apply({type:"rect",stroke:b.boxStroke,"stroke-width":b.boxStrokeWidth,fill:b.boxFill,zIndex:b.boxZIndex},c));a.redraw()},updatePosition:function(){var u=this,p=u.items,r,j,l,h,n=u.width||0,c=u.height||0,m=u.padding,o=u.chart,k=o.chartBBox,s=o.insetPadding,t=k.width-(s*2),d=k.height-(s*2),g=k.x+s,e=k.y+s,q=o.surface,b=Math.floor,a;if(u.isDisplayed()){switch(u.position){case"left":l=s;h=b(e+d/2-c/2);break;case"right":l=b(q.width-n)-s;h=b(e+d/2-c/2);break;case"top":l=b(g+t/2-n/2);h=s;break;case"bottom":l=b(g+t/2-n/2);h=b(q.height-c)-s;break;default:l=b(u.origX)+s;h=b(u.origY)+s}u.x=l;u.y=h;for(r=0,j=p.length;r<j;r++){p[r].updatePosition()}a=u.getBBox();if(isNaN(a.width)||isNaN(a.height)){if(u.boxSprite){u.boxSprite.hide(true)}}else{if(!u.boxSprite){u.createBox()}u.boxSprite.setAttributes(a,true);u.boxSprite.show(true)}}},toggle:function(b){var e=this,d=0,c=e.items,a=c.length;if(e.boxSprite){if(b){e.boxSprite.show(true)}else{e.boxSprite.hide(true)}}for(;d<a;++d){if(b){c[d].show(true)}else{c[d].hide(true)}}e.visible=b}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml","Ext.draw.engine.SvgExporter","Ext.draw.engine.ImageExporter"],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||["Svg","Vml"];var c=0,a=d.length,e;for(;c<a;c++){if(Ext.supports[d[c]]!==false){return Ext.create("Ext.draw.engine."+d[c],b)}}return false},save:function(b,a){var d={"image/png":"Image","image/jpeg":"Image","image/svg+xml":"Svg"},c=d[b.type]||"Svg";return(Ext.draw.engine[c+"Exporter"]).self.generate(b,a)}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"none","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click","dblclick");b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){if(this.hasOwnProperty("gradients")){var a=this.gradients,d=a.length,b=this.addGradient,c;if(a){for(c=0;c<d;c++){if(b.call(this,a[c],c,d)===false){break}}}}},initItems:function(){var a=this.items;this.items=new Ext.draw.CompositeSprite();this.items.autoDestroy=true;this.groups=new Ext.draw.CompositeSprite();if(a){this.add(a)}},initBackground:function(b){var e=this,d=e.width,a=e.height,g,h,c;if(Ext.isString(b)){b={fill:b}}if(b){if(b.gradient){h=b.gradient;g=h.id;e.addGradient(h);e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:"url(#"+g+")",zIndex:-1})}else{if(b.fill){e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:b.fill,zIndex:-1})}else{if(b.image){e.background=e.add({type:"image",x:0,y:0,width:d,height:a,src:b.image,zIndex:-1})}}}e.background.bboxExcluded=true}},setSize:function(a,b){this.applyViewBox()},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&&!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent("click",a)},onDblClick:function(a){this.processEvent("dblclick",a)},onMouseUp:function(a){this.processEvent("mouseup",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onMouseOver:function(a){this.processEvent("mouseover",a)},onMouseOut:function(a){this.processEvent("mouseout",a)},onMouseMove:function(a){this.fireEvent("mousemove",a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var g=Array.prototype.slice.call(arguments),j,d,a=g.length>1,h,b,c,e,k;if(a||Ext.isArray(g[0])){h=a?g:g[0];b=[];for(c=0,e=h.length;c<e;c++){k=h[c];k=this.add(k);b.push(k)}return b}j=this.prepareItems(g[0],true)[0];this.insertByZIndex(j);this.onAdd(j);return j},insertByZIndex:function(j){var g=this,d=g.items.items,c=d.length,k=Math.ceil,h=j.attr.zIndex,i=c,b=i-1,e=0,a;if(g.orderSpritesByZIndex&&c&&h<d[b].attr.zIndex){while(e<=b){i=k((e+b)/2);a=d[i].attr.zIndex;if(a>h){b=i-1}else{if(a<h){e=i+1}else{break}}}while(i<c&&d[i].attr.zIndex<=h){i++}}g.items.insert(i,j);return i},onAdd:function(d){var g=d.group,b=d.draggable,a,e,c;if(g){a=[].concat(g);e=a.length;for(c=0;c<e;c++){g=a[c];this.getGroup(g).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(b,e){if(b){this.items.remove(b);var a=[].concat(this.groups.items),d=a.length,c;for(c=0;c<d;c++){a[c].remove(b)}b.onRemove();if(e===true){b.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b>-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,l=d.viewBox,a=d.width||1,h=d.height||1,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;k=Math.min(c,i);if(j*k<a){g-=(a-j*k)/2/k}if(b*k<h){e-=(h-b*k)/2/k}d.viewBoxShift={dx:-g,dy:-e,scale:k};if(d.background){d.background.setAttributes(Ext.apply({},{x:g,y:e,width:a/k,height:h/k},{hidden:false}),true)}}else{if(d.background&&a&&h){d.background.setAttributes(Ext.apply({x:0,y:0,width:a,height:h},{hidden:false}),true)}}},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}if(a.dirtyTransform){this.applyTransformations(a,true)}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},transformToViewBox:function(a,d){if(this.viewBoxShift){var c=this,b=c.viewBoxShift;return[a/b.scale-b.dx,d/b.scale-b.dy]}else{return[a,d]}},applyTransformations:function(b,d){if(b.type=="text"){b.bbox.transform=0;this.transform(b,false)}b.dirtyTransform=false;var c=this,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){c.translate(b)}if(a.scaling.x!=null||a.scaling.y!=null){c.scale(b)}if(a.rotation.degrees!=null){c.rotate(b)}b.bbox.transform=0;this.transform(b,d);b.transformations=[]},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a,true);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:"rotate",degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:"translate",x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,g=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b,true);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:"scale",x:a,y:g,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[["M",a+d,e],["l",b-d*2,0],["a",d,d,0,0,1,d,d],["l",0,c-d*2],["a",d,d,0,0,1,-d,d],["l",d*2-b,0],["a",d,d,0,0,1,-d,-d],["l",0,d*2-c],["a",d,d,0,0,1,d,-d],["z"]]}return[["M",a,e],["l",b,0],["l",0,c],["l",-b,0],["z"]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[["M",a,d],["m",0,-b],["a",c,b,0,1,1,0,2*b],["a",c,b,0,1,1,0,-2*b],["z"]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX||(b.width/2)||0,b.radiusY||(b.height/2)||0)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width||0,b.height||0,b.r||0)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=new Ext.draw.CompositeSprite({surface:this});a.id=b||Ext.id(null,"ext-surface-group-");this.groups.add(a)}return a},getGroup:function(b){var a;if(typeof b=="string"){a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b<d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){var a=this;delete a.domRef;if(a.background){a.background.destroy()}a.removeAll(true);Ext.destroy(a.groups.items)}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.ElementCSS","Ext.fx.target.CompositeElement","Ext.fx.target.CompositeElementCSS","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=new Ext.util.MixedCollection();this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&&Ext.supports.Transitions,a;b.useCSS3=c;if(d){if(d.tagName||Ext.isString(d)||d.isFly){d=Ext.get(d);a=new Ext.fx.target["Element"+(c?"CSS":"")](d)}else{if(d.dom){a=new Ext.fx.target["Element"+(c?"CSS":"")](d)}else{if(d.isComposite){a=new Ext.fx.target["CompositeElement"+(c?"CSS":"")](d)}else{if(d.isSprite){a=new Ext.fx.target.Sprite(d)}else{if(d.isCompositeSprite){a=new Ext.fx.target.CompositeSprite(d)}else{if(d.isComponent){a=new Ext.fx.target.Component(d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(c){var b=this.items,a=this.task;b.add(c.id,c);if(!a&&b.length){a=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(a)}},removeAnim:function(d){var c=this,b=c.items,a=c.task;b.removeAtKey(d.id);if(a&&!b.length){Ext.TaskManager.stop(a);delete c.task}},runner:function(){var d=this,b=d.items.getRange(),c=0,a=b.length,e;d.targetArr={};d.timestamp=new Date();for(;c<a;c++){e=b[c];if(e.isReady()){d.startAnim(e)}}for(c=0;c<a;c++){e=b[c];if(e.isRunning()){d.runAnim(e)}}d.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(e){if(!e){return}var d=this,b=e.target.getId(),h=d.useCSS3&&e.target.type=="element",a=d.timestamp-e.startTime,c=(a>=e.duration),g,i;g=this.collectTargetData(e,a,h,c);if(h){e.target.setAttr(g.anims[e.id].attributes,true);d.collectTargetData(e,e.duration,h,c);e.paused=true;g=e.target.target;if(e.target.isComposite){g=e.target.target.last()}i={};i[Ext.supports.CSS3TransitionEnd]=e.lastFrame;i.scope=e;i.single=true;g.on(i)}},collectTargetData:function(c,a,e,g){var b=c.target.getId(),d=this.targetArr[b];if(!d){d=this.targetArr[b]={id:b,el:c.target,anims:{}}}d.anims[c.id]={id:c.id,anim:c,elapsed:a,isLastFrame:g,attributes:[{duration:c.duration,easing:(e&&c.reverse)?c.easingFn.reverse().toCSS3():c.easing,attrs:c.runAnim(a)}]};return d},applyPendingAttrs:function(){var e=this.targetArr,g,c,b,d,a;for(c in e){if(e.hasOwnProperty(c)){g=e[c];for(a in g.anims){if(g.anims.hasOwnProperty(a)){b=g.anims[a];d=b.anim;if(b.attributes&&d.isRunning()){g.el.setAttr(b.attributes,false,b.isLastFrame);if(b.isLastFrame){d.lastFrame()}}}}}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(g){var k=this,n=[],l=k.to||{},c=k.duration,o,a,e,j,m,b,d,h;for(m in g){if(g.hasOwnProperty(m)&&k.animKeyFramesRE.test(m)){h={attrs:Ext.apply(g[m],l)};if(m=="from"){m=0}else{if(m=="to"){m=100}}h.pct=parseInt(m,10);n.push(h)}}Ext.Array.sort(n,k.sorter);j=n.length;for(e=0;e<j;e++){o=(n[e-1])?c*(n[e-1].pct/100):0;a=c*(n[e].pct/100);k.timeline.push({duration:a-o,attrs:n[e].attrs})}},applyAnimator:function(e){var k=this,l=[],o=k.timeline,g=k.reverse,j=o.length,b,h,a,d,n,m,c;if(k.fireEvent("beforeanimate",k)!==false){for(c=0;c<j;c++){b=o[c];n=b.attrs;h=n.easing||k.easing;a=n.damper||k.damper;delete n.easing;delete n.damper;b=new Ext.fx.Anim({target:e,easing:h,damper:a,duration:b.duration,paused:true,to:n});l.push(b)}k.animations=l;k.target=b.target;for(c=0;c<j-1;c++){b=l[c];b.nextAnim=l[c+1];b.on("afteranimate",function(){this.nextAnim.paused=false});b.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},k)}l[j-1].on("afteranimate",function(){this.lastFrame()},k)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent("afteranimate",a,a.startTime,new Date()-a.startTime)},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return false}});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,frameCount:0,constructor:function(a){var b=this,c;a=a||{};if(a.keyframes){return new Ext.fx.Animator(a)}Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&&b.easingFn.length==5){c=b.easingFn;b.easingFn=Ext.fx.CubicBezier.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,"ext-anim-");b.addEvents("beforeanimate","afteranimate","lastframe");b.mixins.observable.constructor.call(b);Ext.fx.Manager.addAnim(b)},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,h=e.from,i=e.to,g=e.initialFrom||{},c={},a,b,j,d;for(d in i){if(i.hasOwnProperty(d)){a=e.target.getAttr(d,h[d]);b=i[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){j=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=j.get(a,b,e.damper,g[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;if(!e.paused&&!e.currentAttrs){e.initAttrs()}e.running=true;e.frameCount=0}},runAnim:function(l){var i=this,k=i.currentAttrs,d=i.duration,c=i.easingFn,b=i.propHandlers,g={},h,j,e,a;if(l>=d){l=d;a=true}if(i.reverse){l=d-l}for(e in k){if(k.hasOwnProperty(e)){j=k[e];h=a?1:c(l/d);g[e]=b[e].set(j,h)}}i.frameCount++;return g},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent("lastframe",c,c.startTime)}},endWasCalled:0,end:function(){if(this.endWasCalled++){return}var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent("afteranimate",a,a.startTime);Ext.callback(a.callback,a.scope,[a,a.startTime])},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return this.paused===false&&this.running===true&&this.isAnimator!==true}});Ext.enableFx=true;Ext.define("Ext.chart.Highlight",{requires:["Ext.fx.Anim"],highlight:false,highlightCfg:{fill:"#fdd","stroke-width":5,stroke:"#f55"},constructor:function(a){if(a.highlight){if(a.highlight!==true){this.highlightCfg=Ext.merge(this.highlightCfg,a.highlight)}}},highlightItem:function(k){if(!k){return}var g=this,j=k.sprite,a=Ext.merge({},g.highlightCfg,g.highlight),d=g.chart.surface,c=g.chart.animate,b,i,h,e;if(!g.highlight||!j||j._highlighted){return}if(j._anim){j._anim.paused=true}j._highlighted=true;if(!j._defaults){j._defaults=Ext.apply({},j.attr);i={};h={};for(b in a){if(!(b in j._defaults)){j._defaults[b]=d.availableAttrs[b]}i[b]=j._defaults[b];h[b]=a[b];if(Ext.isObject(a[b])){i[b]={};h[b]={};Ext.apply(j._defaults[b],j.attr[b]);Ext.apply(i[b],j._defaults[b]);for(e in j._defaults[b]){if(!(e in a[b])){h[b][e]=i[b][e]}else{h[b][e]=a[b][e]}}for(e in a[b]){if(!(e in h[b])){h[b][e]=a[b][e]}}}}j._from=i;j._to=h;j._endStyle=h}if(c){j._anim=new Ext.fx.Anim({target:j,from:j._from,to:j._to,duration:150})}else{j.setAttributes(j._to,true)}},unHighlightItem:function(){if(!this.highlight||!this.items){return}var j=this,h=j.items,g=h.length,a=Ext.merge({},j.highlightCfg,j.highlight),c=j.chart.animate,e=0,d,b,k;for(;e<g;e++){if(!h[e]){continue}k=h[e].sprite;if(k&&k._highlighted){if(k._anim){k._anim.paused=true}d={};for(b in a){if(Ext.isObject(k._defaults[b])){d[b]={};Ext.apply(d[b],k._defaults[b])}else{d[b]=k._defaults[b]}}if(c){k._endStyle=d;k._anim=new Ext.fx.Anim({target:k,to:d,duration:150})}else{k.setAttributes(d,true)}delete k._highlighted}}},cleanHighlights:function(){if(!this.highlight){return}var d=this.group,c=this.markerGroup,b=0,a;for(a=d.getCount();b<a;b++){delete d.getAt(b)._defaults}if(c){for(a=c.getCount();b<a;b++){delete c.getAt(b)._defaults}}}});Ext.define("Ext.layout.Context",{requires:["Ext.util.Queue","Ext.layout.ContextItem","Ext.layout.Layout","Ext.fx.Anim","Ext.fx.Manager"],currentOwnerCtContext:null,remainingLayouts:0,state:0,constructor:function(a){var b=this;Ext.apply(b,a);b.items={};b.layouts={};b.blockCount=0;b.cycleCount=0;b.flushCount=0;b.calcCount=0;b.animateQueue=b.newQueue();b.completionQueue=b.newQueue();b.finalizeQueue=b.newQueue();b.finishQueue=b.newQueue();b.flushQueue=b.newQueue();b.invalidateData={};b.layoutQueue=b.newQueue();b.invalidQueue=[];b.triggers={data:{},dom:{}}},callLayout:function(b,a){this.currentLayout=b;var c=this.getCmp(b.owner);b[a](c)},cancelComponent:function(h,a){var n=this,g=h,j=!h.isComponent,b=j?g.length:1,d,c,m,l,e,q,o,p,r;for(d=0;d<b;++d){if(j){h=g[d]}if(!a){o=n.invalidQueue;m=o.length;if(m){n.invalidQueue=q=[];for(c=0;c<m;++c){p=o[c];r=p.item.target;if(r!=h&&!r.isDescendant(h)){q.push(p)}}}}e=h.componentLayout;n.cancelLayout(e);if(e.getLayoutItems){l=e.getLayoutItems();if(l.length){n.cancelComponent(l,true)}}if(h.isContainer&&!h.collapsed){e=h.layout;n.cancelLayout(e);l=e.getVisibleItems();if(l.length){n.cancelComponent(l,true)}}}},cancelLayout:function(b){var a=this;a.completionQueue.remove(b);a.finalizeQueue.remove(b);a.finishQueue.remove(b);a.layoutQueue.remove(b);if(b.running){a.layoutDone(b)}b.ownerContext=null},clearTriggers:function(g,h){var a=g.id,j=this.triggers[h?"dom":"data"][a],b=(j&&j.length)||0,e,d,k,c;for(d=0;d<b;++d){c=j[d];k=c.item;e=h?k.domTriggers:k.triggers;delete e[c.prop][a]}},finishInvalidate:function(b,e,a){if(b[a]){var d=this,c=d.currentLayout;d.currentLayout=b.layout||null;b[a](e,b);d.currentLayout=c}},flush:function(){var d=this,a=d.flushQueue.clear(),c=a.length,b;if(c){++d.flushCount;for(b=0;b<c;++b){a[b].flush()}}},flushAnimations:function(){var d=this,b=d.animateQueue.clear(),a=b.length,c;if(a){for(c=0;c<a;c++){if(b[c].target.animate!==false){b[c].flushAnimations()}}Ext.fx.Manager.runner()}},flushInvalidates:function(){var h=this,a=h.invalidQueue,g=a&&a.length,b,e,d,c;h.invalidQueue=[];if(g){e=[];for(c=0;c<g;++c){b=(d=a[c]).item.target;if(!b.container.isDetachedBody){e.push(b);if(d.options){h.invalidateData[b.id]=d.options}}}h.invalidate(e,null)}},flushLayouts:function(h,a,c){var g=this,j=c?g[h].items:g[h].clear(),e=j.length,b,d;if(e){for(b=0;b<e;++b){d=j[b];if(!d.running){g.callLayout(d,a)}}g.currentLayout=null}},getCmp:function(a){return this.getItem(a,a.el)},getEl:function(b,a){var c=this.getItem(a,a);if(!c.parent){c.parent=b;if(b.children.length){b.children.push(c)}else{b.children=[c]}}return c},getItem:function(d,b){var e=b.id,a=this.items,c=a[e]||(a[e]=new Ext.layout.ContextItem({context:this,target:d,el:b,ownerCtContext:this.currentOwnerCtContext}));return c},handleFailure:function(){var c=this.layouts,b,a;Ext.failedLayouts=(Ext.failedLayouts||0)+1;for(a in c){b=c[a];if(c.hasOwnProperty(a)){b.running=false;b.ownerContext=null}}},invalidate:function(o,q,m){var z=this,n=!o.isComponent,a=z.items,b=z.state>0,r=z.currentOwnerCtContext,h,v,e,u,l,t,s,y,x,p,g,d,w,c,j;z.currentOwnerCtContext=q;for(t=0,g=n?o.length:1;t<g;++t){y=n?o[t]:o;if(y.rendered&&!y.hidden){l=!y.componentLayout.ownerContext;x=z.getCmp(y);if(l){if(y.beforeLayout){y.beforeLayout()}if(b&&!q&&(u=y.ownerCt)){q=a[u.el.id]}x.init(q)}h=v=e=true;d=y.componentLayout;d.ownerContext=x;if(d.getLayoutItems){d.renderChildren();p=d.getLayoutItems();if(p.length){z.invalidate(p,x,true);h=false}}if(y.isContainer&&!y.collapsed){w=y.layout;w.ownerContext=x;w.renderChildren();e=false;p=w.getVisibleItems();if(p.length){z.invalidate(p,x,true);v=false}}else{w=null}if(l){x.hasRawContent=true;if(x.target.isContainer){if(x.target.items.items.length||!x.target.getTargetEl().dom.firstChild){x.hasRawContent=false}}}else{x.doInvalidate(m);p=x.children;for(s=p.length;s--;){p[s].doInvalidate(true)}}c=x.props;if(h){c.componentChildrenDone=true;if(v){c.childrenDone=true}}if(v){c.containerChildrenDone=true}if(e){c.containerLayoutDone=true}j=z.invalidateData[x.id];if(j){delete z.invalidateData[x.id];if(j.state){Ext.apply(x.state,j.state)}z.finishInvalidate(j,x,"before")}z.resetLayout(d,x,l);if(w){z.resetLayout(w,x,l)}if(j){z.finishInvalidate(j,x,"after")}if(x.boxChildren&&x.widthModel.shrinkWrap){x.el.setWidth(10000);x.state.blocks=(x.state.blocks||0)+1}if(l){x.initAnimatePolicy()}}}z.currentOwnerCtContext=r},layoutDone:function(b){var c=b.ownerContext,a;b.running=false;if(b.isComponentLayout){if(c.measuresBox){c.onBoxMeasured()}c.setProp("done",true);a=c.ownerCtContext;if(a){if(c.target.ownerLayout.isComponentLayout){if(!--a.remainingComponentChildLayouts){a.setProp("componentChildrenDone",true)}}else{if(!--a.remainingContainerChildLayouts){a.setProp("containerChildrenDone",true)}}if(!--a.remainingChildLayouts){a.setProp("childrenDone",true)}}}else{c.setProp("containerLayoutDone",true)}--this.remainingLayouts;++this.progressCount},newQueue:function(){return new Ext.util.Queue()},queueAnimation:function(a){this.animateQueue.add(a)},queueCompletion:function(a){this.completionQueue.add(a)},queueFinalize:function(a){this.finalizeQueue.add(a)},queueFlush:function(a){this.flushQueue.add(a)},chainFns:function(a,e,c){var b=a[c],d=e[c];return function(g){if(b){b.call(a.scope||a,g,a)}d.call(e.scope||e,g,e)}},queueInvalidate:function(k,l){var h=this,j=[],i=h.invalidQueue,g=i.length,d,b,e,a,c;if(k.isComponent){k=h.getCmp(d=k)}else{d=k.target}while(g--){b=i[g];e=b.item.target;if(d.isDescendant(e)){return}if(e==d){if(!(a=b.options)){b.options=l}else{if(l){if(!(c=a.state)){a.state=l.state}else{if(l.state){Ext.apply(c,l.state)}}if(l.before){a.before=h.chainFns(a,l,"before")}if(l.after){a.after=h.chainFns(a,l,"after")}}}return}if(!e.isDescendant(d)){j.push(b)}}j.push({item:k,options:l});h.invalidQueue=j},queueItemLayouts:function(c){var a=c.isComponent?c:c.target,b=a.componentLayout;if(!b.pending&&!b.invalid&&!b.done){this.queueLayout(b)}b=a.layout;if(b&&!b.pending&&!b.invalid&&!b.done){this.queueLayout(b)}},queueLayout:function(a){this.layoutQueue.add(a);a.pending=true},resetLayout:function(c,d,e){var b=this,a;b.currentLayout=c;c.done=false;c.pending=true;c.firedTriggers=0;b.layoutQueue.add(c);if(e){b.layouts[c.id]=c;c.running=true;if(c.finishedLayout){b.finishQueue.add(c)}++b.remainingLayouts;++c.layoutCount;c.beginCount=0;c.blockCount=0;c.calcCount=0;c.triggerCount=0;if(c.isComponentLayout&&(a=d.ownerCtContext)){if(d.target.ownerLayout.isComponentLayout){++a.remainingComponentChildLayouts}else{++a.remainingContainerChildLayouts}++a.remainingChildLayouts}if(!c.initialized){c.initLayout()}c.beginLayout(d)}else{++c.beginCount;if(!c.running){++b.remainingLayouts;c.running=true;if(c.isComponentLayout){d.unsetProp("done");a=d.ownerCtContext;if(a){if(d.target.ownerLayout.isComponentLayout){if(++a.remainingComponentChildLayouts==1){a.unsetProp("componentChildrenDone")}}else{if(++a.remainingContainerChildLayouts==1){a.unsetProp("containerChildrenDone")}}if(++a.remainingChildLayouts==1){a.unsetProp("childrenDone")}}}b.completionQueue.remove(c);b.finalizeQueue.remove(c)}}c.beginLayoutCycle(d,e)},run:function(){var c=this,b=false,a=100;c.flushInvalidates();c.state=1;c.totalCount=c.layoutQueue.getCount();c.flush();while((c.remainingLayouts||c.invalidQueue.length)&&a--){if(c.invalidQueue.length){c.flushInvalidates()}if(c.runCycle()){b=false}else{if(!b){c.flush();b=true;c.flushLayouts("completionQueue","completeLayout")}else{c.state=2;break}}if(!(c.remainingLayouts||c.invalidQueue.length)){c.flush();c.flushLayouts("completionQueue","completeLayout");c.flushLayouts("finalizeQueue","finalizeLayout")}}return c.runComplete()},runComplete:function(){var a=this;a.state=2;if(a.remainingLayouts){a.handleFailure();return false}a.flush();a.flushLayouts("finishQueue","finishedLayout",true);a.flushLayouts("finishQueue","notifyOwner");a.flush();a.flushAnimations();return true},runCycle:function(){var c=this,d=c.layoutQueue.clear(),b=d.length,a;++c.cycleCount;c.progressCount=0;for(a=0;a<b;++a){c.runLayout(c.currentLayout=d[a])}c.currentLayout=null;return c.progressCount>0},runLayout:function(b){var a=this,c=a.getCmp(b.owner);b.pending=false;if(c.state.blocks){return}b.done=true;++b.calcCount;++a.calcCount;b.calculate(c);if(b.done){a.layoutDone(b);if(b.completeLayout){a.queueCompletion(b)}if(b.finalizeLayout){a.queueFinalize(b)}}else{if(!b.pending&&!b.invalid&&!(b.blockCount+b.triggerCount-b.firedTriggers)){a.queueLayout(b)}}},setItemSize:function(h,g,b){var d=h,a=1,c,e;if(h.isComposite){d=h.elements;a=d.length;h=d[0]}else{if(!h.dom&&!h.el){a=d.length;h=d[0]}}for(e=0;e<a;){c=this.get(h);c.setSize(g,b);h=d[++e]}}});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],mixins:{bindable:"Ext.util.Bindable"},allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange","focuschange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=new Ext.util.MixedCollection();b.callParent(arguments)},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var a=this;return{add:a.onStoreAdd,clear:a.onStoreClear,remove:a.onStoreRemove,update:a.onStoreUpdate}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doSelect(d[c],true,b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},deselectAll:function(b){var e=this,d=e.getSelection(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doDeselect(d[c],b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},selectWithEvent:function(a,d,c){var b=this;switch(b.selectionMode){case"MULTI":if(d.ctrlKey&&b.isSelected(a)){b.doDeselect(a,false)}else{if(d.shiftKey&&b.lastFocused){b.selectRange(b.lastFocused,a,d.ctrlKey)}else{if(d.ctrlKey){b.doSelect(a,true,false)}else{if(b.isSelected(a)&&!d.shiftKey&&!d.ctrlKey&&b.selected.getCount()>1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(l,e,m,c){var j=this,k=j.store,d=0,h,g,a,b=[];if(j.isLocked()){return}if(!m){j.deselectAll(true)}if(!Ext.isNumber(l)){l=k.indexOf(l)}if(!Ext.isNumber(e)){e=k.indexOf(e)}if(l>e){g=e;e=l;l=g}for(h=l;h<=e;h++){if(j.isSelected(k.getAt(h))){d++}}if(!c){a=-1}else{a=(c=="up")?l:e}for(h=l;h<=e;h++){if(d==(e-l+1)){if(h!=a){j.doDeselect(h,true)}}else{b.push(k.getAt(h))}}j.doMultiSelect(b,true)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked||!d.store){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,l,k){var h=this,b=h.selected,j=false,d=0,g,e;if(h.locked){return}a=!Ext.isArray(a)?[a]:a;g=a.length;if(!l&&b.getCount()>0){if(h.doDeselect(h.getSelection(),k)===false){return}}function c(){b.add(e);j=true}for(;d<g;d++){e=a[d];if(l&&h.isSelected(e)){continue}h.lastSelected=e;h.onSelectChange(e,true,k,c)}if(!h.preventFocus){h.setLastFocused(e,k)}h.maybeFireSelectionChange(j&&!k)},doDeselect:function(a,k){var j=this,b=j.selected,d=0,h,e,l=0,g=0;if(j.locked||!j.store){return false}if(typeof a==="number"){a=[j.store.getAt(a)]}else{if(!Ext.isArray(a)){a=[a]}}function c(){++g;b.remove(e)}h=a.length;for(;d<h;d++){e=a[d];if(j.isSelected(e)){if(j.lastSelected==e){j.lastSelected=b.last()}++l;j.onSelectChange(e,false,k,c)}}j.maybeFireSelectionChange(g>0&&!k);return g===l},doSingleSelect:function(a,b){var d=this,g=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;g=true}d.onSelectChange(a,true,b,e);if(g){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;if(c!==a){d.onLastFocusChanged(a,c,b)}},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var h=this,b=[],g=h.getSelection(),a=g.length,e,j,d=0,c=this.getLastFocused();for(;d<a;d++){e=g[d];if(!this.pruneRemoved||h.store.indexOf(e)!==-1){b.push(e)}}if(h.selected.getCount()!=b.length){j=true}h.clearSelections();if(h.store.indexOf(c)!==-1){this.setLastFocused(c,true)}if(b.length){h.doSelect(b,false,true)}h.maybeFireSelectionChange(j)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){if(this.selected.getCount>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a,c){var e=this,d=e.selected;if(e.locked||!e.pruneRemoved){return}if(d.remove(a)){if(e.lastSelected==a){e.lastSelected=null}if(e.getLastFocused()==a){e.setLastFocused(null)}e.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(a,c,b){},onLastFocusChanged:function(b,a){this.fireEvent("focuschange",this,b,a)},onEditorKey:function(b,a){},bindComponent:function(a){}});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bindStore(a.getStore());c[a.triggerEvent]=b.onItemClick;c[a.triggerCtEvent]=b.onContainerClick;a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,g){this.selectWithEvent(a,g)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on({render:Ext.Function.bind(b.initKeyNav,b,[a]),single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(g){g=g||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+g}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,h){var g=this,a=g.view,c=e?"select":"deselect";if((d||g.fireEvent("before"+c,g,b))!==false&&h()!==false){if(a){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}}if(!d){g.fireEvent(c,g,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",hideParent:false,bubbleEvents:[],actionMode:"el",monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);a.listeners=null}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var a=this;a.callParent();if(!(a.x&&a.y)&&(a.pageX||a.pageY)){a.setPagePosition(a.pageX,a.pageY)}},setAutoScroll:function(a){var b=this;b.autoScroll=!!a;if(b.rendered){b.getTargetEl().setStyle(b.getOverflowStyle())}b.updateLayout();return b},setOverflowXY:function(b,a){var c=this,d=arguments.length;if(d){c.overflowX=b||"";if(d>1){c.overflowY=a||""}}if(c.rendered){c.getTargetEl().setStyle(c.getOverflowStyle())}c.updateLayout();return c},beforeRender:function(){var b=this,c=b.floating,a;if(c){b.addCls(Ext.baseCSSPrefix+"layer");a=c.cls;if(a){b.addCls(a)}}return b.callParent()},afterComponentLayout:function(){this.callParent(arguments);if(this.floating){this.onAfterFloatLayout()}},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},wrapPrimaryEl:function(a){if(this.floating){this.makeFloating(a)}else{this.callParent(arguments)}},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():null),handles:b.resizeHandles},a);a.target=b;b.resizer=new Ext.resizer.Resizer(a)},getDragEl:function(){return this.el},initDraggable:function(){var c=this,a=(c.resizer&&c.resizer.el!==c.el)?c.resizerComponent=new Ext.Component({el:c.resizer.el,rendered:true,container:c.container}):c,b=Ext.applyIf({el:a.getDragEl(),constrainTo:c.constrain?(c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():c.el.getScopeParent())):undefined},c.draggable);if(c.constrain||c.constrainDelegate){b.constrain=c.constrain;b.constrainDelegate=c.constrainDelegate}c.dd=new Ext.util.ComponentDragger(a,b)},scrollBy:function(b,a,c){var d;if((d=this.getTargetEl())&&d.dom){d.scrollBy.apply(d,arguments)}},setLoading:function(c,d){var b=this,a;if(b.rendered){Ext.destroy(b.loadMask);b.loadMask=null;if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=Ext.apply({},c)}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}if(d){Ext.applyIf(a,{useTargetEl:true})}b.loadMask=new Ext.LoadMask(b,a);b.loadMask.show()}}return b.loadMask},beforeSetPosition:function(){var b=this,c=b.callParent(arguments),a;if(c){a=b.adjustPosition(c.x,c.y);c.x=a.x;c.y=a.y}return c||null},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender()}if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,g,b){var c=this,d,e;if(Ext.isArray(a)){g=a[1];a=a[0]}c.pageX=a;c.pageY=g;if(c.floating){if(c.isContainedFloater()){e=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(e.left)){a-=e.left}if(Ext.isNumber(g)&&Ext.isNumber(e.top)){g-=e.top}}else{d=c.el.translatePoints(a,g);a=d.left;g=d.top}c.setPosition(a,g,b)}else{d=c.el.translatePoints(a,g);c.setPosition(d.left,d.top,b)}return c},isContainedFloater:function(){return(this.floating&&this.floatParent)},getBox:function(b){var c=b?this.getPosition(b):this.el.getXY(),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,d){var b=this,c;if(b.isContainedFloater()){c=b.floatParent.getTargetEl().getViewRegion();a+=c.left;d+=c.top}return{x:a,y:d}},getPosition:function(a){var c=this,b=c.el,e,d=c.isContainedFloater(),g;if((a===true)||!d){return[b.getLeft(true),b.getTop(true)]}if(c.x!==undefined&&c.y!==undefined){e=[c.x,c.y]}else{e=c.el.getXY();if(d){g=c.floatParent.getTargetEl().getViewRegion();e[0]-=g.left;e[1]-=g.top}}return e},getId:function(){var a=this,b;if(!a.id){b=a.getXType();if(b){b=b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{b=Ext.name.toLowerCase()+"-comp"}a.id=b+"-"+a.getAutoId()}return a.id},show:function(d,a,b){var c=this,e=c.rendered;if(e&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;if(!e&&(c.autoRender||c.floating)){c.doAutoRender();e=c.rendered}if(e){c.beforeShow();c.onShow.apply(c,arguments);c.afterShow.apply(c,arguments)}}}return c},beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating&&a.constrain){a.doConstrain()}},afterShow:function(h,b,e){var g=this,a,c,d;h=h||g.animateTarget;if(!g.ghost){h=null}if(h){h=h.el?h.el:Ext.get(h);c=g.el.getBox();a=h.getBox();g.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=g.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();g.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront();c.onFloatShow()}Ext.callback(a,b||c);c.fireEvent("show",c);delete c.hiddenByLayout},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&&!a.isVisible())&&a.fireEvent("beforehide",a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments)}}return a},onHide:function(g,a,d){var e=this,c,b;g=g||e.animateTarget;if(!e.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=e.ghost();c.el.stopAnimation();b=g.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!g){e.afterHide(a,d)}},afterHide:function(a,b){var c=this;delete c.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(this);Ext.callback(a,b||c);c.fireEvent("hide",c)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer,a.resizerComponent);if(a.actionMode=="container"||a.removeMode=="container"){a.container.remove()}}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c<a;++c){delete this[b[c]]}},focus:function(d,b){var c=this,a,e;if(c.rendered&&!c.isDestroyed&&c.isVisible(true)&&(a=c.getFocusEl())){if(a.isComponent){return a.focus(d,b)}if(b){if(!c.focusTask){c.focusTask=new Ext.util.DelayedTask(c.focus)}c.focusTask.delay(Ext.isNumber(b)?b:10,null,c,[d,false]);return c}if((e=a.dom)){if(a.needsTabIndex()){e.tabIndex=-1}a.focus();if(d===true){e.select()}}if(c.floating){c.toFront(true)}}return c},cancelFocus:function(){var a=this.focusTask;if(a){a.cancel()}},blur:function(){var a;if(this.rendered&&(a=this.getFocusEl())){a.blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt||this.floatParent},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id(),a=Ext.applyIf(c,this.initialConfig),b;a.id=d;b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.getBubbleTarget();b&&!a(b,this);b=b.getBubbleTarget()){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.getBubbleTarget()}return this},getProxy:function(){var a=this,b;if(!a.proxy){b=Ext.getBody();if(Ext.scopeResetCSS){a.proxyWrap=b=Ext.getBody().createChild({cls:Ext.resetCls})}a.proxy=a.el.createProxy(Ext.baseCSSPrefix+"proxy-el",b,true)}return a.proxy}});Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event","Ext.Component"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var a=this;Ext.override(Ext.Component,{fireEvent:function(b){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return a.dispatch.call(a,b,this,arguments)}return false}})},dispatch:function(l,g,k){var h=this.bus,m=h[l],d,c,b,n,a,e,j;if(m){for(d in m){if(m.hasOwnProperty(d)&&g.is(d)){c=m[d];for(b in c){if(c.hasOwnProperty(b)){n=c[b];for(e=0,j=n.length;e<j;e++){a=n[e];if(a.fire.apply(a,Array.prototype.slice.call(k,1))===false){return false}}}}}}}return true},control:function(l,j,e){var h=this.bus,i,o,g,d,n,c,m,a,b,k;if(Ext.isString(l)){d=l;l={};l[d]=j;this.control(l,null,e);return}i=Ext.util.Observable.HasListeners.prototype;for(d in l){if(l.hasOwnProperty(d)){b=l[d]||{};for(k in b){if(b.hasOwnProperty(k)){n={};c=b[k];m=e;a=new Ext.util.Event(e,k);if(Ext.isObject(c)){n=c;c=n.fn;m=n.scope||e;delete n.fn;delete n.scope}a.addListener(c,m,n);i[k]=1;o=h[k]||(h[k]={});o=o[d]||(o[d]={});g=o[e.id]||(o[e.id]=[]);g.push(a)}}}}}});Ext.define("Ext.chart.MaskLayer",{extend:"Ext.Component",constructor:function(a){a=Ext.apply(a||{},{style:"position:absolute;background-color:#888;cursor:move;opacity:0.6;border:1px solid #222;"});this.callParent([a])},initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave")},initDraggable:function(){this.callParent(arguments);this.dd.onStart=function(c){var b=this,a=b.comp;this.startPosition=a.getPosition(true);if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}}}});Ext.define("Ext.chart.Mask",{requires:["Ext.chart.MaskLayer"],constructor:function(a){var c=this,b;c.addEvents("select");if(a){Ext.apply(c,a)}if(c.enableMask){c.on("afterrender",function(){var d=new Ext.chart.MaskLayer({renderTo:c.el,hidden:true});d.el.on({mousemove:function(g){c.onMouseMove(g)},mouseup:function(g){c.resized(g)}});b=new Ext.resizer.Resizer({el:d.el,handles:"all",pinned:true});b.on({resize:function(g){c.resized(g)}});d.initDraggable();c.maskType=c.mask;c.mask=d;c.maskSprite=c.surface.add({type:"path",path:["M",0,0],zIndex:1001,opacity:0.7,hidden:true,stroke:"#444"})},c,{single:true})}},resized:function(d){var g=this,l=g.bbox||g.chartBBox,j=l.x,i=l.y,a=l.width,m=l.height,c=g.mask.getBox(true),h=Math.max,b=Math.min,n=c.x-j,k=c.y-i;n=h(n,j);k=h(k,i);n=b(n,a);k=b(k,m);c.x=n;c.y=k;g.fireEvent("select",g,c)},onMouseUp:function(c){var a=this,d=a.bbox||a.chartBBox,b=a.maskSelection;a.maskMouseDown=false;a.mouseDown=false;if(a.mouseMoved){a.onMouseMove(c);a.mouseMoved=false;a.fireEvent("select",a,{x:b.x-d.x,y:b.y-d.y,width:b.width,height:b.height})}},onMouseDown:function(b){var a=this;a.mouseDown=true;a.mouseMoved=false;a.maskMouseDown={x:b.getPageX()-a.el.getX(),y:b.getPageY()-a.el.getY()}},onMouseMove:function(t){var u=this,o=u.maskType,a=u.bbox||u.chartBBox,i=a.x,h=a.y,b=Math,q=b.floor,j=b.abs,n=b.min,p=b.max,k=q(h+a.height),m=q(i+a.width),d=t.getPageX(),c=t.getPageY(),s=d-u.el.getX(),r=c-u.el.getY(),g=u.maskMouseDown,l;u.mouseMoved=u.mouseDown;s=p(s,i);r=p(r,h);s=n(s,m);r=n(r,k);if(g&&u.mouseDown){if(o=="horizontal"){r=h;g.y=k;c=u.el.getY()+a.height+u.insetPadding}else{if(o=="vertical"){s=i;g.x=m}}m=g.x-s;k=g.y-r;l=["M",s,r,"l",m,0,0,k,-m,0,"z"];u.maskSelection={x:m>0?s:s+m,y:k>0?r:r+k,width:j(m),height:j(k)};u.mask.updateBox(u.maskSelection);u.mask.show();u.maskSprite.setAttributes({hidden:true},true)}else{if(o=="horizontal"){l=["M",s,h,"L",s,k]}else{if(o=="vertical"){l=["M",i,r,"L",m,r]}else{l=["M",s,h,"L",s,k,"M",i,r,"L",m,r]}}u.maskSprite.setAttributes({path:l,fill:u.maskMouseDown?u.maskSprite.stroke:false,"stroke-width":o===true?1:3,hidden:false},true)}},onMouseLeave:function(b){var a=this;a.mouseMoved=false;a.mouseDown=false;a.maskMouseDown=false;a.mask.hide();a.maskSprite.hide(true)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,shrinkWrap:3,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click","dblclick")},onRender:function(){var d=this,j=d.viewBox,b=d.autoSize,h,c,a,i,g,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(j||b){h=c.getBBox();a=h.width;i=h.height;g=h.x;e=h.y;if(d.viewBox){d.surface.setViewBox(g,e,a,i)}else{d.autoSizeSurface()}}}},autoSizeSurface:function(){var a=this.surface.items.getBBox();this.setSurfaceSize(a.width,a.height)},setSurfaceSize:function(b,a){this.surface.setSize(b,a);if(this.autoSize){var c=this.surface.items.getBBox();this.surface.setViewBox(c.x,c.y-(+Ext.isOpera),b,a)}},createSurface:function(){var d=this,b=Ext.applyIf({renderTo:d.el,height:d.height,width:d.width,items:d.items},d.initialConfig),a;delete b.listeners;a=Ext.draw.Surface.create(b);if(!a){return false}d.surface=a;function c(e){return function(g){d.fireEvent(e,g)}}a.on({scope:d,mouseup:c("mouseup"),mousedown:c("mousedown"),mousemove:c("mousemove"),mouseenter:c("mouseenter"),mouseleave:c("mouseleave"),click:c("click"),dblclick:c("dblclick")})},onDestroy:function(){Ext.destroy(this.surface);this.callParent(arguments)}});Ext.define("Ext.chart.Chart",{alias:"widget.chart",extend:"Ext.draw.Component",mixins:{themeManager:"Ext.chart.theme.Theme",mask:"Ext.chart.Mask",navigation:"Ext.chart.Navigation",bindable:"Ext.util.Bindable"},uses:["Ext.chart.series.Series"],requires:["Ext.util.MixedCollection","Ext.data.StoreManager","Ext.chart.Legend","Ext.chart.theme.Base","Ext.chart.theme.Theme","Ext.util.DelayedTask"],viewBox:false,animate:false,legend:false,insetPadding:10,enginePriority:["Svg","Vml"],background:false,constructor:function(b){var c=this,a;b=Ext.apply({},b);c.initTheme(b.theme||c.theme);if(c.gradients){Ext.apply(b,{gradients:c.gradients})}if(c.background){Ext.apply(b,{background:c.background})}if(b.animate){a={easing:"ease",duration:500};if(Ext.isObject(b.animate)){b.animate=Ext.applyIf(b.animate,a)}else{b.animate=a}}if(b.enableMask){c.mixins.mask.constructor.call(c,b)}c.mixins.navigation.constructor.call(c,b);c.callParent([b])},getChartStore:function(){return this.substore||this.store},initComponent:function(){var b=this,c,a;b.callParent();b.addEvents("itemmousedown","itemmouseup","itemmouseover","itemmouseout","itemclick","itemdblclick","itemdragstart","itemdrag","itemdragend","beforerefresh","refresh");Ext.applyIf(b,{zoom:{width:1,height:1,x:0,y:0}});b.maxGutter=[0,0];b.store=Ext.data.StoreManager.lookup(b.store);c=b.axes;b.axes=new Ext.util.MixedCollection(false,function(d){return d.position});if(c){b.axes.addAll(c)}a=b.series;b.series=new Ext.util.MixedCollection(false,function(d){return d.seriesId||(d.seriesId=Ext.id(null,"ext-chart-series-"))});if(a){b.series.addAll(a)}if(b.legend!==false){b.legend=new Ext.chart.Legend(Ext.applyIf({chart:b},b.legend))}b.on({mousemove:b.onMouseMove,mouseleave:b.onMouseLeave,mousedown:b.onMouseDown,mouseup:b.onMouseUp,click:b.onClick,dblclick:b.onDblClick,scope:b})},afterComponentLayout:function(b,a){var c=this;if(Ext.isNumber(b)&&Ext.isNumber(a)){c.curWidth=b;c.curHeight=a;c.redraw(true)}this.callParent(arguments)},redraw:function(b){var h=this,g=h.series.items,d=g.length,a=h.axes.items,c=a.length,e,k=h.chartBBox={x:0,y:0,height:h.curHeight,width:h.curWidth},j=h.legend;h.surface.setSize(k.width,k.height);for(e=0;e<d;e++){h.initializeSeries(g[e],e)}for(e=0;e<c;e++){h.initializeAxis(a[e])}for(e=0;e<c;e++){a[e].processView()}for(e=0;e<c;e++){a[e].drawAxis(true)}if(j!==false&&j.visible){if(j.update||!j.created){j.create()}}h.alignAxes();if(j!==false&&j.visible){j.updatePosition()}h.getMaxGutter();h.resizing=!!b;for(e=0;e<c;e++){a[e].drawAxis()}for(e=0;e<d;e++){h.drawCharts(g[e])}h.resizing=false},afterRender:function(){var b,a=this;this.callParent();if(a.categoryNames){a.setCategoryNames(a.categoryNames)}if(a.tipRenderer){b=a.getFunctionRef(a.tipRenderer);a.setTipRenderer(b.fn,b.scope)}a.bindStore(a.store,true);a.refresh()},getEventXY:function(d){var c=this,b=this.surface.getRegion(),h=d.getXY(),a=h[0]-b.left,g=h[1]-b.top;return[a,g]},onClick:function(a){this.handleClick("itemclick",a)},onDblClick:function(a){this.handleClick("itemdblclick",a)},handleClick:function(a,h){var k=this,g=k.getEventXY(h),d=k.series.items,b,j,c,l;for(b=0,j=d.length;b<j;b++){c=d[b];if(Ext.draw.Draw.withinBox(g[0],g[1],c.bbox)){if(c.getItemForPoint){l=c.getItemForPoint(g[0],g[1]);if(l){c.fireEvent(a,l)}}}}},onMouseDown:function(k){var j=this,a=j.getEventXY(k),b=j.series.items,d,h,c,g;if(j.enableMask){j.mixins.mask.onMouseDown.call(j,k)}for(d=0,h=b.length;d<h;d++){c=b[d];if(Ext.draw.Draw.withinBox(a[0],a[1],c.bbox)){if(c.getItemForPoint){g=c.getItemForPoint(a[0],a[1]);if(g){c.fireEvent("itemmousedown",g)}}}}},onMouseUp:function(k){var j=this,a=j.getEventXY(k),b=j.series.items,d,h,c,g;if(j.enableMask){j.mixins.mask.onMouseUp.call(j,k)}for(d=0,h=b.length;d<h;d++){c=b[d];if(Ext.draw.Draw.withinBox(a[0],a[1],c.bbox)){if(c.getItemForPoint){g=c.getItemForPoint(a[0],a[1]);if(g){c.fireEvent("itemmouseup",g)}}}}},onMouseMove:function(h){var k=this,d=k.getEventXY(h),c=k.series.items,a,j,b,n,l,g,m;if(k.enableMask){k.mixins.mask.onMouseMove.call(k,h)}for(a=0,j=c.length;a<j;a++){b=c[a];if(Ext.draw.Draw.withinBox(d[0],d[1],b.bbox)){if(b.getItemForPoint){n=b.getItemForPoint(d[0],d[1]);l=b._lastItemForPoint;g=b._lastStoreItem;m=b._lastStoreField;if(n!==l||n&&(n.storeItem!=g||n.storeField!=m)){if(l){b.fireEvent("itemmouseout",l);delete b._lastItemForPoint;delete b._lastStoreField;delete b._lastStoreItem}if(n){b.fireEvent("itemmouseover",n);b._lastItemForPoint=n;b._lastStoreItem=n.storeItem;b._lastStoreField=n.storeField}}}}else{l=b._lastItemForPoint;if(l){b.fireEvent("itemmouseout",l);delete b._lastItemForPoint;delete b._lastStoreField;delete b._lastStoreItem}}}},onMouseLeave:function(h){var g=this,a=g.series.items,c,d,b;if(g.enableMask){g.mixins.mask.onMouseLeave.call(g,h)}for(c=0,d=a.length;c<d;c++){b=a[c];delete b._lastItemForPoint}},delayRefresh:function(){var a=this;if(!a.refreshTask){a.refreshTask=new Ext.util.DelayedTask(a.refresh,a)}a.refreshTask.delay(a.refreshBuffer)},refresh:function(){var a=this;if(a.rendered&&a.curWidth!==undefined&&a.curHeight!==undefined){if(a.fireEvent("beforerefresh",a)!==false){a.redraw();a.fireEvent("refresh",a)}}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var b=this.refresh,a=this.delayRefresh;return{refresh:b,add:a,remove:a,update:a,clear:b}},initializeAxis:function(b){var e=this,k=e.chartBBox,j=k.width,d=k.height,i=k.x,g=k.y,c=e.themeAttrs,a={chart:e};if(c){a.axisStyle=Ext.apply({},c.axis);a.axisLabelLeftStyle=Ext.apply({},c.axisLabelLeft);a.axisLabelRightStyle=Ext.apply({},c.axisLabelRight);a.axisLabelTopStyle=Ext.apply({},c.axisLabelTop);a.axisLabelBottomStyle=Ext.apply({},c.axisLabelBottom);a.axisTitleLeftStyle=Ext.apply({},c.axisTitleLeft);a.axisTitleRightStyle=Ext.apply({},c.axisTitleRight);a.axisTitleTopStyle=Ext.apply({},c.axisTitleTop);a.axisTitleBottomStyle=Ext.apply({},c.axisTitleBottom)}switch(b.position){case"top":Ext.apply(a,{length:j,width:d,x:i,y:g});break;case"bottom":Ext.apply(a,{length:j,width:d,x:i,y:d});break;case"left":Ext.apply(a,{length:d,width:j,x:i,y:d});break;case"right":Ext.apply(a,{length:d,width:j,x:j,y:d});break}if(!b.chart){Ext.apply(a,b);b=e.axes.replace(Ext.createByAlias("axis."+b.type.toLowerCase(),a))}else{Ext.apply(b,a)}},alignAxes:function(){var l=this,k=l.axes,a=k.items,e,p=l.legend,g=["top","right","bottom","left"],b,h,j,r,o=l.insetPadding,d={top:o,right:o,bottom:o,left:o},n,q,m;function c(t){var s=k.findIndex("position",t);return(s<0)?null:k.getAt(s)}for(h=0,j=g.length;h<j;h++){b=g[h];n=(b==="left"||b==="right");e=c(b);if(p!==false){if(p.position===b){q=p.getBBox();d[b]+=(n?q.width:q.height)+d[b]}}if(e&&e.bbox){q=e.bbox;d[b]+=(n?q.width:q.height)}}r={x:d.left,y:d.top,width:l.curWidth-d.left-d.right,height:l.curHeight-d.top-d.bottom};l.chartBBox=r;for(h=0,j=a.length;h<j;h++){e=a[h];m=e.position;n=(m==="left"||m==="right");e.x=(m==="right"?r.x+r.width:r.x);e.y=(m==="top"?r.y:r.y+r.height);e.width=(n?r.width:r.height);e.length=(n?r.height:r.width)}},initializeSeries:function(h,k){var j=this,d=j.themeAttrs,c,e,n,p,o,m=[],g=0,b,a={chart:j,seriesId:h.seriesId};if(d){n=d.seriesThemes;o=d.markerThemes;c=Ext.apply({},d.series);e=Ext.apply({},d.marker);a.seriesStyle=Ext.apply(c,n[k%n.length]);a.seriesLabelStyle=Ext.apply({},d.seriesLabel);a.markerStyle=Ext.apply(e,o[k%o.length]);if(d.colors){a.colorArrayStyle=d.colors}else{m=[];for(b=n.length;g<b;g++){p=n[g];if(p.fill||p.stroke){m.push(p.fill||p.stroke)}}if(m.length){a.colorArrayStyle=m}}a.seriesIdx=k}if(h instanceof Ext.chart.series.Series){Ext.apply(h,a)}else{Ext.applyIf(a,h);h=j.series.replace(Ext.createByAlias("series."+h.type.toLowerCase(),a))}if(h.initialize){h.initialize()}},getMaxGutter:function(){var g=this,a=g.series.items,d,e,c,b=[0,0],h;for(d=0,e=a.length;d<e;d++){c=a[d];h=c.getGutters&&c.getGutters()||[0,0];b[0]=Math.max(b[0],h[0]);b[1]=Math.max(b[1],h[1])}g.maxGutter=b},drawAxis:function(a){a.drawAxis()},drawCharts:function(a){a.triggerafterrender=false;a.drawSeries();if(!this.animate){a.fireEvent("afterrender")}},save:function(a){return Ext.draw.Surface.save(a,this.surface)},destroy:function(){Ext.destroy(this.surface);this.bindStore(null);this.callParent(arguments)}});Ext.define("Ext.chart.TipSurface",{extend:"Ext.draw.Component",spriteArray:false,renderFirst:true,constructor:function(a){this.callParent([a]);if(a.sprites){this.spriteArray=[].concat(a.sprites);delete a.sprites}},onRender:function(){var c=this,b=0,a=0,d,e;this.callParent(arguments);e=c.spriteArray;if(c.renderFirst&&e){c.renderFirst=false;for(a=e.length;b<a;b++){d=c.surface.add(e[b]);d.setAttributes({hidden:false},true)}}}});Ext.define("Ext.chart.axis.Abstract",{requires:["Ext.chart.Chart"],constructor:function(a){a=a||{};var b=this,c=a.position||"left";c=c.charAt(0).toUpperCase()+c.substring(1);a.label=Ext.apply(a["axisLabel"+c+"Style"]||{},a.label||{});a.axisTitleStyle=Ext.apply(a["axisTitle"+c+"Style"]||{},a.labelTitle||{});Ext.apply(b,a);b.fields=Ext.Array.from(b.fields);this.callParent();b.labels=[];b.getId();b.labelGroup=b.chart.surface.getGroup(b.axisId+"-labels")},alignment:null,grid:false,steps:10,x:0,y:0,minValue:0,maxValue:0,getId:function(){return this.axisId||(this.axisId=Ext.id(null,"ext-axis-"))},processView:Ext.emptyFn,drawAxis:Ext.emptyFn,addDisplayAndLabels:Ext.emptyFn});Ext.define("Ext.chart.axis.Axis",{extend:"Ext.chart.axis.Abstract",alternateClassName:"Ext.chart.Axis",requires:["Ext.draw.Draw"],forceMinMax:false,dashSize:3,position:"bottom",skipFirst:false,length:0,width:0,adjustEnd:true,majorTickSteps:false,applyData:Ext.emptyFn,getRange:function(){var C=this,p=C.chart,l=p.getChartStore(),E=l.data.items,o=p.series.items,D=C.position,q,a=Ext.chart.series,v=[],u=Infinity,y=-Infinity,c=C.position==="left"||C.position==="right",z,n,d,x,w,m=E.length,g,B={},t={},A=true,r,h,e,b,s;r=C.fields;for(x=0,n=r.length;x<n;x++){t[r[x]]=true}for(z=0,n=o.length;z<n;z++){if(o[z].seriesIsHidden){continue}if(!o[z].getAxesForXAndYFields){continue}q=o[z].getAxesForXAndYFields();if(q.xAxis&&q.xAxis!==D&&q.yAxis&&q.yAxis!==D){continue}if(a.Bar&&o[z] instanceof a.Bar&&!o[z].column){r=c?Ext.Array.from(o[z].xField):Ext.Array.from(o[z].yField)}else{r=c?Ext.Array.from(o[z].yField):Ext.Array.from(o[z].xField)}if(C.fields.length){for(x=0,d=r.length;x<d;x++){if(t[r[x]]){break}}if(x==d){continue}}if(g=o[z].stacked){if(a.Bar&&o[z] instanceof a.Bar){if(o[z].column!=c){g=false;A=false}}else{if(!c){g=false;A=false}}}if(g){h={};for(x=0;x<r.length;x++){if(A&&o[z].__excludes&&o[z].__excludes[x]){continue}if(!t[r[x]]){Ext.Logger.warn("Field `"+r[x]+"` is not included in the "+D+" axis config.")}t[r[x]]=h[r[x]]=true}v.push({fields:h,value:0})}else{if(!r||r.length==0){r=C.fields}for(x=0;x<r.length;x++){if(A&&o[z].__excludes&&o[z].__excludes[x]){continue}t[r[x]]=B[r[x]]=true}}}for(z=0;z<m;z++){e=E[z];for(w=0;w<v.length;w++){v[w].value=0}for(b in t){s=e.get(b);if(isNaN(s)){continue}if(s===undefined){s=0}if(B[b]){if(u>s){u=s}if(y<s){y=s}}for(w=0;w<v.length;w++){if(v[w].fields[b]){v[w].value+=s;if(u>0){u=0}if(y<v[w].value){y=v[w].value}}}}}if(!isFinite(y)){y=C.prevMax||0}if(!isFinite(u)){u=C.prevMin||0}if(u!=y&&(y!=Math.floor(y))){y=Math.floor(y)+1}if(!isNaN(C.minimum)){u=C.minimum}if(!isNaN(C.maximum)){y=C.maximum}return{min:u,max:y}},calcEnds:function(){var i=this,b=i.fields,c=i.getRange(),h=c.min,a=c.max,e,g,d;d=Ext.draw.Draw.snapEnds(h,a,i.majorTickSteps!==false?(i.majorTickSteps+1):i.steps,(i.majorTickSteps===false));e=d.from;g=d.to;if(i.forceMinMax){if(!isNaN(a)){d.to=a}if(!isNaN(h)){d.from=h}}if(!isNaN(i.maximum)){d.to=i.maximum}if(!isNaN(i.minimum)){d.from=i.minimum}d.step=(d.to-d.from)/(g-e)*d.step;if(i.adjustMaximumByMajorUnit){d.to=Math.ceil(d.to/d.step)*d.step;d.steps=(d.to-d.from)/d.step}if(i.adjustMinimumByMajorUnit){d.from=Math.floor(d.from/d.step)*d.step;d.steps=(d.to-d.from)/d.step}i.prevMin=h==a?0:h;i.prevMax=a;return d},drawAxis:function(u){var F=this,v,t,k=F.x,h=F.y,D=F.chart.maxGutter[0],C=F.chart.maxGutter[1],e=F.dashSize,B=F.minorTickSteps||0,A=F.minorTickSteps||0,b=F.length,G=F.position,g=[],n=false,c=F.applyData(),d=c.step,w=c.steps,s=c.from,a=c.to,z,r,q,p,o,m,l,E;if(F.hidden||isNaN(d)||(s>a)){return}F.from=c.from;F.to=c.to;if(G=="left"||G=="right"){r=Math.floor(k)+0.5;p=["M",r,h,"l",0,-b];z=b-(C*2)}else{q=Math.floor(h)+0.5;p=["M",k,q,"l",b,0];z=b-(D*2)}E=w&&z/w;m=Math.max(B+1,0);l=Math.max(A+1,0);if(F.type=="Numeric"||F.type=="Time"){n=true;F.labels=[c.from]}if(G=="right"||G=="left"){q=h-C;r=k-((G=="left")*e*2);while(q>=h-C-z){p.push("M",r,Math.floor(q)+0.5,"l",e*2+1,0);if(q!=h-C){for(v=1;v<l;v++){p.push("M",r+e,Math.floor(q+E*v/l)+0.5,"l",e+1,0)}}g.push([Math.floor(k),Math.floor(q)]);q-=E;if(n){F.labels.push(F.labels[F.labels.length-1]+d)}if(E===0){break}}if(Math.round(q+E-(h-C-z))){p.push("M",r,Math.floor(h-b+C)+0.5,"l",e*2+1,0);for(v=1;v<l;v++){p.push("M",r+e,Math.floor(h-b+C+E*v/l)+0.5,"l",e+1,0)}g.push([Math.floor(k),Math.floor(q)]);if(n){F.labels.push(F.labels[F.labels.length-1]+d)}}}else{r=k+D;q=h-((G=="top")*e*2);while(r<=k+D+z){p.push("M",Math.floor(r)+0.5,q,"l",0,e*2+1);if(r!=k+D){for(v=1;v<m;v++){p.push("M",Math.floor(r-E*v/m)+0.5,q,"l",0,e+1)}}g.push([Math.floor(r),Math.floor(h)]);r+=E;if(n){F.labels.push(F.labels[F.labels.length-1]+d)}if(E===0){break}}if(Math.round(r-E-(k+D+z))){p.push("M",Math.floor(k+b-D)+0.5,q,"l",0,e*2+1);for(v=1;v<m;v++){p.push("M",Math.floor(k+b-D-E*v/m)+0.5,q,"l",0,e+1)}g.push([Math.floor(r),Math.floor(h)]);if(n){F.labels.push(F.labels[F.labels.length-1]+d)}}}if(n){F.labels[g.length-1]=+(F.labels[g.length-1]).toFixed(10)}if(!F.axis){F.axis=F.chart.surface.add(Ext.apply({type:"path",path:p},F.axisStyle))}F.axis.setAttributes({path:p},true);F.inflections=g;if(!u&&F.grid){F.drawGrid()}F.axisBBox=F.axis.getBBox();F.drawLabel()},drawGrid:function(){var u=this,o=u.chart.surface,b=u.grid,d=b.odd,e=b.even,h=u.inflections,k=h.length-((d||e)?0:1),v=u.position,c=u.chart.maxGutter,n=u.width-2,s=false,p,q,r=1,m=[],g,a,j,l=[],t=[];if((c[1]!==0&&(v=="left"||v=="right"))||(c[0]!==0&&(v=="top"||v=="bottom"))){r=0;k++}for(;r<k;r++){p=h[r];q=h[r-1];if(d||e){m=(r%2)?l:t;g=((r%2)?d:e)||{};a=(g.lineWidth||g["stroke-width"]||0)/2;j=2*a;if(v=="left"){m.push("M",q[0]+1+a,q[1]+0.5-a,"L",q[0]+1+n-a,q[1]+0.5-a,"L",p[0]+1+n-a,p[1]+0.5+a,"L",p[0]+1+a,p[1]+0.5+a,"Z")}else{if(v=="right"){m.push("M",q[0]-a,q[1]+0.5-a,"L",q[0]-n+a,q[1]+0.5-a,"L",p[0]-n+a,p[1]+0.5+a,"L",p[0]-a,p[1]+0.5+a,"Z")}else{if(v=="top"){m.push("M",q[0]+0.5+a,q[1]+1+a,"L",q[0]+0.5+a,q[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+a,"Z")}else{m.push("M",q[0]+0.5+a,q[1]-a,"L",q[0]+0.5+a,q[1]-n+a,"L",p[0]+0.5-a,p[1]-n+a,"L",p[0]+0.5-a,p[1]-a,"Z")}}}}else{if(v=="left"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",n,0])}else{if(v=="right"){m=m.concat(["M",p[0]-0.5,p[1]+0.5,"l",-n,0])}else{if(v=="top"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",0,n])}else{m=m.concat(["M",p[0]+0.5,p[1]-0.5,"l",0,-n])}}}}}if(d||e){if(l.length){if(!u.gridOdd&&l.length){u.gridOdd=o.add({type:"path",path:l})}u.gridOdd.setAttributes(Ext.apply({path:l,hidden:false},d||{}),true)}if(t.length){if(!u.gridEven){u.gridEven=o.add({type:"path",path:t})}u.gridEven.setAttributes(Ext.apply({path:t,hidden:false},e||{}),true)}}else{if(m.length){if(!u.gridLines){u.gridLines=u.chart.surface.add({type:"path",path:m,"stroke-width":u.lineWidth||1,stroke:u.gridColor||"#ccc"})}u.gridLines.setAttributes({hidden:false,path:m},true)}else{if(u.gridLines){u.gridLines.hide(true)}}}},getOrCreateLabel:function(c,g){var d=this,b=d.labelGroup,e=b.getAt(c),a=d.chart.surface;if(e){if(g!=e.attr.text){e.setAttributes(Ext.apply({text:g},d.label),true);e._bbox=e.getBBox()}}else{e=a.add(Ext.apply({group:b,type:"text",x:0,y:0,text:g},d.label));a.renderItem(e);e._bbox=e.getBBox()}if(d.label.rotation){e.setAttributes({rotation:{degrees:0}},true);e._ubbox=e.getBBox();e.setAttributes(d.label,true)}else{e._ubbox=e._bbox}return e},rect2pointArray:function(l){var b=this.chart.surface,g=b.getBBox(l,true),m=[g.x,g.y],d=m.slice(),k=[g.x+g.width,g.y],a=k.slice(),j=[g.x+g.width,g.y+g.height],e=j.slice(),i=[g.x,g.y+g.height],c=i.slice(),h=l.matrix;m[0]=h.x.apply(h,d);m[1]=h.y.apply(h,d);k[0]=h.x.apply(h,a);k[1]=h.y.apply(h,a);j[0]=h.x.apply(h,e);j[1]=h.y.apply(h,e);i[0]=h.x.apply(h,c);i[1]=h.y.apply(h,c);return[m,k,j,i]},intersect:function(c,a){var d=this.rect2pointArray(c),b=this.rect2pointArray(a);return !!Ext.draw.Draw.intersect(d,b).length},drawHorizontalLabels:function(){var K=this,e=K.label,E=Math.floor,C=Math.max,D=K.chart.axes,j=K.chart.insetPadding,L=K.position,n=K.inflections,s=n.length,J=K.labels,v=K.labelGroup,w=0,k,G=K.chart.maxGutter[1],g,c,A,h,r,b,F=0,I=K.adjustEnd,a=D.findIndex("position","left")!=-1,q=D.findIndex("position","right")!=-1,H,z,m,u,l,p,t,o,B,d;p=s-1;A=n[0];d=K.getOrCreateLabel(0,K.label.renderer(J[0]));k=Math.floor(Math.abs(Math.sin(e.rotate&&(e.rotate.degrees*Math.PI/180)||0)));for(B=0;B<s;B++){A=n[B];u=K.label.renderer(J[B]);H=K.getOrCreateLabel(B,u);c=H._bbox;w=C(w,c.height+K.dashSize+K.label.padding);t=E(A[0]-(k?c.height:c.width)/2);if(I&&K.chart.maxGutter[0]==0){if(B==0&&!a){t=A[0]}else{if(B==p&&!q){t=Math.min(t,A[0]-c.width+j)}}}if(L=="top"){o=A[1]-(K.dashSize*2)-K.label.padding-(c.height/2)}else{o=A[1]+(K.dashSize*2)+K.label.padding+(c.height/2)}H.setAttributes({hidden:false,x:t,y:o},true);if(B!=0&&(K.intersect(H,r)||K.intersect(H,d))){if(B===p&&b!==0){r.hide(true)}else{H.hide(true);continue}}r=H;b=B}return w},drawVerticalLabels:function(){var H=this,j=H.inflections,I=H.position,m=j.length,r=H.chart,e=r.insetPadding,G=H.labels,A=0,v=Math.max,z=Math.floor,c=Math.ceil,w=H.chart.axes,D=H.chart.maxGutter[1],d,b,t,n,a,C=0,q=w.findIndex("position","top")!=-1,B=w.findIndex("position","bottom")!=-1,F=H.adjustEnd,E,s,h,p,g,l,o,k,u;l=m;for(u=0;u<l;u++){t=j[u];p=H.label.renderer(G[u]);E=H.getOrCreateLabel(u,p);b=E._bbox;A=v(A,b.width+H.dashSize+H.label.padding);k=t[1];if(F&&D<b.height/2){if(u==l-1&&!q){k=Math.max(k,H.y-H.length+c(b.height/2)-e)}else{if(u==0&&!B){k=H.y+D-z(b.height/2)}}}if(I=="left"){o=t[0]-b.width-H.dashSize-H.label.padding-2}else{o=t[0]+H.dashSize+H.label.padding+2}E.setAttributes(Ext.apply({hidden:false,x:o,y:k},H.label),true);if(u!=0&&H.intersect(E,n)){if(u===l-1&&a!==0){n.hide(true)}else{E.hide(true);continue}}n=E;a=u}return A},drawLabel:function(){var h=this,a=h.position,b=h.labelGroup,j=h.inflections,g=0,e=0,d,c;if(a=="left"||a=="right"){g=h.drawVerticalLabels()}else{e=h.drawHorizontalLabels()}d=b.getCount();c=j.length;for(;c<d;c++){b.getAt(c).hide(true)}h.bbox={};Ext.apply(h.bbox,h.axisBBox);h.bbox.height=e;h.bbox.width=g;if(Ext.isString(h.title)){h.drawTitle(g,e)}},elipsis:function(d,h,c,e,b){var g,a;if(c<e){d.hide(true);return false}while(h.length>4){h=h.substr(0,h.length-4)+"...";d.setAttributes({text:h},true);g=d.getBBox();if(g.width<c){if(typeof b=="number"){d.setAttributes({x:Math.floor(b-(g.width/2))},true)}break}}return true},setTitle:function(a){this.title=a;this.drawLabel()},drawTitle:function(l,m){var h=this,g=h.position,b=h.chart.surface,c=h.displaySprite,k=h.title,e=(g=="left"||g=="right"),j=h.x,i=h.y,a,n,d;if(c){c.setAttributes({text:k},true)}else{a={type:"text",x:0,y:0,text:k};c=h.displaySprite=b.add(Ext.apply(a,h.axisTitleStyle,h.labelTitle));b.renderItem(c)}n=c.getBBox();d=h.dashSize+h.label.padding;if(e){i-=((h.length/2)-(n.height/2));if(g=="left"){j-=(l+d+(n.width/2))}else{j+=(l+d+n.width-(n.width/2))}h.bbox.width+=n.width+10}else{j+=(h.length/2)-(n.width*0.5);if(g=="top"){i-=(m+d+(n.height*0.3))}else{i+=(m+d+(n.height*0.8))}h.bbox.height+=n.height+10}c.setAttributes({translate:{x:j,y:i}},true)}});Ext.define("Ext.chart.axis.Category",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.CategoryAxis",alias:"axis.category",categoryNames:null,calculateCategoryCount:false,setLabels:function(){var c=this.chart.getChartStore(),j=c.data.items,k,g,b,a=this.fields,h=a.length,e;this.labels=[];for(k=0,g=j.length;k<g;k++){b=j[k];for(e=0;e<h;e++){this.labels.push(b.get(a[e]))}}},applyData:function(){this.callParent();this.setLabels();var a=this.chart.getChartStore().getCount();return{from:0,to:a-1,power:1,step:1,steps:a-1}}});Ext.define("Ext.chart.axis.Gauge",{extend:"Ext.chart.axis.Abstract",position:"gauge",alias:"axis.gauge",drawAxis:function(q){var j=this.chart,a=j.surface,p=j.chartBBox,d=p.x+(p.width/2),b=p.y+p.height,c=this.margin||10,m=Math.min(p.width,2*p.height)/2+c,h=[],n,l=this.steps,e,g=Math.PI,o=Math.cos,k=Math.sin;if(this.sprites&&!j.resizing){this.drawLabel();return}if(this.margin>=0){if(!this.sprites){for(e=0;e<=l;e++){n=a.add({type:"path",path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"});n.setAttributes({hidden:false},true);h.push(n)}}else{h=this.sprites;for(e=0;e<=l;e++){h[e].setAttributes({path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"},true)}}}this.sprites=h;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,g=d.chartBBox,c=e.titleSprite,b;if(!c){e.titleSprite=c=a.add({type:"text",zIndex:2})}c.setAttributes(Ext.apply({text:e.title},e.label||{}),true);b=c.getBBox();c.setAttributes({x:g.x+(g.width/2)-(b.width/2),y:g.y+g.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var l=this.chart,p=l.surface,b=l.chartBBox,j=b.x+(b.width/2),h=b.y+b.height,m=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*m,u=Math.round,n=[],g,s=this.maximum||0,k=this.minimum||0,r=this.steps,q=0,v,t=Math.PI,c=Math.cos,a=Math.sin,e=this.label,o=e.renderer||function(i){return i};if(!this.labelArray){for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;g=p.add({type:"text",text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});g.setAttributes({hidden:false},true);n.push(g)}}else{n=this.labelArray;for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;n[q].setAttributes({text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v},true)}}this.labelArray=n}});Ext.define("Ext.chart.axis.Numeric",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.NumericAxis",type:"numeric",alias:"axis.numeric",uses:["Ext.data.Store"],constructor:function(c){var d=this,a=!!(c.label&&c.label.renderer),b;d.callParent([c]);b=d.label;if(c.constrain==null){d.constrain=(c.minimum!=null&&c.maximum!=null)}if(!a){b.renderer=function(e){return d.roundToDecimal(e,d.decimals)}}},roundToDecimal:function(a,c){var b=Math.pow(10,c||0);return Math.floor(a*b)/b},minimum:NaN,maximum:NaN,constrain:true,decimals:2,scale:"linear",doConstrain:function(){var u=this,c=u.chart.store,j=c.data.items,t,w,b,g=u.chart.series.items,k=u.fields,e=k.length,h=u.getRange(),n=h.min,q=h.max,r,o,a=[],s=false,m,v=[],p;for(r=0,o=g.length;r<o;r++){a[r]=g[r].__excludes;s=s||g[r].stacked}for(t=0,w=j.length;t<w;t++){p=true;b=j[t];for(r=0;r<e;r++){p=true;if(a[r]){continue}m=b.get(k[r]);if(!s&&+m<+n){p=false;break}if(!s&&+m>+q){p=false;break}}if(p){v.push(b)}}u.chart.substore=Ext.create("Ext.data.Store",{model:c.model,data:v})},position:"left",adjustMaximumByMajorUnit:false,adjustMinimumByMajorUnit:false,processView:function(){var a=this,b=a.constrain;if(b){a.doConstrain()}},applyData:function(){this.callParent();return this.calcEnds()}});Ext.define("Ext.chart.axis.Radial",{extend:"Ext.chart.axis.Abstract",position:"radial",alias:"axis.radial",drawAxis:function(u){var m=this.chart,a=m.surface,t=m.chartBBox,q=m.store,b=q.getCount(),e=t.x+(t.width/2),c=t.y+(t.height/2),p=Math.min(t.width,t.height)/2,k=[],r,o=this.steps,g,d,h=Math.PI*2,s=Math.cos,n=Math.sin;if(this.sprites&&!m.resizing){this.drawLabel();return}if(!this.sprites){for(g=1;g<=o;g++){r=a.add({type:"circle",x:e,y:c,radius:Math.max(p*g/o,0),stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}for(g=0;g<b;g++){r=a.add({type:"path",path:["M",e,c,"L",e+p*s(g/b*h),c+p*n(g/b*h),"Z"],stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}}else{k=this.sprites;for(g=0;g<o;g++){k[g].setAttributes({x:e,y:c,radius:Math.max(p*(g+1)/o,0),stroke:"#ccc"},true)}for(d=0;d<b;d++){k[g+d].setAttributes({path:["M",e,c,"L",e+p*s(d/b*h),c+p*n(d/b*h),"Z"],stroke:"#ccc"},true)}}this.sprites=k;this.drawLabel()},drawLabel:function(){var w=this.chart,c=w.series.items,r,B=w.surface,b=w.chartBBox,l=w.store,J=l.data.items,p,k,o=b.x+(b.width/2),n=b.y+(b.height/2),h=Math.min(b.width,b.height)/2,F=Math.max,I=Math.round,x=[],m,z=[],d,A=[],g,v=!this.maximum,H=this.maximum||0,G=this.steps,E=0,D,t,s,y=Math.PI*2,e=Math.cos,a=Math.sin,C=this.label.display,q=C!=="none",u=10;if(!q){return}for(E=0,p=c.length;E<p;E++){r=c[E];z.push(r.yField);g=r.xField}for(D=0,p=J.length;D<p;D++){k=J[D];if(v){for(E=0,d=z.length;E<d;E++){H=F(+k.get(z[E]),H)}}A.push(k.get(g))}if(!this.labelArray){if(C!="categories"){for(E=1;E<=G;E++){m=B.add({type:"text",text:I(E/G*H),x:o,y:n-h*E/G,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"});m.setAttributes({hidden:false},true);x.push(m)}}if(C!="scale"){for(D=0,G=A.length;D<G;D++){t=e(D/G*y)*(h+u);s=a(D/G*y)*(h+u);m=B.add({type:"text",text:A[D],x:o+t,y:n+s,"text-anchor":t*t<=0.001?"middle":(t<0?"end":"start")});m.setAttributes({hidden:false},true);x.push(m)}}}else{x=this.labelArray;if(C!="categories"){for(E=0;E<G;E++){x[E].setAttributes({text:I((E+1)/G*H),x:o,y:n-h*(E+1)/G,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"},true)}}if(C!="scale"){for(D=0,G=A.length;D<G;D++){t=e(D/G*y)*(h+u);s=a(D/G*y)*(h+u);if(x[E+D]){x[E+D].setAttributes({type:"text",text:A[D],x:o+t,y:n+s,"text-anchor":t*t<=0.001?"middle":(t<0?"end":"start")},true)}}}}this.labelArray=x}});Ext.define("Ext.chart.axis.Time",{extend:"Ext.chart.axis.Numeric",alternateClassName:"Ext.chart.TimeAxis",alias:"axis.time",uses:["Ext.data.Store"],dateFormat:false,fromDate:false,toDate:false,step:[Ext.Date.DAY,1],constrain:false,constructor:function(b){var c=this,a,d,e;c.callParent([b]);a=c.label||{};e=this.dateFormat;if(e){if(a.renderer){d=a.renderer;a.renderer=function(g){g=d(g);return Ext.Date.format(new Date(d(g)),e)}}else{a.renderer=function(g){return Ext.Date.format(new Date(g>>0),e)}}}},processView:function(){var a=this;if(a.fromDate){a.minimum=+a.fromDate}if(a.toDate){a.maximum=+a.toDate}if(a.constrain){a.doConstrain()}},calcEnds:function(){var c=this,a,b=c.step;if(b){a=c.getRange();a=Ext.draw.Draw.snapEndsByDateAndStep(new Date(a.min),new Date(a.max),Ext.isNumber(b)?[Date.MILLI,b]:b);if(c.minimum){a.from=c.minimum}if(c.maximum){a.to=c.maximum}a.step=(a.to-a.from)/a.steps;return a}else{return c.callParent(arguments)}}});Ext.define("Ext.draw.Text",{extend:"Ext.draw.Component",uses:["Ext.util.CSS"],alias:"widget.text",text:"",focusable:false,viewBox:false,autoSize:true,baseCls:Ext.baseCSSPrefix+"surface "+Ext.baseCSSPrefix+"draw-text",initComponent:function(){var a=this;a.textConfig=Ext.apply({type:"text",text:a.text,rotate:{degrees:a.degrees||0}},a.textStyle);Ext.apply(a.textConfig,a.getStyles(a.styleSelectors||a.styleSelector));a.initialConfig.items=[a.textConfig];a.callParent(arguments)},getStyles:function(d){d=Ext.Array.from(d);var c=0,b=d.length,g,e,h,a={};for(;c<b;c++){g=Ext.util.CSS.getRule(d[c]);if(g){e=g.style;if(e){Ext.apply(a,{"font-family":e.fontFamily,"font-weight":e.fontWeight,"line-height":e.lineHeight,"font-size":e.fontSize,fill:e.color})}}}return a},setAngle:function(d){var c=this,a,b;if(c.rendered){a=c.surface;b=a.items.items[0];c.degrees=d;b.setAttributes({rotate:{degrees:d}},true);if(c.autoSize||c.viewBox){c.updateLayout()}}else{c.degrees=d}},setText:function(d){var c=this,a,b;if(c.rendered){a=c.surface;b=a.items.items[0];c.text=d||"";a.remove(b);c.textConfig.type="text";c.textConfig.text=c.text;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:c.degrees}},true);if(c.autoSize||c.viewBox){c.updateLayout()}}else{c.on({render:function(){c.setText(d)},single:true})}}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:["Ext.FocusMgr"],mixins:{observable:"Ext.util.Observable"},requires:["Ext.AbstractComponent","Ext.Component","Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],constructor:function(a){var b=this,c=Ext.ComponentQuery;b.mixins.observable.constructor.call(b,a);b.addEvents("beforecomponentfocus","componentfocus","disable","enable");b.focusTask=new Ext.util.DelayedTask(b.handleComponentFocus,b);Ext.override(Ext.AbstractComponent,{onFocus:function(){this.callParent(arguments);if(b.enabled&&this.hasFocus){Array.prototype.unshift.call(arguments,this);b.onComponentFocus.apply(b,arguments)}},onBlur:function(){this.callParent(arguments);if(b.enabled&&!this.hasFocus){Array.prototype.unshift.call(arguments,this);b.onComponentBlur.apply(b,arguments)}},onDestroy:function(){this.callParent(arguments);if(b.enabled){Array.prototype.unshift.call(arguments,this);b.onComponentDestroy.apply(b,arguments)}}});Ext.override(Ext.Component,{afterHide:function(){this.callParent(arguments);if(b.enabled){Array.prototype.unshift.call(arguments,this);b.onComponentHide.apply(b,arguments)}}});b.keyNav=new Ext.util.KeyNav(Ext.getDoc(),{disabled:true,scope:b,backspace:b.focusLast,enter:b.navigateIn,esc:b.navigateOut,tab:b.navigateSiblings,space:b.navigateIn,del:b.focusLast,left:b.navigateSiblings,right:b.navigateSiblings,down:b.navigateSiblings,up:b.navigateSiblings});b.focusData={};b.subscribers=new Ext.util.HashMap();b.focusChain={};Ext.apply(c.pseudos,{focusable:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(j.isFocusable()){h.push(j)}}return h},nextFocus:function(g,e,j){j=j||1;e=parseInt(e,10);var d=g.length,h=e,k;for(;;){if((h+=j)>=d){h=0}else{if(h<0){h=d-1}}if(h===e){return[]}if((k=g[h]).isFocusable()){return[k]}}return[]},prevFocus:function(e,d){return this.nextFocus(e,d,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(!j.ownerCt){h.push(j)}}return h}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;a.removeDOM();a.keyNav.disable();a.fireEvent("disable",a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}b.enabled=true;b.initDOM(a);b.keyNav.enable();b.focusEl.focus();delete b.focusedCmp;b.fireEvent("enable",b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var a=this,c=Ext.ComponentQuery,b=c.query(":focusable:root:not([floating])"),d=c.query(":focusable:root[floating]");d.sort(function(g,e){return g.el.getZIndex()>e.el.getZIndex()});return d.concat(b)},initDOM:function(c){var g=this,b=g.focusFrameCls,e=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),d=0,a=e.length;if(!Ext.isReady){return Ext.onReady(g.initDOM,g)}for(;d<a;d++){e[d].addFocusListener()}if(!g.focusEl){g.focusEl=Ext.getBody();g.focusEl.dom.tabIndex=-1}if(!g.focusFrame&&c.focusFrame){g.focusFrame=Ext.getBody().createChild({cls:b,children:[{cls:b+"-top"},{cls:b+"-bottom"},{cls:b+"-left"},{cls:b+"-right"}],style:"top: -100px; left: -100px;"});g.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);g.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(g){var c=this,a=c.focusedCmp,b,d;if(c.isWhitelisted(a)){return true}if(!a){b=c.getRootComponents()[0];if(b){if(b.getFocusEl()===c.focusEl){c.focusEl.blur()}b.focus()}}else{d=a.hasFocus?Ext.ComponentQuery.query(">:focusable",a)[0]:a;if(d){d.focus()}else{if(Ext.isFunction(a.onClick)){g.button=0;a.onClick(g);if(a.isVisible(true)){a.focus()}else{c.navigateOut()}}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,o){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",n,d,m,l;m=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!m&&!o){return true}if(c&&j.isWhitelisted(m)){return true}if(!m||m.is(":root")){l=j.getRootComponents()}else{o=o||m.up();if(o){l=o.getRefItems()}}if(l){n=m?Ext.Array.indexOf(l,m):-1;d=Ext.ComponentQuery.query(":"+h+"Focus("+n+")",l)[0];if(d&&m!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentFocus:function(d,g){var c=this,a=c.focusChain,b;if(!d.isFocusable()){c.clearComponent(d);if(a[d.id]){return}b=d.up();if(b){a[d.id]=true;b.focus()}return}c.focusChain={};c.focusTask.delay(10,null,null,[d,d.getFocusEl()])},handleComponentFocus:function(m,i){var k=this,p,a,d,h,o,b,l,e,g,c,n,j;if(k.fireEvent("beforecomponentfocus",k,m,k.previousFocusedCmp)===false){k.clearComponent(m);return}k.focusedCmp=m;if(k.shouldShowFocusFrame(m)){p="."+k.focusFrameCls+"-";a=k.focusFrame;h=i.getPageBox();o=h.top;b=h.left;l=h.width;e=h.height;g=a.child(p+"top");c=a.child(p+"bottom");n=a.child(p+"left");j=a.child(p+"right");g.setWidth(l).setLeftTop(b,o);c.setWidth(l).setLeftTop(b,o+e-2);n.setHeight(e-2).setLeftTop(b,o+2);j.setHeight(e-2).setLeftTop(b+l-2,o+2);a.show()}k.fireEvent("componentfocus",k,m,k.previousFocusedCmp)},onComponentHide:function(e){var d=this,b=false,a=d.focusedCmp,c;if(a){b=e.hasFocus||(e.isContainer&&e.isAncestor(d.focusedCmp))}d.clearComponent(e);if(b&&(c=e.up(":focusable"))){c.focus()}else{d.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusFrame);delete a.focusEl;delete a.focusFrame},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return new Ext.util.KeyNav(d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{},e=c.getFocusEl(),d=Ext.getDom(e).tagName;if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],autoEl:"img",src:"",alt:"",imgCls:"",getElConfig:function(){var c=this,b=c.callParent(),a;if(c.autoEl=="img"){a=b}else{b.cn=[a={tag:"img",id:c.id+"-img"}]}if(c.imgCls){a.cls=(a.cls?a.cls+" ":"")+c.imgCls}a.src=c.src||Ext.BLANK_IMAGE_URL;if(c.alt){a.alt=c.alt}return b},onRender:function(){var b=this,a;b.callParent(arguments);a=b.el;b.imgEl=(b.autoEl=="img")?a:a.getById(b.id+"-img")},onDestroy:function(){Ext.destroy(this.imgEl);this.imgEl=null;this.callParent()},setSrc:function(c){var a=this,b=a.imgEl;a.src=c;if(b){b.dom.src=c||Ext.BLANK_IMAGE_URL}}});Ext.define("Ext.LoadMask",{extend:"Ext.Component",alias:"widget.loadmask",mixins:{floating:"Ext.util.Floating",bindable:"Ext.util.Bindable"},uses:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",maskCls:Ext.baseCSSPrefix+"mask",useMsg:true,useTargetEl:false,baseCls:Ext.baseCSSPrefix+"mask-msg",childEls:["msgEl"],renderTpl:'<div id="{id}-msgEl" style="position:relative" class="{[values.$comp.msgCls]}"></div>',floating:{shadow:"frame"},focusOnToFront:false,bringParentToFront:false,constructor:function(a,b){var c=this;if(!a.isComponent){a=Ext.get(a);this.isElement=true}c.ownerCt=a;if(!this.isElement){c.bindComponent(a)}c.callParent([b]);if(c.store){c.bindStore(c.store,true)}},bindComponent:function(a){var c=this,b={scope:this,resize:c.sizeMask,added:c.onComponentAdded,removed:c.onComponentRemoved},d=Ext.container.Container.hierarchyEventSource;if(a.floating){b.move=c.sizeMask;if(a.zIndexManager.front!==a){c.restack=true;c.activeOwner=a}}else{if(a.ownerCt){c.onComponentAdded(a.ownerCt)}else{c.preventBringToFront=true}}c.mon(a,b);c.mon(d,{show:c.onContainerShow,hide:c.onContainerHide,expand:c.onContainerExpand,collapse:c.onContainerCollapse,scope:c})},onComponentAdded:function(a){var b=this;delete b.activeOwner;b.floatParent=a;if(!a.floating){a=a.up("[floating]")}if(a){b.activeOwner=a;b.mon(a,"move",b.sizeMask,b)}a=b.floatParent.ownerCt;if(b.rendered&&b.isVisible()&&a){b.floatOwner=a;b.mon(a,"afterlayout",b.sizeMask,b,{single:true})}},onComponentRemoved:function(a){var c=this,d=c.activeOwner,b=c.floatOwner;if(d){c.mun(d,"move",c.sizeMask,c)}if(b){c.mun(b,"afterlayout",c.sizeMask,c)}delete c.activeOwner;delete c.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerHide:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},onContainerExpand:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerCollapse:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},isActiveContainer:function(a){return this.isDescendantOf(a)},onComponentHide:function(){var a=this;if(a.rendered&&a.isVisible()){a.hide();a.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var a=this,b;if(a.rendered&&a.isVisible()){a.center();b=a.getMaskTarget();a.getMaskEl().show().setSize(b.getSize()).alignTo(b,"tl-tl")}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);a=c.store;if(a&&a.isLoading()){c.onBeforeLoad()}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad,cachemiss:this.onBeforeLoad,cachefilled:this.onLoad}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var a=this.getOwner();return this.useTargetEl?a.getTargetEl():a.getEl()},onBeforeLoad:function(){var c=this,a=c.getOwner(),b;if(!c.disabled){c.loading=true;if(a.componentLayoutCounter){c.maybeShow()}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);c.maybeShow()}}}},maybeShow:function(){var b=this,a=b.getOwner();if(!a.isVisible(true)){b.showNext=true}else{if(b.loading&&a.rendered){b.show()}}},getMaskEl:function(){var a=this;return a.maskEl||(a.maskEl=a.el.insertSibling({cls:a.maskCls,style:{zIndex:a.el.getStyle("zIndex")-2}},"before"))},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},hide:function(){if(this.isElement){this.ownerCt.unmask();this.fireEvent("hide",this);return}delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){if(this.isElement){this.ownerCt.mask(this.useMsg?this.msg:"",this.msgCls);this.fireEvent("show",this);return}return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.sizeMask()},setZIndex:function(a){var b=this;if(b.restack){a=parseInt(b.activeOwner.el.getStyle("zIndex"),10)+1}b.getMaskEl().setStyle("zIndex",a-1);return b.mixins.floating.setZIndex.apply(b,arguments)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var a=this;if(a.isElement){a.ownerCt.unmask()}Ext.destroy(a.maskEl);a.callParent()}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],mixins:{bindable:"Ext.util.Bindable"},inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,preserveScrollOnRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',c.itemCls,d);c.tpl=new Ext.XTemplate(d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=new Ext.XTemplate(c.tpl)}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");c.bindStore(c.store,true);c.all=new Ext.CompositeElementLite();c.scrollState={top:0,left:0};c.on({scroll:c.onViewScroll,element:"el",scope:c})},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=new Ext.LoadMask(c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},onBoxReady:function(){var b=this,a=b.store;b.callParent(arguments);b.doFirstRefresh(b.store)},onMaskBeforeShow:function(){var b=this,a=b.loadingHeight;b.getSelectionModel().deselectAll();b.all.clear();if(a&&a>b.getHeight()){b.hasLoadingHeight=true;b.oldMinHeight=b.minHeight;b.minHeight=a;b.updateLayout()}},onMaskHide:function(){var a=this;if(!a.destroying&&a.hasLoadingHeight){a.minHeight=a.oldMinHeight;a.updateLayout();delete a.hasLoadingHeight}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=new Ext.selection.DataViewModel(a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect","focuschange"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,h,b,e,d,g,a;if(!c.rendered||c.isDestroyed){return}if(!c.hasListeners.beforerefresh||c.fireEvent("beforerefresh",c)!==false){h=c.getTargetEl();a=c.store.getRange();g=h.dom;if(!c.preserveScrollOnRefresh){b=g.parentNode;e=g.style.display;g.style.display="none";d=g.nextSibling;b.removeChild(g)}if(c.refreshCounter){c.clearViewEl()}else{c.fixedNodes=h.dom.childNodes.length;c.refreshCounter=1}c.tpl.append(h,c.collectData(a,0));if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){Ext.core.DomHelper.insertHtml("beforeEnd",h.dom,c.emptyText)}c.all.clear()}else{c.all.fill(Ext.query(c.getItemSelector(),h.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;if(!c.preserveScrollOnRefresh){b.insertBefore(g,d);g.style.display=e}this.refreshSize();c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}}},refreshSize:function(){var a=this.getSizeModel();if(a.height.shrinkWrap||a.width.shrinkWrap){this.updateLayout()}},clearViewEl:function(){var b=this,a=b.getTargetEl();if(b.fixedNodes){while(a.dom.childNodes[b.fixedNodes]){a.dom.removeChild(a.dom.childNodes[b.fixedNodes])}}else{a.update("")}b.refreshCounter++},onViewScroll:Ext.emptyFn,saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;b.scrollLeft=a.left;b.scrollTop=a.top}},prepareData:function(e,d,c){var b,a;if(c){b=c.getAssociatedData();for(a in b){if(b.hasOwnProperty(a)){e[a]=b[a]}}}return e},collectData:function(c,g){var e=[],d=0,a=c.length,b;for(;d<a;d++){b=c[d];e[d]=this.prepareData(b.data,g+d,b)}return e},bufferRender:function(a,b){var c=this,d=c.renderBuffer||(c.renderBuffer=document.createElement("div"));c.tpl.overwrite(d,c.collectData(a,b));return Ext.query(c.getItemSelector(),d)},onUpdate:function(e,a){var d=this,b,c;if(d.rendered){b=d.store.indexOf(a);if(b>-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();if(d.hasListeners.itemupdate){d.fireEvent("itemupdate",a,b,c)}return c}}}},onAdd:function(e,b,c){var d=this,a;if(d.rendered){if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);this.refreshSize();if(d.hasListeners.itemadd){d.fireEvent("itemadd",b,c,a)}}},doAdd:function(b,a,c){var d=this.all,e=d.getCount();if(e===0){this.clearViewEl();this.getTargetEl().appendChild(b)}else{if(c<e){if(c===0){d.item(c).insertSibling(b,"before",true)}else{d.item(c-1).insertSibling(b,"after",true)}}else{d.last().insertSibling(b,"after",true)}}Ext.Array.insert(d.elements,c,b)},onRemove:function(d,a,b){var c=this;if(c.rendered){if(c.store.getCount()===0){c.refresh()}else{c.doRemove(a,b);c.updateIndexes(b)}this.refreshSize();if(c.hasListeners.itemremove){c.fireEvent("itemremove",a,b)}}},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(e,d){var c=this.all.elements,a=this.store.getRange(),b;e=e||0;d=d||((d===0)?0:(c.length-1));for(b=e;b<=d;b++){c[b].viewIndex=b;c[b].viewRecordId=a[b].internalId;if(!c[b].boundView){c[b].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);c.getSelectionModel().bindStore(c.store);if(c.componentLayoutCounter){c.doFirstRefresh(a)}},doFirstRefresh:function(a){var b=this;if(a&&!a.loading){if(b.deferInitialRefresh){Ext.Function.defer(function(){if(!b.isDestroyed){b.refresh()}},1)}else{b.refresh()}}},onUnbindStore:function(a){this.setMaskBind(null)},onBindStore:function(a){this.setMaskBind(a)},setMaskBind:function(b){var a=this.loadMask;if(a&&a.bindStore){a.bindStore(b)}},getStoreListeners:function(){var a=this;return{refresh:a.onDataRefresh,add:a.onAdd,remove:a.onRemove,update:a.onUpdate,clear:a.refresh}},onDataRefresh:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c<d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.store.data;for(;d<a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.store.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if((!a&&a!==0)||!this.rendered){return null}if(Ext.isString(a)){return document.getElementById(a)}if(Ext.isNumber(a)){return this.all.elements[a]}if(a.isModel){return this.getNodeByRecord(a)}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b<d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(e,a){var d=this.all.elements,b=[],c;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(b){var c=this,d,e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){d={t:e,l:e,h:-e,w:-e}}else{d={t:-a,l:-a,h:-a,w:-a}}break;case"sides":if(Ext.supports.CSS3BoxShadow){d={t:e,l:0,h:-e,w:0}}else{d={t:-(1+a),l:1+a-2*e,h:-1,w:a-1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){d={t:0,l:0,h:0,w:0}}else{d={t:1+a-2*e,l:1+a-2*e,h:e-a-1,w:e-a-1}}break}c.adjusts=d},offset:4,defaultMode:"drop",boxShadowProperty:(function(){var b="boxShadow",a=document.documentElement.style;if(!("boxShadow" in a)){if("WebkitBoxShadow" in a){b="WebkitBoxShadow"}else{if("MozBoxShadow" in a){b="MozBoxShadow"}}}return b}()),show:function(c){var b=this,a;c=Ext.get(c);if(!b.el){b.el=Ext.ShadowPool.pull();if(b.el.dom.nextSibling!=c.dom){b.el.insertBefore(c)}}a=(parseInt(c.getStyle("z-index"),10)-1)||0;b.el.setStyle("z-index",b.zIndex||a);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+b.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(b.offset)+")"}b.realign(c.getLeft(true),c.getTop(true),c.dom.offsetWidth,c.dom.offsetHeight);b.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,n,k,g){if(!this.el){return}var a=this.adjusts,i=this.el.dom,j=i.style,c,e,h,m;j.left=(b+a.l)+"px";j.top=(n+a.t)+"px";c=Math.max(k+a.w,0);e=Math.max(g+a.h,0);h=c+"px";m=e+"px";if(j.width!=h||j.height!=m){j.width=h;j.height=m;if(Ext.supports.CSS3BoxShadow){j[this.boxShadowProperty]="0 0 "+this.offset+"px #888"}}},hide:function(){var a=this;if(a.el){a.el.dom.style.display="none";Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),a=Ext.get(i),m=a.getScroll(),j,d=a.dom,l,h,e;if(d==document.body){j={x:m.left,y:m.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{l=a.getXY();j={x:l[0],y:l[1],width:d.clientWidth,height:d.clientHeight}}h=k.y-j.y;e=k.x-j.x;this.resetConstraints();this.setXConstraint(e-(g.left||0),j.width-e-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl(),b,a,g;if(!this.DDMInstance.verifyEl(e)){return}b=d||0;a=c||0;g=Ext.Element.getXY(e);this.initPageX=g[0]-b;this.initPageY=g[1]-a;this.lastPageX=g[0];this.lastPageY=g[1];this.setStartPosition(g)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(b,a){if(this.primaryButtonOnly&&b.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);if(this.hasOuterHandles||this.DDMInstance.isOverTarget(b.getPoint(),this)){if(this.clickValidator(b)){this.setStartPosition();this.b4MouseDown(b);this.onMouseDown(b);this.DDMInstance.handleMouseDown(b,this);this.DDMInstance.stopEvent(b)}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c<a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true,h,b,a;try{h=d.nodeName.toUpperCase()}catch(g){h=d.nodeName}c=c&&!this.invalidHandleTypes[h];c=c&&!this.invalidHandleIds[d.id];for(b=0,a=this.invalidHandleClasses.length;c&&b<a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={},b;for(b=this.initPageX;b>=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={},b;for(b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0,a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(h,d){if(!d){return h}else{if(d[0]>=h){return d[0]}else{var b,a,c,g,e;for(b=0,a=d.length;b<a;++b){c=b+1;if(d[c]&&d[c]>=h){g=h-d[b];e=d[c]-h;return(e>g)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX,d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var g=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),l=d.getSize(),i=Ext.Element,j,a,k,h;if(!this.deltaSetXY){j=this.cachedViewportSize={width:i.getDocumentWidth(),height:i.getDocumentHeight()};a=[Math.max(0,Math.min(g.x,j.width-l.width)),Math.max(0,Math.min(g.y,j.height-l.height))];d.setXY(a);k=d.getLeft(true);h=d.getTop(true);this.deltaSetXY=[k-g.x,h-g.y]}else{j=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(g.x+this.deltaSetXY[0],j.width-l.width)),Math.max(0,Math.min(g.y+this.deltaSetXY[1],j.height-l.height)))}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,b.offsetHeight,b.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.Element.getViewHeight(),b=Ext.Element.getViewWidth(),p=this.DDMInstance.getScrollTop(),d=this.DDMInstance.getScrollLeft(),j=e+k,o=m+l,i=(n+p-k-this.deltaY),g=(b+d-l-this.deltaX),c=40,a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,p+a)}if(k<p&&p>0&&k-p<c){window.scrollTo(d,p-a)}if(o>b&&g<c){window.scrollTo(d+a,p)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,p)}}},getTargetCoord:function(c,b){var a=c-this.deltaX,d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this,a=document.body,d,c;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl(),a=this.getDragEl(),b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl(),a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.dd.StatusProxy",{extend:"Ext.Component",animRepair:false,childEls:["ghost"],renderTpl:['<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div id="{id}-ghost" class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>'],constructor:function(a){var b=this;a=a||{};Ext.apply(b,{hideMode:"visibility",hidden:true,floating:true,id:b.id||Ext.id(),cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:a.shadow||false,renderTo:Ext.getDetachedBody()});b.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(b){var c=this,a=Ext.baseCSSPrefix+"dd-drag-proxy ";c.el.replaceCls(a+c.dropAllowed,a+c.dropNotAllowed);c.dropStatus=c.dropNotAllowed;if(b){c.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getGhost:function(){return this.ghost},hide:function(a){this.callParent();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.sync()},repair:function(c,d,a){var b=this;b.callback=d;b.scope=a;if(c&&b.animRepair!==false){b.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");b.el.hideUnders(true);b.anim=b.el.animate({duration:b.repairDuration||500,easing:"ease-out",to:{x:c[0],y:c[1]},stopAnimation:true,callback:b.afterRepair,scope:b})}else{b.afterRepair()}},afterRepair:function(){var a=this;a.hide(true);a.el.removeCls(Ext.baseCSSPrefix+"dd-drag-repair");if(typeof a.callback=="function"){a.callback.call(a.scope||a)}delete a.callback;delete a.scope}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+"-drag-status-proxy",animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d),a;this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d),a;if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(true);return this.callParent(arguments)},startDrag:function(a,b){this.proxy.reset();this.proxy.hidden=false;this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var j=this,g=j.el,m,d,c,o,n,s,a,k,h,q,p;p=j.sprite;q=p.getBBox();try{m=Ext.Element.getXY(g)}catch(i){}if(!m){return null}d=m[0];c=d+q.width;o=m[1];n=o+q.height;return new Ext.util.Region(o,c,n,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(i){var h=i.getXY(),g=this,d=g.sprite,a=d.attr,c,b;h=g.sprite.surface.transformToViewBox(h[0],h[1]);c=h[0]-g.prev[0];b=h[1]-g.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);g.prev=h},setDragElPos:function(){return false}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=Ext.merge({},a||{});b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSpriteElement(a)}a.dd=new Ext.draw.SpriteDD(a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(l,o){var t=this,j=t.fontProperties,q=j.length,h=t.pathProperties,g=h.length,r=!!t.surface,a=r&&t.surface.customAttributes||{},c=t.attr,b=false,m,p,k,d,s,n,u,e;l=Ext.apply({},l);for(m in a){if(l.hasOwnProperty(m)&&typeof a[m]=="function"){Ext.apply(l,a[m].apply(t,[].concat(l[m])))}}if(!!l.hidden!==!!c.hidden){t.dirtyHidden=true}for(p=0;p<g;p++){m=h[p];if(m in l&&l[m]!==c[m]){t.dirtyPath=true;b=true;break}}if("zIndex" in l){t.zIndexDirty=true}if("text" in l){t.dirtyFont=true;b=true}for(p=0;p<q;p++){m=j[p];if(m in l&&l[m]!==c[m]){t.dirtyFont=true;b=true;break}}k=l.translation||l.translate;delete l.translate;delete l.translation;d=c.translation;if(k){if(("x" in k&&k.x!==d.x)||("y" in k&&k.y!==d.y)){t.dirtyTransform=true;d.x=k.x;d.y=k.y}}s=l.rotation||l.rotate;n=c.rotation;delete l.rotate;delete l.rotation;if(s){if(("x" in s&&s.x!==n.x)||("y" in s&&s.y!==n.y)||("degrees" in s&&s.degrees!==n.degrees)){t.dirtyTransform=true;n.x=s.x;n.y=s.y;n.degrees=s.degrees}}u=l.scaling||l.scale;e=c.scaling;delete l.scale;delete l.scaling;if(u){if(("x" in u&&u.x!==e.x)||("y" in u&&u.y!==e.y)||("cx" in u&&u.cx!==e.cx)||("cy" in u&&u.cy!==e.cy)){t.dirtyTransform=true;e.x=u.x;e.y=u.y;e.cx=u.cx;e.cy=u.cy}}if(!t.dirtyTransform&&b){if(c.scaling.x===null||c.scaling.y===null||c.rotation.y===null||c.rotation.y===null){t.dirtyTransform=true}}Ext.apply(c,l);t.dirty=true;if(o===true&&r){t.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent("beforedestroy",a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS("http://www.w3.org/2000/svg",d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor="rgba(0,0,0,0)"}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=new Ext.draw.Matrix();a.bbox={plain:0,transform:0};this.applyAttrs(a);this.applyTransformations(a);a.fireEvent("render",a);return b},getBBoxText:function(j){var k={},g,l,a,c,h,b;if(j&&j.el){b=j.el.dom;try{k=b.getBBox();return k}catch(d){}k={x:k.x,y:Infinity,width:0,height:0};h=b.getNumberOfChars();for(c=0;c<h;c++){g=b.getExtentOfChar(c);k.y=Math.min(g.y,k.y);l=g.y+g.height-k.y;k.height=Math.max(k.height,l);a=g.x+g.width-k.x;k.width=Math.max(k.width,a)}return k}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(k,a){var h=this,j=new Ext.draw.Matrix(),e=k.transformations,d=e.length,c=0,b,g;for(;c<d;c++){b=e[c];g=b.type;if(g=="translate"){j.translate(b.x,b.y)}else{if(g=="rotate"){j.rotate(b.degrees,b.x,b.y)}else{if(g=="scale"){j.scale(b.x,b.y,b.centerX,b.centerY)}}}}k.matrix=j;if(!a){k.el.set({transform:j.toSvg()})}},setSize:function(c,a){var d=this,b=d.el;c=+c||d.width;a=+a||d.height;d.width=c;d.height=a;b.setSize(c,a);b.set({width:c,height:a});d.callParent([c,a])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.destroy();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[b,d,c,a].join(" "))}},render:function(c){var g=this,e,b,d,a,h,i;if(!g.el){e=g.width||0;b=g.height||0;d=g.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:b});a=g.getDefs();h=g.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0});if(Ext.isSafari3){i=g.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(i)}d.appendChild(h);c.appendChild(d);g.el=Ext.get(d);g.bgRect=Ext.get(h);if(Ext.isSafari3){g.webkitRect=Ext.get(i);g.webkitRect.hide()}g.el.on({scope:g,mouseup:g.onMouseUp,mousedown:g.onMouseDown,mouseover:g.onMouseOver,mouseout:g.onMouseOut,mousemove:g.onMouseMove,mouseenter:g.onMouseEnter,mouseleave:g.onMouseLeave,click:g.onClick,dblclick:g.onDblClick})}g.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseenter",a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseleave",a)}},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);if(d.nodeName=="tspan"&&d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},tuneText:function(k,l){var a=k.el.dom,b=[],n,h,m,d,e,c,g,j;if(l.hasOwnProperty("text")){m=k.tspans&&Ext.Array.map(k.tspans,function(i){return i.textContent}).join("");if(!k.tspans||l.text!=m){b=this.setText(k,l.text);k.tspans=b}else{b=k.tspans||[]}}if(b.length){n=this.getBBoxText(k).height;j=k.el.dom.getAttribute("x");for(d=0,e=b.length;d<e;d++){g=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute("x",j);b[d].setAttribute("dy",d?n*1.2:n/g)}k.dirty=true}},setText:function(k,d){var h=this,a=k.el.dom,b=[],m,j,l,e,g,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split("\n");for(e=0,g=c.length;e<g;e++){l=c[e];if(l){j=h.createSvgElement("tspan");j.appendChild(document.createTextNode(Ext.htmlDecode(l)));a.appendChild(j);b[e]=j}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(r){var m=this,c=r.el,q=r.group,j=r.attr,s=m.parsers,g=m.gradientsMap||{},k=Ext.isSafari&&!Ext.isStrict,e,h,l,p,d,o,b,a,n;if(q){e=[].concat(q);l=e.length;for(h=0;h<l;h++){q=e[h];m.getGroup(q).add(r)}delete r.group}p=m.scrubAttrs(r)||{};r.bbox.plain=0;r.bbox.transform=0;if(r.type=="circle"||r.type=="ellipse"){p.cx=p.cx||p.x;p.cy=p.cy||p.y}else{if(r.type=="rect"){p.rx=p.ry=p.r}else{if(r.type=="path"&&p.d){p.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(p.d))}}}r.dirtyPath=false;if(p["clip-rect"]){m.setClip(r,p);delete p["clip-rect"]}if(r.type=="text"&&p.font&&r.dirtyFont){c.set({style:"font: "+p.font})}if(r.type=="image"){c.dom.setAttributeNS(m.xlink,"href",p.src)}Ext.applyIf(p,m.minDefaults[r.type]);if(r.dirtyHidden){(j.hidden)?m.hidePrim(r):m.showPrim(r);r.dirtyHidden=false}for(o in p){if(p.hasOwnProperty(o)&&p[o]!=null){if(k&&("color|stroke|fill".indexOf(o)>-1)&&(p[o] in g)){p[o]=g[p[o]]}if(o=="hidden"&&r.type=="text"){continue}if(o in s){c.dom.setAttribute(o,s[o](p[o],r,m))}else{c.dom.setAttribute(o,p[o])}}}if(r.type=="text"){m.tuneText(r,p)}r.dirtyFont=false;b=j.style;if(b){c.setStyle(b)}r.dirty=false;if(Ext.isSafari3){m.webkitRect.show();setTimeout(function(){m.webkitRect.hide()})}},setClip:function(b,g){var e=this,d=g["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(d){var g=this,b=g.items,a=b.indexOf(d),e=d.el,c;if(g.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||g.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=new Ext.draw.Sprite(a);b.surface=this;return b},addGradient:function(h){h=Ext.draw.Draw.parseGradient(h);var e=this,d=h.stops.length,a=h.vector,l=Ext.isSafari&&!Ext.isStrict,j,g,k,c,b;b=e.gradientsMap||{};if(!l){if(h.type=="linear"){j=e.createSvgElement("linearGradient");j.setAttribute("x1",a[0]);j.setAttribute("y1",a[1]);j.setAttribute("x2",a[2]);j.setAttribute("y2",a[3])}else{j=e.createSvgElement("radialGradient");j.setAttribute("cx",h.centerX);j.setAttribute("cy",h.centerY);j.setAttribute("r",h.radius);if(Ext.isNumber(h.focalX)&&Ext.isNumber(h.focalY)){j.setAttribute("fx",h.focalX);j.setAttribute("fy",h.focalY)}}j.id=h.id;e.getDefs().appendChild(j);for(c=0;c<d;c++){g=h.stops[c];k=e.createSvgElement("stop");k.setAttribute("offset",g.offset+"%");k.setAttribute("stop-color",g.color);k.setAttribute("stop-opacity",g.opacity);j.appendChild(k)}}else{b["url(#"+h.id+")"]=h.stops[0].color}e.gradientsMap=b},hasCls:function(a,b){return b&&(" "+(a.el.dom.getAttribute("class")||"")+" ").indexOf(" "+b+" ")!=-1},addCls:function(e,h){var g=e.el,d,a,c,b=[],j=g.getAttribute("class")||"";if(!Ext.isArray(h)){if(typeof h=="string"&&!this.hasCls(e,h)){g.set({"class":j+" "+h})}}else{for(d=0,a=h.length;d<a;d++){c=h[d];if(typeof c=="string"&&(" "+j+" ").indexOf(" "+c+" ")==-1){b.push(c)}}if(b.length){g.set({"class":" "+b.join(" ")})}}},removeCls:function(k,g){var h=this,b=k.el,d=b.getAttribute("class")||"",c,j,e,l,a;if(!Ext.isArray(g)){g=[g]}if(d){a=d.replace(h.trimRe," ").split(h.spacesRe);for(c=0,e=g.length;c<e;c++){l=g[c];if(typeof l=="string"){l=l.replace(h.trimRe,"");j=Ext.Array.indexOf(a,l);if(j!=-1){Ext.Array.erase(a,j,1)}}}b.set({"class":a.join(" ")})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}if(a._defs){Ext.get(a._defs).destroy()}if(a.bgRect){Ext.get(a.bgRect).destroy()}if(a.webkitRect){Ext.get(a.webkitRect).destroy()}delete a.el}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s\-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",zIndexShift:0,orderSpritesByZIndex:false,path2vml:function(t){var n=this,u=n.NonVmlPathRe,b=n.map,e=n.valRe,s=n.zoom,d=n.bitesRe,g=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),m,o,c,a,k,q,h,l;if(String(t).match(u)){g=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(t).match(n.partialPathRe)){m=String(t).replace(d,function(r,w,j){var v=[],i=w.toLowerCase()=="m",p=b[w];j.replace(e,function(x){if(i&&v.length===2){p+=v+b[w=="m"?"l":"L"];v=[]}v.push(Math.round(x*s))});return p+v});return m}}o=g(t);m=[];for(k=0,q=o.length;k<q;k++){c=o[k];a=o[k][0].toLowerCase();if(a=="z"){a="x"}for(h=1,l=c.length;h<l;h++){a+=Math.round(c[h]*n.zoom)+(h!=l-1?",":"")}m.push(a)}return m.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(a){this.fireEvent("mouseenter",a)},onMouseLeave:function(a){this.fireEvent("mouseleave",a)},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},createSpriteElement:function(h){var e=this,d=h.attr,g=h.type,j=e.zoom,b=h.vml||(h.vml={}),k=Math.round,c=(g==="image")?e.createNode("image"):e.createNode("shape"),l,i,a;c.coordsize=j+" "+j;c.coordorigin=d.coordorigin||"0 0";Ext.get(c).addCls(e.spriteCls);if(g=="text"){b.path=l=e.createNode("path");l.textpathok=true;b.textpath=a=e.createNode("textpath");a.on=true;c.appendChild(a);c.appendChild(l)}c.id=h.id;h.el=Ext.get(c);h.el.setStyle("zIndex",-e.zIndexShift);e.el.appendChild(c);if(g!=="image"){i=e.createNode("skew");i.on=true;c.appendChild(i);h.skew=i}h.matrix=new Ext.draw.Matrix();h.bbox={plain:null,transform:null};this.applyAttrs(h);this.applyTransformations(h);h.fireEvent("render",h);return h.el},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(m){var s=this,c=m.vml,j=m.group,a=m.attr,b=m.el,o=b.dom,p,u,r,n,k,q,l,t,e,d,h,g;if(j){r=[].concat(j);k=r.length;for(n=0;n<k;n++){j=r[n];s.getGroup(j).add(m)}delete m.group}q=s.scrubAttrs(m)||{};if(m.zIndexDirty){s.setZIndex(m)}Ext.applyIf(q,s.minDefaults[m.type]);if(m.type=="image"){Ext.apply(m.attr,{x:q.x,y:q.y,width:q.width,height:q.height});b.setStyle({width:q.width+"px",height:q.height+"px"});o.src=q.src}if(o.href){o.href=q.href}if(o.title){o.title=q.title}if(o.target){o.target=q.target}if(o.cursor){o.cursor=q.cursor}if(m.dirtyHidden){(q.hidden)?s.hidePrim(m):s.showPrim(m);m.dirtyHidden=false}if(m.dirtyPath){if(m.type=="circle"||m.type=="ellipse"){e=q.x;d=q.y;h=q.rx||q.r||0;g=q.ry||q.r||0;o.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((e-h)*s.zoom),Math.round((d-g)*s.zoom),Math.round((e+h)*s.zoom),Math.round((d+g)*s.zoom),Math.round(e*s.zoom));m.dirtyPath=false}else{if(m.type!=="text"&&m.type!=="image"){m.attr.path=q.path=s.setPaths(m,q)||q.path;o.path=s.path2vml(q.path);m.dirtyPath=false}}}if("clip-rect" in q){s.setClip(m,q)}if(m.type=="text"){s.setTextAttributes(m,q)}if(q.opacity||q["stroke-opacity"]||q.fill){s.setFill(m,q)}if(q.stroke||q["stroke-opacity"]||q.fill){s.setStroke(m,q)}p=a.style;if(p){b.setStyle(p)}m.dirty=false},setZIndex:function(e){var h=this,j=e.attr.zIndex,b=h.zIndexShift,c,a,g,d;if(j<b){c=h.items.items;a=c.length;for(d=0;d<a;d++){if((j=c[d].attr.zIndex)&&j<b){b=j}}h.zIndexShift=b;for(d=0;d<a;d++){g=c[d];if(g.el){g.el.setStyle("zIndex",g.attr.zIndex-b)}g.zIndexDirty=false}}else{if(e.el){e.el.setStyle("zIndex",j-b);e.zIndexDirty=false}}},setPaths:function(c,d){var a=c.attr,b=c.attr["stroke-width"]||1;c.bbox.plain=null;c.bbox.transform=null;if(c.type=="circle"){a.rx=a.ry=d.r;return Ext.draw.Draw.ellipsePath(c)}else{if(c.type=="ellipse"){a.rx=d.rx;a.ry=d.ry;return Ext.draw.Draw.ellipsePath(c)}else{if(c.type=="rect"){a.rx=a.ry=d.r;return Ext.draw.Draw.rectPath(c)}else{if(c.type=="path"&&a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(k,e){var h=this,c=k.el.dom,j=c.fill,b=false,g,i,a,l,d;if(!j){j=c.fill=h.createNode("fill");b=true}if(Ext.isArray(e.fill)){e.fill=e.fill[0]}if(e.fill=="none"){j.on=false}else{if(typeof e.opacity=="number"){j.opacity=e.opacity}if(typeof e["fill-opacity"]=="number"){j.opacity=e["fill-opacity"]}j.on=true;if(typeof e.fill=="string"){a=e.fill.match(h.fillUrlRe);if(a){a=a[1];if(a.charAt(0)=="#"){i=h.gradientsColl.getByKey(a.substring(1))}if(i){l=e.rotation;d=-(i.angle+270+(l?l.degrees:0))%360;if(d===0){d=180}j.angle=d;j.type="gradient";j.method="sigma";if(j.colors){j.colors.value=i.colors}else{j.colors=i.colors}}else{j.src=a;j.type="tile"}}else{j.color=Ext.draw.Color.toHex(e.fill);j.src="";j.type="solid"}}}if(b){c.appendChild(j)}},setStroke:function(b,h){var e=this,d=b.el.dom,i=b.strokeEl,g=false,c,a;if(!i){i=b.strokeEl=e.createNode("stroke");g=true}if(Ext.isArray(h.stroke)){h.stroke=h.stroke[0]}if(!h.stroke||h.stroke=="none"||h.stroke==0||h["stroke-width"]==0){i.on=false}else{i.on=true;if(h.stroke&&!h.stroke.match(e.fillUrlRe)){i.color=Ext.draw.Color.toHex(h.stroke)}i.dashstyle=h["stroke-dasharray"]?"dash":"solid";i.joinstyle=h["stroke-linejoin"];i.endcap=h["stroke-linecap"]||"round";i.miterlimit=h["stroke-miterlimit"]||8;c=parseFloat(h["stroke-width"]||1)*0.75;a=h["stroke-opacity"]||1;if(Ext.isNumber(c)&&c<1){i.weight=1;i.opacity=a*c}else{i.weight=c;i.opacity=a}}if(g){d.appendChild(i)}},setClip:function(b,g){var e=this,c=b.el,a=b.clipEl,d=String(g["clip-rect"]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement("div"));a.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle("clip","")}},setTextAttributes:function(i,c){var h=this,a=i.vml,e=a.textpath.style,g=h.span.style,j=h.zoom,k=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},b,d;if(i.dirtyFont){if(c.font){e.font=g.font=c.font}if(c["font-family"]){e.fontFamily='"'+c["font-family"].split(",")[0].replace(h.fontFamilyRe,"")+'"';g.fontFamily=c["font-family"]}for(b in l){d=c[l[b]];if(d){e[b]=g[b]=d}}h.setText(i,c.text);if(a.textpath.string){h.span.innerHTML=String(a.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br/>")}a.W=h.span.offsetWidth;a.H=h.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*j),Math.round(a.Y*j),Math.round(a.X*j)+1);i.bbox.plain=null;i.bbox.transform=null;i.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}}c.callParent(arguments)},applyViewBox:function(){var g=this,h=g.viewBox,e=g.width,b=g.height,c,a,d;g.callParent();if(h&&(e||b)){c=g.items.items;a=c.length;for(d=0;d<a;d++){g.applyTransformations(c[d])}}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},render:function(a){var c=this,g=Ext.getDoc().dom,b;if(!c.createNode){try{if(!g.namespaces.rvml){g.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}c.createNode=function(e){return g.createElement("<rvml:"+e+' class="rvml">')}}catch(d){c.createNode=function(e){return g.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!c.el){b=g.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=g.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||0,c.height||0);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick,dblclick:c.onDblClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=new Ext.draw.Matrix();b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},transform:function(x,I){var H=this,b=H.getBBox(x,true),j=b.x+b.width*0.5,h=b.y+b.height*0.5,B=new Ext.draw.Matrix(),q=x.transformations,v=q.length,C=0,o=0,d=1,c=1,n="",g=x.el,E=g.dom,z=E.style,a=H.zoom,k=x.skew,D=H.viewBoxShift,G,F,s,l,r,p,A,w,u,t,e,m;for(;C<v;C++){s=q[C];l=s.type;if(l=="translate"){B.translate(s.x,s.y)}else{if(l=="rotate"){B.rotate(s.degrees,s.x,s.y);o+=s.degrees}else{if(l=="scale"){B.scale(s.x,s.y,s.centerX,s.centerY);d*=s.x;c*=s.y}}}}x.matrix=B.clone();if(I){return}if(D){B.prepend(D.scale,0,0,D.scale,D.dx*D.scale,D.dy*D.scale)}if(x.type!="image"&&k){k.origin="0,0";k.matrix=B.toString();m=B.offset();if(m[0]>32767){m[0]=32767}else{if(m[0]<-32768){m[0]=-32768}}if(m[1]>32767){m[1]=32767}else{if(m[1]<-32768){m[1]=-32768}}k.offset=m}else{z.filter=B.toFilter();z.left=Math.min(B.x(b.x,b.y),B.x(b.x+b.width,b.y),B.x(b.x,b.y+b.height),B.x(b.x+b.width,b.y+b.height))+"px";z.top=Math.min(B.y(b.x,b.y),B.y(b.x+b.width,b.y),B.y(b.x,b.y+b.height),B.y(b.x+b.width,b.y+b.height))+"px"}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(g){var d=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),a=[],j=Ext.create("Ext.util.MixedCollection"),l,e,b,h,k,c;j.addAll(g.stops);j.sortByKey("ASC",function(m,i){m=parseInt(m,10);i=parseInt(i,10);return m>i?1:(m<i?-1:0)});l=j.keys;e=j.items;b=l.length;for(c=0;c<b;c++){h=l[c];k=e[c];a.push(h+"% "+k.color)}d.add(g.id,{colors:a.join(","),angle:g.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(b,a){this.callParent([b,a]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){var a=this;if(Ext.enableFx){Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)}a.dragging=false},getRepairXY:function(a){return Ext.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.flash.Component",{extend:"Ext.Component",alternateClassName:"Ext.FlashComponent",alias:"widget.flash",flashVersion:"9.0.115",backgroundColor:"#ffffff",wmode:"opaque",swfWidth:"100%",swfHeight:"100%",expressInstall:false,renderTpl:['<div id="{swfId}"></div>'],initComponent:function(){this.callParent();this.addEvents("success","failure")},beforeRender:function(){this.callParent();Ext.applyIf(this.renderData,{swfId:this.getSwfId()})},afterRender:function(){var b=this,a=Ext.apply({},b.flashParams),c=Ext.apply({},b.flashVars);b.callParent();Ext.apply({allowScriptAccess:"always",bgcolor:b.backgroundColor,wmode:b.wmode},a);Ext.apply({allowedDomain:document.location.hostname},c);new swfobject.embedSWF(b.url,b.getSwfId(),b.swfWidth,b.swfHeight,b.flashVersion,b.expressInstall?b.statics.EXPRESS_INSTALL_URL:undefined,c,a,b.flashAttributes,Ext.bind(b.swfCallback,b))},swfCallback:function(b){var a=this;if(b.success){a.swf=Ext.get(b.ref);a.onSuccess();a.fireEvent("success",a)}else{a.onFailure();a.fireEvent("failure",a)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle("visibility","inherit")},onFailure:Ext.emptyFn,beforeDestroy:function(){var b=this,a=b.swf;if(a){swfobject.removeSWF(b.getSwfId());Ext.destroy(a);delete b.swf}b.callParent()},statics:{EXPRESS_INSTALL_URL:"http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf"}});Ext.define("Ext.form.CheckboxManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a){return this.filterBy(function(b){return b.name==a})},getWithValue:function(a,b){return this.filterBy(function(c){return c.name==a&&c.inputValue==b})},getChecked:function(a){return this.filterBy(function(b){return b.name==a&&b.checked})}});Ext.define("Ext.form.Label",{extend:"Ext.Component",alias:"widget.label",requires:["Ext.util.Format"],autoEl:"label",maskOnDisable:false,getElConfig:function(){var a=this;a.html=a.text?Ext.util.Format.htmlEncode(a.text):(a.html||"");return Ext.apply(a.callParent(),{htmlFor:a.forId||""})},setText:function(c,b){var a=this;b=b!==false;if(b){a.text=c;delete a.html}else{a.html=c;delete a.text}if(a.rendered){a.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(c):c}return this}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],autoEl:{tag:"table",cellpadding:0},childEls:["labelCell","labelEl","bodyEl","errorEl","inputRow"],labelableRenderTpl:["<tpl if=\"labelAlign=='top'\">","<tr>",'<td id="{id}-labelCell" colspan="3" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tr>","</tpl>",'<tr id="{id}-inputRow" <tpl if="inFormLayout">id="{id}"</tpl>>','<tpl if="labelOnLeft">','<td id="{id}-labelCell" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tpl>",'<td class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation" colspan="{bodyColspan}">',"{beforeSubTpl}","{[values.$comp.getSubTplMarkup()]}","{afterSubTpl}","</td>","<tpl if=\"msgTarget=='side'\">",'<td id="{id}-errorEl" class="{errorMsgCls}" style="display:none" width="{errorIconWidth}"></td>',"</tpl>","</tr>","<tpl if=\"msgTarget=='under'\">","<tr>",'<tpl if="labelOnLeft">',"<td></td>","</tpl>",'<td id="{id}-errorEl" class="{errorMsgClass}" colspan="{[values.labelOnLeft ? 2 : 3]}" style="display:none"></td>',"</tr>","</tpl>",{disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",noWrap:true,labelableInsertions:["beforeLabelTpl","afterLabelTpl","beforeSubTpl","afterSubTpl","beforeLabelTextTpl","afterLabelTextTpl","labelAttrTpl"],labelableRenderProps:"allowBlank,labelAlign,fieldBodyCls,baseBodyCls,clearCls,labelSeparator,msgTarget",initLabelable:function(){var a=this,b=a.padding;if(b){a.padding=undefined;a.extraMargins=Ext.Element.parseBox(b)}a.addCls(a.formItemCls);a.lastActiveError="";a.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},setFieldLabel:function(b){b=b||"";var d=this,e=d.labelSeparator,a=d.labelEl,c;d.fieldLabel=b;if(d.rendered){if(Ext.isEmpty(b)&&d.hideEmptyLabel){a.parent().setDisplayed("none")}else{if(e){c=b.substr(b.length-1);if(c!=e){b+=e}}a.update(b);a.parent().setDisplayed("")}d.updateLayout()}},getInsertionRenderData:function(d,e){var b=e.length,a,c;while(b--){a=e[b];c=this[a];if(c){if(typeof c!="string"){if(!c.isTemplate){c=Ext.XTemplate.getTpl(this,a)}c=c.apply(d)}}d[a]=c||""}return d},getLabelableRenderData:function(){var a=this,b,c;if(!Ext.form.Labelable.errorIconWidth){Ext.form.Labelable.errorIconWidth=(c=Ext.getBody().createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-invalid-icon"})).getWidth();c.remove()}b=Ext.copyTo({inFormLayout:a.ownerLayout&&a.ownerLayout.type==="form",inputId:a.getInputId(),labelOnLeft:a.labelAlign!="top",fieldLabel:a.getFieldLabel(),labelCellStyle:a.getLabelCellStyle(),labelCellAttrs:a.getLabelCellAttrs(),labelCls:a.getLabelCls(),labelStyle:a.getLabelStyle(),bodyColspan:a.getBodyColspan(),errorMsgCls:a.errorMsgCls+(a.autoFitErrors?"":" "+Ext.baseCSSPrefix+"external-error-icon"),errorIconWidth:Ext.form.Labelable.errorIconWidth},a,a.labelableRenderProps,true);a.getInsertionRenderData(b,a.labelableInsertions);return b},beforeLabelableRender:function(){var a=this;if(a.ownerLayout){a.addCls(Ext.baseCSSPrefix+a.ownerLayout.type+"-form-item")}},onLabelableRender:function(){var c=this,d,a,b={};if(c.extraMargins){d=c.el.getMargin();for(a in d){if(d.hasOwnProperty(a)){b["margin-"+a]=(d[a]+c.extraMargins[a])+"px"}}c.el.setStyle(b)}},hasVisibleLabel:function(){if(this.hideLabel){return false}return !(this.hideEmptyLabel&&!this.getFieldLabel())},getBodyColspan:function(){var c=this,b=!c.hasVisibleLabel(),a;a=(b||c.labelAlign==="top")?3:2;if(c.hasActiveError()){a--}return a},getLabelCls:function(){var b=this.labelCls,a=this.labelClsExtra;return a?b+" "+a:b},getLabelCellStyle:function(){var b=this,a=b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel);return a?"display:none;":""},getLabelCellAttrs:function(){var c=this,b=c.labelAlign,a="";if(b!=="top"){a='valign="top" halign="'+b+'" width="'+(c.labelWidth+c.labelPad)+'"'}return a+' class="'+Ext.baseCSSPrefix+'field-label-cell"'},getLabelStyle:function(){var c=this,b=c.labelPad,a="";if(c.labelAlign==="top"){a="margin-bottom:"+b+"px;"}else{if(c.labelWidth){a="width:"+c.labelWidth+"px;"}a+="margin-right:"+b+"px;"}return a+(c.labelStyle||"")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.setActiveErrors(a)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){a=Ext.Array.from(a);this.activeError=a[0];this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);if(c.errorEl){c.errorEl.dom.innerHTML=b}}},setFieldDefaults:function(c){var b=this,d,a;for(a in c){if(c.hasOwnProperty(a)){d=c[a];if(!b.hasOwnProperty(a)){b[a]=d}}}}});Ext.define("Ext.form.RadioManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a,b){return this.filterBy(function(c){return c.name==a&&c.getFormId()==b})},getWithValue:function(a,b,c){return this.filterBy(function(d){return d.name==a&&d.inputValue==b&&d.getFormId()==c})},getChecked:function(a,b){return this.findBy(function(c){return c.name==a&&c.checked&&c.getFormId()==b})}});Ext.define("Ext.form.action.DirectSubmit",{extend:"Ext.form.action.Submit",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectSubmit",alias:"formaction.directsubmit",type:"directsubmit",doSubmit:function(){var b=this,c=Ext.Function.bind(b.onComplete,b),a=b.buildForm();b.form.api.submit(a,c,b);Ext.removeNode(a)},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.Load",{extend:"Ext.form.action.Action",requires:["Ext.data.Connection"],alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.form.action.DirectLoad",{extend:"Ext.form.action.Load",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectLoad",alias:"formaction.directload",type:"directload",run:function(){var d=this,c=d.form,b=c.api.load,e=b.directCfg.method,a=e.getArgs(d.getParams(),c.paramOrder,c.paramsAsHash);a.push(d.onComplete,d);b.apply(window,a)},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.StandardSubmit",{extend:"Ext.form.action.Submit",alias:"formaction.standardsubmit",doSubmit:function(){var a=this.buildForm();a.submit();Ext.removeNode(a)}});Ext.define("Ext.grid.ColumnComponentLayout",{extend:"Ext.layout.component.Auto",alias:"layout.columncomponent",type:"columncomponent",setWidthInDom:true,getContentHeight:function(a){return this.owner.isGroupHeader?a.getProp("contentHeight"):this.callParent(arguments)},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(this.owner.isGroupHeader){a+=this.owner.titleEl.dom.offsetHeight}return a},getContentWidth:function(a){return this.owner.isGroupHeader?a.getProp("contentWidth"):this.callParent(arguments)},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getPaddingInfo().width}});Ext.define("Ext.grid.feature.AbstractSummary",{extend:"Ext.grid.feature.Feature",alias:"feature.abstractsummary",showSummaryRow:true,nestedIdRe:/\{\{id\}([\w\-]*)\}/g,init:function(){var a=this;a.grid.optimizedColumnMove=false;a.view.mon(a.view.store,{update:a.onStoreUpdate,scope:a})},onStoreUpdate:function(){var a=this.view;if(this.showSummaryRow){a.saveScrollState();a.refresh();a.restoreScrollState()}},toggleSummaryRow:function(a){this.showSummaryRow=!!a},getSummaryFragments:function(){var a={};if(this.showSummaryRow){Ext.apply(a,{printSummaryRow:Ext.bind(this.printSummaryRow,this)})}return a},printSummaryRow:function(b){var a=this.view.getTableChunker().metaRowTpl.join(""),c=Ext.baseCSSPrefix;a=a.replace(c+"grid-row",c+"grid-row-summary");a=a.replace("{{id}}","{gridSummaryValue}");a=a.replace(this.nestedIdRe,"{id$1}");a=a.replace("{[this.embedRowCls()]}","{rowCls}");a=a.replace("{[this.embedRowAttr()]}","{rowAttr}");a=new Ext.XTemplate(a,{firstOrLastCls:Ext.view.TableChunker.firstOrLastCls});return a.applyTemplate({columns:this.getPrintData(b)})},getColumnValue:function(c,a){var b=Ext.getCmp(c.id),e=a[c.id],d=b.summaryRenderer;if(!e&&e!==0){e="\u00a0"}if(d){e=d.call(b.scope||this,e,a,c.dataIndex)}return e},getSummary:function(a,b,d,c){if(b){if(Ext.isFunction(b)){return a.aggregate(b,null,c)}switch(b){case"count":return a.count(c);case"min":return a.min(d,c);case"max":return a.max(d,c);case"sum":return a.sum(d,c);case"average":return a.average(d,c);default:return c?{}:""}}}});Ext.define("Ext.grid.feature.Chunking",{extend:"Ext.grid.feature.Feature",alias:"feature.chunking",chunkSize:20,rowHeight:Ext.isIE?27:26,visibleChunk:0,hasFeatureEvent:false,attachEvents:function(){this.view.el.on("scroll",this.onBodyScroll,this,{buffer:300})},onBodyScroll:function(g,c){var b=this.view,d=c.scrollTop,a=Math.floor(d/this.rowHeight/this.chunkSize);if(a!==this.visibleChunk){this.visibleChunk=a;b.refresh();b.el.dom.scrollTop=d;b.el.dom.scrollTop=d}},collectData:function(d,m,l,k,j){var c={fullWidth:j.fullWidth,chunks:[]},e=j.rows.length,b=0,g=0,a=this.visibleChunk,h,p,n;for(;b<e;b+=this.chunkSize,g++){if(b+this.chunkSize>e){n=e-b}else{n=this.chunkSize}if(g>=a-1&&g<=a+1){p=j.rows.slice(b,b+this.chunkSize)}else{p=[]}c.chunks.push({rows:p,fullWidth:k,chunkHeight:n*this.rowHeight})}return c},getTableFragments:function(){return{openTableWrap:function(){return'<tpl for="chunks"><div class="'+Ext.baseCSSPrefix+'grid-chunk" style="height: {chunkHeight}px;">'},closeTableWrap:function(){return"</div></tpl>"}}}});Ext.define("Ext.grid.feature.GroupingSummary",{extend:"Ext.grid.feature.Grouping",alias:"feature.groupingsummary",mixins:{summary:"Ext.grid.feature.AbstractSummary"},init:function(){this.mixins.summary.init.call(this)},getFeatureTpl:function(){var a=this.callParent(arguments);if(this.showSummaryRow){a=a.replace("</tpl>","");a+="{[this.printSummaryRow(xindex)]}</tpl>"}return a},getFragmentTpl:function(){var b=this,a=b.callParent();Ext.apply(a,b.getSummaryFragments());if(b.showSummaryRow){b.summaryGroups=b.view.store.getGroups();b.summaryData=b.generateSummaryData()}return a},getPrintData:function(j){var k=this,e=k.view.headerCt.getColumnsForTpl(),h=0,b=e.length,g=[],a=k.summaryGroups[j-1].name,d=k.summaryData[a],c;for(;h<b;++h){c=e[h];c.gridSummaryValue=this.getColumnValue(c,d);g.push(c)}return g},generateSummaryData:function(){var t=this,u={},n={},h=t.view.store,r=this.getGroupField(),a=h.proxy.reader,q=t.summaryGroups,b=t.view.headerCt.getColumnsForTpl(),j,o,e,c,m,v,p,k,l,g,d;for(o=0,e=q.length;o<e;++o){u[q[o].name]={}}if(t.remoteRoot&&a.rawData){m=a.root;a.root=t.remoteRoot;a.buildExtractors(true);k=a.getRoot(a.rawData);g=k.length;if(!a.convertRecordData){a.buildExtractors()}for(l=0;l<g;l++){d={};a.convertRecordData(d,k[l]);n[d[r]]=d}a.root=m;a.buildExtractors(true)}for(o=0,e=b.length;o<e;++o){p=Ext.getCmp(b[o].id);c=t.getSummary(h,p.summaryType,p.dataIndex,true);for(v in c){if(c.hasOwnProperty(v)){u[v][p.id]=c[v]}}for(v in n){if(n.hasOwnProperty(v)){j=n[v][p.dataIndex];if(j!==undefined&&u[v]!==undefined){u[v][p.id]=j}}}}return u}});Ext.define("Ext.grid.feature.Summary",{extend:"Ext.grid.feature.AbstractSummary",alias:"feature.summary",getFragmentTpl:function(){this.summaryData=this.generateSummaryData();return this.getSummaryFragments()},getTableFragments:function(){if(this.showSummaryRow){return{closeRows:this.closeRows}}},closeRows:function(){return"</tpl>{[this.printSummaryRow()]}"},getPrintData:function(a){var g=this,c=g.view.headerCt.getColumnsForTpl(),b=0,e=c.length,h=[],j=g.summaryData,d;for(;b<e;++b){d=c[b];d.gridSummaryValue=this.getColumnValue(d,j);h.push(d)}return h},generateSummaryData:function(){var h=this,d={},j=h.view.store,c=h.view.headerCt.getColumnsForTpl(),e=0,a=c.length,b,k,g;for(e=0,a=c.length;e<a;++e){g=Ext.getCmp(c[e].id);d[g.id]=h.getSummary(j,g.summaryType,g.dataIndex,false)}return d}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a,c;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:"&#160;"},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:"&#160;"},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),h,g;if((c.right-a)<=(c.right-c.left)/2){h="after"}else{h="before"}return{pos:h,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(x,p,v){var a=this.getLocation(v,p),r=a.header,h=a.pos,g=x.nextSibling("gridcolumn:not([hidden])"),u=x.previousSibling("gridcolumn:not([hidden])"),d,m,s,t,b,c,l,n,y,w,o,k,q,j;if(!r.draggable&&r.getIndex()===0){return false}this.lastLocation=a;if((x!==r)&&((h==="before"&&g!==r)||(h==="after"&&u!==r))&&!r.isDescendantOf(x)){o=Ext.dd.DragDropManager.getRelated(this);k=o.length;q=0;for(;q<k;q++){j=o[q];if(j!==this&&j.invalidateDrop){j.invalidateDrop()}}this.valid=true;m=this.getTopIndicator();s=this.getBottomIndicator();if(h==="before"){t="tl";b="bl"}else{t="tr";b="br"}c=r.el.getAnchorXY(t);l=r.el.getAnchorXY(b);n=this.headerCt.el;y=n.getLeft();w=n.getRight();c[0]=Ext.Number.constrain(c[0],y,w);l[0]=Ext.Number.constrain(l[0],y,w);c[0]-=4;c[1]-=9;l[0]-=4;m.setXY(c);s.setXY(l);m.show();s.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(b,h,g,c){var i=this,d=i.headerCt,a=true,k=c.header,j;if(c.header.el.dom===b){a=false}else{j=i.getLocation(g,b).header;a=(k.ownerCt===j.ownerCt)||(!k.ownerCt.sealed&&!j.ownerCt.sealed)}if(a){i.positionIndicator(c.header,b,g)}else{i.valid=false}return i.valid?i.dropAllowed:i.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(g,o,m,i){if(this.valid){this.invalidateDrop();var l=i.header,j=this.lastLocation,b=j.header,q=l.ownerCt,n=q.items.indexOf(l),k=b.ownerCt,s=k.items.indexOf(b),d=this.headerCt,a=d.getHeaderIndex(l),h=l.isGroupHeader?l.query(":not([isGroupHeader])").length:1,r=d.getHeaderIndex(b),p,c;if(j.pos==="after"){s++;r+=b.isGroupHeader?b.query(":not([isGroupHeader])").length:1}if(q!==k&&q.lockableInjected&&k.lockableInjected&&k.lockedCt){c=q.up("[scrollerOwner]");c.lock(l,s)}else{if(q!==k&&q.lockableInjected&&k.lockableInjected&&q.lockedCt){c=q.up("[scrollerOwner]");c.unlock(l,s)}else{if((q===k)&&(s>n)){s-=1}Ext.suspendLayouts();if(q!==k){q.remove(l,false);if(q.isGroupHeader){if(!q.items.getCount()){p=q.ownerCt;p.remove(q,false);q.el.dom.parentNode.removeChild(q.el.dom)}}}if(q===k){k.move(n,s)}else{k.insert(s,l)}if(k.isGroupHeader){if(k!==q){l.savedFlex=l.flex;delete l.flex;l.width=l.getWidth()}}else{if(l.savedFlex){l.flex=l.savedFlex;delete l.width}}d.purgeCache();Ext.resumeLayouts(true);d.onHeaderMoved(l,h,a,r);if(!q.items.getCount()){q.destroy()}}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.util.Observable",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on({render:this.onHeaderCtRender,single:true,scope:this})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){var a=this;a.dragZone=new Ext.grid.header.DragZone(a.headerCt);a.dropZone=new Ext.grid.header.DropZone(a.headerCt);if(a.disabled){a.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.property.Property",{extend:"Ext.data.Model",alternateClassName:"Ext.PropGridProperty",fields:[{name:"name",type:"string"},{name:"value"}],idProperty:"name"});Ext.define("Ext.grid.property.Store",{extend:"Ext.data.Store",alternateClassName:"Ext.grid.PropertyStore",sortOnLoad:false,uses:["Ext.data.reader.Reader","Ext.data.proxy.Proxy","Ext.data.ResultSet","Ext.grid.property.Property"],constructor:function(a,c){var b=this;b.grid=a;b.source=c;b.callParent([{data:c,model:Ext.grid.property.Property,proxy:b.getProxy()}])},getProxy:function(){if(!this.proxy){Ext.grid.property.Store.prototype.proxy=new Ext.data.proxy.Memory({model:Ext.grid.property.Property,reader:this.getReader()})}return this.proxy},getReader:function(){if(!this.reader){Ext.grid.property.Store.prototype.reader=new Ext.data.reader.Reader({model:Ext.grid.property.Property,buildExtractors:Ext.emptyFn,read:function(a){return this.readRecords(a)},readRecords:function(b){var d,c,a={records:[],success:true};for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(this.isEditableValue(d)){a.records.push(new Ext.grid.property.Property({name:c,value:d},c))}}}a.total=a.count=a.records.length;return new Ext.data.ResultSet(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)}})}return this.reader},setSource:function(a){var b=this;b.source=a;b.suspendEvents();b.removeAll();b.proxy.data=a;b.load();b.resumeEvents();b.fireEvent("datachanged",b);b.fireEvent("refresh",b)},getProperty:function(a){return Ext.isNumber(a)?this.getAt(a):this.getById(a)},setValue:function(e,c,a){var b=this,d=b.getRec(e);if(d){d.set("value",c);b.source[e]=c}else{if(a){b.source[e]=c;d=new Ext.grid.property.Property({name:e,value:c},e);b.add(d)}}},remove:function(b){var a=this.getRec(b);if(a){this.callParent([a]);delete this.source[b]}},getRec:function(a){return this.getById(a)},getSource:function(){return this.source}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Auto",type:"body",beginLayout:function(a){this.callParent(arguments);a.bodyContext=a.getEl("body")},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(c.targetContext!=c){a+=c.getPaddingInfo().height}return a},calculateOwnerWidthFromContentWidth:function(c,a){var b=this.callParent(arguments);if(c.targetContext!=c){b+=c.getPaddingInfo().width}return b},measureContentWidth:function(a){return a.bodyContext.setWidth(a.bodyContext.el.dom.offsetWidth,false)},measureContentHeight:function(a){return a.bodyContext.setHeight(a.bodyContext.el.dom.offsetHeight,false)},publishInnerHeight:function(c,a){var d=a-c.getFrameInfo().height,b=c.targetContext;if(b!=c){d-=c.getPaddingInfo().height}c.bodyContext.setHeight(d,!c.heightModel.natural)},publishInnerWidth:function(d,c){var a=c-d.getFrameInfo().width,b=d.targetContext;if(b!=d){a-=d.getPaddingInfo().width}d.bodyContext.setWidth(a,!d.widthModel.natural)}});Ext.define("Ext.layout.component.BoundList",{extend:"Ext.layout.component.Auto",alias:"layout.boundlist",type:"component",beginLayout:function(d){var c=this,a=c.owner,b=a.pagingToolbar;c.callParent(arguments);if(a.floating){d.savedXY=a.el.getXY();a.el.setXY([-9999,-9999])}if(b){d.toolbarContext=d.context.getCmp(b)}d.listContext=d.getEl("listEl")},beginLayoutCycle:function(b){var a=this.owner;this.callParent(arguments);if(b.heightModel.auto){a.el.setHeight("auto");a.listEl.setHeight("auto")}},getLayoutItems:function(){var a=this.owner.pagingToolbar;return a?[a]:[]},isValidParent:function(){return true},finishedLayout:function(a){var b=a.savedXY;this.callParent(arguments);if(b){this.owner.el.setXY(b)}},measureContentWidth:function(a){return this.owner.listEl.getWidth()},measureContentHeight:function(a){return this.owner.listEl.getHeight()},publishInnerHeight:function(c,a){var b=c.toolbarContext,d=0;if(b){d=b.getProp("height")}if(d===undefined){this.done=false}else{c.listContext.setHeight(a-c.getFrameInfo().height-d)}},calculateOwnerHeightFromContentHeight:function(c){var a=this.callParent(arguments),b=c.toolbarContext;if(b){a+=b.getProp("height")}return a}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Auto",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,constructor:function(){this.callParent(arguments);this.hackWidth=Ext.isIE&&(!Ext.isStrict||Ext.isIE6||Ext.isIE7);this.heightIncludesPadding=Ext.isIE6&&Ext.isStrict},beginLayout:function(a){this.callParent(arguments);this.cacheTargetInfo(a)},beginLayoutCycle:function(e){var c=this,d="",a=c.owner,b=a.btnEl,i=a.btnInnerEl,g=a.text,h;c.callParent(arguments);i.setStyle("overflow",d);if(!e.widthModel.natural){a.el.setStyle("width",d)}h=e.heightModel.shrinkWrap&&g&&c.htmlRE.test(g);b.setStyle("width",d);b.setStyle("height",h?"auto":d);i.setStyle("width",d);i.setStyle("height",h?"auto":d);i.setStyle("line-height",h?"normal":d);i.setStyle("padding-top",d);a.btnIconEl.setStyle("width",d)},calculateOwnerHeightFromContentHeight:function(b,a){return a},calculateOwnerWidthFromContentWidth:function(b,a){return a},measureContentWidth:function(c){var i=this,b=i.owner,g=b.btnEl,d=b.btnInnerEl,l=b.text,m,j,h,a,k,e;if(b.text&&i.hackWidth&&g){m=i.btnFrameWidth;if(l.indexOf(">")===-1){l=l.replace(/</g,"&lt;")}j=Ext.util.TextMetrics.measure(d,l);a=j.width+m+i.adjWidth;k=c.getEl("btnEl");e=c.getEl("btnInnerEl");h=(b.icon||b.iconCls)&&(b.iconAlign=="top"||b.iconAlign=="bottom");c.setWidth(a);k.setWidth(j.width+m);e.setWidth(j.width+m);if(h){b.btnIconEl.setWidth(j.width+m)}}else{a=c.el.getWidth()}return a},measureContentHeight:function(d){var j=this,b=j.owner,e=b.btnInnerEl,i=d.getEl("btnEl"),g=d.getEl("btnInnerEl"),c=j.minTextHeight,h=j.adjHeight,m=b.getText(),l,k,a;if(b.vertical){l=Ext.util.TextMetrics.measure(e,b.text).width;l+=j.btnFrameHeight+h;d.setHeight(l,true,true)}else{if(m&&j.htmlRE.test(m)){k=e.getHeight();if(k<c){a=Math.floor((c-k)/2);g.setHeight(c-(j.heightIncludesPadding?a:0));g.setProp("padding-top",a);k=c}l=k+h}else{l=d.el.getHeight()}}i.setHeight(l-h);return l},publishInnerHeight:function(c,m){var j=this,a=j.owner,g=Ext.isNumber,i=c.getEl("btnEl"),d=a.btnInnerEl,h=c.getEl("btnInnerEl"),e=g(m)?m-j.adjHeight:m,b=j.btnFrameHeight,l=a.getText(),k,n;i.setHeight(e);h.setHeight(e);if(!a.vertical&&e>=0){h.setProp("line-height",e-b+"px")}if(l&&j.htmlRE.test(l)){h.setProp("line-height","normal");d.setStyle("line-height","normal");k=Ext.util.TextMetrics.measure(d,l).height;n=Math.floor(Math.max(e-b-k,0)/2);h.setProp("padding-top",j.btnFrameTop+n);h.setHeight(e-(j.heightIncludesPadding?n:0))}},publishInnerWidth:function(g,c){var e=this,h=Ext.isNumber,a=g.getEl("btnEl"),b=g.getEl("btnInnerEl"),d=h(c)?c-e.adjWidth:c;a.setWidth(d);b.setWidth(d)},clearTargetCache:function(){delete this.adjWidth},cacheTargetInfo:function(b){var g=this,a=g.owner,d=a.scale,i,e,j,c,h;if(!("adjWidth" in g)||g.lastScale!==d){if(g.lastScale){a.btnInnerEl.setStyle("line-height","")}g.lastScale=d;i=b.getPaddingInfo();e=b.getFrameInfo();j=b.getEl("btnWrap").getPaddingInfo();c=b.getEl("btnInnerEl");h=c.getPaddingInfo();Ext.apply(g,{adjWidth:j.width+e.width+i.width,adjHeight:j.height+e.height+i.height,btnFrameWidth:h.width,btnFrameHeight:h.height,btnFrameTop:h.top,minTextHeight:parseInt(c.getStyle("line-height"),10)})}g.callParent(arguments)}});Ext.define("Ext.layout.component.Dock",{extend:"Ext.layout.component.Component",alias:"layout.dock",alternateClassName:"Ext.layout.component.AbstractDock",type:"dock",initializedBorders:-1,horizontalCollapsePolicy:{width:true,x:true},verticalCollapsePolicy:{height:true,y:true},finishRender:function(){var b=this,c,a;b.callParent();c=b.getRenderTarget();a=b.getDockedItems();b.finishRenderItems(c,a)},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},dockOpposites:{top:"bottom",right:"left",bottom:"top",left:"right"},handleItemBorders:function(){var l=this,a=l.owner,k,o,d=l.borders,g=l.dockOpposites,b=a.dockedItems.generation,e,j,n,m,h,c=l.collapsed;if(l.initializedBorders==b||(a.border&&!a.manageBodyBorders)){return}l.initializedBorders=b;l.collapsed=false;o=l.getLayoutItems();l.collapsed=c;k={top:[],right:[],bottom:[],left:[]};for(e=0,j=o.length;e<j;e++){n=o[e];m=n.dock;if(n.ignoreBorderManagement){continue}if(!k[m].satisfied){k[m].push(n);k[m].satisfied=true}if(!k.top.satisfied&&g[m]!=="top"){k.top.push(n)}if(!k.right.satisfied&&g[m]!=="right"){k.right.push(n)}if(!k.bottom.satisfied&&g[m]!=="bottom"){k.bottom.push(n)}if(!k.left.satisfied&&g[m]!=="left"){k.left.push(n)}}if(d){for(h in d){if(d.hasOwnProperty(h)){j=d[h].length;if(!a.manageBodyBorders){for(e=0;e<j;e++){d[h][e].removeCls(Ext.baseCSSPrefix+"docked-noborder-"+h)}if(!d[h].satisfied&&!a.bodyBorder){a.removeBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+h)}}else{if(d[h].satisfied){a.setBodyStyle("border-"+h+"-width","")}}}}}for(h in k){if(k.hasOwnProperty(h)){j=k[h].length;if(!a.manageBodyBorders){for(e=0;e<j;e++){k[h][e].addCls(Ext.baseCSSPrefix+"docked-noborder-"+h)}if((!k[h].satisfied&&!a.bodyBorder)||a.bodyBorder===false){a.addBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+h)}}else{if(k[h].satisfied){a.setBodyStyle("border-"+h+"-width","1px")}}}}l.borders=k},beginLayout:function(d){var m=this,c=m.owner,p=m.getLayoutItems(),b=d.context,h=p.length,l=false,e=false,n,k,o,a,g,j;m.callParent(arguments);m.handleItemBorders();j=c.getCollapsed();if(Ext.isDefined(m.lastCollapsedState)&&(j!==m.lastCollapsedState)){if(m.owner.collapsed){d.isCollapsingOrExpanding=1;c.addClsWithUI(c.collapsedCls)}else{d.isCollapsingOrExpanding=2;c.removeClsWithUI(c.collapsedCls);d.lastCollapsedState=m.lastCollapsedState}}m.lastCollapsedState=j;d.dockedItems=n=[];for(k=0;k<h;k++){o=p[k];a=b.getCmp(o);a.dockedAt={x:0,y:0};a.offsets=g=Ext.Element.parseBox(o.offsets||{});g.width=g.left+g.right;g.height=g.top+g.bottom;n.push(a)}if(c.collapsed){if(c.collapsedVertical()){l=true;d.measureDimensions=1}else{e=true;d.measureDimensions=2}}d.collapsedVert=l;d.collapsedHorz=e;d.bodyContext=d.getEl("body")},beginLayoutCycle:function(b){var e=this,l=b.dockedItems,d=l.length,a=e.owner,g=a.frameBody,k=e.lastHeightModel,c,j,h;e.callParent(arguments);if(b.collapsedVert){b.heightModel=e.sizeModels.shrinkWrap}else{if(b.collapsedHorz){b.widthModel=e.sizeModels.shrinkWrap}}if(k&&k.shrinkWrap&&!b.heightModel.shrinkWrap&&!e.owner.manageHeight){a.body.dom.style.marginBottom=""}if(b.widthModel.auto){if(b.widthModel.shrinkWrap){a.el.setWidth(null)}a.body.setWidth(null);if(g){g.setWidth(null)}}if(b.heightModel.auto){a.body.setHeight(null);if(g){g.setHeight(null)}}if(b.collapsedVert){b.setContentHeight(0)}else{if(b.collapsedHorz){b.setContentWidth(0)}}for(c=0;c<d;c++){j=l[c].target;h=j.dock;if(h=="right"){j.el.setLeft(0)}else{if(h!="left"){continue}}}},calculate:function(d){var k=this,c=k.measureAutoDimensions(d,d.measureDimensions),b=d.state,j=b.horzDone,e=b.vertDone,g=d.bodyContext,a,i,h,l;d.borderInfo||d.getBorderInfo();d.paddingInfo||d.getPaddingInfo();d.framingInfo||d.getFraming();g.borderInfo||g.getBorderInfo();g.paddingInfo||g.getPaddingInfo();a=!j&&k.createAxis(d,c.contentWidth,d.widthModel,"left","right","x","width","Width",d.collapsedHorz);i=!e&&k.createAxis(d,c.contentHeight,d.heightModel,"top","bottom","y","height","Height",d.collapsedVert);for(h=0,l=d.dockedItems.length;l--;++h){if(a){k.dockChild(d,a,l,h)}if(i){k.dockChild(d,i,l,h)}}if(a&&k.finishAxis(d,a)){b.horzDone=j=a}if(i&&k.finishAxis(d,i)){b.vertDone=e=i}if(j&&e&&k.finishConstraints(d,j,e)){k.finishPositions(d,j,e)}else{k.done=false}},createAxis:function(p,j,e,n,i,t,m,k,d){var v=0,b=this.owner,g=b["max"+k],c=b["min"+k]||0,l=g!=null,w=p.state["constrained"+k],o=w!=null,u="set"+k,r,a,s,q,h;if(e.shrinkWrap&&!o){if(d){h=0}else{a=p.bodyContext;h=j+a.borderInfo[m]}}else{r=p.borderInfo;s=p.framingInfo;q=p.paddingInfo;if(o){h=w;e=this.sizeModels.calculated;p[u](w)}else{h=p.getProp(m)}h-=r[i]+q[i]+s[i];v=r[n]+q[n]+s[n]}return{shrinkWrap:e.shrinkWrap,sizeModel:e,begin:v,end:h,collapsed:d,horizontal:t=="x",ignoreFrameBegin:false,ignoreFrameEnd:false,initialSize:h-v,hasMinMaxConstraints:(c||l)&&e.shrinkWrap,isConstrainedSize:o,minSize:c,maxSize:l?g:1000000000,bodyPosProp:this.owner.manageHeight?t:("margin-"+n),dockBegin:n,dockEnd:i,posProp:t,sizeProp:m,sizePropCap:k,setSize:u,dockedPixelsEnd:0}},dockChild:function(b,c,j,d){var e=this,a=b.dockedItems[c.shrinkWrap?j:d],h=a.target,i=h.dock,g;if(h.ignoreParentFrame&&b.isCollapsingOrExpanding){a.clearMarginCache()}if(i==c.dockBegin){if(c.shrinkWrap){g=e.dockOutwardBegin(b,a,h,c)}else{g=e.dockInwardBegin(b,a,h,c)}}else{if(i==c.dockEnd){if(c.shrinkWrap){g=e.dockOutwardEnd(b,a,h,c)}else{g=e.dockInwardEnd(b,a,h,c)}}else{g=e.dockStretch(b,a,h,c)}}a.dockedAt[c.posProp]=g},dockInwardBegin:function(g,e,d,b){var i=b.begin,h=b.sizeProp,a,c;if(d.ignoreParentFrame){c=d.dock;i-=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c]}if(!d.overlay){a=e.getProp(h)+e.getMarginInfo()[h];b.begin+=a}return i},dockInwardEnd:function(e,d,c,b){var h=b.sizeProp,a=d.getProp(h)+d.getMarginInfo()[h],g=b.end-a;if(!c.overlay){b.end=g}if(c.ignoreParentFrame){g+=e.borderInfo[c.dock]+e.paddingInfo[c.dock]+e.framingInfo[c.dock]}return g},dockOutwardBegin:function(g,e,d,b){var i=b.begin,h=b.sizeProp,c,a;if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=true}else{if(d.ignoreParentFrame){c=d.dock;i-=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c];b.ignoreFrameBegin=true}}if(!d.overlay){a=e.getProp(h)+e.getMarginInfo()[h];i-=a;b.begin=i}return i},dockOutwardEnd:function(g,e,d,b){var i=b.end,h=b.sizeProp,c,a;a=e.getProp(h)+e.getMarginInfo()[h];if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=true}else{if(d.ignoreParentFrame){c=d.dock;i+=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c];b.ignoreFrameEnd=true}}if(!d.overlay){b.end=i+a;b.dockedPixelsEnd+=a}return i},dockStretch:function(c,b,n,d){var o=n.dock,j=d.sizeProp,a=o=="top"||o=="bottom",e=b.offsets,i=c.borderInfo,m=c.paddingInfo,h=a?"right":"bottom",q=a?"left":"top",l=d.begin+e[q],g,p,k;if(n.stretch!==false){p=d.end-l-e[h];if(n.ignoreParentFrame){k=c.framingInfo;l-=i[q]+m[q]+k[q];p+=i[j]+m[j]+k[j]}g=b.getMarginInfo();p-=g[j];b[d.setSize](p)}return l},finishAxis:function(c,e){var o=e.end-e.begin,l=e.setSize,d=e.dockBegin,i=e.dockEnd,j=c.borderInfo,m=c.paddingInfo,k=c.framingInfo,h=m[d]+j[d]+k[d],g=c.bodyContext,n,a,b;if(e.shrinkWrap){e.delta=-e.begin;a=e.initialSize;if(e.ignoreFrameBegin){e.delta-=j[d];n=-e.begin-h}else{o+=h;e.delta+=m[d]+k[d];n=-e.begin}if(!e.ignoreFrameEnd){o+=m[i]+j[i]+k[i]}e.size=o;if(!e.horizontal&&!this.owner.manageHeight){b=false}}else{e.delta=-j[e.dockBegin];a=o;n=e.begin-h}g[l](a,b);g.setProp(e.bodyPosProp,n);return !isNaN(o)},finishConstraints:function(g,a,i){var l=a.size<a.minSize,b=a.size>a.maxSize,j=i.size<i.minSize,c=i.size>i.maxSize,e=g.state,k=true,h=this.sizeModels.configured,d;if(a.shrinkWrap&&b&&i.shrinkWrap&&j){e.constrainedWidth=a.maxSize;g.widthModel=h;k=false}else{if(a.shrinkWrap){if(b){e.constrainedWidth=a.maxSize;g.widthModel=h;k=false}else{if(l){e.constrainedWidth=a.minSize;g.widthModel=h;k=false}}}if(i.shrinkWrap){if(c){e.constrainedHeight=i.maxSize;g.heightModel=h;k=false}else{if(j){e.constrainedHeight=i.minSize;g.heightModel=h;k=false}}}}if(k){if(a.shrinkWrap){g.setWidth(a.size)}if(i.shrinkWrap){if(!g.collapsedVert&&!this.owner.manageHeight){d=false;g.bodyContext.setProp("margin-bottom",i.dockedPixelsEnd)}g.setHeight(i.size,d)}}else{g.invalidate({state:{constrainedWidth:e.constrainedWidth,constrainedHeight:e.constrainedHeight}})}return k},finishPositions:function(d,a,h){var j=d.dockedItems,c=j.length,g=a.delta,e=h.delta,i,b;for(i=0;i<c;++i){b=j[i];b.setProp("x",g+b.dockedAt.x);b.setProp("y",e+b.dockedAt.y)}},finishedLayout:function(b){var a=this,c=b.target;a.callParent(arguments);if(!b.animatePolicy){if(b.isCollapsingOrExpanding===1){c.afterCollapse(false)}else{if(b.isCollapsingOrExpanding===2){c.afterExpand(false)}}}},getAnimatePolicy:function(c){var b=this,a,d;if(c.isCollapsingOrExpanding==1){a=b.lastCollapsedState}else{if(c.isCollapsingOrExpanding==2){a=c.lastCollapsedState}}if(a=="left"||a=="right"){d=b.horizontalCollapsePolicy}else{if(a=="top"||a=="bottom"){d=b.verticalCollapsePolicy}}return d},getDockedItems:function(c,m){var h=this,j=h.owner.dockedItems.items,g=j&&j.length&&c!==false,b,l,k,e,d,a;if(m==null){k=g?j.slice():j}else{k=[];for(e=0,a=j.length;e<a;++e){l=j[e].dock;d=(l=="top"||l=="left");if(m?d:!d){k.push(j[e])}}g=g&&k.length}if(g){b=(c=c||"render")=="render";Ext.Array.sort(k,function(n,i){var o,p;if(b&&((o=h.owner.dockOrder[n.dock])!==(p=h.owner.dockOrder[i.dock]))){if(!(o+p)){return o-p}}o=h.getItemWeight(n,c);p=h.getItemWeight(i,c);if((o!==undefined)&&(p!==undefined)){return o-p}return 0})}return k||[]},getItemWeight:function(b,a){var c=b.weight||this.owner.defaultDockWeights[b.dock];return c[a]||c},getLayoutItems:function(){var e=this,b,g,d,c,a;if(e.owner.collapsed){a=e.owner.getCollapsedDockedItems()}else{b=e.getDockedItems("visual");g=b.length;a=[];for(c=0;c<g;c++){d=b[c];if(!d.hidden){a.push(d)}}}return a},measureContentWidth:function(a){var b=a.bodyContext;return b.el.getWidth()-b.getBorderInfo().width},measureContentHeight:function(a){var b=a.bodyContext;return b.el.getHeight()-b.getBorderInfo().height},redoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.show()}a.addClsWithUI(a.collapsedCls);c.redo(true)}else{if(c.isCollapsingOrExpanding==2){a.removeClsWithUI(a.collapsedCls);c.bodyContext.redo()}}},renderChildren:function(){var b=this,a=b.getDockedItems(),c=b.getRenderTarget();b.renderItems(a,c)},renderItems:function(k,h){var m=this,c=k.length,a=0,b=0,o,p=0,l=m.getRenderTarget().dom.childNodes,n=l.length,g,d,e,o;for(g=0,d=0;g<n;g++){e=l[g];if(Ext.fly(e).hasCls("x-resizable-handle")){break}for(d=0;d<c;d++){o=k[d];if(o.rendered&&o.el.dom===e){break}}if(d===c){p++}}for(;a<c;a++,b++){o=k[a];if(a===b&&(o.dock==="right"||o.dock==="bottom")){b+=p}if(o&&!o.rendered){m.renderItem(o,h,b)}else{if(!m.isValidParent(o,h,b)){m.moveItem(o,h,b)}}}},undoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.hide()}a.removeClsWithUI(a.collapsedCls);c.undo(true)}else{if(c.isCollapsingOrExpanding==2){a.addClsWithUI(a.collapsedCls);c.bodyContext.undo()}}},sizePolicy:{nostretch:{setsWidth:0,setsHeight:0},stretchH:{setsWidth:1,setsHeight:0},stretchV:{setsWidth:0,setsHeight:1},autoStretchH:{readsWidth:1,setsWidth:1,setsHeight:0},autoStretchV:{readsHeight:1,setsWidth:0,setsHeight:1}},getItemSizePolicy:function(c){var d=this.sizePolicy,b,a;if(c.stretch===false){return d.nostretch}b=c.dock;a=(b=="left"||b=="right");if(a){return d.stretchV}return d.stretchH},configureItem:function(a,b){this.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"docked");a.addClsWithUI("docked-"+a.dock)},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+"-"+a.dock)}var b=a.el.dom;if(!a.destroying&&b){b.parentNode.removeChild(b)}this.childrenChanged=true}});Ext.define("Ext.layout.component.FieldSet",{extend:"Ext.layout.component.Body",alias:["layout.fieldset"],type:"fieldset",beginLayoutCycle:function(b){var c=b.target,a;this.callParent(arguments);if(c.collapsed){b.heightModel=this.sizeModels.shrinkWrap;b.setContentHeight(0);if(b.widthModel.shrinkWrap){a=c.lastComponentSize;b.setContentWidth((a&&a.contentWidth)||100)}}},calculateOwnerHeightFromContentHeight:function(b,a){return b.getProp("contentHeight")+b.getPaddingInfo().height+(b.target.legend?b.target.legend.getHeight():b.getBorderInfo().top)+b.getBorderInfo().bottom},publishInnerHeight:function(b,a){this.callParent(arguments);if(b.target.legend){b.bodyContext.setHeight(b.bodyContext.getProp("height")-b.target.legend.getHeight(),!b.heightModel.natural)}},getLayoutItems:function(){var a=this.owner.legend;if(a){return[a]}return[]}});Ext.define("Ext.layout.component.ProgressBar",{alias:["layout.progressbar"],extend:"Ext.layout.component.Auto",type:"progressbar",beginLayout:function(d){var b=this,a,c;b.callParent(arguments);if(!d.textEls){c=b.owner.textEl;if(c.isComposite){d.textEls=[];c=c.elements;for(a=c.length;a--;){d.textEls[a]=d.getEl(Ext.get(c[a]))}}else{d.textEls=[d.getEl("textEl")]}}},calculate:function(e){var c=this,a,d,b;c.callParent(arguments);if(Ext.isNumber(b=e.getProp("width"))){b-=e.getBorderInfo().width;d=e.textEls;for(a=d.length;a--;){d[a].setWidth(b)}}else{c.done=false}}});Ext.define("Ext.ProgressBar",{extend:"Ext.Component",alias:"widget.progressbar",requires:["Ext.Template","Ext.CompositeElement","Ext.TaskManager","Ext.layout.component.ProgressBar"],uses:["Ext.fx.Anim"],baseCls:Ext.baseCSSPrefix+"progress",animate:false,text:"",waitTimer:null,childEls:["bar"],renderTpl:['<tpl if="internalText">','<div class="{baseCls}-text {baseCls}-text-back">{text}</div>',"</tpl>",'<div id="{id}-bar" class="{baseCls}-bar" style="width:{percentage}%">','<tpl if="internalText">','<div class="{baseCls}-text">',"<div>{text}</div>","</div>","</tpl>","</div>"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addEvents("update")},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{internalText:!a.hasOwnProperty("textEl"),text:a.text||"&#160;",percentage:a.value?a.value*100:0})},onRender:function(){var a=this;a.callParent(arguments);if(a.textEl){a.textEl=Ext.get(a.textEl);a.updateText(a.text)}else{a.textEl=a.el.select("."+a.baseCls+"-text")}},updateProgress:function(d,e,a){var c=this,b=c.value;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({from:{width:(b*100)+"%"},to:{width:(c.value*100)+"%"}},c.animate))}else{c.bar.setStyle("width",(c.value*100)+"%")}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},getText:function(){return this.text},wait:function(c){var b=this,a;if(!b.waitTimer){a=b;c=c||{};b.updateText(c.text);b.waitTimer=Ext.TaskManager.start({run:function(d){var e=c.increment||10;d-=1;b.updateProgress(((((d+e)%e)+1)*(100/e))*0.01,null,c.animate)},interval:c.interval||1000,duration:c.duration,onStop:function(){if(c.fn){c.fn.apply(c.scope||b)}b.reset()},scope:a})}return b},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.layout.component.Tab",{extend:"Ext.layout.component.Button",alias:"layout.tab",beginLayout:function(c){var b=this,a=b.owner.closable;if(b.lastClosable!==a){b.lastClosable=a;b.clearTargetCache()}b.callParent(arguments)}});Ext.define("Ext.layout.component.field.Field",{extend:"Ext.layout.component.Auto",alias:"layout.field",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics","Ext.util.CSS"],type:"field",beginLayout:function(e){var d=this,a=d.owner,b=e.widthModel,c;d.callParent(arguments);e.labelStrategy=d.getLabelStrategy();e.errorStrategy=d.getErrorStrategy();e.labelContext=e.getEl("labelEl");e.bodyCellContext=e.getEl("bodyEl");e.inputContext=e.getEl("inputEl");e.errorContext=e.getEl("errorEl");e.inputRow=e.getEl("inputRow");if((Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&e.inputContext){d.ieInputWidthAdjustment=e.inputContext.getPaddingInfo().width+e.inputContext.getBorderInfo().width}e.labelStrategy.prepare(e,a);e.errorStrategy.prepare(e,a);if(b.shrinkWrap){d.beginLayoutShrinkWrap(e)}else{if(b.natural){if(typeof a.size=="number"){d.beginLayoutFixed(e,(c=a.size*6.5+20),"px")}else{d.beginLayoutShrinkWrap(e)}e.setWidth(c,false)}else{d.beginLayoutFixed(e,"100","%")}}},beginLayoutFixed:function(c,b,d){var a=c.target;a.el.setStyle("table-layout","fixed");a.bodyEl.setStyle("width",b+d)},beginLayoutShrinkWrap:function(b){var a=b.target;if(a.inputEl&&a.inputEl.dom){a.inputEl.dom.removeAttribute("size")}a.el.setStyle("table-layout","auto");a.bodyEl.setStyle("width","")},finishedLayout:function(b){var a=this.owner;this.callParent(arguments);b.labelStrategy.finishedLayout(b,a);b.errorStrategy.finishedLayout(b,a)},calculateOwnerHeightFromContentHeight:function(b,a){return a},measureContentHeight:function(a){return a.el.getHeight()},measureContentWidth:function(a){return a.el.getWidth()},measureLabelErrorHeight:function(a){return a.labelStrategy.getHeight(a)+a.errorStrategy.getHeight(a)},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&&Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var a={prepare:function(e,b){var c=b.labelCls+"-"+b.labelAlign,d=b.labelEl;if(d){d.addCls(c)}},getHeight:function(){return 0},finishedLayout:Ext.emptyFn};return{base:a,top:Ext.applyIf({prepare:function(d,b){a.prepare(d,b);var c=b.labelEl;d.hasHiddenLabel=c&&!b.hideEmptyLabel&&!b.getFieldLabel();if(d.hasHiddenLabel){c.dom.innerHTML="&#160;"}},getHeight:function(e){var d=e.labelContext,c=d.getProp("height"),b=e.hasHiddenLabel;if(c===undefined||b){c=d.el.getHeight()+d.getMarginInfo().height;if(b){d.setHeight(c)}}return c},finishedLayout:function(c,b){if(c.hasHiddenLabel){b.labelEl.dom.innerHTML=""}}},a),left:a,right:a}}()),errorStrategies:(function(){function d(h){var i=Ext.layout.component.field.Field.tip,j;if(i&&i.isVisible()){j=i.activeTarget;if(j&&j.el===h.getActionEl().dom){i.toFront(true)}}}var c=Ext.applyIf,b=Ext.emptyFn,a=Ext.baseCSSPrefix+"form-invalid-icon",g,e={prepare:function(j,h){var i=h.errorEl;if(i){i.setDisplayed(false)}},getHeight:function(){return 0},onFocus:b,finishedLayout:b};return{none:e,side:c({prepare:function(i,h){var k=h.errorEl,j;if(!g){g=(j=Ext.getBody().createChild({style:"position:absolute",cls:a})).getWidth();j.remove()}k.addCls(a);k.set({"data-errorqtip":h.getActiveError()||""});k.setDisplayed(h.hasActiveError());h.bodyEl.dom.colSpan=h.getBodyColspan();Ext.layout.component.field.Field.initTip()},onFocus:d},e),under:c({prepare:function(j,h){var k=h.errorEl,i=Ext.baseCSSPrefix+"form-invalid-under";k.addCls(i);k.setDisplayed(h.hasActiveError());if(h.labelAlign=="left"){k.prev().setDisplayed(h.hasVisibleLabel()?"block":"none")}},getHeight:function(k){var h=0,i,j;if(k.target.hasActiveError()){i=k.errorContext;j=i.props;h=j.height;if(h===undefined){j.height=h=i.el.getHeight()}}return h}},e),qtip:c({prepare:function(i,h){Ext.layout.component.field.Field.initTip();h.getActionEl().set({"data-errorqtip":h.getActiveError()||""})},onFocus:d},e),title:c({prepare:function(i,h){h.el.set({title:h.getActiveError()||""})}},e),elementId:c({prepare:function(i,h){var j=Ext.fly(h.msgTarget);if(j){j.dom.innerHTML=h.getActiveError()||"";j.setDisplayed(h.hasActiveError())}}},e)}}()),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip"});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" {inputAttrTpl}',' size="1"','<tpl if="name"> name="{name}"</tpl>','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls} {editableCls}" autocomplete="off"/>',{disableFormats:true}],subTplInsertions:["inputAttrTpl"],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("specialkey","writeablechange");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},beforeRender:function(){var a=this;a.callParent(arguments);a.beforeLabelableRender(arguments);if(a.readOnly){a.addCls(a.readOnlyCls)}},getInputId:function(){return this.inputId||(this.inputId=this.id+"-inputEl")},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId(),d;d=Ext.apply({id:a,cmpId:c.id,name:c.name||a,disabled:c.disabled,readOnly:c.readOnly,value:c.getRawValue(),type:b,fieldCls:c.fieldCls,fieldStyle:c.getFieldStyle(),tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)},c.subTplData);c.getInsertionRenderData(d,c.subTplInsertions);return d},afterFirstLayout:function(){this.callParent();var a=this.inputEl;if(a){a.selectable()}},applyRenderSelectors:function(){var a=this;a.callParent();a.inputEl=a.el.getById(a.getInputId())},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},getFieldStyle:function(){return"width:100%;"+(Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||"")},onRender:function(){var a=this;a.callParent(arguments);a.onLabelableRender();a.renderActiveError()},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onBoxReady:function(){var a=this;a.callParent();if(a.setReadOnlyOnBoxReady){a.setReadOnly(a.readOnly)}},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true;if(a.hasActiveError()){a.clearInvalid();a.needsValidateOnEnable=true}}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false;if(a.needsValidateOnEnable){delete a.needsValidateOnEnable;a.forceValidation=true;a.isValid();delete a.forceValidation}}},setReadOnly:function(c){var a=this,b=a.inputEl;c=!!c;a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c;if(b){b.dom.readOnly=c}else{if(a.rendering){a.setReadOnlyOnBoxReady=true}}a.fireEvent("writeablechange",a,c)},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,new Ext.EventObjectImpl(a))}},initEvents:function(){var g=this,i=g.inputEl,b,j,c=g.checkChangeEvents,h,a=c.length,d;if(g.inEditor){g.onBlur=Ext.Function.createBuffered(g.onBlur,10)}if(i){g.mon(i,Ext.EventManager.getKeyEvent(),g.fireKey,g);b=new Ext.util.DelayedTask(g.checkChange,g);g.onChangeEvent=j=function(){b.delay(g.checkChangeBuffer)};for(h=0;h<a;h++){d=c[h];if(d==="propertychange"){g.usesPropertychange=true}g.mon(i,d,j)}}g.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var b=this,a=b.disabled,c=b.forceValidation||!a;return c?b.validateValue(b.processRawValue(b.getRawValue())):a},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.updateLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.updateLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.Checkbox",{extend:"Ext.form.field.Base",alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",requires:["Ext.XTemplate","Ext.form.CheckboxManager"],componentLayout:"field",childEls:["boxLabelEl"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",'<input type="button" id="{id}" {inputAttrTpl}','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",{disableFormats:true,compiled:true}],subTplInsertions:["beforeBoxLabelTpl","afterBoxLabelTpl","beforeBoxLabelTextTpl","afterBoxLabelTextTpl","boxLabelAttrTpl","inputAttrTpl"],isCheckbox:true,focusCls:"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var b=this,a=!!b.checked;b.originalValue=b.lastValue=a;b.setValue(a)},getElConfig:function(){var a=this;if(a.isChecked(a.rawValue,a.inputValue)){a.addCls(a.checkedCls)}return a.callParent()},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{disabled:a.readOnly||a.disabled,boxLabel:a.boxLabel,boxLabelCls:a.boxLabelCls,boxLabelAlign:a.boxLabelAlign})},initEvents:function(){var a=this;a.callParent();a.mon(a.inputEl,"click",a.onBoxClick,a)},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var a=this.uncheckedValue,b=Ext.isDefined(a)?a:null;return this.checked?this.inputValue:b},isChecked:function(b,a){return(b===true||b==="true"||b==="1"||b===1||(((Ext.isString(b)||Ext.isNumber(b))&&a)?b==a:this.onRe.test(b)))},setRawValue:function(c){var b=this,d=b.inputEl,a=b.isChecked(c,b.inputValue);if(d){b[a?"addCls":"removeCls"](b.checkedCls)}b.checked=b.rawValue=a;return a},setValue:function(g){var e=this,c,b,a,d;if(Ext.isArray(g)){c=e.getManager().getByName(e.name,e.getFormId()).items;a=c.length;for(b=0;b<a;++b){d=c[b];d.setValue(Ext.Array.contains(g,d.inputValue))}}else{e.callParent(arguments)}return e},valueToRaw:function(a){return a},onChange:function(b,a){var d=this,c=d.handler;if(c){c.call(d.scope||d,d,b)}d.callParent(arguments)},resetOriginalValue:function(b){var g=this,d,e,a,c;if(!b){d=g.getManager().getByName(g.name,g.getFormId()).items;a=d.length;for(c=0;c<a;++c){e=d[c];if(e!==g){d[c].resetOriginalValue(true)}}}g.callParent()},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=a.readOnly}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.disabled=!!c||a.disabled}a.callParent(arguments)},getFormId:function(){var b=this,a;if(!b.formId){a=b.up("form");if(a){b.formId=a.id}}return b.formId}});Ext.define("Ext.form.field.Display",{extend:"Ext.form.field.Base",alias:"widget.displayfield",requires:["Ext.util.Format","Ext.XTemplate"],alternateClassName:["Ext.form.DisplayField","Ext.form.Display"],fieldSubTpl:['<div id="{id}"','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls}">{value}</div>',{compiled:true,disableFormats:true}],fieldCls:Ext.baseCSSPrefix+"form-display-field",htmlEncode:false,validateOnChange:false,initEvents:Ext.emptyFn,submitValue:false,isDirty:function(){return false},isValid:function(){return true},validate:function(){return true},getRawValue:function(){return this.rawValue},setRawValue:function(b){var a=this,c;b=Ext.value(b,"");a.rawValue=b;if(a.rendered){a.inputEl.dom.innerHTML=a.getDisplayValue()}return b},getDisplayValue:function(){var a=this,b=this.getRawValue(),c;if(a.renderer){c=a.renderer.call(a.scope||a,b,a)}else{c=a.htmlEncode?Ext.util.Format.htmlEncode(b):b}return c},getSubTplData:function(){var a=this.callParent(arguments);a.value=this.getDisplayValue();return a}});Ext.define("Ext.form.field.Hidden",{extend:"Ext.form.field.Base",alias:["widget.hiddenfield","widget.hidden"],alternateClassName:"Ext.form.Hidden",inputType:"hidden",hideLabel:true,initComponent:function(){this.formItemCls+="-hidden";this.callParent()},isEqual:function(b,a){return this.isEqualAsString(b,a)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.form.field.Radio",{extend:"Ext.form.field.Checkbox",alias:["widget.radiofield","widget.radio"],alternateClassName:"Ext.form.Radio",requires:["Ext.form.RadioManager"],isRadio:true,inputType:"radio",ariaRole:"radio",formId:null,getGroupValue:function(){var a=this.getManager().getChecked(this.name,this.getFormId());return a?a.inputValue:null},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(true)}},onRemoved:function(){this.callParent(arguments);this.formId=null},setValue:function(a){var b=this,c;if(Ext.isBoolean(a)){b.callParent(arguments)}else{c=b.getManager().getWithValue(b.name,a,b.getFormId()).getAt(0);if(c){c.setValue(true)}}return b},getSubmitValue:function(){return this.checked?this.inputValue:null},getModelData:function(){return this.getSubmitData()},onChange:function(c,a){var g=this,e,d,b,h;g.callParent(arguments);if(c){h=g.getManager().getByName(g.name,g.getFormId()).items;d=h.length;for(e=0;e<d;e++){b=h[e];if(b!==g){b.setValue(false)}}}},getManager:function(){return Ext.form.RadioManager}});Ext.define("Ext.layout.component.field.FieldContainer",{extend:"Ext.layout.component.field.Field",alias:"layout.fieldcontainer",type:"fieldcontainer",waitForOuterHeightInDom:true,waitForOuterWidthInDom:true,beginLayout:function(a){this.callParent(arguments);a.hasRawContent=true;a.target.bodyEl.setStyle("height","")},measureContentHeight:function(a){return a.hasDomProp("containerLayoutDone")?this.callParent(arguments):NaN},measureContentWidth:function(a){return a.hasDomProp("containerLayoutDone")?this.callParent(arguments):NaN},publishInnerWidth:function(b,a){var c=b.bodyCellContext;c.setWidth(c.el.getWidth(),false)},publishInnerHeight:function(b,a){var c=b.bodyCellContext;c.setHeight(a-this.measureLabelErrorHeight(b))}});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:"Ext.layout.component.field.Field",alias:["layout.htmleditor"],type:"htmleditor",toolbarSizePolicy:{setsWidth:0,setsHeight:0},beginLayout:function(a){this.callParent(arguments);a.textAreaContext=a.getEl("textareaEl");a.iframeContext=a.getEl("iframeEl");a.toolbarContext=a.context.getCmp(this.owner.getToolbar())},getItemSizePolicy:function(a){return this.toolbarSizePolicy},getLayoutItems:function(){var a=this.owner.getToolbar();return a?[a]:[]},getRenderTarget:function(){return this.owner.bodyEl},publishInnerHeight:function(c,a){var b=this,d=a-b.measureLabelErrorHeight(c)-c.toolbarContext.getProp("height")-c.bodyCellContext.getPaddingInfo().height;if(Ext.isNumber(d)){c.textAreaContext.setHeight(d);c.iframeContext.setHeight(d)}else{b.done=false}}});Ext.define("Ext.layout.component.field.Slider",{alias:["layout.sliderfield"],extend:"Ext.layout.component.field.Field",type:"sliderfield",beginLayout:function(a){this.callParent(arguments);a.endElContext=a.getEl("endEl");a.innerElContext=a.getEl("innerEl");a.bodyElContext=a.getEl("bodyEl")},publishInnerHeight:function(d,a){var e=a-this.measureLabelErrorHeight(d),c,b;if(this.owner.vertical){c=d.endElContext.getPaddingInfo();b=d.inputContext.getPaddingInfo();d.innerElContext.setHeight(e-b.height-c.height)}else{d.bodyElContext.setHeight(e)}},publishInnerWidth:function(d,c){if(!this.owner.vertical){var b=d.endElContext.getPaddingInfo(),a=d.inputContext.getPaddingInfo();d.innerElContext.setWidth(c-a.left-b.right-d.labelContext.getProp("width"))}},beginLayoutFixed:function(d,a,e){var b=this,c=b.ieInputWidthAdjustment;if(c){b.owner.bodyEl.setStyle("padding-right",c+"px")}b.callParent(arguments)}});Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",canGrowWidth:true,beginLayoutCycle:function(b){var a=this;a.callParent(arguments);if(b.shrinkWrap){b.inputContext.el.setStyle("height","")}},measureContentWidth:function(c){var h=this,b=h.owner,a=h.callParent(arguments),g=c.inputContext,k,j,d,i,e;if(b.grow&&h.canGrowWidth&&!c.state.growHandled){k=b.inputEl;j=Ext.util.Format.htmlEncode(k.dom.value||(b.hasFocus?"":b.emptyText)||"");j+=b.growAppend;d=k.getTextWidth(j)+g.getFrameInfo().width;i=b.growMax;e=Math.min(i,a);i=Math.max(b.growMin,i,e);d=Ext.Number.constrain(d,b.growMin,i);g.setWidth(d);c.state.growHandled=true;g.domBlock(h,"width");a=NaN}return a},publishInnerHeight:function(b,a){b.inputContext.setHeight(a-this.measureLabelErrorHeight(b))},beginLayoutFixed:function(d,a,e){var b=this,c=b.ieInputWidthAdjustment;if(c){b.owner.bodyEl.setStyle("padding-right",c+"px");if(e==="px"){a-=c}}b.callParent(arguments)}});Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",componentLayout:"textfield",initComponent:function(){var a=this;a.callParent();a.addEvents("autosize","keydown","keyup","keypress");a.addStateEvents("change");a.setGrowSizePolicy()},setGrowSizePolicy:function(){if(this.grow){this.shrinkWrap|=1}},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,"mousedown",b.onMouseDown,b)}if(b.maskRe||(b.vtype&&b.disableKeyFilter!==true&&(b.maskRe=Ext.form.field.VTypes[b.vtype+"Mask"]))){b.mon(a,"keypress",b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},getSubTplData:function(){var a=this,b=a.getRawValue(),d=a.emptyText&&b.length<1,c;if(d){if(Ext.supports.Placeholder){c=a.emptyText}else{b=a.emptyText}}return Ext.apply(a.callParent(),{maxLength:a.enforceMaxLength?a.maxLength:undefined,readOnly:a.readOnly,placeholder:c,value:b,fieldCls:a.fieldCls+((d&&(c||b))?" "+a.emptyCls:"")})},afterRender:function(){this.autoSize();this.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a)}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},afterFirstLayout:function(){this.callParent();if(Ext.isIE&&this.disabled){var a=this.inputEl;if(a){a.dom.unselectable="on"}}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;b.callParent(arguments);if(a&&!Ext.supports.Placeholder&&c.dom.value===a){b.setRawValue("");d=true;c.removeCls(b.emptyCls)}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.callParent(arguments);this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&&!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if(Ext.isGecko&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if(!Ext.isGecko&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getState:function(){return this.addPropertyToState(this.callParent(),"value")},applyState:function(a){this.callParent(arguments);if(a.hasOwnProperty("value")){this.setValue(a.value)}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls)}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(l){var g=this,k=g.callParent(arguments),a=g.validator,d=g.emptyText,c=g.allowBlank,e=g.vtype,h=Ext.form.field.VTypes,i=g.regex,j=Ext.String.format,b;l=l||g.processRawValue(g.getRawValue());if(Ext.isFunction(a)){b=a.call(g,l);if(b!==true){k.push(b)}}if(l.length<1||l===d){if(!c){k.push(g.blankText)}return k}if(l.length<g.minLength){k.push(j(g.minLengthText,g.minLength))}if(l.length>g.maxLength){k.push(j(g.maxLengthText,g.maxLength))}if(e){if(!h[e](l,g)){k.push(g.vtypeText||h[e+"Text"])}}if(i&&!i.test(l)){k.push(g.regexText||g.invalidText)}return k},selectText:function(i,a){var h=this,c=h.getRawValue(),d=true,g=h.inputEl.dom,e,b;if(c.length>0){i=i===e?0:i;a=a===e?c.length:a;if(g.setSelectionRange){g.setSelectionRange(i,a)}else{if(g.createTextRange){b=g.createTextRange();b.moveStart("character",i);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){h.focus()}},autoSize:function(){var a=this;if(a.grow&&a.rendered){a.autoSizing=true;a.updateLayout()}},afterComponentLayout:function(){var b=this,a;b.callParent(arguments);if(b.autoSizing){a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",b,a);b.lastInputWidth=a;delete b.autoSizing}}}});Ext.define("Ext.layout.component.field.TextArea",{extend:"Ext.layout.component.field.Text",alias:"layout.textareafield",type:"textareafield",canGrowWidth:false,beginLayout:function(a){this.callParent(arguments);a.target.inputEl.setStyle("height","")},measureContentHeight:function(b){var e=this,a=e.owner,k=e.callParent(arguments),c,i,h,g,d,j;if(a.grow&&!b.state.growHandled){c=b.inputContext;i=a.inputEl;d=i.getWidth(true);h=Ext.util.Format.htmlEncode(i.dom.value)||"&#160;";h+=a.growAppend;h=h.replace(/\n/g,"<br/>");j=Ext.util.TextMetrics.measure(i,h,d).height+c.getBorderInfo().height+c.getPaddingInfo().height;j=Ext.Number.constrain(j,a.growMin,a.growMax);c.setHeight(j);b.state.growHandled=true;c.domBlock(e,"height");k=NaN}return k}});Ext.define("Ext.form.field.TextArea",{extend:"Ext.form.field.Text",alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",requires:["Ext.XTemplate","Ext.layout.component.field.TextArea","Ext.util.DelayedTask"],fieldSubTpl:['<textarea id="{id}" {inputAttrTpl}','<tpl if="name"> name="{name}"</tpl>','<tpl if="rows"> rows="{rows}" </tpl>','<tpl if="cols"> cols="{cols}" </tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>',' class="{fieldCls} {typeCls}" ','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' autocomplete="off">\n','<tpl if="value">{[Ext.util.Format.htmlEncode(values.value)]}</tpl>',"</textarea>",{disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",setGrowSizePolicy:Ext.emptyFn,getSubTplData:function(){var c=this,b=c.getFieldStyle(),a=c.callParent();if(c.grow){if(c.preventScrollbars){a.fieldStyle=(b||"")+";overflow:hidden;height:"+c.growMin+"px"}}Ext.applyIf(a,{cols:c.cols,rows:c.rows});return a},afterRender:function(){var a=this;a.callParent(arguments);a.needsMaxCheck=a.enforceMaxLength&&!Ext.supports.TextAreaMaxLength;if(a.needsMaxCheck){a.inputEl.on("paste",a.onPaste,a)}},onPaste:function(b){var a=this;if(!a.pasteTask){a.pasteTask=new Ext.util.DelayedTask(a.pasteCheck,a)}a.pasteTask.delay(1)},pasteCheck:function(){var b=this,c=b.getValue(),a=b.maxLength;if(c.length>a){c=c.substr(0,a);b.setValue(c)}},fireKey:function(c){var a=this,b;if(c.isSpecialKey()&&(a.enterIsSpecial||(c.getKey()!==c.ENTER||c.hasModifier()))){a.fireEvent("specialkey",a,c)}if(a.needsMaxCheck&&c.getKey()!==c.BACKSPACE&&!c.isNavKeyPress()){b=a.getValue();if(b.length>=a.maxLength){c.stopEvent()}}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.updateLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",b,a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},beforeDestroy:function(){var a=this.pasteTask;if(a){a.delay()}this.callParent()}});Ext.define("Ext.layout.component.field.Trigger",{alias:"layout.triggerfield",extend:"Ext.layout.component.field.Field",type:"triggerfield",beginLayout:function(d){var c=this,a=c.owner,b;d.triggerWrap=d.getEl("triggerWrap");c.callParent(arguments);b=a.getTriggerStateFlags();if(b!=a.lastTriggerStateFlags){a.lastTriggerStateFlags=b;c.updateEditState()}},beginLayoutFixed:function(e,b,g){var c=this,a=e.target,d=c.ieInputWidthAdjustment,h="100%";c.callParent(arguments);a.inputCell.setStyle("width","100%");if(d){a.inputCell.setStyle("padding-right",d+"px");if(g==="px"){h=b-d-a.getTriggerWidth()}}a.inputEl.setStyle("width",h);a.triggerWrap.setStyle("width",b+g);a.triggerWrap.setStyle("table-layout","fixed")},beginLayoutShrinkWrap:function(b){var a=b.target,c="";this.callParent(arguments);a.triggerWrap.setStyle("width",c);a.inputCell.setStyle("width",c);a.inputEl.setStyle("width",c);a.triggerWrap.setStyle("table-layout","auto")},getTextWidth:function(){var b=this,a=b.owner,d=a.inputEl,c;c=(d.dom.value||(a.hasFocus?"":a.emptyText)||"")+a.growAppend;return d.getTextWidth(c)},measureContentWidth:function(h){var g=this,b=g.owner,e=g.callParent(arguments),i=h.inputContext,d,a,c;if(b.grow&&!h.state.growHandled){d=g.getTextWidth()+h.inputContext.getFrameInfo().width;a=b.growMax;c=Math.min(a,e);a=Math.max(b.growMin,a,c);d=Ext.Number.constrain(d,b.growMin,a);i.setWidth(d);h.state.growHandled=true;i.domBlock(g,"width");e=NaN}return e},updateEditState:function(){var c=this,a=c.owner,e=a.inputEl,d=Ext.baseCSSPrefix+"trigger-noedit",b,g;if(c.owner.readOnly){e.addCls(d);g=true;b=false}else{if(c.owner.editable){e.removeCls(d);g=false}else{e.addCls(d);g=true}b=!c.owner.hideTrigger}a.triggerCell.setDisplayed(b);e.dom.readOnly=g}});Ext.define("Ext.form.field.Trigger",{extend:"Ext.form.field.Text",alias:["widget.triggerfield","widget.trigger"],requires:["Ext.DomHelper","Ext.util.ClickRepeater","Ext.layout.component.field.Trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],childEls:[{name:"triggerCell",select:"."+Ext.baseCSSPrefix+"trigger-cell"},{name:"triggerEl",select:"."+Ext.baseCSSPrefix+"form-trigger"},"triggerWrap","inputCell"],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,componentLayout:"triggerfield",initComponent:function(){this.wrapFocusCls=this.triggerWrapCls+"-focus";this.callParent(arguments)},getSubTplMarkup:function(){var a=this,b=a.callParent(arguments);return'<table id="'+a.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+a.id+'-inputCell" class="'+Ext.baseCSSPrefix+'form-trigger-input-cell">'+b+"</td>"+a.getTriggerMarkup()+"</tr></tbody></table>"},getSubTplData:function(){var b=this,c=b.callParent(),d=b.readOnly===true,a=b.editable!==false;return Ext.apply(c,{editableCls:(d||!a)?" "+Ext.baseCSSPrefix+"trigger-noedit":"",readOnly:!a||d})},getLabelableRenderData:function(){var b=this,c=b.triggerWrapCls,a=b.callParent(arguments);return Ext.applyIf(a,{triggerWrapCls:c,triggerMarkup:b.getTriggerMarkup()})},getTriggerMarkup:function(){var c=this,b=0,d=(c.readOnly||c.hideTrigger),g,e=c.triggerBaseCls,a=[];if(!c.trigger1Cls){c.trigger1Cls=c.triggerCls}for(b=0;(g=c["trigger"+(b+1)+"Cls"])||b<1;b++){a.push({tag:"td",valign:"top",cls:Ext.baseCSSPrefix+"trigger-cell",style:"width:"+c.triggerWidth+(d?"px;display:none":"px"),cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+b,e,g].join(" "),role:"button"}})}a[b-1].cn.cls+=" "+e+"-last";return Ext.DomHelper.markup(a)},disableCheck:function(){return !this.disabled},beforeRender:function(){var a=this,b=a.triggerBaseCls,c;if(!a.triggerWidth){c=Ext.getBody().createChild({style:"position: absolute;",cls:Ext.baseCSSPrefix+"form-trigger"});Ext.form.field.Trigger.prototype.triggerWidth=c.getWidth();c.remove()}a.callParent();if(b!=Ext.baseCSSPrefix+"form-trigger"){a.addChildEls({name:"triggerEl",select:"."+b})}a.lastTriggerStateFlags=a.getTriggerStateFlags()},onRender:function(){var a=this;a.callParent(arguments);a.doc=Ext.getDoc();a.initTrigger();a.triggerEl.unselectable()},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerEl.getCount()*b.triggerWidth}return a},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateLayout()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateLayout()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateLayout()}},initTrigger:function(){var h=this,i=h.triggerWrap,k=h.triggerEl,a=h.disableCheck,d,c,b,g,j;if(h.repeatTriggerClick){h.triggerRepeater=new Ext.util.ClickRepeater(i,{preventDefault:true,handler:h.onTriggerWrapClick,listeners:{mouseup:h.onTriggerWrapMousup,scope:h},scope:h})}else{h.mon(i,{click:h.onTriggerWrapClick,mouseup:h.onTriggerWrapMousup,scope:h})}k.setVisibilityMode(Ext.Element.DISPLAY);k.addClsOnOver(h.triggerBaseCls+"-over",a,h);d=k.elements;c=d.length;for(g=0;g<c;g++){b=d[g];j=g+1;b.addClsOnOver(h["trigger"+(j)+"Cls"]+"-over",a,h);b.addClsOnClick(h["trigger"+(j)+"Cls"]+"-click",a,h)}k.addClsOnClick(h.triggerBaseCls+"-click",a,h)},onDestroy:function(){var a=this;Ext.destroyMembers(a,"triggerRepeater","triggerWrap","triggerEl");delete a.doc;a.callParent()},onFocus:function(){var a=this;a.callParent(arguments);if(!a.mimicing){a.bodyEl.addCls(a.wrapFocusCls);a.mimicing=true;a.mon(a.doc,"mousedown",a.mimicBlur,a,{delay:10});if(a.monitorTab){a.on("specialkey",a.checkTab,a)}}},checkTab:function(a,b){if(!this.ignoreMonitorTab&&b.getKey()==b.TAB){this.triggerBlur()}},getTriggerStateFlags:function(){var a=this,b=0;if(a.readOnly){b+=1}if(a.editable){b+=2}if(a.hideTrigger){b+=4}return b},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.bodyEl.contains(a.target)&&this.validateBlur(a)){this.triggerBlur(a)}},triggerBlur:function(b){var a=this;a.mimicing=false;a.mun(a.doc,"mousedown",a.mimicBlur,a);if(a.monitorTab&&a.inputEl){a.un("specialkey",a.checkTab,a)}Ext.form.field.Trigger.superclass.onBlur.call(a,b);if(a.bodyEl){a.bodyEl.removeCls(a.wrapFocusCls)}},validateBlur:function(a){return true},onTriggerWrapClick:function(){var d=this,e,b,a,c;c=arguments[d.triggerRepeater?1:0];if(c&&!d.readOnly&&!d.disabled){e=c.getTarget("."+d.triggerBaseCls,null);b=e&&e.className.match(d.triggerIndexRe);if(b){a=d["onTrigger"+(parseInt(b[1],10)+1)+"Click"]||d.onTriggerClick;if(a){a.call(d,c)}}}},onTriggerWrapMousup:Ext.emptyFn,onTriggerClick:Ext.emptyFn});Ext.define("Ext.form.field.File",{extend:"Ext.form.field.Trigger",alias:["widget.filefield","widget.fileuploadfield"],alternateClassName:["Ext.form.FileUploadField","Ext.ux.form.FileUploadField","Ext.form.File"],uses:["Ext.button.Button","Ext.layout.component.field.Field"],buttonText:"Browse...",buttonOnly:false,buttonMargin:3,fieldBodyCls:Ext.baseCSSPrefix+"form-file-wrap",readOnly:true,componentLayout:"triggerfield",childEls:["fileInputEl","buttonEl","buttonEl-btnEl","browseButtonWrap"],onRender:function(){var a=this,b;a.callParent(arguments);b=a.inputEl;b.dom.name="";a.fileInputEl.dom.name=a.getName();a.fileInputEl.on({scope:a,change:a.onFileChange});if(a.buttonOnly){a.inputCell.setDisplayed(false)}a.browseButtonWrap.dom.style.width=(a.browseButtonWrap.dom.lastChild.offsetWidth+a.buttonEl.getMargin("lr"))+"px";if(Ext.isIE){a.buttonEl.repaint()}},getTriggerMarkup:function(){var d=this,a,c=Ext.widget("button",Ext.apply({id:d.id+"-buttonEl",ui:d.ui,disabled:d.disabled,text:d.buttonText,cls:Ext.baseCSSPrefix+"form-file-btn",preventDefault:false,style:d.buttonOnly?"":"margin-left:"+d.buttonMargin+"px"},d.buttonConfig)),b=c.getRenderTree(),e={id:d.id+"-fileInputEl",cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1};if(d.disabled){e.disabled=true}b.cn=e;a='<td id="'+d.id+'-browseButtonWrap">'+Ext.DomHelper.markup(b)+"</td>";c.destroy();return a},createFileInput:function(){var a=this;a.fileInputEl=a.buttonEl.createChild({name:a.getName(),id:a.id+"-fileInputEl",cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1});a.fileInputEl.on({scope:a,change:a.onFileChange})},onFileChange:function(){this.lastValue=null;Ext.form.field.File.superclass.setValue.call(this,this.fileInputEl.dom.value)},setValue:Ext.emptyFn,reset:function(){var a=this;if(a.rendered){a.fileInputEl.remove();a.createFileInput();a.inputEl.dom.value=""}a.callParent()},onDisable:function(){this.callParent();this.disableItems()},disableItems:function(){var a=this.fileInputEl;if(a){a.dom.disabled=true}this["buttonEl-btnEl"].dom.disabled=true},onEnable:function(){var a=this;a.callParent();a.fileInputEl.dom.disabled=false;this["buttonEl-btnEl"].dom.disabled=true},isFileUpload:function(){return true},extractFileInput:function(){var a=this.fileInputEl.dom;this.reset();return a},onDestroy:function(){Ext.destroyMembers(this,"fileInputEl","buttonEl");this.callParent()}});Ext.define("Ext.form.field.Picker",{extend:"Ext.form.field.Trigger",alias:"widget.pickerfield",alternateClassName:"Ext.form.Picker",requires:["Ext.util.KeyNav"],matchFieldWidth:true,pickerAlign:"tl-bl?",openCls:Ext.baseCSSPrefix+"pickerfield-open",editable:true,initComponent:function(){this.callParent();this.addEvents("expand","collapse","select")},initEvents:function(){var a=this;a.callParent();a.keyNav=new Ext.util.KeyNav(a.inputEl,{down:a.onDownArrow,esc:{handler:a.onEsc,scope:a,defaultEventAction:false},scope:a,forceKeyDown:true});if(!a.editable){a.mon(a.inputEl,"click",a.onTriggerClick,a)}if(Ext.isGecko){a.inputEl.dom.setAttribute("autocomplete","off")}},onEsc:function(b){var a=this;if(a.isExpanded){a.collapse();b.stopEvent()}else{if(a.up("window")){a.blur()}else{if((!Ext.FocusManager||!Ext.FocusManager.enabled)){b.stopEvent()}}}},onDownArrow:function(a){if(!this.isExpanded){this.onTriggerClick()}},expand:function(){var c=this,a,b,d;if(c.rendered&&!c.isExpanded&&!c.isDestroyed){a=c.bodyEl;b=c.getPicker();d=c.collapseIf;b.show();c.isExpanded=true;c.alignPicker();a.addCls(c.openCls);c.mon(Ext.getDoc(),{mousewheel:d,mousedown:d,scope:c});Ext.EventManager.onWindowResize(c.alignPicker,c);c.fireEvent("expand",c);c.onExpand()}},onExpand:Ext.emptyFn,alignPicker:function(){var b=this,a=b.getPicker();if(b.isExpanded){if(b.matchFieldWidth){a.setWidth(b.bodyEl.getWidth())}if(a.isFloating()){b.doAlign()}}},doAlign:function(){var d=this,c=d.picker,a="-above",b;d.picker.alignTo(d.inputEl,d.pickerAlign,d.pickerOffset);b=c.el.getY()<d.inputEl.getY();d.bodyEl[b?"addCls":"removeCls"](d.openCls+a);c[b?"addCls":"removeCls"](c.baseCls+a)},collapse:function(){if(this.isExpanded&&!this.isDestroyed){var d=this,c=d.openCls,b=d.picker,e=Ext.getDoc(),g=d.collapseIf,a="-above";b.hide();d.isExpanded=false;d.bodyEl.removeCls([c,c+a]);b.el.removeCls(b.baseCls+a);e.un("mousewheel",g,d);e.un("mousedown",g,d);Ext.EventManager.removeResizeListener(d.alignPicker,d);d.fireEvent("collapse",d);d.onCollapse()}},onCollapse:Ext.emptyFn,collapseIf:function(b){var a=this;if(!a.isDestroyed&&!b.within(a.bodyEl,false,true)&&!b.within(a.picker.el,false,true)&&!a.isEventWithinPickerLoadMask(b)){a.collapse()}},getPicker:function(){var a=this;return a.picker||(a.picker=a.createPicker())},createPicker:Ext.emptyFn,onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.expand()}a.inputEl.focus()}},mimicBlur:function(c){var b=this,a=b.picker;if(!a||!c.within(a.el,false,true)&&!b.isEventWithinPickerLoadMask(c)){b.callParent(arguments)}},onDestroy:function(){var b=this,a=b.picker;Ext.EventManager.removeResizeListener(b.alignPicker,b);Ext.destroy(b.keyNav);if(a){delete a.pickerField;a.destroy()}b.callParent()},isEventWithinPickerLoadMask:function(b){var a=this.picker.loadMask;return a?b.within(a.maskEl,false,true)||b.within(a.el,false,true):false}});Ext.define("Ext.form.field.Spinner",{extend:"Ext.form.field.Trigger",alias:"widget.spinnerfield",alternateClassName:"Ext.form.Spinner",requires:["Ext.util.KeyNav"],trigger1Cls:Ext.baseCSSPrefix+"form-spinner-up",trigger2Cls:Ext.baseCSSPrefix+"form-spinner-down",spinUpEnabled:true,spinDownEnabled:true,keyNavEnabled:true,mouseWheelEnabled:true,repeatTriggerClick:true,onSpinUp:Ext.emptyFn,onSpinDown:Ext.emptyFn,triggerTpl:'<td style="{triggerStyle}"><div class="'+Ext.baseCSSPrefix+"trigger-index-0 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-up" role="button"></div><div class="'+Ext.baseCSSPrefix+"trigger-index-1 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-down" role="button"></div></td></tr>',initComponent:function(){this.callParent();this.addEvents("spin","spinup","spindown")},onRender:function(){var b=this,a;b.callParent(arguments);a=b.triggerEl;b.spinUpEl=a.item(0);b.spinDownEl=a.item(1);b.setSpinUpEnabled(b.spinUpEnabled);b.setSpinDownEnabled(b.spinDownEnabled);if(b.keyNavEnabled){b.spinnerKeyNav=new Ext.util.KeyNav(b.inputEl,{scope:b,up:b.spinUp,down:b.spinDown})}if(b.mouseWheelEnabled){b.mon(b.bodyEl,"mousewheel",b.onMouseWheel,b)}},getSubTplMarkup:function(){var a=this,b=Ext.form.field.Base.prototype.getSubTplMarkup.apply(a,arguments);return'<table id="'+a.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+a.id+'-inputCell" class="'+Ext.baseCSSPrefix+'form-trigger-input-cell">'+b+"</td>"+a.getTriggerMarkup()+"</tbody></table>"},getTriggerMarkup:function(){var a=this,b=(a.readOnly||a.hideTrigger);return a.getTpl("triggerTpl").apply({triggerStyle:"width:"+a.triggerWidth+(b?"px;display:none":"px")})},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerWidth}return a},onTrigger1Click:function(){this.spinUp()},onTrigger2Click:function(){this.spinDown()},onTriggerWrapMousup:function(){this.inputEl.focus()},spinUp:function(){var a=this;if(a.spinUpEnabled&&!a.disabled){a.fireEvent("spin",a,"up");a.fireEvent("spinup",a);a.onSpinUp()}},spinDown:function(){var a=this;if(a.spinDownEnabled&&!a.disabled){a.fireEvent("spin",a,"down");a.fireEvent("spindown",a);a.onSpinDown()}},setSpinUpEnabled:function(a){var b=this,c=b.spinUpEnabled;b.spinUpEnabled=a;if(c!==a&&b.rendered){b.spinUpEl[a?"removeCls":"addCls"](b.trigger1Cls+"-disabled")}},setSpinDownEnabled:function(a){var b=this,c=b.spinDownEnabled;b.spinDownEnabled=a;if(c!==a&&b.rendered){b.spinDownEl[a?"removeCls":"addCls"](b.trigger2Cls+"-disabled")}},onMouseWheel:function(b){var a=this,c;if(a.hasFocus){c=b.getWheelDelta();if(c>0){a.spinUp()}else{if(c<0){a.spinDown()}}b.stopEvent()}},onDestroy:function(){Ext.destroyMembers(this,"spinnerKeyNav","spinUpEl","spinDownEl");this.callParent()}});Ext.define("Ext.form.field.Number",{extend:"Ext.form.field.Spinner",alias:"widget.numberfield",alternateClassName:["Ext.form.NumberField","Ext.form.Number"],allowDecimals:true,decimalSeparator:".",submitLocaleSeparator:true,decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",negativeText:"The value cannot be negative",baseChars:"0123456789",autoStripChars:false,initComponent:function(){var a=this,b;a.callParent();a.setMinValue(a.minValue);a.setMaxValue(a.maxValue);if(a.disableKeyFilter!==true){b=a.baseChars+"";if(a.allowDecimals){b+=a.decimalSeparator}if(a.minValue<0){b+="-"}b=Ext.String.escapeRegex(b);a.maskRe=new RegExp("["+b+"]");if(a.autoStripChars){a.stripCharsRe=new RegExp("[^"+b+"]","gi")}}},getErrors:function(c){var b=this,e=b.callParent(arguments),d=Ext.String.format,a;c=Ext.isDefined(c)?c:this.processRawValue(this.getRawValue());if(c.length<1){return e}c=String(c).replace(b.decimalSeparator,".");if(isNaN(c)){e.push(d(b.nanText,c))}a=b.parseValue(c);if(b.minValue===0&&a<0){e.push(this.negativeText)}else{if(a<b.minValue){e.push(d(b.minText,b.minValue))}}if(a>b.maxValue){e.push(d(b.maxText,b.maxValue))}return e},rawToValue:function(b){var a=this.fixPrecision(this.parseValue(b));if(a===null){a=b||null}return a},valueToRaw:function(c){var b=this,a=b.decimalSeparator;c=b.parseValue(c);c=b.fixPrecision(c);c=Ext.isNumber(c)?c:parseFloat(String(c).replace(a,"."));c=isNaN(c)?"":String(c).replace(".",a);return c},getSubmitValue:function(){var a=this,b=a.callParent();if(!a.submitLocaleSeparator){b=b.replace(a.decimalSeparator,".")}return b},onChange:function(){this.toggleSpinners();this.callParent(arguments)},toggleSpinners:function(){var b=this,c=b.getValue(),a=c===null;b.setSpinUpEnabled(a||c<b.maxValue);b.setSpinDownEnabled(a||c>b.minValue)},setMinValue:function(a){this.minValue=Ext.Number.from(a,Number.NEGATIVE_INFINITY);this.toggleSpinners()},setMaxValue:function(a){this.maxValue=Ext.Number.from(a,Number.MAX_VALUE);this.toggleSpinners()},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?null:a},fixPrecision:function(d){var c=this,b=isNaN(d),a=c.decimalPrecision;if(b||!d){return b?"":d}else{if(!c.allowDecimals||a<=0){a=0}}return parseFloat(Ext.Number.toFixed(parseFloat(d),a))},beforeBlur:function(){var b=this,a=b.parseValue(b.getRawValue());if(!Ext.isEmpty(a)){b.setValue(a)}},onSpinUp:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()+a.step,a.minValue,a.maxValue))}},onSpinDown:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()-a.step,a.minValue,a.maxValue))}}});Ext.define("Ext.layout.component.field.ComboBox",{extend:"Ext.layout.component.field.Trigger",alias:"layout.combobox",requires:["Ext.util.TextMetrics"],type:"combobox",startingWidth:null,getTextWidth:function(){var h=this,b=h.owner,l=b.store,j=b.displayField,d=l.data.length,k="",e=0,c=0,g,m,a;for(;e<d;e++){m=l.getAt(e).data[j];g=m.length;if(g>c){c=g;k=m}}a=Math.max(h.callParent(arguments),b.inputEl.getTextWidth(k+b.growAppend));if(!h.startingWidth||b.removingRecords){h.startingWidth=a;if(a<b.growMin){b.defaultListConfig.minWidth=b.growMin}b.removingRecords=false}return(a<h.startingWidth)?h.startingWidth:a}});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.Layout",alternateClassName:"Ext.layout.ContainerLayout",mixins:{elementCt:"Ext.util.ElementContainer"},requires:["Ext.XTemplate"],type:"container",manageOverflow:0,beginCollapse:Ext.emptyFn,beginExpand:Ext.emptyFn,animatePolicy:null,childEls:["overflowPadderEl"],renderTpl:["{%this.renderBody(out,values)%}"],usesContainerHeight:true,usesContainerWidth:true,usesHeight:true,usesWidth:true,reserveScrollbar:false,lastOverflowAdjust:{width:0,height:0},constructor:function(){this.callParent(arguments);this.mixins.elementCt.constructor.call(this)},destroy:function(){this.callParent();this.mixins.elementCt.destroy.call(this)},initLayout:function(){var b=this,a=Ext.getScrollbarSize().width;b.callParent();if(a&&b.manageOverflow&&!b.hasOwnProperty("lastOverflowAdjust")){if(b.owner.autoScroll||b.reserveScrollbar){b.lastOverflowAdjust={width:a,height:0}}}},beginLayout:function(a){this.callParent(arguments);a.targetContext=a.getEl("getTarget",this);this.cacheChildItems(a)},beginLayoutCycle:function(c,a){var b=this,d=b.overflowPadderEl;b.callParent(arguments);if(!c.state.overflowAdjust){c.state.overflowAdjust=b.lastOverflowAdjust}if(a){if(b.usesContainerHeight){++c.consumersContainerHeight}if(b.usesContainerWidth){++c.consumersContainerWidth}}if(d){d.setStyle("display","none")}},completeLayout:function(a){this.lastOverflowAdjust=a.state.overflowAdjust},cacheChildItems:function(e){var c=e.context,g=[],a=this.getVisibleItems(),d=a.length,b;e.childItems=g;e.visibleItems=a;for(b=0;b<d;++b){g.push(c.getCmp(a[b]))}},cacheElements:function(){var a=this.owner;this.applyChildEls(a.el,a.id)},calculateContentSize:function(q,m){var B=this,d=(m||0)|B.manageOverflow|((q.widthModel.shrinkWrap?1:0)|(q.heightModel.shrinkWrap?2:0)),c=(d&1)||undefined,j=(d&2)||undefined,b=q.childItems,g=b.length,w=0,u=0,n=0,e=q.props,r,p,o,A,h,l,t,z,y,s,x,a,v,k;if(c){if(isNaN(e.contentWidth)){++n}else{c=undefined}}if(j){if(isNaN(e.contentHeight)){++n}else{j=undefined}}if(n){for(x=0;x<g;++x){t=b[x];l=t.target;s=j&&t.getProp("height");v=c&&t.getProp("width");a=t.getMarginInfo();if((c&&isNaN(l.x))||(j&&isNaN(l.y))){k=l.el.getXY();if(!r){r=q.targetContext.el.getXY();h=q.targetContext.getBorderInfo();p=r[0]+h.left;o=r[1]+h.top}z=k[0]-p;y=k[1]-o}else{z=l.x;y=l.y}s+=a.bottom;v+=a.right;w=Math.max(w,y+s);u=Math.max(u,z+v);if(isNaN(w)&&isNaN(u)){B.done=false;return}}if(c||j){A=q.targetContext.getPaddingInfo()}if(c&&!q.setContentWidth(u+A.right)){B.done=false}if(j&&!q.setContentHeight(w+A.bottom)){B.done=false}}},calculateOverflow:function(n,s,h){var w=this,a=w.owner,l=w.manageOverflow,d=n.state,m=d.overflowAdjust,g,k,c,o,b,q,t,j,r,e,p,u,i,v;if(l&&!d.secondPass&&!w.reserveScrollbar){if(a.autoScroll){i=v=true}else{if(a.overflowX){i=a.overflowX=="auto"}else{q=n.targetContext.getStyle("overflow-x");i=q&&q!="hidden"&&q!="scroll"}if(a.overflowY){v=a.overflowY=="auto"}else{q=n.targetContext.getStyle("overflow-y");v=q&&q!="hidden"&&q!="scroll"}}if(!s.gotWidth){i=false}if(!s.gotHeight){v=false}if(i||v){t=Ext.getScrollbarSize();j=n.peek("contentWidth");r=n.peek("contentHeight");e=s.width;p=s.height;u=w.getScrollbarsNeeded(e,p,j,r);d.overflowState=u;if(typeof h=="number"){u&=~h}m={width:(i&&(u&2))?t.width:0,height:(v&&(u&1))?t.height:0};if(m.width!==w.lastOverflowAdjust.width||m.height!==w.lastOverflowAdjust.height){w.done=false;n.invalidate({state:{overflowAdjust:m,overflowState:d.overflowState,secondPass:true}})}}}if(!w.done){return}c=n.padElContext||(n.padElContext=n.getEl("overflowPadderEl",w));if(c){u=d.overflowState;g=s.width;k=0;if(u){o=n.targetContext.getPaddingInfo();b=w.scrollRangeFlags;if((u&2)&&(b&1)){k+=o.bottom}if((u&1)&&(b&4)){g+=o.right}c.setProp("display","");c.setSize(g,k)}else{c.setProp("display","none")}}},configureItem:function(c){var b=this,a=b.owner.itemCls,d=[].concat(b.itemCls||[]);b.callParent(arguments);if(a){d=Ext.Array.push(d,a)}c.addCls(d)},doRenderBody:function(a,b){this.renderItems(a,b);this.renderContent(a,b)},doRenderContainer:function(b,e){var c=e.$comp.layout,a=c.getRenderTpl(),d=c.getRenderData();a.applyOut(d,b)},doRenderItems:function(b,d){var c=d.$layout,a=c.getRenderTree();if(a){Ext.DomHelper.generateMarkup(a,b)}},doRenderPadder:function(b,d){var c=d.$layout,a=c.owner,e=c.getScrollRangeFlags();if(c.manageOverflow==2){if(e&5){b.push('<div id="',a.id,'-overflowPadderEl" ','style="font-size: 1px; width:1px; height: 1px;');b.push('"></div>');c.scrollRangeFlags=e}}},finishRender:function(){var b=this,c,a;b.callParent();b.cacheElements();c=b.getRenderTarget();a=b.getLayoutItems();if(b.targetCls){b.getTarget().addCls(b.targetCls)}b.finishRenderItems(c,a)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(c,h){var d=c.targetContext,g=d.getFrameInfo(),k=d.getPaddingInfo(),j=0,l=0,a=c.state.overflowAdjust,e,i,b,m;if(!c.widthModel.shrinkWrap){++l;b=h?d.getDomProp("width"):d.getProp("width");e=(typeof b=="number");if(e){++j;b-=g.width+k.width;if(a){b-=a.width}}}if(!c.heightModel.shrinkWrap){++l;m=h?d.getDomProp("height"):d.getProp("height");i=(typeof m=="number");if(i){++j;m-=g.height+k.height;if(a){m-=a.height}}}return{width:b,height:m,needed:l,got:j,gotAll:j==l,gotWidth:e,gotHeight:i}},getLayoutItems:function(){var a=this.owner,b=a&&a.items;return(b&&b.items)||[]},getRenderData:function(){var a=this.owner;return{$comp:a,$layout:this,ownerId:a.id}},getRenderedItems:function(){var e=this,h=e.getRenderTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b<d;b++){c=a[b];if(c.rendered&&e.isValidParent(c,h,b)){g.push(c)}}return g},getRenderTarget:function(){return this.owner.getTargetEl()},getElementTarget:function(){return this.getRenderTarget()},getRenderTpl:function(){var a=this,b=Ext.XTemplate.getTpl(this,"renderTpl");if(!b.renderContent){a.owner.setupRenderTpl(b)}return b},getRenderTree:function(){var a,c=this.owner.items,d,b={};do{d=c.generation;a=this.getItemsRenderTree(this.getLayoutItems(),b)}while(c.generation!==d);return a},getScrollbarsNeeded:function(c,i,b,h){var a=Ext.getScrollbarSize(),e=typeof c=="number",j=typeof i=="number",g=0,d=0;if(!a.width){return 0}if(j&&i<h){d=2;c-=a.width}if(e&&c<b){g=1;if(!d&&j){i-=a.height;if(i<h){d=2}}}return d+g},getScrollRangeFlags:(function(){var a=-1;return function(){if(a<0){var g=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"border-box",style:{width:"100px",height:"100px",padding:"10px",overflow:"auto"},children:[{style:{border:"1px solid red",width:"150px",height:"150px",margin:"0 5px 5px 0"}}]}),d=g.dom.scrollHeight,c=g.dom.scrollWidth,e={175:0,165:1,170:2,160:3},b={175:0,165:4,170:8,160:12};a=(e[d]||0)|(b[c]||0);g.remove()}return a}}()),getTarget:function(){return this.owner.getTargetEl()},getVisibleItems:function(){var g=this.getRenderTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c<e;c++){d=b[c];if(d.rendered&&this.isValidParent(d,g,c)&&d.hidden!==true){a.push(d)}}return a},setupRenderTpl:function(b){var a=this;b.renderBody=a.doRenderBody;b.renderContainer=a.doRenderContainer;b.renderItems=a.doRenderItems;b.renderPadder=a.doRenderPadder}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",childEls:["clearEl"],renderTpl:["{%this.renderBody(out,values)%}",'<div id="{ownerId}-clearEl" class="',Ext.baseCSSPrefix,'clear" role="presentation"></div>'],calculate:function(b){var a=this,c;if(!b.hasDomProp("containerChildrenDone")){a.done=false}else{c=a.getContainerSize(b);if(!c.gotAll){a.done=false}a.calculateContentSize(b)}}});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",detachOnRemove:true,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.callParent();a.getLayout();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var a=this.getLayout();if(a){a.finishRender()}},beforeRender:function(){var b=this,a=b.getLayout();b.callParent();if(!a.initialized){a.initLayout()}},setupRenderTpl:function(b){var a=this.getLayout();this.callParent(arguments);a.setupRenderTpl(b)},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,a.self.prototype.layout||"autocontainer"))}return a.layout},doLayout:function(){this.updateLayout();return this},afterLayout:function(b){var a=this;++a.layoutCounter;if(a.hasListeners.afterlayout){a.fireEvent("afterlayout",a,b)}},prepareItems:function(b,d){if(Ext.isArray(b)){b=b.slice()}else{b=[b]}var c=0,a=b.length,e;for(;c<a;c++){e=b[c];if(e==null){Ext.Array.erase(b,c,1);--c;--a}else{if(d){e=this.applyDefaults(e)}b[c]=this.lookupComponent(e)}}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a)}Ext.applyIf(a,b)}return a},lookupComponent:function(a){return(typeof a=="string")?Ext.ComponentManager.get(a):Ext.ComponentManager.create(a,this.defaultType)},getComponentId:function(a){return a.getItemId()},add:function(){var j=this,g=Ext.Array.slice(arguments),d=(typeof g[0]=="number")?g.shift():-1,c=j.getLayout(),l,h,b,a,m,k,e;if(g.length==1&&Ext.isArray(g[0])){h=g[0];l=true}else{h=g}e=h=j.prepareItems(h,true);a=h.length;if(j.rendered){Ext.suspendLayouts()}if(!l&&a==1){e=h[0]}for(b=0;b<a;b++){m=h[b];k=(d<0)?j.items.length:(d+b);if(m.floating){m.onAdded(j,k)}else{if((!j.hasListeners.beforeadd||j.fireEvent("beforeadd",j,m,k)!==false)&&j.onBeforeAdd(m)!==false){j.items.insert(k,m);m.onAdded(j,k);j.onAdd(m,k);c.onAdd(m,k);if(j.hasListeners.add){j.fireEvent("add",j,m,k)}}}}j.updateLayout();if(j.rendered){Ext.resumeLayouts(true)}return e},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.doLayout();return c},onBeforeAdd:function(c){var b=this,a=c.border;if(c.ownerCt){c.ownerCt.remove(c,false)}if(b.border===false||b.border===0){c.border=Ext.isDefined(a)&&a!==false&&a!==0}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&&(!d.hasListeners.beforeremove||d.fireEvent("beforeremove",d,e)!==false)){d.doRemove(e,b);if(d.hasListeners.remove){d.fireEvent("remove",d,e)}if(!d.destroying){d.doLayout()}}return e},doRemove:function(c,b){var e=this,d=e.layout,a=d&&e.rendered,g=b===true||(b!==false&&e.autoDestroy);b=b===true||(b!==false&&e.autoDestroy);e.items.remove(c);c.onRemoved(g);if(a){d.onRemove(c)}e.onRemove(c,g);if(g){c.destroy()}else{if(a){d.afterRemove(c)}if(e.detachOnRemove&&c.rendered){Ext.getDetachedBody().appendChild(c.getEl())}}},removeAll:function(c){var h=this,e=h.items.items.slice(),b=[],d=0,a=e.length,g;h.suspendLayouts();for(;d<a;d++){g=e[d];h.remove(g,c);if(g.ownerCt!==h){b.push(g)}}h.resumeLayouts(!!a);return b},getRefItems:function(c){var h=this,d=h.items.items,b=d.length,e=0,g,a=[];for(;e<b;e++){g=d[e];a.push(g);if(c&&g.getRefItems){a.push.apply(a,g.getRefItems(true))}}if(h.floatingItems&&h.floatingItems.accessList){a.push.apply(a,h.floatingItems.accessList)}return a},cascade:function(l,m,a){var k=this,e=k.items?k.items.items:[],g=e.length,d=0,j,h=a?a.concat(k):[k],b=h.length-1;if(l.apply(m||k,h)!==false){for(;d<g;d++){j=e[d];if(j.cascade){j.cascade(l,m,a)}else{h[b]=j;l.apply(m||e,h)}}}return this},isAncestor:function(a){while(a){if(a.ownerCt===this){return true}a=a.ownerCt}},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},query:function(a){a=a||"*";return Ext.ComponentQuery.query(a,this)},queryBy:function(g,e){var c=[],b=this.getRefItems(true),d=0,a=b.length,h;for(;d<a;++d){h=b[d];if(g.call(e||h,h)!==false){c.push(h)}}return c},queryById:function(a){return this.down("#"+a)},child:function(a){a=a||"";return this.query("> "+a)[0]||null},nextChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},prevChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},down:function(a){return this.query(a)[0]||null},enable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a<c;a++){b=d[a];if(b.resetDisable){b.enable()}}},disable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a<c;a++){b=d[a];if(b.resetDisable!==false&&!b.disabled){b.disable();b.resetDisable=true}}},getChildItemsToDisable:function(){return this.query("[isFormField],button")},beforeLayout:function(){return true},beforeDestroy:function(){var b=this,a=b.items,d;if(a){while((d=a.first())){b.doRemove(d,true)}}Ext.destroy(b.layout);b.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",fireHierarchyEvent:function(a){this.hierarchyEventSource.fireEvent(a,this)},afterHide:function(){this.callParent(arguments);this.fireHierarchyEvent("hide")},afterShow:function(){this.callParent(arguments);this.fireHierarchyEvent("show")},getChildByElement:function(e,a){var h,c,b=0,d=this.getRefItems(),g=d.length;e=Ext.getDom(e);for(;b<g;b++){h=d[b];c=h.getEl();if(c&&((c.dom===e)||c.contains(e))){return(a&&h.getChildByElement)?h.getChildByElement(e,a):h}}return null}},function(){this.hierarchyEventSource=this.prototype.hierarchyEventSource=new Ext.util.Observable({events:{hide:true,show:true,collapse:true,expand:true}})});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",preserveElOnDestroy:true,initComponent:function(){var c=this,a=document.body.parentNode,b;Ext.getScrollbarSize();c.width=c.height=undefined;c.callParent(arguments);Ext.fly(a).addCls(Ext.baseCSSPrefix+"viewport");if(c.autoScroll){delete c.autoScroll;Ext.fly(a).setStyle("overflow","auto")}c.el=b=Ext.getBody();b.setHeight=Ext.emptyFn;b.setWidth=Ext.emptyFn;b.setSize=Ext.emptyFn;b.dom.scroll="no";c.allowDomMove=false;c.renderTo=c.el},onRender:function(){var a=this;a.callParent(arguments);a.width=Ext.Element.getViewportWidth();a.height=Ext.Element.getViewportHeight()},afterFirstLayout:function(){var a=this;a.callParent(arguments);setTimeout(function(){Ext.EventManager.onWindowResize(a.fireResize,a)},1)},fireResize:function(b,a){if(b!=this.width||a!=this.height){this.setSize(b,a)}}});Ext.define("Ext.form.FieldContainer",{extend:"Ext.container.Container",mixins:{labelable:"Ext.form.Labelable",fieldAncestor:"Ext.form.FieldAncestor"},requires:"Ext.layout.component.field.FieldContainer",alias:"widget.fieldcontainer",componentLayout:"fieldcontainer",combineLabels:false,labelConnector:", ",combineErrors:false,maskOnDisable:false,fieldSubTpl:"{%this.renderContainer(out,values)%}",initComponent:function(){var a=this;a.initLabelable();a.initFieldAncestor();a.callParent()},beforeRender:function(){this.callParent(arguments);this.beforeLabelableRender(arguments)},onLabelableAdded:function(a){var b=this;b.mixins.fieldAncestor.onLabelableAdded.call(this,a);b.updateLabel()},onLabelableRemoved:function(a){var b=this;b.mixins.fieldAncestor.onLabelableRemoved.call(this,a);b.updateLabel()},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getFieldLabel:function(){var a=this.fieldLabel||"";if(!a&&this.combineLabels){a=Ext.Array.map(this.query("[isFieldLabelable]"),function(b){return b.getFieldLabel()}).join(this.labelConnector)}return a},getSubTplData:function(){var a=this.initRenderData();Ext.apply(a,this.subTplData);return a},getSubTplMarkup:function(){var c=this,a=c.getTpl("fieldSubTpl"),b;if(!a.renderContent){c.setupRenderTpl(a)}b=a.apply(c.getSubTplData());return b},updateLabel:function(){var b=this,a=b.labelEl;if(a){a.update(b.getFieldLabel())}},onFieldErrorChange:function(e,b){if(this.combineErrors){var d=this,g=d.getActiveError(),c=Ext.Array.filter(d.query("[isFormField]"),function(h){return h.hasActiveError()}),a=d.getCombinedErrors(c);if(a){d.setActiveErrors(a)}else{d.unsetActiveError()}if(g!==d.getActiveError()){d.doComponentLayout()}}},getCombinedErrors:function(e){var k=[],c,l=e.length,i,d,j,b,g,h;for(c=0;c<l;c++){i=e[c];d=i.getActiveErrors();b=d.length;for(j=0;j<b;j++){g=d[j];h=i.getFieldLabel();k.push((h?h+": ":"")+g)}}return k},getTargetEl:function(){return this.bodyEl||this.callParent()}});Ext.define("Ext.form.FieldSet",{extend:"Ext.container.Container",alias:"widget.fieldset",uses:["Ext.form.field.Checkbox","Ext.panel.Tool","Ext.layout.container.Anchor","Ext.layout.component.FieldSet"],collapsed:false,toggleOnTitleClick:true,baseCls:Ext.baseCSSPrefix+"fieldset",layout:"anchor",border:1,componentLayout:"fieldset",autoEl:"fieldset",childEls:["body"],renderTpl:["{%this.renderLegend(out,values);%}",'<div id="{id}-body" class="{baseCls}-body">',"{%this.renderContainer(out,values);%}","</div>"],stateEvents:["collapse","expand"],maskOnDisable:false,beforeDestroy:function(){var b=this,a=b.legend;if(a){delete a.ownerCt;a.destroy();b.legend=null}b.callParent()},initComponent:function(){var b=this,a=b.baseCls;b.callParent();b.addEvents("beforeexpand","beforecollapse","expand","collapse");if(b.collapsed){b.addCls(a+"-collapsed");b.collapse()}if(b.title){b.addCls(a+"-with-title")}if(b.title||b.checkboxToggle||b.collapsible){b.addCls(a+"-with-legend")}},initRenderData:function(){var a=this.callParent();a.baseCls=this.baseCls;return a},getState:function(){var a=this.callParent();a=this.addPropertyToState(a,"collapsed");return a},afterCollapse:Ext.emptyFn,afterExpand:Ext.emptyFn,collapsedHorizontal:function(){return true},collapsedVertical:function(){return true},createLegendCt:function(){var c=this,a=[],b={xtype:"container",baseCls:this.baseCls+"-header",id:c.id+"-legend",autoEl:"legend",items:a,ownerCt:c,ownerLayout:c.componentLayout};if(c.checkboxToggle){a.push(c.createCheckboxCmp())}else{if(c.collapsible){a.push(c.createToggleCmp())}}a.push(c.createTitleCmp());return b},createTitleCmp:function(){var b=this,a={xtype:"component",html:b.title,cls:b.baseCls+"-header-text",id:b.id+"-legendTitle"};if(b.collapsible&&b.toggleOnTitleClick){a.listeners={el:{scope:b,click:b.toggle}};a.cls+=" "+b.baseCls+"-header-text-collapsible"}return(b.titleCmp=Ext.widget(a))},createCheckboxCmp:function(){var a=this,b="-checkbox";a.checkboxCmp=Ext.widget({xtype:"checkbox",hideEmptyLabel:true,name:a.checkboxName||a.id+b,cls:a.baseCls+"-header"+b,id:a.id+"-legendChk",checked:!a.collapsed,listeners:{change:a.onCheckChange,scope:a}});return a.checkboxCmp},createToggleCmp:function(){var a=this;a.toggleCmp=Ext.widget({xtype:"tool",type:"toggle",handler:a.toggle,id:a.id+"-legendToggle",scope:a});return a.toggleCmp},doRenderLegend:function(b,e){var d=e.$comp,c,a;if(d.title||d.checkboxToggle||d.collapsible){d.legend=c=Ext.widget(d.createLegendCt());c.ownerLayout.configureItem(c);a=d.legend.getRenderTree();Ext.DomHelper.generateMarkup(a,b)}},finishRender:function(){var a=this.legend;this.callParent();if(a){a.finishRender()}},getCollapsed:function(){return this.collapsed?"top":false},getCollapsedDockedItems:function(){var a=this.legend;return a?[a]:[]},setTitle:function(c){var b=this,a=b.legend;b.title=c;if(b.rendered){if(!b.legend){b.legend=a=Ext.widget(b.createLegendCt());a.ownerLayout.configureItem(a);a.render(b.el,0)}b.titleCmp.update(c)}return b},getTargetEl:function(){return this.body||this.frameBody||this.el},getContentTarget:function(){return this.body},expand:function(){return this.setExpanded(true)},collapse:function(){return this.setExpanded(false)},setExpanded:function(b){var c=this,d=c.checkboxCmp,a=b?"expand":"collapse";if(!c.rendered||c.fireEvent("before"+a,c)!==false){b=!!b;if(d){d.setValue(b)}if(b){c.removeCls(c.baseCls+"-collapsed")}else{c.addCls(c.baseCls+"-collapsed")}c.collapsed=!b;if(c.rendered){c.updateLayout();c.fireEvent(a,c)}}return c},getRefItems:function(a){var c=this.callParent(arguments),b=this.legend;if(b){c.unshift(b);if(a){c.unshift.apply(c,b.getRefItems(true))}}return c},toggle:function(){this.setExpanded(!!this.collapsed)},onCheckChange:function(b,a){this.setExpanded(a)},setupRenderTpl:function(a){this.callParent(arguments);a.renderLegend=this.doRenderLegend}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",manageOverflow:2,renderTpl:["{%this.renderBody(out,values);this.renderPadder(out,values)%}"],defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,beginLayout:function(c){var j=this,a=0,g,k,e,d,b,h;j.callParent(arguments);e=c.childItems;b=e.length;for(d=0;d<b;++d){k=e[d];g=k.target.anchorSpec;if(g){if(k.widthModel.calculated&&g.right){a|=1}if(k.heightModel.calculated&&g.bottom){a|=2}if(a==3){break}}}c.anchorDimensions=a;if(!Ext.supports.RightMargin&&!j.rightMarginCleanerFn){h=c.targetContext.el;j.rightMarginCleanerFn=Ext.Element.getRightMarginFixCleaner(h);h.addCls(Ext.baseCSSPrefix+"inline-children")}},calculate:function(b){var a=this,c=a.getContainerSize(b);if(b.anchorDimensions!==b.state.calculatedAnchors){a.calculateAnchors(b,c)}if(b.hasDomProp("containerChildrenDone")){if(!c.gotAll){a.done=false}a.calculateContentSize(b,b.anchorDimensions);if(a.done){a.calculateOverflow(b,c,b.anchorDimensions);return}}a.done=false},calculateAnchors:function(h,a){var p=this,l=h.childItems,g=l.length,o=a.gotHeight,j=a.gotWidth,e=a.height,c=a.width,b=h.state,q=(j?1:0)|(o?2:0),m,s,n,r,k,d;b.calculatedAnchors=(b.calculatedAnchors||0)|q;for(k=0;k<g;k++){s=l[k];n=s.getMarginInfo();m=s.target.anchorSpec;if(j&&s.widthModel.calculated){d=m.right(c)-n.width;d=p.adjustWidthAnchor(d,s);s.setWidth(d)}if(o&&s.heightModel.calculated){r=m.bottom(e)-n.height;r=p.adjustHeightAnchor(r,s);s.setHeight(r)}}},finishedLayout:function(b){var a=this.rightMarginCleanerFn;if(a){delete this.rightMarginCleanerFn;b.targetContext.el.removeCls(Ext.baseCSSPrefix+"inline-children");a()}},anchorFactory:{offset:function(a){return function(b){return b+a}},ratio:function(a){return function(b){return Math.floor(b*a)}},standard:function(a){return function(b){return b-a}}},parseAnchor:function(c,g,b){if(c&&c!="none"){var d=this.anchorFactory,e;if(this.parseAnchorRE.test(c)){return d.standard(b-g)}if(c.indexOf("%")!=-1){return d.ratio(parseFloat(c.replace("%",""))*0.01)}e=parseInt(c,10);if(!isNaN(e)){return d.offset(e)}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b},configureItem:function(g){var e=this,a=e.owner,d=g.anchor,b,c,h;e.callParent(arguments);if(!g.anchor&&g.items&&!Ext.isNumber(g.width)&&!(Ext.isIE6&&Ext.isStrict)){g.anchor=d=e.defaultAnchor}if(a.anchorSize){if(typeof a.anchorSize=="number"){c=a.anchorSize}else{c=a.anchorSize.width;h=a.anchorSize.height}}else{c=a.initialConfig.width;h=a.initialConfig.height}if(d){b=d.split(" ");g.anchorSpec={right:e.parseAnchor(b[0],g.initialConfig.width,c),bottom:e.parseAnchor(b[1],g.initialConfig.height,h)}}},sizePolicy:{"":{setsWidth:0,setsHeight:0},b:{setsWidth:0,setsHeight:1},r:{"":{setsWidth:1,setsHeight:0},b:{setsWidth:1,setsHeight:1}}},getItemSizePolicy:function(c){var e=c.anchorSpec,a="",d=this.sizePolicy,b;if(e){b=this.owner.getSizeModel();if(e.right&&!b.width.shrinkWrap){d=d.r}if(e.bottom&&!b.height.shrinkWrap){a="b"}}return d[a]}});Ext.define("Ext.layout.container.Absolute",{alias:"layout.absolute",extend:"Ext.layout.container.Anchor",alternateClassName:"Ext.layout.AbsoluteLayout",targetCls:Ext.baseCSSPrefix+"abs-layout-ct",itemCls:Ext.baseCSSPrefix+"abs-layout-item",ignoreOnContentChange:true,type:"absolute",adjustWidthAnchor:function(c,b){var d=this.targetPadding,a=b.getStyle("left");return c-a+d.left},adjustHeightAnchor:function(b,a){var c=this.targetPadding,d=a.getStyle("top");return b-d+c.top},isItemLayoutRoot:function(a){return this.ignoreOnContentChange||this.callParent(arguments)},isItemShrinkWrap:function(a){return true},beginLayout:function(b){var a=this,c=a.getTarget();a.callParent(arguments);if(c.dom!==document.body){c.position()}a.targetPadding=b.targetContext.getPaddingInfo()},isItemBoxParent:function(a){return true},onContentChange:function(){if(this.ignoreOnContentChange){return false}return this.callParent(arguments)}});Ext.define("Ext.layout.container.CheckboxGroup",{extend:"Ext.layout.container.Container",alias:["layout.checkboxgroup"],autoFlex:true,type:"checkboxgroup",childEls:["innerCt"],renderTpl:['<table id="{ownerId}-innerCt" role="presentation" style="{tableStyle}"><tbody><tr>','<tpl for="columns">','<td class="{parent.colCls}" valign="top" style="{style}">',"{% this.renderColumn(out,parent,xindex-1) %}","</td>","</tpl>","</tr></tbody></table>"],beginLayout:function(b){var n=this,e,d,l,k,h,a,m,g=0,p=0,o=n.autoFlex,j=n.owner.items.generation,c=n.innerCt.dom.style;n.callParent(arguments);k=b.childItems;if(n.lastChildGeneration!=j){n.lastChildGeneration=j;n.fixColumns()}e=n.columnEls;b.innerCtContext=b.getEl("innerCt",n);if(!b.widthModel.shrinkWrap){d=e.length;if(n.columnsArray){for(h=0;h<d;h++){a=n.owner.columns[h];if(a<1){g+=a;p++}}for(h=0;h<d;h++){a=n.owner.columns[h];if(a<1){m=((a/g)*100)+"%"}else{m=a+"px"}e[h].style.width=m}}else{for(h=0;h<d;h++){m=o?(1/d*100)+"%":"";e[h].style.width=m;p++}}if(!p){c.tableLayout="fixed";c.width=""}else{if(p<d){c.tableLayout="fixed";c.width="100%"}else{c.tableLayout="auto";if(o){c.width="100%"}else{c.width=""}}}}else{c.tableLayout="auto";c.width=""}},cacheElements:function(){var a=this;a.callParent();a.columnEls=a.innerCt.query("td."+a.owner.groupCls);a.lastChildGeneration=a.owner.items.generation},calculate:function(h){var e=this,c,b,a,i,d,g;if(!h.getDomProp("containerChildrenDone")){e.done=false}else{c=h.innerCtContext;b=h.widthModel.shrinkWrap;a=h.heightModel.shrinkWrap;i=a||b;d=c.el.dom;g=i&&c.getPaddingInfo();if(b){h.setContentWidth(d.offsetWidth+g.width,true)}if(a){h.setContentHeight(d.offsetHeight+g.height,true)}}},doRenderColumn:function(d,l,g){var i=l.$layout,c=i.owner,e=l.columnCount,h=c.items.items,b=h.length,m,a,j,k,n;if(c.vertical){j=Math.ceil(b/e);a=g*j;b=Math.min(b,a+j);k=1}else{a=g;k=e}for(;a<b;a+=k){m=h[a];i.configureItem(m);n=m.getRenderTree();Ext.DomHelper.generateMarkup(n,d)}},fixColumns:function(){var m=this,b=m.owner,c=b.columns,e=m.columnEls,k=b.items.items,h=e.length,a=k.length,j,g,n,l,d,o;if((!c||c=="auto")&&(a>h)){o=a-h;for(g=0;g<o;g++){l=m.innerCt.down("tr");l.createChild({cls:b.groupCls,tag:"td",vAlign:"top"})}m.cacheElements();e=m.columnEls;h=e.length}if(b.vertical){j=-1;n=Math.ceil(a/h);for(g=0;g<a;++g){if(g%n===0){++j}e[j].appendChild(k[g].el.dom)}}else{for(g=0;g<a;++g){j=g%h;e[j].appendChild(k[g].el.dom)}}},getColumnCount:function(){var b=this,a=b.owner,c=a.columns;if(b.columnsArray){return c.length}if(Ext.isNumber(c)){return c}return a.items.length},getItemSizePolicy:function(a){return this.autoSizePolicy},getRenderData:function(){var k=this,g=k.callParent(),b=k.owner,h,d=k.getColumnCount(),a,c,j,l=k.autoFlex,e=0,m=0;if(k.columnsArray){for(h=0;h<d;h++){a=k.owner.columns[h];if(a<1){e+=a;m++}}}g.colCls=b.groupCls;g.columnCount=d;g.columns=[];for(h=0;h<d;h++){c=(g.columns[h]={});if(k.columnsArray){a=k.owner.columns[h];if(a<1){j=((a/e)*100)+"%"}else{j=a+"px"}c.style="width:"+j}else{c.style="width:"+(1/d*100)+"%";m++}}g.tableStyle=!m?"table-layout:fixed;":(m<d)?"table-layout:fixed;width:100%":(l)?"table-layout:auto;width:100%":"table-layout:auto;";return g},getRenderTarget:function(){return this.innerCt},initLayout:function(){var b=this,a=b.owner;b.columnsArray=Ext.isArray(a.columns);b.evenColumns=Ext.isNumber(a.columns);b.callParent()},isValidParent:function(){return true},setupRenderTpl:function(a){this.callParent(arguments);a.renderColumn=this.doRenderColumn}});Ext.define("Ext.form.CheckboxGroup",{extend:"Ext.form.FieldContainer",mixins:{field:"Ext.form.field.Field"},alias:"widget.checkboxgroup",requires:["Ext.layout.container.CheckboxGroup","Ext.form.field.Base"],columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkboxfield",groupCls:Ext.baseCSSPrefix+"form-check-group",fieldBodyCls:Ext.baseCSSPrefix+"form-checkboxgroup-body",layout:"checkboxgroup",initComponent:function(){var a=this;a.callParent();a.initField()},initValue:function(){var b=this,a=b.value;b.originalValue=b.lastValue=a||b.getValue();if(a){b.setValue(a)}},onFieldAdded:function(b){var a=this;if(b.isCheckbox){a.mon(b,"change",a.checkChange,a)}a.callParent(arguments)},onFieldRemoved:function(b){var a=this;if(b.isCheckbox){a.mun(b,"change",a.checkChange,a)}a.callParent(arguments)},isEqual:function(b,a){var c=Ext.Object.toQueryString;return c(b)===c(a)},getErrors:function(){var a=[];if(!this.allowBlank&&Ext.isEmpty(this.getChecked())){a.push(this.blankText)}return a},getBoxes:function(a){return this.query("[isCheckbox]"+(a||""))},eachBox:function(b,a){Ext.Array.forEach(this.getBoxes(),b,a||this)},getChecked:function(){return this.getBoxes("[checked]")},isDirty:function(){var c=this.getBoxes(),a,d=c.length;for(a=0;a<d;a++){if(c[a].isDirty()){return true}}},setReadOnly:function(e){var c=this.getBoxes(),a,d=c.length;for(a=0;a<d;a++){c[a].setReadOnly(e)}this.readOnly=e},reset:function(){var c=this,b=c.hasActiveError(),a=c.preventMark;c.preventMark=true;c.batchChanges(function(){var e=c.getBoxes(),d,g=e.length;for(d=0;d<g;d++){e[d].reset()}});c.preventMark=a;c.unsetActiveError();if(b){c.updateLayout()}},resetOriginalValue:function(){var d=this,c=d.getBoxes(),a,e=c.length;for(a=0;a<e;a++){c[a].resetOriginalValue()}d.originalValue=d.getValue();d.checkDirty()},setValue:function(h){var g=this,d=g.getBoxes(),a,j=d.length,e,c,i;g.batchChanges(function(){for(a=0;a<j;a++){e=d[a];c=e.getName();i=false;if(h&&h.hasOwnProperty(c)){if(Ext.isArray(h[c])){i=Ext.Array.contains(h[c],e.inputValue)}else{i=h[c]}}e.setValue(i)}});return g},getValue:function(){var d={},g=this.getBoxes(),c,j=g.length,h,e,a,i;for(c=0;c<j;c++){h=g[c];e=h.getName();a=h.inputValue;if(h.getValue()){if(d.hasOwnProperty(e)){i=d[e];if(!Ext.isArray(i)){i=d[e]=[i]}i.push(a)}else{d[e]=a}}}return d},getSubmitData:function(){return null},getModelData:function(){return null},validate:function(){var a=this,d,c,b;if(a.disabled){c=true}else{d=a.getErrors();c=Ext.isEmpty(d);b=!a.hasActiveError();if(c){a.unsetActiveError()}else{a.setActiveError(d)}}if(c!==b){a.fireEvent("validitychange",a,c);a.updateLayout()}return c}},function(){this.borrow(Ext.form.field.Base,["markInvalid","clearInvalid"])});Ext.define("Ext.form.RadioGroup",{extend:"Ext.form.CheckboxGroup",alias:"widget.radiogroup",allowBlank:true,blankText:"You must select one item in this group",defaultType:"radiofield",groupCls:Ext.baseCSSPrefix+"form-radio-group",getBoxes:function(a){return this.query("[isRadio]"+(a||""))},checkChange:function(){var b=this.getValue(),a=Ext.Object.getKeys(b)[0];if(Ext.isArray(b[a])){return}this.callParent(arguments)},setValue:function(d){var j,g,e,h,c,a,b;if(Ext.isObject(d)){for(b in d){if(d.hasOwnProperty(b)){j=d[b];g=this.items.first();e=g?g.getFormId():null;h=Ext.form.RadioManager.getWithValue(b,j,e).items;a=h.length;for(c=0;c<a;++c){h[c].setValue(true)}}}}return this}});Ext.define("Ext.layout.container.Column",{extend:"Ext.layout.container.Container",alias:["layout.column"],alternateClassName:"Ext.layout.ColumnLayout",type:"column",itemCls:Ext.baseCSSPrefix+"column",targetCls:Ext.baseCSSPrefix+"column-layout-ct",columnWidthSizePolicy:{setsWidth:1,setsHeight:0},childEls:["innerCt"],manageOverflow:2,renderTpl:['<div id="{ownerId}-innerCt" class="',Ext.baseCSSPrefix,'column-inner">',"{%this.renderBody(out,values)%}",'<div class="',Ext.baseCSSPrefix,'clear"></div>',"</div>","{%this.renderPadder(out,values)%}"],getItemSizePolicy:function(a){if(a.columnWidth){return this.columnWidthSizePolicy}return this.autoSizePolicy},beginLayout:function(){this.callParent(arguments);this.innerCt.dom.style.width=""},calculate:function(c){var a=this,d=a.getContainerSize(c),b=c.state;if(b.calculatedColumns||(b.calculatedColumns=a.calculateColumns(c))){if(a.calculateHeights(c)){a.calculateOverflow(c,d);return}}a.done=false},calculateColumns:function(d){var m=this,a=m.getContainerSize(d),o=d.getEl("innerCt",m),l=d.childItems,j=l.length,b=0,g,n,e,c,h,k;if(!d.heightModel.shrinkWrap&&!d.targetContext.hasProp("height")){return false}if(!a.gotWidth){d.targetContext.block(m,"width");g=true}else{n=a.width;o.setWidth(n)}for(e=0;e<j;++e){c=l[e];h=c.getMarginInfo().width;if(!c.widthModel.calculated){k=c.getProp("width");if(typeof k!="number"){c.block(m,"width");g=true}b+=k+h}}if(!g){n=(n<b)?0:n-b;for(e=0;e<j;++e){c=l[e];if(c.widthModel.calculated){h=c.marginInfo.width;k=c.target.columnWidth;k=Math.floor(k*n)-h;k=c.setWidth(k);b+=k+h}}d.setContentWidth(b)}return !g},calculateHeights:function(h){var g=this,b=h.childItems,a=b.length,c,d,e;c=false;for(d=0;d<a;++d){e=b[d];if(!e.hasDomProp("height")){e.domBlock(g,"height");c=true}}if(!c){h.setContentHeight(g.innerCt.getHeight()+h.targetContext.getPaddingInfo().height)}return !c},finishedLayout:function(a){var b=a.bodyContext;if(b&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)){b.el.repaint()}this.callParent(arguments)},getRenderTarget:function(){return this.innerCt}});Ext.define("Ext.layout.container.Editor",{alias:"layout.editor",extend:"Ext.layout.container.Container",autoSizeDefault:{width:"field",height:"field"},getItemSizePolicy:function(c){var b=this,a=b.owner.autoSize;return b.sizePolicy||(b.sizePolicy={setsWidth:a&&a.width==="boundEl"?1:0,setsHeight:a&&a.height==="boundEl"?1:0})},calculate:function(g){var e=this,b=e.owner,a=b.autoSize,d,c;if(a===true){a=e.autoSizeDefault}if(a){d=e.getDimension(b,a.width,"getWidth",b.width);c=e.getDimension(b,a.height,"getHeight",b.height)}g.childItems[0].setSize(d,c);g.setWidth(d);g.setHeight(c);g.setContentSize(d||b.field.getWidth(),c||b.field.getHeight())},getDimension:function(a,b,d,c){switch(b){case"boundEl":return a.boundEl[d]();case"field":return undefined;default:return c}}});Ext.define("Ext.Editor",{extend:"Ext.container.Container",alias:"widget.editor",requires:["Ext.layout.container.Editor"],layout:"editor",allowBlur:true,revertInvalid:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,hidden:true,baseCls:Ext.baseCSSPrefix+"editor",initComponent:function(){var a=this,b=a.field=Ext.ComponentManager.create(a.field,"textfield");Ext.apply(b,{inEditor:true,msgTarget:b.msgTarget=="title"?"title":"qtip"});a.mon(b,{scope:a,blur:{fn:a.onFieldBlur,delay:1},specialkey:a.onSpecialKey});if(b.grow){a.mon(b,"autosize",a.onFieldAutosize,a,{delay:1})}a.floating={constrain:a.constrain};a.items=b;a.callParent(arguments);a.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onFieldAutosize:function(){this.updateLayout()},afterRender:function(b,a){var c=this,e=c.field,d=e.inputEl;c.callParent(arguments);if(d){d.dom.name="";if(c.swallowKeys){d.swallowEvent(["keypress","keydown"])}}},onSpecialKey:function(g,e){var d=this,b=e.getKey(),a=d.completeOnEnter&&b==e.ENTER,c=d.cancelOnEsc&&b==e.ESC;if(a||c){e.stopEvent();Ext.defer(function(){if(a){d.completeEdit()}else{d.cancelEdit()}if(g.triggerBlur){g.triggerBlur(e)}},10)}d.fireEvent("specialkey",d,g,e)},startEdit:function(a,c){var b=this,d=b.field;b.completeEdit();b.boundEl=Ext.get(a);c=Ext.isDefined(c)?c:Ext.String.trim(b.boundEl.dom.innerText||b.boundEl.dom.innerHTML);if(!b.rendered){b.render(b.parentEl||document.body)}if(b.fireEvent("beforestartedit",b,b.boundEl,c)!==false){b.startValue=c;b.show();d.suspendEvents();d.reset();d.setValue(c);d.resumeEvents();b.realign(true);d.focus(false,10);if(d.autoSize){d.autoSize()}b.editing=true}},realign:function(a){var b=this;if(a===true){b.updateLayout()}b.alignTo(b.boundEl,b.alignment,b.offsets)},completeEdit:function(a){var b=this,d=b.field,c;if(!b.editing){return}if(d.assertValue){d.assertValue()}c=b.getValue();if(!d.isValid()){if(b.revertInvalid!==false){b.cancelEdit(a)}return}if(String(c)===String(b.startValue)&&b.ignoreNoChange){b.hideEdit(a);return}if(b.fireEvent("beforecomplete",b,c,b.startValue)!==false){c=b.getValue();if(b.updateEl&&b.boundEl){b.boundEl.update(c)}b.hideEdit(a);b.fireEvent("complete",b,c,b.startValue)}},onShow:function(){var a=this;a.callParent(arguments);if(a.hideEl!==false){a.boundEl.hide()}a.fireEvent("startedit",a,a.boundEl,a.startValue)},cancelEdit:function(a){var c=this,b=c.startValue,e=c.field,d;if(c.editing){d=c.getValue();e.suspendEvents();c.setValue(b);e.resumeEvents();c.hideEdit(a);c.fireEvent("canceledit",c,d,b)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onFieldBlur:function(d,c){var a=this,b;if(a.allowBlur===true&&a.editing&&a.selectSameEditor!==true){a.completeEdit()}if(c&&Ext.fly(b=c.getTarget()).focusable()){b.focus()}},onHide:function(){var a=this,b=a.field;if(a.editing){a.completeEdit();return}if(b.hasFocus){b.blur()}if(b.collapse){b.collapse()}if(a.hideEl!==false){a.boundEl.show()}a.callParent(arguments)},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){var a=this;Ext.destroy(a.field);delete a.field;delete a.parentEl;delete a.boundEl;a.callParent(arguments)}});Ext.define("Ext.grid.CellEditor",{extend:"Ext.Editor",constructor:function(a){a=Ext.apply({},a);if(a.field){a.field.monitorTab=false}this.callParent([a])},onShow:function(){var b=this,d=b.boundEl.first(),a,c;if(d){a=d.dom.lastChild;if(a&&a.nodeType===3){c=b.cellTextNode=d.dom.lastChild;b.cellTextValue=c.nodeValue;c.nodeValue="\u00a0"}}b.callParent(arguments)},onHide:function(){var a=this,b=a.boundEl.first();if(b&&a.cellTextNode){a.cellTextNode.nodeValue=a.cellTextValue;delete a.cellTextNode;delete a.cellTextValue}a.callParent(arguments)},afterRender:function(){var a=this,b=a.field;a.callParent(arguments);if(b.isXType("checkboxfield")){b.mon(b.inputEl,{mousedown:a.onCheckBoxMouseDown,click:a.onCheckBoxClick,scope:a})}},onCheckBoxMouseDown:function(){this.completeEdit=Ext.emptyFn},onCheckBoxClick:function(){delete this.completeEdit;this.field.focus(false,10)},realign:function(e){var k=this,h=k.boundEl,j=h.first(),c=j.dom.childNodes,g=c.length,d=Ext.Array.clone(k.offsets),l=k.field.inputEl,b,i,m,a;if(k.isForTree&&(g>1||(g===1&&c[0].nodeType!==3))){b=j.last();i=b.getOffsetsTo(j)[0]+b.getWidth();m=j.getWidth();a=m-i;if(!k.editingPlugin.grid.columnLines){a--}d[0]+=i;k.addCls(Ext.baseCSSPrefix+"grid-editor-on-text-node")}else{a=h.getWidth()-1}if(e===true){k.field.setWidth(a)}k.alignTo(h,k.alignment,d)},onEditorTab:function(b){var a=this.field;if(a.onEditorTab){a.onEditorTab(b)}},alignment:"tl-tl",hideEl:false,cls:Ext.baseCSSPrefix+"small-editor "+Ext.baseCSSPrefix+"grid-editor",shim:false,shadow:false});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit",defaultMargins:{top:0,right:0,bottom:0,left:0},manageMargins:true,sizePolicies:{0:{setsWidth:0,setsHeight:0},1:{setsWidth:1,setsHeight:0},2:{setsWidth:0,setsHeight:1},3:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(b){var a=this.owner.getSizeModel(),c=(a.width.shrinkWrap?0:1)|(a.height.shrinkWrap?0:2);return this.sizePolicies[c]},beginLayoutCycle:function(d,p){var l=this,k=d.widthModel,j=d.heightModel,h=d.childItems,n=!k.shrinkWrap,a=!j.shrinkWrap,c=h.length,m=(d.targetContext.el.dom.tagName.toUpperCase()==="TD"),g,e,b,o;l.callParent(arguments);for(g=0;g<c;++g){b=h[g];if(!p){if(b.widthModel.calculated==n){e=null}else{e={widthModel:n?l.sizeModels.calculated:b.sizeModel.width}}if(b.heightModel.calculated!=a){(e||(e={})).heightModel=a?l.sizeModels.calculated:b.sizeModel.height}if(e){e.before=l.onBeforeInvalidateChild;b.invalidate(e)}}if(m){o=b.target.el.dom;if(b.heightModel.calculated){o.style.height=""}if(b.widthModel.calculated){o.style.width=""}}}},calculate:function(d){var k=this,j=d.childItems,b=j.length,c={contentWidth:0,contentHeight:0,length:b,ownerContext:d,targetSize:k.getContainerSize(d)},g=d.widthModel.shrinkWrap,m=d.heightModel.shrinkWrap,a=0,e=0,l,h;for(h=0;h<b;++h){c.index=h;k.fitItem(j[h],c)}if(m||g){l=d.targetContext.getPaddingInfo();if(g){a=l.width}if(m){e=l.height}}if(!d.setContentSize(c.contentWidth+a,c.contentHeight+e)){k.done=false}},fitItem:function(b,c){var a=this;if(b.invalid){a.done=false;return}c.margins=b.getMarginInfo();c.needed=c.got=0;a.fitItemWidth(b,c);a.fitItemHeight(b,c);if(c.got!=c.needed){a.done=false}},fitItemWidth:function(a,b){if(b.ownerContext.widthModel.shrinkWrap){b.contentWidth=Math.max(b.contentWidth,a.getProp("width")+b.margins.width)}else{if(a.widthModel.calculated){++b.needed;if(b.targetSize.gotWidth){++b.got;this.setItemWidth(a,b)}}}this.positionItemX(a,b)},fitItemHeight:function(a,b){if(b.ownerContext.heightModel.shrinkWrap){b.contentHeight=Math.max(b.contentHeight,a.getProp("height")+b.margins.height)}else{if(a.heightModel.calculated){++b.needed;if(b.targetSize.gotHeight){++b.got;this.setItemHeight(a,b)}}}this.positionItemY(a,b)},onBeforeInvalidateChild:function(b,a){++b.context.progressCount;if(a.widthModel){b.widthModel=a.widthModel}if(a.heightModel){b.heightModel=a.heightModel}},positionItemX:function(a,c){var b=c.margins;if(c.index||b.left){a.setProp("x",b.left)}if(b.width){a.setProp("margin-right",b.width)}},positionItemY:function(a,c){var b=c.margins;if(c.index||b.top){a.setProp("y",b.top)}if(b.height){a.setProp("margin-bottom",b.height)}},setItemHeight:function(a,b){a.setHeight(b.targetSize.height-b.margins.height)},setItemWidth:function(a,b){a.setWidth(b.targetSize.width-b.margins.width)}});Ext.define("Ext.layout.container.Card",{extend:"Ext.layout.container.Fit",alternateClassName:"Ext.layout.CardLayout",alias:"layout.card",type:"card",hideInactive:true,deferredRender:false,getRenderTree:function(){var a=this,b=a.getActiveItem();if(b){if(b.hasListeners.beforeactivate&&b.fireEvent("beforeactivate",b)===false){b=a.activeItem=a.owner.activeItem=null}else{if(b.hasListeners.activate){b.on({boxready:function(){b.fireEvent("activate",b)},single:true})}}if(a.deferredRender){if(b){return a.getItemsRenderTree([b])}}else{return a.callParent(arguments)}}},renderChildren:function(){var a=this,b=a.getActiveItem();if(!a.deferredRender){a.callParent()}else{if(b){a.renderItems([b],a.getRenderTarget())}}},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&b.parentNode===(d.dom||d))||false},getActiveItem:function(){var b=this,a=b.parseActiveItem(b.activeItem||(b.owner&&b.owner.activeItem));if(a&&b.owner.items.indexOf(a)!=-1){b.activeItem=a}else{b.activeItem=null}return b.activeItem},parseActiveItem:function(a){if(a&&a.isComponent){return a}else{if(typeof a=="number"||a===undefined){return this.getLayoutItems()[a||0]}else{return this.owner.getComponent(a)}}},configureItem:function(a){if(a===this.getActiveItem()){a.hidden=false}else{a.hidden=true}this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.activeItem){b.activeItem=null}},getAnimation:function(b,a){var c=(b||{}).cardSwitchAnimation;if(c===false){return false}return c||a.cardSwitchAnimation},getNext:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b+1]||(c?a[0]:false)},next:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getNext(a),b)},getPrev:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b-1]||(c?a[a.length-1]:false)},prev:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getPrev(a),b)},setActiveItem:function(b){var e=this,a=e.owner,d=e.activeItem,g=a.rendered,c;b=e.parseActiveItem(b);c=a.items.indexOf(b);if(c==-1){c=a.items.items.length;Ext.suspendLayouts();b=a.add(b);Ext.resumeLayouts()}if(b&&d!=b){if(b.fireEvent("beforeactivate",b,d)===false){return false}if(d&&d.fireEvent("beforedeactivate",d,b)===false){return false}if(g){Ext.suspendLayouts();if(!b.rendered){e.renderItem(b,e.getRenderTarget(),a.items.length)}if(d){if(e.hideInactive){d.hide();d.hiddenByLayout=true}d.fireEvent("deactivate",d,b)}if(b.hidden){b.show()}if(!b.hidden){e.activeItem=b}Ext.resumeLayouts(true)}else{e.activeItem=b}b.fireEvent("activate",b,d);return e.activeItem}return false}});Ext.define("Ext.layout.container.Form",{alias:"layout.form",extend:"Ext.layout.container.Auto",alternateClassName:"Ext.layout.FormLayout",tableCls:Ext.baseCSSPrefix+"form-layout-table",type:"form",manageOverflow:2,childEls:["formTable"],padRow:'<tr><td class="'+Ext.baseCSSPrefix+'form-item-pad" colspan="3"></td></tr>',renderTpl:['<table id="{ownerId}-formTable" class="{tableCls}" style="width:100%" cellpadding="0">',"{%this.renderBody(out,values)%}","</table>","{%this.renderPadder(out,values)%}"],getRenderData:function(){var a=this.callParent();a.tableCls=this.tableCls;return a},calculate:function(e){var d=this,h=d.getContainerSize(e,true),a,g,b=0,c;if(h.gotWidth){this.callParent(arguments);a=d.formTable.dom.offsetWidth;g=e.childItems;for(c=g.length;b<c;++b){g[b].setWidth(a,false)}}else{d.done=false}},getRenderTarget:function(){return this.formTable},getRenderTree:function(){var b=this.callParent(arguments),c=0,a=b.length,d;for(;c<a;c++){d=b[c];if(d.tag&&d.tag=="table"){d.tag="tbody";delete d.cellspacing;delete d.cellpadding;if(Ext.isIE6){d.cn=this.padRow}}else{b[c]={tag:"tbody",cn:{tag:"tr",cn:{tag:"td",colspan:3,style:"width:100%",cn:d}}}}}return b},isValidParent:function(b,c,a){return true},isItemShrinkWrap:function(a){return((a.shrinkWrap===true)?3:a.shrinkWrap||0)&2},getItemSizePolicy:function(a){return{setsWidth:1,setsHeight:0}}});Ext.define("Ext.layout.container.Table",{alias:["layout.table"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.TableLayout",monitorResize:false,type:"table",clearEl:true,targetCls:Ext.baseCSSPrefix+"table-layout-ct",tableCls:Ext.baseCSSPrefix+"table-layout",cellCls:Ext.baseCSSPrefix+"table-layout-cell",tableAttrs:null,itemSizePolicy:{setsWidth:0,setsHeight:0},getItemSizePolicy:function(a){return this.itemSizePolicy},getLayoutItems:function(){var g=this,b=[],c=g.callParent(),e,a=c.length,d;for(d=0;d<a;d++){e=c[d];if(!e.hidden){b.push(e)}}return b},renderChildren:function(){var j=this,h=j.getLayoutItems(),e=j.owner.getTargetEl().child("table",true).tBodies[0],p=e.rows,d=0,g=h.length,o,m,c,a,n,l,k,b;o=j.calculateCells(h);for(;d<g;d++){m=o[d];c=m.rowIdx;a=m.cellIdx;n=h[d];l=p[c];if(!l){l=e.insertRow(c);if(j.trAttrs){l.set(j.trAttrs)}}b=k=Ext.get(l.cells[a]||l.insertCell(a));if(j.needsDivWrap()){b=k.first()||k.createChild({tag:"div"});b.setWidth(null)}if(!n.rendered){j.renderItem(n,b,0)}else{if(!j.isValidParent(n,b,c,a,e)){j.moveItem(n,b,0)}}if(j.tdAttrs){k.set(j.tdAttrs)}if(n.tdAttrs){k.set(n.tdAttrs)}k.set({colSpan:n.colspan||1,rowSpan:n.rowspan||1,id:n.cellId||"",cls:j.cellCls+" "+(n.cellCls||"")});if(!o[d+1]||o[d+1].rowIdx!==c){a++;while(l.cells[a]){l.deleteCell(a)}}}c++;while(e.rows[c]){e.deleteRow(c)}},calculate:function(g){if(!g.hasDomProp("containerChildrenDone")){this.done=false}else{var c=g.targetContext,b=g.widthModel.shrinkWrap,a=g.heightModel.shrinkWrap,h=a||b,d=h&&c.el.child("table",true),e=h&&c.getPaddingInfo();if(b){g.setContentWidth(d.offsetWidth+e.width,true)}if(a){g.setContentHeight(d.offsetHeight+e.height,true)}}},finalizeLayout:function(){if(this.needsDivWrap()){var b=this.getLayoutItems(),c,a=b.length,d;for(c=0;c<a;c++){d=b[c];Ext.fly(d.el.dom.parentNode).setWidth(d.getWidth())}}if(Ext.isIE6||(Ext.isIEQuirks)){this.owner.getTargetEl().child("table").repaint()}},calculateCells:function(k){var m=[],b=0,d=0,a=0,h=this.columns||Infinity,n=[],e=0,c,g=k.length,l;for(;e<g;e++){l=k[e];while(d>=h||n[d]>0){if(d>=h){d=0;a=0;b++;for(c=0;c<h;c++){if(n[c]>0){n[c]--}}}else{d++}}m.push({rowIdx:b,cellIdx:a});for(c=l.colspan||1;c;--c){n[d]=l.rowspan||1;++d}++a}return m},getRenderTree:function(){var k=this,h=k.getLayoutItems(),o,p=[],q=Ext.apply({tag:"table",role:"presentation",cls:k.tableCls,cellspacing:0,cn:{tag:"tbody",cn:p}},k.tableAttrs),c=k.tdAttrs,d=k.needsDivWrap(),e,g=h.length,n,m,j,b,a,l;o=k.calculateCells(h);for(e=0;e<g;e++){n=h[e];m=o[e];b=m.rowIdx;a=m.cellIdx;j=p[b];if(!j){j=p[b]={tag:"tr",cn:[]};if(k.trAttrs){Ext.apply(j,k.trAttrs)}}l=j.cn[a]={tag:"td"};if(c){Ext.apply(l,c)}Ext.apply(l,{colSpan:n.colspan||1,rowSpan:n.rowspan||1,id:n.cellId||"",cls:k.cellCls+" "+(n.cellCls||"")});if(d){l=l.cn={tag:"div"}}k.configureItem(n);l.cn=n.getRenderTree()}return q},isValidParent:function(g,h,e,d){var b,a,c;if(arguments.length===3){c=g.el.up("table");return c&&c.dom.parentNode===h.dom}b=this.owner.getTargetEl().child("table",true).tBodies[0];a=b.rows[e].cells[d];return g.el.dom.parentNode===a},needsDivWrap:function(){return Ext.isOpera10_5}});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(c,a){var b=this;b.layout=c;Ext.apply(b,a||{});b.mixins.observable.constructor.call(b);b.addEvents("scroll");b.scrollPosition=0;b.scrollSize=0},getPrefixConfig:function(){var a=this;a.initCSSClasses();return{cls:Ext.layout.container.Box.prototype.innerCls+" "+a.beforeCtCls,cn:{id:a.layout.owner.id+"-before-scroller",cls:a.scrollerCls+" "+a.beforeScrollerCls,style:"display:none"}}},getSuffixConfig:function(){var a=this;return{cls:Ext.layout.container.Box.prototype.innerCls+" "+a.afterCtCls,cn:{id:a.layout.owner.id+"-after-scroller",cls:a.scrollerCls+" "+a.afterScrollerCls,style:"display:none"}}},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},initCSSClasses:function(){var d=this,e=Ext.baseCSSPrefix,c=d.layout,g=c.getNames(),a=g.left,h=g.right,b=d.getOwnerType(c.owner);d.beforeCtCls=d.beforeCtCls||e+"box-scroller-"+a;d.afterCtCls=d.afterCtCls||e+"box-scroller-"+h;d.beforeScrollerCls=d.beforeScrollerCls||e+b+"-scroll-"+a;d.afterScrollerCls=d.afterScrollerCls||e+b+"-scroll-"+h},beginLayout:function(b){var a=this.layout,c=a.getNames();b.innerCtScrollPos=a.innerCt.dom["scroll"+c.leftCap];this.callParent(arguments)},completeLayout:function(a){this.scrollSize=a.props["content"+this.layout.getNames().widthCap];this.callParent(arguments)},finishedLayout:function(c){var b=this,a=b.layout,d=a.getNames(),e=Math.min(b.getMaxScrollPosition(),c.innerCtScrollPos);a.innerCt.dom["scroll"+d.leftCap]=e},handleOverflow:function(d){var c=this,b=c.layout,e=b.getNames(),a="get"+e.widthCap;c.captureChildElements();c.showScrollers();return{reservedSpace:c.beforeCt[a]()+c.afterCt[a]()}},captureChildElements:function(){var b=this,a=b.layout.owner.el,c,d;if(!b.beforeCt){c=b.beforeScroller=a.getById(b.layout.owner.id+"-before-scroller");d=b.afterScroller=a.getById(b.layout.owner.id+"-after-scroller");b.beforeCt=c.up("");b.afterCt=d.up("");b.createWheelListener();c.addClsOnOver(b.beforeScrollerCls+"-hover");d.addClsOnOver(b.afterScrollerCls+"-hover");c.setVisibilityMode(Ext.Element.DISPLAY);d.setVisibilityMode(Ext.Element.DISPLAY);b.beforeRepeater=new Ext.util.ClickRepeater(c,{interval:b.scrollRepeatInterval,handler:b.scrollLeft,scope:b});b.afterRepeater=new Ext.util.ClickRepeater(d,{interval:b.scrollRepeatInterval,handler:b.scrollRight,scope:b})}},createWheelListener:function(){this.layout.innerCt.on({mousewheel:function(a){this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)},stopEvent:true,scope:this})},clearOverflow:function(){var a=this.layout;this.hideScrollers()},showScrollers:function(){var a=this;a.captureChildElements();a.beforeScroller.show();a.afterScroller.show();a.updateScrollButtons();a.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){var a=this;if(a.beforeScroller!==undefined){a.beforeScroller.hide();a.afterScroller.hide();a.layout.owner.removeClsWithUI("scroller")}},destroy:function(){var a=this;Ext.destroy(a.beforeRepeater,a.afterRepeater,a.beforeScroller,a.afterScroller,a.beforeCt,a.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var d=this,e,c,a,b;if(d.beforeScroller===undefined||d.afterScroller===undefined){return}e=d.atExtremeBefore()?"addCls":"removeCls";c=d.atExtremeAfter()?"addCls":"removeCls";a=d.beforeScrollerCls+"-disabled";b=d.afterScrollerCls+"-disabled";d.beforeScroller[e](a);d.afterScroller[c](b);d.scrolling=false},atExtremeBefore:function(){return !this.getScrollPosition()},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var c=this,b=c.layout,a;if(c.hasOwnProperty("scrollPosition")){a=c.scrollPosition}else{a=parseInt(b.innerCt.dom["scroll"+b.getNames().leftCap],10)||0}return a},getMaxScrollPosition:function(){var b=this,a=b.layout,c=a.getNames(),d=b.scrollSize-a.innerCt["get"+c.widthCap]();return(d<0)?0:d},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(a,b){var g=this,e=g.layout,h=e.getNames(),d=g.getScrollPosition(),c=Ext.Number.constrain(a,0,g.getMaxScrollPosition());if(c!=d&&!g.scrolling){delete g.scrollPosition;if(b===undefined){b=g.animateScroll}e.innerCt.scrollTo(h.left,c,b?g.getScrollAnim():false);if(b){g.scrolling=true}else{g.updateScrollButtons()}g.fireEvent("scroll",g,c,b?g.getScrollAnim():false)}},scrollToItem:function(h,b){var g=this,e=g.layout,i=e.getNames(),a,d,c;h=g.getItem(h);if(h!==undefined){a=g.getItemVisibility(h);if(!a.fullyVisible){d=h.getBox(true,true);c=d[i.x];if(a.hiddenEnd){c-=(g.layout.innerCt["get"+i.widthCap]()-d[i.width])}g.scrollTo(c,b)}}},getItemVisibility:function(j){var h=this,b=h.getItem(j).getBox(true,true),c=h.layout,g=c.getNames(),e=b[g.x],d=e+b[g.width],a=h.getScrollPosition(),i=a+c.innerCt["get"+g.widthCap]();return{hiddenStart:e<a,hiddenEnd:d>i,fullyVisible:e>a&&d<i}}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,tooltipType:"qtip",arrowCls:Ext.baseCSSPrefix+"menu-item-arrow",childEls:["itemEl","iconEl","textEl","arrowEl"],renderTpl:['<tpl if="plain">',"{text}","<tpl else>",'<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img id="{id}-iconEl" src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="arrowCls">style="margin-right: 17px;"</tpl> >{text}</span>','<img id="{id}-arrowEl" src="{blank}" class="{arrowCls}" />',"</a>","</tpl>"],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},getFocusEl:function(){return this.itemEl},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(a.activated&&(!a.menu.rendered||!a.menu.isVisible())){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},cancelDeferHide:function(){clearTimeout(this.hideMenuTimer)},deferHideParentMenus:function(){var a;Ext.menu.Manager.hideAll();if(!Ext.Element.getActiveElement()){a=this.up(":not([hidden])");if(a){a.focus()}}},expandMenu:function(a){var b=this;if(b.menu){b.cancelDeferHide();if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"],d;b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){d=b.menu;delete b.menu;b.setMenu(d)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onRemoved:function(){var a=this;if(a.activated&&a.parentMenu.activeItem===a){a.parentMenu.deactivateActiveItem()}a.callParent(arguments);delete a.parentMenu;delete a.ownerButton},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}a.callParent()},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);a.cancelDeferHide();clearTimeout(a.deferHideParentMenusTimer);a.setMenu(null);a.callParent(arguments)},beforeRender:function(){var a=this,b=Ext.BLANK_IMAGE_URL;a.callParent();Ext.applyIf(a.renderData,{href:a.href||"#",hrefTarget:a.hrefTarget,icon:a.icon||b,iconCls:a.iconCls+(a.checkChangeDisabled?" "+a.disabledCls:""),plain:a.plain,text:a.text,arrowCls:a.menu?a.arrowCls:"",blank:b})},onRender:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.setTooltip(a.tooltip,true)}},setMenu:function(d,c){var b=this,a=b.menu;if(a){delete a.parentItem;delete a.parentMenu;delete a.ownerCt;delete a.ownerItem;if(c===true||(c!==false&&b.destroyMenu)){Ext.destroy(a)}}if(d){b.menu=Ext.menu.Manager.get(d);b.menu.ownerItem=b}else{b.menu=null}if(b.rendered&&!b.destroying){b.arrowEl[b.menu?"addCls":"removeCls"](b.arrowCls)}},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIcon:function(b){var a=this.iconEl;if(a){a.src=b||Ext.BLANK_IMAGE_URL}this.icon=b},setIconCls:function(b){var c=this,a=c.iconEl;if(a){if(c.iconCls){a.removeCls(c.iconCls)}if(b){a.addCls(b)}}c.iconCls=b},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||"");b.ownerCt.updateLayout()}},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.itemEl)}},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.itemEl.id},c));b.tooltip=c}else{b.itemEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,checkChangeDisabled:false,afterRender:function(){var a=this;a.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true);if(a.checkChangeDisabled){a.disableCheckChange()}},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.addCls(b.disabledCls)}b.checkChangeDisabled=true},enableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.removeCls(b.disabledCls)}b.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(g){var h=this.menu,b=h.items,d=h.focusedItem,c=d?b.indexOf(d):-1,a=c+g,e;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}e=b.getAt(a);if(h.canActivateItem(e)){h.setActiveItem(e);break}a+=g}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&&this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,g=d.focusedItem,a=d.activeItem,b;if(g&&this.isWhitelisted(g)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var c=this.active,e,b,a,d;if(c&&c.length>0){e=c.clone();b=e.items;d=b.length;for(a=0;a<d;a++){b[a].hide()}return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length<1){Ext.getDoc().un("mousedown",b.onMouseDown,b);b.attached=false}},onShow:function(a){var e=this,g=e.active,d=g.last(),c=e.attached,b=a.getEl(),h;e.lastShow=new Date();g.add(a);if(!c){Ext.getDoc().on("mousedown",e.onMouseDown,e,{buffer:Ext.isIE?10:undefined});e.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&&!a.allowOtherMenus){this.hideAll()}else{if(b&&b.activeChild&&a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(d){var b=this,c=b.active,a=b.lastShow;if(Ext.Date.getElapsed(a)>50&&c.length>0&&!d.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll()}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return new Ext.menu.Menu({items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b<e;b++){h=j[b];if(h!=d){h.setChecked(false)}}}}});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",hrefTarget:"_blank",border:true,childEls:["btnEl","btnWrap","btnInnerEl","btnIconEl"],renderTpl:['<em id="{id}-btnWrap"<tpl if="splitCls"> class="{splitCls}"</tpl>>','<tpl if="href">','<a id="{id}-btnEl" href="{href}" class="{btnCls}" target="{hrefTarget}"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="link">','<span id="{id}-btnInnerEl" class="{baseCls}-inner">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</a>","<tpl else>",'<button id="{id}-btnEl" type="{type}" class="{btnCls}" hidefocus="true"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="button" autocomplete="off">','<span id="{id}-btnInnerEl" class="{baseCls}-inner" style="{innerSpanStyle}">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</button>","</tpl>","</em>",'<tpl if="closable">','<a id="{id}-closeEl" href="#" class="{baseCls}-close-btn" title="{closeText}"></a>',"</tpl>"],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,persistentPadding:undefined,shrinkWrap:3,frame:true,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerButton=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)){a.enableToggle=true}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.inOnFocus?this.el:this.btnEl},onFocus:function(b){var a=this;a.inOnFocus=true;a.callParent(arguments);a.inOnFocus=false},onBlur:function(c){var b=this,a=b.focusCls,d=b.getEl();if(b.destroying){return}b.beforeBlur(c);if(a&&d){d.removeCls(b.removeClsWithUI(a,true))}if(b.validateOnBlur){b.validate()}b.hasFocus=false;b.fireEvent("blur",b,c);b.postBlur(c)},setComponentCls:function(){var b=this,a=b.getComponentCls();if(!Ext.isEmpty(b.oldCls)){b.removeClsWithUI(b.oldCls);b.removeClsWithUI(b.pressedCls)}b.oldCls=a;b.addClsWithUI(a)},getComponentCls:function(){var b=this,a=[];if(b.iconCls||b.icon){if(b.text){a.push("icon-text-"+b.iconAlign)}else{a.push("icon")}}else{if(b.text){a.push("noicon")}}if(b.pressed){a.push(b.pressedCls)}return a},beforeRender:function(){var a=this;a.callParent();a.oldCls=a.getComponentCls();a.addClsWithUI(a.oldCls);Ext.applyIf(a.renderData,a.getTemplateArgs());if(a.scale){a.setScale(a.scale)}},onRender:function(){var c=this,a,b;c.doc=Ext.getDoc();c.callParent(arguments);if(c.split&&c.arrowTooltip){c.arrowEl.dom.setAttribute(c.getTipAttr(),c.arrowTooltip)}a=c.el;if(c.tooltip){c.setTooltip(c.tooltip,true)}if(c.handleMouseEvents){b={scope:c,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousedown:c.onMouseDown};if(c.split){b.mousemove=c.onMouseMove}}else{b={scope:c}}if(c.menu){c.mon(c.menu,{scope:c,show:c.onMenuShow,hide:c.onMenuHide});c.keyMap=new Ext.util.KeyMap({target:c.el,key:Ext.EventObject.DOWN,handler:c.onDownKey,scope:c})}if(c.repeat){c.mon(new Ext.util.ClickRepeater(a,Ext.isObject(c.repeat)?c.repeat:{}),"click",c.onRepeatClick,c)}else{b[c.clickEvent]=c.onClick}c.mon(a,b);Ext.ButtonToggleManager.register(c)},getTemplateArgs:function(){var c=this,b=c.getPersistentPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),disabled:c.disabled,hrefTarget:c.hrefTarget,type:c.type,btnCls:c.getBtnCls(),splitCls:c.getSplitCls(),iconUrl:c.icon,iconCls:c.iconCls,text:c.text||"&#160;",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},getBtnCls:function(){return this.textAlign?this.baseCls+"-"+this.textAlign:""},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setComponentCls();if(d.didIconStateChange(c,b)){d.updateLayout()}}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.rendered){a.btnInnerEl.update(b||"&#160;");a.setComponentCls();if(Ext.isStrict&&Ext.isIE8){a.el.repaint()}a.updateLayout()}return a},setIcon:function(b){var c=this,a=c.btnIconEl,d=c.icon;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setComponentCls();if(c.didIconStateChange(d,b)){c.updateLayout()}}return c},didIconStateChange:function(a,c){var b=Ext.isEmpty(c);return Ext.isEmpty(a)?!b:b},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;if(b.fireEvent("click",b,c)!==false){if(a){a.call(b.scope||b,b,c)}b.blur()}},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(h){var d=this,c=d.el,g=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=h.getX()-c.getX();a=c.getWidth()}else{b=h.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!g){d.onMenuTriggerOver(h)}}else{if(g){d.onMenuTriggerOut(h)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+e.frameSize[b]}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=false}b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=true}b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);if(b.btnInnerEl&&(Ext.isIE6||Ext.isIE7)){b.btnInnerEl.repaint()}return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentPadding:function(){var d=this,e=d.persistentPadding,b,a,c,g;if(!e){e=d.self.prototype.persistentPadding=[0,0,0,0];if(!Ext.isIE){b=new Ext.button.Button({text:"test",style:"position:absolute;top:-999px;"});b.el=Ext.DomHelper.append(Ext.getBody(),b.getRenderTree(),true);b.applyChildEls(b.el);c=b.btnEl;g=b.btnInnerEl;c.setSize(null,null);a=g.getOffsetsTo(c);e[0]=a[1];e[1]=c.getWidth()-g.getWidth()-a[0];e[2]=c.getHeight()-g.getHeight()-a[1];e[3]=a[0];b.destroy();b.el.remove()}}return e}},function(){var a={},b=function(d,j){if(j){var h=a[d.toggleGroup],e=h.length,c;for(c=0;c<e;c++){if(h[c]!==d){h[c].toggle(false)}}}};Ext.ButtonToggleManager={register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){Ext.Array.remove(d,c);c.un("toggle",b)}},getPressed:function(h){var e=a[h],d=0,c;if(e){for(c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}});Ext.define("Ext.button.Split",{alias:"widget.splitbutton",extend:"Ext.button.Button",alternateClassName:"Ext.SplitButton",arrowCls:"split",split:true,initComponent:function(){this.callParent();this.addEvents("arrowclick")},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},onClick:function(c,a){var b=this;c.preventDefault();if(!b.disabled){if(b.overMenuTrigger){b.maybeShowMenu();b.fireEvent("arrowclick",b,c);if(b.arrowHandler){b.arrowHandler.call(b.scope||b,b,c)}}else{b.doToggle();b.fireHandler(c)}}}});Ext.define("Ext.button.Cycle",{alias:"widget.cycle",extend:"Ext.button.Split",alternateClassName:"Ext.CycleButton",getButtonText:function(b){var a=this,c="";if(b&&a.showText===true){if(a.prependText){c+=a.prependText}c+=b.text;return c}return a.text},setActiveItem:function(c,a){var b=this;if(!Ext.isObject(c)){c=b.menu.getComponent(c)}if(c){if(!b.rendered){b.text=b.getButtonText(c);b.iconCls=c.iconCls}else{b.setText(b.getButtonText(c));b.setIconCls(c.iconCls)}b.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(b.forceIcon){b.setIconCls(b.forceIcon)}if(!a){b.fireEvent("change",b,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){var g=this,e=0,b,c,a,d;g.addEvents("change");if(g.changeHandler){g.on("change",g.changeHandler,g.scope||g);delete g.changeHandler}b=(g.menu.items||[]).concat(g.items||[]);g.menu=Ext.applyIf({cls:Ext.baseCSSPrefix+"cycle-menu",items:[]},g.menu);a=b.length;for(c=0;c<a;c++){d=b[c];d=Ext.applyIf({group:g.id,itemIndex:c,checkHandler:g.checkHandler,scope:g,checked:d.checked||false},d);g.menu.items.push(d);if(d.checked){e=c}}g.itemCount=g.menu.items.length;g.callParent(arguments);g.on("click",g.toggleSelected,g);g.setActiveItem(e,g);if(g.width&&g.showText){g.addCls(Ext.baseCSSPrefix+"cycle-fixed-width")}},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var c=this,a=c.menu,b;b=c.activeItem.next(":not([disabled])")||a.items.getAt(0);b.setChecked(true)}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:"&#160;",beforeRender:function(a,c){var b=this;b.callParent();b.addCls(b.separatorCls)}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(b,a){var c=this;c.panel=b;c.dragData={panel:b};c.panelProxy=new Ext.panel.Proxy(b,a);c.proxy=c.panelProxy.proxy;c.callParent([b.el,a]);c.setupEl(b)},setupEl:function(a){var c=this,d=a.header,b=a.body;if(d){c.setHandleElId(d.id);b=d.el}if(b){b.setStyle("cursor","move");c.scroll=false}else{a.on("boxready",c.setupEl,c,{single:true})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.panelProxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.panelProxy.ghost.el.dom},endDrag:function(a){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)},onInvalidDrop:function(c,b,d){var a=this;a.beforeInvalidDrop(c,b,d);if(a.cachedTarget){if(a.cachedTarget.isNotifyTarget){a.cachedTarget.notifyOut(a,b,a.dragData)}a.cacheTarget=null}if(a.afterInvalidDrop){a.afterInvalidDrop(b,d)}}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS","Ext.layout.component.Body","Ext.Img"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,componentLayout:"body",titleAlign:"left",childEls:["body"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>"],headingTpl:'<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span>',shrinkWrap:3,initComponent:function(){var b=this,e,d,a,c,g;b.addEvents("click","dblclick");b.indicateDragCls=b.baseCls+"-draggable";b.title=b.title||"&#160;";b.tools=b.tools||[];b.items=b.items||[];b.orientation=b.orientation||"horizontal";b.dock=(b.dock)?b.dock:(b.orientation=="horizontal")?"top":"left";b.addClsWithUI([b.orientation,b.dock]);if(b.indicateDrag){b.addCls(b.indicateDragCls)}if(!Ext.isEmpty(b.iconCls)||!Ext.isEmpty(b.icon)){b.initIconCmp();b.items.push(b.iconCmp)}if(b.orientation=="vertical"){b.layout={type:"vbox",align:"center"};b.textConfig={width:16,cls:b.baseCls+"-text",type:"text",text:b.title,rotate:{degrees:90}};c=b.ui;if(Ext.isArray(c)){c=c[0]}e="."+b.baseCls+"-text-"+c;if(Ext.scopeResetCSS){e="."+Ext.baseCSSPrefix+"reset "+e}d=Ext.util.CSS.getRule(e);if(d){a=d.style}else{a=(g=Ext.getBody().createChild({style:"position:absolute",cls:b.baseCls+"-text-"+c})).getStyles("fontFamily","fontWeight","fontSize","color");g.remove()}if(a){Ext.apply(b.textConfig,{"font-family":a.fontFamily,"font-weight":a.fontWeight,"font-size":a.fontSize,fill:a.color})}b.titleCmp=new Ext.draw.Component({width:16,ariaRole:"heading",focusable:false,viewBox:false,flex:1,id:b.id+"_hd",autoSize:true,items:b.textConfig,xhooks:{setSize:function(h){this.callParent([h])}},childEls:[{name:"textEl",select:"."+b.baseCls+"-text"}]})}else{b.layout={type:"hbox",align:"middle"};b.titleCmp=new Ext.Component({ariaRole:"heading",focusable:false,noWrap:true,flex:1,id:b.id+"_hd",style:"text-align:"+b.titleAlign,cls:b.baseCls+"-text-container",renderTpl:b.getTpl("headingTpl"),renderData:{title:b.title,cls:b.baseCls,ui:b.ui},childEls:["textEl"]})}b.items.push(b.titleCmp);b.items=b.items.concat(b.tools);b.callParent();b.on({dblclick:b.onDblClick,click:b.onClick,element:"el",scope:b})},initIconCmp:function(){var b=this,a={focusable:false,src:Ext.BLANK_IMAGE_URL,cls:[b.baseCls+"-icon",b.iconCls],id:b.id+"-iconEl",iconCls:b.iconCls};if(!Ext.isEmpty(b.icon)){delete a.iconCls;a.src=b.icon}b.iconCmp=new Ext.Img(a)},afterRender:function(){this.el.unselectable();this.callParent()},addUIClsToElement:function(b){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(g,d[c])){g.push(d[c])}}e.bodyCls=g.join(" ")}else{e.bodyCls=d.join(" ")}return a},removeUIClsFromElement:function(b){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(g,d[c])}e.bodyCls=g.join(" ")}return a},addUIToElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");if(!Ext.Array.contains(c,a)){c.push(a)}b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.addCls(b.baseCls+"-text-"+b.ui)}},removeUIFromElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.removeCls(b.baseCls+"-text-"+b.ui)}},onClick:function(a){this.fireClickEvent("click",a)},onDblClick:function(a){this.fireClickEvent("dblclick",a)},fireClickEvent:function(a,c){var b="."+Ext.panel.Tool.prototype.baseCls;if(!c.getTarget(b)){this.fireEvent(a,this,c)}},getFocusEl:function(){return this.el},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(d){var c=this,b,a;if(c.rendered){if(c.titleCmp.rendered){if(c.titleCmp.surface){c.title=d||"";b=c.titleCmp.surface.items.items[0];a=c.titleCmp.surface;a.remove(b);c.textConfig.type="text";c.textConfig.text=d;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:90}},true);c.titleCmp.autoSizeSurface()}else{c.title=d;c.titleCmp.textEl.update(c.title||"&#160;")}c.titleCmp.updateLayout()}else{c.titleCmp.on({render:function(){c.setTitle(d)},single:true})}}else{c.title=d}},getMinWidth:function(){var e=this,d=e.titleCmp.textEl.dom,a,g=e.tools,b,c;d.style.display="inline";a=d.offsetWidth;d.style.display="";if(g&&(b=g.length)){for(c=0;c<b;c++){if(g[c].el){a+=g[c].el.dom.offsetWidth}}}if(e.iconCmp){a+=e.iconCmp.el.dom.offsetWidth}return a+10},setIconCls:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.iconCls=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.removeCls(c.iconCls);c.addCls(a);c.iconCls=a}}}},setIcon:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.icon=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.setSrc(b.icon)}}}},addTool:function(a){this.tools.push(this.add(a))},onAdd:function(b,a){this.callParent(arguments);if(b instanceof Ext.panel.Tool){b.bindTo(this.ownerCt);this.tools[b.type]=b}},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyCls:this.bodyCls})}});Ext.define("Ext.picker.Color",{extend:"Ext.Component",requires:"Ext.XTemplate",alias:"widget.colorpicker",alternateClassName:"Ext.ColorPalette",componentCls:Ext.baseCSSPrefix+"color-picker",selectedCls:Ext.baseCSSPrefix+"color-picker-selected",value:null,clickEvent:"click",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['<tpl for="colors">','<a href="#" class="color-{.}" hidefocus="on">','<em><span style="background:#{.}" unselectable="on">&#160;</span></em>',"</a>","</tpl>"],initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("select");if(a.handler){a.on("select",a.handler,a.scope,true)}},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{itemCls:a.itemCls,colors:a.colors})},onRender:function(){var b=this,a=b.clickEvent;b.callParent(arguments);b.mon(b.el,a,b.handleClick,b,{delegate:"a"});if(a!="click"){b.mon(b.el,"click",Ext.emptyFn,b,{delegate:"a",stopEvent:true})}},afterRender:function(){var a=this,b;a.callParent(arguments);if(a.value){b=a.value;a.value=null;a.select(b,true)}},handleClick:function(c,d){var b=this,a;c.stopEvent();if(!b.disabled){a=d.className.match(b.colorRe)[1];b.select(a.toUpperCase())}},select:function(b,a){var d=this,g=d.selectedCls,e=d.value,c;b=b.replace("#","");if(!d.rendered){d.value=b;return}if(b!=e||d.allowReselect){c=d.el;if(d.value){c.down("a.color-"+e).removeCls(g)}c.down("a.color-"+b).addCls(g);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});Ext.define("Ext.picker.Month",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.util.ClickRepeater","Ext.Date","Ext.button.Button"],alias:"widget.monthpicker",alternateClassName:"Ext.MonthPicker",childEls:["bodyEl","prevEl","nextEl","buttonsEl","monthEl","yearEl"],renderTpl:['<div id="{id}-bodyEl" class="{baseCls}-body">','<div id="{id}-monthEl" class="{baseCls}-months">','<tpl for="months">','<div class="{parent.baseCls}-item {parent.baseCls}-month"><a style="{parent.monthStyle}" href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div id="{id}-yearEl" class="{baseCls}-years">','<div class="{baseCls}-yearnav">','<button id="{id}-prevEl" class="{baseCls}-yearnav-prev"></button>','<button id="{id}-nextEl" class="{baseCls}-yearnav-next"></button>',"</div>",'<tpl for="years">','<div class="{parent.baseCls}-item {parent.baseCls}-year"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="'+Ext.baseCSSPrefix+'clear"></div>',"</div>",'<tpl if="showButtons">','<div id="{id}-buttonsEl" class="{baseCls}-buttons"></div>',"</tpl>"],okText:"OK",cancelText:"Cancel",baseCls:Ext.baseCSSPrefix+"monthpicker",showButtons:true,width:178,measureWidth:35,measureMaxHeight:20,smallCls:Ext.baseCSSPrefix+"monthpicker-small",totalYears:10,yearOffset:5,monthOffset:6,initComponent:function(){var a=this;a.selectedCls=a.baseCls+"-selected";a.addEvents("cancelclick","monthclick","monthdblclick","okclick","select","yearclick","yeardblclick");if(a.small){a.addCls(a.smallCls)}a.setValue(a.value);a.activeYear=a.getYear(new Date().getFullYear()-4,-4);this.callParent()},beforeRender:function(){var g=this,c=0,b=[],a=Ext.Date.getShortMonthName,e=g.monthOffset,h=g.monthMargin,d="";g.callParent();for(;c<e;++c){b.push(a(c),a(c+e))}if(Ext.isDefined(h)){d="margin: 0 "+h+"px;"}Ext.apply(g.renderData,{months:b,years:g.getYears(),showButtons:g.showButtons,monthStyle:d})},afterRender:function(){var b=this,a=b.bodyEl,c=b.buttonsEl;b.callParent();b.mon(a,"click",b.onBodyClick,b);b.mon(a,"dblclick",b.onBodyClick,b);b.years=a.select("."+b.baseCls+"-year a");b.months=a.select("."+b.baseCls+"-month a");if(b.showButtons){b.okBtn=new Ext.button.Button({text:b.okText,renderTo:c,handler:b.onOkClick,scope:b});b.cancelBtn=new Ext.button.Button({text:b.cancelText,renderTo:c,handler:b.onCancelClick,scope:b})}b.backRepeater=new Ext.util.ClickRepeater(b.prevEl,{handler:Ext.Function.bind(b.adjustYear,b,[-b.totalYears])});b.prevEl.addClsOnOver(b.baseCls+"-yearnav-prev-over");b.nextRepeater=new Ext.util.ClickRepeater(b.nextEl,{handler:Ext.Function.bind(b.adjustYear,b,[b.totalYears])});b.nextEl.addClsOnOver(b.baseCls+"-yearnav-next-over");b.updateBody();if(!Ext.isDefined(b.monthMargin)){Ext.picker.Month.prototype.monthMargin=b.calculateMonthMargin()}},calculateMonthMargin:function(){var d=this,b=d.monthEl,a=d.months,e=a.first(),c=e.getMargin("l");while(c&&d.getLargest()>d.measureMaxHeight){--c;a.setStyle("margin","0 "+c+"px")}return c},getLargest:function(a){var b=0;this.months.each(function(d){var c=d.getHeight();if(c>b){b=c}});return b},setValue:function(d){var c=this,e=c.activeYear,g=c.monthOffset,b,a;if(!d){c.value=[null,null]}else{if(Ext.isDate(d)){c.value=[d.getMonth(),d.getFullYear()]}else{c.value=[d[0],d[1]]}}if(c.rendered){b=c.value[1];if(b!==null){if((b<e||b>e+c.yearOffset)){c.activeYear=b-c.yearOffset+1}}c.updateBody()}return c},getValue:function(){return this.value},hasSelection:function(){var a=this.value;return a[0]!==null&&a[1]!==null},getYears:function(){var d=this,e=d.yearOffset,g=d.activeYear,a=g+e,c=g,b=[];for(;c<a;++c){b.push(c,c+e)}return b},updateBody:function(){var i=this,e=i.years,b=i.months,m=i.getYears(),n=i.selectedCls,k=i.getYear(null),g=i.value[0],l=i.monthOffset,h,d,j,a,c;if(i.rendered){e.removeCls(n);b.removeCls(n);d=e.elements;a=d.length;for(j=0;j<a;j++){c=Ext.fly(d[j]);h=m[j];c.dom.innerHTML=h;if(h==k){c.dom.className=n}}if(g!==null){if(g<l){g=g*2}else{g=(g-l)*2+1}b.item(g).addCls(n)}}},getYear:function(a,c){var b=this.value[1];c=c||0;return b===null?a:b+c},onBodyClick:function(d,b){var c=this,a=d.type=="dblclick";if(d.getTarget("."+c.baseCls+"-month")){d.stopEvent();c.onMonthClick(b,a)}else{if(d.getTarget("."+c.baseCls+"-year")){d.stopEvent();c.onYearClick(b,a)}}},adjustYear:function(a){if(typeof a!="number"){a=this.totalYears}this.activeYear+=a;this.updateBody()},onOkClick:function(){this.fireEvent("okclick",this,this.value)},onCancelClick:function(){this.fireEvent("cancelclick",this)},onMonthClick:function(c,a){var b=this;b.value[0]=b.resolveOffset(b.months.indexOf(c),b.monthOffset);b.updateBody();b.fireEvent("month"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},onYearClick:function(c,a){var b=this;b.value[1]=b.activeYear+b.resolveOffset(b.years.indexOf(c),b.yearOffset);b.updateBody();b.fireEvent("year"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},resolveOffset:function(a,b){if(a%2===0){return(a/2)}else{return b+Math.floor(a/2)}},beforeDestroy:function(){var a=this;a.years=a.months=null;Ext.destroyMembers(a,"backRepeater","nextRepeater","okBtn","cancelBtn");a.callParent()}});Ext.define("Ext.picker.Date",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.button.Button","Ext.button.Split","Ext.util.ClickRepeater","Ext.util.KeyNav","Ext.EventObject","Ext.fx.Manager","Ext.picker.Month"],alias:"widget.datepicker",alternateClassName:"Ext.DatePicker",childEls:["innerEl","eventEl","prevEl","nextEl","middleBtnEl","footerEl"],border:true,renderTpl:['<div id="{id}-innerEl" role="grid">','<div role="presentation" class="{baseCls}-header">','<div class="{baseCls}-prev"><a id="{id}-prevEl" href="#" role="button" title="{prevText}"></a></div>','<div class="{baseCls}-month" id="{id}-middleBtnEl">{%this.renderMonthBtn(values, out)%}</div>','<div class="{baseCls}-next"><a id="{id}-nextEl" href="#" role="button" title="{nextText}"></a></div>',"</div>",'<table id="{id}-eventEl" class="{baseCls}-inner" cellspacing="0" role="presentation">','<thead role="presentation"><tr role="presentation">','<tpl for="dayNames">','<th role="columnheader" title="{.}"><span>{.:this.firstInitial}</span></th>',"</tpl>","</tr></thead>",'<tbody role="presentation"><tr role="presentation">','<tpl for="days">',"{#:this.isEndOfWeek}",'<td role="gridcell" id="{[Ext.id()]}">','<a role="presentation" href="#" hidefocus="on" class="{parent.baseCls}-date" tabIndex="1">','<em role="presentation"><span role="presentation"></span></em>',"</a>","</td>","</tpl>","</tr></tbody>","</table>",'<tpl if="showToday">','<div id="{id}-footerEl" role="presentation" class="{baseCls}-footer">{%this.renderTodayBtn(values, out)%}</div>',"</tpl>","</div>",{firstInitial:function(a){return Ext.picker.Date.prototype.getDayInitial(a)},isEndOfWeek:function(b){b--;var a=b%7===0&&b!==0;return a?'</tr><tr role="row">':""},renderTodayBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.todayBtn.getRenderTree(),b)},renderMonthBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.monthBtn.getRenderTree(),b)}}],todayText:"Today",ariaTitle:"Date Picker: {0}",ariaTitleDateFormat:"F d, Y",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"Disabled",disabledDatesText:"Disabled",nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",monthYearFormat:"F Y",startDay:0,showToday:true,disableAnim:false,baseCls:Ext.baseCSSPrefix+"datepicker",longDayFormat:"F d, Y",focusOnShow:false,focusOnSelect:true,width:178,initHour:12,numDays:42,initComponent:function(){var b=this,a=Ext.Date.clearTime;b.selectedCls=b.baseCls+"-selected";b.disabledCellCls=b.baseCls+"-disabled";b.prevCls=b.baseCls+"-prevday";b.activeCls=b.baseCls+"-active";b.nextCls=b.baseCls+"-prevday";b.todayCls=b.baseCls+"-today";b.dayNames=b.dayNames.slice(b.startDay).concat(b.dayNames.slice(0,b.startDay));b.listeners=Ext.apply(b.listeners||{},{mousewheel:{element:"eventEl",fn:b.handleMouseWheel,scope:b},click:{element:"eventEl",fn:b.handleDateClick,scope:b,delegate:"a."+b.baseCls+"-date"}});this.callParent();b.value=b.value?a(b.value,true):a(new Date());b.addEvents("select");b.initDisabledDays()},beforeRender:function(){var b=this,c=new Array(b.numDays),a=Ext.Date.format(new Date(),b.format);b.monthBtn=new Ext.button.Split({ownerCt:b,ownerLayout:b.getComponentLayout(),text:"",tooltip:b.monthYearText,listeners:{click:b.showMonthPicker,arrowclick:b.showMonthPicker,scope:b}});if(this.showToday){b.todayBtn=new Ext.button.Button({ownerCt:b,ownerLayout:b.getComponentLayout(),text:Ext.String.format(b.todayText,a),tooltip:Ext.String.format(b.todayTip,a),handler:b.selectToday,scope:b})}b.callParent();Ext.applyIf(b,{renderData:{}});Ext.apply(b.renderData,{dayNames:b.dayNames,showToday:b.showToday,prevText:b.prevText,nextText:b.nextText,days:c})},finishRenderChildren:function(){var a=this;a.callParent();a.monthBtn.finishRender();if(a.showToday){a.todayBtn.finishRender()}},onRender:function(b,a){var c=this;c.callParent(arguments);c.el.unselectable();c.cells=c.eventEl.select("tbody td");c.textNodes=c.eventEl.query("tbody td span")},initEvents:function(){var c=this,a=Ext.Date,b=a.DAY;c.callParent();c.prevRepeater=new Ext.util.ClickRepeater(c.prevEl,{handler:c.showPrevMonth,scope:c,preventDefault:true,stopDefault:true});c.nextRepeater=new Ext.util.ClickRepeater(c.nextEl,{handler:c.showNextMonth,scope:c,preventDefault:true,stopDefault:true});c.keyNav=new Ext.util.KeyNav(c.eventEl,Ext.apply({scope:c,left:function(d){if(d.ctrlKey){c.showPrevMonth()}else{c.update(a.add(c.activeDate,b,-1))}},right:function(d){if(d.ctrlKey){c.showNextMonth()}else{c.update(a.add(c.activeDate,b,1))}},up:function(d){if(d.ctrlKey){c.showNextYear()}else{c.update(a.add(c.activeDate,b,-7))}},down:function(d){if(d.ctrlKey){c.showPrevYear()}else{c.update(a.add(c.activeDate,b,7))}},pageUp:c.showNextMonth,pageDown:c.showPrevMonth,enter:function(d){d.stopPropagation();return true}},c.keyNavConfig));if(c.showToday){c.todayKeyListener=c.eventEl.addKeyListener(Ext.EventObject.SPACE,c.selectToday,c)}c.update(c.value)},initDisabledDays:function(){var h=this,b=h.disabledDates,g="(?:",a,i,c,e;if(!h.disabledDatesRE&&b){a=b.length-1;c=b.length;for(i=0;i<c;i++){e=b[i];g+=Ext.isDate(e)?"^"+Ext.String.escapeRegex(Ext.Date.dateFormat(e,h.format))+"$":e;if(i!=a){g+="|"}}h.disabledDatesRE=new RegExp(g+")")}},setDisabledDates:function(a){var b=this;if(Ext.isArray(a)){b.disabledDates=a;b.disabledDatesRE=null}else{b.disabledDatesRE=a}b.initDisabledDays();b.update(b.value,true);return b},setDisabledDays:function(a){this.disabledDays=a;return this.update(this.value,true)},setMinDate:function(a){this.minDate=a;return this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;return this.update(this.value,true)},setValue:function(a){this.value=Ext.Date.clearTime(a,true);return this.update(this.value)},getValue:function(){return this.value},getDayInitial:function(a){return a.substr(0,1)},focus:function(){this.update(this.activeDate)},onEnable:function(){this.callParent();this.setDisabledStatus(false);this.update(this.activeDate)},onDisable:function(){this.callParent();this.setDisabledStatus(true)},setDisabledStatus:function(a){var b=this;b.keyNav.setDisabled(a);b.prevRepeater.setDisabled(a);b.nextRepeater.setDisabled(a);if(b.showToday){b.todayKeyListener.setDisabled(a);b.todayBtn.setDisabled(a)}},getActive:function(){return this.activeDate||this.value},runAnimation:function(c){var b=this.monthPicker,a={duration:200,callback:function(){if(c){b.hide()}else{b.show()}}};if(c){b.el.slideOut("t",a)}else{b.el.slideIn("t",a)}},hideMonthPicker:function(a){var c=this,b=c.monthPicker;if(b){if(c.shouldAnimate(a)){c.runAnimation(true)}else{b.hide()}}return c},showMonthPicker:function(a){var c=this,b;if(c.rendered&&!c.disabled){b=c.createMonthPicker();b.setValue(c.getActive());b.setSize(c.getSize());b.setPosition(-1,-1);if(c.shouldAnimate(a)){c.runAnimation(false)}else{b.show()}}return c},shouldAnimate:function(a){return Ext.isDefined(a)?a:!this.disableAnim},createMonthPicker:function(){var b=this,a=b.monthPicker;if(!a){b.monthPicker=a=new Ext.picker.Month({renderTo:b.el,floating:true,shadow:false,small:b.showToday===false,listeners:{scope:b,cancelclick:b.onCancelClick,okclick:b.onOkClick,yeardblclick:b.onOkClick,monthdblclick:b.onOkClick}});if(!b.disableAnim){a.el.setStyle("display","none")}b.on("beforehide",Ext.Function.bind(b.hideMonthPicker,b,[false]))}return a},onOkClick:function(b,e){var d=this,g=e[0],c=e[1],a=new Date(c,g,d.getActive().getDate());if(a.getMonth()!==g){a=Ext.Date.getLastDateOfMonth(new Date(c,g,1))}d.update(a);d.hideMonthPicker()},onCancelClick:function(){this.selectedUpdate(this.activeDate);this.hideMonthPicker()},showPrevMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,-1))},showNextMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,1))},showPrevYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,-1))},showNextYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(d,a){var c=this,b=c.handler;d.stopEvent();if(!c.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasCls(c.disabledCellCls)){c.doCancelFocus=c.focusOnSelect===false;c.setValue(new Date(a.dateValue));delete c.doCancelFocus;c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var c=this,a=c.todayBtn,b=c.handler;if(a&&!a.disabled){c.setValue(Ext.Date.clearTime(new Date()));c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}return c},selectedUpdate:function(a){var d=this,i=a.getTime(),j=d.cells,k=d.selectedCls,g=j.elements,b,e=g.length,h;j.removeCls(k);for(b=0;b<e;b++){h=Ext.fly(g[b]);if(h.dom.firstChild.dateValue==i){d.fireEvent("highlightitem",d,h);h.addCls(k);if(d.isVisible()&&!d.doCancelFocus){Ext.fly(h.dom.firstChild).focus(50)}break}}},fullUpdate:function(A){var E=this,g=E.cells.elements,d=E.textNodes,G=E.disabledCellCls,n=Ext.Date,w=0,D=0,e=E.isVisible(),u=+n.clearTime(A,true),z=+n.clearTime(new Date()),t=E.minDate?n.clearTime(E.minDate,true):Number.NEGATIVE_INFINITY,v=E.maxDate?n.clearTime(E.maxDate,true):Number.POSITIVE_INFINITY,C=E.disabledDatesRE,s=E.disabledDatesText,H=E.disabledDays?E.disabledDays.join(""):false,B=E.disabledDaysText,x=E.format,l=n.getDaysInMonth(A),p=n.getFirstDateOfMonth(A),h=p.getDay()-E.startDay,y=n.add(A,n.MONTH,-1),b=E.longDayFormat,k,q,a,F,m,o,c,j,r;if(h<0){h+=7}l+=h;k=n.getDaysInMonth(y)-h;q=new Date(y.getFullYear(),y.getMonth(),k,E.initHour);if(E.showToday){F=n.clearTime(new Date());a=(F<t||F>v||(C&&x&&C.test(n.dateFormat(F,x)))||(H&&H.indexOf(F.getDay())!=-1));if(!E.disabled){E.todayBtn.setDisabled(a);E.todayKeyListener.setDisabled(a)}}m=function(i){r=+n.clearTime(q,true);i.title=n.format(q,b);i.firstChild.dateValue=r;if(r==z){i.className+=" "+E.todayCls;i.title=E.todayText}if(r==u){i.className+=" "+E.selectedCls;E.fireEvent("highlightitem",E,i);if(e&&E.floating){Ext.fly(i.firstChild).focus(50)}}if(r<t){i.className=G;i.title=E.minText;return}if(r>v){i.className=G;i.title=E.maxText;return}if(H){if(H.indexOf(q.getDay())!=-1){i.title=B;i.className=G}}if(C&&x){j=n.dateFormat(q,x);if(C.test(j)){i.title=s.replace("%0",j);i.className=G}}};for(;w<E.numDays;++w){if(w<h){o=(++k);c=E.prevCls}else{if(w>=l){o=(++D);c=E.nextCls}else{o=w-h+1;c=E.activeCls}}d[w].innerHTML=o;g[w].className=c;q.setDate(q.getDate()+1);m(g[w])}E.monthBtn.setText(Ext.Date.format(A,E.monthYearFormat))},update:function(a,d){var b=this,c=b.activeDate;if(b.rendered){b.activeDate=a;if(!d&&c&&b.el&&c.getMonth()==a.getMonth()&&c.getFullYear()==a.getFullYear()){b.selectedUpdate(a,c)}else{b.fullUpdate(a,c)}b.innerEl.dom.title=Ext.String.format(b.ariaTitle,Ext.Date.format(b.activeDate,b.ariaTitleDateFormat))}return b},beforeDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.todayKeyListener,a.keyNav,a.monthPicker,a.monthBtn,a.nextRepeater,a.prevRepeater,a.todayBtn);delete a.textNodes;delete a.cells.elements}a.callParent()},onShow:function(){this.callParent(arguments);if(this.focusOnShow){this.focus()}}},function(){var b=this.prototype,a=Ext.Date;b.monthNames=a.monthNames;b.dayNames=a.dayNames;b.format=a.defaultFormat});Ext.define("Ext.form.field.Date",{extend:"Ext.form.field.Picker",alias:"widget.datefield",requires:["Ext.picker.Date"],alternateClassName:["Ext.form.DateField","Ext.form.Date"],format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerCls:Ext.baseCSSPrefix+"form-date-trigger",showToday:true,useStrict:undefined,initTime:"12",initTimeFormat:"H",matchFieldWidth:false,startDay:0,initComponent:function(){var d=this,b=Ext.isString,c,a;c=d.minValue;a=d.maxValue;if(b(c)){d.minValue=d.parseDate(c)}if(b(a)){d.maxValue=d.parseDate(a)}d.disabledDatesRE=null;d.initDisabledDays();d.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,g="(?:",h,e=b.length,c;for(h=0;h<e;h++){c=b[h];g+=Ext.isDate(c)?"^"+Ext.String.escapeRegex(c.dateFormat(this.format))+"$":c;if(h!==a){g+="|"}}this.disabledDatesRE=new RegExp(g+")")}},setDisabledDates:function(a){var c=this,b=c.picker;c.disabledDates=a;c.initDisabledDays();if(b){b.setDisabledDates(c.disabledDatesRE)}},setDisabledDays:function(a){var b=this.picker;this.disabledDays=a;if(b){b.setDisabledDays(a)}},setMinValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.minValue=d;if(a){a.minText=Ext.String.format(b.minText,b.formatDate(b.minValue));a.setMinDate(d)}},setMaxValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.maxValue=d;if(a){a.maxText=Ext.String.format(b.maxText,b.formatDate(b.maxValue));a.setMaxDate(d)}},getErrors:function(q){var j=this,p=Ext.String.format,k=Ext.Date.clearTime,o=j.callParent(arguments),n=j.disabledDays,d=j.disabledDatesRE,m=j.minValue,h=j.maxValue,g=n?n.length:0,e=0,a,b,l,c;q=j.formatDate(q||j.processRawValue(j.getRawValue()));if(q===null||q.length<1){return o}a=q;q=j.parseDate(q);if(!q){o.push(p(j.invalidText,a,Ext.Date.unescapeFormat(j.format)));return o}c=q.getTime();if(m&&c<k(m).getTime()){o.push(p(j.minText,j.formatDate(m)))}if(h&&c>k(h).getTime()){o.push(p(j.maxText,j.formatDate(h)))}if(n){l=q.getDay();for(;e<g;e++){if(l===n[e]){o.push(j.disabledDaysText);break}}}b=j.formatDate(q);if(d&&d.test(b)){o.push(p(j.disabledDatesText,b))}return o},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},safeParse:function(g,h){var e=this,c=Ext.Date,a=null,b=e.useStrict,d;if(c.formatContainsHourInfo(h)){a=c.parse(g,h,b)}else{d=c.parse(g+" "+e.initTime,h+" "+e.initTimeFormat,b);if(d){a=c.clearTime(d)}}return a},getSubmitValue:function(){var b=this.submitFormat||this.format,a=this.getValue();return a?Ext.Date.format(a,b):""},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},formatDate:function(a){return Ext.isDate(a)?Ext.Date.dateFormat(a,this.format):a},createPicker:function(){var a=this,b=Ext.String.format;return new Ext.picker.Date({pickerField:a,ownerCt:a.ownerCt,renderTo:document.body,floating:true,hidden:true,focusOnShow:true,minDate:a.minValue,maxDate:a.maxValue,disabledDatesRE:a.disabledDatesRE,disabledDatesText:a.disabledDatesText,disabledDays:a.disabledDays,disabledDaysText:a.disabledDaysText,format:a.format,showToday:a.showToday,startDay:a.startDay,minText:b(a.minText,a.formatDate(a.minValue)),maxText:b(a.maxText,a.formatDate(a.maxValue)),listeners:{scope:a,select:a.onSelect},keyNavConfig:{esc:function(){a.collapse()}}})},onSelect:function(a,c){var b=this;b.setValue(c);b.fireEvent("select",b,c);b.collapse()},onExpand:function(){var a=this.getValue();this.picker.setValue(Ext.isDate(a)?a:new Date())},onCollapse:function(){this.focus(false,60)},beforeBlur:function(){var c=this,a=c.parseDate(c.getRawValue()),b=c.focusTask;if(b){b.cancel()}if(a){c.setValue(a)}}});Ext.define("Ext.resizer.BorderSplitterTracker",{extend:"Ext.resizer.SplitterTracker",requires:["Ext.util.Region"],getPrevCmp:null,getNextCmp:null,calculateConstrainRegion:function(){var y=this,a=y.splitter,o=a.collapseTarget,d=a.defaultSplitMin,h=a.vertical?"Width":"Height",c="min"+h,u="max"+h,j="get"+h,t=a.neighbors,e=t.length,n=o.el.getBox(),g=n.x,p=n.y,x=n.right,k=n.bottom,r=a.vertical?(x-g):(k-p),w,l,m,v,s,q,b;m=(o[c]||Math.min(r,d))-r;v=o[u];if(!v){v=1000000000}else{v-=r}b=r;for(w=0;w<e;++w){l=t[w];r=l[j]();s=r-l[u];q=r-(l[c]||Math.min(r,d));if(!isNaN(s)){if(m<s){m=s}}if(v>q){v=q}}if(v-m<2){return null}n=new Ext.util.Region(p,x,k,g);y.constraintAdjusters[a.collapseDirection](n,m,v,a);y.dragInfo={minRange:m,maxRange:v,targetSize:b};return n},constraintAdjusters:{left:function(c,a,b,d){c[0]=c.x=c.left=c.right+a;c.right+=b+d.getWidth()},top:function(c,a,b,d){c[1]=c.y=c.top=c.bottom+a;c.bottom+=b+d.getHeight()},bottom:function(c,a,b,d){c.bottom=c.top-a;c.top-=b+d.getHeight()},right:function(c,a,b,d){c.right=c.left-a;c.left-=b+d.getWidth()}},onBeforeStart:function(h){var k=this,b=k.splitter,a=b.collapseTarget,m=b.neighbors,d=k.getSplitter().collapseEl,j=h.getTarget(),c=m.length,g,l;if(d&&j===b.collapseEl.dom){return false}if(a.collapsed){return false}for(g=0;g<c;++g){l=m[g];if(l.collapsed&&l.isHorz===a.isHorz){return false}}if(!(k.constrainTo=k.calculateConstrainRegion())){return false}k.createDragOverlay();return true},performResize:function(j,i){var k=this,b=k.splitter,h=b.collapseDirection,a=b.collapseTarget,g=k.splitAdjusters[b.vertical?"horz":"vert"],l=i[g.index],d=k.dragInfo,c;if(h=="right"||h=="bottom"){l=-l}l=Math.min(Math.max(d.minRange,l),d.maxRange);if(l){(c=b.ownerCt).suspendLayouts();g.adjustTarget(a,d.targetSize,l);c.resumeLayouts(true)}},splitAdjusters:{horz:{index:0,adjustTarget:function(b,a,c){b.flex=null;b.setSize(a+c)}},vert:{index:1,adjustTarget:function(b,a,c){b.flex=null;b.setSize(undefined,a+c)}}}});Ext.define("Ext.resizer.Handle",{extend:"Ext.Component",handleCls:"",baseHandleCls:Ext.baseCSSPrefix+"resizable-handle",region:"",beforeRender:function(){var a=this;a.callParent();a.addCls(a.baseHandleCls,a.baseHandleCls+"-"+a.region,a.handleCls)},onRender:function(){this.callParent(arguments);this.el.unselectable()}});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",childEls:["collapseEl"],renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}">&#160;</div>',"</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,width:5,height:5,collapseTarget:"next",horizontal:false,vertical:false,getTrackerConfig:function(){return{xclass:"Ext.resizer.SplitterTracker",el:this.el,splitter:this}},beforeRender:function(){var a=this,b=a.getCollapseTarget(),c=a.getCollapseDirection();a.callParent();if(b.collapsed){a.addCls(a.collapsedClsInternal)}a.addCls(a.baseCls+"-"+a.orientation);Ext.applyIf(a.renderData,{collapseDir:c,collapsible:a.collapsible||b.collapsible})},onRender:function(){var a=this;a.callParent(arguments);if(a.performCollapse!==false){if(a.renderData.collapsible){a.mon(a.collapseEl,"click",a.toggleTargetCmp,a)}if(a.collapseOnDblClick){a.mon(a.el,"dblclick",a.toggleTargetCmp,a)}}a.mon(a.getCollapseTarget(),{collapse:a.onTargetCollapse,expand:a.onTargetExpand,scope:a});a.el.unselectable();a.tracker=Ext.create(a.getTrackerConfig());a.relayEvents(a.tracker,["beforedragstart","dragstart","dragend"])},getCollapseDirection:function(){var g=this,c=g.collapseDirection,e,a,b,d;if(!c){e=g.collapseTarget;if(e.isComponent){c=e.collapseDirection}if(!c){d=g.ownerCt.layout.type;if(e.isComponent){b=g.ownerCt.items;a=Number(b.indexOf(e)==b.indexOf(g)-1)<<1|Number(d=="hbox")}else{a=Number(g.collapseTarget=="prev")<<1|Number(d=="hbox")}c=["bottom","right","top","left"][a]}g.collapseDirection=c}g.orientation=(c=="top"||c=="bottom")?"horizontal":"vertical";g[g.orientation]=true;return c},getCollapseTarget:function(){var a=this;return a.collapseTarget.isComponent?a.collapseTarget:a.collapseTarget=="prev"?a.previousSibling():a.nextSibling()},onTargetCollapse:function(a){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(a){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(d,b){var c=this.getCollapseTarget(),g=c.placeholder,a;if(g&&!g.hidden){a=true}else{a=!c.hidden}if(a){if(c.collapsed){c.expand()}else{if(c.collapseDirection){c.collapse()}else{c.collapse(this.renderData.collapseDir)}}}},setSize:function(){var a=this;a.callParent(arguments);if(Ext.isIE&&a.el){a.el.repaint()}}});Ext.define("Ext.resizer.BorderSplitter",{extend:"Ext.resizer.Splitter",uses:["Ext.resizer.BorderSplitterTracker"],alias:"widget.bordersplitter",collapseTarget:null,getTrackerConfig:function(){var a=this.callParent();a.xclass="Ext.resizer.BorderSplitterTracker";return a}});Ext.define("Ext.layout.container.Border",{alias:"layout.border",extend:"Ext.layout.container.Container",requires:["Ext.resizer.BorderSplitter","Ext.Component","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:[Ext.baseCSSPrefix+"border-item",Ext.baseCSSPrefix+"box-item"],type:"border",padding:undefined,percentageRe:/(\d+)%/,axisProps:{horz:{borderBegin:"west",borderEnd:"east",horizontal:true,posProp:"x",sizeProp:"width",sizePropCap:"Width"},vert:{borderBegin:"north",borderEnd:"south",horizontal:false,posProp:"y",sizeProp:"height",sizePropCap:"Height"}},centerRegion:null,collapseDirections:{north:"top",south:"bottom",east:"right",west:"left"},manageMargins:true,panelCollapseAnimate:true,panelCollapseMode:"placeholder",regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(m,b,w){var u=this,c=u.axisProps[w],r=!c.horizontal,l=c.sizeProp,p=0,a=m.childItems,g=a.length,t,q,o,h,s,e,k,n,d,v,j;for(q=0;q<g;++q){o=a[q];s=o.target;o.layoutPos={};if(s.region){o.region=e=s.region;o.isCenter=s.isCenter;o.isHorz=s.isHorz;o.isVert=s.isVert;o.weight=s.weight||u.regionWeights[e]||0;b[s.id]=o;if(s.isCenter){t=o;h=s.flex;m.centerRegion=t;continue}if(r!==o.isVert){continue}o.reverseWeighting=(e==c.borderEnd);n=s[l];d=typeof n;if(!s.collapsed){if(d=="string"&&(k=u.percentageRe.exec(n))){o.percentage=parseInt(k[1],10)}else{if(s.flex){p+=o.flex=s.flex}}}}}if(t){v=t.target;if(j=v.placeholderFor){if(!h&&r===j.collapsedVertical()){h=0;t.collapseAxis=w}}else{if(v.collapsed&&(r===v.collapsedVertical())){h=0;t.collapseAxis=w}}}if(h==null){h=1}p+=h;return Ext.apply({before:r?"top":"left",totalFlex:p},c)},beginLayout:function(c){var j=this,h=j.getLayoutItems(),d=j.padding,k=typeof d,m=false,n,l,b,g,e,a;if(d){if(k=="string"||k=="number"){d=Ext.util.Format.parseBox(d)}}else{d=c.getEl("getTargetEl").getPaddingInfo();m=true}c.outerPad=d;c.padOnContainer=m;for(g=0,b=h.length;g<b;++g){l=h[g];a=j.getSplitterTarget(l);if(a&&l.hidden!==a.hidden){if(l.hidden){l.show()}else{l.hide()}}}j.callParent(arguments);h=c.childItems;b=h.length;e={};c.borderAxisHorz=j.beginAxis(c,e,"horz");c.borderAxisVert=j.beginAxis(c,e,"vert");for(g=0;g<b;++g){n=h[g];a=j.getSplitterTarget(n.target);if(a){n.collapseTarget=a=e[a.id];n.weight=a.weight;n.reverseWeighting=a.reverseWeighting;a.splitter=n;n.isHorz=a.isHorz;n.isVert=a.isVert}}j.sortWeightedItems(h,"reverseWeighting");j.setupSplitterNeighbors(h)},calculate:function(d){var m=this,a=m.getContainerSize(d),j=d.childItems,c=j.length,b=d.borderAxisHorz,k=d.borderAxisVert,e=d.outerPad,o=d.padOnContainer,h,q,l,p,n,g;b.begin=e.left;k.begin=e.top;n=b.end=b.flexSpace=a.width+(o?e.left:-e.right);g=k.end=k.flexSpace=a.height+(o?e.top:-e.bottom);for(h=0;h<c;++h){q=j[h];l=q.getMarginInfo();if(q.isHorz||q.isCenter){b.addUnflexed(l.width);n-=l.width}if(q.isVert||q.isCenter){k.addUnflexed(l.height);g-=l.height}if(!q.flex&&!q.percentage){if(q.isHorz||(q.isCenter&&q.collapseAxis==="horz")){p=q.getProp("width");b.addUnflexed(p);if(q.collapseTarget){n-=p}}else{if(q.isVert||(q.isCenter&&q.collapseAxis==="vert")){p=q.getProp("height");k.addUnflexed(p);if(q.collapseTarget){g-=p}}}}}for(h=0;h<c;++h){q=j[h];l=q.getMarginInfo();if(q.percentage){if(q.isHorz){p=Math.ceil(n*q.percentage/100);p=q.setWidth(p);b.addUnflexed(p)}else{if(q.isVert){p=Math.ceil(g*q.percentage/100);p=q.setHeight(p);k.addUnflexed(p)}}}}for(h=0;h<c;++h){q=j[h];if(!q.isCenter){m.calculateChildAxis(q,b);m.calculateChildAxis(q,k)}}if(m.finishAxis(d,k)+m.finishAxis(d,b)<2){m.done=false}else{m.finishPositions(j)}},calculateChildAxis:function(l,c){var a=l.collapseTarget,h="set"+c.sizePropCap,e=c.sizeProp,d=l.getMarginInfo()[e],j,b,g,i,k;if(a){j=a.region}else{j=l.region;g=l.flex}b=j==c.borderBegin;if(!b&&j!=c.borderEnd){l[h](c.end-c.begin-d);i=c.begin}else{if(g){k=Math.ceil(c.flexSpace*(g/c.totalFlex));k=l[h](k)}else{if(l.percentage){k=l.peek(e)}else{k=l.getProp(e)}}k+=d;if(b){i=c.begin;c.begin+=k}else{c.end=i=c.end-k}}l.layoutPos[c.posProp]=i},finishAxis:function(d,c){var b=c.end-c.begin,a=d.centerRegion;if(a){a["set"+c.sizePropCap](b-a.getMarginInfo()[c.sizeProp]);a.layoutPos[c.posProp]=c.begin}return Ext.isNumber(b)?1:0},finishPositions:function(d){var c=d.length,b,a;for(b=0;b<c;++b){a=d[b];a.setProp("x",a.layoutPos.x+a.marginInfo.left);a.setProp("y",a.layoutPos.y+a.marginInfo.top)}},getPlaceholder:function(a){return a.getPlaceholder&&a.getPlaceholder()},getSplitterTarget:function(b){var a=b.collapseTarget;if(a&&a.collapsed){return a.placeholder||a}return a},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},insertSplitter:function(c,b){var e=c.region,d={xtype:"bordersplitter",collapseTarget:c,id:c.id+"-splitter",hidden:!!c.hidden},a=b+((e=="south"||e=="east")?0:1);if(c.isHorz){d.height=null}else{d.width=null}if(c.collapseMode=="mini"){d.collapsedCls=c.collapsedCls}c.splitter=this.owner.add(a,d)},onAdd:function(c,a){var b=this,e=c.placeholderFor,d=c.region;b.callParent(arguments);if(d){Ext.apply(c,b.regionFlags[d]);if(d=="center"){b.centerRegion=c}else{c.collapseDirection=this.collapseDirections[d];if(c.split&&(c.isHorz||c.isVert)){b.insertSplitter(c,a)}}if(!c.hasOwnProperty("collapseMode")){c.collapseMode=b.panelCollapseMode}if(!c.hasOwnProperty("animCollapse")){if(c.collapseMode!="placeholder"){c.animCollapse=false}else{c.animCollapse=b.panelCollapseAnimate}}}else{if(e){Ext.apply(c,b.regionFlags[e.region]);c.region=e.region;c.weight=e.weight}}},onDestroy:function(){this.centerRegion=null;this.callParent()},onRemove:function(b){var a=this,d=b.region,c=b.splitter;if(d){if(b.isCenter){a.centerRegion=null}delete b.isCenter;delete b.isHorz;delete b.isVert;if(c){a.owner.doRemove(c,true);delete b.splitter}}a.callParent(arguments)},regionFlags:{center:{isCenter:true,isHorz:false,isVert:false},north:{isCenter:false,isHorz:false,isVert:true},south:{isCenter:false,isHorz:false,isVert:true},west:{isCenter:false,isHorz:true,isVert:false},east:{isCenter:false,isHorz:true,isVert:false}},setupSplitterNeighbors:function(m){var p={},e=m.length,o=this.touchedRegions,h,g,a,l,d,k,n,b,c;for(h=0;h<e;++h){k=m[h].target;n=k.region;if(k.isCenter){a=k}else{if(n){c=o[n];for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(k)}}if(k.placeholderFor){b=k.placeholderFor.splitter}else{b=k.splitter}if(b){b.neighbors=[]}p[n]=b}}}if(a){c=o.center;for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(a)}}}},touchedRegions:{center:["north","south","east","west"],north:["north","east","west"],south:["south","east","west"],east:["east","north","south"],west:["west","north","south"]},sizePolicies:{vert:{setsWidth:1,setsHeight:0},horz:{setsWidth:0,setsHeight:1},flexAll:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(e){var d=this,a=this.sizePolicies,c,b,g,h;if(e.isCenter){h=e.placeholderFor;if(h){if(h.collapsedVertical()){return a.vert}return a.horz}if(e.collapsed){if(e.collapsedVertical()){return a.vert}return a.horz}return a.flexAll}c=e.collapseTarget;if(c){return c.isVert?a.vert:a.horz}if(e.region){if(e.isVert){b=e.height;g=a.vert}else{b=e.width;g=a.horz}if(e.flex||(typeof b=="string"&&d.percentageRe.test(b))){return a.flexAll}return g}return d.autoSizePolicy}},function(){var a={addUnflexed:function(c){this.flexSpace=Math.max(this.flexSpace-c,0)}},b=this.prototype.axisProps;Ext.apply(b.horz,a);Ext.apply(b.vert,a)});Ext.define("Ext.selection.CellModel",{extend:"Ext.selection.Model",alias:"selection.cellmodel",requires:["Ext.util.KeyNav"],isCellModel:true,enableKeyNav:true,preventWrap:false,noSelection:{row:-1,column:-1},constructor:function(){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.primaryView=a;b.views=b.views||[];b.views.push(a);b.bindStore(a.getStore(),true);a.on({cellmousedown:b.onMouseDown,refresh:b.onViewRefresh,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,tab:b.onKeyTab,scope:b})},getHeaderCt:function(){return this.primaryView.headerCt},onKeyUp:function(b,a){this.keyNavigation=true;this.move("up",b);this.keyNavigation=false},onKeyDown:function(b,a){this.keyNavigation=true;this.move("down",b);this.keyNavigation=false},onKeyLeft:function(b,a){this.keyNavigation=true;this.move("left",b);this.keyNavigation=false},onKeyRight:function(b,a){this.keyNavigation=true;this.move("right",b);this.keyNavigation=false},move:function(a,c){var b=this,d=b.primaryView.walkCells(b.getCurrentPosition(),a,c,b.preventWrap);if(d){return b.setCurrentPosition(d)}},getCurrentPosition:function(){return this.selection},setCurrentPosition:function(b){var a=this;a.lastSelection=a.selection;if(a.selection){a.onCellDeselect(a.selection)}if(b){a.nextSelection=new a.Selection(a);a.nextSelection.setPosition(b);a.onCellSelect(a.nextSelection);return a.selection=a.nextSelection}},onStoreRemove:function(b,a,c){var d=this,e=d.getCurrentPosition();d.callParent(arguments);if(e){if(e.row==c){if(c<b.getCount()-1){e.setPosition(c,e.column);d.setCurrentPosition(e)}else{delete d.selection}}else{if(c<e.row){e.setPosition(e.row-1,e.column);d.setCurrentPosition(e)}}}},onMouseDown:function(c,a,d,b,h,i,g){this.setCurrentPosition({view:c,row:i,column:d})},onCellSelect:function(a,b){if(a&&a.row!==undefined){this.doSelect(this.view.getStore().getAt(a.row),false,b)}},onCellDeselect:function(a,b){if(a&&a.row!==undefined){this.doDeselect(this.view.getStore().getAt(a.row),b)}},onSelectChange:function(b,e,d,h){var g=this,i,c,a=g.primaryView;if(e){i=g.nextSelection;c="select"}else{i=g.lastSelection||g.noSelection;c="deselect"}if((d||g.fireEvent("before"+c,g,b,i.row,i.column))!==false&&h()!==false){if(e){a.onCellSelect(i);a.onCellFocus(i)}else{a.onCellDeselect(i);delete g.selection}if(!d){g.fireEvent(c,g,b,i.row,i.column)}}},onKeyTab:function(d,b){var c=this,a=c.primaryView.editingPlugin;if(a&&c.wasEditing){c.onEditorTab(a,d)}else{c.move(d.shiftKey?"left":"right",d)}},onEditorTab:function(b,g){var c=this,d=g.shiftKey?"left":"right",a=c.move(d,g);if(a){if(b.startEditByPosition(a)){c.wasEditing=false}else{c.wasEditing=true;if(!a.columnHeader.dataIndex){c.onEditorTab(b,g)}}}},refresh:function(){var b=this.getCurrentPosition(),a;if(b&&(a=this.store.indexOf(this.selected.last()))!==-1){b.row=a}},onViewRefresh:function(){var c=this,g=c.getCurrentPosition(),b=c.primaryView,e=b.headerCt,a,d;if(g){a=g.record;d=g.columnHeader;c.onCellDeselect(g,true);if(!d.isDescendantOf(e)){d=e.queryById(d.id)||e.down('[text="'+d.text+'"]')||e.down('[dataIndex="'+d.dataIndex+'"]')}if(d&&(b.store.indexOfId(a.getId())!==-1)){(c.selection=new c.Selection(c)).setPosition(a,d);c.onCellSelect(c.selection,true)}}},selectByPosition:function(a){this.setCurrentPosition(a)}},function(){var a=this.prototype.Selection=function(b){this.model=b};a.prototype.setPosition=function(g,d){var e=this,b=e.model.primaryView,c;if(arguments.length===1){if(g.view){b=g.view}d=g.column;g=g.row}c=b.store;if(typeof g==="number"){e.row=g;e.record=c.getAt(g)}else{if(g.isModel){e.record=g;e.row=b.indexOf(g)}else{if(g.tagName){e.record=b.getRecord(g);e.row=b.indexOf(e.record)}}}if(typeof d==="number"){e.column=d;e.columnHeader=b.getHeaderAtIndex(d)}else{e.columnHeader=d;e.column=d.getIndex()}return e}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:false,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.views=[];this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bindStore(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a,eventName:"itemkeydown",processEvent:function(d,c,h,e,g){g.record=c;g.recordIndex=e;return g},up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,space:b.onKeySpace,scope:b})},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(c){var b=this,a=b.store.getAt(b.store.getCount()-1);if(a){if(c.shiftKey){b.selectRange(a,b.lastFocused||0);b.setLastFocused(a)}else{if(c.ctrlKey){b.setLastFocused(a)}else{b.doSelect(a)}}}},onKeyHome:function(b){var a=this,c=a.store.getAt(0);if(c){if(b.shiftKey){a.selectRange(c,a.lastFocused||0);a.setLastFocused(c)}else{if(b.ctrlKey){a.setLastFocused(c)}else{a.doSelect(c,false)}}}},onKeyPageUp:function(g){var d=this,h=d.getRowsVisible(),b,c,a;if(h){b=g.recordIndex;c=b-h;if(c<0){c=0}a=d.store.getAt(c);if(g.shiftKey){d.selectRange(a,g.record,g.ctrlKey,"up");d.setLastFocused(a)}else{if(g.ctrlKey){g.preventDefault();d.setLastFocused(a)}else{d.doSelect(a)}}}},onKeyPageDown:function(g){var c=this,h=c.getRowsVisible(),a,d,b;if(h){a=g.recordIndex;d=a+h;if(d>=c.store.getCount()){d=c.store.getCount()-1}b=c.store.getAt(d);if(g.shiftKey){c.selectRange(b,g.record,g.ctrlKey,"down");c.setLastFocused(b)}else{if(g.ctrlKey){g.preventDefault();c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeySpace:function(c){var b=this,a=b.lastFocused;if(a){if(b.isSelected(a)){b.doDeselect(a,false)}else{b.doSelect(a,true)}}},onKeyUp:function(d){var c=this,a=c.store.indexOf(c.lastFocused),b;if(a>0){b=c.store.getAt(a-1);if(d.shiftKey&&c.lastFocused){if(c.isSelected(c.lastFocused)&&c.isSelected(b)){c.doDeselect(c.lastFocused,true);c.setLastFocused(b)}else{if(!c.isSelected(c.lastFocused)){c.doSelect(c.lastFocused,true);c.doSelect(b,true)}else{c.doSelect(b,true)}}}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyDown:function(d){var c=this,a=c.store.indexOf(c.lastFocused),b;if(a+1<c.store.getCount()){b=c.store.getAt(a+1);if(c.selected.getCount()===0){if(!d.ctrlKey){c.doSelect(b)}else{c.setLastFocused(b)}}else{if(d.shiftKey&&c.lastFocused){if(c.isSelected(c.lastFocused)&&c.isSelected(b)){c.doDeselect(c.lastFocused,true);c.setLastFocused(b)}else{if(!c.isSelected(c.lastFocused)){c.doSelect(c.lastFocused,true);c.doSelect(b,true)}else{c.doSelect(b,true)}}}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}}},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,d,c,g){if(!this.allowRightMouseSelection(g)){return}if(g.button===0||!this.isSelected(a)){this.selectWithEvent(a,g)}},allowRightMouseSelection:function(a){var b=this.ignoreRightMouseSelection&&a.button!==0;if(b){b=this.hasSelection()}return !b},onSelectChange:function(g,c,l,a){var j=this,m=j.views,d=m.length,k=j.store,b=k.indexOf(g),h=c?"select":"deselect",e=0;if((l||j.fireEvent("before"+h,j,g,b))!==false&&a()!==false){for(;e<d;e++){if(c){m[e].onRowSelect(b,l)}else{m[e].onRowDeselect(b,l)}}if(!l){j.fireEvent(h,j,g,b)}}},onLastFocusChanged:function(j,d,b){var a=this.views,h=a.length,c=this.store,g,e=0;if(j){g=c.indexOf(j);if(g!=-1){for(;e<h;e++){a[e].onRowFocus(g,false)}}}if(d){g=c.indexOf(d);if(g!=-1){for(e=0;e<h;e++){a[e].onRowFocus(g,true,b)}}}this.callParent()},onEditorTab:function(d,i){var g=this,c=g.views[0],b=d.getActiveRecord(),j=d.getActiveColumn(),a=c.getPosition(b,j),h=i.shiftKey?"left":"right";do{a=c.walkCells(a,h,i,g.preventWrap)}while(a&&!c.headerCt.getHeaderAtIndex(a.column).getEditor());if(a){d.startEditByPosition(a)}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)},selectNext:function(h,c){var g=this,b=g.store,e=g.getSelection(),a=e[e.length-1],d=b.indexOf(a)+1,i;if(d===b.getCount()||d===0){i=false}else{g.doSelect(d,h,c);i=true}return i},selectPrevious:function(g,b){var e=this,d=e.getSelection(),a=d[0],c=e.store.indexOf(a)-1,h;if(c<0){h=false}else{e.doSelect(c,g,b);h=true}return h}});Ext.define("Ext.selection.CheckboxModel",{alias:"selection.checkboxmodel",extend:"Ext.selection.RowModel",mode:"MULTI",injectCheckbox:0,checkOnly:false,showHeaderCheckbox:true,headerWidth:24,checkerOnCls:Ext.baseCSSPrefix+"grid-hd-checker-on",bindComponent:function(a){var b=this;b.sortable=false;b.callParent(arguments);if(!b.hasLockedHeader()||a.headerCt.lockedCt){if(b.showHeaderCheckbox!==false){a.headerCt.on("headerclick",b.onHeaderClick,b)}b.addCheckbox(true);b.mon(a.ownerCt,"reconfigure",b.onReconfigure,b)}},hasLockedHeader:function(){var a=this.views,c=a.length,b;for(b=0;b<c;b++){if(a[b].headerCt.lockedCt){return true}}return false},addCheckbox:function(b){var c=this,d=c.injectCheckbox,a=c.views[0],e=a.headerCt;if(d!==false){if(d=="first"){d=0}else{if(d=="last"){d=e.getColumnCount()}}Ext.suspendLayouts();e.add(d,c.getHeaderConfig());Ext.resumeLayouts()}if(b!==true){a.refresh()}},onReconfigure:function(c,a,b){if(b){this.addCheckbox()}},toggleUiHeader:function(d){var a=this.views[0],c=a.headerCt,b=c.child("gridcolumn[isCheckerHd]");if(b){if(d){b.el.addCls(this.checkerOnCls)}else{b.el.removeCls(this.checkerOnCls)}}},onHeaderClick:function(c,g,b){if(g.isCheckerHd){b.stopEvent();var a=this,d=g.el.hasCls(Ext.baseCSSPrefix+"grid-hd-checker-on");a.preventFocus=true;if(d){a.deselectAll()}else{a.selectAll()}delete a.preventFocus}},getHeaderConfig:function(){var a=this,b=a.showHeaderCheckbox!==false;return{isCheckerHd:b,text:"&#160;",width:a.headerWidth,sortable:false,draggable:false,resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:b?Ext.baseCSSPrefix+"column-header-checkbox ":"",renderer:Ext.Function.bind(a.renderer,a),editRenderer:a.editRenderer||a.renderEmpty,locked:a.hasLockedHeader()}},renderEmpty:function(){return"&#160;"},renderer:function(h,c,b,i,e,d,a){var g=Ext.baseCSSPrefix;c.tdCls=g+"grid-cell-special "+g+"grid-cell-row-checker";return'<div class="'+g+'grid-row-checker">&#160;</div>'},onRowMouseDown:function(b,a,h,d,i){b.el.focus();var g=this,c=i.getTarget("."+Ext.baseCSSPrefix+"grid-row-checker"),j;if(!g.allowRightMouseSelection(i)){return}if(g.checkOnly&&!c){return}if(c){j=g.getSelectionMode();if(j!=="SINGLE"){g.setSelectionMode("SIMPLE")}g.selectWithEvent(a,i);g.setSelectionMode(j)}else{g.selectWithEvent(a,i)}},onSelectChange:function(){this.callParent(arguments);var a=this.selected.getCount()===this.store.getCount();this.toggleUiHeader(a)}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(d,b){var c=this.getLastFocused(),a=this.view;if(c){if(c.isExpanded()){this.onKeyDown(d,b)}else{if(!c.isLeaf()){a.expand(c)}}}},onKeyLeft:function(i,d){var h=this.getLastFocused(),c=this.view,b=c.getSelectionModel(),a,g;if(h){a=h.parentNode;if(h.isExpanded()){c.collapse(h)}else{if(a&&!a.isRoot()){if(i.shiftKey){b.selectRange(a,h,i.ctrlKey,"up");b.setLastFocused(a)}else{if(i.ctrlKey){b.setLastFocused(a)}else{b.select(a)}}}}}},onKeyPress:function(g,b){var a=g.getKey(),c,d;if(a===g.SPACE||a===g.ENTER){g.stopEvent();c=this.getLastSelected();if(c){this.view.onCheckChange(c)}}else{this.callParent(arguments)}}});Ext.define("Ext.tab.Tab",{extend:"Ext.button.Button",alias:"widget.tab",requires:["Ext.layout.component.Tab","Ext.util.KeyNav"],componentLayout:"tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,childEls:["closeEl"],scale:false,position:"top",initComponent:function(){var a=this;a.addEvents("activate","deactivate","beforeclose","close");a.callParent(arguments);if(a.card){a.setCard(a.card)}},getTemplateArgs:function(){var b=this,a=b.callParent();a.closable=b.closable;a.closeText=b.closeText;return a},beforeRender:function(){var b=this,a=b.up("tabbar"),c=b.up("tabpanel");b.callParent();b.addClsWithUI(b.position);b.syncClosableUI();if(!b.minWidth){b.minWidth=(a)?a.minTabWidth:b.minWidth;if(!b.minWidth&&c){b.minWidth=c.minTabWidth}if(b.minWidth&&b.iconCls){b.minWidth+=25}}if(!b.maxWidth){b.maxWidth=(a)?a.maxTabWidth:b.maxWidth;if(!b.maxWidth&&c){b.maxWidth=c.maxTabWidth}}},onRender:function(){var a=this;a.callParent(arguments);a.keyNav=new Ext.util.KeyNav(a.el,{enter:a.onEnterKey,del:a.onDeleteKey,scope:a})},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI(b.position+"-disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI(b.position+"-disabled");return b},onDestroy:function(){var a=this;Ext.destroy(a.keyNav);delete a.keyNav;a.callParent(arguments)},setClosable:function(a){var b=this;a=(!arguments.length||!!a);if(b.closable!=a){b.closable=a;if(b.card){b.card.closable=a}b.syncClosableUI();if(b.rendered){b.syncClosableElements();b.updateLayout()}}},syncClosableElements:function(){var a=this,b=a.closeEl;if(a.closable){if(!b){a.closeEl=a.btnWrap.insertSibling({tag:"a",cls:a.baseCls+"-close-btn",href:"#",title:a.closeText},"after")}}else{if(b){b.remove();delete a.closeEl}}},syncClosableUI:function(){var b=this,a=[b.closableCls,b.closableCls+"-"+b.position];if(b.closable){b.addClsWithUI(a)}else{b.removeClsWithUI(a)}},setCard:function(a){var b=this;b.card=a;b.setText(b.title||a.title);b.setIconCls(b.iconCls||a.iconCls);b.setIcon(b.icon||a.icon)},onCloseClick:function(){var a=this;if(a.fireEvent("beforeclose",a)!==false){if(a.tabBar){if(a.tabBar.closeTab(a)===false){return}}else{a.fireClose()}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(b){var a=this;if(a.tabBar){a.tabBar.onClick(b,a.el)}},onDeleteKey:function(a){if(this.closable){this.onCloseClick()}},activate:function(b){var a=this;a.active=true;a.addClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("activate",a)}},deactivate:function(b){var a=this;a.active=false;a.removeClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("deactivate",a)}}});Ext.define("Ext.tab.Bar",{extend:"Ext.panel.Header",alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",requires:["Ext.tab.Tab"],isTabBar:true,defaultType:"tab",plain:false,childEls:["body","strip"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}<tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>",'<div id="{id}-strip" class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],initComponent:function(){var a=this;if(a.plain){a.setUI(a.ui+"-plain")}a.addClsWithUI(a.dock);a.addEvents("change");a.callParent(arguments);a.layout.align=(a.orientation=="vertical")?"left":"top";a.layout.overflowHandler=new Ext.layout.container.boxOverflow.Scroller(a.layout);a.remove(a.titleCmp);delete a.titleCmp;Ext.apply(a.renderData,{bodyCls:a.bodyCls})},getLayout:function(){var a=this;a.layout.type=(a.dock==="top"||a.dock==="bottom")?"hbox":"vbox";return a.callParent(arguments)},onAdd:function(a){a.position=this.dock;this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.previousTab){b.previousTab=null}b.callParent(arguments)},afterComponentLayout:function(a){this.callParent(arguments);this.strip.setWidth(a)},onClick:function(g,d){var c=this,i=g.getTarget("."+Ext.tab.Tab.prototype.baseCls),b=i&&Ext.getCmp(i.id),h=c.tabPanel,a=b&&b.closeEl&&(d===b.closeEl.dom);if(a){g.preventDefault()}if(b&&b.isDisabled&&!b.isDisabled()){if(b.closable&&a){b.onCloseClick()}else{if(h){h.setActiveTab(b.card)}else{c.setActiveTab(b)}b.focus()}}},closeTab:function(c){var d=this,b=c.card,e=d.tabPanel,a;if(b&&b.fireEvent("beforeclose",b)===false){return false}a=d.findNextActivatable(c);Ext.suspendLayouts();if(e&&b){delete c.ownerCt;b.fireEvent("close",b);e.remove(b);if(!e.getComponent(b)){c.fireClose();d.remove(c)}else{c.ownerCt=d;Ext.resumeLayouts(true);return false}}if(a){if(e){e.setActiveTab(a.card)}else{d.setActiveTab(a)}a.focus()}Ext.resumeLayouts(true)},findNextActivatable:function(a){var b=this;if(a.active&&b.items.getCount()>1){return(b.previousTab&&b.previousTab!==a&&!b.previousTab.disabled)?b.previousTab:(a.next("tab[disabled=false]")||a.prev("tab[disabled=false]"))}},setActiveTab:function(a){var b=this;if(!a.disabled&&a!==b.activeTab){if(b.activeTab){if(b.activeTab.isDestroyed){b.previousTab=null}else{b.previousTab=b.activeTab;b.activeTab.deactivate()}}a.activate();b.activeTab=a;b.fireEvent("change",b,a,a.card);b.on({afterlayout:b.afterTabActivate,scope:b,single:true});b.updateLayout()}},afterTabActivate:function(){this.layout.overflowHandler.scrollToItem(this.activeTab)}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(b){var a=this;a.callParent(arguments);a.triggerButtonCls=a.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-"+b.getNames().right;a.menuItems=[]},beginLayout:function(a){this.callParent(arguments);this.clearOverflow(a)},beginLayoutCycle:function(b,a){this.callParent(arguments);if(!a){this.clearOverflow(b);this.layout.cacheChildItems(b)}},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},getSuffixConfig:function(){var c=this,b=c.layout,a=b.owner.id;c.menu=new Ext.menu.Menu({listeners:{scope:c,beforeshow:c.beforeMenuShow}});c.menuTrigger=new Ext.button.Button({id:a+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+c.triggerButtonCls,hidden:true,ownerCt:b.owner,ownerLayout:b,iconCls:Ext.baseCSSPrefix+c.getOwnerType(b.owner)+"-more-icon",ui:b.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:c.menu,getSplitCls:function(){return""}});return c.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(e){var d=this,c=d.layout,h=c.getNames(),a="get"+h.widthCap,g=e.state.boxPlan,b=[null,null];d.showTrigger(e);b[h.heightIndex]=(g.maxSize-d.menuTrigger["get"+h.heightCap]())/2;d.menuTrigger.setPosition.apply(d.menuTrigger,b);return{reservedSpace:d.menuTrigger[a]()}},captureChildElements:function(){var a=this.menuTrigger;if(a.rendering){a.finishRender()}},clearOverflow:function(h){var g=this,b=g.menuItems,e,c=0,d=b.length,a=g.layout.owner;a.suspendLayouts();g.captureChildElements();g.hideTrigger();a.resumeLayouts();for(;c<d;c++){e=b[c];e.suspendLayouts();e.show();e.resumeLayouts({isRoot:true})}b.length=0},showTrigger:function(c){var o=this,k=o.layout,a=k.owner,n=k.getNames(),r=n.x,e=n.width,p=c.state.boxPlan,b=p.targetSize[e],h=c.childItems,l=h.length,g=o.menuTrigger,q,j,d,m;g.suspendLayouts();g.show();g.resumeLayouts({isRoot:true});b-=o.menuTrigger.getWidth();a.suspendLayouts();o.menuItems.length=0;for(d=0;d<l;d++){q=h[d];m=q.props;if(m[r]+m[e]>b){j=q.target;o.menuItems.push(j);j.hide()}}a.resumeLayouts()},hideTrigger:function(){var a=this.menuTrigger;if(a){a.hide()}},beforeMenuShow:function(j){var h=this,b=h.menuItems,d=0,a=b.length,g,e,c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};j.suspendLayouts();h.clearMenu();j.removeAll();for(;d<a;d++){g=b[d];if(!d&&(g instanceof Ext.toolbar.Separator)){continue}if(e&&(c(g,e)||c(e,g))){j.add("-")}h.addComponentToMenu(j,g);e=g}if(j.items.length<1){j.add(h.noItemsMenuText)}j.resumeLayouts()},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(g,c){var e=this,d,b,a;if(c instanceof Ext.toolbar.Separator){g.add("-")}else{if(c.isComponent){if(c.isXType("splitbutton")){g.add(e.createMenuConfig(c,true))}else{if(c.isXType("button")){g.add(e.createMenuConfig(c,!c.menu))}else{if(c.isXType("buttongroup")){b=c.items.items;a=b.length;for(d=0;d<a;d++){e.addComponentToMenu(g,b[d])}}else{g.add(Ext.create(Ext.getClassName(c),e.createMenuConfig(c)))}}}}}},clearMenu:function(){var e=this.moreMenu,b,c,a,d;if(e&&e.items){b=e.items.items;a=b.length;for(c=0;c<a;c++){d=b[c];if(d.menu){delete d.menu}}}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:0,pack:"start",flex:undefined,stretchMaxPartner:undefined,type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",availableSpaceOffset:0,reserveOffset:true,manageMargins:true,childEls:["innerCt","targetEl"],renderTpl:["{%var oc,l=values.$comp.layout,oh=l.overflowHandler;","if (oh.getPrefixConfig!==Ext.emptyFn) {","if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)","}%}",'<div id="{ownerId}-innerCt" class="{[l.innerCls]} {[oh.getOverflowCls()]}" role="presentation">','<div id="{ownerId}-targetEl" style="position:absolute;',"width:20000px;","left:0px;top:0px;",'height:1px">',"{%this.renderBody(out, values)%}","</div>","</div>","{%if (oh.getSuffixConfig!==Ext.emptyFn) {","if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)","}%}",{disableFormats:true,definitions:"var dh=Ext.DomHelper;"}],constructor:function(a){var c=this,b;c.callParent(arguments);c.flexSortFn=Ext.Function.bind(c.flexSort,c);c.initOverflowHandler();b=typeof c.padding;if(b=="string"||b=="number"){c.padding=Ext.util.Format.parseBox(c.padding);c.padding.height=c.padding.top+c.padding.bottom;c.padding.width=c.padding.left+c.padding.right}},getNames:function(){return this.names},getItemSizePolicy:function(d,e){var c=this,g=c.sizePolicy,h=c.align,b=h,a;if(h==="stretch"){a=(e||c.owner.getSizeModel())[c.names.height];if(a.shrinkWrap){b="stretchmax"}}else{if(h!=="stretchmax"){b=""}}if(d.flex){g=g.flex}return g[b]},flexSort:function(d,c){var e=this.getNames().maxWidth,g=Infinity;d=d.target[e]||g;c=c.target[e]||g;if(!isFinite(d)&&!isFinite(c)){return 0}return d-c},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},minSizeSortFn:function(d,c){return c.available-d.available},roundFlex:function(a){return Math.ceil(a)},beginCollapse:function(b){var a=this;if(a.direction==="vertical"&&b.collapsedVertical()){b.collapseMemento.capture(["flex"]);delete b.flex}else{if(a.direction==="horizontal"&&b.collapsedHorizontal()){b.collapseMemento.capture(["flex"]);delete b.flex}}},beginExpand:function(a){a.collapseMemento.restore(["flex"])},beginLayout:function(c){var b=this,e=b.owner.stretchMaxPartner,a=b.innerCt.dom.style,d=b.getNames();b.overflowHandler.beginLayout(c);if(typeof e==="string"){e=Ext.getCmp(e)||b.owner.query(e)[0]}c.stretchMaxPartner=e&&c.context.getCmp(e);b.callParent(arguments);c.innerCtContext=c.getEl("innerCt",b);b.scrollParallel=!!(b.owner.autoScroll||b.owner[d.overflowX]);b.scrollPerpendicular=!!(b.owner.autoScroll||b.owner[d.overflowY]);if(b.scrollParallel){b.scrollPos=b.owner.getTargetEl().dom[d.scrollLeft]}a.width="";a.height="";b.cacheFlexes(c)},beginLayoutCycle:function(b,m){var j=this,e=j.align,h=j.getNames(),l=j.pack,k=h.heightModel,d,n,c,a,g;j.overflowHandler.beginLayoutCycle(b,m);j.callParent(arguments);b.parallelSizeModel=b[h.widthModel];b.perpendicularSizeModel=b[k];b.boxOptions={align:e={stretch:e=="stretch",stretchmax:e=="stretchmax",center:e==h.center},pack:l={center:l=="center",end:l=="end"}};if(e.stretch&&b.perpendicularSizeModel.shrinkWrap){e.stretchmax=true;e.stretch=false}if(b.parallelSizeModel.shrinkWrap){l.center=l.end=false}if(e.stretchmax){d=b.childItems;a=d.length;g=j.sizeModels.shrinkWrap;for(c=0;c<a;++c){n=d[c];if(!n[k].configured){n[k]=g}}}},cacheFlexes:function(d){var k=this.getNames(),m=k.widthModel,e=0,h=d.childItems,g=h.length,l=[],a=0,c=k.minWidth,b,n,j;while(g--){n=h[g];if(n[m].calculated){b=n.target;n.flex=j=b.flex;if(j){e+=j;l.push(n);a+=b[c]||0}}}d.flexedItems=l;d.flexedMinSize=a;d.totalFlex=e;Ext.Array.sort(l,this.flexSortFn)},calculate:function(d){var b=this,a=b.getContainerSize(d),h=b.getNames(),c=d.state,g=c.boxPlan||(c.boxPlan={}),e=Ext.getScrollbarSize()[h.width];g.targetSize=a;if(e&&b.scrollPerpendicular&&d.parallelSizeModel.shrinkWrap&&!d.boxOptions.align.stretch&&!d.perpendicularSizeModel.shrinkWrap){c.additionalScrollbarWidth=e;if(!a[h.gotHeight]){b.done=false;return}}else{c.additionalScrollbarWidth=0}if(!d.parallelSizeModel.shrinkWrap&&!a[h.gotWidth]){b.done=false;return}if(!c.parallelDone){c.parallelDone=b.calculateParallel(d,h,g)}if(!c.perpendicularDone){c.perpendicularDone=b.calculatePerpendicular(d,h,g)}if(c.parallelDone&&c.perpendicularDone){if(b.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!b.owner.width&&!b.horizontal){g.isIEVerticalDock=true;g.calculatedWidth=g.maxSize+d.getPaddingInfo().width+d.getFrameInfo().width}b.publishInnerCtSize(d,b.reserveOffset?b.availableSpaceOffset:0);if(b.done&&d.childItems.length>1&&d.boxOptions.align.stretchmax&&!c.stretchMaxDone){b.calculateStretchMax(d,h,g);c.stretchMaxDone=true}}else{b.done=false}},calculateParallel:function(g,k,b){var A=this,l=g.parallelSizeModel.shrinkWrap,w=k.width,a=g.childItems,c=k.left,p=k.right,o=k.setWidth,x=a.length,u=g.flexedItems,q=u.length,t=g.boxOptions.pack,j=A.padding,d=j[c],z=d+j[p]+A.scrollOffset+(A.reserveOffset?A.availableSpaceOffset:0),s,h,e,v,m,r,y,n;for(s=0;s<x;++s){m=a[s];h=m.marginInfo||m.getMarginInfo();z+=h[w];if(!m.flex){z+=m.getProp(w);if(isNaN(z)){return false}}}if(l){b.availableSpace=0;b.tooNarrow=false}else{b.availableSpace=b.targetSize[w]-z;b.tooNarrow=b.availableSpace<g.flexedMinSize;if(b.tooNarrow&&Ext.getScrollbarSize()[k.height]&&A.scrollParallel&&g.state.perpendicularDone){g.state.perpendicularDone=false;for(s=0;s<x;++s){a[s].invalidate()}}}n=z;e=b.availableSpace;v=g.totalFlex;for(s=0;s<q;s++){m=u[s];r=m.flex;y=A.roundFlex((r/v)*e);y=m[o](y);n+=y;e=Math.max(0,e-y);v-=r}if(t.center){d+=e/2;if(d<0){d=0}}else{if(t.end){d+=e}}for(s=0;s<x;++s){m=a[s];h=m.marginInfo;d+=h[c];m.setProp(k.x,d);d+=h[p]+m.props[w]}g.state.contentWidth=n+g.targetContext.getPaddingInfo()[w];if(!g.state.additionalScrollbarWidth){g[k.setContentWidth](g.state.contentWidth)}return true},calculatePerpendicular:function(p,t,c){var D=this,a=p.perpendicularSizeModel.shrinkWrap,d=c.targetSize,b=p.childItems,B=b.length,G=Math.max,E=t.height,l=t.setHeight,o=t.top,C=t.y,s=D.padding,u=s[o],g=d[E]-u-s[t.bottom],z=p.boxOptions.align,n=z.stretch,x=z.stretchmax,m=z.center,y=0,F,A,e,r,q,w,v,j,k,h;if(n||(m&&!a)){if(isNaN(g)){return false}}if(n&&D.scrollParallel&&c.tooNarrow){k=Ext.getScrollbarSize().height;g-=k;c.targetSize[E]-=k}if(n){w=g}else{for(A=0;A<B;A++){v=b[A];r=v.marginInfo||v.getMarginInfo();e=v.getProp(E);if(isNaN(y=G(y,e+r[E],v.target[t.minHeight]||0))){return false}}j=p.stretchMaxPartner;if(j){p.setProp("maxChildHeight",y);h=j.childItems;if(h&&h.length){y=G(y,j.getProp("maxChildHeight"));if(isNaN(y)){return false}}}c.maxSize=y;p[t.setContentHeight](y+D.padding[E]+p.targetContext.getPaddingInfo()[E]);if(x){w=y}else{if(m){w=a?y:G(g,y);w-=p.innerCtContext.getBorderInfo()[E]}}}for(A=0;A<B;A++){v=b[A];r=v.marginInfo||v.getMarginInfo();F=u+r[o];if(n){v[l](w-r[E])}else{if(m){q=w-v.props[E];if(q>0){F=u+Math.round(q/2)}}}v.setProp(C,F)}return true},calculateStretchMax:function(d,k,m){var l=this,h=k.height,n=k.width,g=d.childItems,b=g.length,o=m.maxSize,a=l.onBeforeInvalidateChild,q=l.onAfterInvalidateChild,p,j,e,c;for(e=0;e<b;++e){p=g[e];j=p.props;c=o-p.getMarginInfo()[h];if(c!=j[h]||p[k.heightModel].constrained){p.invalidate({before:a,after:q,layout:l,childWidth:j[n],childHeight:c,childX:j.x,childY:j.y,names:k})}}},completeLayout:function(b){var a=this;a.overflowHandler.completeLayout(b);if(a.scrollParallel){a.owner.getTargetEl().dom[a.getNames().scrollLeft]=a.scrollPos}},finishedLayout:function(a){this.overflowHandler.finishedLayout(a);this.callParent(arguments)},onBeforeInvalidateChild:function(b,a){var c=a.names.heightModel;if(!b[c].constrainedMax){b[c]=Ext.layout.SizeModel.calculated}},onAfterInvalidateChild:function(b,a){var c=a.names;b.setProp("x",a.childX);b.setProp("y",a.childY);if(b[c.heightModel].calculated){b[c.setHeight](a.childHeight)}if(b[c.widthModel].calculated){b[c.setWidth](a.childWidth)}},publishInnerCtSize:function(b,e){var j=this,i=j.getNames(),h=i.height,l=i.width,g=b.boxOptions.align,p=j.owner.dock,m=j.padding,k=b.state.boxPlan,d=k.targetSize,o=d[h],q=b.innerCtContext,a=i.contentWidth,c=(b.parallelSizeModel.shrinkWrap||(k.tooNarrow&&j.scrollParallel)?b.state.contentWidth:d[l])-(e||0),n;if(g.stretch){n=o}else{n=k.maxSize+m[i.top]+m[i.bottom]+q.getBorderInfo()[h];if(!b.perpendicularSizeModel.shrinkWrap&&g.center){n=Math.max(o,n)}}q[i.setWidth](c);q[i.setHeight](n);if(b.state.additionalScrollbarWidth){if(n>k.targetSize[i.height]){b.setProp(a,b.state.contentWidth+b.state.additionalScrollbarWidth);if(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks){b[i.setWidth](b.props[a]+b.getPaddingInfo()[i.width]+b.getBorderInfo()[i.width])}}else{b.setProp(a,b.state.contentWidth)}}if(isNaN(c+n)){j.done=false}if(k.calculatedWidth&&(p=="left"||p=="right")){b.setWidth(k.calculatedWidth,true,true)}},onRemove:function(a){var b=this;b.callParent(arguments);if(b.overflowHandler){b.overflowHandler.onRemove(a)}if(a.layoutMarginCap==b.id){delete a.layoutMarginCap}},initOverflowHandler:function(){var d=this,c=d.overflowHandler,b,a;if(typeof c=="string"){c={type:c}}b="None";if(c&&c.type!==undefined){b=c.type}a=Ext.layout.container.boxOverflow[b];if(a[d.type]){a=a[d.type]}d.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,d,c)},getRenderTarget:function(){return this.targetEl},getElementTarget:function(){return this.innerCt},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",type:"hbox",direction:"horizontal",horizontal:true,names:{lr:"lr",left:"left",leftCap:"Left",right:"right",position:"left",width:"width",contentWidth:"contentWidth",minWidth:"minWidth",maxWidth:"maxWidth",widthCap:"Width",widthModel:"widthModel",widthIndex:0,x:"x",scrollLeft:"scrollLeft",overflowX:"overflowX",center:"middle",top:"top",topPosition:"top",bottom:"bottom",height:"height",contentHeight:"contentHeight",minHeight:"minHeight",maxHeight:"maxHeight",heightCap:"Height",heightModel:"heightModel",heightIndex:1,y:"y",scrollTop:"scrollTop",overflowY:"overflowY",getWidth:"getWidth",getHeight:"getHeight",setWidth:"setWidth",setHeight:"setHeight",gotWidth:"gotWidth",gotHeight:"gotHeight",setContentWidth:"setContentWidth",setContentHeight:"setContentHeight"},sizePolicy:{flex:{"":{setsWidth:1,setsHeight:0},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:0,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:0,setsHeight:1}}});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"gridcolumn",reserveOffset:false,firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",beginLayout:function(c){var h=this,b=h.owner,a=b.up("[scrollerOwner]"),j=a.view,d=0,g=h.getVisibleItems(),e=g.length,k;if(a.lockable){if(h.owner.up("tablepanel")===j.normalGrid){j=j.normalGrid.getView()}else{j=null}}h.callParent(arguments);for(;d<e;d++){k=g[d];k.removeCls([h.firstHeaderCls,h.lastHeaderCls]);k.el.setStyle({height:"auto"});k.titleEl.setStyle({height:"auto",paddingTop:""})}if(e>0){g[0].addCls(h.firstHeaderCls);g[e-1].addCls(h.lastHeaderCls)}if(!h.owner.isHeader&&Ext.getScrollbarSize().width&&!a.collapsed&&j&&j.rendered&&(c.viewTable=j.el.child("table",true))){c.viewContext=c.context.getCmp(j)}},roundFlex:function(a){return Math.floor(a)},getContainerSize:function(e){var d=this,a=d.callParent(arguments),c=e.viewContext,b;if(c&&!c.heightModel.shrinkWrap&&c.target.componentLayout.ownerContext){b=c.getProp("height");if(isNaN(b)){d.done=false}else{if(e.state.tableHeight>b){a.width-=Ext.getScrollbarSize().width;e.state.parallelDone=false;c.invalidate()}}}return a},calculate:function(c){var b=this,a=c.viewContext;if(a&&!c.state.tableHeight){c.state.tableHeight=c.viewTable.offsetHeight}b.callParent(arguments)},completeLayout:function(c){var j=this,b=j.owner,a=c.state,g=false,k=j.sizeModels.calculated,e,h,d,m,l;j.callParent(arguments);if(!a.flexesCalculated&&b.forceFit&&!b.isHeader){e=c.childItems;h=e.length;for(d=0;d<h;d++){m=e[d];l=m.target;if(l.width){l.flex=c.childItems[d].flex=l.width;delete l.width;m.widthModel=k;g=true}}if(g){j.cacheFlexes(c);c.invalidate({state:{flexesCalculated:true}})}}},finalizeLayout:function(){var g=this,e=0,d,b,h,a=g.owner,c=a.titleEl;d=g.getVisibleItems();b=d.length;h=a.el.getViewSize().height;if(c){h-=c.getHeight()}for(;e<b;e++){d[e].setPadding(h)}},publishInnerCtSize:function(d){var c=this,e=d.state.boxPlan,b=e.targetSize,a=d.peek("contentWidth");if((a!=null)&&!c.owner.isHeader){b.width=a+Ext.getScrollbarSize().width}return c.callParent(arguments)}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",requires:["Ext.grid.ColumnLayout","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],uses:["Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",detachOnRemove:false,defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){if(a.enableColumnResize){a.resizer=new Ext.grid.plugin.HeaderResizer();a.plugins.push(a.resizer)}if(a.enableColumnMove){a.reorderer=new Ext.grid.plugin.HeaderReorderer();a.plugins.push(a.reorderer)}}if(a.isHeader&&!a.items){a.layout=a.layout||"auto"}else{a.layout=Ext.apply({type:"gridcolumn",align:"stretchmax"},a.initialConfig.layout)}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{triStateSort:a.triStateSort,sortable:a.sortable});a.menuTask=new Ext.util.DelayedTask(a.updateMenuDisabledState,a);a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){var a=this;a.menuTask.cancel();Ext.destroy(a.resizer,a.reorderer);a.callParent()},applyColumnsState:function(e){if(!e||!e.length){return}var m=this,k=m.items.items,j=k.length,g=0,b=e.length,l,d,a,h;for(l=0;l<b;l++){a=e[l];for(h=j;h--;){d=k[h];if(d.getStateId&&d.getStateId()==a.id){if(g!==h){m.moveHeader(h,g)}if(d.applyColumnState){d.applyColumnState(a)}++g;break}}}},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&&d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(b){var a=this;if(!b.headerId){b.headerId=b.initialConfig.id||Ext.id(null,"header-")}if(!b.stateId){b.stateId=b.initialConfig.id||("h"+(++a.headerCounter))}a.callParent(arguments);a.purgeCache()},onRemove:function(b){var a=this;a.callParent(arguments);a.purgeCache()},applyDefaults:function(b){var a;if(b&&!b.isComponent&&b.xtype=="rownumberer"){a=b}else{a=this.callParent(arguments);if(!("width" in a)&&!a.flex){a.width=this.defaultWidth}}return a},afterRender:function(){this.callParent();this.setSortState()},setSortState:function(){var a=this.up("[store]").store,c=a.sorters,d=c.first(),b;if(d){b=this.down("gridcolumn[dataIndex="+d.property+"]");if(b){b.setSortState(d.direction,false,true)}}},getHeaderMenu:function(){var b=this.getMenu(),a;if(b){a=b.child("#columnItem");if(a){return a.menu}}return null},onHeaderVisibilityChange:function(e,d){var b=this,c=b.getHeaderMenu(),a;if(c){a=b.getMenuItemForHeader(c,e);if(a){a.setChecked(d,true)}b.menuTask.delay(50)}},getLeafMenuItems:function(){var h=this,d=h.getGridColumns(),b=[],c=0,g=0,a=d.length,j=h.getMenu(),e;for(;c<a;++c){e=d[c];if(e.hideable){e=h.getMenuItemForHeader(j,e);if(e){b.push(e);if(e.checked){++g}}}}return{items:b,checkedCount:g}},updateMenuDisabledState:function(){var h=this,b=h.getLeafMenuItems(),g=b.checkedCount,d=b.items,a=d.length,e=0,c=h.getMenu().child("#columnItem");if(g<=1){h.disableMenuItems(c,Ext.ComponentQuery.query("[checked=true]",d)[0])}else{for(;e<a;++e){h.setMenuItemState(g,c,d[e])}}},disableMenuItems:function(a,b){while(b&&b!=a){b.disableCheckChange();b=b.parentMenu.ownerItem}},setMenuItemState:function(e,a,d){var c,b;while(d&&d!=a){c=d.parentMenu;b=d.parentMenu.query("[checked=true]:not([menu])").length;d.enableCheckChange();d=c.ownerItem;if(b===e){break}}this.disableMenuItems(a,d)},getMenuItemForHeader:function(a,b){return b?a.down("menucheckitem[headerId="+b.id+"]"):null},onHeaderShow:function(c){var b=this,a=b.ownerCt;b.onHeaderVisibilityChange(c,true);if(!c.isGroupHeader){if(b.view){b.view.onHeaderShow(b,c,true)}if(a){a.onHeaderShow(b,c)}}b.fireEvent("columnshow",b,c);b.updateLayout()},onHeaderHide:function(c){var b=this,a=b.ownerCt;b.onHeaderVisibilityChange(c,false);if(!c.isGroupHeader){if(b.view){b.view.ignoreTemplate=true;b.view.onHeaderHide(b,c,true);b.view.ignoreTemplate=false}if(a){a.onHeaderHide(b,c)}b.updateLayout()}b.fireEvent("columnhide",b,c)},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(h,b,g){var e=this,a=e.view,c=e.ownerCt,d;if(a&&(d=a.el)&&d.dom.firstChild){e.tempLock();a.onHeaderResize(h,b,g);if(c){c.onHeaderResize(e,h,b)}}e.fireEvent("columnresize",this,h,b)},onHeaderClick:function(c,b,a){c.fireEvent("headerclick",this,c,b,a);this.fireEvent("headerclick",this,c,b,a)},onHeaderTriggerClick:function(d,c,a){var b=this;if(d.fireEvent("headertriggerclick",b,d,c,a)!==false&&b.fireEvent("headertriggerclick",b,d,c,a)!==false){b.showMenuBy(a,d)}},showMenuBy:function(b,g){var d=this.getMenu(),e=d.down("#ascItem"),c=d.down("#descItem"),a;d.activeHeader=d.ownerCt=g;d.setFloatParent(g);g.titleEl.addCls(this.headerOpenCls);a=g.sortable?"enable":"disable";if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuDeactivate:function(){var a=this.getMenu();a.activeHeader.titleEl.removeCls(this.headerOpenCls)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),a,b)},purgeCache:function(){var a=this;delete a.gridDataColumns;delete a.hideableColumns;if(a.menu){a.menu.hide();a.menu.destroy();delete a.menu}},onHeaderMoved:function(g,a,c,e){var d=this,b=d.ownerCt;if(b&&b.onHeaderMove){b.onHeaderMove(d,g,a,c,e)}d.fireEvent("columnmove",d,g,c,e)},getMenu:function(){var a=this;if(!a.menu){a.menu=new Ext.menu.Menu({hideOnParentHide:false,items:a.getMenuItems(),listeners:{deactivate:a.onMenuDeactivate,scope:a}});a.updateMenuDisabledState();a.fireEvent("menucreate",a,a.menu)}return a.menu},getMenuItems:function(){var c=this,b=[],a=c.enableColumnHide?c.getColumnMenu(c):null;if(c.sortable){b=[{itemId:"ascItem",text:c.sortAscText,cls:Ext.baseCSSPrefix+"hmenu-sort-asc",handler:c.onSortAscClick,scope:c},{itemId:"descItem",text:c.sortDescText,cls:Ext.baseCSSPrefix+"hmenu-sort-desc",handler:c.onSortDescClick,scope:c}]}if(a&&a.length){b.push("-",{itemId:"columnItem",text:c.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:a})}return b},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("ASC")},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("DESC")},getColumnMenu:function(g){var c=[],b=0,e,a=g.query(">gridcolumn[hideable]"),h=a.length,d;for(;b<h;b++){e=a[b];d=new Ext.menu.CheckItem({text:e.menuText||e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?"show":"hide"]()},getColumnsForTpl:function(e){var c=[],d=this.getGridColumns(e),h=d.length,a=0,g,b;for(;a<h;a++){g=d[a];if(g.hidden||g.up("headercontainer[hidden=true]")){b=0}else{b=g.getDesiredWidth()}c.push({dataIndex:g.dataIndex,align:g.align,width:b,id:g.id,cls:g.tdCls,columnId:g.getItemId()})}return c},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(d){var c=0,b=this.getVisibleGridColumns(d),g=b.length,a=0,e;for(;a<g;a++){e=b[a];if(e.getDesiredWidth){c+=e.getDesiredWidth()||0}else{c+=e.getWidth()}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),d=c.length,b=0;for(;b<d;b++){if(c[b]!==a){c[b].setSortState(null,true)}}},getVisibleGridColumns:function(a){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(a))},getGridColumns:function(b){var c=this,a=b?null:c.gridDataColumns;if(!a){c.gridDataColumns=a=[];c.cascade(function(d){if((d!==c)&&!d.isGroupHeader){a.push(d)}})}return a},getHideableColumns:function(b){var c=this,a=b?null:c.hideableColumns;if(!a){a=c.hideableColumns=c.query("[hideable]")}return a},getHeaderIndex:function(a){if(a.isGroupHeader){a=a.down(":not([isgroupHeader])")}return Ext.Array.indexOf(this.getGridColumns(),a)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b.length?b[a]:null},getVisibleHeaderClosestToIndex:function(b){var a=this.getHeaderAtIndex(b);if(a&&a.hidden){a=a.next(":not([hidden])")||a.next(":not([hidden])")}return a},prepareData:function(i,c,k,n,a){var m=this,h={},d=m.gridDataColumns||m.getGridColumns(),e=d.length,g=0,j,q,l,p,b,o=a.store;for(;g<e;g++){b={tdCls:"",style:""};j=d[g];q=j.id;l=j.renderer;p=i[j.dataIndex];if(typeof l=="function"){p=l.call(j.scope||m.ownerCt,p,b,k,c,g,o,n)}if(m.markDirty){h[q+"-modified"]=k.isModified(j.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":""}h[q+"-tdCls"]=b.tdCls;h[q+"-tdAttr"]=b.tdAttr;h[q+"-style"]=b.style;if(typeof p==="undefined"||p===null||p===""){p=j.emptyCellText}h[q]=p}return h},expandToFit:function(b){var a=this.view;if(a){a.expandToFit(b)}}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav","Ext.grid.ColumnComponentLayout","Ext.grid.ColumnLayout"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],childEls:["titleEl","triggerEl","textEl"],renderTpl:'<div id="{id}-titleEl" class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>{%this.renderContainer(out,values)%}',dataIndex:null,text:"&#160;",menuText:null,emptyCellText:"&#160;",sortable:true,resizable:true,hideable:true,menuDisabled:false,renderer:false,editRenderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,componentLayout:"columncomponent",initResizable:Ext.emptyFn,initComponent:function(){var a=this,b;if(Ext.isDefined(a.header)){a.text=a.header;delete a.header}if(!a.triStateSort){a.possibleSortStates.length=2}if(Ext.isDefined(a.columns)){a.isGroupHeader=true;a.items=a.columns;delete a.columns;delete a.flex;delete a.width;a.cls=(a.cls||"")+" "+Ext.baseCSSPrefix+"group-header";a.sortable=false;a.resizable=false;a.align="center"}else{a.isContainer=false;if(a.flex){a.minWidth=a.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}}a.addCls(Ext.baseCSSPrefix+"column-header-align-"+a.align);b=a.renderer;if(b){if(typeof b=="string"){a.renderer=Ext.util.Format[b]}a.hasCustomRenderer=true}else{if(a.defaultRenderer){a.scope=a;a.renderer=a.defaultRenderer}}a.callParent(arguments);a.on({element:"el",click:a.onElClick,dblclick:a.onElDblClick,scope:a});a.on({element:"titleEl",mouseenter:a.onTitleMouseOver,mouseleave:a.onTitleMouseOut,scope:a})},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var a=this;return Ext.applyIf(a.callParent(arguments),{text:a.text,menuDisabled:a.menuDisabled})},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var e=this,b=e.items.items,a=b?b.length:0,d,c=[],g={id:e.getStateId()};e.savePropsToState(["hidden","sortable","locked","flex","width"],g);if(e.isGroupHeader){for(d=0;d<a;d++){c.push(b[d].getColumnState())}if(c.length){g.columns=c}}else{if(e.isSubHeader&&e.ownerCt.hidden){delete e.hidden}}if("width" in g){delete g.flex}return g},getStateId:function(){return this.stateId||this.headerId},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},getVisibleIndex:function(){return this.isGroupColumn?false:Ext.Array.indexOf(this.getOwnerHeaderCt().getVisibleGridColumns(),this)},beforeRender:function(){var b=this,a=b.up("tablepanel");b.callParent();if(a&&(!b.sortable||a.sortableColumns===false)&&!b.groupable&&!b.lockable&&(a.enableColumnHide===false||!b.getOwnerHeaderCt().getHideableColumns().length)){b.menuDisabled=true}},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);if(b.overCls){a.addClsOnOver(b.overCls)}if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.keyNav=new Ext.util.KeyNav(a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},afterComponentLayout:function(d,a,c,g){var e=this,b=e.getOwnerHeaderCt();e.callParent(arguments);if(b&&(c!=null||e.flex)&&d!==c){b.onHeaderResize(e,d,true)}delete e.oldWidth},setPadding:function(a){var e=this,d=parseInt(e.textEl.getStyle("line-height"),10),h=e.textEl.dom.offsetHeight,b=e.titleEl,g=a-e.el.getBorderWidth("tb"),c;if(!e.isGroupHeader){if(b.getHeight()<g){b.setHeight(g);e.ownerCt.layout.innerCt.setHeight(a)}}c=b.getViewSize().height;if(h){if(d){h=Math.ceil(h/d)*d}b.setStyle({paddingTop:Math.floor(Math.max(((c-h)/2),0))+"px"})}if(Ext.isIE&&e.triggerEl){e.triggerEl.setHeight(c)}},onDestroy:function(){var a=this;Ext.destroy(a.textEl,a.keyNav);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleEl.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleEl.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(d,a){var c=this,b=c.ownerCt;if(b&&Ext.Array.indexOf(b.items,c)!==0&&c.isOnLeftEdge(d)){b.expandToFit(c.previousSibling("gridcolumn"))}},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){if(c.triggerEl&&(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&&!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},processEvent:function(g,b,a,c,d,h){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(b){var a=this.up("tablepanel").store;a.sort({property:this.getSortParam(),direction:b})},getSortParam:function(){return this.dataIndex},setSortState:function(a,k,g){var h=this,i=Ext.baseCSSPrefix+"column-header-sort-",j=i+"ASC",c=i+"DESC",b=i+"null",e=h.getOwnerHeaderCt(),d=h.sortState;if(d!==a&&h.getSortParam()){h.addCls(i+a);if(a&&!g){h.doSort(a)}switch(a){case"DESC":h.removeCls([j,b]);break;case"ASC":h.removeCls([c,b]);break;case null:h.removeCls([j,c]);break}if(e&&!h.triStateSort&&!k){e.clearOtherSortStates(h)}h.sortState=a;if(h.triStateSort||a!=null){e.fireEvent("sortchange",e,h,a)}}},hide:function(c){var j=this,e=j.getOwnerHeaderCt(),b=j.ownerCt,a=b.isGroupHeader,k,h,g,d;if(a&&!c){h=b.query(">:not([hidden])");if(h.length===1&&h[0]==j){j.ownerCt.hide();return}}Ext.suspendLayouts();if(j.isGroupHeader){h=j.items.items;for(d=0,g=h.length;d<g;d++){k=h[d];if(!k.hidden){k.hide(true)}}}j.callParent();e.onHeaderHide(j);Ext.resumeLayouts(true)},show:function(d,b){var j=this,g=j.ownerCt,c,a,e,h;Ext.suspendLayouts();if(j.isSubHeader&&g.hidden){g.show(false,true)}j.callParent(arguments);if(j.isGroupHeader&&b!==true&&!j.query(":not([hidden])").length){c=j.query(">*");for(e=0,a=c.length;e<a;e++){h=c[e];if(h.hidden){h.show(true)}}}Ext.resumeLayouts(true);g=j.getOwnerHeaderCt();if(g){g.onHeaderShow(j)}},getDesiredWidth:function(){var a=this;if(a.rendered&&a.componentLayout&&a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(a){return(a.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(a){return(this.el.getRight()-a.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.RowNumberer",{extend:"Ext.grid.column.Column",alias:"widget.rownumberer",text:"&#160",width:23,sortable:false,draggable:false,align:"right",constructor:function(a){this.width=this.width;this.callParent(arguments);if(this.rowspan){this.renderer=Ext.Function.bind(this.renderer,this)}},resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"row-numberer",rowspan:undefined,renderer:function(e,b,a,d,g,c){if(this.rowspan){b.cellAttr='rowspan="'+this.rowspan+'"'}b.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return c.indexOfTotal(a)+1}});Ext.define("Ext.grid.column.Action",{extend:"Ext.grid.column.Column",alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",menuText:"<i>Actions</i>",sortable:false,constructor:function(c){var d=this,a=Ext.apply({},c),b=a.items||[d];d.origRenderer=a.renderer||d.renderer;d.origScope=a.scope||d.scope;delete d.renderer;delete d.scope;delete a.renderer;delete a.scope;delete a.items;d.callParent([a]);d.items=b;if(d.origRenderer){d.hasCustomRenderer=true}},defaultRenderer:function(g,j){var e=this,b=Ext.baseCSSPrefix,k=e.origScope||e,d=e.items,c=d.length,a=0,h;g=Ext.isFunction(e.origRenderer)?e.origRenderer.apply(k,arguments)||"":"";j.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(;a<c;a++){h=d[a];if(!h.hasActionConfiguration){h.stopSelection=e.stopSelection;h.disable=Ext.Function.bind(e.disableAction,e,[a],0);h.enable=Ext.Function.bind(e.enableAction,e,[a],0);h.hasActionConfiguration=true}g+='<img alt="'+(h.altText||e.altText)+'" src="'+(h.icon||Ext.BLANK_IMAGE_URL)+'" class="'+b+"action-col-icon "+b+"action-col-"+String(a)+" "+(h.disabled?b+"item-disabled":" ")+" "+(Ext.isFunction(h.getClass)?h.getClass.apply(h.scope||k,arguments):(h.iconCls||e.iconCls||""))+'"'+((h.tooltip)?' data-qtip="'+h.tooltip+'"':"")+" />"}return g},enableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=false;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).removeCls(c.disabledCls);if(!a){c.fireEvent("enable",c)}},disableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=true;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).addCls(c.disabledCls);if(!a){c.fireEvent("disable",c)}},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(i,l,n,a,j,g,c,p){var h=this,d=g.getTarget(),b,o,k,m=i=="keydown"&&g.getKey();if(m&&!Ext.fly(d).findParent(l.cellSelector)){d=Ext.fly(n).down("."+Ext.baseCSSPrefix+"action-col-icon",true)}if(d&&(b=d.className.match(h.actionIdRe))){o=h.items[parseInt(b[1],10)];if(o){if(i=="click"||(m==g.ENTER||m==g.SPACE)){k=o.handler||h.handler;if(k&&!o.disabled){k.call(o.scope||h.scope||h,l,a,j,o,g,c,p)}}else{if(i=="mousedown"&&o.stopSelection!==false){return false}}}}return h.callParent(arguments)},cascade:function(b,a){b.call(a||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.grid.column.Boolean",{extend:"Ext.grid.column.Column",alias:["widget.booleancolumn"],alternateClassName:"Ext.grid.BooleanColumn",trueText:"true",falseText:"false",undefinedText:"&#160;",defaultRenderer:function(a){if(a===undefined){return this.undefinedText}if(!a||a==="false"){return this.falseText}return this.trueText}});Ext.define("Ext.grid.column.Date",{extend:"Ext.grid.column.Column",alias:["widget.datecolumn"],requires:["Ext.Date"],alternateClassName:"Ext.grid.DateColumn",initComponent:function(){if(!this.format){this.format=Ext.Date.defaultFormat}this.callParent(arguments)},defaultRenderer:function(a){return Ext.util.Format.date(a,this.format)}});Ext.define("Ext.grid.column.Number",{extend:"Ext.grid.column.Column",alias:["widget.numbercolumn"],requires:["Ext.util.Format"],alternateClassName:"Ext.grid.NumberColumn",format:"0,000.00",defaultRenderer:function(a){return Ext.util.Format.number(a,this.format)}});Ext.define("Ext.grid.column.Template",{extend:"Ext.grid.column.Column",alias:["widget.templatecolumn"],requires:["Ext.XTemplate"],alternateClassName:"Ext.grid.TemplateColumn",initComponent:function(){var a=this;a.tpl=(!Ext.isPrimitive(a.tpl)&&a.tpl.compile)?a.tpl:new Ext.XTemplate(a.tpl);a.hasCustomRenderer=true;a.callParent(arguments)},defaultRenderer:function(c,d,a){var b=Ext.apply({},a.data,a.getAssociatedData());return this.tpl.apply(b)}});Ext.define("Ext.grid.plugin.Editing",{alias:"editing.editing",requires:["Ext.grid.column.Column","Ext.util.KeyNav"],mixins:{observable:"Ext.util.Observable"},clicksToEdit:2,triggerEvent:undefined,defaultFieldXType:"textfield",editStyle:"",constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("beforeedit","edit","validateedit","canceledit");b.mixins.observable.constructor.call(b);b.on("edit",function(c,d){b.fireEvent("afteredit",c,d)})},init:function(a){var b=this;if(a.lockable){a=a.view.normalGrid}b.grid=a;b.view=a.view;b.initEvents();b.mon(a,"reconfigure",b.onReconfigure,b);b.onReconfigure();a.relayEvents(b,["beforeedit","edit","validateedit","canceledit"]);a.isEditable=true;a.editingPlugin=a.view.editingPlugin=b},onReconfigure:function(){this.initFieldAccessors(this.view.getGridColumns())},destroy:function(){var b=this,a=b.grid;Ext.destroy(b.keyNav);b.removeFieldAccessors(a.getView().getGridColumns());b.clearListeners();delete b.grid.editingPlugin;delete b.grid.view.editingPlugin;delete b.grid;delete b.view;delete b.editor;delete b.keyNav},getEditStyle:function(){return this.editStyle},initFieldAccessors:function(a){a=[].concat(a);var d=this,g,e=a.length,b;for(g=0;g<e;g++){b=a[g];Ext.applyIf(b,{getEditor:function(c,h){return d.getColumnField(this,h)},setEditor:function(c){d.setColumnField(this,c)}})}},removeFieldAccessors:function(a){a=[].concat(a);var e,d=a.length,b;for(e=0;e<d;e++){b=a[e];delete b.getEditor;delete b.setEditor}},getColumnField:function(b,a){var c=b.field;if(!c&&b.editor){c=b.editor;delete b.editor}if(!c&&a){c=a}if(c){if(Ext.isString(c)){c={xtype:c}}if(!c.isFormField){c=Ext.ComponentManager.create(c,this.defaultFieldXType)}b.field=c;Ext.apply(c,{name:b.dataIndex});return c}},setColumnField:function(a,b){if(Ext.isObject(b)&&!b.isFormField){b=Ext.ComponentManager.create(b,this.defaultFieldXType)}a.field=b},initEvents:function(){var a=this;a.initEditTriggers();a.initCancelTriggers()},initCancelTriggers:Ext.emptyFn,initEditTriggers:function(){var b=this,a=b.view;if(b.triggerEvent=="cellfocus"){b.mon(a,"cellfocus",b.onCellFocus,b)}else{if(b.triggerEvent=="rowfocus"){b.mon(a,"rowfocus",b.onRowFocus,b)}else{if(a.selModel.isCellModel){a.onCellFocus=Ext.Function.bind(b.beforeViewCellFocus,b)}b.mon(a,b.triggerEvent||("cell"+(b.clicksToEdit===1?"click":"dblclick")),b.onCellClick,b)}}a.on("render",b.addHeaderEvents,b,{single:true})},beforeViewCellFocus:function(a){if(this.view.selModel.keyNavigation||!this.isCellEditable||!this.isCellEditable(a.row,a.columnHeader)){this.view.focusCell.apply(this.view,arguments)}},onRowFocus:function(a,c,b){this.startEdit(c,0)},onCellFocus:function(c,b,a){this.startEdit(a.row,a.column)},onCellClick:function(c,a,i,b,h,d,g){if(!c.expanderSelector||!g.getTarget(c.expanderSelector)){this.startEdit(b,c.getHeaderAtIndex(i))}},addHeaderEvents:function(){var a=this;a.mon(a.grid.headerCt,{scope:a,add:a.onColumnAdd,remove:a.onColumnRemove});a.keyNav=Ext.create("Ext.util.KeyNav",a.view.el,{enter:a.onEnterKey,esc:a.onEscKey,scope:a})},onColumnAdd:function(a,b){if(b.isHeader){this.initFieldAccessors(b)}},onColumnRemove:function(a,b){if(b.isHeader){this.removeFieldAccessors(b)}},onEnterKey:function(h){var d=this,c=d.grid,b=c.getSelectionModel(),a,i,g=c.headerCt.getHeaderAtIndex(0);if(b.getCurrentPosition){i=b.getCurrentPosition();if(i){a=c.store.getAt(i.row);g=c.headerCt.getHeaderAtIndex(i.column)}}else{a=b.getLastSelected()}if(a&&g){d.startEdit(a,g)}},onEscKey:function(a){this.cancelEdit()},beforeEdit:Ext.emptyFn,startEdit:function(a,d){var c=this,b=c.getEditingContext(a,d);if(c.beforeEdit(b)===false||c.fireEvent("beforeedit",c,b)===false||b.cancel||!c.grid.view.isVisible(true)){return false}c.context=b;c.editing=true},getEditingContext:function(b,h){var g=this,c=g.grid,a=c.getView(),e=a.getNode(b),d,i;if(!e){return}h=c.headerCt.getVisibleHeaderClosestToIndex(Ext.isNumber(h)?h:h.getIndex());if(!h){return}i=h.getIndex();if(Ext.isNumber(b)){d=b;b=a.getRecord(e)}else{d=a.indexOf(e)}return{grid:c,record:b,field:h.dataIndex,value:b.get(h.dataIndex),row:a.getNode(d),column:h,rowIdx:d,colIdx:i}},cancelEdit:function(){var a=this;a.editing=false;a.fireEvent("canceledit",a,a.context)},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.fireEvent("edit",a,a.context)}delete a.context;a.editing=false},validateEdit:function(){var b=this,a=b.context;return b.fireEvent("validateedit",b,a)!==false&&!a.cancel}});Ext.define("Ext.grid.plugin.CellEditing",{alias:"plugin.cellediting",extend:"Ext.grid.plugin.Editing",requires:["Ext.grid.CellEditor","Ext.util.DelayedTask"],constructor:function(){this.callParent(arguments);this.editors=new Ext.util.MixedCollection(false,function(a){return a.editorId});this.editTask=new Ext.util.DelayedTask()},onReconfigure:function(){this.editors.clear();this.callParent()},destroy:function(){var a=this;a.editTask.cancel();a.editors.each(Ext.destroy,Ext);a.editors.clear();a.callParent(arguments)},onBodyScroll:function(){var c=this,b=c.getActiveEditor(),a=c.view.el.getScroll();if(b&&b.editing){if(a.top!==c.scroll.top){if(b.field){if(b.field.triggerBlur){b.field.triggerBlur()}else{b.field.blur()}}}else{b.realign()}}c.scroll=a},initCancelTriggers:function(){var c=this,b=c.grid,a=b.view;a.addElListener("mousewheel",c.cancelEdit,c);c.mon(a,"bodyscroll",c.onBodyScroll,c);c.mon(b,{columnresize:c.cancelEdit,columnmove:c.cancelEdit,scope:c})},isCellEditable:function(a,d){var c=this,b=c.getEditingContext(a,d);if(c.grid.view.isVisible(true)&&b){d=b.column;a=b.record;if(d&&c.getEditor(a,d)){return true}}},startEdit:function(a,g){var d=this,c=d.getEditingContext(a,g),e,b;d.completeEdit();if(!c||!d.grid.view.isVisible(true)){return false}a=c.record;g=c.column;if(g&&!g.getEditor(a)){return false}e=a.get(g.dataIndex);c.originalValue=c.value=e;if(d.beforeEdit(c)===false||d.fireEvent("beforeedit",d,c)===false||c.cancel){return false}b=d.getEditor(a,g);d.grid.view.cancelFocus();d.view.focusCell({row:c.row,column:c.colIdx});if(b){d.context=c;d.setActiveEditor(b);d.setActiveRecord(a);d.setActiveColumn(g);d.editTask.delay(15,b.startEdit,b,[d.getCell(a,g),e]);d.editing=true;d.scroll=d.view.el.getScroll();return true}return false},completeEdit:function(){var a=this.getActiveEditor();if(a){a.completeEdit();this.editing=false}},setActiveEditor:function(a){this.activeEditor=a},getActiveEditor:function(){return this.activeEditor},setActiveColumn:function(a){this.activeColumn=a},getActiveColumn:function(){return this.activeColumn},setActiveRecord:function(a){this.activeRecord=a},getActiveRecord:function(){return this.activeRecord},getEditor:function(a,d){var g=this,e=g.editors,c=d.getItemId(),b=e.getByKey(c);if(b){return b}else{b=d.getEditor(a);if(!b){return false}if(!(b instanceof Ext.grid.CellEditor)){b=new Ext.grid.CellEditor({editorId:c,field:b,ownerCt:g.grid})}b.editingPlugin=g;b.isForTree=g.grid.isTree;b.on({scope:g,specialkey:g.onSpecialKey,complete:g.onEditComplete,canceledit:g.cancelEdit});e.add(b);return b}},setColumnField:function(b,c){var a=this.editors.getByKey(b.getItemId());Ext.destroy(a,b.field);this.editors.removeAtKey(b.getItemId());this.callParent(arguments)},getCell:function(a,b){return this.grid.getView().getCell(a,b)},onSpecialKey:function(a,g,d){var c=this,b=c.grid,h;if(d.getKey()===d.TAB){d.stopEvent();if(a){a.onEditorTab(d)}h=b.getSelectionModel();if(h.onEditorTab){h.onEditorTab(c,d)}}},onEditComplete:function(c,h,b){var g=this,d=g.grid,e=g.getActiveColumn(),a;if(e){a=g.context.record;g.setActiveEditor(null);g.setActiveColumn(null);g.setActiveRecord(null);if(!g.validateEdit()){return}if(!a.isEqual(h,b)){a.set(e.dataIndex,h)}else{d.getView().getEl(e).focus()}g.context.value=h;g.fireEvent("edit",g,g.context)}},cancelEdit:function(){var c=this,b=c.getActiveEditor(),a=c.grid.getView().getEl(c.getActiveColumn());c.setActiveEditor(null);c.setActiveColumn(null);c.setActiveRecord(null);if(b){b.cancelEdit();a.focus();c.callParent(arguments)}},startEditByPosition:function(a){var b=this.grid.getSelectionModel();a.column=this.view.getHeaderCt().getVisibleHeaderClosestToIndex(a.column).getIndex();if(b.selectByPosition){b.selectByPosition(a)}return this.startEdit(a.row,a.column)}});Ext.define("Ext.grid.property.HeaderContainer",{extend:"Ext.grid.header.Container",alternateClassName:"Ext.grid.PropertyColumnModel",nameWidth:115,nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",nameColumnCls:Ext.baseCSSPrefix+"grid-property-name",constructor:function(b,a){var c=this;c.grid=b;c.store=a;c.callParent([{items:[{header:c.nameText,width:b.nameColumnWidth||c.nameWidth,sortable:b.sortableColumns,dataIndex:b.nameField,renderer:Ext.Function.bind(c.renderProp,c),itemId:b.nameField,menuDisabled:true,tdCls:c.nameColumnCls},{header:c.valueText,renderer:Ext.Function.bind(c.renderCell,c),getEditor:Ext.Function.bind(c.getCellEditor,c),sortable:b.sortableColumns,flex:1,fixed:true,dataIndex:b.valueField,itemId:b.valueField,menuDisabled:true}]}])},getCellEditor:function(a){return this.grid.getCellEditor(a,this)},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(g,d,e){var b=this,c=b.grid.customRenderers[e.get(b.grid.nameField)],a=g;if(c){return c.apply(b,arguments)}if(Ext.isDate(g)){a=b.renderDate(g)}else{if(Ext.isBoolean(g)){a=b.renderBool(g)}}return Ext.util.Format.htmlEncode(a)},renderDate:Ext.util.Format.date,renderBool:function(a){return this[a?"trueText":"falseText"]},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",type:"vbox",direction:"vertical",horizontal:false,names:{lr:"tb",left:"top",leftCap:"Top",right:"bottom",position:"top",width:"height",contentWidth:"contentHeight",minWidth:"minHeight",maxWidth:"maxHeight",widthCap:"Height",widthModel:"heightModel",widthIndex:1,x:"y",scrollLeft:"scrollTop",overflowX:"overflowY",center:"center",top:"left",topPosition:"left",bottom:"right",height:"width",contentHeight:"contentWidth",minHeight:"minWidth",maxHeight:"maxWidth",heightCap:"Width",heightModel:"widthModel",heightIndex:0,y:"x",scrollTop:"scrollLeft",overflowY:"overflowX",getWidth:"getHeight",getHeight:"getWidth",setWidth:"setHeight",setHeight:"setWidth",gotWidth:"gotHeight",gotHeight:"gotWidth",setContentWidth:"setContentHeight",setContentHeight:"setContentWidth"},sizePolicy:{flex:{"":{setsWidth:0,setsHeight:1},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:1,setsHeight:0},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:0}}});Ext.define("Ext.layout.container.Accordion",{extend:"Ext.layout.container.VBox",alias:["layout.accordion"],alternateClassName:"Ext.layout.AccordionLayout",itemCls:[Ext.baseCSSPrefix+"box-item",Ext.baseCSSPrefix+"accordion-item"],align:"stretch",fill:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:true,activeOnTop:false,multi:false,defaultAnimatePolicy:{y:true,height:true},constructor:function(){var a=this;a.callParent(arguments);if(a.animate){a.animatePolicy=Ext.apply({},a.defaultAnimatePolicy)}else{a.animatePolicy=null}},beforeRenderItems:function(b){var e=this,d=b.length,c=0,a;for(;c<d;c++){a=b[c];if(!a.rendered){if(e.collapseFirst){a.collapseFirst=e.collapseFirst}if(e.hideCollapseTool){a.hideCollapseTool=e.hideCollapseTool;a.titleCollapse=true}else{if(e.titleCollapse){a.titleCollapse=e.titleCollapse}}delete a.hideHeader;delete a.width;a.collapsible=true;a.title=a.title||"&#160;";a.addBodyCls(Ext.baseCSSPrefix+"accordion-body");if(!e.multi){if(e.expandedItem!==undefined){a.collapsed=true}else{if(a.hasOwnProperty("collapsed")&&a.collapsed===false){e.expandedItem=c}else{a.collapsed=true}}e.owner.mon(a,{show:e.onComponentShow,beforeexpand:e.onComponentExpand,scope:e})}if(e.fill){e.owner.mon(a,{beforecollapse:e.onComponentCollapse,scope:e})}}}if(d&&e.expandedItem===undefined){e.expandedItem=0;b[0].collapsed=false}},getItemsRenderTree:function(a){this.beforeRenderItems(a);return this.callParent(arguments)},renderItems:function(a,b){this.beforeRenderItems(a);this.callParent(arguments)},configureItem:function(a){this.callParent(arguments);a.animCollapse=a.border=false;if(this.fill){a.flex=1}},onChildPanelRender:function(a){a.header.addCls(Ext.baseCSSPrefix+"accordion-hd")},beginLayout:function(a){this.callParent(arguments);this.updatePanelClasses(a)},updatePanelClasses:function(e){var c=e.visibleItems,d=c.length,a=true,b,h,g;for(b=0;b<d;b++){h=c[b];g=h.header;g.addCls(Ext.baseCSSPrefix+"accordion-hd");if(a){g.removeCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}else{g.addCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}if(b+1==d&&h.collapsed){g.addCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}else{g.removeCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}a=h.collapsed}},onComponentExpand:function(h){var e=this,a=e.owner,c,g,d,b;if(!e.processing){e.processing=true;b=a.deferLayouts;a.deferLayouts=true;c=e.multi?[]:a.query(">panel:not([collapsed])");g=c.length;for(d=0;d<g;d++){c[d].collapse()}a.deferLayouts=b;e.processing=false}},onComponentCollapse:function(d){var e=this,a=e.owner,g,c,b;if(!e.processing){e.processing=true;b=a.deferLayouts;a.deferLayouts=true;g=d.next()||d.prev();if(e.multi){c=e.owner.query(">panel:not([collapsed])");if(c.length===1){g.expand()}}else{if(g){g.expand()}}a.deferLayouts=b;e.processing=false}},onComponentShow:function(a){this.onComponentExpand(a)}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.toolbar.TextItem",{extend:"Ext.toolbar.Item",requires:["Ext.XTemplate"],alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",beforeRender:function(){var a=this;a.callParent();Ext.apply(a.renderData,{text:a.text})},setText:function(a){if(this.rendered){this.el.update(a);this.ownerCt.doLayout()}else{this.text=a}}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",statics:{shortcuts:{"-":"tbseparator"," ":"tbspacer"},shortcutsHV:{0:{"->":{xtype:"tbfill",height:0}},1:{"->":{xtype:"tbfill",width:0}}}},initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle"});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange")},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(d){if(typeof d=="string"){var b=Ext.toolbar.Toolbar,a=b.shortcutsHV[this.vertical?1:0][d]||b.shortcuts[d];if(typeof a=="string"){d={xtype:a}}else{if(a){d=Ext.apply({},a)}else{d={xtype:"tbtext",text:d}}}this.applyDefaults(d)}return this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:Ext.widget(a.split?"splitbutton":this.defaultType,a)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a)},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},getChildItemsToDisable:function(){return this.items.getRange()},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",mixins:{docking:"Ext.container.DockingContainer"},requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",childEls:["body"],renderTpl:["{% this.renderDockedItems(out,values,0); %}",(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)?"<div></div>":"",'<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values);%}","</div>","{% this.renderDockedItems(out,values,1); %}"],bodyPosProps:{x:"x",y:"y"},border:true,initComponent:function(){var a=this;a.addEvents("bodyresize");if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},beforeDestroy:function(){this.destroyDockedItems();this.callParent()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var a=this,b=a.callParent();a.initBodyStyles();a.protoBody.writeTo(b);delete a.protoBody;return b},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},getProtoBody:function(){var b=this,a=b.protoBody;if(!a){b.protoBody=a=new Ext.util.ProtoElement({cls:b.bodyCls,style:b.bodyStyle,clsProp:"bodyCls",styleProp:"bodyStyle",styleIsText:true})}return a},initBodyStyles:function(){var c=this,a=c.getProtoBody(),b=Ext.Element;if(c.bodyPadding!==undefined){a.setStyle("padding",b.unitizeBox((c.bodyPadding===true)?5:c.bodyPadding))}if(c.frame&&c.bodyBorder){if(!Ext.isNumber(c.bodyBorder)){c.bodyBorder=1}a.setStyle("border-width",b.unitizeBox(c.bodyBorder))}},getCollapsedDockedItems:function(){return[this.getReExpander()]},setBodyStyle:function(b,d){var c=this,a=c.rendered?c.body:c.getProtoBody();if(Ext.isFunction(b)){b=b()}if(arguments.length==1&&Ext.isString(b)){b=Ext.Element.parseStyles(b)}a.setStyle.apply(c.body,arguments)},addBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.addCls(b)},removeBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.removeCls(b)},addUIClsToElement:function(b){var c=this,a=c.callParent(arguments);c.addBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},removeUIClsFromElement:function(b){var c=this,a=c.callParent(arguments);c.removeBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},addUIToElement:function(){var a=this;a.callParent(arguments);a.addBodyCls(a.baseCls+"-body-"+a.ui)},removeUIFromElement:function(){var a=this;a.callParent(arguments);a.removeBodyCls(a.baseCls+"-body-"+a.ui)},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments);return this.getDockingRefItems(a,b)},setupRenderTpl:function(a){this.callParent(arguments);this.setupDockingRenderTpl(a)}});Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock","Ext.util.Memento"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",placeholderCollapseHideMode:Ext.Element.VISIBILITY,preventHeader:false,header:undefined,headerPosition:"top",frame:false,frameHeader:true,titleAlign:"left",manageHeight:true,initComponent:function(){var a=this;a.addEvents("beforeclose","close","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange","iconclschange");if(a.collapsible){this.addStateEvents(["expand","collapse"])}if(a.unstyled){a.setUI("plain")}if(a.frame){a.setUI(a.ui+"-framed")}a.bridgeToolbars();a.callParent();a.collapseDirection=a.collapseDirection||a.headerPosition||Ext.Component.DIRECTION_TOP;a.hiddenOnCollapse=new Ext.dom.CompositeElement()},beforeDestroy:function(){var a=this;Ext.destroy(a.placeholder,a.ghostPanel,a.dd);a.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},getFocusEl:function(){return this.el},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&&c){a.dom.setAttribute("aria-labelledby",c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(g){var c=this,b=c.title,e=c.header,a=c.reExpander,d=c.placeholder;c.title=g;if(e){if(e.isHeader){e.setTitle(g)}else{e.title=g}}if(a){a.setTitle(g)}if(d&&d.setTitle){d.setTitle(g)}c.fireEvent("titlechange",c,g,b)},setIconCls:function(a){var c=this,b=c.iconCls,e=c.header,d=c.placeholder;c.iconCls=a;if(e){if(e.isHeader){e.setIconCls(a)}else{e.iconCls=a}}if(d&&d.setIconCls){d.setIconCls(a)}c.fireEvent("iconclschange",c,a,b)},setIcon:function(a){var b=this,c=b.icon,e=b.header,d=b.placeholder;b.icon=a;if(e){if(e.isHeader){e.setIcon(a)}else{e.icon=a}}if(d&&d.setIcon){d.setIcon(a)}b.fireEvent("iconchange",b,a,c)},bridgeToolbars:function(){var a=this,g=[],c,b,e=a.minButtonWidth;function d(h,j,i){if(Ext.isArray(h)){h={xtype:"toolbar",items:h}}else{if(!h.xtype){h.xtype="toolbar"}}h.dock=j;if(j=="left"||j=="right"){h.vertical=true}if(i){h.layout=Ext.applyIf(h.layout||{},{pack:{left:"start",center:"center"}[a.buttonAlign]||"end"})}return h}if(a.tbar){g.push(d(a.tbar,"top"));a.tbar=null}if(a.bbar){g.push(d(a.bbar,"bottom"));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,"bottom",true);c.ui="footer";if(e){b=c.defaults;c.defaults=function(h){var i=b||{};if((!h.xtype||h.xtype==="button"||(h.isComponent&&h.isXType("button")))&&!("minWidth" in i)){i=Ext.apply({minWidth:e},i)}return i}}g.push(c);a.fbar=null}if(a.lbar){g.push(d(a.lbar,"left"));a.lbar=null}if(a.rbar){g.push(d(a.rbar,"right"));a.rbar=null}if(a.dockedItems){if(!Ext.isArray(a.dockedItems)){a.dockedItems=[a.dockedItems]}a.dockedItems=a.dockedItems.concat(g)}else{a.dockedItems=g}},isPlaceHolderCollapse:function(){return this.collapseMode=="placeholder"},onBoxReady:function(){this.callParent();if(this.collapsed){this.setHiddenDocked()}},beforeRender:function(){var b=this,a;b.callParent();b.initTools();if(!(b.preventHeader||(b.header===false))){b.updateHeader()}if(b.collapsed){if(b.isPlaceHolderCollapse()){b.hidden=true;b.placeholderCollapse();a=b.collapsed;b.collapsed=false}else{b.beginCollapse();b.addClsWithUI(b.collapsedCls)}}if(a){b.collapsed=a}},initTools:function(){var a=this;a.tools=a.tools?Ext.Array.clone(a.tools):[];if(a.collapsible&&!(a.hideCollapseTool||a.header===false||a.preventHeader)){a.collapseDirection=a.collapseDirection||a.headerPosition||"top";a.collapseTool=a.expandTool=Ext.widget({xtype:"tool",type:(a.collapsed&&!a.isPlaceHolderCollapse())?("expand-"+a.getOppositeDirection(a.collapseDirection)):("collapse-"+a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI("closable");a.addTool({type:"close",handler:Ext.Function.bind(a.close,a,[])})}if(a.collapseTool&&!a.collapseFirst){a.addTool(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},updateHeader:function(c){var b=this,g=b.header,e=b.title,d=b.tools,a=b.headerPosition=="left"||b.headerPosition=="right";if((g!==false)&&(c||e||(d&&d.length)||(b.collapsible&&!b.titleCollapse))){if(g&&g.isHeader){g.show()}else{g=b.header=Ext.widget(Ext.apply({xtype:"header",title:e,titleAlign:b.titleAlign,orientation:a?"vertical":"horizontal",dock:b.headerPosition||"top",textCls:b.headerTextCls,iconCls:b.iconCls,icon:b.icon,baseCls:b.baseCls+"-header",tools:d,ui:b.ui,id:b.id+"_header",indicateDrag:b.draggable,frame:b.frame&&b.frameHeader,ignoreParentFrame:b.frame||b.overlapHeader,ignoreBorderManagement:b.frame||b.ignoreHeaderBorderManagement,listeners:b.collapsible&&b.titleCollapse?{click:b.toggleCollapse,scope:b}:null},b.header));b.addDocked(g,0);b.tools=g.tools}b.initHeaderAria()}else{if(g){g.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header&&a.header.rendered){a.header.setUI(b)}},getContentTarget:function(){return this.body},getTargetEl:function(){var a=this;return a.body||a.protoBody||a.frameBody||a.el},isVisible:function(a){var b=this;if(b.collapsed&&b.placeholder){return b.placeholder.isVisible(a)}return b.callParent(arguments)},onHide:function(){var a=this;if(a.collapsed&&a.placeholder){a.placeholder.hide()}else{a.callParent(arguments)}},onShow:function(){var a=this;if(a.collapsed&&a.placeholder){a.hidden=true;a.placeholder.show()}else{a.callParent(arguments)}},onRemoved:function(b){var a=this;a.callParent(arguments);if(a.placeholder&&!b){a.ownerCt.remove(a.placeholder,false)}},addTool:function(e){e=[].concat(e);var d=this,g=d.header,c,a=e.length,b;for(c=0;c<a;c++){b=e[c];d.tools.push(b);if(g){g.addTool(b)}}d.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},getWidthAuthority:function(){if(this.collapsed&&this.collapsedHorizontal()){return 1}return this.callParent()},getHeightAuthority:function(){if(this.collapsed&&this.collapsedVertical()){return 1}return this.callParent()},collapsedHorizontal:function(){var a=this.getCollapsed();return a=="left"||a=="right"},collapsedVertical:function(){var a=this.getCollapsed();return a=="top"||a=="bottom"},getCollapsed:function(){var a=this;if(a.collapsed===true){return a.collapseDirection}return a.collapsed},getState:function(){var a=this,b=a.callParent(),c;b=a.addPropertyToState(b,"collapsed");if(a.collapsed){c=a.collapseMemento;c=c&&c.data;if(a.collapsedVertical()){if(b){delete b.height}if(c){b=a.addPropertyToState(b,"height",c.height)}}else{if(b){delete b.width}if(c){b=a.addPropertyToState(b,"width",c.width)}}}return b},findReExpander:function(h){var g=this,j=Ext.Component,e=g.dockedItems.items,a=e.length,b,d;if(g.collapseMode=="mini"){return}switch(h){case j.DIRECTION_TOP:case j.DIRECTION_BOTTOM:for(d=0;d<a;d++){b=e[d];if(!b.hidden){if(b.isHeader&&(!b.dock||b.dock=="top"||b.dock=="bottom")){return b}}}break;case j.DIRECTION_LEFT:case j.DIRECTION_RIGHT:for(d=0;d<a;d++){b=e[d];if(!b.hidden){if(b.isHeader&&(b.dock=="left"||b.dock=="right")){return b}}}break;default:throw ("Panel#findReExpander must be passed a valid collapseDirection")}},getReExpander:function(c){var b=this,d=c||b.collapseDirection,a=b.reExpander||b.findReExpander(d);b.expandDirection=b.getOppositeDirection(d);if(!a){b.reExpander=a=b.createReExpander(d,{dock:d,cls:Ext.baseCSSPrefix+"docked "+b.baseCls+"-"+b.ui+"-collapsed",ownerCt:b,ownerLayout:b.componentLayout});b.dockedItems.insert(0,a)}return a},createReExpander:function(g,e){var d=this,i=g=="left",c=g=="right",h=i||c,b,a=Ext.apply({hideMode:"offsets",title:d.title,orientation:h?"vertical":"horizontal",textCls:d.headerTextCls,icon:d.icon,iconCls:d.iconCls,baseCls:d.baseCls+"-header",ui:d.ui,frame:d.frame&&d.frameHeader,ignoreParentFrame:d.frame||d.overlapHeader,indicateDrag:d.draggable},e);if(d.collapseMode=="mini"){if(h){a.width=1}else{a.height=1}}if(!d.hideCollapseTool){b=i||(c&&d.isPlaceHolderCollapse());a[b?"items":"tools"]=[{xtype:"tool",type:"expand-"+d.getOppositeDirection(g),uiCls:["top"],handler:d.toggleCollapse,scope:d}]}a=new Ext.panel.Header(a);a.addClsWithUI(d.getHeaderCollapsedClasses(a));return a},getHeaderCollapsedClasses:function(d){var b=this,c=b.collapsedCls,a;a=[c,c+"-"+d.dock];if(b.border&&(!b.frame||(b.frame&&Ext.supports.CSS3BorderRadius))){a.push(c+"-border-"+d.dock)}return a},beginCollapse:function(){var e=this,c=e.lastBox,g=e.rendered,b=e.collapseMemento||(e.collapseMemento=new Ext.util.Memento(e)),d=e.getSizeModel(),a;b.capture(["height","minHeight","width","minWidth"]);if(c){b.capture(["x","y","height","width"],c,"last.")}if(e.collapsedVertical()){if(d.width.shrinkWrap){e.width=g?e.getWidth():e.width||e.minWidth||100}delete e.height;e.minHeight=0}else{if(e.collapsedHorizontal()){if(d.height.shrinkWrap){e.height=g?e.getHeight():e.height||e.minHeight||100}delete e.width;e.minWidth=0}}if(e.ownerCt){e.ownerCt.getLayout().beginCollapse(e)}if(!e.isPlaceHolderCollapse()){if(e.header===(a=e.getReExpander())){e.header.addClsWithUI(e.getHeaderCollapsedClasses(e.header));if(e.header.rendered){e.header.updateFrame()}}else{if(a.el){a.el.show();a.hidden=false}}}if(e.resizer){e.resizer.disable()}},beginExpand:function(){var d=this,c=d.lastBox,b=d.collapseMemento,a;b.restore(["height","minHeight","width","minWidth"]);if(c){b.restore(["x","y","height","width"],true,c,"last.")}if(d.ownerCt){d.ownerCt.getLayout().beginExpand(d)}if(!d.isPlaceHolderCollapse()){if(d.header===(a=d.getReExpander())){d.header.removeClsWithUI(d.getHeaderCollapsedClasses(d.header));if(d.header.rendered){d.header.updateFrame()}}else{a.hidden=true;a.el.hide()}}if(d.resizer){d.resizer.enable()}},collapse:function(d,a){var c=this,e=d||c.collapseDirection,b=c.ownerCt;if(c.isCollapsingOrExpanding){return c}if(arguments.length<2){a=c.animCollapse}if(c.collapsed||c.fireEvent("beforecollapse",c,d,a)===false){return c}if(b&&c.isPlaceHolderCollapse()){return c.placeholderCollapse(d,a)}c.collapsed=e;c.beginCollapse();c.fireHierarchyEvent("collapse");return c.doCollapseExpand(1,a)},doCollapseExpand:function(a,b){var d=this,c=d.animCollapse,e=d.ownerLayout;d.animCollapse=b;d.isCollapsingOrExpanding=a;if(e&&!b){e.onContentChange(d)}else{d.updateLayout({isRoot:true})}d.animCollapse=c;return d},afterCollapse:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=0;if(a.collapseTool){a.collapseTool.setType("expand-"+a.getOppositeDirection(a.collapseDirection))}if(c&&b){c.onContentChange(a)}a.setHiddenDocked();a.fireEvent("collapse",a)},setHiddenDocked:function(){var h=this,d=h.hiddenOnCollapse,b=h.getReExpander(),c=h.getDockedItems(),a=c.length,e=0,g;d.add(h.body);for(;e<a;e++){g=c[e];if(g&&g!==b&&g.el){d.add(g.el)}}d.setStyle("visibility","hidden")},restoreHiddenDocked:function(){var a=this.hiddenOnCollapse;a.setStyle("visibility","");a.clear()},getPlaceholder:function(c){var b=this,e=c||b.collapseDirection,a=null,d=b.placeholder;if(!d){if(b.floatable||(b.collapsible&&b.titleCollapse)){a={click:{fn:b.floatable?b.floatCollapsedPanel:b.toggleCollapse,element:"el",scope:b}}}b.placeholder=d=Ext.widget(b.createReExpander(e,{id:b.id+"-placeholder",listeners:a}))}if(!d.placeholderFor){if(!d.isComponent){b.placeholder=d=b.lookupComponent(d)}Ext.applyIf(d,{margins:b.margins,placeholderFor:b});d.addCls([Ext.baseCSSPrefix+"region-collapsed-placeholder",Ext.baseCSSPrefix+"region-collapsed-"+e+"-placeholder",b.collapsedCls])}return d},placeholderCollapse:function(e,a){var d=this,c=d.ownerCt,h=e||d.collapseDirection,b=Ext.baseCSSPrefix+"border-region-slide-in",g=d.getPlaceholder(e);d.isCollapsingOrExpanding=1;d.hidden=true;d.collapsed=h;if(g.rendered){if(g.el.dom.parentNode!==d.el.dom.parentNode){d.el.dom.parentNode.insertBefore(g.el.dom,d.el.dom)}g.hidden=false;g.el.show();c.updateLayout()}else{c.insert(c.items.indexOf(d),g)}if(d.rendered){d.el.setVisibilityMode(d.placeholderCollapseHideMode);if(a){d.el.addCls(b);g.el.hide();d.el.slideOut(h.substr(0,1),{preserveScroll:true,duration:Ext.Number.from(a,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.el.removeCls(b);g.el.show().setStyle("display","none").slideIn(h.substr(0,1),{easing:"linear",duration:100,listeners:{afteranimate:function(){g.focus();d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}}})}}})}else{d.el.hide();d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}}else{d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}return d},floatCollapsedPanel:function(){var g=this,i=g.placeholder,h=i.getBox(true),d,e=Ext.baseCSSPrefix+"border-region-slide-in",b=g.collapsed,j=g.ownerCt||g,a;if(g.el.hasCls(e)){g.slideOutFloatedPanel();return}if(g.isSliding){return}g.isSliding=true;function c(l){var k=g.el.getRegion().union(i.el.getRegion()).adjust(1,-1,-1,1);if(!k.contains(l.getPoint())){g.slideOutFloatedPanel()}}g.placeholder.el.hide();g.placeholder.hidden=true;g.el.show();g.hidden=false;g.collapsed=false;j.updateLayout();d=g.getBox(true);g.placeholder.el.show();g.placeholder.hidden=false;g.el.hide();g.hidden=true;g.collapsed=b;j.updateLayout();g.placeholderMouseMon=i.el.monitorMouseLeave(500,c);g.panelMouseMon=g.el.monitorMouseLeave(500,c);g.el.addCls(e);if(g.collapseTool){g.collapseTool.el.hide()}switch(g.collapsed){case"top":g.el.setLeftTop(h.x,h.y+h.height-1);a="t";break;case"right":g.el.setLeftTop(h.x-d.width+1,h.y);a="r";break;case"bottom":g.el.setLeftTop(h.x,h.y-d.height+1);a="b";break;case"left":g.el.setLeftTop(h.x+h.width-1,h.y);a="l";break}g.floatedFromCollapse=g.collapsed;g.collapsed=g.hidden=false;g.el.slideIn(a,{preserveScroll:true,listeners:{afteranimate:function(){g.isSliding=false}}})},isLayoutRoot:function(){if(this.floatedFromCollapse){return true}return this.callParent()},slideOutFloatedPanel:function(){var a=this,c=this.el,b;if(a.isSliding){return}a.isSliding=true;a.slideOutFloatedPanelBegin();if(typeof a.collapsed=="string"){b=a.collapsed.charAt(0)}c.slideOut(b,{preserveScroll:true,listeners:{afteranimate:function(){a.slideOutFloatedPanelEnd();a.el.removeCls(Ext.baseCSSPrefix+"border-region-slide-in");a.isSliding=false}}})},slideOutFloatedPanelBegin:function(){var a=this,b=this.el;a.collapsed=a.floatedFromCollapse;a.hidden=true;a.floatedFromCollapse=null;b.un(a.panelMouseMon);a.placeholder.el.un(a.placeholderMouseMon)},slideOutFloatedPanelEnd:function(){if(this.collapseTool){this.collapseTool.el.show()}},expand:function(a){var b=this;if(b.isCollapsingOrExpanding){return b}if(!arguments.length){a=b.animCollapse}if(!b.collapsed&&!b.floatedFromCollapse){return b}if(b.fireEvent("beforeexpand",b,a)===false){return b}if(b.isPlaceHolderCollapse()){return b.placeholderExpand(a)}b.restoreHiddenDocked();b.beginExpand();b.collapsed=false;b.fireHierarchyEvent("expand");return b.doCollapseExpand(2,a)},placeholderExpand:function(b){var d=this,h=d.collapsed,c=Ext.baseCSSPrefix+"border-region-slide-in",e,a,g;if(d.floatedFromCollapse){a=d.getPosition(true);d.slideOutFloatedPanelBegin();d.slideOutFloatedPanelEnd()}d.isCollapsingOrExpanding=2;d.placeholder.hidden=true;d.placeholder.el.hide();d.collapsed=false;d.show();if(b){if(a){e=d.el.getXY();d.el.setLeftTop(a[0],a[1]);d.el.moveTo(e[0],e[1],{duration:Ext.Number.from(b,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.el.removeCls(c);d.isCollapsingOrExpanding=0;d.fireEvent("expand",d)}}})}else{d.hidden=true;d.el.addCls(c);d.el.hide();d.collapsed=h;d.placeholder.show();g=h.substr(0,1);d.hidden=false;d.el.slideIn(g,{preserveScroll:true,duration:Ext.Number.from(b,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.collapsed=false;d.el.removeCls(c);d.placeholder.hide();d.isCollapsingOrExpanding=0;d.fireEvent("expand",d)}}})}}else{d.isCollapsingOrExpanding=0;d.fireEvent("expand",d)}return d},afterExpand:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=0;if(a.collapseTool){a.collapseTool.setType("collapse-"+a.collapseDirection)}if(c&&b){c.onContentChange(a)}a.fireEvent("expand",a)},setBorder:function(a,c){if(c){return}var b=this,d=b.header;if(!a){a=0}else{a=Ext.Element.unitizeBox((a===true)?1:a)}if(d){if(d.isHeader){d.setBorder(a)}else{d.border=a}}if(b.rendered&&b.bodyBorder!==false){b.body.setStyle("border-width",a)}b.updateLayout();b.border=a},toggleCollapse:function(){return(this.collapsed||this.floatedFromCollapse)?this.expand():this.collapse()},getKeyMap:function(){return this.keyMap||(this.keyMap=new Ext.util.KeyMap(Ext.apply({target:this.el},this.keys)))},initDraggable:function(){this.dd=new Ext.panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var e=[],g=this.header,d=g?g.query("tool[hidden=false]"):[],c,a,b;if(d.length){c=0;a=d.length;for(;c<a;c++){b=d[c];e.push({type:b.type})}}else{e=[{type:"placeholder"}]}return e},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox(),e;if(!b){b=new Ext.panel.Panel({renderTo:document.body,floating:{shadow:false},frame:d.frame&&!d.alwaysFramed,alwaysFramed:d.alwaysFramed,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,baseCls:d.baseCls,cls:d.baseCls+"-ghost "+(a||"")});d.ghostPanel=b}b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"),0))}else{b.toFront()}if(!(d.preventHeader||(d.header===false))){e=b.header;if(e){e.suspendLayouts();Ext.Array.forEach(e.query("tool"),e.remove,e);e.resumeLayouts()}b.addTool(d.ghostTools());b.setTitle(d.title);b.setIconCls(d.iconCls)}b.el.show();b.setPagePosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){c.el.show();if(a!==false){c.setPagePosition(c.ghostPanel.el.getXY());if(c.hideMode=="offsets"){delete c.el.hideModeStyles}}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide()},beginDrag:function(){if(this.floatingItems){this.floatingItems.hide()}},endDrag:function(){if(this.floatingItems){this.floatingItems.show()}},initResizable:function(a){if(this.collapsed){a.disabled=true}this.callParent([a])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.container.ButtonGroup",{extend:"Ext.panel.Panel",alias:"widget.buttongroup",alternateClassName:"Ext.ButtonGroup",requires:["Ext.layout.container.Table"],baseCls:Ext.baseCSSPrefix+"btn-group",layout:{type:"table"},defaultType:"button",frame:true,frameHeader:false,internalDefaults:{removeMode:"container",hideParent:true},titleAlign:"center",initComponent:function(){var a=this,b=a.columns;a.noTitleCls=a.baseCls+"-notitle";if(b){a.layout=Ext.apply({},{columns:b},a.layout)}if(!a.title){a.addCls(a.noTitleCls)}a.callParent(arguments)},onBeforeAdd:function(a){if(a.isButton){a.ui=a.ui+"-toolbar"}this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:undefined,defaultMinWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[],e=b.floating!==false;b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.unshift(d+"menu-body");b.bodyCls=c.join(" ");if(!b.layout){b.layout={type:"vbox",align:"stretchmax",overflowHandler:"Scroller"}}if(e&&b.minWidth===undefined){b.minWidth=b.defaultMinWidth}if(!e&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var g=!!b.items.length;if(g&&b.rendered){b.el.setStyle("visibility",null)}return g})},beforeRender:function(){this.callParent(arguments);if(!this.getSizeModel().width.shrinkWrap){this.layout.align="stretch"}},onBoxReady:function(){var a=this,b;a.callParent(arguments);if(a.showSeparator){b={cls:Ext.baseCSSPrefix+"menu-icon-separator",html:"&#160;"};if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){b.style="height:"+a.el.getHeight()+"px"}a.iconSepEl=a.layout.getElementTarget().insertFirst(b)}a.mon(a.el,{click:a.onClick,mouseover:a.onMouseOver,scope:a});a.mouseMonitor=a.el.monitorMouseLeave(100,a.onMouseLeave,a);a.keyNav=new Ext.menu.KeyNav(a)},getBubbleTarget:function(){return this.parentMenu||this.ownerButton||this.callParent(arguments)},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(b){var c=this,d=c.activeItem,a=c.focusedItem;if(d){d.deactivate();if(!d.activated){delete c.activeItem}}if(a&&b){a.blur();delete c.focusedItem}},getFocusEl:function(){return this.focusedItem||this.el},hide:function(){this.deactivateActiveItem(true);this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(typeof b=="string"){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){a=[d+"menu-item",d+"menu-item-cmp"];if(!b.plain&&(c.indent===true||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:"")+" "+a.join(" ")}}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.Item({canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}a=(c.type==="click")?b.getItemFromEvent(c):b.activeItem;if(a&&a.isMenuItem){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}if(!a||a.disabled){a=undefined}b.fireEvent("click",b,a,c)},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);delete a.parentMenu;delete a.ownerButton;if(a.rendered){a.el.un(a.mouseMonitor);a.keyNav.destroy();delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(h){var g=this,i=h.getRelatedTarget(),b=!g.el.contains(i),d=g.getItemFromEvent(h),c=g.parentMenu,a=g.parentItem;if(b&&c){c.setActiveItem(a);a.cancelDeferHide();c.mouseMonitor.mouseenter()}if(g.disabled){return}if(d&&!d.activated){g.setActiveItem(d);if(d.activated&&d.expandMenu){d.expandMenu()}}if(b){g.fireEvent("mouseenter",g,h)}g.fireEvent("mouseover",g,d,h)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,d,c){var a=this;if(a.floating&&b){a.show();a.setPagePosition(a.el.getAlignToXY(b.el||b,d||a.defaultAlign,c));a.setVerticalPosition()}return a},show:function(){var d=this,c,b,a,e=d.maxHeight;if(!d.rendered){d.doAutoRender()}if(d.floating){c=Ext.fly(d.el.getScopeParent());b=c.getViewSize().height;d.maxHeight=Math.min(e||b,b)}a=d.callParent(arguments);d.maxHeight=e;return a},afterComponentLayout:function(c,a,b,e){var d=this;d.callParent(arguments);if(d.showSeparator){d.iconSepEl.setHeight(d.componentLayout.lastComponentSize.contentHeight)}},setVerticalPosition:function(){var d=this,g,e=d.el.getY(),h=e,j=d.getHeight(),b=Ext.Element.getViewportHeight().height,c=Ext.fly(d.el.getScopeParent()),a=c.getViewSize().height,i=e-c.getScroll().top;c=null;if(d.floating){g=d.maxHeight?d.maxHeight:a-i;if(j>a){h=e-i}else{if(g<j){h=e-(j-g)}else{if((e+j)>b){h=b-j}}}}d.el.setY(h)}});Ext.define("Ext.menu.ColorPicker",{extend:"Ext.menu.Menu",alias:"widget.colormenu",requires:["Ext.picker.Color"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{plain:true,showSeparator:false,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-color-item",id:b.pickerId,xtype:"colorpicker"},a)});b.callParent(arguments);b.picker=b.down("colorpicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.menu.DatePicker",{extend:"Ext.menu.Menu",alias:"widget.datemenu",requires:["Ext.picker.Date"],hideOnClick:true,pickerId:null,initComponent:function(){var a=this;Ext.apply(a,{showSeparator:false,plain:true,border:false,bodyPadding:0,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-date-item",id:a.pickerId,xtype:"datepicker"},a.initialConfig)});a.callParent(arguments);a.picker=a.down("datepicker");a.relayEvents(a.picker,["select"]);if(a.hideOnClick){a.on("select",a.hidePickerOnSelect,a)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.grid.PagingScroller","Ext.grid.header.Container","Ext.grid.Lockable"],extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,scrollerOwner:true,enableColumnMove:true,restrictColumnReorder:false,enableColumnResize:true,enableColumnHide:true,rowLines:true,initComponent:function(){var h=this,k=h.scroll,b=false,a=false,g=h.columns||h.colModel,j,c=h.border,d,e;if(h.columnLines){h.addCls(Ext.baseCSSPrefix+"grid-with-col-lines")}if(h.rowLines){h.addCls(Ext.baseCSSPrefix+"grid-with-row-lines")}h.store=Ext.data.StoreManager.lookup(h.store||"ext-empty-store");if(g instanceof Ext.grid.header.Container){h.headerCt=g;h.headerCt.border=c;h.columns=h.headerCt.items.items}else{if(Ext.isArray(g)){g={items:g,border:c}}Ext.apply(g,{forceFit:h.forceFit,sortable:h.sortableColumns,enableColumnMove:h.enableColumnMove,enableColumnResize:h.enableColumnResize,enableColumnHide:h.enableColumnHide,border:c,restrictReorder:h.restrictColumnReorder});h.columns=g.items;if(h.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",h.columns).length){h.self.mixin("lockable",Ext.grid.Lockable);h.injectLockable()}}h.scrollTask=new Ext.util.DelayedTask(h.syncHorizontalScroll,h);h.addEvents("reconfigure","viewready");h.bodyCls=h.bodyCls||"";h.bodyCls+=(" "+h.extraBodyCls);h.cls=h.cls||"";h.cls+=(" "+h.extraBaseCls);delete h.autoScroll;if(!h.hasView){if(!h.headerCt){h.headerCt=new Ext.grid.header.Container(g)}h.columns=h.headerCt.items.items;if(h.store.buffered&&!h.store.remoteSort){for(d=0,e=h.columns.length;d<e;d++){h.columns[d].sortable=false}}if(h.hideHeaders){h.headerCt.height=0;h.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");h.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){h.headerCt.style={display:"none"}}}if(k===true||k==="both"){b=a=true}else{if(k==="horizontal"){a=true}else{if(k==="vertical"){b=true}}}h.relayHeaderCtEvents(h.headerCt);h.features=h.features||[];if(!Ext.isArray(h.features)){h.features=[h.features]}h.dockedItems=[].concat(h.dockedItems||[]);h.dockedItems.unshift(h.headerCt);h.viewConfig=h.viewConfig||{};if(h.store&&h.store.buffered){h.viewConfig.preserveScrollOnRefresh=true}else{if(h.invalidateScrollerOnRefresh!==undefined){h.viewConfig.preserveScrollOnRefresh=!h.invalidateScrollerOnRefresh}}j=h.getView();h.items=[j];h.hasView=true;if(b){if(h.store.buffered){h.verticalScroller=new Ext.grid.PagingScroller(Ext.apply({panel:h,store:h.store,view:h.view},h.verticalScroller))}}if(a){if(!h.hideHeaders){j.on({scroll:{fn:h.onHorizontalScroll,element:"el",scope:h}})}}h.mon(j.store,{load:h.onStoreLoad,scope:h});h.mon(j,{viewready:h.onViewReady,refresh:h.onRestoreHorzScroll,scope:h})}this.relayEvents(h.view,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"]);h.callParent(arguments);h.addStateEvents(["columnresize","columnmove","columnhide","columnshow","sortchange"]);if(h.headerCt){h.headerCt.on("afterlayout",h.onRestoreHorzScroll,h)}},relayHeaderCtEvents:function(a){this.relayEvents(a,["columnresize","columnmove","columnhide","columnshow","sortchange"])},getState:function(){var a=this,b=a.callParent(),c=a.store.sorters.first();b=a.addPropertyToState(b,"columns",(a.headerCt||a).getColumnsState());if(c){b=a.addPropertyToState(b,"sort",{property:c.property,direction:c.direction,root:c.root})}return b},applyState:function(d){var c=this,e=d.sort,a=c.store,b=d.columns;delete d.columns;c.callParent(arguments);if(b){(c.headerCt||c).applyColumnsState(b)}if(e){if(a.remoteSort){a.sort({property:e.property,direction:e.direction,root:e.root},null,false)}else{a.sort(e.property,e.direction)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();a.view=Ext.widget(Ext.apply({},a.viewConfig,{grid:a,deferInitialRefresh:a.deferRowRender!==false,scroll:a.scroll,xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a,emptyText:a.emptyText?'<div class="'+Ext.baseCSSPrefix+'grid-empty">'+a.emptyText+"</div>":""}));a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,["cellclick","celldblclick"])}return a.view},setAutoScroll:Ext.emptyFn,processEvent:function(g,b,a,c,d,i){var h=this,j;if(d!==-1){j=h.headerCt.getGridColumns()[d];return j.processEvent.apply(j,arguments)}},determineScrollbars:function(){},invalidateScroller:function(){},scrollByDeltaY:function(b,a){this.getView().scrollBy(0,b,a)},scrollByDeltaX:function(b,a){this.getView().scrollBy(b,0,a)},afterCollapse:function(){var a=this;a.saveScrollPos();a.saveScrollPos();a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);a.restoreScrollPos();a.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderResize:function(){this.delayScroll()},onHeaderMove:function(e,g,a,b,d){var c=this;if(c.optimizedColumnMove===false){c.view.refresh()}else{c.view.moveColumn(b,d,a)}c.delayScroll()},onHeaderHide:function(a,b){this.delayScroll()},onHeaderShow:function(a,b){this.delayScroll()},delayScroll:function(){var a=this.getScrollTarget().el;if(a){this.scrollTask.delay(10,null,null,[a.dom.scrollLeft])}},onViewReady:function(){this.fireEvent("viewready",this)},onRestoreHorzScroll:function(){var a=this.scrollLeftPos;if(a){this.syncHorizontalScroll(a)}},setScrollTop:function(c){var b=this,a=b.getScrollerOwner();a.virtualScrollTop=c},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},getLhsMarker:function(){var a=this;return a.lhsMarker||(a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getRhsMarker:function(){var a=this;return a.rhsMarker||(a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},getScrollTarget:function(){var a=this.getScrollerOwner(),b=a.query("tableview");return b[1]||b[0]},onHorizontalScroll:function(a,b){this.syncHorizontalScroll(b.scrollLeft)},syncHorizontalScroll:function(c){var b=this,a;if(b.rendered){a=b.getScrollTarget();a.el.dom.scrollLeft=c;b.headerCt.el.dom.scrollLeft=c;b.scrollLeftPos=c}},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},beforeDestroy:function(){Ext.destroy(this.verticalScroller);this.callParent()},reconfigure:function(a,b){var c=this,d=c.headerCt;if(c.lockable){c.reconfigureLockable(a,b)}else{if(b){delete c.scrollLeftPos;d.suspendLayouts();d.removeAll();d.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}if(b){d.resumeLayouts(true)}d.setSortState()}c.fireEvent("reconfigure",c,a,b)}});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:Ext.baseCSSPrefix+"tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var c=this,b=[].concat(c.dockedItems||[]),a=c.activeTab||(c.activeTab=0);c.layout=new Ext.layout.container.Card(Ext.apply({owner:c,deferredRender:c.deferredRender,itemCls:c.itemCls,activeItem:c.activeTab},c.layout));c.tabBar=new Ext.tab.Bar(Ext.apply({dock:c.tabPosition,plain:c.plain,border:c.border,cardLayout:c.layout,tabPanel:c},c.tabBar));b.push(c.tabBar);c.dockedItems=b;c.addEvents("beforetabchange","tabchange");c.callParent(arguments);c.activeTab=c.getComponent(a);if(c.activeTab){c.activeTab.tab.activate(true);c.tabBar.activeTab=c.activeTab.tab}},setActiveTab:function(a){var c=this,b;a=c.getComponent(a);if(a){b=c.getActiveTab();if(b!==a&&c.fireEvent("beforetabchange",c,a,b)===false){return false}if(!a.isComponent){Ext.suspendLayouts();a=c.add(a);Ext.resumeLayouts()}c.activeTab=a;Ext.suspendLayouts();c.layout.setActiveItem(a);a=c.activeTab=c.layout.getActiveItem();if(a&&a!==b){c.tabBar.setActiveTab(a.tab);Ext.resumeLayouts(true);if(b!==a){c.fireEvent("tabchange",c,a,b)}}else{Ext.resumeLayouts(true)}return a}},getActiveTab:function(){var b=this,a=b.getComponent(b.activeTab);if(a&&b.items.indexOf(a)!=-1){b.activeTab=a}else{b.activeTab=null}return b.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(e,c){var d=this,b=e.tabConfig||{},a={xtype:"tab",card:e,disabled:e.disabled,closable:e.closable,hidden:e.hidden&&!e.hiddenByLayout,tooltip:e.tooltip,tabBar:d.tabBar,closeText:e.closeText};b=Ext.applyIf(b,a);e.tab=d.tabBar.insert(c,b);e.on({scope:d,enable:d.onItemEnable,disable:d.onItemDisable,beforeshow:d.onItemBeforeShow,iconchange:d.onItemIconChange,iconclschange:d.onItemIconClsChange,titlechange:d.onItemTitleChange});if(e.isPanel){if(d.removePanelHeader){if(e.rendered){if(e.header){e.header.hide()}}else{e.header=false}}if(e.isPanel&&d.border){e.setBorder(false)}}},onItemEnable:function(a){a.tab.enable()},onItemDisable:function(a){a.tab.disable()},onItemBeforeShow:function(a){if(a!==this.activeTab){this.setActiveTab(a);return false}},onItemIconChange:function(b,a){b.tab.setIcon(a)},onItemIconClsChange:function(b,a){b.tab.setIconCls(a)},onItemTitleChange:function(a,b){a.tab.setText(b)},doRemove:function(d,b){var c=this,a;if(c.destroying||c.items.getCount()==1){c.activeTab=null}else{if((a=c.tabBar.items.indexOf(c.tabBar.findNextActivatable(d.tab)))!==-1){c.setActiveTab(a)}}this.callParent(arguments);delete d.tab.card;delete d.tab},onRemove:function(b,c){var a=this;b.un({scope:a,enable:a.onItemEnable,disable:a.onItemDisable,beforeshow:a.onItemBeforeShow});if(!a.destroying&&b.tab.ownerCt===a.tabBar){a.tabBar.remove(b.tab)}}});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,closeAction:"hide",ariaRole:"tooltip",alwaysFramed:true,frameHeader:false,initComponent:function(){var a=this;a.floating=Ext.apply({},{shadow:a.shadow},a.self.prototype.floating);a.callParent(arguments);a.constrain=a.constrain||a.constrainPosition},showAt:function(b){var a=this;this.callParent(arguments);if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define("Ext.slider.Tip",{extend:"Ext.tip.Tip",minWidth:10,alias:"widget.slidertip",offsets:null,align:null,position:"",defaultVerticalPosition:"left",defaultHorizontalPosition:"top",isSliderTip:true,init:function(c){var b=this,d,a;if(!b.position){b.position=c.vertical?b.defaultVerticalPosition:b.defaultHorizontalPosition}switch(b.position){case"top":a=[0,-10];d="b-t?";break;case"bottom":a=[0,10];d="t-b?";break;case"left":a=[-10,0];d="r-l?";break;case"right":a=[10,0];d="l-r?"}if(!b.align){b.align=d}if(!b.offsets){b.offsets=a}c.on({scope:b,dragstart:b.onSlide,drag:b.onSlide,dragend:b.hide,destroy:b.destroy})},onSlide:function(c,d,a){var b=this;b.show();b.update(b.getText(a));b.el.alignTo(a.el,b.align,b.offsets)},getText:function(a){return String(a.value)}});Ext.define("Ext.slider.Multi",{extend:"Ext.form.field.Base",alias:"widget.multislider",alternateClassName:"Ext.slider.MultiSlider",requires:["Ext.slider.Thumb","Ext.slider.Tip","Ext.Number","Ext.util.Format","Ext.Template","Ext.layout.component.field.Slider"],childEls:["endEl","innerEl"],fieldSubTpl:['<div id="{id}" class="'+Ext.baseCSSPrefix+'slider {fieldCls} {vertical}" aria-valuemin="{minValue}" aria-valuemax="{maxValue}" aria-valuenow="{value}" aria-valuetext="{value}">','<div id="{cmpId}-endEl" class="'+Ext.baseCSSPrefix+'slider-end" role="presentation">','<div id="{cmpId}-innerEl" class="'+Ext.baseCSSPrefix+'slider-inner" role="presentation">',"{%this.renderThumbs(out, values)%}","</div>","</div>","</div>",{renderThumbs:function(g,e){var j=e.$comp,h=0,c=j.thumbs,b=c.length,d,a;for(;h<b;h++){d=c[h];a=d.getElConfig();a.id=j.id+"-thumb-"+h;Ext.DomHelper.generateMarkup(a,g)}},disableFormats:true}],vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,constrainThumbs:true,componentLayout:"sliderfield",useTips:true,tipText:null,ariaRole:"slider",initValue:function(){var e=this,c=Ext.value,b=c(e.values,[c(e.value,c(e.minValue,0))]),d=0,a=b.length;e.originalValue=b;for(;d<a;d++){e.addThumb(b[d])}},initComponent:function(){var e=this,c,d,g,b,a;e.thumbs=[];e.keyIncrement=Math.max(e.increment,e.keyIncrement);e.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(e.increment){e.maxValue=Ext.Number.snapInRange(e.maxValue,e.increment,e.minValue);e.value=e.normalizeValue(e.value)}e.callParent();if(e.useTips){if(Ext.isObject(e.useTips)){c=Ext.apply({},e.useTips)}else{c=e.tipText?{getText:e.tipText}:{}}a=e.plugins=e.plugins||[];b=a.length;for(g=0;g<b;g++){if(a[g].isSliderTip){d=true;break}}if(!d){e.plugins.push(new Ext.slider.Tip(c))}}},addThumb:function(c){var b=this,a=new Ext.slider.Thumb({ownerCt:b,ownerLayout:b.getComponentLayout(),value:c,slider:b,index:b.thumbs.length,constrain:b.constrainThumbs});b.thumbs.push(a);if(b.rendered){a.render()}return a},promoteThumb:function(c){var a=this.thumbs,e=a.length,g,b,d;for(d=0;d<e;d++){b=a[d];if(b==c){b.bringToFront()}else{b.sendToBack()}}},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{$comp:a,vertical:a.vertical?Ext.baseCSSPrefix+"slider-vert":Ext.baseCSSPrefix+"slider-horz",minValue:a.minValue,maxValue:a.maxValue,value:a.value})},onRender:function(){var e=this,b=e.thumbs,a=b.length,d=0,c;e.callParent(arguments);for(d=0;d<a;d++){c=b[d];c.el=e.el.getById(e.id+"-thumb-"+d);c.onRender()}},initEvents:function(){var a=this;a.mon(a.el,{scope:a,mousedown:a.onMouseDown,keydown:a.onKeyDown})},getTrackpoint:function(g){var e=this,b,d,c=e.innerEl,a;if(e.vertical){d="top";a=c.getHeight()}else{d="left";a=c.getWidth()}b=Ext.Number.constrain(c.translatePoints(g)[d],0,a);return e.vertical?a-b:b},onMouseDown:function(j){var d=this,h=false,c=0,b=d.thumbs,a=b.length,g;if(d.disabled){return}for(;c<a;c++){h=h||j.target==b[c].el.dom}if(d.clickToChange&&!h){g=d.getTrackpoint(j.getXY());if(g!==undefined){d.onClickChange(g)}}d.focus()},onClickChange:function(d){var c=this,a,b;a=c.getNearest(d);if(!a.disabled){b=a.index;c.setValue(b,Ext.util.Format.round(c.reversePixelValue(d),c.decimalPrecision),undefined,true)}},getNearest:function(j){var k=this,g=k.reversePixelValue(j),l=(k.maxValue-k.minValue)+5,b=null,e=k.thumbs,c=0,d=e.length,a,m,h;for(;c<d;c++){a=k.thumbs[c];m=a.value;h=Math.abs(m-g);if(Math.abs(h<=l)){b=a;l=h}}return b},onKeyDown:function(c){var b=this,a,d;if(b.disabled||b.thumbs.length!==1){c.preventDefault();return}a=c.getKey();switch(a){case c.UP:case c.RIGHT:c.stopEvent();d=c.ctrlKey?b.maxValue:b.getValue(0)+b.keyIncrement;b.setValue(0,d,undefined,true);break;case c.DOWN:case c.LEFT:c.stopEvent();d=c.ctrlKey?b.minValue:b.getValue(0)-b.keyIncrement;b.setValue(0,d,undefined,true);break;default:c.preventDefault()}},normalizeValue:function(b){var c=this,d=Ext.Number,a=d[c.zeroBasedSnapping?"snap":"snapInRange"];b=a.call(d,b,c.increment,c.minValue,c.maxValue);b=Ext.util.Format.round(b,c.decimalPrecision);b=Ext.Number.constrain(b,c.minValue,c.maxValue);return b},setMinValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.minValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemin",g)}for(;d<a;++d){c=b[d];c.value=c.value<g?g:c.value}e.syncThumbs()},setMaxValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.maxValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemax",g)}for(;d<a;++d){c=b[d];c.value=c.value>g?g:c.value}e.syncThumbs()},setValue:function(c,g,b,e){var d=this,a=d.thumbs[c];g=d.normalizeValue(g);if(g!==a.value&&d.fireEvent("beforechange",d,g,a.value,a)!==false){a.value=g;if(d.rendered){d.inputEl.set({"aria-valuenow":g,"aria-valuetext":g});a.move(d.calculateThumbPosition(g),Ext.isDefined(b)?b!==false:d.animate);d.fireEvent("change",d,g,a);d.checkDirty();if(e){d.fireEvent("changecomplete",d,g,a)}}}},calculateThumbPosition:function(a){return(a-this.minValue)/(this.maxValue-this.minValue)*100},getRatio:function(){var b=this,a=this.vertical?this.innerEl.getHeight():this.innerEl.getWidth(),c=this.maxValue-this.minValue;return c===0?a:(a/c)},reversePixelValue:function(a){return this.minValue+(a/this.getRatio())},reversePercentageValue:function(a){return this.minValue+(this.maxValue-this.minValue)*(a/100)},onDisable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e,h;g.callParent();for(;d<a;d++){c=b[d];e=c.el;c.disable();if(Ext.isIE){h=e.getXY();e.hide();g.innerEl.addCls(g.disabledCls).dom.disabled=true;if(!g.thumbHolder){g.thumbHolder=g.endEl.createChild({cls:Ext.baseCSSPrefix+"slider-thumb "+g.disabledCls})}g.thumbHolder.show().setXY(h)}}},onEnable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e;this.callParent();for(;d<a;d++){c=b[d];e=c.el;c.enable();if(Ext.isIE){g.innerEl.removeCls(g.disabledCls).dom.disabled=false;if(g.thumbHolder){g.thumbHolder.hide()}e.show();g.syncThumbs()}}},syncThumbs:function(){if(this.rendered){var a=this.thumbs,c=a.length,b=0;for(;b<c;b++){a[b].move(this.calculateThumbPosition(a[b].value))}}},getValue:function(a){return Ext.isNumber(a)?this.thumbs[a].value:this.getValues()},getValues:function(){var c=[],d=0,b=this.thumbs,a=b.length;for(;d<a;d++){c.push(b[d].value)}return c},getSubmitValue:function(){var a=this;return(a.disabled||!a.submitValue)?null:a.getValue()},reset:function(){var e=this,b=[].concat(e.originalValue),c=0,d=b.length,g;for(;c<d;c++){g=b[c];e.setValue(c,g)}e.clearInvalid();delete e.wasValid},beforeDestroy:function(){var e=this,b=e.thumbs,d=0,a=b.length,c;Ext.destroy(e.innerEl,e.endEl,e.focusEl);for(;d<a;d++){c=b[d];Ext.destroy(c)}e.callParent()}});Ext.define("Ext.slider.Single",{extend:"Ext.slider.Multi",alias:["widget.slider","widget.sliderfield"],alternateClassName:["Ext.Slider","Ext.form.SliderField","Ext.slider.SingleSlider","Ext.slider.Slider"],getValue:function(){return this.callParent([0])},setValue:function(d,b){var c=arguments,a=c.length;if(a==1||(a<=3&&typeof c[1]!="number")){c=Ext.toArray(c);c.unshift(0)}return this.callParent(c)},getNearest:function(){return this.thumbs[0]}});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",autoHide:true,showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+c.anchorCls})},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,"mouseover",b.onTargetOver,b);b.mun(c,"mouseout",b.onTargetOut,b);b.mun(c,"mousemove",b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&&b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.getScopeParent())}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&&b.isVisible())&&b.autoHide!==false){b.hide()}}},getTargetXY:function(){var j=this,d,c,n,a,i,l,e,m,k,b,h,g;if(j.delegate){j.anchorTarget=j.triggerElement}if(j.anchor){j.targetCounter++;c=j.getOffsets();n=(j.anchorToTarget&&!j.trackMouse)?j.el.getAlignToXY(j.anchorTarget,j.getAnchorAlign()):j.targetXY;a=Ext.Element.getViewWidth()-5;i=Ext.Element.getViewHeight()-5;l=document.documentElement;e=document.body;m=(l.scrollLeft||e.scrollLeft||0)+5;k=(l.scrollTop||e.scrollTop||0)+5;b=[n[0]+c[0],n[1]+c[1]];h=j.getSize();g=j.constrainPosition;j.anchorEl.removeCls(j.anchorCls);if(j.targetCounter<2&&g){if(b[0]<m){if(j.anchorToTarget){j.defaultAlign="l-r";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="left";return j.getTargetXY()}if(b[0]+h.width>a){if(j.anchorToTarget){j.defaultAlign="r-l";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="right";return j.getTargetXY()}if(b[1]<k){if(j.anchorToTarget){j.defaultAlign="t-b";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="top";return j.getTargetXY()}if(b[1]+h.height>i){if(j.anchorToTarget){j.defaultAlign="b-t";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="bottom";return j.getTargetXY()}}j.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+j.getAnchorPosition();j.anchorEl.addCls(j.anchorCls);j.targetCounter=0;return b}else{d=j.getMouseOffset();return(j.targetXY)?[j.targetXY[0]+d[0],j.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)<a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.show,a.showDelay,a)}}else{if(!a.hidden&&a.autoHide!==false){a.show()}}},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&&!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer("dismiss");a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}if(!a.calledFromShowAt){a.showAt(a.getTargetXY())}if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();a.calledFromShowAt=true;if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true);a.el.sync(true);if(a.dismissDelay&&a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}}delete a.calledFromShowAt},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case"t":a="b";b="tl";d=[20+c.anchorOffset,1];break;case"r":a="l";b="tr";d=[-1,12+c.anchorOffset];break;case"b":a="t";b="bl";d=[20+c.anchorOffset,-1];break;default:a="r";b="tl";d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+"-"+b,d);c.anchorEl.setStyle("z-index",parseInt(c.el.getZIndex(),10)||0+1).setVisibilityMode(Ext.Element.DISPLAY)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer("show");a.clearTimer("dismiss");a.clearTimer("hide")},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(!a.closable&&!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.chart.Tip",{requires:["Ext.tip.ToolTip","Ext.chart.TipSurface"],constructor:function(b){var c=this,a,d,e;if(b.tips){c.tipTimeout=null;c.tipConfig=Ext.apply({},b.tips,{renderer:Ext.emptyFn,constrainPosition:true,autoHide:true});c.tooltip=new Ext.tip.ToolTip(c.tipConfig);c.chart.surface.on("mousemove",c.tooltip.onMouseMove,c.tooltip);c.chart.surface.on("mouseleave",function(){c.hideTip()});if(c.tipConfig.surface){a=c.tipConfig.surface;d=a.sprites;e=new Ext.chart.TipSurface({id:"tipSurfaceComponent",sprites:d});if(a.width&&a.height){e.setSize(a.width,a.height)}c.tooltip.add(e);c.spriteTip=e}}},showTip:function(l){var e=this,m,a,c,d,k,b,j,h,i,g;if(!e.tooltip){return}clearTimeout(e.tipTimeout);m=e.tooltip;a=e.spriteTip;c=e.tipConfig;d=m.trackMouse;if(!d){m.trackMouse=true;k=l.sprite;b=k.surface;j=Ext.get(b.getId());if(j){h=j.getXY();i=h[0]+(k.attr.x||0)+(k.attr.translation&&k.attr.translation.x||0);g=h[1]+(k.attr.y||0)+(k.attr.translation&&k.attr.translation.y||0);m.targetXY=[i,g]}}if(a){c.renderer.call(m,l.storeItem,l,a.surface)}else{c.renderer.call(m,l.storeItem,l)}m.show();m.trackMouse=d},hideTip:function(a){var b=this.tooltip;if(!b){return}clearTimeout(this.tipTimeout);this.tipTimeout=setTimeout(function(){b.hide()},0)}});Ext.define("Ext.chart.series.Series",{mixins:{observable:"Ext.util.Observable",labels:"Ext.chart.Label",highlights:"Ext.chart.Highlight",tips:"Ext.chart.Tip",callouts:"Ext.chart.Callout"},type:null,title:null,showInLegend:true,renderer:function(e,a,c,d,b){return c},shadowAttributes:null,triggerAfterDraw:false,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.shadowGroups=[];b.mixins.labels.constructor.call(b,a);b.mixins.highlights.constructor.call(b,a);b.mixins.tips.constructor.call(b,a);b.mixins.callouts.constructor.call(b,a);b.addEvents({scope:b,itemmouseover:true,itemmouseout:true,itemmousedown:true,itemmouseup:true,mouseleave:true,afterdraw:true,titlechange:true});b.mixins.observable.constructor.call(b,a);b.on({scope:b,itemmouseover:b.onItemMouseOver,itemmouseout:b.onItemMouseOut,mouseleave:b.onMouseLeave});if(b.style){Ext.apply(b.seriesStyle,b.style)}},eachRecord:function(c,b){var a=this.chart;(a.substore||a.store).each(c,b)},getRecordCount:function(){var b=this.chart,a=b.substore||b.store;return a?a.getCount():0},isExcluded:function(a){var b=this.__excludes;return !!(b&&b[a])},setBBox:function(a){var e=this,c=e.chart,b=c.chartBBox,g=a?0:c.maxGutter[0],d=a?0:c.maxGutter[1],h,i;h={x:b.x,y:b.y,width:b.width,height:b.height};e.clipBox=h;i={x:(h.x+g)-(c.zoom.x*c.zoom.width),y:(h.y+d)-(c.zoom.y*c.zoom.height),width:(h.width-(g*2))*c.zoom.width,height:(h.height-(d*2))*c.zoom.height};e.bbox=i},onAnimate:function(b,a){var c=this;b.stopAnimation();if(c.triggerAfterDraw){return b.animate(Ext.applyIf(a,c.chart.animate))}else{c.triggerAfterDraw=true;return b.animate(Ext.apply(Ext.applyIf(a,c.chart.animate),{listeners:{afteranimate:function(){c.triggerAfterDraw=false;c.fireEvent("afterrender")}}}))}},getGutters:function(){return[0,0]},onItemMouseOver:function(b){var a=this;if(b.series===a){if(a.highlight){a.highlightItem(b)}if(a.tooltip){a.showTip(b)}}},onItemMouseOut:function(b){var a=this;if(b.series===a){a.unHighlightItem();if(a.tooltip){a.hideTip(b)}}},onMouseLeave:function(){var a=this;a.unHighlightItem();if(a.tooltip){a.hideTip()}},getItemForPoint:function(a,j){if(!this.items||!this.items.length||this.seriesIsHidden){return null}var g=this,b=g.items,h=g.bbox,e,c,d;if(!Ext.draw.Draw.withinBox(a,j,h)){return null}for(c=0,d=b.length;c<d;c++){if(b[c]&&this.isItemInPoint(a,j,b[c],c)){return b[c]}}return null},isItemInPoint:function(a,d,c,b){return false},hideAll:function(){var h=this,g=h.items,m,e,d,c,a,k,b;h.seriesIsHidden=true;h._prevShowMarkers=h.showMarkers;h.showMarkers=false;h.hideLabels(0);for(d=0,e=g.length;d<e;d++){m=g[d];k=m.sprite;if(k){k.setAttributes({hidden:true},true)}if(k&&k.shadows){b=k.shadows;for(c=0,a=b.length;c<a;++c){b[c].setAttributes({hidden:true},true)}}}},showAll:function(){var a=this,b=a.chart.animate;a.chart.animate=false;a.seriesIsHidden=false;a.showMarkers=a._prevShowMarkers;a.drawSeries();a.chart.animate=b},hide:function(){if(this.items){var h=this,b=h.items,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d].sprite){b[d].sprite.hide(true);e=b[d].shadows||b[d].sprite.shadows;if(e){for(c=0,a=e.length;c<a;++c){e[c].hide(true)}}}}h.hideLabels()}}},getLegendColor:function(a){var b=this,d,c;if(b.seriesStyle){d=b.seriesStyle.fill;c=b.seriesStyle.stroke;if(d&&d!="none"){return d}if(c){return c}}return(b.colorArrayStyle)?b.colorArrayStyle[b.seriesIdx%b.colorArrayStyle.length]:"#000"},visibleInLegend:function(a){var b=this.__excludes;if(b){return !b[a]}return !this.seriesIsHidden},setTitle:function(a,d){var c=this,b=c.title;if(Ext.isString(a)){d=a;a=0}if(Ext.isArray(b)){b[a]=d}else{c.title=d}c.fireEvent("titlechange",d,a)}});Ext.define("Ext.chart.series.Cartesian",{extend:"Ext.chart.series.Series",alternateClassName:["Ext.chart.CartesianSeries","Ext.chart.CartesianChart"],xField:null,yField:null,axis:"left",getLegendLabels:function(){var j=this,e=[],g,d,h,k=j.combinations,l,a,c,b;g=[].concat(j.yField);for(d=0,h=g.length;d<h;d++){l=j.title;e.push((Ext.isArray(l)?l[d]:l)||g[d])}if(k){k=Ext.Array.from(k);for(d=0,h=k.length;d<h;d++){a=k[d];c=e[a[0]];b=e[a[1]];e[a[1]]=c+" & "+b;e.splice(a[0],1)}}return e},eachYValue:function(b,e,d){var j=this,h=j.getYValueAccessors(),c,g,a;for(c=0,g=h.length;c<g;c++){a=h[c];e.call(d,a(b),c)}},getYValueCount:function(){return this.getYValueAccessors().length},combine:function(g,e){var d=this,c=d.getYValueAccessors(),b=c[g],a=c[e];c[e]=function(h){return b(h)+a(h)};c.splice(g,1);d.callParent([g,e])},clearCombinations:function(){delete this.yValueAccessors;this.callParent()},getYValueAccessors:function(){var e=this,a=e.yValueAccessors,g,c,b,d;if(!a){a=e.yValueAccessors=[];g=[].concat(e.yField);for(b=0,d=g.length;b<d;b++){c=g[b];a.push(function(h){return h.get(c)})}}return a},getMinMaxXValues:function(){var k=this,j=k.chart,m=j.getChartStore(),d=m.data.items,e,h,g,c,l,a=k.xField,b;if(k.getRecordCount()>0){c=Infinity;l=-c;for(e=0,h=d.length;e<h;e++){g=d[e];b=g.get(a);if(b>l){l=b}if(b<c){c=b}}}else{c=l=0}return[c,l]},getMinMaxYValues:function(){var k=this,j=k.chart,o=j.getChartStore(),c=o.data.items,d,h,e,g=k.stacked,b,l,n,m;function a(r,q){if(!k.isExcluded(q)){if(r<0){m+=r}else{n+=r}}}function p(r,q){if(!k.isExcluded(q)){if(r>l){l=r}if(r<b){b=r}}}if(k.getRecordCount()>0){b=Infinity;l=-b;for(d=0,h=c.length;d<h;d++){e=c[d];if(g){n=0;m=0;k.eachYValue(e,a);if(n>l){l=n}if(m<b){b=m}}else{k.eachYValue(e,p)}}}else{b=l=0}return[b,l]},getAxesForXAndYFields:function(){var m=this,l=m.chart.axes,d=[].concat(m.axis),c={},e=[].concat(m.yField),n={},o=[].concat(m.xField),j,b,a,h,k,g;g=m.type==="bar"&&m.column===false;if(g){j=e;e=o;o=j}if(Ext.Array.indexOf(d,"top")>-1){b="top"}else{if(Ext.Array.indexOf(d,"bottom")>-1){b="bottom"}else{if(l.get("top")&&l.get("bottom")){for(h=0,k=o.length;h<k;h++){n[o[h]]=true}j=[].concat(l.get("bottom").fields);for(h=0,k=j.length;h<k;h++){if(n[j[h]]){b="bottom";break}}j=[].concat(l.get("top").fields);for(h=0,k=j.length;h<k;h++){if(n[j[h]]){b="top";break}}}else{if(l.get("top")){b="top"}else{if(l.get("bottom")){b="bottom"}}}}}if(Ext.Array.indexOf(d,"left")>-1){a="left"}else{if(Ext.Array.indexOf(d,"right")>-1){a="right"}else{if(l.get("left")&&l.get("right")){for(h=0,k=e.length;h<k;h++){c[e[h]]=true}j=[].concat(l.get("right").fields);for(h=0,k=j.length;h<k;h++){if(c[j[h]]){break}}j=[].concat(l.get("left").fields);for(h=0,k=j.length;h<k;h++){if(c[j[h]]){a="left";break}}}else{if(l.get("left")){a="left"}else{if(l.get("right")){a="right"}}}}}return g?{xAxis:a,yAxis:b}:{xAxis:b,yAxis:a}}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.Cartesian",alias:"series.area",requires:["Ext.chart.axis.Axis","Ext.draw.Color","Ext.fx.Anim"],type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;c.highlightCfg=Ext.Object.merge({},{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{__excludes:[]});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,o){var k=b.length,m=Math.floor(k/o),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=+b[h];for(g=0;g<l;++g){a[g]+=+n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var j=this,M=j.chart,a=M.getChartStore(),L=a.data.items,I,F,x,v=[].concat(j.yField),A=v.length,z=[],D=[],g=Infinity,C=g,B=g,n=-g,m=-g,s=Math,w=s.min,e=s.max,p=j.getAxesForXAndYFields(),J=p.xAxis,u=p.yAxis,G,r,k,h,E,q,N,K,b,t,H,c,d,o,y;j.setBBox();k=j.bbox;if(o=M.axes.get(J)){if(o.type==="Time"){r=true}G=o.applyData();C=G.from;n=G.to}if(o=M.axes.get(u)){G=o.applyData();B=G.from;m=G.to}if(j.xField&&!Ext.isNumber(C)){o=j.getMinMaxXValues();r=true;C=o[0];n=o[1]}if(j.yField&&!Ext.isNumber(B)){o=j.getMinMaxYValues();B=o[0];m=o[1]}if(!Ext.isNumber(B)){B=0}if(!Ext.isNumber(m)){m=0}for(I=0,F=L.length;I<F;I++){x=L[I];q=x.get(j.xField);N=[];if(typeof q!="number"){if(r){q=+q}else{q=I}}z.push(q);b=0;for(K=0;K<A;K++){if(j.__excludes[K]){continue}d=x.get(v[K]);if(typeof d=="number"){B=w(B,d);N.push(d);b+=d}}C=w(C,q);n=e(n,q);m=e(m,b);D.push(N)}h=k.width/((n-C)||1);E=k.height/((m-B)||1);t=z.length;if((t>k.width)&&j.areas){H=j.shrink(z,D,k.width);z=H.x;D=H.y}return{bbox:k,minX:C,minY:B,xValues:z,yValues:D,xScale:h,yScale:E,areasLen:A}},getPaths:function(){var w=this,m=w.chart,c=m.getChartStore(),e=true,g=w.getBounds(),a=g.bbox,n=w.items=[],v=[],b,d=0,p=[],s,j,k,h,q,t,l,z,r,u,o;j=g.xValues.length;for(s=0;s<j;s++){q=g.xValues[s];t=g.yValues[s];k=a.x+(q-g.minX)*g.xScale;l=0;d=0;for(z=0;z<g.areasLen;z++){if(w.__excludes[z]){continue}if(!v[z]){v[z]=[]}u=t[d];l+=u;h=a.y+a.height-(l-g.minY)*g.yScale;if(!p[z]){p[z]=["M",k,h];v[z].push(["L",k,h])}else{p[z].push("L",k,h);v[z].push(["L",k,h])}if(!n[z]){n[z]={pointsUp:[],pointsDown:[],series:w}}n[z].pointsUp.push([k,h]);d++}}for(z=0;z<g.areasLen;z++){if(w.__excludes[z]){continue}o=p[z];if(z==0||e){e=false;o.push("L",k,a.y+a.height,"L",a.x,a.y+a.height,"Z")}else{b=v[r];b.reverse();o.push("L",k,b[0][2]);for(s=0;s<j;s++){o.push(b[s][0],b[s][1],b[s][2]);n[z].pointsDown[j-s-1]=[b[s][1],b[s][2]]}o.push("L",a.x,o[2],"Z")}r=z}return{paths:p,areasLen:g.areasLen}},drawSeries:function(){var h=this,g=h.chart,i=g.getChartStore(),c=g.surface,b=g.animate,k=h.group,a=Ext.apply(h.seriesStyle,h.style),l=h.colorArrayStyle,o=l&&l.length||0,d,e,n,m,j;h.unHighlightItem();h.cleanHighlights();if(!i||!i.getCount()||h.seriesIsHidden){h.hide();h.items=[];return}n=h.getPaths();if(!h.areas){h.areas=[]}for(d=0;d<n.areasLen;d++){if(h.__excludes[d]){continue}if(!h.areas[d]){h.items[d].sprite=h.areas[d]=c.add(Ext.apply({},{type:"path",group:k,path:n.paths[d],stroke:a.stroke||l[d%o],fill:l[d%o]},a||{}))}e=h.areas[d];m=n.paths[d];if(b){j=h.renderer(e,false,{path:m,fill:l[d%o],stroke:a.stroke||l[d%o]},d,i);h.animation=h.onAnimate(e,{to:j})}else{j=h.renderer(e,false,{path:m,hidden:false,fill:l[d%o],stroke:a.stroke||l[d%o]},d,i);h.areas[d].setAttributes(j,true)}}h.renderLabels();h.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,s,p,o,c,e){var u=this,l=u.chart,r=l.resizing,t=u.label,q=t.renderer,b=t.field,a=u.bbox,j=s.point[0],h=s.point[1],d,n,m;g.setAttributes({text:q(k.get(b[e])),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,r,J,G,F,d,k){var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=(G==0)?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=J.point,A,g,N,K,o,q,b=m.label.getBBox(),I=30,C=10,B=3,h,e,j,w,u,E=M.clipRect,n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:w},true);m.label.setAttributes({x:n+(N[0]>0?B:-(b.width+B)),y:l},true);for(u in m){m[u].show(true)}},isItemInPoint:function(j,h,m,c){var g=this,b=m.pointsUp,d=m.pointsDown,q=Math.abs,o=false,l=false,e=Infinity,a,n,k;for(a=0,n=b.length;a<n;a++){k=[b[a][0],b[a][1]];o=false;l=a==n-1;if(e>q(j-k[0])){e=q(j-k[0]);o=true;if(l){++a}}if(!o||(o&&l)){k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){m.storeIndex=a-1;m.storeField=g.yField[c];m.storeItem=g.chart.store.getAt(a-1);m._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=new Ext.fx.Anim(Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=new Ext.fx.Anim({target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=true;b.areas[a].hide(true);b.redraw()},showAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=false;b.areas[a].show(true);b.redraw()},redraw:function(){var a=this,b;b=a.chart.legend.rebuild;a.chart.legend.rebuild=false;a.chart.redraw();a.chart.legend.rebuild=b},hide:function(){if(this.areas){var h=this,b=h.areas,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d]){b[d].hide(true)}}h.hideLabels()}}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Bar",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.BarSeries","Ext.chart.BarChart","Ext.chart.StackedBarChart"],requires:["Ext.chart.axis.Axis","Ext.fx.Anim"],type:"bar",alias:"series.bar",column:false,style:{},gutter:38.2,groupGutter:38.2,xPadding:0,yPadding:10,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:1.2}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:0.9}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:0.6}}]});e.group=a.getGroup(e.seriesId+"-bars");if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBarGirth:function(){var d=this,a=d.chart.getChartStore(),b=d.column,c=a.getCount(),e=d.gutter/100;return(d.chart.chartBBox[b?"width":"height"]-d[b?"xPadding":"yPadding"]*2)/(c*(e+1)-e)},getGutters:function(){var b=this,a=b.column,c=Math.ceil(b[a?"xPadding":"yPadding"]+b.getBarGirth()/2);return b.column?[c,0]:[0,c]},getBounds:function(){var o=this,O=o.chart,b=O.getChartStore(),N=b.data.items,M,x,D,v=[].concat(o.yField),p=v.length,l=p,c=o.groupGutter/100,H=o.column,h=o.xPadding,m=o.yPadding,J=o.stacked,t=o.getBarGirth(),y=H?"width":"height",u=Math,B=u.min,k=u.max,n=u.abs,G=o.getAxesForXAndYFields(),A=G.yAxis,L,C,e,q,F,r,s,E,z,a,w,I,K,d,g;o.setBBox(true);q=o.bbox;if(o.__excludes){for(K=0,w=o.__excludes.length;K<w;K++){if(o.__excludes[K]){l--}}}s=O.axes.get(A);if(s){L=s.applyData();F=L.from;r=L.to}if(o.yField&&!Ext.isNumber(F)){E=o.getMinMaxYValues();F=E[0];r=E[1]}if(!Ext.isNumber(F)){F=0}if(!Ext.isNumber(r)){r=0}z=(H?q.height-m*2:q.width-h*2)/(r-F);C=t;e=(t/((J?1:l)*(c+1)-c));if(y in o.style){e=B(e,o.style[y]);C=e*((J?1:l)*(c+1)-c)}a=(H)?q.y+q.height-m:q.x+h;if(J){w=[[],[]];for(M=0,x=N.length;M<x;M++){D=N[M];w[0][M]=w[0][M]||0;w[1][M]=w[1][M]||0;for(K=0;K<p;K++){if(o.__excludes&&o.__excludes[K]){continue}I=D.get(v[K]);w[+(I>0)][M]+=n(I)}}w[+(r>0)].push(n(r));w[+(F>0)].push(n(F));g=k.apply(u,w[0]);d=k.apply(u,w[1]);z=(H?q.height-m*2:q.width-h*2)/(d+g);a=a+g*z*(H?-1:1)}else{if(F/r<0){a=a-F*z*(H?-1:1)}}return{bars:v,bbox:q,shrunkBarWidth:C,barsLen:p,groupBarsLen:l,barWidth:t,groupBarWidth:e,scale:z,zero:a,xPadding:h,yPadding:m,signed:F/r<0,minY:F,maxY:r}},getPaths:function(){var v=this,X=v.chart,b=X.getChartStore(),W=b.data.items,V,E,L,G=v.bounds=v.getBounds(),z=v.items=[],P=v.yField,l=v.gutter/100,c=v.groupGutter/100,T=X.animate,N=v.column,x=v.group,m=X.shadow,R=v.shadowGroups,Q=v.shadowAttributes,q=R.length,y=G.bbox,B=G.barWidth,K=G.shrunkBarWidth,n=v.xPadding,r=v.yPadding,S=v.stacked,w=G.barsLen,O=v.colorArrayStyle,h=O&&O.length||0,C=Math,o=C.max,I=C.min,u=C.abs,U,Y,e,J,D,a,k,t,s,p,g,d,F,A,M,H;for(V=0,E=W.length;V<E;V++){L=W[V];a=G.zero;k=G.zero;J=0;D=0;t=false;for(U=0,g=0;U<w;U++){if(v.__excludes&&v.__excludes[U]){continue}Y=L.get(G.bars[U]);e=Math.round((Y-o(G.minY,0))*G.scale);s={fill:O[(w>1?U:0)%h]};if(N){Ext.apply(s,{height:e,width:o(G.groupBarWidth,0),x:(y.x+n+(B-K)*0.5+V*B*(1+l)+g*G.groupBarWidth*(1+c)*!S),y:a-e})}else{M=(E-1)-V;Ext.apply(s,{height:o(G.groupBarWidth,0),width:e+(a==G.zero),x:a+(a!=G.zero),y:(y.y+r+(B-K)*0.5+M*B*(1+l)+g*G.groupBarWidth*(1+c)*!S+1)})}if(e<0){if(N){s.y=k;s.height=u(e)}else{s.x=k+e;s.width=u(e)}}if(S){if(e<0){k+=e*(N?-1:1)}else{a+=e*(N?-1:1)}J+=u(e);if(e<0){D+=u(e)}}s.x=Math.floor(s.x)+1;H=Math.floor(s.y);if(!Ext.isIE9&&s.y>H){H--}s.y=H;s.width=Math.floor(s.width);s.height=Math.floor(s.height);z.push({series:v,yField:P[U],storeItem:L,value:[L.get(v.xField),Y],attr:s,point:N?[s.x+s.width/2,Y>=0?s.y:s.y+s.height]:[Y>=0?s.x+s.width:s.x,s.y+s.height/2]});if(T&&X.resizing){p=N?{x:s.x,y:G.zero,width:s.width,height:0}:{x:G.zero,y:s.y,width:0,height:s.height};if(m&&(S&&!t||!S)){t=true;for(d=0;d<q;d++){F=R[d].getAt(S?V:(V*w+U));if(F){F.setAttributes(p,true)}}}A=x.getAt(V*w+U);if(A){A.setAttributes(p,true)}}g++}if(S&&z.length){z[V*g].totalDim=J;z[V*g].totalNegDim=D}}},renderShadows:function(u,v,y,l){var z=this,p=z.chart,s=p.surface,g=p.animate,x=z.stacked,a=z.shadowGroups,w=z.shadowAttributes,o=a.length,h=p.getChartStore(),d=z.column,r=z.items,b=[],m=l.zero,e,q,k,A,n,t,c;if((x&&(u%l.groupBarsLen===0))||!x){t=u/l.groupBarsLen;for(e=0;e<o;e++){q=Ext.apply({},w[e]);k=a[e].getAt(x?t:u);Ext.copyTo(q,v,"x,y,width,height");if(!k){k=s.add(Ext.apply({type:"rect",group:a[e]},Ext.apply({},y,q)))}if(x){A=r[u].totalDim;n=r[u].totalNegDim;if(d){q.y=m+n-A-1;q.height=A}else{q.x=m-n;q.width=A}}c=z.renderer(k,h.getAt(t),q,u,h);c.hidden=!!v.hidden;if(g){z.onAnimate(k,{to:c})}else{k.setAttributes(c,true)}b.push(k)}}return b},drawSeries:function(){var C=this,r=C.chart,m=r.getChartStore(),v=r.surface,k=r.animate,A=C.stacked,d=C.column,b=r.shadow,a=C.shadowGroups,q=a.length,o=C.group,g=C.seriesStyle,s,p,y,x,B,t,c,e,h,n,l,z,u,w;if(!m||!m.getCount()||C.seriesIsHidden){C.hide();C.items=[];return}l=Ext.apply({},this.style,g);delete l.fill;delete l.x;delete l.y;delete l.width;delete l.height;C.unHighlightItem();C.cleanHighlights();C.getPaths();n=C.bounds;s=C.items;B=d?{y:n.zero,height:0}:{x:n.zero,width:0};p=s.length;for(y=0;y<p;y++){t=o.getAt(y);z=s[y].attr;if(b){s[y].shadows=C.renderShadows(y,z,B,n)}if(!t){u=Ext.apply({},B,z);u=Ext.apply(u,l||{});t=v.add(Ext.apply({},{type:"rect",group:o},u))}if(k){c=C.renderer(t,m.getAt(y),z,y,m);t._to=c;w=C.onAnimate(t,{to:Ext.apply(c,l)});if(b&&A&&(y%n.barsLen===0)){x=y/n.barsLen;for(e=0;e<q;e++){w.on("afteranimate",function(){this.show(true)},a[e].getAt(x))}}}else{c=C.renderer(t,m.getAt(y),Ext.apply(z,{hidden:false}),y,m);t.setAttributes(Ext.apply(c,l),true)}s[y].sprite=t}p=o.getCount();for(x=y;x<p;x++){o.getAt(x).hide(true)}if(C.stacked){y=m.getCount()}if(b){for(e=0;e<q;e++){h=a[e];p=h.getCount();for(x=y;x<p;x++){h.getAt(x).hide(true)}}}C.renderLabels()},onCreateLabel:function(e,l,d,g){var h=this,a=h.chart.surface,k=h.labelsGroup,b=h.label,c=Ext.apply({},b,h.seriesLabelStyle||{}),j;return a.add(Ext.apply({type:"text",group:k},c||{}))},onPlaceLabel:function(G,N,s,J,p,H,I,v){var m=this,n=m.bounds,d=n.groupBarWidth,F=m.column,L=m.chart,u=L.chartBBox,A=L.resizing,o=s.value[0],O=s.value[1],l=s.attr,z=m.label,K=z.orientation=="vertical",h=[].concat(z.field),t=z.renderer,r=t(N.get(h[v])),g=m.getLabelSize(r),a=g.width,c=g.height,b=n.zero,k="outside",q="insideStart",M="insideEnd",E=10,C=6,e=n.signed,D,B,w;G.setAttributes({text:r});G.isOutside=false;if(F){if(p==k){if(c+C+l.height>(O>=0?b-u.y:u.y+u.height-b)){p=M}}else{if(c+C>l.height){p=k;G.isOutside=true}}D=l.x+d/2;B=p==q?(b+((c/2+3)*(O>=0?-1:1))):(O>=0?(l.y+((c/2+3)*(p==k?-1:1))):(l.y+l.height+((c/2+3)*(p===k?1:-1))))}else{if(p==k){if(a+E+l.width>(O>=0?u.x+u.width-b:b-u.x)){p=M}}else{if(a+E>l.width){p=k;G.isOutside=true}}D=p==q?(b+((a/2+5)*(O>=0?1:-1))):(O>=0?(l.x+l.width+((a/2+5)*(p===k?1:-1))):(l.x+((a/2+5)*(p===k?-1:1))));B=l.y+d/2}w={x:D,y:B};if(K){w.rotate={x:D,y:B,degrees:270}}if(H&&A){if(F){D=l.x+l.width/2;B=b}else{D=b;B=l.y+l.height/2}G.setAttributes({x:D,y:B},true);if(K){G.setAttributes({rotate:{x:D,y:B,degrees:270}},true)}}if(H){m.onAnimate(G,{to:w})}else{G.setAttributes(Ext.apply(w,{hidden:false}),true)}},getLabelSize:function(g){var k=this.testerLabel,a=this.label,d=Ext.apply({},a,this.seriesLabelStyle||{}),b=a.orientation==="vertical",j,i,e,c;if(!k){k=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}k.setAttributes({text:g},true);j=k.getBBox();i=j.width;e=j.height;return{width:b?e:i,height:b?i:e}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,b){var c=b.sprite.getBBox();return c.x<=a&&c.y<=d&&(c.x+c.width)>=a&&(c.y+c.height)>=d},hideAll:function(a){var e=this.chart.axes,c=e.items,d=c.length,b=0;a=(isNaN(this._index)?a:this._index)||0;if(!this.__excludes){this.__excludes=[]}this.__excludes[a]=true;this.drawSeries();for(b;b<d;b++){c[b].drawAxis()}},showAll:function(a){var e=this.chart.axes,c=e.items,d=c.length,b=0;a=(isNaN(this._index)?a:this._index)||0;if(!this.__excludes){this.__excludes=[]}this.__excludes[a]=false;this.drawSeries();for(b;b<d;b++){c[b].drawAxis()}},getLegendColor:function(a){var c=this,b=c.colorArrayStyle.length;if(c.style&&c.style.fill){return c.style.fill}else{return c.colorArrayStyle[a%b]}},highlightItem:function(a){this.callParent(arguments);this.renderLabels()},unHighlightItem:function(){this.callParent(arguments);this.renderLabels()},cleanHighlights:function(){this.callParent(arguments);this.renderLabels()}});Ext.define("Ext.chart.series.Column",{alternateClassName:["Ext.chart.ColumnSeries","Ext.chart.ColumnChart","Ext.chart.StackedColumnChart"],extend:"Ext.chart.series.Bar",type:"column",alias:"series.column",column:true,xPadding:10,yPadding:0});Ext.define("Ext.chart.series.Gauge",{extend:"Ext.chart.series.Series",type:"gauge",alias:"series.gauge",rad:Math.PI/180,highlightDuration:150,angleField:false,needle:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)}},initialize:function(){var d=this,a=d.chart.getChartStore(),e=a.data.items,b,c,g;d.yField=[];if(d.label.field){for(b=0,c=e.length;b<c;b++){g=e[b];d.yField.push(g.get(d.label.field))}}},getSegment:function(b){var C=this,B=C.rad,d=Math.cos,a=Math.sin,n=Math.abs,k=C.centerX,i=C.centerY,w=0,v=0,u=0,s=0,h=0,g=0,e=0,c=0,z=0.01,m=b.endRho-b.startRho,q=b.startAngle,p=b.endAngle,j=(q+p)/2*B,l=b.margin||0,t=n(p-q)>180,D=Math.min(q,p)*B,A=Math.max(q,p)*B,o=false;k+=l*d(j);i+=l*a(j);w=k+b.startRho*d(D);h=i+b.startRho*a(D);v=k+b.endRho*d(D);g=i+b.endRho*a(D);u=k+b.startRho*d(A);e=i+b.startRho*a(A);s=k+b.endRho*d(A);c=i+b.endRho*a(A);if(n(w-u)<=z&&n(h-e)<=z){o=true}if(o){return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["Z"]]}}else{return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["L",u,e],["A",b.startRho,b.startRho,0,+t,0,w,h],["Z"]]}}},calcMiddle:function(p){var k=this,l=k.rad,o=p.slice,n=k.centerX,m=k.centerY,j=o.startAngle,e=o.endAngle,i=Math.max(("rho" in o)?o.rho:k.radius,k.label.minMargin),h=+k.donut,b=Math.min(j,e)*l,a=Math.max(j,e)*l,d=-(b+(a-b)/2),g=n+(p.endRho+p.startRho)/2*Math.cos(d),c=m-(p.endRho+p.startRho)/2*Math.sin(d);p.middle={x:g,y:c}},drawSeries:function(){var w=this,W=w.chart,b=W.getChartStore(),A=w.group,S=w.chart.animate,D=w.chart.axes.get(0),E=D&&D.minimum||w.minimum||0,I=D&&D.maximum||w.maximum||0,n=w.angleField||w.field||w.xField,M=W.surface,H=W.chartBBox,h=w.rad,c=+w.donut,X={},B=[],m=w.seriesStyle,a=w.seriesLabelStyle,g=w.colorArrayStyle,z=g&&g.length||0,K=W.maxGutter[0],J=W.maxGutter[1],k=Math.cos,s=Math.sin,t,e,d,v,r,C,O,F,G,L,U,T,l,V,x,o,Q,R,q,y,u,P,N;Ext.apply(m,w.style||{});w.setBBox();y=w.bbox;if(w.colorSet){g=w.colorSet;z=g.length}if(!b||!b.getCount()||w.seriesIsHidden){w.hide();w.items=[];return}e=w.centerX=H.x+(H.width/2);d=w.centerY=H.y+H.height;w.radius=Math.min(e-H.x,d-H.y);w.slices=r=[];w.items=B=[];if(!w.value){L=b.getAt(0);w.value=L.get(n)}O=w.value;if(w.needle){P={series:w,value:O,startAngle:-180,endAngle:0,rho:w.radius};u=-180*(1-(O-E)/(I-E));r.push(P)}else{u=-180*(1-(O-E)/(I-E));P={series:w,value:O,startAngle:-180,endAngle:u,rho:w.radius};N={series:w,value:w.maximum-O,startAngle:u,endAngle:0,rho:w.radius};r.push(P,N)}for(U=0,G=r.length;U<G;U++){v=r[U];C=A.getAt(U);t=Ext.apply({segment:{startAngle:v.startAngle,endAngle:v.endAngle,margin:0,rho:v.rho,startRho:v.rho*+c/100,endRho:v.rho}},Ext.apply(m,g&&{fill:g[U%z]}||{}));F=Ext.apply({},t.segment,{slice:v,series:w,storeItem:L,index:U});B[U]=F;if(!C){q=Ext.apply({type:"path",group:A},Ext.apply(m,g&&{fill:g[U%z]}||{}));C=M.add(Ext.apply(q,t))}v.sprite=v.sprite||[];F.sprite=C;v.sprite.push(C);if(S){t=w.renderer(C,L,t,U,b);C._to=t;w.onAnimate(C,{to:t})}else{t=w.renderer(C,L,Ext.apply(t,{hidden:false}),U,b);C.setAttributes(t,true)}}if(w.needle){u=u*Math.PI/180;if(!w.needleSprite){w.needleSprite=w.chart.surface.add({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))],"stroke-width":4,stroke:"#222"})}else{if(S){w.onAnimate(w.needleSprite,{to:{path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]}})}else{w.needleSprite.setAttributes({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]})}}w.needleSprite.setAttributes({hidden:false},true)}delete w.value},setValue:function(a){this.value=a;this.drawSeries()},onCreateLabel:function(c,b,a,d){},onPlaceLabel:function(c,g,e,d,h,a,b){},onPlaceCallout:function(){},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;return(e===0)&&(b>=g&&b<a&&k>=n.startRho&&k<=n.endRho)},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Line",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.LineSeries","Ext.chart.LineChart"],requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.draw.Draw","Ext.fx.Anim"],type:"line",alias:"series.line",selectionTolerance:20,showMarkers:true,markerConfig:{},style:{},smooth:false,defaultSmoothness:3,fill:false,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({"stroke-width":3},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}}]});e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},shrink:function(b,k,l){var h=b.length,j=Math.floor(h/l),g=1,d=0,a=0,e=[+b[0]],c=[+k[0]];for(;g<h;++g){d+=+b[g]||0;a+=+k[g]||0;if(g%j==0){e.push(d/j);c.push(a/j);d=0;a=0}}return{x:e,y:c}},drawSeries:function(){var an=this,aA=an.chart,V=aA.axes,av=aA.getChartStore(),A=av.data.items,ar,Y=av.getCount(),w=an.chart.surface,au={},U=an.group,N=an.showMarkers,aG=an.markerGroup,G=aA.shadow,F=an.shadowGroups,ab=an.shadowAttributes,R=an.smooth,r=F.length,ay=["M"],W=["M"],d=["M"],b=["M"],M=aA.markerIndex,am=[].concat(an.axis),al,aB=[],ak={},ae=[],z={},L=false,T=[],aF=an.markerStyle,ad=an.seriesStyle,v=an.colorArrayStyle,S=v&&v.length||0,O=Ext.isNumber,aC=an.seriesIdx,h=an.getAxesForXAndYFields(),m=h.xAxis,aE=h.yAxis,ag,k,af,ah,D,c,ai,K,J,g,e,u,s,aa,Q,P,az,n,I,H,aH,o,q,E,a,ac,aj,C,ax,B,aw,p,aD,at,aq,X,l,t,ao,ap,Z;if(an.fireEvent("beforedraw",an)===false){return}if(!Y||an.seriesIsHidden){an.hide();an.items=[];if(an.line){an.line.hide(true);if(an.line.shadows){ag=an.line.shadows;for(P=0,r=ag.length;P<r;P++){k=ag[P];k.hide(true)}}if(an.fillPath){an.fillPath.hide(true)}}an.line=null;an.fillPath=null;return}at=Ext.apply(aF||{},an.markerConfig,{fill:an.seriesStyle.fill||v[aC%v.length]});X=at.type;delete at.type;aq=ad;if(!aq["stroke-width"]){aq["stroke-width"]=0.5}t="opacity" in aq?aq.opacity:1;Z="opacity" in aq?aq.opacity:0.3;ao="lineOpacity" in aq?aq.lineOpacity:t;ap="fillOpacity" in aq?aq.fillOpacity:Z;if(M&&aG&&aG.getCount()){for(Q=0;Q<M;Q++){H=aG.getAt(Q);aG.remove(H);aG.add(H);aH=aG.getAt(aG.getCount()-2);H.setAttributes({x:0,y:0,translate:{x:aH.attr.translation.x,y:aH.attr.translation.y}},true)}}an.unHighlightItem();an.cleanHighlights();an.setBBox();au=an.bbox;an.clipRect=[au.x,au.y,au.width,au.height];if(n=V.get(m)){I=n.applyData();C=I.from;ax=I.to}if(n=V.get(aE)){I=n.applyData();B=I.from;aw=I.to}if(an.xField&&!Ext.isNumber(C)){n=an.getMinMaxXValues();C=n[0];ax=n[1]}if(an.yField&&!Ext.isNumber(B)){n=an.getMinMaxYValues();B=n[0];aw=n[1]}if(isNaN(C)){C=0;ac=au.width/((Y-1)||1)}else{ac=au.width/((ax-C)||(Y-1)||1)}if(isNaN(B)){B=0;aj=au.height/((Y-1)||1)}else{aj=au.height/((aw-B)||(Y-1)||1)}for(Q=0,az=A.length;Q<az;Q++){ar=A[Q];q=ar.get(an.xField);if(typeof q=="string"||typeof q=="object"&&!Ext.isDate(q)||m&&V.get(m)&&V.get(m).type=="Category"){if(q in ak){q=ak[q]}else{q=ak[q]=Q}}E=ar.get(an.yField);if(typeof E=="undefined"||(typeof E=="string"&&!E)){continue}if(typeof E=="string"||typeof E=="object"&&!Ext.isDate(E)||aE&&V.get(aE)&&V.get(aE).type=="Category"){E=Q}T.push(Q);aB.push(q);ae.push(E)}az=aB.length;if(az>au.width){a=an.shrink(aB,ae,au.width);aB=a.x;ae=a.y}an.items=[];l=0;az=aB.length;for(Q=0;Q<az;Q++){q=aB[Q];E=ae[Q];if(E===false){if(W.length==1){W=[]}L=true;an.items.push(false);continue}else{K=(au.x+(q-C)*ac).toFixed(2);J=((au.y+au.height)-(E-B)*aj).toFixed(2);if(L){L=false;W.push("M")}W=W.concat([K,J])}if((typeof s=="undefined")&&(typeof J!="undefined")){s=J;u=K}if(!an.line||aA.resizing){ay=ay.concat([K,au.y+au.height/2])}if(aA.animate&&aA.resizing&&an.line){an.line.setAttributes({path:ay,opacity:ao},true);if(an.fillPath){an.fillPath.setAttributes({path:ay,opacity:ap},true)}if(an.line.shadows){ag=an.line.shadows;for(P=0,r=ag.length;P<r;P++){k=ag[P];k.setAttributes({path:ay},true)}}}if(N){H=aG.getAt(l++);if(!H){H=Ext.chart.Shape[X](w,Ext.apply({group:[U,aG],x:0,y:0,translate:{x:+(g||K),y:e||(au.y+au.height/2)},value:'"'+q+", "+E+'"',zIndex:4000},at));H._to={translate:{x:+K,y:+J}}}else{H.setAttributes({value:'"'+q+", "+E+'"',x:0,y:0,hidden:false},true);H._to={translate:{x:+K,y:+J}}}}an.items.push({series:an,value:[q,E],point:[K,J],sprite:H,storeItem:av.getAt(T[Q])});g=K;e=J}if(W.length<=1){return}if(an.smooth){b=Ext.draw.Draw.smooth(W,O(R)?R:an.defaultSmoothness)}d=R?b:W;if(aA.markerIndex&&an.previousPath){ah=an.previousPath;if(!R){Ext.Array.erase(ah,1,2)}}else{ah=W}if(!an.line){an.line=w.add(Ext.apply({type:"path",group:U,path:ay,stroke:aq.stroke||aq.fill},aq||{}));an.line.setAttributes({opacity:ao},true);if(G){an.line.setAttributes(Ext.apply({},an.shadowOptions),true)}an.line.setAttributes({fill:"none",zIndex:3000});if(!aq.stroke&&S){an.line.setAttributes({stroke:v[aC%S]},true)}if(G){ag=an.line.shadows=[];for(af=0;af<r;af++){al=ab[af];al=Ext.apply({},al,{path:ay});k=w.add(Ext.apply({},{type:"path",group:F[af]},al));ag.push(k)}}}if(an.fill){c=d.concat([["L",K,au.y+au.height],["L",u,au.y+au.height],["L",u,s]]);if(!an.fillPath){an.fillPath=w.add({group:U,type:"path",fill:aq.fill||v[aC%S],path:ay})}}aa=N&&aG.getCount();if(aA.animate){D=an.fill;p=an.line;ai=an.renderer(p,false,{path:d},Q,av);Ext.apply(ai,aq||{},{stroke:aq.stroke||aq.fill});delete ai.fill;p.show(true);if(aA.markerIndex&&an.previousPath){an.animation=aD=an.onAnimate(p,{to:ai,from:{path:ah}})}else{an.animation=aD=an.onAnimate(p,{to:ai})}if(G){ag=p.shadows;for(P=0;P<r;P++){ag[P].show(true);if(aA.markerIndex&&an.previousPath){an.onAnimate(ag[P],{to:{path:d},from:{path:ah}})}else{an.onAnimate(ag[P],{to:{path:d}})}}}if(D){an.fillPath.show(true);an.onAnimate(an.fillPath,{to:Ext.apply({},{path:c,fill:aq.fill||v[aC%S],"stroke-width":0,opacity:ap},aq||{})})}if(N){l=0;for(Q=0;Q<az;Q++){if(an.items[Q]){o=aG.getAt(l++);if(o){ai=an.renderer(o,av.getAt(Q),o._to,Q,av);an.onAnimate(o,{to:Ext.apply(ai,at||{})});o.show(true)}}}for(;l<aa;l++){o=aG.getAt(l);o.hide(true)}}}else{ai=an.renderer(an.line,false,{path:d,hidden:false},Q,av);Ext.apply(ai,aq||{},{stroke:aq.stroke||aq.fill});delete ai.fill;an.line.setAttributes(ai,true);an.line.setAttributes({opacity:ao},true);if(G){ag=an.line.shadows;for(P=0;P<r;P++){ag[P].setAttributes({path:d,hidden:false},true)}}if(an.fill){an.fillPath.setAttributes({path:c,hidden:false,opacity:ap},true)}if(N){l=0;for(Q=0;Q<az;Q++){if(an.items[Q]){o=aG.getAt(l++);if(o){ai=an.renderer(o,av.getAt(Q),o._to,Q,av);o.setAttributes(Ext.apply(at||{},ai||{}),true);if(!o.attr.hidden){o.show(true)}}}}for(;l<aa;l++){o=aG.getAt(l);o.hide(true)}}}if(aA.markerIndex){if(an.smooth){Ext.Array.erase(W,1,2)}else{Ext.Array.splice(W,1,0,W[1],W[2])}an.previousPath=W}an.renderLabels();an.renderCallouts();an.fireEvent("draw",an)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,s,p,o,d){var u=this,l=u.chart,r=l.resizing,t=u.label,q=t.renderer,b=t.field,a=u.bbox,j=s.point[0],h=s.point[1],c=s.sprite.attr.radius,e,n,m;g.setAttributes({text:q(k.get(b)),hidden:true},true);if(o=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(o=="under"||o=="over"){e=s.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(o=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r&&u.animation){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},highlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&!a.highlighted){if(!("__strokeWidth" in a.line)){a.line.__strokeWidth=parseFloat(a.line.attr["stroke-width"])||0}if(a.line.__anim){a.line.__anim.paused=true}a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth+3}});a.highlighted=true}},unHighlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&a.highlighted){a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth}});a.highlighted=false}},onPlaceCallout:function(m,r,J,G,F,d,k){if(!F){return}var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=G==0?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=[+J.point[0],+J.point[1]],A,g,N,K,o,q,I=L.offsetFromViz||30,C=L.offsetToSide||10,B=L.offsetBox||3,h,e,j,w,u,E=M.clipRect,b={width:L.styles.width||10,height:L.styles.height||10},n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(s.animate){M.onAnimate(m.lines,{to:{path:["M",c[0],c[1],"L",n,l,"Z"]}});if(m.panel){m.panel.setPosition(h,e,true)}}else{m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);if(m.panel){m.panel.setPosition(h,e)}}for(u in m){m[u].show(true)}},isItemInPoint:function(j,g,A,q){var C=this,n=C.items,s=C.selectionTolerance,k=null,z,c,p,v,h,w,b,t,a,l,B,e,d,o,u,r,D=Math.sqrt,m=Math.abs;c=n[q];z=q&&n[q-1];if(q>=h){z=n[h-1]}p=z&&z.point;v=c&&c.point;w=z?p[0]:v[0]-s;b=z?p[1]:v[1];t=c?v[0]:p[0]+s;a=c?v[1]:p[1];e=D((j-w)*(j-w)+(g-b)*(g-b));d=D((j-t)*(j-t)+(g-a)*(g-a));o=Math.min(e,d);if(o<=s){return o==e?z:c}return false},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Cartesian.prototype.hideAll.call(e)}else{Ext.chart.series.Cartesian.prototype.showAll.call(e)}if(e.line){e.line.setAttributes({hidden:!a},true);if(e.line.shadows){for(b=0,c=e.line.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}if(e.fillPath){e.fillPath.setAttributes({hidden:!a},true)}},hideAll:function(){this.toggleAll(false)},showAll:function(){this.toggleAll(true)}});Ext.define("Ext.chart.series.Pie",{alternateClassName:["Ext.chart.PieSeries","Ext.chart.PieChart"],extend:"Ext.chart.series.Series",type:"pie",alias:"series.pie",accuracy:100000,rad:Math.PI*2/100000,highlightDuration:150,angleField:false,lengthField:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;b.highlightCfg=Ext.merge({segment:{margin:20}},b.highlightCfg);Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(l){var i=h.getSegment(l);if(!i.path||i.path.length===0){i.path=["M",0,0]}return i};h.__excludes=h.__excludes||[]},initialize:function(){var d=this,a=d.chart.getChartStore(),e=a.data.items,b,c,g;d.yField=[];if(d.label.field){for(b=0,c=e.length;b<c;b++){g=e[b];d.yField.push(g.get(d.label.field))}}},getSegment:function(d){var J=this,I=J.rad,i=Math.cos,a=Math.sin,p=J.centerX,n=J.centerY,E=0,D=0,C=0,A=0,l=0,k=0,j=0,g=0,w=0,c=0,v=0,b=0,G=0.01,z=d.startAngle,u=d.endAngle,o=(z+u)/2*I,r=d.margin||0,K=Math.min(z,u)*I,H=Math.max(z,u)*I,t=i(K),h=a(K),s=i(H),e=a(H),m=i(o),F=a(o),B=0,q=0.7071067811865476;if(H-K<G){return{path:""}}if(r!==0){p+=r*m;n+=r*F}D=p+d.endRho*t;k=n+d.endRho*h;A=p+d.endRho*s;g=n+d.endRho*e;v=p+d.endRho*m;b=n+d.endRho*F;if(d.startRho!==0){E=p+d.startRho*t;l=n+d.startRho*h;C=p+d.startRho*s;j=n+d.startRho*e;w=p+d.startRho*m;c=n+d.startRho*F;return{path:[["M",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",C,j],["A",d.startRho,d.startRho,0,B,0,w,c],["L",w,c],["A",d.startRho,d.startRho,0,0,0,E,l],["L",E,l],["Z"]]}}else{return{path:[["M",p,n],["L",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",p,n],["Z"]]}}},calcMiddle:function(n){var i=this,j=i.rad,m=n.slice,l=i.centerX,k=i.centerY,h=m.startAngle,d=m.endAngle,g=+i.donut,c=-(h+d)*j/2,a=(n.endRho+n.startRho)/2,e=l+a*Math.cos(c),b=k-a*Math.sin(c);n.middle={x:e,y:b}},drawSeries:function(){var s=this,a=s.chart.getChartStore(),W=a.data.items,I,x=s.group,S=s.chart.animate,k=s.angleField||s.field||s.xField,A=[].concat(s.lengthField),R=0,X=s.chart,J=X.surface,G=X.chartBBox,g=X.shadow,Q=s.shadowGroups,P=s.shadowAttributes,aa=Q.length,K=A.length,B=0,b=+s.donut,Z=[],y=[],u=0,M=0,t=0,h=s.seriesStyle,e=s.colorArrayStyle,w=e&&e.length||0,o,Y,C,H,E,d,c,q,l=0,r,n,z,L,D,ab,F,U,T,V,N,O,m,v;Ext.apply(h,s.style||{});s.setBBox();v=s.bbox;if(s.colorSet){e=s.colorSet;w=e.length}if(!a||!a.getCount()||s.seriesIsHidden){s.hide();s.items=[];return}s.unHighlightItem();s.cleanHighlights();d=s.centerX=G.x+(G.width/2);c=s.centerY=G.y+(G.height/2);s.radius=Math.min(d-G.x,c-G.y);s.slices=n=[];s.items=y=[];for(U=0,F=W.length;U<F;U++){I=W[U];if(this.__excludes&&this.__excludes[U]){continue}u+=+I.get(k);if(A[0]){for(T=0,R=0;T<K;T++){R+=+I.get(A[T])}Z[U]=R;M=Math.max(M,R)}}u=u||1;for(U=0,F=W.length;U<F;U++){I=W[U];if(this.__excludes&&this.__excludes[U]){L=0}else{L=I.get(k);if(l==0){l=1}}if(l==1){l=2;s.firstAngle=t=s.accuracy*L/u/2;for(T=0;T<U;T++){n[T].startAngle=n[T].endAngle=s.firstAngle}}V=t-s.accuracy*L/u;r={series:s,value:L,startAngle:t,endAngle:V,storeItem:I};if(A[0]){ab=+Z[U];r.rho=Math.floor(s.radius/M*ab)}else{r.rho=s.radius}n[U]=r;(function(){t=V})()}if(g){for(U=0,F=n.length;U<F;U++){r=n[U];r.shadowAttrs=[];for(T=0,B=0,C=[];T<K;T++){z=x.getAt(U*K+T);q=A[T]?a.getAt(U).get(A[T])/Z[U]*r.rho:r.rho;o={segment:{startAngle:r.startAngle,endAngle:r.endAngle,margin:0,rho:r.rho,startRho:B+(q*b/100),endRho:B+q},hidden:!r.value&&(r.startAngle%s.accuracy)==(r.endAngle%s.accuracy)};for(E=0,C=[];E<aa;E++){Y=P[E];H=Q[E].getAt(U);if(!H){H=X.surface.add(Ext.apply({},{type:"path",group:Q[E],strokeLinejoin:"round"},o,Y))}if(S){Y=s.renderer(H,a.getAt(U),Ext.apply({},o,Y),U,a);s.onAnimate(H,{to:Y})}else{Y=s.renderer(H,a.getAt(U),Y,U,a);H.setAttributes(Y,true)}C.push(H)}r.shadowAttrs[T]=C}}}for(U=0,F=n.length;U<F;U++){r=n[U];for(T=0,B=0;T<K;T++){z=x.getAt(U*K+T);q=A[T]?a.getAt(U).get(A[T])/Z[U]*r.rho:r.rho;o=Ext.apply({segment:{startAngle:r.startAngle,endAngle:r.endAngle,margin:0,rho:r.rho,startRho:B+(q*b/100),endRho:B+q},hidden:(!r.value&&(r.startAngle%s.accuracy)==(r.endAngle%s.accuracy))},Ext.apply(h,e&&{fill:e[(K>1?T:U)%w]}||{}));D=Ext.apply({},o.segment,{slice:r,series:s,storeItem:r.storeItem,index:U});s.calcMiddle(D);if(g){D.shadows=r.shadowAttrs[T]}y[U]=D;if(!z){m=Ext.apply({type:"path",group:x,middle:D.middle},Ext.apply(h,e&&{fill:e[(K>1?T:U)%w]}||{}));z=J.add(Ext.apply(m,o))}r.sprite=r.sprite||[];D.sprite=z;r.sprite.push(z);r.point=[D.middle.x,D.middle.y];if(S){o=s.renderer(z,a.getAt(U),o,U,a);z._to=o;z._animating=true;s.onAnimate(z,{to:o,listeners:{afteranimate:{fn:function(){this._animating=false},scope:z}}})}else{o=s.renderer(z,a.getAt(U),Ext.apply(o,{hidden:false}),U,a);z.setAttributes(o,true)}B+=q}}F=x.getCount();for(U=0;U<F;U++){if(!n[(U/K)>>0]&&x.getAt(U)){x.getAt(U).hide(true)}}if(g){aa=Q.length;for(E=0;E<F;E++){if(!n[(E/K)>>0]){for(T=0;T<aa;T++){if(Q[T].getAt(E)){Q[T].getAt(E).hide(true)}}}}}s.renderLabels();s.renderCallouts()},onCreateLabel:function(g,l,e,h){var j=this,k=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,m=l.middle,b=Ext.apply(j.seriesLabelStyle||{},a||{});return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:k,x:m.x,y:m.y},b))},onPlaceLabel:function(k,p,z,t,s,e,g){var B=this,q=B.chart,w=q.resizing,A=B.label,u=A.renderer,c=[].concat(A.field),m=B.centerX,l=B.centerY,C=z.middle,b={x:C.x,y:C.y},o=C.x-m,n=C.y-l,r={},d=1,j=Math.atan2(n,o||1),v=j*180/Math.PI,h;b.hidden=false;if(this.__excludes&&this.__excludes[t]){b.hidden=true}function a(i){if(i<0){i+=360}return i%360}k.setAttributes({text:u(p.get(c[g]))},true);switch(s){case"outside":d=Math.sqrt(o*o+n*n)*2;b.x=d*Math.cos(j)+m;b.y=d*Math.sin(j)+l;break;case"rotate":v=a(v);v=(v>90&&v<270)?v+180:v;h=k.attr.rotation.degrees;if(h!=null&&Math.abs(h-v)>180*0.5){if(v>h){v-=360}else{v+=360}v=v%360}else{v=a(v)}b.rotate={degrees:v,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!w&&(s!="rotate"||h!=null)){B.onAnimate(k,{to:b})}else{k.setAttributes(b,true)}k._from=r},onPlaceCallout:function(l,o,z,v,u,d,e){var A=this,q=A.chart,j=A.centerX,h=A.centerY,B=z.middle,b={x:B.x,y:B.y},m=B.x-j,k=B.y-h,c=1,n,g=Math.atan2(k,m||1),a=l.label.getBBox(),w=20,t=10,s=10,r;c=z.endRho+w;n=(z.endRho+z.startRho)/2+(z.endRho-z.startRho)/3;b.x=c*Math.cos(g)+j;b.y=c*Math.sin(g)+h;m=n*Math.cos(g);k=n*Math.sin(g);if(q.animate){A.onAnimate(l.lines,{to:{path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]}});A.onAnimate(l.box,{to:{x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s}});A.onAnimate(l.label,{to:{x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)}})}else{l.lines.setAttributes({path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]},true);l.box.setAttributes({x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s},true);l.label.setAttributes({x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)},true)}for(r in l){l[r].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;if(b>h.firstAngle){b-=h.accuracy}return(b<=g&&b>a&&k>=n.startRho&&k<=n.endRho)},hideAll:function(c){var g,b,j,h,e,a,d;c=(isNaN(this._index)?c:this._index)||0;this.__excludes=this.__excludes||[];this.__excludes[c]=true;d=this.slices[c].sprite;for(e=0,a=d.length;e<a;e++){d[e].setAttributes({hidden:true},true)}if(this.slices[c].shadowAttrs){for(g=0,h=this.slices[c].shadowAttrs,b=h.length;g<b;g++){j=h[g];for(e=0,a=j.length;e<a;e++){j[e].setAttributes({hidden:true},true)}}}this.drawSeries()},showAll:function(a){a=(isNaN(this._index)?a:this._index)||0;this.__excludes[a]=false;this.drawSeries()},highlightItem:function(s){var u=this,t=u.rad,w,d,o,q,a,e,k,b,m,c,g,p,h,v,n,l,j;s=s||this.items[this._index];this.unHighlightItem();if(!s||s.sprite&&s.sprite._animating){return}u.callParent([s]);if(!u.highlight){return}if("segment" in u.highlightCfg){w=u.highlightCfg.segment;d=u.chart.animate;if(u.labelsGroup){g=u.labelsGroup;p=u.label.display;h=g.getAt(s.index);v=(s.startAngle+s.endAngle)/2*t;n=w.margin||0;l=n*Math.cos(v);j=n*Math.sin(v);if(Math.abs(l)<1e-10){l=0}if(Math.abs(j)<1e-10){j=0}if(d){h.stopAnimation();h.animate({to:{translate:{x:l,y:j}},duration:u.highlightDuration})}else{h.setAttributes({translate:{x:l,y:j}},true)}}if(u.chart.shadow&&s.shadows){q=0;a=s.shadows;k=a.length;for(;q<k;q++){e=a[q];b={};m=s.sprite._from.segment;for(c in m){if(!(c in w)){b[c]=m[c]}}o={segment:Ext.applyIf(b,u.highlightCfg.segment)};if(d){e.stopAnimation();e.animate({to:o,duration:u.highlightDuration})}else{e.setAttributes(o,true)}}}}},unHighlightItem:function(){var w=this,l,e,d,k,t,s,r,q,x,m,c,a,v,n,b,g,u,h,o;if(!w.highlight){return}if(("segment" in w.highlightCfg)&&w.items){l=w.items;e=w.chart.animate;d=!!w.chart.shadow;k=w.labelsGroup;t=l.length;s=0;r=0;q=w.label.display;for(;s<t;s++){u=l[s];if(!u){continue}n=u.sprite;if(n&&n._highlighted){if(k){h=k.getAt(u.index);o=Ext.apply({translate:{x:0,y:0}},q=="rotate"?{rotate:{x:h.attr.x,y:h.attr.y,degrees:h.attr.rotation.degrees}}:{});if(e){h.stopAnimation();h.animate({to:o,duration:w.highlightDuration})}else{h.setAttributes(o,true)}}if(d){b=u.shadows;x=b.length;for(;r<x;r++){c={};a=u.sprite._to.segment;v=u.sprite._from.segment;Ext.apply(c,v);for(m in a){if(!(m in v)){c[m]=a[m]}}g=b[r];if(e){g.stopAnimation();g.animate({to:{segment:c},duration:w.highlightDuration})}else{g.setAttributes({segment:c},true)}}}}}}w.callParent(arguments)},getLegendColor:function(a){var b=this;return(b.colorSet&&b.colorSet[a%b.colorSet.length])||b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Radar",{extend:"Ext.chart.series.Series",requires:["Ext.chart.Shape","Ext.fx.Anim"],type:"radar",alias:"series.radar",rad:Math.PI/180,showInLegend:false,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}},drawSeries:function(){var w=this,c=w.chart.getChartStore(),S=c.data.items,T,I,z=w.group,B,U=w.chart,L=U.series.items,M,v,m,Q=U.animate,o=w.field||w.yField,K=U.surface,F=U.chartBBox,E=w.seriesIdx,j=w.colorArrayStyle,g,e,A,N,r=0,a=[],D=Math.max,k=Math.cos,t=Math.sin,q=Math.PI*2,P=c.getCount(),h,O,J,H,G,R,u,n=w.seriesStyle,b=w.seriesLabelStyle,p=U.resizing||!w.radar,C=U.axes&&U.axes.get(0),V=!(C&&C.maximum);w.setBBox();r=V?0:(C.maximum||0);Ext.apply(n,w.style||{});if(!c||!c.getCount()||w.seriesIsHidden){w.hide();w.items=[];if(w.radar){w.radar.hide(true)}w.radar=null;return}if(!n.stroke){n.stroke=j[E%j.length]}w.unHighlightItem();w.cleanHighlights();g=w.centerX=F.x+(F.width/2);e=w.centerY=F.y+(F.height/2);w.radius=N=Math.min(F.width,F.height)/2;w.items=A=[];if(V){for(M=0,v=L.length;M<v;M++){m=L[M];a.push(m.yField)}for(T=0;T<P;T++){I=S[T];for(R=0,u=a.length;R<u;R++){r=D(+I.get(a[R]),r)}}}r=r||1;h=[];O=[];for(R=0;R<P;R++){I=S[R];G=N*I.get(o)/r;J=G*k(R/P*q);H=G*t(R/P*q);if(R==0){O.push("M",J+g,H+e);h.push("M",0.01*J+g,0.01*H+e)}else{O.push("L",J+g,H+e);h.push("L",0.01*J+g,0.01*H+e)}A.push({sprite:false,point:[g+J,e+H],storeItem:I,series:w})}O.push("Z");if(!w.radar){w.radar=K.add(Ext.apply({type:"path",group:z,path:h},n||{}))}if(U.resizing){w.radar.setAttributes({path:h},true)}if(U.animate){w.onAnimate(w.radar,{to:Ext.apply({path:O},n||{})})}else{w.radar.setAttributes(Ext.apply({path:O},n||{}),true)}if(w.showMarkers){w.drawMarkers()}w.renderLabels();w.renderCallouts()},drawMarkers:function(){var n=this,k=n.chart,a=k.surface,b=Ext.apply({},n.markerStyle||{}),j=Ext.apply(b,n.markerConfig,{fill:n.colorArrayStyle[n.seriesIdx%n.colorArrayStyle.length]}),m=n.items,o=j.type,q=n.markerGroup,e=n.centerX,d=n.centerY,p,h,c,g;delete j.type;for(h=0,c=m.length;h<c;h++){p=m[h];g=q.getAt(h);if(!g){g=Ext.chart.Shape[o](a,Ext.apply({group:q,x:0,y:0,translate:{x:e,y:d}},j))}else{g.show()}p.sprite=g;if(k.resizing){g.setAttributes({x:0,y:0,translate:{x:e,y:d}},true)}g._to={translate:{x:p.point[0],y:p.point[1]}};if(k.animate){n.onAnimate(g,{to:g._to})}else{g.setAttributes(Ext.apply(g._to,j||{}),true)}}},isItemInPoint:function(c,g,e){var b,d=10,a=Math.abs;b=e.point;return(a(b[0]-c)<=d&&a(b[1]-g)<=d)},onCreateLabel:function(g,m,e,h){var j=this,l=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,k=m.point,b=Ext.apply(j.seriesLabelStyle||{},a);return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:l,x:d,y:c},a||{}))},onPlaceLabel:function(q,h,s,g,k,b){var m=this,l=m.chart,j=l.resizing,c=m.label,r=c.renderer,p=c.field,e=m.centerX,d=m.centerY,a={x:s.point[0],y:s.point[1]},o=a.x-e,n=a.y-d;q.setAttributes({text:r(h.get(p)),hidden:true},true);if(j){q.setAttributes({x:e,y:d},true)}if(b){q.show(true);m.onAnimate(q,{to:a})}else{q.setAttributes(a,true);q.show(true)}},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Radar.superclass.hideAll.call(e)}else{Ext.chart.series.Radar.superclass.showAll.call(e)}if(e.radar){e.radar.setAttributes({hidden:!a},true);if(e.radar.shadows){for(b=0,c=e.radar.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}},hideAll:function(){this.toggleAll(false);this.hideMarkers(0)},showAll:function(){this.toggleAll(true)},hideMarkers:function(a){var d=this,c=d.markerGroup&&d.markerGroup.getCount()||0,b=a||0;for(;b<c;b++){d.markerGroup.getAt(b).hide(true)}}});Ext.define("Ext.chart.series.Scatter",{extend:"Ext.chart.series.Cartesian",requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.fx.Anim"],type:"scatter",alias:"series.scatter",constructor:function(c){this.callParent(arguments);var e=this,g=e.chart.shadow,a=e.chart.surface,d,b;Ext.apply(e,c,{style:{},markerConfig:{},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)"},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)"},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)"}]});e.group=a.getGroup(e.seriesId);if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBounds:function(){var s=this,j=s.chart,d=j.getChartStore(),o=j.axes,l=s.getAxesForXAndYFields(),k=l.xAxis,e=l.yAxis,a,t,c,g,r,p,q,n,m,b,h;s.setBBox();a=s.bbox;if(b=o.get(k)){h=b.applyData();r=h.from;q=h.to}if(b=o.get(e)){h=b.applyData();p=h.from;n=h.to}if(s.xField&&!Ext.isNumber(r)){b=s.getMinMaxXValues();r=b[0];q=b[1]}if(s.yField&&!Ext.isNumber(p)){b=s.getMinMaxYValues();p=b[0];n=b[1]}if(isNaN(r)){r=0;q=d.getCount()-1;t=a.width/(d.getCount()-1)}else{t=a.width/(q-r)}if(isNaN(p)){p=0;n=d.getCount()-1;c=a.height/(d.getCount()-1)}else{c=a.height/(n-p)}return{bbox:a,minX:r,minY:p,xScale:t,yScale:c}},getPaths:function(){var z=this,n=z.chart,b=n.shadow,e=n.getChartStore(),B=e.data.items,s,l,d,j=z.group,g=z.bounds=z.getBounds(),a=z.bbox,C=g.xScale,c=g.yScale,v=g.minX,u=g.minY,A=a.x,w=a.y,h=a.height,o=z.items=[],q=[],m,k,r,t,p;for(s=0,l=B.length;s<l;s++){d=B[s];r=d.get(z.xField);t=d.get(z.yField);if(typeof t=="undefined"||(typeof t=="string"&&!t)||r==null||t==null){continue}if(typeof r=="string"||typeof r=="object"&&!Ext.isDate(r)){r=s}if(typeof t=="string"||typeof t=="object"&&!Ext.isDate(t)){t=s}m=A+(r-v)*C;k=w+h-(t-u)*c;q.push({x:m,y:k});z.items.push({series:z,value:[r,t],point:[m,k],storeItem:d});if(n.animate&&n.resizing){p=j.getAt(s);if(p){z.resetPoint(p);if(b){z.resetShadow(p)}}}}return q},resetPoint:function(a){var b=this.bbox;a.setAttributes({translate:{x:(b.x+b.width)/2,y:(b.y+b.height)/2}},true)},resetShadow:function(c){var g=this,e=c.shadows,j=g.shadowAttributes,d=g.shadowGroups.length,h=g.bbox,b,a;for(b=0;b<d;b++){a=Ext.apply({},j[b]);if(a.translate){a.translate.x+=(h.x+h.width)/2;a.translate.y+=(h.y+h.height)/2}else{a.translate={x:(h.x+h.width)/2,y:(h.y+h.height)/2}}e[b].setAttributes(a,true)}},createPoint:function(a,c){var d=this,b=d.chart,e=d.group,g=d.bbox;return Ext.chart.Shape[c](b.surface,Ext.apply({},{x:0,y:0,group:e,translate:{x:(g.x+g.width)/2,y:(g.y+g.height)/2}},a))},createShadow:function(n,g,k){var j=this,h=j.chart,l=j.shadowGroups,d=j.shadowAttributes,a=l.length,o=j.bbox,c,m,b,e;n.shadows=b=[];for(c=0;c<a;c++){e=Ext.apply({},d[c]);if(e.translate){e.translate.x+=(o.x+o.width)/2;e.translate.y+=(o.y+o.height)/2}else{Ext.apply(e,{translate:{x:(o.x+o.width)/2,y:(o.y+o.height)/2}})}Ext.apply(e,g);m=Ext.chart.Shape[k](h.surface,Ext.apply({},{x:0,y:0,group:l[c]},e));b.push(m)}},drawSeries:function(){var u=this,l=u.chart,h=l.getChartStore(),j=u.group,c=l.shadow,a=u.shadowGroups,q=u.shadowAttributes,r=a.length,m,n,o,k,p,t,e,g,b,d,s;t=Ext.apply(u.markerStyle,u.markerConfig);g=t.type;delete t.type;if(!h||!h.getCount()){u.hide();u.items=[];return}u.unHighlightItem();u.cleanHighlights();n=u.getPaths();k=n.length;for(p=0;p<k;p++){o=n[p];m=j.getAt(p);Ext.apply(o,t);if(!m){m=u.createPoint(o,g);if(c){u.createShadow(m,t,g)}}b=m.shadows;if(l.animate){d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;u.onAnimate(m,{to:d});for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);u.onAnimate(b[e],{to:d})}}else{d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;m.setAttributes(d,true);for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);b[e].setAttributes(d,true)}}u.items[p].sprite=m}k=j.getCount();for(p=n.length;p<k;p++){j.getAt(p).hide(true)}u.renderLabels();u.renderCallouts()},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,b=Ext.apply({},a,g.seriesLabelStyle),j=g.bbox;return g.chart.surface.add(Ext.apply({type:"text",group:h,x:k.point[0],y:j.y+j.height/2},b))},onPlaceLabel:function(g,k,t,q,p,d){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],c=t.sprite.attr.radius,e,n,m,o;g.setAttributes({text:r(k.get(b)),hidden:true},true);if(p=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(p=="under"||p=="over"){e=t.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(p=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(!l.animate){g.setAttributes({x:j,y:h},true);g.show(true)}else{if(s){o=t.sprite.getActiveAnimation();if(o){o.on("afteranimate",function(){g.setAttributes({x:j,y:h},true);g.show(true)})}else{g.show(true)}}else{v.onAnimate(g,{to:{x:j,y:h}})}}},onPlaceCallout:function(k,m,B,z,w,c,h){var E=this,n=E.chart,u=n.surface,A=n.resizing,D=E.callouts,o=E.items,b=B.point,F,a=k.label.getBBox(),C=30,t=10,s=3,e,d,g,r,q,v=E.bbox,l,j;F=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(e<v[0]||(e+g)>(v[0]+v[2])){F[0]*=-1}if(d<v[1]||(d+r)>(v[1]+v[3])){F[1]*=-1}l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(n.animate){E.onAnimate(k.lines,{to:{path:["M",b[0],b[1],"L",l,j,"Z"]}},true);E.onAnimate(k.box,{to:{x:e,y:d,width:g,height:r}},true);E.onAnimate(k.label,{to:{x:l+(F[0]>0?s:-(a.width+s)),y:j}},true)}else{k.lines.setAttributes({path:["M",b[0],b[1],"L",l,j,"Z"]},true);k.box.setAttributes({x:e,y:d,width:g,height:r},true);k.label.setAttributes({x:l+(F[0]>0?s:-(a.width+s)),y:j},true)}for(q in k){k[q].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,h,e){var b,d=10,a=Math.abs;function g(i){var k=a(i[0]-c),j=a(i[1]-h);return Math.sqrt(k*k+j*j)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=h&&b[1]+d>=h)}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alias:"widget.quicktip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:"&#160;",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var h=Ext.isArray(c)?c:arguments,d=0,a=h.length,g,b,e;for(;d<a;d++){c=h[d];g=c.target;if(g){if(Ext.isArray(g)){for(b=0,e=g.length;b<e;b++){this.targets[Ext.id(g[b])]=c}}else{this.targets[Ext.id(g)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&&c.el==a){b.hide()}}else{if(c&&c.el==a){b.clearTimer("show")}}},getTipCfg:function(d){var c=d.getTarget(),b=c.title,a;if(this.interceptTitles&&b&&Ext.isString(b)){c.qtip=b;c.removeAttribute("title");d.preventDefault();return{text:b}}else{a=this.tagConfig;c=d.getTarget("["+a.namespace+a.attribute+"]");if(c){return{target:c,text:c.getAttribute(a.namespace+a.attribute)}}}},onTargetOver:function(i){var k=this,j=i.getTarget(k.delegate),a,d,b,h,l,c,n,g,p,m,o;if(k.disabled){return}k.targetXY=i.getXY();if(!j||j.nodeType!==1||j==document.documentElement||j==document.body){return}if(k.activeTarget&&((j==k.activeTarget.el)||Ext.fly(k.activeTarget.el).contains(j))){k.clearTimer("hide");k.show();return}if(j){g=k.targets;for(o in g){if(g.hasOwnProperty(o)){m=g[o];p=Ext.fly(m.target);if(p&&(p.dom===j||p.contains(j))){b=p.dom;break}}}if(b){k.activeTarget=k.targets[b.id];k.activeTarget.el=j;k.anchor=k.activeTarget.anchor;if(k.anchor){k.anchorTarget=j}a=Ext.isDefined(k.activeTarget.showDelay);if(a){d=k.showDelay;k.showDelay=k.activeTarget.showDelay}k.delayShow();if(a){k.showDelay=d}return}}b=Ext.fly(j,"_quicktip-target");h=k.tagConfig;l=h.namespace;c=k.getTipCfg(i);if(c){if(c.target){j=c.target;b=Ext.fly(j,"_quicktip-target")}n=b.getAttribute(l+h.hide);k.activeTarget={el:j,text:c.text,width:+b.getAttribute(l+h.width)||null,autoHide:n!="user"&&n!=="false",title:b.getAttribute(l+h.title),cls:b.getAttribute(l+h.cls),align:b.getAttribute(l+h.align)};k.anchor=b.getAttribute(l+h.anchor);if(k.anchor){k.anchorTarget=j}a=Ext.isDefined(k.activeTarget.showDelay);if(a){d=k.showDelay;k.showDelay=k.activeTarget.showDelay}k.delayShow();if(a){k.showDelay=d}}},onTargetOut:function(g){var c=this,d=c.activeTarget,a,b;if(d&&g.within(c.activeTarget.el)&&!c.getTipCfg(g)){return}c.clearTimer("show");delete c.activeTarget;if(c.autoHide!==false){a=d&&Ext.isDefined(d.hideDelay);if(a){b=c.hideDelay;c.hideDelay=d.hideDelay}c.delayHide();if(a){c.hideDelay=b}}},showAt:function(d){var b=this,c=b.activeTarget,a;if(c){if(!b.rendered){b.render(Ext.getBody());b.activeTarget=c}b.suspendLayouts();if(c.title){b.setTitle(c.title);b.header.show()}else{b.header.hide()}b.update(c.text);b.autoHide=c.autoHide;b.dismissDelay=c.dismissDelay||b.dismissDelay;a=b.lastCls;if(a){b.removeCls(a);delete b.lastCls}a=c.cls;if(a){b.addCls(a);b.lastCls=a}b.setWidth(c.width);if(b.anchor){b.constrainPosition=false}else{if(c.align){d=b.el.getAlignToXY(c.el,c.align);b.constrainPosition=false}else{b.constrainPosition=true}}b.resumeLayouts(true)}b.callParent([d])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",(function(){var b,a=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(g,d){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(g,d)});return}var c=Ext.apply({disabled:a,id:"ext-quicktips-tip"},d),e=c.className,h=c.xtype;if(e){delete c.className}else{if(h){e="widget."+h;delete c.xtype}}if(g!==false){c.renderTo=document.body}b=Ext.create(e||"Ext.tip.QuickTip",c)}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&&!a){b.disable()}},ddEnable:function(){if(b&&!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}()));Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:false,constructor:function(b){b=b||{};Ext.apply(this,b);var k=b.requires||[],a,e,c,d,h,j,g;Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){h=this.paths;for(g in h){if(h.hasOwnProperty(g)){j=h[g];Ext.Loader.setPath(g,j)}}}this.callParent(arguments);this.eventbus=new Ext.app.EventBus;a=Ext.Array.from(this.controllers);e=a&&a.length;this.controllers=new Ext.util.MixedCollection();if(this.autoCreateViewport){k.push(this.getModuleClassName("Viewport","view"))}for(c=0;c<e;c++){k.push(this.getModuleClassName(a[c],"controller"))}Ext.require(k);Ext.onReady(function(){for(c=0;c<e;c++){d=this.getController(a[c]);d.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(b,c,a){this.eventbus.control(b,c,a)},launch:Ext.emptyFn,onBeforeLaunch:function(){var b=this,e,g,d,a;if(b.enableQuickTips){Ext.tip.QuickTipManager.init()}if(b.autoCreateViewport){b.getView("Viewport").create()}b.launch.call(this.scope||this);b.launched=true;b.fireEvent("launch",this);e=b.controllers.items;d=e.length;for(g=0;g<d;g++){a=e[g];a.onLaunch(this)}},getModuleClassName:function(a,b){if(a.indexOf(".")!==-1&&(Ext.ClassManager.isCreated(a)||Ext.Loader.isAClassNameWithAKnownPrefix(a))){return a}else{return this.name+"."+b+"."+a}},getController:function(b){var a=this.controllers.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"controller"),{application:this,id:b});this.controllers.add(a)}return a},getStore:function(b){var a=Ext.StoreManager.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"store"),{storeId:b})}return a},getModel:function(a){a=this.getModuleClassName(a,"model");return Ext.ModelManager.getModel(a)},getView:function(a){a=this.getModuleClassName(a,"view");return Ext.ClassManager.get(a)}});Ext.define("Ext.form.field.HtmlEditor",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.htmleditor",alternateClassName:"Ext.form.HtmlEditor",requires:["Ext.tip.QuickTipManager","Ext.picker.Color","Ext.toolbar.Item","Ext.toolbar.Toolbar","Ext.util.Format","Ext.layout.component.field.HtmlEditor"],childEls:["iframeEl","textareaEl"],fieldSubTpl:["{%Ext.DomHelper.generateMarkup(values.$comp.toolbar.getRenderTree(), out)%}","{beforeTextAreaTpl}",'<textarea id="{cmpId}-textareaEl" name="{name}" tabIndex="-1" {inputAttrTpl}',' class="{textareaCls}" style="{size}" autocomplete="off">',"{[Ext.util.Format.htmlEncode(values.value)]}","</textarea>","{afterTextAreaTpl}","{beforeIFrameTpl}",'<iframe id="{cmpId}-iframeEl" name="{iframeName}" frameBorder="0" {iframeAttrTpl}',' style="overflow:auto;{size}" src="{iframeSrc}"></iframe>',"{afterIFrameTpl}",{disableFormats:true}],subTplInsertions:["beforeTextAreaTpl","afterTextAreaTpl","beforeIFrameTpl","afterIFrameTpl","iframeAttrTpl","inputAttrTpl"],enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&#160;":"&#8203;",fieldBodyCls:Ext.baseCSSPrefix+"html-editor-wrap",componentLayout:"htmleditor",initialized:false,activated:false,sourceEditMode:false,iframePad:3,hideMode:"offsets",maskOnDisable:true,initComponent:function(){var a=this;a.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");a.callParent(arguments);a.createToolbar(a);a.initLabelable();a.initField()},getRefItems:function(){return[this.toolbar]},createToolbar:function(g){var j=this,h=[],c,l=Ext.tip.QuickTipManager&&Ext.tip.QuickTipManager.isEnabled(),e=Ext.baseCSSPrefix,d,k,b;function a(n,i,m){return{itemId:n,cls:e+"btn-icon",iconCls:e+"edit-"+n,enableToggle:i!==false,scope:g,handler:m||g.relayBtnCmd,clickEvent:"mousedown",tooltip:l?g.buttonTips[n]||b:b,overflowText:g.buttonTips[n].title||b,tabIndex:-1}}if(j.enableFont&&!Ext.isSafari2){d=Ext.widget("component",{renderTpl:['<select id="{id}-selectEl" class="{cls}">','<tpl for="fonts">','<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',"</tpl>","</select>"],renderData:{cls:e+"font-select",fonts:j.fontFamilies,defaultFont:j.defaultFont},childEls:["selectEl"],afterRender:function(){j.fontSelect=this.selectEl;Ext.Component.prototype.afterRender.apply(this,arguments)},onDisable:function(){var i=this.selectEl;if(i){i.dom.disabled=true}Ext.Component.prototype.onDisable.apply(this,arguments)},onEnable:function(){var i=this.selectEl;if(i){i.dom.disabled=false}Ext.Component.prototype.onEnable.apply(this,arguments)},listeners:{change:function(){j.relayCmd("fontname",j.fontSelect.dom.value);j.deferFocus()},element:"selectEl"}});h.push(d,"-")}if(j.enableFormat){h.push(a("bold"),a("italic"),a("underline"))}if(j.enableFontSize){h.push("-",a("increasefontsize",false,j.adjustFont),a("decreasefontsize",false,j.adjustFont))}if(j.enableColors){h.push("-",{itemId:"forecolor",cls:e+"btn-icon",iconCls:e+"edit-forecolor",overflowText:g.buttonTips.forecolor.title,tooltip:l?g.buttonTips.forecolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,clickEvent:"mousedown",handler:function(m,i){j.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus();this.up("menu").hide()}}]})},{itemId:"backcolor",cls:e+"btn-icon",iconCls:e+"edit-backcolor",overflowText:g.buttonTips.backcolor.title,tooltip:l?g.buttonTips.backcolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,clickEvent:"mousedown",handler:function(m,i){if(Ext.isGecko){j.execCmd("useCSS",false);j.execCmd("hilitecolor",i);j.execCmd("useCSS",true);j.deferFocus()}else{j.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus()}this.up("menu").hide()}}]})})}if(j.enableAlignments){h.push("-",a("justifyleft"),a("justifycenter"),a("justifyright"))}if(!Ext.isSafari2){if(j.enableLinks){h.push("-",a("createlink",false,j.createLink))}if(j.enableLists){h.push("-",a("insertorderedlist"),a("insertunorderedlist"))}if(j.enableSourceEdit){h.push("-",a("sourceedit",true,function(i){j.toggleSourceEdit(!j.sourceEditMode)}))}}for(c=0;c<h.length;c++){if(h[c].itemId!=="sourceedit"){h[c].disabled=true}}k=Ext.widget("toolbar",{id:j.id+"-toolbar",ownerCt:j,cls:Ext.baseCSSPrefix+"html-editor-tb",enableOverflow:true,items:h,ownerLayout:j.getComponentLayout(),listeners:{click:function(i){i.preventDefault()},element:"el"}});j.toolbar=k},getMaskTarget:function(){return this.bodyEl},setReadOnly:function(e){var d=this,c=d.textareaEl,b=d.iframeEl,a;d.readOnly=e;if(c){c.dom.readOnly=e}if(d.initialized){a=d.getEditorBody();if(Ext.isIE){b.setDisplayed(false);a.contentEditable=!e;b.setDisplayed(true)}else{d.setDesignMode(!e)}if(a){a.style.cursor=e?"default":"text"}d.disableItems(e)}},getDocMarkup:function(){var b=this,a=b.iframeEl.getHeight()-b.iframePad*2;return Ext.String.format('<html><head><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;cursor:text}</style></head><body></body></html>',b.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return(!Ext.isIE&&this.iframeEl.dom.contentDocument)||this.getWin().document},getWin:function(){return Ext.isIE?this.iframeEl.dom.contentWindow:window.frames[this.iframeEl.dom.name]},finishRenderChildren:function(){this.callParent();this.toolbar.finishRender()},onRender:function(){var a=this;a.callParent(arguments);a.inputEl=a.iframeEl;a.monitorTask=Ext.TaskManager.start({run:a.checkDesignMode,scope:a,interval:100})},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getSubTplData:function(){return{$comp:this,cmpId:this.id,id:this.getInputId(),textareaCls:Ext.baseCSSPrefix+"hidden",value:this.value,iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,size:"height:100px;width:100%"}},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initFrameDoc:function(){var b=this,c,a;Ext.TaskManager.stop(b.monitorTask);c=b.getDoc();b.win=b.getWin();c.open();c.write(b.getDocMarkup());c.close();a={run:function(){var d=b.getDoc();if(d.body||d.readyState==="complete"){Ext.TaskManager.stop(a);b.setDesignMode(true);Ext.defer(b.initEditor,10,b)}},interval:10,duration:10000,scope:b};Ext.TaskManager.start(a)},checkDesignMode:function(){var a=this,b=a.getDoc();if(b&&(!b.editorInitialized||a.getDesignMode()!=="on")){a.initFrameDoc()}},setDesignMode:function(c){var a=this,b=a.getDoc();if(b){if(a.readOnly){c=false}b.designMode=(/on|true/i).test(String(c).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();return !a?"":String(a.designMode).toLowerCase()},disableItems:function(d){var b=this.getToolbar().items.items,c,a=b.length,e;for(c=0;c<a;c++){e=b[c];if(e.getItemId()!=="sourceedit"){e.setDisabled(d)}}},toggleSourceEdit:function(b){var g=this,d=g.iframeEl,a=g.textareaEl,e=Ext.baseCSSPrefix+"hidden",c=g.getToolbar().getComponent("sourceedit");if(!Ext.isBoolean(b)){b=!g.sourceEditMode}g.sourceEditMode=b;if(c.pressed!==b){c.toggle(b)}if(b){g.disableItems(true);g.syncValue();d.addCls(e);a.removeCls(e);a.dom.removeAttribute("tabIndex");a.focus();g.inputEl=a}else{if(g.initialized){g.disableItems(g.readOnly)}g.pushValue();d.removeCls(e);a.addCls(e);a.dom.setAttribute("tabIndex",-1);g.deferFocus();g.inputEl=d}g.fireEvent("editmodechange",g,b);g.updateLayout()},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!=="http://"){this.relayCmd("createlink",a)}},clearInvalid:Ext.emptyFn,setValue:function(c){var b=this,a=b.textareaEl;b.mixins.field.setValue.call(b,c);if(c===null||c===undefined){c=""}if(a){a.dom.value=c}b.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)===parseInt(this.defaultValue.replace(/\D/g,""),10)){a=a.substring(1)}return a},syncValue:function(){var g=this,b,h,e,a,d,c;if(g.initialized){b=g.getEditorBody();e=b.innerHTML;if(Ext.isWebKit){a=b.getAttribute("style");d=a.match(/text-align:(.*?);/i);if(d&&d[1]){e='<div style="'+d[0]+'">'+e+"</div>"}}e=g.cleanHtml(e);if(g.fireEvent("beforesync",g,e)!==false){if(g.textareaEl.dom.value!=e){g.textareaEl.dom.value=e;h=true}g.fireEvent("sync",g,e);if(h){g.checkChange()}}}},getValue:function(){var a=this,b;if(!a.sourceEditMode){a.syncValue()}b=a.rendered?a.textareaEl.dom.value:a.value;a.value=b;return b},pushValue:function(){var b=this,a;if(b.initialized){a=b.textareaEl.dom.value||"";if(!b.activated&&a.length<1){a=b.defaultValue}if(b.fireEvent("beforepush",b,a)!==false){b.getEditorBody().innerHTML=a;if(Ext.isGecko){b.setDesignMode(false);b.setDesignMode(true)}b.fireEvent("push",b,a)}}},deferFocus:function(){this.focus(false,true)},getFocusEl:function(){var a=this,b=a.win;return b&&!a.sourceEditMode?b:a.textareaEl},initEditor:function(){try{var g=this,d=g.getEditorBody(),b=g.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),i,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);i=g.getDoc();if(i){try{Ext.EventManager.removeAll(i)}catch(h){}}c=Ext.Function.bind(g.onEditorEvent,g);Ext.EventManager.on(i,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=g.onRelayedEvent;Ext.EventManager.on(i,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:g});if(Ext.isGecko){Ext.EventManager.on(i,"keypress",g.applyCommand,g)}if(g.fixKeys){Ext.EventManager.on(i,"keydown",g.fixKeys,g)}Ext.EventManager.on(window,"unload",g.beforeDestroy,g);i.editorInitialized=true;g.initialized=true;g.pushValue();g.setReadOnly(g.readOnly);g.fireEvent("initialize",g)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,g;if(d){Ext.TaskManager.stop(d)}if(a.rendered){try{c=a.getDoc();if(c){Ext.EventManager.removeAll(c);for(g in c){if(c.hasOwnProperty&&c.hasOwnProperty(g)){delete c[g]}}}}catch(b){}Ext.destroyMembers(a,"toolbar","iframeEl","textareaEl")}a.callParent()},onRelayedEvent:function(c){var b=this.iframeEl,d=b.getXY(),a=c.getXY();c.xy=[d[0]+a[0],d[1]+a[1]];c.injectEvent(b);c.xy=a},onFirstFocus:function(){var c=this,b,a;c.activated=true;c.disableItems(c.readOnly);if(Ext.isGecko){c.win.focus();b=c.win.getSelection();if(!b.focusNode||b.focusNode.nodeType!==3){a=b.getRangeAt(0);a.selectNodeContents(c.getEditorBody());a.collapse(true);c.deferFocus()}try{c.execCmd("useCSS",true);c.execCmd("styleWithCSS",false)}catch(d){}}c.fireEvent("activate",c)},adjustFont:function(d){var e=d.getItemId()==="increasefontsize"?1:-1,c=this.getDoc().queryCommandValue("FontSize")||"2",a=Ext.isString(c)&&c.indexOf("px")!==-1,b;c=parseInt(c,10);if(a){if(c<=10){c=1+e}else{if(c<=13){c=2+e}else{if(c<=16){c=3+e}else{if(c<=18){c=4+e}else{if(c<=24){c=5+e}else{c=6+e}}}}}c=Ext.Number.constrain(c,1,6)}else{b=Ext.isSafari;if(b){e*=2}c=Math.max(1,c+e)+(b?"px":0)}this.execCmd("FontSize",c)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){var e=this,d,g,a,c;if(e.readOnly){return}if(!e.activated){e.onFirstFocus();return}d=e.getToolbar().items.map;g=e.getDoc();if(e.enableFont&&!Ext.isSafari2){a=(g.queryCommandValue("FontName")||e.defaultFont).toLowerCase();c=e.fontSelect.dom;if(a!==c.value){c.value=a}}function b(){for(var k=0,h=arguments.length,j;k<h;k++){j=arguments[k];d[j].toggle(g.queryCommandState(j))}}if(e.enableFormat){b("bold","italic","underline")}if(e.enableAlignments){b("justifyleft","justifycenter","justifyright")}if(!Ext.isSafari2&&e.enableLists){b("insertorderedlist","insertunorderedlist")}Ext.menu.Manager.hideAll();e.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){Ext.defer(function(){var c=this;c.focus();c.execCmd(b,a);c.updateToolbar()},10,this)},execCmd:function(d,c){var b=this,e=b.getDoc(),a;e.execCommand(d,false,c===a?null:c);b.syncValue()},applyCommand:function(d){if(d.ctrlKey){var a=this,g=d.getCharCode(),b;if(g>0){g=String.fromCharCode(g);switch(g){case"b":b="bold";break;case"i":b="italic";break;case"u":b="underline";break}if(b){a.win.focus();a.execCmd(b);a.deferFocus();d.preventDefault()}}}},insertAtCursor:function(c){var b=this,a;if(b.activated){b.win.focus();if(Ext.isIE){a=b.getDoc().selection.createRange();if(a){a.pasteHTML(c);b.syncValue();b.deferFocus()}}else{b.execCmd("InsertHTML",c);b.deferFocus()}}},fixKeys:(function(){if(Ext.isIE){return function(h){var c=this,b=h.getKey(),g=c.getDoc(),i=c.readOnly,a,d;if(b===h.TAB){h.stopEvent();if(!i){a=g.selection.createRange();if(a){a.collapse(true);a.pasteHTML("&#160;&#160;&#160;&#160;");c.deferFocus()}}}else{if(b===h.ENTER){if(!i){a=g.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){h.stopEvent();a.pasteHTML("<br />");a.collapse(false);a.select()}}}}}}}if(Ext.isOpera){return function(b){var a=this;if(b.getKey()===b.TAB){b.stopEvent();if(!a.readOnly){a.win.focus();a.execCmd("InsertHTML","&#160;&#160;&#160;&#160;");a.deferFocus()}}}}if(Ext.isWebKit){return function(c){var b=this,a=c.getKey(),d=b.readOnly;if(a===c.TAB){c.stopEvent();if(!d){b.execCmd("InsertText","\t");b.deferFocus()}}else{if(a===c.ENTER){c.stopEvent();if(!d){b.execCmd("InsertHtml","<br /><br />");b.deferFocus()}}}}}return null}()),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:Ext.baseCSSPrefix+"html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:Ext.baseCSSPrefix+"html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:Ext.baseCSSPrefix+"html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:Ext.baseCSSPrefix+"html-editor-tip"}}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",childEls:["toolEl"],renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,height:15,width:15,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.tooltip=a.tooltip||a.qtip;a.callParent();a.on({element:"toolEl",click:a.onClick,mousedown:a.onMouseDown,mouseover:a.onMouseOver,mouseout:a.onMouseOut,scope:a})},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.toolEl.dom.setAttribute(a,b.tooltip)}}},getFocusEl:function(){return this.el},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.toolbar.Paging",{extend:"Ext.toolbar.Toolbar",alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",requires:["Ext.toolbar.TextItem","Ext.form.field.Number"],mixins:{bindable:"Ext.util.Bindable"},displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,keyNavEnabled:false,selectOnFocus:true,submitValue:false,isFormField:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("beforerender",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,g;if(c){d=a.getCount();if(d===0){g=e.emptyMsg}else{g=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(g)}},onLoad:function(){var g=this,d,b,c,a,e,h;e=g.store.getCount();h=e===0;if(!h){d=g.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(g.afterPageText,isNaN(c)?1:c)}else{b=0;c=0;a=Ext.String.format(g.afterPageText,0)}Ext.suspendLayouts();g.child("#afterTextItem").setText(a);g.child("#inputItem").setDisabled(h).setValue(b);g.child("#first").setDisabled(b===1||h);g.child("#prev").setDisabled(b===1||h);g.child("#next").setDisabled(b===c||h);g.child("#last").setDisabled(b===c||h);g.child("#refresh").enable();g.updateInfo();Ext.resumeLayouts(true);if(g.rendered){g.fireEvent("change",g,d)}},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.child("#refresh").enable()},readPageFromInput:function(b){var a=this.child("#inputItem").getValue(),c=parseInt(a,10);if(!a||isNaN(c)){this.child("#inputItem").setValue(b.currentPage);return false}return c},onPagingFocus:function(){this.child("#inputItem").select()},onPagingBlur:function(b){var a=this.getPageData().currentPage;this.child("#inputItem").setValue(a)},onPagingKeyDown:function(i,h){var d=this,b=h.getKey(),c=d.getPageData(),a=h.shiftKey?10:1,g;if(b==h.RETURN){h.stopEvent();g=d.readPageFromInput(c);if(g!==false){g=Math.min(Math.max(1,g),c.pageCount);if(d.fireEvent("beforechange",d,g)!==false){d.store.loadPage(g)}}}else{if(b==h.HOME||b==h.END){h.stopEvent();g=b==h.HOME?1:c.pageCount;i.setValue(g)}else{if(b==h.UP||b==h.PAGE_UP||b==h.DOWN||b==h.PAGE_DOWN){h.stopEvent();g=d.readPageFromInput(c);if(g){if(b==h.DOWN||b==h.PAGE_DOWN){a*=-1}g+=a;if(g>=1&&g<=c.pageCount){i.setValue(g)}}}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},getStoreListeners:function(){return{beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.unbind();this.callParent()}});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",tdCls:Ext.baseCSSPrefix+"grid-cell-treecolumn",initComponent:function(){var a=this.renderer||this.defaultRenderer,b=this.scope||window;this.renderer=function(m,o,e,d,l,h,k){var s=[],q=Ext.String.format,u=e.getDepth(),r=Ext.baseCSSPrefix+"tree-",g=r+"elbow-",n=r+"expander",j='<img src="{1}" class="{0}" />',v='<input type="button" role="checkbox" class="{0}" {1} />',i=a.apply(b,arguments),p=e.get("href"),t=e.get("hrefTarget"),c=e.get("cls");while(e){if(!e.isRoot()||(e.isRoot()&&k.rootVisible)){if(e.getDepth()===u){s.unshift(q(j,r+"icon "+r+"icon"+(e.get("icon")?"-inline ":(e.isLeaf()?"-leaf ":"-parent "))+(e.get("iconCls")||""),e.get("icon")||Ext.BLANK_IMAGE_URL));if(e.get("checked")!==null){s.unshift(q(v,(r+"checkbox")+(e.get("checked")?" "+r+"checkbox-checked":""),e.get("checked")?'aria-checked="true"':""));if(e.get("checked")){o.tdCls+=(" "+r+"checked")}}if(e.isLast()){if(e.isExpandable()){s.unshift(q(j,(g+"end-plus "+n),Ext.BLANK_IMAGE_URL))}else{s.unshift(q(j,(g+"end"),Ext.BLANK_IMAGE_URL))}}else{if(e.isExpandable()){s.unshift(q(j,(g+"plus "+n),Ext.BLANK_IMAGE_URL))}else{s.unshift(q(j,(r+"elbow"),Ext.BLANK_IMAGE_URL))}}}else{if(e.isLast()||e.getDepth()===0){s.unshift(q(j,(g+"empty"),Ext.BLANK_IMAGE_URL))}else{if(e.getDepth()!==0){s.unshift(q(j,(g+"line"),Ext.BLANK_IMAGE_URL))}}}}e=e.parentNode}if(p){s.push('<a href="',p,'" target="',t,'">',i,"</a>")}else{s.push(i)}if(c){o.tdCls+=" "+c}return s.join("")};this.callParent(arguments)},defaultRenderer:function(a){return a}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el.dom.parentNode]);b.ddel=Ext.get(document.createElement("div"));b.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(c,a,b){this.initTarget(c,a,b);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onItemMouseDown:function(b,a,d,c,g){if(!this.isPreventDrag(g,a,d,c)){this.handleMouseDown(g);if(b.getSelectionModel().selectionMode=="MULTI"&&!g.ctrlKey&&b.getSelectionModel().isSelected(a)){return false}}},isPreventDrag:function(a){return false},getDragData:function(c){var a=this.view,b=c.getTarget(a.getItemSelector());if(b){return{copy:a.copy||(a.allowCopy&&c.ctrlKey),event:new Ext.EventObjectImpl(c),view:a,ddel:this.ddel,item:b,records:a.getSelectionModel().getSelection(),fromPosition:Ext.fly(b).getXY()}}},onInitDrag:function(b,j){var g=this,h=g.dragData,d=h.view,a=d.getSelectionModel(),c=d.getRecord(h.item),i=h.event;if(!a.isSelected(c)||i.hasModifier()){a.selectWithEvent(c,i,true)}h.records=a.getSelection();g.ddel.update(g.getDragText());g.proxy.update(g.ddel.dom);g.onStartDrag(b,j);return true},getDragText:function(){var a=this.dragData.records.length;return Ext.String.format(this.dragText,a,a==1?"":"s")},getRepairXY:function(b,a){return a?a.fromPosition:false}});Ext.define("Ext.tree.ViewDragZone",{extend:"Ext.view.DragZone",isPreventDrag:function(b,a){return(a.get("allowDrag")===false)||!!b.getTarget(this.view.expanderSelector)},afterRepair:function(){var h=this,a=h.view,i=a.selectedItemCls,b=h.dragData.records,g,e=b.length,c=Ext.fly,d;if(Ext.enableFx&&h.repairHighlight){for(g=0;g<e;g++){d=a.getNode(b[g]);c(d.firstChild).highlight(h.repairHighlightColor,{listeners:{beforeanimate:function(){if(a.isSelected(d)){c(d).removeCls(i)}},afteranimate:function(){if(a.isSelected(d)){c(d).addCls(i)}}}})}}h.dragging=false}});Ext.define("Ext.view.DropZone",{extend:"Ext.dd.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el])},fireViewEvent:function(){var b=this,a;b.lock();a=b.view.fireEvent.apply(b.view,arguments);b.unlock();return a},getTargetFromEvent:function(k){var j=k.getTarget(this.view.getItemSelector()),d,c,b,g,a,h;if(!j){d=k.getPageY();for(g=0,c=this.view.getNodes(),a=c.length;g<a;g++){b=c[g];h=Ext.fly(b).getBox();if(d<=h.bottom){return b}}}return j},getIndicator:function(){var a=this;if(!a.indicator){a.indicator=new Ext.Component({html:a.indicatorHtml,cls:a.indicatorCls,ownerCt:a.view,floating:true,shadow:false})}return a.indicator},getPosition:function(c,a){var g=c.getXY()[1],b=Ext.fly(a).getRegion(),d;if((b.bottom-g)>=(b.bottom-b.top)/2){d="before"}else{d="after"}return d},containsRecordAtOffset:function(d,b,g){if(!b){return false}var a=this.view,c=a.indexOf(b),e=a.getNode(c+g),h=e?a.getRecord(e):null;return h&&Ext.Array.contains(d,h)},positionIndicator:function(b,c,d){var g=this,i=g.view,h=g.getPosition(d,b),k=i.getRecord(b),a=c.records,j;if(!Ext.Array.contains(a,k)&&(h=="before"&&!g.containsRecordAtOffset(a,k,-1)||h=="after"&&!g.containsRecordAtOffset(a,k,1))){g.valid=true;if(g.overRecord!=k||g.currentPosition!=h){j=Ext.fly(b).getY()-i.el.getY()-1;if(h=="after"){j+=Ext.fly(b).getHeight()}g.getIndicator().setWidth(Ext.fly(i.el).getWidth()).showAt(0,j);g.overRecord=k;g.currentPosition=h}}else{g.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(c,a,g,d){var b=this;if(!Ext.Array.contains(d.records,b.view.getRecord(c))){b.positionIndicator(c,d,g)}return b.valid?b.dropAllowed:b.dropNotAllowed},notifyOut:function(c,a,g,d){var b=this;b.callParent(arguments);delete b.overRecord;delete b.currentPosition;if(b.indicator){b.indicator.hide()}},onContainerOver:function(a,h,g){var d=this,b=d.view,c=b.store.getCount();if(c){d.positionIndicator(b.getNode(c-1),g,h)}else{delete d.overRecord;delete d.currentPosition;d.getIndicator().setWidth(Ext.fly(b.el).getWidth()).showAt(0,0);d.valid=true}return d.dropAllowed},onContainerDrop:function(a,c,b){return this.onNodeDrop(a,null,c,b)},onNodeDrop:function(g,a,i,h){var d=this,c=false,b={wait:false,processDrop:function(){d.invalidateDrop();d.handleNodeDrop(h,d.overRecord,d.currentPosition);c=true;d.fireViewEvent("drop",g,h,d.overRecord,d.currentPosition)},cancelDrop:function(){d.invalidateDrop();c=true}},j=false;if(d.valid){j=d.fireViewEvent("beforedrop",g,h,d.overRecord,d.currentPosition,b);if(b.wait){return}if(j!==false){if(!c){b.processDrop()}}}return j},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",handleNodeDrop:function(b,d,e){var j=this.view,k=j.getStore(),h,a,c,g;if(b.copy){a=b.records;b.records=[];for(c=0,g=a.length;c<g;c++){b.records.push(a[c].copy(a[c].getId()))}}else{b.view.store.remove(b.records,b.view===j)}h=k.indexOf(d);if(e!=="before"){h++}k.insert(h,b.records);j.getSelectionModel().select(b.records)}});Ext.define("Ext.tree.ViewDropZone",{extend:"Ext.view.DropZone",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,expandDelay:500,indicatorCls:Ext.baseCSSPrefix+"tree-ddindicator",expandNode:function(b){var a=this.view;if(!b.isLeaf()&&!b.isExpanded()){a.expand(b);this.expandProcId=false}},queueExpand:function(a){this.expandProcId=Ext.Function.defer(this.expandNode,this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},getPosition:function(g,b){var j=this.view,c=j.getRecord(b),h=g.getPageY(),k=c.isLeaf(),a=false,i=Ext.fly(b).getRegion(),d;if(c.isRoot()){return"append"}if(this.appendOnly){return k?false:"append"}if(!this.allowParentInsert){a=c.hasChildNodes()&&c.isExpanded()}d=(i.bottom-i.top)/(k?2:3);if(h>=i.top&&h<(i.top+d)){return"before"}else{if(!a&&(k||(h>=(i.bottom-d)&&h<=i.bottom))){return"after"}else{return"append"}}},isValidDropPoint:function(b,j,n,k,g){if(!b||!g.item){return false}var o=this.view,l=o.getRecord(b),d=g.records,a=d.length,m=d.length,c,h;if(!(l&&j&&a)){return false}for(c=0;c<m;c++){h=d[c];if(h.isNode&&h.contains(l)){return false}}if(j==="append"&&l.get("allowDrop")===false){return false}else{if(j!="append"&&l.parentNode.get("allowDrop")===false){return false}}if(Ext.Array.contains(d,l)){return false}return true},onNodeOver:function(a,i,g,c){var d=this.getPosition(g,a),b=this.dropNotAllowed,j=this.view,h=j.getRecord(a),k=this.getIndicator(),m=0,l=0;this.cancelExpand();if(d=="append"&&!this.expandProcId&&!Ext.Array.contains(c.records,h)&&!h.isLeaf()&&!h.isExpanded()){this.queueExpand(h)}if(this.isValidDropPoint(a,d,i,g,c)){this.valid=true;this.currentPosition=d;this.overRecord=h;k.setWidth(Ext.fly(a).getWidth());l=Ext.fly(a).getY()-Ext.fly(j.el).getY()-1;if(d=="before"){b=h.isFirst()?Ext.baseCSSPrefix+"tree-drop-ok-above":Ext.baseCSSPrefix+"tree-drop-ok-between";k.showAt(0,l);i.proxy.show()}else{if(d=="after"){b=h.isLast()?Ext.baseCSSPrefix+"tree-drop-ok-below":Ext.baseCSSPrefix+"tree-drop-ok-between";l+=Ext.fly(a).getHeight();k.showAt(0,l);i.proxy.show()}else{b=Ext.baseCSSPrefix+"tree-drop-ok-append";k.hide()}}}else{this.valid=false}this.currentCls=b;return b},onContainerOver:function(a,c,b){return c.getTarget("."+this.indicatorCls)?this.currentCls:this.dropNotAllowed},notifyOut:function(){this.callParent(arguments);this.cancelExpand()},handleNodeDrop:function(d,l,e){var n=this,o=n.view,g=l.parentNode,p=o.getStore(),r=[],a,c,k,b,j,m,q,h;if(d.copy){a=d.records;d.records=[];for(c=0,k=a.length;c<k;c++){d.records.push(Ext.apply({},a[c].data))}}n.cancelExpand();if(e=="before"){b=g.insertBefore;j=[null,l];l=g}else{if(e=="after"){if(l.nextSibling){b=g.insertBefore;j=[null,l.nextSibling]}else{b=g.appendChild;j=[null]}l=g}else{if(!l.isExpanded()){m=true}b=l.appendChild;j=[null]}}q=function(){var u,t,s,i,v;for(c=0,k=d.records.length;c<k;c++){j[0]=d.records[c];u=b.apply(l,j);if(Ext.enableFx&&n.dropHighlight){r.push(o.getNode(u))}}if(Ext.enableFx&&n.dropHighlight){s=r.length;i=n.dropHighlightColor;for(t=0;t<s;t++){v=r[t];if(v){Ext.fly(v.firstChild?v.firstChild:v).highlight(i)}}}};if(m){l.expand(false,q)}else{q()}}});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{%if (this.openTableWrap)out.push(this.openTableWrap())%}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth(values)]}>',"<tbody>",'<tr class="'+Ext.baseCSSPrefix+'grid-header-row">','<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{%if (this.closeTableWrap)out.push(this.closeTableWrap())%}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c="";if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(b){var a='style="width:{fullWidth}px;';if(!b.rowCount){a+="height:1px;"}return a+'"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}>','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'grid-cell-inner {unselectableCls}" style="text-align: {align}; {{id}-style};">{{id}}</div>',"</td>","</tpl>","</tr>"],firstOrLastCls:function(a,b){if(a===1){return Ext.view.Table.prototype.firstCls}else{if(a===b){return Ext.view.Table.prototype.lastCls}}},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:undefined,closeTableWrap:undefined,getTableTpl:function(k,b){var j,h={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},g={},c=k.features||[],m=c.length,e=0,l={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls,unselectableAttr:k.enableTextSelection?"":'unselectable="on"',unselectableCls:k.enableTextSelection?"":Ext.baseCSSPrefix+"unselectable"},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e<m;e++){if(!c[e].disabled){c[e].mutateMetaRowTpl(d);Ext.apply(l,c[e].getMetaRowTplFragments());Ext.apply(g,c[e].getFragmentTpl());Ext.apply(h,c[e].getTableFragments())}}d=new Ext.XTemplate(d.join(""),l);k.row=d.applyTemplate(k);a=new Ext.XTemplate(this.metaTableTpl.join(""),h);j=a.applyTemplate(k);if(!b){j=new Ext.XTemplate(j,g)}return j}});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect","highlightitem","unhighlightitem")},getFocusEl:function(){return this.getTargetEl()},afterRender:function(){var a=this;a.callParent();a.mon(a.getTargetEl(),{scope:a,freezeEvent:true,click:a.handleEvent,mousedown:a.handleEvent,mouseup:a.handleEvent,dblclick:a.handleEvent,contextmenu:a.handleEvent,mouseover:a.handleEvent,mouseout:a.handleEvent,keydown:a.handleEvent})},handleEvent:function(b){var a=b.type=="keydown"&&b.getKey();if(this.processUIEvent(b)!==false){this.processSpecialEvent(b)}if(a===b.SPACE){b.stopEvent()}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(b,a){var c;if(a&&typeof(a.offsetParent)==="object"){c=(b.type=="mouseout")?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(h){var i=this,k=h.getTarget(i.getItemSelector(),i.getTargetEl()),a=this.statics().EventMap,g,c,j=h.type,d=i.mouseOverItem,b;if(!k){if(j=="mouseover"&&i.stillOverItem(h,d)){k=d}if(j=="keydown"){c=i.getSelectionModel().getLastSelected();if(c){k=i.getNode(c)}}}if(k){g=i.indexOf(k);if(!c){c=i.getRecord(k)}if(!c||i.processItemEvent(c,k,g,h)===false){return false}b=i.isNewItemEvent(k,h);if(b===false){return false}if((i["onBeforeItem"+a[b]](c,k,g,h)===false)||(i.fireEvent("beforeitem"+b,i,c,k,g,h)===false)||(i["onItem"+a[b]](c,k,g,h)===false)){return false}i.fireEvent("item"+b,i,c,k,g,h)}else{if((i.processContainerEvent(h)===false)||(i["onBeforeContainer"+a[j]](h)===false)||(i.fireEvent("beforecontainer"+j,i,h)===false)||(i["onContainer"+a[j]](h)===false)){return false}i.fireEvent("container"+j,i,h)}return true},isNewItemEvent:function(d,g){var c=this,a=c.mouseOverItem,b=g.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(g,a)){return false}c.mouseOverItem=null;return"mouseleave"}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(b){var a=this;a.clearHighlight();a.highlightedItem=b;Ext.fly(b).addCls(a.overItemCls);a.fireEvent("highlightitem",a,b)},clearHighlight:function(){var b=this,a=b.highlightedItem;if(a){Ext.fly(a).removeCls(b.overItemCls);b.fireEvent("unhighlightitem",b,a);delete b.highlightedItem}},onUpdate:function(b,a){var g=this,e,c,d;if(g.rendered){e=g.getNode(a);c=g.callParent(arguments);d=g.highlightedItem;if(d&&d===e){delete g.highlightedItem;if(c){g.highlightItem(c)}}}},refresh:function(){this.clearHighlight();this.callParent(arguments)}});Ext.define("Ext.view.BoundList",{extend:"Ext.view.View",alias:"widget.boundlist",alternateClassName:"Ext.BoundList",requires:["Ext.layout.component.BoundList","Ext.toolbar.Paging"],pageSize:0,baseCls:Ext.baseCSSPrefix+"boundlist",itemCls:Ext.baseCSSPrefix+"boundlist-item",listItemCls:"",shadow:false,trackOver:true,refreshed:0,deferInitialRefresh:false,componentLayout:"boundlist",childEls:["listEl"],renderTpl:['<div id="{id}-listEl" class="{baseCls}-list-ct" style="overflow:auto"></div>',"{%","var me=values.$comp, pagingToolbar=me.pagingToolbar;","if (pagingToolbar) {","pagingToolbar.ownerLayout = me.componentLayout;","Ext.DomHelper.generateMarkup(pagingToolbar.getRenderTree(), out);","}","%}",{disableFormats:true}],initComponent:function(){var b=this,a=b.baseCls,c=b.itemCls;b.selectedItemCls=a+"-selected";b.overItemCls=a+"-item-over";b.itemSelector="."+c;if(b.floating){b.addCls(a+"-floating")}if(!b.tpl){b.tpl=new Ext.XTemplate('<ul><tpl for=".">','<li role="option" class="'+c+'">'+b.getInnerTpl(b.displayField)+"</li>","</tpl></ul>")}else{if(Ext.isString(b.tpl)){b.tpl=new Ext.XTemplate(b.tpl)}}if(b.pageSize){b.pagingToolbar=b.createPagingToolbar()}b.callParent()},up:function(b){var a=this.pickerField;if(b){for(;a;a=a.ownerCt){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},createPagingToolbar:function(){return Ext.widget("pagingtoolbar",{id:this.id+"-paging-toolbar",pageSize:this.pageSize,store:this.store,border:false})},finishRenderChildren:function(){var a=this.pagingToolbar;this.callParent(arguments);if(a){a.finishRender()}},refresh:function(){var b=this,a=b.pagingToolbar;b.callParent();if(b.rendered&&a&&!b.preserveScrollOnRefresh){b.el.appendChild(a.el)}},bindStore:function(a,b){var c=this.pagingToolbar;this.callParent(arguments);if(c){c.bindStore(this.store,b)}},getTargetEl:function(){return this.listEl||this.el},getInnerTpl:function(a){return"{"+a+"}"},onDestroy:function(){Ext.destroyMembers(this,"pagingToolbar","listEl");this.callParent()}});Ext.define("Ext.picker.Time",{extend:"Ext.view.BoundList",alias:"widget.timepicker",requires:["Ext.data.Store","Ext.Date"],increment:15,format:"g:i A",displayField:"disp",initDate:[2008,0,1],componentCls:Ext.baseCSSPrefix+"timepicker",loadMask:false,initComponent:function(){var c=this,a=Ext.Date,b=a.clearTime,d=c.initDate;c.absMin=b(new Date(d[0],d[1],d[2]));c.absMax=a.add(b(new Date(d[0],d[1],d[2])),"mi",(24*60)-1);c.store=c.createStore();c.updateList();c.callParent()},setMinValue:function(a){this.minValue=a;this.updateList()},setMaxValue:function(a){this.maxValue=a;this.updateList()},normalizeDate:function(a){var b=this.initDate;a.setFullYear(b[0],b[1],b[2]);return a},updateList:function(){var c=this,b=c.normalizeDate(c.minValue||c.absMin),a=c.normalizeDate(c.maxValue||c.absMax);c.store.filterBy(function(d){var e=d.get("date");return e>=b&&e<=a})},createStore:function(){var d=this,c=Ext.Date,e=[],b=d.absMin,a=d.absMax;while(b<=a){e.push({disp:c.dateFormat(b,d.format),date:b});b=c.add(b,"mi",d.increment)}return new Ext.data.Store({fields:["disp","date"],data:e})}});Ext.define("Ext.view.BoundListKeyNav",{extend:"Ext.util.KeyNav",requires:"Ext.view.BoundList",constructor:function(b,a){var c=this;c.boundList=a.boundList;c.callParent([b,Ext.apply({},a,c.defaultHandlers)])},defaultHandlers:{up:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c>0?c-1:d.getCount()-1;e.highlightAt(a)},down:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c<d.getCount()-1?c+1:0;e.highlightAt(a)},pageup:function(){},pagedown:function(){},home:function(){this.highlightAt(0)},end:function(){var a=this;a.highlightAt(a.boundList.all.getCount()-1)},enter:function(a){this.selectHighlighted(a)}},highlightAt:function(b){var a=this.boundList,c=a.all.item(b);if(c){c=c.dom;a.highlightItem(c);a.getTargetEl().scrollChildIntoView(c,false)}},selectHighlighted:function(g){var d=this,b=d.boundList,c=b.highlightedItem,a=b.getSelectionModel();if(c){a.selectWithEvent(b.getRecord(c),g)}}});Ext.define("Ext.form.field.ComboBox",{extend:"Ext.form.field.Picker",requires:["Ext.util.DelayedTask","Ext.EventObject","Ext.view.BoundList","Ext.view.BoundListKeyNav","Ext.data.StoreManager","Ext.layout.component.field.ComboBox"],alternateClassName:"Ext.form.ComboBox",alias:["widget.combobox","widget.combo"],mixins:{bindable:"Ext.util.Bindable"},componentLayout:"combobox",triggerCls:Ext.baseCSSPrefix+"form-arrow-trigger",hiddenName:"",hiddenDataCls:Ext.baseCSSPrefix+"hide-display "+Ext.baseCSSPrefix+"form-data-hidden",fieldSubTpl:['<div class="{hiddenDataCls}" role="presentation"></div>','<input id="{id}" type="{type}" {inputAttrTpl} class="{fieldCls} {typeCls}" autocomplete="off"','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="name"> name="{name}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',"/>",{compiled:true,disableFormats:true}],getSubTplData:function(){var a=this;Ext.applyIf(a.subTplData,{hiddenDataCls:a.hiddenDataCls});return a.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);a.setHiddenValue(a.value)},multiSelect:false,delimiter:", ",displayField:"text",triggerAction:"all",allQuery:"",queryParam:"query",queryMode:"remote",queryCaching:true,pageSize:0,autoSelect:true,typeAhead:false,typeAheadDelay:250,selectOnTab:true,forceSelection:false,growToLongestValue:true,defaultListConfig:{loadingHeight:70,minWidth:70,maxHeight:300,shadow:"sides"},ignoreSelection:0,removingRecords:null,resizeComboToGrow:function(){var a=this;return a.grow&&a.growToLongestValue},initComponent:function(){var e=this,c=Ext.isDefined,b=e.store,d=e.transform,a,g;Ext.applyIf(e.renderSelectors,{hiddenDataEl:"."+e.hiddenDataCls.split(" ").join(".")});this.addEvents("beforequery","select","beforeselect","beforedeselect");if(d){a=Ext.getDom(d);if(a){if(!e.store){b=Ext.Array.map(Ext.Array.from(a.options),function(h){return[h.value,h.text]})}if(!e.name){e.name=a.name}if(!("value" in e)){e.value=a.value}}}e.bindStore(b||"ext-empty-store",true);b=e.store;if(b.autoCreated){e.queryMode="local";e.valueField=e.displayField="field1";if(!b.expanded){e.displayField="field2"}}if(!c(e.valueField)){e.valueField=e.displayField}g=e.queryMode==="local";if(!c(e.queryDelay)){e.queryDelay=g?10:500}if(!c(e.minChars)){e.minChars=g?0:4}if(!e.displayTpl){e.displayTpl=new Ext.XTemplate('<tpl for=".">{[typeof values === "string" ? values : values["'+e.displayField+'"]]}<tpl if="xindex < xcount">'+e.delimiter+"</tpl></tpl>")}else{if(Ext.isString(e.displayTpl)){e.displayTpl=new Ext.XTemplate(e.displayTpl)}}e.callParent();e.doQueryTask=new Ext.util.DelayedTask(e.doRawQuery,e);if(e.store.getCount()>0){e.setValue(e.value)}if(a){e.render(a.parentNode,a);Ext.removeNode(a);delete e.renderTo}},getStore:function(){return this.store},beforeBlur:function(){this.doQueryTask.cancel();this.assertValue()},assertValue:function(){var a=this,b=a.getRawValue(),c;if(a.forceSelection){if(a.multiSelect){if(b!==a.getDisplayValue()){a.setValue(a.lastSelection)}}else{c=a.findRecordByDisplay(b);if(c){a.select(c)}else{a.setValue(a.lastSelection)}}}a.collapse()},onTypeAhead:function(){var e=this,d=e.displayField,b=e.store.findRecord(d,e.getRawValue()),c=e.getPicker(),g,a,h;if(b){g=b.get(d);a=g.length;h=e.getRawValue().length;c.highlightItem(c.getNode(b));if(h!==0&&h!==a){e.setRawValue(g);e.selectText(h,g.length)}}},resetToDefault:function(){},onUnbindStore:function(a){var b=this.picker;if(!a&&b){b.bindStore(null)}},onBindStore:function(a,c){var b=this.picker;if(!c){this.resetToDefault()}if(b){b.bindStore(a)}},getStoreListeners:function(){var a=this;return{beforeload:a.onBeforeLoad,clear:a.onClear,datachanged:a.onDataChanged,load:a.onLoad,exception:a.onException,remove:a.onRemove}},onBeforeLoad:function(){++this.ignoreSelection},onDataChanged:function(){var a=this;if(a.resizeComboToGrow()){a.updateLayout()}},onClear:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true;a.onDataChanged()}},onRemove:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true}},onException:function(){if(this.ignoreSelection>0){--this.ignoreSelection}this.collapse()},onLoad:function(){var a=this,b=a.value;if(a.ignoreSelection>0){--a.ignoreSelection}if(a.rawQuery){a.rawQuery=false;a.syncSelection();if(a.picker&&!a.picker.getSelectionModel().hasSelection()){a.doAutoSelect()}}else{if(a.value||a.value===0){a.setValue(a.value)}else{if(a.store.getCount()){a.doAutoSelect()}else{a.setValue(a.value)}}}},doRawQuery:function(){this.doQuery(this.getRawValue(),false,true)},doQuery:function(i,d,g){i=i||"";var e=this,b={query:i,forceAll:d,combo:e,cancel:false},a=e.store,h=e.queryMode==="local",c;if(e.fireEvent("beforequery",b)===false||b.cancel){return false}i=b.query;d=b.forceAll;if(d||(i.length>=e.minChars)){e.expand();if(!e.queryCaching||e.lastQuery!==i){e.lastQuery=i;if(h){a.suspendEvents();c=e.clearFilter();if(i||!d){e.activeFilter=new Ext.util.Filter({root:"data",property:e.displayField,value:i});a.filter(e.activeFilter);c=true}else{delete e.activeFilter}a.resumeEvents();if(e.rendered&&c){e.getPicker().refresh()}}else{e.rawQuery=g;if(e.pageSize){e.loadPage(1)}else{a.load({params:e.getParams(i)})}}}if(e.getRawValue()!==e.getDisplayValue()){e.ignoreSelection++;e.picker.getSelectionModel().deselectAll();e.ignoreSelection--}if(h){e.doAutoSelect()}if(e.typeAhead){e.doTypeAhead()}}return true},clearFilter:function(){var a=this.store,d=a.filters,c=this.activeFilter,b;if(c){if(d.getCount()>1){d.remove(c);b=d.getRange()}a.clearFilter(true);if(b){a.filter(b)}}return !!c},loadPage:function(a){this.store.loadPage(a,{params:this.getParams(this.lastQuery)})},onPageChange:function(b,a){this.loadPage(a);return false},getParams:function(c){var b={},a=this.queryParam;if(a){b[a]=c}return b},doAutoSelect:function(){var b=this,a=b.picker,c,d;if(a&&b.autoSelect&&b.store.getCount()>0){c=a.getSelectionModel().lastSelected;d=a.getNode(c||0);if(d){a.highlightItem(d);a.listEl.scrollChildIntoView(d,false)}}},doTypeAhead:function(){if(!this.typeAheadTask){this.typeAheadTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.typeAheadTask.delay(this.typeAheadDelay)}},onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.onFocus({});if(a.triggerAction==="all"){a.doQuery(a.allQuery,true)}else{a.doQuery(a.getRawValue(),false,true)}}a.inputEl.focus()}},onKeyUp:function(d,b){var c=this,a=d.getKey();if(!c.readOnly&&!c.disabled&&c.editable){c.lastKey=a;if(!d.isSpecialKey()||a==d.BACKSPACE||a==d.DELETE){c.doQueryTask.delay(c.queryDelay)}}if(c.enableKeyEvents){c.callParent(arguments)}},initEvents:function(){var a=this;a.callParent();if(!a.enableKeyEvents){a.mon(a.inputEl,"keyup",a.onKeyUp,a)}},onDestroy:function(){this.bindStore(null);this.callParent()},onAdded:function(){var a=this;a.callParent(arguments);if(a.picker){a.picker.ownerCt=a.up("[floating]");a.picker.registerWithOwnerCt()}},createPicker:function(){var c=this,b,d=Ext.baseCSSPrefix+"menu",a=Ext.apply({xtype:"boundlist",pickerField:c,selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,ownerCt:c.up("[floating]"),cls:c.el&&c.el.up("."+d)?d:"",store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);b=c.picker=Ext.widget(a);if(c.pageSize){b.pagingToolbar.on("beforechange",c.onPageChange,c)}c.mon(b,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(b.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return b},alignPicker:function(){var b=this,a=b.getPicker(),e=b.getPosition()[1]-Ext.getBody().getScroll().top,d=Ext.Element.getViewHeight()-e-b.getHeight(),c=Math.max(e,d);if(a.height){delete a.height;a.updateLayout()}if(a.getHeight()>c-5){a.setHeight(c-5)}b.callParent()},onListRefresh:function(){this.alignPicker();this.syncSelection()},onItemClick:function(c,a){var e=this,d=e.picker.getSelectionModel().getSelection(),b=e.valueField;if(!e.multiSelect&&d.length){if(a.get(b)===d[0].get(b)){e.displayTplData=[a.data];e.setRawValue(e.getDisplayValue());e.collapse()}}},onBeforeSelect:function(b,a){return this.fireEvent("beforeselect",this,a,a.index)},onBeforeDeselect:function(b,a){return this.fireEvent("beforedeselect",this,a,a.index)},onListSelectionChange:function(b,d){var a=this,e=a.multiSelect,c=d.length>0;if(!a.ignoreSelection&&a.isExpanded){if(!e){Ext.defer(a.collapse,1,a)}if(e||c){a.setValue(d,false)}if(c){a.fireEvent("select",a,d)}a.inputEl.focus()}},onExpand:function(){var d=this,a=d.listKeyNav,c=d.selectOnTab,b=d.getPicker();if(a){a.enable()}else{a=d.listKeyNav=new Ext.view.BoundListKeyNav(this.inputEl,{boundList:b,forceKeyDown:true,tab:function(g){if(c){this.selectHighlighted(g);d.triggerBlur()}return true}})}if(c){d.ignoreMonitorTab=true}Ext.defer(a.enable,1,a);d.inputEl.focus()},onCollapse:function(){var b=this,a=b.listKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},select:function(a){this.setValue(a,true)},findRecord:function(d,c){var b=this.store,a=b.findExact(d,c);return a!==-1?b.getAt(a):false},findRecordByValue:function(a){return this.findRecord(this.valueField,a)},findRecordByDisplay:function(a){return this.findRecord(this.displayField,a)},setValue:function(m,e){var k=this,c=k.valueNotFoundText,n=k.inputEl,g,j,h,a,l=[],b=[],d=[];if(k.store.loading){k.value=m;k.setHiddenValue(k.value);return k}m=Ext.Array.from(m);for(g=0,j=m.length;g<j;g++){h=m[g];if(!h||!h.isModel){h=k.findRecordByValue(h)}if(h){l.push(h);b.push(h.data);d.push(h.get(k.valueField))}else{if(!k.forceSelection){d.push(m[g]);a={};a[k.displayField]=m[g];b.push(a)}else{if(Ext.isDefined(c)){b.push(c)}}}}k.setHiddenValue(d);k.value=k.multiSelect?d:d[0];if(!Ext.isDefined(k.value)){k.value=null}k.displayTplData=b;k.lastSelection=k.valueModels=l;if(n&&k.emptyText&&!Ext.isEmpty(m)){n.removeCls(k.emptyCls)}k.setRawValue(k.getDisplayValue());k.checkChange();if(e!==false){k.syncSelection()}k.applyEmptyText();return k},setHiddenValue:function(j){var e=this,a=e.hiddenName,d,b,k,h,g,c;if(!e.hiddenDataEl||!a){return}j=Ext.Array.from(j);b=e.hiddenDataEl.dom;k=b.childNodes;h=k[0];g=j.length;c=k.length;if(!h&&g>0){e.hiddenDataEl.update(Ext.DomHelper.markup({tag:"input",type:"hidden",name:a}));c=1;h=b.firstChild}while(c>g){b.removeChild(k[0]);--c}while(c<g){b.appendChild(h.cloneNode(true));++c}for(d=0;d<g;d++){k[d].value=j[d]}},getDisplayValue:function(){return this.displayTpl.apply(this.displayTplData)},getValue:function(){var b=this,a=b.picker,d=b.getRawValue(),c=b.value;if(b.getDisplayValue()!==d){c=d;b.value=b.displayTplData=b.valueModels=null;if(a){b.ignoreSelection++;a.getSelectionModel().deselectAll();b.ignoreSelection--}}return c},getSubmitValue:function(){return this.getValue()},isEqual:function(e,d){var b=Ext.Array.from,c,a;e=b(e);d=b(d);a=e.length;if(a!==d.length){return false}for(c=0;c<a;c++){if(d[c]!==e[c]){return false}}return true},clearValue:function(){this.setValue([])},syncSelection:function(){var h=this,d=h.picker,g,c,b=h.valueModels||[],e=b.length,a,i;if(d){g=[];for(a=0;a<e;a++){i=b[a];if(i&&i.isModel&&h.store.indexOf(i)>=0){g.push(i)}}h.ignoreSelection++;c=d.getSelectionModel();c.deselectAll();if(g.length){c.select(g)}h.ignoreSelection--}},onEditorTab:function(b){var a=this.listKeyNav;if(this.selectOnTab&&a){a.selectHighlighted(b)}}});Ext.define("Ext.form.field.Time",{extend:"Ext.form.field.ComboBox",alias:"widget.timefield",requires:["Ext.form.field.Date","Ext.picker.Time","Ext.view.BoundListKeyNav","Ext.Date"],alternateClassName:["Ext.form.TimeField","Ext.form.Time"],triggerCls:Ext.baseCSSPrefix+"form-time-trigger",minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",submitFormat:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,pickerMaxHeight:300,selectOnTab:true,snapToIncrement:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",ignoreSelection:0,queryMode:"local",displayField:"disp",valueField:"date",initComponent:function(){var c=this,b=c.minValue,a=c.maxValue;if(b){c.setMinValue(b)}if(a){c.setMaxValue(a)}c.displayTpl=new Ext.XTemplate('<tpl for=".">{[typeof values === "string" ? values : this.formatDate(values["'+c.displayField+'"])]}<tpl if="xindex < xcount">'+c.delimiter+"</tpl></tpl>",{formatDate:Ext.Function.bind(c.formatDate,c)});this.callParent()},setMinValue:function(c){var b=this,a=b.picker;b.setLimit(c,true);if(a){a.setMinValue(b.minValue)}},setMaxValue:function(c){var b=this,a=b.picker;b.setLimit(c,false);if(a){a.setMaxValue(b.maxValue)}},setLimit:function(b,g){var a=this,e,c;if(Ext.isString(b)){e=a.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){c=Ext.Date.clearTime(new Date(a.initDate));c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{c=null}a[g?"minValue":"maxValue"]=c},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},getErrors:function(d){var b=this,g=Ext.String.format,h=b.callParent(arguments),c=b.minValue,e=b.maxValue,a;d=b.formatDate(d||b.processRawValue(b.getRawValue()));if(d===null||d.length<1){return h}a=b.parseDate(d);if(!a){h.push(g(b.invalidText,d,Ext.Date.unescapeFormat(b.format)));return h}if(c&&a<c){h.push(g(b.minText,b.formatDate(c)))}if(e&&a>e){h.push(g(b.maxText,b.formatDate(e)))}return h},formatDate:function(){return Ext.form.field.Date.prototype.formatDate.apply(this,arguments)},parseDate:function(e){var d=this,h=e,b=d.altFormats,g=d.altFormatsArray,c=0,a;if(e&&!Ext.isDate(e)){h=d.safeParse(e,d.format);if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}}if(h&&d.snapToIncrement){h=new Date(Ext.Number.snap(h.getTime(),d.increment*60*1000))}return h},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsDateInfo(g)){a=b.parse(e,g)}else{c=b.parse(d.initDate+" "+e,d.initDateFormat+" "+g);if(c){a=c}}return a},getSubmitValue:function(){var a=this,c=a.submitFormat||a.format,b=a.getValue();return b?Ext.Date.format(b,c):null},createPicker:function(){var b=this,a;b.listConfig=Ext.apply({xtype:"timepicker",selModel:{mode:"SINGLE"},cls:undefined,minValue:b.minValue,maxValue:b.maxValue,increment:b.increment,format:b.format,maxHeight:b.pickerMaxHeight},b.listConfig);a=b.callParent();b.store=a.store;return a},onItemClick:function(b,a){var d=this,c=b.getSelectionModel().getSelection();if(c.length>0){c=c[0];if(c&&Ext.Date.isEqual(a.get("date"),c.get("date"))){d.collapse()}}},onListSelectionChange:function(c,e){var b=this,a=e[0],d=a?a.get("date"):null;if(!b.ignoreSelection){b.skipSync=true;b.setValue(d);b.skipSync=false;b.fireEvent("select",b,d);b.picker.clearHighlight();b.collapse();b.inputEl.focus()}},syncSelection:function(){var j=this,h=j.picker,c,g,k,b,i,e,a;if(h&&!j.skipSync){h.clearHighlight();k=j.getValue();g=h.getSelectionModel();j.ignoreSelection++;if(k===null){g.deselectAll()}else{if(Ext.isDate(k)){b=h.store.data.items;e=b.length;for(i=0;i<e;i++){a=b[i];if(Ext.Date.isEqual(a.get("date"),k)){c=a;break}}g.select(c)}}j.ignoreSelection--}},postBlur:function(){var a=this;a.callParent(arguments);a.setRawValue(a.formatDate(a.getValue()))},setValue:function(a){this.getPicker();this.callParent([this.parseDate(a)])},getValue:function(){var a=this.callParent(arguments);return this.parseDate(a)}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"tr."+Ext.baseCSSPrefix+"grid-row",cellSelector:"td."+Ext.baseCSSPrefix+"grid-cell",rowSelector:"tr."+Ext.baseCSSPrefix+"grid-row",firstCls:Ext.baseCSSPrefix+"grid-cell-first",lastCls:Ext.baseCSSPrefix+"grid-cell-last",headerRowSelector:"tr."+Ext.baseCSSPrefix+"grid-header-row",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:new RegExp("(?:^|\\s*)"+Ext.baseCSSPrefix+"grid-row-(first|last|alt)(?:\\s+|$)","g"),cellRe:new RegExp(Ext.baseCSSPrefix+"grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,stripeRows:true,markDirty:true,initComponent:function(){var b=this,a=b.scroll;b.autoScroll=undefined;if(a===true||a==="both"){b.style=Ext.apply(b.style||{},{overflow:"auto"})}else{if(a==="horizontal"){b.style=Ext.apply(b.style||{},{"overflow-x":"auto","overflow-y":"hidden"})}else{if(a==="vertical"){b.style=Ext.apply(b.style||{},{"overflow-x":"hidden","overflow-y":"auto"})}else{b.style=Ext.apply(b.style||{},{overflow:"hidden"})}}}b.selModel.view=b;b.headerCt.view=b;b.headerCt.markDirty=b.markDirty;b.initFeatures(b.grid);delete b.grid;b.tpl="<div></div>";b.callParent()},moveColumn:function(a,p,d){var n=this,l=(d>1)?document.createDocumentFragment():undefined,c=p,q=n.getGridColumns().length,o=q-1,b=(n.firstCls||n.lastCls)&&(p==0||p==q||a==0||a==o),g,e,r,k,m,h;if(n.rendered){h=n.el.query(n.headerRowSelector);r=n.el.query(n.rowSelector);if(p>a&&l){c-=d}for(g=0,k=h.length;g<k;++g){m=h[g];if(l){for(e=0;e<d;e++){l.appendChild(m.cells[a])}m.insertBefore(l,m.cells[c]||null)}else{m.insertBefore(m.cells[a],m.cells[c]||null)}}for(g=0,k=r.length;g<k;g++){m=r[g];if(b){if(a===0){Ext.fly(m.cells[0]).removeCls(n.firstCls);Ext.fly(m.cells[1]).addCls(n.firstCls)}else{if(a===o){Ext.fly(m.cells[o]).removeCls(n.lastCls);Ext.fly(m.cells[o-1]).addCls(n.lastCls)}}if(p===0){Ext.fly(m.cells[0]).removeCls(n.firstCls);Ext.fly(m.cells[a]).addCls(n.firstCls)}else{if(p===q){Ext.fly(m.cells[o]).removeCls(n.lastCls);Ext.fly(m.cells[a]).addCls(n.lastCls)}}}if(l){for(e=0;e<d;e++){l.appendChild(m.cells[a])}m.insertBefore(l,m.cells[c]||null)}else{m.insertBefore(m.cells[a],m.cells[c]||null)}}n.setNewTemplate()}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(d){var g=this,c,e,b,a;g.featuresMC=new Ext.util.MixedCollection();e=g.features=g.prepareFeatures();a=e?e.length:0;for(c=0;c<a;c++){b=e[c];b.view=g;b.grid=d;g.featuresMC.add(b);b.init()}},prepareFeatures:function(){var g=this,e=g.features,d,b,c=0,a;if(e){b=[];a=e.length;for(;c<a;c++){d=e[c];if(!d.isFeature){d=Ext.create("feature."+d.ftype,d)}b[c]=d}}return b},attachEventsForFeatures:function(){var b=this.features,c=b.length,a=0;for(;a<c;a++){if(b[a].isFeature){b[a].attachEvents()}}},afterRender:function(){var a=this;a.callParent();if(!a.enableTextSelection){a.el.unselectable()}a.attachEventsForFeatures()},onViewScroll:function(b,a){this.callParent(arguments);this.fireEvent("bodyscroll",b,a)},prepareData:function(b,h,d){var g=this,k=g.headerCt.prepareData(b,h,d,g,g.ownerCt),a=g.features,e=a.length,c=0,j;for(;c<e;c++){j=a[c];if(j.isFeature){Ext.apply(k,j.getAdditionalData(b,h,d,k,g))}}return k},collectData:function(d,p){var r=this.callParent(arguments),c=this.headerCt,n=c.getFullWidth(),b=this.features,l=b.length,a={rows:r,fullWidth:n},h=0,s,g=0,m,k,e,q;m=r.length;if(this.getRowClass){for(;g<m;g++){k={};e=r[g];q=e.rowCls||"";e.rowCls=this.getRowClass(d[g],g,k,this.store)+" "+q}}for(;h<l;h++){s=b[h];if(s.isFeature&&s.collectData&&!s.disabled){a=s.collectData(d,r,p,n,a);break}}return a},forceReflow:Ext.isGecko10?function(){var b=this.el.down("table"),a;if(b){a=b.getWidth()}}:Ext.emptyFn,onHeaderResize:function(e,a,d){var c=this,b=c.el;if(b){b.select("th."+Ext.baseCSSPrefix+"grid-col-resizer-"+e.id).setWidth(a);b.select("table."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(c.headerCt.getFullWidth());if(!c.ignoreTemplate){c.setNewTemplate()}if(!d){c.el.focus()}c.forceReflow()}},onHeaderShow:function(c,d,b){var a=this;a.ignoreTemplate=true;if(d.oldWidth){a.onHeaderResize(d,d.oldWidth,b);delete d.oldWidth}else{if(d.width&&!d.flex){a.onHeaderResize(d,d.width,b)}else{if(d.el){a.onHeaderResize(d,d.el.getWidth(),b)}}}delete a.ignoreTemplate;a.setNewTemplate()},onHeaderHide:function(b,c,a){this.onHeaderResize(c,0,a)},refreshSize:function(){var b=this,a;if(!b.hasLoadingHeight){a=b.up("tablepanel");Ext.suspendLayouts();b.callParent();if(a&&Ext.getScrollbarSize().width){a.updateLayout()}Ext.resumeLayouts(true)}},setNewTemplate:function(){var b=this,a=b.headerCt.getColumnsForTpl(true);b.tpl=b.getTableChunker().getTableTpl({rowCount:b.store.getCount(),columns:a,features:b.features,enableTextSelection:b.enableTextSelection})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(b){var a=this;a.removeRowCls(b,a.selectedItemCls);a.removeRowCls(b,a.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b);if(a){a.addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b);if(a){a.removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(a){if(a){var b=this.getNode(a.row),c=this.headerCt.getHeaderAtIndex(a.column);if(c&&b){return Ext.fly(b).down(c.getCellSelector())}}return false},onRowFocus:function(d,b,a){var c=this;if(b){c.addRowCls(d,c.focusedItemCls);if(!a){c.focusRow(d)}}else{c.removeRowCls(d,c.focusedItemCls)}},focusRow:function(b){var g=this,k=g.getNode(b),c=g.el,i=0,a=g.ownerCt,j,h,e,d;if(k&&c){h=c.getY();e=h+c.dom.clientHeight;j=Ext.fly(k).getRegion();if(j.top<h){i=j.top-h}else{if(j.bottom>e){i=j.bottom-e}}d=g.getRecord(k);b=g.store.indexOf(d);if(i){a.scrollByDeltaY(i)}g.fireEvent("rowfocus",d,k,b)}},focusCell:function(h){var j=this,k=j.getCellByPosition(h),b=j.el,d=0,e=0,c=b.getRegion(),a=j.ownerCt,i,g;c.bottom=c.top+b.dom.clientHeight;c.right=c.left+b.dom.clientWidth;if(k){i=k.getRegion();if(i.top<c.top){d=i.top-c.top}else{if(i.bottom>c.bottom){d=i.bottom-c.bottom}}if(i.left<c.left){e=i.left-c.left}else{if(i.right>c.right){e=i.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();j.fireEvent("cellfocus",g,k,h)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(p,g,d,o){var n=this,j,q,l,a,b,h,e,c,k,m,r;if(n.rendered){j=n.store.indexOf(g);c=n.headerCt.getGridColumns();k=n.overItemCls;if(c.length&&j>-1){q=n.bufferRender([g],j)[0];l=n.all.item(j);m=l.hasCls(k);l.dom.className=q.className;if(m){l.addCls(k)}a=l.query(this.cellSelector);b=Ext.fly(q).query(this.cellSelector);h=b.length;r=a[0].parentNode;for(e=0;e<h;e++){if(n.shouldUpdateCell(c[e],o)){r.insertBefore(b[e],a[e]);r.removeChild(a[e])}}n.selModel.refresh();n.doStripeRows(j,j);n.fireEvent("itemupdate",g,j,q)}}},shouldUpdateCell:function(b,a){if(b.hasCustomRenderer){return true}return !a||Ext.Array.contains(a,b.dataIndex)},refresh:function(){this.setNewTemplate();this.callParent(arguments);this.doStripeRows(0)},processItemEvent:function(b,m,j,d){var h=this,k=d.getTarget(h.cellSelector,m),i=k?k.cellIndex:-1,a=h.statics().EventMap,c=h.getSelectionModel(),g=d.type,l;if(g=="keydown"&&!k&&c.getCurrentPosition){k=h.getCellByPosition(c.getCurrentPosition());if(k){k=k.dom;i=k.cellIndex}}l=h.fireEvent("uievent",g,h,k,j,i,d,b,m);if(l===false||h.callParent(arguments)===false){return false}if(g=="mouseover"||g=="mouseout"){return true}if(!k){return true}return !((h["onBeforeCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("beforecell"+g,h,k,i,b,m,j,d)===false)||(h["onCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("cell"+g,h,k,i,b,m,j,d)===false))},processSpecialEvent:function(k){var n=this,b=n.statics().EventMap,d=n.features,m=d.length,o=k.type,g,p,h,j,c,l,a=n.ownerCt;n.callParent(arguments);if(o=="mouseover"||o=="mouseout"){return}for(g=0;g<m;g++){p=d[g];if(p.hasFeatureEvent){j=k.getTarget(p.eventSelector,n.getTargetEl());if(j){h=p.eventPrefix;c=p.getFireEventArgs("before"+h+o,n,j,k);l=p.getFireEventArgs(h+o,n,j,k);if((n.fireEvent.apply(n,c)===false)||(a.fireEvent.apply(a,c)===false)||(n.fireEvent.apply(n,l)===false)||(a.fireEvent.apply(a,l)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(b){if(b){var a=this.getMaxContentWidth(b);delete b.flex;b.setWidth(a)}},getMaxContentWidth:function(h){var a=h.getCellInnerSelector(),c=this.el.query(a),d=0,g=c.length,e=h.el.dom.scrollWidth,b;for(;d<g;d++){b=c[d].scrollWidth;if(b>e){e=b}}return e},getPositionByEvent:function(g){var d=this,b=g.getTarget(d.cellSelector),c=g.getTarget(d.itemSelector),a=d.getRecord(c),h=d.getHeaderByCell(b);return d.getPosition(a,h)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(l,m,h,n,a,o){if(!l){return}var j=this,p=l.row,d=l.column,k=j.store.getCount(),g=j.getFirstVisibleColumnIndex(),b=j.getLastVisibleColumnIndex(),i={row:p,column:d},c=j.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}h=h||{};m=m.toLowerCase();switch(m){case"right":if(d===b){if(n||p===k-1){return false}if(!h.ctrlKey){i.row=p+1;i.column=g}}else{if(!h.ctrlKey){i.column=d+j.getRightGap(c)}else{i.column=b}}break;case"left":if(d===g){if(n||p===0){return false}if(!h.ctrlKey){i.row=p-1;i.column=b}}else{if(!h.ctrlKey){i.column=d+j.getLeftGap(c)}else{i.column=g}}break;case"up":if(p===0){return false}else{if(!h.ctrlKey){i.row=p-1}else{i.row=0}}break;case"down":if(p===k-1){return false}else{if(!h.ctrlKey){i.row=p+1}else{i.row=k-1}}break}if(a&&a.call(o||window,i)!==true){return false}else{return i}},getFirstVisibleColumnIndex:function(){var a=this.getHeaderCt().getVisibleGridColumns()[0];return a?a.getIndex():-1},getLastVisibleColumnIndex:function(){var b=this.getHeaderCt().getVisibleGridColumns(),a=b[b.length-1];return a.getIndex()},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},doStripeRows:function(b,a){var d=this,e,h,c,g;if(d.rendered&&d.stripeRows){e=d.getNodes(b,a);for(c=0,h=e.length;c<h;c++){g=e[c];g.className=g.className.replace(d.rowClsRe," ");b++;if(b%2===0){g.className+=(" "+d.altRowCls)}}}}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView","Ext.view.Table"],syncRowHeight:true,headerCounter:0,scrollDelta:40,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var c=this,g,d,b,e,a;if(c.subGridXType){g=c.subGridXType}else{d=this.getXTypes().split("/");b=d.length;e=d[b-1];a=d[b-2];if(a!=="tablepanel"){g=a}else{g=e}}return g},injectLockable:function(){this.lockable=true;this.hasView=true;var q=this,l=Ext.getScrollbarSize().width===0,r=q.store=Ext.StoreManager.lookup(q.store),a=q.determineXTypeToCreate(),m=q.getSelectionModel(),k=q.prepareFeatures(),g=q.prepareFeatures(),d,o,h=0,n,c,b,j,s,e,p;for(h=0,n=(k?k.length:0);h<n;h++){k[h].lockingPartner=g[h];g[h].lockingPartner=k[h]}d=Ext.apply({xtype:a,store:r,scrollerOwner:false,enableAnimations:false,scroll:l?"vertical":false,selModel:m,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked",isLayoutRoot:function(){return false},features:k},q.lockedGridConfig);o=Ext.apply({xtype:a,store:r,scrollerOwner:false,enableAnimations:false,selModel:m,border:false,isLayoutRoot:function(){return false},features:g},q.normalGridConfig);q.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(o,q,q.bothCfgCopy);Ext.copyTo(d,q,q.bothCfgCopy);Ext.copyTo(o,q,q.normalCfgCopy);Ext.copyTo(d,q,q.lockedCfgCopy);for(h=0;h<q.normalCfgCopy.length;h++){delete q[q.normalCfgCopy[h]]}for(h=0;h<q.lockedCfgCopy.length;h++){delete q[q.lockedCfgCopy[h]]}q.addEvents("lockcolumn","unlockcolumn");q.addStateEvents(["lockcolumn","unlockcolumn"]);q.lockedHeights=[];q.normalHeights=[];c=q.processColumns(q.columns);d.width=c.lockedWidth+Ext.num(m.headerWidth,0);d.columns=c.locked;o.columns=c.normal;o.flex=1;d.viewConfig=q.lockedViewConfig||{};d.viewConfig.loadingUseMsg=false;o.viewConfig=q.normalViewConfig||{};Ext.applyIf(d.viewConfig,q.viewConfig);Ext.applyIf(o.viewConfig,q.viewConfig);q.normalGrid=Ext.ComponentManager.create(o);q.lockedGrid=Ext.ComponentManager.create(d);q.view=new Ext.grid.LockingView({locked:q.lockedGrid,normal:q.normalGrid,panel:q});s=q.lockedGrid.getView();e=q.normalGrid.getView();if(l){p={scroll:{fn:q.onLockedViewScroll,element:"el",scope:q}}}else{p={mousewheel:{fn:q.onLockedViewMouseWheel,element:"el",scope:q}}}if(q.syncRowHeight){p.refresh=q.onLockedViewRefresh;p.itemupdate=q.onLockedViewItemUpdate;p.scope=q}s.on(p);p={scroll:{fn:q.onNormalViewScroll,element:"el",scope:q},refresh:q.syncRowHeight?q.onNormalViewRefresh:q.updateSpacer,scope:q};e.on(p);b=q.lockedGrid.headerCt;j=q.normalGrid.headerCt;b.lockedCt=true;b.lockableInjected=true;j.lockableInjected=true;b.on({columnshow:q.onLockedHeaderShow,columnhide:q.onLockedHeaderHide,columnmove:q.onLockedHeaderMove,sortchange:q.onLockedHeaderSortChange,columnresize:q.onLockedHeaderResize,scope:q});j.on({columnmove:q.onNormalHeaderMove,sortchange:q.onNormalHeaderSortChange,scope:q});q.modifyHeaderCt();q.items=[q.lockedGrid,q.normalGrid];q.relayHeaderCtEvents(b);q.relayHeaderCtEvents(j);q.layout={type:"hbox",align:"stretch"}},processColumns:function(g){var e=0,a=g.length,b=0,d=[],c=[],h;for(;e<a;++e){h=g[e];if(!h.isComponent){h=Ext.apply({},g[e])}h.processed=true;if(h.locked){if(!h.hidden){b+=h.width||Ext.grid.header.Container.prototype.defaultWidth}d.push(h)}else{c.push(h)}if(!h.headerId){h.headerId=(h.initialConfig||h).id||("L"+(++this.headerCounter))}}return{lockedWidth:b,locked:{items:d,itemId:"lockedHeaderCt",stretchMaxPartner:"^^>>#normalHeaderCt"},normal:{items:c,itemId:"normalHeaderCt",stretchMaxPartner:"^^>>#lockedHeaderCt"}}},onLockedViewMouseWheel:function(i){var d=this,h=-d.scrollDelta,a=h*i.getWheelDeltas().y,b=d.lockedGrid.getView().el.dom,c,g;if(b){c=b.scrollTop!==b.scrollHeight-b.clientHeight;g=b.scrollTop!==0}if((a<0&&g)||(a>0&&c)){i.stopEvent();d.scrolling=true;b.scrollTop+=a;d.normalGrid.getView().el.dom.scrollTop=b.scrollTop;d.scrolling=false;d.onNormalViewScroll()}},onLockedViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;if(!e.scrolling){e.scrolling=true;c.el.dom.scrollTop=d.el.dom.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);b.style.position="absolute"}e.scrolling=false}},onNormalViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;if(!e.scrolling){e.scrolling=true;d.el.dom.scrollTop=c.el.dom.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);b.style.position="absolute";b.style.top=a.style.top}e.scrolling=false}},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalViewRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedViewRefresh()}},updateSpacer:function(){var d=this,b=d.lockedGrid.getView().el,c=d.normalGrid.getView().el.dom,a=b.dom.id+"-spacer",e=(c.offsetHeight-c.clientHeight)+"px";d.spacerEl=Ext.getDom(a);if(d.spacerEl){d.spacerEl.style.height=e}else{Ext.core.DomHelper.append(b,{id:a,style:"height: "+e})}},onLockedViewRefresh:function(){if(this.normalGrid.headerCt.getGridColumns().length){var e=this,a=e.lockedGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.lockedHeights=[];for(;b<d;b++){e.lockedHeights[b]=g[b].clientHeight}e.syncRowHeights()}},onNormalViewRefresh:function(){if(this.lockedGrid.headerCt.getGridColumns().length){var e=this,a=e.normalGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.normalHeights=[];for(;b<d;b++){e.normalHeights[b]=g[b].clientHeight}e.syncRowHeights();e.updateSpacer()}},onLockedViewItemUpdate:function(a,b,c){if(this.normalGrid.headerCt.getGridColumns().length){this.lockedHeights[b]=c.clientHeight;this.syncRowHeights()}},onNormalViewItemUpdate:function(a,b,c){if(this.lockedGrid.headerCt.getGridColumns().length){this.normalHeights[b]=c.clientHeight;this.syncRowHeights()}},syncRowHeights:function(){var k=this,b=k.lockedHeights,l=k.normalHeights,a=[],j=b.length,g=0,m,d,e,h,c;if(b.length&&l.length){m=k.lockedGrid.getView();d=k.normalGrid.getView();e=m.el.query(m.getItemSelector());h=d.el.query(d.getItemSelector());for(;g<j;g++){if(!isNaN(b[g])&&!isNaN(l[g])){if(b[g]>l[g]){Ext.fly(h[g]).setHeight(b[g])}else{if(b[g]<l[g]){Ext.fly(e[g]).setHeight(l[g])}}}}c=d.el.dom.scrollTop;d.el.dom.scrollTop=c;m.el.dom.scrollTop=c;k.lockedHeights=[];k.normalHeights=[]}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(b){var g=this,h=g.unlockText,i=g.lockText,c=Ext.baseCSSPrefix+"hmenu-unlock",e=Ext.baseCSSPrefix+"hmenu-lock",a=Ext.Function.bind(g.onUnlockMenuClick,g),d=Ext.Function.bind(g.onLockMenuClick,g);return function(){var j=Ext.grid.header.Container.prototype.getMenuItems.call(this);j.push("-",{cls:c,text:h,handler:a,disabled:!b});j.push({cls:e,text:i,handler:d,disabled:b});return j}},lock:function(a,d){var c=this,e=c.normalGrid,h=c.lockedGrid,g=e.headerCt,b=h.headerCt;a=a||g.getMenu().activeHeader;if(a.flex){a.width=a.getWidth();delete a.flex}Ext.suspendLayouts();g.remove(a,false);a.locked=true;if(Ext.isDefined(d)){b.insert(d,a)}else{b.add(a)}c.syncLockedSection();Ext.resumeLayouts(true);c.updateSpacer();c.fireEvent("lockcolumn",c,a)},syncLockedSection:function(){var a=this;a.syncLockedWidth();a.lockedGrid.getView().refresh();a.normalGrid.getView().refresh()},syncLockedWidth:function(){var c=this,a=c.lockedGrid,b=a.headerCt.getFullWidth(true);Ext.suspendLayouts();if(b>0){a.setWidth(b);a.show()}else{a.hide()}Ext.resumeLayouts(true);return b>0},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,e){var d=this,g=d.normalGrid,i=d.lockedGrid,h=g.headerCt,c=i.headerCt,b=false;if(!Ext.isDefined(e)){e=0}a=a||c.getMenu().activeHeader;Ext.suspendLayouts();c.remove(a,false);if(d.syncLockedWidth()){b=true}a.locked=false;h.insert(e,a);d.normalGrid.getView().refresh();if(b){d.lockedGrid.getView().refresh()}Ext.resumeLayouts(true);d.fireEvent("unlockcolumn",d,a)},applyColumnsState:function(h){var p=this,e=p.lockedGrid,g=e.headerCt,n=p.normalGrid.headerCt,q=Ext.Array.toMap(g.items,"headerId"),j=Ext.Array.toMap(n.items,"headerId"),m=[],o=[],l=1,b=h.length,k,a,d,c;for(k=0;k<b;k++){c=h[k];d=q[c.id];a=d||j[c.id];if(a){if(a.applyColumnState){a.applyColumnState(c)}if(a.locked===undefined){a.locked=!!d}if(a.locked){m.push(a);if(!a.hidden&&typeof a.width=="number"){l+=a.width}}else{o.push(a)}}}if(m.length+o.length==g.items.getCount()+n.items.getCount()){g.removeAll(false);n.removeAll(false);g.add(m);n.add(o);e.setWidth(l)}},getColumnsState:function(){var b=this,a=b.lockedGrid.headerCt.getColumnsState(),c=b.normalGrid.headerCt.getColumnsState();return a.concat(c)},reconfigureLockable:function(a,b){var c=this,e=c.lockedGrid,d=c.normalGrid;if(b){Ext.suspendLayouts();e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);e.setWidth(b.lockedWidth);e.headerCt.add(b.locked.items);d.headerCt.add(b.normal.items);Ext.resumeLayouts(true)}if(a){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}}},function(){this.borrow(Ext.view.Table,["prepareFeatures"])});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,autoScroll:true});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,bothCfgCopy:["invalidateScrollerOnRefresh","hideHeaders","enableColumnHide","enableColumnMove","enableColumnResize","sortableColumns"],normalCfgCopy:["verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:[],rowLines:true});Ext.define("Ext.grid.property.Grid",{extend:"Ext.grid.Panel",alias:"widget.propertygrid",alternateClassName:"Ext.grid.PropertyGrid",uses:["Ext.grid.plugin.CellEditing","Ext.grid.property.Store","Ext.grid.property.HeaderContainer","Ext.XTemplate","Ext.grid.CellEditor","Ext.form.field.Date","Ext.form.field.Text","Ext.form.field.Number","Ext.form.field.ComboBox"],valueField:"value",nameField:"name",enableColumnMove:false,columnLines:true,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,initComponent:function(){var a=this;a.addCls(Ext.baseCSSPrefix+"property-grid");a.plugins=a.plugins||[];a.plugins.push(new Ext.grid.plugin.CellEditing({clicksToEdit:a.clicksToEdit,startEdit:function(b,c){return this.self.prototype.startEdit.call(this,b,a.headerCt.child("#"+a.valueField))}}));a.selModel={selType:"cellmodel",onCellSelect:function(b){if(b.column!=1){b.column=1}return this.self.prototype.onCellSelect.call(this,b)}};a.customRenderers=a.customRenderers||{};a.customEditors=a.customEditors||{};if(!a.store){a.propStore=a.store=new Ext.grid.property.Store(a,a.source)}if(a.sortableColumns){a.store.sort("name","ASC")}a.columns=new Ext.grid.property.HeaderContainer(a,a.store);a.addEvents("beforepropertychange","propertychange");a.callParent();a.getView().walkCells=this.walkCells;a.editors={date:new Ext.grid.CellEditor({field:new Ext.form.field.Date({selectOnFocus:true})}),string:new Ext.grid.CellEditor({field:new Ext.form.field.Text({selectOnFocus:true})}),number:new Ext.grid.CellEditor({field:new Ext.form.field.Number({selectOnFocus:true})}),"boolean":new Ext.grid.CellEditor({field:new Ext.form.field.ComboBox({editable:false,store:[[true,a.headerCt.trueText],[false,a.headerCt.falseText]]})})};a.store.on("update",a.onUpdate,a)},onUpdate:function(d,a,c){var g=this,b,e;if(g.rendered&&c==Ext.data.Model.EDIT){b=a.get(g.valueField);e=a.modified.value;if(g.fireEvent("beforepropertychange",g.source,a.getId(),b,e)!==false){if(g.source){g.source[a.getId()]=b}a.commit();g.fireEvent("propertychange",g.source,a.getId(),b,e)}else{a.reject()}}},walkCells:function(h,g,d,c,a,b){if(g=="left"){g="up"}else{if(g=="right"){g="down"}}h=Ext.view.Table.prototype.walkCells.call(this,h,g,d,c,a,b);if(!h.column){h.column=1}return h},getCellEditor:function(a,c){var d=this,e=a.get(d.nameField),g=a.get(d.valueField),b=d.customEditors[e];if(b){if(!(b instanceof Ext.grid.CellEditor)){if(!(b instanceof Ext.form.field.Base)){b=Ext.ComponentManager.create(b,"textfield")}b=d.customEditors[e]=new Ext.grid.CellEditor({field:b})}}else{if(Ext.isDate(g)){b=d.editors.date}else{if(Ext.isNumber(g)){b=d.editors.number}else{if(Ext.isBoolean(g)){b=d.editors["boolean"]}else{b=d.editors.string}}}}b.editorId=e;return b},beforeDestroy:function(){var a=this;a.callParent();a.destroyEditors(a.editors);a.destroyEditors(a.customEditors);delete a.source},destroyEditors:function(b){for(var a in b){if(b.hasOwnProperty(a)){Ext.destroy(b[a])}}},setSource:function(a){this.source=a;this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",requires:["Ext.data.NodeStore"],loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",leafCls:Ext.baseCSSPrefix+"grid-tree-node-leaf",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading"],initComponent:function(){var a=this,b=a.panel.getStore();if(a.initialConfig.animate===undefined){a.animate=Ext.enableFx}a.store=new Ext.data.NodeStore({treeStore:b,recursive:true,rootVisible:a.rootVisible,listeners:{beforeexpand:a.onBeforeExpand,expand:a.onExpand,beforecollapse:a.onBeforeCollapse,collapse:a.onCollapse,write:a.onStoreWrite,datachanged:a.onStoreDataChanged,scope:a}});if(a.node){a.setRootNode(a.node)}a.animQueue={};a.animWraps={};a.addEvents("afteritemexpand","afteritemcollapse");a.callParent(arguments);a.on({element:"el",scope:a,delegate:a.expanderSelector,mouseover:a.onExpanderMouseOver,mouseout:a.onExpanderMouseOut});a.on({element:"el",scope:a,delegate:a.checkboxSelector,click:a.onCheckboxChange})},afterComponentLayout:function(){this.callParent(arguments);var a=this.stretcher;if(a){a.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(j,k){var g="",e=this.panel.headerCt,b=e.getGridColumns(),h=0,l=b.length,m,d=this.getNode(j),a,c;for(;h<l;h++){m=b[h];g+='<th style="width: '+(m.hidden?0:m.getDesiredWidth())+'px; height: 0px;"></th>'}c=Ext.get(d);a=c.insertSibling({tag:"tr",html:['<td colspan="'+e.getColumnCount()+'">','<div class="'+this.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+'grid-table" style="width: '+e.getFullWidth()+'px;"><tbody>',g,"</tbody></table>","</div>","</td>"].join("")},"after");return{record:j,node:d,el:a,expanding:false,collapsing:false,animating:false,animateEl:a.down("div"),targetEl:a.down("tbody")}},getAnimWrap:function(d,a){if(!this.animate){return null}var b=this.animWraps,c=b[d.internalId];if(a!==false){while(!c&&d){d=d.parentNode;if(d){c=b[d.internalId]}}}return c},doAdd:function(b,d,i){var j=this,g=d[0],l=g.parentNode,k=j.all.elements,n=0,e=j.getAnimWrap(l),m,c,h;if(!e||!e.expanding){return j.callParent(arguments)}l=e.record;m=e.targetEl;c=m.dom.childNodes;h=c.length-1;n=i-j.indexOf(l)-1;if(!h||n>=h){m.appendChild(b)}else{Ext.fly(c[n+1]).insertSibling(b,"before",true)}Ext.Array.insert(k,i,b);if(e.isAnimating){j.onExpand(l)}},beginBulkUpdate:function(){this.bulkUpdate=true;this.ownerCt.changingScrollbars=true},endBulkUpdate:function(){this.bulkUpdate=false;this.ownerCt.changingScrollbars=true},onRemove:function(e,a,b){var d=this,c=d.bulkUpdate;if(d.rendered){d.doRemove(a,b);if(!c){d.updateIndexes(b)}if(d.store.getCount()===0){d.refresh()}if(!c){d.fireEvent("itemremove",a,b)}}},doRemove:function(a,c){var g=this,d=g.all,b=g.getAnimWrap(a),e=d.item(c).dom;if(!b||!b.collapsing){return g.callParent(arguments)}b.targetEl.appendChild(e);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d,false);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}},onExpand:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d,b,j;if(h.singleExpand){h.ensureSingleExpand(i)}if(g===-1){return}d=h.getAnimWrap(i,false);if(!d){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c);return}b=d.animateEl;j=d.targetEl;b.stopAnimation();e[a]=true;b.slideIn("t",{duration:h.expandDuration,listeners:{scope:h,lastframe:function(){d.el.insertSibling(j.query(h.itemSelector),"before");d.el.remove();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c)}});d.isAnimating=true},onBeforeCollapse:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true}},onCollapse:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d=h.getAnimWrap(i),b,j;if(g===-1){return}if(!d){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemcollapse",i,g,c);return}b=d.animateEl;j=d.targetEl;e[a]=true;b.stopAnimation();b.slideOut("t",{duration:h.collapseDuration,listeners:{scope:h,lastframe:function(){d.el.remove();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemcollapse",i,g,c)}});d.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},collectData:function(c){var g=this.callParent(arguments),e=g.rows,a=e.length,d=0,h,b;for(;d<a;d++){h=e[d];b=c[d];if(b.get("qtip")){h.rowAttr='data-qtip="'+b.get("qtip")+'"';if(b.get("qtitle")){h.rowAttr+=' data-qtitle="'+b.get("qtitle")+'"'}}if(b.isExpanded()){h.rowCls=(h.rowCls||"")+" "+this.expandedCls}if(b.isLeaf()){h.rowCls=(h.rowCls||"")+" "+this.leafCls}if(b.isLoading()){h.rowCls=(h.rowCls||"")+" "+this.loadingCls}}return g},expand:function(b,a,d,c){return b.expand(a,d,c)},collapse:function(b,a,d,c){return b.collapse(a,d,c)},toggle:function(c,b,g,d){var e=this,a=!!this.animate;if(!a||!this.isExpandingOrCollapsing){if(!c.isLeaf()){this.isExpandingOrCollapsing=a}if(c.isExpanded()){e.collapse(c,b,g,d)}else{e.expand(c,b,g,d)}}},onItemDblClick:function(a,d,c){var b=this.editingPlugin;this.callParent(arguments);if(this.toggleOnDblClick&&!(b&&b.clicksToEdit===2)){this.toggle(a)}},onBeforeItemMouseDown:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){return false}return this.callParent(arguments)},onItemClick:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){this.toggle(a,d.ctrlKey);return false}return this.callParent(arguments)},onExpanderMouseOver:function(b,a){b.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(b,a){b.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(b){var a=b.parentNode;if(a){a.eachChild(function(c){if(c!==b&&c.isExpanded()){c.collapse()}})}},shouldUpdateCell:function(b,a){return Ext.Array.contains(this.uiFields,b.dataIndex)||this.callParent(arguments)},onStoreWrite:function(b,a){var c=this.panel.store;c.fireEvent("write",c,a)},onStoreDataChanged:function(b,a){var c=this.panel.store;c.fireEvent("datachanged",c)}});Ext.define("Ext.tree.Panel",{extend:"Ext.panel.Table",alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],requires:["Ext.tree.View","Ext.selection.TreeModel","Ext.tree.Column","Ext.data.TreeStore"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,rowLines:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],isTree:true,constructor:function(a){a=a||{};if(a.animate===undefined){a.animate=Ext.isDefined(this.animate)?this.animate:Ext.enableFx}this.enableAnimations=a.animate;delete a.animate;this.callParent([a])},initComponent:function(){var c=this,b=[c.treeCls],a;if(c.useArrows){b.push(Ext.baseCSSPrefix+"tree-arrows");c.lines=false}if(c.lines){b.push(Ext.baseCSSPrefix+"tree-lines")}else{if(!c.useArrows){b.push(Ext.baseCSSPrefix+"tree-no-lines")}}if(Ext.isString(c.store)){c.store=Ext.StoreMgr.lookup(c.store)}else{if(!c.store||Ext.isObject(c.store)&&!c.store.isStore){c.store=new Ext.data.TreeStore(Ext.apply({},c.store||{},{root:c.root,fields:c.fields,model:c.model,folderSort:c.folderSort}))}else{if(c.root){c.store=Ext.data.StoreManager.lookup(c.store);c.store.setRootNode(c.root);if(c.folderSort!==undefined){c.store.folderSort=c.folderSort;c.store.sort()}}}}c.viewConfig=Ext.apply({},c.viewConfig);c.viewConfig=Ext.applyIf(c.viewConfig,{rootVisible:c.rootVisible,animate:c.enableAnimations,singleExpand:c.singleExpand,node:c.store.getRootNode(),hideHeaders:c.hideHeaders});c.mon(c.store,{scope:c,rootchange:c.onRootChange,clear:c.onClear});c.relayEvents(c.store,["beforeload","load"]);c.store.on({append:c.createRelayer("itemappend"),remove:c.createRelayer("itemremove"),move:c.createRelayer("itemmove",[0,4]),insert:c.createRelayer("iteminsert"),beforeappend:c.createRelayer("beforeitemappend"),beforeremove:c.createRelayer("beforeitemremove"),beforemove:c.createRelayer("beforeitemmove"),beforeinsert:c.createRelayer("beforeiteminsert"),expand:c.createRelayer("itemexpand",[0,1]),collapse:c.createRelayer("itemcollapse",[0,1]),beforeexpand:c.createRelayer("beforeitemexpand",[0,1]),beforecollapse:c.createRelayer("beforeitemcollapse",[0,1])});if(!c.columns){if(c.initialConfig.hideHeaders===undefined){c.hideHeaders=true}c.addCls(Ext.baseCSSPrefix+"autowidth-table");c.columns=[{xtype:"treecolumn",text:"Name",width:Ext.isIE6?null:10000,dataIndex:c.displayField}]}if(c.cls){b.push(c.cls)}c.cls=b.join(" ");c.callParent();a=c.getView();c.relayEvents(a,["checkchange","afteritemexpand","afteritemcollapse"]);if(!a.rootVisible&&!c.getRootNode()){c.setRootNode({expanded:true})}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(a){this.view.setRootNode(a)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(a){return a.get("checked")},expandAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}b.expand(true,e,d);if(!c){a.endBulkUpdate()}}},collapseAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}if(a.rootVisible){b.collapse(true,e,d)}else{b.collapseChildren(true,e,d)}if(!c){a.endBulkUpdate()}}},expandPath:function(l,g,a,h,k){var d=this,c=d.getRootNode(),b=1,e=d.getView(),j,i;g=g||d.getRootNode().idProperty;a=a||"/";if(Ext.isEmpty(l)){Ext.callback(h,k||d,[false,null]);return}j=l.split(a);if(c.get(g)!=j[1]){Ext.callback(h,k||d,[false,c]);return}i=function(){if(++b===j.length){Ext.callback(h,k||d,[true,c]);return}var m=c.findChild(g,j[b]);if(!m){Ext.callback(h,k||d,[false,c]);return}c=m;c.expand(false,i)};c.expand(false,i)},selectPath:function(h,g,e,i,a){var d=this,c,b;g=g||d.getRootNode().idProperty;e=e||"/";c=h.split(e);b=c.pop();d.expandPath(c.join(e),g,e,function(l,k){var j=false;if(l&&k){k=k.findChild(g,b);if(k){d.getSelectionModel().select(k);Ext.callback(i,a||d,[true,k]);j=true}}else{if(k===d.getRootNode()){j=true}}Ext.callback(i,a||d,[j,k])},d)}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:50,minWidth:50,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"offsets",floating:true,ariaRole:"alertdialog",itemCls:Ext.baseCSSPrefix+"window-item",overlapHeader:true,ignoreHeaderBorderManagement:true,alwaysFramed:true,isWindow:true,initComponent:function(){var a=this;a.callParent();a.addEvents("resize","maximize","minimize","restore");if(a.plain){a.addClsWithUI("plain")}if(a.modal){a.ariaRole="dialog"}if(a.floating){a.on({element:"el",mousedown:a.onMouseDown,scope:a})}a.addStateEvents(["maximize","restore","resize","dragend"])},getElConfig:function(){var b=this,a;a=b.callParent();a.tabIndex=-1;return a},getState:function(){var b=this,c=b.callParent()||{},a=!!b.maximized;c.maximized=a;Ext.apply(c,{size:a?b.restoreSize:b.getSize(),pos:a?b.restorePos:b.getPosition()});return c},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onMouseDown:function(b){var a;if(this.floating){if(Ext.fly(b.getTarget()).focusable()){a=true}this.toFront(a)}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({scope:c,dblclick:c.toggleMaximize})}},afterRender:function(){var a=this,b;a.callParent();if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){b=a.getKeyMap();b.on(27,a.onEsc,a);b.disable()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}if(b.header){a=Ext.applyIf({el:b.el,delegate:"#"+Ext.escapeId(b.header.id)},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=new Ext.util.ComponentDragger(this,a);b.relayEvents(b.dd,["dragstart","drag","dragend"])}},onEsc:function(a,b){if(!Ext.FocusManager||!Ext.FocusManager.enabled||Ext.FocusManager.focusedCmp===this){b.stopEvent();this.close()}},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){return this.getDefaultFocus()},getDefaultFocus:function(){var c=this,b,d=c.defaultButton||c.defaultFocus,a;if(d!==undefined){if(Ext.isNumber(d)){b=c.query("button")[d]}else{if(Ext.isString(d)){a=d;if(a.substr(0,1)!=="#"){a="#"+a}b=c.down(a)}else{if(d.focus){b=d}}}}return b||c.el},onFocus:function(){var b=this,a;if((Ext.FocusManager&&Ext.FocusManager.enabled)||((a=b.getDefaultFocus())===b)){b.callParent(arguments)}else{a.focus()}},afterShow:function(c){var b=this,a=c||b.animateTarget;if(this.expandOnShow){this.expand(false)}b.callParent(arguments);if(b.maximized){b.fitContainer()}b.syncMonitorWindowResize();if(!a){b.doConstrain()}if(b.keyMap){b.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);if(a.closeAction=="destroy"){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.resizer){a.resizer.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+"window-maximized");a.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.setPosition(0,0);a.fitContainer();a.fireEvent("maximize",a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+"window-maximized");if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.maximized=false;a.el.enableShadow(true);if(a.dd){a.dd.enable()}if(a.resizer){a.resizer.enable()}a.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.doConstrain();a.fireEvent("restore",a)}return a},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&&!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b);b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.window.MessageBox",{extend:"Ext.window.Window",requires:["Ext.toolbar.Toolbar","Ext.form.field.Text","Ext.form.field.TextArea","Ext.form.field.Display","Ext.button.Button","Ext.layout.container.Anchor","Ext.layout.container.HBox","Ext.ProgressBar"],alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:Ext.baseCSSPrefix+"message-box-info",WARNING:Ext.baseCSSPrefix+"message-box-warning",QUESTION:Ext.baseCSSPrefix+"message-box-question",ERROR:Ext.baseCSSPrefix+"message-box-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:"&#160;",width:600,height:500,minWidth:250,maxWidth:600,minHeight:110,maxHeight:500,constrain:true,cls:Ext.baseCSSPrefix+"message-box",layout:{type:"vbox",align:"stretch"},defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"},buttonIds:["ok","yes","no","cancel"],titleText:{confirm:"Confirm",prompt:"Prompt",wait:"Loading...",alert:"Attention"},iconHeight:35,makeButton:function(a){var b=this.buttonIds[a];return new Ext.button.Button({handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var a=this;a.dd.endDrag();a.progressBar.reset();a.removeCls(a.cfg.cls);a.callParent(arguments)},initComponent:function(){var e=this,a=e.id,c,b,d;e.title="&#160;";e.topContainer=new Ext.container.Container({layout:"hbox",style:{padding:"10px",overflow:"hidden"},items:[e.iconComponent=new Ext.Component({cls:e.baseCls+"-icon",width:50,height:e.iconHeight}),e.promptContainer=new Ext.container.Container({flex:1,layout:{type:"anchor"},items:[e.msg=new Ext.form.field.Display({id:a+"-displayfield",cls:e.baseCls+"-text"}),e.textField=new Ext.form.field.Text({id:a+"-testfield",anchor:"100%",enableKeyEvents:true,listeners:{keydown:e.onPromptKey,scope:e}}),e.textArea=new Ext.form.field.TextArea({id:a+"-textarea",anchor:"100%",height:75})]})]});e.progressBar=new Ext.ProgressBar({id:a+"-progressbar",margins:"0 10 0 10"});e.items=[e.topContainer,e.progressBar];e.msgButtons=[];for(c=0;c<4;c++){b=e.makeButton(c);e.msgButtons[b.itemId]=b;e.msgButtons.push(b)}e.bottomTb=new Ext.toolbar.Toolbar({id:a+"-toolbar",ui:"footer",dock:"bottom",layout:{pack:"center"},items:[e.msgButtons[0],e.msgButtons[1],e.msgButtons[2],e.msgButtons[3]]});e.dockedItems=[e.bottomTb];d=e.bottomTb.getLayout();d.finishedLayout=Ext.Function.createInterceptor(d.finishedLayout,function(g){e.tbWidth=g.getProp("contentWidth")});e.on("close",e.onClose,e);e.callParent()},onClose:function(){var a=this.header.child("[type=close]");a.itemId="cancel";this.btnCallback(a);delete a.itemId},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(a){var d=this,c=0,h=true,g=d.maxWidth,e=d.buttonText,b;d.updateButtonText();a=a||{};d.cfg=a;if(a.width){g=a.width}delete d.defaultFocus;d.animateTarget=a.animateTarget||undefined;d.modal=a.modal!==false;if(a.title){d.setTitle(a.title||"&#160;")}if(Ext.isObject(a.buttons)){d.buttonText=a.buttons;c=0}else{d.buttonText=a.buttonText||d.buttonText;c=Ext.isNumber(a.buttons)?a.buttons:0}c=c|d.updateButtonText();d.buttonText=e;Ext.suspendLayouts();d.hidden=false;if(!d.rendered){d.width=g;d.render(Ext.getBody())}else{d.setSize(g,d.maxHeight)}d.closable=a.closable&&!a.wait;d.header.child("[type=close]").setVisible(a.closable!==false);if(!a.title&&!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.setValue(a.msg);d.msg.show()}else{d.msg.hide()}Ext.resumeLayouts(true);Ext.suspendLayouts();if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b<4;b++){if(c&Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();h=false}else{d.msgButtons[b].hide()}}if(h){d.bottomTb.hide()}else{d.bottomTb.show()}Ext.resumeLayouts(true)},updateButtonText:function(){var d=this,c=d.buttonText,b=0,e,a;for(e in c){if(c.hasOwnProperty(e)){a=d.msgButtons[e];if(a){if(d.cfg&&d.cfg.buttonText){b=b|Math.pow(2,Ext.Array.indexOf(d.buttonIds,e))}if(a.text!=c[e]){a.setText(c[e])}}}}return b},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);b.doAutoSize();b.hidden=true;b.callParent();return b},onShow:function(){this.callParent(arguments);this.center()},doAutoSize:function(){var d=this,e=d.header.rendered&&d.header.isVisible(),c=d.bottomTb.rendered&&d.bottomTb.isVisible(),b,a;if(!Ext.isDefined(d.frameWidth)){d.frameWidth=d.el.getWidth()-d.body.getWidth()}d.minWidth=d.cfg.minWidth||Ext.getClass(this).prototype.minWidth;b=Math.max(e?d.header.getMinWidth():0,d.cfg.width||d.msg.getWidth()+d.iconComponent.getWidth()+25,(c?d.tbWidth:0));a=(e?d.header.getHeight():0)+d.topContainer.getHeight()+d.progressBar.getHeight()+(c?d.bottomTb.getHeight()+d.bottomTb.el.getMargin("tb"):0);d.setSize(b+d.frameWidth,a+d.frameWidth);return d},updateText:function(a){this.msg.setValue(a);return this.doAutoSize(true)},setIcon:function(a){var b=this;b.iconComponent.removeCls(b.messageIconCls);if(a){b.iconComponent.show();b.iconComponent.addCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.addCls(b.messageIconCls=a)}else{b.iconComponent.removeCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.hide()}return b},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:this.QUESTION,msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,g,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:g,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:"Ext.util.Observable",alternateClassName:"Ext.form.BasicForm",requires:["Ext.util.MixedCollection","Ext.form.action.Load","Ext.form.action.Submit","Ext.window.MessageBox","Ext.data.Errors","Ext.util.DelayedTask"],constructor:function(a,b){var e=this,g=e.onItemAddOrRemove,d,c;e.owner=a;e.mon(a,{add:g,remove:g,scope:e});Ext.apply(e,b);if(Ext.isString(e.paramOrder)){e.paramOrder=e.paramOrder.split(/[\s,|]/)}if(e.api){d=e.api=Ext.apply({},e.api);for(c in d){if(d.hasOwnProperty(c)){d[c]=Ext.direct.Manager.parseMethod(d[c])}}}e.checkValidityTask=new Ext.util.DelayedTask(e.checkValidity,e);e.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");e.callParent()},initialize:function(){var a=this;a.initialized=true;a.onValidityChange(!a.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,g){var d=this,e=!!g.ownerCt,b=g.isContainer;function a(h){d[e?"mon":"mun"](h,{validitychange:d.checkValidity,dirtychange:d.checkDirty,scope:d,buffer:100});delete d._fields}if(g.isFormField){a(g)}else{if(b){if(g.isDestroyed){delete d._fields}else{Ext.Array.forEach(g.query("[isFormField]"),a)}}}delete this._boundItems;if(d.initialized){d.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=new Ext.util.MixedCollection();a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=new Ext.util.MixedCollection();a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;Ext.suspendLayouts();b=a.getFields().filterBy(function(c){return !c.validate()});Ext.resumeLayouts(true);return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},onValidityChange:function(g){var d=this.getBoundItems(),b,c,a,e;if(d){b=d.items;a=b.length;for(c=0;c<a;c++){e=b[c];if(e.disabled===g){e.setDisabled(!g)}}}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){return this.doAction(this.standardSubmit?"standardsubmit":this.api?"directsubmit":"submit",a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(c){c=c||this._record;var b=c.fields.items,d=this.getFieldValues(),h={},g=0,a=b.length,e;for(;g<a;++g){e=b[g].name;if(d.hasOwnProperty(e)){h[e]=d[e]}}c.beginEdit();c.set(h);c.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(e){var b=e.waitMsg,d=Ext.baseCSSPrefix+"mask-loading",a=this.getFields().items,c,i=a.length,g,h;for(c=0;c<i;c++){g=a[c];if(g.isFormField&&g.syncValue){g.syncValue()}}if(b){h=this.waitMsgTarget;if(h===true){this.owner.el.mask(b,d)}else{if(h){h=this.waitMsgTarget=Ext.get(h);h.mask(b,d)}else{Ext.MessageBox.wait(b,e.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.updateProgress(1);a.hide()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent("actioncomplete",this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent("actionfailed",this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(j){var d=this,h,a,b,g,c;function i(e,l){var k=d.findField(e);if(k){k.markInvalid(l)}}if(Ext.isArray(j)){a=j.length;for(h=0;h<a;h++){b=j[h];i(b.id,b.msg)}}else{if(j instanceof Ext.data.Errors){a=j.items.length;for(h=0;h<a;h++){b=j.items[h];i(b.field,b.message)}}else{for(c in j){if(j.hasOwnProperty(c)){g=j[c];i(c,g,j)}}}}return this},setValues:function(b){var d=this,a,c,h,g;function e(i,k){var j=d.findField(i);if(j){j.setValue(k);if(d.trackResetOnLoad){j.resetOriginalValue()}}}if(Ext.isArray(b)){c=b.length;for(a=0;a<c;a++){h=b[a];e(h.id,h.value)}}else{Ext.iterate(b,e)}return this},getValues:function(i,j,n,l){var m={},g=this.getFields().items,h,o=g.length,e=Ext.isArray,k,d,c,b,a;for(h=0;h<o;h++){k=g[h];if(!j||k.isDirty()){d=k[l?"getModelData":"getSubmitData"](n);if(Ext.isObject(d)){for(a in d){if(d.hasOwnProperty(a)){c=d[a];if(n&&c===""){c=k.emptyText||""}if(m.hasOwnProperty(a)){b=m[a];if(!e(b)){b=m[a]=[b]}if(e(c)){m[a]=m[a]=b.concat(c)}else{b.push(c)}}else{m[a]=c}}}}}}if(i){m=Ext.Object.toQueryString(m)}return m},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){Ext.suspendLayouts();var b=this,a=b.getFields().items,c,d=a.length;for(c=0;c<d;c++){a[c].clearInvalid()}Ext.resumeLayouts(true);return b},reset:function(){Ext.suspendLayouts();var b=this,a=b.getFields().items,c,d=a.length;for(c=0;c<d;c++){a[c].reset()}Ext.resumeLayouts(true);return b},applyToFields:function(c){var a=this.getFields().items,b,d=a.length;for(b=0;b<d;b++){Ext.apply(a[b],c)}return this},applyIfToFields:function(c){var a=this.getFields().items,b,d=a.length;for(b=0;b<d;b++){Ext.applyIf(a[b],c)}return this}});Ext.define("Ext.form.Panel",{extend:"Ext.panel.Panel",mixins:{fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],requires:["Ext.form.Basic","Ext.util.TaskRunner"],layout:"anchor",ariaRole:"form",initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent()},afterFirstLayout:function(){this.callParent();this.form.initialize()},createForm:function(){return new Ext.form.Basic(this,Ext.applyIf({listeners:{}},this.initialConfig))},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(d,b,c,a){return this.getForm().getValues(d,b,c,a)},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},startPolling:function(b){this.stopPolling();var a=new Ext.util.TaskRunner(b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){var a=this.form.getFields().items,b,d=a.length,c;for(b=0;b<d;b++){a[b].checkChange()}}});Ext.define("Ext.grid.RowEditor",{extend:"Ext.form.Panel",requires:["Ext.tip.ToolTip","Ext.util.HashMap","Ext.util.KeyNav"],saveBtnText:"Update",cancelBtnText:"Cancel",errorsText:"Errors",dirtyText:"You need to commit or cancel your changes",lastScrollLeft:0,lastScrollTop:0,border:false,hideMode:"offsets",initComponent:function(){var b=this,a;b.cls=Ext.baseCSSPrefix+"grid-row-editor";b.layout={type:"hbox",align:"middle"};b.columns=new Ext.util.HashMap();b.columns.getKey=function(d){var c;if(d.getEditor){c=d.getEditor();if(c){return c.id}}return d.id};b.mon(b.columns,{add:b.onFieldAdd,remove:b.onFieldRemove,replace:b.onFieldReplace,scope:b});b.callParent(arguments);if(b.fields){b.setField(b.fields);delete b.fields}a=b.getForm();a.trackResetOnLoad=true},onFieldChange:function(){var c=this,b=c.getForm(),a=b.isValid();if(c.errorSummary&&c.isVisible()){c[a?"hideToolTip":"showToolTip"]()}if(c.floatingButtons){c.floatingButtons.child("#update").setDisabled(!a)}c.isValid=a},afterRender:function(){var b=this,a=b.editingPlugin;b.callParent(arguments);b.mon(b.renderTo,"scroll",b.onCtScroll,b,{buffer:100});b.mon(b.el,{click:Ext.emptyFn,stopPropagation:true});b.el.swallowEvent(["keypress","keydown"]);b.keyNav=new Ext.util.KeyNav(b.el,{enter:a.completeEdit,esc:a.onEscKey,scope:a});b.mon(a.view,{beforerefresh:b.onBeforeViewRefresh,refresh:b.onViewRefresh,scope:b})},onBeforeViewRefresh:function(b){var c=this,a=b.el.dom;if(c.el.dom.parentNode===a){a.removeChild(c.el.dom)}},onViewRefresh:function(c){var e=this,b=c.el.dom,d=e.context,a;b.appendChild(e.el.dom);if(d&&(a=d.store.indexOf(d.record))>=0){d.row=c.getNode(a);e.reposition();if(e.tooltip&&e.tooltip.isVisible()){e.tooltip.setTarget(d.row)}}else{e.editingPlugin.cancelEdit()}},onCtScroll:function(d,c){var a=this,b=c.scrollTop,g=c.scrollLeft;if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}if(g!==a.lastScrollLeft){a.lastScrollLeft=g;a.reposition()}},onColumnAdd:function(a){if(!a.isGroupHeader){this.setField(a)}},onColumnRemove:function(a){this.columns.remove(a)},onColumnResize:function(b,a){if(!b.isGroupHeader){b.getEditor().setWidth(a-2);if(this.isVisible()){this.reposition()}}},onColumnHide:function(a){if(!a.isGroupHeader){a.getEditor().hide();if(this.isVisible()){this.reposition()}}},onColumnShow:function(a){var b=a.getEditor();b.setWidth(a.getWidth()-2).show();if(this.isVisible()){this.reposition()}},onColumnMove:function(b,a,c){if(!b.isGroupHeader){var d=b.getEditor();if(this.items.indexOf(d)!=c){this.move(a,c)}}},onFieldAdd:function(e,a,b){var c=this,g,d;if(!b.isGroupHeader){g=c.editingPlugin.grid.headerCt.getHeaderIndex(b);d=b.getEditor({xtype:"displayfield"});c.insert(g,d)}},onFieldRemove:function(g,a,b){var c=this,e,d;if(!b.isGroupHeader){e=b.getEditor();d=e.el;c.remove(e,false);if(d){d.remove()}}},onFieldReplace:function(d,a,c,b){this.onFieldRemove(d,a,b)},clearFields:function(){var b=this.columns,a;for(a in b){if(b.hasOwnProperty(a)){b.removeAtKey(a)}}},getFloatingButtons:function(){var d=this,e=Ext.baseCSSPrefix,c=e+"grid-row-editor-buttons",b=d.editingPlugin,a;if(!d.floatingButtons){a=d.floatingButtons=new Ext.Container({renderTpl:['<div class="{baseCls}-ml"></div>','<div class="{baseCls}-mr"></div>','<div class="{baseCls}-bl"></div>','<div class="{baseCls}-br"></div>','<div class="{baseCls}-bc"></div>',"{%this.renderContainer(out,values)%}"],width:200,renderTo:d.el,baseCls:c,layout:{type:"hbox",align:"middle"},defaults:{flex:1,margins:"0 1 0 1"},items:[{itemId:"update",xtype:"button",handler:b.completeEdit,scope:b,text:d.saveBtnText,disabled:!d.isValid,minWidth:Ext.panel.Panel.prototype.minButtonWidth},{xtype:"button",handler:b.cancelEdit,scope:b,text:d.cancelBtnText,minWidth:Ext.panel.Panel.prototype.minButtonWidth}]});d.mon(a.el,{mousedown:Ext.emptyFn,click:Ext.emptyFn,stopEvent:true})}return d.floatingButtons},reposition:function(r){var s=this,c=s.context,e=c&&Ext.get(c.row),p=s.getFloatingButtons(),q=p.el,a=s.editingPlugin.grid,g=a.view.el,o=a.headerCt.getFullWidth(),t=a.getWidth(),l=Math.min(o,t),n=a.view.el.dom.scrollLeft,i=p.getWidth(),d=(l-i)/2+n,j,h,m,k=function(){q.scrollIntoView(g,false);if(r&&r.callback){r.callback.call(r.scope||s)}},b;if(e&&Ext.isElement(e.dom)){e.scrollIntoView(g,false);j=e.getXY()[1]-5;h=e.getHeight();m=h+(s.editingPlugin.grid.rowLines?9:10);if(s.getHeight()!=m){s.setHeight(m);s.el.setLeft(0)}if(r){b={to:{y:j},duration:r.duration||125,listeners:{afteranimate:function(){k();j=e.getXY()[1]-5}}};s.el.animate(b)}else{s.el.setY(j);k()}}if(s.getWidth()!=o){s.setWidth(o)}q.setLeft(d)},getEditor:function(a){var b=this;if(Ext.isNumber(a)){return b.query(">[isFormField]")[a]}else{if(a.isHeader&&!a.isGroupHeader){return a.getEditor()}}},removeField:function(b){var a=this;b=a.getEditor(b);a.mun(b,"validitychange",a.onValidityChange,a);a.columns.removeAtKey(b.id);Ext.destroy(b)},setField:function(b){var d=this,a,c,e;if(Ext.isArray(b)){c=b.length;for(a=0;a<c;a++){d.setField(b[a])}return}e=b.getEditor(null,{xtype:"displayfield",getModelData:function(){return null}});e.margins="0 0 0 2";d.mon(e,"change",d.onFieldChange,d);if(d.isVisible()&&d.context){if(e.is("displayfield")){d.renderColumnData(e,d.context.record,b)}else{e.suspendEvents();e.setValue(d.context.record.get(b.dataIndex));e.resumeEvents()}}d.columns.add(e.id,b);if(b.hidden){d.onColumnHide(b)}else{if(b.rendered){d.onColumnShow(b)}}},loadRecord:function(b){var j=this,h=j.getForm(),a=h.getFields(),c=a.items,g=c.length,e,d;for(e=0;e<g;e++){c[e].suspendEvents()}h.loadRecord(b);for(e=0;e<g;e++){c[e].resumeEvents()}if(j.errorSummary){if(h.isValid()){j.hideToolTip()}else{j.showToolTip()}}d=j.query(">displayfield");g=d.length;for(e=0;e<g;e++){j.renderColumnData(d[e],b)}},renderColumnData:function(m,i,c){var k=this,a=k.editingPlugin.grid,e=a.headerCt,l=a.view,o=l.store,g=c||k.columns.get(m.id),n=i.get(g.dataIndex),j=g.editRenderer||g.renderer,b,d,h;if(j){b={tdCls:"",style:""};d=o.indexOf(i);h=e.getHeaderIndex(g);n=j.call(g.scope||e.ownerCt,n,b,i,d,h,o,l)}m.setRawValue(n);m.resetOriginalValue()},beforeEdit:function(){var a=this;if(a.isVisible()&&a.errorSummary&&!a.autoCancel&&a.isDirty()){a.showToolTip();return false}},startEdit:function(a,g){var e=this,d=e.editingPlugin.grid,b=d.store,c=e.context=Ext.apply(e.editingPlugin.context,{view:d.getView(),store:b});c.grid.getSelectionModel().select(a);e.loadRecord(a);if(!e.isVisible()){e.show();e.focusContextCell()}else{e.reposition({callback:this.focusContextCell})}},focusContextCell:function(){var a=this.getEditor(this.context.colIdx);if(a&&a.focus){a.focus()}},cancelEdit:function(){var g=this,e=g.getForm(),a=e.getFields(),b=a.items,d=b.length,c;g.hide();e.clearInvalid();for(c=0;c<d;c++){b[c].suspendEvents()}e.reset();for(c=0;c<d;c++){b[c].resumeEvents()}},completeEdit:function(){var b=this,a=b.getForm();if(!a.isValid()){return}a.updateRecord(b.context.record);b.hide();return true},onShow:function(){this.callParent(arguments);this.reposition()},onHide:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.hideToolTip()}if(a.context){a.context.view.focus();a.context=null}},isDirty:function(){var b=this,a=b.getForm();return a.isDirty()},getToolTip:function(){return this.tooltip||(this.tooltip=new Ext.tip.ToolTip({cls:Ext.baseCSSPrefix+"grid-row-editor-errors",title:this.errorsText,autoHide:false,closable:true,closeAction:"disable",anchor:"left"}))},hideToolTip:function(){var a=this,b=a.getToolTip();if(b.rendered){b.disable()}a.hiddenTip=false},showToolTip:function(){var c=this,d=c.getToolTip(),a=c.context,e=Ext.get(a.row),b=a.grid.view.el;d.setTarget(e);d.showAt([-10000,-10000]);d.update(c.getErrors());d.mouseOffset=[b.getWidth()-e.getWidth()+c.lastScrollLeft+15,0];c.repositionTip();d.doLayout();d.enable()},repositionTip:function(){var i=this,j=i.getToolTip(),c=i.context,l=Ext.get(c.row),k=c.grid.view.el,e=k.getHeight(),g=i.lastScrollTop,h=g+e,b=l.getHeight(),a=l.dom.offsetTop,d=a+b;if(d>g&&a<h){j.show();i.hiddenTip=false}else{j.hide();i.hiddenTip=true}},getErrors:function(){var d=this,e=!d.autoCancel&&d.isDirty()?d.dirtyText+"<br />":"",h=[],a=d.query(">[isFormField]"),c=a.length,b;function g(i){return"<li>"+i+"</li>"}for(b=0;b<c;b++){h=h.concat(Ext.Array.map(a[b].getErrors(),g))}return e+"<ul>"+h.join("")+"</ul>"},beforeDestroy:function(){Ext.destroy(this.floatingButtons,this.tooltip);this.callParent()}});Ext.define("Ext.grid.plugin.RowEditing",{extend:"Ext.grid.plugin.Editing",alias:"plugin.rowediting",requires:["Ext.grid.RowEditor"],editStyle:"row",autoCancel:true,errorSummary:true,constructor:function(){var a=this;a.callParent(arguments);if(!a.clicksToMoveEditor){a.clicksToMoveEditor=a.clicksToEdit}a.autoCancel=!!a.autoCancel},init:function(a){this.callParent([a])},destroy:function(){var a=this;Ext.destroy(a.editor);a.callParent(arguments)},startEdit:function(a,d){var c=this,b=c.getEditor();if((c.callParent(arguments)!==false)&&(b.beforeEdit()!==false)){b.startEdit(c.context.record,c.context.column);return true}return false},cancelEdit:function(){var a=this;if(a.editing){a.getEditor().cancelEdit();a.callParent(arguments)}},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.editing=false;a.fireEvent("edit",a,a.context)}},validateEdit:function(){var k=this,h=k.editor,b=k.context,g=b.record,m={},d={},j=h.items.items,i,c=j.length,a,l;for(i=0;i<c;i++){l=j[i];a=l.name;m[a]=l.getValue();d[a]=g.get(a)}Ext.apply(b,{newValues:m,originalValues:d});return k.callParent(arguments)&&k.getEditor().completeEdit()},getEditor:function(){var a=this;if(!a.editor){a.editor=a.initEditor()}return a.editor},initEditor:function(){var h=this,c=h.grid,i=h.view,d=c.headerCt,e=["saveBtnText","cancelBtnText","errorsText","dirtyText"],j,a=e.length,g={autoCancel:h.autoCancel,errorSummary:h.errorSummary,fields:d.getGridColumns(),hidden:true,editingPlugin:h,renderTo:i.el},k;for(j=0;j<a;j++){k=e[j];if(Ext.isDefined(h[k])){g[k]=h[k]}}return Ext.create("Ext.grid.RowEditor",g)},initEditTriggers:function(){var a=this,b=a.clicksToMoveEditor===1?"click":"dblclick";a.callParent(arguments);if(a.clicksToMoveEditor!==a.clicksToEdit){a.mon(a.view,"cell"+b,a.moveEditorByClick,a)}},addHeaderEvents:function(){var a=this;a.callParent();a.mon(a.grid.headerCt,{scope:a,columnresize:a.onColumnResize,columnhide:a.onColumnHide,columnshow:a.onColumnShow,columnmove:a.onColumnMove})},startEditByClick:function(){var a=this;if(!a.editing||a.clicksToMoveEditor===a.clicksToEdit){a.callParent(arguments)}},moveEditorByClick:function(){var a=this;if(a.editing){a.superclass.onCellClick.apply(a,arguments)}},onColumnAdd:function(a,c){if(c.isHeader){var d=this,b;d.initFieldAccessors(c);b=d.editor;if(b&&b.onColumnAdd){b.onColumnAdd(c)}}},onColumnRemove:function(a,c){if(c.isHeader){var d=this,b=d.getEditor();if(b&&b.onColumnRemove){b.onColumnRemove(c)}d.removeFieldAccessors(c)}},onColumnResize:function(a,d,c){if(d.isHeader){var e=this,b=e.getEditor();if(b&&b.onColumnResize){b.onColumnResize(d,c)}}},onColumnHide:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnHide){b.onColumnHide(c)}},onColumnShow:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnShow){b.onColumnShow(c)}},onColumnMove:function(a,d,c,g){var e=this,b=e.getEditor();if(b&&b.onColumnMove){b.onColumnMove(d,c,g)}},setColumnField:function(b,d){var c=this,a=c.getEditor();a.removeField(b);c.callParent(arguments);c.getEditor().setField(b)}});Ext._endTime=new Date().getTime();if(Ext._beforereadyhandler){Ext._beforereadyhandler()};