var logger=function(){var REPORT_ERROR_URL="/lmiapi/report-error";var RATE_LIMIT_HITS_PER_SEC=15;var TIMEWINDOW_IN_MS=1E3;var logQueue=[];var limiterTimer=undefined;function log(level,message,context){var url=REPORT_ERROR_URL;if(typeof context==="undefined"||context==null)context={};var logObject={message:message,context:context,level:level};try{var xmlhttp=new XMLHttpRequest;if(typeof bg==="object"&&typeof bg.get==="function"&&typeof bg.get("base_url")==="string")xmlhttp.open("POST",bg.get("base_url").replace(/\/$/,
"")+url);else if(typeof base_url!=="undefined"&&base_url)xmlhttp.open("POST",base_url.replace(/\/$/,"")+url);else xmlhttp.open("POST",url);xmlhttp.setRequestHeader("Content-type","application/json");xmlhttp.send(JSON.stringify(logObject))}catch(e){console.warn("Error reporting log",e,logObject)}}function logAsync(level,message,context){var logObject={message:message,context:context,level:level};return fetch(location.origin+REPORT_ERROR_URL,{method:"POST",body:JSON.stringify(logObject),headers:{"Content-Type":"application/json"}}).catch(function(e){console.warn("Error reporting log",
e,logObject)})}function addToLogQueue(level,message,context){logQueue.push({timestamp:Date.now(),level:level,message:message,context:context});processQueue()}function processQueue(){if(!limiterTimer){var logsToProcess=logQueue.splice(0,RATE_LIMIT_HITS_PER_SEC);logsToProcess.forEach(function(logMessage){log(logMessage.level,logMessage.message,logMessage.context)});limiterTimer=setTimeout(function(){limiterTimer=undefined;if(logQueue.length)processQueue()},TIMEWINDOW_IN_MS)}}return{logAsync:logAsync,
error:function(message,context){addToLogQueue("ERROR",message,context)},warning:function(message,context){addToLogQueue("WARNING",message,context)},info:function(message,context){addToLogQueue("INFO",message,context)},debug:function(message,context){addToLogQueue("DEBUG",message,context)},notice:function(message,context){addToLogQueue("NOTICE",message,context)},alert:function(message,context){addToLogQueue("ALERT",message,context)},critical:function(message,context){addToLogQueue("CRITICAL",message,
context)},emergency:function(message,context){addToLogQueue("EMERGENCY",message,context)}}}();/*
 jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==
typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,
t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,
t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=
S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),
isReady:!0,error:function(e){throw new Error(e);},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e))for(n=e.length;r<n;r++){if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},
makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],
o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,
t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\x00-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+
W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+
M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>
10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\x00"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,
r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1])if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else{if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,
e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=
[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?
1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,
le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&
(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),
d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=
function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===
n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||
v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||
a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},
j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,
t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||
e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e);},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),
e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i)if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else{if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",
first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&
(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,
r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":
"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]=
{}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,
r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),
lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||
~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();
return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),
gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,
p];if(n)while(e=e[u]){if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,
r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],
i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,
e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),
n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=
e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=
se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||
t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?
1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=
d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=
0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&
3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,
D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,
e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,
"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=
e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e;}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,
t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?
r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||
(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),
this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");
t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,
m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,
r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+
e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e;})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&
!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}
function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):
e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};
var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,
t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==
(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,
i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,
e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,
e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,
t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),
o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;
ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],
tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||
(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=
""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,
s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i])if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();
else{if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,
i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),
namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||
{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,
"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&
!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=
[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,
t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==
e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=
e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=
this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),
S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,
arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});
var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,
"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=
e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&
(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<
i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?
S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,
function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===
e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",
insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},
Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",
l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip=
"content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",
t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;
while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,
"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&
A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,
gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==
o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,
t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=
Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,
i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,
n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,
e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,
it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,
t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,
tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=
a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,
t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,
S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===
c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,
g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),
r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||
"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,
!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,
r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=
C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,
t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",
t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||
[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,
n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex",
"readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,
n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):
m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});
var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,
"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,
i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};
S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=
void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&
(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,
t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,
r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;
function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],
t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):
{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,
S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,
processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,
S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=
n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,
bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),
v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid++ +o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&
T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,
t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));
if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=
t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&
(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,
t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},
dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},
wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();
y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=
r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&
i.data||null)}catch(e){if(o)throw e;}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,
i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&
(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===
i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=
N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,
e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&
(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();
else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;
return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},
function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),
S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),
function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=
X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});/*
 jQuery Migrate v1.4.1 | (c) jQuery Foundation and other contributors | jquery.org/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}a.migrateVersion="1.4.1";var f={};a.migrateWarnings=
[],b.console&&b.console.log&&b.console.log("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("<input/>",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||
function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&
d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') might use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,
b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.find,s=a.parseJSON,t=/^\s*</,u=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
v=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,w=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,e,f){var g,h;return b&&"string"==typeof b&&!a.isPlainObject(e)&&(g=w.exec(a.trim(b)))&&g[0]&&(t.test(b)||d("$(html) HTML strings must start with '<' character"),g[3]&&d("$(html) HTML text after last tag is ignored"),"#"===g[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&e.context.nodeType&&(e=e.context),
a.parseHTML)?q.call(this,a.parseHTML(g[2],e&&e.ownerDocument||e||document,!0),e,f):(h=q.apply(this,arguments),b&&b.selector!==c?(h.selector=b.selector,h.context=b.context):(h.selector="string"==typeof b?b:"",b&&(h.context=b.nodeType?b:e||document)),h)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&u.test(a))try{document.querySelector(a)}catch(c){a=a.replace(v,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),
d("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){d("Attribute selector with '#' was not fixed: "+b[0])}}return r.apply(this,b)};var x;for(x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a.find[x]=r[x]);a.parseJSON=function(a){return a?s.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||
/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.boxModel=a.support.boxModel="CSS1Compat"===document.compatMode,e(a,"boxModel",a.boxModel,"jQuery.boxModel is deprecated"),e(a.support,"boxModel",
a.support.boxModel,"jQuery.support.boxModel is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){var f=a.fn.init.call(this,d,e,c);return f instanceof b?f:b(f)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length};var y=!1;a.swap&&
a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return y=!0,a=d.apply(this,arguments),y=!1,a})}),a.swap=function(a,b,c,e){var f,g,h={};y||d("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=c.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f},a.ajaxSetup({converters:{"text json":a.parseJSON}});var z=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==
b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?z.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var A=/\/(java|ecma)script/i;a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||A.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},
g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var B=a.event.add,C=a.event.remove,D=a.event.trigger,E=a.fn.toggle,F=a.fn.live,G=a.fn.die,H=a.fn.load,I="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",J=new RegExp("\\b(?:"+I+")\\b"),K=/(?:^|\s)hover(\.\S+|)\b/,L=function(b){return"string"!=typeof b||
a.event.special.hover?b:(K.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(K,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&J.test(b)&&d("AJAX events should be attached to document: "+b),B.call(this,
a,L(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){C.call(this,a,L(b)||"",c,d,e)},a.each(["load","unload","error"],function(b,c){a.fn[c]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===c&&"string"==typeof a[0]?H.apply(this,a):(d("jQuery.fn."+c+"() is deprecated"),a.splice(0,0,c),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return E.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");
var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g<e.length;)e[g++].guid=f;return this.click(h)},a.fn.live=function(b,c,e){return d("jQuery.fn.live() is deprecated"),F?F.apply(this,arguments):(a(this.context).on(b,this.selector,c,e),this)},a.fn.die=function(b,c){return d("jQuery.fn.die() is deprecated"),G?G.apply(this,arguments):(a(this.context).off(b,
this.selector||"**",c),this)},a.event.trigger=function(a,b,c,e){return c||J.test(a)||d("Global events are undocumented and deprecated"),D.call(this,a,b,c||document,e)},a.each(I.split("|"),function(b,c){a.event.special[c]={setup:function(){var b=this;return b!==document&&(a.event.add(document,c+"."+a.guid,function(){a.event.trigger(c,Array.prototype.slice.call(arguments,1),b,!0)}),a._data(this,c,a.guid++)),!1},teardown:function(){return this!==document&&a.event.remove(document,c+"."+a._data(this,c)),
!1}}}),a.event.special.ready={setup:function(){this===document&&d("'ready' event is deprecated")}};var M=a.fn.andSelf||a.fn.addBack,N=a.fn.find;if(a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),M.apply(this,arguments)},a.fn.find=function(a){var b=N.apply(this,arguments);return b.context=this.context,b.selector=this.selector?this.selector+" "+a:a,b},a.Callbacks){var O=a.Deferred,P=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],
["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var c=O(),e=c.promise();return c.pipe=e.pipe=function(){var b=arguments;return d("deferred.pipe() is deprecated"),a.Deferred(function(d){a.each(P,function(f,g){var h=a.isFunction(b[f])&&b[f];c[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(d.resolve).fail(d.reject).progress(d.notify):
d[g[0]+"With"](this===e?d.promise():this,h?[b]:arguments)})}),b=null}).promise()},c.isResolved=function(){return d("deferred.isResolved is deprecated"),"resolved"===c.state()},c.isRejected=function(){return d("deferred.isRejected is deprecated"),"rejected"===c.state()},b&&b.call(c,c),c}}}(jQuery,window);/*
 jQuery Migrate v3.4.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+n[a]>+o[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.0";var t=
Object.create(null),o=(s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+
", version "+s.migrateVersion)),{});function i(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return i(n,o),r},set:function(e){i(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&i(n,o),(s.migrateIsPatchEnabled(n)?
r:a||s.noop).apply(this,arguments)}}function u(e,t,r,n,o){if(!o)throw new Error("No warning message provided");a(e,t,r,n,o)}function d(e,t,r,n){a(e,t,r,n)}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&i("quirks","jQuery is not compatible with Quirks Mode");var c,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=
/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(c in d(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(i("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,d(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=
t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),i("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){i("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,c)&&(s.find[c]=y[c]);u(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),u(s,"parseJSON",function(){return JSON.parse.apply(null,
arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),u(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),u(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&u(s,"trim",function(e){return null==
e?"":(e+"").replace(v,"")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(u(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),u(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(u(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),u(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),u(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),u(s,"isWindow",function(e){return null!=e&&e===e.window},"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,d(s,"ajax",function(){var e=
l.apply(this,arguments);return e.promise&&(u(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),u(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),u(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&i("jsonp-promotion",
"JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function Q(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}d(s.fn,"removeAttr",function(e){var r=this;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&(i("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),d(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?
b.apply(this,arguments):(i("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var x,A=!1,R=/^[a-z]/,T=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width",
"reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return A=!0,e=r.apply(this,arguments),A=!1,e})}),d(s,"swap",function(e,t,r,n){var o,a={};for(o in A||i("swap","jQuery.swap() is undocumented and deprecated"),t)a[o]=e.style[o],e.style[o]=t[o];for(o in r=r.apply(e,n||[]),t)e.style[o]=a[o];return r},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return i("cssProps","jQuery.cssProps is deprecated"),
Reflect.set.apply(this,arguments)}})),e("4.0.0")&&"undefined"!=typeof Proxy&&(s.cssNumber=new Proxy({animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},{get:function(){return i("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return i("css-number",
"jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}})),x=s.fn.css,d(s.fn,"css",function(e,t){var r,n=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(n,e,t)}),this):("number"==typeof t&&(t=Q(e),r=t,R.test(r)&&T.test(r[0].toUpperCase()+r.slice(1))||s.cssNumber[t]||i("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),x.apply(this,arguments))},"css-number");function C(e){var t=n.document.implementation.createHTMLDocument("");
return t.body.innerHTML=e,t.body&&t.body.innerHTML}var S,N,P,k,H,E,M,q=s.data,D=(d(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&q.call(this,e),o={},t)a!==Q(a)?(i("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return q.call(this,e,o),t}return t&&"string"==typeof t&&t!==Q(t)&&(n=s.hasData(e)&&q.call(this,e))&&t in n?(i("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<
arguments.length&&(n[t]=r),n[t]):q.apply(this,arguments)},"data-camelCase"),s.fx&&(P=s.Tween.prototype.run,k=function(e){return e},d(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(i("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=k),P.apply(this,arguments)},"easing-one-arg"),S=s.fx.interval,N="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,
get:function(){return n.document.hidden||i("fx-interval",N),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){i("fx-interval",N),S=e}})),s.fn.load),F=s.event.add,W=s.event.fix,O=(s.event.props=[],s.event.fixHooks={},r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),d(s.event,"fix",function(e){var t=e.type,r=this.fixHooks[t],n=s.event.props;if(n.length){i("event-old-patch","jQuery.event.props are deprecated and removed: "+
n.join());while(n.length)s.event.addProp(n.pop())}if(r&&!r._migrated_&&(r._migrated_=!0,i("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+t),(n=r.props)&&n.length))while(n.length)s.event.addProp(n.pop());return t=W.call(this,e),r&&r.filter?r.filter(t,e):t},"event-old-patch"),d(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&i("load-after-event","jQuery(window).on('load'...) called after load event occurred"),F.apply(this,arguments)},
"load-after-event"),s.each(["load","unload","error"],function(e,t){d(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?D.apply(this,e):(i("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),
function(e,r){u(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&i("ready-event","'ready' event is deprecated")}},u(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),u(s.fn,"unbind",function(e,t){return this.off(e,null,
t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),u(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),u(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),u(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated"),/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi),
_=(s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},d(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(O,"<$1></$2>"))!==t&&C(t)!==C(r)&&i("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(O,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags"),s.fn.offset);return d(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(i("offset-valid-elem",
"jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(H=s.param,d(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(i("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),H.call(this,e,t)},"param-ajax-traditional")),u(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(E=s.Deferred,
M=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],d(s,"Deferred",function(e){var a=E(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(M,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):
n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return u(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),u(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=E.exceptionHook),s});!function(r,n){if((r=n).hasOwnProperty("ajax")){originalAjaxFunction=r.ajax,r.ajax=function(r){r.hasOwnProperty("converters")?r.converters["text json"]=a:r.converters={"text json":a},originalAjaxFunction(r)};var a=function(r){try{return JSON.parse(r)}catch(r){var n="Warning: Could not parse expected JSON response. "+params.url;return console.warn(n),originalAjaxFunction({global:!1,type:"GET",cache:!1,url:"error.php?msg="+n}),{}}}}}($,jQuery);/*
 jQuery Migrate - v1.2.1 - 2013-05-08
 https://github.com/jquery/jquery-migrate
 Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
(function(jQuery,window,undefined){var warnedAbout={};jQuery.migrateWarnings=[];if(!jQuery.migrateMute&&window.console&&window.console.log);if(jQuery.migrateTrace===undefined)jQuery.migrateTrace=true;jQuery.migrateReset=function(){warnedAbout={};jQuery.migrateWarnings.length=0};function migrateWarn(msg){var console=window.console;if(!warnedAbout[msg]){warnedAbout[msg]=true;jQuery.migrateWarnings.push(msg);if(console&&console.warn&&!jQuery.migrateMute){console.warn("JQMIGRATE: "+msg);if(jQuery.migrateTrace&&
console.trace)console.trace()}}}function migrateWarnProp(obj,prop,value,msg){if(Object.defineProperty)try{Object.defineProperty(obj,prop,{configurable:true,enumerable:true,get:function(){migrateWarn(msg);return value},set:function(newValue){migrateWarn(msg);value=newValue}});return}catch(err){}jQuery._definePropertyBroken=true;obj[prop]=value}if(document.compatMode==="BackCompat")migrateWarn("jQuery is not compatible with Quirks Mode");var attrFn=jQuery("<input/>",{size:1}).attr("size")&&jQuery.attrFn,
oldAttr=jQuery.attr,valueAttrGet=jQuery.attrHooks.value&&jQuery.attrHooks.value.get||function(){return null},valueAttrSet=jQuery.attrHooks.value&&jQuery.attrHooks.value.set||function(){return undefined},rnoType=/^(?:input|button)$/i,rnoAttrNodeType=/^[238]$/,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ruseDefault=/^(?:checked|selected)$/i;migrateWarnProp(jQuery,"attrFn",attrFn||{},"jQuery.attrFn is deprecated");
jQuery.attr=function(elem,name,value,pass){var lowerName=name.toLowerCase(),nType=elem&&elem.nodeType;if(pass){if(oldAttr.length<4)migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");if(elem&&!rnoAttrNodeType.test(nType)&&(attrFn?name in attrFn:jQuery.isFunction(jQuery.fn[name])))return jQuery(elem)[name](value)}if(name==="type"&&value!==undefined&&rnoType.test(elem.nodeName)&&elem.parentNode)migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");if(!jQuery.attrHooks[lowerName]&&
rboolean.test(lowerName)){jQuery.attrHooks[lowerName]={get:function(elem,name){var attrNode,property=jQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined},set:function(elem,value,name){var propName;if(value===false)jQuery.removeAttr(elem,name);else{propName=jQuery.propFix[name]||name;if(propName in elem)elem[propName]=true;elem.setAttribute(name,name.toLowerCase())}return name}};
if(ruseDefault.test(lowerName));}return oldAttr.call(jQuery,elem,name,value)};jQuery.attrHooks.value={get:function(elem,name){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button")return valueAttrGet.apply(this,arguments);if(nodeName!=="input"&&nodeName!=="option")migrateWarn("jQuery.fn.attr('value') no longer gets properties");return name in elem?elem.value:null},set:function(elem,value){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button")return valueAttrSet.apply(this,
arguments);if(nodeName!=="input"&&nodeName!=="option")migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");elem.value=value}};var matched,browser,oldInit=jQuery.fn.init,oldParseJSON=jQuery.parseJSON,rquickExpr=/^([^<]*)(<[\w\W]+>)([^>]*)$/;jQuery.fn.init=function(selector,context,rootjQuery){var match;if(selector&&typeof selector==="string"&&!jQuery.isPlainObject(context)&&(match=rquickExpr.exec(jQuery.trim(selector)))&&match[0]){if(selector.charAt(0)!=="<")migrateWarn("$(html) HTML strings must start with '<' character");
if(match[3])migrateWarn("$(html) HTML text after last tag is ignored");if(match[0].charAt(0)==="#"){migrateWarn("HTML string cannot start with a '#' character");jQuery.error("JQMIGRATE: Invalid selector string (XSS)")}if(context&&context.context)context=context.context;if(jQuery.parseHTML)return oldInit.call(this,jQuery.parseHTML(match[2],context,true),context,rootjQuery)}return oldInit.apply(this,arguments)};jQuery.fn.init.prototype=jQuery.fn;jQuery.parseJSON=function(json){if(!json&&json!==null){migrateWarn("jQuery.parseJSON requires a valid JSON string");
return null}return oldParseJSON.apply(this,arguments)};jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=
true;browser.version=matched.version}if(browser.chrome)browser.webkit=true;else if(browser.webkit)browser.safari=true;jQuery.browser=browser}jQuery.sub=function(){function jQuerySub(selector,context){return new jQuerySub.fn.init(selector,context)}jQuery.extend(true,jQuerySub,this);jQuerySub.superclass=this;jQuerySub.fn=jQuerySub.prototype=this();jQuerySub.fn.constructor=jQuerySub;jQuerySub.sub=this.sub;jQuerySub.fn.init=function init(selector,context){if(context&&context instanceof jQuery&&!(context instanceof
jQuerySub))context=jQuerySub(context);return jQuery.fn.init.call(this,selector,context,rootjQuerySub)};jQuerySub.fn.init.prototype=jQuerySub.fn;var rootjQuerySub=jQuerySub(document);migrateWarn("jQuery.sub() is deprecated");return jQuerySub};jQuery.ajaxSetup({converters:{"text json":jQuery.parseJSON}});var oldFnData=jQuery.fn.data;jQuery.fn.data=function(name){var ret,evt,elem=this[0];if(elem&&name==="events"&&arguments.length===1){ret=jQuery.data(elem,name);evt=jQuery._data(elem,name);if((ret===
undefined||ret===evt)&&evt!==undefined){migrateWarn("Use of jQuery.fn.data('events') is deprecated");return evt}}return oldFnData.apply(this,arguments)};var rscriptType=/\/(java|ecma)script/i,oldSelf=jQuery.fn.andSelf||jQuery.fn.addBack;jQuery.fn.andSelf=function(){migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");return oldSelf.apply(this,arguments)};if(!jQuery.clean)jQuery.clean=function(elems,context,fragment,scripts){context=context||document;context=!context.nodeType&&context[0]||
context;context=context.ownerDocument||context;migrateWarn("jQuery.clean() is deprecated");var i,elem,handleScript,jsTags,ret=[];jQuery.merge(ret,jQuery.buildFragment(elems,context).childNodes);if(fragment){handleScript=function(elem){if(!elem.type||rscriptType.test(elem.type))return scripts?scripts.push(elem.parentNode?elem.parentNode.removeChild(elem):elem):fragment.appendChild(elem)};for(i=0;(elem=ret[i])!=null;i++)if(!(jQuery.nodeName(elem,"script")&&handleScript(elem))){fragment.appendChild(elem);
if(typeof elem.getElementsByTagName!=="undefined"){jsTags=jQuery.grep(jQuery.merge([],elem.getElementsByTagName("script")),handleScript);ret.splice.apply(ret,[i+1,0].concat(jsTags));i+=jsTags.length}}}return ret};var eventAdd=jQuery.event.add,eventRemove=jQuery.event.remove,eventTrigger=jQuery.event.trigger,oldToggle=jQuery.fn.toggle,oldLive=jQuery.fn.live,oldDie=jQuery.fn.die,ajaxEvents="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",rajaxEvent=new RegExp("\\b(?:"+ajaxEvents+")\\b"),
rhoverHack=/(?:^|\s)hover(\.\S+|)\b/,hoverHack=function(events){if(typeof events!=="string"||jQuery.event.special.hover)return events;if(rhoverHack.test(events))migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");return events&&events.replace(rhoverHack,"mouseenter$1 mouseleave$1")};if(jQuery.event.props&&jQuery.event.props[0]!=="attrChange")jQuery.event.props.unshift("attrChange","attrName","relatedNode","srcElement");if(jQuery.event.dispatch)migrateWarnProp(jQuery.event,
"handle",jQuery.event.dispatch,"jQuery.event.handle is undocumented and deprecated");jQuery.event.add=function(elem,types,handler,data,selector){if(elem!==document&&rajaxEvent.test(types))migrateWarn("AJAX events should be attached to document: "+types);eventAdd.call(this,elem,hoverHack(types||""),handler,data,selector)};jQuery.event.remove=function(elem,types,handler,selector,mappedTypes){eventRemove.call(this,elem,hoverHack(types)||"",handler,selector,mappedTypes)};jQuery.fn.error=function(){var args=
Array.prototype.slice.call(arguments,0);migrateWarn("jQuery.fn.error() is deprecated");args.splice(0,0,"error");if(arguments.length)return this.bind.apply(this,args);this.triggerHandler.apply(this,args);return this};jQuery.fn.toggle=function(fn,fn2){if(!jQuery.isFunction(fn)||!jQuery.isFunction(fn2))return oldToggle.apply(this,arguments);var args=arguments,guid=fn.guid||jQuery.guid++,i=0,toggler=function(event){var lastToggle=(jQuery._data(this,"lastToggle"+fn.guid)||0)%i;jQuery._data(this,"lastToggle"+
fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false};toggler.guid=guid;while(i<args.length)args[i++].guid=guid;return this.click(toggler)};jQuery.fn.live=function(types,data,fn){if(oldLive)return oldLive.apply(this,arguments);jQuery(this.context).on(types,this.selector,data,fn);return this};jQuery.fn.die=function(types,fn){if(oldDie)return oldDie.apply(this,arguments);jQuery(this.context).off(types,this.selector||"**",fn);return this};jQuery.event.trigger=
function(event,data,elem,onlyHandlers){if(!elem&&!rajaxEvent.test(event))migrateWarn("Global events are undocumented and deprecated");return eventTrigger.call(this,event,data,elem||document,onlyHandlers)};jQuery.each(ajaxEvents.split("|"),function(_,name){jQuery.event.special[name]={setup:function(){var elem=this;if(elem!==document){jQuery.event.add(document,name+"."+jQuery.guid,function(){jQuery.event.trigger(name,null,elem,true)});jQuery._data(this,name,jQuery.guid++)}return false},teardown:function(){if(this!==
document)jQuery.event.remove(document,name+"."+jQuery._data(this,name));return false}}})})(jQuery,window);Ext={version:"2.2"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B)Ext.apply(C,B);if(C&&D&&typeof D=="object")for(var A in D)C[A]=D[A];return C};
(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=/webkit|khtml/.test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&(ua.indexOf("msie")>-1||(ua.match(/trident.*rv:11\./)?true:false)),isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isGecko3=!isSafari&&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]}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];o=window[rt];for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}},urlEncode:function(o){if(!o)return"";var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=="undefined")buf.push(k,"=&");else if(type!="function"&&type!=
"object")buf.push(k,"=",encodeURIComponent(ov),"&");else if(Ext.isArray(ov))if(ov.length)for(var i=0,len=ov.length;i<len;i++)buf.push(k,"=",encodeURIComponent(ov[i]===undefined?"":ov[i]),"&");else buf.push(k,"=&")}buf.pop();return buf.join("")},urlDecode:function(string,overwrite){if(!string||!string.length)return{};var obj={};var pairs=string.split("&");var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split("=");name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);
if(overwrite!==true)if(typeof obj[name]=="undefined")obj[name]=value;else if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value)}else obj[name].push(value);else obj[name]=value}return obj},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string")array=[array];for(var i=0,len=array.length;i<len;i++)if(fn.call(scope||array[i],array[i],i,array)===false)return i},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];
if(Ext.isArray(a))r=r.concat(a);else if(a.length!==undefined&&!a.substr)r=r.concat(Array.prototype.slice.call(a,0));else r.push(a)}return r},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},callback:function(cb,scope,args,delay){if(typeof cb=="function")if(delay)cb.defer(delay,scope,args||[]);else cb.apply(scope,args||[])},getDom:function(el){if(!el||!document)return null;return el.dom?el.dom:typeof el=="string"?document.getElementById(el):el},getDoc:function(){return Ext.get(document)},
getBody:function(){return Ext.get(document.body||document.documentElement)},getCmp:function(id){return Ext.ComponentMgr.get(id)},num:function(v,defaultValue){if(typeof v!="number")return defaultValue;return v},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as)if(typeof as.destroy=="function")as.destroy();else if(as.dom){as.removeAllListeners();as.remove()}}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!="BODY"){d=d||document.createElement("div");
d.appendChild(n);d.innerHTML=""}}}():function(n){if(n&&n.parentNode&&n.tagName!="BODY")n.parentNode.removeChild(n)},type:function(o){if(o===undefined||o===null)return false;if(o.htmlElement)return"element";var t=typeof o;if(t=="object"&&o.nodeName)switch(o.nodeType){case 1:return"element";case 3:return/\S/.test(o.nodeValue)?"textnode":"whitespace"}if(t=="object"||t=="function"){switch(o.constructor){case Array:return"array";case RegExp:return"regexp"}if(typeof o.length=="number"&&typeof o.item=="function")return"nodelist"}return t},
isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==="":false)},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v},isArray:function(v){return v&&typeof v.length=="number"&&typeof v.splice=="function"},isDate:function(v){return v&&typeof v.getFullYear=="function"},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,
isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:isIE&&!isIE7||isMac&&isGecko&&!isGecko3});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.grid","Ext.dd","Ext.tree","Ext.data","Ext.form","Ext.menu","Ext.state","Ext.lib","Ext.layout","Ext.app","Ext.ux");
Ext.apply(Function.prototype,{createCallback:function(){var A=arguments;var B=this;return function(){return B.apply(window,A)}},createDelegate:function(C,B,A){var D=this;return function(){var F=B||arguments;if(A===true){F=Array.prototype.slice.call(arguments,0);F=F.concat(B)}else if(typeof A=="number"){F=Array.prototype.slice.call(arguments,0);var E=[A,0].concat(B);Array.prototype.splice.apply(F,E)}return D.apply(C||window,F)}},defer:function(C,E,B,A){var D=this.createDelegate(E,B,A);if(C)return setTimeout(D,
C);D();return 0},createSequence:function(B,A){if(typeof B!="function")return this;var C=this;return function(){var D=C.apply(this||window,arguments);B.apply(A||this||window,arguments);return D}},createInterceptor:function(B,A){if(typeof B!="function")return this;var C=this;return function(){B.target=this;B.method=C;if(B.apply(A||this||window,arguments)===false)return;return C.apply(this||window,arguments)}}});
Ext.applyIf(String,{escape:function(A){return A.replace(/('|\\)/g,"\\$1")},leftPad:function(D,B,C){var A=new String(D);if(!C)C=" ";while(A.length<B)A=C+A;return A.toString()},format:function(B){var A=Array.prototype.slice.call(arguments,1);return B.replace(/\{(\d+)\}/g,function(C,D){return A[D]})}});String.prototype.toggle=function(B,A){return this==B?A:B};String.prototype.trim=function(){var A=/^\s+|\s+$/g;return function(){return this.replace(A,"")}}();
Ext.applyIf(Number.prototype,{constrain:function(B,A){return Math.min(Math.max(this,B),A)}});Ext.applyIf(Array.prototype,{indexOf:function(C){for(var B=0,A=this.length;B<A;B++)if(this[B]==C)return B;return-1},remove:function(B){var A=this.indexOf(B);if(A!=-1)this.splice(A,1);return this}});Date.prototype.getElapsed=function(A){return Math.abs((A||new Date).getTime()-this.getTime())};if(typeof jQuery=="undefined")throw"Unable to load Ext, jQuery not found.";
(function(){var B;Ext.lib.Dom={getViewWidth:function(D){return D?Math.max(jQuery(document).width(),jQuery(window).width()):jQuery(window).width()},getViewHeight:function(D){return D?Math.max(jQuery(document).height(),jQuery(window).height()):jQuery(window).height()},isAncestor:function(E,F){E=Ext.getDom(E);F=Ext.getDom(F);if(!E||!F)return false;if(E.contains&&!Ext.isSafari)return E.contains(F);else if(E.compareDocumentPosition)return!!(E.compareDocumentPosition(F)&16);else{var D=F.parentNode;while(D){if(D==
E)return true;else if(!D.tagName||D.tagName.toUpperCase()=="HTML")return false;D=D.parentNode}return false}},getRegion:function(D){return Ext.lib.Region.getRegion(D)},getY:function(D){return this.getXY(D)[1]},getX:function(D){return this.getXY(D)[0]},getXY:function(F){var E,J,L,M,I=document.body||document.documentElement;F=Ext.getDom(F);if(F==I)return[0,0];if(F.getBoundingClientRect){L=F.getBoundingClientRect();M=C(document).getScroll();return[L.left+M.left,L.top+M.top]}var N=0,K=0;E=F;var D=C(F).getStyle("position")==
"absolute";while(E){N+=E.offsetLeft;K+=E.offsetTop;if(!D&&C(E).getStyle("position")=="absolute")D=true;if(Ext.isGecko){J=C(E);var O=parseInt(J.getStyle("borderTopWidth"),10)||0;var G=parseInt(J.getStyle("borderLeftWidth"),10)||0;N+=G;K+=O;if(E!=F&&J.getStyle("overflow")!="visible"){N+=G;K+=O}}E=E.offsetParent}if(Ext.isSafari&&D){N-=I.offsetLeft;K-=I.offsetTop}if(Ext.isGecko&&!D){var H=C(I);N+=parseInt(H.getStyle("borderLeftWidth"),10)||0;K+=parseInt(H.getStyle("borderTopWidth"),10)||0}E=F.parentNode;
while(E&&E!=I){if(!Ext.isOpera||E.tagName!="TR"&&C(E).getStyle("display")!="inline"){N-=E.scrollLeft;K-=E.scrollTop}E=E.parentNode}return[N,K]},setXY:function(D,E){D=Ext.fly(D,"_setXY");D.position();var F=D.translatePoints(E);if(E[0]!==false)D.dom.style.left=F.left+"px";if(E[1]!==false)D.dom.style.top=F.top+"px"},setX:function(E,D){this.setXY(E,[D,false])},setY:function(D,E){this.setXY(D,[false,E])}};function C(D){if(!B)B=new Ext.Element.Flyweight;B.dom=D;return B}Ext.lib.Event={getPageX:function(D){D=
D.browserEvent||D;return D.pageX},getPageY:function(D){D=D.browserEvent||D;return D.pageY},getXY:function(D){D=D.browserEvent||D;return[D.pageX,D.pageY]},getTarget:function(D){return D.target},on:function(H,D,G,F,E){jQuery(H).bind(D,G)},un:function(F,D,E){jQuery(F).unbind(D,E)},purgeElement:function(D){jQuery(D).unbind()},preventDefault:function(D){D=D.browserEvent||D;if(D.preventDefault)D.preventDefault();else D.returnValue=false},stopPropagation:function(D){D=D.browserEvent||D;if(D.stopPropagation)D.stopPropagation();
else D.cancelBubble=true},stopEvent:function(D){this.preventDefault(D);this.stopPropagation(D)},onAvailable:function(I,E,D){var H=new Date;var F=function(){if(H.getElapsed()>1E4)clearInterval(G);var J=document.getElementById(I);if(J){clearInterval(G);E.call(D||window,J)}};var G=setInterval(F,50)},resolveTextNode:function(D){if(D&&3==D.nodeType)return D.parentNode;else return D},getRelatedTarget:function(E){E=E.browserEvent||E;var D=E.relatedTarget;if(!D)if(E.type=="mouseout")D=E.toElement;else if(E.type==
"mouseover")D=E.fromElement;return this.resolveTextNode(D)}};Ext.lib.Ajax=function(){var D=function(E){return function(G,F){if((F=="error"||F=="timeout")&&E.failure)E.failure.call(E.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:E.argument});else if(E.success)E.success.call(E.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:E.argument})}};return{request:function(K,H,E,I,F){var J={type:K,url:H,data:I,timeout:E.timeout,complete:D(E)};if(F){var G=
F.headers;if(F.xmlData){J.data=F.xmlData;J.processData=false;J.type=K?K:F.method?F.method:"POST";if(!G||!G["Content-Type"])J.contentType="text/xml"}else if(F.jsonData){J.data=typeof F.jsonData=="object"?Ext.encode(F.jsonData):F.jsonData;J.processData=false;J.type=K?K:F.method?F.method:"POST";if(!G||!G["Content-Type"])J.contentType="application/json"}if(G)J.beforeSend=function(M){for(var L in G)if(G.hasOwnProperty(L))M.setRequestHeader(L,G[L])}}jQuery.ajax(J)},formRequest:function(I,H,F,J,E,G){jQuery.ajax({type:Ext.getDom(I).method||
"POST",url:H,data:jQuery(I).serialize()+(J?"&"+J:""),timeout:F.timeout,complete:D(F)})},isCallInProgress:function(E){return false},abort:function(E){return false},serializeForm:function(E){return jQuery(E.dom||E).serialize()}}}();Ext.lib.Anim=function(){var D=function(E,F){var G=true;return{stop:function(H){},isAnimated:function(){return G},proxyCallback:function(){G=false;Ext.callback(E,F)}}};return{scroll:function(H,F,J,K,E,G){var I=D(E,G);H=Ext.getDom(H);if(typeof F.scroll.to[0]=="number")H.scrollLeft=
F.scroll.to[0];if(typeof F.scroll.to[1]=="number")H.scrollTop=F.scroll.to[1];I.proxyCallback();return I},motion:function(H,F,I,J,E,G){return this.run(H,F,I,J,E,G)},color:function(H,F,J,K,E,G){var I=D(E,G);I.proxyCallback();return I},run:function(F,N,I,M,G,P,O){var J=D(G,P),K=Ext.fly(F,"_animrun");var E={};for(var H in N){if(N[H].from)if(H!="points")K.setStyle(H,N[H].from);switch(H){case "points":var L,R;K.position();if(L=N.points.by){var Q=K.getXY();R=K.translatePoints([Q[0]+L[0],Q[1]+L[1]])}else R=
K.translatePoints(N.points.to);E.left=R.left;E.top=R.top;if(!parseInt(K.getStyle("left"),10))K.setLeft(0);if(!parseInt(K.getStyle("top"),10))K.setTop(0);if(N.points.from)K.setXY(N.points.from);break;case "width":E.width=N.width.to;break;case "height":E.height=N.height.to;break;case "opacity":E.opacity=N.opacity.to;break;case "left":E.left=N.left.to;break;case "top":E.top=N.top.to;break;default:E[H]=N[H].to;break}}jQuery(F).animate(E,I*1E3,undefined,J.proxyCallback);return J}}}();Ext.lib.Region=function(F,
G,D,E){this.top=F;this[1]=F;this.right=G;this.bottom=D;this.left=E;this[0]=E};Ext.lib.Region.prototype={contains:function(D){return D.left>=this.left&&D.right<=this.right&&D.top>=this.top&&D.bottom<=this.bottom},getArea:function(){return(this.bottom-this.top)*(this.right-this.left)},intersect:function(H){var F=Math.max(this.top,H.top);var G=Math.min(this.right,H.right);var D=Math.min(this.bottom,H.bottom);var E=Math.max(this.left,H.left);if(D>=F&&G>=E)return new Ext.lib.Region(F,G,D,E);else return null},
union:function(H){var F=Math.min(this.top,H.top);var G=Math.max(this.right,H.right);var D=Math.max(this.bottom,H.bottom);var E=Math.min(this.left,H.left);return new Ext.lib.Region(F,G,D,E)},constrainTo:function(D){this.top=this.top.constrain(D.top,D.bottom);this.bottom=this.bottom.constrain(D.top,D.bottom);this.left=this.left.constrain(D.left,D.right);this.right=this.right.constrain(D.left,D.right);return this},adjust:function(F,E,D,G){this.top+=F;this.left+=E;this.right+=G;this.bottom+=D;return this}};
Ext.lib.Region.getRegion=function(G){var I=Ext.lib.Dom.getXY(G);var F=I[1];var H=I[0]+G.offsetWidth;var D=I[1]+G.offsetHeight;var E=I[0];return new Ext.lib.Region(F,H,D,E)};Ext.lib.Point=function(D,E){if(Ext.isArray(D)){E=D[1];D=D[0]}this.x=this.right=this.left=this[0]=D;this.y=this.top=this.bottom=this[1]=E};Ext.lib.Point.prototype=new Ext.lib.Region;if(Ext.isIE){function A(){var D=Function.prototype;delete D.createSequence;delete D.defer;delete D.createDelegate;delete D.createCallback;delete D.createInterceptor;
if(typeof window.detachEvent=="function")window.detachEvent("onunload",A);else if(typeof window.removeEventListener=="function")window.removeEventListener("unload",A,false)}if(typeof window.attachEvent=="function"||typeof window.attachEvent=="object")window.attachEvent("onunload",A);else if(typeof window.addEventListener=="function")window.addEventListener("unload",A,false)}})();Ext.DomHelper=function(){var L=null;var F=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var B=/^table|tbody|tr|td$/i;var A=function(T){if(typeof T=="string")return T;var O="";if(Ext.isArray(T)){for(var R=0,P=T.length;R<P;R++)O+=A(T[R]);return O}if(!T.tag)T.tag="div";O+="<"+T.tag;for(var N in T){if(N=="tag"||N=="children"||N=="cn"||N=="html"||typeof T[N]=="function")continue;if(N=="style"){var S=T["style"];if(typeof S=="function")S=S.call();if(typeof S=="string")O+=' style="'+
S+'"';else if(typeof S=="object"){O+=' style="';for(var Q in S)if(typeof S[Q]!="function")O+=Q+":"+S[Q]+";";O+='"'}}else if(N=="cls")O+=' class="'+T["cls"]+'"';else if(N=="htmlFor")O+=' for="'+T["htmlFor"]+'"';else O+=" "+N+'="'+T[N]+'"'}if(F.test(T.tag))O+="/>";else{O+=">";var U=T.children||T.cn;if(U)O+=A(U);else if(T.html)O+=T.html;O+="</"+T.tag+">"}return O};var M=function(T,O){var S;if(Ext.isArray(T)){S=document.createDocumentFragment();for(var R=0,P=T.length;R<P;R++)M(T[R],S)}else if(typeof T==
"string")S=document.createTextNode(T);else{S=document.createElement(T.tag||"div");var Q=!!S.setAttribute;for(var N in T){if(N=="tag"||N=="children"||N=="cn"||N=="html"||N=="style"||typeof T[N]=="function")continue;if(N=="cls")S.className=T["cls"];else if(Q)S.setAttribute(N,T[N]);else S[N]=T[N]}Ext.DomHelper.applyStyles(S,T.style);var U=T.children||T.cn;if(U)M(U,S);else if(T.html)S.innerHTML=T.html}if(O)O.appendChild(S);return S};var I=function(S,Q,P,R){L.innerHTML=[Q,P,R].join("");var N=-1,O=L;while(++N<
S)O=O.firstChild;return O};var J="<table>",E="</table>",C=J+"<tbody>",K="</tbody>"+E,H=C+"<tr>",D="</tr>"+K;var G=function(N,O,Q,P){if(!L)L=document.createElement("div");var R;var S=null;if(N=="td"){if(O=="afterbegin"||O=="beforeend")return;if(O=="beforebegin"){S=Q;Q=Q.parentNode}else{S=Q.nextSibling;Q=Q.parentNode}R=I(4,H,P,D)}else if(N=="tr")if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(3,C,P,K)}else if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterbegin")S=Q.firstChild;
R=I(4,H,P,D)}else if(N=="tbody")if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(2,J,P,E)}else if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterbegin")S=Q.firstChild;R=I(3,C,P,K)}else{if(O=="beforebegin"||O=="afterend")return;if(O=="afterbegin")S=Q.firstChild;R=I(2,J,P,E)}Q.insertBefore(R,S);return R};return{useDom:false,markup:function(N){return A(N)},applyStyles:function(P,Q){if(Q){P=Ext.fly(P);if(typeof Q=="string"){var O=/\s?([a-z\-]*):\s?([^;]*);?/gi;var R;while((R=O.exec(Q))!=
null)P.setStyle(R[1],R[2])}else if(typeof Q=="object")for(var N in Q)P.setStyle(N,Q[N]);else if(typeof Q=="function")Ext.DomHelper.applyStyles(P,Q.call())}},insertHtml:function(P,R,Q){P=P.toLowerCase();if(R.insertAdjacentHTML){if(B.test(R.tagName)){var O;if(O=G(R.tagName.toLowerCase(),P,R,Q))return O}switch(P){case "beforebegin":R.insertAdjacentHTML("BeforeBegin",Q);return R.previousSibling;case "afterbegin":R.insertAdjacentHTML("AfterBegin",Q);return R.firstChild;case "beforeend":R.insertAdjacentHTML("BeforeEnd",
Q);return R.lastChild;case "afterend":R.insertAdjacentHTML("AfterEnd",Q);return R.nextSibling}throw'Illegal insertion point -> "'+P+'"';}var N=R.ownerDocument.createRange();var S;switch(P){case "beforebegin":N.setStartBefore(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R);return R.previousSibling;case "afterbegin":if(R.firstChild){N.setStartBefore(R.firstChild);S=N.createContextualFragment(Q);R.insertBefore(S,R.firstChild);return R.firstChild}else{R.innerHTML=Q;return R.firstChild}case "beforeend":if(R.lastChild){N.setStartAfter(R.lastChild);
S=N.createContextualFragment(Q);R.appendChild(S);return R.lastChild}else{R.innerHTML=Q;return R.lastChild}case "afterend":N.setStartAfter(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R.nextSibling);return R.nextSibling}throw'Illegal insertion point -> "'+P+'"';},insertBefore:function(N,P,O){return this.doInsert(N,P,O,"beforeBegin")},insertAfter:function(N,P,O){return this.doInsert(N,P,O,"afterEnd","nextSibling")},insertFirst:function(N,P,O){return this.doInsert(N,P,O,"afterBegin",
"firstChild")},doInsert:function(Q,S,R,T,P){Q=Ext.getDom(Q);var O;if(this.useDom){O=M(S,null);(P==="firstChild"?Q:Q.parentNode).insertBefore(O,P?Q[P]:Q)}else{var N=A(S);O=this.insertHtml(T,Q,N)}return R?Ext.get(O,true):O},append:function(P,R,Q){P=Ext.getDom(P);var O;if(this.useDom){O=M(R,null);P.appendChild(O)}else{var N=A(R);O=this.insertHtml("beforeEnd",P,N)}return Q?Ext.get(O,true):O},overwrite:function(N,P,O){N=Ext.getDom(N);N.innerHTML=A(P);return O?Ext.get(N.firstChild,true):N.firstChild},createTemplate:function(O){var N=
A(O);return new Ext.Template(N)}}}();Ext.Template=function(E){var B=arguments;if(Ext.isArray(E))E=E.join("");else if(B.length>1){var C=[];for(var D=0,A=B.length;D<A;D++)if(typeof B[D]=="object")Ext.apply(this,B[D]);else C[C.length]=B[D];E=C.join("")}this.html=E;if(this.compiled)this.compile()};
Ext.Template.prototype={applyTemplate:function(B){if(this.compiled)return this.compiled(B);var A=this.disableFormats!==true;var E=Ext.util.Format,C=this;var D=function(G,I,L,H){if(L&&A)if(L.substr(0,5)=="this.")return C.call(L.substr(5),B[I],B);else{if(H){var K=/^\s*['"](.*)["']\s*$/;H=H.split(",");for(var J=0,F=H.length;J<F;J++)H[J]=H[J].replace(K,"$1");H=[B[I]].concat(H)}else H=[B[I]];return E[L].apply(E,H)}else return B[I]!==undefined?B[I]:""};return this.html.replace(this.re,D)},set:function(A,
B){this.html=A;this.compiled=null;if(B)this.compile();return this},disableFormats:false,re:/\{([\w-]+)(?::([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this.")format="fm."+format+"(";else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+
sep+format+"values['"+name+"']"+args+")"+sep+"'"};var body;if(Ext.isGecko)body="this.compiled = function(values){ return '"+this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};";else{body=["this.compiled = function(values){ return ['"];body.push(this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return this},call:function(C,B,A){return this[C](B,
A)},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(C,E,B,A){E=Ext.getDom(E);var D=Ext.DomHelper.insertHtml(C,E,this.applyTemplate(B));return A?Ext.get(D,true):D},overwrite:function(B,A,C){B=Ext.getDom(B);B.innerHTML=this.applyTemplate(A);return C?Ext.get(B.firstChild,
true):B.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(B,A){B=Ext.getDom(B);return new Ext.Template(B.value||B.innerHTML,A||"")};
Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/\S/;var trimRe=/^\s+|\s+$/g;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.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(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue))d.removeChild(n);else n.nodeIndex=++ni;n=nx}return this}function byClassName(c,a,v){if(!v)return c;var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++)if((" "+ci.className+" ").indexOf(v)!=-1)r[++ri]=ci;return r}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;if(!ns)return result;tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined")ns=[ns];if(!mode)for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++)result[++ri]=ci}else if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++)if(cj.nodeName==utag||cj.nodeName==tagName||
tagName=="*")result[++ri]=cj}}else if(mode=="+"){var utag=tagName.toUpperCase();for(var 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=="~")for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName)));if(n)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 r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++)if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName)r[++ri]=ci;return r}function byId(cs,attr,id){if(cs.tagName||cs==document)cs=[cs];if(!id)return cs;var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++)if(ci&&ci.id==id){r[++ri]=ci;return r}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{";var f=Ext.DomQuery.operators[op];
for(var i=0,ci;ci=cs[i];i++){var a;if(st)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);if(f&&f(a,value)||!f&&a)r[++ri]=ci}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}var isIE=window.ActiveXObject?true:false;var batch=30803;var key=30803;function nodupIEXml(cs){var d=++key;cs[0].setAttribute("_nodup",d);var r=
[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var 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;if(!len||typeof cs.nodeType!="undefined"||len==1)return cs;if(isIE&&typeof cs[0].selectSingleNode!="undefined")return nodupIEXml(cs);var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++)if(c._nodup!=d)c._nodup=d;else{r=[];for(var 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;for(var i=0,len=c1.length;i<len;i++)c1[i].setAttribute("_qdiff",d);var r=[];for(var i=0,len=c2.length;i<len;i++)if(c2[i].getAttribute("_qdiff")!=d)r[r.length]=c2[i];for(var i=0,len=c1.length;i<len;i++)c1[i].removeAttribute("_qdiff");return r}function quickDiff(c1,c2){var len1=c1.length;if(!len1)return c2;if(isIE&&c1[0].selectSingleNode)return quickDiffIEXml(c1,
c2);var d=++key;for(var i=0;i<len1;i++)c1[i]._qdiff=d;var r=[];for(var 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){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,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"];
var q=path,mode,lq;var tk=Ext.DomQuery.matchers;var tklen=tk.length;var mm;var lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/")path=path.substr(1);while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select")if(tm){if(tm[1]=="#")fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");';else fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");';q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@")fn[fn.length]=
'n = getNodes(n, mode, "*");'}else if(tm){if(tm[1]=="#")fn[fn.length]='n = byId(n, null, "'+tm[2]+'");';else fn[fn.length]='n = byTag(n, "'+tm[2]+'");';q=q.replace(tm[0],"")}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched)throw'Error parsing selector, parsing failed at "'+q+'"';}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,
"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document)root=document;if(typeof root=="string")root=document.getElementById(root);var paths=path.split(",");var results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p])throw p+" is not a valid selector";}var result=cache[p](root);if(result&&result!=document)results=results.concat(result)}if(paths.length>
1)return nodup(results);return results},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);n=n[0]?n[0]:n;var 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);var 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, null, " {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, null, "{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;for(var i=0,ci;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;for(var i=0,ci;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;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var 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;for(var i=0,ci;ci=c[i];i++)if(!prev(ci)&&
!next(ci))r[++ri]=ci;return r},"empty":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,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;for(var i=0,ci;ci=c[i];i++)if((ci.textContent||ci.innerText||"").indexOf(v)!=-1)r[++ri]=ci;return r},"nodeValue":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++)if(ci.firstChild&&ci.firstChild.nodeValue==v)r[++ri]=
ci;return r},"checked":function(c){var r=[],ri=-1;for(var i=0,ci;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("|");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++)for(var 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;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++)if(s(ss,ci).length>0)r[++ri]=ci;return r},"next":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss))r[++ri]=ci}return r},"prev":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss))r[++ri]=ci}return r}}}}();
Ext.query=Ext.DomQuery.select;Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};
Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var A=this.events[arguments[0].toLowerCase()];if(typeof A=="object")return A.fire.apply(A,Array.prototype.slice.call(arguments,1))}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A,C,B,F){if(typeof A=="object"){F=A;for(var E in F){if(this.filterOptRe.test(E))continue;if(typeof F[E]=="function")this.addListener(E,F[E],F.scope,F);else this.addListener(E,F[E].fn,F[E].scope,F[E])}return}F=
!F||typeof F=="boolean"?{}:F;A=A.toLowerCase();var D=this.events[A]||true;if(typeof D=="boolean"){D=new Ext.util.Event(this,A);this.events[A]=D}D.addListener(C,B,F)},removeListener:function(A,C,B){var D=this.events[A.toLowerCase()];if(typeof D=="object")D.removeListener(C,B)},purgeListeners:function(){for(var A in this.events)if(typeof this.events[A]=="object")this.events[A].clearListeners()},relayEvents:function(F,D){var E=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G,
Array.prototype.slice.call(arguments,0)))}};for(var C=0,A=D.length;C<A;C++){var B=D[C];if(!this.events[B])this.events[B]=true;F.on(B,E(B),this)}},addEvents:function(D){if(!this.events)this.events={};if(typeof D=="string")for(var C=0,A=arguments,B;B=A[C];C++){if(!this.events[A[C]])this.events[A[C]]=true}else Ext.applyIf(this.events,D)},hasListener:function(A){var B=this.events[A];return typeof B=="object"&&B.listeners.length>0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=
false},getMethodEvent:function(G){if(!this.methodEvents)this.methodEvents={};var F=this.methodEvents[G];if(!F){F={};this.methodEvents[G]=F;F.originalFn=this[G];F.methodName=G;F.before=[];F.after=[];var C,B,D;var E=this;var A=function(J,I,H){if((B=J.apply(I||E,H))!==undefined)if(typeof B==="object"){if(B.returnValue!==undefined)C=B.returnValue;else C=B;if(B.cancel===true)D=true}else if(B===false)D=true;else C=B};this[G]=function(){C=B=undefined;D=false;var I=Array.prototype.slice.call(arguments,0);
for(var J=0,H=F.before.length;J<H;J++){A(F.before[J].fn,F.before[J].scope,I);if(D)return C}if((B=F.originalFn.apply(E,I))!==undefined)C=B;for(var J=0,H=F.after.length;J<H;J++){A(F.after[J].fn,F.after[J].scope,I);if(D)return C}return C}}return F},beforeMethod:function(D,B,A){var C=this.getMethodEvent(D);C.before.push({fn:B,scope:A})},afterMethod:function(D,B,A){var C=this.getMethodEvent(D);C.after.push({fn:B,scope:A})},removeMethodListener:function(F,D,C){var E=this.getMethodEvent(F);for(var B=0,A=
E.before.length;B<A;B++)if(E.before[B].fn==D&&E.before[B].scope==C){E.before.splice(B,1);return}for(var B=0,A=E.after.length;B<A;B++)if(E.after[B].fn==D&&E.after[B].scope==C){E.after.splice(B,1);return}}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(C,B,A){C.fireEvent=C.fireEvent.createInterceptor(B,A)};
Ext.util.Observable.releaseCapture=function(A){A.fireEvent=Ext.util.Observable.prototype.fireEvent};
(function(){var B=function(F,G,E){var D=new Ext.util.DelayedTask;return function(){D.delay(G.buffer,F,E,Array.prototype.slice.call(arguments,0))}};var C=function(F,G,E,D){return function(){G.removeListener(E,D);return F.apply(D,arguments)}};var A=function(E,F,D){return function(){var G=Array.prototype.slice.call(arguments,0);setTimeout(function(){E.apply(D,G)},F.delay||10)}};Ext.util.Event=function(E,D){this.name=D;this.obj=E;this.listeners=[]};Ext.util.Event.prototype={addListener:function(G,F,E){F=
F||this.obj;if(!this.isListening(G,F)){var D=this.createListener(G,F,E);if(!this.firing)this.listeners.push(D);else{this.listeners=this.listeners.slice(0);this.listeners.push(D)}}},createListener:function(G,F,H){H=H||{};F=F||this.obj;var D={fn:G,scope:F,options:H};var E=G;if(H.delay)E=A(E,H,F);if(H.single)E=C(E,this,G,F);if(H.buffer)E=B(E,H,F);D.fireFn=E;return D},findListener:function(I,H){H=H||this.obj;var F=this.listeners;for(var G=0,D=F.length;G<D;G++){var E=F[G];if(E.fn==I&&E.scope==H)return G}return-1},
isListening:function(E,D){return this.findListener(E,D)!=-1},removeListener:function(F,E){var D;if((D=this.findListener(F,E))!=-1){if(!this.firing)this.listeners.splice(D,1);else{this.listeners=this.listeners.slice(0);this.listeners.splice(D,1)}return true}return false},clearListeners:function(){this.listeners=[]},fire:function(){var F=this.listeners,I,D=F.length;if(D>0){this.firing=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H<D;H++){var E=F[H];if(E.fireFn.apply(E.scope||this.obj||
window,arguments)===false){this.firing=false;return false}}this.firing=false}return true}}})();
Ext.EventManager=function(){var X,Q,M=false;var N,W,H,S;var P=Ext.lib.Event;var R=Ext.lib.Dom;var A="Ex"+"t";var J={};var O=function(b,E,a,Z,Y){var d=Ext.id(b);if(!J[d])J[d]={};var c=J[d];if(!c[E])c[E]=[];var D=c[E];D.push({id:d,ename:E,fn:a,wrap:Z,scope:Y});P.on(b,E,Z);if(E=="mousewheel"&&b.addEventListener){b.addEventListener("DOMMouseScroll",Z,false);P.on(window,"unload",function(){b.removeEventListener("DOMMouseScroll",Z,false)})}if(E=="mousedown"&&b==document)Ext.EventManager.stoppedMouseDownEvent.addListener(Z)};
var I=function(Y,a,e,g){Y=Ext.getDom(Y);var D=Ext.id(Y),f=J[D],E;if(f){var c=f[a],Z;if(c)for(var b=0,d=c.length;b<d;b++){Z=c[b];if(Z.fn==e&&(!g||Z.scope==g)){E=Z.wrap;P.un(Y,a,E);c.splice(b,1);break}}}if(a=="mousewheel"&&Y.addEventListener&&E)Y.removeEventListener("DOMMouseScroll",E,false);if(a=="mousedown"&&Y==document&&E)Ext.EventManager.stoppedMouseDownEvent.removeListener(E)};var F=function(a){a=Ext.getDom(a);var c=Ext.id(a),b=J[c],E;if(b){for(var Z in b){if(b.hasOwnProperty(Z)){E=b[Z];for(var Y=
0,D=E.length;Y<D;Y++){P.un(a,Z,E[Y].wrap);E[Y]=null}}b[Z]=null}delete J[c]}};var C=function(){if(!M){M=Ext.isReady=true;if(Ext.isGecko||Ext.isOpera)document.removeEventListener("DOMContentLoaded",C,false)}if(Q){clearInterval(Q);Q=null}if(X){X.fire();X.clearListeners()}};var B=function(){X=new Ext.util.Event;if(Ext.isReady)return;P.on(window,"load",C);if(Ext.isGecko||Ext.isOpera)document.addEventListener("DOMContentLoaded",C,false);else if(Ext.isIE){Q=setInterval(function(){try{Ext.isReady||document.documentElement.doScroll("left")}catch(D){return}C()},
5);document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;C()}}}else if(Ext.isSafari)Q=setInterval(function(){var D=document.readyState;if(D=="complete")C()},10)};var V=function(E,Y){var D=new Ext.util.DelayedTask(E);return function(Z){Z=new Ext.EventObjectImpl(Z);D.delay(Y.buffer,E,null,[Z])}};var T=function(a,Z,D,Y,E){return function(b){Ext.EventManager.removeListener(Z,D,Y,E);a(b)}};var G=function(D,E){return function(Y){Y=new Ext.EventObjectImpl(Y);
setTimeout(function(){D(Y)},E.delay||10)}};var L=function(Y,E,D,c,b){var d=!D||typeof D=="boolean"?{}:D;c=c||d.fn;b=b||d.scope;var a=Ext.getDom(Y);if(!a)throw'Error listening for "'+E+'". Element "'+Y+"\" doesn't exist.";var Z=function(g){if(!window[A])return;g=Ext.EventObject.setEvent(g);var f;if(d.delegate){f=g.getTarget(d.delegate,a);if(!f)return}else f=g.target;if(d.stopEvent===true)g.stopEvent();if(d.preventDefault===true)g.preventDefault();if(d.stopPropagation===true)g.stopPropagation();if(d.normalized===
false)g=g.browserEvent;c.call(b||a,g,f,d)};if(d.delay)Z=G(Z,d);if(d.single)Z=T(Z,a,E,c,b);if(d.buffer)Z=V(Z,d);O(a,E,c,Z,b);return Z};var K=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var U={addListener:function(Y,D,a,Z,E){if(typeof D=="object"){var c=D;for(var b in c){if(K.test(b))continue;if(typeof c[b]=="function")L(Y,b,c,c[b],c.scope);else L(Y,b,c[b])}return}return L(Y,D,E,a,Z)},removeListener:function(E,D,Z,Y){return I(E,D,Z,Y)},removeAll:function(D){return F(D)},
onDocumentReady:function(Y,E,D){if(!X)B();if(M||Ext.isReady){D||(D={});Y.defer(D.delay||0,E)}else X.addListener(Y,E,D)},onWindowResize:function(Y,E,D){if(!N){N=new Ext.util.Event;W=new Ext.util.DelayedTask(function(){N.fire(R.getViewWidth(),R.getViewHeight())});P.on(window,"resize",this.fireWindowResize,this)}N.addListener(Y,E,D)},fireWindowResize:function(){if(N)if((Ext.isIE||Ext.isAir)&&W)W.delay(50);else N.fire(R.getViewWidth(),R.getViewHeight())},onTextResize:function(Z,Y,D){if(!H){H=new Ext.util.Event;
var E=new Ext.Element(document.createElement("div"));E.dom.className="x-text-resize";E.dom.innerHTML="X";E.appendTo(document.body);S=E.dom.offsetHeight;setInterval(function(){if(E.dom.offsetHeight!=S)H.fire(S,S=E.dom.offsetHeight)},this.textResizeInterval)}H.addListener(Z,Y,D)},removeResizeListener:function(E,D){if(N)N.removeListener(E,D)},fireResize:function(){if(N)N.fire(R.getViewWidth(),R.getViewHeight())},ieDeferSrc:false,textResizeInterval:50};U.on=U.addListener;U.un=U.removeListener;U.stoppedMouseDownEvent=
new Ext.util.Event;return U}();Ext.onReady=Ext.EventManager.onDocumentReady;
(function(){var A=function(){var C=document.body||document.getElementsByTagName("body")[0];if(!C)return false;var B=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":"ext-ie7"):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":""];if(Ext.isMac)B.push("ext-mac");if(Ext.isLinux)B.push("ext-linux");if(Ext.isBorderBox)B.push("ext-border-box");if(Ext.isStrict){var D=C.parentNode;if(D)D.className+=" ext-strict"}C.className+=B.join(" ");return true};
if(!A())Ext.onReady(A)})();
Ext.EventObject=function(){var B=Ext.lib.Event;var A={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};var C=Ext.isIE?{1:0,4:1,2:2}:Ext.isSafari?{1:0,2:1,3:2}:{0:0,1:1,2:2};Ext.EventObjectImpl=function(D){if(D)this.setEvent(D.browserEvent||D)};Ext.EventObjectImpl.prototype={browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,
PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN: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,setEvent:function(D){if(D==this||D&&D.browserEvent)return D;this.browserEvent=D;if(D){this.button=D.button?C[D.button]:D.which?D.which-1:-1;if(D.type=="click"&&this.button==-1)this.button=0;this.type=D.type;this.shiftKey=D.shiftKey;this.ctrlKey=D.ctrlKey||D.metaKey;this.altKey=D.altKey;this.keyCode=D.keyCode;this.charCode=D.charCode;this.target=B.getTarget(D);this.xy=
B.getXY(D)}else{this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;this.keyCode=0;this.charCode=0;this.target=null;this.xy=[0,0]}return this},stopEvent:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown")Ext.EventManager.stoppedMouseDownEvent.fire(this);B.stopEvent(this.browserEvent)}},preventDefault:function(){if(this.browserEvent)B.preventDefault(this.browserEvent)},isNavKeyPress:function(){var D=this.keyCode;D=Ext.isSafari?A[D]||D:D;return D>=33&&D<=40||
D==this.RETURN||D==this.TAB||D==this.ESC},isSpecialKey:function(){var D=this.keyCode;return this.type=="keypress"&&this.ctrlKey||D==9||D==13||D==40||D==27||D==16||D==17||D>=18&&D<=20||D>=33&&D<=35||D>=36&&D<=39||D>=44&&D<=45},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown")Ext.EventManager.stoppedMouseDownEvent.fire(this);B.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var D=this.keyCode||this.charCode;
return Ext.isSafari?A[D]||D:D},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent)return B.getTime(this.browserEvent);return null},getXY:function(){return this.xy},getTarget:function(E,F,D){return E?Ext.fly(this.target).findParent(E,F,D):D?Ext.get(this.target):this.target},getRelatedTarget:function(){if(this.browserEvent)return B.getRelatedTarget(this.browserEvent);return null},getWheelDelta:function(){var D=this.browserEvent;var E=
0;if(D.wheelDelta)E=D.wheelDelta/120;else if(D.detail)E=-D.detail/3;return E},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey?true:false},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarget"]();return D&&Ext.fly(E).contains(D)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl}();
(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom)return null;var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id])return Ext.Element.cache[id];this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",
visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined")this.originalDisplay=display;return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depth<maxDepth&&
p!=b&&p!=stopEl){if(dq.is(p,simpleSelector))return returnEl?Ext.get(p):p;depth++;p=p.parentNode}return null},findParentNode:function(simpleSelector,maxDepth,returnEl){var p=Ext.fly(this.dom.parentNode,"_internal");return p?p.findParent(simpleSelector,maxDepth,returnEl):null},up:function(simpleSelector,maxDepth){return this.findParentNode(simpleSelector,maxDepth,true)},is:function(simpleSelector){return Ext.DomQuery.is(this.dom,simpleSelector)},animate:function(args,duration,onComplete,easing,animType){this.anim(args,
{duration:duration,callback:onComplete,easing:easing},animType);return this},anim:function(args,opt,animType,defaultDur,defaultEase,cb){animType=animType||"run";opt=opt||{};var anim=Ext.lib.Anim[animType](this.dom,args,opt.duration||defaultDur||.35,opt.easing||defaultEase||"easeOut",function(){Ext.callback(cb,this);Ext.callback(opt.callback,opt.scope||this,[this,opt])},this);opt.anim=anim;return anim},preanim:function(a,i){return!a[i]?false:typeof a[i]=="object"?a[i]:{duration:a[i+1],callback:a[i+
2],easing:a[i+3]}},clean:function(forceReclean){if(this.isCleaned&&forceReclean!==true)return this;var ns=/\S/;var d=this.dom,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!ns.test(n.nodeValue))d.removeChild(n);else n.nodeIndex=++ni;n=nx}this.isCleaned=true;return this},scrollIntoView:function(container,hscroll){var c=Ext.getDom(container)||Ext.getBody().dom;var el=this.dom;var o=this.getOffsetsTo(c),l=o[0]+c.scrollLeft,t=o[1]+c.scrollTop,b=t+el.offsetHeight,r=l+el.offsetWidth;
var ch=c.clientHeight;var ct=parseInt(c.scrollTop,10);var cl=parseInt(c.scrollLeft,10);var cb=ct+ch;var cr=cl+c.clientWidth;if(el.offsetHeight>ch||t<ct)c.scrollTop=t;else if(b>cb)c.scrollTop=b-ch;c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||l<cl)c.scrollLeft=l;else if(r>cr)c.scrollLeft=r-c.clientWidth;c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,
duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function")onComplete()}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function")onComplete()}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el)return false;
return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis)return vis;var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible())return false;p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,
returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},initDD:function(group,config,overrides){var dd=new Ext.dd.DD(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDProxy:function(group,config,overrides){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDTarget:function(group,config,
overrides){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},setVisible:function(visible,animate){if(!animate||!A)if(this.visibilityMode==El.DISPLAY)this.setDisplayed(visible);else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(.01);this.setVisible(true)}this.anim({opacity:{to:visible?1:0}},this.preanim(arguments,1),null,.35,"easeIn",function(){if(!visible){if(visMode==
El.DISPLAY)dom.style.display="none";else dom.style.visibility="hidden";Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean")value=value?this.originalDisplay:"none";this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},
addClass:function(className){if(Ext.isArray(className))for(var i=0,len=className.length;i<len;i++)this.addClass(className[i]);else if(className&&!this.hasClass(className))this.dom.className=this.dom.className+" "+className;return this},radioClass:function(className){var siblings=this.dom.parentNode.childNodes;for(var i=0;i<siblings.length;i++){var s=siblings[i];if(s.nodeType==1)Ext.get(s).removeClass(className)}this.addClass(className);return this},removeClass:function(className){if(!className||!this.dom.className)return this;
if(Ext.isArray(className))for(var i=0,len=className.length;i<len;i++)this.removeClass(className[i]);else if(this.hasClass(className)){var re=this.classReCache[className];if(!re){re=new RegExp("(?:^|\\s+)"+className+"(?:\\s+|$)","g");this.classReCache[className]=re}this.dom.className=this.dom.className.replace(re," ")}return this},classReCache:{},toggleClass:function(className){if(this.hasClass(className))this.removeClass(className);else this.addClass(className);return this},hasClass:function(className){return className&&
(" "+this.dom.className+" ").indexOf(" "+className+" ")!=-1},replaceClass:function(oldClassName,newClassName){this.removeClass(oldClassName);this.addClass(newClassName);return this},getStyles:function(){var a=arguments,len=a.length,r={};for(var i=0;i<len;i++)r[a[i]]=this.getStyle(a[i]);return r},getStyle:function(){return view&&view.getComputedStyle?function(prop){var el=this.dom,v,cs,camel;if(prop=="float")prop="cssFloat";if(v=el.style[prop])return v;if(cs=view.getComputedStyle(el,"")){if(!(camel=
propCache[prop]))camel=propCache[prop]=prop.replace(camelRe,camelFn);return cs[camel]}return null}:function(prop){var el=this.dom,v,cs,camel;if(prop=="opacity"){if(typeof el.style.filter=="string"){var m=el.style.filter.match(/alpha\(opacity=(.*)\)/i);if(m){var fv=parseFloat(m[1]);if(!isNaN(fv))return fv?fv/100:0}}return 1}else if(prop=="float")prop="styleFloat";if(!(camel=propCache[prop]))camel=propCache[prop]=prop.replace(camelRe,camelFn);if(v=el.style[camel])return v;if(cs=el.currentStyle)return cs[camel];
return null}}(),setStyle:function(prop,value){if(typeof prop=="string"){var camel;if(!(camel=propCache[prop]))camel=propCache[prop]=prop.replace(camelRe,camelFn);if(camel=="opacity")this.setOpacity(value);else this.dom.style[camel]=value}else for(var style in prop)if(typeof prop[style]!="function")this.setStyle(style,prop[style]);return this},applyStyles:function(style){Ext.DomHelper.applyStyles(this.dom,style);return this},getX:function(){return D.getX(this.dom)},getY:function(){return D.getY(this.dom)},
getXY:function(){return D.getXY(this.dom)},getOffsetsTo:function(el){var o=this.getXY();var e=Ext.fly(el,"_internal").getXY();return[o[0]-e[0],o[1]-e[1]]},setX:function(x,animate){if(!animate||!A)D.setX(this.dom,x);else this.setXY([x,this.getY()],this.preanim(arguments,1));return this},setY:function(y,animate){if(!animate||!A)D.setY(this.dom,y);else this.setXY([this.getX(),y],this.preanim(arguments,1));return this},setLeft:function(left){this.setStyle("left",this.addUnits(left));return this},setTop:function(top){this.setStyle("top",
this.addUnits(top));return this},setRight:function(right){this.setStyle("right",this.addUnits(right));return this},setBottom:function(bottom){this.setStyle("bottom",this.addUnits(bottom));return this},setXY:function(pos,animate){if(!animate||!A)D.setXY(this.dom,pos);else this.anim({points:{to:pos}},this.preanim(arguments,1),"motion");return this},setLocation:function(x,y,animate){this.setXY([x,y],this.preanim(arguments,2));return this},moveTo:function(x,y,animate){this.setXY([x,y],this.preanim(arguments,
2));return this},getRegion:function(){return D.getRegion(this.dom)},getHeight:function(contentHeight){var h=this.dom.offsetHeight||0;h=contentHeight!==true?h:h-this.getBorderWidth("tb")-this.getPadding("tb");return h<0?0:h},getWidth:function(contentWidth){var w=this.dom.offsetWidth||0;w=contentWidth!==true?w:w-this.getBorderWidth("lr")-this.getPadding("lr");return w<0?0:w},getComputedHeight:function(){var h=Math.max(this.dom.offsetHeight,this.dom.clientHeight);if(!h){h=parseInt(this.getStyle("height"),
10)||0;if(!this.isBorderBox())h+=this.getFrameWidth("tb")}return h},getComputedWidth:function(){var w=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!w){w=parseInt(this.getStyle("width"),10)||0;if(!this.isBorderBox())w+=this.getFrameWidth("lr")}return w},getSize:function(contentSize){return{width:this.getWidth(contentSize),height:this.getHeight(contentSize)}},getStyleSize:function(){var w,h,d=this.dom,s=d.style;if(s.width&&s.width!="auto"){w=parseInt(s.width,10);if(Ext.isBorderBox)w-=this.getFrameWidth("lr")}if(s.height&&
s.height!="auto"){h=parseInt(s.height,10);if(Ext.isBorderBox)h-=this.getFrameWidth("tb")}return{width:w||this.getWidth(true),height:h||this.getHeight(true)}},getViewSize:function(){var d=this.dom,doc=document,aw=0,ah=0;if(d==doc||d==doc.body)return{width:D.getViewWidth(),height:D.getViewHeight()};else return{width:d.clientWidth,height:d.clientHeight}},getValue:function(asNumber){return asNumber?parseInt(this.dom.value,10):this.dom.value},adjustWidth:function(width){if(typeof width=="number"){if(this.autoBoxAdjust&&
!this.isBorderBox())width-=this.getBorderWidth("lr")+this.getPadding("lr");if(width<0)width=0}return width},adjustHeight:function(height){if(typeof height=="number"){if(this.autoBoxAdjust&&!this.isBorderBox())height-=this.getBorderWidth("tb")+this.getPadding("tb");if(height<0)height=0}return height},setWidth:function(width,animate){width=this.adjustWidth(width);if(!animate||!A)this.dom.style.width=this.addUnits(width);else this.anim({width:{to:width}},this.preanim(arguments,1));return this},setHeight:function(height,
animate){height=this.adjustHeight(height);if(!animate||!A)this.dom.style.height=this.addUnits(height);else this.anim({height:{to:height}},this.preanim(arguments,1));return this},setSize:function(width,height,animate){if(typeof width=="object"){height=width.height;width=width.width}width=this.adjustWidth(width);height=this.adjustHeight(height);if(!animate||!A){this.dom.style.width=this.addUnits(width);this.dom.style.height=this.addUnits(height)}else this.anim({width:{to:width},height:{to:height}},
this.preanim(arguments,2));return this},setBounds:function(x,y,width,height,animate){if(!animate||!A){this.setSize(width,height);this.setLocation(x,y)}else{width=this.adjustWidth(width);height=this.adjustHeight(height);this.anim({points:{to:[x,y]},width:{to:width},height:{to:height}},this.preanim(arguments,4),"motion")}return this},setRegion:function(region,animate){this.setBounds(region.left,region.top,region.right-region.left,region.bottom-region.top,this.preanim(arguments,1));return this},addListener:function(eventName,
fn,scope,options){Ext.EventManager.on(this.dom,eventName,fn,scope||this,options)},removeListener:function(eventName,fn,scope){Ext.EventManager.removeListener(this.dom,eventName,fn,scope||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},setOpacity:function(opacity,animate){if(!animate||!A){var s=this.dom.style;if(Ext.isIE){s.zoom=1;s.filter=
(s.filter||"").replace(/alpha\([^\)]*\)/gi,"")+(opacity==1?"":" alpha(opacity="+opacity*100+")")}else s.opacity=opacity}else this.anim({opacity:{to:opacity}},this.preanim(arguments,1),null,.35,"easeIn");return this},getLeft:function(local){if(!local)return this.getX();else return parseInt(this.getStyle("left"),10)||0},getRight:function(local){if(!local)return this.getX()+this.getWidth();else return this.getLeft(true)+this.getWidth()||0},getTop:function(local){if(!local)return this.getY();else return parseInt(this.getStyle("top"),
10)||0},getBottom:function(local){if(!local)return this.getY()+this.getHeight();else return this.getTop(true)+this.getHeight()||0},position:function(pos,zIndex,x,y){if(!pos){if(this.getStyle("position")=="static")this.setStyle("position","relative")}else this.setStyle("position",pos);if(zIndex)this.setStyle("z-index",zIndex);if(x!==undefined&&y!==undefined)this.setXY([x,y]);else if(x!==undefined)this.setX(x);else if(y!==undefined)this.setY(y)},clearPositioning:function(value){value=value||"";this.setStyle({"left":value,
"right":value,"top":value,"bottom":value,"z-index":"","position":"static"});return this},getPositioning:function(){var l=this.getStyle("left");var t=this.getStyle("top");return{"position":this.getStyle("position"),"left":l,"right":l?"":this.getStyle("right"),"top":t,"bottom":t?"":this.getStyle("bottom"),"z-index":this.getStyle("z-index")}},getBorderWidth:function(side){return this.addStyles(side,El.borders)},getPadding:function(side){return this.addStyles(side,El.paddings)},setPositioning:function(pc){this.applyStyles(pc);
if(pc.right=="auto")this.dom.style.right="";if(pc.bottom=="auto")this.dom.style.bottom="";return this},fixDisplay:function(){if(this.getStyle("display")=="none"){this.setStyle("visibility","hidden");this.setStyle("display",this.originalDisplay);if(this.getStyle("display")=="none")this.setStyle("display","block")}},setOverflow:function(v){if(v=="auto"&&Ext.isMac&&Ext.isGecko2){this.dom.style.overflow="hidden";(function(){this.dom.style.overflow="auto"}).defer(1,this)}else this.dom.style.overflow=v},
setLeftTop:function(left,top){this.dom.style.left=this.addUnits(left);this.dom.style.top=this.addUnits(top);return this},move:function(direction,distance,animate){var xy=this.getXY();direction=direction.toLowerCase();switch(direction){case "l":case "left":this.moveTo(xy[0]-distance,xy[1],this.preanim(arguments,2));break;case "r":case "right":this.moveTo(xy[0]+distance,xy[1],this.preanim(arguments,2));break;case "t":case "top":case "up":this.moveTo(xy[0],xy[1]-distance,this.preanim(arguments,2));break;
case "b":case "bottom":case "down":this.moveTo(xy[0],xy[1]+distance,this.preanim(arguments,2));break}return this},clip:function(){if(!this.isClipped){this.isClipped=true;this.originalClip={"o":this.getStyle("overflow"),"x":this.getStyle("overflow-x"),"y":this.getStyle("overflow-y")};this.setStyle("overflow","hidden");this.setStyle("overflow-x","hidden");this.setStyle("overflow-y","hidden")}return this},unclip:function(){if(this.isClipped){this.isClipped=false;var o=this.originalClip;if(o.o)this.setStyle("overflow",
o.o);if(o.x)this.setStyle("overflow-x",o.x);if(o.y)this.setStyle("overflow-y",o.y)}return this},getAnchorXY:function(anchor,local,s){var w,h,vp=false;if(!s){var d=this.dom;if(d==document.body||d==document){vp=true;w=D.getViewWidth();h=D.getViewHeight();if(h<30)h=d.clientHeight}else{w=this.getWidth();h=this.getHeight()}}else{w=s.width;h=s.height}var x=0,y=0,r=Math.round;switch((anchor||"tl").toLowerCase()){case "c":x=r(w*.5);y=r(h*.5);break;case "t":x=r(w*.5);y=0;break;case "l":x=0;y=r(h*.5);break;
case "r":x=w;y=r(h*.5);break;case "b":x=r(w*.5);y=h;break;case "tl":x=0;y=0;break;case "bl":x=0;y=h;break;case "br":x=w;y=h;break;case "tr":x=w;y=0;break}if(local===true)return[x,y];if(vp){var sc=this.getScroll();return[x+sc.left,y+sc.top]}var o=this.getXY();return[x+o[0],y+o[1]]},getAlignToXY:function(el,p,o){el=Ext.get(el);if(!el||!el.dom)throw"Element.alignToXY with an element that doesn't exist";var d=this.dom;var c=false;var p1="",p2="";o=o||[0,0];if(!p)p="tl-bl";else if(p=="?")p="tl-bl?";else if(p.indexOf("-")==
-1)p="tl-"+p;p=p.toLowerCase();var m=p.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!m)throw"Element.alignTo with an invalid alignment "+p;p1=m[1];p2=m[2];c=!!m[3];var a1=this.getAnchorXY(p1,true);var a2=el.getAnchorXY(p2,false);var x=a2[0]-a1[0]+o[0];var y=a2[1]-a1[1]+o[1];if(c){var w=this.getWidth(),h=this.getHeight(),r=el.getRegion();var dw=D.getViewWidth()-5,dh=D.getViewHeight()-5;var p1y=p1.charAt(0),p1x=p1.charAt(p1.length-1);var p2y=p2.charAt(0),p2x=p2.charAt(p2.length-1);var swapY=p1y=="t"&&p2y==
"b"||p1y=="b"&&p2y=="t";var swapX=p1x=="r"&&p2x=="l"||p1x=="l"&&p2x=="r";var doc=document;var scrollX=(("number"==typeof doc.documentElement.scrollLeft?doc.documentElement.scrollLeft:doc.body.scrollLeft)||0)+5;var scrollY=(("number"==typeof doc.documentElement.scrollTop?doc.documentElement.scrollTop:doc.body.scrollTop)||0)+5;if(x+w>dw+scrollX)x=swapX?r.left-w:dw+scrollX-w;if(x<scrollX)x=swapX?r.right:scrollX;if(y+h>dh+scrollY)y=swapY?r.top-h:dh+scrollY-h;if(y<scrollY)y=swapY?r.bottom:scrollY}return[x,
y]},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};return function(el,local,offsets,proposedXY){el=Ext.get(el);offsets=offsets?Ext.applyIf(offsets,os):os;var vw,vh,vx=0,vy=0;if(el.dom==document.body||el.dom==document){vw=Ext.lib.Dom.getViewWidth();vh=Ext.lib.Dom.getViewHeight()}else{vw=el.dom.clientWidth;vh=el.dom.clientHeight;if(!local){var vxy=el.getXY();vx=vxy[0];vy=vxy[1]}}var s=el.getScroll();vx+=offsets.left+s.left;vy+=offsets.top+s.top;vw-=offsets.right;vh-=offsets.bottom;
var vr=vx+vw;var vb=vy+vh;var xy=proposedXY||(!local?this.getXY():[this.getLeft(true),this.getTop(true)]);var x=xy[0],y=xy[1];var w=this.dom.offsetWidth,h=this.dom.offsetHeight;var moved=false;if(x+w>vr){x=vr-w;moved=true}if(y+h>vb){y=vb-h;moved=true}if(x<vx){x=vx;moved=true}if(y<vy){y=vy;moved=true}return moved?[x,y]:false}}(),adjustForConstraints:function(xy,parent,offsets){return this.getConstrainToXY(parent||document,false,offsets,xy)||xy},alignTo:function(element,position,offsets,animate){var xy=
this.getAlignToXY(element,position,offsets);this.setXY(xy,this.preanim(arguments,3));return this},anchorTo:function(el,alignment,offsets,animate,monitorScroll,callback){var action=function(){this.alignTo(el,alignment,offsets,animate);Ext.callback(callback,this)};Ext.EventManager.onWindowResize(action,this);var tm=typeof monitorScroll;if(tm!="undefined")Ext.EventManager.on(window,"scroll",action,this,{buffer:tm=="number"?monitorScroll:50});action.call(this);return this},clearOpacity:function(){if(window.ActiveXObject){if(typeof this.dom.style.filter==
"string"&&/alpha/i.test(this.dom.style.filter))this.dom.style.filter=""}else{this.dom.style.opacity="";this.dom.style["-moz-opacity"]="";this.dom.style["-khtml-opacity"]=""}return this},hide:function(animate){this.setVisible(false,this.preanim(arguments,0));return this},show:function(animate){this.setVisible(true,this.preanim(arguments,0));return this},addUnits:function(size){return Ext.Element.addUnits(size,this.defaultUnit)},update:function(html,loadScripts,callback){if(typeof html=="undefined")html=
"";if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function")callback();return this}var id=Ext.id();var dom=this.dom;html+='<span id="'+id+'"></span>';E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=(['"])(.*?)\1/i;var typeRe=/\stype=(['"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=
document.createElement("script");s.src=srcMatch[2];var 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])}var el=document.getElementById(id);if(el)Ext.removeNode(el);if(typeof callback=="function")callback()});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,
arguments);return this},getUpdater:function(){if(!this.updateManager)this.updateManager=new Ext.Updater(this);return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||
Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local)xy=this.getXY();else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox)bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h};else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+
this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:this.getPadding(sides)+this.getBorderWidth(sides)},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if(adjust&&!this.autoBoxAdjust&&!this.isBorderBox()){w-=this.getBorderWidth("lr")+this.getPadding("lr");h-=this.getBorderWidth("tb")+this.getPadding("tb")}this.setBounds(box.x,
box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side)return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0};else return this.addStyles(side,El.margins)},addStyles:function(sides,
styles){var val=0,v,w;for(var i=0,len=sides.length;i<len;i++){v=this.getStyle(styles[sides.charAt(i)]);if(v){w=parseInt(v,10);if(w)val+=w>=0?w:-1*w}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo)proxy=Ext.DomHelper.append(renderTo,config,true);else proxy=Ext.DomHelper.insertBefore(this.dom,config,true);if(matchBox)proxy.setBox(this.getBox());return proxy},mask:function(msg,msgCls){if(this.getStyle("position")==
"static")this.setStyle("position","relative");if(this._maskMsg)this._maskMsg.remove();if(this._mask)this._mask.remove();this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&
!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto")this._mask.setSize(this.dom.clientWidth,this.getHeight());return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="0";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure)el.src=
Ext.SSL_SECURE_URL;var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true))overFn.apply(scope||this,arguments)};var preOutFn=function(e){if(!e.within(this,true))outFn.apply(scope||this,arguments)};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className){this.hover(function(){Ext.fly(this,
"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,
"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault)e.preventDefault()};if(Ext.isArray(eventName)){for(var i=0,len=eventName.length;i<len;i++)this.on(eventName[i],fn);return this}this.on(eventName,fn);return this},parent:function(selector,returnDom){return this.matchNode("parentNode","parentNode",selector,returnDom)},next:function(selector,returnDom){return this.matchNode("nextSibling",
"nextSibling",selector,returnDom)},prev:function(selector,returnDom){return this.matchNode("previousSibling","previousSibling",selector,returnDom)},first:function(selector,returnDom){return this.matchNode("nextSibling","firstChild",selector,returnDom)},last:function(selector,returnDom){return this.matchNode("previousSibling","lastChild",selector,returnDom)},matchNode:function(dir,start,selector,returnDom){var n=this.dom[start];while(n){if(n.nodeType==1&&(!selector||Ext.DomQuery.is(n,selector)))return!returnDom?
Ext.get(n):n;n=n[dir]}return null},appendChild:function(el){el=Ext.get(el);el.appendTo(this);return this},createChild:function(config,insertBefore,returnDom){config=config||{tag:"div"};if(insertBefore)return Ext.DomHelper.insertBefore(insertBefore,config,returnDom!==true);return Ext.DomHelper[!this.dom.firstChild?"overwrite":"append"](this.dom,config,returnDom!==true)},appendTo:function(el){el=Ext.getDom(el);el.appendChild(this.dom);return this},insertBefore:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,
el);return this},insertAfter:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el.nextSibling);return this},insertFirst:function(el,returnDom){el=el||{};if(typeof el=="object"&&!el.nodeType&&!el.dom)return this.createChild(el,this.dom.firstChild,returnDom);else{el=Ext.getDom(el);this.dom.insertBefore(el,this.dom.firstChild);return!returnDom?Ext.get(el):el}},insertSibling:function(el,where,returnDom){var rt;if(Ext.isArray(el)){for(var i=0,len=el.length;i<len;i++)rt=this.insertSibling(el[i],
where,returnDom);return rt}where=where?where.toLowerCase():"before";el=el||{};var refNode=where=="before"?this.dom:this.dom.nextSibling;if(typeof el=="object"&&!el.nodeType&&!el.dom)if(where=="after"&&!this.dom.nextSibling)rt=Ext.DomHelper.append(this.dom.parentNode,el,!returnDom);else rt=Ext.DomHelper[where=="after"?"insertAfter":"insertBefore"](this.dom,el,!returnDom);else{rt=this.dom.parentNode.insertBefore(Ext.getDom(el),refNode);if(!returnDom)rt=Ext.get(rt)}return rt},wrap:function(config,returnDom){if(!config)config=
{tag:"div"};var newEl=Ext.DomHelper.insertBefore(this.dom,config,!returnDom);newEl.dom?newEl.dom.appendChild(this.dom):newEl.appendChild(this.dom);return newEl},replace:function(el){el=Ext.get(el);this.insertBefore(el);el.remove();return this},replaceWith:function(el){if(typeof el=="object"&&!el.nodeType&&!el.dom)el=this.insertSibling(el,"before");else{el=Ext.getDom(el);this.dom.parentNode.insertBefore(el,this.dom)}El.uncache(this.id);this.dom.parentNode.removeChild(this.dom);this.dom=el;this.id=
Ext.id(el);El.cache[this.id]=this;return this},insertHtml:function(where,html,returnEl){var el=Ext.DomHelper.insertHtml(where,this.dom,html);return returnEl?Ext.get(el):el},set:function(o,useSet){var el=this.dom;useSet=typeof useSet=="undefined"?el.setAttribute?true:false:useSet;for(var attr in o){if(attr=="style"||typeof o[attr]=="function")continue;if(attr=="cls")el.className=o["cls"];else if(o.hasOwnProperty(attr))if(useSet)el.setAttribute(attr,o[attr]);else el[attr]=o[attr]}if(o.style)Ext.DomHelper.applyStyles(el,
o.style);return this},addKeyListener:function(key,fn,scope){var config;if(typeof key!="object"||Ext.isArray(key))config={key:key,fn:fn,scope:scope};else config={key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope};return new Ext.KeyMap(this,config)},addKeyMap:function(config){return new Ext.KeyMap(this,config)},isScrollable:function(){var dom=this.dom;return dom.scrollHeight>dom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()==
"left"?"scrollLeft":"scrollTop";if(!animate||!A)this.dom[prop]=value;else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{"to":to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable())return;var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,
2);switch(direction){case "l":case "left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case "r":case "right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case "t":case "top":case "up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case "b":case "bottom":case "down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,
y){if(typeof x=="object"||Ext.isArray(x)){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l))l=p=="relative"?0:this.dom.offsetLeft;if(isNaN(t))t=p=="relative"?0:this.dom.offsetTop;return{left:x-o[0]+l,top:y-o[1]+t}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=("number"==typeof doc.documentElement.scrollLeft?doc.documentElement.scrollLeft:
doc.body.scrollLeft)||0;t=("number"==typeof doc.documentElement.scrollTop?doc.documentElement.scrollTop:doc.body.scrollTop)||0}else{l=window.pageXOffset||(("number"==typeof doc.documentElement.scrollLeft?doc.documentElement.scrollLeft:doc.body.scrollLeft)||0);t=window.pageYOffset||(("number"==typeof doc.documentElement.scrollTop?doc.documentElement.scrollTop:doc.body.scrollTop)||0)}return{left:l,top:t}}else return{left:d.scrollLeft,top:d.scrollTop}},getColor:function(attr,defaultValue,prefix){var v=
this.getStyle(attr);if(!v||v=="transparent"||v=="inherit")return defaultValue;var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16)s="0"+s;color+=s}}else if(v.substr(0,1)=="#")if(v.length==4)for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}else if(v.length==7)color+=v.substr(1);return color.length>5?color.toLowerCase():defaultValue},boxWrap:function(cls){cls=cls||
"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format('<div class="{0}">'+El.boxMarkup+"</div>",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown")return d[ns+":"+name];return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},getTextWidth:function(text,min,max){return Ext.util.TextMetrics.measure(this.dom,
Ext.value(text,this.dom.innerHTML,true)).width.constrain(min||0,max||1E6)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto")return v;if(v===undefined)return"";if(typeof v=="number"||!El.unitPattern.test(v))return v+(defaultUnit||"px");return v};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>';
El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el)return null;if(typeof el=="string"){if(!(elm=document.getElementById(el)))return null;if(ex=El.cache[el])ex.dom=elm;else ex=El.cache[el]=new El(elm);
return ex}else if(el.tagName){if(!(id=el.id))id=Ext.id(el);if(ex=El.cache[id])ex.dom=el;else ex=El.cache[id]=new El(el);return ex}else if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else if(el.isComposite)return el;else if(Ext.isArray(el))return El.select(el);else if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f;docEl.dom=document}return docEl}return null};El.uncache=function(el){for(var i=0,a=arguments,
len=a.length;i<len;i++)if(a[i])delete El.cache[a[i].id||a[i]]};El.garbageCollect=function(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThread);return}for(var eid in El.cache){var el=El.cache[eid],d=el.dom;if(!d||!d.parentNode||!d.offsetParent&&!document.getElementById(eid)){delete El.cache[eid];if(d&&Ext.enableListenerCollection)Ext.EventManager.removeAll(d)}}};El.collectorThreadId=setInterval(El.garbageCollect,3E4);var flyFn=function(){};flyFn.prototype=El.prototype;var _cls=new flyFn;
El.Flyweight=function(dom){this.dom=dom};El.Flyweight.prototype=_cls;El.Flyweight.prototype.isFlyweight=true;El._flyweights={};El.fly=function(el,named){named=named||"_global";el=Ext.getDom(el);if(!el)return null;if(!El._flyweights[named])El._flyweights[named]=new El.Flyweight;El._flyweights[named].dom=el;return El._flyweights[named]};Ext.get=El.get;Ext.fly=El.fly;var noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko)noBoxAdjust["button"]=1;Ext.EventManager.on(window,
"unload",function(){delete El.cache;delete El._flyweights})})();Ext.enableFx=true;
Ext.Fx={slideIn:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"t";this.fixDisplay();var D=this.getFxRestore();var I=this.getBox();this.setSize(I);var F=this.fxWrap(D.pos,C,"hidden");var K=this.dom.style;K.visibility="visible";K.position="absolute";var E=function(){B.fxUnwrap(F,D.pos,C);K.width=D.width;K.height=D.height;B.afterFx(C)};var J,L={to:[I.x,I.y]},H={to:I.width},G={to:I.height};switch(A.toLowerCase()){case "t":F.setSize(I.width,0);K.left=K.bottom="0";J={height:G};
break;case "l":F.setSize(0,I.height);K.right=K.top="0";J={width:H};break;case "r":F.setSize(0,I.height);F.setX(I.right);K.left=K.top="0";J={width:H,points:L};break;case "b":F.setSize(I.width,0);F.setY(I.bottom);K.left=K.top="0";J={height:G,points:L};break;case "tl":F.setSize(0,0);K.right=K.bottom="0";J={width:H,height:G};break;case "bl":F.setSize(0,0);F.setY(I.y+I.height);K.right=K.top="0";J={width:H,height:G,points:L};break;case "br":F.setSize(0,0);F.setXY([I.right,I.bottom]);K.left=K.top="0";J=
{width:H,height:G,points:L};break;case "tr":F.setSize(0,0);F.setX(I.x+I.width);K.left=K.bottom="0";J={width:H,height:G,points:L};break}this.dom.style.visibility="visible";F.show();arguments.callee.anim=F.fxanim(J,C,"motion",.5,"easeOut",E)});return this},slideOut:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"t";var I=this.getFxRestore();var D=this.getBox();this.setSize(D);var G=this.fxWrap(I.pos,C,"visible");var F=this.dom.style;F.visibility="visible";F.position="absolute";
G.setSize(D);var J=function(){if(C.useDisplay)B.setDisplayed(false);else B.hide();B.fxUnwrap(G,I.pos,C);F.width=I.width;F.height=I.height;B.afterFx(C)};var E,H={to:0};switch(A.toLowerCase()){case "t":F.left=F.bottom="0";E={height:H};break;case "l":F.right=F.top="0";E={width:H};break;case "r":F.left=F.top="0";E={width:H,points:{to:[D.right,D.y]}};break;case "b":F.left=F.top="0";E={height:H,points:{to:[D.x,D.bottom]}};break;case "tl":F.right=F.bottom="0";E={width:H,height:H};break;case "bl":F.right=
F.top="0";E={width:H,height:H,points:{to:[D.x,D.bottom]}};break;case "br":F.left=F.top="0";E={width:H,height:H,points:{to:[D.x+D.width,D.bottom]}};break;case "tr":F.left=F.bottom="0";E={width:H,height:H,points:{to:[D.right,D.y]}};break}arguments.callee.anim=G.fxanim(E,C,"motion",.5,"easeOut",J)});return this},puff:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.clearOpacity();this.show();var F=this.getFxRestore();var D=this.dom.style;var G=function(){if(B.useDisplay)A.setDisplayed(false);
else A.hide();A.clearOpacity();A.setPositioning(F.pos);D.width=F.width;D.height=F.height;D.fontSize="";A.afterFx(B)};var E=this.getWidth();var C=this.getHeight();arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(E*2)},height:{to:this.adjustHeight(C*2)},points:{by:[-(E*.5),-(C*.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},B,"motion",.5,"easeOut",G)});return this},switchOff:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.clearOpacity();this.clip();var D=this.getFxRestore();
var C=this.dom.style;var E=function(){if(B.useDisplay)A.setDisplayed(false);else A.hide();A.clearOpacity();A.setPositioning(D.pos);C.width=D.width;C.height=D.height;A.afterFx(B)};this.fxanim({opacity:{to:.3}},null,null,.1,null,function(){this.clearOpacity();(function(){this.fxanim({height:{to:1},points:{by:[0,this.getHeight()*.5]}},B,"motion",.3,"easeIn",E)}).defer(100,this)})});return this},highlight:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"ffff9c";var D=C.attr||"backgroundColor";
this.clearOpacity();this.show();var G=this.getColor(D);var H=this.dom.style[D];var F=C.endColor||G||"ffffff";var I=function(){B.dom.style[D]=H;B.afterFx(C)};var E={};E[D]={from:A,to:F};arguments.callee.anim=this.fxanim(E,C,"color",1,"easeIn",I)});return this},frame:function(A,C,D){var B=this.getFxEl();D=D||{};B.queueFx(D,function(){A=A||"#C3DAF9";if(A.length==6)A="#"+A;C=C||1;var G=D.duration||1;this.show();var E=this.getBox();var F=function(){var H=Ext.getBody().createChild({style:{visbility:"hidden",
position:"absolute","z-index":"35000",border:"0px solid "+A}});var I=Ext.isBorderBox?2:1;H.animate({top:{from:E.y,to:E.y-20},left:{from:E.x,to:E.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:E.height,to:E.height+20*I},width:{from:E.width,to:E.width+20*I}},G,function(){H.remove();if(--C>0)F();else B.afterFx(D)})};F.call(this)});return this},pause:function(C){var A=this.getFxEl();var B={};A.queueFx(B,function(){setTimeout(function(){A.afterFx(B)},C*1E3)});return this},fadeIn:function(B){var A=
this.getFxEl();B=B||{};A.queueFx(B,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var C=B.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},B,null,.5,"easeOut",function(){if(C==1)this.clearOpacity();A.afterFx(B)})});return this},fadeOut:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){arguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay)this.dom.style.display=
"none";else this.dom.style.visibility="hidden";this.clearOpacity();A.afterFx(B)})});return this},scale:function(A,B,C){this.shift(Ext.apply({},C,{width:A,height:B}));return this},shift:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity;if(D!==undefined)E.width={to:this.adjustWidth(D)};if(F!==undefined)E.height={to:this.adjustHeight(F)};if(B.left!==undefined)E.left={to:B.left};if(B.top!==undefined)E.top={to:B.top};if(B.right!==undefined)E.right=
{to:B.right};if(B.bottom!==undefined)E.bottom={to:B.bottom};if(C!==undefined||H!==undefined)E.points={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]};if(G!==undefined)E.opacity={to:G};if(B.xy!==undefined)E.points={to:B.xy};arguments.callee.anim=this.fxanim(E,B,"motion",.35,"easeOut",function(){A.afterFx(B)})});return this},ghost:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"b";var H=this.getFxRestore();var E=this.getWidth(),G=this.getHeight();var F=this.dom.style;
var J=function(){if(C.useDisplay)B.setDisplayed(false);else B.hide();B.clearOpacity();B.setPositioning(H.pos);F.width=H.width;F.height=H.height;B.afterFx(C)};var D={opacity:{to:0},points:{}},I=D.points;switch(A.toLowerCase()){case "t":I.by=[0,-G];break;case "l":I.by=[-E,0];break;case "r":I.by=[E,0];break;case "b":I.by=[0,G];break;case "tl":I.by=[-E,-G];break;case "bl":I.by=[-E,G];break;case "br":I.by=[E,G];break;case "tr":I.by=[E,-G];break}arguments.callee.anim=this.fxanim(D,C,"motion",.5,"easeOut",
J)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var A=this.fxQueue[0];if(A)A.call(this)},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true)}}return this},
beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var A=this.fxQueue;return A&&A[0]&&A[0].block},queueFx:function(C,A){if(!this.fxQueue)this.fxQueue=[];if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurrent){var B=this.beforeFx(C);A.block=C.block;this.fxQueue.push(A);if(B)this.nextFx()}else A.call(this)}return this},fxWrap:function(F,D,C){var B;if(!D.wrap||!(B=Ext.get(D.wrap))){var A;if(D.fixPosition)A=
this.getXY();var E=document.createElement("div");E.style.visibility=C;B=Ext.get(this.dom.parentNode.insertBefore(E,this.dom));B.setPositioning(F);if(B.getStyle("position")=="static")B.position("relative");this.clearPositioning("auto");B.clip();B.dom.appendChild(this.dom);if(A)B.setXY(A)}return B},fxUnwrap:function(A,C,B){this.clearPositioning();this.setPositioning(C);if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.remove()}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),
width:A.width,height:A.height}},afterFx:function(A){if(A.afterStyle)this.applyStyles(A.afterStyle);if(A.afterCls)this.addClass(A.afterCls);if(A.remove===true)this.remove();Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(D,E,B,F,C,A){B=B||"run";E=E||{};var G=Ext.lib.Anim[B](this.dom,D,E.duration||F||.35,E.easing||C||"easeOut",function(){Ext.callback(A,this)},this);E.anim=G;return G}};
Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx);Ext.CompositeElement=function(A){this.elements=[];this.addElements(A)};
Ext.CompositeElement.prototype={isComposite:true,addElements:function(E){if(!E)return this;if(typeof E=="string")E=Ext.Element.selectorFunction(E);var D=this.elements;var B=D.length-1;for(var C=0,A=E.length;C<A;C++)D[++B]=Ext.get(E[C]);return this},fill:function(A){this.elements=[];this.add(A);return this},filter:function(A){var B=[];this.each(function(C){if(C.is(A))B[B.length]=C.dom});this.fill(B);return this},invoke:function(E,B){var D=this.elements;for(var C=0,A=D.length;C<A;C++)Ext.Element.prototype[E].apply(D[C],
B);return this},add:function(A){if(typeof A=="string")this.addElements(Ext.Element.selectorFunction(A));else if(A.length!==undefined)this.addElements(A);else this.addElements([A]);return this},each:function(E,D){var C=this.elements;for(var B=0,A=C.length;B<A;B++)if(E.call(D||C[B],C[B],this,B)===false)break;return this},item:function(A){return this.elements[A]||null},first:function(){return this.item(0)},last:function(){return this.item(this.elements.length-1)},getCount:function(){return this.elements.length},
contains:function(A){return this.indexOf(A)!==-1},indexOf:function(A){return this.elements.indexOf(Ext.get(A))},removeElement:function(D,F){if(Ext.isArray(D)){for(var C=0,A=D.length;C<A;C++)this.removeElement(D[C]);return this}var B=typeof D=="number"?D:this.indexOf(D);if(B!==-1&&this.elements[B]){if(F){var E=this.elements[B];if(E.dom)E.remove();else Ext.removeNode(E)}this.elements.splice(B,1)}return this},replaceElement:function(D,C,A){var B=typeof D=="number"?D:this.indexOf(D);if(B!==-1)if(A)this.elements[B].replaceWith(C);
else this.elements.splice(B,1,Ext.get(C));return this},clear:function(){this.elements=[]}};(function(){Ext.CompositeElement.createCall=function(B,C){if(!B[C])B[C]=function(){return this.invoke(C,arguments)}};for(var A in Ext.Element.prototype)if(typeof Ext.Element.prototype[A]=="function")Ext.CompositeElement.createCall(Ext.CompositeElement.prototype,A)})();Ext.CompositeElementLite=function(A){Ext.CompositeElementLite.superclass.constructor.call(this,A);this.el=new Ext.Element.Flyweight};
Ext.extend(Ext.CompositeElementLite,Ext.CompositeElement,{addElements:function(E){if(E)if(Ext.isArray(E))this.elements=this.elements.concat(E);else{var D=this.elements;var B=D.length-1;for(var C=0,A=E.length;C<A;C++)D[++B]=E[C]}return this},invoke:function(F,B){var D=this.elements;var E=this.el;for(var C=0,A=D.length;C<A;C++){E.dom=D[C];Ext.Element.prototype[F].apply(E,B)}return this},item:function(A){if(!this.elements[A])return null;this.el.dom=this.elements[A];return this.el},addListener:function(B,
G,F,E){var D=this.elements;for(var C=0,A=D.length;C<A;C++)Ext.EventManager.on(D[C],B,G,F||D[C],E);return this},each:function(F,E){var C=this.elements;var D=this.el;for(var B=0,A=C.length;B<A;B++){D.dom=C[B];if(F.call(E||D,D,this,B)===false)break}return this},indexOf:function(A){return this.elements.indexOf(Ext.getDom(A))},replaceElement:function(D,C,A){var B=typeof D=="number"?D:this.indexOf(D);if(B!==-1){C=Ext.getDom(C);if(A){var E=this.elements[B];E.parentNode.insertBefore(C,E);Ext.removeNode(E)}this.elements.splice(B,
1,C)}return this}});Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;if(Ext.DomQuery)Ext.Element.selectorFunction=Ext.DomQuery.select;Ext.Element.select=function(A,D,B){var C;if(typeof A=="string")C=Ext.Element.selectorFunction(A,B);else if(A.length!==undefined)C=A;else throw"Invalid selector";if(D===true)return new Ext.CompositeElement(C);else return new Ext.CompositeElementLite(C)};Ext.select=Ext.Element.select;
Ext.data.Connection=function(A){Ext.apply(this,A);this.addEvents("beforerequest","requestcomplete","requestexception");Ext.data.Connection.superclass.constructor.call(this)};
Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:3E4,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(E){if(this.fireEvent("beforerequest",this,E)!==false){var C=E.params;if(typeof C=="function")C=C.call(E.scope||window,E);if(typeof C=="object")C=Ext.urlEncode(C);if(this.extraParams){var G=Ext.urlEncode(this.extraParams);C=C?C+"&"+G:G}var B=E.url||this.url;if(typeof B=="function")B=B.call(E.scope||window,E);if(E.form){var D=Ext.getDom(E.form);B=B||D.action;
var J=D.getAttribute("enctype");if(E.isUpload||J&&J.toLowerCase()=="multipart/form-data")return this.doFormUpload(E,C,B);var I=Ext.lib.Ajax.serializeForm(D);C=C?C+"&"+I:I}var K=E.headers;if(this.defaultHeaders){K=Ext.apply(K||{},this.defaultHeaders);if(!E.headers)E.headers=K}var F={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:E},timeout:E.timeout||this.timeout};var A=E.method||this.method||(C||E.xmlData||E.jsonData?"POST":"GET");if(A=="GET"&&(this.disableCaching&&
E.disableCaching!==false)||E.disableCaching===true){var H=E.disableCachingParam||this.disableCachingParam;B+=(B.indexOf("?")!=-1?"&":"?")+H+"="+(new Date).getTime()}if(typeof E.autoAbort=="boolean"){if(E.autoAbort)this.abort()}else if(this.autoAbort!==false)this.abort();if((A=="GET"||E.xmlData||E.jsonData)&&C){B+=(B.indexOf("?")!=-1?"&":"?")+C;C=""}this.transId=Ext.lib.Ajax.request(A,B,F,C,E);return this.transId}else{Ext.callback(E.callback,E.scope,[E,null,null]);return null}},isLoading:function(A){if(A)return Ext.lib.Ajax.isCallInProgress(A);
else return this.transId?true:false},abort:function(A){if(A||this.isLoading())Ext.lib.Ajax.abort(A||this.transId)},handleResponse:function(A){this.transId=false;var B=A.argument.options;A.argument=B?B.argument:null;this.fireEvent("requestcomplete",this,A,B);Ext.callback(B.success,B.scope,[A,B]);Ext.callback(B.callback,B.scope,[B,true,A])},handleFailure:function(A,C){this.transId=false;var B=A.argument.options;A.argument=B?B.argument:null;this.fireEvent("requestexception",this,A,B,C);Ext.callback(B.failure,
B.scope,[A,B]);Ext.callback(B.callback,B.scope,[B,false,A])},doFormUpload:function(E,A,B){var C=Ext.id();var F=document.createElement("iframe");F.id=C;F.name=C;F.className="x-hidden";if(Ext.isIE)F.src=Ext.SSL_SECURE_URL;document.body.appendChild(F);if(Ext.isIE)document.frames[C].name=C;var D=Ext.getDom(E.form);D.target=C;D.method="POST";D.enctype=D.encoding="multipart/form-data";if(B)D.action=B;var L,J;if(A){L=[];A=Ext.urlDecode(A,false);for(var H in A)if(A.hasOwnProperty(H)){J=document.createElement("input");
J.type="hidden";J.name=H;J.value=A[H];D.appendChild(J);L.push(J)}}function G(){var M={responseText:"",responseXML:null};M.argument=E?E.argument:null;try{var O;if(Ext.isIE)O=F.contentWindow.document;else O=F.contentDocument||window.frames[C].document;if(O&&O.body)M.responseText=O.body.innerHTML;if(O&&O.XMLDocument)M.responseXML=O.XMLDocument;else M.responseXML=O}catch(N){}Ext.EventManager.removeListener(F,"load",G,this);this.fireEvent("requestcomplete",this,M,E);Ext.callback(E.success,E.scope,[M,E]);
Ext.callback(E.callback,E.scope,[E,true,M]);setTimeout(function(){Ext.removeNode(F)},100)}Ext.EventManager.on(F,"load",G,this);D.submit();if(L)for(var I=0,K=L.length;I<K;I++)Ext.removeNode(L[I])}});Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(A){return Ext.lib.Ajax.serializeForm(A)}});
Ext.Updater=Ext.extend(Ext.util.Observable,{constructor:function(B,A){B=Ext.get(B);if(!A&&B.updateManager)return B.updateManager;this.el=B;this.defaultUrl=null;this.addEvents("beforeupdate","update","failure");var C=Ext.Updater.defaults;this.sslBlankUrl=C.sslBlankUrl;this.disableCaching=C.disableCaching;this.indicatorText=C.indicatorText;this.showLoadIndicator=C.showLoadIndicator;this.timeout=C.timeout;this.loadScripts=C.loadScripts;this.transaction=null;this.refreshDelegate=this.refresh.createDelegate(this);
this.updateDelegate=this.update.createDelegate(this);this.formUpdateDelegate=this.formUpdate.createDelegate(this);if(!this.renderer)this.renderer=this.getDefaultRenderer();Ext.Updater.superclass.constructor.call(this)},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer},getEl:function(){return this.el},update:function(B,F,G,D){if(this.fireEvent("beforeupdate",this.el,B,F)!==false){var A,C;if(typeof B=="object"){A=B;B=A.url;F=F||A.params;G=G||A.callback;D=D||A.discardUrl;C=A.scope;
if(typeof A.nocache!="undefined")this.disableCaching=A.nocache;if(typeof A.text!="undefined")this.indicatorText='<div class="loading-indicator">'+A.text+"</div>";if(typeof A.scripts!="undefined")this.loadScripts=A.scripts;if(typeof A.timeout!="undefined")this.timeout=A.timeout}this.showLoading();if(!D)this.defaultUrl=B;if(typeof B=="function")B=B.call(this);var E=Ext.apply({},{url:B,params:typeof F=="function"&&C?F.createDelegate(C):F,success:this.processSuccess,failure:this.processFailure,scope:this,
callback:undefined,timeout:this.timeout*1E3,disableCaching:this.disableCaching,argument:{"options":A,"url":B,"form":null,"callback":G,"scope":C||window,"params":F}},A);this.transaction=Ext.Ajax.request(E)}},formUpdate:function(C,A,B,D){if(this.fireEvent("beforeupdate",this.el,C,A)!==false){if(typeof A=="function")A=A.call(this);C=Ext.getDom(C);this.transaction=Ext.Ajax.request({form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:this.timeout*1E3,argument:{"url":A,
"form":C,"callback":D,"reset":B}});this.showLoading.defer(1,this)}},refresh:function(A){if(this.defaultUrl==null)return;this.update(this.defaultUrl,null,A,true)},startAutoRefresh:function(B,C,D,E,A){if(A)this.update(C||this.defaultUrl,D,E,true);if(this.autoRefreshProcId)clearInterval(this.autoRefreshProcId);this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[C||this.defaultUrl,D,E,true]),B*1E3)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);
delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator)this.el.update(this.indicatorText)},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset)try{A.argument.form.reset()}catch(B){}if(this.loadScripts)this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]));else{this.renderer.render(this.el,A,this);this.updateComplete(A)}},updateComplete:function(A){this.fireEvent("update",
this.el,A);if(typeof A.argument.callback=="function")A.argument.callback.call(A.argument.scope,this.el,true,A,A.argument.options)},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function")A.argument.callback.call(A.argument.scope,this.el,false,A,A.argument.options)},setRenderer:function(A){this.renderer=A},getRenderer:function(){return this.renderer},setDefaultUrl:function(A){this.defaultUrl=A},abort:function(){if(this.transaction)Ext.Ajax.abort(this.transaction)},
isUpdating:function(){if(this.transaction)return Ext.Ajax.isLoading(this.transaction);return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL||"javascript:false",disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>'};Ext.Updater.updateElement=function(D,C,E,B){var A=Ext.get(D).getUpdater();Ext.apply(A,B);A.update(C,E,B?B.callback:null)};Ext.Updater.BasicRenderer=function(){};
Ext.Updater.BasicRenderer.prototype={render:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D)}};Ext.UpdateManager=Ext.Updater;
(function(){Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=="function"?p():p;Date.parseCodes[character]=p}return p?Ext.applyIf({c:p.c?String.format(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}};var $f=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{count:0},parseRegexes:[],formatFunctions:{count:0},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",
MONTH:"mo",YEAR:"y",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(month){return Date.monthNames[month].substring(0,3)},getShortDayName:function(day){return Date.dayNames[day].substring(0,3)},getMonthNumber:function(name){return Date.monthNumbers[name.substring(0,
1).toUpperCase()+name.substring(1,3).toLowerCase()]},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",
t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",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:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",
H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var c="Y-m-dTH:i:sP",code=[],i=0,l=c.length;i<l;++i){var e=c.charAt(i);code.push(e=="T"?"'T'":Date.getFormatCode(e))}return code.join(" + ")},U:"Math.round(this.getTime() / 1000)"},parseDate:function(input,
format){var p=Date.parseFunctions;if(p[format]==null)Date.createParser(format);var func=p[format];return Date[func](input)},getFormatCode:function(character){var f=Date.formatCodes[character];if(f){f=Ext.type(f)=="function"?f():f;Date.formatCodes[character]=f}return f||"'"+String.escape(character)+"'"},createNewFormat:function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function(){return ";var special=false;
var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\")special=true;else if(special){special=false;code+="'"+String.escape(ch)+"' + "}else code+=Date.getFormatCode(ch)+" + "}eval(code.substring(0,code.length-3)+";}")},createParser:function(format){var funcName="parse"+Date.parseFunctions.count++;var regexNum=Date.parseRegexes.length;var currentGroup=1;Date.parseFunctions[format]=funcName;var code="Date."+funcName+" = function(input){\n"+"var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n"+
"input = String(input);\n"+"d = new Date();\n"+"y = d.getFullYear();\n"+"m = d.getMonth();\n"+"d = d.getDate();\n"+"var results = input.match(Date.parseRegexes["+regexNum+"]);\n"+"if (results && results.length > 0) {";var regex="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\")special=true;else if(special){special=false;regex+=String.escape(ch)}else{var obj=Date.formatCodeToRegex(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c)code+=
obj.c}}code+="if (u){\n"+"v = new Date(u * 1000);\n"+"}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){\n"+"v = new Date(y, m, d, h, i, s, ms);\n"+"}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){\n"+"v = new Date(y, m, d, h, i, s);\n"+"}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){\n"+"v = new Date(y, m, d, h, i);\n"+"}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){\n"+"v = new Date(y, m, d, h);\n"+"}else if (y >= 0 && m >= 0 && d > 0){\n"+
"v = new Date(y, m, d);\n"+"}else if (y >= 0 && m >= 0){\n"+"v = new Date(y, m);\n"+"}else if (y >= 0){\n"+"v = new Date(y);\n"+"}\n}\nreturn (v && (z || o))?"+" (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :"+" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n"+"}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code)},parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",
s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i);return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.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:0,c:null,s:"(?:\\d{1,3}"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),
++i);return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n"+"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\n"+"if (h == 12) { h = 0; }\n"+
"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return $f("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return $f("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",
s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);","var mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + 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);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);","var mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + 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:"z = results[{0}] * 1;\n"+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var calc=[];var arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:"if(results[9] == 'Z'){\no = 0;\n}else{\n"+$f("P",9).c+"\n}"}];for(var i=0,l=arr.length;i<l;++i)calc.push(arr[i].c);return{g:1,c:calc.join(""),s:arr[0].s+
"-"+arr[1].s+"-"+arr[2].s+"T"+arr[3].s+":"+arr[4].s+":"+arr[5].s+"((.|,)\\d+)?"+"("+$f("P",null).s+"|Z)"}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}})})();
Ext.override(Date,{dateFormat:function(B){if(Date.formatFunctions[B]==null)Date.createNewFormat(B);var A=Date.formatFunctions[B];return this[A]()},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(A){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0")+(A?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},
getDayOfYear:function(){var A=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var B=0;B<this.getMonth();++B)A+=Date.daysInMonth[B];return A+this.getDate()-1},getWeekOfYear:function(){var B=864E5;var C=7*B;var D=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/B;var A=Math.floor(D/7);var E=(new Date(A*C)).getUTCFullYear();return A-Math.floor(Date.UTC(E,0,7)/C)+1},isLeapYear:function(){var A=this.getFullYear();return!!((A&3)==0&&(A%100||A%400==0&&A))},getFirstDayOfMonth:function(){var A=
(this.getDay()-(this.getDate()-1))%7;return A<0?A+7:A},getLastDayOfMonth:function(){var A=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return A<0?A+7:A},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1)},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()]},getSuffix:function(){switch(this.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(){return new Date(this.getTime())},clearTime:function(A){if(A)return this.clone().clearTime();this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this},add:function(B,C){var D=this.clone();if(!B||C===0)return D;switch(B.toLowerCase()){case Date.MILLI:D.setMilliseconds(this.getMilliseconds()+C);break;case Date.SECOND:D.setSeconds(this.getSeconds()+C);break;case Date.MINUTE:D.setMinutes(this.getMinutes()+
C);break;case Date.HOUR:D.setHours(this.getHours()+C);break;case Date.DAY:D.setDate(this.getDate()+C);break;case Date.MONTH:var A=this.getDate();if(A>28)A=Math.min(A,this.getFirstDateOfMonth().add("mo",C).getLastDateOfMonth().getDate());D.setDate(A);D.setMonth(this.getMonth()+C);break;case Date.YEAR:D.setFullYear(this.getFullYear()+C);break}return D},between:function(C,A){var B=this.getTime();return C.getTime()<=B&&B<=A.getTime()}});Date.prototype.format=Date.prototype.dateFormat;
if(Ext.isSafari&&false){Date.brokenSetMonth=Date.prototype.setMonth;Date.prototype.setMonth=function(A){if(A<=-1){var D=Math.ceil(-A);var C=Math.ceil(D/12);var B=D%12?12-D%12:0;this.setFullYear(this.getFullYear()-C);return Date.brokenSetMonth.call(this,B)}else return Date.brokenSetMonth.apply(this,arguments)}}
Ext.util.DelayedTask=function(E,D,A){var G=null,F,B;var C=function(){var H=(new Date).getTime();if(H-B>=F){clearInterval(G);G=null;E.apply(D,A||[])}};this.delay=function(I,K,J,H){if(G&&I!=F)this.cancel();F=I;B=(new Date).getTime();E=K||E;D=J||D;A=H||A;if(!G)G=setInterval(C,F)};this.cancel=function(){if(G){clearInterval(G);G=null}}};
Ext.util.TaskRunner=function(E){E=E||10;var F=[],A=[];var B=0;var G=false;var D=function(){G=false;clearInterval(B);B=0};var H=function(){if(!G){G=true;B=setInterval(I,E)}};var C=function(J){A.push(J);if(J.onStop)J.onStop.apply(J.scope||J)};var I=function(){if(A.length>0){for(var O=0,K=A.length;O<K;O++)F.remove(A[O]);A=[];if(F.length<1){D();return}}var M=(new Date).getTime();for(var O=0,K=F.length;O<K;++O){var N=F[O];var J=M-N.taskRunTime;if(N.interval<=J){var L=N.run.apply(N.scope||N,N.args||[++N.taskRunCount]);
N.taskRunTime=M;if(L===false||N.taskRunCount===N.repeat){C(N);return}}if(N.duration&&N.duration<=M-N.taskStartTime)C(N)}};this.start=function(J){F.push(J);J.taskStartTime=(new Date).getTime();J.taskRunTime=0;J.taskRunCount=0;H();return J};this.stop=function(J){C(J);return J};this.stopAll=function(){D();for(var K=0,J=F.length;K<J;K++)if(F[K].onStop)F[K].onStop();F=[];A=[]}};Ext.TaskMgr=new Ext.util.TaskRunner;
Ext.util.MixedCollection=function(B,A){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=B===true;if(A)this.getKey=A;Ext.util.MixedCollection.superclass.constructor.call(this)};
Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(B,C){if(arguments.length==1){C=arguments[0];B=this.getKey(C)}if(typeof B=="undefined"||B===null){this.length++;this.items.push(C);this.keys.push(null)}else{var A=this.map[B];if(A)return this.replace(B,C);this.length++;this.items.push(C);this.map[B]=C;this.keys.push(B)}this.fireEvent("add",this.length-1,C,B);return C},getKey:function(A){return A.id},replace:function(C,D){if(arguments.length==1){D=arguments[0];
C=this.getKey(D)}var A=this.item(C);if(typeof C=="undefined"||C===null||typeof A=="undefined")return this.add(C,D);var B=this.indexOfKey(C);this.items[B]=D;this.map[C]=D;this.fireEvent("replace",C,A,D);return D},addAll:function(E){if(arguments.length>1||Ext.isArray(E)){var B=arguments.length>1?arguments:E;for(var D=0,A=B.length;D<A;D++)this.add(B[D])}else for(var C in E)if(this.allowFunctions||typeof E[C]!="function")this.add(C,E[C])},each:function(E,D){var B=[].concat(this.items);for(var C=0,A=B.length;C<
A;C++)if(E.call(D||B[C],B[C],C,A)===false)break},eachKey:function(D,C){for(var B=0,A=this.keys.length;B<A;B++)D.call(C||window,this.keys[B],this.items[B],B,A)},find:function(D,C){for(var B=0,A=this.items.length;B<A;B++)if(D.call(C||window,this.items[B],this.keys[B]))return this.items[B];return null},insert:function(A,B,C){if(arguments.length==2){C=arguments[1];B=this.getKey(C)}if(A>=this.length)return this.add(B,C);this.length++;this.items.splice(A,0,C);if(typeof B!="undefined"&&B!=null)this.map[B]=
C;this.keys.splice(A,0,B);this.fireEvent("add",A,C,B);return C},remove:function(A){return this.removeAt(this.indexOf(A))},removeAt:function(A){if(A<this.length&&A>=0){this.length--;var C=this.items[A];this.items.splice(A,1);var B=this.keys[A];if(typeof B!="undefined")delete this.map[B];this.keys.splice(A,1);this.fireEvent("remove",C,B);return C}return false},removeKey:function(A){return this.removeAt(this.indexOfKey(A))},getCount:function(){return this.length},indexOf:function(A){return this.items.indexOf(A)},
indexOfKey:function(A){return this.keys.indexOf(A)},item:function(A){var B=typeof this.map[A]!="undefined"?this.map[A]:this.items[A];return typeof B!="function"||this.allowFunctions?B:null},itemAt:function(A){return this.items[A]},key:function(A){return this.map[A]},contains:function(A){return this.indexOf(A)!=-1},containsKey:function(A){return typeof this.map[A]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},
last:function(){return this.items[this.length-1]},_sort:function(I,A,H){var C=String(A).toUpperCase()=="DESC"?-1:1;H=H||function(K,J){return K-J};var G=[],B=this.keys,F=this.items;for(var D=0,E=F.length;D<E;D++)G[G.length]={key:B[D],value:F[D],index:D};G.sort(function(K,J){var L=H(K[I],J[I])*C;if(L==0)L=K.index<J.index?-1:1;return L});for(var D=0,E=G.length;D<E;D++){F[D]=G[D].value;B[D]=G[D].key}this.fireEvent("sort",this)},sort:function(A,B){this._sort("value",A,B)},keySort:function(A,B){this._sort("key",
A,B||function(D,C){return String(D).toUpperCase()-String(C).toUpperCase()})},getRange:function(E,A){var B=this.items;if(B.length<1)return[];E=E||0;A=Math.min(typeof A=="undefined"?this.length-1:A,this.length-1);var D=[];if(E<=A)for(var C=E;C<=A;C++)D[D.length]=B[C];else for(var C=E;C>=A;C--)D[D.length]=B[C];return D},filter:function(C,B,D,A){if(Ext.isEmpty(B,false))return this.clone();B=this.createValueMatcher(B,D,A);return this.filterBy(function(E){return E&&B.test(E[C])})},filterBy:function(F,E){var G=
new Ext.util.MixedCollection;G.getKey=this.getKey;var B=this.keys,D=this.items;for(var C=0,A=D.length;C<A;C++)if(F.call(E||this,D[C],B[C]))G.add(B[C],D[C]);return G},findIndex:function(C,B,E,D,A){if(Ext.isEmpty(B,false))return-1;B=this.createValueMatcher(B,D,A);return this.findIndexBy(function(F){return F&&B.test(F[C])},null,E)},findIndexBy:function(F,E,G){var B=this.keys,D=this.items;for(var C=G||0,A=D.length;C<A;C++)if(F.call(E||this,D[C],B[C]))return C;if(typeof G=="number"&&G>0)for(var C=0;C<
G;C++)if(F.call(E||this,D[C],B[C]))return C;return-1},createValueMatcher:function(B,C,A){if(!B.exec){B=String(B);B=new RegExp((C===true?"":"^")+Ext.escapeRe(B),A?"":"i")}return B},clone:function(){var E=new Ext.util.MixedCollection;var B=this.keys,D=this.items;for(var C=0,A=D.length;C<A;C++)E.add(B[C],D[C]);E.getKey=this.getKey;return E}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;
Ext.util.JSON=new function(){var useHasOwn=!!{}.hasOwnProperty;var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s))return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c)return c;c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"';return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=
1){v=o[i];switch(typeof v){case "undefined":case "function":case "unknown":break;default:if(b)a.push(",");a.push(v===null?"null":Ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(o){if(typeof o=="undefined"||o===null)return"null";else if(Ext.isArray(o))return encodeArray(o);else if(Ext.isDate(o))return Ext.util.JSON.encodeDate(o);
else if(typeof o=="string")return encodeString(o);else if(typeof o=="number")return isFinite(o)?String(o):"null";else if(typeof o=="boolean")return String(o);else{var a=["{"],b,i,v;for(i in o)if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case "undefined":case "function":case "unknown":break;default:if(b)a.push(",");a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}a.push("}");return a.join("")}};this.decode=function(json){return eval("("+json+")")}};Ext.encode=Ext.util.JSON.encode;
Ext.decode=Ext.util.JSON.decode;
Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g;return{ellipsis:function(value,len){if(value&&value.length>len)return value.substr(0,len-3)+"...";return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return!value?value:String(value).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},htmlDecode:function(value){return!value?value:
String(value).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return!value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>
2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else return eval(fn).call(window,value)},usMoney:function(v){v=Math.round((v-0)*100)/100;v=v==Math.floor(v)?v+".00":v*10==Math.floor(v*10)?v+"0":v;v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var r=/(\d+)(\d{3})/;while(r.test(whole))whole=whole.replace(r,"$1"+","+"$2");v=whole+sub;if(v.charAt(0)=="-")return"-$"+v.substr(1);return"$"+v},date:function(v,format){if(!v)return"";
if(!Ext.isDate(v))v=new Date(Date.parse(v));return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return!v?v:String(v).replace(this.stripTagsRE,"")},stripScriptsRe:/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v){return!v?v:String(v).replace(this.stripScriptsRe,"")},fileSize:function(size){if(size<1024)return size+" bytes";else if(size<1048576)return Math.round(size*
10/1024)/10+" KB";else return Math.round(size*10/1048576)/10+" MB"},math:function(){var fns={};return function(v,a){if(!fns[a])fns[a]=new Function("v","return v "+a+";");return fns[a](v)}}(),nl2br:function(v){return v===undefined||v===null?"":v.replace(/\n/g,"<br/>")}}}();
Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var P=this.html;P=["<tpl>",P,"</tpl>"].join("");var O=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var N=/^<tpl\b[^>]*?for="(.*?)"/;var L=/^<tpl\b[^>]*?if="(.*?)"/;var J=/^<tpl\b[^>]*?exec="(.*?)"/;var C,B=0;var G=[];while(C=P.match(O)){var M=C[0].match(N);var K=C[0].match(L);var I=C[0].match(J);var E=null,H=null,D=null;var A=M&&M[1]?M[1]:"";if(K){E=K&&K[1]?K[1]:null;if(E)H=new Function("values","parent",
"xindex","xcount","with(values){ return "+Ext.util.Format.htmlDecode(E)+"; }")}if(I){E=I&&I[1]?I[1]:null;if(E)D=new Function("values","parent","xindex","xcount","with(values){ "+Ext.util.Format.htmlDecode(E)+"; }")}if(A)switch(A){case ".":A=new Function("values","parent","with(values){ return values; }");break;case "..":A=new Function("values","parent","with(values){ return parent; }");break;default:A=new Function("values","parent","with(values){ return "+A+"; }")}G.push({id:B,target:A,exec:D,test:H,
body:C[1]||""});P=P.replace(C[0],"{xtpl"+B+"}");++B}for(var F=G.length-1;F>=0;--F)this.compileTpl(G[F]);this.master=G[G.length-1];this.tpls=G};
Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.#]+)(?::([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(A,H,G,D,C){var J=this.tpls[A];if(J.test&&!J.test.call(this,H,G,D,C))return"";if(J.exec&&J.exec.call(this,H,G,D,C))return"";var I=J.target?J.target.call(this,H,G):H;G=J.target?H:G;if(J.target&&Ext.isArray(I)){var B=[];for(var E=0,F=I.length;E<F;E++)B[B.length]=J.compiled.call(this,I[E],G,E+1,F);return B.join("")}return J.compiled.call(this,
I,G,D,C)},compileTpl:function(tpl){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args,math){if(name.substr(0,4)=="xtpl")return"'"+sep+"this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount)"+sep+"'";var v;if(name===".")v="values";else if(name==="#")v="xindex";else if(name.indexOf(".")!=-1)v=name;else v="values['"+name+"']";if(math)v="("+v+math+")";if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!=
"this.")format="fm."+format+"(";else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="("+v+" === undefined ? '' : "}return"'"+sep+format+v+args+")"+sep+"'"};var codeFn=function(m,code){return"'"+sep+"("+code+")"+sep+"'"};var body;if(Ext.isGecko)body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};";else{body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];
body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn));body.push("'].join('');};");body=body.join("")}eval(body);return this},applyTemplate:function(A){return this.master.compiled.call(this,A,{},1,1)},compile:function(){return this}});Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate;Ext.XTemplate.from=function(A){A=Ext.getDom(A);return new Ext.XTemplate(A.value||A.innerHTML)};
Ext.util.CSS=function(){var D=null;var C=document;var B=/(-[a-z])/gi;var A=function(E,F){return F.charAt(1).toUpperCase()};return{createStyleSheet:function(G,J){var F;var E=C.getElementsByTagName("head")[0];var I=C.createElement("style");I.setAttribute("type","text/css");if(J)I.setAttribute("id",J);if(Ext.isIE){E.appendChild(I);F=I.styleSheet;F.cssText=G}else{try{I.appendChild(C.createTextNode(G))}catch(H){I.cssText=G}E.appendChild(I);F=I.styleSheet?I.styleSheet:I.sheet||C.styleSheets[C.styleSheets.length-
1]}this.cacheStyleSheet(F);return F},removeStyleSheet:function(F){var E=C.getElementById(F);if(E)E.parentNode.removeChild(E)},swapStyleSheet:function(G,E){this.removeStyleSheet(G);var F=C.createElement("link");F.setAttribute("rel","stylesheet");F.setAttribute("type","text/css");F.setAttribute("id",G);F.setAttribute("href",E);C.getElementsByTagName("head")[0].appendChild(F)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(F){if(!D)D={};try{var H=F.cssRules||F.rules;for(var E=
H.length-1;E>=0;--E)D[H[E].selectorText]=H[E]}catch(G){}},getRules:function(F){if(D==null||F){D={};var H=C.styleSheets;for(var G=0,E=H.length;G<E;G++)try{this.cacheStyleSheet(H[G])}catch(I){}}return D},getRule:function(E,G){var F=this.getRules(G);if(!Ext.isArray(E))return F[E];for(var H=0;H<E.length;H++)if(F[E[H]])return F[E[H]];return null},updateRule:function(E,H,G){if(!Ext.isArray(E)){var I=this.getRule(E);if(I){I.style[H.replace(B,A)]=G;return true}}else for(var F=0;F<E.length;F++)if(this.updateRule(E[F],
H,G))return true;return false}}}();Ext.util.ClickRepeater=function(B,A){this.el=Ext.get(B);this.el.unselectable();Ext.apply(this,A);this.addEvents("mousedown","click","mouseup");this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault)this.el.on("click",function(C){if(this.preventDefault)C.preventDefault();if(this.stopDefault)C.stopEvent()},this);if(this.handler)this.on("click",this.handler,this.scope||this);Ext.util.ClickRepeater.superclass.constructor.call(this)};
Ext.extend(Ext.util.ClickRepeater,Ext.util.Observable,{interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass)this.el.addClass(this.pressClass);this.mousedownTime=new Date;Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);this.fireEvent("click",this);if(this.accelerate)this.delay=400;this.timer=this.click.defer(this.delay||
this.interval,this)},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.accelerate?this.easeOutExpo(this.mousedownTime.getElapsed(),400,-390,12E3):this.interval,this)},easeOutExpo:function(B,A,D,C){return B==C?A+D:D*(-Math.pow(2,-10*B/C)+1)+A},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressClass)this.el.removeClass(this.pressClass);this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,
this);if(this.pressClass)this.el.addClass(this.pressClass);this.click()},handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this)}});Ext.KeyNav=function(B,A){this.el=Ext.get(B);Ext.apply(this,A);if(!this.disabled){this.disabled=true;this.enable()}};
Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(C){var A=C.getKey();var B=this.keyToHandler[A];if(Ext.isSafari2&&B&&A>=37&&A<=40)C.stopEvent()},relay:function(C){var A=C.getKey();var B=this.keyToHandler[A];if(B&&this[B])if(this.doRelay(C,this[B],B)!==true)C[this.defaultEventAction]()},doRelay:function(C,B,A){return B.call(this.scope||this,C)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,
del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isSafari3||Ext.isAir)this.el.on("keydown",this.relay,this);else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this)}this.disabled=false}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isSafari3||Ext.isAir)this.el.un("keydown",
this.relay);else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay)}this.disabled=true}}};Ext.KeyMap=function(C,B,A){this.el=Ext.get(C);this.eventName=A||"keydown";this.bindings=[];if(B)this.addBinding(B);this.enable()};
Ext.KeyMap.prototype={stopEvent:false,addBinding:function(D){if(Ext.isArray(D)){for(var F=0,H=D.length;F<H;F++)this.addBinding(D[F]);return}var N=D.key,C=D.shift,A=D.ctrl,G=D.alt,J=D.fn||D.handler,M=D.scope;if(D.stopEvent)this.stopEvent=D.stopEvent;if(typeof N=="string"){var K=[];var I=N.toUpperCase();for(var E=0,H=I.length;E<H;E++)K.push(I.charCodeAt(E));N=K}var B=Ext.isArray(N);var L=function(R){if((!C||R.shiftKey)&&(!A||R.ctrlKey)&&(!G||R.altKey)){var P=R.getKey();if(B)for(var Q=0,O=N.length;Q<
O;Q++){if(N[Q]==P){if(this.stopEvent)R.stopEvent();J.call(M||window,P,R);return}}else if(P==N){if(this.stopEvent)R.stopEvent();J.call(M||window,P,R)}}};this.bindings.push(L)},on:function(B,D,C){var G,A,E,F;if(typeof B=="object"&&!Ext.isArray(B)){G=B.key;A=B.shift;E=B.ctrl;F=B.alt}else G=B;this.addBinding({key:G,shift:A,ctrl:E,alt:F,fn:D,scope:C})},handleKeyDown:function(D){if(this.enabled){var B=this.bindings;for(var C=0,A=B.length;C<A;C++)B[C].call(this,D)}},isEnabled:function(){return this.enabled},
enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);this.enabled=true}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);this.enabled=false}}};Ext.util.TextMetrics=function(){var A;return{measure:function(B,C,D){if(!A)A=Ext.util.TextMetrics.Instance(B,D);A.bind(B);A.setFixedWidth(D||"auto");return A.getSize(C)},createInstance:function(B,C){return Ext.util.TextMetrics.Instance(B,C)}}}();
Ext.util.TextMetrics.Instance=function(B,D){var C=new Ext.Element(document.createElement("div"));document.body.appendChild(C.dom);C.position("absolute");C.setLeftTop(-1E3,-1E3);C.hide();if(D)C.setWidth(D);var A={getSize:function(F){C.update(F);var E=C.getSize();C.update("");return E},bind:function(E){C.setStyle(Ext.fly(E).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(E){C.setWidth(E)},getWidth:function(E){C.dom.style.width=
"auto";return this.getSize(E).width},getHeight:function(E){return this.getSize(E).height}};A.bind(B);return A};Ext.Element.measureText=Ext.util.TextMetrics.measure;
(function(){var A=Ext.EventManager;var B=Ext.lib.Dom;Ext.dd.DragDrop=function(E,C,D){if(E)this.init(E,C,D)};Ext.dd.DragDrop.prototype={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},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(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},
onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(H,F,M){if(typeof F=="number")F={left:F,right:F,top:F,bottom:F};F=F||this.defaultPadding;var J=Ext.get(this.getEl()).getBox();var C=Ext.get(H);var L=C.getScroll();var I,D=C.dom;if(D==document.body)I={x:L.left,y:L.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()};else{var K=C.getXY();I={x:K[0]+L.left,y:K[1]+L.top,width:D.clientWidth,height:D.clientHeight}}var G=J.y-I.y;var E=J.x-I.x;this.resetConstraints();
this.setXConstraint(E-(F.left||0),I.width-E-J.width-(F.right||0),this.xTickSize);this.setYConstraint(G-(F.top||0),I.height-G-J.height-(F.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(E,C,D){this.initTarget(E,C,D);A.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(E,C,D){this.config=D||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof E!=="string")E=
Ext.id(E);this.id=E;this.addToGroup(C?C:"default");this.handleElId=E;this.setDragElId(E);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(E,C,F,D){if(!C&&0!==C)this.padding=[E,E,E,E];else if(!F&&0!==F)this.padding=[E,C,E,C];else this.padding=[E,C,F,D]},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G))return;var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=
C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C])delete this.groups[C];this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string")C=Ext.id(C);this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string")C=Ext.id(C);A.on(C,"mousedown",this.handleMouseDown,this);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.un(this.id,
"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return this.DDM.isLocked()||this.locked},handleMouseDown:function(E,D){if(this.primaryButtonOnly&&E.button!=0)return;if(this.isLocked())return;this.DDM.refreshCache(this.groups);var C=new Ext.lib.Point(Ext.lib.Event.getPageX(E),Ext.lib.Event.getPageY(E));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(C,this));else if(this.clickValidator(E)){this.setStartPosition();this.b4MouseDown(E);
this.onMouseDown(E);this.DDM.handleMouseDown(E,this);this.DDM.stopEvent(E)}else;},clickValidator:function(D){var C=D.getTarget();return this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id))},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string")C=Ext.id(C);this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=
C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string")C=Ext.id(C);delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E)if(this.invalidHandleClasses[E]==D)delete this.invalidHandleClasses[E]},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&
D<C;++D)E=!Ext.fly(F).hasClass(this.invalidHandleClasses[D]);return E},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C)if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}for(D=this.initPageX;D<=this.maxX;D=D+C)if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C)if(!E[D]){this.yTicks[this.yTicks.length]=
D;E[D]=true}for(D=this.initPageY;D<=this.maxY;D=D+C)if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=E;this.rightConstraint=D;this.minX=this.initPageX-E;this.maxX=this.initPageX+D;if(C)this.setXTicks(this.initPageX,C);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(C,E,D){this.topConstraint=C;this.bottomConstraint=E;this.minY=this.initPageY-C;this.maxY=this.initPageY+E;if(D)this.setYTicks(this.initPageY,D);this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=this.maintainOffset?this.lastPageX-this.initPageX:0;var C=this.maintainOffset?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}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(I,F){if(!F)return I;else if(F[0]>=I)return F[0];else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return G>H?F[D]:F[E]}}return F[F.length-1]}},toString:function(){return"DragDrop "+this.id}}})();
if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var A=Ext.EventManager;return{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,_execOnAll:function(D,C){for(var E in this.ids)for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F))continue;F[D].apply(F,C)}},_onLoad:function(){this.init();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(B){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(C,B){if(!this.initialized)this.init();
if(!this.ids[B])this.ids[B]={};this.ids[B][C.id]=C},removeDDFromGroup:function(D,B){if(!this.ids[B])this.ids[B]={};var C=this.ids[B];if(C&&C[D.id])delete C[D.id]},_remove:function(C){for(var B in C.groups)if(B&&this.ids[B][C.id])delete this.ids[B][C.id];delete this.handleIds[C.id]},regHandle:function(C,B){if(!this.handleIds[C])this.handleIds[C]={};this.handleIds[C][B]=B},isDragDrop:function(B){return this.getDDById(B)?true:false},getRelated:function(F,C){var E=[];for(var D in F.groups)for(j in this.ids[D]){var B=
this.ids[D][j];if(!this.isTypeOfDD(B))continue;if(!C||B.isTarget)E[E.length]=B}return E},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D)if(C[D].id==E.id)return true;return false},isTypeOfDD:function(B){return B&&B.__ygDragDrop},isHandle:function(C,B){return this.handleIds[C]&&this.handleIds[C][B]},getDDById:function(C){for(var B in this.ids)if(this.ids[B][C])return this.ids[B][C];return null},handleMouseDown:function(D,C){if(Ext.QuickTips)Ext.QuickTips.disable();
this.currentTarget=D.getTarget();this.dragCurrent=C;var B=C.getEl();this.startX=D.getPageX();this.startY=D.getPageY();this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=Ext.dd.DDM;E.startDrag(E.startX,E.startY)},this.clickTimeThresh)},startDrag:function(B,C){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(B,C);this.dragCurrent.startDrag(B,C)}this.dragThreshMet=true},handleMouseUp:function(B){if(Ext.QuickTips)Ext.QuickTips.enable();
if(!this.dragCurrent)return;clearTimeout(this.clickTimeout);if(this.dragThreshMet)this.fireEvents(B,true);else;this.stopDrag(B);this.stopEvent(B)},stopEvent:function(B){if(this.stopPropagation)B.stopPropagation();if(this.preventDefault)B.preventDefault()},stopDrag:function(B){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(B);this.dragCurrent.endDrag(B)}this.dragCurrent.onMouseUp(B)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(D){if(!this.dragCurrent)return true;
if(Ext.isIE&&(D.button!==0&&D.button!==1&&D.button!==2)){this.stopEvent(D);return this.handleMouseUp(D)}if(!this.dragThreshMet){var C=Math.abs(this.startX-D.getPageX());var B=Math.abs(this.startY-D.getPageY());if(C>this.clickPixelThresh||B>this.clickPixelThresh)this.startDrag(this.startX,this.startY)}if(this.dragThreshMet){this.dragCurrent.b4Drag(D);this.dragCurrent.onDrag(D);if(!this.dragCurrent.moveOnly)this.fireEvents(D,false)}this.stopEvent(D);return true},fireEvents:function(K,L){var N=this.dragCurrent;
if(!N||N.isLocked())return;var O=K.getPoint();var B=[];var E=[];var I=[];var G=[];var D=[];for(var F in this.dragOvers){var C=this.dragOvers[F];if(!this.isTypeOfDD(C))continue;if(!this.isOverTarget(O,C,this.mode))E.push(C);B[F]=true;delete this.dragOvers[F]}for(var M in N.groups){if("string"!=typeof M)continue;for(F in this.ids[M]){var H=this.ids[M][F];if(!this.isTypeOfDD(H))continue;if(H.isTarget&&!H.isLocked()&&H!=N)if(this.isOverTarget(O,H,this.mode))if(L)G.push(H);else{if(!B[H.id])D.push(H);else I.push(H);
this.dragOvers[H.id]=H}}}if(this.mode){if(E.length){N.b4DragOut(K,E);N.onDragOut(K,E)}if(D.length)N.onDragEnter(K,D);if(I.length){N.b4DragOver(K,I);N.onDragOver(K,I)}if(G.length){N.b4DragDrop(K,G);N.onDragDrop(K,G)}}else{var J=0;for(F=0,J=E.length;F<J;++F){N.b4DragOut(K,E[F].id);N.onDragOut(K,E[F].id)}for(F=0,J=D.length;F<J;++F)N.onDragEnter(K,D[F].id);for(F=0,J=I.length;F<J;++F){N.b4DragOver(K,I[F].id);N.onDragOver(K,I[F].id)}for(F=0,J=G.length;F<J;++F){N.b4DragDrop(K,G[F].id);N.onDragDrop(K,G[F].id)}}if(L&&
!G.length)N.onInvalidDrop(K)},getBestMatch:function(D){var F=null;var C=D.length;if(C==1)F=D[0];else for(var E=0;E<C;++E){var B=D[E];if(B.cursorIsOver){F=B;break}else if(!F||F.overlap.getArea()<B.overlap.getArea())F=B}return F},refreshCache:function(C){for(var B in C){if("string"!=typeof B)continue;for(var D in this.ids[B]){var E=this.ids[B][D];if(this.isTypeOfDD(E)){var F=this.getLocation(E);if(F)this.locationCache[E.id]=F;else delete this.locationCache[E.id]}}}},verifyEl:function(C){if(C){var B;
if(Ext.isIE)try{B=C.offsetParent}catch(D){}else B=C.offsetParent;if(B)return true}return false},getLocation:function(G){if(!this.isTypeOfDD(G))return null;var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=Ext.lib.Dom.getXY(E)}catch(H){}if(!J)return null;D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new Ext.lib.Region(M,B,I,F)},isOverTarget:function(J,B,D){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);
this.locationCache[B.id]=F}if(!F)return false;B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||!I.getTargetCoord||!D&&!I.constrainX&&!I.constrainY)return B.cursorIsOver;B.overlap=null;var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();var E=new Ext.lib.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);var H=E.intersect(F);if(H){B.overlap=H;return D?true:B.cursorIsOver}else return false},_onUnload:function(C,B){Ext.dd.DragDropMgr.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();
this.dragCurrent=null}this._execOnAll("unreg",[]);for(var B in this.elementCache)delete this.elementCache[B];this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el)B=this.elementCache[C]=new this.ElementWrapper(Ext.getDom(C));return B},getElement:function(B){return Ext.getDom(B)},getCss:function(C){var B=Ext.getDom(C);return B?B.style:null},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style},getPosX:function(B){return Ext.lib.Dom.getX(B)},
getPosY:function(B){return Ext.lib.Dom.getY(B)},swapNode:function(D,B){if(D.swapNode)D.swapNode(B);else{var E=B.parentNode;var C=B.nextSibling;if(C==D)E.insertBefore(D,B);else if(B==D.nextSibling)E.insertBefore(B,D);else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C)}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft}else if(C){D=C.scrollTop;B=C.scrollLeft}else;return{top:D,left:B}},getStyle:function(C,B){return Ext.fly(C).getStyle(B)},
getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(B,D){var C=Ext.lib.Dom.getXY(D);Ext.lib.Dom.setXY(B,C)},numericSort:function(C,B){return C-B},_timeoutCount:0,_addListeners:function(){var B=Ext.dd.DDM;if(Ext.lib.Event&&document)B._onLoad();else if(B._timeoutCount>2E3);else{setTimeout(B._addListeners,10);if(document&&document.body)B._timeoutCount+=1}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id))return true;else{var C=
B.parentNode;while(C)if(this.isHandle(D,C.id))return true;else C=C.parentNode}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(C,A,B){if(C)this.init(C,A,B)};
Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var 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(C,G,F){var E=this.getTargetCoord(G,F);var B=C.dom?C:Ext.fly(C,"_dd");if(!this.deltaSetXY){var H=[E.x,E.y];B.setXY(H);var D=B.getLeft(true);var A=B.getTop(true);this.deltaSetXY=[D-E.x,A-E.y]}else B.setLeftTop(E.x+
this.deltaSetXY[0],E.y+this.deltaSetXY[1]);this.cachePosition(E.x,E.y);this.autoScroll(E.x,E.y,C.offsetHeight,C.offsetWidth);return E},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=Ext.lib.Dom.getViewHeight();var B=Ext.lib.Dom.getViewWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=L+N-I-this.deltaY;
var F=B+D-J-this.deltaX;var C=40;var A=document.all?80:30;if(H>L&&G<C)window.scrollTo(D,N+A);if(I<N&&N>0&&I-N<C)window.scrollTo(D,N-A);if(M>B&&F<C)window.scrollTo(D+A,N);if(J<D&&D>0&&J-D<C)window.scrollTo(D-A,N)}},getTargetCoord:function(C,B){var A=C-this.deltaX;var 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(){Ext.dd.DD.superclass.applyConfig.call(this);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.dd.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";
Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this;var A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return}var D=this.getDragEl();if(!D){D=document.createElement("div");D.id=this.dragElId;var 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(){Ext.dd.DDProxy.superclass.applyConfig.call(this);
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();var A=this.getDragEl();var 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();var 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();var 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.dd.DDTarget=function(C,A,B){if(C)this.initTarget(C,A,B)};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return"DDTarget "+this.id}});Ext.dd.DragTracker=function(A){Ext.apply(this,A);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el)this.initEl(this.el)};
Ext.extend(Ext.dd.DragTracker,Ext.util.Observable,{active:false,tolerance:5,autoStart:false,initEl:function(A){this.el=Ext.get(A);A.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(C,B){if(this.fireEvent("mousedown",this,C)!==false&&this.onBeforeStart(C)!==false){this.startXY=this.lastXY=C.getXY();this.dragTarget=this.delegate?B:this.el.dom;C.preventDefault();var A=Ext.getDoc();
A.on("mouseup",this.onMouseUp,this);A.on("mousemove",this.onMouseMove,this);A.on("selectstart",this.stopSelect,this);if(this.autoStart)this.timer=this.triggerStart.defer(this.autoStart===true?1E3:this.autoStart,this)}},onMouseMove:function(D,C){D.preventDefault();var B=D.getXY(),A=this.startXY;this.lastXY=B;if(!this.active)if(Math.abs(A[0]-B[0])>this.tolerance||Math.abs(A[1]-B[1])>this.tolerance)this.triggerStart();else return;this.fireEvent("mousemove",this,D);this.onDrag(D);this.fireEvent("drag",
this,D)},onMouseUp:function(B){var A=Ext.getDoc();A.un("mousemove",this.onMouseMove,this);A.un("mouseup",this.onMouseUp,this);A.un("selectstart",this.stopSelect,this);B.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,B);this.onEnd(B);this.fireEvent("dragend",this,B)},triggerStart:function(A){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},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},getXY:function(A){return A?this.constrainModes[A].call(this,this.lastXY):this.lastXY},getOffset:function(C){var B=this.getXY(C);var A=this.startXY;return[A[0]-B[0],A[1]-B[1]]},constrainModes:{"point":function(B){if(!this.elRegion)this.elRegion=this.getDragCt().getRegion();
var A=this.dragRegion;A.left=B[0];A.top=B[1];A.right=B[0];A.bottom=B[1];A.constrainTo(this.elRegion);return[A.left,A.top]}}});
Ext.dd.ScrollManager=function(){var C=Ext.dd.DragDropMgr;var E={};var B=null;var H={};var G=function(K){B=null;A()};var I=function(){if(C.dragCurrent)C.refreshCache(C.dragCurrent.groups)};var D=function(){if(C.dragCurrent){var K=Ext.dd.ScrollManager;var L=H.el.ddScrollConfig?H.el.ddScrollConfig.increment:K.increment;if(!K.animate){if(H.el.scroll(H.dir,L))I()}else H.el.scroll(H.dir,L,true,K.animDuration,I)}};var A=function(){if(H.id)clearInterval(H.id);H.id=0;H.el=null;H.dir=""};var F=function(L,K){A();
H.el=L;H.dir=K;var M=L.ddScrollConfig&&L.ddScrollConfig.frequency?L.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;H.id=setInterval(D,M)};var J=function(N,P){if(P||!C.dragCurrent)return;var Q=Ext.dd.ScrollManager;if(!B||B!=C.dragCurrent){B=C.dragCurrent;Q.refreshCache()}var R=Ext.lib.Event.getXY(N);var S=new Ext.lib.Point(R[0],R[1]);for(var L in E){var M=E[L],K=M._region;var O=M.ddScrollConfig?M.ddScrollConfig:Q;if(K&&K.contains(S)&&M.isScrollable())if(K.bottom-S.y<=O.vthresh){if(H.el!=M)F(M,
"down");return}else if(K.right-S.x<=O.hthresh){if(H.el!=M)F(M,"left");return}else if(S.y-K.top<=O.vthresh){if(H.el!=M)F(M,"up");return}else if(S.x-K.left<=O.hthresh){if(H.el!=M)F(M,"right");return}}A()};C.fireEvents=C.fireEvents.createSequence(J,C);C.stopDrag=C.stopDrag.createSequence(G,C);return{register:function(M){if(Ext.isArray(M))for(var L=0,K=M.length;L<K;L++)this.register(M[L]);else{M=Ext.get(M);E[M.id]=M}},unregister:function(M){if(Ext.isArray(M))for(var L=0,K=M.length;L<K;L++)this.unregister(M[L]);
else{M=Ext.get(M);delete E[M.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:.4,refreshCache:function(){for(var K in E)if(typeof E[K]=="object")E[K]._region=E[K].getRegion()}}}();
Ext.dd.Registry=function(){var D={};var B={};var A=0;var C=function(F,E){if(typeof F=="string")return F;var G=F.id;if(!G&&E!==false){G="extdd-"+ ++A;F.id=G}return G};return{register:function(H,I){I=I||{};if(typeof H=="string")H=document.getElementById(H);I.ddel=H;D[C(H)]=I;if(I.isHandle!==false)B[I.ddel.id]=I;if(I.handles){var G=I.handles;for(var F=0,E=G.length;F<E;F++)B[C(G[F])]=I}},unregister:function(H){var J=C(H,false);var I=D[J];if(I){delete D[J];if(I.handles){var G=I.handles;for(var F=0,E=G.length;F<
E;F++)delete B[C(G[F],false)]}}},getHandle:function(E){if(typeof E!="string")E=E.id;return B[E]},getHandleFromEvent:function(F){var E=Ext.lib.Event.getTarget(F);return E?B[E.id]:null},getTarget:function(E){if(typeof E!="string")E=E.id;return D[E]},getTargetFromEvent:function(F){var E=Ext.lib.Event.getTarget(F);return E?D[E.id]||B[E.id]:null}}}();
Ext.dd.StatusProxy=function(A){Ext.apply(this,A);this.id=this.id||Ext.id();this.el=new Ext.Layer({dh:{id:this.id,tag:"div",cls:"x-dd-drag-proxy "+this.dropNotAllowed,children:[{tag:"div",cls:"x-dd-drop-icon"},{tag:"div",cls:"x-dd-drag-ghost"}]},shadow:!A||A.shadow!==false});this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed};
Ext.dd.StatusProxy.prototype={dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",setStatus:function(A){A=A||this.dropNotAllowed;if(this.dropStatus!=A){this.el.replaceClass(this.dropStatus,A);this.dropStatus=A}},reset:function(A){this.el.dom.className="x-dd-drag-proxy "+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(A)this.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(Ext.isIE?"styleFloat":"cssFloat","none")},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(A){this.el.hide();if(A)this.reset(true)},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated())this.anim.stop()},show:function(){this.el.show()},sync:function(){this.el.sync()},repair:function(B,C,A){this.callback=C;this.scope=A;if(B&&this.animRepair!==false){this.el.addClass("x-dd-drag-repair");this.el.hideUnders(true);
this.anim=this.el.shift({duration:this.repairDuration||.5,easing:"easeOut",xy:B,stopFx:true,callback:this.afterRepair,scope:this})}else this.afterRepair()},afterRepair:function(){this.hide(true);if(typeof this.callback=="function")this.callback.call(this.scope||this);this.callback=null;this.scope=null}};
Ext.dd.DragSource=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;Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true});this.dragging=false};
Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(A){return this.dragData},onDragEnter:function(C,D){var B=Ext.dd.DragDropMgr.getDDById(D);this.cachedTarget=B;if(this.beforeDragEnter(B,C,D)!==false){if(B.isNotifyTarget){var 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},
alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync()},onDragOver:function(C,D){var B=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(D);if(this.beforeDragOver(B,C,D)!==false){if(B.isNotifyTarget){var 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.DragDropMgr.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.DragDropMgr.getDDById(C);if(this.beforeDragDrop(A,B,C)!==false){if(A.isNotifyTarget)if(A.notifyDrop(this,B,this.dragData))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(){if(Ext.enableFx)this.el.highlight(this.hlColor||"c3daf9");this.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();Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments)}},onBeforeDrag:function(A,B){return true},onStartDrag:Ext.emptyFn,startDrag:function(A,B){this.proxy.reset();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)}});Ext.dd.DropTarget=function(B,A){this.el=Ext.get(B);Ext.apply(this,A);if(this.containerScroll)Ext.dd.ScrollManager.register(this.el);Ext.dd.DropTarget.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{isTarget:true})};
Ext.extend(Ext.dd.DropTarget,Ext.dd.DDTarget,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(A,C,B){if(this.overClass)this.el.addClass(this.overClass);return this.dropAllowed},notifyOver:function(A,C,B){return this.dropAllowed},notifyOut:function(A,C,B){if(this.overClass)this.el.removeClass(this.overClass)},notifyDrop:function(A,C,B){return false}});
Ext.dd.DragZone=function(B,A){Ext.dd.DragZone.superclass.constructor.call(this,B,A);if(this.containerScroll)Ext.dd.ScrollManager.register(this.el)};
Ext.extend(Ext.dd.DragZone,Ext.dd.DragSource,{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(){if(Ext.enableFx)Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9");this.dragging=false},getRepairXY:function(A){return Ext.Element.fly(this.dragData.ddel).getXY()}});
Ext.dd.DropZone=function(B,A){Ext.dd.DropZone.superclass.constructor.call(this,B,A)};
Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{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.data.SortTypes={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,""));if(isNaN(B))B=0;return B},asInt:function(A){var B=parseInt(String(A).replace(/,/g,
""));if(isNaN(B))B=0;return B}};Ext.data.Record=function(A,B){this.id=B||B===0?B:++Ext.data.Record.AUTO_ID;this.data=A};Ext.data.Record.create=function(E){var C=Ext.extend(Ext.data.Record,{});var D=C.prototype;D.fields=new Ext.util.MixedCollection(false,function(F){return F.name});for(var B=0,A=E.length;B<A;B++)D.fields.add(new Ext.data.Field(E[B]));C.getField=function(F){return D.fields.get(F)};return C};Ext.data.Record.AUTO_ID=1E3;Ext.data.Record.EDIT="edit";Ext.data.Record.REJECT="reject";
Ext.data.Record.COMMIT="commit";
Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,join:function(A){this.store=A},set:function(A,B){if(String(this.data[A])==String(B))return;this.dirty=true;if(!this.modified)this.modified={};if(typeof this.modified[A]=="undefined")this.modified[A]=this.data[A];this.data[A]=B;if(!this.editing&&this.store)this.store.afterEdit(this)},get:function(A){return this.data[A]},beginEdit:function(){this.editing=true;this.modified={}},cancelEdit:function(){this.editing=false;delete this.modified},
endEdit:function(){this.editing=false;if(this.dirty&&this.store)this.store.afterEdit(this)},reject:function(B){var A=this.modified;for(var C in A)if(typeof A[C]!="function")this.data[C]=A[C];this.dirty=false;delete this.modified;this.editing=false;if(this.store&&B!==true)this.store.afterReject(this)},commit:function(A){this.dirty=false;delete this.modified;this.editing=false;if(this.store&&A!==true)this.store.afterCommit(this)},getChanges:function(){var A=this.modified,B={};for(var C in A)if(A.hasOwnProperty(C))B[C]=
this.data[C];return B},hasError:function(){return this.error!=null},clearError:function(){this.error=null},copy:function(A){return new this.constructor(Ext.apply({},this.data),A||this.id)},isModified:function(A){return!!(this.modified&&this.modified.hasOwnProperty(A))}};
Ext.StoreMgr=Ext.apply(new Ext.util.MixedCollection,{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(A){return typeof A=="object"?A:this.get(A)},getKey:function(A){return A.storeId||A.id}});
Ext.data.Store=function(A){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(B){return B.id};this.baseParams={};this.paramNames={"start":"start","limit":"limit","sort":"sort","dir":"dir"};if(A&&A.data){this.inlineData=A.data;delete A.data}Ext.apply(this,A);if(this.url&&!this.proxy)this.proxy=new Ext.data.HttpProxy({url:this.url});if(this.reader){if(!this.recordType)this.recordType=this.reader.recordType;if(this.reader.onMetaChange)this.reader.onMetaChange=this.onMetaChange.createDelegate(this)}if(this.recordType)this.fields=
this.recordType.prototype.fields;this.modified=[];this.addEvents("datachanged","metachange","add","remove","update","clear","beforeload","load","loadexception");if(this.proxy)this.relayEvents(this.proxy,["loadexception"]);this.sortToggle={};if(this.sortInfo)this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);Ext.data.Store.superclass.constructor.call(this);if(this.storeId||this.id)Ext.StoreMgr.register(this);if(this.inlineData){this.loadData(this.inlineData);delete this.inlineData}else if(this.autoLoad)this.load.defer(10,
this,[typeof this.autoLoad=="object"?this.autoLoad:undefined])};
Ext.extend(Ext.data.Store,Ext.util.Observable,{remoteSort:false,pruneModifiedRecords:false,lastOptions:null,destroy:function(){if(this.id)Ext.StoreMgr.unregister(this);this.data=null;this.purgeListeners()},add:function(B){B=[].concat(B);if(B.length<1)return;for(var D=0,A=B.length;D<A;D++)B[D].join(this);var C=this.data.length;this.data.addAll(B);if(this.snapshot)this.snapshot.addAll(B);this.fireEvent("add",this,B,C)},addSorted:function(A){var B=this.findInsertIndex(A);this.insert(B,A)},remove:function(A){var B=
this.data.indexOf(A);this.data.removeAt(B);if(this.pruneModifiedRecords)this.modified.remove(A);if(this.snapshot)this.snapshot.remove(A);this.fireEvent("remove",this,A,B)},removeAll:function(){this.data.clear();if(this.snapshot)this.snapshot.clear();if(this.pruneModifiedRecords)this.modified=[];this.fireEvent("clear",this)},insert:function(C,B){B=[].concat(B);for(var D=0,A=B.length;D<A;D++){this.data.insert(C,B[D]);B[D].join(this)}this.fireEvent("add",this,B,C)},indexOf:function(A){return this.data.indexOf(A)},
indexOfId:function(A){return this.data.indexOfKey(A)},getById:function(A){return this.data.key(A)},getAt:function(A){return this.data.itemAt(A)},getRange:function(B,A){return this.data.getRange(B,A)},storeOptions:function(A){A=Ext.apply({},A);delete A.callback;delete A.scope;this.lastOptions=A},load:function(B){B=B||{};if(this.fireEvent("beforeload",this,B)!==false){this.storeOptions(B);var C=Ext.apply(B.params||{},this.baseParams);if(this.sortInfo&&this.remoteSort){var A=this.paramNames;C[A["sort"]]=
this.sortInfo.field;C[A["dir"]]=this.sortInfo.direction}this.proxy.load(C,this.reader,this.loadRecords,this,B);return true}else return false},reload:function(A){this.load(Ext.applyIf(A||{},this.lastOptions))},loadRecords:function(G,B,F){if(!G||F===false){if(F!==false)this.fireEvent("load",this,[],B);if(B.callback)B.callback.call(B.scope||this,[],B,false);return}var E=G.records,D=G.totalRecords||E.length;if(!B||B.add!==true){if(this.pruneModifiedRecords)this.modified=[];for(var C=0,A=E.length;C<A;C++)E[C].join(this);
if(this.snapshot){this.data=this.snapshot;delete this.snapshot}this.data.clear();this.data.addAll(E);this.totalLength=D;this.applySort();this.fireEvent("datachanged",this)}else{this.totalLength=Math.max(D,this.data.length+E.length);this.add(E)}this.fireEvent("load",this,E,B);if(B.callback)B.callback.call(B.scope||this,E,B,true)},loadData:function(C,A){var B=this.reader.readRecords(C);this.loadRecords(B,{add:A},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||
0},getSortState:function(){return this.sortInfo},applySort:function(){if(this.sortInfo&&!this.remoteSort){var A=this.sortInfo,B=A.field;this.sortData(B,A.direction)}},sortData:function(C,D){D=D||"ASC";var A=this.fields.get(C).sortType;var B=function(F,E){var H=A(F.data[C]),G=A(E.data[C]);return H>G?1:H<G?-1:0};this.data.sort(D,B);if(this.snapshot&&this.snapshot!=this.data)this.snapshot.sort(D,B)},setDefaultSort:function(B,A){A=A?A.toUpperCase():"ASC";this.sortInfo={field:B,direction:A};this.sortToggle[B]=
A},sort:function(E,C){var D=this.fields.get(E);if(!D)return false;if(!C)if(this.sortInfo&&this.sortInfo.field==D.name)C=(this.sortToggle[D.name]||"ASC").toggle("ASC","DESC");else C=D.sortDir;var B=this.sortToggle?this.sortToggle[D.name]:null;var A=this.sortInfo?this.sortInfo:null;this.sortToggle[D.name]=C;this.sortInfo={field:D.name,direction:C};if(!this.remoteSort){this.applySort();this.fireEvent("datachanged",this)}else if(!this.load(this.lastOptions)){if(B)this.sortToggle[D.name]=B;if(A)this.sortInfo=
A}},each:function(B,A){this.data.each(B,A)},getModifiedRecords:function(){return this.modified},createFilterFn:function(C,B,D,A){if(Ext.isEmpty(B,false))return false;B=this.data.createValueMatcher(B,D,A);return function(E){return B.test(E.data[C])}},sum:function(E,F,A){var C=this.data.items,B=0;F=F||0;A=A||A===0?A:C.length-1;for(var D=F;D<=A;D++)B+=C[D].data[E]||0;return B},filter:function(D,C,E,A){var B=this.createFilterFn(D,C,E,A);return B?this.filterBy(B):this.clearFilter()},filterBy:function(B,
A){this.snapshot=this.snapshot||this.data;this.data=this.queryBy(B,A||this);this.fireEvent("datachanged",this)},query:function(D,C,E,A){var B=this.createFilterFn(D,C,E,A);return B?this.queryBy(B):this.data.clone()},queryBy:function(B,A){var C=this.snapshot||this.data;return C.filterBy(B,A||this)},find:function(D,C,F,E,A){var B=this.createFilterFn(D,C,E,A);return B?this.data.findIndexBy(B,null,F):-1},findBy:function(B,A,C){return this.data.findIndexBy(B,A,C)},collect:function(G,H,B){var F=B===true&&
this.snapshot?this.snapshot.items:this.data.items;var I,J,A=[],C={};for(var D=0,E=F.length;D<E;D++){I=F[D].data[G];J=String(I);if((H||!Ext.isEmpty(I))&&!C[J]){C[J]=true;A[A.length]=I}}return A},clearFilter:function(A){if(this.isFiltered()){this.data=this.snapshot;delete this.snapshot;if(A!==true)this.fireEvent("datachanged",this)}},isFiltered:function(){return this.snapshot&&this.snapshot!=this.data},afterEdit:function(A){if(this.modified.indexOf(A)==-1)this.modified.push(A);this.fireEvent("update",
this,A,Ext.data.Record.EDIT)},afterReject:function(A){this.modified.remove(A);this.fireEvent("update",this,A,Ext.data.Record.REJECT)},afterCommit:function(A){this.modified.remove(A);this.fireEvent("update",this,A,Ext.data.Record.COMMIT)},commitChanges:function(){var B=this.modified.slice(0);this.modified=[];for(var C=0,A=B.length;C<A;C++)B[C].commit()},rejectChanges:function(){var B=this.modified.slice(0);this.modified=[];for(var C=0,A=B.length;C<A;C++)B[C].reject()},onMetaChange:function(B,A,C){this.recordType=
A;this.fields=A.prototype.fields;delete this.snapshot;this.sortInfo=B.sortInfo;this.modified=[];this.fireEvent("metachange",this,this.reader.meta)},findInsertIndex:function(A){this.suspendEvents();var C=this.data.clone();this.data.add(A);this.applySort();var B=this.data.indexOf(A);this.data=C;this.resumeEvents();return B}});Ext.data.SimpleStore=function(A){Ext.data.SimpleStore.superclass.constructor.call(this,Ext.apply(A,{reader:new Ext.data.ArrayReader({id:A.id},Ext.data.Record.create(A.fields))}))};
Ext.extend(Ext.data.SimpleStore,Ext.data.Store,{loadData:function(E,B){if(this.expandData===true){var D=[];for(var C=0,A=E.length;C<A;C++)D[D.length]=[E[C]];E=D}Ext.data.SimpleStore.superclass.loadData.call(this,E,B)}});Ext.data.JsonStore=function(A){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(A,{proxy:A.proxy||(!A.data?new Ext.data.HttpProxy({url:A.url}):undefined),reader:new Ext.data.JsonReader(A,A.fields)}))};Ext.extend(Ext.data.JsonStore,Ext.data.Store);
Ext.data.Field=function(D){if(typeof D=="string")D={name:D};Ext.apply(this,D);if(!this.type)this.type="auto";var C=Ext.data.SortTypes;if(typeof this.sortType=="string")this.sortType=C[this.sortType];if(!this.sortType)switch(this.type){case "string":this.sortType=C.asUCString;break;case "date":this.sortType=C.asDate;break;default:this.sortType=C.none}var E=/[\$,%]/g;if(!this.convert){var B,A=this.dateFormat;switch(this.type){case "":case "auto":case undefined:B=function(F){return F};break;case "string":B=
function(F){return F===undefined||F===null?"":String(F)};break;case "int":B=function(F){return F!==undefined&&F!==null&&F!==""?parseInt(String(F).replace(E,""),10):""};break;case "float":B=function(F){return F!==undefined&&F!==null&&F!==""?parseFloat(String(F).replace(E,""),10):""};break;case "bool":case "boolean":B=function(F){return F===true||F==="true"||F==1};break;case "date":B=function(G){if(!G)return"";if(Ext.isDate(G))return G;if(A){if(A=="timestamp")return new Date(G*1E3);if(A=="time")return new Date(parseInt(G,
10));return Date.parseDate(G,A)}var F=Date.parse(G);return F?new Date(F):null};break}this.convert=B}};Ext.data.Field.prototype={dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC"};Ext.data.DataReader=function(A,B){this.meta=A;this.recordType=Ext.isArray(B)?Ext.data.Record.create(B):B};Ext.data.DataReader.prototype={};Ext.data.DataProxy=function(){this.addEvents("beforeload","load");Ext.data.DataProxy.superclass.constructor.call(this)};Ext.extend(Ext.data.DataProxy,Ext.util.Observable);
Ext.data.MemoryProxy=function(A){Ext.data.MemoryProxy.superclass.constructor.call(this);this.data=A};Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{load:function(F,C,G,D,B){F=F||{};var A;try{A=C.readRecords(this.data)}catch(E){this.fireEvent("loadexception",this,B,null,E);G.call(D,null,B,false);return}G.call(D,A,B,true)},update:function(B,A){}});Ext.data.HttpProxy=function(A){Ext.data.HttpProxy.superclass.constructor.call(this);this.conn=A;this.useAjax=!A||!A.events};
Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.useAjax?Ext.Ajax:this.conn},load:function(E,B,F,C,A){if(this.fireEvent("beforeload",this,E)!==false){var D={params:E||{},request:{callback:F,scope:C,arg:A},reader:B,callback:this.loadResponse,scope:this};if(this.useAjax){Ext.applyIf(D,this.conn);if(this.activeRequest)Ext.Ajax.abort(this.activeRequest);this.activeRequest=Ext.Ajax.request(D)}else this.conn.request(D)}else F.call(C||this,null,A,false)},loadResponse:function(E,
D,B){delete this.activeRequest;if(!D){this.fireEvent("loadexception",this,E,B);E.request.callback.call(E.request.scope,null,E.request.arg,false);return}var A;try{A=E.reader.read(B)}catch(C){this.fireEvent("loadexception",this,E,B,C);E.request.callback.call(E.request.scope,null,E.request.arg,false);return}this.fireEvent("load",this,E,E.request.arg);E.request.callback.call(E.request.scope,A,E.request.arg,true)},update:function(A){},updateResponse:function(A){}});
Ext.data.ScriptTagProxy=function(A){Ext.data.ScriptTagProxy.superclass.constructor.call(this);Ext.apply(this,A);this.head=document.getElementsByTagName("head")[0]};Ext.data.ScriptTagProxy.TRANS_ID=1E3;
Ext.extend(Ext.data.ScriptTagProxy,Ext.data.DataProxy,{timeout:3E4,callbackParam:"callback",nocache:true,load:function(E,F,H,I,J){if(this.fireEvent("beforeload",this,E)!==false){var C=Ext.urlEncode(Ext.apply(E,this.extraParams));var B=this.url;B+=(B.indexOf("?")!=-1?"&":"?")+C;if(this.nocache)B+="&_dc="+(new Date).getTime();var A=++Ext.data.ScriptTagProxy.TRANS_ID;var K={id:A,cb:"stcCallback"+A,scriptId:"stcScript"+A,params:E,arg:J,url:B,callback:H,scope:I,reader:F};var D=this;window[K.cb]=function(L){D.handleResponse(L,
K)};B+=String.format("&{0}={1}",this.callbackParam,K.cb);if(this.autoAbort!==false)this.abort();K.timeoutId=this.handleFailure.defer(this.timeout,this,[K]);var G=document.createElement("script");G.setAttribute("src",B);G.setAttribute("type","text/javascript");G.setAttribute("id",K.scriptId);this.head.appendChild(G);this.trans=K}else H.call(I||this,null,J,false)},isLoading:function(){return this.trans?true:false},abort:function(){if(this.isLoading())this.destroyTrans(this.trans)},destroyTrans:function(B,
A){this.head.removeChild(document.getElementById(B.scriptId));clearTimeout(B.timeoutId);if(A){window[B.cb]=undefined;try{delete window[B.cb]}catch(C){}}else window[B.cb]=function(){window[B.cb]=undefined;try{delete window[B.cb]}catch(D){}}},handleResponse:function(D,B){this.trans=false;this.destroyTrans(B,true);var A;try{A=B.reader.readRecords(D)}catch(C){this.fireEvent("loadexception",this,D,B.arg,C);B.callback.call(B.scope||window,null,B.arg,false);return}this.fireEvent("load",this,D,B.arg);B.callback.call(B.scope||
window,A,B.arg,true)},handleFailure:function(A){this.trans=false;this.destroyTrans(A,false);this.fireEvent("loadexception",this,null,A.arg);A.callback.call(A.scope||window,null,A.arg,false)}});Ext.data.JsonReader=function(A,B){A=A||{};Ext.data.JsonReader.superclass.constructor.call(this,A,B||A.fields)};
Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(response){var json=response.responseText;var o=eval("("+json+")");if(!o)throw{message:"JsonReader.read: Json object not found"};return this.readRecords(o)},onMetaChange:function(A,C,B){},simpleAccess:function(B,A){return B[A]},getJsonAccessor:function(){var A=/[\[\.]/;return function(C){try{return A.test(C)?new Function("obj","return obj."+C):function(D){return D[C]}}catch(B){}return Ext.emptyFn}}(),readRecords:function(K){this.jsonData=
K;if(K.metaData){delete this.ef;this.meta=K.metaData;this.recordType=Ext.data.Record.create(K.metaData.fields);this.onMetaChange(this.meta,this.recordType,K)}var H=this.meta,A=this.recordType,R=A.prototype.fields,F=R.items,E=R.length;if(!this.ef){if(H.totalProperty)this.getTotal=this.getJsonAccessor(H.totalProperty);if(H.successProperty)this.getSuccess=this.getJsonAccessor(H.successProperty);this.getRoot=H.root?this.getJsonAccessor(H.root):function(U){return U};if(H.id){var Q=this.getJsonAccessor(H.id);
this.getId=function(V){var U=Q(V);return U===undefined||U===""?null:U}}else this.getId=function(){return null};this.ef=[];for(var O=0;O<E;O++){R=F[O];var T=R.mapping!==undefined&&R.mapping!==null?R.mapping:R.name;this.ef[O]=this.getJsonAccessor(T)}}var M=this.getRoot(K),S=M.length,I=S,D=true;if(H.totalProperty){var G=parseInt(this.getTotal(K),10);if(!isNaN(G))I=G}if(H.successProperty){var G=this.getSuccess(K);if(G===false||G==="false")D=false}var P=[];for(var O=0;O<S;O++){var L=M[O];var B={};var J=
this.getId(L);for(var N=0;N<E;N++){R=F[N];var G=this.ef[N](L);B[R.name]=R.convert(G!==undefined?G:R.defaultValue,L)}var C=new A(B,J);C.json=L;P[O]=C}return{success:D,records:P,totalRecords:I}}});Ext.data.XmlReader=function(A,B){A=A||{};Ext.data.XmlReader.superclass.constructor.call(this,A,B||A.fields)};
Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(A){var B=A.responseXML;if(!B)throw{message:"XmlReader.read: XML Document not available"};return this.readRecords(B)},readRecords:function(T){this.xmlData=T;var N=T.documentElement||T;var I=Ext.DomQuery;var B=this.recordType,L=B.prototype.fields;var D=this.meta.id;var G=0,E=true;if(this.meta.totalRecords)G=I.selectNumber(this.meta.totalRecords,N,0);if(this.meta.success){var K=I.selectValue(this.meta.success,N,true);E=K!==false&&K!=="false"}var Q=
[];var U=I.select(this.meta.record,N);for(var P=0,R=U.length;P<R;P++){var M=U[P];var A={};var J=D?I.selectValue(D,M):undefined;for(var O=0,H=L.length;O<H;O++){var S=L.items[O];var F=I.selectValue(S.mapping||S.name,M,S.defaultValue);F=S.convert(F,M);A[S.name]=F}var C=new B(A,J);C.node=M;Q[Q.length]=C}return{success:E,records:Q,totalRecords:G||Q.length}}});
Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(C){var B=this.meta?this.meta.id:null;var G=this.recordType,K=G.prototype.fields;var E=[];var M=C;for(var I=0;I<M.length;I++){var D=M[I];var O={};var A=(B||B===0)&&D[B]!==undefined&&D[B]!==""?D[B]:null;for(var H=0,P=K.length;H<P;H++){var L=K.items[H];var F=L.mapping!==undefined&&L.mapping!==null?L.mapping:H;var N=D[F]!==undefined?D[F]:L.defaultValue;N=L.convert(N,D);O[L.name]=N}var J=new G(O,A);J.json=D;E[E.length]=J}return{records:E,
totalRecords:E.length}}});Ext.data.Tree=function(A){this.nodeHash={};this.root=null;if(A)this.setRootNode(A);this.addEvents("append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert");Ext.data.Tree.superclass.constructor.call(this)};
Ext.extend(Ext.data.Tree,Ext.util.Observable,{pathSeparator:"/",proxyNodeEvent:function(){return this.fireEvent.apply(this,arguments)},getRootNode:function(){return this.root},setRootNode:function(A){this.root=A;A.ownerTree=this;A.isRoot=true;this.registerNode(A);return A},getNodeById:function(A){return this.nodeHash[A]},registerNode:function(A){this.nodeHash[A.id]=A},unregisterNode:function(A){delete this.nodeHash[A.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"}});
Ext.data.Node=function(A){this.attributes=A||{};this.leaf=this.attributes.leaf;this.id=this.attributes.id;if(!this.id){this.id=Ext.id(null,"ynode-");this.attributes.id=this.id}this.childNodes=[];if(!this.childNodes.indexOf)this.childNodes.indexOf=function(D){for(var C=0,B=this.length;C<B;C++)if(this[C]==D)return C;return-1};this.parentNode=null;this.firstChild=null;this.lastChild=null;this.previousSibling=null;this.nextSibling=null;this.addEvents({"append":true,"remove":true,"move":true,"insert":true,
"beforeappend":true,"beforeremove":true,"beforemove":true,"beforeinsert":true});this.listeners=this.attributes.listeners;Ext.data.Node.superclass.constructor.call(this)};
Ext.extend(Ext.data.Node,Ext.util.Observable,{fireEvent:function(B){if(Ext.data.Node.superclass.fireEvent.apply(this,arguments)===false)return false;var A=this.getOwnerTree();if(A)if(A.proxyNodeEvent.apply(A,arguments)===false)return false;return true},isLeaf:function(){return this.leaf===true},setFirstChild:function(A){this.firstChild=A},setLastChild:function(A){this.lastChild=A},isLast:function(){return!this.parentNode?true:this.parentNode.lastChild==this},isFirst:function(){return!this.parentNode?
true:this.parentNode.firstChild==this},hasChildNodes:function(){return!this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(E){var F=false;if(Ext.isArray(E))F=E;else if(arguments.length>1)F=arguments;if(F)for(var D=0,A=F.length;D<A;D++)this.appendChild(F[D]);else{if(this.fireEvent("beforeappend",this.ownerTree,this,E)===false)return false;var B=this.childNodes.length;var C=E.parentNode;if(C){if(E.fireEvent("beforemove",
E.getOwnerTree(),E,C,this,B)===false)return false;C.removeChild(E)}B=this.childNodes.length;if(B==0)this.setFirstChild(E);this.childNodes.push(E);E.parentNode=this;var G=this.childNodes[B-1];if(G){E.previousSibling=G;G.nextSibling=E}else E.previousSibling=null;E.nextSibling=null;this.setLastChild(E);E.setOwnerTree(this.getOwnerTree());this.fireEvent("append",this.ownerTree,this,E,B);if(C)E.fireEvent("move",this.ownerTree,E,C,this,B);return E}},removeChild:function(B){var A=this.childNodes.indexOf(B);
if(A==-1)return false;if(this.fireEvent("beforeremove",this.ownerTree,this,B)===false)return false;this.childNodes.splice(A,1);if(B.previousSibling)B.previousSibling.nextSibling=B.nextSibling;if(B.nextSibling)B.nextSibling.previousSibling=B.previousSibling;if(this.firstChild==B)this.setFirstChild(B.nextSibling);if(this.lastChild==B)this.setLastChild(B.previousSibling);B.setOwnerTree(null);B.parentNode=null;B.previousSibling=null;B.nextSibling=null;this.fireEvent("remove",this.ownerTree,this,B);return B},
insertBefore:function(D,A){if(!A)return this.appendChild(D);if(D==A)return false;if(this.fireEvent("beforeinsert",this.ownerTree,this,D,A)===false)return false;var B=this.childNodes.indexOf(A);var C=D.parentNode;var E=B;if(C==this&&this.childNodes.indexOf(D)<B)E--;if(C){if(D.fireEvent("beforemove",D.getOwnerTree(),D,C,this,B,A)===false)return false;C.removeChild(D)}if(E==0)this.setFirstChild(D);this.childNodes.splice(E,0,D);D.parentNode=this;var F=this.childNodes[E-1];if(F){D.previousSibling=F;F.nextSibling=
D}else D.previousSibling=null;D.nextSibling=A;A.previousSibling=D;D.setOwnerTree(this.getOwnerTree());this.fireEvent("insert",this.ownerTree,this,D,A);if(C)D.fireEvent("move",this.ownerTree,D,C,this,E,A);return D},remove:function(){this.parentNode.removeChild(this);return this},item:function(A){return this.childNodes[A]},replaceChild:function(A,B){this.insertBefore(A,B);this.removeChild(B);return B},indexOf:function(A){return this.childNodes.indexOf(A)},getOwnerTree:function(){if(!this.ownerTree){var A=
this;while(A){if(A.ownerTree){this.ownerTree=A.ownerTree;break}A=A.parentNode}}return this.ownerTree},getDepth:function(){var B=0;var A=this;while(A.parentNode){++B;A=A.parentNode}return B},setOwnerTree:function(B){if(B!=this.ownerTree){if(this.ownerTree)this.ownerTree.unregisterNode(this);this.ownerTree=B;var D=this.childNodes;for(var C=0,A=D.length;C<A;C++)D[C].setOwnerTree(B);if(B)B.registerNode(this)}},getPath:function(B){B=B||"id";var D=this.parentNode;var A=[this.attributes[B]];while(D){A.unshift(D.attributes[B]);
D=D.parentNode}var C=this.getOwnerTree().pathSeparator;return C+A.join(C)},bubble:function(C,B,A){var D=this;while(D){if(C.apply(B||D,A||[D])===false)break;D=D.parentNode}},cascade:function(F,E,B){if(F.apply(E||this,B||[this])!==false){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++)D[C].cascade(F,E,B)}},eachChild:function(F,E,B){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++)if(F.apply(E||this,B||[D[C]])===false)break},findChild:function(D,E){var C=this.childNodes;for(var B=0,A=C.length;B<
A;B++)if(C[B].attributes[D]==E)return C[B];return null},findChildBy:function(E,D){var C=this.childNodes;for(var B=0,A=C.length;B<A;B++)if(E.call(D||C[B],C[B])===true)return C[B];return null},sort:function(E,D){var C=this.childNodes;var A=C.length;if(A>0){var F=D?function(){E.apply(D,arguments)}:E;C.sort(F);for(var B=0;B<A;B++){var G=C[B];G.previousSibling=C[B-1];G.nextSibling=C[B+1];if(B==0)this.setFirstChild(G);if(B==A-1)this.setLastChild(G)}}},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},toString:function(){return"[Node"+(this.id?" "+this.id:"")+"]"}});
Ext.data.GroupingStore=Ext.extend(Ext.data.Store,{remoteGroup:false,groupOnSort:false,clearGrouping:function(){this.groupField=false;if(this.remoteGroup){if(this.baseParams)delete this.baseParams.groupBy;this.reload()}else{this.applySort();this.fireEvent("datachanged",this)}},groupBy:function(C,B){if(this.groupField==C&&!B)return;this.groupField=C;if(this.remoteGroup){if(!this.baseParams)this.baseParams={};this.baseParams["groupBy"]=C}if(this.groupOnSort){this.sort(C);return}if(this.remoteGroup)this.reload();
else{var A=this.sortInfo||{};if(A.field!=C)this.applySort();else this.sortData(C);this.fireEvent("datachanged",this)}},applySort:function(){Ext.data.GroupingStore.superclass.applySort.call(this);if(!this.groupOnSort&&!this.remoteGroup){var A=this.getGroupState();if(A&&A!=this.sortInfo.field)this.sortData(this.groupField)}},applyGrouping:function(A){if(this.groupField!==false){this.groupBy(this.groupField,true);return true}else{if(A===true)this.fireEvent("datachanged",this);return false}},getGroupState:function(){return this.groupOnSort&&
this.groupField!==false?this.sortInfo?this.sortInfo.field:undefined:this.groupField}});Ext.ComponentMgr=function(){var B=new Ext.util.MixedCollection;var A={};return{register:function(C){B.add(C)},unregister:function(C){B.remove(C)},get:function(C){return B.get(C)},onAvailable:function(E,D,C){B.on("add",function(F,G){if(G.id==E){D.call(C||G,G);B.un("add",D,C)}})},all:B,registerType:function(D,C){A[D]=C;C.xtype=D},create:function(C,D){return new A[C.xtype||D](C)}}}();Ext.reg=Ext.ComponentMgr.registerType;
Ext.Component=function(B){B=B||{};if(B.initialConfig){if(B.isAction)this.baseAction=B;B=B.initialConfig}else if(B.tagName||B.dom||typeof B=="string")B={applyTo:B,id:B.id||B};this.initialConfig=B;Ext.apply(this,B);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);if(this.baseAction)this.baseAction.addComponent(this);
this.initComponent();if(this.plugins)if(Ext.isArray(this.plugins))for(var C=0,A=this.plugins.length;C<A;C++)this.plugins[C]=this.initPlugin(this.plugins[C]);else this.plugins=this.initPlugin(this.plugins);if(this.stateful!==false)this.initState(B);if(this.applyTo){this.applyToMarkup(this.applyTo);delete this.applyTo}else if(this.renderTo){this.render(this.renderTo);delete this.renderTo}};Ext.Component.AUTO_ID=1E3;
Ext.extend(Ext.Component,Ext.util.Observable,{disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,hidden:false,disabled:false,rendered:false,ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]},initPlugin:function(A){A.init(this);return A},initComponent:Ext.emptyFn,render:function(B,A){if(!this.rendered&&this.fireEvent("beforerender",this)!==false){if(!B&&this.el){this.el=Ext.get(this.el);B=this.el.dom.parentNode;
this.allowDomMove=false}this.container=Ext.get(B);if(this.ctCls)this.container.addClass(this.ctCls);this.rendered=true;if(A!==undefined)if(typeof A=="number")A=this.container.dom.childNodes[A];else A=Ext.getDom(A);this.onRender(this.container,A||null);if(this.autoShow)this.el.removeClass(["x-hidden","x-hide-"+this.hideMode]);if(this.cls){this.el.addClass(this.cls);delete this.cls}if(this.style){this.el.applyStyles(this.style);delete this.style}this.fireEvent("render",this);this.afterRender(this.container);
if(this.hidden)this.hide();if(this.disabled)this.disable();if(this.stateful!==false)this.initStateEvents()}return this},initState:function(A){if(Ext.state.Manager){var B=Ext.state.Manager.get(this.stateId||this.id);if(B)if(this.fireEvent("beforestaterestore",this,B)!==false){this.applyState(B);this.fireEvent("staterestore",this,B)}}},initStateEvents:function(){if(this.stateEvents)for(var A=0,B;B=this.stateEvents[A];A++)this.on(B,this.saveState,this,{delay:100})},applyState:function(B,A){if(B)Ext.apply(this,
B)},getState:function(){return null},saveState:function(){if(Ext.state.Manager){var A=this.getState();if(this.fireEvent("beforestatesave",this,A)!==false){Ext.state.Manager.set(this.stateId||this.id,A);this.fireEvent("statesave",this,A)}}},applyToMarkup:function(A){this.allowDomMove=false;this.el=Ext.get(A);this.render(this.el.dom.parentNode)},addClass:function(A){if(this.el)this.el.addClass(A);else this.cls=this.cls?this.cls+" "+A:A},removeClass:function(A){if(this.el)this.el.removeClass(A);else if(this.cls)this.cls=
this.cls.split(" ").remove(A).join(" ")},onRender:function(B,A){if(this.autoEl){if(typeof this.autoEl=="string")this.el=document.createElement(this.autoEl);else{var C=document.createElement("div");Ext.DomHelper.overwrite(C,this.autoEl);this.el=C.firstChild}if(!this.el.id)this.el.id=this.getId()}if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false)B.dom.insertBefore(this.el.dom,A);if(this.overCls)this.el.addClassOnOver(this.overCls)}},getAutoCreate:function(){var A=typeof this.autoCreate==
"object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!A.id)A.id=this.id;return A},afterRender:Ext.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container")this.container.remove()}this.onDestroy();Ext.ComponentMgr.unregister(this);this.fireEvent("destroy",this);this.purgeListeners()}},beforeDestroy:Ext.emptyFn,onDestroy:Ext.emptyFn,getEl:function(){return this.el},
getId:function(){return this.id||(this.id="ext-comp-"+ ++Ext.Component.AUTO_ID)},getItemId:function(){return this.itemId||this.getId()},focus:function(B,A){if(A){this.focus.defer(typeof A=="number"?A:10,this,[B,false]);return}if(this.rendered){this.el.focus();if(B===true)this.el.dom.select()}return this},blur:function(){if(this.rendered)this.el.blur();return this},disable:function(){if(this.rendered)this.onDisable();this.disabled=true;this.fireEvent("disable",this);return this},onDisable:function(){this.getActionEl().addClass(this.disabledClass);
this.el.dom.disabled=true},enable:function(){if(this.rendered)this.onEnable();this.disabled=false;this.fireEvent("enable",this);return this},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false},setDisabled:function(A){this[A?"disable":"enable"]()},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.autoRender)this.render(typeof this.autoRender=="boolean"?Ext.getBody():this.autoRender);if(this.rendered)this.onShow();
this.fireEvent("show",this)}return this},onShow:function(){if(this.hideParent)this.container.removeClass("x-hide-"+this.hideMode);else this.getActionEl().removeClass("x-hide-"+this.hideMode)},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered)this.onHide();this.fireEvent("hide",this)}return this},onHide:function(){if(this.hideParent)this.container.addClass("x-hide-"+this.hideMode);else this.getActionEl().addClass("x-hide-"+this.hideMode)},setVisible:function(A){if(A)this.show();
else this.hide();return this},isVisible:function(){return this.rendered&&this.getActionEl().isVisible()},cloneConfig:function(B){B=B||{};var C=B.id||Ext.id();var A=Ext.applyIf(B,this.initialConfig);A.id=C;return new this.constructor(A)},getXType:function(){return this.constructor.xtype},isXType:function(B,A){return!A?("/"+this.getXTypes()+"/").indexOf("/"+B+"/")!=-1:this.constructor.xtype==B},getXTypes:function(){var A=this.constructor;if(!A.xtypes){var C=[],B=this;while(B&&B.constructor.xtype){C.unshift(B.constructor.xtype);
B=B.constructor.superclass}A.xtypeChain=C;A.xtypes=C.join("/")}return A.xtypes},findParentBy:function(A){for(var B=this.ownerCt;B!=null&&!A(B,this);B=B.ownerCt);return B||null},findParentByType:function(A){return typeof A=="function"?this.findParentBy(function(B){return B.constructor===A}):this.findParentBy(function(B){return B.constructor.xtype===A})},mon:function(E,B,D,C,A){if(!this.mons){this.mons=[];this.on("beforedestroy",function(){for(var H=0,G=this.mons.length;H<G;H++){var F=this.mons[H];
F.item.un(F.ename,F.fn,F.scope)}},this)}this.mons.push({item:E,ename:B,fn:D,scope:C});E.on(B,D,C,A)}});Ext.reg("component",Ext.Component);Ext.Action=function(A){this.initialConfig=A;this.items=[]};
Ext.Action.prototype={isAction:true,setText:function(A){this.initialConfig.text=A;this.callEach("setText",[A])},getText:function(){return this.initialConfig.text},setIconClass:function(A){this.initialConfig.iconCls=A;this.callEach("setIconClass",[A])},getIconClass: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,B){var D=this.items;for(var C=0,A=D.length;C<A;C++)D[C][E].apply(D[C],B)},addComponent:function(A){this.items.push(A);
A.on("destroy",this.removeComponent,this)},removeComponent:function(A){this.items.remove(A)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments)}};
(function(){Ext.Layer=function(D,C){D=D||{};var E=Ext.DomHelper;var G=D.parentEl,F=G?Ext.getDom(G):document.body;if(C)this.dom=Ext.getDom(C);if(!this.dom){var H=D.dh||{tag:"div",cls:"x-layer"};this.dom=E.append(F,H)}if(D.cls)this.addClass(D.cls);this.constrain=D.constrain!==false;this.visibilityMode=Ext.Element.VISIBILITY;if(D.id)this.id=this.dom.id=D.id;else this.id=Ext.id(this.dom);this.zindex=D.zindex||this.getZIndex();this.position("absolute",this.zindex);if(D.shadow){this.shadowOffset=D.shadowOffset||
4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:D.shadow})}else this.shadowOffset=0;this.useShim=D.shim!==false&&Ext.useShims;this.useDisplay=D.useDisplay;this.hide()};var A=Ext.Element.prototype;var B=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt(this.getStyle("z-index"),10)||11E3},getShim:function(){if(!this.useShim)return null;if(this.shim)return this.shim;var D=B.shift();if(!D){D=this.createShim();D.enableDisplayMode("block");D.dom.style.display=
"none";D.dom.style.visibility="visible"}var C=this.dom.parentNode;if(D.dom.parentNode!=C)C.insertBefore(D.dom,this.dom);D.setStyle("z-index",this.getZIndex()-2);this.shim=D;return D},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);B.push(this.shim);delete this.shim}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;this.shadowOffset=0}},enableShadow:function(C){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=
this.lastShadowOffset;delete this.lastShadowOffset;if(C)this.sync(true)}},sync:function(C){var I=this.shadow;if(!this.updating&&this.isVisible()&&(I||this.useShim)){var F=this.getShim();var H=this.getWidth(),E=this.getHeight();var D=this.getLeft(true),J=this.getTop(true);if(I&&!this.shadowDisabled){if(C&&!I.isVisible())I.show(this);else I.realign(D,J,H,E);if(F){if(C)F.show();var G=I.adjusts,K=F.dom.style;K.left=Math.min(D,D+G.l)+"px";K.top=Math.min(J,J+G.t)+"px";K.width=H+G.w+"px";K.height=E+G.h+
"px"}}else if(F){if(C)F.show();F.setSize(H,E);F.setLeftTop(D,J)}}},destroy:function(){this.hideShim();if(this.shadow)this.shadow.hide();this.removeAllListeners();Ext.removeNode(this.dom);Ext.Element.uncache(this.id)},remove:function(){this.destroy()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(C){if(this.shadow)this.shadow.hide();this.hideShim()},constrainXY:function(){if(this.constrain){var G=Ext.lib.Dom.getViewWidth(),
C=Ext.lib.Dom.getViewHeight();var L=Ext.getDoc().getScroll();var K=this.getXY();var H=K[0],F=K[1];var I=this.dom.offsetWidth+this.shadowOffset,D=this.dom.offsetHeight+this.shadowOffset;var E=false;if(H+I>G+L.left){H=G-I-this.shadowOffset;E=true}if(F+D>C+L.top){F=C-D-this.shadowOffset;E=true}if(H<L.left){H=L.left;E=true}if(F<L.top){F=L.top;E=true}if(E){if(this.avoidY){var J=this.avoidY;if(F<=J&&F+D>=J)F=J-D-5}K=[H,F];this.storeXY(K);A.setXY.call(this,K);this.sync()}}},isVisible:function(){return this.visible},
showAction:function(){this.visible=true;if(this.useDisplay===true)this.setDisplayed("");else if(this.lastXY)A.setXY.call(this,this.lastXY);else if(this.lastLT)A.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])},hideAction:function(){this.visible=false;if(this.useDisplay===true)this.setDisplayed(false);else this.setLeftTop(-1E4,-1E4)},setVisible:function(E,D,G,H,F){if(E)this.showAction();if(D&&E){var C=function(){this.sync(true);if(H)H()}.createDelegate(this);A.setVisible.call(this,true,true,G,
C,F)}else{if(!E)this.hideUnders(true);var C=H;if(D)C=function(){this.hideAction();if(H)H()}.createDelegate(this);A.setVisible.call(this,E,D,G,C,F);if(E)this.sync(true);else if(!D)this.hideAction()}},storeXY:function(C){delete this.lastLT;this.lastXY=C},storeLeftTop:function(D,C){delete this.lastXY;this.lastLT=[D,C]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},
beforeAction:function(){if(!this.updating&&this.shadow)this.shadow.hide()},setLeft:function(C){this.storeLeftTop(C,this.getTop(true));A.setLeft.apply(this,arguments);this.sync()},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);A.setTop.apply(this,arguments);this.sync()},setLeftTop:function(D,C){this.storeLeftTop(D,C);A.setLeftTop.apply(this,arguments);this.sync()},setXY:function(F,D,G,H,E){this.fixDisplay();this.beforeAction();this.storeXY(F);var C=this.createCB(H);A.setXY.call(this,F,
D,G,C,E);if(!D)C()},createCB:function(D){var C=this;return function(){C.constrainXY();C.sync(true);if(D)D()}},setX:function(C,D,F,G,E){this.setXY([C,this.getY()],D,F,G,E)},setY:function(G,C,E,F,D){this.setXY([this.getX(),G],C,E,F,D)},setSize:function(E,F,D,H,I,G){this.beforeAction();var C=this.createCB(I);A.setSize.call(this,E,F,D,H,C,G);if(!D)C()},setWidth:function(E,D,G,H,F){this.beforeAction();var C=this.createCB(H);A.setWidth.call(this,E,D,G,C,F);if(!D)C()},setHeight:function(E,D,G,H,F){this.beforeAction();
var C=this.createCB(H);A.setHeight.call(this,E,D,G,C,F);if(!D)C()},setBounds:function(J,H,K,D,I,F,G,E){this.beforeAction();var C=this.createCB(G);if(!I){this.storeXY([J,H]);A.setXY.call(this,[J,H]);A.setSize.call(this,K,D,I,F,C,E);C()}else A.setBounds.call(this,J,H,K,D,I,F,C,E);return this},setZIndex:function(C){this.zindex=C;this.setStyle("z-index",C+2);if(this.shadow)this.shadow.setZIndex(C+1);if(this.shim)this.shim.setStyle("z-index",C)}})})();
Ext.Shadow=function(C){Ext.apply(this,C);if(typeof this.mode!="string")this.mode=this.defaultMode;var D=this.offset,B={h:0};var A=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case "drop":B.w=0;B.l=B.t=D;B.t-=1;if(Ext.isIE){B.l-=this.offset+A;B.t-=this.offset+A;B.w-=A;B.h-=A;B.t+=1}break;case "sides":B.w=D*2;B.l=-D;B.t=D-1;if(Ext.isIE){B.l-=this.offset-A;B.t-=this.offset+A;B.l+=1;B.w-=(this.offset-A)*2;B.w-=A+1;B.h-=1}break;case "frame":B.w=B.h=D*2;B.l=B.t=-D;B.t+=1;B.h-=2;if(Ext.isIE){B.l-=
this.offset-A;B.t-=this.offset-A;B.l+=1;B.w-=this.offset+A+1;B.h-=this.offset+A;B.h+=1}break}this.adjusts=B};
Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(A){A=Ext.get(A);if(!this.el){try{this.el=Ext.Shadow.Pool.pull()}catch(e){return}if(this.el.dom.nextSibling!=A.dom)this.el.insertBefore(A)}this.el.setStyle("z-index",this.zIndex||parseInt(A.getStyle("z-index"),10)-1);if(Ext.isIE)this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+this.offset+")";this.realign(A.getLeft(true),A.getTop(true),A.getWidth(),A.getHeight());
this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(A,M,L,D){if(!this.el)return;var I=this.adjusts,G=this.el.dom,N=G.style;var E=0;N.left=A+I.l+"px";N.top=M+I.t+"px";var K=L+I.w,C=D+I.h,F=K+"px",J=C+"px";if(N.width!=F||N.height!=J){N.width=F;N.height=J;if(!Ext.isIE){var H=G.childNodes;var B=Math.max(0,K-12)+"px";H[0].childNodes[1].style.width=B;H[1].childNodes[1].style.width=B;H[2].childNodes[1].style.width=B;H[1].style.height=Math.max(0,C-12)+"px"}}},
hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(A){this.zIndex=A;if(this.el)this.el.setStyle("z-index",A)}};
Ext.Shadow.Pool=function(){var B=[];var A=Ext.isIE?'<div class="x-ie-shadow"></div>':'<div class="x-shadow"><div class="xst"><div class="xstl"></div><div class="xstc"></div><div class="xstr"></div></div><div class="xsc"><div class="xsml"></div><div class="xsmc"></div><div class="xsmr"></div></div><div class="xsb"><div class="xsbl"></div><div class="xsbc"></div><div class="xsbr"></div></div></div>';return{pull:function(){var C=B.shift();if(!C){C=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,
A));C.autoBoxAdjust=false}return C},push:function(C){B.push(C)}}}();
Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(B,D){if(typeof B=="object"){D=B.height;B=B.width}if(!this.boxReady){this.width=B;this.height=D;return this}if(this.lastSize&&this.lastSize.width==B&&this.lastSize.height==D)return this;this.lastSize={width:B,height:D};var C=this.adjustSize(B,D);var F=C.width,A=C.height;if(F!==undefined||A!==undefined){var E=
this.getResizeEl();if(!this.deferHeight&&F!==undefined&&A!==undefined)E.setSize(F,A);else if(!this.deferHeight&&A!==undefined)E.setHeight(A);else if(F!==undefined)E.setWidth(F);this.onResize(F,A,B,D);this.fireEvent("resize",this,F,A,B,D)}return this},setWidth:function(A){return this.setSize(A)},setHeight:function(A){return this.setSize(undefined,A)},getSize:function(){return this.el.getSize()},getPosition:function(A){if(A===true)return[this.el.getLeft(true),this.el.getTop(true)];return this.xy||this.el.getXY()},
getBox:function(A){var B=this.el.getSize();if(A===true){B.x=this.el.getLeft(true);B.y=this.el.getTop(true)}else{var C=this.xy||this.el.getXY();B.x=C[0];B.y=C[1]}return B},updateBox:function(A){this.setSize(A.width,A.height);this.setPagePosition(A.x,A.y);return this},getResizeEl:function(){return this.resizeEl||this.el},getPositionEl:function(){return this.positionEl||this.el},setPosition:function(A,F){if(A&&typeof A[1]=="number"){F=A[1];A=A[0]}this.x=A;this.y=F;if(!this.boxReady)return this;var B=
this.adjustPosition(A,F);var E=B.x,D=B.y;var C=this.getPositionEl();if(E!==undefined||D!==undefined){if(E!==undefined&&D!==undefined)C.setLeftTop(E,D);else if(E!==undefined)C.setLeft(E);else if(D!==undefined)C.setTop(D);this.onPosition(E,D);this.fireEvent("move",this,E,D)}return this},setPagePosition:function(A,C){if(A&&typeof A[1]=="number"){C=A[1];A=A[0]}this.pageX=A;this.pageY=C;if(!this.boxReady)return;if(A===undefined||C===undefined)return;var B=this.el.translatePoints(A,C);this.setPosition(B.left,
B.top);return this},onRender:function(B,A){Ext.BoxComponent.superclass.onRender.call(this,B,A);if(this.resizeEl)this.resizeEl=Ext.get(this.resizeEl);if(this.positionEl)this.positionEl=Ext.get(this.positionEl)},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y)this.setPosition(this.x,this.y);else if(this.pageX||this.pageY)this.setPagePosition(this.pageX,this.pageY)},syncSize:function(){delete this.lastSize;
this.setSize(this.autoWidth?undefined:this.el.getWidth(),this.autoHeight?undefined:this.el.getHeight());return this},onResize:function(D,B,A,C){},onPosition:function(A,B){},adjustSize:function(A,B){if(this.autoWidth)A="auto";if(this.autoHeight)B="auto";return{width:A,height:B}},adjustPosition:function(A,B){return{x:A,y:B}}});Ext.reg("box",Ext.BoxComponent);
Ext.SplitBar=function(C,E,B,D,A){this.el=Ext.get(C,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(E,true);this.orientation=B||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2E3;this.animate=false;this.useShim=false;this.shim=null;if(!A)this.proxy=Ext.SplitBar.createProxy(this.orientation);else this.proxy=Ext.get(A).dom;this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);
this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter;this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=D||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=D||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};
Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(A,E){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var C=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var D=
C-this.activeMinSize;var B=Math.max(this.activeMaxSize-C,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?D:B,this.placement==Ext.SplitBar.LEFT?B:D);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?D:B,this.placement==Ext.SplitBar.TOP?B:D)}this.dragSpecs.startSize=C;this.dragSpecs.startPoint=[A,E];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,
A,E)},onEndProxyDrag:function(C){Ext.get(this.proxy).setDisplayed(false);var B=Ext.lib.Event.getXY(C);if(this.overlay){this.overlay.remove();delete this.overlay}var A;if(this.orientation==Ext.SplitBar.HORIZONTAL)A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?B[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-B[0]);else A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?B[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-B[1]);A=Math.min(Math.max(A,this.activeMinSize),
this.activeMaxSize);if(A!=this.dragSpecs.startSize)if(this.fireEvent("beforeapply",this,A)!==false){this.adapter.setElementSize(this,A);this.fireEvent("moved",this,A);this.fireEvent("resize",this,A)}},getAdapter:function(){return this.adapter},setAdapter:function(A){this.adapter=A;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(A){this.minSize=A},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(A){this.maxSize=A},setCurrentSize:function(B){var A=
this.animate;this.animate=false;this.adapter.setElementSize(this,B);this.animate=A},destroy:function(A){if(this.shim)this.shim.remove();this.dd.unreg();Ext.removeNode(this.proxy);if(A)this.el.remove()}});Ext.SplitBar.createProxy=function(B){var C=new Ext.Element(document.createElement("div"));C.unselectable();var A="x-splitbar-proxy";C.addClass(A+" "+(B==Ext.SplitBar.HORIZONTAL?A+"-h":A+"-v"));document.body.appendChild(C.dom);return C.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};
Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(A){},getElementSize:function(A){if(A.orientation==Ext.SplitBar.HORIZONTAL)return A.resizingEl.getWidth();else return A.resizingEl.getHeight()},setElementSize:function(B,A,C){if(B.orientation==Ext.SplitBar.HORIZONTAL)if(!B.animate){B.resizingEl.setWidth(A);if(C)C(B,A)}else B.resizingEl.setWidth(A,true,.1,C,"easeOut");else if(!B.animate){B.resizingEl.setHeight(A);if(C)C(B,A)}else B.resizingEl.setHeight(A,true,.1,C,"easeOut")}};
Ext.SplitBar.AbsoluteLayoutAdapter=function(A){this.basic=new Ext.SplitBar.BasicLayoutAdapter;this.container=Ext.get(A)};
Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(A){this.basic.init(A)},getElementSize:function(A){return this.basic.getElementSize(A)},setElementSize:function(B,A,C){this.basic.setElementSize(B,A,this.moveSplitter.createDelegate(this,[B]))},moveSplitter:function(A){var B=Ext.SplitBar;switch(A.placement){case B.LEFT:A.el.setX(A.resizingEl.getRight());break;case B.RIGHT:A.el.setStyle("right",this.container.getWidth()-A.resizingEl.getLeft()+"px");break;case B.TOP:A.el.setY(A.resizingEl.getBottom());
break;case B.BOTTOM:A.el.setY(A.resizingEl.getTop()-A.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;
Ext.Container=Ext.extend(Ext.BoxComponent,{autoDestroy:true,defaultType:"panel",initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var A=this.items;if(A){delete this.items;if(Ext.isArray(A))this.add.apply(this,A);else this.add(A)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(A){if(this.layout&&this.layout!=
A)this.layout.setContainer(null);this.initItems();this.layout=A;A.setContainer(this)},render:function(){Ext.Container.superclass.render.apply(this,arguments);if(this.layout){if(typeof this.layout=="string")this.layout=new (Ext.Container.LAYOUTS[this.layout.toLowerCase()])(this.layoutConfig);this.setLayout(this.layout);if(this.activeItem!==undefined){var A=this.activeItem;delete this.activeItem;this.layout.setActiveItem(A);return}}if(!this.ownerCt)this.doLayout();if(this.monitorResize===true)Ext.EventManager.onWindowResize(this.doLayout,
this,[false])},getLayoutTarget:function(){return this.el},getComponentId:function(A){return A.itemId||A.id},add:function(C){if(!this.items)this.initItems();var B=arguments,A=B.length;if(A>1){for(var D=0;D<A;D++)this.add(B[D]);return}var F=this.lookupComponent(this.applyDefaults(C));var E=this.items.length;if(this.fireEvent("beforeadd",this,F,E)!==false&&this.onBeforeAdd(F)!==false){this.items.add(F);F.ownerCt=this;this.fireEvent("add",this,F,E)}return F},insert:function(D,C){if(!this.items)this.initItems();
var B=arguments,A=B.length;if(A>2){for(var E=A-1;E>=1;--E)this.insert(D,B[E]);return}var F=this.lookupComponent(this.applyDefaults(C));if(F.ownerCt==this&&this.items.indexOf(F)<D)--D;if(this.fireEvent("beforeadd",this,F,D)!==false&&this.onBeforeAdd(F)!==false){this.items.insert(D,F);F.ownerCt=this;this.fireEvent("add",this,F,D)}return F},applyDefaults:function(A){if(this.defaults)if(typeof A=="string"){A=Ext.ComponentMgr.get(A);Ext.apply(A,this.defaults)}else if(!A.events)Ext.applyIf(A,this.defaults);
else Ext.apply(A,this.defaults);return A},onBeforeAdd:function(A){if(A.ownerCt)A.ownerCt.remove(A,false);if(this.hideBorders===true)A.border=A.border===true},remove:function(A,B){var C=this.getComponent(A);if(C&&this.fireEvent("beforeremove",this,C)!==false){this.items.remove(C);delete C.ownerCt;if(B===true||B!==false&&this.autoDestroy)C.destroy();if(this.layout&&this.layout.activeItem==C)delete this.layout.activeItem;this.fireEvent("remove",this,C)}return C},getComponent:function(A){if(typeof A==
"object")return A;return this.items.get(A)},lookupComponent:function(A){if(typeof A=="string")return Ext.ComponentMgr.get(A);else if(!A.events)return this.createComponent(A);return A},createComponent:function(A){return Ext.ComponentMgr.create(A,this.defaultType)},doLayout:function(D){if(this.rendered&&this.layout)this.layout.layout();if(D!==false&&this.items){var C=this.items.items;for(var B=0,A=C.length;B<A;B++){var E=C[B];if(E.doLayout)E.doLayout()}}},getLayout:function(){if(!this.layout){var A=
new Ext.layout.ContainerLayout(this.layoutConfig);this.setLayout(A)}return this.layout},beforeDestroy:function(){if(this.items)Ext.destroy.apply(Ext,this.items.items);if(this.monitorResize)Ext.EventManager.removeResizeListener(this.doLayout,this);if(this.layout&&this.layout.destroy)this.layout.destroy();Ext.Container.superclass.beforeDestroy.call(this)},bubble:function(C,B,A){var D=this;while(D){if(C.apply(B||D,A||[D])===false)break;D=D.ownerCt}},cascade:function(F,E,B){if(F.apply(E||this,B||[this])!==
false)if(this.items){var D=this.items.items;for(var C=0,A=D.length;C<A;C++)if(D[C].cascade)D[C].cascade(F,E,B);else F.apply(E||D[C],B||[D[C]])}},findById:function(C){var A,B=this;this.cascade(function(D){if(B!=D&&D.id===C){A=D;return false}});return A||null},findByType:function(A){return typeof A=="function"?this.findBy(function(B){return B.constructor===A}):this.findBy(function(B){return B.constructor.xtype===A})},find:function(B,A){return this.findBy(function(C){return C[B]===A})},findBy:function(D,
C){var A=[],B=this;this.cascade(function(E){if(B!=E&&D.call(C||E,E,B)===true)A.push(E)});return A}});Ext.Container.LAYOUTS={};Ext.reg("container",Ext.Container);Ext.layout.ContainerLayout=function(A){Ext.apply(this,A)};
Ext.layout.ContainerLayout.prototype={monitorResize:false,activeItem:null,layout:function(){var A=this.container.getLayoutTarget();this.onLayout(this.container,A);this.container.fireEvent("afterlayout",this.container,this)},onLayout:function(A,B){this.renderAll(A,B)},isValidParent:function(C,B){var A=C.getPositionEl?C.getPositionEl():C.getEl();return A.dom.parentNode==B.dom},renderAll:function(D,E){var B=D.items.items;for(var C=0,A=B.length;C<A;C++){var F=B[C];if(F&&(!F.rendered||!this.isValidParent(F,
E)))this.renderItem(F,C,E)}},renderItem:function(D,A,C){if(D&&!D.rendered){D.render(C,A);if(this.extraCls){var B=D.getPositionEl?D.getPositionEl():D;B.addClass(this.extraCls)}if(this.renderHidden&&D!=this.activeItem)D.hide()}else if(D&&!this.isValidParent(D,C)){if(this.extraCls)D.addClass(this.extraCls);if(typeof A=="number")A=C.dom.childNodes[A];C.dom.insertBefore(D.getEl().dom,A||null);if(this.renderHidden&&D!=this.activeItem)D.hide()}},onResize:function(){if(this.container.collapsed)return;var A=
this.container.bufferResize;if(A){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.layout,this);this.resizeBuffer=typeof A=="number"?A:100}this.resizeTask.delay(this.resizeBuffer)}else this.layout()},setContainer:function(A){if(this.monitorResize&&A!=this.container){if(this.container)this.container.un("resize",this.onResize,this);if(A)A.on("resize",this.onResize,this)}this.container=A},parseMargins:function(B){var C=B.split(" ");var A=C.length;if(A==1){C[1]=C[0];C[2]=C[0];C[3]=C[0]}if(A==
2){C[2]=C[0];C[3]=C[1]}return{top:parseInt(C[0],10)||0,right:parseInt(C[1],10)||0,bottom:parseInt(C[2],10)||0,left:parseInt(C[3],10)||0}},destroy:Ext.emptyFn};Ext.Container.LAYOUTS["auto"]=Ext.layout.ContainerLayout;
Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,onLayout:function(A,B){Ext.layout.FitLayout.superclass.onLayout.call(this,A,B);if(!this.container.collapsed)this.setItemSize(this.activeItem||A.items.itemAt(0),B.getStyleSize())},setItemSize:function(B,A){if(B&&A.height>0)B.setSize(A)}});Ext.Container.LAYOUTS["fit"]=Ext.layout.FitLayout;
Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,renderHidden:true,setActiveItem:function(A){A=this.container.getComponent(A);if(this.activeItem!=A){if(this.activeItem)this.activeItem.hide();this.activeItem=A;A.show();this.layout()}},renderAll:function(A,B){if(this.deferredRender)this.renderItem(this.activeItem,undefined,B);else Ext.layout.CardLayout.superclass.renderAll.call(this,A,B)}});Ext.Container.LAYOUTS["card"]=Ext.layout.CardLayout;
Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,getAnchorViewSize:function(A,B){return B.dom==document.body?B.getViewSize():B.getStyleSize()},onLayout:function(F,I){Ext.layout.AnchorLayout.superclass.onLayout.call(this,F,I);var O=this.getAnchorViewSize(F,I);var M=O.width,E=O.height;if(M<20||E<20)return;var B,K;if(F.anchorSize)if(typeof F.anchorSize=="number")B=F.anchorSize;else{B=F.anchorSize.width;K=F.anchorSize.height}else{B=F.initialConfig.width;K=F.initialConfig.height}var H=
F.items.items,G=H.length,D,J,L,C,A;for(D=0;D<G;D++){J=H[D];if(J.anchor){L=J.anchorSpec;if(!L){var N=J.anchor.split(" ");J.anchorSpec=L={right:this.parseAnchor(N[0],J.initialConfig.width,B),bottom:this.parseAnchor(N[1],J.initialConfig.height,K)}}C=L.right?this.adjustWidthAnchor(L.right(M),J):undefined;A=L.bottom?this.adjustHeightAnchor(L.bottom(E),J):undefined;if(C||A)J.setSize(C||undefined,A||undefined)}}},parseAnchor:function(B,F,A){if(B&&B!="none"){var D;if(/^(r|right|b|bottom)$/i.test(B)){var E=
A-F;return function(G){if(G!==D){D=G;return G-E}}}else if(B.indexOf("%")!=-1){var C=parseFloat(B.replace("%",""))*.01;return function(G){if(G!==D){D=G;return Math.floor(G*C)}}}else{B=parseInt(B,10);if(!isNaN(B))return function(G){if(G!==D){D=G;return G+B}}}}return false},adjustWidthAnchor:function(B,A){return B},adjustHeightAnchor:function(B,A){return B}});Ext.Container.LAYOUTS["anchor"]=Ext.layout.AnchorLayout;
Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,extraCls:"x-column",scrollOffset:0,isValidParent:function(B,A){return B.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(C,F){var D=C.items.items,E=D.length,G,A;if(!this.innerCt){F.addClass("x-column-layout-ct");this.innerCt=F.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"})}this.renderAll(C,this.innerCt);var J=Ext.isIE&&F.dom!=Ext.getBody().dom?F.getStyleSize():F.getViewSize();
if(J.width<1&&J.height<1)return;var H=J.width-F.getPadding("lr")-this.scrollOffset,B=J.height-F.getPadding("tb"),I=H;this.innerCt.setWidth(H);for(A=0;A<E;A++){G=D[A];if(!G.columnWidth)I-=G.getSize().width+G.getEl().getMargins("lr")}I=I<0?0:I;for(A=0;A<E;A++){G=D[A];if(G.columnWidth)G.setSize(Math.floor(G.columnWidth*I)-G.getEl().getMargins("lr"))}}});Ext.Container.LAYOUTS["column"]=Ext.layout.ColumnLayout;
Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,onLayout:function(B,X){var C;if(!this.rendered){X.position();X.addClass("x-border-layout-ct");var M=B.items.items;C=[];for(var Q=0,R=M.length;Q<R;Q++){var U=M[Q];var F=U.region;if(U.collapsed)C.push(U);U.collapsed=false;if(!U.rendered){U.cls=U.cls?U.cls+" x-border-panel":"x-border-panel";U.render(X,Q)}this[F]=F!="center"&&U.split?new Ext.layout.BorderLayout.SplitRegion(this,U.initialConfig,F):new Ext.layout.BorderLayout.Region(this,
U.initialConfig,F);this[F].render(X,U)}this.rendered=true}var L=X.getViewSize();if(L.width<20||L.height<20){if(C)this.restoreCollapsed=C;return}else if(this.restoreCollapsed){C=this.restoreCollapsed;delete this.restoreCollapsed}var J=L.width,S=L.height;var I=J,P=S,G=0,H=0;var N=this.north,K=this.south,E=this.west,T=this.east,U=this.center;if(!U)throw"No center region defined in BorderLayout "+B.id;if(N&&N.isVisible()){var W=N.getSize();var O=N.getMargins();W.width=J-(O.left+O.right);W.x=O.left;W.y=
O.top;G=W.height+W.y+O.bottom;P-=G;N.applyLayout(W)}if(K&&K.isVisible()){var W=K.getSize();var O=K.getMargins();W.width=J-(O.left+O.right);W.x=O.left;var V=W.height+O.top+O.bottom;W.y=S-V+O.top;P-=V;K.applyLayout(W)}if(E&&E.isVisible()){var W=E.getSize();var O=E.getMargins();W.height=P-(O.top+O.bottom);W.x=O.left;W.y=G+O.top;var A=W.width+O.left+O.right;H+=A;I-=A;E.applyLayout(W)}if(T&&T.isVisible()){var W=T.getSize();var O=T.getMargins();W.height=P-(O.top+O.bottom);var A=W.width+O.left+O.right;W.x=
J-A+O.left;W.y=G+O.top;I-=A;T.applyLayout(W)}var O=U.getMargins();var D={x:H+O.left,y:G+O.top,width:I-(O.left+O.right),height:P-(O.top+O.bottom)};U.applyLayout(D);if(C)for(var Q=0,R=C.length;Q<R;Q++)C[Q].collapse(false);if(Ext.isIE&&Ext.isStrict)X.repaint()},destroy:function(){var B=["north","south","east","west"];for(var A=0;A<B.length;A++){var C=this[B[A]];if(C&&C.split)C.split.destroy(true)}Ext.layout.BorderLayout.superclass.destroy.call(this)}});
Ext.layout.BorderLayout.Region=function(B,A,C){Ext.apply(this,A);this.layout=B;this.position=C;this.state={};if(typeof this.margins=="string")this.margins=this.layout.parseMargins(this.margins);this.margins=Ext.applyIf(this.margins||{},this.defaultMargins);if(this.collapsible){if(typeof this.cmargins=="string")this.cmargins=this.layout.parseMargins(this.cmargins);if(this.collapseMode=="mini"&&!this.cmargins)this.cmargins={left:0,top:0,right:0,bottom:0};else this.cmargins=Ext.applyIf(this.cmargins||
{},C=="north"||C=="south"?this.defaultNSCMargins:this.defaultEWCMargins)}};
Ext.layout.BorderLayout.Region.prototype={collapsible:false,split:false,floatable:true,minWidth:50,minHeight:50,defaultMargins:{left:0,top:0,right:0,bottom:0},defaultNSCMargins:{left:5,top:5,right:5,bottom:5},defaultEWCMargins:{left:5,top:0,right:5,bottom:0},isCollapsed:false,render:function(B,C){this.panel=C;C.el.enableDisplayMode();this.targetEl=B;this.el=C.el;var A=C.getState,D=this.position;C.getState=function(){return Ext.apply(A.call(C)||{},this.state)}.createDelegate(this);if(D!="center"){C.allowQueuedExpand=
false;C.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});if(this.collapsible){C.collapseEl="el";C.slideAnchor=this.getSlideAnchor()}if(C.tools&&C.tools.toggle){C.tools.toggle.addClass("x-tool-collapse-"+D);C.tools.toggle.addClassOnOver("x-tool-collapse-"+D+"-over")}}},getCollapsedEl:function(){if(!this.collapsedEl){if(!this.toolTemplate){var B=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');
B.disableFormats=true;B.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=B}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:"&#160;"});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");
this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{var A=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);A.addClassOnOver("x-tool-expand-"+this.position+"-over");A.on("click",this.onExpandClick,this,{stopEvent:true});if(this.floatable!==false){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.collapseClick,this)}}}return this.collapsedEl},onExpandClick:function(A){if(this.isSlid){this.afterSlideIn();
this.panel.expand(false)}else this.panel.expand()},onCollapseClick:function(A){this.panel.collapse()},beforeCollapse:function(B,A){this.lastAnim=A;if(this.splitEl)this.splitEl.hide();this.getCollapsedEl().show();this.panel.el.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(A){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false)this.getCollapsedEl().dom.style.visibility="visible";else this.getCollapsedEl().slideIn(this.panel.slideAnchor,
{duration:.2});this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(A){var B=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west")this.panel.setSize(undefined,B.getHeight());else this.panel.setSize(B.getWidth(),undefined);B.hide();B.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",100)},onExpand:function(){this.isCollapsed=false;if(this.splitEl)this.splitEl.show();this.layout.layout();this.panel.el.setStyle("z-index",1);this.state.collapsed=
false;this.panel.saveState()},collapseClick:function(A){if(this.isSlid){A.stopPropagation();this.slideIn()}else{A.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed)this.getCollapsedEl().hide();else if(this.splitEl)this.splitEl.hide()},onShow:function(){if(this.isCollapsed)this.getCollapsedEl().show();else if(this.splitEl)this.splitEl.show()},isVisible:function(){return!this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},
getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(A){this.panel=A},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(A){var B=this.getCollapsedEl();B.setLeftTop(A.x,A.y);B.setSize(A.width,A.height)},applyLayout:function(A){if(this.isCollapsed)this.applyLayoutCollapsed(A);else{this.panel.setPosition(A.x,A.y);this.panel.setSize(A.width,A.height)}},beforeSlide:function(){this.panel.beforeEffect()},
afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={"mouseout":function(B){if(!B.within(this.el,true))A.delay(500)},"mouseover":function(B){A.cancel()},scope:this}}this.el.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",
this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx())return;this.isSlid=true;var A=this.panel.tools;if(A&&A.toggle)A.toggle.hide();this.el.show();if(this.position=="east"||this.position=="west")this.panel.setSize(undefined,this.collapsedEl.getHeight());else this.panel.setSize(this.collapsedEl.getWidth(),undefined);this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",102);if(this.animFloat!==
false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var A=this.panel.tools;if(A&&A.toggle)A.toggle.show()},
slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(A)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(A){if(!A.within(this.el))this.slideIn()},anchors:{"west":"left","east":"right","north":"top","south":"bottom"},sanchors:{"west":"l","east":"r",
"north":"t","south":"b"},canchors:{"west":"tl-tr","east":"tr-tl","north":"tl-bl","south":"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case "west":return[0,0];break;case "east":return[0,0];break;case "north":return[0,0];break;case "south":return[0,0];break}},getExpandAdj:function(){var B=
this.collapsedEl,A=this.cmargins;switch(this.position){case "west":return[-(A.right+B.getWidth()+A.left),0];break;case "east":return[A.right+B.getWidth()+A.left,0];break;case "north":return[0,-(A.top+A.bottom+B.getHeight())];break;case "south":return[0,A.top+A.bottom+B.getHeight()];break}}};Ext.layout.BorderLayout.SplitRegion=function(B,A,C){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,B,A,C);this.applyLayout=this.applyFns[C]};
Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,
placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(C){if(this.isCollapsed)return this.applyLayoutCollapsed(C);var D=this.splitEl.dom,B=D.style;this.panel.setPosition(C.x,C.y);var A=D.offsetWidth;B.left=C.x+C.width-A+"px";B.top=C.y+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},
east:function(C){if(this.isCollapsed)return this.applyLayoutCollapsed(C);var D=this.splitEl.dom,B=D.style;var A=D.offsetWidth;this.panel.setPosition(C.x+A,C.y);B.left=C.x+"px";B.top=C.y+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},north:function(C){if(this.isCollapsed)return this.applyLayoutCollapsed(C);var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y);B.left=C.x+"px";B.top=C.y+C.height-A+"px";B.width=Math.max(0,C.width)+"px";
this.panel.setSize(C.width,C.height-A)},south:function(C){if(this.isCollapsed)return this.applyLayoutCollapsed(C);var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y+A);B.left=C.x+"px";B.top=C.y+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A)}},render:function(A,C){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,A,C);var D=this.position;this.splitEl=A.createChild({cls:"x-layout-split x-layout-split-"+D,html:"&#160;",id:this.panel.id+
"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+D,html:"&#160;"});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var B=this.splitSettings[D];this.split=new Ext.SplitBar(this.splitEl.dom,C.el,B.orientation);this.split.placement=B.placement;this.split.getMaximumSize=this[B.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[B.minProp];this.split.on("beforeapply",
this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[B.maxProp];if(C.hidden)this.splitEl.hide();if(this.useSplitTips)this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip;if(this.collapsible)this.splitEl.on("dblclick",this.onCollapseClick,this)},getSize:function(){if(this.isCollapsed)return this.collapsedEl.getSize();var A=this.panel.getSize();if(this.position=="north"||this.position=="south")A.height+=this.splitEl.dom.offsetHeight;
else A.width+=this.splitEl.dom.offsetWidth;return A},getHMaxSize:function(){var B=this.maxSize||1E4;var A=this.layout.center;return Math.min(B,this.el.getWidth()+A.el.getWidth()-A.getMinWidth())},getVMaxSize:function(){var B=this.maxSize||1E4;var A=this.layout.center;return Math.min(B,this.el.getHeight()+A.el.getHeight()-A.getMinHeight())},onSplitMove:function(B,A){var C=this.panel.getSize();this.lastSplitSize=A;if(this.position=="north"||this.position=="south"){this.panel.setSize(C.width,A);this.state.height=
A}else{this.panel.setSize(A,C.height);this.state.width=A}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split}});Ext.Container.LAYOUTS["border"]=Ext.layout.BorderLayout;
Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",getAnchorViewSize:function(A,B){return A.body.getStyleSize()},setContainer:function(B){Ext.layout.FormLayout.superclass.setContainer.call(this,B);if(B.labelAlign)B.addClass("x-form-label-"+B.labelAlign);if(B.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0}else{this.labelSeparator=B.labelSeparator||this.labelSeparator;B.labelWidth=B.labelWidth||100;if(typeof B.labelWidth==
"number"){var C=typeof B.labelPad=="number"?B.labelPad:5;this.labelAdjust=B.labelWidth+C;this.labelStyle="width:"+B.labelWidth+"px;";this.elementStyle="padding-left:"+(B.labelWidth+C)+"px"}if(B.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;"}}if(!this.fieldTpl){var A=new Ext.Template('<div class="x-form-item {5}" tabIndex="-1">','<label for="{0}" style="{2}" class="x-form-item-label">{1}{4}</label>','<div class="x-form-element" id="x-form-el-{0}" style="{3}">',
'</div><div class="{6}"></div>',"</div>");A.disableFormats=true;A.compile();Ext.layout.FormLayout.prototype.fieldTpl=A}},renderItem:function(D,A,C){if(D&&!D.rendered&&D.isFormField&&D.inputType!="hidden"){var B=[D.id,D.fieldLabel,D.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof D.labelSeparator=="undefined"?this.labelSeparator:D.labelSeparator,(D.itemCls||this.container.itemCls||"")+(D.hideLabel?" x-hide-label":""),D.clearCls||"x-form-clear-left"];if(typeof A=="number")A=C.dom.childNodes[A]||
null;if(A)this.fieldTpl.insertBefore(A,B);else this.fieldTpl.append(C,B);D.render("x-form-el-"+D.id)}else Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)},adjustWidthAnchor:function(B,A){return B-(A.isFormField?A.hideLabel?0:this.labelAdjust:0)},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["form"]=Ext.layout.FormLayout;
Ext.layout.Accordion=Ext.extend(Ext.layout.FitLayout,{fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,renderItem:function(A){if(this.animate===false)A.animCollapse=false;A.collapsible=true;if(this.autoWidth)A.autoWidth=true;if(this.titleCollapse)A.titleCollapse=true;if(this.hideCollapseTool)A.hideCollapseTool=true;if(this.collapseFirst!==undefined)A.collapseFirst=this.collapseFirst;if(!this.activeItem&&!A.collapsed)this.activeItem=
A;else if(this.activeItem)A.collapsed=true;Ext.layout.Accordion.superclass.renderItem.apply(this,arguments);A.header.addClass("x-accordion-hd");A.on("beforeexpand",this.beforeExpand,this)},beforeExpand:function(C,B){var A=this.activeItem;if(A)if(this.sequence){delete this.activeItem;if(!A.collapsed){A.collapse({callback:function(){C.expand(B||true)},scope:this});return false}}else A.collapse(this.animate);this.activeItem=C;if(this.activeOnTop)C.el.dom.parentNode.insertBefore(C.el.dom,C.el.dom.parentNode.firstChild);
this.layout()},setItemSize:function(F,E){if(this.fill&&F){var B=this.container.items.items;var D=0;for(var C=0,A=B.length;C<A;C++){var G=B[C];if(G!=F)D+=G.getSize().height-G.bwrap.getHeight()}E.height-=D;F.setSize(E)}}});Ext.Container.LAYOUTS["accordion"]=Ext.layout.Accordion;
Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,setContainer:function(A){Ext.layout.TableLayout.superclass.setContainer.call(this,A);this.currentRow=0;this.currentColumn=0;this.cells=[]},onLayout:function(C,E){var D=C.items.items,A=D.length,F,B;if(!this.table){E.addClass("x-table-layout-ct");this.table=E.createChild({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},null,true);this.renderAll(C,E)}},getRow:function(A){var B=this.table.tBodies[0].childNodes[A];
if(!B){B=document.createElement("tr");this.table.tBodies[0].appendChild(B)}return B},getNextCell:function(H){var A=this.getNextNonSpan(this.currentColumn,this.currentRow);var E=this.currentColumn=A[0],D=this.currentRow=A[1];for(var G=D;G<D+(H.rowspan||1);G++){if(!this.cells[G])this.cells[G]=[];for(var C=E;C<E+(H.colspan||1);C++)this.cells[G][C]=true}var F=document.createElement("td");if(H.cellId)F.id=H.cellId;var B="x-table-layout-cell";if(H.cellCls)B+=" "+H.cellCls;F.className=B;if(H.colspan)F.colSpan=
H.colspan;if(H.rowspan)F.rowSpan=H.rowspan;this.getRow(D).appendChild(F);return F},getNextNonSpan:function(A,C){var B=this.columns;while(B&&A>=B||this.cells[C]&&this.cells[C][A])if(B&&A>=B){C++;A=0}else A++;return[A,C]},renderItem:function(C,A,B){if(C&&!C.rendered)C.render(this.getNextCell(C))},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["table"]=Ext.layout.TableLayout;
Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",isForm:false,setContainer:function(A){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,A);if(A.isXType("form"))this.isForm=true},onLayout:function(A,B){if(this.isForm)A.body.position();else B.position();Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,A,B)},getAnchorViewSize:function(A,B){return this.isForm?A.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,
A,B)},isValidParent:function(B,A){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,B,A)},adjustWidthAnchor:function(B,A){return B?B-A.getPosition(true)[0]:B},adjustHeightAnchor:function(B,A){return B?B-A.getPosition(true)[1]:B}});Ext.Container.LAYOUTS["absolute"]=Ext.layout.AbsoluteLayout;
Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(A,B){this.fireEvent("resize",
this,A,B,A,B)}});Ext.reg("viewport",Ext.Viewport);
Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:.25},collapseDefaults:{duration:.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange",
"collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.tbar){this.elements+=",tbar";if(typeof this.tbar=="object")this.topToolbar=this.tbar;delete this.tbar}if(this.bbar){this.elements+=",bbar";if(typeof this.bbar=="object")this.bottomToolbar=this.bbar;delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else if(this.title&&this.header!==false)this.elements+=",header";if(this.footer===true){this.elements+=",footer";
delete this.footer}if(this.buttons){var C=this.buttons;this.buttons=[];for(var B=0,A=C.length;B<A;B++)if(C[B].render){C[B].ownerCt=this;this.buttons.push(C[B])}else this.addButton(C[B])}if(this.autoLoad)this.on("render",this.doAutoLoad,this,{delay:10})},createElement:function(A,C){if(this[A]){C.appendChild(this[A].dom);return}if(A==="bwrap"||this.elements.indexOf(A)!=-1)if(this[A+"Cfg"])this[A]=Ext.fly(C).createChild(this[A+"Cfg"]);else{var B=document.createElement("div");B.className=this[A+"Cls"];
this[A]=Ext.get(C.appendChild(B))}},onRender:function(H,G){Ext.Panel.superclass.onRender.call(this,H,G);this.createClasses();if(this.el){this.el.addClass(this.baseCls);this.header=this.el.down("."+this.headerCls);this.bwrap=this.el.down("."+this.bwrapCls);var M=this.bwrap?this.bwrap:this.el;this.tbar=M.down("."+this.tbarCls);this.body=M.down("."+this.bodyCls);this.bbar=M.down("."+this.bbarCls);this.footer=M.down("."+this.footerCls);this.fromMarkup=true}else this.el=H.createChild({id:this.id,cls:this.baseCls},
G);var A=this.el,K=A.dom;if(this.cls)this.el.addClass(this.cls);if(this.buttons)this.elements+=",footer";if(this.frame){A.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",K.firstChild.firstChild.firstChild);this.createElement("bwrap",K);var O=this.bwrap.dom;var E=K.childNodes[1],B=K.childNodes[2];O.appendChild(E);O.appendChild(B);var P=O.firstChild.firstChild.firstChild;this.createElement("tbar",P);this.createElement("body",P);this.createElement("bbar",
P);this.createElement("footer",O.lastChild.firstChild.firstChild);if(!this.footer)this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}else{this.createElement("header",K);this.createElement("bwrap",K);var O=this.bwrap.dom;this.createElement("tbar",O);this.createElement("body",O);this.createElement("bbar",O);this.createElement("footer",O);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar)this.tbar.addClass(this.tbarCls+"-noheader")}}if(this.border===false){this.el.addClass(this.baseCls+
"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header)this.header.addClass(this.headerCls+"-noborder");if(this.footer)this.footer.addClass(this.footerCls+"-noborder");if(this.tbar)this.tbar.addClass(this.tbarCls+"-noborder");if(this.bbar)this.bbar.addClass(this.bbarCls+"-noborder")}if(this.bodyBorder===false)this.body.addClass(this.bodyCls+"-noborder");if(this.bodyStyle)this.body.applyStyles(this.bodyStyle);this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();
if(this.headerAsText){this.header.dom.innerHTML='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+"</span>";if(this.iconCls)this.setIconClass(this.iconCls)}}if(this.floating)this.makeFloating(this.floating);if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool)this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this});if(this.titleCollapse&&this.header){this.header.on("click",this.toggleCollapse,this);
this.header.setStyle("cursor","pointer")}}if(this.tools){var J=this.tools;this.tools={};this.addTool.apply(this,J)}else this.tools={};if(this.buttons&&this.buttons.length>0){var D=this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-"+this.buttonAlign,html:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'}},null,true);var L=D.getElementsByTagName("tr")[0];for(var F=0,I=this.buttons.length;F<I;F++){var N=this.buttons[F];var C=document.createElement("td");
C.className="x-panel-btn-td";N.render(L.appendChild(C))}}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar))this.topToolbar=new Ext.Toolbar(this.topToolbar);this.topToolbar.render(this.tbar);this.topToolbar.ownerCt=this}if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar))this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar);this.bottomToolbar.render(this.bbar);this.bottomToolbar.ownerCt=this}},setIconClass:function(B){var A=this.iconCls;this.iconCls=B;if(this.rendered&&
this.header)if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(A,this.iconCls)}else{var D=this.header.dom;var C=D.firstChild&&String(D.firstChild.tagName).toLowerCase()=="img"?D.firstChild:null;if(C)Ext.fly(C).replaceClass(A,this.iconCls);else Ext.DomHelper.insertBefore(D.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}},makeFloating:function(A){this.floating=true;this.el=new Ext.Layer(typeof A=="object"?A:{shadow:this.shadow!==undefined?
this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined},this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},addButton:function(A,D,C){var E={handler:D,scope:C,minWidth:this.minButtonWidth,hideParent:true};if(typeof A=="string")E.text=A;else Ext.apply(E,A);var B=new Ext.Button(E);B.ownerCt=this;if(!this.buttons)this.buttons=[];this.buttons.push(B);return B},addTool:function(){if(!this[this.toolTarget])return;
if(!this.toolTemplate){var F=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');F.disableFormats=true;F.compile();Ext.Panel.prototype.toolTemplate=F}for(var E=0,C=arguments,B=C.length;E<B;E++){var A=C[E],G="x-tool-"+A.id+"-over";var D=this.toolTemplate.insertFirst(A.align!=="left"?this[this.toolTarget]:this[this.toolTarget].child("span"),A,true);this.tools[A.id]=D;D.enableDisplayMode("block");D.on("click",this.createToolHandler(D,A,G,this));if(A.on)D.on(A.on);if(A.hidden)D.hide();if(A.qtip)if(typeof A.qtip==
"object")Ext.QuickTips.register(Ext.apply({target:D.id},A.qtip));else D.dom.qtip=A.qtip;D.addClassOnOver(G)}},onShow:function(){if(this.floating)return this.el.show();Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating)return this.el.hide();Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(C,A,D,B){return function(E){C.removeClass(D);E.stopEvent();if(A.handler)A.handler.call(A.scope||C,E,C,B)}},afterRender:function(){if(this.fromMarkup&&this.height===undefined&&
!this.autoHeight)this.height=this.el.getHeight();if(this.floating&&!this.hidden&&!this.initHidden)this.el.show();if(this.title)this.setTitle(this.title);this.setAutoScroll();if(this.html){this.body.update(typeof this.html=="object"?Ext.DomHelper.markup(this.html):this.html);delete this.html}if(this.contentEl){var A=Ext.getDom(this.contentEl);Ext.fly(A).removeClass(["x-hidden","x-hide-display"]);this.body.dom.appendChild(A)}if(this.collapsed){this.collapsed=false;this.collapse(false)}Ext.Panel.superclass.afterRender.call(this);
this.initEvents()},setAutoScroll:function(){if(this.rendered&&this.autoScroll){var A=this.body||this.el;if(A)A.setOverflow("auto")}},getKeyMap:function(){if(!this.keyMap)this.keyMap=new Ext.KeyMap(this.el,this.keys);return this.keyMap},initEvents:function(){if(this.keys)this.getKeyMap();if(this.draggable)this.initDraggable()},initDraggable:function(){this.dd=new Ext.Panel.DD(this,typeof this.draggable=="boolean"?null:this.draggable)},beforeEffect:function(){if(this.floating)this.el.beforeAction();
this.el.addClass("x-panel-animated")},afterEffect:function(){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(B,A,C){var D={scope:C,block:true};if(B===true){D.callback=A;return D}else if(!B.callback)D.callback=A;else D.callback=function(){A.call(C);Ext.callback(B.callback,B.scope)};return Ext.applyIf(D,B)},collapse:function(B){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,B)===false)return;var A=B===true||B!==false&&this.animCollapse;
this.beforeEffect();this.onCollapse(A,B);return this},onCollapse:function(A,B){if(A)this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(B||true,this.afterCollapse,this),this.collapseDefaults));else{this[this.collapseEl].hide();this.afterCollapse()}},afterCollapse:function(){this.collapsed=true;this.el.addClass(this.collapsedCls);this.afterEffect();this.fireEvent("collapse",this)},expand:function(B){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,
B)===false)return;var A=B===true||B!==false&&this.animCollapse;this.el.removeClass(this.collapsedCls);this.beforeEffect();this.onExpand(A,B);return this},onExpand:function(A,B){if(A)this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(B||true,this.afterExpand,this),this.expandDefaults));else{this[this.collapseEl].show();this.afterExpand()}},afterExpand:function(){this.collapsed=false;this.afterEffect();this.fireEvent("expand",this)},toggleCollapse:function(A){this[this.collapsed?
"expand":"collapse"](A);return this},onDisable:function(){if(this.rendered&&this.maskDisabled)this.el.mask();Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled)this.el.unmask();Ext.Panel.superclass.onEnable.call(this)},onResize:function(A,B){if(A!==undefined||B!==undefined){if(!this.collapsed){if(typeof A=="number")this.body.setWidth(this.adjustBodyWidth(A-this.getFrameWidth()));else if(A=="auto")this.body.setWidth(A);if(typeof B=="number")this.body.setHeight(this.adjustBodyHeight(B-
this.getFrameHeight()));else if(B=="auto")this.body.setHeight(B);if(this.disabled&&this.el._mask)this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}else{this.queuedBodySize={width:A,height:B};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height);this.doLayout()},this,{single:true})}}this.fireEvent("bodyresize",this,A,B)}this.syncShadow()},
adjustBodyHeight:function(A){return A},adjustBodyWidth:function(A){return A},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var B=this.el.getFrameWidth("lr");if(this.frame){var A=this.bwrap.dom.firstChild;B+=Ext.fly(A).getFrameWidth("l")+Ext.fly(A.firstChild).getFrameWidth("r");var C=this.bwrap.dom.firstChild.firstChild.firstChild;B+=Ext.fly(C).getFrameWidth("lr")}return B},getFrameHeight:function(){var A=this.el.getFrameWidth("tb");A+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?
this.bbar.getHeight():0);if(this.frame){var C=this.el.dom.firstChild;var D=this.bwrap.dom.lastChild;A+=C.offsetHeight+D.offsetHeight;var B=this.bwrap.dom.firstChild.firstChild.firstChild;A+=Ext.fly(B).getFrameWidth("tb")}else A+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0);return A},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight()},syncShadow:function(){if(this.floating)this.el.sync(true)},
getLayoutTarget:function(){return this.body},setTitle:function(B,A){this.title=B;if(this.header&&this.headerAsText)this.header.child("span").update(B);if(A)this.setIconClass(A);this.fireEvent("titlechange",this,B);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var A=this.body.getUpdater();A.update.apply(A,arguments);return this},beforeDestroy:function(){Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body);if(this.tools)for(var B in this.tools)Ext.destroy(this.tools[B]);
if(this.buttons)for(var A in this.buttons)Ext.destroy(this.buttons[A]);Ext.destroy(this.topToolbar,this.bottomToolbar);Ext.Panel.superclass.beforeDestroy.call(this)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(A,E,B){var D=document.createElement("div");
D.className="x-panel-ghost "+(A?A:"");if(this.header)D.appendChild(this.el.dom.firstChild.cloneNode(true));Ext.fly(D.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());D.style.width=this.el.dom.offsetWidth+"px";if(!B)this.container.dom.appendChild(D);else Ext.getDom(B).appendChild(D);if(E!==false&&this.el.useShim!==false){var C=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},D);C.show();return C}else return new Ext.Element(D)},doAutoLoad:function(){this.body.load(typeof this.autoLoad==
"object"?this.autoLoad:{url:this.autoLoad})}});Ext.reg("panel",Ext.Panel);
Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,closeAction:"close",elements:"header,body",collapsible:false,initHidden:true,monitorResize:true,frame:true,floating:true,initComponent:function(){Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore")},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||
{},this.getBox())},onRender:function(B,A){Ext.Window.superclass.onRender.call(this,B,A);if(this.plain)this.el.addClass("x-window-plain");this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:"&#160;"});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide()}},
initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget)this.setAnimateTarget(this.animateTarget);if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction});this.resizer.window=this;this.resizer.on("beforeresize",this.beforeResize,this)}if(this.draggable)this.header.addClass("x-window-draggable");this.initTools();this.el.on("mousedown",this.toFront,
this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);this.hidden=true;if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var A=this.getKeyMap();A.on(27,this.onEsc,this);A.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(){this[this.closeAction]()},beforeDestroy:function(){Ext.destroy(this.resizer,this.dd,this.proxy,this.mask);Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager)this.manager.unregister(this);
Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable)this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])});if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true});this.header.on("dblclick",this.toggleMaximize,this)}if(this.closable)this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})},resizerAction:function(){var A=
this.proxy.getBox();this.proxy.hide();this.window.handleResize(A);return A},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(B){var A=this.resizeBox;if(A.x!=B.x||A.y!=B.y)this.updateBox(B);else this.setSize(B);this.focus();this.updateHandles();
this.saveState();if(this.layout)this.doLayout();this.fireEvent("resize",this,B.width,B.height)},focus:function(){var C=this.focusEl,A=this.defaultButton,B=typeof A;if(B!="undefined")if(B=="number")C=this.buttons[A];else if(B=="string")C=Ext.getCmp(A);else C=A;C.focus.defer(10,C)},setAnimateTarget:function(A){A=Ext.get(A);this.animateTarget=A},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var A=this.el.getAlignToXY(this.container,"c-c");
var B=this.el.translatePoints(A[0],A[1]);this.x=this.x===undefined?B.left:this.x;this.y=this.y===undefined?B.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow)this.expand(false);if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(C,A,B){if(!this.rendered)this.render(Ext.getBody());if(this.hidden===false){this.toFront();return}if(this.fireEvent("beforeshow",this)===
false)return;if(A)this.on("show",A,B,{single:true});this.hidden=false;if(C!==undefined)this.setAnimateTarget(C);this.beforeShow();if(this.animateTarget)this.animShow();else this.afterShow()},afterShow:function(){this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized)this.fitContainer();if(Ext.isMac&&Ext.isGecko)this.cascade(this.setAutoScroll);if(this.monitorResize||this.modal||this.constrain||this.constrainHeader)Ext.EventManager.onWindowResize(this.onWindowResize,
this);this.doConstrain();if(this.layout)this.doLayout();if(this.keyMap)this.keyMap.enable();this.toFront();this.updateHandles();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var A=this.getBox(false);A.callback=this.afterShow;A.scope=this;A.duration=.25;A.easing="easeNone";A.opacity=.5;A.block=true;this.el.setStyle("display","none");this.proxy.shift(A)},hide:function(C,A,B){if(this.activeGhost){this.hide.defer(100,
this,[C,A,B]);return}if(this.hidden||this.fireEvent("beforehide",this)===false)return;if(A)this.on("hide",A,B,{single:true});this.hidden=true;if(C!==undefined)this.setAnimateTarget(C);if(this.animateTarget)this.animHide();else{this.el.hide();this.afterHide()}},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader)Ext.EventManager.removeResizeListener(this.onWindowResize,this);if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.keyMap)this.keyMap.disable();
this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(.5);this.proxy.show();var B=this.getBox(false);this.proxy.setBox(B);this.el.hide();var A=this.animateTarget.getBox();A.callback=this.afterHide;A.scope=this;A.duration=.25;A.easing="easeNone";A.block=true;A.opacity=0;this.proxy.shift(A)},onWindowResize:function(){if(this.maximized)this.fitContainer();if(this.modal){this.mask.setSize("100%","100%");var A=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),
Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var B;if(this.constrain)B={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset};else{var A=this.getSize();B={right:-(A.width-100),bottom:-(A.height-25)}}var C=this.el.getConstrainToXY(this.container,true,B);if(C)this.setPosition(C[0],C[1])}},ghost:function(A){var C=this.createGhost(A);var B=this.getBox(true);C.setLeftTop(B.x,B.y);C.setWidth(B.width);this.el.hide();
this.activeGhost=C;return C},unghost:function(B,A){if(B!==false){this.el.show();this.focus();if(Ext.isMac&&Ext.isGecko)this.cascade(this.setAutoScroll)}if(A!==false)this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true));this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this)},close:function(){if(this.fireEvent("beforeclose",this)!==false)this.hide(null,function(){this.fireEvent("close",this);this.destroy()},
this)},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd)this.dd.lock();if(this.collapsible)this.tools.toggle.hide();this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}},restore:function(){if(this.maximized){this.el.removeClass("x-window-maximized");
this.tools.restore.hide();this.tools.maximize.show();this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd)this.dd.unlock();if(this.collapsible)this.tools.toggle.show();this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}},toggleMaximize:function(){this[this.maximized?"restore":"maximize"]()},
fitContainer:function(){var A=this.container.getViewSize();this.setSize(A.width,A.height)},setZIndex:function(A){if(this.modal)this.mask.setStyle("z-index",A);this.el.setZIndex(++A);A+=5;if(this.resizer)this.resizer.proxy.setStyle("z-index",++A);this.lastZIndex=A},alignTo:function(B,A,C){var D=this.el.getAlignToXY(B,A,C);this.setPagePosition(D[0],D[1]);return this},anchorTo:function(C,G,D,B,F){var E=function(){this.alignTo(C,G,D)};Ext.EventManager.onWindowResize(E,this);var A=typeof B;if(A!="undefined")Ext.EventManager.on(window,
"scroll",E,this,{buffer:A=="number"?B:50});E.call(this);this[F]=E;return this},toFront:function(){if(this.manager.bringToFront(this))this.focus();return this},setActive:function(A){if(A){if(!this.maximized)this.el.enableShadow(true);this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var A=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(A[0],A[1]);return this}});
Ext.reg("window",Ext.Window);Ext.Window.DD=function(A){this.win=A;Ext.Window.DD.superclass.constructor.call(this,A.el.id,"WindowDD-"+A.id);this.setHandleElId(A.header.id);this.scroll=false};
Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var A=this.win;this.proxy=A.ghost();if(A.constrain!==false){var C=A.el.shadowOffset;this.constrainTo(A.container,{right:C,left:C,bottom:C})}else if(A.constrainHeader!==false){var B=this.proxy.getSize();this.constrainTo(A.container,{right:-(B.width-this.headerOffsets[0]),bottom:-(B.height-this.headerOffsets[1])})}},b4Drag:Ext.emptyFn,onDrag:function(A){this.alignElWithMouse(this.proxy,A.getPageX(),A.getPageY())},
endDrag:function(A){this.win.unghost();this.win.saveState()}});
Ext.WindowGroup=function(){var F={};var D=[];var E=null;var C=function(I,H){return!I._lastAccess||I._lastAccess<H._lastAccess?-1:1};var G=function(){var J=D,H=J.length;if(H>0){J.sort(C);var I=J[0].manager.zseed;for(var K=0;K<H;K++){var L=J[K];if(L&&!L.hidden)L.setZIndex(I+K*10)}}A()};var B=function(H){if(H!=E){if(E)E.setActive(false);E=H;if(H)H.setActive(true)}};var A=function(){for(var H=D.length-1;H>=0;--H)if(!D[H].hidden){B(D[H]);return}B(null)};return{zseed:9E3,register:function(H){F[H.id]=H;
D.push(H);H.on("hide",A)},unregister:function(H){delete F[H.id];H.un("hide",A);D.remove(H)},get:function(H){return typeof H=="object"?H:F[H]},bringToFront:function(H){H=this.get(H);if(H!=E){H._lastAccess=(new Date).getTime();G();return true}return false},sendToBack:function(H){H=this.get(H);H._lastAccess=-(new Date).getTime();G();return H},hideAll:function(){for(var H in F)if(F[H]&&typeof F[H]!="function"&&F[H].isVisible())F[H].hide()},getActive:function(){return E},getBy:function(J,I){var K=[];for(var H=
D.length-1;H>=0;--H){var L=D[H];if(J.call(I||L,L)!==false)K.push(L)}return K},each:function(I,H){for(var J in F)if(F[J]&&typeof F[J]!="function")if(I.call(H||F[J],F[J])===false)return}}};Ext.WindowMgr=new Ext.WindowGroup;Ext.dd.PanelProxy=function(A,B){this.panel=A;this.id=this.panel.id+"-ddproxy";Ext.apply(this,B)};
Ext.dd.PanelProxy.prototype={insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(undefined,undefined,Ext.getBody());
this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(B,C,A){this.hide();if(typeof C=="function")C.call(A||this)},moveProxy:function(A,B){if(this.proxy)A.insertBefore(this.proxy.dom,B)}};
Ext.Panel.DD=function(B,A){this.panel=B;this.dragData={panel:B};this.proxy=new Ext.dd.PanelProxy(B,A);Ext.Panel.DD.superclass.constructor.call(this,B.el,A);var C=B.header;if(C)this.setHandleElId(C.id);(C?C:this.panel.body).setStyle("cursor","move");this.scroll=false};
Ext.extend(Ext.Panel.DD,Ext.dd.DragSource,{showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(A,B){this.proxy.show()},b4MouseDown:function(B){var A=B.getPageX();var 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.proxy.ghost.dom},endDrag:function(A){this.proxy.hide();this.panel.saveState()},autoOffset:function(A,B){A-=this.startPageX;B-=this.startPageY;this.setDelta(A,B)}});
Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)};
Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(B,A){return typeof this.state[B]=="undefined"?A:this.state[B]},clear:function(A){delete this.state[A];this.fireEvent("statechange",this,A,null)},set:function(A,B){this.state[A]=B;this.fireEvent("statechange",this,A,B)},decodeValue:function(A){var J=/^(a|n|d|b|s|o):(.*)$/;var C=J.exec(unescape(A));if(!C||!C[1])return;var F=C[1];var H=C[2];switch(F){case "n":return parseFloat(H);case "d":return new Date(Date.parse(H));case "b":return H==
"1";case "a":var G=[];var I=H.split("^");for(var B=0,D=I.length;B<D;B++)G.push(this.decodeValue(I[B]));return G;case "o":var G={};var I=H.split("^");for(var B=0,D=I.length;B<D;B++){var E=I[B].split("=");G[E[0]]=this.decodeValue(E[1])}return G;default:return H}},encodeValue:function(C){var B;if(typeof C=="number")B="n:"+C;else if(typeof C=="boolean")B="b:"+(C?"1":"0");else if(Ext.isDate(C))B="d:"+C.toGMTString();else if(Ext.isArray(C)){var F="";for(var E=0,A=C.length;E<A;E++){F+=this.encodeValue(C[E]);
if(E!=A-1)F+="^"}B="a:"+F}else if(typeof C=="object"){var F="";for(var D in C)if(typeof C[D]!="function"&&C[D]!==undefined)F+=D+"="+this.encodeValue(C[D])+"^";B="o:"+F.substring(0,F.length-1)}else B="s:"+C;return escape(B)}});Ext.state.Manager=function(){var A=new Ext.state.Provider;return{setProvider:function(B){A=B},get:function(C,B){return A.get(C,B)},set:function(B,C){A.set(B,C)},clear:function(B){A.clear(B)},getProvider:function(){return A}}}();
Ext.state.CookieProvider=function(A){Ext.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date((new Date).getTime()+1E3*60*60*24*7);this.domain=null;this.secure=false;Ext.apply(this,A);this.state=this.readCookies()};
Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(A,B){if(typeof B=="undefined"||B===null){this.clear(A);return}this.setCookie(A,B);Ext.state.CookieProvider.superclass.set.call(this,A,B)},clear:function(A){this.clearCookie(A);Ext.state.CookieProvider.superclass.clear.call(this,A)},readCookies:function(){var C={};var F=document.cookie+";";var B=/\s?(.*?)=(.*?);/g;var E;while((E=B.exec(F))!=null){var A=E[1];var D=E[2];if(A&&A.substring(0,3)=="ys-")C[A.substr(3)]=this.decodeValue(D)}return C},
setCookie:function(A,B){document.cookie="ys-"+A+"="+this.encodeValue(B)+(this.expires==null?"":"; expires="+this.expires.toGMTString())+(this.path==null?"":"; path="+this.path)+(this.domain==null?"":"; domain="+this.domain)+(this.secure==true?"; secure":"")},clearCookie:function(A){document.cookie="ys-"+A+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+(this.path==null?"":"; path="+this.path)+(this.domain==null?"":"; domain="+this.domain)+(this.secure==true?"; secure":"")}});
Ext.DataView=Ext.extend(Ext.BoxComponent,{selectedClass:"x-view-selected",emptyText:"",deferEmptyText:true,trackOver:false,last:false,initComponent:function(){Ext.DataView.superclass.initComponent.call(this);if(typeof this.tpl=="string")this.tpl=new Ext.XTemplate(this.tpl);this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","selectionchange","beforeselect");this.all=new Ext.CompositeElementLite;this.selected=new Ext.CompositeElementLite},onRender:function(){if(!this.el){this.el=
document.createElement("div");this.el.id=this.id}Ext.DataView.superclass.onRender.apply(this,arguments)},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);this.el.on({"click":this.onClick,"dblclick":this.onDblClick,"contextmenu":this.onContextMenu,scope:this});if(this.overClass||this.trackOver)this.el.on({"mouseover":this.onMouseOver,"mouseout":this.onMouseOut,scope:this});if(this.store)this.setStore(this.store,true)},refresh:function(){this.clearSelections(false,true);this.el.update("");
var A=this.store.getRange();if(A.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText)this.el.update(this.emptyText);this.hasSkippedEmptyText=true;this.all.clear();return}this.tpl.overwrite(this.el,this.collectData(A,0));this.all.fill(Ext.query(this.itemSelector,this.el.dom));this.updateIndexes(0)},prepareData:function(A){return A},collectData:function(B,E){var D=[];for(var C=0,A=B.length;C<A;C++)D[D.length]=this.prepareData(B[C].data,E+C,B[C]);return D},bufferRender:function(A){var B=document.createElement("div");
this.tpl.overwrite(B,this.collectData(A));return Ext.query(this.itemSelector,B)},onUpdate:function(F,A){var B=this.store.indexOf(A);var E=this.isSelected(B);var C=this.all.elements[B];var D=this.bufferRender([A],B)[0];this.all.replaceElement(B,D,true);if(E){this.selected.replaceElement(C,D);this.all.item(B).addClass(this.selectedClass)}this.updateIndexes(B,B)},onAdd:function(E,C,D){if(this.all.getCount()==0){this.refresh();return}var B=this.bufferRender(C,D),F,A=this.all.elements;if(D<this.all.getCount()){F=
this.all.item(D).insertSibling(B,"before",true);A.splice.apply(A,[D,0].concat(B))}else{F=this.all.last().insertSibling(B,"after",true);A.push.apply(A,B)}this.updateIndexes(D)},onRemove:function(C,A,B){this.deselect(B);this.all.removeElement(B,true);this.updateIndexes(B)},refreshNode:function(A){this.onUpdate(this.store,this.store.getAt(A))},updateIndexes:function(D,C){var B=this.all.elements;D=D||0;C=C||(C===0?0:B.length-1);for(var A=D;A<=C;A++)B[A].viewIndex=A},setStore:function(A,B){if(!B&&this.store){this.store.un("beforeload",
this.onBeforeLoad,this);this.store.un("datachanged",this.refresh,this);this.store.un("add",this.onAdd,this);this.store.un("remove",this.onRemove,this);this.store.un("update",this.onUpdate,this);this.store.un("clear",this.refresh,this)}if(A){A=Ext.StoreMgr.lookup(A);A.on("beforeload",this.onBeforeLoad,this);A.on("datachanged",this.refresh,this);A.on("add",this.onAdd,this);A.on("remove",this.onRemove,this);A.on("update",this.onUpdate,this);A.on("clear",this.refresh,this)}this.store=A;if(A)this.refresh()},
findItemFromChild:function(A){return Ext.fly(A).findParent(this.itemSelector,this.el)},onClick:function(C){var B=C.getTarget(this.itemSelector,this.el);if(B){var A=this.indexOf(B);if(this.onItemClick(B,A,C)!==false)this.fireEvent("click",this,A,B,C)}else if(this.fireEvent("containerclick",this,C)!==false)this.clearSelections()},onContextMenu:function(B){var A=B.getTarget(this.itemSelector,this.el);if(A)this.fireEvent("contextmenu",this,this.indexOf(A),A,B)},onDblClick:function(B){var A=B.getTarget(this.itemSelector,
this.el);if(A)this.fireEvent("dblclick",this,this.indexOf(A),A,B)},onMouseOver:function(B){var A=B.getTarget(this.itemSelector,this.el);if(A&&A!==this.lastItem){this.lastItem=A;Ext.fly(A).addClass(this.overClass);this.fireEvent("mouseenter",this,this.indexOf(A),A,B)}},onMouseOut:function(A){if(this.lastItem)if(!A.within(this.lastItem,true)){Ext.fly(this.lastItem).removeClass(this.overClass);this.fireEvent("mouseleave",this,this.indexOf(this.lastItem),this.lastItem,A);delete this.lastItem}},onItemClick:function(B,
A,C){if(this.fireEvent("beforeclick",this,A,B,C)===false)return false;if(this.multiSelect){this.doMultiSelection(B,A,C);C.preventDefault()}else if(this.singleSelect){this.doSingleSelection(B,A,C);C.preventDefault()}return true},doSingleSelection:function(B,A,C){if(C.ctrlKey&&this.isSelected(A))this.deselect(A);else this.select(A,false)},doMultiSelection:function(C,A,D){if(D.shiftKey&&this.last!==false){var B=this.last;this.selectRange(B,A,D.ctrlKey);this.last=B}else if((D.ctrlKey||this.simpleSelect)&&
this.isSelected(A))this.deselect(A);else this.select(A,D.ctrlKey||D.shiftKey||this.simpleSelect)},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){var B=[],D=this.selected.elements;for(var C=0,A=D.length;C<A;C++)B.push(D[C].viewIndex);return B},getSelectedRecords:function(){var D=[],C=this.selected.elements;for(var B=0,A=C.length;B<A;B++)D[D.length]=this.store.getAt(C[B].viewIndex);return D},getRecords:function(B){var E=
[],D=B;for(var C=0,A=D.length;C<A;C++)E[E.length]=this.store.getAt(D[C].viewIndex);return E},getRecord:function(A){return this.store.getAt(A.viewIndex)},clearSelections:function(A,B){if((this.multiSelect||this.singleSelect)&&this.selected.getCount()>0){if(!B)this.selected.removeClass(this.selectedClass);this.selected.clear();this.last=false;if(!A)this.fireEvent("selectionchange",this,this.selected.elements)}},isSelected:function(A){return this.selected.contains(this.getNode(A))},deselect:function(A){if(this.isSelected(A)){A=
this.getNode(A);this.selected.removeElement(A);if(this.last==A.viewIndex)this.last=false;Ext.fly(A).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(D,F,B){if(Ext.isArray(D)){if(!F)this.clearSelections(true);for(var C=0,A=D.length;C<A;C++)this.select(D[C],true,true);if(!B)this.fireEvent("selectionchange",this,this.selected.elements)}else{var E=this.getNode(D);if(!F)this.clearSelections(true);if(E&&!this.isSelected(E))if(this.fireEvent("beforeselect",
this,E,this.selected.elements)!==false){Ext.fly(E).addClass(this.selectedClass);this.selected.add(E);this.last=E.viewIndex;if(!B)this.fireEvent("selectionchange",this,this.selected.elements)}}},selectRange:function(C,A,B){if(!B)this.clearSelections(true);this.select(this.getNodes(C,A),true)},getNode:function(A){if(typeof A=="string")return document.getElementById(A);else if(typeof A=="number")return this.all.elements[A];return A},getNodes:function(E,A){var D=this.all.elements;E=E||0;A=typeof A=="undefined"?
Math.max(D.length-1,0):A;var B=[],C;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(typeof A.viewIndex=="number")return A.viewIndex;return this.all.indexOf(A)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.el.update('<div class="loading-indicator">'+this.loadingText+"</div>");this.all.clear()}},onDestroy:function(){Ext.DataView.superclass.onDestroy.call(this);this.setStore(null)}});
Ext.reg("dataview",Ext.DataView);Ext.ColorPalette=function(A){Ext.ColorPalette.superclass.constructor.call(this,A);this.addEvents("select");if(this.handler)this.on("select",this.handler,this.scope,true)};
Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",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"],onRender:function(B,A){var C=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on">&#160;</span></em></a></tpl>');var D=document.createElement("div");D.className=this.itemCls;C.overwrite(D,this.colors);B.dom.insertBefore(D,A);this.el=Ext.get(D);this.el.on(this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click")this.el.on("click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})},
afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var A=this.value;this.value=null;this.select(A)}},handleClick:function(B,A){B.preventDefault();if(!this.disabled){var C=A.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(C.toUpperCase())}},select:function(A){A=A.replace("#","");if(A!=this.value||this.allowReselect){var B=this.el;if(this.value)B.child("a.color-"+this.value).removeClass("x-color-palette-sel");B.child("a.color-"+A).addClass("x-color-palette-sel");
this.value=A;this.fireEvent("select",this,A)}}});Ext.reg("colorpalette",Ext.ColorPalette);
Ext.DatePicker=Ext.extend(Ext.Component,{todayText:"Today",okText:"&#160;OK&#160;",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",constrainToViewport:true,monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",
startDay:0,showToday:true,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime():(new Date).clearTime();this.addEvents("select");if(this.handler)this.on("select",this.handler,this.scope||this);this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;B<A.length;B++){C+=A[B];if(B!=A.length-1)C+="|"}this.disabledDatesRE=new RegExp(C+")")}},setDisabledDates:function(A){if(Ext.isArray(A)){this.disabledDates=
A;this.disabledDatesRE=null}else this.disabledDatesRE=A;this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(A){this.disabledDays=A;this.update(this.value,true)},setMinDate:function(A){this.minDate=A;this.update(this.value,true)},setMaxDate:function(A){this.maxDate=A;this.update(this.value,true)},setValue:function(B){var A=this.value;this.value=B.clearTime(true);if(this.el)this.update(this.value)},getValue:function(){return this.value},focus:function(){if(this.el)this.update(this.activeDate)},
onRender:function(A,F){var C=['<table cellspacing="0">','<tr><td class="x-date-left"><a href="#" title="',this.prevText,'">&#160;</a></td><td class="x-date-middle" align="center"></td><td class="x-date-right"><a href="#" title="',this.nextText,'">&#160;</a></td></tr>','<tr><td colspan="3"><table class="x-date-inner" cellspacing="0"><thead><tr>'];var E=this.dayNames;for(var D=0;D<7;D++){var G=this.startDay+D;if(G>6)G=G-7;C.push("<th><span>",E[G].substr(0,1),"</span></th>")}C[C.length]="</tr></thead><tbody><tr>";
for(var D=0;D<42;D++){if(D%7==0&&D!=0)C[C.length]="</tr><tr>";C[C.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>'}C.push("</tr></tbody></table></td></tr>",this.showToday?'<tr><td colspan="3" class="x-date-bottom" align="center"></td></tr>':"",'</table><div class="x-date-mp"></div>');var B=document.createElement("div");B.className="x-date-picker";B.innerHTML=C.join("");A.dom.insertBefore(B,F);this.el=Ext.get(B);this.eventEl=Ext.get(B.firstChild);
new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.eventEl.on("mousewheel",this.handleMouseWheel,this);this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");var I=new Ext.KeyNav(this.eventEl,{"left":function(J){J.ctrlKey?this.showPrevMonth():
this.update(this.activeDate.add("d",-1))},"right":function(J){J.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1))},"up":function(J){J.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7))},"down":function(J){J.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7))},"pageUp":function(J){this.showNextMonth()},"pageDown":function(J){this.showPrevMonth()},"enter":function(J){J.stopPropagation();return true},scope:this});this.eventEl.on("click",this.handleDateClick,
this,{delegate:"a.x-date-date"});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:"&#160;",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.on("click",this.showMonthPicker,this);this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,
this.selectToday,this);var H=(new Date).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,H),tooltip:String.format(this.todayTip,H),handler:this.selectToday,scope:this})}if(Ext.isIE)this.el.repaint();this.update(this.value)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var A=['<table border="0" cellspacing="0">'];for(var B=0;B<6;B++)A.push('<tr><td class="x-date-mp-month"><a href="#">',this.monthNames[B].substr(0,
3),"</a></td>",'<td class="x-date-mp-month x-date-mp-sep"><a href="#">',this.monthNames[B+6].substr(0,3),"</a></td>",B==0?'<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-prev"></a></td><td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-next"></a></td></tr>':'<td class="x-date-mp-year"><a href="#"></a></td><td class="x-date-mp-year"><a href="#"></a></td></tr>');A.push('<tr class="x-date-mp-btns"><td colspan="4"><button type="button" class="x-date-mp-ok">',this.okText,'</button><button type="button" class="x-date-mp-cancel">',
this.cancelText,"</button></td></tr>","</table>");this.monthPicker.update(A.join(""));this.monthPicker.on("click",this.onMonthClick,this);this.monthPicker.on("dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(C,D,E){E+=1;if(E%2==0)C.dom.xmonth=5+Math.round(E*.5);else C.dom.xmonth=Math.round((E-1)*.5)})}},showMonthPicker:function(){this.createMonthPicker();var A=this.el.getSize();
this.monthPicker.setSize(A);this.monthPicker.child("table").setSize(A);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:.2})},updateMPYear:function(E){this.mpyear=E;var C=this.mpYears.elements;for(var B=1;B<=10;B++){var D=C[B-1],A;if(B%2==0){A=E+Math.round(B*.5);D.firstChild.innerHTML=A;D.xyear=A}else{A=E-(5-Math.round(B*.5));
D.firstChild.innerHTML=A;D.xyear=A}this.mpYears.item(B-1)[A==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(A){this.mpMonths.each(function(B,C,D){B[B.dom.xmonth==A?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(A){},onMonthClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(C.is("button.x-date-mp-cancel"))this.hideMonthPicker();else if(C.is("button.x-date-mp-ok")){var E=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||
this.value).getDate());if(E.getMonth()!=this.mpSelMonth)E=(new Date(this.mpSelYear,this.mpSelMonth,1)).getLastDateOfMonth();this.update(E);this.hideMonthPicker()}else if(A=C.up("td.x-date-mp-month",2)){this.mpMonths.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelMonth=A.dom.xmonth}else if(A=C.up("td.x-date-mp-year",2)){this.mpYears.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelYear=A.dom.xyear}else if(C.is("a.x-date-mp-prev"))this.updateMPYear(this.mpyear-
10);else if(C.is("a.x-date-mp-next"))this.updateMPYear(this.mpyear+10)},onMonthDblClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(A=C.up("td.x-date-mp-month",2)){this.update(new Date(this.mpSelYear,A.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else if(A=C.up("td.x-date-mp-year",2)){this.update(new Date(A.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}},hideMonthPicker:function(A){if(this.monthPicker)if(A===
true)this.monthPicker.hide();else this.monthPicker.slideOut("t",{duration:.2})},showPrevMonth:function(A){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(A){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(A){var B=A.getWheelDelta();if(B>0){this.showPrevMonth();A.stopEvent()}else if(B<0){this.showNextMonth();A.stopEvent()}},handleDateClick:function(B,
A){B.stopEvent();if(A.dateValue&&!Ext.fly(A.parentNode).hasClass("x-date-disabled")){this.setValue(new Date(A.dateValue));this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue((new Date).clearTime());this.fireEvent("select",this,this.value)}},update:function(a,U){var A=this.activeDate;this.activeDate=a;if(!U&&A&&this.el){var K=a.getTime();if(A.getMonth()==a.getMonth()&&A.getFullYear()==a.getFullYear()){this.cells.removeClass("x-date-selected");
this.cells.each(function(d){if(d.dom.firstChild.dateValue==K){d.addClass("x-date-selected");setTimeout(function(){try{d.dom.firstChild.focus()}catch(f){}},50);return false}});return}}var G=a.getDaysInMonth();var L=a.getFirstDateOfMonth();var D=L.getDay()-this.startDay;if(D<=this.startDay)D+=7;var V=a.add("mo",-1);var E=V.getDaysInMonth()-D;var C=this.cells.elements;var M=this.textNodes;G+=D;var R=864E5;var X=(new Date(V.getFullYear(),V.getMonth(),E)).clearTime();var W=(new Date).clearTime().getTime();
var P=a.clearTime().getTime();var O=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var S=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var Z=this.disabledDatesRE;var N=this.disabledDatesText;var c=this.disabledDays?this.disabledDays.join(""):false;var Y=this.disabledDaysText;var T=this.format;if(this.showToday){var I=(new Date).clearTime();var B=I<O||I>S||Z&&T&&Z.test(I.dateFormat(T))||c&&c.indexOf(I.getDay())!=-1;this.todayBtn.setDisabled(B);this.todayKeyListener[B?
"disable":"enable"]()}var H=function(g,d){d.title="";var e=X.getTime();d.firstChild.dateValue=e;if(e==W){d.className+=" x-date-today";d.title=g.todayText}if(e==P){d.className+=" x-date-selected";setTimeout(function(){try{d.firstChild.focus()}catch(h){}},50)}if(e<O){d.className=" x-date-disabled";d.title=g.minText;return}if(e>S){d.className=" x-date-disabled";d.title=g.maxText;return}if(c)if(c.indexOf(X.getDay())!=-1){d.title=Y;d.className=" x-date-disabled"}if(Z&&T){var f=X.dateFormat(T);if(Z.test(f)){d.title=
N.replace("%0",f);d.className=" x-date-disabled"}}};var Q=0;for(;Q<D;Q++){M[Q].innerHTML=++E;X.setDate(X.getDate()+1);C[Q].className="x-date-prevday";H(this,C[Q])}for(;Q<G;Q++){intDay=Q-D+1;M[Q].innerHTML=intDay;X.setDate(X.getDate()+1);C[Q].className="x-date-active";H(this,C[Q])}var b=0;for(;Q<42;Q++){M[Q].innerHTML=++b;X.setDate(X.getDate()+1);C[Q].className="x-date-nextday";H(this,C[Q])}this.mbtn.setText(this.monthNames[a.getMonth()]+" "+a.getFullYear());if(!this.internalRender){var F=this.el.dom.firstChild;
var J=F.offsetWidth;this.el.setWidth(J+this.el.getBorderWidth("lr"));Ext.fly(F).setWidth(J);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){F.rows[0].cells[1].style.width=J-(F.rows[0].cells[0].offsetWidth+F.rows[0].cells[2].offsetWidth)+"px";this.secondPass=true;this.update.defer(10,this,[a])}}},beforeDestroy:function(){if(this.rendered)Ext.destroy(this.mbtn,this.todayBtn)}});Ext.reg("datepicker",Ext.DatePicker);
Ext.TabPanel=Ext.extend(Ext.Panel,{monitorResize:true,deferredRender:true,tabWidth:120,minTabWidth:30,resizeTabs:false,enableTabScroll:false,scrollIncrement:0,scrollRepeatInterval:400,scrollDuration:.35,animScroll:true,tabPosition:"top",baseCls:"x-tab-panel",autoTabs:false,autoTabSelector:"div.x-tab",activeTab:null,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:"__",itemCls:"x-tab-item",elements:"body",headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;
Ext.TabPanel.superclass.initComponent.call(this);this.addEvents("beforetabchange","tabchange","contextmenu");this.setLayout(new Ext.layout.CardLayout({deferredRender:this.deferredRender}));if(this.tabPosition=="top"){this.elements+=",header";this.stripTarget="header"}else{this.elements+=",footer";this.stripTarget="footer"}if(!this.stack)this.stack=Ext.TabPanel.AccessStack();this.initItems()},render:function(){Ext.TabPanel.superclass.render.apply(this,arguments);if(this.activeTab!==undefined){var A=
this.activeTab;delete this.activeTab;this.setActiveTab(A)}},onRender:function(C,A){Ext.TabPanel.superclass.onRender.call(this,C,A);if(this.plain){var F=this.tabPosition=="top"?"header":"footer";this[F].addClass("x-tab-panel-"+F+"-plain")}var B=this[this.stripTarget];this.stripWrap=B.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});var E=this.tabPosition=="bottom"?this.stripWrap:null;this.stripSpacer=B.createChild({cls:"x-tab-strip-spacer"},E);this.strip=
new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge"});this.strip.createChild({cls:"x-clear"});this.body.addClass("x-tab-panel-body-"+this.tabPosition);if(!this.itemTpl){var D=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',
"</em></a></li>");D.disableFormats=true;D.compile();Ext.TabPanel.prototype.itemTpl=D}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs)this.readTabs(false)},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.on("add",this.onAdd,this);this.on("remove",this.onRemove,this);this.strip.on("mousedown",this.onStripMouseDown,this);this.strip.on("contextmenu",this.onStripContextMenu,this);if(this.enableTabScroll)this.strip.on("mousewheel",
this.onWheel,this)},findTargets:function(C){var B=null;var A=C.getTarget("li",this.strip);if(A){B=this.getComponent(A.id.split(this.idDelimiter)[1]);if(B.disabled)return{close:null,item:null,el:null}}return{close:C.getTarget(".x-tab-strip-close",this.strip),item:B,el:A}},onStripMouseDown:function(B){if(B.button!=0)return;B.preventDefault();var A=this.findTargets(B);if(A.close){this.remove(A.item);return}if(A.item&&A.item!=this.activeTab)this.setActiveTab(A.item)},onStripContextMenu:function(B){B.preventDefault();
var A=this.findTargets(B);if(A.item)this.fireEvent("contextmenu",this,A.item,B)},readTabs:function(D){if(D===true)this.items.each(function(G){this.remove(G)},this);var C=this.el.query(this.autoTabSelector);for(var B=0,A=C.length;B<A;B++){var E=C[B];var F=E.getAttribute("title");E.removeAttribute("title");this.add({title:F,el:E})}},initTab:function(D,B){var E=this.strip.dom.childNodes[B];var A=D.closable?"x-tab-strip-closable":"";if(D.disabled)A+=" x-item-disabled";if(D.iconCls)A+=" x-tab-with-icon";
if(D.tabCls)A+=" "+D.tabCls;var F={id:this.id+this.idDelimiter+D.getItemId(),text:D.title,cls:A,iconCls:D.iconCls||""};var C=E?this.itemTpl.insertBefore(E,F):this.itemTpl.append(this.strip,F);Ext.fly(C).addClassOnOver("x-tab-strip-over");if(D.tabTip)Ext.fly(C).child("span.x-tab-strip-text",true).qtip=D.tabTip;D.on("disable",this.onItemDisabled,this);D.on("enable",this.onItemEnabled,this);D.on("titlechange",this.onItemTitleChanged,this);D.on("beforeshow",this.onBeforeShowItem,this)},onAdd:function(C,
B,A){this.initTab(B,A);if(this.items.getCount()==1)this.syncSize();this.delegateUpdates()},onBeforeAdd:function(B){var A=B.events?this.items.containsKey(B.getItemId())?B:null:this.items.get(B);if(A){this.setActiveTab(B);return false}Ext.TabPanel.superclass.onBeforeAdd.apply(this,arguments);var C=B.elements;B.elements=C?C.replace(",header",""):C;B.border=B.border===true},onRemove:function(C,B){Ext.removeNode(this.getTabEl(B));this.stack.remove(B);B.un("disable",this.onItemDisabled,this);B.un("enable",
this.onItemEnabled,this);B.un("titlechange",this.onItemTitleChanged,this);B.un("beforeshow",this.onBeforeShowItem,this);if(B==this.activeTab){var A=this.stack.next();if(A)this.setActiveTab(A);else this.setActiveTab(0)}this.delegateUpdates()},onBeforeShowItem:function(A){if(A!=this.activeTab){this.setActiveTab(A);return false}},onItemDisabled:function(B){var A=this.getTabEl(B);if(A)Ext.fly(A).addClass("x-item-disabled");this.stack.remove(B)},onItemEnabled:function(B){var A=this.getTabEl(B);if(A)Ext.fly(A).removeClass("x-item-disabled")},
onItemTitleChanged:function(B){var A=this.getTabEl(B);if(A)Ext.fly(A).child("span.x-tab-strip-text",true).innerHTML=B.title},getTabEl:function(A){var B=typeof A==="number"?this.items.items[A].getItemId():A.getItemId();return document.getElementById(this.id+this.idDelimiter+B)},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(B){B=
this.getComponent(B);var A=this.getTabEl(B);if(A){A.style.display="none";this.delegateUpdates()}this.stack.remove(B)},unhideTabStripItem:function(B){B=this.getComponent(B);var A=this.getTabEl(B);if(A){A.style.display="";this.delegateUpdates()}},delegateUpdates:function(){if(this.suspendUpdates)return;if(this.resizeTabs&&this.rendered)this.autoSizeTabs();if(this.enableTabScroll&&this.rendered)this.autoScrollTabs()},autoSizeTabs:function(){var G=this.items.length;var B=this.tabPosition!="bottom"?"header":
"footer";var C=this[B].dom.offsetWidth;var A=this[B].dom.clientWidth;if(!this.resizeTabs||G<1||!A)return;var I=Math.max(Math.min(Math.floor((A-4)/G)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=I;var K=this.stripWrap.dom.getElementsByTagName("li");for(var E=0,H=K.length-1;E<H;E++){var J=K[E];var L=J.childNodes[1].firstChild.firstChild;var F=J.offsetWidth;var D=L.offsetWidth;L.style.width=I-(F-D)+"px"}},adjustBodyWidth:function(A){if(this.header)this.header.setWidth(A);if(this.footer)this.footer.setWidth(A);
return A},setActiveTab:function(C){C=this.getComponent(C);if(!C||this.fireEvent("beforetabchange",this,C,this.activeTab)===false)return;if(!this.rendered){this.activeTab=C;return}if(this.activeTab!=C){if(this.activeTab){var A=this.getTabEl(this.activeTab);if(A)Ext.fly(A).removeClass("x-tab-strip-active");this.activeTab.fireEvent("deactivate",this.activeTab)}var B=this.getTabEl(C);Ext.fly(B).addClass("x-tab-strip-active");this.activeTab=C;this.stack.add(C);this.layout.setActiveItem(C);if(this.layoutOnTabChange&&
C.doLayout)C.doLayout();if(this.scrolling)this.scrollToTab(C,this.animScroll);C.fireEvent("activate",C);this.fireEvent("tabchange",this,C)}},getActiveTab:function(){return this.activeTab||null},getItem:function(A){return this.getComponent(A)},autoScrollTabs:function(){var G=this.items.length;var D=this.header.dom.offsetWidth;var C=this.header.dom.clientWidth;var F=this.stripWrap;var E=F.dom;var B=E.offsetWidth;var H=this.getScrollPos();var A=this.edge.getOffsetsTo(this.stripWrap)[0]+H;if(!this.enableTabScroll||
G<1||B<20)return;if(A<=C){E.scrollLeft=0;F.setWidth(C);if(this.scrolling){this.scrolling=false;this.header.removeClass("x-tab-scrolling");this.scrollLeft.hide();this.scrollRight.hide();if(Ext.isAir){E.style.marginLeft="";E.style.marginRight=""}}}else{if(!this.scrolling){this.header.addClass("x-tab-scrolling");if(Ext.isAir){E.style.marginLeft="18px";E.style.marginRight="18px"}}C-=F.getMargins("lr");F.setWidth(C>20?C:20);if(!this.scrolling)if(!this.scrollLeft)this.createScrollers();else{this.scrollLeft.show();
this.scrollRight.show()}this.scrolling=true;if(H>A-C)E.scrollLeft=A-C;else this.scrollToTab(this.activeTab,false);this.updateScrollButtons()}},createScrollers:function(){var C=this.stripWrap.dom.offsetHeight;var A=this.header.insertFirst({cls:"x-tab-scroller-left"});A.setHeight(C);A.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(A,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=A;var B=this.header.insertFirst({cls:"x-tab-scroller-right"});
B.setHeight(C);B.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(B,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=B},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,
callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(E,A){if(!E)return;var C=this.getTabEl(E);var G=this.getScrollPos(),D=this.getScrollArea();var F=Ext.fly(C).getOffsetsTo(this.stripWrap)[0]+G;var B=F+C.offsetWidth;if(F<G)this.scrollTo(F,A);else if(B>G+D)this.scrollTo(B-D,A)},scrollTo:function(B,A){this.stripWrap.scrollTo("left",B,A?this.getScrollAnim():false);if(!A)this.updateScrollButtons()},
onWheel:function(D){var E=D.getWheelDelta()*this.wheelIncrement*-1;D.stopEvent();var F=this.getScrollPos();var C=F+E;var A=this.getScrollWidth()-this.getScrollArea();var B=Math.max(0,Math.min(A,C));if(B!=F)this.scrollTo(B,false)},onScrollRight:function(){var A=this.getScrollWidth()-this.getScrollArea();var C=this.getScrollPos();var B=Math.min(A,C+this.getScrollIncrement());if(B!=C)this.scrollTo(B,this.animScroll)},onScrollLeft:function(){var B=this.getScrollPos();var A=Math.max(0,B-this.getScrollIncrement());
if(A!=B)this.scrollTo(A,this.animScroll)},updateScrollButtons:function(){var A=this.getScrollPos();this.scrollLeft[A==0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[A>=this.getScrollWidth()-this.getScrollArea()?"addClass":"removeClass"]("x-tab-scroller-right-disabled")}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;
Ext.TabPanel.AccessStack=function(){var A=[];return{add:function(B){A.push(B);if(A.length>10)A.shift()},remove:function(E){var D=[];for(var C=0,B=A.length;C<B;C++)if(A[C]!=E)D.push(A[C]);A=D},next:function(){return A.pop()}}};
Ext.Button=Ext.extend(Ext.Component,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first",initComponent:function(){Ext.Button.superclass.initComponent.call(this);this.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(this.menu)this.menu=Ext.menu.MenuMgr.get(this.menu);if(typeof this.toggleGroup===
"string")this.enableToggle=true},onRender:function(C,A){if(!this.template){if(!Ext.Button.buttonTemplate)Ext.Button.buttonTemplate=new Ext.Template('<table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap"><tbody><tr>','<td class="x-btn-left"><i>&#160;</i></td><td class="x-btn-center"><em unselectable="on"><button class="x-btn-text" type="{1}">{0}</button></em></td><td class="x-btn-right"><i>&#160;</i></td>',"</tr></tbody></table>");this.template=Ext.Button.buttonTemplate}var B,E=[this.text||
"&#160;",this.type];if(A)B=this.template.insertBefore(A,E,true);else B=this.template.append(C,E,true);var D=B.child(this.buttonSelector);D.on("focus",this.onFocus,this);D.on("blur",this.onBlur,this);this.initButtonEl(B,D);if(this.menu)this.el.child(this.menuClassTarget).addClass("x-btn-with-menu");Ext.ButtonToggleMgr.register(this)},initButtonEl:function(B,C){this.el=B;B.addClass("x-btn");if(this.icon)C.setStyle("background-image","url("+this.icon+")");if(this.iconCls){C.addClass(this.iconCls);if(!this.cls)B.addClass(this.text?
"x-btn-text-icon":"x-btn-icon")}if(this.tabIndex!==undefined)C.dom.tabIndex=this.tabIndex;if(this.tooltip)if(typeof this.tooltip=="object")Ext.QuickTips.register(Ext.apply({target:C.id},this.tooltip));else C.dom[this.tooltipType]=this.tooltip;if(this.pressed)this.el.addClass("x-btn-pressed");if(this.handleMouseEvents){B.on("mouseover",this.onMouseOver,this);B.on("mousedown",this.onMouseDown,this)}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}if(this.id)this.el.dom.id=
this.el.id=this.id;if(this.repeat){var A=new Ext.util.ClickRepeater(B,typeof this.repeat=="object"?this.repeat:{});A.on("click",this.onClick,this)}B.on(this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);if(Ext.isIE6)this.autoWidth.defer(1,this);else this.autoWidth()},setIconClass:function(A){if(this.el)this.el.child(this.buttonSelector).replaceClass(this.iconCls,A);this.iconCls=A},beforeDestroy:function(){if(this.rendered){var A=this.el.child(this.buttonSelector);
if(A)A.removeAllListeners()}if(this.menu)Ext.destroy(this.menu)},onDestroy:function(){if(this.rendered)Ext.ButtonToggleMgr.unregister(this)},autoWidth:function(){if(this.el){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth)if(this.el.getWidth()<this.minWidth)this.el.setWidth(this.minWidth)}},setHandler:function(B,A){this.handler=
B;this.scope=A},setText:function(A){this.text=A;if(this.el)this.el.child("td.x-btn-center "+this.buttonSelector).update(A);this.autoWidth()},getText:function(){return this.text},toggle:function(A){A=A===undefined?!this.pressed:A;if(A!=this.pressed){if(A){this.el.addClass("x-btn-pressed");this.pressed=true;this.fireEvent("toggle",this,true)}else{this.el.removeClass("x-btn-pressed");this.pressed=false;this.fireEvent("toggle",this,false)}if(this.toggleHandler)this.toggleHandler.call(this.scope||this,
this,A)}},focus:function(){this.el.child(this.buttonSelector).focus()},onDisable:function(){if(this.el){if(!Ext.isIE6||!this.text)this.el.addClass(this.disabledClass);this.el.dom.disabled=true}this.disabled=true},onEnable:function(){if(this.el){if(!Ext.isIE6||!this.text)this.el.removeClass(this.disabledClass);this.el.dom.disabled=false}this.disabled=false},showMenu:function(){if(this.menu)this.menu.show(this.el,this.menuAlign);return this},hideMenu:function(){if(this.menu)this.menu.hide();return this},
hasVisibleMenu:function(){return this.menu&&this.menu.isVisible()},onClick:function(A){if(A)A.preventDefault();if(A.button!=0)return;if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed))this.toggle();if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick)this.showMenu();this.fireEvent("click",this,A);if(this.handler)this.handler.call(this.scope||this,this,A)}},isMenuTriggerOver:function(B,A){return this.menu&&!A},isMenuTriggerOut:function(B,A){return this.menu&&
!A},onMouseOver:function(B){if(!this.disabled){var A=B.within(this.el,true);if(!A){this.el.addClass("x-btn-over");if(!this.monitoringMouseOver){Ext.getDoc().on("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=true}this.fireEvent("mouseover",this,B)}if(this.isMenuTriggerOver(B,A))this.fireEvent("menutriggerover",this,this.menu,B)}},monitorMouseOver:function(A){if(A.target!=this.el.dom&&!A.within(this.el)){if(this.monitoringMouseOver){Ext.getDoc().un("mouseover",this.monitorMouseOver,
this);this.monitoringMouseOver=false}this.onMouseOut(A)}},onMouseOut:function(B){var A=B.within(this.el)&&B.target!=this.el.dom;this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,B);if(this.isMenuTriggerOut(B,A))this.fireEvent("menutriggerout",this,this.menu,B)},onFocus:function(A){if(!this.disabled)this.el.addClass("x-btn-focus")},onBlur:function(A){this.el.removeClass("x-btn-focus")},getClickEl:function(B,A){return this.el},onMouseDown:function(A){if(!this.disabled&&A.button==0){this.getClickEl(A).addClass("x-btn-click");
Ext.getDoc().on("mouseup",this.onMouseUp,this)}},onMouseUp:function(A){if(A.button==0){this.getClickEl(A,true).removeClass("x-btn-click");Ext.getDoc().un("mouseup",this.onMouseUp,this)}},onMenuShow:function(A){this.ignoreNextClick=0;this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu)},onMenuHide:function(A){this.el.removeClass("x-btn-menu-active");this.ignoreNextClick=this.restoreClick.defer(250,this);this.fireEvent("menuhide",this,this.menu)},restoreClick:function(){this.ignoreNextClick=
0}});Ext.reg("button",Ext.Button);Ext.ButtonToggleMgr=function(){var A={};function B(E,G){if(G){var F=A[E.toggleGroup];for(var D=0,C=F.length;D<C;D++)if(F[D]!=E)F[D].toggle(false)}}return{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){D.remove(C);C.un("toggle",B)}}}}();
Ext.SplitButton=Ext.extend(Ext.Button,{arrowSelector:"button:last",initComponent:function(){Ext.SplitButton.superclass.initComponent.call(this);this.addEvents("arrowclick")},onRender:function(D,A){var B=new Ext.Template('<table cellspacing="0" class="x-btn-menu-wrap x-btn"><tr><td>','<table cellspacing="0" class="x-btn-wrap x-btn-menu-text-wrap"><tbody>','<tr><td class="x-btn-left"><i>&#160;</i></td><td class="x-btn-center"><button class="x-btn-text" type="{1}">{0}</button></td></tr>',"</tbody></table></td><td>",
'<table cellspacing="0" class="x-btn-wrap x-btn-menu-arrow-wrap"><tbody>','<tr><td class="x-btn-center"><button class="x-btn-menu-arrow-el" type="button">&#160;</button></td><td class="x-btn-right"><i>&#160;</i></td></tr>',"</tbody></table></td></tr></table>");var C,F=[this.text||"&#160;",this.type];if(A)C=B.insertBefore(A,F,true);else C=B.append(D,F,true);var E=C.child(this.buttonSelector);this.initButtonEl(C,E);this.arrowBtnTable=C.child("table:last");if(this.arrowTooltip)C.child(this.arrowSelector).dom[this.tooltipType]=
this.arrowTooltip},autoWidth:function(){if(this.el){var C=this.el.child("table:first");var B=this.el.child("table:last");this.el.setWidth("auto");C.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth)if(C.getWidth()+B.getWidth()<this.minWidth)C.setWidth(this.minWidth-B.getWidth());this.el.setWidth(C.getWidth()+B.getWidth())}},setArrowHandler:function(B,
A){this.arrowHandler=B;this.scope=A},onClick:function(A){A.preventDefault();if(!this.disabled)if(A.getTarget(".x-btn-menu-arrow-wrap")){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick)this.showMenu();this.fireEvent("arrowclick",this,A);if(this.arrowHandler)this.arrowHandler.call(this.scope||this,this,A)}else{if(this.enableToggle)this.toggle();this.fireEvent("click",this,A);if(this.handler)this.handler.call(this.scope||this,this,A)}},getClickEl:function(B,A){if(!A)return this.lastClickEl=
B.getTarget("table",10,true);return this.lastClickEl},onDisable:function(){if(this.el){if(!Ext.isIE6)this.el.addClass("x-item-disabled");this.el.child(this.buttonSelector).dom.disabled=true;this.el.child(this.arrowSelector).dom.disabled=true}this.disabled=true},onEnable:function(){if(this.el){if(!Ext.isIE6)this.el.removeClass("x-item-disabled");this.el.child(this.buttonSelector).dom.disabled=false;this.el.child(this.arrowSelector).dom.disabled=false}this.disabled=false},isMenuTriggerOver:function(A){return this.menu&&
A.within(this.arrowBtnTable)&&!A.within(this.arrowBtnTable,true)},isMenuTriggerOut:function(B,A){return this.menu&&!B.within(this.arrowBtnTable)},onDestroy:function(){Ext.destroy(this.arrowBtnTable);Ext.SplitButton.superclass.onDestroy.call(this)}});Ext.MenuButton=Ext.SplitButton;Ext.reg("splitbutton",Ext.SplitButton);
Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(A){if(A&&this.showText===true){var B="";if(this.prependText)B+=this.prependText;B+=A.text;return B}return undefined},setActiveItem:function(C,A){if(typeof C!="object")C=this.menu.items.get(C);if(C){if(!this.rendered){this.text=this.getItemText(C);this.iconCls=C.iconCls}else{var B=this.getItemText(C);if(B)this.setText(B);this.setIconClass(C.iconCls)}this.activeItem=C;if(!C.checked)C.setChecked(true,true);if(this.forceIcon)this.setIconClass(this.forceIcon);
if(!A)this.fireEvent("change",this,C)}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var D;for(var B=0,A=this.itemCount;B<A;B++){var C=this.items[B];C.group=C.group||this.id;C.itemIndex=B;C.checkHandler=this.checkHandler;C.scope=this;C.checked=C.checked||false;this.menu.items.push(C);
if(C.checked)D=C}this.setActiveItem(D,true);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this)},checkHandler:function(A,B){if(B)this.setActiveItem(A)},toggleSelected:function(){this.menu.render();var C,A;for(var B=1;B<this.itemCount;B++){C=(this.activeItem.itemIndex+B)%this.itemCount;A=this.menu.items.itemAt(C);if(!A.disabled){A.setChecked(true);break}}}});Ext.reg("cycle",Ext.CycleButton);
Ext.Toolbar=function(A){if(Ext.isArray(A))A={buttons:A};Ext.Toolbar.superclass.constructor.call(this,A)};
(function(){var A=Ext.Toolbar;Ext.extend(A,Ext.BoxComponent,{trackMenus:true,initComponent:function(){A.superclass.initComponent.call(this);if(this.items)this.buttons=this.items;this.items=new Ext.util.MixedCollection(false,function(B){return B.itemId||B.id||Ext.id()})},autoCreate:{cls:"x-toolbar x-small-editor",html:'<table cellspacing="0"><tr></tr></table>'},onRender:function(C,B){this.el=C.createChild(Ext.apply({id:this.id},this.autoCreate),B);this.tr=this.el.child("tr",true)},afterRender:function(){A.superclass.afterRender.call(this);
if(this.buttons){this.add.apply(this,this.buttons);delete this.buttons}},add:function(){var C=arguments,B=C.length;for(var D=0;D<B;D++){var E=C[D];if(E.isFormField)this.addField(E);else if(E.render)this.addItem(E);else if(typeof E=="string")if(E=="separator"||E=="-")this.addSeparator();else if(E==" ")this.addSpacer();else if(E=="->")this.addFill();else this.addText(E);else if(E.tagName)this.addElement(E);else if(typeof E=="object")if(E.xtype)this.addField(Ext.ComponentMgr.create(E,"button"));else this.addButton(E)}},
addSeparator:function(){return this.addItem(new A.Separator)},addSpacer:function(){return this.addItem(new A.Spacer)},addFill:function(){return this.addItem(new A.Fill)},addElement:function(B){return this.addItem(new A.Item(B))},addItem:function(B){var C=this.nextBlock();this.initMenuTracking(B);B.render(C);this.items.add(B);return B},addButton:function(D){if(Ext.isArray(D)){var F=[];for(var E=0,C=D.length;E<C;E++)F.push(this.addButton(D[E]));return F}var B=D;if(!(D instanceof A.Button))B=D.split?
new A.SplitButton(D):new A.Button(D);var G=this.nextBlock();this.initMenuTracking(B);B.render(G);this.items.add(B);return B},initMenuTracking:function(B){if(this.trackMenus&&B.menu)B.on({"menutriggerover":this.onButtonTriggerOver,"menushow":this.onButtonMenuShow,"menuhide":this.onButtonMenuHide,scope:this})},addText:function(B){return this.addItem(new A.TextItem(B))},insertButton:function(C,F){if(Ext.isArray(F)){var E=[];for(var D=0,B=F.length;D<B;D++)E.push(this.insertButton(C+D,F[D]));return E}if(!(F instanceof
A.Button))F=new A.Button(F);var G=document.createElement("td");this.tr.insertBefore(G,this.tr.childNodes[C]);this.initMenuTracking(F);F.render(G);this.items.insert(C,F);return F},addDom:function(C,B){var E=this.nextBlock();Ext.DomHelper.overwrite(E,C);var D=new A.Item(E.firstChild);D.render(E);this.items.add(D);return D},addField:function(C){var D=this.nextBlock();C.render(D);var B=new A.Item(D.firstChild);B.render(D);this.items.add(C);return B},nextBlock:function(){var B=document.createElement("td");
this.tr.appendChild(B);return B},onDestroy:function(){Ext.Toolbar.superclass.onDestroy.call(this);if(this.rendered){if(this.items)Ext.destroy.apply(Ext,this.items.items);Ext.Element.uncache(this.tr)}},onDisable:function(){this.items.each(function(B){if(B.disable)B.disable()})},onEnable:function(){this.items.each(function(B){if(B.enable)B.enable()})},onButtonTriggerOver:function(B){if(this.activeMenuBtn&&this.activeMenuBtn!=B){this.activeMenuBtn.hideMenu();B.showMenu();this.activeMenuBtn=B}},onButtonMenuShow:function(B){this.activeMenuBtn=
B},onButtonMenuHide:function(B){delete this.activeMenuBtn}});Ext.reg("toolbar",Ext.Toolbar);A.Item=function(B){this.el=Ext.getDom(B);this.id=Ext.id(this.el);this.hidden=false};A.Item.prototype={getEl:function(){return this.el},render:function(B){this.td=B;B.appendChild(this.el)},destroy:function(){if(this.td&&this.td.parentNode)this.td.parentNode.removeChild(this.td)},show:function(){this.hidden=false;this.td.style.display=""},hide:function(){this.hidden=true;this.td.style.display="none"},setVisible:function(B){if(B)this.show();
else this.hide()},focus:function(){Ext.fly(this.el).focus()},disable:function(){Ext.fly(this.td).addClass("x-item-disabled");this.disabled=true;this.el.disabled=true},enable:function(){Ext.fly(this.td).removeClass("x-item-disabled");this.disabled=false;this.el.disabled=false}};Ext.reg("tbitem",A.Item);A.Separator=function(){var B=document.createElement("span");B.className="ytb-sep";A.Separator.superclass.constructor.call(this,B)};Ext.extend(A.Separator,A.Item,{enable:Ext.emptyFn,disable:Ext.emptyFn,
focus:Ext.emptyFn});Ext.reg("tbseparator",A.Separator);A.Spacer=function(){var B=document.createElement("div");B.className="ytb-spacer";A.Spacer.superclass.constructor.call(this,B)};Ext.extend(A.Spacer,A.Item,{enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg("tbspacer",A.Spacer);A.Fill=Ext.extend(A.Spacer,{render:function(B){B.style.width="100%";A.Fill.superclass.render.call(this,B)}});Ext.reg("tbfill",A.Fill);A.TextItem=function(B){var C=document.createElement("span");C.className=
"ytb-text";C.innerHTML=B.text?B.text:B;A.TextItem.superclass.constructor.call(this,C)};Ext.extend(A.TextItem,A.Item,{enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg("tbtext",A.TextItem);A.Button=Ext.extend(Ext.Button,{hideParent:true,onDestroy:function(){A.Button.superclass.onDestroy.call(this);if(this.container)this.container.remove()}});Ext.reg("tbbutton",A.Button);A.SplitButton=Ext.extend(Ext.SplitButton,{hideParent:true,onDestroy:function(){A.SplitButton.superclass.onDestroy.call(this);
if(this.container)this.container.remove()}});Ext.reg("tbsplit",A.SplitButton);A.MenuButton=A.SplitButton})();
Ext.PagingToolbar=Ext.extend(Ext.Toolbar,{pageSize:20,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",paramNames:{start:"start",limit:"limit"},initComponent:function(){this.addEvents("change","beforechange");Ext.PagingToolbar.superclass.initComponent.call(this);this.cursor=0;this.bind(this.store)},onRender:function(B,A){Ext.PagingToolbar.superclass.onRender.call(this,
B,A);this.first=this.addButton({tooltip:this.firstText,iconCls:"x-tbar-page-first",disabled:true,handler:this.onClick.createDelegate(this,["first"])});this.prev=this.addButton({tooltip:this.prevText,iconCls:"x-tbar-page-prev",disabled:true,handler:this.onClick.createDelegate(this,["prev"])});this.addSeparator();this.add(this.beforePageText);this.field=Ext.get(this.addDom({tag:"input",type:"text",size:"3",value:"1",cls:"x-tbar-page-number"}).el);this.field.on("keydown",this.onPagingKeydown,this);this.field.on("focus",
function(){this.dom.select()});this.afterTextEl=this.addText(String.format(this.afterPageText,1));this.field.setHeight(18);this.addSeparator();this.next=this.addButton({tooltip:this.nextText,iconCls:"x-tbar-page-next",disabled:true,handler:this.onClick.createDelegate(this,["next"])});this.last=this.addButton({tooltip:this.lastText,iconCls:"x-tbar-page-last",disabled:true,handler:this.onClick.createDelegate(this,["last"])});this.addSeparator();this.loading=this.addButton({tooltip:this.refreshText,
iconCls:"x-tbar-loading",handler:this.onClick.createDelegate(this,["refresh"])});if(this.displayInfo)this.displayEl=Ext.fly(this.el.dom).createChild({cls:"x-paging-info"});if(this.dsLoaded)this.onLoad.apply(this,this.dsLoaded)},updateInfo:function(){if(this.displayEl){var A=this.store.getCount();var B=A==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+A,this.store.getTotalCount());this.displayEl.update(B)}},onLoad:function(A,C,F){if(!this.rendered){this.dsLoaded=[A,C,F];return}this.cursor=
F.params?F.params[this.paramNames.start]:0;var E=this.getPageData(),B=E.activePage,D=E.pages;this.afterTextEl.el.innerHTML=String.format(this.afterPageText,E.pages);this.field.dom.value=B;this.first.setDisabled(B==1);this.prev.setDisabled(B==1);this.next.setDisabled(B==D);this.last.setDisabled(B==D);this.loading.enable();this.updateInfo();this.fireEvent("change",this,E)},getPageData:function(){var A=this.store.getTotalCount();return{total:A,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),
pages:A<this.pageSize?1:Math.ceil(A/this.pageSize)}},onLoadError:function(){if(!this.rendered)return;this.loading.enable()},readPage:function(C){var A=this.field.dom.value,B;if(!A||isNaN(B=parseInt(A,10))){this.field.dom.value=C.activePage;return false}return B},onPagingKeydown:function(D){var B=D.getKey(),E=this.getPageData(),C;if(B==D.RETURN){D.stopEvent();C=this.readPage(E);if(C!==false){C=Math.min(Math.max(1,C),E.pages)-1;this.doLoad(C*this.pageSize)}}else if(B==D.HOME||B==D.END){D.stopEvent();
C=B==D.HOME?1:E.pages;this.field.dom.value=C}else if(B==D.UP||B==D.PAGEUP||B==D.DOWN||B==D.PAGEDOWN){D.stopEvent();if(C=this.readPage(E)){var A=D.shiftKey?10:1;if(B==D.DOWN||B==D.PAGEDOWN)A*=-1;C+=A;if(C>=1&C<=E.pages)this.field.dom.value=C}}},beforeLoad:function(){if(this.rendered&&this.loading)this.loading.disable()},doLoad:function(C){var B={},A=this.paramNames;B[A.start]=C;B[A.limit]=this.pageSize;if(this.fireEvent("beforechange",this,B)!==false)this.store.load({params:B})},changePage:function(A){this.doLoad(((A-
1)*this.pageSize).constrain(0,this.store.getTotalCount()))},onClick:function(E){var B=this.store;switch(E){case "first":this.doLoad(0);break;case "prev":this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case "next":this.doLoad(this.cursor+this.pageSize);break;case "last":var D=B.getTotalCount();var A=D%this.pageSize;var C=A?D-A:D-this.pageSize;this.doLoad(C);break;case "refresh":this.doLoad(this.cursor);break}},unbind:function(A){A=Ext.StoreMgr.lookup(A);A.un("beforeload",this.beforeLoad,this);
A.un("load",this.onLoad,this);A.un("loadexception",this.onLoadError,this);this.store=undefined},bind:function(A){A=Ext.StoreMgr.lookup(A);A.on("beforeload",this.beforeLoad,this);A.on("load",this.onLoad,this);A.on("loadexception",this.onLoadError,this);this.store=A}});Ext.reg("paging",Ext.PagingToolbar);
Ext.Resizable=function(D,E){this.el=Ext.get(D);if(E&&E.wrap){E.resizeChild=this.el;this.el=this.el.wrap(typeof E.wrap=="object"?E.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=E.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(E.resizeChild.getPositioning());E.resizeChild.clearPositioning();if(!E.width||!E.height){var F=E.resizeChild.getSize();this.el.setSize(F.width,F.height)}if(E.pinned&&!E.adjustments)E.adjustments="auto"}this.proxy=this.el.createProxy({tag:"div",
cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,E);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var I=this.el.getStyle("position");if(I!="absolute"&&I!="fixed")this.el.setStyle("position","relative");if(!this.handles){this.handles="s,e,se";if(this.multiDirectional)this.handles+=",n,w"}if(this.handles=="all")this.handles="n s e w ne nw se sw";var M=this.handles.split(/\s*?[,;]\s*?| /);
var C=Ext.Resizable.positions;for(var H=0,J=M.length;H<J;H++)if(M[H]&&C[M[H]]){var L=C[M[H]];this[L]=new Ext.Resizable.Handle(this,L,this.disableTrackOver,this.transparent)}this.corner=this.southeast;if(this.handles.indexOf("n")!=-1||this.handles.indexOf("w")!=-1)this.updateBox=true;this.activeHandle=null;if(this.resizeChild)if(typeof this.resizeChild=="boolean")this.resizeChild=Ext.get(this.el.dom.firstChild,true);else this.resizeChild=Ext.get(this.resizeChild,true);if(this.adjustments=="auto"){var B=
this.resizeChild;var K=this.west,G=this.east,A=this.north,M=this.south;if(B&&(K||A)){B.position("relative");B.setLeft(K?K.el.getWidth():0);B.setTop(A?A.el.getHeight():0)}this.adjustments=[(G?-G.el.getWidth():0)+(K?-K.el.getWidth():0),(A?-A.el.getHeight():0)+(M?-M.el.getHeight():0)-1]}if(this.draggable){this.dd=this.dynamic?this.el.initDD(null):this.el.initDDProxy(null,{dragElId:this.proxy.id});this.dd.setHandleElId(this.resizeChild?this.resizeChild.id:this.el.id)}this.addEvents("beforeresize","resize");
if(this.width!==null&&this.height!==null)this.resizeTo(this.width,this.height);else this.updateChildSize();if(Ext.isIE)this.el.dom.style.zoom=1;Ext.Resizable.superclass.constructor.call(this)};
Ext.extend(Ext.Resizable,Ext.util.Observable,{resizeChild:false,adjustments:[0,0],minWidth:5,minHeight:5,maxWidth:1E4,maxHeight:1E4,enabled:true,animate:false,duration:.35,dynamic:false,handles:false,multiDirectional:false,disableTrackOver:false,easing:"easeOutStrong",widthIncrement:0,heightIncrement:0,pinned:false,width:null,height:null,preserveRatio:false,transparent:false,minX:0,minY:0,draggable:false,resizeTo:function(B,A){this.el.setSize(B,A);this.updateChildSize();this.fireEvent("resize",this,
B,A,null)},startSizing:function(C,B){this.fireEvent("beforeresize",this,C);if(this.enabled){if(!this.overlay){this.overlay=this.el.createProxy({tag:"div",cls:"x-resizable-overlay",html:"&#160;"},Ext.getBody());this.overlay.unselectable();this.overlay.enableDisplayMode("block");this.overlay.on("mousemove",this.onMouseMove,this);this.overlay.on("mouseup",this.onMouseUp,this)}this.overlay.setStyle("cursor",B.el.getStyle("cursor"));this.resizing=true;this.startBox=this.el.getBox();this.startPoint=C.getXY();
this.offsets=[this.startBox.x+this.startBox.width-this.startPoint[0],this.startBox.y+this.startBox.height-this.startPoint[1]];this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();if(this.constrainTo){var A=Ext.get(this.constrainTo);this.resizeRegion=A.getRegion().adjust(A.getFrameWidth("t"),A.getFrameWidth("l"),-A.getFrameWidth("b"),-A.getFrameWidth("r"))}this.proxy.setStyle("visibility","hidden");this.proxy.show();this.proxy.setBox(this.startBox);
if(!this.dynamic)this.proxy.setStyle("visibility","visible")}},onMouseDown:function(A,B){if(this.enabled){B.stopEvent();this.activeHandle=A;this.startSizing(B,A)}},onMouseUp:function(B){var A=this.resizeElement();this.resizing=false;this.handleOut();this.overlay.hide();this.proxy.hide();this.fireEvent("resize",this,A.width,A.height,B)},updateChildSize:function(){if(this.resizeChild){var C=this.el;var D=this.resizeChild;var B=this.adjustments;if(C.dom.offsetWidth){var A=C.getSize(true);D.setSize(A.width+
B[0],A.height+B[1])}if(Ext.isIE)setTimeout(function(){if(C.dom.offsetWidth){var E=C.getSize(true);D.setSize(E.width+B[0],E.height+B[1])}},10)}},snap:function(C,E,B){if(!E||!C)return C;var D=C;var A=C%E;if(A>0)if(A>E/2)D=C+(E-A);else D=C-A;return Math.max(B,D)},resizeElement:function(){var A=this.proxy.getBox();if(this.updateBox)this.el.setBox(A,false,this.animate,this.duration,null,this.easing);else this.el.setSize(A.width,A.height,this.animate,this.duration,null,this.easing);this.updateChildSize();
if(!this.dynamic)this.proxy.hide();return A},constrain:function(B,C,A,D){if(B-C<A)C=B-A;else if(B-C>D)C=D-B;return C},onMouseMove:function(S){if(this.enabled)try{if(this.resizeRegion&&!this.resizeRegion.contains(S.getPoint()))return;var Q=this.curSize||this.startBox;var I=this.startBox.x,H=this.startBox.y;var C=I,B=H;var J=Q.width,R=Q.height;var D=J,L=R;var K=this.minWidth,T=this.minHeight;var P=this.maxWidth,W=this.maxHeight;var F=this.widthIncrement;var A=this.heightIncrement;var U=S.getXY();var O=
-(this.startPoint[0]-Math.max(this.minX,U[0]));var M=-(this.startPoint[1]-Math.max(this.minY,U[1]));var G=this.activeHandle.position;switch(G){case "east":J+=O;J=Math.min(Math.max(K,J),P);break;case "south":R+=M;R=Math.min(Math.max(T,R),W);break;case "southeast":J+=O;R+=M;J=Math.min(Math.max(K,J),P);R=Math.min(Math.max(T,R),W);break;case "north":M=this.constrain(R,M,T,W);H+=M;R-=M;break;case "west":O=this.constrain(J,O,K,P);I+=O;J-=O;break;case "northeast":J+=O;J=Math.min(Math.max(K,J),P);M=this.constrain(R,
M,T,W);H+=M;R-=M;break;case "northwest":O=this.constrain(J,O,K,P);M=this.constrain(R,M,T,W);H+=M;R-=M;I+=O;J-=O;break;case "southwest":O=this.constrain(J,O,K,P);R+=M;R=Math.min(Math.max(T,R),W);I+=O;J-=O;break}var N=this.snap(J,F,K);var V=this.snap(R,A,T);if(N!=J||V!=R){switch(G){case "northeast":H-=V-R;break;case "north":H-=V-R;break;case "southwest":I-=N-J;break;case "west":I-=N-J;break;case "northwest":I-=N-J;H-=V-R;break}J=N;R=V}if(this.preserveRatio)switch(G){case "southeast":case "east":R=L*
(J/D);R=Math.min(Math.max(T,R),W);J=D*(R/L);break;case "south":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case "northeast":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case "north":var X=J;J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);I+=(X-J)/2;break;case "southwest":R=L*(J/D);R=Math.min(Math.max(T,R),W);var X=J;J=D*(R/L);I+=X-J;break;case "west":var E=R;R=L*(J/D);R=Math.min(Math.max(T,R),W);H+=(E-R)/2;var X=J;J=D*(R/L);I+=X-J;break;case "northwest":var X=J;var E=R;R=L*(J/D);
R=Math.min(Math.max(T,R),W);J=D*(R/L);H+=E-R;I+=X-J;break}this.proxy.setBounds(I,H,J,R);if(this.dynamic)this.resizeElement()}catch(S){}},handleOver:function(){if(this.enabled)this.el.addClass("x-resizable-over")},handleOut:function(){if(!this.resizing)this.el.removeClass("x-resizable-over")},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(C){this.proxy.remove();if(this.overlay){this.overlay.removeAllListeners();this.overlay.remove()}var D=Ext.Resizable.positions;
for(var A in D)if(typeof D[A]!="function"&&this[D[A]]){var B=this[D[A]];B.el.removeAllListeners();B.el.remove()}if(C){this.el.update("");this.el.remove()}},syncHandleHeight:function(){var A=this.el.getHeight(true);if(this.west)this.west.el.setHeight(A);if(this.east)this.east.el.setHeight(A)}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};
Ext.Resizable.Handle=function(C,E,B,D){if(!this.tpl){var A=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});A.compile();Ext.Resizable.Handle.prototype.tpl=A}this.position=E;this.rz=C;this.el=this.tpl.append(C.el.dom,[this.position],true);this.el.unselectable();if(D)this.el.setOpacity(0);this.el.on("mousedown",this.onMouseDown,this);if(!B){this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this)}};
Ext.Resizable.Handle.prototype={afterResize:function(A){},onMouseDown:function(A){this.rz.onMouseDown(this,A)},onMouseOver:function(A){this.rz.handleOver(this,A)},onMouseOut:function(A){this.rz.handleOut(this,A)}};Ext.Editor=function(B,A){this.field=B;Ext.Editor.superclass.constructor.call(this,A)};
Ext.extend(Ext.Editor,Ext.Component,{value:"",alignment:"c-c?",shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:false,cancelOnEsc:false,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(B,A){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:B,shim:this.shim,shadowOffset:4,id:this.id,constrain:this.constrain});this.el.setStyle("overflow",
Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title")this.field.msgTarget="qtip";this.field.inEditor=true;this.field.render(this.el);if(Ext.isGecko)this.field.el.dom.setAttribute("autocomplete","off");this.field.on("specialkey",this.onSpecialKey,this);if(this.swallowKeys)this.field.el.swallowEvent(["keydown","keypress"]);this.field.show();this.field.on("blur",this.onBlur,this);if(this.field.grow)this.field.on("autosize",this.el.sync,this.el,{delay:1})},onSpecialKey:function(C,B){var A=B.getKey();
if(this.completeOnEnter&&A==B.ENTER){B.stopEvent();this.completeEdit()}else if(this.cancelOnEsc&&A==B.ESC)this.cancelEdit();else this.fireEvent("specialkey",C,B);if(this.field.triggerBlur&&(A==B.ENTER||A==B.ESC||A==B.TAB))this.field.triggerBlur()},startEdit:function(B,C){if(this.editing)this.completeEdit();this.boundEl=Ext.get(B);var A=C!==undefined?C:this.boundEl.dom.innerHTML;if(!this.rendered)this.render(this.parentEl||document.body);if(this.fireEvent("beforestartedit",this,this.boundEl,A)===false)return;
this.startValue=A;this.field.setValue(A);this.doAutoSize();this.el.alignTo(this.boundEl,this.alignment);this.editing=true;this.show()},doAutoSize:function(){if(this.autoSize){var A=this.boundEl.getSize();switch(this.autoSize){case "width":this.setSize(A.width,"");break;case "height":this.setSize("",A.height);break;default:this.setSize(A.width,A.height)}}},setSize:function(A,B){delete this.field.lastSize;this.field.setSize(A,B);if(this.el){if(Ext.isGecko2||Ext.isOpera)this.el.setSize(A,B);this.el.sync()}},
realign:function(){this.el.alignTo(this.boundEl,this.alignment)},completeEdit:function(A){if(!this.editing)return;var B=this.getValue();if(this.revertInvalid!==false&&!this.field.isValid()){B=this.startValue;this.cancelEdit(true)}if(String(B)===String(this.startValue)&&this.ignoreNoChange){this.editing=false;this.hide();return}if(this.fireEvent("beforecomplete",this,B,this.startValue)!==false){this.editing=false;if(this.updateEl&&this.boundEl)this.boundEl.update(B);if(A!==true)this.hide();this.fireEvent("complete",
this,B,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false)this.boundEl.hide();this.field.show();if(Ext.isIE&&!this.fixIEFocus){this.fixIEFocus=true;this.deferredFocus.defer(50,this)}else this.field.focus();this.fireEvent("startedit",this.boundEl,this.startValue)},deferredFocus:function(){if(this.editing)this.field.focus()},cancelEdit:function(A){if(this.editing){var B=this.getValue();this.setValue(this.startValue);if(A!==true)this.hide();this.fireEvent("canceledit",this,B,
this.startValue)}},onBlur:function(){if(this.allowBlur!==true&&this.editing)this.completeEdit()},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse)this.field.collapse();this.el.hide();if(this.hideEl!==false)this.boundEl.show()},setValue:function(A){this.field.setValue(A)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){this.field.destroy();this.field=null}});Ext.reg("editor",Ext.Editor);
Ext.MessageBox=function(){var R,B,N,Q;var G,J,P,A,K,M,H,F;var O,S,L,C="";var D=function(U){if(R.isVisible()){R.hide();Ext.callback(B.fn,B.scope||window,[U,S.dom.value],1)}};var T=function(){if(B&&B.cls)R.el.removeClass(B.cls);K.reset()};var E=function(W,U,V){if(B&&B.closable!==false)R.hide();if(V)V.stopEvent()};var I=function(U){var W=0;if(!U){O["ok"].hide();O["cancel"].hide();O["yes"].hide();O["no"].hide();return W}R.footer.dom.style.display="";for(var V in O)if(typeof O[V]!="function")if(U[V]){O[V].show();
O[V].setText(typeof U[V]=="string"?U[V]:Ext.MessageBox.buttonText[V]);W+=O[V].el.getWidth()+15}else O[V].hide();return W};return{getDialog:function(U){if(!R){R=new Ext.Window({autoCreate:true,title:U,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(B&&B.buttons&&B.buttons.no&&!B.buttons.cancel)D("no");else D("cancel")}});
O={};var V=this.buttonText;O["ok"]=R.addButton(V["ok"],D.createCallback("ok"));O["yes"]=R.addButton(V["yes"],D.createCallback("yes"));O["no"]=R.addButton(V["no"],D.createCallback("no"));O["cancel"]=R.addButton(V["cancel"],D.createCallback("cancel"));O["ok"].hideMode=O["yes"].hideMode=O["no"].hideMode=O["cancel"].hideMode="offsets";R.render(document.body);R.getEl().addClass("x-window-dlg");N=R.mask;G=R.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'});
H=Ext.get(G.dom.firstChild);var W=G.dom.childNodes[1];J=Ext.get(W.firstChild);P=Ext.get(W.childNodes[2].firstChild);P.enableDisplayMode();P.addKeyListener([10,13],function(){if(R.isVisible()&&B&&B.buttons)if(B.buttons.ok)D("ok");else if(B.buttons.yes)D("yes")});A=Ext.get(W.childNodes[2].childNodes[1]);A.enableDisplayMode();K=new Ext.ProgressBar({renderTo:G});G.createChild({cls:"x-clear"})}return R},updateText:function(X){if(!R.isVisible()&&!B.width)R.setSize(this.maxWidth,100);J.update(X||"&#160;");
var V=C!=""?H.getWidth()+H.getMargins("lr"):0;var Z=J.getWidth()+J.getMargins("lr");var W=R.getFrameWidth("lr");var Y=R.body.getFrameWidth("lr");if(Ext.isIE&&V>0)V+=3;var U=Math.max(Math.min(B.width||V+Z+W+Y,this.maxWidth),Math.max(B.minWidth||this.minWidth,L||0));if(B.prompt===true)S.setWidth(U-V-W-Y);if(B.progress===true||B.wait===true)K.setSize(U-V-W-Y);R.setSize(U,"auto").center();return this},updateProgress:function(V,U,W){K.updateProgress(V,U);if(W)this.updateText(W);return this},isVisible:function(){return R&&
R.isVisible()},hide:function(){if(this.isVisible()){R.hide();T()}return this},show:function(X){if(this.isVisible())this.hide();B=X;var Y=this.getDialog(B.title||"&#160;");Y.setTitle(B.title||"&#160;");var U=B.closable!==false&&B.progress!==true&&B.wait!==true;Y.tools.close.setDisplayed(U);S=P;B.prompt=B.prompt||(B.multiline?true:false);if(B.prompt)if(B.multiline){P.hide();A.show();A.setHeight(typeof B.multiline=="number"?B.multiline:this.defaultTextHeight);S=A}else{P.show();A.hide()}else{P.hide();
A.hide()}S.dom.value=B.value||"";if(B.prompt)Y.focusEl=S;else{var W=B.buttons;var V=null;if(W&&W.ok)V=O["ok"];else if(W&&W.yes)V=O["yes"];if(V)Y.focusEl=V}if(B.iconCls)Y.setIconClass(B.iconCls);this.setIcon(B.icon);L=I(B.buttons);K.setVisible(B.progress===true||B.wait===true);this.updateProgress(0,B.progressText);this.updateText(B.msg);if(B.cls)Y.el.addClass(B.cls);Y.proxyDrag=B.proxyDrag===true;Y.modal=B.modal!==false;Y.mask=B.modal!==false?N:false;if(!Y.isVisible()){document.body.appendChild(R.el.dom);
Y.setAnimateTarget(B.animEl);Y.show(B.animEl)}Y.on("show",function(){if(U===true)Y.keyMap.enable();else Y.keyMap.disable()},this,{single:true});if(B.wait===true)K.wait(B.waitConfig);return this},setIcon:function(U){if(U&&U!=""){H.removeClass("x-hidden");H.replaceClass(C,U);C=U}else{H.replaceClass(C,"x-hidden");C=""}return this},progress:function(W,V,U){this.show({title:W,msg:V,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:U});return this},wait:function(W,V,
U){this.show({title:V,msg:W,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:U});return this},alert:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.OK,fn:V,scope:U});return this},confirm:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.YESNO,fn:V,scope:U,icon:this.QUESTION});return this},prompt:function(Z,Y,W,V,U,X){this.show({title:Z,msg:Y,buttons:this.OKCANCEL,fn:W,minWidth:250,scope:V,prompt:true,multiline:U,value:X});return this},OK:{ok:true},
CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;
Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title)this.elements+=",header"},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable)this.addTool({id:"close",handler:this.hide,scope:this})},
showAt:function(A){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number"))this.doAutoWidth();if(this.constrainPosition)A=this.el.adjustForConstraints(A);this.setPagePosition(A[0],A[1])},doAutoWidth:function(){var A=this.body.getTextWidth();if(this.title)A=Math.max(A,this.header.child("span").getTextWidth(this.title));A+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr");this.setWidth(A.constrain(this.minWidth,
this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(A,B){if(!this.rendered)this.render(Ext.getBody());this.showAt(this.el.getAlignToXY(A,B||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});
Ext.Tip.DD=function(B,A){Ext.apply(this,A);this.tip=B;Ext.Tip.DD.superclass.constructor.call(this,B.el.id,"WindowDD-"+B.id);this.setHandleElId(B.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(A){this.tip.el.enableShadow(true)}});
Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5E3,mouseOffset:[15,18],trackMouse:false,constrainPosition:true,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date;this.initTarget()},initTarget:function(){if(this.target){this.target=Ext.get(this.target);this.target.on("mouseover",this.onTargetOver,this);this.target.on("mouseout",this.onTargetOut,this);this.target.on("mousemove",this.onMouseMove,this)}},onMouseMove:function(A){this.targetXY=
A.getXY();if(!this.hidden&&this.trackMouse)this.setPagePosition(this.getTargetXY())},getTargetXY:function(){return[this.targetXY[0]+this.mouseOffset[0],this.targetXY[1]+this.mouseOffset[1]]},onTargetOver:function(A){if(this.disabled||A.within(this.target.dom,true))return;this.clearTimer("hide");this.targetXY=A.getXY();this.delayShow()},delayShow:function(){if(this.hidden&&!this.showTimer)if(this.lastActive.getElapsed()<this.quickShowInterval)this.show();else this.showTimer=this.show.defer(this.showDelay,
this);else if(!this.hidden&&this.autoHide!==false)this.show()},onTargetOut:function(A){if(this.disabled||A.within(this.target.dom,true))return;this.clearTimer("show");if(this.autoHide!==false)this.delayHide()},delayHide:function(){if(!this.hidden&&!this.hideTimer)this.hideTimer=this.hide.defer(this.hideDelay,this)},hide:function(){this.clearTimer("dismiss");this.lastActive=new Date;Ext.ToolTip.superclass.hide.call(this)},show:function(){this.showAt(this.getTargetXY())},showAt:function(A){this.lastActive=
new Date;this.clearTimers();Ext.ToolTip.superclass.showAt.call(this,A);if(this.dismissDelay&&this.autoHide!==false)this.dismissTimer=this.hide.defer(this.dismissDelay,this)},clearTimer:function(A){A=A+"Timer";clearTimeout(this[A]);delete this[A]},clearTimers:function(){this.clearTimer("show");this.clearTimer("dismiss");this.clearTimer("hide")},onShow:function(){Ext.ToolTip.superclass.onShow.call(this);Ext.getDoc().on("mousedown",this.onDocMouseDown,this)},onHide:function(){Ext.ToolTip.superclass.onHide.call(this);
Ext.getDoc().un("mousedown",this.onDocMouseDown,this)},onDocMouseDown:function(A){if(this.autoHide!==false&&!A.within(this.el.dom)){this.disable();this.enable.defer(100,this)}},onDisable:function(){this.clearTimers();this.hide()},adjustPosition:function(A,D){var C=this.targetXY[1],B=this.getSize().height;if(this.constrainPosition&&D<=C&&D+B>=C)D=C-B-5;return{x:A,y:D}},onDestroy:function(){Ext.ToolTip.superclass.onDestroy.call(this);if(this.target){this.target.un("mouseover",this.onTargetOver,this);
this.target.un("mouseout",this.onTargetOut,this);this.target.un("mousemove",this.onMouseMove,this)}}});
Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(D){var F=Ext.isArray(D)?D:arguments;for(var E=0,A=F.length;E<A;E++){var H=F[E];var G=H.target;if(G)if(Ext.isArray(G))for(var C=0,B=G.length;C<B;C++)this.targets[Ext.id(G[C])]=
H;else this.targets[Ext.id(G)]=H}},unregister:function(A){delete this.targets[Ext.id(A)]},onTargetOver:function(G){if(this.disabled)return;this.targetXY=G.getXY();var C=G.getTarget();if(!C||C.nodeType!==1||C==document||C==document.body)return;if(this.activeTarget&&C==this.activeTarget.el){this.clearTimer("hide");this.show();return}if(C&&this.targets[C.id]){this.activeTarget=this.targets[C.id];this.activeTarget.el=C;this.delayShow();return}var E,F=Ext.fly(C),B=this.tagConfig;var D=B.namespace;if(this.interceptTitles&&
C.title){E=C.title;C.qtip=E;C.removeAttribute("title");G.preventDefault()}else E=C.qtip||F.getAttributeNS(D,B.attribute);if(E){var A=F.getAttributeNS(D,B.hide);this.activeTarget={el:C,text:E,width:F.getAttributeNS(D,B.width),autoHide:A!="user"&&A!=="false",title:F.getAttributeNS(D,B.title),cls:F.getAttributeNS(D,B.cls),align:F.getAttributeNS(D,B.align)};this.delayShow()}},onTargetOut:function(A){this.clearTimer("show");if(this.autoHide!==false)this.delayHide()},showAt:function(B){var A=this.activeTarget;
if(A){if(!this.rendered){this.render(Ext.getBody());this.activeTarget=A}if(A.width){this.setWidth(A.width);this.body.setWidth(this.adjustBodyWidth(A.width-this.getFrameWidth()));this.measureWidth=false}else this.measureWidth=true;this.setTitle(A.title||"");this.body.update(A.text);this.autoHide=A.autoHide;this.dismissDelay=A.dismissDelay||this.dismissDelay;if(this.lastCls){this.el.removeClass(this.lastCls);delete this.lastCls}if(A.cls){this.el.addClass(A.cls);this.lastCls=A.cls}if(A.align){B=this.el.getAlignToXY(A.el,
A.align);this.constrainPosition=false}else this.constrainPosition=true}Ext.QuickTip.superclass.showAt.call(this,B)},hide:function(){delete this.activeTarget;Ext.QuickTip.superclass.hide.call(this)}});
Ext.QuickTips=function(){var B,A=[];return{init:function(C){if(!B){if(!Ext.isReady){Ext.onReady(function(){Ext.QuickTips.init(C)});return}B=new Ext.QuickTip({elements:"header,body"});if(C!==false)B.render(Ext.getBody())}},enable:function(){if(B){A.pop();if(A.length<1)B.enable()}},disable:function(){if(B)B.disable();A.push(1)},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.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,pathSeparator:"/",initComponent:function(){Ext.tree.TreePanel.superclass.initComponent.call(this);if(!this.eventModel)this.eventModel=new Ext.tree.TreeEventModel(this);var A=this.loader;if(!A)A=new Ext.tree.TreeLoader({dataUrl:this.dataUrl});else if(typeof A=="object"&&!A.load)A=new Ext.tree.TreeLoader(A);this.loader=A;this.nodeHash={};if(this.root)this.setRootNode(this.root);
this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover");if(this.singleExpand)this.on("beforeexpandnode",this.restrictExpand,this)},proxyNodeEvent:function(C,B,A,
G,F,E,D){if(C=="collapse"||C=="expand"||C=="beforecollapse"||C=="beforeexpand"||C=="move"||C=="beforemove")C=C+"node";return this.fireEvent(C,B,A,G,F,E,D)},getRootNode:function(){return this.root},setRootNode:function(B){if(!B.render)B=this.loader.createNode(B);this.root=B;B.ownerTree=this;B.isRoot=true;this.registerNode(B);if(!this.rootVisible){var A=B.attributes.uiProvider;B.ui=A?new A(B):new Ext.tree.RootTreeNodeUI(B)}return B},getNodeById:function(A){return this.nodeHash[A]},registerNode:function(A){this.nodeHash[A.id]=
A},unregisterNode:function(A){delete this.nodeHash[A.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"},restrictExpand:function(A){var B=A.parentNode;if(B){if(B.expandedChild&&B.expandedChild.parentNode==B)B.expandedChild.collapse();B.expandedChild=A}},getChecked:function(A,B){B=B||this.root;var C=[];var D=function(){if(this.attributes.checked)C.push(!A?this:A=="id"?this.id:this.attributes[A])};B.cascade(D);return C},getEl:function(){return this.el},getLoader:function(){return this.loader},
expandAll:function(){this.root.expand(true)},collapseAll:function(){this.root.collapse(true)},getSelectionModel:function(){if(!this.selModel)this.selModel=new Ext.tree.DefaultSelectionModel;return this.selModel},expandPath:function(F,A,G){A=A||"id";var D=F.split(this.pathSeparator);var C=this.root;if(C.attributes[A]!=D[1]){if(G)G(false,null);return}var B=1;var E=function(){if(++B==D.length){if(G)G(true,C);return}var H=C.findChild(A,D[B]);if(!H){if(G)G(false,C);return}C=H;H.expand(false,false,E)};
C.expand(false,false,E)},selectPath:function(E,A,F){A=A||"id";var C=E.split(this.pathSeparator);var B=C.pop();if(C.length>0){var D=function(H,G){if(H&&G){var I=G.findChild(A,B);if(I){I.select();if(F)F(true,I)}else if(F)F(false,I)}else if(F)F(false,I)};this.expandPath(C.join(this.pathSeparator),A,D)}else{this.root.select();if(F)F(true,this.root)}},getTreeEl:function(){return this.body},onRender:function(B,A){Ext.tree.TreePanel.superclass.onRender.call(this,B,A);this.el.addClass("x-tree");this.innerCt=
this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll)Ext.dd.ScrollManager.register(this.body);if((this.enableDD||this.enableDrop)&&!this.dropZone)this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true});if((this.enableDD||this.enableDrag)&&!this.dragZone)this.dragZone=
new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll});this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible)this.root.renderChildren()},onDestroy:function(){if(this.rendered){this.body.removeAllListeners();Ext.dd.ScrollManager.unregister(this.body);if(this.dropZone)this.dropZone.unreg();if(this.dragZone)this.dragZone.unreg()}this.root.destroy();this.nodeHash=
null;Ext.tree.TreePanel.superclass.onDestroy.call(this)}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(A){this.tree=A;this.tree.on("render",this.initEvents,this)};
Ext.tree.TreeEventModel.prototype={initEvents:function(){var A=this.tree.getTreeEl();A.on("click",this.delegateClick,this);if(this.tree.trackMouseOver!==false){A.on("mouseover",this.delegateOver,this);A.on("mouseout",this.delegateOut,this)}A.on("dblclick",this.delegateDblClick,this);A.on("contextmenu",this.delegateContextMenu,this)},getNode:function(B){var A;if(A=B.getTarget(".x-tree-node-el",10)){var C=Ext.fly(A,"_treeEvents").getAttributeNS("ext","tree-node-id");if(C)return this.tree.getNodeById(C)}return null},
getNodeTarget:function(B){var A=B.getTarget(".x-tree-node-icon",1);if(!A)A=B.getTarget(".x-tree-node-el",6);return A},delegateOut:function(B,A){if(!this.beforeEvent(B))return;if(B.getTarget(".x-tree-ec-icon",1)){var C=this.getNode(B);this.onIconOut(B,C);if(C==this.lastEcOver)delete this.lastEcOver}if((A=this.getNodeTarget(B))&&!B.within(A,true))this.onNodeOut(B,this.getNode(B))},delegateOver:function(B,A){if(!this.beforeEvent(B))return;if(this.lastEcOver){this.onIconOut(B,this.lastEcOver);delete this.lastEcOver}if(B.getTarget(".x-tree-ec-icon",
1)){this.lastEcOver=this.getNode(B);this.onIconOver(B,this.lastEcOver)}if(A=this.getNodeTarget(B))this.onNodeOver(B,this.getNode(B))},delegateClick:function(B,A){if(!this.beforeEvent(B))return;if(B.getTarget("input[type=checkbox]",1))this.onCheckboxClick(B,this.getNode(B));else if(B.getTarget(".x-tree-ec-icon",1))this.onIconClick(B,this.getNode(B));else if(this.getNodeTarget(B))this.onNodeClick(B,this.getNode(B))},delegateDblClick:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B))this.onNodeDblClick(B,
this.getNode(B))},delegateContextMenu:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B))this.onNodeContextMenu(B,this.getNode(B))},onNodeClick:function(B,A){A.ui.onClick(B)},onNodeOver:function(B,A){A.ui.onOver(B)},onNodeOut:function(B,A){A.ui.onOut(B)},onIconOver:function(B,A){A.ui.addClass("x-tree-ec-over")},onIconOut:function(B,A){A.ui.removeClass("x-tree-ec-over")},onIconClick:function(B,A){A.ui.ecClick(B)},onCheckboxClick:function(B,A){A.ui.onCheckChange(B)},onNodeDblClick:function(B,
A){A.ui.onDblClick(B)},onNodeContextMenu:function(B,A){A.ui.onContextMenu(B)},beforeEvent:function(A){if(this.disabled){A.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=function(A){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,A);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)};
Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A)},select:function(B){var A=this.selNode;if(A!=B&&this.fireEvent("beforeselect",this,B,A)!==false){if(A)A.ui.onSelectedChange(false);this.selNode=B;B.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,B,A)}return B},unselect:function(A){if(this.selNode==A)this.clearSelections()},
clearSelections:function(){var A=this.selNode;if(A){A.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return A},getSelectedNode:function(){return this.selNode},isSelected:function(A){return this.selNode==A},selectPrevious:function(){var A=this.selNode||this.lastSelNode;if(!A)return null;var C=A.previousSibling;if(C)if(!C.isExpanded()||C.childNodes.length<1)return this.select(C);else{var B=C.lastChild;while(B&&B.isExpanded()&&B.childNodes.length>0)B=B.lastChild;
return this.select(B)}else if(A.parentNode&&(this.tree.rootVisible||!A.parentNode.isRoot))return this.select(A.parentNode);return null},selectNext:function(){var B=this.selNode||this.lastSelNode;if(!B)return null;if(B.firstChild&&B.isExpanded())return this.select(B.firstChild);else if(B.nextSibling)return this.select(B.nextSibling);else if(B.parentNode){var A=null;B.parentNode.bubble(function(){if(this.nextSibling){A=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return A}return null},
onKeyDown:function(C){var B=this.selNode||this.lastSelNode;var D=this;if(!B)return;var A=C.getKey();switch(A){case C.DOWN:C.stopEvent();this.selectNext();break;case C.UP:C.stopEvent();this.selectPrevious();break;case C.RIGHT:C.preventDefault();if(B.hasChildNodes())if(!B.isExpanded())B.expand();else if(B.firstChild)this.select(B.firstChild,C);break;case C.LEFT:C.preventDefault();if(B.hasChildNodes()&&B.isExpanded())B.collapse();else if(B.parentNode&&(this.tree.rootVisible||B.parentNode!=this.tree.getRootNode()))this.select(B.parentNode,
C);break}}});Ext.tree.MultiSelectionModel=function(A){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,A);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};
Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A,B,B.ctrlKey)},select:function(A,C,B){if(B!==true)this.clearSelections(true);if(this.isSelected(A)){this.lastSelNode=A;return A}this.selNodes.push(A);this.selMap[A.id]=A;this.lastSelNode=A;A.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return A},unselect:function(B){if(this.selMap[B.id]){B.ui.onSelectedChange(false);
var C=this.selNodes;var A=C.indexOf(B);if(A!=-1)this.selNodes.splice(A,1);delete this.selMap[B.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(B){var D=this.selNodes;if(D.length>0){for(var C=0,A=D.length;C<A;C++)D[C].ui.onSelectedChange(false);this.selNodes=[];this.selMap={};if(B!==true)this.fireEvent("selectionchange",this,this.selNodes)}},isSelected:function(A){return this.selMap[A.id]?true:false},getSelectedNodes:function(){return this.selNodes},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,
selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});
Ext.tree.TreeNode=function(A){A=A||{};if(typeof A=="string")A={text:A};this.childrenRendered=false;this.rendered=false;Ext.tree.TreeNode.superclass.constructor.call(this,A);this.expanded=A.expanded===true;this.isTarget=A.isTarget!==false;this.draggable=A.draggable!==false&&A.allowDrag!==false;this.allowChildren=A.allowChildren!==false&&A.allowDrop!==false;this.text=A.text;this.disabled=A.disabled===true;this.addEvents("textchange","beforeexpand","beforecollapse","expand","disabledchange","collapse",
"beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered");var B=this.attributes.uiProvider||this.defaultUI||Ext.tree.TreeNodeUI;this.ui=new B(this)};
Ext.extend(Ext.tree.TreeNode,Ext.data.Node,{preventHScroll:true,isExpanded:function(){return this.expanded},getUI:function(){return this.ui},getLoader:function(){var A;return this.loader||((A=this.getOwnerTree())&&A.loader?A.loader:new Ext.tree.TreeLoader)},setFirstChild:function(A){var B=this.firstChild;Ext.tree.TreeNode.superclass.setFirstChild.call(this,A);if(this.childrenRendered&&B&&A!=B)B.renderIndent(true,true);if(this.rendered)this.renderIndent(true,true)},setLastChild:function(B){var A=this.lastChild;
Ext.tree.TreeNode.superclass.setLastChild.call(this,B);if(this.childrenRendered&&A&&B!=A)A.renderIndent(true,true);if(this.rendered)this.renderIndent(true,true)},appendChild:function(B){if(!B.render&&!Ext.isArray(B))B=this.getLoader().createNode(B);var A=Ext.tree.TreeNode.superclass.appendChild.call(this,B);if(A&&this.childrenRendered)A.render();this.ui.updateExpandIcon();return A},removeChild:function(A){this.ownerTree.getSelectionModel().unselect(A);Ext.tree.TreeNode.superclass.removeChild.apply(this,
arguments);if(this.childrenRendered)A.ui.remove();if(this.childNodes.length<1)this.collapse(false,false);else this.ui.updateExpandIcon();if(!this.firstChild&&!this.isHiddenRoot())this.childrenRendered=false;return A},insertBefore:function(C,A){if(!C.render)C=this.getLoader().createNode(C);var B=Ext.tree.TreeNode.superclass.insertBefore.apply(this,arguments);if(B&&A&&this.childrenRendered)C.render();this.ui.updateExpandIcon();return B},setText:function(B){var A=this.text;this.text=B;this.attributes.text=
B;if(this.rendered)this.ui.onTextChange(this,B,A);this.fireEvent("textchange",this,B,A)},select:function(){this.getOwnerTree().getSelectionModel().select(this)},unselect:function(){this.getOwnerTree().getSelectionModel().unselect(this)},isSelected:function(){return this.getOwnerTree().getSelectionModel().isSelected(this)},expand:function(A,B,C){if(!this.expanded){if(this.fireEvent("beforeexpand",this,A,B)===false)return;if(!this.childrenRendered)this.renderChildren();this.expanded=true;if(!this.isHiddenRoot()&&
(this.getOwnerTree().animate&&B!==false)||B){this.ui.animExpand(function(){this.fireEvent("expand",this);if(typeof C=="function")C(this);if(A===true)this.expandChildNodes(true)}.createDelegate(this));return}else{this.ui.expand();this.fireEvent("expand",this);if(typeof C=="function")C(this)}}else if(typeof C=="function")C(this);if(A===true)this.expandChildNodes(true)},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(B,E){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",
this,B,E)===false)return;this.expanded=false;if(this.getOwnerTree().animate&&E!==false||E){this.ui.animCollapse(function(){this.fireEvent("collapse",this);if(B===true)this.collapseChildNodes(true)}.createDelegate(this));return}else{this.ui.collapse();this.fireEvent("collapse",this)}}if(B===true){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++)D[C].collapse(true,false)}},delayedExpand:function(A){if(!this.expandProcId)this.expandProcId=this.expand.defer(A,this)},cancelExpand:function(){if(this.expandProcId)clearTimeout(this.expandProcId);
this.expandProcId=false},toggle:function(){if(this.expanded)this.collapse();else this.expand()},ensureVisible:function(B){var A=this.getOwnerTree();A.expandPath(this.parentNode.getPath(),false,function(){var C=A.getNodeById(this.id);A.getTreeEl().scrollChildIntoView(C.ui.anchor);Ext.callback(B)}.createDelegate(this))},expandChildNodes:function(B){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++)D[C].expand(B)},collapseChildNodes:function(B){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++)D[C].collapse(B)},
disable:function(){this.disabled=true;this.unselect();if(this.rendered&&this.ui.onDisableChange)this.ui.onDisableChange(this,true);this.fireEvent("disabledchange",this,true)},enable:function(){this.disabled=false;if(this.rendered&&this.ui.onDisableChange)this.ui.onDisableChange(this,false);this.fireEvent("disabledchange",this,false)},renderChildren:function(B){if(B!==false)this.fireEvent("beforechildrenrendered",this);var D=this.childNodes;for(var C=0,A=D.length;C<A;C++)D[C].render(true);this.childrenRendered=
true},sort:function(E,D){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);if(this.childrenRendered){var C=this.childNodes;for(var B=0,A=C.length;B<A;B++)C[B].render(true)}},render:function(A){this.ui.render(A);if(!this.rendered){this.getOwnerTree().registerNode(this);this.rendered=true;if(this.expanded){this.expanded=false;this.expand(false,false)}}},renderIndent:function(B,E){if(E)this.ui.childIndent=null;this.ui.renderIndent();if(B===true&&this.childrenRendered){var D=this.childNodes;for(var C=
0,A=D.length;C<A;C++)D[C].renderIndent(true,E)}},beginUpdate:function(){this.childrenRendered=false},endUpdate:function(){if(this.expanded&&this.rendered)this.renderChildren()},destroy:function(){if(this.childNodes){for(var B=0,A=this.childNodes.length;B<A;B++)this.childNodes[B].destroy();this.childNodes=null}if(this.ui.destroy)this.ui.destroy()}});Ext.tree.TreePanel.nodeTypes.node=Ext.tree.TreeNode;
Ext.tree.AsyncTreeNode=function(A){this.loaded=A&&A.loaded===true;this.loading=false;Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments);this.addEvents("beforeload","load")};
Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(B,D,F){if(this.loading){var E;var C=function(){if(!this.loading){clearInterval(E);this.expand(B,D,F)}}.createDelegate(this);E=setInterval(C,200);return}if(!this.loaded){if(this.fireEvent("beforeload",this)===false)return;this.loading=true;this.ui.beforeLoad(this);var A=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(A){A.load(this,this.loadComplete.createDelegate(this,[B,D,F]));return}}Ext.tree.AsyncTreeNode.superclass.expand.call(this,
B,D,F)},isLoading:function(){return this.loading},loadComplete:function(A,B,C){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(A,B,C)},isLoaded:function(){return this.loaded},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded)return true;else return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)},reload:function(A){this.collapse(false,false);while(this.firstChild)this.removeChild(this.firstChild);this.childrenRendered=false;this.loaded=
false;if(this.isHiddenRoot())this.expanded=false;this.expand(false,false,A)}});Ext.tree.TreePanel.nodeTypes.async=Ext.tree.AsyncTreeNode;Ext.tree.TreeNodeUI=function(A){this.node=A;this.rendered=false;this.animating=false;this.wasLeaf=true;this.ecc="x-tree-ec-icon x-tree-elbow";this.emptyIcon=Ext.BLANK_IMAGE_URL};
Ext.tree.TreeNodeUI.prototype={removeChild:function(A){if(this.rendered)this.ctNode.removeChild(A.ui.getEl())},beforeLoad:function(){this.addClass("x-tree-node-loading")},afterLoad:function(){this.removeClass("x-tree-node-loading")},onTextChange:function(B,C,A){if(this.rendered)this.textNode.innerHTML=C},onDisableChange:function(A,B){this.disabled=B;if(this.checkbox)this.checkbox.disabled=B;if(B)this.addClass("x-tree-node-disabled");else this.removeClass("x-tree-node-disabled")},onSelectedChange:function(A){if(A){this.focus();
this.addClass("x-tree-selected")}else this.removeClass("x-tree-selected")},onMove:function(A,G,E,F,D,B){this.childIndent=null;if(this.rendered){var H=F.ui.getContainer();if(!H){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return}var C=B?B.ui.getEl():null;if(C)H.insertBefore(this.wrap,C);else H.appendChild(this.wrap);this.node.renderIndent(true)}},addClass:function(A){if(this.elNode)Ext.fly(this.elNode).addClass(A)},removeClass:function(A){if(this.elNode)Ext.fly(this.elNode).removeClass(A)},
remove:function(){if(this.rendered){this.holder=document.createElement("div");this.holder.appendChild(this.wrap)}},fireEvent:function(){return this.node.fireEvent.apply(this.node,arguments)},initEvents:function(){this.node.on("move",this.onMove,this);if(this.node.disabled){this.addClass("x-tree-node-disabled");if(this.checkbox)this.checkbox.disabled=true}if(this.node.hidden)this.hide();var B=this.node.getOwnerTree();var A=B.enableDD||B.enableDrag||B.enableDrop;if(A&&(!this.node.isRoot||B.rootVisible))Ext.dd.Registry.register(this.elNode,
{node:this.node,handles:this.getDDHandles(),isHandle:false})},getDDHandles:function(){return[this.iconNode,this.textNode,this.elNode]},hide:function(){this.node.hidden=true;if(this.wrap)this.wrap.style.display="none"},show:function(){this.node.hidden=false;if(this.wrap)this.wrap.style.display=""},onContextMenu:function(A){if(this.node.hasListener("contextmenu")||this.node.getOwnerTree().hasListener("contextmenu")){A.preventDefault();this.focus();this.fireEvent("contextmenu",this.node,A)}},onClick:function(B){if(this.dropping){B.stopEvent();
return}if(this.fireEvent("beforeclick",this.node,B)!==false){var A=B.getTarget("a");if(!this.disabled&&this.node.attributes.href&&A){this.fireEvent("click",this.node,B);return}else if(A&&B.ctrlKey)B.stopEvent();B.preventDefault();if(this.disabled)return;if(this.node.attributes.singleClickExpand&&!this.animating&&this.node.isExpandable())this.node.toggle();this.fireEvent("click",this.node,B)}else B.stopEvent()},onDblClick:function(A){A.preventDefault();if(this.disabled)return;if(this.checkbox)this.toggleCheck();
if(!this.animating&&this.node.isExpandable())this.node.toggle();this.fireEvent("dblclick",this.node,A)},onOver:function(A){this.addClass("x-tree-node-over")},onOut:function(A){this.removeClass("x-tree-node-over")},onCheckChange:function(){var A=this.checkbox.checked;this.checkbox.defaultChecked=A;this.node.attributes.checked=A;this.fireEvent("checkchange",this.node,A)},ecClick:function(A){if(!this.animating&&this.node.isExpandable())this.node.toggle()},startDrop:function(){this.dropping=true},endDrop:function(){setTimeout(function(){this.dropping=
false}.createDelegate(this),50)},expand:function(){this.updateExpandIcon();this.ctNode.style.display=""},focus:function(){if(!this.node.preventHScroll)try{this.anchor.focus()}catch(C){}else if(!Ext.isIE)try{var B=this.node.getOwnerTree().getTreeEl().dom;var A=B.scrollLeft;this.anchor.focus();B.scrollLeft=A}catch(C){}},toggleCheck:function(B){var A=this.checkbox;if(A){A.checked=B===undefined?!A.checked:B;this.onCheckChange()}},blur:function(){try{this.anchor.blur()}catch(A){}},animExpand:function(B){var A=
Ext.get(this.ctNode);A.stopFx();if(!this.node.isExpandable()){this.updateExpandIcon();this.ctNode.style.display="";Ext.callback(B);return}this.animating=true;this.updateExpandIcon();A.slideIn("t",{callback:function(){this.animating=false;Ext.callback(B)},scope:this,duration:this.node.ownerTree.duration||.25})},highlight:function(){var A=this.node.getOwnerTree();Ext.fly(this.wrap).highlight(A.hlColor||"C3DAF9",{endColor:A.hlBaseColor})},collapse:function(){this.updateExpandIcon();this.ctNode.style.display=
"none"},animCollapse:function(B){var A=Ext.get(this.ctNode);A.enableDisplayMode("block");A.stopFx();this.animating=true;this.updateExpandIcon();A.slideOut("t",{callback:function(){this.animating=false;Ext.callback(B)},scope:this,duration:this.node.ownerTree.duration||.25})},getContainer:function(){return this.ctNode},getEl:function(){return this.wrap},appendDDGhost:function(A){A.appendChild(this.elNode.cloneNode(true))},getDDRepairXY:function(){return Ext.lib.Dom.getXY(this.iconNode)},onRender:function(){this.render()},
render:function(B){var D=this.node,A=D.attributes;var C=D.parentNode?D.parentNode.ui.getContainer():D.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(D,A,C,B);if(A.qtip)if(this.textNode.setAttributeNS){this.textNode.setAttributeNS("ext","qtip",A.qtip);if(A.qtipTitle)this.textNode.setAttributeNS("ext","qtitle",A.qtipTitle)}else{this.textNode.setAttribute("ext:qtip",A.qtip);if(A.qtipTitle)this.textNode.setAttribute("ext:qtitle",A.qtipTitle)}else if(A.qtipCfg){A.qtipCfg.target=
Ext.id(this.textNode);Ext.QuickTips.register(A.qtipCfg)}this.initEvents();if(!this.node.expanded)this.updateExpandIcon(true)}else if(B===true)C.appendChild(this.wrap)},renderElements:function(D,I,H,J){this.indentMarkup=D.parentNode?D.parentNode.ui.getChildIndent():"";var E=typeof I.checked=="boolean";var B=I.href?I.href:Ext.isGecko?"":"#";var C=['<li class="x-tree-node"><div ext:tree-node-id="',D.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',I.cls,'" unselectable="on">','<span class="x-tree-node-indent">',
this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img src="',I.icon||this.emptyIcon,'" class="x-tree-node-icon',I.icon?" x-tree-node-inline-icon":"",I.iconCls?" "+I.iconCls:"",'" unselectable="on" />',E?'<input class="x-tree-node-cb" type="checkbox" '+(I.checked?'checked="checked" />':"/>"):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',B,'" tabIndex="1" ',I.hrefTarget?' target="'+I.hrefTarget+'"':"",'><span unselectable="on">',D.text,"</span></a></div>",
'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var A;if(J!==true&&D.nextSibling&&(A=D.nextSibling.ui.getEl()))this.wrap=Ext.DomHelper.insertHtml("beforeBegin",A,C);else this.wrap=Ext.DomHelper.insertHtml("beforeEnd",H,C);this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var G=this.elNode.childNodes;this.indentNode=G[0];this.ecNode=G[1];this.iconNode=G[2];var F=3;if(E){this.checkbox=G[3];this.checkbox.defaultChecked=this.checkbox.checked;F++}this.anchor=
G[F];this.textNode=G[F].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var E=this.node,D,C;var A=E.isLast()?"x-tree-elbow-end":"x-tree-elbow";if(E.isExpandable()){if(E.expanded){A+="-minus";D="x-tree-node-collapsed";C="x-tree-node-expanded"}else{A+="-plus";D="x-tree-node-expanded";C="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");
this.wasLeaf=false}if(this.c1!=D||this.c2!=C){Ext.fly(this.elNode).replaceClass(D,C);this.c1=D;this.c2=C}}else if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}var B="x-tree-ec-icon "+A;if(this.ecc!=B){this.ecNode.className=B;this.ecc=B}}},getChildIndent:function(){if(!this.childIndent){var A=[];var B=this.node;while(B){if(!B.isRoot||B.isRoot&&B.ownerTree.rootVisible)if(!B.isLast())A.unshift('<img src="'+
this.emptyIcon+'" class="x-tree-elbow-line" />');else A.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />');B=B.parentNode}this.childIndent=A.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var A="";var B=this.node.parentNode;if(B)A=B.ui.getChildIndent();if(this.indentMarkup!=A){this.indentNode.innerHTML=A;this.indentMarkup=A}this.updateExpandIcon()}},destroy:function(){if(this.elNode)Ext.dd.Registry.unregister(this.elNode.id);delete this.elNode;delete this.ctNode;
delete this.indentNode;delete this.ecNode;delete this.iconNode;delete this.checkbox;delete this.anchor;delete this.textNode;Ext.removeNode(this.ctNode)}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var A=this.node.ownerTree.innerCt.dom;this.node.expanded=true;A.innerHTML='<div class="x-tree-root-node"></div>';this.wrap=this.ctNode=A.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});
Ext.tree.TreeLoader=function(A){this.baseParams={};Ext.apply(this,A);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this)};
Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(A,B){if(this.clearOnLoad)while(A.firstChild)A.removeChild(A.firstChild);if(this.doPreload(A)){if(typeof B=="function")B()}else if(this.dataUrl||this.url)this.requestData(A,B)},doPreload:function(D){if(D.attributes.children){if(D.childNodes.length<1){var C=D.attributes.children;D.beginUpdate();for(var B=0,A=C.length;B<A;B++){var E=D.appendChild(this.createNode(C[B]));if(this.preloadChildren)this.doPreload(E)}D.endUpdate()}return true}else return false},
getParams:function(D){var A=[],C=this.baseParams;for(var B in C)if(typeof C[B]!="function")A.push(encodeURIComponent(B),"=",encodeURIComponent(C[B]),"&");A.push("node=",encodeURIComponent(D.id));return A.join("")},requestData:function(A,B){if(this.fireEvent("beforeload",this,A,B)!==false)this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:B,node:A},params:this.getParams(A)});else if(typeof B==
"function")B()},isLoading:function(){return!!this.transId},abort:function(){if(this.isLoading())Ext.Ajax.abort(this.transId)},createNode:function(attr){if(this.baseAttrs)Ext.applyIf(attr,this.baseAttrs);if(this.applyLoader!==false)attr.loader=this;if(typeof attr.uiProvider=="string")attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider);if(attr.nodeType)return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr);else return attr.leaf?new Ext.tree.TreeNode(attr):new Ext.tree.AsyncTreeNode(attr)},
processResponse:function(response,node,callback){var json=response.responseText;try{var o=eval("("+json+")");node.beginUpdate();for(var i=0,len=o.length;i<len;i++){var n=this.createNode(o[i]);if(n)node.appendChild(n)}node.endUpdate();if(typeof callback=="function")callback(this,node)}catch(e){this.handleFailure(response)}},handleResponse:function(B){this.transId=false;var A=B.argument;this.processResponse(B,A.node,A.callback);this.fireEvent("load",this,A.node,B)},handleFailure:function(B){this.transId=
false;var A=B.argument;this.fireEvent("loadexception",this,A.node,B);if(typeof A.callback=="function")A.callback(this,A.node)}});Ext.tree.TreeFilter=function(A,B){this.tree=A;this.filtered={};Ext.apply(this,B)};
Ext.tree.TreeFilter.prototype={clearBlank:false,reverse:false,autoClear:false,remove:false,filter:function(D,A,B){A=A||"text";var C;if(typeof D=="string"){var E=D.length;if(E==0&&this.clearBlank){this.clear();return}D=D.toLowerCase();C=function(F){return F.attributes[A].substr(0,E).toLowerCase()==D}}else if(D.exec)C=function(F){return D.test(F.attributes[A])};else throw"Illegal filter type, must be string or regex";this.filterBy(C,null,B)},filterBy:function(D,C,B){B=B||this.tree.root;if(this.autoClear)this.clear();
var A=this.filtered,H=this.reverse;var E=function(J){if(J==B)return true;if(A[J.id])return false;var I=D.call(C||J,J);if(!I||H){A[J.id]=J;J.ui.hide();return false}return true};B.cascade(E);if(this.remove)for(var G in A)if(typeof G!="function"){var F=A[G];if(F&&F.parentNode)F.parentNode.removeChild(F)}},clear:function(){var B=this.tree;var A=this.filtered;for(var D in A)if(typeof D!="function"){var C=A[D];if(C)C.ui.show()}this.filtered={}}};
Ext.tree.TreeSorter=function(B,C){Ext.apply(this,C);B.on("beforechildrenrendered",this.doSort,this);B.on("append",this.updateSort,this);B.on("insert",this.updateSort,this);B.on("textchange",this.updateSortParent,this);var E=this.dir&&this.dir.toLowerCase()=="desc";var F=this.property||"text";var G=this.sortType;var A=this.folderSort;var D=this.caseSensitive===true;var H=this.leafAttr||"leaf";this.sortFn=function(J,I){if(A){if(J.attributes[H]&&!I.attributes[H])return 1;if(!J.attributes[H]&&I.attributes[H])return-1}var L=
G?G(J):D?J.attributes[F]:J.attributes[F].toUpperCase();var K=G?G(I):D?I.attributes[F]:I.attributes[F].toUpperCase();if(L<K)return E?+1:-1;else if(L>K)return E?-1:+1;else return 0}};
Ext.tree.TreeSorter.prototype={doSort:function(A){A.sort(this.sortFn)},compareNodes:function(B,A){return B.text.toUpperCase()>A.text.toUpperCase()?1:-1},updateSort:function(A,B){if(B.childrenRendered)this.doSort.defer(1,this,[B])},updateSortParent:function(A){var B=A.parentNode;if(B&&B.childrenRendered)this.doSort.defer(1,this,[B])}};
if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(A,B){this.allowParentInsert=false;this.allowContainerDrop=false;this.appendOnly=false;Ext.tree.TreeDropZone.superclass.constructor.call(this,A.innerCt,B);this.tree=A;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1E3,expandNode:function(A){if(A.hasChildNodes()&&!A.isExpanded())A.expand(false,null,this.triggerCacheRefresh.createDelegate(this))},queueExpand:function(A){this.expandProcId=
this.expandNode.defer(this.expandDelay,this,[A])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(A,I,G,D,C){if(!A||!C)return false;var E=A.node;var F=C.node;if(!(E&&E.isTarget&&I))return false;if(I=="append"&&E.allowChildren===false)return false;if((I=="above"||I=="below")&&(E.parentNode&&E.parentNode.allowChildren===false))return false;if(F&&(E==F||F.contains(E)))return false;var B=this.dragOverData;B.tree=this.tree;
B.target=E;B.data=C;B.point=I;B.source=G;B.rawEvent=D;B.dropNode=F;B.cancel=false;var H=this.tree.fireEvent("nodedragover",B);return B.cancel===false&&H!==false},getDropPoint:function(E,D,I){var J=D.node;if(J.isRoot)return J.allowChildren!==false?"append":false;var B=D.ddel;var K=Ext.lib.Dom.getY(B),G=K+B.offsetHeight;var F=Ext.lib.Event.getPageY(E);var H=J.allowChildren===false||J.isLeaf();if(this.appendOnly||J.parentNode.allowChildren===false)return H?false:"append";var C=false;if(!this.allowParentInsert)C=
J.hasChildNodes()&&J.isExpanded();var A=(G-K)/(H?2:3);if(F>=K&&F<K+A)return"above";else if(!C&&(H||F>=G-A&&F<=G))return"below";else return"append"},onNodeEnter:function(D,A,C,B){this.cancelExpand()},onNodeOver:function(B,G,F,E){var I=this.getDropPoint(F,B,G);var C=B.node;if(!this.expandProcId&&I=="append"&&C.hasChildNodes()&&!B.node.isExpanded())this.queueExpand(C);else if(I!="append")this.cancelExpand();var D=this.dropNotAllowed;if(this.isValidDropPoint(B,I,G,F,E))if(I){var A=B.ddel;var H;if(I==
"above"){D=B.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";H="x-tree-drag-insert-above"}else if(I=="below"){D=B.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";H="x-tree-drag-insert-below"}else{D="x-tree-drop-ok-append";H="x-tree-drag-append"}if(this.lastInsertClass!=H){Ext.fly(A).replaceClass(this.lastInsertClass,H);this.lastInsertClass=H}}return D},onNodeOut:function(D,A,C,B){this.cancelExpand();this.removeDropIndicators(D)},onNodeDrop:function(C,I,E,D){var H=this.getDropPoint(E,
C,I);var F=C.node;F.ui.startDrop();if(!this.isValidDropPoint(C,H,I,E,D)){F.ui.endDrop();return false}var G=D.node||(I.getTreeNode?I.getTreeNode(D,F,H,E):null);var B={tree:this.tree,target:F,data:D,point:H,source:I,rawEvent:E,dropNode:G,cancel:!G,dropStatus:false};var A=this.tree.fireEvent("beforenodedrop",B);if(A===false||B.cancel===true||!B.dropNode){F.ui.endDrop();return B.dropStatus}F=B.target;if(H=="append"&&!F.isExpanded())F.expand(false,null,function(){this.completeDrop(B)}.createDelegate(this));
else this.completeDrop(B);return true},completeDrop:function(G){var D=G.dropNode,E=G.point,C=G.target;if(!Ext.isArray(D))D=[D];var F;for(var B=0,A=D.length;B<A;B++){F=D[B];if(E=="above")C.parentNode.insertBefore(F,C);else if(E=="below")C.parentNode.insertBefore(F,C.nextSibling);else C.appendChild(F)}F.ui.focus();if(Ext.enableFx&&this.tree.hlDrop)F.ui.highlight();C.ui.endDrop();this.tree.fireEvent("nodedrop",G)},afterNodeMoved:function(A,C,E,D,B){if(Ext.enableFx&&this.tree.hlDrop){B.ui.focus();B.ui.highlight()}this.tree.fireEvent("nodedrop",
this.tree,D,C,A,E)},getTree:function(){return this.tree},removeDropIndicators:function(B){if(B&&B.ddel){var A=B.ddel;Ext.fly(A).removeClass(["x-tree-drag-insert-above","x-tree-drag-insert-below","x-tree-drag-append"]);this.lastInsertClass="_noclass"}},beforeDragDrop:function(B,A,C){this.cancelExpand();return true},afterRepair:function(A){if(A&&Ext.enableFx)A.node.ui.highlight();this.hideProxy()}})}
if(Ext.dd.DragZone){Ext.tree.TreeDragZone=function(A,B){Ext.tree.TreeDragZone.superclass.constructor.call(this,A.getTreeEl(),B);this.tree=A};Ext.extend(Ext.tree.TreeDragZone,Ext.dd.DragZone,{ddGroup:"TreeDD",onBeforeDrag:function(A,B){var C=A.node;return C&&C.draggable&&!C.disabled},onInitDrag:function(B){var A=this.dragData;this.tree.getSelectionModel().select(A.node);this.tree.eventModel.disable();this.proxy.update("");A.node.ui.appendDDGhost(this.proxy.ghost.dom);this.tree.fireEvent("startdrag",
this.tree,A.node,B)},getRepairXY:function(B,A){return A.node.ui.getDDRepairXY()},onEndDrag:function(A,B){this.tree.eventModel.enable.defer(100,this.tree.eventModel);this.tree.fireEvent("enddrag",this.tree,A.node,B)},onValidDrop:function(A,B,C){this.tree.fireEvent("dragdrop",this.tree,this.dragData.node,A,B);this.hideProxy()},beforeInvalidDrop:function(A,C){var B=this.tree.getSelectionModel();B.clearSelections();B.select(this.dragData.node)},afterRepair:function(){if(Ext.enableFx&&this.tree.hlDrop)Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||
"c3daf9");this.dragging=false}})}Ext.tree.TreeEditor=function(A,C,B){C=C||{};var D=C.events?C:new Ext.form.TextField(C);Ext.tree.TreeEditor.superclass.constructor.call(this,D,B);this.tree=A;if(!A.rendered)A.on("render",this.initEditor,this);else this.initEditor(A)};
Ext.extend(Ext.tree.TreeEditor,Ext.Editor,{alignment:"l-l",autoSize:false,hideEl:false,cls:"x-small-editor x-tree-editor",shim:false,shadow:"frame",maxWidth:250,editDelay:350,initEditor:function(A){A.on("beforeclick",this.beforeNodeClick,this);A.on("dblclick",this.onNodeDblClick,this);this.on("complete",this.updateNode,this);this.on("beforestartedit",this.fitToTree,this);this.on("startedit",this.bindScroll,this,{delay:10});this.on("specialkey",this.onSpecialKey,this)},fitToTree:function(B,C){var E=
this.tree.getTreeEl().dom,D=C.dom;if(E.scrollLeft>D.offsetLeft)E.scrollLeft=D.offsetLeft;var A=Math.min(this.maxWidth,(E.clientWidth>20?E.clientWidth:E.offsetWidth)-Math.max(0,D.offsetLeft-E.scrollLeft)-5);this.setSize(A,"")},triggerEdit:function(A,B){this.completeEdit();if(A.attributes.editable!==false){this.editNode=A;if(this.tree.autoScroll)A.ui.getEl().scrollIntoView(this.tree.body);this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[A.ui.textNode,A.text]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",
this.cancelEdit,this)},beforeNodeClick:function(A,B){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(A)){B.stopEvent();return this.triggerEdit(A)}},onNodeDblClick:function(A,B){clearTimeout(this.autoEditTimer)},updateNode:function(A,B){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(B)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode)this.editNode.ui.focus.defer(50,this.editNode.ui)},onSpecialKey:function(C,
B){var A=B.getKey();if(A==B.ESC){B.stopEvent();this.cancelEdit()}else if(A==B.ENTER&&!B.hasModifier()){B.stopEvent();this.completeEdit()}}});
Ext.menu.Menu=function(A){if(Ext.isArray(A))A={items:A};Ext.apply(this,A);this.id=this.id||Ext.id();this.addEvents("beforeshow","beforehide","show","hide","click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);Ext.menu.Menu.superclass.constructor.call(this);var B=this.items;this.items=new Ext.util.MixedCollection;if(B)this.add.apply(this,B)};
Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15E3})},render:function(){if(this.el)return;var B=this.el=this.createEl();if(!this.keyNav)this.keyNav=new Ext.menu.MenuNav(this);if(this.plain)B.addClass("x-menu-plain");if(this.cls)B.addClass(this.cls);
this.focusEl=B.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});var A=B.createChild({tag:"ul",cls:"x-menu-list"});A.on("click",this.onClick,this);A.on("mouseover",this.onMouseOver,this);A.on("mouseout",this.onMouseOut,this);this.items.each(function(D){var C=document.createElement("li");C.className="x-menu-list-item";A.dom.appendChild(C);D.render(C,this)},this);this.ul=A;this.autoWidth()},autoWidth:function(){var D=this.el,C=this.ul;if(!D)return;var A=this.width;
if(A)D.setWidth(A);else if(Ext.isIE){D.setWidth(this.minWidth);var B=D.dom.offsetWidth;D.setWidth(C.getWidth()+D.getFrameWidth("lr"))}},delayAutoWidth:function(){if(this.el){if(!this.awTask)this.awTask=new Ext.util.DelayedTask(this.autoWidth,this);this.awTask.delay(20)}},findTargetItem:function(B){var A=B.getTarget(".x-menu-list-item",this.ul,true);if(A&&A.menuItemId)return this.items.get(A.menuItemId)},onClick:function(B){var A;if(A=this.findTargetItem(B))if(A.menu&&this.ignoreParentClicks)A.expandMenu();
else{A.onClick(B);this.fireEvent("click",this,A,B)}},setActiveItem:function(A,B){if(A!=this.activeItem){if(this.activeItem)this.activeItem.deactivate();this.activeItem=A;A.activate(B)}else if(B)A.expandMenu()},tryActivate:function(F,E){var B=this.items;for(var C=F,A=B.length;C>=0&&C<A;C+=E){var D=B.get(C);if(!D.disabled&&D.canActivate){this.setActiveItem(D,false);return D}}return false},onMouseOver:function(B){var A;if(A=this.findTargetItem(B))if(A.canActivate&&!A.disabled)this.setActiveItem(A,true);
this.over=true;this.fireEvent("mouseover",this,B,A)},onMouseOut:function(B){var A;if(A=this.findTargetItem(B))if(A==this.activeItem&&A.shouldDeactivate(B)){this.activeItem.deactivate();delete this.activeItem}this.over=false;this.fireEvent("mouseout",this,B,A)},isVisible:function(){return this.el&&!this.hidden},show:function(B,C,A){this.parentMenu=A;if(!this.el)this.render();this.fireEvent("beforeshow",this);this.showAt(this.el.getAlignToXY(B,C||this.defaultAlign),A,false)},showAt:function(C,B,A){this.parentMenu=
B;if(!this.el)this.render();if(A!==false){this.fireEvent("beforeshow",this);C=this.el.adjustForConstraints(C)}this.el.setXY(C);this.el.show();this.hidden=false;this.focus();this.fireEvent("show",this)},focus:function(){if(!this.hidden)this.doFocus.defer(50,this)},doFocus:function(){if(!this.hidden)this.focusEl.focus()},hide:function(A){if(this.el&&this.isVisible()){this.fireEvent("beforehide",this);if(this.activeItem){this.activeItem.deactivate();this.activeItem=null}this.el.hide();this.hidden=true;
this.fireEvent("hide",this)}if(A===true&&this.parentMenu)this.parentMenu.hide(true)},add:function(){var B=arguments,A=B.length,E;for(var C=0;C<A;C++){var D=B[C];if(D.render)E=this.addItem(D);else if(typeof D=="string")if(D=="separator"||D=="-")E=this.addSeparator();else E=this.addText(D);else if(D.tagName||D.el)E=this.addElement(D);else if(typeof D=="object"){Ext.applyIf(D,this.defaults);E=this.addMenuItem(D)}}return E},getEl:function(){if(!this.el)this.render();return this.el},addSeparator:function(){return this.addItem(new Ext.menu.Separator)},
addElement:function(A){return this.addItem(new Ext.menu.BaseItem(A))},addItem:function(B){this.items.add(B);if(this.ul){var A=document.createElement("li");A.className="x-menu-list-item";this.ul.dom.appendChild(A);B.render(A,this);this.delayAutoWidth()}return B},addMenuItem:function(A){if(!(A instanceof Ext.menu.Item))if(typeof A.checked=="boolean")A=new Ext.menu.CheckItem(A);else A=new Ext.menu.Item(A);return this.addItem(A)},addText:function(A){return this.addItem(new Ext.menu.TextItem(A))},insert:function(B,
C){this.items.insert(B,C);if(this.ul){var A=document.createElement("li");A.className="x-menu-list-item";this.ul.dom.insertBefore(A,this.ul.dom.childNodes[B]);C.render(A,this);this.delayAutoWidth()}return C},remove:function(A){this.items.removeKey(A.id);A.destroy()},removeAll:function(){if(this.items){var A;while(A=this.items.first())this.remove(A)}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav)this.keyNav.disable();this.removeAll();if(this.ul)this.ul.removeAllListeners();
if(this.el)this.el.destroy()},beforeDestroy:Ext.emptyFn});Ext.menu.MenuNav=function(A){Ext.menu.MenuNav.superclass.constructor.call(this,A.el);this.scope=this.menu=A};
Ext.extend(Ext.menu.MenuNav,Ext.KeyNav,{doRelay:function(C,B){var A=C.getKey();if(!this.menu.activeItem&&C.isNavKeyPress()&&A!=C.SPACE&&A!=C.RETURN){this.menu.tryActivate(0,1);return false}return B.call(this.scope||this,C,this.menu)},up:function(B,A){if(!A.tryActivate(A.items.indexOf(A.activeItem)-1,-1))A.tryActivate(A.items.length-1,-1)},down:function(B,A){if(!A.tryActivate(A.items.indexOf(A.activeItem)+1,1))A.tryActivate(0,1)},right:function(B,A){if(A.activeItem)A.activeItem.expandMenu(true)},left:function(B,
A){A.hide();if(A.parentMenu&&A.parentMenu.activeItem)A.parentMenu.activeItem.activate()},enter:function(B,A){if(A.activeItem){B.stopPropagation();A.activeItem.onClick(B);A.fireEvent("click",this,A.activeItem);return true}}});
Ext.menu.MenuMgr=function(){var F,D,C={},A=false,K=new Date;function M(){F={};D=new Ext.util.MixedCollection;Ext.getDoc().addKeyListener(27,function(){if(D.length>0)H()})}function H(){if(D&&D.length>0){var N=D.clone();N.each(function(O){O.hide()})}}function E(N){D.remove(N);if(D.length<1){Ext.getDoc().un("mousedown",L);A=false}}function J(N){var O=D.last();K=new Date;D.add(N);if(!A){Ext.getDoc().on("mousedown",L);A=true}if(N.parentMenu){N.getEl().setZIndex(parseInt(N.parentMenu.getEl().getStyle("z-index"),
10)+3);N.parentMenu.activeChild=N}else if(O&&O.isVisible())N.getEl().setZIndex(parseInt(O.getEl().getStyle("z-index"),10)+3)}function B(N){if(N.activeChild)N.activeChild.hide();if(N.autoHideTimer){clearTimeout(N.autoHideTimer);delete N.autoHideTimer}}function G(N){var O=N.parentMenu;if(!O&&!N.allowOtherMenus)H();else if(O&&O.activeChild)O.activeChild.hide()}function L(N){if(K.getElapsed()>50&&D.length>0&&!N.getTarget(".x-menu"))H()}function I(O,R){if(R){var Q=C[O.group];for(var P=0,N=Q.length;P<N;P++)if(Q[P]!=
O)Q[P].setChecked(false)}}return{hideAll:function(){H()},register:function(O){if(!F)M();F[O.id]=O;O.on("beforehide",B);O.on("hide",E);O.on("beforeshow",G);O.on("show",J);var N=O.group;if(N&&O.events["checkchange"]){if(!C[N])C[N]=[];C[N].push(O);O.on("checkchange",onCheck)}},get:function(N){if(typeof N=="string"){if(!F)return null;return F[N]}else if(N.events)return N;else if(typeof N.length=="number")return new Ext.menu.Menu({items:N});else return new Ext.menu.Menu(N)},unregister:function(O){delete F[O.id];
O.un("beforehide",B);O.un("hide",E);O.un("beforeshow",G);O.un("show",J);var N=O.group;if(N&&O.events["checkchange"]){C[N].remove(O);O.un("checkchange",onCheck)}},registerCheckable:function(N){var O=N.group;if(O){if(!C[O])C[O]=[];C[O].push(N);N.on("beforecheckchange",I)}},unregisterCheckable:function(N){var O=N.group;if(O){C[O].remove(N);N.un("beforecheckchange",I)}},getCheckedItem:function(P){var Q=C[P];if(Q)for(var O=0,N=Q.length;O<N;O++)if(Q[O].checked)return Q[O];return null},setCheckedItem:function(P,
R){var Q=C[P];if(Q)for(var O=0,N=Q.length;O<N;O++)if(Q[O].id==R)Q[O].setChecked(true);return null}}}();Ext.menu.BaseItem=function(A){Ext.menu.BaseItem.superclass.constructor.call(this,A);this.addEvents("click","activate","deactivate");if(this.handler)this.on("click",this.handler,this.scope)};
Ext.extend(Ext.menu.BaseItem,Ext.Component,{canActivate:false,activeClass:"x-menu-item-active",hideOnClick:true,hideDelay:100,ctype:"Ext.menu.BaseItem",actionMode:"container",render:function(A,B){this.parentMenu=B;Ext.menu.BaseItem.superclass.render.call(this,A);this.container.menuItemId=this.id},onRender:function(B,A){this.el=Ext.get(this.el);B.dom.appendChild(this.el.dom)},setHandler:function(B,A){if(this.handler)this.un("click",this.handler,this.scope);this.on("click",this.handler=B,this.scope=
A)},onClick:function(A){if(!this.disabled&&this.fireEvent("click",this,A)!==false&&this.parentMenu.fireEvent("itemclick",this,A)!==false)this.handleClick(A);else A.stopEvent()},activate:function(){if(this.disabled)return false;var A=this.container;A.addClass(this.activeClass);this.region=A.getRegion().adjust(2,2,-2,-2);this.fireEvent("activate",this);return true},deactivate:function(){this.container.removeClass(this.activeClass);this.fireEvent("deactivate",this)},shouldDeactivate:function(A){return!this.region||
!this.region.contains(A.getPoint())},handleClick:function(A){if(this.hideOnClick)this.parentMenu.hide.defer(this.hideDelay,this.parentMenu,[true])},expandMenu:function(A){},hideMenu:function(){}});Ext.menu.TextItem=function(A){if(typeof A=="string")A={text:A};Ext.menu.TextItem.superclass.constructor.call(this,A)};
Ext.extend(Ext.menu.TextItem,Ext.menu.BaseItem,{hideOnClick:false,itemCls:"x-menu-text",onRender:function(){var A=document.createElement("span");A.className=this.itemCls;A.innerHTML=this.text;this.el=A;Ext.menu.TextItem.superclass.onRender.apply(this,arguments)}});Ext.menu.Separator=function(A){Ext.menu.Separator.superclass.constructor.call(this,A)};
Ext.extend(Ext.menu.Separator,Ext.menu.BaseItem,{itemCls:"x-menu-sep",hideOnClick:false,onRender:function(A){var B=document.createElement("span");B.className=this.itemCls;B.innerHTML="&#160;";this.el=B;A.addClass("x-menu-sep-li");Ext.menu.Separator.superclass.onRender.apply(this,arguments)}});Ext.menu.Item=function(A){Ext.menu.Item.superclass.constructor.call(this,A);if(this.menu)this.menu=Ext.menu.MenuMgr.get(this.menu)};
Ext.extend(Ext.menu.Item,Ext.menu.BaseItem,{itemCls:"x-menu-item",canActivate:true,showDelay:200,hideDelay:200,ctype:"Ext.menu.Item",onRender:function(B,A){var C=document.createElement("a");C.hideFocus=true;C.unselectable="on";C.href=this.href||"#";if(this.hrefTarget)C.target=this.hrefTarget;C.className=this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:"");C.innerHTML=String.format('<img src="{0}" class="x-menu-item-icon {2}" />{1}',this.icon||Ext.BLANK_IMAGE_URL,this.itemText||
this.text,this.iconCls||"");this.el=C;Ext.menu.Item.superclass.onRender.call(this,B,A)},setText:function(A){this.text=A;if(this.rendered){this.el.update(String.format('<img src="{0}" class="x-menu-item-icon {2}">{1}',this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||""));this.parentMenu.autoWidth()}},setIconClass:function(A){var B=this.iconCls;this.iconCls=A;if(this.rendered)this.el.child("img.x-menu-item-icon").replaceClass(B,this.iconCls)},handleClick:function(A){if(!this.href)A.stopEvent();
Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(A){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(A)this.expandMenu()}return true},shouldDeactivate:function(A){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,A)){if(this.menu&&this.menu.isVisible())return!this.menu.getEl().getRegion().contains(A.getPoint());return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(A){if(!this.disabled&&
this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer)this.showTimer=this.deferExpand.defer(this.showDelay,this,[A]);else if(this.menu.isVisible()&&A)this.menu.tryActivate(0,1)}},deferExpand:function(A){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(A)this.menu.tryActivate(0,1)},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible())this.hideTimer=
this.deferHide.defer(this.hideDelay,this)},deferHide:function(){delete this.hideTimer;if(this.menu.over)this.parentMenu.setActiveItem(this,false);else this.menu.hide()}});Ext.menu.CheckItem=function(A){Ext.menu.CheckItem.superclass.constructor.call(this,A);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler)this.on("checkchange",this.checkHandler,this.scope);Ext.menu.MenuMgr.registerCheckable(this)};
Ext.extend(Ext.menu.CheckItem,Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",onRender:function(A){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group)this.el.addClass(this.groupClass);if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(B,A){if(this.checked!=
B&&this.fireEvent("beforecheckchange",this,B)!==false){if(this.container)this.container[B?"addClass":"removeClass"]("x-menu-item-checked");this.checked=B;if(A!==true)this.fireEvent("checkchange",this,B)}},handleClick:function(A){if(!this.disabled&&!(this.checked&&this.group))this.setChecked(!this.checked);Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.menu.Adapter=function(B,A){Ext.menu.Adapter.superclass.constructor.call(this,A);this.component=B};
Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(B,A){this.component.render(B);this.el=this.component.getEl()},activate:function(){if(this.disabled)return false;this.component.focus();this.fireEvent("activate",this);return true},deactivate:function(){this.fireEvent("deactivate",this)},disable:function(){this.component.disable();Ext.menu.Adapter.superclass.disable.call(this)},enable:function(){this.component.enable();Ext.menu.Adapter.superclass.enable.call(this)}});
Ext.menu.DateItem=function(A){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(A),A);this.picker=this.component;this.addEvents("select");this.picker.on("render",function(B){B.getEl().swallowEvent("click");B.container.addClass("x-menu-date-item")});this.picker.on("select",this.onSelect,this)};Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(B,A){this.fireEvent("select",this,A,B);Ext.menu.DateItem.superclass.handleClick.call(this)}});
Ext.menu.ColorItem=function(A){Ext.menu.ColorItem.superclass.constructor.call(this,new Ext.ColorPalette(A),A);this.palette=this.component;this.relayEvents(this.palette,["select"]);if(this.selectHandler)this.on("select",this.selectHandler,this.scope)};Ext.extend(Ext.menu.ColorItem,Ext.menu.Adapter);
Ext.menu.DateMenu=function(A){Ext.menu.DateMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.DateItem(A);this.add(B);this.picker=B.picker;this.relayEvents(B,["select"]);this.on("beforeshow",function(){if(this.picker)this.picker.hideMonthPicker(true)},this)};Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu,{cls:"x-date-menu",beforeDestroy:function(){this.picker.destroy()}});
Ext.menu.ColorMenu=function(A){Ext.menu.ColorMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.ColorItem(A);this.add(B);this.palette=B.palette;this.relayEvents(B,["select"])};Ext.extend(Ext.menu.ColorMenu,Ext.menu.Menu);
Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,isFormField:true,hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus",
"blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.hiddenName||""},onRender:function(C,A){Ext.form.Field.superclass.onRender.call(this,C,A);if(!this.el){var B=this.getAutoCreate();if(!B.name)B.name=this.name||this.id;if(this.inputType)B.type=this.inputType;this.el=C.createChild(B,A)}var D=this.el.dom.type;if(D){if(D=="password")D="text";this.el.addClass("x-form-"+D)}if(this.readOnly)this.el.dom.readOnly=true;if(this.tabIndex!==
undefined)this.el.dom.setAttribute("tabIndex",this.tabIndex);this.el.addClass([this.fieldClass,this.cls])},initValue:function(){if(this.value!==undefined)this.setValue(this.value);else if(this.el.dom.value.length>0&&this.el.dom.value!=this.emptyText)this.setValue(this.el.dom.value);this.originalValue=this.getValue()},isDirty:function(){if(this.disabled)return false;return String(this.getValue())!==String(this.originalValue)},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);
this.initEvents();this.initValue()},fireKey:function(A){if(A.isSpecialKey())this.fireEvent("specialkey",this,A)},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.el.on(Ext.isIE||Ext.isSafari3?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);var A=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.el.on("blur",this.onBlur,this,A);this.originalValue=this.getValue()},onFocus:function(){if(!Ext.isOpera&&this.focusClass)this.el.addClass(this.focusClass);
if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(!Ext.isOpera&&this.focusClass)this.el.removeClass(this.focusClass);this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur")this.validate();var A=this.getValue();if(String(A)!==String(this.startValue))this.fireEvent("change",this,A,this.startValue);this.fireEvent("blur",this)},isValid:function(A){if(this.disabled)return true;
var C=this.preventMark;this.preventMark=A===true;var B=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=C;return B},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(A){return A},validateValue:function(A){return true},markInvalid:function(C){if(!this.rendered||this.preventMark)return;this.el.addClass(this.invalidClass);C=C||this.invalidText;switch(this.msgTarget){case "qtip":this.el.dom.qtip=
C;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips)Ext.QuickTips.enable();break;case "title":this.el.dom.title=C;break;case "under":if(!this.errorEl){var B=this.getErrorCt();if(!B){this.el.dom.title=C;break}this.errorEl=B.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(B.getWidth(true)-20)}this.errorEl.update(C);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case "side":if(!this.errorIcon){var B=this.getErrorCt();if(!B){this.el.dom.title=C;break}this.errorIcon=
B.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=C;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML=C;A.style.display=this.msgDisplay;break}this.fireEvent("invalid",this,C)},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,
"tl-tr",[2,0])},clearInvalid:function(){if(!this.rendered||this.preventMark)return;this.el.removeClass(this.invalidClass);switch(this.msgTarget){case "qtip":this.el.dom.qtip="";break;case "title":this.el.dom.title="";break;case "under":if(this.errorEl)Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this);break;case "side":if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML="";A.style.display=
"none";break}this.fireEvent("valid",this)},getRawValue:function(){var A=this.rendered?this.el.getValue():Ext.value(this.value,"");if(A===this.emptyText)A="";return A},getValue:function(){if(!this.rendered)return this.value;var A=this.el.getValue();if(A===this.emptyText||A===undefined)A="";return A},setRawValue:function(A){return this.el.dom.value=A===null||A===undefined?"":A},setValue:function(A){this.value=A;if(this.rendered){this.el.dom.value=A===null||A===undefined?"":A;this.validate()}},adjustSize:function(A,
C){var B=Ext.form.Field.superclass.adjustSize.call(this,A,C);B.width=this.adjustWidth(this.el.dom.tagName,B.width);return B},adjustWidth:function(A,B){A=A.toLowerCase();if(typeof B=="number"&&!Ext.isSafari)if(Ext.isIE&&(A=="input"||A=="textarea")){if(A=="input"&&!Ext.isStrict)return this.inEditor?B:B-3;if(A=="input"&&Ext.isStrict)return B-(Ext.isIE6?4:1);if(A=="textarea"&&Ext.isStrict)return B-2}else if(Ext.isOpera&&Ext.isStrict){if(A=="input")return B+2;if(A=="textarea")return B-2}return B}});
Ext.form.MessageTargets={"qtip":{mark:function(A){this.el.dom.qtip=msg;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips)Ext.QuickTips.enable()},clear:function(A){this.el.dom.qtip=""}},"title":{mark:function(A){this.el.dom.title=msg},clear:function(A){this.el.dom.title=""}},"under":{mark:function(B){if(!this.errorEl){var A=this.getErrorCt();if(!A){this.el.dom.title=msg;return}this.errorEl=A.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(A.getWidth(true)-20)}this.errorEl.update(msg);
Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this)},clear:function(A){if(this.errorEl)Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this);else this.el.dom.title=""}},"side":{mark:function(B){if(!this.errorIcon){var A=this.getErrorCt();if(!A){this.el.dom.title=msg;return}this.errorIcon=A.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=msg;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this)},
clear:function(A){if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}else this.el.dom.title=""}},"around":{mark:function(A){},clear:function(A){}}};
Ext.form.Field.msgFx={normal:{show:function(A,B){A.setDisplayed("block")},hide:function(A,B){A.setDisplayed(false).update("")}},slide:{show:function(A,B){A.slideIn("t",{stopFx:true})},hide:function(A,B){A.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(A,B){A.fixDisplay();A.alignTo(B.el,"tl-tr");A.slideIn("l",{stopFx:true})},hide:function(A,B){A.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field);
Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,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}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);
this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.el.on("keyup",this.filterValidation,this)}else if(this.validationEvent!==false)this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay});if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);this.el.on("mousedown",function(){if(!this.hasFocus)this.el.on("mouseup",
function(A){A.preventDefault()},this,{single:true})},this);if(this.emptyText){this.on("blur",this.postBlur,this);this.applyEmptyText()}}if(this.maskRe||this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))this.el.on("keypress",this.filterKeys,this);if(this.grow){this.el.on("keyup",this.onKeyUpBuffered,this,{buffer:50});this.el.on("click",this.autoSize,this)}if(this.enableKeyEvents){this.el.on("keyup",this.onKeyUp,this);this.el.on("keydown",this.onKeyDown,this);
this.el.on("keypress",this.onKeyPress,this)}},processValue:function(A){if(this.stripCharsRe){var B=A.replace(this.stripCharsRe,"");if(B!==A){this.setRawValue(B);return B}}return A},filterValidation:function(A){if(!A.isNavKeyPress())this.validationTask.delay(this.validationDelay)},onKeyUpBuffered:function(A){if(!A.isNavKeyPress())this.autoSize()},onKeyUp:function(A){this.fireEvent("keyup",this,A)},onKeyDown:function(A){this.fireEvent("keydown",this,A)},onKeyPress:function(A){this.fireEvent("keypress",
this,A)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText)this.setRawValue("");this.el.removeClass(this.emptyClass)}if(this.selectOnFocus)this.el.dom.select()},postBlur:function(){this.applyEmptyText()},filterKeys:function(B){if(B.ctrlKey)return;
var A=B.getKey();if(Ext.isGecko&&(B.isNavKeyPress()||A==B.BACKSPACE||A==B.DELETE&&B.button==-1))return;var D=B.getCharCode(),C=String.fromCharCode(D);if(!Ext.isGecko&&B.isSpecialKey()&&!C)return;if(!this.maskRe.test(C))B.stopEvent()},setValue:function(A){if(this.emptyText&&this.el&&A!==undefined&&A!==null&&A!=="")this.el.removeClass(this.emptyClass);Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize()},validateValue:function(A){if(A.length<1||A===this.emptyText)if(this.allowBlank){this.clearInvalid();
return true}else{this.markInvalid(this.blankText);return false}if(A.length<this.minLength){this.markInvalid(String.format(this.minLengthText,this.minLength));return false}if(A.length>this.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false}if(this.vtype){var C=Ext.form.VTypes;if(!C[this.vtype](A,this)){this.markInvalid(this.vtypeText||C[this.vtype+"Text"]);return false}}if(typeof this.validator=="function"){var B=this.validator(A);if(B!==true){this.markInvalid(B);
return false}}if(this.regex&&!this.regex.test(A)){this.markInvalid(this.regexText);return false}return true},selectText:function(E,A){var C=this.getRawValue();if(C.length>0){E=E===undefined?0:E;A=A===undefined?C.length:A;var D=this.el.dom;if(D.setSelectionRange)D.setSelectionRange(E,A);else if(D.createTextRange){var B=D.createTextRange();B.moveStart("character",E);B.moveEnd("character",A-C.length);B.select()}}},autoSize:function(){if(!this.grow||!this.rendered)return;if(!this.metrics)this.metrics=
Ext.util.TextMetrics.createInstance(this.el);var C=this.el;var B=C.dom.value;var D=document.createElement("div");D.appendChild(document.createTextNode(B));B=D.innerHTML;D=null;B+="&#160;";var A=Math.min(this.growMax,Math.max(this.metrics.getWidth(B)+10,this.growMin));this.el.setWidth(A);this.fireEvent("autosize",this,A)}});Ext.reg("textfield",Ext.form.TextField);
Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,onResize:function(A,B){Ext.form.TriggerField.superclass.onResize.call(this,A,B);if(typeof A=="number")this.el.setWidth(this.adjustWidth("input",A-this.trigger.getWidth()));this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},
getPositionEl:function(){return this.wrap},alignErrorIcon:function(){if(this.wrap)this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])},onRender:function(B,A){Ext.form.TriggerField.superclass.onRender.call(this,B,A);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(this.hideTrigger)this.trigger.setDisplayed(false);this.initTrigger();if(!this.width)this.wrap.setWidth(this.el.getWidth()+
this.trigger.getWidth())},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);var A;if(Ext.isIE&&this.el.getY()!=(A=this.trigger.getY())){this.el.position();this.el.setY(A)}},initTrigger:function(){this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();this.trigger.remove()}if(this.wrap)this.wrap.remove();
Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass("x-trigger-wrap-focus");this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab)this.el.on("keydown",this.checkTab,this)}},checkTab:function(A){if(A.getKey()==A.TAB)this.triggerBlur()},onBlur:function(){},mimicBlur:function(A){if(!this.wrap.contains(A.target)&&this.validateBlur(A))this.triggerBlur()},
triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);if(this.monitorTab)this.el.un("keydown",this.checkTab,this);this.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");Ext.form.TriggerField.superclass.onBlur.call(this)},beforeBlur:Ext.emptyFn,validateBlur:function(A){return true},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass(this.disabledClass);this.el.removeClass(this.disabledClass)}},
onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap)this.wrap.removeClass(this.disabledClass)},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},onTriggerClick:Ext.emptyFn});
Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(A){return this.triggers[A]},initTrigger:function(){var A=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow",
"hidden");var B=this;A.each(function(D,F,C){D.hide=function(){var G=B.wrap.getWidth();this.dom.style.display="none";B.el.setWidth(G-B.trigger.getWidth())};D.show=function(){var G=B.wrap.getWidth();this.dom.style.display="";B.el.setWidth(G-B.trigger.getWidth())};var E="Trigger"+(C+1);if(this["hide"+E])D.dom.style.display="none";D.on("click",this["on"+E+"Click"],this,{preventDefault:true});D.addClassOnOver("x-form-trigger-over");D.addClassOnClick("x-form-trigger-click")},this);this.triggers=A.elements},
onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField);
Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1E3,growAppend:"&#160;\n&#160;",growPad:0,enterIsSpecial:false,preventScrollbars:false,onRender:function(B,A){if(!this.el)this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"};Ext.form.TextArea.superclass.onRender.call(this,B,A);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars)this.el.setStyle("overflow","hidden");
this.el.setHeight(this.growMin)}},onDestroy:function(){if(this.textSizeEl)Ext.removeNode(this.textSizeEl);Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(A){if(A.isSpecialKey()&&(this.enterIsSpecial||(A.getKey()!=A.ENTER||A.hasModifier())))this.fireEvent("specialkey",this,A)},onKeyUp:function(A){if(!A.isNavKeyPress()||A.getKey()==A.ENTER)this.autoSize();Ext.form.TextArea.superclass.onKeyUp.call(this,A)},autoSize:function(){if(!this.grow||!this.textSizeEl)return;var C=this.el;var A=
C.dom.value;var D=this.textSizeEl;D.innerHTML="";D.appendChild(document.createTextNode(A));A=D.innerHTML;Ext.fly(D).setWidth(this.el.getWidth());if(A.length<1)A="&#160;&#160;";else{if(Ext.isIE)A=A.replace(/\n/g,"<p>&#160;</p>");A+=this.growAppend}D.innerHTML=A;var B=Math.min(this.growMax,Math.max(D.offsetHeight,this.growMin)+this.growPad);if(B!=this.lastHeight){this.lastHeight=B;this.el.setHeight(B);this.fireEvent("autosize",this,B)}}});Ext.reg("textarea",Ext.form.TextArea);
Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,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",baseChars:"0123456789",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);var B=this.baseChars+"";if(this.allowDecimals)B+=
this.decimalSeparator;if(this.allowNegative)B+="-";this.stripCharsRe=new RegExp("[^"+B+"]","gi");var A=function(D){var C=D.getKey();if(!Ext.isIE&&(D.isSpecialKey()||C==D.BACKSPACE||C==D.DELETE))return;var E=D.getCharCode();if(B.indexOf(String.fromCharCode(E))===-1)D.stopEvent()};this.el.on("keypress",A,this)},validateValue:function(B){if(!Ext.form.NumberField.superclass.validateValue.call(this,B))return false;if(B.length<1)return true;B=String(B).replace(this.decimalSeparator,".");if(isNaN(B)){this.markInvalid(String.format(this.nanText,
B));return false}var A=this.parseValue(B);if(A<this.minValue){this.markInvalid(String.format(this.minText,this.minValue));return false}if(A>this.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));return false}return true},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(A){A=typeof A=="number"?A:parseFloat(String(A).replace(this.decimalSeparator,"."));A=isNaN(A)?"":String(A).replace(".",this.decimalSeparator);
Ext.form.NumberField.superclass.setValue.call(this,A)},parseValue:function(A){A=parseFloat(String(A).replace(this.decimalSeparator,"."));return isNaN(A)?"":A},fixPrecision:function(B){var A=isNaN(B);if(!this.allowDecimals||this.decimalPrecision==-1||A||!B)return A?"":B;return parseFloat(parseFloat(B).toFixed(this.decimalPrecision))},beforeBlur:function(){var A=this.parseValue(this.getRawValue());if(A)this.setValue(this.fixPrecision(A))}});Ext.reg("numberfield",Ext.form.NumberField);
Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{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",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}",triggerClass:"x-form-date-trigger",showToday:true,defaultAutoCreate:{tag:"input",type:"text",
size:"10",autocomplete:"off"},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);if(typeof this.minValue=="string")this.minValue=this.parseDate(this.minValue);if(typeof this.maxValue=="string")this.maxValue=this.parseDate(this.maxValue);this.ddMatch=null;this.initDisabledDays()},initDisabledDays:function(){if(this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;B<A.length;B++){C+=A[B];if(B!=A.length-1)C+="|"}this.disabledDatesRE=new RegExp(C+")")}},setDisabledDates:function(A){this.disabledDates=
A;this.initDisabledDays();if(this.menu)this.menu.picker.setDisabledDates(this.disabledDatesRE)},setDisabledDays:function(A){this.disabledDays=A;if(this.menu)this.menu.picker.setDisabledDays(A)},setMinValue:function(A){this.minValue=typeof A=="string"?this.parseDate(A):A;if(this.menu)this.menu.picker.setMinDate(this.minValue)},setMaxValue:function(A){this.maxValue=typeof A=="string"?this.parseDate(A):A;if(this.menu)this.menu.picker.setMaxDate(this.maxValue)},validateValue:function(E){E=this.formatDate(E);
if(!Ext.form.DateField.superclass.validateValue.call(this,E))return false;if(E.length<1)return true;var C=E;E=this.parseDate(E);if(!E){this.markInvalid(String.format(this.invalidText,C,this.format));return false}var F=E.getTime();if(this.minValue&&F<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));return false}if(this.maxValue&&F>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var A=
E.getDay();for(var B=0;B<this.disabledDays.length;B++)if(A===this.disabledDays[B]){this.markInvalid(this.disabledDaysText);return false}}var D=this.formatDate(E);if(this.ddMatch&&this.ddMatch.test(D)){this.markInvalid(String.format(this.disabledDatesText,D));return false}return true},validateBlur:function(){return!this.menu||!this.menu.isVisible()},getValue:function(){return this.parseDate(Ext.form.DateField.superclass.getValue.call(this))||""},setValue:function(A){Ext.form.DateField.superclass.setValue.call(this,
this.formatDate(this.parseDate(A)))},parseDate:function(D){if(!D||Ext.isDate(D))return D;var B=Date.parseDate(D,this.format);if(!B&&this.altFormats){if(!this.altFormatsArray)this.altFormatsArray=this.altFormats.split("|");for(var C=0,A=this.altFormatsArray.length;C<A&&!B;C++)B=Date.parseDate(D,this.altFormatsArray[C])}return B},onDestroy:function(){if(this.menu)this.menu.destroy();if(this.wrap)this.wrap.remove();Ext.form.DateField.superclass.onDestroy.call(this)},formatDate:function(A){return Ext.isDate(A)?
A.dateFormat(this.format):A},menuListeners:{select:function(A,B){this.setValue(B)},show:function(){this.onFocus()},hide:function(){this.focus.defer(10,this);var A=this.menuListeners;this.menu.un("select",A.select,this);this.menu.un("show",A.show,this);this.menu.un("hide",A.hide,this)}},onTriggerClick:function(){if(this.disabled)return;if(this.menu==null)this.menu=new Ext.menu.DateMenu;Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.ddMatch,disabledDatesText:this.disabledDatesText,
disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))});this.menu.on(Ext.apply({},this.menuListeners,{scope:this}));this.menu.picker.setValue(this.getValue()||new Date);this.menu.show(this.el,"tl-bl?")},beforeBlur:function(){var A=this.parseDate(this.getRawValue());if(A)this.setValue(A)}});
Ext.reg("datefield",Ext.form.DateField);
Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,minHeight:90,triggerAction:"query",minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,editable:true,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,
typeAheadDelay:250,lazyInit:true,initComponent:function(){Ext.form.ComboBox.superclass.initComponent.call(this);this.addEvents("expand","collapse","beforeselect","select","beforequery");if(this.transform){this.allowDomMove=false;var C=Ext.getDom(this.transform);if(!this.hiddenName)this.hiddenName=C.name;if(!this.store){this.mode="local";var G=[],D=C.options;for(var B=0,A=D.length;B<A;B++){var F=D[B];var E=(Ext.isIE?F.getAttributeNode("value").specified:F.hasAttribute("value"))?F.value:F.text;if(F.selected)this.value=
E;G.push([E,F.text])}this.store=new Ext.data.SimpleStore({"id":0,fields:["value","text"],data:G});this.valueField="value";this.displayField="text"}C.name=Ext.id();if(!this.lazyRender){this.target=true;this.el=Ext.DomHelper.insertBefore(C,this.autoCreate||this.defaultAutoCreate);Ext.removeNode(C);this.render(this.el.parentNode)}else Ext.removeNode(C)}else if(Ext.isArray(this.store)){if(Ext.isArray(this.store[0])){this.store=new Ext.data.SimpleStore({fields:["value","text"],data:this.store});this.valueField=
"value"}else{this.store=new Ext.data.SimpleStore({fields:["text"],data:this.store,expandData:true});this.valueField="text"}this.displayField="text";this.mode="local"}this.selectedIndex=-1;if(this.mode=="local"){if(this.initialConfig.queryDelay===undefined)this.queryDelay=10;if(this.initialConfig.minChars===undefined)this.minChars=0}},onRender:function(B,A){Ext.form.ComboBox.superclass.onRender.call(this,B,A);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,
id:this.hiddenId||this.hiddenName},"before",true);this.el.dom.removeAttribute("name")}if(Ext.isGecko)this.el.dom.setAttribute("autocomplete","off");if(!this.lazyInit)this.initList();else this.on("focus",this.initList,this,{single:true});if(!this.editable){this.editable=true;this.setEditable(false)}},initValue:function(){Ext.form.ComboBox.superclass.initValue.call(this);if(this.hiddenField)this.hiddenField.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:""},initList:function(){if(!this.list){var A=
"x-combo-list";this.list=new Ext.Layer({shadow:this.shadow,cls:[A,this.listClass].join(" "),constrain:false});var B=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setWidth(B);this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.title){this.header=this.list.createChild({cls:A+"-hd",html:this.title});this.assetHeight+=this.header.getHeight()}this.innerList=this.list.createChild({cls:A+"-inner"});this.innerList.on("mouseover",this.onViewOver,this);this.innerList.on("mousemove",
this.onViewMove,this);this.innerList.setWidth(B-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:A+"-ft"});this.pageTb=new Ext.PagingToolbar({store:this.store,pageSize:this.pageSize,renderTo:this.footer});this.assetHeight+=this.footer.getHeight()}if(!this.tpl)this.tpl='<tpl for="."><div class="'+A+'-item">{'+this.displayField+"}</div></tpl>";this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||
"."+A+"-item"});this.view.on("click",this.onViewClick,this);this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.resizer.on("resize",function(E,C,D){this.maxHeight=D-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=C;this.innerList.setWidth(C-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},bindStore:function(A,
B){if(this.store&&!B){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.collapse,this);if(!A){this.store=null;if(this.view)this.view.setStore(null)}}if(A){this.store=Ext.StoreMgr.lookup(A);this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.collapse,this);if(this.view)this.view.setStore(A)}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);
this.keyNav=new Ext.KeyNav(this.el,{"up":function(A){this.inKeyMode=true;this.selectPrev()},"down":function(A){if(!this.isExpanded())this.onTriggerClick();else{this.inKeyMode=true;this.selectNext()}},"enter":function(A){this.onViewClick();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this)},"esc":function(A){this.collapse()},"tab":function(A){this.onViewClick(false);return true},scope:this,doRelay:function(C,B,A){if(A=="down"||this.scope.isExpanded())return Ext.KeyNav.prototype.doRelay.apply(this,
arguments);return true},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead)this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this);if(this.editable!==false)this.el.on("keyup",this.onKeyUp,this);if(this.forceSelection)this.on("blur",this.doForce,this)},onDestroy:function(){if(this.view){this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners()}if(this.list)this.list.destroy();
this.bindStore(null);Ext.form.ComboBox.superclass.onDestroy.call(this)},unsetDelayCheck:function(){delete this.delayedCheck},fireKey:function(A){if(A.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck)this.fireEvent("specialkey",this,A)},onResize:function(A,B){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&this.listWidth===undefined){var C=Math.max(A,this.minListWidth);this.list.setWidth(C);this.innerList.setWidth(C-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,
arguments);if(this.hiddenField)this.hiddenField.disabled=false},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField)this.hiddenField.disabled=true},setEditable:function(A){if(A==this.editable)return;this.editable=A;if(!A){this.el.dom.setAttribute("readOnly",true);this.el.on("mousedown",this.onTriggerClick,this);this.el.addClass("x-combo-noedit")}else{this.el.dom.setAttribute("readOnly",false);this.el.un("mousedown",this.onTriggerClick,this);this.el.removeClass("x-combo-noedit")}},
onBeforeLoad:function(){if(!this.hasFocus)return;this.innerList.update(this.loadingText?'<div class="loading-indicator">'+this.loadingText+"</div>":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus)return;if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable)this.el.dom.select();if(!this.selectByValue(this.value,true))this.select(0,true)}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&
this.lastKey!=Ext.EventObject.DELETE)this.taTask.delay(this.typeAheadDelay)}}else this.onEmptyResults()},onTypeAhead:function(){if(this.store.getCount()>0){var B=this.store.getAt(0);var C=B.data[this.displayField];var A=C.length;var D=this.getRawValue().length;if(D!=A){this.setRawValue(C);this.selectText(D,C.length)}}},onSelect:function(A,B){if(this.fireEvent("beforeselect",this,A,B)!==false){var answer=document.getElementById(this.innerList.id).childNodes[this.selectedIndex];if(document.getElementById("grouping")!=
null)document.getElementById("grouping").value=answer.textContent||answer.innerText;else if(document.getElementById("newgroup")!==null)document.getElementById("newgroup").value=answer.textContent||answer.innerText;else document.getElementById("newgroup_accept").value=answer.textContent||answer.innerText;this.collapse();return}},getValue:function(){if(this.valueField)return typeof this.value!="undefined"?this.value:"";else return Ext.form.ComboBox.superclass.getValue.call(this)},clearValue:function(){if(this.hiddenField)this.hiddenField.value=
"";this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(A){var C=A;if(this.valueField){var B=this.findRecord(this.valueField,A);if(B)C=B.data[this.displayField];else if(this.valueNotFoundText!==undefined)C=this.valueNotFoundText}this.lastSelectionText=C;if(this.hiddenField)this.hiddenField.value=A;Ext.form.ComboBox.superclass.setValue.call(this,C);this.value=A},findRecord:function(C,B){var A;if(this.store.getCount()>0)this.store.each(function(D){if(D.data[C]==
B){A=D;return false}});return A},onViewMove:function(B,A){this.inKeyMode=false},onViewOver:function(D,B){if(this.inKeyMode)return;var C=this.view.findItemFromChild(B);if(C){var A=this.view.indexOf(C);this.select(A,false)}},onViewClick:function(B){var A=this.view.getSelectedIndexes()[0];var C=this.store.getAt(A);if(C)this.onSelect(C,A);if(B!==false)this.el.focus()},restrictHeight:function(){this.innerList.dom.style.height="";var B=this.innerList.dom;var E=this.list.getFrameWidth("tb")+(this.resizable?
this.handleHeight:0)+this.assetHeight;var C=Math.max(B.clientHeight,B.offsetHeight,B.scrollHeight);var A=this.getPosition()[1]-Ext.getBody().getScroll().top;var F=Ext.lib.Dom.getViewHeight()-A-this.getSize().height;var D=Math.max(A,F,this.minHeight||0)-this.list.shadowOffset-E-5;C=Math.min(C,D,this.maxHeight);this.innerList.setHeight(C);this.list.beginUpdate();this.list.setHeight(C+E);this.list.alignTo(this.wrap,this.listAlign);this.list.endUpdate()},onEmptyResults:function(){this.collapse()},isExpanded:function(){return this.list&&
this.list.isVisible()},selectByValue:function(A,C){if(A!==undefined&&A!==null){var B=this.findRecord(this.valueField||this.displayField,A);if(B){this.select(this.store.indexOf(B),C);return true}}return false},select:function(A,C){this.selectedIndex=A;this.view.select(A);if(C!==false){var B=this.view.getNode(A);if(B)this.innerList.scrollChildIntoView(B,false)}},selectNext:function(){var A=this.store.getCount();if(A>0)if(this.selectedIndex==-1)this.select(0);else if(this.selectedIndex<A-1)this.select(this.selectedIndex+
1)},selectPrev:function(){var A=this.store.getCount();if(A>0)if(this.selectedIndex==-1)this.select(0);else if(this.selectedIndex!=0)this.select(this.selectedIndex-1)},onKeyUp:function(A){if(this.editable!==false&&!A.isSpecialKey()){this.lastKey=A.getKey();this.dqTask.delay(this.queryDelay)}},validateBlur:function(){return!this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===
undefined?"":this.lastSelectionText;this.applyEmptyText()}},doQuery:function(C,B){if(C===undefined||C===null)C="";var A={query:C,forceAll:B,combo:this,cancel:false};if(this.fireEvent("beforequery",A)===false||A.cancel)return false;C=A.query;B=A.forceAll;if(B===true||C.length>=this.minChars)if(this.lastQuery!==C){this.lastQuery=C;if(this.mode=="local"){this.selectedIndex=-1;if(B)this.store.clearFilter();else this.store.filter(this.displayField,C);this.onLoad()}else{this.store.baseParams[this.queryParam]=
C;this.store.load({params:this.getParams(C)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}},getParams:function(A){var B={};if(this.pageSize){B.start=0;B.limit=this.pageSize}return B},collapse:function(){if(!this.isExpanded())return;this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(A){if(!A.within(this.wrap)&&!A.within(this.list))this.collapse()},expand:function(){if(this.isExpanded()||
!this.hasFocus)return;this.list.alignTo(this.wrap,this.listAlign);this.list.show();this.innerList.setOverflow("auto");Ext.getDoc().on("mousewheel",this.collapseIf,this);Ext.getDoc().on("mousedown",this.collapseIf,this);this.fireEvent("expand",this)},onTriggerClick:function(){if(this.disabled)return;if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all")this.doQuery(this.allQuery,true);else this.doQuery(this.getRawValue());this.el.focus()}}});
Ext.reg("combo",Ext.form.ComboBox);
Ext.form.Checkbox=Ext.extend(Ext.form.Field,{checkedCls:"x-form-check-checked",focusCls:"x-form-check-focus",overCls:"x-form-check-over",mouseDownCls:"x-form-check-down",tabIndex:0,checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},baseCls:"x-form-check",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.initCheckEvents()},initCheckEvents:function(){this.innerWrap.removeAllListeners();
this.innerWrap.addClassOnOver(this.overCls);this.innerWrap.addClassOnClick(this.mouseDownCls);this.innerWrap.on("click",this.onClick,this);this.innerWrap.on("keyup",this.onKeyUp,this)},onRender:function(B,A){Ext.form.Checkbox.superclass.onRender.call(this,B,A);if(this.inputValue!==undefined)this.el.dom.value=this.inputValue;this.el.addClass("x-hidden");this.innerWrap=this.el.wrap({tabIndex:this.tabIndex,cls:this.baseCls+"-wrap-inner"});this.wrap=this.innerWrap.wrap({cls:this.baseCls+"-wrap"});if(this.boxLabel)this.labelEl=
this.innerWrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel});this.imageEl=this.innerWrap.createChild({tag:"img",src:Ext.BLANK_IMAGE_URL,cls:this.baseCls},this.el);if(this.checked)this.setValue(true);else this.checked=this.el.dom.checked;this.originalValue=this.checked},onDestroy:function(){if(this.rendered)Ext.destroy(this.imageEl,this.labelEl,this.innerWrap,this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},onFocus:function(A){Ext.form.Checkbox.superclass.onFocus.call(this,
A);this.el.addClass(this.focusCls)},onBlur:function(A){Ext.form.Checkbox.superclass.onBlur.call(this,A);this.el.removeClass(this.focusCls)},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel)this.el.alignTo(this.wrap,"c-c")},onKeyUp:function(A){if(A.getKey()==Ext.EventObject.SPACE)this.onClick(A)},onClick:function(A){if(!this.disabled&&!this.readOnly)this.toggleValue();A.stopEvent()},onEnable:function(){Ext.form.Checkbox.superclass.onEnable.call(this);
this.initCheckEvents()},onDisable:function(){Ext.form.Checkbox.superclass.onDisable.call(this);this.innerWrap.removeAllListeners()},toggleValue:function(){this.setValue(!this.checked)},getResizeEl:function(){if(!this.resizeEl)this.resizeEl=Ext.isSafari?this.wrap:this.wrap.up(".x-form-element",5)||this.wrap;return this.resizeEl},getPositionEl:function(){return this.wrap},getActionEl:function(){return this.wrap},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,initValue:Ext.emptyFn,getValue:function(){if(this.rendered)return this.el.dom.checked;
return false},setValue:function(A){var B=this.checked;this.checked=A===true||A==="true"||A=="1"||String(A).toLowerCase()=="on";if(this.el&&this.el.dom){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}this.wrap[this.checked?"addClass":"removeClass"](this.checkedCls);if(B!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler)this.handler.call(this.scope||this,this,this.checked)}}});Ext.reg("checkbox",Ext.form.Checkbox);
Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",onRender:function(H,F){if(!this.el){var M={cls:this.groupCls,layout:"column",border:false,renderTo:H};var A={defaultType:this.defaultType,layout:"form",border:false,defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(M,{layoutConfig:{columns:this.items.length},defaults:this.defaults,
items:this.items});for(var E=0,J=this.items.length;E<J;E++)Ext.applyIf(this.items[E],A)}else{var D,K=[];if(typeof this.columns=="string")this.columns=this.items.length;if(!Ext.isArray(this.columns)){var I=[];for(var E=0;E<this.columns;E++)I.push(100/this.columns*.01);this.columns=I}D=this.columns.length;for(var E=0;E<D;E++){var B=Ext.apply({items:[]},A);B[this.columns[E]<=1?"columnWidth":"width"]=this.columns[E];if(this.defaults)B.defaults=Ext.apply(B.defaults||{},this.defaults);K.push(B)}if(this.vertical){var O=
Math.ceil(this.items.length/D),L=0;for(var E=0,J=this.items.length;E<J;E++){if(E>0&&E%O==0)L++;if(this.items[E].fieldLabel)this.items[E].hideLabel=false;K[L].items.push(this.items[E])}}else for(var E=0,J=this.items.length;E<J;E++){var N=E%D;if(this.items[E].fieldLabel)this.items[E].hideLabel=false;K[N].items.push(this.items[E])}Ext.apply(M,{layoutConfig:{columns:D},items:K})}this.panel=new Ext.Panel(M);this.el=this.panel.getEl();if(this.forId&&this.itemCls){var C=this.el.up(this.itemCls).child("label",
true);if(C)C.setAttribute("htmlFor",this.forId)}var G=this.panel.findBy(function(P){return P.isFormField},this);this.items=new Ext.util.MixedCollection;this.items.addAll(G)}Ext.form.CheckboxGroup.superclass.onRender.call(this,H,F)},validateValue:function(A){if(!this.allowBlank){var B=true;this.items.each(function(C){if(C.checked)return B=false},this);if(B){this.markInvalid(this.blankText);return false}}return true},onDisable:function(){this.items.each(function(A){A.disable()})},onEnable:function(){this.items.each(function(A){A.enable()})},
onResize:function(A,B){this.panel.setSize(A,B);this.panel.doLayout()},reset:function(){Ext.form.CheckboxGroup.superclass.reset.call(this);this.items.each(function(A){if(A.reset)A.reset()},this)},initValue:Ext.emptyFn,getValue:Ext.emptyFn,getRawValue:Ext.emptyFn,setValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);
Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",baseCls:"x-form-radio",getGroupValue:function(){var A=this.getParent().child("input[name="+this.el.dom.name+"]:checked",true);return A?A.value:null},getParent:function(){return this.el.up("form")||Ext.getBody()},toggleValue:function(){if(!this.checked){var A=this.getParent().select("input[name="+this.el.dom.name+"]");A.each(function(B){if(B.dom.id==this.id)this.setValue(true);else Ext.getCmp(B.dom.id).setValue(false)},this)}},setValue:function(A){if(typeof A==
"boolean")Ext.form.Radio.superclass.setValue.call(this,A);else{var B=this.getParent().child("input[name="+this.el.dom.name+"][value="+A+"]",true);if(B&&!B.checked)Ext.getCmp(B.id).toggleValue()}},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("radio",Ext.form.Radio);Ext.form.RadioGroup=Ext.extend(Ext.form.CheckboxGroup,{allowBlank:true,blankText:"You must select one item in this group",defaultType:"radio",groupCls:"x-form-radio-group"});Ext.reg("radiogroup",Ext.form.RadioGroup);
Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);
Ext.form.BasicForm=function(B,A){Ext.apply(this,A);this.items=new Ext.util.MixedCollection(false,function(C){return C.id||(C.id=Ext.id())});this.addEvents("beforeaction","actionfailed","actioncomplete");if(B)this.initEl(B);Ext.form.BasicForm.superclass.constructor.call(this)};
Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,activeAction:null,trackResetOnLoad:false,initEl:function(A){this.el=Ext.get(A);this.id=this.el.id||Ext.id();if(!this.standardSubmit)this.el.on("submit",this.onSubmit,this);this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(A){A.stopEvent()},destroy:function(){this.items.each(function(A){Ext.destroy(A)});if(this.el){this.el.removeAllListeners();this.el.remove()}this.purgeListeners()},isValid:function(){var A=
true;this.items.each(function(B){if(!B.validate())A=false});return A},isDirty:function(){var A=false;this.items.each(function(B){if(B.isDirty()){A=true;return false}});return A},doAction:function(B,A){if(typeof B=="string")B=new Ext.form.Action.ACTION_TYPES[B](this,A);if(this.fireEvent("beforeaction",this,B)!==false){this.beforeAction(B);B.run.defer(100,B)}return this},submit:function(B){if(this.standardSubmit){var A=this.isValid();if(A)this.el.dom.submit();return A}this.doAction("submit",B);return this},
load:function(A){this.doAction("load",A);return this},updateRecord:function(B){B.beginEdit();var A=B.fields;A.each(function(C){var D=this.findField(C.name);if(D)B.set(C.name,D.getValue())},this);B.endEdit();return this},loadRecord:function(A){this.setValues(A.data);return this},beforeAction:function(A){var B=A.options;if(B.waitMsg)if(this.waitMsgTarget===true)this.el.mask(B.waitMsg,"x-mask-loading");else if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(B.waitMsg,
"x-mask-loading")}else Ext.MessageBox.wait(B.waitMsg,B.waitTitle||this.waitTitle||"Please Wait...")},afterAction:function(A,C){this.activeAction=null;var B=A.options;if(B.waitMsg)if(this.waitMsgTarget===true)this.el.unmask();else if(this.waitMsgTarget)this.waitMsgTarget.unmask();else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}if(C){if(B.reset)this.reset();Ext.callback(B.success,B.scope,[this,A]);this.fireEvent("actioncomplete",this,A)}else{Ext.callback(B.failure,B.scope,[this,A]);this.fireEvent("actionfailed",
this,A)}},findField:function(B){var A=this.items.get(B);if(!A)this.items.each(function(C){if(C.isFormField&&(C.dataIndex==B||C.id==B||C.getName()==B)){A=C;return false}});return A||null},markInvalid:function(G){if(Ext.isArray(G))for(var C=0,A=G.length;C<A;C++){var B=G[C];var D=this.findField(B.id);if(D)D.markInvalid(B.msg)}else{var E,F;for(F in G)if(typeof G[F]!="function"&&(E=this.findField(F)))E.markInvalid(G[F])}return this},setValues:function(C){if(Ext.isArray(C))for(var D=0,A=C.length;D<A;D++){var B=
C[D];var E=this.findField(B.id);if(E){E.setValue(B.value);if(this.trackResetOnLoad)E.originalValue=E.getValue()}}else{var F,G;for(G in C)if(typeof C[G]!="function"&&(F=this.findField(G))){F.setValue(C[G]);if(this.trackResetOnLoad)F.originalValue=F.getValue()}}return this},getValues:function(B){var A=Ext.lib.Ajax.serializeForm(this.el.dom);if(B===true)return A;return Ext.urlDecode(A)},clearInvalid:function(){this.items.each(function(A){A.clearInvalid()});return this},reset:function(){this.items.each(function(A){A.reset()});
return this},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this},remove:function(A){this.items.remove(A);return this},render:function(){this.items.each(function(A){if(A.isFormField&&!A.rendered&&document.getElementById(A.id))A.applyToMarkup(A.id)});return this},applyToFields:function(A){this.items.each(function(B){Ext.apply(B,A)});return this},applyIfToFields:function(A){this.items.each(function(B){Ext.applyIf(B,A)});return this}});Ext.BasicForm=Ext.form.BasicForm;
Ext.FormPanel=Ext.extend(Ext.Panel,{buttonAlign:"center",minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm();this.bodyCfg={tag:"form",cls:this.baseCls+"-body",method:this.method||"POST",id:this.formId||Ext.id()};if(this.fileUpload)this.bodyCfg.enctype="multipart/form-data";Ext.FormPanel.superclass.initComponent.call(this);this.addEvents("clientvalidation");this.relayEvents(this.form,["beforeaction","actionfailed",
"actioncomplete"])},createForm:function(){delete this.initialConfig.listeners;return new Ext.form.BasicForm(null,this.initialConfig)},initFields:function(){var C=this.form;var A=this;var B=function(D){if(D.isFormField)C.add(D);else if(D.doLayout&&D!=A){Ext.applyIf(D,{labelAlign:D.ownerCt.labelAlign,labelWidth:D.ownerCt.labelWidth,itemCls:D.ownerCt.itemCls});if(D.items)D.items.each(B)}};this.items.each(B)},getLayoutTarget:function(){return this.form.el},getForm:function(){return this.form},onRender:function(B,
A){this.initFields();Ext.FormPanel.superclass.onRender.call(this,B,A);this.form.initEl(this.body)},beforeDestroy:function(){Ext.FormPanel.superclass.beforeDestroy.call(this);this.stopMonitoring();Ext.destroy(this.form)},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.items.on("remove",this.onRemove,this);this.items.on("add",this.onAdd,this);if(this.monitorValid)this.startMonitoring()},onAdd:function(A,B){if(B.isFormField)this.form.add(B)},onRemove:function(A){if(A.isFormField){Ext.destroy(A.container.up(".x-form-item"));
this.form.remove(A)}},startMonitoring:function(){if(!this.bound){this.bound=true;Ext.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){this.bound=false},load:function(){this.form.load.apply(this.form,arguments)},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this);if(this.form)this.form.items.each(function(){this.disable()})},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this);if(this.form)this.form.items.each(function(){this.enable()})},
bindHandler:function(){if(!this.bound)return false;var D=true;this.form.items.each(function(E){if(!E.isValid(true)){D=false;return false}});if(this.buttons)for(var C=0,A=this.buttons.length;C<A;C++){var B=this.buttons[C];if(B.formBind===true&&B.disabled===D)B.setDisabled(!D)}this.fireEvent("clientvalidation",this,D)}});Ext.reg("form",Ext.FormPanel);Ext.form.FormPanel=Ext.FormPanel;
Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",onRender:function(B,A){if(!this.el){this.el=document.createElement("fieldset");this.el.id=this.id;if(this.title||this.header||this.checkboxToggle)this.el.appendChild(document.createElement("legend")).className="x-fieldset-header"}Ext.form.FieldSet.superclass.onRender.call(this,B,A);if(this.checkboxToggle){var C=typeof this.checkboxToggle=="object"?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+
"-checkbox"};this.checkbox=this.header.insertFirst(C);this.checkbox.dom.checked=!this.collapsed;this.checkbox.on("click",this.onCheckClick,this)}},onCollapse:function(A,B){if(this.checkbox)this.checkbox.dom.checked=false;this.afterCollapse()},onExpand:function(A,B){if(this.checkbox)this.checkbox.dom.checked=true;this.afterExpand()},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]()}});Ext.reg("fieldset",Ext.form.FieldSet);
Ext.form.HtmlEditor=Ext.extend(Ext.form.Field,{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",validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Ext.emptyFn,iframePad:3,hideMode:"offsets",
defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange")},createFontOptions:function(){var D=[],B=this.fontFamilies,C,F;for(var E=0,A=B.length;E<A;E++){C=B[E];F=C.toLowerCase();D.push('<option value="',F,'" style="font-family:',C,';"',this.defaultFont==F?' selected="true">':">",C,"</option>")}return D.join("")},createToolbar:function(D){var A=Ext.QuickTips&&
Ext.QuickTips.isEnabled();function C(G,E,F){return{itemId:G,cls:"x-btn-icon x-edit-"+G,enableToggle:E!==false,scope:D,handler:F||D.relayBtnCmd,clickEvent:"mousedown",tooltip:A?D.buttonTips[G]||undefined:undefined,tabIndex:-1}}var B=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});B.el.on("click",function(E){E.preventDefault()});if(this.enableFont&&!Ext.isSafari2){this.fontSelect=B.el.createChild({tag:"select",cls:"x-font-select",html:this.createFontOptions()});this.fontSelect.on("change",function(){var E=
this.fontSelect.dom.value;this.relayCmd("fontname",E);this.deferFocus()},this);B.add(this.fontSelect.dom,"-")}if(this.enableFormat)B.add(C("bold"),C("italic"),C("underline"));if(this.enableFontSize)B.add("-",C("increasefontsize",false,this.adjustFont),C("decreasefontsize",false,this.adjustFont));if(this.enableColors)B.add("-",{itemId:"forecolor",cls:"x-btn-icon x-edit-forecolor",clickEvent:"mousedown",tooltip:A?D.buttonTips["forecolor"]||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,
focus:Ext.emptyFn,value:"000000",plain:true,selectHandler:function(F,E){this.execCmd("forecolor",Ext.isSafari||Ext.isIE?"#"+E:E);this.deferFocus()},scope:this,clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon x-edit-backcolor",clickEvent:"mousedown",tooltip:A?D.buttonTips["backcolor"]||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,selectHandler:function(F,E){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",
E);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isSafari||Ext.isIE?"#"+E:E);this.deferFocus()}},scope:this,clickEvent:"mousedown"})});if(this.enableAlignments)B.add("-",C("justifyleft"),C("justifycenter"),C("justifyright"));if(!Ext.isSafari2){if(this.enableLinks)B.add("-",C("createlink",false,this.createLink));if(this.enableLists)B.add("-",C("insertorderedlist"),C("insertunorderedlist"));if(this.enableSourceEdit)B.add("-",C("sourceedit",
true,function(E){this.toggleSourceEdit(E.pressed)}))}this.tb=B},getDocMarkup:function(){return'<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>'},getEditorBody:function(){return this.doc.body||this.doc.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:this.iframe.contentDocument||this.getWin().document},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},
onRender:function(B,A){Ext.form.HtmlEditor.superclass.onRender.call(this,B,A);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE)this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;");this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.tb.items.each(function(E){if(E.itemId!="sourceedit")E.disable()});var C=document.createElement("iframe");C.name=Ext.id();C.frameBorder="0";C.src=
Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(C);this.iframe=C;this.initFrame();if(this.autoMonitorDesignMode!==false)this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100});if(!this.width){var D=this.el.getSize();this.setSize(D.width,this.height||D.height)}},initFrame:function(){this.doc=this.getDoc();this.win=this.getWin();this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var A={run:function(){if(this.doc.body||this.doc.readyState==
"complete"){Ext.TaskMgr.stop(A);this.doc.designMode="on";this.initEditor.defer(10,this)}},interval:10,duration:1E4,scope:this};Ext.TaskMgr.start(A)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var A=this.getDoc();if(!A)return;if(!A.editorInitialized||String(A.designMode).toLowerCase()!="on")this.initFrame()}},onResize:function(B,C){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(typeof B=="number"){var D=B-this.wrap.getFrameWidth("lr");
this.el.setWidth(this.adjustWidth("textarea",D));this.iframe.style.width=D+"px"}if(typeof C=="number"){var A=C-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(this.adjustWidth("textarea",A));this.iframe.style.height=A+"px";if(this.doc)this.getEditorBody().style.height=A-this.iframePad*2+"px"}}},toggleSourceEdit:function(A){if(A===undefined)A=!this.sourceEditMode;this.sourceEditMode=A===true;var C=this.tb.items.get("sourceedit");if(C.pressed!==this.sourceEditMode){C.toggle(this.sourceEditMode);
return}if(this.sourceEditMode){this.tb.items.each(function(D){if(D.itemId!="sourceedit")D.disable()});this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus()}else{if(this.initialized)this.tb.items.each(function(D){D.enable()});this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus()}var B=this.lastSize;if(B){delete this.lastSize;this.setSize(B)}this.fireEvent("editmodechange",
this,this.sourceEditMode)},createLink:function(){var A=prompt(this.createLinkText,this.defaultLinkValue);if(A&&A!="http:/"+"/")this.relayCmd("createlink",A)},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(A){Ext.form.HtmlEditor.superclass.setValue.call(this,A);this.pushValue()},cleanHtml:function(A){A=
String(A);if(A.length>5)if(Ext.isSafari)A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"");if(A=="&nbsp;")A="";return A},syncValue:function(){if(this.initialized){var D=this.getEditorBody();var C=D.innerHTML;if(Ext.isSafari){var B=D.getAttribute("style");var A=B.match(/text-align:(.*?);/i);if(A&&A[1])C='<div style="'+A[0]+'">'+C+"</div>"}C=this.cleanHtml(C);if(this.fireEvent("beforesync",this,C)!==false){this.el.dom.value=C;this.fireEvent("sync",this,C)}}},pushValue:function(){if(this.initialized){var A=
this.el.dom.value;if(!this.activated&&A.length<1)A="&nbsp;";if(this.fireEvent("beforepush",this,A)!==false){this.getEditorBody().innerHTML=A;this.fireEvent("push",this,A)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode)this.win.focus();else this.el.focus()},initEditor:function(){var B=this.getEditorBody();var A=this.el.getStyles("font-size","font-family","background-image","background-repeat");A["background-attachment"]="fixed";B.bgProperties=
"fixed";Ext.DomHelper.applyStyles(B,A);if(this.doc)try{Ext.EventManager.removeAll(this.doc)}catch(C){}this.doc=this.getDoc();Ext.EventManager.on(this.doc,{"mousedown":this.onEditorEvent,"dblclick":this.onEditorEvent,"click":this.onEditorEvent,"keyup":this.onEditorEvent,buffer:100,scope:this});if(Ext.isGecko)Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this);if(Ext.isIE||Ext.isSafari||Ext.isOpera)Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this);this.initialized=true;this.fireEvent("initialize",
this);this.doc.editorInitialized=true;this.pushValue()},onDestroy:function(){if(this.monitorTask)Ext.TaskMgr.stop(this.monitorTask);if(this.rendered){this.tb.items.each(function(A){if(A.menu){A.menu.removeAll();if(A.menu.el)A.menu.el.destroy()}A.destroy()});this.wrap.dom.innerHTML="";this.wrap.remove()}},onFirstFocus:function(){this.activated=true;this.tb.items.each(function(D){D.enable()});if(Ext.isGecko){this.win.focus();var A=this.win.getSelection();if(!A.focusNode||A.focusNode.nodeType!=3){var B=
A.getRangeAt(0);B.selectNodeContents(this.getEditorBody());B.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(C){}}this.fireEvent("activate",this)},adjustFont:function(B){var C=B.itemId=="increasefontsize"?1:-1;var A=parseInt(this.doc.queryCommandValue("FontSize")||2,10);if(Ext.isSafari3||Ext.isAir){if(A<=10)A=1+C;else if(A<=13)A=2+C;else if(A<=16)A=3+C;else if(A<=18)A=4+C;else if(A<=24)A=5+C;else A=6+C;A=A.constrain(1,6)}else{if(Ext.isSafari)C*=
2;A=Math.max(1,A+C)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",A)},onEditorEvent:function(A){this.updateToolbar()},updateToolbar:function(){if(!this.activated){this.onFirstFocus();return}var B=this.tb.items.map,C=this.doc;if(this.enableFont&&!Ext.isSafari2){var A=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(A!=this.fontSelect.dom.value)this.fontSelect.dom.value=A}if(this.enableFormat){B.bold.toggle(C.queryCommandState("bold"));B.italic.toggle(C.queryCommandState("italic"));
B.underline.toggle(C.queryCommandState("underline"))}if(this.enableAlignments){B.justifyleft.toggle(C.queryCommandState("justifyleft"));B.justifycenter.toggle(C.queryCommandState("justifycenter"));B.justifyright.toggle(C.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){B.insertorderedlist.toggle(C.queryCommandState("insertorderedlist"));B.insertunorderedlist.toggle(C.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(A){this.relayCmd(A.itemId)},
relayCmd:function(B,A){(function(){this.focus();this.execCmd(B,A);this.updateToolbar()}).defer(10,this)},execCmd:function(B,A){this.doc.execCommand(B,false,A===undefined?null:A);this.syncValue()},applyCommand:function(B){if(B.ctrlKey){var C=B.getCharCode(),A;if(C>0){C=String.fromCharCode(C);switch(C){case "b":A="bold";break;case "i":A="italic";break;case "u":A="underline";break}if(A){this.win.focus();this.execCmd(A);this.deferFocus();B.preventDefault()}}}},insertAtCursor:function(B){if(!this.activated)return;
if(Ext.isIE){this.win.focus();var A=this.doc.selection.createRange();if(A){A.collapse(true);A.pasteHTML(B);this.syncValue();this.deferFocus()}}else if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",B);this.deferFocus()}else if(Ext.isSafari){this.execCmd("InsertText",B);this.deferFocus()}},fixKeys:function(){if(Ext.isIE)return function(D){var A=D.getKey(),B;if(A==D.TAB){D.stopEvent();B=this.doc.selection.createRange();if(B){B.collapse(true);B.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");
this.deferFocus()}}else if(A==D.ENTER){B=this.doc.selection.createRange();if(B){var C=B.parentElement();if(!C||C.tagName.toLowerCase()!="li"){D.stopEvent();B.pasteHTML("<br />");B.collapse(false);B.select()}}}};else if(Ext.isOpera)return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}};else if(Ext.isSafari)return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.execCmd("InsertText","\t");
this.deferFocus()}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",
cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",
cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor);
Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:null,maxValue:null,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",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",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initComponent:function(){Ext.form.TimeField.superclass.initComponent.call(this);
if(typeof this.minValue=="string")this.minValue=this.parseDate(this.minValue);if(typeof this.maxValue=="string")this.maxValue=this.parseDate(this.maxValue);if(!this.store){var B=this.parseDate(this.minValue);if(!B)B=(new Date(this.initDate)).clearTime();var A=this.parseDate(this.maxValue);if(!A)A=(new Date(this.initDate)).clearTime().add("mi",24*60-1);var C=[];while(B<=A){C.push([B.dateFormat(this.format)]);B=B.add("mi",this.increment)}this.store=new Ext.data.SimpleStore({fields:["text"],data:C});
this.displayField="text"}},getValue:function(){var A=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(A))||""},setValue:function(A){Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)))},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var A=this.parseDate(this.getRawValue());if(A)this.setValue(A.dateFormat(this.format))}});
Ext.reg("timefield",Ext.form.TimeField);Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(B,A){if(!this.el){this.el=document.createElement("label");this.el.id=this.getId();this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):this.html||"";if(this.forId)this.el.setAttribute("htmlFor",this.forId)}Ext.form.Label.superclass.onRender.call(this,B,A)},setText:function(A,B){this.text=A;if(this.rendered)this.el.dom.innerHTML=B!==false?Ext.util.Format.htmlEncode(A):A;return this}});
Ext.reg("label",Ext.form.Label);Ext.form.Action=function(B,A){this.form=B;this.options=A||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";
Ext.form.Action.prototype={type:"default",run:function(A){},success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(A){this.response=A;if(!A.responseText)return true;this.result=this.handleResponse(A);return this.result},getUrl:function(C){var A=this.options.url||this.form.url||this.form.el.dom.action;if(C){var B=this.getParams();if(B)A+=(A.indexOf("?")!=-1?"&":
"?")+B}return A},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var A=this.form.baseParams;var B=this.options.params;if(B)if(typeof B=="object")B=Ext.urlEncode(Ext.applyIf(B,A));else{if(typeof B=="string"&&A)B+="&"+Ext.urlEncode(A)}else if(A)B=Ext.urlEncode(A);return B},createCallback:function(A){var A=A||{};return{success:this.success,failure:this.failure,scope:this,timeout:A.timeout*1E3||this.form.timeout*1E3,
upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(B,A){Ext.form.Action.Submit.superclass.constructor.call(this,B,A)};
Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var B=this.options;var C=this.getMethod();var A=C=="GET";if(B.clientValidation===false||this.form.isValid())Ext.Ajax.request(Ext.apply(this.createCallback(B),{form:this.form.el.dom,url:this.getUrl(A),method:C,headers:B.headers,params:!A?this.getParams():null,isUpload:this.form.fileUpload}));else if(B.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}},success:function(B){var A=
this.processResponse(B);if(A===true||A.success){this.form.afterAction(this,true);return}if(A.errors){this.form.markInvalid(A.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(C){if(this.form.errorReader){var B=this.form.errorReader.read(C);var F=[];if(B.records)for(var D=0,A=B.records.length;D<A;D++){var E=B.records[D];F[D]=E.data}if(F.length<1)F=null;return{success:B.success,errors:F}}return Ext.decode(C.responseText)}});
Ext.form.Action.Load=function(B,A){Ext.form.Action.Load.superclass.constructor.call(this,B,A);this.reader=this.form.reader};
Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(this.options),{method:this.getMethod(),url:this.getUrl(false),headers:this.options.headers,params:this.getParams()}))},success:function(B){var A=this.processResponse(B);if(A===true||!A.success||!A.data){this.failureType=Ext.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return}this.form.clearInvalid();this.form.setValues(A.data);this.form.afterAction(this,true)},handleResponse:function(B){if(this.form.reader){var A=
this.form.reader.read(B);var C=A.records&&A.records[0]?A.records[0].data:null;return{success:A.success,data:C}}return Ext.decode(B.responseText)}});Ext.form.Action.ACTION_TYPES={"load":Ext.form.Action.Load,"submit":Ext.form.Action.Submit};
Ext.form.VTypes=function(){var C=/^[a-zA-Z_]+$/;var D=/^[a-zA-Z0-9_]+$/;var B=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/;var A=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{"email":function(E){return B.test(E)},"emailText":'This field should be an e-mail address in the format "user@domain.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.domain.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.grid.GridPanel=Ext.extend(Ext.Panel,{ddText:"{0} selected row{1}",minColumnWidth:25,trackMouseOver:true,enableDragDrop:false,enableColumnMove:true,enableColumnHide:true,enableHdMenu:true,stripeRows:false,autoExpandColumn:false,autoExpandMin:50,autoExpandMax:1E3,view:null,loadMask:false,deferRowRender:true,rendered:false,viewReady:false,stateEvents:["columnmove","columnresize","sortchange"],initComponent:function(){Ext.grid.GridPanel.superclass.initComponent.call(this);this.autoScroll=false;this.autoWidth=
false;if(Ext.isArray(this.columns)){this.colModel=new Ext.grid.ColumnModel(this.columns);delete this.columns}if(this.ds){this.store=this.ds;delete this.ds}if(this.cm){this.colModel=this.cm;delete this.cm}if(this.sm){this.selModel=this.sm;delete this.sm}this.store=Ext.StoreMgr.lookup(this.store);this.addEvents("click","dblclick","contextmenu","mousedown","mouseup","mouseover","mouseout","keypress","keydown","cellmousedown","rowmousedown","headermousedown","cellclick","celldblclick","rowclick","rowdblclick",
"headerclick","headerdblclick","rowcontextmenu","cellcontextmenu","headercontextmenu","bodyscroll","columnresize","columnmove","sortchange")},onRender:function(C,A){Ext.grid.GridPanel.superclass.onRender.apply(this,arguments);var D=this.body;this.el.addClass("x-grid-panel");var B=this.getView();B.init(this);D.on("mousedown",this.onMouseDown,this);D.on("click",this.onClick,this);D.on("dblclick",this.onDblClick,this);D.on("contextmenu",this.onContextMenu,this);D.on("keydown",this.onKeyDown,this);this.relayEvents(D,
["mousedown","mouseup","mouseover","mouseout","keypress"]);this.getSelectionModel().init(this);this.view.render()},initEvents:function(){Ext.grid.GridPanel.superclass.initEvents.call(this);if(this.loadMask)this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:this.store},this.loadMask))},initStateEvents:function(){Ext.grid.GridPanel.superclass.initStateEvents.call(this);this.colModel.on("hiddenchange",this.saveState,this,{delay:100})},applyState:function(F){var B=this.colModel;var E=F.columns;
if(E)for(var C=0,A=E.length;C<A;C++){var D=E[C];var H=B.getColumnById(D.id);if(H){H.hidden=D.hidden;H.width=D.width;var G=B.getIndexById(D.id);if(G!=C)B.moveColumn(G,C)}}if(F.sort)this.store[this.store.remoteSort?"setDefaultSort":"sort"](F.sort.field,F.sort.direction)},getState:function(){var C={columns:[]};for(var B=0,D;D=this.colModel.config[B];B++){C.columns[B]={id:D.id,width:D.width};if(D.hidden)C.columns[B].hidden=true}var A=this.store.getSortState();if(A)C.sort=A;return C},afterRender:function(){Ext.grid.GridPanel.superclass.afterRender.call(this);
this.view.layout();if(this.deferRowRender)this.view.afterRender.defer(10,this.view);else this.view.afterRender();this.viewReady=true},reconfigure:function(A,B){if(this.loadMask){this.loadMask.destroy();this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:A},this.initialConfig.loadMask))}this.view.bind(A,B);this.store=A;this.colModel=B;if(this.rendered)this.view.refresh(true)},onKeyDown:function(A){this.fireEvent("keydown",A)},onDestroy:function(){if(this.rendered){if(this.loadMask)this.loadMask.destroy();
var A=this.body;A.removeAllListeners();this.view.destroy();A.update("")}this.colModel.purgeListeners();Ext.grid.GridPanel.superclass.onDestroy.call(this)},processEvent:function(C,E){this.fireEvent(C,E);var D=E.getTarget();var B=this.view;var G=B.findHeaderIndex(D);if(G!==false)this.fireEvent("header"+C,this,G,E);else{var F=B.findRowIndex(D);var A=B.findCellIndex(D);if(F!==false){this.fireEvent("row"+C,this,F,E);if(A!==false)this.fireEvent("cell"+C,this,F,A,E)}}},onClick:function(A){this.processEvent("click",
A)},onMouseDown:function(A){this.processEvent("mousedown",A)},onContextMenu:function(B,A){this.processEvent("contextmenu",B)},onDblClick:function(A){this.processEvent("dblclick",A)},walkCells:function(J,C,B,E,I){var H=this.colModel,F=H.getColumnCount();var A=this.store,G=A.getCount(),D=true;if(B<0){if(C<0){J--;D=false}while(J>=0){if(!D)C=F-1;D=false;while(C>=0){if(E.call(I||this,J,C,H)===true)return[J,C];C--}J--}}else{if(C>=F){J++;D=false}while(J<G){if(!D)C=0;D=false;while(C<F){if(E.call(I||this,
J,C,H)===true)return[J,C];C++}J++}}return null},getSelections:function(){return this.selModel.getSelections()},onResize:function(){Ext.grid.GridPanel.superclass.onResize.apply(this,arguments);if(this.viewReady)this.view.layout()},getGridEl:function(){return this.body},stopEditing:function(){},getSelectionModel:function(){if(!this.selModel)this.selModel=new Ext.grid.RowSelectionModel(this.disableSelection?{selectRow:Ext.emptyFn}:null);return this.selModel},getStore:function(){return this.store},getColumnModel:function(){return this.colModel},
getView:function(){if(!this.view)this.view=new Ext.grid.GridView(this.viewConfig);return this.view},getDragDropText:function(){var A=this.selModel.getCount();return String.format(this.ddText,A,A==1?"":"s")}});Ext.reg("grid",Ext.grid.GridPanel);Ext.grid.GridView=function(A){Ext.apply(this,A);this.addEvents("beforerowremoved","beforerowsinserted","beforerefresh","rowremoved","rowsinserted","rowupdated","refresh");Ext.grid.GridView.superclass.constructor.call(this)};
Ext.extend(Ext.grid.GridView,Ext.util.Observable,{deferEmptyText:true,scrollOffset:19,autoFill:false,forceFit:false,sortClasses:["sort-asc","sort-desc"],sortAscText:"Sort Ascending",sortDescText:"Sort Descending",columnsText:"Columns",borderWidth:2,tdClass:"x-grid3-cell",hdCls:"x-grid3-hd",cellSelectorDepth:4,rowSelectorDepth:10,cellSelector:"td.x-grid3-cell",rowSelector:"div.x-grid3-row",initTemplates:function(){var C=this.templates||{};if(!C.master)C.master=new Ext.Template('<div class="x-grid3" hidefocus="true">',
'<div class="x-grid3-viewport">','<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset">{header}</div></div><div class="x-clear"></div></div>','<div class="x-grid3-scroller"><div class="x-grid3-body">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',"</div>",'<div class="x-grid3-resize-marker">&#160;</div>','<div class="x-grid3-resize-proxy">&#160;</div>',"</div>");if(!C.header)C.header=new Ext.Template('<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
'<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',"</table>");if(!C.hcell)C.hcell=new Ext.Template('<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">',this.grid.enableHdMenu?'<a class="x-grid3-hd-btn" href="#"></a>':"",'{value}<img class="x-grid3-sort-icon" src="',Ext.BLANK_IMAGE_URL,'" />',"</div></td>");if(!C.body)C.body=new Ext.Template("{rows}");if(!C.row)C.row=new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
"<tbody><tr>{cells}</tr>",this.enableRowBody?'<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>':"","</tbody></table></div>");if(!C.cell)C.cell=new Ext.Template('<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>','<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',"</td>");for(var A in C){var B=
C[A];if(B&&typeof B.compile=="function"&&!B.compiled){B.disableFormats=true;B.compile()}}this.templates=C;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(A){if(!this._flyweight)this._flyweight=new Ext.Element.Flyweight(document.body);this._flyweight.dom=A;return this._flyweight},getEditorParent:function(A){return this.scroller.dom},initElements:function(){var C=Ext.Element;var B=this.grid.getGridEl().dom.firstChild;var A=B.childNodes;this.el=new C(B);this.mainWrap=new C(A[0]);this.mainHd=
new C(this.mainWrap.dom.firstChild);if(this.grid.hideHeaders)this.mainHd.setDisplayed(false);this.innerHd=this.mainHd.dom.firstChild;this.scroller=new C(this.mainWrap.dom.childNodes[1]);if(this.forceFit)this.scroller.setStyle("overflow-x","hidden");this.mainBody=new C(this.scroller.dom.firstChild);this.focusEl=new C(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new C(A[1]);this.resizeProxy=new C(A[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:
[]},findCell:function(A){if(!A)return false;return this.fly(A).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(C,B){var A=this.findCell(C);if(A&&(!B||this.fly(A).hasClass(B)))return this.getCellIndex(A);return false},getCellIndex:function(B){if(B){var A=B.className.match(this.colRe);if(A&&A[1])return this.cm.getIndexById(A[1])}return false},findHeaderCell:function(B){var A=this.findCell(B);return A&&this.fly(A).hasClass(this.hdCls)?A:null},findHeaderIndex:function(A){return this.findCellIndex(A,
this.hdCls)},findRow:function(A){if(!A)return false;return this.fly(A).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(A){var B=this.findRow(A);return B?B.rowIndex:false},getRow:function(A){return this.getRows()[A]},getCell:function(B,A){return this.getRow(B).getElementsByTagName("td")[A]},getHeaderCell:function(A){return this.mainHd.dom.getElementsByTagName("td")[A]},addRowClass:function(C,A){var B=this.getRow(C);if(B)this.fly(B).addClass(A)},removeRowClass:function(C,A){var B=
this.getRow(C);if(B)this.fly(B).removeClass(A)},removeRow:function(A){Ext.removeNode(this.getRow(A));this.focusRow(A)},removeRows:function(C,A){var B=this.mainBody.dom;for(var D=C;D<=A;D++)Ext.removeNode(B.childNodes[C]);this.focusRow(C)},getScrollState:function(){var A=this.scroller.dom;return{left:A.scrollLeft,top:A.scrollTop}},restoreScroll:function(A){var B=this.scroller.dom;B.scrollLeft=A.left;B.scrollTop=A.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=
0},syncScroll:function(){this.syncHeaderScroll();var A=this.scroller.dom;this.grid.fireEvent("bodyscroll",A.scrollLeft,A.scrollTop)},syncHeaderScroll:function(){var A=this.scroller.dom;this.innerHd.scrollLeft=A.scrollLeft;this.innerHd.scrollLeft=A.scrollLeft},updateSortIcon:function(B,A){var D=this.sortClasses;var C=this.mainHd.select("td").removeClass(D);C.item(B).addClass(D[A=="DESC"?1:0])},updateAllColumnWidths:function(){var D=this.getTotalWidth();var H=this.cm.getColumnCount();var F=[];for(var B=
0;B<H;B++)F[B]=this.getColumnWidth(B);this.innerHd.firstChild.firstChild.style.width=D;for(var B=0;B<H;B++){var C=this.getHeaderCell(B);C.style.width=F[B]}var G=this.getRows();for(var B=0,E=G.length;B<E;B++){G[B].style.width=D;G[B].firstChild.style.width=D;var I=G[B].firstChild.rows[0];for(var A=0;A<H;A++)I.childNodes[A].style.width=F[A]}this.onAllColumnWidthsUpdated(F,D)},updateColumnWidth:function(D,G){var B=this.getColumnWidth(D);var C=this.getTotalWidth();this.innerHd.firstChild.firstChild.style.width=
C;var H=this.getHeaderCell(D);H.style.width=B;var F=this.getRows();for(var E=0,A=F.length;E<A;E++){F[E].style.width=C;F[E].firstChild.style.width=C;F[E].firstChild.rows[0].childNodes[D].style.width=B}this.onColumnWidthUpdated(D,B,C)},updateColumnHidden:function(C,F){var B=this.getTotalWidth();this.innerHd.firstChild.firstChild.style.width=B;var H=F?"none":"";var G=this.getHeaderCell(C);G.style.display=H;var E=this.getRows();for(var D=0,A=E.length;D<A;D++){E[D].style.width=B;E[D].firstChild.style.width=
B;E[D].firstChild.rows[0].childNodes[C].style.display=H}this.onColumnHiddenUpdated(C,F,B);delete this.lastViewWidth;this.layout()},doRender:function(E,G,M,A,L,Q){var B=this.templates,D=B.cell,F=B.row,H=L-1;var C="width:"+this.getTotalWidth()+";";var T=[],N,U,O={},I={tstyle:C},K;for(var P=0,S=G.length;P<S;P++){K=G[P];N=[];var J=P+A;for(var R=0;R<L;R++){U=E[R];O.id=U.id;O.css=R==0?"x-grid3-cell-first ":R==H?"x-grid3-cell-last ":"";O.attr=O.cellAttr="";O.value=U.renderer(K.data[U.name],O,K,J,R,M);O.style=
U.style;if(O.value==undefined||O.value==="")O.value="&#160;";if(K.dirty&&typeof K.modified[U.name]!=="undefined")O.css+=" x-grid3-dirty-cell";N[N.length]=D.apply(O)}var V=[];if(Q&&(J+1)%2==0)V[0]="x-grid3-row-alt";if(K.dirty)V[1]=" x-grid3-dirty-row";I.cols=L;if(this.getRowClass)V[2]=this.getRowClass(K,J,I,M);I.alt=V.join(" ");I.cells=N.join("");T[T.length]=F.apply(I)}return T.join("")},processRows:function(E,D){if(this.ds.getCount()<1)return;D=D||!this.grid.stripeRows;E=E||0;var I=this.getRows();
var F=" x-grid3-row-alt ";for(var B=E,C=I.length;B<C;B++){var H=I[B];H.rowIndex=B;if(!D){var A=(B+1)%2==0;var G=(" "+H.className+" ").indexOf(F)!=-1;if(A==G)continue;if(A)H.className+=" x-grid3-row-alt";else H.className=H.className.replace("x-grid3-row-alt","")}}},afterRender:function(){this.mainBody.dom.innerHTML=this.renderRows();this.processRows(0,true);if(this.deferEmptyText!==true)this.applyEmptyText()},renderUI:function(){var D=this.renderHeaders();var A=this.templates.body.apply({rows:""});
var B=this.templates.master.apply({body:A,header:D});var C=this.grid;C.getGridEl().dom.innerHTML=B;this.initElements();Ext.fly(this.innerHd).on("click",this.handleHdDown,this);this.mainHd.on("mouseover",this.handleHdOver,this);this.mainHd.on("mouseout",this.handleHdOut,this);this.mainHd.on("mousemove",this.handleHdMove,this);this.scroller.on("scroll",this.syncScroll,this);if(C.enableColumnResize!==false)this.splitone=new Ext.grid.GridView.SplitDragZone(C,this.mainHd.dom);if(C.enableColumnMove){this.columnDrag=
new Ext.grid.GridView.ColumnDragZone(C,this.innerHd);this.columnDrop=new Ext.grid.HeaderDropZone(C,this.mainHd.dom)}if(C.enableHdMenu!==false){if(C.enableColumnHide!==false){this.colMenu=new Ext.menu.Menu({id:C.id+"-hcols-menu"});this.colMenu.on("beforeshow",this.beforeColMenuShow,this);this.colMenu.on("itemclick",this.handleHdMenuClick,this)}this.hmenu=new Ext.menu.Menu({id:C.id+"-hctx"});this.hmenu.add({id:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{id:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"});
if(C.enableColumnHide!==false)this.hmenu.add("-",{id:"columns",text:this.columnsText,menu:this.colMenu,iconCls:"x-cols-icon"});this.hmenu.on("itemclick",this.handleHdMenuClick,this)}if(C.enableDragDrop||C.enableDrag)this.dragZone=new Ext.grid.GridDragZone(C,{ddGroup:C.ddGroup||"GridDD"});this.updateHeaderSortState()},layout:function(){if(!this.mainBody)return;var C=this.grid;var F=C.getGridEl();var A=F.getSize(true);var B=A.width;if(B<20||A.height<20)return;if(C.autoHeight)this.scroller.dom.style.overflow=
"visible";else{this.el.setSize(A.width,A.height);var E=this.mainHd.getHeight();var D=A.height-E;this.scroller.setSize(B,D);if(this.innerHd)this.innerHd.style.width=B+"px"}if(this.forceFit){if(this.lastViewWidth!=B){this.fitColumns(false,false);this.lastViewWidth=B}}else{this.autoExpand();this.syncHeaderScroll()}this.onLayout(B,D)},onLayout:function(A,B){},onColumnWidthUpdated:function(C,A,B){},onAllColumnWidthsUpdated:function(A,B){},onColumnHiddenUpdated:function(B,C,A){},updateColumnText:function(A,
B){},afterMove:function(A){},init:function(A){this.grid=A;this.initTemplates();this.initData(A.store,A.colModel);this.initUI(A)},getColumnId:function(A){return this.cm.getColumnId(A)},renderHeaders:function(){var C=this.cm,F=this.templates;var E=F.hcell;var B=[],H=[],G={};for(var D=0,A=C.getColumnCount();D<A;D++){G.id=C.getColumnId(D);G.value=C.getColumnHeader(D)||"";G.style=this.getColumnStyle(D,true);G.tooltip=this.getColumnTooltip(D);if(C.config[D].align=="right")G.istyle="padding-right:16px";
else delete G.istyle;B[B.length]=E.apply(G)}return F.header.apply({cells:B.join(""),tstyle:"width:"+this.getTotalWidth()+";"})},getColumnTooltip:function(A){var B=this.cm.getColumnTooltip(A);if(B)if(Ext.QuickTips.isEnabled())return'ext:qtip="'+B+'"';else return'title="'+B+'"';return""},beforeUpdate:function(){this.grid.stopEditing(true)},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders()},focusRow:function(A){this.focusCell(A,0,false)},focusCell:function(D,A,C){D=Math.min(D,
Math.max(0,this.getRows().length-1));var B=this.ensureVisible(D,A,C);this.focusEl.setXY(B||this.scroller.getXY());if(Ext.isGecko)this.focusEl.focus();else this.focusEl.focus.defer(1,this.focusEl)},ensureVisible:function(P,E,D){if(typeof P!="number")P=P.rowIndex;if(!this.ds)return;if(P<0||P>=this.ds.getCount())return;E=E!==undefined?E:0;var I=this.getRow(P),F;if(!(D===false&&E===0)){while(this.cm.isHidden(E))E++;F=this.getCell(P,E)}if(!I)return;var L=this.scroller.dom;var O=0;var C=I,M=this.el.dom;
while(C&&C!=M){O+=C.offsetTop;C=C.offsetParent}O-=this.mainHd.dom.offsetHeight;var N=O+I.offsetHeight;var A=L.clientHeight;var M=parseInt(L.scrollTop,10);var K=M+A;if(O<M)L.scrollTop=O;else if(N>K)L.scrollTop=N-A;if(D!==false){var J=parseInt(F.offsetLeft,10);var H=J+F.offsetWidth;var G=parseInt(L.scrollLeft,10);var B=G+L.clientWidth;if(J<G)L.scrollLeft=J;else if(H>B)L.scrollLeft=H-L.clientWidth}return F?Ext.fly(F).getXY():[L.scrollLeft+this.el.getX(),Ext.fly(I).getY()]},insertRows:function(A,F,C,
E){if(!E&&F===0&&C>=A.getCount()-1)this.refresh();else{if(!E)this.fireEvent("beforerowsinserted",this,F,C);var B=this.renderRows(F,C);var D=this.getRow(F);if(D)Ext.DomHelper.insertHtml("beforeBegin",D,B);else Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,B);if(!E){this.fireEvent("rowsinserted",this,F,C);this.processRows(F)}}this.focusRow(F)},deleteRows:function(A,C,B){if(A.getRowCount()<1)this.refresh();else{this.fireEvent("beforerowsdeleted",this,C,B);this.removeRows(C,B);this.processRows(C);
this.fireEvent("rowsdeleted",this,C,B)}},getColumnStyle:function(A,C){var B=!C?this.cm.config[A].css||"":"";B+="width:"+this.getColumnWidth(A)+";";if(this.cm.isHidden(A))B+="display:none;";var D=this.cm.config[A].align;if(D)B+="text-align:"+D+";";return B},getColumnWidth:function(B){var A=this.cm.getColumnWidth(B);if(typeof A=="number")return(Ext.isBorderBox?A:A-this.borderWidth>0?A-this.borderWidth:0)+"px";return A},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(D,
G,E){var F=this.cm,S,L,O;var R=F.getTotalWidth(false);var J=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(J<20)return;var B=J-R;if(B===0)return false;var A=F.getColumnCount(true);var P=A-(typeof E=="number"?1:0);if(P===0){P=1;E=undefined}var K=F.getColumnCount();var I=[];var N=0;var M=0;var H;for(O=0;O<K;O++)if(!F.isHidden(O)&&!F.isFixed(O)&&O!==E){H=F.getColumnWidth(O);I.push(O);N=O;I.push(H);M+=H}var C=(J-F.getTotalWidth())/M;while(I.length){H=I.pop();O=I.pop();F.setColumnWidth(O,Math.max(this.grid.minColumnWidth,
Math.floor(H+H*C)),true)}if((R=F.getTotalWidth(false))>J){var Q=P!=A?E:N;F.setColumnWidth(Q,Math.max(1,F.getColumnWidth(Q)-(R-J)),true)}if(D!==true)this.updateAllColumnWidths();return true},autoExpand:function(B){var G=this.grid,A=this.cm;if(!this.userResized&&G.autoExpandColumn){var D=A.getTotalWidth(false);var H=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(D!=H){var F=A.getIndexById(G.autoExpandColumn);var E=A.getColumnWidth(F);var C=Math.min(Math.max(H-D+E,G.autoExpandMin),G.autoExpandMax);
if(C!=E){A.setColumnWidth(F,C,true);if(B!==true)this.updateColumnWidth(F,C)}}}},getColumnData:function(){var D=[],A=this.cm,E=A.getColumnCount();for(var C=0;C<E;C++){var B=A.getDataIndex(C);D[C]={name:typeof B=="undefined"?this.ds.fields.get(C).name:B,renderer:A.getRenderer(C),id:A.getColumnId(C),style:this.getColumnStyle(C)}}return D},renderRows:function(H,C){var D=this.grid,F=D.colModel,A=D.store,I=D.stripeRows;var G=F.getColumnCount();if(A.getCount()<1)return"";var E=this.getColumnData();H=H||
0;C=typeof C=="undefined"?A.getCount()-1:C;var B=A.getRange(H,C);return this.doRender(E,B,A,H,G,I)},renderBody:function(){var A=this.renderRows();return this.templates.body.apply({rows:A})},refreshRow:function(B){var D=this.ds,C;if(typeof B=="number"){C=B;B=D.getAt(C)}else C=D.indexOf(B);var A=[];this.insertRows(D,C,C,true);this.getRow(C).rowIndex=C;this.onRemove(D,B,C+1,true);this.fireEvent("rowupdated",this,C,B)},refresh:function(B){this.fireEvent("beforerefresh",this);this.grid.stopEditing(true);
var A=this.renderBody();this.mainBody.update(A);if(B===true){this.updateHeaders();this.updateHeaderSortState()}this.processRows(0,true);this.layout();this.applyEmptyText();this.fireEvent("refresh",this)},applyEmptyText:function(){if(this.emptyText&&!this.hasRows())this.mainBody.update('<div class="x-grid-empty">'+this.emptyText+"</div>")},updateHeaderSortState:function(){var B=this.ds.getSortState();if(!B)return;if(!this.sortState||(this.sortState.field!=B.field||this.sortState.direction!=B.direction))this.grid.fireEvent("sortchange",
this.grid,B);this.sortState=B;var C=this.cm.findColumnIndex(B.field);if(C!=-1){var A=B.direction;this.updateSortIcon(C,A)}},destroy:function(){if(this.colMenu){this.colMenu.removeAll();Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.getEl().remove();delete this.colMenu}if(this.hmenu){this.hmenu.removeAll();Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.getEl().remove();delete this.hmenu}if(this.grid.enableColumnMove){var C=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(C){for(var A in C){if(!C[A].config.isTarget&&
C[A].dragElId){var B=C[A].dragElId;C[A].unreg();Ext.get(B).remove()}else if(C[A].config.isTarget){C[A].proxyTop.remove();C[A].proxyBottom.remove();C[A].unreg()}if(Ext.dd.DDM.locationCache[A])delete Ext.dd.DDM.locationCache[A]}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id]}}Ext.destroy(this.resizeMarker,this.resizeProxy);if(this.dragZone)this.dragZone.unreg();this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this)},onDenyColumnHide:function(){},render:function(){if(this.autoFill)this.fitColumns(true,
true);else if(this.forceFit)this.fitColumns(true,false);else if(this.grid.autoExpandColumn)this.autoExpand(true);this.renderUI()},initData:function(B,A){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this)}if(B){B.on("load",this.onLoad,this);B.on("datachanged",this.onDataChange,this);B.on("add",this.onAdd,
this);B.on("remove",this.onRemove,this);B.on("update",this.onUpdate,this);B.on("clear",this.onClear,this)}this.ds=B;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this);this.cm.un("columnlockchange",this.onColumnLock,this)}if(A){delete this.lastViewWidth;A.on("configchange",this.onColConfigChange,
this);A.on("widthchange",this.onColWidthChange,this);A.on("headerchange",this.onHeaderChange,this);A.on("hiddenchange",this.onHiddenChange,this);A.on("columnmoved",this.onColumnMove,this);A.on("columnlockchange",this.onColumnLock,this)}this.cm=A},onDataChange:function(){this.refresh();this.updateHeaderSortState()},onClear:function(){this.refresh()},onUpdate:function(B,A){this.refreshRow(A)},onAdd:function(C,A,B){this.insertRows(C,B,B+(A.length-1))},onRemove:function(D,A,B,C){if(C!==true)this.fireEvent("beforerowremoved",
this,B,A);this.removeRow(B);if(C!==true){this.processRows(B);this.applyEmptyText();this.fireEvent("rowremoved",this,B,A)}},onLoad:function(){this.scrollToTop()},onColWidthChange:function(A,B,C){this.updateColumnWidth(B,C)},onHeaderChange:function(A,B,C){this.updateHeaders()},onHiddenChange:function(A,B,C){this.updateColumnHidden(B,C)},onColumnMove:function(A,D,B){this.indexMap=null;var C=this.getScrollState();this.refresh(true);this.restoreScroll(C);this.afterMove(B)},onColConfigChange:function(){delete this.lastViewWidth;
this.indexMap=null;this.refresh(true)},initUI:function(A){A.on("headerclick",this.onHeaderClick,this);if(A.trackMouseOver){A.on("mouseover",this.onRowOver,this);A.on("mouseout",this.onRowOut,this)}},initEvents:function(){},onHeaderClick:function(B,A){if(this.headersDisabled||!this.cm.isSortable(A))return;B.stopEditing(true);B.store.sort(this.cm.getDataIndex(A))},onRowOver:function(B,A){var C;if((C=this.findRowIndex(A))!==false)this.addRowClass(C,"x-grid3-row-over")},onRowOut:function(B,A){var C;if((C=
this.findRowIndex(A))!==false&&C!==this.findRowIndex(B.getRelatedTarget()))this.removeRowClass(C,"x-grid3-row-over")},handleWheel:function(A){A.stopPropagation()},onRowSelect:function(A){this.addRowClass(A,"x-grid3-row-selected")},onRowDeselect:function(A){this.removeRowClass(A,"x-grid3-row-selected")},onCellSelect:function(C,B){var A=this.getCell(C,B);if(A)this.fly(A).addClass("x-grid3-cell-selected")},onCellDeselect:function(C,B){var A=this.getCell(C,B);if(A)this.fly(A).removeClass("x-grid3-cell-selected")},
onColumnSplitterMoved:function(C,B){this.userResized=true;var A=this.grid.colModel;A.setColumnWidth(C,B,true);if(this.forceFit){this.fitColumns(true,false,C);this.updateAllColumnWidths()}else this.updateColumnWidth(C,B);this.grid.fireEvent("columnresize",C,B)},handleHdMenuClick:function(C){var B=this.hdCtxIndex;var A=this.cm,D=this.ds;switch(C.id){case "asc":D.sort(A.getDataIndex(B),"ASC");break;case "desc":D.sort(A.getDataIndex(B),"DESC");break;default:B=A.getIndexById(C.id.substr(4));if(B!=-1){if(C.checked&&
A.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}A.setHidden(B,C.checked)}}return true},isHideableColumn:function(A){return!A.hidden&&!A.fixed},beforeColMenuShow:function(){var A=this.cm,C=A.getColumnCount();this.colMenu.removeAll();for(var B=0;B<C;B++)if(A.config[B].fixed!==true&&A.config[B].hideable!==false)this.colMenu.add(new Ext.menu.CheckItem({id:"col-"+A.getColumnId(B),text:A.getColumnHeader(B),checked:!A.isHidden(B),hideOnClick:false,disabled:A.config[B].hideable===
false}))},handleHdDown:function(F,D){if(Ext.fly(D).hasClass("x-grid3-hd-btn")){F.stopEvent();var E=this.findHeaderCell(D);Ext.fly(E).addClass("x-grid3-hd-menu-open");var C=this.getCellIndex(E);this.hdCtxIndex=C;var B=this.hmenu.items,A=this.cm;B.get("asc").setDisabled(!A.isSortable(C));B.get("desc").setDisabled(!A.isSortable(C));this.hmenu.on("hide",function(){Ext.fly(E).removeClass("x-grid3-hd-menu-open")},this,{single:true});this.hmenu.show(D,"tl-bl?")}},handleHdOver:function(D,A){var C=this.findHeaderCell(A);
if(C&&!this.headersDisabled){this.activeHd=C;this.activeHdIndex=this.getCellIndex(C);var B=this.fly(C);this.activeHdRegion=B.getRegion();if(!this.cm.isMenuDisabled(this.activeHdIndex)){B.addClass("x-grid3-hd-over");this.activeHdBtn=B.child(".x-grid3-hd-btn");if(this.activeHdBtn)this.activeHdBtn.dom.style.height=C.firstChild.offsetHeight-1+"px"}}},handleHdMove:function(F,D){if(this.activeHd&&!this.headersDisabled){var B=this.splitHandleWidth||5;var E=this.activeHdRegion;var A=F.getPageX();var C=this.activeHd.style;
if(A-E.left<=B&&this.cm.isResizable(this.activeHdIndex-1))C.cursor=Ext.isAir?"move":Ext.isSafari?"e-resize":"col-resize";else if(E.right-A<=(!this.activeHdBtn?B:2)&&this.cm.isResizable(this.activeHdIndex))C.cursor=Ext.isAir?"move":Ext.isSafari?"w-resize":"col-resize";else C.cursor=""}},handleHdOut:function(C,A){var B=this.findHeaderCell(A);if(B&&(!Ext.isIE||!C.within(B,true))){this.activeHd=null;this.fly(B).removeClass("x-grid3-hd-over");B.style.cursor=""}},hasRows:function(){var A=this.mainBody.dom.firstChild;
return A&&A.className!="x-grid-empty"},bind:function(A,B){this.initData(A,B)}});Ext.grid.GridView.SplitDragZone=function(A,B){this.grid=A;this.view=A.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,B,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5};
Ext.extend(Ext.grid.GridView.SplitDragZone,Ext.dd.DDProxy,{b4StartDrag:function(A,E){this.view.headersDisabled=true;var D=this.view.mainWrap.getHeight();this.marker.setHeight(D);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(D);var B=this.cm.getColumnWidth(this.cellIndex);var C=Math.max(B-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(C,1E3);this.setYConstraint(0,0);this.minX=A-C;this.maxX=A+1E3;this.startPos=
A;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,A,E)},handleMouseDown:function(A){var H=this.view.findHeaderCell(A.getTarget());if(H){var K=this.view.fly(H).getXY(),E=K[0],D=K[1];var I=A.getXY(),C=I[0],B=I[1];var G=H.offsetWidth,F=false;if(C-E<=this.hw)F=-1;else if(E+G-C<=this.hw)F=0;if(F!==false){this.cm=this.grid.colModel;var J=this.view.getCellIndex(H);if(F==-1){if(J+F<0)return;while(this.cm.isHidden(J+F)){--F;if(J+F<0)return}}this.cellIndex=J+F;this.split=H.dom;if(this.cm.isResizable(this.cellIndex)&&
!this.cm.isFixed(this.cellIndex))Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}else if(this.view.columnDrag)this.view.columnDrag.callHandleMouseDown(A)}},endDrag:function(D){this.marker.hide();var A=this.view;var B=Math.max(this.minX,D.getPageX());var C=B-this.startPos;A.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+C);setTimeout(function(){A.headersDisabled=false},50)},autoOffset:function(){this.setDelta(0,0)}});
Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",gidSeed:1E3,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var A=this.grid.getSelectionModel();A.on(A.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup)this.startGroup=
new Ext.XTemplate('<div id="{groupId}" class="x-grid-group {cls}">','<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div>',this.groupTextTpl,"</div></div>",'<div id="{groupId}-bd" class="x-grid-group-body">');this.startGroup.compile();this.endGroup="</div></div>"},findGroup:function(A){return Ext.fly(A).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(){if(this.enableGrouping&&!this.ignoreAdd){var A=this.getScrollState();
this.refresh();this.restoreScroll(A)}else if(!this.enableGrouping)Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)},onRemove:function(E,A,B,D){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var C=document.getElementById(A._groupId);if(C&&C.childNodes[1].childNodes.length<1)Ext.removeNode(C);this.applyEmptyText()},refreshRow:function(A){if(this.ds.getCount()==1)this.refresh();else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=
false}},beforeMenuShow:function(){var C=this.getGroupField();var B=this.hmenu.items.get("groupBy");if(B)B.setDisabled(this.cm.config[this.hdCtxIndex].groupable===false);var A=this.hmenu.items.get("showGroups");if(A){A.setDisabled(!C&&this.cm.config[this.hdCtxIndex].groupable===false);A.setChecked(!!C,true)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{id:"groupBy",
text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups)this.hmenu.add({id:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this});this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},onGroupByClick:function(){this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));this.beforeMenuShow()},onShowGroupsClick:function(A,B){if(B)this.onGroupByClick();else this.grid.store.clearGrouping()},toggleGroup:function(C,
B){this.grid.stopEditing(true);C=Ext.getDom(C);var A=Ext.fly(C);B=B!==undefined?B:A.hasClass("x-grid-group-collapsed");this.state[A.dom.id]=B;A[B?"removeClass":"addClass"]("x-grid-group-collapsed")},toggleAllGroups:function(C){var B=this.getGroups();for(var D=0,A=B.length;D<A;D++)this.toggleGroup(B[D],C)},expandAllGroups:function(){this.toggleAllGroups(true)},collapseAllGroups:function(){this.toggleAllGroups(false)},interceptMouse:function(B){var A=B.getTarget(".x-grid-group-hd",this.mainBody);if(A){B.stopEvent();
this.toggleGroup(A.parentNode)}},getGroup:function(A,D,F,G,B,E){var C=F?F(A,{},D,G,B,E):String(A);if(C==="")C=this.cm.config[B].emptyGroupText||this.emptyGroupText;return C},getGroupField:function(){return this.grid.store.getGroupState()},renderRows:function(){var A=this.getGroupField();var D=!!A;if(this.hideGroupedColumn){var B=this.cm.findColumnIndex(A);if(!D&&this.lastGroupField!==undefined){this.mainBody.update("");this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField),false);delete this.lastGroupField}else if(D&&
this.lastGroupField===undefined){this.lastGroupField=A;this.cm.setHidden(B,true)}else if(D&&this.lastGroupField!==undefined&&A!==this.lastGroupField){this.mainBody.update("");var C=this.cm.findColumnIndex(this.lastGroupField);this.cm.setHidden(C,false);this.lastGroupField=A;this.cm.setHidden(B,true)}}return Ext.grid.GroupingView.superclass.renderRows.apply(this,arguments)},doRender:function(D,G,P,A,O,R){if(G.length<1)return"";var Y=this.getGroupField();var N=this.cm.findColumnIndex(Y);this.enableGrouping=
!!Y;if(!this.enableGrouping||this.isUpdating)return Ext.grid.GroupingView.superclass.doRender.apply(this,arguments);var H="width:"+this.getTotalWidth()+";";var Q=this.grid.getGridEl().id;var F=this.cm.config[N];var B=F.groupRenderer||F.renderer;var S=this.showGroupName?(F.groupName||F.header)+": ":"";var X=[],K,T,U,M;for(T=0,U=G.length;T<U;T++){var J=A+T;var L=G[T],E=L.data[Y],V=this.getGroup(E,L,B,J,N,P);if(!K||K.group!=V){M=Q+"-gp-"+Y+"-"+Ext.util.Format.htmlEncode(V);var C=typeof this.state[M]!==
"undefined"?!this.state[M]:this.startCollapsed;var I=C?"x-grid-group-collapsed":"";K={group:V,gvalue:E,text:S+V,groupId:M,startRow:J,rs:[L],cls:I,style:H};X.push(K)}else K.rs.push(L);L._groupId=M}var W=[];for(T=0,U=X.length;T<U;T++){var V=X[T];this.doGroupStart(W,V,D,P,O);W[W.length]=Ext.grid.GroupingView.superclass.doRender.call(this,D,V.rs,P,V.startRow,O,R);this.doGroupEnd(W,V,D,P,O)}return W.join("")},getGroupId:function(F){var D=this.grid.getGridEl().id;var C=this.getGroupField();var E=this.cm.findColumnIndex(C);
var B=this.cm.config[E];var G=B.groupRenderer||B.renderer;var A=this.getGroup(F,{data:{}},G,0,E,this.ds);return D+"-gp-"+C+"-"+Ext.util.Format.htmlEncode(F)},doGroupStart:function(A,D,B,E,C){A[A.length]=this.startGroup.apply(D)},doGroupEnd:function(A,D,B,E,C){A[A.length]=this.endGroup},getRows:function(){if(!this.enableGrouping)return Ext.grid.GroupingView.superclass.getRows.call(this);var G=[];var F,C=this.getGroups();for(var E=0,A=C.length;E<A;E++){F=C[E].childNodes[1].childNodes;for(var D=0,B=
F.length;D<B;D++)G[G.length]=F[D]}return G},updateGroupWidths:function(){if(!this.enableGrouping||!this.hasRows())return;var C=Math.max(this.cm.getTotalWidth(),this.el.dom.offsetWidth-this.scrollOffset)+"px";var B=this.getGroups();for(var D=0,A=B.length;D<A;D++)B[D].firstChild.style.width=C},onColumnWidthUpdated:function(C,A,B){this.updateGroupWidths()},onAllColumnWidthsUpdated:function(A,B){this.updateGroupWidths()},onColumnHiddenUpdated:function(B,C,A){this.updateGroupWidths()},onLayout:function(){this.updateGroupWidths()},
onBeforeRowSelect:function(D,C){if(!this.enableGrouping)return;var B=this.getRow(C);if(B&&!B.offsetParent){var A=this.findGroup(B);this.toggleGroup(A,true)}},groupByText:"Group By This Field",showGroupsText:"Show in Groups"});Ext.grid.GroupingView.GROUP_ID=1E3;
Ext.grid.HeaderDragZone=function(A,C,B){this.grid=A;this.view=A.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,C);if(B){this.setHandleElId(Ext.id(C));this.setOuterHandleElId(Ext.id(B))}this.scroll=false};
Ext.extend(Ext.grid.HeaderDragZone,Ext.dd.DragZone,{maxDragWidth:120,getDragData:function(C){var A=Ext.lib.Event.getTarget(C);var B=this.view.findHeaderCell(A);if(B)return{ddel:B.firstChild,header:B};return false},onInitDrag:function(A){this.view.headersDisabled=true;var B=this.dragData.ddel.cloneNode(true);B.id=Ext.id();B.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(B);return true},afterValidDrop:function(){var A=this.view;setTimeout(function(){A.headersDisabled=
false},50)},afterInvalidDrop:function(){var A=this.view;setTimeout(function(){A.headersDisabled=false},50)}});
Ext.grid.HeaderDropZone=function(A,C,B){this.grid=A;this.view=A.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:"&#160;"},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:"&#160;"},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,A.getGridEl().dom)};
Ext.extend(Ext.grid.HeaderDropZone,Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,getTargetFromEvent:function(C){var A=Ext.lib.Event.getTarget(C);var B=this.view.findCellIndex(A);if(B!==false)return this.view.getHeaderCell(B)},nextVisible:function(C){var B=this.view,A=this.grid.colModel;C=C.nextSibling;while(C){if(!A.isHidden(B.getCellIndex(C)))return C;C=C.nextSibling}return null},prevVisible:function(C){var B=this.view,A=this.grid.colModel;C=C.prevSibling;while(C){if(!A.isHidden(B.getCellIndex(C)))return C;
C=C.prevSibling}return null},positionIndicator:function(D,B,E){var H=Ext.lib.Event.getPageX(E);var A=Ext.lib.Dom.getRegion(B.firstChild);var I,K,G=A.top+this.proxyOffsets[1];if(A.right-H<=(A.right-A.left)/2){I=A.right+this.view.borderWidth;K="after"}else{I=A.left;K="before"}var F=this.view.getCellIndex(D);var J=this.view.getCellIndex(B);if(this.grid.colModel.isFixed(J))return false;var C=this.grid.colModel.isLocked(J);if(K=="after")J++;if(F<J)J--;if(F==J&&C==this.grid.colModel.isLocked(F))return false;
I+=this.proxyOffsets[0];this.proxyTop.setLeftTop(I,G);this.proxyTop.show();if(!this.bottomOffset)this.bottomOffset=this.view.mainHd.getHeight();this.proxyBottom.setLeftTop(I,G+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return K},onNodeEnter:function(D,A,C,B){if(B.header!=D)this.positionIndicator(B.header,D,C)},onNodeOver:function(E,B,D,C){var A=false;if(C.header!=E)A=this.positionIndicator(C.header,E,D);if(!A){this.proxyTop.hide();this.proxyBottom.hide()}return A?this.dropAllowed:
this.dropNotAllowed},onNodeOut:function(D,A,C,B){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(B,K,F,D){var E=D.header;if(E!=B){var I=this.grid.colModel;var H=Ext.lib.Event.getPageX(F);var A=Ext.lib.Dom.getRegion(B.firstChild);var L=A.right-H<=(A.right-A.left)/2?"after":"before";var G=this.view.getCellIndex(E);var J=this.view.getCellIndex(B);var C=I.isLocked(J);if(L=="after")J++;if(G<J)J--;if(G==J&&C==I.isLocked(G))return false;I.setLocked(G,C,true);I.moveColumn(G,J);this.grid.fireEvent("columnmove",
G,J);return true}return false}});Ext.grid.GridView.ColumnDragZone=function(A,B){Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this,A,B,null);this.proxy.el.addClass("x-grid3-col-dd")};Ext.extend(Ext.grid.GridView.ColumnDragZone,Ext.grid.HeaderDragZone,{handleMouseDown:function(A){},callHandleMouseDown:function(A){Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,A)}});
Ext.grid.SplitDragZone=function(A,C,B){this.grid=A;this.view=A.getView();this.proxy=this.view.resizeProxy;Ext.grid.SplitDragZone.superclass.constructor.call(this,C,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.setHandleElId(Ext.id(C));this.setOuterHandleElId(Ext.id(B));this.scroll=false};
Ext.extend(Ext.grid.SplitDragZone,Ext.dd.DDProxy,{fly:Ext.Element.fly,b4StartDrag:function(A,D){this.view.headersDisabled=true;this.proxy.setHeight(this.view.mainWrap.getHeight());var B=this.cm.getColumnWidth(this.cellIndex);var C=Math.max(B-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(C,1E3);this.setYConstraint(0,0);this.minX=A-C;this.maxX=A+1E3;this.startPos=A;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,A,D)},handleMouseDown:function(B){ev=Ext.EventObject.setEvent(B);
var A=this.fly(ev.getTarget());if(A.hasClass("x-grid-split")){this.cellIndex=this.view.getCellIndex(A.dom);this.split=A.dom;this.cm=this.grid.colModel;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex))Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}},endDrag:function(C){this.view.headersDisabled=false;var A=Math.max(this.minX,Ext.lib.Event.getPageX(C));var B=A-this.startPos;this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+
B)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.GridDragZone=function(B,A){this.view=B.getView();Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,A);if(this.view.lockedBody){this.setHandleElId(Ext.id(this.view.mainBody.dom));this.setOuterHandleElId(Ext.id(this.view.lockedBody.dom))}this.scroll=false;this.grid=B;this.ddel=document.createElement("div");this.ddel.className="x-grid-dd-wrap"};
Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(B){var A=Ext.lib.Event.getTarget(B);var D=this.view.findRowIndex(A);if(D!==false){var C=this.grid.selModel;if(!C.isSelected(D)||B.hasModifier())C.handleMouseDown(this.grid,D,B);return{grid:this.grid,ddel:this.ddel,rowIndex:D,selections:C.getSelections()}}return false},onInitDrag:function(B){var A=this.dragData;this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel)},afterRepair:function(){this.dragging=
false},getRepairXY:function(B,A){return false},onEndDrag:function(A,B){},onValidDrop:function(A,B,C){this.hideProxy()},beforeInvalidDrop:function(A,B){}});Ext.grid.ColumnModel=function(A){this.defaultWidth=100;this.defaultSortable=false;if(A.columns){Ext.apply(this,A);this.setConfig(A.columns,true)}else this.setConfig(A,true);this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","columnlockchange","configchange");Ext.grid.ColumnModel.superclass.constructor.call(this)};
Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{getColumnId:function(A){return this.config[A].id},setConfig:function(C,B){if(!B){delete this.totalWidth;for(var D=0,A=this.config.length;D<A;D++){var E=this.config[D];if(E.editor)E.editor.destroy()}}this.config=C;this.lookup={};for(var D=0,A=C.length;D<A;D++){var E=C[D];if(typeof E.renderer=="string")E.renderer=Ext.util.Format[E.renderer];if(typeof E.id=="undefined")E.id=D;if(E.editor&&E.editor.isFormField)E.editor=new Ext.grid.GridEditor(E.editor);
this.lookup[E.id]=E}if(!B)this.fireEvent("configchange",this)},getColumnById:function(A){return this.lookup[A]},getIndexById:function(C){for(var B=0,A=this.config.length;B<A;B++)if(this.config[B].id==C)return B;return-1},moveColumn:function(C,A){var B=this.config[C];this.config.splice(C,1);this.config.splice(A,0,B);this.dataMap=null;this.fireEvent("columnmoved",this,C,A)},isLocked:function(A){return this.config[A].locked===true},setLocked:function(B,C,A){if(this.isLocked(B)==C)return;this.config[B].locked=
C;if(!A)this.fireEvent("columnlockchange",this,B,C)},getTotalLockedWidth:function(){var A=0;for(var B=0;B<this.config.length;B++)if(this.isLocked(B)&&!this.isHidden(B))this.totalWidth+=this.getColumnWidth(B);return A},getLockedCount:function(){for(var B=0,A=this.config.length;B<A;B++)if(!this.isLocked(B))return B},getColumnCount:function(C){if(C===true){var D=0;for(var B=0,A=this.config.length;B<A;B++)if(!this.isHidden(B))D++;return D}return this.config.length},getColumnsBy:function(D,C){var E=[];
for(var B=0,A=this.config.length;B<A;B++){var F=this.config[B];if(D.call(C||this,F,B)===true)E[E.length]=F}return E},isSortable:function(A){if(typeof this.config[A].sortable=="undefined")return this.defaultSortable;return this.config[A].sortable},isMenuDisabled:function(A){return!!this.config[A].menuDisabled},getRenderer:function(A){if(!this.config[A].renderer)return Ext.grid.ColumnModel.defaultRenderer;return this.config[A].renderer},setRenderer:function(A,B){this.config[A].renderer=B},getColumnWidth:function(A){return this.config[A].width||
this.defaultWidth},setColumnWidth:function(B,C,A){this.config[B].width=C;this.totalWidth=null;if(!A)this.fireEvent("widthchange",this,B,C)},getTotalWidth:function(B){if(!this.totalWidth){this.totalWidth=0;for(var C=0,A=this.config.length;C<A;C++)if(B||!this.isHidden(C))this.totalWidth+=this.getColumnWidth(C)}return this.totalWidth},getColumnHeader:function(A){return this.config[A].header},setColumnHeader:function(A,B){this.config[A].header=B;this.fireEvent("headerchange",this,A,B)},getColumnTooltip:function(A){return this.config[A].tooltip},
setColumnTooltip:function(A,B){this.config[A].tooltip=B},getDataIndex:function(A){return this.config[A].dataIndex},setDataIndex:function(A,B){this.config[A].dataIndex=B},findColumnIndex:function(C){var D=this.config;for(var B=0,A=D.length;B<A;B++)if(D[B].dataIndex==C)return B;return-1},isCellEditable:function(A,B){return this.config[A].editable||typeof this.config[A].editable=="undefined"&&this.config[A].editor?true:false},getCellEditor:function(A,B){return this.config[A].editor},setEditable:function(A,
B){this.config[A].editable=B},isHidden:function(A){return this.config[A].hidden},isFixed:function(A){return this.config[A].fixed},isResizable:function(A){return A>=0&&this.config[A].resizable!==false&&this.config[A].fixed!==true},setHidden:function(A,B){var C=this.config[A];if(C.hidden!==B){C.hidden=B;this.totalWidth=null;this.fireEvent("hiddenchange",this,A,B)}},setEditor:function(A,B){this.config[A].editor=B}});
Ext.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="string"&&A.length<1)return"&#160;";return A};Ext.grid.DefaultColumnModel=Ext.grid.ColumnModel;Ext.grid.AbstractSelectionModel=function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(A){this.grid=A;this.initEvents()},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked}});
Ext.grid.RowSelectionModel=function(A){Ext.apply(this,A);this.selections=new Ext.util.MixedCollection(false,function(B){return B.id});this.last=false;this.lastActive=false;this.addEvents("selectionchange","beforerowselect","rowselect","rowdeselect");Ext.grid.RowSelectionModel.superclass.constructor.call(this)};
Ext.extend(Ext.grid.RowSelectionModel,Ext.grid.AbstractSelectionModel,{singleSelect:false,initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag)this.grid.on("rowmousedown",this.handleMouseDown,this);else this.grid.on("rowclick",function(B,D,C){if(C.button===0&&!C.shiftKey&&!C.ctrlKey){this.selectRow(D,false);B.view.focusRow(D)}},this);this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{"up":function(C){if(!C.shiftKey)this.selectPrevious(C.shiftKey);else if(this.last!==false&&this.lastActive!==
false){var B=this.last;this.selectRange(this.last,this.lastActive-1);this.grid.getView().focusRow(this.lastActive);if(B!==false)this.last=B}else this.selectFirstRow()},"down":function(C){if(!C.shiftKey)this.selectNext(C.shiftKey);else if(this.last!==false&&this.lastActive!==false){var B=this.last;this.selectRange(this.last,this.lastActive+1);this.grid.getView().focusRow(this.lastActive);if(B!==false)this.last=B}else this.selectFirstRow()},scope:this});var A=this.grid.view;A.on("refresh",this.onRefresh,
this);A.on("rowupdated",this.onRowUpdated,this);A.on("rowremoved",this.onRemove,this)},onRefresh:function(){var F=this.grid.store,B;var D=this.getSelections();this.clearSelections(true);for(var C=0,A=D.length;C<A;C++){var E=D[C];if((B=F.indexOfId(E.id))!=-1)this.selectRow(B,true)}if(D.length!=this.selections.getCount())this.fireEvent("selectionchange",this)},onRemove:function(A,B,C){if(this.selections.remove(C)!==false)this.fireEvent("selectionchange",this)},onRowUpdated:function(A,B,C){if(this.isSelected(C))A.onRowSelect(B)},
selectRecords:function(B,E){if(!E)this.clearSelections();var D=this.grid.store;for(var C=0,A=B.length;C<A;C++)this.selectRow(D.indexOf(B[C]),true)},getCount:function(){return this.selections.length},selectFirstRow:function(){this.selectRow(0)},selectLastRow:function(A){this.selectRow(this.grid.store.getCount()-1,A)},selectNext:function(A){if(this.hasNext()){this.selectRow(this.last+1,A);this.grid.getView().focusRow(this.last);return true}return false},selectPrevious:function(A){if(this.hasPrevious()){this.selectRow(this.last-
1,A);this.grid.getView().focusRow(this.last);return true}return false},hasNext:function(){return this.last!==false&&this.last+1<this.grid.store.getCount()},hasPrevious:function(){return!!this.last},getSelections:function(){return[].concat(this.selections.items)},getSelected:function(){return this.selections.itemAt(0)},each:function(E,D){var C=this.getSelections();for(var B=0,A=C.length;B<A;B++)if(E.call(D||this,C[B],B)===false)return false;return true},clearSelections:function(A){if(this.locked)return;
if(A!==true){var C=this.grid.store;var B=this.selections;B.each(function(D){this.deselectRow(C.indexOfId(D.id))},this);B.clear()}else this.selections.clear();this.last=false},selectAll:function(){if(this.locked)return;this.selections.clear();for(var B=0,A=this.grid.store.getCount();B<A;B++)this.selectRow(B,true)},hasSelection:function(){return this.selections.length>0},isSelected:function(A){var B=typeof A=="number"?this.grid.store.getAt(A):A;return B&&this.selections.key(B.id)?true:false},isIdSelected:function(A){return this.selections.key(A)?
true:false},handleMouseDown:function(D,F,E){if(E.button!==0||this.isLocked())return;var A=this.grid.getView();if(E.shiftKey&&this.last!==false){var C=this.last;this.selectRange(C,F,E.ctrlKey);this.last=C;A.focusRow(F)}else{var B=this.isSelected(F);if(E.ctrlKey&&B)this.deselectRow(F);else if(!B||this.getCount()>1){this.selectRow(F,E.ctrlKey||E.shiftKey);A.focusRow(F)}}},selectRows:function(C,D){if(!D)this.clearSelections();for(var B=0,A=C.length;B<A;B++)this.selectRow(C[B],true)},selectRange:function(B,
A,D){if(this.locked)return;if(!D)this.clearSelections();if(B<=A)for(var C=B;C<=A;C++)this.selectRow(C,true);else for(var C=B;C>=A;C--)this.selectRow(C,true)},deselectRange:function(C,B,A){if(this.locked)return;for(var D=C;D<=B;D++)this.deselectRow(D,A)},selectRow:function(B,D,A){if(this.locked||(B<0||B>=this.grid.store.getCount())||this.isSelected(B))return;var C=this.grid.store.getAt(B);if(C&&this.fireEvent("beforerowselect",this,B,D,C)!==false){if(!D||this.singleSelect)this.clearSelections();this.selections.add(C);
this.last=this.lastActive=B;if(!A)this.grid.getView().onRowSelect(B);this.fireEvent("rowselect",this,B,C);this.fireEvent("selectionchange",this)}},deselectRow:function(B,A){if(this.locked)return;if(this.last==B)this.last=false;if(this.lastActive==B)this.lastActive=false;var C=this.grid.store.getAt(B);if(C){this.selections.remove(C);if(!A)this.grid.getView().onRowDeselect(B);this.fireEvent("rowdeselect",this,B,C);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last)this.last=
this._last},acceptsNav:function(C,B,A){return!A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(F,E){var C=E.getKey(),G,D=this.grid,B=D.activeEditor;var A=E.shiftKey;if(C==E.TAB){E.stopEvent();B.completeEdit();if(A)G=D.walkCells(B.row,B.col-1,-1,this.acceptsNav,this);else G=D.walkCells(B.row,B.col+1,1,this.acceptsNav,this)}else if(C==E.ENTER){E.stopEvent();B.completeEdit();if(this.moveEditorOnEnter!==false)if(A)G=D.walkCells(B.row-1,B.col,-1,this.acceptsNav,this);else G=D.walkCells(B.row+
1,B.col,1,this.acceptsNav,this)}else if(C==E.ESC)B.cancelEdit();if(G)D.startEditing(G[0],G[1])}});Ext.grid.CellSelectionModel=function(A){Ext.apply(this,A);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)};
Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.getGridEl().on(Ext.isIE||Ext.isSafari3?"keydown":"keypress",this.handleKeyDown,this);var A=this.grid.view;A.on("refresh",this.onViewChange,this);A.on("rowupdated",this.onRowUpdated,this);A.on("beforerowremoved",this.clearSelections,this);A.on("beforerowsinserted",this.clearSelections,this);if(this.grid.isEditor)this.grid.on("beforeedit",this.beforeEdit,
this)},beforeEdit:function(A){this.select(A.row,A.column,false,true,A.record)},onRowUpdated:function(A,B,C){if(this.selection&&this.selection.record==C)A.onCellSelect(B,this.selection.cell[1])},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(B){var A=this.selection;if(A){if(B!==true)this.grid.view.onCellDeselect(A.cell[0],A.cell[1]);this.selection=null;this.fireEvent("selectionchange",this,null)}},
hasSelection:function(){return this.selection?true:false},handleMouseDown:function(B,D,A,C){if(C.button!==0||this.isLocked())return;this.select(D,A)},select:function(F,C,B,E,D){if(this.fireEvent("beforecellselect",this,F,C)!==false){this.clearSelections();D=D||this.grid.store.getAt(F);this.selection={record:D,cell:[F,C]};if(!B){var A=this.grid.getView();A.onCellSelect(F,C);if(E!==true)A.focusCell(F,C)}this.fireEvent("cellselect",this,F,C);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(C,
B,A){return!A.isHidden(B)},handleKeyDown:function(F){if(!F.isNavKeyPress())return;var E=this.grid,J=this.selection;if(!J){F.stopEvent();var I=E.walkCells(0,0,1,this.isSelectable,this);if(I)this.select(I[0],I[1]);return}var B=this;var H=function(M,K,L){return E.walkCells(M,K,L,B.isSelectable,B)};var C=F.getKey(),A=J.cell[0],G=J.cell[1];var D;switch(C){case F.TAB:if(F.shiftKey)D=H(A,G-1,-1);else D=H(A,G+1,1);break;case F.DOWN:D=H(A+1,G,1);break;case F.UP:D=H(A-1,G,-1);break;case F.RIGHT:D=H(A,G+1,1);
break;case F.LEFT:D=H(A,G-1,-1);break;case F.ENTER:if(E.isEditor&&!E.editing){E.startEditing(A,G);F.stopEvent();return}break}if(D){this.select(D[0],D[1]);F.stopEvent()}},acceptsNav:function(C,B,A){return!A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){if(D.shiftKey)F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this);else F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this);D.stopEvent()}else if(B==D.ENTER){A.completeEdit();
D.stopEvent()}else if(B==D.ESC){D.stopEvent();A.cancelEdit()}if(F)C.startEditing(F[0],F[1])}});
Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel)this.selModel=new Ext.grid.CellSelectionModel;this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.on("bodyscroll",this.stopEditing,this,[true]);
if(this.clicksToEdit==1)this.on("cellclick",this.onCellDblClick,this);else{if(this.clicksToEdit=="auto"&&this.view.mainBody)this.view.mainBody.on("mousedown",this.onAutoEditClick,this);this.on("celldblclick",this.onCellDblClick,this)}this.getGridEl().addClass("xedit-grid")},onCellDblClick:function(B,C,A){this.startEditing(C,A)},onAutoEditClick:function(C,B){if(C.button!==0)return;var E=this.view.findRowIndex(B);var A=this.view.findCellIndex(B);if(E!==false&&A!==false){this.stopEditing();if(this.selModel.getSelectedCell){var D=
this.selModel.getSelectedCell();if(D&&D.cell[0]===E&&D.cell[1]===A)this.startEditing(E,A)}else if(this.selModel.isSelected(E))this.startEditing(E,A)}},onEditComplete:function(B,D,A){this.editing=false;this.activeEditor=null;B.un("specialkey",this.selModel.onEditorKey,this.selModel);var C=B.record;var F=this.colModel.getDataIndex(B.col);D=this.postEditValue(D,A,C,F);if(String(D)!==String(A)){var E={grid:this,record:C,field:F,originalValue:A,value:D,row:B.row,column:B.col,cancel:false};if(this.fireEvent("validateedit",
E)!==false&&!E.cancel){C.set(F,E.value);delete E.cancel;this.fireEvent("afteredit",E)}}this.view.focusCell(B.row,B.col)},startEditing:function(F,B){this.stopEditing();if(this.colModel.isCellEditable(B,F)){this.view.ensureVisible(F,B,true);var C=this.store.getAt(F);var E=this.colModel.getDataIndex(B);var D={grid:this,record:C,field:E,value:C.data[E],row:F,column:B,cancel:false};if(this.fireEvent("beforeedit",D)!==false&&!D.cancel){this.editing=true;var A=this.colModel.getCellEditor(B,F);if(!A.rendered)A.render(this.view.getEditorParent(A));
(function(){A.row=F;A.col=B;A.record=C;A.on("complete",this.onEditComplete,this,{single:true});A.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=A;var G=this.preEditValue(C,E);A.startEdit(this.view.getCell(F,B).firstChild,G)}).defer(50,this)}}},preEditValue:function(A,C){var B=A.data[C];return this.autoEncode&&typeof B=="string"?Ext.util.Format.htmlDecode(B):B},postEditValue:function(C,A,B,D){return this.autoEncode&&typeof C=="string"?Ext.util.Format.htmlEncode(C):C},stopEditing:function(A){if(this.activeEditor)this.activeEditor[A===
true?"cancelEdit":"completeEdit"]();this.activeEditor=null},onDestroy:function(){if(this.rendered){var C=this.colModel.config;for(var B=0,A=C.length;B<A;B++){var D=C[B];Ext.destroy(D.editor)}}Ext.grid.EditorGridPanel.superclass.onDestroy.call(this)}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(B,A){Ext.grid.GridEditor.superclass.constructor.call(this,B,A);B.monitorTab=false};
Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=function(A,B){this.grid=A;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(B)this.setSource(B);Ext.grid.PropertyStore.superclass.constructor.call(this)};
Ext.extend(Ext.grid.PropertyStore,Ext.util.Observable,{setSource:function(C){this.source=C;this.store.removeAll();var B=[];for(var A in C)if(this.isEditableValue(C[A]))B.push(new Ext.grid.PropertyRecord({name:A,value:C[A]},A));this.store.loadRecords({records:B},{},true)},onUpdate:function(E,A,D){if(D==Ext.data.Record.EDIT){var B=A.data["value"];var C=A.modified["value"];if(this.grid.fireEvent("beforepropertychange",this.source,A.id,B,C)!==false){this.source[A.id]=B;A.commit();this.grid.fireEvent("propertychange",
this.source,A.id,B,C)}else A.reject()}},getProperty:function(A){return this.store.getAt(A)},isEditableValue:function(A){if(Ext.isDate(A))return true;else if(typeof A=="object"||typeof A=="function")return false;return true},setValue:function(B,A){this.source[B]=A;this.store.getById(B).set("value",A)},getSource:function(){return this.source}});
Ext.grid.PropertyColumnModel=function(C,B){this.grid=C;var D=Ext.grid;D.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=B;this.bselect=Ext.DomHelper.append(document.body,{tag:"select",cls:"x-grid-editor x-hide-display",children:[{tag:"option",value:"true",html:"true"},{tag:"option",value:"false",
html:"false"}]});var E=Ext.form;var A=new E.Field({el:this.bselect,bselect:this.bselect,autoShow:true,getValue:function(){return this.bselect.value=="true"}});this.editors={"date":new D.GridEditor(new E.DateField({selectOnFocus:true})),"string":new D.GridEditor(new E.TextField({selectOnFocus:true})),"number":new D.GridEditor(new E.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new D.GridEditor(A)};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=
this.renderProp.createDelegate(this)};
Ext.extend(Ext.grid.PropertyColumnModel,Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",renderDate:function(A){return A.dateFormat(this.dateFormat)},renderBool:function(A){return A?"true":"false"},isCellEditable:function(A,B){return A==1},getRenderer:function(A){return A==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(A){return this.getPropertyName(A)},renderCell:function(A){var B=A;if(Ext.isDate(A))B=this.renderDate(A);else if(typeof A=="boolean")B=
this.renderBool(A);return Ext.util.Format.htmlEncode(B)},getPropertyName:function(B){var A=this.grid.propertyNames;return A&&A[B]?A[B]:B},getCellEditor:function(A,E){var B=this.store.getProperty(E);var D=B.data["name"],C=B.data["value"];if(this.grid.customEditors[D])return this.grid.customEditors[D];if(Ext.isDate(C))return this.editors["date"];else if(typeof C=="number")return this.editors["number"];else if(typeof C=="boolean")return this.editors["boolean"];else return this.editors["string"]}});
Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customEditors=this.customEditors||{};this.lastEditRow=null;var B=new Ext.grid.PropertyStore(this);this.propStore=B;var A=new Ext.grid.PropertyColumnModel(this,B);B.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=A;this.ds=B.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);
this.selModel.on("beforecellselect",function(E,D,C){if(C===0){this.startEditing.defer(200,this,[D,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source)this.setSource(this.source)},setSource:function(A){this.propStore.setSource(A)},getSource:function(){return this.propStore.getSource()}});
Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.RowNumberer=function(A){Ext.apply(this,A);if(this.rowspan)this.renderer=this.renderer.createDelegate(this)};Ext.grid.RowNumberer.prototype={header:"",width:23,sortable:false,fixed:true,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(B,C,A,D){if(this.rowspan)C.cellAttr='rowspan="'+this.rowspan+'"';return D+1}};
Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'<div class="x-grid3-hd-checker">&#160;</div>',width:20,sortable:false,menuDisabled:true,fixed:true,dataIndex:"",id:"checker",initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var A=this.grid.getView();A.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(A.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},onMouseDown:function(C,B){if(C.button===
0&&B.className=="x-grid3-row-checker"){C.stopEvent();var D=C.getTarget(".x-grid3-row");if(D){var A=D.rowIndex;if(this.isSelected(A))this.deselectRow(A);else this.selectRow(A,true)}}},onHdMouseDown:function(C,A){if(A.className=="x-grid3-hd-checker"){C.stopEvent();var B=Ext.fly(A.parentNode);var D=B.hasClass("x-grid3-hd-checker-on");if(D){B.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{B.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(B,C,A){return'<div class="x-grid3-row-checker">&#160;</div>'}});
Ext.LoadMask=function(C,B){this.el=Ext.get(C);Ext.apply(this,B);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,false)}else{var A=this.el.getUpdater();A.showLoadIndicator=false;A.on("beforeupdate",this.onBeforeLoad,this);A.on("update",this.onLoad,this);A.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true)}};
Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true},enable:function(){this.disabled=false},onLoad:function(){this.el.unmask(this.removeMask)},onBeforeLoad:function(){if(!this.disabled)this.el.mask(this.msg,this.msgCls)},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",
this.onLoad,this)}else{var A=this.el.getUpdater();A.un("beforeupdate",this.onBeforeLoad,this);A.un("update",this.onLoad,this);A.un("failure",this.onLoad,this)}}};
Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(D,A){Ext.ProgressBar.superclass.onRender.call(this,D,A);var C=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>",
"</div>");if(A)this.el=C.insertBefore(A,{cls:this.baseCls},true);else this.el=C.append(D,{cls:this.baseCls},true);if(this.id)this.el.dom.id=this.id;var B=this.el.dom.firstChild;this.progressBar=Ext.get(B.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var E=Ext.get(B.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,
E.dom.firstChild]);this.textEl.setWidth(B.offsetWidth)}this.progressBar.setHeight(B.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value)this.updateProgress(this.value,this.text);else this.updateText(this.text)},updateProgress:function(B,C){this.value=B||0;if(C)this.updateText(C);if(this.rendered){var A=Math.floor(B*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(A);if(this.textTopEl)this.textTopEl.removeClass("x-hidden").setWidth(A)}this.fireEvent("update",
this,B,C);return this},wait:function(B){if(!this.waitTimer){var A=this;B=B||{};this.updateText(B.text);this.waitTimer=Ext.TaskMgr.start({run:function(C){var D=B.increment||10;this.updateProgress(((C+D)%D+1)*(100/D)*.01)},interval:B.interval||1E3,duration:B.duration,onStop:function(){if(B.fn)B.fn.apply(B.scope||this);this.reset()},scope:A})}return this},isWaiting:function(){return this.waitTimer!=null},updateText:function(A){this.text=A||"&#160;";if(this.rendered)this.textEl.update(this.text);return this},
syncProgressBar:function(){if(this.value)this.updateProgress(this.value,this.text);return this},setSize:function(A,C){Ext.ProgressBar.superclass.setSize.call(this,A,C);if(this.textTopEl){var B=this.el.dom.firstChild;this.textEl.setSize(B.offsetWidth,B.offsetHeight)}this.syncProgressBar();return this},reset:function(A){this.updateProgress(0);if(this.textTopEl)this.textTopEl.addClass("x-hidden");if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(A===
true)this.hide();return this}});Ext.reg("progress",Ext.ProgressBar);
Ext.Slider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,initComponent:function(){if(this.value===undefined)this.value=this.minValue;Ext.Slider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.vertical)Ext.apply(this,Ext.Slider.Vertical)},onRender:function(){this.autoEl=
{cls:"x-slider "+(this.vertical?"x-slider-vert":"x-slider-horz"),cn:{cls:"x-slider-end",cn:{cls:"x-slider-inner",cn:[{cls:"x-slider-thumb"},{tag:"a",cls:"x-slider-focus",href:"#",tabIndex:"-1",hidefocus:"on"}]}}};Ext.Slider.superclass.onRender.apply(this,arguments);this.endEl=this.el.first();this.innerEl=this.endEl.first();this.thumb=this.innerEl.first();this.halfThumb=(this.vertical?this.thumb.getHeight():this.thumb.getWidth())/2;this.focusEl=this.thumb.next();this.initEvents()},initEvents:function(){this.thumb.addClassOnOver("x-slider-thumb-over");
this.mon(this.el,"mousedown",this.onMouseDown,this);this.mon(this.el,"keydown",this.onKeyDown,this);this.focusEl.swallowEvent("click",true);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeDragStart.createDelegate(this),onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(this.thumb);this.on("beforedestroy",this.tracker.destroy,this.tracker)},onMouseDown:function(B){if(this.disabled)return;
if(this.clickToChange&&B.target!=this.thumb.dom){var A=this.innerEl.translatePoints(B.getXY());this.onClickChange(A)}this.focus()},onClickChange:function(A){if(A.top>this.clickRange[0]&&A.top<this.clickRange[1])this.setValue(Math.round(this.reverseValue(A.left)),undefined,true)},onKeyDown:function(B){if(this.disabled){B.preventDefault();return}var A=B.getKey();switch(A){case B.UP:case B.RIGHT:B.stopEvent();if(B.ctrlKey)this.setValue(this.maxValue,undefined,true);else this.setValue(this.value+this.keyIncrement,
undefined,true);break;case B.DOWN:case B.LEFT:B.stopEvent();if(B.ctrlKey)this.setValue(this.minValue,undefined,true);else this.setValue(this.value-this.keyIncrement,undefined,true);break;default:B.preventDefault()}},doSnap:function(B){if(!this.increment||this.increment==1||!B)return B;var D=B,C=this.increment;var A=B%C;if(A>0)if(A>C/2)D=B+(C-A);else D=B-A;return D.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.Slider.superclass.afterRender.apply(this,arguments);if(this.value!==
undefined){var A=this.normalizeValue(this.value);if(A!==this.value){delete this.value;this.setValue(A,false)}else this.moveThumb(this.translateValue(A),false)}},getRatio:function(){var A=this.innerEl.getWidth();var B=this.maxValue-this.minValue;return B==0?A:A/B},normalizeValue:function(A){if(typeof A!="number")A=parseInt(A);A=Math.round(A);A=this.doSnap(A);A=A.constrain(this.minValue,this.maxValue);return A},setValue:function(B,A,C){B=this.normalizeValue(B);if(B!==this.value&&this.fireEvent("beforechange",
this,B,this.value)!==false){this.value=B;this.moveThumb(this.translateValue(B),A!==false);this.fireEvent("change",this,B);if(C)this.fireEvent("changecomplete",this,B)}},translateValue:function(A){var B=this.getRatio();return A*B-this.minValue*B-this.halfThumb},reverseValue:function(B){var A=this.getRatio();return(B+this.halfThumb+this.minValue*A)/A},moveThumb:function(B,A){if(!A||this.animate===false)this.thumb.setLeft(B);else this.thumb.shift({left:B,stopFx:true,duration:.35})},focus:function(){this.focusEl.focus(10)},
onBeforeDragStart:function(A){return!this.disabled},onDragStart:function(A){this.thumb.addClass("x-slider-thumb-drag");this.dragging=true;this.dragStartValue=this.value;this.fireEvent("dragstart",this,A)},onDrag:function(A){var B=this.innerEl.translatePoints(this.tracker.getXY());this.setValue(Math.round(this.reverseValue(B.left)),false);this.fireEvent("drag",this,A)},onDragEnd:function(A){this.thumb.removeClass("x-slider-thumb-drag");this.dragging=false;this.fireEvent("dragend",this,A);if(this.dragStartValue!=
this.value)this.fireEvent("changecomplete",this,this.value)},onResize:function(A,B){this.innerEl.setWidth(A-(this.el.getPadding("l")+this.endEl.getPadding("r")));this.syncThumb()},syncThumb:function(){if(this.rendered)this.moveThumb(this.translateValue(this.value))},getValue:function(){return this.value}});Ext.reg("slider",Ext.Slider);
Ext.Slider.Vertical={onResize:function(A,B){this.innerEl.setHeight(B-(this.el.getPadding("t")+this.endEl.getPadding("b")));this.syncThumb()},getRatio:function(){var B=this.innerEl.getHeight();var A=this.maxValue-this.minValue;return B/A},moveThumb:function(B,A){if(!A||this.animate===false)this.thumb.setBottom(B);else this.thumb.shift({bottom:B,stopFx:true,duration:.35})},onDrag:function(B){var C=this.innerEl.translatePoints(this.tracker.getXY());var A=this.innerEl.getHeight()-C.top;this.setValue(Math.round(A/
this.getRatio()),false);this.fireEvent("drag",this,B)},onClickChange:function(B){if(B.left>this.clickRange[0]&&B.left<this.clickRange[1]){var A=this.innerEl.getHeight()-B.top;this.setValue(Math.round(A/this.getRatio()),undefined,true)}}};
Ext.StatusBar=Ext.extend(Ext.Toolbar,{cls:"x-statusbar",busyIconCls:"x-status-busy",busyText:"Loading...",autoClear:5E3,activeThreadId:0,initComponent:function(){if(this.statusAlign=="right")this.cls+=" x-status-right";Ext.StatusBar.superclass.initComponent.call(this)},afterRender:function(){Ext.StatusBar.superclass.afterRender.call(this);var A=this.statusAlign=="right",B=Ext.get(this.nextBlock());if(A)this.tr.appendChild(B.dom);else B.insertBefore(this.tr.firstChild);this.statusEl=B.createChild({cls:"x-status-text "+
(this.iconCls||this.defaultIconCls||""),html:this.text||this.defaultText||""});this.statusEl.unselectable();this.spacerEl=B.insertSibling({tag:"td",style:"width:100%",cn:[{cls:"ytb-spacer"}]},A?"before":"after")},setStatus:function(C){C=C||{};if(typeof C=="string")C={text:C};if(C.text!==undefined)this.setText(C.text);if(C.iconCls!==undefined)this.setIcon(C.iconCls);if(C.clear){var D=C.clear,B=this.autoClear,A={useDefaults:true,anim:true};if(typeof D=="object"){D=Ext.applyIf(D,A);if(D.wait)B=D.wait}else if(typeof D==
"number"){B=D;D=A}else if(typeof D=="boolean")D=A;D.threadId=this.activeThreadId;this.clearStatus.defer(B,this,[D])}return this},clearStatus:function(C){C=C||{};if(C.threadId&&C.threadId!==this.activeThreadId)return this;var B=C.useDefaults?this.defaultText:"",A=C.useDefaults?this.defaultIconCls?this.defaultIconCls:"":"";if(C.anim)this.statusEl.fadeOut({remove:false,useDisplay:true,scope:this,callback:function(){this.setStatus({text:B,iconCls:A});this.statusEl.show()}});else{this.statusEl.hide();
this.setStatus({text:B,iconCls:A});this.statusEl.show()}return this},setText:function(A){this.activeThreadId++;this.text=A||"";if(this.rendered)this.statusEl.update(this.text);return this},getText:function(){return this.text},setIcon:function(A){this.activeThreadId++;A=A||"";if(this.rendered){if(this.currIconCls){this.statusEl.removeClass(this.currIconCls);this.currIconCls=null}if(A.length>0){this.statusEl.addClass(A);this.currIconCls=A}}else this.currIconCls=A;return this},showBusy:function(A){if(typeof A==
"string")A={text:A};A=Ext.applyIf(A||{},{text:this.busyText,iconCls:this.busyIconCls});return this.setStatus(A)}});Ext.reg("statusbar",Ext.StatusBar);
Ext.History=function(){var E,C;var J=false;var D;function F(){var K=top.location.href,L=K.indexOf("#");return L>=0?K.substr(L+1):null}function A(){C.value=D}function G(K){D=K;Ext.History.fireEvent("change",K)}function H(L){var K=['<html><body><div id="state">',L,"</div></body></html>"].join("");try{var N=E.contentWindow.document;N.open();N.write(K);N.close();return true}catch(M){return false}}function B(){if(!E.contentWindow||!E.contentWindow.document){setTimeout(B,10);return}var N=E.contentWindow.document;
var L=N.getElementById("state");var K=L?L.innerText:null;var M=F();setInterval(function(){N=E.contentWindow.document;L=N.getElementById("state");var P=L?L.innerText:null;var O=F();if(P!==K){K=P;G(K);top.location.hash=K;M=K;A()}else if(O!==M){M=O;H(O)}},50);J=true;Ext.History.fireEvent("ready",Ext.History)}function I(){D=C.value;if(Ext.isIE)B();else{var K=F();setInterval(function(){var L=F();if(L!==K){K=L;G(K);A()}},50);J=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",
iframeId:"x-history-frame",events:{},init:function(L,K){if(J){Ext.callback(L,K,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(L,K)});return}C=Ext.getDom(Ext.History.fieldId);if(Ext.isIE)E=Ext.getDom(Ext.History.iframeId);this.addEvents("ready","change");if(L)this.on("ready",L,K,{single:true});I()},add:function(K,L){if(L!==false)if(this.getToken()==K)return true;if(Ext.isIE)return H(K);else{top.location.hash=K;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},
getToken:function(){return J?D:F()}}}();Ext.apply(Ext.History,new Ext.util.Observable);Ext.namespace("Ext.ux.grid");
Ext.ux.grid.BufferedGridView=function(_1){this.addEvents({"beforebuffer":true,"buffer":true,"cursormove":true});this.horizontalScrollOffset=16;this.loadMask=false;Ext.apply(this,_1);this.bufferRange=[0,-1];this.templates={};this.templates.master=new Ext.Template('<div class="x-grid3" hidefocus="true"><div style="z-index:2000;background:none;position:relative;height:321px; float:right; width: 18px;overflow: scroll;"><div style="background:none;width:1px;overflow:hidden;font-size:1px;height:0px;"></div></div>','<div class="x-grid3-viewport" style="float:left">',
'<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset">{header}</div></div><div class="x-clear"></div></div>','<div class="x-grid3-scroller" style="overflow-y:hidden !important;"><div class="x-grid3-body" style="position:relative;">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',"</div>",'<div class="x-grid3-resize-marker">&#160;</div>','<div class="x-grid3-resize-proxy">&#160;</div>',"</div>");Ext.ux.grid.BufferedGridView.superclass.constructor.call(this)};
Ext.extend(Ext.ux.grid.BufferedGridView,Ext.grid.GridView,{liveScroller:null,liveScrollerInset:null,rowHeight:-1,visibleRows:1,lastIndex:-1,lastRowIndex:0,lastScrollPos:0,rowIndex:0,isBuffering:false,requestQueue:-1,loadMask:null,isPrebuffering:false,reset:function(_2){if(_2===false){this.ds.modified=[];this.grid.selModel.clearSelections(true);this.rowIndex=0;this.lastScrollPos=0;this.lastRowIndex=0;this.lastIndex=0;this.bufferRange=[0,this.ds.bufferSize];this.adjustScrollerPos(-this.liveScroller.dom.scrollTop,
true);this.showLoadMask(false);this.refresh(true);this.fireEvent("cursormove",this,0,Math.min(this.ds.totalLength,this.visibleRows),this.ds.totalLength)}else{var _3={start:0,limit:this.ds.bufferSize};var _4=this.ds.sortInfo;if(_4){_3.dir=_4.direction;_3.sort=_4.field}this.ds.load({callback:function(){this.reset(false)},scope:this,params:_3})}},renderUI:function(){var g=this.grid;var _6=g.enableDragDrop||g.enableDrag;g.enableDragDrop=false;g.enableDrag=false;Ext.ux.grid.BufferedGridView.superclass.renderUI.call(this);
var g=this.grid;g.enableDragDrop=_6;g.enableDrag=_6;if(_6)var dd=new Ext.ux.grid.BufferedGridDragZone(g,{ddGroup:g.ddGroup||"GridDD"});if(this.loadMask)this.loadMask=new Ext.LoadMask(this.mainBody.dom.parentNode.parentNode,this.loadMask)},init:function(_8){Ext.ux.grid.BufferedGridView.superclass.init.call(this,_8);this.bufferRange=[0,this.ds.bufferSize];this.ds.on("beforeload",this.onBeforeLoad,this)},renderBody:function(){var _9=this.renderRows(0,this.visibleRows-1);return this.templates.body.apply({rows:_9})},
initElements:function(){var E=Ext.Element;var el=this.grid.getGridEl().dom.firstChild;var cs=el.childNodes;this.el=new E(el);this.mainWrap=new E(cs[1]);this.liveScroller=new E(cs[0]);this.liveScrollerInset=this.liveScroller.dom.firstChild;this.liveScroller.on("scroll",this.onLiveScroll,this);this.mainHd=new E(this.mainWrap.dom.firstChild);this.innerHd=this.mainHd.dom.firstChild;this.scroller=new E(this.mainWrap.dom.childNodes[1]);if(this.forceFit)this.scroller.setStyle("overflow-x","hidden");this.mainBody=
new E(this.scroller.dom.firstChild);this.mainBody.on("mousewheel",this.handleWheel,this);this.focusEl=new E(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new E(cs[2]);this.resizeProxy=new E(cs[3])},layout:function(){if(!this.mainBody)return;var g=this.grid;var c=g.getGridEl(),cm=this.cm,_10=g.autoExpandColumn,gv=this;var _12=c.getSize(true);var vw=_12.width-this.scrollOffset;if(vw<20||_12.height<20)return;if(g.autoHeight)this.scroller.dom.style.overflow=
"visible";else{this.el.setSize(_12.width,_12.height);var _14=this.mainHd.getHeight();var vh=_12.height-_14;this.scroller.setSize(vw,vh);if(this.innerHd)this.innerHd.style.width=vw+"px"}if(this.forceFit){if(this.lastViewWidth!=vw){this.fitColumns(false,false);this.lastViewWidth=vw}}else this.autoExpand();this.adjustVisibleRows();this.adjustBufferInset();this.onLayout(vw,vh)},onColumnWidthUpdated:function(col,w,tw){this.adjustVisibleRows();this.adjustBufferInset()},onAllColumnWidthsUpdated:function(ws,
tw){this.adjustVisibleRows();this.adjustBufferInset()},onRowSelect:function(row){if(row<this.rowIndex||row>this.rowIndex+this.visibleRows)return;var _1c=row-this.rowIndex;this.addRowClass(_1c,"x-grid3-row-selected")},onRowDeselect:function(row){if(row<this.rowIndex||row>this.rowIndex+this.visibleRows)return;var _1e=row-this.rowIndex;this.removeRowClass(_1e,"x-grid3-row-selected")},onCellSelect:function(row,col){if(row<this.rowIndex||row>this.rowIndex+this.visibleRows)return;var _21=row-this.rowIndex;
var _22=this.getCell(_21,col);if(_22)this.fly(_22).addClass("x-grid3-cell-selected")},onCellDeselect:function(row,col){if(row<this.rowIndex||row>this.rowIndex+this.visibleRows)return;var _25=row-this.rowIndex;var _26=this.getCell(_25,col);if(_26)this.fly(_26).removeClass("x-grid3-cell-selected")},onRowOver:function(e,t){var row;if((row=this.findRowIndex(t))!==false){var _2a=row-this.rowIndex;this.addRowClass(_2a,"x-grid3-row-over")}},onRowOut:function(e,t){var row;if((row=this.findRowIndex(t))!==
false&&row!==this.findRowIndex(e.getRelatedTarget())){var _2e=row-this.rowIndex;this.removeRowClass(_2e,"x-grid3-row-over")}},onClear:function(){this.reset(false)},onRemove:function(ds,_30,_31,_32){if(_31==Number.MIN_VALUE||_31==Number.MAX_VALUE){this.fireEvent("beforerowremoved",this,_31,_30);this.fireEvent("rowremoved",this,_31,_30);this.adjustBufferInset();return}var _33=_31+this.bufferRange[0];if(_32!==true)this.fireEvent("beforerowremoved",this,_33,_30);var _34=this.getRows().length;if(_33<this.rowIndex){this.rowIndex--;
this.lastRowIndex=this.rowIndex;this.adjustScrollerPos(-this.rowHeight,true);this.fireEvent("cursormove",this,this.rowIndex,Math.min(this.ds.totalLength,this.visibleRows),this.ds.totalLength)}else if(_33>=this.rowIndex&&_33<this.rowIndex+_34){var _35=this.rowIndex-this.bufferRange[0]+this.visibleRows;var _36=_33-this.rowIndex;var rec=this.ds.getAt(_35);if(rec==null)if(this.ds.totalLength>this.rowIndex+this.visibleRows){if(_32!==true)this.fireEvent("rowremoved",this,_33,_30);this.updateLiveRows(this.rowIndex,
true,true);return}else if(this.rowIndex==0)this.removeRows(_36,_36);else{this.rowIndex--;if(this.rowIndex<this.bufferRange[0]){if(_32!==true)this.fireEvent("rowremoved",this,_33,_30);this.updateLiveRows(this.rowIndex);return}else this.replaceLiveRows(this.rowIndex)}else{this.removeRows(_36,_36);var _38=this.renderRows(_35,_35);Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,_38)}}this.bufferRange[1]--;this.adjustBufferInset();if(_32!==true)this.fireEvent("rowremoved",this,_33,_30);this.processRows(0,
undefined,true)},onAdd:function(ds,_3a,_3b){var _3c=_3a.length;if(_3b==Number.MAX_VALUE||_3b==Number.MIN_VALUE){this.fireEvent("beforerowsinserted",this,_3b,_3b);if(_3b==Number.MIN_VALUE){this.rowIndex=this.rowIndex+_3c;this.lastRowIndex=this.rowIndex;this.bufferRange[0]+=_3c;this.bufferRange[1]+=_3c;this.adjustBufferInset();this.adjustScrollerPos(this.rowHeight*_3c,true);this.fireEvent("rowsinserted",this,_3b,_3b);this.processRows();this.fireEvent("cursormove",this,this.rowIndex,Math.min(this.ds.totalLength,
this.visibleRows),this.ds.totalLength);return}this.adjustBufferInset();this.fireEvent("rowsinserted",this,_3b,_3b);return}var _3d=_3b+this.bufferRange[0];var end=_3d+(_3c-1);var len=this.getRows().length;var _40=0;var _41=0;if(_3b>=this.rowIndex-this.bufferRange[0]+len&&len==this.visibleRows){this.fireEvent("beforerowsinserted",this,_3d,end);this.fireEvent("rowsinserted",this,_3d,end);this.adjustVisibleRows();this.adjustBufferInset()}else if(len==this.visibleRows&&_3b<=this.rowIndex-this.bufferRange[0]){this.fireEvent("beforerowsinserted",
this,_3d,end);this.liveScroller.un("scroll",this.onLiveScroll,this);this.rowIndex+=_3c;this.lastRowIndex=this.rowIndex;this.adjustVisibleRows();this.adjustBufferInset();this.adjustScrollerPos(this.rowHeight*_3c,true);this.fireEvent("rowsinserted",this,_3d,end);this.processRows();this.fireEvent("cursormove",this,this.rowIndex,Math.min(this.ds.totalLength,this.visibleRows),this.ds.totalLength)}else if(len<this.visibleRows||_3b>this.rowIndex-this.bufferRange[0]){_40=_3b;_41=Math.min(end,this.rowIndex+
this.visibleRows-1)-this.bufferRange[0];this.insertRows(ds,_40,_41);this.adjustVisibleRows();this.adjustBufferInset()}},onBeforeLoad:function(_42,_43){if(!_43.params)_43.params={start:0,limit:this.ds.bufferSize};else{_43.params.start=0;_43.params.limit=this.ds.bufferSize}_43.scope=this;_43.callback=function(){this.reset(false)};return true},onLoad:function(o1,o2,_46){this.adjustBufferInset()},onDataChange:function(_47){this.updateHeaderSortState()},liveBufferUpdate:function(o1,_49,o2){this.fireEvent("buffer",
this,this.ds,this.rowIndex,Math.max(this.visibleRows,this.getRows().length),this.ds.getTotalCount());this.isBuffering=false;this.isPrebuffering=false;this.showLoadMask(false);this.bufferRange=[_49.params.start,_49.params.start+_49.params.limit];var _4b=this.grid.selModel.getPendingSelections(false);for(var i=0,_4d=_4b.length;i<_4d;i++)this.grid.selModel.clearPendingSelection(_4b[i]);if(this.isInRange(this.rowIndex))this.replaceLiveRows(this.rowIndex);else this.updateLiveRows(this.rowIndex);if(this.requestQueue>=
0){var _4e=this.requestQueue;this.requestQueue=-1;this.updateLiveRows(_4e)}},handleWheel:function(e){if(this.rowHeight==-1){e.stopEvent();return}var d=e.getWheelDelta();this.adjustScrollerPos(-(d*this.rowHeight));e.stopEvent()},onLiveScroll:function(){var _51=this.liveScroller.dom.scrollTop;var _52=_51-this.lastScrollPos;var _53=Math.floor(_52/this.rowHeight);if(_52==0)return;var _54=Math.floor(_51/this.rowHeight);this.rowIndex=_54;if(_54==this.lastRowIndex)return;this.updateLiveRows(_54,_53);this.lastScrollPos=
this.liveScroller.dom.scrollTop},refreshRow:function(_55){var ds=this.ds,_57;if(typeof _55=="number"){_57=_55;_55=ds.getAt(_57)}else _57=ds.indexOf(_55);var _58=_57+this.bufferRange[0];if(_58<this.rowIndex||_58>=this.rowIndex+this.visibleRows){this.fireEvent("rowupdated",this,_58,_55);return}this.insertRows(ds,_57,_57,true);this.fireEvent("rowupdated",this,_58,_55)},processRows:function(_59,_5a,_5b){_5a=_5a||!this.grid.stripeRows;_59=0;var _5c=this.getRows();var cls=" x-grid3-row-alt ";var _5e=this.rowIndex;
var _5f=0;var _60=this.grid.selModel.selections;var ds=this.ds;for(var i=_59,len=_5c.length;i<len;i++){_5f=i+_5e;var row=_5c[i];row.rowIndex=_5f;if(_5b==true){if(this.grid.selModel.bufferedSelections[_5f]===true){this.addRowClass(i,"x-grid3-row-selected");_60.add(ds.getAt(_5f-this.bufferRange[0]))}this.fly(row).removeClass("x-grid3-row-over")}if(!_5a){var _65=(i+1)%2==0;var _66=(" "+row.className+" ").indexOf(cls)!=-1;if(_65==_66)continue;if(_65)row.className+=" x-grid3-row-alt";else row.className=
row.className.replace("x-grid3-row-alt","")}}},insertRows:function(dm,_68,_69,_6a){var _6b=_68+this.bufferRange[0];var _6c=_69+this.bufferRange[0];if(!_6a)this.fireEvent("beforerowsinserted",this,_6b,_6c);if(_6a!==true&&this.getRows().length==this.visibleRows)this.removeRows(this.visibleRows-1-(_69-_68),this.visibleRows-1);if(_6a)this.removeRows(_6b-this.rowIndex,_6c-this.rowIndex);var _6d=this.renderRows(_68,_69);var _6e=this.getRow(_68-(this.rowIndex-this.bufferRange[0]));if(_6e)Ext.DomHelper.insertHtml("beforeBegin",
_6e,_6d);else Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,_6d);if(_6a===true){var _6f=this.getRows();var _70=this.rowIndex;for(var i=0,_72=_6f.length;i<_72;i++)_6f[i].rowIndex=_70+i}if(!_6a){this.fireEvent("rowsinserted",this,_6b,_6c);this.processRows(_68)}},focusCell:function(row,col,_75){var xy=this.ensureVisible(row,col,_75);if(!xy)return;this.focusEl.setXY(xy);if(Ext.isGecko)this.focusEl.focus();else this.focusEl.focus.defer(1,this.focusEl)},ensureVisible:function(row,col,_79){if(typeof row!=
"number")row=row.rowIndex;if(row<0||row>=this.ds.totalLength)return;col=col!==undefined?col:0;var _7a=row-this.rowIndex;if(row>=this.rowIndex+this.visibleRows)this.adjustScrollerPos((row-(this.rowIndex+this.visibleRows)+1)*this.rowHeight);else if(row<this.rowIndex)this.adjustScrollerPos(_7a*this.rowHeight);var _7a=_7a<0?row:_7a;var _7b=this.getRow(_7a),_7c;if(!(_79===false&&col===0)){while(this.cm.isHidden(col))col++;_7c=this.getCell(row-this.rowIndex,col)}if(!_7b)return;var c=this.scroller.dom;return _7c?
Ext.fly(_7c).getXY():[c.scrollLeft,Ext.fly(_7b).getY()]},isInRange:function(_7e){var _7f=Math.min(this.ds.totalLength-1,_7e+this.visibleRows);return _7e>=this.bufferRange[0]&&_7f<=this.bufferRange[1]},getPredictedBufferIndex:function(_80,_81,_82){if(!_81)return Math.max(0,_80-2*this.nearLimit);if(!_82)return Math.max(0,_80-this.ds.bufferSize+this.visibleRows);if(_82)return Math.max(0,Math.min(_80,this.ds.totalLength-this.ds.bufferSize))},updateLiveRows:function(_83,_84,_85){this.fireEvent("cursormove",
this,_83,Math.min(this.ds.totalLength,this.visibleRows),this.ds.totalLength);var _86=this.isInRange(_83);if(this.isBuffering&&this.isPrebuffering)if(_86)this.replaceLiveRows(_83);else this.showLoadMask(true);if(this.isBuffering){this.requestQueue=_83;return}var _87=this.lastIndex;this.lastIndex=_83;var _86=this.isInRange(_83);var _88=false;if(_86&&_85!==true){this.replaceLiveRows(_83,_84);if(_83>_87){_88=true;var _89=this.ds.totalLength;if(_83+this.visibleRows+this.nearLimit<this.bufferRange[1])return;
if(this.bufferRange[1]>=_89)return}else if(_83<_87){_88=false;if(this.bufferRange[0]<=0)return;if(_83-this.nearLimit>this.bufferRange[0])return}else return;this.isPrebuffering=true}this.isBuffering=true;var _8a=this.getPredictedBufferIndex(_83,_86,_88);var _8b=this.ds.bufferSize;if(!_86)this.showLoadMask(true);this.fireEvent("beforebuffer",this,this.ds,_83,this.visibleRows,this.ds.totalLength);this.ds.suspendEvents();var _8c=this.ds.sortInfo;var _8d={};Ext.apply(_8d,this.ds.lastOptions);_8d.start=
_8a;_8d.limit=this.ds.bufferSize;if(_8c){_8d.dir=_8c.direction;_8d.sort=_8c.field}this.ds.load({callback:this.liveBufferUpdate,scope:this,params:_8d});this.ds.resumeEvents()},showLoadMask:function(_8e){if(this.loadMask==null)if(_8e)this.loadMask=new Ext.LoadMask(this.mainBody.dom.parentNode.parentNode,this.loadMaskConfig);else return;if(_8e)this.loadMask.show();else this.loadMask.hide()},replaceLiveRows:function(_8f,_90){var _91=_8f-this.lastRowIndex;if(_91==0&&_90!==true)return;var _92=_91>0;_91=
Math.abs(_91);var _93=_8f-this.bufferRange[0];if(_91>=this.visibleRows||_91==0)this.mainBody.update(this.renderRows(_93,_93+this.visibleRows-1));else if(_92){this.removeRows(0,_91-1);var _94=this.renderRows(_93+this.visibleRows-_91,_93+this.visibleRows-1);Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,_94)}else{this.removeRows(this.visibleRows-_91,this.visibleRows-1);var _94=this.renderRows(_93,_93+_91-1);Ext.DomHelper.insertHtml("beforeBegin",this.mainBody.dom.firstChild,_94)}this.processRows(0,
undefined,true);this.lastRowIndex=_8f},adjustBufferInset:function(){var g=this.grid,ds=g.store;var c=g.getGridEl();var _98=this.cm.getTotalWidth()+this.scrollOffset>c.getSize().width;this.liveScroller.dom.style.height=this.liveScroller.dom.parentNode.offsetHeight+(Ext.isGecko?ds.totalLength>0&&_98?-this.horizontalScrollOffset:0:ds.totalLength>0&&_98?0:this.horizontalScrollOffset)+"px";if(this.rowHeight==-1)return;if(ds.totalLength<=this.visibleRows){this.liveScrollerInset.style.height="0px";return}var _99=
this.rowHeight*ds.totalLength;_99+=c.getSize().height-this.visibleRows*this.rowHeight;if(_98)_99-=this.horizontalScrollOffset;this.liveScrollerInset.style.height=_99+"px"},adjustVisibleRows:function(){if(this.rowHeight==-1)if(this.getRows()[0])this.rowHeight=this.getRows()[0].offsetHeight;else return;var g=this.grid,ds=g.store;var c=g.getGridEl();var cm=this.cm;var _9e=c.getSize(true);var vh=_9e.height;var vw=_9e.width-this.scrollOffset;if(cm.getTotalWidth()>vw)vh-=this.horizontalScrollOffset;vh-=
this.mainHd.getHeight();var _a1=Math.max(1,Math.floor(vh/this.rowHeight));if(this.visibleRows==_a1)return;this.visibleRows=_a1;var _a2=ds.totalLength;if(this.rowIndex+_a1>_a2){this.rowIndex=Math.max(0,ds.totalLength-this.visibleRows);this.lastRowIndex=this.rowIndex;this.updateLiveRows(this.rowIndex,true)}else this.updateLiveRows(this.rowIndex,true)},adjustScrollerPos:function(_a3,_a4){var _a5=this.liveScroller;if(_a4===true)_a5.un("scroll",this.onLiveScroll,this);_a5.dom.scrollTop+=_a3;if(_a4===true){_a5.dom.scrollTop=
_a5.dom.scrollTop;_a5.on("scroll",this.onLiveScroll,this)}}});Ext.namespace("Ext.ux.grid");Ext.ux.grid.BufferedRowSelectionModel=function(_a6){this.addEvents({"selectiondirty":true});Ext.apply(this,_a6);this.bufferedSelections={};this.pendingSelections={};Ext.ux.grid.BufferedRowSelectionModel.superclass.constructor.call(this)};
Ext.extend(Ext.ux.grid.BufferedRowSelectionModel,Ext.grid.RowSelectionModel,{initEvents:function(){Ext.ux.grid.BufferedRowSelectionModel.superclass.initEvents.call(this);this.grid.store.on("add",this.onAdd,this);this.grid.store.on("selectionsload",this.onSelectionsLoad,this)},onRefresh:function(){this.clearSelections(true)},onRemove:function(v,_a8,r){if(_a8==Number.MIN_VALUE||_a8==Number.MAX_VALUE){this.selections.remove(r);this.fireEvent("selectiondirty",this,_a8,r);return}var _aa=_a8;var _ab=this.bufferedSelections[_aa]===
true;var _ac=this.getPendingSelections();var _ad=_ac.length;delete this.bufferedSelections[_aa];delete this.pendingSelections[_aa];if(r)this.selections.remove(r);if(_ad==0){this.shiftSelections(_aa,-1);return}var s=_ac[0];var e=_ac[_ad-1];if(_aa<=e||_aa<=s)if(this.fireEvent("selectiondirty",this,_aa,-1)!==false)this.shiftSelections(_aa,-1);if(_ab)this.fireEvent("selectionchange",this)},onAdd:function(_b0,_b1,_b2){var _b3=this.getPendingSelections();var _b4=_b3.length;if(_b2==Number.MIN_VALUE||_b2==
Number.MAX_VALUE){if(_b4==0&&_b2==Number.MIN_VALUE)this.shiftSelections(this.grid.view.bufferRange[0],_b1.length);this.fireEvent("selectiondirty",this,_b2,_b1.length);return}if(_b4==0){this.shiftSelections(this.grid.view.bufferRange[0]+_b2,_b1.length);return}var s=_b3[0];var e=_b3[_b4-1];var _b7=this.grid.view.bufferRange[0]+_b2;if(_b7<=e||_b7<=s)if(this.fireEvent("selectiondirty",this,_b7,_b1.length)!==false)this.shiftSelections(_b7,_b1.length)},shiftSelections:function(_b8,_b9){var _ba=0;var _bb=
{};var _bc=0;var _bd={};var _be=this.grid.store.totalLength;for(var i in this.bufferedSelections){_ba=parseInt(i);_bc=_ba+_b9;if(_bc>=_be)break;if(_ba>=_b8){_bb[_bc]=true;if(this.pendingSelections[i])_bd[_bc]=true}else{_bb[i]=true;if(this.pendingSelections[i])_bd[i]=true}}this.bufferedSelections=_bb;this.pendingSelections=_bd},onSelectionsLoad:function(_c0,_c1,_c2){this.pendingSelections={};this.selections.addAll(_c1)},hasNext:function(){return this.last!==false&&this.last+1<this.grid.store.getTotalCount()},
getCount:function(){var _c3=this.bufferedSelections;var c=0;for(var i in _c3)c++;return c},isSelected:function(_c6){if(typeof _c6=="number")return this.bufferedSelections[_c6]===true;var r=_c6;return r&&this.selections.key(r.id)?true:false},deselectRow:function(_c8,_c9){if(this.locked)return;if(this.last==_c8)this.last=false;if(this.lastActive==_c8)this.lastActive=false;var r=this.grid.store.getAt(_c8-this.grid.getView().bufferRange[0]);delete this.pendingSelections[_c8];delete this.bufferedSelections[_c8];
if(r)this.selections.remove(r);if(!_c9)this.grid.getView().onRowDeselect(_c8);this.fireEvent("rowdeselect",this,_c8,r);this.fireEvent("selectionchange",this)},selectRow:function(_cb,_cc,_cd){if(this.locked||_cb<0)return;var r=this.grid.store.getAt(_cb-this.grid.getView().bufferRange[0]);if(this.fireEvent("beforerowselect",this,_cb,_cc,r)!==false){if(!_cc||this.singleSelect)this.clearSelections();if(r){this.selections.add(r);delete this.pendingSelections[_cb]}else this.pendingSelections[_cb]=true;
this.bufferedSelections[_cb]=true;this.last=this.lastActive=_cb;if(!_cd)this.grid.getView().onRowSelect(_cb);this.fireEvent("rowselect",this,_cb,r);this.fireEvent("selectionchange",this)}},clearPendingSelection:function(_cf){var r=this.grid.store.getAt(_cf-this.grid.getView().bufferRange[0]);if(!r)return;this.selections.add(r);delete this.pendingSelections[_cf]},getPendingSelections:function(_d1){var _d2=1;var _d3=[];var _d4=0;var _d5=[];for(var i in this.pendingSelections)_d5.push(parseInt(i));_d5.sort(function(o1,
o2){if(o1>o2)return 1;else if(o1<o2)return-1;else return 0});if(_d1===false)return _d5;var _d9=_d5.length;if(_d9==0)return[];_d3[_d4]=[_d5[0],_d5[0]];for(var i=0,_d9=_d9-1;i<_d9;i++)if(_d5[i+1]-_d5[i]==1)_d3[_d4][1]=_d5[i+1];else{_d4++;_d3[_d4]=[_d5[i+1],_d5[i+1]]}return _d3},clearSelections:function(_da){if(this.locked)return;if(_da!==true){var s=this.selections;s.clear();for(var i in this.bufferedSelections)this.deselectRow(i)}else{this.selections.clear();this.bufferedSelections={};this.pendingSelections=
{}}this.last=false},selectRange:function(_dd,_de,_df){if(this.locked)return;if(!_df)this.clearSelections();if(_dd<=_de)for(var i=_dd;i<=_de;i++)this.selectRow(i,true);else for(var i=_dd;i>=_de;i--)this.selectRow(i,true)}});Ext.namespace("Ext.ux.grid");
Ext.ux.grid.BufferedStore=function(_e1){_e1=_e1||{};_e1.remoteSort=true;Ext.apply(this,_e1);this.addEvents({"versionchange":true,"beforeselectionsload":true,"selectionsload":true});Ext.ux.grid.BufferedStore.superclass.constructor.call(this,_e1);if(this.url&&!this.selectionsProxy)this.selectionsProxy=new Ext.data.HttpProxy({url:this.url})};
Ext.extend(Ext.ux.grid.BufferedStore,Ext.data.Store,{version:null,insert:function(_e2,_e3){_e3=[].concat(_e3);var _e4=[];var _e5=this.bufferSize-1;var _e6=_e2==Number.MIN_VALUE||_e2==Number.MAX_VALUE?0:_e2;this.totalLength+=_e3.length;if(_e2==Number.MIN_VALUE||_e2==Number.MAX_VALUE||_e2==this.bufferSize||_e2==0&&this.getCount()==this.bufferSize){var _e7=_e2==this.bufferSize?Number.MAX_VALUE:_e2==Number.MIN_VALUE||_e2==0?Number.MIN_VALUE:Number.MAX_VALUE;this.fireEvent("add",this,_e3,_e7);return}for(var i=
0,_e9=_e3.length;i<_e9;i++){if(i+_e6>_e5)break;_e4.push(_e3[i])}for(var i=0,len=_e4.length;i<len;i++){this.data.insert(_e2+i,_e4[i]);_e4[i].join(this)}while(this.getCount()>this.bufferSize)this.data.remove(this.data.last());this.fireEvent("add",this,_e4,_e2)},remove:function(_eb){var _ec=this.data.indexOf(_eb);if(_ec<0){var ind=this.findInsertIndex(_eb);this.totalLength-=1;if(this.pruneModifiedRecords)this.modified.remove(_eb);this.fireEvent("remove",this,_eb,ind);return false}this.data.removeAt(_ec);
if(this.pruneModifiedRecords)this.modified.remove(_eb);this.totalLength-=1;this.fireEvent("remove",this,_eb,_ec);return true},removeAll:function(){this.totalLength=0;this.data.clear();if(this.pruneModifiedRecords)this.modified=[];this.fireEvent("clear",this)},loadRanges:function(_ee){var _ef=_ee.length;if(_ef>0&&!this.selectionsProxy.activeRequest&&this.fireEvent("beforeselectionsload",this,_ee)!==false){var _f0=this.lastOptions.params;var _f1={};_f1.ranges=Ext.encode(_ee);if(_f0){if(_f0.sort)_f1.sort=
_f0.sort;if(_f0.dir)_f1.dir=_f0.dir}var _f2={};for(var i in this.lastOptions)_f2.i=this.lastOptions.i;_f2.ranges=_f1.ranges;this.selectionsProxy.load(_f1,this.reader,this.selectionsLoaded,this,_f2)}},loadSelections:function(_f4){this.loadRanges(_f4)},selectionsLoaded:function(o,_f6,_f7){if(this.checkVersionChange(o,_f6,_f7)!==false)this.fireEvent("selectionsload",this,o.records,Ext.decode(_f6.ranges));else this.fireEvent("selectionsload",this,[],Ext.decode(_f6.ranges))},checkVersionChange:function(o,
_f9,_fa){if(o&&_fa!==false)if(o.version!==undefined){var old=this.version;this.version=o.version;if(this.version!==old)return this.fireEvent("versionchange",this,old,this.version)}},findInsertIndex:function(_fc){this.suspendEvents();var _fd=this.data.clone();if(_fd.getCount()>=this.bufferSize){var _fe=this.data.first();var _ff=this.data.last();this.data.clear();this.data.add(_fc);this.data.add(_fe);this.data.add(_ff);this.applySort(true);var _100=this.data.indexOf(_fc);if(_100==0||_100==2){this.data=
_fd;this.resumeEvents();return _100==0?Number.MIN_VALUE:Number.MAX_VALUE}}this.data=_fd.clone();this.data.add(_fc);this.applySort(true);var _100=this.data.indexOf(_fc);this.data=_fd;this.resumeEvents();return _100},sortData:function(f,_102){_102=_102||"ASC";var st=this.fields.get(f).sortType;var fn=function(r1,r2){var v1=st(r1.data[f]),v2=st(r2.data[f]);return v1>v2?1:v1<v2?-1:0};this.data.sort(_102,fn)},applySort:function(_109){if(_109===true&&this.sortInfo){var s=this.sortInfo,f=s.field;this.sortData(f,
s.direction)}},onMetaChange:function(meta,_10d,o){this.version=null;Ext.ux.grid.BufferedStore.superclass.onMetaChange.call(this,meta,_10d,o)},loadRecords:function(o,_110,_111){this.checkVersionChange(o,_110,_111);Ext.ux.grid.BufferedStore.superclass.loadRecords.call(this,o,_110,_111)},clearFilter:function(){},isFiltered:function(){},collect:function(){},createFilterFn:function(){},sum:function(){},filter:function(){},filterBy:function(){},query:function(){},queryBy:function(){},find:function(){},
findBy:function(){}});Ext.namespace("Ext.ux");
Ext.ux.BufferedGridToolbar=Ext.extend(Ext.Toolbar,{displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",refreshText:"Refresh",initComponent:function(){Ext.ux.BufferedGridToolbar.superclass.initComponent.call(this);this.bind(this.view)},updateInfo:function(_112,_113,_114){if(this.displayEl){var msg=_114==0?this.emptyMsg:String.format(this.displayMsg,_112+1,_112+_113,_114);this.displayEl.update(msg)}},unbind:function(view){view.un("rowremoved",this.onRowRemoved,this);view.un("rowsinserted",
this.onRowsInserted,this);view.un("beforebuffer",this.beforeBuffer,this);view.un("cursormove",this.onCursorMove,this);view.un("buffer",this.onBuffer,this);this.view=undefined},bind:function(view){view.on("rowremoved",this.onRowRemoved,this);view.on("rowsinserted",this.onRowsInserted,this);view.on("beforebuffer",this.beforeBuffer,this);view.on("cursormove",this.onCursorMove,this);view.on("buffer",this.onBuffer,this);this.view=view},onCursorMove:function(view,_119,_11a,_11b){this.updateInfo(_119,_11a,
_11b)},onRowsInserted:function(view,_11d,end){this.updateInfo(view.rowIndex,Math.min(view.ds.totalLength,view.visibleRows),view.ds.totalLength)},onRowRemoved:function(view,_120,_121){this.updateInfo(view.rowIndex,Math.min(view.ds.totalLength,view.visibleRows),view.ds.totalLength)},beforeBuffer:function(view,_123,_124,_125,_126){this.loading.disable();this.updateInfo(_124,_125,_126)},onBuffer:function(view,_128,_129,_12a,_12b){this.loading.enable();this.updateInfo(_129,_12a,_12b)},onClick:function(type){switch(type){case "refresh":this.view.reset(true);
break}},onRender:function(ct,_12e){Ext.PagingToolbar.superclass.onRender.call(this,ct,_12e);this.loading=this.addButton({tooltip:this.refreshText,iconCls:"x-tbar-loading",handler:this.onClick.createDelegate(this,["refresh"])});this.addSeparator();if(this.displayInfo)this.displayEl=Ext.fly(this.el.dom).createChild({cls:"x-paging-info"})}});Ext.namespace("Ext.ux.data");Ext.ux.data.BufferedJsonReader=function(meta,_130){Ext.ux.data.BufferedJsonReader.superclass.constructor.call(this,meta,_130)};
Ext.extend(Ext.ux.data.BufferedJsonReader,Ext.data.JsonReader,{readRecords:function(o){var s=this.meta;if(!this.ef&&s.versionProperty)this.getVersion=this.getJsonAccessor(s.versionProperty);if(!this.__readRecords)this.__readRecords=Ext.ux.data.BufferedJsonReader.superclass.readRecords;var _133=this.__readRecords.call(this,o);if(s.versionProperty){var v=this.getVersion(o);_133.version=v===undefined||v===""?null:v}return _133}});if(typeof btoa=="undefined")btoa=function(data){if(typeof LP=="object"&&typeof LP.lpGetCurrentWindow=="function"&&typeof ischrome=="undefined"){var win=LP.lpGetCurrentWindow();if(typeof win=="object"&&typeof win.btoa=="function")return win.btoa(data)}if(data.length==0)return"";var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,enc="";do{o1=data.charCodeAt(i++);o2=data.charCodeAt(i++);o3=data.charCodeAt(i++);bits=o1<<16|o2<<8|o3;h1=bits>>18&
63;h2=bits>>12&63;h3=bits>>6&63;h4=bits&63;enc+=b64.charAt(h1)+b64.charAt(h2)+b64.charAt(h3)+b64.charAt(h4)}while(i<data.length);switch(data.length%3){case 1:enc=enc.slice(0,-2)+"==";break;case 2:enc=enc.slice(0,-1)+"=";break}return enc};
if(typeof atob=="undefined")atob=function(data){if(typeof LP=="object"&&typeof LP.lpGetCurrentWindow=="function"&&typeof ischrome=="undefined"){var win=LP.lpGetCurrentWindow();if(typeof win=="object"&&typeof win.atob=="function")return win.atob(data)}if(typeof data!="string"||data.length%4!=0||typeof data.charAt=="undefined")return"";var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,enc="";do{h1=b64.indexOf(data.charAt(i++));h2=b64.indexOf(data.charAt(i++));
h3=b64.indexOf(data.charAt(i++));h4=b64.indexOf(data.charAt(i++));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>16&255;o2=bits>>8&255;o3=bits&255;if(h3==64)enc+=String.fromCharCode(o1);else if(h4==64)enc+=String.fromCharCode(o1,o2);else enc+=String.fromCharCode(o1,o2,o3)}while(i<data.length);return enc};
var AES=function(){var Nb=4;var Rcon=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]];var _keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var Sbox=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,
160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,
72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22];var InvSbox=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,
167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,
235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125];var _bin2hex=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];var _hex2bin=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0,0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var SubWord=function(word){for(var i=0;i<4;i++)word[i]=Sbox[word[i]];return word};var RotWord=function(word){var temp=word[0];for(var i=0;i<3;i++)word[i]=word[i+1];word[3]=temp;return word};var AddRoundKey=function(state,round,roundKeys){var row,col;for(row=0;row<4;row++)for(col=0;col<Nb;col++)state[row][col]^=
roundKeys[round*4+col][row];return state};var SubBytes=function(state){var row,col;var tmp;for(row=0;row<4;row++)for(col=0;col<Nb;col++){tmp=state[row][col];state[row][col]=Sbox[state[row][col]]}return state};var ShiftRows=function(state){var row,col;var tmp=new Array;for(row=1;row<4;row++){for(col=0;col<Nb;col++)tmp[col]=state[row][(col+row)%Nb];for(col=0;col<Nb;col++)state[row][col]=tmp[col]}return state};var MixColumns=function(state){var col,i;var x1=new Array;var x2=new Array;var x3=new Array;
for(col=0;col<Nb;col++){for(i=0;i<4;i++){x1[i]=state[i][col];x2[i]=x1[i]<<1;if(x2[i]>255)x2[i]^=283;x3[i]=x1[i]^x2[i]}state[0][col]=x2[0]^x3[1]^x1[2]^x1[3];state[1][col]=x1[0]^x2[1]^x3[2]^x1[3];state[2][col]=x1[0]^x1[1]^x2[2]^x3[3];state[3][col]=x3[0]^x1[1]^x1[2]^x2[3]}return state};var InvSubBytes=function(state){var row,col;var tmp;for(row=0;row<4;row++)for(col=0;col<Nb;col++){tmp=state[row][col];state[row][col]=InvSbox[state[row][col]]}return state};var InvShiftRows=function(state){var row,col;
var tmp=new Array;for(row=1;row<4;row++){for(col=0;col<Nb;col++)tmp[col]=state[row][(col+(Nb-row))%Nb];for(col=0;col<Nb;col++)state[row][col]=tmp[col]}return state};var InvMixColumns=function(state){var col,i;var x1=new Array;var x2=new Array;var x4=new Array;var x8=new Array;var x9=new Array;var xB=new Array;var xD=new Array;var xE=new Array;for(col=0;col<Nb;col++){for(i=0;i<4;i++){x1[i]=state[i][col];x2[i]=x1[i]<<1;if(x2[i]>255)x2[i]^=283;x4[i]=x2[i]<<1;if(x4[i]>255)x4[i]^=283;x8[i]=x4[i]<<1;if(x8[i]>
255)x8[i]^=283;x9[i]=x8[i]^x1[i];xB[i]=x8[i]^x2[i]^x1[i];xD[i]=x8[i]^x4[i]^x1[i];xE[i]=x8[i]^x4[i]^x2[i]}state[0][col]=xE[0]^xB[1]^xD[2]^x9[3];state[1][col]=x9[0]^xE[1]^xB[2]^xD[3];state[2][col]=xD[0]^x9[1]^xE[2]^xB[3];state[3][col]=xB[0]^xD[1]^x9[2]^xE[3]}return state};var AESError=function(msg){if(typeof reportError=="function")reportError(msg,null)};return{KeyExpansion:function(key){var i,j;var temp=new Array;var Nk;var Nr;if(!(key instanceof Array&&(key.length==16||key.length==24||key.length==
32)))AESError("KeyExpansion: key must be an array of length 16, 24, or 32 bytes");Nk=key.length/4;Nr=Nk+6;var roundKeys=new Array;for(i=0;i<Nk;i++)roundKeys[i]=[key[4*i],key[4*i+1],key[4*i+2],key[4*i+3]];for(;i<Nb*(Nr+1);i++){roundKeys[i]=new Array;for(j=0;j<4;j++)temp[j]=roundKeys[i-1][j];if(i%Nk==0){temp=SubWord(RotWord(temp));for(j=0;j<4;j++)temp[j]^=Rcon[i/Nk][j]}else if(Nk>6&&i%Nk==4)temp=SubWord(temp);for(j=0;j<4;j++)roundKeys[i][j]=roundKeys[i-Nk][j]^temp[j]}return roundKeys},Cipher:function(input,
roundKeys){var row,col;var Nr;var state=new Array;var output=new Array;var round;if(!(input instanceof Array&&input.length==4*Nb)){AESError("Cipher: input must be an array of length "+4*Nb);return null}if(!(roundKeys instanceof Array&&(roundKeys.length==Nb*11||roundKeys.length==Nb*13||roundKeys.length==Nb*15))){AESError("Cipher: roundKeys must be an array of length "+Nb*11+", "+Nb*13+", or "+Nb*15);return null}Nr=roundKeys.length/Nb-1;for(row=0;row<4;row++){state[row]=new Array;for(col=0;col<Nb;col++)state[row][col]=
input[row+4*col]}state=AddRoundKey(state,0,roundKeys);for(round=1;round<Nr;round++){state=SubBytes(state);state=ShiftRows(state);state=MixColumns(state);state=AddRoundKey(state,round,roundKeys)}state=SubBytes(state);state=ShiftRows(state);state=AddRoundKey(state,Nr,roundKeys);for(row=0;row<4;row++)for(col=0;col<Nb;col++)output[row+4*col]=state[row][col];return output},InvCipher:function(input,roundKeys){var row,col;var Nr;var state=new Array;var output=new Array;var round;if(!(input instanceof Array&&
input.length==4*Nb)){AESError("Cipher: input must be an array of length "+4*Nb);return null}if(!(roundKeys instanceof Array&&(roundKeys.length==Nb*11||roundKeys.length==Nb*13||roundKeys.length==Nb*15))){AESError("Cipher: roundKeys must be an array of length "+Nb*11+", "+Nb*13+", or "+Nb*15);return null}Nr=roundKeys.length/Nb-1;for(row=0;row<4;row++){state[row]=new Array;for(col=0;col<Nb;col++)state[row][col]=input[row+4*col]}state=AddRoundKey(state,Nr,roundKeys);for(round=Nr-1;round>0;round--){state=
InvShiftRows(state);state=InvSubBytes(state);state=AddRoundKey(state,round,roundKeys);state=InvMixColumns(state)}state=InvShiftRows(state);state=InvSubBytes(state);state=AddRoundKey(state,0,roundKeys);for(row=0;row<4;row++)for(col=0;col<Nb;col++)output[row+4*col]=state[row][col];return output},StringToKeyIv:function(str,bits){var h;var hash=new Array;var key=new Array;var iv=new Array;var nkey=0;var niv=16;var i;if(bits!=128&&bits!=192&&bits!=256){AESError("BytesToKey: bits must be 128, 192, or 256");
return null}nkey=bits/8;for(i=0;i<str.length;i++)hash[i]=str.charCodeAt(i);for(;;){i=0;if(nkey)while(nkey){key.push(hash[i++]);nkey--;if(i==hash.length)break}if(niv&&i<hash.length)while(niv){iv.push(hash[i++]);niv--;if(i==hash.length)break}if(!nkey&&!niv||!nkey&&i>=hash.length)break}return{key:key,iv:iv}},StringToPaddedData:function(str){var data=new Array;var i;str=AES._utf8_encode(str);for(i=0;i<str.length;i++)data.push(str.charCodeAt(i));var m=16-i%16;for(i=0;i<m;i++)data.push(m);return data},
PaddedDataToString:function(data,quiet){var str="";var pad=data[data.length-1];if(pad>0&&pad<=16)for(var j=0;j<data.length-pad;j++)str+=String.fromCharCode(data[j]);else if(!quiet&&data.length%16!==0)AESError("Bogus pad sent: "+pad);str=AES._utf8_decode(str);return str},_utf8_encode:function(str){return(new TextEncoder).encode(str).reduce(function(a,c){return a+String.fromCharCode(c)},"")},fixLegacyUTF8:function(bytes){var fixed=[];var getSequence=function(i){return(bytes[i]&15)<<12|(bytes[i+1]&63)<<
6|bytes[i+2]&63};for(var i=0;i<bytes.length;){if(bytes[i]===237&&bytes[i+3]===237){var high=getSequence(i);var low=getSequence(i+3);if(high>=55296&&high<=56319&&low>=56320&&low<=57343){var codePoint=65536+(high-55296<<10)+(low-56320);fixed.push(240|codePoint>>18&7,128|codePoint>>12&63,128|codePoint>>6&63,128|codePoint&63);i+=6;continue}}fixed.push(bytes[i++])}return new Uint8Array(fixed)},_utf8_decode:function(utfText){var buffer=utfText.split("").map(function(e){return e.charCodeAt(0)});buffer=AES.fixLegacyUTF8(buffer);
return(new TextDecoder("utf-8")).decode(buffer)},db64:function(s){return atob(s)},eb64:function(s){return btoa(s)},BytesToB64:function(bytes){var i;var b64="";for(i=0;i<bytes.length;i++)b64+=String.fromCharCode(bytes[i]);return AES.eb64(b64)},B64ToBytes:function(b64){var data=AES.db64(b64);var bytes=new Array;for(var i=0;i<data.length;i++)bytes[i]=data.charCodeAt(i);return bytes},Prepare:function(obj){var i,ki,data;var bits=256;var o={mode:"ecb",b64:false,data:new Array,key:new Array,iv:new Array};
if(obj.mode=="cbc")o.mode=obj.mode;if(obj.b64==true)o.b64=obj.b64;if(typeof obj.pass=="string"){if(obj.bits==128||obj.bits==192)bits=obj.bits;ki=AES.StringToKeyIv(obj.pass,bits);for(i=0;i<ki.key.length;i++)o.key[i]=ki.key[i];for(i=0;i<ki.iv.length;i++)o.iv[i]=ki.iv[i]}else{if(!(obj.key instanceof Array)||obj.key.length!=16&&obj.key.length!=24&&obj.key.length!=32){AESError("obj.key must be a byte array of length 16, 24, or 32");return null}for(i=0;i<obj.key.length;i++){if(typeof obj.key[i]!="number"){AESError("obj.key must be a byte array of length 16, 24, or 32");
return null}o.key[i]=obj.key[i]}if(o.mode=="cbc"){if(!(obj.iv instanceof Array)||obj.iv.length!=16){AESError("obj.iv must be a byte array of length 16");return null}for(i=0;i<obj.iv.length;i++){if(typeof obj.iv[i]!="number"){AESError("obj.iv must be a byte array of length 16");return null}o.iv[i]=obj.iv[i]}}}if(typeof obj.data=="string"){data=AES.StringToPaddedData(obj.data);for(i=0;i<data.length;i++)o.data[i]=data[i]}else{if(!(obj.data instanceof Array)||obj.data.length%16){AESError("obj.data must be a byte array with a multiple of 16 length ");
return null}for(i=0;i<obj.data.length;i++){if(typeof obj.data[i]!="number"){AESError("obj.data must be a byte array with a multiple of 16 length ");return null}o.data[i]=obj.data[i]}}o.round=AES.KeyExpansion(o.key);return o},CreateIV:function(ivsize){var result={"arr":[],"str":""};try{var crypt_obj=null;if(typeof window!="undefined"&&typeof window.crypto!="undefined")crypt_obj=window.crypto;else if(typeof window!="undefined"&&typeof window.msCrypto!="undefined")crypt_obj=window.msCrypto;if(typeof Uint8Array!=
"undefined"&&crypt_obj!=null&&typeof crypt_obj.getRandomValues!="undefined"){var aA=new Uint8Array(ivsize);crypt_obj.getRandomValues(aA);for(k=0;k<ivsize;++k){result["arr"][k]=parseInt(aA[k]);result["str"]+=String.fromCharCode(result["arr"][k])}return result}}catch(e){console.log(e)}for(k=0;k<ivsize;++k){result["arr"][k]=Math.floor(Math.random()*256);result["str"]+=String.fromCharCode(result["arr"][k])}return result},Encrypt:function(obj){var cipher=new Array;var input=new Array;var output;var i,
j;var roundKeys;var o;o=AES.Prepare(obj);if(o==null)return null;if(o.mode=="cbc")output=o.iv;for(j=0;j<o.data.length/16;j++){for(i=0;i<16;i++){input[i]=o.data[j*16+i];if(o.mode=="cbc")input[i]^=output[i]}output=AES.Cipher(input,o.round);for(i=0;i<16;i++)cipher[j*16+i]=output[i]}if(o.b64)cipher=AES.BytesToB64(cipher);return cipher},Decrypt:function(obj,quiet){var plain=new Array;var input=new Array;var copy=new Array;var output;var i,j;var roundKeys;var o;o=AES.Prepare(obj);if(o==null)return null;
if(o.b64)o.data=AES.B64ToBytes(obj.data);if(o.mode=="cbc")for(i=0;i<o.iv.length;i++)copy[i]=o.iv[i];for(j=0;j<o.data.length/16;j++){if(j>0&&o.mode=="cbc")for(i=0;i<16;i++)copy[i]=input[i];for(i=0;i<16;i++)input[i]=o.data[j*16+i];output=AES.InvCipher(input,o.round);for(i=0;i<16;i++){plain[j*16+i]=output[i];if(o.mode=="cbc")plain[j*16+i]^=copy[i]}}return AES.PaddedDataToString(plain,quiet)},bin2hex:function(s){if(null==s)return"";var len=s.length;var ret="";var c;var i=0;while(0<len--){c=s.charCodeAt(i++);
ret+=_bin2hex[(c&240)>>4];ret+=_bin2hex[c&15]}return ret},url2hex:function(s){if(null==s)return"";s=AES._utf8_encode(s);return AES.bin2hex(s)},hex2url:function(s){if(null==s)return"";s=AES._utf8_decode(s);return AES.hex2bin(s)},hex2bin:function(s){if(null==s)return"";var len=s.length;var ret="";var c1,c2;var h1,h2;var i=0;while(len>1){h1=s.charAt(i++);c1=h1.charCodeAt(0);h2=s.charAt(i++);c2=h2.charCodeAt(0);ret+=String.fromCharCode((_hex2bin[c1]<<4)+_hex2bin[c2]);len-=2}return ret},ok:function(s){return AES.okWithReason(s).result},
okWithReason:function(s){if(typeof s!=="string")return{result:false,reason:"input is not a string"};if(0==s.length)return{result:true};var reason="";if(s.length>=16){if(AES.isb64(s))return{result:true};else reason+="input is not base64";var matches=s.match(/^!([^|]*)\|(.*)$/);if(matches&&AES.isb64(matches[1])&&AES.isb64(matches[2]))return{result:true};else{if(reason)reason+=", ";reason+="input is not in base64 encrypted format"}}return{result:false,reason:reason}},isb64:function(s){var re=new RegExp("^[A-Za-z0-9+/=]+$");
if(s.match(re))return true;return false}}}();var g_lptoolbandcallalert=false;var g_lpusingnewtoolbar=null;var g_wr=false;var g_mc=false;function wrtoolbandcall(args,def){g_wr=true;if(typeof def=="undefined")return lptoolbandcall(args);return lptoolbandcall(args,def)}function lptoolbandcall(args,def){if(typeof args=="string")args=[args];return lptoolbandcallall(args,true,typeof def=="undefined"?"":def)}function lptoolbanderror(e){if(g_lptoolbandcallalert){g_lptoolbandcallalert=false;alert(__(e))}}
function lptoolbandcallall(args,ret0,ret0default){var error=null;var doret0=typeof ret0!="undefined"&&ret0?true:false;var def=typeof ret0default!="undefined"?ret0default:"";var jsarray=[];var tb=null;var errret=doret0?def:doret0?[0,def]:[];try{if(g_wr&&typeof wrtoolband=="object")tb=wrtoolband;else if(g_mc&&typeof mcafeetoolband=="object")tb=mcafeetoolband;else if(!g_wr&&typeof lptoolband=="object")tb=lptoolband;else{lptoolbanderror("Toolband is not an object");return errret}}catch(e){lptoolbanderror("Exception accessing toolband Z");
return errret}if(g_lpusingnewtoolbar==null)try{if(typeof tb.getpluginver!="undefined")g_lpusingnewtoolbar=false;else if(typeof tb.call!="undefined")g_lpusingnewtoolbar=true;else{lptoolbanderror("Failed to determine toolbar version");return errret}}catch(e){lptoolbanderror("Exception accessing toolband A");return errret}if(g_lpusingnewtoolbar){try{var o=tb.call(typeof args=="undefined"?[]:args);jsarray=(new VBArray(o)).toArray();if(typeof jsarray.length=="undefined"){lptoolbanderror("Toolband result is not an array");
return errret}else if(typeof jsarray[0]=="undefined"||jsarray[0]!="ok"){lptoolbanderror("Toolband result failed");return errret}else if(doret0&&typeof jsarray[1]=="undefined"){lptoolbanderror("Toolband did not return a value");return errret}else jsarray.splice(0,1)}catch(e){lptoolbanderror("Exception accessing toolband B");return errret}return doret0?jsarray[0]:jsarray}var cmd="";try{if(args.length>0){cmd=typeof args[0]=="undefined"?"":args[0];switch(cmd){case "call":return tb.call(args[1]);case "xhrsend":return tb.xhrsend(args[1],
args[2]);case "highlightfield":return tb.highlightfield(args[1],args[2]);case "lpdecie":return tb.lpdecie(args[1],args[2]);case "context":return tb.context(args[1]);case "getpluginver":return tb.getpluginver();case "editformfill":return tb.editformfill();case "addsecurenote":return tb.addsecurenote();case "isloggedin":return tb.isloggedin();case "getusername":return tb.getusername();case "openprefs":return tb.openprefs();case "login":return tb.login();case "logoff":return tb.logoff();case "getacctsversion":return tb.getacctsversion();
case "getinstalldir":return tb.getinstalldir();case "geturlprefix2":return tb.geturlprefix2();case "anysites":return tb.anysites();case "opensettings":return tb.opensettings();case "lpformsubmit":return tb.lpformsubmit(args[1],args[2]);case "atob":return tb.atob(args[1]);case "btoa":return tb.btoa(args[1]);case "lpxlat":return tb.lpxlat(args[1]);case "pageopensametab":return tb.pageopensametab();case "getidentities":return tb.getidentities();case "getcurridentity":return tb.getcurridentity();case "setcurridentity":return tb.setcurridentity(args[1]);
case "lpisp":return tb.lpisp();case "loginsesame":return tb.loginsesame(args[1],args[2]);case "opensharedfolders":return tb.opensharedfolders();case "isenterpriseuser":return tb.isenterpriseuser();case "getiehomedir":return tb.getinstalldir();default:lptoolbanderror("Invalid method.  method="+cmd);return errret}}else{lptoolbanderror("No arguments passed");return errret}}catch(e){lptoolbanderror("Exception accessing toolband C\nDetails:"+"\ncmd                  = "+cmd+"\nwr                   = "+
(g_wr?"1":"0")+"\ntoolbandstatus       = "+(typeof tb=="object"?"ok":"error")+"\nwrtoolbandstatus     = "+(typeof wrtoolband=="object"?"ok":"none")+"\nlptoolbandstatus     = "+(typeof lptoolband=="object"?"ok":"none")+"\ntoolbandmethodstatus = "+(typeof tb.lpdecie=="object"?"ok":"none")+"\nwrmethodstatus       = "+(typeof wrtoolband.lpdecie=="object"?"ok":"none")+"\nlpmethodstatus       = "+(typeof lptoolband.lpdecie=="object"?"ok":"none"));return errret}lptoolbanderror("A critical error occurred with the Browser Helper.\n\nError="+
error+"\n\nPlease report this error.");return errret};var lp_sha2lib=SHA256lib();function SHA256(s,binary){return lp_sha2lib.sha256(s,binary)}function SHA256_crypt(s){var salt=rand_str(16);return lp_sha2lib.crypt_sha256(s,salt,5E3,null)}function ab2bin(buf){var chunkSize=1024;var bytes=new Uint8Array(buf);var result="";for(var i=0;i<Math.ceil(buf.byteLength/chunkSize);i++)result+=String.fromCharCode.apply(null,bytes.slice(i*chunkSize,chunkSize*(i+1)));return result}
function bin2ab(str){var buf=new ArrayBuffer(str.length);var bufView=new Uint8Array(buf);for(var i=0;i<str.length;++i)bufView[i]=str.charCodeAt(i);return buf}
function lp_pbkdf2_sync(password,salt,num_iterations,num_bytes,callback){if(typeof document!="undefined"&&document.getElementById("lpplugin")&&typeof document.getElementById("lpplugin").pbkdf2=="function"){var retval=document.getElementById("lpplugin").pbkdf2(btoa(password),btoa(salt),num_iterations,num_bytes);if(typeof callback=="function")callback(AES.hex2bin(retval),password,num_iterations);return retval}else if((typeof g_oldpbkdf2=="undefined"||g_oldpbkdf2!=1)&&typeof lpusexpcomencrypt=="function"&&
lpusexpcomencrypt()&&typeof lpxpcomobj.pbkdf2=="function"){var retval=lpxpcomobj.pbkdf2(btoa(password),btoa(salt),num_iterations,num_bytes);if(typeof callback=="function")callback(AES.hex2bin(retval),password,num_iterations);return retval}else if((typeof g_oldpbkdf2=="undefined"||g_oldpbkdf2!=1)&&typeof lpuseopensslpbkdf2=="function"&&lpuseopensslpbkdf2()&&typeof lpopensslpbkdf2=="function"){var retval=lpopensslpbkdf2(password,salt,num_iterations,num_bytes);if(typeof callback=="function")callback(AES.hex2bin(retval),
password,num_iterations);return retval}else if((typeof g_oldpbkdf2=="undefined"||g_oldpbkdf2!=1)&&typeof have_pplastpass=="function"&&have_pplastpass()&&typeof callback=="function")return pplastpass_send_message({cmd:"pbkdf2",password:btoa(password),salt:btoa(salt),num_iterations:parseInt(num_iterations),num_bytes:num_bytes},function(retval){callback(AES.hex2bin(retval),password,num_iterations)});else if(typeof lptoolband!="undefined"&&typeof lptoolbandcall!="undefined"){var retval=lptoolbandcall(["lppbkdf2",
btoa(password),btoa(salt),parseInt(num_iterations),num_bytes]);if(typeof retval!="string"||retval.length==0)return lp_sha2lib.pbkdf2(password,salt,num_iterations,num_bytes,callback);if(typeof callback=="function")callback(AES.hex2bin(retval),password,num_iterations);return retval}else return lp_sha2lib.pbkdf2(password,salt,num_iterations,num_bytes,callback)}
function lp_pbkdf2(password,salt,num_iterations,num_bytes,callback){if(callback&&typeof crypto!=="undefined"&&crypto.subtle&&crypto.subtle.importKey&&crypto.subtle.deriveKey&&crypto.subtle.exportKey)var keyPromise=crypto.subtle.importKey("raw",bin2ab(password),{name:"PBKDF2"},false,["deriveBits","deriveKey"]).then(function(key){return crypto.subtle.deriveKey({name:"PBKDF2",salt:bin2ab(salt),iterations:parseInt(num_iterations,10),hash:"SHA-256"},key,{name:"AES-CBC",length:256},true,["encrypt","decrypt"])}).then(function(key){return crypto.subtle.exportKey("raw",
key)}).then(function(buffer){callback(ab2bin(buffer),password,num_iterations)}).catch(function(){lp_pbkdf2_sync(password,salt,num_iterations,num_bytes,callback)});else return lp_pbkdf2_sync(password,salt,num_iterations,num_bytes,callback)}
function SHA256lib(){function Utf8Encode(string){if(string==null)string="";string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128)utftext+=String.fromCharCode(c);else if(c>127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128)}else{utftext+=String.fromCharCode(c>>12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128)}}return utftext}function b64FromBytes(b2,b1,b0,
n){var chars="./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var w=b2<<16|b1<<8|b0;out="";for(var i=0;i<n;i++){out+=chars.charAt(w&63);w=w>>>6}return out}return{sha256:function(s,binary){s=Utf8Encode(s);var s_bytes=[];for(var i=0;i<s.length;i++)s_bytes[i]=s.charCodeAt(i);s=sjcl.codec.bytes.toBits(s_bytes);var bin_hash=sjcl.hash.sha256.hash(s,s.length*8);if(typeof binary!="undefined"&&true==binary){var bytes=sjcl.codec.bytes.fromBits(bin_hash);var u32s=[];for(var i=0;i<bytes.length/
4;i++)u32s[i]=bytes[4*i]<<24|bytes[4*i+1]<<16|bytes[4*i+2]<<8|bytes[4*i+3];return u32s}return sjcl.codec.hex.fromBits(bin_hash)},sha512:function(s){var s_bytes=[];for(var i=0;i<s.length;i++)s_bytes[i]=s.charCodeAt(i);s=sjcl.codec.bytes.toBits(s_bytes);var bin_hash=sjcl.hash.sha512.hash(s,s.length*8);return sjcl.codec.hex.fromBits(bin_hash)},crypt_sha256:function(password,salt,num_iterations,callback){var pw_bytes=[],salt_bytes=[];if(salt.length>16)salt=salt.substr(0,16);if(num_iterations<1E3)num_iterations=
1E3;for(var i=0;i<password.length;i++)pw_bytes[i]=password.charCodeAt(i);for(i=0;i<salt.length;i++)salt_bytes[i]=salt.charCodeAt(i);password_bits=sjcl.codec.bytes.toBits(pw_bytes);salt_bits=sjcl.codec.bytes.toBits(salt_bytes);var digestA=new sjcl.hash.sha256;digestA.update(password_bits);digestA.update(salt_bits);var digestB=new sjcl.hash.sha256;digestB.update(password_bits);digestB.update(salt_bits);digestB.update(password_bits);var digestBFinal=digestB.finalize();var cnt;for(cnt=password.length;cnt>
32;cnt-=32)digestA.update(digestBFinal);digestA.update(sjcl.bitArray.bitSlice(digestBFinal,0,cnt*8));for(cnt=password.length;cnt>0;cnt>>=1)if((cnt&1)!==0)digestA.update(digestBFinal);else digestA.update(password_bits);var digestAFinal=digestA.finalize();var digestDP=new sjcl.hash.sha256;for(cnt=0;cnt<password.length;cnt++)digestDP.update(password_bits);var digestDPFinal=digestDP.finalize();var p=[];for(cnt=password.length;cnt>=32;cnt-=32)p=sjcl.bitArray.concat(p,digestDPFinal);p=sjcl.bitArray.concat(p,
sjcl.bitArray.bitSlice(digestDPFinal,0,cnt*8));var digestDS=new sjcl.hash.sha256;for(cnt=0;cnt<16+sjcl.bitArray.extract(digestAFinal,0,8);cnt++)digestDS.update(salt_bits);var digestDSFinal=digestDS.finalize();var s=[];for(cnt=salt.length;cnt>=32;cnt-=32)s=sjcl.bitArray.concat(s,digestDSFinal);s=sjcl.bitArray.concat(s,sjcl.bitArray.bitSlice(digestDSFinal,0,cnt*8));for(cnt=0;cnt<num_iterations;cnt++){var digestC=new sjcl.hash.sha256;if((cnt&1)===1)digestC.update(p);else digestC.update(digestAFinal);
if(cnt%3!==0)digestC.update(s);if(cnt%7!==0)digestC.update(p);if((cnt&1)===1)digestC.update(digestAFinal);else digestC.update(p);digestAFinal=digestC.finalize()}var result="$5$";if(num_iterations!=5E3)result+="rounds="+num_iterations+"$";result+=salt+"$";var b=sjcl.codec.bytes.fromBits(digestAFinal);result+=b64FromBytes(b[0],b[10],b[20],4);result+=b64FromBytes(b[21],b[1],b[11],4);result+=b64FromBytes(b[12],b[22],b[2],4);result+=b64FromBytes(b[3],b[13],b[23],4);result+=b64FromBytes(b[24],b[4],b[14],
4);result+=b64FromBytes(b[15],b[25],b[5],4);result+=b64FromBytes(b[6],b[16],b[26],4);result+=b64FromBytes(b[27],b[7],b[17],4);result+=b64FromBytes(b[18],b[28],b[8],4);result+=b64FromBytes(b[9],b[19],b[29],4);result+=b64FromBytes(0,b[31],b[30],3);if(typeof callback==="function"){callback(result);return}return result},pbkdf2:function(password,salt,num_iterations,num_bytes,callback){var pw_bytes=[],salt_bytes=[];for(var i=0;i<password.length;i++)pw_bytes[i]=password.charCodeAt(i);for(var i=0;i<salt.length;i++)salt_bytes[i]=
salt.charCodeAt(i);password=sjcl.codec.bytes.toBits(pw_bytes);salt=sjcl.codec.bytes.toBits(salt_bytes);var bin_result=sjcl.misc.pbkdf2(password,salt,num_iterations,num_bytes*8,null,callback,null);if(typeof callback==="function")return;var hex_result=sjcl.codec.hex.fromBits(bin_result);return hex_result},utf8encode:function(s){return Utf8Encode(s)}}};var sjcl={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(message){this.toString=function(){return"CORRUPT: "+this.message};this.message=message},invalid:function(message){this.toString=function(){return"INVALID: "+this.message};this.message=message},bug:function(message){this.toString=function(){return"BUG: "+this.message};this.message=message},notReady:function(message){this.toString=function(){return"NOT READY: "+this.message};this.message=message}}};
if(typeof module!=="undefined"&&module.exports)module.exports=sjcl;if(typeof define==="function")define([],function(){return sjcl});
sjcl.bitArray={bitSlice:function(a,bstart,bend){a=sjcl.bitArray._shiftRight(a.slice(bstart/32),32-(bstart&31)).slice(1);return bend===undefined?a:sjcl.bitArray.clamp(a,bend-bstart)},extract:function(a,bstart,blength){var x,sh=Math.floor(-bstart-blength&31);if((bstart+blength-1^bstart)&-32)x=a[bstart/32|0]<<32-sh^a[bstart/32+1|0]>>>sh;else x=a[bstart/32|0]>>>sh;return x&(1<<blength)-1},concat:function(a1,a2){if(a1.length===0||a2.length===0)return a1.concat(a2);var last=a1[a1.length-1],shift=sjcl.bitArray.getPartial(last);
if(shift===32)return a1.concat(a2);else return sjcl.bitArray._shiftRight(a2,shift,last|0,a1.slice(0,a1.length-1))},bitLength:function(a){var l=a.length,x;if(l===0)return 0;x=a[l-1];return(l-1)*32+sjcl.bitArray.getPartial(x)},clamp:function(a,len){if(a.length*32<len)return a;a=a.slice(0,Math.ceil(len/32));var l=a.length;len=len&31;if(l>0&&len)a[l-1]=sjcl.bitArray.partial(len,a[l-1]&2147483648>>len-1,1);return a},partial:function(len,x,_end){if(len===32)return x;return(_end?x|0:x<<32-len)+len*1099511627776},
getPartial:function(x){return Math.round(x/1099511627776)||32},equal:function(a,b){if(sjcl.bitArray.bitLength(a)!==sjcl.bitArray.bitLength(b))return false;var x=0,i;for(i=0;i<a.length;i++)x|=a[i]^b[i];return x===0},_shiftRight:function(a,shift,carry,out){var i,last2=0,shift2;if(out===undefined)out=[];for(;shift>=32;shift-=32){out.push(carry);carry=0}if(shift===0)return out.concat(a);for(i=0;i<a.length;i++){out.push(carry|a[i]>>>shift);carry=a[i]<<32-shift}last2=a.length?a[a.length-1]:0;shift2=sjcl.bitArray.getPartial(last2);
out.push(sjcl.bitArray.partial(shift+shift2&31,shift+shift2>32?carry:out.pop(),1));return out},_xor4:function(x,y){return[x[0]^y[0],x[1]^y[1],x[2]^y[2],x[3]^y[3]]},byteswapM:function(a){var i,v,m=65280;for(i=0;i<a.length;++i){v=a[i];a[i]=v>>>24|v>>>8&m|(v&m)<<8|v<<24}return a}};
sjcl.codec.utf8String={fromBits:function(arr){var out="",bl=sjcl.bitArray.bitLength(arr),i,tmp;for(i=0;i<bl/8;i++){if((i&3)===0)tmp=arr[i/4];out+=String.fromCharCode(tmp>>>24);tmp<<=8}return decodeURIComponent(escape(out))},toBits:function(str){str=unescape(encodeURIComponent(str));var out=[],i,tmp=0;for(i=0;i<str.length;i++){tmp=tmp<<8|str.charCodeAt(i);if((i&3)===3){out.push(tmp);tmp=0}}if(i&3)out.push(sjcl.bitArray.partial(8*(i&3),tmp));return out}};
sjcl.codec.hex={fromBits:function(arr){var out="",i;for(i=0;i<arr.length;i++)out+=((arr[i]|0)+0xf00000000000).toString(16).substr(4);return out.substr(0,sjcl.bitArray.bitLength(arr)/4)},toBits:function(str){var i,out=[],len;str=str.replace(/\s|0x/g,"");len=str.length;str=str+"00000000";for(i=0;i<str.length;i+=8)out.push(parseInt(str.substr(i,8),16)^0);return sjcl.bitArray.clamp(out,len*4)}};
sjcl.codec.base64={_chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(arr,_noEquals,_url){var out="",i,bits=0,c=sjcl.codec.base64._chars,ta=0,bl=sjcl.bitArray.bitLength(arr);if(_url)c=c.substr(0,62)+"-_";for(i=0;out.length*6<bl;){out+=c.charAt((ta^arr[i]>>>bits)>>>26);if(bits<6){ta=arr[i]<<6-bits;bits+=26;i++}else{ta<<=6;bits-=6}}while(out.length&3&&!_noEquals)out+="=";return out},toBits:function(str,_url){str=str.replace(/\s|=/g,"");var out=[],i,bits=0,c=
sjcl.codec.base64._chars,ta=0,x;if(_url)c=c.substr(0,62)+"-_";for(i=0;i<str.length;i++){x=c.indexOf(str.charAt(i));if(x<0)throw new sjcl.exception.invalid("this isn't base64!");if(bits>26){bits-=26;out.push(ta^x>>>bits);ta=x<<32-bits}else{bits+=6;ta^=x<<32-bits}}if(bits&56)out.push(sjcl.bitArray.partial(bits&56,ta,1));return out}};sjcl.codec.base64url={fromBits:function(arr){return sjcl.codec.base64.fromBits(arr,1,1)},toBits:function(str){return sjcl.codec.base64.toBits(str,1)}};
sjcl.codec.bytes={fromBits:function(arr){var out=[],bl=sjcl.bitArray.bitLength(arr),i,tmp;for(i=0;i<bl/8;i++){if((i&3)===0)tmp=arr[i/4];out.push(tmp>>>24);tmp<<=8}return out},toBits:function(bytes){var out=[],i,tmp=0;for(i=0;i<bytes.length;i++){tmp=tmp<<8|bytes[i];if((i&3)===3){out.push(tmp);tmp=0}}if(i&3)out.push(sjcl.bitArray.partial(8*(i&3),tmp));return out}};
sjcl.hash.sha256=function(hash){if(!this._key[0])this._precompute();if(hash){this._h=hash._h.slice(0);this._buffer=hash._buffer.slice(0);this._length=hash._length}else this.reset()};sjcl.hash.sha256.hash=function(data){return(new sjcl.hash.sha256).update(data).finalize()};
sjcl.hash.sha256.prototype={blockSize:512,reset:function(){this._h=this._init.slice(0);this._buffer=[];this._length=0;return this},update:function(data){if(typeof data==="string")data=sjcl.codec.utf8String.toBits(data);var i,b=this._buffer=sjcl.bitArray.concat(this._buffer,data),ol=this._length,nl=this._length=ol+sjcl.bitArray.bitLength(data);for(i=512+ol&-512;i<=nl;i+=512)this._block(b.splice(0,16));return this},finalize:function(){var i,b=this._buffer,h=this._h;b=sjcl.bitArray.concat(b,[sjcl.bitArray.partial(1,
1)]);for(i=b.length+2;i&15;i++)b.push(0);b.push(Math.floor(this._length/4294967296));b.push(this._length|0);while(b.length)this._block(b.splice(0,16));this.reset();return h},_init:[],_key:[],_precompute:function(){var i=0,prime=2,factor;function frac(x){return(x-Math.floor(x))*4294967296|0}outer:for(;i<64;prime++){for(factor=2;factor*factor<=prime;factor++)if(prime%factor===0)continue outer;if(i<8)this._init[i]=frac(Math.pow(prime,1/2));this._key[i]=frac(Math.pow(prime,1/3));i++}},_block:function(words){var i,
tmp,a,b,w=words.slice(0),h=this._h,k=this._key,h0=h[0],h1=h[1],h2=h[2],h3=h[3],h4=h[4],h5=h[5],h6=h[6],h7=h[7];for(i=0;i<64;i++){if(i<16)tmp=w[i];else{a=w[i+1&15];b=w[i+14&15];tmp=w[i&15]=(a>>>7^a>>>18^a>>>3^a<<25^a<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+w[i&15]+w[i+9&15]|0}tmp=tmp+h7+(h4>>>6^h4>>>11^h4>>>25^h4<<26^h4<<21^h4<<7)+(h6^h4&(h5^h6))+k[i];h7=h6;h6=h5;h5=h4;h4=h3+tmp|0;h3=h2;h2=h1;h1=h0;h0=tmp+(h1&h2^h3&(h1^h2))+(h1>>>2^h1>>>13^h1>>>22^h1<<30^h1<<19^h1<<10)|0}h[0]=h[0]+h0|0;h[1]=h[1]+h1|
0;h[2]=h[2]+h2|0;h[3]=h[3]+h3|0;h[4]=h[4]+h4|0;h[5]=h[5]+h5|0;h[6]=h[6]+h6|0;h[7]=h[7]+h7|0}};sjcl.hash.sha512=function(hash){if(!this._key[0])this._precompute();if(hash){this._h=hash._h.slice(0);this._buffer=hash._buffer.slice(0);this._length=hash._length}else this.reset()};sjcl.hash.sha512.hash=function(data){return(new sjcl.hash.sha512).update(data).finalize()};
sjcl.hash.sha512.prototype={blockSize:1024,reset:function(){this._h=this._init.slice(0);this._buffer=[];this._length=0;return this},update:function(data){if(typeof data==="string")data=sjcl.codec.utf8String.toBits(data);var i,b=this._buffer=sjcl.bitArray.concat(this._buffer,data),ol=this._length,nl=this._length=ol+sjcl.bitArray.bitLength(data);for(i=1024+ol&-1024;i<=nl;i+=1024)this._block(b.splice(0,32));return this},finalize:function(){var i,b=this._buffer,h=this._h;b=sjcl.bitArray.concat(b,[sjcl.bitArray.partial(1,
1)]);for(i=b.length+4;i&31;i++)b.push(0);b.push(0);b.push(0);b.push(Math.floor(this._length/4294967296));b.push(this._length|0);while(b.length)this._block(b.splice(0,32));this.reset();return h},_init:[],_initr:[12372232,13281083,9762859,1914609,15106769,4090911,4308331,8266105],_key:[],_keyr:[2666018,15689165,5061423,9034684,4764984,380953,1658779,7176472,197186,7368638,14987916,16757986,8096111,1480369,13046325,6891156,15813330,5187043,9229749,11312229,2818677,10937475,4324308,1135541,6741931,11809296,
16458047,15666916,11046850,698149,229999,945776,13774844,2541862,12856045,9810911,11494366,7844520,15576806,8533307,15795044,4337665,16291729,5553712,15684120,6662416,7413802,12308920,13816008,4303699,9366425,10176680,13195875,4295371,6546291,11712675,15708924,1519456,15772530,6568428,6495784,8568297,13007125,7492395,2515356,12632583,14740254,7262584,1535930,13146278,16321966,1853211,294276,13051027,13221564,1051980,4080310,6651434,14088940,4675607],_precompute:function(){var i=0,prime=2,factor;function frac(x){return(x-
Math.floor(x))*4294967296|0}function frac2(x){return(x-Math.floor(x))*1099511627776&255}outer:for(;i<80;prime++){for(factor=2;factor*factor<=prime;factor++)if(prime%factor===0)continue outer;if(i<8){this._init[i*2]=frac(Math.pow(prime,1/2));this._init[i*2+1]=frac2(Math.pow(prime,1/2))<<24|this._initr[i]}this._key[i*2]=frac(Math.pow(prime,1/3));this._key[i*2+1]=frac2(Math.pow(prime,1/3))<<24|this._keyr[i];i++}},_block:function(words){var i,wrh,wrl,w=words.slice(0),h=this._h,k=this._key,h0h=h[0],h0l=
h[1],h1h=h[2],h1l=h[3],h2h=h[4],h2l=h[5],h3h=h[6],h3l=h[7],h4h=h[8],h4l=h[9],h5h=h[10],h5l=h[11],h6h=h[12],h6l=h[13],h7h=h[14],h7l=h[15];var ah=h0h,al=h0l,bh=h1h,bl=h1l,ch=h2h,cl=h2l,dh=h3h,dl=h3l,eh=h4h,el=h4l,fh=h5h,fl=h5l,gh=h6h,gl=h6l,hh=h7h,hl=h7l;for(i=0;i<80;i++){if(i<16){wrh=w[i*2];wrl=w[i*2+1]}else{var gamma0xh=w[(i-15)*2];var gamma0xl=w[(i-15)*2+1];var gamma0h=(gamma0xl<<31|gamma0xh>>>1)^(gamma0xl<<24|gamma0xh>>>8)^gamma0xh>>>7;var gamma0l=(gamma0xh<<31|gamma0xl>>>1)^(gamma0xh<<24|gamma0xl>>>
8)^(gamma0xh<<25|gamma0xl>>>7);var gamma1xh=w[(i-2)*2];var gamma1xl=w[(i-2)*2+1];var gamma1h=(gamma1xl<<13|gamma1xh>>>19)^(gamma1xh<<3|gamma1xl>>>29)^gamma1xh>>>6;var gamma1l=(gamma1xh<<13|gamma1xl>>>19)^(gamma1xl<<3|gamma1xh>>>29)^(gamma1xh<<26|gamma1xl>>>6);var wr7h=w[(i-7)*2];var wr7l=w[(i-7)*2+1];var wr16h=w[(i-16)*2];var wr16l=w[(i-16)*2+1];wrl=gamma0l+wr7l;wrh=gamma0h+wr7h+(wrl>>>0<gamma0l>>>0?1:0);wrl+=gamma1l;wrh+=gamma1h+(wrl>>>0<gamma1l>>>0?1:0);wrl+=wr16l;wrh+=wr16h+(wrl>>>0<wr16l>>>0?
1:0)}w[i*2]=wrh|=0;w[i*2+1]=wrl|=0;var chh=eh&fh^~eh&gh;var chl=el&fl^~el&gl;var majh=ah&bh^ah&ch^bh&ch;var majl=al&bl^al&cl^bl&cl;var sigma0h=(al<<4|ah>>>28)^(ah<<30|al>>>2)^(ah<<25|al>>>7);var sigma0l=(ah<<4|al>>>28)^(al<<30|ah>>>2)^(al<<25|ah>>>7);var sigma1h=(el<<18|eh>>>14)^(el<<14|eh>>>18)^(eh<<23|el>>>9);var sigma1l=(eh<<18|el>>>14)^(eh<<14|el>>>18)^(el<<23|eh>>>9);var krh=k[i*2];var krl=k[i*2+1];var t1l=hl+sigma1l;var t1h=hh+sigma1h+(t1l>>>0<hl>>>0?1:0);t1l+=chl;t1h+=chh+(t1l>>>0<chl>>>0?
1:0);t1l+=krl;t1h+=krh+(t1l>>>0<krl>>>0?1:0);t1l+=wrl;t1h+=wrh+(t1l>>>0<wrl>>>0?1:0);var t2l=sigma0l+majl;var t2h=sigma0h+majh+(t2l>>>0<sigma0l>>>0?1:0);hh=gh;hl=gl;gh=fh;gl=fl;fh=eh;fl=el;el=dl+t1l|0;eh=dh+t1h+(el>>>0<dl>>>0?1:0)|0;dh=ch;dl=cl;ch=bh;cl=bl;bh=ah;bl=al;al=t1l+t2l|0;ah=t1h+t2h+(al>>>0<t1l>>>0?1:0)|0}h0l=h[1]=h0l+al|0;h[0]=h0h+ah+(h0l>>>0<al>>>0?1:0)|0;h1l=h[3]=h1l+bl|0;h[2]=h1h+bh+(h1l>>>0<bl>>>0?1:0)|0;h2l=h[5]=h2l+cl|0;h[4]=h2h+ch+(h2l>>>0<cl>>>0?1:0)|0;h3l=h[7]=h3l+dl|0;h[6]=h3h+
dh+(h3l>>>0<dl>>>0?1:0)|0;h4l=h[9]=h4l+el|0;h[8]=h4h+eh+(h4l>>>0<el>>>0?1:0)|0;h5l=h[11]=h5l+fl|0;h[10]=h5h+fh+(h5l>>>0<fl>>>0?1:0)|0;h6l=h[13]=h6l+gl|0;h[12]=h6h+gh+(h6l>>>0<gl>>>0?1:0)|0;h7l=h[15]=h7l+hl|0;h[14]=h7h+hh+(h7l>>>0<hl>>>0?1:0)|0}};
sjcl.misc.hmac=function(key,Hash){this._hash=Hash=Hash||sjcl.hash.sha256;var exKey=[[],[]],i,bs=Hash.prototype.blockSize/32;this._baseHash=[new Hash,new Hash];if(key.length>bs)key=Hash.hash(key);for(i=0;i<bs;i++){exKey[0][i]=key[i]^909522486;exKey[1][i]=key[i]^1549556828}this._baseHash[0].update(exKey[0]);this._baseHash[1].update(exKey[1]);this._resultHash=new Hash(this._baseHash[0])};
sjcl.misc.hmac.prototype.encrypt=sjcl.misc.hmac.prototype.mac=function(data){if(!this._updated){this.update(data);return this.digest(data)}else throw new sjcl.exception.invalid("encrypt on already updated hmac called!");};sjcl.misc.hmac.prototype.reset=function(){this._resultHash=new this._hash(this._baseHash[0]);this._updated=false};sjcl.misc.hmac.prototype.update=function(data){this._updated=true;this._resultHash.update(data)};
sjcl.misc.hmac.prototype.digest=function(){var w=this._resultHash.finalize(),result=(new this._hash(this._baseHash[1])).update(w).finalize();this.reset();return result};
sjcl.misc.pbkdf2=function(password,salt,count,length,Prff,callback,cache){count=count||1E3;if(length<0||count<0)throw sjcl.exception.invalid("invalid params to pbkdf2");if(typeof password==="string")password=sjcl.codec.utf8String.toBits(password);if(typeof salt==="string")salt=sjcl.codec.utf8String.toBits(salt);Prff=Prff||sjcl.misc.hmac;var prf,u,ui,i,j,k,out,b;var reenter=false;if(cache!=null){k=cache.k;i=cache.i;ui=cache.ui;u=cache.u;prf=cache.prf;b=cache.b;out=cache.out;reenter=true}else{cache=
{};prf=new Prff(password);k=1;out=[];b=sjcl.bitArray}for(;32*out.length<(length||1);k++){if(!reenter){u=ui=prf.encrypt(b.concat(salt,[k]));i=1}reenter=false;for(;i<count;i++){ui=prf.encrypt(ui);for(j=0;j<ui.length;j++)u[j]^=ui[j];if(i<count&&i%200==0&&typeof callback==="function"){cache.k=k;cache.i=i+1;cache.u=u;cache.ui=ui;cache.prf=prf;cache.b=b;cache.out=out;setTimeout(function(){sjcl.misc.pbkdf2(password,salt,count,length,Prff,callback,cache)},0);return null}}out=out.concat(u)}if(length)out=b.clamp(out,
length);if(typeof callback==="function"){var hex_result=sjcl.codec.hex.fromBits(out);var binstr=AES.hex2bin(hex_result);var pwbytes=sjcl.codec.bytes.fromBits(password);var pwstr="";for(var i=0;i<pwbytes.length;i++)pwstr+=String.fromCharCode(pwbytes[i]);callback(binstr,pwstr,count)}return out};
//# sourceMappingURL=all_jquery_3_6_1.js.map