X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/adapter/ext/ext-base.js diff --git a/adapter/ext/ext-base.js b/adapter/ext/ext-base.js index b3ba70ef..a82d85ee 100644 --- a/adapter/ext/ext-base.js +++ b/adapter/ext/ext-base.js @@ -1 +1,7 @@ -Ext={version:"2.2.1"};window["undefined"]=window["undefined"];Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http://extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return}var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==oc){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o)};return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}if(Ext.isIE&&overrides.toString!=origclass.toString){p.toString=overrides.toString}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i=0){l=g[p]}if(!s||!l){return false}this.doRemove(s,o,l[this.WFN],false);delete g[p][this.WFN];delete g[p][this.FN];g.splice(p,1);return true},getTarget:function(n,m){n=n.browserEvent||n;var l=n.target||n.srcElement;return this.resolveTextNode(l)},resolveTextNode:function(l){if(Ext.isSafari&&l&&3==l.nodeType){return l.parentNode}else{return l}},getPageX:function(m){m=m.browserEvent||m;var l=m.pageX;if(!l&&0!==l){l=m.clientX||0;if(Ext.isIE){l+=this.getScroll()[1]}}return l},getPageY:function(l){l=l.browserEvent||l;var m=l.pageY;if(!m&&0!==m){m=l.clientY||0;if(Ext.isIE){m+=this.getScroll()[0]}}return m},getXY:function(l){l=l.browserEvent||l;return[this.getPageX(l),this.getPageY(l)]},getRelatedTarget:function(m){m=m.browserEvent||m;var l=m.relatedTarget;if(!l){if(m.type=="mouseout"){l=m.toElement}else{if(m.type=="mouseover"){l=m.fromElement}}}return this.resolveTextNode(l)},getTime:function(n){n=n.browserEvent||n;if(!n.time){var m=new Date().getTime();try{n.time=m}catch(l){this.lastError=l;return m}}return n.time},stopEvent:function(l){this.stopPropagation(l);this.preventDefault(l)},stopPropagation:function(l){l=l.browserEvent||l;if(l.stopPropagation){l.stopPropagation()}else{l.cancelBubble=true}},preventDefault:function(l){l=l.browserEvent||l;if(l.preventDefault){l.preventDefault()}else{l.returnValue=false}},getEvent:function(m){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break}n=n.caller}}return l},getCharCode:function(l){l=l.browserEvent||l;return l.charCode||l.keyCode||0},_getCacheIndex:function(q,n,p){for(var o=0,m=g.length;o0)}var q=[];for(var m=0,l=h.length;m0){for(var r=0,t=u.length;r0){p=g.length;while(p){o=p-1;n=g[o];if(n){s.removeListener(n[s.EL],n[s.TYPE],n[s.FN],o)}p=p-1}n=null;s.clearCache()}s.doRemove(window,"unload",s._unload)},getScroll:function(){var l=document.documentElement,m=document.body;if(l&&(l.scrollTop||l.scrollLeft)){return[l.scrollTop,l.scrollLeft]}else{if(m){return[m.scrollTop,m.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(o,m,n,l){o.addEventListener(m,n,(l))}}else{if(window.attachEvent){return function(o,m,n,l){o.attachEvent("on"+m,n)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(o,m,n,l){o.removeEventListener(m,n,(l))}}else{if(window.detachEvent){return function(n,l,m){n.detachEvent("on"+l,m)}}else{return function(){}}}}()}}();var d=Ext.lib.Event;d.on=d.addListener;d.un=d.removeListener;if(document&&document.body){d._load()}else{d.doAdd(window,"load",d._load)}d.doAdd(window,"unload",d._unload);d._tryPreloadAttach();Ext.lib.Ajax={request:function(l,j,e,k,f){if(f){var g=f.headers;if(g){for(var i in g){if(g.hasOwnProperty(i)){this.initHeader(i,g[i],false)}}}if(f.xmlData){if(!g||!g["Content-Type"]){this.initHeader("Content-Type","text/xml",false)}l=(l?l:(f.method?f.method:"POST"));k=f.xmlData}else{if(f.jsonData){if(!g||!g["Content-Type"]){this.initHeader("Content-Type","application/json",false)}l=(l?l:(f.method?f.method:"POST"));k=typeof f.jsonData=="object"?Ext.encode(f.jsonData):f.jsonData}}}return this.asyncRequest(l,j,e,k)},serializeForm:function(f){if(typeof f=="string"){f=(document.getElementById(f)||document.forms[f])}var g,e,h,l,m="",o=false;for(var n=0;n=200&&h<300)||(Ext.isIE&&h==1223)){g=this.createResponseObject(j,k.argument);if(k.success){if(!k.scope){k.success(g)}else{k.success.apply(k.scope,[g])}}}else{switch(h){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:g=this.createExceptionObject(j.tId,k.argument,(f?f:false));if(k.failure){if(!k.scope){k.failure(g)}else{k.failure.apply(k.scope,[g])}}break;default:g=this.createResponseObject(j,k.argument);if(k.failure){if(!k.scope){k.failure(g)}else{k.failure.apply(k.scope,[g])}}}}this.releaseObject(j);g=null},createResponseObject:function(f,m){var j={};var p={};try{var h=f.conn.getAllResponseHeaders();var l=h.split("\n");for(var k=0;k=this.left&&e.right<=this.right&&e.top>=this.top&&e.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(i){var g=Math.max(this.top,i.top);var h=Math.min(this.right,i.right);var e=Math.min(this.bottom,i.bottom);var f=Math.max(this.left,i.left);if(e>=g&&h>=f){return new Ext.lib.Region(g,h,e,f)}else{return null}},union:function(i){var g=Math.min(this.top,i.top);var h=Math.max(this.right,i.right);var e=Math.max(this.bottom,i.bottom);var f=Math.min(this.left,i.left);return new Ext.lib.Region(g,h,e,f)},constrainTo:function(e){this.top=this.top.constrain(e.top,e.bottom);this.bottom=this.bottom.constrain(e.top,e.bottom);this.left=this.left.constrain(e.left,e.right);this.right=this.right.constrain(e.left,e.right);return this},adjust:function(g,f,e,h){this.top+=g;this.left+=f;this.right+=h;this.bottom+=e;return this}};Ext.lib.Region.getRegion=function(h){var j=Ext.lib.Dom.getXY(h);var g=j[1];var i=j[0]+h.offsetWidth;var e=j[1]+h.offsetHeight;var f=j[0];return new Ext.lib.Region(g,i,e,f)};Ext.lib.Point=function(e,f){if(Ext.isArray(e)){f=e[1];e=e[0]}this.x=this.right=this.left=this[0]=e;this.y=this.top=this.bottom=this[1]=f};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(h,f,i,j,e,g){return this.run(h,f,i,j,e,g,Ext.lib.Scroll)},motion:function(h,f,i,j,e,g){return this.run(h,f,i,j,e,g,Ext.lib.Motion)},color:function(h,f,i,j,e,g){return this.run(h,f,i,j,e,g,Ext.lib.ColorAnim)},run:function(i,f,k,l,e,h,g){g=g||Ext.lib.AnimBase;if(typeof l=="string"){l=Ext.lib.Easing[l]}var j=new g(i,f,k,l);j.animateX(function(){Ext.callback(e,h)});return j}};function c(e){if(!b){b=new Ext.Element.Flyweight()}b.dom=e;return b}if(Ext.isIE){function a(){var e=Function.prototype;delete e.createSequence;delete e.defer;delete e.createDelegate;delete e.createCallback;delete e.createInterceptor;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}Ext.lib.AnimBase=function(f,e,g,h){if(f){this.init(f,e,g,h)}};Ext.lib.AnimBase.prototype={toString:function(){var e=this.getEl();var f=e.id||e.tagName;return("Anim "+f)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(e,g,f){return this.method(this.currentFrame,g,f-g,this.totalFrames)},setAttribute:function(e,g,f){if(this.patterns.noNegatives.test(e)){g=(g>0)?g:0}Ext.fly(this.getEl(),"_anim").setStyle(e,g+f)},getAttribute:function(e){var g=this.getEl();var i=c(g).getStyle(e);if(i!=="auto"&&!this.patterns.offsetUnit.test(i)){return parseFloat(i)}var f=this.patterns.offsetAttribute.exec(e)||[];var j=!!(f[3]);var h=!!(f[2]);if(h||(c(g).getStyle("position")=="absolute"&&j)){i=g["offset"+f[0].charAt(0).toUpperCase()+f[0].substr(1)]}else{i=0}return i},getDefaultUnit:function(e){if(this.patterns.defaultUnit.test(e)){return"px"}return""},animateX:function(h,e){var g=function(){this.onComplete.removeListener(g);if(typeof h=="function"){h.call(e||this,this)}};this.onComplete.addListener(g,this);this.animate()},setRuntimeAttribute:function(f){var l;var g;var h=this.attributes;this.runtimeAttributes[f]={};var k=function(i){return(typeof i!=="undefined")};if(!k(h[f]["to"])&&!k(h[f]["by"])){return false}l=(k(h[f]["from"]))?h[f]["from"]:this.getAttribute(f);if(k(h[f]["to"])){g=h[f]["to"]}else{if(k(h[f]["by"])){if(l.constructor==Array){g=[];for(var j=0,e=l.length;j0&&isFinite(o)){if(k.currentFrame+o>=n){o=n-(m+1)}k.currentFrame+=o}}};Ext.lib.Bezier=new function(){this.getPosition=function(k,h){var l=k.length;var g=[];for(var f=0;f0&&!Ext.isArray(o[0])){o=[o]}else{var n=[];for(p=0,r=o.length;p0){this.runtimeAttributes[s]=this.runtimeAttributes[s].concat(o)}this.runtimeAttributes[s][this.runtimeAttributes[s].length]=l}else{i.setRuntimeAttribute.call(this,s)}};var e=function(j,l){var k=Ext.lib.Dom.getXY(this.getEl());j=[j[0]-k[0]+l[0],j[1]-k[1]+l[1]];return j};var g=function(j){return(typeof j!=="undefined")}})();(function(){Ext.lib.Scroll=function(i,h,j,k){if(i){Ext.lib.Scroll.superclass.constructor.call(this,i,h,j,k)}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var f=Ext.lib;var g=f.Scroll.superclass;var e=f.Scroll.prototype;e.toString=function(){var h=this.getEl();var i=h.id||h.tagName;return("Scroll "+i)};e.doMethod=function(h,k,i){var j=null;if(h=="scroll"){j=[this.method(this.currentFrame,k[0],i[0]-k[0],this.totalFrames),this.method(this.currentFrame,k[1],i[1]-k[1],this.totalFrames)]}else{j=g.doMethod.call(this,h,k,i)}return j};e.getAttribute=function(h){var j=null;var i=this.getEl();if(h=="scroll"){j=[i.scrollLeft,i.scrollTop]}else{j=g.getAttribute.call(this,h)}return j};e.setAttribute=function(h,k,j){var i=this.getEl();if(h=="scroll"){i.scrollLeft=k[0];i.scrollTop=k[1]}else{g.setAttribute.call(this,h,k,j)}}})()})(); \ No newline at end of file +/* + * Ext JS Library 3.1+ + * Copyright(c) 2006-2009 Ext JS, LLC + * licensing@extjs.com + * http://www.extjs.com/license + */ +window.undefined=window.undefined;Ext={version:"3.1.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,s=Object.prototype.toString,t=navigator.userAgent.toLowerCase(),y=function(e){return e.test(t)},i=document,l=i.compatMode=="CSS1Compat",A=y(/opera/),h=y(/chrome/),u=y(/webkit/),x=!h&&y(/safari/),f=x&&y(/applewebkit\/4/),b=x&&y(/version\/3/),B=x&&y(/version\/4/),r=!A&&y(/msie/),p=r&&y(/msie 7/),o=r&&y(/msie 8/),q=r&&!p&&!o,n=!u&&y(/gecko/),d=n&&y(/rv:1\.8/),a=n&&y(/rv:1\.9/),v=r&&!l,z=y(/windows|win32/),k=y(/macintosh|mac os x/),j=y(/adobeair/),m=y(/linux/),c=/^https/i.test(window.location.protocol);if(q){try{i.execCommand("BackgroundImageCache",false,true)}catch(w){}}Ext.apply(Ext,{SSL_SECURE_URL:c&&r?'javascript:""':"about:blank",isStrict:l,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,applyIf:function(C,D){if(C){for(var e in D){if(!Ext.isDefined(C[e])){C[e]=D[e]}}}return C},id:function(e,C){return(e=Ext.getDom(e)||{}).id=e.id||(C||"ext-gen")+(++g)},extend:function(){var C=function(E){for(var D in E){this[D]=E[D]}};var e=Object.prototype.constructor;return function(J,G,I){if(Ext.isObject(G)){I=G;G=J;J=I.constructor!=e?I.constructor:function(){G.apply(this,arguments)}}var E=function(){},H,D=G.prototype;E.prototype=D;H=J.prototype=new E();H.constructor=J;J.superclass=D;if(D.constructor==e){D.constructor=G}J.override=function(F){Ext.override(J,F)};H.superclass=H.supr=(function(){return D});H.override=C;Ext.override(J,I);J.extend=function(F){return Ext.extend(J,F)};return J}}(),override:function(e,D){if(D){var C=e.prototype;Ext.apply(C,D);if(Ext.isIE&&D.hasOwnProperty("toString")){C.toString=D.toString}}},namespace:function(){var C,e;Ext.each(arguments,function(D){e=D.split(".");C=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(E){C=C[E]=C[E]||{}})});return C},urlEncode:function(G,F){var D,C=[],E=encodeURIComponent;Ext.iterate(G,function(e,H){D=Ext.isEmpty(H);Ext.each(D?e:H,function(I){C.push("&",E(e),"=",(!Ext.isEmpty(I)&&(I!=e||!D))?(Ext.isDate(I)?Ext.encode(I).replace(/"/g,""):E(I)):"")})});if(!F){C.shift();F=""}return F+C.join("")},urlDecode:function(D,C){if(Ext.isEmpty(D)){return{}}var G={},F=D.split("&"),H=decodeURIComponent,e,E;Ext.each(F,function(I){I=I.split("=");e=H(I[0]);E=H(I[1]);G[e]=C||!G[e]?E:[].concat(G[e]).concat(E)});return G},urlAppend:function(e,C){if(!Ext.isEmpty(C)){return e+(e.indexOf("?")===-1?"?":"&")+C}return e},toArray:function(){return r?function(D,G,E,F){F=[];for(var C=0,e=D.length;C0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c
'),g=h.child("div",true);var e=g.offsetWidth;h.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=g.offsetWidth;h.remove();b=e-d+2}return b},combine:function(){var f=arguments,e=f.length,h=[];for(var g=0;gg?1:-1};Ext.each(d,function(g){f=e(f,g)==1?f:g});return f},mean:function(d){return Ext.sum(d)/d.length},sum:function(d){var e=0;Ext.each(d,function(f){e+=f});return e},partition:function(d,e){var f=[[],[]];Ext.each(d,function(h,j,g){f[(e&&e(h,j,g))||(!e&&h)?0:1].push(h)});return f},invoke:function(d,e){var g=[],f=Array.prototype.slice.call(arguments,2);Ext.each(d,function(h,j){if(h&&Ext.isFunction(h[e])){g.push(h[e].apply(h,f))}else{g.push(undefined)}});return g},pluck:function(d,f){var e=[];Ext.each(d,function(g){e.push(g[f])});return e},zip:function(){var m=Ext.partition(arguments,function(i){return !Ext.isFunction(i)}),h=m[0],l=m[1][0],d=Ext.max(Ext.pluck(h,"length")),g=[];for(var k=0;k0){for(var p=0;p0);if(!C){C=true;for(K=0,H=p.length;K=0){u=s.substr(0,q).toLowerCase();if(s.charAt(q+1)==" "){++q}r[u]=s.substr(q+1)}})}catch(y){}return{tId:z.tId,status:w.status,statusText:w.statusText,getResponseHeader:function(s){return r[s.toLowerCase()]},getAllResponseHeaders:function(){return v},responseText:w.responseText,responseXML:w.responseXML,argument:x}}function n(q){q.conn=null;q=null}function f(v,w,r,q){if(!w){n(v);return}var t,s;try{if(v.conn.status!==undefined&&v.conn.status!=0){t=v.conn.status}else{t=13030}}catch(u){t=13030}if((t>=200&&t<300)||(Ext.isIE&&t==1223)){s=o(v,w.argument);if(w.success){if(!w.scope){w.success(s)}else{w.success.apply(w.scope,[s])}}}else{switch(t){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:s=e(v.tId,w.argument,(r?r:false),q);if(w.failure){if(!w.scope){w.failure(s)}else{w.failure.apply(w.scope,[s])}}break;default:s=o(v,w.argument);if(w.failure){if(!w.scope){w.failure(s)}else{w.failure.apply(w.scope,[s])}}}}n(v);s=null}function m(s,v){v=v||{};var q=s.conn,u=s.tId,r=k.poll,t=v.timeout||null;if(t){k.timeout[u]=setTimeout(function(){k.abort(s,v,true)},t)}r[u]=setInterval(function(){if(q&&q.readyState==4){clearInterval(r[u]);r[u]=null;if(t){clearTimeout(k.timeout[u]);k.timeout[u]=null}f(s,v)}},k.pollInterval)}function i(u,r,t,q){var s=l()||null;if(s){s.conn.open(u,r,true);if(k.useDefaultXhrHeader){j("X-Requested-With",k.defaultXhrHeader)}if(q&&k.useDefaultHeader&&(!k.headers||!k.headers[d])){j(d,k.defaultPostHeader)}if(k.defaultHeaders||k.headers){h(s)}m(s,t);s.conn.send(q||null)}return s}function l(){var r;try{if(r=p(k.transactionId)){k.transactionId++}}catch(q){}finally{return r}}function p(t){var q;try{q=new XMLHttpRequest()}catch(s){for(var r=0;r=d.left&&e.right<=d.right&&e.top>=d.top&&e.bottom<=d.bottom)},getArea:function(){var d=this;return((d.bottom-d.top)*(d.right-d.left))},intersect:function(i){var h=this,f=Math.max(h.top,i.top),g=Math.min(h.right,i.right),d=Math.min(h.bottom,i.bottom),e=Math.max(h.left,i.left);if(d>=f&&g>=e){return new Ext.lib.Region(f,g,d,e)}},union:function(i){var h=this,f=Math.min(h.top,i.top),g=Math.max(h.right,i.right),d=Math.max(h.bottom,i.bottom),e=Math.min(h.left,i.left);return new Ext.lib.Region(f,g,d,e)},constrainTo:function(e){var d=this;d.top=d.top.constrain(e.top,e.bottom);d.bottom=d.bottom.constrain(e.top,e.bottom);d.left=d.left.constrain(e.left,e.right);d.right=d.right.constrain(e.left,e.right);return d},adjust:function(f,e,d,h){var g=this;g.top+=f;g.left+=e;g.right+=h;g.bottom+=d;return g}};Ext.lib.Region.getRegion=function(g){var i=Ext.lib.Dom.getXY(g),f=i[1],h=i[0]+g.offsetWidth,d=i[1]+g.offsetHeight,e=i[0];return new Ext.lib.Region(f,h,d,e)};Ext.lib.Point=function(d,f){if(Ext.isArray(d)){f=d[1];d=d[0]}var e=this;e.x=e.right=e.left=e[0]=d;e.y=e.top=e.bottom=e[1]=f};Ext.lib.Point.prototype=new Ext.lib.Region();(function(){var g=Ext.lib,i=/width|height|opacity|padding/i,f=/^((width|height)|(top|left))$/,d=/width|height|top$|bottom$|left$|right$/i,h=/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i,j=function(k){return typeof k!=="undefined"},e=function(){return new Date()};g.Anim={motion:function(n,l,o,p,k,m){return this.run(n,l,o,p,k,m,Ext.lib.Motion)},run:function(o,l,q,r,k,n,m){m=m||Ext.lib.AnimBase;if(typeof r=="string"){r=Ext.lib.Easing[r]}var p=new m(o,l,q,r);p.animateX(function(){if(Ext.isFunction(k)){k.call(n)}});return p}};g.AnimBase=function(l,k,m,n){if(l){this.init(l,k,m,n)}};g.AnimBase.prototype={doMethod:function(k,n,l){var m=this;return m.method(m.curFrame,n,l-n,m.totalFrames)},setAttr:function(k,m,l){if(i.test(k)&&m<0){m=0}Ext.fly(this.el,"_anim").setStyle(k,m+l)},getAttr:function(k){var m=Ext.fly(this.el),n=m.getStyle(k),l=f.exec(k)||[];if(n!=="auto"&&!h.test(n)){return parseFloat(n)}return(!!(l[2])||(m.getStyle("position")=="absolute"&&!!(l[3])))?m.dom["offset"+l[0].charAt(0).toUpperCase()+l[0].substr(1)]:0},getDefaultUnit:function(k){return d.test(k)?"px":""},animateX:function(n,k){var l=this,m=function(){l.onComplete.removeListener(m);if(Ext.isFunction(n)){n.call(k||l,l)}};l.onComplete.addListener(m,l);l.animate()},setRunAttr:function(p){var r=this,s=this.attributes[p],t=s.to,q=s.by,u=s.from,v=s.unit,l=(this.runAttrs[p]={}),m;if(!j(t)&&!j(q)){return false}var k=j(u)?u:r.getAttr(p);if(j(t)){m=t}else{if(j(q)){if(Ext.isArray(k)){m=[];for(var n=0,o=k.length;n0&&isFinite(w)){if(r.curFrame+w>=v){w=v-(u+1)}r.curFrame+=w}}};g.Bezier=new function(){this.getPosition=function(p,o){var r=p.length,m=[],q=1-o,l,k;for(l=0;l0&&!Ext.isArray(t[0])){t=[t]}else{}Ext.fly(q,"_anim").position();B.setXY(q,j(y)?y:B.getXY(q));p=x.getAttr("points");if(j(z)){r=k.call(x,z,p);for(s=0,u=t.length;s0){o=o.concat(t)}o[o.length]=r}else{n.setRunAttr.call(this,v)}}});var k=function(o,q){var p=g.Dom.getXY(this.el);return[o[0]-p[0]+q[0],o[1]-p[1]+q[1]]}})()})();(function(){var d=Math.abs,i=Math.PI,h=Math.asin,g=Math.pow,e=Math.sin,f=Ext.lib;Ext.apply(f.Easing,{easeBoth:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k+j:-m/2*((--k)*(k-2)-1)+j},easeInStrong:function(k,j,m,l){return m*(k/=l)*k*k*k+j},easeOutStrong:function(k,j,m,l){return -m*((k=k/l-1)*k*k*k-1)+j},easeBothStrong:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k*k*k+j:-m/2*((k-=2)*k*k*k-2)+j},elasticIn:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return -(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j},elasticOut:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return k*g(2,-10*l)*e((l*o-m)*(2*i)/n)+q+j},elasticBoth:function(l,j,q,o,k,n){if(l==0||(l/=o/2)==2){return l==0?j:j+q}n=n||(o*(0.3*1.5));var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return l<1?-0.5*(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j:k*g(2,-10*(l-=1))*e((l*o-m)*(2*i)/n)*0.5+q+j},backIn:function(k,j,n,m,l){l=l||1.70158;return n*(k/=m)*k*((l+1)*k-l)+j},backOut:function(k,j,n,m,l){if(!l){l=1.70158}return n*((k=k/m-1)*k*((l+1)*k+l)+1)+j},backBoth:function(k,j,n,m,l){l=l||1.70158;return((k/=m/2)<1)?n/2*(k*k*(((l*=(1.525))+1)*k-l))+j:n/2*((k-=2)*k*(((l*=(1.525))+1)*k+l)+2)+j},bounceIn:function(k,j,m,l){return m-f.Easing.bounceOut(l-k,0,m,l)+j},bounceOut:function(k,j,m,l){if((k/=l)<(1/2.75)){return m*(7.5625*k*k)+j}else{if(k<(2/2.75)){return m*(7.5625*(k-=(1.5/2.75))*k+0.75)+j}else{if(k<(2.5/2.75)){return m*(7.5625*(k-=(2.25/2.75))*k+0.9375)+j}}}return m*(7.5625*(k-=(2.625/2.75))*k+0.984375)+j},bounceBoth:function(k,j,m,l){return(k