// @tag core
// @define Ext.Boot
var Ext = Ext || {};
//<editor-fold desc="Boot">
/**
 * @class Ext.Boot
 * @singleton
 * @private
 */
Ext.Boot = Ext.Boot || (function(emptyFn) {
    var doc = document,
        _emptyArray = [],
        _config = {
            /**
             * @cfg {Boolean} [disableCaching=true]
             * If `true` current timestamp is added to script URL's to prevent caching.
             * In debug builds, adding a "cache" or "disableCacheBuster" query parameter
             * to the page's URL will set this to `false`.
             */
            disableCaching: (/[?&](?:cache|disableCacheBuster)\b/i.test(location.search) || !(/http[s]?\:/i.test(location.href)) || /(^|[ ;])ext-cache=1/.test(doc.cookie)) ? false : true,
            /**
             * @cfg {String} [disableCachingParam="_dc"]
             * The query parameter name for the cache buster's timestamp.
             */
            disableCachingParam: '_dc',
            /**
             * @cfg {Boolean} loadDelay
             * Millisecond delay between asynchronous script injection (prevents stack
             * overflow on some user agents) 'false' disables delay but potentially
             * increases stack load.
             */
            loadDelay: false,
            /**
             * @cfg {Boolean} preserveScripts
             * `false` to remove asynchronously loaded scripts, `true` to retain script
             * element for browser debugger compatibility and improved load performance.
             */
            preserveScripts: true,
            /**
             * @cfg {String} [charset=UTF-8]
             * Optional charset to specify encoding of dynamic content.
             */
            charset: 'UTF-8'
        },
        _assetConfig = {},
        cssRe = /\.css(?:\?|$)/i,
        resolverEl = doc.createElement('a'),
        isBrowser = typeof window !== 'undefined',
        _environment = {
            browser: isBrowser,
            node: !isBrowser && (typeof require === 'function'),
            phantom: (window && (window._phantom || window.callPhantom)) || /PhantomJS/.test(window.navigator.userAgent)
        },
        _tags = (Ext.platformTags = {}),
        // All calls to _debug are commented out to speed up old browsers a bit;
        // yes that makes a difference because the cost of concatenating strings
        // and passing them into _debug() adds up pretty quickly.
        _debug = function(message) {},
        //console.log(message);
        _apply = function(object, config, defaults) {
            if (defaults) {
                _apply(object, defaults);
            }
            if (object && config && typeof config === 'object') {
                for (var i in config) {
                    object[i] = config[i];
                }
            }
            return object;
        },
        _merge = function() {
            var lowerCase = false,
                obj = Array.prototype.shift.call(arguments),
                index, i, len, value;
            if (typeof arguments[arguments.length - 1] === 'boolean') {
                lowerCase = Array.prototype.pop.call(arguments);
            }
            len = arguments.length;
            for (index = 0; index < len; index++) {
                value = arguments[index];
                if (typeof value === 'object') {
                    for (i in value) {
                        obj[lowerCase ? i.toLowerCase() : i] = value[i];
                    }
                }
            }
            return obj;
        },
        _getKeys = (typeof Object.keys == 'function') ? function(object) {
            if (!object) {
                return [];
            }
            return Object.keys(object);
        } : function(object) {
            var keys = [],
                property;
            for (property in object) {
                if (object.hasOwnProperty(property)) {
                    keys.push(property);
                }
            }
            return keys;
        },
        /*
     * The Boot loader class manages Request objects that contain one or
     * more individual urls that need to be loaded.  Requests can be performed
     * synchronously or asynchronously, but will always evaluate urls in the
     * order specified on the request object.
     */
        Boot = {
            loading: 0,
            loaded: 0,
            apply: _apply,
            env: _environment,
            config: _config,
            /**
             * @cfg {Object} assetConfig
             * A map (url->assetConfig) that contains information about assets loaded by the Microlaoder.
             */
            assetConfig: _assetConfig,
            // Keyed by absolute URL this object holds "true" if that URL is already loaded
            // or an array of callbacks to call once it loads.
            scripts: {},
            /*
                 Entry objects

                 'http://foo.com/bar/baz/Thing.js': {
                 done: true,
                 el: scriptEl || linkEl,
                 preserve: true,
                 requests: [ request1, ... ]
                 }
                 */
            /**
             * contains the current script name being loaded
             * (loadSync or sequential load only)
             */
            currentFile: null,
            suspendedQueue: [],
            currentRequest: null,
            // when loadSync is called, need to cause subsequent load requests to also be loadSync,
            // eg, when Ext.require(...) is called
            syncMode: false,
            /*
             * simple helper method for debugging
             */
            debug: _debug,
            /**
             * enables / disables loading scripts via script / link elements rather
             * than using ajax / eval
             */
            useElements: true,
            listeners: [],
            Request: Request,
            Entry: Entry,
            allowMultipleBrowsers: false,
            browserNames: {
                ie: 'IE',
                firefox: 'Firefox',
                safari: 'Safari',
                chrome: 'Chrome',
                opera: 'Opera',
                dolfin: 'Dolfin',
                edge: 'Edge',
                webosbrowser: 'webOSBrowser',
                chromeMobile: 'ChromeMobile',
                chromeiOS: 'ChromeiOS',
                silk: 'Silk',
                other: 'Other'
            },
            osNames: {
                ios: 'iOS',
                android: 'Android',
                windowsPhone: 'WindowsPhone',
                webos: 'webOS',
                blackberry: 'BlackBerry',
                rimTablet: 'RIMTablet',
                mac: 'MacOS',
                win: 'Windows',
                tizen: 'Tizen',
                linux: 'Linux',
                bada: 'Bada',
                chromeOS: 'ChromeOS',
                other: 'Other'
            },
            browserPrefixes: {
                ie: 'MSIE ',
                edge: 'Edge/',
                firefox: 'Firefox/',
                chrome: 'Chrome/',
                safari: 'Version/',
                opera: 'OPR/',
                dolfin: 'Dolfin/',
                webosbrowser: 'wOSBrowser/',
                chromeMobile: 'CrMo/',
                chromeiOS: 'CriOS/',
                silk: 'Silk/'
            },
            // When a UA reports multiple browsers this list is used to prioritize the 'real' browser
            // lower index number will win
            browserPriority: [
                'edge',
                'opera',
                'dolfin',
                'webosbrowser',
                'silk',
                'chromeiOS',
                'chromeMobile',
                'ie',
                'firefox',
                'safari',
                'chrome'
            ],
            osPrefixes: {
                tizen: '(Tizen )',
                ios: 'i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ',
                android: '(Android |HTC_|Silk/)',
                // Some HTC devices ship with an OSX userAgent by default,
                // so we need to add a direct check for HTC_
                windowsPhone: 'Windows Phone ',
                blackberry: '(?:BlackBerry|BB)(?:.*)Version/',
                rimTablet: 'RIM Tablet OS ',
                webos: '(?:webOS|hpwOS)/',
                bada: 'Bada/',
                chromeOS: 'CrOS '
            },
            fallbackOSPrefixes: {
                windows: 'win',
                mac: 'mac',
                linux: 'linux'
            },
            devicePrefixes: {
                iPhone: 'iPhone',
                iPod: 'iPod',
                iPad: 'iPad'
            },
            maxIEVersion: 12,
            /**
             * The default function that detects various platforms and sets tags
             * in the platform map accordingly.  Examples are iOS, android, tablet, etc.
             * @param tags the set of tags to populate
             */
            detectPlatformTags: function() {
                var me = this,
                    ua = navigator.userAgent,
                    isMobile = /Mobile(\/|\s)/.test(ua),
                    element = document.createElement('div'),
                    isEventSupported = function(name, tag) {
                        if (tag === undefined) {
                            tag = window;
                        }
                        var eventName = 'on' + name.toLowerCase(),
                            isSupported = (eventName in element);
                        if (!isSupported) {
                            if (element.setAttribute && element.removeAttribute) {
                                element.setAttribute(eventName, '');
                                isSupported = typeof element[eventName] === 'function';
                                if (typeof element[eventName] !== 'undefined') {
                                    element[eventName] = undefined;
                                }
                                element.removeAttribute(eventName);
                            }
                        }
                        return isSupported;
                    },
                    // Browser Detection
                    getBrowsers = function() {
                        var browsers = {},
                            maxIEVersion, prefix, value, key, index, len, match, version, matched;
                        // MS Edge browser (and possibly others) can report multiple browsers in the UserAgent
                        // "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240"
                        // we use this to prioritize the actual browser in this situation
                        len = me.browserPriority.length;
                        for (index = 0; index < len; index++) {
                            key = me.browserPriority[index];
                            if (!matched) {
                                value = me.browserPrefixes[key];
                                match = ua.match(new RegExp('(' + value + ')([\\w\\._]+)'));
                                version = match && match.length > 1 ? parseInt(match[2]) : 0;
                                if (version) {
                                    matched = true;
                                }
                            } else {
                                version = 0;
                            }
                            browsers[key] = version;
                        }
                        //Deal with IE document mode
                        if (browsers.ie) {
                            var mode = document.documentMode;
                            if (mode >= 8) {
                                browsers.ie = mode;
                            }
                        }
                        // Fancy IE greater than and less then quick tags
                        version = browsers.ie || false;
                        maxIEVersion = Math.max(version, me.maxIEVersion);
                        for (index = 8; index <= maxIEVersion; ++index) {
                            prefix = 'ie' + index;
                            browsers[prefix + 'm'] = version ? version <= index : 0;
                            browsers[prefix] = version ? version === index : 0;
                            browsers[prefix + 'p'] = version ? version >= index : 0;
                        }
                        return browsers;
                    },
                    //OS Detection
                    getOperatingSystems = function() {
                        var systems = {},
                            value, key, keys, index, len, match, matched, version, activeCount;
                        keys = _getKeys(me.osPrefixes);
                        len = keys.length;
                        for (index = 0 , activeCount = 0; index < len; index++) {
                            key = keys[index];
                            value = me.osPrefixes[key];
                            match = ua.match(new RegExp('(' + value + ')([^\\s;]+)'));
                            matched = match ? match[1] : null;
                            // This is here because some HTC android devices show an OSX Snow Leopard userAgent by default.
                            // And the Kindle Fire doesn't have any indicator of Android as the OS in its User Agent
                            if (matched && (matched === 'HTC_' || matched === 'Silk/')) {
                                version = 2.3;
                            } else {
                                version = match && match.length > 1 ? parseFloat(match[match.length - 1]) : 0;
                            }
                            if (version) {
                                activeCount++;
                            }
                            systems[key] = version;
                        }
                        keys = _getKeys(me.fallbackOSPrefixes);
                        // If no OS could be found we resort to the fallbacks, otherwise we just
                        // falsify the fallbacks
                        len = keys.length;
                        for (index = 0; index < len; index++) {
                            key = keys[index];
                            // No OS was detected from osPrefixes
                            if (activeCount === 0) {
                                value = me.fallbackOSPrefixes[key];
                                match = ua.toLowerCase().match(new RegExp(value));
                                systems[key] = match ? true : 0;
                            } else {
                                systems[key] = 0;
                            }
                        }
                        return systems;
                    },
                    // Device Detection
                    getDevices = function() {
                        var devices = {},
                            value, key, keys, index, len, match;
                        keys = _getKeys(me.devicePrefixes);
                        len = keys.length;
                        for (index = 0; index < len; index++) {
                            key = keys[index];
                            value = me.devicePrefixes[key];
                            match = ua.match(new RegExp(value));
                            devices[key] = match ? true : 0;
                        }
                        return devices;
                    },
                    browsers = getBrowsers(),
                    systems = getOperatingSystems(),
                    devices = getDevices(),
                    platformParams = Boot.loadPlatformsParam();
                // We apply platformParams from the query here first to allow for forced user valued
                // to be used in calculation of generated tags
                _merge(_tags, browsers, systems, devices, platformParams, true);
                _tags.phone = !!((_tags.iphone || _tags.ipod) || (!_tags.silk && (_tags.android && (_tags.android < 3 || isMobile))) || (_tags.blackberry && isMobile) || (_tags.windowsphone));
                _tags.tablet = !!(!_tags.phone && (_tags.ipad || _tags.android || _tags.silk || _tags.rimtablet || (_tags.ie10 && /; Touch/.test(ua))));
                _tags.touch = // if the browser has touch events we can be reasonably sure the device has
                    // a touch screen
                    isEventSupported('touchend') || // browsers that use pointer event have maxTouchPoints > 0 if the
                    // device supports touch input
                    // http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints
                    navigator.maxTouchPoints || // IE10 uses a vendor-prefixed maxTouchPoints property
                    navigator.msMaxTouchPoints;
                _tags.desktop = !_tags.phone && !_tags.tablet;
                _tags.cordova = _tags.phonegap = !!(window.PhoneGap || window.Cordova || window.cordova);
                _tags.webview = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)(?!.*FBAN)/i.test(ua);
                _tags.androidstock = (_tags.android <= 4.3) && (_tags.safari || _tags.silk);
                // Re-apply any query params here to allow for user override of generated tags (desktop, touch, tablet, etc)
                _merge(_tags, platformParams, true);
            },
            /**
             * Extracts user supplied platform tags from the "platformTags" query parameter
             * of the form:
             *
             *      ?platformTags=name:state,name:state,...
             *
             * (each tag defaults to true when state is unspecified)
             *
             * Example:
             *
             *      ?platformTags=isTablet,isPhone:false,isDesktop:0,iOS:1,Safari:true, ...
             *
             * @returns {Object} the platform tags supplied by the query string
             */
            loadPlatformsParam: function() {
                // Check if the ?platform parameter is set in the URL
                var paramsString = window.location.search.substr(1),
                    paramsArray = paramsString.split("&"),
                    params = {},
                    i,
                    platforms = {},
                    tmpArray, tmplen, platform, name, enabled;
                for (i = 0; i < paramsArray.length; i++) {
                    tmpArray = paramsArray[i].split("=");
                    params[tmpArray[0]] = tmpArray[1];
                }
                if (params.platformTags) {
                    tmpArray = params.platformTags.split(",");
                    for (tmplen = tmpArray.length , i = 0; i < tmplen; i++) {
                        platform = tmpArray[i].split(":");
                        name = platform[0];
                        enabled = true;
                        if (platform.length > 1) {
                            enabled = platform[1];
                            if (enabled === 'false' || enabled === '0') {
                                enabled = false;
                            }
                        }
                        platforms[name] = enabled;
                    }
                }
                return platforms;
            },
            filterPlatform: function(platform, excludes) {
                platform = _emptyArray.concat(platform || _emptyArray);
                excludes = _emptyArray.concat(excludes || _emptyArray);
                var plen = platform.length,
                    elen = excludes.length,
                    include = (!plen && elen),
                    // default true if only excludes specified
                    i, tag;
                for (i = 0; i < plen && !include; i++) {
                    tag = platform[i];
                    include = !!_tags[tag];
                }
                for (i = 0; i < elen && include; i++) {
                    tag = excludes[i];
                    include = !_tags[tag];
                }
                return include;
            },
            init: function() {
                var scriptEls = doc.getElementsByTagName('script'),
                    script = scriptEls[0],
                    len = scriptEls.length,
                    re = /\/ext(\-[a-z\-]+)?\.js$/,
                    entry, src, state, baseUrl, key, n, origin;
                // No check for script definedness because there always should be at least one
                Boot.hasReadyState = ("readyState" in script);
                Boot.hasAsync = ("async" in script);
                Boot.hasDefer = ("defer" in script);
                Boot.hasOnLoad = ("onload" in script);
                // Feature detecting IE
                Boot.isIE8 = Boot.hasReadyState && !Boot.hasAsync && Boot.hasDefer && !Boot.hasOnLoad;
                Boot.isIE9 = Boot.hasReadyState && !Boot.hasAsync && Boot.hasDefer && Boot.hasOnLoad;
                Boot.isIE10p = Boot.hasReadyState && Boot.hasAsync && Boot.hasDefer && Boot.hasOnLoad;
                if (Boot.isIE8) {
                    Boot.isIE10 = false;
                    Boot.isIE10m = true;
                } else {
                    Boot.isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1;
                    Boot.isIE10m = Boot.isIE10 || Boot.isIE9 || Boot.isIE8;
                }
                // IE11 does not support conditional compilation so we detect it by exclusion
                Boot.isIE11 = Boot.isIE10p && !Boot.isIE10;
                // Since we are loading after other scripts, and we needed to gather them
                // anyway, we track them in _scripts so we don't have to ask for them all
                // repeatedly.
                for (n = 0; n < len; n++) {
                    src = (script = scriptEls[n]).src;
                    if (!src) {

                        continue;
                    }
                    state = script.readyState || null;
                    // If we find a script file called "ext-*.js", then the base path is that file's base path.
                    if (!baseUrl && re.test(src)) {
                        baseUrl = src;
                    }
                    if (!Boot.scripts[key = Boot.canonicalUrl(src)]) {
                        //                         _debug("creating entry " + key + " in Boot.init");
                        entry = new Entry({
                            key: key,
                            url: src,
                            done: state === null || // non-IE
                                state === 'loaded' || state === 'complete',
                            // IE only
                            el: script,
                            prop: 'src'
                        });
                    }
                }
                if (!baseUrl) {
                    script = scriptEls[scriptEls.length - 1];
                    baseUrl = script.src;
                }
                Boot.baseUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/') + 1);
                origin = window.location.origin || window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
                Boot.origin = origin;
                Boot.detectPlatformTags();
                Ext.filterPlatform = Boot.filterPlatform;
            },
            /**
             * This method returns a canonical URL for the given URL.
             *
             * For example, the following all produce the same canonical URL (which is the
             * last one):
             *
             *      http://foo.com/bar/baz/zoo/derp/../../goo/Thing.js?_dc=12345
             *      http://foo.com/bar/baz/zoo/derp/../../goo/Thing.js
             *      http://foo.com/bar/baz/zoo/derp/../jazz/../../goo/Thing.js
             *      http://foo.com/bar/baz/zoo/../goo/Thing.js
             *      http://foo.com/bar/baz/goo/Thing.js
             *
             * @private
             */
            canonicalUrl: function(url) {
                // *WARNING WARNING WARNING*
                // This method yields the most correct result we can get but it is EXPENSIVE!
                // In ALL browsers! When called multiple times in a sequence, as if when
                // we resolve dependencies for entries, it will cause garbage collection events
                // and overall painful slowness. This is why we try to avoid it as much as we can.
                //
                // @TODO - see if we need this fallback logic
                // http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue
                resolverEl.href = url;
                var ret = resolverEl.href,
                    dc = _config.disableCachingParam,
                    pos = dc ? ret.indexOf(dc + '=') : -1,
                    c, end;
                // If we have a _dc query parameter we need to remove it from the canonical
                // URL.
                if (pos > 0 && ((c = ret.charAt(pos - 1)) === '?' || c === '&')) {
                    end = ret.indexOf('&', pos);
                    end = (end < 0) ? '' : ret.substring(end);
                    if (end && c === '?') {
                        ++pos;
                        // keep the '?'
                        end = end.substring(1);
                    }
                    // remove the '&'
                    ret = ret.substring(0, pos - 1) + end;
                }
                return ret;
            },
            /**
             * Get the config value corresponding to the specified name. If no name is given, will return the config object
             * @param {String} name The config property name
             * @return {Object}
             */
            getConfig: function(name) {
                return name ? Boot.config[name] : Boot.config;
            },
            /**
             * Set the configuration.
             * @param {Object} config The config object to override the default values.
             * @return {Ext.Boot} this
             */
            setConfig: function(name, value) {
                if (typeof name === 'string') {
                    Boot.config[name] = value;
                } else {
                    for (var s in name) {
                        Boot.setConfig(s, name[s]);
                    }
                }
                return Boot;
            },
            getHead: function() {
                return Boot.docHead || (Boot.docHead = doc.head || doc.getElementsByTagName('head')[0]);
            },
            create: function(url, key, cfg) {
                var config = cfg || {};
                config.url = url;
                config.key = key;
                return Boot.scripts[key] = new Entry(config);
            },
            getEntry: function(url, cfg, canonicalPath) {
                var key, entry;
                // Canonicalizing URLs via anchor element href yields the most correct result
                // but is *extremely* resource heavy so we need to avoid it whenever possible
                key = canonicalPath ? url : Boot.canonicalUrl(url);
                entry = Boot.scripts[key];
                if (!entry) {
                    entry = Boot.create(url, key, cfg);
                    if (canonicalPath) {
                        entry.canonicalPath = true;
                    }
                }
                return entry;
            },
            registerContent: function(url, type, content) {
                var cfg = {
                    content: content,
                    loaded: true,
                    css: type === 'css'
                };
                return Boot.getEntry(url, cfg);
            },
            processRequest: function(request, sync) {
                request.loadEntries(sync);
            },
            load: function(request) {
                //                 _debug("Boot.load called");
                var request = new Request(request);
                if (request.sync || Boot.syncMode) {
                    return Boot.loadSync(request);
                }
                // If there is a request in progress, we must
                // queue this new request to be fired  when the current request completes.
                if (Boot.currentRequest) {
                    //                     _debug("current active request, suspending this request");
                    // trigger assignment of entries now to ensure that overlapping
                    // entries with currently running requests will synchronize state
                    // with this pending one as they complete
                    request.getEntries();
                    Boot.suspendedQueue.push(request);
                } else {
                    Boot.currentRequest = request;
                    Boot.processRequest(request, false);
                }
                return Boot;
            },
            loadSync: function(request) {
                //                 _debug("Boot.loadSync called");
                var request = new Request(request);
                Boot.syncMode++;
                Boot.processRequest(request, true);
                Boot.syncMode--;
                return Boot;
            },
            loadBasePrefix: function(request) {
                request = new Request(request);
                request.prependBaseUrl = true;
                return Boot.load(request);
            },
            loadSyncBasePrefix: function(request) {
                request = new Request(request);
                request.prependBaseUrl = true;
                return Boot.loadSync(request);
            },
            requestComplete: function(request) {
                var next;
                if (Boot.currentRequest === request) {
                    Boot.currentRequest = null;
                    while (Boot.suspendedQueue.length > 0) {
                        next = Boot.suspendedQueue.shift();
                        if (!next.done) {
                            //                             _debug("resuming suspended request");
                            Boot.load(next);
                            break;
                        }
                    }
                }
                if (!Boot.currentRequest && Boot.suspendedQueue.length == 0) {
                    Boot.fireListeners();
                }
            },
            isLoading: function() {
                return !Boot.currentRequest && Boot.suspendedQueue.length == 0;
            },
            fireListeners: function() {
                var listener;
                while (Boot.isLoading() && (listener = Boot.listeners.shift())) {
                    listener();
                }
            },
            onBootReady: function(listener) {
                if (!Boot.isLoading()) {
                    listener();
                } else {
                    Boot.listeners.push(listener);
                }
            },
            /**
             * this is a helper function used by Ext.Loader to flush out
             * 'uses' arrays for classes in some Ext versions
             */
            getPathsFromIndexes: function(indexMap, loadOrder) {
                // In older versions indexMap was an object instead of a sparse array
                if (!('length' in indexMap)) {
                    var indexArray = [],
                        index;
                    for (index in indexMap) {
                        if (!isNaN(+index)) {
                            indexArray[+index] = indexMap[index];
                        }
                    }
                    indexMap = indexArray;
                }
                return Request.prototype.getPathsFromIndexes(indexMap, loadOrder);
            },
            createLoadOrderMap: function(loadOrder) {
                return Request.prototype.createLoadOrderMap(loadOrder);
            },
            fetch: function(url, complete, scope, async) {
                async = (async === undefined) ? !!complete : async;
                var xhr = new XMLHttpRequest(),
                    result, status, content,
                    exception = false,
                    readyStateChange = function() {
                        if (xhr && xhr.readyState == 4) {
                            status = (xhr.status === 1223) ? 204 : (xhr.status === 0 && ((self.location || {}).protocol === 'file:' || (self.location || {}).protocol === 'ionp:')) ? 200 : xhr.status;
                            content = xhr.responseText;
                            result = {
                                content: content,
                                status: status,
                                exception: exception
                            };
                            if (complete) {
                                complete.call(scope, result);
                            }
                            xhr.onreadystatechange = emptyFn;
                            xhr = null;
                        }
                    };
                if (async) {
                    xhr.onreadystatechange = readyStateChange;
                }
                try {
                    //                     _debug("fetching " + url + " " + (async ? "async" : "sync"));
                    xhr.open('GET', url, async);
                    xhr.send(null);
                } catch (err) {
                    exception = err;
                    readyStateChange();
                    return result;
                }
                if (!async) {
                    readyStateChange();
                }
                return result;
            },
            notifyAll: function(entry) {
                entry.notifyRequests();
            }
        };
    function Request(cfg) {
        //The request class encapsulates a series of Entry objects
        //and provides notification around the completion of all Entries
        //in this request.
        if (cfg.$isRequest) {
            return cfg;
        }
        var cfg = cfg.url ? cfg : {
                url: cfg
            },
            url = cfg.url,
            urls = url.charAt ? [
                url
            ] : url,
            charset = cfg.charset || Boot.config.charset;
        _apply(this, cfg);
        delete this.url;
        this.urls = urls;
        this.charset = charset;
    }

    Request.prototype = {
        $isRequest: true,
        createLoadOrderMap: function(loadOrder) {
            var len = loadOrder.length,
                loadOrderMap = {},
                i, element;
            for (i = 0; i < len; i++) {
                element = loadOrder[i];
                loadOrderMap[element.path] = element;
            }
            return loadOrderMap;
        },
        getLoadIndexes: function(item, indexMap, loadOrder, includeUses, skipLoaded) {
            var resolved = [],
                queue = [
                    item
                ],
                itemIndex = item.idx,
                queue, entry, dependencies, depIndex, i, len;
            if (indexMap[itemIndex]) {
                // prevent cycles
                return resolved;
            }
            // Both indexMap and resolved are sparse arrays keyed by indexes.
            // This gives us a naturally sorted sequence of indexes later on
            // when we need to convert them to paths.
            // indexMap is the map of all indexes we have visited at least once
            // per the current expandUrls() invocation, and resolved is the map
            // of all dependencies for the current item that are not included
            // in indexMap.
            indexMap[itemIndex] = resolved[itemIndex] = true;
            while (item = queue.shift()) {
                // Canonicalizing URLs is expensive, we try to avoid it
                if (item.canonicalPath) {
                    entry = Boot.getEntry(item.path, null, true);
                } else {
                    entry = Boot.getEntry(this.prepareUrl(item.path));
                }
                if (!(skipLoaded && entry.done)) {
                    if (includeUses && item.uses && item.uses.length) {
                        dependencies = item.requires.concat(item.uses);
                    } else {
                        dependencies = item.requires;
                    }
                    for (i = 0 , len = dependencies.length; i < len; i++) {
                        depIndex = dependencies[i];
                        if (!indexMap[depIndex]) {
                            indexMap[depIndex] = resolved[depIndex] = true;
                            queue.push(loadOrder[depIndex]);
                        }
                    }
                }
            }
            return resolved;
        },
        getPathsFromIndexes: function(indexes, loadOrder) {
            var paths = [],
                index, len;
            // indexes is a sparse array with values being true for defined indexes
            for (index = 0 , len = indexes.length; index < len; index++) {
                if (indexes[index]) {
                    paths.push(loadOrder[index].path);
                }
            }
            return paths;
        },
        expandUrl: function(url, loadOrder, loadOrderMap, indexMap, includeUses, skipLoaded) {
            var item, resolved;
            if (loadOrder) {
                item = loadOrderMap[url];
                if (item) {
                    resolved = this.getLoadIndexes(item, indexMap, loadOrder, includeUses, skipLoaded);
                    if (resolved.length) {
                        return this.getPathsFromIndexes(resolved, loadOrder);
                    }
                }
            }
            return [
                url
            ];
        },
        expandUrls: function(urls, includeUses) {
            var me = this,
                loadOrder = me.loadOrder,
                expanded = [],
                expandMap = {},
                indexMap = [],
                loadOrderMap, tmpExpanded, i, len, t, tlen, tUrl;
            if (typeof urls === "string") {
                urls = [
                    urls
                ];
            }
            if (loadOrder) {
                loadOrderMap = me.loadOrderMap;
                if (!loadOrderMap) {
                    loadOrderMap = me.loadOrderMap = me.createLoadOrderMap(loadOrder);
                }
            }
            for (i = 0 , len = urls.length; i < len; i++) {
                // We don't want to skip loaded entries (last argument === false).
                // There are some overrides that get loaded before their respective classes,
                // and when the class dependencies are processed we don't want to skip over
                // the overrides' dependencies just because they were loaded first.
                tmpExpanded = this.expandUrl(urls[i], loadOrder, loadOrderMap, indexMap, includeUses, false);
                for (t = 0 , tlen = tmpExpanded.length; t < tlen; t++) {
                    tUrl = tmpExpanded[t];
                    if (!expandMap[tUrl]) {
                        expandMap[tUrl] = true;
                        expanded.push(tUrl);
                    }
                }
            }
            if (expanded.length === 0) {
                expanded = urls;
            }
            return expanded;
        },
        expandLoadOrder: function() {
            var me = this,
                urls = me.urls,
                expanded;
            if (!me.expanded) {
                expanded = this.expandUrls(urls, true);
                me.expanded = true;
            } else {
                expanded = urls;
            }
            me.urls = expanded;
            // if we added some urls to the request to honor the indicated
            // load order, the request needs to be sequential
            if (urls.length != expanded.length) {
                me.sequential = true;
            }
            return me;
        },
        getUrls: function() {
            this.expandLoadOrder();
            return this.urls;
        },
        prepareUrl: function(url) {
            if (this.prependBaseUrl) {
                return Boot.baseUrl + url;
            }
            return url;
        },
        getEntries: function() {
            var me = this,
                entries = me.entries,
                loadOrderMap, item, i, entry, urls, url;
            if (!entries) {
                entries = [];
                urls = me.getUrls();
                // If we have loadOrder array then the map will be expanded by now
                if (me.loadOrder) {
                    loadOrderMap = me.loadOrderMap;
                }
                for (i = 0; i < urls.length; i++) {
                    url = me.prepareUrl(urls[i]);
                    if (loadOrderMap) {
                        item = loadOrderMap[url];
                    }
                    entry = Boot.getEntry(url, {
                        buster: me.buster,
                        charset: me.charset
                    }, item && item.canonicalPath);
                    entry.requests.push(me);
                    entries.push(entry);
                }
                me.entries = entries;
            }
            return entries;
        },
        loadEntries: function(sync) {
            var me = this,
                entries = me.getEntries(),
                len = entries.length,
                start = me.loadStart || 0,
                continueLoad, entries, entry, i;
            if (sync !== undefined) {
                me.sync = sync;
            }
            me.loaded = me.loaded || 0;
            me.loading = me.loading || len;
            for (i = start; i < len; i++) {
                entry = entries[i];
                if (!entry.loaded) {
                    continueLoad = entries[i].load(me.sync);
                } else {
                    continueLoad = true;
                }
                if (!continueLoad) {
                    me.loadStart = i;
                    entry.onDone(function() {
                        me.loadEntries(sync);
                    });
                    break;
                }
            }
            me.processLoadedEntries();
        },
        processLoadedEntries: function() {
            var me = this,
                entries = me.getEntries(),
                len = entries.length,
                start = me.startIndex || 0,
                i, entry;
            if (!me.done) {
                for (i = start; i < len; i++) {
                    entry = entries[i];
                    if (!entry.loaded) {
                        me.startIndex = i;
                        return;
                    }
                    if (!entry.evaluated) {
                        entry.evaluate();
                    }
                    if (entry.error) {
                        me.error = true;
                    }
                }
                me.notify();
            }
        },
        notify: function() {
            var me = this;
            if (!me.done) {
                var error = me.error,
                    fn = me[error ? 'failure' : 'success'],
                    delay = ('delay' in me) ? me.delay : (error ? 1 : Boot.config.chainDelay),
                    scope = me.scope || me;
                me.done = true;
                if (fn) {
                    if (delay === 0 || delay > 0) {
                        // Free the stack (and defer the next script)
                        setTimeout(function() {
                            fn.call(scope, me);
                        }, delay);
                    } else {
                        fn.call(scope, me);
                    }
                }
                me.fireListeners();
                Boot.requestComplete(me);
            }
        },
        onDone: function(listener) {
            var me = this,
                listeners = me.listeners || (me.listeners = []);
            if (me.done) {
                listener(me);
            } else {
                listeners.push(listener);
            }
        },
        fireListeners: function() {
            var listeners = this.listeners,
                listener;
            if (listeners) {
                //                 _debug("firing request listeners");
                while ((listener = listeners.shift())) {
                    listener(this);
                }
            }
        }
    };
    function Entry(cfg) {
        //The Entry class is a token to manage the load and evaluation
        //state of a particular url.  It is used to notify all Requests
        //interested in this url that the content is available.
        if (cfg.$isEntry) {
            return cfg;
        }
        //         _debug("creating entry for " + cfg.url);
        var charset = cfg.charset || Boot.config.charset,
            manifest = Ext.manifest,
            loader = manifest && manifest.loader,
            cache = (cfg.cache !== undefined) ? cfg.cache : (loader && loader.cache),
            buster, busterParam;
        if (Boot.config.disableCaching) {
            if (cache === undefined) {
                cache = !Boot.config.disableCaching;
            }
            if (cache === false) {
                buster = +new Date();
            } else if (cache !== true) {
                buster = cache;
            }
            if (buster) {
                busterParam = (loader && loader.cacheParam) || Boot.config.disableCachingParam;
                buster = busterParam + "=" + buster;
            }
        }
        _apply(this, cfg);
        this.charset = charset;
        this.buster = buster;
        this.requests = [];
    }

    Entry.prototype = {
        $isEntry: true,
        done: false,
        evaluated: false,
        loaded: false,
        isCrossDomain: function() {
            var me = this;
            if (me.crossDomain === undefined) {
                //                 _debug("checking " + me.getLoadUrl() + " for prefix " + Boot.origin);
                me.crossDomain = (me.getLoadUrl().indexOf(Boot.origin) !== 0);
            }
            return me.crossDomain;
        },
        isCss: function() {
            var me = this;
            if (me.css === undefined) {
                if (me.url) {
                    var assetConfig = Boot.assetConfig[me.url];
                    me.css = assetConfig ? assetConfig.type === "css" : cssRe.test(me.url);
                } else {
                    me.css = false;
                }
            }
            return this.css;
        },
        getElement: function(tag) {
            var me = this,
                el = me.el;
            if (!el) {
                //                 _debug("creating element for " + me.url);
                if (me.isCss()) {
                    tag = tag || "link";
                    el = doc.createElement(tag);
                    if (tag == "link") {
                        el.rel = 'stylesheet';
                        me.prop = 'href';
                    } else {
                        me.prop = "textContent";
                    }
                    el.type = "text/css";
                } else {
                    tag = tag || "script";
                    el = doc.createElement(tag);
                    el.type = 'text/javascript';
                    me.prop = 'src';
                    if (me.charset) {
                        el.charset = me.charset;
                    }
                    if (Boot.hasAsync) {
                        el.async = false;
                    }
                }
                me.el = el;
            }
            return el;
        },
        getLoadUrl: function() {
            var me = this,
                url;
            url = me.canonicalPath ? me.url : Boot.canonicalUrl(me.url);
            if (!me.loadUrl) {
                me.loadUrl = !!me.buster ? (url + (url.indexOf('?') === -1 ? '?' : '&') + me.buster) : url;
            }
            return me.loadUrl;
        },
        fetch: function(req) {
            var url = this.getLoadUrl(),
                async = !!req.async,
                complete = req.complete;
            Boot.fetch(url, complete, this, async);
        },
        onContentLoaded: function(response) {
            var me = this,
                status = response.status,
                content = response.content,
                exception = response.exception,
                url = this.getLoadUrl();
            me.loaded = true;
            if ((exception || status === 0) && !_environment.phantom) {
                me.error = ("Failed loading synchronously via XHR: '" + url + "'. It's likely that the file is either being loaded from a " + "different domain or from the local file system where cross " + "origin requests are not allowed for security reasons. Try " + "asynchronous loading instead.") || true;
                me.evaluated = true;
            } else if ((status >= 200 && status < 300) || status === 304 || _environment.phantom || (status === 0 && content.length > 0)) {
                me.content = content;
            } else {
                me.error = ("Failed loading synchronously via XHR: '" + url + "'. Please verify that the file exists. XHR status code: " + status) || true;
                me.evaluated = true;
            }
        },
        createLoadElement: function(callback) {
            var me = this,
                el = me.getElement();
            me.preserve = true;
            el.onerror = function() {
                me.error = true;
                if (callback) {
                    callback();
                    callback = null;
                }
            };
            if (Boot.isIE10m) {
                el.onreadystatechange = function() {
                    if (this.readyState === 'loaded' || this.readyState === 'complete') {
                        if (callback) {
                            callback();
                            callback = this.onreadystatechange = this.onerror = null;
                        }
                    }
                };
            } else {
                el.onload = function() {
                    callback();
                    callback = this.onload = this.onerror = null;
                };
            }
            // IE starts loading here
            el[me.prop] = me.getLoadUrl();
        },
        onLoadElementReady: function() {
            Boot.getHead().appendChild(this.getElement());
            this.evaluated = true;
        },
        inject: function(content, asset) {
            //             _debug("injecting content for " + this.url);
            var me = this,
                head = Boot.getHead(),
                url = me.url,
                key = me.key,
                base, el, ieMode, basePath;
            if (me.isCss()) {
                me.preserve = true;
                basePath = key.substring(0, key.lastIndexOf("/") + 1);
                base = doc.createElement('base');
                base.href = basePath;
                if (head.firstChild) {
                    head.insertBefore(base, head.firstChild);
                } else {
                    head.appendChild(base);
                }
                // reset the href attribute to cuase IE to pick up the change
                base.href = base.href;
                if (url) {
                    content += "\n/*# sourceURL=" + key + " */";
                }
                // create element after setting base
                el = me.getElement("style");
                ieMode = ('styleSheet' in el);
                head.appendChild(base);
                if (ieMode) {
                    head.appendChild(el);
                    el.styleSheet.cssText = content;
                } else {
                    el.textContent = content;
                    head.appendChild(el);
                }
                head.removeChild(base);
            } else {
                // Debugger friendly, file names are still shown even though they're
                // eval'ed code. Breakpoints work on both Firebug and Chrome's Web
                // Inspector.
                if (url) {
                    content += "\n//# sourceURL=" + key;
                }
                Ext.globalEval(content);
            }
            return me;
        },
        loadCrossDomain: function() {
            var me = this,
                complete = function() {
                    me.el.onerror = me.el.onload = emptyFn;
                    me.el = null;
                    me.loaded = me.evaluated = me.done = true;
                    me.notifyRequests();
                };
            me.createLoadElement(function() {
                complete();
            });
            me.evaluateLoadElement();
            // at this point, we need sequential evaluation,
            // which means we can't advance the load until
            // this entry has fully completed
            return false;
        },
        loadElement: function() {
            var me = this,
                complete = function() {
                    me.el.onerror = me.el.onload = emptyFn;
                    me.el = null;
                    me.loaded = me.evaluated = me.done = true;
                    me.notifyRequests();
                };
            me.createLoadElement(function() {
                complete();
            });
            me.evaluateLoadElement();
            return true;
        },
        loadSync: function() {
            var me = this;
            me.fetch({
                async: false,
                complete: function(response) {
                    me.onContentLoaded(response);
                }
            });
            me.evaluate();
            me.notifyRequests();
        },
        load: function(sync) {
            var me = this;
            if (!me.loaded) {
                if (me.loading) {
                    // if we're calling back through load and we're loading but haven't
                    // yet loaded, then we should be in a sequential, cross domain
                    // load scenario which means we can't continue the load on the
                    // request until this entry has fully evaluated, which will mean
                    // loaded = evaluated = done = true in one step.  For css files, this
                    // will happen immediately upon <link> element creation / insertion,
                    // but <script> elements will set this upon load notification
                    return false;
                }
                me.loading = true;
                // for async modes, we have some options
                if (!sync) {
                    // if cross domain, just inject the script tag and let the onload
                    // events drive the progression.
                    // IE10 also needs sequential loading because of a bug that makes it
                    // fire readystate event prematurely:
                    // https://connect.microsoft.com/IE/feedback/details/729164/ie10-dynamic-script-element-fires-loaded-readystate-prematurely
                    if (Boot.isIE10 || me.isCrossDomain()) {
                        return me.loadCrossDomain();
                    }
                        // for IE, use the readyStateChange allows us to load scripts in parallel
                        // but serialize the evaluation by appending the script node to the
                    // document
                    else if (!me.isCss() && Boot.hasReadyState) {
                        me.createLoadElement(function() {
                            me.loaded = true;
                            me.notifyRequests();
                        });
                    } else if (Boot.useElements && // older webkit, phantomjs included, won't fire load for link elements
                        !(me.isCss() && _environment.phantom)) {
                        return me.loadElement();
                    } else // for other browsers, just ajax the content down in parallel, and use
                        // globalEval to serialize evaluation
                    {
                        me.fetch({
                            async: !sync,
                            complete: function(response) {
                                me.onContentLoaded(response);
                                me.notifyRequests();
                            }
                        });
                    }
                } else // for sync mode in js, global eval FTW.  IE won't honor the comment
                    // paths in the debugger, so eventually we need a sync mode for IE that
                    // uses the readyStateChange mechanism
                {
                    me.loadSync();
                }
            }
            // signal that the load process can continue
            return true;
        },
        evaluateContent: function() {
            this.inject(this.content);
            this.content = null;
        },
        evaluateLoadElement: function() {
            Boot.getHead().appendChild(this.getElement());
        },
        evaluate: function() {
            var me = this;
            if (!me.evaluated) {
                if (me.evaluating) {
                    return;
                }
                me.evaluating = true;
                if (me.content !== undefined) {
                    me.evaluateContent();
                } else if (!me.error) {
                    me.evaluateLoadElement();
                }
                me.evaluated = me.done = true;
                me.cleanup();
            }
        },
        cleanup: function() {
            var me = this,
                el = me.el,
                prop;
            if (!el) {
                return;
            }
            if (!me.preserve) {
                me.el = null;
                el.parentNode.removeChild(el);
                // Remove, since its useless now
                for (prop in el) {
                    try {
                        if (prop !== me.prop) {
                            // If we set the src property to null IE
                            // will try and request a script at './null'
                            el[prop] = null;
                        }
                        delete el[prop];
                    } // and prepare for GC
                    catch (cleanEx) {}
                }
            }
            //ignore
            // Setting to null can cause exceptions if IE ever needs to call these
            // again (like onreadystatechange). This emptyFn has nothing locked in
            // closure scope so it is about as safe as null for memory leaks.
            el.onload = el.onerror = el.onreadystatechange = emptyFn;
        },
        notifyRequests: function() {
            var requests = this.requests,
                len = requests.length,
                i, request;
            for (i = 0; i < len; i++) {
                request = requests[i];
                request.processLoadedEntries();
            }
            if (this.done) {
                this.fireListeners();
            }
        },
        onDone: function(listener) {
            var me = this,
                listeners = me.listeners || (me.listeners = []);
            if (me.done) {
                listener(me);
            } else {
                listeners.push(listener);
            }
        },
        fireListeners: function() {
            var listeners = this.listeners,
                listener;
            if (listeners && listeners.length > 0) {
                //                 _debug("firing event listeners for url " + this.url);
                while ((listener = listeners.shift())) {
                    listener(this);
                }
            }
        }
    };
    /**
     * Turns on or off the "cache buster" applied to dynamically loaded scripts. Normally
     * dynamically loaded scripts have an extra query parameter appended to avoid stale
     * cached scripts. This method can be used to disable this mechanism, and is primarily
     * useful for testing. This is done using a cookie.
     * @param {Boolean} disable True to disable the cache buster.
     * @param {String} [path="/"] An optional path to scope the cookie.
     */
    Ext.disableCacheBuster = function(disable, path) {
        var date = new Date();
        date.setTime(date.getTime() + (disable ? 10 * 365 : -1) * 24 * 60 * 60 * 1000);
        date = date.toGMTString();
        doc.cookie = 'ext-cache=1; expires=' + date + '; path=' + (path || '/');
    };
    Boot.init();
    return Boot;
}(// NOTE: We run the eval at global scope to protect the body of the function and allow
// compressors to still process it.
    function() {}));
//(eval("/*@cc_on!@*/!1"));
/**
 * This method evaluates the given code free of any local variable. This
 * will be at global scope, in others it will be in a function.
 * @param {String} code The code to evaluate.
 * @private
 * @method
 * @member Ext
 */
Ext.globalEval = Ext.globalEval || (this.execScript ? function(code) {
    execScript(code);
} : function($$code) {
    eval.call(window, $$code);
});
/*
 * Only IE8 & IE/Quirks lack Function.prototype.bind so we polyfill that here.
 */
if (!Function.prototype.bind) {
    (function() {
        var slice = Array.prototype.slice,
            // To reduce overhead on call of the bound fn we have two flavors based on
            // whether we have args to prepend or not:
            bind = function(me) {
                var args = slice.call(arguments, 1),
                    method = this;
                if (args.length) {
                    return function() {
                        var t = arguments;
                        // avoid the slice/concat if the caller does not supply args
                        return method.apply(me, t.length ? args.concat(slice.call(t)) : args);
                    };
                }
                // this is the majority use case - just fn.bind(this) and no args
                args = null;
                return function() {
                    return method.apply(me, arguments);
                };
            };
        Function.prototype.bind = bind;
        bind.$extjs = true;
    }());
}
// to detect this polyfill if one want to improve it
//</editor-fold>
Ext.setResourcePath = function(poolName, path) {
    var manifest = Ext.manifest || (Ext.manifest = {}),
        paths = manifest.resources || (manifest.resources = {});
    if (manifest) {
        if (typeof poolName !== 'string') {
            Ext.apply(paths, poolName);
        } else {
            paths[poolName] = path;
        }
        manifest.resources = paths;
    }
};
Ext.getResourcePath = function(path, poolName, packageName) {
    if (typeof path !== 'string') {
        poolName = path.pool;
        packageName = path.packageName;
        path = path.path;
    }
    var manifest = Ext.manifest,
        paths = manifest && manifest.resources,
        poolPath = paths[poolName],
        output = [];
    if (poolPath == null) {
        poolPath = paths.path;
        if (poolPath == null) {
            poolPath = 'resources';
        }
    }
    if (poolPath) {
        output.push(poolPath);
    }
    if (packageName) {
        output.push(packageName);
    }
    output.push(path);
    return output.join('/');
};

var Ext=Ext||{};(function(){var global=this,objectPrototype=Object.prototype,toString=objectPrototype.toString,enumerables=['valueOf','toLocaleString','toString','constructor'],emptyFn=Ext.fireIdle=function(){},privateFn=function(){},identityFn=function(o){return o},callOverrideParent=function(){var method=callOverrideParent.caller.caller;return method.$owner.prototype[method.$name].apply(this,arguments)},manifest=Ext.manifest||{},iterableRe=/\[object\s*(?:Array|Arguments|\w*Collection|\w*List|HTML\s+document\.all\s+class)\]/,MSDateRe=/^\\?\/Date\(([-+])?(\d+)(?:[+-]\d{4})?\)\\?\/$/,elevateArgs,elevateFn,elevateRet,elevateScope,i;Ext.global=global;Ext.$nextIid=0;Ext.now=Date.now||(Date.now=function(){return+new Date()});Ext.ticks=(global.performance&&global.performance.now)?function(){return performance.now()}:Ext.now;Ext._startTime=Ext.ticks();emptyFn.$nullFn=identityFn.$nullFn=emptyFn.$emptyFn=identityFn.$identityFn=privateFn.$nullFn=!0;privateFn.$privacy='framework';emptyFn.$noClearOnDestroy=identityFn.$noClearOnDestroy=!0;privateFn.$noClearOnDestroy=!0;Ext.suspendLayouts=Ext.resumeLayouts=emptyFn;for(i in{toString:1}){enumerables=null}
Ext.enumerables=enumerables;Ext.apply=function(object,config,defaults){var i,j,k;if(object){if(defaults){Ext.apply(object,defaults)}
if(config&&typeof config==='object'){for(i in config){object[i]=config[i]}
if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(config.hasOwnProperty(k)){object[k]=config[k]}}}}}
return object};function addInstanceOverrides(target,owner,overrides){var name,value;for(name in overrides){if(overrides.hasOwnProperty(name)){value=overrides[name];if(typeof value==='function'){if(owner.$className){value.name=owner.$className+'#'+name}
value.$name=name;value.$owner=owner;value.$previous=target.hasOwnProperty(name)?target[name]:callOverrideParent}
target[name]=value}}}
Ext.buildSettings=Ext.apply({baseCSSPrefix:'x-'},Ext.buildSettings||{});Ext.apply(Ext,{idSeed:0,idPrefix:'ext-',isRobot:!1,isSecure:/^https/i.test(window.location.protocol),enableGarbageCollector:!1,enableListenerCollection:!0,name:Ext.sandboxName||'Ext',privateFn:privateFn,emptyFn:emptyFn,identityFn:identityFn,frameStartTime:Ext.now(),manifest:manifest,debugConfig:Ext.debugConfig||manifest.debug||{hooks:{'*':!0}},enableAria:!0,startsWithHashRe:/^#/,validIdRe:/^[a-z_][a-z0-9\-_]*$/i,BLANK_IMAGE_URL:'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',makeIdSelector:function(id){if(!Ext.validIdRe.test(id)){Ext.raise('Invalid id selector: "'+id+'"')}
return'#'+id},id:function(o,prefix){if(o&&o.id){return o.id}
var id=(prefix||Ext.idPrefix)+(++Ext.idSeed);if(o){o.id=id}
return id},returnId:function(o){return o.getId()},returnTrue:function(){return!0},emptyString:new String(),emptyArray:Object.freeze?Object.freeze([]):[],baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,$eventNameMap:{},$vendorEventRe:/^(DOMMouse|Moz.+|MS.+|webkit.+)/,canonicalEventName:function(name){return Ext.$eventNameMap[name]||(Ext.$eventNameMap[name]=(Ext.$vendorEventRe.test(name)?name:name.toLowerCase()))},applyIf:function(object,config){var property;if(object&&config&&typeof config==='object'){for(property in config){if(object[property]===undefined){object[property]=config[property]}}}
return object},destroy:function(){var ln=arguments.length,i,arg;for(i=0;i<ln;i++){arg=arguments[i];if(arg){if(Ext.isArray(arg)){this.destroy.apply(this,arg)}else if(Ext.isFunction(arg.destroy)&&!arg.destroyed){arg.destroy()}}}
return null},destroyMembers:function(object){for(var ref,name,i=1,a=arguments,len=a.length;i<len;i++){ref=object[name=a[i]];if(ref!=null){object[name]=Ext.destroy(ref)}}},override:function(target,overrides){if(target.$isClass){target.override(overrides)}else if(typeof target==='function'){Ext.apply(target.prototype,overrides)}else{var owner=target.self,privates;if(owner&&owner.$isClass){privates=overrides.privates;if(privates){overrides=Ext.apply({},overrides);delete overrides.privates;addInstanceOverrides(target,owner,privates)}
addInstanceOverrides(target,owner,overrides)}else{Ext.apply(target,overrides)}}
return target},valueFrom:function(value,defaultValue,allowBlank){return Ext.isEmpty(value,allowBlank)?defaultValue:value},isEmpty:function(value,allowEmptyString){return(value==null)||(!allowEmptyString?value==='':!1)||(Ext.isArray(value)&&value.length===0)},isArray:('isArray' in Array)?Array.isArray:function(value){return toString.call(value)==='[object Array]'},isDate:function(obj){return toString.call(obj)==='[object Date]'},isMSDate:function(value){if(!Ext.isString(value)){return!1}
return MSDateRe.test(value)},isObject:(toString.call(null)==='[object Object]')?function(value){return value!=null&&toString.call(value)==='[object Object]'&&value.ownerDocument===undefined}:function(value){return toString.call(value)==='[object Object]'},isSimpleObject:function(value){return value instanceof Object&&value.constructor===Object},isPrimitive:function(value){var type=typeof value;return type==='string'||type==='number'||type==='boolean'},isFunction:(typeof document!=='undefined'&&typeof document.getElementsByTagName('body')==='function')?function(value){return!!value&&toString.call(value)==='[object Function]'}:function(value){return!!value&&typeof value==='function'},isNumber:function(value){return typeof value==='number'&&isFinite(value)},isNumeric:function(value){return!isNaN(parseFloat(value))&&isFinite(value)},isString:function(value){return typeof value==='string'},isBoolean:function(value){return typeof value==='boolean'},isElement:function(value){return value?value.nodeType===1:!1},isTextNode:function(value){return value?value.nodeName==="#text":!1},isDefined:function(value){return typeof value!=='undefined'},isIterable:function(value){if(!value||typeof value.length!=='number'||typeof value==='string'||Ext.isFunction(value)){return!1}
if(!value.propertyIsEnumerable){return!!value.item}
if(value.hasOwnProperty('length')&&!value.propertyIsEnumerable('length')){return!0}
return iterableRe.test(toString.call(value))},isDebugEnabled:function(className,defaultEnabled){var debugConfig=Ext.debugConfig.hooks;if(debugConfig.hasOwnProperty(className)){return debugConfig[className]}
var enabled=debugConfig['*'],prefixLength=0;if(defaultEnabled!==undefined){enabled=defaultEnabled}
if(!className){return enabled}
for(var prefix in debugConfig){var value=debugConfig[prefix];if(className.charAt(prefix.length)==='.'){if(className.substring(0,prefix.length)===prefix){if(prefixLength<prefix.length){prefixLength=prefix.length;enabled=value}}}}
return enabled}||emptyFn,clone:function(item,cloneDom){if(item==null){return item}
if(cloneDom!==!1&&item.nodeType&&item.cloneNode){return item.cloneNode(!0)}
var type=toString.call(item),i,j,k,clone,key;if(type==='[object Date]'){return new Date(item.getTime())}
if(type==='[object Array]'){i=item.length;clone=[];while(i--){clone[i]=Ext.clone(item[i],cloneDom)}}else if(type==='[object Object]'&&item.constructor===Object){clone={};for(key in item){clone[key]=Ext.clone(item[key],cloneDom)}
if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(item.hasOwnProperty(k)){clone[k]=item[k]}}}}
return clone||item},getUniqueGlobalNamespace:function(){var uniqueGlobalNamespace=this.uniqueGlobalNamespace,i;if(uniqueGlobalNamespace===undefined){i=0;do{uniqueGlobalNamespace='ExtBox'+(++i)}while(global[uniqueGlobalNamespace]!==undefined);global[uniqueGlobalNamespace]=Ext;this.uniqueGlobalNamespace=uniqueGlobalNamespace}
return uniqueGlobalNamespace},functionFactoryCache:{},cacheableFunctionFactory:function(){var me=this,args=Array.prototype.slice.call(arguments),cache=me.functionFactoryCache,idx,fn,ln;if(Ext.isSandboxed){ln=args.length;if(ln>0){ln--;args[ln]='var Ext=window.'+Ext.name+';'+args[ln]}}
idx=args.join('');fn=cache[idx];if(!fn){fn=Function.prototype.constructor.apply(Function.prototype,args);cache[idx]=fn}
return fn},functionFactory:function(){var args=Array.prototype.slice.call(arguments),ln;if(Ext.isSandboxed){ln=args.length;if(ln>0){ln--;args[ln]='var Ext=window.'+Ext.name+';'+args[ln]}}
return Function.prototype.constructor.apply(Function.prototype,args)},Logger:{log:function(message,priority){if(message&&global.console){if(!priority||!(priority in global.console)){priority='log'}
message='['+priority.toUpperCase()+'] '+message;global.console[priority](message)}},verbose:function(message){this.log(message,'verbose')},info:function(message){this.log(message,'info')},warn:function(message){this.log(message,'warn')},error:function(message){throw new Error(message)},deprecate:function(message){this.log(message,'warn')}}||{verbose:emptyFn,log:emptyFn,info:emptyFn,warn:emptyFn,error:function(message){throw new Error(message)},deprecate:emptyFn},ariaWarn:function(target,msg){if(Ext.enableAria&&!Ext.slicer){if(!Ext.ariaWarn.first){Ext.ariaWarn.first=!0;Ext.log.warn("WAI-ARIA compatibility warnings can be suppressed "+"by adding the following to application startup code:");Ext.log.warn("    Ext.ariaWarn = Ext.emptyFn;")}
Ext.log.warn({msg:msg,dump:target})}},getElementById:function(id){return document.getElementById(id)},splitAndUnescape:(function(){var cache={};return function(origin,delimiter){if(!origin){return[]}else if(!delimiter){return[origin]}
var replaceRe=cache[delimiter]||(cache[delimiter]=new RegExp('\\\\'+delimiter,'g')),result=[],parts,part;parts=origin.split(delimiter);while((part=parts.shift())!==undefined){while(part.charAt(part.length-1)==='\\'&&parts.length>0){part=part+delimiter+parts.shift()}
part=part.replace(replaceRe,delimiter);result.push(part)}
return result}})(),doElevate:function(){var fn=elevateFn,args=elevateArgs,scope=elevateScope;elevateFn=elevateArgs=elevateScope=null;elevateRet=args?fn.apply(scope,args):fn.call(scope);Ext.fireIdle()},elevate:function(fn,scope,args,timer){var ret;if(args&&!args.length){args=null}
Ext._suppressIdle=!1;if(timer){timer.tick()}
if(Ext.elevateFunction){elevateFn=fn;elevateScope=scope;elevateArgs=args;Ext.elevateFunction(Ext.doElevate);ret=elevateRet;elevateRet=null}else{ret=args?fn.apply(scope,args):fn.call(scope);Ext.fireIdle()}
if(timer){timer.tock()}
return ret},Timer:{all:{},track:!1,captureStack:!0,created:function(kind,id,info){if(!Ext.Timer.track){return null}
var timer=Ext.apply({kind:kind,id:id,done:!1,firing:!1,creator:Ext.Timer.captureStack?new Error().stack:null,tick:Ext.Timer.tick,tock:Ext.Timer.tock},info);var timers=Ext.Timer.all[kind]||(Ext.Timer.all[kind]={});timers[timer.id]=timer;if(Ext.Timer.hook){Ext.Timer.hook(timer)}
return timer},get:function(id,kind){kind=kind||'timeout';var timers=Ext.Timer.all[kind];return timers&&timers[id]||null},cancel:function(kind,id){var timers=Ext.Timer.all[kind],timer=timers&&timers[id];if(timer){timer.cancelled=!0;timers[id]=null;delete timers[id]}},tick:function(){if(Ext.Timer.firing){Ext.log.error('Previous timer state not cleaned up properly: '+Ext.Timer.firing.creator)}
if(this.kind!=='interval'){this.done=!0;Ext.Timer.all[this.kind][this.id]=null;delete Ext.Timer.all[this.kind][this.id]}
this.firing=!0;Ext.Timer.firing=this},tock:function(){this.firing=!1;if(Ext.Timer.firing===this){Ext.Timer.firing=null}}},getExpando:function(target,id){var expandos=target.$expandos;return expandos&&expandos[id]||null},setExpando:function(target,id,value){var expandos=target.$expandos;if(value!==undefined){(expandos||(target.$expandos={}))[id]=value}else if(expandos){delete expandos[id]}
return value}});Ext.returnTrue.$nullFn=Ext.returnId.$nullFn=!0}())
;
Ext.platformTags.modern=!(Ext.platformTags.classic=Ext.isClassic=!0)
;
(function(){function toString(){var me=this,cls=me.sourceClass,method=me.sourceMethod,msg=me.msg;if(method){if(msg){method+='(): ';method+=msg}else{method+='()'}}
if(cls){method=method?(cls+'.'+method):cls}
return method||msg||''}
Ext.Error=function(config){var error=new Error();if(Ext.isString(config)){config={msg:config}}
Ext.apply(error,config);error.message=error.message||error.msg;error.toString=toString;return error};Ext.apply(Ext.Error,{ignore:!1,raise:function(err){var me=this,method=me.raise.caller,msg,name;err=err||{};if(Ext.isString(err)){err={msg:err}}
if(method===Ext.raise){method=method.caller}
if(method){if(!err.sourceMethod&&(name=method.$name)){err.sourceMethod=name}
if(!err.sourceClass&&(name=method.$owner)&&(name=name.$className)){err.sourceClass=name}}
if(me.handle(err)!==!0){msg=toString.call(err);Ext.log({msg:msg,level:'error',dump:err,stack:!0});throw new Ext.Error(err)}},handle:function(){return this.ignore}})})();Ext.deprecated=function(suggestion){if(!suggestion){suggestion=''}
function fail(){Ext.raise('The method "'+fail.$owner.$className+'.'+fail.$name+'" has been removed. '+suggestion)}
return fail;return Ext.emptyFn};Ext.raise=function(){Ext.Error.raise.apply(Ext.Error,arguments)};(function(skipNotify){if(skipNotify||typeof window==='undefined'){return}
var last=0,notify=function(){var cnt=Ext.log&&Ext.log.counters,n=cnt&&(cnt.error+cnt.warn+cnt.info+cnt.log),msg;if(n&&last!==n){msg=[];if(cnt.error){msg.push('Errors: '+cnt.error)}
if(cnt.warn){msg.push('Warnings: '+cnt.warn)}
if(cnt.info){msg.push('Info: '+cnt.info)}
if(cnt.log){msg.push('Log: '+cnt.log)}
window.status='*** '+msg.join(' -- ');last=n}};notify.$skipTimerCheck=!0;setInterval(notify,1000)}(!!window.__UNIT_TESTING__))
;
Ext.Array=(function(){var arrayPrototype=Array.prototype,slice=arrayPrototype.slice,supportsSplice=(function(){var array=[],lengthBefore,j=20;if(!array.splice){return!1}
while(j--){array.push("A")}
array.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");lengthBefore=array.length;array.splice(13,0,"XXX");if(lengthBefore+1!==array.length){return!1}
return!0}()),supportsIndexOf='indexOf' in arrayPrototype,supportsSliceOnNodeList=!0;function stableSort(array,userComparator){var len=array.length,indices=new Array(len),i;for(i=0;i<len;i++){indices[i]=i}
indices.sort(function(index1,index2){return userComparator(array[index1],array[index2])||(index1-index2)});for(i=0;i<len;i++){indices[i]=array[indices[i]]}
for(i=0;i<len;i++){array[i]=indices[i]}
return array}
try{if(typeof document!=='undefined'){slice.call(document.getElementsByTagName('body'))}}catch(e){supportsSliceOnNodeList=!1}
var fixArrayIndex=function(array,index){return(index<0)?Math.max(0,array.length+index):Math.min(array.length,index)},replaceSim=function(array,index,removeCount,insert){var add=insert?insert.length:0,length=array.length,pos=fixArrayIndex(array,index);if(pos===length){if(add){array.push.apply(array,insert)}}else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove,i;if(tailNewPos<tailOldPos){for(i=0;i<tailCount;++i){array[tailNewPos+i]=array[tailOldPos+i]}}else if(tailNewPos>tailOldPos){for(i=tailCount;i--;){array[tailNewPos+i]=array[tailOldPos+i]}}
if(add&&pos===lengthAfterRemove){array.length=lengthAfterRemove;array.push.apply(array,insert)}else{array.length=lengthAfterRemove+add;for(i=0;i<add;++i){array[pos+i]=insert[i]}}}
return array},replaceNative=function(array,index,removeCount,insert){if(insert&&insert.length){if(index===0&&!removeCount){array.unshift.apply(array,insert)}else if(index<array.length){array.splice.apply(array,[index,removeCount].concat(insert))}else{array.push.apply(array,insert)}}else{array.splice(index,removeCount)}
return array},eraseSim=function(array,index,removeCount){return replaceSim(array,index,removeCount)},eraseNative=function(array,index,removeCount){array.splice(index,removeCount);return array},spliceSim=function(array,index,removeCount){var len=arguments.length,pos=fixArrayIndex(array,index),removed;if(len<3){removeCount=array.length-pos}
removed=array.slice(index,fixArrayIndex(array,pos+removeCount));if(len<4){replaceSim(array,pos,removeCount)}else{replaceSim(array,pos,removeCount,slice.call(arguments,3))}
return removed},spliceNative=function(array){return array.splice.apply(array,slice.call(arguments,1))},erase=supportsSplice?eraseNative:eraseSim,replace=supportsSplice?replaceNative:replaceSim,splice=supportsSplice?spliceNative:spliceSim,ExtArray={binarySearch:function(array,item,begin,end,compareFn){var length=array.length,middle,comparison;if(begin instanceof Function){compareFn=begin;begin=0;end=length}else if(end instanceof Function){compareFn=end;end=length}else{if(begin===undefined){begin=0}
if(end===undefined){end=length}
compareFn=compareFn||ExtArray.lexicalCompare}
--end;while(begin<=end){middle=(begin+end)>>1;comparison=compareFn(item,array[middle]);if(comparison>=0){begin=middle+1}else if(comparison<0){end=middle-1}}
return begin},defaultCompare:function(lhs,rhs){return(lhs<rhs)?-1:((lhs>rhs)?1:0)},lexicalCompare:function(lhs,rhs){lhs=String(lhs);rhs=String(rhs);return(lhs<rhs)?-1:((lhs>rhs)?1:0)},each:function(array,fn,scope,reverse){var i,ln;array=ExtArray.from(array);ln=array.length;if(reverse!==!0){for(i=0;i<ln;i++){if(fn.call(scope||array[i],array[i],i,array)===!1){return i}}}else{for(i=ln-1;i>-1;i--){if(fn.call(scope||array[i],array[i],i,array)===!1){return i}}}
return!0},findInsertionIndex:function(item,items,comparatorFn,index){var len=items.length,beforeCheck,afterCheck;comparatorFn=comparatorFn||ExtArray.lexicalCompare;if(0<=index&&index<len){beforeCheck=index>0?comparatorFn(item,items[index-1]):0;afterCheck=(index<len)?comparatorFn(item,items[index]):0;if(0<=beforeCheck&&afterCheck<1){return index}}
return ExtArray.binarySearch(items,item,comparatorFn)},forEach:('forEach' in arrayPrototype)?function(array,fn,scope){array.forEach(fn,scope)}:function(array,fn,scope){var i,ln;for(i=0,ln=array.length;i<ln;i++){fn.call(scope,array[i],i,array)}},indexOf:supportsIndexOf?function(array,item,from){return array?arrayPrototype.indexOf.call(array,item,from):-1}:function(array,item,from){var i,length=array?array.length:0;for(i=(from<0)?Math.max(0,length+from):from||0;i<length;i++){if(array[i]===item){return i}}
return-1},contains:supportsIndexOf?function(array,item){return arrayPrototype.indexOf.call(array,item)!==-1}:function(array,item){var i,ln;for(i=0,ln=array.length;i<ln;i++){if(array[i]===item){return!0}}
return!1},toArray:function(iterable,start,end){var array=[],i;if(!iterable||!iterable.length){return array}
if(typeof iterable==='string'){iterable=iterable.split('')}
if(supportsSliceOnNodeList){return slice.call(iterable,start||0,end||iterable.length)}
start=start||0;end=end?((end<0)?iterable.length+end:end):iterable.length;for(i=start;i<end;i++){array.push(iterable[i])}
return array},pluck:function(array,propertyName){var ret=[],i,ln,item;for(i=0,ln=array.length;i<ln;i++){item=array[i];ret.push(item[propertyName])}
return ret},map:('map' in arrayPrototype)?function(array,fn,scope){Ext.Assert.isFunction(fn,'Ext.Array.map must have a callback function passed as second argument.');return array.map(fn,scope)}:function(array,fn,scope){Ext.Assert.isFunction(fn,'Ext.Array.map must have a callback function passed as second argument.');var len=array.length,results=new Array(len),i;for(i=0;i<len;i++){results[i]=fn.call(scope,array[i],i,array)}
return results},every:('every' in arrayPrototype)?function(array,fn,scope){Ext.Assert.isFunction(fn,'Ext.Array.every must have a callback function passed as second argument.');return array.every(fn,scope)}:function(array,fn,scope){var i,ln;Ext.Assert.isFunction(fn,'Ext.Array.every must have a callback function passed as second argument.');for(i=0,ln=array.length;i<ln;++i){if(!fn.call(scope,array[i],i,array)){return!1}}
return!0},some:('some' in arrayPrototype)?function(array,fn,scope){Ext.Assert.isFunction(fn,'Ext.Array.some must have a callback function passed as second argument.');return array.some(fn,scope)}:function(array,fn,scope){var i,ln;Ext.Assert.isFunction(fn,'Ext.Array.some must have a callback function passed as second argument.');for(i=0,ln=array.length;i<ln;++i){if(fn.call(scope,array[i],i,array)){return!0}}
return!1},equals:function(array1,array2){var len1=array1.length,len2=array2.length,i;if(array1===array2){return!0}
if(len1!==len2){return!1}
for(i=0;i<len1;++i){if(array1[i]!==array2[i]){return!1}}
return!0},clean:function(array){var results=[],i,ln,item;for(i=0,ln=array.length;i<ln;i++){item=array[i];if(!Ext.isEmpty(item)){results.push(item)}}
return results},unique:function(array){var clone=[],i,ln,item;for(i=0,ln=array.length;i<ln;i++){item=array[i];if(ExtArray.indexOf(clone,item)===-1){clone.push(item)}}
return clone},filter:('filter' in arrayPrototype)?function(array,fn,scope){Ext.Assert.isFunction(fn,'Ext.Array.filter must have a filter function passed as second argument.');return array.filter(fn,scope)}:function(array,fn,scope){var results=[],i,ln;Ext.Assert.isFunction(fn,'Ext.Array.filter must have a filter function passed as second argument.');for(i=0,ln=array.length;i<ln;i++){if(fn.call(scope,array[i],i,array)){results.push(array[i])}}
return results},findBy:function(array,fn,scope){var i,len;for(i=0,len=array.length;i<len;i++){if(fn.call(scope||array,array[i],i)){return array[i]}}
return null},from:function(value,newReference){var type;if(value===undefined||value===null){return[]}
if(Ext.isArray(value)){return(newReference)?slice.call(value):value}
type=typeof value;if(value&&value.length!==undefined&&type!=='string'&&(type!=='function'||!value.apply)){return ExtArray.toArray(value)}
return[value]},remove:function(array,item){var index=ExtArray.indexOf(array,item);if(index!==-1){erase(array,index,1)}
return array},removeAt:function(array,index,count){var len=array.length;if(index>=0&&index<len){count=count||1;count=Math.min(count,len-index);erase(array,index,count)}
return array},include:function(array,item){if(!ExtArray.contains(array,item)){array.push(item)}},clone:function(array){return slice.call(array)},merge:function(){var args=slice.call(arguments),array=[],i,ln;for(i=0,ln=args.length;i<ln;i++){array=array.concat(args[i])}
return ExtArray.unique(array)},intersect:function(){var intersection=[],arrays=slice.call(arguments),arraysLength,array,arrayLength,minArray,minArrayIndex,minArrayCandidate,minArrayLength,element,elementCandidate,elementCount,i,j,k;if(!arrays.length){return intersection}
arraysLength=arrays.length;for(i=minArrayIndex=0;i<arraysLength;i++){minArrayCandidate=arrays[i];if(!minArray||minArrayCandidate.length<minArray.length){minArray=minArrayCandidate;minArrayIndex=i}}
minArray=ExtArray.unique(minArray);erase(arrays,minArrayIndex,1);minArrayLength=minArray.length;arraysLength=arrays.length;for(i=0;i<minArrayLength;i++){element=minArray[i];elementCount=0;for(j=0;j<arraysLength;j++){array=arrays[j];arrayLength=array.length;for(k=0;k<arrayLength;k++){elementCandidate=array[k];if(element===elementCandidate){elementCount++;break}}}
if(elementCount===arraysLength){intersection.push(element)}}
return intersection},difference:function(arrayA,arrayB){var clone=slice.call(arrayA),ln=clone.length,i,j,lnB;for(i=0,lnB=arrayB.length;i<lnB;i++){for(j=0;j<ln;j++){if(clone[j]===arrayB[i]){erase(clone,j,1);j--;ln--}}}
return clone},reduce:Array.prototype.reduce?function(array,reduceFn,initialValue){if(arguments.length===3){return Array.prototype.reduce.call(array,reduceFn,initialValue)}
return Array.prototype.reduce.call(array,reduceFn)}:function(array,reduceFn,initialValue){array=Object(array);if(!Ext.isFunction(reduceFn)){Ext.raise('Invalid parameter: expected a function.')}
var index=0,length=array.length>>>0,reduced=initialValue;if(arguments.length<3){while(!0){if(index in array){reduced=array[index++];break}
if(++index>=length){throw new TypeError('Reduce of empty array with no initial value')}}}
for(;index<length;++index){if(index in array){reduced=reduceFn(reduced,array[index],index,array)}}
return reduced},slice:([1,2].slice(1,undefined).length?function(array,begin,end){return slice.call(array,begin,end)}:function(array,begin,end){if(typeof begin==='undefined'){return slice.call(array)}
if(typeof end==='undefined'){return slice.call(array,begin)}
return slice.call(array,begin,end)}),sort:function(array,sortFn){return stableSort(array,sortFn||ExtArray.lexicalCompare)},flatten:function(array){var worker=[];function rFlatten(a){var i,ln,v;for(i=0,ln=a.length;i<ln;i++){v=a[i];if(Ext.isArray(v)){rFlatten(v)}else{worker.push(v)}}
return worker}
return rFlatten(array)},min:function(array,comparisonFn){var min=array[0],i,ln,item;for(i=0,ln=array.length;i<ln;i++){item=array[i];if(comparisonFn){if(comparisonFn(min,item)===1){min=item}}else{if(item<min){min=item}}}
return min},max:function(array,comparisonFn){var max=array[0],i,ln,item;for(i=0,ln=array.length;i<ln;i++){item=array[i];if(comparisonFn){if(comparisonFn(max,item)===-1){max=item}}else{if(item>max){max=item}}}
return max},mean:function(array){return array.length>0?ExtArray.sum(array)/array.length:undefined},sum:function(array){var sum=0,i,ln,item;for(i=0,ln=array.length;i<ln;i++){item=array[i];sum+=item}
return sum},toMap:function(strings,getKey,scope){var map,i;if(!strings){return null}
map={};i=strings.length;if(typeof strings==='string'){map[strings]=1}else if(!getKey){while(i--){map[strings[i]]=i+1}}else if(typeof getKey==='string'){while(i--){map[strings[i][getKey]]=i+1}}else{while(i--){map[getKey.call(scope,strings[i])]=i+1}}
return map},toValueMap:function(array,getKey,scope,arrayify){var map={},i=array.length,autoArray,alwaysArray,entry,fn,key,value;if(!getKey){while(i--){value=array[i];map[value]=value}}else{if(!(fn=(typeof getKey!=='string'))){arrayify=scope}
alwaysArray=arrayify===1;autoArray=arrayify===2;while(i--){value=array[i];key=fn?getKey.call(scope,value):value[getKey];if(alwaysArray){if(key in map){map[key].push(value)}else{map[key]=[value]}}else if(autoArray&&(key in map)){if((entry=map[key])instanceof Array){entry.push(value)}else{map[key]=[entry,value]}}else{map[key]=value}}}
return map},_replaceSim:replaceSim,_spliceSim:spliceSim,erase:erase,insert:function(array,index,items){return replace(array,index,0,items)},move:function(array,fromIdx,toIdx){if(toIdx===fromIdx){return}
var item=array[fromIdx],incr=toIdx>fromIdx?1:-1,i;for(i=fromIdx;i!==toIdx;i+=incr){array[i]=array[i+incr]}
array[toIdx]=item},replace:replace,splice:splice,push:function(target){var args=arguments,len=args.length,i,newItem;if(target===undefined){target=[]}else if(!Ext.isArray(target)){target=[target]}
for(i=1;i<len;i++){newItem=args[i];Array.prototype.push[Ext.isIterable(newItem)?'apply':'call'](target,newItem)}
return target},numericSortFn:function(a,b){return a-b}};Ext.each=ExtArray.each;ExtArray.union=ExtArray.merge;Ext.min=ExtArray.min;Ext.max=ExtArray.max;Ext.sum=ExtArray.sum;Ext.mean=ExtArray.mean;Ext.flatten=ExtArray.flatten;Ext.clean=ExtArray.clean;Ext.unique=ExtArray.unique;Ext.pluck=ExtArray.pluck;Ext.toArray=function(){return ExtArray.toArray.apply(ExtArray,arguments)};return ExtArray}())
;
Ext.Assert={falsey:function(b,msg){if(b){Ext.raise(msg||('Expected a falsey value but was '+b))}},falseyProp:function(object,property){var b;Ext.Assert.truthy(object);b=object[property];if(b){if(object.$className){property=object.$className+'#'+property}
Ext.raise('Expected a falsey value for '+property+' but was '+b)}},truthy:function(b,msg){if(!b){Ext.raise(msg||('Expected a truthy value but was '+typeof b))}},truthyProp:function(object,property){var b;Ext.Assert.truthy(object);b=object[property];if(!b){if(object.$className){property=object.$className+'#'+property}
Ext.raise('Expected a truthy value for '+property+' but was '+typeof b)}}};(function(){var name,kind;function makeAssert(name,kind){var testFn=Ext[name],def;return function(value,msg){if(!testFn(value)){Ext.raise(msg||def||(def='Expected value to be '+kind))}}}
function makeAssertProp(name,kind){var testFn=Ext[name],def;return function(object,prop){Ext.Assert.truthy(object);if(!testFn(object[prop])){Ext.raise(def||(def='Expected '+(object.$className?object.$className+'#':'')+prop+' to be '+kind))}}}
function makeNotAssert(name,kind){var testFn=Ext[name],def;return function(value,msg){if(testFn(value)){Ext.raise(msg||def||(def='Expected value to NOT be '+kind))}}}
function makeNotAssertProp(name,kind){var testFn=Ext[name],def;return function(object,prop){Ext.Assert.truthy(object);if(testFn(object[prop])){Ext.raise(def||(def='Expected '+(object.$className?object.$className+'#':'')+prop+' to NOT be '+kind))}}}
for(name in Ext){if(name.substring(0,2)==="is"&&Ext.isFunction(Ext[name])){kind=name.substring(2);Ext.Assert[name]=makeAssert(name,kind);Ext.Assert[name+'Prop']=makeAssertProp(name,kind);Ext.Assert['isNot'+kind]=makeNotAssert(name,kind);Ext.Assert['isNot'+kind+'Prop']=makeNotAssertProp(name,kind)}}}())
;
Ext.String=(function(){var trimRegex=/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe=/('|\\)/g,escapeRegexRe=/([-.*+?\^${}()|\[\]\/\\])/g,basicTrimRe=/^\s+|\s+$/g,whitespaceRe=/\s+/,varReplace=/(^[^a-z]*|[^\w])/gi,charToEntity,entityToChar,charToEntityRegex,entityToCharRegex,htmlEncodeReplaceFn=function(match,capture){return charToEntity[capture]},htmlDecodeReplaceFn=function(match,capture){return(capture in entityToChar)?entityToChar[capture]:String.fromCharCode(parseInt(capture.substr(2),10))},boundsCheck=function(s,other){if(s===null||s===undefined||other===null||other===undefined){return!1}
return other.length<=s.length},fromCharCode=String.fromCharCode,ExtString;return ExtString={fromCodePoint:String.fromCodePoint||function(){var codePoint,result='',codeUnits=[],index=-1,length=arguments.length;while(++index<length){codePoint=Number(arguments[index]);if(!isFinite(codePoint)||codePoint<0||codePoint>0x10FFFF||Math.floor(codePoint)!==codePoint){Ext.raise('Invalid code point: '+codePoint)}
if(codePoint<=0xFFFF){codeUnits.push(codePoint)}else{codePoint-=0x10000;codeUnits.push((codePoint>>10)+0xD800,(codePoint%0x400)+0xDC00)}
if(index+1===length){result+=fromCharCode(codeUnits);codeUnits.length=0}}
return result},insert:function(s,value,index){var len;if(!s){return value}
if(!value){return s}
len=s.length;if(!index&&index!==0){index=len}
if(index<0){index*=-1;if(index>=len){index=0}else{index=len-index}}
if(index===0){s=value+s}else if(index>=s.length){s+=value}else{s=s.substr(0,index)+value+s.substr(index)}
return s},startsWith:function(s,start,ignoreCase){var result=boundsCheck(s,start);if(result){if(ignoreCase){s=s.toLowerCase();start=start.toLowerCase()}
result=s.lastIndexOf(start,0)===0}
return result},endsWith:function(s,end,ignoreCase){var result=boundsCheck(s,end);if(result){if(ignoreCase){s=s.toLowerCase();end=end.toLowerCase()}
result=s.indexOf(end,s.length-end.length)!==-1}
return result},createVarName:function(s){return s.replace(varReplace,'')},htmlEncode:function(value){return(!value)?value:String(value).replace(charToEntityRegex,htmlEncodeReplaceFn)},htmlDecode:function(value){return(!value)?value:String(value).replace(entityToCharRegex,htmlDecodeReplaceFn)},hasHtmlCharacters:function(s){return charToEntityRegex.test(s)},addCharacterEntities:function(newEntities){var charKeys=[],entityKeys=[],key,echar;for(key in newEntities){echar=newEntities[key];entityToChar[key]=echar;charToEntity[echar]=key;charKeys.push(echar);entityKeys.push(key)}
charToEntityRegex=new RegExp('('+charKeys.join('|')+')','g');entityToCharRegex=new RegExp('('+entityKeys.join('|')+'|&#[0-9]{1,5};'+')','g')},resetCharacterEntities:function(){charToEntity={};entityToChar={};this.addCharacterEntities({'&amp;':'&','&gt;':'>','&lt;':'<','&quot;':'"','&#39;':"'"})},urlAppend:function(url,string){if(!Ext.isEmpty(string)){return url+(url.indexOf('?')===-1?'?':'&')+string}
return url},trim:function(string){if(string){string=string.replace(trimRegex,"")}
return string||''},capitalize:function(string){if(string){string=string.charAt(0).toUpperCase()+string.substr(1)}
return string||''},uncapitalize:function(string){if(string){string=string.charAt(0).toLowerCase()+string.substr(1)}
return string||''},ellipsis:function(value,length,word){var vs,index;if(value&&value.length>length){if(word){vs=value.substr(0,length-2);index=Math.max(vs.lastIndexOf(' '),vs.lastIndexOf('.'),vs.lastIndexOf('!'),vs.lastIndexOf('?'));if(index!==-1&&index>=(length-15)){return vs.substr(0,index)+"..."}}
return value.substr(0,length-3)+"..."}
return value},escapeRegex:function(string){return string.replace(escapeRegexRe,"\\$1")},createRegex:function(value,startsWith,endsWith,ignoreCase){var ret=value;if(value!=null&&!value.exec){ret=ExtString.escapeRegex(String(value));if(startsWith!==!1){ret='^'+ret}
if(endsWith!==!1){ret+='$'}
ret=new RegExp(ret,(ignoreCase!==!1)?'i':'')}
return ret},escape:function(string){return string.replace(escapeRe,"\\$1")},toggle:function(string,value,other){return string===value?other:value},leftPad:function(string,size,character){var result=String(string);character=character||" ";while(result.length<size){result=character+result}
return result},repeat:function(pattern,count,sep){var buf=[],i;if(count<1){count=0}
for(i=count;i--;){buf.push(pattern)}
return buf.join(sep||'')},splitWords:function(words){if(words&&typeof words==='string'){return words.replace(basicTrimRe,'').split(whitespaceRe)}
return words||[]}}}());Ext.String.resetCharacterEntities();Ext.htmlEncode=Ext.String.htmlEncode;Ext.htmlDecode=Ext.String.htmlDecode;Ext.urlAppend=Ext.String.urlAppend
;
Ext.Date=(function(){var utilDate,nativeDate=Date,stripEscapeRe=/(\\.)/g,hourInfoRe=/([gGhHisucUOPZ]|MS)/,dateInfoRe=/([djzmnYycU]|MS)/,slashRe=/\\/gi,numberTokenRe=/\{(\d+)\}/g,MSFormatRe=new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/'),datePartsRe=/^(?:(\d{1,4})|(\w{3,}))[/\-.\\\s](?:(\d{1,2})|(\w{3,}))[/\-.\\\s](\d{1,4})$/,pad=Ext.String.leftPad,dayInfo={d:!0,j:!0},monthInfo={F:!0,m:!0,M:!0,n:!0},yearInfo={o:!0,Y:!0,y:!0},code=["var me = this, dt, y, m, d, h, i, s, ms, o, O, z, zz, u, v, W, year, jan4, week1monday, daysInMonth, dayMatched,","def = me.defaults,","from = Ext.Number.from,","results = String(input).match(me.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = me.clearTime(new Date);","y = from(y, from(def.y, dt.getFullYear()));","m = from(m, from(def.m - 1, dt.getMonth()));","dayMatched = d !== undefined;","d = from(d, from(def.d, dt.getDate()));","if (!dayMatched) {","dt.setDate(1);","dt.setMonth(m);","dt.setFullYear(y);","daysInMonth = me.getDaysInMonth(dt);","if (d > daysInMonth) {","d = daysInMonth;","}","}","h  = from(h, from(def.h, dt.getHours()));","i  = from(i, from(def.i, dt.getMinutes()));","s  = from(s, from(def.s, dt.getSeconds()));","ms = from(ms, from(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = me.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), me.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (me.isLeapYear(v) && z <= 365))? me.add(v, me.DAY, z) : null);","}else if(strict === true && !me.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","if (W) {","year = y || (new Date()).getFullYear();","jan4 = new Date(year, 0, 4, 0, 0, 0);","d = jan4.getDay();","week1monday = new Date(jan4.getTime() - ((d === 0 ? 6 : d - 1) * 86400000));","v = Ext.Date.clearTime(new Date(week1monday.getTime() + ((W - 1) * 604800000 + 43200000)));","} else {","v = me.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), me.YEAR, y < 100 ? y - 100 : 0);","}","}","}","}","if(v){","if(zz != null){","v = me.add(v, me.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = me.add(v, me.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return (v != null) ? v : null;"].join('\n');if(!Date.prototype.toISOString){Date.prototype.toISOString=function(){var me=this;return pad(me.getUTCFullYear(),4,'0')+'-'+pad(me.getUTCMonth()+1,2,'0')+'-'+pad(me.getUTCDate(),2,'0')+'T'+pad(me.getUTCHours(),2,'0')+':'+pad(me.getUTCMinutes(),2,'0')+':'+pad(me.getUTCSeconds(),2,'0')+'.'+pad(me.getUTCMilliseconds(),3,'0')+'Z'}}
function xf(format){var args=Array.prototype.slice.call(arguments,1);return format.replace(numberTokenRe,function(m,i){return args[i]})}
utilDate={now:nativeDate.now,toString:function(date){if(!date){date=new nativeDate()}
return date.getFullYear()+"-"+pad(date.getMonth()+1,2,'0')+"-"+pad(date.getDate(),2,'0')+"T"+pad(date.getHours(),2,'0')+":"+pad(date.getMinutes(),2,'0')+":"+pad(date.getSeconds(),2,'0')},getElapsed:function(dateA,dateB){return Math.abs(dateA-(dateB||utilDate.now()))},useStrict:!1,formatCodeToRegex:function(character,currentGroup){var p=utilDate.parseCodes[character];if(p){p=typeof p==='function'?p():p;utilDate.parseCodes[character]=p}
return p?Ext.applyIf({c:p.c?xf(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.String.escapeRegex(character)}},parseFunctions:{"MS":function(input,strict){var r=(input||'').match(MSFormatRe);return r?new nativeDate(((r[1]||'')+r[2])*1):null},"time":function(input,strict){var num=parseInt(input,10);if(num||num===0){return new nativeDate(num)}
return null},"timestamp":function(input,strict){var num=parseInt(input,10);if(num||num===0){return new nativeDate(num*1000)}
return null}},parseRegexes:[],formatFunctions:{"MS":function(){return'\\/Date('+this.getTime()+')\\/'},"time":function(){return this.getTime().toString()},"timestamp":function(){return utilDate.format(this,'U')}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",DAYS_IN_WEEK:7,MONTHS_IN_YEAR:12,MAX_DAYS_IN_MONTH:31,SUNDAY:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6,defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{January:0,Jan:0,February:1,Feb:1,March:2,Mar:2,April:3,Apr:3,May:4,June:5,Jun:5,July:6,Jul:6,August:7,Aug:7,September:8,Sep:8,October:9,Oct:9,November:10,Nov:10,December:11,Dec:11},defaultFormat:'m/d/Y',defaultTimeFormat:'h:i A',firstDayOfWeek:0,weekendDays:[0,6],getShortMonthName:function(month){return utilDate.monthNames[month].substring(0,3)},getShortDayName:function(day){return utilDate.dayNames[day].substring(0,3)},getMonthNumber:function(name){return utilDate.monthNumbers[name.substring(0,1).toUpperCase()+name.substring(1,3).toLowerCase()]},formatContainsHourInfo:function(format){return hourInfoRe.test(format.replace(stripEscapeRe,''))},formatContainsDateInfo:function(format){return dateInfoRe.test(format.replace(stripEscapeRe,''))},isMonthFormat:function(format){return!!monthInfo[format]},isYearFormat:function(format){return!!yearInfo[format]},unescapeFormat:function(format){return format.replace(slashRe,'')},formatCodes:{d:"Ext.String.leftPad(m.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(m.getDay())",j:"m.getDate()",l:"Ext.Date.dayNames[m.getDay()]",N:"(m.getDay() ? m.getDay() : 7)",S:"Ext.Date.getSuffix(m)",w:"m.getDay()",z:"Ext.Date.getDayOfYear(m)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(m), 2, '0')",F:"Ext.Date.monthNames[m.getMonth()]",m:"Ext.String.leftPad(m.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(m.getMonth())",n:"(m.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(m)",L:"(Ext.Date.isLeapYear(m) ? 1 : 0)",o:"(m.getFullYear() + (Ext.Date.getWeekOfYear(m) == 1 && m.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(m) >= 52 && m.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(m.getFullYear(), 4, '0')",y:"('' + m.getFullYear()).substring(2, 4)",a:"(m.getHours() < 12 ? 'am' : 'pm')",A:"(m.getHours() < 12 ? 'AM' : 'PM')",g:"((m.getHours() % 12) ? m.getHours() % 12 : 12)",G:"m.getHours()",h:"Ext.String.leftPad((m.getHours() % 12) ? m.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(m.getHours(), 2, '0')",i:"Ext.String.leftPad(m.getMinutes(), 2, '0')",s:"Ext.String.leftPad(m.getSeconds(), 2, '0')",u:"Ext.String.leftPad(m.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(m)",P:"Ext.Date.getGMTOffset(m, true)",T:"Ext.Date.getTimezone(m)",Z:"(m.getTimezoneOffset() * -60)",c:function(){var c="Y-m-dTH:i:sP",code=[],l=c.length,i,e;for(i=0;i<l;++i){e=c.charAt(i);code.push(e==="T"?"'T'":utilDate.getFormatCode(e))}
return code.join(" + ")},C:function(){return'm.toISOString()'},U:"Math.round(m.getTime() / 1000)"},isValid:function(year,month,day,hour,minute,second,millisecond){var dt;hour=hour||0;minute=minute||0;second=second||0;millisecond=millisecond||0;dt=utilDate.add(new nativeDate(year<100?100:year,month-1,day,hour,minute,second,millisecond),utilDate.YEAR,year<100?year-100:0);return year===dt.getFullYear()&&month===dt.getMonth()+1&&day===dt.getDate()&&hour===dt.getHours()&&minute===dt.getMinutes()&&second===dt.getSeconds()&&millisecond===dt.getMilliseconds()},parse:function(input,format,strict){var p;if(!format){return utilDate.flexParse(input)}
p=utilDate.parseFunctions;if(p[format]==null){utilDate.createParser(format)}
return p[format].call(utilDate,input,Ext.isDefined(strict)?strict:utilDate.useStrict)},parseDate:function(input,format,strict){return utilDate.parse(input,format,strict)},getFormatCode:function(character){var f=utilDate.formatCodes[character];if(f){f=typeof f==='function'?f():f;utilDate.formatCodes[character]=f}
return f||("'"+Ext.String.escape(character)+"'")},createFormat:function(format){var code=[],special=!1,ch='',i;for(i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch==="\\"){special=!0}else if(special){special=!1;code.push("'"+Ext.String.escape(ch)+"'")}else{if(ch==='\n'){code.push("'\\n'")}else{code.push(utilDate.getFormatCode(ch))}}}
utilDate.formatFunctions[format]=Ext.functionFactory("var m = this; return "+code.join('+'))},createParser:function(format){var regexNum=utilDate.parseRegexes.length,currentGroup=1,calc=[],regex=[],special=!1,ch="",i=0,len=format.length,atEnd=[],obj;for(;i<len;++i){ch=format.charAt(i);if(!special&&ch==="\\"){special=!0}else if(special){special=!1;regex.push(Ext.String.escape(ch))}else{obj=utilDate.formatCodeToRegex(ch,currentGroup);currentGroup+=obj.g;regex.push(obj.s);if(obj.g&&obj.c){if(obj.calcAtEnd){atEnd.push(obj.c)}else{calc.push(obj.c)}}}}
calc=calc.concat(atEnd);utilDate.parseRegexes[regexNum]=new RegExp("^"+regex.join('')+"$",'i');utilDate.parseFunctions[format]=Ext.functionFactory("input","strict",xf(code,regexNum,calc.join('')))},parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|0[1-9])"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|[1-9])"},D:function(){var a=[],i;for(i=0;i<7;i++){a.push(utilDate.getShortDayName(i))}
return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+utilDate.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:1,c:"W = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},F:function(){return{g:1,c:"m = parseInt(me.getMonthNumber(results[{0}]), 10);\n",s:"("+utilDate.monthNames.join("|")+")"}},M:function(){var a=[],i;for(i=0;i<12;i++){a.push(utilDate.getShortMonthName(i))}
return Ext.applyIf({s:"("+a.join("|")+")"},utilDate.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|0[1-9])"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|[1-9])"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},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 > me.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\n"+"if (!h || h == 12) { h = 0; }\n"+"} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)",calcAtEnd:!0},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\n"+"if (!h || h == 12) { h = 0; }\n"+"} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)",calcAtEnd:!0},g:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|[1-9])"},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|1[0-9]|[0-9])"},h:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|0[1-9])"},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|[0-1][0-9])"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,5}"},Z:{g:1,c:"zz = results[{0}] * 1;\n"+"zz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var calc=[],arr=[utilDate.formatCodeToRegex("Y",1),utilDate.formatCodeToRegex("m",2),utilDate.formatCodeToRegex("d",3),utilDate.formatCodeToRegex("H",4),utilDate.formatCodeToRegex("i",5),utilDate.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if (results[8]) {","if (results[8] == 'Z') {","zz = 0;","}","else if (results[8].indexOf(':') > -1) {",utilDate.formatCodeToRegex("P",8).c,"}","else {",utilDate.formatCodeToRegex("O",8).c,"}","}"].join('\n')}],i,l;for(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+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},compare:function(d1,d2,includeTime){var s1,s2;if(typeof d1==='string'){d1=Ext.Date.parse(d1)}
if(typeof d2==='string'){d2=Ext.Date.parse(d2)}
s1=Ext.Date.format(d1,'C');s2=Ext.Date.format(d2,'C');if(!includeTime){s1=s1.substr(0,10);s2=s2.substr(0,10)}
return(s1<s2)?-1:((s2<s1)?1:0)},dateFormat:function(date,format){return utilDate.format(date,format)},isEqual:function(date1,date2){if(date1&&date2){return+date1===+date2}
return!(date1||date2)},format:function(date,format){var formatFunctions=utilDate.formatFunctions;if(!Ext.isDate(date)){return''}
if(formatFunctions[format]==null){utilDate.createFormat(format)}
return formatFunctions[format].call(date)+''},getTimezone:function(date){return date.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,5})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(date,colon){var offset=date.getTimezoneOffset();return(offset>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(offset)/60),2,"0")+(colon?":":"")+Ext.String.leftPad(Math.abs(offset%60),2,"0")},getDayOfYear:function(date){var num=0,d=utilDate.clone(date),m=date.getMonth(),i;for(i=0,d.setDate(1),d.setMonth(0);i<m;d.setMonth(++i)){num+=utilDate.getDaysInMonth(d)}
return num+date.getDate()-1},getWeekOfYear:(function(){var ms1d=864e5,ms7d=7*ms1d;return function(date){var DC3=nativeDate.UTC(date.getFullYear(),date.getMonth(),date.getDate()+3)/ms1d,AWN=Math.floor(DC3/7),Wyr=new nativeDate(AWN*ms7d).getUTCFullYear();return AWN-Math.floor(nativeDate.UTC(Wyr,0,7)/ms7d)+1}}()),isLeapYear:function(date){var year=date.getFullYear();return!!((year&3)===0&&(year%100||(year%400===0&&year)))},getFirstDayOfMonth:function(date){var day=(date.getDay()-(date.getDate()-1))%7;return(day<0)?(day+7):day},getLastDayOfMonth:function(date){return utilDate.getLastDateOfMonth(date).getDay()},getFirstDateOfMonth:function(date){return new nativeDate(date.getFullYear(),date.getMonth(),1)},getLastDateOfMonth:function(date){return new nativeDate(date.getFullYear(),date.getMonth(),utilDate.getDaysInMonth(date))},getDaysInMonth:(function(){var daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];return function(date){var m=date.getMonth();return m===1&&utilDate.isLeapYear(date)?29:daysInMonth[m]}}()),getSuffix:function(date){switch(date.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(date){return new nativeDate(date.getTime())},isDST:function(date){return new nativeDate(date.getFullYear(),0,1).getTimezoneOffset()!==date.getTimezoneOffset()},clearTime:function(date,clone){var d,hr,c;if(isNaN(date.getTime())){return date}
if(clone){return utilDate.clearTime(utilDate.clone(date))}
d=date.getDate();date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);if(date.getDate()!==d){for(hr=1,c=utilDate.add(date,utilDate.HOUR,hr);c.getDate()!==d;hr++,c=utilDate.add(date,utilDate.HOUR,hr));date.setDate(d);date.setHours(c.getHours())}
return date},add:function(date,interval,value,preventDstAdjust){var d=utilDate.clone(date),base=0,day,decimalValue;if(!interval||value===0){return d}
decimalValue=value-parseInt(value,10);value=parseInt(value,10);if(value){switch(interval.toLowerCase()){case utilDate.MILLI:if(preventDstAdjust){d.setMilliseconds(d.getMilliseconds()+value)}else{d.setTime(d.getTime()+value)}
break;case utilDate.SECOND:if(preventDstAdjust){d.setSeconds(d.getSeconds()+value)}else{d.setTime(d.getTime()+value*1000)}
break;case utilDate.MINUTE:if(preventDstAdjust){d.setMinutes(d.getMinutes()+value)}else{d.setTime(d.getTime()+value*60*1000)}
break;case utilDate.HOUR:if(preventDstAdjust){d.setHours(d.getHours()+value)}else{d.setTime(d.getTime()+value*60*60*1000)}
break;case utilDate.DAY:if(preventDstAdjust===!1){d.setTime(d.getTime()+value*24*60*60*1000)}else{d.setDate(d.getDate()+value)}
break;case utilDate.MONTH:day=date.getDate();if(day>28){day=Math.min(day,utilDate.getLastDateOfMonth(utilDate.add(utilDate.getFirstDateOfMonth(date),utilDate.MONTH,value)).getDate())}
d.setDate(day);d.setMonth(date.getMonth()+value);break;case utilDate.YEAR:day=date.getDate();if(day>28){day=Math.min(day,utilDate.getLastDateOfMonth(utilDate.add(utilDate.getFirstDateOfMonth(date),utilDate.YEAR,value)).getDate())}
d.setDate(day);d.setFullYear(date.getFullYear()+value);break}}
if(decimalValue){switch(interval.toLowerCase()){case utilDate.MILLI:base=1;break;case utilDate.SECOND:base=1000;break;case utilDate.MINUTE:base=1000*60;break;case utilDate.HOUR:base=1000*60*60;break;case utilDate.DAY:base=1000*60*60*24;break;case utilDate.MONTH:day=utilDate.getDaysInMonth(d);base=1000*60*60*24*day;break;case utilDate.YEAR:day=(utilDate.isLeapYear(d)?366:365);base=1000*60*60*24*day;break}
if(base){d.setTime(d.getTime()+base*decimalValue)}}
return d},subtract:function(date,interval,value,preventDstAdjust){return utilDate.add(date,interval,-value,preventDstAdjust)},between:function(date,start,end){var t=date.getTime();return start.getTime()<=t&&t<=end.getTime()},isWeekend:function(date){return Ext.Array.indexOf(this.weekendDays,date.getDay())>-1},utcToLocal:function(d){return new Date(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds())},localToUtc:function(d){return utilDate.utc(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds())},utc:function(year,month,day,hour,min,s,ms){return new Date(Date.UTC(year,month,day,hour||0,min||0,s||0,ms||0))},compat:function(){var p,statics=['useStrict','formatCodeToRegex','parseFunctions','parseRegexes','formatFunctions','y2kYear','MILLI','SECOND','MINUTE','HOUR','DAY','MONTH','YEAR','defaults','dayNames','monthNames','monthNumbers','getShortMonthName','getShortDayName','getMonthNumber','formatCodes','isValid','parseDate','getFormatCode','createFormat','createParser','parseCodes'],proto=['dateFormat','format','getTimezone','getGMTOffset','getDayOfYear','getWeekOfYear','isLeapYear','getFirstDayOfMonth','getLastDayOfMonth','getDaysInMonth','getSuffix','clone','isDST','clearTime','add','between'],sLen=statics.length,pLen=proto.length,stat,prot,s;for(s=0;s<sLen;s++){stat=statics[s];nativeDate[stat]=utilDate[stat]}
for(p=0;p<pLen;p++){prot=proto[p];nativeDate.prototype[prot]=function(){var args=Array.prototype.slice.call(arguments);args.unshift(this);return utilDate[prot].apply(utilDate,args)}}},diff:function(min,max,unit){var diff=+max-min,est;switch(unit){case utilDate.MILLI:return diff;case utilDate.SECOND:return Math.floor(diff/1000);case utilDate.MINUTE:return Math.floor(diff/60000);case utilDate.HOUR:return Math.floor(diff/3600000);case utilDate.DAY:return Math.floor(diff/86400000);case 'w':return Math.floor(diff/604800000);case utilDate.MONTH:est=(max.getFullYear()*12+max.getMonth())-(min.getFullYear()*12+min.getMonth());if(utilDate.add(min,unit,est)>max){return est-1}
return est;case utilDate.YEAR:est=max.getFullYear()-min.getFullYear();if(utilDate.add(min,unit,est)>max){return est-1}else{return est}}},align:function(date,unit,step){var num=new nativeDate(+date);switch(unit.toLowerCase()){case utilDate.MILLI:return num;case utilDate.SECOND:num.setUTCSeconds(num.getUTCSeconds()-num.getUTCSeconds()%step);num.setUTCMilliseconds(0);return num;case utilDate.MINUTE:num.setUTCMinutes(num.getUTCMinutes()-num.getUTCMinutes()%step);num.setUTCSeconds(0);num.setUTCMilliseconds(0);return num;case utilDate.HOUR:num.setUTCHours(num.getUTCHours()-num.getUTCHours()%step);num.setUTCMinutes(0);num.setUTCSeconds(0);num.setUTCMilliseconds(0);return num;case utilDate.DAY:if(step===7||step===14){num.setUTCDate(num.getUTCDate()-num.getUTCDay()+1)}
num.setUTCHours(0);num.setUTCMinutes(0);num.setUTCSeconds(0);num.setUTCMilliseconds(0);return num;case utilDate.MONTH:num.setUTCMonth(num.getUTCMonth()-(num.getUTCMonth()-1)%step,1);num.setUTCHours(0);num.setUTCMinutes(0);num.setUTCSeconds(0);num.setUTCMilliseconds(0);return num;case utilDate.YEAR:num.setUTCFullYear(num.getUTCFullYear()-num.getUTCFullYear()%step,1,1);num.setUTCHours(0);num.setUTCMinutes(0);num.setUTCSeconds(0);num.setUTCMilliseconds(0);return date}},flexParse:function(inDate,defaultFormat){var parts=datePartsRe.exec(inDate),firstFormatToken,day,month,year,result;if(!parts){return Ext.Date.parse(inDate,'C')}
if(!defaultFormat){defaultFormat=Ext.Date.defaultFormat}
if(!(parts[2]||parts[4])){firstFormatToken=defaultFormat[0];if(!yearInfo[firstFormatToken]&&(dayInfo[firstFormatToken]||(parts[1]>12&&parts[3]<13))){day=parseInt(parts[1]);month=parseInt(parts[3])-1;year=parseInt(parts[5])}else if(!yearInfo[firstFormatToken]&&(monthInfo[firstFormatToken]||(parts[3]>12&&parts[1]<13))){month=parseInt(parts[1])-1;day=parseInt(parts[3]);year=parseInt(parts[5])}else{year=parseInt(parts[1]);month=parseInt(parts[3])-1;day=parseInt(parts[5])}}else{if(parts[2]&&parts[4]){return null}
if(parts[2]){month=utilDate.monthNumbers[Ext.String.capitalize(parts[2].substr(0,3))];day=parseInt(parts[3]);year=parseInt(parts[5])}else{day=parseInt(parts[1]);month=utilDate.monthNumbers[Ext.String.capitalize(parts[4].substr(0,3))];year=parseInt(parts[5])}}
if(isNaN(month)||(month<0||month>11)){return null}
if(year<utilDate.y2kYear){year+=2000}
result=new Date(year,month,1,0,0,0);if(day<1||day>Ext.Date.getDaysInMonth(result)){return null}
result.setDate(day);return result}};utilDate.parseCodes.C=utilDate.parseCodes.c;return utilDate}())
;
Ext.Function=(function(){var lastTime=0,animFrameId,animFrameHandlers=[],animFrameNoArgs=[],idSource=0,animFrameMap={},slice=Array.prototype.slice,win=window,global=Ext.global,hasImmediate=!Ext.disableImmediate&&!!(global.setImmediate&&global.clearImmediate),requestAnimFrame=win.requestAnimationFrame||win.webkitRequestAnimationFrame||win.mozRequestAnimationFrame||win.oRequestAnimationFrame||function(callback){var currTime=Ext.now(),timeToCall=Math.max(0,16-(currTime-lastTime)),timerFn=function(){callback(currTime+timeToCall)},id;timerFn.$origFn=callback.$origFn||callback;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;id=win.setTimeout(timerFn,timeToCall);lastTime=currTime+timeToCall;return id},fireHandlers=function(){var len=animFrameHandlers.length,id,i,handler;animFrameId=null;var timer;for(i=0;i<len;i++){handler=animFrameHandlers[i];id=handler[3];if(animFrameMap[id]){delete animFrameMap[id];timer=Ext.Timer.get(id,'raf');if(timer){timer.tick()}
handler[0].apply(handler[1]||global,handler[2]||animFrameNoArgs);if(timer){timer.tock()}}}
animFrameHandlers=animFrameHandlers.slice(len)},fireElevatedHandlers=function(){Ext.elevate(fireHandlers)},ExtFunction={flexSetter:function(setter){return function(name,value){var k,i;if(name!==null){if(typeof name!=='string'){for(k in name){if(name.hasOwnProperty(k)){setter.call(this,k,name[k])}}
if(Ext.enumerables){for(i=Ext.enumerables.length;i--;){k=Ext.enumerables[i];if(name.hasOwnProperty(k)){setter.call(this,k,name[k])}}}}else{setter.call(this,name,value)}}
return this}},bind:function(fn,scope,args,appendArgs){if(arguments.length<=2){return fn.bind(scope)}
var method=fn;return function(){var callArgs=args||arguments;if(appendArgs===!0){callArgs=slice.call(arguments,0);callArgs=callArgs.concat(args)}else if(typeof appendArgs==='number'){callArgs=slice.call(arguments,0);Ext.Array.insert(callArgs,appendArgs,args)}
return method.apply(scope||global,callArgs)}},bindCallback:function(callback,scope,args,delay,caller){return function(){var a=slice.call(arguments);return Ext.callback(callback,scope,args?args.concat(a):a,delay,caller)}},pass:function(fn,args,scope){if(!Ext.isArray(args)){if(Ext.isIterable(args)){args=Ext.Array.clone(args)}else{args=args!==undefined?[args]:[]}}
return function(){var fnArgs=args.slice();fnArgs.push.apply(fnArgs,arguments);return fn.apply(scope||this,fnArgs)}},alias:function(object,methodName){return function(){return object[methodName].apply(object,arguments)}},clone:function(method){var newMethod,prop;newMethod=function(){return method.apply(this,arguments)};for(prop in method){if(method.hasOwnProperty(prop)){newMethod[prop]=method[prop]}}
return newMethod},createInterceptor:function(origFn,newFn,scope,returnValue){if(!Ext.isFunction(newFn)){return origFn}else{returnValue=Ext.isDefined(returnValue)?returnValue:null;return function(){var me=this,args=arguments;return(newFn.apply(scope||me||global,args)!==!1)?origFn.apply(me||global,args):returnValue}}},createDelayed:function(fn,delay,scope,args,appendArgs){var boundFn=fn;if(scope||args){boundFn=Ext.Function.bind(fn,scope,args,appendArgs)}
return function(){var me=this,args=slice.call(arguments),timerFn,timerId;var timer;timerFn=function(){Ext.elevate(boundFn,me,args,timer)};timerId=setTimeout(timerFn,delay);timerFn.$origFn=fn.$origFn||fn;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;timer=Ext.Timer.created('timeout',timerId,{type:'createDelayed',fn:fn,timerFn:timerFn})}},defer:function(fn,millis,scope,args,appendArgs){var timerId=0,timerFn,boundFn;var timer;if(!scope&&!args&&!appendArgs){boundFn=fn}else{boundFn=Ext.Function.bind(fn,scope,args,appendArgs)}
if(millis>0){timerFn=function(){Ext.elevate(boundFn,null,null,timer)};timerId=setTimeout(timerFn,millis);timerFn.$origFn=fn.$origFn||fn;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;timer=Ext.Timer.created('timeout',timerId,{type:'defer',fn:fn,timerFn:timerFn})}else{boundFn()}
return timerId},interval:function(fn,millis,scope,args,appendArgs){var timerFn,timerId,boundFn;var timer;boundFn=Ext.Function.bind(fn,scope,args,appendArgs);timerFn=function(){Ext.elevate(boundFn,null,null,timer)};timerId=setInterval(timerFn,millis);timerFn.$origFn=boundFn.$origFn||fn;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;timer=Ext.Timer.created('interval',timerId,{type:'interval',fn:fn,timerFn:timerFn});return timerId},createSequence:function(originalFn,newFn,scope){if(!newFn){return originalFn}else{return function(){var result=originalFn.apply(this,arguments);newFn.apply(scope||this,arguments);return result}}},createBuffered:function(fn,buffer,scope,args){var timerId,result=function(){var callArgs=args||slice.call(arguments,0),me=scope||this,timerFn;var timer;if(timerId){Ext.undefer(timerId)}
timerFn=function(){Ext.elevate(fn,me,callArgs,timer)};result.timer=timerId=setTimeout(timerFn,buffer);timerFn.$origFn=fn.$origFn||fn;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;timer=Ext.Timer.created('timeout',timerId,{type:'createBuffered',fn:fn,timerFn:timerFn})};return result},createAnimationFrame:function(fn,scope,args,queueStrategy){var boundFn,timerId;queueStrategy=queueStrategy||3;boundFn=function(){var timerFn,callArgs=args||slice.call(arguments,0);scope=scope||this;if(queueStrategy===3&&timerId){ExtFunction.cancelAnimationFrame(timerId)}
if((queueStrategy&1)||!timerId){timerFn=function(){timerId=boundFn.timerId=null;fn.apply(scope,callArgs)};timerFn.$origFn=fn.$origFn||fn;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;timerId=boundFn.timerId=ExtFunction.requestAnimationFrame(timerFn)}};return boundFn},requestAnimationFrame:function(fn,scope,args){var id=++idSource,handler=slice.call(arguments,0);handler[3]=id;animFrameMap[id]=1;Ext.Timer.created('raf',id,{type:'raf',fn:fn});animFrameHandlers.push(handler);if(!animFrameId){animFrameId=requestAnimFrame(fireElevatedHandlers)}
return id},cancelAnimationFrame:function(id){delete animFrameMap[id];Ext.Timer.cancel('raf',id)},createThrottled:function(fn,interval,scope){var lastCallTime=0,elapsed,lastArgs,timerId,execute=function(){fn.apply(scope,lastArgs);lastCallTime=Ext.now();lastArgs=timerId=null};execute.$origFn=fn.$origFn||fn;execute.$skipTimerCheck=execute.$origFn.$skipTimerCheck;return function(){if(!scope){scope=this}
elapsed=Ext.now()-lastCallTime;lastArgs=Ext.Array.slice(arguments);if(elapsed>=interval){Ext.undefer(timerId);execute()}else if(!timerId){timerId=Ext.defer(execute,interval-elapsed)}}},createBarrier:function(count,fn,scope){var barrierFn=function(){if(!--count){fn.apply(scope,arguments)}};barrierFn.$origFn=fn.$origFn||fn;barrierFn.$skipTimerCheck=barrierFn.$origFn.$skipTimerCheck;return barrierFn},interceptBefore:function(object,methodName,fn,scope){var method=object[methodName]||Ext.emptyFn;return(object[methodName]=function(){var ret=fn.apply(scope||this,arguments);method.apply(this,arguments);return ret})},interceptAfter:function(object,methodName,fn,scope){var method=object[methodName]||Ext.emptyFn;return(object[methodName]=function(){method.apply(this,arguments);return fn.apply(scope||this,arguments)})},interceptAfterOnce:function(object,methodName,fn,scope){var origMethod=object[methodName],newMethod;newMethod=function(){var ret;if(origMethod){origMethod.apply(this,arguments)}
ret=fn.apply(scope||this,arguments);object[methodName]=origMethod;object=methodName=fn=scope=origMethod=newMethod=null;return ret};object[methodName]=newMethod;return newMethod},makeCallback:function(callback,scope){if(!scope[callback]){if(scope.$className){Ext.raise('No method "'+callback+'" on '+scope.$className)}
Ext.raise('No method "'+callback+'"')}
return function(){return scope[callback].apply(scope,arguments)}},memoize:function(fn,scope,hashFn){var memo={},isFunc=hashFn&&Ext.isFunction(hashFn);return function(value){var key=isFunc?hashFn.apply(scope,arguments):value;if(!(key in memo)){memo[key]=fn.apply(scope,arguments)}
return memo[key]}},_stripCommentRe:/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(\/\/.*)/g,toCode:function(fn){var s=fn?fn.toString():'';s=s.replace(ExtFunction._stripCommentRe,'');return s},fireElevatedHandlers:function(){fireElevatedHandlers()}};Ext.asap=hasImmediate?function(fn,scope,parameters){var boundFn=fn,timerFn,timerId;var timer;if(scope!=null||parameters!=null){boundFn=ExtFunction.bind(fn,scope,parameters)}
timerFn=function(){Ext.elevate(boundFn,null,null,timer)};timerId=setImmediate(timerFn);timerFn.$origFn=fn.$origFn||fn;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;timer=Ext.Timer.created('asap',timerId,{type:'asap',fn:fn,timerFn:timerFn});return timerId}:function(fn,scope,parameters){var boundFn=fn,timerFn,timerId;var timer;if(scope!=null||parameters!=null){boundFn=ExtFunction.bind(fn,scope,parameters)}
timerFn=function(){Ext.elevate(boundFn,null,null,timer)};timerId=setTimeout(timerFn,0,!0);timerFn.$origFn=fn.$origFn||fn;timerFn.$skipTimerCheck=timerFn.$origFn.$skipTimerCheck;timer=Ext.Timer.created('timeout',timerId,{type:'asap',fn:fn,timerFn:timerFn});return timerId};Ext.unasap=hasImmediate?function(id){if(id){clearImmediate(id);Ext.Timer.cancel('asap',id)}
return null}:function(id){return Ext.undefer(id)};Ext.asapCancel=function(id){return Ext.unasap(id)};Ext.defer=ExtFunction.defer;Ext.undefer=function(id){if(id){clearTimeout(id);Ext.Timer.cancel('timeout',id)}
return null};Ext.interval=ExtFunction.interval;Ext.uninterval=function(id){if(id){clearInterval(id);Ext.Timer.cancel('interval',id)}
return null};Ext.pass=ExtFunction.pass;Ext.bind=ExtFunction.bind;Ext.raf=function(){return ExtFunction.requestAnimationFrame.apply(ExtFunction,arguments)};Ext.unraf=function(id){ExtFunction.cancelAnimationFrame(id)};return ExtFunction})()
;
Ext.Number=(new function(){var ExtNumber=this,isToFixedBroken=(0.9).toFixed()!=='1',math=Math,ClipDefault={count:!1,inclusive:!1,wrap:!0};Number.MIN_SAFE_INTEGER=Number.MIN_SAFE_INTEGER||-(math.pow(2,53)-1);Number.MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||math.pow(2,53)-1;Ext.apply(ExtNumber,{MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,floatRe:/^[-+]?(?:\d+|\d*\.\d*)(?:[Ee][+-]?\d+)?$/,intRe:/^[-+]?\d+(?:[Ee]\+?\d+)?$/,Clip:{DEFAULT:ClipDefault,COUNT:Ext.applyIf({count:!0},ClipDefault),INCLUSIVE:Ext.applyIf({inclusive:!0},ClipDefault),NOWRAP:Ext.applyIf({wrap:!1},ClipDefault)},parseFloat:function(value){if(value===undefined){value=null}
if(value!==null&&typeof value!=='number'){value=String(value);value=ExtNumber.floatRe.test(value)?+value:null;if(isNaN(value)){value=null}}
return value},parseInt:function(value){if(value===undefined){value=null}
if(typeof value==='number'){value=Math.floor(value)}else if(value!==null){value=String(value);value=ExtNumber.intRe.test(value)?+value:null}
return value},binarySearch:function(array,value,begin,end){var middle,midVal;if(begin===undefined){begin=0}
if(end===undefined){end=array.length}
--end;while(begin<=end){middle=(begin+end)>>>1;midVal=array[middle];if(value===midVal){return middle}
if(midVal<value){begin=middle+1}else{end=middle-1}}
return begin},bisectTuples:function(array,value,index,begin,end){var middle,midVal;if(begin===undefined){begin=0}
if(end===undefined){end=array.length}
--end;while(begin<=end){middle=(begin+end)>>>1;midVal=array[middle][index];if(value===midVal){return middle}
if(midVal<value){begin=middle+1}else{end=middle-1}}
return begin},clipIndices:function(length,indices,options){var defaultValue=0,wrap,begin,end,i;options=options||ClipDefault;wrap=options.wrap;indices=indices||[];for(i=0;i<2;++i){begin=end;end=indices[i];if(end==null){end=defaultValue}else if(i&&options.count){end+=begin;end=(end>length)?length:end}else{if(wrap){end=(end<0)?(length+end):end}
if(i&&options.inclusive){++end}
end=(end<0)?0:((end>length)?length:end)}
defaultValue=length}
indices[0]=begin;indices[1]=(end<begin)?begin:end;return indices},constrain:function(number,min,max){var x=parseFloat(number);if(min===null){min=number}
if(max===null){max=number}
return(x<min)?min:((x>max)?max:x)},snap:function(value,increment,minValue,maxValue){var m;if(value===undefined||value<minValue){return minValue||0}
if(increment){m=value%increment;if(m!==0){value-=m;if(m*2>=increment){value+=increment}else if(m*2<-increment){value-=increment}}}
return ExtNumber.constrain(value,minValue,maxValue)},snapInRange:function(value,increment,minValue,maxValue){var tween;minValue=(minValue||0);if(value===undefined||value<minValue){return minValue}
if(increment&&(tween=((value-minValue)%increment))){value-=tween;tween*=2;if(tween>=increment){value+=increment}}
if(maxValue!==undefined){if(value>(maxValue=ExtNumber.snapInRange(maxValue,increment,minValue))){value=maxValue}}
return value},roundToNearest:function(value,interval){interval=interval||1;return interval*math.round(value/interval)},roundToPrecision:function(value,precision){var factor=math.pow(10,precision||1);return math.round(value*factor)/factor},truncateToPrecision:function(value,precision){var factor=math.pow(10,precision||1);return parseInt(value*factor,10)/factor},sign:math.sign||function(x){x=+x;if(x===0||isNaN(x)){return x}
return(x>0)?1:-1},log10:math.log10||function(x){return math.log(x)*math.LOG10E},isEqual:function(n1,n2,epsilon){if(!(typeof n1==='number'&&typeof n2==='number'&&typeof epsilon==='number')){Ext.raise("All parameters should be valid numbers.")}
return math.abs(n1-n2)<epsilon},isFinite:Number.isFinite||function(value){return typeof value==='number'&&isFinite(value)},isInteger:Number.isInteger||function(value){return~~(value+0)===value},toFixed:isToFixedBroken?function(value,precision){var pow;precision=precision||0;pow=math.pow(10,precision);return(math.round(value*pow)/pow).toFixed(precision)}:function(value,precision){return value.toFixed(precision)},from:function(value,defaultValue){if(isFinite(value)){value=parseFloat(value)}
return!isNaN(value)?value:defaultValue},randomInt:function(from,to){return math.floor(math.random()*(to-from+1)+from)},correctFloat:function(n){return parseFloat(n.toPrecision(14))}});Ext.num=function(){return ExtNumber.from.apply(this,arguments)}}())
;
(function(){var TemplateClass=function(){},queryRe=/^\?/,keyRe=/(\[):?([^\]]*)\]/g,nameRe=/^([^\[]+)/,plusRe=/\+/g,ExtObject;ExtObject=Ext.Object={chain:Object.create||function(object){var result;TemplateClass.prototype=object;result=new TemplateClass();TemplateClass.prototype=null;return result},clear:function(object){var key;for(key in object){delete object[key]}
return object},freeze:Object.freeze?function(obj,deep){var name;if(obj&&typeof obj==='object'&&!Object.isFrozen(obj)){Object.freeze(obj);if(deep){for(name in obj){ExtObject.freeze(obj[name],deep)}}}
return obj}:Ext.identityFn,toQueryObjects:function(name,value,recursive){var self=ExtObject.toQueryObjects,objects=[],i,ln;if(Ext.isArray(value)){for(i=0,ln=value.length;i<ln;i++){if(recursive){objects=objects.concat(self(name+'['+i+']',value[i],!0))}else{objects.push({name:name,value:value[i]})}}}else if(Ext.isObject(value)){for(i in value){if(value.hasOwnProperty(i)){if(recursive){objects=objects.concat(self(name+'['+i+']',value[i],!0))}else{objects.push({name:name,value:value[i]})}}}}else{objects.push({name:name,value:value})}
return objects},toQueryString:function(object,recursive){var paramObjects=[],params=[],i,j,ln,paramObject,value;for(i in object){if(object.hasOwnProperty(i)){paramObjects=paramObjects.concat(ExtObject.toQueryObjects(i,object[i],recursive))}}
for(j=0,ln=paramObjects.length;j<ln;j++){paramObject=paramObjects[j];value=paramObject.value;if(Ext.isEmpty(value)){value=''}else if(Ext.isDate(value)){value=Ext.Date.toString(value)}
params.push(encodeURIComponent(paramObject.name)+'='+encodeURIComponent(String(value)))}
return params.join('&')},fromQueryString:function(queryString,recursive){var parts=queryString.replace(queryRe,'').split('&'),object={},temp,components,name,value,i,ln,part,j,subLn,matchedKeys,matchedName,keys,key,nextKey;for(i=0,ln=parts.length;i<ln;i++){part=parts[i];if(part.length>0){components=part.split('=');name=components[0];name=name.replace(plusRe,'%20');name=decodeURIComponent(name);value=components[1];if(value!==undefined){value=value.replace(plusRe,'%20');value=decodeURIComponent(value)}else{value=''}
if(!recursive){if(object.hasOwnProperty(name)){if(!Ext.isArray(object[name])){object[name]=[object[name]]}
object[name].push(value)}else{object[name]=value}}else{matchedKeys=name.match(keyRe);matchedName=name.match(nameRe);if(!matchedName){throw new Error('[Ext.Object.fromQueryString] Malformed query string given, failed parsing name from "'+part+'"')}
name=matchedName[0];keys=[];if(matchedKeys===null){object[name]=value;continue}
for(j=0,subLn=matchedKeys.length;j<subLn;j++){key=matchedKeys[j];key=(key.length===2)?'':key.substring(1,key.length-1);keys.push(key)}
keys.unshift(name);temp=object;for(j=0,subLn=keys.length;j<subLn;j++){key=keys[j];if(j===subLn-1){if(Ext.isArray(temp)&&key===''){temp.push(value)}else{temp[key]=value}}else{if(temp[key]===undefined||typeof temp[key]==='string'){nextKey=keys[j+1];temp[key]=(Ext.isNumeric(nextKey)||nextKey==='')?[]:{}}
temp=temp[key]}}}}}
return object},each:function(object,fn,scope){var enumerables=Ext.enumerables,i,property;if(object){scope=scope||object;for(property in object){if(object.hasOwnProperty(property)){if(fn.call(scope,property,object[property],object)===!1){return}}}
if(enumerables){for(i=enumerables.length;i--;){if(object.hasOwnProperty(property=enumerables[i])){if(fn.call(scope,property,object[property],object)===!1){return}}}}}},eachValue:function(object,fn,scope){var enumerables=Ext.enumerables,i,property;scope=scope||object;for(property in object){if(object.hasOwnProperty(property)){if(fn.call(scope,object[property])===!1){return}}}
if(enumerables){for(i=enumerables.length;i--;){if(object.hasOwnProperty(property=enumerables[i])){if(fn.call(scope,object[property])===!1){return}}}}},merge:function(destination){var i=1,args=arguments,ln=args.length,mergeFn=ExtObject.merge,cloneFn=Ext.clone,object,key,value,sourceKey;for(;i<ln;i++){object=args[i];for(key in object){value=object[key];if(value&&value.constructor===Object){sourceKey=destination[key];if(sourceKey&&sourceKey.constructor===Object){mergeFn(sourceKey,value)}else{destination[key]=cloneFn(value)}}else{destination[key]=value}}}
return destination},mergeIf:function(destination){var i=1,ln=arguments.length,cloneFn=Ext.clone,object,key,value;for(;i<ln;i++){object=arguments[i];for(key in object){if(!(key in destination)){value=object[key];if(value&&value.constructor===Object){destination[key]=cloneFn(value)}else{destination[key]=value}}}}
return destination},getAllKeys:function(object){var keys=[],property;for(property in object){keys.push(property)}
return keys},getKey:function(object,value){var property;for(property in object){if(object.hasOwnProperty(property)&&object[property]===value){return property}}
return null},getValues:function(object){var values=[],property;for(property in object){if(object.hasOwnProperty(property)){values.push(object[property])}}
return values},getKeys:(typeof Object.keys==='function')?function(object){if(!object){return[]}
return Object.keys(object)}:function(object){var keys=[],property;for(property in object){if(object.hasOwnProperty(property)){keys.push(property)}}
return keys},getSize:function(object){var size=0,property;for(property in object){if(object.hasOwnProperty(property)){size++}}
return size},isEmpty:function(object){var key;for(key in object){if(object.hasOwnProperty(key)){return!1}}
return!0},equals:(function(){var check=function(o1,o2){var key;for(key in o1){if(o1.hasOwnProperty(key)){if(o1[key]!==o2[key]){return!1}}}
return!0};return function(object1,object2){if(object1===object2){return!0}
if(object1&&object2){return check(object1,object2)&&check(object2,object1)}else if(!object1&&!object2){return object1===object2}else{return!1}}})(),fork:function(obj){var ret,key,value;if(obj&&obj.constructor===Object){ret=ExtObject.chain(obj);for(key in obj){value=obj[key];if(value){if(value.constructor===Object){ret[key]=ExtObject.fork(value)}else if(value instanceof Array){ret[key]=Ext.Array.clone(value)}}}}else{ret=obj}
return ret},defineProperty:('defineProperty' in Object)?Object.defineProperty:function(object,name,descriptor){if(!Object.prototype.__defineGetter__){return}
if(descriptor.get){object.__defineGetter__(name,descriptor.get)}
if(descriptor.set){object.__defineSetter__(name,descriptor.set)}},classify:function(object){var prototype=object,objectProperties=[],propertyClassesMap={},objectClass,key,value;objectClass=function(){var property,i,ln;for(i=0,ln=objectProperties.length;i<ln;i++){property=objectProperties[i];this[property]=new propertyClassesMap[property]()}};for(key in object){if(object.hasOwnProperty(key)){value=object[key];if(value&&value.constructor===Object){objectProperties.push(key);propertyClassesMap[key]=ExtObject.classify(value)}}}
objectClass.prototype=prototype;return objectClass}};Ext.merge=Ext.Object.merge;Ext.mergeIf=Ext.Object.mergeIf}())
;
Ext.apply(Ext,{_namedScopes:{'this':{isThis:1},controller:{isController:1},owner:{isOwner:1},up:{isUp:1},self:{isSelf:1},'self.controller':{isSelf:1,isController:1}},scrollbar:{_size:null,size:function(force){var scrollbar=Ext.scrollbar,size=scrollbar._size;if(!Ext.isDomReady){Ext.raise("Ext.scrollbar.size() called before DomReady")}
if(force||!size){var db=document.body,div=document.createElement('div'),h,w;div.style.width=div.style.height='100px';div.style.overflow='scroll';div.style.position='absolute';db.appendChild(div);scrollbar._size=size={width:w=div.offsetWidth-div.clientWidth,height:h=div.offsetHeight-div.clientHeight};size.reservedWidth=w?'calc(100% - '+w+'px)':'';size.reservedHeight=h?'calc(100% - '+h+'px)':'';db.removeChild(div)}
return size},height:function(force){return Ext.scrollbar.size(force).height},width:function(force){return Ext.scrollbar.size(force).width}},escapeId:(function(){var validIdRe=/^[a-zA-Z_][a-zA-Z0-9_\-]*$/i,escapeRx=/([\W]{1})/g,leadingNumRx=/^(\d)/g,escapeFn=function(match,capture){return"\\"+capture},numEscapeFn=function(match,capture){return'\\00'+capture.charCodeAt(0).toString(16)+' '};return function(id){return validIdRe.test(id)?id:id.replace(escapeRx,escapeFn).replace(leadingNumRx,numEscapeFn)}}()),lookUpFn:function(from,fn){if(!from||!Ext.isFunction(from.up)){Ext.raise('Callback "up" syntax requires a caller with "up" method')}
var controller,scope;for(scope=from.up();scope&&!scope[fn];scope=scope.up()){controller=scope.controller;if(controller&&controller[fn]){scope=controller;break}}
if(!scope||!Ext.isFunction(scope[fn])){Ext.raise('No such method "'+fn+'" found up() from '+(from.getId?from.getId():from.id))}
return scope},callback:function(callback,scope,args,delay,caller,defaultScope){if(!callback){return}
var namedScope=(scope in Ext._namedScopes),ret;if(callback.charAt){if(callback[2]==='.'){if(callback.substr(0,2)!=='up'){Ext.raise('Invalid callback method name "'+callback+'"')}
if(scope){Ext.raise('Callback "up" syntax is incompatible with scopes')}
scope=Ext.lookUpFn(caller,callback=callback.substr(3))}else if(caller){if(namedScope&&namedScope.isUp){scope=Ext.lookUpFn(caller,callback)}else if(!scope||namedScope){scope=caller.resolveListenerScope(namedScope?scope:defaultScope)}}
if(!scope||!Ext.isObject(scope)){Ext.raise('Named method "'+callback+'" requires a scope object')}
if(!Ext.isFunction(scope[callback])){Ext.raise('No method named "'+callback+'" on '+(scope.$className||'scope object'))}
callback=scope[callback]}else if(namedScope){scope=defaultScope||caller}else if(!scope){scope=caller}
if(callback&&Ext.isFunction(callback)){scope=scope||Ext.global;if(delay){Ext.defer(callback,delay,scope,args)}else{ret=args?callback.apply(scope,args):callback.call(scope)}}
return ret},coerce:function(from,to){var fromType=Ext.typeOf(from),toType=Ext.typeOf(to),isString=typeof from==='string';if(fromType!==toType){switch(toType){case 'string':return String(from);case 'number':return Number(from);case 'boolean':return isString&&(!from||from==='false'||from==='0')?!1:Boolean(from);case 'null':return isString&&(!from||from==='null')?null:!1;case 'undefined':return isString&&(!from||from==='undefined')?undefined:!1;case 'date':return isString&&isNaN(from)?Ext.Date.parse(from,Ext.Date.defaultFormat):Date(Number(from))}}
return from},copyTo:function(dest,source,names,usePrototypeKeys){var name,i,n;if(typeof names==='string'){names=names.split(Ext.propertyNameSplitRe)}
for(i=0,n=names?names.length:0;i<n;i++){name=names[i];if(usePrototypeKeys||source.hasOwnProperty(name)){dest[name]=source[name]}}
return dest},copy:function(dest,source,names,usePrototypeKeys){var name,i,n;if(typeof names==='string'){names=names.split(Ext.propertyNameSplitRe)}
for(i=0,n=names?names.length:0;i<n;i++){name=names[i];if(source.hasOwnProperty(name)||(usePrototypeKeys&&name in source)){dest[name]=source[name]}}
return dest},propertyNameSplitRe:/[,;\s]+/,copyToIf:function(destination,source,names){var name,i,n;if(typeof names==='string'){names=names.split(Ext.propertyNameSplitRe)}
for(i=0,n=names?names.length:0;i<n;i++){name=names[i];if(destination[name]===undefined){destination[name]=source[name]}}
return destination},copyIf:function(destination,source,names){var name,i,n;if(typeof names==='string'){names=names.split(Ext.propertyNameSplitRe)}
for(i=0,n=names?names.length:0;i<n;i++){name=names[i];if(!(name in destination)&&(name in source)){destination[name]=source[name]}}
return destination},extend:(function(){var objectConstructor=Object.prototype.constructor,inlineOverrides=function(o){var m;for(m in o){if(!o.hasOwnProperty(m)){continue}
this[m]=o[m]}};return function(subclass,superclass,overrides){if(Ext.isObject(superclass)){overrides=superclass;superclass=subclass;subclass=overrides.constructor!==objectConstructor?overrides.constructor:function(){superclass.apply(this,arguments)}}
if(!superclass){Ext.raise({sourceClass:'Ext',sourceMethod:'extend',msg:'Attempting to extend from a class which has not been loaded on the page.'})}
var F=function(){},superclassProto=superclass.prototype,subclassProto;F.prototype=superclassProto;subclassProto=subclass.prototype=new F();subclassProto.constructor=subclass;subclass.superclass=superclassProto;if(superclassProto.constructor===objectConstructor){superclassProto.constructor=superclass}
subclass.override=function(overrides){Ext.override(subclass,overrides)};subclassProto.override=inlineOverrides;subclassProto.proto=subclassProto;subclass.override(overrides);subclass.extend=function(o){return Ext.extend(subclass,o)};return subclass}}()),isOnline:function(){return Ext.global.navigator.onLine},iterate:function(object,fn,scope){if(Ext.isEmpty(object)){return}
if(scope===undefined){scope=object}
if(Ext.isIterable(object)){Ext.Array.each.call(Ext.Array,object,fn,scope)}else{Ext.Object.each.call(Ext.Object,object,fn,scope)}},_resourcePoolRe:/^[<]([^<>@:]*)(?:[@]([^<>@:]+))?[>](.+)$/,resolveResource:function(url){var ret=url,m;if(url&&url.charAt(0)==='<'){m=Ext._resourcePoolRe.exec(url);if(m){ret=Ext.getResourcePath(m[3],m[1],m[2])}}
return ret},urlEncode:function(){var args=Ext.Array.from(arguments),prefix='';if(Ext.isString(args[1])){prefix=args[1]+'&';args[1]=!1}
return prefix+Ext.Object.toQueryString.apply(Ext.Object,args)},urlDecode:function(){return Ext.Object.fromQueryString.apply(Ext.Object,arguments)},getScrollbarSize:function(force){return Ext.scrollbar.size(force)},typeOf:(function(){var nonWhitespaceRe=/\S/,toString=Object.prototype.toString,typeofTypes={number:1,string:1,'boolean':1,'undefined':1},toStringTypes={'[object Array]':'array','[object Date]':'date','[object Boolean]':'boolean','[object Number]':'number','[object RegExp]':'regexp'};return function(value){if(value===null){return'null'}
var type=typeof value,ret,typeToString;if(typeofTypes[type]){return type}
ret=toStringTypes[typeToString=toString.call(value)];if(ret){return ret}
if(type==='function'){return'function'}
if(type==='object'){if(value.nodeType!==undefined){if(value.nodeType===3){return nonWhitespaceRe.test(value.nodeValue)?'textnode':'whitespace'}else{return'element'}}
return'object'}
Ext.raise({sourceClass:'Ext',sourceMethod:'typeOf',msg:'Failed to determine the type of "'+value+'".'});return typeToString}}()),factory:function(config,classReference,instance,aliasNamespace){var manager=Ext.ClassManager,newInstance;if(!config||config.isInstance){if(instance&&instance!==config){instance.destroy()}
return config}
if(aliasNamespace){if(typeof config==='string'){return manager.instantiateByAlias(aliasNamespace+'.'+config)}else if(Ext.isObject(config)&&'type' in config){return manager.instantiateByAlias(aliasNamespace+'.'+config.type,config)}}
if(config===!0){if(!instance&&!classReference){Ext.raise('[Ext.factory] Cannot determine type of class to create')}
return instance||Ext.create(classReference)}
if(!Ext.isObject(config)){Ext.raise("Invalid config, must be a valid config object")}
if('xtype' in config){newInstance=manager.instantiateByAlias('widget.'+config.xtype,config)}else if('xclass' in config){newInstance=Ext.create(config.xclass,config)}
if(newInstance){if(instance){instance.destroy()}
return newInstance}
if(instance){return instance.setConfig(config)}
return Ext.create(classReference,config)},convertKeyedItems:function(items,defaultProperty,functionProperty){if(items&&!items.isInstance&&Ext.isObject(items)){var obj=items,item,itemId,value;items=[];if(obj.xtype||obj.xclass||obj.itemId||obj.id){items.push(obj)}else{for(itemId in obj){item=obj[itemId];if(item){if(item===!0){item={}}else if(typeof item==='function'){if(!functionProperty){Ext.raise('Function not expected here')}
value=item;item={};item[functionProperty]=value}else if(typeof item==='string'){value=item;item={};item[defaultProperty||'xtype']=value}else{item=Ext.apply({},item)}
item.itemId=itemId;items.push(item)}}}}
return items},sortByWeight:function(items){if(items){Ext.Array.sort(items,Ext.weightSortFn)}},weightSortFn:function(lhs,rhs){return(lhs.weight||0)-(rhs.weight||0)},concat:function(a,b){var noB=b==null,E=Ext.emptyArray;return(a==null)?(noB?a:E.concat(b)):(noB?E.concat(a):E.concat(a,b))},log:(function(){var primitiveRe=/string|number|boolean/;function dumpObject(object,level,maxLevel,withFunctions){var member,type,value,name,prefix,suffix,members=[];if(Ext.isArray(object)){prefix='[';suffix=']'}else if(Ext.isObject(object)){prefix='{';suffix='}'}
if(!maxLevel){maxLevel=3}
if(level>maxLevel){return prefix+'...'+suffix}
level=level||1;var spacer=(new Array(level)).join('    ');for(name in object){if(object.hasOwnProperty(name)){value=object[name];type=typeof value;if(type==='function'){if(!withFunctions){continue}
member=type}else if(type==='undefined'){member=type}else if(value===null||primitiveRe.test(type)||Ext.isDate(value)){member=Ext.encode(value)}else if(Ext.isArray(value)){member=dumpObject(value,level+1,maxLevel,withFunctions)}else if(Ext.isObject(value)){member=dumpObject(value,level+1,maxLevel,withFunctions)}else{member=type}
members.push(spacer+name+': '+member)}}
if(members.length){return prefix+'\n    '+members.join(',\n    ')+'\n'+spacer+suffix}
return prefix+suffix}
function log(message){var options,dump,con=Ext.global.console,level='log',indent=log.indent||0,prefix,stack,fn,out,max;log.indent=indent;if(typeof message!=='string'){options=message;message=options.msg||'';level=options.level||level;dump=options.dump;stack=options.stack;prefix=options.prefix;fn=options.fn;if(options.indent){++log.indent}else if(options.outdent){log.indent=indent=Math.max(indent-1,0)}
if(dump&&!(con&&con.dir)){message+=dumpObject(dump);dump=null}}
if(arguments.length>1){message+=Array.prototype.slice.call(arguments,1).join('')}
if(prefix){message=prefix+' - '+message}
message=indent?Ext.String.repeat(' ',log.indentSize*indent)+message:message;if(level!=='log'){message='['+level.charAt(0).toUpperCase()+'] '+message}
if(fn){message+='\nCaller: '+fn.toString()}
if(con){if(con[level]){con[level](message)}else{con.log(message)}
if(dump){con.dir(dump)}
if(stack&&con.trace){if(!con.firebug||level!=='error'){con.trace()}}}else if(Ext.isOpera){opera.postError(message)}else{out=log.out;max=log.max;if(out.length>=max){Ext.Array.erase(out,0,out.length-3*Math.floor(max/4))}
out.push(message)}
++log.count;++log.counters[level]}
function logx(level,args){if(typeof args[0]==='string'){args.unshift({})}
args[0].level=level;log.apply(this,args)}
log.error=function(){logx('error',Array.prototype.slice.call(arguments))};log.info=function(){logx('info',Array.prototype.slice.call(arguments))};log.warn=function(){logx('warn',Array.prototype.slice.call(arguments))};log.count=0;log.counters={error:0,warn:0,info:0,log:0};log.indentSize=2;log.out=[];log.max=750;return log}())||(function(){var nullLog=function(){};nullLog.info=nullLog.warn=nullLog.error=Ext.emptyFn;return nullLog}())})
;
(function(){var
checkVerTemp=[''],endOfVersionRe=/([^\d.])/,notDigitsRe=/[^\d]/g,plusMinusRe=/[-+]/g,stripRe=/\s/g,underscoreRe=/_/g,toolkitNames={classic:1,modern:1},Version;Ext.Version=Version=function(version,defaultMode){var me=this,padModes=me.padModes,ch,i,pad,parts,release,releaseStartIndex,ver;if(version.isVersion){version=version.version}
me.version=ver=String(version).toLowerCase().replace(underscoreRe,'.').replace(plusMinusRe,'');ch=ver.charAt(0);if(ch in padModes){ver=ver.substring(1);pad=padModes[ch]}else{pad=defaultMode?padModes[defaultMode]:0}
me.pad=pad;releaseStartIndex=ver.search(endOfVersionRe);me.shortVersion=ver;if(releaseStartIndex!==-1){me.release=release=ver.substr(releaseStartIndex,version.length);me.shortVersion=ver.substr(0,releaseStartIndex);release=Version.releaseValueMap[release]||release}
me.releaseValue=release||pad;me.shortVersion=me.shortVersion.replace(notDigitsRe,'');me.parts=parts=ver.split('.');for(i=parts.length;i--;){parts[i]=parseInt(parts[i],10)}
if(pad===Infinity){parts.push(pad)}
me.major=parts[0]||pad;me.minor=parts[1]||pad;me.patch=parts[2]||pad;me.build=parts[3]||pad;return me};Version.prototype={isVersion:!0,padModes:{'~':NaN,'^':Infinity},release:'',compareTo:function(other){var me=this,lhsPad=me.pad,lhsParts=me.parts,lhsLength=lhsParts.length,rhsVersion=other.isVersion?other:new Version(other),rhsPad=rhsVersion.pad,rhsParts=rhsVersion.parts,rhsLength=rhsParts.length,length=Math.max(lhsLength,rhsLength),i,lhs,rhs;for(i=0;i<length;i++){lhs=(i<lhsLength)?lhsParts[i]:lhsPad;rhs=(i<rhsLength)?rhsParts[i]:rhsPad;if(lhs<rhs){return-1}
if(lhs>rhs){return 1}}
lhs=me.releaseValue;rhs=rhsVersion.releaseValue;if(lhs<rhs){return-1}
if(lhs>rhs){return 1}
return 0},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major},getMinor:function(){return this.minor},getPatch:function(){return this.patch},getBuild:function(){return this.build},getRelease:function(){return this.release},getReleaseValue:function(){return this.releaseValue},isGreaterThan:function(target){return this.compareTo(target)>0},isGreaterThanOrEqual:function(target){return this.compareTo(target)>=0},isLessThan:function(target){return this.compareTo(target)<0},isLessThanOrEqual:function(target){return this.compareTo(target)<=0},equals:function(target){return this.compareTo(target)===0},match:function(target){target=String(target);return this.version.substr(0,target.length)===target},toArray:function(){var me=this;return[me.getMajor(),me.getMinor(),me.getPatch(),me.getBuild(),me.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(target){return this.compareTo(target)>0},lt:function(target){return this.compareTo(target)<0},gtEq:function(target){return this.compareTo(target)>=0},ltEq:function(target){return this.compareTo(target)<=0}};Ext.apply(Version,{aliases:{from:{extjs:'ext',core:'core',touch:'modern'},to:{ext:['extjs'],'core':['core'],modern:['touch']}},releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,'#':-2,p:-1,pl:-1},getComponentValue:function(value){return!value?0:(isNaN(value)?this.releaseValueMap[value]||value:parseInt(value,10))},compare:function(current,target){var ver=current.isVersion?current:new Version(current);return ver.compareTo(target)},set:function(collection,packageName,version){var aliases=Version.aliases.to[packageName],ver=version.isVersion?version:new Version(version),i;collection[packageName]=ver;if(aliases){for(i=aliases.length;i-->0;){collection[aliases[i]]=ver}}
return ver}});Ext.apply(Ext,{compatVersions:{},versions:{},lastRegisteredVersion:null,getCompatVersion:function(packageName){var versions=Ext.compatVersions,compat;if(!packageName){compat=versions.ext||versions.touch||versions.core}else{compat=versions[Version.aliases.from[packageName]||packageName]}
return compat||Ext.getVersion(packageName)},setCompatVersion:function(packageName,version){Version.set(Ext.compatVersions,packageName,version)},setVersion:function(packageName,version){if(packageName in toolkitNames){Ext.toolkit=packageName}
Ext.lastRegisteredVersion=Version.set(Ext.versions,packageName,version);return this},getVersion:function(packageName){var versions=Ext.versions;if(!packageName){return versions.ext||versions.touch||versions.core}
return versions[Version.aliases.from[packageName]||packageName]},checkVersion:function(specs,matchAll){var isArray=Ext.isArray(specs),aliases=Version.aliases.from,compat=isArray?specs:checkVerTemp,length=compat.length,versions=Ext.versions,frameworkVer=versions.ext||versions.touch,i,index,matches,minVer,maxVer,packageName,spec,range,ver;if(!isArray){checkVerTemp[0]=specs}
for(i=0;i<length;++i){if(!Ext.isString(spec=compat[i])){matches=Ext.checkVersion(spec.and||spec.or,!spec.or);if(spec.not){matches=!matches}}else{if(spec.indexOf(' ')>=0){spec=spec.replace(stripRe,'')}
index=spec.indexOf('@');if(index<0){range=spec;ver=frameworkVer}else{packageName=spec.substring(0,index);if(!(ver=versions[aliases[packageName]||packageName])){if(matchAll){return!1}
continue}
range=spec.substring(index+1)}
index=range.indexOf('-');if(index<0){if(range.charAt(index=range.length-1)==='+'){minVer=range.substring(0,index);maxVer=null}else{minVer=maxVer=range}}else if(index>0){minVer=range.substring(0,index);maxVer=range.substring(index+1)}else{minVer=null;maxVer=range.substring(index+1)}
matches=!0;if(minVer){minVer=new Version(minVer,'~');matches=minVer.ltEq(ver)}
if(matches&&maxVer){maxVer=new Version(maxVer,'~');matches=maxVer.gtEq(ver)}}
if(matches){if(!matchAll){return!0}}else if(matchAll){return!1}}
return!!matchAll},deprecate:function(packageName,since,closure,scope){if(Version.compare(Ext.getVersion(packageName),since)<1){closure.call(scope)}}})}());(function(manifest){var packages=(manifest&&manifest.packages)||{},compat=manifest&&manifest.compatibility,name,pkg;for(name in packages){pkg=packages[name];if(pkg&&pkg.version){Ext.setVersion(name,pkg.version)}}
if(compat){if(Ext.isString(compat)){Ext.setCompatVersion('core',compat)}else{for(name in compat){Ext.setCompatVersion(name,compat[name])}}}
if(!packages.ext&&!packages.touch){Ext.setVersion('ext','6')}})(Ext.manifest)
;
Ext.Config=function(name){var me=this,capitalizedName=name.charAt(0).toUpperCase()+name.substr(1);me.name=name;me.names={internal:'_'+name,initializing:'is'+capitalizedName+'Initializing',apply:'apply'+capitalizedName,update:'update'+capitalizedName,get:'get'+capitalizedName,set:'set'+capitalizedName,initGet:'initGet'+capitalizedName,changeEvent:name.toLowerCase()+'change'};me.root=me};Ext.Config.map={};Ext.Config.get=function(name){var map=Ext.Config.map,ret=map[name]||(map[name]=new Ext.Config(name));return ret};Ext.Config.prototype={self:Ext.Config,isConfig:!0,combine:function(value,baseValue,instance,clone){var cfg=this;if(cfg.merge){value=cfg.merge(clone?Ext.clone(value):value,baseValue,instance)}else if(value&&value.constructor===Object&&baseValue&&baseValue.constructor===Object){value=Ext.merge({},baseValue,value)}else if(clone&&value){value=Ext.clone(value)}
return value},equals:function(value1,value2){return value1===value2},getGetter:function(){return this.getter||(this.root.getter=this.makeGetter())},getInitGetter:function(){return this.initGetter||(this.root.initGetter=this.makeInitGetter())},getSetter:function(){return this.setter||(this.root.setter=this.makeSetter())},getEventedSetter:function(){return this.eventedSetter||(this.root.eventedSetter=this.makeEventedSetter())},getInternalName:function(target){return target.$configPrefixed?this.names.internal:this.name},mergeNew:function(newValue,oldValue,target,mixinClass){var ret,key;if(!oldValue){ret=newValue}else if(!newValue){ret=oldValue}else{ret=Ext.Object.chain(oldValue);for(key in newValue){if(!mixinClass||!(key in ret)){ret[key]=newValue[key]}}}
return ret},mergeSets:function(newValue,oldValue,preserveExisting){var ret=oldValue?Ext.Object.chain(oldValue):{},i,val;if(newValue instanceof Array){for(i=newValue.length;i--;){val=newValue[i];if(!preserveExisting||!(val in ret)){ret[val]=!0}}}else if(newValue){if(newValue.constructor===Object){for(i in newValue){val=newValue[i];if(!preserveExisting||!(i in ret)){ret[i]=val}}}else if(!preserveExisting||!(newValue in ret)){ret[newValue]=!0}}
return ret},makeGetter:function(){var name=this.name,prefixedName=this.names.internal;return function(){var internalName=this.$configPrefixed?prefixedName:name;return this[internalName]}},makeInitGetter:function(){var name=this.name,names=this.names,setName=names.set,getName=names.get,initializingName=names.initializing;return function(){var me=this;me[initializingName]=!0;delete me[getName];me[setName](me.config[name]);delete me[initializingName];return me[getName].apply(me,arguments)}},makeSetter:function(){var name=this.name,names=this.names,prefixedName=names.internal,getName=names.get,applyName=names.apply,updateName=names.update,setter;setter=function(value){var me=this,internalName=me.$configPrefixed?prefixedName:name,oldValue=me[internalName],watch;delete me[getName];if(!me[applyName]||(value=me[applyName](value,oldValue))!==undefined){if(value!==(oldValue=me[internalName])){me[internalName]=value;if(me[updateName]){me[updateName](value,oldValue)}
watch=me.$configWatch;if(watch&&!me.isConfiguring){watch.fire(name,[me,name,me[internalName],oldValue])}}}
return me};setter.$isDefault=!0;return setter},makeEventedSetter:function(){var name=this.name,names=this.names,prefixedName=names.internal,getName=names.get,applyName=names.apply,updateName=names.update,changeEventName=names.changeEvent,updateFn=function(me,value,oldValue,internalName){me[internalName]=value;if(me[updateName]){me[updateName](value,oldValue)}
var watch=me.$configWatch;if(watch){watch.fire(name,[me,name,value,oldValue])}},setter;setter=function(value){var me=this,internalName=me.$configPrefixed?prefixedName:name,oldValue=me[internalName];delete me[getName];if(!me[applyName]||(value=me[applyName](value,oldValue))!==undefined){if(value!==(oldValue=me[internalName])){if(me.isConfiguring){me[internalName]=value;if(me[updateName]){me[updateName](value,oldValue)}}else{me.fireEventedAction(changeEventName,[me,value,oldValue],updateFn,me,[me,value,oldValue,internalName])}}}
return me};setter.$isDefault=!0;return setter}}
;
(function(){var ExtConfig=Ext.Config,configPropMap=ExtConfig.map,ExtObject=Ext.Object;Ext.Configurator=function(cls){var me=this,prototype=cls.prototype,superCfg=cls.superclass?cls.superclass.self.$config:null;me.cls=cls;me.superCfg=superCfg;if(superCfg){me.configs=ExtObject.chain(superCfg.configs);me.cachedConfigs=ExtObject.chain(superCfg.cachedConfigs);me.initMap=ExtObject.chain(superCfg.initMap);me.values=ExtObject.chain(superCfg.values);me.needsFork=superCfg.needsFork;me.deprecations=ExtObject.chain(superCfg.deprecations)}else{me.configs={};me.cachedConfigs={};me.initMap={};me.values={};me.deprecations={}}
prototype.config=prototype.defaultConfig=me.values;cls.$config=me};Ext.Configurator.prototype={self:Ext.Configurator,needsFork:!1,initList:null,add:function(config,mixinClass){var me=this,Cls=me.cls,configs=me.configs,cachedConfigs=me.cachedConfigs,initMap=me.initMap,prototype=Cls.prototype,mixinConfigs=mixinClass&&mixinClass.$config.configs,values=me.values,isObject,meta,isCached,merge,cfg,currentValue,name,names,s,value;for(name in config){value=config[name];isObject=value&&value.constructor===Object;meta=isObject&&'$value' in value?value:null;isCached=!1;if(meta){isCached=!!meta.cached;value=meta.$value;isObject=value&&value.constructor===Object}
merge=meta&&meta.merge;cfg=configs[name];if(cfg){if(mixinClass){merge=cfg.merge;if(!merge){continue}
meta=null}else{merge=merge||cfg.merge}
if(!mixinClass&&isCached&&!cachedConfigs[name]){Ext.raise('Redefining config as cached: '+name+' in class: '+Cls.$className)}
currentValue=values[name];if(merge){value=merge.call(cfg,value,currentValue,Cls,mixinClass)}else if(isObject){if(currentValue&&currentValue.constructor===Object){value=Ext.merge({},currentValue,value)}}}else{if(mixinConfigs){cfg=mixinConfigs[name];meta=null}else{cfg=ExtConfig.get(name)}
configs[name]=cfg;if(cfg.cached||isCached){cachedConfigs[name]=!0}
names=cfg.names;if(!prototype[s=names.get]){prototype[s]=cfg.getter||cfg.getGetter()}
if(!prototype[s=names.set]){prototype[s]=(meta&&meta.evented)?(cfg.eventedSetter||cfg.getEventedSetter()):(cfg.setter||cfg.getSetter())}}
if(meta){if(cfg.owner!==Cls){configs[name]=cfg=Ext.Object.chain(cfg);cfg.owner=Cls}
Ext.apply(cfg,meta);delete cfg.$value}
if(!me.needsFork&&value&&(value.constructor===Object||value instanceof Array)){me.needsFork=!0}
if(value!==null){initMap[name]=!0}else{if(prototype.$configPrefixed){prototype[configs[name].names.internal]=null}else{prototype[configs[name].name]=null}
if(name in initMap){initMap[name]=!1}}
values[name]=value}},addDeprecations:function(configs){var me=this,deprecations=me.deprecations,className=(me.cls.$className||'')+'#',message,newName,oldName;for(oldName in configs){newName=configs[oldName];if(!newName){message='This config has been removed.'}else if(!(message=newName.message)){message='This config has been renamed to "'+newName+'"'}
deprecations[oldName]=className+oldName+': '+message}},configure:function(instance,instanceConfig){var me=this,configs=me.configs,deprecations=me.deprecations,initMap=me.initMap,initListMap=me.initListMap,initList=me.initList,prototype=me.cls.prototype,values=me.values,remaining=0,firstInstance=!initList,cachedInitList,cfg,getter,i,internalName,ln,names,name,value,isCached,valuesKey,field,transforms;values=me.needsFork?ExtObject.fork(values):ExtObject.chain(values);instance.isConfiguring=!0;if(firstInstance){me.initList=initList=[];me.initListMap=initListMap={};instance.isFirstInstance=!0;for(name in initMap){cfg=configs[name];isCached=cfg.cached;if(initMap[name]){names=cfg.names;value=values[name];if(!prototype[names.set].$isDefault||prototype[names.apply]||prototype[names.update]||typeof value==='object'){if(isCached){(cachedInitList||(cachedInitList=[])).push(cfg)}else{initList.push(cfg);initListMap[name]=!0}
instance[names.get]=cfg.initGetter||cfg.getInitGetter()}else{prototype[cfg.getInternalName(prototype)]=value}}else if(isCached){prototype[cfg.getInternalName(prototype)]=undefined}}}
ln=cachedInitList&&cachedInitList.length;if(ln){for(i=0;i<ln;++i){internalName=cachedInitList[i].getInternalName(prototype);instance[internalName]=null}
for(i=0;i<ln;++i){names=(cfg=cachedInitList[i]).names;getter=names.get;if(instance.hasOwnProperty(getter)){instance[names.set](values[cfg.name]);delete instance[getter]}}
for(i=0;i<ln;++i){internalName=cachedInitList[i].getInternalName(prototype);prototype[internalName]=instance[internalName];delete instance[internalName]}}
if(instanceConfig&&instanceConfig.platformConfig){instanceConfig=me.resolvePlatformConfig(instance,instanceConfig)}
if(firstInstance){if(instance.afterCachedConfig&&!instance.afterCachedConfig.$nullFn){instance.afterCachedConfig(instanceConfig)}}
instance.config=values;for(i=0,ln=initList.length;i<ln;++i){cfg=initList[i];instance[cfg.names.get]=cfg.initGetter||cfg.getInitGetter()}
if(!(transforms=instance.self.$configTransforms)){instance.self.$configTransforms=transforms=[];ln=instance.$configTransforms;for(name in ln){transforms.push([name,ln[name]])}
ln=transforms.length;if(ln>1){transforms.sort(me.transformSorter);for(i=0;i<ln;++i){transforms[i]=transforms[i][0]}}else if(ln){transforms[0]=transforms[0][0]}}
for(i=0;i<transforms.length;++i){name=transforms[i];if(instance[name]){instanceConfig=instance[name](instanceConfig,me)}}
if(instanceConfig){for(name in instanceConfig){value=instanceConfig[name];cfg=configs[name];if(deprecations[name]){Ext.log.warn(deprecations[name]);if(!cfg){continue}}
if(!cfg){field=instance.self.prototype[name];if(instance.$configStrict&&(typeof field==='function')&&!field.$nullFn){Ext.raise('Cannot override method '+name+' on '+instance.$className+' instance.')}
instance[name]=value}else{if(!cfg.lazy){++remaining}
if(!initListMap[name]){instance[cfg.names.get]=cfg.initGetter||cfg.getInitGetter()}
valuesKey=values[name];if(cfg.merge){value=cfg.merge(value,valuesKey,instance)}else if(value&&value.constructor===Object){if(valuesKey&&valuesKey.constructor===Object){value=Ext.merge(values[name],value)}else{value=Ext.clone(value,!1)}}}
values[name]=value}}
if(instance.beforeInitConfig&&!instance.beforeInitConfig.$nullFn){if(instance.beforeInitConfig(instanceConfig)===!1){return}}
if(instanceConfig){for(name in instanceConfig){if(!remaining){break}
cfg=configs[name];if(cfg&&!cfg.lazy){--remaining;names=cfg.names;getter=names.get;if(instance.hasOwnProperty(getter)){instance[names.set](values[name]);delete instance[names.get]}}}}
for(i=0,ln=initList.length;i<ln;++i){cfg=initList[i];names=cfg.names;getter=names.get;if(!cfg.lazy&&instance.hasOwnProperty(getter)){instance[names.set](values[cfg.name]);delete instance[getter]}}
delete instance.isConfiguring},getCurrentConfig:function(instance){var defaultConfig=instance.defaultConfig,config={},name;for(name in defaultConfig){config[name]=instance[configPropMap[name].names.get]()}
return config},hoistConfigs:function(instance,instanceConfig,names){var config=instance.config,configs=this.configs,initListMap=this.initListMap,ret=!1,cfg,i,name;for(i=0;i<names.length;++i){name=names[i];if(instanceConfig&&name in instanceConfig){cfg=configs[name];config[name]=cfg.combine(instanceConfig[name],config[name],instance);if(!initListMap[name]){instance[cfg.names.get]=cfg.initGetter||cfg.getInitGetter()}}
if(config[name]!=null){ret=!0}}
return ret},merge:function(instance,baseConfig,config,clone){var configs=this.configs,name,value,baseValue,cfg;if(clone){baseConfig=Ext.clone(baseConfig,!1)}
for(name in config){value=config[name];cfg=configs[name];if(cfg){baseValue=baseConfig[name];if(cfg.merge){value=cfg.merge(value,baseValue,instance)}else if(value&&value.constructor===Object){if(baseValue&&baseValue.constructor===Object){value=Ext.merge(baseValue,value)}else{value=Ext.clone(value,!1)}}}
baseConfig[name]=value}
return baseConfig},reconfigure:function(instance,instanceConfig,options){var currentConfig=instance.config,configList=[],strict=instance.$configStrict&&!(options&&options.strict===!1),configs=this.configs,defaults=options&&options.defaults,cfg,getter,i,len,name,names,prop;for(name in instanceConfig){cfg=configs[name];if(defaults&&instance.hasOwnProperty(cfg&&instance.$configPrefixed?cfg.names.internal:name)){continue}
currentConfig[name]=instanceConfig[name];if(this.deprecations[name]){Ext.log.warn(this.deprecations[name]);if(!cfg){continue}}
if(cfg){instance[cfg.names.get]=cfg.initGetter||cfg.getInitGetter()}else{prop=instance.self.prototype[name];if(strict){if((typeof prop==='function')&&!prop.$nullFn){Ext.Error.raise("Cannot override method "+name+" on "+instance.$className+" instance.");continue}else{if(name!=='type'){Ext.log.warn('No such config "'+name+'" for class '+instance.$className)}}}}
configList.push(name)}
for(i=0,len=configList.length;i<len;i++){name=configList[i];cfg=configs[name];if(cfg){names=cfg.names;getter=names.get;if(instance.hasOwnProperty(getter)){instance[names.set](instanceConfig[name]);delete instance[getter]}}else{cfg=configPropMap[name]||Ext.Config.get(name);names=cfg.names;if(instance[names.set]){instance[names.set](instanceConfig[name])}else{instance[name]=instanceConfig[name]}}}},resolvePlatformConfig:function(instance,instanceConfig){var platformConfig=instanceConfig&&instanceConfig.platformConfig,ret=instanceConfig,i,keys,n;if(platformConfig){keys=Ext.getPlatformConfigKeys(platformConfig);n=keys.length;if(n){ret=Ext.merge({},ret);for(i=0,n=keys.length;i<n;++i){this.merge(instance,ret,platformConfig[keys[i]])}}}
return ret},transformSorter:function(a,b){return a[1]-b[1]}}}())
;
Ext.Base=(function(flexSetter){var noArgs=[],baseStaticMember,baseStaticMembers=[],makeDeprecatedMethod=function(oldName,newName,msg){var message='"'+oldName+'" is deprecated.';if(msg){message+=' '+msg}else if(newName){message+=' Please use "'+newName+'" instead.'}
return function(){Ext.raise(message)}},addDeprecatedProperty=function(object,oldName,newName,message){if(!message){message='"'+oldName+'" is deprecated.'}
if(newName){message+=' Please use "'+newName+'" instead.'}
if(message){Ext.Object.defineProperty(object,oldName,{get:function(){Ext.raise(message)},set:function(value){Ext.raise(message)},configurable:!0})}},getOwnObject=function(proto,name){if(!proto.hasOwnProperty(name)){proto[name]=Ext.Object.chain(getOwnObject(proto.superclass,name))}
return proto[name]},makeAliasFn=function(name){return function(){return this[name].apply(this,arguments)}},Version=Ext.Version,leadingDigitRe=/^\d/,oneMember={},aliasOneMember={},Base=function(){},BasePrototype=Base.prototype,Reaper;Ext.Reaper=Reaper={delay:100,queue:[],timer:null,add:function(obj){if(!Reaper.timer){Reaper.timer=Ext.defer(Reaper.tick,Reaper.delay)}
Reaper.queue.push(obj)},flush:function(){if(Reaper.timer){Ext.undefer(Reaper.timer);Reaper.timer=null}
var queue=Reaper.queue,n=queue.length,i,obj;Reaper.queue=[];for(i=0;i<n;++i){obj=queue[i];if(obj&&obj.$reap){obj.$reap()}}},tick:function(){Reaper.timer=null;Reaper.flush()}};Ext.apply(Base,{$className:'Ext.Base',$isClass:!0,create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},addConfigTransform:function(methodName,priority){var transforms=getOwnObject(this.prototype,'$configTransforms');if(this.$configTransforms){Ext.raise('Config transforms cannot be added after instances are created')}
transforms[methodName]=priority},addDeprecations:function(deprecations){var me=this,all=[],compatVersion=Ext.getCompatVersion(deprecations.name),configurator=me.getConfigurator(),displayName=(me.$className||'')+'#',deprecate,versionSpec,index,message,target,enabled,existing,fn,names,oldName,newName,member,statics,version;for(versionSpec in deprecations){if(leadingDigitRe.test(versionSpec)){version=new Ext.Version(versionSpec);version.deprecations=deprecations[versionSpec];all.push(version)}}
all.sort(Version.compare);for(index=all.length;index--;){deprecate=(version=all[index]).deprecations;target=me.prototype;statics=deprecate.statics;enabled=compatVersion&&compatVersion.lt(version);if(!enabled){}else if(!enabled){break}
while(deprecate){names=deprecate.methods;if(names){for(oldName in names){member=names[oldName];fn=null;if(!member){Ext.Assert.isNotDefinedProp(target,oldName);fn=makeDeprecatedMethod(displayName+oldName)}else if(Ext.isString(member)){Ext.Assert.isNotDefinedProp(target,oldName);Ext.Assert.isDefinedProp(target,member);if(enabled){fn=makeAliasFn(member)}else{fn=makeDeprecatedMethod(displayName+oldName,member)}}else{message='';if(member.message||member.fn){message=member.message;member=member.fn}
existing=target.hasOwnProperty(oldName)&&target[oldName];if(enabled&&member){member.$owner=me;member.$name=oldName;member.name=displayName+oldName;if(existing){member.$previous=existing}
fn=member}else if(!existing){fn=makeDeprecatedMethod(displayName+oldName,null,message)}}
if(fn){target[oldName]=fn}}}
names=deprecate.configs;if(names){configurator.addDeprecations(names)}
names=deprecate.properties;if(names&&!enabled){for(oldName in names){newName=names[oldName];if(Ext.isString(newName)){addDeprecatedProperty(target,displayName+oldName,newName)}else if(newName&&newName.message){addDeprecatedProperty(target,displayName+oldName,null,newName.message)}else{addDeprecatedProperty(target,displayName+oldName)}}}
deprecate=statics;statics=null;target=me}}},extend:function(parentClass){var me=this,parentPrototype=parentClass.prototype,prototype,name,statics;prototype=me.prototype=Ext.Object.chain(parentPrototype);prototype.self=me;me.superclass=prototype.superclass=parentPrototype;if(!parentClass.$isClass){for(name in BasePrototype){if(name in prototype){prototype[name]=BasePrototype[name]}}}
statics=parentPrototype.$inheritableStatics;if(statics){for(name in statics){if(!me.hasOwnProperty(name)){me[name]=parentClass[name]}}}
if(parentClass.$onExtended){me.$onExtended=parentClass.$onExtended.slice()}
me.getConfigurator()},$onExtended:[],triggerExtended:function(){if(Ext.classSystemMonitor){Ext.classSystemMonitor(this,'Ext.Base#triggerExtended',arguments)}
var callbacks=this.$onExtended,ln=callbacks.length,i,callback;if(ln>0){for(i=0;i<ln;i++){callback=callbacks[i];callback.fn.apply(callback.scope||this,arguments)}}},onExtended:function(fn,scope){this.$onExtended.push({fn:fn,scope:scope});return this},addStatics:function(members){this.addMembers(members,!0);return this},addInheritableStatics:function(members){var me=this,proto=me.prototype,inheritableStatics=me.$inheritableStatics,name,member,current;if(!inheritableStatics){inheritableStatics=Ext.apply({},proto.$inheritableStatics);me.$inheritableStatics=proto.$inheritableStatics=inheritableStatics}
var className=Ext.getClassName(me)+'.';for(name in members){if(members.hasOwnProperty(name)){member=members[name];current=me[name];if(typeof member==='function'){member.name=className+name}
if(typeof current==='function'&&!current.$isClass&&!current.$nullFn){member.$previous=current}
me[name]=member;inheritableStatics[name]=!0}}
return me},addMembers:function(members,isStatic,privacy){var me=this,cloneFunction=Ext.Function.clone,target=isStatic?me:me.prototype,defaultConfig=!isStatic&&target.defaultConfig,enumerables=Ext.enumerables,privates=members.privates,configs,i,ln,member,name,subPrivacy,privateStatics;var displayName=(me.$className||'')+'#';if(privates){delete members.privates;if(!isStatic){privateStatics=privates.statics;delete privates.statics}
subPrivacy=privates.privacy||privacy||'framework';me.addMembers(privates,isStatic,subPrivacy);if(privateStatics){me.addMembers(privateStatics,!0,subPrivacy)}}
for(name in members){if(members.hasOwnProperty(name)){member=members[name];if(privacy===!0){privacy='framework'}
if(member&&member.$nullFn&&privacy!==member.$privacy){Ext.raise('Cannot use stock function for private method '+(me.$className?me.$className+'#':'')+name)}
if(typeof member==='function'&&!member.$isClass&&!member.$nullFn){if(member.$owner){member=cloneFunction(member)}
if(target.hasOwnProperty(name)){member.$previous=target[name]}
member.$owner=me;member.$name=name;member.name=displayName+name;var existing=target[name];if(privacy){member.$privacy=privacy;if(existing&&existing.$privacy&&existing.$privacy!==privacy){Ext.privacyViolation(me,existing,member,isStatic)}}else if(existing&&existing.$privacy){Ext.privacyViolation(me,existing,member,isStatic)}}else if(defaultConfig&&(name in defaultConfig)&&!target.config.hasOwnProperty(name)){(configs||(configs={}))[name]=member;continue}
target[name]=member}}
if(configs){me.addConfig(configs)}
if(enumerables){for(i=0,ln=enumerables.length;i<ln;++i){if(members.hasOwnProperty(name=enumerables[i])){member=members[name];if(member&&!member.$nullFn){if(member.$owner){member=cloneFunction(member)}
member.$owner=me;member.$name=name;member.name=displayName+name;if(target.hasOwnProperty(name)){member.$previous=target[name]}}
target[name]=member}}}
return this},addMember:function(name,member,privacy){oneMember[name]=member;this.addMembers(oneMember,!1,privacy);delete oneMember[name];return this},hookMember:function(name,member){var existing=this.prototype[name];return this.addMember(name,member,existing&&existing.$privacy)},borrow:function(fromClass,members){if(Ext.classSystemMonitor){Ext.classSystemMonitor(this,'Ext.Base#borrow',arguments)}
var prototype=fromClass.prototype,membersObj={},i,ln,name;members=Ext.Array.from(members);for(i=0,ln=members.length;i<ln;i++){name=members[i];membersObj[name]=prototype[name]}
return this.addMembers(membersObj)},override:function(members){var me=this,statics=members.statics,inheritableStatics=members.inheritableStatics,config=members.config,mixins=members.mixins,cachedConfig=members.cachedConfig;if(statics||inheritableStatics||config){members=Ext.apply({},members)}
if(statics){me.addMembers(statics,!0);delete members.statics}
if(inheritableStatics){me.addInheritableStatics(inheritableStatics);delete members.inheritableStatics}
if(members.platformConfig){me.addPlatformConfig(members)}
if(config){me.addConfig(config);delete members.config}
if(cachedConfig){me.addCachedConfig(cachedConfig);delete members.cachedConfig}
delete members.mixins;me.addMembers(members);if(mixins){me.mixin(mixins)}
return me},addPlatformConfig:function(data){var me=this,prototype=me.prototype,platformConfigs=data.platformConfig,added,classConfigs,configs,configurator,keys,name,value,i,ln;delete prototype.platformConfig;if(platformConfigs instanceof Array){throw new Error('platformConfigs must be specified as an object.')}
configurator=me.getConfigurator();classConfigs=configurator.configs;keys=Ext.getPlatformConfigKeys(platformConfigs);for(i=0,ln=keys.length;i<ln;++i){configs=platformConfigs[keys[i]];added=null;for(name in configs){value=configs[name];if(name in classConfigs){(added||(added={}))[name]=value}else{prototype[name]=value}}
if(added){configurator.add(added)}}},callParent:function(args){var method;return(method=this.callParent.caller)&&(method.$previous||((method=method.$owner?method:method.caller)&&method.$owner.superclass.self[method.$name])).apply(this,args||noArgs)},callSuper:function(args){var method;return(method=this.callSuper.caller)&&((method=method.$owner?method:method.caller)&&method.$owner.superclass.self[method.$name]).apply(this,args||noArgs)},mixin:function(name,mixinClass){var me=this,mixin,prototype,key,statics,i,ln,mixinName,mixinValue,mixins,mixinStatics,staticName;if(typeof name!=='string'){mixins=name;if(mixins instanceof Array){for(i=0,ln=mixins.length;i<ln;i++){mixin=mixins[i];me.mixin(mixin.prototype.mixinId||mixin.$className,mixin)}}else{for(mixinName in mixins){me.mixin(mixinName,mixins[mixinName])}}
return}
mixin=mixinClass.prototype;prototype=me.prototype;if(mixin.onClassMixedIn){mixin.onClassMixedIn.call(mixinClass,me)}
if(!prototype.hasOwnProperty('mixins')){if('mixins' in prototype){prototype.mixins=Ext.Object.chain(prototype.mixins)}else{prototype.mixins={}}}
for(key in mixin){mixinValue=mixin[key];if(key==='mixins'){Ext.applyIf(prototype.mixins,mixinValue)}else if(!(key==='mixinId'||key==='config'||key==='$inheritableStatics')&&(prototype[key]===undefined)){prototype[key]=mixinValue}}
statics=mixin.$inheritableStatics;if(statics){mixinStatics={};for(staticName in statics){if(!me.hasOwnProperty(staticName)){mixinStatics[staticName]=mixinClass[staticName]}}
me.addInheritableStatics(mixinStatics)}
if('config' in mixin){me.addConfig(mixin.config,mixinClass)}
prototype.mixins[name]=mixin;if(mixin.afterClassMixedIn){mixin.afterClassMixedIn.call(mixinClass,me)}
return me},addConfig:function(config,mixinClass){var cfg=this.$config||this.getConfigurator();cfg.add(config,mixinClass)},addCachedConfig:function(config,isMixin){var cached={},key;for(key in config){cached[key]={cached:!0,$value:config[key]}}
this.addConfig(cached,isMixin)},getConfigurator:function(){return this.$config||new Ext.Configurator(this)},getName:function(){return Ext.getClassName(this)},createAlias:flexSetter(function(alias,origin){aliasOneMember[alias]=function(){return this[origin].apply(this,arguments)};this.override(aliasOneMember);delete aliasOneMember[alias]})});for(baseStaticMember in Base){if(Base.hasOwnProperty(baseStaticMember)){baseStaticMembers.push(baseStaticMember)}}
Base.$staticMembers=baseStaticMembers;Base.getConfigurator();Base.addMembers({$className:'Ext.Base',$configTransforms:{},isInstance:!0,$configPrefixed:!0,$configStrict:!0,isConfiguring:!1,isFirstInstance:!1,destroyed:!1,clearPropertiesOnDestroy:!0,clearPrototypeOnDestroy:!1,statics:function(){var method=this.statics.caller,self=this.self;if(!method){return self}
return method.$owner},callParent:function(args){var method,superMethod=(method=this.callParent.caller)&&(method.$previous||((method=method.$owner?method:method.caller)&&method.$owner.superclass[method.$name]));if(!superMethod){method=this.callParent.caller;var parentClass,methodName;if(!method.$owner){if(!method.caller){throw new Error("Attempting to call a protected method from the "+"public scope, which is not allowed")}
method=method.caller}
parentClass=method.$owner.superclass;methodName=method.$name;if(!(methodName in parentClass)){throw new Error("this.callParent() was called but there's no such method ("+methodName+") found in the parent class ("+(Ext.getClassName(parentClass)||'Object')+")")}}
return superMethod.apply(this,args||noArgs)},callSuper:function(args){var method,superMethod=(method=this.callSuper.caller)&&((method=method.$owner?method:method.caller)&&method.$owner.superclass[method.$name]);if(!superMethod){method=this.callSuper.caller;var parentClass,methodName;if(!method.$owner){if(!method.caller){throw new Error("Attempting to call a protected method from the "+"public scope, which is not allowed")}
method=method.caller}
parentClass=method.$owner.superclass;methodName=method.$name;if(!(methodName in parentClass)){throw new Error("this.callSuper() was called but there's no such method ("+methodName+") found in the parent class ("+(Ext.getClassName(parentClass)||'Object')+")")}}
return superMethod.apply(this,args||noArgs)},self:Base,constructor:function(){return this},initConfig:function(instanceConfig){var me=this,cfg=me.self.getConfigurator();me.initConfig=Ext.emptyFn;me.initialConfig=instanceConfig||{};cfg.configure(me,instanceConfig);return me},beforeInitConfig:Ext.emptyFn,getConfig:function(name,peek,ifInitialized){var me=this,ret,cfg,propName;if(name){cfg=me.self.$config.configs[name];if(cfg){propName=me.$configPrefixed?cfg.names.internal:name;if(ifInitialized){ret=me.hasOwnProperty(propName)?me[propName]:null}else if(peek){ret=me.hasOwnProperty(propName)?me[propName]:me.config[name]}else{ret=me[cfg.names.get]()}}else{ret=me[name]}}else{ret=me.getCurrentConfig()}
return ret},destroyMembers:function(){var me=this,configs=me.self.$config.configs,len=arguments.length,cfg,name,value,i;for(i=0;i<len;i++){name=arguments[i];cfg=configs[name];name=cfg&&me.$configPrefixed?cfg.names.internal:name;value=me.hasOwnProperty(name)&&me[name];if(value){Ext.destroy(value);me[name]=null}}},freezeConfig:function(name){var me=this,config=Ext.Config.get(name),names=config.names,value=me[names.get]();me[names.set]=function(v){if(v!==value){Ext.raise('Cannot change frozen config "'+name+'"')}
return me};if(!Ext.isIE8){Object.defineProperty(me,me.$configPrefixed?names.internal:name,{get:function(){return value},set:function(v){if(v!==value){Ext.raise('Cannot change frozen config "'+name+'"')}}})}},setConfig:function(name,value,options){var me=this,configurator,config,prop;if(name){configurator=me.self.getConfigurator();if(typeof name==='string'){config=configurator.configs[name];if(!config){if(me.$configStrict){prop=me.self.prototype[name];if((typeof prop==='function')&&!prop.$nullFn){Ext.Error.raise("Cannot override method "+name+" on "+me.$className+" instance.");return me}else{if(name!=='type'){Ext.log.warn('No such config "'+name+'" for class '+me.$className)}}}
config=Ext.Config.map[name]||Ext.Config.get(name)}
if(me[config.names.set]){me[config.names.set](value)}else{me[name]=value}}else{configurator.reconfigure(me,name,options||value)}}
return me},getConfigWatcher:function(){return this.$configWatch||(this.$configWatch=new Ext.mixin.Watchable())},watchConfig:function(name,fn,scope){var watcher=this.getConfigWatcher();return watcher.on.apply(watcher,arguments)},$configWatch:null,getCurrentConfig:function(){var cfg=this.self.getConfigurator();return cfg.getCurrentConfig(this)},hasConfig:function(name){return name in this.defaultConfig},getInitialConfig:function(name){var config=this.config;if(!name){return config}
return config[name]},$links:null,link:function(name,value){var me=this,links=me.$links||(me.$links={});links[name]=!0;me[name]=value;return value},unlink:function(names){var me=this,i,ln,link,value;if(!Ext.isArray(names)){Ext.raise('Invalid argument - expected array of strings')}
for(i=0,ln=names.length;i<ln;i++){link=names[i];value=me[link];if(value){if(value.isInstance&&!value.destroyed){value.destroy()}else if(value.parentNode&&'nodeType' in value){value.parentNode.removeChild(value)}}
me[link]=null}
return me},$reap:function(){var me=this,keepers=me.$noClearOnDestroy,props,prop,val,t,i,len;props=Ext.Object.getKeys(me);for(i=0,len=props.length;i<len;i++){prop=props[i];val=me[prop];if(val&&!(keepers&&keepers[prop])){t=typeof val;if(t==='object'||(t==='function'&&!val.$noClearOnDestroy)){me[prop]=null}}}
me.$nulled=!0;if(Object.setPrototypeOf){if(me.clearPrototypeOnDestroy&&!me.$vetoClearingPrototypeOnDestroy){props=me.$preservePrototypeProperties;if(props){for(i=0,len=props.length;i<len;i++){prop=props[i];if(!me.hasOwnProperty(prop)){me[prop]=me[prop]}}}
Object.setPrototypeOf(me,null)}}},destroy:function(){var me=this,links=me.$links,clearPropertiesOnDestroy=me.clearPropertiesOnDestroy;if(links){me.$links=null;me.unlink(Ext.Object.getKeys(links))}
me.destroy=Ext.emptyFn;me.isDestroyed=me.destroyed=!0;if(clearPropertiesOnDestroy===!0){if(!me.isObservable){me.$reap()}}else if(clearPropertiesOnDestroy){if(clearPropertiesOnDestroy!=='async'){Ext.raise('Invalid value for clearPropertiesOnDestroy')}
Reaper.add(me)}}});BasePrototype.callOverridden=BasePrototype.callParent;Ext.privacyViolation=function(cls,existing,member,isStatic){var name=member.$name,conflictCls=existing.$owner&&existing.$owner.$className,s=isStatic?'static ':'',msg=member.$privacy?'Private '+s+member.$privacy+' method "'+name+'"':'Public '+s+'method "'+name+'"';if(cls.$className){msg=cls.$className+': '+msg}
if(!existing.$privacy){msg+=conflictCls?' hides public method inherited from '+conflictCls:' hides inherited public method.'}else{msg+=conflictCls?' conflicts with private '+existing.$privacy+' method declared by '+conflictCls:' conflicts with inherited private '+existing.$privacy+' method.'}
var compat=Ext.getCompatVersion(),ver=Ext.getVersion();if(ver&&compat&&compat.lt(ver)){Ext.log.error(msg)}else{Ext.raise(msg)}};Ext.Reaper.tick.$skipTimerCheck=!0;return Base}(Ext.Function.flexSetter))
;
(function(LRU,prototype){(Ext.util||(Ext.util={})).LRU=LRU=function(config){var me=this,head;if(config){Ext.apply(me,config)}
me.head=head={id:(me.seed=0),key:null,value:null};me.map={};head.next=head.prev=head};LRU.prototype=prototype={count:0,add:function(key,value){var me=this,map=me.map,entry=map[key];if(entry){me.unlink(entry);--me.count}
map[key]=entry={id:++me.seed,key:key,value:value};me.link(entry);++me.count;return entry},clear:function(fn,scope){var me=this,head=me.head,entry=head.next;head.next=head.prev=head;me.count=0;if(fn&&!fn.$nullFn){for(;entry!==head;entry=entry.next){fn.call(scope||me,entry.key,entry.value)}}},each:function(fn,scope){var head,ent;scope=scope||this;for(head=this.head,ent=head.next;ent!==head;ent=ent.next){if(fn.call(scope,ent.key,ent.value)){break}}},prune:function(fn,scope){var me=this,entry=me.head.prev,ret;if(me.count){ret=entry.value;me.unlink(entry);--me.count;if(fn){fn.call(scope||me,entry.key,ret)}}
return ret},remove:function(key){var me=this,map=me.map,entry=map[key],value;if(entry){me.unlink(entry);value=entry.value;delete map[key];--me.count}
return value},touch:function(key){var me=this,head=me.head,entry=me.map[key];if(entry&&entry.prev!==head){me.unlink(entry);me.link(entry)}},trim:function(size,fn,scope){while(this.count>size){this.prune(fn,scope)}},link:function(entry){var head=this.head,first=head.next;entry.next=first;entry.prev=head;head.next=entry;first.prev=entry},unlink:function(entry){var next=entry.next,prev=entry.prev;prev.next=next;next.prev=prev}};prototype.destroy=function(){this.clear.apply(this,arguments)}}())
;
(function(LRU,fn,Cache){Ext.util.Cache=Cache=function(config){LRU.call(this,config)};fn.prototype=LRU.prototype;Cache.prototype=Ext.apply(new fn(),{maxSize:100,clear:function(){LRU.prototype.clear.call(this,this.evict)},get:function(key){var me=this,entry=me.map[key],value;if(entry){value=entry.value;me.touch(key)}else{value=me.miss.apply(me,arguments);me.add(key,value);me.trim(me.maxSize,me.evict)}
return value},evict:Ext.emptyFn})}(Ext.util.LRU,function(){}))
;
(function(){var ExtClass,Base=Ext.Base,baseStaticMembers=Base.$staticMembers,ruleKeySortFn=function(a,b){return(a.length-b.length)||((a<b)?-1:((a>b)?1:0))};function makeCtor(className){function constructor(){return this.constructor.apply(this,arguments)||null}
if(className){constructor.name=className}
return constructor}
Ext.Class=ExtClass=function(Class,data,onCreated){if(typeof Class!=='function'){onCreated=data;data=Class;Class=null}
if(!data){data={}}
Class=ExtClass.create(Class,data);ExtClass.process(Class,data,onCreated);return Class};Ext.apply(ExtClass,{makeCtor:makeCtor,onBeforeCreated:function(Class,data,hooks){if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'>> Ext.Class#onBeforeCreated',arguments)}
Class.addMembers(data);hooks.onCreated.call(Class,Class);if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'<< Ext.Class#onBeforeCreated',arguments)}},create:function(Class,data){var i=baseStaticMembers.length,name;if(!Class){Class=makeCtor(data.$className)}
while(i--){name=baseStaticMembers[i];Class[name]=Base[name]}
return Class},process:function(Class,data,onCreated){var preprocessorStack=data.preprocessors||ExtClass.defaultPreprocessors,registeredPreprocessors=this.preprocessors,hooks={onBeforeCreated:this.onBeforeCreated},preprocessors=[],preprocessor,preprocessorsProperties,i,ln,j,subLn,preprocessorProperty;delete data.preprocessors;Class._classHooks=hooks;for(i=0,ln=preprocessorStack.length;i<ln;i++){preprocessor=preprocessorStack[i];if(typeof preprocessor==='string'){preprocessor=registeredPreprocessors[preprocessor];preprocessorsProperties=preprocessor.properties;if(preprocessorsProperties===!0){preprocessors.push(preprocessor.fn)}else if(preprocessorsProperties){for(j=0,subLn=preprocessorsProperties.length;j<subLn;j++){preprocessorProperty=preprocessorsProperties[j];if(data.hasOwnProperty(preprocessorProperty)){preprocessors.push(preprocessor.fn);break}}}}else{preprocessors.push(preprocessor)}}
hooks.onCreated=onCreated?onCreated:Ext.emptyFn;hooks.preprocessors=preprocessors;this.doProcess(Class,data,hooks)},doProcess:function(Class,data,hooks){var me=this,preprocessors=hooks.preprocessors,preprocessor=preprocessors.shift(),doProcess=me.doProcess;for(;preprocessor;preprocessor=preprocessors.shift()){if(preprocessor.call(me,Class,data,hooks,doProcess)===!1){return}}
hooks.onBeforeCreated.apply(me,arguments)},preprocessors:{},registerPreprocessor:function(name,fn,properties,position,relativeTo){if(!position){position='last'}
if(!properties){properties=[name]}
this.preprocessors[name]={name:name,properties:properties||!1,fn:fn};this.setDefaultPreprocessorPosition(name,position,relativeTo);return this},getPreprocessor:function(name){return this.preprocessors[name]},getPreprocessors:function(){return this.preprocessors},defaultPreprocessors:[],getDefaultPreprocessors:function(){return this.defaultPreprocessors},setDefaultPreprocessors:function(preprocessors){this.defaultPreprocessors=Ext.Array.from(preprocessors);return this},setDefaultPreprocessorPosition:function(name,offset,relativeName){var defaultPreprocessors=this.defaultPreprocessors,index;if(typeof offset==='string'){if(offset==='first'){defaultPreprocessors.unshift(name);return this}else if(offset==='last'){defaultPreprocessors.push(name);return this}
offset=(offset==='after')?1:-1}
index=Ext.Array.indexOf(defaultPreprocessors,relativeName);if(index!==-1){Ext.Array.splice(defaultPreprocessors,Math.max(0,index+offset),0,name)}
return this}});ExtClass.registerPreprocessor('extend',function(Class,data,hooks){var Base=Ext.Base,basePrototype=Base.prototype,extend=data.extend,Parent,parentPrototype,i;if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#extendPreProcessor',arguments)}
delete data.extend;if(extend&&extend!==Object){Parent=extend}else{Parent=Base}
parentPrototype=Parent.prototype;if(!Parent.$isClass){for(i in basePrototype){if(!parentPrototype[i]){parentPrototype[i]=basePrototype[i]}}}
Class.extend(Parent);Class.triggerExtended.apply(Class,arguments);if(data.onClassExtended){Class.onExtended(data.onClassExtended,Class);delete data.onClassExtended}},!0);ExtClass.registerPreprocessor('privates',function(Class,data){var privates=data.privates,statics=privates.statics,privacy=privates.privacy||!0;if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#privatePreprocessor',arguments)}
delete data.privates;delete privates.statics;Class.addMembers(privates,!1,privacy);if(statics){Class.addMembers(statics,!0,privacy)}});ExtClass.registerPreprocessor('statics',function(Class,data){if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#staticsPreprocessor',arguments)}
Class.addStatics(data.statics);delete data.statics});ExtClass.registerPreprocessor('inheritableStatics',function(Class,data){if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#inheritableStaticsPreprocessor',arguments)}
Class.addInheritableStatics(data.inheritableStatics);delete data.inheritableStatics});Ext.createRuleFn=function(code){return new Function('$c','with($c) { try { return ('+code+'); } catch(e) { return false;}}')};Ext.expressionCache=new Ext.util.Cache({miss:Ext.createRuleFn});Ext.ruleKeySortFn=ruleKeySortFn;Ext.getPlatformConfigKeys=function(platformConfig){var ret=[],platform,rule;for(platform in platformConfig){rule=Ext.expressionCache.get(platform);if(rule(Ext.platformTags)){ret.push(platform)}}
ret.sort(ruleKeySortFn);return ret};ExtClass.registerPreprocessor('config',function(Class,data){if(data.hasOwnProperty('$configPrefixed')){Class.prototype.$configPrefixed=data.$configPrefixed}
Class.addConfig(data.config);delete data.config});ExtClass.registerPreprocessor('cachedConfig',function(Class,data){if(data.hasOwnProperty('$configPrefixed')){Class.prototype.$configPrefixed=data.$configPrefixed}
Class.addCachedConfig(data.cachedConfig);delete data.cachedConfig});ExtClass.registerPreprocessor('mixins',function(Class,data,hooks){var mixins=data.mixins,onCreated=hooks.onCreated;if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#mixinsPreprocessor',arguments)}
delete data.mixins;hooks.onCreated=function(){if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#mixinsPreprocessor#beforeCreated',arguments)}
hooks.onCreated=onCreated;Class.mixin(mixins);return hooks.onCreated.apply(this,arguments)}});Ext.extend=function(Class,Parent,members){var cls,m;if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#extend-backwards-compatible',arguments)}
if(arguments.length===2&&Ext.isObject(Parent)){members=Parent;Parent=Class;Class=null}
if(!Parent){throw new Error("[Ext.extend] Attempting to extend from a class which has not "+"been loaded on the page.")}
members.extend=Parent;members.preprocessors=['extend','statics','inheritableStatics','mixins','config'];if(Class){cls=new ExtClass(Class,members);cls.prototype.constructor=Class}else{cls=new ExtClass(members)}
cls.prototype.override=function(o){for(m in o){if(o.hasOwnProperty(m)){this[m]=o[m]}}};return cls}}())
;
Ext.Inventory=function(){var me=this;me.names=[];me.paths={};me.alternateToName={};me.aliasToName={};me.nameToAliases={};me.nameToAlternates={};me.nameToPrefix={}};Ext.Inventory.prototype={_array1:[0],prefixes:null,dotRe:/\./g,wildcardRe:/\*/g,addAlias:function(className,alias,update){return this.addMapping(className,alias,this.aliasToName,this.nameToAliases,update)},addAlternate:function(className,alternate){return this.addMapping(className,alternate,this.alternateToName,this.nameToAlternates)},addMapping:function(className,alternate,toName,nameTo,update){var name=className.$className||className,mappings=name,array=this._array1,a,aliases,cls,i,length,nameMapping;if(Ext.isString(name)){mappings={};mappings[name]=alternate}
for(cls in mappings){aliases=mappings[cls];if(Ext.isString(aliases)){array[0]=aliases;aliases=array}
length=aliases.length;nameMapping=nameTo[cls]||(nameTo[cls]=[]);for(i=0;i<length;++i){if(!(a=aliases[i])){continue}
if(toName[a]!==cls){if(!update&&toName[a]&&('Ext.Gadget'!==a)){Ext.log.warn("Overriding existing mapping: '"+a+"' From '"+toName[a]+"' to '"+cls+"'. Is this intentional?")}
toName[a]=cls;nameMapping.push(a)}}}},getAliasesByName:function(name){return this.nameToAliases[name]||null},getAlternatesByName:function(name){return this.nameToAlternates[name]||null},getNameByAlias:function(alias){return this.aliasToName[alias]||''},getNameByAlternate:function(alternate){return this.alternateToName[alternate]||''},getNamesByExpression:function(expression,exclude,accumulate){var me=this,aliasToName=me.aliasToName,alternateToName=me.alternateToName,nameToAliases=me.nameToAliases,nameToAlternates=me.nameToAlternates,map=accumulate?exclude:{},names=[],expressions=Ext.isString(expression)?[expression]:expression,length=expressions.length,wildcardRe=me.wildcardRe,expr,i,list,match,n,name,regex;for(i=0;i<length;++i){if((expr=expressions[i]).indexOf('*')<0){if(!(name=aliasToName[expr])){if(!(name=alternateToName[expr])){name=expr}}
if(!(name in map)&&!(exclude&&(name in exclude))){map[name]=1;names.push(name)}}else{regex=new RegExp('^'+expr.replace(wildcardRe,'(.*?)')+'$');for(name in nameToAliases){if(!(name in map)&&!(exclude&&(name in exclude))){if(!(match=regex.test(name))){n=(list=nameToAliases[name]).length;while(!match&&n-->0){match=regex.test(list[n])}
list=nameToAlternates[name];if(list&&!match){n=list.length;while(!match&&n-->0){match=regex.test(list[n])}}}
if(match){map[name]=1;names.push(name)}}}}}
return names},getPath:function(className){var me=this,paths=me.paths,ret='',prefix;if(className in paths){ret=paths[className]}else{prefix=me.nameToPrefix[className]||(me.nameToPrefix[className]=me.getPrefix(className));if(prefix){className=className.substring(prefix.length+1);ret=paths[prefix];if(ret){ret+='/'}}
ret+=className.replace(me.dotRe,'/')+'.js'}
return ret},getPrefix:function(className){if(className in this.paths){return className}else if(className in this.nameToPrefix){return this.nameToPrefix[className]}
var prefixes=this.getPrefixes(),length=className.length,items,currChar,prefix,j,jlen;while(length-->0){items=prefixes[length];if(items){currChar=className.charAt(length);if(currChar!=='.'){continue}
for(j=0,jlen=items.length;j<jlen;j++){prefix=items[j];if(prefix===className.substring(0,length)){return prefix}}}}
return''},getPrefixes:function(){var me=this,prefixes=me.prefixes,names,name,nameLength,items,i,len;if(!prefixes){names=me.names.slice(0);me.prefixes=prefixes=[];for(i=0,len=names.length;i<len;i++){name=names[i];nameLength=name.length;items=prefixes[nameLength]||(prefixes[nameLength]=[]);items.push(name)}}
return prefixes},removeName:function(name){var me=this,aliasToName=me.aliasToName,alternateToName=me.alternateToName,nameToAliases=me.nameToAliases,nameToAlternates=me.nameToAlternates,aliases=nameToAliases[name],alternates=nameToAlternates[name],i,a;delete nameToAliases[name];delete nameToAlternates[name];delete me.nameToPrefix[name];if(aliases){for(i=aliases.length;i--;){if(name===aliasToName[a=aliases[i]]){delete aliasToName[a]}}}
if(alternates){for(i=alternates.length;i--;){if(name===alternateToName[a=alternates[i]]){delete alternateToName[a]}}}},resolveName:function(name){var me=this,trueName;if(!(name in me.nameToAliases)){if(!(trueName=me.aliasToName[name])){trueName=me.alternateToName[name]}}
return trueName||name},select:function(receiver,scope){var me=this,excludes={},ret={excludes:excludes,exclude:function(){me.getNamesByExpression(arguments[0],excludes,!0);return this}},name;for(name in receiver){ret[name]=me.selectMethod(excludes,receiver[name],scope||receiver)}
return ret},selectMethod:function(excludes,fn,scope){var me=this;return function(include){var args=Ext.Array.slice(arguments,1);args.unshift(me.getNamesByExpression(include,excludes));return fn.apply(scope,args)}},setPath:Ext.Function.flexSetter(function(name,path){var me=this;me.paths[name]=path;me.names.push(name);me.prefixes=null;me.nameToPrefix={};return me})}
;
Ext.ClassManager=(function(Class,alias,arraySlice,arrayFrom,global){var makeCtor=Ext.Class.makeCtor,isNonBrowser=typeof window==='undefined',nameLookupStack=[],namespaceCache={Ext:{name:'Ext',value:Ext}},Manager=Ext.apply(new Ext.Inventory(),{classes:{},classCount:0,classState:{},existCache:{},instantiators:[],isCreated:function(className){if(typeof className!=='string'||className.length<1){throw new Error("[Ext.ClassManager] Invalid classname, must be a string and "+"must not be empty")}
if(Manager.classes[className]||Manager.existCache[className]){return!0}
if(!Manager.lookupName(className,!1)){return!1}
Manager.triggerCreated(className);return!0},createdListeners:[],nameCreatedListeners:{},existsListeners:[],nameExistsListeners:{},overrideMap:{},triggerCreated:function(className,state){Manager.existCache[className]=state||1;Manager.classState[className]+=40;Manager.notify(className,Manager.createdListeners,Manager.nameCreatedListeners)},onCreated:function(fn,scope,className){Manager.addListener(fn,scope,className,Manager.createdListeners,Manager.nameCreatedListeners)},notify:function(className,listeners,nameListeners){var alternateNames=Manager.getAlternatesByName(className),names=[className],i,ln,j,subLn,listener,name;for(i=0,ln=listeners.length;i<ln;i++){listener=listeners[i];listener.fn.call(listener.scope,className)}
while(names){for(i=0,ln=names.length;i<ln;i++){name=names[i];listeners=nameListeners[name];if(listeners){for(j=0,subLn=listeners.length;j<subLn;j++){listener=listeners[j];listener.fn.call(listener.scope,name)}
delete nameListeners[name]}}
names=alternateNames;alternateNames=null}},addListener:function(fn,scope,className,listeners,nameListeners){var i;if(Ext.isArray(className)){fn=Ext.Function.createBarrier(className.length,fn,scope);for(i=0;i<className.length;i++){this.addListener(fn,null,className[i],listeners,nameListeners)}
return}
var listener={fn:fn,scope:scope};if(className){if(this.isCreated(className)){fn.call(scope,className);return}
if(!nameListeners[className]){nameListeners[className]=[]}
nameListeners[className].push(listener)}else{listeners.push(listener)}},$namespaceCache:namespaceCache,addRootNamespaces:function(namespaces){var name;for(name in namespaces){namespaceCache[name]={name:name,value:namespaces[name]}}},clearNamespaceCache:function(){var name;nameLookupStack.length=0;for(name in namespaceCache){if(!namespaceCache[name].value){delete namespaceCache[name]}}},getNamespaceEntry:function(namespace){var entry,i;if(typeof namespace!=='string'){return namespace}
entry=namespaceCache[namespace];if(!entry){i=namespace.lastIndexOf('.');if(i<0){entry={name:namespace}}else{entry={name:namespace.substring(i+1),parent:Manager.getNamespaceEntry(namespace.substring(0,i))}}
namespaceCache[namespace]=entry}
return entry},lookupName:function(namespace,autoCreate){var entry=Manager.getNamespaceEntry(namespace),scope=Ext.global,i=0,e,parent;for(e=entry;e;e=e.parent){nameLookupStack[i++]=e}
while(scope&&i-->0){e=nameLookupStack[i];parent=scope;scope=e.value||scope[e.name];if(!scope&&autoCreate){parent[e.name]=scope={}}}
return scope},setNamespace:function(namespace,value){var entry=Manager.getNamespaceEntry(namespace),scope=Ext.global;if(entry.parent){scope=Manager.lookupName(entry.parent,!0)}
scope[entry.name]=value;return value},setXType:function(cls,xtype){var className=cls.$className,C=className?cls:Manager.get(className=cls),proto=C.prototype,xtypes=proto.xtypes,xtypesChain=proto.xtypesChain,xtypesMap=proto.xtypesMap;if(!proto.hasOwnProperty('xtypes')){proto.xtypes=xtypes=[];proto.xtypesChain=xtypesChain=xtypesChain?xtypesChain.slice(0):[];proto.xtypesMap=xtypesMap=Ext.apply({},xtypesMap)}
Manager.addAlias(className,'widget.'+xtype,!0);xtypes.push(xtype);xtypesChain.push(xtype);xtypesMap[xtype]=!0},set:function(name,value){var targetName=Manager.getName(value);Manager.classes[name]=Manager.setNamespace(name,value);Manager.classCount++;if(targetName&&targetName!==name){Manager.addAlternate(targetName,name)}
return Manager},get:function(name){return Manager.classes[name]||Manager.lookupName(name,!1)},addNameAliasMappings:function(aliases){Manager.addAlias(aliases)},addNameAlternateMappings:function(alternates){Manager.addAlternate(alternates)},getByAlias:function(alias){return Manager.get(Manager.getNameByAlias(alias))},getByConfig:function(config,aliasPrefix){var xclass=config.xclass,name;if(xclass){name=xclass}else{name=config.xtype;if(name){aliasPrefix='widget.'}else{name=config.type}
name=Manager.getNameByAlias(aliasPrefix+name)}
return Manager.get(name)},getName:function(object){return object&&object.$className||''},getClass:function(object){return object&&object.self||null},create:function(className,data,createdFn){var ctor;if(className!=null&&typeof className!=='string'){throw new Error("[Ext.define] Invalid class name '"+className+"' specified, must be a non-empty string")}
ctor=makeCtor(className);if(typeof data==='function'){data=data(ctor)}
if(className){if(Manager.classes[className]){Ext.log.warn("[Ext.define] Duplicate class name '"+className+"' specified, must be a non-empty string")}
ctor.name=className}
data.$className=className;return new Class(ctor,data,function(){var postprocessorStack=data.postprocessors||Manager.defaultPostprocessors,registeredPostprocessors=Manager.postprocessors,postprocessors=[],postprocessor,i,ln,j,subLn,postprocessorProperties,postprocessorProperty;delete data.postprocessors;for(i=0,ln=postprocessorStack.length;i<ln;i++){postprocessor=postprocessorStack[i];if(typeof postprocessor==='string'){postprocessor=registeredPostprocessors[postprocessor];postprocessorProperties=postprocessor.properties;if(postprocessorProperties===!0){postprocessors.push(postprocessor.fn)}else if(postprocessorProperties){for(j=0,subLn=postprocessorProperties.length;j<subLn;j++){postprocessorProperty=postprocessorProperties[j];if(data.hasOwnProperty(postprocessorProperty)){postprocessors.push(postprocessor.fn);break}}}}else{postprocessors.push(postprocessor)}}
data.postprocessors=postprocessors;data.createdFn=createdFn;Manager.processCreate(className,this,data)})},processCreate:function(className,cls,clsData){var me=this,postprocessor=clsData.postprocessors.shift(),createdFn=clsData.createdFn;if(!postprocessor){if(Ext.classSystemMonitor){Ext.classSystemMonitor(className,'Ext.ClassManager#classCreated',arguments)}
if(className){me.set(className,cls)}
delete cls._classHooks;if(createdFn){createdFn.call(cls,cls)}
if(className){me.triggerCreated(className)}
return}
if(postprocessor.call(me,className,cls,clsData,me.processCreate)!==!1){me.processCreate(className,cls,clsData)}},createOverride:function(className,data,createdFn){var me=this,overriddenClassName=data.override,requires=data.requires,uses=data.uses,mixins=data.mixins,mixinsIsArray,compat=1,dependenciesLoaded,classReady;classReady=function(){var cls,dependencies,i,key,temp;if(!dependenciesLoaded){dependencies=requires?requires.slice(0):[];if(mixins){if(!(mixinsIsArray=mixins instanceof Array)){for(key in mixins){if(Ext.isString(cls=mixins[key])){dependencies.push(cls)}}}else{for(i=0,temp=mixins.length;i<temp;++i){if(Ext.isString(cls=mixins[i])){dependencies.push(cls)}}}}
dependenciesLoaded=!0;if(dependencies.length){Ext.require(dependencies,classReady);return}}
if(mixinsIsArray){for(i=0,temp=mixins.length;i<temp;++i){if(Ext.isString(cls=mixins[i])){mixins[i]=Ext.ClassManager.get(cls)}}}else if(mixins){for(key in mixins){if(Ext.isString(cls=mixins[key])){mixins[key]=Ext.ClassManager.get(cls)}}}
cls=overriddenClassName.$isClass?overriddenClassName:me.get(overriddenClassName);delete data.override;delete data.compatibility;delete data.requires;delete data.uses;Ext.override(cls,data);Ext.Loader.history.push(className);if(uses){Ext.Loader.addUsedClasses(uses)}
if(createdFn){createdFn.call(cls,cls)}};if(className){Manager.overrideMap[className]=!0}
if('compatibility' in data){compat=data.compatibility;if(!compat){compat=!1}else if(typeof compat==='number'){compat=!0}else if(typeof compat!=='boolean'){compat=Ext.checkVersion(compat)}}
if(compat){if(overriddenClassName.$isClass){classReady()}else{me.onCreated(classReady,me,overriddenClassName)}}
me.triggerCreated(className,2);return me},instantiateByAlias:function(){var alias=arguments[0],args=arraySlice.call(arguments),className=this.getNameByAlias(alias);if(!className){throw new Error("[Ext.createByAlias] Unrecognized alias: "+alias)}
args[0]=className;return Ext.create.apply(Ext,args)},instantiate:function(){Ext.log.warn('Ext.ClassManager.instantiate() is deprecated. Use Ext.create() instead.');return Ext.create.apply(Ext,arguments)},dynInstantiate:function(name,args){args=arrayFrom(args,!0);args.unshift(name);return Ext.create.apply(Ext,args)},getInstantiator:function(length){var instantiators=this.instantiators,instantiator,args,i;instantiator=instantiators[length];if(!instantiator){i=length;args=[];for(i=0;i<length;i++){args.push('a['+i+']')}
instantiator=instantiators[length]=new Function('c','a','return new c('+args.join(',')+')');instantiator.name="Ext.create"+length}
return instantiator},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(name,fn,properties,position,relativeTo){if(!position){position='last'}
if(!properties){properties=[name]}
this.postprocessors[name]={name:name,properties:properties||!1,fn:fn};this.setDefaultPostprocessorPosition(name,position,relativeTo);return this},setDefaultPostprocessors:function(postprocessors){this.defaultPostprocessors=arrayFrom(postprocessors);return this},setDefaultPostprocessorPosition:function(name,offset,relativeName){var defaultPostprocessors=this.defaultPostprocessors,index;if(typeof offset==='string'){if(offset==='first'){defaultPostprocessors.unshift(name);return this}else if(offset==='last'){defaultPostprocessors.push(name);return this}
offset=(offset==='after')?1:-1}
index=Ext.Array.indexOf(defaultPostprocessors,relativeName);if(index!==-1){Ext.Array.splice(defaultPostprocessors,Math.max(0,index+offset),0,name)}
return this}});Manager.registerPostprocessor('platformConfig',function(name,Class,data){Class.addPlatformConfig(data)});Manager.registerPostprocessor('alias',function(name,cls,data){if(Ext.classSystemMonitor){Ext.classSystemMonitor(name,'Ext.ClassManager#aliasPostProcessor',arguments)}
var aliases=Ext.Array.from(data.alias),i,ln;for(i=0,ln=aliases.length;i<ln;i++){alias=aliases[i];this.addAlias(cls,alias)}},['xtype','alias']);Manager.registerPostprocessor('singleton',function(name,cls,data,fn){if(Ext.classSystemMonitor){Ext.classSystemMonitor(name,'Ext.ClassManager#singletonPostProcessor',arguments)}
if(data.singleton){fn.call(this,name,new cls(),data)}else{return!0}
return!1});Manager.registerPostprocessor('alternateClassName',function(name,cls,data){var alternates=data.alternateClassName,i,ln,alternate;if(Ext.classSystemMonitor){Ext.classSystemMonitor(name,'Ext.ClassManager#alternateClassNamePostprocessor',arguments)}
if(!(alternates instanceof Array)){alternates=[alternates]}
for(i=0,ln=alternates.length;i<ln;i++){alternate=alternates[i];if(typeof alternate!=='string'){throw new Error("[Ext.define] Invalid alternate of: '"+alternate+"' for class: '"+name+"'; must be a valid string")}
this.set(alternate,cls)}});Manager.registerPostprocessor('debugHooks',function(name,Class,data){var target;if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#debugHooks',arguments)}
if(Ext.isDebugEnabled(Class.$className,data.debugHooks.$enabled)){delete data.debugHooks.$enabled;Ext.override(Class,data.debugHooks)}
target=Class.isInstance?Class.self:Class;delete target.prototype.debugHooks});Manager.registerPostprocessor('deprecated',function(name,Class,data){var target;if(Ext.classSystemMonitor){Ext.classSystemMonitor(Class,'Ext.Class#deprecated',arguments)}
target=Class.isInstance?Class.self:Class;target.addDeprecations(data.deprecated);delete target.prototype.deprecated});Ext.apply(Ext,{create:function(){var name=arguments[0],nameType=typeof name,args=arraySlice.call(arguments,1),cls;if(nameType==='function'){cls=name}else{if(nameType!=='string'&&args.length===0){args=[name];if(!(name=name.xclass)){name=args[0].xtype;if(name){name='widget.'+name}}}
if(typeof name!=='string'||name.length<1){throw new Error("[Ext.create] Invalid class name or alias '"+name+"' specified, must be a non-empty string")}
name=Manager.resolveName(name);cls=Manager.get(name)}
if(!cls){if(!isNonBrowser){Ext.log.warn("[Ext.Loader] Synchronously loading '"+name+"'; consider adding "+"Ext.require('"+name+"') above Ext.onReady")}
Ext.syncRequire(name);cls=Manager.get(name)}
if(!cls){throw new Error("[Ext.create] Unrecognized class name / alias: "+name)}
if(typeof cls!=='function'){throw new Error("[Ext.create] Singleton '"+name+"' cannot be instantiated.")}
return Manager.getInstantiator(args.length)(cls,args)},widget:function(name,config){var xtype=name,alias,className,T;if(typeof xtype!=='string'){config=name;xtype=config.xtype;className=config.xclass}else{config=config||{}}
if(config.isComponent){return config}
if(!className){alias='widget.'+xtype;className=Manager.getNameByAlias(alias)}
if(className){T=Manager.get(className)}
if(!T){return Ext.create(className||alias,config)}
return new T(config)},createByAlias:alias(Manager,'instantiateByAlias'),define:function(className,data,createdFn){if(Ext.classSystemMonitor){Ext.classSystemMonitor(className,'ClassManager#define',arguments)}
if(data.override){Manager.classState[className]=20;return Manager.createOverride.apply(Manager,arguments)}
Manager.classState[className]=10;return Manager.create.apply(Manager,arguments)},undefine:function(className){var classes=Manager.classes;if(Ext.classSystemMonitor){Ext.classSystemMonitor(className,'Ext.ClassManager#undefine',arguments)}
if(classes[className]){Manager.classCount--}
delete classes[className];delete Manager.existCache[className];delete Manager.classState[className];Manager.removeName(className);Ext.Factory.clearCaches();var entry=Manager.getNamespaceEntry(className),scope=entry.parent?Manager.lookupName(entry.parent,!1):Ext.global,entryName;if(scope){entryName=entry.name;try{delete scope[entryName]}catch(e){scope[entryName]=undefined}}
return entryName},getClassName:alias(Manager,'getName'),getDisplayName:function(object){if(object){if(object.displayName){return object.displayName}
if(object.$name&&object.$class){return Ext.getClassName(object.$class)+'#'+object.$name}
if(object.$className){return object.$className}}
return'Anonymous'},getClass:alias(Manager,'getClass'),namespace:function(){var root=global,i;for(i=arguments.length;i-->0;){root=Manager.lookupName(arguments[i],!0)}
return root}});Ext.addRootNamespaces=Manager.addRootNamespaces;Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;Class.registerPreprocessor('className',function(cls,data){if('$className' in data){cls.$className=data.$className;cls.displayName=cls.$className}
if(Ext.classSystemMonitor){Ext.classSystemMonitor(cls,'Ext.ClassManager#classNamePreprocessor',arguments)}},!0,'first');Class.registerPreprocessor('alias',function(cls,data){if(Ext.classSystemMonitor){Ext.classSystemMonitor(cls,'Ext.ClassManager#aliasPreprocessor',arguments)}
var prototype=cls.prototype,xtypes=arrayFrom(data.xtype),aliases=arrayFrom(data.alias),widgetPrefix='widget.',widgetPrefixLength=widgetPrefix.length,xtypesChain=Array.prototype.slice.call(prototype.xtypesChain||[]),xtypesMap=Ext.merge({},prototype.xtypesMap||{}),i,ln,alias,xtype;for(i=0,ln=aliases.length;i<ln;i++){alias=aliases[i];if(typeof alias!=='string'||alias.length<1){throw new Error("[Ext.define] Invalid alias of: '"+alias+"' for class: '"+name+"'; must be a valid string")}
if(alias.substring(0,widgetPrefixLength)===widgetPrefix){xtype=alias.substring(widgetPrefixLength);Ext.Array.include(xtypes,xtype)}}
cls.xtype=data.xtype=xtypes[0];data.xtypes=xtypes;for(i=0,ln=xtypes.length;i<ln;i++){xtype=xtypes[i];if(!xtypesMap[xtype]){xtypesMap[xtype]=!0;xtypesChain.push(xtype)}}
data.xtypesChain=xtypesChain;data.xtypesMap=xtypesMap;Ext.Function.interceptAfterOnce(cls,'onClassCreated',function(){var cls=this,prototype=cls.prototype,mixins=prototype.mixins,key,mixin;if(Ext.classSystemMonitor){Ext.classSystemMonitor(cls,'Ext.ClassManager#aliasPreprocessor#afterClassCreated',arguments)}
for(key in mixins){if(mixins.hasOwnProperty(key)){mixin=mixins[key];xtypes=mixin.xtypes;if(xtypes){for(i=0,ln=xtypes.length;i<ln;i++){xtype=xtypes[i];if(!xtypesMap[xtype]){xtypesMap[xtype]=!0;xtypesChain.push(xtype)}}}}}});for(i=0,ln=xtypes.length;i<ln;i++){xtype=xtypes[i];if(typeof xtype!=='string'||xtype.length<1){throw new Error("[Ext.define] Invalid xtype of: '"+xtype+"' for class: '"+name+"'; must be a valid non-empty string")}
Ext.Array.include(aliases,widgetPrefix+xtype)}
data.alias=aliases},['xtype','alias']);if(Ext.manifest){var manifest=Ext.manifest,classes=manifest.classes,paths=manifest.paths,aliases={},alternates={},className,obj,name,path,baseUrl;if(paths){if(manifest.bootRelative){baseUrl=Ext.Boot.baseUrl;for(path in paths){if(paths.hasOwnProperty(path)){paths[path]=baseUrl+paths[path]}}}
Manager.setPath(paths)}
if(classes){for(className in classes){alternates[className]=[];aliases[className]=[];obj=classes[className];if(obj.alias){aliases[className]=obj.alias}
if(obj.alternates){alternates[className]=obj.alternates}}}
Manager.addAlias(aliases);Manager.addAlternate(alternates)}
return Manager}(Ext.Class,Ext.Function.alias,Array.prototype.slice,Ext.Array.from,Ext.global))
;
Ext.define('Ext.mixin.Watchable',{on:function(name,fn,scope){return this._watchUpdate(!1,'_watchAdd',name,fn,scope)},fire:function(event,args){var me=this,watching=me.watching,watchers=watching&&watching[event],fn,i,r,scope;if(watchers){++watchers.$firing;for(i=0;i<watchers.length;++i){scope=watchers[i][0];fn=watchers[i][1];if(fn.charAt){r=args?scope[fn].apply(scope,args):scope[fn]()}else{r=args?fn.apply(scope,args):fn.call(scope)}
if(r===!1){return r}}
--watchers.$firing}},fireEvent:function(){var args=Ext.Array.slice(arguments),event=args.shift();return this.fire(event,args)},un:function(name,fn,scope){return this._watchUpdate(!0,'_watchRemove',name,fn,scope)},privates:{watching:null,$watchOptions:{destroyable:1,scope:1},_watchAdd:function(watching,name,fn,scope,destroyable){if(typeof fn==='string'&&!scope[fn]){Ext.raise('No such method "'+fn+'" on '+scope.$className)}
var watchers=watching[name],entry=[scope,fn],i,ent;if(!watchers){watching[name]=watchers=[];watchers.$firing=0}else{for(i=watchers.length;i-->0;){ent=watchers[i];if(fn===ent[1]){if(scope?ent[0]===scope:!ent[0]){return}}}
if(watchers.$firing){watching[name]=watchers=watchers.slice();watchers.$firing=0}}
watchers.push(entry);if(destroyable){entry.push(name);destroyable.items.push(entry)}},_watchRemove:function(watching,name,fn,scope){var watchers=watching[name],i;if(watchers){if(watchers.$firing){watching[name]=watchers=watchers.slice();watchers.$firing=0}
for(i=watchers.length;i-->0;){if(watchers[i][0]===scope&&watchers[i][1]===fn){watchers.splice(i,1)}}}},_watchUpdate:function(remove,process,name,fn,scope){var me=this,watch=name,watching=me.watching,destroyable;if(!watching){if(remove){return}
me.watching=watching={}}
if(typeof name==='string'){me[process](watching,name,fn,scope)}else{destroyable=watch.destroyable?{owner:me,items:[],destroy:me._watcherDestroyer}:null;scope=watch.scope;for(name in watch){if(!me.$watchOptions[name]){me[process](watching,name,watch[name],scope,destroyable)}}}
return destroyable},_watcherDestroyer:function(){var me=this.owner,watching=me.watching,items=this.items,entry,i;for(i=0;i<items.length;++i){entry=items[i];me._watchRemove(watching,entry[2],entry[1],entry[0])}}}})
;
(Ext.env||(Ext.env={})).Browser=function(userAgent,publish){var me=this,browserPrefixes=Ext.Boot.browserPrefixes,browserNames=Ext.Boot.browserNames,enginePrefixes=me.enginePrefixes,engineNames=me.engineNames,browserMatch=userAgent.match(new RegExp('((?:'+Ext.Object.getValues(browserPrefixes).join(')|(?:')+'))([\\w\\._]+)')),engineMatch=userAgent.match(new RegExp('((?:'+Ext.Object.getValues(enginePrefixes).join(')|(?:')+'))([\\w\\._]+)')),browserName=browserNames.other,engineName=engineNames.other,browserVersion='',engineVersion='',majorVer='',isWebView=!1,edgeRE=/(Edge\/)([\w.]+)/,ripple='',i,prefix,name;me.userAgent=userAgent;this.is=function(name){return!!this.is[name]};if(/Edge\//.test(userAgent)){browserMatch=userAgent.match(edgeRE);engineMatch=userAgent.match(edgeRE)}
if(browserMatch){browserName=browserNames[Ext.Object.getKey(browserPrefixes,browserMatch[1])];if(browserName==='Safari'&&/^Opera/.test(userAgent)){browserName='Opera'}
browserVersion=new Ext.Version(browserMatch[2])}
if(engineMatch){engineName=engineNames[Ext.Object.getKey(enginePrefixes,engineMatch[1])];engineVersion=new Ext.Version(engineMatch[2])}
if(engineName==='Trident'&&browserName!=='IE'){browserName='IE';var version=userAgent.match(/.*rv:(\d+.\d+)/);if(version&&version.length){version=version[1];browserVersion=new Ext.Version(version)}}
if(browserName&&browserVersion){Ext.setVersion(browserName,browserVersion)}
if(userAgent.match(/FB/)&&browserName==='Other'){browserName=browserNames.safari;engineName=engineNames.webkit}else if(userAgent.match(/Android.*Chrome/g)){browserName='ChromeMobile'}else{browserMatch=userAgent.match(/OPR\/(\d+.\d+)/);if(browserMatch){browserName='Opera';browserVersion=new Ext.Version(browserMatch[1])}}
Ext.apply(this,{engineName:engineName,engineVersion:engineVersion,name:browserName,version:browserVersion});this.setFlag(browserName,!0,publish);if(browserVersion){majorVer=browserVersion.getMajor()||'';if(me.is.IE){majorVer=document.documentMode||parseInt(majorVer,10);for(i=7;i<=11;++i){prefix='isIE'+i;Ext[prefix]=majorVer===i;Ext[prefix+'m']=majorVer<=i;Ext[prefix+'p']=majorVer>=i}}
if(me.is.Opera&&parseInt(majorVer,10)<=12){Ext.isOpera12m=!0}
Ext.chromeVersion=Ext.isChrome?majorVer:0;Ext.firefoxVersion=Ext.isFirefox?majorVer:0;Ext.ieVersion=Ext.isIE?majorVer:0;Ext.operaVersion=Ext.isOpera?majorVer:0;Ext.safariVersion=Ext.isSafari?majorVer:0;Ext.webKitVersion=Ext.isWebKit?majorVer:0;this.setFlag(browserName+majorVer,!0,publish);this.setFlag(browserName+browserVersion.getShortVersion())}
for(i in browserNames){if(browserNames.hasOwnProperty(i)){name=browserNames[i];this.setFlag(name,browserName===name)}}
this.setFlag(name);if(engineVersion){this.setFlag(engineName+(engineVersion.getMajor()||''));this.setFlag(engineName+engineVersion.getShortVersion())}
for(i in engineNames){if(engineNames.hasOwnProperty(i)){name=engineNames[i];this.setFlag(name,engineName===name,publish)}}
this.setFlag('Standalone',!!navigator.standalone);try{ripple=window.top.ripple}catch(e){}
this.setFlag('Ripple',!!document.getElementById("tinyhippos-injected")&&!Ext.isEmpty(ripple));this.setFlag('WebWorks',!!window.blackberry);if(window.PhoneGap!==undefined||window.Cordova!==undefined||window.cordova!==undefined){isWebView=!0;this.setFlag('PhoneGap');this.setFlag('Cordova')}
if(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)(?!.*FBAN)/i.test(userAgent)){isWebView=!0}
this.setFlag('WebView',isWebView);this.isStrict=Ext.isStrict=document.compatMode==="CSS1Compat";this.isSecure=Ext.isSecure;this.identity=browserName+majorVer+(this.isStrict?'Strict':'Quirks')};Ext.env.Browser.prototype={constructor:Ext.env.Browser,engineNames:{edge:'Edge',webkit:'WebKit',gecko:'Gecko',presto:'Presto',trident:'Trident',other:'Other'},enginePrefixes:{edge:'Edge/',webkit:'AppleWebKit/',gecko:'Gecko/',presto:'Presto/',trident:'Trident/'},styleDashPrefixes:{WebKit:'-webkit-',Gecko:'-moz-',Trident:'-ms-',Presto:'-o-',Other:''},stylePrefixes:{WebKit:'Webkit',Gecko:'Moz',Trident:'ms',Presto:'O',Other:''},propertyPrefixes:{WebKit:'webkit',Gecko:'moz',Trident:'ms',Presto:'o',Other:''},name:null,version:null,engineName:null,engineVersion:null,setFlag:function(name,value,publish){if(value===undefined){value=!0}
this.is[name]=value;this.is[name.toLowerCase()]=value;if(publish){Ext['is'+name]=value}
return this},getStyleDashPrefix:function(){return this.styleDashPrefixes[this.engineName]},getStylePrefix:function(){return this.stylePrefixes[this.engineName]},getVendorProperyName:function(name){var prefix=this.propertyPrefixes[this.engineName];if(prefix.length>0){return prefix+Ext.String.capitalize(name)}
return name}};(function(userAgent){Ext.browser=new Ext.env.Browser(userAgent,!0);Ext.userAgent=userAgent.toLowerCase();Ext.SSL_SECURE_URL=Ext.isSecure&&Ext.isIE?'javascript:\'\'':'about:blank'}(Ext.global.navigator.userAgent))
;
Ext.env.OS=function(userAgent,platform,browserScope){var me=this,names=Ext.Boot.osNames,prefixes=Ext.Boot.osPrefixes,name,version='',is=me.is,i,prefix,match,item,match1;browserScope=browserScope||Ext.browser;for(i in prefixes){if(prefixes.hasOwnProperty(i)){prefix=prefixes[i];match=userAgent.match(new RegExp('(?:'+prefix+')([^\\s;]+)'));if(match){name=names[i];match1=match[1];if(match1&&match1==="HTC_"){version=new Ext.Version("2.3")}else if(match1&&match1==="Silk/"){version=new Ext.Version("2.3")}else{version=new Ext.Version(match[match.length-1])}
break}}}
if(!name){name=names[(userAgent.toLowerCase().match(/mac|win|linux/)||['other'])[0]];version=new Ext.Version('')}
this.name=name;this.version=version;if(userAgent.match(/ipad/i)){platform='iPad'}
if(platform){this.setFlag(platform.replace(/ simulator$/i,''))}
this.setFlag(name);if(version){this.setFlag(name+(version.getMajor()||''));this.setFlag(name+version.getShortVersion())}
for(i in names){if(names.hasOwnProperty(i)){item=names[i];if(!is.hasOwnProperty(name)){this.setFlag(item,(name===item))}}}
if(this.name==="iOS"&&window.screen.height===568){this.setFlag('iPhone5')}
if(browserScope.is.Safari||browserScope.is.Silk){if(this.is.Android2||this.is.Android3||browserScope.version.shortVersion===501){browserScope.setFlag("AndroidStock")}
if(this.is.Android4){browserScope.setFlag("AndroidStock");browserScope.setFlag("AndroidStock4")}}};Ext.env.OS.prototype={constructor:Ext.env.OS,is:function(name){return!!this[name]},name:null,version:null,setFlag:function(name,value){if(value===undefined){value=!0}
if(this.flags){this.flags[name]=value}
this.is[name]=value;this.is[name.toLowerCase()]=value;return this}};(function(){var navigation=Ext.global.navigator,userAgent=navigation.userAgent,OS=Ext.env.OS,is=(Ext.is||(Ext.is={})),osEnv,osName,deviceType;OS.prototype.flags=is;Ext.os=osEnv=new OS(userAgent,navigation.platform);osName=osEnv.name;Ext['is'+osName]=!0;Ext.isMac=is.Mac=is.MacOS;Ext.isApple=Ext.isMac||Ext.isiOS;var search=window.location.search.match(/deviceType=(Tablet|Phone)/),nativeDeviceType=window.deviceType;if(search&&search[1]){deviceType=search[1]}else if(nativeDeviceType==='iPhone'){deviceType='Phone'}else if(nativeDeviceType==='iPad'){deviceType='Tablet'}else{if(!osEnv.is.Android&&!osEnv.is.iOS&&!osEnv.is.WindowsPhone&&/Windows|Linux|MacOS|ChromeOS/.test(osName)){deviceType='Desktop';Ext.browser.is.WebView=!!Ext.browser.is.Ripple}else if(osEnv.is.iPad||osEnv.is.RIMTablet||osEnv.is.Android3||Ext.browser.is.Silk||(osEnv.is.Android&&userAgent.search(/mobile/i)===-1)){deviceType='Tablet'}else{deviceType='Phone'}}
osEnv.setFlag(deviceType,!0);osEnv.deviceType=deviceType;delete OS.prototype.flags}())
;
Ext.feature={has:function(name){return!!this.has[name]},testElements:{},getTestElement:function(tag,createNew){if(tag===undefined){tag='div'}else if(typeof tag!=='string'){return tag}
if(createNew){return document.createElement(tag)}
if(!this.testElements[tag]){this.testElements[tag]=document.createElement(tag)}
return this.testElements[tag]},isStyleSupported:function(name,tag){var elementStyle=this.getTestElement(tag).style,cName=Ext.String.capitalize(name);if(typeof elementStyle[name]!=='undefined'||typeof elementStyle[Ext.browser.getStylePrefix(name)+cName]!=='undefined'){return!0}
return!1},isStyleSupportedWithoutPrefix:function(name,tag){var elementStyle=this.getTestElement(tag).style;if(typeof elementStyle[name]!=='undefined'){return!0}
return!1},isEventSupported:function(name,tag){if(tag===undefined){tag=window}
var element=this.getTestElement(tag),eventName='on'+name.toLowerCase(),isSupported=(eventName in element);if(!isSupported){if(element.setAttribute&&element.removeAttribute){element.setAttribute(eventName,'');isSupported=typeof element[eventName]==='function';if(typeof element[eventName]!=='undefined'){element[eventName]=undefined}
element.removeAttribute(eventName)}}
return isSupported},getStyle:function(element,styleName){var view=element.ownerDocument.defaultView,style=(view?view.getComputedStyle(element,null):element.currentStyle);return(style||element.style)[styleName]},getSupportedPropertyName:function(object,name){var vendorName=Ext.browser.getVendorProperyName(name);if(vendorName in object){return vendorName}else if(name in object){return name}
return null},detect:function(isReady){var me=this,doc=document,toRun=me.toRun||me.tests,n=toRun.length,div=doc.createElement('div'),notRun=[],supports=Ext.supports,has=me.has,name,names,test,vector,value;div.innerHTML='<div style="height:30px;width:50px;">'+'<div style="height:20px;width:20px;"></div>'+'</div>'+'<div style="width: 200px; height: 200px; position: relative; padding: 5px;">'+'<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div>'+'</div>'+'<div style="position: absolute; left: 10%; top: 10%;"></div>'+'<div style="float:left; background-color:transparent;"></div>';if(isReady){doc.body.appendChild(div)}
vector=me.preDetected[Ext.browser.identity]||[];while(n--){test=toRun[n];value=vector[n];name=test.name;names=test.names;if(value===undefined){if(!isReady&&test.ready){notRun.push(test);continue}
value=test.fn.call(me,doc,div)}
if(name){supports[name]=has[name]=value}else if(names){while(names.length){name=names.pop();supports[name]=has[name]=value}}}
if(isReady){doc.body.removeChild(div)}
me.toRun=notRun},report:function(){var values=[],len=this.tests.length,i;for(i=0;i<len;++i){values.push(this.has[this.tests[i].name]?1:0)}
Ext.log(Ext.browser.identity+': ['+values.join(',')+']')},preDetected:{},tests:[{name:'CloneNodeCopiesExpando',fn:function(){var el=document.createElement('div');el.expandoProp={};return el.cloneNode().expandoProp===el.expandoProp}},{name:'CSSPointerEvents',fn:function(doc){return'pointerEvents' in doc.documentElement.style}},{name:'CSS3BoxShadow',fn:function(doc){return'boxShadow' in doc.documentElement.style||'WebkitBoxShadow' in doc.documentElement.style||'MozBoxShadow' in doc.documentElement.style}},{name:'CSS3NegationSelector',fn:function(doc){try{doc.querySelectorAll("foo:not(bar)")}catch(e){return!1}
return!0}},{name:'ClassList',fn:function(doc){return!!doc.documentElement.classList}},{name:'Canvas',fn:function(){var element=this.getTestElement('canvas');return!!(element&&element.getContext&&element.getContext('2d'))}},{name:'Svg',fn:function(doc){return!!(doc.createElementNS&&!!doc.createElementNS("http:/"+"/www.w3.org/2000/svg","svg").createSVGRect)}},{name:'Vml',fn:function(){var element=this.getTestElement(),ret=!1;element.innerHTML="<!--[if vml]><br><![endif]-->";ret=(element.childNodes.length===1);element.innerHTML="";return ret}},{name:'Touch',fn:function(){var maxTouchPoints=navigator.msMaxTouchPoints||navigator.maxTouchPoints;if(Ext.browser.is.Chrome&&Ext.browser.version.isLessThanOrEqual(39)){return(Ext.supports.TouchEvents&&maxTouchPoints!==1)||maxTouchPoints>1}else{return Ext.supports.TouchEvents||maxTouchPoints>0}}},{name:'PointerEvents',fn:function(){var pointerEvent=window.PointerEvent,nav=window.navigator,pointerEnabled=!!(pointerEvent&&(nav.pointerEnabled||!Ext.isIE));return pointerEnabled&&!Ext.supports.TouchEvents}},{name:'MSPointerEvents',fn:function(){return Ext.isIE10}},{name:'TouchEvents',fn:function(){return this.isEventSupported('touchend')}},{name:'TouchAction',ready:!0,fn:function(doc,div){if(!window.getComputedStyle){return 0}
var values=['pan-x','pan-y','pinch-zoom','double-tap-zoom'],flags=[1,2,4,8],ln=values.length,flag=0,i,value;for(i=0;i<ln;i++){value=values[i];div.style.touchAction=value;if(getComputedStyle(div).touchAction===value){flag|=flags[i]}}
return flag}},{name:'Orientation',fn:function(){return('orientation' in window)&&this.isEventSupported('orientationchange')}},{name:'OrientationChange',fn:function(){return this.isEventSupported('orientationchange')}},{name:'DeviceMotion',fn:function(){return this.isEventSupported('devicemotion')}},{names:['Geolocation','GeoLocation'],fn:function(){return'geolocation' in window.navigator}},{name:'SqlDatabase',fn:function(){return'openDatabase' in window}},{name:'WebSockets',fn:function(){return'WebSocket' in window}},{name:'Range',fn:function(){return!!document.createRange}},{name:'CreateContextualFragment',fn:function(){var range=!!document.createRange?document.createRange():!1;return range&&!!range.createContextualFragment}},{name:'History',fn:function(){return('history' in window&&'pushState' in window.history)}},{name:'Css3dTransforms',fn:function(){return this.has('CssTransforms')&&this.isStyleSupported('perspective')}},{name:'CssTransforms',fn:function(){return this.isStyleSupported('transform')}},{name:'CssTransformNoPrefix',fn:function(){return this.isStyleSupportedWithoutPrefix('transform')}},{name:'CssAnimations',fn:function(){return this.isStyleSupported('animationName')}},{names:['CssTransitions','Transitions'],fn:function(){return this.isStyleSupported('transitionProperty')}},{names:['Audio','AudioTag'],fn:function(){return!!this.getTestElement('audio').canPlayType}},{name:'Video',fn:function(){return!!this.getTestElement('video').canPlayType}},{name:'LocalStorage',fn:function(){try{if('localStorage' in window&&window.localStorage!==null){localStorage.setItem('sencha-localstorage-test','test success');localStorage.removeItem('sencha-localstorage-test');return!0}}catch(e){}
return!1}},{name:'XmlQuerySelector',fn:function(){var xmlString='<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><root></root>',xmlDoc;if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.xmlDOM");xmlDoc.async=!1;xmlDoc.loadXML(xmlString)}else if(window.DOMParser){var parser=new DOMParser();xmlDoc=parser.parseFromString(xmlString,'text/xml')}
return xmlDoc?!!xmlDoc.lastChild.querySelector:!1}},{name:'XHR2',fn:function(){return window.ProgressEvent&&window.FormData&&window.XMLHttpRequest&&('withCredentials' in new XMLHttpRequest())}},{name:'XHRUploadProgress',fn:function(){var xhr;if(window.XMLHttpRequest&&!Ext.browser.is.AndroidStock){xhr=new XMLHttpRequest();return xhr&&('upload' in xhr)&&('onprogress' in xhr.upload)}
return!1}},{name:'NumericInputPlaceHolder',fn:function(){return!(Ext.browser.is.AndroidStock4&&Ext.os.version.getMinor()<2)}},{name:'matchesSelector',fn:function(){var el=document.documentElement,w3='matches',wk='webkitMatchesSelector',ms='msMatchesSelector',mz='mozMatchesSelector';return el[w3]?w3:el[wk]?wk:el[ms]?ms:el[mz]?mz:null}},{name:'RightMargin',ready:!0,fn:function(doc,div){var view=doc.defaultView;return!(view&&view.getComputedStyle(div.firstChild.firstChild,null).marginRight!=='0px')}},{name:'DisplayChangeInputSelectionBug',fn:function(){var webKitVersion=Ext.webKitVersion;return 0<webKitVersion&&webKitVersion<533}},{name:'DisplayChangeTextAreaSelectionBug',fn:function(){var webKitVersion=Ext.webKitVersion;return 0<webKitVersion&&webKitVersion<534.24}},{name:'TransparentColor',ready:!0,fn:function(doc,div,view){view=doc.defaultView;return!(view&&view.getComputedStyle(div.lastChild,null).backgroundColor!=='transparent')}},{name:'ComputedStyle',ready:!0,fn:function(doc,div,view){view=doc.defaultView;return!!(view&&view.getComputedStyle)}},{name:'Float',fn:function(doc){return'cssFloat' in doc.documentElement.style}},{name:'CSS3BorderRadius',ready:!0,fn:function(doc){var domPrefixes=['borderRadius','BorderRadius','MozBorderRadius','WebkitBorderRadius','OBorderRadius','KhtmlBorderRadius'],pass=!1,i;for(i=0;i<domPrefixes.length;i++){if(doc.documentElement.style[domPrefixes[i]]!==undefined){pass=!0}}
return pass&&!Ext.isIE9}},{name:'CSS3LinearGradient',fn:function(doc,div){var property='background-image:',webkit='-webkit-gradient(linear, left top, right bottom, from(black), to(white))',w3c='linear-gradient(left top, black, white)',moz='-moz-'+w3c,ms='-ms-'+w3c,opera='-o-'+w3c,options=[property+webkit,property+w3c,property+moz,property+ms,property+opera];div.style.cssText=options.join(';');return((""+div.style.backgroundImage).indexOf('gradient')!==-1)&&!Ext.isIE9}},{name:'MouseEnterLeave',fn:function(doc){return('onmouseenter' in doc.documentElement&&'onmouseleave' in doc.documentElement)}},{name:'MouseWheel',fn:function(doc){return('onmousewheel' in doc.documentElement)}},{name:'Opacity',fn:function(doc,div){if(Ext.isIE8){return!1}
div.firstChild.style.cssText='opacity:0.73';return div.firstChild.style.opacity=='0.73'}},{name:'Placeholder',fn:function(doc){return'placeholder' in doc.createElement('input')}},{name:'Direct2DBug',fn:function(doc){return Ext.isString(doc.documentElement.style.msTransformOrigin)&&Ext.isIE9m}},{name:'BoundingClientRect',fn:function(doc){return'getBoundingClientRect' in doc.documentElement}},{name:'RotatedBoundingClientRect',ready:!0,fn:function(doc){var body=doc.body,supports=!1,el=doc.createElement('div'),style=el.style;if(el.getBoundingClientRect){style.position='absolute';style.top="0";style.WebkitTransform=style.MozTransform=style.msTransform=style.OTransform=style.transform='rotate(90deg)';style.width='100px';style.height='30px';body.appendChild(el);supports=el.getBoundingClientRect().height!==100;body.removeChild(el)}
return supports}},{name:'ChildContentClearedWhenSettingInnerHTML',ready:!0,fn:function(){var el=this.getTestElement(),child;el.innerHTML='<div>a</div>';child=el.firstChild;el.innerHTML='<div>b</div>';return child.innerHTML!=='a'}},{name:'IncludePaddingInWidthCalculation',ready:!0,fn:function(doc,div){return div.childNodes[1].firstChild.offsetWidth===210}},{name:'IncludePaddingInHeightCalculation',ready:!0,fn:function(doc,div){return div.childNodes[1].firstChild.offsetHeight===210}},{name:'TextAreaMaxLength',fn:function(doc){return('maxlength' in doc.createElement('textarea'))}},{name:'GetPositionPercentage',ready:!0,fn:function(doc,div){return Ext.feature.getStyle(div.childNodes[2],'left')==='10%'}},{name:'PercentageHeightOverflowBug',ready:!0,fn:function(doc){var hasBug=!1,style,el;if(Ext.getScrollbarSize().height){el=this.getTestElement('div',!0);style=el.style;style.height='50px';style.width='50px';style.overflow='auto';style.position='absolute';el.innerHTML=['<div style="display:table;height:100%;">','<div style="width:51px;"></div>','</div>'].join('');doc.body.appendChild(el);if(el.firstChild.offsetHeight===50){hasBug=!0}
doc.body.removeChild(el)}
return hasBug}},{name:'xOriginBug',ready:!0,fn:function(doc,div){div.innerHTML='<div id="b1" style="height:100px;width:100px;direction:rtl;position:relative;overflow:scroll">'+'<div id="b2" style="position:relative;width:100%;height:20px;"></div>'+'<div id="b3" style="position:absolute;width:20px;height:20px;top:0px;right:0px"></div>'+'</div>';var outerBox=document.getElementById('b1').getBoundingClientRect(),b2=document.getElementById('b2').getBoundingClientRect(),b3=document.getElementById('b3').getBoundingClientRect();return(b2.left!==outerBox.left&&b3.right!==outerBox.right)}},{name:'ScrollWidthInlinePaddingBug',ready:!0,fn:function(doc){var hasBug=!1,style,el;el=doc.createElement('div');style=el.style;style.height='50px';style.width='50px';style.padding='10px';style.overflow='hidden';style.position='absolute';el.innerHTML='<span style="display:inline-block;zoom:1;height:60px;width:60px;"></span>';doc.body.appendChild(el);if(el.scrollWidth===70){hasBug=!0}
doc.body.removeChild(el);return hasBug}},{name:'rtlVertScrollbarOnRight',ready:!0,fn:function(doc,div){div.innerHTML='<div style="height:100px;width:100px;direction:rtl;overflow:scroll">'+'<div style="width:20px;height:200px;"></div>'+'</div>';var outerBox=div.firstChild,innerBox=outerBox.firstChild;return(innerBox.offsetLeft+innerBox.offsetWidth!==outerBox.offsetLeft+outerBox.offsetWidth)}},{name:'rtlVertScrollbarOverflowBug',ready:!0,fn:function(doc,div){div.innerHTML='<div style="height:100px;width:100px;direction:rtl;overflow:auto">'+'<div style="width:95px;height:200px;"></div>'+'</div>';var outerBox=div.firstChild,style=div.style,pos=style.position;style.position='absolute';outerBox.offsetHeight;style.position=pos;return outerBox.clientHeight===outerBox.offsetHeight}},{identity:'defineProperty',fn:function(){if(Ext.isIE8m){Ext.Object.defineProperty=Ext.emptyFn;return!1}
return!0}},{identify:'nativeXhr',fn:function(){if(typeof XMLHttpRequest!=='undefined'){return!0}
XMLHttpRequest=function(){try{return new ActiveXObject('MSXML2.XMLHTTP.3.0')}catch(ex){return null}};return!1}},{name:'SpecialKeyDownRepeat',fn:function(){return Ext.isWebKit?parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1],10)>=525:!(!(Ext.isGecko||Ext.isIE||Ext.isEdge)||(Ext.isOpera&&Ext.operaVersion<12))}},{name:'EmulatedMouseOver',fn:function(){return Ext.os.is.iOS}},{name:'Hashchange',fn:function(){var docMode=document.documentMode;return'onhashchange' in window&&(docMode===undefined||docMode>7)}},{name:'FixedTableWidthBug',ready:!0,fn:function(){if(Ext.isIE8){return!1}
var outer=document.createElement('div'),inner=document.createElement('div'),width;outer.setAttribute('style','display:table;table-layout:fixed;');inner.setAttribute('style','display:table-cell;min-width:50px;');outer.appendChild(inner);document.body.appendChild(outer);outer.offsetWidth;outer.style.width='25px';width=outer.offsetWidth;document.body.removeChild(outer);return width===50}},{name:'FocusinFocusoutEvents',fn:function(){return!(Ext.isGecko&&Ext.firefoxVersion<52)}},{name:'AsyncFocusEvents',fn:function(){return Ext.asyncFocus=!!Ext.isIE}},{name:'accessibility',ready:!0,fn:function(doc){var body=doc.body,div,img,style,supports,bgImg;function getColor(colorTxt){var values=[],colorValue=0,regex,match;if(colorTxt.indexOf('rgb(')!==-1){values=colorTxt.replace('rgb(','').replace(')','').split(', ')}else if(colorTxt.indexOf('#')!==-1){regex=colorTxt.length===7?/^#(\S\S)(\S\S)(\S\S)$/:/^#(\S)(\S)(\S)$/;match=colorTxt.match(regex);if(match){values=['0x'+match[1],'0x'+match[2],'0x'+match[3]]}}
for(var i=0;i<values.length;i++){colorValue+=parseInt(values[i])}
return colorValue}
div=doc.createElement('div');img=doc.createElement('img');style=div.style;Ext.apply(style,{width:'2px',position:'absolute',clip:'rect(1px,1px,1px,1px)',borderWidth:'1px',borderStyle:'solid',borderTopTolor:'#f00',borderRightColor:'#ff0',backgroundColor:'#fff',backgroundImage:'url('+Ext.BLANK_IMAGE_URL+')'});img.alt='';img.src=Ext.BLANK_IMAGE_URL;div.appendChild(img);body.appendChild(div);style=div.currentStyle||div.style;bgImg=style.backgroundImage;supports={Images:img.offsetWidth===1&&img.readyState!=='uninitialized',BackgroundImages:!(bgImg!==null&&(bgImg==="none"||bgImg==="url(invalid-url:)")),BorderColors:style.borderTopColor!==style.borderRightColor,LightOnDark:getColor(style.color)-getColor(style.backgroundColor)>0};Ext.supports.HighContrastMode=!supports.BackgroundImages;body.removeChild(div);div=img=null;return supports}},{name:'ViewportUnits',ready:!0,fn:function(doc){if(Ext.isIE8){return!1}
var body=doc.body,div=document.createElement('div'),style=div.currentStyle||div.style,width,divWidth;body.appendChild(div);Ext.apply(style,{width:'50vw'});width=parseInt(window.innerWidth/2,10);divWidth=parseInt((window.getComputedStyle?getComputedStyle(div,null):div.currentStyle).width,10);body.removeChild(div);div=null;return width===divWidth}},{name:'CSSVariables',ready:!1,fn:function(){if(!window.getComputedStyle){return!1}
return window.CSS&&window.CSS.supports&&window.CSS.supports('--test-var',0)}},{name:'Selectors2',ready:!1,fn:function(doc){try{return!!doc.querySelectorAll(':scope')}catch(e){return!1}}},{name:'CSSScrollSnap',ready:!1,fn:function(doc){var style=doc.documentElement.style;return'scrollSnapType' in style||'webkitScrollSnapType' in style||'msScrollSnapType' in style}},{name:'TranslateYCausesHorizontalScroll',ready:!0,fn:function(doc,div){div.innerHTML='<div style="position: relative; overflow: auto; height: 200px; width: 200px;">'+'<div>'+'<div style="transform: translateY(260px); width: 50px;">a</div>'+'</div>'+'</div>';return div.firstChild.scrollWidth>div.firstChild.clientWidth}},{name:'FlexBoxBasisBug',ready:!0,fn:function(){if(Ext.isIE11||(Ext.os.is.iOS&&Ext.os.version.major<=10)||(Ext.isSafari&&Ext.browser.version.isLessThan(11))||(Ext.os.is.Android&&Ext.os.version.isLessThan(6))){return!0}
return!1}},{name:'PercentageSizeFlexBug',ready:!0,fn:function(doc,div){if(Ext.isIE9m){return!1}
var style=div.style;style.display='flex';style.flexDirection='column';style.height=style.width='100px';div.innerHTML='<div style="flex: 1 1;"><div style="height:50%"></div></div>';return div.firstChild.firstChild.offsetHeight!==50}},{name:'CannotScrollExactHeight',fn:function(){return Ext.isIE10p}},{name:'WebKitInputTableBoxModelBug',ready:!0,fn:function(doc,div){var table=document.createElement('div'),cell=document.createElement('div'),input=document.createElement('input'),tableStyle=table.style,cellStyle=cell.style,inputStyle=input.style,body=doc.body,hasBug;input.type='text';tableStyle.display='table';tableStyle.height='100px';cellStyle.display='table-cell';inputStyle.border='0';inputStyle.padding='10px';inputStyle.boxSizing='border-box';inputStyle.height='100%';cell.appendChild(input);table.appendChild(cell);body.appendChild(table);hasBug=input.offsetHeight===80;body.removeChild(table);return hasBug}},{name:'PassiveEventListener',fn:function(doc,div){var supportsPassive=!1,options;try{options=Object.defineProperty({},'passive',{get:function(){supportsPassive=!0}});window.addEventListener('e',null,options);window.removeEventListener('e',null,options)}catch(e){}
return supportsPassive}},{name:'CSSMinContent',ready:!0,fn:function(doc,div){div.innerHTML='<div style="height:4px;width:4px;min-height:-webkit-min-content;min-height:-moz-min-content;min-height:min-content"><div style="height:8px;width:8px"></div></div>';return div.firstChild.offsetHeight===8}},{name:'ComputedSizeIncludesPadding',ready:!0,fn:function(doc,div){var ret=!1,bd=document.body,el,w;if(window.getComputedStyle){el=document.createElement('div');el.style.cssText='width:10px;padding:2px;'+'-webkit-box-sizing:border-box;box-sizing:border-box;';bd.appendChild(el);w=window.getComputedStyle(el,null).width;ret=w==='10px';bd.removeChild(el)}
return ret}},{name:'inputEventData',ready:!1,fn:function(){return!!(window.InputEvent&&'data' in new InputEvent('input'))}},0]};Ext.feature.tests.pop();Ext.supports={};Ext.feature.detect()
;
Ext.env.Ready={blocks:(location.search||'').indexOf('ext-pauseReadyFire')>0?1:0,bound:0,delay:1,events:[],firing:!1,generation:0,listeners:[],nextId:0,sortGeneration:0,state:0,timer:null,bind:function(){var me=Ext.env.Ready,doc=document;if(!me.bound){if(doc.readyState==='complete'){me.onReadyEvent({type:doc.readyState||'body'})}else{me.bound=1;if(Ext.browser.is.PhoneGap&&!Ext.os.is.Desktop){me.bound=2;doc.addEventListener('deviceready',me.onReadyEvent,!1)}
doc.addEventListener('DOMContentLoaded',me.onReadyEvent,!1);window.addEventListener('load',me.onReadyEvent,!1)}}},block:function(){++this.blocks;Ext.isReady=!1},fireReady:function(){var me=Ext.env.Ready;if(!me.state){Ext._readyTime=Ext.ticks();Ext.isDomReady=!0;me.state=1;Ext.feature.detect(!0);if(!me.delay){me.handleReady()}else if(navigator.standalone){me.timer=Ext.defer(function(){me.timer=null;me.handleReadySoon()},1)}else{me.handleReadySoon()}}},handleReady:function(){var me=this;if(me.state===1){me.state=2;Ext._beforeReadyTime=Ext.ticks();me.invokeAll();Ext._afterReadyTime=Ext.ticks()}},handleReadySoon:function(delay){var me=this;if(!me.timer){me.timer=Ext.defer(function(){me.timer=null;me.handleReady()},delay||me.delay)}},invoke:function(listener){var delay=listener.delay;if(delay){Ext.defer(listener.fn,delay,listener.scope)}else{if(Ext.elevateFunction){Ext.elevateFunction(listener.fn,listener.scope)}else{listener.fn.call(listener.scope)}}},invokeAll:function(){if(Ext.elevateFunction){Ext.elevateFunction(this.doInvokeAll,this)}else{this.doInvokeAll()}},doInvokeAll:function(){var me=this,listeners=me.listeners,listener;if(!me.blocks){Ext.isReady=!0}
me.firing=!0;while(listeners.length){if(me.sortGeneration!==me.generation){me.sortGeneration=me.generation;listeners.sort(me.sortFn)}
listener=listeners.pop();if(me.blocks&&!listener.dom){listeners.push(listener);break}
me.invoke(listener)}
me.firing=!1},makeListener:function(fn,scope,options){var ret={fn:fn,id:++this.nextId,scope:scope,dom:!1,priority:0};if(options){Ext.apply(ret,options)}
ret.phase=ret.dom?0:1;return ret},on:function(fn,scope,options){var me=Ext.env.Ready,listener=me.makeListener(fn,scope,options);if(me.state===2&&!me.firing&&(listener.dom||!me.blocks)){me.invoke(listener)}else{me.listeners.push(listener);++me.generation;if(!me.bound){me.bind()}}},onReadyEvent:function(ev){var me=Ext.env.Ready;if(Ext.elevateFunction){Ext.elevateFunction(me.doReadyEvent,me,arguments)}else{me.doReadyEvent(ev)}},doReadyEvent:function(ev){var me=this;if(ev&&ev.type){me.events.push(ev)}
if(me.bound>0){me.unbind();me.bound=-1}
if(!me.state){me.fireReady()}},sortFn:function(a,b){return-((a.phase-b.phase)||(b.priority-a.priority)||(a.id-b.id))},unblock:function(){var me=this;if(me.blocks){if(!--me.blocks){if(me.state===2&&!me.firing){me.invokeAll()}}}},unbind:function(){var me=this,doc=document;if(me.bound>1){doc.removeEventListener('deviceready',me.onReadyEvent,!1)}
doc.removeEventListener('DOMContentLoaded',me.onReadyEvent,!1);window.removeEventListener('load',me.onReadyEvent,!1)}};(function(){var Ready=Ext.env.Ready;if(Ext.isIE9m){Ext.apply(Ready,{scrollTimer:null,readyStatesRe:/complete/i,pollScroll:function(){var scrollable=!0;try{document.documentElement.doScroll('left')}catch(e){scrollable=!1}
if(scrollable&&document.body){Ready.onReadyEvent({type:'doScroll'})}else{Ready.scrollTimer=Ext.defer(Ready.pollScroll,20)}
return scrollable},bind:function(){var doc=document,topContext;if(Ready.bound){return}
try{topContext=window.frameElement===undefined}catch(e){}
if(!topContext||!doc.documentElement.doScroll){Ready.pollScroll=Ext.emptyFn}else if(Ready.pollScroll()){return}
if(doc.readyState==='complete'){Ready.onReadyEvent({type:'already '+(doc.readyState||'body')})}else{doc.attachEvent('onreadystatechange',Ready.onReadyStateChange);window.attachEvent('onload',Ready.onReadyEvent);Ready.bound=1}},unbind:function(){document.detachEvent('onreadystatechange',Ready.onReadyStateChange);window.detachEvent('onload',Ready.onReadyEvent);if(Ext.isNumber(Ready.scrollTimer)){Ext.undefer(Ready.scrollTimer);Ready.scrollTimer=null}},onReadyStateChange:function(){var state=document.readyState;if(Ready.readyStatesRe.test(state)){Ready.onReadyEvent({type:state})}}})}
Ext.onDocumentReady=function(fn,scope,options){var opt={dom:!0};if(options){Ext.apply(opt,options)}
Ready.on(fn,scope,opt)};Ext.onReady=function(fn,scope,options){Ready.on(fn,scope,options)};Ext.onInternalReady=function(fn,scope,options){Ready.on(fn,scope,Ext.apply({priority:1000},options))};Ready.bind()}())
;
Ext.Loader=(new function(){var Loader=this,Manager=Ext.ClassManager,Boot=Ext.Boot,Class=Ext.Class,Ready=Ext.env.Ready,alias=Ext.Function.alias,dependencyProperties=['extend','mixins','requires'],isInHistory={},history=[],readyListeners=[],usedClasses=[],_requiresMap={},_config={enabled:!0,scriptChainDelay:!1,disableCaching:!0,disableCachingParam:'_dc',paths:Manager.paths,preserveScripts:!0,scriptCharset:undefined},delegatedConfigs={disableCaching:!0,disableCachingParam:!0,preserveScripts:!0,scriptChainDelay:'loadDelay'};Ext.apply(Loader,{isInHistory:isInHistory,isLoading:!1,history:history,config:_config,readyListeners:readyListeners,optionalRequires:usedClasses,requiresMap:_requiresMap,hasFileLoadError:!1,scriptsLoading:0,classesLoading:{},missingCount:0,missingQueue:{},syncModeEnabled:!1,init:function(){var scripts=document.getElementsByTagName('script'),src=scripts[scripts.length-1].src,path=src.substring(0,src.lastIndexOf('/')+1),meta=Ext._classPathMetadata,microloader=Ext.Microloader,manifest=Ext.manifest,loadOrder,baseUrl,loadlen,l,loadItem;if(src.indexOf("packages/core/src/")!==-1){path=path+"../../"}else if(src.indexOf("/core/src/class/")!==-1){path=path+"../../../"}
if(!Manager.getPath("Ext")){Manager.setPath('Ext',path+'src')}
if(meta){Ext._classPathMetadata=null;Loader.addClassPathMappings(meta)}
if(manifest){loadOrder=manifest.loadOrder;baseUrl=Ext.Boot.baseUrl;if(loadOrder&&manifest.bootRelative){for(loadlen=loadOrder.length,l=0;l<loadlen;l++){loadItem=loadOrder[l];loadItem.path=baseUrl+loadItem.path;loadItem.canonicalPath=!0}}}
if(microloader){Ready.block();microloader.onMicroloaderReady(function(){Ready.unblock()})}},setConfig:Ext.Function.flexSetter(function(name,value){var delegated=delegatedConfigs[name];if(name==='paths'){Loader.setPath(value)}else{_config[name]=value;if(delegated){Boot.setConfig((delegated===!0)?name:delegated,value)}}
return Loader}),getConfig:function(name){return name?_config[name]:_config},setPath:function(){Manager.setPath.apply(Manager,arguments);return Loader},addClassPathMappings:function(paths){Manager.setPath(paths);return Loader},addBaseUrlClassPathMappings:function(pathConfig){var name;for(name in pathConfig){pathConfig[name]=Boot.baseUrl+pathConfig[name]}
Ext.Loader.addClassPathMappings(pathConfig)},getPath:function(className){return Manager.getPath(className)},require:function(expressions,fn,scope,excludes){var classNames;if(excludes){return Loader.exclude(excludes).require(expressions,fn,scope)}
classNames=Manager.getNamesByExpression(expressions);return Loader.load(classNames,fn,scope)},syncRequire:function(){var wasEnabled=Loader.syncModeEnabled,ret;Loader.syncModeEnabled=!0;ret=Loader.require.apply(Loader,arguments);Loader.syncModeEnabled=wasEnabled;return ret},exclude:function(excludes){var selector=Manager.select({require:function(classNames,fn,scope){return Loader.load(classNames,fn,scope)},syncRequire:function(classNames,fn,scope){var wasEnabled=Loader.syncModeEnabled,ret;Loader.syncModeEnabled=!0;ret=Loader.load(classNames,fn,scope);Loader.syncModeEnabled=wasEnabled;return ret}});selector.exclude(excludes);return selector},load:function(classNames,callback,scope){if(callback){if(callback.length){callback=Loader.makeLoadCallback(classNames,callback)}
callback=callback.bind(scope||Ext.global)}
var state=Manager.classState,missingClassNames=[],urls=[],urlByClass={},numClasses=classNames.length,className,i,numMissing;for(i=0;i<numClasses;++i){className=Manager.resolveName(classNames[i]);if(!Manager.isCreated(className)){missingClassNames.push(className);if(!state[className]){urlByClass[className]=Loader.getPath(className);urls.push(urlByClass[className])}}}
numMissing=missingClassNames.length;if(numMissing){Loader.missingCount+=numMissing;Manager.onCreated(function(){if(callback){Ext.callback(callback,scope,arguments)}
Loader.checkReady()},Loader,missingClassNames);if(!_config.enabled){Ext.raise("Ext.Loader is not enabled, so dependencies cannot be resolved "+"dynamically. Missing required class"+((missingClassNames.length>1)?"es":"")+": "+missingClassNames.join(', '))}
if(urls.length){Loader.loadScripts({url:urls,_classNames:missingClassNames,_urlByClass:urlByClass})}else{Loader.checkReady()}}else{if(callback){callback.call(scope)}
Loader.checkReady()}
if(Loader.syncModeEnabled){if(numClasses===1){return Manager.get(classNames[0])}}
return Loader},makeLoadCallback:function(classNames,callback){return function(){var classes=[],i=classNames.length;while(i-->0){classes[i]=Manager.get(classNames[i])}
return callback.apply(this,classes)}},onLoadFailure:function(request){var options=this,entries=request.entries||[],onError=options.onError,error,entry,i;Loader.hasFileLoadError=!0;--Loader.scriptsLoading;if(onError){for(i=0;i<entries.length;i++){entry=entries[i];if(entry.error){error=new Error('Failed to load: '+entry.url);break}}
error=error||new Error('Failed to load');onError.call(options.userScope,options,error,request)}else{Ext.log.error("[Ext.Loader] Some requested files failed to load.")}
Loader.checkReady()},onLoadSuccess:function(){var options=this,onLoad=options.onLoad,classNames=options._classNames,urlByClass=options._urlByClass,state=Manager.classState,missingQueue=Loader.missingQueue,className,i,len;--Loader.scriptsLoading;if(onLoad){onLoad.call(options.userScope,options)}
for(i=0,len=classNames.length;i<len;i++){className=classNames[i];if(!state[className]){missingQueue[className]=urlByClass[className]}}
Loader.checkReady()},reportMissingClasses:function(){var missingQueue=Loader.missingQueue,missingClasses=[],missingPaths=[],missingClassName;if(!Loader.syncModeEnabled&&!Loader.scriptsLoading&&Loader.isLoading&&!Loader.hasFileLoadError){for(missingClassName in missingQueue){missingClasses.push(missingClassName);missingPaths.push(missingQueue[missingClassName])}
if(missingClasses.length){throw new Error("The following classes are not declared even if their files "+"have been loaded: '"+missingClasses.join("', '")+"'. Please check the source code of their "+"corresponding files for possible typos: '"+missingPaths.join("', '"))}}},onReady:function(fn,scope,withDomReady,options){var listener;if(withDomReady){Ready.on(fn,scope,options)}else{listener=Ready.makeListener(fn,scope,options);if(Loader.isLoading){readyListeners.push(listener)}else{Ready.invoke(listener)}}},addUsedClasses:function(classes){var cls,i,ln;if(classes){classes=(typeof classes==='string')?[classes]:classes;for(i=0,ln=classes.length;i<ln;i++){cls=classes[i];if(typeof cls==='string'&&!Ext.Array.contains(usedClasses,cls)){usedClasses.push(cls)}}}
return Loader},triggerReady:function(){var listener,refClasses=usedClasses;if(Loader.isLoading&&refClasses.length){usedClasses=[];Loader.require(refClasses)}else{Loader.isLoading=!1;readyListeners.sort(Ready.sortFn);while(readyListeners.length&&!Loader.isLoading){listener=readyListeners.pop();Ready.invoke(listener)}
Ready.unblock()}},historyPush:function(className){if(className&&!isInHistory[className]&&!Manager.overrideMap[className]){isInHistory[className]=!0;history.push(className)}
return Loader},loadScripts:function(params){var manifest=Ext.manifest,loadOrder=manifest&&manifest.loadOrder,loadOrderMap=manifest&&manifest.loadOrderMap,options;++Loader.scriptsLoading;if(loadOrder&&!loadOrderMap){manifest.loadOrderMap=loadOrderMap=Boot.createLoadOrderMap(loadOrder)}
Loader.checkReady();options=Ext.apply({loadOrder:loadOrder,loadOrderMap:loadOrderMap,charset:_config.scriptCharset,success:Loader.onLoadSuccess,failure:Loader.onLoadFailure,sync:Loader.syncModeEnabled,_classNames:[]},params);options.userScope=options.scope;options.scope=options;Boot.load(options)},loadScriptsSync:function(urls){var syncwas=Loader.syncModeEnabled;Loader.syncModeEnabled=!0;Loader.loadScripts({url:urls});Loader.syncModeEnabled=syncwas},loadScriptsSyncBasePrefix:function(urls){var syncwas=Loader.syncModeEnabled;Loader.syncModeEnabled=!0;Loader.loadScripts({url:urls,prependBaseUrl:!0});Loader.syncModeEnabled=syncwas},loadScript:function(options){var isString=typeof options==='string',isArray=options instanceof Array,isObject=!isArray&&!isString,url=isObject?options.url:options,onError=isObject&&options.onError,onLoad=isObject&&options.onLoad,scope=isObject&&options.scope,request={url:url,scope:scope,onLoad:onLoad,onError:onError,_classNames:[]};Loader.loadScripts(request)},checkMissingQueue:function(){var missingQueue=Loader.missingQueue,newQueue={},missing=0,name;for(name in missingQueue){if(!(Manager.classState[name]||Manager.isCreated(name))){newQueue[name]=missingQueue[name];missing++}}
Loader.missingCount=missing;Loader.missingQueue=newQueue},checkReady:function(){var wasLoading=Loader.isLoading,isLoading;Loader.checkMissingQueue();isLoading=Loader.missingCount+Loader.scriptsLoading;if(isLoading&&!wasLoading){Ready.block();Loader.isLoading=!!isLoading}else if(!isLoading&&wasLoading){Loader.triggerReady()}
if(!Loader.scriptsLoading&&Loader.missingCount){Ext.defer(function(){var name;if(!Loader.scriptsLoading&&Loader.missingCount){Ext.log.error('[Loader] The following classes failed to load:');for(name in Loader.missingQueue){Ext.log.error('[Loader] '+name+' from '+Loader.missingQueue[name])}}},1000)}}});Ext.require=alias(Loader,'require');Ext.syncRequire=alias(Loader,'syncRequire');Ext.exclude=alias(Loader,'exclude');Class.registerPreprocessor('loader',function(cls,data,hooks,continueFn){if(Ext.classSystemMonitor){Ext.classSystemMonitor(cls,'Ext.Loader#loaderPreprocessor',arguments)}
var me=this,dependencies=[],dependency,className=Manager.getName(cls),i,j,ln,subLn,value,propertyName,propertyValue,requiredMap;for(i=0,ln=dependencyProperties.length;i<ln;i++){propertyName=dependencyProperties[i];if(data.hasOwnProperty(propertyName)){propertyValue=data[propertyName];if(typeof propertyValue==='string'){dependencies.push(propertyValue)}else if(propertyValue instanceof Array){for(j=0,subLn=propertyValue.length;j<subLn;j++){value=propertyValue[j];if(typeof value==='string'){dependencies.push(value)}}}else if(typeof propertyValue!=='function'){for(j in propertyValue){if(propertyValue.hasOwnProperty(j)){value=propertyValue[j];if(typeof value==='string'){dependencies.push(value)}}}}}}
if(dependencies.length===0){return}
if(className){_requiresMap[className]=dependencies}
var manifestClasses=Ext.manifest&&Ext.manifest.classes,deadlockPath=[],detectDeadlock;if(className&&(!manifestClasses||!manifestClasses[className])){requiredMap=Loader.requiredByMap||(Loader.requiredByMap={});for(i=0,ln=dependencies.length;i<ln;i++){dependency=dependencies[i];(requiredMap[dependency]||(requiredMap[dependency]=[])).push(className)}
detectDeadlock=function(cls){var requires=_requiresMap[cls],dep,i,ln;deadlockPath.push(cls);if(requires){if(Ext.Array.contains(requires,className)){Ext.Error.raise("Circular requirement detected! '"+className+"' and '"+deadlockPath[1]+"' mutually require each other. "+"Path: "+deadlockPath.join(' -> ')+" -> "+deadlockPath[0])}
for(i=0,ln=requires.length;i<ln;i++){dep=requires[i];if(!isInHistory[dep]){detectDeadlock(requires[i])}}}};detectDeadlock(className)}(className?Loader.exclude(className):Loader).require(dependencies,function(){var i,ln,j,subLn,k;for(i=0,ln=dependencyProperties.length;i<ln;i++){propertyName=dependencyProperties[i];if(data.hasOwnProperty(propertyName)){propertyValue=data[propertyName];if(typeof propertyValue==='string'){data[propertyName]=Manager.get(propertyValue)}else if(propertyValue instanceof Array){for(j=0,subLn=propertyValue.length;j<subLn;j++){value=propertyValue[j];if(typeof value==='string'){data[propertyName][j]=Manager.get(value)}}}else if(typeof propertyValue!=='function'){for(k in propertyValue){if(propertyValue.hasOwnProperty(k)){value=propertyValue[k];if(typeof value==='string'){data[propertyName][k]=Manager.get(value)}}}}}}
continueFn.call(me,cls,data,hooks)});return!1},!0,'after','className');Manager.registerPostprocessor('uses',function(name,cls,data){var uses=data.uses,classNames;if(Ext.classSystemMonitor){Ext.classSystemMonitor(cls,'Ext.Loader#usesPostprocessor',arguments)}
if(uses){classNames=Manager.getNamesByExpression(data.uses);Loader.addUsedClasses(classNames)}});Manager.onCreated(Loader.historyPush);Loader.init()}());Ext._endTime=Ext.ticks();if(Ext._beforereadyhandler){Ext._beforereadyhandler()}
;
Ext.define('Ext.Mixin',function(Mixin){return{statics:{addHook:function(hookFn,targetClass,methodName,mixinClassPrototype){var isFunc=Ext.isFunction(hookFn),hook=function(){var a=arguments,fn=isFunc?hookFn:mixinClassPrototype[hookFn],result=this.callParent(a);fn.apply(this,a);return result},existingFn=targetClass.hasOwnProperty(methodName)&&targetClass[methodName];if(isFunc){hookFn.$previous=Ext.emptyFn}
hook.$name=methodName;hook.$owner=targetClass.self;if(existingFn){hook.$previous=existingFn.$previous;existingFn.$previous=hook}else{targetClass[methodName]=hook}}},onClassExtended:function(cls,data){var mixinConfig=data.mixinConfig,hooks=data.xhooks,superclass=cls.superclass,onClassMixedIn=data.onClassMixedIn,afterClassMixedIn=data.afterClassMixedIn,afters,befores,configs,extended,mixed,parentMixinConfig;if(hooks){delete data.xhooks;(mixinConfig||(data.mixinConfig=mixinConfig={})).on=hooks}
if(mixinConfig){parentMixinConfig=superclass.mixinConfig;if(parentMixinConfig){data.mixinConfig=mixinConfig=Ext.merge({},parentMixinConfig,mixinConfig)}
data.mixinId=mixinConfig.id;if(mixinConfig.beforeHooks){Ext.raise('Use of "beforeHooks" is deprecated - use "before" instead')}
if(mixinConfig.hooks){Ext.raise('Use of "hooks" is deprecated - use "after" instead')}
if(mixinConfig.afterHooks){Ext.raise('Use of "afterHooks" is deprecated - use "after" instead')}
afters=mixinConfig.after;befores=mixinConfig.before;configs=mixinConfig.configs;extended=mixinConfig.extended;hooks=mixinConfig.on;mixed=mixinConfig.mixed}
if(afters||befores||hooks||extended){data.onClassMixedIn=function(targetClass){var mixin=this.prototype,targetProto=targetClass.prototype,key;if(befores){Ext.Object.each(befores,function(key,value){targetClass.hookMember(key,function(){if(mixin[value].apply(this,arguments)!==!1){return this.callParent(arguments)}})})}
if(afters){Ext.Object.each(afters,function(key,value){targetClass.hookMember(key,function(){var ret=this.callParent(arguments);mixin[value].apply(this,arguments);return ret})})}
if(hooks){for(key in hooks){Mixin.addHook(hooks[key],targetProto,key,mixin)}}
if(extended){targetClass.onExtended(function(){var args=Ext.Array.slice(arguments,0);args.unshift(targetClass);return extended.apply(this,args)},this)}
if(onClassMixedIn){onClassMixedIn.apply(this,arguments)}}}
if(configs||mixed){data.afterClassMixedIn=function(targetClass){if(configs){var proto=targetClass.prototype,hoistable=this.$config.configs,cfg,name,hoist;for(name in proto){cfg=hoistable[name];if(cfg&&cfg.isConfig&&proto.hasOwnProperty(name)){(hoist||(hoist={}))[name]=proto[name];delete proto[name]}}
if(hoist){targetClass.$config.add(hoist)}}
if(afterClassMixedIn){afterClassMixedIn.apply(this,arguments)}
if(mixed){mixed.apply(this,arguments)}}}}}})
;
Ext.util=Ext.util||{};Ext.util.DelayedTask=function(fn,scope,args,cancelOnDelay,fireIdleEvent){var me=this,delay,call=function(){me.id=null;if(!(scope&&scope.destroyed)){if(args){fn.apply(scope,args)}else{fn.call(scope)}}
if(fireIdleEvent===!1){Ext._suppressIdle=!0}};if(fn){call.$origFn=fn.$origFn||fn;call.$skipTimerCheck=call.$origFn.$skipTimerCheck}
cancelOnDelay=typeof cancelOnDelay==='boolean'?cancelOnDelay:!0;me.id=null;me.delay=function(newDelay,newFn,newScope,newArgs){if(cancelOnDelay){me.cancel()}
if(typeof newDelay==='number'){delay=newDelay}
fn=newFn||fn;scope=newScope||scope;args=newArgs||args;me.delayTime=delay;if(fn){call.$origFn=fn.$origFn||fn;call.$skipTimerCheck=call.$origFn.$skipTimerCheck}
if(!me.id){if(delay===-1){me.id=Ext.raf(call)}else{me.id=Ext.defer(call,delay||1)}}
return me.id};me.cancel=function(){if(me.id){if(me.delayTime===-1){Ext.unraf(me.id)}else{Ext.undefer(me.id)}
me.id=null}};me.flush=function(){var was;if(me.id){me.cancel();was=fireIdleEvent;fireIdleEvent=!0;call();fireIdleEvent=was}};me.stop=function(stopFn,stopScope){if(stopFn&&stopFn===fn&&(!stopScope||stopScope===scope)){me.cancel()}}}
;
Ext.define('Ext.util.Event',function(){var arraySlice=Array.prototype.slice,arrayInsert=Ext.Array.insert,toArray=Ext.Array.toArray,fireArgs={};return{requires:'Ext.util.DelayedTask',isEvent:!0,suspended:0,noOptions:{},constructor:function(observable,name){this.name=name;this.observable=observable;this.listeners=[]},addListener:function(fn,scope,options,caller,manager){var me=this,added=!1,observable=me.observable,eventName=me.name,listeners,listener,priority,isNegativePriority,highestNegativePriorityIndex,hasNegativePriorityIndex,length,index,i,listenerPriority,managedListeners;if(scope&&!Ext._namedScopes[scope]&&(typeof fn==='string')&&(typeof scope[fn]!=='function')){Ext.raise("No method named '"+fn+"' found on scope object")}
if(me.findListener(fn,scope)===-1){listener=me.createListener(fn,scope,options,caller,manager);if(me.firing){me.listeners=me.listeners.slice(0)}
listeners=me.listeners;index=length=listeners.length;priority=options&&options.priority;highestNegativePriorityIndex=me._highestNegativePriorityIndex;hasNegativePriorityIndex=highestNegativePriorityIndex!==undefined;if(priority){isNegativePriority=(priority<0);if(!isNegativePriority||hasNegativePriorityIndex){for(i=(isNegativePriority?highestNegativePriorityIndex:0);i<length;i++){listenerPriority=listeners[i].o?listeners[i].o.priority||0:0;if(listenerPriority<priority){index=i;break}}}else{me._highestNegativePriorityIndex=index}}else if(hasNegativePriorityIndex){index=highestNegativePriorityIndex}
if(!isNegativePriority&&index<=highestNegativePriorityIndex){me._highestNegativePriorityIndex ++}
if(index===length){listeners[length]=listener}else{arrayInsert(listeners,index,[listener])}
if(observable.isElement){observable._getPublisher(eventName,options.translate===!1).subscribe(observable,eventName,options.delegated!==!1,options.capture)}
if(manager){managedListeners=manager.managedListeners||(manager.managedListeners=[]);managedListeners.push({item:me.observable,ename:(options&&options.managedName)||me.name,fn:fn,scope:scope,options:options})}
added=!0}
return added},createListener:function(fn,scope,o,caller,manager){var me=this,namedScopes=Ext._namedScopes,namedScope=namedScopes[scope],listener={fn:fn,scope:scope,ev:me,caller:caller,manager:manager,namedScope:namedScope,defaultScope:namedScope?(scope||me.observable):undefined,lateBound:typeof fn==='string'},handler=fn,wrapped=!1,type;if(listener.lateBound&&fn[2]==='.'){if(fn.substr(0,2)!=='up'){Ext.raise('Invalid listener method: '+fn)}
listener.defaultScope=null;listener.namedScope=namedScopes[listener.scope=scope='up'];listener.fn=handler=fn.substr(3)}
if(o){listener.o=o;if(o.single){handler=me.createSingle(handler,listener,o,scope);wrapped=!0}
if(o.target){handler=me.createTargeted(handler,listener,o,scope,wrapped);wrapped=!0}
if(o.onFrame){handler=me.createAnimFrame(handler,listener,o,scope,wrapped);wrapped=!0}
if(o.delay){handler=me.createDelayed(handler,listener,o,scope,wrapped);wrapped=!0}
if(o.buffer){handler=me.createBuffered(handler,listener,o,scope,wrapped);wrapped=!0}
if(me.observable.isElement){type=o.type;if(type){listener.type=type}}}
listener.fireFn=handler;listener.wrapped=wrapped;return listener},findListener:function(fn,scope){var listeners=this.listeners,i=listeners.length,listener;while(i--){listener=listeners[i];if(listener){if(listener.fn===fn&&listener.scope==scope){return i}}}
return-1},removeListener:function(fn,scope,index){var me=this,removed=!1,observable=me.observable,eventName=me.name,listener,options,manager,managedListeners,managedListener,i;index=index!=null?index:me.findListener(fn,scope);if(index!==-1){listener=me.listeners[index];if(me.firing){me.listeners=me.listeners.slice(0)}
me.listeners.splice(index,1);if(me._highestNegativePriorityIndex){if(index<me._highestNegativePriorityIndex){me._highestNegativePriorityIndex--}else if(index===me._highestNegativePriorityIndex&&index===me.listeners.length){delete me._highestNegativePriorityIndex}}
if(listener){options=listener.o;if(listener.task){listener.task.cancel();delete listener.task}
i=listener.tasks&&listener.tasks.length;if(i){while(i--){listener.tasks[i].cancel()}
delete listener.tasks}
listener.fireFn.timerId=Ext.undefer(listener.fireFn.timerId);manager=listener.manager;if(manager){managedListeners=manager.managedListeners;if(managedListeners){for(i=managedListeners.length;i--;){managedListener=managedListeners[i];if(managedListener.item===me.observable&&managedListener.ename===eventName&&managedListener.fn===fn&&managedListener.scope===scope){managedListeners.splice(i,1)}}}}
if(observable.isElement){observable._getPublisher(eventName,options.translate===!1).unsubscribe(observable,eventName,options.delegated!==!1,options.capture)}}
removed=!0}
return removed},clearListeners:function(){var listeners=this.listeners,i=listeners.length,listener;while(i--){listener=listeners[i];this.removeListener(listener.fn,listener.scope)}},suspend:function(){++this.suspended},resume:function(){if(this.suspended){--this.suspended}},isSuspended:function(){return this.suspended>0},fireDelegated:function(firingObservable,args){this.firingObservable=firingObservable;return this.fire.apply(this,args)},fire:function(){var me=this,CQ=Ext.ComponentQuery,listeners=me.listeners,count=listeners.length,observable=me.observable,isElement=observable.isElement,isComponent=observable.isComponent,firingObservable=me.firingObservable,options,delegate,fireInfo,i,args,listener,len,delegateEl,currentTarget,type,chained,firingArgs,e,fireFn,fireScope;if(!me.suspended&&count>0){me.firing=!0;args=arguments.length?arraySlice.call(arguments,0):[];len=args.length;if(isElement){e=args[0]}
for(i=0;i<count;i++){listener=listeners[i];if(!listener){continue}
options=listener.o;if(isElement){if(currentTarget){e.setCurrentTarget(currentTarget)}
type=listener.type;if(type){chained=e;e=args[0]=chained.chain({type:type,isGesture:!1})}
Ext.EventObject=e}
firingArgs=args;if(options){delegate=options.delegate;if(delegate){if(isElement){delegateEl=e.getTarget(typeof delegate==='function'?delegate:'#'+e.currentTarget.id+' '+delegate);if(delegateEl){args[1]=delegateEl;currentTarget=e.currentTarget;e.setCurrentTarget(delegateEl)}else{continue}}else if(isComponent&&!CQ.is(firingObservable,delegate,observable)){continue}}
if(isElement){if(options.preventDefault){e.preventDefault()}
if(options.stopPropagation){e.stopPropagation()}
if(options.stopEvent){e.stopEvent()}}
args[len]=options;if(options.args){firingArgs=options.args.concat(args)}}
fireInfo=me.getFireInfo(listener);fireFn=fireInfo.fn;fireScope=fireInfo.scope;fireInfo.fn=fireInfo.scope=null;if(fireScope&&fireScope.destroyed){me.removeListener(fireFn,fireScope,i);fireFn=null;if(fireScope.$className!=='Ext.container.Monitor'){(Ext.raiseOnDestroyed?Ext.raise:Ext.log.warn)({msg:'Attempting to fire "'+me.name+'" event on destroyed '+(fireScope.$className||'object')+' instance with id: '+(fireScope.id||'unknown'),instance:fireScope})}}
if(fireFn&&fireFn.apply(fireScope,firingArgs)===!1){Ext.EventObject=null;return(me.firing=!1)}
if(options){args.length--}
if(chained){e=args[0]=chained;chained=null}
Ext.EventObject=null}}
me.firing=!1;return!0},getFireInfo:function(listener,fromWrapped){var observable=this.observable,fireFn=listener.fireFn,scope=listener.scope,namedScope=listener.namedScope,fn,origin;if(!fromWrapped&&listener.wrapped){fireArgs.fn=fireFn;return fireArgs}
fn=fromWrapped?listener.fn:fireFn;var name=fn;if(listener.lateBound){origin=listener.caller||observable;if(namedScope&&namedScope.isUp){scope=Ext.lookUpFn(origin,fn)}else if(!scope||namedScope){scope=origin.resolveListenerScope(listener.defaultScope)}
if(!scope){Ext.raise('Unable to dynamically resolve scope for "'+listener.ev.name+'" listener on '+this.observable.id)}
if(!Ext.isFunction(scope[fn])){Ext.raise('No method named "'+fn+'" on '+(scope.$className||'scope object.'))}
fn=scope[fn]}else if(namedScope&&namedScope.isController){scope=(listener.caller||observable).resolveListenerScope(listener.defaultScope);if(!scope){Ext.raise('Unable to dynamically resolve scope for "'+listener.ev.name+'" listener on '+this.observable.id)}}else if(!scope||namedScope){scope=observable}
fireArgs.fn=fn;fireArgs.scope=scope;if(!fn){Ext.raise('Unable to dynamically resolve method "'+name+'" on '+this.observable.$className)}
return fireArgs},createAnimFrame:function(handler,listener,o,scope,wrapped){var fireInfo;if(!wrapped){fireInfo=listener.ev.getFireInfo(listener,!0);handler=fireInfo.fn;scope=fireInfo.scope;fireInfo.fn=fireInfo.scope=null}
return Ext.Function.createAnimationFrame(handler,scope,o.args)},createTargeted:function(handler,listener,o,scope,wrapped){return function(){var fireInfo;if(o.target===arguments[0]){if(!wrapped){fireInfo=listener.ev.getFireInfo(listener,!0);handler=fireInfo.fn;scope=fireInfo.scope;fireInfo.fn=fireInfo.scope=null}
return handler.apply(scope,arguments)}}},createBuffered:function(handler,listener,o,scope,wrapped){listener.task=new Ext.util.DelayedTask();return function(){var fireInfo;if(listener.task){if(Ext._unitTesting){o.$delayedTask=listener.task}
if(!wrapped){fireInfo=listener.ev.getFireInfo(listener,!0);handler=fireInfo.fn;scope=fireInfo.scope;fireInfo.fn=fireInfo.scope=null}
listener.task.delay(o.buffer,handler,scope,toArray(arguments))}}},createDelayed:function(handler,listener,o,scope,wrapped){return function(){var task=new Ext.util.DelayedTask(),fireInfo;if(!wrapped){fireInfo=listener.ev.getFireInfo(listener,!0);handler=fireInfo.fn;scope=fireInfo.scope;fireInfo.fn=fireInfo.scope=null}
if(!listener.tasks){listener.tasks=[]}
listener.tasks.push(task);if(Ext._unitTesting){o.$delayedTask=task}
task.delay(o.delay||10,handler,scope,toArray(arguments))}},createSingle:function(handler,listener,o,scope,wrapped){return function(){var event=listener.ev,observable=event.observable,fn=listener.fn,fireInfo;if(observable){if(!observable.destroyed){observable.removeListener(event.name,fn,scope)}}else{event.removeListener(fn,scope)}
if(!wrapped){fireInfo=event.getFireInfo(listener,!0);handler=fireInfo.fn;scope=fireInfo.scope;fireInfo.fn=fireInfo.scope=null}
return handler.apply(scope,arguments)}}}})
;
Ext.define('Ext.mixin.Identifiable',function(Identifiable){return{isIdentifiable:!0,mixinId:'identifiable',getId:function(){var me=this,id=me.id,cfg;if(!(id||id===0)){cfg=me.initialConfig;if(cfg&&cfg.id){id=cfg.id}else{id=me.generateAutoId();me.autoGenId=!0}
me.setId(id)}
me.getId=Identifiable._getId;return id},setId:function(id){this.id=this.id=id},privates:{statics:{_idCleanRe:/\.|[^\w-]/g,uniqueIds:{},_getId:function(){return this.id}},defaultIdPrefix:'ext-',defaultIdSeparator:'-',id:null,autoGenId:!1,generateAutoId:function(){var me=this,prototype=me.self.prototype,sep=me.defaultIdSeparator,uniqueIds=Identifiable.uniqueIds,cleanRe,defaultIdPrefix,prefix,xtype;if(!prototype.hasOwnProperty('identifiablePrefix')){cleanRe=Identifiable._idCleanRe;defaultIdPrefix=me.defaultIdPrefix;xtype=me.xtype;if(xtype){prefix=defaultIdPrefix+xtype.replace(cleanRe,sep)+sep}else if(!(prefix=prototype.$className)){prefix=defaultIdPrefix+'anonymous'+sep}else{prefix=prefix.replace(cleanRe,sep).toLowerCase()+sep}
prototype.identifiablePrefix=prefix}
prefix=me.identifiablePrefix;if(!uniqueIds.hasOwnProperty(prefix)){uniqueIds[prefix]=0}
return prefix+(++uniqueIds[prefix])}}}})
;
Ext.define('Ext.mixin.Observable',function(Observable){var emptyFn=Ext.emptyFn,emptyArray=[],arrayProto=Array.prototype,arraySlice=arrayProto.slice,ListenerRemover=function(observable){if(observable instanceof ListenerRemover){return observable}
this.observable=observable;if(arguments[1].isObservable){this.managedListeners=!0}
this.args=arraySlice.call(arguments,1)},protectedProps=['events','hasListeners','managedListeners','eventedBeforeEventNames'];ListenerRemover.prototype.destroy=function(){var me=this,args=me.args,observable=me.observable,elementName=args[0].element||(args[3]&&args[3].element);if(elementName){if(Ext.Array.indexOf(observable.referenceList,elementName)===-1){Ext.Logger.error("Destroying event listener with an invalid element reference "+"of '"+elementName+"' for this component. Available values are: '"+observable.referenceList.join("', '")+"'",observable)}
observable=observable[elementName]}
if(!observable.destroyed){observable[me.managedListeners?'mun':'un'].apply(observable,me.args)}
me.destroy=Ext.emptyFn};return{extend:'Ext.Mixin',mixinConfig:{id:'observable',after:{destroy:'destroyObservable'}},requires:['Ext.util.Event'],mixins:['Ext.mixin.Identifiable'],statics:{releaseCapture:function(o){o.fireEventArgs=this.prototype.fireEventArgs},capture:function(o,fn,scope){var newFn=function(eventName,args){return fn.apply(scope,[eventName].concat(args))};this.captureArgs(o,newFn,scope)},captureArgs:function(o,fn,scope){o.fireEventArgs=Ext.Function.createInterceptor(o.fireEventArgs,fn,scope)},observe:function(cls,listeners){if(cls){if(!cls.isObservable){Ext.applyIf(cls,new this());this.captureArgs(cls.prototype,cls.fireEventArgs,cls)}
if(Ext.isObject(listeners)){cls.on(listeners)}}
return cls},prepareClass:function(T,mixin,data){var listeners=T.listeners=[],target=data||T.prototype,targetListeners=target.listeners,superListeners=mixin?mixin.listeners:T.superclass.self.listeners,scope,namedScope,i,len;if(superListeners){listeners.push(superListeners)}
if(targetListeners){scope=targetListeners.scope;if(!scope){targetListeners.scope='self'}else{namedScope=Ext._namedScopes[scope];if(namedScope&&namedScope.isController){targetListeners.scope='self.controller'}}
listeners.push(targetListeners);target.listeners=null}
if(!T.HasListeners){var HasListeners=function(){},SuperHL=T.superclass.HasListeners||(mixin&&mixin.HasListeners)||Observable.HasListeners;T.prototype.HasListeners=T.HasListeners=HasListeners;HasListeners.prototype=T.hasListeners=new SuperHL()}
scope=T.prototype.$noClearOnDestroy||{};for(i=0,len=protectedProps.length;i<len;i++){scope[protectedProps[i]]=!0}
T.prototype.$noClearOnDestroy=scope}},isObservable:!0,$vetoClearingPrototypeOnDestroy:!0,eventsSuspended:0,constructor:function(config){var me=this,self=me.self,declaredListeners,listeners,bubbleEvents,len,i;if(me.$observableInitialized){return}
me.$observableInitialized=!0;me.hasListeners=me.hasListeners=new me.HasListeners();me.eventedBeforeEventNames={};me.events=me.events||{};declaredListeners=self.listeners;if(declaredListeners&&!me._addDeclaredListeners(declaredListeners)){self.listeners=null}
listeners=(config&&config.listeners)||me.listeners;if(listeners){if(listeners instanceof Array){for(i=0,len=listeners.length;i<len;++i){me.addListener(listeners[i])}}else{me.addListener(listeners)}}
bubbleEvents=(config&&config.bubbleEvents)||me.bubbleEvents;if(bubbleEvents){me.enableBubble(bubbleEvents)}
if(me.$applyConfigs){if(config){Ext.apply(me,config)}}else{me.initConfig(config)}
if(listeners){me.listeners=null}},onClassExtended:function(T,data){if(!T.HasListeners){Observable.prepareClass(T,T.prototype.$observableMixedIn?undefined:data)}},$eventOptions:{scope:1,delay:1,buffer:1,onFrame:1,single:1,args:1,destroyable:1,priority:1,order:1},$orderToPriority:{before:100,current:0,after:-100},_addDeclaredListeners:function(listeners){var me=this;if(listeners instanceof Array){Ext.each(listeners,me._addDeclaredListeners,me)}else{me._addedDeclaredListeners=!0;me.addListener(listeners)}
return me._addedDeclaredListeners},addManagedListener:function(item,ename,fn,scope,options,noDestroy){var me=this,config,passedOptions;me.managedListeners=me.managedListeners||[];if(typeof ename!=='string'){passedOptions=arguments.length>4?options:ename;options=ename;for(ename in options){if(options.hasOwnProperty(ename)){config=options[ename];if(!item.$eventOptions[ename]){me.addManagedListener(item,ename,config.fn||config,config.scope||options.scope||scope,config.fn?config:passedOptions,!0)}}}
if(options&&options.destroyable){return new ListenerRemover(me,item,options)}}else{if(fn!==emptyFn){item.doAddListener(ename,fn,scope,options,null,me,me);if(!noDestroy&&options&&options.destroyable){return new ListenerRemover(me,item,ename,fn,scope)}}}},removeManagedListener:function(item,ename,fn,scope){var me=this,options,config,managedListeners,length,i;if(item.$observableDestroyed){return}
if(typeof ename!=='string'){options=ename;for(ename in options){if(options.hasOwnProperty(ename)){config=options[ename];if(!item.$eventOptions[ename]){me.removeManagedListener(item,ename,config.fn||config,config.scope||options.scope||scope)}}}}else{managedListeners=me.managedListeners?me.managedListeners.slice():[];ename=Ext.canonicalEventName(ename);for(i=0,length=managedListeners.length;i<length;i++){me.removeManagedListenerItem(!1,managedListeners[i],item,ename,fn,scope)}}},fireEvent:function(eventName){return this.fireEventArgs(eventName,arraySlice.call(arguments,1))},resolveListenerScope:function(defaultScope){var namedScope=Ext._namedScopes[defaultScope];if(namedScope){if(namedScope.isController){Ext.raise('scope: "controller" can only be specified on classes '+'that derive from Ext.Component or Ext.Widget')}
if(namedScope.isSelf||namedScope.isThis){defaultScope=null}}
return defaultScope||this},fireEventArgs:function(eventName,args){var me=this,events=me.events,ret=!0,event;eventName=Ext.canonicalEventName(eventName);event=events&&events[eventName];if(me.hasListeners[eventName]){ret=me.doFireEvent(eventName,args||emptyArray,event?event.bubble:!1)}
return ret},fireAction:function(eventName,args,fn,scope,options,order){if(typeof fn==='string'&&!scope){fn=this[fn]}
options=options?Ext.Object.chain(options):{};options.single=!0;options.priority=((order==='after')?-99.5:99.5);this.doAddListener(eventName,fn,scope,options);this.fireEventArgs(eventName,args)},$eventedController:{_paused:1,pause:function(){++this._paused},resume:function(){var me=this,fn=me.fn,scope=me.scope,fnArgs=me.fnArgs,args,ret;if(!--me._paused){if(fn){args=Ext.Array.slice(fnArgs||me.args);if(fnArgs===!1){args.shift()}
me.fn=null;args.push(me);if(Ext.isFunction(fn)){ret=fn.apply(scope,args)}else if(scope&&Ext.isString(fn)&&Ext.isFunction(scope[fn])){ret=scope[fn].apply(scope,args)}
if(ret===!1){return!1}}
if(!me._paused){return me.owner.fireEventArgs(me.eventName,me.args)}}}},fireEventedAction:function(eventName,args,fn,scope,fnArgs){var me=this,eventedBeforeEventNames=me.eventedBeforeEventNames,beforeEventName=eventedBeforeEventNames[eventName]||(eventedBeforeEventNames[eventName]='before'+eventName),controller=Ext.apply({owner:me,eventName:eventName,fn:fn,scope:scope,fnArgs:fnArgs,args:args},me.$eventedController),value;args.push(controller);value=me.fireEventArgs(beforeEventName,args);args.pop();if(value===!1){return!1}
return controller.resume()},doFireEvent:function(eventName,args,bubbles){var target=this,queue,event,ret=!0;do{if(target.eventsSuspended){if((queue=target.eventQueue)){queue.push([eventName,args])}
return ret}else{event=target.events&&target.events[eventName];if(event&&event!==!0){if((ret=event.fire.apply(event,args))===!1){break}}}}while(bubbles&&(target=target.getBubbleParent()));return ret},getBubbleParent:function(){var me=this,parent=me.getBubbleTarget&&me.getBubbleTarget();if(parent&&parent.isObservable){return parent}
return null},addListener:function(eventName,fn,scope,options,order,caller){var me=this,namedScopes=Ext._namedScopes,config,namedScope,isClassListener,innerScope,eventOptions;if(typeof eventName!=='string'){options=eventName;scope=options.scope;namedScope=scope&&namedScopes[scope];isClassListener=namedScope&&namedScope.isSelf;eventOptions=((me.isComponent||me.isWidget)&&options.element)?me.$elementEventOptions:me.$eventOptions;for(eventName in options){config=options[eventName];if(!eventOptions[eventName]){innerScope=config.scope;if(innerScope&&isClassListener){namedScope=namedScopes[innerScope];if(namedScope&&namedScope.isController){innerScope='self.controller'}}
me.doAddListener(eventName,config.fn||config,innerScope||scope,config.fn?config:options,order,caller)}}
if(options&&options.destroyable){return new ListenerRemover(me,options)}}else{me.doAddListener(eventName,fn,scope,options,order,caller);if(options&&options.destroyable){return new ListenerRemover(me,eventName,fn,scope,options)}}
return me},removeListener:function(eventName,fn,scope,eventOptions){var me=this,config,options;if(typeof eventName!=='string'){options=eventName;eventOptions=eventOptions||me.$eventOptions;for(eventName in options){if(options.hasOwnProperty(eventName)){config=options[eventName];if(!me.$eventOptions[eventName]){me.doRemoveListener(eventName,config.fn||config,config.scope||options.scope)}}}}else{me.doRemoveListener(eventName,fn,scope)}
return me},onBefore:function(eventName,fn,scope,options){return this.addListener(eventName,fn,scope,options,'before')},onAfter:function(eventName,fn,scope,options){return this.addListener(eventName,fn,scope,options,'after')},unBefore:function(eventName,fn,scope,options){return this.removeListener(eventName,fn,scope,options,'before')},unAfter:function(eventName,fn,scope,options){return this.removeListener(eventName,fn,scope,options,'after')},addBeforeListener:function(){return this.onBefore.apply(this,arguments)},addAfterListener:function(){return this.onAfter.apply(this,arguments)},removeBeforeListener:function(){return this.unBefore.apply(this,arguments)},removeAfterListener:function(){return this.unAfter.apply(this,arguments)},clearListeners:function(){var me=this,events=me.events,hasListeners=me.hasListeners,event,key;if(events){for(key in events){if(events.hasOwnProperty(key)){event=events[key];if(event.isEvent){delete hasListeners[key];event.clearListeners()}}}
me.events=null}
me.clearManagedListeners()},purgeListeners:function(){if(Ext.global.console){Ext.global.console.warn('Observable: purgeListeners has been deprecated. '+'Please use clearListeners.')}
return this.clearListeners.apply(this,arguments)},clearManagedListeners:function(){var me=this,managedListeners=me.managedListeners,i,len;if(managedListeners){me.managedListeners=null;for(i=0,len=managedListeners.length;i<len;i++){me.removeManagedListenerItem(!0,managedListeners[i])}
managedListeners.length=0}
me.managedListeners=managedListeners},removeManagedListenerItem:function(isClear,managedListener,item,ename,fn,scope){if(isClear||(managedListener.item===item&&managedListener.ename===ename&&(!fn||managedListener.fn===fn)&&(!scope||managedListener.scope===scope))){if(!managedListener.item.destroyed){managedListener.item.doRemoveListener(managedListener.ename,managedListener.fn,managedListener.scope,managedListener.options)}
if(!isClear){Ext.Array.remove(this.managedListeners,managedListener)}}},purgeManagedListeners:function(){if(Ext.global.console){Ext.global.console.warn('Observable: purgeManagedListeners has been deprecated. '+'Please use clearManagedListeners.')}
return this.clearManagedListeners.apply(this,arguments)},hasListener:function(eventName){eventName=Ext.canonicalEventName(eventName);return!!this.hasListeners[eventName]},isSuspended:function(event){var suspended=this.eventsSuspended>0,events=this.events;if(!suspended&&event&&events){event=events[event];if(event&&event.isEvent){return event.isSuspended()}}
return suspended},suspendEvents:function(queueSuspended){++this.eventsSuspended;if(queueSuspended&&!this.eventQueue){this.eventQueue=[]}},suspendEvent:function(){var me=this,events=me.events,len=arguments.length,i,event,ename;for(i=0;i<len;i++){ename=arguments[i];ename=Ext.canonicalEventName(ename);event=events[ename];if(!event||!event.isEvent){event=me._initEvent(ename)}
event.suspend()}},resumeEvent:function(){var events=this.events||0,len=events&&arguments.length,i,event,ename;for(i=0;i<len;i++){ename=Ext.canonicalEventName(arguments[i]);event=events[ename];if(event&&event.resume){event.resume()}}},resumeEvents:function(discardQueue){var me=this,queued=me.eventQueue,qLen,q;if(me.eventsSuspended&&!--me.eventsSuspended){delete me.eventQueue;if(!discardQueue&&queued){qLen=queued.length;for(q=0;q<qLen;q++){me.fireEventArgs.apply(me,queued[q])}}}},relayEvents:function(origin,events,prefix){var me=this,len=events.length,i=0,oldName,newName,relayers={};if(Ext.isObject(events)){for(i in events){newName=events[i];relayers[i]=me.createRelayer(newName)}}else{for(;i<len;i++){oldName=events[i];relayers[oldName]=me.createRelayer(prefix?prefix+oldName:oldName)}}
me.mon(origin,relayers,null,null,undefined);return new ListenerRemover(me,origin,relayers)},createRelayer:function(newName,beginEnd){var me=this;return function(){return me.fireEventArgs.call(me,newName,beginEnd?arraySlice.apply(arguments,beginEnd):arguments)}},enableBubble:function(eventNames){if(eventNames){var me=this,names=(typeof eventNames==='string')?arguments:eventNames,events=me.events,length=events&&names.length,ename,event,i;for(i=0;i<length;++i){ename=names[i];ename=Ext.canonicalEventName(ename);event=events[ename];if(!event||!event.isEvent){event=me._initEvent(ename)}
me.hasListeners._incr_(ename);event.bubble=!0}}},destroy:function(){this.clearListeners();this.callParent();this.destroyObservable(!0)},destroyObservable:function(skipClearListeners){var me=this,clearPropertiesOnDestroy=me.clearPropertiesOnDestroy;if(me.$observableDestroyed){return}
if(!skipClearListeners){me.clearListeners()}
if(me.destroyed){if(clearPropertiesOnDestroy){if(clearPropertiesOnDestroy===!0&&!me.$nulled){me.$reap()}
if(!me.clearPrototypeOnDestroy){me.fireEvent=me.fireEventArgs=me.fireAction=me.fireEventedAction=Ext.emptyFn}
me.events=me.managedListeners=me.eventedBeforeEventNames=null;me.$observableDestroyed=!0}
if(me.clearPrototypeOnDestroy&&Object.setPrototypeOf&&!me.$alreadyNulled){Object.setPrototypeOf(me,null);me.$alreadyNulled=!0}}},privates:{doAddListener:function(ename,fn,scope,options,order,caller,manager){var me=this,ret=!1,event,priority;order=order||(options&&options.order);if(order){priority=(options&&options.priority);if(!priority){options=options?Ext.Object.chain(options):{};options.priority=me.$orderToPriority[order]}}
ename=Ext.canonicalEventName(ename);if(!fn){Ext.raise("Cannot add '"+ename+"' listener to "+me.$className+" instance.  No function specified.")}
event=(me.events||(me.events={}))[ename];if(!event||!event.isEvent){event=me._initEvent(ename)}
if(fn!==emptyFn){if(!manager&&(scope&&scope.isObservable&&(scope!==me))){manager=scope}
if(event.addListener(fn,scope,options,caller,manager)){me.hasListeners._incr_(ename);ret=!0}}
return ret},doRemoveListener:function(ename,fn,scope){var me=this,ret=!1,events=me.events,event;ename=Ext.canonicalEventName(ename);event=events&&events[ename];if(!fn){Ext.raise("Cannot remove '"+ename+"' listener to "+me.$className+" instance.  No function specified.")}
if(event&&event.isEvent){if(event.removeListener(fn,scope)){me.hasListeners._decr_(ename);ret=!0}}
return ret},_initEvent:function(eventName){return(this.events[eventName]=new Ext.util.Event(this,eventName))}},deprecated:{'5.0':{methods:{addEvents:null}}}}},function(){var Observable=this,proto=Observable.prototype,HasListeners=function(){},prepareMixin=function(T){var proto=T.prototype;if(!T.HasListeners){proto.$observableMixedIn=1;Observable.prepareClass(T,this);T.onExtended(function(U,data){if(Ext.classSystemMonitor){Ext.classSystemMonitor('extend mixin',arguments)}
Observable.prepareClass(U,null,data)});if(proto.onClassMixedIn){Ext.override(T,{onClassMixedIn:function(U){prepareMixin.call(this,U);this.callParent(arguments)}})}else{proto.onClassMixedIn=function(U){prepareMixin.call(this,U)}}}
superOnClassMixedIn.call(this,T)},superOnClassMixedIn=proto.onClassMixedIn;HasListeners.prototype={_decr_:function(ev,count){if(count==null){count=1}
if(!(this[ev]-=count)){delete this[ev]}},_incr_:function(ev){if(this.hasOwnProperty(ev)){++this[ev]}else{this[ev]=1}}};proto.HasListeners=Observable.HasListeners=HasListeners;Observable.createAlias({on:'addListener',un:'removeListener',mon:'addManagedListener',mun:'removeManagedListener',setListeners:'addListener'});Observable.observeClass=Observable.observe;function getMethodEvent(method){var event=(this.methodEvents=this.methodEvents||{})[method],returnValue,v,cancel,me=this,makeCall;if(!event){me.methodEvents[method]=event={};event.originalFn=me[method];event.methodName=method;event.before=[];event.after=[];makeCall=function(fn,scope,args){scope=scope||me;if(typeof fn==='string'){fn=scope[fn]}
if((v=fn.apply(scope,args))!==undefined){if(typeof v==='object'){if(v.returnValue!==undefined){returnValue=v.returnValue}else{returnValue=v}
cancel=!!v.cancel}else if(v===!1){cancel=!0}else{returnValue=v}}};me[method]=function(){var args=Array.prototype.slice.call(arguments,0),argsLen=args.length,b,i,len;returnValue=v=undefined;cancel=!1;for(i=0,len=event.before.length;i<len;i++){b=event.before[i];if(b.extraArgs){args.push.apply(args,b.extraArgs)}
makeCall(b.fn,b.scope,args);args.length=argsLen;if(cancel||b.preventDefault){return returnValue}}
if((v=event.originalFn.apply(me,args))!==undefined){returnValue=v}
for(i=0,len=event.after.length;i<len;i++){b=event.after[i];if(b.extraArgs){args.push.apply(args,b.extraArgs)}
makeCall(b.fn,b.scope,args);args.length=argsLen;if(cancel||b.preventDefault){return returnValue}}
return returnValue}}
return event}
Ext.apply(proto,{onClassMixedIn:prepareMixin,beforeMethod:function(method,fn,scope,preventDefault,extraArgs){getMethodEvent.call(this,method).before.push({fn:fn,scope:scope,extraArgs:extraArgs,preventDefault:preventDefault})},afterMethod:function(method,fn,scope,preventDefault,extraArgs){getMethodEvent.call(this,method).after.push({fn:fn,scope:scope,extraArgs:extraArgs,preventDefault:preventDefault})},removeMethodListener:function(method,fn,scope){var e=getMethodEvent.call(this,method),i,len;for(i=0,len=e.before.length;i<len;i++){if(e.before[i].fn==fn&&e.before[i].scope==scope){Ext.Array.erase(e.before,i,1);return}}
for(i=0,len=e.after.length;i<len;i++){if(e.after[i].fn==fn&&e.after[i].scope==scope){Ext.Array.erase(e.after,i,1);return}}},toggleEventLogging:function(toggle){Ext.util.Observable[toggle?'capture':'releaseCapture'](this,function(en){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(en,arguments)}})}})})
;
Ext.define('Ext.util.HashMap',{mixins:['Ext.mixin.Observable'],generation:0,config:{keyFn:null},constructor:function(config){var me=this,fn;me.mixins.observable.constructor.call(me,config);me.clear(!0);fn=me.getKeyFn();if(fn){me.getKey=fn}},getCount:function(){return this.length},getData:function(key,value){if(value===undefined){value=key;key=this.getKey(value)}
return[key,value]},getKey:function(o){return o.id},add:function(key,value){var me=this;if(arguments.length===1){value=key;key=me.getKey(value)}
if(me.containsKey(key)){return me.replace(key,value)}
me.map[key]=value;++me.length;me.generation++;if(me.hasListeners.add){me.fireEvent('add',me,key,value)}
return value},replace:function(key,value){var me=this,map=me.map,old;if(arguments.length===1){value=key;key=me.getKey(value)}
if(!me.containsKey(key)){me.add(key,value)}
old=map[key];map[key]=value;me.generation++;if(me.hasListeners.replace){me.fireEvent('replace',me,key,value,old)}
return value},remove:function(o){var key=this.findKey(o);if(key!==undefined){return this.removeAtKey(key)}
return!1},removeAtKey:function(key){var me=this,value;if(me.containsKey(key)){value=me.map[key];delete me.map[key];--me.length;me.generation++;if(me.hasListeners.remove){me.fireEvent('remove',me,key,value)}
return!0}
return!1},get:function(key){var map=this.map;return map.hasOwnProperty(key)?map[key]:undefined},clear:function(initial){var me=this;if(initial||me.generation){me.map={};me.length=0;me.generation=initial?0:me.generation+1}
if(initial!==!0&&me.hasListeners.clear){me.fireEvent('clear',me)}
return me},containsKey:function(key){var map=this.map;return map.hasOwnProperty(key)&&map[key]!==undefined},contains:function(value){return this.containsKey(this.findKey(value))},getKeys:function(){return this.getArray(!0)},getValues:function(){return this.getArray(!1)},getArray:function(isKey){var arr=[],key,map=this.map;for(key in map){if(map.hasOwnProperty(key)){arr.push(isKey?key:map[key])}}
return arr},each:function(fn,scope){var items=Ext.apply({},this.map),key,length=this.length;scope=scope||this;for(key in items){if(items.hasOwnProperty(key)){if(fn.call(scope,key,items[key],length)===!1){break}}}
return this},clone:function(){var hash=new this.self(this.initialConfig),map=this.map,key;hash.suspendEvents();for(key in map){if(map.hasOwnProperty(key)){hash.add(key,map[key])}}
hash.resumeEvents();return hash},findKey:function(value){var key,map=this.map;for(key in map){if(map.hasOwnProperty(key)&&map[key]===value){return key}}
return undefined}},function(HashMap){var prototype=HashMap.prototype;prototype.removeByKey=prototype.removeAtKey})
;
Ext.define('Ext.AbstractManager',{requires:['Ext.util.HashMap'],typeName:'type',constructor:function(config){Ext.apply(this,config||{});this.all=new Ext.util.HashMap();this.types={}},get:function(id){return this.all.get(id)},register:function(item){var key=this.all.getKey(item);if(key===undefined){Ext.raise('Key is undefined. Please ensure the item has a key '+'before registering the item.')}
if(this.all.containsKey(key)){Ext.raise('Registering duplicate id "'+key+'" with '+this.$className)}
this.all.add(item)},unregister:function(item){this.all.remove(item)},registerType:function(type,cls){this.types[type]=cls;cls[this.typeName]=type},isRegistered:function(type){return this.types[type]!==undefined},create:function(config,defaultType){var type=config[this.typeName]||config.type||defaultType,Constructor=this.types[type];if(Constructor===undefined){Ext.raise("The '"+type+"' type has not been registered with this manager")}
return new Constructor(config)},onAvailable:function(id,fn,scope){var all=this.all,item,callback;if(all.containsKey(id)){item=all.get(id);fn.call(scope||item,item)}else{callback=function(map,key,item){if(key===id){fn.call(scope||item,item);all.un('add',callback)}};all.on('add',callback)}},each:function(fn,scope){this.all.each(fn,scope||this)},getCount:function(){return this.all.getCount()}})
;
Ext.define('Ext.promise.Consequence',function(Consequence){return{promise:null,deferred:null,onFulfilled:null,onRejected:null,onProgress:null,constructor:function(onFulfilled,onRejected,onProgress){var me=this;me.onFulfilled=onFulfilled;me.onRejected=onRejected;me.onProgress=onProgress;me.deferred=new Ext.promise.Deferred();me.promise=me.deferred.promise},trigger:function(action,value){var me=this,deferred=me.deferred;switch(action){case 'fulfill':me.propagate(value,me.onFulfilled,deferred,deferred.resolve);break;case 'reject':me.propagate(value,me.onRejected,deferred,deferred.reject);break}},update:function(progress){if(Ext.isFunction(this.onProgress)){progress=this.onProgress(progress)}
this.deferred.update(progress)},propagate:function(value,callback,deferred,deferredMethod){if(Ext.isFunction(callback)){this.schedule(function(){try{deferred.resolve(callback(value))}catch(e){deferred.reject(e)}})}else{deferredMethod.call(this.deferred,value)}},schedule:function(callback){var n=Consequence.queueSize++;Consequence.queue[n]=callback;if(!n){Ext.asap(Consequence.dispatch)}},statics:{queue:new Array(10000),queueSize:0,dispatch:function(){var queue=Consequence.queue,fn,i;for(i=0;i<Consequence.queueSize;++i){fn=queue[i];queue[i]=null;fn()}
Consequence.queueSize=0}}}},function(Consequence){Consequence.dispatch.$skipTimerCheck=!0})
;
Ext.define('Ext.promise.Deferred',{requires:['Ext.promise.Consequence'],promise:null,consequences:[],completed:!1,completionAction:null,completionValue:null,constructor:function(){var me=this;me.promise=new Ext.promise.Promise(me);me.consequences=[];me.completed=!1;me.completionAction=null;me.completionValue=null},then:function(onFulfilled,onRejected,onProgress){var me=this,consequence=new Ext.promise.Consequence(onFulfilled,onRejected,onProgress);if(me.completed){consequence.trigger(me.completionAction,me.completionValue)}else{me.consequences.push(consequence)}
return consequence.promise},resolve:function(value){var me=this,isHandled,thenFn;if(me.completed){return}
try{if(value===me.promise){throw new TypeError('A Promise cannot be resolved with itself.')}
if(value!=null&&(typeof value==='object'||Ext.isFunction(value))&&Ext.isFunction(thenFn=value.then)){isHandled=!1;try{thenFn.call(value,function(value){if(!isHandled){isHandled=!0;me.resolve(value)}},function(error){if(!isHandled){isHandled=!0;me.reject(error)}})}catch(e1){if(!isHandled){me.reject(e1)}}}else{me.complete('fulfill',value)}}catch(e2){me.reject(e2)}},reject:function(reason){if(this.completed){return}
this.complete('reject',reason)},update:function(progress){var consequences=this.consequences,consequence,i,len;if(this.completed){return}
for(i=0,len=consequences.length;i<len;i++){consequence=consequences[i];consequence.update(progress)}},complete:function(action,value){var me=this,consequences=me.consequences,consequence,i,len;me.completionAction=action;me.completionValue=value;me.completed=!0;for(i=0,len=consequences.length;i<len;i++){consequence=consequences[i];consequence.trigger(me.completionAction,me.completionValue)}
me.consequences=null}})
;
Ext.define('Ext.promise.Promise',function(ExtPromise){var Deferred;return{requires:['Ext.promise.Deferred'],statics:{CancellationError:Ext.global.CancellationError||Error,_ready:function(){Deferred=Ext.promise.Deferred},all:function(promisesOrValues){if(!(Ext.isArray(promisesOrValues)||ExtPromise.is(promisesOrValues))){Ext.raise('Invalid parameter: expected an Array or Promise of an Array.')}
return ExtPromise.when(promisesOrValues).then(function(promisesOrValues){var deferred=new Deferred(),remainingToResolve=promisesOrValues.length,results=new Array(remainingToResolve),index,promiseOrValue,resolve,i,len;if(!remainingToResolve){deferred.resolve(results)}else{resolve=function(item,index){return ExtPromise.when(item).then(function(value){results[index]=value;if(!--remainingToResolve){deferred.resolve(results)}
return value},function(reason){return deferred.reject(reason)})};for(index=i=0,len=promisesOrValues.length;i<len;index=++i){promiseOrValue=promisesOrValues[index];if(index in promisesOrValues){resolve(promiseOrValue,index)}else{remainingToResolve--}}}
return deferred.promise})},is:function(value){return value!=null&&(typeof value==='object'||Ext.isFunction(value))&&Ext.isFunction(value.then)},race:function(promises){var deferred=new Deferred(),len=promises.length,i;if(!Ext.isArray(promises)){Ext.raise('Invalid parameter: expected an Array.')}
for(i=0;i<len;++i){deferred.resolve(promises[i])}
return deferred.promise},rethrowError:function(error){Ext.asap(function(){throw error})},when:function(value){var deferred=new Deferred();deferred.resolve(value);return deferred.promise}},owner:null,constructor:function(owner){this.owner=owner},then:function(onFulfilled,onRejected,onProgress,scope){var ref;if(arguments.length===1&&Ext.isObject(arguments[0])){ref=arguments[0];onFulfilled=ref.success;onRejected=ref.failure;onProgress=ref.progress;scope=ref.scope}
if(scope){if(onFulfilled){onFulfilled=onFulfilled.bind(scope)}
if(onRejected){onRejected=onRejected.bind(scope)}
if(onProgress){onProgress=onProgress.bind(scope)}}
return this.owner.then(onFulfilled,onRejected,onProgress)},'catch':function(onRejected,scope){var ref;if(arguments.length===1&&Ext.isObject(arguments[0])){ref=arguments[0];onRejected=ref.fn;scope=ref.scope}
if(scope!=null){onRejected=onRejected.bind(scope)}
return this.owner.then(null,onRejected)},otherwise:function(onRejected,scope){return this['catch'].apply(this,arguments)},always:function(onCompleted,scope){var ref;if(arguments.length===1&&Ext.isObject(arguments[0])){ref=arguments[0];onCompleted=ref.fn;scope=ref.scope}
if(scope!=null){onCompleted=onCompleted.bind(scope)}
return this.owner.then(function(value){try{onCompleted()}catch(e){ExtPromise.rethrowError(e)}
return value},function(reason){try{onCompleted()}catch(e){ExtPromise.rethrowError(e)}
throw reason})},done:function(){this.owner.then(null,ExtPromise.rethrowError)},cancel:function(reason){if(reason==null){reason=null}
this.owner.reject(new this.self.CancellationError(reason))},log:function(identifier){if(identifier==null){identifier=''}
return this.owner.then(function(value){Ext.log(""+(identifier||'Promise')+" resolved with value: "+value);return value},function(reason){Ext.log(""+(identifier||'Promise')+" rejected with reason: "+reason);throw reason})}}},function(ExtPromise){ExtPromise._ready()})
;
Ext.define('Ext.Promise',function(){var Polyfiller;return{requires:['Ext.promise.Promise'],statics:{_ready:function(){Polyfiller=Ext.promise.Promise},all:function(){return Polyfiller.all.apply(Polyfiller,arguments)},race:function(){return Polyfiller.race.apply(Polyfiller,arguments)},reject:function(reason){var deferred=new Ext.promise.Deferred();deferred.reject(reason);return deferred.promise},resolve:function(value){var deferred=new Ext.promise.Deferred();deferred.resolve(value);return deferred.promise}},constructor:function(action){var deferred=new Ext.promise.Deferred();action(deferred.resolve.bind(deferred),deferred.reject.bind(deferred));return deferred.promise}}},function(ExtPromise){var P=Ext.global.Promise;if(P&&P.resolve&&!Ext.useExtPromises){Ext.Promise=P}else{ExtPromise._ready()}})
;
Ext.define('Ext.Deferred',function(Deferred){var ExtPromise,rejected,resolved,when;return{extend:'Ext.promise.Deferred',requires:['Ext.Promise'],statics:{_ready:function(){ExtPromise=Ext.promise.Promise;when=Ext.Promise.resolve},all:function(){return ExtPromise.all.apply(ExtPromise,arguments)},any:function(promisesOrValues){if(!(Ext.isArray(promisesOrValues)||ExtPromise.is(promisesOrValues))){Ext.raise('Invalid parameter: expected an Array or Promise of an Array.')}
return Deferred.some(promisesOrValues,1).then(function(array){return array[0]},function(error){if(error instanceof Error&&error.message==='Too few Promises were resolved.'){Ext.raise('No Promises were resolved.')}else{throw error}})},delay:function(promiseOrValue,milliseconds){var deferred;if(arguments.length===1){milliseconds=promiseOrValue;promiseOrValue=undefined}
milliseconds=Math.max(milliseconds,1);deferred=new Deferred();deferred.timeoutId=Ext.defer(function(){delete deferred.timeoutId;deferred.resolve(promiseOrValue)},milliseconds);return deferred.promise},getCachedRejected:function(){if(!rejected){rejected=Ext.Promise.reject()}
return rejected},getCachedResolved:function(){if(!resolved){resolved=Ext.Promise.resolve()}
return resolved},map:function(promisesOrValues,mapFn){if(!(Ext.isArray(promisesOrValues)||ExtPromise.is(promisesOrValues))){Ext.raise('Invalid parameter: expected an Array or Promise of an Array.')}
if(!Ext.isFunction(mapFn)){Ext.raise('Invalid parameter: expected a function.')}
return Deferred.resolved(promisesOrValues).then(function(promisesOrValues){var deferred,index,promiseOrValue,remainingToResolve,resolve,results,i,len;remainingToResolve=promisesOrValues.length;results=new Array(promisesOrValues.length);deferred=new Deferred();if(!remainingToResolve){deferred.resolve(results)}else{resolve=function(item,index){return Deferred.resolved(item).then(function(value){return mapFn(value,index,results)}).then(function(value){results[index]=value;if(!--remainingToResolve){deferred.resolve(results)}
return value},function(reason){return deferred.reject(reason)})};for(index=i=0,len=promisesOrValues.length;i<len;index=++i){promiseOrValue=promisesOrValues[index];if(index in promisesOrValues){resolve(promiseOrValue,index)}else{remainingToResolve--}}}
return deferred.promise})},memoize:function(fn,scope,hashFn){var memoizedFn=Ext.Function.memoize(fn,scope,hashFn);return function(){return Deferred.all(Ext.Array.slice(arguments)).then(function(values){return memoizedFn.apply(scope,values)})}},parallel:function(fns,scope){var args;if(scope==null){scope=null}
args=Ext.Array.slice(arguments,2);return Deferred.map(fns,function(fn){if(!Ext.isFunction(fn)){throw new Error('Invalid parameter: expected a function.')}
return fn.apply(scope,args)})},pipeline:function(fns,initialValue,scope){if(scope==null){scope=null}
return Deferred.reduce(fns,function(value,fn){if(!Ext.isFunction(fn)){throw new Error('Invalid parameter: expected a function.')}
return fn.call(scope,value)},initialValue)},race:function(){return ExtPromise.race.apply(ExtPromise,arguments)},reduce:function(values,reduceFn,initialValue){var initialValueSpecified;if(!(Ext.isArray(values)||ExtPromise.is(values))){Ext.raise('Invalid parameter: expected an Array or Promise of an Array.')}
if(!Ext.isFunction(reduceFn)){Ext.raise('Invalid parameter: expected a function.')}
initialValueSpecified=arguments.length===3;return Deferred.resolved(values).then(function(promisesOrValues){var reduceArguments=[promisesOrValues,function(previousValueOrPromise,currentValueOrPromise,currentIndex){return Deferred.resolved(previousValueOrPromise).then(function(previousValue){return Deferred.resolved(currentValueOrPromise).then(function(currentValue){return reduceFn(previousValue,currentValue,currentIndex,promisesOrValues)})})}];if(initialValueSpecified){reduceArguments.push(initialValue)}
return Ext.Array.reduce.apply(Ext.Array,reduceArguments)})},rejected:function(reason){var deferred=new Ext.Deferred();deferred.reject(reason);return deferred.promise},resolved:function(promiseOrValue){var deferred=new Ext.Deferred();deferred.resolve(promiseOrValue);return deferred.promise},sequence:function(fns,scope){var args;if(scope==null){scope=null}
args=Ext.Array.slice(arguments,2);return Deferred.reduce(fns,function(results,fn){if(!Ext.isFunction(fn)){throw new Error('Invalid parameter: expected a function.')}
return Deferred.resolved(fn.apply(scope,args)).then(function(result){results.push(result);return results})},[])},some:function(promisesOrValues,howMany){if(!(Ext.isArray(promisesOrValues)||ExtPromise.is(promisesOrValues))){Ext.raise('Invalid parameter: expected an Array or Promise of an Array.')}
if(!Ext.isNumeric(howMany)||howMany<=0){Ext.raise('Invalid parameter: expected a positive integer.')}
return Deferred.resolved(promisesOrValues).then(function(promisesOrValues){var deferred,index,onReject,onResolve,promiseOrValue,remainingToReject,remainingToResolve,values,i,len;values=[];remainingToResolve=howMany;remainingToReject=(promisesOrValues.length-remainingToResolve)+1;deferred=new Deferred();if(promisesOrValues.length<howMany){deferred.reject(new Error('Too few Promises were resolved.'))}else{onResolve=function(value){if(remainingToResolve>0){values.push(value)}
remainingToResolve--;if(remainingToResolve===0){deferred.resolve(values)}
return value};onReject=function(reason){remainingToReject--;if(remainingToReject===0){deferred.reject(new Error('Too few Promises were resolved.'))}
return reason};for(index=i=0,len=promisesOrValues.length;i<len;index=++i){promiseOrValue=promisesOrValues[index];if(index in promisesOrValues){Deferred.resolved(promiseOrValue).then(onResolve,onReject)}}}
return deferred.promise})},timeout:function(promiseOrValue,milliseconds){var deferred=new Deferred(),timeoutId;timeoutId=Ext.defer(function(){if(timeoutId){deferred.reject(new Error('Promise timed out.'))}},milliseconds);Deferred.resolved(promiseOrValue).then(function(value){Ext.undefer(timeoutId);timeoutId=null;deferred.resolve(value)},function(reason){Ext.undefer(timeoutId);timeoutId=null;deferred.reject(reason)});return deferred.promise}}}},function(Deferred){Deferred._ready()})
;
Ext.Factory=function(type){var me=this;me.aliasPrefix=type+'.';me.cache={};me.name=type.replace(me.fixNameRe,me.fixNameFn);me.type=type;me.creator='create'+Ext.String.capitalize(me.name)};Ext.Factory.prototype={defaultProperty:'type',instanceProp:'isInstance',typeProperty:'type',create:function(config,defaultType){var me=this,Manager=Ext.ClassManager,cache=me.cache,typeProperty=me.typeProperty,alias,className,klass,suffix;if(config){if(config[me.instanceProp]){return config}
if(typeof config==='string'){suffix=config;config={};config[me.defaultProperty]=suffix}
className=config.xclass;suffix=config[typeProperty]}
if(defaultType&&defaultType.constructor===Object){config=Ext.apply({},config,defaultType);defaultType=defaultType[typeProperty]}
if(className){if(!(klass=Manager.get(className))){return Manager.instantiate(className,config)}}else{if(!(suffix=suffix||defaultType||me.defaultType)){klass=me.defaultClass}
if(!suffix&&!klass){Ext.raise('No type specified for '+me.type+'.create')}
if(!klass&&!(klass=cache[suffix])){alias=me.aliasPrefix+suffix;className=Manager.getNameByAlias(alias);if(!(klass=className&&Manager.get(className))){return Manager.instantiateByAlias(alias,config)}
cache[suffix]=klass}}
return klass.isInstance?klass:new klass(config)},fixNameRe:/\.[a-z]/ig,fixNameFn:function(match){return match.substring(1).toUpperCase()},clearCache:function(){this.cache={};this.instanceCache={}},hook:function(fn){var me=this,original=me.create;me.create=function(config,defaultType){var ret=fn.call(me,original,config,defaultType);if(ret===undefined){ret=original.call(me,config,defaultType)}
return ret}},update:function(instance,config,creator,creatorMethod,defaultsConfig){var me=this,aliases,defaults,reuse,type;if(!config||config.isInstance){if(config&&!config[me.instanceProp]){Ext.raise('Config instance failed '+me.instanceProp+' requirement')}
if(instance&&instance!==config){instance.destroy()}
return config}
if(typeof config==='string'){type=config;config={};config[me.defaultProperty]=type}
if(instance){if(config===!0){return instance}
if(!(type=config.xclass)){if(!(type=config.xtype)){type=config[me.typeProperty];if(type){type=me.aliasPrefix+type;aliases=instance.self.prototype;if(aliases.hasOwnProperty('alias')){aliases=aliases.alias;if(aliases){reuse=aliases===type||aliases.indexOf(type)>-1}}}}else{reuse=instance.isXType(type,!0)}}else{reuse=instance.$className===type}
if(reuse){instance.setConfig(config);return instance}
instance.destroy()}
if(config===!0){config={}}
if(creator){if(defaultsConfig){defaults=Ext.Config.map[defaultsConfig];defaults=creator[defaults.names.get]();if(defaults){config=Ext.merge(Ext.clone(defaults),config)}}
creatorMethod=creatorMethod||me.creator;if(creator[creatorMethod]){config=creator[creatorMethod](config);if(!config){Ext.raise('Missing return value from '+creatorMethod+' on class '+creator.$className)}}}
return me.create(config)}};Ext.Factory.define=function(type,config){var Factory=Ext.Factory,cacheable=config&&config.cacheable,defaultClass,factory,fn;if(type.constructor===Object){Ext.Object.each(type,Factory.define,Factory)}else{factory=new Ext.Factory(type);if(config){if(config.constructor===Object){Ext.apply(factory,config);if(typeof(defaultClass=factory.xclass)==='string'){factory.defaultClass=Ext.ClassManager.get(defaultClass)}}else{factory.defaultType=config}}
Factory[factory.name]=fn=function(config,defaultType){return factory.create(config,defaultType)};if(cacheable){factory.instanceCache={};factory.hook(function(original,config,defaultType){var cache=this.instanceCache,v;if(typeof config==='string'&&!(v=cache[config])){v=original.call(this,config,defaultType);if(v.cacheable!==!1){cache[config]=v;Ext.Object.freeze(v)}}
return v})}
fn.instance=factory;fn.update=function(instance,config,creator,creatorMethod,defaultsConfig){return factory.update(instance,config,creator,creatorMethod,defaultsConfig)}}
return fn};Ext.Factory.clearCaches=function(){var Factory=Ext.Factory,key,item;for(key in Factory){item=Factory[key];item=item.instance;if(item){item.clearCache()}}};Ext.Factory.on=function(name,fn){Ext.Factory[name].instance.hook(fn)};Ext.define('Ext.mixin.Factoryable',{mixinId:'factoryable',onClassMixedIn:function(targetClass){var proto=targetClass.prototype,factoryConfig=proto.factoryConfig,alias=proto.alias,config={},dot,createFn;alias=alias&&alias.length&&alias[0];if(alias&&(dot=alias.lastIndexOf('.'))>0){config.type=alias.substring(0,dot);config.defaultType=alias.substring(dot+1)}
if(factoryConfig){delete proto.factoryConfig;Ext.apply(config,factoryConfig)}
createFn=Ext.Factory.define(config.type,config);if(targetClass.create===Ext.Base.create){targetClass.create=createFn}}})
;
Ext.define('Ext.data.request.Base',{requires:['Ext.Deferred'],mixins:['Ext.mixin.Factoryable'],factoryConfig:{type:'request',defaultType:'ajax'},result:null,success:null,timer:null,constructor:function(config){var me=this;Ext.apply(me,config.options||{},config.ownerConfig);me.id=++Ext.data.Connection.requestId;me.owner=config.owner;me.options=config.options;me.requestOptions=config.requestOptions},start:function(){var me=this,timeout=me.getTimeout();if(timeout&&me.async){me.timer=Ext.defer(me.onTimeout,timeout,me)}},abort:function(){var me=this;me.clearTimer();if(!me.timedout){me.aborted=!0}
me.abort=Ext.emptyFn},createDeferred:function(){var me=this,result=me.result,d=new Ext.Deferred();if(me.completed){if(me.success){d.resolve(result)}else{d.reject(result)}}
me.deferred=d;return d},getDeferred:function(){return this.deferred||this.createDeferred()},getPromise:function(){return this.getDeferred().promise},then:function(){var promise=this.getPromise();return promise.then.apply(promise,arguments)},onComplete:function(){var me=this,deferred=me.deferred,result=me.result;me.clearTimer();if(deferred){if(me.success){deferred.resolve(result)}else{deferred.reject(result)}}
me.completed=!0},onTimeout:function(){var me=this;me.timedout=!0;me.timer=null;me.abort(!0)},getTimeout:function(){return this.timeout},clearTimer:function(){this.timer=Ext.undefer(this.timer)},destroy:function(){var me=this;me.abort();me.owner=me.options=me.requestOptions=me.result=null;me.callParent()},privates:{createException:function(){var me=this,result;result={request:me,requestId:me.id,status:me.aborted?-1:0,statusText:me.aborted?'transaction aborted':'communication failure',getResponseHeader:me._getHeader,getAllResponseHeaders:me._getHeaders};if(me.aborted){result.aborted=!0}
if(me.timedout){result.timedout=!0}
return result},_getHeader:function(name){var headers=this.headers;return headers&&headers[name.toLowerCase()]},_getHeaders:function(){return this.headers}}})
;
Ext.define('Ext.data.flash.BinaryXhr',{statics:{flashPluginActivated:function(){Ext.data.flash.BinaryXhr.flashPluginActive=!0;Ext.data.flash.BinaryXhr.flashPlugin=document.getElementById("ext-flash-polyfill");Ext.GlobalEvents.fireEvent("flashready")},flashPluginActive:!1,flashPluginInjected:!1,connectionIndex:1,liveConnections:{},flashPlugin:null,onFlashStateChange:function(javascriptId,state,data){var connection;connection=this.liveConnections[Number(javascriptId)];if(connection){connection.onFlashStateChange(state,data)}else{Ext.warn.log("onFlashStateChange for unknown connection ID: "+javascriptId)}},registerConnection:function(conn){var i=this.connectionIndex;this.conectionIndex=this.connectionIndex+1;this.liveConnections[i]=conn;return i},injectFlashPlugin:function(){var me=this,flashLoaderPath,flashObjectPath;me.flashPolyfillEl=Ext.getBody().appendChild({id:'ext-flash-polyfill',cn:[{tag:'p',html:'To view this page ensure that Adobe Flash Player version 11.1.0 or greater is installed.'},{tag:'a',href:'http://www.adobe.com/go/getflashplayer',cn:[{tag:'img',src:window.location.protocol+'//www.adobe.com/images/shared/download_buttons/get_flash_player.gif',alt:'Get Adobe Flash player'}]}]});flashLoaderPath=[Ext.Loader.getPath('Ext.data.Connection'),'../../../plugins/flash/swfobject.js'].join('/');flashObjectPath="/plugins/flash/FlashPlugin.swf";flashObjectPath=[Ext.Loader.getPath('Ext.data.Connection'),'../../plugins/flash/FlashPlugin.swf'].join('/');if(Ext.flashPluginPath){flashObjectPath=Ext.flashPluginPath}
Ext.Loader.loadScript({url:flashLoaderPath,onLoad:function(){var swfVersionStr="11.4.0",xiSwfUrlStr="playerProductInstall.swf",flashvars={},params={},attributes={};params.quality="high";params.bgcolor="#ffffff";params.allowscriptaccess="sameDomain";params.allowfullscreen="true";attributes.id="ext-flash-polyfill";attributes.name="polyfill";attributes.align="middle";swfobject.embedSWF(flashObjectPath,"ext-flash-polyfill","0","0",swfVersionStr,xiSwfUrlStr,flashvars,params,attributes)},onError:function(){Ext.raise("Could not load flash-loader file swfobject.js from "+flashLoader)},scope:me});Ext.data.flash.BinaryXhr.flashPluginInjected=!0}},readyState:0,status:0,statusText:"",responseBytes:null,javascriptId:null,constructor:function(config){var me=this;if(!Ext.data.flash.BinaryXhr.flashPluginInjected){Ext.data.flash.BinaryXhr.injectFlashPlugin()}
Ext.apply(me,config);me.requestHeaders={}},abort:function(){var me=this;if(me.readyState===4){Ext.warn.log("Aborting a connection that's completed its transfer: "+this.url);return}
me.aborted=!0;if(!Ext.data.flash.BinaryXhr.flashPluginActive){Ext.GlobalEvents.removeListener("flashready",me.onFlashReady,me);return}
Ext.data.flash.BinaryXhr.flashPlugin.abortRequest(me.javascriptId);delete Ext.data.flash.BinaryXhr.liveConnections[me.javascriptId]},getAllResponseHeaders:function(){var headers=[];Ext.Object.each(this.responseHeaders,function(name,value){headers.push(name+': '+value)});return headers.join('\x0d\x0a')},getResponseHeader:function(header){var headers=this.responseHeaders;return(headers&&headers[header])||null},open:function(method,url,isAsync,user,password){var me=this;me.method=method;me.url=url;me.async=isAsync!==!1;me.user=user;me.password=password;if(!me.async){Ext.raise("Binary posts are only supported in async mode: "+url)}
if(me.method!=="POST"){Ext.log.warn("Binary data can only be sent as a POST request: "+url)}},overrideMimeType:function(mimeType){this.mimeType=mimeType},send:function(body){var me=this;me.body=body;if(!Ext.data.flash.BinaryXhr.flashPluginActive){Ext.GlobalEvents.addListener("flashready",me.onFlashReady,me)}else{this.onFlashReady()}},onFlashReady:function(){var me=this,req;me.javascriptId=Ext.data.flash.BinaryXhr.registerConnection(me);req={method:me.method,url:me.url,user:me.user,password:me.password,mimeType:me.mimeType,requestHeaders:me.requestHeaders,body:me.body,javascriptId:me.javascriptId};Ext.data.flash.BinaryXhr.flashPlugin.postBinary(req)},setReadyState:function(state){var me=this;if(me.readyState!==state){me.readyState=state;me.onreadystatechange()}},setRequestHeader:function(header,value){this.requestHeaders[header]=value},onreadystatechange:Ext.emptyFn,parseData:function(data){var me=this;this.status=data.status||0;me.responseHeaders={};if(me.mimeType){me.responseHeaders["content-type"]=me.mimeType}
if(data.reason==="complete"){this.responseBytes=data.data;me.responseHeaders["content-length"]=data.data.length}else if(data.reason==="error"||data.reason==="securityError"){this.statusText=data.text;me.responseHeaders["content-length"]=0}else{Ext.raise("Unkown reason code in data: "+data.reason)}},onFlashStateChange:function(state,data){var me=this;if(state===4){me.parseData(data);delete Ext.data.flash.BinaryXhr.liveConnections[me.javascriptId]}
me.setReadyState(state)}})
;
Ext.define('Ext.data.request.Ajax',{extend:'Ext.data.request.Base',alias:'request.ajax',requires:['Ext.data.flash.BinaryXhr'],statics:{parseStatus:function(status,response){var type,len,success,isException;if(response){type=response.responseType;if(type==='arraybuffer'){len=response.byteLength}else if(type==='blob'){len=response.response.size}else if((type==='json'||type==='document')&&response.response){len=0}else if((type==='text'||type===''||!type)&&response.responseText){len=response.responseText.length}}
status=status===1223?204:status;isException=!1;success=(status>=200&&status<300)||status===304||(status===0&&Ext.isNumber(len));if(!success){switch(status){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:isException=!0;break}}
return{success:success,isException:isException}}},start:function(data){var me=this,options=me.options,requestOptions=me.requestOptions,isXdr=me.isXdr,xhr;xhr=me.xhr=me.openRequest(options,requestOptions,me.async,me.username,me.password);if(!isXdr){me.setupHeaders(xhr,options,requestOptions.data,requestOptions.params)}
if(me.async){if(!isXdr){xhr.onreadystatechange=me.bindStateChange()}}
if(isXdr){me.processXdrRequest(me,xhr)}
me.callParent([data]);xhr.send(data);if(!me.async){return me.onComplete()}
return me},abort:function(force){var me=this,xhr=me.xhr;if(force||me.isLoading()){try{xhr.onreadystatechange=null}catch(e){xhr.onreadystatechange=Ext.emptyFn}
xhr.abort();me.callParent([force]);me.onComplete();me.cleanup()}},cleanup:function(){this.xhr=null;delete this.xhr},isLoading:function(){var me=this,xhr=me.xhr,state=xhr&&xhr.readyState,C=Ext.data.flash&&Ext.data.flash.BinaryXhr;if(!xhr||me.aborted||me.timedout){return!1}
if(C&&xhr instanceof C){return state!==4}
return state!==0&&state!==4},openRequest:function(options,requestOptions,isAsync,username,password){var me=this,xhr=me.newRequest(options);if(username){xhr.open(requestOptions.method,requestOptions.url,isAsync,username,password)}else{if(me.isXdr){xhr.open(requestOptions.method,requestOptions.url)}else{xhr.open(requestOptions.method,requestOptions.url,isAsync)}}
if(options.binary||me.binary){if(window.Uint8Array){xhr.responseType='arraybuffer'}else if(xhr.overrideMimeType){xhr.overrideMimeType('text/plain; charset=x-user-defined')}else if(!Ext.isIE){Ext.log.warn("Your browser does not support loading binary data using Ajax.")}}
if(options.responseType){xhr.responseType=options.responseType}
if(options.withCredentials||me.withCredentials){xhr.withCredentials=!0}
return xhr},newRequest:function(options){var me=this,xhr;if(options.binaryData){if(window.Uint8Array){xhr=me.getXhrInstance()}else{xhr=new Ext.data.flash.BinaryXhr()}}else if(me.cors&&Ext.isIE9m){xhr=me.getXdrInstance();me.isXdr=!0}else{xhr=me.getXhrInstance();me.isXdr=!1}
return xhr},setupHeaders:function(xhr,options,data,params){var me=this,headers=Ext.apply({},options.headers||{},me.defaultHeaders),contentType=me.defaultPostHeader,jsonData=options.jsonData,xmlData=options.xmlData,type='Content-Type',useHeader=me.useDefaultXhrHeader,key,header;if(!headers.hasOwnProperty(type)&&(data||params)){if(data){if(options.rawData){contentType='text/plain'}else{if(xmlData&&Ext.isDefined(xmlData)){contentType='text/xml'}else if(jsonData&&Ext.isDefined(jsonData)){contentType='application/json'}}}
headers[type]=contentType}
if(useHeader&&!headers['X-Requested-With']){headers['X-Requested-With']=me.defaultXhrHeader}
if(headers[type]===undefined||headers[type]===null){delete headers[type]}
try{for(key in headers){if(headers.hasOwnProperty(key)){header=headers[key];xhr.setRequestHeader(key,header)}}}catch(e){me.owner.fireEvent('exception',key,header)}
return headers},getXdrInstance:function(){var xdr;if(Ext.ieVersion>=8){xdr=new XDomainRequest()}else{Ext.raise({msg:'Your browser does not support CORS'})}
return xdr},getXhrInstance:function(){return new XMLHttpRequest()},processXdrRequest:function(request,xhr){var me=this;delete request.headers;request.contentType=request.options.contentType||me.defaultXdrContentType;xhr.onload=me.bindStateChange(!0);xhr.onerror=xhr.ontimeout=me.bindStateChange(!1)},processXdrResponse:function(response,xhr){response.getAllResponseHeaders=function(){return[]};response.getResponseHeader=function(){return''};response.contentType=xhr.contentType||this.defaultXdrContentType},bindStateChange:function(xdrResult){var me=this;return function(){Ext.elevate(function(){me.onStateChange(xdrResult)})}},onStateChange:function(xdrResult){var me=this,xhr=me.xhr;if((xhr&&xhr.readyState===4)||me.isXdr){me.clearTimer();me.onComplete(xdrResult);me.cleanup()}},onComplete:function(xdrResult){var me=this,owner=me.owner,options=me.options,xhr=me.xhr,failure={success:!1,isException:!1},result,success,response;if(!xhr||me.destroyed){return me.result=failure}
try{result=Ext.data.request.Ajax.parseStatus(xhr.status,xhr);if(result.success){result.success=xhr.readyState===4}}catch(e){result=failure}
success=me.success=me.isXdr?xdrResult:result.success;if(success){response=me.createResponse(xhr);if(owner.hasListeners.requestcomplete){owner.fireEvent('requestcomplete',owner,response,options)}
if(options.success){Ext.callback(options.success,options.scope,[response,options])}}else{if(result.isException||me.aborted||me.timedout){response=me.createException(xhr)}else{response=me.createResponse(xhr)}
if(owner.hasListeners.requestexception){owner.fireEvent('requestexception',owner,response,options)}
if(options.failure){Ext.callback(options.failure,options.scope,[response,options])}}
me.result=response;if(options.callback){Ext.callback(options.callback,options.scope,[options,success,response])}
owner.onRequestComplete(me);me.callParent([xdrResult]);return response},createResponse:function(xhr){var me=this,isXdr=me.isXdr,headers={},lines=isXdr?[]:xhr.getAllResponseHeaders().replace(/\r\n/g,'\n').split('\n'),count=lines.length,line,index,key,response;while(count--){line=lines[count];index=line.indexOf(':');if(index>=0){key=line.substr(0,index).toLowerCase();if(line.charAt(index+1)===' '){++index}
headers[key]=line.substr(index+1)}}
response={request:me,requestId:me.id,status:xhr.status,statusText:xhr.statusText,getResponseHeader:function(header){return headers[header.toLowerCase()]},getAllResponseHeaders:function(){return headers}};if(isXdr){me.processXdrResponse(response,xhr)}
if(me.binary){response.responseBytes=me.getByteArray(xhr)}else{if(xhr.responseType){response.responseType=xhr.responseType}
if(xhr.responseType==='blob'){response.responseBlob=xhr.response}else if(xhr.responseType==='json'){response.responseJson=xhr.response}else if(xhr.responseType==='document'){response.responseXML=xhr.response}else{response.responseText=xhr.responseText;response.responseXML=xhr.responseXML}}
return response},destroy:function(){this.xhr=null;this.callParent()},privates:{getByteArray:function(xhr){var response=xhr.response,responseBody=xhr.responseBody,Cls=Ext.data.flash&&Ext.data.flash.BinaryXhr,byteArray,responseText,len,i;if(xhr instanceof Cls){byteArray=xhr.responseBytes}else if(window.Uint8Array){byteArray=response?new Uint8Array(response):[]}else if(Ext.isIE9p){try{byteArray=new VBArray(responseBody).toArray()}catch(e){byteArray=[]}}else if(Ext.isIE){if(!this.self.vbScriptInjected){this.injectVBScript()}
getIEByteArray(xhr.responseBody,byteArray=[])}else{byteArray=[];responseText=xhr.responseText;len=responseText.length;for(i=0;i<len;i++){byteArray.push(responseText.charCodeAt(i)&0xFF)}}
return byteArray},injectVBScript:function(){var scriptTag=document.createElement('script');scriptTag.type='text/vbscript';scriptTag.text=['Function getIEByteArray(byteArray, out)','Dim len, i','len = LenB(byteArray)','For i = 1 to len','out.push(AscB(MidB(byteArray, i, 1)))','Next','End Function'].join('\n');Ext.getHead().dom.appendChild(scriptTag);this.self.vbScriptInjected=!0}}})
;
Ext.define('Ext.data.request.Form',{extend:'Ext.data.request.Base',alias:'request.form',start:function(data){var me=this,options=me.options,requestOptions=me.requestOptions;me.callParent([data]);me.form=me.upload(options.form,requestOptions.url,requestOptions.data,options);return me},abort:function(force){var me=this,frame;if(me.isLoading()){try{frame=me.frame.dom;if(frame.stop){frame.stop()}else{frame.document.execCommand('Stop')}}catch(e){}}
me.callParent([force]);me.onComplete();me.cleanup()},cleanup:function(){var me=this,frame=me.frame;if(frame){frame.un('load',me.onComplete,me);Ext.removeNode(frame)}
me.frame=me.form=null},isLoading:function(){return!!this.frame},upload:function(form,url,params,options){form=Ext.getDom(form);options=options||{};var frameDom=document.createElement('iframe'),frame=Ext.get(frameDom),id=frame.id,hiddens=[],encoding='multipart/form-data',buf={target:form.target,method:form.method,encoding:form.encoding,enctype:form.enctype,action:form.action},addField=function(name,value){hiddenItem=document.createElement('input');Ext.fly(hiddenItem).set({type:'hidden',value:value,name:name});form.appendChild(hiddenItem);hiddens.push(hiddenItem)},hiddenItem,obj,value,name,vLen,v,hLen,h;frame.set({name:id,cls:Ext.baseCSSPrefix+'hidden-display',src:Ext.SSL_SECURE_URL,tabIndex:-1});document.body.appendChild(frameDom);document.body.appendChild(form);if(document.frames){document.frames[id].name=id}
Ext.fly(form).set({target:id,method:'POST',enctype:encoding,encoding:encoding,action:url||buf.action});if(params){obj=Ext.Object.fromQueryString(params)||{};for(name in obj){if(obj.hasOwnProperty(name)){value=obj[name];if(Ext.isArray(value)){vLen=value.length;for(v=0;v<vLen;v++){addField(name,value[v])}}else{addField(name,value)}}}}
this.frame=frame;frame.on({load:this.onComplete,scope:this,single:!Ext.isOpera});form.submit();document.body.removeChild(form);Ext.fly(form).set(buf);for(hLen=hiddens.length,h=0;h<hLen;h++){Ext.removeNode(hiddens[h])}
return form},getDoc:function(){var frame=this.frame.dom;return(frame&&(frame.contentWindow.document||frame.contentDocument))||(window.frames[frame.id]||{}).document},getTimeout:function(){return this.options.timeout},onComplete:function(){var me=this,frame=me.frame,owner=me.owner,options=me.options,callback,doc,success,contentNode,response;if(!frame){return}
if(me.aborted||me.timedout){me.result=response=me.createException();response.responseXML=null;response.responseText=Ext.encode({success:!1,message:Ext.String.trim(response.statusText)});response.request=me;callback=options.failure;success=!1}else{try{doc=me.getDoc();me.result=response={responseText:'',responseXML:null,request:me};if(doc){if(Ext.isOpera&&doc.location===Ext.SSL_SECURE_URL){return}
if(doc.body){if((contentNode=doc.body.firstChild)&&/pre/i.test(contentNode.tagName)){response.responseText=contentNode.textContent||contentNode.innerText}else if((contentNode=doc.getElementsByTagName('textarea')[0])){response.responseText=contentNode.value}else{response.responseText=doc.body.textContent||doc.body.innerText}}
response.responseXML=doc.XMLDocument||doc;callback=options.success;success=!0;response.status=200}else{Ext.raise("Could not acquire a suitable connection for the "+"file upload service.")}}catch(e){me.result=response=me.createException();response.status=400;response.statusText=(e.message||e.description)+'';response.responseText=Ext.encode({success:!1,message:Ext.String.trim(response.statusText)});response.responseXML=null;callback=options.failure;success=!1}}
me.frame=null;me.success=success;owner.fireEvent(success?'requestcomplete':'requestexception',owner,response,options);Ext.callback(callback,options.scope,[response,options]);Ext.callback(options.callback,options.scope,[options,success,response]);owner.onRequestComplete(me);Ext.asap(frame.destroy,frame);me.callParent()},destroy:function(){this.cleanup();this.callParent()}})
;
Ext.define('Ext.data.Connection',{mixins:{observable:'Ext.mixin.Observable'},requires:['Ext.data.request.Ajax','Ext.data.request.Form','Ext.data.flash.BinaryXhr','Ext.Deferred'],statics:{requestId:0},enctypeRe:/multipart\/form-data/i,config:{url:null,async:!0,username:'',password:'',disableCaching:!0,withCredentials:!1,binary:!1,cors:!1,isXdr:!1,defaultXdrContentType:'text/plain',disableCachingParam:'_dc',timeout:30000,extraParams:null,autoAbort:!1,method:null,defaultHeaders:null,defaultPostHeader:'application/x-www-form-urlencoded; charset=UTF-8',useDefaultXhrHeader:!0,defaultXhrHeader:'XMLHttpRequest'},constructor:function(config){this.mixins.observable.constructor.call(this,config);this.requests={}},request:function(options){var me=this,requestOptions,request;options=options||{};if(me.fireEvent('beforerequest',me,options)!==!1){requestOptions=me.setOptions(options,options.scope||Ext.global);request=me.createRequest(options,requestOptions);return request.start(requestOptions.data)}
request={status:-1,statusText:'Request cancelled in beforerequest event handler'};Ext.callback(options.callback,options.scope,[options,!1,request]);return Ext.Deferred.rejected([options,!1,request])},createRequest:function(options,requestOptions){var me=this,type=options.type||requestOptions.type,request;if(!type){type=me.isFormUpload(options)?'form':'ajax'}
if(options.autoAbort||me.getAutoAbort()){me.abort()}
request=Ext.Factory.request({type:type,owner:me,options:options,requestOptions:requestOptions,ownerConfig:me.getConfig()});me.requests[request.id]=request;me.latestId=request.id;return request},isFormUpload:function(options){var form=this.getForm(options);if(form){return options.isUpload||this.enctypeRe.test(form.getAttribute('enctype'))}
return!1},getForm:function(options){return Ext.getDom(options.form)},setOptions:function(options,scope){var me=this,params=options.params||{},extraParams=me.getExtraParams(),urlParams=options.urlParams,url=options.url||me.getUrl(),cors=options.cors,jsonData=options.jsonData,method,disableCache,data;if(cors!==undefined){me.setCors(cors)}
if(Ext.isFunction(params)){params=params.call(scope,options)}
if(Ext.isFunction(url)){url=url.call(scope,options)}
url=this.setupUrl(options,url);if(!url){Ext.raise({options:options,msg:'No URL specified'})}
data=options.rawData||options.binaryData||options.xmlData||jsonData||null;if(jsonData&&!Ext.isPrimitive(jsonData)){data=Ext.encode(data)}
if(options.binaryData){if(!Ext.isArray(options.binaryData)){Ext.log.warn("Binary submission data must be an array of byte values! "+"Instead got "+typeof(options.binaryData))}
if(me.nativeBinaryPostSupport()){data=(new Uint8Array(options.binaryData));if((Ext.isChrome&&Ext.chromeVersion<22)||Ext.isSafari||Ext.isGecko){data=data.buffer}}}
if(Ext.isObject(params)){params=Ext.Object.toQueryString(params)}
if(Ext.isObject(extraParams)){extraParams=Ext.Object.toQueryString(extraParams)}
params=params+((extraParams)?((params)?'&':'')+extraParams:'');urlParams=Ext.isObject(urlParams)?Ext.Object.toQueryString(urlParams):urlParams;params=this.setupParams(options,params);method=(options.method||me.getMethod()||((params||data)?'POST':'GET')).toUpperCase();this.setupMethod(options,method);disableCache=options.disableCaching!==!1?(options.disableCaching||me.getDisableCaching()):!1;if(method==='GET'&&disableCache){url=Ext.urlAppend(url,(options.disableCachingParam||me.getDisableCachingParam())+'='+(new Date().getTime()))}
if((method==='GET'||data)&&params){url=Ext.urlAppend(url,params);params=null}
if(urlParams){url=Ext.urlAppend(url,urlParams)}
return{url:url,method:method,data:data||params||null}},setupUrl:function(options,url){var form=this.getForm(options);if(form){url=url||form.action}
return url},setupParams:function(options,params){var form=this.getForm(options),serializedForm;if(form&&!this.isFormUpload(options)){serializedForm=Ext.Element.serializeForm(form);params=params?(params+'&'+serializedForm):serializedForm}
return params},setupMethod:function(options,method){if(this.isFormUpload(options)){return'POST'}
return method},isLoading:function(request){if(!request){request=this.getLatest()}
return request?request.isLoading():!1},abort:function(request){if(!request){request=this.getLatest()}
if(request&&request.isLoading()){request.abort()}},abortAll:function(){var requests=this.requests,id;for(id in requests){this.abort(requests[id])}},getLatest:function(){var id=this.latestId,request;if(id){request=this.requests[id]}
return request||null},clearTimeout:function(request){if(!request){request=this.getLatest()}
if(request){request.clearTimer()}},onRequestComplete:function(request){delete this.requests[request.id]},nativeBinaryPostSupport:function(){return Ext.isChrome||(Ext.isSafari&&Ext.isDefined(window.Uint8Array))||(Ext.isGecko&&Ext.isDefined(window.Uint8Array))}})
;
Ext.define('Ext.Ajax',{extend:'Ext.data.Connection',singleton:!0,autoAbort:!1})
;
Ext.define('Ext.AnimationQueue',{singleton:!0,constructor:function(){var me=this;me.queue=[];me.taskQueue=[];me.runningQueue=[];me.idleQueue=[];me.isRunning=!1;me.isIdle=!0;me.run=me.run.bind(me);if(Ext.os.is.iOS){me.watch.$skipTimerCheck=!0;me.watchdogTimer=Ext.interval(me.watch,500,me)}},start:function(fn,scope,args){var me=this;me.queue.push(arguments);if(!me.isRunning){if(me.hasOwnProperty('idleTimer')){Ext.undefer(me.idleTimer);delete me.idleTimer}
if(me.hasOwnProperty('idleQueueTimer')){Ext.undefer(me.idleQueueTimer);delete me.idleQueueTimer}
me.isIdle=!1;me.isRunning=!0;me.startCountTime=Ext.now();me.count=0;me.doStart()}},clear:function(){var me=this;Ext.undefer(me.idleTimer);Ext.undefer(me.idleQueueTimer);Ext.unraf(me.animationFrameId);me.idleTimer=me.idleQueueTimer=me.animationFrameId=null;me.queue.length=me.taskQueue.length=me.runningQueue.length=me.idleQueue.length=0;me.isRunning=!1;me.isIdle=!0;me.startCountTime=Ext.now();me.count=0},watch:function(){if(this.isRunning&&Ext.now()-this.lastRunTime>=500){this.run()}},run:function(){var me=this,queue=me.runningQueue,now,item,element,i,ln;me.animationFrameId=null;if(!me.isRunning){return}
now=Ext.now();me.lastRunTime=now;me.frameStartTime=now;i=me.queue.length;while(i--){item=me.queue[i];element=item[1]&&item[1].getElement&&item[1].getElement();if(element&&element.destroyed){me.queue.splice(i,1)}}
queue.push.apply(queue,me.queue);for(i=0,ln=queue.length;i<ln;i++){me.invoke(queue[i])}
queue.length=0;var elapse=me.frameStartTime-me.startCountTime,count=++me.count;if(elapse>=200){me.onFpsChanged(count*1000/elapse,count,elapse);me.startCountTime=me.frameStartTime;me.count=0}
if(!me.queue.length){me.stop()}
if(me.isRunning){me.doIterate()}},onFpsChanged:Ext.emptyFn,onStop:Ext.emptyFn,doStart:function(){if(!this.animationFrameId){this.animationFrameId=Ext.raf(this.run)}
this.lastRunTime=Ext.now()},doIterate:function(){if(!this.animationFrameId){this.animationFrameId=Ext.raf(this.run)}},doStop:function(){if(this.animationFrameId){Ext.unraf(this.animationFrameId)}
this.animationFrameId=null},stop:function(fn,scope,args){var me=this,queue=me.queue,ln=queue.length,i,item;if(!me.isRunning){return}
for(i=0;i<ln;i++){item=queue[i];if(item[0]===fn&&item[1]===scope&&item[2]===args){queue.splice(i,1);i--;ln--}}
if(ln===0){me.doStop();me.onStop();me.isRunning=!1;if(me.idleQueue.length&&!me.idleTimer){me.idleTimer=Ext.defer(me.whenIdle,100,me)}}},onIdle:function(fn,scope,args){var me=this,listeners=me.idleQueue,i,ln,listener;for(i=0,ln=listeners.length;i<ln;i++){listener=listeners[i];if(fn===listener[0]&&scope===listener[1]&&args===listener[2]){return}}
listeners.push(arguments);if(me.isIdle){me.processIdleQueue()}else if(!me.idleTimer){me.idleTimer=Ext.defer(me.whenIdle,100,me)}},unIdle:function(fn,scope,args){var me=this,listeners=me.idleQueue,i,ln,listener;for(i=0,ln=listeners.length;i<ln;i++){listener=listeners[i];if(fn===listener[0]&&scope===listener[1]&&args===listener[2]){listeners.splice(i,1);return!0}}
if(!listeners.length&&me.idleTimer){Ext.undefer(me.idleTimer);delete me.idleTimer}
if(!listeners.length&&me.idleQueueTimer){Ext.undefer(me.idleQueueTimer);delete me.idleQueueTimer}
return!1},queueTask:function(fn,scope,args){this.taskQueue.push(arguments);this.processTaskQueue()},dequeueTask:function(fn,scope,args){var listeners=this.taskQueue,i,ln,listener;for(i=0,ln=listeners.length;i<ln;i++){listener=listeners[i];if(fn===listener[0]&&scope===listener[1]&&args===listener[2]){listeners.splice(i,1);i--;ln--}}},invoke:function(listener){var fn=listener[0],scope=listener[1],args=listener[2];fn=(typeof fn==='string'?scope[fn]:fn);if(Ext.isArray(args)){fn.apply(scope,args)}else{fn.call(scope,args)}},whenIdle:function(){delete this.idleTimer;this.isIdle=!0;this.processIdleQueue()},processIdleQueue:function(){if(!this.hasOwnProperty('idleQueueTimer')){this.idleQueueTimer=Ext.defer(this.processIdleQueueItem,1,this)}},processIdleQueueItem:function(){var listeners=this.idleQueue,listener;delete this.idleQueueTimer;if(!this.isIdle){return}
if(listeners.length>0){listener=listeners.shift();this.invoke(listener);this.processIdleQueue()}},processTaskQueue:function(){if(!this.hasOwnProperty('taskQueueTimer')){this.taskQueueTimer=Ext.defer(this.processTaskQueueItem,15,this)}},processTaskQueueItem:function(){var listeners=this.taskQueue,listener;delete this.taskQueueTimer;if(listeners.length>0){listener=listeners.shift();this.invoke(listener);this.processTaskQueue()}},showFps:function(){var styleTpl={color:'white','background-color':'black','text-align':'center','font-family':'sans-serif','font-size':'8px','font-weight':'normal','font-style':'normal','line-height':'20px','-webkit-font-smoothing':'antialiased','zIndex':100000,position:'absolute'};Ext.getBody().append([{style:Ext.applyIf({bottom:'50px',left:0,width:'50px',height:'20px'},styleTpl),html:'Average'},{style:Ext.applyIf({'background-color':'red','font-size':'18px','line-height':'50px',bottom:0,left:0,width:'50px',height:'50px'},styleTpl),id:'__averageFps',html:'0'},{style:Ext.applyIf({bottom:'50px',left:'50px',width:'50px',height:'20px'},styleTpl),html:'Min (Last 1k)'},{style:Ext.applyIf({'background-color':'orange','font-size':'18px','line-height':'50px',bottom:0,left:'50px',width:'50px',height:'50px'},styleTpl),id:'__minFps',html:'0'},{style:Ext.applyIf({bottom:'50px',left:'100px',width:'50px',height:'20px'},styleTpl),html:'Max (Last 1k)'},{style:Ext.applyIf({'background-color':'maroon','font-size':'18px','line-height':'50px',bottom:0,left:'100px',width:'50px',height:'50px'},styleTpl),id:'__maxFps',html:'0'},{style:Ext.applyIf({bottom:'50px',left:'150px',width:'50px',height:'20px'},styleTpl),html:'Current'},{style:Ext.applyIf({'background-color':'green','font-size':'18px','line-height':'50px',bottom:0,left:'150px',width:'50px',height:'50px'},styleTpl),id:'__currentFps',html:'0'}]);Ext.AnimationQueue.resetFps()},resetFps:function(){var currentFps=Ext.get('__currentFps'),averageFps=Ext.get('__averageFps'),minFps=Ext.get('__minFps'),maxFps=Ext.get('__maxFps'),min=1000,max=0,count=0,sum=0;if(!currentFps){return}
Ext.AnimationQueue.onFpsChanged=function(fps){count++;if(!(count%10)){min=1000;max=0}
sum+=fps;min=Math.min(min,fps);max=Math.max(max,fps);currentFps.setHtml(Math.round(fps));averageFps.setHtml(Math.round(sum/count));minFps.setHtml(Math.round(min));maxFps.setHtml(Math.round(max))}}},function(){var paramsString=window.location.search.substr(1),paramsArray=paramsString.split("&");if(Ext.Array.contains(paramsArray,"showfps")){Ext.onReady(this.showFps.bind(this))}})
;
Ext.define('Ext.mixin.Bufferable',function(Bufferable){return{extend:'Ext.Mixin',mixinConfig:{id:'bufferable',after:{destroy:'cancelAllCalls'},before:{$reap:'cancelAllCalls'},extended:function(baseClass,derivedClass,classBody){var bufferableMethods=classBody.bufferableMethods;if(bufferableMethods){delete classBody.bufferableMethods;Bufferable.processClass(derivedClass,bufferableMethods)}}},afterClassMixedIn:function(targetClass){Bufferable.processClass(targetClass)},privates:{cancelAllCalls:function(){var bufferables=this.bufferables,name;if(bufferables){for(name in bufferables){bufferables[name].cancel();delete bufferables[name]}}},cancelBufferedCall:function(name,invoke){var bufferables=this.bufferables,timer=bufferables&&bufferables[name];if(timer){timer[invoke?'invoke':'cancel']()}
return!!timer},flushBufferedCall:function(name){return this.cancelBufferedCall(name,!0)},initBufferables:function(){var me=this,methods=me.hasOwnProperty('bufferableMethods')&&me.bufferableMethods,classMethods;if(methods){Bufferable._canonicalize(methods);classMethods=me.self.prototype.bufferableMethods;me.bufferableMethods=Ext.merge(Ext.clone(classMethods),methods)}
return(me.bufferables={})},isCallPending:function(name){var bufferables=this.bufferables,timer=bufferables&&bufferables[name];return!!timer},statics:{SINGLE:{single:!0},_canonicalize:function(methods){var t,def,s,name;for(name in methods){s=Ext.String.capitalize(name);def=methods[name];t=typeof def;if(t==='number'||t==='string'){methods[name]=def={delay:def}}
if(typeof(t=def.delay)==='string'){def[t]=!0;delete def.delay}
def.capitalized=s;def.name=name;if(!def.fn){def.fn='do'+s}
if(!def.flag){def.flag='is'+s+'Pending'}}},_canceller:function(){var timer=this,id=timer.id;if(id){if(timer.delay){Ext.undefer(id)}else if(timer.asap){Ext.unasap(id)}else if(timer.idle){Ext.un('idle',id,null,Bufferable.SINGLE)}else if(timer.raf){Ext.unraf(id)}
timer.id=null}
timer.args=null;timer.target[timer.flag]=!1},_invoker:function(){var timer=this,args=timer.args||Ext.emptyArray,target=timer.target;++timer.invokes;timer.cancel();target[timer.fn].apply(target,args)},delayCall:function(target,def,args){if(target.destroying){return}
var bufferables=target.bufferables||target.initBufferables(),name=def.name,timer=bufferables[name]||(bufferables[name]=Ext.apply({calls:0,invokes:0,args:null,cancel:Bufferable._canceller,id:null,target:target,invoke:Bufferable._invoker},def)),delay=def.delay,exec=function(){if(timer.id){timer.id=null;timer.invoke()}};if(timer.id){timer.cancel()}
timer.args=args;++timer.calls;target[timer.flag]=!0;if(delay){timer.id=Ext.defer(exec,delay)}else if(def.asap){timer.id=Ext.asap(exec)}else if(def.idle){timer.id=exec;Ext.on('idle',exec,null,Bufferable.SINGLE)}else if(def.raf){timer.id=Ext.raf(exec)}else{timer.invoke()}},processClass:function(cls,bufferableMethods){var proto=cls.prototype,inherited=proto.bufferableMethods,def,name;if(bufferableMethods){Bufferable._canonicalize(bufferableMethods);if(inherited){inherited=Ext.merge(Ext.clone(inherited),bufferableMethods)}
proto.bufferableMethods=inherited||bufferableMethods}else{bufferableMethods=inherited;Bufferable._canonicalize(bufferableMethods);proto.bufferables=null}
if(bufferableMethods){for(name in bufferableMethods){if(!proto[name]){def=bufferableMethods[name];Bufferable.processMethod(proto,def,Array.prototype.slice)}}}},processMethod:function(proto,def,slice){var name=def.name,cap=def.capitalized;proto[name]=function(){return Bufferable.delayCall(this,def,slice.call(arguments))};proto['cancel'+cap]=function(){return this.cancelBufferedCall(name)};proto['flush'+cap]=function(){return this.flushBufferedCall(name)}}}}}})
;
Ext.define('Ext.ComponentManager',{alternateClassName:'Ext.ComponentMgr',singleton:!0,mixins:['Ext.mixin.Bufferable'],count:0,fixReferencesTimer:null,referenceRepairs:0,typeName:'xtype',bufferableMethods:{handleDocumentMouseDown:'asap'},constructor:function(config){var me=this;Ext.apply(me,config);me.all={};me.byInstanceId={};me.holders={};me.onAvailableCallbacks={}},create:function(config,defaultType){if(typeof config==='string'){return Ext.widget(config)}
if(config.isComponent){return config}
if('xclass' in config){return Ext.create(config.xclass,config)}
return Ext.widget(config.xtype||defaultType,config)},get:function(id){return this.all[id]},register:function(component){var me=this,id=component.getId(),onAvailableCallbacks=me.onAvailableCallbacks;if(id===undefined){Ext.raise('Component id is undefined. Please ensure the component has an id.')}
if(id in me.all){Ext.raise('Duplicate component id "'+id+'"')}
if(component.$iid in me.byInstanceId){Ext.raise('Duplicate component instance id "'+component.$iid+'"')}
me.all[id]=component;me.byInstanceId[component.$iid]=component;if(component.nameHolder||component.referenceHolder){me.holders[id]=component}
++me.count;if(!me.hasFocusListener){me.installFocusListener()}
onAvailableCallbacks=onAvailableCallbacks&&onAvailableCallbacks[id];if(onAvailableCallbacks&&onAvailableCallbacks.length){me.notifyAvailable(component)}},unregister:function(component){var me=this,all=me.all,byInstanceId=me.byInstanceId,holders=me.holders,id=component.getId();if(id in holders){holders[id]=null;delete holders[id]}
all[id]=null;delete all[id];id=component.$iid;byInstanceId[id]=null;delete byInstanceId[id];--me.count},markReferencesDirty:function(){var me=this,holders=me.holders,holder,id;if(!Ext.referencesDirty){for(id in holders){holder=holders[id];holder.refs=holder.nameRefs=null;if(holder.invalidateChildDirty){holder.invalidateChildDirty()}}
Ext.referencesDirty=!0;me.fixReferencesTimer=Ext.asap(function(){me.fixReferencesTimer=null;me.fixReferences()})}},fixReferences:function(){var me=this,all=me.all,holders=me.holders,holder,id;if(Ext.referencesDirty){me.fixReferencesTimer=Ext.unasap(me.fixReferencesTimer);Ext.referencesDirty=0;++me.referenceRepairs;for(id in holders){holder=holders[id];if(holder.beginSyncChildDirty){holder.beginSyncChildDirty()}}
for(id in all){all[id]._fixReference()}
for(id in holders){holder=holders[id];if(holder.finishSyncChildDirty){holder.finishSyncChildDirty()}}
Ext.referencesDirty=!1}},onAvailable:function(id,fn,scope){var me=this,callbacks=me.onAvailableCallbacks,all=me.all,item;if(id in all){item=all[id];fn.call(scope||item,item)}else if(id){if(!Ext.isArray(callbacks[id])){callbacks[id]=[]}
callbacks[id].push(function(item){fn.call(scope||item,item)})}},notifyAvailable:function(item){var callbacks=this.onAvailableCallbacks[item&&item.getId()]||[];while(callbacks.length){(callbacks.shift())(item)}},each:function(fn,scope){Ext.Object.each(this.all,fn,scope)},getCount:function(){return this.count},getAll:function(){return Ext.Object.getValues(this.all)},getActiveComponent:function(){return Ext.Component.from(Ext.dom.Element.getActiveElement())},onGlobalFocus:function(info){var me=this,event=info.event.chain(),infoCopy=Ext.applyIf({event:event},info),to,from,ancestor,target;to=event.toComponent=infoCopy.toComponent=Ext.Component.from(info.toElement);from=event.fromComponent=infoCopy.fromComponent=Ext.Component.from(info.fromElement);ancestor=me.getCommonAncestor(from,to);if(to!==from){if(from&&!from.destroyed&&!from.isDestructing()){if(from.handleBlurEvent){from.handleBlurEvent(infoCopy)}
for(target=from;target&&target!==ancestor;target=target.getRefOwner()){if(!(target.destroyed||target.destroying)){event.type='focusleave';target.onFocusLeave(event)}}}
if(to&&!to.destroyed&&!to.isDestructing()){if(to.handleFocusEvent){to.handleFocusEvent(infoCopy)}
for(target=to;target&&target!==ancestor;target=target.getRefOwner()){event.type='focusenter';target.onFocusEnter(event)}}}
for(target=ancestor;target;target=target.getRefOwner()){if(!(target.destroying||target.destroyed)){target.onFocusMove(infoCopy)}}},getCommonAncestor:function(compA,compB){if(compA===compB){return compA}
while(compA&&!(compA.isAncestor(compB)||compA===compB)){compA=compA.getRefOwner()}
return compA},privates:{doHandleDocumentMouseDown:function(e){var floatedSelector=Ext.Widget.prototype.floatedSelector,targetFloated;if(floatedSelector){targetFloated=Ext.Component.from(e.getTarget(floatedSelector,Ext.getBody()));if(targetFloated){targetFloated.toFront(!0)}}},installFocusListener:function(){var me=this;Ext.on('focus',me.onGlobalFocus,me);me.hasFocusListener=!0},clearAll:function(){var me=this;me.all={};me.byInstanceId={};me.holders={};me.onAvailableCallbacks={}},from:function(el,limit,selector){var cache=this.all,depth=0,target,topmost,cmpId,cmp;if(el&&el.isEvent){el=el.target}
target=Ext.getDom(el);if(typeof limit!=='number'){topmost=Ext.getDom(limit);limit=Number.MAX_VALUE}
while(target&&target.nodeType===1&&depth<limit&&target!==topmost){cmpId=target.getAttribute('data-componentid')||target.id;if(cmpId){cmp=cache[cmpId];if(cmp&&(!selector||Ext.ComponentQuery.is(cmp,selector))){return cmp}
depth++}
target=target.parentNode}
return null}}},function(ComponentManager){ComponentManager.fromElement=ComponentManager.from;Ext.referencesDirty=!1;Ext.fixReferences=function(){ComponentManager.fixReferences()};Ext.markReferencesDirty=function(){ComponentManager.markReferencesDirty()};Ext.getCmp=function(id){return ComponentManager.get(id)};Ext.iidToCmp=function(iid){return ComponentManager.byInstanceId[iid]||null};Ext.doEv=function(node,e){var cmp,method,event;cmp=Ext.Component.from(e.target);if(cmp&&!cmp.destroying&&!cmp.destroyed&&cmp.getEventHandlers){method=cmp.getEventHandlers()[e.type];if(method&&cmp[method]){event=new Ext.event.Event(e);return cmp[method](event)}}
return!0}})
;
Ext.ns('Ext.util').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}}
;
Ext.define('Ext.util.LruCache',{extend:'Ext.util.HashMap',config:{maxSize:null},add:function(key,newValue){var me=this,entry,last;me.removeAtKey(key);last=me.last;entry={prev:last,next:null,key:key,value:newValue};if(last){last.next=entry}else{me.first=entry}
me.last=entry;me.callParent([key,entry]);me.prune();return newValue},insertBefore:function(key,newValue,sibling){var me=this,existingKey,entry;if(sibling=this.map[this.findKey(sibling)]){existingKey=me.findKey(newValue);if(existingKey){me.unlinkEntry(entry=me.map[existingKey])}else{entry={prev:sibling.prev,next:sibling,key:key,value:newValue}}
if(sibling.prev){entry.prev.next=entry}else{me.first=entry}
entry.next=sibling;sibling.prev=entry;me.prune();return newValue}else{return me.add(key,newValue)}},get:function(key){var entry=this.map[key];if(entry){if(entry.next){this.moveToEnd(entry)}
return entry.value}},removeAtKey:function(key){this.unlinkEntry(this.map[key]);return this.callParent(arguments)},clear:function(initial){this.first=this.last=null;return this.callParent([initial])},unlinkEntry:function(entry){if(entry){if(entry.next){entry.next.prev=entry.prev}else{this.last=entry.prev}
if(entry.prev){entry.prev.next=entry.next}else{this.first=entry.next}
entry.prev=entry.next=null}},moveToEnd:function(entry){this.unlinkEntry(entry);if(entry.prev=this.last){this.last.next=entry}else{this.first=entry}
this.last=entry},getArray:function(isKey){var arr=[],entry=this.first;while(entry){arr.push(isKey?entry.key:entry.value);entry=entry.next}
return arr},each:function(fn,scope,reverse){var me=this,entry=reverse?me.last:me.first,length=me.length;scope=scope||me;while(entry){if(fn.call(scope,entry.key,entry.value,length)===!1){break}
entry=reverse?entry.prev:entry.next}
return me},findKey:function(value){var key,map=this.map;for(key in map){if(map.hasOwnProperty(key)&&map[key].value===value){return key}}
return undefined},clone:function(){var newCache=new this.self(this.initialConfig),map=this.map,key;newCache.suspendEvents();for(key in map){if(map.hasOwnProperty(key)){newCache.add(key,map[key].value)}}
newCache.resumeEvents();return newCache},prune:function(){var me=this,max=me.getMaxSize(),purgeCount=max?(me.length-max):0;if(purgeCount>0){for(;me.first&&purgeCount;purgeCount--){me.removeAtKey(me.first.key)}}}})
;
Ext.define('Ext.ComponentQuery',{singleton:!0,requires:['Ext.ComponentManager','Ext.util.Operators','Ext.util.LruCache']},function(){var cq=this,queryOperators=Ext.util.Operators,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,stripLeadingSpaceRe=/^(\s)+/,unescapeRe=/\\(.)/g,regexCache=new Ext.util.LruCache({maxSize:100}),filterFnPattern=['var r = [],','i = 0,','it = items,','l = it.length,','c;','for (; i < l; i++) {','c = it[i];','if (c.{0}) {','r.push(c);','}','}','return r;'].join(''),filterItems=function(items,operation){return operation.method.apply(this,[items].concat(operation.args))},getItems=function(items,mode){var result=[],i=0,length=items.length,candidate,deep=mode!=='>';for(;i<length;i++){candidate=items[i];if(candidate.getRefItems){result=result.concat(candidate.getRefItems(deep))}}
return result},getAncestors=function(items){var result=[],i=0,length=items.length,candidate;for(;i<length;i++){candidate=items[i];while(!!(candidate=candidate.getRefOwner())){result.push(candidate)}}
return result},filterByXType=function(items,xtype,shallow){if(xtype==='*'){return items.slice()}else{var result=[],i=0,length=items.length,candidate;for(;i<length;i++){candidate=items[i];if(!candidate.destroyed&&candidate.isXType(xtype,shallow)){result.push(candidate)}}
return result}},filterByAttribute=function(items,property,operator,compareTo){var result=[],length=items.length,mustBeOwnProperty,presenceOnly,candidate,propValue,config,i,j,propLen;if(property.charAt(0)==='@'){mustBeOwnProperty=!0;property=property.substr(1)}
if(property.charAt(0)==='?'){mustBeOwnProperty=!0;presenceOnly=!0;property=property.substr(1)}
for(i=0;i<length;i++){candidate=items[i];config=candidate.self&&candidate.self.getConfigurator&&candidate.self.$config.configs[property];if(config){propValue=candidate[config.names.get]()}else if(mustBeOwnProperty&&!candidate.hasOwnProperty(property)){continue}else{propValue=candidate[property]}
if(presenceOnly){result.push(candidate)}else if(operator==='~='){if(propValue){if(!Ext.isArray(propValue)){propValue=propValue.split(' ')}
for(j=0,propLen=propValue.length;j<propLen;j++){if(queryOperators[operator](Ext.coerce(propValue[j],compareTo),compareTo)){result.push(candidate);break}}}}else if(operator==='/='){if(propValue!=null&&compareTo.test(propValue)){result.push(candidate)}}else if(!compareTo?!!propValue:queryOperators[operator](Ext.coerce(propValue,compareTo),compareTo)){result.push(candidate)}}
return result},filterById=function(items,id,idOnly){var result=[],i=0,length=items.length,candidate,check;for(;i<length;i++){candidate=items[i];check=idOnly?candidate.id:candidate.getItemId();if(check===id){result.push(candidate)}}
return result},filterByPseudo=function(items,name,value){return cq.pseudos[name](items,value)},modeRe=/^(\s?([>\^])\s?|\s|$)/,tokenRe=/^(#)?((?:\\\.|[\w\-])+|\*)(?:\((true|false)\))?/,matchers=[{re:/^\.((?:\\\.|[\w\-])+)(?:\((true|false)\))?/,method:filterByXType,argTransform:function(args){var selector=args[0];Ext.log.warn('"'+selector+'" ComponentQuery selector style is deprecated,'+' use "'+selector.replace(/^\./,'')+'" without the leading dot instead');if(args[1]!==undefined){args[1]=args[1].replace(unescapeRe,'$1')}
return args.slice(1)}},{re:/^(?:\[((?:[@?$])?[\w\-]*)\s*(?:([\^$*~%!\/]?=)\s*(['"])?((?:\\\]|.)*?)\3)?(?!\\)\])/,method:filterByAttribute,argTransform:function(args){var selector=args[0],property=args[1],operator=args[2],compareTo=args[4],compareRe;if(compareTo!==undefined){compareTo=compareTo.replace(unescapeRe,'$1');var format=Ext.String.format,msg="ComponentQuery selector '{0}' has an unescaped ({1}) character "+"at the {2} of the attribute value pattern. Usually that indicates "+"an error where the opening quote is not followed by the closing "+"quote. If you need to match a ({1}) character at the {2} of the "+"attribute value, escape the quote character in your pattern: "+"(\\{1})",match;if(match=/^(['"]).*?[^'"]$/.exec(compareTo)){Ext.log.warn(format(msg,selector,match[1],'beginning'))}else if(match=/^[^'"].*?(['"])$/.exec(compareTo)){Ext.log.warn(format(msg,selector,match[1],'end'))}}
if(operator==='/='){compareRe=regexCache.get(compareTo);if(compareRe){compareTo=compareRe}else{compareTo=regexCache.add(compareTo,new RegExp(compareTo))}}
return[property,operator,compareTo]}},{re:/^#((?:\\\.|[\w\-])+)/,method:filterById},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:filterByPseudo,argTransform:function(args){if(args[2]!==undefined){args[2]=args[2].replace(unescapeRe,'$1')}
return args.slice(1)}},{re:/^(?:\{([^\}]+)\})/,method:filterFnPattern}];cq.Query=Ext.extend(Object,{constructor:function(cfg){cfg=cfg||{};Ext.apply(this,cfg)},execute:function(root){var operations=this.operations,result=[],op,i,len;for(i=0,len=operations.length;i<len;i++){op=operations[i];result=result.concat(this._execute(root,op))}
return result},_execute:function(root,operations){var i=0,length=operations.length,operation,workingItems;if(!root){workingItems=Ext.ComponentManager.getAll()}else if(Ext.isIterable(root)){workingItems=root}else if(root.isMixedCollection){workingItems=root.items}
for(;i<length;i++){operation=operations[i];if(operation.mode==='^'){workingItems=getAncestors(workingItems||[root])}else if(operation.mode){workingItems=getItems(workingItems||[root],operation.mode)}else{workingItems=filterItems(workingItems||getItems([root]),operation)}
if(i===length-1){return workingItems}}
return[]},is:function(component,root){var operations=this.operations,result=!1,len=operations.length,op,i;if(len===0){return!0}
for(i=0;i<len;i++){op=operations[i];result=this._is(component,root,op);if(result){return result}}
return!1},_is:function(component,root,operations){var len=operations.length,active=[component],operation,i,j,mode,items,item;for(i=len-1;i>=0;--i){operation=operations[i];mode=operation.mode;if(mode){if(mode==='^'){active=getItems(active,' ')}else if(mode==='>'){items=[];for(j=0,len=active.length;j<len;++j){item=active[j].getRefOwner();if(item){items.push(item)}}
active=items}else{active=getAncestors(active)}}else{active=filterItems(active,operation)}
if(active.length===0){return!1}}
if(root){if(!mode){active=getAncestors(active)}
if(active.length>0){active=filterItems(active,{method:filterById,args:[root.id,!0]})}
if(active.length===0){return!1}}
return!0},getMatches:function(components,operations){var len=operations.length,i;for(i=0;i<len;++i){components=filterItems(components,operations[i]);if(components.length===0){break}}
return components},isMultiMatch:function(){return this.operations.length>1}});Ext.apply(cq,{cache:new Ext.util.LruCache({maxSize:100}),pseudos:{not:function(components,selector){var i=0,length=components.length,results=[],index=-1,component;for(;i<length;++i){component=components[i];if(!cq.is(component,selector)){results[++index]=component}}
return results},first:function(components){var ret=[];if(components.length>0){ret.push(components[0])}
return ret},last:function(components){var len=components.length,ret=[];if(len>0){ret.push(components[len-1])}
return ret},focusable:function(cmps){var len=cmps.length,results=[],i=0,c;for(;i<len;i++){c=cmps[i];if(c.isFocusable&&c.isFocusable()){results.push(c)}}
return results},canfocus:function(cmps,value){var len=cmps.length,results=[],i=0,c;for(;i<len;i++){c=cmps[i];if(c.canFocus&&c.canFocus(!1,value)){results.push(c)}}
return results},"nth-child":function(c,a){var result=[],m,f,i,len,n,nodeIndex;m=nthRe.exec(a==="even"&&"2n"||a==="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);f=(m[1]||1)-0;len=m[2]-0;for(i=0;n=c[i];i++){nodeIndex=i+1;if(f===1){if(len===0||nodeIndex===len){result.push(n)}}else if((nodeIndex+len)%f===0){result.push(n)}}
return result},scrollable:function(cmps){var len=cmps.length,results=[],i=0,c;for(;i<len;i++){c=cmps[i];if(c.scrollable||c._scrollable){results.push(c)}}
return results},visible:function(cmps,deep){var len=cmps.length,results=[],i=0,c;deep=deep==='true';for(;i<len;i++){c=cmps[i];if(c.isVisible(deep)){results.push(c)}}
return results}},query:function(selector,root){if(!selector){return Ext.ComponentManager.getAll()}
var results=[],noDupResults=[],dupMatcher={},query=cq.cache.get(selector),resultsLn,cmp,i;if(!query){query=cq.cache.add(selector,cq.parse(selector))}
results=query.execute(root);if(query.isMultiMatch()){resultsLn=results.length;for(i=0;i<resultsLn;i++){cmp=results[i];if(!dupMatcher[cmp.id]){noDupResults.push(cmp);dupMatcher[cmp.id]=!0}}
results=noDupResults}
return results},visitPreOrder:function(selector,root,fn,scope,extraArgs){cq._visit(!0,selector,root,fn,scope,extraArgs)},visitPostOrder:function(selector,root,fn,scope,extraArgs){cq._visit(!1,selector,root,fn,scope,extraArgs)},_visit:function(preOrder,selector,root,fn,scope,extraArgs){var query=cq.cache.get(selector),callArgs=[root],children,len=0,i,rootMatch;if(!query){query=cq.cache.add(selector,cq.parse(selector))}
rootMatch=query.is(root);if(root.getRefItems){children=root.getRefItems();len=children.length}
if(extraArgs){Ext.Array.push(callArgs,extraArgs)}
if(preOrder){if(rootMatch){if(fn.apply(scope||root,callArgs)===!1){return!1}}}
for(i=0;i<len;i++){if(cq._visit.call(cq,preOrder,selector,children[i],fn,scope,extraArgs)===!1){return!1}}
if(!preOrder){if(rootMatch){if(fn.apply(scope||root,callArgs)===!1){return!1}}}},is:function(component,selector,root){var query;if(!selector){return!0}
if(typeof selector==='function'){return selector(component)}else{query=cq.cache.get(selector);if(!query){query=cq.cache.add(selector,cq.parse(selector))}
return query.is(component,root)}},parse:function(selector){var operations=[],selectors,sel,i,len;selectors=Ext.splitAndUnescape(selector,',');for(i=0,len=selectors.length;i<len;i++){sel=Ext.String.trim(selectors[i]);if(sel===''){Ext.raise('Invalid ComponentQuery selector: ""')}
operations.push(cq._parse(sel))}
return new cq.Query({operations:operations})},_parse:function(selector){var operations=[],trim=Ext.String.trim,length=matchers.length,lastSelector,tokenMatch,token,matchedChar,modeMatch,selectorMatch,transform,i,matcher,method,args;while(selector&&lastSelector!==selector){lastSelector=selector;tokenMatch=selector.match(tokenRe);if(tokenMatch){matchedChar=tokenMatch[1];token=trim(tokenMatch[2]).replace(unescapeRe,'$1');if(matchedChar==='#'){operations.push({method:filterById,args:[token]})}else{operations.push({method:filterByXType,args:[token,Boolean(tokenMatch[3])]})}
selector=selector.replace(tokenMatch[0],'').replace(stripLeadingSpaceRe,'$1')}
while(!(modeMatch=selector.match(modeRe))){for(i=0;selector&&i<length;i++){matcher=matchers[i];selectorMatch=selector.match(matcher.re);method=matcher.method;transform=matcher.argTransform;if(selectorMatch){if(transform){args=transform(selectorMatch)}else{args=selectorMatch.slice(1)}
operations.push({method:Ext.isString(matcher.method)?Ext.functionFactory('items',Ext.String.format.apply(Ext.String,[method].concat(selectorMatch.slice(1)))):matcher.method,args:args});selector=selector.replace(selectorMatch[0],'').replace(stripLeadingSpaceRe,'$1');break}
if(i===(length-1)){Ext.raise('Invalid ComponentQuery selector: "'+arguments[0]+'"')}}}
if(modeMatch[1]){operations.push({mode:modeMatch[2]||modeMatch[1]});selector=selector.replace(modeMatch[0],'').replace(stripLeadingSpaceRe,'')}}
return operations}});Ext.all=function(){return cq.query.apply(cq,arguments)};Ext.first=function(){var matches=cq.query.apply(cq,arguments);return(matches&&matches[0])||null}})
;
Ext.define('Ext.Evented',{alternateClassName:'Ext.EventedBase',mixins:['Ext.mixin.Observable'],initialized:!1,constructor:function(config){this.callParent();this.mixins.observable.constructor.call(this,config);this.initialized=!0},onClassExtended:function(cls,data){if(!data.hasOwnProperty('eventedConfig')){return}
var config=data.config,eventedConfig=data.eventedConfig,name,cfg;if(config){Ext.applyIf(config,eventedConfig)}else{cls.addConfig(eventedConfig)}
for(name in eventedConfig){if(eventedConfig.hasOwnProperty(name)){cfg=Ext.Config.get(name);data[cfg.names.set]=cfg.eventedSetter||cfg.getEventedSetter()}}}})
;
Ext.define('Ext.util.Positionable',{mixinId:'positionable',_positionTopLeft:['position','top','left'],clippedCls:Ext.baseCSSPrefix+'clipped',afterSetPosition:Ext.emptyFn,getAnchorToXY:function(){Ext.raise("getAnchorToXY is not implemented in "+this.$className)},getBorderPadding:function(){Ext.raise("getBorderPadding is not implemented in "+this.$className)},getLocalX:function(){Ext.raise("getLocalX is not implemented in "+this.$className)},getLocalXY:function(){Ext.raise("getLocalXY is not implemented in "+this.$className)},getLocalY:function(){Ext.raise("getLocalY is not implemented in "+this.$className)},getX:function(){Ext.raise("getX is not implemented in "+this.$className)},getXY:function(){Ext.raise("getXY is not implemented in "+this.$className)},getY:function(){Ext.raise("getY is not implemented in "+this.$className)},setLocalX:function(){Ext.raise("setLocalX is not implemented in "+this.$className)},setLocalXY:function(){Ext.raise("setLocalXY is not implemented in "+this.$className)},setLocalY:function(){Ext.raise("setLocalY is not implemented in "+this.$className)},setX:function(){Ext.raise("setX is not implemented in "+this.$className)},setXY:function(){Ext.raise("setXY is not implemented in "+this.$className)},setY:function(){Ext.raise("setY is not implemented in "+this.$className)},adjustForConstraints:function(xy,parent){var vector=this.getConstrainVector(parent,xy);if(vector){xy[0]+=vector[0];xy[1]+=vector[1]}
return xy},alignTo:function(element,position,offsets,animate){var me=this,el=me.el;return me.setXY(me.getAlignToXY(element,position,offsets),el.anim&&!!animate?el.anim(animate):!1)},calculateAnchorXY:function(anchor,extraX,extraY,size){var region=this.getRegion();region.setPosition(0,0);region.translateBy(extraX||0,extraY||0);if(size){region.setWidth(size.width);region.setHeight(size.height)}
return region.getAnchorPoint(anchor)},convertPositionSpec:function(posSpec){return Ext.util.Region.getAlignInfo(posSpec)},getAlignToXY:function(alignToEl,position,offsets){var newRegion=this.getAlignToRegion(alignToEl,position,offsets);return[newRegion.x,newRegion.y]},getAlignToRegion:function(alignToEl,posSpec,offset,minHeight){var me=this,inside,newRegion,bodyScroll;alignToEl=Ext.fly(alignToEl.el||alignToEl);if(!alignToEl||!alignToEl.dom){Ext.raise({sourceClass:'Ext.util.Positionable',sourceMethod:'getAlignToXY',msg:'Attempted to align an element that doesn\'t exist'})}
posSpec=me.convertPositionSpec(posSpec);if(posSpec.constrain){if(posSpec.constrain==='!'){inside=alignToEl}else{inside=me.constrainTo||me.container||me.el.parent()}
inside=Ext.fly(inside.el||inside).getConstrainRegion()}
if(alignToEl===Ext.getBody()){bodyScroll=alignToEl.getScroll();offset=[bodyScroll.left,bodyScroll.top]}
newRegion=me.getRegion().alignTo({target:alignToEl.getRegion(),inside:inside,minHeight:minHeight,offset:offset,align:posSpec,axisLock:!0});return newRegion},getAnchorXY:function(anchor,local,size){var me=this,region=me.getRegion(),el=me.el,isViewport=el.dom.nodeName==='BODY'||el.dom.nodeType===9,scroll=el.getScroll();if(local){region.setPosition(0,0)}else if(isViewport){region.setPosition(scroll.left,scroll.top)}
if(size){region.setWidth(size.width);region.setHeight(size.height)}
return region.getAnchorPoint(anchor)},getBox:function(contentBox,local){var me=this,xy=local?me.getLocalXY():me.getXY(),x=xy[0],y=xy[1],w,h,borderPadding,beforeX,beforeY;if(me.el.dom.nodeName==='BODY'||me.el.dom.nodeType===9){w=Ext.Element.getViewportWidth();h=Ext.Element.getViewportHeight()}else{w=me.getWidth();h=me.getHeight()}
if(contentBox){borderPadding=me.getBorderPadding();beforeX=borderPadding.beforeX;beforeY=borderPadding.beforeY;x+=beforeX;y+=beforeY;w-=(beforeX+borderPadding.afterX);h-=(beforeY+borderPadding.afterY)}
return{x:x,left:x,0:x,y:y,top:y,1:y,width:w,height:h,right:x+w,bottom:y+h}},calculateConstrainedPosition:function(constrainTo,proposedPosition,local,proposedSize){var me=this,vector,fp=me.floatParent,parentNode=fp?fp.getTargetEl():null,parentOffset,borderPadding,proposedConstrainPosition,xy=!1;if(local&&fp){parentOffset=parentNode.getXY();borderPadding=parentNode.getBorderPadding();parentOffset[0]+=borderPadding.beforeX;parentOffset[1]+=borderPadding.beforeY;if(proposedPosition){proposedConstrainPosition=[proposedPosition[0]+parentOffset[0],proposedPosition[1]+parentOffset[1]]}}else{proposedConstrainPosition=proposedPosition}
constrainTo=constrainTo||me.constrainTo||parentNode||me.container||me.el.parent();if(local&&proposedConstrainPosition){proposedConstrainPosition=me.reverseTranslateXY(proposedConstrainPosition)}
vector=((me.constrainHeader&&me.header.rendered)?me.header:me).getConstrainVector(constrainTo,proposedConstrainPosition,proposedSize);if(vector){xy=proposedPosition||me.getPosition(local);xy[0]+=vector[0];xy[1]+=vector[1]}
return xy},getConstrainRegion:function(){var me=this,el=me.el,isBody=el.dom.nodeName==='BODY',dom=el.dom,borders=el.getBorders(),pos=el.getXY(),left=pos[0]+borders.beforeX,top=pos[1]+borders.beforeY,scroll,width,height;if(isBody){scroll=el.getScroll();left=scroll.left;top=scroll.top;width=Ext.Element.getViewportWidth();height=Ext.Element.getViewportHeight()}else{width=dom.clientWidth;height=dom.clientHeight}
return new Ext.util.Region(top,left+width,top+height,left)},getConstrainVector:function(constrainTo,proposedPosition,proposedSize){var me=this,thisRegion=me.getRegion(),vector=[0,0],shadowSize=(me.shadow&&me.constrainShadow&&!me.shadowDisabled)?me.el.shadow.getShadowSize():undefined,overflowed=!1,constraintInsets=me.constraintInsets;if(!(constrainTo instanceof Ext.util.Region)){constrainTo=Ext.get(constrainTo.el||constrainTo);constrainTo=constrainTo.getConstrainRegion()}
if(constraintInsets){constraintInsets=Ext.isObject(constraintInsets)?constraintInsets:Ext.Element.parseBox(constraintInsets);constrainTo.adjust(constraintInsets.top,constraintInsets.right,constraintInsets.bottom,constraintInsets.left)}
if(proposedPosition){thisRegion.translateBy(proposedPosition[0]-thisRegion.x,proposedPosition[1]-thisRegion.y)}
if(proposedSize){thisRegion.right=thisRegion.left+proposedSize[0];thisRegion.bottom=thisRegion.top+proposedSize[1]}
if(shadowSize){constrainTo.adjust(shadowSize[0],-shadowSize[1],-shadowSize[2],shadowSize[3])}
if(thisRegion.right>constrainTo.right){overflowed=!0;vector[0]=(constrainTo.right-thisRegion.right)}
if(thisRegion.left+vector[0]<constrainTo.left){overflowed=!0;vector[0]=(constrainTo.left-thisRegion.left)}
if(thisRegion.bottom>constrainTo.bottom){overflowed=!0;vector[1]=(constrainTo.bottom-thisRegion.bottom)}
if(thisRegion.top+vector[1]<constrainTo.top){overflowed=!0;vector[1]=(constrainTo.top-thisRegion.top)}
return overflowed?vector:!1},getOffsetsTo:function(offsetsTo){var o=this.getXY(),e=offsetsTo.isRegion?[offsetsTo.x,offsetsTo.y]:Ext.fly(offsetsTo.el||offsetsTo).getXY();return[o[0]-e[0],o[1]-e[1]]},getRegion:function(contentBox,local){var box=this.getBox(contentBox,local);return new Ext.util.Region(box.top,box.right,box.bottom,box.left)},getClientRegion:function(){var me=this,el=me.el,dom=el.dom,viewContentBox=me.getBox(!0),scrollbarHeight=dom.offsetHeight>dom.clientHeight,scrollbarWidth=dom.offsetWidth>dom.clientWidth,padding,scrollSize,isRTL;if(scrollbarHeight||scrollbarWidth){scrollSize=Ext.getScrollbarSize();if(scrollbarWidth){scrollbarWidth=scrollSize.width;isRTL=el.getStyle('direction')==='rtl'&&!Ext.supports.rtlVertScrollbarOnRight;if(isRTL){padding=el.getPadding('l');viewContentBox.left-=padding+Math.max(padding,scrollbarWidth)}else{padding=el.getPadding('r');viewContentBox.right+=padding-Math.max(padding,scrollbarWidth)}}
if(scrollbarHeight){scrollbarHeight=scrollSize.height;padding=el.getPadding('b');viewContentBox.bottom+=padding-Math.max(padding,scrollbarHeight)}}
return new Ext.util.Region(viewContentBox.top,viewContentBox.right,viewContentBox.bottom,viewContentBox.left)},getViewRegion:function(){var me=this,el=me.el,isBody=el.dom.nodeName==='BODY',borderPadding,scroll,pos,top,left,width,height;if(isBody){scroll=el.getScroll();left=scroll.left;top=scroll.top;width=Ext.Element.getViewportWidth();height=Ext.Element.getViewportHeight()}else{borderPadding=me.getBorderPadding();pos=me.getXY();left=pos[0]+borderPadding.beforeX;top=pos[1]+borderPadding.beforeY;width=me.getWidth(!0);height=me.getHeight(!0)}
return new Ext.util.Region(top,left+width,top+height,left)},move:function(direction,distance,animate){var me=this,xy=me.getXY(),x=xy[0],y=xy[1],left=[x-distance,y],right=[x+distance,y],top=[x,y-distance],bottom=[x,y+distance],hash={l:left,left:left,r:right,right:right,t:top,top:top,up:top,b:bottom,bottom:bottom,down:bottom};direction=direction.toLowerCase();me.setXY([hash[direction][0],hash[direction][1]],animate)},setBox:function(box){var me=this,x,y;if(box.isRegion){box={x:box.left,y:box.top,width:box.right-box.left,height:box.bottom-box.top}}
me.constrainBox(box);x=box.x;y=box.y;me.setXY([x,y]);me.setSize(box.width,box.height);me.afterSetPosition(x,y);return me},constrainBox:function(box){var me=this,constrainedPos,x,y;if(me.constrain||me.constrainHeader){x=('x' in box)?box.x:box.left;y=('y' in box)?box.y:box.top;constrainedPos=me.calculateConstrainedPosition(null,[x,y],!1,[box.width,box.height]);if(constrainedPos){box.x=constrainedPos[0];box.y=constrainedPos[1]}}},translatePoints:function(x,y){var pos=this.translateXY(x,y);return{left:pos.x,top:pos.y}},translateXY:function(x,y){var me=this,el=me.el,styles=el.getStyle(me._positionTopLeft),relative=styles.position==='relative',left=parseFloat(styles.left),top=parseFloat(styles.top),xy=me.getXY();if(Ext.isArray(x)){y=x[1];x=x[0]}
if(isNaN(left)){left=relative?0:el.dom.offsetLeft}
if(isNaN(top)){top=relative?0:el.dom.offsetTop}
left=(typeof x==='number')?x-xy[0]+left:undefined;top=(typeof y==='number')?y-xy[1]+top:undefined;return{x:left,y:top}},reverseTranslateXY:function(xy){var coords=xy,el=this.el,dom=el.dom,offsetParent=dom.offsetParent,relative,offsetParentXY,x,y;if(offsetParent){relative=el.isStyle('position','relative');offsetParentXY=Ext.fly(offsetParent).getXY();x=xy[0]+offsetParentXY[0]+offsetParent.clientLeft;y=xy[1]+offsetParentXY[1]+offsetParent.clientTop;if(relative){x+=el.getPadding('l');y+=el.getPadding('t')}
coords=[x,y]}
return coords},privates:{clipTo:function(clippingEl,sides){var clippingRegion,el=this.el,floaterRegion=el.getRegion(),overflow,i,clipValues=[],clippedCls=this.clippedCls,clipStyle,clipped,shadow;if(clippingEl.isRegion){clippingRegion=clippingEl}else{clippingRegion=(clippingEl.isComponent?clippingEl.el:Ext.fly(clippingEl)).getConstrainRegion()}
if(!sides){sides=15}
if(sides&1&&(overflow=clippingRegion.top-floaterRegion.top)>0){clipValues[0]=overflow;clipped=!0}else{clipValues[0]=-10000}
if(sides&2&&(overflow=floaterRegion.right-clippingRegion.right)>0){clipValues[1]=Math.max(0,el.getWidth()-overflow);clipped=!0}else{clipValues[1]=10000}
if(sides&4&&(overflow=floaterRegion.bottom-clippingRegion.bottom)>0){clipValues[2]=Math.max(0,el.getHeight()-overflow);clipped=!0}else{clipValues[2]=10000}
if(sides&8&&(overflow=clippingRegion.left-floaterRegion.left)>0){clipValues[3]=overflow;clipped=!0}else{clipValues[3]=-10000}
clipStyle='rect(';for(i=0;i<4;++i){clipStyle+=Ext.Element.addUnits(clipValues[i],'px');clipStyle+=(i===3)?')':','}
el.dom.style.clip=clipStyle;el.addCls(clippedCls);if((shadow=el.shadow)&&(el=shadow.el)&&el.dom){clipValues[2]-=shadow.offsets.y;clipValues[3]-=shadow.offsets.x;clipStyle='rect(';for(i=0;i<4;++i){clipStyle+=Ext.Element.addUnits(clipValues[i],'px');clipStyle+=(i===3)?')':','}
el.dom.style.clip=clipStyle;if(clipped&&!Ext.supports.CSS3BoxShadow){el.dom.style.display='none'}else{el.dom.style.display='';el.addCls(clippedCls)}}},clearClip:function(){var el=this.el,clippedCls=this.clippedCls;el.dom.style.clip=Ext.isIE8?'auto':'';el.removeCls(clippedCls);if(el.shadow&&el.shadow.el&&el.shadow.el.dom){el.shadow.el.dom.style.clip=Ext.isIE8?'auto':'';if(!Ext.supports.CSS3BoxShadow){el.dom.style.display='';el.removeCls(clippedCls)}}}}})
;
Ext.define('Ext.overrides.util.Positionable',{override:'Ext.util.Positionable',anchorTo:function(anchorToEl,alignment,offsets,animate,monitorScroll,callback){var me=this,scroll=!Ext.isEmpty(monitorScroll),action=function(){me.mixins.positionable.alignTo.call(me,anchorToEl,alignment,offsets,animate);Ext.callback(callback,me)},anchor=me.getAnchor();me.removeAnchor();Ext.apply(anchor,{fn:action,scroll:scroll});Ext.on('resize',action,null);if(scroll){Ext.getWin().on('scroll',action,null,{buffer:!isNaN(monitorScroll)?monitorScroll:50})}
action();return me},getAnchor:function(){var el=this.el,data,anchor;if(!el||!el.dom){return}
data=el.getData();anchor=data._anchor;if(!anchor){anchor=data._anchor={}}
return anchor},alignTo:function(element,position,offsets,animate){var me=this,el=me.el,newMaxHeight,newRegion;if(me.isComponent&&me.getSizeModel().height.shrinkWrap){if(me.maxHeight){me.setMaxHeight(null)}
newMaxHeight=!0}
newRegion=me.getAlignToRegion(element,position,offsets,me.minHeight||150);me.setXY([newRegion.x,newRegion.y],el.anim&&!!animate?el.anim(animate):!1);if(newMaxHeight&&(newMaxHeight=newRegion.getHeight())!==me.getHeight()){me.setMaxHeight(newMaxHeight)}
return me},removeAnchor:function(){var anchor=this.getAnchor();if(anchor&&anchor.fn){Ext.un('resize',anchor.fn);if(anchor.scroll){Ext.getWin().on('scroll',anchor.fn)}
delete anchor.fn}
return this},setBox:function(box,animate){var me=this;if(box.isRegion){box={x:box.left,y:box.top,width:box.right-box.left,height:box.bottom-box.top}}
if(animate){me.constrainBox(box);me.animate(Ext.applyIf({to:box,listeners:{afteranimate:Ext.Function.bind(me.afterSetPosition,me,[box.x,box.y])}},animate))}else{me.callParent([box])}
return me}})
;
Ext.define('Ext.dom.UnderlayPool',{constructor:function(elementConfig){this.elementConfig=elementConfig;this.cache=[]},checkOut:function(){var el=this.cache.shift();if(!el){el=Ext.Element.create(this.elementConfig);el.setVisibilityMode(2);el.dom.setAttribute('data-sticky',!0)}
return el},checkIn:function(el){this.cache.push(el);Ext.getDetachedBody().dom.appendChild(el.dom)},reset:function(){var cache=this.cache,i=cache.length;while(i--){cache[i].destroy()}
this.cache=[]}})
;
Ext.define('Ext.dom.Underlay',{requires:['Ext.dom.UnderlayPool'],constructor:function(config){Ext.apply(this,config)},beforeShow:Ext.emptyFn,getInsertionTarget:function(){return this.target},getPool:function(){return this.pool||(this.self.prototype.pool=new Ext.dom.UnderlayPool(this.elementConfig))},hide:function(){var me=this,el=me.el;if(el){if(el.dom){el.hide();me.getPool().checkIn(el)}
me.el=null}
me.hidden=!0},realign:function(x,y,width,height){var me=this,el=me.el,target=me.target,offsets=me.offsets,max=Math.max;if(el){if(x==null){x=target.getX()}
if(y==null){y=target.getY()}
if(width==null){width=target.getWidth()}
if(height==null){height=target.getHeight()}
if(offsets){x=x+offsets.x;y=y+offsets.y;width=max(width+offsets.w,0);height=max(height+offsets.h,0)}
el.setXY([x,y]);el.setSize(width,height)}},setZIndex:function(zIndex){this.zIndex=zIndex;if(this.el){this.el.setStyle("z-index",zIndex)}},show:function(){var me=this,target=me.target,zIndex=me.zIndex,el=me.el,insertionTarget=me.getInsertionTarget().dom,dom;if(!el){el=me.el=me.getPool().checkOut()}
me.beforeShow();if(zIndex==null){zIndex=(parseInt(target.getStyle("z-index"),10))}
if(zIndex){el.setStyle("z-index",zIndex)}
el.setStyle('position',me.fixed?'fixed':'');dom=el.dom;if(dom.nextSibling!==insertionTarget){target.dom.parentNode.insertBefore(dom,insertionTarget)}
el.show();me.realign();me.hidden=!1}})
;
Ext.define('Ext.dom.Shadow',{extend:'Ext.dom.Underlay',alternateClassName:'Ext.Shadow',mode:'drop',offset:4,cls:Ext.baseCSSPrefix+(!Ext.supports.CSS3BoxShadow?'ie':'css')+'-shadow',constructor:function(config){var me=this,outerOffsets,offsets,offset,rad;me.callParent([config]);me.elementConfig={cls:me.cls,role:'presentation'};offset=me.offset;rad=Math.floor(offset/2);me.opacity=50;switch(me.mode.toLowerCase()){case "drop":outerOffsets={x:0,y:0,w:offset,h:offset};if(Ext.supports.CSS3BoxShadow){offsets={x:offset,y:offset,h:-offset,w:-offset}}else{offsets={x:-rad,y:-rad,h:-rad,w:-rad}}
break;case "sides":outerOffsets={x:-offset,y:0,w:offset*2,h:offset};if(Ext.supports.CSS3BoxShadow){offsets={x:0,y:offset,h:-offset,w:0}}else{offsets={x:1+rad-2*offset,y:-(1+rad),h:-1,w:rad-1}}
break;case "frame":outerOffsets={x:-offset,y:-offset,w:offset*2,h:offset*2};if(Ext.supports.CSS3BoxShadow){offsets={x:0,y:0,h:0,w:0}}else{offsets={x:1+rad-2*offset,y:1+rad-2*offset,h:offset-rad-1,w:offset-rad-1}}
break;case "bottom":outerOffsets={x:-offset,y:0,w:offset*2,h:offset};if(Ext.supports.CSS3BoxShadow){offsets={x:0,y:offset,h:-offset,w:0}}else{offsets={x:0,y:offset,h:0,w:0}}
break}
me.offsets=offsets;me.outerOffsets=outerOffsets},getShadowSize:function(){var me=this,offset=me.el?me.offset:0,result=[offset,offset,offset,offset],mode=me.mode.toLowerCase();if(me.el&&mode!=='frame'){result[0]=0;if(mode==='drop'){result[3]=0}}
return result},boxShadowProperty:(function(){var property='boxShadow',style=document.documentElement.style;if(!('boxShadow' in style)){if('WebkitBoxShadow' in style){property='WebkitBoxShadow'}else if('MozBoxShadow' in style){property='MozBoxShadow'}}
return property}()),beforeShow:function(){var me=this,style=me.el.dom.style,shim=me.shim;if(Ext.supports.CSS3BoxShadow){style[me.boxShadowProperty]='0 0 '+(me.offset+2)+'px #888'}else{style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+me.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(me.offset)+")"}
if(shim){shim.realign()}},setOpacity:function(opacity){var el=this.el;if(el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){opacity=Math.floor(opacity*100/2)/100}
this.opacity=opacity;el.setOpacity(opacity)}}})
;
Ext.define('Ext.dom.Shim',{extend:'Ext.dom.Underlay',cls:Ext.baseCSSPrefix+'shim',constructor:function(config){this.callParent([config]);this.elementConfig={tag:'iframe',cls:this.cls,role:'presentation',frameBorder:'0',src:Ext.SSL_SECURE_URL,tabindex:'-1'}},getInsertionTarget:function(){var shadow=this.shadow;return(shadow&&shadow.el)||this.target}})
;
Ext.define('Ext.dom.ElementEvent',{extend:'Ext.util.Event',addListener:function(fn,scope,options,caller,manager){var me=this,added=!1,name=me.name,isDirectEvent=Ext.event.publisher.Dom.instance.directEvents[name],captures,directs,directCaptures;options=options||{};if(options.delegated===!1||isDirectEvent){if(isDirectEvent&&options.delegate){options.capture=!0}
if(options.capture){directCaptures=me.directCaptures||(me.directCaptures=new Ext.util.Event(me.observable,name));added=directCaptures.addListener(fn,scope,options,caller,manager)}else{directs=me.directs||(me.directs=new Ext.util.Event(me.observable,name));added=directs.addListener(fn,scope,options,caller,manager)}}else if(options.capture){captures=me.captures||(me.captures=new Ext.util.Event(me.observable,name));added=captures.addListener(fn,scope,options,caller,manager)}else{added=me.callParent([fn,scope,options,caller,manager])}
return added},removeListener:function(fn,scope){var me=this,captures=me.captures,directs=me.directs,directCaptures=me.directCaptures,removed=!1,index=me.findListener(fn,scope);if(index!==-1){removed=me.callParent([fn,scope,index])}else{if(directs){index=directs.findListener(fn,scope)}
if(index!==-1){removed=directs.removeListener(fn,scope,index)}else{if(captures){index=captures.findListener(fn,scope)}
if(index!==-1){removed=captures.removeListener(fn,scope,index)}else if(directCaptures){index=directCaptures.findListener(fn,scope);if(index!==-1){removed=directCaptures.removeListener(fn,scope,index)}}}}
return removed},clearListeners:function(){var me=this,directCaptures=me.directCaptures,directs=me.directs,captures=me.captures;if(directCaptures){directCaptures.clearListeners()}
if(directs){directs.clearListeners()}
if(captures){captures.clearListeners()}
me.callParent()},suspend:function(){var me=this,directCaptures=me.directCaptures,directs=me.directs,captures=me.captures;if(directCaptures){directCaptures.suspend()}
if(directs){directs.suspend()}
if(captures){captures.suspend()}
me.callParent()},resume:function(){var me=this,directCaptures=me.directCaptures,directs=me.directs,captures=me.captures;if(directCaptures){directCaptures.resume()}
if(directs){directs.resume()}
if(captures){captures.resume()}
me.callParent()}})
;
Ext.define('Ext.event.publisher.Publisher',{isEventPublisher:!0,$vetoClearingPrototypeOnDestroy:!0,handledEvents:[],statics:{publishers:{},publishersByEvent:{}},constructor:function(){var me=this,type=me.type;me.handles={};if(!type){Ext.raise("Event publisher '"+me.$className+"' defined without a 'type' property.")}
if(me.self.instance){Ext.raise("Cannot create multiple instances of '"+me.$className+"'. "+"Use '"+me.$className+".instance' to retrieve the singleton instance.")}
me.registerEvents();Ext.event.publisher.Publisher.publishers[type]=me},registerEvents:function(events){var me=this,publishersByEvent=Ext.event.publisher.Publisher.publishersByEvent,handledEvents=events||me.handledEvents,ln=handledEvents.length,eventName,i;for(i=0;i<ln;i++){eventName=handledEvents[i];me.handles[eventName]=1;publishersByEvent[eventName]=me}},subscribe:function(){Ext.raise("Ext.event.publisher.Publisher subclass '"+this.$className+'" has no subscribe method.')},unsubscribe:function(){Ext.raise("Ext.event.publisher.Publisher subclass '"+this.$className+'" has no unsubscribe method.')},fire:function(element,eventName,args){var event;if(element.hasListeners[eventName]){event=element.events[eventName];if(event){event.fire.apply(event,args)}}}})
;
Ext.define('Ext.util.Offset',{statics:{fromObject:function(obj){if(obj instanceof this){return obj}
if(typeof obj==='number'){return new this(obj,obj)}
if(obj.length){return new this(obj[0],obj[1])}
return new this(obj.x,obj.y)}},constructor:function(x,y){this.x=(x!=null&&!isNaN(x))?x:0;this.y=(y!=null&&!isNaN(y))?y:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(p){this.x=p.x;this.y=p.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(offset){if(!(offset instanceof this.statics())){Ext.raise('Offset must be an instance of Ext.util.Offset')}
return(this.x===offset.x&&this.y===offset.y)},add:function(offset){if(!(offset instanceof this.statics())){Ext.raise('Offset must be an instance of Ext.util.Offset')}
this.x+=offset.x;this.y+=offset.y},round:function(to){var factor;if(!isNaN(to)){factor=Math.pow(10,to);this.x=Math.round(this.x*factor)/factor;this.y=Math.round(this.y*factor)/factor}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x===0&&this.y===0}})
;
Ext.define('Ext.util.Region',function(){var ExtUtil=Ext.util,constrainRe=/([^\?!]*)(!|\?)?$/,alignRe=/^(?:(?:([trbl])(\d+))|(tl|t|tc|tr|l|c|r|bl|b|bc|br))(?:-(?:(?:([trbl])(\d+))|(tl|t|tc|tr|l|c|r|bl|b|bc|br)))?$/i,LTROffsetFactors={l:0,r:100,t:0,b:100,c:50},RTLOffsetFactors={l:100,r:0,t:0,b:100,c:50},relativePositions={b:0,l:1,t:2,r:3},alignMap={"tl-tr":"l0-r0","tl-r":"l0-r50","bl-r":"l100-r50","bl-br":"l100-r100","tr-tl":"r0-l0","tr-l":"r0-l50","br-l":"r100-l50","br-bl":"r100-l100"},rtlAlignMap={"tl-tr":"r0-l0","tl-r":"r0-l50","bl-r":"r100-l50","bl-br":"r100-l100","tr-tl":"l0-r0","tr-l":"l0-r50","br-l":"l100-r50","br-bl":"l100-r100"},adjustParams=[],zeroOffset=new ExtUtil.Offset(0,0),parseRegion=function(box){var Region=ExtUtil.Region,type=typeof box,top,right,bottom,left;if(box==null){return Region.EMPTY}
if(box.isRegion){return box}
if(box.isElement||box.nodeType===1){return this.getRegion(box)}
if(type==='string'){box=box.split(' ');switch(box.length){case 1:box[1]=box[2]=box[3]=box[0];break;case 2:box[2]=box[0];box[3]=box[1];break;case 3:box[3]=box[1]}
top=parseInt(box[0],10)||0;right=parseInt(box[1],10)||0;bottom=parseInt(box[2],10)||0;left=parseInt(box[3],10)||0}else if(type==='number'){top=right=bottom=left=box}else if(typeof box.x==='number'){top=box.y;left=box.x;if(typeof box.right==='number'){right=box.right;bottom=box.bottom}else{right=left+box.width;bottom=top+box.height}}else{Ext.raise('Not convertible to a Region: '+box)}
return new Region(top,right,bottom,left)},magnitude=[-1,1,1,-1],addAnchorOffset=function(target,anchorSize,relativePosition){if(relativePosition!=null&&anchorSize){adjustParams[0]=adjustParams[1]=adjustParams[2]=adjustParams[3]=0;adjustParams[relativePosition]=anchorSize.y*magnitude[relativePosition];target=ExtUtil.Region.from(target);target.adjust.apply(target,adjustParams)}
return target},calculateAnchorPosition=function(target,result,relativePosition,anchorSize,inside){var anchorWidth=Math.ceil(anchorSize.x),minOverlap=Math.ceil(anchorWidth/2)+3,min,max,anchorPos,isBefore,overlapLine,x,y;if(inside&&!inside.intersect(target)){return}
if(relativePosition!=null){if(relativePosition&1){if(result.getHeight()<anchorWidth+4){return}
min=target.top+minOverlap-result.height;max=target.bottom-minOverlap-1;result.setPosition(result.x,Math.min(Math.max(result.y,min),max));min=result.top+2;max=result.bottom-(anchorWidth+2);isBefore=relativePosition===3;x=isBefore?result.right:result.left;overlapLine=new ExtUtil.Region(Math.max(result.top,target.top),x,Math.min(result.bottom,target.bottom),x);anchorPos=new ExtUtil.Region(0,0,0,0).setWidth(anchorSize.y).setHeight(anchorWidth).alignTo({target:overlapLine,align:isBefore?'l-r':'r-l',overlap:!0});anchorPos.setPosition(anchorPos.x,Math.min(Math.max(anchorPos.y,min),max));anchorPos.position=isBefore?'right':'left'}else{if(result.getWidth()<anchorWidth+4){return}
min=target.left+minOverlap-result.width;max=target.right-minOverlap-1;result.setPosition(Math.min(Math.max(result.x,min),max),result.y);min=result.left+2;max=result.right-(anchorWidth+2);isBefore=relativePosition===0;y=isBefore?result.bottom:result.top;overlapLine=new ExtUtil.Region(y,Math.min(result.right,target.right),y,Math.max(result.left,target.left));anchorPos=new ExtUtil.Region(0,0,0,0).setWidth(anchorWidth).setHeight(anchorSize.y).alignTo({target:overlapLine,align:isBefore?'t-b':'b-t',overlap:!0});anchorPos.setPosition(Math.min(Math.max(anchorPos.x,min),max),anchorPos.y);anchorPos.position=isBefore?'bottom':'top'}
if(inside&&!inside.contains(anchorPos)){return}
result.anchor=anchorPos;result.anchor.align=relativePosition}},checkMinHeight=function(minHeight,result,target,inside){var newHeight;if(minHeight&&inside){if(result.top>=target.bottom&&result.bottom>inside.bottom){result.setHeight(Math.max(result.getHeight()+inside.bottom-result.bottom,minHeight));result.constrainHeight=!0}else if(result.bottom<=target.top&&result.top<inside.top){newHeight=Math.max(result.getHeight()+result.top-inside.top,minHeight);result.adjust(result.getHeight()-newHeight);result.constrainHeight=!0}else if(result.getHeight()>inside.getHeight()){result.setHeight(Math.max(minHeight,inside.getHeight()));result.setPosition(result.x,0);result.constrainHeight=!0}}},checkMinWidth=function(minWidth,result,target,inside){var newWidth;if(minWidth&&inside){if(result.left>=target.right&&result.right>inside.right){result.setWidth(Math.max(result.getWidth()+inside.right-result.right,minWidth));result.constrainWidth=!0}else if(result.right<=target.left&&result.left<inside.left){newWidth=Math.max(result.getWidth()+result.left-inside.left,minWidth);result.adjust(0,0,0,result.getWidth()-newWidth);result.constrainWidth=!0}else if(result.getWidth()>inside.getWidth()){result.setWidth(Math.max(minWidth,inside.getWidth()));result.setPosition(0,result.y);result.constrainWidth=!0}}};return{requires:['Ext.util.Offset'],isRegion:!0,statics:{getRegion:function(el){return Ext.fly(el).getRegion()},from:function(o){return new this(o.top,o.right,o.bottom,o.left)},getAlignInfo:function(align,rtl){if(typeof align==='object'){return align}
align=align?((align.indexOf('-')<0)?'tl-'+align:align):'tl-bl';constrain=constrainRe.exec(align);align=constrain[1];align=(rtl?rtlAlignMap:alignMap)[align]||align;var offsetFactors=rtl?RTLOffsetFactors:LTROffsetFactors,constrain,parts=alignRe.exec(align),result;if(!parts){Ext.raise({sourceClass:'Ext.util.Region',sourceMethod:'getAlignInfo',position:align,msg:'Attempted to align an element with an invalid position: "'+align+'"'})}
result={myEdge:parts[1],myOffset:parts[2],otherEdge:parts[4],otherOffset:parts[5],constrain:constrain[2]};if(parts[3]){result.myEdge=parts[3][0];result.myOffset=offsetFactors[parts[3][1]];if(result.myOffset==null){result.myOffset=50}}
if(parts[6]){result.otherEdge=parts[6][0];result.otherOffset=offsetFactors[parts[6][1]];if(result.otherOffset==null){result.otherOffset=50}}
result.position=relativePositions[result.myEdge];return result}},constructor:function(top,right,bottom,left){var me=this;me.y=me.top=me[1]=top;me.right=right;me.bottom=bottom;me.x=me.left=me[0]=left;me.height=me.bottom-me.top;me.width=me.right-me.left},setPosition:function(x,y){if(arguments.length===1){y=x[1];x=x[0]}
return this.translateBy(x-this.x,y-this.y)},contains:function(region){var me=this;return(region.x>=me.x&&(region.right||region.x)<=me.right&&region.y>=me.y&&(region.bottom||region.y)<=me.bottom)},intersect:function(region){var me=this,t=Math.max(me.y,region.y),r=Math.min(me.right,region.right),b=Math.min(me.bottom,region.bottom),l=Math.max(me.x,region.x);if(b>t&&r>l){return new this.self(t,r,b,l)}else{return!1}},union:function(region){var me=this,t=Math.min(me.y,region.y),r=Math.max(me.right,region.right),b=Math.max(me.bottom,region.bottom),l=Math.min(me.x,region.x);return new this.self(t,r,b,l)},constrainTo:function(targetRegion){var me=this,constrain=Ext.Number.constrain;me.top=me.y=constrain(me.top,targetRegion.y,targetRegion.bottom);me.bottom=constrain(me.bottom,targetRegion.y,targetRegion.bottom);me.left=me.x=constrain(me.left,targetRegion.x,targetRegion.right);me.right=constrain(me.right,targetRegion.x,targetRegion.right);me.height=me.bottom-me.top;me.width=me.right-me.left;return me},adjust:function(top,right,bottom,left){var me=this;me.top=me.y+=top||0;me.left=me.x+=left||0;me.right+=right||0;me.bottom+=bottom||0;me.height=me.bottom-me.top;me.width=me.right-me.left;return me},getOutOfBoundOffset:function(axis,p){var d;if(!Ext.isObject(axis)){if(axis==='x'){return this.getOutOfBoundOffsetX(p)}else{return this.getOutOfBoundOffsetY(p)}}else{p=axis;d=new ExtUtil.Offset();d.x=this.getOutOfBoundOffsetX(p.x);d.y=this.getOutOfBoundOffsetY(p.y);return d}},getOutOfBoundOffsetX:function(p){if(p<=this.x){return this.x-p}else if(p>=this.right){return this.right-p}
return 0},getOutOfBoundOffsetY:function(p){if(p<=this.y){return this.y-p}else if(p>=this.bottom){return this.bottom-p}
return 0},isOutOfBound:function(axis,p){if(!Ext.isObject(axis)){if(axis==='x'){return this.isOutOfBoundX(p)}else{return this.isOutOfBoundY(p)}}else{p=axis;return(this.isOutOfBoundX(p.x)||this.isOutOfBoundY(p.y))}},isOutOfBoundX:function(p){return(p<this.x||p>this.right)},isOutOfBoundY:function(p){return(p<this.y||p>this.bottom)},restrict:function(axis,p,factor){var newP;if(Ext.isObject(axis)){factor=p;p=axis;if(p.copy){newP=p.copy()}else{newP={x:p.x,y:p.y}}
newP.x=this.restrictX(p.x,factor);newP.y=this.restrictY(p.y,factor);return newP}else{if(axis==='x'){return this.restrictX(p,factor)}else{return this.restrictY(p,factor)}}},restrictX:function(p,factor){if(!factor){factor=1}
if(p<=this.x){p-=(p-this.x)*factor}else if(p>=this.right){p-=(p-this.right)*factor}
return p},restrictY:function(p,factor){if(!factor){factor=1}
if(p<=this.y){p-=(p-this.y)*factor}else if(p>=this.bottom){p-=(p-this.bottom)*factor}
return p},alignTo:function(options){var me=this,Region=me.self,Offset=ExtUtil.Offset,Element=Ext.Element,target=parseRegion(options.target),targetPlusAnchorOffset,rtl=options.rtl,overlap=options.overlap,align=options.align,anchorSize=options.anchorSize,offset=options.offset,inside=options.inside,position=options.position,allowXTranslate=options.allowXTranslate,allowYTranslate=options.allowYTranslate,wasConstrained,result,initialPosition,constrainedPosition;if(offset){offset=Offset.fromObject(offset);if(!(offset instanceof Offset)){Ext.raise('offset option must be an Ext.util.Offset')}}
if(anchorSize){anchorSize=Offset.fromObject(anchorSize);if(!(anchorSize instanceof Offset)){Ext.raise('anchorSize option must be an Ext.util.Offset')}}
if(inside&&!inside.isRegion){if(Ext.getDom(inside)===document.body){inside=new Region(0,Element.getDocumentWidth(),Element.getDocumentHeight(),0)}else{inside=Ext.fly(inside).getRegion()}}
if(position){if(position.length===2){position=new ExtUtil.Point(position[0],position[1])}
result=new Region().copyFrom(me).setPosition(position.x,position.y)}else{align=me.getAlignInfo(align,rtl);if(inside){if(target.x>=inside.right){target.setPosition(inside.right-1,target.y);if(align.position!==3){align=me.getAlignInfo('r-l',rtl)}}else if(target.right<inside.x){target.setPosition(inside.x-target.getWidth()+1,target.y);if(align.position!==1){align=me.getAlignInfo('l-r',rtl)}}
if(target.y>=inside.bottom){target.setPosition(target.x,inside.bottom-1);if(align.position!==0){align=me.getAlignInfo('b-t',rtl)}}else if(target.bottom<inside.y){target.setPosition(target.x,inside.y-target.getHeight()+1);if(align.position!==2){align=me.getAlignInfo('t-b',rtl)}}}
targetPlusAnchorOffset=anchorSize?addAnchorOffset(target,anchorSize,align.position):target;result=Region.from(me).translateBy(me.getAlignToVector(targetPlusAnchorOffset,align));overlap=!!result.intersect(targetPlusAnchorOffset);if(offset&&(overlap||!anchorSize)){result.translateBy(offset)}
if(anchorSize){calculateAnchorPosition(target,result,align.position,anchorSize,inside)}}
if(inside){initialPosition=result.copy();if(result.left<inside.left){result.translateBy(inside.left-result.left,0);wasConstrained=!0}
if(result.right>inside.right&&result.left>inside.left){result.translateBy(inside.right-result.right,0);wasConstrained=!0}
if(result.top<inside.top){result.translateBy(0,inside.top-result.top);wasConstrained=!0}
if(result.bottom>inside.bottom&&result.top>inside.top){result.translateBy(0,inside.bottom-result.bottom);wasConstrained=!0}
if(wasConstrained&&!overlap){result.anchor=null;if(options.axisLock){if(align.position&1){allowYTranslate=!1}else{allowXTranslate=!1}}
if(position){if(result.contains(position)){position.exclude(result,{inside:inside,centerOnSideChange:!1})}}else{constrainedPosition=result.copy();if(result.intersect(targetPlusAnchorOffset)){align.position=target.exclude(result,{initialPosition:initialPosition,defaultPosition:align.position,inside:inside,minHeight:options.minHeight,minWidth:options.minWidth,allowX:allowXTranslate,allowY:allowYTranslate,offset:offset,anchorHeight:anchorSize?anchorSize.y:0,centerOnSideChange:!!anchorSize})}else if(options.minWidth&&result.getWidth()>inside.getWidth()){result.setPosition(0,result.y);result.setWidth(Math.max(inside.getWidth(),options.minWidth));result.constrainWidth=!0}else if(options.minHeight&&result.getHeight()>inside.getHeight()){result.setPosition(result.x,0);result.setHeight(Math.max(inside.getHeight(),options.minHeight));result.constrainHeight=!0}
result.align=align;if(inside.contains(result)){if(anchorSize){calculateAnchorPosition(target,result,align.position,anchorSize,inside)}}else{result=constrainedPosition}}}}
return result},exclude:function(other,options){options=options||{};var me=this,initialPosition=options.initialPosition||other,inside=options.inside,defaultPosition=options.defaultPosition,centerOnSideChange=options.centerOnSideChange,minHeight=options.minHeight,minWidth=options.minWidth,allowX=options.allowX!==!1,allowY=options.allowY!==!1,anchorHeight=options.anchorHeight,offset=options.offset,translations=[],testRegion,t,i,sizeConstrainedSolution,leastBadSolution,intersection,result;if(!offset){offset=zeroOffset}
if(allowY){translations.push([0,me.top-other.bottom-anchorHeight+offset.y,'b-t',0,Math.abs(me.top-initialPosition.bottom-anchorHeight+offset.y)]);translations.push([0,me.bottom-other.top+anchorHeight+offset.y,'t-b',2,Math.abs(me.bottom-initialPosition.top+anchorHeight+offset.y)])}else{centerOnSideChange=!1}
if(allowX){translations.push([me.left-other.right-anchorHeight+offset.x,0,'r-l',3,Math.abs(me.left-initialPosition.right-anchorHeight+offset.x)]);translations.push([me.right-other.left+anchorHeight+offset.x,0,'l-r',1,Math.abs(me.right-initialPosition.left+anchorHeight+offset.x)])}else{centerOnSideChange=!1}
Ext.Array.sort(translations,function(l,r){var result=l[4]-r[4];if(!result){if(l[3]===defaultPosition){return-1}
if(r[3]===defaultPosition){return 1}}
return result});if(inside){for(i=0;i<translations.length;i++){t=translations[i];testRegion=ExtUtil.Region.from(other);testRegion.translateBy.apply(testRegion,t);if(inside.contains(testRegion)){other.copyFrom(testRegion);result={align:t[2],position:t[3],distance:t[4]};break}
if(minHeight){checkMinHeight(minHeight,testRegion,me,inside);if(inside.contains(testRegion)){if(!sizeConstrainedSolution||testRegion.getArea()>sizeConstrainedSolution.region.getArea()){sizeConstrainedSolution={region:testRegion,align:t[2],position:t[3],distance:t[4]}}}}
if(minWidth){checkMinWidth(minWidth,testRegion,me,inside);if(inside.contains(testRegion)){if(!sizeConstrainedSolution||testRegion.getArea()>sizeConstrainedSolution.region.getArea()){sizeConstrainedSolution={region:testRegion,align:t[2],position:t[3],distance:t[4]}}}}
intersection=inside.intersect(testRegion);if(intersection){intersection=intersection.getArea();if(!leastBadSolution||(intersection&&leastBadSolution.area<intersection)){leastBadSolution={region:testRegion,align:t[2],position:t[3],distance:t[4],area:intersection}}}}
if(!result){if(sizeConstrainedSolution){other.copyFrom(sizeConstrainedSolution.region);result=sizeConstrainedSolution;other.constrainWidth=sizeConstrainedSolution.region.constrainWidth;other.constrainHeight=sizeConstrainedSolution.region.constrainHeight}else if(leastBadSolution){other.copyFrom(leastBadSolution.region);result=leastBadSolution}}
if(result){if((result.position&1)!==(defaultPosition&1)){if(result.distance&&centerOnSideChange){t=other.alignTo({align:result.align,target:me,anchorSize:anchorHeight,offset:offset,axisLock:!0,inside:inside,minHeight:options.minHeight,minWidth:options.minWidth});if(inside.contains(t)){other.setPosition(t.x,t.y)}}}
return result.position}}else{other.translateBy.apply(other,translations[0]);return translations[0][3]}
return defaultPosition},getAlignToXY:function(target,align,rtl){var alignVector=this.getAlignToVector(target,align,rtl);return[this.x+alignVector[0],this.y+alignVector[1]]},getAnchorPoint:function(align,rtl){align=(typeof align==='string')?this.getAlignInfo(align+'-tl',rtl):align;return this['getAnchorPoint_'+align.myEdge](align.myOffset)},getAlignToVector:function(target,align,rtl){align=(typeof align==='string')?this.getAlignInfo(align,rtl):align;var myAnchorPoint=this['getAnchorPoint_'+align.myEdge](align.myOffset),targetAnchorPoint=target['getAnchorPoint_'+align.otherEdge](align.otherOffset);return[targetAnchorPoint[0]-myAnchorPoint[0],targetAnchorPoint[1]-myAnchorPoint[1]]},getAnchorPoint_t:function(offset){return[this.x+Math.round(this.getWidth()*(offset/100)),this.y]},getAnchorPoint_b:function(offset){return[this.x+Math.round(this.getWidth()*(offset/100)),this.bottom]},getAnchorPoint_l:function(offset){return[this.x,this.y+Math.round(this.getHeight()*(offset/100))]},getAnchorPoint_r:function(offset){return[this.right,this.y+Math.round(this.getHeight()*(offset/100))]},getAnchorPoint_c:function(){return[this.x+Math.round(this.getWidth()/2),this.y+Math.round(this.getHeight()/2)]},getCenter:function(){return[this.x+this.width/2,this.y+this.height/2]},getHeight:function(){return this.bottom-this.y},getWidth:function(){return this.right-this.x},getArea:function(){return this.getHeight()*this.getWidth()},setHeight:function(h){this.height=h;this.bottom=this.top+h;return this},setWidth:function(w){this.width=w;this.right=this.left+w;return this},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},setSize:function(w,h){if(h===undefined){h=w}
this.setWidth(w);return this.setHeight(h)},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(p){var me=this;me.top=me.y=me[1]=p.y;me.right=p.right;me.bottom=p.bottom;me.left=me.x=me[0]=p.x;return me},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(x,y){var me=this;if(x.length){y=x[1];x=x[0]}else if(arguments.length===1){y=x.y;x=x.x}
me.top=me.y+=y;me.right+=x;me.bottom+=y;me.left=me.x+=x;return me},round:function(){var me=this;me.top=me.y=Math.round(me.y);me.right=Math.round(me.right);me.bottom=Math.round(me.bottom);me.left=me.x=Math.round(me.x);return me},equals:function(region){return(this.top===region.top&&this.right===region.right&&this.bottom===region.bottom&&this.left===region.left)},getOffsetsTo:function(offsetsTo){return{x:this.x-offsetsTo.x,y:this.y-offsetsTo.y}},highlight:function(){var highlightEl=Ext.getBody().createChild({style:'background-color:#52a0db;opacity:0.4;position:absolute;z-index:9999999'});highlightEl.setBox(this);Ext.defer(function(){highlightEl.destroy()},5000);return highlightEl}}},function(Region){Region.prototype.getAlignInfo=Region.getAlignInfo;Region.EMPTY=new Region(0,0,0,0);if(Object.freeze){Object.freeze(Region.EMPTY)}})
;
Ext.define('Ext.util.Point',{extend:'Ext.util.Region',isPoint:!0,radianToDegreeConstant:180/Math.PI,origin:{x:0,y:0},statics:{fromEvent:function(e){var changedTouches=e.changedTouches,touch=(changedTouches&&changedTouches.length>0)?changedTouches[0]:e;return this.fromTouch(touch)},fromTouch:function(touch){return new this(touch.pageX,touch.pageY)},from:function(object){if(!object){return new this(0,0)}
if(!(object instanceof this)){return new this(object.x,object.y)}
return object}},constructor:function(x,y){if(x==null){x=0}
if(y==null){y=0}
this.callParent([y,x,y,x])},clone:function(){return new this.self(this.x,this.y)},copy:function(){return this.clone.apply(this,arguments)},copyFrom:function(point){this.x=point.x;this.y=point.y;return this},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(point){return(this.x===point.x&&this.y===point.y)},isCloseTo:function(point,threshold){if(typeof threshold==='number'){return this.getDistanceTo(point)<=threshold}
var x=point.x,y=point.y,thresholdX=threshold.x,thresholdY=threshold.y;return(this.x<=x+thresholdX&&this.x>=x-thresholdX&&this.y<=y+thresholdY&&this.y>=y-thresholdY)},isWithin:function(){return this.isCloseTo.apply(this,arguments)},isContainedBy:function(region){if(!(region instanceof Ext.util.Region)){region=Ext.get(region.el||region).getRegion()}
return region.contains(this)},roundedEquals:function(point){if(!point||typeof point!=='object'){point=this.origin}
return(Math.round(this.x)===Math.round(point.x)&&Math.round(this.y)===Math.round(point.y))},getDistanceTo:function(point){if(!point||typeof point!=='object'){point=this.origin}
var deltaX=this.x-point.x,deltaY=this.y-point.y;return Math.sqrt(deltaX*deltaX+deltaY*deltaY)},getAngleTo:function(point){if(!point||typeof point!=='object'){point=this.origin}
var deltaX=this.x-point.x,deltaY=this.y-point.y;return Math.atan2(deltaY,deltaX)*this.radianToDegreeConstant}},function(){this.prototype.translate=this.prototype.translateBy})
;
Ext.define('Ext.event.Event',{alternateClassName:'Ext.EventObjectImpl',requires:['Ext.util.Point'],stopped:!1,claimed:!1,defaultPrevented:!1,isEvent:!0,geckoRelatedTargetEvents:{blur:1,dragenter:1,dragleave:1,focus:1},statics:{resolveTextNode:function(node){return(node&&node.nodeType===3)?node.parentNode:node},gestureEvents:{},pointerEvents:{pointerdown:1,pointermove:1,pointerup:1,pointercancel:1,pointerover:1,pointerout:1,pointerenter:1,pointerleave:1,MSPointerDown:1,MSPointerMove:1,MSPointerUp:1,MSPointerOver:1,MSPointerOut:1,MSPointerCancel:1,MSPointerEnter:1,MSPointerLeave:1},mouseEvents:{mousedown:1,mousemove:1,mouseup:1,mouseover:1,mouseout:1,mouseenter:1,mouseleave:1},clickEvents:{click:1,dblclick:1},touchEvents:{touchstart:1,touchmove:1,touchend:1,touchcancel:1},focusEvents:{focus:1,focusin:1,focusenter:1},blurEvents:{blur:1,focusout:1,focusleave:1},wheelEvents:{wheel:1,mousewheel:1},pointerTypeMap:{2:'touch',3:'pen',4:'mouse',touch:'touch',pen:'pen',mouse:'mouse'},keyEventRe:/^key/,keyFlags:{CTRL:'ctrlKey',CONTROL:'ctrlKey',ALT:'altKey',SHIFT:'shiftKey',CMD:'metaKey',COMMAND:'metaKey',CMDORCTRL:Ext.isMac?'metaKey':'ctrlKey',COMMANDORCONTROL:Ext.isMac?'metaKey':'ctrlKey',META:'metaKey'},modifierGlyphs:{ctrlKey:'\u2303',altKey:'\u2325',metaKey:Ext.isMac?'\u2318':'\u229e',shiftKey:'\u21E7'},specialKeyGlyphs:{BACKSPACE:'\u232B',TAB:'\u21E5',ENTER:'\u23CE',RETURN:'\u23CE',SPACE:'\u2423',PAGE_UP:'\u21DE',PAGE_DOWN:'\u21DF',END:'\u21F2',HOME:'\u2302',LEFT:'\u2190',UP:'\u2191',RIGHT:'\u2192',DOWN:'\u2193',PRINT_SCREEN:'\u2399',INSERT:'\u2380',DELETE:'\u2326',CONTEXT_MENU:'\u2630'},_hyphenRe:/^[a-z]+\-/i,getKeyId:function(keyName){if(typeof keyName==='number'){keyName=this.keyCodes[keyName]}else{keyName=keyName.toUpperCase()}
var me=this,delim=me._hyphenRe.test(keyName)?'-':'+',parts=(keyName===delim)?[delim]:keyName.split(delim),numModifiers=parts.length-1,rawKey=parts[numModifiers],result=[],eventFlag,i;if(!Ext.event.Event[rawKey]){Ext.raise('Invalid key name: "'+rawKey+'"')}
for(i=0;i<numModifiers;i++){eventFlag=me.keyFlags[parts[i]];if(!eventFlag){Ext.raise('Invalid key modifier: "'+parts[i]+'"')}
result[eventFlag]=!0}
if(result.ctrlKey){result.push(me.modifierGlyphs.ctrlKey)}
if(result.altKey){result.push(me.modifierGlyphs.altKey)}
if(result.shiftKey){result.push(me.modifierGlyphs.shiftKey)}
if(result.metaKey){result.push(me.modifierGlyphs.metaKey)}
result.push(this.specialKeyGlyphs[rawKey]||rawKey);return result.join('')},globalTabKeyDown:function(e){if(e.keyCode===9){Ext.event.Event.forwardTab=!e.shiftKey}},globalTabKeyUp:function(e){if(e.keyCode===9){delete Ext.event.Event.forwardTab}}},constructor:function(event){var me=this,self=me.self,resolveTextNode=me.self.resolveTextNode,changedTouches=event.changedTouches,coordinateOwner=changedTouches?changedTouches[0]:event,type=event.type,pointerType,relatedTarget;me.timeStamp=me.time=Ext.ticks();me.pageX=coordinateOwner.pageX;me.pageY=coordinateOwner.pageY;me.clientX=coordinateOwner.clientX;me.clientY=coordinateOwner.clientY;me.target=me.delegatedTarget=resolveTextNode(event.target);me.currentTarget=resolveTextNode(event.currentTarget);relatedTarget=event.relatedTarget;if(relatedTarget){if(Ext.isGecko&&me.geckoRelatedTargetEvents[type]){try{me.relatedTarget=resolveTextNode(relatedTarget)}catch(e){me.relatedTarget=null}}else{me.relatedTarget=resolveTextNode(relatedTarget)}}
me.browserEvent=me.event=event;me.type=type;me.button=event.button||0;me.shiftKey=event.shiftKey;me.ctrlKey=event.ctrlKey||event.metaKey||!1;me.altKey=event.altKey;me.charCode=event.charCode;me.keyCode=event.keyCode;me.buttons=event.buttons;if(me.button===0&&me.buttons===0){me.buttons=1}
if(self.focusEvents[type]||self.blurEvents[type]){if(self.forwardTab!==undefined){me.forwardTab=self.forwardTab}
if(self.focusEvents[type]){me.fromElement=event.relatedTarget;me.toElement=event.target}else{me.fromElement=event.target;me.toElement=event.relatedTarget}}else if(type!=='keydown'){delete self.forwardTab}
if(self.mouseEvents[type]){pointerType='mouse'}else if(self.clickEvents[type]){pointerType=self.pointerTypeMap[event.pointerType]||(((Ext.now()-Ext.event.publisher.Dom.lastTouchEndTime)<1000)?'touch':'mouse')}else if(self.pointerEvents[type]){pointerType=self.pointerTypeMap[event.pointerType]||'mouse'}else if(self.touchEvents[type]){pointerType='touch'}
if(pointerType){me.pointerType=pointerType}
me.isMultitouch=event.isPrimary===!1||(event.touches&&event.touches.length>1);if(self.wheelEvents[type]){me.getWheelDeltas()}},chain:function(props){var e=Ext.Object.chain(this);e.parentEvent=this;return Ext.apply(e,props)},correctWheelDelta:function(delta){var me=this,deltaMode=me.browserEvent.deltaMode,correctedDelta=delta;if(deltaMode===0){correctedDelta=delta*me.WHEEL_PIXEL_SIZE}else if(deltaMode===1){correctedDelta=delta*me.WHEEL_LINE_SIZE}else if(deltaMode===2){correctedDelta=delta*me.WHEEL_PAGE_SIZE}
return Math.round(correctedDelta)},getChar:function(){var r=this.which();return String.fromCharCode(r)},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.keyCode||this.charCode},getKeyName:function(){return this.type==='keypress'?String.fromCharCode(this.getCharCode()):this.keyCodes[this.keyCode]},key:function(){return this.browserEvent.key},which:function(){var me=this,e=me.browserEvent,r=e.which;if(r==null){if(me.self.keyEventRe.test(e.type)){r=e.charCode||e.keyCode}else if((r=e.button)!==undefined){r=(r&1)?1:((r&4)?2:((r&2)?3:0))}}
return r},getClipboardData:function(type){var clipboardData=this.browserEvent.clipboardData,clipIE=Ext.global.clipboardData,result=null,typeIE;type=type||'text/plain';if(clipboardData&&clipboardData.getData){result=clipboardData.getData(type)}else if(clipIE&&clipIE.getData){typeIE=this.ieMimeType[type];if(typeIE){result=clipIE.getData(typeIE)}}
return result},getPoint:function(){var me=this,point=me.point,xy;if(!point){xy=me.getXY();point=me.point=new Ext.util.Point(xy[0],xy[1])}
return point},getRelatedTarget:function(selector,maxDepth,returnEl){var relatedTarget=this.relatedTarget,target=null;if(relatedTarget&&relatedTarget.nodeType){if(selector){target=Ext.fly(relatedTarget).findParent(selector,maxDepth,returnEl)}else{target=returnEl?Ext.get(relatedTarget):relatedTarget}}
return target},getTarget:function(selector,maxDepth,returnEl){return selector?Ext.fly(this.target).findParent(selector,maxDepth,returnEl):(returnEl?Ext.get(this.target):this.target)},getTime:function(){return this.time},getWheelDelta:function(){var deltas=this.getWheelDeltas();return deltas.y},getWheelDeltas:function(){var me=this,wheelDeltas=me.wheelDeltas,browserEvent,deltaX,deltaY;if(!wheelDeltas){browserEvent=me.browserEvent;deltaX=me.correctWheelDelta(browserEvent.deltaX||0);deltaY=browserEvent.deltaY;deltaY=me.correctWheelDelta(deltaY==null?-browserEvent.wheelDelta:deltaY);me.deltaX=deltaX;me.deltaY=deltaY;me.wheelDeltas=wheelDeltas={x:deltaX,y:deltaY}}
return wheelDeltas},getX:function(){return this.getXY()[0]},getXY:function(){var me=this,xy=me.xy;if(!xy){xy=me.xy=[me.pageX,me.pageY];var x=xy[0],browserEvent,doc,docEl,body;if(!x&&x!==0){browserEvent=me.browserEvent;doc=document;docEl=doc.documentElement;body=doc.body;xy[0]=browserEvent.clientX+(docEl&&docEl.scrollLeft||body&&body.scrollLeft||0)-(docEl&&docEl.clientLeft||body&&body.clientLeft||0);xy[1]=browserEvent.clientY+(docEl&&docEl.scrollTop||body&&body.scrollTop||0)-(docEl&&docEl.clientTop||body&&body.clientTop||0)}}
return xy},getLocalXY:function(clip){var pageXY=this.getXY(),targetXY=Ext.fly(this.currentTarget).getXY(),localX=pageXY[0]-targetXY[0],localY=pageXY[1]-targetXY[1],size;if(clip){size=Ext.fly(this.currentTarget).getSize();localX=Math.max(0,Math.min(localX,size.width));localY=Math.max(0,Math.min(localY,size.height))}
return[localX,localY]},getY:function(){return this.getXY()[1]},hasModifier:function(){var me=this;return!!(me.ctrlKey||me.altKey||me.shiftKey||me.metaKey)},isNavKeyPress:function(scrollableOnly){var me=this,k=me.keyCode,isKeyPress=me.type==='keypress';return((!isKeyPress||Ext.isGecko)&&k>=33&&k<=40)||(!scrollableOnly&&(k===me.RETURN||k===me.TAB||k===me.ESC))},isSpecialKey:function(){var me=this,k=me.keyCode,isGecko=Ext.isGecko,isKeyPress=me.type==='keypress';return(isGecko&&isKeyPress&&me.charCode===0)||(this.isNavKeyPress())||(k===me.BACKSPACE)||(k===me.ENTER)||(k>=16&&k<=20)||((!isKeyPress||isGecko)&&k>=44&&k<=46)},makeUnpreventable:function(){this.browserEvent.preventDefault=Ext.emptyFn},preventDefault:function(){var me=this,parentEvent=me.parentEvent;me.defaultPrevented=!0;if(parentEvent){parentEvent.defaultPrevented=!0}
me.browserEvent.preventDefault();return me},setCurrentTarget:function(target){this.currentTarget=this.delegatedTarget=target},stopEvent:function(){return this.preventDefault().stopPropagation()},mousedownEvents:{mousedown:1,pointerdown:1,touchstart:1},mouseupEvents:{mouseup:1,pointerup:1,touchend:1},stopPropagation:function(){var me=this,browserEvent=me.browserEvent,parentEvent=me.parentEvent;if(me.mousedownEvents[me.type]){Ext.GlobalEvents.fireMouseDown(me)}
if(me.mouseupEvents[me.type]){Ext.GlobalEvents.fireMouseUp(me)}
me.stopped=!0;if(parentEvent&&!me.isGesture){parentEvent.stopped=!0}
if(!browserEvent.stopPropagation){browserEvent.cancelBubble=!0;return me}
browserEvent.stopPropagation();return me},claimGesture:function(){var me=this,parentEvent=me.parentEvent;me.claimed=!0;if(parentEvent&&!me.isGesture){parentEvent.claimGesture()}else{me.preventDefault()}
return me},within:function(el,related,allowEl){var t;if(el){t=related?this.getRelatedTarget():this.getTarget()}
if(!t||(allowEl===!1&&t===Ext.getDom(el))){return!1}
return Ext.fly(el).contains(t)},privates:{ieMimeType:{"text/plain":'Text'}},deprecated:{'4.0':{methods:{getPageX:'getX',getPageY:'getY'}}}},function(Event){var constants={BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_PIXEL_SIZE:1,WHEEL_LINE_SIZE:20,WHEEL_PAGE_SIZE:600},keyCodes={},gestureEvents=Event.gestureEvents,prototype=Event.prototype,i,keyName,keyCode,keys;Ext.apply(gestureEvents,Event.mouseEvents);Ext.apply(gestureEvents,Event.pointerEvents);Ext.apply(gestureEvents,Event.touchEvents);Ext.apply(Event,constants);Ext.apply(prototype,constants);delete constants.RETURN;for(keyName in constants){keyCode=constants[keyName];keyCodes[keyCode]=keyName}
Event.keyCodes=prototype.keyCodes=keyCodes;if(!Ext.isIE9m){document.addEventListener('keydown',Event.globalTabKeyDown,!0);document.addEventListener('keyup',Event.globalTabKeyUp,!0)}
prototype.getTrueXY=prototype.getXY;if(typeof KeyboardEvent!=='undefined'&&!('key' in KeyboardEvent.prototype)){prototype._keys=keys={3:'Cancel',6:'Help',8:'Backspace',9:'Tab',12:'Clear',13:'Enter',16:'Shift',17:'Control',18:'Alt',19:'Pause',20:'CapsLock',27:'Escape',28:'Convert',29:'NonConvert',30:'Accept',31:'ModeChange',32:' ',33:'PageUp',34:'PageDown',35:'End',36:'Home',37:'ArrowLeft',38:'ArrowUp',39:'ArrowRight',40:'ArrowDown',41:'Select',42:'Print',43:'Execute',44:'PrintScreen',45:'Insert',46:'Delete',48:['0',')'],49:['1','!'],50:['2','@'],51:['3','#'],52:['4','$'],53:['5','%'],54:['6','^'],55:['7','&'],56:['8','*'],57:['9','('],91:'OS',93:'ContextMenu',144:'NumLock',145:'ScrollLock',181:'VolumeMute',182:'VolumeDown',183:'VolumeUp',186:[';',':'],187:['=','+'],188:[',','<'],189:['-','_'],190:['.','>'],191:['/','?'],192:['`','~'],219:['[','{'],220:['\\','|'],221:[']','}'],222:["'",'"'],224:'Meta',225:'AltGraph',246:'Attn',247:'CrSel',248:'ExSel',249:'EraseEof',250:'Play',251:'ZoomOut'};for(i=1;i<25;++i){keys[i+111]='F'+i}
for(i=0;i<26;++i){keys[i]=[String.fromCharCode(i+97),String.fromCharCode(i+65)]}
prototype.key=function(){var k=keys[this.browserEvent.which||this.keyCode];if(k&&typeof k!=='string'){k=k[+this.shiftKey]}
return k}}})
;
Ext.define('Ext.overrides.event.Event',{override:'Ext.event.Event',injectEvent:(function(){var API,dispatchers={},crazyIEButtons;if(!Ext.isIE9m&&document.createEvent){API={createHtmlEvent:function(doc,type,bubbles,cancelable){var event=doc.createEvent('HTMLEvents');event.initEvent(type,bubbles,cancelable);return event},createMouseEvent:function(doc,type,bubbles,cancelable,detail,clientX,clientY,ctrlKey,altKey,shiftKey,metaKey,button,relatedTarget){var event=doc.createEvent('MouseEvents'),view=doc.defaultView||window;if(event.initMouseEvent){event.initMouseEvent(type,bubbles,cancelable,view,detail,clientX,clientY,clientX,clientY,ctrlKey,altKey,shiftKey,metaKey,button,relatedTarget)}else{event=doc.createEvent('UIEvents');event.initEvent(type,bubbles,cancelable);event.view=view;event.detail=detail;event.screenX=clientX;event.screenY=clientY;event.clientX=clientX;event.clientY=clientY;event.ctrlKey=ctrlKey;event.altKey=altKey;event.metaKey=metaKey;event.shiftKey=shiftKey;event.button=button;event.relatedTarget=relatedTarget}
return event},createUIEvent:function(doc,type,bubbles,cancelable,detail){var event=doc.createEvent('UIEvents'),view=doc.defaultView||window;event.initUIEvent(type,bubbles,cancelable,view,detail);return event},fireEvent:function(target,type,event){target.dispatchEvent(event)}}}else if(document.createEventObject){crazyIEButtons={0:1,1:4,2:2};API={createHtmlEvent:function(doc,type,bubbles,cancelable){var event=doc.createEventObject();event.bubbles=bubbles;event.cancelable=cancelable;return event},createMouseEvent:function(doc,type,bubbles,cancelable,detail,clientX,clientY,ctrlKey,altKey,shiftKey,metaKey,button,relatedTarget){var event=doc.createEventObject();event.bubbles=bubbles;event.cancelable=cancelable;event.detail=detail;event.screenX=clientX;event.screenY=clientY;event.clientX=clientX;event.clientY=clientY;event.ctrlKey=ctrlKey;event.altKey=altKey;event.shiftKey=shiftKey;event.metaKey=metaKey;event.button=crazyIEButtons[button]||button;event.relatedTarget=relatedTarget;return event},createUIEvent:function(doc,type,bubbles,cancelable,detail){var event=doc.createEventObject();event.bubbles=bubbles;event.cancelable=cancelable;return event},fireEvent:function(target,type,event){target.fireEvent('on'+type,event)}}}
Ext.Object.each({load:[!1,!1],unload:[!1,!1],select:[!0,!1],change:[!0,!1],submit:[!0,!0],reset:[!0,!1],resize:[!0,!1],scroll:[!0,!1]},function(name,value){var bubbles=value[0],cancelable=value[1];dispatchers[name]=function(targetEl,srcEvent){var e=API.createHtmlEvent(name,bubbles,cancelable);API.fireEvent(targetEl,name,e)}});function createMouseEventDispatcher(type,detail){var cancelable=(type!=='mousemove');return function(targetEl,srcEvent){var xy=srcEvent.getXY(),e;e=API.createMouseEvent(targetEl.ownerDocument,type,!0,cancelable,detail,xy[0],xy[1],srcEvent.ctrlKey,srcEvent.altKey,srcEvent.shiftKey,srcEvent.metaKey,srcEvent.button,srcEvent.relatedTarget);API.fireEvent(targetEl,type,e)}}
Ext.each(['click','dblclick','mousedown','mouseup','mouseover','mousemove','mouseout'],function(eventName){dispatchers[eventName]=createMouseEventDispatcher(eventName,1)});Ext.Object.each({focusin:[!0,!1],focusout:[!0,!1],activate:[!0,!0],focus:[!1,!1],blur:[!1,!1]},function(name,value){var bubbles=value[0],cancelable=value[1];dispatchers[name]=function(targetEl,srcEvent){var e=API.createUIEvent(targetEl.ownerDocument,name,bubbles,cancelable,1);API.fireEvent(targetEl,name,e)}});if(!API){dispatchers={};API={}}
function cannotInject(target,srcEvent){}
return function(target){var me=this,dispatcher=dispatchers[me.type]||cannotInject,t=target?(target.dom||target):me.getTarget();dispatcher(t,me)}}()),preventDefault:function(browserOnly){var me=this,event=me.browserEvent,parentEvent=me.parentEvent,unselectable,target,fn;if(typeof event.type!=='unknown'){if(!browserOnly){me.defaultPrevented=!0}
if(parentEvent){parentEvent.defaultPrevented=!0}
if(event.preventDefault){event.preventDefault()}else{if(event.type==='mousedown'){target=event.target;unselectable=target.getAttribute('unselectable');if(unselectable!=='on'){target.setAttribute('unselectable','on');fn=function(){target.setAttribute('unselectable',unselectable)};fn.$skipTimerCheck=!0;Ext.defer(fn,1)}}
event.returnValue=!1;if(event.ctrlKey||event.keyCode>111&&event.keyCode<124){event.keyCode=-1}}}
return me},deprecated:{'5.0':{methods:{clone:function(){return new this.self(this.browserEvent,this)}}}}},function(){var Event=this,btnMap;if(Ext.isIE9m){btnMap={0:0,1:0,4:1,2:2};Event.override({statics:{enableIEAsync:function(browserEvent){var name,fakeEvent={};for(name in browserEvent){fakeEvent[name]=browserEvent[name]}
return fakeEvent}},constructor:function(event,info,touchesMap,identifiers){var me=this;me.callParent([event,info,touchesMap,identifiers]);me.button=btnMap[event.button];if(event.type==='contextmenu'){me.button=2}
me.toElement=event.toElement;me.fromElement=event.fromElement},mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,enableIEAsync:function(browserEvent){this.browserEvent=this.self.enableIEAsync(browserEvent)},getRelatedTarget:function(selector,maxDepth,returnEl){var me=this,type,target;if(!me.relatedTarget){type=me.type;if(me.mouseLeaveRe.test(type)){target=me.toElement}else if(me.mouseEnterRe.test(type)){target=me.fromElement}
if(target){me.relatedTarget=me.self.resolveTextNode(target)}}
return me.callParent([selector,maxDepth,returnEl])}});document.attachEvent('onkeydown',Ext.event.Event.globalTabKeyDown);document.attachEvent('onkeyup',Ext.event.Event.globalTabKeyUp);window.attachEvent('onunload',function(){document.detachEvent('onkeydown',Ext.event.Event.globalTabKeyDown);document.detachEvent('onkeyup',Ext.event.Event.globalTabKeyUp)})}})
;
Ext.define('Ext.rtl.event.Event',{override:'Ext.event.Event',getXY:function(){var me=this,xy=me.xy;if(!xy){xy=me.callParent();if(Ext.rootInheritedState.rtl){xy[0]=Ext.Element.getViewportWidth()-xy[0]}}
return xy}})
;
Ext.define('Ext.event.publisher.Dom',{extend:'Ext.event.publisher.Publisher',requires:['Ext.event.Event'],type:'dom',handledDomEvents:[],reEnterCount:0,captureEvents:{animationstart:1,animationend:1,resize:1,focus:1,blur:1},directEvents:{mouseenter:1,mouseleave:1,pointerenter:1,pointerleave:1,MSPointerEnter:1,MSPointerLeave:1,load:1,unload:1,beforeunload:1,error:1,DOMContentLoaded:1,DOMFrameContentLoaded:1,hashchange:1,scroll:1,online:1,offline:1},blockedPointerEvents:{pointerover:1,pointerout:1,pointerenter:1,pointerleave:1,MSPointerOver:1,MSPointerOut:1,MSPointerEnter:1,MSPointerLeave:1},blockedCompatibilityMouseEvents:{mouseenter:1,mouseleave:1},constructor:function(){var me=this,supportsPassive=Ext.supports.PassiveEventListener;me.listenerOptions=supportsPassive?{passive:!1}:!1;me.captureOptions=supportsPassive?{passive:!1,capture:!0}:!0;me.bubbleSubscribers={};me.captureSubscribers={};me.directSubscribers={};me.directCaptureSubscribers={};me.delegatedListeners={};me.initHandlers();Ext.onInternalReady(me.onReady,me);me.callParent();me.registerDomEvents()},registerDomEvents:function(){var me=this,publishersByEvent=Ext.event.publisher.Publisher.publishersByEvent,domEvents=me.handledDomEvents,ln=domEvents.length,i,eventName;for(i=0;i<ln;i++){eventName=domEvents[i];me.handles[eventName]=1;publishersByEvent[eventName]=me}},onReady:function(){var me=this,domEvents=me.handledDomEvents,ln,i;if(domEvents){for(i=0,ln=domEvents.length;i<ln;i++){me.addDelegatedListener(domEvents[i])}}
Ext.getWin().on('unload',me.destroy,me,{priority:-10000})},initHandlers:function(){var me=this;me.onDelegatedEvent=Ext.bind(me.onDelegatedEvent,me);me.onDirectEvent=Ext.bind(me.onDirectEvent,me);me.onDirectCaptureEvent=Ext.bind(me.onDirectCaptureEvent,me)},addDelegatedListener:function(eventName){var me=this;me.delegatedListeners[eventName]=1;me.target.addEventListener(eventName,me.onDelegatedEvent,me.captureEvents[eventName]?me.captureOptions:me.listenerOptions)},removeDelegatedListener:function(eventName){var me=this;delete me.delegatedListeners[eventName];me.target.removeEventListener(eventName,me.onDelegatedEvent,me.captureEvents[eventName]?me.captureOptions:me.listenerOptions)},addDirectListener:function(eventName,element,capture){var me=this;element.dom.addEventListener(eventName,capture?me.onDirectCaptureEvent:me.onDirectEvent,capture?me.captureOptions:me.listenerOptions)},removeDirectListener:function(eventName,element,capture){var me=this;element.dom.removeEventListener(eventName,capture?me.onDirectCaptureEvent:me.onDirectEvent,capture?me.captureOptions:me.listenerOptions)},subscribe:function(element,eventName,delegated,capture){var me=this,subscribers,id;if(delegated&&!me.directEvents[eventName]){subscribers=capture?me.captureSubscribers:me.bubbleSubscribers;if(!me.handles[eventName]&&!me.delegatedListeners[eventName]){me.addDelegatedListener(eventName)}
if(subscribers[eventName]){++subscribers[eventName]}else{subscribers[eventName]=1}}else{subscribers=capture?me.directCaptureSubscribers:me.directSubscribers;id=element.id;subscribers=subscribers[eventName]||(subscribers[eventName]={});if(subscribers[id]){++subscribers[id]}else{subscribers[id]=1;me.addDirectListener(eventName,element,capture)}}},unsubscribe:function(element,eventName,delegated,capture){var me=this,captureSubscribers,bubbleSubscribers,subscribers,id;if(delegated&&!me.directEvents[eventName]){captureSubscribers=me.captureSubscribers;bubbleSubscribers=me.bubbleSubscribers;subscribers=capture?captureSubscribers:bubbleSubscribers;if(subscribers[eventName]){--subscribers[eventName]}
if(!me.handles[eventName]&&!bubbleSubscribers[eventName]&&!captureSubscribers[eventName]){this.removeDelegatedListener(eventName)}}else{subscribers=capture?me.directCaptureSubscribers:me.directSubscribers;id=element.id;subscribers=subscribers[eventName];if(subscribers[id]){--subscribers[id]}
if(!subscribers[id]){delete subscribers[id];me.removeDirectListener(eventName,element,capture)}}},getPropagatingTargets:function(target){var currentNode=target,targets=[],parentNode;while(currentNode){targets.push(currentNode);parentNode=currentNode.parentNode;if(!parentNode){parentNode=currentNode.defaultView}
currentNode=parentNode}
return targets},publish:function(e,targets,claimed){var me=this,hasCaptureSubscribers=!1,hasBubbleSubscribers=!1,events,type,target,el,i,ln,j,eLn;claimed=claimed||!1;if(!targets){if(e instanceof Array){Ext.raise("Propagation targets must be supplied when publishing "+"an array of events.")}
target=e.target;if(me.captureEvents[e.type]){el=Ext.cache[target.id];targets=el?[el]:[]}else{targets=me.getPropagatingTargets(target)}}
events=Ext.Array.from(e);ln=targets.length;eLn=events.length;for(i=0;i<eLn;i++){type=events[i].type;if(!hasCaptureSubscribers&&me.captureSubscribers[type]){hasCaptureSubscribers=!0}
if(!hasBubbleSubscribers&&me.bubbleSubscribers[type]){hasBubbleSubscribers=!0}}
if(hasCaptureSubscribers){for(i=ln;i--;){el=Ext.cache[targets[i].id];if(el){for(j=0;j<eLn;j++){e=events[j];me.fire(el,e.type,e,!1,!0);if(!claimed&&e.claimed){claimed=!0;j=me.filterClaimed(events,e);eLn=events.length}
if(e.stopped){events.splice(j,1);j--;eLn--}}}}}
if(hasBubbleSubscribers&&!e.stopped){for(i=0;i<ln;i++){el=Ext.cache[targets[i].id];if(el){for(j=0;j<eLn;j++){e=events[j];me.fire(el,e.type,e,!1,!1);if(!claimed&&e.claimed&&me.filterClaimed){claimed=!0;j=me.filterClaimed(events,e);eLn=events.length}
if(e.stopped){events.splice(j,1);j--;eLn--}}}}}},publishDelegatedDomEvent:function(e){this.publish(e)},fire:function(element,eventName,e,direct,capture){var event;if(element.hasListeners[eventName]){event=element.events[eventName];if(event){if(capture&&direct){event=event.directCaptures}else if(capture){event=event.captures}else if(direct){event=event.directs}
if(event){e.setCurrentTarget(element.dom);event.fire(e,e.target)}}}},onDelegatedEvent:function(e){if(Ext.elevateFunction){Ext.elevateFunction(this.doDelegatedEvent,this,[e])}else{this.doDelegatedEvent(e)}},doDelegatedEvent:function(e){var me=this,timeStamp;e=new Ext.event.Event(e);timeStamp=e.time;if(!me.isEventBlocked(e)){me.beforeEvent(e);Ext.frameStartTime=timeStamp;me.reEnterCountAdjusted=!1;me.reEnterCount++;me.publishDelegatedDomEvent(e);if(!me.reEnterCountAdjusted){me.reEnterCount--}
me.afterEvent(e)}},onDirectEvent:function(e){if(Ext.elevateFunction){Ext.elevateFunction(this.doDirectEvent,this,[e,!1])}else{this.doDirectEvent(e,!1)}},onDirectCaptureEvent:function(e){if(Ext.elevateFunction){Ext.elevateFunction(this.doDirectEvent,this,[e,!0])}else{this.doDirectEvent(e,!0)}},doDirectEvent:function(e,capture){var me=this,currentTarget=e.currentTarget,timeStamp,el;e=new Ext.event.Event(e);timeStamp=e.time;if(me.isEventBlocked(e)){return}
me.beforeEvent(e);Ext.frameStartTime=timeStamp;el=Ext.cache[currentTarget.id];if(el){me.reEnterCountAdjusted=!1;me.reEnterCount++;me.fire(el,e.type,e,!0,capture);if(!me.reEnterCountAdjusted){me.reEnterCount--}}
me.afterEvent(e)},beforeEvent:function(e){var browserEvent=e.browserEvent,self=Ext.event.publisher.Dom,touches,touch;if(browserEvent.type==='touchstart'){touches=browserEvent.touches;if(touches.length===1){touch=touches[0];self.lastTouchStartX=touch.pageX;self.lastTouchStartY=touch.pageY}}},afterEvent:function(e){var browserEvent=e.browserEvent,type=browserEvent.type,self=Ext.event.publisher.Dom,GlobalEvents=Ext.GlobalEvents;if(e.self.pointerEvents[type]&&e.pointerType!=='mouse'){self.lastScreenPointerEventTime=Ext.now()}
if(type==='touchend'){self.lastTouchEndTime=Ext.now()}
if(!this.reEnterCount&&!GlobalEvents.idleEventMask[type]){Ext.fireIdle()}},isEventBlocked:function(e){var me=this,type=e.type,self=Ext.event.publisher.Dom,now=Ext.now();if(Ext.isGecko&&e.type==='click'&&e.button===2){return!0}
return(me.blockedPointerEvents[type]&&e.pointerType!=='mouse')||(me.blockedCompatibilityMouseEvents[type]&&(now-self.lastScreenPointerEventTime<1000))||(Ext.supports.TouchEvents&&e.self.mouseEvents[e.type]&&Math.abs(e.pageX-self.lastTouchStartX)<15&&Math.abs(e.pageY-self.lastTouchStartY)<15&&(Ext.now()-self.lastTouchEndTime)<1000)},destroy:function(){var GC=Ext.dom.GarbageCollector,eventName;for(eventName in this.delegatedListeners){this.removeDelegatedListener(eventName)}
Ext.Reaper.flush();if(GC){GC.collect()}
this.callParent()},reset:function(){var self=Ext.event.publisher.Dom;this.reEnterCount=0;self.lastScreenPointerEventTime=self.lastTouchEndTime=self.lastTouchStartX=self.lastTouchStartY=undefined}},function(Dom){var doc=document,defaultView=doc.defaultView,prototype=Dom.prototype;if((Ext.os.is.iOS&&window.self!==window.top)||Ext.browser.is.AndroidStock||!(defaultView&&defaultView.addEventListener)){prototype.target=doc}else{prototype.target=defaultView}
Dom.instance=new Dom()})
;
Ext.define('Ext.overrides.event.publisher.Dom',{override:'Ext.event.publisher.Dom'},function(DomPublisher){var focusEvents={focus:!0,focusin:!0,focusout:!0,blur:!0};if(Ext.isIE10m){DomPublisher.override({isEventBlocked:function(e){if(!focusEvents[e.type]){return this.callParent([e])}
var body=document.body,ev=e.browserEvent,el=Ext.synchronouslyFocusing;if(el&&((ev.type==='focusout'&&(ev.srcElement===el||ev.srcElement===window)&&ev.toElement===body)||(ev.type==='focusin'&&(ev.srcElement===body||ev.srcElement===window)&&ev.fromElement===el&&ev.toElement===null))){return!0}
return!1}})}
if(Ext.isIE9m){var docElement=document.documentElement,docBody=document.body,prototype=DomPublisher.prototype,onDirectEvent,onDirectCaptureEvent;prototype.target=document;prototype.directBoundListeners={};onDirectEvent=function(e,publisher,capture){e.target=e.srcElement||window;e.currentTarget=this;if(capture){publisher.onDirectCaptureEvent(e)}else{publisher.onDirectEvent(e)}};onDirectCaptureEvent=function(e,publisher){e.target=e.srcElement||window;e.currentTarget=this;publisher.onDirectCaptureEvent(e)};DomPublisher.override({addDelegatedListener:function(eventName){this.delegatedListeners[eventName]=1;this.target.attachEvent('on'+eventName,this.onDelegatedEvent)},removeDelegatedListener:function(eventName){delete this.delegatedListeners[eventName];this.target.detachEvent('on'+eventName,this.onDelegatedEvent)},addDirectListener:function(eventName,element,capture){var me=this,dom=element.dom,boundFn=Ext.Function.bind(onDirectEvent,dom,[me,capture],!0),directBoundListeners=me.directBoundListeners,handlers=directBoundListeners[eventName]||(directBoundListeners[eventName]={});handlers[dom.id]=boundFn;if(dom.attachEvent){dom.attachEvent('on'+eventName,boundFn)}else{me.callParent([eventName,element,capture])}},removeDirectListener:function(eventName,element,capture){var dom=element.dom;if(dom.detachEvent){dom.detachEvent('on'+eventName,this.directBoundListeners[eventName][dom.id])}else{this.callParent([eventName,element,capture])}},doDelegatedEvent:function(e){e.target=e.srcElement||window;if(e.type==='focusin'){e.relatedTarget=e.fromElement===docBody||e.fromElement===docElement?null:e.fromElement}else if(e.type==='focusout'){e.relatedTarget=e.toElement===docBody||e.toElement===docElement?null:e.toElement}
return this.callParent([e])}});Ext.apply(prototype.directEvents,prototype.captureEvents);Ext.apply(prototype.directEvents,{change:1,input:1,paste:1});prototype.captureEvents={}}})
;
Ext.define('Ext.event.publisher.Gesture',{extend:'Ext.event.publisher.Dom',requires:['Ext.util.Point','Ext.AnimationQueue'],uses:'Ext.event.gesture.*',type:'gesture',isCancelEvent:{touchcancel:1,pointercancel:1,MSPointerCancel:1},isEndEvent:{mouseup:1,touchend:1,pointerup:1,MSPointerUp:1},handledEvents:[],handledDomEvents:[],constructor:function(config){var me=this,handledDomEvents=me.handledDomEvents,supports=Ext.supports,supportsTouchEvents=supports.TouchEvents,onTouchStart=me.onTouchStart,onTouchMove=me.onTouchMove,onTouchEnd=me.onTouchEnd;me.handlers={touchstart:onTouchStart,touchmove:onTouchMove,touchend:onTouchEnd,touchcancel:onTouchEnd,pointerdown:onTouchStart,pointermove:onTouchMove,pointerup:onTouchEnd,pointercancel:onTouchEnd,MSPointerDown:onTouchStart,MSPointerMove:onTouchMove,MSPointerUp:onTouchEnd,MSPointerCancel:onTouchEnd,mousedown:onTouchStart,mousemove:onTouchMove,mouseup:onTouchEnd};me.activeTouchesMap={};me.activeTouches=[];me.changedTouches=[];me.recognizers=[];me.eventToRecognizer={};me.cancelEvents=[];if(supportsTouchEvents){me.onTargetTouchMove=me.onTargetTouchMove.bind(me);me.onTargetTouchEnd=me.onTargetTouchEnd.bind(me)}
if(supports.PointerEvents){handledDomEvents.push('pointerdown','pointermove','pointerup','pointercancel');me.mousePointerType='mouse'}else if(supports.MSPointerEvents){handledDomEvents.push('MSPointerDown','MSPointerMove','MSPointerUp','MSPointerCancel');me.mousePointerType=4}else if(supportsTouchEvents){handledDomEvents.push('touchstart','touchmove','touchend','touchcancel')}
if(!handledDomEvents.length||(supportsTouchEvents&&Ext.os.is.Desktop)){handledDomEvents.push('mousedown','mousemove','mouseup')}
me.initConfig(config);return me.callParent()},onReady:function(){this.callParent();Ext.Array.sort(this.recognizers,function(recognizerA,recognizerB){var a=recognizerA.priority,b=recognizerB.priority;return(a>b)?1:(a<b)?-1:0})},registerRecognizer:function(recognizer){var me=this,handledEvents=recognizer.handledEvents,ln=handledEvents.length,eventName,i;recognizer.setOnRecognized(me.onRecognized);recognizer.setCallbackScope(me);for(i=0;i<ln;i++){eventName=handledEvents[i];me.handledEvents.push(eventName);me.eventToRecognizer[eventName]=recognizer}
me.registerEvents(handledEvents);me.recognizers.push(recognizer)},onRecognized:function(recognizer,eventName,e,info,isCancel){var me=this,touches=e.touches,changedTouches=e.changedTouches,ln=changedTouches.length,events=me.events,queueWasEmpty=!events.length,cancelEvents=me.cancelEvents,targetGroups,targets,i,touch;info=info||{};info.type=eventName;info.target=changedTouches[0].target;info.stopped=!1;info.claimed=!1;info.isGesture=!0;e=e.chain(info);if(!me.gestureTargets){if(ln>1){targetGroups=[];for(i=0;i<ln;i++){touch=changedTouches[i];targetGroups.push(touch.targets)}
targets=me.getCommonTargets(targetGroups)}else{targets=changedTouches[0].targets}
me.gestureTargets=targets}
if(isCancel&&recognizer.isSingleTouch&&(touches.length>1)){e.target=touches[0].target;cancelEvents.push(e)}else{events.push(e)}
if(queueWasEmpty){me.publishGestures()}},getCommonTargets:function(targetGroups){var firstTargetGroup=targetGroups[0],ln=targetGroups.length,commonTargets=[],i=1,target,targets,j;if(ln===1){return firstTargetGroup}
while(!0){target=firstTargetGroup[firstTargetGroup.length-i];if(!target){return commonTargets}
for(j=1;j<ln;j++){targets=targetGroups[j];if(targets[targets.length-i]!==target){return commonTargets}}
commonTargets.unshift(target);i++}
return commonTargets},invokeRecognizers:function(methodName,e){var recognizers=this.recognizers,ln=recognizers.length,i,recognizer;if(methodName==='onStart'){for(i=0;i<ln;i++){recognizers[i].isActive=!0}}
for(i=0;i<ln;i++){recognizer=recognizers[i];if(recognizer.isActive&&recognizer[methodName].call(recognizer,e)===!1){recognizer.isActive=!1}}},filterClaimed:function(events,claimedEvent){var me=this,eventToRecognizer=me.eventToRecognizer,claimedEventType=claimedEvent.type,claimedRecognizer=eventToRecognizer[claimedEventType],claimedEventIndex,recognizer,type,i;for(i=events.length;i--;){type=events[i].type;if(type===claimedEventType){claimedEventIndex=i}else{recognizer=eventToRecognizer[type];if(!claimedRecognizer||(recognizer&&(recognizer!==claimedRecognizer))){events.splice(i,1);if(claimedEventIndex){claimedEventIndex--}}}}
me.claimRecognizer(claimedRecognizer,events[0]);return claimedEventIndex},claimRecognizer:function(claimedRecognizer,e){var me=this,recognizers=me.recognizers,i,ln,recognizer;for(i=0,ln=recognizers.length;i<ln;i++){recognizer=recognizers[i];if(recognizer!==claimedRecognizer){recognizer.isActive=!1;recognizer.cancel(e)}}
if(me.events.length){me.publishGestures(!0)}},publishGestures:function(claimed){var me=this,cancelEvents=me.cancelEvents,events=me.events,gestureTargets=me.gestureTargets;if(cancelEvents.length){me.cancelEvents=[];me.publish(cancelEvents,me.getPropagatingTargets(cancelEvents[0].target),!0)}
if(events.length){me.events=[];me.gestureTargets=null;me.publish(events,gestureTargets||me.getPropagatingTargets(events[0].target),claimed)}},updateTouches:function(e){var me=this,browserEvent=e.browserEvent,type=e.type,touchSources=browserEvent.changedTouches||[browserEvent],activeTouches=me.activeTouches,activeTouchesMap=me.activeTouchesMap,changedTouches=[],touchSource,identifier,touch,target,i,ln,x,y;for(i=0,ln=touchSources.length;i<ln;i++){touchSource=touchSources[i];if('identifier' in touchSource){identifier=touchSource.identifier}else if('pointerId' in touchSource){identifier=touchSource.pointerId}else{identifier=1}
touch=activeTouchesMap[identifier];if(!touch){target=Ext.event.Event.resolveTextNode(touchSource.target);touch=activeTouchesMap[identifier]={identifier:identifier,target:target,targets:me.getPropagatingTargets(target)};activeTouches.push(touch)}
if(me.isEndEvent[type]||me.isCancelEvent[type]){delete activeTouchesMap[identifier];Ext.Array.remove(activeTouches,touch)}
x=Math.round(touchSource.pageX);y=Math.round(touchSource.pageY);touch.pageX=x;touch.pageY=y;touch.point=new Ext.util.Point(x,y);changedTouches.push(touch)}
e.touches=Ext.Array.clone(activeTouches);e.changedTouches=changedTouches},publishDelegatedDomEvent:function(e){var me=this;if(!e.button||e.button<1){me.events=[e];e.browserEvent.$extHandled=!0;me.handlers[e.type].call(me,e)}else{me.callParent([e])}},onTouchStart:function(e){var me=this,target=e.target,touches=e.browserEvent.touches;if(e.browserEvent.type==='touchstart'){target.addEventListener('touchmove',me.onTargetTouchMove);target.addEventListener('touchend',me.onTargetTouchEnd);target.addEventListener('touchcancel',me.onTargetTouchEnd)}
if(touches&&touches.length<=me.activeTouches.length){me.removeGhostTouches(touches)}
me.updateTouches(e);if(!me.isStarted){if(Ext.enableGarbageCollector){Ext.dom.GarbageCollector.pause()}
me.isStarted=!0;me.invokeRecognizers('onStart',e)}
me.invokeRecognizers('onTouchStart',e);me.publishGestures()},onTouchMove:function(e){var me=this,mousePointerType=me.mousePointerType,isStarted=me.isStarted;if(isStarted||(e.pointerType!=='mouse')){me.updateTouches(e)}
if(isStarted){if(mousePointerType&&e.browserEvent.pointerType===mousePointerType&&e.buttons===0){e.type=Ext.dom.Element.prototype.eventMap.touchend;e.button=0;me.onTouchEnd(e);return}
if(e.changedTouches.length>0){me.invokeRecognizers('onTouchMove',e)}}
me.publishGestures()},onTouchEnd:function(e){var me=this,isStarted=me.isStarted,touchCount;if(isStarted||(e.pointerType!=='mouse')){me.updateTouches(e)}
if(!isStarted){me.publishGestures();return}
touchCount=me.activeTouches.length;try{me.invokeRecognizers(me.isCancelEvent[e.type]?'onTouchCancel':'onTouchEnd',e)}finally{try{if(!touchCount){me.isStarted=!1;me.invokeRecognizers('onEnd',e)}}finally{try{me.publishGestures()}finally{if(!touchCount){if(Ext.enableGarbageCollector){Ext.dom.GarbageCollector.resume()}}
me.reEnterCountAdjusted=!0;me.reEnterCount--}}}},onTargetTouchMove:function(e){if(Ext.elevateFunction){Ext.elevateFunction(this.doTargetTouchMove,this,[e])}else{this.doTargetTouchMove(e)}},doTargetTouchMove:function(e){var me=this;if(!Ext.getBody().contains(e.target)){me.reEnterCountAdjusted=!1;me.reEnterCount++;this.onTouchMove(new Ext.event.Event(e));if(!me.reEnterCountAdjusted){me.reEnterCount--}}},onTargetTouchEnd:function(e){if(Ext.elevateFunction){Ext.elevateFunction(this.doTargetTouchEnd,this,[e])}else{this.doTargetTouchEnd(e)}},doTargetTouchEnd:function(e){var me=this,target=e.target;target.removeEventListener('touchmove',me.onTargetTouchMove);target.removeEventListener('touchend',me.onTargetTouchEnd);target.removeEventListener('touchcancel',me.onTargetTouchEnd);if(!Ext.getBody().contains(target)){me.reEnterCountAdjusted=!1;me.reEnterCount++;me.onTouchEnd(new Ext.event.Event(e));if(!me.reEnterCountAdjusted){me.reEnterCount--}}},reset:function(){var me=this,recognizers=me.recognizers,ln=recognizers.length,i,recognizer;me.activeTouchesMap={};me.activeTouches=[];me.changedTouches=[];me.isStarted=!1;me.gestureTargets=null;me.events=[];me.cancelEvents=[];for(i=0;i<ln;i++){recognizer=recognizers[i];recognizer.reset();recognizer.isActive=!1}
this.callParent()},privates:{removeGhostTouches:function(touches){var ids={},len=touches.length,activeTouches=this.activeTouches,map=this.activeTouchesMap,i,id,touch;for(i=0;i<len;++i){ids[touches[i].identifier]=!0}
i=activeTouches.length;while(i--){touch=activeTouches[i];id=touch.identifier;if(!touches[id]){Ext.Array.remove(activeTouches,touch);delete map[id]}}}}},function(Gesture){var EventProto=Event.prototype,stopPropagation=EventProto.stopPropagation;if(stopPropagation){EventProto.stopPropagation=function(){var me=this,publisher=Gesture.instance,type=me.type,e;if(!me.$extHandled&&publisher.handles[type]){e=new Ext.event.Event(me);publisher.updateTouches(e);publisher.invokeRecognizers('onTouchCancel',e);publisher.reset();publisher.reEnterCountAdjusted=!0}
stopPropagation.apply(me,arguments)}}
Gesture.instance=Ext.$gesturePublisher=new Gesture()})
;
Ext.define('Ext.overrides.event.publisher.Gesture',{override:'Ext.event.publisher.Gesture'},function(){if(Ext.isIE9m){this.override({updateTouches:function(e,isEnd){var browserEvent=e.browserEvent,xy=e.getXY();browserEvent.pageX=xy[0];browserEvent.pageY=xy[1];this.callParent([e,isEnd])},doDelegatedEvent:function(e){this.callParent([Ext.event.Event.enableIEAsync(e)])}})}})
;
Ext.define('Ext.mixin.Templatable',{extend:'Ext.Mixin',mixinConfig:{id:'templatable'},referenceAttributeName:'reference',referenceSelector:'[reference]',getElementConfig:function(){return{reference:'element'}},getElementTemplate:function(){var elementTemplate=document.createDocumentFragment();elementTemplate.appendChild(Ext.Element.create(this.getElementConfig(),!0));return elementTemplate},initElement:function(){var prototype=this.self.prototype;prototype.elementTemplate=this.getElementTemplate();prototype.initElement=prototype.doInitElement;this.initElement.apply(this,arguments)},linkElement:function(reference,node){this.link(reference,node)},doInitElement:function(){var referenceAttributeName=this.referenceAttributeName,renderElement,referenceNodes,i,ln,referenceNode,reference;renderElement=this.elementTemplate.cloneNode(!0);referenceNodes=renderElement.querySelectorAll(this.referenceSelector);for(i=0,ln=referenceNodes.length;i<ln;i++){referenceNode=referenceNodes[i];reference=referenceNode.getAttribute(referenceAttributeName);referenceNode.removeAttribute(referenceAttributeName);this.linkElement(reference,referenceNode)}}})
;
Ext.define('Ext.TaskQueue',{requires:'Ext.AnimationQueue',singleton:!0,pending:!1,mode:!0,protectedReadQueue:[],protectedWriteQueue:[],readQueue:[],writeQueue:[],readRequestId:0,writeRequestId:0,timer:null,constructor:function(){var me=this;me.run=me.run.bind(me);me.runProtected=Ext.Function.bind(me.run,me,[me.protectedReadQueue,me.protectedWriteQueue,'runProtected']);me.runProtected.$skipTimerCheck=!0;if(Ext.os.is.iOS){me.watch.$skipTimerCheck=!0;me.watchdogTimer=Ext.interval(this.watch,500,this)}},requestRead:function(fn,scope,args){var request={id:++this.readRequestId,fn:fn,scope:scope,args:args};if(arguments[3]===!0){this.protectedReadQueue.push(request);this.request(!0,'runProtected')}else{this.readQueue.push(request);this.request(!0)}
return request.id},cancelRead:function(id){this.cancelRequest(this.readQueue,id,!0)},requestWrite:function(fn,scope,args){var me=this,request={id:++me.writeRequestId,fn:fn,scope:scope,args:args};if(arguments[3]===!0){me.protectedWriteQueue.push(request);me.request(!1,'runProtected')}else{me.writeQueue.push(request);me.request(!1)}
return request.id},cancelWrite:function(id){this.cancelRequest(this.writeQueue,id,!1)},request:function(mode,method){var me=this;var oldMode=me.mode;if(!me.pending){me.pendingTime=Date.now();me.pending=!0;me.mode=mode;if(mode){me.timer=Ext.defer(me[method]||me.run,1)}else{me.timer=Ext.raf(me[method]||me.run)}}
if(me.mode===mode&&me.timer){if(oldMode){Ext.undefer(me.timer)}else{Ext.unraf(me.timer)}
if(mode){me.timer=Ext.defer(me[method]||me.run,1)}else{me.timer=Ext.raf(me[method]||me.run)}}},cancelRequest:function(queue,id,mode){var i;for(i=0;i<queue.length;i++){if(queue[i].id===id){queue.splice(i,1);break}}
if(!queue.length&&this.mode===mode&&this.timer){Ext.undefer(this.timer)}},watch:function(){if(this.pending&&Date.now()-this.pendingTime>=500){this.run()}},run:function(readQueue,writeQueue,method){var me=this,mode=null,queue,tasks,task,fn,scope,args,i,len;readQueue=readQueue||me.readQueue;writeQueue=writeQueue||me.writeQueue;me.pending=!1;me.pending=me.timer=!1;if(me.mode){queue=readQueue;if(writeQueue.length>0){mode=!1}}else{queue=writeQueue;if(readQueue.length>0){mode=!0}}
tasks=queue.slice();queue.length=0;for(i=0,len=tasks.length;i<len;i++){task=tasks[i];fn=task.fn;scope=task.scope;args=task.args;if(scope&&(scope.destroying||scope.destroyed)){continue}
if(typeof fn==='string'){fn=scope[fn]}
if(args){fn.apply(scope,args)}else{fn.call(scope)}}
tasks.length=0;if(mode!==null){me.request(mode,method)}},clear:function(){var me=this,timer=me.timer;if(timer){if(me.mode){Ext.undefer(timer)}else{Ext.unraf(timer)}}
me.readQueue.length=me.writeQueue.length=0;me.pending=me.timer=!1;me.mode=!0},privates:{flush:function(){var me=this,mode=me.mode;while(me.readQueue.length||me.writeQueue.length){if(mode){Ext.undefer(me.timer)}else{Ext.unraf(me.timer)}
me.run()}
me.mode=!0}}})
;
Ext.define('Ext.util.sizemonitor.Abstract',{mixins:['Ext.mixin.Templatable'],requires:['Ext.TaskQueue'],config:{element:null,callback:Ext.emptyFn,scope:null,args:[]},width:null,height:null,contentWidth:null,contentHeight:null,constructor:function(config){var me=this;me.refresh=me.refresh.bind(me);me.info={width:0,height:0,contentWidth:0,contentHeight:0,flag:0};me.initElement();me.initConfig(config);me.bindListeners(!0)},bindListeners:Ext.emptyFn,applyElement:function(element){if(element){return Ext.get(element)}},updateElement:function(element){element.append(this.detectorsContainer,!0);element.addCls(Ext.baseCSSPrefix+'size-monitored')},applyArgs:function(args){return args.concat([this.info])},refreshMonitors:Ext.emptyFn,forceRefresh:function(){Ext.TaskQueue.requestRead('refresh',this)},getContentBounds:function(){return this.detectorsContainer.getBoundingClientRect()},getContentWidth:function(){return this.detectorsContainer.clientWidth},getContentHeight:function(){return this.detectorsContainer.clientHeight},refreshSize:function(){var element=this.getElement();if(!element||element.destroyed){return!1}
var me=this,size=element.measure(),width=size.width,height=size.height,contentWidth=me.getContentWidth(),contentHeight=me.getContentHeight(),currentContentWidth=me.contentWidth,currentContentHeight=me.contentHeight,info=me.info,resized=!1,flag;me.width=width;me.height=height;me.contentWidth=contentWidth;me.contentHeight=contentHeight;flag=((currentContentWidth!==contentWidth?1:0)+(currentContentHeight!==contentHeight?2:0));if(flag>0){info.width=width;info.height=height;info.contentWidth=contentWidth;info.contentHeight=contentHeight;info.flag=flag;resized=!0;me.getCallback().apply(me.getScope(),me.getArgs())}
return resized},refresh:function(){if(this.destroying||this.destroyed){return}
this.refreshSize();Ext.TaskQueue.requestWrite('refreshMonitors',this)},destroy:function(){var me=this,element=me.getElement();me.bindListeners(!1);if(element&&!element.destroyed){element.removeCls(Ext.baseCSSPrefix+'size-monitored')}
delete me._element;me.refresh=null;me.callParent()}})
;
Ext.define('Ext.util.sizemonitor.Scroll',{extend:'Ext.util.sizemonitor.Abstract',getElementConfig:function(){return{reference:'detectorsContainer',classList:[Ext.baseCSSPrefix+'size-monitors','scroll'],children:[{reference:'expandMonitor',className:'expand'},{reference:'shrinkMonitor',className:'shrink'}]}},constructor:function(config){this.onScroll=this.onScroll.bind(this);this.callParent(arguments)},bindListeners:function(bind){var method=bind?'addEventListener':'removeEventListener';this.expandMonitor[method]('scroll',this.onScroll,!0);this.shrinkMonitor[method]('scroll',this.onScroll,!0)},onScroll:function(){if(!this.destroyed){Ext.TaskQueue.requestRead('refresh',this)}},refreshMonitors:function(){var expandMonitor=this.expandMonitor,shrinkMonitor=this.shrinkMonitor,end=1000000;if(expandMonitor&&!expandMonitor.destroyed){expandMonitor.scrollLeft=end;expandMonitor.scrollTop=end}
if(shrinkMonitor&&!shrinkMonitor.destroyed){shrinkMonitor.scrollLeft=end;shrinkMonitor.scrollTop=end}},destroy:function(){this.onScroll=null;this.callParent()}})
;
Ext.define('Ext.util.SizeMonitor',{requires:['Ext.util.sizemonitor.Scroll'],constructor:function(config){return new Ext.util.sizemonitor.Scroll(config)}})
;
Ext.define('Ext.event.publisher.ElementSize',{extend:'Ext.event.publisher.Publisher',requires:['Ext.util.SizeMonitor'],type:'size',handledEvents:['resize'],constructor:function(){this.monitors={};this.subscribers={};this.callParent(arguments)},subscribe:function(element){var id=element.id,subscribers=this.subscribers,monitors=this.monitors;if(subscribers[id]){++subscribers[id]}else{subscribers[id]=1;monitors[id]=new Ext.util.SizeMonitor({element:element,callback:this.onElementResize,scope:this,args:[element]})}
element.on('painted','forceRefresh',monitors[id]);return!0},unsubscribe:function(element){var id=element.id,subscribers=this.subscribers,monitors=this.monitors,sizeMonitor;if(subscribers[id]&&!--subscribers[id]){delete subscribers[id];sizeMonitor=monitors[id];element.un('painted','forceRefresh',sizeMonitor);sizeMonitor.destroy();delete monitors[id]}
if(element.activeRead){Ext.TaskQueue.cancelRead(element.activeRead)}},fireElementResize:function(element,info){delete element.activeRead;this.fire(element,'resize',[element,info])},onElementResize:function(element,info){if(!element.activeRead){element.activeRead=Ext.TaskQueue.requestRead('fireElementResize',this,[element,info],!!element.$skipResourceCheck)}},privates:{syncRefresh:function(elements){var el,monitor,i,len;elements=Ext.Array.from(elements);for(i=0,len=elements.length;i<len;++i){el=elements[i];if(typeof el!=='string'){el=el.id}
monitor=this.monitors[el];if(monitor){monitor.forceRefresh()}}
Ext.TaskQueue.flush();Ext.Function.fireElevatedHandlers()}}},function(ElementSize){ElementSize.instance=new ElementSize()})
;
Ext.define('Ext.util.paintmonitor.Abstract',{config:{element:null,callback:Ext.emptyFn,scope:null,args:[]},eventName:'',monitorClass:'',constructor:function(config){this.onElementPainted=this.onElementPainted.bind(this);this.initConfig(config)},bindListeners:function(bind){this.monitorElement[bind?'addEventListener':'removeEventListener'](this.eventName,this.onElementPainted,!0)},applyElement:function(element){if(element){return Ext.get(element)}},updateElement:function(element){this.monitorElement=Ext.Element.create({classList:[Ext.baseCSSPrefix+'paint-monitor',this.monitorClass]},!0);element.appendChild(this.monitorElement,!0);element.addCls(Ext.baseCSSPrefix+'paint-monitored');this.bindListeners(!0)},onElementPainted:function(){},destroy:function(){var me=this,monitorElement=me.monitorElement,parentNode=monitorElement.parentNode,element=me.getElement();me.bindListeners(!1);delete me.monitorElement;if(element&&!element.destroyed){element.removeCls(Ext.baseCSSPrefix+'paint-monitored');delete me._element}
if(parentNode){parentNode.removeChild(monitorElement)}
me.callParent()}})
;
Ext.define('Ext.util.paintmonitor.CssAnimation',{extend:'Ext.util.paintmonitor.Abstract',eventName:Ext.browser.is.WebKit?'webkitAnimationEnd':'animationend',monitorClass:'cssanimation',onElementPainted:function(e){if(e.animationName===Ext.baseCSSPrefix+'paint-monitor-helper'){this.getCallback().apply(this.getScope(),this.getArgs())}}})
;
Ext.define('Ext.util.PaintMonitor',{requires:['Ext.util.paintmonitor.CssAnimation'],constructor:function(config){return new Ext.util.paintmonitor.CssAnimation(config)}})
;
Ext.define('Ext.event.publisher.ElementPaint',{extend:'Ext.event.publisher.Publisher',requires:['Ext.util.PaintMonitor','Ext.TaskQueue'],type:'paint',handledEvents:['painted'],constructor:function(){this.monitors={};this.subscribers={};this.callParent(arguments)},subscribe:function(element){var me=this,id=element.id,subscribers=me.subscribers;if(subscribers[id]){++subscribers[id]}else{subscribers[id]=1;me.monitors[id]=new Ext.util.PaintMonitor({element:element,callback:me.onElementPainted,scope:me,args:[element]})}},unsubscribe:function(element){var id=element.id,subscribers=this.subscribers,monitors=this.monitors;if(subscribers[id]&&!--subscribers[id]){delete subscribers[id];monitors[id].destroy();delete monitors[id]}
if(element.activeRead){Ext.TaskQueue.cancelRead(element.activeRead)}},fireElementPainted:function(element){delete element.activeRead;this.fire(element,'painted',[element])},onElementPainted:function(element){if(!element.activeRead){element.activeRead=Ext.TaskQueue.requestRead('fireElementPainted',this,[element],!!element.$skipResourceCheck)}}},function(ElementPaint){ElementPaint.instance=new ElementPaint()})
;
Ext.define('Ext.dom.Element',function(Element){var WIN=window,DOC=document,docEl=DOC.documentElement,WIN_TOP=WIN.top,EMPTY=[],elementIdCounter,windowId,documentId,WIDTH='width',HEIGHT='height',MIN_WIDTH='min-width',MIN_HEIGHT='min-height',MAX_WIDTH='max-width',MAX_HEIGHT='max-height',TOP='top',RIGHT='right',BOTTOM='bottom',LEFT='left',VISIBILITY='visibility',HIDDEN='hidden',DISPLAY="display",NONE="none",ZINDEX="z-index",POSITION="position",RELATIVE="relative",STATIC="static",wordsRe=/\w/g,spacesRe=/\s+/,classNameSplitRegex=/[\s]+/,transparentRe=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,endsQuestionRe=/\?$/,topRe=/top/i,empty={},borders={t:'border-top-width',r:'border-right-width',b:'border-bottom-width',l:'border-left-width'},paddings={t:'padding-top',r:'padding-right',b:'padding-bottom',l:'padding-left'},margins={t:'margin-top',r:'margin-right',b:'margin-bottom',l:'margin-left'},selectDir={b:'backward',back:'backward',f:'forward'},paddingsTLRB=[paddings.l,paddings.r,paddings.t,paddings.b],bordersTLRB=[borders.l,borders.r,borders.t,borders.b],numberRe=/\d+$/,unitRe=/\d+(px|r?em|%|vh|vw|vmin|vmax|en|ch|ex|pt|in|cm|mm|pc)$/i,defaultUnit='px',msRe=/^-ms-/,camelRe=/(-[a-z])/gi,cssRe=/([a-z0-9\-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,pxRe=/^\d+(?:\.\d*)?px$/i,relativeUnitRe=/(%|r?em|auto|vh|vw|vmin|vmax|ch|ex)$/i,propertyCache={},ORIGINALDISPLAY='originalDisplay',camelReplaceFn=function(m,a){return a.charAt(1).toUpperCase()},clearData=function(node,deep){var childNodes,i,len;if(node.nodeType===1){node._extData=null;if(deep){childNodes=node.childNodes;for(i=0,len=childNodes.length;i<len;++i){clearData(childNodes[i],deep)}}}},toFloat=function(v){return parseFloat(v)||0},opacityCls=Ext.baseCSSPrefix+'hidden-opacity',visibilityCls=Ext.baseCSSPrefix+'hidden-visibility',displayCls=Ext.baseCSSPrefix+'hidden-display',offsetsCls=Ext.baseCSSPrefix+'hidden-offsets',clipCls=Ext.baseCSSPrefix+'hidden-clip',lastFocusChange=0,lastKeyboardClose=0,editableHasFocus=!1,isVirtualKeyboardOpen=!1,inputTypeSelectionSupported=/text|password|search|tel|url/i,visFly,scrollFly,caFly,wrapFly,grannyFly,activeElFly;try{elementIdCounter=WIN_TOP.__elementIdCounter__;WIN_TOP.__elementIdCounter__=elementIdCounter}catch(e){WIN_TOP=WIN}
WIN_TOP.__elementIdCounter__=elementIdCounter=(WIN_TOP.__elementIdCounter__||0)+1;windowId='ext-window-'+elementIdCounter;documentId='ext-document-'+elementIdCounter;if(Object.freeze){Object.freeze(EMPTY)}
return{alternateClassName:['Ext.Element'],mixins:['Ext.util.Positionable','Ext.mixin.Observable'],requires:['Ext.dom.Shadow','Ext.dom.Shim','Ext.dom.ElementEvent','Ext.event.publisher.Dom','Ext.event.publisher.Gesture','Ext.event.publisher.ElementSize','Ext.event.publisher.ElementPaint'],uses:['Ext.dom.Helper','Ext.dom.CompositeElement','Ext.dom.Fly','Ext.dom.TouchAction','Ext.event.publisher.Focus'],observableType:'element',isElement:!0,skipGarbageCollection:!0,$applyConfigs:!0,identifiablePrefix:'ext-element-',_selectDir:selectDir,styleHooks:{transform:{set:function(dom,value,el){var result='',prop;if(typeof value!=='string'){for(prop in value){if(result){result+=' '}
if(prop.indexOf('translate')===0){result+=prop+'('+Element.addUnits(value[prop],'px')+')'}else{result+=prop+'('+value[prop]+')'}}
value=result}
dom.style.transform=value}}},validIdRe:Ext.validIdRe,blockedEvents:Ext.supports.EmulatedMouseOver?{mouseover:1}:{},longpressEvents:{longpress:1,taphold:1},constructor:function(dom){var me=this,id;if(typeof dom==='string'){dom=DOC.getElementById(dom)}
if(!dom){Ext.raise("Invalid domNode reference or an id of an existing domNode: "+dom);return null}
if(Ext.cache[dom.id]){Ext.raise("Element cache already contains an entry for id '"+dom.id+"'.  Use Ext.get() to create or retrieve Element instances.")}
me.dom=dom;if(!(id=dom.id)){dom.id=id=me.generateAutoId()}
me.id=id;if(!me.validIdRe.test(me.id)){Ext.raise('Invalid Element "id": "'+me.id+'"')}
me.el=me;Ext.cache[id]=me;me.longpressListenerCount=0;me.mixins.observable.constructor.call(me)},inheritableStatics:{cache:Ext.cache={},editableSelector:'input,textarea,[contenteditable="true"]',VISIBILITY:1,DISPLAY:2,OFFSETS:3,CLIP:4,OPACITY:5,minKeyboardHeight:100,unitRe:unitRe,useDelegatedEvents:!0,validNodeTypes:{1:1,9:1},namespaceURIs:{html:'http://www.w3.org/1999/xhtml',svg:'http://www.w3.org/2000/svg'},selectableCls:Ext.baseCSSPrefix+'selectable',unselectableCls:Ext.baseCSSPrefix+'unselectable',maxRippleDiameter:75,addUnits:function(size,units){if(typeof size==='number'){return size+(units||defaultUnit)}
if(size===""||size==="auto"||size==null){return size||''}
if(numberRe.test(size)){return size+(units||defaultUnit)}
if(!unitRe.test(size)){if(!(Ext.isString(size)&&size.indexOf('calc')===0)){Ext.Logger.warn("Warning, size detected ("+size+") not a valid property value on Element.addUnits.")}
return size||''}
return size},create:function(attributes,domNode,namespace){var me=this,classes,element,elementStyle,tag,value,name,i,ln,tmp,ns;attributes=attributes||{};if(attributes.isElement){return domNode?attributes.dom:attributes}else if('nodeType' in attributes){return domNode?attributes:Ext.get(attributes)}
if(typeof attributes==='string'){return DOC.createTextNode(attributes)}
tag=attributes.tag;if(!tag){tag='div'}
ns=attributes.namespace||namespace;if(ns){element=DOC.createElementNS(me.namespaceURIs[ns]||ns,tag)}else{element=DOC.createElement(tag)}
elementStyle=element.style;for(name in attributes){if(name!=='tag'&&name!=='namespace'){value=attributes[name];switch(name){case 'style':if(typeof value==='string'){element.setAttribute(name,value)}else{for(i in value){elementStyle[i]=value[i]}}
break;case 'className':case 'cls':tmp=value.split(spacesRe);classes=classes?classes.concat(tmp):tmp;break;case 'classList':classes=classes?classes.concat(value):value;break;case 'text':element.textContent=value;break;case 'html':element.innerHTML=value;break;case 'hidden':if(classes){classes.push(displayCls)}else{classes=[displayCls]}
break;case 'children':if(value!=null){for(i=0,ln=value.length;i<ln;i++){element.appendChild(me.create(value[i],!0,ns))}}
break;default:if(value!=null){element.setAttribute(name,value)}}}}
if(classes){element.className=classes.join(' ')}
if(domNode){return element}else{return me.get(element)}},fly:function(dom,named){return Ext.fly(dom,named)},fromPoint:(function(){var elementFromPointBug;if(Ext.isIE||Ext.isEdge){try{elementFromPointBug=window.self!==window.top}catch(e){elementFromPointBug=!0}}
return function(x,y,asDom){var el=null;el=DOC.elementFromPoint(x,y);if(!el&&elementFromPointBug){el=DOC.elementFromPoint(x,y)}
return asDom?el:Ext.get(el)}})(),fromPagePoint:function(x,y,asDom){var scroll=Ext.getDoc().getScroll();return Element.fromPoint(x-scroll.left,y-scroll.top,asDom)},get:function(el){var me=this,cache=Ext.cache,nodeType,dom,id,entry,isDoc,isWin,isValidNodeType;if(!el){return null}
function warnDuplicate(id){Ext.raise("DOM element with id "+id+" in Element cache is not the same as element in the DOM. "+"Make sure to clean up Element instances using destroy()")}
if(el.isFly){el=el.dom}
if(typeof el==='string'){id=el;if(cache.hasOwnProperty(id)){entry=cache[id];if(entry.skipGarbageCollection||!Ext.isGarbage(entry.dom)){dom=Ext.getElementById?Ext.getElementById(id):DOC.getElementById(id);if(dom&&(dom!==entry.dom)){warnDuplicate(id)}
return entry}else{entry.destroy()}}
if(id===windowId){return Element.get(WIN)}else if(id===documentId){return Element.get(DOC)}
dom=Ext.getElementById?Ext.getElementById(id):DOC.getElementById(id);if(dom){return new Element(dom)}}
nodeType=el.nodeType;if(nodeType){isDoc=(nodeType===9);isValidNodeType=me.validNodeTypes[nodeType]}else{isWin=(el.window==el)}
if(isValidNodeType||isWin){id=el.id;if(el===DOC){el.id=id=documentId}else if(el==WIN){el.id=id=windowId}
if(cache.hasOwnProperty(id)){entry=cache[id];if(entry.skipGarbageCollection||el===entry.dom||!Ext.isGarbage(entry.dom)){if(el!==entry.dom){warnDuplicate(id)}
return entry}else{entry.destroy()}}
el=new Element(el);if(isWin||isDoc){el.skipGarbageCollection=!0}
return el}
if(el.isElement){return el}
if(el.isComposite){return el}
if(Ext.isIterable(el)){return me.select(el)}
return null},getActiveElement:function(asElement){var active=DOC.activeElement;if(!active||!active.focus){active=DOC.body}
return asElement?Ext.get(active):active},getDocumentHeight:function(){return Math.max(!Ext.isStrict?DOC.body.scrollHeight:docEl.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return Math.max(!Ext.isStrict?DOC.body.scrollWidth:docEl.scrollWidth,this.getViewportWidth())},getOrientation:function(){if(Ext.supports.OrientationChange){return(WIN.orientation==0)?'portrait':'landscape'}
return(WIN.innerHeight>WIN.innerWidth)?'portrait':'landscape'},getViewportHeight:function(){var viewportHeight=Element._viewportHeight;if(Ext.isIE9m){return DOC.documentElement.clientHeight}
return(viewportHeight!=null)?viewportHeight:docEl.clientHeight},getViewportWidth:function(){var viewportWidth=Element._viewportWidth;if(Ext.isIE9m){return DOC.documentElement.clientWidth}
return(viewportWidth!=null)?viewportWidth:docEl.clientWidth},getViewportScale:function(){var top=WIN_TOP;return((Ext.isiOS||Ext.isAndroid)?1:(top.devicePixelRatio||top.screen.deviceXDPI/top.screen.logicalXDPI))*this.getViewportTouchScale()},getViewportTouchScale:function(forceRead){var scale=1,top=WIN_TOP,cachedScale;if(!forceRead){cachedScale=this._viewportTouchScale;if(cachedScale){return cachedScale}}
if(Ext.isIE10p||Ext.isEdge||Ext.isiOS){scale=docEl.offsetWidth/WIN.innerWidth}else if(Ext.isChromeMobile){scale=top.outerWidth/top.innerWidth}
return scale},getViewSize:function(){return{width:Element.getViewportWidth(),height:Element.getViewportHeight()}},hasUnit:function(size){return!!(size&&unitRe.test(size))},isRelativeUnit:function(size){return!size||relativeUnitRe.test(size)},maskIframes:function(){var iframes=document.getElementsByTagName('iframe'),fly=new Ext.dom.Fly();Ext.each(iframes,function(iframe){var myMask;myMask=fly.attach(iframe.parentNode).mask();myMask.setStyle('background-color','transparent')})},normalize:function(prop){return propertyCache[prop]||(propertyCache[prop]=prop.replace(msRe,'ms-').replace(camelRe,camelReplaceFn))},_onWindowFocusChange:function(e){if(Ext.fly(e.target).is(Element.editableSelector)){lastFocusChange=new Date();editableHasFocus=(e.type==='focusin'||e.type==='pointerup')}},_onWindowResize:function(){var documentWidth=docEl.clientWidth,documentHeight=docEl.clientHeight,now=new Date(),threshold=1000,deltaX,deltaY;deltaX=documentWidth-Element._documentWidth;deltaY=documentHeight-Element._documentHeight;Element._documentWidth=documentWidth;Element._documentHeight=documentHeight;if(((now-lastFocusChange)<threshold)||((now-lastKeyboardClose)<threshold)){if(deltaX===0&&(editableHasFocus&&(deltaY<=-Element.minKeyboardHeight))){isVirtualKeyboardOpen=!0;return}}
if(isVirtualKeyboardOpen&&(deltaX===0)&&(deltaY>=Element.minKeyboardHeight)){isVirtualKeyboardOpen=!1;lastKeyboardClose=new Date()}
if(isVirtualKeyboardOpen){return}
Element._viewportWidth=documentWidth;Element._viewportHeight=documentHeight},parseBox:function(box){var type,parts,ln;box=box||0;type=typeof box;if(type==='number'){return{top:box,right:box,bottom:box,left:box}}else if(type!=='string'){return box}
parts=box.split(' ');ln=parts.length;if(ln===1){parts[1]=parts[2]=parts[3]=parts[0]}else if(ln===2){parts[2]=parts[0];parts[3]=parts[1]}else if(ln===3){parts[3]=parts[1]}
return{top:parseFloat(parts[0])||0,right:parseFloat(parts[1])||0,bottom:parseFloat(parts[2])||0,left:parseFloat(parts[3])||0}},parseStyles:function(styles){var out={},matches;if(styles){cssRe.lastIndex=0;while((matches=cssRe.exec(styles))){out[matches[1]]=matches[2]||''}}
return out},select:function(selector,composite,root){return Ext.fly(root||DOC).select(selector,composite)},query:function(selector,asDom,root){return Ext.fly(root||DOC).query(selector,asDom)},unitizeBox:function(box,units){var me=this;box=me.parseBox(box);return me.addUnits(box.top,units)+' '+me.addUnits(box.right,units)+' '+me.addUnits(box.bottom,units)+' '+me.addUnits(box.left,units)},unmaskIframes:function(){var iframes=document.getElementsByTagName('iframe'),fly=new Ext.dom.Fly();Ext.each(iframes,function(iframe){fly.attach(iframe.parentNode).unmask()})},serializeForm:function(form){var fElements=form.elements||(DOC.forms[form]||Ext.getDom(form)).elements,hasSubmit=!1,encoder=encodeURIComponent,data='',eLen=fElements.length,element,name,type,options,hasValue,e,o,oLen,opt;for(e=0;e<eLen;e++){element=fElements[e];name=element.name;type=element.type;options=element.options;if(!element.disabled&&name){if(/select-(one|multiple)/i.test(type)){oLen=options.length;for(o=0;o<oLen;o++){opt=options[o];if(opt.selected){hasValue=opt.hasAttribute('value');data+=Ext.String.format('{0}={1}&',encoder(name),encoder(hasValue?opt.value:opt.text))}}}else if(!(/file|undefined|reset|button/i.test(type))){if(!(/radio|checkbox/i.test(type)&&!element.checked)&&!(type==='submit'&&hasSubmit)){data+=encoder(name)+'='+encoder(element.value)+'&';hasSubmit=/submit/i.test(type)}}}}
return data.substr(0,data.length-1)},getCommonAncestor:function(nodeA,nodeB,returnDom){caFly=caFly||new Ext.dom.Fly();caFly.attach(Ext.getDom(nodeA));while(!caFly.isAncestor(nodeB)){if(caFly.dom.parentNode){caFly.attach(caFly.dom.parentNode)}else{caFly.attach(DOC.body);break}}
return returnDom?caFly.dom:Ext.get(caFly)}},selectable:function(){var me=this;me.dom.unselectable='';me.removeCls(Element.unselectableCls);me.addCls(Element.selectableCls);return me},unselectable:function(){var me=this;if(Ext.isOpera){me.dom.unselectable='on'}
me.removeCls(Element.selectableCls);me.addCls(Element.unselectableCls);return me},statics:{tabbableSelector:Ext.supports.CSS3NegationSelector?'a[href],button,iframe,input,select,textarea,[tabindex]:not([tabindex="-1"]),[contenteditable="true"]':'a[href],button,iframe,input,select,textarea,[tabindex],[contenteditable="true"]',naturallyFocusableTags:{BUTTON:!0,IFRAME:!0,EMBED:!0,INPUT:!0,OBJECT:!0,SELECT:!0,TEXTAREA:!0,HTML:Ext.isIE?!0:!1,BODY:Ext.isIE?!1:!0},naturallyTabbableTags:{BUTTON:!0,IFRAME:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0,OBJECT:Ext.isIE8m?!0:!1},inputTags:{INPUT:!0,TEXTAREA:!0},tabbableSavedCounterAttribute:'data-tabindex-counter',tabbableSavedValueAttribute:'data-tabindex-value',splitCls:function(cls){if(typeof cls==='string'){cls=cls.split(spacesRe)}
return cls}},_init:function(E){E.tabbableSelector+=',['+E.tabbableSavedCounterAttribute+']'},addCls:function(names,prefix,suffix){return this.replaceCls(null,names,prefix,suffix)},addClsOnClick:function(className,testFn,scope){var me=this,hasTest=Ext.isFunction(testFn);me.on("mousedown",function(){if(hasTest&&testFn.call(scope||me,me)===!1){return!1}
me.addCls(className);Ext.getDoc().on({mouseup:function(){if(me.dom){me.removeCls(className)}},single:!0})});return me},addClsOnFocus:function(className,testFn,scope){var me=this,hasTest=Ext.isFunction(testFn);me.on("focus",function(){if(hasTest&&testFn.call(scope||me,me)===!1){return!1}
me.addCls(className)});me.on("blur",function(){if(me.dom){me.removeCls(className)}});return me},addClsOnOver:function(className,testFn,scope){var me=this,hasTest=Ext.isFunction(testFn);me.hover(function(){if(hasTest&&testFn.call(scope||me,me)===!1){return}
me.addCls(className)},function(){me.removeCls(className)});return me},addStyles:function(sides,styles){var totalSize=0,sidesArr=(sides||'').match(wordsRe),styleSides=[],len=sidesArr.length,side,i;if(len===1){totalSize=parseFloat(this.getStyle(styles[sidesArr[0]]))||0}else if(len){for(i=0;i<len;i++){side=sidesArr[i];styleSides.push(styles[side])}
styleSides=this.getStyle(styleSides);for(i=0;i<len;i++){side=sidesArr[i];totalSize+=parseFloat(styleSides[styles[side]])||0}}
return totalSize},addUnits:function(size,units){return Element.addUnits(size,units)},animate:function(animation){animation=new Ext.fx.Animation(animation);animation.setElement(this);this._activeAnimation=animation;animation.on({animationend:this._onAnimationEnd,scope:this});Ext.Animator.run(animation);return animation},_onAnimationEnd:function(){this._activeAnimation=null},getActiveAnimation:function(){return this._activeAnimation},append:function(){return this.appendChild.apply(this,arguments)},appendChild:function(el,returnDom){var me=this,insertEl,eLen,e;if(el.nodeType||el.dom||typeof el==='string'){el=Ext.getDom(el);me.dom.appendChild(el);return!returnDom?Ext.get(el):el}else if(el.length){insertEl=Ext.fly(DOC.createDocumentFragment());eLen=el.length;for(e=0;e<eLen;e++){insertEl.appendChild(el[e],returnDom)}
el=Ext.Array.toArray(insertEl.dom.childNodes);me.dom.appendChild(insertEl.dom);return returnDom?el:new Ext.dom.CompositeElementLite(el)}else{return me.createChild(el,null,returnDom)}},appendTo:function(el){Ext.getDom(el).appendChild(this.dom);return this},applyStyles:function(styles){if(styles){if(typeof styles==="function"){styles=styles.call()}
if(typeof styles==="string"){styles=Element.parseStyles(styles)}
if(typeof styles==="object"){this.setStyle(styles)}}
return this},blur:function(){var me=this,dom=me.dom;if(dom!==DOC.body){try{dom.blur()}catch(e){}
return me}else{return me.focus(undefined,dom)}},cacheScrollValues:function(){var me=this,scrollValues=[],scrolledDescendants=[],descendants,descendant,i,len;scrollFly=scrollFly||new Ext.dom.Fly();descendants=me.query('*');for(i=0,len=descendants.length;i<len;i++){descendant=descendants[i];if(descendant.scrollTop>0||descendant.scrollLeft!==0){scrolledDescendants.push(descendant);scrollValues.push(scrollFly.attach(descendant).getScroll())}}
return function(){var scroll,i,len;for(i=0,len=scrolledDescendants.length;i<len;i++){scroll=scrollValues[i];scrollFly.attach(scrolledDescendants[i]);scrollFly.setScrollLeft(scroll.left);scrollFly.setScrollTop(scroll.top)}}},center:function(centerIn){return this.alignTo(centerIn||DOC,'c-c')},child:function(selector,returnDom){var me=this,id;if(Ext.supports.Selectors2){return me.selectNode(':scope>'+selector,!!returnDom)}else{id=me.id!=null?me.id:Ext.get(me).id;return me.selectNode(Ext.makeIdSelector(id)+" > "+selector,!!returnDom)}},clone:function(deep,returnDom){var clone=this.dom.cloneNode(deep);if(Ext.supports.CloneNodeCopiesExpando){clearData(clone,deep)}
return returnDom?clone:Ext.get(clone)},constrainScrollLeft:function(left){var dom=this.dom;return Math.max(Math.min(left,dom.scrollWidth-dom.clientWidth),0)},constrainScrollTop:function(top){var dom=this.dom;return Math.max(Math.min(top,dom.scrollHeight-dom.clientHeight),0)},createChild:function(config,insertBefore,returnDom){config=config||{tag:'div'};if(insertBefore){return Ext.DomHelper.insertBefore(insertBefore,config,returnDom!==!0)}else{return Ext.DomHelper.append(this.dom,config,returnDom!==!0)}},contains:function(element){if(!element){return!1}
var me=this,dom=Ext.getDom(element);return(dom===me.dom)||me.isAncestor(dom)},destroy:function(){var me=this,dom=me.dom;if(me.destroyed){Ext.Logger.warn("Cannot destroy Element \""+me.id+"\". Already destroyed.");return}
if(me.resumeFocusEventsTimer){Ext.unasap(me.resumeFocusEventsTimer);me.resumeFocusEventsTimer=null}
if(me.repaintTimer){me.repaintTimer=Ext.undefer(me.repaintTimer)}
if(me.deferFocusTimer){me.deferFocusTimer=Ext.undefer(me.deferFocusTimer)}
if(dom){if(dom===DOC.body){Ext.raise("Cannot destroy body element.")}else if(dom===DOC){Ext.raise("Cannot destroy document object.")}else if(dom===WIN){Ext.raise("Cannot destroy window object")}}
if(dom&&dom.parentNode){dom.parentNode.removeChild(dom)}
if(me.$ripples){me.destroyAllRipples()}
me.collect()},detach:function(){var dom=this.dom,component=this.component;if(dom&&dom.parentNode&&dom.tagName!=='BODY'){if(component){component.revertFocus()}
dom.parentNode.removeChild(dom)}
return this},disableShadow:function(){var shadow=this.shadow;if(shadow){shadow.hide();shadow.disabled=!0}},disableShim:function(){var shim=this.shim;if(shim){shim.hide();shim.disabled=!0}},doReplaceWith:function(element){var dom=this.dom;dom.parentNode.replaceChild(Ext.getDom(element),dom)},doScrollIntoView:function(container,hscroll,animate,highlight,getScrollX,scrollTo){scrollFly=scrollFly||new Ext.dom.Fly();var me=this,dom=me.dom,scrollX=scrollFly.attach(container)[getScrollX](),scrollY=container.scrollTop,position=me.getScrollIntoViewXY(container,scrollX,scrollY),newScrollX=position.x,newScrollY=position.y;if(highlight){if(animate){animate=Ext.apply({listeners:{afteranimate:function(){scrollFly.attach(dom).highlight()}}},animate)}else{scrollFly.attach(dom).highlight()}}
if(newScrollY!==scrollY){scrollFly.attach(container).scrollTo('top',newScrollY,animate)}
if(hscroll!==!1&&(newScrollX!==scrollX)){scrollFly.attach(container)[scrollTo]('left',newScrollX,animate)}
return me},down:function(selector,returnDom){return this.selectNode(selector,!!returnDom)},enableShadow:function(options,isVisible){var me=this,shadow=me.shadow||(me.shadow=new Ext.dom.Shadow(Ext.apply({target:me},options))),shim=me.shim;if(shim){shim.offsets=shadow.outerOffsets;shim.shadow=shadow;shadow.shim=shim}
if(isVisible===!0||(isVisible!==!1&&me.isVisible())){shadow.show()}else{shadow.hide()}
shadow.disabled=!1},enableShim:function(options,isVisible){var me=this,shim=me.shim||(me.shim=new Ext.dom.Shim(Ext.apply({target:me},options))),shadow=me.shadow;if(shadow){shim.offsets=shadow.outerOffsets;shim.shadow=shadow;shadow.shim=shim}
if(isVisible===!0||(isVisible!==!1&&me.isVisible())){shim.show()}else{shim.hide()}
shim.disabled=!1;return shim},findParent:function(simpleSelector,limit,returnEl){var me=this,target=me.dom,topmost=docEl,depth=0;if(limit||limit===0){if(typeof limit!=='number'){topmost=Ext.getDom(limit);limit=Number.MAX_VALUE}}else{limit=50}
while(target&&target.nodeType===1&&depth<limit&&target!==topmost){if(Ext.fly(target).is(simpleSelector)){return returnEl?Ext.get(target):target}
depth++;target=target.parentNode}
return null},findParentNode:function(simpleSelector,limit,returnEl){var p=Ext.fly(this.dom.parentNode);return p?p.findParent(simpleSelector,limit,returnEl):null},first:function(selector,returnDom){return this.matchNode('nextSibling','firstChild',selector,returnDom)},focus:function(defer,dom){var me=this;dom=dom||me.dom;if(Number(defer)){Ext.defer(me.focus,defer,me,[null,dom])}else{Ext.fireEvent('beforefocus',dom);dom.focus()}
return me},collect:function(){var me=this,dom=me.dom,shadow=me.shadow,shim=me.shim;if(!me.isFly){me.mixins.observable.destroy.call(me);delete Ext.cache[me.id];me.el=null}
if(dom){dom._extData=me.dom=null}
if(shadow){shadow.hide();me.shadow=null}
if(shim){shim.hide();me.shim=null}},getAnchorToXY:function(el,anchor,local,mySize){return el.getAnchorXY(anchor,local,mySize)},getAttribute:function(name,namespace){var dom=this.dom;return namespace?(dom.getAttributeNS(namespace,name)||dom.getAttribute(namespace+":"+name)):(dom.getAttribute(name)||dom[name]||null)},getAttributes:function(){var attributes=this.dom.attributes,result={},attr,i,len;for(i=0,len=attributes.length;i<len;i++){attr=attributes[i];result[attr.name]=attr.value}
return result},getBottom:function(local){return(local?this.getLocalY():this.getY())+this.getHeight()},getById:function(id,asDom){var dom=DOC.getElementById(id)||this.dom.querySelector(Ext.makeIdSelector(id));return asDom?dom:(dom?Ext.get(dom):null)},getBorderPadding:function(){var paddingWidth=this.getStyle(paddingsTLRB),bordersWidth=this.getStyle(bordersTLRB);return{beforeX:(parseFloat(bordersWidth[borders.l])||0)+(parseFloat(paddingWidth[paddings.l])||0),afterX:(parseFloat(bordersWidth[borders.r])||0)+(parseFloat(paddingWidth[paddings.r])||0),beforeY:(parseFloat(bordersWidth[borders.t])||0)+(parseFloat(paddingWidth[paddings.t])||0),afterY:(parseFloat(bordersWidth[borders.b])||0)+(parseFloat(paddingWidth[paddings.b])||0)}},getBorders:function(){var bordersWidth=this.getStyle(bordersTLRB);return{beforeX:(parseFloat(bordersWidth[borders.l])||0),afterX:(parseFloat(bordersWidth[borders.r])||0),beforeY:(parseFloat(bordersWidth[borders.t])||0),afterY:(parseFloat(bordersWidth[borders.b])||0)}},getBorderWidth:function(side){return this.addStyles(side,borders)},getClassMap:function(clone){var data=this.getData();if(data){data=data.classMap;if(clone!==!1){data=Ext.apply({},data)}}
return data},getData:function(sync){var dom=this.dom,data;if(dom){data=dom._extData||(dom._extData={});if(sync!==!1&&!data.isSynchronized){this.synchronize()}}
return data||null},getFirstChild:function(){return Ext.get(this.dom.firstElementChild)},getLastChild:function(){return Ext.get(this.dom.lastElementChild)},getHeight:function(contentHeight,preciseHeight){var me=this,dom=me.dom,hidden=me.isStyle('display','none'),height,floating;if(hidden){return 0}
if(dom.nodeName==='BODY'){height=Element.getViewportHeight()}else{if(preciseHeight){height=dom.getBoundingClientRect().height}else{height=dom.offsetHeight;if(height==null){height=dom.getBoundingClientRect().height}}}
if(Ext.supports.Direct2DBug){floating=me.adjustDirect2DDimension(HEIGHT);if(preciseHeight){height+=floating}else if(floating>0&&floating<0.5){height++}}
if(contentHeight){height-=me.getBorderWidth("tb")+me.getPadding("tb")}
return(height<0)?0:height},getHtml:function(){return this.dom?this.dom.innerHTML:''},getLeft:function(local){return local?this.getLocalX():this.getX()},getLocalX:function(){var me=this,offsetParent,x=me.getStyle('left');if(!x||x==='auto'){x=0}else if(pxRe.test(x)){x=parseFloat(x)}else{x=me.getX();offsetParent=me.dom.offsetParent;if(offsetParent){x-=Ext.fly(offsetParent).getX()}}
return x},getLocalXY:function(){var me=this,offsetParent,style=me.getStyle(['left','top']),x=style.left,y=style.top;if(!x||x==='auto'){x=0}else if(pxRe.test(x)){x=parseFloat(x)}else{x=me.getX();offsetParent=me.dom.offsetParent;if(offsetParent){x-=Ext.fly(offsetParent).getX()}}
if(!y||y==='auto'){y=0}else if(pxRe.test(y)){y=parseFloat(y)}else{y=me.getY();offsetParent=me.dom.offsetParent;if(offsetParent){y-=Ext.fly(offsetParent).getY()}}
return[x,y]},getLocalY:function(){var me=this,offsetParent,y=me.getStyle('top');if(!y||y==='auto'){y=0}else if(pxRe.test(y)){y=parseFloat(y)}else{y=me.getY();offsetParent=me.dom.offsetParent;if(offsetParent){y-=Ext.fly(offsetParent).getY()}}
return y},getMargin:(function(){var hash={t:"top",l:"left",r:"right",b:"bottom"},allMargins=['margin-top','margin-left','margin-right','margin-bottom'];return function(side){var me=this,style,key,o;if(!side){style=me.getStyle(allMargins);o={};if(style&&typeof style==='object'){o={};for(key in margins){o[key]=o[hash[key]]=parseFloat(style[margins[key]])||0}}}else{o=me.addStyles(side,margins)}
return o}})(),getPadding:function(side){return this.addStyles(side,paddings)},getParent:function(){return Ext.get(this.dom.parentNode)},getRight:function(local){return(local?this.getLocalX():this.getX())+this.getWidth()},getScroll:function(){var me=this,dom=me.dom,docElement=docEl,left,top,body=DOC.body;if(dom===DOC||dom===body){left=docElement.scrollLeft||(body?body.scrollLeft:0);top=docElement.scrollTop||(body?body.scrollTop:0)}else{left=dom.scrollLeft;top=dom.scrollTop}
return{left:left,top:top}},getScrollIntoViewXY:function(container,scrollX,scrollY,align){var me=this,dom=me.dom,offsets,clientWidth,clientHeight;align=align||empty;if(container.isRegion){clientHeight=container.height;clientWidth=container.width}else{container=Ext.getDom(container);clientHeight=container.clientHeight;clientWidth=container.clientWidth}
offsets=me.getOffsetsTo(container);return{y:me.calcScrollPos(offsets[1]+scrollY,dom.offsetHeight,scrollY,clientHeight,align.y),x:me.calcScrollPos(offsets[0]+scrollX,dom.offsetWidth,scrollX,clientWidth,align.x)}},calcScrollPos:function(start,size,viewStart,viewSize,align){var end=start+size,viewEnd=viewStart+viewSize,force=align&&!endsQuestionRe.test(align),ret=viewStart;if(!force){if(align){align=align.slice(0,-1)}
if(size>viewSize||start<viewStart){align=align||'start';force=!0}else if(end>viewEnd){align=align||'end';force=!0}}
if(force){if(align==='start'){ret=start}else if(align==='center'){ret=Math.max(0,start-Math.floor((viewSize/2)))}else if(align==='end'){ret=Math.max(0,end-viewSize)}}
return ret},getScrollLeft:function(){var dom=this.dom;if(dom===DOC||dom===DOC.body){return this.getScroll().left}else{return dom.scrollLeft}},getScrollTop:function(){var dom=this.dom;if(dom===DOC||dom===DOC.body){return this.getScroll().top}else{return dom.scrollTop}},getSize:function(contentSize){return{width:this.getWidth(contentSize),height:this.getHeight(contentSize)}},getStyle:function(property,inline){var me=this,dom=me.dom,multiple=typeof property!=='string',hooks=me.styleHooks,prop=property,props=prop,len=1,domStyle,camel,values,hook,out,style,i;if(multiple){values={};prop=props[0];i=0;if(!(len=props.length)){return values}}
if(!dom||dom.documentElement){return values||''}
domStyle=dom.style;if(inline){style=domStyle}else{style=dom.ownerDocument.defaultView.getComputedStyle(dom,null);if(!style){inline=!0;style=domStyle}}
do{hook=hooks[prop];if(!hook){hooks[prop]=hook={name:Element.normalize(prop)}}
if(hook.get){out=hook.get(dom,me,inline,style)}else{camel=hook.name;out=style[camel]}
if(!multiple){return out}
values[prop]=out;prop=props[++i]}while(i<len);return values},getStyleValue:function(name){return this.dom.style.getPropertyValue(name)},getCaretPos:function(){var dom=this.dom,pos,selection;if(inputTypeSelectionSupported.test(dom.type)){pos=dom.selectionStart;selection=(typeof pos!=='number')&&this.getTextSelection();if(selection){pos=selection[0]}}else{Ext.raise('Input type of "'+dom.type+'" does not support selectionStart')}
return pos},setCaretPos:function(pos){this.selectText(pos,pos)},getTextSelection:function(){var dom=this.dom;if(inputTypeSelectionSupported.test(dom.type)){return[dom.selectionStart,dom.selectionEnd,dom.selectionDirection]}else{Ext.raise('Input type of "'+this.dom.type+'" does not support selectionStart, selectionEnd and selectionDirection');return[]}},selectText:function(start,end,direction){var me=this,range,dom=me.dom,len;if(dom&&inputTypeSelectionSupported.test(dom.type)){start=start||0;len=dom.value.length;if(end===undefined){end=len}
direction=selectDir[direction]||direction||'forward';if(dom.setSelectionRange){dom.setSelectionRange(start,end,direction)}else if(dom.createTextRange){if(start>end){start=end}
range=dom.createTextRange();range.moveStart('character',start);range.moveEnd('character',-(len-end));range.select()}}else if(!inputTypeSelectionSupported.test(dom.type)){Ext.raise('Input type of "'+dom.type+'" does not support setSelectionRange')}
return me},getTop:function(local){return local?this.getLocalY():this.getY()},getTouchAction:function(){return Ext.dom.TouchAction.get(this.dom)},getValue:function(asNumber){var value=this.dom.value;return asNumber?parseInt(value,10):value},getViewSize:function(){var dom=this.dom;if(dom===DOC||dom===DOC.body){return{width:Element.getViewportWidth(),height:Element.getViewportHeight()}}else{return{width:dom.clientWidth,height:dom.clientHeight}}},getVisibilityMode:function(){var me=this,data=me.getData(),mode=data.visibilityMode;if(mode===undefined){data.visibilityMode=mode=Element.DISPLAY}
return mode},getWidth:function(contentWidth,preciseWidth){var me=this,dom=me.dom,hidden=me.isStyle('display','none'),rect,width,floating;if(hidden){return 0}
if(Ext.supports.BoundingClientRect){rect=dom.getBoundingClientRect();width=(me.vertical&&!Ext.supports.RotatedBoundingClientRect)?(rect.bottom-rect.top):(rect.right-rect.left);width=preciseWidth?width:Math.ceil(width)}else{width=dom.offsetWidth}
if(Ext.supports.Direct2DBug&&!me.vertical){floating=me.adjustDirect2DDimension(WIDTH);if(preciseWidth){width+=floating}else if(floating>0&&floating<0.5){width++}}
if(contentWidth){width-=me.getBorderWidth("lr")+me.getPadding("lr")}
return(width<0)?0:width},getX:function(){return this.getXY()[0]},getXY:function(){var round=Math.round,dom=this.dom,body=DOC.body,x=0,y=0,bodyRect,rect;if(dom!==DOC&&dom!==body){try{bodyRect=body.getBoundingClientRect();rect=dom.getBoundingClientRect();x=rect.left-bodyRect.left;y=rect.top-bodyRect.top}catch(ex){}}
return[round(x),round(y)]},getY:function(){return this.getXY()[1]},getZIndex:function(){return parseInt(this.getStyle('z-index'),10)},hasCls:function(name){var classMap=this.getClassMap();return classMap.hasOwnProperty(name)},hide:function(){return this.setVisible(!1)},hover:function(overFn,outFn,scope,options){var me=this;me.on('mouseenter',overFn,scope||me.dom,options);me.on('mouseleave',outFn,scope||me.dom,options);return me},indexOf:function(childEl){var children=this.dom,c=childEl&&Ext.getDom(childEl);children=children&&children.childNodes;return(c&&children)?Array.prototype.indexOf.call(children,c):-1},insertAfter:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el.nextSibling);return this},insertBefore:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el);return this},insertFirst:function(el,returnDom){el=el||{};if(el.nodeType||el.dom||typeof el==='string'){el=Ext.getDom(el);this.dom.insertBefore(el,this.dom.firstChild);return!returnDom?Ext.get(el):el}else{return this.createChild(el,this.dom.firstChild,returnDom)}},insertHtml:function(where,html,returnEl){var el=Ext.DomHelper.insertHtml(where,this.dom,html);return returnEl?Ext.get(el):el},insertSibling:function(el,where,returnDom){var me=this,DomHelper=Ext.DomHelper,isAfter=(where||'before').toLowerCase()==='after',rt,insertEl,eLen,e;if(Ext.isIterable(el)){eLen=el.length;insertEl=Ext.fly(DOC.createDocumentFragment());if(Ext.isArray(el)){for(e=0;e<eLen;e++){rt=insertEl.appendChild(el[e],returnDom)}}else{for(e=0;e<eLen;e++){insertEl.dom.appendChild(rt=el[0])}
if(returnDom===!1){rt=Ext.get(rt)}}
me.dom.parentNode.insertBefore(insertEl.dom,isAfter?me.dom.nextSibling:me.dom);return rt}
el=el||{};if(el.nodeType||el.dom){rt=me.dom.parentNode.insertBefore(Ext.getDom(el),isAfter?me.dom.nextSibling:me.dom);if(!returnDom){rt=Ext.get(rt)}}else{if(isAfter&&!me.dom.nextSibling){rt=DomHelper.append(me.dom.parentNode,el,!returnDom)}else{rt=DomHelper[isAfter?'insertAfter':'insertBefore'](me.dom,el,!returnDom)}}
return rt},is:function(selector){var dom=this.dom,is;if(!selector){is=!0}else if(!dom.tagName){is=!1}else if(Ext.isFunction(selector)){is=selector(dom)}else{is=dom[Ext.supports.matchesSelector](selector)}
return is},isAncestor:function(el){var ret=!1,dom=this.dom,child=Ext.getDom(el);if(dom&&child){if(!child.nodeType){return!1}
if(dom.contains){return dom.contains(child)}else if(dom.compareDocumentPosition){return!!(dom.compareDocumentPosition(child)&16)}else{while((child=child.parentNode)){ret=child===dom||ret}}}
return ret},isPainted:(function(){return!Ext.browser.is.IE?function(){var dom=this.dom;return Boolean(dom&&dom.offsetParent)}:function(){var dom=this.dom;return Boolean(dom&&(dom.offsetHeight!==0||dom.offsetWidth!==0))}})(),isScrollable:function(){var dom=this.dom;return dom.scrollHeight>dom.clientHeight||dom.scrollWidth>dom.clientWidth},isStyle:function(style,val){return this.getStyle(style)===val},isVisible:function(deep,mode){var dom=this.dom,visible=!0,end;if(!dom){return!1}
mode=mode||3;if(!visFly){visFly=new Ext.dom.Fly()}
for(end=dom.ownerDocument.documentElement;dom!==end;dom=dom.parentNode){if(!dom||dom.nodeType===11){visible=!1}
if(visible){visFly.attach(dom);if(mode&1){visible=!visFly.isStyle(DISPLAY,NONE)}
if(visible&&(mode&2)){visible=!visFly.isStyle(VISIBILITY,HIDDEN)}}
if(!visible||!deep){break}}
return visible},last:function(selector,returnDom){return this.matchNode('previousSibling','lastChild',selector,returnDom)},matchNode:function(dir,start,selector,returnDom){var dom=this.dom,n;if(!dom){return null}
n=dom[start];while(n){if(n.nodeType===1&&(!selector||Ext.fly(n,'_matchNode').is(selector))){return!returnDom?Ext.get(n):n}
n=n[dir]}
return null},measure:function(dimension){var me=this,dom=me.dom,includeWidth=dimension!=='h',includeHeight=dimension!=='w',width=0,height=0,addPadding=!Ext.supports.ComputedSizeIncludesPadding,style,rect,offsetParent;if(dom.nodeName==='BODY'){height=includeHeight&&Element.getViewportHeight();width=includeWidth&&Element.getViewportWidth()}else{if(Ext.supports.ComputedStyle){offsetParent=dom.offsetParent;style=dom.ownerDocument.defaultView.getComputedStyle(dom,null);addPadding|=style.boxSizing==='content-box';if(offsetParent!==null||style.position==='fixed'){if(includeHeight){height=toFloat(style.height);if(addPadding){height+=toFloat(style.paddingTop)+toFloat(style.paddingBottom)+toFloat(style.borderTopWidth)+toFloat(style.borderBottomWidth)}}
if(includeWidth){width=toFloat(style.width);if(addPadding){width+=toFloat(style.paddingLeft)+toFloat(style.paddingRight)+toFloat(style.borderLeftWidth)+toFloat(style.borderRightWidth)}}}}else{rect=dom.getBoundingClientRect();width=rect.width||rect.right-rect.left;height=rect.height||rect.bottom-rect.top}
if(Ext.supports.Direct2DBug){if(includeHeight){height+=me.adjustDirect2DDimension(HEIGHT)}
if(includeWidth){width+=me.adjustDirect2DDimension(WIDTH)}}}
rect=dimension?null:{width:width,height:height};return dimension?(includeWidth?width:height):rect},measureContent:function(dimension){var me=this,includeWidth=dimension!=='h',size=me.measure(dimension),h=dimension?size:size.height,w=dimension?size:size.width;if(dimension!=='w'){h-=me.getBorderWidth('tb')+me.getPadding('tb')}
if(includeWidth){w-=me.getBorderWidth('lr')+me.getPadding('lr')}
return dimension?(includeWidth?w:h):{width:w,height:h}},monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){if(Ext.isIE9m){e.enableIEAsync()}
timer=Ext.defer(handler,delay,scope||me,[e])},mouseenter:function(){Ext.undefer(timer)},destroy:function(){Ext.undefer(timer);if(!me.destroyed){me.un(listeners)}}};me.on(listeners);return listeners},next:function(selector,returnDom){return this.matchNode('nextSibling','nextSibling',selector,returnDom)},parent:function(selector,returnDom){return this.matchNode('parentNode','parentNode',selector,returnDom)},peekData:function(){var dom=this.dom;return dom&&dom._extData||null},position:function(pos,zIndex,x,y){var me=this;if(me.dom.tagName!=='BODY'){if(!pos&&me.isStyle(POSITION,STATIC)){me.setStyle(POSITION,RELATIVE)}else if(pos){me.setStyle(POSITION,pos)}
if(zIndex){me.setStyle(ZINDEX,zIndex)}
if(x||y){me.setXY([x||!1,y||!1])}}},prev:function(selector,returnDom){return this.matchNode('previousSibling','previousSibling',selector,returnDom)},query:function(selector,asDom,single){var dom=this.dom,results,len,nlen,node,nodes,i,j;if(!dom){return null}
asDom=(asDom!==!1);selector=selector.split(",");if(!single){results=[]}
for(i=0,len=selector.length;i<len;i++){if(typeof selector[i]==='string'){if(single){node=dom.querySelector(selector[i]);return asDom?node:Ext.get(node)}
nodes=dom.querySelectorAll(selector[i]);for(j=0,nlen=nodes.length;j<nlen;j++){results.push(asDom?nodes[j]:Ext.get(nodes[j]))}}}
return results},radioCls:function(className){var cn=this.dom.parentNode.childNodes,v,i,len;className=Ext.isArray(className)?className:[className];for(i=0,len=cn.length;i<len;i++){v=cn[i];if(v&&v.nodeType===1){Ext.fly(v).removeCls(className)}}
return this.addCls(className)},redraw:function(){var dom=this.dom,domStyle=dom.style;domStyle.display='none';dom.offsetHeight;domStyle.display=''},remove:function(){this.destroy()},removeChild:function(element){this.dom.removeChild(Ext.getDom(element));return this},removeCls:function(names,prefix,suffix){return this.replaceCls(names,null,prefix,suffix)},repaint:function(cls,state){var me=this,off,on;if(!cls){cls=Ext.baseCSSPrefix+'repaint';on=!(off=!1)}else if(state!=null){on=state;off=!state}
me.toggleCls(cls,on);if(!me.repaintTimer){me.repaintTimer=Ext.defer(function(){me.repaintTimer=null;if(me.dom){me.toggleCls(cls,off)}},1)}
return me},replace:function(el,destroy){el=Ext.getDom(el);var parentNode=el.parentNode,id=el.id,dom=this.dom;if(!parentNode){Ext.raise('Cannot replace element "'+id+'". It is not attached to a parent node.')}
if(destroy!==!1&&id&&Ext.cache[id]){parentNode.insertBefore(dom,el);Ext.get(el).destroy()}else{parentNode.replaceChild(dom,el)}
return this},replaceCls:function(remove,add,prefix,suffix){var me=this,dom=me.dom,added=0,removed=0,rem=remove,data=(add||remove)&&me.getData(),list,map,i,n,name;if(data){list=data.classList;map=data.classMap;add=add?((typeof add==='string')?add.split(spacesRe):add):EMPTY;rem=rem?((typeof rem==='string')?rem.split(spacesRe):rem):EMPTY;prefix=prefix||'';if(prefix&&prefix[prefix.length-1]!=='-'){prefix+='-'}
suffix=suffix||'';if(suffix&&suffix[0]!=='-'){suffix='-'+suffix}
for(i=0,n=rem.length;i<n;i++){if(!(name=rem[i])){continue}
name=prefix+name+suffix;if(spacesRe.test(name)){Ext.raise('Class names in arrays must not contain spaces')}
if(map[name]){delete map[name];++removed}}
for(i=0,n=add.length;i<n;i++){if(!(name=add[i])){continue}
name=prefix+name+suffix;if(spacesRe.test(name)){Ext.raise('Class names in arrays must not contain spaces')}
if(!map[name]){map[name]=!0;if(!removed){list.push(name);++added}}}
if(removed){me.setClassMap(map,!0)}else if(added){list=list.join(' ');if(!Ext.isIE8&&dom instanceof SVGElement){dom.setAttribute('class',list)}else{dom.className=list}}}
return me},replaceWith:function(el){var me=this,dom=me.dom,parent=dom.parentNode,cache=Ext.cache,newDom;me.clearListeners();if(el.nodeType||el.dom||typeof el==='string'){el=Ext.get(el);newDom=parent.insertBefore(el.dom,dom)}else{newDom=Ext.DomHelper.insertBefore(dom,el)}
parent.removeChild(dom);me.dom=newDom;if(!me.isFly){delete cache[me.id];cache[me.id=Ext.id(newDom)]=me}
return me},resolveListenerScope:function(defaultScope){var component=this.component;return component?component.resolveListenerScope(defaultScope):this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return!1}
direction=direction.charAt(0);var me=this,dom=me.dom,side=direction==='r'||direction==='l'?'left':'top',scrolled=!1,currentScroll,constrainedScroll;if(direction==='l'||direction==='t'||direction==='u'){distance=-distance}
if(side==='left'){currentScroll=dom.scrollLeft;constrainedScroll=me.constrainScrollLeft(currentScroll+distance)}else{currentScroll=dom.scrollTop;constrainedScroll=me.constrainScrollTop(currentScroll+distance)}
if(constrainedScroll!==currentScroll){this.scrollTo(side,constrainedScroll,animate);scrolled=!0}
return scrolled},scrollBy:function(deltaX,deltaY,animate){var me=this,dom=me.dom;if(deltaX.length){animate=deltaY;deltaY=deltaX[1];deltaX=deltaX[0]}else if(typeof deltaX!=='number'){animate=deltaY;deltaY=deltaX.y;deltaX=deltaX.x}
if(deltaX){me.scrollTo('left',me.constrainScrollLeft(dom.scrollLeft+deltaX),animate)}
if(deltaY){me.scrollTo('top',me.constrainScrollTop(dom.scrollTop+deltaY),animate)}
return me},scrollChildIntoView:function(child,hscroll){Ext.fly(child).scrollIntoView(this,hscroll)},scrollIntoView:function(container,hscroll,animate,highlight){container=Ext.getDom(container)||Ext.getBody().dom;return this.doScrollIntoView(container,hscroll,animate,highlight,'getScrollLeft','scrollTo')},scrollTo:function(side,value,animate){var top=topRe.test(side),me=this,prop=top?'scrollTop':'scrollLeft',dom=me.dom,animCfg;if(!animate||!me.anim){dom[prop]=value;dom[prop]=value}else{animCfg={to:{}};animCfg.to[prop]=value;if(Ext.isObject(animate)){Ext.applyIf(animCfg,animate)}
me.animate(animCfg)}
return me},select:function(selector,composite){var isElementArray,elements;if(typeof selector==="string"){elements=this.query(selector,!composite)}else if(selector.length===undefined){Ext.raise("Invalid selector specified: "+selector)}else{elements=selector;isElementArray=!0}
return composite?new Ext.CompositeElement(elements,!isElementArray):new Ext.CompositeElementLite(elements,!0)},selectNode:function(selector,asDom){return this.query(selector,asDom,!0)},set:function(attributes,useSet){var me=this,dom=me.dom,attribute,value;for(attribute in attributes){if(attributes.hasOwnProperty(attribute)){value=attributes[attribute];if(attribute==='style'){me.applyStyles(value)}else if(attribute==='cls'){dom.className=value}else if(useSet!==!1){if(value===undefined){dom.removeAttribute(attribute)}else{dom.setAttribute(attribute,value)}}else{dom[attribute]=value}}}
return me},setBottom:function(bottom){this.dom.style[BOTTOM]=Element.addUnits(bottom);return this},setClassMap:function(classMap,keep){var data=this.getData(!1),classList;if(data){classMap=(keep&&classMap)||Ext.apply({},classMap);data.classMap=classMap;data.classList=classList=Ext.Object.getKeys(classMap);data.isSynchronized=!0;this.dom.className=classList.join(' ')}},setCls:function(className){var me=this,elementData=me.getData(!1),i,ln,map,classList;if(typeof className==='string'){className=className.split(spacesRe)}
elementData.classList=classList=className.slice();elementData.classMap=map={};for(i=0,ln=classList.length;i<ln;i++){map[classList[i]]=!0}
me.dom.className=classList.join(' ')},setDisplayed:function(value){var me=this;if(typeof value==="boolean"){value=value?me._getDisplay():NONE}
me.setStyle(DISPLAY,value);if(me.shadow||me.shim){me.setUnderlaysVisible(value!==NONE)}
return me},setHeight:function(height){var me=this;me.dom.style[HEIGHT]=Element.addUnits(height);if(me.shadow||me.shim){me.syncUnderlays()}
return me},setHtml:function(html){if(this.dom){this.dom.innerHTML=html}
return this},setId:function(id){var me=this,currentId=me.id,cache=Ext.cache;if(currentId){delete cache[currentId]}
me.dom.id=id;me.id=id;cache[id]=me;return me},setLeft:function(left){var me=this;me.dom.style[LEFT]=Element.addUnits(left);if(me.shadow||me.shim){me.syncUnderlays()}
return me},setLocalX:function(x){var me=this,style=me.dom.style;style.right='';style.left=(x===null)?'auto':x+'px';if(me.shadow||me.shim){me.syncUnderlays()}
return me},setLocalXY:function(x,y){var me=this,style=me.dom.style;style.right='';if(x&&x.length){y=x[1];x=x[0]}
if(x===null){style.left='auto'}else if(x!==undefined){style.left=x+'px'}
if(y===null){style.top='auto'}else if(y!==undefined){style.top=y+'px'}
if(me.shadow||me.shim){me.syncUnderlays()}
return me},setLocalY:function(y){var me=this;me.dom.style.top=(y===null)?'auto':y+'px';if(me.shadow||me.shim){me.syncUnderlays()}
return me},setMargin:function(margin){var me=this,domStyle=me.dom.style;if(margin||margin===0){margin=me.self.unitizeBox((margin===!0)?5:margin);domStyle.setProperty('margin',margin,'important')}else{domStyle.removeProperty('margin-top');domStyle.removeProperty('margin-right');domStyle.removeProperty('margin-bottom');domStyle.removeProperty('margin-left')}},setMaxHeight:function(height){this.dom.style[MAX_HEIGHT]=Element.addUnits(height);return this},setMaxWidth:function(width){this.dom.style[MAX_WIDTH]=Element.addUnits(width);return this},setMinHeight:function(height){this.dom.style[MIN_HEIGHT]=Element.addUnits(height);return this},setMinWidth:function(width){this.dom.style[MIN_WIDTH]=Element.addUnits(width);return this},setOpacity:function(opacity){var me=this;if(me.dom){me.setStyle('opacity',opacity)}
return me},setPadding:function(padding){var me=this,domStyle=me.dom.style;if(padding||padding===0){padding=me.self.unitizeBox((padding===!0)?5:padding);domStyle.setProperty('padding',padding,'important')}else{domStyle.removeProperty('padding-top');domStyle.removeProperty('padding-right');domStyle.removeProperty('padding-bottom');domStyle.removeProperty('padding-left')}},setRight:function(right){this.dom.style[RIGHT]=Element.addUnits(right);return this},setScrollLeft:function(left){this.dom.scrollLeft=left;return this},setScrollTop:function(top){this.dom.scrollTop=top;return this},setSize:function(width,height){var me=this,style=me.dom.style;if(Ext.isObject(width)){height=width.height;width=width.width}
if(width!==undefined){style.width=Element.addUnits(width)}
if(height!==undefined){style.height=Element.addUnits(height)}
if(me.shadow||me.shim){me.syncUnderlays()}
return me},setStyle:function(prop,value){var me=this,dom=me.dom,hooks=me.styleHooks,style=dom.style,name=prop,hook;if(typeof name==='string'){hook=hooks[name];if(!hook){hooks[name]=hook={name:Element.normalize(name)}}
value=(value==null)?'':value;if(hook.set){hook.set(dom,value,me)}else{style[hook.name]=value}
if(hook.afterSet){hook.afterSet(dom,value,me)}}else{for(name in prop){hook=hooks[name];if(!hook){hooks[name]=hook={name:Element.normalize(name)}}
value=prop[name];value=(value==null)?'':value;if(hook.set){hook.set(dom,value,me)}else{style[hook.name]=value}
if(hook.afterSet){hook.afterSet(dom,value,me)}}}
return me},setText:function(text){this.dom.textContent=text},getText:function(){return this.dom.textContent},setTop:function(top){var me=this;me.dom.style[TOP]=Element.addUnits(top);if(me.shadow||me.shim){me.syncUnderlays()}
return me},setTouchAction:function(touchAction){Ext.dom.TouchAction.set(this.dom,touchAction)},setUnderlaysVisible:function(visible){var shadow=this.shadow,shim=this.shim;if(shadow&&!shadow.disabled){if(visible){shadow.show()}else{shadow.hide()}}
if(shim&&!shim.disabled){if(visible){shim.show()}else{shim.hide()}}},setVisibility:function(isVisible){var domStyle=this.dom.style;if(isVisible){domStyle.removeProperty('visibility')}else{domStyle.setProperty('visibility','hidden','important')}},setVisibilityMode:function(mode){if(mode!==1&&mode!==2&&mode!==3&&mode!==4&&mode!==5){Ext.raise("visibilityMode must be one of the following: "+"Ext.Element.DISPLAY, Ext.Element.VISIBILITY, Ext.Element.OFFSETS, "+"Ext.Element.CLIP, or Element.OPACITY")}
this.getData().visibilityMode=mode;return this},setVisible:function(visible){var me=this,mode=me.getVisibilityMode(),addOrRemove=visible?'removeCls':'addCls';switch(mode){case Element.DISPLAY:me.removeCls([visibilityCls,offsetsCls,clipCls,opacityCls]);me[addOrRemove](displayCls);break;case Element.VISIBILITY:me.removeCls([displayCls,offsetsCls,clipCls,opacityCls]);me[addOrRemove](visibilityCls);break;case Element.OFFSETS:me.removeCls([visibilityCls,displayCls,clipCls,opacityCls]);me[addOrRemove](offsetsCls);break;case Element.CLIP:me.removeCls([visibilityCls,displayCls,offsetsCls,opacityCls]);me[addOrRemove](clipCls);break;case Element.OPACITY:me.removeCls([visibilityCls,displayCls,offsetsCls,clipCls]);me[addOrRemove](opacityCls);break}
if(me.shadow||me.shim){me.setUnderlaysVisible(visible)}
if(!visible&&me.$ripples){me.destroyAllRipples()}
return me},setWidth:function(width){var me=this;me.dom.style[WIDTH]=Element.addUnits(width);if(me.shadow||me.shim){me.syncUnderlays()}
return me},setX:function(x){return this.setXY([x,!1])},setXY:function(xy){var me=this,pts=me.translatePoints(xy),style=me.dom.style,pos;me.position();style.right='';for(pos in pts){if(!isNaN(pts[pos])){style[pos]=pts[pos]+'px'}}
if(me.shadow||me.shim){me.syncUnderlays()}
return me},setY:function(y){return this.setXY([!1,y])},setZIndex:function(zindex){var me=this;if(me.shadow){me.shadow.setZIndex(zindex)}
if(me.shim){me.shim.setZIndex(zindex)}
return me.setStyle('z-index',zindex)},show:function(){return this.setVisible(!0)},swallowEvent:function(eventName,preventDefault){var me=this,e,eLen,listeners={destroyable:!0},fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(Ext.isArray(eventName)){eLen=eventName.length;for(e=0;e<eLen;e++){listeners[eventName[e]]=fn}}else{listeners[eventName]=fn}
return me.on(listeners)},swapCls:function(firstClass,secondClass,flag,prefix){if(flag===undefined){flag=!0}
var me=this,addedClass=flag?firstClass:secondClass,removedClass=flag?secondClass:firstClass;if(removedClass){me.removeCls(prefix?prefix+'-'+removedClass:removedClass)}
if(addedClass){me.addCls(prefix?prefix+'-'+addedClass:addedClass)}
return me},synchronize:function(){var me=this,dom=me.dom,hasClassMap={},className=dom.className,classList,i,ln,name,elementData=me.getData(!1);if(className&&className.length>0){classList=dom.className.split(classNameSplitRegex);for(i=0,ln=classList.length;i<ln;i++){name=classList[i];hasClassMap[name]=!0}}else{classList=[]}
elementData.classList=classList;elementData.classMap=hasClassMap;elementData.isSynchronized=!0;return me},syncUnderlays:function(){var me=this,shadow=me.shadow,shim=me.shim,dom=me.dom,xy,x,y,w,h;if(me.isVisible()){xy=me.getXY();x=xy[0];y=xy[1];w=dom.offsetWidth;h=dom.offsetHeight;if(shadow&&!shadow.hidden){shadow.realign(x,y,w,h)}
if(shim&&!shim.hidden){shim.realign(x,y,w,h)}}},toggleCls:function(className,state){if(state==null){state=!this.hasCls(className)}
return state?this.addCls(className):this.removeCls(className)},toggle:function(){this.setVisible(!this.isVisible());return this},translate:function(){var transformStyleName='webkitTransform' in DOC.createElement('div').style?'webkitTransform':'transform';return function(x,y,z){x=Math.round(x);y=Math.round(y);z=Math.round(z);this.dom.style[transformStyleName]='translate3d('+(x||0)+'px, '+(y||0)+'px, '+(z||0)+'px)'}}(),unwrap:function(){var dom=this.dom,parentNode=dom.parentNode,activeElement=(activeElFly||(activeElFly=new Ext.dom.Fly())).attach(Ext.Element.getActiveElement()),grandparentNode,cached,resumeFocus,tabIndex;grannyFly=grannyFly||new Ext.dom.Fly();cached=Ext.cache[activeElement.dom.id];if(cached){activeElement=cached}
if(this.contains(activeElement)){if(cached){cached.suspendFocusEvents()}
resumeFocus=!0}
if(parentNode){grandparentNode=parentNode.parentNode;if(resumeFocus){tabIndex=grandparentNode.getAttribute('tabIndex');grannyFly.attach(grandparentNode);grannyFly.set({tabIndex:-1});grannyFly.suspendFocusEvents();grannyFly.focus()}
grandparentNode.insertBefore(dom,parentNode);grandparentNode.removeChild(parentNode)}else{grandparentNode=DOC.createDocumentFragment();grandparentNode.appendChild(dom)}
if(resumeFocus){if(cached){cached.focus();cached.resumeFocusEvents()}else{activeElement.focus()}
if(grannyFly){grannyFly.resumeFocusEvents();grannyFly.set({tabIndex:tabIndex})}}
return this},up:function(simpleSelector,limit,returnDom){return this.findParentNode(simpleSelector,limit,!returnDom)},update:function(html){return this.setHtml(html)},wrap:function(config,returnDom,selector){var me=this,dom=me.dom,result=Ext.DomHelper.insertBefore(dom,config||{tag:"div"},!returnDom),newEl=(wrapFly||(wrapFly=new Ext.dom.Fly())).attach(Ext.getDom(result)),target=newEl,activeElement=(activeElFly||(activeElFly=new Ext.dom.Fly())).attach(Ext.Element.getActiveElement()),cached,resumeFocus,tabIndex;cached=Ext.cache[activeElement.dom.id];if(cached){activeElement=cached}
if(selector){target=newEl.selectNode(selector,returnDom)}
if(me.contains(activeElement)){if(cached){cached.suspendFocusEvents()}
tabIndex=Ext.getDom(newEl).getAttribute('tabIndex');newEl.set({tabIndex:-1});newEl.suspendFocusEvents();newEl.focus();resumeFocus=!0}(target.dom||target).appendChild(dom);if(resumeFocus){if(cached){cached.focus();cached.resumeFocusEvents()}else{activeElement.focus()}
newEl.resumeFocusEvents();newEl.set({tabIndex:tabIndex})}
return result},isFocusable:function(skipVisibility){var dom=this.dom,focusable=!1,nodeName;if(dom&&!dom.disabled){nodeName=dom.nodeName;focusable=!!Ext.Element.naturallyFocusableTags[nodeName]||((nodeName==='A'||nodeName==='LINK')&&!!dom.href)||dom.getAttribute('tabIndex')!=null||dom.contentEditable==='true';if(Ext.isIE8&&nodeName==='INPUT'&&dom.type==='hidden'){focusable=!1}
focusable=focusable&&(skipVisibility||this.isVisible(!0))}
return focusable},isInputField:function(){var dom=this.dom,contentEditable=dom.contentEditable;if((Ext.Element.inputTags[dom.tagName]&&dom.type!=='button')||(contentEditable===''||contentEditable==='true')){return!0}
return!1},isTabbable:function(includeHidden){var dom=this.dom,tabbable=!1,nodeName,hasIndex,tabIndex;if(dom&&!dom.disabled){nodeName=dom.nodeName;tabIndex=dom.getAttribute('tabIndex');hasIndex=tabIndex!=null;tabIndex-=0;if(nodeName==='A'||nodeName==='LINK'){if(dom.href){tabbable=hasIndex&&tabIndex<0?!1:!0}else{if(dom.contentEditable==='true'){tabbable=!hasIndex||(hasIndex&&tabIndex>=0)?!0:!1}else{tabbable=hasIndex&&tabIndex>=0?!0:!1}}}else if(dom.contentEditable==='true'||Ext.Element.naturallyTabbableTags[nodeName]){tabbable=hasIndex&&tabIndex<0?!1:!0}else{if(hasIndex&&tabIndex>=0){tabbable=!0}}
if(Ext.isIE8&&nodeName==='INPUT'&&dom.type==='hidden'){tabbable=!1}
tabbable=tabbable&&(includeHidden||((!this.component||this.component.isVisible(!0))&&this.isVisible(!0)))}
return tabbable},ripplingCls:Ext.baseCSSPrefix+'rippling',ripplingTransitionCls:Ext.baseCSSPrefix+'ripple-transition',ripplingUnboundCls:Ext.baseCSSPrefix+'rippling-unbound',rippleBubbleCls:Ext.baseCSSPrefix+'ripple-bubble',rippleContainerCls:Ext.baseCSSPrefix+'ripple-container',rippleWrapperCls:Ext.baseCSSPrefix+'ripple-wrapper',noRippleDisplayMap:{table:1,'table-row':1,'table-row-group':1},noRippleTagMap:{TABLE:1,TR:1,TBODY:1},ripple:function(event,options){if(options===!0||!options){options={}}else if(Ext.isString(options)){options={color:options}}
var me=this,rippleParent=Ext.isString(options.delegate)?me.down(options.delegate):me,rippleMeasureEl=Ext.isString(options.measureSelector)?me.down(options.measureSelector):null,color=window.getComputedStyle(rippleParent.dom).color,unbound=options.bound===!1,position=options.position,ripplingCls=me.ripplingCls,ripplingTransitionCls=me.ripplingTransitionCls,ripplingUnboundCls=me.ripplingUnboundCls,rippleBubbleCls=me.rippleBubbleCls,rippleContainerCls=me.rippleContainerCls,rippleWrapperCls=me.rippleWrapperCls,offset,width,height,rippleDiameter,center,measureElWidth,measureElHeight,rippleSize,pos,posX,posY,rippleWrapper,rippleContainer,rippleBubble,rippleDestructor,rippleClearFn,rippleDestructionTimer,rippleBox,unboundEl,unboundElData,timeout;if(rippleParent){offset=rippleParent.getXY();width=rippleParent.getWidth();height=rippleParent.getHeight();timeout=rippleParent.$rippleClearTimeout;if(timeout){rippleParent.$rippleClearTimeout=Ext.undefer(timeout)}
if(rippleMeasureEl){measureElWidth=rippleMeasureEl.getWidth();measureElHeight=rippleMeasureEl.getHeight();rippleDiameter=Math.max(measureElWidth,measureElHeight)}else{rippleDiameter=width>height?width:height}
if(options.diameterLimit===undefined||options.diameterLimit===!0){rippleDiameter=Math.min(rippleDiameter,Element.maxRippleDiameter)}else if(options.diameterLimit&&options.diameterLimit!==!1&&options.diameterLimit!==0){rippleDiameter=Math.min(rippleDiameter,options.diameterLimit)}
center=[offset[0]+width/2,offset[1]+height/2];if(unbound){if(options.fit!==!1){rippleSize=rippleDiameter*2.15;rippleBox=rippleParent.getRegion();rippleBox.setPosition(rippleBox.getCenter()).setSize(rippleSize).translateBy(-rippleSize/2,-rippleSize/2);unboundEl=me.up(function(candidate){var fly=Ext.fly(candidate,'ripple');return!(candidate.tagName in me.noRippleTagMap)&&!(fly.getStyle('display')in me.noRippleDisplayMap)&&(fly.getRegion().contains(rippleBox))})||Ext.getBody()}else{unboundEl=rippleParent}}
if(Ext.isString(event)){options.color=event;event=null}else if(event&&!event.isEvent){event=new Ext.event.Event(event)}
if(event&&event.isEvent){if(event.browserEvent.$preventRipple){return}
position=event.getXY();event.browserEvent.$preventRipple=!0}
pos=(!unbound&&!options.centered&&position)||center;posX=pos[0]-offset[0]-(rippleDiameter/2);posY=pos[1]-offset[1]-(rippleDiameter/2);rippleParent.addCls(ripplingTransitionCls);if(!unbound){rippleParent.addCls(ripplingCls);rippleContainer=rippleParent.child('.'+rippleContainerCls)}else{unboundElData=unboundEl.getData();rippleWrapper=unboundElData.rippleWrapper;if(!rippleWrapper){unboundElData.rippleWrapper=rippleWrapper=unboundEl.insertFirst({style:'position: absolute; top: 0; left: 0',cls:rippleWrapperCls+' '+ripplingCls+' '+ripplingUnboundCls})}}
if(!rippleContainer){if(unbound){rippleContainer=rippleWrapper.append({cls:rippleContainerCls});rippleContainer.setXY(offset)}else{rippleContainer=rippleParent.append({cls:rippleContainerCls})}}
rippleBubble=rippleContainer.append({cls:rippleBubbleCls});if(options.color!=='default'){rippleBubble.setStyle('backgroundColor',options.color||color)}
rippleBubble.setWidth(rippleDiameter);rippleBubble.setHeight(rippleDiameter);rippleBubble.setTop(posY);rippleBubble.setLeft(posX);rippleClearFn=function(){if(!rippleParent.destroyed){rippleParent.$rippleClearTimeout=Ext.defer(function(){rippleParent.removeCls([ripplingCls,ripplingTransitionCls]);rippleParent.$rippleClearTimeout=null},50)}};rippleDestructor=function(){var ripple,timeout;rippleBubble.destroy();if(me.$ripples){delete me.$ripples[rippleBubble.id]}
timeout=rippleParent.$rippleClearTimeout;if(timeout){rippleParent.$rippleClearTimeout=Ext.undefer(timeout)}
if(unbound){rippleContainer.destroy();ripple=rippleWrapper.child('.'+rippleContainerCls);if(!ripple){unboundElData.rippleWrapper=null;rippleWrapper.destroy();rippleClearFn()}}else{ripple=rippleContainer.child('.'+rippleBubbleCls);if(!ripple){rippleContainer.destroy();rippleClearFn()}}};rippleDestructionTimer=Ext.defer(rippleDestructor,options.destroyTime||1000,me);if(!me.$ripples){me.$ripples={}}
me.$ripples[rippleBubble.id]={timerId:rippleDestructionTimer,destructor:rippleDestructor};rippleBubble.addCls(Ext.baseCSSPrefix+'ripple')}},destroyAllRipples:function(){var me=this,rippleEl,ripple;for(rippleEl in me.$ripples){ripple=me.$ripples[rippleEl];Ext.undefer(ripple.timerId);if(ripple.destructor){ripple.destructor()}}
me.$ripples=null},privates:{findTabbableElements:function(options){var skipSelf,skipChildren,excludeRoot,includeSaved,includeHidden,dom=this.dom,cAttr=Ext.Element.tabbableSavedCounterAttribute,selection=[],idx=0,nodes,node,fly,i,len,tabIndex;if(!dom){return selection}
if(options){skipSelf=options.skipSelf;skipChildren=options.skipChildren;excludeRoot=options.excludeRoot;includeSaved=options.includeSaved;includeHidden=options.includeHidden}
excludeRoot=excludeRoot&&Ext.getDom(excludeRoot);if(excludeRoot&&excludeRoot.contains(dom)){return selection}
if(!skipSelf&&((includeSaved&&dom.hasAttribute(cAttr))||this.isTabbable(includeHidden))){selection[idx++]=dom}
if(skipChildren){return selection}
nodes=dom.querySelectorAll(Ext.Element.tabbableSelector);len=nodes.length;if(!len){return selection}
fly=new Ext.dom.Fly();for(i=0;i<len;i++){node=nodes[i];tabIndex=+node.getAttribute('tabIndex');if(((includeSaved&&node.hasAttribute(cAttr))||(!(tabIndex<0)&&fly.attach(node).isTabbable(includeHidden)))&&!(excludeRoot&&(excludeRoot===node||excludeRoot.contains(node)))){selection[idx++]=node}}
return selection},saveTabbableState:function(options){var counterAttr=Ext.Element.tabbableSavedCounterAttribute,savedAttr=Ext.Element.tabbableSavedValueAttribute,counter,nodes,node,i,len;if(!options||options.includeSaved==null){options=Ext.Object.chain(options||null);options.includeSaved=!0}
nodes=this.findTabbableElements(options);for(i=0,len=nodes.length;i<len;i++){node=nodes[i];counter=+node.getAttribute(counterAttr);if(counter>0){node.setAttribute(counterAttr,++counter)}else{if(node.hasAttribute('tabIndex')){node.setAttribute(savedAttr,node.getAttribute('tabIndex'))}else{node.setAttribute(savedAttr,'none')}
node.setAttribute('tabIndex','-1');node.setAttribute(counterAttr,'1')}}
return nodes},restoreTabbableState:function(options){var dom=this.dom,counterAttr=Ext.Element.tabbableSavedCounterAttribute,savedAttr=Ext.Element.tabbableSavedValueAttribute,nodes=[],skipSelf=options&&options.skipSelf,skipChildren=options&&options.skipChildren,reset=options&&options.reset,idx,counter,node,i,len;if(!dom){return this}
if(!skipChildren){nodes=Ext.Array.from(dom.querySelectorAll('['+counterAttr+']'))}
if(!skipSelf){nodes.unshift(dom)}
for(i=0,len=nodes.length;i<len;i++){node=nodes[i];if(!node.hasAttribute(counterAttr)||!node.hasAttribute(savedAttr)){continue}
counter=+node.getAttribute(counterAttr);if(!reset&&counter>1){node.setAttribute(counterAttr,--counter);continue}
idx=node.getAttribute(savedAttr);if(idx==='none'){node.removeAttribute('tabIndex')}else{node.setAttribute('tabIndex',idx)}
node.removeAttribute(savedAttr);node.removeAttribute(counterAttr)}
return nodes},setTabIndex:function(tabIndex){var dom=this.dom,savedAttr=Ext.Element.tabbableSavedValueAttribute;if(dom.hasAttribute(savedAttr)){if(tabIndex==null){dom.setAttribute(savedAttr,'none');dom.removeAttribute('tabIndex')}else{dom.setAttribute(savedAttr,tabIndex)}}else{if(tabIndex==null){dom.removeAttribute('tabIndex')}else{dom.setAttribute('tabIndex',tabIndex)}}},doAddListener:function(eventName,fn,scope,options,order,caller,manager){var me=this,originalName=eventName,observableDoAddListener,additiveEventName,translatedEventName;eventName=Ext.canonicalEventName(eventName);if(!me.blockedEvents[eventName]){observableDoAddListener=me.mixins.observable.doAddListener;options=options||{};if(Element.useDelegatedEvents===!1){options.delegated=options.delegated||!1}
if(options.translate!==!1){additiveEventName=me.additiveEvents[eventName];if(additiveEventName){options.type=eventName;eventName=additiveEventName;observableDoAddListener.call(me,eventName,fn,scope,options,order,caller,manager)}
translatedEventName=me.eventMap[eventName];if(translatedEventName){options.type=options.type||eventName;if(manager){options.managedName=originalName}
eventName=translatedEventName}}
if(observableDoAddListener.call(me,eventName,fn,scope,options,order,caller,manager)){if(me.longpressEvents[eventName]&&(++me.longpressListenerCount===1)){me.on('MSHoldVisual','preventMsHoldVisual',me)}}
if(manager&&translatedEventName){delete options.managedName}
delete options.type}},doRemoveListener:function(eventName,fn,scope){var me=this,observableDoRemoveListener,translatedEventName,additiveEventName,removed;eventName=Ext.canonicalEventName(eventName);if(!me.blockedEvents[eventName]){observableDoRemoveListener=me.mixins.observable.doRemoveListener;additiveEventName=me.additiveEvents[eventName];if(additiveEventName){eventName=additiveEventName;observableDoRemoveListener.call(me,eventName,fn,scope)}
translatedEventName=me.eventMap[eventName];if(translatedEventName){removed=observableDoRemoveListener.call(me,translatedEventName,fn,scope)}
removed=observableDoRemoveListener.call(me,eventName,fn,scope)||removed;if(removed){if(me.longpressEvents[eventName]&&!--me.longpressListenerCount){me.un('MSHoldVisual','preventMsHoldVisual',me)}}}},_initEvent:function(eventName){return(this.events[eventName]=new Ext.dom.ElementEvent(this,eventName))},_getDisplay:function(){var data=this.getData(),display=data[ORIGINALDISPLAY];if(display===undefined){data[ORIGINALDISPLAY]=display=''}
return display},_getPublisher:function(eventName,noTranslate){var Publisher=Ext.event.publisher.Publisher,publisher=Publisher.publishersByEvent[eventName],isNative=noTranslate&&!Ext.event.Event.gestureEvents[eventName];if(isNative||!publisher||(this.dom===window&&eventName==='resize')){publisher=Publisher.publishers.dom}
return publisher},isFocusSuspended:function(){var data=this.peekData();return data&&data.suspendFocusEvents},preventMsHoldVisual:function(e){e.preventDefault()},suspendFocusEvents:function(){if(!this.isFly){this.suspendEvent('focus','blur')}
this.getData().suspendFocusEvents=!0},resumeFocusEvents:function(){function resumeFn(){var data;if(!this.destroyed){data=this.getData();if(data){data.suspendFocusEvents=!1}
if(!this.isFly){this.resumeEvent('focus','blur')}}}
if(!this.destroyed&&this.getData().suspendFocusEvents){if(Ext.isIE&&!this.isFly){this.resumeFocusEventsTimer=Ext.asap(resumeFn,this)}else{resumeFn.call(this)}}}},deprecated:{'5.0':{methods:{getHTML:'getHtml',getPageBox:function(getRegion){var me=this,dom=me.dom,isDoc=dom.nodeName==='BODY',w=isDoc?Element.getViewportWidth():dom.offsetWidth,h=isDoc?Element.getViewportHeight():dom.offsetHeight,xy=me.getXY(),t=xy[1],r=xy[0]+w,b=xy[1]+h,l=xy[0];if(getRegion){return new Ext.util.Region(t,r,b,l)}else{return{left:l,top:t,width:w,height:h,right:r,bottom:b}}},isTransparent:function(prop){var value=this.getStyle(prop);return value?transparentRe.test(value):!1},purgeAllListeners:'clearListeners',removeAllListeners:'clearListeners',setHTML:'setHtml'}}}}},function(Element){var DOC=document,docEl=DOC.documentElement,prototype=Element.prototype,supports=Ext.supports,pointerdown='pointerdown',pointermove='pointermove',pointerup='pointerup',pointercancel='pointercancel',MSPointerDown='MSPointerDown',MSPointerMove='MSPointerMove',MSPointerUp='MSPointerUp',MSPointerCancel='MSPointerCancel',mousedown='mousedown',mousemove='mousemove',mouseup='mouseup',mouseover='mouseover',mouseout='mouseout',mouseenter='mouseenter',mouseleave='mouseleave',touchstart='touchstart',touchmove='touchmove',touchend='touchend',touchcancel='touchcancel',click='click',dblclick='dblclick',tap='tap',doubletap='doubletap',eventMap=prototype.eventMap={},additiveEvents=prototype.additiveEvents={},oldId=Ext.id,eventOptions;prototype._init(Element);delete prototype._init;Ext.id=function(obj,prefix){var el=obj&&Ext.getDom(obj,!0),sandboxPrefix,id;if(!el){id=oldId(obj,prefix)}else if(!(id=el.id)){id=oldId(null,prefix||Element.prototype.identifiablePrefix);if(Ext.isSandboxed){sandboxPrefix=Ext.sandboxPrefix||(Ext.sandboxPrefix=Ext.sandboxName.toLowerCase()+'-');id=sandboxPrefix+id}
el.id=id}
return id};if(supports.PointerEvents){eventMap[mousedown]=pointerdown;eventMap[mousemove]=pointermove;eventMap[mouseup]=pointerup;eventMap[touchstart]=pointerdown;eventMap[touchmove]=pointermove;eventMap[touchend]=pointerup;eventMap[touchcancel]=pointercancel;eventMap[mouseover]='pointerover';eventMap[mouseout]='pointerout';eventMap[mouseenter]='pointerenter';if(!Ext.isIE11){eventMap[mouseleave]='pointerleave'}}else if(supports.MSPointerEvents){eventMap[pointerdown]=MSPointerDown;eventMap[pointermove]=MSPointerMove;eventMap[pointerup]=MSPointerUp;eventMap[pointercancel]=MSPointerCancel;eventMap[mousedown]=MSPointerDown;eventMap[mousemove]=MSPointerMove;eventMap[mouseup]=MSPointerUp;eventMap[touchstart]=MSPointerDown;eventMap[touchmove]=MSPointerMove;eventMap[touchend]=MSPointerUp;eventMap[touchcancel]=MSPointerCancel;eventMap[mouseover]='MSPointerOver';eventMap[mouseout]='MSPointerOut'}else if(supports.TouchEvents){eventMap[pointerdown]=touchstart;eventMap[pointermove]=touchmove;eventMap[pointerup]=touchend;eventMap[pointercancel]=touchcancel;eventMap[mousedown]=touchstart;eventMap[mousemove]=touchmove;eventMap[mouseup]=touchend;eventMap[click]=tap;eventMap[dblclick]=doubletap;if(Ext.os.is.Desktop){eventMap[touchstart]=mousedown;eventMap[touchmove]=mousemove;eventMap[touchend]=mouseup;eventMap[touchcancel]=mouseup;additiveEvents[mousedown]=mousedown;additiveEvents[mousemove]=mousemove;additiveEvents[mouseup]=mouseup;additiveEvents[touchstart]=touchstart;additiveEvents[touchmove]=touchmove;additiveEvents[touchend]=touchend;additiveEvents[touchcancel]=touchcancel;additiveEvents[pointerdown]=mousedown;additiveEvents[pointermove]=mousemove;additiveEvents[pointerup]=mouseup;additiveEvents[pointercancel]=mouseup}}else{eventMap[pointerdown]=mousedown;eventMap[pointermove]=mousemove;eventMap[pointerup]=mouseup;eventMap[pointercancel]=mouseup;eventMap[touchstart]=mousedown;eventMap[touchmove]=mousemove;eventMap[touchend]=mouseup;eventMap[touchcancel]=mouseup}
if(Ext.isWebKit){eventMap.transitionend=Ext.browser.getVendorProperyName('transitionEnd');eventMap.animationstart=Ext.browser.getVendorProperyName('animationStart');eventMap.animationend=Ext.browser.getVendorProperyName('animationEnd')}
if(!Ext.supports.MouseWheel&&!Ext.isOpera){eventMap.mousewheel='DOMMouseScroll'}
eventOptions=prototype.$eventOptions=Ext.Object.chain(prototype.$eventOptions);eventOptions.translate=eventOptions.capture=eventOptions.delegate=eventOptions.delegated=eventOptions.stopEvent=eventOptions.preventDefault=eventOptions.stopPropagation=eventOptions.element=1;prototype.styleHooks.opacity={name:'opacity',afterSet:function(dom,value,el){var shadow=el.shadow;if(shadow){shadow.setOpacity(value)}}};prototype.getTrueXY=prototype.getXY;Ext.getViewportHeight=Element.getViewportHeight;Ext.getViewportWidth=Element.getViewportWidth;Ext.select=Element.select;Ext.query=Element.query;Ext.apply(Ext,{get:function(element){return Element.get(element)},getDom:function(el){if(!el||!DOC){return null}
return typeof el==='string'?Ext.getElementById(el):'dom' in el?el.dom:el},getBody:function(){if(!Ext._bodyEl){if(!DOC.body){throw new Error("[Ext.getBody] document.body does not yet exist")}
Ext._bodyEl=Ext.get(DOC.body);Ext._bodyEl.skipGarbageCollection=!0}
return Ext._bodyEl},getHead:function(){if(!Ext._headEl){Ext._headEl=Ext.get(DOC.head||DOC.getElementsByTagName('head')[0]);Ext._headEl.skipGarbageCollection=!0}
return Ext._headEl},getDoc:function(){if(!Ext._docEl){Ext._docEl=Ext.get(DOC);Ext._docEl.skipGarbageCollection=!0}
return Ext._docEl},getWin:function(){if(!Ext._winEl){Ext._winEl=Ext.get(window);Ext._winEl.skipGarbageCollection=!0}
return Ext._winEl},removeNode:function(node){node=node.dom||node;var id=node&&node.id,el=Ext.cache[id],parent;if(el){el.destroy()}else if(node&&(node.nodeType===3||node.tagName.toUpperCase()!=='BODY')){parent=node.parentNode;if(parent){parent.removeChild(node)}}}});Ext.isGarbage=function(dom){return dom&&dom.nodeType===1&&dom.tagName!=='BODY'&&dom.tagName!=='HTML'&&(!dom.parentNode||(dom.offsetParent===null&&((Ext.isIE8?DOC.all[dom.id]:DOC.getElementById(dom.id))!==dom)&&!(Ext.detachedBodyEl&&Ext.detachedBodyEl.isAncestor(dom))))};Ext.onInternalReady(function(){var bodyCls=[],theme;Ext.getDoc().on('selectstart',function(ev,dom){var selectableCls=Element.selectableCls,unselectableCls=Element.unselectableCls,tagName=dom&&dom.tagName,el=new Ext.dom.Fly();tagName=tagName&&tagName.toLowerCase();if(tagName==='input'||tagName==='textarea'){return}
while(dom&&dom.nodeType===1&&dom!==DOC.documentElement){el.attach(dom);if(el.hasCls(selectableCls)){return}
if(el.hasCls(unselectableCls)){ev.stopEvent();return}
dom=dom.parentNode}});if(Ext.os.is.Android||(Ext.os.is.Windows&&Ext.supports.Touch)){var win=Ext.getWin();Element._documentWidth=Element._viewportWidth=docEl.clientWidth;Element._documentHeight=Element._viewportHeight=docEl.clientHeight;win.on({focusin:'_onWindowFocusChange',focusout:'_onWindowFocusChange',pointerup:'_onWindowFocusChange',capture:!0,delegated:!1,delay:1,scope:Element});win.on({resize:'_onWindowResize',priority:2000,scope:Element})}
if(supports.Touch){bodyCls.push(Ext.baseCSSPrefix+'touch')}
if(Ext.isIE&&Ext.isIE9m){bodyCls.push(Ext.baseCSSPrefix+'ie',Ext.baseCSSPrefix+'ie9m');bodyCls.push(Ext.baseCSSPrefix+'ie8p');if(Ext.isIE8){bodyCls.push(Ext.baseCSSPrefix+'ie8')}else{bodyCls.push(Ext.baseCSSPrefix+'ie9',Ext.baseCSSPrefix+'ie9p')}
if(Ext.isIE8m){bodyCls.push(Ext.baseCSSPrefix+'ie8m')}}
if(Ext.isIE10){bodyCls.push(Ext.baseCSSPrefix+'ie10')}
if(Ext.isIE10p){bodyCls.push(Ext.baseCSSPrefix+'ie10p')}
if(Ext.isIE11){bodyCls.push(Ext.baseCSSPrefix+'ie11')}
if(Ext.isEdge){bodyCls.push(Ext.baseCSSPrefix+'edge')}
if(Ext.isGecko){bodyCls.push(Ext.baseCSSPrefix+'gecko')}
if(Ext.isOpera){bodyCls.push(Ext.baseCSSPrefix+'opera')}
if(Ext.isOpera12m){bodyCls.push(Ext.baseCSSPrefix+'opera12m')}
if(Ext.isWebKit){bodyCls.push(Ext.baseCSSPrefix+'webkit')}
if(Ext.isSafari){bodyCls.push(Ext.baseCSSPrefix+'safari')}
if(Ext.isSafari9){bodyCls.push(Ext.baseCSSPrefix+'safari9')}
if(Ext.isSafari10){bodyCls.push(Ext.baseCSSPrefix+'safari10')}
if(Ext.isSafari){if(Ext.browser.version.isLessThan(11)){bodyCls.push(Ext.baseCSSPrefix+'safari10m')}
if(Ext.browser.version.isLessThan(9)){bodyCls.push(Ext.baseCSSPrefix+'safari8m')}}
if(Ext.isChrome){bodyCls.push(Ext.baseCSSPrefix+'chrome')}
if(Ext.isMac){bodyCls.push(Ext.baseCSSPrefix+'mac')}
if(Ext.isWindows){bodyCls.push(Ext.baseCSSPrefix+'windows')}
if(Ext.isLinux){bodyCls.push(Ext.baseCSSPrefix+'linux')}
if(!supports.CSS3BorderRadius){bodyCls.push(Ext.baseCSSPrefix+'nbr')}
if(!supports.CSS3LinearGradient){bodyCls.push(Ext.baseCSSPrefix+'nlg')}
if(supports.Touch){bodyCls.push(Ext.baseCSSPrefix+'touch')}
if(Ext.os.deviceType){bodyCls.push(Ext.baseCSSPrefix+Ext.os.deviceType.toLowerCase())}
if(Ext.os.is.BlackBerry){bodyCls.push(Ext.baseCSSPrefix+'bb');if(Ext.browser.userAgent.match(/Kbd/gi)){bodyCls.push(Ext.baseCSSPrefix+'bb-keyboard')}}
if(Ext.os.is.iOS&&Ext.isSafari){bodyCls.push(Ext.baseCSSPrefix+'mobile-safari')}
if(Ext.os.is.iOS&&Ext.browser.is.WebView&&!Ext.browser.is.Standalone){bodyCls.push(Ext.baseCSSPrefix+'ios-native')}
if(Ext.supports.FlexBoxBasisBug){bodyCls.push(Ext.baseCSSPrefix+'has-flexbasis-bug')}
Ext.getBody().addCls(bodyCls);theme=Ext.theme;if(theme&&theme.getDocCls){Ext.fly(document.documentElement).addCls(theme.getDocCls())}},null,{priority:1500})})
;
Ext.define('Ext.util.BasicFilter',{isFilter:!0,config:{id:null,disabled:!1,serializer:null},generation:0,constructor:function(config){this.initConfig(config)},updateDisabled:function(){if(!this.isConfiguring){++this.generation}}})
;
Ext.define('Ext.util.Filter',{extend:'Ext.util.BasicFilter',config:{property:null,root:null,value:null,filterFn:null,anyMatch:!1,exactMatch:!1,caseSensitive:!1,disableOnEmpty:!1,operator:null,convert:null},scope:null,$configStrict:!1,statics:{createFilterFn:function(filters){if(!filters){return Ext.returnTrue}
return function(candidate){var items=filters.isCollection?filters.items:filters,length=items.length,match=!0,i,filter;for(i=0;match&&i<length;i++){filter=items[i];if(!filter.getDisabled()){match=filter.filter(candidate)}}
return match}},isEqual:function(filter1,filter2){if(filter1.getProperty()!==filter2.getProperty()){return!1}
if(filter1.getOperator()!==filter2.getOperator()){return!1}
if(filter1.getValue()===filter2.getValue()){return!0}
if(Ext.isArray(filter1)&&Ext.isArray(filter2)){return Ext.Array.equals(filter1,filter2)}
return!1},isInvalid:function(cfg){if(!cfg.filterFn){if(!cfg.property){return'A Filter requires either a property or a filterFn to be set'}
if(!cfg.hasOwnProperty('value')&&!cfg.operator){return'A Filter requires either a property and value, or a filterFn to be set'}}
return!1}},constructor:function(config){var warn=Ext.util.Filter.isInvalid(config);if(warn){Ext.log.warn(warn)}
this.callParent([config])},preventConvert:{'in':1,notin:1},filter:function(item){var me=this,filterFn=me._filterFn||me.getFilterFn(),convert=me.getConvert(),value=me._value;me._filterValue=value;me.isDateValue=Ext.isDate(value);if(me.isDateValue){me.dateValue=value.getTime()}
if(convert&&!me.preventConvert[me.getOperator()]){me._filterValue=convert.call(me.scope||me,value)}
return filterFn.call(me.scope||me,item)},getId:function(){var me=this,id=me._id;if(!id){id=me.getProperty();if(!id){id=Ext.id(null,'ext-filter-')}
me._id=id}
return id},getFilterFn:function(){var me=this,filterFn=me._filterFn,operator;if(!filterFn){operator=me.getOperator();if(operator){filterFn=me.operatorFns[operator]}else{filterFn=me.createRegexFilter()}
me._filterFn=filterFn;me.generatedFilterFn=!0}
return filterFn},createRegexFilter:function(){var me=this,anyMatch=!!me.getAnyMatch(),exact=!!me.getExactMatch(),value=me.getValue(),matcher=Ext.String.createRegex(value,!anyMatch,!anyMatch&&exact,!me.getCaseSensitive());return function(item){var val=me.getPropertyValue(item);return matcher?matcher.test(val):(val==null)}},getPropertyValue:function(item){var root=this._root,value=(root==null)?item:item[root];return value[this._property]},getState:function(){var config=this.getInitialConfig(),result={},name;for(name in config){if(config.hasOwnProperty(name)){result[name]=config[name]}}
delete result.root;result.value=this.getValue();return result},getScope:function(){return this.scope},serialize:function(){var result=this.getState(),serializer=this.getSerializer(),serialized;delete result.id;delete result.serializer;if(serializer){serialized=serializer.call(this,result);if(serialized){result=serialized}}
return result},serializeTo:function(out){var me=this,primitive,serialized;me.getFilterFn();if(me.generatedFilterFn){out.push(serialized=me.serialize());primitive=me.primitiveRe.test(typeof serialized)}
return!primitive},updateOperator:function(){this.onConfigMutation()},updateConvert:function(){this.onConfigMutation()},updateProperty:function(){this.onConfigMutation()},updateAnyMatch:function(){this.onConfigMutation()},updateExactMatch:function(){this.onConfigMutation()},updateCaseSensitive:function(){this.onConfigMutation()},updateValue:function(value){this.onConfigMutation();if(this.getDisableOnEmpty()){this.setDisabled(Ext.isEmpty(value))}},updateFilterFn:function(filterFn){delete this.generatedFilterFn},onConfigMutation:function(){this.generation++;if(this.generatedFilterFn){this._filterFn=null}},updateDisableOnEmpty:function(disableOnEmpty){if(disableOnEmpty){this.setDisabled(Ext.isEmpty(this.getValue()))}},privates:{primitiveRe:/string|number|boolean/,getCandidateValue:function(candidate,v,preventCoerce){var me=this,convert=me._convert,result=me.getPropertyValue(candidate);if(convert){result=convert.call(me.scope||me,result)}else if(!preventCoerce){result=Ext.coerce(result,v)}
return result}}},function(Filter){var prototype=Filter.prototype,operatorFns=(prototype.operatorFns={"<":function(candidate){var v=this._filterValue;return this.getCandidateValue(candidate,v)<v},"<=":function(candidate){var v=this._filterValue;return this.getCandidateValue(candidate,v)<=v},"=":function(candidate){var me=this,v=me._filterValue;candidate=me.getCandidateValue(candidate,v);if(me.isDateValue&&candidate instanceof Date){candidate=candidate.getTime();v=me.dateValue}
return candidate==v},"===":function(candidate){var me=this,v=me._filterValue;candidate=me.getCandidateValue(candidate,v,!0);if(me.isDateValue&&candidate instanceof Date){candidate=candidate.getTime();v=me.dateValue}
return candidate===v},">=":function(candidate){var v=this._filterValue;return this.getCandidateValue(candidate,v)>=v},">":function(candidate){var v=this._filterValue;return this.getCandidateValue(candidate,v)>v},"!=":function(candidate){var me=this,v=me._filterValue;candidate=me.getCandidateValue(candidate,v);if(me.isDateValue&&candidate instanceof Date){candidate=candidate.getTime();v=me.dateValue}
return candidate!=v},"!==":function(candidate){var me=this,v=me._filterValue;candidate=me.getCandidateValue(candidate,v,!0);if(me.isDateValue&&candidate instanceof Date){candidate=candidate.getTime();v=me.dateValue}
return candidate!==v},"in":function(candidate){var v=this._filterValue;return Ext.Array.contains(v,this.getCandidateValue(candidate,v))},notin:function(candidate){var v=this._filterValue;return!Ext.Array.contains(v,this.getCandidateValue(candidate,v))},like:function(candidate){var v=this._filterValue;return v&&this.getCandidateValue(candidate,v).toLowerCase().indexOf(v.toLowerCase())>-1},"/=":function(candidate){var me=this,v=me._filterValue;candidate=me.getCandidateValue(candidate,v);if(v!==me.lastRegExpSource){me.lastRegExpSource=v;try{me.regex=new RegExp(v,'i')}catch(e){me.regex=null}}
return me.regex?me.regex.test(candidate):!1}});operatorFns['==']=operatorFns['='];operatorFns.gt=operatorFns['>'];operatorFns.ge=operatorFns['>='];operatorFns.lt=operatorFns['<'];operatorFns.le=operatorFns['<='];operatorFns.eq=operatorFns['='];operatorFns.ne=operatorFns['!=']})
;
Ext.define('Ext.util.Observable',{extend:'Ext.mixin.Observable',$applyConfigs:!0},function(Observable){var Super=Ext.mixin.Observable;Observable.releaseCapture=Super.releaseCapture;Observable.capture=Super.capture;Observable.captureArgs=Super.captureArgs;Observable.observe=Observable.observeClass=Super.observe})
;
Ext.define('Ext.util.AbstractMixedCollection',{requires:['Ext.util.Filter'],mixins:{observable:'Ext.util.Observable'},isMixedCollection:!0,generation:0,indexGeneration:0,constructor:function(allowFunctions,keyFn){var me=this;if(arguments.length===1&&Ext.isObject(allowFunctions)){me.initialConfig=allowFunctions;Ext.apply(me,allowFunctions)}else{me.allowFunctions=allowFunctions===!0;if(keyFn){me.getKey=keyFn}
me.initialConfig={allowFunctions:me.allowFunctions,getKey:me.getKey}}
me.items=[];me.map={};me.keys=[];me.indexMap={};me.length=0;me.mixins.observable.constructor.call(me)},destroy:function(){var me=this;me.items=me.map=me.keys=me.indexMap=null;me.callParent()},allowFunctions:!1,add:function(key,obj){var len=this.length,out;if(arguments.length===1){out=this.insert(len,key)}else{out=this.insert(len,key,obj)}
return out},getKey:function(item){return item.id},replace:function(key,o){var me=this,old,index;if(arguments.length===1){o=arguments[0];key=me.getKey(o)}
old=me.map[key];if(typeof key==='undefined'||key===null||typeof old==='undefined'){return me.add(key,o)}
me.generation++;index=me.indexOfKey(key);me.items[index]=o;me.map[key]=o;if(me.hasListeners.replace){me.fireEvent('replace',key,old,o)}
return o},reorder:function(mapping){var me=this,items=me.items,index=0,length=items.length,order=[],remaining=[],oldIndex;me.suspendEvents();for(oldIndex in mapping){order[mapping[oldIndex]]=items[oldIndex]}
for(index=0;index<length;index++){if(mapping[index]==undefined){remaining.push(items[index])}}
for(index=0;index<length;index++){if(order[index]==undefined){order[index]=remaining.shift()}}
me.clear();me.addAll(order);me.resumeEvents()},updateKey:function(oldKey,newKey){var me=this,map=me.map,index=me.indexOfKey(oldKey),indexMap=me.indexMap,item;if(index>-1){item=map[oldKey];delete map[oldKey];delete indexMap[oldKey];map[newKey]=item;indexMap[newKey]=index;me.keys[index]=newKey;me.indexGeneration=++me.generation}},addAll:function(objs){var me=this,key;if(arguments.length>1||Ext.isArray(objs)){me.insert(me.length,arguments.length>1?arguments:objs)}else{for(key in objs){if(objs.hasOwnProperty(key)){if(me.allowFunctions||typeof objs[key]!=='function'){me.add(key,objs[key])}}}}},each:function(fn,scope){var items=Ext.Array.push([],this.items),i=0,len=items.length,item;for(;i<len;i++){item=items[i];if(fn.call(scope||item,item,i,len)===!1){break}}},eachKey:function(fn,scope){var keys=this.keys,items=this.items,i=0,len=keys.length;for(;i<len;i++){fn.call(scope||window,keys[i],items[i],i,len)}},findBy:function(fn,scope){var keys=this.keys,items=this.items,i=0,len=items.length;for(;i<len;i++){if(fn.call(scope||window,items[i],keys[i])){return items[i]}}
return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.util.MixedCollection: find has been deprecated. '+'Use findBy instead.')}
return this.findBy.apply(this,arguments)},insert:function(index,key,obj){var out;if(Ext.isIterable(key)){out=this.doInsert(index,key,obj)}else{if(arguments.length>2){out=this.doInsert(index,[key],[obj])}else{out=this.doInsert(index,[key])}
out=out[0]}
return out},doInsert:function(index,keys,objects){var me=this,itemKey,removeIndex,i,len=keys.length,deDupedLen=len,fireAdd=me.hasListeners.add,syncIndices,newKeys={},passedDuplicates,oldKeys,oldObjects;if(objects!=null){me.useLinearSearch=!0}else{objects=keys;keys=new Array(len);for(i=0;i<len;i++){keys[i]=this.getKey(objects[i])}}
me.suspendEvents();for(i=0;i<len;i++){itemKey=keys[i];removeIndex=me.indexOfKey(itemKey);if(removeIndex!==-1){if(removeIndex<index){index--}
me.removeAt(removeIndex)}
if(itemKey!=null){if(newKeys[itemKey]!=null){passedDuplicates=!0;deDupedLen--}
newKeys[itemKey]=i}}
me.resumeEvents();if(passedDuplicates){oldKeys=keys;oldObjects=objects;keys=new Array(deDupedLen);objects=new Array(deDupedLen);i=0;for(itemKey in newKeys){keys[i]=oldKeys[newKeys[itemKey]];objects[i]=oldObjects[newKeys[itemKey]];i++}
len=deDupedLen}
syncIndices=index===me.length&&me.indexGeneration===me.generation;Ext.Array.insert(me.items,index,objects);Ext.Array.insert(me.keys,index,keys);me.length+=len;me.generation++;if(syncIndices){me.indexGeneration=me.generation}
for(i=0;i<len;i++,index++){itemKey=keys[i];if(itemKey!=null){me.map[itemKey]=objects[i];if(syncIndices){me.indexMap[itemKey]=index}}
if(fireAdd){me.fireEvent('add',index,objects[i],itemKey)}}
return objects},remove:function(o){var me=this,removeKey,index;if(!me.useLinearSearch&&(removeKey=me.getKey(o))){index=me.indexOfKey(removeKey)}else{index=Ext.Array.indexOf(me.items,o)}
return(index===-1)?!1:me.removeAt(index)},removeAll:function(items){var me=this,i;if(items||me.hasListeners.remove){if(items){for(i=items.length-1;i>=0;--i){me.remove(items[i])}}else{while(me.length){me.removeAt(0)}}}else{me.length=me.items.length=me.keys.length=0;me.map={};me.indexMap={};me.generation++;me.indexGeneration=me.generation}},removeAt:function(index){var me=this,o,key;if(index<me.length&&index>=0){me.length--;o=me.items[index];Ext.Array.erase(me.items,index,1);key=me.keys[index];if(typeof key!=='undefined'){delete me.map[key]}
Ext.Array.erase(me.keys,index,1);if(me.hasListeners.remove){me.fireEvent('remove',o,key)}
me.generation++;return o}
return!1},removeRange:function(index,removeCount){var me=this,o,key,i,limit,syncIndices,trimming;if(index<me.length&&index>=0){if(!removeCount){removeCount=1}
limit=Math.min(index+removeCount,me.length);removeCount=limit-index;trimming=limit===me.length;syncIndices=trimming&&me.indexGeneration===me.generation;for(i=index;i<limit;i++){key=me.keys[i];if(key!=null){delete me.map[key];if(syncIndices){delete me.indexMap[key]}}}
o=me.items[i-1];me.length-=removeCount;me.generation++;if(syncIndices){me.indexGeneration=me.generation}
if(trimming){me.items.length=me.keys.length=me.length}else{me.items.splice(index,removeCount);me.keys.splice(index,removeCount)}
return o}
return!1},removeAtKey:function(key){var me=this,keys=me.keys,i;if(key==null){for(i=keys.length-1;i>=0;i--){if(keys[i]==null){me.removeAt(i)}}}else{return me.removeAt(me.indexOfKey(key))}},getCount:function(){return this.length},indexOf:function(o){var me=this,key;if(o!=null){if(!me.useLinearSearch&&(key=me.getKey(o))){return this.indexOfKey(key)}
return Ext.Array.indexOf(me.items,o)}
return-1},indexOfKey:function(key){if(!this.map.hasOwnProperty(key)){return-1}
if(this.indexGeneration!==this.generation){this.rebuildIndexMap()}
return this.indexMap[key]},rebuildIndexMap:function(){var me=this,indexMap=me.indexMap={},keys=me.keys,len=keys.length,i;for(i=0;i<len;i++){indexMap[keys[i]]=i}
me.indexGeneration=me.generation},get:function(key){var me=this,mk=me.map[key],item=mk!==undefined?mk:(typeof key==='number')?me.items[key]:undefined;return typeof item!=='function'||me.allowFunctions?item:null},getAt:function(index){return this.items[index]},getByKey:function(key){return this.map[key]},contains:function(o){var me=this,key;if(o!=null){if(!me.useLinearSearch&&(key=me.getKey(o))){return this.map[key]!=null}
return Ext.Array.indexOf(this.items,o)!==-1}
return!1},containsKey:function(key){return this.map.hasOwnProperty(key)},clear:function(){var me=this;if(me.generation){me.length=0;me.items=[];me.keys=[];me.map={};me.indexMap={};me.generation++;me.indexGeneration=me.generation}
if(me.hasListeners.clear){me.fireEvent('clear')}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(property,root,start,end){var values=this.extractValues(property,root),length=values.length,sum=0,i;start=start||0;end=(end||end===0)?end:length-1;for(i=start;i<=end;i++){sum+=values[i]}
return sum},collect:function(property,root,allowNull){var values=this.extractValues(property,root),length=values.length,hits={},unique=[],value,strValue,i;for(i=0;i<length;i++){value=values[i];strValue=String(value);if((allowNull||!Ext.isEmpty(value))&&!hits[strValue]){hits[strValue]=!0;unique.push(value)}}
return unique},extractValues:function(property,root){var values=this.items;if(root){values=Ext.Array.pluck(values,root)}
return Ext.Array.pluck(values,property)},hasRange:function(start,end){return(end<this.length)},getRange:function(start,end){var me=this,items=me.items,range=[],len=items.length,tmp,reverse;if(len<1){return range}
if(start>end){reverse=!0;tmp=start;start=end;end=tmp}
if(start<0){start=0}
if(end==null||end>=len){end=len-1}
range=items.slice(start,end+1);if(reverse&&range.length){range.reverse()}
return range},filter:function(property,value,anyMatch,caseSensitive){var filters=[];if(Ext.isString(property)){filters.push(new Ext.util.Filter({property:property,value:value,anyMatch:anyMatch,caseSensitive:caseSensitive}))}else if(Ext.isArray(property)||property instanceof Ext.util.Filter){filters=filters.concat(property)}
return this.filterBy(Ext.util.Filter.createFilterFn(filters))},filterBy:function(fn,scope){var me=this,newMC=new me.self(me.initialConfig),keys=me.keys,items=me.items,length=items.length,i;newMC.getKey=me.getKey;for(i=0;i<length;i++){if(fn.call(scope||me,items[i],keys[i])){newMC.add(keys[i],items[i])}}
newMC.useLinearSearch=me.useLinearSearch;return newMC},findIndex:function(property,value,start,anyMatch,caseSensitive){if(Ext.isEmpty(value,!1)){return-1}
value=this.createValueMatcher(value,anyMatch,caseSensitive);return this.findIndexBy(function(o){return o&&value.test(o[property])},null,start)},findIndexBy:function(fn,scope,start){var me=this,keys=me.keys,items=me.items,i=start||0,len=items.length;for(;i<len;i++){if(fn.call(scope||me,items[i],keys[i])){return i}}
return-1},createValueMatcher:function(value,anyMatch,caseSensitive,exactMatch){var er;if(!value.exec){er=Ext.String.escapeRegex;value=String(value);if(anyMatch===!0){value=er(value)}else{value='^'+er(value);if(exactMatch===!0){value+='$'}}
value=new RegExp(value,caseSensitive?'':'i')}
return value},clone:function(){var me=this,copy=new me.self(me.initialConfig);copy.add(me.keys,me.items);copy.useLinearSearch=me.useLinearSearch;return copy}})
;
Ext.define('Ext.util.Sorter',{isSorter:!0,config:{property:null,sorterFn:null,root:null,transform:null,direction:"ASC",id:undefined},statics:{createComparator:function(sorters,nextFn){nextFn=nextFn||0;return function(lhs,rhs){var items=sorters.isCollection?sorters.items:sorters,n=items.length,comp,i;for(i=0;i<n;++i){comp=items[i].sort(lhs,rhs);if(comp){return comp}}
return nextFn&&nextFn(lhs,rhs)}}},multiplier:1,constructor:function(config){if(config&&!this.isGrouper){if(!config.property===!config.sorterFn){Ext.raise("A Sorter requires either a property or a sorterFn.")}}
this.initConfig(config)},getId:function(){var id=this._id;if(!id){id=this.getProperty();if(!id){id=Ext.id(null,'ext-sorter-')}
this._id=id}
return id},sort:function(lhs,rhs){return this.multiplier*this.sortFn(lhs,rhs)},sortFn:function(item1,item2){var me=this,transform=me._transform,root=me._root,property=me._property,lhs,rhs;if(root){item1=item1[root];item2=item2[root]}
lhs=item1[property];rhs=item2[property];if(transform){lhs=transform(lhs);rhs=transform(rhs)}
return(lhs>rhs)?1:(lhs<rhs?-1:0)},applyDirection:function(direction){return direction?direction:'ASC'},updateDirection:function(direction){this.multiplier=(direction.toUpperCase()==="DESC")?-1:1},updateProperty:function(property){if(property){delete this.sortFn}},updateSorterFn:function(sorterFn){this.sortFn=sorterFn},toggle:function(){this.setDirection(Ext.String.toggle(this.getDirection(),"ASC","DESC"))},getState:function(){var me=this,result={root:me.getRoot(),property:me.getProperty(),direction:me.getDirection()};if(me._id){result.id=me._id}
return result},serialize:function(){return{property:this.getProperty(),direction:this.getDirection()}}})
;
Ext.define("Ext.util.Sortable",{isSortable:!0,$configPrefixed:!1,$configStrict:!1,config:{sorters:null},defaultSortDirection:"ASC",requires:['Ext.util.Sorter'],multiSortLimit:3,statics:{createComparator:function(sorters){return sorters&&sorters.length?function(r1,r2){var result=sorters[0].sort(r1,r2),length=sorters.length,i=1;for(;!result&&i<length;i++){result=sorters[i].sort.call(sorters[i],r1,r2)}
return result}:function(){return 0}}},applySorters:function(sorters){var me=this,sortersCollection;sortersCollection=me.getSorters()||new Ext.util.MixedCollection(!1,Ext.returnId);if(sorters){sortersCollection.addAll(me.decodeSorters(sorters))}
return sortersCollection},sort:function(sorters,direction,insertionPosition,doSort){var me=this,sorter,overFlow,currentSorters=me.getSorters();if(!currentSorters){me.setSorters(null);currentSorters=me.getSorters()}
if(Ext.isArray(sorters)){doSort=insertionPosition;insertionPosition=direction}else if(Ext.isObject(sorters)){sorters=[sorters];doSort=insertionPosition;insertionPosition=direction}else if(Ext.isString(sorters)){sorter=currentSorters.get(sorters);if(!sorter){sorter={property:sorters,direction:direction}}else if(direction==null){sorter.toggle()}else{sorter.setDirection(direction)}
sorters=[sorter]}
if(sorters&&sorters.length){sorters=me.decodeSorters(sorters);switch(insertionPosition){case "multi":currentSorters.insert(0,sorters[0]);overFlow=currentSorters.getCount()-me.multiSortLimit;if(overFlow>0){currentSorters.removeRange(me.multiSortLimit,overFlow)}
break;case "prepend":currentSorters.insert(0,sorters);break;case "append":currentSorters.addAll(sorters);break;case undefined:case null:case "replace":currentSorters.clear();currentSorters.addAll(sorters);break;default:Ext.raise('Sorter insertion point must be "multi", "prepend", '+'"append" or "replace"')}}
if(doSort!==!1){me.fireEvent('beforesort',me,sorters);me.onBeforeSort(sorters);if(me.getSorterCount()){me.doSort(me.generateComparator())}}
return sorters},getSorterCount:function(){return this.getSorters().items.length},generateComparator:function(){var sorters=this.getSorters().getRange();return sorters.length?this.createComparator(sorters):this.emptyComparator},emptyComparator:function(){return 0},onBeforeSort:Ext.emptyFn,decodeSorters:function(sorters){if(!Ext.isArray(sorters)){if(sorters===undefined){sorters=[]}else{sorters=[sorters]}}
var length=sorters.length,Sorter=Ext.util.Sorter,model=this.getModel?this.getModel():this.model,field,config,i;for(i=0;i<length;i++){config=sorters[i];if(!(config instanceof Sorter)){if(Ext.isString(config)){config={property:config}}
Ext.applyIf(config,{root:this.sortRoot,direction:"ASC"});if(config.fn){config.sorterFn=config.fn}
if(typeof config==='function'){config={sorterFn:config}}
if(model&&!config.transform){field=model.getField(config.property);config.transform=field&&field.sortType!==Ext.identityFn?field.sortType:undefined}
sorters[i]=new Ext.util.Sorter(config)}}
return sorters},getFirstSorter:function(){var sorters=this.getSorters().items,len=sorters.length,i=0,sorter;for(;i<len;++i){sorter=sorters[i];if(!sorter.isGrouper){return sorter}}
return null}},function(){this.prototype.createComparator=this.createComparator})
;
Ext.define('Ext.util.MixedCollection',{extend:'Ext.util.AbstractMixedCollection',mixins:{sortable:'Ext.util.Sortable'},constructor:function(){this.initConfig();this.callParent(arguments)},doSort:function(sorterFn){this.sortBy(sorterFn)},_sort:function(property,dir,fn){var me=this,i,len,dsc=String(dir).toUpperCase()==='DESC'?-1:1,c=[],keys=me.keys,items=me.items,o;fn=fn||function(a,b){return a-b};for(i=0,len=items.length;i<len;i++){c[c.length]={key:keys[i],value:items[i],index:i}}
Ext.Array.sort(c,function(a,b){return fn(a[property],b[property])*dsc||(a.index<b.index?-1:1)});for(i=0,len=c.length;i<len;i++){o=c[i];items[i]=o.value;keys[i]=o.key;me.indexMap[o.key]=i}
me.generation++;me.indexGeneration=me.generation;me.fireEvent('sort',me)},sortBy:function(sorterFn){var me=this,items=me.items,item,keys=me.keys,key,length=items.length,i;for(i=0;i<length;i++){items[i].$extCollectionIndex=i}
Ext.Array.sort(items,function(a,b){return sorterFn(a,b)||(a.$extCollectionIndex<b.$extCollectionIndex?-1:1)});for(i=0;i<length;i++){item=items[i];key=me.getKey(item);keys[i]=key;me.indexMap[key]=i;delete item.$extCollectionIndex}
me.generation++;me.indexGeneration=me.generation;me.fireEvent('sort',me,items,keys)},findInsertionIndex:function(newItem,sorterFn){var me=this,items=me.items,start=0,end=items.length-1,middle,comparison;if(!sorterFn){sorterFn=me.generateComparator()}
while(start<=end){middle=(start+end)>>1;comparison=sorterFn(newItem,items[middle]);if(comparison>=0){start=middle+1}else if(comparison<0){end=middle-1}}
return start},reorder:function(mapping){this.callParent([mapping]);this.fireEvent('sort',this)},sortByKey:function(dir,fn){this._sort('key',dir,fn||function(a,b){var v1=String(a).toUpperCase(),v2=String(b).toUpperCase();return v1>v2?1:(v1<v2?-1:0)})}})
;
Ext.define('Ext.util.TaskRunner',{fireIdleEvent:null,interval:10,timerId:null,constructor:function(interval){var me=this;if(typeof interval==='number'){me.interval=interval}else if(interval){Ext.apply(me,interval)}
me.tasks=[];me.timerFn=me.onTick.bind(me)},newTask:function(config){var task=new Ext.util.TaskRunner.Task(config);task.manager=this;if(Ext.Timer.track){task.creator=new Error().stack}
return task},start:function(task){var me=this,now=Ext.Date.now();if(!task.pending){me.tasks.push(task);task.pending=!0}
task.stopped=!1;task.taskStartTime=now;task.taskRunTime=task.fireOnStart!==!1?0:task.taskStartTime;task.taskRunCount=0;if(!me.firing){if(task.fireOnStart!==!1){me.startTimer(0,now)}else{me.startTimer(task.interval,now)}}
return task},stop:function(task,andRemove){var me=this,tasks=me.tasks,pendingCount=0,i;if(!task.stopped){task.stopped=!0;task.pending=!1;if(task.onStop){task.onStop.call(task.scope||task,task)}}
if(andRemove){Ext.Array.remove(tasks,task)}
for(i=0;!pendingCount&&i<tasks.length;i++){if(!tasks[i].stopped){pendingCount++}}
if(!pendingCount){Ext.undefer(me.timerId);me.timerId=null}
return task},stopAll:function(andRemove){var me=this;Ext.each(this.tasks,function(task){me.stop(task,andRemove)},null,!0)},firing:!1,nextExpires:1e99,onTick:function(){var me=this,tasks=me.tasks,fireIdleEvent=me.fireIdleEvent,now=Ext.Date.now(),nextExpires=1e99,len=tasks.length,expires,newTasks,i,task,rt,remove,args;var timer=Ext.Timer.get(me.timerId);if(timer){timer.tasks=[]}
me.timerId=null;me.firing=!0;for(i=0;i<len||i<(len=tasks.length);++i){task=tasks[i];if(!(remove=task.stopped)){expires=task.taskRunTime+task.interval;if(expires<=now){rt=1;if(fireIdleEvent===null&&task.fireIdleEvent!==!1){fireIdleEvent=!0}
task.taskRunCount++;if(task.args){args=task.addCountToArgs?task.args.concat([task.taskRunCount]):task.args}else{args=[task.taskRunCount]}
if(timer){timer.tasks.push(task)}
if(me.disableTryCatch){rt=task.run.apply(task.scope||task,args)}else{try{rt=task.run.apply(task.scope||task,args)}catch(taskError){try{Ext.log({fn:task.run,prefix:'Error while running task',stack:taskError.stack,msg:taskError,level:'error'});if(task.onError){rt=task.onError.call(task.scope||task,task,taskError)}}catch(e){}}}
task.taskRunTime=now;if(rt===!1||task.taskRunCount===task.repeat){me.stop(task);remove=!0}else{remove=task.stopped;expires=now+task.interval}}
if(!remove&&task.duration&&task.duration<=(now-task.taskStartTime)){me.stop(task);remove=!0}}
if(remove){task.pending=!1;if(!newTasks){newTasks=tasks.slice(0,i)}}else{if(newTasks){newTasks.push(task)}
if(nextExpires>expires){nextExpires=expires}}}
if(newTasks){me.tasks=newTasks}
me.firing=!1;if(me.tasks.length){me.startTimer(nextExpires-now,Ext.Date.now())}
if(fireIdleEvent===null){fireIdleEvent=!1}
Ext._suppressIdle=!fireIdleEvent},startTimer:function(timeout,now){var me=this,expires=now+timeout,timerId=me.timerId;if(timerId&&me.nextExpires-expires>me.interval){timerId=Ext.undefer(timerId)}
if(!timerId){if(timeout<me.interval){timeout=me.interval}
me.timerId=Ext.defer(me.timerFn,timeout);me.nextExpires=expires;var timer=Ext.Timer.get(me.timerId);if(timer){timer.runner=me}}}},function(){var me=this,proto=me.prototype;proto.destroy=proto.stopAll;me.Task=new Ext.Class({isTask:!0,stopped:!0,fireOnStart:!1,constructor:function(config){Ext.apply(this,config)},restart:function(interval){if(interval!==undefined){this.interval=interval}
this.manager.start(this)},start:function(interval){if(this.stopped){this.restart(interval)}},stop:function(andRemove){this.manager.stop(this,andRemove)},destroy:function(){this.stop(!0)}});proto=me.Task.prototype;proto.destroy=proto.stop})
;
Ext.define('Ext.fx.target.Target',{isAnimTarget:!0,constructor:function(target){this.target=target;this.id=this.getId()},getId:function(){return this.target.id},remove:function(){Ext.destroy(this.target)}})
;
Ext.define('Ext.fx.target.Element',{extend:'Ext.fx.target.Target',type:'element',constructor:function(target){this.callParent([target]);this.isAbsoluteOnPage=this.target.dom.parentNode===document.body&&this.target.isStyle('position','absolute')},getElVal:function(el,attr,val){if(val===undefined){if(attr==='x'){val=el.getX()}else if(attr==='y'){val=el.getY()}else if(attr==='scrollTop'){val=el.getScroll().top}else if(attr==='scrollLeft'){val=el.getScroll().left}else if(attr==='height'){val=el.getHeight()}else if(attr==='width'){val=el.getWidth()}else{val=el.getStyle(attr)}}
return val},getAttr:function(attr,val){var el=this.target;return[[el,this.getElVal(el,attr,val)]]},setAttr:function(targetData){var ln=targetData.length,attrs,attr,o,i,j,ln2;for(i=0;i<ln;i++){attrs=targetData[i].attrs;for(attr in attrs){if(attrs.hasOwnProperty(attr)){ln2=attrs[attr].length;for(j=0;j<ln2;j++){o=attrs[attr][j];this.setElVal(o[0],attr,o[1])}}}}},setElVal:function(element,attr,value){if(attr==='x'){if(this.isAbsoluteOnPage){element.setLocalX(value)}else{element.setXY([value,null])}}else if(attr==='y'){if(this.isAbsoluteOnPage){element.setLocalY(value)}else{element.setXY([null,value])}}else if(attr==='scrollTop'){element.scrollTo('top',value)}else if(attr==='scrollLeft'){element.scrollTo('left',value)}else if(attr==='width'){element.setWidth(value)}else if(attr==='height'){element.setHeight(value)}else{element.setStyle(attr,value)}}})
;
Ext.define('Ext.fx.target.ElementCSS',{extend:'Ext.fx.target.Element',setAttr:function(targetData,isFirstFrame){var cssArr={attrs:[],duration:[],easing:[]},ln=targetData.length,cleanerFn=function(){this.setStyle(Ext.supports.CSS3Prefix+'TransitionProperty',null);this.setStyle(Ext.supports.CSS3Prefix+'TransitionDuration',null);this.setStyle(Ext.supports.CSS3Prefix+'TransitionTimingFunction',null)},single={single:!0},attributes,attrs,attr,easing,duration,o,i,j,ln2;for(i=0;i<ln;i++){attrs=targetData[i];duration=attrs.duration;easing=attrs.easing;attrs=attrs.attrs;for(attr in attrs){if(Ext.Array.indexOf(cssArr.attrs,attr)===-1){cssArr.attrs.push(attr.replace(/[A-Z]/g,function(v){return'-'+v.toLowerCase()}));cssArr.duration.push(duration+'ms');cssArr.easing.push(easing)}}}
attributes=cssArr.attrs.join(',');duration=cssArr.duration.join(',');easing=cssArr.easing.join(', ');for(i=0;i<ln;i++){attrs=targetData[i].attrs;for(attr in attrs){ln2=attrs[attr].length;for(j=0;j<ln2;j++){o=attrs[attr][j];o[0].setStyle(Ext.supports.CSS3Prefix+'TransitionProperty',isFirstFrame?'':attributes);o[0].setStyle(Ext.supports.CSS3Prefix+'TransitionDuration',isFirstFrame?'':duration);o[0].setStyle(Ext.supports.CSS3Prefix+'TransitionTimingFunction',isFirstFrame?'':easing);o[0].setStyle(attr,o[1]);if(isFirstFrame){o=o[0].dom.offsetWidth}else{o[0].on(Ext.supports.CSS3TransitionEnd,cleanerFn,o[0],single)}}}}}})
;
Ext.define('Ext.fx.target.CompositeElement',{extend:'Ext.fx.target.Element',isComposite:!0,constructor:function(target){target.id=target.id||Ext.id(null,'ext-composite-');this.callParent([target])},getAttr:function(attr,val){var out=[],target=this.target,elements=target.elements,length=elements.length,i,el;for(i=0;i<length;i++){el=elements[i];if(el){el=target.getElement(el);out.push([el,this.getElVal(el,attr,val)])}}
return out},setAttr:function(targetData){var target=this.target,ln=targetData.length,elements=target.elements,ln3=elements.length,value,k,attrs,attr,el,i,j,ln2;for(i=0;i<ln;i++){attrs=targetData[i].attrs;for(attr in attrs){if(attrs.hasOwnProperty(attr)){ln2=attrs[attr].length;for(j=0;j<ln2;j++){value=attrs[attr][j][1];for(k=0;k<ln3;++k){el=elements[k];if(el){el=target.getElement(el);this.setElVal(el,attr,value)}}}}}}},remove:function(){this.target.destroy()}})
;
Ext.define('Ext.fx.target.CompositeElementCSS',{extend:'Ext.fx.target.CompositeElement',requires:['Ext.fx.target.ElementCSS'],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}})
;
Ext.define('Ext.fx.target.Sprite',{extend:'Ext.fx.target.Target',type:'draw',getFromPrim:function(sprite,attr){var obj;switch(attr){case 'rotate':case 'rotation':obj=sprite.attr.rotation;return{x:obj.x||0,y:obj.y||0,degrees:obj.degrees||0};case 'scale':case 'scaling':obj=sprite.attr.scaling;return{x:obj.x||1,y:obj.y||1,cx:obj.cx||0,cy:obj.cy||0};case 'translate':case 'translation':obj=sprite.attr.translation;return{x:obj.x||0,y:obj.y||0};default:return sprite.attr[attr]}},getAttr:function(attr,val){return[[this.target,val!==undefined?val:this.getFromPrim(this.target,attr)]]},setAttr:function(targetData){var ln=targetData.length,spriteArr=[],attrsConf,attr,attrArr,attrs,sprite,idx,value,i,j,x,y,ln2;for(i=0;i<ln;i++){attrsConf=targetData[i].attrs;for(attr in attrsConf){attrArr=attrsConf[attr];ln2=attrArr.length;for(j=0;j<ln2;j++){sprite=attrArr[j][0];attrs=attrArr[j][1];if(attr==='translate'||attr==='translation'){value={x:attrs.x,y:attrs.y}}else if(attr==='rotate'||attr==='rotation'){x=attrs.x;if(isNaN(x)){x=null}
y=attrs.y;if(isNaN(y)){y=null}
value={degrees:attrs.degrees,x:x,y:y}}else if(attr==='scale'||attr==='scaling'){x=attrs.x;if(isNaN(x)){x=null}
y=attrs.y;if(isNaN(y)){y=null}
value={x:x,y:y,cx:attrs.cx,cy:attrs.cy}}else if(attr==='width'||attr==='height'||attr==='x'||attr==='y'){value=parseFloat(attrs)}else{value=attrs}
idx=Ext.Array.indexOf(spriteArr,sprite);if(idx===-1){spriteArr.push([sprite,{}]);idx=spriteArr.length-1}
spriteArr[idx][1][attr]=value}}}
ln=spriteArr.length;for(i=0;i<ln;i++){spriteArr[i][0].setAttributes(spriteArr[i][1])}
this.target.redraw()}})
;
Ext.define('Ext.fx.target.CompositeSprite',{extend:'Ext.fx.target.Sprite',getAttr:function(attr,val){var out=[],sprites=[].concat(this.target.items),length=sprites.length,i,sprite;for(i=0;i<length;i++){sprite=sprites[i];out.push([sprite,val!==undefined?val:this.getFromPrim(sprite,attr)])}
return out}})
;
Ext.define('Ext.fx.target.Component',{extend:'Ext.fx.target.Target',type:'component',getPropMethod:{top:function(){return this.getPosition(!0)[1]},left:function(){return this.getPosition(!0)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle('opacity')}},setMethods:{top:'setPosition',left:'setPosition',x:'setPagePosition',y:'setPagePosition',height:'setSize',width:'setSize',opacity:'setOpacity'},getAttr:function(attr,val){return[[this.target,val!==undefined?val:this.getPropMethod[attr].call(this.target)]]},setAttr:function(targetData,isFirstFrame,isLastFrame){var me=this,ln=targetData.length,attrs,attr,o,i,j,targets,left,top,w,h,methodsToCall={},methodProps;for(i=0;i<ln;i++){attrs=targetData[i].attrs;for(attr in attrs){targets=attrs[attr].length;for(j=0;j<targets;j++){o=attrs[attr][j];methodProps=methodsToCall[me.setMethods[attr]]||(methodsToCall[me.setMethods[attr]]={});methodProps.target=o[0];methodProps[attr]=o[1]}}
if(methodsToCall.setPosition){o=methodsToCall.setPosition;left=(o.left===undefined)?undefined:parseFloat(o.left);top=(o.top===undefined)?undefined:parseFloat(o.top);o.target.setPosition(left,top)}
if(methodsToCall.setPagePosition){o=methodsToCall.setPagePosition;o.target.setPagePosition(o.x,o.y)}
if(methodsToCall.setSize){o=methodsToCall.setSize;w=(o.width===undefined)?o.target.getWidth():parseFloat(o.width);h=(o.height===undefined)?o.target.getHeight():parseFloat(o.height);o.target.el.setSize(w,h);if(isLastFrame||me.dynamic){Ext.GlobalEvents.on({idle:Ext.Function.bind(o.target.setSize,o.target,[w,h]),single:!0})}}
if(methodsToCall.setOpacity){o=methodsToCall.setOpacity;o.target.el.setStyle('opacity',o.opacity)}}}})
;
Ext.define('Ext.fx.Queue',{requires:['Ext.util.HashMap'],constructor:function(){this.targets=new Ext.util.HashMap();this.fxQueue={}},getFxDefaults:function(targetId){var target=this.targets.get(targetId);if(target){return target.fxDefaults}
return{}},setFxDefaults:function(targetId,obj){var target=this.targets.get(targetId);if(target){target.fxDefaults=Ext.apply(target.fxDefaults||{},obj)}},stopAnimation:function(targetId,suppressEvent){var me=this,queue=me.getFxQueue(targetId),ln=queue.length,item;while(ln){item=queue[ln-1];if(item){item.end(suppressEvent)}
ln--}},getActiveAnimation:function(targetId){var queue=this.getFxQueue(targetId);return(queue&&!!queue.length)?queue[0]:!1},hasFxBlock:function(targetId){var queue=this.getFxQueue(targetId);return queue&&queue[0]&&queue[0].block},getFxQueue:function(targetId){if(!targetId){return!1}
var me=this,fxQueue=me.fxQueue,queue=fxQueue[targetId],target=me.targets.get(targetId);if(!target){return!1}
if(!queue){me.fxQueue[targetId]=fxQueue[targetId]=[];if(target.type!=='element'){target.target.on('destroy',function(){fxQueue[targetId]=null;delete fxQueue[targetId]})}}
return me.fxQueue[targetId]},clearFxQueue:function(){Ext.Object.clear(this.fxQueue)},queueFx:function(anim){var me=this,target=anim.target,targetId=target.getId(),queue,ln;if(!target){return}
queue=me.getFxQueue(targetId);ln=queue.length;if(ln){if(anim.concurrent){anim.paused=!1}else{queue[ln-1].on('afteranimate',function(){anim.paused=!1})}}else{anim.paused=!1}
anim.on('afteranimate',function(){var el;Ext.Array.remove(queue,anim);if(queue.length===0){me.targets.remove(anim.target);me.fxQueue[targetId]=null;delete me.fxQueue[targetId]}
if(anim.remove){if(target.type==='element'){el=Ext.get(targetId);if(el){el.destroy()}}}},me,{single:!0});queue.push(anim)}})
;
Ext.define('Ext.fx.Manager',{singleton:!0,requires:['Ext.util.MixedCollection','Ext.util.TaskRunner','Ext.fx.target.Element','Ext.fx.target.ElementCSS','Ext.fx.target.CompositeElement','Ext.fx.target.CompositeElementCSS','Ext.fx.target.Sprite','Ext.fx.target.CompositeSprite','Ext.fx.target.Component'],mixins:{queue:'Ext.fx.Queue'},constructor:function(){var me=this;me.items=new Ext.util.MixedCollection();me.targetArr={};me.mixins.queue.constructor.call(me);me.taskRunner=new Ext.util.TaskRunner()},interval:16,forceJS:!0,createTarget:function(target){var me=this,useCSS3=!me.forceJS&&Ext.supports.Transitions,targetObj;me.useCSS3=useCSS3;if(target){if(target.tagName||Ext.isString(target)||target.isFly){target=Ext.get(target);targetObj=new Ext.fx.target['Element'+(useCSS3?'CSS':'')](target)}else if(target.dom){targetObj=new Ext.fx.target['Element'+(useCSS3?'CSS':'')](target)}else if(target.isComposite){targetObj=new Ext.fx.target['CompositeElement'+(useCSS3?'CSS':'')](target)}else if(target.isSprite){targetObj=new Ext.fx.target.Sprite(target)}else if(target.isCompositeSprite){targetObj=new Ext.fx.target.CompositeSprite(target)}else if(target.isComponent){targetObj=new Ext.fx.target.Component(target)}else if(target.isAnimTarget){return target}else{return null}
me.targets.add(targetObj);return targetObj}else{return null}},addAnim:function(anim){var me=this,items=me.items,task=me.task;items.add(anim.id,anim);if(!task&&items.length){task=me.task={run:me.runner,interval:me.interval,scope:me};me.taskRunner.start(task)}},removeAnim:function(anim){var me=this,items=me.items,task=me.task;items.removeAtKey(anim.id);if(task&&!items.length){me.taskRunner.stop(task);delete me.task}},runner:function(){var me=this,items=me.items.getRange(),i=0,len=items.length,anim;me.targetArr={};me.timestamp=new Date();for(;i<len;i++){anim=items[i];if(anim.isReady()){me.startAnim(anim)}}
for(i=0;i<len;i++){anim=items[i];if(anim.isRunning()){me.runAnim(anim)}}
me.applyPendingAttrs();me.targetArr=null},startAnim:function(anim){anim.start(this.timestamp)},runAnim:function(anim,forceEnd){if(!anim){return}
var me=this,useCSS3=me.useCSS3&&anim.target.type==='element',elapsedTime=me.timestamp-anim.startTime,lastFrame=(elapsedTime>=anim.duration),target,o;if(forceEnd){elapsedTime=anim.duration;lastFrame=!0}
target=me.collectTargetData(anim,elapsedTime,useCSS3,lastFrame);if(useCSS3){anim.target.setAttr(target.anims[anim.id].attributes,!0);me.collectTargetData(anim,anim.duration,useCSS3,lastFrame);anim.paused=!0;target=anim.target.target;if(anim.target.isComposite){target=anim.target.target.last()}
o={};o[Ext.supports.CSS3TransitionEnd]=anim.lastFrame;o.scope=anim;o.single=!0;target.on(o)}
return target},jumpToEnd:function(anim){var me=this,target,clear;if(!me.targetArr){me.targetArr={};clear=!0}
target=me.runAnim(anim,!0);me.applyAnimAttrs(target,target.anims[anim.id]);if(clear){me.targetArr=null}},collectTargetData:function(anim,elapsedTime,useCSS3,isLastFrame){var targetId=anim.target.getId(),target=this.targetArr[targetId];if(!target){target=this.targetArr[targetId]={id:targetId,el:anim.target,anims:{}}}
target.anims[anim.id]={id:anim.id,anim:anim,elapsed:elapsedTime,isLastFrame:isLastFrame,attributes:[{duration:anim.duration,easing:(useCSS3&&anim.reverse)?anim.easingFn.reverse().toCSS3():anim.easing,attrs:anim.runAnim(elapsedTime)}]};return target},applyAnimAttrs:function(target,animWrap){var anim=animWrap.anim;if(animWrap.attributes&&anim.isRunning()){target.el.setAttr(animWrap.attributes,!1,animWrap.isLastFrame);if(animWrap.isLastFrame){anim.lastFrame()}}},applyPendingAttrs:function(){var targetArr=this.targetArr,target,targetId,animWrap,anim,animId;for(targetId in targetArr){if(targetArr.hasOwnProperty(targetId)){target=targetArr[targetId];for(animId in target.anims){if(target.anims.hasOwnProperty(animId)){animWrap=target.anims[animId];anim=animWrap.anim;if(animWrap.attributes&&anim.isRunning()){target.el.setAttr(animWrap.attributes,!1,animWrap.isLastFrame);if(animWrap.isLastFrame){anim.lastFrame()}}}}}}},clear:function(){var me=this;if(me.taskRunner){me.taskRunner.stopAll(!0)}
me.targetArr={};me.items.clear();me.targets.clear();me.clearFxQueue()}})
;
Ext.define('Ext.fx.Animator',{mixins:{observable:'Ext.util.Observable'},requires:['Ext.fx.Manager'],isAnimator:!0,duration:250,delay:0,delayStart:0,dynamic:!1,easing:'ease',running:!1,paused:!1,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(config){var me=this;config=Ext.apply(me,config||{});me.config=config;me.id=Ext.id(null,'ext-animator-');me.mixins.observable.constructor.call(me,config);me.timeline=[];me.createTimeline(me.keyframes);if(me.target){me.applyAnimator(me.target);Ext.fx.Manager.addAnim(me)}},sorter:function(a,b){return a.pct-b.pct},createTimeline:function(keyframes){var me=this,attrs=[],to=me.to||{},duration=me.duration,prevMs,ms,i,ln,pct,attr;for(pct in keyframes){if(keyframes.hasOwnProperty(pct)&&me.animKeyFramesRE.test(pct)){attr={attrs:Ext.apply(keyframes[pct],to)};if(pct==="from"){pct=0}else if(pct==="to"){pct=100}
attr.pct=parseInt(pct,10);attrs.push(attr)}}
Ext.Array.sort(attrs,me.sorter);ln=attrs.length;for(i=0;i<ln;i++){prevMs=(attrs[i-1])?duration*(attrs[i-1].pct/100):0;ms=duration*(attrs[i].pct/100);me.timeline.push({duration:ms-prevMs,attrs:attrs[i].attrs})}},applyAnimator:function(target){var me=this,anims=[],timeline=me.timeline,ln=timeline.length,anim,easing,damper,attrs,i;if(me.fireEvent('beforeanimate',me)!==!1){for(i=0;i<ln;i++){anim=timeline[i];attrs=anim.attrs;easing=attrs.easing||me.easing;damper=attrs.damper||me.damper;delete attrs.easing;delete attrs.damper;anim=new Ext.fx.Anim({target:target,easing:easing,damper:damper,duration:anim.duration,paused:!0,to:attrs});anims.push(anim)}
me.animations=anims;me.target=anim.target;for(i=0;i<ln-1;i++){anim=anims[i];anim.nextAnim=anims[i+1];anim.on('afteranimate',function(){this.nextAnim.paused=!1});anim.on('afteranimate',function(){this.fireEvent('keyframe',this,++this.keyframeStep)},me)}
anims[ln-1].on('afteranimate',function(){this.lastFrame()},me)}},start:function(startTime){var me=this,delay=me.delay,delayStart=me.delayStart,delayDelta;if(delay){if(!delayStart){me.delayStart=startTime;return}else{delayDelta=startTime-delayStart;if(delayDelta<delay){return}else{startTime=new Date(delayStart.getTime()+delay)}}}
if(me.fireEvent('beforeanimate',me)!==!1){me.startTime=startTime;me.running=!0;me.animations[me.keyframeStep].paused=!1}},lastFrame:function(){var me=this,iter=me.iterations,iterCount=me.currentIteration;iterCount++;if(iterCount<iter){me.startTime=new Date();me.currentIteration=iterCount;me.keyframeStep=0;me.applyAnimator(me.target);me.animations[me.keyframeStep].paused=!1}else{me.currentIteration=0;me.end()}},end:function(){var me=this;me.fireEvent('afteranimate',me,me.startTime,new Date()-me.startTime)},isReady:function(){return this.paused===!1&&this.running===!1&&this.iterations>0},isRunning:function(){return!1}})
;
Ext.define('Ext.fx.CubicBezier',{singleton:!0,cubicBezierAtTime:function(t,p1x,p1y,p2x,p2y,duration){var cx=3*p1x,bx=3*(p2x-p1x)-cx,ax=1-cx-bx,cy=3*p1y,by=3*(p2y-p1y)-cy,ay=1-cy-by;function sampleCurveX(t){return((ax*t+bx)*t+cx)*t}
function solve(x,epsilon){var t=solveCurveX(x,epsilon);return((ay*t+by)*t+cy)*t}
function solveCurveX(x,epsilon){var t0,t1,t2,x2,d2,i;for(t2=x,i=0;i<8;i++){x2=sampleCurveX(t2)-x;if(Math.abs(x2)<epsilon){return t2}
d2=(3*ax*t2+2*bx)*t2+cx;if(Math.abs(d2)<1e-6){break}
t2=t2-x2/d2}
t0=0;t1=1;t2=x;if(t2<t0){return t0}
if(t2>t1){return t1}
while(t0<t1){x2=sampleCurveX(t2);if(Math.abs(x2-x)<epsilon){return t2}
if(x>x2){t0=t2}else{t1=t2}
t2=(t1-t0)/2+t0}
return t2}
return solve(t,1/(200*duration))},cubicBezier:function(x1,y1,x2,y2){var fn=function(pos){return Ext.fx.CubicBezier.cubicBezierAtTime(pos,x1,y1,x2,y2,1)};fn.toCSS3=function(){return'cubic-bezier('+[x1,y1,x2,y2].join(',')+')'};fn.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-x2,1-y2,1-x1,1-y1)};return fn}})
;
Ext.define('Ext.fx.Easing',function(){var math=Math,pi=math.PI,pow=math.pow,sin=math.sin,sqrt=math.sqrt,abs=math.abs,backInSeed=1.70158;return{singleton:!0,requires:['Ext.fx.CubicBezier'],linear:Ext.identityFn,ease:function(n){var q=0.07813-n/2,Q=sqrt(0.0066+q*q),x=Q-q,X=pow(abs(x),1/3)*(x<0?-1:1),y=-Q-q,Y=pow(abs(y),1/3)*(y<0?-1:1),t=X+Y+0.25;return pow(1-t,2)*3*t*0.1+(1-t)*3*t*t+t*t*t},easeIn:function(n){return pow(n,1.7)},easeOut:function(n){return pow(n,0.48)},easeInOut:function(n){var q=0.48-n/1.04,Q=sqrt(0.1734+q*q),x=Q-q,X=pow(abs(x),1/3)*(x<0?-1:1),y=-Q-q,Y=pow(abs(y),1/3)*(y<0?-1:1),t=X+Y+0.5;return(1-t)*3*t*t+t*t*t},backIn:function(n){return n*n*((backInSeed+1)*n-backInSeed)},backOut:function(n){n=n-1;return n*n*((backInSeed+1)*n+backInSeed)+1},elasticIn:function(n){var p=0.3,s=p/4;if(n===0||n===1){return n}
return pow(2,-10*n)*sin((n-s)*(2*pi)/p)+1},elasticOut:function(n){return 1-Ext.fx.Easing.elasticIn(1-n)},bounceIn:function(n){return 1-Ext.fx.Easing.bounceOut(1-n)},bounceOut:function(n){var s=7.5625,p=2.75,l;if(n<(1/p)){l=s*n*n}else{if(n<(2/p)){n-=(1.5/p);l=s*n*n+0.75}else{if(n<(2.5/p)){n-=(2.25/p);l=s*n*n+0.9375}else{n-=(2.625/p);l=s*n*n+0.984375}}}
return l}}},function(me){var Easing=me.self,proto=Easing.prototype;Easing.addMembers({'back-in':proto.backIn,'back-out':proto.backOut,'ease-in':proto.easeIn,'ease-out':proto.easeOut,'elastic-in':proto.elasticIn,'elastic-out':proto.elasticOut,'bounce-in':proto.bounceIn,'bounce-out':proto.bounceOut,'ease-in-out':proto.easeInOut})})
;
Ext.define('Ext.fx.DrawPath',{singleton:!0,pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,is:function(o,type){type=String(type).toLowerCase();return(type=="object"&&o===Object(o))||(type=="undefined"&&typeof o==type)||(type=="null"&&o===null)||(type=="array"&&Array.isArray&&Array.isArray(o))||(Object.prototype.toString.call(o).toLowerCase().slice(8,-1))==type},path2string:function(){return this.join(",").replace(Ext.fx.DrawPath.pathToStringRE,"$1")},pathToString:function(arrayPath){return arrayPath.join(",").replace(Ext.fx.DrawPath.pathToStringRE,"$1")},parsePathString:function(pathString){if(!pathString){return null}
var me=this,paramCounts={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},data=[];if(me.is(pathString,"array")&&me.is(pathString[0],"array")){data=me.pathClone(pathString)}
if(!data.length){String(pathString).replace(me.pathCommandRE,function(a,b,c){var params=[],name=b.toLowerCase();c.replace(me.pathValuesRE,function(a,b){if(b){params.push(+b)}});if(name==="m"&&params.length>2){data.push([b].concat(Ext.Array.splice(params,0,2)));name="l";b=(b==="m")?"l":"L"}
while(params.length>=paramCounts[name]){data.push([b].concat(Ext.Array.splice(params,0,paramCounts[name])));if(!paramCounts[name]){break}}})}
data.toString=me.path2string;return data},pathClone:function(pathArray){var res=[],j,jj,i,ii;if(!this.is(pathArray,"array")||!this.is(pathArray&&pathArray[0],"array")){pathArray=this.parsePathString(pathArray)}
for(i=0,ii=pathArray.length;i<ii;i++){res[i]=[];for(j=0,jj=pathArray[i].length;j<jj;j++){res[i][j]=pathArray[i][j]}}
res.toString=this.path2string;return res},pathToAbsolute:function(pathArray){if(!this.is(pathArray,"array")||!this.is(pathArray&&pathArray[0],"array")){pathArray=this.parsePathString(pathArray)}
var res=[],x=0,y=0,mx=0,my=0,i=0,ln=pathArray.length,r,pathSegment,j,ln2;if(ln&&pathArray[0][0]==="M"){x=+pathArray[0][1];y=+pathArray[0][2];mx=x;my=y;i++;res[0]=["M",x,y]}
for(;i<ln;i++){r=res[i]=[];pathSegment=pathArray[i];if(pathSegment[0]!==pathSegment[0].toUpperCase()){r[0]=pathSegment[0].toUpperCase();switch(r[0]){case "A":r[1]=pathSegment[1];r[2]=pathSegment[2];r[3]=pathSegment[3];r[4]=pathSegment[4];r[5]=pathSegment[5];r[6]=+(pathSegment[6]+x);r[7]=+(pathSegment[7]+y);break;case "V":r[1]=+pathSegment[1]+y;break;case "H":r[1]=+pathSegment[1]+x;break;case "M":mx=+pathSegment[1]+x;my=+pathSegment[2]+y;default:j=1;ln2=pathSegment.length;for(;j<ln2;j++){r[j]=+pathSegment[j]+((j%2)?x:y)}}}else{j=0;ln2=pathSegment.length;for(;j<ln2;j++){res[i][j]=pathSegment[j]}}
switch(r[0]){case "Z":x=mx;y=my;break;case "H":x=r[1];break;case "V":y=r[1];break;case "M":pathSegment=res[i];ln2=pathSegment.length;mx=pathSegment[ln2-2];my=pathSegment[ln2-1];default:pathSegment=res[i];ln2=pathSegment.length;x=pathSegment[ln2-2];y=pathSegment[ln2-1]}}
res.toString=this.path2string;return res},interpolatePaths:function(path,path2){var me=this,p=me.pathToAbsolute(path),p2=me.pathToAbsolute(path2),attrs={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},attrs2={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},fixArc=function(pp,i){var pi;if(pp[i].length>7){pp[i].shift();pi=pp[i];while(pi.length){Ext.Array.splice(pp,i++,0,["C"].concat(Ext.Array.splice(pi,0,6)))}
Ext.Array.erase(pp,i,1);ii=Math.max(p.length,p2.length||0)}},fixM=function(path1,path2,a1,a2,i){if(path1&&path2&&path1[i][0]==="M"&&path2[i][0]!=="M"){Ext.Array.splice(path2,i,0,["M",a2.x,a2.y]);a1.bx=0;a1.by=0;a1.x=path1[i][1];a1.y=path1[i][2];ii=Math.max(p.length,p2.length||0)}},i,ii,seg,seg2,seglen,seg2len;for(i=0,ii=Math.max(p.length,p2.length||0);i<ii;i++){p[i]=me.command2curve(p[i],attrs);fixArc(p,i);(p2[i]=me.command2curve(p2[i],attrs2));fixArc(p2,i);fixM(p,p2,attrs,attrs2,i);fixM(p2,p,attrs2,attrs,i);seg=p[i];seg2=p2[i];seglen=seg.length;seg2len=seg2.length;attrs.x=seg[seglen-2];attrs.y=seg[seglen-1];attrs.bx=parseFloat(seg[seglen-4])||attrs.x;attrs.by=parseFloat(seg[seglen-3])||attrs.y;attrs2.bx=(parseFloat(seg2[seg2len-4])||attrs2.x);attrs2.by=(parseFloat(seg2[seg2len-3])||attrs2.y);attrs2.x=seg2[seg2len-2];attrs2.y=seg2[seg2len-1]}
return[p,p2]},command2curve:function(pathCommand,d){var me=this;if(!pathCommand){return["C",d.x,d.y,d.x,d.y,d.x,d.y]}
if(pathCommand[0]!=="T"&&pathCommand[0]!=="Q"){d.qx=d.qy=null}
switch(pathCommand[0]){case "M":d.X=pathCommand[1];d.Y=pathCommand[2];break;case "A":pathCommand=["C"].concat(me.arc2curve.apply(me,[d.x,d.y].concat(pathCommand.slice(1))));break;case "S":pathCommand=["C",d.x+(d.x-(d.bx||d.x)),d.y+(d.y-(d.by||d.y))].concat(pathCommand.slice(1));break;case "T":d.qx=d.x+(d.x-(d.qx||d.x));d.qy=d.y+(d.y-(d.qy||d.y));pathCommand=["C"].concat(me.quadratic2curve(d.x,d.y,d.qx,d.qy,pathCommand[1],pathCommand[2]));break;case "Q":d.qx=pathCommand[1];d.qy=pathCommand[2];pathCommand=["C"].concat(me.quadratic2curve(d.x,d.y,pathCommand[1],pathCommand[2],pathCommand[3],pathCommand[4]));break;case "L":pathCommand=["C"].concat(d.x,d.y,pathCommand[1],pathCommand[2],pathCommand[1],pathCommand[2]);break;case "H":pathCommand=["C"].concat(d.x,d.y,pathCommand[1],d.y,pathCommand[1],d.y);break;case "V":pathCommand=["C"].concat(d.x,d.y,d.x,pathCommand[1],d.x,pathCommand[1]);break;case "Z":pathCommand=["C"].concat(d.x,d.y,d.X,d.Y,d.X,d.Y);break}
return pathCommand},quadratic2curve:function(x1,y1,ax,ay,x2,y2){var _13=1/3,_23=2/3;return[_13*x1+_23*ax,_13*y1+_23*ay,_13*x2+_23*ax,_13*y2+_23*ay,x2,y2]},rotate:function(x,y,rad){var cos=Math.cos(rad),sin=Math.sin(rad),X=x*cos-y*sin,Y=x*sin+y*cos;return{x:X,y:Y}},arc2curve:function(x1,y1,rx,ry,angle,large_arc_flag,sweep_flag,x2,y2,recursive){var me=this,PI=Math.PI,radian=me.radian,_120=PI*120/180,rad=radian*(+angle||0),res=[],math=Math,mcos=math.cos,msin=math.sin,msqrt=math.sqrt,mabs=math.abs,masin=math.asin,xy,x,y,h,rx2,ry2,k,cx,cy,f1,f2,df,c1,s1,c2,s2,t,hx,hy,m1,m2,m3,m4,newres,i,ln,f2old,x2old,y2old;if(!recursive){xy=me.rotate(x1,y1,-rad);x1=xy.x;y1=xy.y;xy=me.rotate(x2,y2,-rad);x2=xy.x;y2=xy.y;x=(x1-x2)/2;y=(y1-y2)/2;h=(x*x)/(rx*rx)+(y*y)/(ry*ry);if(h>1){h=msqrt(h);rx=h*rx;ry=h*ry}
rx2=rx*rx;ry2=ry*ry;k=(large_arc_flag==sweep_flag?-1:1)*msqrt(mabs((rx2*ry2-rx2*y*y-ry2*x*x)/(rx2*y*y+ry2*x*x)));cx=k*rx*y/ry+(x1+x2)/2;cy=k*-ry*x/rx+(y1+y2)/2;f1=masin(((y1-cy)/ry).toFixed(7));f2=masin(((y2-cy)/ry).toFixed(7));f1=x1<cx?PI-f1:f1;f2=x2<cx?PI-f2:f2;if(f1<0){f1=PI*2+f1}
if(f2<0){f2=PI*2+f2}
if(sweep_flag&&f1>f2){f1=f1-PI*2}
if(!sweep_flag&&f2>f1){f2=f2-PI*2}}else{f1=recursive[0];f2=recursive[1];cx=recursive[2];cy=recursive[3]}
df=f2-f1;if(mabs(df)>_120){f2old=f2;x2old=x2;y2old=y2;f2=f1+_120*(sweep_flag&&f2>f1?1:-1);x2=cx+rx*mcos(f2);y2=cy+ry*msin(f2);res=me.arc2curve(x2,y2,rx,ry,angle,0,sweep_flag,x2old,y2old,[f2,f2old,cx,cy])}
df=f2-f1;c1=mcos(f1);s1=msin(f1);c2=mcos(f2);s2=msin(f2);t=math.tan(df/4);hx=4/3*rx*t;hy=4/3*ry*t;m1=[x1,y1];m2=[x1+hx*s1,y1-hy*c1];m3=[x2+hx*s2,y2-hy*c2];m4=[x2,y2];m2[0]=2*m1[0]-m2[0];m2[1]=2*m1[1]-m2[1];if(recursive){return[m2,m3,m4].concat(res)}else{res=[m2,m3,m4].concat(res).join().split(",");newres=[];ln=res.length;for(i=0;i<ln;i++){newres[i]=i%2?me.rotate(res[i-1],res[i],rad).y:me.rotate(res[i],res[i+1],rad).x}
return newres}}})
;
Ext.define('Ext.fx.PropertyHandler',{requires:['Ext.fx.DrawPath'],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(from,end,damper,initial,attr){var unitRE=this.unitRE,match=unitRE.exec(from),start,units;damper=(typeof damper==='number')?damper:1;if(match){from=match[1];units=match[2];if(!this.scrollRE.test(attr)&&!units&&this.pixelDefaultsRE.test(attr)){units='px'}}
from=+from||0;match=unitRE.exec(end);if(match){end=match[1];units=match[2]||units}
end=+end||0;start=(initial!=null)?initial:from;return{from:from,delta:(end-start)*damper,units:units}},get:function(from,end,damper,initialFrom,attr){var ln=from.length,out=[],i,initial,res,j,len;for(i=0;i<ln;i++){if(initialFrom){initial=initialFrom[i][1].from}
if(Ext.isArray(from[i][1])&&Ext.isArray(end)){res=[];j=0;len=from[i][1].length;for(;j<len;j++){res.push(this.computeDelta(from[i][1][j],end[j],damper,initial,attr))}
out.push([from[i][0],res])}else{out.push([from[i][0],this.computeDelta(from[i][1],end,damper,initial,attr)])}}
return out},set:function(values,easing){var ln=values.length,out=[],i,val,res,len,j;for(i=0;i<ln;i++){val=values[i][1];if(Ext.isArray(val)){res=[];j=0;len=val.length;for(;j<len;j++){res.push(val[j].from+val[j].delta*easing+(val[j].units||0))}
out.push([values[i][0],res])}else{out.push([values[i][0],val.from+val.delta*easing+(val.units||0)])}}
return out}},stringHandler:{computeDelta:function(from,end,damper,initial,attr){return{from:from,delta:end}},get:function(from,end,damper,initialFrom,attr){var ln=from.length,out=[],i,initial;for(i=0;i<ln;i++){out.push([from[i][0],this.computeDelta(from[i][1],end,damper,initial,attr)])}
return out},set:function(values,easing){var ln=values.length,out=[],i,val;for(i=0;i<ln;i++){val=values[i][1];out.push([values[i][0],val.delta])}
return out}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(color,damper){var out=!1,reList=[this.hexRE,this.rgbRE,this.hex3RE],length=reList.length,match,base,re,i;damper=(typeof damper==='number')?damper:1;for(i=0;i<length;i++){re=reList[i];base=(i%2===0)?16:10;match=re.exec(color);if(match&&match.length===4){if(i===2){match[1]+=match[1];match[2]+=match[2];match[3]+=match[3]}
out={red:parseInt(match[1],base),green:parseInt(match[2],base),blue:parseInt(match[3],base)};break}}
return out||color},computeDelta:function(from,end,damper,initial){from=this.parseColor(from);end=this.parseColor(end,damper);var start=initial?initial:from,tfrom=typeof start,tend=typeof end;if(tfrom==='string'||tfrom==='undefined'||tend==='string'||tend==='undefined'){return end||start}
return{from:from,delta:{red:Math.round((end.red-start.red)*damper),green:Math.round((end.green-start.green)*damper),blue:Math.round((end.blue-start.blue)*damper)}}},get:function(start,end,damper,initialFrom){var ln=start.length,out=[],i,initial;for(i=0;i<ln;i++){if(initialFrom){initial=initialFrom[i][1].from}
out.push([start[i][0],this.computeDelta(start[i][1],end,damper,initial)])}
return out},set:function(values,easing){var ln=values.length,out=[],i,val,parsedString,from,delta;for(i=0;i<ln;i++){val=values[i][1];if(val){from=val.from;delta=val.delta;val=(typeof val==='object'&&'red' in val)?'rgb('+val.red+', '+val.green+', '+val.blue+')':val;val=(typeof val==='object'&&val.length)?val[0]:val;if(typeof val==='undefined'){return[]}
parsedString=typeof val==='string'?val:'rgb('+[(from.red+Math.round(delta.red*easing))%256,(from.green+Math.round(delta.green*easing))%256,(from.blue+Math.round(delta.blue*easing))%256].join(',')+')';out.push([values[i][0],parsedString])}}
return out}},object:{interpolate:function(prop,damper){var out={},p;damper=(typeof damper==='number')?damper:1;for(p in prop){out[p]=parseFloat(prop[p])*damper}
return out},computeDelta:function(from,end,damper,initial){from=this.interpolate(from);end=this.interpolate(end,damper);var start=initial?initial:from,delta={},p;for(p in end){delta[p]=end[p]-start[p]}
return{from:from,delta:delta}},get:function(start,end,damper,initialFrom){var ln=start.length,out=[],i,initial;for(i=0;i<ln;i++){if(initialFrom){initial=initialFrom[i][1].from}
out.push([start[i][0],this.computeDelta(start[i][1],end,damper,initial)])}
return out},set:function(values,easing){var ln=values.length,out=[],outObject={},i,from,delta,val,p;for(i=0;i<ln;i++){val=values[i][1];from=val.from;delta=val.delta;for(p in from){outObject[p]=from[p]+delta[p]*easing}
out.push([values[i][0],outObject])}
return out}},path:{computeDelta:function(from,end,damper,initial){var start;damper=(typeof damper==='number')?damper:1;from=+from||0;end=+end||0;start=(initial!=null)?initial:from;return{from:from,delta:(end-start)*damper}},forcePath:function(path){if(!Ext.isArray(path)&&!Ext.isArray(path[0])){path=Ext.fx.DrawPath.parsePathString(path)}
return path},get:function(start,end,damper,initialFrom){var endPath=this.forcePath(end),out=[],startLn=start.length,startPathLn,pointsLn,i,deltaPath,initial,j,k,path,startPath;for(i=0;i<startLn;i++){startPath=this.forcePath(start[i][1]);deltaPath=Ext.fx.DrawPath.interpolatePaths(startPath,endPath);startPath=deltaPath[0];endPath=deltaPath[1];startPathLn=startPath.length;path=[];for(j=0;j<startPathLn;j++){deltaPath=[startPath[j][0]];pointsLn=startPath[j].length;for(k=1;k<pointsLn;k++){initial=initialFrom&&initialFrom[0][1][j][k].from;deltaPath.push(this.computeDelta(startPath[j][k],endPath[j][k],damper,initial))}
path.push(deltaPath)}
out.push([start[i][0],path])}
return out},set:function(values,easing){var ln=values.length,out=[],i,j,k,newPath,calcPath,deltaPath,deltaPathLn,pointsLn;for(i=0;i<ln;i++){deltaPath=values[i][1];newPath=[];deltaPathLn=deltaPath.length;for(j=0;j<deltaPathLn;j++){calcPath=[deltaPath[j][0]];pointsLn=deltaPath[j].length;for(k=1;k<pointsLn;k++){calcPath.push(deltaPath[j][k].from+deltaPath[j][k].delta*easing)}
newPath.push(calcPath.join(','))}
out.push([values[i][0],newPath.join(',')])}
return out}}}},function(){var props=['outlineColor','backgroundColor','borderColor','borderTopColor','borderRightColor','borderBottomColor','borderLeftColor','fill','stroke'],length=props.length,i=0,prop;for(;i<length;i++){prop=props[i];this[prop]=this.color}
props=['cursor'];length=props.length;i=0;for(;i<length;i++){prop=props[i];this[prop]=this.stringHandler}})
;
Ext.define('Ext.fx.Anim',{mixins:{observable:'Ext.util.Observable'},requires:['Ext.fx.Manager','Ext.fx.Animator','Ext.fx.Easing','Ext.fx.CubicBezier','Ext.fx.PropertyHandler'],isAnimation:!0,duration:250,delay:0,delayStart:0,dynamic:!1,easing:'ease',damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^)]+)\)/,reverse:!1,running:!1,paused:!1,iterations:1,autoEnd:!1,alternate:!1,currentIteration:0,startTime:0,frameCount:0,constructor:function(config){var me=this,curve;config=config||{};if(config.keyframes){return new Ext.fx.Animator(config)}
Ext.apply(me,config);if(me.from===undefined){me.from={}}
me.propHandlers={};me.config=config;me.target=Ext.fx.Manager.createTarget(me.target);me.easingFn=Ext.fx.Easing[me.easing];me.target.dynamic=me.dynamic;if(!me.easingFn){me.easingFn=String(me.easing).match(me.bezierRE);if(me.easingFn&&me.easingFn.length===5){curve=me.easingFn;me.easingFn=Ext.fx.CubicBezier.cubicBezier(+curve[1],+curve[2],+curve[3],+curve[4])}}
me.id=Ext.id(null,'ext-anim-');me.mixins.observable.constructor.call(me);Ext.fx.Manager.addAnim(me);if(config.autoEnd){me.running=!0;me.jumpToEnd()}},setAttr:function(attr,value){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,attr,value)},initAttrs:function(){var me=this,from=me.from,to=me.to,initialFrom=me.initialFrom||{},out={},start,end,propHandler,attr;for(attr in to){if(to.hasOwnProperty(attr)){start=me.target.getAttr(attr,from[attr]);end=to[attr];if(!Ext.fx.PropertyHandler[attr]){if(Ext.isObject(end)){propHandler=me.propHandlers[attr]=Ext.fx.PropertyHandler.object}else{propHandler=me.propHandlers[attr]=Ext.fx.PropertyHandler.defaultHandler}}else{propHandler=me.propHandlers[attr]=Ext.fx.PropertyHandler[attr]}
out[attr]=propHandler.get(start,end,me.damper,initialFrom[attr],attr)}}
me.currentAttrs=out},start:function(startTime){var me=this,delay=me.delay,delayStart=me.delayStart,delayDelta;if(delay){if(!delayStart){me.delayStart=startTime;return}else{delayDelta=startTime-delayStart;if(delayDelta<delay){return}else{startTime=new Date(delayStart.getTime()+delay)}}}
if(me.fireEvent('beforeanimate',me)!==!1){me.startTime=startTime;if(!me.paused&&!me.currentAttrs){me.initAttrs()}
me.running=!0;me.frameCount=0}},jumpToEnd:function(suppressEvent){var me=this;if(!me.endWasCalled){if(!me.currentAttrs){me.initAttrs()}
Ext.fx.Manager.jumpToEnd(me);me.end(suppressEvent)}},runAnim:function(elapsedTime){var me=this,attrs=me.currentAttrs,duration=me.duration,easingFn=me.easingFn,propHandlers=me.propHandlers,ret={},easing,values,attr,lastFrame;if(elapsedTime>=duration){elapsedTime=duration;lastFrame=!0}
if(me.reverse){elapsedTime=duration-elapsedTime}
for(attr in attrs){if(attrs.hasOwnProperty(attr)){values=attrs[attr];easing=lastFrame?1:easingFn(elapsedTime/duration);ret[attr]=propHandlers[attr].set(values,easing)}}
me.frameCount++;return ret},lastFrame:function(){var me=this,iter=me.iterations,iterCount=me.currentIteration;iterCount++;if(iterCount<iter){if(me.alternate){me.reverse=!me.reverse}
me.startTime=new Date();me.currentIteration=iterCount;me.paused=!1}else{me.currentIteration=0;me.end();me.fireEvent('lastframe',me,me.startTime)}},endWasCalled:0,end:function(suppressEvent){var me=this;if(me.endWasCalled++){return}
me.startTime=0;me.paused=!1;me.running=!1;Ext.fx.Manager.removeAnim(me);if(!suppressEvent){me.fireEvent('afteranimate',me,me.startTime);Ext.callback(me.callback,me.scope,[me,me.startTime])}
if(me.remove){me.target.destroy()}},isReady:function(){return this.paused===!1&&this.running===!1&&this.iterations>0},isRunning:function(){return this.paused===!1&&this.running===!0&&this.isAnimator!==!0}});Ext.enableFx=!0
;
Ext.define('Ext.util.Animate',{mixinId:'animate',requires:['Ext.fx.Manager','Ext.fx.Anim'],isAnimate:!0,animate:function(animObj){var me=this;if(Ext.fx.Manager.hasFxBlock(me.id)){return me}
Ext.fx.Manager.queueFx(new Ext.fx.Anim(me.anim(animObj)));return this},anim:function(config){var me=this;if(!Ext.isObject(config)){return(config)?{}:!1}
if(config.stopAnimation){me.stopAnimation()}
Ext.applyIf(config,Ext.fx.Manager.getFxDefaults(me.id));return Ext.apply({target:me,paused:!0},config)},getAnimationProps:function(){var me=this,layout=me.layout;return layout&&layout.animate?layout.animate:{}},stopFx:Ext.Function.alias(Ext.util.Animate,'stopAnimation'),stopAnimation:function(suppressEvent){Ext.fx.Manager.stopAnimation(this.id,suppressEvent);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:!0});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:!1});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,'getActiveAnimation'),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}})
;
Ext.define('Ext.dom.Fly',{extend:'Ext.dom.Element',alternateClassName:'Ext.dom.Element.Fly',validNodeTypes:{1:1,9:1,11:1},isFly:!0,constructor:function(dom){this.dom=dom;this.el=this},attach:function(dom){var me=this,data;if(!dom){return me.detach()}
me.dom=Ext.getDom(dom);if(!Ext.cache[dom.id]){data=me.peekData();if(data){data.isSynchronized=!1}}
return me},detach:function(){return(this.dom=null)},addListener:function(){Ext.raise("Cannot use addListener() on Ext.dom.Fly instances. "+"Please use Ext.get() to retrieve an Ext.dom.Element instance instead.")}||null,removeListener:function(){Ext.raise("Cannot use removeListener() on Ext.dom.Fly instances. "+"Please use Ext.get() to retrieve an Ext.dom.Element instance instead.")}||null},function(Fly){var flyweights={},detachedBodyEl;Fly.cache=flyweights;Ext.fly=function(dom,named){var fly=null,fn=Ext.fly,nodeType,data;named=named||(fn.caller&&(fn.caller.$name||fn.caller.name))||'_global';dom=Ext.getDom(dom);if(dom){nodeType=dom.nodeType;if(Fly.prototype.validNodeTypes[nodeType]||(!nodeType&&(dom.window==dom))){fly=Ext.cache[dom.id];if(!fly||fly.dom!==dom){if(named==='constructor'){named='$constructor'}
fly=flyweights[named]||(flyweights[named]=new Fly());fly.dom=dom;data=fly.peekData();if(data){data.isSynchronized=!1}}}}
return fly};Ext.getDetachedBody=function(){if(!detachedBodyEl){Ext.detachedBodyEl=detachedBodyEl=new Fly(document.createElement('div'));detachedBodyEl.isDetachedBody=!0}
return detachedBodyEl}})
;
Ext.define('Ext.dom.CompositeElementLite',{alternateClassName:['Ext.CompositeElementLite'],requires:['Ext.dom.Fly'],isComposite:!0,isLite:!0,statics:{importElementMethods:function(){var Element=Ext.dom.Element,prototype=this.prototype;Ext.Object.each(Element.prototype,function(name,member){if(typeof member==='function'&&!prototype[name]){prototype[name]=function(){return this.invoke(name,arguments)}}})}},constructor:function(elements,skipValidation){if(skipValidation){this.elements=elements||[]}else{this.elements=[];this.add(elements)}},getElement:function(el){var fly=this._fly||(this._fly=new Ext.dom.Fly());return fly.attach(el)},transformElement:function(el){return Ext.getDom(el)},getCount:function(){return this.elements.length},add:function(els,root){var elements=this.elements,i,ln;if(!els){return this}
if(typeof els==="string"){els=Ext.fly(root||document).query(els)}else if(els.isComposite){els=els.elements}else if(!Ext.isIterable(els)){els=[els]}
for(i=0,ln=els.length;i<ln;++i){elements.push(this.transformElement(els[i]))}
return this},invoke:function(fn,args){var me=this,elements=me.elements,ln=elements.length,prototype,element,i;if(i!==0){prototype=(me.isLite?Ext.dom.Fly:Ext.dom.Element).prototype;for(i=0;i<ln;i++){element=elements[i];if(element){prototype[fn].apply(me.getElement(element),args)}}}
return me},item:function(index){var el=this.elements[index],out=null;if(el){out=this.getElement(el)}
return out},slice:function(start,end){return Ext.Array.slice(this.elements,start,end)},each:function(fn,scope){var me=this,els=me.elements,len=els.length,i,e;for(i=0;i<len;i++){e=els[i];if(e){e=this.getElement(e);if(fn.call(scope||e,e,me,i)===!1){break}}}
return me},fill:function(els){var me=this;me.elements=[];me.add(els);return me},insert:function(index,nodes){Ext.Array.insert(this.elements,index,nodes)},filter:function(selector){var me=this,els=me.elements,len=els.length,out=[],i=0,isFunc=typeof selector==='function',add,el;for(;i<len;i++){el=els[i];add=!1;if(el){el=me.getElement(el);if(isFunc){add=selector.call(el,el,me,i)!==!1}else{add=el.is(selector)}
if(add){out.push(me.transformElement(el))}}}
me.elements=out;return me},indexOf:function(el){return Ext.Array.indexOf(this.elements,this.transformElement(el))},replaceElement:function(el,replacement,domReplace){var index=!isNaN(el)?el:this.indexOf(el),d;if(index>-1){replacement=Ext.getDom(replacement);if(domReplace){d=this.elements[index];d.parentNode.insertBefore(replacement,d);Ext.removeNode(d)}
Ext.Array.splice(this.elements,index,1,replacement)}
return this},clear:function(removeDom){var me=this,els=me.elements,i=els.length-1;if(removeDom){for(;i>=0;i--){Ext.removeNode(els[i])}}
this.elements=[]},addElements:function(els,root){if(!els){return this}
if(typeof els==="string"){els=Ext.dom.Element.selectorFunction(els,root)}
var yels=this.elements,eLen=els.length,e;for(e=0;e<eLen;e++){yels.push(Ext.get(els[e]))}
return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(el){return this.indexOf(el)!==-1},removeElement:function(keys,removeDom){var me=this,elements=me.elements,val,el,k,kLen;keys=[].concat(keys);for(k=0,kLen=keys.length;k<kLen;k++){val=keys[k];if((el=(elements[val]||elements[val=me.indexOf(val)]))){if(removeDom){if(el.dom){el.destroy()}else{Ext.removeNode(el)}}
Ext.Array.erase(elements,val,1)}}
return me},destroy:function(){this.invoke('destroy',arguments);this.callParent()}},function(CompositeElementLite){var prototype=CompositeElementLite.prototype;CompositeElementLite.importElementMethods();prototype.on=prototype.addListener})
;
Ext.define('Ext.overrides.dom.Element',(function(){var Element,WIN=window,DOC=document,HIDDEN='hidden',ISCLIPPED='isClipped',OVERFLOW='overflow',OVERFLOWX='overflow-x',OVERFLOWY='overflow-y',ORIGINALCLIP='originalClip',HEIGHT='height',WIDTH='width',VISIBILITY='visibility',DISPLAY='display',NONE='none',OFFSETS='offsets',CLIP='clip',ORIGINALDISPLAY='originalDisplay',VISMODE='visibilityMode',ISVISIBLE='isVisible',OFFSETCLASS=Ext.baseCSSPrefix+'hidden-offsets',CLIPCLASS=Ext.baseCSSPrefix+'hidden-clip',boxMarkup=['<div class="{0}-tl" role="presentation">','<div class="{0}-tr" role="presentation">','<div class="{0}-tc" role="presentation"></div>','</div>','</div>','<div class="{0}-ml" role="presentation">','<div class="{0}-mr" role="presentation">','<div class="{0}-mc" role="presentation"></div>','</div>','</div>','<div class="{0}-bl" role="presentation">','<div class="{0}-br" role="presentation">','<div class="{0}-bc" role="presentation"></div>','</div>','</div>'].join(''),scriptTagRe=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,replaceScriptTagRe=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=(['"])(.*?)\1/i,nonSpaceRe=/\S/,typeRe=/\stype=(['"])(.*?)\1/i,adjustDirect2DTableRe=/table-row|table-.*-group/,msRe=/^-ms-/,camelRe=/(-[a-z])/gi,camelReplaceFn=function(m,a){return a.charAt(1).toUpperCase()},XMASKED=Ext.baseCSSPrefix+"masked",XMASKEDRELATIVE=Ext.baseCSSPrefix+"masked-relative",EXTELMASKMSG=Ext.baseCSSPrefix+"mask-msg",bodyRe=/^body/i,propertyCache={},getVisMode=function(el){var data=el.getData(),visMode=data[VISMODE];if(visMode===undefined){data[VISMODE]=visMode=Element.VISIBILITY}
return visMode},emptyRange=DOC.createRange?DOC.createRange():null,syncContentFly;if(Ext.isIE8){var garbageBin=DOC.createElement('div'),destroyQueue=[],clearGarbage,clearGarbageFn=function(){var len=destroyQueue.length,i;for(i=0;i<len;i++){garbageBin.appendChild(destroyQueue[i])}
garbageBin.innerHTML='';destroyQueue.length=0};clearGarbageFn.$skipTimerCheck=!0;clearGarbage=Ext.Function.createBuffered(clearGarbageFn,10)}
return{override:'Ext.dom.Element',mixins:['Ext.util.Animate'],uses:['Ext.dom.GarbageCollector','Ext.dom.Fly','Ext.event.publisher.MouseEnterLeave','Ext.fx.Manager','Ext.fx.Anim'],skipGarbageCollection:!1,_init:function(E){Element=E;if(WIN.__UNIT_TESTING__){E.destroyQueue=destroyQueue}},statics:{normalize:function(prop){if(prop==='float'){prop=Ext.supports.Float?'cssFloat':'styleFloat'}
return propertyCache[prop]||(propertyCache[prop]=prop.replace(msRe,'ms-').replace(camelRe,camelReplaceFn))}},addKeyListener:function(key,fn,scope){var config;if(typeof key!=='object'||Ext.isArray(key)){config={target:this,key:key,fn:fn,scope:scope}}else{config={target:this,key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}}
return new Ext.util.KeyMap(config)},addKeyMap:function(config){return new Ext.util.KeyMap(Ext.apply({target:this},config))},adjustDirect2DDimension:function(dimension){var me=this,dom=me.dom,display=me.getStyle('display'),inlineDisplay=dom.style.display,inlinePosition=dom.style.position,originIndex=dimension===WIDTH?0:1,currentStyle=dom.currentStyle,floating;if(display==='inline'){dom.style.display='inline-block'}
dom.style.position=display.match(adjustDirect2DTableRe)?'absolute':'static';floating=(parseFloat(currentStyle[dimension])||parseFloat(currentStyle.msTransformOrigin.split(' ')[originIndex])*2)%1;dom.style.position=inlinePosition;if(display==='inline'){dom.style.display=inlineDisplay}
return floating},afterAnimate:function(){var shadow=this.shadow;if(shadow&&!shadow.disabled&&!shadow.animate){shadow.show()}},anchorAnimX:function(anchor){var xName=(anchor==='l')?'right':'left';this.dom.style[xName]='0px'},anim:function(config){if(!Ext.isObject(config)){return(config)?{}:!1}
var me=this,duration=config.duration||Ext.fx.Anim.prototype.duration,easing=config.easing||'ease',animConfig;if(config.stopAnimation){me.stopAnimation()}
Ext.applyIf(config,Ext.fx.Manager.getFxDefaults(me.id));Ext.fx.Manager.setFxDefaults(me.id,{delay:0});animConfig={target:me.dom,remove:config.remove,alternate:config.alternate||!1,duration:duration,easing:easing,callback:config.callback,listeners:config.listeners,iterations:config.iterations||1,scope:config.scope,block:config.block,concurrent:config.concurrent,delay:config.delay||0,paused:!0,keyframes:config.keyframes,from:config.from||{},to:Ext.apply({},config),userConfig:config};Ext.apply(animConfig.to,config.to);delete animConfig.to.to;delete animConfig.to.from;delete animConfig.to.remove;delete animConfig.to.alternate;delete animConfig.to.keyframes;delete animConfig.to.iterations;delete animConfig.to.listeners;delete animConfig.to.target;delete animConfig.to.paused;delete animConfig.to.callback;delete animConfig.to.scope;delete animConfig.to.duration;delete animConfig.to.easing;delete animConfig.to.concurrent;delete animConfig.to.block;delete animConfig.to.stopAnimation;delete animConfig.to.delay;return animConfig},animate:function(config){this.addAnimation(config);return this},addAnimation:function(config){var me=this,animId=me.dom.id||Ext.id(me.dom),listeners,anim,end;if(!Ext.fx.Manager.hasFxBlock(animId)){if(config.listeners){listeners=config.listeners;delete config.listeners}
if(config.internalListeners){config.listeners=config.internalListeners;delete config.internalListeners}
end=config.autoEnd;delete config.autoEnd;anim=new Ext.fx.Anim(me.anim(config));anim.on({afteranimate:'afterAnimate',beforeanimate:'beforeAnimate',scope:me,single:!0});if(listeners){anim.on(listeners)}
Ext.fx.Manager.queueFx(anim);if(end){anim.jumpToEnd()}}
return anim},beforeAnimate:function(){var shadow=this.shadow;if(shadow&&!shadow.disabled&&!shadow.animate){shadow.hide()}},boxWrap:function(cls){var el;cls=cls||Ext.baseCSSPrefix+'box';el=Ext.get(this.insertHtml("beforeBegin","<div class='"+cls+"' role='presentation'>"+Ext.String.format(boxMarkup,cls)+"</div>"));el.selectNode('.'+cls+'-mc').appendChild(this.dom);return el},clean:function(forceReclean){var me=this,dom=me.dom,data=me.getData(),n=dom.firstChild,ni=-1,nx;if(data.isCleaned&&forceReclean!==!0){return me}
while(n){nx=n.nextSibling;if(n.nodeType===3){if(!(nonSpaceRe.test(n.nodeValue))){dom.removeChild(n)}else if(nx&&nx.nodeType===3){n.appendData(Ext.String.trim(nx.data));dom.removeChild(nx);nx=n.nextSibling;n.nodeIndex=++ni}}else{Ext.fly(n,'_clean').clean();n.nodeIndex=++ni}
n=nx}
data.isCleaned=!0;return me},empty:emptyRange?function(){var dom=this.dom;if(dom.firstChild){emptyRange.setStartBefore(dom.firstChild);emptyRange.setEndAfter(dom.lastChild);emptyRange.deleteContents()}}:function(){var dom=this.dom;while(dom.lastChild){dom.removeChild(dom.lastChild)}},clearListeners:function(){this.removeAnchor();this.callParent()},clearPositioning:function(value){value=value||'';return this.setStyle({left:value,right:value,top:value,bottom:value,'z-index':'',position:'static'})},createProxy:function(config,renderTo,matchBox){config=(typeof config==='object')?config:{tag:"div",role:'presentation',cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,!0):Ext.DomHelper.insertBefore(me.dom,config,!0);proxy.setVisibilityMode(Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}
return proxy},clearOpacity:function(){return this.setOpacity('')},clip:function(){var me=this,data=me.getData(),style;if(!data[ISCLIPPED]){data[ISCLIPPED]=!0;style=me.getStyle([OVERFLOW,OVERFLOWX,OVERFLOWY]);data[ORIGINALCLIP]={o:style[OVERFLOW],x:style[OVERFLOWX],y:style[OVERFLOWY]};me.setStyle(OVERFLOW,HIDDEN);me.setStyle(OVERFLOWX,HIDDEN);me.setStyle(OVERFLOWY,HIDDEN)}
return me},destroy:function(){var me=this,dom=me.dom,data=me.peekData(),maskEl,maskMsg;if(dom){if(me.isAnimate){me.stopAnimation(!0)}
me.removeAnchor()}
if(me.deferredFocusTimer){Ext.undefer(me.deferredFocusTimer);me.deferredFocusTimer=null}
me.callParent();if(dom&&Ext.isIE8&&(dom.window!=dom)&&(dom.nodeType!==9)&&(dom.tagName!=='BODY')&&(dom.tagName!=='HTML')){destroyQueue[destroyQueue.length]=dom;clearGarbage()}
if(data){maskEl=data.maskEl;maskMsg=data.maskMsg;if(maskEl){maskEl.destroy()}
if(maskMsg){maskMsg.destroy()}}},enableDisplayMode:function(display){var me=this;me.setVisibilityMode(Element.DISPLAY);if(display!==undefined){me.getData()[ORIGINALDISPLAY]=display}
return me},fadeIn:function(options){var me=this,dom=me.dom,animFly=new Ext.dom.Fly();me.animate(Ext.apply({},options,{opacity:1,internalListeners:{beforeanimate:function(anim){animFly.attach(dom);if(animFly.isStyle('display','none')){animFly.setDisplayed('')}else{animFly.show()}}}}));return this},fadeOut:function(options){var me=this,dom=me.dom,animFly=new Ext.dom.Fly();options=Ext.apply({opacity:0,internalListeners:{afteranimate:function(anim){if(anim.to.opacity===0){animFly.attach(dom);animFly.attach(dom);if(options.useDisplay){animFly.setDisplayed(!1)}else{animFly.hide()}}}}},options);me.animate(options);return me},fixDisplay:function(){var me=this;if(me.isStyle(DISPLAY,NONE)){me.setStyle(VISIBILITY,HIDDEN);me.setStyle(DISPLAY,me._getDisplay());if(me.isStyle(DISPLAY,NONE)){me.setStyle(DISPLAY,"block")}}},frame:function(color,count,obj){var me=this,dom=me.dom,animFly=new Ext.dom.Fly(),beforeAnim;color=color||'#C3DAF9';count=count||1;obj=obj||{};beforeAnim=function(){var animScope=this,box,proxy,proxyAnim;animFly.attach(dom);animFly.show();box=animFly.getBox();proxy=Ext.getBody().createChild({role:'presentation',id:animFly.dom.id+'-anim-proxy',style:{position:'absolute','pointer-events':'none','z-index':35000,border:'0px solid '+color}});proxyAnim=new Ext.fx.Anim({target:proxy,duration:obj.duration||1000,iterations:count,from:{top:box.y,left:box.x,borderWidth:0,opacity:1,height:box.height,width:box.width},to:{top:box.y-20,left:box.x-20,borderWidth:10,opacity:0,height:box.height+40,width:box.width+40}});proxyAnim.on('afteranimate',function(){proxy.destroy();animScope.end()})};me.animate({duration:(Math.max(obj.duration,500)*2)||2000,listeners:{beforeanimate:{fn:beforeAnim}},callback:obj.callback,scope:obj.scope});return me},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr),color=prefix||prefix===''?prefix:'#',h,len,i;if(!v||(/transparent|inherit/.test(v))){return defaultValue}
if(/^r/.test(v)){v=v.slice(4,v.length-1).split(',');len=v.length;for(i=0;i<len;i++){h=parseInt(v[i],10);color+=(h<16?'0':'')+h.toString(16)}}else{v=v.replace('#','');color+=v.length===3?v.replace(/^(\w)(\w)(\w)$/,'$1$1$2$2$3$3'):v}
return(color.length>5?color.toLowerCase():defaultValue)},getLoader:function(){var me=this,data=me.getData(),loader=data.loader;if(!loader){data.loader=loader=new Ext.ElementLoader({target:me})}
return loader},getPositioning:function(autoPx){var styles=this.getStyle(['left','top','position','z-index']),dom=this.dom;if(autoPx){if(styles.left==='auto'){styles.left=dom.offsetLeft+'px'}
if(styles.top==='auto'){styles.top=dom.offsetTop+'px'}}
return styles},ghost:function(anchor,options){var me=this,dom=me.dom,animFly=new Ext.dom.Fly(),beforeAnim;anchor=anchor||"b";beforeAnim=function(){animFly.attach(dom);var width=animFly.getWidth(),height=animFly.getHeight(),xy=animFly.getXY(),position=animFly.getPositioning(),to={opacity:0};switch(anchor){case 't':to.y=xy[1]-height;break;case 'l':to.x=xy[0]-width;break;case 'r':to.x=xy[0]+width;break;case 'b':to.y=xy[1]+height;break;case 'tl':to.x=xy[0]-width;to.y=xy[1]-height;break;case 'bl':to.x=xy[0]-width;to.y=xy[1]+height;break;case 'br':to.x=xy[0]+width;to.y=xy[1]+height;break;case 'tr':to.x=xy[0]+width;to.y=xy[1]-height;break}
this.to=to;this.on('afteranimate',function(){animFly.attach(dom);if(animFly){animFly.hide();animFly.clearOpacity();animFly.setPositioning(position)}})};me.animate(Ext.applyIf(options||{},{duration:500,easing:'ease-out',listeners:{beforeanimate:beforeAnim}}));return me},getTextSelection:function(){var ret,dom,doc,range,textRange;ret=this.callParent();if(typeof ret[0]!=='number'){dom=this.dom;doc=dom.ownerDocument;range=doc.selection.createRange();textRange=dom.createTextRange();textRange.setEndPoint('EndToStart',range);ret[0]=textRange.text.length;ret[1]=ret[0]+range.text.length}
return ret},hide:function(animate){if(typeof animate==='string'){this.setVisible(!1,animate);return this}
this.setVisible(!1,this.anim(animate));return this},highlight:function(color,options){var me=this,dom=me.dom,from={},animFly=new Ext.dom.Fly(),restore,to,attr,lns,event,fn;options=options||{};lns=options.listeners||{};attr=options.attr||'backgroundColor';from[attr]=color||'ffff9c';if(!options.to){to={};to[attr]=options.endColor||me.getColor(attr,'ffffff','')}else{to=options.to}
options.listeners=Ext.apply(Ext.apply({},lns),{beforeanimate:function(){animFly.attach(dom);restore=dom.style[attr];animFly.clearOpacity();animFly.show();event=lns.beforeanimate;if(event){fn=event.fn||event;return fn.apply(event.scope||lns.scope||WIN,arguments)}},afteranimate:function(){if(dom){dom.style[attr]=restore}
event=lns.afteranimate;if(event){fn=event.fn||event;fn.apply(event.scope||lns.scope||WIN,arguments)}}});me.animate(Ext.apply({},options,{duration:1000,easing:'ease-in',from:from,to:to}));return me},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)},isMasked:function(deep){var me=this,data=me.getData(),maskEl=data.maskEl,maskMsg=data.maskMsg,hasMask=!1,parent;if(maskEl&&maskEl.isVisible()){if(maskMsg){maskMsg.center(me)}
hasMask=!0}else if(deep){parent=me.findParentNode();if(parent){return Ext.fly(parent).isMasked(deep)}}
return hasMask},load:function(options){this.getLoader().load(options);return this},mask:function(msg,msgCls,elHeight){var me=this,dom=me.dom,data=me.getData(),maskEl=data.maskEl,maskMsg;if(!(bodyRe.test(dom.tagName)&&me.getStyle('position')==='static')){me.addCls(XMASKEDRELATIVE)}
if(maskEl){maskEl.destroy()}
maskEl=Ext.DomHelper.append(dom,{role:'presentation',cls:Ext.baseCSSPrefix+"mask "+Ext.baseCSSPrefix+"border-box",children:{role:'presentation',cls:msgCls?EXTELMASKMSG+" "+msgCls:EXTELMASKMSG,cn:{tag:'div',role:'presentation',cls:Ext.baseCSSPrefix+'mask-msg-inner',cn:{tag:'div',role:'presentation',cls:Ext.baseCSSPrefix+'mask-msg-text',html:msg||''}}}},!0);maskMsg=Ext.fly(maskEl.dom.firstChild);data.maskEl=maskEl;me.addCls(XMASKED);maskEl.setDisplayed(!0);if(typeof msg==='string'){maskMsg.setDisplayed(!0);maskMsg.center(me)}else{maskMsg.setDisplayed(!1)}
if(dom===DOC.body){maskEl.addCls(Ext.baseCSSPrefix+'mask-fixed')}
me.saveTabbableState({skipSelf:dom===DOC.body});if(Ext.isIE9m&&dom!==DOC.body&&me.isStyle('height','auto')){maskEl.setSize(undefined,elHeight||me.getHeight())}
return maskEl},puff:function(obj){var me=this,dom=me.dom,animFly=new Ext.dom.Fly(),beforeAnim,box=me.getBox(),originalStyles;originalStyles=me.getStyle(['width','height','left','right','top','bottom','position','z-index','font-size','opacity'],!0);obj=Ext.applyIf(obj||{},{easing:'ease-out',duration:500,useDisplay:!1});beforeAnim=function(){animFly.attach(dom);animFly.clearOpacity();animFly.show();this.to={width:box.width*2,height:box.height*2,x:box.x-(box.width/2),y:box.y-(box.height/2),opacity:0,fontSize:'200%'};this.on('afteranimate',function(){animFly.attach(dom);if(obj.useDisplay){animFly.setDisplayed(!1)}else{animFly.hide()}
animFly.setStyle(originalStyles);Ext.callback(obj.callback,obj.scope)})};me.animate({duration:obj.duration,easing:obj.easing,listeners:{beforeanimate:{fn:beforeAnim}}});return me},setCapture:function(){var dom=this.dom;if(Ext.isIE9m&&dom.setCapture){dom.setCapture()}},setHeight:function(height,animate){var me=this;if(!animate||!me.anim){me.callParent(arguments)}else{if(!Ext.isObject(animate)){animate={}}
me.animate(Ext.applyIf({to:{height:height}},animate))}
return me},setHorizontal:function(){var me=this,cls=me.verticalCls;delete me.vertical;if(cls){delete me.verticalCls;me.removeCls(cls)}
delete me.setWidth;delete me.setHeight;if(!Ext.isIE8){delete me.getWidth;delete me.getHeight}
delete me.styleHooks},updateText:function(text){var me=this,dom,textNode;if(dom){textNode=dom.firstChild;if(!textNode||(textNode.nodeType!==3||textNode.nextSibling)){textNode=DOC.createTextNode();me.empty();dom.appendChild(textNode)}
if(text){textNode.data=text}}},setHtml:function(html,loadScripts,callback,scope){var me=this,id,dom,interval;if(!me.dom){return me}
html=html||'';dom=me.dom;if(loadScripts!==!0){if(Ext.isIE){while(dom.firstChild){dom.removeChild(dom.firstChild)}}
dom.innerHTML=html;Ext.callback(callback,me);return me}
id=Ext.id();html+='<span id="'+id+'" role="presentation"></span>';interval=Ext.interval(function(){var hd,match,attrs,srcMatch,typeMatch,el,s;if(!(el=DOC.getElementById(id))){return!1}
Ext.uninterval(interval);Ext.removeNode(el);hd=Ext.getHead().dom;while((match=scriptTagRe.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):!1;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}
hd.appendChild(s)}else if(match[2]&&match[2].length>0){if(scope){Ext.functionFactory(match[2]).call(scope)}else{Ext.globalEval(match[2])}}}
Ext.callback(callback,scope||me)},20);dom.innerHTML=html.replace(replaceScriptTagRe,'');return me},setOpacity:function(opacity,animate){var me=this;if(!me.dom){return me}
if(!animate||!me.anim){me.setStyle('opacity',opacity)}else{if(typeof animate!=='object'){animate={duration:350,easing:'ease-in'}}
me.animate(Ext.applyIf({to:{opacity:opacity}},animate))}
return me},setPositioning:function(pc){return this.setStyle(pc)},setVertical:function(angle,cls){var me=this,proto=Element.prototype;me.vertical=!0;if(cls){me.addCls(me.verticalCls=cls)}
me.setWidth=proto.setHeight;me.setHeight=proto.setWidth;if(!Ext.isIE8){me.getWidth=proto.getHeight;me.getHeight=proto.getWidth}
me.styleHooks=(angle===270)?proto.verticalStyleHooks270:proto.verticalStyleHooks90},setSize:function(width,height,animate){var me=this;if(Ext.isObject(width)){animate=height;height=width.height;width=width.width}
if(!animate||!me.anim){me.dom.style.width=Element.addUnits(width);me.dom.style.height=Element.addUnits(height);if(me.shadow||me.shim){me.syncUnderlays()}}else{if(animate===!0){animate={}}
me.animate(Ext.applyIf({to:{width:width,height:height}},animate))}
return me},setVisible:function(visible,animate){var me=this,dom=me.dom,animFly,visMode=getVisMode(me);if(typeof animate==='string'){switch(animate){case DISPLAY:visMode=Element.DISPLAY;break;case VISIBILITY:visMode=Element.VISIBILITY;break;case OFFSETS:visMode=Element.OFFSETS;break;case CLIP:visMode=Element.CLIP;break}
me.setVisibilityMode(visMode);animate=!1}
if(!animate||!me.anim){if(visMode===Element.DISPLAY){return me.setDisplayed(visible)}else if(visMode===Element.OFFSETS){me[visible?'removeCls':'addCls'](OFFSETCLASS)}else if(visMode===Element.CLIP){me[visible?'removeCls':'addCls'](CLIPCLASS)}else if(visMode===Element.VISIBILITY){me.fixDisplay();dom.style.visibility=visible?'':HIDDEN}}else{if(visible){me.setOpacity(0.01);me.setVisible(!0)}
if(!Ext.isObject(animate)){animate={duration:350,easing:'ease-in'}}
animFly=new Ext.dom.Fly();me.animate(Ext.applyIf({callback:function(){if(!visible){animFly.attach(dom).setVisible(!1).setOpacity(1)}},to:{opacity:(visible)?1:0}},animate))}
me.getData()[ISVISIBLE]=visible;if(me.shadow||me.shim){me.setUnderlaysVisible(visible)}
return me},setWidth:function(width,animate){var me=this;if(!animate||!me.anim){me.callParent(arguments)}else{if(!Ext.isObject(animate)){animate={}}
me.animate(Ext.applyIf({to:{width:width}},animate))}
return me},setX:function(x,animate){return this.setXY([x,this.getY()],animate)},setXY:function(xy,animate){var me=this;if(!animate||!me.anim){me.callParent([xy])}else{if(!Ext.isObject(animate)){animate={}}
me.animate(Ext.applyIf({to:{x:xy[0],y:xy[1]}},animate))}
return this},setY:function(y,animate){return this.setXY([this.getX(),y],animate)},show:function(animate){if(typeof animate==='string'){this.setVisible(!0,animate);return this}
this.setVisible(!0,this.anim(animate));return this},slideIn:function(anchor,options,slideOut){var me=this,dom=me.dom,elStyle=dom.style,animFly=new Ext.dom.Fly(),beforeAnim,wrapAnim,restoreScroll,wrapDomParentNode;anchor=anchor||"t";options=options||{};beforeAnim=function(){var animScope=this,listeners=options.listeners,box,originalStyles,anim,wrap;animFly.attach(dom);if(!slideOut){animFly.fixDisplay()}
box=animFly.getBox();if((anchor==='t'||anchor==='b')&&box.height===0){box.height=dom.scrollHeight}else if((anchor==='l'||anchor==='r')&&box.width===0){box.width=dom.scrollWidth}
originalStyles=animFly.getStyle(['width','height','left','right','top','bottom','position','z-index'],!0);animFly.setSize(box.width,box.height);if(options.preserveScroll){restoreScroll=animFly.cacheScrollValues()}
wrap=animFly.wrap({role:'presentation',id:Ext.id()+'-anim-wrap-for-'+dom.id,style:{visibility:slideOut?'visible':'hidden'}});wrapDomParentNode=wrap.dom.parentNode;wrap.setPositioning(animFly.getPositioning());if(wrap.isStyle('position','static')){wrap.position('relative')}
animFly.clearPositioning('auto');wrap.clip();if(restoreScroll){restoreScroll()}
animFly.setStyle({visibility:'',position:'absolute'});if(slideOut){wrap.setSize(box.width,box.height)}
switch(anchor){case 't':anim={from:{width:box.width+'px',height:'0px'},to:{width:box.width+'px',height:box.height+'px'}};elStyle.bottom='0px';break;case 'l':anim={from:{width:'0px',height:box.height+'px'},to:{width:box.width+'px',height:box.height+'px'}};me.anchorAnimX(anchor);break;case 'r':anim={from:{x:box.x+box.width,width:'0px',height:box.height+'px'},to:{x:box.x,width:box.width+'px',height:box.height+'px'}};me.anchorAnimX(anchor);break;case 'b':anim={from:{y:box.y+box.height,width:box.width+'px',height:'0px'},to:{y:box.y,width:box.width+'px',height:box.height+'px'}};break;case 'tl':anim={from:{x:box.x,y:box.y,width:'0px',height:'0px'},to:{width:box.width+'px',height:box.height+'px'}};elStyle.bottom='0px';me.anchorAnimX('l');break;case 'bl':anim={from:{y:box.y+box.height,width:'0px',height:'0px'},to:{y:box.y,width:box.width+'px',height:box.height+'px'}};me.anchorAnimX('l');break;case 'br':anim={from:{x:box.x+box.width,y:box.y+box.height,width:'0px',height:'0px'},to:{x:box.x,y:box.y,width:box.width+'px',height:box.height+'px'}};me.anchorAnimX('r');break;case 'tr':anim={from:{x:box.x+box.width,width:'0px',height:'0px'},to:{x:box.x,width:box.width+'px',height:box.height+'px'}};elStyle.bottom='0px';me.anchorAnimX('r');break}
wrap.show();wrapAnim=Ext.apply({},options);delete wrapAnim.listeners;wrapAnim=new Ext.fx.Anim(Ext.applyIf(wrapAnim,{target:wrap,duration:500,easing:'ease-out',from:slideOut?anim.to:anim.from,to:slideOut?anim.from:anim.to}));wrapAnim.on('afteranimate',function(){animFly.attach(dom);animFly.setStyle(originalStyles);if(slideOut){if(options.useDisplay){animFly.setDisplayed(!1)}else{animFly.hide()}}
if(wrap.dom){if(wrap.dom.parentNode){wrap.dom.parentNode.insertBefore(dom,wrap.dom)}else{wrapDomParentNode.appendChild(dom)}
wrap.destroy()}
if(restoreScroll){restoreScroll()}
animScope.end()});if(listeners){wrapAnim.on(listeners)}};me.animate({duration:options.duration?Math.max(options.duration,500)*2:1000,listeners:{beforeanimate:beforeAnim}});return me},slideOut:function(anchor,options){return this.slideIn(anchor,options,!0)},switchOff:function(options){var me=this,dom=me.dom,animFly=new Ext.dom.Fly(),beforeAnim;options=Ext.applyIf(options||{},{easing:'ease-in',duration:500,remove:!1,useDisplay:!1});beforeAnim=function(){animFly.attach(dom);var animScope=this,size=animFly.getSize(),xy=animFly.getXY(),keyframe,position;animFly.clearOpacity();animFly.clip();position=animFly.getPositioning();keyframe=new Ext.fx.Animator({target:dom,duration:options.duration,easing:options.easing,keyframes:{33:{opacity:0.3},66:{height:1,y:xy[1]+size.height/2},100:{width:1,x:xy[0]+size.width/2}}});keyframe.on('afteranimate',function(){animFly.attach(dom);if(options.useDisplay){animFly.setDisplayed(!1)}else{animFly.hide()}
animFly.clearOpacity();animFly.setPositioning(position);animFly.setSize(size);animScope.end()})};me.animate({duration:(Math.max(options.duration,500)*2),listeners:{beforeanimate:{fn:beforeAnim}},callback:options.callback,scope:options.scope});return me},syncContent:function(source){source=Ext.getDom(source);var sourceNodes=source.childNodes,sourceLen=sourceNodes.length,dest=this.dom,destNodes=dest.childNodes,destLen=destNodes.length,i,destNode,sourceNode,sourceStyle,nodeType,newAttrs,attLen,attName,value,elData=dest._extData;if(!syncContentFly){syncContentFly=new Ext.dom.Fly()}
newAttrs=source.attributes;attLen=newAttrs.length;for(i=0;i<attLen;i++){attName=newAttrs[i].name;value=newAttrs[i].value;if(attName!=='id'&&dest.getAttribute(attName)!==value){dest.setAttribute(attName,newAttrs[i].value)}}
if(elData){elData.isSynchronized=!1}
if(sourceLen!==destLen){dest.innerHTML=source.innerHTML;return}
for(i=0;i<sourceLen;i++){sourceNode=sourceNodes[i];destNode=destNodes[i];nodeType=sourceNode.nodeType;sourceStyle=sourceNode.style;if(nodeType!==destNode.nodeType||(nodeType===1&&sourceNode.tagName!==destNode.tagName)){dest.innerHTML=source.innerHTML;return}
if(!sourceStyle){destNode.data=sourceNode.data}else{if(sourceNode.id&&destNode.id!==sourceNode.id){destNode.id=sourceNode.id}
destNode.style.cssText=sourceStyle.cssText;destNode.className=sourceNode.className;syncContentFly.attach(destNode).syncContent(sourceNode)}}},toggle:function(animate){var me=this;me.setVisible(!me.isVisible(),me.anim(animate));return me},unmask:function(){var me=this,data=me.getData(),maskEl=data.maskEl,style;if(maskEl){style=maskEl.dom.style;if(style.clearExpression){style.clearExpression('width');style.clearExpression('height')}
if(maskEl){maskEl.destroy();delete data.maskEl}
me.removeCls([XMASKED,XMASKEDRELATIVE])}
me.restoreTabbableState(me.dom===DOC.body)},unclip:function(){var me=this,data=me.getData(),clip;if(data[ISCLIPPED]){data[ISCLIPPED]=!1;clip=data[ORIGINALCLIP];if(clip.o){me.setStyle(OVERFLOW,clip.o)}
if(clip.x){me.setStyle(OVERFLOWX,clip.x)}
if(clip.y){me.setStyle(OVERFLOWY,clip.y)}}
return me},translate:function(x,y,z){if(Ext.supports.CssTransforms&&!Ext.isIE9m){this.callParent(arguments)}else{if(x!=null){this.dom.style.left=x+'px'}
if(y!=null){this.dom.style.top=y+'px'}}},deprecated:{'4.0':{methods:{pause:function(ms){var me=this;Ext.fx.Manager.setFxDefaults(me.id,{delay:ms});return me},scale:function(width,height,options){this.animate(Ext.apply({},options,{width:width,height:height}));return this},shift:function(options){this.animate(options);return this}}},'4.2':{methods:{moveTo:function(x,y,animate){return this.setXY([x,y],animate)},setBounds:function(x,y,width,height,animate){return this.setBox({x:x,y:y,width:width,height:height},animate)},setLeftTop:function(left,top){var me=this,style=me.dom.style;style.left=Element.addUnits(left);style.top=Element.addUnits(top);if(me.shadow||me.shim){me.syncUnderlays()}
return me},setLocation:function(x,y,animate){return this.setXY([x,y],animate)}}},'5.0':{methods:{getAttributeNS:function(namespace,name){return this.getAttribute(name,namespace)},getCenterXY:function(){return this.getAlignToXY(DOC,'c-c')},getComputedHeight:function(){return Math.max(this.dom.offsetHeight,this.dom.clientHeight)||parseFloat(this.getStyle(HEIGHT))||0},getComputedWidth:function(){return Math.max(this.dom.offsetWidth,this.dom.clientWidth)||parseFloat(this.getStyle(WIDTH))||0},getStyleSize:function(){var me=this,d=this.dom,isDoc=(d===DOC||d===DOC.body),s,w,h;if(isDoc){return{width:Element.getViewportWidth(),height:Element.getViewportHeight()}}
s=me.getStyle(['height','width'],!0);if(s.width&&s.width!=='auto'){w=parseFloat(s.width)}
if(s.height&&s.height!=='auto'){h=parseFloat(s.height)}
return{width:w||me.getWidth(!0),height:h||me.getHeight(!0)}},isBorderBox:function(){return!0},isDisplayed:function(){return!this.isStyle('display','none')},focusable:'isFocusable'}}}}})(),function(){var Element=Ext.dom.Element,proto=Element.prototype,useDocForId=!Ext.isIE8,DOC=document,view=DOC.defaultView,opacityRe=/alpha\(opacity=(.*)\)/i,trimRe=/^\s+|\s+$/g,styleHooks=proto.styleHooks,supports=Ext.supports,verticalStyleHooks90,verticalStyleHooks270,edges,k,edge,borderWidth,getBorderWidth;proto._init(Element);delete proto._init;Ext.plainTableCls=Ext.baseCSSPrefix+'table-plain';Ext.plainListCls=Ext.baseCSSPrefix+'list-plain';if(Ext.CompositeElementLite){Ext.CompositeElementLite.importElementMethods()}
if(!supports.Opacity&&Ext.isIE){Ext.apply(styleHooks.opacity,{get:function(dom){var filter=dom.style.filter,match,opacity;if(filter.match){match=filter.match(opacityRe);if(match){opacity=parseFloat(match[1]);if(!isNaN(opacity)){return opacity?opacity/100:0}}}
return 1},set:function(dom,value){var style=dom.style,val=style.filter.replace(opacityRe,'').replace(trimRe,'');style.zoom=1;if(typeof(value)==='number'&&value>=0&&value<1){value*=100;style.filter=val+(val.length?' ':'')+'alpha(opacity='+value+')'}else{style.filter=val}}})}
if(!supports.matchesSelector){var simpleSelectorRe=/^([a-z]+|\*)?(?:\.([a-z][a-z\-_0-9]*))?$/i,dashRe=/-/g,fragment,classMatcher=function(tag,cls){var classRe=new RegExp('(?:^|\\s+)'+cls.replace(dashRe,'\\-')+'(?:\\s+|$)');if(tag&&tag!=='*'){tag=tag.toUpperCase();return function(el){return el.tagName===tag&&classRe.test(el.className)}}
return function(el){return classRe.test(el.className)}},tagMatcher=function(tag){tag=tag.toUpperCase();return function(el){return el.tagName===tag}},cache={};proto.matcherCache=cache;proto.is=function(selector){var dom=this.dom,cls,match,testFn,root,isOrphan,is,tag;if(!selector){return!0}
if(dom.nodeType!==1){return!1}
if(!(testFn=Ext.isFunction(selector)?selector:cache[selector])){if(!(match=selector.match(simpleSelectorRe))){root=dom.parentNode;if(!root){isOrphan=!0;root=fragment||(fragment=DOC.createDocumentFragment());fragment.appendChild(dom)}
is=Ext.Array.indexOf(Ext.fly(root,'_is').query(selector),dom)!==-1;if(isOrphan){fragment.removeChild(dom)}
return is}
tag=match[1];cls=match[2];cache[selector]=testFn=cls?classMatcher(tag,cls):tagMatcher(tag)}
return testFn(dom)}}
if(!view||!view.getComputedStyle){proto.getStyle=function(property,inline){var me=this,dom=me.dom,multiple=typeof property!=='string',prop=property,props=prop,len=1,isInline=inline,styleHooks=me.styleHooks,camel,domStyle,values,hook,out,style,i;if(multiple){values={};prop=props[0];i=0;if(!(len=props.length)){return values}}
if(!dom||dom.documentElement){return values||''}
domStyle=dom.style;if(inline){style=domStyle}else{style=dom.currentStyle;if(!style){isInline=!0;style=domStyle}}
do{hook=styleHooks[prop];if(!hook){styleHooks[prop]=hook={name:Element.normalize(prop)}}
if(hook.get){out=hook.get(dom,me,isInline,style)}else{camel=hook.name;out=style[camel]}
if(!multiple){return out}
values[prop]=out;prop=props[++i]}while(i<len);return values}}
if(Ext.isIE8){getBorderWidth=function(dom,el,inline,style){if(style[this.styleName]==='none'){return'0px'}
return style[this.name]};edges=['Top','Right','Bottom','Left'];k=edges.length;while(k--){edge=edges[k];borderWidth='border'+edge+'Width';styleHooks['border-'+edge.toLowerCase()+'-width']=styleHooks[borderWidth]={name:borderWidth,styleName:'border'+edge+'Style',get:getBorderWidth}}
var syncRepaintCls=Ext.baseCSSPrefix+'sync-repaint';proto.syncRepaint=function(){this.addCls(syncRepaintCls);this.getWidth();this.removeCls(syncRepaintCls)}}
if(Ext.isIE10m){Ext.override(Element,{focus:function(defer,dom){var me=this,ex;dom=dom||me.dom;if(me.deferredFocusTimer){Ext.undefer(me.deferredFocusTimer)}
me.deferredFocusTimer=null;if(Number(defer)){me.deferredFocusTimer=Ext.defer(me.focus,defer,me,[null,dom])}else{Ext.GlobalEvents.fireEvent('beforefocus',dom);if(dom&&(dom.tagName==='INPUT'||dom.tagname==='TEXTAREA')){Ext.synchronouslyFocusing=document.activeElement}
try{dom.focus()}catch(xcpt){ex=xcpt}
if(Ext.synchronouslyFocusing&&document.activeElement!==dom&&!ex){dom.focus()}
Ext.synchronouslyFocusing=null}
return me}})}
Ext.apply(Ext,{enableGarbageCollector:!0,isBorderBox:!0,useShims:!1,getElementById:function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=Ext.detachedBodyEl)){el=detachedBodyEl.dom.querySelector(Ext.makeIdSelector(id))}
return el},addBehaviors:function(obj){var cache={},parts,b,s;if(!Ext.isReady){Ext.onInternalReady(function(){Ext.addBehaviors(obj)})}else{for(b in obj){if((parts=b.split('@'))[1]){s=parts[0];if(!cache[s]){cache[s]=Ext.fly(document).select(s,!0)}
cache[s].on(parts[1],obj[b])}}
cache=null}}});if(Ext.isIE9m){Ext.getElementById=function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=Ext.detachedBodyEl)){el=detachedBodyEl.dom.all[id]}
return el};proto.getById=function(id,asDom){var dom=this.dom,ret=null,entry,el;if(dom){el=(useDocForId&&DOC.getElementById(id))||dom.all[id];if(el){if(asDom){ret=el}else{entry=Ext.cache[id];if(entry){if(entry.skipGarbageCollection||!Ext.isGarbage(entry.dom)){ret=entry}else{Ext.raise("Stale Element with id '"+el.id+"' found in Element cache. "+"Make sure to clean up Element instances using destroy()");entry.destroy()}}
ret=ret||new Ext.Element(el)}}}
return ret}}else if(!DOC.querySelector){Ext.getDetachedBody=Ext.getBody;Ext.getElementById=function(id){return DOC.getElementById(id)};proto.getById=function(id,asDom){var dom=DOC.getElementById(id);return asDom?dom:(dom?Ext.get(dom):null)}}
if(Ext.isIE&&!(Ext.isIE9p&&DOC.documentMode>=9)){proto.getAttribute=function(name,ns){var d=this.dom,type;if(ns){type=typeof d[ns+":"+name];if(type!=='undefined'&&type!=='unknown'){return d[ns+":"+name]||null}
return null}
if(name==="for"){name="htmlFor"}
return d[name]||null}}
Ext.onInternalReady(function(){var transparentRe=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,origSetWidth=proto.setWidth,origSetHeight=proto.setHeight,origSetSize=proto.setSize,origUnselectable=proto.unselectable,pxRe=/^\d+(?:\.\d*)?px$/i,colorStyles,i,name,camel;if(supports.FixedTableWidthBug){styleHooks.width={name:'width',set:function(dom,value,el){var style=dom.style,needsFix=el._needsTableWidthFix,origDisplay=style.display;if(needsFix){style.display='none'}
style.width=value;if(needsFix){dom.scrollWidth;style.display=origDisplay}}};proto.setWidth=function(width,animate){var me=this,dom=me.dom,style=dom.style,needsFix=me._needsTableWidthFix,origDisplay=style.display;if(needsFix&&!animate){style.display='none'}
origSetWidth.call(me,width,animate);if(needsFix&&!animate){dom.scrollWidth;style.display=origDisplay}
return me};proto.setSize=function(width,height,animate){var me=this,dom=me.dom,style=dom.style,needsFix=me._needsTableWidthFix,origDisplay=style.display;if(needsFix&&!animate){style.display='none'}
origSetSize.call(me,width,height,animate);if(needsFix&&!animate){dom.scrollWidth;style.display=origDisplay}
return me}}
if(Ext.isIE8){styleHooks.height={name:'height',set:function(dom,value,el){var component=el.component,frameInfo,frameBodyStyle;if(component&&component._syncFrameHeight&&el===component.el){frameBodyStyle=component.frameBody.dom.style;if(pxRe.test(value)){frameInfo=component.getFrameInfo();if(frameInfo){frameBodyStyle.height=(parseInt(value,10)-frameInfo.height)+'px'}}else if(!value||value==='auto'){frameBodyStyle.height=''}}
dom.style.height=value}};proto.setHeight=function(height,animate){var component=this.component,frameInfo,frameBodyStyle;if(component&&component._syncFrameHeight&&this===component.el){frameBodyStyle=component.frameBody.dom.style;if(!height||height==='auto'){frameBodyStyle.height=''}else{frameInfo=component.getFrameInfo();if(frameInfo){frameBodyStyle.height=(height-frameInfo.height)+'px'}}}
return origSetHeight.call(this,height,animate)};proto.setSize=function(width,height,animate){var component=this.component,frameInfo,frameBodyStyle;if(component&&component._syncFrameHeight&&this===component.el){frameBodyStyle=component.frameBody.dom.style;if(!height||height==='auto'){frameBodyStyle.height=''}else{frameInfo=component.getFrameInfo();if(frameInfo){frameBodyStyle.height=(height-frameInfo.height)+'px'}}}
return origSetSize.call(this,width,height,animate)};proto.setText=function(text){var dom=this.dom;if(!(dom.childNodes.length===1&&dom.firstChild.nodeType===3)){while(dom.lastChild&&dom.lastChild.nodeType!==3){dom.removeChild(dom.lastChild)}
dom.appendChild(document.createTextNode())}
dom.firstChild.data=text};proto.unselectable=function(){origUnselectable.call(this);this.dom.onselectstart=function(){return!1}}}
function fixTransparent(dom,el,inline,style){var value=style[this.name]||'';return transparentRe.test(value)?'transparent':value}
function makeSelectionRestoreFn(activeEl,start,end){return function(){activeEl.selectionStart=start;activeEl.selectionEnd=end}}
function getRightMarginFixCleaner(target){var hasInputBug=supports.DisplayChangeInputSelectionBug,hasTextAreaBug=supports.DisplayChangeTextAreaSelectionBug,activeEl,tag,start,end;if(hasInputBug||hasTextAreaBug){activeEl=Element.getActiveElement();tag=activeEl&&activeEl.tagName;if((hasTextAreaBug&&tag==='TEXTAREA')||(hasInputBug&&tag==='INPUT'&&activeEl.type==='text')){if(Ext.fly(target).isAncestor(activeEl)){start=activeEl.selectionStart;end=activeEl.selectionEnd;if(Ext.isNumber(start)&&Ext.isNumber(end)){return makeSelectionRestoreFn(activeEl,start,end)}}}}
return Ext.emptyFn}
function fixRightMargin(dom,el,inline,style){var result=style.marginRight,domStyle,display;if(result!=='0px'){domStyle=dom.style;display=domStyle.display;domStyle.display='inline-block';result=(inline?style:dom.ownerDocument.defaultView.getComputedStyle(dom,null)).marginRight;domStyle.display=display}
return result}
function fixRightMarginAndInputFocus(dom,el,inline,style){var result=style.marginRight,domStyle,cleaner,display;if(result!=='0px'){domStyle=dom.style;cleaner=getRightMarginFixCleaner(dom);display=domStyle.display;domStyle.display='inline-block';result=(inline?style:dom.ownerDocument.defaultView.getComputedStyle(dom,'')).marginRight;domStyle.display=display;cleaner()}
return result}
if(!supports.RightMargin){styleHooks.marginRight=styleHooks['margin-right']={name:'marginRight',get:(supports.DisplayChangeInputSelectionBug||supports.DisplayChangeTextAreaSelectionBug)?fixRightMarginAndInputFocus:fixRightMargin}}
if(!supports.TransparentColor){colorStyles=['background-color','border-color','color','outline-color'];for(i=colorStyles.length;i--;){name=colorStyles[i];camel=Element.normalize(name);styleHooks[name]=styleHooks[camel]={name:camel,get:fixTransparent}}}
proto.verticalStyleHooks90=verticalStyleHooks90=Ext.Object.chain(styleHooks);proto.verticalStyleHooks270=verticalStyleHooks270=Ext.Object.chain(styleHooks);verticalStyleHooks90.width=styleHooks.height||{name:'height'};verticalStyleHooks90.height=styleHooks.width||{name:'width'};verticalStyleHooks90['margin-top']={name:'marginLeft'};verticalStyleHooks90['margin-right']={name:'marginTop'};verticalStyleHooks90['margin-bottom']={name:'marginRight'};verticalStyleHooks90['margin-left']={name:'marginBottom'};verticalStyleHooks90['padding-top']={name:'paddingLeft'};verticalStyleHooks90['padding-right']={name:'paddingTop'};verticalStyleHooks90['padding-bottom']={name:'paddingRight'};verticalStyleHooks90['padding-left']={name:'paddingBottom'};verticalStyleHooks90['border-top']={name:'borderLeft'};verticalStyleHooks90['border-right']={name:'borderTop'};verticalStyleHooks90['border-bottom']={name:'borderRight'};verticalStyleHooks90['border-left']={name:'borderBottom'};verticalStyleHooks270.width=styleHooks.height||{name:'height'};verticalStyleHooks270.height=styleHooks.width||{name:'width'};verticalStyleHooks270['margin-top']={name:'marginRight'};verticalStyleHooks270['margin-right']={name:'marginBottom'};verticalStyleHooks270['margin-bottom']={name:'marginLeft'};verticalStyleHooks270['margin-left']={name:'marginTop'};verticalStyleHooks270['padding-top']={name:'paddingRight'};verticalStyleHooks270['padding-right']={name:'paddingBottom'};verticalStyleHooks270['padding-bottom']={name:'paddingLeft'};verticalStyleHooks270['padding-left']={name:'paddingTop'};verticalStyleHooks270['border-top']={name:'borderRight'};verticalStyleHooks270['border-right']={name:'borderBottom'};verticalStyleHooks270['border-bottom']={name:'borderLeft'};verticalStyleHooks270['border-left']={name:'borderTop'};if(!Ext.scopeCss){Ext.getBody().addCls(Ext.baseCSSPrefix+'body')}},null,{priority:1500})})
;
Ext.define('Ext.rtl.dom.Element',{override:'Ext.dom.Element',requires:["Ext.CompositeElementLite"],rtlXAnchors:{l:'r',r:'l'},_positionTopRight:['position','top','right'],pxRe:/^\d+(?:\.\d*)?px$/i,statics:{rtlParseBox:function(box){var ret=Ext.Element.parseBox(box),temp;temp=ret.left;ret.left=ret.right;ret.right=temp;return ret},rtlUnitizeBox:function(box,units){var Element=Ext.Element,a=Element.addUnits,b=Element.parseBox(box);return a(b.top,units)+' '+a(b.left,units)+' '+a(b.bottom,units)+' '+a(b.right,units)}},anchorAnimX:function(anchor){if(Ext.rootInheritedState.rtl){anchor=this.rtlXAnchors[anchor]}
this.callParent(arguments)},getPositioning:function(autoPx){var xStyle=Ext.rootInheritedState.rtl?'right':'left',styles=this.getStyle([xStyle,'top','position','z-index']),dom=this.dom;if(autoPx){if(styles[xStyle]==='auto'){styles[xStyle]=(xStyle==='left')?(dom.offsetLeft+'px'):(dom.offsetParent.offsetWidth-dom.offsetLeft-dom.offsetWidth)}
if(styles.top==='auto'){styles.top=dom.offsetTop+'px'}}
return styles},getXY:function(){var doc=document,round=Math.round,dom=this.dom,body=doc.body,x=0,y=0,bodyRect,rect;if(dom!==doc&&dom!==body){try{bodyRect=body.getBoundingClientRect();rect=dom.getBoundingClientRect();x=rect.left-bodyRect.left;y=rect.top-bodyRect.top;if(Ext.rootInheritedState.rtl){x=body.scrollWidth-rect.right}}catch(ex){}}
return[round(x),round(y)]},rtlGetLocalX:function(){var me=this,offsetParent=me.dom.offsetParent,x=me.getStyle('right');if(!x||x==='auto'){x=0}else if(me.pxRe.test(x)){x=parseFloat(x)}else{x=me.getX();if(offsetParent){x-=Ext.fly(offsetParent,'_internal').getX()}}
return x},rtlGetLocalXY:function(){var me=this,offsetParent=me.dom.offsetParent,style=me.getStyle(['right','top']),x=style.right,y=style.top;if(!x||x==='auto'){x=0}else if(me.pxRe.test(x)){x=parseFloat(x)}else{x=me.getX();if(offsetParent){x-=Ext.fly(offsetParent,'_internal').getX()}}
if(!y||y==='auto'){y=0}else if(me.pxRe.test(y)){y=parseFloat(y)}else{y=me.getY();if(offsetParent){y-=Ext.fly(offsetParent,'_internal').getY()}}
return[x,y]},rtlGetScroll:function(){var me=this,dom=me.dom,doc=document,body=doc.body,scroll=me.getScroll(),left=scroll.left,flag=me._rtlScrollFlag,isDocOrBody=(dom===doc||dom===body);if(isDocOrBody?(3&me._rtlDocScrollFlag):(flag===1)){if(isDocOrBody){dom=body}
left=dom.scrollWidth-left-(isDocOrBody?Ext.Element.getViewportWidth():dom.clientWidth)}else if(!isDocOrBody&&flag===0){left=-left}
scroll.left=left;return scroll},rtlGetScrollLeft:function(){return this.rtlGetScroll().left},rtlNormalizeScrollLeft:function(left){var dom=this.dom,flag=this._rtlScrollFlag;if(flag===0){left=-left}else if(flag===1){left=dom.scrollWidth-left-dom.clientWidth}
return left},rtlScrollBy:function(deltaX,deltaY,animate){var me=this,dom=me.dom,left;if(deltaX.length){animate=deltaY;deltaY=deltaX[1];deltaX=deltaX[0]}else if(typeof deltaX!=='number'){animate=deltaY;deltaY=deltaX.y;deltaX=deltaX.x}
if(deltaX){left=me.rtlNormalizeScrollLeft(me.constrainScrollLeft(me.rtlGetScrollLeft()+deltaX));me.scrollTo('left',left,animate)}
if(deltaY){me.scrollTo('top',me.constrainScrollTop(dom.scrollTop+deltaY),animate)}
return me},rtlScrollIntoView:function(container,hscroll,animate,highlight){container=Ext.getDom(container)||Ext.getBody().dom;return this.doScrollIntoView(container,hscroll,animate,highlight,'rtlGetScrollLeft','rtlScrollTo')},rtlScrollTo:function(side,value,animate){if(side==='left'){value=this.rtlNormalizeScrollLeft(value)}
return this.scrollTo(side,value,animate)},rtlSetLocalX:function(x){var me=this,style=me.dom.style;style.left='auto';style.right=(x===null)?'auto':x+'px';if(me.shadow||me.shim){me.syncUnderlays()}
return me},rtlSetLocalXY:function(x,y){var me=this,style=me.dom.style;style.left='auto';if(x&&x.length){y=x[1];x=x[0]}
if(x===null){style.right='auto'}else if(x!==undefined){style.right=x+'px'}
if(y===null){style.top='auto'}else if(y!==undefined){style.top=y+'px'}
if(me.shadow||me.shim){me.syncUnderlays()}
return me},rtlSetScrollLeft:function(left){var me=this;me.dom.scrollLeft=me.rtlNormalizeScrollLeft(left);return me},rtlTranslatePoints:function(x,y){var pos=this.rtlTranslateXY(x,y);return{right:pos.x,top:pos.y}},rtlTranslateXY:function(x,y){var me=this,styles=me.getStyle(me._positionTopRight),relative=(styles.position==='relative'),right=parseFloat(styles.right),top=parseFloat(styles.top),xy=me.getXY(),dom=me.dom,doc,body,offsetParentWidth,offsetParent;if(x&&x.length){y=x[1];x=x[0]}
if(isNaN(right)){doc=document;body=doc.body;if(dom===body){right=0}else{offsetParent=dom.offsetParent;offsetParentWidth=(offsetParent&&offsetParent!==body&&offsetParent!==doc.documentElement)?offsetParent.scrollWidth:Ext.Element.getViewportWidth();right=offsetParentWidth-dom.offsetLeft-me.getWidth()}}
if(isNaN(top)){top=relative?0:me.dom.offsetTop}
right=(typeof x==='number')?x-xy[0]+right:undefined;top=(typeof y==='number')?y-xy[1]+top:undefined;return{x:right,y:top}},translatePoints:function(x,y){return Ext.rootInheritedState.rtl?this.rtlTranslatePoints(x,y):this.callParent(arguments)},translateXY:function(x,y){return Ext.rootInheritedState.rtl?this.rtlTranslateXY(x,y):this.callParent(arguments)},wrap:function(){var wrapFly=(this.wrapFly||(this.wrapFly=new Ext.dom.Fly())).attach(this.dom.parentNode),rtlCls=Ext.baseCSSPrefix+'rtl',ltrCls=Ext.baseCSSPrefix+'ltr',wrapEl=this.callParent(arguments),cls;if(wrapFly.hasCls(rtlCls)){cls=rtlCls}else if(wrapFly.hasCls(ltrCls)){cls=ltrCls}
if(cls){wrapFly.attach(wrapEl).addCls(cls)}
return wrapEl}},function(){var Element=this;Ext.CompositeElementLite.importElementMethods();function cacheRtlScrollFlag(){var el=Ext.getBody().createChild({tag:'div',style:'direction:rtl;position:absolute;overflow:auto;height:100px;'+'width:100px;background-color:yellow',children:[{tag:'div',style:'height:30px;width:150px;background-color:red'}]}),dom=el.dom,inner=dom.firstChild,flag=2;if(dom.scrollLeft===50){flag=1}else{dom.scrollLeft=-1;if(dom.scrollLeft){flag=0}}
inner.style.width='30px';inner.style.height='150px';Element.prototype._rtlScrollbarOnRight=inner.getBoundingClientRect().right<dom.getBoundingClientRect().right;el.destroy();Element.prototype._rtlScrollFlag=flag}
function cacheRtlDocScrollFlag(){var doc=document,docEl=doc.documentElement,body=doc.body,flag=4,bodyStyle=body.style,direction=bodyStyle.direction,el=Ext.getBody().createChild('<div style="height:20000px;width:20000px;"></div>');bodyStyle.direction='rtl';if(docEl.scrollLeft>0){flag=1}else{docEl.scrollLeft=-1;if(docEl.scrollLeft){flag=0}else{docEl.scrollLeft=1;if(docEl.scrollLeft){flag=2}}}
el.destroy();if(!direction){bodyStyle.direction='ltr';body.scrollWidth}
bodyStyle.direction=direction;Element.prototype._rtlDocScrollFlag=flag}
Ext.onInternalReady(function(){cacheRtlDocScrollFlag();cacheRtlScrollFlag()})})
;
Ext.define('Ext.GlobalEvents',{extend:'Ext.mixin.Observable',alternateClassName:'Ext.globalEvents',requires:['Ext.dom.Element'],observableType:'global',singleton:!0,resizeBuffer:100,idleEventMask:{mousemove:1,touchmove:1,pointermove:1,MSPointerMove:1,unload:1},windowListeners:{resize:{fn:'fireResize'}},constructor:function(){var me=this;me.callParent();Ext.onInternalReady(function(){me.attachListeners()})},setPressedComponent:function(component,e){var me=this,pressedComponent=me.pressedComponent;if(pressedComponent&&pressedComponent.onRelease){pressedComponent.onRelease(e)}
me.pressedComponent=component;if(component){me.pressedScrollStart=Ext.on({scrollstart:function(){me.setPressedComponent(null,e)},destroyable:!0})}else{me.pressedScrollStart=Ext.destroy(me.pressedScrollStart)}},attachListeners:function(){var me=this,win=Ext.getWin(),winListeners=me.windowListeners;me.onlineState=Ext.isOnline();me.curHeight=Ext.Element.getViewportHeight();me.curWidth=Ext.Element.getViewportWidth();win.on({scope:me,online:'handleOnlineChange',offline:'handleOnlineChange'});me.fireResize.$skipTimerCheck=!0;if(winListeners){winListeners.scope=me;if(Ext.isModern){winListeners.resize.onFrame=!0}else{winListeners.resize.buffer=me.resizeBuffer}
win.on(winListeners)}
Ext.getDoc().on({touchstart:'fireMouseDown',mousedown:'fireMouseDown',mouseup:'fireMouseUp',touchend:'fireMouseUp',drop:'fireMouseUp',dragend:'fireMouseUp',scope:me})},fireMouseDown:function(e){this.fireEvent('mousedown',e);Ext.ComponentManager.handleDocumentMouseDown(e)},fireMouseUp:function(e){this.fireEvent('mouseup',e);this.setPressedComponent(null,e)},fireResize:function(){var me=this,Element=Ext.Element,w=Element.getViewportWidth(),h=Element.getViewportHeight();if(me.curHeight!==h||me.curWidth!==w){me.curHeight=h;me.curWidth=w;if(me.hasListeners.resize){me.fireEvent('resize',w,h)}}},handleOnlineChange:function(){var online=Ext.isOnline();if(online!==this.onlineState){this.onlineState=online;this.fireEvent('onlinechange',online)}}},function(GlobalEvents){Ext.hasListeners=GlobalEvents.hasListeners;Ext.on=function(){return GlobalEvents.addListener.apply(GlobalEvents,arguments)};Ext.un=function(){return GlobalEvents.removeListener.apply(GlobalEvents,arguments)};Ext.fireEvent=function(){return GlobalEvents.fireEvent.apply(GlobalEvents,arguments)};Ext.fireIdle=function(){if(GlobalEvents.hasListeners.idle&&!Ext._suppressIdle){GlobalEvents.fireEventArgs('idle')}
Ext._suppressIdle=!1};Ext._suppressIdle=!1})
;
Ext.define('Ext.overrides.GlobalEvents',{override:'Ext.GlobalEvents',attachListeners:function(){var me=this,docElement,bufferedFn;if(Ext.isIE8){docElement=Ext.getDoc().dom.documentElement;bufferedFn=Ext.Function.createBuffered(me.fireResize,me.resizeBuffer,me);Ext.getWin().dom.attachEvent('onresize',function(){if(docElement.clientWidth!==Ext.GlobalEvents.curWidth||docElement.clientHeight!==Ext.GlobalEvents.curHeight){bufferedFn()}})}
me.callParent()},deprecated:{5:{methods:{addListener:function(ename,fn,scope,options,order,caller,eventOptions){var name,readyFn;if(ename==='ready'){readyFn=fn}else if(typeof ename!=='string'){for(name in ename){if(name==='ready'){readyFn=ename[name]}}}
if(readyFn){Ext.log.warn("Ext.on('ready', fn) is deprecated.  "+"Please use Ext.onReady(fn) instead.");Ext.onReady(readyFn)}
this.callParent([ename,fn,scope,options,order,caller,eventOptions])}}}}})
;
Ext.define('Ext.Glyph',{isGlyph:!0,constructor:function(glyph){if(glyph){this.setGlyph(glyph)}},setGlyph:function(glyph){var glyphParts;this.glyphConfig=glyph;if(typeof glyph==='string'){glyphParts=glyph.split('@');glyph=isNaN(glyphParts[0])?parseInt('0'+glyphParts[0],16):parseInt(glyphParts[0],10);if(isNaN(glyph)||!glyph){glyph=glyphParts[0].charCodeAt(0)}
this.fontFamily=glyphParts[1]||Ext._glyphFontFamily}else{this.fontFamily=Ext._glyphFontFamily}
this.codepoint=glyph;this.character=Ext.String.fromCodePoint(this.codepoint);return this},getStyle:function(){return{'font-family':this.fontFamily}},isEqual:function(other){return other&&other.isGlyph&&other.codepoint===this.codepoint&&other.fontFamily===this.fontFamily},statics:(function(){var instance;return{fly:function(glyph){return glyph.isGlyph?glyph:(instance||(instance=new Ext.Glyph())).setGlyph(glyph)}}})()})
;
Ext.USE_NATIVE_JSON=!0;Ext.JSON=(new(function(){var me=this,hasNative=window.JSON&&JSON.toString()==='[object JSON]',useHasOwn=!!{}.hasOwnProperty,pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+')')},doEncode=function(o,newline){if(o===null||o===undefined){return"null"}else if(Ext.isDate(o)){return me.encodeDate(o)}else if(Ext.isString(o)){if(Ext.isMSDate(o)){return me.encodeMSDate(o)}else{return me.encodeString(o)}}else if(typeof o==="number"){return isFinite(o)?String(o):"null"}else if(Ext.isBoolean(o)){return String(o)}else if(typeof o.toJSON==='function'){return doEncode(o.toJSON())}else if(Ext.isArray(o)){return encodeArray(o,newline)}else if(Ext.isObject(o)){return encodeObject(o,newline)}else if(typeof o==="function"){return"null"}
return'undefined'},m={"\b":'\\b',"\t":'\\t',"\n":'\\n',"\f":'\\f',"\r":'\\r','"':'\\"',"\\":'\\\\','\x0b':'\\u000b'},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeMSDate=function(o){return'"'+o+'"'},encodeArrayPretty=function(o,newline){var len=o.length,cnewline=newline+'   ',sep=','+cnewline,a=["[",cnewline],i;for(i=0;i<len;i+=1){a.push(me.encodeValue(o[i],cnewline),sep)}
a[a.length-1]=newline+']';return a.join('')},encodeObjectPretty=function(o,newline){var cnewline=newline+'   ',sep=','+cnewline,a=["{",cnewline],i,val;for(i in o){val=o[i];if(!useHasOwn||o.hasOwnProperty(i)){if(typeof val==='function'||val===undefined||val.isInstance){continue}
a.push(me.encodeValue(i)+': '+me.encodeValue(val,cnewline),sep)}}
a[a.length-1]=newline+'}';return a.join('')},encodeArray=function(o,newline){if(newline){return encodeArrayPretty(o,newline)}
var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(me.encodeValue(o[i]),',')}
a[a.length-1]=']';return a.join("")},encodeObject=function(o,newline){if(newline){return encodeObjectPretty(o,newline)}
var a=["{",""],i,val;for(i in o){val=o[i];if(!useHasOwn||o.hasOwnProperty(i)){if(typeof val==='function'||val===undefined){continue}
a.push(me.encodeValue(i),":",me.encodeValue(val),',')}}
a[a.length-1]='}';return a.join("")};me.encodeString=encodeString;me.encodeValue=doEncode;me.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};me.encode=function(o){if(hasNative&&Ext.USE_NATIVE_JSON){return JSON.stringify(o)}
return me.encodeValue(o)};me.decode=function(json,safe){try{if(hasNative&&Ext.USE_NATIVE_JSON){return JSON.parse(json)}
return doDecode(json)}catch(e){if(safe){return null}
Ext.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}};me.encodeMSDate=encodeMSDate;if(!Ext.util){Ext.util={}}
Ext.util.JSON=me;Ext.encode=me.encode;Ext.decode=me.decode})())
;

;
Ext.define('Ext.mixin.Inheritable',{extend:'Ext.Mixin',mixinConfig:{id:'inheritable'},getInherited:function(inner){var me=this,inheritedState=(inner&&me.inheritedStateInner)||me.inheritedState,ownerCt=me.getRefOwner(),isContainer=me.isContainer,parent,inheritedStateInner,getInner,ownerLayout;if(!inheritedState||inheritedState.invalid){parent=me.getRefOwner();ownerLayout=me.ownerLayout;if(ownerCt){getInner=ownerLayout?ownerLayout===ownerCt.layout:!0}
me.inheritedState=inheritedState=Ext.Object.chain(parent?parent.getInherited(getInner):Ext.rootInheritedState);if(isContainer){me.inheritedStateInner=inheritedStateInner=Ext.Object.chain(inheritedState)}
me.initInheritedState(inheritedState,inheritedStateInner);inheritedState=(isContainer&&inner)?me.inheritedStateInner:me.inheritedState}
return inheritedState},getInheritedConfig:function(property,skipThis){var state=this.inheritedState,old,ret;if(!state||state.invalid){state=this.getInherited()}
ret=state[property];if(skipThis&&state.hasOwnProperty(property)){old=ret;delete state[property];ret=state[property];state[property]=old}
return ret},resolveListenerScope:function(defaultScope,skipThis){var me=this,hasSkipThis=(typeof skipThis==='boolean'),namedScope=Ext._namedScopes[defaultScope],ret;if(!namedScope){ret=me.getInheritedConfig('defaultListenerScope',hasSkipThis?skipThis:!0)||defaultScope||me}else if(namedScope.isController){ret=me.getInheritedConfig('controller',hasSkipThis?skipThis:!namedScope.isSelf)}else if(namedScope.isOwner){ret=me.getRefOwner()}else if(namedScope.isSelf){ret=me.getInheritedConfig('defaultListenerScope',hasSkipThis&&skipThis)||me}else if(namedScope.isThis){ret=me}
return ret||null},resolveSatelliteListenerScope:function(satellite,defaultScope){var me=this,namedScope=Ext._namedScopes[defaultScope],ret;if(!namedScope){ret=me.getInheritedConfig('defaultListenerScope')||defaultScope||me}else if(namedScope.isController){ret=me.getInheritedConfig('controller')}else if(namedScope.isSelf){ret=me.getInheritedConfig('defaultListenerScope')||satellite}else if(namedScope.isThis){ret=satellite}
return ret||null},lookupNameHolder:function(skipThis){return this.getInheritedConfig('nameHolder',skipThis!==!1)||null},lookupReferenceHolder:function(skipThis){return this.getInheritedConfig('referenceHolder',skipThis!==!1)||null},getRefOwner:function(){var me=this;return me.ownerCmp||me.ownerCt||me.parent||me.$initParent||me.floatParent},bubble:function(fn,scope,args){var target;for(target=this;target;target=target.getRefOwner()){if(fn.apply(scope||target,args||[target])===!1){break}}},isDescendantOf:function(ancestor){return ancestor?ancestor.isAncestor(this):!1},isAncestor:function(possibleDescendant){while(possibleDescendant){if(possibleDescendant.getRefOwner()===this){return!0}
possibleDescendant=possibleDescendant.getRefOwner()}
return!1},invalidateInheritedState:function(){var inheritedState=this.inheritedState;if(inheritedState){inheritedState.invalid=!0;delete this.inheritedState}},privates:{_fixReference:function(){var me=this,holder;if(me.name&&me.nameable){holder=me.lookupNameHolder();if(holder&&!holder.destroyed){holder.attachNameRef(me)}}
if(me.reference){holder=me.lookupReferenceHolder();if(holder&&!holder.destroyed){holder.attachReference(me)}}},onInheritedAdd:function(parent,instanced){var me=this;if(me.inheritedState&&instanced){me.invalidateInheritedState()}
Ext.ComponentManager.markReferencesDirty()},onInheritedRemove:function(destroying){var me=this;Ext.ComponentManager.markReferencesDirty();if(me.inheritedState&&!destroying){me.invalidateInheritedState()}}}},function(){Ext.rootInheritedState={}})
;
Ext.define('Ext.mixin.Bindable',{mixinId:'bindable',config:{bind:{$value:null,lazy:!0},controller:null,defaultListenerScope:!1,publishes:{$value:null,lazy:!0,merge:function(newValue,oldValue){return this.mergeSets(newValue,oldValue)}},session:{$value:null,lazy:!0},twoWayBindable:{$value:null,lazy:!0,merge:function(newValue,oldValue){return this.mergeSets(newValue,oldValue)}},viewModel:{$value:null,lazy:!0}},defaultBindProperty:null,nameable:!1,shareableName:!1,reference:null,validRefRe:/^[a-z_][a-z0-9_]*$/i,getReference:function(){return this.reference},initInheritedState:function(inheritedState){var me=this,reference=me.reference,controller=me.getController(),viewModel=me.getConfig('viewModel',!0),session=me.getConfig('session',!0),defaultListenerScope=me.getDefaultListenerScope();if(controller){inheritedState.controller=controller}
if(defaultListenerScope){inheritedState.defaultListenerScope=me}else if(controller){inheritedState.defaultListenerScope=controller}
if(viewModel){if(!viewModel.isViewModel){viewModel=me}
inheritedState.viewModel=viewModel}
if(session){if(!session.isSession){session=me}
inheritedState.session=session}
if(reference){me.referenceKey=(inheritedState.referencePath||'')+reference;me.viewModelKey=(inheritedState.viewModelPath||'')+reference}},isBound:function(name){var bind=this.getBind();return!!(bind&&(bind[name||this.defaultBindProperty]))},lookupController:function(skipThis){return this.getInheritedConfig('controller',skipThis)||null},lookupSession:function(skipThis){var ret=skipThis?null:this.getSession();if(!ret){ret=this.getInheritedConfig('session',skipThis);if(ret&&!ret.isSession){ret=ret.getInherited().session=ret.getSession()}}
return ret||null},lookupViewModel:function(skipThis){var ret=skipThis?null:this.getViewModel();if(!ret){ret=this.getInheritedConfig('viewModel',skipThis);if(ret&&!ret.isViewModel){ret=ret.getInherited().viewModel=ret.getViewModel()}}
return ret||null},publishState:function(property,value){var me=this,state=me.publishedState,binds=me.getBind(),binding=binds&&property&&binds[property],count=0,name,publishes,vm,path;if(!(arguments.length===0||arguments.length===2)){Ext.raise('publishState must either be called with no args, or with both name '+'AND value passed')}
if(binding&&!binding.syncing&&!binding.isReadOnly()){if(binding.calls||!(value==null||value===me.getInitialConfig()[property])){binding.setValue(value)}}
if(!(publishes=me.getPublishes())){return}
if(!(vm=me.lookupViewModel())){return}
if(!(path=me.viewModelKey)){return}
state=state||(me.publishedState={});if(property){if(!publishes[property]){return}
if(!(value&&value.constructor===Object)&&!(value instanceof Array)){if(state[property]===value){return}}
path+='.';path+=property}else{for(name in publishes){++count;state[name]=me.getConfig(name)}
if(!count){return}
value=state}
vm.set(path,value)},privates:{applyBind:function(binds,currentBindings){if(!binds){return currentBindings}
var me=this,viewModel=me.lookupViewModel(),twoWayable=me.getTwoWayBindable(),getBindTemplateScope=me._getBindTemplateScope,b,watch,property,descriptor;if(!viewModel){Ext.raise('Cannot use bind config without a viewModel')}
if(typeof binds==='string'){if(!me.defaultBindProperty){Ext.raise(me.$className+' has no defaultBindProperty - '+'Please specify a bind object')}
b=binds;binds={};binds[me.defaultBindProperty]=b}
for(property in binds){descriptor=binds[property];b=currentBindings&&currentBindings[property];if(b){b.destroy();delete currentBindings[property]}
if(descriptor){if(!b&&twoWayable&&twoWayable[property]){(watch||(watch={}))[property]='_onConfigPropChange'}
b=viewModel.bind(descriptor,me.onBindNotify,me);b._config=Ext.Config.get(property);b.getTemplateScope=getBindTemplateScope;if(!me[b._config.names.set]){Ext.raise('Cannot bind '+property+' on '+me.$className+' - missing a '+b._config.names.set+' method.')}(currentBindings||(currentBindings={}))[property]=b}}
if(watch){watch.scope=me;me.watchConfig(watch)}
me.$bindings=currentBindings;return currentBindings},applyController:function(controller){if(controller){controller=Ext.Factory.controller(controller);controller.setView(this)}
this.controller=controller;return controller},updatePublishes:function(all){var me=this,property,watch;if(all&&me.lookupViewModel()){for(property in all){if(all[property]){(watch||(watch={}))[property]='_onConfigPropChange'}}
if(watch){watch.scope=me;me.watchConfig(watch)}}
return all},applySession:function(session){var parentSession,config;if(!session){return null}
if(!session.isSession){parentSession=this.lookupSession(!0);config=(session===!0)?{}:session;if(parentSession){session=parentSession.spawn(config)}else{session=new Ext.data.Session(config)}}
return session},applyViewModel:function(viewModel){var me=this,config,session;if(!viewModel){return null}
if(!viewModel.isViewModel){config={parent:me.lookupViewModel(!0),view:me};config.session=me.getSession();if(!session&&!config.parent){config.session=me.lookupSession()}
if(viewModel){if(viewModel.constructor===Object){Ext.apply(config,viewModel)}else if(typeof viewModel==='string'){config.type=viewModel}}
viewModel=Ext.Factory.viewModel(config)}
return viewModel},_getBindTemplateScope:function(){return this.scope.resolveListenerScope()},destroyBindable:function(){var me=this,viewModel=me.getConfig('viewModel',!0),session=me.getConfig('session',!0),controller=me.getController();if(viewModel&&viewModel.isViewModel){viewModel.destroy();me.setViewModel(null)}
if(session&&session.isSession){if(session.getAutoDestroy()){session.destroy()}
me.setSession(null)}
if(controller){me.setController(null);controller.destroy()}},initBindable:function(){var me=this,controller=me.controller;me.initBindable=Ext.emptyFn;me.getBind();me.getPublishes();if(!me.viewModel){me.getViewModel()}
if(controller){controller.initBindings()}
if(me.reference){me.publishState()}},isSyncing:function(name){var bindings=this.getBind(),ret=!1,binding;if(bindings){binding=bindings[name];if(binding){ret=binding.syncing>0}}
return ret},notifyIf:function(skipThis){var vm=this.lookupViewModel(skipThis);if(vm){vm.notify()}},onBindNotify:function(value,oldValue,binding){binding.syncing=(binding.syncing+1)||1;this[binding._config.names.set](value);--binding.syncing},_onConfigPropChange:function(me,name,value){me.publishState(name,value)},removeBindings:function(){var me=this,bindings=me.$bindings,b,key;if(bindings){for(key in bindings){b=bindings[key];if(b){b.destroy();b._config=b.getTemplateScope=null;bindings[key]=null}}}},updateSession:function(session){var state=this.getInherited();if(session){state.session=session}else{delete state.session}},updateViewModel:function(viewModel,oldViewModel){var me=this,state=me.getInherited(),controller=me.getController();if(viewModel){me.hasVM=!0;state.viewModel=viewModel;viewModel.setView(me);if(controller){controller.initViewModel(viewModel)}}else{delete state.viewModel}
me.viewModel=viewModel}}})
;
Ext.define('Ext.mixin.ComponentDelegation',{extend:'Ext.Mixin',mixinConfig:{id:'componentDelegation'},privates:{addDelegatedListener:function(eventName,fn,scope,options,order,caller,manager){var me=this,delegatedEvents,event,priority;eventName=Ext.canonicalEventName(eventName);order=order||options.order;if(order){priority=(options&&options.priority);if(!priority){options=options?Ext.Object.chain(options):{};options.priority=me.$orderToPriority[order]}}
if(options.target){Ext.raise("Cannot add '"+eventName+"' listener to component: '"+me.id+"' - 'delegate' and 'target' event options are incompatible.")}
delegatedEvents=me.$delegatedEvents||(me.$delegatedEvents={});event=delegatedEvents[eventName]||(delegatedEvents[eventName]=new Ext.util.Event(me,eventName));if(event.addListener(fn,scope,options,caller,manager)){me.$hasDelegatedListeners._incr_(eventName)}},clearDelegatedListeners:function(){var me=this,delegatedEvents=me.$delegatedEvents,eventName,event,listenerCount;if(delegatedEvents){for(eventName in delegatedEvents){event=delegatedEvents[eventName];listenerCount=event.listeners.length;event.clearListeners();me.$hasDelegatedListeners._decr_(eventName,listenerCount);delete delegatedEvents[eventName]}}},doFireDelegatedEvent:function(eventName,args){var me=this,ret=!0,owner,delegatedEvents,event;if(me.$hasDelegatedListeners[eventName]){owner=me.getRefOwner();while(owner){delegatedEvents=owner.$delegatedEvents;if(delegatedEvents){event=delegatedEvents[eventName];if(event){ret=event.fireDelegated(me,args);if(ret===!1){break}}}
owner=owner.getRefOwner()}}
return ret},removeDelegatedListener:function(eventName,fn,scope){var me=this,delegatedEvents=me.$delegatedEvents,event;if(delegatedEvents){event=delegatedEvents[eventName];if(event&&event.removeListener(fn,scope)){me.$hasDelegatedListeners._decr_(eventName);if(event.listeners.length===0){delete delegatedEvents[eventName]}}}},destroyComponentDelegation:function(){if(this.clearPropertiesOnDestroy){this.$delegatedEvents=null}}},onClassMixedIn:function(T){function HasListeners(){}
T.prototype.HasListeners=T.HasListeners=HasListeners;HasListeners.prototype=T.hasListeners=new Ext.mixin.ComponentDelegation.HasDelegatedListeners()}},function(ComponentDelegation){function HasDelegatedListeners(){}
ComponentDelegation.HasDelegatedListeners=HasDelegatedListeners;HasDelegatedListeners.prototype=ComponentDelegation.prototype.$hasDelegatedListeners=new Ext.mixin.Observable.HasListeners()})
;
Ext.define('Ext.plugin.Abstract',{alternateClassName:'Ext.AbstractPlugin',mixins:['Ext.mixin.Identifiable'],isPlugin:!0,constructor:function(config){if(config){this.cmp=config.cmp;this.pluginConfig=config;this.initConfig(config)}},init:Ext.emptyFn,destroy:function(){var me=this;me.destroy=Ext.emptyFn;me.destroying=!0;me.cmp=me.pluginConfig=null;me.doDestroy();me.callParent()},doDestroy:Ext.emptyFn,clonePlugin:function(overrideCfg){return new this.self(Ext.apply({},overrideCfg,this.pluginConfig))},getCmp:function(){return this.cmp},setCmp:function(host){this.cmp=host},getStatefulOwner:function(){return[this.cmp,'plugins']},onClassExtended:function(cls,data,hooks){var alias=data.alias,prototype=cls.prototype;if(alias&&!data.ptype){if(Ext.isArray(alias)){alias=alias[0]}
prototype.ptype=alias.split('plugin.')[1]}},resolveListenerScope:function(defaultScope){var me=this,cmp=me.getCmp(),scope;if(cmp){scope=cmp.resolveSatelliteListenerScope(me,defaultScope)}
return scope||me.mixins.observable.resolveListenerScope.call(me,defaultScope)},statics:{decode:function(plugins,typeProp,include){if(plugins){var type=Ext.typeOf(plugins),entry,key,obj,value;if(type==='string'){obj={};obj[typeProp]=plugins;plugins=[obj]}else if(plugins.isInstance){plugins=[plugins]}else if(type==='object'){if(plugins[typeProp]){plugins=[plugins]}else{obj=include?Ext.merge(Ext.clone(include),plugins):plugins;plugins=[];for(key in obj){if(!(value=obj[key])){continue}
entry={id:key};entry[typeProp]=key;Ext.apply(entry,value);plugins.push(entry)}
Ext.sortByWeight(plugins)}}else if(type!=='array'){Ext.raise('Invalid value for "plugins" config ("'+type+'"')}else{plugins=plugins.slice()}}
return plugins}}})
;
Ext.define('Ext.overrides.plugin.Abstract',{override:'Ext.plugin.Abstract',$configStrict:!1,$configPrefixed:!1,disabled:!1,getState:null,applyState:null,enable:function(){this.disabled=!1},disable:function(){this.disabled=!0}})
;
Ext.define('Ext.mixin.Pluggable',function(Pluggable){return{requires:['Ext.plugin.Abstract'],mixinId:'pluggable',config:{plugins:null},addPlugin:function(plugin){var me=this,plugins=me.getPlugins();if(plugins){plugin=me.createPlugin(plugin);plugin.init(me);plugins.push(plugin)}else{me.setPlugins(plugin);plugin=me.getPlugins()[0]}
return plugin},destroyPlugin:function(plugin){return this.removePlugin(plugin,!0)},findPlugin:function(type){var plugins=this.getPlugins(),n=plugins&&plugins.length,i,plugin,ret;for(i=0;i<n&&!ret;i++){plugin=plugins[i];if(plugin.type===type||plugin.ptype===type){ret=plugin}}
return ret||null},getPlugin:function(id){var plugins=this.getPlugins(),n=plugins&&plugins.length,i,plugin,ret;for(i=0;i<n&&!ret;i++){plugin=plugins[i];if(plugin.id===id||plugin.pluginId===id){ret=plugin}}
return ret||null},removePlugin:function(plugin,destroy){var plugins=this.getPlugins(),i=plugins&&plugins.length||0,p;while(i-->0){p=plugins[i];if(p===plugin||p.id===plugin){plugins.splice(i,1);if(destroy){if(p.destroy){p.destroy()}}else if(p.detachCmp){p.detachCmp();if(p.setCmp){p.setCmp(null)}}
break}
p=null}
return p},privates:{statics:{idSeed:0},activatePlugin:function(type){var me=this,config=me.initialConfig,plugins=config&&config.plugins,ret=null,i,include,p;if(plugins){include=me.config.plugins;include=(include&&typeof include==='object')?include:null;plugins=Ext.plugin.Abstract.decode(plugins,'type',include);for(i=plugins.length;i-->0;){p=plugins[i];if(p===type||p.type===type){me.initialConfig=config=Ext.apply({},config);config.plugins=plugins;plugins[i]=ret=me.createPlugin(p);break}}}
return ret},applyPlugins:function(plugins,oldPlugins){var me=this,oldCount=oldPlugins&&oldPlugins.length||0,count,i,plugin;if(plugins){plugins=Ext.plugin.Abstract.decode(plugins,'type')}
for(i=0;i<oldCount;++i){oldPlugins[i].$dead=!0}
count=plugins&&plugins.length||0;for(i=0;i<count;++i){plugins[i]=me.createPlugin(plugins[i])}
for(i=0;i<count;++i){plugin=plugins[i];if(plugin.$dead){delete plugin.$dead}else{plugin.init(me)}}
for(i=0;i<oldCount;++i){if((plugin=oldPlugins[i]).$dead){delete plugin.$dead;Ext.destroy(plugin)}}
return plugins},createPlugin:function(config){var ret;if(typeof config==='string'){config={type:config}}
ret=config;if(!config.isInstance){config.cmp=this;ret=Ext.factory(config,null,null,'plugin');delete config.cmp}
if(!ret.id){ret.id=++Pluggable.idSeed}
if(ret.setCmp){ret.setCmp(this)}
return ret}}}})
;
Ext.define('Ext.mixin.Keyboard',function(Keyboard){return{extend:'Ext.Mixin',mixinConfig:{id:'keyboard'},config:{keyMap:{$value:null,cached:!0,merge:function(value,baseValue,cls,mixin){var ret,key,ucKey,v,vs;if(value===null){return value}
ret=(baseValue&&!cls.isInstance)?Ext.Object.chain(baseValue):{};for(key in value){if(key!=='scope'){ucKey=key.toUpperCase();if(!mixin||ret[ucKey]===undefined){v=value[key];if(v){if(typeof v==='string'||typeof v==='function'){v={handler:v}}else{v=Ext.apply({handler:v.fn},v)}
vs=v.scope||value.scope||'self';v.scope=(vs==='controller')?'self.controller':vs}
ret[ucKey]=v}}}
return ret}},keyMapEnabled:null},keyMapTarget:'el',applyKeyMap:function(keyMap,existingKeyMap){var me=this,own=me.hasOwnProperty('config');if(own&&existingKeyMap&&existingKeyMap.$owner!==me){existingKeyMap=Ext.apply({},existingKeyMap)}
keyMap=keyMap?Keyboard.combineKeyMaps(existingKeyMap,keyMap,own&&me):null;if(me._keyMapReady){me.setKeyMapListener(keyMap&&me.getKeyMapEnabled())}
return keyMap},initKeyMap:function(){var me=this,enabled=me.getKeyMapEnabled();me._keyMapReady=!0;if(enabled===null){me.setKeyMapEnabled(!0)}else{me.setKeyMapListener(enabled&&me.getKeyMap())}},disableKeyMapGroup:function(group){this.setKeyMapGroupEnabled(group,!1)},enableKeyMapGroup:function(group){this.setKeyMapGroupEnabled(group,!0)},setKeyMapGroupEnabled:function(group,state){var me=this,disabledGroups=me.disabledKeyMapGroups||(me.disabledKeyMapGroups={});disabledGroups[group]=!state},updateKeyMapEnabled:function(enabled){this.setKeyMapListener(enabled&&this._keyMapReady&&this.getKeyMap())},privates:{_keyMapListenCount:0,_keyMapReady:!1,comparePriorities:function(lhs,rhs){return(rhs.priority||0)-(lhs.priority||0)},findKeyMapEntries:function(e){var me=this,disabledGroups=me.disabledKeyMapGroups,keyMap=me.getKeyMap(),entries=keyMap&&Keyboard.getKeyName(e),result=[],entry,len,i;entries=entries&&keyMap[entries];if(entries){if(!entries.sorted){Ext.Array.sort(entries,me.comparePriorities);entries.sorted=!0}
len=entries.length;for(i=0;i<len;i++){entry=entries[i];if(!disabledGroups||!disabledGroups[entry.group]){if(Keyboard.matchEntry(entry,e)){result.push(entry)}}}}
return result},onKeyMapEvent:function(e){var me=this,entries=me.getKeyMapEnabled()?me.findKeyMapEntries(e):null,len=entries&&entries.length,i,entry,result;me.lastKeyMapEvent=e;for(i=0;i<len&&result!==!1;i++){entry=entries[i];result=Ext.callback(entry.handler,entry.scope,[e,this],0,this)}
return result},setKeyMapListener:function(enabled){var me=this,listener=me._keyMapListener,eventSource;if(listener){listener.destroy();listener=null}
if(enabled){++me._keyMapListenCount;if(enabled){eventSource=me[me.keyMapTarget];if(typeof eventSource==='function'){eventSource=eventSource.call(me)}
listener=eventSource.on({destroyable:!0,scope:me,keydown:'onKeyMapEvent',keypress:'onKeyMapEvent'})}}
me._keyMapListener=listener||null},statics:{_charCodeRe:/^#([\d]+)$/,_keySpecRe:/^(?:(?:(\*)[\+\-])|(?:([a-z\+\-]*)[\+\-]))?(?:([a-z0-9_]+|[\+\-]|(?:#?\d+))(?:\:([a-z]+))?)$/i,_delimiterRe:/-|\+/,_keyMapEvents:{charCode:'keypress',keyCode:'keydown'},combineKeyMaps:function(existingKeyMap,keyMap,owner){var defaultScope=keyMap.scope||'controller',entry,key,mapping,existingMapping;for(key in keyMap){if(key==='scope'){continue}
if(!(mapping=keyMap[key])){if(mapping===undefined){Ext.raise('keyMap entry "'+key+'" is undefined')}
if(!existingKeyMap){continue}}else{if(typeof mapping==='string'||typeof mapping==='function'){mapping={handler:mapping,scope:defaultScope}}else if(mapping){mapping=Ext.apply({handler:mapping.fn,scope:defaultScope},mapping)}
existingKeyMap=existingKeyMap||{}}
if(Keyboard.parseEntry(key,entry=mapping||{})){existingMapping=existingKeyMap[entry.name];if(existingMapping){if(owner&&existingMapping.$owner!==owner){existingKeyMap[entry.name]=existingMapping=existingMapping.slice();existingMapping.$owner=owner}
existingMapping.push(mapping);existingMapping.sorted=!1}else{existingMapping=existingKeyMap[entry.name]=[mapping];existingMapping.$owner=owner;existingMapping.sorted=!0}}else{Ext.raise('Invalid keyMap key specification "'+key+'"')}}
if(existingKeyMap&&owner){existingKeyMap.$owner=owner}
return existingKeyMap||null},getKeyName:function(event){var keyCode;if(event.isEvent){keyCode=event.keyCode||event.charCode;event=event.browserEvent;if(keyCode===229&&'code' in event){if(Ext.String.startsWith(event.code,'Key')){return event.key.substr(3)}
if(Ext.String.startsWith(event.code,'Digit')){return event.key.substr(5)}}}else{keyCode=event}
return Ext.event.Event.keyCodes[keyCode]||String.fromCharCode(keyCode)},matchEntry:function(entry,e){var ev=e.browserEvent,code;if(e.type!==entry.event){return!1}
if(!(code=entry.charCode)){if(entry.keyCode!==e.keyCode||(!entry.ignoreModifiers&&!entry.shiftKey!==!ev.shiftKey)){return!1}}else if(e.getCharCode()!==code){return!1}
return entry.ignoreModifiers||(!entry.ctrlKey===!ev.ctrlKey&&!entry.altKey===!ev.altKey&&!entry.metaKey===!ev.metaKey&&!entry.shiftKey===!ev.shiftKey)},parseEntry:function(key,entry){key=key.toUpperCase();var me=this,Event=Ext.event.Event,keyFlags=Event.keyFlags,parts=me._keySpecRe.exec(key),type='keyCode',name,code,i,match,n;if(parts){name=parts[3];if(parts[4]){entry.group=parts[4]}
if(!(entry.ignoreModifiers=!!parts[1])&&parts[2]){parts=parts[2].split(me._delimiterRe);n=parts.length;for(i=0;i<n;i++){if(!keyFlags[parts[i]]){return!1}
entry[keyFlags[parts[i]]]=!0}}
entry.name=name;if(isNaN(code=Event[name])){if(!(match=me._charCodeRe.exec(name))){if(name.length===1){code=name.charCodeAt(0)}}else{code=+match[1]}
if(code){type='charCode'}else{code=+name}
entry.name=Keyboard.getKeyName(code)}
entry.event=entry.event||me._keyMapEvents[type];return!isNaN(code)&&(entry[type]=code)}}}}}})
;
Ext.define('Ext.mixin.Focusable',{mixinId:'focusable',$isFocusableEntity:!0,focusable:!1,hasFocus:!1,containsFocus:!1,focusCls:Ext.baseCSSPrefix+'focused',focusEl:'el',getFocusEl:function(){var focusEl=this.focusEl;return focusEl&&focusEl.dom?focusEl:null},getFocusClsEl:function(){return this.getFocusEl()},initFocusable:Ext.emptyFn,initFocusableEvents:function(force){this.initFocusableElement(force)},enableFocusable:Ext.emptyFn,disableFocusable:function(){var me=this;if(me.hasFocus){me.revertFocus()}
me.removeFocusCls()},destroyFocusable:function(){var me=this;Ext.destroy(me.focusListeners);me.focusListeners=me.focusEnterEvent=me.focusTask=null;me.focusEl=me.ariaEl=null},isFocusable:function(deep){var me=this,focusEl;if(!me.focusable&&(!me.isContainer||!deep)){return!1}
focusEl=me.getFocusEl();if(focusEl&&me.canFocus()){return focusEl&&!focusEl.destroyed&&focusEl.isFocusable(deep)}
return!1},isDestructing:function(){var c;for(c=this;c;c=c.getRefOwner()){if(c.destroying||c.destroyed){return!0}}
return!1},canFocus:function(skipVisibility,includeFocusTarget){var me=this,ownerFC=me.ownerFocusableContainer,focusableIfDisabled=ownerFC&&ownerFC.allowFocusingDisabledChildren,canFocus;canFocus=!me.destroyed&&me.rendered&&!me.isDestructing()&&(me.isContainer||me.focusable)&&(!me.isDisabled()||focusableIfDisabled)&&(skipVisibility||me.isVisible(!0));return canFocus||(includeFocusTarget&&!!me.findFocusTarget())},focus:function(selectText){var me=this,focusTarget,focusElDom;if((!me.focusable&&!me.isContainer)||me.destroyed||me.destroying){return!1}
if(me.canFocus()&&(focusTarget=me.getFocusEl())){if(focusTarget.$isFocusableEntity){return focusTarget.focus.apply(focusTarget,arguments)}
focusElDom=focusTarget.dom;if(focusElDom){focusTarget.focus();if(selectText&&(me.selectText||focusElDom.select)){if(me.selectText){if(Ext.isArray(selectText)){me.selectText.apply(me,selectText)}else{me.selectText()}}else{focusElDom.select()}}}else if(focusTarget.focus){focusTarget.focus()}else{return!1}}else{focusTarget=me.findFocusTarget();if(focusTarget&&focusTarget!==me){return focusTarget.focus.apply(focusTarget,arguments)}else{return!1}}
return!0},onBlur:function(e){var me=this,container=me.ownerFocusableContainer;me.hasFocus=!1;if(me.beforeBlur&&!me.beforeBlur.$emptyFn){me.beforeBlur(e)}
if(container){container.beforeFocusableChildBlur(me,e)}
me.removeFocusCls(e);if(me.hasListeners.blur){me.fireEvent('blur',me,e)}
if(me.postBlur&&!me.postBlur.$emptyFn){me.postBlur(e)}
if(container){container.afterFocusableChildBlur(me,e)}},onFocus:function(e){var me=this,container=me.ownerFocusableContainer;if(me.canFocus()){if(me.beforeFocus&&!me.beforeFocus.$emptyFn){me.beforeFocus(e)}
if(container){container.beforeFocusableChildFocus(me,e)}
me.addFocusCls(e);if(!me.hasFocus){me.hasFocus=!0;me.fireEvent('focus',me,e)}
if(me.postFocus&&!me.postFocus.$emptyFn){me.postFocus(e)}
if(container){container.afterFocusableChildFocus(me,e)}}},getTabIndex:function(){var me=this,el,index;if(!me.focusable){return}
el=me.getFocusEl();if(el){if(el.$isFocusableEntity){index=el.getTabIndex()}else if(el.isElement&&el.dom){index=el.dom.getAttribute('tabIndex');if(index!==null){index-=0}}else{return}}
if(typeof index!=='number'){index=me.tabIndex}
return index},setTabIndex:function(newTabIndex,focusEl){var me=this,ownerFC=me.ownerFocusableContainer,focusableIfDisabled=ownerFC&&ownerFC.allowFocusingDisabledChildren,wasFocusable=me.focusable,el;if(!wasFocusable&&!(me.forceTabIndex||newTabIndex==null)){return}
me.tabIndex=newTabIndex;if(me.destroying||me.destroyed||(me.isDisabled()&&!focusableIfDisabled)){return}
me.focusable=!0;el=focusEl||me.getFocusEl();me.focusable=wasFocusable;if(el){if(el.$isFocusableEntity){el.setTabIndex(newTabIndex)}else if(el.isElement&&el.dom){el.setTabIndex(newTabIndex)}}},onFocusEnter:function(e){var me=this;if(me.destroying||me.destroyed){return}
me.focusEnterEvent=e;me.containsFocus=!0;if(me.hasListeners.focusenter){me.fireEvent('focusenter',me,e)}},onFocusLeave:function(e){var me=this;if(me.destroying||me.destroyed){return}
me.focusEnterEvent=null;me.containsFocus=!1;if(me.hasListeners.focusleave){me.fireEvent('focusleave',me,e)}},onFocusMove:Ext.emptyFn,privates:{forceTabIndex:!1,revertFocus:function(){var me=this,focusEvent=me.focusEnterEvent,activeElement=Ext.Element.getActiveElement(),focusTarget,fromComponent,reverted;if(focusEvent&&!me.preventRefocus&&me.el.contains(activeElement)){fromComponent=focusEvent.fromComponent;if(fromComponent&&(fromComponent.destroyed||fromComponent.isDestructing())){focusTarget=document.body}else{focusTarget=focusEvent.relatedTarget}
if(focusTarget===document.body){fromComponent=me.findFocusTarget();if(fromComponent){focusTarget=fromComponent.getFocusEl()}}
if(focusTarget&&focusTarget.$isFocusableEntity){if(!focusTarget.destroyed&&focusTarget.isFocusable()){focusTarget.focus()}}else if(Ext.getDoc().contains(focusTarget)&&Ext.fly(focusTarget).isFocusable()){fromComponent=Ext.Component.from(focusTarget);if(fromComponent){fromComponent.revertFocusTo(focusTarget)}else{focusTarget.focus()}}else if(focusEvent.fromComponent&&focusEvent.fromComponent.focus){reverted=focusEvent.fromComponent.focus();if(!reverted){activeElement.blur()}}}},revertFocusTo:function(target){target.focus()},findFocusTarget:function(){var me=this,parentAxis,candidate,len,i,focusTargets,focusIndex;if(me.preventRefocus){return null}
for(parentAxis=[],candidate=me.getRefOwner();candidate;candidate=candidate.getRefOwner()){if(!candidate.isDisabled()){parentAxis.unshift(candidate)}}
for(i=0,len=parentAxis.length;i<len;i++){candidate=parentAxis[i];if(candidate.destroying||!candidate.isVisible()){parentAxis.length=i;break}}
for(i=parentAxis.length-1;i>=0;i--){candidate=parentAxis[i];focusTargets=Ext.ComponentQuery.query(':canfocus()',candidate);if(focusTargets.length){focusIndex=Ext.Array.indexOf(focusTargets,Ext.ComponentManager.getActiveComponent());return focusTargets[focusIndex+1]||focusTargets[focusIndex-1]||focusTargets[0]}
if(candidate.isFocusable&&candidate.isFocusable()){return candidate}}},initFocusableElement:function(force){var me=this,tabIndex=me.getTabIndex(),focusEl=me.getFocusEl();if(focusEl&&!focusEl.$isFocusableEntity){if(tabIndex!=null&&(force||me.canFocus(!0))){me.setTabIndex(tabIndex,focusEl)}
if(!focusEl.dom.hasAttribute('data-componentid')){focusEl.dom.setAttribute('data-componentid',me.id)}}},addFocusCls:function(e){var focusCls=this.focusCls,el;el=this.getFocusClsEl();if(focusCls){el=this.getFocusClsEl(e);if(el){el.addCls(focusCls)}}},removeFocusCls:function(e){var focusCls=this.focusCls,el;if(focusCls){el=this.getFocusClsEl(e);if(el){el.removeCls(focusCls)}}},handleFocusEvent:function(info){var me=this,event;if(!me.focusable||me.destroying||me.destroyed){return}
if(me.isFocusing(info)){event=new Ext.event.Event(info.event);event.type='focus';event.relatedTarget=info.fromElement;event.target=info.toElement;me.onFocus(event)}},handleBlurEvent:function(info){var me=this,event;if(!me.focusable||me.destroying||me.destroyed){return}
if(info.toElement===document.body||me.isBlurring(info)){event=new Ext.event.Event(info.event);event.type='blur';event.target=info.fromElement;event.relatedTarget=info.toElement;me.onBlur(event)}},isFocusing:function(e){var focusEl=this.getFocusEl();if(focusEl){if(focusEl.isFocusing){return focusEl.isFocusing(e)}else{return focusEl.dom===document.activeElement&&e.toElement===focusEl.dom&&e.fromElement!==e.toElement}}
return!1},isBlurring:function(e){var focusEl=this.getFocusEl();if(focusEl){if(focusEl.isFocusing){return focusEl.isBlurring(e)}else{return focusEl.dom!==document.activeElement&&e.fromElement===focusEl.dom&&e.fromElement!==e.toElement}}
return!1},blur:function(){var me=this,focusEl;if(!me.focusable||!me.canFocus()){return}
focusEl=me.getFocusEl();if(focusEl){me.blurring=!0;focusEl.blur();delete me.blurring}},isTabbable:function(){var me=this,focusEl;if(me.focusable){focusEl=me.getFocusEl();if(focusEl&&focusEl.isTabbable()){return focusEl.isTabbable()}}
return!1},disableTabbing:function(){var me=this,el=me.el,focusEl;if(me.destroying||me.destroyed){return}
if(el){el.saveTabbableState()}
focusEl=me.getFocusEl();if(focusEl){if(focusEl.$isFocusableEntity){focusEl.disableTabbing()}else if(focusEl.isElement&&el&&!el.contains(focusEl)){focusEl.saveTabbableState()}}},enableTabbing:function(reset){var me=this,el=me.el,focusEl;if(me.destroying||me.destroyed){return}
focusEl=me.getFocusEl();if(focusEl){if(focusEl.$isFocusableEntity){focusEl.enableTabbing()}else if(focusEl.isElement&&el&&!el.contains(focusEl)){focusEl.restoreTabbableState()}}
if(el){el.restoreTabbableState({reset:reset})}}}},function(){var keyboardModeCls=Ext.baseCSSPrefix+'keyboard-mode',keyboardMode=!1;Ext.enableKeyboardMode=Ext.isModern||!Ext.os.is.Desktop;Ext.setKeyboardMode=Ext.setKeyboardMode||function(keyboardMode){Ext.keyboardMode=keyboardMode;Ext.getBody().toggleCls(keyboardModeCls,keyboardMode)};Ext.isTouchMode=function(){return(Ext.now()-Ext.lastTouchTime)<500};Ext.syncKeyboardMode=function(e){var type;if(!Ext.enableKeyboardMode){return}
type=e.type;if(type==='pointermove'){keyboardMode=!1}else{keyboardMode=(type==='keydown');Ext.lastTouchTime=e.pointerType==='touch'&&Ext.now();Ext.setKeyboardMode(keyboardMode)}};function keyboardModeFocusHandler(){if(keyboardMode!==Ext.getBody().hasCls(keyboardModeCls)){Ext.setKeyboardMode(keyboardMode)}}
Ext.getEnableKeyboardMode=function(){return Ext.enableKeyboardMode};Ext.setEnableKeyboardMode=function(enable){var listeners={pointerdown:Ext.syncKeyboardMode,pointermove:Ext.syncKeyboardMode,keydown:Ext.syncKeyboardMode,capture:!0,delegated:!1};Ext.enableKeyboardMode=!!enable;if(Ext.enableKeyboardMode){Ext.getWin().on(listeners);Ext.on('focus',keyboardModeFocusHandler)}else{Ext.getWin().un(listeners);Ext.un('focus',keyboardModeFocusHandler)}};Ext.onReady(function(){if(!Ext.enableKeyboardMode){Ext.getBody().addCls(keyboardModeCls)}
Ext.setEnableKeyboardMode(Ext.enableKeyboardMode)})})
;
Ext.define('Ext.mixin.Accessible',{extend:'Ext.Mixin',mixinConfig:{id:'accessible'},config:{ariaAttributes:{$value:null,lazy:!0}},ariaEl:'el',privates:{getAriaLabelEl:function(reference){var ids=[],refHolder,i,len,cmp;if(reference){if(Ext.isFunction(reference)){return reference.call(this)}else{if(!Ext.isArray(reference)){reference=[reference]}
refHolder=this.lookupReferenceHolder();if(refHolder){for(i=0,len=reference.length;i<len;i++){cmp=refHolder.lookupReference(reference[i]);if(cmp){ids.push(cmp.ariaEl.id)}}}}}
return ids.length?ids.join(' '):null}}})
;
Ext.define('Ext.Widget',{extend:'Ext.Evented',xtype:'widget',alternateClassName:'Ext.Gadget',requires:['Ext.dom.Element'],mixins:['Ext.mixin.Inheritable','Ext.mixin.Bindable','Ext.mixin.ComponentDelegation','Ext.mixin.Pluggable','Ext.mixin.Keyboard','Ext.mixin.Factoryable','Ext.mixin.Focusable','Ext.mixin.Accessible'],isWidget:!0,factoryConfig:{creator:null,defaultProperty:'xtype',defaultType:'component',typeProperty:'xtype'},element:{reference:'element'},observableType:'component',cachedConfig:{cls:null,margin:null,style:null,border:null,touchAction:null,eventHandlers:{focus:'handleFocusEvent',blur:'handleBlurEvent'}},name:null,config:{renderTo:null,ui:null,userCls:null,ripple:null,hideMode:null,instanceCls:null},eventedConfig:{width:null,height:null,hidden:null,disabled:null},template:[],baseCls:null,classCls:null,classClsRoot:!0,classClsList:[],clearPropertiesOnDestroy:'async',focusEl:'element',ariaEl:'element',spaceRe:/\s+/,noBorderCls:Ext.baseCSSPrefix+'noborder-trbl',borderedCls:Ext.baseCSSPrefix+'bordered',disabledCls:Ext.baseCSSPrefix+'disabled',heightedCls:Ext.baseCSSPrefix+'heighted',widthedCls:Ext.baseCSSPrefix+'widthed',constructor:function(config){var me=this,baseCls=me.baseCls,renderTo=config&&config.renderTo,controller;me.$iid=++Ext.$nextIid;if(baseCls==null||baseCls===!0){me.baseCls=me.classCls||Ext.baseCSSPrefix+me.xtype}
if(config&&('baseCls' in config)){Ext.raise('baseCls cannot be used as an instance config. It must be specified '+'at class definition time.')}
if((config&&config.controller)||me.config.controller){me.referenceHolder=!0}
me.initId(config);me.initElement();if(renderTo){config=Ext.apply({},config);delete config.renderTo}
me.mixins.observable.constructor.call(me,config);if(me.focusable){me.initFocusableEvents(!0)}
me.syncUiCls();Ext.ComponentManager.register(me);controller=me.getController();if(controller){controller.init(me)}
if(renderTo){me.setRenderTo(renderTo)}},afterCachedConfig:function(){var me=this,prototype=me.self.prototype,referenceList=me.referenceList,renderElement=me.renderElement,renderTemplate,element,i,ln,reference,elements;prototype.renderTemplate=renderTemplate=document.createDocumentFragment();renderTemplate.appendChild(renderElement.clone(!0,!0));elements=renderTemplate.querySelectorAll('[id]');for(i=0,ln=elements.length;i<ln;i++){element=elements[i];element.removeAttribute('id')}
for(i=0,ln=referenceList.length;i<ln;i++){reference=referenceList[i];me[reference].dom.removeAttribute('reference')}},applyHidden:function(hidden){return!!hidden},applyDisabled:function(disabled){return!!disabled},updateDisabled:function(disabled){var me=this,container=me.ownerFocusableContainer;if(container){if(disabled){if(!container.beforeFocusableChildDisable.$nullFn){container.beforeFocusableChildDisable(me)}}else{if(!container.beforeFocusableChildEnable.$nullFn){container.beforeFocusableChildEnable(me)}}}
me.element.toggleCls(me.disabledCls,disabled);if(me.focusable){if(disabled){me.disableFocusable()}else{me.enableFocusable()}}
if(container){if(disabled){if(!container.onFocusableChildDisable.$nullFn){container.onFocusableChildDisable(me)}}else{if(!container.onFocusableChildEnable.$nullFn){container.onFocusableChildEnable(me)}}}},disable:function(){this.setDisabled(!0)},enable:function(){this.setDisabled(!1)},isDisabled:function(){return this.getDisabled()},isEnabled:function(){return!this.getDisabled()},applyTouchAction:function(touchAction,oldTouchAction){if(oldTouchAction!=null){touchAction=Ext.merge({},oldTouchAction,touchAction)}
return touchAction},applyWidth:function(width){return this.filterLengthValue(width)},applyHeight:function(height){return this.filterLengthValue(height)},updateBorder:function(border){var me=this;border=border||border===null;me.toggleCls(me.noBorderCls,!border);me.toggleCls(me.borderedCls,!!border)},clearListeners:function(){var me=this;me.mixins.observable.clearListeners.call(me);me.mixins.componentDelegation.clearDelegatedListeners.call(me)},destroy:function(){var me=this;me.isDestroying=me.destroying=!0;me.destroy=Ext.emptyFn;me.doDestroy();me.clearListeners();me.mixins.componentDelegation.destroyComponentDelegation.call(me);me.callParent()},doDestroy:function(){var me=this,referenceList=me.referenceList,container=me.ownerFocusableContainer,i,ln,reference;me.ownerCmp=null;if(container&&!container.onFocusableChildDestroy.$nullFn){container.onFocusableChildDestroy(me)}
for(i=0,ln=referenceList.length;i<ln;i++){reference=referenceList[i];if(me.hasOwnProperty(reference)){me[reference].destroy();me[reference]=null}}
me.destroyBindable();Ext.ComponentManager.unregister(me)},doFireEvent:function(eventName,args,bubbles){var me=this,ev,ret;ret=me.mixins.observable.doFireEvent.call(me,eventName,args,bubbles);if(ret!==!1&&!me.destroyed){ev=me.events[eventName];if(!ev||!ev.suspended){ret=me.mixins.componentDelegation.doFireDelegatedEvent.call(me,eventName,args)}}
return ret},getBubbleTarget:function(){return this.getRefOwner()},getElementConfig:function(){var me=this,el=me.element;if(!('children' in el)){el=Ext.apply({children:me.getTemplate()},el)}
return el},getSize:function(){return this.el.getSize()},getTemplate:function(){return Ext.clone(this.template)},getClassCls:function(){var proto=this.self.prototype,prototype=proto,classes,classCls,i,ln;while(prototype){classCls=prototype.hasOwnProperty('classCls')?prototype.classCls:null;if(classCls){if(classCls instanceof Array){for(i=0,ln=classCls.length;i<ln;i++){(classes||(classes=[])).push(classCls[i])}}else{(classes||(classes=[])).push(classCls)}}
if(prototype.classClsRoot&&prototype.hasOwnProperty('classClsRoot')){break}
prototype=prototype.superclass}
if(classes){proto.classClsList=classes}
return classes},hide:function(){this.setHidden(!0)},initElement:function(){var me=this,prototype=me.self.prototype,id=me.getId(),referenceList=me.referenceList=me.referenceList=[],isFirstInstance=!prototype.hasOwnProperty('renderTemplate'),uiReferences=prototype.hasOwnProperty('uiReferences')?prototype.uiReferences:(prototype.uiReferences={element:''}),renderTemplate,renderElement,renderConfig,element,referenceNodes,i,ln,referenceNode,reference,classCls,uiCls,baseCls,referenceElement;if(isFirstInstance){renderTemplate=document.createDocumentFragment();renderConfig=me.processElementConfig.call(prototype);renderElement=Ext.Element.create(renderConfig,!0);renderTemplate.appendChild(renderElement);referenceNodes=renderTemplate.querySelectorAll('[uiCls]');for(i=0,ln=referenceNodes.length;i<ln;i++){referenceNode=referenceNodes[i];reference=referenceNode.getAttribute('reference');uiCls=referenceNode.getAttribute('uiCls');if(!reference){Ext.raise('Cannot render element with uiCls="'+uiCls+'". uiCls is only allowed on elements that have a reference name.')}
uiReferences[reference]=uiCls;referenceNode.removeAttribute('uiCls')}}else{renderTemplate=me.renderTemplate.cloneNode(!0);renderElement=renderTemplate.firstChild}
referenceNodes=renderTemplate.querySelectorAll('[reference]');for(i=0,ln=referenceNodes.length;i<ln;i++){referenceNode=referenceNodes[i];reference=referenceNode.getAttribute('reference');if(!isFirstInstance){referenceNode.removeAttribute('reference')}
if(reference==='element'){if(element){Ext.raise("Duplicate 'element' reference detected in '"+me.$className+"' template.")}
referenceNode.id=id;element=me.el=me.addElementReference(reference,referenceNode);element.dom.setAttribute('data-componentid',id);if(isFirstInstance){classCls=me.getClassCls();if(classCls){element.addCls(classCls)}
baseCls=me.baseCls;if(baseCls&&(baseCls!==me.classCls)){element.addCls(baseCls)}}}else{uiCls=uiReferences[reference];if(uiCls&&isFirstInstance){referenceElement=me.addElementReference(reference,referenceNode);me.initUiReference(reference,uiCls,!1)}else{me.addElementReferenceOnDemand(reference,referenceNode)}}
if(reference===me.focusEl){me.addElementReference('focusEl',referenceNode)}
if(reference===me.ariaEl){me.addElementReferenceOnDemand('ariaEl',referenceNode)}
referenceList.push(reference)}
if(!element){Ext.raise("No 'element' reference found in '"+me.$className+"' template.")}
if(renderElement===element.dom){me.renderElement=element}else{me.addElementReferenceOnDemand('renderElement',renderElement)}
renderElement.setAttribute(me.dataXid,me.$iid)},dataXid:'data-'+Ext.baseCSSPrefix.substr(0,Ext.baseCSSPrefix.length-1)+'id',is:function(selector){return Ext.ComponentQuery.is(this,selector)},isHidden:function(deep){var hidden=!!this.getHidden(),owner;if(!hidden&&deep){owner=this.getRefOwner();while(owner&&owner!==deep&&!hidden){hidden=!!owner.getHidden();owner=owner.getRefOwner()}}
return hidden},isVisible:function(deep){return this.rendered&&!this.destroyed&&!this.isHidden(deep)},isXType:function(xtype,shallow){return shallow?(Ext.Array.indexOf(this.xtypes,xtype)!==-1):!!this.xtypesMap[xtype]},lookupTpl:function(name){return Ext.XTemplate.getTpl(this,name)},owns:function(element){var result=!1,cmp;if(element.isEvent){element=element.target}else if(element.isElement){element=element.dom}
cmp=Ext.Component.from(element);if(cmp){result=(cmp===this)||(!!cmp.up(this))}
return result},render:function(container,insertBeforeElement){if(container&&container.isWidget){container=container.el}
var dom=this.renderElement.dom,containerDom=Ext.getDom(container),insertBeforeChildDom;if(Ext.isNumber(insertBeforeChildDom)){insertBeforeElement=containerDom.childNodes[insertBeforeElement]}
insertBeforeChildDom=Ext.getDom(insertBeforeElement);if(containerDom){if(insertBeforeChildDom){containerDom.insertBefore(dom,insertBeforeChildDom)}else{containerDom.appendChild(dom)}
this.setRendered(Ext.getBody().contains(dom),!0)}},toggleCls:function(className,state){this.element.toggleCls(className,state);return this},resolveListenerScope:function(defaultScope,skipThis){return this.mixins.inheritable.resolveListenerScope.call(this,defaultScope,skipThis)},setSize:function(width,height){if(width&&typeof width==='object'){return this.setSize(width.width,width.height)}
if(width!==undefined){this.setWidth(width)}
if(height!==undefined){this.setHeight(height)}},show:function(){this.setHidden(!1)},addCls:function(cls,prefix,suffix){if(!this.destroyed){this.el.replaceCls(null,cls,prefix,suffix)}},applyCls:function(cls){return cls&&Ext.dom.Element.splitCls(cls)},applyUi:function(ui){return this.parseUi(ui,!0)},removeCls:function(cls,prefix,suffix){if(!this.destroyed){this.el.replaceCls(cls,null,prefix,suffix)}},replaceCls:function(oldCls,newCls,prefix,suffix){if(!this.destroyed){this.el.replaceCls(oldCls,newCls,prefix,suffix)}},hasCls:function(className){return this.el.hasCls(className)},updateCls:function(newCls,oldCls){this.element.replaceCls(oldCls,newCls)},updateHidden:function(hidden){var me=this,element=me.renderElement,container=me.ownerFocusableContainer;if(container){if(hidden){if(!container.beforeFocusableChildHide.$nullFn){container.beforeFocusableChildHide(me)}}else{if(!container.beforeFocusableChildShow.$nullFn){container.beforeFocusableChildShow(me)}}}else if(hidden){me.revertFocus()}
if(element&&!element.destroyed){if(hidden){element.hide()}else{element.show()}}
if(me.focusableContainer&&me.activateFocusableContainer){me.activateFocusableContainer(!hidden)}
if(container){if(hidden){if(!container.onFocusableChildHide.$nullFn){container.onFocusableChildHide(me)}}else{if(!container.onFocusableChildShow.$nullFn){container.onFocusableChildShow(me)}}}},updateMargin:function(margin){this.element.setMargin(margin)},updateRipple:function(ripple){var me=this,el=me.el;if(el){el.un('touchstart','onRippleStart',me);el.un('touchend','onRippleStart',me);el.destroyAllRipples();if(ripple.release){el.on('touchend','onRippleStart',me)}else{el.on('touchstart','onRippleStart',me)}}},shouldRipple:function(e){var me=this,disabled=me.getDisabled&&me.getDisabled(),el=me.el,ripple=!disabled&&me.getRipple(),target;if(ripple&&e){target=e.getTarget(me.noRippleSelector);if(target){if((el.dom===target)||el.contains(target)){ripple=null}}}
return ripple},onRippleStart:function(e){var ripple=this.shouldRipple(e);if(e.button===0&&ripple){this.el.ripple(e,ripple)}},applyStyle:function(style,oldStyle){if(oldStyle&&style===oldStyle&&Ext.isObject(oldStyle)){style=Ext.apply({},style)}
this.element.applyStyles(style);return null},getStyle:function(){Ext.Error.raise("'style' is a write-only config. To query element styles use "+"the Ext.dom.Element API.")},updateRenderTo:function(newContainer){this.render(newContainer)},updateTouchAction:function(touchAction){var name,childEl,value,hasRootActions;for(name in touchAction){childEl=this[name];value=touchAction[name];if(childEl&&childEl.isElement){childEl.setTouchAction(value)}else{hasRootActions=!0}}
if(hasRootActions){this.el.setTouchAction(touchAction)}},updateUi:function(){if(!this.isConfiguring){this.syncUiCls()}},updateWidth:function(width){var el=this.el;el.setWidth(width);el.toggleCls(this.widthedCls,width!=null&&width!=='auto')},updateHeight:function(height){var el=this.el;el.setHeight(height);el.toggleCls(this.heightedCls,height!=null&&height!=='auto')},isWidthed:function(){var width=this.getWidth();return width!=null&&width!=='auto'},isHeighted:function(){var height=this.getHeight();return height!=null&&height!=='auto'},up:function(selector,limit){var result=this.getRefOwner(),limitSelector=typeof limit==='string',limitCount=typeof limit==='number',limitComponent=limit&&limit.isComponent,steps=0;if(selector){for(;result;result=result.getRefOwner()){if(result.destroyed){return null}
steps++;if(selector.isComponent||selector.isWidget){if(result===selector){return result}}else{if(Ext.ComponentQuery.is(result,selector)){return result}}
if(limitSelector&&result.is(limit)){return}
if(limitCount&&steps===limit){return}
if(limitComponent&&result===limit){return}}}
return result},updateLayout:Ext.emptyFn,updateInstanceCls:function(instanceCls,oldInstanceCls){var me=this,el=me.el,classClsList=me.classClsList,Array=Ext.Array,uiReferences=me.uiReferences,referenceName,referenceElement,i,ln,cls,uiCls;if(oldInstanceCls){el.removeCls(oldInstanceCls);oldInstanceCls=Array.from(oldInstanceCls);for(i=0,ln=oldInstanceCls.length;i<ln;i++){cls=oldInstanceCls[i];Array.remove(classClsList,cls);for(referenceName in uiReferences){referenceElement=me[referenceName];uiCls=uiReferences[referenceName];referenceElement.removeCls(cls+'-'+uiCls)}}}
if(instanceCls){el.addCls(instanceCls);instanceCls=Array.from(instanceCls);me.classClsList=classClsList.concat(instanceCls);for(i=0,ln=instanceCls.length;i<ln;i++){cls=instanceCls[i];for(referenceName in uiReferences){referenceElement=me[referenceName];uiCls=uiReferences[referenceName];referenceElement.addCls(cls+'-'+uiCls)}}}
if(!me.isConfiguring){me.syncUiCls()}},getBaseCls:function(){return this.baseCls},setBaseCls:function(){Ext.raise('baseCls cannot be reconfigured. It must be specified at class definition time.')},onClassExtended:function(Class,members){if(members.config&&members.config.baseCls){Ext.raise('baseCls must be declared directly on the class body. Please move it '+'outside of the config block.')}},privates:{_hideModes:{clip:'CLIP',display:'DISPLAY',offsets:'OFFSETS',opacity:'OPACITY',visibility:'VISIBILITY'},noRippleSelector:'.'+Ext.baseCSSPrefix+'no-ripple',addElementReferenceOnDemand:function(name,domNode){if(this._elementListeners[name]){this.addElementReference(name,domNode)}else{Ext.Object.defineProperty(this,name,{get:function(){if(this.destroyed){return null}
delete this[name];return this.addElementReference(name,domNode)},configurable:!0})}},addElementReference:function(name,domNode){var me=this,referenceEl=me[name]=Ext.get(domNode),listeners=me._elementListeners[name],eventName,listener;referenceEl.skipGarbageCollection=!0;referenceEl.component=me;if(listeners){listeners=Ext.clone(listeners);for(eventName in listeners){listener=listeners[eventName];if(typeof listener==='object'){listener.scope=me}}
listeners.scope=me;referenceEl.on(listeners)}
return referenceEl},detachFromBody:function(){Ext.getDetachedBody().appendChild(this.element,!0);this.isDetached=!0},reattachToBody:function(){var detachedBody;if(this.isDetached){detachedBody=Ext.getDetachedBody();if(detachedBody.contains(this.element)){Ext.getBody().appendChild(this.element,!0)}}
this.isDetached=!1},doAddListener:function(name,fn,scope,options,order,caller,manager){var me=this,elementName=options&&options.element,delegate=options&&options.delegate,listeners,eventOptions,option;if(elementName){if(Ext.Array.indexOf(me.referenceList,elementName)===-1){Ext.Logger.error("Adding event listener with an invalid element reference of '"+elementName+"' for this component. Available values are: '"+me.referenceList.join("', '")+"'",me)}
listeners={};listeners[name]=fn;if(scope){listeners.scope=scope}
eventOptions=Ext.Element.prototype.$eventOptions;for(option in options){if(eventOptions[option]){listeners[option]=options[option]}}
me.mon(me[elementName],listeners);return}else if(delegate){me.mixins.componentDelegation.addDelegatedListener.call(me,name,fn,scope,options,order,caller,manager);return}
me.callParent([name,fn,scope,options,order,caller,manager])},doRemoveListener:function(eventName,fn,scope){var me=this;me.mixins.observable.doRemoveListener.call(me,eventName,fn,scope);me.mixins.componentDelegation.removeDelegatedListener.call(me,eventName,fn,scope)},filterLengthValue:function(value){if(!value&&value!==0){return null}
return value},initElementListeners:function(elementConfig){var prototype=this,superPrototype=prototype.self.superclass,superElementListeners=superPrototype._elementListeners,reference=elementConfig.reference,children=elementConfig.children,elementListeners,listeners,superListeners,ln,i;if(prototype.hasOwnProperty('_elementListeners')){elementListeners=prototype._elementListeners}else{elementListeners=prototype._elementListeners=(superElementListeners?Ext.Object.chain(superElementListeners):{})}
if(reference){listeners=elementConfig.listeners;if(listeners){if(superElementListeners){superListeners=superElementListeners[reference];if(superListeners){listeners=Ext.Object.chain(superListeners);Ext.apply(listeners,elementConfig.listeners)}}
elementListeners[reference]=listeners;elementConfig.listeners=null}}
if(children){for(i=0,ln=children.length;i<ln;i++){prototype.initElementListeners(children[i])}}},initId:function(config){var me=this,defaultConfig=me.config,id=(config&&config.id)||(defaultConfig&&defaultConfig.id);if(id){me.setId(id);me.id=id}else{me.getId()}},measure:function(dimension){return this.element.measure(dimension)},processElementConfig:function(){var prototype=this,superPrototype=prototype.self.superclass,elementConfig;if(prototype.hasOwnProperty('_elementConfig')){elementConfig=prototype._elementConfig}else{elementConfig=prototype._elementConfig=prototype.getElementConfig();if(superPrototype.isWidget){prototype.processElementConfig.call(superPrototype)}
prototype.initElementListeners(elementConfig)}
return elementConfig},parseUi:function(ui,asString){ui=Ext.String.splitWords(ui);if(asString){ui=ui.join(' ')}
return ui},addUi:function(ui){this.setUi(this.doAddUi(ui,this.getUi()))},doAddUi:function(ui,oldUi){var me=this,newUi=null,i,u,len;if(ui){ui=me.parseUi(ui);len=ui.length;oldUi=me.parseUi(oldUi);for(i=0;i<len;i++){u=ui[i];if(Ext.Array.indexOf(oldUi,u)===-1){oldUi.push(u)}}
newUi=oldUi.join(' ')}
return newUi},removeUi:function(ui){this.setUi(this.doRemoveUi(ui,this.getUi()))},doRemoveUi:function(ui,oldUi){var me=this,newUi=null,i,u,index,len;if(ui){ui=me.parseUi(ui);len=ui.length;oldUi=me.parseUi(oldUi);for(i=0;i<len;i++){u=ui[i];index=Ext.Array.indexOf(oldUi,u);if(index!==-1){oldUi.splice(index,1)}}
newUi=oldUi.join(' ')}
return newUi},initUiReference:function(referenceName,uiCls,isInstance){var me=this,referenceElement=me[referenceName],baseCls=me.baseCls,classClsList=me.classClsList,cls=[],i,n;isInstance=(isInstance!==!1);if(isInstance){if(!me.hasOwnProperty('uiReferences')){me.uiReferences=Ext.clone(me.uiReferences)}
me.uiReferences[referenceName]=uiCls}
uiCls='-'+uiCls;if(baseCls&&(baseCls!==me.classCls)){cls.push(baseCls+uiCls)}
if(classClsList){for(i=0,n=classClsList.length;i<n;i++){cls.push(classClsList[i]+uiCls)}}
referenceElement.addCls(cls);if(isInstance&&!me.isConfiguring){me.syncUiCls()}},syncUiCls:function(refs){var me=this,ui=me.getUi(),currentUiCls=me.currentUiCls||(me.currentUiCls={}),baseCls=me.baseCls,uiReferences=refs||me.uiReferences,classClsList=me.classClsList,classClsListLen=classClsList?classClsList.length:0,uiCls,uiLen,refName,refEl,cls,suffix,uiSuffix,i,j;if(ui){ui=me.parseUi(ui);uiLen=ui.length}
for(refName in uiReferences){refEl=me[refName];uiCls=[];if(refEl){cls=currentUiCls[refName];if(cls){refEl.removeCls(cls)}
if(ui){suffix=uiReferences[refName];suffix=suffix?('-'+suffix):'';for(i=0;i<uiLen;i++){uiSuffix='-'+ui[i]+suffix;if(baseCls&&(baseCls!==me.classCls)){uiCls.push(baseCls+uiSuffix)}
if(classClsList){for(j=0;j<classClsListLen;j++){uiCls.push(classClsList[j]+uiSuffix)}}}
refEl.addCls(uiCls);currentUiCls[refName]=uiCls}}}},applyHideMode:function(mode){return mode||'display'},updateHideMode:function(mode){var me=this,el=me.el,shouldToggle=me.getHidden();if(!me._hideModes[mode]){Ext.raise('Invalid hideMode: "'+mode+'" (must be one of: "'+Object.keys(me._hideModes).join('", "')+'")')}
if(shouldToggle){el.show()}
me.renderElement.setVisibilityMode(Ext.Element[me._hideModes[mode]]);if(shouldToggle){el.hide()}},updateUserCls:function(newCls,oldCls){this.element.replaceCls(oldCls,newCls)}}},function(Widget){var prototype=Widget.prototype;(prototype.$elementEventOptions=Ext.Object.chain(Ext.Element.prototype.$eventOptions)).element=1;(prototype.$eventOptions=Ext.Object.chain(prototype.$eventOptions)).delegate=1;Ext.updateWidget=Ext.Factory.widget.update})
;
Ext.define('Ext.overrides.Widget',{override:'Ext.Widget',uses:['Ext.Component','Ext.layout.component.Auto'],$configStrict:!1,isComponent:!0,liquidLayout:!0,rendered:!0,rendering:!0,config:{renderTo:null},constructor:function(config){var me=this,renderTo;me.callParent([config]);me.getComponentLayout();renderTo=me.getRenderTo();if(renderTo){me.render(renderTo)}},addClsWithUI:function(cls){this.el.addCls(cls)},afterComponentLayout:Ext.emptyFn,updateLayout:function(){var owner=this.getRefOwner();if(owner){owner.updateLayout()}},destroy:function(){var me=this,ownerCt=me.ownerCt;if(ownerCt&&ownerCt.remove){ownerCt.remove(me,!1)}
me.callParent()},finishRender:function(){this.rendering=!1;this.initBindable();this.initKeyMap()},getAnimationProps:function(){return{}},getComponentLayout:function(){var me=this,layout=me.componentLayout;if(!layout){layout=me.componentLayout=new Ext.layout.component.Auto();layout.setOwner(me)}
return layout},getEl:function(){return this.element},getTdCls:function(){return Ext.baseCSSPrefix+this.getTdType()+'-'+(this.ui||'default')+'-cell'},getTdType:function(){return this.xtype},getItemId:function(){return this.itemId||this.id},getSizeModel:function(){return Ext.Component.prototype.getSizeModel.apply(this,arguments)},onAdded:function(container,pos,instanced){var me=this;me.ownerCt=container;me.onInheritedAdd(me,instanced);me.isDetached=!1},onRemoved:function(destroying){this.onInheritedRemove(destroying);this.ownerCt=this.ownerLayout=null},parseBox:function(box){return Ext.Element.parseBox(box)},removeClsWithUI:function(cls){this.el.removeCls(cls)},render:function(container,position){var me=this,element=me.element,proto=Ext.Component.prototype,nextSibling;if(!me.ownerCt||me.floating){if(Ext.scopeCss){element.addCls(proto.rootCls)}
element.addCls(proto.borderBoxCls)}
if(position){nextSibling=container.childNodes[position];if(nextSibling){Ext.fly(container).insertBefore(element,nextSibling);return}}
Ext.fly(container).appendChild(element);me.finishRender()},setPosition:function(x,y){this.el.setLocalXY(x,y)},up:function(){return Ext.Component.prototype.up.apply(this,arguments)},isAncestor:function(){return Ext.Component.prototype.isAncestor.apply(this,arguments)},onFocusEnter:function(){return Ext.Component.prototype.onFocusEnter.apply(this,arguments)},onFocusLeave:function(){return Ext.Component.prototype.onFocusLeave.apply(this,arguments)},isLayoutChild:function(candidate){var ownerCt=this.ownerCt;return ownerCt?(ownerCt===candidate||ownerCt.isLayoutChild(candidate)):!1},privates:{doAddListener:function(name,fn,scope,options,order,caller,manager){if(name==='painted'||name==='resize'){this.element.doAddListener(name,fn,scope||this,options,order)}
this.callParent([name,fn,scope,options,order,caller,manager])},doRemoveListener:function(name,fn,scope){if(name==='painted'||name==='resize'){this.element.doRemoveListener(name,fn,scope)}
this.callParent([name,fn,scope])}}},function(Cls){var prototype=Cls.prototype;if(Ext.isIE9m){prototype.addElementReferenceOnDemand=prototype.addElementReference}})
;
Ext.define('Ext.mixin.Responsive',function(Responsive){return{extend:'Ext.Mixin',mixinConfig:{id:'responsive',after:{destroy:'destroy'}},config:{responsiveConfig:{$value:undefined,merge:function(newValue,oldValue,target,mixinClass){var marker,entry,ret,rule;if(!newValue){return oldValue}
ret=oldValue?Ext.Object.chain(oldValue):{};marker=Responsive.context;for(rule in newValue){if(!mixinClass||!(rule in ret)){entry=newValue[rule];if(entry.fn!==marker){entry={fn:marker,config:entry}}
ret[rule]=entry}}
return ret}},responsiveFormulas:{$value:null,merge:function(newValue,oldValue,target,mixinClass){return this.mergeNew(newValue,oldValue,target,mixinClass)}}},destroy:function(){Responsive.unregister(this)},privates:{statics:{active:!1,all:{},_configNames:['responsiveConfig','responsiveFormulas'],context:Ext.Object.chain(Ext.platformTags),count:0,nextId:0,activate:function(){Responsive.active=!0;Responsive.updateContext();Ext.on('resize',Responsive.onResize,Responsive)},deactivate:function(){Responsive.active=!1;Ext.un('resize',Responsive.onResize,Responsive)},notify:function(){var all=Responsive.all,context=Responsive.context,timer=Responsive.timer,id;if(timer){Responsive.timer=Ext.unasap(timer)}
Responsive.updateContext();Ext.suspendLayouts();Ext.fireEvent('beforeresponsiveupdate',context);for(id in all){all[id].setupResponsiveContext()}
Ext.fireEvent('beginresponsiveupdate',context);for(id in all){all[id].updateResponsiveState()}
Ext.fireEvent('responsiveupdate',context);Ext.resumeLayouts(!0)},onResize:function(){if(!Responsive.timer){Responsive.timer=Ext.asap(Responsive.onTimer)}},onTimer:function(){Responsive.timer=null;Responsive.notify()},register:function(responder){var id=responder.$responsiveId;if(!id){responder.$responsiveId=id=++Responsive.nextId;Responsive.all[id]=responder;if(++Responsive.count===1){Responsive.activate()}}},unregister:function(responder){var id=responder.$responsiveId;if(id in Responsive.all){responder.$responsiveId=null;delete Responsive.all[id];if(--Responsive.count===0){Responsive.deactivate()}}},updateContext:function(){var El=Ext.Element,width=El.getViewportWidth(),height=El.getViewportHeight(),context=Responsive.context;context.width=width;context.height=height;context.tall=width<height;context.wide=!context.tall;context.landscape=context.portrait=!1;if(!context.platform){context.platform=Ext.platformTags}
context[Ext.dom.Element.getOrientation()]=!0}},afterClassMixedIn:function(targetClass){var proto=targetClass.prototype,responsiveConfig=proto.responsiveConfig,responsiveFormulas=proto.responsiveFormulas,config;if(responsiveConfig||responsiveFormulas){config={};if(responsiveConfig){delete proto.responsiveConfig;config.responsiveConfig=responsiveConfig}
if(responsiveFormulas){delete proto.responsiveFormulas;config.responsiveFormulas=responsiveFormulas}
targetClass.getConfigurator().add(config)}
targetClass.addConfigTransform('transformResponsiveConfig',10)},applyResponsiveConfig:function(rules){var rule;for(rule in rules){rules[rule].fn=Ext.createRuleFn(rule)}
return rules},applyResponsiveFormulas:function(formulas){var fn,name,ret;if(formulas){ret={};for(name in formulas){if(Ext.isString(fn=formulas[name])){fn=Ext.createRuleFn(fn)}
ret[name]=fn}}
return ret},getResponsiveState:function(){var context=Responsive.context,rules=this.getResponsiveConfig(),entry,ret,rule;if(rules){ret={};for(rule in rules){entry=rules[rule];if(entry.fn.call(this,context)){Ext.merge(ret,entry.config)}}}
return ret},setupResponsiveContext:function(){var formulas=this.getResponsiveFormulas(),context=Responsive.context,name;if(formulas){for(name in formulas){context[name]=formulas[name].call(this,context)}}},transformResponsiveConfig:function(instanceConfig,configurator){var me=this,ret=instanceConfig,state;if(configurator.hoistConfigs(me,instanceConfig,Responsive._configNames)){Responsive.register(me);me.setupResponsiveContext();state=me.getResponsiveState();if(state){ret=Ext.merge({},instanceConfig,state);delete ret.responsiveConfig;delete ret.responsiveFormulas}}
return ret},updateResponsiveState:function(){var config=this.getResponsiveState();this.setConfig(config)}}}})
;
Ext.define('Ext.ResponsiveWidget',{override:'Ext.Widget',mixins:['Ext.mixin.Responsive']})
;
Ext.define('Ext.ProgressBase',{mixinId:'progressbase',config:{value:0,textTpl:null},applyTextTpl:function(textTpl){if(!textTpl.isTemplate){textTpl=new Ext.XTemplate(textTpl)}
return textTpl},applyValue:function(value){return value||0}})
;
Ext.define('Ext.Progress',{extend:'Ext.Gadget',xtype:['progress','progressbarwidget'],alternateClassName:'Ext.ProgressBarWidget',mixins:['Ext.ProgressBase'],config:{text:null,animate:!1},cachedConfig:{textCls:Ext.baseCSSPrefix+'progress-text',cls:null},baseCls:Ext.baseCSSPrefix+'progress',template:[{reference:'backgroundEl'},{reference:'barEl',cls:Ext.baseCSSPrefix+'progress-bar',children:[{reference:'textEl'}]}],defaultBindProperty:'value',updateCls:function(cls,oldCls){var el=this.element;if(oldCls){el.removeCls(oldCls)}
if(cls){el.addCls(cls)}},updateUi:function(ui,oldUi){var element=this.element,barEl=this.barEl,baseCls=this.baseCls+'-';this.callParent([ui,oldUi]);if(oldUi){element.removeCls(baseCls+oldUi);barEl.removeCls(baseCls+'bar-'+oldUi)}
element.addCls(baseCls+ui);barEl.addCls(baseCls+'bar-'+ui)},updateTextCls:function(textCls){this.backgroundEl.addCls(textCls+' '+textCls+'-back');this.textEl.addCls(textCls)},updateValue:function(value,oldValue){var me=this,textTpl=me.getTextTpl();if(textTpl){me.setText(textTpl.apply({value:value,percent:Math.round(value*100)}))}
if(!me.isConfiguring&&me.getAnimate()){me.stopBarAnimation();me.startBarAnimation(Ext.apply({from:{width:(oldValue*100)+'%'},to:{width:(value*100)+'%'}},me.animate))}else{me.barEl.setStyle('width',(value*100)+'%')}},updateText:function(text){this.backgroundEl.setHtml(text);this.textEl.setHtml(text)},doDestroy:function(){this.stopBarAnimation();this.callParent()},privates:{startBarAnimation:Ext.privateFn,stopBarAnimation:Ext.privateFn}})
;
Ext.define('Ext.overrides.Progress',{override:'Ext.Progress',config:{ui:'default'},updateWidth:function(width,oldWidth){var me=this;me.callParent([width,oldWidth]);width-=me.element.getBorderWidth('lr');me.backgroundEl.setWidth(width);me.textEl.setWidth(width)},privates:{startBarAnimation:function(o){this.barEl.animate(o)},stopBarAnimation:function(){this.barEl.stopAnimation()}}})
;
Ext.define('Ext.util.Format',function(){var me;return{requires:['Ext.Error','Ext.Number','Ext.String','Ext.Date'],singleton:!0,defaultDateFormat:'m/d/Y',thousandSeparator:',',decimalSeparator:'.',currencyPrecision:2,currencySign:'$',currencySpacer:'',percentSign:'%',currencyAtEnd:!1,stripTagsRe:/<\/?[^>]+>/gi,stripScriptsRe:/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe:/\r?\n/g,hashRe:/#+$/,allHashes:/^#+$/,formatPattern:/[\d,.#]+/,formatCleanRe:/[^\d.#]/g,I18NFormatCleanRe:null,formatFns:{},constructor:function(){me=this},nbsp:function(value,strict){strict=strict!==!1;if(strict?value===''||value==null:!value){value='\xA0'}
return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==''?value:defaultValue},substr:'ab'.substr(-1)!=='b'?function(value,start,length){var str=String(value);return(start<0)?str.substr(Math.max(str.length+start,0),length):str.substr(start,length)}:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},usMoney:function(value){return me.currency(value,'$',2)},currency:function(value,currencySign,decimals,end,currencySpacer){var negativeSign='',format=",0",i=0;value=value-0;if(value<0){value=-value;negativeSign='-'}
decimals=Ext.isDefined(decimals)?decimals:me.currencyPrecision;format+=(decimals>0?'.':'');for(;i<decimals;i++){format+='0'}
value=me.number(value,format);if(currencySpacer==null){currencySpacer=me.currencySpacer}
if((end||me.currencyAtEnd)===!0){return Ext.String.format("{0}{1}{2}{3}",negativeSign,value,currencySpacer,currencySign||me.currencySign)}else{return Ext.String.format("{0}{1}{2}{3}",negativeSign,currencySign||me.currencySign,currencySpacer,value)}},date:function(value,format){if(!value){return""}
if(!Ext.isDate(value)){value=new Date(Date.parse(value))}
return Ext.Date.dateFormat(value,format||Ext.Date.defaultFormat)},dateRenderer:function(format){return function(v){return me.date(v,format)}},hex:function(value,digits){var s=parseInt(value||0,10).toString(16);if(digits){if(digits<0){digits=-digits;if(s.length>digits){s=s.substring(s.length-digits)}}
while(s.length<digits){s='0'+s}}
return s},or:function(value,orValue){return value||orValue},pick:function(value,firstValue,secondValue){var ret;if(Ext.isNumber(value)){ret=arguments[value+1];if(ret){return ret}}
return value?secondValue:firstValue},lessThanElse:function(value,threshold,below,above,equal){var v=Ext.Number.from(value,0),t=Ext.Number.from(threshold,0),missing=!Ext.isDefined(equal);return v<t?below:(v>t?above:(missing?above:equal))},sign:function(value,negative,positive,zero){if(zero===undefined){zero=positive}
return me.lessThanElse(value,0,negative,positive,zero)},stripTags:function(value){return!value?value:String(value).replace(me.stripTagsRe,"")},stripScripts:function(value){return!value?value:String(value).replace(me.stripScriptsRe,"")},fileSize:(function(){var byteLimit=1024,kbLimit=1048576,mbLimit=1073741824;return function(size){var out;if(size<byteLimit){if(size===1){out='1 byte'}else{out=size+' bytes'}}else if(size<kbLimit){out=(Math.round(((size*10)/byteLimit))/10)+' KB'}else if(size<mbLimit){out=(Math.round(((size*10)/kbLimit))/10)+' MB'}else{out=(Math.round(((size*10)/mbLimit))/10)+' GB'}
return out}})(),math:(function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=Ext.functionFactory('v','return v '+a+';')}
return fns[a](v)}}()),round:function(value,precision){var result=Number(value);if(typeof precision==='number'){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}else if(precision===undefined){result=Math.round(result)}
return result},number:function(v,formatString){var formatFn;if(!formatString){return v}
if(isNaN(v)){return''}
formatFn=me.formatFns[formatString];if(!formatFn){var originalFormatString=formatString,comma=me.thousandSeparator,decimalSeparator=me.decimalSeparator,precision=0,trimPart='',hasComma,splitFormat,extraChars,trimTrailingZeroes,code,len;if(formatString.substr(formatString.length-2)==='/i'){if(!me.I18NFormatCleanRe||me.lastDecimalSeparator!==decimalSeparator){me.I18NFormatCleanRe=new RegExp('[^\\d\\'+decimalSeparator+'#]','g');me.lastDecimalSeparator=decimalSeparator}
formatString=formatString.substr(0,formatString.length-2);hasComma=formatString.indexOf(comma)!==-1;splitFormat=formatString.replace(me.I18NFormatCleanRe,'').split(decimalSeparator)}else{hasComma=formatString.indexOf(',')!==-1;splitFormat=formatString.replace(me.formatCleanRe,'').split('.')}
extraChars=formatString.replace(me.formatPattern,'');if(splitFormat.length>2){Ext.raise({sourceClass:"Ext.util.Format",sourceMethod:"number",value:v,formatString:formatString,msg:"Invalid number format, should have no more than 1 decimal"})}else if(splitFormat.length===2){precision=splitFormat[1].length;trimTrailingZeroes=splitFormat[1].match(me.hashRe);if(trimTrailingZeroes){len=trimTrailingZeroes[0].length;trimPart='trailingZeroes=new RegExp(Ext.String.escapeRegex(utilFormat.decimalSeparator) + "*0{0,'+len+'}$")'}}
code=['var utilFormat=Ext.util.Format,extNumber=Ext.Number,neg,absVal,fnum,parts'+(hasComma?',thousandSeparator,thousands=[],j,n,i':'')+(extraChars?',formatString="'+formatString+'",formatPattern=/[\\d,\\.#]+/':'')+',trailingZeroes;'+'return function(v){'+'if(typeof v!=="number"&&isNaN(v=extNumber.from(v,NaN)))return"";'+'neg=v<0;','absVal=Math.abs(v);','fnum=Ext.Number.toFixed(absVal, '+precision+');',trimPart,';'];if(hasComma){if(precision){code[code.length]='parts=fnum.split(".");';code[code.length]='fnum=parts[0];'}
code[code.length]='if(absVal>=1000) {';code[code.length]='thousandSeparator=utilFormat.thousandSeparator;'+'thousands.length=0;'+'j=fnum.length;'+'n=fnum.length%3||3;'+'for(i=0;i<j;i+=n){'+'if(i!==0){'+'n=3;'+'}'+'thousands[thousands.length]=fnum.substr(i,n);'+'}'+'fnum=thousands.join(thousandSeparator);'+'}';if(precision){code[code.length]='fnum += utilFormat.decimalSeparator+parts[1];'}}else if(precision){code[code.length]='if(utilFormat.decimalSeparator!=="."){'+'parts=fnum.split(".");'+'fnum=parts[0]+utilFormat.decimalSeparator+parts[1];'+'}'}
code[code.length]='if(neg&&fnum!=="'+(precision?'0.'+Ext.String.repeat('0',precision):'0')+'") { fnum="-"+fnum; }';if(trimTrailingZeroes){code[code.length]='fnum=fnum.replace(trailingZeroes,"");'}
code[code.length]='return ';if(extraChars){code[code.length]='formatString.replace(formatPattern, fnum);'}else{code[code.length]='fnum;'}
code[code.length]='};';formatFn=me.formatFns[originalFormatString]=Ext.functionFactory('Ext',code.join(''))(Ext)}
return formatFn(v)},numberRenderer:function(format){return function(v){return me.number(v,format)}},percent:function(value,formatString){return me.number(value*100,formatString||'0')+me.percentSign},repeat:function(value,text,sep){return Ext.String.repeat(text,value,sep)},attributes:function(attributes){var result,name;if(typeof attributes==='object'){result=[];for(name in attributes){if(attributes.hasOwnProperty(name)){result.push(name,'="',name==='style'?Ext.DomHelper.generateStyles(attributes[name],null,!0):Ext.htmlEncode(attributes[name]),'" ')}}
attributes=result.join('')}
return attributes||''},plural:function(value,singular,plural){return value+' '+(value===1?singular:(plural?plural:singular+'s'))},nl2br:function(v){return Ext.isEmpty(v)?'':v.replace(me.nl2brRe,'<br/>')},capitalize:Ext.String.capitalize,uncapitalize:Ext.String.uncapitalize,ellipsis:Ext.String.ellipsis,escape:Ext.String.escape,escapeRegex:Ext.String.escapeRegex,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,toggle:Ext.String.toggle,trim:Ext.String.trim,parseBox:function(box){box=box||0;if(typeof box==='number'){return{top:box,right:box,bottom:box,left:box}}
var parts=box.split(' '),ln=parts.length;if(ln===1){parts[1]=parts[2]=parts[3]=parts[0]}else if(ln===2){parts[2]=parts[0];parts[3]=parts[1]}else if(ln===3){parts[3]=parts[1]}
return{top:parseInt(parts[0],10)||0,right:parseInt(parts[1],10)||0,bottom:parseInt(parts[2],10)||0,left:parseInt(parts[3],10)||0}},resource:function(url,prefix){prefix=prefix||'';return Ext.resolveResource(prefix+url)},uri:function(value){return encodeURI(value)},uriCmp:function(value){return encodeURIComponent(value)},wordBreakRe:/[\W\s]+/,word:function(value,index,sep){var re=sep?(typeof sep==='string'?new RegExp(sep):sep):me.wordBreakRe,parts=(value||'').split(re);return parts[index||0]||''}}})
;
Ext.define('Ext.Template',{requires:['Ext.util.Format'],inheritableStatics:{from:function(el,config){el=Ext.getDom(el);return new this(el.value||el.innerHTML,config||'')}},useEval:Ext.isGecko,constructor:function(html){var me=this,args=arguments,buffer=[],length=args.length,i,value;me.initialConfig={};if(length===1&&Ext.isArray(html)){args=html;length=args.length}
if(length>1){for(i=0;i<length;i++){value=args[i];if(typeof value==='object'){Ext.apply(me.initialConfig,value);Ext.apply(me,value)}else{buffer.push(value)}}}else{buffer.push(html)}
me.html=buffer.join('')},isTemplate:!0,disableFormats:!1,tokenRe:/\{(?:(?:(\d+)|([a-z_$][\w\-$]*))(?::([a-z_.]+)(?:\(([^)]*?)?\))?)?)\}/gi,apply:function(values){var me=this;if(me.compiled){if(!me.fn){me.compile()}
return me.fn(values).join('')}
return me.evaluate(values)},evaluate:function(values){var me=this,useFormat=!me.disableFormats,fm=Ext.util.Format,tpl=me;function fn(match,index,name,formatFn,args){if(name==null||name===''){name=index}
if(formatFn&&useFormat){if(args){args=[values[name]].concat(Ext.functionFactory('return ['+args+'];')())}else{args=[values[name]]}
if(formatFn.substr(0,5)==="this."){return tpl[formatFn.substr(5)].apply(tpl,args)}else if(fm[formatFn]){return fm[formatFn].apply(fm,args)}else{return match}}else{return values[name]!==undefined?values[name]:""}}
return me.html.replace(me.tokenRe,fn)},applyOut:function(values,out){var me=this;if(me.compiled){if(!me.fn){me.compile()}
out.push.apply(out,me.fn(values))}else{out.push(me.apply(values))}
return out},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(html,compile){var me=this;me.html=html;me.compiled=!!compile;me.fn=null;return me},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,code;code=me.html.replace(me.compileARe,'\\\\').replace(me.compileBRe,'\\n').replace(me.compileCRe,"\\'").replace(me.tokenRe,me.regexReplaceFn.bind(me));code=(this.disableFormats!==!0?'var fm=Ext.util.Format;':'')+(me.useEval?'$=':'return')+" function(v){return ['"+code+"'];};";me.fn=me.useEval?me.evalCompiled(code):(new Function('Ext',code))(Ext);me.compiled=!0;return me},evalCompiled:function($){eval($);return $},regexReplaceFn:function(match,index,name,formatFn,args){if(index==null||index===''){index='"'+name+'"'}else if(this.stringFormat){index=parseInt(index)+1}
if(formatFn&&this.disableFormats!==!0){args=args?','+args:"";if(formatFn.substr(0,5)==="this."){formatFn=formatFn+'('}else if(Ext.util.Format[formatFn]){formatFn="fm."+formatFn+'('}else{return match}
return"',"+formatFn+"v["+index+"]"+args+"),'"}else{return"',v["+index+"] == undefined ? '' : v["+index+"],'"}},insertFirst:function(el,values,returnElement){return this.doInsert('afterBegin',el,values,returnElement)},insertBefore:function(el,values,returnElement){return this.doInsert('beforeBegin',el,values,returnElement)},insertAfter:function(el,values,returnElement){return this.doInsert('afterEnd',el,values,returnElement)},append:function(el,values,returnElement){return this.doInsert('beforeEnd',el,values,returnElement)},doInsert:function(where,el,values,returnElement){var newNode=Ext.DomHelper.insertHtml(where,Ext.getDom(el),this.apply(values));return returnElement?Ext.get(newNode):newNode},overwrite:function(el,values,returnElement){var newNode=Ext.DomHelper.overwrite(Ext.getDom(el),this.apply(values));return returnElement?Ext.get(newNode):newNode}},function(Template){var formatRe=/\{\d+\}/,generateFormatFn=function(format){if(formatRe.test(format)){format=new Template(format,formatTplConfig);return function(){return format.apply(arguments)}}else{return function(){return format}}},formatTplConfig={useFormat:!1,compiled:!0,stringFormat:!0},formatFns={};Ext.String.format=Ext.util.Format.format=function(format){var formatFn=formatFns[format]||(formatFns[format]=generateFormatFn(format));return formatFn.apply(this,arguments)};Ext.String.formatEncode=function(){return Ext.String.htmlEncode(Ext.String.format.apply(this,arguments))}})
;
Ext.define('Ext.util.XTemplateParser',{requires:['Ext.String'],constructor:function(config){Ext.apply(this,config)},doTpl:Ext.emptyFn,parse:function(str){var me=this,len=str.length,aliases={elseif:'elif'},topRe=me.topRe,actionsRe=me.actionsRe,index,stack,s,m,t,prev,frame,subMatch,begin,end,actions,prop,expectTplNext;me.level=0;me.stack=stack=[];for(index=0;index<len;index=end){topRe.lastIndex=index;m=topRe.exec(str);if(!m){me.doText(str.substring(index,len));break}
begin=m.index;end=topRe.lastIndex;if(index<begin){s=str.substring(index,begin);if(!(expectTplNext&&Ext.String.trim(s)==='')){me.doText(s)}}
expectTplNext=!1;if(m[1]){end=str.indexOf('%}',begin+2);me.doEval(str.substring(begin+2,end));end+=2}else if(m[2]){end=str.indexOf(']}',begin+2);me.doExpr(str.substring(begin+2,end));end+=2}else if(m[3]){me.doTag(m[3])}else if(m[4]){actions=null;while((subMatch=actionsRe.exec(m[4]))!==null){s=subMatch[2]||subMatch[3];if(s){s=Ext.String.htmlDecode(s);t=subMatch[1];t=aliases[t]||t;actions=actions||{};prev=actions[t];if(typeof prev==='string'){actions[t]=[prev,s]}else if(prev){actions[t].push(s)}else{actions[t]=s}}}
if(!actions){if(me.elseRe.test(m[4])){me.doElse()}else if(me.defaultRe.test(m[4])){me.doDefault()}else{me.doTpl();stack.push({type:'tpl'})}}else if(actions['if']){me.doIf(actions['if'],actions);stack.push({type:'if'})}else if(actions['switch']){me.doSwitch(actions['switch'],actions);stack.push({type:'switch'});expectTplNext=!0}else if(actions['case']){me.doCase(actions['case'],actions)}else if(actions.elif){me.doElseIf(actions.elif,actions)}else if(actions['for']){++me.level;if(prop=me.propRe.exec(m[4])){actions.propName=prop[1]||prop[2]}
me.doFor(actions['for'],actions);stack.push({type:'for',actions:actions})}else if(actions.foreach){++me.level;if(prop=me.propRe.exec(m[4])){actions.propName=prop[1]||prop[2]}
me.doForEach(actions.foreach,actions);stack.push({type:'foreach',actions:actions})}else if(actions.exec){me.doExec(actions.exec,actions);stack.push({type:'exec',actions:actions})}}else if(m[0].length===5){stack.push({type:'tpl'})}else{frame=stack.pop();me.doEnd(frame.type,frame.actions);if(frame.type==='for'||frame.type==='foreach'){--me.level}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]+)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|foreach|exec|switch|case|eval|between)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/})
;
Ext.define('Ext.util.XTemplateCompiler',{extend:'Ext.util.XTemplateParser',useEval:Ext.isGecko,useIndex:Ext.isIE8m,useFormat:!0,propNameRe:/^[\w\d$]*$/,compile:function(tpl){var me=this,code=me.generate(tpl);return me.useEval?me.evalTpl(code):(new Function('Ext',code))(Ext)},generate:function(tpl){var me=this,definitions='var fm=Ext.util.Format,ts=Object.prototype.toString;',code;me.maxLevel=0;me.body=['var c0=values, a0='+me.createArrayTest(0)+', p0=parent, n0=xcount, i0=xindex, k0, v;\n'];if(me.definitions){if(typeof me.definitions==='string'){me.definitions=[me.definitions,definitions]}else{me.definitions.push(definitions)}}else{me.definitions=[definitions]}
me.switches=[];me.parse(tpl);me.definitions.push((me.useEval?'$=':'return')+' function ('+me.fnArgs+') {',me.body.join(''),'}');code=me.definitions.join('\n');me.definitions.length=me.body.length=me.switches.length=0;me.definitions=me.body=me.switches=0;return code},doText:function(text){var me=this,out=me.body;text=text.replace(me.aposRe,"\\'").replace(me.newLineRe,'\\n');if(me.useIndex){out.push('out[out.length]=\'',text,'\'\n')}else{out.push('out.push(\'',text,'\')\n')}},doExpr:function(expr){var out=this.body;out.push('if ((v='+expr+') != null) out');if(this.useIndex){out.push('[out.length]=v\n')}else{out.push('.push(v)\n')}},doTag:function(tag){var expr=this.parseTag(tag);if(expr){this.doExpr(expr)}else{this.doText('{'+tag+'}')}},doElse:function(){this.body.push('} else {\n')},doEval:function(text){this.body.push(text,'\n')},doIf:function(action,actions){var me=this;if(action==='.'){me.body.push('if (values) {\n')}else if(me.propNameRe.test(action)){me.body.push('if (',me.parseTag(action),') {\n')}else{me.body.push('if (',me.addFn(action),me.callFn,') {\n')}
if(actions.exec){me.doExec(actions.exec)}},doElseIf:function(action,actions){var me=this;if(action==='.'){me.body.push('else if (values) {\n')}else if(me.propNameRe.test(action)){me.body.push('} else if (',me.parseTag(action),') {\n')}else{me.body.push('} else if (',me.addFn(action),me.callFn,') {\n')}
if(actions.exec){me.doExec(actions.exec)}},doSwitch:function(action){var me=this,key;if(action==='.'||action==='#'){key=action==='.'?'values':'xindex';me.body.push('switch (',key,') {\n')}else if(me.propNameRe.test(action)){me.body.push('switch (',me.parseTag(action),') {\n')}else{me.body.push('switch (',me.addFn(action),me.callFn,') {\n')}
me.switches.push(0)},doCase:function(action){var me=this,cases=Ext.isArray(action)?action:[action],n=me.switches.length-1,match,i;if(me.switches[n]){me.body.push('break;\n')}else{me.switches[n]++}
for(i=0,n=cases.length;i<n;++i){match=me.intRe.exec(cases[i]);cases[i]=match?match[1]:("'"+cases[i].replace(me.aposRe,"\\'")+"'")}
me.body.push('case ',cases.join(': case '),':\n')},doDefault:function(){var me=this,n=me.switches.length-1;if(me.switches[n]){me.body.push('break;\n')}else{me.switches[n]++}
me.body.push('default:\n')},doEnd:function(type,actions){var me=this,L=me.level-1;if(type==='for'||type==='foreach'){if(actions.exec){me.doExec(actions.exec)}
me.body.push('}\n');me.body.push('parent=p',L,';values=r',L+1,';xcount=n'+L+';xindex=i',L,'+1;xkey=k',L,';\n')}else if(type==='if'||type==='switch'){me.body.push('}\n')}},doFor:function(action,actions){var me=this,s,L=me.level,up=L-1,parentAssignment;if(action==='.'){s='values'}else if(me.propNameRe.test(action)){s=me.parseTag(action)}else{s=me.addFn(action)+me.callFn}
if(me.maxLevel<L){me.maxLevel=L;me.body.push('var ')}
if(action==='.'){parentAssignment='c'+L}else{parentAssignment='a'+up+'?c'+up+'[i'+up+']:c'+up}
me.body.push('i',L,'=0,n',L,'=0,c',L,'=',s,',a',L,'=',me.createArrayTest(L),',r',L,'=values,p',L,',k',L,';\n','p',L,'=parent=',parentAssignment,'\n','if (c',L,'){if(a',L,'){n',L,'=c',L,'.length;}else if (c',L,'.isMixedCollection){c',L,'=c',L,'.items;n',L,'=c',L,'.length;}else if(c',L,'.isStore){c',L,'=c',L,'.data.items;n',L,'=c',L,'.length;}else{c',L,'=[c',L,'];n',L,'=1;}}\n','for (xcount=n',L,';i',L,'<n'+L+';++i',L,'){\n','values=c',L,'[i',L,']');if(actions.propName){me.body.push('.',actions.propName)}
me.body.push('\n','xindex=i',L,'+1\n');if(actions.between){me.body.push('if(xindex>1){ out.push("',actions.between,'"); } \n')}},doForEach:function(action,actions){var me=this,L=me.level,up=L-1,s,parentAssignment;if(action==='.'){s='values'}else if(me.propNameRe.test(action)){s=me.parseTag(action)}else{s=me.addFn(action)+me.callFn}
if(me.maxLevel<L){me.maxLevel=L;me.body.push('var ')}
if(action==='.'){parentAssignment='c'+L}else{parentAssignment='a'+up+'?c'+up+'[i'+up+']:c'+up}
me.body.push('i',L,'=-1,n',L,'=0,c',L,'=',s,',a',L,'=',me.createArrayTest(L),',r',L,'=values,p',L,',k',L,';\n','p',L,'=parent=',parentAssignment,'\n','for(k',L,' in c',L,'){\n','xindex=++i',L,'+1;\n','xkey=k',L,';\n','values=c',L,'[k',L,'];');if(actions.propName){me.body.push('.',actions.propName)}
if(actions.between){me.body.push('if(xindex>1){ out.push("',actions.between,'"); } \n')}},createArrayTest:('isArray' in Array)?function(L){return'Array.isArray(c'+L+')'}:function(L){return'ts.call(c'+L+')==="[object Array]"'},doExec:function(action,actions){var me=this,name='f'+me.definitions.length,guards=me.guards[me.strict?0:1];me.definitions.push('function '+name+'('+me.fnArgs+') {',guards.doTry,' var $v = values; with($v) {','  '+action,' }',guards.doCatch,'}');me.body.push(name+me.callFn+'\n')},guards:[{doTry:'',doCatch:''},{doTry:'try { ',doCatch:' } catch(e) {\n'+'Ext.log.warn("XTemplate evaluation exception: " + e.message);\n'+'}'}],addFn:function(body){var me=this,name='f'+me.definitions.length,guards=me.guards[me.strict?0:1];if(body==='.'){me.definitions.push('function '+name+'('+me.fnArgs+') {',' return values','}')}else if(body==='..'){me.definitions.push('function '+name+'('+me.fnArgs+') {',' return parent','}')}else{me.definitions.push('function '+name+'('+me.fnArgs+') {',guards.doTry,' var $v = values; with($v) {','  return('+body+')',' }',guards.doCatch,'}')}
return name},parseTag:function(tag){var me=this,m=me.tagRe.exec(tag),name,format,args,math,v;if(!m){return null}
name=m[1];format=m[2];args=m[3];math=m[4];if(name==='.'){if(!me.validTypes){me.definitions.push('var validTypes={string:1,number:1,boolean:1};');me.validTypes=!0}
v='validTypes[typeof values] || ts.call(values) === "[object Date]" ? values : ""'}else if(name==='#'){v='xindex'}else if(name==='$'){v='xkey'}else if(name.substr(0,7)==="parent."){v=name}else if(isNaN(name)&&name.indexOf('-')===-1&&name.indexOf('.')!==-1){v="values."+name}else{v="values['"+name+"']"}
if(math){v='('+v+math+')'}
if(format&&me.useFormat){args=args?','+args:"";if(format.substr(0,5)!=="this."){format="fm."+format+'('}else{format+='('}}else{return v}
return format+v+args+')'},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/^([\w-\.\#\$]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?$/},function(){var proto=this.prototype;proto.fnArgs='out,values,parent,xindex,xcount,xkey';proto.callFn='.call(this,'+proto.fnArgs+')'})
;
Ext.define('Ext.XTemplate',{extend:'Ext.Template',requires:['Ext.util.XTemplateCompiler'],isXTemplate:!0,emptyObj:{},fn:null,strict:!1,apply:function(values,parent,xindex,xcount){var buffer=this.applyOut(values,[],parent,xindex,xcount);return buffer.length===1?buffer[0]:buffer.join('')},applyOut:function(values,out,parent,xindex,xcount){var me=this,compiler;if(!me.fn){compiler=new Ext.util.XTemplateCompiler({useFormat:me.disableFormats!==!0,definitions:me.definitions,strict:me.strict});me.fn=compiler.compile(me.html)}
xindex=xindex||1;xcount=xcount||1;if(me.strict){me.fn(out,values,parent||me.emptyObj,xindex,xcount)}else{try{me.fn(out,values,parent||me.emptyObj,xindex,xcount)}catch(e){Ext.log.warn('XTemplate evaluation exception: '+e.message)}}
return out},compile:function(){return this},statics:{get:function(config,source,defaultTpl){var ret=config;if(config==null){if(source&&defaultTpl){ret=this.getTpl(source,defaultTpl)}}else if((config||config==='')&&!config.isTemplate){ret=new this(config)}
return ret},getTpl:function(instance,name){var tpl=instance[name],owner;if(tpl){if(!tpl.isTemplate){tpl=Ext.XTemplate.get(tpl)}
if(!tpl.owner){if(instance.hasOwnProperty(name)){owner=instance}else{for(owner=instance.self.prototype;owner&&!owner.hasOwnProperty(name);owner=owner.superclass){}}
owner[name]=tpl;tpl.owner=owner}}
return tpl||null}}})
;
Ext.define('Ext.app.EventDomain',{requires:['Ext.util.Event'],statics:{instances:{}},isEventDomain:!0,isInstance:!1,constructor:function(){var me=this;if(!me.isInstance){Ext.app.EventDomain.instances[me.type]=me}
me.bus={};me.monitoredClasses=[]},dispatch:function(target,ev,args){ev=Ext.canonicalEventName(ev);var me=this,bus=me.bus,selectors=bus[ev],selector,controllers,id,info,events,len,i,event;if(!selectors){return!0}
for(selector in selectors){if(selectors.hasOwnProperty(selector)&&me.match(target,selector,me.controller)){controllers=selectors[selector];for(id in controllers){if(controllers.hasOwnProperty(id)){info=controllers[id];if(info.controller.isActive()){events=info.list;len=events.length;for(i=0;i<len;i++){event=events[i];if(event.fire.apply(event,args)===!1){return!1}}}}}}}
return!0},listen:function(selectors,controller){var me=this,bus=me.bus,idProperty=me.idProperty,monitoredClasses=me.monitoredClasses,monitoredClassesCount=monitoredClasses.length,controllerId=controller.getId(),isComponentDomain=(me.type==='component'),refMap=isComponentDomain?controller.getRefMap():null,i,tree,info,selector,options,listener,scope,event,listeners,ev,classHasListeners;for(selector in selectors){listeners=selectors[selector];if(isComponentDomain){selector=refMap[selector]||selector}
if(listeners){if(idProperty){if(!/^[*#]/.test(selector)){Ext.raise('Selectors containing id should begin with #')}
selector=selector==='*'?selector:selector.substring(1)}
for(ev in listeners){options=null;listener=listeners[ev];scope=controller;ev=Ext.canonicalEventName(ev);event=new Ext.util.Event(controller,ev);if(Ext.isObject(listener)){options=listener;listener=options.fn;scope=options.scope||controller;delete options.fn;delete options.scope}
if((!options||!options.scope)&&typeof listener==='string'){if(!scope[listener]){Ext.raise('Cannot resolve "'+listener+'" on controller.')}
scope=null}else if(typeof listener==='string'){listener=scope[listener]}
event.addListener(listener,scope,options);for(i=0;i<monitoredClassesCount;++i){classHasListeners=monitoredClasses[i].hasListeners;if(classHasListeners){classHasListeners._incr_(ev)}}
tree=bus[ev]||(bus[ev]={});tree=tree[selector]||(tree[selector]={});info=tree[controllerId]||(tree[controllerId]={controller:controller,list:[]});info.list.push(event)}}}},match:function(target,selector){var idProperty=this.idProperty;if(idProperty){return selector==='*'||target[idProperty]===selector}
return!1},monitor:function(observable){var domain=this,prototype=observable.isInstance?observable:observable.prototype,doFireEvent=prototype.doFireEvent;domain.monitoredClasses.push(observable);prototype.doFireEvent=function(ev,args){var me=this,ret;ret=doFireEvent.apply(me,arguments);if(ret!==!1&&!me.destroyed&&!me.isSuspended(ev)){ret=domain.dispatch(me,ev,args)}
return ret}},unlisten:function(controllerId){var bus=this.bus,id=controllerId,monitoredClasses=this.monitoredClasses,monitoredClassesCount=monitoredClasses.length,controllers,ev,events,len,item,selector,selectors,i,j,info,classHasListeners;if(controllerId.isController){id=controllerId.getId()}
for(ev in bus){ev=Ext.canonicalEventName(ev);if(bus.hasOwnProperty(ev)&&(selectors=bus[ev])){for(selector in selectors){controllers=selectors[selector];info=controllers[id];if(info){events=info.list;if(events){for(i=0,len=events.length;i<len;++i){item=events[i];item.clearListeners();for(j=0;j<monitoredClassesCount;++j){classHasListeners=monitoredClasses[j].hasListeners;if(classHasListeners){classHasListeners._decr_(item.name)}}}
delete controllers[id]}}}}}},destroy:function(){this.monitoredClasses=this.bus=null;this.callParent()}})
;
Ext.define('Ext.app.domain.Component',{extend:'Ext.app.EventDomain',singleton:!0,requires:['Ext.Widget'],type:'component',constructor:function(){this.callParent();this.monitor(Ext.Widget)},dispatch:function(target,ev,args){var controller=target.lookupController(!1),domain,view;while(controller){domain=controller.compDomain;if(domain){if(domain.dispatch(target,ev,args)===!1){return!1}}
view=controller.getView();controller=view?view.lookupController(!0):null}
return this.callParent([target,ev,args])},match:function(target,selector){return target.is(selector)}})
;
Ext.define('Ext.util.ProtoElement',function(){var splitWords=Ext.String.splitWords,toMap=Ext.Array.toMap;return{isProtoEl:!0,clsProp:'cls',styleProp:'style',removedProp:'removed',styleIsText:!1,constructor:function(config){var me=this,cls,style;if(config){Ext.apply(me,config);cls=me.cls;style=me.style;delete me.cls}
me.classList=cls?splitWords(cls):[];me.classMap=cls?toMap(me.classList):{};if(style){if(typeof style==='string'){me.style=Ext.Element.parseStyles(style)}else if(Ext.isFunction(style)){me.styleFn=style;delete me.style}else{me.style=Ext.apply({},style)}}},flush:function(){this.flushClassList=[];this.removedClasses={};delete this.style;delete this.unselectableAttr},addCls:function(cls){if(!cls){return this}
var me=this,add=(typeof cls==='string')?splitWords(cls):cls,length=add.length,list=me.classList,map=me.classMap,flushList=me.flushClassList,i=0,c;for(;i<length;++i){c=add[i];if(!map[c]){map[c]=!0;list.push(c);if(flushList){flushList.push(c);delete me.removedClasses[c]}}}
return me},hasCls:function(cls){return cls in this.classMap},removeCls:function(cls){var me=this,list=me.classList,newList=(me.classList=[]),remove=toMap(splitWords(cls)),length=list.length,map=me.classMap,removedClasses=me.removedClasses,i,c;for(i=0;i<length;++i){c=list[i];if(remove[c]){if(removedClasses){if(map[c]){removedClasses[c]=!0;Ext.Array.remove(me.flushClassList,c)}}
delete map[c]}else{newList.push(c)}}
return me},setStyle:function(prop,value){var me=this,style=me.style||(me.style={});if(typeof prop==='string'){if(arguments.length===1){me.setStyle(Ext.Element.parseStyles(prop))}else{style[prop]=value}}else{Ext.apply(style,prop)}
return me},unselectable:function(){this.addCls(Ext.dom.Element.unselectableCls);if(Ext.isOpera){this.unselectableAttr=!0}},writeTo:function(to){var me=this,classList=me.flushClassList||me.classList,removedClasses=me.removedClasses,style;if(me.styleFn){style=Ext.apply({},me.styleFn());Ext.apply(style,me.style)}else{style=me.style}
to[me.clsProp]=classList.join(' ');if(style){to[me.styleProp]=me.styleIsText?Ext.DomHelper.generateStyles(style,null,!0):style}
if(removedClasses){removedClasses=Ext.Object.getKeys(removedClasses);if(removedClasses.length){to[me.removedProp]=removedClasses.join(' ')}}
if(me.unselectableAttr){to.unselectable='on'}
return to}}})
;
Ext.define('Ext.dom.CompositeElement',{alternateClassName:'Ext.CompositeElement',extend:'Ext.dom.CompositeElementLite',isLite:!1,getElement:function(el){return el},transformElement:function(el){return Ext.get(el)}})
;
Ext.define('Ext.plugin.Manager',{singleton:!0,alternateClassName:['Ext.PluginManager','Ext.PluginMgr'],typeName:'ptype',create:function(config,defaultType,host){var result,type;if(config.init){result=config}else{if(host){config=Ext.apply({},config);config.cmp=host}else{host=config.cmp}
if(config.xclass){result=Ext.create(config)}else{type='plugin.'+(config.ptype||defaultType);result=Ext.ClassManager.instantiateByAlias(type,config)}}
if(result&&host&&result.setCmp&&!result.setCmpCalled){result.setCmp(host);result.setCmpCalled=!0}
return result}})
;
Ext.define('Ext.util.CSS',function(){var CSS,rules=null,doc=document,camelRe=/(-[a-z])/gi,camelFn=function(m,a){return a.charAt(1).toUpperCase()};return{singleton:!0,rules:rules,initialized:!1,constructor:function(){CSS=this},createStyleSheet:function(cssText,id){var ss,head=doc.getElementsByTagName('head')[0],styleEl=doc.createElement('style');styleEl.setAttribute('type','text/css');if(id){styleEl.setAttribute('id',id)}
ss=styleEl.styleSheet;if(ss){head.appendChild(styleEl);ss.cssText=cssText}else{styleEl.appendChild(doc.createTextNode(cssText));head.appendChild(styleEl);ss=styleEl.sheet}
CSS.cacheStyleSheet(ss);return ss},removeStyleSheet:function(stylesheet){var styleEl=(typeof stylesheet==='string')?doc.getElementById(stylesheet):stylesheet.ownerNode;if(styleEl){styleEl.parentNode.removeChild(styleEl)}},swapStyleSheet:function(id,url){var ss;CSS.removeStyleSheet(id);ss=doc.createElement("link");ss.setAttribute("rel","stylesheet");ss.setAttribute("type","text/css");ss.setAttribute("id",id);ss.setAttribute("href",url);doc.getElementsByTagName("head")[0].appendChild(ss)},cacheStyleSheet:function(ss){if(!rules){rules=CSS.rules={}}
try{var ssRules=ss.cssRules||ss.rules,i=ssRules.length-1,imports=ss.imports,len=imports?imports.length:0,rule,j;for(j=0;j<len;++j){CSS.cacheStyleSheet(imports[j])}
for(;i>=0;--i){rule=ssRules[i];if(rule.styleSheet){CSS.cacheStyleSheet(rule.styleSheet)}
CSS.cacheRule(rule,ss)}}catch(e){}},cacheRule:function(cssRule,styleSheet){var selectorText,selectorCount,j;if(cssRule.styleSheet){return CSS.cacheStyleSheet(cssRule.styleSheet)}
selectorText=cssRule.selectorText;if(selectorText){selectorText=selectorText.split(',');selectorCount=selectorText.length;for(j=0;j<selectorCount;j++){rules[Ext.String.trim(selectorText[j]).toLowerCase()]={parentStyleSheet:styleSheet,cssRule:cssRule}}}},getRules:function(refreshCache){var result={},selector;if(rules===null||refreshCache){CSS.refreshCache()}
for(selector in rules){result[selector]=rules[selector].cssRule}
return result},refreshCache:function(){var ds=doc.styleSheets,i=0,len=ds.length;rules=CSS.rules={};for(;i<len;i++){try{if(!ds[i].disabled){CSS.cacheStyleSheet(ds[i])}}catch(e){}}},getRule:function(selector,refreshCache,rawCache){var i,result;if(!rules||refreshCache){CSS.refreshCache()}
if(!Ext.isArray(selector)){result=rules[selector.toLowerCase()];if(result&&!rawCache){result=result.cssRule}
return result||null}
for(i=0;i<selector.length;i++){if(rules[selector[i]]){return rawCache?rules[selector[i].toLowerCase()]:rules[selector[i].toLowerCase()].cssRule}}
return null},createRule:function(styleSheet,selector,cssText){var result,ruleSet=styleSheet.cssRules||styleSheet.rules,index=ruleSet.length;if(styleSheet.insertRule){styleSheet.insertRule(selector+' {'+cssText+'}',index)}else{styleSheet.addRule(selector,cssText||' ')}
CSS.cacheRule(result=ruleSet[index],styleSheet);return result},updateRule:function(selector,property,value){var rule,i,styles;if(!Ext.isArray(selector)){rule=CSS.getRule(selector);if(rule){if(arguments.length===2){styles=Ext.Element.parseStyles(property);for(property in styles){rule.style[property.replace(camelRe,camelFn)]=styles[property]}}else{rule.style[property.replace(camelRe,camelFn)]=value}
return!0}}else{for(i=0;i<selector.length;i++){if(CSS.updateRule(selector[i],property,value)){return!0}}}
return!1},deleteRule:function(selector){var rule=CSS.getRule(selector,!1,!0),styleSheet,index;if(rule){styleSheet=rule.parentStyleSheet;index=Ext.Array.indexOf(styleSheet.cssRules||styleSheet.rules,rule.cssRule);if(styleSheet.deleteRule){styleSheet.deleteRule(index)}else{styleSheet.removeRule(index)}
delete rules[selector]}}}})
;
Ext.define('Ext.fx.easing.Abstract',{config:{startTime:0,startValue:0},isEasing:!0,isEnded:!1,constructor:function(config){this.initConfig(config);return this},applyStartTime:function(startTime){if(!startTime){startTime=Ext.Date.now()}
return startTime},updateStartTime:function(startTime){this.reset()},reset:function(){this.isEnded=!1},getValue:Ext.emptyFn})
;
Ext.define('Ext.fx.easing.Linear',{extend:'Ext.fx.easing.Abstract',alias:'easing.linear',config:{duration:0,endValue:0},updateStartValue:function(startValue){this.distance=this.getEndValue()-startValue},updateEndValue:function(endValue){this.distance=endValue-this.getStartValue()},getValue:function(){var deltaTime=Ext.Date.now()-this.getStartTime(),duration=this.getDuration();if(deltaTime>duration){this.isEnded=!0;return this.getEndValue()}else{return this.getStartValue()+((deltaTime/duration)*this.distance)}}})
;
Ext.define('Ext.util.translatable.Abstract',{extend:'Ext.Evented',mixins:['Ext.mixin.Factoryable'],factoryConfig:{type:'translatable',defaultType:'csstransform'},requires:['Ext.fx.easing.Linear'],config:{easing:null,easingX:{duration:300},easingY:{duration:300},offsetX:0,offsetY:0},x:0,y:0,activeEasingX:null,activeEasingY:null,isAnimating:!1,isTranslatable:!0,constructor:function(config){this.callParent([config]);this.position={x:0,y:0}},factoryEasing:function(easing){return Ext.factory(easing,Ext.fx.easing.Linear,null,'easing')},applyEasing:function(easing){if(!this.getEasingX()){this.setEasingX(this.factoryEasing(easing))}
if(!this.getEasingY()){this.setEasingY(this.factoryEasing(easing))}},applyEasingX:function(easing){return this.factoryEasing(easing)},applyEasingY:function(easing){return this.factoryEasing(easing)},updateOffsetX:function(){var me=this;if(!me.isConfiguring&&!me.isAnimating){me.translateXY(me.x,me.y)}},updateOffsetY:function(){var me=this;if(!me.isConfiguring&&!me.isAnimating){me.translateXY(me.x,me.y)}},translate:function(x,y,animation){var me=this;if(animation){return me.translateAnimated(x,y,animation)}
if(me.isAnimating){me.stopAnimation()}
if(!isNaN(x)&&typeof x==='number'){me.x=x}else{x=me.x}
if(!isNaN(y)&&typeof y==='number'){me.y=y}else{y=me.y}
me.translateXY(x,y)},translateXY:function(x,y){var me=this;if(!me.destroyed){me.doTranslate(x+me.getOffsetX(),y+me.getOffsetY());if(me.hasListeners.translate){me.fireEvent('translate',me,x,y)}}},translateAxis:function(axis,value,animation){var x,y;if(axis==='x'){x=value}else{y=value}
return this.translate(x,y,animation)},getPosition:function(){var me=this,position=me.position;position.x=-me.x;position.y=-me.y;return position},animate:function(easingX,easingY){var me=this;me.activeEasingX=easingX;me.activeEasingY=easingY;me.isAnimating=!0;if(me.ownerCmp){me.ownerCmp.isTranslating=!0}
me.lastX=null;me.lastY=null;Ext.AnimationQueue.start(me.doAnimationFrame,me);me.fireEvent('animationstart',me,me.x,me.y);return me},translateAnimated:function(x,y,animation){var me=this,now,easing,easingX,easingY;if(!Ext.isObject(animation)){animation={}}
if(me.isAnimating){me.stopAnimation()}
me.callback=animation.callback;me.callbackScope=animation.scope;now=Ext.Date.now();easing=animation.easing;easingX=(typeof x==='number')?(animation.easingX||easing||me.getEasingX()||!0):null;easingY=(typeof y==='number')?(animation.easingY||easing||me.getEasingY()||!0):null;if(easingX){easingX=me.factoryEasing(easingX);easingX.setStartTime(now);easingX.setStartValue(me.x);easingX.setEndValue(x);if('duration' in animation){easingX.setDuration(animation.duration)}}
if(easingY){easingY=me.factoryEasing(easingY);easingY.setStartTime(now);easingY.setStartValue(me.y);easingY.setEndValue(y);if('duration' in animation){easingY.setDuration(animation.duration)}}
return me.animate(easingX,easingY)},doAnimationFrame:function(){var me=this,easingX=me.activeEasingX,easingY=me.activeEasingY,now=Date.now(),x,y;if(!me.isAnimating){return}
me.lastRun=now;if(easingX===null&&easingY===null){me.stopAnimation();return}
if(easingX!==null){me.x=x=Math.round(easingX.getValue());if(easingX.isEnded){me.activeEasingX=null;me.fireEvent('axisanimationend',me,'x',x)}}else{x=me.x}
if(easingY!==null){me.y=y=Math.round(easingY.getValue());if(easingY.isEnded){me.activeEasingY=null;me.fireEvent('axisanimationend',me,'y',y)}}else{y=me.y}
if(me.lastX!==x||me.lastY!==y){me.translateXY(x,y);me.lastX=x;me.lastY=y}
me.fireEvent('animationframe',me,x,y)},stopAnimation:function(){var me=this;if(!me.isAnimating){return}
me.activeEasingX=null;me.activeEasingY=null;me.isAnimating=!1;if(me.ownerCmp){me.ownerCmp.isTranslating=!1}
Ext.AnimationQueue.stop(me.doAnimationFrame,me);me.fireEvent('animationend',me,me.x,me.y);if(me.callback){me.callback.call(me.callbackScope);me.callback=null}},refresh:function(){this.translate(this.x,this.y)},resolveListenerScope:function(){var ownerCmp=this.ownerCmp,a=arguments;if(ownerCmp){return ownerCmp.resolveListenerScope.apply(ownerCmp,a)}
return this.callParent(a)},destroy:function(){var me=this;me.destroying=!0;if(me.isAnimating){me.stopAnimation()}
me.callParent();me.destroyed=!0}})
;
Ext.define('Ext.util.translatable.Dom',{extend:'Ext.util.translatable.Abstract',alias:'translatable.dom',config:{element:null},applyElement:function(element){if(!element){return}
return Ext.get(element)},updateElement:function(){this.refresh()},translateXY:function(x,y){var element=this.getElement();if(element&&!element.destroyed){this.callParent([x,y])}}})
;
Ext.define('Ext.util.translatable.ScrollPosition',{extend:'Ext.util.translatable.Dom',alias:'translatable.scrollposition',constructor:function(config){if(config&&config.element){this.x=config.element.getScrollLeft();this.y=config.element.getScrollTop()}
this.callParent([config])},translateAnimated:function(){var element=this.getElement();this.x=element.getScrollLeft();this.y=element.getScrollTop();this.callParent(arguments)},doTranslate:function(x,y){var element=this.getElement();element.setScrollLeft(Math.round(x));element.setScrollTop(Math.round(y))},getPosition:function(){var me=this,position=me.position,element=me.getElement();position.x=element.getScrollLeft();position.y=element.getScrollTop();return position}})
;
Ext.define('Ext.scroll.Scroller',{extend:'Ext.Evented',alias:'scroller.scroller',alternateClassName:'Ext.scroll.NativeScroller',mixins:['Ext.mixin.Factoryable','Ext.mixin.Bufferable'],requires:['Ext.util.CSS','Ext.util.translatable.ScrollPosition','Ext.Deferred'],factoryConfig:{defaultType:'scroller'},bufferableMethods:{onDomScrollEnd:100},isScroller:!0,config:{direction:undefined,element:undefined,scrollbars:null,snapSelector:null,snapOffset:null,msSnapInterval:null,x:!0,y:!0,scrollElement:null,size:null,spacerXY:null,touchAction:null},snappableCls:Ext.baseCSSPrefix+'scroller-snappable',elementCls:Ext.baseCSSPrefix+'scroller',spacerCls:Ext.baseCSSPrefix+'scroller-spacer',noScrollbarsCls:Ext.baseCSSPrefix+'no-scrollbars',statics:{create:function(config,type){return Ext.Factory.scroller(config,type)},getScrollingElement:function(){var doc=document,standard=this.$standardScrollElement,el=doc.scrollingElement,iframe,frameDoc;if(el){return el}
if(standard===undefined){iframe=document.createElement('iframe');iframe.style.height='1px';document.body.appendChild(iframe);frameDoc=iframe.contentWindow.document;frameDoc.write('<!DOCTYPE html><div style="height:9999em">x</div>');frameDoc.close();standard=frameDoc.documentElement.scrollHeight>frameDoc.body.scrollHeight;iframe.parentNode.removeChild(iframe);this.$standardScrollElement=standard}
return standard?doc.documentElement:doc.body},initViewportScroller:function(){var scroller=Ext.getViewportScroller();if(!scroller.getElement()){scroller.setElement(Ext.getBody())}}},constructor:function(config){var me=this;me.position={x:0,y:0};me.callParent([config])},destroy:function(){var me=this,partners=me._partners,key;Ext.undefer(me.restoreTimer);me.setX(Ext.emptyString);me.setY(Ext.emptyString);if(me._spacer){me._spacer.destroy()}
if(me.scrollListener){me.scrollListener.destroy()}
if(partners){for(key in partners){me.removePartner(partners[key].scroller)}}
me.setElement(null);me._partners=me.component=null;if(me.translatable){me.translatable.destroy();me.translatable=null}
me.removeSnapStylesheet();me.callParent()},addPartner:function(partner,axis){var me=this,partners=me._partners||(me._partners={}),otherPartners=partner._partners||(partner._partners={});axis=me.axisConfigs[axis||'both'];partners[partner.getId()]={scroller:partner,axes:axis};otherPartners[me.getId()]={scroller:me,axes:axis}},applyElement:function(element,oldElement){var me=this;if(oldElement&&me.scrollListener){me.scrollListener.destroy()}
if(element){if(typeof element==='string'&&!Ext.get(element)){Ext.raise("Cannot create Ext.scroll.Scroller instance. "+"Element with id '"+element+"' not found.")}
element=Ext.get(element)}
return element},applySize:function(size,oldSize){var x,y;if(size===null||typeof size==='number'){x=y=size}else if(size){x=size.x;y=size.y}
if(x===null){x=0}else if(x===undefined){x=(oldSize?oldSize.x:0)}
if(y===null){y=0}else if(y===undefined){y=(oldSize?oldSize.y:0)}
if(!oldSize||x!==oldSize.x||y!==oldSize.y){return{x:x,y:y}}},getClientSize:function(){var dom=this.getElement().dom;return{x:dom.clientWidth,y:dom.clientHeight}},getScrollbarSize:function(){var me=this,width=0,height=0,element=me.getElement(),dom,x,y,hasXScroll,hasYScroll,scrollbarSize;if(element&&!element.destroyed){x=me.getX();y=me.getY();dom=element.dom;if(x||y){scrollbarSize=Ext.scrollbar.size()}
if(x==='scroll'){hasXScroll=!0}else if(x){hasXScroll=dom.scrollWidth>dom.clientWidth}
if(y==='scroll'){hasYScroll=!0}else if(y){hasYScroll=dom.scrollHeight>dom.clientHeight}
if(hasXScroll){height=scrollbarSize.height}
if(hasYScroll){width=scrollbarSize.width}}
return{width:width,height:height}},getPosition:function(){var me=this;if(me.positionDirty){me.updateDomScrollPosition()}
return me.position},getSize:function(){var element=this.getElement(),size,dom;if(element&&!element.destroyed){dom=element.dom;size={x:dom.scrollWidth,y:dom.scrollHeight}}else{size={x:0,y:0}}
return size},getMaxPosition:function(){var element=this.getElement(),x=0,y=0,dom;if(element&&!element.destroyed){dom=element.dom;x=dom.scrollWidth-dom.clientWidth;y=dom.scrollHeight-dom.clientHeight}
return{x:x,y:y}},getMaxUserPosition:function(){var me=this,element=me.getElement(),x=0,y=0,dom;if(element&&!element.destroyed){dom=element.dom;if(me.getX()){x=dom.scrollWidth-dom.clientWidth}
if(me.getY()){y=dom.scrollHeight-dom.clientHeight}}
return{x:x,y:y}},refresh:function(){this.positionDirty=!0;this.fireEvent('refresh',this);return this},removePartner:function(partner){var partners=this._partners,otherPartners=partner._partners;if(partners){delete partners[partner.getId()]}
if(otherPartners){delete(otherPartners[this.getId()])}},scrollBy:function(deltaX,deltaY,animate){var position=this.getPosition();if(deltaX){if(deltaX.length){animate=deltaY;deltaY=deltaX[1];deltaX=deltaX[0]}else if(typeof deltaX!=='number'){animate=deltaY;deltaY=deltaX.y;deltaX=deltaX.x}}
deltaX=(typeof deltaX==='number')?deltaX+position.x:null;deltaY=(typeof deltaY==='number')?deltaY+position.y:null;return this.doScrollTo(deltaX,deltaY,animate)},ensureVisible:function(el,options){var me=this,position=me.getPosition(),highlight,newPosition,ret;if(el){if(el&&el.element&&!el.isElement){options=el;el=options.element}
options=options||{};highlight=options.highlight;newPosition=me.getEnsureVisibleXY(el,options);if(newPosition.y!==position.y||newPosition.x!==position.x){if(highlight){me.on({scrollend:'doHighlight',scope:me,single:!0,args:[el,highlight]})}
ret=me.doScrollTo(newPosition.x,newPosition.y,options.animation)}else{if(highlight){me.doHighlight(el,highlight)}
ret=Ext.Deferred.getCachedResolved()}}else{ret=Ext.Deferred.getCachedRejected()}
return ret},scrollIntoView:function(el,hscroll,animate,highlight){return this.ensureVisible(el,{animation:animate,highlight:highlight,x:hscroll})},isInView:function(el){return this.doIsInView(el)},scrollTo:function(x,y,animation){var maxPosition;if(x){if(x.length){animation=y;y=x[1];x=x[0]}else if(typeof x!=='number'){animation=y;y=x.y;x=x.x}}
if(x<0||y<0){maxPosition=this.getMaxPosition();if(x<0){x+=maxPosition.x}
if(y<0){y+=maxPosition.y}}
return this.doScrollTo(x,y,animation)},updateDirection:function(direction){var me=this,x,y;if(!direction){x=me.getX();y=me.getY();if(x&&y){direction=(y==='scroll'&&x==='scroll')?'both':'auto'}else if(y){direction='vertical'}else if(x){direction='horizontal'}
me._direction=direction}else{if(direction==='auto'){x=!0;y=!0}else if(direction==='vertical'){x=!1;y=!0}else if(direction==='horizontal'){x=!0;y=!1}else if(direction==='both'){x='scroll';y='scroll'}
me.setX(x);me.setY(y)}},updateScrollbars:function(scrollbars,oldScrollbars){this.syncScrollbarCls()},updateSize:function(size){var me=this,element=me.getElement(),x=size.x,y=size.y,spacer;if(element){me.positionDirty=!0;spacer=me.getSpacer();if(!x&&!y){spacer.hide()}else{if(x>0){x-=1}
if(y>0){y-=1}
me.setSpacerXY({x:x,y:y});spacer.show()}}},updateMsSnapInterval:function(){this.initMsSnapInterval()},updateSnapSelector:function(){this.initSnap()},updateSnapOffset:function(){this.initSnap()},updateTouchAction:function(touchAction){var element=this.getElement();if(element){element.setTouchAction(touchAction)}},updateElement:function(element,oldElement){var me=this,touchAction=me.getTouchAction(),scrollListener=me.scrollListener,elementCls=me.elementCls,eventSource,scrollEl;if(scrollListener){scrollListener.destroy();me.scrollListener=null;me.setScrollElement(null)}
if(oldElement&&!oldElement.destroyed){oldElement.setStyle('overflow','hidden');oldElement.removeCls(elementCls)}
if(element){if(element.dom===document.documentElement||element.dom===document.body){eventSource=Ext.getDoc();scrollEl=Ext.scroll.Scroller.getScrollingElement()}else{scrollEl=eventSource=element}
me.setScrollElement(Ext.get(scrollEl));me.scrollListener=eventSource.on({scroll:me.onDomScroll,scope:me,destroyable:!0});if(touchAction){element.setTouchAction(touchAction)}
me.initXStyle();me.initYStyle();element.addCls(elementCls);me.initSnap();me.initMsSnapInterval();me.syncScrollbarCls()}},updateX:function(x){this.initXStyle()},updateY:function(y){this.initYStyle()},deprecated:{'5':{methods:{getScroller:function(){return this}}},'5.1.0':{methods:{scrollToTop:function(animate){return this.scrollTo(0,0,animate)},scrollToEnd:function(animate){return this.scrollTo(Infinity,Infinity,animate)}}}},privates:{axisConfigs:{x:{x:!0},y:{y:!0},both:{x:!0,y:!0}},getEnsureVisibleXY:function(el,options){var position=this.getPosition(),viewport=this.component?this.component.getScrollableClientRegion():this.getElement(),newPosition,align;if(el&&el.element&&!el.isElement){options=el;el=options.element}
options=options||{};align=options.align;if(align){if(Ext.isString(align)){align={x:options.x===!1?null:align,y:options.y===!1?null:align}}else if(Ext.isObject(align)){if(align.x&&options.x===!1){align.x=null}
if(align.y&&options.y===!1){align.y=null}}}
newPosition=Ext.fly(el).getScrollIntoViewXY(viewport,position.x,position.y,align);newPosition.x=options.x===!1?position.x:newPosition.x;newPosition.y=options.y===!1?position.y:newPosition.y;return newPosition},getSpacer:function(){var me=this,spacer=me._spacer,element;if(!spacer){element=me.getElement();spacer=me._spacer=element.createChild({cls:me.spacerCls,role:'presentation'},element.dom.firstChild);spacer.setVisibilityMode(2);spacer.hide();element.position()}
return spacer},applySpacerXY:function(pos,oldPos){if(oldPos&&pos.x===oldPos.x&&pos.y===oldPos.y){pos=undefined}
return pos},updateSpacerXY:function(pos){var me=this,spacer=me.getSpacer(),sStyle=spacer.dom.style,scrollHeight=pos.y,shortfall;sStyle.marginTop='';me.translateSpacer(pos.x,me.constrainScrollRange(scrollHeight));sStyle.lineHeight=Number(!parseInt(sStyle.lineHeight,10))+'px';if(scrollHeight>1000000){shortfall=scrollHeight-me.getElement().dom.scrollHeight;if(shortfall>0){sStyle.marginTop=Math.min(shortfall,me.maxSpacerMargin||0)+'px'}}},translateSpacer:function(x,y){this.getSpacer().translate(x,y)},doIsInView:function(el,skipCheck){var me=this,c=me.component,result={x:!1,y:!1},elRegion,myEl=me.getElement(),myElRegion;if(el&&(skipCheck||(myEl.contains(el)||(c&&c.owns(el))))){myElRegion=myEl.getRegion();elRegion=Ext.fly(el).getRegion();result.x=elRegion.right>myElRegion.left&&elRegion.left<myElRegion.right;result.y=elRegion.bottom>myElRegion.top&&elRegion.top<myElRegion.bottom}
return result},contains:function(component){var el=this.getElement(),owner=component;while(owner&&owner!==Ext.Viewport){if(el.contains(owner.el)){return!0}
owner=owner.getRefOwner()}
return!1},constrainScrollRange:function(scrollRange){var maxScrollHeight,tooHigh,tooLow,scrollTest,stretcher,sStyle;if(scrollRange<1000000){return scrollRange}
if(!this.maxSpacerTranslate){maxScrollHeight=Math.pow(2,32);tooHigh=maxScrollHeight;tooLow=500;scrollTest=Ext.getBody().createChild({style:{position:'absolute',left:'-10000px',top:'0',width:'500px',height:'500px'},cn:{cls:this.spacerCls}},null,!0);stretcher=Ext.get(scrollTest.firstChild);sStyle=stretcher.dom.style;stretcher.translate(0,maxScrollHeight-1);sStyle.lineHeight=Number(!parseInt(sStyle.lineHeight,10))+'px';while(tooHigh!==tooLow+1){stretcher.translate(0,(maxScrollHeight=tooLow+Math.floor((tooHigh-tooLow)/2)));sStyle.lineHeight=Number(!parseInt(sStyle.lineHeight,10))+'px';if(scrollTest.scrollHeight<maxScrollHeight){tooHigh=maxScrollHeight}else{tooLow=maxScrollHeight}}
stretcher.translate(0,Ext.scroll.Scroller.prototype.maxSpacerTranslate=tooLow);tooHigh=tooLow*2;while(tooHigh!==tooLow+1){stretcher.dom.style.marginTop=((maxScrollHeight=tooLow+Math.floor((tooHigh-tooLow)/2)))+'px';sStyle.lineHeight=Number(!parseInt(sStyle.lineHeight,10))+'px';if(scrollTest.scrollHeight<maxScrollHeight){tooHigh=maxScrollHeight}else{tooLow=maxScrollHeight}}
Ext.fly(scrollTest).destroy();Ext.scroll.Scroller.prototype.maxSpacerMargin=tooLow-Ext.scroll.Scroller.prototype.maxSpacerTranslate}
return Math.min(scrollRange,this.maxSpacerTranslate)},convertX:function(x){return x},doHighlight:function(el,highlight){if(highlight!==!0){Ext.fly(el).highlight(highlight)}else{Ext.fly(el).highlight()}},doScrollTo:function(x,y,animate){var me=this,element=me.getScrollElement(),maxPosition,dom,xInf,yInf,ret,translatable,deferred;if(element&&!element.destroyed){dom=element.dom;xInf=(x===Infinity);yInf=(y===Infinity);if(xInf||yInf){maxPosition=me.getMaxPosition();if(xInf){x=maxPosition.x}
if(yInf){y=maxPosition.y}}
if(x!==null){x=me.convertX(x)}
if(animate){translatable=me.translatable;if(!translatable){me.translatable=translatable=new Ext.util.translatable.ScrollPosition({element:element})}
deferred=new Ext.Deferred();translatable.on('animationend',function(){if(me.destroyed){deferred.reject()}else{deferred.resolve()}},Ext.global,{single:!0,onFrame:!0});translatable.translate(x,y,animate);ret=deferred.promise}else{if(y!=null){dom.scrollTop=y}
if(x!=null){dom.scrollLeft=x}
ret=Ext.Deferred.getCachedResolved()}
me.positionDirty=!0}else{ret=Ext.Deferred.getCachedRejected()}
return ret},fireScrollStart:function(x,y,xDelta,yDelta){var me=this,component=me.component;me.invokePartners('onPartnerScrollStart',x,y,xDelta,yDelta);me.startX=x-xDelta;me.startY=y-yDelta;if(me.hasListeners.scrollstart){me.fireEvent('scrollstart',me,x,y)}
if(component&&component.onScrollStart){component.onScrollStart(x,y)}
Ext.GlobalEvents.fireEvent('scrollstart',me,x,y)},fireScroll:function(x,y,xDelta,yDelta){var me=this,component=me.component;me.invokePartners('onPartnerScroll',x,y,xDelta,yDelta);if(me.hasListeners.scroll){me.fireEvent('scroll',me,x,y,xDelta,yDelta)}
if(component&&component.onScrollMove){component.onScrollMove(x,y)}
Ext.GlobalEvents.fireEvent('scroll',me,x,y,xDelta,yDelta)},fireScrollEnd:function(x,y,xDelta,yDelta){var me=this,component=me.component,dx=x-me.startX,dy=y-me.startY;me.startX=me.startY=null;me.invokePartners('onPartnerScrollEnd',x,y,xDelta,yDelta);if(me.hasListeners.scrollend){me.fireEvent('scrollend',me,x,y,dx,dy)}
if(component&&component.onScrollEnd){component.onScrollEnd(x,y)}
Ext.GlobalEvents.fireEvent('scrollend',me,x,y,dx,dy)},getElementScroll:function(element){return element.getScroll()},initSnap:function(){var me=this,snapOffset=me.getSnapOffset(),snapSelector=me.getSnapSelector(),element=me.getElement(),offsetX,offsetY,snapCoordinate;if(element&&snapSelector){element.addCls(me.snappableCls);me.removeSnapStylesheet();if(snapOffset){offsetX=snapOffset.x||0;offsetY=snapOffset.y||0;if(offsetX){offsetX=-offsetX+'px'}
if(offsetY){offsetY=-offsetY+'px'}}
snapCoordinate=offsetX+' '+offsetY+';';me.snapStylesheet=Ext.util.CSS.createStyleSheet('#'+element.id+' '+snapSelector+'{-webkit-scroll-snap-coordinate:'+snapCoordinate+'scroll-snap-coordinate:'+snapCoordinate+'}')}},initMsSnapInterval:function(){var element=this.getElement(),interval,x,y,style;if(element){interval=this.getMsSnapInterval();if(interval){x=interval.x;y=interval.y;style=element.dom.style;if(x){style['-ms-scroll-snap-points-x']='snapInterval(0px, '+x+'px)'}
if(y){style['-ms-scroll-snap-points-y']='snapInterval(0px, '+y+'px)'}}}},initXStyle:function(){var element=this.getElement(),x=this.getX();if(element&&element.dom){if(!x){x='hidden'}else if(x===!0){x='auto'}
element.setStyle('overflow-x',x)}},initYStyle:function(){var element=this.getElement(),y=this.getY();if(element&&element.dom){if(!y){y='hidden'}else if(y===!0){y='auto'}
element.setStyle('overflow-y',y)}},invokePartners:function(method,x,y,xDelta,yDelta){var me=this,partners=me._partners,partner,id,axes;if(!me.suspendSync){me.invokingPartners=!0;for(id in partners){axes=partners[id].axes;partner=partners[id].scroller;if(!partner.invokingPartners&&(xDelta&&axes.x||yDelta&&axes.y)){partner[method](me,axes.x?x:null,axes.y?y:null,xDelta,yDelta)}}
me.invokingPartners=!1}},suspendPartnerSync:function(){this.suspendSync=(this.suspendSync||0)+1},resumePartnerSync:function(syncNow){var me=this,position;if(me.suspendSync){me.suspendSync--}
if(!me.suspendSync&&syncNow){position=me.getPosition();me.invokePartners('onPartnerScroll',position.x,position.y);me.invokePartners('onPartnerScrollEnd',position.x,position.y)}},readPosition:function(position){var me=this,element=me.getScrollElement(),elScroll;position=position||{};if(element&&!element.destroyed){elScroll=me.getElementScroll(element);position.x=elScroll.left;position.y=elScroll.top}
return position},updateDomScrollPosition:function(silent){var me=this,position=me.position,oldX=position.x,oldY=position.y,x,y,xDelta,yDelta;me.readPosition(position);x=position.x;y=position.y;me.positionDirty=!1;if(!silent){xDelta=x-oldX;yDelta=y-oldY;if(xDelta||yDelta){if(!me.isScrolling){me.isScrolling=Ext.isScrolling=!0;me.fireScrollStart(x,y,xDelta,yDelta)}
me.fireScroll(x,y,xDelta,yDelta);me.onDomScrollEnd(x,y,xDelta,yDelta)}}
return position},syncWithPartners:function(){var me=this,partners=me._partners,id,partner,position;me.suspendPartnerSync();for(id in partners){partner=partners[id].scroller;position=partner.getPosition();me.onPartnerScroll(partner,position.x,position.y)}
me.resumePartnerSync()},syncScrollbarCls:function(){var element=this.getElement();if(element){element.toggleCls(this.noScrollbarsCls,this.getScrollbars()===!1)}},onDomScroll:function(){var hasTimer=!!this.restoreTimer;this.updateDomScrollPosition(hasTimer);if(hasTimer){Ext.undefer(this.onDomScrollEnd.timer);return}},doOnDomScrollEnd:function(x,y,xDelta,yDelta){var me=this;if(me.destroying||me.destroyed){return}
me.isScrolling=Ext.isScrolling=!1;if(x===undefined){return}
me.trackingScrollLeft=x;me.trackingScrollTop=y;me.fireScrollEnd(x,y,xDelta,yDelta)},onPartnerScrollStart:function(partner,x,y,xDelta,yDelta){this.isScrolling=!0;this.fireScrollStart(x,y,xDelta,yDelta)},onPartnerScroll:function(partner,x,y,xDelta,yDelta){this.doScrollTo(x,y,!1);this.updateDomScrollPosition(!0);this.fireScroll(x,y,xDelta,yDelta)},onPartnerScrollEnd:function(partner,x,y,xDelta,yDelta){this.cancelOnDomScrollEnd();this.doOnDomScrollEnd(x,y,xDelta,yDelta)},removeSnapStylesheet:function(){var stylesheet=this.snapStylesheet;if(stylesheet){Ext.util.CSS.removeStyleSheet(stylesheet);this.snapStylesheet=null}},restoreState:function(){var me=this,el=me.getScrollElement();if(el){if(me.trackingScrollTop!==undefined){if(!me.restoreTimer){me.restoreTimer=Ext.defer(function(){me.restoreTimer=null},50)}
me.doScrollTo(me.trackingScrollLeft,me.trackingScrollTop,!1)}}}}},function(Scroller){Ext.getViewportScroller=function(){var scroller=Scroller.viewport;if(!scroller){Scroller.viewport=scroller=new Scroller();Scroller.initViewportScroller()}
return scroller};Ext.setViewportScroller=function(scroller){if(Scroller.viewport!==scroller){Ext.destroy(Scroller.viewport);if(scroller&&!scroller.isScroller){scroller=new Scroller(scroller)}
Scroller.viewport=scroller}};Ext.onReady(function(){Scroller.initViewportScrollerTimer=Ext.defer(Scroller.initViewportScroller,100)})})
;
Ext.define('Ext.rtl.scroll.Scroller',{override:'Ext.scroll.Scroller',config:{rtl:null},updateRtl:Ext.emptyFn,privates:{convertX:function(x){var element;if(this.getRtl()){element=this.getElement();if(element){x=element.rtlNormalizeScrollLeft(x)}}
return x},getElementScroll:function(element){return this.getRtl()?element.rtlGetScroll():element.getScroll()},translateSpacer:function(x,y){if(this.getRtl()){this.getSpacer().dom.style.right=(x-1)+'px';this.callParent([null,y])}else{this.callParent([x,y])}}}})
;
Ext.define('Ext.util.Floating',{mixinId:'floating',uses:['Ext.ZIndexManager'],focusOnToFront:!0,shadow:'sides',animateShadow:!1,constrain:!1,alignOnScroll:!0,config:{activeCounter:0,alwaysOnTop:!1},preventDefaultAlign:!1,_visModeMap:{visibility:1,display:2,offsets:3},constructor:function(){var me=this,el=me.el,shadow=me.shadow,shadowOffset,shadowConfig;if(shadow){shadowConfig={mode:(shadow===!0)?'sides':shadow};shadowOffset=me.shadowOffset;if(shadowOffset){shadowConfig.offset=shadowOffset}
shadowConfig.animate=me.animateShadow;shadowConfig.fixed=me.fixed;el.enableShadow(shadowConfig,!1)}
if(me.shim||Ext.useShims){el.enableShim({fixed:me.fixed},!1)}
el.setVisibilityMode(me._visModeMap[me.hideMode]);me.el.on({mousedown:me.onMouseDown,scope:me,capture:!0});me.registerWithOwnerCt();me.initHierarchyEvents()},alignTo:function(alignTarget,position,offsets,animate,monitorScroll){var me=this,alignEl,destroyed,dom,myXY,anchorXY,listeners;if(alignTarget.isComponent){alignEl=alignTarget.el;destroyed=alignTarget.destroyed}else{me.alignTargetFly=me.alignTargetFly||new Ext.dom.Fly();alignEl=alignTarget=me.alignTargetFly.attach(alignTarget);dom=alignEl.dom;destroyed=!dom||Ext.isGarbage(dom)}
if(destroyed){me._lastAlignTarget=null;if(me.alignListeners){me.alignListeners.destroy()}
return}
me.mixins.positionable.alignTo.call(me,alignEl,position,offsets,animate,monitorScroll!==!1);myXY=me.getXY();anchorXY=alignTarget.getXY();me.alignVector=[myXY[0]-anchorXY[0],myXY[1]-anchorXY[1]];me._lastAlignTarget=alignTarget;me._lastAlignToPos=position;me._lastAlignToOffsets=offsets;me._topAlignTarget=me.getTopAlignTarget();me.clearClip();if(!me.alignListeners){listeners={resize:{fn:me.alignOnResize,buffer:100},scope:me,destroyable:!0};if(me.alignOnScroll&&!alignEl.contains(me.el)){listeners.scroll=me.doRealign}
me.alignListeners=Ext.on(listeners)}},initFloatConstrain:function(){var me=this,floatParent=me.floatParent;if((me.constrain||me.constrainHeader)&&!me.constrainTo){me.constrainTo=floatParent?floatParent.getTargetEl():me.container}},initHierarchyEvents:function(){var me=this;if(!me.hierarchyEventListeners){me.hierarchyEventListeners=Ext.on({hide:'syncHidden',collapse:'syncHidden',show:'syncHidden',expand:'syncHidden',added:'syncHidden',scope:me,destroyable:!0})}},registerWithOwnerCt:function(){var me=this,ownerCt=me.ownerCt,zip=me.zIndexParent;if(zip){zip.unregisterFloatingItem(me)}
zip=me.zIndexParent=me.up('[floating]');me.floatParent=ownerCt||zip;me.initFloatConstrain();delete me.ownerCt;if(zip){zip.registerFloatingItem(me)}else{Ext.WindowManager.register(me)}},onMouseDown:function(e){var me=this,focusTask=me.focusTask,owner=me.getRefOwner(),preventFocus=e.pointerType==='touch',target,dom,skipFronting;if(me.floating&&(!focusTask||!focusTask.id)){if(me.owns(Ext.Element.getActiveElement())){preventFocus={ownsFocus:!0}}
target=e.target;dom=me.el.dom;while(!preventFocus&&target&&target!==dom){if(Ext.fly(target).isFocusable()){preventFocus={ownsFocus:!0}}
target=target.parentNode}
skipFronting=Ext.WindowManager.getActive()===me&&(target===dom||preventFocus);if(!skipFronting){me.toFront(preventFocus)}
if(!preventFocus&&owner&&owner.containsFocus){e.preventDefault()}}},onBeforeFloatLayout:function(){this.el.preventSync=!0},onAfterFloatLayout:function(){var el=this.el;if(el.shadow||el.shim){el.setUnderlaysVisible(el.getData().isVisible!==!1);el.syncUnderlays()}},syncHidden:function(){var me=this,hidden=me.hidden||!me.rendered,hierarchicallyHidden=me.hierarchicallyHidden=me.isHierarchicallyHidden(),pendingShow=me.pendingShow;if(hidden!==hierarchicallyHidden){if(hierarchicallyHidden){me.hide();me.pendingShow=!0}else if(pendingShow){delete me.pendingShow;if(pendingShow.length){me.show.apply(me,pendingShow)}else{me.show()}}}},setZIndex:function(index){var me=this;me.el.setZIndex(index);index+=10;if(me.floatingDescendants){index=Math.floor(me.floatingDescendants.setBase(index)/100)*100+10000}
return index},doConstrain:function(constrainTo){var me=this,xy=me.calculateConstrainedPosition(constrainTo,null,!0);if(xy){me.setPosition(xy)}},updateActiveCounter:function(activeCounter){var me=this,zim=me.zIndexParent;if(zim&&zim!==zim.zIndexManager.front&&me.bringParentToFront!==!1){zim.setActiveCounter(++Ext.ZIndexManager.activeCounter)}
zim=me.zIndexManager;if(zim){zim.onComponentUpdate(me)}},updateAlwaysOnTop:function(alwaysOnTop){var z=this.zIndexManager;if(z){z.onComponentUpdate(this)}},toFront:function(preventFocus){var me=this;if(me.zIndexManager.bringToFront(me,preventFocus||!me.focusOnToFront)){if(me.hasListeners.tofront){me.fireEvent('tofront',me,me.el.getZIndex())}}
return me},onZIndexChange:function(isTopMost){var me=this;if(isTopMost){if(me.el.shadow&&me.el.getData().isVisible!==!1&&!me.maximized){me.el.enableShadow(null,!0)}
me.fireEvent('activate',me)}else{me.fireEvent('deactivate',me)}},onFocusTopmost:function(){var activeCmp=Ext.ComponentManager.getActiveComponent();if(!activeCmp||!activeCmp.up(this)){this.focus()}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var me=this,parent=me.floatParent,xy;if(me.isVisible()){xy=me.getAlignToXY(parent?parent.getTargetEl():me.container,'c-c');me.setPagePosition(xy)}else{me.needsCenter=!0}
return me},onFloatShow:function(){var me=this,target=me._lastAlignTarget;if(me.needsCenter){me.center()}else if(target){if(target.destroyed){me._lastAlignTarget=null}else{me.alignTo(target,me._lastAlignToPos,me._lastAlignToOffsets,!1,!me.fixed)}}
me.needsCenter=!1},fitContainer:function(animate){var me=this,parent=me.floatParent,container=parent?parent.getTargetEl():me.container,newBox=container.getViewSize(),newPosition=parent||(container.dom!==document.body)?[0,0]:container.getXY();newBox.x=newPosition[0];newBox.y=newPosition[1];me.setBox(newBox,animate)},privates:{onFloatDestroy:function(){var me=this,fly=me.alignTargetFly;if(me.hierarchyEventListeners){me.hierarchyEventListeners.destroy();me.hierarchyEventListeners=null}
me.clearAlignEl();if(fly){fly.detach();fly.destroy()}},getTopAlignTarget:function(){var next=this._lastAlignTarget,result=next;while(next&&(result=next)&&next.isComponent){if(result.isFloating()){next=result._lastAlignTarget}else{next=result.up('{isFloating()}');next=next&&next._lastAlignTarget}}
return result},clearAlignEl:function(){var me=this;if(me._lastAlignTarget){me.alignListeners=Ext.destroy(me.alignListeners);Ext.un('scroll',me.doRealign,me);me._lastAlignToPos=me._lastAlignTarget=me._lastAlignToOffsets=me._topAlignTarget=null}},alignOnResize:function(){this.doRealign()},doRealign:function(scroller){var me=this,alignEl=me._lastAlignTarget.el,destroyed,dom,anchorXY,myXY;if(alignEl&&me.isVisible()){if(alignEl.isComponent){destroyed=alignEl.destroyed}else{dom=alignEl.dom;destroyed=!dom||Ext.isGarbage(dom)}
if(destroyed){me.clearAlignEl()}else if(!scroller||(scroller.getElement().contains(me._topAlignTarget.el)&&!scroller.getElement().contains(me.el))){anchorXY=alignEl.getXY();myXY=[anchorXY[0]+me.alignVector[0],anchorXY[1]+me.alignVector[1]];me.setXY(myXY);if(scroller){me.clipToScroller(scroller)}}}},clipToScroller:function(scroller){var me=this,anchorBox=me._topAlignTarget.getBox(),scrollerBox=scroller.getElement().getConstrainRegion(),sides=0;if(anchorBox.top<scrollerBox.top){sides=1}
if(anchorBox.right>scrollerBox.right){sides=sides|2}
if(anchorBox.bottom>scrollerBox.bottom){sides=sides|4}
if(anchorBox.left<scrollerBox.left){sides=sides|8}
if(sides){me.clipTo(scrollerBox,sides)}else{me.clearClip()}}}})
;
Ext.define('Ext.util.ElementContainer',{mixinId:'elementCt',config:{childEls:{$value:{},cached:!0,lazy:!0,merge:function(newValue,oldValue,target,mixinClass){var childEls=oldValue?Ext.Object.chain(oldValue):{},i,val;if(newValue instanceof Array){for(i=newValue.length;i--;){val=newValue[i];if(!mixinClass||!(val in childEls)){if(typeof val==='string'){childEls[val]={name:val,itemId:val}}else{childEls[val.name]=val}}}}else if(newValue){if(newValue.constructor===Object){for(i in newValue){if(!mixinClass||!(i in childEls)){val=newValue[i];if(val===!0){childEls[i]={itemId:i}}else if(typeof val==='string'){childEls[i]={itemId:val}}else{childEls[i]=val;if(!('itemId' in val)){val.itemId=i}}
childEls[i].name=i}}}else{if(!mixinClass||!(newValue in childEls)){childEls[newValue]={name:newValue,itemId:newValue}}}}
return childEls}}},destroy:function(){var me=this,childEls=me.getChildEls(),child,childName;for(childName in childEls){child=me[childName];if(child){if(child.destroy){child.component=null;child.destroy()}
me[childName]=null}}},privates:{addChildEl:function(childEl){var me=this,childEls=me.getChildEls();if(!me.hasOwnProperty('childEls')){me.childEls=childEls=Ext.Object.chain(childEls)}
if(typeof childEl==='string'){childEl={name:childEl,itemId:childEl}}
childEls[childEl.name]=childEl},afterClassMixedIn:function(targetClass){var proto=targetClass.prototype,childEls=proto.childEls;if(childEls){delete proto.childEls;targetClass.getConfigurator().add({childEls:childEls})}},attachChildEls:function(el,owner){var me=this,childEls=me.getChildEls(),comp=owner||me,baseId=comp.id+'-',unframed=!comp.frame,childName,elements,entry,k,selector,value,id;for(childName in childEls){entry=childEls[childName];if(unframed&&entry.frame){continue}
selector=entry.select;if(selector){value=el.select(selector,!0)}else if(!(selector=entry.selectNode)){if(!(id=entry.id)){id=baseId+entry.itemId;value=Ext.cache[id]}else{value=Ext.cache[id]||el.getById(id)}}else{value=el.selectNode(selector,!1)}
if(value){if(value.isElement){value.component=comp}else if(value.isComposite&&!value.isLite){elements=value.elements;for(k=elements.length;k--;){elements[k].component=comp}}}
me[childName]=value||null}}}})
;
Ext.define('Ext.util.Renderable',{mixinId:'renderable',requires:['Ext.dom.Element'],frameIdRegex:/[-]frame\d+[TMB][LCR]$/,frameCls:Ext.baseCSSPrefix+'frame',frameElNames:['TL','TC','TR','ML','MC','MR','BL','BC','BR','Table'],frameTpl:['<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'before\'); %}</tpl>','<tpl if="top">','<tpl if="left"><div id="{fgid}TL" data-ref="frameTL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>{frameElCls}" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" data-ref="frameTR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>{frameElCls}" role="presentation"></tpl>','<div id="{fgid}TC" data-ref="frameTC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>{frameElCls}" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','</tpl>','<tpl if="left"><div id="{fgid}ML" data-ref="frameML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>{frameElCls}" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" data-ref="frameMR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>{frameElCls}" role="presentation"></tpl>','<div id="{fgid}Body" data-ref="frameBody" class="{frameBodyCls} {frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>{frameElCls}" role="presentation">','{%this.applyRenderTpl(out, values)%}','</div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" data-ref="frameBL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>{frameElCls}" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" data-ref="frameBR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>{frameElCls}" role="presentation"></tpl>','<div id="{fgid}BC" data-ref="frameBC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>{frameElCls}" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','</tpl>','<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'after\'); %}</tpl>'],frameTableTpl:['<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'before\'); %}</tpl>','<table id="{fgid}Table" data-ref="frameTable" class="{frameCls} ',Ext.baseCSSPrefix+'table-plain" cellpadding="0" role="presentation">','<tpl if="top">','<tr role="presentation">','<tpl if="left"><td id="{fgid}TL" data-ref="frameTL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}TC" data-ref="frameTC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>{frameElCls}" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" data-ref="frameTR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>{frameElCls}" role="presentation"></td></tpl>','</tr>','</tpl>','<tr role="presentation">','<tpl if="left"><td id="{fgid}ML" data-ref="frameML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}Body" data-ref="frameBody" class="{frameBodyCls} {frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>{frameElCls}" style="{mcStyle}" role="presentation">','{%this.applyRenderTpl(out, values)%}','</td>','<tpl if="right"><td id="{fgid}MR" data-ref="frameMR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>{frameElCls}" role="presentation"></td></tpl>','</tr>','<tpl if="bottom">','<tr role="presentation">','<tpl if="left"><td id="{fgid}BL" data-ref="frameBL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}BC" data-ref="frameBC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>{frameElCls}" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" data-ref="frameBR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>{frameElCls}" role="presentation"></td></tpl>','</tr>','</tpl>','</table>','<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'after\'); %}</tpl>'],_renderState:0,_layerCls:Ext.baseCSSPrefix+'layer',_fixedLayerCls:Ext.baseCSSPrefix+'fixed-layer',ariaStaticRoles:{presentation:!0,article:!0,definition:!0,directory:!0,document:!0,img:!0,heading:!0,math:!0,note:!0,banner:!0,complementary:!0,contentinfo:!0,navigation:!0,search:!0,'undefined':!0,'null':!0},statics:{makeRenderSetter:function(cfg,renderState){var name=cfg.name;return function(value){var me=this,bucket=(me.renderConfigs||(me.renderConfigs={})),pending=bucket[renderState];if(me._renderState>=renderState){(cfg.setter||cfg.getSetter()).call(me,value)}else{if(!pending){bucket[renderState]=pending={}}
if(!(name in pending)){pending[name]=me[name]}
me[name]=value}
return me}},processRenderConfig:function(source,configName,state){var proto=this.prototype,configurator=this.getConfigurator(),Renderable=Ext.util.Renderable,makeSetter=Renderable.makeRenderSetter,renderConfig=source[configName],cachedSetter,cfg,name,setterName;for(name in renderConfig){cfg=Ext.Config.get(name);if(!proto[setterName=cfg.names.set]){cachedSetter=(cfg.renderSetter||(cfg.renderSetter={}));proto[setterName]=cachedSetter[state]||(cachedSetter[state]=makeSetter(cfg,state))}}
delete source[configName];configurator.add(renderConfig)}},onClassMixedIn:function(targetClass){var override=targetClass.override,processRenderConfig=this.processRenderConfig,processOverride=function(body){if(body.beforeRenderConfig){this.processRenderConfig(body,'beforeRenderConfig',1)}
if(body.renderConfig){this.processRenderConfig(body,'renderConfig',3)}
override.call(this,body)},processClass=function(theClass,classBody){theClass.override=processOverride;theClass.processRenderConfig=processRenderConfig;if(classBody.beforeRenderConfig){theClass.processRenderConfig(classBody,'beforeRenderConfig',1)}
if(classBody.renderConfig){theClass.processRenderConfig(classBody,'renderConfig',3)}};processClass(targetClass,targetClass.prototype);targetClass.onExtended(processClass)},afterRender:function(){var me=this,data={},protoEl=me.protoEl,target=me.el,controller,item,pre,hidden,contentEl;me.finishRenderChildren();me._renderState=4;if(me.contentEl){pre=Ext.baseCSSPrefix;hidden=pre+'hidden-';contentEl=me.contentEl=Ext.get(me.contentEl);contentEl.component=me;contentEl.removeCls([pre+'hidden',hidden+'display',hidden+'offsets']);me.getContentTarget().appendChild(contentEl.dom)}
protoEl.writeTo(data);item=data.removed;if(item){target.removeCls(item)}
item=data.cls;if(item.length){target.addCls(item)}
item=data.style;if(data.style){target.setStyle(item)}
me.protoEl=null;if(!me.ownerCt&&!me.skipLayout){me.updateLayout()}
if(!(me.x&&me.y)&&(me.pageX||me.pageY)){me.setPagePosition(me.pageX,me.pageY)}
if(me.disableOnRender){me.onDisable()}
controller=me.controller;if(controller&&controller.afterRender){controller.afterRender(me)}
if(me.focusableContainer&&me.initFocusableContainer){me.initFocusableContainer()}},afterFirstLayout:function(width,height){var me=this,x=me.x,y=me.y,alignSpec=me.defaultAlign,alignOffset=me.alignOffset,controller,hasX,hasY,pos,xy;if(!me.ownerLayout){hasX=x!==undefined;hasY=y!==undefined}
if(me.floating&&!me.preventDefaultAlign&&(!hasX||!hasY)){if(me.floatParent){pos=me.floatParent.getTargetEl().getViewRegion();xy=me.el.getAlignToXY(me.alignTarget||me.floatParent.getTargetEl(),alignSpec,alignOffset);pos.x=xy[0]-pos.x;pos.y=xy[1]-pos.y}else{xy=me.el.getAlignToXY(me.alignTarget||me.container,alignSpec,alignOffset);pos=me.el.translateXY(xy[0],xy[1])}
x=hasX?x:pos.x;y=hasY?y:pos.y;hasX=hasY=!0}
if(hasX||hasY){me.setPosition(x,y)}
me.onBoxReady(width,height);controller=me.controller;if(controller&&controller.boxReady){controller.boxReady(me,width,height)}},beforeRender:function(){var me=this,floating=me.floating,layout=me.getComponentLayout(),cls=me.userCls,controller;me._renderState=1;me.ariaUsesMainElement=me.ariaEl==='el';controller=me.controller;if(controller&&controller.beforeRender){controller.beforeRender(me)}
me.initBindable();if(me.renderConfigs){me.flushRenderConfigs()}
if(cls){me.addCls(cls)}
if(floating){me.addCls(me.fixed?me._fixedLayerCls:me._layerCls);cls=floating.cls;if(cls){me.addCls(cls)}}
me.frame=me.frame||me.alwaysFramed;if(!layout.initialized){layout.initLayout()}
me.initOverflow();me.setUI(me.ui)},doApplyRenderTpl:function(out,values){var me=values.$comp,tpl;if(!me.rendered){tpl=me.initRenderTpl();tpl.applyOut(values.renderData,out)}},getElConfig:function(){var me=this,autoEl=me.autoEl,frameInfo=me.getFrameInfo(),config={tag:'div',tpl:frameInfo?me.initFramingTpl(frameInfo.table):me.initRenderTpl()},layoutTargetCls=me.layoutTargetCls,protoEl=me.protoEl,ariaRole=me.ariaRole,frameData;me.initStyles(protoEl);if(layoutTargetCls&&!frameInfo){protoEl.addCls(layoutTargetCls)}
protoEl.writeTo(config);protoEl.flush();if(autoEl){if(Ext.isString(autoEl)){config.tag=autoEl}else{Ext.apply(config,autoEl)}}
if(ariaRole&&me.ariaUsesMainElement){config.role=ariaRole;if(!me.ariaStaticRoles[ariaRole]){config['aria-hidden']=!!me.hidden;config['aria-disabled']=!!me.disabled;if(me.ariaLabel&&!me.ariaLabelledBy){config['aria-label']=me.ariaLabel}
if(me.collapsible){config['aria-expanded']=!me.collapsed}
if(me.ariaRenderAttributes){Ext.apply(config,me.ariaRenderAttributes)}
if(me.config.ariaAttributes){Ext.apply(config,me.getAriaAttributes())}}}
config.id=me.id;if(config.tpl){if(frameInfo){config.tplData=frameData=me.getFrameRenderData();frameData.renderData=me.initRenderData()}else{config.tplData=me.initRenderData()}}
me.ariaRenderAttributes=null;return config},getInsertPosition:function(position){if(position!==undefined){if(Ext.isNumber(position)){position=this.container.dom.childNodes[position]}else{position=Ext.getDom(position)}}
return position},getRenderTree:function(){var me=this,ret=null;if(!me.hasListeners.beforerender||me.fireEvent('beforerender',me)!==!1){me._renderState=1;me.beforeRender();me.rendering=!0;me._renderState=2;ret=me.getElConfig();if(me.el){ret.id=me.$pid=Ext.id(null,me.el.identifiablePrefix)}}
return ret},initRenderData:function(){var me=this,ariaRole=me.ariaRole,data,ariaAttr;data=Ext.apply({$comp:me,id:me.id,ui:me.ui,uiCls:me.uiCls,baseCls:me.baseCls,componentCls:me.componentCls,frame:me.frame,hasTabGuard:!!me.tabGuard,scrollerCls:me.scrollerCls,childElCls:'',ariaEl:me.ariaEl},me.renderData);if(ariaRole&&!me.ariaUsesMainElement){ariaAttr={role:ariaRole};if(!me.ariaStaticRoles[ariaRole]){ariaAttr['aria-hidden']=!!me.hidden;ariaAttr['aria-disabled']=!!me.disabled;if(me.ariaLabel&&!me.ariaLabelledBy){ariaAttr['aria-label']=me.ariaLabel}
if(me.collapsible){ariaAttr['aria-expanded']=!me.collapsed}
if(me.ariaRenderAttributes){Ext.apply(ariaAttr,me.ariaRenderAttributes)}
if(me.config.ariaAttributes){Ext.apply(ariaAttr,me.getAriaAttributes())}}
data.ariaAttributes=ariaAttr}
return data},onRender:function(parentNode,containerIdx){var me=this,x=me.x,y=me.y,lastBox=null,el=me.el,scroller=me.scrollable,width,height;me.applyRenderSelectors();if(scroller&&scroller.isScroller){scroller.setElement(me.getOverflowEl());if(Ext.isIE){me.showListenerIE=Ext.on('show',me.onGlobalShow,me,{destroyable:!0})}}
me.rendering=null;me.rendered=!0;me._renderState=3;if(me.renderConfigs){me.flushRenderConfigs()}
if(x!=null){lastBox={x:x}}
if(y!=null){(lastBox=lastBox||{}).y=y}
if(!me.getFrameInfo()){width=me.width;height=me.height;if(typeof width==='number'){lastBox=lastBox||{};lastBox.width=width}
if(typeof height==='number'){lastBox=lastBox||{};lastBox.height=height}}
me.lastBox=el.lastBox=lastBox},render:function(container,position){var me=this,el=me.el,ownerLayout=me.ownerLayout,vetoed,tree,nextSibling;if(el&&!el.isElement){me.wrapPrimaryEl(el);el=me.el}
if(!me.skipLayout){Ext.suspendLayouts()}
container=me.initContainer(container);nextSibling=me.getInsertPosition(position);if(!el){tree=me.getRenderTree();if(ownerLayout&&ownerLayout.transformItemRenderTree){tree=ownerLayout.transformItemRenderTree(tree)}
if(tree){if(nextSibling){el=Ext.DomHelper.insertBefore(nextSibling,tree)}else{el=Ext.DomHelper.append(container,tree)}
me.wrapPrimaryEl(el);me.cacheRefEls(el)}}else{if(!me.hasListeners.beforerender||me.fireEvent('beforerender',me)!==!1){me.beforeRender();me.needsRenderTpl=me.rendering=!0;me._renderState=2;me.initStyles(el);if(me.allowDomMove!==!1){if(nextSibling){container.dom.insertBefore(el.dom,nextSibling)}else{container.dom.appendChild(el.dom)}}}else{vetoed=!0}}
if(el&&!vetoed){me.finishRender(position)}
if(!me.skipLayout){Ext.resumeLayouts(!me.hidden&&!container.isDetachedBody)}},ensureAttachedToBody:function(runLayout){var comp=this,body;while(comp.ownerCt){comp=comp.ownerCt}
if(comp.container.isDetachedBody){comp.container=body=Ext.getBody();body.appendChild(comp.el.dom);if(runLayout){comp.updateLayout()}
if(typeof comp.x==='number'||typeof comp.y==='number'){comp.setPosition(comp.x,comp.y)}}},privates:{applyRenderSelectors:function(){var me=this,selectors=me.renderSelectors,el=me.el,query,selector;me.attachChildEls(el);if(typeof me.focusEl==='string'){me.focusEl=me[me.focusEl]}
me.ariaEl=me[me.ariaEl]||me.el;if(selectors){for(selector in selectors){query=selectors[selector];if(query){me[selector]=el.selectNode(query,!1)}}}},cacheRefEls:function(el){el=el||this.el;var cache=Ext.cache,El=Ext.dom.Element,dom=el.isElement?el.dom:el,refs=dom.querySelectorAll('[data-ref]'),len=refs.length,ref,i;for(i=0;i<len;i++){ref=refs[i];if(!cache[ref.id]){new El(ref)}}},doAutoRender:function(){var me=this;if(!me.rendered){if(me.floating){me.render(me.renderTo||document.body)}else{me.render(Ext.isBoolean(me.autoRender)?Ext.getBody():me.autoRender)}}},doRenderContent:function(out,renderData){var me=renderData.$comp,data=me.data;if(me.html){Ext.DomHelper.generateMarkup(me.html,out);delete me.html}
if(me.tpl){if(!me.tpl.isTemplate){me.tpl=new Ext.XTemplate(me.tpl)}
if(data){me.data=data=data.isEntity?data.getData(!0):data;me.tpl.applyOut(data,out)}}},doRenderFramingTabGuard:function(out,renderData,position){var layout=renderData.$comp.layout;renderData.renderData.$skipTabGuards=!0;if(layout&&layout.doRenderTabGuard){layout.doRenderTabGuard.call(this,out,renderData,position)}},flushRenderConfigs:function(){var me=this,configs=me.renderConfigs,state=me._renderState,bucket,i,name,newConfigs,value;if(configs){for(i=0;i<=state;++i){bucket=configs[i];if(bucket){configs[i]=null;for(name in bucket){value=bucket[name];(newConfigs||(newConfigs={}))[name]=me[name];me[name]=value}}}
if(newConfigs){me.setConfig(newConfigs)}}},finishRender:function(containerIdx){var me=this,cache=Ext.cache,proxy,first,id,tpl,data,dom,el;if(!me.el||me.$pid){if(me.container){el=cache[me.id];dom=el?el.dom:me.container.getById(me.id,!0)}else{id=me.$pid||me.id;el=cache[id];dom=el?el.dom:Ext.getDom(id)}
if(!me.el){me.wrapPrimaryEl(dom)}else{delete me.$pid;if(!me.el.dom){me.wrapPrimaryEl(me.el)}
dom.parentNode.insertBefore(me.el.dom,dom);proxy=dom;dom=me.el.dom;first=dom.firstChild;while(proxy.firstChild){dom.insertBefore(proxy.firstChild,first)}
me.el.addCls(proxy.className);Ext.removeNode(proxy)}}else if(me.needsRenderTpl){tpl=me.initRenderTpl();if(tpl){data=me.initRenderData();tpl.insertFirst(me.getTargetEl(),data)}
me.cacheRefEls()}
me.el.component=me;if(!me.container){me.container=Ext.get(me.el.dom.parentNode)}
if(me.ctCls){me.container.addCls(me.ctCls)}
me.onRender(me.container,containerIdx);if(!me.overflowInited){me.initOverflow()}
me.el.setVisibilityMode(Ext.Element[me.hideMode.toUpperCase()]);if(me.overCls){me.el.hover(me.addOverCls,me.removeOverCls,me)}
if(me.hasListeners.render){me.fireEvent('render',me)}
me.afterRender();if(me.hasListeners.afterrender){me.fireEvent('afterrender',me)}
me.initEvents();if(me.hidden){me.el.hide()}},finishRenderChildren:function(){var layout=this.getComponentLayout();layout.finishRender()},getFrameRenderData:function(){var me=this,frameInfo=me.frameSize,mcStyle='';if(me._syncFrameHeight&&me.height){mcStyle='height:'+(me.height-frameInfo.height)+'px'}
return{$comp:me,id:me.id,fgid:me.id+'-frame',ui:me.ui,uiCls:me.uiCls,frameCls:me.frameCls,frameBodyCls:me.layoutTargetCls||'',baseCls:me.baseCls,hasTabGuard:me.tabGuard,top:!!frameInfo.top,left:!!frameInfo.left,right:!!frameInfo.right,bottom:!!frameInfo.bottom,mcStyle:mcStyle,frameElCls:''}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return!1}
var me=this,frameInfoCache=me.frameInfoCache,cls=me.getFramingInfoCls()+'-frameInfo',frameInfo=frameInfoCache[cls],styleEl,info,frameTop,frameRight,frameBottom,frameLeft,borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth,paddingTop,paddingRight,paddingBottom,paddingLeft;if(frameInfo==null){styleEl=Ext.fly(me.getStyleProxy(cls),'frame-style-el');info=styleEl.getStyle('font-family');info=info&&info.split('-');if(info&&info.length>=5){frameTop=parseInt(info[1],10);frameRight=parseInt(info[2],10);frameBottom=parseInt(info[3],10);frameLeft=parseInt(info[4],10);borderTopWidth=parseInt(info[5],10)||0;borderRightWidth=parseInt(info[6],10)||0;borderBottomWidth=parseInt(info[7],10)||0;borderLeftWidth=parseInt(info[8],10)||0;paddingTop=parseInt(info[9],10)||0;paddingRight=parseInt(info[10],10)||0;paddingBottom=parseInt(info[11],10)||0;paddingLeft=parseInt(info[12],10)||0;frameInfo={table:info[0].charAt(0)==='t',vertical:info[0].charAt(1)==='v',top:frameTop,right:frameRight,bottom:frameBottom,left:frameLeft,width:frameLeft+frameRight,height:frameTop+frameBottom,border:{top:borderTopWidth,right:borderRightWidth,bottom:borderBottomWidth,left:borderLeftWidth,width:borderLeftWidth+borderRightWidth,height:borderTopWidth+borderBottomWidth},padding:{top:paddingTop,right:paddingRight,bottom:paddingBottom,left:paddingLeft,width:paddingLeft+paddingRight,height:paddingTop+paddingBottom}}}else{frameInfo=!1}
if(me.frame===!0&&!frameInfo){Ext.log.error('You have set frame: true explicity on this component ('+me.getXType()+') and it does not have any framing defined in the CSS template. '+'In this case IE cannot figure out what sizes to use and thus framing '+'on this component will be disabled.')}
frameInfoCache[cls]=frameInfo}
me.frame=!!frameInfo;me.frameSize=frameInfo;return frameInfo},getFramingInfoCls:function(){return this.baseCls+'-'+this.ui},getStyleProxy:function(cls){var result;result=this.styleProxyEl||(Ext.Component.prototype.styleProxyEl=Ext.getBody().createChild({'data-sticky':!0,role:'presentation',style:{position:'absolute',top:'-10000px'}},null,!0));result.className=cls;return result},getFrameTpl:function(table){return this.lookupTpl(table?'frameTableTpl':'frameTpl')},initContainer:function(container){var me=this;if(!container&&me.el){container=me.el.dom.parentNode;me.allowDomMove=!1}
me.container=container.dom?container:Ext.get(container);return me.container},initOverflow:function(){var me=this,overflowStyle=me.getOverflowStyle(),scrollFlags=me.scrollFlags,overflowEl=me.getOverflowEl(),hasOverflow=(scrollFlags.y||scrollFlags.x);if(!hasOverflow||!overflowEl||!overflowEl.isElement){return}
me.overflowInited=!0;overflowEl.setStyle(overflowStyle)},initFramingTpl:function(table){var tpl=this.getFrameTpl(table);if(tpl&&!tpl.applyRenderTpl){this.setupFramingTpl(tpl)}
return tpl},initRenderTpl:function(){var tpl=this.lookupTpl('renderTpl');if(tpl&&!tpl.renderContent){this.setupRenderTpl(tpl)}
return tpl},setupFramingTpl:function(frameTpl){frameTpl.applyRenderTpl=this.doApplyRenderTpl;frameTpl.renderTabGuard=this.doRenderFramingTabGuard},setupRenderTpl:function(renderTpl){renderTpl.renderBody=renderTpl.renderContent=this.doRenderContent},updateFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}
var me=this,dom=me.el.dom,frameTable=me.frameTable,oldFrameBody=me.frameBody,oldFrameBodyDom=oldFrameBody.dom,frameInfo=me.getFrameInfo(),childEls,childElName,div,el,first,frameData,frameDom,frameTpl,i,newBody,newFrameEls;div=document.createElement('div');frameData=me.getFrameRenderData();frameData.hasTabGuard=!1;frameTpl=me.getFrameTpl(frameInfo.table);frameTpl.insertFirst(div,frameData);newFrameEls=div.querySelectorAll('[data-ref]');newBody=div.querySelector('[data-ref="frameBody"]');for(first=oldFrameBodyDom;first.parentNode!==dom;){first=first.parentNode}
while(div.firstChild){dom.insertBefore(div.firstChild,first)}
newBody.parentNode.replaceChild(oldFrameBodyDom,newBody);oldFrameBodyDom.className=newBody.className;oldFrameBody.setSize();childEls=me.getChildEls();if(frameTable){frameTable.destroy();me.frameTable=null}
for(childElName in childEls){if(childEls[childElName].frame){el=me[childElName];if(el&&el!==oldFrameBody){el.destroy();me[childElName]=null}}}
for(i=newFrameEls.length;i--;){childElName=(frameDom=newFrameEls[i]).getAttribute('data-ref');if(childElName!=='frameBody'){me[childElName]=new Ext.dom.Element(frameDom)}}},frameInfoCache:{}}})
;
Ext.define('Ext.rtl.util.Renderable',{override:'Ext.util.Renderable',_rtlCls:Ext.baseCSSPrefix+'rtl',_ltrCls:Ext.baseCSSPrefix+'ltr',rtlFrameTableTpl:['<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'before\'); %}</tpl>','<table id="{fgid}Table" data-ref="frameTable" class="{frameCls} ',Ext.baseCSSPrefix+'table-plain" cellpadding="0" role="presentation">','<tpl if="top">','<tr role="presentation">','<tpl if="right"><td id="{fgid}TR" data-ref="frameTR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}TC" data-ref="frameTC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>{frameElCls}" role="presentation"></td>','<tpl if="left"><td id="{fgid}TL" data-ref="frameTL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>{frameElCls}" role="presentation"></td></tpl>','</tr>','</tpl>','<tr role="presentation">','<tpl if="right"><td id="{fgid}MR" data-ref="frameMR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}Body" data-ref="frameBody" class="{frameBodyCls} {frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>{frameElCls}" style="{mcStyle}" role="presentation">','{%this.applyRenderTpl(out, values)%}','</td>','<tpl if="left"><td id="{fgid}ML" data-ref="frameML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>{frameElCls}" role="presentation"></td></tpl>','</tr>','<tpl if="bottom">','<tr role="presentation">','<tpl if="right"><td id="{fgid}BR" data-ref="frameBR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}BC" data-ref="frameBC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>{frameElCls}" role="presentation"></td>','<tpl if="left"><td id="{fgid}BL" data-ref="frameBL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>{frameElCls}" role="presentation"></td></tpl>','</tr>','</tpl>','</table>','<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'after\'); %}</tpl>'],beforeRender:function(){var rtl=this.getInherited().rtl;if(rtl){this.addCls(this._rtlCls)}else if(rtl===!1){this.addCls(this._ltrCls)}
this.callParent()},initRenderData:function(){var me=this,renderData=me.callParent(),rtlCls=me._rtlCls;if(rtlCls&&me.getInherited().rtl){renderData.childElCls=' '+rtlCls}
return renderData},privates:{getFrameTpl:function(table){return(table&&this.getInherited().rtl)?this.lookupTpl('rtlFrameTableTpl'):this.callParent(arguments)},getFrameRenderData:function(){var me=this,data=me.callParent(),rtlCls=me._rtlCls;if(rtlCls&&me.getInherited().rtl){data.frameElCls=' '+rtlCls}
return data}}})
;
Ext.define('Ext.state.Provider',{mixins:{observable:'Ext.util.Observable'},prefix:'ext-',constructor:function(config){var me=this;Ext.apply(me,config);me.state={};me.mixins.observable.constructor.call(me)},get:function(name,defaultValue){var ret=this.state[name];return ret===undefined?defaultValue:ret},clear:function(name){var me=this;delete me.state[name];me.fireEvent("statechange",me,name,null)},set:function(name,value){var me=this;me.state[name]=value;me.fireEvent("statechange",me,name,value)},decodeValue:function(value){var me=this,re=/^(a|n|d|b|s|o|e):(.*)$/,matches=re.exec(unescape(value)),all,type,keyValue,values,vLen,v;if(!matches||!matches[1]){return}
type=matches[1];value=matches[2];switch(type){case 'e':return null;case 'n':return parseFloat(value);case 'd':return new Date(Date.parse(value));case 'b':return(value==='1');case 'a':all=[];if(value){values=value.split('^');vLen=values.length;for(v=0;v<vLen;v++){value=values[v];all.push(me.decodeValue(value))}}
return all;case 'o':all={};if(value){values=value.split('^');vLen=values.length;for(v=0;v<vLen;v++){value=values[v];keyValue=value.split('=');all[keyValue[0]]=me.decodeValue(keyValue[1])}}
return all;default:return value}},encodeValue:function(value){var flat='',i=0,enc,len,key;if(value==null){return'e:1'}else if(typeof value==='number'){enc='n:'+value}else if(typeof value==='boolean'){enc='b:'+(value?'1':'0')}else if(Ext.isDate(value)){enc='d:'+value.toUTCString()}else if(Ext.isArray(value)){for(len=value.length;i<len;i++){flat+=this.encodeValue(value[i]);if(i!==len-1){flat+='^'}}
enc='a:'+flat}else if(typeof value==='object'){for(key in value){if(typeof value[key]!=='function'&&value[key]!==undefined){flat+=key+'='+this.encodeValue(value[key])+'^'}}
enc='o:'+flat.substring(0,flat.length-1)}else{enc='s:'+value}
return escape(enc)}})
;
Ext.define('Ext.state.Manager',{singleton:!0,requires:['Ext.state.Provider'],constructor:function(){this.provider=new Ext.state.Provider()},setProvider:function(stateProvider){this.provider=stateProvider},get:function(key,defaultValue){return this.provider.get(key,defaultValue)},set:function(key,value){this.provider.set(key,value)},clear:function(key){this.provider.clear(key)},getProvider:function(){return this.provider}})
;
Ext.define('Ext.state.Stateful',{mixinId:'state',requires:['Ext.state.Manager','Ext.util.TaskRunner'],config:{stateful:null},saveDelay:100,constructor:function(){var me=this;if(!me.stateEvents){me.stateEvents=[]}
if(me.stateful){me.addStateEvents(me.stateEvents);me.initState()}},addStateEvents:function(events){var me=this,i,event,stateEventsByName,eventArray;if(me.stateful&&me.getStateId()){eventArray=(typeof events==='string')?arguments:events;stateEventsByName=me.stateEventsByName||(me.stateEventsByName={});for(i=eventArray.length;i--;){event=eventArray[i];if(event&&!stateEventsByName[event]){stateEventsByName[event]=1;me.on(event,me.onStateChange,me)}}}},onStateChange:function(){var me=this,delay=me.saveDelay,statics,runner;if(!me.stateful){return}
if(delay){if(!me.stateTask){statics=Ext.state.Stateful;runner=statics.runner||(statics.runner=new Ext.util.TaskRunner());me.stateTask=runner.newTask({run:me.saveState,scope:me,interval:delay,repeat:1,fireIdleEvent:!1})}
me.stateTask.start()}else{me.saveState()}},saveState:function(){var me=this,stateful=me.getStateful(),id=stateful&&me.getStateId(),hasListeners=me.hasListeners,cfg,configs,plugins,plugin,i,len,state,pluginState;if(id){state=me.getState()||{};if(Ext.isObject(stateful)){configs=me.self.getConfigurator();configs=configs.configs;for(i in stateful){if(stateful[i]){if(!(i in state)){cfg=configs[i];state[i]=cfg?me[cfg.get]():me[i]}}else{delete state[i]}}}
plugins=me.getPlugins()||[];for(i=0,len=plugins.length;i<len;i++){plugin=plugins[i];if(plugin&&plugin.getState){pluginState=plugin.getState(state);if(pluginState&&!state[plugin.ptype]){state[plugin.ptype]=pluginState}}}
if(!hasListeners.beforestatesave||me.fireEvent('beforestatesave',me,state)!==!1){Ext.state.Manager.set(id,state);if(hasListeners.statesave){me.fireEvent('statesave',me,state)}}}},getState:function(){return null},applyState:function(state){if(state){Ext.apply(this,state)}},getStateId:function(){var me=this;return me.stateId||(me.autoGenId?null:me.id)},initState:function(){var me=this,id=me.stateful&&me.getStateId(),hasListeners=me.hasListeners,state,combinedState,i,len,plugins,plugin,pluginType;if(id){combinedState=Ext.state.Manager.get(id);if(combinedState){state=Ext.apply({},combinedState);if(!hasListeners.beforestaterestore||me.fireEvent('beforestaterestore',me,combinedState)!==!1){plugins=me.getPlugins()||[];for(i=0,len=plugins.length;i<len;i++){plugin=plugins[i];if(plugin){pluginType=plugin.ptype;if(plugin.applyState){plugin.applyState(state[pluginType],combinedState)}
delete state[pluginType]}}
me.applyState(state);if(hasListeners.staterestore){me.fireEvent('staterestore',me,combinedState)}}}}},savePropToState:function(propName,state,stateName){var me=this,value=me[propName],config=me.initialConfig;if(me.hasOwnProperty(propName)){if(!config||config[propName]!==value){if(state){state[stateName||propName]=value}
return!0}}
return!1},savePropsToState:function(propNames,state){var me=this,i,n;if(typeof propNames==='string'){me.savePropToState(propNames,state)}else{for(i=0,n=propNames.length;i<n;++i){me.savePropToState(propNames[i],state)}}
return state},destroy:function(){var task=this.stateTask;if(task){task.destroy();this.stateTask=null}}})
;
Ext.define('Ext.Component',{alternateClassName:'Ext.AbstractComponent',xtype:['component','box'],requires:['Ext.ComponentQuery','Ext.ComponentManager','Ext.util.ProtoElement','Ext.dom.CompositeElement','Ext.plugin.Abstract','Ext.plugin.Manager','Ext.scroll.Scroller'],mixins:['Ext.mixin.Inheritable','Ext.util.Floating','Ext.util.Positionable','Ext.util.Observable','Ext.mixin.ComponentDelegation','Ext.mixin.Bindable','Ext.util.Animate','Ext.util.ElementContainer','Ext.util.Renderable','Ext.state.Stateful','Ext.mixin.Focusable','Ext.mixin.Accessible','Ext.mixin.Keyboard'],uses:['Ext.overrides.*','Ext.Element','Ext.DomHelper','Ext.XTemplate','Ext.ComponentLoader','Ext.layout.Context','Ext.layout.Layout','Ext.layout.component.Auto','Ext.LoadMask','Ext.ZIndexManager','Ext.util.DelayedTask','Ext.resizer.Resizer','Ext.util.ComponentDragger'],statics:{AUTO_ID:1000,pendingLayouts:null,layoutSuspendCount:0,DIRECTION_TOP:'top',DIRECTION_RIGHT:'right',DIRECTION_BOTTOM:'bottom',DIRECTION_LEFT:'left',VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[.,\s]/g,ariaHighContrastModeCls:Ext.baseCSSPrefix+'aria-highcontrast',cancelLayout:function(comp,isDestroying){var context=this.runningLayoutContext||this.pendingLayouts;if(context){context.cancelComponent(comp,!1,isDestroying)}},from:function(el,limit,selector){return Ext.ComponentManager.from(el,limit,selector)},fromElement:function(el,limit,selector){return Ext.ComponentManager.from(el,limit,selector)},flushLayouts:function(){var me=this,context=me.pendingLayouts;if(context&&context.invalidQueue.length){me.pendingLayouts=null;me.runningLayoutContext=context;Ext.override(context,{runComplete:function(){var Scroller=Ext.scroll.Scroller,GlobalEvents=Ext.GlobalEvents,result;me.runningLayoutContext=null;if(Scroller.viewport){Scroller.viewport.restoreState()}
result=this.callParent();if(GlobalEvents.hasListeners.afterlayout){GlobalEvents.fireEvent('afterlayout')}
return result}});context.run()}},resumeLayouts:function(flush){if(this.layoutSuspendCount&&!--this.layoutSuspendCount){if(flush){this.flushLayouts()}
if(Ext.GlobalEvents.hasListeners.resumelayouts){Ext.GlobalEvents.fireEvent('resumelayouts')}}},suspendLayouts:function(){++this.layoutSuspendCount},updateLayout:function(comp,defer){var me=this,running=me.runningLayoutContext,pending;if(running){running.queueInvalidate(comp)}else{pending=me.pendingLayouts||(me.pendingLayouts=new Ext.layout.Context());pending.queueInvalidate(comp);if(!defer&&!me.layoutSuspendCount&&!comp.isLayoutSuspended()){me.flushLayouts()}}}},$configPrefixed:!1,$configStrict:!1,clearPropertiesOnDestroy:'async',manageLayoutScroll:!0,config:{data:null,maxHeight:null,maxWidth:null,minHeight:null,minWidth:null,scrollable:null},renderConfig:{touchAction:null},defaultBindProperty:'html',alignTarget:null,autoRender:!1,autoShow:!1,baseCls:Ext.baseCSSPrefix+'component',childEls:{frameTable:{frame:!0},frameTL:{frame:'tl'},frameTC:{frame:'tc'},frameTR:{frame:'tr'},frameML:{frame:'ml'},frameBody:{frame:'mc'},frameMR:{frame:'mr'},frameBL:{frame:'bl'},frameBC:{frame:'bc'},frameBR:{frame:'br'}},componentLayout:'autocomponent',defaultAlign:'c-c',disabled:!1,disabledRe:/^(?:button|input|select|textarea|optgroup|option|fieldset)$/i,nonMaskableRe:(function(){var re=['input','select','textarea','optgroup','option','table'];if(Ext.isIE9m&&!(Ext.isIE9&&!Ext.isIEQuirks)){re.push('p')}
return new RegExp('^(?:'+re.join('|')+')$','i')}()),disabledCls:Ext.baseCSSPrefix+'item-disabled',draggable:!1,floating:!1,hidden:!1,hideMode:'display',maskElement:null,renderTpl:'{%this.renderContent(out,values)%}',resizeHandles:'all',shrinkWrap:2,toFrontOnShow:!0,synthetic:!1,tplWriteMode:'overwrite',ui:'default',uiCls:[],userCls:null,weight:null,allowDomMove:!0,autoGenId:!1,borderBoxCls:Ext.baseCSSPrefix+'border-box',componentLayoutCounter:0,contentPaddingProperty:'padding',deferLayouts:!1,frameSize:null,horizontalPosProp:'left',isComponent:!0,_isLayoutRoot:!1,layoutSuspendCount:0,liquidLayout:!1,maskOnDisable:!0,rendered:!1,rootCls:Ext.baseCSSPrefix+'body',scrollerCls:Ext.baseCSSPrefix+'scroll-scroller',_scrollFlags:{auto:{auto:{overflowX:'auto',overflowY:'auto',x:!0,y:!0,both:!0},'false':{overflowX:'auto',overflowY:'hidden',x:!0,y:!1,both:!1},scroll:{overflowX:'auto',overflowY:'scroll',x:!0,y:!0,both:!0}},'false':{auto:{overflowX:'hidden',overflowY:'auto',x:!1,y:!0,both:!1},'false':{overflowX:'hidden',overflowY:'hidden',x:!1,y:!1,both:!1},scroll:{overflowX:'hidden',overflowY:'scroll',x:!1,y:!0,both:!1}},scroll:{auto:{overflowX:'scroll',overflowY:'auto',x:!0,y:!0,both:!0},'false':{overflowX:'scroll',overflowY:'hidden',x:!0,y:!1,both:!1},scroll:{overflowX:'scroll',overflowY:'scroll',x:!0,y:!0,both:!0}},none:{overflowX:'',overflowY:'',x:!1,y:!1,both:!1}},_scrollableCfg:{x:{x:!0,y:!1},y:{x:!1,y:!0},horizontal:{x:!0,y:!1},vertical:{x:!1,y:!0},both:{x:!0,y:!0},'true':{x:!0,y:!0}},validIdRe:Ext.validIdRe,constructor:function(config){var me=this,i,len,xhooks,controller,autoScroll,overflowX,overflowY,scrollable;config=config||{};if(config.initialConfig){if(config.isAction){me.baseAction=config}
config=config.initialConfig}else if(config.tagName||config.dom||Ext.isString(config)){config={applyTo:config,id:config.id||config}}
me.initialConfig=config;me.$iid=++Ext.$nextIid;if((config&&config.controller)||me.config.controller){me.referenceHolder=!0}
me.getId();me.protoEl=new Ext.util.ProtoElement();me.$calledInitConfig=!0;me.initConfig(config);delete me.$calledInitConfig;if(me.scrollable==null){autoScroll=me.autoScroll;if(autoScroll){scrollable=!!autoScroll}else{overflowX=me.overflowX;overflowY=me.overflowY;if(overflowX||overflowY){scrollable={x:(overflowX&&overflowX!=='hidden')?overflowX:!1,y:(overflowY&&overflowY!=='hidden')?overflowY:!1}}}
if(scrollable){me.setScrollable(scrollable)}}
xhooks=me.xhooks;if(xhooks){delete me.xhooks;Ext.override(me,xhooks)}
me.mixins.elementCt.constructor.call(me);if(!me.validIdRe.test(me.id)){Ext.raise('Invalid component "id": "'+me.id+'"')}
if(!me.validIdRe.test(me.itemId)){Ext.raise('Invalid component "itemId": "'+me.itemId+'"')}
me.setupProtoEl();if(me.cls){me.initialCls=me.cls;me.protoEl.addCls(me.cls)}
if(me.style){me.initialStyle=me.style;me.protoEl.setStyle(me.style)}
me.renderData=me.renderData||{};me.initComponent();if(!me.preventRegister){Ext.ComponentManager.register(me)}
me.mixins.state.constructor.call(me);me.addStateEvents('resize');controller=me.getController();if(controller){controller.init(me)}
if(me.plugins){for(i=0,len=me.plugins.length;i<len;i++){me.plugins[i]=me.initPlugin(me.plugins[i])}}
me.loader=me.getLoader();if(me.disabled){me.disabled=!1;me.disable(!0)}
if(me.renderTo){me.render(me.renderTo)}
if(me.autoShow&&!me.$initParent){me.show()}
if(Ext.isDefined(me.disabledClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.Component: disabledClass has been deprecated. '+'Please use disabledCls.')}
me.disabledCls=me.disabledClass;delete me.disabledClass}
if(me.baseAction){me.baseAction.addComponent(me)}},beforeInitConfig:function(){if(!this.$calledInitConfig){Ext.raise('initConfig should not be called by subclasses, it will be '+'called by Ext.Component')}
this.mixins.observable.constructor.call(this)},addCls:function(cls){var me=this,el=me.rendered?me.el:me.protoEl;el.addCls.apply(el,arguments);return me},addClsWithUI:function(classes,skip){var me=this,clsArray=[],i=0,uiCls=me.uiCls=Ext.Array.clone(me.uiCls),activeUI=me.activeUI,length,cls;if(typeof classes==="string"){classes=(classes.indexOf(' ')<0)?[classes]:Ext.String.splitWords(classes)}
length=classes.length;for(;i<length;i++){cls=classes[i];if(cls&&!me.hasUICls(cls)){uiCls.push(cls);if(activeUI){clsArray=clsArray.concat(me.addUIClsToElement(cls))}}}
if(skip!==!0&&activeUI){me.addCls(clsArray)}
return clsArray},afterComponentLayout:function(width,height,oldWidth,oldHeight){var me=this,scroller=me.scrollable;if(++me.componentLayoutCounter===1){me.afterFirstLayout(width,height)}else if(me.manageLayoutScroll&&scroller){scroller.restoreState()}
if(width!==oldWidth||height!==oldHeight){me.onResize(width,height,oldWidth,oldHeight)}
if(me.floating){me.onAfterFloatLayout()}},addPlugin:function(plugin){var me=this;plugin=me.constructPlugin(plugin);if(me.plugins){me.plugins.push(plugin)}else{me.plugins=[plugin]}
if(me.pluginsInitialized){me.initPlugin(plugin)}
return plugin},addPropertyToState:function(state,propName,value){var me=this,len=arguments.length;if(len===3||me.hasOwnProperty(propName)){if(len<3){value=me[propName]}
if(value!==me.initialConfig[propName]){(state||(state={}))[propName]=value}}
return state},addUIClsToElement:function(uiCls){var me=this,baseClsUI=me.baseCls+'-'+me.ui+'-'+uiCls,result=[Ext.baseCSSPrefix+uiCls,me.baseCls+'-'+uiCls,baseClsUI],childEls,childElName,el,suffix;if(me.rendered&&me.frame&&!Ext.supports.CSS3BorderRadius){baseClsUI+='-';childEls=me.getChildEls();for(childElName in childEls){suffix=childEls[childElName].frame;if(suffix&&suffix!==!0){el=me[childElName];if(el){el.addCls(baseClsUI+suffix)}}}}
return result},removeUIClsFromElement:function(uiCls){var me=this,baseClsUI=me.baseCls+'-'+me.ui+'-'+uiCls,result=[Ext.baseCSSPrefix+uiCls,me.baseCls+'-'+uiCls,baseClsUI],childEls,childElName,el,suffix;if(me.rendered&&me.frame&&!Ext.supports.CSS3BorderRadius){baseClsUI+='-';childEls=me.getChildEls();for(childElName in childEls){suffix=childEls[childElName].frame;if(suffix&&suffix!==!0){el=me[childElName];if(el){el.removeCls(baseClsUI+suffix)}}}}
return result},adjustPosition:function(x,y){var me=this,floatParentBox;if(me.isContainedFloater()){floatParentBox=me.floatParent.getTargetEl().getViewRegion();x+=floatParentBox.left;y+=floatParentBox.top}
return{x:x,y:y}},afterHide:function(callback,scope){var me=this,container=me.ownerFocusableContainer;delete me.getInherited().topmostFocusEvent;me.hiddenByLayout=null;if(me.ownerLayout){me.updateLayout({isRoot:!1})}
if(container&&!container.onFocusableChildHide.$nullFn){container.onFocusableChildHide(me)}
me.fireHierarchyEvent('hide');me.fireEvent('hide',me);Ext.callback(callback,scope||me)},afterSetPosition:function(x,y){var me=this;me.onPosition(x,y);if(me.hasListeners.move){me.fireEvent('move',me,x,y)}},afterShow:function(animateTarget,callback,scope){var me=this,myEl=me.el,zim=me.zIndexManager,fromBox,toBox,ghostPanel;animateTarget=me.getAnimateTarget(animateTarget);if(zim){zim.suspendReflow()}
if(!me.ghost){animateTarget=null}
if(animateTarget){toBox={x:myEl.getX(),y:myEl.getY(),width:myEl.dom.offsetWidth,height:myEl.dom.offsetHeight};fromBox={x:animateTarget.getX(),y:animateTarget.getY(),width:animateTarget.dom.offsetWidth,height:animateTarget.dom.offsetHeight};me.fireHierarchyEvent('show');ghostPanel=me.ghost();ghostPanel.el.stopAnimation();ghostPanel.setX(-10000);me.ghostBox=toBox;ghostPanel.el.animate({from:fromBox,to:toBox,listeners:{beforeanimate:function(){if(me.modal){ghostPanel.toFront()}},afteranimate:function(){if(!me.destroying){ghostPanel.componentLayout.lastComponentSize=null;me.unghost();me.ghostBox=null;me.onShowComplete(callback,scope)}}}})}else{me.onShowComplete(callback,scope);me.fireHierarchyEvent('show')}
if(zim){zim.resumeReflow(!0)}},animate:function(animObj){var me=this,hasToWidth,hasToHeight,toHeight,toWidth,to,clearWidth,clearHeight,curWidth,w,curHeight,h,isExpanding,wasConstrained,wasConstrainedHeader,passedCallback,oldOverflow;animObj=animObj||{};to=animObj.to||{};if(Ext.fx.Manager.hasFxBlock(me.id)){return me}
hasToWidth=Ext.isDefined(to.width);if(hasToWidth){toWidth=Ext.Number.constrain(to.width,me.minWidth,me.maxWidth)}
hasToHeight=Ext.isDefined(to.height);if(hasToHeight){toHeight=Ext.Number.constrain(to.height,me.minHeight,me.maxHeight)}
if(!animObj.dynamic&&(hasToWidth||hasToHeight)){curWidth=(animObj.from?animObj.from.width:undefined)||me.getWidth();w=curWidth;curHeight=(animObj.from?animObj.from.height:undefined)||me.getHeight();h=curHeight;isExpanding=!1;if(hasToHeight&&toHeight>curHeight){h=toHeight;isExpanding=!0}
if(hasToWidth&&toWidth>curWidth){w=toWidth;isExpanding=!0}
if(hasToHeight||hasToWidth){oldOverflow=me.el.getStyle('overflow');if(oldOverflow!=='hidden'){me.el.setStyle('overflow','hidden')}}
if(isExpanding){clearWidth=!Ext.isNumber(me.width);clearHeight=!Ext.isNumber(me.height);me.setSize(w,h);me.el.setSize(curWidth,curHeight);if(clearWidth){delete me.width}
if(clearHeight){delete me.height}}
if(hasToWidth){to.width=toWidth}
if(hasToHeight){to.height=toHeight}}
wasConstrained=me.constrain;wasConstrainedHeader=me.constrainHeader;if(wasConstrained||wasConstrainedHeader){me.constrain=me.constrainHeader=!1;passedCallback=animObj.callback;animObj.callback=function(){me.constrain=wasConstrained;me.constrainHeader=wasConstrainedHeader;if(passedCallback){passedCallback.call(animObj.scope||me,arguments)}
if(oldOverflow!=='hidden'){me.el.setStyle('overflow',oldOverflow)}}}
return me.mixins.animate.animate.apply(me,arguments)},applyScrollable:function(scrollable,oldScrollable){var me=this,rendered=me.rendered,scrollableCfg;if(scrollable){if(scrollable===!0||typeof scrollable==='string'){scrollableCfg=me._scrollableCfg[scrollable];if(!scrollableCfg){Ext.raise("'"+scrollable+"' is not a valid value for 'scrollable'")}
scrollable=scrollableCfg}
if(oldScrollable){oldScrollable.setConfig(scrollable);scrollable=oldScrollable}else{scrollable=Ext.Object.chain(scrollable);if(rendered){scrollable.element=me.getOverflowEl()}
scrollable=Ext.scroll.Scroller.create(scrollable,me.scrollableType);scrollable.component=me}}else if(oldScrollable){scrollable=oldScrollable;oldScrollable.setConfig({x:!1,y:!1})}
if(me.rendered&&!me.destroying&&!me.destroyed){if(scrollable){me.getOverflowStyle()}else{me.scrollFlags=me._scrollFlags.none}
me.updateLayout()}
return scrollable},getScrollableClientRegion:function(){return this.getScrollable().getElement().getClientRegion()},applyTouchAction:function(touchAction,oldTouchAction){if(oldTouchAction!=null){touchAction=Ext.merge({},oldTouchAction,touchAction)}
return touchAction},beforeDestroy:Ext.emptyFn,beforeLayout:function(){if(this.floating){this.onBeforeFloatLayout()}},beforeSetPosition:function(x,y,animate){var me=this,pos=null,x0,hasX,hasY,adj;if(x){if(Ext.isNumber(x0=x[0])){animate=y;y=x[1];x=x0}else if((x0=x.x)!==undefined){animate=y;y=x.y;x=x0}}
if(me.constrain||me.constrainHeader){pos=me.calculateConstrainedPosition(null,[x,y],!0);if(pos){x=pos[0];y=pos[1]}}
hasX=(x!==undefined);hasY=(y!==undefined);if(hasX||hasY){me.x=x;me.y=y;adj=me.adjustPosition(x,y);pos={x:adj.x,y:adj.y,anim:animate,hasX:hasX,hasY:hasY}}
return pos},beforeShow:Ext.emptyFn,bubble:function(fn,scope,args){var p=this;while(p){if(fn.apply(scope||p,args||[p])===!1){break}
p=p.getBubbleTarget()}
return this},clearListeners:function(){var me=this;me.mixins.observable.clearListeners.call(me);me.mixins.componentDelegation.clearDelegatedListeners.call(me)},cloneConfig:function(overrides){overrides=overrides||{};var id=overrides.id||Ext.id(),cfg=Ext.applyIf(overrides,this.initialConfig),self;cfg.id=id;self=Ext.getClass(this);return new self(cfg)},destroy:function(){var me=this;if(!me.hasListeners.beforedestroy||me.fireEvent('beforedestroy',me)!==!1){me.isDestroying=me.destroying=!0;me.doDestroy();me.clearListeners();me.isDestroying=me.destroying=!1;me.callParent();me.mixins.componentDelegation.destroyComponentDelegation.call(me);me.mixins.observable.destroyObservable.call(me,!0)}},doDestroy:function(){var me=this,focusableContainer=me.ownerFocusableContainer,container=me.container,selectors=me.renderSelectors,selector,ownerCt,el;ownerCt=me.floatParent||me.ownerCt;if(me.floating){delete me.floatParent;if(me.zIndexManager&&!me.zIndexManager.destroyed){me.zIndexManager.unregister(me)}
me.floating=!0}
me.removeBindings();if(!me.beforeDestroy.$emptyFn){me.beforeDestroy()}
me.destroyBindable();if(ownerCt&&ownerCt.remove){ownerCt.remove(me,{destroy:!1})}
me.stopAnimation();if(me.rendered){Ext.destroy(me.loadMask,me.dd,me.resizer,me.proxy,me.proxyWrap,me.resizerComponent,me.scrollable,me.contentEl)}
if(focusableContainer&&!focusableContainer.onFocusableChildDestroy.$nullFn){focusableContainer.onFocusableChildDestroy(me)}
if(me.focusable){me.destroyFocusable()}
Ext.destroy(me.componentLayout,me.loadMask,me.floatingDescendants);if(!me.onDestroy.$emptyFn){me.onDestroy()}
Ext.destroy(me.plugins);if(me.rendered){Ext.Component.cancelLayout(me,!0)}
me.componentLayout=null;if(me.hasListeners.destroy){me.fireEvent('destroy',me)}
if(!me.preventRegister){Ext.ComponentManager.unregister(me)}
me.mixins.state.destroy.call(me);if(me.floating){me.onFloatDestroy()}
if(me.rendered){if(me.showListenerIE){me.showListenerIE.destroy();me.showListenerIE=null}
if(!me.preserveElOnDestroy){me.el.destroy()}
if(me.collectContainerElement&&container){if(!container.destroyed){container.collect()}
me.container=null}
me.el.component=null;me.mixins.elementCt.destroy.call(me);if(selectors){for(selector in selectors){if(selectors.hasOwnProperty(selector)){el=me[selector];if(el){delete me[selector];el.destroy()}}}}
me.rendered=!1}},disable:function(silent,fromParent){var me=this,container=me.ownerFocusableContainer,inherited=me.getInherited();if(!fromParent){inherited.disabled=!0;me.savedDisabled=!0}
if(me.maskOnDisable){inherited.disableMask=!0}
if(!me.disabled){if(container&&!container.beforeFocusableChildDisable.$nullFn){container.beforeFocusableChildDisable(me)}
me.addCls(me.disabledCls);if(me.rendered){me.onDisable()}else{me.disableOnRender=!0}
me.disabled=!0;if(silent!==!0){me.fireEvent('disable',me)}
if(container&&!container.onFocusableChildDisable.$nullFn){container.onFocusableChildDisable(me)}}
return me},doFireEvent:function(eventName,args,bubbles){var me=this,ret;ret=me.mixins.observable.doFireEvent.call(me,eventName,args,bubbles);if(ret!==!1&&!me.destroyed){ret=me.mixins.componentDelegation.doFireDelegatedEvent.call(me,eventName,args)}
return ret},enable:function(silent,fromParent){var me=this,container=me.ownerFocusableContainer,inherited=me.getInherited();if(!fromParent){delete me.getInherited().disabled;me.savedDisabled=!1}
if(me.maskOnDisable){delete inherited.disableMask}
if(me.disabled){if(!(fromParent&&inherited.hasOwnProperty('disabled'))){if(container&&!container.beforeFocusableChildEnable.$nullFn){container.beforeFocusableChildEnable(me)}
me.disableOnRender=!1;me.removeCls(me.disabledCls);if(me.rendered){me.onEnable()}
me.disabled=!1;if(silent!==!0){me.fireEvent('enable',me)}
if(container&&!container.onFocusableChildEnable.$nullFn){container.onFocusableChildEnable(me)}}}
return me},findParentBy:function(fn){var p;for(p=this.getRefOwner();p&&!fn(p,this);p=p.getRefOwner()){}
return p||null},findParentByType:function(xtype){return Ext.isFunction(xtype)?this.findParentBy(function(p){return p.self===xtype||p.constructor===xtype}):this.up(xtype)},findPlugin:function(ptype){var i,plugins=this.plugins,ln=plugins&&plugins.length;for(i=0;i<ln;i++){if(plugins[i].ptype===ptype){return plugins[i]}}},getAnimateTarget:function(target){target=target||this.animateTarget;if(target){target=target.isComponent?target.getEl():Ext.get(target)}
return target||null},getBubbleTarget:function(){return this.getRefOwner()},getComponentLayout:function(){var me=this;if(!me.componentLayout||!me.componentLayout.isLayout){me.setComponentLayout(Ext.layout.Layout.create(me.componentLayout,'autocomponent'))}
return me.componentLayout},getEl:function(){return this.el},getHeight:function(){return this.el.getHeight()},initInheritedState:function(inheritedState){var me=this,layout=me.componentLayout;if(me.hidden){inheritedState.hidden=!0}
if(me.collapseImmune){inheritedState.collapseImmune=!0}
if(me.modelValidation!==undefined){inheritedState.modelValidation=me.modelValidation}
if(me.savedDisabled){inheritedState.disabled=!0}
me.mixins.bindable.initInheritedState.call(me,inheritedState);if(layout&&layout.initInheritedState){layout.initInheritedState(inheritedState)}},getId:function(){var me=this,xtype;if(!(me.id||(me.id=me.initialConfig.id))){xtype=me.getXType();if(xtype){xtype=xtype.replace(Ext.Component.INVALID_ID_CHARS_Re,'-')}else{xtype=Ext.name.toLowerCase()+'-comp'}
me.id=xtype+'-'+me.getAutoId()}
return me.id},getItemId:function(){return this.itemId||this.id},getLoader:function(){var me=this,loader=me.loader;if(loader){if(!loader.isLoader){me.loader=new Ext.ComponentLoader(Ext.apply({target:me},loader))}else{loader.setTarget(me)}
return me.loader}
return null},getMaskTarget:function(){return this.maskElement?this[this.maskElement]:null},getPlugin:function(id){var i,plugins=this.plugins,ln=plugins&&plugins.length,plugin;for(i=0;i<ln;i++){plugin=plugins[i];if(plugin.id===id||plugin.pluginId===id){return plugin}}
return null},getPosition:function(local){var me=this,xy,isContainedFloater=me.isContainedFloater(),floatParentBox;if((local===!0)&&!isContainedFloater){return[me.getLocalX(),me.getLocalY()]}
xy=me.getXY();if((local===!0)&&isContainedFloater){floatParentBox=me.floatParent.getTargetEl().getViewRegion();xy[0]-=floatParentBox.left;xy[1]-=floatParentBox.top}
return xy},getScrollX:function(){var scroller=this.getScrollable();return scroller?scroller.getPosition().x:0},getScrollY:function(){var scroller=this.getScrollable();return scroller?scroller.getPosition().y:0},getSize:function(contentSize){return this.el.getSize(contentSize)},getSizeModel:function(ownerCtSizeModel){var me=this,models=Ext.layout.SizeModel,ownerContext=me.componentLayout.ownerContext,width=me.width,height=me.height,typeofWidth,typeofHeight,hasPixelWidth,hasPixelHeight,hasWidthStyle,hasHeightStyle,heightModel,ownerLayout,policy,shrinkWrap,topLevel,widthModel,isFloating=me.floating||me.floated;if(ownerContext){widthModel=ownerContext.widthModel;heightModel=ownerContext.heightModel}
if(!widthModel||!heightModel){hasPixelWidth=((typeofWidth=typeof width)==='number');hasPixelHeight=((typeofHeight=typeof height)==='number');topLevel=isFloating||!(ownerLayout=me.ownerLayout);if(topLevel){policy=Ext.layout.Layout.prototype.autoSizePolicy;shrinkWrap=isFloating?3:me.shrinkWrap;if(hasPixelWidth){widthModel=models.configured}
if(hasPixelHeight){heightModel=models.configured}}else{policy=ownerLayout.getItemSizePolicy(me,ownerCtSizeModel);shrinkWrap=ownerLayout.isItemShrinkWrap(me)}
if(ownerContext){ownerContext.ownerSizePolicy=policy}
shrinkWrap=(shrinkWrap===!0)?3:(shrinkWrap||0);if(topLevel&&shrinkWrap){if(width&&typeofWidth==='string'){shrinkWrap&=2;hasWidthStyle=!0}
if(height&&typeofHeight==='string'){shrinkWrap&=1;hasHeightStyle=!0}}
if(shrinkWrap!==3){if(!ownerCtSizeModel){ownerCtSizeModel=me.ownerCt&&me.ownerCt.getSizeModel()}
if(ownerCtSizeModel){shrinkWrap|=(ownerCtSizeModel.width.shrinkWrap?1:0)|(ownerCtSizeModel.height.shrinkWrap?2:0)}}
if(!widthModel){if(!policy.setsWidth&&!(me.frame&&hasWidthStyle)){if(hasPixelWidth){widthModel=models.configured}else{widthModel=(shrinkWrap&1)?models.shrinkWrap:models.natural}}else if(policy.readsWidth){if(hasPixelWidth){widthModel=models.calculatedFromConfigured}else{widthModel=(shrinkWrap&1)?models.calculatedFromShrinkWrap:models.calculatedFromNatural}}else{widthModel=models.calculated}}
if(!heightModel){if(!policy.setsHeight&&!(me.frame&&hasHeightStyle)){if(hasPixelHeight){heightModel=models.configured}else{heightModel=(shrinkWrap&2)?models.shrinkWrap:models.natural}}else if(policy.readsHeight){if(hasPixelHeight){heightModel=models.calculatedFromConfigured}else{heightModel=(shrinkWrap&2)?models.calculatedFromShrinkWrap:models.calculatedFromNatural}}else{heightModel=models.calculated}}}
return widthModel.pairsByHeightOrdinal[heightModel.ordinal]},getState:function(){var me=this,state=null,sizeModel=me.getSizeModel();if(sizeModel.width.configured){state=me.addPropertyToState(state,'width')}
if(sizeModel.height.configured){state=me.addPropertyToState(state,'height')}
return state},getUserCls:function(){return this.userCls},setUserCls:function(cls){var me=this,was=me.userCls;if(cls!==was){me.userCls=cls;if(me.rendered){me.el.replaceCls(was,cls)}}
return was},getWidth:function(){return this.el.getWidth()},getXType:function(){return this.self.xtype},getXTypes:function(){var self=this.self,xtypes,parentPrototype,parentXtypes;if(!self.xtypes){xtypes=[];parentPrototype=this;while(parentPrototype){parentXtypes=parentPrototype.xtypes;if(parentXtypes!==undefined){xtypes.unshift.apply(xtypes,parentXtypes)}
parentPrototype=parentPrototype.superclass}
self.xtypeChain=xtypes;self.xtypes=xtypes.join('/')}
return self.xtypes},hasCls:function(className){var el=this.rendered?this.el:this.protoEl;return el.hasCls.apply(el,arguments)},hasUICls:function(cls){var me=this,uiCls=me.uiCls||[];return Ext.Array.contains(uiCls,cls)},hide:function(animateTarget,callback,scope){var me=this,container=me.ownerFocusableContainer;if(me.pendingShow){me.pendingShow=!1}
if(!(me.rendered&&!me.isVisible())){if(!me.hasListeners.beforehide||me.fireEvent('beforehide',me)!==!1||me.hierarchicallyHidden){me.getInherited().hidden=me.hidden=!0;if(container&&!container.beforeFocusableChildHide.$nullFn){container.beforeFocusableChildHide(me)}
me.fireHierarchyEvent('beforehide');if(me.rendered){me.onHide.apply(me,arguments)}}}
return me},initComponent:function(){var me=this,width=me.width,height=me.height;if(me.plugins&&!me.plugins.processed){me.constructPlugins()}
me.pluginsInitialized=!0;if(width!=null||height!=null){me.setSize(width,height)}
if(me.listeners){me.on(me.listeners);me.listeners=null}
if(me.focusable){me.initFocusable()}},initEvents:function(){var me=this,afterRenderEvents=me.afterRenderEvents,afterRenderEvent,el,property,index,len;if(afterRenderEvents){for(property in afterRenderEvents){el=me[property];if(el&&el.on){afterRenderEvent=afterRenderEvents[property];for(index=0,len=afterRenderEvent.length;index<len;++index){me.mon(el,afterRenderEvent[index])}}}}
if(me.focusable){me.initFocusableEvents()}
me.initKeyMap()},is:function(selector){return Ext.ComponentQuery.is(this,selector)},isDisabled:function(){return this.disabled},isDraggable:function(){return!!this.draggable},isDroppable:function(){return!!this.droppable},isFloating:function(){return this.floating},isHidden:function(){return this.hidden},getHidden:function(){return this.hidden},isHierarchicallyHidden:function(){var child=this,hidden=!1,parent,parentInheritedState;for(;(parent=child.ownerCt||child.floatParent);child=parent){parentInheritedState=parent.getInherited();if(parentInheritedState.hidden){hidden=!0;break}
if(child.getInherited().collapseImmune){if(parent.collapsed&&!child.collapseImmune){hidden=!0;break}}else{hidden=!!parentInheritedState.collapsed;break}}
return hidden},isLayoutChild:function(ownerCandidate){return!this.floating&&!!this.up(ownerCandidate)},isLayoutRoot:function(){var me=this,ownerLayout=me.ownerLayout;if(!ownerLayout||me._isLayoutRoot||me.floating){return!0}
return ownerLayout.isItemLayoutRoot(me)},isLayoutSuspended:function(){var comp=this,ownerLayout;while(comp){if(comp.layoutSuspendCount||comp.suspendLayout){return!0}
ownerLayout=comp.ownerLayout;if(!ownerLayout){break}
comp=ownerLayout.owner}
return!1},isVisible:function(deep){var me=this,hidden;if(me.hidden||!me.rendered||me.destroyed){hidden=!0}else if(deep){hidden=me.isHierarchicallyHidden()}
return!hidden},isXType:function(xtype,shallow){return shallow?(Ext.Array.indexOf(this.xtypes,xtype)!==-1):!!this.xtypesMap[xtype]},isMasked:function(deep){var me=this;return!!(me.masked||(me.loadMask&&me.loadMask.isVisible())||(deep&&me.getInherited().masked))},lookupTpl:function(name){return Ext.XTemplate.getTpl(this,name)},setMasked:function(isMasked){var me=this,container=me.ownerFocusableContainer;if(isMasked){me.masked=!0;me.getInherited().masked=isMasked}else{me.masked=!1;delete me.getInherited().masked}
if(container&&!container.onFocusableChildMasked.$nullFn){container.onFocusableChildMasked(me,isMasked)}
return me},mask:function(msg,msgCls,elHeight){var box=this.lastBox,target=this.getMaskTarget()||this.el;if(box){elHeight=box.height}
target.mask(msg,msgCls,elHeight);this.setMasked(!0)},nextNode:function(selector,includeSelf){var node=this,ownerCt=node.ownerCt,result,it,len,i,sib;if(includeSelf&&node.is(selector)){return node}
if(ownerCt){for(it=ownerCt.items.items,i=Ext.Array.indexOf(it,node)+1,len=it.length;i<len;i++){sib=it[i];if(sib.is(selector)){return sib}
if(sib.down){result=sib.down(selector);if(result){return result}}}
return ownerCt.nextNode(selector)}
return null},nextSibling:function(selector){var o=this.ownerCt,it,last,idx,c;if(o){it=o.items;idx=it.indexOf(this)+1;if(idx){if(selector){for(last=it.getCount();idx<last;idx++){if((c=it.getAt(idx)).is(selector)){return c}}}else{if(idx<it.getCount()){return it.getAt(idx)}}}}
return null},onAdded:function(container,pos,instanced){var me=this;me.ownerCt=container;me.onInheritedAdd(me,instanced);if(me.hasListeners&&me.hasListeners.added){me.fireEvent('added',me,container,pos)}
if(Ext.GlobalEvents.hasListeners.added){me.fireHierarchyEvent('added')}},onRemoved:function(destroying){var me=this,focusTarget;if(!me.isLayoutMoving&&me.el&&me.el.contains(Ext.Element.getActiveElement())){focusTarget=me.findFocusTarget();if(focusTarget){focusTarget.focus()}}
if(Ext.GlobalEvents.hasListeners.removed){me.fireHierarchyEvent('removed')}
if(me.hasListeners.removed){me.fireEvent('removed',me,me.ownerCt)}
me.onInheritedRemove(destroying);me.ownerCt=me.ownerLayout=null},onBoxReady:function(width,height){var me=this,label;if(me.ariaLabelledBy||me.ariaDescribedBy){if(me.ariaLabelledBy){label=me.getAriaLabelEl(me.ariaLabelledBy);if(label){me.ariaEl.dom.setAttribute('aria-labelledby',label)}}
if(me.ariaDescribedBy){label=me.getAriaLabelEl(me.ariaDescribedBy);if(label){me.ariaEl.dom.setAttribute('aria-describedby',label)}}}
if(me.resizable){me.initResizable(me.resizable)}
if(me.draggable){me.initDraggable()}
if(me.hasListeners.boxready){me.fireEvent('boxready',me,width,height)}},onDestroy:Ext.emptyFn,onDisable:function(){var me=this,dom,nodeName;if(me.focusable){me.disableFocusable()}
if(!me.ariaStaticRoles[me.ariaRole]){me.ariaEl.dom.setAttribute('aria-disabled',!0)}
if(me.maskOnDisable&&!me.getInheritedConfig('disableMask',!0)){dom=me.el.dom;nodeName=dom.nodeName;if(me.disabledRe.test(nodeName)){dom.disabled=!0}
if(!me.nonMaskableRe.test(nodeName)){me.mask()}}},onEnable:function(){var me=this,dom,nodeName;if(me.focusable){me.enableFocusable()}
if(!me.ariaStaticRoles[me.ariaRole]){me.ariaEl.dom.setAttribute('aria-disabled',!1)}
if(me.maskOnDisable&&me.getInherited().hasOwnProperty('masked')){dom=me.el.dom;nodeName=dom.nodeName;if(me.disabledRe.test(nodeName)){dom.disabled=!1}
if(!me.nonMaskableRe.test(nodeName)){me.unmask()}}},onGlobalShow:function(c){if(this.up(c)){this.getScrollable().restoreState()}},onHide:function(animateTarget,callback,scope){var me=this,ghostPanel,fromSize,toBox;if(!me.ariaStaticRoles[me.ariaRole]&&!me.destroying&&!me.destroyed){me.ariaEl.dom.setAttribute('aria-hidden',!0)}
me.revertFocus();animateTarget=me.getAnimateTarget(animateTarget);if(!me.ghost){animateTarget=null}
if(animateTarget){toBox={x:animateTarget.getX(),y:animateTarget.getY(),width:animateTarget.dom.offsetWidth,height:animateTarget.dom.offsetHeight};ghostPanel=me.ghost();ghostPanel.el.stopAnimation();fromSize=me.getSize();ghostPanel.el.animate({to:toBox,listeners:{afteranimate:function(){if(!me.destroying){ghostPanel.componentLayout.lastComponentSize=null;me.unghost(!1);ghostPanel.el.setSize(fromSize);me.afterHide(callback,scope)}}}})}else{me.el.hide()}
if(!animateTarget){me.afterHide(callback,scope)}},onPosition:Ext.emptyFn,onResize:function(width,height,oldWidth,oldHeight){var me=this;if(me.floating&&me.constrain){me.doConstrain()}
if(me.hasListeners.resize){me.fireEvent('resize',me,width,height,oldWidth,oldHeight)}},onShow:function(){var me=this;if(!me.ariaStaticRoles[me.ariaRole]){me.ariaEl.dom.setAttribute('aria-hidden',!1)}
me.el.show();me.updateLayout({isRoot:!1,context:me._showContext});if(me.floating){if(me.maximized){me.fitContainer()}else if(me.constrain){me.doConstrain()}}},_showContext:{show:!0},onShowComplete:function(callback,scope){var me=this,container=me.ownerFocusableContainer;if(me.floating){me.onFloatShow()}
Ext.callback(callback,scope||me);me.fireEvent('show',me);if(container&&!container.onFocusableChildShow.$nullFn){container.onFocusableChildShow(me)}
delete me.hiddenByLayout},onShowVeto:Ext.emptyFn,previousNode:function(selector,includeSelf){var node=this,ownerCt=node.ownerCt,result,it,i,sib;if(includeSelf&&node.is(selector)){return node}
if(ownerCt){for(it=ownerCt.items.items,i=Ext.Array.indexOf(it,node)-1;i>-1;i--){sib=it[i];if(sib.query){result=sib.query(selector);result=result[result.length-1];if(result){return result}}
if(sib.is(selector)){return sib}}
return ownerCt.previousNode(selector,!0)}
return null},previousSibling:function(selector){var o=this.ownerCt,it,idx,c;if(o){it=o.items;idx=it.indexOf(this);if(idx!==-1){if(selector){for(--idx;idx>=0;idx--){if((c=it.getAt(idx)).is(selector)){return c}}}else{if(idx){return it.getAt(--idx)}}}}
return null},registerFloatingItem:function(cmp){var me=this;if(!me.floatingDescendants){me.floatingDescendants=new Ext.ZIndexManager(me)}
me.floatingDescendants.register(cmp)},removeCls:function(cls){var me=this,el=me.rendered?me.el:me.protoEl;el.removeCls.apply(el,arguments);return me},removeClsWithUI:function(classes,skip){var me=this,clsArray=[],i=0,extArray=Ext.Array,remove=extArray.remove,uiCls=me.uiCls=extArray.clone(me.uiCls),activeUI=me.activeUI,length,cls;if(typeof classes==="string"){classes=(classes.indexOf(' ')<0)?[classes]:Ext.String.splitWords(classes)}
length=classes.length;for(i=0;i<length;i++){cls=classes[i];if(cls&&me.hasUICls(cls)){remove(uiCls,cls);if(activeUI){clsArray=clsArray.concat(me.removeUIClsFromElement(cls))}}}
if(skip!==!0&&activeUI){me.removeCls(clsArray)}
return clsArray},resumeLayouts:function(flushOptions){var me=this;if(!me.rendered){return}
if(!me.layoutSuspendCount){Ext.log.warn('Mismatched call to resumeLayouts - layouts are currently not suspended.')}
if(me.layoutSuspendCount&&!--me.layoutSuspendCount){me.suspendLayout=!1;if(flushOptions&&!me.isLayoutSuspended()){me.updateLayout(flushOptions)}}},scrollBy:function(deltaX,deltaY,animate){var scroller=this.getScrollable();if(scroller){scroller.scrollBy(deltaX,deltaY,animate)}},scrollTo:function(x,y,animate){var scroller=this.getScrollable();if(scroller){scroller.scrollTo(x,y,animate)}},setAutoScroll:function(scroll){this.setScrollable(!!scroll);return this},setBorder:function(border,targetEl){var me=this,initial=!!targetEl;if(me.rendered||initial){if(!initial){targetEl=me.el}
if(!border){border=0}else if(border===!0){border='1px'}else{border=this.unitizeBox(border)}
targetEl.setStyle('border-width',border);if(!initial){me.updateLayout()}}
me.border=border},setDock:function(dock){var me=this,ownerCt=me.ownerCt;if(dock!==me.dock){if(ownerCt&&ownerCt.moveDocked){ownerCt.moveDocked(me,dock)}else{me.dock=dock}}
return me},setDisabled:function(disabled){return this[disabled?'disable':'enable']()},setFlex:function(flex){this.flex=flex},setHeight:function(height){return this.setSize(undefined,height)},setLoading:function(load,targetEl){var me=this,config={target:me};if(me.rendered){if(load!==!1){if(Ext.isString(load)){config.msg=load}else{Ext.apply(config,load,me.maskDefaults)}
if(!me.loadMask||!me.loadMask.isLoadMask){if(targetEl&&config.useTargetEl==null){config.useTargetEl=!0}
me.loadMask=new Ext.LoadMask(config)}else{Ext.apply(me.loadMask,config)}
if(me.loadMask.isVisible()){me.loadMask.syncMaskState()}else{me.loadMask.show()}}else{if(me.loadMask&&me.loadMask.isLoadMask){me.loadMask.hide()}}}
return me.loadMask},setMargin:function(margin,preventLayout){var me=this;if(me.rendered){if(!margin&&margin!==0){margin=''}else{if(margin===!0){margin=5}
margin=this.unitizeBox(margin)}
me.margin=margin;me.margin$=null;me.getEl().setStyle('margin',margin);if(!preventLayout){me.updateLayout(me._notAsLayoutRoot)}}else{me.margin=margin}},setOverflowXY:function(overflowX,overflowY){this.setScrollable({x:(overflowX&&overflowX!=='hidden')?overflowX:!1,y:(overflowY&&overflowY!=='hidden')?overflowY:!1});return this},setPagePosition:function(x,y,animate){var me=this,p,floatParentBox;if(Ext.isArray(x)){y=x[1];x=x[0]}
me.pageX=x;me.pageY=y;if(me.floating){if(me.isContainedFloater()){floatParentBox=me.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(x)&&Ext.isNumber(floatParentBox.left)){x-=floatParentBox.left}
if(Ext.isNumber(y)&&Ext.isNumber(floatParentBox.top)){y-=floatParentBox.top}}else{p=me.el.translateXY(x,y);x=p.x;y=p.y}
me.setPosition(x,y,animate)}else{p=me.el.translateXY(x,y);me.setPosition(p.x,p.y,animate)}
return me},setPosition:function(x,y,animate){var me=this,pos=me.beforeSetPosition.apply(me,arguments);if(pos&&me.rendered){x=pos.x;y=pos.y;if(animate){if(x!==me.getLocalX()||y!==me.getLocalY()){me.stopAnimation();me.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(me.afterSetPosition,me,[x,y])},to:{left:x,top:y}},animate))}}else{me.setLocalXY(x,y);me.afterSetPosition(x,y)}}
return me},setScrollX:function(x,animate){var scroller=this.getScrollable();if(scroller){scroller.scrollTo(x,null,animate)}},setScrollY:function(y,animate){var scroller=this.getScrollable();if(scroller){scroller.scrollTo(null,y,animate)}},setSize:function(width,height){var me=this,oldWidth=me.width,oldHeight=me.height,widthIsString,heightIsString;if(width&&typeof width==='object'){height=width.height;width=width.width}
if(typeof width==='number'){me.width=Ext.Number.constrain(width,me.minWidth,me.maxWidth)}else if(width===null){delete me.width}else if(typeof width==='string'){widthIsString=!0;me.width=width}
if(typeof height==='number'){me.height=Ext.Number.constrain(height,me.minHeight,me.maxHeight)}else if(height===null){delete me.height}else if(typeof height==='string'){heightIsString=!0;me.height=height}
if(me.rendered&&me.isVisible()){if(oldWidth!==me.width||oldHeight!==me.height){if(me.liquidLayout||widthIsString||heightIsString){me.el.setSize(me.width,me.height)}
me.updateLayout(me._notAsLayoutRoot)}}
return me},setStyle:function(property,value){var el=this.el||this.protoEl;el.setStyle(property,value);return this},setUI:function(ui){var me=this,uiCls=me.uiCls,activeUI=me.activeUI,classes;if(ui===activeUI){return}
if(activeUI){classes=me.removeClsWithUI(uiCls,!0);if(classes.length){me.removeCls(classes)}
me.removeUIFromElement()}else{me.uiCls=[]}
me.ui=ui;me.activeUI=ui;me.addUIToElement();classes=me.addClsWithUI(uiCls,!0);if(classes.length){me.addCls(classes)}
if(me.rendered){me.updateLayout()}},setVisible:function(visible){return this[visible?'show':'hide']()},setHidden:function(hidden){return this.setVisible(!hidden)},setWidth:function(width){return this.setSize(width)},show:function(animateTarget,callback,scope){var me=this,rendered=me.rendered,container=me.ownerFocusableContainer;if(me.hierarchicallyHidden||(me.floating&&!rendered&&me.isHierarchicallyHidden())){if(!rendered){me.initHierarchyEvents()}
if(arguments.length>1){arguments[0]=null;me.pendingShow=arguments}else{me.pendingShow=!0}}else if(rendered&&me.isVisible()){if(me.floating){me.onFloatShow();if(me.toFrontOnShow){me.toFront()}}}else{if(me.fireEvent('beforeshow',me)!==!1){me.hidden=!1;delete this.getInherited().hidden;if(container&&!container.beforeFocusableChildShow.$nullFn){container.beforeFocusableChildShow(me)}
Ext.suspendLayouts();if(!rendered&&(me.autoRender||me.floating)){me.doAutoRender();rendered=me.rendered}
if(rendered){me.beforeShow();Ext.resumeLayouts();me.onShow.apply(me,arguments);me.afterShow.apply(me,arguments)}else{Ext.resumeLayouts(!0)}}else{me.onShowVeto()}}
return me},showAt:function(x,y,animate){var me=this;if(!me.rendered&&(me.autoRender||me.floating)){me.x=x;me.y=y;return me.show()}
if(me.floating){me.setPosition(x,y,animate)}else{me.setPagePosition(x,y,animate)}
return me.show()},showBy:function(component,position,offset){var me=this;if(!me.floating){Ext.log.warn('Using showBy on a non-floating component')}
if(me.floating&&component){me._lastAlignTarget=component;me._lastAlignToPos=position||me.defaultAlign;me._lastAlignToOffsets=offset||me.alignOffset;me.show()}
return me},suspendLayouts:function(){var me=this;if(!me.rendered){return}
if(++me.layoutSuspendCount===1){me.suspendLayout=!0}},toggleCls:function(className,state){if(state===undefined){state=!this.hasCls(className)}
return this[state?'addCls':'removeCls'](className)},unitizeBox:function(box){return Ext.Element.unitizeBox(box)},unmask:function(){(this.getMaskTarget()||this.el).unmask();this.setMasked(!1)},unregisterFloatingItem:function(cmp){var me=this;if(me.floatingDescendants){me.floatingDescendants.unregister(cmp)}},up:function(selector,limit){var result=this.getRefOwner(),limitSelector=typeof limit==='string',limitCount=typeof limit==='number',limitComponent=limit&&limit.isComponent,steps=0;if(selector){for(;result;result=result.getRefOwner()){if(result.destroyed){return null}
steps++;if(selector.isComponent){if(result===selector){return result}}else{if(Ext.ComponentQuery.is(result,selector)){return result}}
if(limitSelector&&result.is(limit)){return}
if(limitCount&&steps===limit){return}
if(limitComponent&&result===limit){return}}}
return result},update:function(htmlOrData,loadScripts,callback,scriptScope){var me=this,isData=(me.tpl&&!Ext.isString(htmlOrData)),container=me.ownerFocusableContainer,sizeModel,doLayout,el;if(isData){me.data=(htmlOrData&&htmlOrData.isEntity)?htmlOrData.getData(!0):htmlOrData}else{me.html=Ext.isObject(htmlOrData)?Ext.DomHelper.markup(htmlOrData):htmlOrData}
if(me.rendered){sizeModel=me.getSizeModel();doLayout=sizeModel.width.shrinkWrap||sizeModel.height.shrinkWrap;if(me.isContainer){el=me.layout.getRenderTarget();doLayout=doLayout||me.items.items.length>0}else{el=me.getTargetEl()}
if(isData){me.tpl[me.tplWriteMode](el,me.data||{})}else{el.setHtml(me.html,loadScripts,callback,scriptScope||me)}
if(doLayout){me.updateLayout()}
if(container&&!container.onFocusableChildUpdate.$nullFn){container.onFocusableChildUpdate(me)}}},setHtml:function(html,loadScripts,callback,scriptScope){this.update(html,loadScripts,null,scriptScope)},applyData:function(data){this.update(data)},updateBox:function(box){this.setSize(box.width,box.height);this.setPagePosition(box.x,box.y);return this},_asLayoutRoot:{isRoot:!0},_notAsLayoutRoot:{isRoot:!1},updateLayout:function(options){var me=this,defer,lastBox=me.lastBox,isRoot=options&&options.isRoot,context=options&&options.context;if(lastBox){lastBox.invalid=!0}
if(!me.rendered||me.isDetached||me.layoutSuspendCount||me.suspendLayout){return}
if(me.hidden){Ext.Component.cancelLayout(me)}else if(typeof isRoot!=='boolean'){isRoot=me.isLayoutRoot()}
if(isRoot||!me.ownerLayout||!me.ownerLayout.onContentChange(me,context)){if(!me.isLayoutSuspended()){defer=(options&&options.hasOwnProperty('defer'))?options.defer:me.deferLayouts;Ext.Component.updateLayout(me,defer)}}},updateMaxHeight:function(maxHeight,oldMaxHeight){this.changeConstraint(maxHeight,oldMaxHeight,'min','max-height','height')},updateMaxWidth:function(maxWidth,oldMaxWidth){this.changeConstraint(maxWidth,oldMaxWidth,'min','max-width','width')},updateMinHeight:function(minHeight,oldMinHeight){this.changeConstraint(minHeight,oldMinHeight,'max','min-height','height')},updateMinWidth:function(minWidth,oldMinWidth){this.changeConstraint(minWidth,oldMinWidth,'max','min-width','width')},updateTouchAction:function(touchAction){var name,childEl,value,hasRootActions;for(name in touchAction){childEl=this[name];value=touchAction[name];if(childEl&&childEl.isElement){childEl.setTouchAction(value)}else{hasRootActions=!0}}
if(hasRootActions){this.el.setTouchAction(touchAction)}},getAnchorToXY:function(el,anchor,local,mySize){return el.getAnchorXY(anchor,local,mySize)},getBorderPadding:function(){return this.el.getBorderPadding()},getLocalX:function(){return this.el.getLocalX()},getLocalXY:function(){return this.el.getLocalXY()},getLocalY:function(){return this.el.getLocalY()},getX:function(){return this.el.getX()},getXY:function(){return this.el.getXY()},getY:function(){return this.el.getY()},setLocalX:function(x){this.el.setLocalX(x)},setLocalXY:function(x,y){this.el.setLocalXY(x,y)},setLocalY:function(y){this.el.setLocalY(y)},setX:function(x,animate){this.el.setX(x,animate)},setXY:function(xy,animate){this.el.setXY(xy,animate)},setY:function(y,animate){this.el.setY(y,animate)},privates:{addOverCls:function(){var me=this;if(!me.disabled){me.el.addCls(me.overCls)}},addUIToElement:function(){var me=this,baseClsUI=me.baseCls+'-'+me.ui,childEls,childElName,el,suffix;me.addCls(baseClsUI);if(me.rendered&&me.frame&&!Ext.supports.CSS3BorderRadius){baseClsUI+='-';childEls=me.getChildEls();for(childElName in childEls){suffix=childEls[childElName].frame;if(suffix&&suffix!==!0){el=me[childElName];if(el){el.addCls(baseClsUI+suffix)}}}}},changeConstraint:function(newValue,oldValue,constrainMethod,styleName,sizeName){var me=this,size=me[sizeName];if(newValue!=null&&typeof size==='number'){me[sizeName]=Math[constrainMethod](size,newValue)}
if(me.liquidLayout){if(newValue!=null){me.setStyle(styleName,newValue+'px')}else if(oldValue){me.setStyle(styleName,'')}}
if(me.rendered){me.updateLayout()}},constructPlugin:function(plugin){var me=this,PM=Ext.plugin.Manager;if(typeof plugin==='string'){plugin=PM.create({},plugin,me)}else{plugin=PM.create(plugin,null,me)}
return plugin},constructPlugins:function(){var me=this,plugins=me.plugins,result,i,len;if(plugins){me.plugins=result=Ext.plugin.Abstract.decode(plugins,'ptype');result.processed=!0;for(i=0,len=result.length;i<len;i++){result[i]=me.constructPlugin(result[i])}}
me.pluginsInitialized=!0;return result},detachFromBody:function(){var me=this;if(!me.isDetached){Ext.getDetachedBody().appendChild(me.el,!0);Ext.Component.cancelLayout(me);me.isDetached=!0}},doAddListener:function(ename,fn,scope,options,order,caller,manager){var me=this,listeners,option,eventOptions,elementName,element,delegate;if(Ext.isObject(fn)||(options&&options.element)){if(options.element){elementName=options.element;listeners={};listeners[ename]=fn;if(scope){listeners.scope=scope}
eventOptions=me.$elementEventOptions;for(option in options){if(eventOptions[option]){listeners[option]=options[option]}}}else{listeners=fn;elementName=ename}
element=me[elementName];if(element&&element.isObservable){me.mon(element,listeners)}else{me.afterRenderEvents=me.afterRenderEvents||{};if(!me.afterRenderEvents[elementName]){me.afterRenderEvents[elementName]=[]}
me.afterRenderEvents[elementName].push(listeners)}
return}
if(options){delegate=options.delegate;if(delegate){me.mixins.componentDelegation.addDelegatedListener.call(me,ename,fn,scope,options,order,caller,manager);return}}
me.mixins.observable.doAddListener.call(me,ename,fn,scope,options,order,caller,manager)},doRemoveListener:function(eventName,fn,scope){var me=this;me.mixins.observable.doRemoveListener.call(me,eventName,fn,scope);me.mixins.componentDelegation.removeDelegatedListener.call(me,eventName,fn,scope)},fireHierarchyEvent:function(eventName){var globalEvents=Ext.GlobalEvents;if(globalEvents.hasListeners[eventName]){globalEvents.fireEvent(eventName,this)}},getActionEl:function(){return this.el},getAutoId:function(){this.autoGenId=!0;return++Ext.Component.AUTO_ID},getContentTarget:function(){return this.el},getDragEl:function(){return this.el},getOverflowEl:function(){return this.getTargetEl()},getOverflowStyle:function(){var me=this,scroller=me.getScrollable(),flags=me._scrollFlags,x,y,scrollFlags;if(scroller){x=scroller.getX();if(x===!0){x='auto'}
y=scroller.getY();if(y===!0){y='auto'}
scrollFlags=flags[x][y]}else{scrollFlags=flags.none}
me.scrollFlags=scrollFlags;return{overflowX:scrollFlags.overflowX,overflowY:scrollFlags.overflowY}},getPlugins:function(){var plugins=this.plugins;plugins=(plugins&&plugins.processed)?plugins:this.constructPlugins();return plugins||null},getProxy:function(){var me=this,target;if(!me.proxy){target=Ext.getBody();me.proxy=me.el.createProxy(Ext.baseCSSPrefix+'proxy-el',target,!0)}
return me.proxy},getTargetEl:function(){return this.frameBody||this.el},getTdCls:function(){return Ext.baseCSSPrefix+this.getTdType()+'-'+this.ui+'-cell'},getTdType:function(){return this.xtype},getTpl:function(name){Ext.log.warn('getTpl is deprecated, use lookupTpl.');return this.lookupTpl(name)},initCls:function(){var me=this,cls=[me.baseCls],targetCls=me.getComponentLayout().targetCls;if(targetCls){cls.push(targetCls)}
if(Ext.isDefined(me.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.Component: cmpCls has been deprecated. Please use componentCls.')}
me.componentCls=me.cmpCls;delete me.cmpCls}
if(me.componentCls){cls.push(me.componentCls)}else{me.componentCls=me.baseCls}
return cls},initDraggable:function(){var me=this,dragTarget,ddConfig;dragTarget=(me.resizer&&me.resizer.el!==me.el)?me.resizerComponent=new Ext.Component({el:me.resizer.el,rendered:!0,container:me.container}):me;ddConfig=Ext.applyIf({el:dragTarget.getDragEl(),constrainTo:(me.constrain||me.draggable.constrain)?(me.constrainTo||(me.floatParent?me.floatParent.getTargetEl():me.container)):undefined},me.draggable);if(me.constrain||me.constrainDelegate){ddConfig.constrain=me.constrain;ddConfig.constrainDelegate=me.constrainDelegate}
me.dd=new Ext.util.ComponentDragger(dragTarget,ddConfig)},initPadding:function(targetEl){var me=this,padding=me.padding;if(padding!=null){if(me.layout&&me.layout.managePadding&&me.contentPaddingProperty==='padding'){targetEl.setStyle('padding',0)}else{targetEl.setStyle('padding',this.unitizeBox((padding===!0)?5:padding))}}},initPlugin:function(plugin){plugin.init(this);return plugin},initResizable:function(resizable){var me=this;resizable=Ext.apply({target:me,dynamic:!1,constrainTo:(me.constrain||(resizable&&resizable.constrain))?(me.constrainTo||(me.floatParent?me.floatParent.getTargetEl():me.container)):undefined,handles:me.resizeHandles},resizable);resizable.target=me;me.resizer=new Ext.resizer.Resizer(resizable)},initStyles:function(targetEl){var me=this,margin=me.margin,border=me.border,cls=me.cls,style=me.style,x=me.x,y=me.y,liquidLayout=me.liquidLayout,width,height;me.initPadding(targetEl);if(margin!=null){targetEl.setStyle('margin',this.unitizeBox((margin===!0)?5:margin))}
if(border!=null){me.setBorder(border,targetEl)}
if(cls&&cls!==me.initialCls){targetEl.addCls(cls);me.cls=me.initialCls=null}
if(style&&style!==me.initialStyle){targetEl.setStyle(style);me.style=me.initialStyle=null}
if(x!=null){targetEl.setStyle(me.horizontalPosProp,(typeof x==='number')?(x+'px'):x)}
if(y!=null){targetEl.setStyle('top',(typeof y==='number')?(y+'px'):y)}
if(!me.ownerCt||me.floating){if(Ext.scopeCss){targetEl.addCls(me.rootCls)}
targetEl.addCls(me.borderBoxCls)}
if(liquidLayout||!me.getFrameInfo()){width=me.width;height=me.height;if(width!=null){if(typeof width==='number'){targetEl.setStyle('width',width+'px')}else{targetEl.setStyle('width',width)}}
if(height!=null){if(typeof height==='number'){targetEl.setStyle('height',height+'px')}else{targetEl.setStyle('height',height)}}}},isContainedFloater:function(){return(this.floating&&this.floatParent)},isDescendant:function(ancestor){var c;if(ancestor.isContainer){for(c=this.ownerCt;c;c=c.ownerCt){if(c===ancestor){return!0}}}
return!1},owns:function(element){var result=!1,cmp;if(element.isEvent){element=element.target}else if(element.isElement){element=element.dom}
cmp=Ext.Component.fromElement(element);if(cmp){result=(cmp===this)||(!!cmp.up(this))}
return result},parseBox:function(box){return Ext.Element.parseBox(box)},reattachToBody:function(){this.isDetached=!1},removeManagedListenerItem:function(isClear,managedListener,item,ename,fn,scope){var me=this,element=managedListener.options?managedListener.options.element:null;if(element){element=me[element];if(element&&element.un){if(isClear||(managedListener.item===item&&managedListener.ename===ename&&(!fn||managedListener.fn===fn)&&(!scope||managedListener.scope===scope))){element.un(managedListener.ename,managedListener.fn,managedListener.scope);if(!isClear){Ext.Array.remove(me.managedListeners,managedListener)}}}}else{return me.mixins.observable.removeManagedListenerItem.apply(me,arguments)}},removeOverCls:function(){this.el.removeCls(this.overCls)},removePlugin:function(plugin){Ext.Array.remove(this.plugins,plugin);plugin.destroy()},removeUIFromElement:function(){var me=this,baseClsUI=me.baseCls+'-'+me.ui,childEls,childElName,el,suffix;me.removeCls(baseClsUI);if(me.rendered&&me.frame&&!Ext.supports.CSS3BorderRadius){baseClsUI+='-';childEls=me.getChildEls();for(childElName in childEls){suffix=childEls[childElName].frame;if(suffix&&suffix!==!0){el=me[childElName];if(el){el.removeCls(baseClsUI+suffix)}}}}},setComponentLayout:function(layout){var currentLayout=this.componentLayout;if(currentLayout&&currentLayout.isLayout&&currentLayout!==layout){currentLayout.setOwner(null)}
this.componentLayout=layout;layout.setOwner(this)},setHiddenState:function(hidden){var me=this,inheritedState=me.getInherited(),zIndexManager=me.zIndexManager;me.hidden=hidden;if(hidden){inheritedState.hidden=!0}else{delete inheritedState.hidden}
if(zIndexManager){zIndexManager.onComponentShowHide(me)}},setupProtoEl:function(){var cls=this.initCls();this.protoEl.addCls(cls)},wrapPrimaryEl:function(dom){var me=this,el=me.el;if(!el||!el.isElement){me.el=Ext.get(dom)}
if(me.floating){this.mixins.floating.constructor.call(this)}}},deprecated:{5:{methods:{addClass:'addCls',doComponentLayout:function(){this.updateLayout();return this},removeClass:'removeCls',forceComponentLayout:'updateLayout',setDocked:'setDock'}}}},function(Component){var prototype=Component.prototype;(prototype.$elementEventOptions=Ext.Object.chain(Ext.Element.prototype.$eventOptions)).element=1;(prototype.$eventOptions=Ext.Object.chain(prototype.$eventOptions)).delegate=1;Component.createAlias({on:'addListener',prev:'previousSibling',next:'nextSibling'});Ext.resumeLayouts=function(flush){Component.resumeLayouts(flush)};Ext.suspendLayouts=function(){Component.suspendLayouts()};Ext.batchLayouts=function(fn,scope){Component.suspendLayouts();try{fn.call(scope)}finally{Component.resumeLayouts(!0)}};Ext.setGlyphFontFamily=function(fontFamily){Ext._glyphFontFamily=fontFamily};Component.hierarchyEventSource=prototype.hierarchyEventSource=Ext.GlobalEvents;Ext.onReady(function(){if(Ext.supports.HighContrastMode){Ext.getBody().addCls(Component.ariaHighContrastModeCls)}})})
;
Ext.define('Ext.overrides.mixin.Focusable',{override:'Ext.Component',focusCls:'focus',focus:function(selectText,delay,callback,scope){var me=this,containerScrollTop;if((!me.focusable&&!me.isContainer)||me.destroyed||me.destroying){return me}
if(delay){me.getFocusTask().delay(Ext.isNumber(delay)?delay:10,me.focus,me,[selectText,!1,callback,scope]);return me}
me.cancelFocus();if(me.floating&&me.container&&me.container.dom){containerScrollTop=me.container.dom.scrollTop}
if(me.mixins.focusable.focus.apply(me,arguments)!==!1){if(callback){Ext.callback(callback,scope)}
if(me.floating&&containerScrollTop!==undefined){me.container.dom.scrollTop=containerScrollTop}}
return me},cancelFocus:function(){var me=this,task=me.getFocusTask();if(task){task.cancel()}},beforeBlur:Ext.emptyFn,postBlur:Ext.emptyFn,beforeFocus:Ext.emptyFn,postFocus:Ext.emptyFn,onFocusEnter:function(e){var me=this;if(me.destroying||me.destroyed){return}
if(me.floating&&me!==me.zIndexManager.getActive()){me.toFront(!0)}
me.callParent([e])},destroyFocusable:function(){var me=this;if(me.focusTask){me.focusTask.stop(me.focus,me)}
me.callParent()},privates:{addFocusCls:function(e){var me=this,focusCls=me.focusCls,el;if(focusCls){el=me.getFocusClsEl(e);if(el){el.addCls(me.addClsWithUI(focusCls,!0))}}},removeFocusCls:function(e){var me=this,focusCls=me.focusCls,el;if(focusCls){el=me.getFocusClsEl(e);if(el){el.removeCls(me.removeClsWithUI(focusCls,!0))}}},getFocusTask:function(){if(!this.focusTask){this.focusTask=Ext.focusTask}
return this.focusTask},updateMaskState:function(state,mask){var me=this,ariaEl=me.ariaEl.dom,skipMask=me.getInherited().disabled&&me.getInherited().disableMask,value;if(state){me.disableTabbing();if(!skipMask){me.setMasked(!0)}
if(ariaEl){ariaEl.setAttribute('aria-busy','true');value=ariaEl.getAttribute('aria-describedby');if(value){me._savedAriaDescribedBy=value}
ariaEl.setAttribute('aria-describedby',mask.ariaEl.id)}}else{me.enableTabbing();if(!skipMask){me.setMasked(!1)}
if(ariaEl){ariaEl.removeAttribute('aria-busy');value=ariaEl.getAttribute('aria-describedby');ariaEl.removeAttribute('aria-describedby');if(value===mask.ariaEl.id&&me._savedAriaDescribedBy){ariaEl.setAttribute('aria-describedby',me._savedAriaDescribedBy);delete me._savedAriaDescribedBy}}}}}},function(){if(!Ext.focusTask){Ext.focusTask=new Ext.util.DelayedTask()}})
;
Ext.define('Ext.Responsive',{override:'Ext.Component',mixins:['Ext.mixin.Responsive'],requires:['Ext.ResponsiveWidget']})
;
Ext.define('Ext.layout.container.border.Region',{override:'Ext.Component',initBorderRegion:function(){var me=this;if(!me._borderRegionInited){me._borderRegionInited=!0;me.addStateEvents(['changeregion','changeweight']);Ext.override(me,{getState:function(){var state=me.callParent();state=me.addPropertyToState(state,'region');state=me.addPropertyToState(state,'weight');return state}})}},getOwningBorderContainer:function(){var layout=this.getOwningBorderLayout();return layout&&layout.owner},getOwningBorderLayout:function(){var layout=this.ownerLayout;return(layout&&layout.isBorderLayout)?layout:null},setRegion:function(region){var me=this,borderLayout,old=me.region;if(typeof region!=='string'){Ext.raise('Use setBox to set the size or position of a component.')}
if(region!==old){borderLayout=me.getOwningBorderLayout();if(borderLayout){var regionFlags=borderLayout.regionFlags[region],placeholder=me.placeholder,splitter=me.splitter,owner=borderLayout.owner,regionMeta=borderLayout.regionMeta,collapsed=me.collapsed||me.floated,delta,items,index;if(me.fireEventArgs('beforechangeregion',[me,region])===!1){return old}
Ext.suspendLayouts();me.region=region;Ext.apply(me,regionFlags);if(me.updateCollapseTool){me.updateCollapseTool()}
if(splitter){Ext.apply(splitter,regionFlags);splitter.updateOrientation();items=owner.items;index=items.indexOf(me);if(index>=0){delta=regionMeta[region].splitterDelta;if(items.getAt(index+delta)!==splitter){items.remove(splitter);index=items.indexOf(me);if(delta>0){++index}
items.insert(index,splitter)}}}
if(placeholder){if(collapsed){me.expand(!1)}
owner.remove(placeholder);me.placeholder=null;if(collapsed){me.collapse(null,!1)}}
owner.updateLayout();Ext.resumeLayouts(!0);me.fireEventArgs('changeregion',[me,old])}else{me.region=region}}
return old},setWeight:function(weight){var me=this,ownerCt=me.getOwningBorderContainer(),placeholder=me.placeholder,old=me.weight;if(weight!==old){if(me.fireEventArgs('beforechangeweight',[me,weight])!==!1){me.weight=weight;if(placeholder){placeholder.weight=weight}
if(ownerCt){ownerCt.updateLayout()}
me.fireEventArgs('changeweight',[me,old])}}
return old}},function(Component){var proto=Component.prototype;proto.setBorderRegion=proto.setRegion;proto.setRegionWeight=proto.setWeight})
;
Ext.define('Ext.rtl.Component',{override:'Ext.Component',applyScrollable:function(scrollable,oldScrollable){var ret=this.callParent([scrollable,oldScrollable]);if(ret&&this.getInherited().rtl){ret.setRtl(!0)}
return ret},convertPositionSpec:function(posSpec){return Ext.util.Region.getAlignInfo(posSpec,(Ext.rootInheritedState.rtl||!1)!==(this.getInherited().rtl||!1))},getAnchorToXY:function(el,anchor,local,mySize){var doc=document,pos,scroll,extraX,extraY;if(el.dom===doc.body||el.dom===doc){scroll=Ext.rootInheritedState.rtl?el.rtlGetScroll():el.getScroll();extraX=scroll.left;extraY=scroll.top}else{pos=el.getXY();extraX=local?0:pos[0];extraY=local?0:pos[1]}
return el.calculateAnchorXY(anchor,extraX,extraY,mySize)},getBorderPadding:function(){var borderPadding=this.el.getBorderPadding(),xBegin;if(this.isParentRtl()){xBegin=borderPadding.xBegin;borderPadding.xBegin=borderPadding.xEnd;borderPadding.xEnd=xBegin}
return borderPadding},getLocalX:function(){return this.isLocalRtl()?this.el.rtlGetLocalX():this.el.getLocalX()},getLocalXY:function(){return this.isLocalRtl()?this.el.rtlGetLocalXY():this.el.getLocalXY()},unitizeBox:function(box){if(this.getInherited().rtl){return Ext.dom.Element.rtlUnitizeBox(box)}else{return this.callParent(arguments)}},initInheritedState:function(inheritedState){this.callParent(arguments);var rtl=this.rtl;if(rtl!==undefined){inheritedState.rtl=rtl}},isLocalRtl:function(){var me=this,rtl,offsetParent;if(me.floating){if(me._isOffsetParentRtl===undefined){offsetParent=this.el.dom.offsetParent||this.el.dom.parentNode;if(offsetParent){me._isOffsetParentRtl=Ext.fly(offsetParent,'_isLocalRtl').isStyle('direction','rtl')}}
rtl=!!me._isOffsetParentRtl}else{rtl=this.isParentRtl()}
return rtl},isParentRtl:function(){var me=this,inheritedState=me.getInherited(),isRtl=!1,myRtl;if(inheritedState.hasOwnProperty('rtl')){myRtl=inheritedState.rtl;delete inheritedState.rtl}
if(inheritedState.rtl){isRtl=!0}
if(myRtl!==undefined){inheritedState.rtl=myRtl}
return isRtl},setLocalX:function(x){return this.isLocalRtl()?this.el.rtlSetLocalX(x):this.el.setLocalX(x)},setLocalXY:function(x,y){return this.isLocalRtl()?this.el.rtlSetLocalXY(x,y):this.el.setLocalXY(x,y)},isOppositeRootDirection:function(){return!this.getInherited().rtl!==!Ext.rootInheritedState.rtl},privates:{initStyles:function(){if(this.getInherited().rtl){this.horizontalPosProp='right'}
this.callParent(arguments)},parseBox:function(box){if(this.getInherited().rtl){return Ext.dom.Element.rtlParseBox(box)}else{return this.callParent(arguments)}}}},function(){Ext.onInternalReady(function(){if((Ext.fly(document.documentElement).isStyle('direction','rtl'))||(Ext.getBody().isStyle('direction','rtl'))){Ext.rootInheritedState.rtl=!0}})})
;
Ext.define('Ext.theme.neptune.Component',{override:'Ext.Component',initComponent:function(){this.callParent();if(this.dock&&this.border===undefined){this.border=!1}},privates:{initStyles:function(){var me=this,hasOwnBorder=me.hasOwnProperty('border'),border=me.border;if(me.dock){me.border=null}
me.callParent(arguments);if(hasOwnBorder){me.border=border}else{delete me.border}}}},function(){Ext.namespace('Ext.theme.is').Neptune=!0;Ext.theme.name='Neptune'})
;
Ext.define('Ext.theme.triton.Component',{override:'Ext.Component'},function(){Ext.namespace('Ext.theme.is').Triton=!0;Ext.theme.name='Triton'})
;
Ext.define('Ext.overrides.app.domain.Component',{override:'Ext.app.domain.Component',requires:['Ext.Component']},function(ComponentDomain){ComponentDomain.monitor(Ext.Component)})
;
Ext.define('Ext.app.EventBus',{singleton:!0,requires:['Ext.app.domain.Component'],constructor:function(){var me=this,domains=Ext.app.EventDomain.instances;me.callParent();me.domains=domains;me.bus=domains.component.bus},control:function(selectors,controller){return this.domains.component.listen(selectors,controller)},listen:function(to,controller){var domains=this.domains,domain;for(domain in to){if(to.hasOwnProperty(domain)){domains[domain].listen(to[domain],controller)}}},unlisten:function(controllerId){var domains=Ext.app.EventDomain.instances,domain;for(domain in domains){domains[domain].unlisten(controllerId)}}})
;
Ext.define('Ext.app.domain.Global',{extend:'Ext.app.EventDomain',requires:['Ext.GlobalEvents'],singleton:!0,type:'global',constructor:function(){var me=this;me.callParent();me.monitor(Ext.GlobalEvents)},listen:function(listeners,controller){this.callParent([{global:listeners},controller])},match:Ext.returnTrue})
;
Ext.define('Ext.route.Handler',{lazy:!1,statics:{fromRouteConfig:function(config,scope){var handler={action:config.action,before:config.before,lazy:config.lazy,exit:config.exit,scope:scope,single:config.single};return new this(handler)}},constructor:function(config){Ext.apply(this,config)}})
;
Ext.define('Ext.route.Action',{config:{actions:null,befores:null,urlParams:[]},started:!1,stopped:!1,constructor:function(config){var me=this;me.deferred=new Ext.Deferred();me.resume=me.resume.bind(me);me.stop=me.stop.bind(me);me.initConfig(config);me.callParent([config])},applyActions:function(actions){if(actions){actions=Ext.Array.from(actions)}
return actions},applyBefores:function(befores){if(befores){befores=Ext.Array.from(befores)}
return befores},destroy:function(){this.deferred=null;this.setBefores(null).setActions(null).setUrlParams(null);this.callParent()},resume:function(){return this.next()},stop:function(){this.stopped=!0;return this.done()},next:function(){var me=this,actions=me.getActions(),befores=me.getBefores(),urlParams=me.getUrlParams(),config,ret,args;if(Ext.isArray(urlParams)){args=urlParams.slice()}else{args=[urlParams]}
if(me.stopped||(befores?!befores.length:!0)&&(actions?!actions.length:!0)){me.done()}else{if(befores&&befores.length){config=befores.shift();args.push(me);ret=Ext.callback(config.fn,config.scope,args);if(ret&&ret.then){ret.then(function(arg){me.resume(arg)},function(arg){me.stop(arg)})}}else if(actions&&actions.length){config=actions.shift();Ext.callback(config.fn,config.scope,args);me.next()}else{me.next()}}
return me},run:function(){var deferred=this.deferred;if(!this.started){this.next();this.started=!0}
return deferred.promise},done:function(){var deferred=this.deferred;if(this.stopped){deferred.reject()}else{deferred.resolve()}
this.destroy();return this},before:function(first,fn,scope){if(!Ext.isBoolean(first)){scope=fn;fn=first;first=!1}
var befores=this.getBefores(),config={fn:fn,scope:scope};if(this.destroyed){Ext.raise('This action has has already resolved and therefore will never '+'execute this function.');return}
if(befores){if(first){befores.unshift(config)}else{befores.push(config)}}else{this.setBefores(config)}
return this},action:function(first,fn,scope){if(!Ext.isBoolean(first)){scope=fn;fn=first;first=!1}
var actions=this.getActions(),config={fn:fn,scope:scope};if(this.destroyed){Ext.raise('This action has has already resolved and therefore will never '+'execute this function.');return}
if(actions){if(first){actions.unshift(config)}else{actions.push(config)}}else{this.setActions(config)}
return this},then:function(resolve,reject){if(this.destroyed){Ext.raise('This action has has already resolved and therefore will never '+'execute either function.');return}
return this.deferred.then(resolve,reject)}})
;
Ext.define('Ext.route.Route',{requires:['Ext.route.Action','Ext.route.Handler'],config:{name:null,url:null,allowInactive:!1,conditions:{},caseInsensitive:!1,handlers:[],types:{cached:!0,$value:{alpha:{re:'([a-zA-Z]+)'},alphanum:{re:'([a-zA-Z0-9]+|[0-9]+(?:\\.[0-9]+)?|[0-9]*(?:\\.[0-9]+){1})',parse:function(value){var test;if(value&&this.numRe.test(value)){test=parseFloat(value);if(!isNaN(test)){value=test}}
return value}},num:{re:'([0-9]+(?:\\.[0-9]+)?|[0-9]*(?:\\.[0-9]+){1})',parse:function(value){if(value){value=parseFloat(value)}
return value}},'...':{re:'(.+)?',split:'/',parse:function(values){var length,i,value;if(values){length=values.length;for(i=0;i<length;i++){value=parseFloat(values[i]);if(!isNaN(value)){values[i]=value}}}
return values}}}}},defaultMatcher:'([%a-zA-Z0-9\\-\\_\\s,]+)',numRe:/^[0-9]*(?:\.[0-9]*)?$/,typeParamRegex:/:{([0-9A-Za-z_]+)(?::?([0-9A-Za-z_]+|.{3})?)}/g,optionalGroupRegex:/\((.+?)\)/g,paramMatchingRegex:/:([0-9A-Za-z_]+)/g,isRoute:!0,constructor:function(config){var me=this,url;this.initConfig(config);url=me.getUrl().replace(me.optionalGroupRegex,function(match,middle){return'(?:'+middle+')?'});if(url.match(me.typeParamRegex)){me.handleNamedPattern(url)}else{me.handlePositionalPattern(url)}},handlePositionalPattern:function(url){var me=this;me.paramsInMatchString=url.match(me.paramMatchingRegex)||[];me.matcherRegex=me.createMatcherRegex(url);me.mode='positional'},handleNamedPattern:function(url){var me=this,typeParamRegex=me.typeParamRegex,conditions=me.getConditions(),types=me.getTypes(),defaultMatcher=me.defaultMatcher,params={},re=url.replace(typeParamRegex,function(match,param,typeMatch){var type=typeMatch&&types[typeMatch],matcher=conditions[param]||type||defaultMatcher;if(params[param]){Ext.raise('"'+param+'" already defined in route "'+url+'"')}
if(typeMatch&&!type){Ext.raise('Unknown parameter type "'+typeMatch+'" in route "'+url+'"')}
if(Ext.isObject(matcher)){matcher=matcher.re}
params[param]={matcher:matcher,type:typeMatch};return matcher});if(re.search(me.paramMatchingRegex)!==-1){Ext.raise('URL parameter mismatch. Positional url parameter found '+'while in named mode.')}
me.paramsInMatchString=params;me.matcherRegex=new RegExp('^'+re+'$',me.getCaseInsensitive()?'i':'');me.mode='named'},recognize:function(url){var me=this,recognized=me.recognizes(url),handlers,length,hasHandler,handler,matches,urlParams,i;if(recognized){handlers=me.getHandlers();length=handlers.length;for(i=0;i<length;i++){handler=handlers[i];if(handler.lastToken!==url){hasHandler=!0;break}}
if(!hasHandler&&url===me.lastToken){return!0}
matches=me.matchesFor(url);urlParams=me.getUrlParams(url);return Ext.applyIf(matches,{historyUrl:url,urlParams:urlParams})}
return!1},getUrlParams:function(url){if(this.mode==='named'){return this.getNamedUrlParams(url)}else{return this.getPositionalUrlParams(url)}},getPositionalUrlParams:function(url){var params=[],conditions=this.getConditions(),keys=this.paramsInMatchString,values=url.match(this.matcherRegex),length=keys.length,i,key,type,value;values.shift();for(i=0;i<length;i++){key=keys[i];value=values[i];if(conditions[key]){type=conditions[key]}else if(key[0]===':'){key=key.substr(1);if(conditions[key]){type=conditions[key]}}
value=this.parseValue(value,type);if(Ext.isDefined(value)&&value!==''){if(Ext.isArray(value)){params.push.apply(params,value)}else{params.push(value)}}}
return params},getNamedUrlParams:function(url){var conditions=this.getConditions(),types=this.getTypes(),params={},keys=this.paramsInMatchString,values=url.match(this.matcherRegex),name,obj,value,type,condition;values.shift();for(name in keys){obj=keys[name];value=values.shift();condition=conditions[name];type=types[obj.type];if(condition||type){type=Ext.merge({},condition,types[obj.type])}
params[name]=this.parseValue(value,type)}
return params},parseValue:function(value,type){if(type){if(value&&type.split){value=value.split(type.split);if(!value[0]){value.shift()}
if(!value[value.length-1]){value.pop()}}
if(type.parse){value=type.parse.call(this,value)}}
if(!value&&Ext.isString(value)){value=undefined}
return value},recognizes:function(url){return this.matcherRegex.test(url)},execute:function(token,argConfig){var me=this,allowInactive=me.getAllowInactive(),handlers=me.getHandlers(),queue=Ext.route.Router.getQueueRoutes(),length=handlers.length,urlParams=(argConfig&&argConfig.urlParams)||[],i,handler,scope,action,promises,single,remover;me.lastToken=token;if(!queue){promises=[]}
return new Ext.Promise(function(resolve,reject){if(argConfig===!1){reject()}else{if(queue){action=new Ext.route.Action({urlParams:urlParams})}
for(i=0;i<length;i++){handler=handlers[i];if(token!=null&&handler.lastToken===token){continue}
scope=handler.scope;handler.lastToken=token;if(!allowInactive&&scope.isActive&&!scope.isActive()){continue}
if(!queue){action=new Ext.route.Action({urlParams:urlParams})}
single=handler.single;if(handler.before){action.before(handler.before,scope)}
if(handler.action){action.action(handler.action,scope)}
if(single){remover=Ext.bind(me.removeHandler,me,[null,handler]);if(single===!0){if(handler.action){action.action(remover,me)}else{action.before(function(){remover();return Ext.Promise.resolve()},me)}}else{action.before(single==='before',function(){remover();return Ext.Promise.resolve()},me)}}
if(!queue){if(Ext.fireEvent('beforeroute',action,me)===!1){action.destroy()}else{promises.push(action.run())}}}
if(queue){if(Ext.fireEvent('beforeroute',action,me)===!1){action.destroy();reject()}else{action.run().then(resolve,reject)}}else{Ext.Promise.all(promises).then(resolve,reject)}}})},matchesFor:function(url){var params={},keys=this.mode==='named'?Ext.Object.getKeys(this.paramsInMatchString):this.paramsInMatchString,values=url.match(this.matcherRegex),length=keys.length,i;values.shift();for(i=0;i<length;i++){params[keys[i].replace(':','')]=values[i]}
return params},createMatcherRegex:function(url){var me=this,paramsInMatchString=me.paramsInMatchString,conditions=me.getConditions(),defaultMatcher=me.defaultMatcher,length=paramsInMatchString.length,modifiers=me.getCaseInsensitive()?'i':'',i,param,matcher;if(url==='*'){url=url.replace('*','\\*')}else{for(i=0;i<length;i++){param=paramsInMatchString[i];if(conditions[param]){matcher=conditions[param]}else if(param[0]===':'&&conditions[param.substr(1)]){matcher=conditions[param.substr(1)]}else{matcher=defaultMatcher}
if(Ext.isObject(matcher)){matcher=matcher.re}
url=url.replace(new RegExp(param),matcher||defaultMatcher)}}
return new RegExp('^'+url+'$',modifiers)},addHandler:function(handler){var handlers=this.getHandlers();if(!handler.isInstance){handler=new Ext.route.Handler(handler)}
handlers.push(handler);return handler.route=this},removeHandler:function(scope,handler){var handlers=this.getHandlers(),length=handlers.length,newHandlers=[],i,item;for(i=0;i<length;i++){item=handlers[i];if(handler){if(item!==handler){newHandlers.push(item)}}else if(item.scope!==scope){newHandlers.push(item)}}
this.setHandlers(newHandlers);return this},clearLastTokens:function(){var handlers=this.getHandlers(),length=handlers.length,i;for(i=0;i<length;i++){handlers[i].lastToken=null}
this.lastToken=null},onExit:function(){var me=this,handlers=me.getHandlers(),allowInactive=me.getAllowInactive(),length=handlers.length,action=new Ext.route.Action({urlParams:[me.lastToken]}),i,handler,scope;me.clearLastTokens();for(i=0;i<length;i++){handler=handlers[i];if(handler.exit){scope=handler.scope;if(!allowInactive&&scope.isActive&&!scope.isActive()){continue}
action.action(handler.exit,scope)}}
if(Ext.fireEvent('beforerouteexit',action,me)===!1){action.destroy()}else{action.run()}}})
;
Ext.define('Ext.util.History',{singleton:!0,alternateClassName:'Ext.History',mixins:{observable:'Ext.util.Observable'},useTopWindow:!1,hashRe:/^(#?!?)/,constructor:function(){var me=this;me.ready=!1;me.currentToken=null;me.mixins.observable.constructor.call(me)},getHash:function(){return(this.win.location.hash||'').replace(this.hashRe,'')},setHash:function(hash,replace){var me=this,hashRe=me.hashRe,loc=me.win.location;hash=hash.replace(hashRe,me.hashbang?'#!':'#');try{if(replace){loc.replace(hash)}else{loc.hash=hash}
me.currentToken=hash.replace(hashRe,'')}catch(e){}},handleStateChange:function(token){token=token.replace(this.hashRe,'');this.fireEvent('change',this.currentToken=token)},startUp:function(){var me=this;me.currentToken=me.getHash();Ext.get(me.win).on('hashchange',me.onHashChange,me);me.ready=!0;me.fireEvent('ready',me)},onHashChange:function(){var me=this,newHash=me.getHash();if(newHash!==me.hash){me.hash=newHash;me.handleStateChange(newHash)}},init:function(onReady,scope){var me=this;if(me.ready){Ext.callback(onReady,scope,[me]);return}
if(!Ext.isReady){Ext.onInternalReady(function(){me.init(onReady,scope)});return}
me.win=me.useTopWindow?window.top:window;me.hash=me.getHash();if(onReady){me.on('ready',onReady,scope,{single:!0})}
me.startUp()},add:function(token,preventDuplicates){var me=this,set=!1;if(preventDuplicates===!1||me.getToken()!==token){me.setHash(token);set=!0}
return set},replace:function(token,preventDuplicates){var me=this,set=!1;if(preventDuplicates===!1||me.getToken()!==token){this.setHash(token,!0);set=!0}
return set},back:function(){this.win.history.go(-1)},forward:function(){this.win.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}})
;
Ext.define('Ext.route.Router',{singleton:!0,requires:['Ext.route.Action','Ext.route.Route','Ext.util.History'],config:{hashbang:null,multipleToken:'|',queueRoutes:!0},constructor:function(){var History=Ext.util.History;if(!History.ready){History.init()}
History.on('change',this.onStateChange,this);this.initConfig();this.clear()},updateHashbang:function(hashbang){Ext.util.History.hashbang=hashbang},onStateChange:function(token){var me=this,tokens=token.split(me.getMultipleToken()),queue,i,length;if(me.isSuspended){queue=me.suspendedQueue;i=0;length=tokens.length;if(queue){for(;i<length;i++){token=tokens[i];if(!Ext.Array.contains(queue,token)){queue.push(token)}}}}else{me.handleBefore(tokens)}},handleBefore:function(tokens){var me=this,action=new Ext.route.Action();if(Ext.fireEvent('beforeroutes',action,tokens)===!1){action.destroy()}else{action.run().then(me.handleBeforeRoute.bind(me,tokens),Ext.emptyFn)}},handleBeforeRoute:function(tokens){var me=this,beforeRoute=me.getByName('*');if(beforeRoute){beforeRoute.execute().then(me.doRun.bind(me,tokens),Ext.emptyFn)}else{me.doRun(tokens)}},doRun:function(tokens){var me=this,app=me.application,routes=me.routes,i=0,length=tokens.length,matched={},unmatched=[],token,found,name,route,recognize;for(;i<length;i++){token=tokens[i];found=!1;for(name in routes){route=routes[name];recognize=route.recognize(token);if(recognize){found=!0;if(recognize!==!0){route.execute(token,recognize).then(null,Ext.bind(me.onRouteRejection,me,[route],0))}
Ext.Array.remove(unmatched,route);if(!matched[name]){matched[name]=1}}else if(!matched[name]){unmatched.push(route)}}
if(!found){if(app){app.fireEvent('unmatchedroute',token)}
Ext.fireEvent('unmatchedroute',token)}}
i=0;length=unmatched.length;for(;i<length;i++){unmatched[i].onExit()}},onRouteRejection:function(route,error){Ext.fireEvent('routereject',route,error);if(error){Ext.raise(error)}},connect:function(url,config,instance){var routes=this.routes,delimiter=this.getMultipleToken(),name=config.name||url,handler,route;if(url[0]==='!'){if(!Ext.util.History.hashbang){Ext.log({level:'error',msg:'Route found with "!" ("'+url+'"). Should use new hashbang functionality instead. '+'Please see the router guide for more: https://docs.sencha.com/extjs/'+Ext.getVersion().version+'/guides/application_architecture/router.html'})}
url=url.substr(1);this.setHashbang(!0)}
if(Ext.isString(config)){config={action:config}}
handler=Ext.route.Handler.fromRouteConfig(config,instance);route=routes[name];if(!route){config.name=name;config.url=url;route=routes[name]=new Ext.route.Route(config)}
route.addHandler(handler);if(handler.lazy){var currentHash=Ext.util.History.getToken(),tokens=currentHash.split(delimiter),length=tokens.length,matched=[],i,token;for(i=0;i<length;i++){token=tokens[i];if(Ext.Array.indexOf(matched,token)===-1&&route.recognize(token)){matched.push(token)}}
this.onStateChange(matched.join(delimiter))}
return handler},disconnect:function(instance,config){var routes=this.routes,route,name;if(config){route=config.route||this.getByName(config.name||config.url);if(route){route.removeHandler(instance,config)}}else{for(name in routes){route=routes[name];route.removeHandler(instance)}}},recognize:function(url){var routes=this.routes,matches=[],name,arr,i,length,route,urlParams;for(name in routes){arr=routes[name];length=arr&&arr.length;if(length){i=0;for(;i<length;i++){route=arr[i];urlParams=route.recognize(url);if(urlParams){matches.push({route:route,urlParams:urlParams})}}}}
return matches.length?matches:!1},draw:function(fn){fn.call(this,this)},clear:function(){this.routes={}},clearLastTokens:function(token){var routes=this.routes,name,route;for(name in routes){route=routes[name];if(!token||route.recognize(token)){route.clearLastTokens()}}},getByName:function(name){var routes=this.routes;if(routes){return routes[name]}},suspend:function(trackTokens){this.isSuspended=!0;if(!this.suspendedQueue&&trackTokens!==!1){this.suspendedQueue=[]}},resume:function(discardQueue){var me=this,queue=me.suspendedQueue,token;if(me.isSuspended){me.isSuspended=!1;me.suspendedQueue=null;if(!discardQueue&&queue){token=queue.join(me.getMultipleToken());me.onStateChange(token)}}}})
;
Ext.define('Ext.route.Mixin',{extend:'Ext.Mixin',requires:['Ext.route.Handler','Ext.route.Router'],mixinConfig:{id:'routerable',before:{destroy:'destroyRouterable'}},config:{routes:null},destroyRouterable:function(){Ext.route.Router.disconnect(this)},applyRoutes:function(routes,oldRoutes){var Router=Ext.route.Router,url;if(routes){for(url in routes){routes[url]=Router.connect(url,routes[url],this)}}
if(oldRoutes){for(url in oldRoutes){Router.disconnect(this,oldRoutes[url])}}
return routes},redirectTo:function(hash,opt){var currentHash=Ext.util.History.getToken(),Router=Ext.route.Router,delimiter=Router.getMultipleToken(),tokens=currentHash?currentHash.split(delimiter):[],length=tokens.length,force,i,name,obj,route,token,match;if(hash===-1){return Ext.util.History.back()}else if(hash===1){return Ext.util.History.forward()}else if(hash.isModel){hash=hash.toUrl()}else if(Ext.isObject(hash)){for(name in hash){obj=hash[name];if(!Ext.isObject(obj)){obj={token:obj}}
if(length){route=Router.getByName(name);if(route){match=!1;for(i=0;i<length;i++){token=tokens[i];if(route.matcherRegex.test(token)){match=!0;if(obj.token){if(obj.fn&&obj.fn.call(this,token,tokens,obj)===!1){continue}
tokens[i]=obj.token;if(obj.force){route.lastToken=null}}else{tokens.splice(i,1);i--;length--;route.lastToken=null}}}
if(obj&&obj.token&&!match){tokens.push(obj.token)}}}else if(obj&&obj.token){tokens.push(obj.token)}}
hash=tokens.join(delimiter)}
if(opt===!0){force=opt;opt=null}else if(opt){force=opt.force}
length=tokens.length;if(force&&length){for(i=0;i<length;i++){token=tokens[i];Router.clearLastTokens(token)}}
if(currentHash===hash){if(force){Router.onStateChange(hash)}
return!1}
if(opt&&opt.replace){Ext.util.History.replace(hash)}else{Ext.util.History.add(hash)}
return!0},privates:{afterClassMixedIn:function(targetClass){var proto=targetClass.prototype,routes=proto.routes;if(routes){delete proto.routes;targetClass.getConfigurator().add({routes:routes})}}}})
;
Ext.define('Ext.app.BaseController',{requires:['Ext.app.EventBus','Ext.app.domain.Global'],uses:['Ext.app.domain.Controller'],mixins:['Ext.mixin.Observable','Ext.route.Mixin'],isController:!0,config:{id:undefined,control:null,listen:null},constructor:function(config){var me=this;Ext.apply(me,config);delete me.control;delete me.listen;me.eventbus=Ext.app.EventBus;me.mixins.observable.constructor.call(me,config)},updateId:function(id){this.id=id},applyListen:function(listen){if(Ext.isObject(listen)){listen=Ext.clone(listen)}
return listen},applyControl:function(control){if(Ext.isObject(control)){control=Ext.clone(control)}
return control},updateControl:function(control){this.getId();if(control){this.control(control)}},updateListen:function(listen){this.getId();if(listen){this.listen(listen)}},isActive:function(){return!0},control:function(selectors,listeners,controller){var me=this,ctrl=controller,obj;if(Ext.isString(selectors)){obj={};obj[selectors]=listeners}else{obj=selectors;ctrl=listeners}
me.eventbus.control(obj,ctrl||me)},listen:function(to,controller){this.eventbus.listen(to,controller||this)},destroy:function(){var me=this,bus=me.eventbus;if(bus){bus.unlisten(me);me.eventbus=null}
me.callParent()}})
;
Ext.define('Ext.app.Util',{},function(){Ext.apply(Ext.app,{namespaces:{Ext:{}},addNamespaces:function(namespace){var namespaces=Ext.app.namespaces,i,l;if(!Ext.isArray(namespace)){namespace=[namespace]}
for(i=0,l=namespace.length;i<l;i++){namespaces[namespace[i]]=!0}},clearNamespaces:function(){Ext.app.namespaces={}},getNamespace:function(className){var namespaces=Ext.apply({},Ext.ClassManager.paths,Ext.app.namespaces),deepestPrefix='',prefix;for(prefix in namespaces){if(namespaces.hasOwnProperty(prefix)&&prefix.length>deepestPrefix.length&&(prefix+'.'===className.substring(0,prefix.length+1))){deepestPrefix=prefix}}
return deepestPrefix===''?undefined:deepestPrefix},setupPaths:function(appName,appFolder,paths){var manifestPaths=Ext.manifest,ns;if(appName&&appFolder!==null){manifestPaths=manifestPaths&&manifestPaths.paths;if(!manifestPaths||appFolder!==undefined){Ext.Loader.setPath(appName,(appFolder===undefined)?'app':appFolder)}}
if(paths){for(ns in paths){if(paths.hasOwnProperty(ns)){Ext.Loader.setPath(ns,paths[ns])}}}}});Ext.getNamespace=Ext.app.getNamespace})
;
Ext.define('Ext.util.CollectionKey',{mixins:['Ext.mixin.Identifiable'],isCollectionKey:!0,observerPriority:-200,config:{collection:null,keyFn:null,property:null,rootProperty:null,unique:!0},generation:0,map:null,mapRebuilds:0,constructor:function(config){this.initConfig(config);if(!Ext.isFunction(this.getKey)){Ext.raise('CollectionKey requires a keyFn or property config')}},get:function(key){var map=this.map||this.getMap();return map[key]||null},clear:function(){this.map=null},getRootProperty:function(){var me=this,root=this.callParent();return root!==null?root:me.getCollection().getRootProperty()},indexOf:function(key,startAt){var map=this.map||this.getMap(),item=map[key],collection=this.getCollection(),length=collection.length,i,index,items,n;if(!item){return-1}
if(startAt===undefined){startAt=-1}
if(item instanceof Array){items=item;index=length;for(n=items.length;n-->0;){i=collection.indexOf(items[n]);if(i<index&&i>startAt){index=i}}
if(index===length){return-1}}else{index=collection.indexOf(item)}
return(index>startAt)?index:-1},updateKey:function(item,oldKey){var me=this,map=me.map,bucket,index;if(map){bucket=map[oldKey];if(bucket instanceof Array){index=Ext.Array.indexOf(bucket,item);if(index>=0){if(bucket.length>2){bucket.splice(index,1)}else{map[oldKey]=bucket[1-index]}}}else if(bucket){if(me.getUnique()&&bucket!==item){Ext.raise('Incorrect oldKey "'+oldKey+'" for item with newKey "'+me.getKey(item)+'"')}
delete map[oldKey]}
me.add([item])}},onCollectionAdd:function(collection,add){if(this.map){this.add(add.items)}},onCollectionItemChange:function(collection,details){this.map=null},onCollectionRefresh:function(){this.map=null},onCollectionRemove:function(collection,remove){var me=this,map=me.map,items=remove.items,length=items.length,i,key;if(map){if(me.getUnique()&&length<collection.length/2){for(i=0;i<length;++i){key=me.getKey(items[i]);delete map[key]}}else{me.map=null}}},add:function(items){var me=this,map=me.map,bucket,i,item,key,length,unique;length=items.length;unique=me.getUnique();for(i=0;i<length;++i){key=me.getKey(item=items[i]);if(unique||!(key in map)){map[key]=item}else{if(!((bucket=map[key])instanceof Array)){map[key]=bucket=[bucket]}
bucket.push(item)}}},applyKeyFn:function(keyFn){if(Ext.isString(keyFn)){this.getKey=function(item){return item[keyFn]()}}else{this.getKey=keyFn}},updateProperty:function(property){var root=this.getRootProperty();this.getKey=function(item){return(root?item[root]:item)[property]}},getMap:function(){var me=this,map=me.map;if(!map){me.map=map={};me.keysByItemKey={};++me.mapRebuilds;me.add(me.getCollection().items)}
return map},updateCollection:function(collection,oldCollection){if(collection){collection.addObserver(this)}
if(oldCollection){oldCollection.removeObserver(this)}},clone:function(){return new Ext.util.CollectionKey(this.getCurrentConfig())},destroy:function(){this.clear();this.getCollection().removeObserver(this);this.destroyed=!0}})
;
Ext.define('Ext.util.Grouper',{extend:'Ext.util.Sorter',isGrouper:!0,config:{groupFn:null,sortProperty:null},constructor:function(config){if(config){if(config.getGroupString){Ext.raise("Cannot set getGroupString - use groupFn instead")}}
this.callParent(arguments)},getGroupString:function(item){var group=item.$collapsedGroupPlaceholder?item.$groupKey:this._groupFn(item);return(group!=null)?String(group):''},sortFn:function(item1,item2){var me=this,lhs=me.getGroupString(item1),rhs=me.getGroupString(item2),property=me._sortProperty,root=me._root,sorterFn=me._sorterFn,transform=me._transform;if(lhs===rhs){return 0}
if(property||sorterFn){if(sorterFn){return sorterFn.call(this,item1,item2)}
if(root){item1=item1[root];item2=item2[root]}
lhs=item1[property];rhs=item2[property];if(transform){lhs=transform(lhs);rhs=transform(rhs)}}
return(lhs>rhs)?1:(lhs<rhs?-1:0)},standardGroupFn:function(item){var root=this._root;return(root?item[root]:item)[this._property]},updateSorterFn:function(){},updateProperty:function(){if(!this.getGroupFn()){this.setGroupFn(this.standardGroupFn)}}})
;
Ext.define('Ext.util.Collection',{mixins:['Ext.mixin.Observable'],requires:['Ext.util.CollectionKey','Ext.util.Filter','Ext.util.Sorter','Ext.util.Grouper'],uses:['Ext.util.SorterCollection','Ext.util.FilterCollection','Ext.util.GroupCollection'],isCollection:!0,config:{autoFilter:!0,autoSort:!0,autoGroup:!0,decoder:null,extraKeys:null,filters:null,grouper:null,groups:null,groupConfig:null,rootProperty:null,sorters:null,multiSortLimit:3,defaultSortDirection:'ASC',source:null,trackGroups:!0},generation:0,indices:null,indexRebuilds:0,updating:0,grouped:!1,sorted:!1,filtered:!1,$endUpdatePriority:1001,manageSorters:!0,constructor:function(config){var me=this;me.callParent([config]);me.items=[];me.map={};me.length=0;if(config&&config.keyFn){me.getKey=config.keyFn}
me.mixins.observable.constructor.call(me,config)},destroy:function(){var me=this,filters=me._filters,sorters=me._sorters,groups=me._groups;if(filters){filters.destroy();me._filters=null}
if(sorters){me.grouped=me.sorted=!1;me.setSorters(null);if(me.manageSorters){sorters.destroy()}}
if(groups){groups.destroy();me._groups=null}
me.setSource(null);me.observers=me.items=me.map=null;me.callParent()},add:function(item){var me=this,items=me.decodeItems(arguments,0),ret=items;if(items.length){me.splice(me.length,0,items);ret=(items.length===1)?items[0]:items}
return ret},replaceAll:function(){var me=this,ret,items;items=me.decodeItems(arguments,0);ret=items;if(items.length){me.splice(0,me.length,items);ret=(items.length===1)?items[0]:items}else{me.removeAll()}
return ret},aggregate:function(property,operation,begin,end,scope){var me=this,args=Ext.Array.slice(arguments);args.unshift(me.items);return me.aggregateItems.apply(me,args)},aggregateByGroup:function(property,operation,scope){var groups=this.getGroups();return this.aggregateGroups(groups,property,operation,scope)},aggregateItems:function(items,property,operation,begin,end,scope){var me=this,range=Ext.Number.clipIndices(items.length,[begin,end]),subsetRequested=(begin!==0&&end!==items.length),i,j,rangeLen,root,value,values,valueItems;begin=range[0];end=range[1];if(!Ext.isFunction(operation)){operation=me._aggregators[operation];return operation.call(me,items,begin,end,property,me.getRootProperty())}
root=me.getRootProperty();values=new Array(rangeLen);valueItems=subsetRequested?new Array(rangeLen):items;for(i=begin,j=0;i<end;++i,j++){if(subsetRequested){valueItems[j]=value=items[i]}
values[j]=(root?value[root]:value)[property]}
return operation.call(scope||me,items,values,0)},aggregateGroups:function(groups,property,operation,scope){var items=groups.items,len=items.length,callDirect=!Ext.isFunction(operation),out={},i,group,result;for(i=0;i<len;++i){group=items[i];if(!callDirect){result=this.aggregateItems(group.items,property,operation,null,null,scope)}else{result=group[operation](property)}
out[group.getGroupKey()]=result}
return out},beginUpdate:function(){if(!this.updating++){this.notify('beginupdate')}},clear:function(){var me=this,generation=me.generation,ret=generation?me.items:[],extraKeys,indexName;if(generation){me.items.length=me.length=0;me.map={};me.indices={};me.generation++;extraKeys=me.getExtraKeys();if(extraKeys){for(indexName in extraKeys){extraKeys[indexName].clear()}}}
return ret},clone:function(){var me=this,copy=new me.self(me.initialConfig);copy.add(me.items);return copy},collect:function(property,root,allowNull){var items=this.items,length=items.length,map={},ret=[],i,strValue,value;for(i=0;i<length;++i){value=items[i];value=(root?value[root]:value)[property];strValue=String(value);if((allowNull||!Ext.isEmpty(value))&&!map[strValue]){map[strValue]=1;ret.push(value)}}
return ret},contains:function(item){var ret=!1,key;if(item!=null){key=this.getKey(item);ret=this.map[key]===item}
return ret},containsAll:function(items){var all=Ext.isArray(items)?items:arguments,i;for(i=all.length;i-->0;){if(!this.contains(all[i])){return!1}}
return!0},containsKey:function(key){return key in this.map},createFiltered:function(property,value,anyMatch,caseSensitive,exactMatch){var me=this,ret=new me.self(Ext.applyIf({source:null},me.initialConfig)),root=me.getRootProperty(),items=me.items,length,i,filters,fn,scope;if(Ext.isFunction(property)){fn=property;scope=value}else{if(Ext.isString(property)){filters=[new Ext.util.Filter({property:property,value:value,root:root,anyMatch:anyMatch,caseSensitive:caseSensitive,exactMatch:exactMatch})]}else if(property instanceof Ext.util.Filter){filters=[property];property.setRoot(root)}else if(Ext.isArray(property)){filters=property.slice(0);for(i=0,length=filters.length;i<length;++i){filters[i].setRoot(root)}}
fn=Ext.util.Filter.createFilterFn(filters)}
scope=scope||me;for(i=0,length=items.length;i<length;i++){if(fn.call(scope,items[i])){ret.add(items[i])}}
return ret},filterBy:function(fn,scope){return this.createFiltered(fn,scope)},each:function(fn,scope){var items=this.items,len=items.length,i,ret;if(len){scope=scope||this;items=items.slice(0);for(i=0;i<len;i++){ret=fn.call(scope,items[i],i,len);if(ret===!1){break}}}
return ret},eachKey:function(fn,scope){var me=this,items=me.items,len=items.length,i,item,key,ret;if(len){scope=scope||me;items=items.slice(0);for(i=0;i<len;i++){key=me.getKey(item=items[i]);ret=fn.call(scope,key,item,i,len);if(ret===!1){break}}}
return ret},endUpdate:function(){if(!--this.updating){this.notify('endupdate')}},find:function(property,value,start,startsWith,endsWith,ignoreCase){var regex,root;if(Ext.isEmpty(value,!1)){return null}
regex=Ext.String.createRegex(value,startsWith,endsWith,ignoreCase);root=this.getRootProperty();return this.findBy(function(item){return item&&regex.test((root?item[root]:item)[property])},null,start)},findBy:function(fn,scope,start){var me=this,items=me.items,len=items.length,i,item,key;scope=scope||me;for(i=start||0;i<len;i++){key=me.getKey(item=items[i]);if(fn.call(scope,item,key)){return items[i]}}
return null},findIndex:function(property,value,start,startsWith,endsWith,ignoreCase){var item=this.find(property,value,start,startsWith,endsWith,ignoreCase);return item?this.indexOf(item):-1},findIndexBy:function(fn,scope,start){var item=this.findBy(fn,scope,start);return item?this.indexOf(item):-1},first:function(grouped){var groups=grouped?this.getGroups():undefined;return groups?this.aggregateGroups(groups,null,'first'):this.items[0]},last:function(grouped){var groups=grouped?this.getGroups():undefined;return groups?this.aggregateGroups(groups,null,'last'):this.items[this.length-1]},get:function(key){return this.map[key]},getAt:function(index){return this.items[index]},getByKey:function(key){return this.map[key]},getCount:function(){return this.length},getKey:function(item){var id=item.id;return(id===0||id)?id:((id=item._id)===0||id)?id:item.getId()},getRange:function(begin,end){var items=this.items,length=items.length,range;if(begin>end){Ext.raise('Inverted range passed to Collection.getRange: ['+begin+','+end+']')}
if(!length){range=[]}else{range=Ext.Number.clipIndices(length,[begin,end]);range=items.slice(range[0],range[1])}
return range},getValues:function(property,root,start,end){var items=this.items,range=Ext.Number.clipIndices(items.length,[start,end]),ret=[],i,value;for(i=range[0],end=range[1];i<end;++i){value=items[i];value=(root?value[root]:value)[property];ret.push(value)}
return ret},indexOf:function(item){var key;if(!item){return-1}
key=this.getKey(item);return this.indexOfKey(key)},indexOfKey:function(key){var me=this,indices=me.indices;if(key in me.map){if(!indices){indices=me.getIndices()}
return indices[key]}
return-1},insert:function(index,item){var me=this,items=me.decodeItems(arguments,1),ret=items;if(items.length){me.splice(index,0,items);ret=(items.length===1)?items[0]:items}
return ret},itemChanged:function(item,modified,oldKey,meta){var me=this,keyChanged=oldKey!==undefined,filtered=me.filtered&&me.getAutoFilter(),filterChanged=!1,itemMovement=0,items=me.items,last=me.length-1,sorted=me.sorted&&last>0&&me.getAutoSort(),source=me.getSource(),toRemove=0,itemFiltered=!1,wasFiltered=!1,details,newKey,sortFn,toAdd,index,newIndex;if(source&&!source.updating){me.sourceUpdating=!0;source.itemChanged(item,modified,oldKey,meta);me.sourceUpdating=!1}else{newKey=me.getKey(item);if(filtered){index=me.indexOfKey(keyChanged?oldKey:newKey);wasFiltered=(index<0);itemFiltered=me.isItemFiltered(item);filterChanged=(wasFiltered!==itemFiltered)}
if(filterChanged){if(itemFiltered){toRemove=[item];newIndex=-1}else{toAdd=[item];newIndex=me.length}}else if(sorted&&!itemFiltered){if(!filtered){index=me.indexOfKey(keyChanged?oldKey:newKey)}
sortFn=me.getSortFn();if(index!==-1){if(index&&sortFn(items[index-1],items[index])>0){itemMovement=-1;newIndex=Ext.Array.binarySearch(items,item,0,index,sortFn)}else if(index<last&&sortFn(items[index],items[index+1])>0){itemMovement=1;newIndex=Ext.Array.binarySearch(items,item,index+1,sortFn)}
if(itemMovement){toAdd=[item]}}}
details={item:item,key:newKey,index:newIndex,filterChanged:filterChanged,keyChanged:keyChanged,indexChanged:!!itemMovement,filtered:itemFiltered,oldIndex:index,newIndex:newIndex,wasFiltered:wasFiltered,meta:meta};if(keyChanged){details.oldKey=oldKey}
if(modified){details.modified=modified}
++me.generation;me.beginUpdate();me.notify('beforeitemchange',[details]);if(keyChanged){me.updateKey(item,oldKey,details)}
if(toAdd||toRemove){me.splice(newIndex,toRemove,toAdd)}
if(itemMovement>0){details.newIndex--}else if(itemMovement<0){details.oldIndex++}
me.notify(itemFiltered?'filtereditemchange':'itemchange',[details]);me.endUpdate()}},remove:function(item){var me=this,items=me.decodeRemoveItems(arguments,0),length=me.length;me.splice(0,items);return length-me.length},removeAll:function(){var me=this,length=me.length;if(me.generation&&length){me.splice(0,length)}
return me},removeAt:function(index,count){var me=this,length=me.length,Num=Ext.Number,range=Num.clipIndices(length,[index,(count===undefined)?1:count],Num.Clip.COUNT),n=range[0],removeCount=range[1]-n,item=(removeCount===1)&&me.getAt(n),removed;me.splice(n,removeCount);removed=me.length-length;return(item&&removed)?item:removed},removeByKey:function(key){var item=this.getByKey(key);if(!item||!this.remove(item)){return!1}
return item},replace:function(item){var index=this.indexOf(item);if(index===-1){this.add(item)}else{this.insert(index,item)}},splice:function(index,toRemove,toAdd){var me=this,autoSort=me.sorted&&me.getAutoSort(),map=me.map,items=me.items,length=me.length,removeItems=(toRemove instanceof Array)?me.decodeRemoveItems(toRemove):null,isRemoveCount=!removeItems,Num=Ext.Number,range=Num.clipIndices(length,[index,isRemoveCount?toRemove:0],Num.Clip.COUNT),begin=range[0],end=range[1],removeCount=end-begin,newItems=me.decodeItems(arguments,2),newCount=newItems?newItems.length:0,addItems,newItemsMap,removeMap,insertAt=begin,indices=me.indices||((newCount||removeItems)?me.getIndices():null),adds=null,removes=removeCount?[begin]:null,newKeys=null,source=me.getSource(),chunk,chunkItems,chunks,i,item,itemIndex,k,key,keys,n,duplicates,sorters;if(source&&!source.updating){if(isRemoveCount){removeItems=[];for(i=0;i<removeCount;++i){removeItems.push(items[begin+i])}}
if(begin<length){i=source.indexOf(items[begin])}else{i=source.length}
me.requestedIndex=index;source.splice(i,removeItems,newItems);delete me.requestedIndex;return me}
if(newCount){addItems=newItems;newKeys=[];newItemsMap={};if(autoSort){sorters=me.getSorters();if(newCount>1){if(!addItems.$cloned){newItems=addItems=addItems.slice(0)}
me.sortData(addItems)}}
for(i=0;i<newCount;++i){key=me.getKey(item=newItems[i]);if((k=newItemsMap[key])!==undefined){(duplicates||(duplicates={}))[k]=1}else{itemIndex=indices[key];if(itemIndex<begin||end<=itemIndex){(removes||(removes=[])).push(itemIndex)}}
newItemsMap[key]=i;newKeys.push(key)}
if(duplicates){keys=newKeys;addItems=[];newKeys=[];addItems.$cloned=!0;for(i=0;i<newCount;++i){if(!duplicates[i]){item=newItems[i];addItems.push(item);newKeys.push(keys[i])}}
newCount=addItems.length}
adds={items:addItems,keys:newKeys}}
for(i=removeItems?removeItems.length:0;i-->0;){key=me.getKey(removeItems[i]);if((itemIndex=indices[key])!==undefined){(removes||(removes=[])).push(itemIndex)}}
if(!adds&&!removes){return me}
me.beginUpdate();if(removes){chunk=null;chunks=[];removeMap={};if(removes.length>1){removes.sort(Ext.Array.numericSortFn)}
for(i=0,n=removes.length;i<n;++i){key=me.getKey(item=items[itemIndex=removes[i]]);if(!(key in map)){continue}
delete map[key];if(!chunk||itemIndex>(chunk.at+chunkItems.length)){chunks.push(chunk={at:itemIndex,items:(chunkItems=[]),keys:(keys=[]),map:removeMap,next:chunk,replacement:adds});if(adds){adds.replaced=chunk}}
chunkItems.push(removeMap[key]=item);keys.push(key);if(itemIndex<insertAt){--insertAt}
if(removeCount>1&&itemIndex===begin){--removeCount;removes[i--]=++begin}}
if(adds){adds.at=insertAt}
for(k=chunks.length;k-->0;){chunk=chunks[k];i=chunk.at;n=chunk.items.length;if(i+n<length){me.indices=indices=null}
me.length=length-=n;items.splice(i,n);if(indices){keys=chunk.keys;for(i=0;i<n;++i){delete indices[keys[i]]}}
++me.generation;me.notify('remove',[chunk])}}
if(adds){if(autoSort&&newCount>1&&length){me.spliceMerge(addItems,newKeys)}else{if(autoSort){if(newCount>1){insertAt=0;me.indices=indices=null}else{insertAt=sorters.findInsertionIndex(adds.items[0],items,me.getSortFn(),index)}}
if(insertAt===length){end=insertAt;for(i=addItems.length-1;i>=0;--i){items[end+i]=addItems[i]}
indices=me.indices;if(indices){for(i=0;i<newCount;++i){indices[newKeys[i]]=insertAt+i}}}else{me.indices=null;Ext.Array.insert(items,insertAt,addItems)}
for(i=0;i<newCount;++i){map[newKeys[i]]=addItems[i]}
me.length+=newCount;adds.at=insertAt;adds.atItem=insertAt===0?null:items[insertAt-1];++me.generation;me.notify('add',[adds])}}
me.endUpdate();return me},update:function(fn,scope){var me=this;me.beginUpdate();try{return fn.call(scope||me,me)}catch(e){Ext.log.error(this.$className+': Unhandled Exception: ',e.description||e.message);throw e}finally{me.endUpdate()}},updateKey:function(item,oldKey,details){var me=this,map=me.map,indices=me.indices,source=me.getSource(),newKey;if(source&&!source.updating){source.updateKey(item,oldKey)}else if((newKey=me.getKey(item))!==oldKey){if(map[oldKey]===item&&!(newKey in map)){delete map[oldKey];me.updating++;me.generation++;map[newKey]=item;if(indices){indices[newKey]=indices[oldKey];delete indices[oldKey]}
me.notify('updatekey',[Ext.apply({item:item,newKey:newKey,oldKey:oldKey},details)]);me.updating--}else{if(newKey in map&&map[newKey]!==item){Ext.raise('Duplicate newKey "'+newKey+'" for item with oldKey "'+oldKey+'"')}
if(oldKey in map&&map[oldKey]!==item){Ext.raise('Incorrect oldKey "'+oldKey+'" for item with newKey "'+newKey+'"')}}}},findInsertIndex:function(item,defaultIndex){var source=this.getSource(),sourceItems=source.items,i=source.indexOf(item)-1,sourceItem,index;while(i>-1){sourceItem=sourceItems[i];index=this.indexOf(sourceItem);if(index>-1){return index+1}
--i}
return defaultIndex},onCollectionAdd:function(source,details){var me=this,atItem=details.atItem,items=me.transformItems(details.items),requestedIndex=me.requestedIndex,filtered,index,copy,i,item,n;if(requestedIndex!==undefined){index=requestedIndex}else{item=atItem||source.items[1];index=item?me.indexOf(item):-1;if(index>-1){if(atItem){++index}}else if(!me.sorted){index=me.findInsertIndex(items[0],details.at?me.length:0)}}
if(me.getAutoFilter()&&me.filtered){for(i=0,n=items.length;i<n;++i){item=items[i];if(me.isItemFiltered(item)){if(!copy){copy=items.slice(0,i)}
if(!filtered){filtered=[]}
filtered.push(item)}else if(copy){copy.push(item)}}}
me.splice((index<0)?me.length:index,0,copy||items);if(filtered){me.notify('filteradd',[filtered])}},onCollectionBeforeItemChange:function(source,details){var me=this;me.onCollectionUpdateKey=null;if(!me.sourceUpdating){me.notify('beforeitemchange',[details])}},onCollectionBeginUpdate:function(){this.beginUpdate()},onCollectionEndUpdate:function(){this.endUpdate()},onCollectionItemChange:function(source,details){delete this.onCollectionUpdateKey;this.itemChanged(details.item,details.modified,details.oldKey,details.meta)},onCollectionFilteredItemChange:function(){delete this.onCollectionUpdateKey},onCollectionRefresh:function(source){var me=this,map={},indices={},items=me.items,sourceItems=me.transformItems(source.items),filterFn=me.getFilterFn(),i,item,key,length,newLength;if(me.filtered&&me.getAutoFilter()){for(i=0,newLength=0,length=sourceItems.length;i<length;i++){if(filterFn(sourceItems[i])){items[newLength++]=sourceItems[i]}}
items.length=newLength}else{items.length=0;items.push.apply(items,sourceItems)}
if(me.sorted){me.sortData(items)}
me.length=length=items.length;me.map=map;me.indices=indices;for(i=0;i<length;++i){key=me.getKey(item=items[i]);map[key]=item;indices[key]=i}
++me.generation;me.notify('refresh')},onCollectionRemove:function(source,details){this.splice(0,details.items)},onCollectionUpdateKey:function(source,details){this.updateKey(details.item,details.oldKey,details)},_aggregators:{average:function(items,begin,end,property,root){var n=end-begin;return n&&this._aggregators.sum.call(this,items,begin,end,property,root)/n},bounds:function(items,begin,end,property,root){var value,max,min,i;for(i=begin;i<end;++i){value=items[i];value=(root?value[root]:value)[property];if(!(value<max)){max=value}
if(!(value>min)){min=value}}
return[min,max]},count:function(items){return items.length},extremes:function(items,begin,end,property,root){var most=null,least=null,i,item,max,min,value;for(i=begin;i<end;++i){item=items[i];value=(root?item[root]:item)[property];if(!(value<max)){max=value;most=item}
if(!(value>min)){min=value;least=item}}
return[least,most]},max:function(items,begin,end,property,root){var b=this._aggregators.bounds.call(this,items,begin,end,property,root);return b[1]},maxItem:function(items,begin,end,property,root){var b=this._aggregators.extremes.call(this,items,begin,end,property,root);return b[1]},min:function(items,begin,end,property,root){var b=this._aggregators.bounds.call(this,items,begin,end,property,root);return b[0]},minItem:function(items,begin,end,property,root){var b=this._aggregators.extremes.call(this,items,begin,end,property,root);return b[0]},sum:function(items,begin,end,property,root){var value,sum,i;for(sum=0,i=begin;i<end;++i){value=items[i];value=(root?value[root]:value)[property];sum+=value}
return sum}},_eventToMethodMap:{add:'onCollectionAdd',beforeitemchange:'onCollectionBeforeItemChange',beginupdate:'onCollectionBeginUpdate',endupdate:'onCollectionEndUpdate',itemchange:'onCollectionItemChange',filtereditemchange:'onCollectionFilteredItemChange',refresh:'onCollectionRefresh',remove:'onCollectionRemove',beforesort:'beforeCollectionSort',sort:'onCollectionSort',filter:'onCollectionFilter',filteradd:'onCollectionFilterAdd',updatekey:'onCollectionUpdateKey'},addObserver:function(observer){var me=this,observers=me.observers;if(!observers){me.observers=observers=[]}
if(Ext.Array.contains(observers,observer)){Ext.Error.raise('Observer already added')}
if(me.notifying){me.observers=observers=observers.slice(0)}
observers.push(observer);if(observers.length>1){Ext.Array.sort(observers,me.prioritySortFn)}},prioritySortFn:function(o1,o2){var a=o1.observerPriority||0,b=o2.observerPriority||0;return a-b},applyExtraKeys:function(extraKeys,oldExtraKeys){var me=this,ret=oldExtraKeys||{},config,name,value;for(name in extraKeys){value=extraKeys[name];if(!value.isCollectionKey){config={collection:me};if(Ext.isString(value)){config.property=value}else{config=Ext.apply(config,value)}
value=new Ext.util.CollectionKey(config)}else{value.setCollection(me)}
ret[name]=me[name]=value;value.name=name}
return ret},applyGrouper:function(grouper){if(grouper){grouper=this.getSorters().decodeSorter(grouper,Ext.util.Grouper)}
return grouper},decodeItems:function(args,index){var me=this,ret=(index===undefined)?args:args[index],cloned,decoder,i;if(!ret||!ret.$cloned){cloned=args.length>index+1||!Ext.isIterable(ret);if(cloned){ret=Ext.Array.slice(args,index);if(ret.length===1&&ret[0]===undefined){ret.length=0}}
decoder=me.getDecoder();if(decoder){if(!cloned){ret=ret.slice(0);cloned=!0}
for(i=ret.length;i-->0;){if((ret[i]=decoder.call(me,ret[i]))===!1){ret.splice(i,1)}}}
if(cloned){ret.$cloned=!0}}
return ret},getIndices:function(){var me=this,indices=me.indices,items=me.items,n=items.length,i,key;if(!indices){me.indices=indices={};++me.indexRebuilds;for(i=0;i<n;++i){key=me.getKey(items[i]);indices[key]=i}}
return indices},notify:function(eventName,args){var me=this,observers=me.observers,methodName=me._eventToMethodMap[eventName],added=0,index,length,method,observer;args=args||[];if(observers&&methodName){me.notifying=!0;for(index=0,length=observers.length;index<length;++index){method=(observer=observers[index])[methodName];if(method){if(!added++){args.unshift(me)}
method.apply(observer,args)}}
me.notifying=!1}
if(!me.hasListeners){return}
if(me.hasListeners[eventName]){if(!added){args.unshift(me)}
me.fireEventArgs(eventName,args)}},getFilterFn:function(){return this.getFilters().getFilterFn()},getFilters:function(autoCreate){var ret=this._filters;if(!ret&&autoCreate!==!1){ret=new Ext.util.FilterCollection({id:this.getId()+'-filters'+(this.generation||'')});this.setFilters(ret)}
return ret},isItemFiltered:function(item){return!this.getFilters().filterFn(item)},onFilterChange:function(filters){var me=this,source=me.getSource(),extraKeys,newKeys,key;if(!source){extraKeys=me.getExtraKeys();if(extraKeys){newKeys={};for(key in extraKeys){newKeys[key]=extraKeys[key].clone(me)}}
source=new Ext.util.Collection({keyFn:me.getKey,extraKeys:newKeys,rootProperty:me.getRootProperty()});if(me.length){source.add(me.items)}
me.setSource(source);me.autoSource=source}else{if(source.destroyed){return}
if(source.length||me.length){me.onCollectionRefresh(source)}}
me.notify('filter')},applyFilters:function(filters,collection){if(!filters||filters.isFilterCollection){return filters}
if(filters){if(!collection){collection=this.getFilters()}
collection.splice(0,collection.length,filters)}
return collection},updateFilters:function(newFilters,oldFilters){var me=this;if(oldFilters){oldFilters.un('endupdate','onEndUpdateFilters',me)}
if(newFilters){newFilters.on({endupdate:'onEndUpdateFilters',scope:me,priority:me.$endUpdatePriority});newFilters.$filterable=me}
me.onEndUpdateFilters(newFilters)},onEndUpdateFilters:function(filters){var me=this,was=me.filtered,is=!!filters&&(filters.getFilterCount()>0);if(was||is){me.filtered=is;me.onFilterChange(filters)}},getSortFn:function(){return this._sortFn||this.createSortFn()},getSorters:function(autoCreate){var ret=this._sorters;if(!ret&&autoCreate!==!1){ret=new Ext.util.SorterCollection({id:this.getId()+'-sorters'+(this.generation||'')});this.setSorters(ret)}
return ret},onSortChange:function(){if(this.sorted){this.sortItems()}},sort:function(property,direction,mode){var sorters=this.getSorters();sorters.addSort.apply(sorters,arguments);return this},sortData:function(data){Ext.Array.sort(data,this.getSortFn());return data},sortItems:function(sortFn){var me=this;if(me.sorted){if(sortFn){Ext.raise('Collections with sorters cannot resorted')}
sortFn=me.getSortFn()}
me.indices=null;me.notify('beforesort',[me.getSorters(!1)]);if(me.length){Ext.Array.sort(me.items,sortFn)}
me.notify('sort')},sortBy:function(sortFn){return this.sortItems(sortFn)},findInsertionIndex:function(item,items,comparatorFn,index){return Ext.Array.findInsertionIndex(item,items||this.items,comparatorFn||this.getSortFn(),index)},applySorters:function(sorters,collection){if(!sorters||sorters.isSorterCollection){return sorters}
if(sorters){if(!collection){collection=this.getSorters()}
collection.splice(0,collection.length,sorters)}
return collection},createSortFn:function(){var me=this,grouper=me.getGrouper(),sorters=me.getSorters(!1),sorterFn=sorters?sorters.getSortFn():null;if(!grouper){return sorterFn}
return function(lhs,rhs){var ret=grouper.sort(lhs,rhs);if(!ret&&sorterFn){ret=sorterFn(lhs,rhs)}
return ret}},updateGrouper:function(grouper){var me=this,groups=me.getGroups(),sorters=me.getSorters(),populate;me.onSorterChange();me.grouped=!!grouper;if(grouper){if(me.getTrackGroups()){if(!groups){groups=new Ext.util.GroupCollection({id:me.getId()+'-groups'+(me.generation||''),itemRoot:me.getRootProperty(),groupConfig:me.getGroupConfig()});groups.$groupable=me;me.setGroups(groups)}
groups.setGrouper(grouper);populate=!0}}else{if(groups){me.removeObserver(groups);groups.destroy()}
me.setGroups(null)}
if(!sorters.updating){me.onEndUpdateSorters(sorters)}
if(populate){groups.onCollectionRefresh(me)}},updateSorters:function(newSorters,oldSorters){var me=this;if(oldSorters&&!oldSorters.destroyed){oldSorters.un('endupdate','onEndUpdateSorters',me)}
if(newSorters){newSorters.on({endupdate:'onEndUpdateSorters',scope:me,priority:me.$endUpdatePriority});if(me.manageSorters){newSorters.$sortable=me}}
me.onSorterChange();me.onEndUpdateSorters(newSorters)},onSorterChange:function(){this._sortFn=null},onEndUpdateSorters:function(sorters){var me=this,was=me.sorted,is=(me.grouped&&me.getAutoGroup())||(sorters&&sorters.length>0);if(was||is){me.sorted=!!is;me.onSortChange(sorters)}},removeObserver:function(observer){var observers=this.observers;if(observers){Ext.Array.remove(observers,observer)}},spliceMerge:function(newItems,newKeys){var me=this,map=me.map,newLength=newItems.length,oldIndex=0,oldItems=me.items,oldLength=oldItems.length,adds=[],count=0,items=[],sortFn=me.getSortFn(),addItems,end,i,newItem,oldItem,newIndex;me.items=items;for(newIndex=0;newIndex<newLength;newIndex=end){newItem=newItems[newIndex];for(;oldIndex<oldLength;++oldIndex){if(sortFn(newItem,oldItem=oldItems[oldIndex])<0){break}
items.push(oldItem)}
if(oldIndex===oldLength){adds[count++]={at:items.length,itemAt:items[items.length-1],items:(addItems=[])};if(count>1){adds[count-2].next=adds[count-1]}
for(;newIndex<newLength;++newIndex){addItems.push(newItem=newItems[newIndex]);items.push(newItem)}
break}
adds[count++]={at:items.length,itemAt:items[items.length-1],items:(addItems=[newItem])};if(count>1){adds[count-2].next=adds[count-1]}
items.push(newItem);for(end=newIndex+1;end<newLength;++end){if(sortFn(newItem=newItems[end],oldItem)>=0){break}
items.push(newItem);addItems.push(newItem)}}
for(;oldIndex<oldLength;++oldIndex){items.push(oldItems[oldIndex])}
for(i=0;i<newLength;++i){map[newKeys[i]]=newItems[i]}
me.length=items.length;++me.generation;me.indices=null;for(i=0;i<count;++i){me.notify('add',[adds[i]])}},transformItems:Ext.identityFn,getGroups:function(){return this.callParent()||null},updateAutoGroup:function(autoGroup){var groups=this.getGroups();if(groups){groups.setAutoGroup(autoGroup)}
this.onEndUpdateSorters(this._sorters)},updateGroups:function(newGroups,oldGroups){if(oldGroups){this.removeObserver(oldGroups)}
if(newGroups){this.addObserver(newGroups)}},updateSource:function(newSource,oldSource){var me=this,auto=me.autoSource;if(oldSource){if(!oldSource.destroyed){oldSource.removeObserver(me)}
if(oldSource===auto){auto.destroy();me.autoSource=null}}
if(newSource){newSource.addObserver(me);if(newSource.length||me.length){me.onCollectionRefresh(newSource)}}}},function(){var prototype=this.prototype;prototype.removeAtKey=prototype.removeByKey;prototype.decodeRemoveItems=prototype.decodeItems;Ext.Object.each(prototype._aggregators,function(name){prototype[name]=function(property,begin,end){return this.aggregate(property,name,begin,end)};prototype[name+'ByGroup']=function(property){return this.aggregateByGroup(property,name)}})})
;
Ext.define('Ext.data.Range',{requires:['Ext.util.DelayedTask'],isDataRange:!0,begin:0,buffer:0,end:0,length:0,store:null,constructor:function(config){var me=this,activeRanges,store;Ext.apply(me,config);store=me.store;if(!(activeRanges=store.activeRanges)){store.activeRanges=activeRanges=[]}
activeRanges.push(me);me.refresh();if('begin' in config){me.begin=me.end=0;me.goto(config.begin,config.end)}},destroy:function(){var me=this,store=me.store,activeRanges=store&&store.activeRanges;Ext.destroy(me.storeListeners);if(activeRanges){Ext.Array.remove(activeRanges,me)}
me.callParent()},goto:function(begin,end){var me=this,buffer=me.buffer,task=me.task;me.begin=begin;me.end=end;me.length=end-begin;if(buffer>0){if(!task){me.task=task=new Ext.util.DelayedTask(me.doGoto,me)}
task.delay(buffer)}else{me.doGoto()}},privates:{lastBegin:0,lastEnd:0,doGoto:Ext.privateFn,refresh:function(){this.records=this.store.getData().items}}})
;
Ext.define('Ext.util.ObjectTemplate',{requires:['Ext.XTemplate'],isObjectTemplate:!0,excludeProperties:{},valueRe:/^[{][a-z.]+[}]$/i,statics:{create:function(template,options){if(!Ext.isObject(template)){Ext.raise('The template is not an Object')}
return template.isObjectTemplate?template:new Ext.util.ObjectTemplate(template,options)}},constructor:function(template,options){Ext.apply(this,options);this.template=template},apply:function(context){var me=this;delete me.apply;me.apply=me.compile(me.template);return me.apply(context)},privates:{compile:function(template){var me=this,exclude=me.excludeProperties,compiled,i,len,fn;if(Ext.isString(template)){if(template.indexOf('{')<0){fn=function(){return template}}else if(me.valueRe.test(template)){template=template.substring(1,template.length-1).split('.');fn=function(context){var v,i;for(v=context,i=0;v&&i<template.length;++i){v=v[template[i]]}
return v}}else{template=new Ext.XTemplate(template);fn=function(context){return template.apply(context)}}}else if(!template||Ext.isPrimitive(template)||Ext.isFunction(template)){fn=function(){return template}}else if(template instanceof Array){compiled=[];for(i=0,len=template.length;i<len;++i){compiled[i]=me.compile(template[i])}
fn=function(context){var ret=[],i;for(i=0;i<len;++i){ret[i]=compiled[i](context)}
return ret}}else{compiled={};for(i in template){if(!exclude[i]){compiled[i]=me.compile(template[i])}}
fn=function(context){var ret={},i,v;for(i in template){v=exclude[i]?template[i]:compiled[i](context);if(v!==undefined){ret[i]=v}}
return ret}}
return fn}}})
;
Ext.define('Ext.data.schema.Role',{isRole:!0,left:!0,owner:!1,side:'left',isMany:!1,defaultReaderType:'json',_internalReadOptions:{recordsOnly:!0,asRoot:!0},constructor:function(association,config){var me=this,extra=config.extra;Ext.apply(me,config);if(extra){extra=Ext.apply({},extra);delete extra.type;Ext.apply(me,extra);delete me.extra}
me.association=association;if(association.owner===me.side){association.owner=me;me.owner=!0}},processUpdate:function(){Ext.raise('Only the "many" for an association may be processed. "'+this.role+'" is not valid.')},processLoad:function(store,associatedEntity,records,session){return records},checkMembership:Ext.emptyFn,adoptAssociated:function(record,session){var other=this.getAssociatedItem(record);if(other){session.adopt(other)}},$roleFilterId:'$associationRoleFilter',createAssociationStore:function(session,from,records,isComplete){var me=this,association=me.association,foreignKeyName=association.getFieldName(),isMany=association.isManyToMany,storeConfig=me.storeConfig,id=from.getId(),config={asynchronousLoad:!1,model:me.cls,role:me,session:session,associatedEntity:from,disableMetaChangeEvent:!0,pageSize:null,remoteFilter:!0,trackRemoved:!session},store;if(isMany){config.filters=[{id:me.$roleFilterId,property:me.inverse.field,value:id,exactMatch:!0}]}else if(foreignKeyName){config.filters=[{id:me.$roleFilterId,property:foreignKeyName,value:id,exactMatch:!0}];config.foreignKeyName=foreignKeyName}
if(storeConfig){Ext.apply(config,storeConfig)}
store=Ext.Factory.store(config);me.onStoreCreate(store,session,id);if(!isMany||session){store.on({scope:me,add:'onAddToMany',remove:'onRemoveFromMany',clear:'onRemoveFromMany'})}
if(records){store.loadData(records)}
store.complete=!!isComplete;return store},onStoreCreate:Ext.emptyFn,getAssociatedStore:function(inverseRecord,options,scope,records,allowInfer){var me=this,storeName=me.getStoreName(),store=inverseRecord[storeName],hadStore=store,session=inverseRecord.session,load=options&&options.reload,source=inverseRecord.$source,isComplete=!1,phantom=!1,hadSourceStore,args,i,len,raw,rec,sourceStore,hadRecords,isLoading;if(!store){if(session){if(source){phantom=source.phantom}
if(!records&&source){sourceStore=source[storeName];if(sourceStore&&!sourceStore.isLoading()){records=[];raw=sourceStore.getData().items;for(i=0,len=raw.length;i<len;++i){rec=raw[i];records.push(session.getRecord(rec.self,rec.id))}
isComplete=!!sourceStore.complete;hadSourceStore=!0}}
if(!hadSourceStore){hadRecords=!!records;records=me.findRecords(session,inverseRecord,records,allowInfer);if(!hadRecords&&(!records||!records.length)){records=null}
isComplete=phantom||hadRecords}}else{isComplete=!!records}
store=me.createAssociationStore(session,inverseRecord,records,isComplete||inverseRecord.phantom);store.$source=sourceStore;if(!records&&(me.autoLoad||options)){load=!0}
inverseRecord[storeName]=store}
if(options){if(load||store.isLoading()){store.on('load',function(store,records,success,operation){args=[store,operation];scope=scope||options.scope||inverseRecord;if(success){Ext.callback(options.success,scope,args)}else{Ext.callback(options.failure,scope,args)}
args.push(success);Ext.callback(options,scope,args);Ext.callback(options.callback,scope,args)},null,{single:!0})}else{args=[store,null];scope=scope||options.scope||inverseRecord;Ext.callback(options.success,scope,args);args.push(!0);Ext.callback(options,scope,args);Ext.callback(options.callback,scope,args)}}
isLoading=store.isLoading();if(load){if(!isLoading){store.load()}}else if(hadStore&&records&&!isLoading){store.loadData(records)}
return store},getAssociatedItem:function(rec){var key=this.isMany?this.getStoreName():this.getInstanceName();return rec[key]||null},onDrop:Ext.emptyFn,onIdChanged:Ext.emptyFn,getReaderRoot:function(){var me=this;return me.associationKey||(me.associationKey=me.association.schema.getNamer().readerRoot(me.role))},getReader:function(){var me=this,reader=me.reader,Model=me.cls,useSimpleAccessors=!me.associationKey,root=this.getReaderRoot();if(reader&&!reader.isReader){if(Ext.isString(reader)){reader={type:reader}}
Ext.applyIf(reader,{model:Model,rootProperty:root,useSimpleAccessors:useSimpleAccessors,type:me.defaultReaderType});reader=me.reader=Ext.createByAlias('reader.'+reader.type,reader)}
return reader},getInstanceName:function(){var me=this;return me.instanceName||(me.instanceName=me.association.schema.getNamer().instanceName(me.role))},getOldInstanceName:function(){return this.oldInstanceName||(this.oldInstanceName='$old'+this.getInstanceName())},getStoreName:function(){var me=this;return me.storeName||(me.storeName=me.association.schema.getNamer().storeName(me.role))},constructReader:function(fromReader){var me=this,reader=me.getReader(),Model=me.cls,useSimpleAccessors=!me.associationKey,root=me.getReaderRoot(),proxyReader,proxy;if(!reader){proxy=Model.getProxy();if(proxy){proxyReader=proxy.getReader();reader=new proxyReader.self();reader.copyFrom(proxyReader);reader.setRootProperty(root)}else{reader=new fromReader.self({model:Model,useSimpleAccessors:useSimpleAccessors,rootProperty:root})}
me.reader=reader}
return reader},read:function(record,data,fromReader,readOptions){var reader=this.constructReader(fromReader),root=reader.getRoot(data);if(root){return reader.readRecords(root,readOptions,this._internalReadOptions)}},getCallbackOptions:function(options,scope,defaultScope){if(typeof options==='function'){options={callback:options,scope:scope||defaultScope}}else if(options){options=Ext.apply({},options);options.scope=scope||options.scope||defaultScope}
return options},doGetFK:function(leftRecord,options,scope){var me=this,cls=me.cls,foreignKey=me.association.getFieldName(),instanceName=me.getInstanceName(),rightRecord=leftRecord[instanceName],reload=options&&options.reload,done=rightRecord!==undefined&&!reload,session=leftRecord.session,foreignKeyId,args;if(!done){if(session){foreignKeyId=leftRecord.get(foreignKey);if(foreignKeyId||foreignKeyId===0){done=session.peekRecord(cls,foreignKeyId,!0)&&!reload;rightRecord=session.getRecord(cls,foreignKeyId,!1)}else{done=!0;leftRecord[instanceName]=rightRecord=null}}else if(foreignKey){foreignKeyId=leftRecord.get(foreignKey);if(!foreignKeyId&&foreignKeyId!==0){done=!0;leftRecord[instanceName]=rightRecord=null}else{if(!rightRecord){rightRecord=cls.createWithId(foreignKeyId)}}}else{done=!0;rightRecord=null}}else if(rightRecord){done=!rightRecord.isLoading()}
if(done){if(options){args=[rightRecord,null];scope=scope||options.scope||leftRecord;Ext.callback(options.success,scope,args);args.push(!0);Ext.callback(options,scope,args);Ext.callback(options.callback,scope,args)}}else{leftRecord[instanceName]=rightRecord;options=me.getCallbackOptions(options,scope,leftRecord);rightRecord.load(options)}
return rightRecord},doSetFK:function(leftRecord,rightRecord,options,scope){var me=this,foreignKey=me.association.getFieldName(),instanceName=me.getInstanceName(),current=leftRecord[instanceName],inverse=me.inverse,inverseSetter=inverse.setterName,modified,oldInstanceName;if(rightRecord&&rightRecord.isEntity){if(current!==rightRecord){oldInstanceName=me.getOldInstanceName();leftRecord[oldInstanceName]=current;leftRecord[instanceName]=rightRecord;if(current&&current.isEntity){current[inverse.getInstanceName()]=undefined}
if(foreignKey){leftRecord.set(foreignKey,rightRecord.getId())}
delete leftRecord[oldInstanceName];leftRecord.onAssociatedRecordSet(rightRecord,me);if(inverseSetter){rightRecord[inverseSetter](leftRecord)}}}else{if(!foreignKey){Ext.raise('No foreignKey specified for "'+me.association.left.role+'" by '+leftRecord.$className)}
modified=(leftRecord.changingKey&&!inverse.isMany)||leftRecord.set(foreignKey,rightRecord);if(modified&&current&&current.isEntity&&!current.isEqual(current.getId(),rightRecord)){leftRecord[instanceName]=undefined;if(!inverse.isMany){current[inverse.getInstanceName()]=undefined}}}
if(options){if(Ext.isFunction(options)){options={callback:options,scope:scope||leftRecord}}
return leftRecord.save(options)}}})
;
Ext.define('Ext.data.schema.Association',{requires:['Ext.data.schema.Role'],isOneToOne:!1,isManyToOne:!1,isManyToMany:!1,owner:null,field:null,constructor:function(config){var me=this,left,right;Ext.apply(me,config);me.left=left=new me.Left(me,me.left);me.right=right=new me.Right(me,me.right);left.inverse=right;right.inverse=left},hasField:function(){return!!this.field},getFieldName:function(){var field=this.field;return field?field.name:''}})
;
Ext.define('Ext.data.schema.OneToOne',{extend:'Ext.data.schema.Association',isOneToOne:!0,isToOne:!0,kind:'one-to-one',Left:Ext.define(null,{extend:'Ext.data.schema.Role',onDrop:function(rightRecord,session){var leftRecord=this.getAssociatedItem(rightRecord);rightRecord[this.getInstanceName()]=null;if(leftRecord){leftRecord[this.inverse.getInstanceName()]=null}},onIdChanged:function(rightRecord,oldId,newId){var leftRecord=this.getAssociatedItem(rightRecord),fieldName=this.association.getFieldName();if(!rightRecord.session&&leftRecord&&fieldName){leftRecord.set(fieldName,newId)}},createGetter:function(){var me=this;return function(){return me.doGet(this)}},createSetter:function(){var me=this;return function(value){return me.doSet(this,value)}},doGet:function(rightRecord){var instanceName=this.getInstanceName(),ret=rightRecord[instanceName],session=rightRecord.session;if(!ret&&session){}
return ret||null},doSet:function(rightRecord,leftRecord){var instanceName=this.getInstanceName(),ret=rightRecord[instanceName],inverseSetter=this.inverse.setterName;if(ret!==leftRecord){rightRecord[instanceName]=leftRecord;if(inverseSetter){leftRecord[inverseSetter](rightRecord)}
rightRecord.onAssociatedRecordSet(leftRecord,this)}
return ret},read:function(rightRecord,node,fromReader,readOptions){var me=this,leftRecords=me.callParent([rightRecord,node,fromReader,readOptions]),leftRecord;if(leftRecords){leftRecord=leftRecords[0];if(leftRecord){leftRecord[me.inverse.getInstanceName()]=rightRecord;rightRecord[me.getInstanceName()]=leftRecord;delete rightRecord.data[me.role]}}}}),Right:Ext.define(null,{extend:'Ext.data.schema.Role',left:!1,side:'right',createGetter:function(){var me=this;return function(options,scope){return me.doGetFK(this,options,scope)}},createSetter:function(){var me=this;return function(value,options,scope){return me.doSetFK(this,value,options,scope)}},onDrop:function(leftRecord,session){var me=this,field=me.association.field,rightRecord=me.getAssociatedItem(leftRecord),id;if(me.inverse.owner){if(session&&field){id=leftRecord.get(field.name);if(id||id===0){rightRecord=session.getEntry(me.cls,id).record;if(rightRecord){rightRecord.drop()}}}else{if(rightRecord){rightRecord.drop()}}}
if(field){leftRecord.set(field.name,null)}
leftRecord[me.getInstanceName()]=null;if(rightRecord){rightRecord[me.inverse.getInstanceName()]=null}},onValueChange:function(leftRecord,session,newValue){var me=this,rightRecord=leftRecord[me.getOldInstanceName()]||me.getAssociatedItem(leftRecord),hasNewValue=newValue||newValue===0,instanceName=me.getInstanceName(),cls=me.cls;leftRecord.changingKey=!0;me.doSetFK(leftRecord,newValue);if(!hasNewValue){leftRecord[instanceName]=null}else if(session&&cls){leftRecord[instanceName]=session.peekRecord(cls,newValue)||undefined}
if(me.inverse.owner&&rightRecord){me.association.schema.queueKeyCheck(rightRecord,me)}
leftRecord.changingKey=!1},checkKeyForDrop:function(rightRecord){var leftRecord=this.inverse.getAssociatedItem(rightRecord);if(!leftRecord){rightRecord.drop()}},read:function(leftRecord,node,fromReader,readOptions){var me=this,rightRecords=me.callParent([leftRecord,node,fromReader,readOptions]),rightRecord,field,fieldName,session,refs,id,oldId,setKey,data;if(rightRecords){rightRecord=rightRecords[0];field=me.association.field;if(field){fieldName=field.name}
session=leftRecord.session;data=leftRecord.data;if(rightRecord){if(session){refs=session.getRefs(rightRecord,this.inverse,!0);setKey=(refs&&refs[leftRecord.id])||(data[fieldName]===undefined)}else{setKey=!0}
if(setKey){if(field){oldId=data[fieldName];id=rightRecord.id;if(oldId!==id){data[fieldName]=id;if(session){session.updateReference(leftRecord,field,id,oldId)}}}
rightRecord[me.inverse.getInstanceName()]=leftRecord;leftRecord[me.getInstanceName()]=rightRecord}
delete data[me.role]}}}})})
;
Ext.define('Ext.data.schema.ManyToOne',{extend:'Ext.data.schema.Association',isManyToOne:!0,isToOne:!0,kind:'many-to-one',Left:Ext.define(null,{extend:'Ext.data.schema.Role',isMany:!0,onDrop:function(rightRecord,session){var me=this,store=me.getAssociatedItem(rightRecord),leftRecords,len,i,id;if(store){leftRecords=store.removeAll();if(leftRecords&&me.inverse.owner){for(i=0,len=leftRecords.length;i<len;++i){leftRecords[i].drop()}}
store.destroy();rightRecord[me.getStoreName()]=null}else if(session){leftRecords=session.getRefs(rightRecord,me);if(leftRecords){for(id in leftRecords){leftRecords[id].drop()}}}},onIdChanged:function(rightRecord,oldId,newId){var fieldName=this.association.getFieldName(),store=this.getAssociatedItem(rightRecord),leftRecords,i,len,filter;if(store){filter=store.getFilters().get(this.$roleFilterId);if(filter){filter.setValue(newId)}
if(!rightRecord.session&&fieldName){leftRecords=store.getDataSource().items;for(i=0,len=leftRecords.length;i<len;++i){leftRecords[i].set(fieldName,newId)}}}},processUpdate:function(session,associationData){var me=this,entityType=me.inverse.cls,items=associationData.R,id,rightRecord,store,leftRecords;if(items){for(id in items){rightRecord=session.peekRecord(entityType,id);if(rightRecord){leftRecords=session.getEntityList(me.cls,items[id]);store=me.getAssociatedItem(rightRecord);if(store){store.loadData(leftRecords);store.complete=!0}else{rightRecord[me.getterName](null,null,leftRecords)}}else{session.onInvalidAssociationEntity(entityType,id)}}}},findRecords:function(session,rightRecord,leftRecords,allowInfer){var ret=leftRecords,refs=session.getRefs(rightRecord,this,!0),field=this.association.field,fieldName,leftRecord,id,i,len,seen;if(field&&(refs||allowInfer)){fieldName=field.name;ret=[];if(leftRecords){seen={};for(i=0,len=leftRecords.length;i<len;++i){leftRecord=leftRecords[i];id=leftRecord.id;if(refs&&refs[id]){ret.push(leftRecord)}else if(allowInfer&&leftRecord.data[fieldName]===undefined){ret.push(leftRecord);leftRecord.data[fieldName]=rightRecord.id;session.updateReference(leftRecord,field,rightRecord.id,undefined)}
seen[id]=!0}}
if(refs){for(id in refs){if(!seen||!seen[id]){ret.push(refs[id])}}}}
return ret},processLoad:function(store,rightRecord,leftRecords,session){var ret=leftRecords;if(session){ret=this.findRecords(session,rightRecord,leftRecords,!0)}
this.onLoadMany(rightRecord,ret,session);return ret},adoptAssociated:function(rightRecord,session){var store=this.getAssociatedItem(rightRecord),leftRecords,i,len;if(store){store.setSession(session);leftRecords=store.getData().items;for(i=0,len=leftRecords.length;i<len;++i){session.adopt(leftRecords[i])}}},createGetter:function(){var me=this;return function(options,scope,leftRecords){return me.getAssociatedStore(this,options,scope,leftRecords,!0)}},createSetter:null,onAddToMany:function(store,leftRecords){var rightRecord=store.getAssociatedEntity();if(this.association.field){this.syncFK(leftRecords,rightRecord,!1)}else{this.setInstances(rightRecord,leftRecords)}},onLoadMany:function(rightRecord,leftRecords,session){this.setInstances(rightRecord,leftRecords,session)},onRemoveFromMany:function(store,leftRecords){if(this.association.field){this.syncFK(leftRecords,store.getAssociatedEntity(),!0)}else{this.setInstances(null,leftRecords)}},read:function(rightRecord,node,fromReader,readOptions){var me=this,instanceName=me.inverse.getInstanceName(),leftRecords=me.callParent([rightRecord,node,fromReader,readOptions]),store,len,i;if(leftRecords){store=rightRecord[me.getterName](null,null,leftRecords);delete rightRecord.data[me.role];leftRecords=store.getData().items;for(i=0,len=leftRecords.length;i<len;++i){leftRecords[i][instanceName]=rightRecord}}},setInstances:function(rightRecord,leftRecords,session){var instanceName=this.inverse.getInstanceName(),id=rightRecord?rightRecord.getId():null,field=this.association.field,len=leftRecords.length,i,leftRecord,oldId,data,name;for(i=0;i<len;++i){leftRecord=leftRecords[i];leftRecord[instanceName]=rightRecord;if(field){name=field.name;data=leftRecord.data;oldId=data[name];if(oldId!==id){data[name]=id;if(session){session.updateReference(leftRecord,field,id,oldId)}}}}},syncFK:function(leftRecords,rightRecord,clearing){var foreignKeyName=this.association.getFieldName(),inverse=this.inverse,setter=inverse.setterName,instanceName=inverse.getInstanceName(),i=leftRecords.length,id=rightRecord.getId(),different,leftRecord,val;while(i-->0){leftRecord=leftRecords[i];different=!leftRecord.isEqual(id,leftRecord.get(foreignKeyName));val=clearing?null:rightRecord;if(different!==clearing){leftRecord.changingKey=!0;leftRecord[setter](val);leftRecord.changingKey=!1}else{leftRecord[instanceName]=val}}}}),Right:Ext.define(null,{extend:'Ext.data.schema.Role',left:!1,side:'right',onDrop:function(leftRecord,session){var field=this.association.field;if(field){leftRecord.set(field.name,null)}
leftRecord[this.getInstanceName()]=null},createGetter:function(){var me=this;return function(options,scope){return me.doGetFK(this,options,scope)}},createSetter:function(){var me=this;return function(rightRecord,options,scope){return me.doSetFK(this,rightRecord,options,scope)}},checkMembership:function(session,leftRecord){var field=this.association.field,store;if(field){store=this.getSessionStore(session,leftRecord.get(field.name));if(store&&!store.contains(leftRecord)){store.add(leftRecord)}}},onValueChange:function(leftRecord,session,newValue,oldValue){var me=this,instanceName=me.getInstanceName(),cls=me.cls,hasNewValue,joined,store,i,associated,rightRecord;if(!leftRecord.changingKey){hasNewValue=newValue||newValue===0;if(!hasNewValue){leftRecord[instanceName]=null}
if(session){store=me.getSessionStore(session,oldValue);if(store){store.remove(leftRecord)}
if(hasNewValue){store=me.getSessionStore(session,newValue);if(store&&!store.isLoading()){store.add(leftRecord)}
if(cls){rightRecord=session.peekRecord(cls,newValue)}
leftRecord[instanceName]=rightRecord||undefined}}else{joined=leftRecord.joined;if(joined){for(i=joined.length-1;i>=0;i--){store=joined[i];if(store.isStore){associated=store.getAssociatedEntity();if(associated&&associated.self===me.cls&&associated.getId()===oldValue){store.remove(leftRecord)}}}}}}
if(me.owner&&newValue===null){me.association.schema.queueKeyCheck(leftRecord,me)}},checkKeyForDrop:function(leftRecord){var field=this.association.field;if(leftRecord.get(field.name)===null){leftRecord.drop()}},getSessionStore:function(session,value){var cls=this.cls,rec;if(cls){rec=session.peekRecord(cls,value);if(rec){return this.inverse.getAssociatedItem(rec)}}},read:function(leftRecord,node,fromReader,readOptions){var rightRecords=this.callParent([leftRecord,node,fromReader,readOptions]),rightRecord;if(rightRecords){rightRecord=rightRecords[0];if(rightRecord){leftRecord[this.getInstanceName()]=rightRecord;delete leftRecord.data[this.role]}}}})})
;
Ext.define('Ext.data.schema.ManyToMany',{extend:'Ext.data.schema.Association',isManyToMany:!0,isToMany:!0,kind:'many-to-many',Left:Ext.define(null,{extend:'Ext.data.schema.Role',isMany:!0,digitRe:/^\d+$/,findRecords:function(session,rightRecord,leftRecords){var slice=session.getMatrixSlice(this.inverse,rightRecord.id),members=slice.members,ret=[],cls=this.cls,seen,i,len,id,member,leftRecord;if(leftRecords){seen={};for(i=0,len=leftRecords.length;i<len;++i){leftRecord=leftRecords[i];id=leftRecord.id;member=members[id];if(!(member&&member[2]===-1)){ret.push(leftRecord)}
seen[id]=!0}}
for(id in members){member=members[id];if(!seen||!seen[id]&&(member&&member[2]!==-1)){leftRecord=session.peekRecord(cls,id);if(leftRecord){ret.push(leftRecord)}}}
return ret},onIdChanged:function(rightRecord,oldId,newId){var store=this.getAssociatedItem(rightRecord);if(store){store.getFilters().get(this.$roleFilterId).setValue(newId)}},processLoad:function(store,rightRecord,leftRecords,session){var ret=leftRecords;if(session){ret=this.findRecords(session,rightRecord,leftRecords);this.onAddToMany(store,ret,!0)}
return ret},processUpdate:function(session,associationData){var me=this,entityType=me.inverse.cls,items=associationData.R,id,rightRecord,store,leftRecords;if(items){for(id in items){rightRecord=session.peekRecord(entityType,id);if(rightRecord){leftRecords=session.getEntityList(me.cls,items[id]);store=me.getAssociatedItem(rightRecord);if(store){store.loadData(leftRecords);store.complete=!0}else{rightRecord[me.getterName](null,null,leftRecords)}}else{session.onInvalidAssociationEntity(entityType,id)}}}
me.processMatrixBlock(session,associationData.C,1);me.processMatrixBlock(session,associationData.D,-1)},checkMembership:function(session,rightRecord){var matrix=session.getMatrix(this.association,!0),side,entityType,inverse,slice,slices,id,members,member,leftRecord,store;if(!matrix){return}
side=this.left?matrix.right:matrix.left;entityType=side.inverse.role.cls;inverse=this.inverse;slices=side.slices;if(slices){slice=slices[rightRecord.id];if(slice){members=slice.members;for(id in members){member=members[id];if(member[2]!==-1){leftRecord=session.peekRecord(entityType,id);if(leftRecord){store=inverse.getAssociatedItem(leftRecord);if(store){store.matrixUpdate=1;store.add(rightRecord);store.matrixUpdate=0}}}}}}},onStoreCreate:function(store,session,id){var me=this,matrix;if(session){matrix=session.getMatrixSlice(me.inverse,id);matrix.attach(store);matrix.notify=me.onMatrixUpdate;matrix.scope=me}},processMatrixBlock:function(session,leftKeys,state){var inverse=this.inverse,digitRe=this.digitRe,slice,id;if(leftKeys){for(id in leftKeys){if(digitRe.test(id)){id=parseInt(id,10)}
slice=session.getMatrixSlice(inverse,id);slice.update(leftKeys[id],state)}}},createGetter:function(){var me=this;return function(options,scope,leftRecords){return me.getAssociatedStore(this,options,scope,leftRecords,!1)}},onAddToMany:function(store,leftRecords,load){if(!store.matrixUpdate){store.matrixUpdate=1;store.matrix.update(leftRecords,load===!0?0:1);store.matrixUpdate=0}},onRemoveFromMany:function(store,records){if(!store.matrixUpdate){store.matrixUpdate=1;store.matrix.update(records,-1);store.matrixUpdate=0}},read:function(rightRecord,node,fromReader,readOptions){var me=this,leftRecords=me.callParent([rightRecord,node,fromReader,readOptions]);if(leftRecords){rightRecord[me.getterName](null,null,leftRecords);delete rightRecord.data[me.role]}},onMatrixUpdate:function(matrixSlice,id,state){var store=matrixSlice.store,index,leftRecord,entry;if(store&&!store.loading&&!store.matrixUpdate){store.matrixUpdate=1;index=store.indexOfId(id);if(state<0){if(index>=0){store.remove([index])}}else if(index<0){entry=store.getSession().getEntry(this.type,id);leftRecord=entry&&entry.record;if(leftRecord){store.add(leftRecord)}}
store.matrixUpdate=0}},adoptAssociated:function(record,session){var store=this.getAssociatedItem(record),records,i,len;if(store){store.setSession(session);this.onStoreCreate(store,session,record.getId());records=store.getData().items;for(i=0,len=records.length;i<len;++i){session.adopt(records[i])}}}},function(){var Left=this;Ext.ClassManager.onCreated(function(){Ext.data.schema.ManyToMany.prototype.Right=Ext.define(null,{extend:Left,left:!1,side:'right'})},null,'Ext.data.schema.ManyToMany')})})
;
Ext.define('Ext.util.Inflector',{singleton:!0,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^(p)erson$/i),"$1eople"],[(/^(m)an$/i),"$1en"],[(/(.*)(child)(ren)?$/i),"$1$2ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(address)$/i),"$1"],[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/(p)eople$/i),"$1erson"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(matcher,replacer){this.singulars.unshift([matcher,replacer])},plural:function(matcher,replacer){this.plurals.unshift([matcher,replacer])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(word){return Ext.Array.indexOf(this.uncountable,word)!==-1},pluralize:function(word){if(this.isTransnumeral(word)){return word}
var plurals=this.plurals,length=plurals.length,tuple,regex,i;for(i=0;i<length;i++){tuple=plurals[i];regex=tuple[0];if(regex==word||(regex.test&&regex.test(word))){return word.replace(regex,tuple[1])}}
return word},singularize:function(word){if(this.isTransnumeral(word)){return word}
var singulars=this.singulars,length=singulars.length,tuple,regex,i;for(i=0;i<length;i++){tuple=singulars[i];regex=tuple[0];if(regex==word||(regex.test&&regex.test(word))){return word.replace(regex,tuple[1])}}
return word},classify:function(word){return Ext.String.capitalize(this.singularize(word))},ordinalize:function(number){var parsed=parseInt(number,10),mod10=parsed%10,mod100=parsed%100;if(11<=mod100&&mod100<=13){return number+"th"}else{switch(mod10){case 1:return number+"st";case 2:return number+"nd";case 3:return number+"rd";default:return number+"th"}}}},function(){var singular,irregulars={alumnus:'alumni',cactus:'cacti',focus:'foci',nucleus:'nuclei',radius:'radii',stimulus:'stimuli',ellipsis:'ellipses',paralysis:'paralyses',oasis:'oases',appendix:'appendices',index:'indexes',beau:'beaux',bureau:'bureaux',tableau:'tableaux',woman:'women',child:'children',man:'men',corpus:'corpora',criterion:'criteria',curriculum:'curricula',genus:'genera',memorandum:'memoranda',phenomenon:'phenomena',foot:'feet',goose:'geese',tooth:'teeth',antenna:'antennae',formula:'formulae',nebula:'nebulae',vertebra:'vertebrae',vita:'vitae'};for(singular in irregulars){if(irregulars.hasOwnProperty(singular)){this.plural(singular,irregulars[singular]);this.singular(irregulars[singular],singular)}}})
;
Ext.define('Ext.data.schema.Namer',{mixins:['Ext.mixin.Factoryable'],requires:['Ext.util.Inflector'],alias:'namer.default',isNamer:!0,capitalize:function(name){return Ext.String.capitalize(name)},fieldRole:function(name){var match=name.match(this.endsWithIdRe,'');if(match){name=name.substr(0,name.length-(match[1]||match[2]).length)}
return this.apply('uncapitalize',name)},idField:function(name){return this.apply('uncapitalize,singularize',name)+'Id'},instanceName:function(roleName){return this.apply('underscore',roleName)},multiRole:function(name){return this.apply('undotted,uncapitalize,pluralize',name)},pluralize:function(name){return Ext.util.Inflector.pluralize(name)},readerRoot:function(roleName){return this.apply('uncapitalize',roleName)},singularize:function(name){return Ext.util.Inflector.singularize(name)},storeName:function(roleName){return this.apply('underscore',roleName)},uncapitalize:function(name){return Ext.String.uncapitalize(name)},underscore:function(name){return'_'+name},uniRole:function(name){return this.apply('undotted,uncapitalize,singularize',name)},undotted:function(name){var parts,index;if(name.indexOf('.')<0){return name}
parts=name.split('.');index=parts.length;while(index-->1){parts[index]=this.apply('capitalize',parts[index])}
return parts.join('')},getterName:function(role){var name=role.role;if(role&&role.isMany){return name}
return'get'+this.apply('capitalize',name)},inverseFieldRole:function(leftType,unique,rightRole,rightType){var me=this,leftRole=me.apply(unique?'uniRole':'multiRole',leftType),s1=me.apply('pluralize',rightRole),s2=me.apply('undotted,pluralize',rightType);if(s1.toLowerCase()!==s2.toLowerCase()){leftRole=rightRole+me.apply('capitalize',leftRole)}
return leftRole},manyToMany:function(relation,leftType,rightType){var me=this,ret=me.apply('undotted,capitalize,singularize',leftType)+me.apply('undotted,capitalize,pluralize',rightType);if(relation){ret=me.apply('capitalize',relation+ret)}
return ret},manyToOne:function(leftType,leftRole,rightType,rightRole){return this.apply('capitalize,singularize',rightType)+this.apply('capitalize',leftRole)},matrixRole:function(relation,entityType){var ret=this.apply(relation?'multiRole,capitalize':'multiRole',entityType);return relation?relation+ret:ret},oneToOne:function(leftType,leftRole,rightType,rightRole){return this.apply('undotted,capitalize,singularize',rightType)+this.apply('capitalize',leftRole)},setterName:function(role){return'set'+this.apply('capitalize',role.role)},endsWithIdRe:/(?:(_id)|[^A-Z](Id))$/,cache:{},apply:function(operation,name){var me=this,cache=me.cache,entry=cache[name]||(cache[name]={}),ret=entry[operation],i,length,operations;if(!ret){if(operation.indexOf(',')<0){ret=me[operation](name)}else{length=(operations=operation.split(',')).length;ret=name;for(i=0;i<length;++i){ret=me.apply(operations[i],ret)}}
entry[operation]=ret}
return ret}})
;
Ext.define('Ext.data.schema.Schema',{mixins:['Ext.mixin.Factoryable'],requires:['Ext.util.ObjectTemplate','Ext.data.schema.OneToOne','Ext.data.schema.ManyToOne','Ext.data.schema.ManyToMany','Ext.data.schema.Namer'],alias:'schema.default',aliasPrefix:'schema.',isSchema:!0,type:'default',statics:{instances:{},clearInstance:function(id){var schema=this.instances[id];delete this.instances[id];if(schema){schema.clear(!0);schema.destroy()}},get:function(config){var Schema=this,cache=Schema.instances,id='default',isString=config&&Ext.isString(config),instance,newConfig;if(config){if(config.isSchema){return config}
id=isString?config:(config.id||id)}
if(!(instance=cache[id])){cache[id]=instance=Schema.create(config);instance.id=id}else if(config&&!isString){if(id!=='default'){Ext.raise('Only the default Schema instance can be reconfigured')}
newConfig=Ext.merge({},instance.config);Ext.merge(newConfig,config);instance.setConfig(newConfig);instance.config=newConfig;instance.setConfig=function(){Ext.raise('The schema can only be reconfigured once')}}
return instance},lookupEntity:function(entity){var ret=null,instances=this.instances,match,name,schema;if(entity){if(entity.isEntity){ret=entity.self}else if(Ext.isFunction(entity)){ret=entity}else if(Ext.isString(entity)){ret=Ext.ClassManager.get(entity);if(ret&&(!ret.prototype||!ret.prototype.isEntity)){ret=null}
if(!ret){for(name in instances){schema=instances[name];match=schema.getEntity(entity);if(match){if(ret){Ext.raise('Ambiguous entity name "'+entity+'". Defined by schema "'+ret.schema.type+'" and "'+name+'"')}
ret=match}}}
if(!ret){Ext.raise('No such Entity "'+entity+'".')}}}
return ret}},assocCount:0,entityCount:0,config:{defaultIdentifier:null,keyCheckDelay:10,namer:'default',namespace:null,proxy:{type:'ajax',url:'{prefix}/{entityName}'},urlPrefix:''},onClassExtended:function(cls,data){var alias=data.alias;if(alias&&!data.type){if(!Ext.isString(alias)){alias=alias[0]}
cls.prototype.type=alias.substring(this.prototype.aliasPrefix.length)}},constructor:function(config){this.initConfig(config);this.clear()},applyDefaultIdentifier:function(identifier){return identifier&&Ext.Factory.dataIdentifier(identifier)},applyNamer:function(namer){var ret=Ext.data.schema.Namer.create(namer);ret.schema=this;return ret},applyNamespace:function(namespace){var end;if(namespace){end=namespace.length-1;if(namespace.charAt(end)!=='.'){namespace+='.'}}
return namespace},applyProxy:function(proxy){return Ext.util.ObjectTemplate.create(proxy)},eachAssociation:function(fn,scope){var associations=this.associations,name;for(name in associations){if(associations.hasOwnProperty(name)){if(fn.call(scope,name,associations[name])===!1){break}}}},eachEntity:function(fn,scope){var entities=this.entities,name;for(name in entities){if(entities.hasOwnProperty(name)){if(fn.call(scope,name,entities[name].cls)===!1){break}}}},getAssociation:function(name){var entry=this.associations[name];return entry||null},getEntity:function(name){var entry=this.entityClasses[name]||this.entities[name];return(entry&&entry.cls)||null},getEntityName:function(cls){var ns=this.getNamespace(),index,name;if(typeof cls==='string'){name=cls}else{name=cls.$className||null}
if(name){if(ns){index=ns.length;if(name.substring(0,index)!==ns){return name}}
if(index){name=name.substring(index)}}
return name},hasAssociations:function(name){name=name.entityName||name;return!!this.associationEntityMap[name]},hasEntity:function(entity){var name=this.getEntityName(entity);return!!(this.entities[name]||this.entityClasses[name])},addMatrix:function(entityType,matrixName,relation,left,right){var me=this,namer=me.getNamer(),associations=me.associations,entities=me.entities,leftType=left.type,rightType=right.type,leftField=left.field||namer.apply('idField',leftType),rightField=right.field||namer.apply('idField',rightType),leftRole=left.role||namer.matrixRole(relation,leftType),rightRole=right.role||namer.matrixRole(relation,rightType),matrix,leftEntry,rightEntry;leftEntry=entities[leftType]||(entities[leftType]={cls:null,name:leftType,associations:{}});rightEntry=entities[rightType]||(entities[rightType]={cls:null,name:rightType,associations:{}});++me.assocCount;associations[matrixName]=matrix=new Ext.data.schema.ManyToMany({name:matrixName,schema:me,definedBy:entityType,left:{cls:leftEntry.cls,type:leftType,role:leftRole,field:leftField,associationKey:left.associationKey},right:{cls:rightEntry.cls,type:rightType,role:rightRole,field:rightField,associationKey:right.associationKey}});leftEntry.associations[matrix.right.role]=matrix.right;rightEntry.associations[matrix.left.role]=matrix.left;if(leftEntry.cls){me.associationEntityMap[leftEntry.cls.entityName]=!0}
if(rightEntry.cls){me.associationEntityMap[rightEntry.cls.entityName]=!0}
me.decorateModel(matrix)},addReference:function(entityType,referenceField,descr,unique,dupeCheck){var me=this,namer=me.getNamer(),entities=me.entities,associations=me.associations,entityName=entityType.entityName,association=descr.association,child=descr.child,parent=descr.parent,rightRole=descr.role,rightType=descr.type||parent||child,leftVal=descr.inverse,left=Ext.isString(leftVal)?{role:leftVal}:leftVal,leftRole=left&&left.role,entry,T;if(!rightRole){if(!referenceField||descr.legacy){rightRole=namer.apply('uncapitalize',rightType)}else{rightRole=namer.apply('fieldRole',referenceField.name)}}
if(!leftRole){leftRole=namer.inverseFieldRole(entityName,unique,rightRole,rightType)}
if(!association){if(unique){association=namer.oneToOne(entityType,leftRole,rightType,rightRole)}else{association=namer.manyToOne(entityType,leftRole,rightType,rightRole)}}
if(dupeCheck&&association in associations){if(dupeCheck(associations[association],association,leftRole,rightRole)!==!1){return}}
if(association in associations){Ext.raise('Duplicate association: "'+association+'" declared by '+entityName+(referenceField?('.'+referenceField.name):'')+' (collides with '+associations[association].definedBy.entityName+')')}
if(referenceField&&referenceField.definedBy===entities[rightType]){Ext.raise('ForeignKey reference should not be owned by the target model')}
entry=entities[rightType]||(entities[rightType]={cls:null,name:rightType,associations:{}});T=unique?Ext.data.schema.OneToOne:Ext.data.schema.ManyToOne;association=new T({name:association,owner:child?'left':(parent?'right':null),definedBy:entityType,schema:me,field:referenceField,nullable:referenceField?!!referenceField.allowBlank:!0,left:{cls:entityType,type:entityName,role:leftRole,extra:left},right:{cls:entry.cls,type:rightType,role:rightRole,extra:descr},meta:descr});entityType.associations[rightRole]=association.right;entry.associations[leftRole]=association.left;if(referenceField){referenceField.reference=association.right;entityType.references.push(referenceField)}
++me.assocCount;me.associationEntityMap[entityName]=!0;if(entry.cls){me.associationEntityMap[entry.cls.entityName]=!0}
associations[association.name]=association;if(association.right.cls){me.decorateModel(association)}},privates:{addEntity:function(entityType){var me=this,entities=me.entities,entityName=entityType.entityName,entry=entities[entityName],fields=entityType.fields,associations,field,i,length,name;if(!entry){entities[entityName]=entry={name:entityName,associations:{}}}else if(entry.cls){Ext.raise('Duplicate entity name "'+entityName+'": '+entry.cls.$className+' and '+entityType.$className)}else{associations=entry.associations;for(name in associations){associations[name].inverse.cls=entityType;me.associationEntityMap[entityName]=!0;me.decorateModel(associations[name].association)}}
entry.cls=entityType;entityType.prototype.associations=entityType.associations=entry.associations;me.entityClasses[entityType.$className]=entry;++me.entityCount;for(i=0,length=fields.length;i<length;++i){field=fields[i];if(field.reference){me.addReferenceDescr(entityType,field)}}},addMatrices:function(entityType,matrices){var me=this,i,length,matrixName;if(Ext.isString(matrices)){me.addMatrixDescr(entityType,null,matrices)}else if(matrices[0]){for(i=0,length=matrices.length;i<length;++i){me.addMatrixDescr(entityType,null,matrices[i])}}else{for(matrixName in matrices){me.addMatrixDescr(entityType,matrixName,matrices[matrixName])}}},addMatrixDescr:function(entityType,matrixName,matrixDef){var me=this,entityName=entityType.entityName,associations=me.associations,namer=me.getNamer(),left=matrixDef.left,right=matrixDef.right,last,relation;if(Ext.isString(matrixDef)){if(matrixDef.charAt(0)==='#'){left={type:entityName};right={type:matrixDef.substring(1)}}else if(matrixDef.charAt(last=matrixDef.length-1)==='#'){left={type:matrixDef.substring(0,last)};right={type:entityName}}else if(namer.apply('multiRole',entityName)<namer.apply('multiRole',matrixDef)){left={type:entityName};right={type:matrixDef}}else{left={type:matrixDef};right={type:entityName}}}else{Ext.Assert.isString(matrixDef.type,'No "type" for manyToMany in '+entityName);relation=matrixDef.relation;if(left||(!right&&namer.apply('multiRole',entityName)<namer.apply('multiRole',matrixDef.type))){if(!left||left===!0){left={type:entityName}}else{left=Ext.apply({type:entityName},left)}
right=matrixDef}else{if(!right||right===!0){right={type:entityName}}else{right=Ext.apply({type:entityName},right)}
left=matrixDef}}
if(!matrixName){matrixName=namer.manyToMany(relation,left.type,right.type)}
if(!(matrixName in associations)){me.addMatrix(entityType,matrixName,relation,left,right)}else{var entry=associations[matrixName],before=[entry.kind,entry.left.type,entry.left.role,entry.left.field,entry.right.type,entry.right.role,entry.right.field].join('|'),after;delete associations[matrixName];me.addMatrix(entityType,matrixName,relation,left,right);after=associations[matrixName];associations[matrixName]=entry;entry.left.cls.associations[entry.right.role]=entry.right;entry.right.cls.associations[entry.left.role]=entry.left;--me.assocCount;after=[after.kind,after.left.type,after.left.role,after.left.field,after.right.type,after.right.role,after.right.field].join('|');if(before!=after){Ext.log.warn(matrixName+'('+entry.definedBy.entityName+'): '+before);Ext.log.warn(matrixName+'('+entityName+'): '+after);Ext.raise('Conflicting association: "'+matrixName+'" declared by '+entityName+' was previously declared by '+entry.definedBy.entityName)}}},addReferenceDescr:function(entityType,referenceField){var me=this,descr=referenceField.$reference;if(Ext.isString(descr)){descr={type:descr}}else{descr=Ext.apply({},descr)}
me.addReference(entityType,referenceField,descr,referenceField.unique)},addBelongsTo:function(entityType,assoc){this.addKeylessSingle(entityType,assoc,!1)},addHasOne:function(entityType,assoc){this.addKeylessSingle(entityType,assoc,!0)},addKeylessSingle:function(entityType,assoc,unique){var foreignKey,referenceField;assoc=Ext.apply({},this.checkLegacyAssociation(entityType,assoc));assoc.type=this.getEntityName(assoc.child||assoc.parent||assoc.type);foreignKey=assoc.foreignKey||(assoc.type.toLowerCase()+'_id');referenceField=entityType.getField(foreignKey);assoc.fromSingle=!0;if(referenceField){referenceField.$reference=assoc;referenceField.unique=!0;assoc.legacy=!0;Ext.log.warn('Using foreignKey is deprecated, use a keyed association. '+'See Ext.data.field.Field.reference')}
this.addReference(entityType,referenceField,assoc,unique)},addHasMany:function(entityType,assoc){var me=this,entities=me.entities,pending=me.pending,cls,name,referenceField,target,foreignKey,inverseOptions,child,declaredInverse;assoc=Ext.apply({},this.checkLegacyAssociation(entityType,assoc));assoc.type=this.getEntityName(assoc.child||assoc.parent||assoc.type);name=assoc.type;target=entities[name];cls=target&&target.cls;if(cls){name=entityType.entityName;foreignKey=assoc.foreignKey||(name.toLowerCase()+'_id');delete assoc.foreignKey;declaredInverse=Ext.apply({},assoc.inverse);delete assoc.inverse;inverseOptions=Ext.apply({},assoc);delete inverseOptions.type;assoc=Ext.apply({type:name,inverse:inverseOptions},declaredInverse);child=inverseOptions.child;if(child){delete inverseOptions.child;assoc.parent=name}
referenceField=cls.getField(foreignKey);if(referenceField){referenceField.$reference=assoc;assoc.legacy=!0;Ext.log.warn('Using foreignKey is deprecated, use a keyed association. '+'See Ext.data.field.Field.reference')}
me.addReference(cls,referenceField,assoc,!1,function(association,name,leftRole,rightRole){var result=!!association.meta.fromSingle&&cls===association.left.cls,l,r;if(result){l=cls.entityName;r=entityType.entityName;Ext.raise('hasMany ("'+r+'") and belongsTo ("'+l+'") should not be used in conjunction to declare '+'a relationship. Use only one.')}
return result})}else{if(!pending[name]){pending[name]=[]}
pending[name].push([entityType,assoc])}},checkLegacyAssociation:function(entityType,assoc){var name;if(Ext.isString(assoc)){assoc={type:assoc}}else{assoc=Ext.apply({},assoc)}
if(assoc.model){assoc.type=assoc.model;delete assoc.model}
name=assoc.associatedName||assoc.name;if(name){delete assoc.associatedName;delete assoc.name;assoc.role=name}
return assoc},afterKeylessAssociations:function(cls){var pending=this.pending,name=cls.entityName,mine=pending[name],i,len;if(mine){for(i=0,len=mine.length;i<len;++i){this.addHasMany.apply(this,mine[i])}
delete pending[name]}},clear:function(clearNamespace){var me=this,timer=me.timer;delete me.setConfig;if(timer){window.clearTimeout(timer);me.timer=null}
me.associations={};me.associationEntityMap={};me.entities={};me.entityClasses={};me.pending={};me.assocCount=me.entityCount=0;if(clearNamespace){me.setNamespace(null)}},constructProxy:function(Model){var me=this,data=Ext.Object.chain(Model),proxy=me.getProxy();data.schema=me;data.prefix=me.getUrlPrefix();return proxy.apply(data)},applyDecoration:function(role){var me=this,cls=role.inverse.cls,namer=me.getNamer(),getterName,setterName,proto;if(cls&&!role.decorated){role.decorated=!0;proto=cls.prototype;if(!(getterName=role.getterName)){role.getterName=getterName=namer.getterName(role)}
proto[getterName]=role.createGetter();if(role.createSetter){if(!(setterName=role.setterName)){role.setterName=setterName=namer.setterName(role)}
proto[setterName]=role.createSetter()}}},decorateModel:function(association){this.applyDecoration(association.left);this.applyDecoration(association.right)},processKeyChecks:function(processAll){var me=this,keyCheckQueue=me.keyCheckQueue,timer=me.timer,len,i,item;if(timer){window.clearTimeout(timer);me.timer=null}
if(!keyCheckQueue){return}
do{keyCheckQueue=me.keyCheckQueue;me.keyCheckQueue=[];for(i=0,len=keyCheckQueue.length;i<len;++i){item=keyCheckQueue[i];item.role.checkKeyForDrop(item.record)}}while(processAll&&me.keyCheckQueue.length);},queueKeyCheck:function(record,role){var me=this,keyCheckQueue=me.keyCheckQueue,timer=me.timer;if(!keyCheckQueue){me.keyCheckQueue=keyCheckQueue=[]}
keyCheckQueue.push({record:record,role:role});if(!timer){me.timer=timer=Ext.defer(me.processKeyChecks,me.getKeyCheckDelay(),me)}},rankEntities:function(){var me=this,entities=me.entities,entityNames=Ext.Object.getKeys(entities),length=entityNames.length,entityType,i;me.nextRank=1;entityNames.sort();for(i=0;i<length;++i){entityType=entities[entityNames[i]].cls;if(!entityType.rank){me.rankEntity(entityType)}}
me.topoStack=null},rankEntity:function(entityType){var associations=entityType.associations,associatedType,role,roleName;var topoStack=this.topoStack||(this.topoStack=[]),entityName=entityType.entityName;topoStack.push(entityName);if(entityType.rank===0){Ext.raise(entityName+" has circular foreign-key references: "+topoStack.join(" --> "))}
entityType.rank=0;for(roleName in associations){role=associations[roleName];if(!role.left&&role.association.field){associatedType=role.cls;if(!associatedType.rank){this.rankEntity(associatedType)}}}
entityType.rank=this.nextRank++;topoStack.pop()}}})
;
Ext.define('Ext.data.AbstractStore',{mixins:['Ext.mixin.Observable','Ext.mixin.Factoryable'],requires:['Ext.util.Collection','Ext.data.Range','Ext.data.schema.Schema','Ext.util.Filter'],factoryConfig:{defaultType:'store',type:'store'},$configPrefixed:!1,$configStrict:!1,config:{filters:null,autoDestroy:undefined,storeId:null,statefulFilters:!1,sorters:null,remoteSort:{lazy:!0,$value:!1},remoteFilter:{lazy:!0,$value:!1},groupField:undefined,groupDir:'ASC',grouper:null,pageSize:25,autoSort:null,reloadOnClearSorters:!1},currentPage:1,loading:!1,isStore:!0,updating:0,constructor:function(config){var me=this,storeId;me.callParent([config]);me.isInitializing=!0;me.mixins.observable.constructor.call(me,config);me.isInitializing=!1;storeId=me.getStoreId();if(!storeId&&(config&&config.id)){me.setStoreId(storeId=config.id)}
if(storeId){Ext.data.StoreManager.register(me)}},createActiveRange:function(config){var range=Ext.apply({store:this},config);return new Ext.data.Range(range)},syncActiveRanges:function(){var activeRanges=this.activeRanges,len=activeRanges&&activeRanges.length,i;for(i=0;i<len;i++){activeRanges[i].refresh()}},getCount:function(){var data=this.getData();return data?data.getCount():0},rangeCached:function(start,end){return this.getData().getCount()>=Math.max(start,end)},find:function(property,value,startIndex,anyMatch,caseSensitive,exactMatch){var startsWith=!anyMatch,endsWith=!!(startsWith&&exactMatch);return this.getData().findIndex(property,value,startIndex,startsWith,endsWith,!caseSensitive)},findRecord:function(){var me=this,index=me.find.apply(me,arguments);return index!==-1?me.getAt(index):null},findExact:function(fieldName,value,startIndex){return this.getData().findIndexBy(function(rec){return rec.isEqual(rec.get(fieldName),value)},this,startIndex)},findBy:function(fn,scope,start){return this.getData().findIndexBy(fn,scope,start)},getAt:function(index){return this.getData().getAt(index)||null},getRange:function(start,end,options){var result=this.getData().getRange(start,Ext.isNumber(end)?end+1:end);if(options&&options.callback){options.callback.call(options.scope||this,result,start,end,options)}
return result},getFilters:function(autoCreate){var me=this,result=me.callParent();if(!result&&autoCreate!==!1){me.setFilters([]);result=me.callParent()}
return result},applyFilters:function(filters,filtersCollection){var me=this,created;if(!filtersCollection){filtersCollection=me.createFiltersCollection();created=!0}
filtersCollection.add(filters);if(created){me.onRemoteFilterSet(filtersCollection,me.getRemoteFilter())}
return filtersCollection},getSorters:function(autoCreate){var me=this,result=me.callParent();if(!result&&autoCreate!==!1){me.setSorters([]);result=me.callParent()}
return result},applySorters:function(sorters,sortersCollection){var me=this,created;if(!sortersCollection){sortersCollection=me.createSortersCollection();created=!0}
sortersCollection.add(sorters);if(created){me.onRemoteSortSet(sortersCollection,me.getRemoteSort())}
return sortersCollection},filter:function(filters,value,suppressEvent){if(Ext.isString(filters)){filters={property:filters,value:value}}
this.suppressNextFilter=!!suppressEvent;this.getFilters().add(filters);this.suppressNextFilter=!1},removeFilter:function(toRemove,suppressEvent){var me=this,filters=me.getFilters();me.suppressNextFilter=!!suppressEvent;if(toRemove instanceof Ext.util.Filter){filters.remove(toRemove)}else{filters.removeByKey(toRemove)}
me.suppressNextFilter=!1},updateAutoSort:function(autoSort){this.getData().setAutoSort(autoSort)},updateRemoteSort:function(remoteSort){this.onRemoteSortSet(this.getSorters(!1),remoteSort)},updateRemoteFilter:function(remoteFilter){this.onRemoteFilterSet(this.getFilters(!1),remoteFilter)},addFilter:function(filters,suppressEvent){this.suppressNextFilter=!!suppressEvent;this.getFilters().add(filters);this.suppressNextFilter=!1},filterBy:function(fn,scope){this.getFilters().add({filterFn:fn,scope:scope||this})},clearFilter:function(suppressEvent){var me=this,filters=me.getFilters(!1);if(!filters||filters.getCount()===0){return}
me.suppressNextFilter=!!suppressEvent;filters.removeAll();me.suppressNextFilter=!1},isFiltered:function(){return this.getFilters().getCount()>0},isSorted:function(){var sorters=this.getSorters(!1);return!!(sorters&&sorters.length>0)||this.isGrouped()},addFieldTransform:function(sorter){if(sorter.getTransform()){return}
var fieldName=sorter.getProperty(),Model=this.getModel(),field,sortType;if(Model){field=Model.getField(fieldName);sortType=field?field.getSortType():null}
if(sortType&&sortType!==Ext.identityFn){sorter.setTransform(sortType)}},beginUpdate:function(){if(!this.updating++&&this.hasListeners.beginupdate){this.fireEvent('beginupdate')}},endUpdate:function(){if(this.updating&&!--this.updating){if(this.hasListeners.endupdate){this.fireEvent('endupdate')}
this.onEndUpdate()}},getState:function(){var me=this,sorters=[],filters=me.getFilters(),grouper=me.getGrouper(),filterState,hasState,result;me.getSorters().each(function(s){sorters[sorters.length]=s.getState();hasState=!0});if(me.statefulFilters&&me.saveStatefulFilters){hasState=!0;filterState=[];filters.each(function(f){filterState[filterState.length]=f.getState()})}
if(grouper){hasState=!0}
if(hasState){result={};if(sorters.length){result.sorters=sorters}
if(filterState){result.filters=filterState}
if(grouper){result.grouper=grouper.getState()}}
return result},applyState:function(state){var me=this,stateSorters=state.sorters,stateFilters=state.filters,stateGrouper=state.grouper;if(stateSorters){me.getSorters().replaceAll(stateSorters)}
if(stateFilters){me.saveStatefulFilters=!0;me.getFilters().replaceAll(stateFilters)}
if(stateGrouper){me.setGrouper(stateGrouper)}},hasPendingLoad:Ext.emptyFn,isLoaded:Ext.emptyFn,isLoading:Ext.emptyFn,destroy:function(){var me=this;if(me.hasListeners.beforedestroy){me.fireEvent('beforedestroy',me)}
me.destroying=!0;if(me.getStoreId()){Ext.data.StoreManager.unregister(me)}
me.doDestroy();if(me.hasListeners.destroy){me.fireEvent('destroy',me)}
me.callParent()},doDestroy:Ext.emptyFn,sort:function(field,direction,mode){var me=this;if(arguments.length===0){if(me.getRemoteSort()){me.load()}else{me.forceLocalSort()}}else{me.getSorters().addSort(field,direction,mode)}},onBeforeCollectionSort:function(store,sorters){if(sorters){this.fireEvent('beforesort',this,sorters.getRange())}},onSorterEndUpdate:function(){var me=this,fireSort=!0,sorters=me.getSorters(!1),sorterCount;if(me.settingGroups||!sorters){return}
sorters=sorters.getRange();sorterCount=sorters.length;if(me.getRemoteSort()){if(sorters.length||me.getReloadOnClearSorters()){fireSort=!1;me.load({callback:function(){me.fireEvent('sort',me,sorters)}})}}else if(sorterCount){me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}
if(fireSort){me.fireEvent('sort',me,sorters)}},onFilterEndUpdate:function(){var me=this,suppressNext=me.suppressNextFilter,filters=me.getFilters(!1);if(!filters){return}
if(me.getRemoteFilter()){me.getFilters().each(function(filter){if(filter.getInitialConfig().filterFn){Ext.raise('Unable to use a filtering function in conjunction with '+'remote filtering.')}});me.currentPage=1;if(!suppressNext){me.load()}}else if(!suppressNext){me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}
if(me.trackStateChanges){me.saveStatefulFilters=!0}
me.fireEvent('filterchange',me,me.getFilters().getRange())},updateGroupField:function(field){if(field){this.setGrouper({property:field,direction:this.getGroupDir()})}else{this.setGrouper(null)}},getGrouper:function(){return this.getData().getGrouper()},group:function(grouper,direction){var me=this,sorters=me.getSorters(!1),change=grouper||(sorters&&sorters.length),data=me.getData();if(grouper&&typeof grouper==='string'){grouper={property:grouper,direction:direction||me.getGroupDir()}}
me.settingGroups=!0;if(grouper===data.getGrouper()){data.updateGrouper(grouper)}else{data.setGrouper(grouper)}
delete me.settingGroups;if(change){if(me.getRemoteSort()){if(!me.isInitializing){me.load({scope:me,callback:function(){me.fireGroupChange()}})}}else{me.fireEvent('datachanged',me);me.fireEvent('refresh',me);me.fireGroupChange()}}else{me.fireGroupChange()}},fireGroupChange:function(grouper){var me=this;if(!me.isConfiguring&&!me.destroying&&!me.destroyed){me.fireGroupChangeEvent(grouper||me.getGrouper())}},fireGroupChangeEvent:function(grouper){this.fireEvent('groupchange',this,grouper)},clearGrouping:function(){this.group(null)},getGroupField:function(){var grouper=this.getGrouper(),group='';if(grouper){group=grouper.getProperty()}
return group},isGrouped:function(){return!!this.getGrouper()},applyGrouper:function(grouper){this.group(grouper);return this.getData().getGrouper()},getGroups:function(){return this.getData().getGroups()},onEndUpdate:Ext.emptyFn,privates:{_metaProperties:{count:'getCount',first:'first',last:'last',loading:'hasPendingLoad',totalCount:'getTotalCount'},interpret:function(name){var me=this,accessor=me._metaProperties[name];return accessor&&me[accessor]()},loadsSynchronously:Ext.privateFn,onRemoteFilterSet:function(filters,remoteFilter){if(filters){filters[remoteFilter?'on':'un']('endupdate','onFilterEndUpdate',this)}},onRemoteSortSet:function(sorters,remoteSort){var me=this,data;if(sorters){sorters[remoteSort?'on':'un']('endupdate','onSorterEndUpdate',me);data=me.getData();if(data){data[remoteSort?'un':'on']('beforesort','onBeforeCollectionSort',me)}}}},deprecated:{5:{methods:{destroyStore:function(){this.destroy()}}}}})
;
Ext.define('Ext.data.Error',{isError:!0,$configPrefixed:!1,config:{field:null,message:''},constructor:function(config){this.initConfig(config);this.msg=this.message}})
;
Ext.define('Ext.data.ErrorCollection',{extend:'Ext.util.MixedCollection',alternateClassName:'Ext.data.Errors',requires:['Ext.data.Error'],init:function(record){var me=this,fields=record.fields,data=record.data,before,field,i,len,msg,val,name;for(i=0,len=fields.length;i<len;++i){field=fields[i];name=field.name;val=data[name];if(field.validate&&!field.validate.$nullFn){before=me.length;msg=field.validate(val,null,me,record);if(before===me.length&&msg!==!0){me.add(name,msg)}}}
return me},add:function(key,value){var me=this,defaultMessage=Ext.data.field.Field.defaultInvalidMessage,obj=key,current;if(Ext.isString(key)){obj=new Ext.data.Error({field:key,message:value||defaultMessage})}else{if(!(obj.isError)){obj=new Ext.data.Error({field:obj.field||obj.name,message:obj.error||obj.message||obj.msg||defaultMessage})}
key=obj.field}
current=me.get(key);if(current){if(Ext.isArray(current)){current.push(obj);return current}
me.removeAtKey(key);obj=[current,obj];obj.field=key;obj=[obj]}
return me.callParent([obj])},getKey:function(item){return item.field},isValid:function(){return this.length===0},getByField:function(fieldName){var values=this.get(fieldName);if(values&&!Ext.isArray(values)){values=[values]}
return values||[]}})
;
Ext.define('Ext.data.operation.Operation',{alternateClassName:'Ext.data.Operation',isOperation:!0,config:{synchronous:!1,url:'',params:undefined,callback:undefined,scope:undefined,resultSet:null,response:null,request:null,records:null,id:undefined,proxy:null,batch:null,recordCreator:null,internalCallback:null,internalScope:null},order:0,foreignKeyDirection:1,started:!1,running:!1,complete:!1,success:undefined,exception:!1,error:undefined,idPrefix:'ext-operation-',constructor:function(config){var scope=config&&config.scope;this.initConfig(config);if(config){config.scope=scope}
if(scope){this.setScope(scope);this.initialConfig.scope=scope}
this._internalId=Ext.id(this,this.idPrefix)},getAction:function(){return this.action},execute:function(){var me=this,request;delete me.error;delete me.success;me.complete=me.exception=!1;me.setStarted();me.request=request=me.doExecute();if(request){request.setOperation(me)}
return request},doExecute:Ext.emptyFn,abort:function(){var me=this,request=me.request,proxy;me.aborted=!0;if(me.running&&request){proxy=me.getProxy();if(proxy&&!proxy.destroyed){proxy.abort(request)}
me.request=null}
me.running=!1},process:function(resultSet,request,response,autoComplete){var me=this;autoComplete=autoComplete!==!1;me.setResponse(response);me.setResultSet(resultSet);if(resultSet.getSuccess()){me.doProcess(resultSet,request,response);me.setSuccessful(autoComplete)}else if(autoComplete){me.setException(resultSet.getMessage())}},_commitSetOptions:{convert:!0,commit:!0},doProcess:function(resultSet,request,response){var me=this,commitSetOptions=me._commitSetOptions,clientRecords=me.getRecords(),clientLen=clientRecords.length,clientIdProperty=clientRecords[0].clientIdProperty,serverRecords=resultSet.getRecords(),serverLen=serverRecords?serverRecords.length:0,clientMap,serverRecord,clientRecord,i;if(serverLen&&clientIdProperty){clientMap=Ext.Array.toValueMap(clientRecords,'id');for(i=0;i<serverLen;++i){serverRecord=serverRecords[i];clientRecord=clientMap[serverRecord[clientIdProperty]];if(clientRecord){delete clientMap[clientRecord.id];delete serverRecord[clientIdProperty];clientRecord.set(serverRecord,commitSetOptions)}else{Ext.log.warn('Ignoring server record: '+Ext.encode(serverRecord))}}
for(i in clientMap){clientMap[i].commit()}}else{for(i=0;i<clientLen;++i){clientRecord=clientRecords[i];if(serverLen===0||!(serverRecord=serverRecords[i])){clientRecord.commit()}else{clientRecord.set(serverRecord,commitSetOptions)}}}},setStarted:function(){this.started=this.running=!0},setCompleted:function(){var me=this,proxy;me.complete=!0;me.running=!1;if(!me.destroying){me.triggerCallbacks()}
if(me.destroyed){return}
proxy=me.getProxy();if(proxy&&!proxy.destroyed){proxy.completeOperation(me)}},setSuccessful:function(complete){this.success=!0;if(complete){this.setCompleted()}},setException:function(error){var me=this;me.exception=!0;me.success=me.running=!1;me.error=error;me.setCompleted()},triggerCallbacks:function(){var me=this,callback=me.getInternalCallback();if(callback){callback.call(me.getInternalScope()||me,me);if(me.destroyed){return}
me.setInternalCallback(null);me.setInternalScope(null)}
callback=me.getCallback();if(callback){callback.call(me.getScope()||me,me.getRecords(),me,me.wasSuccessful());if(me.destroyed){return}
me.setCallback(null);me.setScope(null)}},hasException:function(){return this.exception},getError:function(){return this.error},getRecords:function(){var resultSet;return this._records||((resultSet=this.getResultSet())?resultSet.getRecords():null)},isStarted:function(){return this.started},isRunning:function(){return this.running},isComplete:function(){return this.complete},wasSuccessful:function(){return this.isComplete()&&this.success===!0},allowWrite:function(){return!0},destroy:function(){var me=this;me.destroying=!0;if(me.running){me.abort()}
me._params=me._callback=me._scope=me._resultSet=me._response=null;me.request=me._request=me._records=me._proxy=me._batch=null;me._recordCreator=me._internalCallback=me._internalScope=null;me.callParent()}})
;
Ext.define('Ext.data.operation.Create',{extend:'Ext.data.operation.Operation',alias:'data.operation.create',action:'create',isCreateOperation:!0,order:10,config:{recordCreator:Ext.identityFn},doExecute:function(){return this.getProxy().create(this)}})
;
Ext.define('Ext.data.operation.Destroy',{extend:'Ext.data.operation.Operation',alias:'data.operation.destroy',action:'destroy',isDestroyOperation:!0,order:30,foreignKeyDirection:-1,doProcess:function(){var clientRecords=this.getRecords(),clientLen=clientRecords.length,i;for(i=0;i<clientLen;++i){clientRecords[i].setErased()}},doExecute:function(){return this.getProxy().erase(this)},getRecordData:function(record,operation){var data={},idField=record.idField,nameProperty=this.getNameProperty()||'name';data[idField[nameProperty]]=record.id;return data}})
;
Ext.define('Ext.data.operation.Read',{extend:'Ext.data.operation.Operation',alias:'data.operation.read',action:'read',isReadOperation:!0,config:{filters:undefined,sorters:undefined,grouper:undefined,start:undefined,limit:undefined,page:undefined,addRecords:!1},doExecute:function(){return this.getProxy().read(this)},doProcess:Ext.emptyFn,allowWrite:function(){return!1}})
;
Ext.define('Ext.data.operation.Update',{extend:'Ext.data.operation.Operation',alias:'data.operation.update',action:'update',isUpdateOperation:!0,order:20,config:{recordCreator:Ext.identityFn},doExecute:function(){return this.getProxy().update(this)}})
;
Ext.define('Ext.data.SortTypes',function(){var me;return{singleton:!0,constructor:function(){me=this},none:Ext.identityFn,stripCommasRe:/,/g,stripTagsRE:/<\/?[^>]+>/gi,asText:function(s){return(s!=null)?String(s).replace(me.stripTagsRE,''):'\u0000'},asUCText:function(s){return(s!=null)?String(s).toUpperCase().replace(me.stripTagsRE,''):'\u0000'},asUCString:function(s){return(s!=null)?String(s).toUpperCase():'\u0000'},asDate:function(s){if(!s){return 0}
if(Ext.isDate(s)){return s.getTime()}
return Date.parse(String(s))},asFloat:function(s){var val=parseFloat(String(s).replace(me.stripCommasRe,''));return isNaN(val)?0:val},asInt:function(s){var val=parseInt(String(s).replace(me.stripCommasRe,''),10);return isNaN(val)?0:val}}})
;
Ext.define('Ext.data.validator.Validator',{mixins:['Ext.mixin.Factoryable'],alias:'data.validator.base',isValidator:!0,factoryConfig:{cacheable:!0},type:'base',constructor:function(config){if(typeof config==='function'){this.fnOnly=!0;this.validate=config}else{this.initConfig(config)}},validate:function(){return!0},clone:function(){var me=this;if(me.fnOnly){return new Ext.data.validator.Validator(me.validate)}
return new me.self(me.getCurrentConfig())}},function(Validator){Ext.Factory.validator=Ext.Factory.dataValidator})
;
Ext.define('Ext.data.field.Field',{mixins:['Ext.mixin.Factoryable'],requires:['Ext.data.SortTypes','Ext.data.validator.Validator'],alternateClassName:'Ext.data.Field',alias:'data.field.auto',aliasPrefix:'data.field.',type:'auto',factoryConfig:{defaultProperty:'name'},isDataField:!0,isField:!0,allowBlank:!0,allowNull:!1,critical:!1,defaultInvalidMessage:'This field is invalid',defaultValue:undefined,definedBy:null,depends:null,dependents:null,mapping:null,name:null,ordinal:undefined,persist:null,reference:null,summary:null,summaryField:'',unique:!1,rank:null,stripRe:/[$,%]/g,calculated:!1,evil:!1,identifier:!1,onClassExtended:function(cls,data){var sortType=data.sortType,proto=cls.prototype,superValidators=proto.validators,validators=data.validators,alias=data.alias;if(alias){if(typeof alias!=='string'){alias=alias[0]}
if(alias){proto.type=alias.substr(alias.lastIndexOf('.')+1)}}
if(sortType&&Ext.isString(sortType)){proto.sortType=Ext.data.SortTypes[sortType]}
if(validators){if(!Ext.isArray(validators)){validators=[validators]}
delete data.validators;if(superValidators){validators=superValidators.concat(validators)}
proto.validators=validators}},argumentNamesRe:/^function\s*\(\s*([^,\)\s]+)/,calculateRe:/[^.a-z0-9_]([a-z_][a-z_0-9]*)\.([a-z_][a-z_0-9]*)/gi,constructor:function(config){var me=this,calculateRe=me.calculateRe,calculate,calculated,defaultValue,sortType,depends,map,match,dataProp,str,fld,validators;if(config){if(Ext.isString(config)){me.name=config}else{validators=config.validators;if(validators){delete config.validators;me.instanceValidators=validators}
Ext.apply(me,config)}}
if(!me.allowNull){me.allowNull=!!me.reference}
calculate=me.calculate;depends=me.depends;if(calculate){me.convert=me.doCalculate;if(!depends){if(!(depends=calculate.$depends)){map={};str=Ext.Function.toCode(calculate);calculate.$depends=depends=[];match=me.argumentNamesRe.exec(str);dataProp=match?match[1]:'data';while((match=calculateRe.exec(str))){if(dataProp===match[1]&&!map[fld=match[2]]){map[fld]=1;depends.push(fld)}}}
me.depends=depends}}
defaultValue=me.defaultValue;if(me.convert){me.calculated=calculated=me.convert.length>1;me.evil=calculated&&!depends}
if(me.persist===null){me.persist=!calculate}
sortType=me.sortType;if(!me.sortType){me.sortType=Ext.data.SortTypes.none}else if(Ext.isString(sortType)){me.sortType=Ext.data.SortTypes[sortType]}
if(depends&&typeof depends==='string'){me.depends=[depends]}
me.cloneDefaultValue=defaultValue!==undefined&&(Ext.isDate(defaultValue)||Ext.isArray(defaultValue)||Ext.isObject(defaultValue))},setModelValidators:function(modelValidators){this._validators=null;this.modelValidators=modelValidators},constructValidators:function(validators){var all,length,i,item,validator,presence;if(validators){if(!(validators instanceof Array)){validators=[validators]}
all=this._validators;for(i=0,length=validators.length;i<length;++i){item=validators[i];if(item.fn){item=item.fn}
validator=Ext.Factory.dataValidator(item);if(!validator.isPresence){all.push(validator)}else{presence=validator}}
if(presence){this.presence=[presence]}}},collate:function(value1,value2){var me=this,lhs=value1,rhs=value2;if(me.sortType){lhs=me.sortType(lhs);rhs=me.sortType(rhs)}
return(lhs===rhs)?0:((lhs<rhs)?-1:1)},compare:function(value1,value2){return(value1===value2)?0:((value1<value2)?-1:1)},isEqual:function(value1,value2){return this.compare(value1,value2)===0},convert:null,serialize:null,validate:function(value,separator,errors,record){var me=this,validators=me.getValidators(),result,presence;presence=this.presence;if(presence&&(value==null||value==='')){result=me.validateGroup(presence,value,separator,errors,record);if(result!==!0){return result}}
return me.validateGroup(validators,value,separator,errors,record)},validateGroup:function(validators,value,separator,errors,record){var ret='',validator,length,i,result;for(i=0,length=validators.length;i<length;++i){validator=validators[i];result=validator.validate(value,record);if(result!==!0){result=result||this.defaultInvalidMessage;if(errors){if(errors.isMixedCollection){errors.add(this.name,result)}else if(errors.isCollection){errors.add(result)}else{errors.push(result)}
ret=ret||result}else if(separator){if(ret){ret+=separator}
ret+=result}else{ret=result;break}}}
return ret||!0},doCalculate:function(v,rec){return rec?this.calculate(rec.data):v},getName:function(){return this.name},getAllowBlank:function(){return this.allowBlank},getAllowNull:function(){return this.allowNull},getConvert:function(){return this.convert},getDefaultValue:function(){return this.defaultValue},getDepends:function(){return this.depends},getMapping:function(){return this.mapping},hasMapping:function(){var map=this.mapping;return!!(map||map===0)},getPersist:function(){return this.persist},getSortType:function(){return this.sortType},getSummary:function(){var me=this,doneSummary=me.doneSummary,summary=me.summary;if(!doneSummary){me.doneSummary=!0;if(summary){me.summary=summary=Ext.Factory.dataSummary(summary)}}
return summary||null},getType:function(){return'auto'},privates:{getValidators:function(){var me=this,validators=me._validators;if(!validators){me._validators=validators=[];me.constructValidators(me.validators);me.constructValidators(me.modelValidators);me.constructValidators(me.instanceValidators)}
return validators}},deprecated:{5.1:{methods:{getSortDir:function(){return this.sortDir}}}}})
;
Ext.define('Ext.data.field.Boolean',{extend:'Ext.data.field.Field',alias:['data.field.bool','data.field.boolean'],isBooleanField:!0,trueRe:/^\s*(?:true|yes|on|1)\s*$/i,convert:function(v){if(typeof v==='boolean'){return v}
if(this.allowNull&&(v===undefined||v===null||v==='')){return null}
return this.trueRe.test(String(v))},getType:function(){return'bool'}})
;
Ext.define('Ext.data.field.Date',{extend:'Ext.data.field.Field',alias:'data.field.date',sortType:'asDate',isDateField:!0,dateFormat:null,dateReadFormat:null,dateWriteFormat:null,compare:function(lhs,rhs){var lhsIsDate=lhs instanceof Date,rhsIsDate=rhs instanceof Date,result;if(rhsIsDate&&lhsIsDate){result=lhs.getTime()-rhs.getTime();if(result===0){result=0}else{result=result<0?-1:1}}else if(lhsIsDate===rhsIsDate){result=0}else{result=lhsIsDate?1:-1}
return result},convert:function(v){if(!v){return null}
if(v instanceof Date){return v}
var dateFormat=this.dateReadFormat||this.dateFormat,parsed;if(dateFormat){return Ext.Date.parse(v,dateFormat,this.useStrict)}
parsed=Date.parse(v);return parsed?new Date(parsed):null},serialize:function(value){var result=null,format;if(Ext.isDate(value)){format=this.getDateWriteFormat();result=format?Ext.Date.format(value,format):value}
return result},getDateFormat:function(){return this.dateFormat},getDateReadFormat:function(){return this.dateReadFormat},getDateWriteFormat:function(){var me=this;if(me.hasOwnProperty('dateWriteFormat')){return me.dateWriteFormat}
if(me.hasOwnProperty('dateFormat')){return me.dateFormat}
return me.dateWriteFormat||me.dateFormat||'timestamp'},getType:function(){return'date'}})
;
Ext.define('Ext.data.field.Integer',{extend:'Ext.data.field.Field',alias:['data.field.int','data.field.integer'],isNumeric:!0,isIntegerField:!0,numericType:'int',convert:function(v){if(typeof v==='number'){return this.getNumber(v)}
var empty=v==null||v==='',allowNull=this.allowNull,out;if(empty){out=allowNull?null:0}else{out=this.parse(v);if(allowNull&&isNaN(out)){out=null}}
return out},getNumber:function(v){return parseInt(v,10)},getType:function(){return this.numericType},parse:function(v){return parseInt(String(v).replace(this.stripRe,''),10)},sortType:function(s){if(s==null){s=Infinity}
return s}})
;
Ext.define('Ext.data.field.Number',{extend:'Ext.data.field.Integer',alias:['data.field.float','data.field.number'],isIntegerField:!1,isNumberField:!0,numericType:'float',getNumber:Ext.identityFn,parse:function(v){return parseFloat(String(v).replace(this.stripRe,''))}})
;
Ext.define('Ext.data.field.String',{extend:'Ext.data.field.Field',alias:'data.field.string',sortType:'asUCString',isStringField:!0,convert:function(v){var defaultValue=this.allowNull?null:'';return(v===undefined||v===null)?defaultValue:String(v)},getType:function(){return'string'}})
;
Ext.define('Ext.data.identifier.Generator',{'abstract':!0,mixins:['Ext.mixin.Factoryable'],alias:'data.identifier.default',factoryConfig:{defaultType:'sequential'},isGenerator:!0,config:{id:null},constructor:function(config){var me=this,id;me.initConfig(config);id=me.getId();if(id){Ext.data.identifier.Generator.all[id]=me}},privates:{clone:function(config){var cfg=this.getInitialConfig();cfg=config?Ext.apply({},config,cfg):cfg;return new this.self(cfg)},statics:{all:{}}}},function(){var Generator=this,Factory=Ext.Factory,factory=Factory.dataIdentifier;Factory.dataIdentifier=function(config){var id=Ext.isString(config)?config:(config&&config.id),existing=id&&Generator.all[id];return existing||factory(config)}})
;
Ext.define('Ext.data.identifier.Sequential',{extend:'Ext.data.identifier.Generator',alias:'data.identifier.sequential',config:{increment:1,prefix:null,seed:1},generate:function(){var me=this,seed=me._seed,prefix=me._prefix;me._seed+=me._increment;return(prefix!==null)?prefix+seed:seed}})
;
Ext.define('Ext.data.Model',{alternateClassName:'Ext.data.Record',requires:['Ext.data.ErrorCollection','Ext.data.operation.*','Ext.data.field.*','Ext.data.validator.Validator','Ext.data.schema.Schema','Ext.data.identifier.Generator','Ext.data.identifier.Sequential'],uses:['Ext.data.Validation'],isEntity:!0,isModel:!0,validIdRe:null,erasing:!1,loadOperation:null,loadCount:0,observableType:'record',crudState:'R',crudStateWas:null,constructor:function(data,session,skipStoreAddition){var me=this,cls=me.self,identifier=cls.identifier,Model=Ext.data.Model,modelIdentifier=Model.identifier,idProperty=me.idField.name,array,id,initializeFn,internalId,len,i,fields;me.data=me.data=data||(data={});me.internalId=internalId=modelIdentifier.generate();var dataId=data[idProperty];if(session&&!session.isSession){Ext.raise('Bad Model constructor argument 2 - "session" is not a Session')}
if((array=data)instanceof Array){me.data=data={};fields=me.getFields();len=Math.min(fields.length,array.length);for(i=0;i<len;++i){data[fields[i].name]=array[i]}}
if(!(initializeFn=cls.initializeFn)){cls.initializeFn=initializeFn=Model.makeInitializeFn(cls)}
if(!initializeFn.$nullFn){cls.initializeFn(me)}
if(!me.isSummaryModel){if(!(me.id=id=data[idProperty])&&id!==0){if(dataId){Ext.raise('The model ID configured in data ("'+dataId+'") has been rejected by the '+me.fieldsMap[idProperty].type+' field converter for the '+idProperty+' field')}
if(session){identifier=session.getIdentifier(cls);id=identifier.generate()}else if(modelIdentifier===identifier){id=internalId}else{id=identifier.generate()}
data[idProperty]=me.id=id;me.phantom=!0;me.crudState='C'}
if(session&&!skipStoreAddition){session.add(me)}
if(me.phantom){me.crudStateWas='C'}}
if(me.init&&Ext.isFunction(me.init)){me.init()}},editing:!1,dirty:!1,session:null,dropped:!1,erased:!1,clientIdProperty:null,evented:!1,phantom:!1,idProperty:'id',manyToMany:null,identifier:null,previousValues:undefined,proxy:undefined,schema:'default',summary:null,versionProperty:null,generation:1,validationSeparator:null,convertOnSet:!0,beginEdit:function(){var me=this,modified=me.modified,previousValues=me.previousValues;if(!me.editing){me.editing=!0;me.editMemento={dirty:me.dirty,data:Ext.apply({},me.data),generation:me.generation,modified:modified&&Ext.apply({},modified),previousValues:previousValues&&Ext.apply({},previousValues)}}},calculateSummary:function(records){var fields=this.getFields(),len=fields.length,recLen=records.length,i,result,summary,prop,name,field;for(i=0;i<len;++i){field=fields[i];summary=field.getSummary();if(summary){result=result||{};name=field.name;prop=field.summaryField||name;result[name]=summary.calculate(records,prop,'data',0,recLen)}}
if(result){this.set(result,this._commitOptions)}},cancelEdit:function(){var me=this,editMemento=me.editMemento,validation=me.validation;if(editMemento){me.editing=!1;Ext.apply(me,editMemento);me.editMemento=null;if(validation&&validation.syncGeneration!==me.generation){validation.syncGeneration=0}}},endEdit:function(silent,modifiedFieldNames){var me=this,editMemento=me.editMemento;if(editMemento){me.editing=!1;me.editMemento=null;me.previousValues=editMemento.previousValues;if(!silent){if(!modifiedFieldNames){modifiedFieldNames=me.getModifiedFieldNames(editMemento.data)}
if(me.dirty||(modifiedFieldNames&&modifiedFieldNames.length)){me.callJoined('afterEdit',[modifiedFieldNames])}}}},getField:function(name){return this.self.getField(name)},getFields:function(){return this.self.getFields()},getFieldsMap:function(){return this.fieldsMap},getIdProperty:function(){return this.idProperty},getId:function(){return this.id},getObservableId:function(){return this.internalId},setId:function(id,options){this.set(this.idProperty,id,options)},getPrevious:function(fieldName){var previousValues=this.previousValues;return previousValues&&previousValues[fieldName]},isModified:function(fieldName){var modified=this.modified;return!!(modified&&modified.hasOwnProperty(fieldName))},getModified:function(fieldName){var out;if(this.isModified(fieldName)){out=this.modified[fieldName]}
return out},get:function(fieldName){return this.data[fieldName]},_singleProp:{},_rejectOptions:{convert:!1,silent:!0},set:function(fieldName,newValue,options){var me=this,cls=me.self,data=me.data,modified=me.modified,prevVals=me.previousValues,session=me.session,single=Ext.isString(fieldName),opt=(single?options:newValue),convertOnSet=opt?opt.convert!==!1:me.convertOnSet,fieldsMap=me.fieldsMap,silent=opt&&opt.silent,commit=opt&&opt.commit,updateRefs=!(opt&&opt.refs===!1)&&session,dirty=!(opt&&opt.dirty===!1&&!commit),modifiedFieldNames=null,dirtyRank=0,associations=me.associations,currentValue,field,idChanged,key,name,oldId,comparator,dep,dependents,i,numFields,newId,rankedFields,reference,value,values,roleName;if(single){values=me._singleProp;values[fieldName]=newValue}else{values=fieldName}
if(!(rankedFields=cls.rankedFields)){rankedFields=cls.rankFields()}
numFields=rankedFields.length;do{for(name in values){value=values[name];currentValue=data[name];comparator=me;field=fieldsMap[name];if(field){if(convertOnSet&&field.convert){value=field.convert(value,me)}
comparator=field;reference=field.reference}else{reference=null}
if(comparator.isEqual(currentValue,value)){continue}
data[name]=value;(modifiedFieldNames||(modifiedFieldNames=[])).push(name);(prevVals||(me.previousValues=prevVals={}))[name]=currentValue;if(reference&&reference.cls){if(updateRefs){session.updateReference(me,field,value,currentValue)}
reference.onValueChange(me,session,value,currentValue)}
i=(dependents=field&&field.dependents)&&dependents.length;while(i-->0){(dep=dependents[i]).dirty=!0;dirtyRank=dirtyRank?Math.min(dirtyRank,dep.rank):dep.rank}
if(!field||field.persist){if(modified&&modified.hasOwnProperty(name)){if(!dirty||comparator.isEqual(modified[name],value)){delete modified[name];me.dirty=-1}}else if(dirty){if(!modified){me.modified=modified={}}
me.dirty=!0;modified[name]=currentValue}}
if(name===me.idField.name){idChanged=!0;oldId=currentValue;newId=value}}
if(!dirtyRank){break}
field=rankedFields[dirtyRank-1];field.dirty=!1;if(single){delete values[fieldName]}else{values=me._singleProp;single=!0}
fieldName=field.name;values[fieldName]=data[fieldName];convertOnSet=!0;for(;dirtyRank<numFields;++dirtyRank){if(rankedFields[dirtyRank].dirty){break}}
if(dirtyRank<numFields){++dirtyRank}else{dirtyRank=0}}while(1);if(me.dirty<0){me.dirty=!1;for(key in modified){if(modified.hasOwnProperty(key)){me.dirty=!0;break}}}
if(single){delete values[fieldName]}
++me.generation;if(idChanged){me.id=newId;me.onIdChanged(newId,oldId);me.callJoined('onIdChanged',[oldId,newId]);if(associations){for(roleName in associations){associations[roleName].onIdChanged(me,oldId,newId)}}}
if(commit){me.commit(silent,modifiedFieldNames)}else if(!silent&&!me.editing&&modifiedFieldNames){me.callJoined('afterEdit',[modifiedFieldNames])}
return modifiedFieldNames},reject:function(silent){var me=this,modified=me.modified;if(me.erased){Ext.raise('Cannot reject once a record has been erased.')}
if(modified){me.set(modified,me._rejectOptions)}
me.dropped=!1;me.clearState();if(!silent){me.callJoined('afterReject')}},commit:function(silent,modifiedFieldNames){var me=this,versionProperty=me.versionProperty,data=me.data,erased;me.clearState();if(versionProperty&&!me.phantom&&!isNaN(data[versionProperty])){++data[versionProperty]}
me.phantom=!1;if(me.dropped){me.erased=erased=!0}
if(!silent){if(erased){me.callJoined('afterErase')}else{me.callJoined('afterCommit',[modifiedFieldNames])}}},clearState:function(){var me=this;me.dirty=me.editing=!1;me.editMemento=me.modified=null},drop:function(cascade){var me=this,associations=me.associations,session=me.session,roleName;if(me.erased||me.dropped){return}
me.dropped=!0;if(associations&&cascade!==!1){for(roleName in associations){associations[roleName].onDrop(me,session)}}
me.callJoined('afterDrop');if(me.phantom){me.setErased()}},join:function(owner){var me=this,joined=me.joined;if(!joined){joined=me.joined=[owner]}else if(!joined.length){joined[0]=owner}else{Ext.Array.include(joined,owner)}
if(owner.isStore&&!me.store){me.store=owner}},unjoin:function(owner){var me=this,joined=me.joined,len=joined&&joined.length,store=me.store,i;if(owner===me.session){me.session=null}else{if(len===1&&joined[0]===owner){joined.length=0}else if(len){Ext.Array.remove(joined,owner)}
if(store===owner){store=null;if(joined){for(i=0,len=joined.length;i<len;++i){owner=joined[i];if(owner.isStore){store=owner;break}}}
me.store=store}}},clone:function(session){var me=this,modified=me.modified,ret=me.copy(me.id,session);if(modified){ret.modified=Ext.apply({},modified)}
ret.dirty=me.dirty;ret.dropped=me.dropped;ret.phantom=me.phantom;return ret},copy:function(newId,session){var me=this,data=Ext.apply({},me.data),idProperty=me.idProperty,T=me.self;if(newId||newId===0){data[idProperty]=newId}else if(newId===null){delete data[idProperty]}
return new T(data,session)},getProxy:function(){return this.self.getProxy()},getValidation:function(refresh){var me=this,ret=me.validation;if(!ret){me.validation=ret=new Ext.data.Validation();ret.attach(me)}
if(refresh===!0||(refresh!==!1&&ret.syncGeneration!==me.generation)){ret.refresh(refresh)}
return ret},validate:function(){return new Ext.data.ErrorCollection().init(this)},isValid:function(){return this.getValidation().isValid()},toUrl:function(){var pieces=this.$className.split('.'),name=pieces[pieces.length-1].toLowerCase();return name+'/'+this.getId()},erase:function(options){var me=this;me.erasing=!0;me.drop();me.erasing=!1;return me.save(options)},setErased:function(){this.erased=!0;this.callJoined('afterErase')},getChanges:function(){return this.getData(this._getChangesOptions)},getCriticalFields:function(){var cls=this.self,ret=cls.criticalFields;if(!ret){cls.rankFields();ret=cls.criticalFields}
return ret},getAssociatedData:function(result,options){var me=this,associations=me.associations,deep,i,item,items,itemData,length,record,role,roleName,opts,clear,associated;result=result||{};me.$gathering=1;if(options){options=Ext.apply({},options)}
for(roleName in associations){role=associations[roleName];item=role.getAssociatedItem(me);if(!item||item.$gathering){continue}
if(item.isStore){item.$gathering=1;items=item.getData().items;length=items.length;itemData=[];for(i=0;i<length;++i){record=items[i];deep=!record.$gathering;record.$gathering=1;if(options){associated=options.associated;if(associated===undefined){options.associated=deep;clear=!0}else if(!deep){options.associated=!1;clear=!0}
opts=options}else{opts=deep?me._getAssociatedOptions:me._getNotAssociatedOptions}
itemData.push(record.getData(opts));if(clear){options.associated=associated;clear=!1}
delete record.$gathering}
delete item.$gathering}else{opts=options||me._getAssociatedOptions;if(options&&options.associated===undefined){opts.associated=!0}
itemData=item.getData(opts)}
result[roleName]=itemData}
delete me.$gathering;return result},getData:function(options){var me=this,ret={},opts=(options===!0)?me._getAssociatedOptions:(options||ret),data=me.data,associated=opts.associated,changes=opts.changes,critical=changes&&opts.critical,content=changes?me.modified:data,fieldsMap=me.fieldsMap,persist=opts.persist,serialize=opts.serialize,criticalFields,field,n,name,value;if(content){for(name in content){value=data[name];field=fieldsMap[name];if(field){if(persist&&!field.persist){continue}
if(serialize&&field.serialize){value=field.serialize(value,me)}}
ret[name]=value}}
if(critical){criticalFields=me.self.criticalFields||me.getCriticalFields();for(n=criticalFields.length;n-->0;){name=(field=criticalFields[n]).name;if(!(name in ret)){value=data[name];if(serialize&&field.serialize){value=field.serialize(value,me)}
ret[name]=value}}}
if(associated){if(typeof associated==='object'){me.getNestedData(opts,ret)}else{me.getAssociatedData(ret,opts)}}
return ret},getNestedData:function(options,result){var me=this,associations=me.associations,graph=options.associated,i,item,items,itemData,length,record,role,roleName,opts;result=result||{};for(roleName in graph){role=associations[roleName];opts=graph[roleName];if(opts===!0){delete options.associated}else{options.associated=opts}
item=role.getAssociatedItem(me);if(item.isStore){items=item.getData().items;length=items.length;itemData=[];for(i=0;i<length;++i){record=items[i];itemData.push(record.getData(options))}}else{itemData=item.getData(options)}
result[roleName]=itemData}
options.associated=graph;return result},getTransientFields:function(){var cls=this.self,ret=cls.transientFields;if(!ret){cls.rankFields();ret=cls.transientFields}
return ret},isLoading:function(){return!!this.loadOperation},abort:function(){var operation=this.loadOperation;if(operation){operation.abort()}},load:function(options){options=Ext.apply({},options);var me=this,scope=options.scope||me,proxy=me.getProxy(),callback=options.callback,operation=me.loadOperation,id=me.getId(),extras;if(operation){extras=operation.extraCalls;if(!extras){extras=operation.extraCalls=[]}
extras.push(options);return operation}
var doIdCheck=!0;if(me.phantom){doIdCheck=!1}
options.id=id;options.recordCreator=function(data,type,readOptions){var session=me.session;if(readOptions){readOptions.recordCreator=session?session.recordCreator:null}
me.set(data,me._commitOptions);if(doIdCheck&&me.getId()!==id){Ext.raise('Invalid record id returned for '+id+'@'+me.entityName)}
return me};options.internalCallback=function(operation){var success=operation.wasSuccessful()&&operation.getRecords().length>0,op=me.loadOperation,extras=op.extraCalls,successFailArgs=[me,operation],callbackArgs=[me,operation,success],i,len;me.loadOperation=null;++me.loadCount;if(success){Ext.callback(options.success,scope,successFailArgs)}else{Ext.callback(options.failure,scope,successFailArgs)}
Ext.callback(callback,scope,callbackArgs);if(extras){for(i=0,len=extras.length;i<len;++i){options=extras[i];if(success){Ext.callback(options.success,scope,successFailArgs)}else{Ext.callback(options.failure,scope,successFailArgs)}
Ext.callback(options.callback,scope,callbackArgs)}}
me.callJoined('afterLoad')};delete options.callback;me.loadOperation=operation=proxy.createOperation('read',options);operation.execute();return operation},mergeData:function(data){if(!this.dirty){this.set(data,this._commitOptions)}},save:function(options){options=Ext.apply({},options);var me=this,phantom=me.phantom,dropped=me.dropped,action=dropped?'destroy':(phantom?'create':'update'),scope=options.scope||me,callback=options.callback,proxy=me.getProxy(),operation;options.records=[me];options.internalCallback=function(operation){var args=[me,operation],success=operation.wasSuccessful();if(success){Ext.callback(options.success,scope,args)}else{Ext.callback(options.failure,scope,args)}
args.push(success);Ext.callback(callback,scope,args)};delete options.callback;operation=proxy.createOperation(action,options);if(dropped&&phantom){operation.setResultSet(Ext.data.reader.Reader.prototype.nullResultSet);me.setErased();operation.setSuccessful(!0)}else{operation.execute()}
return operation},statics:{defaultProxy:'memory'},inheritableStatics:{_associatedReadOptions:{recordsOnly:!0,asRoot:!0},loadData:function(data,session){var rec;if(data){rec=this.getProxy().getReader().readRecords([data],session?{recordCreator:session.recordCreator}:undefined,this._associatedReadOptions)[0]}else{rec=new this(data,session)}
return rec},getSummaryModel:function(){var me=this,proto=me.prototype,summaryModel=me.summaryModel;if(!summaryModel){summaryModel=Ext.define(null,{extend:me,fields:proto.summaryFields||[],isSummaryModel:!0});summaryModel.isSummaryModel=!0;me.summaryModel=proto.summaryModel=summaryModel}
return summaryModel||null},addFields:function(newFields){this.replaceFields(newFields)},replaceFields:function(newFields,removeFields){var me=this,proto=me.prototype,Field=Ext.data.field.Field,fields=me.fields,fieldsMap=me.fieldsMap,ordinals=me.fieldOrdinals,field,i,idField,len,name,ordinal,cleared;if(removeFields===!0){fields.length=0;me.fieldsMap=fieldsMap={};me.fieldOrdinals=ordinals={};cleared=!0}else if(removeFields){for(i=removeFields.length;i-->0;){name=removeFields[i];if(name in ordinals){delete ordinals[name];delete fieldsMap[name]}}
for(i=0,len=fields.length;i<len;++i){name=(field=fields[i]).name;if(name in ordinals){ordinals[name]=i}else{fields.splice(i,1);--i;--len}}}
for(i=0,len=newFields?newFields.length:0;i<len;i++){name=(field=newFields[i]).name;if(!(name in ordinals)){ordinals[name]=ordinal=fields.length;fields.push(field=Field.create(field));fieldsMap[name]=field;field.ordinal=ordinal;field.definedBy=field.owner=this}}
if(!cleared){for(i=0,len=fields.length;i<len;++i){fields[i].rank=null}}
me.idField=proto.idField=idField=fieldsMap[proto.idProperty];if(idField){idField.allowNull=idField.critical=idField.identifier=!0;idField.defaultValue=null}
me.initializeFn=me.rankedFields=me.transientFields=me.criticalFields=null},removeFields:function(removeFields){this.replaceFields(null,removeFields)},getIdFromData:function(data){var T=this,idField=T.idField,id=idField.calculated?(new T(data)).id:data[idField.name];return id},createWithId:function(id,data,session){var d=data,T=this;if(id||id===0){d={};if(data){Ext.apply(d,data)}
d[T.idField.name]=id}
return new T(d,session)},getFields:function(){return this.fields},getFieldsMap:function(){return this.fieldsMap},getField:function(name){return this.fieldsMap[name]||null},getProxy:function(){var me=this,proxy=me.proxy,defaultProxy=me.defaultProxy,defaults;if(!proxy){proxy=me.proxyConfig;if(!proxy&&defaultProxy){proxy=defaultProxy}
if(!proxy||!proxy.isProxy){if(typeof proxy==='string'){proxy={type:proxy}}
defaults=Ext.merge(me.schema.constructProxy(me),proxy);if(proxy&&proxy.type){proxy=proxy.schema===!1?proxy:defaults}else{proxy=defaults}}
proxy=me.setProxy(proxy)}
return proxy},setProxy:function(proxy){var me=this,model;if(proxy){if(!proxy.isProxy){proxy=Ext.Factory.proxy(proxy)}else{model=proxy.getModel();if(model&&model!==me){proxy=proxy.clone()}}
proxy.setModel(me)}
return(me.prototype.proxy=me.proxy=proxy)},load:function(id,options,session){var data={},rec;if(session){rec=session.peekRecord(this,id)}
if(!rec){data[this.prototype.idProperty]=id;rec=new this(data,session)}
rec.load(options);return rec}},deprecated:{5:{methods:{hasId:null,markDirty:null,setDirty:null,eachStore:function(callback,scope){var me=this,stores=me.stores,len=stores.length,i;for(i=0;i<len;++i){callback.call(scope,stores[i])}},join:function(item){var me=this,stores=me.stores,joined=me.joined;if(!joined){joined=me.joined=[item]}else{joined.push(item)}
if(item.isStore){me.store=me.store||item;if(!stores){stores=me.stores=[]}
stores.push(item)}},unjoin:function(item){var me=this,stores=me.stores,joined=me.joined;if(joined.length===1){joined.length=0}else{Ext.Array.remove(joined,item)}
if(item.isStore){Ext.Array.remove(stores,item);me.store=stores[0]||null}}},properties:{persistenceProperty:null},inheritableStatics:{methods:{setFields:null}}}},privates:{_commitOptions:{commit:!0},_getChangesOptions:{changes:!0},_getAssociatedOptions:{associated:!0},_getNotAssociatedOptions:{associated:!1},_metaProperties:{dirty:'isDirty',phantom:'isPhantom',valid:'isValid'},copyFrom:function(sourceRecord){var me=this,fields=me.fields,fieldCount=fields.length,modifiedFieldNames=[],idProperty=me.idProperty,i=0,field,myData,sourceData,name,value;if(sourceRecord){myData=me.data;sourceData=sourceRecord.data;for(;i<fieldCount;i++){field=fields[i];name=field.name;if(name!==idProperty){value=sourceData[name];if(value!==undefined&&!me.isEqual(myData[name],value)){myData[name]=value;modifiedFieldNames.push(name)}}}
if(me.phantom&&!sourceRecord.phantom){me.beginEdit();me.setId(sourceRecord.getId());me.endEdit(!0);me.commit(!0)}}
return modifiedFieldNames},callJoined:function(funcName,args){var me=this,joined=me.joined,session=me.session,state=me.dropped?'D':(me.phantom?'C':(me.dirty?'U':'R')),i,len,fn,item;me.crudState=state;if(joined||session){if(args){args.unshift(me)}else{args=[me]}
fn=session&&session[funcName];if(fn){fn.apply(session,args)}
if(joined){for(i=0,len=joined.length;i<len;++i){item=joined[i];if(item&&(fn=item[funcName])){fn.apply(item,args)}}}}
me.crudStateWas=state},hasPendingLoad:function(){return this.isLoading()},interpret:function(name){var me=this,accessor=me._metaProperties[name];if(!accessor){accessor=me.associations;accessor=accessor&&accessor[name]&&accessor[name].getterName}
if(accessor){return me[accessor]()}
return me.data[name]},isDirty:function(){return this.dirty},isPhantom:function(){return this.phantom},onAssociatedRecordSet:function(record,role){this.callJoined('afterAssociatedRecordSet',[record,role])},onIdChanged:Ext.privateFn,setSession:function(session){if(session){if(this.session){Ext.raise('This model already belongs to a session.')}
if(!this.id){Ext.raise('The model must have an id to participate in a session.')}}
this.session=session;if(session){session.add(this)}},getModifiedFieldNames:function(old){var me=this,data=me.data,modified=[],oldData=old||me.editMemento.data,key;for(key in data){if(data.hasOwnProperty(key)){if(!me.isEqual(data[key],oldData[key],key)){modified.push(key)}}}
return modified},isEqual:function(lhs,rhs,field){var f;if(field){f=field.isField?field:this.fieldsMap[field];if(f){return f.isEqual(lhs,rhs)}}
if(lhs instanceof Date&&rhs instanceof Date){return lhs.getTime()===rhs.getTime()}
return lhs===rhs},statics:{EDIT:'edit',REJECT:'reject',COMMIT:'commit',rankFields:function(){var cls=this,prototype=cls.prototype,fields=cls.fields,length=fields.length,rankedFields=[],criticalFields=[],transientFields=[],evilFields,field,i;cls.rankedFields=prototype.rankedFields=rankedFields;cls.criticalFields=prototype.criticalFields=criticalFields;cls.transientFields=prototype.transientFields=transientFields;for(i=0;i<length;++i){field=fields[i];if(field.critical){criticalFields.push(field)}
if(!field.persist){transientFields.push(field)}
if(field.evil){(evilFields||(evilFields=[])).push(field)}else if(!field.depends){rankedFields.push(field);field.rank=rankedFields.length}}
for(i=0;i<length;++i){if(!(field=fields[i]).rank&&!field.evil){cls.topoAdd(field)}}
if(evilFields){for(i=0,length=evilFields.length;i<length;++i){rankedFields.push(field=evilFields[i]);field.rank=rankedFields.length}}
cls.topoStack=null;return rankedFields},topoAdd:function(field){var cls=this,dep=field.depends,dependsLength=dep?dep.length:0,rankedFields=cls.rankedFields,i,targetField;var topoStack=cls.topoStack||(cls.topoStack=[]);topoStack.push(field.name);if(field.rank===0){Ext.raise(cls.$className+" has circular field dependencies: "+topoStack.join(" --> "))}
if(topoStack.length&&field.evil){Ext.raise(cls.$className+": Field "+topoStack[topoStack.length-1]+" cannot depend on depends-less field "+field.name)}
field.rank=0;for(i=0;i<dependsLength;++i){targetField=cls.fieldsMap[dep[i]];if(!targetField){Ext.raise(cls.$className+": Field "+field.name+" depends on undefined field "+dep[i])}(targetField.dependents||(targetField.dependents=[])).push(field);if(!targetField.rank){cls.topoAdd(targetField)}}
rankedFields.push(field);field.rank=rankedFields.length;topoStack.pop()},initFields:function(data,cls,proto){var Field=Ext.data.field.Field,fieldDefs=data.fields,fields=[],fieldOrdinals={},fieldsMap={},references=[],superFields=proto.fields,versionProperty=data.versionProperty||proto.versionProperty,idProperty=cls.idProperty,idField,field,i,length,name,ordinal,reference,superIdField,superIdFieldName,superIdDeclared,idDeclared;cls.fields=proto.fields=fields;cls.fieldOrdinals=proto.fieldOrdinals=fieldOrdinals;cls.fieldsMap=proto.fieldsMap=fieldsMap;cls.references=proto.references=references;if(superFields){for(i=0,length=superFields.length;i<length;++i){fields[i]=field=Ext.Object.chain(superFields[i]);field.dependents=null;field.owner=cls;fieldOrdinals[name=field.name]=i;fieldsMap[name]=field;field.rank=null;if(field.generated){superIdField=field;superIdFieldName=field.name}}}
delete data.fields;if(fieldDefs){for(i=0,length=fieldDefs.length;i<length;++i){field=fieldDefs[i];reference=field.reference;if(reference&&typeof reference!=='string'){reference=Ext.merge({},reference)}
field.$reference=reference;field=Field.create(fieldDefs[i]);name=field.name;ordinal=fieldOrdinals[name];if(ordinal===undefined){fieldOrdinals[name]=ordinal=fields.length}
fieldsMap[name]=field;fields[ordinal]=field;field.definedBy=field.owner=cls;field.ordinal=ordinal;if(name===idProperty){idDeclared=field}
if(name===superIdFieldName){superIdDeclared=!0}}}
idField=fieldsMap[idProperty];if(!idField){if(superIdField&&superIdField.generated){ordinal=superIdField.ordinal}else{ordinal=fields.length}
delete fieldsMap[superIdFieldName];delete fieldOrdinals[superIdFieldName];idField=new Field(idProperty);fields[ordinal]=idField;fieldOrdinals[idProperty]=ordinal;fieldsMap[idProperty]=idField;idField.definedBy=cls;idField.ordinal=ordinal;idField.generated=!0}else if(idDeclared&&!superIdDeclared&&superIdField&&superIdField.generated){Ext.Array.remove(fields,superIdField);delete fieldsMap[superIdFieldName];delete fieldOrdinals[superIdFieldName];fieldsMap[idProperty]=idDeclared;for(i=0,length=fields.length;i<length;++i){field=fields[i];fields.ordinal=i;fieldOrdinals[field.name]=i}}
idField.allowNull=idField.critical=idField.identifier=!0;idField.defaultValue=null;cls.idField=proto.idField=idField;if(versionProperty){field=fieldsMap[versionProperty];if(!field){ordinal=fields.length;field=new Field({name:versionProperty,type:'int'});fields[ordinal]=field;fieldOrdinals[versionProperty]=ordinal;fieldsMap[versionProperty]=field;field.definedBy=cls;field.ordinal=ordinal;field.generated=!0}
field.defaultValue=1;field.critical=!0}},initSummaries:function(data,cls,proto){var summaryDefs=data.summary,superSummaries=proto.summaryFields,summaries,summaryMap,name,summary,len,i,index,field;if(superSummaries){summaries=[];summaryMap={};for(i=0,len=superSummaries.length;i<len;++i){summary=superSummaries[i];summaries.push(summary);summaries[summary.name]=i}}
if(summaryDefs){delete data.summary;summaries=summaries||[];summaryMap=summaryMap||{};for(name in summaryDefs){summary=summaryDefs[name];if(typeof summary==='function'){summary={summary:summary}}
index=summaryMap[name];summary=Ext.apply({name:name},summary);field=summary.field;if(field){delete summary.field;summary.summaryField=field}
if(index===undefined){index=summaries.length;summaryMap[name]=summary}
summaries[index]=summary}}
if(summaries){for(i=0,len=summaries.length;i<len;++i){if(summaries[i].name in proto.fieldsMap){Ext.raise('Cannot redefine field, use the summary property '+'on the field.')}}
proto.summaryFields=summaries}},initValidators:function(data,cls,proto){var superValidators=proto.validators,validators,field,copy,validatorDefs,i,length,fieldValidator,name,validator,item;if(superValidators){validators={};for(field in superValidators){validators[field]=Ext.Array.clone(superValidators[field])}}
validatorDefs=data.validators||data.validations;if(data.validations){delete data.validations;Ext.log.warn((cls.$className||'Ext.data.Model')+': validations has been deprecated. Please use validators '+'instead.')}
if(validatorDefs){delete data.validators;validators=validators||{};if(Ext.isArray(validatorDefs)){copy={};for(i=0,length=validatorDefs.length;i<length;++i){item=validatorDefs[i];name=item.field;if(!copy[name]){copy[name]=[]}
item=item.fn||item;copy[name].push(item)}
validatorDefs=copy}
for(name in validatorDefs){fieldValidator=validatorDefs[name];if(!Ext.isArray(fieldValidator)){fieldValidator=[fieldValidator]}
validator=validators[name];if(validator){Ext.Array.push(validator,fieldValidator)}else{validators[name]=fieldValidator}}}
if(validators){for(name in validators){field=cls.getField(name);if(field){field.setModelValidators(validators[name])}}}
cls.validators=proto.validators=validators},initAssociations:function(schema,data,cls){var associations=data.associations,belongsTo=data.belongsTo,hasMany=data.hasMany,hasOne=data.hasOne,matrices=data.manyToMany,i,length,assoc,o;delete data.associations;delete data.belongsTo;delete data.hasMany;delete data.hasOne;delete data.manyToMany;if(matrices){schema.addMatrices(cls,matrices)}
if(associations){associations=Ext.isArray(associations)?associations:[associations];for(i=0,length=associations.length;i<length;++i){assoc=associations[i];o=Ext.apply({},assoc);delete o.type;switch(assoc.type){case 'belongsTo':schema.addBelongsTo(cls,o);break;case 'hasMany':schema.addHasMany(cls,o);break;case 'hasOne':schema.addHasOne(cls,o);break;default:Ext.raise('Invalid association type: "'+assoc.type+'"')}}}
if(belongsTo){belongsTo=Ext.isArray(belongsTo)?belongsTo:[belongsTo];for(i=0,length=belongsTo.length;i<length;++i){schema.addBelongsTo(cls,belongsTo[i])}}
if(hasMany){hasMany=Ext.isArray(hasMany)?hasMany:[hasMany];for(i=0,length=hasMany.length;i<length;++i){schema.addHasMany(cls,hasMany[i])}}
if(hasOne){hasOne=Ext.isArray(hasOne)?hasOne:[hasOne];for(i=0,length=hasOne.length;i<length;++i){schema.addHasOne(cls,hasOne[i])}}
schema.afterKeylessAssociations(cls)},initIdentifier:function(data,cls,proto){var identifier=data.identifier||data.idgen,superIdent=proto.identifier||cls.schema._defaultIdentifier,generatorPrefix;if(data.idgen){Ext.log.warn('Ext.data.Model: idgen has been deprecated. Please use '+'identifier instead.')}
if(identifier){delete data.identifier;delete data.idgen;identifier=Ext.Factory.dataIdentifier(identifier)}else if(superIdent){if(superIdent.clone&&!superIdent.getId()){identifier=superIdent.clone()}else if(superIdent.isGenerator){identifier=superIdent}else{identifier=Ext.Factory.dataIdentifier(superIdent)}}
cls.identifier=proto.identifier=identifier;if(!identifier){generatorPrefix=cls.entityName;if(!generatorPrefix){generatorPrefix=Ext.id(null,'extModel')}
cls.identifier=Ext.Factory.dataIdentifier({type:'sequential',prefix:generatorPrefix+'-'})}},findValidator:function(validators,name,cfg){var type=cfg.type||cfg,field=validators[name],len,i,item;if(field){for(i=0,len=field.length;i<len;++i){item=field[i];if(item.type===type){return item}}}
return null},makeInitializeFn:function(cls){var code=['var '],body=['\nreturn function (e) {\n    var data = e.data, v;\n'],work=0,bc,ec,convert,expr,factory,field,fields,fs,hasDefValue,i,length;if(!(fields=cls.rankedFields)){fields=cls.rankFields()}
for(i=0,length=fields.length;i<length;++i){field=fields[i];fs='f'+i;convert=field.convert;if(i){code.push(',  \n    ')}
code.push(fs,' = $fields['+i+']');code.push('  /*  ',field.name,'  */');if((hasDefValue=(field.defaultValue!==undefined))||convert){expr='data["'+field.name+'"]';++work;bc=ec='';if(field.cloneDefaultValue){bc='Ext.clone(';ec=')'}
body.push('\n');if(convert&&hasDefValue){body.push('    v = ',expr,';\n'+'    if (v !== undefined) {\n'+'        v = ',fs,'.convert(v, e);\n'+'    }\n'+'    if (v === undefined) {\n'+'        v = ',bc,fs,'.defaultValue',ec,';\n'+'    }\n'+'    ',expr,' = v;')}else if(convert){body.push('    v = ',fs,'.convert(',expr,',e);\n'+'    if (v !== undefined) {\n'+'        ',expr,' = v;\n'+'    }\n')}else if(hasDefValue){body.push('    if (',expr,' === undefined) {\n'+'        ',expr,' = ',bc,fs,'.defaultValue',ec,';\n'+'    }\n')}}}
if(!work){return Ext.emptyFn}
code.push(';\n');code.push.apply(code,body);code.push('}');code=code.join('');factory=new Function('$fields','Ext',code);return factory(fields,Ext)}}}},function(){var Model=this,proto=Model.prototype,Schema=Ext.data.schema.Schema,defaultSchema;Model.proxyConfig=proto.proxy;delete proto.proxy;Model.fields=[];Model.fieldsMap=proto.fieldsMap={};Model.schema=proto.schema=Schema.get(proto.schema);proto.idField=new Ext.data.field.Field(proto.idProperty);Model.identifier=new Ext.data.identifier.Sequential();Model.onExtended(function(cls,data){var proto=cls.prototype,schemaName=data.schema,superCls=proto.superclass.self,schema,entityName,proxy;cls.idProperty=data.idProperty||proto.idProperty;if(schemaName){delete data.schema;schema=Schema.get(schemaName)}else if(!(schema=proto.schema)){schema=defaultSchema||(defaultSchema=Schema.get('default'))}
cls.rankFields=Model.rankFields;cls.topoAdd=Model.topoAdd;proto.schema=cls.schema=schema;if(!(entityName=data.entityName)){proto.entityName=entityName=schema.getEntityName(cls);if(!entityName){if(data.associations){Ext.raise('Anonymous entities cannot specify "associations"')}
if(data.belongsTo){Ext.raise('Anonymous entities cannot specify "belongsTo"')}
if(data.hasMany){Ext.raise('Anonymous entities cannot specify "hasMany"')}
if(data.hasOne){Ext.raise('Anonymous entities cannot specify "hasOne"')}
if(data.matrices){Ext.raise('Anonymous entities cannot specify "manyToMany"')}}}
cls.entityName=entityName;cls.fieldExtractors={};Model.initIdentifier(data,cls,proto);Model.initFields(data,cls,proto);Model.initValidators(data,cls,proto);if(!data.isSummaryModel){Model.initSummaries(data,cls,proto)}
cls.fields.items=cls.fields;if(entityName){schema.addEntity(cls);Model.initAssociations(schema,data,cls)}
proxy=data.proxy;if(proxy){delete data.proxy}else if(superCls!==Model){proxy=superCls.proxyConfig||superCls.proxy}
cls.proxyConfig=proxy})})
;
Ext.define('Ext.data.ResultSet',{isResultSet:!0,$configPrefixed:!1,config:{loaded:!0,count:null,total:null,remoteTotal:null,success:!1,records:null,message:null,metadata:null,groupData:null,summaryData:null},constructor:function(config){this.initConfig(config)},getCount:function(){var count=this.callParent(),records;if(!count){records=this.getRecords();if(records){count=records.length}}
return count}})
;
Ext.define('Ext.data.reader.Reader',{alternateClassName:['Ext.data.Reader','Ext.data.DataReader'],requires:['Ext.data.ResultSet','Ext.XTemplate','Ext.util.LruCache'],mixins:['Ext.mixin.Observable','Ext.mixin.Factoryable'],alias:'reader.base',factoryConfig:{defaultType:null},config:{groupRootProperty:'',implicitIncludes:!0,keepRawData:null,messageProperty:'',model:null,proxy:null,readRecordsOnFailure:!0,rootProperty:'',successProperty:'success',summaryRootProperty:'',totalProperty:'total',transform:null,typeProperty:''},isReader:!0,constructor:function(config){var me=this;if(config&&config.hasOwnProperty('root')){config=Ext.apply({},config);config.rootProperty=config.root;delete config.root;Ext.log.error('Ext.data.reader.Reader: Using the deprecated "root" configuration. '+'Use "rootProperty" instead.')}
me.duringInit=1;me.mixins.observable.constructor.call(me,config);--me.duringInit;me.buildExtractors()},forceBuildExtractors:function(){if(!this.duringInit){this.buildExtractors(!0)}},updateGroupRootProperty:function(){this.forceBuildExtractors()},updateMessageProperty:function(){this.forceBuildExtractors()},applyModel:function(model){return Ext.data.schema.Schema.lookupEntity(model)},updateSuccessProperty:function(){this.forceBuildExtractors()},updateTotalProperty:function(){this.forceBuildExtractors()},applyTransform:function(transform){if(transform){if(Ext.isFunction(transform)){transform={fn:transform}}else if(transform.charAt){transform={fn:this[transform]}}
return transform.fn.bind(transform.scope||this)}
return transform},read:function(response,readOptions){var data,result,responseText;if(response){responseText=response.responseText;if(response.responseType||responseText){result=this.getResponseData(response);if(result&&result.__$isError){return new Ext.data.ResultSet({total:0,count:0,records:[],success:!1,message:result.msg})}else{data=this.readRecords(result,readOptions)}}else if(responseText!==''){data=this.readRecords(response,readOptions)}}
return data||this.nullResultSet},getNullResultSet:function(){return this.nullResultSet},createReadError:function(msg){return{__$isError:!0,msg:msg}},readRecords:function(data,readOptions,internalReadOptions){var me=this,recordsOnly=internalReadOptions&&internalReadOptions.recordsOnly,asRoot=internalReadOptions&&internalReadOptions.asRoot,groupData=null,summaryData=null,success,recordCount,records,root,remoteTotal,total,value,message,transform,meta,summaryOptions;meta=me.getMeta?me.getMeta(data):data.metaData;if(meta){me.onMetaChange(meta)}
transform=me.getTransform();if(transform){data=transform(data)}
me.buildExtractors();if(me.getKeepRawData()){me.rawData=data}
if(me.hasListeners.rawdata){me.fireEventArgs('rawdata',[data])}
data=me.getData(data);success=!0;recordCount=0;records=[];if(me.getSuccessProperty()){value=me.getSuccess(data);if(value===!1||value==='false'){success=!1}}
if(me.getMessageProperty()){message=me.getMessage(data)}
if(success||me.getReadRecordsOnFailure()){root=(asRoot||Ext.isArray(data))?data:me.getRoot(data);if(root){total=root.length}
if(me.getTotalProperty()){value=parseInt(me.getTotal(data),10);if(!isNaN(value)){remoteTotal=total=value}}
if(root){records=me.extractData(root,readOptions);recordCount=records.length}
if(me.getGroupRootProperty()){root=me.getGroupRoot(data);if(root){summaryOptions={includes:!1,model:me.getModel().getSummaryModel()};groupData=me.extractData(root,summaryOptions)||null}}
if(me.getSummaryRootProperty()){root=me.getSummaryRoot(data);if(root){summaryOptions=summaryOptions||{includes:!1,model:me.getModel().getSummaryModel()};summaryData=me.extractData(root,summaryOptions)||null;if(summaryData){summaryData=summaryData[0]}}}}
return recordsOnly?records:new Ext.data.ResultSet({total:total||recordCount,remoteTotal:remoteTotal,metadata:meta,count:recordCount,records:records,success:success,message:message,groupData:groupData,summaryData:summaryData})},extractData:function(root,readOptions){var me=this,entityType=readOptions&&readOptions.model?Ext.data.schema.Schema.lookupEntity(readOptions.model):me.getModel(),schema=entityType.schema,includes=readOptions&&'includes' in readOptions?readOptions.includes:schema.hasAssociations(entityType)&&me.getImplicitIncludes(),fieldExtractorInfo=me.getFieldExtractorInfo(entityType),length=root.length,records=new Array(length),typeProperty=me.getTypeProperty(),reader,node,nodeType,record,i;if(!length&&Ext.isObject(root)){root=[root];length=1}
for(i=0;i<length;i++){record=root[i];if(!record.isModel){node=record;if(typeProperty&&(nodeType=me.getChildType(schema,node,typeProperty))){reader=nodeType.getProxy().getReader();record=reader.extractRecord(node,readOptions,nodeType,schema.hasAssociations(nodeType)&&reader.getImplicitIncludes(),reader.getFieldExtractorInfo(nodeType))}else{record=me.extractRecord(node,readOptions,entityType,includes,fieldExtractorInfo)}
if(record.isModel&&record.isNode){record.raw=node}}
if(record.onLoad){record.onLoad()}
records[i]=record}
return records},getChildType:function(schema,rawNode,typeProperty){var namespace;switch(typeof typeProperty){case 'string':return schema.getEntity(rawNode[typeProperty]);case 'object':namespace=typeProperty.namespace;return schema.getEntity((namespace?namespace+'.':'')+rawNode[typeProperty.name]);case 'function':return schema.getEntity(typeProperty(rawNode))}},extractRecordData:function(node,readOptions){var entityType=readOptions&&readOptions.model?Ext.data.schema.Schema.lookupEntity(readOptions.model):this.getModel(),fieldExtractorInfo=this.getFieldExtractorInfo(entityType);return this.extractRecord(node,readOptions,entityType,!1,fieldExtractorInfo)},extractRecord:function(node,readOptions,entityType,includes,fieldExtractorInfo){var me=this,creatorFn=(readOptions&&readOptions.recordCreator)||me.defaultRecordCreator,modelData,record;modelData=me.extractModelData(node,fieldExtractorInfo);record=creatorFn.call(me,modelData,entityType||me.getModel(),readOptions);if(includes&&record.isModel){me.readAssociated(record,node,readOptions)}
return record},getFieldExtractorInfo:function(entityType){var extractors=entityType.fieldExtractors,type,extractor;if(!extractors){return}
type=this.$className;extractor=extractors[type];if(extractor===undefined){extractors[type]=extractor=this.buildFieldExtractors(entityType)}
return extractor},buildFieldExtractors:function(entityType){var fields=entityType.getFields(),len=fields.length,buffer=[],extractors=[],out=null,cnt=0,field,name,i,extractor;for(i=0;i<len;++i){field=fields[i];extractor=this.createFieldAccessor(field);if(extractor){name=field.name;buffer.push('val = extractors['+cnt+'](raw, self); if (val !== undefined) { data[\''+name+'\'] = val; }');extractors.push(extractor);++cnt}}
if(buffer.length){out={extractors:extractors,fn:new Function('raw','data','extractors','self','var val;'+buffer.join('\n'))}}
return out},defaultRecordCreator:function(data,Model){return new Model(data)},defaultRecordCreatorFromServer:function(data,Model){var record=new Model(data);record.phantom=!1;return record},getModelData:function(raw){return{}},extractModelData:function(raw,fieldExtractorInfo){var data=this.getModelData(raw),fn;if(fieldExtractorInfo){fn=fieldExtractorInfo.fn;fn(raw,data,fieldExtractorInfo.extractors,this)}
return data},readAssociated:function(record,data,readOptions){var roles=record.associations,key,role;for(key in roles){if(roles.hasOwnProperty(key)){role=roles[key];if(role.cls){role.read(record,data,this,readOptions)}}}},getData:Ext.identityFn,getRoot:Ext.identityFn,getResponseData:function(response){Ext.raise("getResponseData must be implemented in the Ext.data.reader.Reader subclass")},onMetaChange:function(meta){var me=this,fields=meta.fields,model,newModel,clientIdProperty,proxy;me.metaData=meta;if(meta.root){me.setRootProperty(meta.root)}
if(meta.totalProperty){me.setTotalProperty(meta.totalProperty)}
if(meta.successProperty){me.setSuccessProperty(meta.successProperty)}
if(meta.messageProperty){me.setMessageProperty(meta.messageProperty)}
clientIdProperty=meta.clientIdProperty;if(fields){newModel=Ext.define(null,{extend:'Ext.data.Model',fields:fields,clientIdProperty:clientIdProperty});me.setModel(newModel);proxy=me.getProxy();if(proxy){proxy.setModel(newModel)}}else if(clientIdProperty){model=me.getModel();if(model){model.self.prototype.clientIdProperty=clientIdProperty}}},buildExtractors:function(force){var me=this,totalProp,successProp,messageProp;if(force||!me.hasExtractors){totalProp=me.getTotalProperty();successProp=me.getSuccessProperty();messageProp=me.getMessageProperty();if(totalProp){me.getTotal=me.getAccessor(totalProp)}
if(successProp){me.getSuccess=me.getAccessor(successProp)}
if(messageProp){me.getMessage=me.getAccessor(messageProp)}
me.hasExtractors=!0;return!0}},getAccessor:function(prop){var me=this,cache=me.extractorCache,ret,key;if(typeof prop==='string'){key=me.getAccessorKey(prop);if(key){ret=cache.get(key)}
if(!ret){ret=me.createAccessor(prop);if(key){cache.add(key,ret)}}}else{ret=me.createAccessor(prop)}
return ret},getAccessorKey:function(prop){var className=this.$className;return className?className+prop:''},createAccessor:Ext.emptyFn,createFieldAccessor:Ext.emptyFn,destroy:function(){var me=this;me.model=me.getTotal=me.getSuccess=me.getMessage=me.rawData=null;me.onMetaChange=null;me.transform=null;me.callParent()},privates:{copyFrom:function(reader){var me=this;reader.buildExtractors();me.getTotal=reader.getTotal;me.getSuccess=reader.getSuccess;me.getMessage=reader.getMessage;++me.duringInit;me.setConfig(reader.getConfig());--me.duringInit;me.hasExtractors=!0},getGroupRoot:Ext.privateFn,getSummaryRoot:Ext.privateFn}},function(Cls){var proto=Cls.prototype;Ext.apply(proto,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:!0,message:''})});proto.extractorCache=new Ext.util.LruCache()})
;
Ext.define('Ext.data.writer.Writer',{alias:'writer.base',alternateClassName:['Ext.data.DataWriter','Ext.data.Writer'],mixins:['Ext.mixin.Factoryable'],factoryConfig:{defaultType:null},isWriter:!0,config:{clientIdProperty:null,allDataOptions:{persist:!0},partialDataOptions:{changes:!0,critical:!0},writeAllFields:!1,dateFormat:null,nameProperty:'name',writeRecordId:!0,transform:null},constructor:function(config){this.initConfig(config)},applyTransform:function(transform){if(transform){if(Ext.isFunction(transform)){transform={fn:transform}}
return transform.fn.bind(transform.scope||this)}
return transform},write:function(request){var operation=request.getOperation(),records=operation.getRecords()||[],len=records.length,data=[],i;for(i=0;i<len;i++){data.push(this.getRecordData(records[i],operation))}
return this.writeRecords(request,data)},writeRecords:Ext.emptyFn,getRecordData:function(record,operation){var me=this,nameProperty=me.getNameProperty(),mapping=nameProperty!=='name',idField=record.self.idField,key=idField?(idField[nameProperty]||idField.name):'id',value=record.id,writeAll=me.getWriteAllFields(),ret,dateFormat,phantom,options,clientIdProperty,fieldsMap,data,field;if(idField&&idField.serialize){value=idField.serialize(value)}
if(!writeAll&&operation&&operation.isDestroyOperation){ret={};ret[key]=value}else{dateFormat=me.getDateFormat();phantom=record.phantom;options=(phantom||writeAll)?me.getAllDataOptions():me.getPartialDataOptions();clientIdProperty=phantom&&me.getClientIdProperty();fieldsMap=record.getFieldsMap();options.serialize=!1;data=record.getData(options);ret=mapping?{}:data;if(clientIdProperty){ret[clientIdProperty]=value;delete data[key]}else if(!me.getWriteRecordId()){delete data[key]}
for(key in data){value=data[key];if(!(field=fieldsMap[key])){if(mapping){ret[key]=value}}else{if(field.isDateField&&dateFormat&&Ext.isDate(value)){value=Ext.Date.format(value,dateFormat)}else if(field.serialize){value=field.serialize(value,record)}
if(mapping){key=field[nameProperty]||key}
ret[key]=value}}}
return ret}})
;
Ext.define('Ext.data.proxy.Proxy',{mixins:['Ext.mixin.Factoryable','Ext.mixin.Observable'],$configPrefixed:!1,alias:'proxy.proxy',alternateClassName:['Ext.data.DataProxy','Ext.data.Proxy'],requires:['Ext.data.schema.Schema','Ext.data.reader.Reader','Ext.data.writer.Writer'],uses:['Ext.data.Batch','Ext.data.operation.*','Ext.data.Model'],config:{batchOrder:'create,update,destroy',batchActions:!0,model:undefined,reader:{type:'json'},writer:{type:'json'}},isProxy:!0,isSynchronous:!1,constructor:function(config){this.mixins.observable.constructor.call(this,config);this.pendingOperations={}},applyModel:function(model){return Ext.data.schema.Schema.lookupEntity(model)},updateModel:function(model){var reader;if(model){reader=this.getReader();if(reader&&!reader.getModel()){reader.setModel(model)}}},applyReader:function(reader){if(this.isSynchronous){reader=reader||{};reader.keepRawData=!0}
return Ext.Factory.reader(reader)},updateReader:function(reader){var me=this,model;if(reader){model=me.getModel();if(!model){model=reader.getModel();if(model){me.setModel(model)}}else{reader.setModel(model)}
if(reader.responseType!=null){me.responseType=reader.responseType}}},applyWriter:function(writer){var reader=this.getReader();writer=Ext.Factory.writer(writer);if(writer.getRecord&&!writer.getRecord()&&reader&&reader.getRecord){reader=reader.getRecord();if(reader){writer.setRecord(reader)}}
return writer},abort:Ext.emptyFn,onMetaChange:function(meta){this.fireEvent('metachange',this,meta)},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,erase:Ext.emptyFn,batch:function(options,listeners){var me=this,useBatch=me.getBatchActions(),batch,records,actions,aLen,action,a,r,rLen,record;if(options.operations===undefined){options={operations:options,listeners:listeners}}
if(options.batch){if(Ext.isDefined(options.batch.runOperation)){batch=Ext.applyIf(options.batch,{proxy:me,listeners:{}})}}else{options.batch={proxy:me,listeners:options.listeners||{}}}
if(!batch){batch=new Ext.data.Batch(options.batch)}
batch.on('complete',Ext.bind(me.onBatchComplete,me,[options],0),null,{single:!0,priority:1000});batch.$destroyOwner=options.$destroyOwner;actions=me.getBatchOrder().split(',');aLen=actions.length;for(a=0;a<aLen;a++){action=actions[a];records=options.operations[action];if(records){if(useBatch){batch.add(me.createOperation(action,{records:records,params:options.params}))}else{rLen=records.length;for(r=0;r<rLen;r++){record=records[r];batch.add(me.createOperation(action,{records:[record],params:options.params}))}}}}
batch.start();return batch},onBatchComplete:function(batchOptions,batch){var scope=batchOptions.scope||this;if(batch.hasException()){if(Ext.isFunction(batchOptions.failure)){Ext.callback(batchOptions.failure,scope,[batch,batchOptions])}}else if(Ext.isFunction(batchOptions.success)){Ext.callback(batchOptions.success,scope,[batch,batchOptions])}
if(Ext.isFunction(batchOptions.callback)){Ext.callback(batchOptions.callback,scope,[batch,batchOptions])}
if(!batch.$destroyOwner){batch.destroy()}},createOperation:function(action,config){var operation=Ext.createByAlias('data.operation.'+action,config);operation.setProxy(this);this.pendingOperations[operation._internalId]=operation;return operation},completeOperation:function(operation){delete this.pendingOperations[operation._internalId]},clone:function(){return new this.self(this.getInitialConfig())},destroy:function(){var ops=this.pendingOperations,opId,op;for(opId in ops){op=ops[opId];if(op&&op.isRunning()){op.abort()}
op.destroy()}
this.pendingOperations=null;this.callParent()}})
;
Ext.define('Ext.data.proxy.Client',{extend:'Ext.data.proxy.Proxy',alternateClassName:'Ext.data.ClientProxy',isSynchronous:!0,clear:function(){Ext.raise("The Ext.data.proxy.Client subclass that you are using has not defined "+"a 'clear' function. See src/data/ClientProxy.js for details.")}})
;
Ext.define('Ext.data.proxy.Memory',{extend:'Ext.data.proxy.Client',alias:'proxy.memory',alternateClassName:'Ext.data.MemoryProxy',isMemoryProxy:!0,config:{enablePaging:null,data:{$value:null,merge:function(newValue,currentValue,target,mixinClass){return newValue?Ext.clone(newValue):newValue}},clearOnRead:null},finishOperation:function(operation){var recs=operation.getRecords(),len=recs.length,i;for(i=0;i<len;i++){recs[i].dropped=!!operation.isDestroyOperation;recs[i].commit()}
operation.setSuccessful(!0)},create:function(operation){this.finishOperation(operation)},update:function(operation){this.finishOperation(operation)},erase:function(operation){this.finishOperation(operation)},read:function(operation){var me=this,reader=me.getReader(),resultSet=reader.read(me.getData(),{recordCreator:reader.defaultRecordCreatorFromServer}),records=resultSet.getRecords(),sorters=operation.getSorters(),grouper=operation.getGrouper(),filters=operation.getFilters(),start=operation.getStart(),limit=operation.getLimit(),meta;if(operation.process(resultSet,null,null,!1)!==!1){if(operation.success&&me.getClearOnRead()){this.setData(null)}
if(filters&&filters.length){resultSet.setRecords(records=Ext.Array.filter(records,Ext.util.Filter.createFilterFn(filters)));resultSet.setTotal(records.length)}
if(grouper){sorters=sorters?sorters.concat(grouper):sorters}
if(sorters&&sorters.length){resultSet.setRecords(records=Ext.Array.sort(records,Ext.util.Sortable.createComparator(sorters)))}
if(me.getEnablePaging()&&start!==undefined&&limit!==undefined){if(start>=resultSet.getTotal()){resultSet.setConfig({success:!1,records:[],total:0})}else{resultSet.setRecords(Ext.Array.slice(records,start,start+limit))}}
operation.setCompleted();meta=resultSet.getMetadata();if(meta){me.onMetaChange(meta)}}},clear:Ext.emptyFn})
;
Ext.define('Ext.data.ProxyStore',{extend:'Ext.data.AbstractStore',requires:['Ext.data.Model','Ext.data.proxy.Proxy','Ext.data.proxy.Memory','Ext.data.operation.*'],config:{model:undefined,fields:null,proxy:undefined,autoLoad:undefined,autoSync:!1,batchUpdateMode:'operation',sortOnLoad:!0,trackRemoved:!0,asynchronousLoad:undefined},onClassExtended:function(cls,data,hooks){var model=data.model,onBeforeClassCreated;if(typeof model==='string'){onBeforeClassCreated=hooks.onBeforeCreated;hooks.onBeforeCreated=function(){var me=this,args=arguments;Ext.require(model,function(){onBeforeClassCreated.apply(me,args)})}}},implicitModel:'Ext.data.Model',autoSyncSuspended:0,removed:null,constructor:function(config){var me=this;var configModel=me.model;me.callParent(arguments);if(me.getAsynchronousLoad()===!1){me.flushLoad()}
if(!me.getModel()&&me.useModelWarning!==!1&&me.getStoreId()!=='ext-empty-store'){var logMsg=[Ext.getClassName(me)||'Store',' created with no model.'];if(typeof configModel==='string'){logMsg.push(" The name '",configModel,"'",' does not correspond to a valid model.')}
Ext.log.warn(logMsg.join(''))}},doDestroy:function(){var me=this,proxy=me.getProxy();me.clearLoadTask();Ext.destroy(me.getData());me.data=null;me.setProxy(null);if(proxy.autoCreated){proxy.destroy()}
me.setModel(null);me.callParent()},applyAsynchronousLoad:function(asynchronousLoad){if(asynchronousLoad==null){asynchronousLoad=!this.loadsSynchronously()}
return asynchronousLoad},updateAutoLoad:function(autoLoad){this.getData();if(autoLoad){this.load(Ext.isObject(autoLoad)?autoLoad:undefined)}},getTotalCount:function(){return this.totalCount||0},applyFields:function(fields){if(fields){this.createImplicitModel(fields)}},applyModel:function(model){if(model){model=Ext.data.schema.Schema.lookupEntity(model)}else if(!this.destroying){this.getFields();model=this.getModel()||this.createImplicitModel()}
return model},applyProxy:function(proxy){var model=this.getModel();if(proxy!==null){if(proxy){if(proxy.isProxy){proxy.setModel(model)}else{if(Ext.isString(proxy)){proxy={type:proxy,model:model}}else if(!proxy.model){proxy=Ext.apply({model:model},proxy)}
proxy=Ext.createByAlias('proxy.'+proxy.type,proxy);proxy.autoCreated=!0}}else if(model){proxy=model.getProxy();this.useModelProxy=!0}
if(!proxy){proxy=Ext.createByAlias('proxy.memory');proxy.autoCreated=!0}}
return proxy},applyState:function(state){var me=this;me.callParent([state]);if(me.getAutoLoad()||me.isLoaded()){me.load()}},updateProxy:function(proxy,oldProxy){this.proxyListeners=Ext.destroy(this.proxyListeners)},updateTrackRemoved:function(track){this.cleanRemoved();this.removed=track?[]:null},onMetaChange:function(proxy,meta){this.fireEvent('metachange',this,meta)},create:function(data,options){var me=this,Model=me.getModel(),instance=new Model(data),operation;options=Ext.apply({},options);if(!options.records){options.records=[instance]}
options.internalScope=me;options.internalCallback=me.onProxyWrite;operation=me.createOperation('create',options);return operation.execute()},read:function(){return this.load.apply(this,arguments)},update:function(options){var me=this,operation;options=Ext.apply({},options);if(!options.records){options.records=me.getUpdatedRecords()}
options.internalScope=me;options.internalCallback=me.onProxyWrite;operation=me.createOperation('update',options);return operation.execute()},onProxyWrite:function(operation){var me=this,success=operation.wasSuccessful(),records=operation.getRecords();switch(operation.getAction()){case 'create':me.onCreateRecords(records,operation,success);break;case 'update':me.onUpdateRecords(records,operation,success);break;case 'destroy':me.onDestroyRecords(records,operation,success);break}
if(success){me.fireEvent('write',me,operation);me.fireEvent('datachanged',me)}},onCreateRecords:Ext.emptyFn,onUpdateRecords:Ext.emptyFn,onDestroyRecords:function(records,operation,success){if(success){this.cleanRemoved()}},erase:function(options){var me=this,operation;options=Ext.apply({},options);if(!options.records){options.records=me.getRemovedRecords()}
options.internalScope=me;options.internalCallback=me.onProxyWrite;operation=me.createOperation('destroy',options);return operation.execute()},onBatchOperationComplete:function(batch,operation){return this.onProxyWrite(operation)},onBatchComplete:function(batch,operation){var me=this,operations=batch.operations,length=operations.length,i;if(me.batchUpdateMode!=='operation'){me.suspendEvents();for(i=0;i<length;i++){me.onProxyWrite(operations[i])}
me.resumeEvents()}
me.isSyncing=!1;if(batch.$destroyOwner===me){batch.destroy()}
me.fireEvent('datachanged',me)},onBatchException:function(batch,operation){},filterNew:function(item){return item.phantom&&item.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},getModifiedRecords:function(){return[].concat(this.getNewRecords(),this.getUpdatedRecords())},filterUpdated:function(item){return item.dirty&&!item.phantom&&item.isValid()},getRemovedRecords:function(){var removed=this.getRawRemovedRecords();return removed?Ext.Array.clone(removed):[]},sync:function(options){var me=this,operations={},toCreate=me.getNewRecords(),toUpdate=me.getUpdatedRecords(),toDestroy=me.getRemovedRecords(),needsSync=!1;if(me.isSyncing){Ext.log.warn('Sync called while a sync operation is in progress. '+'Consider configuring autoSync as false.')}
me.needsSync=!1;if(toCreate.length>0){operations.create=toCreate;needsSync=!0}
if(toUpdate.length>0){operations.update=toUpdate;needsSync=!0}
if(toDestroy.length>0){operations.destroy=toDestroy;needsSync=!0}
if(needsSync&&me.fireEvent('beforesync',operations)!==!1){me.isSyncing=!0;options=options||{};me.proxy.batch(Ext.apply(options,{operations:operations,listeners:me.getBatchListeners(),$destroyOwner:me}))}
return me},getBatchListeners:function(){var me=this,listeners={scope:me,exception:me.onBatchException,complete:me.onBatchComplete};if(me.batchUpdateMode==='operation'){listeners.operationcomplete=me.onBatchOperationComplete}
return listeners},save:function(){return this.sync.apply(this,arguments)},load:function(options){var me=this;if(typeof options==='function'){options={callback:options}}else{options=options?Ext.Object.chain(options):{}}
me.pendingLoadOptions=options;if(me.getAsynchronousLoad()){if(!me.loadTimer){me.loadTimer=Ext.asap(me.flushLoad,me)}}else{me.flushLoad()}
return me},flushLoad:function(){var me=this,options=me.pendingLoadOptions,operation;if(me.destroying||me.destroyed){return}
me.clearLoadTask();if(!options){return}
me.setLoadOptions(options);if(me.getRemoteSort()&&options.sorters){me.fireEvent('beforesort',me,options.sorters)}
operation=Ext.apply({internalScope:me,internalCallback:me.onProxyLoad,scope:me},options);me.lastOptions=operation;operation=me.createOperation('read',operation);if(me.fireEvent('beforeload',me,operation)!==!1){me.onBeforeLoad(operation);me.loading=!0;if(me.hasListeners.beginload){me.fireEvent('beginload',me,operation)}
operation.execute()}else{if(me.getAsynchronousLoad()){operation.abort()}
operation.setCompleted()}},reload:function(options){return this.load(Ext.apply({},options,this.lastOptions))},onEndUpdate:function(){var me=this;if(me.needsSync&&me.autoSync&&!me.autoSyncSuspended){me.sync()}},afterReject:function(record){var me=this;if(me.contains(record)){me.onUpdate(record,Ext.data.Model.REJECT,null);me.fireEvent('update',me,record,Ext.data.Model.REJECT,null);me.fireEvent('datachanged',me)}},afterCommit:function(record,modifiedFieldNames){var me=this;if(!modifiedFieldNames){modifiedFieldNames=null}
if(me.contains(record)){me.onUpdate(record,Ext.data.Model.COMMIT,modifiedFieldNames);me.fireEvent('update',me,record,Ext.data.Model.COMMIT,modifiedFieldNames);me.fireEvent('datachanged',me)}},afterErase:function(record){this.onErase(record)},onErase:Ext.emptyFn,onUpdate:Ext.emptyFn,hasPendingLoad:function(){return!!this.pendingLoadOptions||this.isLoading()},isLoading:function(){return!!this.loading},isLoaded:function(){return this.loadCount>0},suspendAutoSync:function(){++this.autoSyncSuspended},resumeAutoSync:function(syncNow){var me=this;if(!me.autoSyncSuspended){Ext.log.warn('Mismatched call to resumeAutoSync - auto synchronization '+'is currently not suspended.')}
if(me.autoSyncSuspended&&!--me.autoSyncSuspended){if(syncNow){me.sync()}}},removeAll:Ext.emptyFn,clearData:Ext.emptyFn,privates:{getRawRemovedRecords:function(){return this.removed},onExtraParamsChanged:function(){},clearLoadTask:function(){this.pendingLoadOptions=this.loadTimer=Ext.unasap(this.loadTimer)},cleanRemoved:function(){var removed=this.getRawRemovedRecords(),len,i;if(removed){for(i=0,len=removed.length;i<len;++i){removed[i].unjoin(this)}
removed.length=0}},createOperation:function(type,options){var me=this,proxy=me.getProxy(),listeners;if(!me.proxyListeners){listeners={scope:me,destroyable:!0,beginprocessresponse:me.beginUpdate,endprocessresponse:me.endUpdate};if(!me.disableMetaChangeEvent){listeners.metachange=me.onMetaChange}
me.proxyListeners=proxy.on(listeners)}
return proxy.createOperation(type,options)},createImplicitModel:function(fields){var me=this,modelCfg={extend:me.implicitModel,statics:{defaultProxy:'memory'}},proxy,model;if(fields){modelCfg.fields=fields}
model=Ext.define(null,modelCfg);me.setModel(model);proxy=me.getProxy();if(proxy){model.setProxy(proxy)}else{me.setProxy(model.getProxy())}},loadsSynchronously:function(){return this.getProxy().isSynchronous},onBeforeLoad:Ext.privateFn,removeFromRemoved:function(record){var removed=this.getRawRemovedRecords();if(removed){Ext.Array.remove(removed,record);record.unjoin(this)}},setLoadOptions:function(options){var me=this,filters,sorters;if(me.getRemoteFilter()){filters=me.getFilters(!1);if(filters&&filters.getCount()){options.filters=filters.getRange()}}
if(me.getRemoteSort()){sorters=me.getSorters(!1);if(sorters&&sorters.getCount()){options.sorters=sorters.getRange()}}}}})
;
Ext.define('Ext.util.Group',{extend:'Ext.util.Collection',isGroup:!0,config:{groupKey:null},$endUpdatePriority:2001,manageSorters:!1})
;
Ext.define('Ext.data.Group',{extend:'Ext.util.Group',isDataGroup:!0,store:null,getSummaryRecord:function(){var me=this,summaryRecord=me.summaryRecord,store=me.store,generation=store.getData().generation,M,T;if(!summaryRecord){M=store.getModel();T=M.getSummaryModel();me.summaryRecord=summaryRecord=new T()}
if(!summaryRecord.isRemote&&summaryRecord.summaryGeneration!==generation){summaryRecord.calculateSummary(me.items);summaryRecord.summaryGeneration=generation}
return summaryRecord}})
;
Ext.define('Ext.data.LocalStore',{extend:'Ext.Mixin',requires:['Ext.data.Group'],mixinConfig:{id:'localstore',after:{fireGroupChangeEvent:'onGrouperChange'}},config:{extraKeys:null},applyExtraKeys:function(extraKeys){var indexName,data=this.getData();data.setExtraKeys(extraKeys);extraKeys=data.getExtraKeys();for(indexName in extraKeys){this[indexName]=extraKeys[indexName]}},add:function(record){return this.insert(this.getCount(),arguments.length===1?record:arguments)},constructDataCollection:function(){var result=new Ext.util.Collection({id:this.getId()+'-data',rootProperty:'data',groupConfig:{xclass:'Ext.data.Group',store:this}});result.addObserver(this);return result},createModel:function(record){var session=this.getSession(),Model;if(!record.isModel){Model=this.getModel();record=new Model(record,session)}
return record},createFiltersCollection:function(){return this.getData().getFilters()},createSortersCollection:function(){var sorters=this.getData().getSorters();sorters.setSorterConfigure(this.addFieldTransform,this);return sorters},getSummaryRecord:function(){var me=this,summaryRecord=me.summaryRecord,data=me.getData(),generation=data.generation,T;if(!summaryRecord){T=me.getModel().getSummaryModel();me.summaryRecord=summaryRecord=new T()}
if(!summaryRecord.isRemote&&summaryRecord.summaryGeneration!==generation){summaryRecord.calculateSummary(data.items);summaryRecord.summaryGeneration=generation}
return summaryRecord},onCollectionBeginUpdate:function(){this.beginUpdate()},onCollectionEndUpdate:function(){this.endUpdate()},onCollectionSort:function(){this.onSorterEndUpdate()},onCollectionFilter:function(){this.onFilterEndUpdate()},onGrouperChange:function(grouper){this.callObservers('GrouperChange',[grouper])},notifySorterChange:function(){this.getData().onSorterChange()},forceLocalSort:function(){var sorters=this.getSorters();sorters.beginUpdate();sorters.endUpdate()},contains:function(record){return this.indexOf(record)>-1},each:function(fn,scope,includeOptions){var data=this.getData(),bypassFilters=includeOptions,len,record,i;if(typeof includeOptions==='object'){bypassFilters=includeOptions.filtered}
if(bypassFilters&&data.filtered){data=data.getSource()}
data=data.items.slice(0);len=data.length;for(i=0;i<len;++i){record=data[i];if(fn.call(scope||record,record,i,len)===!1){break}}},collect:function(property,includeOptions,filtered){var me=this,allowNull=includeOptions,data=me.getData();if(typeof includeOptions==='object'){filtered=includeOptions.filtered;allowNull=includeOptions.allowNull}
if(filtered&&data.filtered){data=data.getSource()}
return data.collect(property,'data',allowNull)},getById:function(id){var data=this.getData();if(data.filtered){data=data.getSource()}
return data.get(id)||null},getByInternalId:function(internalId){var data=this.getData(),keyCfg;if(data.filtered){if(!data.$hasExtraKeys){keyCfg=this.makeInternalKeyCfg();data.setExtraKeys(keyCfg);data.$hasExtraKeys=!0}
data=data.getSource()}
if(!data.$hasExtraKeys){data.setExtraKeys(keyCfg||this.makeInternalKeyCfg());data.$hasExtraKeys=!0}
return data.byInternalId.get(internalId)||null},getDataSource:function(){var data=this.getData();return data.getSource()||data},indexOf:function(record){return this.getData().indexOf(record)},indexOfId:function(id){return this.indexOf(this.getById(id))},insert:function(index,records){var me=this,len,i;if(records){if(!Ext.isIterable(records)){records=[records]}else{records=Ext.Array.clone(records)}
len=records.length}
if(!len){return[]}
for(i=0;i<len;++i){records[i]=me.createModel(records[i])}
me.getData().insert(index,records);return records},queryBy:function(fn,scope){var data=this.getData();return(data.getSource()||data).createFiltered(fn,scope)},query:function(property,value,anyMatch,caseSensitive,exactMatch){var data=this.getData();return(data.getSource()||data).createFiltered(property,value,anyMatch,caseSensitive,exactMatch)},first:function(grouped){return this.getData().first(grouped)||null},last:function(grouped){return this.getData().last(grouped)||null},sum:function(field,grouped){var data=this.getData();return(grouped&&this.isGrouped())?data.sumByGroup(field):data.sum(field)},count:function(grouped){var data=this.getData();return(grouped&&this.isGrouped())?data.countByGroup():data.count()},min:function(field,grouped){var data=this.getData();return(grouped&&this.isGrouped())?data.minByGroup(field):data.min(field)},max:function(field,grouped){var data=this.getData();return(grouped&&this.isGrouped())?data.maxByGroup(field):data.max(field)},average:function(field,grouped){var data=this.getData();return(grouped&&this.isGrouped())?data.averageByGroup(field):data.average(field)},aggregate:function(fn,scope,grouped,field){var me=this,groups,len,out,group,i;if(grouped&&me.isGrouped()){groups=me.getGroups().items;len=groups.length;out={};for(i=0;i<len;++i){group=groups[i];out[group.getGroupKey()]=me.getAggregate(fn,scope||me,group.items,field)}
return out}else{return me.getAggregate(fn,scope,me.getData().items,field)}},getAggregate:function(fn,scope,records,field){var values=[],len=records.length,i;for(i=0;i<len;++i){values[i]=records[i].get(field)}
return fn.call(scope||this,records,values)},addObserver:function(observer){var observers=this.observers;if(!observers){this.observers=observers=new Ext.util.Collection()}
observers.add(observer)},removeObserver:function(observer){var observers=this.observers;if(observers){observers.remove(observer)}},callObservers:function(action,args){var observers=this.observers,len,items,i,methodName,item;if(observers){items=observers.items;if(args){args.unshift(this)}else{args=[this]}
for(i=0,len=items.length;i<len;++i){item=items[i];methodName='onSource'+action;if(item[methodName]){item[methodName].apply(item,args)}}}},queryRecordsBy:function(fn,scope){var data=this.getData(),matches=[],len,i,record;data=(data.getSource()||data).items;scope=scope||this;for(i=0,len=data.length;i<len;++i){record=data[i];if(fn.call(scope,record)===!0){matches.push(record)}}
return matches},queryRecords:function(field,value){var data=this.getData(),matches=[],len,i,record;data=(data.getSource()||data).items;for(i=0,len=data.length;i<len;++i){record=data[i];if(record.get(field)===value){matches.push(record)}}
return matches},privates:{isLast:function(record){return record===this.last()},makeInternalKeyCfg:function(){return{byInternalId:{property:'internalId',rootProperty:''}}}}})
;
Ext.define('Ext.data.proxy.Server',{extend:'Ext.data.proxy.Proxy',alias:'proxy.server',alternateClassName:'Ext.data.ServerProxy',uses:['Ext.data.Request'],isRemote:!0,config:{url:'',pageParam:'page',startParam:'start',limitParam:'limit',groupParam:'group',groupDirectionParam:'groupDir',sortParam:'sort',filterParam:'filter',directionParam:'dir',idParam:'id',simpleSortMode:!1,simpleGroupMode:!1,noCache:!0,cacheString:"_dc",timeout:30000,api:{create:undefined,read:undefined,update:undefined,destroy:undefined},extraParams:{}},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},erase:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(name,value){var extraParams=this.getExtraParams();extraParams[name]=value;this.fireEvent('extraparamschanged',extraParams)},updateExtraParams:function(newExtraParams,oldExtraParams){this.fireEvent('extraparamschanged',newExtraParams)},buildRequest:function(operation){var me=this,initialParams=Ext.apply({},operation.getParams()),params=Ext.applyIf(initialParams,me.getExtraParams()||{}),request,operationId,idParam;Ext.applyIf(params,me.getParams(operation));operationId=operation.getId();idParam=me.getIdParam();if(operationId!==undefined&&params[idParam]===undefined){params[idParam]=operationId}
request=new Ext.data.Request({params:params,action:operation.getAction(),records:operation.getRecords(),url:operation.getUrl(),operation:operation,proxy:me});request.setUrl(me.buildUrl(request));operation.setRequest(request);return request},processResponse:function(success,operation,request,response){var me=this,exception,reader,resultSet,meta,destroyOp;if(me.destroying||me.destroyed){return}
me.fireEvent('beginprocessresponse',me,response,operation);if(success===!0){reader=me.getReader();if(response.status===204){resultSet=reader.getNullResultSet()}else{resultSet=reader.read(me.extractResponseData(response),{recordCreator:operation.getRecordCreator()||reader.defaultRecordCreatorFromServer})}
if(!operation.$destroyOwner){operation.$destroyOwner=me;destroyOp=!0}
operation.process(resultSet,request,response);exception=!operation.wasSuccessful()}else{me.setException(operation,response);exception=!0}
if(me.destroyed){if(!operation.destroyed&&destroyOp&&operation.$destroyOwner===me){operation.destroy()}
return}
if(exception){me.fireEvent('exception',me,response,operation)}else{meta=resultSet.getMetadata();if(meta){me.onMetaChange(meta)}}
if(me.destroyed){if(!operation.destroyed&&destroyOp&&operation.$destroyOwner===me){operation.destroy()}
return}
me.afterRequest(request,success);me.fireEvent('endprocessresponse',me,response,operation);if(!operation.destroyed&&destroyOp&&operation.$destroyOwner===me){operation.destroy()}},setException:function(operation,response){operation.setException({status:response.status,statusText:response.statusText,response:response})},extractResponseData:Ext.identityFn,applyEncoding:function(value){return Ext.encode(value)},encodeSorters:function(sorters,preventArray){var out=[],length=sorters.length,i;for(i=0;i<length;i++){out[i]=sorters[i].serialize()}
return this.applyEncoding(preventArray?out[0]:out)},encodeFilters:function(filters){var out=[],length=filters.length,encode,i;for(i=0;i<length;i++){encode|=filters[i].serializeTo(out)}
return encode?this.applyEncoding(out):out},getParams:function(operation){if(!operation.isReadOperation){return{}}
var me=this,params={},grouper=operation.getGrouper(),sorters=operation.getSorters(),filters=operation.getFilters(),page=operation.getPage(),start=operation.getStart(),limit=operation.getLimit(),simpleSortMode=me.getSimpleSortMode(),simpleGroupMode=me.getSimpleGroupMode(),pageParam=me.getPageParam(),startParam=me.getStartParam(),limitParam=me.getLimitParam(),groupParam=me.getGroupParam(),groupDirectionParam=me.getGroupDirectionParam(),sortParam=me.getSortParam(),filterParam=me.getFilterParam(),directionParam=me.getDirectionParam(),hasGroups,index;if(pageParam&&page){params[pageParam]=page}
if(startParam&&(start||start===0)){params[startParam]=start}
if(limitParam&&limit){params[limitParam]=limit}
hasGroups=groupParam&&grouper;if(hasGroups){if(simpleGroupMode){params[groupParam]=grouper.getProperty();if(groupDirectionParam===groupParam){params[groupParam]+=' '+grouper.getDirection()}else{params[groupDirectionParam]=grouper.getDirection()}}else{params[groupParam]=me.encodeSorters([grouper],!0)}}
if(sortParam&&sorters&&sorters.length>0){if(simpleSortMode){for(index=(sorters.length>1&&hasGroups)?1:0;index<sorters.length;index++){if(directionParam===sortParam){params[sortParam]=Ext.Array.push(params[sortParam]||[],sorters[index].getProperty()+' '+sorters[index].getDirection())}else{params[sortParam]=Ext.Array.push(params[sortParam]||[],sorters[index].getProperty());params[directionParam]=Ext.Array.push(params[directionParam]||[],sorters[index].getDirection())}}}else{params[sortParam]=me.encodeSorters(sorters)}}
if(filterParam&&filters&&filters.length>0){params[filterParam]=me.encodeFilters(filters)}
return params},buildUrl:function(request){var me=this,url=me.getUrl(request);if(!url){Ext.raise("You are using a ServerProxy but have not supplied it with a url.")}
if(me.getNoCache()){url=Ext.urlAppend(url,Ext.String.format("{0}={1}",me.getCacheString(),Ext.Date.now()))}
return url},getUrl:function(request){var url;if(request){url=request.getUrl()||this.getApi()[request.getAction()]}
return url?url:this.callParent()},doRequest:function(operation,callback,scope){Ext.raise("The doRequest function has not been implemented on your "+"Ext.data.proxy.Server subclass. See src/data/ServerProxy.js for details")},afterRequest:Ext.emptyFn,destroy:function(){var me=this;me.destroying=!0;me.reader=me.writer=Ext.destroy(me.reader,me.writer);me.callParent();me.destroyed=!0}})
;
Ext.define('Ext.data.proxy.Ajax',{requires:['Ext.Ajax'],extend:'Ext.data.proxy.Server',alias:'proxy.ajax',alternateClassName:['Ext.data.HttpProxy','Ext.data.AjaxProxy'],isAjaxProxy:!0,defaultActionMethods:{create:'POST',read:'GET',update:'POST',destroy:'POST'},config:{binary:!1,headers:undefined,paramsAsJson:!1,withCredentials:!1,useDefaultXhrHeader:!0,username:null,password:null,actionMethods:{create:'POST',read:'GET',update:'POST',destroy:'POST'}},doRequest:function(operation){var me=this,writer=me.getWriter(),request=me.buildRequest(operation),method=me.getMethod(request),jsonData,params;if(writer&&operation.allowWrite()){request=writer.write(request)}
request.setConfig({binary:me.getBinary(),headers:me.getHeaders(),timeout:me.getTimeout(),scope:me,callback:me.createRequestCallback(request,operation),method:method,useDefaultXhrHeader:me.getUseDefaultXhrHeader(),disableCaching:!1});if(me.responseType!=null&&Ext.supports.XHR2){request.setResponseType(me.responseType)}
if(method.toUpperCase()!=='GET'&&me.getParamsAsJson()){params=request.getParams();if(params){jsonData=request.getJsonData();if(jsonData){jsonData=Ext.Object.merge({},jsonData,params)}else{jsonData=params}
request.setJsonData(jsonData);request.setParams(undefined)}}
if(me.getWithCredentials()){request.setWithCredentials(!0);request.setUsername(me.getUsername());request.setPassword(me.getPassword())}
return me.sendRequest(request)},sendRequest:function(request){request.setRawRequest(Ext.Ajax.request(request.getCurrentConfig()));this.lastRequest=request;return request},abort:function(request){request=request||this.lastRequest;if(request){Ext.Ajax.abort(request.getRawRequest())}},getMethod:function(request){var actions=this.getActionMethods(),action=request.getAction(),method;if(actions){method=actions[action]}
return method||this.defaultActionMethods[action]},createRequestCallback:function(request,operation){return function(options,success,response){var me=this;if(request===me.lastRequest){me.lastRequest=null}
if(!me.destroying&&!me.destroyed){me.processResponse(success,operation,request,response)}}},destroy:function(){this.lastRequest=null;this.callParent()}})
;
Ext.define('Ext.data.reader.Json',{extend:'Ext.data.reader.Reader',alternateClassName:'Ext.data.JsonReader',alias:'reader.json',requires:['Ext.JSON'],config:{record:null,metaProperty:'metaData',useSimpleAccessors:!1,preserveRawData:!1},responseType:'json',updateRootProperty:function(){this.forceBuildExtractors()},updateMetaProperty:function(){this.forceBuildExtractors()},getResponseData:function(response){var error;if(typeof response.responseJson==='object'){return response.responseJson}
try{return Ext.decode(response.responseText)}catch(ex){error=this.createReadError(ex.message);Ext.Logger.warn('Unable to parse the JSON returned by the server');this.fireEvent('exception',this,response,error);return error}},buildExtractors:function(force){var me=this,emptyFn=Ext.emptyFn;if(me.callParent([force])){me.getRoot=me.setupExtractor(me.getRootProperty(),Ext.identityFn);me.getGroupRoot=me.setupExtractor(me.getGroupRootProperty(),emptyFn);me.getSummaryRoot=me.setupExtractor(me.getSummaryRootProperty(),emptyFn);me.getMeta=me.setupExtractor(me.getMetaProperty(),emptyFn)}},extractData:function(root,readOptions){var recordName=this.getRecord(),data=[],length,i;if(recordName){length=root.length;if(!length&&Ext.isObject(root)){length=1;root=[root]}
for(i=0;i<length;i++){data[i]=root[i][recordName]}}else{data=root}
return this.callParent([data,readOptions])},getModelData:function(raw){return this.getPreserveRawData()?Ext.apply({},raw):raw},createAccessor:(function(){var re=/[\[\.]/;return function(expr){var simple=this.getUseSimpleAccessors(),operatorIndex,result,current,parts,part,inExpr,isDot,isLeft,isRight,special,c,i,bracketed,len;if(!(expr||expr===0)){return}
if(typeof expr==='function'){return expr}
if(!simple){operatorIndex=String(expr).search(re)}
if(simple===!0||operatorIndex<0){result=function(raw){return raw==null?null:raw[expr]}}else{current='raw';parts=[];part='';inExpr=0;len=expr.length;for(i=0;i<=len;++i){c=expr[i];isDot=c==='.';isLeft=c==='[';isRight=c===']';special=isDot||isLeft||isRight||!c;if(!special||inExpr>1||(inExpr&&!isRight)){part+=c}else if(special){bracketed=!1;if(isLeft){++inExpr}else if(isRight){--inExpr;bracketed=!0}
if(part){if(bracketed){part='['+part+']'}else{part='.'+part}
current+=part;parts.push(''+current);part=''}}}
result=parts.join(' && ');result=Ext.functionFactory('raw','return '+result)}
return result}}()),createFieldAccessor:function(field){var me=this,mapping=field.mapping,hasMap=mapping||mapping===0,map=hasMap?mapping:field.name;if(hasMap){if(typeof map==='function'){return function(raw,self){return field.mapping(raw,self)}}else{return me.createAccessor(map)}}},getAccessorKey:function(prop){var simple=this.getUseSimpleAccessors()?'simple':'';return this.callParent([simple+prop])},privates:{copyFrom:function(reader){this.callParent([reader]);this.getRoot=reader.getRoot},setupExtractor:function(prop,defaultFn){return prop?this.getAccessor(prop):defaultFn}}})
;
Ext.define('Ext.data.writer.Json',{extend:'Ext.data.writer.Writer',alternateClassName:'Ext.data.JsonWriter',alias:'writer.json',config:{rootProperty:undefined,encode:!1,allowSingle:!0,expandData:!1},constructor:function(config){if(config&&config.hasOwnProperty('root')){config=Ext.apply({},config);config.rootProperty=config.root;delete config.root;Ext.log.warn('Ext.data.writer.Json: Using the deprecated "root" configuration. '+'Use "rootProperty" instead.')}
this.callParent([config])},getExpandedData:function(data){var dataLength=data.length,i=0,item,prop,nameParts,j,tempObj,toObject;toObject=function(name,value){var o={};o[name]=value;return o};for(;i<dataLength;i++){item=data[i];for(prop in item){if(item.hasOwnProperty(prop)){nameParts=prop.split('.');j=nameParts.length-1;if(j>0){tempObj=item[prop];for(;j>0;j--){tempObj=toObject(nameParts[j],tempObj)}
item[nameParts[0]]=item[nameParts[0]]||{};Ext.Object.merge(item[nameParts[0]],tempObj);delete item[prop]}}}}
return data},writeRecords:function(request,data){var me=this,root=me.getRootProperty(),json,single,transform;if(me.getExpandData()){data=me.getExpandedData(data)}
if(me.getAllowSingle()&&data.length===1){data=data[0];single=!0}
transform=this.getTransform();if(transform){data=transform(data,request)}
if(me.getEncode()){if(root){request.setParam(root,Ext.encode(data))}else{Ext.raise('Must specify a root when using encode')}}else if(single||(data&&data.length)){json=request.getJsonData()||{};if(root){json[root]=data}else{json=data}
request.setJsonData(json)}
return request}})
;
Ext.define('Ext.util.SorterCollection',{extend:'Ext.util.Collection',requires:['Ext.util.Sorter'],isSorterCollection:!0,$sortable:null,sortFn:null,config:{sorterOptionsFn:null,sorterOptionsScope:null},constructor:function(config){var me=this;me.sortFn=Ext.util.Sorter.createComparator(me);me.callParent([config]);me.setDecoder(me.decodeSorter)},addSort:function(property,direction,mode){var me=this,count,index,limit,options,primary,sorter,sorters;if(!property){me.beginUpdate();me.endUpdate()}else{options=me.getOptions();if(property instanceof Array){sorters=property;mode=direction;direction=null}else if(Ext.isString(property)){if(!(sorter=me.get(property))){sorters=[{property:property,direction:direction||options.getDefaultSortDirection()}]}else{sorters=[sorter]}}else if(Ext.isFunction(property)){sorters=[{sorterFn:property,direction:direction||options.getDefaultSortDirection()}]}else{if(!Ext.isObject(property)){Ext.raise('Invalid sort descriptor: '+property)}
sorters=[property];mode=direction;direction=null}
if(mode&&!me._sortModes[mode]){Ext.raise('Sort mode should be "multi", "append", "prepend" or "replace", not "'+mode+'"')}
mode=me._sortModes[mode||'replace'];primary=me.getAt(0);count=me.length;index=mode.append?count:0;me.beginUpdate();me.splice(index,mode.replace?count:0,sorters);if(mode.multi){count=me.length;limit=options.getMultiSortLimit();if(count>limit){me.removeAt(limit,count)}}
if(sorter&&direction){sorter.setDirection(direction)}else if(index===0&&primary&&primary===me.getAt(0)){primary.toggle()}
me.endUpdate()}},clear:function(){this.beginUpdate();this.callParent();this.endUpdate(this.items)},getSortFn:function(){return this.sortFn},getByProperty:function(prop){var items=this.items,len=items.length,i,item;for(i=0;i<len;++i){item=items[i];if(item.getProperty()===prop){return item}}
return null},_sortModes:{append:{append:1},multi:{multi:1},prepend:{prepend:1},replace:{replace:1}},decodeSorter:function(sorter,xclass){var me=this,options=me.getOptions(),root=options.getRootProperty(),sorterOptionsFn=me.getSorterOptionsFn(),currentSorter,sorterConfig,type;if(sorter.isSorter){if(!sorter.getRoot()){sorter.setRoot(root)}}else{sorterConfig={direction:options.getDefaultSortDirection(),root:root};type=typeof sorter;if(type==='string'){currentSorter=me.get(sorter);if(currentSorter){return currentSorter}
sorterConfig.property=sorter}else if(type==='function'){sorterConfig.sorterFn=sorter}else{if(!Ext.isObject(sorter)){Ext.raise('Invalid sorter specified: '+sorter)}
sorterConfig=Ext.apply(sorterConfig,sorter);if(sorterConfig.fn){sorterConfig.sorterFn=sorterConfig.fn;delete sorterConfig.fn}}
sorter=Ext.create(xclass||Ext.util.Sorter,sorterConfig)}
if(sorterOptionsFn){sorterOptionsFn.call(me.getSorterOptionsScope()||me,sorter)}
return sorter},setSorterConfigure:function(fn,scope){this.setSorterOptionsFn(fn);this.setSorterOptionsScope(scope)},decodeRemoveItems:function(args,index){var me=this,ret=(index===undefined)?args:args[index];if(!ret||!ret.$cloned){if(args.length>index+1||!Ext.isIterable(ret)){ret=Ext.Array.slice(args,index)}
var currentSorters=me.items,ln=ret.length,remove=[],i,item,n,sorter,type;for(i=0;i<ln;i++){sorter=ret[i];if(sorter&&sorter.isSorter){remove.push(sorter)}else{type=typeof sorter;if(type==='string'){sorter=me.get(sorter);if(sorter){remove.push(sorter)}}else if(type==='function'){for(n=currentSorters.length;n-->0;){item=currentSorters[n];if(item.getSorterFn()===sorter){remove.push(item)}}}else{Ext.raise('Invalid sorter specification: '+sorter)}}}
ret=remove;ret.$cloned=!0}
return ret},getOptions:function(){return this.$sortable||this}})
;
Ext.define('Ext.util.FilterCollection',{extend:'Ext.util.Collection',requires:['Ext.util.Filter'],isFilterCollection:!0,$filterable:null,filterFn:null,constructor:function(config){var me=this;me.filterFn=Ext.util.Filter.createFilterFn(me);me.callParent([config]);me.setDecoder(me.decodeFilter)},filterData:function(data){return this.filtered?Ext.Array.filter(data,this.filterFn):data},getFilterFn:function(){return this.filterFn},isItemFiltered:function(item){return!this.filterFn(item)},getFilterCount:function(){var filters=this.items,len=filters.length,i;for(i=len-1;i>=0;i--){if(filters[i].getDisabled()){len--}}
return len},decodeFilter:function(filter){var options=this.getOptions(),filterRoot=options.getRootProperty(),filterConfig;if(filter.isFilter){if(filter.setRoot&&!filter.getRoot()){filter.setRoot(filterRoot)}}else{filterConfig={root:filterRoot};if(Ext.isFunction(filter)){filterConfig.filterFn=filter}else{if(!Ext.isObject(filter)){Ext.raise('Invalid filter specified: '+filter)}
filterConfig=Ext.apply(filterConfig,filter);if(filterConfig.fn){filterConfig.filterFn=filterConfig.fn;delete filterConfig.fn}
if(Ext.util.Filter.isInvalid(filterConfig)){return!1}}
filter=new Ext.util.Filter(filterConfig)}
return filter},decodeRemoveItems:function(args,index){var me=this,ret=(index===undefined)?args:args[index];if(!ret.$cloned){if(args.length>index+1||!Ext.isIterable(ret)){ret=Ext.Array.slice(args,index)}
var currentFilters=me.items,ln=ret.length,remove=[],filter,i,isFunction,isProp,isString,item,match,n,type;for(i=0;i<ln;i++){filter=ret[i];if(filter&&filter.isFilter){remove.push(filter)}else{type=typeof filter;isFunction=type==='function';isProp=filter.property!==undefined&&filter.value!==undefined;isString=type==='string';if(!isFunction&&!isProp&&!isString){Ext.raise('Invalid filter specification: '+filter)}
for(n=currentFilters.length;n-->0;){item=currentFilters[n];match=!1;if(isString){match=item.getProperty()===filter}else if(isFunction){match=item.getFilterFn()===filter}else if(isProp){match=item.getProperty()===filter.property&&item.getValue()===filter.value}
if(match){remove.push(item)}}}}
ret=remove;ret.$cloned=!0}
return ret},getOptions:function(){return this.$filterable||this}})
;
Ext.define('Ext.util.GroupCollection',{extend:'Ext.util.Collection',requires:['Ext.util.Group','Ext.util.SorterCollection','Ext.util.FilterCollection'],isGroupCollection:!0,config:{grouper:null,groupConfig:null,itemRoot:null},observerPriority:-100,emptyGroupRetainTime:300000,constructor:function(config){this.emptyGroups={};this.callParent([config]);this.on('remove','onGroupRemove',this)},getItemGroup:function(item){var key=this.getGrouper().getGroupString(item);return this.get(key)},onCollectionAdd:function(source,details){if(!this.isConfiguring){this.addItemsToGroups(source,details.items,details.at)}},onCollectionBeforeItemChange:function(source,details){this.changeDetails=details},onCollectionBeginUpdate:function(){this.beginUpdate()},onCollectionEndUpdate:function(){this.endUpdate()},onCollectionItemChange:function(source,details){if(!details.indexChanged){this.syncItemGrouping(source,details)}
this.changeDetails=null},onCollectionRefresh:function(source){if(source.generation){var me=this,itemGroupKeys=me.itemGroupKeys={},groupData=me.createEntries(source,source.items),entries=groupData.entries,groupKey,i,len,entry,j;for(i=0,len=entries.length;i<len;++i){entry=entries[i];entry.group.splice(0,1e99,entry.items);for(j=0;j<entry.items.length;j++){itemGroupKeys[source.getKey(entry.items[j])]=entry.group}}
entries=null;for(groupKey in me.map){if(!(groupKey in groupData.groups)){(entries||(entries=[])).push(me.map[groupKey])}}
if(entries){me.remove(entries)}
me.sortItems()}},onCollectionRemove:function(source,details){var me=this,changeDetails=me.changeDetails,itemGroupKeys=me.itemGroupKeys||(me.itemGroupKeys={}),entries,entry,group,i,n,j,removeGroups,item;if(source.getCount()){if(changeDetails){item=changeDetails.item||changeDetails.items[0];entries=me.createEntries(source,[item],!1).entries;entries[0].group=itemGroupKeys['oldKey' in details?details.oldKey:source.getKey(item)]}else{entries=me.createEntries(source,details.items,!1).entries}
for(i=0,n=entries.length;i<n;++i){group=(entry=entries[i]).group;if(group){group.remove(entry.items)}
for(j=0;j<entry.items.length;j++){delete itemGroupKeys[source.getKey(entry.items[j])]}
if(group&&!group.length){(removeGroups||(removeGroups=[])).push(group)}}}else{me.itemGroupKeys={};removeGroups=me.items;for(i=0,n=removeGroups.length;i<n;++i){removeGroups[i].clear()}}
if(removeGroups){me.remove(removeGroups)}},onCollectionSort:function(source){var me=this,sorters=source.getSorters(!1),items,length,i,group;if(sorters){items=me.items;length=me.length;for(i=0;i<length;++i){group=items[i];if(group.getSorters()===sorters){group.sortItems()}else{group.setSorters(sorters)}}}},onCollectionUpdateKey:function(source,details){if(!details.indexChanged){details.oldIndex=source.indexOf(details.item);this.syncItemGrouping(source,details)}},addItemsToGroups:function(source,items,at,oldIndex){var me=this,itemGroupKeys=me.itemGroupKeys||(me.itemGroupKeys={}),entries=me.createEntries(source,items).entries,index=-1,sourceStartIndex,entry,i,len,j,group,firstIndex,item;for(i=0,len=entries.length;i<len;++i){entry=entries[i];group=entry.group;if(oldIndex||oldIndex===0){item=items[0];if(group.getCount()>0&&source.getSorters().getCount()===0){firstIndex=source.indexOf(group.items[0]);if(oldIndex<firstIndex){index=0}else{index=oldIndex-firstIndex}}
if(index===-1){group.add(item)}else{group.insert(index,item)}}else{if(me.length>1&&at){sourceStartIndex=source.indexOf(entries[0].group.getAt(0));at=Math.max(at-sourceStartIndex,0)}
entry.group.insert(at!=null?at:group.items.length,entry.items);for(j=0;j<entry.items.length;j++){itemGroupKeys[source.getKey(entry.items[j])]=entry.group}}}
me.sortItems()},createEntries:function(source,items,createGroups){var me=this,groups={},entries=[],grouper=me.getGrouper(),entry,group,groupKey,i,item,len;for(i=0,len=items.length;i<len;++i){groupKey=grouper.getGroupString(item=items[i]);if(!(entry=groups[groupKey])){group=me.getGroup(source,groupKey,createGroups);entries.push(groups[groupKey]=entry={group:group,items:[]})}
entry.items.push(item)}
return{groups:groups,entries:entries}},syncItemGrouping:function(source,details){var me=this,itemGroupKeys=me.itemGroupKeys||(me.itemGroupKeys={}),item=details.item,oldKey,itemKey,oldGroup,group;itemKey=source.getKey(item);oldKey='oldKey' in details?details.oldKey:itemKey;oldGroup=itemGroupKeys[oldKey];group=me.getGroup(source,me.getGrouper().getGroupString(item));details.group=group;details.oldGroup=oldGroup;if(!(details.groupChanged=group!==oldGroup)){oldGroup.itemChanged(item,details.modified,details.oldKey,details)}else{if(oldGroup){oldGroup.updateKey(item,oldKey,itemKey);oldGroup.remove(item);if(!oldGroup.length){me.remove(oldGroup)}}
me.addItemsToGroups(source,[item],null,details.oldIndex)}
delete itemGroupKeys[oldKey];itemGroupKeys[itemKey]=group},getGroup:function(source,key,createGroups){var me=this,group=me.get(key),autoSort=me.getAutoSort();if(group){group.setSorters(source.getSorters())}else if(createGroups!==!1){group=me.emptyGroups[key]||Ext.create(Ext.apply({xclass:'Ext.util.Group',id:me.getId()+'-group-'+key,groupKey:key,rootProperty:me.getItemRoot(),sorters:source.getSorters()},me.getGroupConfig()));group.ejectTime=null;me.setAutoSort(!1);me.add(group);me.setAutoSort(autoSort)}
return group},getKey:function(item){return item.getGroupKey()},createSortFn:function(){var me=this,grouper=me.getGrouper(),sorterFn=me.getSorters().getSortFn();if(!grouper){return sorterFn}
return function(lhs,rhs){return grouper.sort(lhs.items[0],rhs.items[0])||sorterFn(lhs,rhs)}},updateGrouper:function(grouper){var me=this;me.grouped=!!(grouper&&me.$groupable.getAutoGroup());me.onSorterChange();me.onEndUpdateSorters(me.getSorters())},destroy:function(){var me=this;me.$groupable=null;me.destroyGroups(me.items);Ext.undefer(me.checkRemoveQueueTimer);me.callParent()},privates:{destroyGroups:function(groups){var len=groups.length,i;for(i=0;i<len;++i){groups[i].destroy()}},onGroupRemove:function(collection,info){var me=this,groups=info.items,emptyGroups=me.emptyGroups,len,group,i;groups=Ext.Array.from(groups);for(i=0,len=groups.length;i<len;i++){group=groups[i];group.setSorters(null);emptyGroups[group.getGroupKey()]=group;group.ejectTime=Ext.now()}
me.checkRemoveQueue()},checkRemoveQueue:function(){var me=this,emptyGroups=me.emptyGroups,groupKey,group,reschedule;for(groupKey in emptyGroups){group=emptyGroups[groupKey];if(!group.getCount()&&Ext.now()-group.ejectTime>me.emptyGroupRetainTime){Ext.destroy(group);delete emptyGroups[groupKey]}else{reschedule=!0}}
if(reschedule){Ext.undefer(me.checkRemoveQueueTimer);me.checkRemoveQueueTimer=Ext.defer(me.checkRemoveQueue,me.emptyGroupRetainTime,me)}}}})
;
Ext.define('Ext.data.Store',{extend:'Ext.data.ProxyStore',alias:'store.store',mixins:['Ext.data.LocalStore'],requires:['Ext.data.Model','Ext.data.proxy.Ajax','Ext.data.reader.Json','Ext.data.writer.Json','Ext.util.GroupCollection','Ext.util.DelayedTask'],uses:['Ext.data.StoreManager','Ext.util.Grouper'],config:{data:undefined,clearRemovedOnLoad:!0,clearOnPageLoad:!0,associatedEntity:null,role:null,session:null},addRecordsOptions:{addRecords:!0},loadCount:0,complete:!1,moveMapCount:0,constructor:function(config){var me=this,data;if(config){if(config.buffered){if(this.self!==Ext.data.Store){Ext.raise('buffered config not supported on derived Store classes. '+'Please derive from Ext.data.BufferedStore.')}
return new Ext.data.BufferedStore(config)}
if(config.remoteGroup){Ext.log.warn('Ext.data.Store: remoteGroup has been removed. '+'Use remoteSort instead.')}}
me.callParent([config]);data=me.inlineData;if(data){delete me.inlineData;me.loadInlineData(data)}},applyData:function(data,dataCollection){var me=this;me.getFields();me.getModel();if(data&&data.isCollection){data.setRootProperty('data');dataCollection=data;dataCollection.addObserver(this);if(data.getCount()){me.afterLoadRecords(data.items);if(me.hasListeners.load){me.fireEvent('load',me,data.items,!0)}}}else{if(!dataCollection){dataCollection=me.constructDataCollection()}
if(data){if(me.isInitializing){me.inlineData=data}else{me.loadData(data)}}}
return dataCollection},loadInlineData:function(data){var me=this,proxy=me.getProxy();if(proxy&&proxy.isMemoryProxy){proxy.setData(data);me.suspendEvents();me.read();me.resumeEvents()}else{me.removeAll(!0);me.suspendEvents();me.loadData(data);me.resumeEvents()}},onCollectionAdd:function(collection,info){this.loadCount=this.loadCount||1;this.onCollectionAddItems(collection,info.items,info)},onCollectionFilterAdd:function(collection,items){this.onCollectionAddItems(collection,items)},onCollectionAddItems:function(collection,records,info){var me=this,len=records.length,lastChunk=info?!info.next:!1,removed=me.removed,ignoreAdd=me.ignoreCollectionAdd,session=me.getSession(),replaced=info&&info.replaced,i,sync,record,replacedItems;if(me.activeRanges){me.syncActiveRanges()}
for(i=0;i<len;++i){record=records[i];if(session){session.adopt(record)}
if(!ignoreAdd){record.join(me);if(removed&&removed.length){Ext.Array.remove(removed,record)}
sync=sync||record.phantom||record.dirty}}
if(ignoreAdd){return}
if(replaced){replacedItems=[];do{Ext.Array.push(replacedItems,replaced.items);replaced=replaced.next}while(replaced);me.setMoving(replacedItems,!0)}
if(info){if(info.replaced){if(lastChunk){me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}}else{me.fireEvent('add',me,records,info.at);if(lastChunk){me.fireEvent('datachanged',me)}}}
if(replacedItems){me.setMoving(replacedItems,!1)}
me.needsSync=me.needsSync||sync},onCollectionBeforeItemChange:function(collection,info){var record=info.item,modifiedFieldNames=info.modified||null,type=info.meta;this.fireEvent('beforeupdate',this,record,type,modifiedFieldNames,info)},onCollectionFilteredItemChange:function(){this.onCollectionItemChange.apply(this,arguments)},onCollectionItemChange:function(collection,info){var me=this,record=info.item,modifiedFieldNames=info.modified||null,type=info.meta;if(me.fireChangeEvent(record)){me.onUpdate(record,type,modifiedFieldNames,info);me.fireEvent('update',me,record,type,modifiedFieldNames,info);me.fireEvent('datachanged',me)}},afterChange:function(record,modifiedFieldNames,type){this.getData().itemChanged(record,modifiedFieldNames||null,undefined,type)},afterCommit:function(record,modifiedFieldNames){this.afterChange(record,modifiedFieldNames,Ext.data.Model.COMMIT)},afterEdit:function(record,modifiedFieldNames){this.needsSync=this.needsSync||record.dirty;this.afterChange(record,modifiedFieldNames,Ext.data.Model.EDIT)},afterReject:function(record){this.afterChange(record,null,Ext.data.Model.REJECT)},afterDrop:function(record){this.getData().remove(record)},afterErase:function(record){this.removeFromRemoved(record)},addSorted:function(record){var me=this,remote=me.getRemoteSort(),data=me.getData(),index;if(remote){data.setSorters(me.getSorters())}
index=data.findInsertionIndex(record);if(remote){data.setSorters(null)}
return me.insert(index,record)},remove:function(records,isMove,silent){var me=this,data=me.getDataSource(),len,i,toRemove,record;if(records){if(records.isModel){if(data.indexOf(records)>-1){toRemove=[records];len=1}else{len=0}}else{toRemove=[];for(i=0,len=records.length;i<len;++i){record=records[i];if(record&&record.isEntity){if(!data.contains(record)){continue}}else if(!(record=data.getAt(record))){continue}
toRemove.push(record)}
len=toRemove.length}}
if(!len){return[]}
me.removeIsMove=isMove===!0;me.removeIsSilent=silent;data.remove(toRemove);me.removeIsSilent=!1;return toRemove},onCollectionRemove:function(collection,info){var me=this,removed=me.removed,records=info.items,len=records.length,index=info.at,replacement=info.replacement,isMove=me.removeIsMove||(replacement&&Ext.Array.equals(records,replacement.items)),silent=me.removeIsSilent,lastChunk=!info.next,data=me.getDataSource(),i,record;if(me.ignoreCollectionRemove){return}
if(replacement){me.setMoving(replacement.items,!0)}
for(i=len-1;i>=0;i--){record=records[i];if(!data.contains(record)){if(removed&&!isMove&&!record.phantom&&!record.erasing){record.removedFrom=index+i;removed.push(record);me.needsSync=!0}else{record.unjoin(me)}}}
if(!silent){if(!replacement||!replacement.items.length){me.fireEvent('remove',me,records,index,isMove);if(lastChunk){me.fireEvent('datachanged',me)}}}
if(replacement){me.setMoving(replacement.items,!1)}},onFilterEndUpdate:function(){var me=this;if(me.destroying||me.destroyed){return}
if(me.activeRanges){me.syncActiveRanges()}
me.callParent(arguments);me.callObservers('Filter')},removeAt:function(index,count){var data=this.getData();index=Math.max(index,0);if(index<data.length){if(arguments.length===1){count=1}else if(!count){return}
data.removeAt(index,count)}},removeAll:function(silent){var me=this,data=me.getData(),records=data.getRange();if(data.length){me.removeIsSilent=!0;me.callObservers('BeforeRemoveAll');data.removeAll();me.removeIsSilent=!1;if(!silent){me.fireEvent('clear',me,records);me.fireEvent('datachanged',me)}
me.callObservers('AfterRemoveAll',[!!silent])}
return records},setRecords:function(records){var count=this.getCount();++this.loadCount;if(count){this.getData().splice(0,count,records)}else{this.add(records)}},splice:function(index,toRemove,toAdd){return this.getData().splice(index,toRemove,toAdd)},onProxyLoad:function(operation){var me=this,resultSet=operation.getResultSet(),records=operation.getRecords(),successful=operation.wasSuccessful();if(me.destroyed){return}
if(resultSet){me.totalCount=resultSet.getTotal()}
if(successful){records=me.processAssociation(records);me.loadRecords(records,operation.getAddRecords()?{addRecords:!0}:undefined);me.attachSummaryRecord(resultSet)}else{me.loading=!1}
if(me.hasListeners.load){me.fireEvent('load',me,records,successful,operation)}
me.callObservers('AfterLoad',[records,successful,operation])},onProxyWrite:function(operation){if(operation.wasSuccessful()){this.attachSummaryRecord(operation.getResultSet())}
this.callParent([operation])},filterDataSource:function(fn){var source=this.getDataSource(),items=source.items,len=items.length,ret=[],i;for(i=0;i<len;i++){if(fn.call(source,items[i])){ret.push(items[i])}}
return ret},getNewRecords:function(){return this.filterDataSource(this.filterNew)},getRejectRecords:function(){return this.filterDataSource(this.filterRejects)},getUpdatedRecords:function(){return this.filterDataSource(this.filterUpdated)},loadData:function(data,append){var me=this,length=data.length,newData=[],i;for(i=0;i<length;i++){newData.push(me.createModel(data[i]))}
newData=me.processAssociation(newData);me.loadRecords(newData,append?me.addRecordsOptions:undefined)},loadRawData:function(data,append){var me=this,session=me.getSession(),result,records,success;result=me.getProxy().getReader().read(data,session?{recordCreator:session.recordCreator}:undefined);records=result.getRecords();success=result.getSuccess();if(success){me.totalCount=result.getTotal();me.loadRecords(records,append?me.addRecordsOptions:undefined)}
return success},loadRecords:function(records,options){var me=this,data=me.getData(),addRecords,skipSort;if(options){addRecords=options.addRecords}
if(!me.getRemoteSort()&&!me.getSortOnLoad()){skipSort=!0;data.setAutoSort(!1)}
if(!addRecords){me.clearData(!0)}
me.loading=!1;me.ignoreCollectionAdd=!0;me.callObservers('BeforePopulate');data.add(records);me.ignoreCollectionAdd=!1;if(skipSort){data.setAutoSort(!0)}
me.afterLoadRecords(records)},afterLoadRecords:function(records){var me=this,length=records.length,i;for(i=0;i<length;i++){records[i].join(me)}
if(!me.isEmptyStore){++me.loadCount;me.complete=!0}
if(me.hasListeners.datachanged){me.fireEvent('datachanged',me)}
if(me.hasListeners.refresh){me.fireEvent('refresh',me)}
me.callObservers('AfterPopulate')},loadPage:function(page,options){var me=this,size=me.getPageSize();me.currentPage=page;options=Ext.apply({page:page,start:(page-1)*size,limit:size,addRecords:!me.getClearOnPageLoad()},options);me.read(options)},nextPage:function(options){this.loadPage(this.currentPage+1,options)},previousPage:function(options){this.loadPage(this.currentPage-1,options)},clearData:function(isLoad){var me=this,removed=me.removed,data=me.getDataSource(),clearRemovedOnLoad=me.getClearRemovedOnLoad(),needsUnjoinCheck=removed&&isLoad&&!clearRemovedOnLoad,records,record,i,len;if(data){records=data.items;for(i=0,len=records.length;i<len;++i){record=records[i];if(needsUnjoinCheck&&Ext.Array.contains(removed,record)){continue}
record.unjoin(me)}
me.ignoreCollectionRemove=!0;me.callObservers('BeforeClear');data.removeAll();me.ignoreCollectionRemove=!1;me.callObservers('AfterClear')}
if(removed&&(!isLoad||clearRemovedOnLoad)){removed.length=0}},onIdChanged:function(rec,oldId,newId){this.getData().updateKey(rec,oldId);this.fireEvent('idchanged',this,rec,oldId,newId)},commitChanges:function(){var me=this,recs=me.getModifiedRecords(),len=recs.length,i=0;Ext.suspendLayouts();me.beginUpdate();for(;i<len;i++){recs[i].commit()}
me.cleanRemoved();me.endUpdate();Ext.resumeLayouts(!0);me.fireEvent('commit',me)},filterNewOnly:function(item){return item.phantom===!0},filterRejects:function(item){return item.phantom||item.dirty},rejectChanges:function(){var me=this,recs=me.getRejectRecords(),len=recs.length,i,rec,toRemove,sorted,data,currentAutoSort;Ext.suspendLayouts();me.beginUpdate();for(i=0;i<len;i++){rec=recs[i];if(rec.phantom){toRemove=toRemove||[];toRemove.push(rec)}else{rec.reject()}}
if(toRemove){me.remove(toRemove);for(i=0,len=toRemove.length;i<len;++i){toRemove[i].reject()}}
recs=me.getRawRemovedRecords();if(recs){len=recs.length;sorted=!me.getRemoteSort()&&me.isSorted();if(sorted){data=me.getData();currentAutoSort=data.getAutoSort();data.setAutoSort(!1)}
for(i=len-1;i>=0;i--){rec=recs[i];rec.reject();if(!sorted){me.insert(rec.removedFrom||0,rec)}}
if(sorted){data.setAutoSort(currentAutoSort);me.add(recs)}
recs.length=0}
me.endUpdate();Ext.resumeLayouts(!0);me.fireEvent('reject',me)},doDestroy:function(){var me=this,task=me.loadTask,data=me.getData(),source=data.getSource();me.clearData();me.setSession(null);me.observers=null;if(task){task.cancel();me.loadTask=null}
if(source){source.destroy()}
me.callParent()},privates:{commitOptions:{commit:!0},attachSummaryRecord:function(resultSet){if(!resultSet){return}
var me=this,summary=resultSet.getSummaryData(),grouper=me.getGrouper(),current=me.summaryRecord,commitOptions=me.commitOptions,groups,len,i,rec,group;if(summary){if(current){current.set(summary.data,commitOptions)}else{me.summaryRecord=summary;summary.isRemote=!0}}
if(grouper){summary=resultSet.getGroupData();if(summary){groups=me.getGroups();for(i=0,len=summary.length;i<len;++i){rec=summary[i];group=groups.getItemGroup(rec);if(group){current=group.summaryRecord;if(current){current.set(rec.data,commitOptions)}else{group.summaryRecord=rec;rec.isRemote=!0}}}}}},fetch:function(options){var operation;options=Ext.apply({},options);this.setLoadOptions(options);operation=this.createOperation('read',options);operation.execute()},fireChangeEvent:function(record){return this.getDataSource().contains(record)},onBeforeLoad:function(operation){this.callObservers('BeforeLoad',[operation])},onRemoteFilterSet:function(filters,remoteFilter){if(filters){this.getData().setFilters(remoteFilter?null:filters)}
this.callParent([filters,remoteFilter])},onRemoteSortSet:function(sorters,remoteSort){var data=this.getData();if(sorters){data.setSorters(remoteSort?null:sorters)}
data.setAutoGroup(!remoteSort);this.callParent([sorters,remoteSort])},isMoving:function(records,getMap){var map=this.moveMap,moving=0,len,i;if(map){if(records){if(Ext.isArray(records)){for(i=0,len=records.length;i<len;++i){moving+=map[records[i].id]?1:0}}else if(map[records.id]){++moving}}else{moving=getMap?map:this.moveMapCount}}
return moving},setLoadOptions:function(options){var me=this,pageSize=me.getPageSize(),session,grouper;if(me.getRemoteSort()&&!options.grouper){grouper=me.getGrouper();if(grouper){options.grouper=grouper}}
if(pageSize||'start' in options||'limit' in options||'page' in options){options.page=options.page!=null?options.page:me.currentPage;options.start=(options.start!==undefined)?options.start:(options.page-1)*pageSize;options.limit=options.limit!=null?options.limit:pageSize;me.currentPage=options.page}
options.addRecords=options.addRecords||!1;if(!options.recordCreator){session=me.getSession();if(session){options.recordCreator=session.recordCreator}}
me.callParent([options])},setMoving:function(records,isMoving){var me=this,map=me.moveMap||(me.moveMap={}),len=records.length,i,id;for(i=0;i<len;++i){id=records[i].id;if(isMoving){if(map[id]){++map[id]}else{map[id]=1;++me.moveMapCount}}else{if(--map[id]===0){delete map[id];--me.moveMapCount}}}
if(me.moveMapCount===0){me.moveMap=null}},processAssociation:function(records){var me=this,associatedEntity=me.getAssociatedEntity();if(associatedEntity){records=me.getRole().processLoad(me,associatedEntity,records,me.getSession())}
return records}}})
;
Ext.define('Ext.data.reader.Array',{extend:'Ext.data.reader.Json',alternateClassName:'Ext.data.ArrayReader',alias:'reader.array',config:{totalProperty:undefined,successProperty:undefined},createFieldAccessor:function(field){var oldMap=field.mapping,index=field.hasMapping()?oldMap:field.ordinal,result;field.mapping=index;result=this.callParent(arguments);field.mapping=oldMap;return result},getModelData:function(raw){return{}}})
;
Ext.define('Ext.data.ArrayStore',{extend:'Ext.data.Store',alias:'store.array',alternateClassName:['Ext.data.SimpleStore'],requires:['Ext.data.proxy.Memory','Ext.data.reader.Array'],config:{proxy:{type:'memory',reader:'array'}},loadData:function(data,append){if(this.expandData){var r=[],i=0,ln=data.length;for(;i<ln;i++){r[r.length]=[data[i]]}
data=r}
this.callParent([data,append])}})
;
Ext.define('Ext.data.StoreManager',{extend:'Ext.util.MixedCollection',alternateClassName:['Ext.StoreMgr','Ext.data.StoreMgr','Ext.StoreManager'],singleton:!0,requires:['Ext.data.ArrayStore'],register:function(){var i,s;for(i=0;(s=arguments[i]);i++){this.add(s)}},unregister:function(){var i,s;for(i=0;(s=arguments[i]);i++){this.remove(this.lookup(s))}},lookup:function(store,defaultType){var first,data,arrays,fields,i,len;if(Ext.isArray(store)){first=store[0];data=store;if(Ext.isObject(first)){store={data:data}}else{arrays=Ext.isArray(first);fields=['field1'];if(arrays){for(i=2,len=first.length;i<=len;++i){fields.push('field'+i)}}else{data=[];for(i=0,len=store.length;i<len;++i){data.push([store[i]])}}
return new Ext.data.ArrayStore({data:data,fields:fields,autoDestroy:!0,autoCreated:!0,expanded:!arrays})}}
if(Ext.isString(store)){return this.get(store)}else{return Ext.Factory.store(store,defaultType)}},getKey:function(o){return o.storeId},addEmptyStore:function(){var emptyStore=this.$emptyStore,destoryable={destroy:Ext.emptyFn};if(!emptyStore){emptyStore=this.$emptyStore=Ext.regStore('ext-empty-store',{proxy:'memory',useModelWarning:!1});emptyStore.ignoreLeaked=!0;emptyStore.isEmptyStore=!0;emptyStore.on=emptyStore.addListener=function(){return destoryable};emptyStore.un=emptyStore.removeListener=Ext.emptyFn;emptyStore.add=emptyStore.remove=emptyStore.insert=emptyStore.destroy=emptyStore.loadData=function(){Ext.raise('Cannot modify ext-empty-store')}}
this.add(emptyStore)},clear:function(){this.callParent();this.addEmptyStore()}},function(){Ext.regStore=function(id,config){var store;if(Ext.isObject(id)){config=id}else{if(Ext.data.StoreManager.containsKey(id)){return Ext.data.StoreManager.lookup(id)}
config.storeId=id}
if(config instanceof Ext.data.Store){store=config}else{store=new Ext.data.Store(config)}
Ext.data.StoreManager.register(store);return store};Ext.getStore=function(name){return Ext.data.StoreManager.lookup(name)};Ext.data.StoreManager.addEmptyStore()})
;
Ext.define('Ext.app.domain.Store',{extend:'Ext.app.EventDomain',singleton:!0,requires:['Ext.data.AbstractStore'],type:'store',prefix:'store.',idMatchRe:/^#/,constructor:function(){var me=this;me.callParent();me.monitor(Ext.data.AbstractStore)},match:function(target,selector){var result=!1,alias=target.alias;if(selector==='*'){result=!0}else if(this.idMatchRe.test(selector)){result=target.getStoreId()===selector.substring(1)}else if(alias){result=Ext.Array.indexOf(alias,this.prefix+selector)>-1}
return result}})
;
Ext.define('Ext.app.Controller',{extend:'Ext.app.BaseController',requires:['Ext.app.Util','Ext.data.StoreManager','Ext.ComponentManager','Ext.app.domain.Component','Ext.app.domain.Store'],statics:{strings:{model:{getter:'getModel',upper:'Model'},view:{getter:'getView',upper:'View'},controller:{getter:'getController',upper:'Controller'},store:{getter:'getStore',upper:'Store'},profile:{getter:'getProfile',upper:'Profiles'}},controllerRegex:/^(.*)\.controller\./,profileRegex:/^(.*)\.profile\./,createGetter:function(baseGetter,name){return function(){return this[baseGetter](name)}},getGetterName:function(name,kindUpper){var fn='get',parts=name.split('.'),numParts=parts.length,index;for(index=0;index<numParts;index++){fn+=Ext.String.capitalize(parts[index])}
fn+=kindUpper;return fn},resolveNamespace:function(cls,data){var Controller=Ext.app.Controller,namespaceRe,className,namespace,match;namespaceRe=cls.prototype.isProfile?Controller.profileRegex:Controller.controllerRegex;className=Ext.getClassName(cls);namespace=data.$namespace||data.namespace||Ext.app.getNamespace(className)||((match=namespaceRe.exec(className))&&match[1]);if(!namespace){Ext.log.warn("Missing namespace for "+className+", please define it "+"in namespaces property of your Application class.")}
return namespace},processDependencies:function(cls,requires,namespace,kind,names,profileName){if(!names||!names.length){return}
var me=this,strings=me.strings[kind],o,absoluteName,shortName,name,j,subLn,getterName,getter;if(!Ext.isArray(names)){names=[names]}
for(j=0,subLn=names.length;j<subLn;j++){name=names[j];o=me.getFullName(name,kind,namespace,profileName);names[j]=absoluteName=o.absoluteName;shortName=o.shortName;requires.push(absoluteName);getterName=me.getGetterName(shortName,strings.upper);if(!cls[getterName]){cls[getterName]=getter=me.createGetter(strings.getter,name)}else if(getterName==='getMainView'){Ext.log.warn('Cannot have a view named \'Main\' - getter conflicts '+'with mainView config.')}
if(getter&&kind!=='controller'){getter['Ext.app.getter']=!0}}},getFullName:function(name,kind,namespace,profileName){var shortName=name,sep,absoluteName;if((sep=name.indexOf('@'))>0){shortName=name.substring(0,sep);absoluteName=name.substring(sep+1)+'.'+shortName}else if(name.indexOf('.')>0&&(Ext.ClassManager.isCreated(name)||this.hasRegisteredPrefix(name))){absoluteName=name;shortName=name.replace(namespace+'.'+kind+'.','')}else{if(!namespace){Ext.log.warn("Cannot find namespace for "+kind+" "+name+", "+"assuming it is fully qualified class name")}
if(namespace){absoluteName=namespace+'.'+kind+'.'+(profileName?profileName+'.'+name:name);shortName=name}else{absoluteName=name}}
return{absoluteName:absoluteName,shortName:shortName}},hasRegisteredPrefix:function(className){var inventory=Ext.ClassManager,prefix=inventory.getPrefix(className);return prefix&&prefix!==className}},models:null,views:null,stores:null,controllers:null,config:{application:null,refs:null,active:!0,moduleClassName:null},onClassExtended:function(cls,data,hooks){var onBeforeClassCreated=hooks.onBeforeCreated;hooks.onBeforeCreated=function(cls,data){var Controller=Ext.app.Controller,requires=[],namespace,proto;proto=cls.prototype;namespace=Controller.resolveNamespace(cls,data);if(namespace){proto.$namespace=namespace}
Controller.processDependencies(proto,requires,namespace,'model',data.models);Controller.processDependencies(proto,requires,namespace,'view',data.views);Controller.processDependencies(proto,requires,namespace,'store',data.stores);Controller.processDependencies(proto,requires,namespace,'controller',data.controllers);Ext.require(requires,Ext.Function.pass(onBeforeClassCreated,arguments,this))}},constructor:function(config){this.initAutoGetters();this.callParent([config])},normalizeRefs:function(refs){var me=this,newRefs=[];if(refs){if(Ext.isObject(refs)){Ext.Object.each(refs,function(key,value){if(Ext.isString(value)){value={selector:value}}
value.ref=key;newRefs.push(value)})}else if(Ext.isArray(refs)){newRefs=Ext.Array.merge(newRefs,refs)}}
refs=me.refs;if(refs){me.refs=null;refs=me.normalizeRefs(refs);if(refs){newRefs=Ext.Array.merge(newRefs,refs)}}
return newRefs},getRefMap:function(){var me=this,refMap=me._refMap,refs,ref,ln,i;if(!refMap){refs=me.getRefs();refMap=me._refMap={};if(refs){for(i=0,ln=refs.length;i<ln;i++){ref=refs[i];refMap[ref.ref]=ref.selector}}}
return refMap},applyId:function(id){return id||Ext.app.Controller.getFullName(this.$className,'controller',this.$namespace).shortName},applyRefs:function(refs){return this.normalizeRefs(Ext.clone(refs))},updateRefs:function(refs){if(refs){this.ref(refs)}},initAutoGetters:function(){var proto=this.self.prototype,prop,fn;for(prop in proto){fn=proto[prop];if(fn&&fn['Ext.app.getter']){fn.call(this)}}},doInit:function(app){var me=this;if(!me._initialized){me.init(app);me._initialized=!0}},finishInit:function(app){var me=this,controllers=me.controllers,controller,i,l;if(me._initialized&&controllers&&controllers.length){for(i=0,l=controllers.length;i<l;i++){controller=me.getController(controllers[i]);controller.finishInit(app)}}},init:Ext.emptyFn,onLaunch:Ext.emptyFn,activate:function(){this.setActive(!0)},deactivate:function(){this.setActive(!1)},isActive:function(){return this.getActive()},ref:function(refs){var me=this,i=0,length=refs.length,info,ref,fn;refs=Ext.Array.from(refs);me.references=me.references||[];for(;i<length;i++){info=refs[i];ref=info.ref;fn='get'+Ext.String.capitalize(ref);if(!me[fn]){me[fn]=Ext.Function.pass(me.getRef,[ref,info],me)}
me.references.push(ref.toLowerCase())}},addRef:function(refs){this.ref(refs)},getRef:function(ref,info,config){var me=this,refCache=me.refCache||(me.refCache={}),cached=refCache[ref];info=info||{};config=config||{};Ext.apply(info,config);if(info.forceCreate){return Ext.ComponentManager.create(info,'component')}
if(!cached){if(info.selector){refCache[ref]=cached=Ext.ComponentQuery.query(info.selector)[0]}
if(!cached&&info.autoCreate){refCache[ref]=cached=Ext.ComponentManager.create(info,'component')}
if(cached){cached.on('destroy',function(){refCache[ref]=null})}}
return cached},hasRef:function(ref){var references=this.references;return references&&Ext.Array.indexOf(references,ref.toLowerCase())!==-1},getController:function(id){var app=this.getApplication();if(id===this.getId()){return this}
return app&&app.getController(id)},getStore:function(name){var storeId,store;storeId=(name.indexOf('@')===-1)?name:name.split('@')[0];store=Ext.StoreManager.get(storeId);if(!store){name=Ext.app.Controller.getFullName(name,'store',this.$namespace);if(name){store=Ext.create(name.absoluteName,{id:storeId})}}
return store},getModel:function(modelName){var name=Ext.app.Controller.getFullName(modelName,'model',this.$namespace),ret=Ext.ClassManager.get(name.absoluteName);if(!ret){ret=Ext.data.schema.Schema.lookupEntity(modelName)}
return ret},getProfile:function(name){name=Ext.app.Controller.getFullName(name,'profile',this.$namespace);return name},getView:function(view){var name=Ext.app.Controller.getFullName(view,'view',this.$namespace);return name&&Ext.ClassManager.get(name.absoluteName)},destroy:function(destroyRefs,fromApp){var me=this,app=me.application,refCache,ref;if(!fromApp&&app){app.unregister(me)}
me.application=null;if(destroyRefs){refCache=me.refCache;for(ref in refCache){if(refCache.hasOwnProperty(ref)){Ext.destroy(refCache[ref])}}}
me.callParent()}})
;
Ext.define('Ext.app.Application',{extend:'Ext.app.Controller',requires:['Ext.util.History','Ext.util.MixedCollection'],isApplication:!0,scope:undefined,namespaces:[],paths:null,config:{name:'',appProperty:'app',profiles:[],currentProfile:null,mainView:{$value:null,lazy:!0},defaultToken:null,glyphFontFamily:null,quickTips:!0,router:null},onClassExtended:function(cls,data,hooks){var Controller=Ext.app.Controller,proto=cls.prototype,requires=[],onBeforeClassCreated,namespace;namespace=data.name||cls.superclass.name;if(namespace){data.$namespace=namespace;Ext.app.addNamespaces(namespace)}
if(data.namespaces){Ext.app.addNamespaces(data.namespaces)}
if(data['paths processed']){delete data['paths processed']}else{Ext.app.setupPaths(namespace,('appFolder' in data)?data.appFolder:cls.superclass.appFolder,data.paths)}
Controller.processDependencies(proto,requires,namespace,'profile',data.profiles);proto.getDependencies(cls,data,requires);if(requires.length){onBeforeClassCreated=hooks.onBeforeCreated;hooks.onBeforeCreated=function(cls,data){var args=Ext.Array.clone(arguments);if(data.__handleRequires){data.__handleRequires.call(this,requires,Ext.bind(function(){return onBeforeClassCreated.apply(this,args)},this));return}
Ext.require(requires,function(){return onBeforeClassCreated.apply(this,args)})}}},getDependencies:Ext.emptyFn,constructor:function(config){var me=this;Ext.route.Router.application=me;me.callParent([config]);if(Ext.isEmpty(me.getName())){Ext.raise("[Ext.app.Application] Name property is required")}
me.doInit(me);Ext.on('appupdate',me.onAppUpdate,me,{single:!0});Ext.Loader.setConfig({enabled:!0});this.onProfilesReady()},applyId:function(id){return id||this.$className},updateRouter:function(cfg){if(cfg){Ext.route.Router.setConfig(cfg)}},onAppUpdate:Ext.emptyFn,onProfilesReady:function(){var me=this,profiles=me.getProfiles(),length=profiles.length,current,i,instance;for(i=0;i<length;i++){instance=Ext.create(profiles[i],{application:me});if(instance.isActive()&&!current){current=instance;me.setCurrentProfile(current)}}
if(current){current.init()}
me.initControllers();me.onBeforeLaunch();me.finishInitControllers()},doInit:function(app){this.initNamespace(app);this.callParent([app])},initNamespace:function(me){var appProperty=me.getAppProperty(),ns=Ext.namespace(me.getName());if(ns){ns.getApplication=function(){return me};if(appProperty){if(!ns[appProperty]){ns[appProperty]=me}else if(ns[appProperty]!==me){Ext.log.warn('An existing reference is being overwritten for '+name+'.'+appProperty+'. See the appProperty config.')}}}},initControllers:function(){var me=this,controllers=Ext.Array.from(me.controllers),profile=me.getCurrentProfile(),i,ln;me.controllers=new Ext.util.MixedCollection();for(i=0,ln=controllers.length;i<ln;i++){me.getController(controllers[i])}
if(profile){controllers=profile.getControllers();for(i=0,ln=controllers.length;i<ln;i++){me.getController(controllers[i])}}},finishInitControllers:function(){var me=this,controllers,i,l;controllers=me.controllers.getRange();for(i=0,l=controllers.length;i<l;i++){controllers[i].finishInit(me)}},launch:Ext.emptyFn,onBeforeLaunch:function(){var me=this,History=Ext.util.History,defaultToken=me.getDefaultToken(),currentProfile=me.getCurrentProfile(),controllers,c,cLen,controller,token;me.initMainView();if(currentProfile){currentProfile.launch()}
me.launch.call(me.scope||me);me.launched=!0;me.fireEvent('launch',me);controllers=me.controllers.items;cLen=controllers.length;for(c=0;c<cLen;c++){controller=controllers[c];controller.onLaunch(me)}
if(!History.ready){History.init()}
token=History.getToken();if(token||token===defaultToken){Ext.route.Router.onStateChange(token)}else if(defaultToken){History.replace(defaultToken)}
if(Ext.Microloader&&Ext.Microloader.appUpdate&&Ext.Microloader.appUpdate.updated){Ext.Microloader.fireAppUpdate()}
if(!me.cnsTimer){me.cnsTimer=Ext.defer(Ext.ClassManager.clearNamespaceCache,2000,Ext.ClassManager)}},getModuleClassName:function(name,kind){return Ext.app.Controller.getFullName(name,kind,this.getName()).absoluteName},initMainView:function(){var me=this,currentProfile=me.getCurrentProfile(),mainView;if(currentProfile){mainView=currentProfile.getMainView()}
if(mainView){me.setMainView(mainView)}else{me.getMainView()}},applyMainView:function(value){var view=this.getView(value);return view.create({$initParent:this.viewport})},createController:function(name){return this.getController(name)},destroyController:function(controller){if(typeof controller==='string'){controller=this.getController(controller,!0)}
Ext.destroy(controller)},getController:function(name,preventCreate){var me=this,controllers=me.controllers,className,controller,len,i,c,all;controller=controllers.get(name);if(!controller){all=controllers.items;for(i=0,len=all.length;i<len;++i){c=all[i];className=c.getModuleClassName();if(className&&className===name){controller=c;break}}}
if(!controller&&!preventCreate){className=me.getModuleClassName(name,'controller');controller=Ext.create(className,{application:me,moduleClassName:className});controllers.add(controller);if(me._initialized){controller.doInit(me)}}
return controller},unregister:function(controller){this.controllers.remove(controller)},getApplication:function(){return this},destroy:function(destroyRefs){var me=this,controllers=me.controllers,ns=Ext.namespace(me.getName()),appProp=me.getAppProperty();Ext.undefer(me.cnsTimer);Ext.un('appupdate',me.onAppUpdate,me);Ext.destroy(me.viewport);if(controllers){controllers.each(function(controller){controller.destroy(destroyRefs,!0)})}
me.controllers=null;me.callParent([destroyRefs,!0]);if(ns&&ns[appProp]===me){delete ns[appProp]}
if(Ext.route.Router.application===me){Ext.route.Router.application=null}
if(Ext.app.Application.instance===me){Ext.app.Application.instance=null}},updateGlyphFontFamily:function(fontFamily){Ext.setGlyphFontFamily(fontFamily)},applyProfiles:function(profiles){var me=this;return Ext.Array.map(profiles,function(profile){return me.getModuleClassName(profile,"profile")})}},function(){Ext.getApplication=function(){return Ext.app.Application.instance}})
;
Ext.application=function(config){var createApp=function(App){Ext.onReady(function(){var Viewport=Ext.viewport;Viewport=Viewport&&Viewport.Viewport;if(Viewport&&Viewport.setup){Viewport.setup(App.prototype.config.viewport)}
Ext.app.Application.instance=new App()})};if(typeof config==="string"){Ext.require(config,function(){createApp(Ext.ClassManager.get(config))})}else{config=Ext.apply({extend:'Ext.app.Application'},config);Ext.app.setupPaths(config.name,config.appFolder,config.paths);config['paths processed']=!0;Ext.define(config.name+".$application",config,function(){createApp(this)})}}
;
Ext.define('Ext.overrides.app.Application',{override:'Ext.app.Application',uses:['Ext.tip.QuickTipManager'],autoCreateViewport:!1,config:{enableQuickTips:null},quickTips:!0,updateEnableQuickTips:function(enableQuickTips){this.setQuickTips(enableQuickTips)},applyMainView:function(mainView){var view,proto,config,protoPlugins,configPlugins;if(typeof mainView==='string'){view=this.getView(mainView);config={}}else{config=mainView;view=Ext.ClassManager.getByConfig(mainView)}
proto=view.prototype;if(!proto.isViewport){protoPlugins=Ext.Array.from(proto.plugins);configPlugins=Ext.Array.from(config.plugins);config=Ext.apply({},config);config.plugins=['viewport'].concat(protoPlugins,configPlugins)}
return view.create(config)},getDependencies:function(cls,data,requires){var Controller=Ext.app.Controller,proto=cls.prototype,namespace=data.$namespace,viewportClass=data.autoCreateViewport;if(viewportClass){if(!namespace){Ext.raise("[Ext.app.Application] Can't resolve namespace for "+data.$className+", did you forget to specify 'name' property?")}
if(viewportClass===!0){viewportClass='Viewport'}else{requires.push('Ext.plugin.Viewport')}
Controller.processDependencies(proto,requires,namespace,'view',viewportClass)}},onBeforeLaunch:function(){var me=this,autoCreateViewport=me.autoCreateViewport;if(me.getQuickTips()){me.initQuickTips()}
if(autoCreateViewport){me.initViewport()}
this.callParent(arguments)},getViewportName:function(){var name=null,autoCreate=this.autoCreateViewport;if(autoCreate){name=(autoCreate===!0)?'Viewport':autoCreate}
return name},initViewport:function(){this.setMainView(this.getViewportName())},initQuickTips:function(){Ext.tip.QuickTipManager.init()}})
;
Ext.define('Ext.app.Profile',{mixins:['Ext.mixin.Observable'],requires:['Ext.app.Controller'],isProfile:!0,config:{mainView:{$value:null,lazy:!0},application:null,controllers:[],models:[],views:[],stores:[]},constructor:function(config){this.initConfig(config);this.mixins.observable.constructor.apply(this,arguments)},isActive:function(){return!1},init:function(){var views=this.getViews(),xtype;if(views&&!(views instanceof Array)){for(xtype in views){Ext.ClassManager.setXType(views[xtype],xtype)}}},launch:Ext.emptyFn,onClassExtended:function(cls,data,hooks){var onBeforeClassCreated=hooks.onBeforeCreated;hooks.onBeforeCreated=function(cls,data){var Controller=Ext.app.Controller,className=cls.$className,requires=[],proto=cls.prototype,views=data.views,name,namespace;name=data.name;if(name){delete data.name}else{name=className.split('.');name=name[name.length-1]}
cls._name=name;cls._namespace=name=(data.namespace||name).toLowerCase();delete data.namespace;namespace=Controller.resolveNamespace(cls,data);Controller.processDependencies(proto,requires,namespace,'model',data.models,name);Controller.processDependencies(proto,requires,namespace,'store',data.stores,name);Controller.processDependencies(proto,requires,namespace,'controller',data.controllers,name);if(views){if(views instanceof Array){Controller.processDependencies(proto,requires,namespace,'view',views,name)}else{Ext.app.Profile.processViews(className,views,requires)}}
Ext.require(requires,Ext.Function.pass(onBeforeClassCreated,arguments,this))}},getName:function(){return this.self._name},getNamespace:function(){return this.self._namespace},privates:{statics:{processViews:function(className,views,requires){var body,cls,s,xtype;for(xtype in views){cls=views[xtype];if(typeof cls!=='string'){s=cls.xclass;if(!s){Ext.raise('Views must specify an xclass')}
body=Ext.apply({extend:s},cls);delete body.xclass;Ext.define(views[xtype]=className+'$'+xtype,body);cls=s}
requires.push(cls)}}}}})
;
Ext.define('Ext.app.domain.View',{extend:'Ext.app.EventDomain',requires:['Ext.Widget'],isInstance:!0,constructor:function(controller){this.callParent([controller]);this.controller=controller;this.monitoredClasses=[Ext.Widget]},match:function(target,selector,controller){var out=!1;if(selector==='#'){out=controller===target.getController()}else{out=target.is(selector)}
return out},destroy:function(){this.controller=null;this.callParent()}})
;
Ext.define('Ext.overrides.app.domain.View',{override:'Ext.app.domain.View',requires:['Ext.Component'],constructor:function(controller){this.callParent([controller]);this.monitoredClasses.push(Ext.Component)}})
;
Ext.define('Ext.app.ViewController',{extend:'Ext.app.BaseController',alias:'controller.controller',requires:['Ext.app.domain.View'],mixins:['Ext.mixin.Factoryable'],isViewController:!0,factoryConfig:{type:'controller'},config:{bindings:{$value:null,lazy:!0},closeViewAction:'destroy'},view:null,constructor:function(config){this.compDomain=new Ext.app.domain.View(this);this.callParent([config])},beforeInit:Ext.emptyFn,init:Ext.emptyFn,initViewModel:Ext.emptyFn,destroy:function(){var me=this,domain=me.compDomain,bind,b,key;if(me.$hasBinds){bind=me.getBindings();for(key in bind){b=bind[key];if(b){b.destroy()}}}
if(domain){domain.unlisten(me);domain.destroy()}
me.compDomain=me.view=null;me.callParent()},closeView:function(){var view=this.getView(),action;if(view){action=this.getCloseViewAction();view[action]()}},control:function(selectors,listeners){var obj=selectors;if(Ext.isString(selectors)){obj={};obj[selectors]=listeners}
this.compDomain.listen(obj,this)},listen:function(to,controller){var component=to.component;if(component){to=Ext.apply({},to);delete to.component;this.control(component)}
this.callParent([to,controller])},applyId:function(id){if(!id){id=Ext.id(null,'controller-')}
return id},getReferences:function(){var view=this.view;return view&&view.getReferences()},getView:function(){return this.view},lookup:function(key){var view=this.view;return view&&view.lookup(key)},lookupReference:function(key){return this.lookup(key)},getSession:function(){var view=this.view;return view&&view.lookupSession()},getViewModel:function(){var view=this.view;return view&&view.lookupViewModel()},getStore:function(name){var viewModel=this.getViewModel();return viewModel?viewModel.getStore(name):null},fireViewEvent:function(eventName,args){var view=this.view,result=!1,a=arguments;if(view){if(view!==args){a=Ext.Array.slice(a);a.splice(1,0,view)}
result=view.fireEvent.apply(view,a)}
return result},applyBindings:function(bindings){if(!bindings){return null}
var me=this,viewModel=me.getViewModel(),getBindTemplateScope=me.getBindTemplateScope(),b,fn,descriptor;me.$hasBinds=!0;if(!viewModel){Ext.raise('Cannot use bind config without a viewModel')}
for(fn in bindings){descriptor=bindings[fn];b=null;if(descriptor){b=viewModel.bind(descriptor,fn,me);b.getTemplateScope=getBindTemplateScope}
bindings[fn]=b}
return bindings},privates:{view:null,attachReference:function(component){var view=this.view;if(view){view.attachReference(component)}},getBindTemplateScope:function(){return this.scope},initBindings:function(){this.getBindings()},setView:function(view){this.view=view;if(!this.beforeInit.$nullFn){this.beforeInit(view)}}}})
;
Ext.define('Ext.util.Bag',{isBag:!0,constructor:function(){this.items=[];this.map={}},generation:0,length:0,beginUpdate:Ext.emptyFn,endUpdate:Ext.emptyFn,add:function(item){var me=this,items=me.items,map=me.map,n=1,old,i,idx,id,it,ret,was;if(Ext.isArray(item)){old=ret=[];n=item.length}
for(i=0;i<n;i++){id=me.getKey(it=old?item[i]:item);idx=map[id];if(idx===undefined){items.push(it);map[id]=me.length++;if(old){old.push(it)}else{ret=it}}else{was=items[idx];if(old){old.push(was)}else{ret=was}
items[idx]=it}}
++me.generation;return ret},clear:function(){var me=this,needsClear=me.generation||me.length,ret=needsClear?me.items:[];if(needsClear){me.items=[];me.length=0;me.map={};++me.generation}
return ret},clone:function(){var me=this,ret=new me.self(),len=me.length;if(len){Ext.apply(ret.map,me.map);ret.items=me.items.slice();ret.length=me.length}
return ret},contains:function(item){var ret=!1,map=this.map,key;if(item!=null){key=this.getKey(item);if(key in map){ret=this.items[map[key]]===item}}
return ret},containsKey:function(key){return key in this.map},destroy:function(){this.items=this.map=null;this.callParent()},each:function(fn,scope){var items=this.items,len=items.length,i,ret;if(len){scope=scope||this;items=items.slice(0);for(i=0;i<len;i++){ret=fn.call(scope,items[i],i,len);if(ret===!1){break}}}
return ret},getAt:function(index){var out=null;if(index<this.length){out=this.items[index]}
return out},get:function(key){return this.getByKey(key)},getByKey:function(key){var map=this.map,ret=(key in map)?this.items[map[key]]:null;return ret},indexOfKey:function(key){var map=this.map,ret=(key in map)?map[key]:-1;return ret},last:function(){return this.items[this.length-1]},updateKey:function(item,oldKey){var me=this,map=me.map,newKey;if(!item||!oldKey){return}
if((newKey=me.getKey(item))!==oldKey){if(me.getAt(map[oldKey])===item&&!(newKey in map)){me.generation++;map[newKey]=map[oldKey];delete map[oldKey]}}else{if(newKey in map&&me.getAt(map[newKey])!==item){Ext.raise('Duplicate newKey "'+newKey+'" for item with oldKey "'+oldKey+'"')}
if(oldKey in map&&me.getAt(map[oldKey])!==item){Ext.raise('Incorrect oldKey "'+oldKey+'" for item with newKey "'+newKey+'"')}}},getCount:function(){return this.length},getKey:function(item){return item.id||item.getId()},getRange:function(begin,end){var items=this.items,length=items.length,range;if(!length){range=[]}else{range=Ext.Number.clipIndices(length,[begin,end]);range=items.slice(range[0],range[1])}
return range},remove:function(item){var me=this,map=me.map,items=me.items,ret=null,n=1,changed,old,i,idx,id,last,was;if(Ext.isArray(item)){n=item.length;old=ret=[]}
if(me.length){for(i=0;i<n;i++){idx=map[id=me.getKey(old?item[i]:item)];if(idx!==undefined){delete map[id];was=items[idx];if(old){old.push(was)}else{ret=was}
last=items.pop();if(idx<--me.length){items[idx]=last;map[me.getKey(last)]=idx}
changed=!0}}
if(changed){++me.generation}}
return ret},removeByKey:function(key){var item=this.getByKey(key);if(item){this.remove(item)}
return item||null},replace:function(item){this.add(item);return item},sort:function(fn){var me=this,items=me.items,n=items.length,item;if(n){Ext.Array.sort(items,fn);me.map={};while(n-->0){item=items[n];me.map[me.getKey(item)]=n}
++me.generation}}})
;
Ext.define('Ext.util.Scheduler',{mixins:['Ext.mixin.Observable'],requires:['Ext.util.Bag'],busyCounter:0,lastBusyCounter:0,destroyed:!1,firing:null,notifyIndex:-1,nextId:0,orderedItems:null,passes:0,scheduledCount:0,validIdRe:null,config:{cycleLimit:5,preSort:null,tickDelay:5},suspendOnNotify:!0,constructor:function(config){if(Ext.util.Scheduler.instances){Ext.util.Scheduler.instances.push(this)}else{Ext.util.Scheduler.instances=[this]}
this.id=Ext.util.Scheduler.count=(Ext.util.Scheduler.count||0)+1;this.mixins.observable.constructor.call(this,config);this.items=new Ext.util.Bag()},destroy:function(){var me=this,timer=me.timer;if(timer){window.clearTimeout(timer);me.timer=null}
me.items.destroy();me.items=me.orderedItems=null;me.callParent();Ext.Array.remove(Ext.util.Scheduler.instances,this)},add:function(item){var me=this,items=me.items;if(items===me.firing){me.items=items=items.clone()}
item.id=item.id||++me.nextId;item.scheduler=me;items.add(item);if(!me.sortMap){me.orderedItems=null}},remove:function(item){var me=this,items=me.items;if(me.destroyed){return}
if(me.sortMap){Ext.raise('Items cannot be removed during sort')}
if(items===me.firing){me.items=items=items.clone()}
if(item.scheduled){me.unscheduleItem(item);item.scheduled=!1}
items.remove(item);me.orderedItems=null},sort:function(){var me=this,items=me.items,sortMap={},preSort=me.getPreSort(),i,item;me.orderedItems=[];me.sortMap=sortMap;me.sortStack=[];if(preSort){items.sort(preSort)}
items=items.items;for(i=0;i<items.length;++i){item=items[i];if(!sortMap[item.id]){me.sortItem(item)}}
me.sortMap=null;me.sortStack=null},sortItem:function(item){var me=this,sortMap=me.sortMap,orderedItems=me.orderedItems,itemId;if(!item.scheduler){me.add(item)}
itemId=item.id;if(item.scheduler!==me){Ext.raise('Item '+itemId+' belongs to another Scheduler')}
me.sortStack.push(item);if(sortMap[itemId]===0){for(var cycle=[],i=0;i<me.sortStack.length;++i){cycle[i]=me.sortStack[i].getFullName()}
Ext.raise('Dependency cycle detected: '+cycle.join('\n --> '))}
if(!(itemId in sortMap)){sortMap[itemId]=0;if(!item.sort.$nullFn){item.sort()}
sortMap[itemId]=1;item.order=me.orderedItems.length;orderedItems.push(item)}
me.sortStack.pop();return me},sortItems:function(items){var me=this,sortItem=me.sortItem;if(items){if(items instanceof Array){Ext.each(items,sortItem,me)}else{Ext.Object.eachValue(items,sortItem,me)}}
return me},applyPreSort:function(preSort){if(typeof preSort==='function'){return preSort}
var parts=preSort.split(','),direction=[],length=parts.length,c,i,s;for(i=0;i<length;++i){direction[i]=1;s=parts[i];if((c=s.charAt(0))==='-'){direction[i]=-1}else if(c!=='+'){c=0}
if(c){parts[i]=s.substring(1)}}
return function(lhs,rhs){var ret=0,i,prop,v1,v2;for(i=0;!ret&&i<length;++i){prop=parts[i];v1=lhs[prop];v2=rhs[prop];ret=direction[i]*((v1<v2)?-1:((v2<v1)?1:0))}
return ret}},notify:function(){var me=this,timer=me.timer,cyclesLeft=me.getCycleLimit(),globalEvents=Ext.GlobalEvents,suspend=me.suspendOnNotify,busyCounter,i,item,len,queue,firedEvent;if(timer){window.clearTimeout(timer);me.timer=null}
if(!me.firing&&me.scheduledCount){if(suspend){Ext.suspendLayouts()}
while(me.scheduledCount){if(cyclesLeft){--cyclesLeft}else{me.firing=null;if(me.onCycleLimitExceeded){me.onCycleLimitExceeded()}
break}
if(!firedEvent){firedEvent=!0;if(globalEvents.hasListeners.beforebindnotify){globalEvents.fireEvent('beforebindnotify',me)}}
++me.passes;if(!(queue=me.orderedItems)){me.sort();queue=me.orderedItems}
len=queue.length;if(len){me.firing=me.items;for(i=0;i<len;++i){item=queue[i];if(item.scheduled){item.scheduled=!1;--me.scheduledCount;me.notifyIndex=i;item.react();if(!me.scheduledCount){break}}}}}
me.firing=null;me.notifyIndex=-1;if(suspend){Ext.resumeLayouts(!0)}}
if((busyCounter=me.busyCounter)!==me.lastBusyCounter){if(!(me.lastBusyCounter=busyCounter)){me.fireEvent('idle',me)}}},onTick:function(){this.timer=null;this.notify()},scheduleItem:function(item){var me=this;++me.scheduledCount;if(!me.timer&&!me.firing){me.scheduleTick()}},scheduleTick:function(){var me=this;if(!me.destroyed&&!me.timer){me.timer=Ext.defer(me.onTick,me.getTickDelay(),me)}},unscheduleItem:function(item){if(this.scheduledCount){--this.scheduledCount}},adjustBusy:function(adjustment){var me=this,busyCounter=me.busyCounter+adjustment;me.busyCounter=busyCounter;if(busyCounter){if(!me.lastBusyCounter){me.lastBusyCounter=busyCounter;me.fireEvent('busy',me)}}else if(me.lastBusyCounter&&!me.timer){me.scheduleTick()}},isBusy:function(){return!this.isIdle()},isIdle:function(){return!(this.busyCounter+this.lastBusyCounter)},debugHooks:{$enabled:!1,onCycleLimitExceeded:function(){Ext.raise('Exceeded cycleLimit '+this.getCycleLimit())},scheduleItem:function(item){if(!item){Ext.raise('scheduleItem: Invalid argument')}
Ext.log('Schedule item: '+item.getFullName()+' - '+(this.scheduledCount+1));if(item.order<=this.notifyIndex){Ext.log.warn('Suboptimal order: '+item.order+' < '+this.notifyIndex)}
this.callParent([item])},unscheduleItem:function(item){if(!this.scheduledCount){Ext.raise('Invalid scheduleCount')}
this.callParent([item]);Ext.log('Unschedule item: '+item.getFullName()+' - '+this.scheduledCount)}}})
;
Ext.define('Ext.data.Batch',{mixins:{observable:'Ext.mixin.Observable'},config:{pauseOnException:!1},current:-1,total:0,running:!1,complete:!1,exception:!1,constructor:function(config){var me=this;me.mixins.observable.constructor.call(me,config);me.operations=[];me.exceptions=[]},add:function(operation){var me=this,i,len;if(Ext.isArray(operation)){for(i=0,len=operation.length;i<len;++i){me.add(operation[i])}}else{me.total++;operation.setBatch(me);me.operations.push(operation)}
return me},sort:function(){this.operations.sort(this.sortFn)},sortFn:function(operation1,operation2){var ret=operation1.order-operation2.order;if(ret){return ret}
var entityType1=operation1.entityType,entityType2=operation2.entityType,rank;if(!entityType1||!entityType2){return 0}
if(!(rank=entityType1.rank)){entityType1.schema.rankEntities();rank=entityType1.rank}
return(rank-entityType2.rank)*operation1.foreignKeyDirection},start:function(index){var me=this;if(me.destroyed||!me.operations.length||me.running){return me}
me.exceptions.length=0;me.exception=!1;me.running=!0;return me.runOperation(Ext.isDefined(index)?index:me.current+1)},abort:function(){var me=this,op;if(me.running){op=me.getCurrent();if(!op.destroyed){op.abort()}}
me.running=!1;me.aborted=!0;me.current=undefined},retry:function(){return this.start(this.current)},runNextOperation:function(){var me=this;if(me.running){me.runOperation(me.current+1)}
return me},pause:function(){this.running=!1;return this},getOperations:function(){return this.operations},getExceptions:function(){return this.exceptions},getCurrent:function(){var out=null,current=this.current;if(!(current===-1||this.complete)){out=this.operations[current]}
return out},getTotal:function(){return this.total},isRunning:function(){return this.running},isComplete:function(){return this.complete},hasException:function(){return this.exception},runOperation:function(index){var me=this,operations=me.operations,operation=operations[index];if(operation===undefined){me.running=!1;me.complete=!0;me.fireEvent('complete',me,operations[operations.length-1])}else{me.current=index;operation.setInternalCallback(me.onOperationComplete);operation.setInternalScope(me);operation.execute()}
return me},onOperationComplete:function(operation){var me=this,exception=operation.hasException();if(exception){me.exception=!0;me.exceptions.push(operation);me.fireEvent('exception',me,operation)}
if(exception&&me.getPauseOnException()){me.pause()}else{me.fireEvent('operationcomplete',me,operation);me.runNextOperation()}},destroy:function(){var me=this,operations=me.operations,op,i,len;if(me.running){me.abort()}
for(i=0,len=me.operations.length;i<len;i++){op=operations[i];if(op){if(!op.destroyed&&!op.$destroyOwner){op.destroy()}
op[i]=null}}
me.operations=me.exceptions=null;me.callParent()}})
;
Ext.define('Ext.data.matrix.Slice',{constructor:function(side,id){this.id=id;this.side=side;this.members={}},attach:function(store){var me=this;Ext.Assert.falsey(me.store,'Store is already attached');me.store=store;store.matrix=me;store.on('load',me.onStoreLoad,me,{single:!0})},commit:function(){var members=this.members,id;for(id in members){members[id][2]=0}},onStoreLoad:function(store){this.update(store.getData().items,0)},update:function(recordsOrIds,state){if(!(recordsOrIds instanceof Array)){Ext.raise('Only array of records or record ids are supported')}
var me=this,MatrixSlice=Ext.data.matrix.Slice,side=me.side,assocIndex=side.index,length=recordsOrIds.length,id=me.id,members=me.members,otherSide=side.inverse,otherSlices=otherSide.slices,assoc,call,i,item,otherId,otherSlice,record;for(i=0;i<length;++i){call=record=null;item=recordsOrIds[i];otherId=item.isEntity?(record=item).id:item;assoc=members[otherId];if(state<0&&assoc&&assoc[2]===1){delete members[otherId];otherSlice=otherSlices[otherId];if(otherSlice){delete otherSlice.members[id]}
call=1}else{if(!assoc){assoc=[otherId,otherId,state];assoc[assocIndex]=id;members[otherId]=assoc;otherSlice=otherSlices[otherId];if(!otherSlice){otherSlices[otherId]=otherSlice=new MatrixSlice(otherSide,otherId)}
otherSlice.members[id]=assoc;call=1}else if(state!==assoc[2]&&state!==0&&!(state===1&&assoc[2]===0)){assoc[2]=state;otherSlice=otherSlices[otherId];call=1}}
if(call){if(me.notify){me.notify.call(me.scope,me,otherId,state)}
if(otherSlice&&otherSlice.notify){otherSlice.notify.call(otherSlice.scope,otherSlice,id,state)}}}},updateId:function(newId){var me=this,oldId=me.id,side=me.side,slices=side.slices,slice=slices[oldId],members=slice.members,index=side.index,otherSlices=side.inverse.slices,assoc,otherId,otherMembers;me.id=newId;slices[newId]=slice;delete slices[oldId];for(otherId in members){assoc=members[otherId];assoc[index]=newId;otherMembers=otherSlices[otherId].members;otherMembers[newId]=otherMembers[oldId];delete otherMembers[oldId]}},destroy:function(){var me=this,store=me.store;if(store){store.matrix=null;store.un('load',me.onStoreLoad,me)}
me.notify=me.scope=me.store=me.side=me.members=null;me.callParent()}})
;
Ext.define('Ext.data.matrix.Side',{requires:['Ext.data.matrix.Slice'],constructor:function(matrix,index,role){var me=this;me.matrix=matrix;me.index=index;me.role=role;me.slices={}},commit:function(){var slices=this.slices,id;for(id in slices){slices[id].commit()}},get:function(id1,id2){var me=this,slices=me.slices,slice=slices[id1]||(slices[id1]=new Ext.data.matrix.Slice(me,id1));return(id2||id2===0)?slice.members[id2]:slice},update:function(id1,id2,state){var slice=this.get(id1);return slice.update(id2,state)},updateId:function(oldId,newId){var slice=this.get(oldId);if(slice){slice.updateId(newId)}},destroy:function(){var me=this,slices=me.slices,id;for(id in slices){slices[id].destroy()}
me.inverse=me.matrix=me.role=me.slices=null;me.callParent()}})
;
Ext.define('Ext.data.matrix.Matrix',{requires:['Ext.data.matrix.Side'],constructor:function(session,matrix){var me=this,association=matrix.isManyToMany?matrix:session.getSchema().getAssociation(matrix),Side=Ext.data.matrix.Side,left=new Side(me,0,association.left),right=new Side(me,1,association.right);Ext.Assert.truthy(association.isManyToMany,'Association is not many-to-many');me.association=association;me.session=session;me.left=left;me.right=right;left.inverse=right;right.inverse=left},commit:function(){this.left.commit();this.right.commit()},update:function(id1,id2,state){return this.left.update(id1,id2,state)},updateId:function(record,oldId,newId){var Type=record.self,left=this.left,right=this.right,matchSide;if(Type===left.role.cls){matchSide=left}
if(Type===right.role.cls){matchSide=right}
if(matchSide){matchSide.updateId(oldId,newId)}},destroy:function(){var me=this;me.left.destroy();me.right.destroy();me.association=me.session=me.left=me.right=null;me.callParent()}})
;
Ext.define('Ext.data.session.ChangesVisitor',{constructor:function(session){var me=this,crud;me.session=session;crud=session.getCrudProperties();me.result=null;me.writerOptions={};me.createKey=crud.create;me.readKey=crud.read;me.updateKey=crud.update;me.dropKey=crud.drop},onDirtyRecord:function(record){var me=this,crud=me.crud,created=record.phantom,dropped=record.dropped,type=record.$className,prop=(created||dropped)?'allDataOptions':'partialDataOptions',writerOptions=me.writerOptions,name=record.entityName,options,bucket,entry,result;if(created&&dropped){return!1}
crud=created?me.createKey:(dropped?me.dropKey:me.updateKey);writerOptions=writerOptions[type]||(writerOptions[type]={});if(dropped){if(!(options=writerOptions.drop)){writerOptions.drop=options={all:record.getProxy().getWriter().getWriteAllFields()}}
if(!options.all){entry=record.id}}
if(!entry){if(!(options=writerOptions[prop])){options=record.getProxy().getWriter().getConfig(prop);writerOptions[prop]=options=Ext.Object.chain(options);me.setupOptions(options)}
entry=record.getData(options)}
result=me.result||(me.result={});bucket=result[name]||(result[name]={});bucket=bucket[crud]||(bucket[crud]=[]);bucket.push(entry)},setupOptions:function(options){options.serialize=!0},onMatrixChange:function(association,id1,id2,state){var me=this,name=association.left.type,assocName=association.right.role,operation=state<0?me.dropKey:me.createKey,bucket,result;result=me.result||(me.result={});bucket=result[name]||(result[name]={});bucket=bucket[assocName]||(bucket[assocName]={});bucket=bucket[operation]||(bucket[operation]={});bucket=bucket[id1]||(bucket[id1]=[]);bucket.push(id2)}})
;
Ext.define('Ext.data.session.ChildChangesVisitor',{extend:'Ext.data.session.ChangesVisitor',constructor:function(){this.seen={};this.callParent(arguments)},setupOptions:function(options){this.callParent([options]);options.serialize=!1},onDirtyRecord:function(record){if(this.callParent(arguments)!==!1){if(!record.$source&&(record.dropped||!record.phantom)){this.readEntity(record)}}},readEntity:function(record){var me=this,readKey=me.readKey,name=record.entityName,id=record.id,seen=me.seen,seenKey=name+id,result,bucket;if(seen[seenKey]){return}
seen[seenKey]=!0;result=me.result||(me.result={});bucket=result[name]||(result[name]={});bucket=bucket[readKey]||(bucket[readKey]=[]);bucket.push(Ext.apply({},record.modified,record.data))}})
;
Ext.define('Ext.data.session.BatchVisitor',{map:null,constructor:function(batch){this.batch=batch},getBatch:function(sort){var map=this.map,batch=this.batch,bucket,entity,name,operation,operationType,proxy,batchActions,records,len,i;if(map){if(!batch){batch=new Ext.data.Batch()}
for(name in map){bucket=map[name];entity=bucket.entity;proxy=entity.getProxy();batchActions=proxy.getBatchActions();delete bucket.entity;for(operationType in bucket){if(batchActions){operation=proxy.createOperation(operationType,{records:bucket[operationType]});operation.entityType=entity;batch.add(operation)}else{records=bucket[operationType];for(i=0,len=records.length;i<len;++i){operation=proxy.createOperation(operationType,{records:[records[i]]});operation.entityType=entity;batch.add(operation)}}}}}
if(batch&&sort!==!1){batch.sort()}
return batch},onDirtyRecord:function(record){var me=this,operation=record.phantom?'create':(record.dropped?'destroy':'update'),name=record.$className,map=(me.map||(me.map={})),bucket=(map[name]||(map[name]={entity:record.self}));bucket=bucket[operation]||(bucket[operation]=[]);bucket.push(record)}})
;
Ext.define('Ext.mixin.Dirty',{mixinId:'dirty',config:{dirty:{$value:!1,lazy:!0}},dirty:!1,_dirtyRecordCount:0,ignoreDirty:!1,recordStateIsDirtyState:!0,isDirty:function(){return this.getDirty()},applyDirty:function(dirty){return this.ignoreDirty?!1:dirty},updateDirty:function(dirty){var me=this;me.dirty=dirty;if(me.fireEvent&&!me.isDirtyInitializing){me.fireDirtyChange()}},clearRecordStates:function(){var me=this,counters=me._crudCounters;if(counters){counters.C=counters.U=counters.D=0}
me._dirtyRecordCount=0;if(me.recordStateIsDirtyState){me.setDirty(!1)}},fireDirtyChange:function(){var me=this;if(!me.ignoreDirty&&me.hasListeners.dirtychange){me.fireEvent('dirtychange',me,me.dirty)}},trackRecordState:function(record,initial){var me=this,counters=me._crudCounters||(me._crudCounters={C:0,R:0,U:0,D:0}),dirtyRecordCountWas=me._dirtyRecordCount,state=record.crudState,stateWas=record.crudStateWas,changed,dirtyRecordCount;if(initial||state!==stateWas){if(!initial&&stateWas){--counters[stateWas]}
if(!(record.phantom&&state==='D')){++counters[state]}
me.checkCounters();me._dirtyRecordCount=dirtyRecordCount=counters.C+counters.U+counters.D;changed=!dirtyRecordCount!==!dirtyRecordCountWas;if(changed&&me.recordStateIsDirtyState){me.setDirty(dirtyRecordCount>0)}}
return changed},untrackRecordState:function(record){var me=this,counters=me._crudCounters,dirtyRecordCountWas=me._dirtyRecordCount,state=record.crudState,changed,dirtyRecordCount;if(counters&&state!=='D'&&!record.erased){--counters[state];me.checkCounters();me._dirtyRecordCount=dirtyRecordCount=counters.C+counters.U+counters.D;changed=!dirtyRecordCount!==!dirtyRecordCountWas;if(changed&&me.recordStateIsDirtyState){me.setDirty(dirtyRecordCount>0)}}
return changed},checkCounters:function(){var counters=this._crudCounters,key;for(key in counters){if(counters[key]<0){Ext.raise('Invalid state for '+key)}}}})
;
Ext.define('Ext.data.Session',{requires:['Ext.data.schema.Schema','Ext.data.Batch','Ext.data.matrix.Matrix','Ext.data.session.ChangesVisitor','Ext.data.session.ChildChangesVisitor','Ext.data.session.BatchVisitor'],mixins:['Ext.mixin.Dirty','Ext.mixin.Observable'],isSession:!0,config:{schema:'default',parent:null,autoDestroy:!0,crudProperties:{create:'C',read:'R',update:'U',drop:'D'}},crudOperations:[{type:'R',entityMethod:'readEntities'},{type:'C',entityMethod:'createEntities'},{type:'U',entityMethod:'updateEntities'},{type:'D',entityMethod:'dropEntities'}],crudKeys:{C:1,R:1,U:1,D:1},statics:{nextId:1},constructor:function(config){var me=this;me.data={};me.matrices={};me.id=Ext.data.Session.nextId++;me.identifierCache={};me.recordCreator=me.recordCreator.bind(me);me.mixins.observable.constructor.call(me,config)},destroy:function(){var me=this,matrices=me.matrices,data=me.data,entityName,entities,record,id;for(id in matrices){matrices[id].destroy()}
for(entityName in data){entities=data[entityName];for(id in entities){record=entities[id].record;if(record){record.$source=null;record.unjoin(me)}}}
me.identifierCache=me.recordCreator=me.matrices=me.data=null;me.setSchema(null);me.callParent()},adopt:function(record){var me=this,associations=record.associations,roleName;me.checkModelType(record.self);if(record.session&&record.session!==me){Ext.raise('Record already belongs to an existing session')}
if(record.session!==me){me.add(record);if(associations){for(roleName in associations){associations[roleName].adoptAssociated(record,me)}}}},commit:function(){var me=this,data=me.data,matrices=me.matrices,dirtyWas=me.getDirty(),entityName,entities,id,record;me.suspendEvent('dirtychange');for(entityName in data){entities=data[entityName];for(id in entities){record=entities[id].record;if(record){record.commit()}}}
for(id in matrices){matrices[id].commit()}
me.clearRecordStates();me.resumeEvent('dirtychange');if(me.getDirty()!==dirtyWas){me.fireDirtyChange()}},createRecord:function(type,data,preventAdd){this.checkModelType(type);var Model=type.$isClass?type:this.getSchema().getEntity(type),parent=this.getParent(),id;if(data&&parent){id=Model.getIdFromData(data);if(parent.peekRecord(Model,id)){Ext.raise('A parent session already contains an entry for '+Model.entityName+': '+id)}}
return new Model(data,preventAdd?null:this)},getChanges:function(){var visitor=new Ext.data.session.ChangesVisitor(this);this.visitData(visitor);return visitor.result},getChangesForParent:function(){var visitor=new Ext.data.session.ChildChangesVisitor(this);this.visitData(visitor);return visitor.result},getRecord:function(type,id,autoLoad){var me=this,wasInstance=type.isModel,record,Model,parent,parentRec;if(wasInstance){wasInstance=type;id=type.id;type=type.self}
record=me.peekRecord(type,id);if(!record){Model=type.$isClass?type:me.getSchema().getEntity(type);parent=me.getParent();if(parent){parentRec=parent.peekRecord(Model,id)}
if(parentRec){if(parentRec.isLoading()){wasInstance=!1}else{record=parentRec.copy(undefined,me);record.$source=parentRec}}
if(!record){if(wasInstance){record=wasInstance;me.adopt(record)}else{record=Model.createWithId(id,null,me);if(autoLoad!==!1){record.load(Ext.isObject(autoLoad)?autoLoad:undefined)}}}}
return record},getSaveBatch:function(sort){var visitor=new Ext.data.session.BatchVisitor();this.visitData(visitor);return visitor.getBatch(sort)},onInvalidAssociationEntity:function(entityType,id){Ext.raise('Unable to read association entity: '+this.getModelIdentifier(entityType,id))},onInvalidEntityCreate:function(entityType,id){Ext.raise('Cannot create, record already not exists: '+this.getModelIdentifier(entityType,id))},onInvalidEntityDrop:function(entityType,id){Ext.raise('Cannot drop, record does not exist: '+this.getModelIdentifier(entityType,id))},onInvalidEntityRead:function(entityType,id){Ext.raise('Cannot read, record already not exists: '+this.getModelIdentifier(entityType,id))},onInvalidEntityUpdate:function(entityType,id,dropped){if(dropped){Ext.raise('Cannot update, record dropped: '+this.getModelIdentifier(entityType,id))}else{Ext.raise('Cannot update, record does not exist: '+this.getModelIdentifier(entityType,id))}},peekRecord:function(type,id,deep){this.checkModelType(type);var entityType=type.$isClass?type:this.getSchema().getEntity(type),entityName=entityType.entityName,entry=this.data[entityName],ret,parent;entry=entry&&entry[id];ret=entry&&entry.record;if(!ret&&deep){parent=this.getParent();ret=parent&&parent.peekRecord(type,id,deep)}
return ret||null},save:function(){var me=this,parent=me.getParent(),visitor;if(parent){visitor=new Ext.data.session.ChildChangesVisitor(me);me.visitData(visitor);parent.update(visitor.result);me.commit()}else{Ext.raise('Cannot commit session, no parent exists')}},spawn:function(){return new this.self({schema:this.getSchema(),parent:this})},update:function(data){var me=this,schema=me.getSchema(),crudOperations=me.crudOperations,len=crudOperations.length,crudKeys=me.crudKeys,dirtyWas=me.getDirty(),entityName,entityType,entityInfo,i,operation,item,associations,key,role,associationData;me.suspendEvent('dirtychange');me.getSchema().processKeyChecks(!0);for(entityName in data){entityType=schema.getEntity(entityName);if(!entityType){Ext.raise('Invalid entity type: '+entityName)}
entityInfo=data[entityName];for(i=0;i<len;++i){operation=crudOperations[i];item=entityInfo[operation.type];if(item){me[operation.entityMethod](entityType,item)}}}
for(entityName in data){entityType=schema.getEntity(entityName);associations=entityType.associations;entityInfo=data[entityName];for(key in entityInfo){if(crudKeys[key]){continue}
role=associations[key];if(!role){Ext.raise('Invalid association key for '+entityName+', "'+key+'"')}
associationData=entityInfo[role.role];role.processUpdate(me,associationData)}}
me.resumeEvent('dirtychange');if(me.getDirty()!==dirtyWas){me.fireDirtyChange()}},afterCommit:function(record){this.trackRecordState(record)},afterDrop:function(record){this.trackRecordState(record)},afterEdit:function(record){this.trackRecordState(record)},afterErase:function(record){this.evict(record)},afterReject:function(record){this.trackRecordState(record)},privates:{add:function(record){var me=this,id=record.id,entry=me.getEntry(record.self,id),associations,roleName;if(entry.record){Ext.raise('Duplicate id '+record.id+' for '+record.entityName)}
record.session=me;entry.record=record;me.trackRecordState(record,!0);me.registerReferences(record);associations=record.associations;for(roleName in associations){associations[roleName].checkMembership(me,record)}},applySchema:function(schema){return Ext.data.schema.Schema.get(schema)},checkModelType:function(name){if(name.$isClass){name=name.entityName}
if(!name){Ext.raise('Unable to use anonymous models in a Session')}else if(!this.getSchema().getEntity(name)){Ext.raise('Unknown entity type '+name)}},createEntities:function(entityType,items){var me=this,len=items.length,i,data,rec,id;for(i=0;i<len;++i){data=items[i];id=entityType.getIdFromData(data);rec=me.peekRecord(entityType,id);if(!rec){rec=me.createRecord(entityType,data,!0);rec.phantom=!0;rec.crudState='C';me.add(rec);rec.crudStateWas='C'}else{me.onInvalidEntityCreate(entityType,id)}}},dropEntities:function(entityType,ids){var len=ids.length,i,rec,id,extractId;if(len){extractId=Ext.isObject(ids[0])}
for(i=0;i<len;++i){id=ids[i];if(extractId){id=entityType.getIdFromData(id)}
rec=this.peekRecord(entityType,id);if(rec){rec.drop()}else{this.onInvalidEntityDrop(entityType,id)}}},evict:function(record){var me=this,entityName=record.entityName,entities=me.data[entityName],id=record.id;if(entities&&entities[id]){me.untrackRecordState(record);record.unjoin(me);delete entities[id]}},getEntityList:function(entityType,ids){var len=ids.length,i,id,rec,invalid;for(i=0;i<len;++i){id=ids[i];rec=this.peekRecord(entityType,id);if(rec){ids[i]=rec}else{invalid=!0;ids[i]=null;this.onInvalidAssociationEntity(entityType,id)}}
if(invalid){ids=Ext.Array.clean(ids)}
return ids},getEntry:function(type,id){if(type.isModel){id=type.getId();type=type.self}
var entityType=type.$isClass?type:this.getSchema().getEntity(type),entityName=entityType.entityName,data=this.data,entry;entry=data[entityName]||(data[entityName]={});entry=entry[id]||(entry[id]={});return entry},getRefs:function(record,role,includeParent){var entry=this.getEntry(record),refs=entry&&entry.refs&&entry.refs[role.role],parent=includeParent&&this.getParent(),parentRefs,id,rec;if(parent){parentRefs=parent.getRefs(record,role);if(parentRefs){for(id in parentRefs){rec=parentRefs[id];if((!refs||!refs[id])){this.getRecord(rec.self,rec.id)}}
refs=entry&&entry.refs&&entry.refs[role.role]}}
return refs||null},getIdentifier:function(entityType){var parent=this.getParent(),cache,identifier,key,ret;if(parent){ret=parent.getIdentifier(entityType)}else{cache=this.identifierCache;identifier=entityType.identifier;key=identifier.getId()||entityType.entityName;ret=cache[key];if(!ret){if(identifier.clone){ret=identifier.clone({id:null})}else{ret=identifier}
cache[key]=ret}}
return ret},getMatrix:function(matrix,preventCreate){var name=matrix.isManyToMany?matrix.name:matrix,matrices=this.matrices,ret;ret=matrices[name];if(!ret&&!preventCreate){ret=matrices[name]=new Ext.data.matrix.Matrix(this,matrix)}
return ret||null},getMatrixSlice:function(role,id){var matrix=this.getMatrix(role.association),side=matrix[role.side];return side.get(id)},getModelIdentifier:function(entityType,id){return id+'@'+entityType.entityName},onIdChanged:function(record,oldId,newId){var me=this,matrices=me.matrices,entityName=record.entityName,id=record.id,bucket=me.data[entityName],entry=bucket[oldId],associations=record.associations,refs=entry.refs,setNoRefs=me._setNoRefs,association,fieldName,refId,role,roleName,roleRefs,key;if(bucket[newId]){Ext.raise('Cannot change '+entityName+' id from '+oldId+' to '+newId+' id already exists')}
delete bucket[oldId];bucket[newId]=entry;for(key in matrices){matrices[key].updateId(record,oldId,newId)}
if(refs){for(roleName in refs){roleRefs=refs[roleName];role=associations[roleName];association=role.association;if(!association.isManyToMany){fieldName=association.field.name;for(refId in roleRefs){roleRefs[refId].set(fieldName,id,setNoRefs)}}}}
me.registerReferences(record,oldId)},processManyBlock:function(entityType,role,items,processor){var me=this,id,record,records,store;if(items){for(id in items){record=me.peekRecord(entityType,id);if(record){records=me.getEntityList(role.cls,items[id]);store=role.getAssociatedItem(record);me[processor](role,store,record,records)}else{me.onInvalidAssociationEntity(entityType,id)}}}},processManyCreate:function(role,store,record,records){if(store){store.add(records)}else{record[role.getterName](null,null,records)}},processManyDrop:function(role,store,record,records){if(store){store.remove(records)}},processManyRead:function(role,store,record,records){if(store){store.setRecords(records)}else{record[role.getterName](null,null,records)}},readEntities:function(entityType,items){var me=this,len=items.length,i,data,rec,id;for(i=0;i<len;++i){data=items[i];id=entityType.getIdFromData(data);rec=me.peekRecord(entityType,id);if(!rec){rec=me.createRecord(entityType,data,!0)}else{me.onInvalidEntityRead(entityType,id)}
rec.phantom=!1;me.add(rec)}},recordCreator:function(data,Model){var me=this,id=Model.getIdFromData(data),record=me.peekRecord(Model,id,!0);if(!record){record=new Model(data,me)}else{record=me.getRecord(Model,id);record.mergeData(data)}
return record},registerReferences:function(record,oldId){var entityName=record.entityName,id=record.id,recordData=record.data,remove=oldId||oldId===0,entry,i,fk,len,reference,references,refs,roleName;len=(references=record.references).length;for(i=0;i<len;++i){reference=references[i];fk=recordData[reference.name];if(fk||fk===0){reference=reference.reference;entityName=reference.type;roleName=reference.inverse.role;entry=this.getEntry(reference.cls,fk);refs=entry.refs||(entry.refs={});refs=refs[roleName]||(refs[roleName]={});refs[id]=record;if(remove){delete refs[oldId]}}}},updateEntities:function(entityType,items){var len=items.length,i,data,rec,id,modified;if(Ext.isArray(items)){for(i=0;i<len;++i){data=items[i];id=entityType.getIdFromData(data);rec=this.peekRecord(entityType,id);if(rec){rec.set(data)}else{this.onInvalidEntityUpdate(entityType,id)}}}else{for(id in items){data=items[id];rec=this.peekRecord(entityType,id);if(rec&&!rec.dropped){modified=rec.set(data)}else{this.onInvalidEntityUpdate(entityType,id,!!rec)}}}},updateReference:function(record,field,newValue,oldValue){var reference=field.reference,entityName=reference.type,roleName=reference.inverse.role,id=record.id,entry,refs;if(oldValue||oldValue===0){refs=this.getEntry(entityName,oldValue).refs[roleName];delete refs[id]}
if(newValue||newValue===0){entry=this.getEntry(entityName,newValue);refs=entry.refs||(entry.refs={});refs=refs[roleName]||(refs[roleName]={});refs[id]=record}},visitData:function(visitor){var me=this,data=me.data,matrices=me.matrices,all,assoc,id,id2,matrix,members,name,record,slice,slices,state;me.getSchema().processKeyChecks(!0);for(name in data){all=data[name];for(id in all){record=all[id].record;if(record){if(record.phantom||record.dirty||record.dropped){if(visitor.onDirtyRecord){visitor.onDirtyRecord(record)}}else if(visitor.onCleanRecord){visitor.onCleanRecord(record)}}}}
if(visitor.onMatrixChange){for(name in matrices){matrix=matrices[name].left;slices=matrix.slices;assoc=matrix.role.association;for(id in slices){slice=slices[id];members=slice.members;for(id2 in members){state=(record=members[id2])[2];if(state){visitor.onMatrixChange(assoc,record[0],record[1],state)}}}}}
return visitor},_setNoRefs:{refs:!1}}})
;
Ext.define('Ext.util.Schedulable',{'abstract':!0,isSchedulable:!0,scheduled:!1,constructor:function(){this.getScheduler().add(this)},destroy:function(){var me=this,scheduler=me.getScheduler();if(scheduler&&!scheduler.destroyed){scheduler.remove(me)}
me.scheduler=null;me.schedule=me.react=Ext.emptyFn;me.callParent()},getFullName:function(){return this.name||this.id},privates:{getScheduler:function(){return this.scheduler},schedule:function(){var me=this,scheduler;if(!me.scheduled){scheduler=me.getScheduler();if(scheduler){me.scheduled=!0;if(me.onSchedule){me.onSchedule()}
scheduler.scheduleItem(me)}}},unschedule:function(){var me=this,scheduler;if(me.scheduled){scheduler=me.getScheduler();if(scheduler&&!scheduler.destroyed){scheduler.unscheduleItem(me)}
me.scheduled=!1}},sort:function(){}}})
;
Ext.define('Ext.app.bind.BaseBinding',{extend:'Ext.util.Schedulable',isBinding:!0,calls:0,kind:20,defaultOptions:{},lastValue:undefined,constructor:function(owner,callback,scope,options){var me=this;me.options=options;me.owner=owner;me.scope=scope;me.callback=callback;if(!callback){Ext.raise('Callback is required')}
me.lateBound=Ext.isString(callback);if(options&&options.deep){me.deep=!0}
me.callParent()},destroy:function(){var me=this,owner=me.owner;if(owner){owner.onBindDestroy(me)}
me.callParent();me.scope=me.callback=me.owner=null},isReadOnly:function(){return!0},privates:{getScheduler:function(){var owner=this.owner;return owner&&owner.getScheduler()},getSession:function(){var owner=this.owner;return owner.isSession?owner:owner.getSession()},notify:function(value){var me=this,options=me.options||me.defaultOptions,previous=me.lastValue;if(!me.calls||me.deep||me.valueChanged(value,previous)){++me.calls;me.lastValue=value;if(me.lateBound){me.scope[me.callback](value,previous,me)}else{me.callback.call(me.scope,value,previous,me)}
if(options.single){me.destroy()}}},valueChanged:function(value,previous){var ret=!0;if(previous!==value){if(value&&previous&&value instanceof Date&&previous instanceof Date){ret=value.getTime()!==previous.getTime()}}else{ret=Ext.isArray(value)}
return ret}}})
;
Ext.define('Ext.app.bind.Binding',{extend:'Ext.app.bind.BaseBinding',constructor:function(stub,callback,scope,options){var me=this;me.callParent([stub.owner,callback,scope,options]);me.stub=stub;me.depth=stub.depth;if(stub.isAvailable()&&!stub.scheduled){me.schedule()}},destroy:function(fromParent){var me=this,stub=me.stub;if(stub&&!fromParent){stub.unbind(me);me.stub=null}
me.callParent()},bindValidation:function(callback,scope){var stub=this.stub;return stub&&stub.bindValidation(callback,scope)},bindValidationField:function(callback,scope){var stub=this.stub;return stub&&stub.bindValidationField(callback,scope)},getFullName:function(){return this.fullName||(this.fullName='@('+this.stub.getFullName()+')')},getValue:function(){var me=this,stub=me.stub;return stub&&stub.getValue()},isAvailable:function(){var stub=this.stub;return stub&&stub.isAvailable()},isLoading:function(){var stub=this.stub;return stub&&stub.isLoading()},isReadOnly:function(){var stub=this.stub,options=this.options,ret=!0;if(!(options&&options.twoWay===!1)){if(stub){ret=stub.isReadOnly()}}
return ret},refresh:function(){},setValue:function(value){if(this.isReadOnly()){Ext.raise('Cannot setValue on a readonly binding')}
this.stub.set(value)},privates:{getDataObject:function(){var stub=this.stub;return stub&&stub.getDataObject()},getRawValue:function(){var me=this,stub=me.stub;return stub&&stub.getRawValue()},isDescendantOf:function(item){var stub=this.stub;return stub?(item===stub)||stub.isDescendantOf(item):!1},react:function(){this.notify(this.getValue())},schedule:function(){if(!this.stub.scheduled){this.callParent()}},sort:function(){var stub=this.stub;stub.scheduler.sortItem(stub)}}})
;
Ext.define('Ext.app.bind.AbstractStub',{extend:'Ext.util.Schedulable',requires:['Ext.app.bind.Binding'],children:null,depth:0,generation:1,kind:10,parent:null,constructor:function(owner,name){var me=this;me.owner=owner;me.name=name;me.callParent()},destroy:function(){var me=this,children=me.children,bindings=me.bindings,len,i,key;if(bindings){for(i=0,len=bindings.length;i<len;++i){bindings[i].destroy(!0)}}
for(key in children){children[key].destroy()}
if(me.scheduled){me.unschedule()}
me.callParent()},add:function(child){var me=this;(me.children||(me.children={}))[child.name]=child;child.depth=me.depth+1;child.parent=me},getChild:function(path){var pathArray=Ext.isString(path)?path.split('.'):path;if(pathArray&&pathArray.length){return this.descend(pathArray,0)}
return this},getFullName:function(){var me=this,name=me.fullName,parent=me.parent,s;if(!name){name=me.name||me.id;if(parent&&(s=parent.getFullName())){name=((s.charAt(s.length-1)!==':')?s+'.':s)+name}
me.fullName=name}
return name},getSession:function(){var owner=this.owner;return owner.isSession?owner:owner.getSession()},bind:function(callback,scope,options){var me=this,binding=new Ext.app.bind.Binding(me,callback,scope,options),bindings=(me.bindings||(me.bindings=[]));binding.depth=me.depth;bindings.push(binding);return binding},getValue:function(){return this.isAvailable()?this.getRawValue():null},graft:function(replacement){var me=this,bindings=me.bindings,name=me.name,i;me.parent=me.bindings=null;me.destroy();replacement.depth=me.depth;replacement.bindings=bindings;replacement.generation=me.generation+1;replacement.name=name;replacement.id=me.id;replacement.path=me.path;if(bindings){for(i=bindings.length;i-->0;){bindings[i].stub=replacement}}
return replacement},isDescendantOf:function(item){var parent;for(parent=this;parent=parent.parent;){if(parent===item){return!0}}
return!1},isAvailable:function(){return!0},isLoading:function(){return!1},onSchedule:function(){var i,len,binding,bindings,p;for(p=this.parent;p;p=p.parent){bindings=p.bindings;if(bindings){for(i=0,len=bindings.length;i<len;++i){binding=bindings[i];if(binding.deep&&!binding.scheduled){binding.schedule()}}}}},react:function(){var bindings=this.bindings,binding,i,len;if(bindings){for(i=0,len=bindings.length;i<len;++i){binding=bindings[i];if(!binding.scheduled){binding.schedule()}}}},unbind:function(binding){var bindings=this.bindings;if(bindings&&bindings.length){Ext.Array.remove(bindings,binding)}},privates:{collect:function(){var children=this.children,bindings=this.bindings,totalCount=0,count=0,child,key;if(children){for(key in children){child=children[key];count=child.collect();if(count===0){child.destroy();delete children[key]}
totalCount+=count}}
if(bindings){totalCount+=bindings.length}
return totalCount},getScheduler:function(){var owner=this.owner;return owner&&owner.getScheduler()},sort:function(){var parent=this.parent;if(parent){this.scheduler.sortItem(parent)}}}})
;
Ext.define('Ext.app.bind.Stub',{extend:'Ext.app.bind.AbstractStub',requires:['Ext.app.bind.Binding'],isStub:!0,dirty:!0,formula:null,validationKey:'validation',constructor:function(owner,name,parent){var me=this,path=name;me.callParent([owner,name]);me.boundValue=null;if(parent){parent.add(me);if(!parent.isRootStub){path=parent.path+'.'+name}
me.checkHadValue()}
me.path=path},destroy:function(){var me=this,formula=me.formula,storeBinding=me.storeBinding;if(formula){formula.destroy()}
if(storeBinding){storeBinding.destroy()}
me.detachBound();me.callParent()},bindValidation:function(callback,scope){var parent=this.parent;return parent&&parent.descend([this.validationKey,this.name]).bind(callback,scope)},bindValidationField:function(callback,scope){var parent=this.parent,name=this.name,lateBound=typeof callback==='string',ret;if(parent){ret=parent.bind(function(value){var field=null;if(value&&value.isModel){field=value.getField(name)}
if(lateBound){scope[callback](field,value,this)}else{callback.call(scope,field,value,this)}})}
return ret||null},descend:function(path,index){var me=this,children=me.children||(me.children={}),pos=index||0,name=path[pos++],ret;if(!(ret=children[name])){ret=new Ext.app.bind.Stub(me.owner,name,me)}
if(pos<path.length){ret=ret.descend(path,pos)}
return ret},getChildValue:function(parentData){var me=this,name=me.name,bindMappings=me.bindMappings,storeMappings=bindMappings.store,modelMappings=bindMappings.model,ret;if(!parentData&&!Ext.isString(parentData)){ret=me.hadValue?null:undefined}else{ret=me.inspectValue(parentData);if(!ret){if(parentData.isEntity){if(modelMappings[name]){ret=parentData[modelMappings[name]]()}else{ret=parentData.data[name]}}else if(parentData.isStore&&storeMappings[name]){ret=parentData[storeMappings[name]]()}else{ret=parentData[name];if(ret===undefined&&me.hadValue){ret=null}}}}
return ret},getDataObject:function(){var me=this,parentData=me.parent.getDataObject(),name=me.name,ret=parentData?parentData[name]:null,storeMappings=me.bindMappings.store,associations;if(!ret){if(parentData&&parentData.isEntity){associations=parentData.associations;if(associations&&name in associations){ret=parentData[associations[name].getterName]()}}}else if(parentData.isStore&&name in storeMappings){ret=parentData[storeMappings[name]]()}
if(!ret||!(ret.$className||Ext.isObject(ret))){parentData[name]=ret={};me.hadValue=!0;me.invalidate(!0,!0)}
return ret},getRawValue:function(){return this.getChildValue(this.getParentValue())},graft:function(replacement){var me=this,parent=me.parent,children=me.children,name=me.name,i,ret;replacement.parent=parent;replacement.children=children;if(parent){parent.children[name]=replacement}
if(children){for(i in children){children[i].parent=replacement}}
me.children=null;replacement.checkHadValue();ret=me.callParent([replacement]);ret.invalidate(!0,!0);return ret},isAvailable:function(){return this.checkAvailability()},isLoading:function(){return!this.checkAvailability(!0)},invalidate:function(deep,dirtyOnly){var me=this,children=me.children,name;me.dirty=!0;me.checkHadValue();if(!dirtyOnly&&me.isAvailable()){if(!me.scheduled){me.schedule()}}
if(deep&&children){for(name in children){children[name].invalidate(deep,dirtyOnly)}}},isReadOnly:function(){var formula=this.formula;return!!(formula&&!formula.set)},set:function(value,preventClimb){var me=this,parent=me.parent,name=me.name,formula=me.formula,parentData,associations,association,formulaStub,setterName;if(formula&&!formula.settingValue&&formula.set){formula.setValue(value);return}else if(me.isLinkStub){formulaStub=me.getLinkFormulaStub();formula=formulaStub?formulaStub.formula:null;if(formula){if(formulaStub.isReadOnly()){Ext.raise('Cannot setValue on a readonly formula')}
formula.setValue(value);return}}
parentData=parent.getDataObject();if(parentData.isEntity){associations=parentData.associations;if(associations&&(name in associations)){association=associations[name];setterName=association.setterName;if(setterName){parentData[setterName](value)}
me.invalidate(!0)}else{parentData.set(name,value)}}else if((value&&value.constructor===Object)||!(value===parentData[name]&&parentData.hasOwnProperty(name))){if(preventClimb||!me.setByLink(value)){if(value===undefined){delete parentData[name]}else{parentData[name]=value}
me.inspectValue(parentData);me.invalidate(!0)}}},onStoreDataChanged:function(){this.invalidate(!0)},afterLoad:function(record){this.invalidate(!0)},afterCommit:function(record){this.afterEdit(record,null)},afterEdit:function(record,modifiedFieldNames){var children=this.children,len=modifiedFieldNames&&modifiedFieldNames.length,associations=record.associations,bindMappings=this.bindMappings.model,key,i,child,name,ref;if(children){if(len){for(i=0;i<len;++i){name=modifiedFieldNames[i];child=children[name];if(!child){ref=record.fieldsMap[name];ref=ref&&ref.reference;child=ref&&children[ref.role]}
if(child){child.invalidate(!0)}}}else{for(key in children){if(!(associations&&key in associations)){children[key].invalidate(!0)}}}
for(key in bindMappings){child=children[key];if(child){child.invalidate()}}}
this.invalidate()},afterReject:function(record){this.afterEdit(record,null)},afterAssociatedRecordSet:function(record,associated,role){var children=this.children,key=role.role;if(children&&key in children){children[key].invalidate(!0)}},setByLink:function(value){var me=this,n=0,ret=!1,i,link,path,stub,root,name;for(stub=me;stub;stub=stub.parent){if(stub.isLinkStub){link=stub;if(n){for(path=[],i=0,stub=me;stub!==link;stub=stub.parent){++i;path[n-i]=stub.name}}
break}
++n}
stub=null;if(link){root=link.parent;name=link.name;if(!root.shouldClimb(name)){stub=root.insertChild(name)}else{stub=link.getTargetStub()}}
if(stub){if(path){stub=stub.descend(path)}
stub.set(value);ret=!0}
return ret},setFormula:function(formula){var me=this,oldFormula=me.formula;if(oldFormula){oldFormula.destroy()}
me.formula=new Ext.app.bind.Formula(me,formula)},react:function(){var me=this,bound=this.boundValue,children=me.children,generation;if(bound){if(bound.isValidation){bound.refresh();generation=bound.generation;if(me.lastValidationGeneration===generation){return}
me.lastValidationGeneration=generation}else if(bound.isModel){if(children&&children[me.validationKey]){bound.isValid()}}}
this.callParent()},privates:{bindMappings:{store:{count:'getCount',first:'first',last:'last',loading:'hasPendingLoad',totalCount:'getTotalCount'},model:{dirty:'isDirty',phantom:'isPhantom',valid:'isValid'}},checkAvailability:function(isLoading){var me=this,parent=me.parent,bindMappings=me.bindMappings,name=me.name,available=!!(parent&&parent.checkAvailability(isLoading)),associations,parentValue,value,availableSet;if(available){parentValue=me.getParentValue();value=me.inspectValue(parentValue);if(value){if(isLoading){available=!value.hasPendingLoad()}else{if(value.isStore){available=!0}else{available=!value.isLoading()||value.loadCount>0}}}else{if(parentValue){if(parentValue.isModel){if(bindMappings.model[name]){available=!parent.isLoading();availableSet=!0}else{associations=parentValue.associations;if(!(associations&&name in associations)){available=!0;availableSet=!0}}}else if(parentValue.isStore&&bindMappings.store[name]&&name!=='loading'){available=!parent.isLoading();availableSet=!0}}
if(!availableSet){available=me.hadValue||me.getRawValue()!==undefined}}}
return available},checkHadValue:function(){if(!this.hadValue){this.hadValue=this.getRawValue()!==undefined}},collect:function(){var me=this,result=me.callParent(),storeBinding=me.storeBinding?1:0,formula=me.formula?1:0;return result+storeBinding+formula},getLinkFormulaStub:function(){var stub=this;while(stub.isLinkStub){stub=stub.binding.stub}
return stub.formula?stub:null},getParentValue:function(){var me=this;if(me.dirty){me.parentValue=me.parent.getValue();me.dirty=!1}
return me.parentValue},setStore:function(storeBinding){this.storeBinding=storeBinding},inspectValue:function(parentData){var me=this,name=me.name,current=me.boundValue,boundValue=null,associations,raw,changed,associatedEntity;if(parentData&&parentData.isEntity){associations=parentData.associations;if(associations&&(name in associations)){boundValue=parentData[associations[name].getterName]()}else if(name===me.validationKey){boundValue=parentData.getValidation();me.lastValidationGeneration=null}}else if(parentData){raw=parentData[name];if(raw&&(raw.isModel||raw.isStore)){boundValue=raw}}
changed=current!==boundValue;if(changed){if(current){me.detachBound()}
if(boundValue){if(boundValue.isModel){boundValue.join(me)}else{associatedEntity=boundValue.associatedEntity;if(associatedEntity&&boundValue.autoLoad!==!1&&!boundValue.complete&&!boundValue.hasPendingLoad()){boundValue.load()}
boundValue.on({scope:me,beginload:'onStoreDataChanged',load:'onStoreDataChanged',datachanged:'onStoreDataChanged',destroy:'onDestroyBound'})}}
me.boundValue=boundValue}
return boundValue},detachBound:function(){var me=this,current=me.boundValue;if(current&&!current.destroyed){if(current.isModel){current.unjoin(me)}else{current.un({scope:me,beginload:'onStoreDataChanged',load:'onStoreDataChanged',datachanged:'onStoreDataChanged',destroy:'onDestroyBound'})}}},onDestroyBound:function(){if(!this.owner.destroying){this.set(null)}},sort:function(){var me=this,formula=me.formula,scheduler=me.scheduler,storeBinding=me.storeBinding;me.callParent();if(storeBinding){scheduler.sortItem(storeBinding)}
if(formula){scheduler.sortItem(formula)}}}})
;
Ext.define('Ext.app.bind.LinkStub',{extend:'Ext.app.bind.Stub',isLinkStub:!0,binding:null,destroy:function(){var me=this,binding=me.binding,owner=me.owner;if(binding){me.binding=null;binding.destroy();if(owner){delete owner.linkData[me.name]}}
me.target=null;me.callParent()},getFullName:function(){var me=this;return me.fullName||(me.fullName='('+me.callParent()+' -> '+me.binding.getFullName()+')')},getDataObject:function(){var binding=this.binding,root=this.parent,name=this.name,rootData,ret;if(root.isRootStub&&!root.shouldClimb(name)){rootData=root.owner.getData();if(!rootData.hasOwnProperty(name)){rootData[name]=ret={}}}else{ret=binding&&binding.getDataObject()}
return ret},getRawValue:function(){var binding=this.binding;return binding&&binding.getRawValue()},getValue:function(){var binding=this.binding;return binding&&binding.getValue()},getTargetStub:function(){var binding=this.binding;return binding&&binding.stub},isAvailable:function(){var binding=this.binding;return binding?binding.isAvailable():!1},isLoading:function(){var binding=this.binding;return binding?binding.isLoading():!1},link:function(bindDescriptor,target){var me=this,binding=me.binding;if(binding){binding.destroy()}
target=me.target=target||me.owner;me.linkDescriptor=bindDescriptor;me.binding=target.bind(bindDescriptor,me.onChange,me);me.binding.deep=!0},onChange:function(){this.invalidate(!0)},react:function(){var me=this,linkData=me.owner.linkData;linkData[me.name]=me.getValue();me.callParent()},privates:{collect:function(){var me=this,result=me.callParent(),binding=me.binding?1:0;return result+binding},sort:function(){var binding=this.binding;if(binding){this.scheduler.sortItem(binding)}}}})
;
Ext.define('Ext.app.bind.RootStub',{extend:'Ext.app.bind.AbstractStub',requires:['Ext.app.bind.LinkStub','Ext.app.bind.Stub'],isRootStub:!0,depth:0,createRootChild:function(name,direct){var me=this,owner=me.owner,ownerData=owner.getData(),children=me.children,previous=children&&children[name],parentStub=previous?null:me,parentVM,stub;if(direct||ownerData.hasOwnProperty(name)||!(parentVM=owner.getParent())){stub=new Ext.app.bind.Stub(owner,name,parentStub)}else{stub=new Ext.app.bind.LinkStub(owner,name,parentStub);stub.link('{'+name+'}',parentVM)}
if(previous){previous.graft(stub)}
return stub},createStubChild:function(name){return this.createRootChild(name,!0)},descend:function(path,index){var me=this,children=me.children,pos=index||0,name=path[pos++],ret=(children&&children[name])||me.createRootChild(name);if(pos<path.length){ret=ret.descend(path,pos)}
return ret},getFullName:function(){return this.fullName||(this.fullName=this.owner.id+':')},getDataObject:function(){return this.owner.data},getRawValue:function(){return this.owner.data},getValue:function(){return this.owner.data},isDescendantOf:function(){return!1},set:function(value,preventClimb){if(!value||value.constructor!==Object){Ext.raise('Only an object can be set at the root')}
var me=this,children=me.children||(me.children={}),owner=me.owner,data=owner.data,parentVM=owner.getParent(),stub,v,key,setSelf,created;for(key in value){if(key.indexOf('.')>=0){Ext.raise('Value names cannot contain dots')}
v=value[key];if(v!==undefined){stub=children[key];setSelf=preventClimb||!me.shouldClimb(key);if(!stub){stub=me.createRootChild(key,setSelf);created=!0}else if(setSelf&&stub.isLinkStub&&!stub.getLinkFormulaStub()){stub=me.insertChild(key)}
if(!created||!data.hasOwnProperty(value)){owner.invalidateChildLinks(key)}
stub.set(v,setSelf)}else if(data.hasOwnProperty(key)){delete data[key];stub=children[key];if(stub){if(!stub.isLinkStub&&parentVM){stub=me.createRootChild(key)}
owner.invalidateChildLinks(key,!0);stub.invalidate(!0)}}}},schedule:Ext.emptyFn,unschedule:Ext.emptyFn,privates:{checkAvailability:function(){return!0},insertChild:function(name){return this.createRootChild(name,!0)},invalidateChildLink:function(name,clear){var children=this.children,stub=children&&children[name];if(stub&&stub.isLinkStub&&!stub.getLinkFormulaStub()){stub=this.createRootChild(name);if(clear){stub.invalidate(!0)}
this.owner.invalidateChildLinks(name,clear)}},shouldClimb:function(name){var parent=this.owner.getParent();while(parent){if(parent.getData().hasOwnProperty(name)){return!0}
parent=parent.getParent()}
return!1}}})
;
Ext.define('Ext.app.bind.Multi',{extend:'Ext.app.bind.BaseBinding',isMultiBinding:!0,missing:1,deep:!0,constructor:function(descriptor,owner,callback,scope,options){var me=this,trackStatics=options&&options.trackStatics;me.callParent([owner,callback,scope,options]);me.bindings=[];me.literal=descriptor.$literal;if(descriptor.constructor===Object){if(trackStatics){me.staticKeys=[]}
me.addObject(descriptor,me.lastValue={},me.staticKeys)}else{me.addArray(descriptor,me.lastValue=[])}
if(!--me.missing&&!me.scheduled){me.schedule()}},destroy:function(){var me=this;me.bindings=Ext.destroy(me.bindings);me.callParent()},add:function(descriptor,data,property){var me=this,owner=me.owner,bindings=me.bindings,method=me.literal?(descriptor.reference?'bindEntity':'bindExpression'):'bind',binding,depth;++me.missing;binding=owner[method](descriptor,function(value){data[property]=value;if(binding.calls===1){--me.missing}
if(!me.missing&&!me.scheduled){me.schedule()}},me,null);depth=binding.depth;if(!bindings.length||depth<me.depth){me.depth=depth}
bindings.push(binding);return!this.isBindingStatic(binding)},addArray:function(multiBindDescr,array){var me=this,n=multiBindDescr.length,hasDynamic=!1,dynamic,b,i;for(i=0;i<n;++i){b=multiBindDescr[i];if(b&&(b.reference||Ext.isString(b))){dynamic=me.add(b,array,i)}else if(Ext.isArray(b)){dynamic=me.addArray(b,array[i]=[])}else if(b&&b.constructor===Object){dynamic=me.addObject(b,array[i]={})}else{array[i]=b;dynamic=!1}
hasDynamic=hasDynamic||dynamic}
return hasDynamic},addObject:function(multiBindDescr,object,staticKeys){var me=this,hasDynamic=!1,dynamic,b,name;for(name in multiBindDescr){b=multiBindDescr[name];if(b&&(b.reference||Ext.isString(b))){dynamic=me.add(b,object,name)}else if(Ext.isArray(b)){dynamic=me.addArray(b,object[name]=[])}else if(b&&b.constructor===Object){dynamic=me.addObject(b,object[name]={})}else{object[name]=b;dynamic=!1}
if(staticKeys&&!dynamic){staticKeys.push(name)}
hasDynamic=hasDynamic||dynamic}
return hasDynamic},getFullName:function(){var me=this,fullName=me.fullName,bindings=me.bindings,length=bindings.length,i;if(!fullName){fullName='@[';for(i=0;i<length;++i){if(i){fullName+=','}
fullName+=bindings[i].getFullName()}
fullName+=']';me.fullName=fullName}
return fullName},getRawValue:function(){return this.lastValue},isDescendantOf:function(){return!1},isLoading:function(){var bindings=this.bindings,n=bindings.length;for(;n-->0;){if(bindings[n].isLoading()){return!0}}
return!1},isAvailable:function(){var bindings=this.bindings,n=bindings.length;for(;n-->0;){if(bindings[n].isAvailable()){return!0}}
return!1},isBindingStatic:function(binding){return binding.isTemplateBinding&&binding.isStatic},isStatic:function(){var bindings=this.bindings,len=bindings.length,i,binding;for(i=0;i<len;++i){binding=bindings[i];if(!this.isBindingStatic(binding)){return!1}}
return!0},pruneStaticKeys:function(){var value=Ext.apply({},this.lastValue),keys=this.staticKeys,len=keys.length,i;for(i=0;i<len;++i){delete value[keys[i]]}
return value},react:function(){this.notify(this.lastValue)},refresh:function(){},privates:{sort:function(){this.scheduler.sortItems(this.bindings)}}})
;
Ext.define('Ext.app.bind.Formula',{extend:'Ext.util.Schedulable',requires:['Ext.util.LruCache'],statics:{getFormulaParser:function(name){var cache=this.formulaCache,parser,s;if(!cache){cache=this.formulaCache=new Ext.util.LruCache({maxSize:20})}
parser=cache.get(name);if(!parser){s='[^\\.a-z0-9_]'+Ext.String.escapeRegex(name)+'\\(\\s*([\'"])(.*?)\\1\\s*\\)';parser=new RegExp(s,'gi');cache.add(name,parser)}
return parser}},isFormula:!0,calculation:null,explicit:!1,set:null,single:!1,fnKeywordArgumentNamesRe:/^function\s*[^\(]*\(\s*([^,\)\s]+)/,fnKeywordRe:/^\s*function/,replaceParenRe:/[\(\)]/g,constructor:function(stub,formula){var me=this,owner=stub.owner,bindTo,expressions,getter,options;me.owner=owner;me.stub=stub;me.callParent();if(formula instanceof Function){me.get=getter=formula}else{me.get=getter=formula.get;me.set=formula.set;expressions=formula.bind;if(formula.single){me.single=formula.single}
if(expressions){bindTo=expressions.bindTo;if(bindTo){options=Ext.apply({},expressions);delete options.bindTo;expressions=bindTo}}}
if(!getter){Ext.raise('Must specify a getter method for a formula')}
if(expressions){me.explicit=!0}else{expressions=getter.$expressions||me.parseFormula(getter)}
me.binding=owner.bind(expressions,me.onChange,me,options)},destroy:function(){var me=this,binding=me.binding,stub=me.stub;if(binding){binding.destroy();me.binding=null}
if(stub){stub.formula=null}
me.callParent();me.getterFn=me.owner=null},getFullName:function(){return this.fullName||(this.fullName=this.stub.getFullName()+'='+this.callParent()+')')},getRawValue:function(){return this.calculation},onChange:function(){if(!this.scheduled){this.schedule()}},parseFormula:function(formula){var str=Ext.Function.toCode(formula),defaultProp='get',expressions={$literal:!0},match,getterProp,formulaRe,expr;if(this.fnKeywordRe.test(str)){match=this.fnKeywordArgumentNamesRe.exec(str);if(match){getterProp=match[1]}}else{match=str.split('=>')[0];if(match){match=Ext.String.trim(match.replace(this.replaceParenRe,'')).split(',');getterProp=match[0]}}
getterProp=getterProp||defaultProp;formulaRe=Ext.app.bind.Formula.getFormulaParser(getterProp);while((match=formulaRe.exec(str))){expr=match[2];expressions[expr]=expr}
expressions.$literal=!0;formula.$expressions=expressions;return expressions},react:function(){var me=this,owner=me.owner,data=me.binding.lastValue,arg;if(me.explicit){arg=data}else{arg=owner.getFormulaFn(data)}
me.settingValue=!0;me.stub.set(me.calculation=me.get.call(owner,arg));me.settingValue=!1;if(me.single){me.destroy()}},setValue:function(value){this.set.call(this.stub.owner,value)},privates:{getScheduler:function(){var owner=this.owner;return owner&&owner.getScheduler()},sort:function(){var me=this,binding=me.binding;if(!binding.destroyed){me.scheduler.sortItem(binding)}}}})
;
Ext.define('Ext.util.Fly',{inheritableStatics:{flyPoolSize:2,fly:function(){var T=this,flyweights=T.flyweights||(T.flyweights=[]),instance=flyweights.length?flyweights.pop():new T();instance.reset.apply(instance,arguments);return instance}},release:function(){var me=this,T=me.self,flyweights=T.flyweights||(T.flyweights=[]);me.reset();if(flyweights.length<T.flyPoolSize){flyweights.push(me)}},reset:Ext.emptyFn})
;
Ext.define('Ext.parse.Tokenizer',function(Tokenizer){var flyweights=(Tokenizer.flyweights=[]),BOOLEAN={literal:!0,boolean:!0,type:'boolean'},ERROR={error:!0},IDENT={ident:!0},LITERAL={literal:!0},NULL={literal:!0,nil:!0},NUMBER={literal:!0,number:!0,type:'number'},STRING={literal:!0,string:!0,type:'string'};return{extend:'Ext.util.Fly',isTokenizer:!0,statics:{BOOLEAN:BOOLEAN,ERROR:ERROR,IDENT:IDENT,LITERAL:LITERAL,NULL:NULL,NUMBER:NUMBER,STRING:STRING},config:{keywords:{'null':{type:'literal',is:NULL,value:null},'false':{type:'literal',is:BOOLEAN,value:!1},'true':{type:'literal',is:BOOLEAN,value:!0}},operators:{'+':'plus','-':'minus','*':'multiply','/':'divide','!':'not',',':'comma',':':'colon','[':'arrayOpen',']':'arrayClose','{':'curlyOpen','}':'curlyClose','(':'parenOpen',')':'parenClose'},patterns:null},error:null,index:-1,constructor:function(config){this.operators={};this.patterns=[];this.initConfig(config)},next:function(){var token=this.peek();this.head=undefined;return token},peek:function(){var me=this,error=me.error,token=me.head;if(error){return error}
if(token===undefined){me.head=token=me.advance()}
return token},release:function(){this.reset();if(flyweights.length<Tokenizer.flyPoolSize){flyweights.push(this)}},reset:function(text,pos,end){var me=this;me.error=null;me.head=undefined;me.index=-1;me.text=text||null;me.pos=pos||0;me.end=(text&&end==null)?text.length:end;return me},privates:{digitRe:/[0-9]/,identFirstRe:/[a-z_$]/i,identRe:/[0-9a-z_$]/i,spaceRe:/[ \t]/,end:0,head:undefined,pos:0,text:null,applyOperators:function(ops){var operators=this.operators,block,c,def,i,len,name,op;for(op in ops){block=operators;name=ops[op];len=op.length;for(i=0;i<len;++i){c=op.charAt(i);block=block[c]||(block[c]={})}
if(name){block.token=def={type:'operator',name:name,value:op,is:{operator:!0}};def.is[name]=!0}else{block.token=null}}},applyPatterns:function(pat){var patterns=this.patterns,def,extract,name,re;for(name in pat){def=pat[name];extract=def.extract;re=def.re;delete def.extract;delete def.re;patterns.push({name:name,re:re,extract:extract,token:def})}},advance:function(){var me=this,spaceRe=me.spaceRe,text=me.text,length=me.end,c;while(me.pos<length){c=text.charAt(me.pos);if(spaceRe.test(c)){++me.pos;continue}
me.index=me.pos;return me.parse(c)}
return null},parse:function(c){var me=this,digitRe=me.digitRe,text=me.text,length=me.end,patterns=me.patterns,i,match,pat,ret;if(c==='.'&&me.pos+1<length){if(digitRe.test(text.charAt(me.pos+1))){ret=me.parseNumber()}}
if(!ret){for(i=0;i<patterns.length;++i){pat=patterns[i];pat.re.lastIndex=me.pos;match=pat.re.exec(text);if(match&&match.index===me.pos){ret=Ext.apply({value:pat.extract?pat.extract(match):match[0]},pat.token);me.pos+=match[0].length;break}}}
if(!ret&&me.operators[c]){ret=me.parseOperator(c)}
if(!ret){if(c==='"'||c==="'"){ret=me.parseString()}else if(digitRe.test(c)){ret=me.parseNumber()}else if(me.identFirstRe.test(c)){ret=me.parseIdent()}else{ret=me.syntaxError('Unexpected character')}}
return ret},parseIdent:function(){var me=this,identRe=me.identRe,keywords=me.getKeywords(),includeDots=!me.operators['.'],text=me.text,start=me.pos,end=start,length=me.end,prev=0,c,value;while(end<length){c=text.charAt(end);if(includeDots&&c==='.'){if(prev==='.'){return me.syntaxError(end,'Unexpected dot operator')}
++end}else if(identRe.test(c)){++end}else{break}
prev=c}
if(prev==='.'){return me.syntaxError(end-1,'Unexpected dot operator')}
value=text.substring(start,me.pos=end);return(keywords&&keywords[value])||{type:'ident',is:IDENT,value:value}},parseNumber:function(){var me=this,digitRe=me.digitRe,text=me.text,start=me.pos,length=me.end,c,decimal,exp,token;while(me.pos<length){c=text.charAt(me.pos);if(c==='-'||c==='+'){if(me.pos!==start){break}
++me.pos}else if(c==='.'){if(decimal){break}
decimal=!0;++me.pos}else if(c==='e'||c==='E'){if(exp){break}
decimal=exp=!0;c=text.charAt(++me.pos);if(c==='-'||c==='+'){++me.pos}}else if(digitRe.test(c)){++me.pos}else{break}}
token={type:'literal',is:NUMBER,value:+text.substring(start,me.pos)};if(!isFinite(token.value)){token=me.syntaxError(start,'Invalid number')}
return token},parseOperator:function(c){var me=this,block=me.operators,text=me.text,length=me.end,end=me.pos,match,matchEnd,token;while(block[c]){block=block[c];token=block.token;++end;if(token){match=token;matchEnd=end}
if(end<length){c=text.charAt(end)}else{break}}
if(match){me.pos=matchEnd}
return match},parseString:function(){var me=this,text=me.text,pos=me.pos,start=pos,length=me.end,str='',c,closed,quote;quote=text.charAt(pos++);while(pos<length){c=text.charAt(pos++);if(c===quote){closed=!0;break}
if(c==='\\'&&pos<length){c=text.charAt(pos++)}
str+=c}
me.pos=pos;if(!closed){return me.syntaxError(start,'Unterminated string')}
return{type:'literal',is:STRING,value:str}},syntaxError:function(at,message){if(typeof at==='string'){message=at;at=this.pos}
var suffix=(at==null)?'':(' (at index '+at+')'),error=new Error(message+suffix);error.type='error';error.is=ERROR;if(suffix){error.at=at}
return this.error=error}}}})
;
Ext.define('Ext.parse.Symbol',{priority:0,constructor:function(id,config){var me=this,defaultProperty=me.defaultProperty;if(config&&typeof config==='object'){Ext.apply(me,config)}else if(config!==undefined&&defaultProperty){me[defaultProperty]=config}
me.id=id},dump:function(){var me=this,ret={at:me.at,arity:me.arity},i;if('value' in me){ret.value=me.value}
if(me.lhs){ret.lhs=me.lhs.dump();ret.rhs=me.rhs.dump()}
if(me.operand){ret.operand=me.operand.dump()}
if(me.args){ret.args=[];for(i=0;i<me.args.length;++i){ret.args.push(me.args[i].dump())}}
return ret},led:function(){this.parser.syntaxError(this.at,'Missing operator')},nud:function(){this.parser.syntaxError(this.at,'Undefined')},update:function(config){if(config&&typeof config==='object'){var me=this,priority=config.priority,led=config.led,nud=config.nud;if(me.priority<=priority){me.priority=priority}
if(led){me.led=led}
if(nud){me.nud=nud}}}})
;
Ext.define('Ext.parse.symbol.Constant',{extend:'Ext.parse.Symbol',arity:'literal',isLiteral:!0,defaultProperty:'value',constructor:function(id,config){this.callParent([id,config]);this._value=this.value},nud:function(){var me=this;me.value=me._value;me.arity='literal';me.isLiteral=!0;return me}})
;
Ext.define('Ext.parse.symbol.Infix',{extend:'Ext.parse.Symbol',arity:'binary',isBinary:!0,defaultProperty:'priority',led:function(left){var me=this;me.lhs=left;me.rhs=me.parser.parseExpression(me.priority);me.arity='binary';me.isBinary=!0;return me}})
;
Ext.define('Ext.parse.symbol.InfixRight',{extend:'Ext.parse.symbol.Infix',led:function(left){var me=this;me.lhs=left;me.rhs=me.parser.parseExpression(me.priority-1);me.arity='binary';me.isBinary=!0;return me}})
;
Ext.define('Ext.parse.symbol.Paren',{extend:'Ext.parse.Symbol',arity:'binary',isBinary:!0,priority:80,led:function(left){var me=this,args=[],parser=me.parser,id=left.id,type=left.arity;if(id!=='.'&&id!=='['){if((type!=="unary"||id!=="function")&&type!=="ident"&&id!=="("&&id!=="&&"&&id!=="||"&&id!=="?"){parser.syntaxError(left.at,"Expected a variable name.")}}
me.arity='invoke';me.isInvoke=!0;me.operand=left;me.args=args;while(parser.token.id!==')'){if(args.length){parser.advance(',')}
args.push(parser.parseExpression())}
parser.advance(')');return me},nud:function(){var parser=this.parser,ret=parser.parseExpression();parser.advance(")");return ret}})
;
Ext.define('Ext.parse.symbol.Prefix',{extend:'Ext.parse.Symbol',arity:'unary',isUnary:!0,priority:70,nud:function(){var me=this;me.operand=me.parser.parseExpression(me.priority);me.arity='unary';me.isUnary=!0;return me}})
;
Ext.define('Ext.parse.Parser',function(){var ITSELF=function(){return this};return{extend:'Ext.util.Fly',requires:['Ext.parse.Tokenizer','Ext.parse.symbol.Constant','Ext.parse.symbol.InfixRight','Ext.parse.symbol.Paren','Ext.parse.symbol.Prefix'],isParser:!0,config:{constants:{'null':null,'false':!1,'true':!0},infix:{'===':40,'!==':40,'==':40,'!=':40,'<':40,'<=':40,'>':40,'>=':40,'+':50,'-':50,'*':60,'/':60},infixRight:{'&&':30,'||':30},prefix:{'!':0,'-':0,'+':0},symbols:{':':0,',':0,')':0,'[':0,']':0,'{':0,'}':0,'(end)':0,'(ident)':{arity:'ident',isIdent:!0,nud:ITSELF},'(literal)':{arity:'literal',isLiteral:!0,nud:ITSELF},'(':{xclass:'Ext.parse.symbol.Paren'}},tokenizer:{keywords:null}},token:null,constructor:function(config){this.symbols={};this.initConfig(config)},advance:function(expected){var me=this,tokenizer=me.tokenizer,token=tokenizer.peek(),symbols=me.symbols,index=tokenizer.index,is,name,symbol,value;if(me.error){throw me.error}
if(expected){me.expect(expected)}
if(!token){return me.token=symbols['(end)']}
tokenizer.next();is=token.is;value=token.value;if(is.ident){symbol=symbols[value]||symbols['(ident)']}else if(is.operator){if(!(symbol=symbols[value])){me.syntaxError(token.at,'Unknown operator "'+value+'"')}
name=token.name}else if(is.literal){symbol=symbols['(literal)']}else{me.syntaxError(token.at,'Unexpected token')}
me.token=symbol=Ext.Object.chain(symbol);symbol.at=index;symbol.is=is;symbol.value=value;if(!symbol.arity){symbol.arity=token.type}
if(name){symbol.name=name}
return symbol},expect:function(expected){var token=this.token;if(expected!==token.id){this.syntaxError(token.at,'Expected "'+expected+'"')}
return this},parseExpression:function(rightPriority){var me=this,token=me.token,left;rightPriority=rightPriority||0;me.advance();left=token.nud();while(rightPriority<(token=me.token).priority){me.advance();left=token.led(left)}
return left},reset:function(text,pos,end){var me=this;me.error=me.token=null;me.tokenizer.reset(text,pos,end);me.advance();return me},syntaxError:function(at,message){if(typeof at==='string'){message=at;at=this.pos}
var suffix=(at==null)?'':(' (at index '+at+')'),error=new Error(message+suffix);error.type='error';if(suffix){error.at=at}
throw this.error=error},privates:{error:null,addSymbol:function(id,config,type,update){var symbols=this.symbols,symbol=symbols[id],cfg,length,i;if(symbol){if(typeof config==='object'){cfg=config}else if(update&&type){update=Ext.Array.from(update);length=update.length;cfg={};for(i=0;i<length;i++){cfg[update[i]]=type.prototype[update[i]]}}else{return symbol}
symbol.update(cfg)}else{if(config&&config.xclass){type=Ext.ClassManager.get(config.xclass)}else{type=type||Ext.parse.Symbol}
symbols[id]=symbol=new type(id,config);symbol.parser=this}
return symbol},addSymbols:function(symbols,type,update){var id;for(id in symbols){this.addSymbol(id,symbols[id],type,update)}},applyConstants:function(constants){this.addSymbols(constants,Ext.parse.symbol.Constant,'nud')},applyInfix:function(operators){this.addSymbols(operators,Ext.parse.symbol.Infix,'led')},applyInfixRight:function(operators){this.addSymbols(operators,Ext.parse.symbol.InfixRight,'led')},applyPrefix:function(operators){this.addSymbols(operators,Ext.parse.symbol.Prefix,'nud')},applySymbols:function(symbols){this.addSymbols(symbols)},applyTokenizer:function(config){var ret=config;if(config&&!config.isTokenizer){ret=new Ext.parse.Tokenizer(config)}
this.tokenizer=ret}}}})
;
Ext.define('Ext.app.bind.Parser',{extend:'Ext.parse.Parser',requires:['Ext.util.Format'],infix:{':':{priority:70,dump:function(){var me=this,ret={at:me.at,arity:me.arity,value:me.value,operand:me.operand.dump(),fmt:[]},fmt=me.fmt,i;for(i=0;i<fmt.length;++i){ret.fmt.push(fmt[i].dump())}
return ret},led:function(left){var me=this;me.arity='formatter';me.operand=left;me.fmt=me.parser.parseFmt();return me}},'?':{priority:20,led:function(left){var me=this,parser=me.parser,symbol=parser.symbols[':'],temp;me.condition=left;temp=symbol.priority;symbol.priority=0;me.tv=parser.parseExpression(0);me.parser.advance(':');symbol.priority=temp;me.fv=parser.parseExpression(0);me.arity='ternary';return me}}},symbols:{'(':{nud:function(){var parser=this.parser,symbol=parser.symbols[':'],ret,temp;temp=symbol.priority;symbol.priority=70;ret=parser.parseExpression();parser.advance(")");symbol.priority=temp;return ret}}},prefix:{'@':0},tokenizer:{operators:{'@':'at','?':'qmark','===':'feq','!==':'fneq','==':'eq','!=':'neq','<':'lt','<=':'lte','>':'gt','>=':'gte','&&':'and','||':'or'}},compileExpression:function(tokens,tokensMaps){var me=this,debug,fn;me.tokens=tokens;me.tokensMap=tokensMaps;debug=me.token.value==='@'&&me.tokenizer.peek();if(debug){debug=debug.value==='debugger';if(debug){me.advance();me.advance()}}
fn=me.parseSlot(me.parseExpression(),debug);me.tokens=me.tokensMap=null;return fn},compileFormat:function(){var me=this,fn;try{fn=me.parseSlot({arity:'formatter',fmt:me.parseFmt(),operand:{arity:'ident',value:'dummy'}});me.expect('(end)')}catch(e){Ext.raise('Invalid format expression: "'+me.tokenizer.text+'"')}
return fn},privates:{useEval:Ext.isGecko,escapeRe:/(["'\\])/g,parseFmt:function(){var me=this,fmt=[],priority=me.symbols[':'].priority,expr;do{if(fmt.length){me.advance()}
expr=me.parseExpression(priority);if(expr.isIdent||expr.isInvoke){fmt.push(expr)}else{me.syntaxError(expr.at,'Expected formatter name')}}while(me.token.id===':');return fmt},parseSlot:function(expr,debug){var me=this,defs=[],body=[],tokens=me.tokens||[],fn,code,i,length,temp;me.definitions=defs;me.body=body;body.push('return '+me.compile(expr)+';');length=tokens.length;code='var fm = Ext.util.Format,\nme,';temp='var a = Ext.Array.from(values);\nme = scope;\n';if(tokens.length){for(i=0;i<length;i++){code+='v'+i+((i===length-1)?';':',');temp+='v'+i+' = a['+i+']; '}}else{code+='v0;';temp+='v0 = a[0];'}
defs=Ext.Array.insert(defs,0,[code]);body=Ext.Array.insert(body,0,[temp]);body=body.join('\n');if(debug){body='debugger;\n'+body}
defs.push((me.useEval?'$=':'return')+' function (values, scope) {',body,'}');code=defs.join('\n');fn=me.useEval?me.evalFn(code):(new Function('Ext',code))(Ext);me.definitions=me.body=null;return fn},compile:function(expr){var me=this,v;switch(expr.arity){case 'ident':return me.addToken(expr.value);case 'literal':v=expr.value;return(typeof v==='string')?'"'+String(v).replace(me.escapeRe,'\\$1')+'"':v;case 'unary':return me.compileUnary(expr);case 'binary':return me.compileBinary(expr);case 'ternary':return me.compileTernary(expr);case 'formatter':return me.compileFormatter(expr)}
return this.syntaxError(expr.at,'Compile error! Unknown symbol')},compileUnary:function(expr){var v=expr.value,op=expr.operand;if(v==='!'||v==='-'||v==='+'){return v+'('+this.compile(op)+')'}else if(v==='@'){if(!op.isIdent){return this.syntaxError(expr.at,'Compile error! Unexpected symbol')}
return op.value}
return''},compileBinary:function(expr){return'('+this.compile(expr.lhs)+' '+expr.value+' '+this.compile(expr.rhs)+')'},compileTernary:function(expr){return'('+this.compile(expr.condition)+' ? '+this.compile(expr.tv)+' : '+this.compile(expr.fv)+')'},compileFormatter:function(expr){var me=this,fmt=expr.fmt,length=fmt.length,body=['var ret;'],i;if(fmt.length){body.push('ret = '+me.compileFormatFn(fmt[0],me.compile(expr.operand))+';');for(i=1;i<length;i++){body.push('ret = '+me.compileFormatFn(fmt[i],'ret')+';')}}
body.push('return ret;');return me.addFn(body.join('\n'))},compileFormatFn:function(expr,value){var fmt,args=[],code='',length,i;if(expr.isIdent){fmt=expr.value}else if(expr.isInvoke){fmt=expr.operand.value;args=expr.args}
if(fmt.substring(0,5)==='this.'){fmt='me.'+fmt.substring(5)}else{if(!(fmt in Ext.util.Format)){return this.syntaxError(expr.at,'Compile error! Invalid format specified "'+fmt+'"')}
fmt='fm.'+fmt}
code+=value;length=args.length;for(i=0;i<length;i++){code+=', '+this.compile(args[i])}
return fmt+'('+code+')'},addFn:function(body){var defs=this.definitions,name='f'+defs.length;defs.push('function '+name+'() {',body,'}');return name+'()'},evalFn:function($){eval($);return $},addToken:function(token){var tokensMap=this.tokensMap,tokens=this.tokens,pos=0;if(tokensMap&&tokens){if(token in tokensMap){pos=tokensMap[token]}else{tokensMap[token]=pos=tokens.length;tokens.push(token)}}
return'v'+pos}}})
;
Ext.define('Ext.app.bind.Template',{requires:['Ext.util.Format','Ext.app.bind.Parser'],escapes:!1,buffer:null,slots:null,tokens:null,constructor:function(text){var me=this,initters=me._initters,name;me.text=text;for(name in initters){me[name]=initters[name]}},_initters:{apply:function(values,scope){return this.parse().apply(values,scope)},getTokens:function(){return this.parse().getTokens()}},apply:function(values,scope){var me=this,slots=me.slots,buffer=me.buffer,length=slots.length,i,slot;for(i=0;i<length;++i){slot=slots[i];if(slot){buffer[i]=slot(values,scope)}}
if(slot&&me.single){return buffer[0]}
return buffer.join('')},getText:function(){return this.buffer.join('')},getTokens:function(){return this.tokens},isStatic:function(){var tokens=this.getTokens(),slots=this.slots;return(tokens.length===0&&slots.length===0)},privates:{literalChar:'~',escapeChar:'\\',parse:function(){var me=this,text=me.text,parser=Ext.app.bind.Parser.fly(),buffer=(me.buffer=[]),slots=(me.slots=[]),length=text.length,pos=0,escapes=me.escapes,current='',i=0,esc=me.escapeChar,lit=me.literalChar,escaped,lastEscaped,c,prev,key;for(key in me._initters){delete me[key]}
me.tokens=[];me.tokensMap={};while(i<length){c=text[i];lastEscaped=escaped;escaped=escapes&&c===esc;if(escaped){c=text[i+1];++i}else if(c===lit&&prev===lit&&!lastEscaped){current=current.slice(0,-1);current+=text.substring(i+1);break}else if(c==='{'){if(current){buffer[pos++]=current;current=''}
parser.reset(text,i+1);i=me.parseExpression(parser,pos);++pos;continue}
current+=c;++i;prev=c}
if(current){buffer[pos]=current}
parser.release();me.single=buffer.length===0&&slots.length===1;return me},parseExpression:function(parser,pos){var i;this.slots[pos]=parser.compileExpression(this.tokens,this.tokensMap);i=parser.token.at+1;parser.expect('}');return i}}})
;
Ext.define('Ext.app.bind.TemplateBinding',{extend:'Ext.app.bind.BaseBinding',requires:['Ext.app.bind.Multi','Ext.app.bind.Template'],isTemplateBinding:!0,lastValue:undefined,value:undefined,constructor:function(template,owner,callback,scope,options){var me=this,tpl=new Ext.app.bind.Template(template),tokens=tpl.getTokens();me.callParent([owner,callback,scope,options]);me.tpl=tpl;me.tokens=tokens;tokens.$literal=!0;if(!tpl.isStatic()){me.multiBinding=new Ext.app.bind.Multi(tokens,owner,me.onBindData,me)}else{me.isStatic=!0;me.onData(tpl.getText())}},destroy:function(){var me=this;Ext.destroy(me.multiBinding);me.tpl=me.multiBinding=null;me.callParent()},getFullName:function(){var multi=this.multiBinding;return this.fullName||(this.fullName='$'+(multi?multi.getFullName():this.callParent()))},getRawValue:function(){return this.value},getTemplateScope:function(){return null},isAvailable:function(){var multi=this.multiBinding;return multi?multi.isAvailable():!1},isDescendantOf:function(){return!1},isLoading:function(){var multi=this.multiBinding;return multi?multi.isLoading():!1},onBindData:function(data){this.onData(this.tpl.apply(data,this.getTemplateScope()))},onData:function(value){var me=this,lastValue=me.value;if(lastValue!==(me.value=value)){me.lastValue=lastValue;me.schedule()}},react:function(){this.notify(this.value)},refresh:function(){var multi=this.multiBinding;if(multi){multi.refresh()}},privates:{sort:function(){var multi=this.multiBinding;if(multi){this.scheduler.sortItem(multi)}}}})
;
Ext.define('Ext.data.ChainedStore',{extend:'Ext.data.AbstractStore',alias:'store.chained',mixins:['Ext.data.LocalStore'],isChainedStore:!0,config:{source:null,remoteFilter:!1,remoteSort:!1},syncSourceGrouping:!1,updateRemoteFilter:function(remoteFilter,oldRemoteFilter){if(remoteFilter){Ext.raise('Remote filtering cannot be used with chained stores.')}
this.callParent([remoteFilter,oldRemoteFilter])},updateRemoteSort:function(remoteSort,oldRemoteSort){if(remoteSort){Ext.raise('Remote sorting cannot be used with chained stores.')}
this.callParent([remoteSort,oldRemoteSort])},remove:function(){var source=this.getSource();if(!source){Ext.raise('Cannot remove records with no source.')}
return source.remove.apply(source,arguments)},removeAll:function(){var source=this.getSource();if(!source){Ext.raise('Cannot remove records with no source.')}
return source.removeAll()},getData:function(){var me=this,data=me.data;if(!data){me.data=data=me.constructDataCollection()}
return data},getTotalCount:function(){return this.getCount()},getSession:function(){return this.getSourceValue('getSession',null)},applySource:function(source){if(source){var original=source,s;source=Ext.data.StoreManager.lookup(source);if(!source){s='Invalid source {0}specified for Ext.data.ChainedStore';s=Ext.String.format(s,typeof original==='string'?'"'+original+'" ':'');Ext.raise(s)}}
return source},updateSource:function(source,oldSource){var me=this,data;if(oldSource&&!oldSource.destroyed){oldSource.removeObserver(me)}
if(source){data=me.getData();data.setSource(source.getData());if(me.syncSourceGrouping){me.setGrouper(source.getGrouper())}
if(!me.isInitializing){me.fireEvent('refresh',me);me.fireEvent('datachanged',me)}
source.addObserver(me)}},getModel:function(){return this.getSourceValue('getModel',null)},getProxy:function(){return null},onCollectionAdd:function(collection,info){var me=this,records=info.items,lastChunk=!info.next;if(me.ignoreCollectionAdd){return}
if(me.activeRanges){me.syncActiveRanges()}
me.fireEvent('add',me,records,info.at);if(lastChunk){me.fireEvent('datachanged',me)}},onCollectionItemChange:function(collection,info){var me=this,record=info.item,modifiedFieldNames=info.modified||null,type=info.meta;if(me.activeRanges&&info.newIndex!==info.oldIndex){me.syncActiveRanges()}
me.onUpdate(record,type,modifiedFieldNames,info);me.fireEvent('update',me,record,type,modifiedFieldNames,info);me.fireEvent('datachanged',me)},onCollectionUpdateKey:function(source,details){this.fireEvent('idchanged',this,details.item,details.oldKey,details.newKey)},onUpdate:Ext.emptyFn,lastCollectionRefesh:null,onCollectionRefresh:function(collection){var me=this,gen=collection.generation;if(!me.isConfiguring&&me.lastCollectionRefesh!==gen){me.lastCollectionRefesh=gen;me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}},onCollectionRemove:function(collection,info){var me=this,records=info.items,lastChunk=!info.next;if(me.ignoreCollectionRemove){return}
me.fireEvent('remove',me,records,info.at,!1);if(lastChunk){me.fireEvent('datachanged',me)}},onSourceBeforeLoad:function(source,operation){this.fireEvent('beforeload',this,operation);this.callObservers('BeforeLoad',[operation])},onSourceAfterLoad:function(source,records,successful,operation){this.fireEvent('load',this,records,successful,operation);this.callObservers('AfterLoad',[records,successful,operation])},onFilterEndUpdate:function(){var me=this;if(me.getData().generation===me.lastCollectionRefesh&&!me.getRemoteFilter()){me.suppressNextFilter=!0}
me.callParent(arguments);me.callObservers('Filter')},onSourceBeforePopulate:function(){this.ignoreCollectionAdd=!0;this.callObservers('BeforePopulate')},onSourceAfterPopulate:function(){var me=this;me.ignoreCollectionAdd=!1;me.fireEvent('datachanged',me);me.fireEvent('refresh',me);this.callObservers('AfterPopulate')},onSourceBeforeClear:function(){this.ignoreCollectionRemove=!0;this.callObservers('BeforeClear')},onSourceAfterClear:function(){this.ignoreCollectionRemove=!1;this.callObservers('AfterClear')},onSourceBeforeRemoveAll:function(){this.ignoreCollectionRemove=!0;this.callObservers('BeforeRemoveAll')},onSourceAfterRemoveAll:function(source,silent){var me=this;me.ignoreCollectionRemove=!1;if(!silent){me.fireEvent('clear',me);me.fireEvent('datachanged',me)}
this.callObservers('AfterRemoveAll',[silent])},onSourceFilter:function(){var me=this,gen=me.getData().generation;if(me.lastCollectionRefesh!==gen){me.lastCollectionRefesh=gen;me.fireEvent('refresh',me);me.fireEvent('datachanged',me)}},onSourceGrouperChange:function(source,grouper){if(this.syncSourceGrouping){this.setGrouper(grouper)}},hasPendingLoad:function(){return this.getSourceValue('hasPendingLoad',!1)},isLoaded:function(){return this.getSourceValue('isLoaded',!1)},isLoading:function(){return this.getSourceValue('isLoading',!1)},doDestroy:function(){var me=this;me.observers=null;me.setSource(null);me.getData().destroy(!0);me.data=null;me.callParent()},privates:{getSourceValue:function(method,defaultValue){var source=this.getSource(),val=defaultValue;if(source&&!source.destroyed){val=source[method]()}
return val},isMoving:function(){var source=this.getSource();return source.isMoving?source.isMoving.apply(source,arguments):!1},loadsSynchronously:function(){return this.getSource().loadsSynchronously()}}})
;
Ext.define('Ext.app.ViewModel',{mixins:['Ext.mixin.Factoryable','Ext.mixin.Identifiable'],requires:['Ext.util.Scheduler','Ext.data.Session','Ext.app.bind.RootStub','Ext.app.bind.LinkStub','Ext.app.bind.Multi','Ext.app.bind.Formula','Ext.app.bind.TemplateBinding','Ext.data.ChainedStore'],alias:'viewmodel.default',isViewModel:!0,factoryConfig:{name:'viewModel'},collectTimeout:100,expressionRe:/^(?:\{(?:(\d+)|([a-z_][\w.]*))\})$/i,statics:{escape:function(value){var ret=value,key;if(typeof value==='string'){ret='~~'+value}else if(value&&value.constructor===Object){ret={};for(key in value){ret[key]=this.escape(value[key])}}
return ret}},$configStrict:!1,config:{data:!0,formulas:{$value:null,merge:function(newValue,currentValue,target,mixinClass){return this.mergeNew(newValue,currentValue,target,mixinClass)}},links:null,parent:null,root:!0,scheduler:null,schema:'default',session:null,stores:null,view:null},constructor:function(config){this.bindings={};this.initConfig(config)},destroy:function(){var me=this,scheduler=me._scheduler,stores=me.storeInfo,parent=me.getParent(),task=me.collectTask,children=me.children,bindings=me.bindings,key,store,autoDestroy,storeBinding;me.destroying=!0;if(task){task.cancel();me.collectTask=null}
if(children){for(key in children){children[key].destroy()}}
if(stores){for(key in stores){store=stores[key];storeBinding=store.$binding;autoDestroy=store.autoDestroy;if(autoDestroy||(!store.$wasInstance&&autoDestroy!==!1)){store.destroy()}
Ext.destroy(storeBinding)}}
if(parent){parent.unregisterChild(me)}
me.getRoot().destroy();for(key in bindings){bindings[key].destroy()}
if(scheduler&&scheduler.$owner===me){scheduler.$owner=null;scheduler.destroy()}
me.children=me.storeInfo=me._session=me._view=me._scheduler=me.bindings=me._root=me._parent=me.formulaFn=me.$formulaData=null;me.callParent()},bind:function(descriptor,callback,scope,options){var me=this,track=!0,binding;scope=scope||me;if(!options&&descriptor.bindTo!==undefined&&!Ext.isString(descriptor)){options=descriptor;descriptor=options.bindTo}
if(!Ext.isString(descriptor)){binding=new Ext.app.bind.Multi(descriptor,me,callback,scope,options)}else if(me.expressionRe.test(descriptor)){descriptor=descriptor.substring(1,descriptor.length-1);binding=me.bindExpression(descriptor,callback,scope,options);track=!1}else{binding=new Ext.app.bind.TemplateBinding(descriptor,me,callback,scope,options)}
if(track){me.bindings[binding.id]=binding}
return binding},getSession:function(){var me=this,session=me._session,parent;if(!session&&(parent=me.getParent())){me.setSession(session=parent.getSession())}
return session||null},getStore:function(key){var storeInfo=this.storeInfo,store;if(storeInfo){store=storeInfo[key]}
return store||null},linkTo:function(key,reference){var me=this,stub,create,id,modelType,linkStub,rec;if(key.indexOf('.')>-1){Ext.raise('Links can only be at the top-level: "'+key+'"')}
if(reference.isModel){reference={type:reference.entityName,id:reference.id}}
modelType=reference.type||reference.reference;create=reference.create;if(modelType){id=reference.id;if(!reference.create&&Ext.isEmpty(id)){Ext.raise('No id specified. To create a phantom model, specify "create: true" '+'as part of the reference.')}
if(create){id=undefined}
rec=me.getRecord(modelType,id);if(Ext.isObject(create)){rec.set(create);rec.commit();rec.phantom=!0}
stub=me.getRoot().createStubChild(key);stub.set(rec)}else{stub=me.getStub(key);if(!stub.isLinkStub){linkStub=new Ext.app.bind.LinkStub(me,stub.name);stub.graft(linkStub);stub=linkStub}
stub.link(reference)}},notify:function(){var scheduler=this.getScheduler();if(!scheduler.firing){scheduler.notify()}},get:function(path){return this.getStub(path).getValue()},set:function(path,value){var me=this,obj,stub;me.getData();if(value===undefined&&path&&path.constructor===Object){stub=me.getRoot();value=path}else if(path&&path.indexOf('.')<0){obj={};obj[path]=value;value=obj;stub=me.getRoot()}else{stub=me.getStub(path)}
stub.set(value)},privates:{registerChild:function(child){var children=this.children;if(!children){this.children=children={}}
children[child.getId()]=child},unregisterChild:function(child){var children=this.children;if(!this.destroying&&children){delete children[child.getId()]}},getRecord:function(type,id){var session=this.getSession(),Model=type,hasId=id!==undefined,record;if(session){if(hasId){record=session.getRecord(type,id)}else{record=session.createRecord(type)}}else{if(!Model.$isClass){Model=this.getSchema().getEntity(Model);if(!Model){Ext.raise('Invalid model name: '+type)}}
if(hasId){record=Model.createWithId(id);record.load()}else{record=new Model()}}
return record},bindExpression:function(descriptor,callback,scope,options){var stub=this.getStub(descriptor);return stub.bind(callback,scope,options)},applyScheduler:function(scheduler){if(scheduler&&!scheduler.isInstance){if(scheduler===!0){scheduler={}}
if(!('preSort' in scheduler)){scheduler=Ext.apply({preSort:'kind,-depth'},scheduler)}
scheduler=new Ext.util.Scheduler(scheduler);scheduler.$owner=this}
return scheduler},getScheduler:function(){var me=this,scheduler=me._scheduler,parent;if(!scheduler){if(!(parent=me.getParent())){scheduler=new Ext.util.Scheduler({preSort:'kind,-depth'});scheduler.$owner=me}else{scheduler=parent.getScheduler()}
me.setScheduler(scheduler)}
return scheduler},getStub:function(bindDescr){var root=this.getRoot();return bindDescr?root.getChild(bindDescr):root},collect:function(){var me=this,parent=me.getParent(),task=me.collectTask;if(parent){parent.collect();return}
if(!task){task=me.collectTask=new Ext.util.DelayedTask(me.doCollect,me)}
if(me.collectTimeout===0){me.doCollect()}else{task.delay(me.collectTimeout)}},doCollect:function(){var children=this.children,key;if(children){for(key in children){children[key].doCollect()}}
this.getRoot().collect()},invalidateChildLinks:function(name,clear){var children=this.children,key;if(children){for(key in children){children[key].getRoot().invalidateChildLink(name,clear)}}},onBindDestroy:function(binding,fromChild){var me=this,parent;if(me.destroying){return}
if(!fromChild){delete me.bindings[binding.id]}
parent=me.getParent();if(parent){parent.onBindDestroy(binding,!0)}else{me.collect()}},applyData:function(newData,data){var me=this,linkData,parent;me.getSession();if(!data){parent=me.getParent();me.linkData=linkData=parent?Ext.Object.chain(parent.getData()):{};me.data=me._data=Ext.Object.chain(linkData)}
if(newData&&newData.constructor===Object){me.getRoot().set(newData,!0)}},applyParent:function(parent){if(parent){parent.registerChild(this)}
return parent},applyStores:function(stores){var me=this,root=me.getRoot(),key,cfg,storeBind,stub,listeners;me.storeInfo={};me.listenerScopeFn=function(){return me.getView().getInheritedConfig('defaultListenerScope')};for(key in stores){cfg=stores[key];if(cfg.isStore){cfg.$wasInstance=!0;me.setupStore(cfg,key);continue}else if(Ext.isString(cfg)){cfg={source:cfg}}else{cfg=Ext.apply({},cfg)}
listeners=cfg.listeners;delete cfg.listeners;storeBind=me.bind(cfg,me.onStoreBind,me,{trackStatics:!0});if(storeBind.isStatic()){storeBind.destroy();me.createStore(key,cfg,listeners)}else{storeBind.$storeKey=key;storeBind.$listeners=listeners;stub=root.createStubChild(key);stub.setStore(storeBind)}}},onStoreBind:function(cfg,oldValue,binding){var info=this.storeInfo,key=binding.$storeKey,store=info[key],proxy;if(!store){this.createStore(key,cfg,binding.$listeners,binding)}else{cfg=Ext.merge({},binding.pruneStaticKeys());proxy=cfg.proxy;delete cfg.type;delete cfg.model;delete cfg.fields;delete cfg.proxy;delete cfg.listeners;if(proxy){delete proxy.reader;delete proxy.writer;store.getProxy().setConfig(proxy)}
store.setConfig(cfg)}},createStore:function(key,cfg,listeners,binding){var session=this.getSession(),store;cfg=Ext.apply({},cfg);if(cfg.session){cfg.session=session}
if(cfg.source){cfg.type=cfg.type||'chained'}
cfg.listeners=listeners;cfg.resolveListenerScope=this.listenerScopeFn;store=Ext.Factory.store(cfg);store.$binding=binding;this.setupStore(store,key)},setupStore:function(store,key){var me=this,obj={};me.getData();store.resolveListenerScope=me.listenerScopeFn;me.storeInfo[key]=store;obj[key]=store;me.setData(obj)},applyFormulas:function(formulas){var me=this,root=me.getRoot(),name,stub;me.getData();for(name in formulas){if(name.indexOf('.')>=0){Ext.raise('Formula names cannot contain dots: '+name)}
root.createStubChild(name);stub=me.getStub(name);stub.setFormula(formulas[name])}
return formulas},applyLinks:function(links){var link;for(link in links){this.linkTo(link,links[link])}},applySchema:function(schema){return Ext.data.schema.Schema.get(schema)},applyRoot:function(){var root=new Ext.app.bind.RootStub(this),parent=this.getParent();if(parent){root.depth=parent.getRoot().depth-1000}
return root},getFormulaFn:function(data){var me=this,fn=me.formulaFn;if(!fn){fn=me.formulaFn=function(name){return me.$formulaData[name]}}
me.$formulaData=data;return fn}}})
;
Ext.define('Ext.app.domain.Controller',{extend:'Ext.app.EventDomain',singleton:!0,requires:['Ext.app.Controller'],type:'controller',prefix:'controller.',idMatchRe:/^#/,constructor:function(){var me=this;me.callParent();me.monitor(Ext.app.BaseController)},match:function(target,selector){var result=!1,alias=target.alias;if(selector==='*'){result=!0}else if(selector==='#'){result=!!target.isApplication}else if(this.idMatchRe.test(selector)){result=target.getId()===selector.substring(1)}else if(alias){result=Ext.Array.indexOf(alias,this.prefix+selector)>-1}
return result}})
;
Ext.define('Ext.direct.Manager',{singleton:!0,requires:['Ext.util.MixedCollection'],mixins:['Ext.mixin.Observable'],exceptions:{TRANSPORT:'xhr',PARSE:'parse',DATA:'data',LOGIN:'login',SERVER:'exception'},providerClasses:{},remotingMethods:{},config:{varName:'Ext.REMOTING_API'},apiNotFoundError:'Ext Direct API was not found at {0}',constructor:function(){var me=this;me.mixins.observable.constructor.call(me);me.transactions=new Ext.util.MixedCollection();me.providers=new Ext.util.MixedCollection()},addProvider:function(provider){var me=this,args=arguments,relayers=me.relayers||(me.relayers={}),i,len;if(args.length>1){for(i=0,len=args.length;i<len;++i){me.addProvider(args[i])}
return}
if(!provider.isProvider){provider=Ext.create('direct.'+provider.type+'provider',provider)}
me.providers.add(provider);provider.on('data',me.onProviderData,me);if(provider.relayedEvents){relayers[provider.id]=me.relayEvents(provider,provider.relayedEvents)}
if(!provider.isConnected()){provider.connect()}
return provider},loadProvider:function(config,callback,scope){var me=this,classes=me.providerClasses,type,url,varName,provider,i,len;if(Ext.isArray(config)){for(i=0,len=config.length;i<len;i++){me.loadProvider(config[i],callback,scope)}
return}
type=config.type;url=config.url;if(classes[type]&&classes[type].checkConfig(config)){provider=me.addProvider(config);me.fireEventArgs('providerload',[url,provider]);Ext.callback(callback,scope,[url,provider]);return}
varName=config.varName||me.getVarName();delete config.varName;if(!url){Ext.raise("Need API discovery URL to load a Remoting provider!")}
delete config.url;Ext.Loader.loadScript({url:url,scope:me,onLoad:function(){this.onApiLoadSuccess({url:url,varName:varName,config:config,callback:callback,scope:scope})},onError:function(){this.onApiLoadFailure({url:url,callback:callback,scope:scope})}})},getProvider:function(id){return id.isProvider?id:this.providers.get(id)},removeProvider:function(provider){var me=this,providers=me.providers,relayers=me.relayers,id;provider=provider.isProvider?provider:providers.get(provider);if(provider){provider.un('data',me.onProviderData,me);id=provider.id;if(relayers[id]){relayers[id].destroy();delete relayers[id]}
providers.remove(provider);return provider}
return null},addTransaction:function(transaction){this.transactions.add(transaction);return transaction},removeTransaction:function(transaction){var me=this;transaction=me.getTransaction(transaction);me.transactions.remove(transaction);return transaction},getTransaction:function(transaction){return typeof transaction==='object'?transaction:this.transactions.get(transaction)},onProviderData:function(provider,event){var me=this,i,len;if(Ext.isArray(event)){for(i=0,len=event.length;i<len;++i){me.onProviderData(provider,event[i])}
return}
if(event.name&&event.name!=='event'&&event.name!=='exception'){me.fireEvent(event.name,event)}else if(event.status===!1){me.fireEvent('exception',event)}
me.fireEvent('event',event,provider)},parseMethod:function(fn){var current=Ext.global,i=0,resolved,parts,len;if(Ext.isFunction(fn)){resolved=fn}else if(Ext.isString(fn)){resolved=this.remotingMethods[fn];if(!resolved){parts=fn.split('.');len=parts.length;while(current&&i<len){current=current[parts[i]];++i}
resolved=Ext.isFunction(current)?current:null}}
return resolved||null},resolveApi:function(api,caller){var prefix,action,method,fullName,fn;prefix=api&&api.prefix;if(prefix&&prefix.substr(prefix.length-1)!=='.'){prefix+='.'}
for(action in api){method=api[action];if(action!=='prefix'&&typeof method!=='function'){fullName=(prefix||'')+method;fn=this.parseMethod(fullName);if(typeof fn==='function'){api[action]=fn}else{Ext.raise("Cannot resolve Direct API method '"+fullName+"' for "+action+" action in "+caller.$className+" instance with id: "+(caller.id!=null?caller.id:'unknown'))}}}
return api},privates:{addProviderClass:function(type,cls){this.providerClasses[type]=cls},onApiLoadSuccess:function(options){var me=this,url=options.url,varName=options.varName,api,provider,error;try{api=Ext.apply(options.config,eval(varName));provider=me.addProvider(api)}catch(e){error=e+''}
if(error){me.fireEventArgs('providerloaderror',[url,error]);Ext.callback(options.callback,options.scope,[url,error])}else{me.fireEventArgs('providerload',[url,provider]);Ext.callback(options.callback,options.scope,[url,provider])}},onApiLoadFailure:function(options){var url=options.url,error;error=Ext.String.format(this.apiNotFoundError,url);this.fireEventArgs('providerloaderror',[url,error]);Ext.callback(options.callback,options.scope,[url,error])},registerMethod:function(name,method){this.remotingMethods[name]=method},clearAllMethods:function(){this.remotingMethods={}}}},function(){Ext.Direct=Ext.direct.Manager})
;
Ext.define('Ext.direct.Provider',{alias:'direct.provider',mixins:['Ext.mixin.Observable'],requires:['Ext.direct.Manager'],isProvider:!0,$configPrefixed:!1,$configStrict:!1,config:{headers:undefined},subscribers:0,constructor:function(config){var me=this;me.mixins.observable.constructor.call(me,config);me.requests={};if(me.id==null){me.id=Ext.id(null,'provider-')}},destroy:function(){var me=this;me.disconnect(!0);me.callParent()},isConnected:function(){return this.subscribers>0},connect:function(){var me=this;if(me.subscribers===0){me.doConnect();me.fireEventArgs('connect',[me])}
me.subscribers++},doConnect:Ext.emptyFn,disconnect:function(force){var me=this;if(me.subscribers>0||force){if(force){me.subscribers=0}else{me.subscribers--}
if(me.subscribers===0){me.doDisconnect();me.fireEventArgs('disconnect',[me])}}},doDisconnect:function(){var requests=this.requests,request,id;for(id in requests){request=requests[id];request.abort()}
this.requests={}},sendAjaxRequest:function(params){var request=Ext.Ajax.request(params);if(request&&request.id){this.requests[request.id]=request}
return request},onData:function(options,success,response){if(response&&response.request){delete this.requests[response.request.id]}},inheritableStatics:{checkConfig:Ext.returnFalse},onClassExtended:function(cls,data,hooks){if(data.type){Ext.direct.Manager.addProviderClass(data.type,cls)}}})
;
Ext.define('Ext.app.domain.Direct',{extend:'Ext.app.EventDomain',singleton:!0,requires:['Ext.direct.Provider'],type:'direct',idProperty:'id',constructor:function(){var me=this;me.callParent();me.monitor(Ext.direct.Provider)}})
;
Ext.define('Ext.data.PageMap',{extend:'Ext.util.LruCache',config:{store:null,pageSize:0,rootProperty:''},clear:function(initial){var me=this;me.pageMapGeneration=(me.pageMapGeneration||0)+1;me.indexMap={};me.callParent([initial])},updatePageSize:function(value,oldValue){if(oldValue!=null){throw "pageMap page size may not be changed"}},forEach:function(fn,scope){var me=this,pageNumbers=Ext.Object.getKeys(me.map),pageCount=pageNumbers.length,pageSize=me.getPageSize(),pageNumber,page,i,j,len;for(i=0;i<pageCount;i++){pageNumbers[i]=+pageNumbers[i]}
Ext.Array.sort(pageNumbers,Ext.Array.numericSortFn);scope=scope||me;for(i=0;i<pageCount;i++){pageNumber=pageNumbers[i];page=me.getPage(pageNumber);len=page.length;for(j=0;j<len;j++){if(fn.call(scope,page[j],(pageNumber-1)*pageSize+j)===!1){return}}}},findBy:function(fn,scope){var me=this,result=null;scope=scope||me;me.forEach(function(rec,index){if(fn.call(scope,rec,index)){result=rec;return!1}});return result},findIndexBy:function(fn,scope){var me=this,result=-1;scope=scope||me;me.forEach(function(rec,index){if(fn.call(scope,rec)){result=index;return!1}});return result},find:function(property,value,start,startsWith,endsWith,ignoreCase){if(Ext.isEmpty(value,!1)){return null}
var regex=Ext.String.createRegex(value,startsWith,endsWith,ignoreCase),root=this.getRootProperty();return this.findBy(function(item){return item&&regex.test((root?item[root]:item)[property])},null,start)},findIndex:function(property,value,start,startsWith,endsWith,ignoreCase){if(Ext.isEmpty(value,!1)){return null}
var regex=Ext.String.createRegex(value,startsWith,endsWith,ignoreCase),root=this.getRootProperty();return this.findIndexBy(function(item){return item&&regex.test((root?item[root]:item)[property])},null,start)},getPageFromRecordIndex:function(index){return Math.floor(index/this.getPageSize())+1},addAll:function(records){if(this.getCount()){Ext.raise('Cannot addAll to a non-empty PageMap')}
this.addPage(1,records)},addPage:function(pageNumber,records){var me=this,pageSize=me.getPageSize(),lastPage=pageNumber+Math.floor((records.length-1)/pageSize),storeIndex=(pageNumber-1)*pageSize,indexMap=me.indexMap,page,i,len,startIdx;for(startIdx=0;pageNumber<=lastPage;pageNumber++,startIdx+=pageSize){page=Ext.Array.slice(records,startIdx,startIdx+pageSize);for(i=0,len=page.length;i<len;i++){indexMap[page[i].internalId]=storeIndex++}
me.add(pageNumber,page);me.fireEvent('pageadd',me,pageNumber,page)}},getCount:function(){var result=this.callParent();if(result){result=(result-1)*this.getPageSize()+this.last.value.length}
return result},getByInternalId:function(internalId){var index=this.indexMap[internalId];if(index!=null){return this.getAt(index)}},indexOf:function(record){var result=-1;if(record){result=this.indexMap[record.internalId];if(result==null){result=-1}}
return result},insert:function(){Ext.raise('insert operation not suppported into buffered Store')},remove:function(){Ext.raise('remove operation not suppported from buffered Store')},removeAt:function(){Ext.raise('removeAt operation not suppported from buffered Store')},removeAtKey:function(page){var me=this,thePage=me.getPage(page),result,i,len;if(thePage){if(me.fireEvent('beforepageremove',me,page,thePage)!==!1){len=thePage.length;for(i=0;i<len;i++){delete me.indexMap[thePage[i].internalId]}
result=me.callParent(arguments);me.fireEvent('pageremove',me,page,thePage);thePage.length=0}}
return result},getPage:function(pageNumber){return this.get(pageNumber)},hasRange:function(start,end){var me=this,pageNumber=me.getPageFromRecordIndex(start),endPageNumber=me.getPageFromRecordIndex(end);for(;pageNumber<=endPageNumber;pageNumber++){if(!me.hasPage(pageNumber)){return!1}}
return(endPageNumber-1)*me._pageSize+me.getPage(endPageNumber).length>end},hasPage:function(pageNumber){return!!this.get(pageNumber)},peekPage:function(pageNumber){return this.map[pageNumber]},getAt:function(index){return this.getRange(index,index+1)[0]},getRange:function(start,end){if(end){end--}
if(!this.hasRange(start,end)){Ext.raise('PageMap asked for range which it does not have')}
var me=this,Array=Ext.Array,pageSize=me.getPageSize(),startPageNumber=me.getPageFromRecordIndex(start),endPageNumber=me.getPageFromRecordIndex(end),dataStart=(startPageNumber-1)*pageSize,dataEnd=(endPageNumber*pageSize)-1,pageNumber=startPageNumber,result=[],sliceBegin,sliceEnd,doSlice;for(;pageNumber<=endPageNumber;pageNumber++){if(pageNumber===startPageNumber){sliceBegin=start-dataStart;doSlice=sliceBegin>0}else{sliceBegin=0;doSlice=!1}
if(pageNumber===endPageNumber){sliceEnd=pageSize-(dataEnd-end);doSlice=doSlice||sliceEnd<pageSize}
if(doSlice){Array.push(result,Array.slice(me.getPage(pageNumber),sliceBegin,sliceEnd))}else{Array.push(result,me.getPage(pageNumber))}}
return result}})
;
Ext.define('Ext.data.BufferedStore',{extend:'Ext.data.ProxyStore',alias:'store.buffered',requires:['Ext.data.PageMap','Ext.util.Filter','Ext.util.Sorter','Ext.util.Grouper'],uses:['Ext.util.SorterCollection','Ext.util.FilterCollection','Ext.util.GroupCollection'],isBufferedStore:!0,buffered:!0,config:{data:0,pageSize:25,remoteSort:!0,remoteFilter:!0,sortOnLoad:!1,purgePageCount:5,trailingBufferZone:25,leadingBufferZone:200,defaultViewSize:100,viewSize:0,trackRemoved:!1},applyData:function(data){var dataCollection=this.data||(this.data=this.createDataCollection());if(data&&data!==!0){Ext.raise('Cannot load a buffered store with local data - the store is a map '+'of remote data')}
return dataCollection},applyProxy:function(proxy){proxy=this.callParent([proxy]);if(proxy&&proxy.setEnablePaging){proxy.setEnablePaging(!0)}
return proxy},applyAutoSort:function(){},createFiltersCollection:function(){return new Ext.util.FilterCollection()},createSortersCollection:function(){return new Ext.util.SorterCollection()},updateRemoteFilter:function(remoteFilter,oldRemoteFilter){if(remoteFilter===!1){Ext.raise('Buffered stores are always remotely filtered.')}
this.callParent([remoteFilter,oldRemoteFilter])},updateRemoteSort:function(remoteSort,oldRemoteSort){if(remoteSort===!1){Ext.raise('Buffered stores are always remotely sorted.')}
this.callParent([remoteSort,oldRemoteSort])},updateTrackRemoved:function(value){if(value!==!1){Ext.raise('Cannot use trackRemoved with a buffered store.')}
this.callParent(arguments)},updateGroupField:function(field){this.group(field)},getGrouper:function(){return this.grouper},isGrouped:function(){return!!this.grouper},createDataCollection:function(){var me=this,result=new Ext.data.PageMap({store:me,rootProperty:'data',pageSize:me.getPageSize(),maxSize:me.getPurgePageCount(),listeners:{clear:me.onPageMapClear,scope:me}});me.relayEvents(result,['beforepageremove','pageadd','pageremove']);me.pageRequests={};return result},add:function(){Ext.raise('add method may not be called on a buffered store - the store is a map '+'of remote data')},insert:function(){Ext.raise('insert method may not be called on a buffered store - the store is a map '+'of remote data')},removeAll:function(silent){var me=this,data=me.getData();if(data){if(silent){me.suspendEvent('clear')}
data.clear();if(silent){me.resumeEvent('clear')}}},flushLoad:function(){var me=this,options=me.pendingLoadOptions;me.clearLoadTask();if(!options){return}
if(!options.preserveOnFlush){me.getData().clear();options.page=1;options.start=0;options.limit=me.getViewSize()||me.getDefaultViewSize()}
options.loadCallback=options.callback;options.callback=null;return me.loadToPrefetch(options)},reload:function(options){var me=this,data=me.getData(),lastTotal=Number.MAX_VALUE,startIdx,endIdx,startPage,endPage,i,waitForReload,bufferZone,records;if(!options){options={}}
if(me.loading||me.fireEvent('beforeload',me,options)===!1){return}
waitForReload=function(){var newCount=me.totalCount,oldRequestSize=endIdx-startIdx;if(endIdx>=newCount){endIdx=newCount-1;startIdx=Math.max(endIdx-oldRequestSize,0)}
if(me.rangeCached(startIdx,endIdx,!1)){me.loadCount=(me.loadCount||0)+1;me.loading=!1;data.un('pageadd',waitForReload);records=data.getRange(startIdx,endIdx);me.fireEvent('refresh',me);me.fireEvent('load',me,records,!0)}};bufferZone=Math.ceil((me.getLeadingBufferZone()+me.getTrailingBufferZone())/2);if(me.lastRequestStart&&me.preserveScrollOnReload){startIdx=me.lastRequestStart;endIdx=me.lastRequestEnd;lastTotal=me.getTotalCount()}else{startIdx=options.start||0;endIdx=startIdx+(options.count||me.getPageSize())-1}
data.clear(!0);delete me.totalCount;startIdx=Math.max(startIdx-bufferZone,0);endIdx=Math.min(endIdx+bufferZone,lastTotal);startIdx=startIdx===0?0:startIdx-1;endIdx=endIdx===lastTotal?endIdx:endIdx+1;startPage=me.getPageFromRecordIndex(startIdx);endPage=me.getPageFromRecordIndex(endIdx);me.loading=!0;options.waitForReload=waitForReload;data.on('pageadd',waitForReload);for(i=startPage;i<=endPage;i++){me.prefetchPage(i,options)}},filter:function(){if(!this.getRemoteFilter()){Ext.raise('Local filtering may not be used on a buffered store - the store is a map '+'of remote data')}
this.callParent(arguments)},filterBy:function(fn,scope){Ext.raise('Local filtering may not be used on a buffered store - the store is a map '+'of remote data')},loadData:function(data,append){Ext.raise('LoadData may not be used on a buffered store - the store is a map '+'of remote data')},loadPage:function(page,options){var me=this;options=options||{};options.page=me.currentPage=page;options.start=(page-1)*me.getPageSize();options.limit=me.getViewSize()||me.getDefaultViewSize();options.loadCallback=options.callback;options.callback=null;options.preserveOnFlush=!0;return me.load(options)},clearData:function(isLoad){var me=this,data=me.getData();if(data){data.clear()}},getCount:function(){return this.totalCount||0},getRange:function(start,end,options){var me=this,maxIndex=me.totalCount-1,lastRequestStart=me.lastRequestStart,result=[],data=me.getData(),pageAddHandler,requiredStart,requiredEnd,requiredStartPage,requiredEndPage;options=Ext.apply({prefetchStart:start,prefetchEnd:end},options);end=(end>=me.totalCount)?maxIndex:end;if(options.forRender!==!1){requiredStart=start===0?0:start-1;requiredEnd=end===maxIndex?end:end+1}else{requiredStart=start;requiredEnd=end}
me.lastRequestStart=start;me.lastRequestEnd=end;if(me.rangeCached(start,end,options.forRender)){me.onRangeAvailable(options);result=data.getRange(start,end+1)}else{me.fireEvent('cachemiss',me,start,end);requiredStartPage=me.getPageFromRecordIndex(requiredStart);requiredEndPage=me.getPageFromRecordIndex(requiredEnd);pageAddHandler=function(pageMap,page,records){if(page>=requiredStartPage&&page<=requiredEndPage&&me.rangeCached(start,end)){me.fireEvent('cachefilled',me,start,end);data.un('pageadd',pageAddHandler);me.onRangeAvailable(options)}};data.on('pageadd',pageAddHandler);me.prefetchRange(start,end)}
me.primeCache(start,end,start<lastRequestStart?-1:1);return result},getById:function(id){var result=this.data.findBy(function(record){return record.getId()===id});return result},getAt:function(index){var data=this.getData();if(data.hasRange(index,index)){return data.getAt(index)}},getByInternalId:function(internalId){return this.data.getByInternalId(internalId)},contains:function(record){return this.indexOf(record)>-1},indexOf:function(record){return this.getData().indexOf(record)},indexOfId:function(id){return this.indexOf(this.getById(id))},group:function(grouper,direction){var me=this,oldGrouper;if(grouper&&typeof grouper==='string'){oldGrouper=me.grouper;if(oldGrouper&&direction!==undefined){oldGrouper.setDirection(direction)}else{me.grouper=new Ext.util.Grouper({property:grouper,direction:direction||'ASC',root:'data'})}}else{me.grouper=grouper?me.getSorters().decodeSorter(grouper,Ext.util.Grouper):null}
me.getData().clear();me.loadPage(1,{callback:function(){me.fireEvent('groupchange',me,me.getGrouper())}})},getPageFromRecordIndex:function(index){return Math.floor(index/this.getPageSize())+1},calculatePageCacheSize:function(rangeSizeRequested){var me=this,purgePageCount=me.getPurgePageCount();return purgePageCount?Math.max(me.getData().getMaxSize()||0,Math.ceil((rangeSizeRequested+me.getTrailingBufferZone()+me.getLeadingBufferZone())/me.getPageSize())*2+purgePageCount):0},loadToPrefetch:function(options){var me=this,prefetchOptions=options,i,records,dataSetSize,startIdx=options.start,endIdx=options.start+options.limit-1,rangeSizeRequested=(me.getViewSize()||options.limit),loadEndIdx=Math.min(endIdx,options.start+rangeSizeRequested-1),startPage=me.getPageFromRecordIndex(Math.max(startIdx-me.getTrailingBufferZone(),0)),endPage=me.getPageFromRecordIndex(endIdx+me.getLeadingBufferZone()),data=me.getData(),callbackFn=function(){records=records||[];if(options.loadCallback){options.loadCallback.call(options.scope||me,records,operation,!0)}
if(options.callback){options.callback.call(options.scope||me,records,startIdx||0,endIdx||0,options)}},fireEventsFn=function(){me.loadCount=(me.loadCount||0)+1;me.fireEvent('datachanged',me);me.fireEvent('refresh',me);me.fireEvent('load',me,records,!0)},waitForRequestedRange=function(){if(me.rangeCached(startIdx,loadEndIdx)){me.loading=!1;records=data.getRange(startIdx,loadEndIdx+1);data.un('pageadd',waitForRequestedRange);if(me.hasListeners.guaranteedrange){me.guaranteeRange(startIdx,loadEndIdx,options.callback,options.scope)}
callbackFn();fireEventsFn()}},operation;if(isNaN(me.pageSize)||!me.pageSize){Ext.raise('Buffered store configured without a pageSize',me)}
data.setMaxSize(me.calculatePageCacheSize(rangeSizeRequested));if(me.fireEvent('beforeload',me,options)!==!1){delete me.totalCount;me.loading=!0;if(options.callback){prefetchOptions=Ext.apply({},options);delete prefetchOptions.callback}
me.on('prefetch',function(store,records,successful,op){operation=op;if(successful){if((dataSetSize=me.getTotalCount())){data.on('pageadd',waitForRequestedRange);loadEndIdx=Math.min(loadEndIdx,dataSetSize-1);endPage=me.getPageFromRecordIndex(Math.min(loadEndIdx+me.getLeadingBufferZone(),dataSetSize-1));for(i=startPage+1;i<=endPage;++i){me.prefetchPage(i,prefetchOptions)}}else{callbackFn();fireEventsFn()}}else{me.loading=!1;callbackFn();me.fireEvent('load',me,records,!1)}},null,{single:!0});me.prefetchPage(startPage,prefetchOptions)}},prefetch:function(options){var me=this,pageSize=me.getPageSize(),data=me.getData(),operation,existingPageRequest;if(pageSize){if(me.lastPageSize&&pageSize!==me.lastPageSize){Ext.raise("pageSize cannot be dynamically altered")}
if(!data.getPageSize()){data.setPageSize(pageSize)}}else{me.pageSize=data.setPageSize(pageSize=options.limit)}
me.lastPageSize=pageSize;if(!options.page){options.page=me.getPageFromRecordIndex(options.start);options.start=(options.page-1)*pageSize;options.limit=Math.ceil(options.limit/pageSize)*pageSize}
existingPageRequest=me.pageRequests[options.page];if(!existingPageRequest||existingPageRequest.getOperation().pageMapGeneration!==data.pageMapGeneration){options=Ext.apply({action:'read',filters:me.getFilters().items,sorters:me.getSorters().items,grouper:me.getGrouper(),internalCallback:me.onProxyPrefetch,internalScope:me},options);operation=me.createOperation('read',options);operation.pageMapGeneration=data.pageMapGeneration;if(me.fireEvent('beforeprefetch',me,operation)!==!1){me.pageRequests[options.page]=operation.execute();if(me.getProxy().isSynchronous){delete me.pageRequests[options.page]}}}
return me},onPageMapClear:function(){var me=this,loadingFlag=me.wasLoading,reqs=me.pageRequests,data=me.getData(),page;data.clearListeners();data.on('clear',me.onPageMapClear,me);me.relayEvents(data,['beforepageremove','pageadd','pageremove']);me.loading=!0;me.totalCount=0;for(page in reqs){if(reqs.hasOwnProperty(page)){reqs[page].getOperation().abort()}}
me.fireEvent('clear',me);me.loading=loadingFlag},prefetchPage:function(page,options){var me=this,pageSize=me.getPageSize(),start=(page-1)*pageSize,total=me.totalCount;if(total!==undefined&&me.data.getCount()===total){return}
me.prefetch(Ext.applyIf({page:page,start:start,limit:pageSize},options))},onProxyPrefetch:function(operation){if(this.destroying||this.destroyed){return}
var me=this,resultSet=operation.getResultSet(),records=operation.getRecords(),successful=operation.wasSuccessful(),page=operation.getPage(),waitForReload=operation.waitForReload,oldTotal=me.totalCount,requests=me.pageRequests,key,op;if(operation.pageMapGeneration===me.getData().pageMapGeneration){if(resultSet){me.totalCount=resultSet.getTotal();if(me.totalCount!==oldTotal){me.fireEvent('totalcountchange',me.totalCount)}}
if(page!==undefined){delete me.pageRequests[page]}
me.loading=!1;me.fireEvent('prefetch',me,records,successful,operation);if(successful){if(me.totalCount===0){if(waitForReload){for(key in requests){op=requests[key].getOperation();if(op.waitForReload===waitForReload){delete op.waitForReload}}
me.getData().un('pageadd',waitForReload);me.fireEvent('refresh',me);me.fireEvent('load',me,[],!0)}}else{me.cachePage(records,operation.getPage())}}
Ext.callback(operation.getCallback(),operation.getScope()||me,[records,operation,successful])}},cachePage:function(records,page){var me=this,len=records.length,i;if(!Ext.isDefined(me.totalCount)){me.totalCount=records.length;me.fireEvent('totalcountchange',me.totalCount)}
for(i=0;i<len;i++){records[i].join(me)}
me.getData().addPage(page,records)},rangeCached:function(start,end,forRender){var requiredStart=start,requiredEnd=end;if(forRender!==!1){requiredStart=start===0?0:start-1;requiredEnd=end===this.totalCount-1?end:end+1}
return this.getData().hasRange(requiredStart,requiredEnd)},pageCached:function(page){return this.getData().hasPage(page)},pagePending:function(page){return!!this.pageRequests[page]},rangeSatisfied:function(start,end){return this.rangeCached(start,end)},onRangeAvailable:function(options){var me=this,totalCount=me.getTotalCount(),start=options.prefetchStart,end=(options.prefetchEnd>totalCount-1)?totalCount-1:options.prefetchEnd,range;end=Math.max(0,end);if(start>end){Ext.log({level:'warn',msg:'Start ('+start+') was greater than end ('+end+') for the range of records requested ('+start+'-'+options.prefetchEnd+')'+(this.storeId?' from store "'+this.storeId+'"':'')})}
range=me.getData().getRange(start,end+1);if(options.fireEvent!==!1){me.fireEvent('guaranteedrange',range,start,end,options)}
if(options.callback){options.callback.call(options.scope||me,range,start,end,options)}},guaranteeRange:function(start,end,callback,scope,options){options=Ext.apply({callback:callback,scope:scope},options);this.getRange(start,end+1,options)},prefetchRange:function(start,end){var me=this,startPage,endPage,page,data=me.getData();if(!me.rangeCached(start,end)){startPage=me.getPageFromRecordIndex(start);endPage=me.getPageFromRecordIndex(end);data.setMaxSize(me.calculatePageCacheSize(end-start+1));for(page=startPage;page<=endPage;page++){if(!me.pageCached(page)){me.prefetchPage(page)}}}},primeCache:function(start,end,direction){var me=this,leadingBufferZone=me.getLeadingBufferZone(),trailingBufferZone=me.getTrailingBufferZone(),pageSize=me.getPageSize(),totalCount=me.totalCount;if(direction===-1){start=Math.max(start-leadingBufferZone,0);end=Math.min(end+trailingBufferZone,totalCount-1)}else if(direction===1){start=Math.max(Math.min(start-trailingBufferZone,totalCount-pageSize),0);end=Math.min(end+leadingBufferZone,totalCount-1)}else{start=Math.min(Math.max(Math.floor(start-((leadingBufferZone+trailingBufferZone)/2)),0),totalCount-me.pageSize);end=Math.min(Math.max(Math.ceil(end+((leadingBufferZone+trailingBufferZone)/2)),0),totalCount-1)}
me.prefetchRange(start,end)},sort:function(field,direction,mode){if(arguments.length===0){this.clearAndLoad()}else{this.getSorters().addSort(field,direction,mode)}},onSorterEndUpdate:function(){var me=this,sorters=me.getSorters().getRange();if(sorters.length){me.fireEvent('beforesort',me,sorters);me.clearAndLoad({callback:function(){me.fireEvent('sort',me,sorters)}})}else{me.fireEvent('sort',me,sorters)}},clearAndLoad:function(options){var me=this;me.clearing=!0;me.getData().clear();me.clearing=!1;me.loadPage(1,options)},privates:{isLast:function(record){return this.indexOf(record)===this.getTotalCount()-1},isMoving:function(){return!1}}})
;
Ext.define('Ext.data.ClientStore',{extend:'Ext.data.Store',alias:'store.clientstorage',requires:['Ext.data.proxy.Memory'],config:{storage:'local',storageKey:null},trackRemoved:!1,proxy:{type:'memory',clearOnRead:!0},sync:function(options){var me=this,key=me._getKey(),storage=me.getStorage(),source=me.getDataSource(),proxy=me.getProxy(),writer=proxy.getWriter(),writeAll=writer.getWriteAllFields(),data=[];try{me.suspendAutoSync();writer.setWriteAllFields(!0);source.each(function(rec){if(rec.phantom){rec.setId(me.nextId())}
data.push(writer.getRecordData(rec));rec.commit()});if(data.length){data=JSON.stringify(data);data=storage.setItem(key,data)}else{storage.removeItem(key)}
if(options&&options.success){Ext.callback(options.success,options.scope||proxy,[null,options])}}catch(e){if(options&&options.failure){Ext.callback(options.failure,options.scope||proxy,[null,options])}}finally{me.resumeAutoSync();writer.setWriteAllFields(writeAll)}
if(options&&options.callback){Ext.callback(options.callback,options.scope||proxy,[null,options])}
return me},applyStorage:function(storage){var ret=Ext.global[storage+'Storage'];if(!ret||!ret.getItem||!ret.setItem){Ext.raise('Invalid storage config "'+storage+'"; '+'expected "local" or "session"')}
return ret},updateProxy:function(proxy,oldProxy){var me=this,key=me._getKey(),storage=me.getStorage(),data;me.callParent([proxy,oldProxy]);data=storage.getItem(key);if(data){proxy.setData(JSON.parse(data))}},privates:{_getKey:function(){var key=this.getStorageKey();if(!key){Ext.raise('ClientStore requires a storageKey')}
return key},nextId:function(){var source=this.getDataSource(),id=1;while(source.containsKey(id)){++id}
return id}}})
;
Ext.define('Ext.data.proxy.Direct',{extend:'Ext.data.proxy.Server',alternateClassName:'Ext.data.DirectProxy',alias:'proxy.direct',requires:['Ext.direct.Manager'],config:{paramOrder:undefined,paramsAsHash:!0,directFn:undefined,api:undefined,metadata:undefined},paramOrderRe:/[\s,|]/,constructor:function(config){this.callParent([config]);this.canceledOperations={}},applyParamOrder:function(paramOrder){if(Ext.isString(paramOrder)){paramOrder=paramOrder.split(this.paramOrderRe)}
return paramOrder},updateApi:function(){this.methodsResolved=!1},updateDirectFn:function(){this.methodsResolved=!1},resolveMethods:function(){var me=this,fn=me.getDirectFn(),api=me.getApi(),method;if(fn){me.setDirectFn(method=Ext.direct.Manager.parseMethod(fn));if(!Ext.isFunction(method)){Ext.raise('Cannot resolve directFn '+fn)}}
if(api){api=Ext.direct.Manager.resolveApi(api,me);me.setApi(api)}
me.methodsResolved=!0},doRequest:function(operation){var me=this,writer,request,action,params,args,api,fn;if(!me.methodsResolved){me.resolveMethods()}
request=me.buildRequest(operation);action=request.getAction();api=me.getApi();if(api){fn=api[action]}
fn=fn||me.getDirectFn();if(!fn||!fn.directCfg){Ext.raise({msg:'No Ext Direct function specified for Direct proxy "'+action+'" operation',proxy:me})}
if(!me.paramOrder&&fn.directCfg.method.len>1){Ext.raise({msg:'Incorrect parameters for Direct proxy "'+action+'" operation',proxy:me})}
writer=me.getWriter();if(writer&&operation.allowWrite()){request=writer.write(request)}
if(action==='read'){params=request.getParams()}else{params=request.getJsonData()}
args=fn.directCfg.method.getArgs({params:params,allowSingle:writer.getAllowSingle(),paramOrder:me.getParamOrder(),paramsAsHash:me.getParamsAsHash(),paramsAsArray:!0,metadata:me.getMetadata(),callback:me.createRequestCallback(request,operation),scope:me});request.setConfig({args:args,directFn:fn});fn.apply(window,args);return request},abort:function(operation){var id;if(operation&&operation.isDataRequest){operation=operation.getOperation()}
if(operation&&operation.isOperation){id=operation.id}
if(id!=null){this.canceledOperations[id]=!0}},applyEncoding:Ext.identityFn,createRequestCallback:function(request,operation){var me=this;return function(data,event){if(!me.canceledOperations[operation.id]){me.processResponse(event.status,operation,request,event)}
delete me.canceledOperations[operation.id]}},extractResponseData:function(response){return Ext.isDefined(response.result)?response.result:response.data},setException:function(operation,response){operation.setException(response.message)},buildUrl:function(){return''}})
;
Ext.define('Ext.data.DirectStore',{extend:'Ext.data.Store',alias:'store.direct',requires:['Ext.data.proxy.Direct'],constructor:function(config){var proxy;config=Ext.apply({},config);if(!config.proxy){proxy={type:'direct',reader:{type:'json'}};Ext.copyTo(proxy,config,'paramOrder,paramsAsHash,directFn,api,simpleSortMode,extraParams');Ext.copyTo(proxy.reader,config,'totalProperty,root,rootProperty,idProperty');config.proxy=proxy}
this.callParent([config])}})
;
Ext.define('Ext.data.JsonP',{singleton:!0,requestCount:0,requests:{},timeout:30000,disableCaching:!0,disableCachingParam:'_dc',callbackKey:'callback',request:function(options){options=Ext.apply({},options);if(!options.url){Ext.raise('A url must be specified for a JSONP request.')}
var me=this,disableCaching=Ext.isDefined(options.disableCaching)?options.disableCaching:me.disableCaching,cacheParam=options.disableCachingParam||me.disableCachingParam,id=++me.requestCount,callbackName=options.callbackName||'callback'+id,callbackKey=options.callbackKey||me.callbackKey,timeout=Ext.isDefined(options.timeout)?options.timeout:me.timeout,params=Ext.apply({},options.params),url=options.url,name=Ext.name,request,script;if(disableCaching&&!params[cacheParam]){params[cacheParam]=Ext.Date.now()}
options.params=params;params[callbackKey]=name+'.data.JsonP.'+callbackName;script=me.createScript(url,params,options);me.requests[id]=request={url:url,params:params,script:script,id:id,scope:options.scope,success:options.success,failure:options.failure,callback:options.callback,callbackKey:callbackKey,callbackName:callbackName};if(timeout>0){request.timeout=Ext.defer(me.handleTimeout,timeout,me,[request])}
me.setupErrorHandling(request);me[callbackName]=me.bindResponse(request);me.loadScript(request);return request},bindResponse:function(request){var me=this;return function(result){Ext.elevate(function(){me.handleResponse(result,request)})}},abort:function(request){var me=this,requests=me.requests,key;if(request){if(!request.id){request=requests[request]}
me.handleAbort(request)}else{for(key in requests){if(requests.hasOwnProperty(key)){me.abort(requests[key])}}}},setupErrorHandling:function(request){request.script.onerror=Ext.bind(this.handleError,this,[request])},handleAbort:function(request){request.errorType='abort';this.handleResponse(null,request)},handleError:function(request){request.errorType='error';this.handleResponse(null,request)},cleanupErrorHandling:function(request){request.script.onerror=null},handleTimeout:function(request){request.errorType='timeout';this.handleResponse(null,request)},handleResponse:function(result,request){var success=!0;Ext.undefer(request.timeout);delete this[request.callbackName];delete this.requests[request.id];this.cleanupErrorHandling(request);Ext.fly(request.script).destroy();if(request.errorType){success=!1;Ext.callback(request.failure,request.scope,[request.errorType])}else{Ext.callback(request.success,request.scope,[result])}
Ext.callback(request.callback,request.scope,[success,result,request.errorType])},createScript:function(url,params,options){var script=document.createElement('script');script.setAttribute("src",Ext.urlAppend(url,Ext.Object.toQueryString(params)));script.setAttribute("async",!0);script.setAttribute("type","text/javascript");return script},loadScript:function(request){Ext.getHead().appendChild(request.script)}})
;
Ext.define('Ext.data.proxy.JsonP',{extend:'Ext.data.proxy.Server',alternateClassName:'Ext.data.ScriptTagProxy',alias:['proxy.jsonp','proxy.scripttag'],requires:['Ext.data.JsonP'],config:{callbackKey:'callback',recordParam:'records',autoAppendParams:!0},doRequest:function(operation){var me=this,request=me.buildRequest(operation),params=request.getParams();request.setConfig({callbackKey:me.callbackKey,timeout:me.timeout,scope:me,disableCaching:!1,callback:me.createRequestCallback(request,operation)});if(me.getAutoAppendParams()){request.setParams({})}
request.setRawRequest(Ext.data.JsonP.request(request.getCurrentConfig()));request.setParams(params);me.lastRequest=request;return request},createRequestCallback:function(request,operation){var me=this;return function(success,response,errorType){if(request===me.lastRequest){me.lastRequest=null}
me.processResponse(success,operation,request,response)}},setException:function(operation,response){operation.setException(operation.getRequest().getRawRequest().errorType)},buildUrl:function(request){var me=this,url=me.callParent(arguments),records=request.getRecords(),writer=me.getWriter(),params,filters,filter,i,v;if(writer&&request.getOperation().allowWrite()){request=writer.write(request)}
params=request.getParams();filters=params.filters;delete params.filters;if(filters&&filters.length){for(i=0;i<filters.length;i++){filter=filters[i];v=filter.getValue();if(v){params[filter.getProperty()]=v}}}
if(Ext.isArray(records)&&records.length>0&&(!writer||!writer.getEncode())){params[me.getRecordParam()]=me.encodeRecords(records)}
if(me.getAutoAppendParams()){url=Ext.urlAppend(url,Ext.Object.toQueryString(params))}
return url},abort:function(request){request=request||this.lastRequest;if(request){Ext.data.JsonP.abort(request.getRawRequest())}},encodeRecords:function(records){var encoded=[],i=0,len=records.length;for(;i<len;i++){encoded.push(Ext.encode(records[i].getData()))}
return encoded}})
;
Ext.define('Ext.data.JsonPStore',{extend:'Ext.data.Store',alias:'store.jsonp',requires:['Ext.data.proxy.JsonP','Ext.data.reader.Json'],constructor:function(config){config=Ext.apply({proxy:{type:'jsonp',reader:'json'}},config);this.callParent([config])}})
;
Ext.define('Ext.data.JsonStore',{extend:'Ext.data.Store',alias:'store.json',requires:['Ext.data.proxy.Ajax','Ext.data.reader.Json','Ext.data.writer.Json'],constructor:function(config){config=Ext.apply({proxy:{type:'ajax',reader:'json',writer:'json'}},config);this.callParent([config])}})
;
Ext.define('Ext.data.ModelManager',{alternateClassName:'Ext.ModelMgr',requires:['Ext.data.schema.Schema'],singleton:!0,deprecated:{5:{methods:{clear:null,create:function(data,name,id){var T=name;if(!T.isEntity){T=this.getModel(name||data.name)}
return T.createWithId(id,data)},each:function(fn,scope){Ext.data.Model.schema.eachEntity(fn,scope)},get:function(name){return this.getModel(name)},getCount:function(){return Ext.data.Model.schema.entityCount},getModel:function(id){return Ext.data.schema.Schema.lookupEntity(id)},isRegistered:function(name){return!!this.getModel(name)}}}}})
;
Ext.define('Ext.data.NodeInterface',{requires:['Ext.data.field.Boolean','Ext.data.field.Integer','Ext.data.field.String','Ext.data.writer.Json','Ext.mixin.Observable'],statics:{decorate:function(modelClass){var model=Ext.data.schema.Schema.lookupEntity(modelClass),proto=model.prototype,idName,idField,idType;if(!model.prototype.isObservable){model.mixin(Ext.mixin.Observable.prototype.mixinId,Ext.mixin.Observable)}
if(proto.isNode){return}
idName=proto.idProperty;idField=model.getField(idName);idType=idField.type;model.override(this.getPrototypeBody());model.addFields([{name:'parentId',type:idType,defaultValue:null,allowNull:idField.allowNull},{name:'index',type:'int',defaultValue:-1,persist:!1,convert:null},{name:'depth',type:'int',defaultValue:0,persist:!1,convert:null},{name:'expanded',type:'bool',defaultValue:!1,persist:!1,convert:null},{name:'expandable',type:'bool',defaultValue:!0,persist:!1,convert:null},{name:'checked',type:'auto',defaultValue:null,persist:!1,convert:null},{name:'leaf',type:'bool',defaultValue:!1},{name:'cls',type:'string',defaultValue:'',persist:!1,convert:null},{name:'iconCls',type:'string',defaultValue:'',persist:!1,convert:null},{name:'icon',type:'string',defaultValue:'',persist:!1,convert:null},{name:'glyph',type:'string',defaultValue:'',persist:!1,convert:null},{name:'root',type:'boolean',defaultValue:!1,persist:!1,convert:null},{name:'isLast',type:'boolean',defaultValue:!1,persist:!1,convert:null},{name:'isFirst',type:'boolean',defaultValue:!1,persist:!1,convert:null},{name:'allowDrop',type:'boolean',defaultValue:!0,persist:!1,convert:null},{name:'allowDrag',type:'boolean',defaultValue:!0,persist:!1,convert:null},{name:'loaded',type:'boolean',defaultValue:!1,persist:!1,convert:null},{name:'loading',type:'boolean',defaultValue:!1,persist:!1,convert:null},{name:'href',type:'string',defaultValue:'',persist:!1,convert:null},{name:'hrefTarget',type:'string',defaultValue:'',persist:!1,convert:null},{name:'qtip',type:'string',defaultValue:'',persist:!1,convert:null},{name:'qtitle',type:'string',defaultValue:'',persist:!1,convert:null},{name:'qshowDelay',type:'int',defaultValue:0,persist:!1,convert:null},{name:'children',type:'auto',defaultValue:null,persist:!1,convert:null},{name:'visible',type:'boolean',defaultValue:!0,persist:!1},{name:'text',type:'string',persist:!1}])},getPrototypeBody:function(){var bubbledEvents={idchanged:!0,append:!0,remove:!0,move:!0,insert:!0,beforeappend:!0,beforeremove:!0,beforemove:!0,beforeinsert:!0,expand:!0,collapse:!0,beforeexpand:!0,beforecollapse:!0,sort:!0},silently={silent:!0};return{isNode:!0,firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,constructor:function(){var me=this;me.mixins.observable.constructor.call(me);me.callParent(arguments);me.childNodes=[];return me},createNode:function(node){var me=this,childType=me.childType,store,storeReader,nodeProxy,nodeReader,reader,typeProperty,T=me.self;if(!node.isModel){if(childType){T=me.schema.getEntity(childType)}else{store=me.getTreeStore();storeReader=store&&store.getProxy().getReader();nodeProxy=me.getProxy();nodeReader=nodeProxy?nodeProxy.getReader():null;reader=!storeReader||(nodeReader&&nodeReader.initialConfig.typeProperty)?nodeReader:storeReader;if(reader){typeProperty=reader.getTypeProperty();if(typeProperty){T=reader.getChildType(me.schema,node,typeProperty)}}}
node=new T(node)}
if(!node.childNodes){node.firstChild=node.lastChild=node.parentNode=node.previousSibling=node.nextSibling=null;node.childNodes=[]}
return node},isLeaf:function(){return this.get('leaf')===!0},setFirstChild:function(node){this.firstChild=node},setLastChild:function(node){this.lastChild=node},updateInfo:function(commit,info){var me=this,phantom=me.phantom,result,childInfo,children,childCount,i;commit={silent:!0,commit:commit};if(info.depth!=null&&info.depth!==me.data.depth){childInfo={depth:info.depth+1};children=me.childNodes;childCount=children.length;for(i=0;i<childCount;i++){children[i].updateInfo(commit,childInfo)}}
result=me.set(info,commit);me.phantom=phantom;return result},isLast:function(){return this.get('isLast')},isFirst:function(){return this.get('isFirst')},hasChildNodes:function(){return!this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var me=this;if(me.get('expandable')){return!(me.isLeaf()||(me.isLoaded()&&!me.phantom&&!me.hasChildNodes()))}
return!1},triggerUIUpdate:function(){this.callJoined('afterEdit',[])},appendChild:function(node,suppressEvents,commit){var me=this,treeStore=me.getTreeStore(),bulkUpdate=treeStore&&treeStore.bulkUpdate,childInfo={isLast:!0,parentId:me.getId(),depth:(me.data.depth||0)+1},oldParent,previousSibling,modifiedFields,index,result,i,ln;Ext.suspendLayouts();if(Ext.isArray(node)){ln=node.length;result=new Array(ln);me.callTreeStore('beginFill');for(i=0;i<ln;i++){result[i]=me.appendChild(node[i],suppressEvents,commit)}
me.callTreeStore('endFill',[result])}else{node=me.createNode(node);if(suppressEvents!==!0&&me.fireBubbledEvent('beforeappend',[me,node])===!1){Ext.resumeLayouts(!0);return!1}
index=me.childNodes.length;oldParent=node.parentNode;if(oldParent){if(suppressEvents!==!0&&node.fireBubbledEvent('beforemove',[node,oldParent,me,index])===!1){Ext.resumeLayouts(!0);return!1}
if(oldParent.removeChild(node,!1,suppressEvents,oldParent.getTreeStore()===treeStore)===!1){Ext.resumeLayouts(!0);return!1}}
if(treeStore){treeStore.beginUpdate()}
index=me.childNodes.length;if(index===0){me.setFirstChild(node)}
me.childNodes[index]=node;node.parentNode=me;node.nextSibling=null;me.setLastChild(node);previousSibling=me.childNodes[index-1];if(previousSibling){node.previousSibling=previousSibling;previousSibling.nextSibling=node;previousSibling.updateInfo(commit,{isLast:!1});if(!bulkUpdate){previousSibling.triggerUIUpdate()}}else{node.previousSibling=null}
childInfo.isFirst=index===0;childInfo.index=index;modifiedFields=node.updateInfo(commit,childInfo);if(me.isLeaf()){me.set('leaf',!1)}
if(!me.isLoaded()){if(bulkUpdate){me.data.loaded=!0}else{me.set('loaded',!0)}}else if(me.childNodes.length===1&&!bulkUpdate){me.triggerUIUpdate()}
if(index&&me.childNodes[index-1].isExpanded()&&!bulkUpdate){me.childNodes[index-1].cascade(me.triggerUIUpdate)}
if(treeStore){treeStore.registerNode(me,!bulkUpdate);if(bulkUpdate){treeStore.registerNode(node)}}
if(suppressEvents!==!0){me.fireBubbledEvent('append',[me,node,index]);if(oldParent){node.fireBubbledEvent('move',[node,oldParent,me,index])}}
me.callTreeStore('onNodeAppend',[node,index]);if(modifiedFields){node.callJoined('afterEdit',[modifiedFields])}
result=node;if(treeStore){treeStore.endUpdate()}}
Ext.resumeLayouts(!0);return result},getOwnerTree:function(){var store=this.getTreeStore();return store&&store.ownerTree},getTreeStore:function(){var root=this;while(root&&!root.treeStore){root=root.parentNode}
return root&&root.treeStore},removeChild:function(node,erase,suppressEvents,isMove){var me=this,index=me.indexOf(node),i,childCount,previousSibling,treeStore=me.getTreeStore(),bulkUpdate=treeStore&&treeStore.bulkUpdate,removeContext,removeRange=[];if(index===-1||(suppressEvents!==!0&&me.fireBubbledEvent('beforeremove',[me,node,!!isMove])===!1)){return!1}
Ext.suspendLayouts();if(treeStore){treeStore.beginUpdate()}
Ext.Array.erase(me.childNodes,index,1);if(me.firstChild===node){me.setFirstChild(node.nextSibling)}
if(me.lastChild===node){me.setLastChild(node.previousSibling)}
previousSibling=node.previousSibling;if(previousSibling){node.previousSibling.nextSibling=node.nextSibling}
if(node.nextSibling){node.nextSibling.previousSibling=node.previousSibling;if(index===0){node.nextSibling.updateInfo(!1,{isFirst:!0})}
for(i=index,childCount=me.childNodes.length;i<childCount;i++){me.childNodes[i].updateInfo(!1,{index:i})}}else if(previousSibling){previousSibling.updateInfo(!1,{isLast:!0});if(!bulkUpdate){if(previousSibling.isExpanded()){previousSibling.cascade(me.triggerUIUpdate)}else{previousSibling.triggerUIUpdate()}}}
if(!me.childNodes.length&&!bulkUpdate){me.triggerUIUpdate()}
Ext.resumeLayouts(!0);if(suppressEvents!==!0){removeContext={parentNode:node.parentNode,previousSibling:node.previousSibling,nextSibling:node.nextSibling};me.callTreeStore('beforeNodeRemove',[[node],!!isMove,removeRange]);node.previousSibling=node.nextSibling=node.parentNode=null;me.fireBubbledEvent('remove',[me,node,!!isMove,removeContext]);me.callTreeStore('onNodeRemove',[[node],!!isMove,removeRange])}
if(erase){node.erase(!0)}else{node.clear()}
if(!isMove){node.set({parentId:null,lastParentId:me.getId()},silently)}
if(treeStore){treeStore.endUpdate()}
return node},copy:function(newId,session,deep){var me=this,result,args=[newId],len=me.childNodes?me.childNodes.length:0,i;if(session&&session.isSession){args.push(session)}else if(arguments.length<3){deep=session}
result=me.callParent(args);if(deep){for(i=0;i<len;i++){result.appendChild(me.childNodes[i].copy(undefined,!0))}}
return result},clear:function(erase,resetChildren){var me=this;me.parentNode=me.previousSibling=me.nextSibling=null;if(erase){me.firstChild=me.lastChild=me.childNodes=null}
if(resetChildren){me.firstChild=me.lastChild=null;me.childNodes.length=0;if(me.data){me.data.children=null}}},drop:function(){var me=this,childNodes=me.childNodes,parentNode=me.parentNode,treeStore=me.getTreeStore(),node,i,len;me.callParent();if(parentNode){parentNode.removeChild(me)}else if(me.get('root')){treeStore.setRoot(null)}
if(treeStore){treeStore.beginUpdate()}
for(i=0,len=childNodes?childNodes.length:0;i<len;i++){node=childNodes[i];node.clear();node.drop()}
if(treeStore){treeStore.endUpdate()}},erase:function(options){var me=this,childNodes=me.childNodes,len=childNodes&&childNodes.length,i,node;me.remove();me.clear(!0);me.callParent([options]);for(i=0;i<len;i++){node=childNodes[i];node.parentNode=null;node.erase(options)}},insertBefore:function(node,refNode,suppressEvents){var me=this,index=me.indexOf(refNode),oldParent=node.parentNode,refIndex=index,childCount,previousSibling,i,treeStore=me.getTreeStore(),bulkUpdate=treeStore&&treeStore.bulkUpdate,modifiedFields,sibling,siblingModifiedFields;if(!refNode){return me.appendChild(node)}
if(node===refNode){return!1}
node=me.createNode(node);if(suppressEvents!==!0&&me.fireBubbledEvent('beforeinsert',[me,node,refNode])===!1){return!1}
if(oldParent===me&&me.indexOf(node)<index){refIndex--}
if(oldParent){if(suppressEvents!==!0&&node.fireBubbledEvent('beforemove',[node,oldParent,me,index,refNode])===!1){return!1}
if(oldParent.removeChild(node,!1,suppressEvents,oldParent.getTreeStore()===treeStore)===!1){return!1}}
if(treeStore){treeStore.beginUpdate()}
if(refIndex===0){me.setFirstChild(node)}
Ext.Array.splice(me.childNodes,refIndex,0,node);node.parentNode=me;node.nextSibling=refNode;refNode.previousSibling=node;previousSibling=me.childNodes[refIndex-1];if(previousSibling){node.previousSibling=previousSibling;previousSibling.nextSibling=node}else{node.previousSibling=null}
modifiedFields=node.updateInfo(!1,{parentId:me.getId(),index:refIndex,isFirst:refIndex===0,isLast:!1,depth:(me.data.depth||0)+1});for(i=refIndex+1,childCount=me.childNodes.length;i<childCount;i++){sibling=me.childNodes[i];siblingModifiedFields=sibling.updateInfo(!1,{index:i});if(siblingModifiedFields){sibling.callJoined('afterEdit',[siblingModifiedFields])}}
if(!me.isLoaded()){if(bulkUpdate){me.data.loaded=!0}else{me.set('loaded',!0)}}else if(me.childNodes.length===1&&!bulkUpdate){me.triggerUIUpdate()}
if(treeStore){treeStore.registerNode(me,!bulkUpdate)}
if(suppressEvents!==!0){me.fireBubbledEvent('insert',[me,node,refNode]);if(oldParent){node.fireBubbledEvent('move',[node,oldParent,me,refIndex,refNode])}}
me.callTreeStore('onNodeInsert',[node,refIndex]);if(modifiedFields){node.callJoined('afterEdit',[modifiedFields])}
if(treeStore){treeStore.endUpdate()}
return node},insertChild:function(index,node){var sibling=this.childNodes[index];if(sibling){return this.insertBefore(node,sibling)}else{return this.appendChild(node)}},isLastVisible:function(){var me=this,result=me.data.isLast,next=me.nextSibling;if(!result&&me.getTreeStore().isFiltered()){while(next){if(next.data.visible){return!1}
next=next.nextSibling}
return!0}
return result},remove:function(erase,suppressEvents){var me=this,parentNode=me.parentNode;if(parentNode){parentNode.removeChild(me,erase,suppressEvents)}else if(erase){me.erase(!0)}
return me},removeAll:function(erase,suppressEvents,fromParent){var me=this,childNodes=me.childNodes,len=childNodes.length,node,treeStore,i,removeRange=[];if(!len){return me}
if(!fromParent){treeStore=me.getTreeStore();if(treeStore){treeStore.beginUpdate();treeStore.suspendEvent('remove');me.callTreeStore('beforeNodeRemove',[childNodes,!1,removeRange])}}
for(i=0;i<len;++i){node=childNodes[i];node.previousSibling=node.nextSibling=node.parentNode=null;me.fireBubbledEvent('remove',[me,node,!1]);if(erase){node.erase(!0)}else{node.removeAll(!1,suppressEvents,!0)}}
if(!fromParent&&treeStore){treeStore.resumeEvent('remove');me.callTreeStore('onNodeRemove',[childNodes,!1,removeRange]);treeStore.endUpdate()}
me.firstChild=me.lastChild=null;childNodes.length=0;if(!fromParent){me.triggerUIUpdate()}
return me},getChildAt:function(index){return this.childNodes[index]},replaceChild:function(newChild,oldChild,suppressEvents){var s=oldChild?oldChild.nextSibling:null;this.removeChild(oldChild,!1,suppressEvents);this.insertBefore(newChild,s,suppressEvents);return oldChild},indexOf:function(child){return Ext.Array.indexOf(this.childNodes,child)},indexOfId:function(id){var childNodes=this.childNodes,len=childNodes.length,i=0;for(;i<len;++i){if(childNodes[i].getId()===id){return i}}
return-1},getPath:function(field,separator){field=field||this.idProperty;separator=separator||'/';var path=[this.get(field)],parent=this.parentNode;while(parent){path.unshift(parent.get(field));parent=parent.parentNode}
return separator+path.join(separator)},getDepth:function(){return this.get('depth')},bubble:function(fn,scope,args){var p=this;while(p){if(fn.apply(scope||p,args||[p])===!1){break}
p=p.parentNode}},cascade:function(spec,scope,args,after){var me=this,before=spec,childNodes,length,i;if(arguments.length===1&&!Ext.isFunction(spec)){after=spec.after;scope=spec.scope;args=spec.args;before=spec.before}
if(!before||before.apply(scope||me,args||[me])!==!1){childNodes=me.childNodes;for(i=0,length=childNodes.length;i<length;i++){childNodes[i].cascade.call(childNodes[i],before,scope,args,after)}
if(after){after.apply(scope||me,args||[me])}}},cascadeBy:function(){return this.cascade.apply(this,arguments)},eachChild:function(fn,scope,args){var childNodes=this.childNodes,length=childNodes.length,i;for(i=0;i<length;i++){if(fn.apply(scope||this,args||[childNodes[i]])===!1){break}}},findChild:function(attribute,value,deep){return this.findChildBy(function(){return this.get(attribute)==value},null,deep)},findChildBy:function(fn,scope,deep){var cs=this.childNodes,i,len,n,res;for(i=0,len=cs.length;i<len;i++){n=cs[i];if(fn.call(scope||n,n)===!0){return n}else if(deep){res=n.findChildBy(fn,scope,deep);if(res!==null){return res}}}
return null},contains:function(node){return node.isAncestor(this)},isAncestor:function(node){var p=this.parentNode;while(p){if(p===node){return!0}
p=p.parentNode}
return!1},sort:function(sortFn,recursive,suppressEvent){var me=this,childNodes=me.childNodes,ln=childNodes.length,info={isFirst:!0},i,n;if(ln>0){if(!sortFn){sortFn=me.getTreeStore().getSortFn()}
Ext.Array.sort(childNodes,sortFn);me.setFirstChild(childNodes[0]);me.setLastChild(childNodes[ln-1]);for(i=0;i<ln;i++){n=childNodes[i];n.previousSibling=childNodes[i-1];n.nextSibling=childNodes[i+1];info.isLast=(i===ln-1);info.index=i;n.updateInfo(!1,info);info.isFirst=!1;if(recursive&&!n.isLeaf()){n.sort(sortFn,!0,!0)}}
if(suppressEvent!==!0){me.fireBubbledEvent('sort',[me,childNodes]);me.callTreeStore('onNodeSort',[childNodes])}}},isExpanded:function(){return this.get('expanded')},isLoaded:function(){return this.get('loaded')},isBranchLoaded:function(){var isBranchLoaded=!this.isLeaf()&&this.isLoaded();if(isBranchLoaded){this.cascade(function(node){if(!node.isLeaf()){isBranchLoaded=isBranchLoaded||node.isBranchLoaded()}
return isBranchLoaded})}
return isBranchLoaded},isLoading:function(){return this.get('loading')},isRoot:function(){return!this.parentNode},isVisible:function(){var parent=this.parentNode;while(parent){if(!parent.isExpanded()){return!1}
parent=parent.parentNode}
return!0},expand:function(recursive,callback,scope){var me=this,treeStore,resumeAddEvent;if(!me.isLeaf()){if(me.isLoading()){me.on('expand',function(){me.expand(recursive,callback,scope)},me,{single:!0})}else{if(!me.isExpanded()){if(me.fireBubbledEvent('beforeexpand',[me])!==!1){if(recursive){if(me.parentNode&&me.parentNode.isSynchronousRecursiveExpand){me.isSynchronousRecursiveExpand=!0}else{treeStore=me.getTreeStore();if(treeStore.getProxy().isSynchronous||me.isBranchLoaded()){me.isSynchronousRecursiveExpand=!0;treeStore.suspendEvent('add','datachanged');resumeAddEvent=!0}}}
me.callTreeStore('onBeforeNodeExpand',[me.onChildNodesAvailable,me,[recursive,callback,scope]]);if(resumeAddEvent){treeStore.resumeEvent('add','datachanged');treeStore.fireEvent('datachanged',treeStore);treeStore.fireEvent('refresh',treeStore)}
me.isSynchronousRecursiveExpand=!1}}else if(recursive){me.expandChildren(!0,callback,scope)}else{Ext.callback(callback,scope||me,[me.childNodes])}}}else{Ext.callback(callback,scope||me)}},onChildNodesAvailable:function(records,recursive,callback,scope){var me=this,treeStore=me.getTreeStore(),bulkUpdate=treeStore&&treeStore.bulkUpdate,ancestor,collapsedAncestors,i;Ext.suspendLayouts();for(ancestor=me.parentNode;ancestor;ancestor=ancestor.parentNode){if(!ancestor.isExpanded()){(collapsedAncestors||(collapsedAncestors=[])).unshift(ancestor)}}
if(bulkUpdate||!treeStore.isVisible(me)){me.data.expanded=!0}else{me.set('expanded',!0)}
if(collapsedAncestors){for(i=1;i<collapsedAncestors.length;i++){ancestor=collapsedAncestors[i];if(bulkUpdate||!treeStore.isVisible(ancestor)){ancestor.data.expanded=!0}else{ancestor.set('expanded',!0)}}
collapsedAncestors[0].expand();for(i=1;i<collapsedAncestors.length;i++){ancestor=collapsedAncestors[i];ancestor.fireBubbledEvent('expand',[ancestor,ancestor.childNodes])}}else{me.callTreeStore('onNodeExpand',[records,!1])}
me.fireBubbledEvent('expand',[me,records]);if(recursive){me.expandChildren(!0,callback,scope)}else{Ext.callback(callback,scope||me,[me.childNodes])}
Ext.resumeLayouts(!0)},expandChildren:function(recursive,callback,scope,singleExpand){var me=this,origCallback,i,allNodes,expandNodes,ln,node,treeStore;if(Ext.isBoolean(callback)){origCallback=callback;callback=scope;scope=singleExpand;singleExpand=origCallback}
if(singleExpand===undefined){treeStore=me.getTreeStore();singleExpand=treeStore&&treeStore.singleExpand}
allNodes=me.childNodes;expandNodes=[];ln=singleExpand?Math.min(allNodes.length,1):allNodes.length;for(i=0;i<ln;++i){node=allNodes[i];if(!node.isLeaf()){expandNodes[expandNodes.length]=node}}
ln=expandNodes.length;for(i=0;i<ln;++i){expandNodes[i].expand(recursive)}
if(callback){Ext.callback(callback,scope||me,[me.childNodes])}},collapse:function(recursive,callback,scope){var me=this,expanded=me.isExpanded(),treeStore=me.getTreeStore(),bulkUpdate=treeStore&&treeStore.bulkUpdate,len=me.childNodes.length,i,collapseChildren;if(!me.isLeaf()&&((!expanded&&recursive)||me.fireBubbledEvent('beforecollapse',[me])!==!1)){Ext.suspendLayouts();if(me.isExpanded()){if(recursive){collapseChildren=function(){for(i=0;i<len;i++){me.childNodes[i].setCollapsed(!0)}};if(callback){callback=Ext.Function.createSequence(collapseChildren,Ext.Function.bind(callback,scope,[me.childNodes]))}else{callback=collapseChildren}}else if(callback){callback=Ext.Function.bind(callback,scope,[me.childNodes])}
if(bulkUpdate||!treeStore.contains(me)){me.data.expanded=!1}else{me.set('expanded',!1)}
me.callTreeStore('onNodeCollapse',[me.childNodes,callback,scope]);me.fireBubbledEvent('collapse',[me,me.childNodes]);callback=null}else if(recursive){for(i=0;i<len;i++){me.childNodes[i].setCollapsed(!0)}}
Ext.resumeLayouts(!0)}
Ext.callback(callback,scope||me,[me.childNodes])},setCollapsed:function(recursive){var me=this,len=me.childNodes.length,i;if(!me.isLeaf()&&me.fireBubbledEvent('beforecollapse',[me])!==!1){me.data.expanded=!1;me.fireBubbledEvent('collapse',[me,me.childNodes]);if(recursive){for(i=0;i<len;i++){me.childNodes[i].setCollapsed(!0)}}}},collapseChildren:function(recursive,callback,scope){var me=this,allNodes=me.childNodes,ln=allNodes.length,collapseNodes=[],node,i;for(i=0;i<ln;++i){node=allNodes[i];if(!node.isLeaf()&&node.isLoaded()&&node.isExpanded()){collapseNodes.push(node)}}
ln=collapseNodes.length;if(ln){for(i=0;i<ln;++i){node=collapseNodes[i];if(i===ln-1){node.collapse(recursive,callback,scope)}else{node.collapse(recursive)}}}else{Ext.callback(callback,scope)}},fireEvent:function(eventName){return this.fireBubbledEvent(eventName,Ext.Array.slice(arguments,1))},fireBubbledEvent:function(eventName,args){var result,eventSource,topNode;if(bubbledEvents[eventName]){for(eventSource=this;result!==!1&&eventSource;eventSource=(topNode=eventSource).parentNode){result=eventSource.fireEventArgs.call(eventSource,eventName,args)}
if(result!==!1){eventSource=topNode.getTreeStore();if(eventSource&&eventSource.hasListeners&&eventSource.hasListeners[eventName='node'+eventName]){result=eventSource.fireEventArgs(eventName,args)}}
return result}else{return this.fireEventArgs.apply(this,arguments)}},serialize:function(writerParam){var writer=writerParam||new Ext.data.writer.Json({writeAllFields:!0}),result=writer.getRecordData(this),childNodes=this.childNodes,len=childNodes.length,children,i;if(len>0){result.children=children=[];for(i=0;i<len;i++){children.push(childNodes[i].serialize(writer))}}
return result},callTreeStore:function(funcName,args){var me=this,target=me.getTreeStore(),fn=target&&target[funcName];if(target&&fn){args=args||[];if(args[0]!==me){args.unshift(me)}
fn.apply(target,args)}},addCls:function(cls){this.replaceCls(null,cls)},removeCls:function(cls){this.replaceCls(cls)},replaceCls:function(oldCls,newCls){var pieces=this._parseCls(this.data.cls),parts=this._parseCls(oldCls);if(parts.length){pieces=Ext.Array.difference(pieces,parts)}
parts=this._parseCls(newCls);if(parts.length){pieces=Ext.Array.unique(pieces.concat(parts))}
this.set('cls',pieces.join(' '))},toggleCls:function(cls,state){var pieces,parts,len,i,p;if(state===undefined){pieces=this._parseCls(this.data.cls);parts=this._parseCls(cls);for(i=0,len=parts.length;i<len;++i){p=parts[i];if(Ext.Array.contains(pieces,p)){Ext.Array.remove(pieces,p)}else{pieces.push(p)}}
this.set('cls',pieces.join(' '))}else if(state){this.addCls(cls)}else{this.removeCls(cls)}},privates:{_noCls:[],spacesRe:/\s+/,join:function(store){if(store.isTreeStore){if(this.isRoot()){this.treeStore=this.store=store}}else{this.callParent([store])}},callJoined:function(funcName,args){this.callParent([funcName,args]);this.callTreeStore(funcName,args)},_parseCls:function(cls){if(!cls){return this._noCls}
if(typeof cls==='string'){return cls.split(this.spacesRe)}
return cls}}}}}})
;
Ext.define('Ext.mixin.Queryable',{mixinId:'queryable',isQueryable:!0,query:function(selector){selector=selector||'*';return Ext.ComponentQuery.query(selector,this.getQueryRoot())},queryBy:function(fn,scope){var out=[],items=this.getQueryRoot().getRefItems(!0),i=0,len=items.length,item;for(;i<len;++i){item=items[i];if(fn.call(scope||item,item)!==!1){out.push(item)}}
return out},queryById:function(id){return this.down(Ext.makeIdSelector(id))},child:function(selector){var children=this.getQueryRoot().getRefItems();if(selector&&selector.isComponent){return this.matchById(children,selector.getItemId())}
if(selector){children=Ext.ComponentQuery.query(selector,children)}
if(children.length){return children[0]}
return null},down:function(selector){if(selector&&selector.isComponent){return this.matchById(this.getRefItems(!0),selector.getItemId())}
selector=selector||'';return this.query(selector)[0]||null},visitPreOrder:function(selector,fn,scope,extraArgs){Ext.ComponentQuery._visit(!0,selector,this.getQueryRoot(),fn,scope,extraArgs)},visitPostOrder:function(selector,fn,scope,extraArgs){Ext.ComponentQuery._visit(!1,selector,this.getQueryRoot(),fn,scope,extraArgs)},getRefItems:function(){return[]},getQueryRoot:function(){return this},privates:{matchById:function(items,id){var len=items.length,i,item;for(i=0;i<len;++i){item=items[i];if(item.getItemId()===id){return item}}
return null}}})
;
Ext.define('Ext.data.TreeModel',{extend:'Ext.data.Model',requires:['Ext.data.NodeInterface'],mixins:['Ext.mixin.Queryable'],getRefItems:function(){return this.childNodes},getRefOwner:function(){return this.parentNode},statics:{defaultProxy:'memory'}},function(){Ext.data.NodeInterface.decorate(this)})
;
Ext.define('Ext.data.NodeStore',{extend:'Ext.data.Store',alias:'store.node',requires:['Ext.data.TreeModel','Ext.data.NodeInterface'],isNodeStore:!0,config:{node:null,recursive:!1,rootVisible:!1,folderSort:!1},implicitModel:'Ext.data.TreeModel',getTotalCount:function(){return this.getCount()},updateFolderSort:function(folderSort){var data=this.getData();data.setTrackGroups(!1);if(folderSort){data.setGrouper({groupFn:this.folderSortFn})}else{data.setGrouper(null)}},folderSortFn:function(node){return node.data.leaf?1:0},afterReject:function(record){var me=this;if(me.contains(record)){me.onUpdate(record,Ext.data.Model.REJECT,null);me.fireEvent('update',me,record,Ext.data.Model.REJECT,null)}},afterCommit:function(record,modifiedFieldNames){var me=this;if(!modifiedFieldNames){modifiedFieldNames=null}
if(me.contains(record)){me.onUpdate(record,Ext.data.Model.COMMIT,modifiedFieldNames);me.fireEvent('update',me,record,Ext.data.Model.COMMIT,modifiedFieldNames)}},onNodeAppend:function(parent,node){if(parent===this.getNode()){this.add([node].concat(this.retrieveChildNodes(node)))}},onNodeInsert:function(parent,node,refNode){var me=this;if(parent===me.getNode()){me.insert(0,[node].concat(me.retrieveChildNodes(node)))}},onNodeRemove:function(parent,node){if(parent===this.getNode()){this.remove([node].concat(this.retrieveChildNodes(node)))}},onNodeExpand:function(parent,records){if(parent===this.getNode()){this.loadRecords(records)}},applyNode:function(node){if(node){if(!node.isModel){node=new(this.getModel())(node)}
if(!node.isNode){Ext.data.NodeInterface.decorate(node)}}
return node},updateNode:function(node,oldNode){var me=this,data;if(oldNode&&!oldNode.destroyed){oldNode.un({append:'onNodeAppend',insert:'onNodeInsert',remove:'onNodeRemove',scope:me});oldNode.unjoin(me)}
if(node){node.on({scope:me,append:'onNodeAppend',insert:'onNodeInsert',remove:'onNodeRemove'});node.join(me);data=[];if(node.childNodes.length){data=data.concat(me.retrieveChildNodes(node))}
if(me.getRootVisible()){data.push(node)}else if(node.isLoaded()||node.isLoading()){node.set('expanded',!0)}
me.getData().clear();me.fireEvent('clear',me);me.suspendEvents();if(me.isInitializing){me.inlineData=data}else{me.add(data)}
me.resumeEvents();if(data.length===0){me.loaded=node.loaded=!0}
me.fireEvent('refresh',me,me.data)}},isVisible:function(node){var parent=node.parentNode;if(!this.getRecursive()&&parent!==this.getNode()){return!1}
while(parent){if(!parent.isExpanded()){return!1}
if(parent===this.getNode()){break}
parent=parent.parentNode}
return!0},privates:{retrieveChildNodes:function(root){var node=this.getNode(),recursive=this.getRecursive(),added=[],child=root;if(!root.childNodes.length||(!recursive&&root!==node)){return added}
if(!recursive){return root.childNodes}
while(child){if(child._added){delete child._added;if(child===root){break}else{child=child.nextSibling||child.parentNode}}else{if(child!==root){added.push(child)}
if(child.firstChild){child._added=!0;child=child.firstChild}else{child=child.nextSibling||child.parentNode}}}
return added}}})
;
Ext.define('Ext.data.query.Compiler',{compile:function(){var me=this,ast=me.ast,body,factory,vars;me.error=null;if(!ast){me.fn=Ext.returnTrue}else{body=['return function (item) {','\tvar rec = item.isEntity && item;','\treturn '];vars=[];me.query=me;me.assemble(body,vars,'\t',ast);body.push('}');body=vars.concat(body).join('\n');try{factory=new Function('Ext','O','F',body);me.fn=factory(Ext,me.operators,me.getFunctions());me.fn.generation=me.generation}catch(e){me.error=e;e.message='Failed to compile: '+e.message;throw e}finally{me.query=null}}},privates:{asmOps:{'>':'gt','<':'lt','==':'eq','>=':'ge','<=':'le','!=':'ne'},assemblers:{binary:function(me,body,vars,indent,node,last,childIndent){var op=me.operatorTypeMap[node.type][1],asmOp=me.asmOps[op],operands=node.on,close='',i;if(asmOp){body[last]+='O.'+asmOp+'(';op=', ';close=')'}else{op=' '+op+' '}
body[last]+='(';for(i=0;i<operands.length;++i){if(i){body.push(indent+')'+op+'(')}
body.push(childIndent);me.assemble(body,vars,childIndent,operands[i])}
body.push(indent+')'+close)},between:function(me,body,vars,indent,node,last,childIndent){var operands=node.on,i;body[last]+='O.between(';for(i=0;i<3;++i){if(i){last=body.length-1;body[last]+=', '}
me.assemble(body,vars,childIndent,operands[i])}
body.push(indent+')')},fn:function(me,body,vars,indent,node,last,childIndent){var fn=node.fn.toLowerCase(),func=me.query.getFunctions(),exprs,i;if(!func[fn]){Ext.raise('Unsupported function "'+node.fn+'"')}
func=func[fn];if(func.vargs){body[last]+='F.'+fn+'.fn(['}else{body[last]+='F.'+fn+'.fn('}
exprs=node.args;for(i=0;i<exprs.length;++i){if(i){last=body.length-1;body[last]+=', '}
body.push(childIndent);me.assemble(body,vars,childIndent,exprs[i])}
if(func.vargs){body.push(indent+'])')}else{body.push(indent+')')}},id:function(me,body,vars,indent,node,last,childIndent){var v=node.value,exprs=v.split('.');if(exprs.length===1){body[last]+='rec ? rec.interpret('+Ext.JSON.encode(v)+') : item.'+v}else{v='p'+vars.length;vars.push('var '+v+' = '+Ext.JSON.encode(exprs)+';');body[last]+='O.dots(item, '+v+')'}},'in':function(me,body,vars,indent,node,last,childIndent){var operands=node.on;body[last]+='O.in(';me.assemble(body,vars,childIndent,operands[0]);last=body.length-1;body[last]+=', ';me.assemble(body,vars,childIndent,operands[1]);body.push(indent+')')},like:function(me,body,vars,indent,node,last,childIndent){var operands=node.on,rhs;body[last]+='O.like(';me.assemble(body,vars,childIndent,operands[0]);last=body.length-1;body[last]+=', ';rhs=operands[1];if(rhs.re){rhs={type:'regexp',value:rhs.re,flags:rhs.flags}}
me.assemble(body,vars,childIndent,rhs);last=body.length-1;body[last]+=') '},list:function(me,body,vars,indent,node,last,childIndent){body[last]+='[';for(var i=0,exprs=node.value;i<exprs.length;++i){if(i){last=body.length-1;body[last]+=', '}
body.push(childIndent);me.assemble(body,vars,childIndent,exprs[i])}
body.push(indent+']')},string:'regexp',regexp:function(me,body,vars,indent,node,last){var re='re'+vars.length;vars.push('var '+re+' = /'+(node.re||node.value)+'/'+(node.flags||'')+';');body[last]+=re},unary:function(me,body,vars,indent,node,last,childIndent){var op=me.operatorTypeMap[node.type][1],operands=node.on;body[last]+=op+'(';body.push(childIndent);me.assemble(body,vars,childIndent,operands);body.push(indent+')')}},operators:{between:function(val,lo,hi){return lo<=val&&val<=hi},dots:function(item,names){var i,ret;if(item.isEntity){for(ret=item,i=0;i<names.length;++i){if(!ret||!ret.interpret){ret=undefined;break}
ret=ret.interpret(names[i])}}else{for(ret=item,i=0;i<names.length;++i){if(!ret){ret=undefined;break}
ret=ret[names[i]]}}
return ret},'in':function(val,values){return Ext.Array.contains(values,val)},like:function(val,pat){val=String(val);if(typeof pat==='string'){return!!val&&val.toLowerCase().indexOf(pat.toLowerCase())>-1}
return pat.test(val)},eq:function(lhs,rhs){if(lhs&&rhs&&(lhs instanceof Date||rhs instanceof Date)){return!Ext.Date.compare(lhs,rhs)}
return lhs==rhs},ge:function(lhs,rhs){if(lhs&&rhs&&(lhs instanceof Date||rhs instanceof Date)){return Ext.Date.compare(lhs,rhs)>=0}
return lhs>=rhs},gt:function(lhs,rhs){if(lhs&&rhs&&(lhs instanceof Date||rhs instanceof Date)){return Ext.Date.compare(lhs,rhs)>0}
return lhs>rhs},le:function(lhs,rhs){if(lhs&&rhs&&(lhs instanceof Date||rhs instanceof Date)){return Ext.Date.compare(lhs,rhs)<=0}
return lhs<=rhs},lt:function(lhs,rhs){if(lhs&&rhs&&(lhs instanceof Date||rhs instanceof Date)){return Ext.Date.compare(lhs,rhs)<0}
return lhs<rhs},ne:function(lhs,rhs){if(lhs&&rhs&&(lhs instanceof Date||rhs instanceof Date)){return!!Ext.Date.compare(lhs,rhs)}
return lhs!=rhs}},assemble:function(body,vars,indent,node){var me=this,assemblers=me.assemblers,t=typeof node,last=body.length-1,childIndent=indent+'\t',type=node.type,arity,asm;if(t==='boolean'||t==='number'){body[last]+=node}else if(t==='string'){body[last]+=Ext.JSON.encode(node)}else{arity=me.operatorTypeMap[type];asm=assemblers[type]||(arity&&assemblers[arity[0]]);if(typeof asm==='string'){asm=assemblers[asm]}
asm(me,body,vars,indent,node,body.length-1,childIndent)}}}})
;
Ext.define('Ext.data.query.Converter',{getFilters:function(){var me=this,ast=me.ast,exprToFilter=me.exprToFilter,operatorTypeMap=me.operatorTypeMap,fn=me.fn,on=ast&&ast.on,expr,filter,filters,i,ident,n,op,ret,value,xlat;if(ast){if(fn.hasOwnProperty('$filters')){ret=fn.$filters}else{if(ast.type==='and'&&on){filters=[];for(i=0,n=on.length;i<n;++i){expr=on[i];ident=expr.on;if(!ident||ident.length!==2){break}
value=ident[1];ident=ident[0];if(ident.type!=='id'){break}
if(!(xlat=exprToFilter[expr.type])){op=operatorTypeMap[expr.type];if(!op||!(xlat=exprToFilter[op[0]])){break}}
if(!(filter=xlat(expr,ident.value,value,op))){break}
filters.push(filter)}
if(i===n){ret=filters}}
fn.$filters=ret}}else{ret=null}
return ret},setFilters:function(filters){var me=this,ast=null,n=filters&&filters.length,expr,filter,i,op,xlat;if(n){ast={type:'and',on:[]};for(i=0;i<n;++i){filter=filters[i];if(!(xlat=me.filterToExpr[op=filter.operator])){expr={type:me.getOperatorType(op),on:[{type:'id',value:filter.property},filter.value]}}else{expr=xlat(filter)}
ast.on.push(expr)}}
me.ast=ast;me.refresh()},privates:{exprToFilter:{binary:function(expr,ident,value,info){return Ext.isPrimitive(value)&&{property:ident,operator:info[1],value:value}},'in':function(expr,ident,value){var i=0,list=value.value;if(value.type==='list'&&Ext.isArray(list)){for(i=list.length;i-->0;){if(!Ext.isPrimitive(list[i])){break}}}
return(i<0)&&{property:ident,operator:'in',value:list}},like:function(expr,ident,value){if(value.type==='regexp'){return{property:ident,operator:'/=',value:value.value}}
return(value.type==='string')&&{property:ident,operator:'like',value:value.value}}},filterToExpr:{'/=':function(filter){return{type:'like',on:[{type:'id',value:filter.property},{type:'regexp',value:filter.value}]}},'in':function(filter){return{type:'in',on:[{type:'id',value:filter.property},{type:'list',value:filter.value}]}},like:function(filter){return{type:'like',on:[{type:'id',value:filter.property},{type:'string',value:filter.value,re:filter.value,flags:'i'}]}}}}})
;
Ext.define('Ext.data.query.Stringifier',{stringify:function(node){var me=this,t=typeof node,type=node.type,operatorTypeMap=me.operatorTypeMap,priority=me.getPriority(node),stringifiers=me.stringifiers,op,stringifier;if(t==='boolean'||t==='number'){return String(node)}
if(t==='string'){return Ext.JSON.encode(node)}
stringifier=stringifiers[type];if(!stringifier&&type in operatorTypeMap){op=operatorTypeMap[type];stringifier=stringifiers[op[0]];op=op[2]||op[1]}
if(typeof stringifier==='string'){stringifier=stringifiers[stringifier]}
return stringifier(me,node,priority,op)},privates:{getPriority:function(node){var symbols=this.symbols,operatorTypeMap=this.operatorTypeMap,type=node.type,ret=1e9,op;if(type==='between'){ret=0;ret=symbols[type].priority}else if(type==='and'||type==='or'||type==='in'||type==='like'){ret=symbols[type].priority}else if(type in operatorTypeMap){op=operatorTypeMap[type];ret=symbols[op[1]].priority}
return ret},stringifiers:{and:'or',or:function(me,node,priority){var op=(node.type==='or')?' or ':' and ',s='',on=node.on,i,lhs,parenL;for(i=0;i<on.length;++i){if(s){s+=op}
lhs=on[i];parenL=me.getPriority(lhs)<priority;lhs=me.stringify(lhs);if(parenL){lhs='('+lhs+')'}
s+=lhs}
return s},between:function(me,node,priority){var on=node.on,lhs=on[0],parenL=me.getPriority(lhs)<priority,i,parenR,rhs,s;lhs=me.stringify(lhs);if(parenL){lhs='('+lhs+')'}
s=lhs+' between ';priority=me.symbols.and.priority;for(i=0;i<2;++i){if(i){s+=' and '}
rhs=on[i+1];parenR=i?(rhs.type!=='id'&&!Ext.isPrimitive(rhs)):(me.getPriority(rhs)<priority);rhs=me.stringify(rhs);if(parenR){rhs='('+rhs+')'}
s+=rhs}
return s},binary:function(me,node,priority,op){var on=node.on,lhs=on[0],rhs=on[1],parenL=me.getPriority(lhs)<priority,parenR=me.getPriority(rhs)<priority;lhs=me.stringify(lhs);rhs=me.stringify(rhs);if(parenL){lhs='('+lhs+')'}
if(parenR){rhs='('+rhs+')'}
return lhs+' '+op+' '+rhs},fn:function(me,node){return node.fn+'('+me.stringifyArray(node.args)+')'},id:function(me,node){return node.value},list:function(me,node){return'('+me.stringifyArray(node.value)+')'},regexp:function(me,node){return'/'+node.value+'/'+(node.flags||'')},string:function(me,node){return Ext.JSON.encode(node.value)},unary:function(me,node,priority,op){var on=node.on,rhs=me.stringify(on),t=on.type;if(t!=='fn'&&t!=='id'&&t!=='unary'){rhs='('+rhs+')'}
return op+rhs}},stringifyArray:function(array){var s='',i,expr;for(i=0;i<array.length;++i){if(s){s+=', '}
expr=array[i];expr=this.stringify(expr);s+=expr}
return s}}})
;
Ext.define('Ext.data.query.Parser',function(QueryParser){var LIST={list:!0,literal:!0,type:'list'};return{extend:'Ext.parse.Parser',tokenizer:{keywords:{and:{type:'operator',name:'and',value:'&&',is:{operator:!0}},or:{type:'operator',name:'or',value:'||',is:{operator:!0}},not:{type:'operator',name:'not',value:'!',is:{operator:!0}},between:{type:'operator',name:'between',value:'between',is:{operator:!0}},like:{type:'operator',name:'like',value:'like',is:{operator:!0}},'in':{type:'operator',name:'in',value:'in',is:{operator:!0}}},operators:{'=':'eq','==':'seq','===':'seq','!==':'sne','!=':'neq','<>':'neq','<':'lt','<=':'lte','>':'gt','>=':'gte','&&':'and','||':'or',',':'comma'},patterns:{regex:{type:'literal',is:{literal:!0,regexp:!0,type:'regexp'},re:/\/(?!\/)((?:\[.+?]|\\.|[^/\\\r\n])+)\/([gimyu]{0,5})/g,extract:function(match){var body=match[1],flags=match[2];return flags?[body,flags]:body}}}},infix:{'=':40,'<>':40,like:40,between:{priority:70,led:function(left){var me=this,parser=me.parser;me.arity='between';me.operand=left;me.low=parser.parseExpression(parser.symbols.and.priority);parser.advance('&&');me.high=parser.parseExpression(80);return me}},'in':{priority:40,led:function(left){var me=this,parser=me.parser;parser.advance('(');me.arity='binary';me.lhs=left;me.rhs={arity:'literal',value:parser.parseList(),is:LIST};parser.advance(')');return me}}},infixRight:{'and':30,'or':30},prefix:{not:0},parse:function(){var expr=this.parseExpression();return this.convert(expr)},privates:{opCodes:{binary:{'=':'eq','>':'gt','<':'lt','>=':'ge','<=':'le','!=':'ne','<>':'ne','+':'add','/':'div','*':'mul','-':'sub'},unary:{'-':'neg','!':'not'}},convert:function(node){var me=this,arity=node.arity,is=node.is,name=node.name,opCodes=me.opCodes,value=node.value,exprs,lhs,rhs,ret;switch(arity){case 'between':ret={type:'between',on:[me.convert(node.operand),me.convert(node.low),me.convert(node.high)]};break;case 'ident':ret={type:'id',value:value};break;case 'invoke':ret={type:'fn',fn:node.operand.value,args:me.convertArray(node.args)};break;case 'unary':ret={type:opCodes.unary[value],on:me.convert(node.operand)};break;case 'binary':if(name==='and'||name==='or'){lhs=me.convert(node.lhs);rhs=me.convert(node.rhs);if(rhs.type===name){exprs=rhs.on;exprs.unshift(lhs)}else{exprs=[lhs,rhs]}
ret={type:name,on:exprs}}else{if(value==='or'){value='||'}
ret={type:opCodes.binary[value]||name,on:[me.convert(node.lhs),me.convert(node.rhs)]};if(name==='like'){ret.on[1]=me.likeToRe(ret.on[1],node.rhs.at)}}
break;case 'literal':if(is.string||is.number||is.boolean){ret=value}else{ret={type:is.type,value:value};if(is.list){ret.value=me.convertArray(value)}else if(is.regexp&&typeof value!=='string'){ret.value=value[0];ret.flags=value[1]}}
break}
if(ret&&typeof ret==='object'&&!ret.type){ret.type=arity}
return ret},convertArray:function(array){var ret=[],i=array.length;for(;i-->0;){ret[i]=this.convert(array[i])}
return ret},likeToRe:function(node,at){if(typeof node==='string'){node={type:'string',value:node}}else if(node.type==='regexp'){return node}
var specialChars=this.specialChars||(QueryParser.prototype.specialChars=Ext.Array.toMap('.+*?^$=!|:-<>[](){}\\'.split(''))),like=node.value,n=like.length,re='',simple=!0,escape,c,i,start;outer:for(i=0;i<n;++i){c=like[i];if(!escape){if(c==='\\'){escape=c;continue}
if(c==='*'||c==='%'){re+='.*';simple=!1;continue}
if(c==='?'||c==='_'){re+='.';simple=!1;continue}
if(c==='['){re+=c;simple=!1;start=i;while(++i<n){c=like[i];if(escape){re+=escape+c;escape=0}else if(c==='\\'){escape=c}else{re+=c;if(c===']'){continue outer}}}
this.syntaxError(start+(node.at||at||0),'Incomplete character set')}}
escape=0;if(specialChars[c]){re+='\\'}
re+=c}
node.re=re||'.*';if(simple){node.flags='i'}else{node.re='^'+re+'$'}
return node},parseList:function(){var me=this,list=[];do{if(list.length){me.advance()}
list.push(me.parseExpression())}
while(me.token.id===',');return list}}}})
;
Ext.define('Ext.data.Query',{extend:'Ext.util.BasicFilter',mixins:['Ext.mixin.Factoryable','Ext.data.query.Compiler','Ext.data.query.Converter','Ext.data.query.Stringifier'],alias:'query.default',requires:['Ext.data.query.Parser'],config:{format:'ast',functions:{cached:!0,$value:{abs:function(arg){return Math.abs(arg)},'avg...':function(args){var count=0,sum=0,i=args.length,v;for(;i-->0;){v=args[i];if(v!=null){sum+=v;++count}}
return count?sum/count:0},date:function(arg){return(arg instanceof Date)?arg:Ext.Date.parse(arg)},lower:function(arg){return(arg==null)?'':String(arg).toLowerCase()},'max...':function(args){var ret=null,i=args.length,v;for(;i-->0;){v=args[i];if(v!=null){ret=(ret===null)?v:(ret<v?v:ret)}}
return ret},'min...':function(args){var ret=null,i=args.length,v;for(;i-->0;){v=args[i];if(v!=null){ret=(ret===null)?v:(ret<v?ret:v)}}
return ret},'sum...':function(args){var ret=null,i=args.length,v;for(;i-->0;){v=args[i];if(v!=null){ret=(ret===null)?v:(ret+v)}}
return ret===null?0:ret},upper:function(arg){return(arg==null)?'':String(arg).toUpperCase()}}},source:''},ast:null,error:null,generation:0,constructor:function(config){if(typeof config==='string'){config={source:config}}
var parser=Ext.data.query.Parser.fly();this.symbols=parser.symbols;parser.release();this.callParent([config])},filter:function(item){var me=this,error=me.error;if(error){throw error}
return!!me.fn(item)},refresh:function(){++this.generation;this.compile()},serialize:function(){var me=this,format=me.getFormat(),serializer=me.getSerializer(),ret,serialized;switch(format){case 'ast':ret=me.ast;if(serializer){ret=Ext.clone(ret)}
break;case 'filters':ret=me.getFilters()||null;break;case 'query':ret=me.toString();break}
if(ret&&serializer){serialized=serializer.call(this,ret);if(serialized){ret=serialized}}
return ret},serializeTo:function(out){var filters=this.serialize(),ret;if(filters&&filters.length){out.push.apply(out,filters);ret=!0}
return ret},sync:function(){var me=this,fn=me.fn;if(!fn||fn.generation!==me.generation){me.compile()}},toString:function(){var ast=this.ast;return ast?this.stringify(ast):''},validFormatsRe:/^(ast|filters|query)$/,applyFormat:function(format){if(!this.validFormatsRe.test(format)){Ext.raise('Invalid query format')}
return format},applyFunctions:function(funcs){var ret={},vargsRe=this.vargsRe,def,key,name;for(key in funcs){def={fn:funcs[name=key],vargs:vargsRe.test(key)};if(def.vargs){name=key.substr(0,key.length-3)}
ret[name.toLowerCase()]=def}
return ret},applySource:function(source){if(source){return source}
++this.generation;this.ast=null;this.compile()},updateSource:function(source){var me=this,parser=Ext.data.query.Parser.fly(source);++me.generation;try{me.error=me.fn=null;me.ast=parser.parse()}catch(e){me.error=e;e.message='Failed to parse: '+e.message;throw e}finally{parser.release()}
me.compile()},privates:{operatorTypeMap:{and:['binary','&&','and'],or:['binary','||','or'],eq:['binary','==','='],ge:['binary','>=',null],gt:['binary','>',null],le:['binary','<=',null],lt:['binary','<',null],ne:['binary','!=',null],add:['binary','+',null],div:['binary','/',null],mul:['binary','*',null],sub:['binary','-',null],'in':['binary',null,'in'],like:['binary',null,'like'],seq:['binary','===','=='],sne:['binary','!==',null],neg:['unary','-',null],not:['unary','!',null]},vargsRe:/\.\.\.$/,getOperatorType:function(op){var map=this.operatorTypeMap,key;for(key in map){if(map[key][1]===op||map[key][2]===op){return key}}
Ext.raise('Unrecognized filter operator: "'+op+'"');return null}}})
;
Ext.define('Ext.data.Request',{isDataRequest:!0,config:{action:undefined,params:undefined,method:'GET',url:null,operation:null,proxy:null,disableCaching:!1,headers:{},callbackKey:null,rawRequest:null,jsonData:undefined,xmlData:undefined,withCredentials:!1,username:null,password:null,binary:!1,callback:null,scope:null,timeout:30000,records:null,directFn:null,args:null,useDefaultXhrHeader:null,responseType:null},constructor:function(config){this.initConfig(config)},getParam:function(key){var params=this.getParams(),val;if(params){return params[key]}
return val},setParam:function(key,value){var params=this.getParams()||{};params[key]=value;this.setParams(params)}})
;
Ext.define('Ext.data.TreeStore',{extend:'Ext.data.Store',alias:'store.tree',requires:['Ext.util.Sorter','Ext.data.TreeModel','Ext.data.NodeInterface'],isTreeStore:!0,config:{root:null,rootVisible:!1,defaultRootProperty:'children',parentIdProperty:null,clearOnLoad:!0,clearRemovedOnLoad:!0,nodeParam:'node',defaultRootId:'root',defaultRootText:'Root',folderSort:!1,pageSize:null},filterer:'topdown',lazyFill:!1,fillCount:0,bulkUpdate:0,nodesToUnregister:0,_silentOptions:{silent:!0},implicitModel:'Ext.data.TreeModel',groupField:null,groupDir:null,grouper:null,constructor:function(config){var me=this;me.byIdMap={};me.callParent([config]);if(Ext.isDefined(me.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.data.TreeStore: nodeParameter has been deprecated. '+'Please use nodeParam instead.')}
me.nodeParam=me.nodeParameter;delete me.nodeParameter}},applyFields:function(fields,oldFields){var me=this;if(fields){if(me.defaultRootProperty!==me.self.prototype.config.defaultRootProperty){fields=fields.concat({name:me.defaultRootProperty,type:'auto',defaultValue:null,persist:!1})}}
me.callParent([fields,oldFields])},applyGroupField:function(field){return null},applyGroupDir:function(dir){return null},applyGrouper:function(grouper){if(grouper){Ext.raise('You can\'t group a TreeStore')}
return null},group:Ext.emptyFn,onSorterEndUpdate:function(){var me=this,sorterCollection=me.getSorters(),sorters=sorterCollection.getRange(),rootNode=me.getRoot(),folderSort=me.getFolderSort();me.fireEvent('beforesort',me,sorters);if(rootNode&&(folderSort||sorters.length)){if(me.getRemoteSort()){if(sorters.length){me.load({callback:function(){me.fireEvent('sort',me,sorters)}})}}else{rootNode.sort(this.getSortFn(),!0);me.fireEvent('datachanged',me);me.fireEvent('refresh',me);me.fireEvent('sort',me,sorters)}}else{me.fireEvent('sort',me,sorters)}},updateFolderSort:function(folderSort){this.needsFolderSort=folderSort;this.onSorterEndUpdate()},getSortFn:function(){return this._sortFn||(this._sortFn=this.createSortFn())},createSortFn:function(){var me=this,sortersSortFn=this.sorters.getSortFn();return function(node1,node2){var node1FolderOrder,node2FolderOrder,result=0;if(me.needsFolderSort){node1FolderOrder=node1.data.leaf?1:0;node2FolderOrder=node2.data.leaf?1:0;result=node1FolderOrder-node2FolderOrder}
if(me.needsIndexSort&&result===0){result=node1.data.index-node2.data.index}
return result||sortersSortFn(node1,node2)}},getTotalCount:function(){return this.getCount()},afterEdit:function(node,modifiedFieldNames){var me=this,parentNode=node.parentNode,rootVisible=me.getRootVisible(),isHiddenRoot=!parentNode&&!rootVisible,prevVisibleNodeIndex,isVisible=node.get('visible'),toAdd,removeStart;if(!isHiddenRoot&&isVisible!==me.contains(node)){if(isVisible){if(!parentNode||me.isVisible(node)){toAdd=[node];if(node.isExpanded()){me.handleNodeExpand(node,node.childNodes,toAdd)}
prevVisibleNodeIndex=node.previousSibling?me.indexOfPreviousVisibleNode(node.previousSibling):(parentNode?me.indexOf(parentNode):-1);me.insert(prevVisibleNodeIndex+1,toAdd)}}else{removeStart=me.indexOf(node);me.removeAt(removeStart,me.indexOfNextVisibleNode(node)-removeStart)}}else if(me.getRoot()&&me.needsLocalFilter()){me.onFilterEndUpdate(me.getFilters())}
me.callParent([node,modifiedFieldNames])},afterReject:function(record){var me=this;if(me.contains(record)){me.onUpdate(record,Ext.data.Model.REJECT,null);me.fireEvent('update',me,record,Ext.data.Model.REJECT,null)}},afterCommit:function(record,modifiedFieldNames){var me=this;if(!modifiedFieldNames){modifiedFieldNames=null}
if(me.contains(record)){me.onUpdate(record,Ext.data.Model.COMMIT,modifiedFieldNames);me.fireEvent('update',me,record,Ext.data.Model.COMMIT,modifiedFieldNames)}},updateRootVisible:function(rootVisible){var rootNode=this.getRoot(),data;if(rootNode){data=this.getData();if(rootVisible){data.insert(0,rootNode)}else{data.remove(rootNode)}}},updateTrackRemoved:function(trackRemoved){this.callParent(arguments);this.removedNodes=this.removed;this.removed=null},onDestroyRecords:function(records,operation,success){if(success){this.removedNodes.length=0}},updateProxy:function(proxy){var reader;if(proxy){if(proxy.setIdParam){proxy.setIdParam(this.getNodeParam())}
reader=proxy.getReader();if(Ext.isEmpty(reader.getRootProperty())){reader.setRootProperty(this.getDefaultRootProperty())}}},setProxy:function(proxy){this.changingProxy=!0;this.callParent([proxy]);this.changingProxy=!1},updateModel:function(model){var isNode;if(model){isNode=model.prototype.isNode;Ext.data.NodeInterface.decorate(model);if(!isNode&&!this.changingProxy){this.getProxy().getReader().buildExtractors(!0)}}},onCollectionFilter:Ext.emptyFn,onFilterEndUpdate:function(filters){var me=this,length=filters.length,root=me.getRoot(),childNodes,childNode,filteredNodes,i;if(!me.getRemoteFilter()){if(length){me.doFilter(root)}else{root.cascade({after:function(node){node.set('visible',!0,me._silentOptions)}})}
if(length){filteredNodes=[];childNodes=root.childNodes;for(i=0,length=childNodes.length;i<length;i++){childNode=childNodes[i];if(childNode.get('visible')){filteredNodes.push(childNode)}}}else{filteredNodes=root.childNodes}
me.onNodeFilter(root,filteredNodes);root.fireEvent('filterchange',root,filteredNodes);me.suppressNextFilter=!0;me.callParent([filters]);me.suppressNextFilter=!1}else{me.callParent([filters])}},onNodeFilter:function(root,childNodes){var me=this,data=me.getData(),toAdd=[];if(me.getRootVisible()&&root.get('visible')){toAdd.push(root)}
me.handleNodeExpand(root,childNodes,toAdd);me.suspendEvents();data.splice(0,data.getCount(),toAdd);me.resumeEvents();if(!me.suppressNextFilter){me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}},onBeforeNodeExpand:function(node,callback,scope,args){var me=this,storeReader,nodeProxy,nodeReader,reader,children,callbackArgs;if(node.isLoaded()){callbackArgs=[node.childNodes];if(args){callbackArgs.push.apply(callbackArgs,args)}
Ext.callback(callback,scope||node,callbackArgs)}else if(node.isLoading()){me.on('load',function(){callbackArgs=[node.childNodes];if(args){callbackArgs.push.apply(callbackArgs,args)}
Ext.callback(callback,scope||node,callbackArgs)},me,{single:!0,priority:1001})}else{storeReader=me.getProxy().getReader();nodeProxy=node.getProxy();nodeReader=nodeProxy?nodeProxy.getReader():null;reader=nodeReader&&nodeReader.initialConfig.rootProperty?nodeReader:storeReader;children=reader.getRoot(node.raw||node.data);if(children||(node.phantom&&!node.isRoot())){me.fillNode(node,reader.extractData(children||[],{model:node.childType,recordCreator:me.recordCreator}));callbackArgs=[node.childNodes];if(args){callbackArgs.push.apply(callbackArgs,args)}
Ext.callback(callback,scope||node,callbackArgs)}else{me.read({node:node,onChildNodesAvailable:function(){delete me.lastOptions.onChildNodesAvailable;callbackArgs=[node.childNodes];if(args){callbackArgs.push.apply(callbackArgs,args)}
Ext.callback(callback,scope||node,callbackArgs)}});me.flushLoad()}}},onNodeExpand:function(parent,records){var me=this,insertIndex=me.indexOf(parent)+1,toAdd=[];me.handleNodeExpand(parent,records,toAdd);if(!me.refreshCounter&&parent.isRoot()&&!parent.get('visible')){me.loadRecords(toAdd)}else{++me.loadCount;me.insert(insertIndex,toAdd)}},handleNodeExpand:function(parent,records,toAdd){var me=this,ln=records?records.length:0,i,record;if(parent!==this.getRoot()&&!me.isVisible(parent)){return}
if(ln){for(i=0;i<ln;i++){record=records[i];if(record.get('visible')){toAdd.push(record);if(record.isExpanded()){if(record.isLoaded()){me.handleNodeExpand(record,record.childNodes,toAdd)}else{record.set('expanded',!1,{silent:!0});record.expand()}}}}}},onNodeCollapse:function(parent,records,callback,scope){var me=this,collapseIndex=me.indexOf(parent)+1,lastNodeIndexPlus;if(me.needsLocalFilter()){records=Ext.Array.filter(records,me.filterVisible)}
if(records.length&&me.isVisible(parent)){lastNodeIndexPlus=me.indexOfNextVisibleNode(parent);me.removeAt(collapseIndex,lastNodeIndexPlus-collapseIndex)}
Ext.callback(callback,scope)},indexOfNextVisibleNode:function(node){var result;while(node.parentNode){for(result=node.nextSibling;result&&!result.get('visible');result=result.nextSibling){}
if(result){return this.indexOf(result)}
node=node.parentNode}
return this.getCount()},indexOfPreviousVisibleNode:function(node){var result;for(result=node;result&&!result.get('visible');result=result.previousSibling){}
if(result){if(result.isExpanded()&&result.lastChild){return this.indexOfPreviousVisibleNode(result.lastChild)}}else{result=node.parentNode}
return this.indexOf(result)},filterNew:function(item){return!item.get('root')&&this.callParent([item])},filterRejects:function(item){return!item.get('root')&&this.callParent([item])},getNewRecords:function(){return Ext.Array.filter(Ext.Object.getValues(this.byIdMap),this.filterNew,this)},getRejectRecords:function(){return Ext.Array.filter(Ext.Object.getValues(this.byIdMap),this.filterRejects,this)},getUpdatedRecords:function(){return Ext.Array.filter(Ext.Object.getValues(this.byIdMap),this.filterUpdated)},beforeNodeRemove:function(parentNode,childNodes,isMove,removeRange){if(!Ext.isArray(childNodes)){childNodes=[childNodes]}
var me=this,len=childNodes.length,removed=me.removedNodes,startNode,i;for(i=0;!startNode&&i<len;i++){if(childNodes[i].get('visible')){startNode=childNodes[i]}}
if(startNode){removeRange[0]=me.indexOf(childNodes[0]);removeRange[1]=me.indexOfNextVisibleNode(childNodes[childNodes.length-1])-removeRange[0]}else{removeRange[0]=-1;removeRange[1]=0}
for(i=0;i<len;i++){childNodes[i].cascade(function(node){me.unregisterNode(node,!0);if(removed&&!isMove){if(!node.phantom&&!node.erasing&&!me.loading){node.removedFrom=me.indexOf(node);removed.push(node);me.needsSync=!0}}})}},afterDrop:Ext.emptyFn,onNodeRemove:function(parentNode,childNodes,isMove,removeRange){var me=this;me.suspendAutoSync();if(removeRange[0]!==-1){me.removeIsMove=isMove;me.removeAt.apply(me,removeRange);me.removeIsMove=!1}
me.resumeAutoSync()},onNodeAppend:function(parent,node,index){this.onNodeInsert(parent,node,index)},onNodeInsert:function(parent,node,index){var me=this,data=node.raw||node.data,removed=me.removedNodes,storeReader,nodeProxy,nodeReader,reader,dataRoot,storeInsertionPoint;if(parent&&me.needsLocalFilter()){me.doFilter(parent)}
me.beginUpdate();if(me.isVisible(node)){if(index===0||!node.previousSibling){storeInsertionPoint=me.indexOf(parent)}else{storeInsertionPoint=me.indexOfPreviousVisibleNode(node.previousSibling)}
me.insert(storeInsertionPoint+1,node);if(!node.isLeaf()&&node.isExpanded()){if(node.isLoaded()){me.onNodeExpand(node,node.childNodes)}else if(!me.fillCount){node.set('expanded',!1);node.expand()}}}
Ext.Array.remove(removed,node);me.needsSync=me.needsSync||node.phantom||node.dirty;if(!node.isLeaf()&&!node.isLoaded()&&!me.lazyFill){storeReader=me.getProxy().getReader();nodeProxy=node.getProxy();nodeReader=nodeProxy?nodeProxy.getReader():null;reader=nodeReader&&nodeReader.initialConfig.rootProperty?nodeReader:storeReader;dataRoot=reader.getRoot(data);if(dataRoot){me.fillNode(node,reader.extractData(dataRoot,{model:node.childType,recordCreator:me.recordCreator}))}}
me.endUpdate()},registerNode:function(node,includeChildren){var me=this,was=me.byIdMap[node.id],children,length,i;me.byIdMap[node.id]=node;if(node.onRegisterTreeNode&&node!==was){node.onRegisterTreeNode(me)}
if(node.onUnregisterTreeNode){me.nodesToUnregister++}
if(includeChildren===!0){children=node.childNodes;length=children.length;for(i=0;i<length;i++){me.registerNode(children[i],!0)}}},unregisterNode:function(node,includeChildren){var me=this,was=me.byIdMap[node.id],children,length,i;delete me.byIdMap[node.id];if(includeChildren===!0){children=node.childNodes;length=children.length;for(i=0;i<length;i++){me.unregisterNode(children[i],!0)}}
if(node.onUnregisterTreeNode&&node===was){node.onUnregisterTreeNode(me);me.nodesToUnregister--}},onNodeSort:function(node,childNodes){var me=this;me.suspendAutoSync();if((me.indexOf(node)!==-1&&node.isExpanded())||(node===me.getRoot()&&!me.getRootVisible())){Ext.suspendLayouts();me.onNodeCollapse(node,childNodes);me.onNodeExpand(node,childNodes);Ext.resumeLayouts(!0)}
me.resumeAutoSync(me.autoSync)},applyRoot:function(newRoot){var me=this,Model=me.getModel(),idProperty=Model.prototype.idProperty,defaultRootId=me.getDefaultRootId();if(newRoot&&!newRoot.isNode){newRoot=Ext.apply({text:me.getDefaultRootText(),root:!0,isFirst:!0,isLast:!0,depth:0,index:0,parentId:null,allowDrag:!1},newRoot);if(defaultRootId&&newRoot[idProperty]===undefined){newRoot[idProperty]=defaultRootId}
newRoot=new Model(newRoot)}
return newRoot},updateRoot:function(newRoot,oldRoot){var me=this,removeRange=[],initial=me.isConfiguring,oldOwner,toRemove;me.getTrackRemoved();me.suspendEvent('add','remove');if(initial){me.suspendEvent('refresh','datachanged')}
if(oldRoot&&oldRoot.isModel){if(me.getRootVisible()){toRemove=[oldRoot]}else{toRemove=oldRoot.childNodes}
me.beforeNodeRemove(null,toRemove,!1,removeRange);oldRoot.set('root',!1);me.onNodeRemove(null,toRemove,!1,removeRange);oldRoot.fireEvent('remove',null,oldRoot,!1);oldRoot.fireEvent('rootchange',null);oldRoot.clearListeners();oldRoot.store=oldRoot.treeStore=null;me.unregisterNode(oldRoot)}
me.getData().clear();if(newRoot){if(newRoot.fireEventArgs('beforeappend',[null,newRoot])===!1){newRoot=null}else{oldOwner=newRoot.parentNode;if(oldOwner){if(!oldOwner.removeChild(newRoot,!1,!1,oldOwner.getTreeStore()===me)){return}}else if((oldOwner=newRoot.getTreeStore())&&oldOwner!==me&&newRoot===oldOwner.getRoot()){oldOwner.setRoot(null)}
newRoot.store=newRoot.treeStore=me;newRoot.set('root',!0);newRoot.updateInfo(!0,{isFirst:!0,isLast:!0,depth:0,index:0,parentId:null});me.registerNode(newRoot,!0);newRoot.fireEvent('append',null,newRoot,!1);newRoot.fireEvent('rootchange',newRoot);me.onNodeAppend(null,newRoot,0);newRoot.phantom=!0}}
if(!initial){me.fireEvent('rootchange',newRoot,oldRoot)}
if(newRoot&&(me.getAutoLoad()||newRoot.isExpanded())){if(newRoot.isLoaded()){me.onNodeExpand(newRoot,newRoot.childNodes);if(!initial){me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}}else{newRoot.data.expanded=!1;newRoot.expand(!1);if(newRoot.isLoaded&&!me.getProxy().isSynchronous&&!initial){me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}}}else if(!initial){me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}
me.resumeEvent('add','remove');if(initial){me.resumeEvent('refresh','datachanged')}},doDestroy:function(){var me=this,root=me.getRoot();if(root&&me.nodesToUnregister){root.cascade(function(node){if(node.onUnregisterTreeNode){node.onUnregisterTreeNode(me)}})}
me.callParent()},each:function(fn,scope,includeOptions){var i=0,filtered=includeOptions,includeCollapsed;if(includeOptions&&typeof includeOptions==='object'){includeCollapsed=includeOptions.collapsed;filtered=includeOptions.filtered}
if(includeCollapsed){this.getRoot().cascade(function(node){if(filtered===!0||node.get('visible')){return fn.call(scope||node,node,i++)}})}else{return this.callParent([fn,scope,filtered])}},collect:function(dataIndex,options,filtered){var includeCollapsed,map={},result=[],allowNull=options,strValue,value;if(options&&typeof options==='object'){includeCollapsed=options.collapsed;filtered=options.filtered;allowNull=options.allowNull}
if(includeCollapsed||filtered){this.getRoot().cascade(function(node){if(filtered===!0||node.get('visible')){value=node.get(dataIndex);strValue=String(value);if((allowNull||!Ext.isEmpty(value))&&!map[strValue]){map[strValue]=1;result.push(value)}}
if(!includeCollapsed&&!node.isExpanded()){return!1}})}else{result=this.callParent([dataIndex,allowNull,filtered])}
return result},getNodeById:function(id){return this.byIdMap[id]||null},findNode:function(fieldName,value,startsWith,endsWith,ignoreCase){var result=null,regex;if(Ext.isEmpty(value,!1)){return result}
if(fieldName===this.model.idProperty&&arguments.length<3){return this.byIdMap[value]}
regex=Ext.String.createRegex(value,startsWith,endsWith,ignoreCase);Ext.Object.eachValue(this.byIdMap,function(node){if(node&&regex.test(node.get(fieldName))){result=node;return!1}});return result},load:function(options){var node=options&&options.node;if(!node&&!(node=this.getRoot())){node=this.setRoot({expanded:!0,autoRoot:!0});return}
if(node.isLoading()){return}
return this.callParent([options])},reload:function(options){var o=Ext.apply({},options,this.lastOptions);o.node=this.getRoot();return this.load(o)},flushLoad:function(){var me=this,options=me.pendingLoadOptions,clearOnLoad=me.getClearOnLoad(),node,callback,scope,isRootLoad,operation,doClear;me.clearLoadTask();if(!options){return}
node=options.node||me.getRoot();isRootLoad=node&&node.isRoot();callback=options.callback;scope=options.scope;options.params=options.params||{};if(node.data.expanded&&!isRootLoad){node.data.loaded=!1;if(clearOnLoad){node.data.expanded=!1}
options.callback=function(loadedNodes,operation,success){if(!clearOnLoad){node.collapse()}
node.expand();Ext.callback(callback,scope,[loadedNodes,operation,success])}}
options.id=node.getId();me.setLoadOptions(options);if(me.getRemoteSort()&&options.sorters){me.fireEvent('beforesort',me,options.sorters)}
options=Ext.apply({node:options.node||node,internalScope:me,internalCallback:me.onProxyLoad},options);me.lastOptions=Ext.apply({},options);options.isRootLoad=isRootLoad;operation=me.createOperation('read',options);if(me.fireEvent('beforeload',me,operation)!==!1){me.loading=!0;if(isRootLoad){if(me.getClearRemovedOnLoad()){me.removedNodes.length=0}
if(clearOnLoad){me.unregisterNode(node,!0);node.clear(!1,!0);me.registerNode(node);doClear=!0}}else{if(me.loading){node.data.loaded=!1}
if(me.getTrackRemoved()&&me.getClearRemovedOnLoad()){me.clearRemoved(node)}
if(clearOnLoad){node.removeAll(!1)}}
if(me.loading&&node){node.set('loading',!0,{silent:!(me.contains(node)||node===me.getRoot())})}
if(doClear){me.clearData(!0);if(me.getRootVisible()){me.suspendEvents();me.add(node);me.resumeEvents()}}
operation.execute()}
return me},onProxyLoad:function(operation){var me=this,options=operation.initialConfig,successful=operation.wasSuccessful(),records=operation.getRecords(),node=options.node,isRootLoad=options.isRootLoad,scope=operation.getScope()||me,args=[records,operation,successful];if(me.destroyed){return}
me.loading=!1;node.set('loading',!1);if(successful){++me.loadCount;if(!me.getClearOnLoad()){records=me.cleanRecords(node,records)}
if(me.getParentIdProperty()){records=me.treeify(node,records)}
if(isRootLoad){me.suspendEvent('add','update')}
records=me.fillNode(node,records)}
Ext.callback(options.onChildNodesAvailable,scope,args);if(isRootLoad){me.resumeEvent('add','update');me.callObservers('BeforePopulate');me.fireEvent('datachanged',me);me.fireEvent('refresh',me);me.callObservers('AfterPopulate')}
me.fireEvent('load',me,records,successful,operation,node)},clearRemoved:function(node){var me=this,removed=me.removedNodes,id=node.getId(),removedLength=removed.length,i=removedLength,recordsToClear={},newRemoved=[],removedHash={},removedNode,targetNode,targetId;if(node===me.getRoot()){me.removedNodes.length=0;return}
for(;i--;){removedNode=removed[i];removedHash[removedNode.getId()]=removedNode}
for(i=removedLength;i--;){removedNode=removed[i];targetNode=removedNode;while(targetNode&&targetNode.getId()!==id){targetId=targetNode.get('parentId')||targetNode.get('lastParentId');targetNode=targetNode.parentNode||me.getNodeById(targetId)||removedHash[targetId]}
if(targetNode){recordsToClear[removedNode.getId()]=removedNode}}
for(i=0;i<removedLength;i++){removedNode=removed[i];if(!recordsToClear[removedNode.getId()]){newRemoved.push(removedNode)}}
me.removedNodes=newRemoved},fillNode:function(node,newNodes){var me=this,newNodeCount=newNodes?newNodes.length:0;if(++me.bulkUpdate===1){me.suspendEvent('datachanged')}
if(newNodeCount){me.setupNodes(newNodes);node.appendChild(newNodes,undefined,!0)}else{if(me.bulkUpdate===1){node.set('loaded',!0)}else{node.data.loaded=!0}}
if(!--me.bulkUpdate){me.resumeEvent('datachanged')}
return newNodes},setupNodes:function(newNodes){var me=this,sorters=me.getSorters(),needsIndexSort=!1,newNodeCount=newNodes.length,performLocalSort=me.sortOnLoad&&newNodeCount>1&&!me.getRemoteSort()&&me.getFolderSort()||sorters.length,performLocalFilter=me.needsLocalFilter(),node1,node2,i;if(performLocalFilter){me.doFilter(newNodes[0])}
for(i=1;i<newNodeCount;i++){node1=newNodes[i];node2=newNodes[i-1];if(performLocalFilter){me.doFilter(node1)}
needsIndexSort=node1.data.index!==node2.data.index}
if(performLocalSort){me.needsIndexSort=!0;Ext.Array.sort(newNodes,me.getSortFn());me.needsIndexSort=!1}else if(needsIndexSort){Ext.Array.sort(newNodes,me.sortByIndex)}},beginFill:function(){var me=this;if(!me.fillCount++){me.beginUpdate();me.suspendEvent('add','update');me.suspendAutoSync();me.fillArray=[]}},endFill:function(parent,nodes){var me=this,fillArray=me.fillArray,i,len,index;fillArray.push(nodes);if(!--me.fillCount){me.resumeAutoSync();me.resumeEvent('add','update');for(i=0,len=fillArray.length;i<len;i++){index=me.indexOf(fillArray[i][0]);if(index!==-1){me.fireEvent('add',me,fillArray[i],index)}}
me.fillArray=null;me.endUpdate()}},sortByIndex:function(node1,node2){return node1.data.index-node2.data.index},onIdChanged:function(node,oldId,newId){var childNodes=node.childNodes,len=childNodes&&childNodes.length,i;this.callParent(arguments);delete this.byIdMap[oldId];this.byIdMap[newId]=node;for(i=0;i<len;i++){childNodes[i].set('parentId',newId)}},treeify:function(parentNode,records){var me=this,loadParentNodeId=parentNode.getId(),parentIdProperty=me.getParentIdProperty(),len=records.length,result=[],nodeMap={},i,node,parentId,parent,id,children;for(i=0;i<len;i++){node=records[i];node.data.depth=1;nodeMap[node.id]=node}
for(i=0;i<len;i++){node=records[i];parentId=node.data[parentIdProperty];if(!(parentId||parentId===0)||parentId===loadParentNodeId){result.push(node)}else{if(!nodeMap[parentId]){Ext.raise('Ext.data.TreeStore, Invalid parentId "'+parentId+'"')}
parent=nodeMap[parentId];parent.$children=parent.$children||[];parent.$children.push(node);node.data.depth=parent.data.depth+1}}
for(id in nodeMap){node=nodeMap[id];children=node.$children;if(children){delete node.$children;me.setupNodes(children);node.appendChild(children)}
me.registerNode(node)}
me.setupNodes(result);return result},cleanRecords:function(node,records){var nodeHash={},childNodes=node.childNodes,i=0,len=childNodes.length,out=[],rec;for(;i<len;++i){nodeHash[childNodes[i].getId()]=!0}
for(i=0,len=records.length;i<len;++i){rec=records[i];if(!nodeHash[rec.getId()]){out.push(rec)}}
return out},removeAll:function(){var me=this,root=me.getRoot(),ln=me.getData().length;me.suspendEvents();me.setRoot(null);me.resumeEvents();me.callParent();if(ln){me.fireEvent('clear',me);me.fireEvent('rootchange',root,null)}},doSort:function(sorterFn){var me=this;if(me.getRemoteSort()){me.load()}else{me.tree.sort(sorterFn,!0);me.fireEvent('datachanged',me);me.fireEvent('refresh',me)}
me.fireEvent('sort',me,me.sorters.getRange())},filterVisible:function(node){return node.get('visible')},isVisible:function(node){var parentNode=node.parentNode,visible=node.data.visible,root=this.getRoot();while(visible&&parentNode){visible=parentNode.data.expanded&&parentNode.data.visible;parentNode=parentNode.parentNode}
return visible&&!(node===root&&!this.getRootVisible())},commitChanges:function(){var removed=this.removedNodes;if(removed){removed.length=0}
this.callParent()},getRootNode:function(){return this.getRoot()},setRootNode:function(root){this.setRoot(root);return this.getRoot()},privates:{fireChangeEvent:function(record){return!!this.byIdMap[record.id]},getRawRemovedRecords:function(){return this.removedNodes},createOperation:function(type,options){var me=this,node=options.node,proxy;if(me.useModelProxy&&node&&node!==me.getRootNode()){proxy=node.getProxy()}
if(proxy&&proxy!==me.getProxy()){return proxy.createOperation(type,options)}else{return me.callParent([type,options])}},recordCreator:function(data,Model){return new Model(data)},doFilter:function(node){this.filterNodes(node,this.getFilters().getFilterFn(),!0)},filterNodes:function(node,filterFn,parentVisible){var me=this,bottomUpFiltering=me.filterer==='bottomup',match=filterFn(node)&&parentVisible||(node.isRoot()&&!me.getRootVisible()),childNodes=node.childNodes,len=childNodes&&childNodes.length,i,matchingChildren;if(len){for(i=0;i<len;++i){matchingChildren=me.filterNodes(childNodes[i],filterFn,match||bottomUpFiltering)||matchingChildren}
if(bottomUpFiltering){match=matchingChildren||match}}
node.set("visible",match,me._silentOptions);return match},needsLocalFilter:function(){return!this.getRemoteFilter()&&this.getFilters().length},onRemoteFilterSet:function(filters,remoteFilter){var data=this.getData();data.setFilters(null);if(filters){filters.on('endupdate',this.onFilterEndUpdate,this)}},onRemoteSortSet:function(sorters,remoteSort){var data=this.getData();data.setSorters(null);if(sorters){sorters.on('endupdate',this.onSorterEndUpdate,this)}}},deprecated:{5:{properties:{tree:null}}}})
;
Ext.define('Ext.data.Types',{singleton:!0,requires:['Ext.data.SortTypes']},function(Types){var SortTypes=Ext.data.SortTypes;Ext.apply(Types,{stripRe:/[$,%]/g,AUTO:{sortType:SortTypes.none,type:'auto'},STRING:{convert:function(v){var defaultValue=this.getAllowNull()?null:'';return(v===undefined||v===null)?defaultValue:String(v)},sortType:SortTypes.asUCString,type:'string'},INT:{convert:function(v){if(typeof v==='number'){return parseInt(v,10)}
return v!==undefined&&v!==null&&v!==''?parseInt(String(v).replace(Types.stripRe,''),10):(this.getAllowNull()?null:0)},sortType:SortTypes.none,type:'int'},FLOAT:{convert:function(v){if(typeof v==='number'){return v}
return v!==undefined&&v!==null&&v!==''?parseFloat(String(v).replace(Types.stripRe,''),10):(this.getAllowNull()?null:0)},sortType:SortTypes.none,type:'float'},BOOL:{convert:function(v){if(typeof v==='boolean'){return v}
if(this.getAllowNull()&&(v===undefined||v===null||v==='')){return null}
return v==='true'||v==1},sortType:SortTypes.none,type:'bool'},DATE:{convert:function(v){var df=this.getDateReadFormat()||this.getDateFormat(),parsed;if(!v){return null}
if(v instanceof Date){return v}
if(df){return Ext.Date.parse(v,df)}
parsed=Date.parse(v);return parsed?new Date(parsed):null},sortType:SortTypes.asDate,type:'date'}});Types.BOOLEAN=Types.BOOL;Types.INTEGER=Types.INT;Types.NUMBER=Types.FLOAT})
;
Ext.define('Ext.data.Validation',{extend:'Ext.data.Model',isValidation:!0,syncGeneration:0,attach:function(record){this.record=record;this.isBase=record.self===Ext.data.Model;delete this.data.id},getValidation:function(){return null},isValid:function(){var me=this;if(me.syncGeneration!==me.record.generation){me.refresh()}
return!me.dirty},refresh:function(force){if(this.isBase){return}
var me=this,data=me.data,record=me.record,fields=record.fields,generation=record.generation,recordData=record.data,sep=record.validationSeparator,values=null,defaultMessage,currentValue,error,field,i,len,msg,val,name;if(force||me.syncGeneration!==generation){me.syncGeneration=generation;for(i=0,len=fields.length;i<len;++i){field=fields[i];name=field.name;val=recordData[name];defaultMessage=field.defaultInvalidMessage;error=0;if(!(name in data)){data[name]=currentValue=!0}else{currentValue=data[name]}
if(field.validate!==Ext.emptyFn){msg=field.validate(val,sep,null,record);if(msg!==!0){error=msg||defaultMessage}}
if(!error){error=!0}
if(error!==currentValue){(values||(values={}))[name]=error}}
if(values){me.set(values)}}}})
;
Ext.define('Ext.dom.Helper',function(){var afterbegin='afterbegin',afterend='afterend',beforebegin='beforebegin',beforeend='beforeend',bbValues=['BeforeBegin','previousSibling'],aeValues=['AfterEnd','nextSibling'],bb_ae_PositionHash={beforebegin:bbValues,afterend:aeValues},fullPositionHash={beforebegin:bbValues,afterend:aeValues,afterbegin:['AfterBegin','firstChild'],beforeend:['BeforeEnd','lastChild']};return{singleton:!0,alternateClassName:['Ext.DomHelper','Ext.core.DomHelper'],emptyTags:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,confRe:/^(?:tag|children|cn|html|tpl|tplData)$/i,endRe:/end/i,attributeTransform:{cls:'class',htmlFor:'for'},closeTags:{},detachedDiv:document.createElement('div'),decamelizeName:function(){var camelCaseRe=/([a-z])([A-Z])/g,cache={};function decamel(match,p1,p2){return p1+'-'+p2.toLowerCase()}
return function(s){return cache[s]||(cache[s]=s.replace(camelCaseRe,decamel))}}(),generateMarkup:function(spec,buffer){var me=this,specType=typeof spec,attr,val,tag,i,closeTags;if(specType==="string"||specType==="number"){buffer.push(spec)}else if(Ext.isArray(spec)){for(i=0;i<spec.length;i++){if(spec[i]){me.generateMarkup(spec[i],buffer)}}}else{tag=spec.tag||'div';buffer.push('<',tag);for(attr in spec){if(spec.hasOwnProperty(attr)){val=spec[attr];if(val!==undefined&&!me.confRe.test(attr)){if(val&&val.join){val=val.join(' ')}
if(typeof val==="object"){buffer.push(' ',attr,'="');me.generateStyles(val,buffer,!0).push('"')}else{buffer.push(' ',me.attributeTransform[attr]||attr,'="',val,'"')}}}}
if(me.emptyTags.test(tag)){buffer.push('/>')}else{buffer.push('>');if((val=spec.tpl)){val.applyOut(spec.tplData,buffer)}
if((val=spec.html)){buffer.push(val)}
if((val=spec.cn||spec.children)){me.generateMarkup(val,buffer)}
closeTags=me.closeTags;buffer.push(closeTags[tag]||(closeTags[tag]='</'+tag+'>'))}}
return buffer},generateStyles:function(styles,buffer,encode){var a=buffer||[],name,val;for(name in styles){if(styles.hasOwnProperty(name)){val=styles[name];name=this.decamelizeName(name);if(encode&&Ext.String.hasHtmlCharacters(val)){val=Ext.String.htmlEncode(val)}
a.push(name,':',val,';')}}
return buffer||a.join('')},markup:function(spec){var buf;if(typeof spec==="string"){return spec}
buf=this.generateMarkup(spec,[]);return buf.join('')},applyStyles:function(el,styles){Ext.fly(el).applyStyles(styles)},createContextualFragment:function(html){var div=this.detachedDiv,fragment=document.createDocumentFragment(),length,childNodes;div.innerHTML=html;childNodes=div.childNodes;length=childNodes.length;while(length--){fragment.appendChild(childNodes[0])}
return fragment},createDom:function(o){var me=this,markup=me.markup(o),div=me.detachedDiv,child;div.innerHTML=markup;child=div.firstChild;return Ext.supports.ChildContentClearedWhenSettingInnerHTML?child.cloneNode(!0):child},insertHtml:function(where,el,html){var me=this,hashVal,range,rangeEl,setStart,frag;where=where.toLowerCase();if(el.insertAdjacentHTML){if(me.ieInsertHtml){frag=me.ieInsertHtml(where,el,html);if(frag){return frag}}
hashVal=fullPositionHash[where];if(hashVal){el.insertAdjacentHTML(hashVal[0],html);return el[hashVal[1]]}}else{if(el.nodeType===3){where=where===afterbegin?beforebegin:where;where=where===beforeend?afterend:where}
range=Ext.supports.CreateContextualFragment?el.ownerDocument.createRange():undefined;setStart='setStart'+(this.endRe.test(where)?'After':'Before');if(bb_ae_PositionHash[where]){if(range){range[setStart](el);frag=range.createContextualFragment(html)}else{frag=this.createContextualFragment(html)}
el.parentNode.insertBefore(frag,where===beforebegin?el:el.nextSibling);return el[(where===beforebegin?'previous':'next')+'Sibling']}else{rangeEl=(where===afterbegin?'first':'last')+'Child';if(el.firstChild){if(range){try{range[setStart](el[rangeEl]);frag=range.createContextualFragment(html)}catch(e){frag=this.createContextualFragment(html)}}else{frag=this.createContextualFragment(html)}
if(where===afterbegin){el.insertBefore(frag,el.firstChild)}else{el.appendChild(frag)}}else{el.innerHTML=html}
return el[rangeEl]}}
Ext.raise({sourceClass:'Ext.DomHelper',sourceMethod:'insertHtml',htmlToInsert:html,targetElement:el,msg:'Illegal insertion point reached: "'+where+'"'})},insertBefore:function(el,o,returnElement){return this.doInsert(el,o,returnElement,beforebegin)},insertAfter:function(el,o,returnElement){return this.doInsert(el,o,returnElement,afterend)},insertFirst:function(el,o,returnElement){return this.doInsert(el,o,returnElement,afterbegin)},append:function(el,o,returnElement){return this.doInsert(el,o,returnElement,beforeend)},overwrite:function(el,html,returnElement){var me=this,newNode;el=Ext.getDom(el);html=me.markup(html);if(me.ieOverwrite){newNode=me.ieOverwrite(el,html)}
if(!newNode){el.innerHTML=html;newNode=el.firstChild}
return returnElement?Ext.get(newNode):newNode},doInsert:function(el,o,returnElement,where){var me=this,newNode;el=el.dom||Ext.getDom(el);if('innerHTML' in el){newNode=me.insertHtml(where,el,me.markup(o))}else{newNode=me.createDom(o,null);if(el.nodeType===3){where=where===afterbegin?beforebegin:where;where=where===beforeend?afterend:where}
if(bb_ae_PositionHash[where]){el.parentNode.insertBefore(newNode,where===beforebegin?el:el.nextSibling)}else if(el.firstChild&&where===afterbegin){el.insertBefore(newNode,el.firstChild)}else{el.appendChild(newNode)}}
return returnElement?Ext.get(newNode):newNode},createTemplate:function(o){var html=this.markup(o);return new Ext.Template(html)},createHtml:function(spec){return this.markup(spec)}}})
;
Ext.define('Ext.overrides.dom.Helper',(function(){var tableRe=/^(?:table|thead|tbody|tr|td)$/i,tableElRe=/td|tr|tbody|thead/i,ts='<table>',te='</table>',tbs=ts+'<tbody>',tbe='</tbody>'+te,trs=tbs+'<tr>',tre='</tr>'+tbe;return{override:'Ext.dom.Helper',ieInsertHtml:function(where,el,html){var frag=null;if(Ext.isIE9m&&tableRe.test(el.tagName)){frag=this.insertIntoTable(el.tagName.toLowerCase(),where,el,html)}
return frag},ieOverwrite:function(el,html){if(Ext.isIE9m&&tableRe.test(el.tagName)){while(el.firstChild){el.removeChild(el.firstChild)}
if(html){return this.insertHtml('afterbegin',el,html)}}},ieTable:function(depth,openingTags,htmlContent,closingTags){var i=-1,el=this.detachedDiv,ns,nx;el.innerHTML=[openingTags,htmlContent,closingTags].join('');while(++i<depth){el=el.firstChild}
ns=el.nextSibling;if(ns){ns=el;el=document.createDocumentFragment();while(ns){nx=ns.nextSibling;el.appendChild(ns);ns=nx}}
return el},insertIntoTable:function(tag,where,destinationEl,html){var node,before,bb=where==='beforebegin',ab=where==='afterbegin',be=where==='beforeend',ae=where==='afterend';if(tag==='td'&&(ab||be)||!tableElRe.test(tag)&&(bb||ae)){return null}
before=bb?destinationEl:ae?destinationEl.nextSibling:ab?destinationEl.firstChild:null;if(bb||ae){destinationEl=destinationEl.parentNode}
if(tag==='td'||(tag==='tr'&&(be||ab))){node=this.ieTable(4,trs,html,tre)}else if(((tag==='tbody'||tag==='thead')&&(be||ab))||(tag==='tr'&&(bb||ae))){node=this.ieTable(3,tbs,html,tbe)}else{node=this.ieTable(2,ts,html,te)}
destinationEl.insertBefore(node,before);return node}}})())
;
Ext.define('Ext.dom.Query',function(){var DQ,doc=document,cache,simpleCache,valueCache,useClassList=!!doc.documentElement.classList,useElementPointer=!!doc.documentElement.firstElementChild,useChildrenCollection=(function(){var d=doc.createElement('div');d.innerHTML='<!-- -->text<!-- -->';return d.children&&(d.children.length===0)})(),nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*\|\\]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*#/,isIE=window.ActiveXObject?!0:!1,key=30803,longHex=/\\([0-9a-fA-F]{6})/g,shortHex=/\\([0-9a-fA-F]{1,6})\s{0,1}/g,nonHex=/\\([^0-9a-fA-F]{1})/g,escapes=/\\/g,num,hasEscapes,supportsColonNsSeparator=(function(){var xmlDoc,xmlString='<r><a:b xmlns:a="n"></a:b></r>';if(window.DOMParser){xmlDoc=(new DOMParser()).parseFromString(xmlString,"application/xml")}else{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.loadXML(xmlString)}
return!!xmlDoc.getElementsByTagName('a:b').length})(),longHexToChar=function($0,$1){return String.fromCharCode(parseInt($1,16))},shortToLongHex=function($0,$1){while($1.length<6){$1='0'+$1}
return'\\'+$1},charToLongHex=function($0,$1){num=$1.charCodeAt(0).toString(16);if(num.length===1){num='0'+num}
return'\\0000'+num},unescapeCssSelector=function(selector){return(hasEscapes)?selector.replace(longHex,longHexToChar):selector},setupEscapes=function(path){hasEscapes=(path.indexOf('\\')>-1);if(hasEscapes){path=path.replace(shortHex,shortToLongHex).replace(nonHex,charToLongHex).replace(escapes,'\\\\')}
return path};eval("var batch = 30803, child, next, prev, byClassName;");child=useChildrenCollection?function child(parent,index){return parent.children[index]}:function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}
n=n.nextSibling}
return null};next=useElementPointer?function(n){return n.nextElementSibling}:function(n){while((n=n.nextSibling)&&n.nodeType!=1){}
return n};prev=useElementPointer?function(n){return n.previousElementSibling}:function(n){while((n=n.previousSibling)&&n.nodeType!=1){}
return n};function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}
n=nextNode}
return this}
byClassName=useClassList?function(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}
var result=[],ri=-1,i,ci,classList;for(i=0;ci=nodeSet[i];i++){classList=ci.classList;if(classList){if(classList.contains(cls)){result[++ri]=ci}}else if((' '+ci.className+' ').indexOf(cls)!==-1){result[++ri]=ci}}
return result}:function(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}
var result=[],ri=-1,i,ci;for(i=0;ci=nodeSet[i];i++){if((' '+ci.className+' ').indexOf(cls)!==-1){result[++ri]=ci}}
return result};function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}
if(!n){return null}
if(attr=="for"){return n.htmlFor}
if(attr=="class"||attr=="className"){return n.className}
return n.getAttribute(attr)||n[attr]}
function getNodes(ns,mode,tagName){var result=[],ri=-1,cs,i,ni,j,ci,cn,utag,n,cj;if(!ns){return result}
tagName=tagName.replace('|',':')||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}
if(!mode){tagName=unescapeCssSelector(tagName);if(!supportsColonNsSeparator&&DQ.isXml(ns[0])&&tagName.indexOf(':')!==-1){for(i=0;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName.split(':').pop());for(j=0;ci=cs[j];j++){if(ci.tagName===tagName){result[++ri]=ci}}}}else{for(i=0;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(j=0;ci=cs[j];j++){result[++ri]=ci}}}}else if(mode=="/"||mode==">"){utag=tagName.toUpperCase();for(i=0;ni=ns[i];i++){cn=ni.childNodes;for(j=0;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=='*'){result[++ri]=cj}}}}else if(mode=="+"){utag=tagName.toUpperCase();for(i=0;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}
if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=='*')){result[++ri]=n}}}else if(mode=="~"){utag=tagName.toUpperCase();for(i=0;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=='*'){result[++ri]=n}}}}
return result}
function concat(a,b){a.push.apply(a,b);return a}
function byTag(cs,tagName){if(cs.tagName||cs===doc){cs=[cs]}
if(!tagName){return cs}
var result=[],ri=-1,i,ci;tagName=tagName.toLowerCase();for(i=0;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}
return result}
function byId(cs,id){id=unescapeCssSelector(id);if(cs.tagName||cs===doc){cs=[cs]}
if(!id){return cs}
var result=[],ri=-1,i,ci;for(i=0;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}
return result}
function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=DQ.operators[op],a,xml,hasXml,i,ci;value=unescapeCssSelector(value);for(i=0;ci=cs[i];i++){if(ci.nodeType===1){if(!hasXml){xml=DQ.isXml(ci);hasXml=!0}
if(!xml){if(useGetStyle){a=DQ.getStyle(ci,attr)}else if(attr=="class"||attr=="className"){a=ci.className}else if(attr=="for"){a=ci.htmlFor}else if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}else{a=ci.getAttribute(attr)}
if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}}
return result}
function byPseudo(cs,name,value){value=unescapeCssSelector(value);return DQ.pseudos[name](cs,value)}
function nodupIEXml(cs){var d=++key,r,i,len,c;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(i=1,len=cs.length;i<len;i++){c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}
for(i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}
return r}
function nodup(cs){if(!cs){return[]}
var len=cs.length,r=cs,ri=-1,c,cj,i,d,j;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}
if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}
d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(j=0;j<i;j++){r[++ri]=cs[j]}
for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}
return r}}
return r}
function quickDiffIEXml(c1,c2){var d=++key,r=[],i,len;for(i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}
for(i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}
for(i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}
return r}
function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[],i,len;if(!len1){return c2}
if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}
for(i=0;i<len1;i++){c1[i]._qdiff=d}
for(i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}
return r}
function quickId(ns,mode,root,id){var d;if(ns==root){id=unescapeCssSelector(id);d=root.ownerDocument||root;return d.getElementById(id)}
ns=getNodes(ns,mode,"*");return byId(ns,id)}
return{singleton:!0,alternateClassName:['Ext.core.DomQuery','Ext.DomQuery'],requires:['Ext.dom.Helper','Ext.util.Operators'],_init:function(){DQ=this;DQ.operators=Ext.Object.chain(Ext.util.Operators);DQ._cache=cache=new Ext.util.LruCache({maxSize:200});DQ._valueCache=valueCache=new Ext.util.LruCache({maxSize:200});DQ._simpleCache=simpleCache=new Ext.util.LruCache({maxSize:200})},clearCache:function(){cache.clear();valueCache.clear();simpleCache.clear()},getStyle:function(el,name){return Ext.fly(el,'_DomQuery').getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root) {\n var mode; ++batch; var n = root || document;\n"],lastPath,matchers=DQ.matchers,matchersLn=matchers.length,lmode=path.match(modeRe),modeMatch,tokenMatch,matched,j,t,m;path=setupEscapes(path);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}
while(path.substr(0,1)=="/"){path=path.substr(1)}
while(path&&lastPath!=path){lastPath=path;tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}
path=path.replace(tokenMatch[0],"")}else if(path.substr(0,1)!='@'){fn[fn.length]='n = getNodes(n, mode, "*");'}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}
path=path.replace(tokenMatch[0],"")}}
while(!(modeMatch=path.match(modeRe))){matched=!1;for(j=0;j<matchersLn;j++){t=matchers[j];m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=!0;break}}
if(!matched){Ext.raise({sourceClass:'Ext.DomQuery',sourceMethod:'compile',msg:'Error parsing selector. Parsing failed at "'+path+'"'})}}
if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}
fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||doc;if(typeof root=="string"){root=doc.getElementById(root)}
var paths=Ext.splitAndUnescape(path,","),results=[],query,i,len,subPath,result;for(i=0,len=paths.length;i<len;i++){subPath=paths[i].replace(trimRe,"");query=cache.get(subPath);if(!query){query=DQ.compile(subPath,type);if(!query){Ext.raise({sourceClass:'Ext.DomQuery',sourceMethod:'jsSelect',msg:subPath+' is not a valid selector'})}
cache.add(subPath,query)}else{setupEscapes(subPath)}
result=query(root);if(result&&result!==doc){results=results.concat(result)}}
if(paths.length>1){return nodup(results)}
return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":!1},select:doc.querySelectorAll?function(path,root,type,single){root=root||doc;if(!DQ.isXml(root)){try{if(root.parentNode&&(root.nodeType!==9)&&path.indexOf(',')===-1&&!startIdRe.test(path)){path=Ext.makeIdSelector(Ext.id(root))+' '+path;root=root.parentNode}
return single?[root.querySelector(path)]:Ext.Array.toArray(root.querySelectorAll(path))}catch(e){}}
return DQ.jsSelect.call(this,path,root,type)}:function(path,root,type){return DQ.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root,null,!0)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");var query=valueCache.get(path),n;if(!query){query=DQ.compile(path,"select");valueCache.add(path,query)}else{setupEscapes(path)}
n=query(root);return DQ.getNodeValue(n[0]||n,defaultValue)},getNodeValue:function(node,defaultValue){if(typeof node.normalize=='function'){node.normalize()}
var firstChild=node&&node.firstChild,v=firstChild?firstChild.nodeValue:null;if(defaultValue!==undefined&&(v==null||v==='')){v=defaultValue}
return v},selectNumber:function(path,root,defaultValue){var v=DQ.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=doc.getElementById(el)}
var isArray=Ext.isArray(el),result=DQ.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");var query=simpleCache.get(ss),result;if(!query){query=DQ.compile(ss,"simple");simpleCache.add(ss,query)}else{setupEscapes(ss)}
result=query(els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-\\]+)/,select:useClassList?'n = byClassName(n, "{1}");':'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w\-\\]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-\.]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],pseudos:{"first-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.previousSibling)&&n.nodeType!=1){}
if(!n){r[++ri]=ci}}
return r},"last-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.nextSibling)&&n.nodeType!=1){}
if(!n){r[++ri]=ci}}
return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0,i,n,j,cn,pn;for(i=0;n=c[i];i++){pn=n.parentNode;if(batch!=pn._batch){j=0;for(cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}
pn._batch=batch}
if(f==1){if(l===0||n.nodeIndex==l){r[++ri]=n}}else if((n.nodeIndex+l)%f===0){r[++ri]=n}}
return r},"only-child":function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}
return r},"empty":function(c){var r=[],ri=-1,i,ci,cns,j,cn,empty;for(i=0;ci=c[i];i++){cns=ci.childNodes;j=0;empty=!0;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=!1;break}}
if(empty){r[++ri]=ci}}
return r},"contains":function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if((ci.textContent||ci.innerText||ci.text||'').indexOf(v)!=-1){r[++ri]=ci}}
return r},"nodeValue":function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}
return r},"checked":function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.checked===!0){r[++ri]=ci}}
return r},"not":function(c,ss){return DQ.filter(c,ss,!0)},"any":function(c,selectors){var ss=selectors.split('|'),r=[],ri=-1,s,i,ci,j;for(i=0;ci=c[i];i++){for(j=0;s=ss[j];j++){if(DQ.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=DQ.select,r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}
return r},"next":function(c,ss){var is=DQ.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}
return r},"prev":function(c,ss){var is=DQ.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}
return r},focusable:function(candidates){var len=candidates.length,results=[],i=0,c;for(;i<len;i++){c=candidates[i];if(Ext.fly(c,'_DomQuery').isFocusable()){results.push(c)}}
return results},visible:function(candidates,deep){var len=candidates.length,results=[],i=0,c;for(;i<len;i++){c=candidates[i];if(Ext.fly(c,'_DomQuery').isVisible(deep)){results.push(c)}}
return results},isScrolled:function(c){var r=[],ri=-1,i,ci,s;for(i=0;ci=c[i];i++){s=Ext.fly(ci,'_DomQuery').getScroll();if(s.top>0||s.left>0){r[++ri]=ci}}
return r}}}},function(){this._init()})
;
Ext.define('Ext.data.reader.Xml',{extend:'Ext.data.reader.Reader',alternateClassName:'Ext.data.XmlReader',alias:'reader.xml',requires:['Ext.dom.Query'],config:{record:'',namespace:''},responseType:'document',createAccessor:function(expr){if(Ext.isEmpty(expr)){return Ext.emptyFn}
if(Ext.isFunction(expr)){return expr}
return function(root){return this.getNodeValue(Ext.DomQuery.selectNode(expr,root))}},getNodeValue:function(node){if(node){if(typeof node.normalize==='function'){node.normalize()}
node=node.firstChild;if(node){return node.nodeValue}}
return undefined},getResponseData:function(response){var xml=response.responseXML,error='XML data not found in the response';if(!xml){Ext.Logger.warn(error);return this.createReadError(error)}
return xml},getData:function(data){return data.documentElement||data},getRoot:function(data){return this.getRootValue(data,this.getRootProperty())},extractData:function(root,readOptions){var recordName=this.getRecord();if(!recordName){Ext.raise('Record is a required parameter')}
if(recordName!==root.nodeName){root=Ext.DomQuery.select(recordName,root)}else{root=[root]}
return this.callParent([root,readOptions])},readRecords:function(doc,readOptions,internalReadOptions){if(Ext.isArray(doc)){doc=doc[0]}
return this.callParent([doc,readOptions,internalReadOptions])},createFieldAccessor:function(field){var namespace=this.getNamespace(),selector,autoMapping,result;if(field.mapping){selector=field.mapping}else{selector=(namespace?namespace+'|':'')+field.name;autoMapping=!0}
if(typeof selector==='function'){result=function(raw,self){return field.mapping(raw,self)}}else{if(autoMapping&&!namespace&&Ext.supports.XmlQuerySelector){result=function(raw,self){return self.getNodeValue(raw.querySelector(selector))}}
if(!result){result=function(raw,self){return self.getNodeValue(Ext.DomQuery.selectNode(selector,raw))}}}
return result},privates:{getGroupRoot:function(data){return this.getRootValue(data,this.getGroupRootProperty())},getRootValue:function(data,prop){var nodeName=data.nodeName;if(!prop||(nodeName&&nodeName===prop)){return data}else if(typeof prop==='function'){return prop(data)}else if(Ext.DomQuery.isXml(data)){return Ext.DomQuery.selectNode(prop,data)}},getSummaryRoot:function(data){return this.getRootValue(data,this.getSummaryRootProperty())}},deprecated:{'5.1.1':{properties:{xmlData:null}}}})
;
Ext.define('Ext.data.writer.Xml',{extend:'Ext.data.writer.Writer',alternateClassName:'Ext.data.XmlWriter',alias:'writer.xml',config:{documentRoot:'xmlData',defaultDocumentRoot:'xmlData',header:'',record:'record'},selectorRe:/[^>\s]+/g,writeRecords:function(request,data){var me=this,xml=[],i=0,len=data.length,root=me.getDocumentRoot(),recordName=me.getRecord(),record=recordName.match(this.selectorRe),recLen=record.length,needsRoot=data.length!==1&&recLen===1,transform;transform=this.getTransform();if(transform){data=transform(data,request)}
xml.push(me.getHeader()||'');if(!root&&needsRoot){root=me.getDefaultDocumentRoot()}
if(root){xml.push('<',root,'>')}
for(i=0;i<recLen-1;i++){xml.push('<',record[i],'>')}
recordName=record[i];for(i=0;i<len;++i){this.objectToElement(recordName,data[i],xml)}
for(i=recLen-2;i>-1;i--){xml.push('</',record[i],'>')}
if(root){xml.push('</',root,'>')}
request.setXmlData(xml.join(''));return request},objectToElement:function(name,o,output){var subOutput=[],key,datum,subKeys,subKeyLen,subObject,subObjects,lastObject,lastKey,i;if(!output){output=[]}
output.push('<',name);for(key in o){datum=o[key];if(key[0]==='@'){output.push(' ',key.substr(1),'="',datum,'"')}else{if(typeof datum==='object'){this.objectToElement(key,datum,subOutput)}else{subKeys=key.match(this.selectorRe);if((subKeyLen=subKeys.length)>1){subObjects=subObjects||{};for(subObject=subObjects,i=0;i<subKeyLen;i++){lastObject=subObject;lastKey=subKeys[i];subObject=subObject[lastKey]||(subObject[lastKey]={})}
lastObject[lastKey]=datum}else{subOutput.push('<',key,'>',datum,'</',key,'>')}}}}
output.push('>');output.push.apply(output,subOutput);if(subObjects){for(key in subObjects){datum=subObjects[key];this.objectToElement(key,datum,output)}}
output.push('</',name,'>');return output}})
;
Ext.define('Ext.data.XmlStore',{extend:'Ext.data.Store',alias:'store.xml',requires:['Ext.data.proxy.Ajax','Ext.data.reader.Xml','Ext.data.writer.Xml'],constructor:function(config){config=Ext.apply({proxy:{type:'ajax',reader:'xml',writer:'xml'}},config);this.callParent([config])}})
;
Ext.define('Ext.data.identifier.Negative',{extend:'Ext.data.identifier.Sequential',alias:'data.identifier.negative',config:{increment:-1,seed:-1}})
;
Ext.define('Ext.data.identifier.Uuid',{extend:'Ext.data.identifier.Generator',alias:'data.identifier.uuid',isUnique:!0,config:{id:null},constructor:function(config){this.callParent([config]);this.reconfigure(config)},reconfigure:function(config){var cls=this.self;this.generate=(config&&config.version===1)?cls.createSequential(config.salt,config.timestamp,config.clockSeq):cls.createRandom()},clone:null,statics:{createRandom:function(){var pattern='xxxxxxxx-xxxx-4xxx-Rxxx-xMxxxxxxxxxx'.split(''),hex='0123456789abcdef'.split(''),length=pattern.length,parts=[];return function(){var r,c,i;for(i=0;i<length;++i){c=pattern[i];if(c!=='-'&&c!=='4'){r=Math.random()*16;r=(c==='R')?(r&3|8):(r|((c==='M')?1:0));c=hex[r]}
parts[i]=c}
return parts.join('')}},createSequential:function(salt,time,clockSeq){var parts=[],twoPow32=Math.pow(2,32),saltLo=salt.lo,saltHi=salt.hi,timeLo=time.lo,timeHi=time.hi,toHex;toHex=function(value,length){var ret=value.toString(16).toLowerCase();if(ret.length>length){ret=ret.substring(ret.length-length)}else if(ret.length<length){ret=Ext.String.leftPad(ret,length,'0')}
return ret};if(typeof salt==='number'){saltHi=Math.floor(salt/twoPow32);saltLo=Math.floor(salt-saltHi*twoPow32)}
if(typeof time==='number'){timeHi=Math.floor(time/twoPow32);timeLo=Math.floor(time-timeHi*twoPow32)}
saltHi|=0x100;parts[3]=toHex(0x80|((clockSeq>>>8)&0x3F),2)+toHex(clockSeq&0xFF,2);parts[4]=toHex(saltHi,4)+toHex(saltLo,8);return function(){parts[0]=toHex(timeLo,8);parts[1]=toHex(timeHi&0xFFFF,4);parts[2]=toHex(((timeHi>>>16)&0xFFF)|(1<<12),4);++timeLo;if(timeLo>=twoPow32){timeLo=0;++timeHi}
return parts.join('-')}}}},function(){this.Global=new this({id:'uuid'})})
;
Ext.define('Ext.data.proxy.WebStorage',{extend:'Ext.data.proxy.Client',alternateClassName:'Ext.data.WebStorageProxy',requires:['Ext.data.identifier.Sequential'],config:{id:undefined},constructor:function(config){this.callParent(arguments);this.cache={};if(this.getStorageObject()===undefined){Ext.raise("Local Storage is not supported in this browser, please use another type "+"of data proxy")}
if(this.getId()===undefined){Ext.raise("No unique id was provided to the local storage proxy. "+"See Ext.data.proxy.LocalStorage documentation for details")}
this.initialize()},create:function(operation){var me=this,records=operation.getRecords(),length=records.length,ids=me.getIds(),id,record,i,identifier;if(me.isHierarchical===undefined){me.isHierarchical=!!records[0].isNode;if(me.isHierarchical){me.getStorageObject().setItem(me.getTreeKey(),!0)}}
for(i=0;i<length;i++){record=records[i];if(record.phantom){identifier=record.identifier;if(identifier&&identifier.isUnique){id=record.getId()}else{id=me.getNextId()}}else{id=record.getId()}
me.setRecord(record,id);record.commit();ids.push(id)}
me.setIds(ids);operation.setSuccessful(!0)},read:function(operation){var me=this,allRecords,records=[],success=!0,Model=me.getModel(),validCount=0,recordCreator=operation.getRecordCreator(),filters,sorters,limit,filterLen,valid,record,ids,length,data,id,i,j;if(me.isHierarchical){records=me.getTreeData()}else{ids=me.getIds();length=ids.length;id=operation.getId();if(id){data=me.getRecord(id);if(data!==null){record=recordCreator?recordCreator(data,Model):new Model(data)}
if(record){records.push(record)}else{success=!1}}else{sorters=operation.getSorters();filters=operation.getFilters();limit=operation.getLimit();allRecords=[];for(i=0;i<length;i++){data=me.getRecord(ids[i]);record=recordCreator?recordCreator(data,Model):new Model(data);allRecords.push(record)}
if(sorters){Ext.Array.sort(allRecords,Ext.util.Sorter.createComparator(sorters))}
for(i=operation.getStart()||0;i<length;i++){record=allRecords[i];valid=!0;if(filters){for(j=0,filterLen=filters.length;j<filterLen;j++){valid=filters[j].filter(record)}}
if(valid){records.push(record);validCount++}
if(limit&&validCount===limit){break}}}}
if(success){operation.setResultSet(new Ext.data.ResultSet({records:records,total:records.length,loaded:!0}));operation.setSuccessful(!0)}else{operation.setException('Unable to load records')}},update:function(operation){var records=operation.getRecords(),length=records.length,ids=this.getIds(),record,id,i;for(i=0;i<length;i++){record=records[i];this.setRecord(record);record.commit();id=record.getId();if(id!==undefined&&Ext.Array.indexOf(ids,id)===-1){ids.push(id)}}
this.setIds(ids);operation.setSuccessful(!0)},erase:function(operation){var me=this,records=operation.getRecords(),ids=me.getIds(),idLength=ids.length,newIds=[],removedHash={},i=records.length,id;for(;i--;){Ext.apply(removedHash,me.removeRecord(records[i]))}
for(i=0;i<idLength;i++){id=ids[i];if(!removedHash[id]){newIds.push(id)}}
me.setIds(newIds);operation.setSuccessful(!0)},getRecord:function(id){var me=this,cache=me.cache,data;data=!cache[id]?Ext.decode(me.getStorageObject().getItem(me.getRecordKey(id))):cache[id];if(!data){return null}
cache[id]=data;data[me.getModel().prototype.idProperty]=id;return Ext.merge({},data)},setRecord:function(record,id){if(id){record.set('id',id,{commit:!0})}else{id=record.getId()}
var me=this,rawData=record.getData(),data={},model=me.getModel(),fields=model.getFields(),length=fields.length,i=0,field,name,obj,key,value;for(;i<length;i++){field=fields[i];name=field.name;if(field.persist){value=rawData[name];if(field.isDateField&&field.dateFormat&&Ext.isDate(value)){value=Ext.Date.format(value,field.dateFormat)}else if(field.serialize){value=field.serialize(value,record)}
data[name]=value}}
delete data[model.prototype.idProperty];if(record.isNode&&record.get('depth')===1){delete data.parentId}
obj=me.getStorageObject();key=me.getRecordKey(id);me.cache[id]=data;obj.removeItem(key);obj.setItem(key,Ext.encode(data))},removeRecord:function(record){var me=this,id=record.getId(),records={},i,childNodes;records[id]=record;me.getStorageObject().removeItem(me.getRecordKey(id));delete me.cache[id];if(record.childNodes){childNodes=record.childNodes;for(i=childNodes.length;i--;){Ext.apply(records,me.removeRecord(childNodes[i]))}}
return records},getRecordKey:function(id){if(id.isModel){id=id.getId()}
return Ext.String.format("{0}-{1}",this.getId(),id)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.getId())},getTreeKey:function(){return Ext.String.format("{0}-tree",this.getId())},getIds:function(){var me=this,ids=(me.getStorageObject().getItem(me.getId())||"").split(","),length=ids.length,isString=this.getIdField().isStringField,i;if(length===1&&ids[0]===""){ids=[]}else{for(i=0;i<length;i++){ids[i]=isString?ids[i]:+ids[i]}}
return ids},getIdField:function(){return this.getModel().prototype.idField},setIds:function(ids){var obj=this.getStorageObject(),str=ids.join(","),id=this.getId();obj.removeItem(id);if(!Ext.isEmpty(str)){obj.setItem(id,str)}},getNextId:function(){var me=this,obj=me.getStorageObject(),key=me.getRecordCounterKey(),isString=me.getIdField().isStringField,id;id=me.idGenerator.generate();obj.setItem(key,id);if(isString){id=id+''}
return id},getTreeData:function(){var me=this,ids=me.getIds(),length=ids.length,records=[],recordHash={},root=[],i=0,Model=me.getModel(),idProperty=Model.prototype.idProperty,rootLength,record,parent,parentId,children,id;for(;i<length;i++){id=ids[i];record=me.getRecord(id);records.push(record);recordHash[id]=record;if(!record.parentId){root.push(record)}}
rootLength=root.length;Ext.Array.sort(records,me.sortByParentId);for(i=rootLength;i<length;i++){record=records[i];parentId=record.parentId;if(!parent||parent[idProperty]!==parentId){parent=recordHash[parentId];parent.children=children=[]}
children.push(record)}
for(i=length;i--;){record=records[i];if(!record.children&&!record.leaf){record.loaded=!0}}
for(i=rootLength;i--;){record=root[i];root[i]=new Model(record)}
return root},sortByParentId:function(node1,node2){return(node1.parentId||0)-(node2.parentId||0)},initialize:function(){var me=this,storageObject=me.getStorageObject(),lastId=+storageObject.getItem(me.getRecordCounterKey()),id=me.getId();storageObject.setItem(id,storageObject.getItem(id)||"");if(storageObject.getItem(me.getTreeKey())){me.isHierarchical=!0}
me.idGenerator=new Ext.data.identifier.Sequential({seed:lastId?lastId+1:1})},clear:function(){var me=this,obj=me.getStorageObject(),ids=me.getIds(),len=ids.length,i;for(i=0;i<len;i++){obj.removeItem(me.getRecordKey(ids[i]))}
obj.removeItem(me.getRecordCounterKey());obj.removeItem(me.getTreeKey());obj.removeItem(me.getId());me.cache={}},getStorageObject:function(){Ext.raise("The getStorageObject function has not been defined in your "+"Ext.data.proxy.WebStorage subclass")}})
;
Ext.define('Ext.data.proxy.LocalStorage',{extend:'Ext.data.proxy.WebStorage',alias:'proxy.localstorage',alternateClassName:'Ext.data.LocalStorageProxy',getStorageObject:function(){return window.localStorage}})
;
Ext.define('Ext.data.proxy.Rest',{extend:'Ext.data.proxy.Ajax',alternateClassName:'Ext.data.RestProxy',alias:'proxy.rest',defaultActionMethods:{create:'POST',read:'GET',update:'PUT',destroy:'DELETE'},slashRe:/\/$/,periodRe:/\.$/,config:{appendId:!0,format:null,batchActions:!1,actionMethods:{create:'POST',read:'GET',update:'PUT',destroy:'DELETE'}},buildUrl:function(request){var me=this,operation=request.getOperation(),records=operation.getRecords(),record=records?records[0]:null,format=me.getFormat(),url=me.getUrl(request),id,params;if(record&&!record.phantom){id=record.getId()}else{id=operation.getId()}
if(me.getAppendId()&&me.isValidId(id)){if(!url.match(me.slashRe)){url+='/'}
url+=encodeURIComponent(id);params=request.getParams();if(params){delete params[me.getIdParam()]}}
if(format){if(!url.match(me.periodRe)){url+='.'}
url+=format}
request.setUrl(url);return me.callParent([request])},isValidId:function(id){return id||id===0}})
;
Ext.define('Ext.data.proxy.SessionStorage',{extend:'Ext.data.proxy.WebStorage',alias:'proxy.sessionstorage',alternateClassName:'Ext.data.SessionStorageProxy',getStorageObject:function(){return window.sessionStorage}})
;

;

;

;

;
Ext.define('Ext.data.summary.Base',{mixins:['Ext.mixin.Factoryable'],alias:'data.summary.base',isAggregator:!0,factoryConfig:{defaultType:'base',cacheable:!0},constructor:function(config){var calculate=config&&config.calculate;if(calculate){config=Ext.apply({},config);delete config.calculate;this.calculate=calculate}
this.initConfig(config)},extractValue:function(record,property,root){var ret;if(record){if(root){record=record[root]}
ret=record[property]}
return ret}},function(){Ext.Factory.on('dataSummary',function(factory,config){if(typeof config==='function'){return factory({calculate:config})}})})
;
Ext.define('Ext.data.summary.Sum',{extend:'Ext.data.summary.Base',alias:'data.summary.sum',calculate:function(records,property,root,begin,end){var n=end-begin,i,sum,v;for(i=0;i<n;++i){v=this.extractValue(records[begin+i],property,root);sum=i?sum+v:v}
return sum}})
;
Ext.define('Ext.data.summary.Average',{extend:'Ext.data.summary.Sum',alias:'data.summary.average',calculate:function(records,property,root,begin,end){var len=end-begin,value;if(len>0){value=this.callParent([records,property,root,begin,end])/len}
return value}})
;
Ext.define('Ext.data.summary.Count',{extend:'Ext.data.summary.Base',alias:'data.summary.count',calculate:function(records,property,root,begin,end){return end-begin}})
;
Ext.define('Ext.data.summary.Max',{extend:'Ext.data.summary.Base',alias:'data.summary.max',calculate:function(records,property,root,begin,end){var max=this.extractValue(records[begin],property,root),i,v;for(i=begin;i<end;++i){v=this.extractValue(records[i],property,root);if(v>max){max=v}}
return max}})
;
Ext.define('Ext.data.summary.Min',{extend:'Ext.data.summary.Base',alias:'data.summary.min',calculate:function(records,property,root,begin,end){var min=this.extractValue(records[begin],property,root),i,v;for(i=begin;i<end;++i){v=this.extractValue(records[i],property,root);if(v<min){min=v}}
return min}})
;
Ext.define('Ext.data.summary.None',{extend:'Ext.data.summary.Base',alias:'data.summary.none',config:{value:null},calculate:function(){return this.getValue()}})
;
Ext.define('Ext.data.validator.AbstractDate',{extend:'Ext.data.validator.Validator',config:{message:null,format:''},applyFormat:function(format){if(!format){format=this.getDefaultFormat()}
if(!Ext.isArray(format)){format=[format]}
return format},parse:function(value){if(Ext.isDate(value)){return value}
var me=this,format=me.getFormat(),len=format.length,ret=null,i;for(i=0;i<len&&!ret;++i){ret=Ext.Date.parse(value,format[i],!0)}
return ret},validate:function(value){return this.parse(value)?!0:this.getMessage()}})
;
Ext.define('Ext.data.validator.Bound',{extend:'Ext.data.validator.Validator',alias:'data.validator.bound',type:'bound',config:{min:undefined,max:undefined,emptyMessage:'Must be present',minOnlyMessage:'Value must be greater than {0}',maxOnlyMessage:'Value must be less than {0}',bothMessage:'Value must be between {0} and {1}'},resetMessages:function(){this._bothMsg=this._minMsg=this._maxMsg=null},updateMin:function(){this.resetMessages()},updateMax:function(){this.resetMessages()},updateMinOnlyMessage:function(){this.resetMessages()},updateMaxOnlyMessage:function(){this.resetMessages()},updateBothMessage:function(){this.resetMessages()},validate:function(value){var me=this,min=me.getMin(),max=me.getMax(),hasMin=(min!=null),hasMax=(max!=null),msg=this.validateValue(value);if(msg!==!0){return msg}
value=me.getValue(value);if(hasMin&&hasMax){if(value<min||value>max){msg=me._bothMsg||(me._bothMsg=Ext.String.format(me.getBothMessage(),min,max))}}else if(hasMin){if(value<min){msg=me._minMsg||(me._minMsg=Ext.String.format(me.getMinOnlyMessage(),min))}}else if(hasMax){if(value>max){msg=me._maxMsg||(me._maxMsg=Ext.String.format(me.getMaxOnlyMessage(),max))}}
return msg},validateValue:function(value){if(value===undefined||value===null){return this.getEmptyMessage()}
return!0},getValue:Ext.identityFn})
;
Ext.define('Ext.data.validator.Format',{extend:'Ext.data.validator.Validator',alias:'data.validator.format',type:'format',config:{message:'Is in the wrong format',matcher:undefined},constructor:function(){this.callParent(arguments);if(!this.getMatcher()){Ext.raise('validator.Format must be configured with a matcher')}},validate:function(value){var matcher=this.getMatcher(),result=matcher&&matcher.test(value);return result?result:this.getMessage()}})
;
Ext.define('Ext.data.validator.CIDRv4',{extend:'Ext.data.validator.Format',alias:'data.validator.cidrv4',type:'cidrv4',message:'Is not a valid CIDR block',matcher:/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/})
;
Ext.define('Ext.data.validator.CIDRv6',{extend:'Ext.data.validator.Format',alias:'data.validator.cidrv6',type:'cidrv6',message:'Is not a valid CIDR block',matcher:/^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$/})
;
Ext.define('Ext.data.validator.Number',{extend:'Ext.data.validator.Validator',alias:'data.validator.number',type:'number',config:{decimalSeparator:undefined,message:'Is not a valid number',thousandSeparator:undefined},constructor:function(config){this.callParent([config]);this.rebuildMatcher()},applyDecimalSeparator:function(v){return v===undefined?Ext.util.Format.decimalSeparator:v},updateDecimalSeparator:function(){this.rebuildMatcher()},applyThousandSeparator:function(v){return v===undefined?Ext.util.Format.thousandSeparator:v},updateThousandSeparator:function(){this.rebuildMatcher()},parse:function(v){var sep=this.getDecimalSeparator(),N=Ext.Number;if(typeof v==='string'){if(!this.matcher.test(v)){return null}
v=this.parseValue(v)}
return sep?N.parseFloat(v):N.parseInt(v)},validate:function(value){return this.parse(value)===null?this.getMessage():!0},privates:{getMatcherText:function(preventSign){var t=this.getThousandSeparator(),d=this.getDecimalSeparator(),s='(?:';if(t){t=Ext.String.escapeRegex(t);s+='(?:\\d{1,3}('+t+'\\d{3})*)|'}
s+='\\d*)';if(d){d=Ext.String.escapeRegex(d);s+='(?:'+d+'\\d*)?'}
if(!preventSign){s=this.getSignPart()+s}
return s},getSignPart:function(){return'(\\+|\\-)?'},parseValue:function(v){var thousandMatcher=this.thousandMatcher,decimal;if(thousandMatcher){v=v.replace(thousandMatcher,'')}
decimal=this.getDecimalSeparator();if(decimal&&decimal!=='.'){v=v.replace(decimal,'.')}
return v},rebuildMatcher:function(){var me=this,sep;if(!me.isConfiguring){sep=me.getThousandSeparator();me.matcher=new RegExp('^'+me.getMatcherText()+'$');if(sep){me.thousandMatcher=sep?new RegExp(Ext.String.escapeRegex(sep),'g'):null}}}}})
;
Ext.define('Ext.data.validator.Currency',{extend:'Ext.data.validator.Number',alias:'data.validator.currency',type:'currency',config:{symbolAtEnd:undefined,spacer:undefined,symbol:undefined},message:'Is not a valid currency amount',applySymbolAtEnd:function(value){return value===undefined?Ext.util.Format.currencyAtEnd:value},updateSymbolAtEnd:function(){this.rebuildMatcher()},applySpacer:function(value){return value===undefined?Ext.util.Format.currencySpacer:value},updateSpacer:function(){this.rebuildMatcher()},applySymbol:function(value){return value===undefined?Ext.util.Format.currencySign:value},updateSymbol:function(){this.rebuildMatcher()},privates:{getMatcherText:function(){var me=this,ret=me.callParent([!0]),symbolPart=me.getSymbolMatcher();if(me.getSymbolAtEnd()){ret+=symbolPart}else{ret=symbolPart+ret}
return me.getSignPart()+ret},getSymbolMatcher:function(){var symbol=Ext.String.escapeRegex(this.getSymbol()),spacer=Ext.String.escapeRegex(this.getSpacer()||''),s=this.getSymbolAtEnd()?(spacer+symbol):(symbol+spacer);return'(?:'+s+')?'},parseValue:function(v){v=v.replace(this.currencyMatcher,this.atEnd?'':'$1');return this.callParent([v])},rebuildMatcher:function(){var me=this,symbolPart,atEnd,sign;me.callParent();if(!me.isConfiguring){atEnd=me.getSymbolAtEnd();symbolPart=me.getSymbolMatcher();sign=me.getSignPart();me.atEnd=atEnd;me.currencyMatcher=new RegExp(atEnd?(symbolPart+'$'):('^'+sign+symbolPart))}}}})
;
Ext.define('Ext.data.validator.CurrencyUS',{extend:'Ext.data.validator.Currency',alias:'data.validator.currency-us',type:'currency-us',thousandSeparator:',',decimalSeparator:'.',symbol:'$',spacer:'',symbolAtEnd:!1})
;
Ext.define('Ext.data.validator.Date',{extend:'Ext.data.validator.AbstractDate',alias:'data.validator.date',type:'date',isDateValidator:!0,message:'Is not a valid date',privates:{getDefaultFormat:function(){return[Ext.Date.defaultFormat,'m/d/Y','n/j/Y','n/j/y','m/j/y','n/d/y','m/j/Y','n/d/Y','m-d-y','n-d-y','m-d-Y','mdy','mdY','Y-m-d']}}})
;
Ext.define('Ext.data.validator.DateTime',{extend:'Ext.data.validator.AbstractDate',alias:'data.validator.datetime',type:'datetime',isDateTimeValidator:!0,message:'Is not a valid date and time',privates:{getDefaultFormat:function(){var D=Ext.Date;return D.defaultFormat+' '+D.defaultTimeFormat}}})
;
Ext.define('Ext.data.validator.Email',{extend:'Ext.data.validator.Format',alias:'data.validator.email',type:'email',message:'Is not a valid email address',matcher:/^(")?(?:[^\."])(?:(?:[\.])?(?:[\w\-!#$%&'*+\/=?\^_`{|}~]))*\1@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/})
;
Ext.define('Ext.data.validator.List',{extend:'Ext.data.validator.Validator',alias:'data.validator.list',type:'list',config:{list:null,message:null},inclusion:null,validate:function(value){var contains=Ext.Array.contains(this.getList(),value),inclusion=this.inclusion,exclusion=!inclusion,result;result=(inclusion&&contains)||(exclusion&&!contains);return result||this.getMessage()}})
;
Ext.define('Ext.data.validator.Exclusion',{extend:'Ext.data.validator.List',alias:'data.validator.exclusion',type:'exclusion',message:'Is a value that has been excluded',constructor:function(){this.callParent(arguments);if(!this.getList()){Ext.raise('validator.Exclusion requires a list')}},inclusion:!1})
;
Ext.define('Ext.data.validator.IPAddress',{extend:'Ext.data.validator.Format',alias:'data.validator.ipaddress',type:'ipaddress',message:'Is not a valid IP address',matcher:new RegExp('^('+'((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'+'|'+'((([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])))'+')$')})
;
Ext.define('Ext.data.validator.Inclusion',{extend:'Ext.data.validator.List',alias:'data.validator.inclusion',type:'inclusion',message:'Is not in the list of acceptable values',constructor:function(){this.callParent(arguments);if(!this.getList()){Ext.raise('validator.Inclusion requires a list')}},inclusion:!0})
;
Ext.define('Ext.data.validator.Length',{extend:'Ext.data.validator.Bound',alias:'data.validator.length',type:'length',minOnlyMessage:'Length must be at least {0}',maxOnlyMessage:'Length must be no more than {0}',bothMessage:'Length must be between {0} and {1}',getValue:function(v){return String(v).length}})
;
Ext.define('Ext.data.validator.Presence',{extend:'Ext.data.validator.Validator',alias:'data.validator.presence',type:'presence',isPresence:!0,config:{message:'Must be present',allowEmpty:!1},validate:function(value){var valid=!(value===undefined||value===null);if(valid&&!this.getAllowEmpty()){valid=value!==''}
return valid?!0:this.getMessage()}})
;
Ext.define('Ext.data.validator.NotNull',{extend:'Ext.data.validator.Presence',alias:'data.validator.notnull',type:'notnull',allowEmpty:!0})
;
Ext.define('Ext.data.validator.Phone',{extend:'Ext.data.validator.Format',alias:'data.validator.phone',type:'phone',message:'Is not a valid phone number',matcher:new RegExp('^ *'+'(?:'+'\\+?'+'(\\d{1,3})'+'[- .]?'+')?'+'(?:'+'(?:'+'(\\d{3})'+'|'+'\\((\\d{3})\\)'+')?'+'[- .]?'+')'+'(?:'+'([2-9]\\d{2})'+'[- .]?'+')'+'(\\d{4})'+'(?: *(?:e?xt?) *(\\d*))?'+' *$')})
;
Ext.define('Ext.data.validator.Range',{extend:'Ext.data.validator.Bound',alias:'data.validator.range',type:'range',minOnlyMessage:'Must be at least {0}',maxOnlyMessage:'Must be no more than than {0}',bothMessage:'Must be between {0} and {1}',config:{nanMessage:'Must be numeric'},validateValue:function(value){var msg=this.callParent([value]);if(msg===!0&&isNaN(value)){msg=this.getNanMessage()}
return msg}})
;
Ext.define('Ext.data.validator.Time',{extend:'Ext.data.validator.AbstractDate',alias:'data.validator.time',type:'time',isTimeValidator:!0,message:'Is not a valid time',privates:{getDefaultFormat:function(){return Ext.Date.defaultTimeFormat}}})
;
Ext.define('Ext.data.validator.Url',{extend:'Ext.data.validator.Format',alias:'data.validator.url',type:'url',message:'Is not a valid URL',matcher:/^(http:\/\/|https:\/\/|ftp:\/\/|\/\/)([-a-zA-Z0-9@:%_\+.~#?&//=])+$/})
;
Ext.define('Ext.data.virtual.Group',{isVirtualGroup:!0,firstRecords:null,id:'',summaryRecord:null,constructor:function(key){this.id=key;this.firstRecords=[]},first:function(){return this.firstRecords[0]||null},getGroupKey:function(){return this.id},getSummaryRecord:function(){return this.summaryRecord}})
;
Ext.define('Ext.data.virtual.Page',{isVirtualPage:!0,begin:0,end:0,error:null,locked:null,number:0,operation:null,pageMap:null,records:null,state:null,constructor:function(config){var me=this,pageSize;Ext.apply(me,config);pageSize=me.pageMap.store.getPageSize();me.begin=me.number*pageSize;me.end=me.begin+pageSize;me.locks={active:0,prefetch:0}},destroy:function(){var me=this,operation=me.operation;me.state='destroyed';if(operation){operation.abort()}
me.callParent()},adjustLock:function(kind,delta){var me=this,locks=me.locks,pageMap=me.pageMap,locked=null,lockedWas=me.locked;if(!(kind in locks)){Ext.raise('Bad lock type (expected "active" or "prefetch"): "'+kind+'"')}
if(delta!==1&&delta!==-1){Ext.raise('Invalid lock count delta (should be 1 or -1): '+delta)}
locks[kind]+=delta;if(locks.active){locked='active'}else if(locks.prefetch){locked='prefetch'}
if(locked!==lockedWas){me.locked=locked;if(pageMap){pageMap.onPageLockChange(me,locked,lockedWas)}}},clearRecords:function(out,by){var me=this,begin=me.begin,records=me.records,i,n;if(records){n=records.length;if(by){for(i=0;i<n;++i){delete out[records[i][by]]}}else{for(i=0;i<n;++i){delete out[begin+i]}}}},fillRecords:function(out,by,withIndex){var me=this,records=me.records,begin=me.begin,store=me.pageMap.store,i,n,record;if(records){n=records.length;if(by){for(i=0;i<n;++i){record=records[i];record.join(store);out[record[by]]=withIndex?begin+i:record}}else{for(i=0;i<n;++i){records[i].join(store);out[begin+i]=records[i]}}}},isInitial:function(){return this.state===null},isLoaded:function(){return this.state==='loaded'},isLoading:function(){return this.state==='loading'},load:function(){var me=this,operation;me.state='loading';operation=me.pageMap.store.loadVirtualPage(me,me.onLoad,me);if(me.state==='loading'){me.operation=operation}},privates:{onLoad:function(operation){var me=this;me.operation=null;if(!me.destroyed){if(!(me.error=operation.getError())){me.records=operation.getRecords();me.state='loaded'}else{me.state='error'}
me.pageMap.onPageLoad(me)}}}})
;
Ext.define('Ext.data.virtual.PageMap',{requires:['Ext.data.virtual.Page'],isVirtualPageMap:!0,config:{cacheSize:10,concurrentLoading:1,pageCount:null},generation:0,store:null,constructor:function(config){var me=this;me.prefetchSortFn=me.prefetchSortFn.bind(me);me.initConfig(config);me.clear()},destroy:function(){this.clear(!0);this.callParent()},canSatisfy:function(range){var end=this.getPageIndex(range.end),pageCount=this.getPageCount();return pageCount===null||end<pageCount},clear:function(destroy){var me=this,alive=!destroy||null,pages=me.pages,pg;++me.generation;me.byId=alive&&{};me.byInternalId=alive&&{};me.cache=alive&&[];me.indexMap=alive&&{};me.pages=alive&&{};me.loading=alive&&[];me.loadQueues=alive&&{active:[],prefetch:[]};if(pages){for(pg in pages){me.destroyPage(pages[pg])}}},getPage:function(number,autoCreate){var me=this,pageCount=me.getPageCount(),pages=me.pages,page;if(pageCount===null||number<pageCount){page=pages[number];if(!page&&autoCreate!==!1){pages[number]=page=new Ext.data.virtual.Page({pageMap:me,number:number})}}else{Ext.raise('Invalid page number '+number+' when limit is '+pageCount)}
return page||null},getPageIndex:function(index){if(index.isEntity){index=this.indexOf(index)}
return Math.floor(index/this.store.getPageSize())},getPageOf:function(index,autoCreate){var pageSize=this.store.getPageSize(),n=Math.floor(index/pageSize);return this.getPage(n,autoCreate)},getPages:function(begin,end){var pageSize=this.store.getPageSize(),first=Math.floor(begin/pageSize),last=Math.ceil(end/pageSize),ret={},n;for(n=first;n<last;++n){ret[n]=this.getPage(n)}
return ret},flushNextLoad:function(){var me=this,queueTimer=me.queueTimer;if(queueTimer){Ext.unasap(queueTimer)}
me.loadNext()},indexOf:function(record){var ret;if(record){ret=this.indexMap[record.internalId]}
return(ret||ret===0)?ret:-1},getByInternalId:function(internalId){var index=this.indexMap[internalId],page;if(index||index===0){page=this.pages[Math.floor(index/this.store.getPageSize())];if(page){return page.records[index-page.begin]}}},updatePageCount:function(pageCount,oldPageCount){var pages=this.pages,pageNumber,page;if(oldPageCount===null||pageCount<oldPageCount){for(pageNumber in pages){page=pages[pageNumber];if(page.number>=pageCount){this.clearPage(page);this.destroyPage(page)}}}},privates:{queueTimer:null,clearPage:function(page,fromCache){var me=this,A=Ext.Array,loadQueues=me.loadQueues;delete me.pages[page.number];page.clearRecords(me.byId,'id');page.clearRecords(me.byInternalId,'internalId');page.clearRecords(me.indexMap,'internalId');A.remove(loadQueues.active,page);A.remove(loadQueues.prefetch,page);if(!fromCache){Ext.Array.remove(me.cache,page)}},destroyPage:function(page){this.store.onPageDestroy(page);page.destroy()},loadNext:function(){var me=this,concurrency=me.getConcurrentLoading(),loading=me.loading,loadQueues=me.loadQueues,page;me.queueTimer=null;while(loading.length<concurrency){if(!(page=loadQueues.active.shift()||loadQueues.prefetch.shift())){break}
loading.push(page);page.load()}},onPageLoad:function(page){var me=this,store=me.store,activeRanges=store.activeRanges,n=activeRanges.length,i;Ext.Array.remove(me.loading,page);if(!page.error){page.fillRecords(me.byId,'id');page.fillRecords(me.byInternalId,'internalId');page.fillRecords(me.indexMap,'internalId',!0);store.onPageDataAcquired(page);for(i=0;i<n;++i){activeRanges[i].onPageLoad(page)}}
me.flushNextLoad()},onPageLockChange:function(page,state,oldState){var me=this,cache=me.cache,loadQueues=me.loadQueues,store=me.store,cacheSize,concurrency;if(page.isInitial()){if(oldState){Ext.Array.remove(loadQueues[oldState],page)}
if(state){loadQueues[state].push(page);concurrency=me.getConcurrentLoading();if(!me.queueTimer&&me.loading.length<concurrency){me.queueTimer=Ext.asap(me.loadNext,me)}}}
if(state){if(!oldState){Ext.Array.remove(cache,page)}}else{cache.push(page);for(cacheSize=me.getCacheSize();cache.length>cacheSize;){page=cache.shift();me.clearPage(page,!0);store.onPageEvicted(page);me.destroyPage(page)}}},prefetchSortFn:function(a,b){a=a.number;b=b.number;var M=Math,firstPage=this.sortFirstPage,lastPage=this.sortLastPage,direction=this.sortDirection,aDir=a<firstPage,bDir=b<firstPage,ret;a=aDir?M.abs(firstPage-a):M.abs(lastPage-a);b=bDir?M.abs(firstPage-b):M.abs(lastPage-b);if(a===b){ret=aDir?direction:-direction}else{ret=a-b}
return ret},prioritizePrefetch:function(direction,firstPage,lastPage){var me=this;me.sortDirection=direction;me.sortFirstPage=firstPage;me.sortLastPage=lastPage;me.loadQueues.prefetch.sort(me.prefetchSortFn)}}})
;
Ext.define('Ext.data.virtual.Range',{extend:'Ext.data.Range',isVirtualRange:!0,callback:null,prefetch:!1,scope:null,direction:1,constructor:function(config){this.adjustingPages=[];this.callParent([config])},reset:function(){var me=this;me.records={};me.activePages=me.prefetchPages=null},privates:{adjustPageLocks:function(kind,adjustment){var me=this,pages=me.adjustingPages,n=pages.length,i;if(n>1){pages.sort(me.direction<0?me.pageSortBackFn:me.pageSortFwdFn)}
for(i=0;i<n;++i){pages[i].adjustLock(kind,adjustment)}
pages.length=0},doGoto:function(){var me=this,begin=me.begin,end=me.end,prefetch=me.prefetch,records=me.records,store=me.store,pageMap=store.pageMap,limit=store.totalCount,beginWas=me.lastBegin,endWas=me.lastEnd,activePagesWas=me.activePages,prefetchPagesWas=me.prefetchPages,beginBufferZone=me.trailingBufferZone,endBufferZone=me.leadingBufferZone,adjustingPages=me.adjustingPages,activePages,page,pg,direction,prefetchBegin,prefetchEnd,prefetchPages;if(limit===0){return}
adjustingPages.length=0;if((begin>beginWas&&end<endWas)||(begin<beginWas&&end>endWas)){direction=me.direction}else{direction=(begin<beginWas)?-1:((begin>beginWas)?1:me.direction)}
if(direction<0){pg=beginBufferZone;beginBufferZone=endBufferZone;endBufferZone=pg}
me.direction=direction;me.activePages=activePages=pageMap.getPages(begin,end);if(prefetch){me.prefetchBegin=prefetchBegin=Math.max(0,begin-beginBufferZone);if(limit===null){limit=Number.MAX_VALUE}
me.prefetchEnd=prefetchEnd=Math.min(limit,end+endBufferZone);me.prefetchPages=prefetchPages=pageMap.getPages(prefetchBegin,prefetchEnd)}
for(pg in activePages){page=activePages[pg];if(prefetchPages){delete prefetchPages[pg]}
if(activePagesWas&&pg in activePagesWas){delete activePagesWas[pg]}else{page.adjustLock('active',1);page.fillRecords(records)}}
if(prefetchPages){for(pg in prefetchPages){if(prefetchPagesWas&&pg in prefetchPagesWas){delete prefetchPagesWas[pg]}else{prefetchPages[pg].adjustLock('prefetch',1)}}}
if(prefetchPagesWas){for(pg in prefetchPagesWas){adjustingPages.push(prefetchPagesWas[pg])}
if(adjustingPages.length){me.adjustPageLocks('prefetch',-1)}}
if(activePagesWas){for(pg in activePagesWas){adjustingPages.push(page=activePagesWas[pg]);page.clearRecords(records)}
if(adjustingPages.length){me.adjustPageLocks('active',-1)}}
if(prefetchPages){pageMap.prioritizePrefetch(direction,pageMap.getPageIndex(begin),pageMap.getPageIndex(end-1))}
me.lastBegin=begin;me.lastEnd=end},onPageDestroy:function(page){var n=page.number,activePages=this.activePages,prefetchPages=this.prefetchPages;if(activePages){delete activePages[n]}
if(prefetchPages){delete prefetchPages[n]}},onPageLoad:function(page){var me=this,callback=me.callback,first,last;if(me.activePages[page.number]){page.fillRecords(me.records);if(callback){first=Math.max(me.begin,page.begin);last=Math.min(me.end,page.end);Ext.callback(callback,me.scope,[me,first,last])}}},pageSortBackFn:function(page1,page2){return page2.number-page1.number},pageSortFwdFn:function(page1,page2){return page1.number-page2.number},refresh:function(){this.records=this.records||{}},reload:function(){var me=this,begin=me.begin,end=me.end;me.begin=me.end=0;me.direction=1;me.prefetchPages=me.activePages=null;me.goto(begin,end)}}})
;
Ext.define('Ext.data.virtual.Store',{extend:'Ext.data.ProxyStore',alias:'store.virtual',requires:['Ext.util.SorterCollection','Ext.util.FilterCollection','Ext.data.virtual.PageMap','Ext.data.virtual.Range'],uses:['Ext.data.virtual.Group'],isVirtualStore:!0,config:{data:null,totalCount:null,leadingBufferZone:200,trailingBufferZone:50},remoteSort:!0,remoteFilter:!0,sortOnLoad:!1,trackRemoved:!1,constructor:function(config){var me=this;me.sortByPage=me.sortByPage.bind(me);me.activeRanges=[];me.pageMap=new Ext.data.virtual.PageMap({store:me});me.callParent([config])},doDestroy:function(){this.pageMap.destroy();this.callParent()},applyGrouper:function(grouper){this.group(grouper);return this.grouper},contains:function(record){return this.indexOf(record)>-1},createActiveRange:function(config){var range=Ext.apply({leadingBufferZone:this.getLeadingBufferZone(),trailingBufferZone:this.getTrailingBufferZone(),store:this},config);return new Ext.data.virtual.Range(range)},getAt:function(index){var page=this.pageMap.getPageOf(index,!1),ret;if(page&&page.records){ret=page.records[index-page.begin]}
return ret||null},getById:function(id){return this.pageMap.byId[id]||null},getCount:function(){return this.totalCount||0},getGrouper:function(){return this.grouper},getGroups:function(){var me=this,groups=me.groupCollection;if(!groups){me.groupCollection=groups=new Ext.util.Collection()}
return groups},getSummaryRecord:function(){return this.summaryRecord||null},isGrouped:function(){return!!this.grouper},group:function(grouper,direction){var me=this;grouper=grouper||null;if(grouper){if(typeof grouper==='string'){grouper={property:grouper,direction:direction||'ASC'}}
if(!grouper.isGrouper){grouper=new Ext.util.Grouper(grouper)}
grouper.setRoot('data');me.getGroups().getSorters().splice(0,1,{property:'id',direction:grouper.getDirection()})}
me.grouper=grouper;if(!me.isConfiguring){me.reload();me.fireGroupChange(grouper)}},getByInternalId:function(internalId){return this.pageMap.getByInternalId(internalId)},indexOf:function(record){return this.pageMap.indexOf(record)},indexOfId:function(id){var rec=this.getById(id);return rec?this.indexOf(rec):-1},isLoaded:function(){return Ext.isNumber(this.totalCount)},load:function(options){if(typeof options==='function'){options={callback:options}}
var me=this,page=(options&&options.page)||1,pageSize=me.getPageSize(),operation=me.createOperation('read',Ext.apply({start:(page-1)*pageSize,limit:pageSize,page:page,filters:me.getFilters().items,sorters:me.getSorters().items,grouper:me.getGrouper()},options));if(me.fireEvent('beforeload',me,operation)!==!1){me.onBeforeLoad(operation);operation.execute()}else{operation.setCompleted()}
return operation},reload:function(options){var me=this;if(typeof options==='function'){options={callback:options}}
if(me.fireEvent('beforereload')===!1){return null}
options=Ext.apply({internalScope:me,internalCallback:me.handleReload,page:1},options);me.pageMap.clear();me.getGroups().clear();return me.load(options)},removeAll:function(){var me=this,activeRanges=me.activeRanges,i;me.pageMap.clear();for(i=activeRanges.length;i-->0;){activeRanges[i].reset()}
me.fireEvent('clear',me)},applyProxy:function(proxy){proxy=this.callParent([proxy]);if(proxy&&proxy.setEnablePaging){proxy.setEnablePaging(!0)}
return proxy},createFiltersCollection:function(){return new Ext.util.FilterCollection()},createSortersCollection:function(){return new Ext.util.SorterCollection()},onFilterEndUpdate:function(){var me=this,filters=me.getFilters(!1);if(!me.isConfiguring){me.reload();me.fireEvent('filterchange',me,filters.getRange())}},onSorterEndUpdate:function(){var me=this,sorters=me.getSorters().getRange(),fire=!me.isConfiguring;if(fire){me.fireEvent('beforesort',me,sorters)}
if(fire){me.reload();me.fireEvent('sort',me,sorters)}},updatePageSize:function(pageSize){var totalCount=this.totalCount;if(totalCount!==null){this.pageMap.setPageCount(Math.ceil(totalCount/pageSize))}},updateTotalCount:function(totalCount,oldTotalCount){var me=this,pageMap=me.pageMap;me.totalCount=totalCount;pageMap.setPageCount(Math.ceil(totalCount/me.getPageSize()));me.fireEvent('totalcountchange',me,totalCount,oldTotalCount)},add:function(){Ext.raise('Virtual stores do not support the add() method')},insert:function(){Ext.raise('Virtual stores do not support the insert() method')},filter:function(){if(!this.getRemoteFilter()){Ext.raise('Virtual stores do not support local filtering')}
this.callParent(arguments)},filterBy:function(){Ext.raise('Virtual stores do not support local filtering')},loadData:function(){Ext.raise('Virtual stores do not support the loadData() method')},applyData:function(){Ext.raise('Virtual stores do not support direct data loading')},updateRemoteFilter:function(remoteFilter,oldRemoteFilter){if(remoteFilter===!1){Ext.raise('Virtual stores are always remotely filtered.')}
this.callParent([remoteFilter,oldRemoteFilter])},updateRemoteSort:function(remoteSort,oldRemoteSort){if(remoteSort===!1){Ext.raise('Virtual stores are always remotely sorted.')}
this.callParent([remoteSort,oldRemoteSort])},updateTrackRemoved:function(value){if(value!==!1){Ext.raise('Virtual stores do not support trackRemoved.')}
this.callParent(arguments)},afterEdit:function(record,modifiedFieldNames){var me=this;me.fireEvent('update',me,record,Ext.data.Model.EDIT,modifiedFieldNames);me.fireEvent('datachanged',me)},privates:{attachSummaryData:function(resultSet){var me=this,summary=resultSet.getSummaryData(),grouper,len,i,data,rec;if(summary){me.summaryRecord=summary}
summary=resultSet.getGroupData();if(summary){grouper=me.getGrouper();if(grouper){me.groupSummaryData=data={};for(i=0,len=summary.length;i<len;++i){rec=summary[i];data[grouper.getGroupString(rec)]=rec}}}},handleReload:function(op){var me=this,activeRanges=me.activeRanges,len=activeRanges.length,pageMap=me.pageMap,resultSet=op.getResultSet(),wasSuccessful=op.wasSuccessful(),rsRecords=[],i,range;if(wasSuccessful){me.readTotalCount(resultSet);me.fireEvent('reload',me,op);for(i=0;i<len;++i){range=activeRanges[i];if(pageMap.canSatisfy(range)){range.reload()}}}
if(resultSet){rsRecords=resultSet.records}
me.fireEvent('load',me,rsRecords,wasSuccessful,op)},loadVirtualPage:function(page,callback,scope){var me=this,pageMapGeneration=me.pageMap.generation;return me.load({page:page.number+1,internalCallback:function(op){var resultSet=op.getResultSet(),rsRecords=[];if(pageMapGeneration===me.pageMap.generation){if(op.wasSuccessful()){me.readTotalCount(resultSet);me.attachSummaryData(resultSet)}
callback.call(scope||page,op);me.groupSummaryData=null;if(resultSet){rsRecords=resultSet.records}
me.fireEvent('load',me,rsRecords,op.wasSuccessful(),op)}}})},lockGroups:function(grouper,page){var groups=this.getGroups(),groupInfo=page.groupInfo={},records=page.records,len=records.length,groupSummaryData=this.groupSummaryData,pageMap=this.pageMap,n=page.number,group,i,groupKey,summaryRec,rec,firstRecords,first;for(i=0;i<len;++i){rec=records[i];groupKey=grouper.getGroupString(rec);if(!groupInfo[groupKey]){groupInfo[groupKey]=rec;group=groups.get(groupKey);if(!group){group=new Ext.data.virtual.Group(groupKey);groups.add(group)}
firstRecords=group.firstRecords;first=firstRecords[0];if(first&&n<pageMap.getPageIndex(first)){firstRecords.unshift(rec)}else{firstRecords.push(rec)}
summaryRec=groupSummaryData&&groupSummaryData[groupKey];if(summaryRec){group.summaryRecord=summaryRec}}}},onPageDataAcquired:function(page){var grouper=this.getGrouper();if(grouper){this.lockGroups(grouper,page)}},onPageDestroy:function(page){var ranges=this.activeRanges,len=ranges.length,i;for(i=0;i<len;++i){ranges[i].onPageDestroy(page)}},onPageEvicted:function(page){var grouper=this.getGrouper();if(grouper){this.releaseGroups(grouper,page)}},readTotalCount:function(resultSet){var total=resultSet.getRemoteTotal();if(!isNaN(total)){this.setTotalCount(total)}},releaseGroups:function(grouper,page){var groups=this.getGroups(),groupInfo=page.groupInfo,first,firstRecords,key,group;for(key in groupInfo){first=groupInfo[key];group=groups.get(key);firstRecords=group.firstRecords;if(firstRecords.length===1){groups.remove(group)}else if(firstRecords[0]===first){firstRecords.shift();firstRecords.sort(this.sortByPage)}else{Ext.Array.remove(firstRecords,first)}}},sortByPage:function(rec1,rec2){var map=this.pageMap;return map.getPageIndex(rec1)-map.getPageIndex(rec2)}}})
;
Ext.define('Ext.direct.Event',{alias:'direct.event',status:!0,constructor:function(config){Ext.apply(this,config)},getName:function(){return this.name},getData:function(){return this.data}})
;
Ext.define('Ext.direct.RemotingEvent',{extend:'Ext.direct.Event',alias:'direct.rpc',getTransaction:function(){var me=this;return me.transaction||Ext.direct.Manager.getTransaction(me.tid)}})
;
Ext.define('Ext.direct.ExceptionEvent',{extend:'Ext.direct.RemotingEvent',alias:'direct.exception',status:!1})
;
Ext.define('Ext.direct.JsonProvider',{extend:'Ext.direct.Provider',alias:'direct.jsonprovider',uses:['Ext.direct.ExceptionEvent','Ext.direct.Manager'],parseResponse:function(response){var text=response&&response.responseText;if(text!=null){if(Ext.isObject(text)||Ext.isArray(text)){return text}
return Ext.decode(text)}
return null},createEvents:function(response){var me=this,data=null,events=[],event,i,len;try{data=me.parseResponse(response)}catch(e){event=new Ext.direct.ExceptionEvent({parsingError:!0,data:e,xhr:response,code:Ext.direct.Manager.exceptions.PARSE,message:'Error parsing json response: \n\n '+e});return[event]}
if(Ext.isArray(data)){for(i=0,len=data.length;i<len;++i){events.push(me.createEvent(data[i]))}}else if(Ext.isObject(data)){events.push(me.createEvent(data))}
return events},createEvent:function(response){if(typeof response!=='object'||!('type' in response)){return new Ext.direct.ExceptionEvent({data:response,code:Ext.direct.Manager.exceptions.DATA,message:'Invalid data: event type is not specified'})}
return Ext.create('direct.'+response.type,response)}})
;
Ext.define('Ext.direct.PollingProvider',{extend:'Ext.direct.JsonProvider',alias:'direct.pollingprovider',requires:['Ext.Ajax','Ext.util.TaskRunner','Ext.direct.ExceptionEvent'],type:'polling',interval:3000,constructor:function(config){var me=this;me.callParent([config]);me.pollTask=Ext.TaskManager.newTask({run:me.runPoll,interval:me.interval,scope:me})},destroy:function(){this.pollTask.stop(!0);this.callParent()},doConnect:function(){var me=this,url=me.url,pollFn=me.pollFn;if(pollFn&&Ext.isString(pollFn)){var fnName=pollFn;me.pollFn=pollFn=Ext.direct.Manager.parseMethod(pollFn);if(!Ext.isFunction(pollFn)){Ext.raise("Cannot resolve Ext Direct API method "+fnName+" for PollingProvider")}}else if(Ext.isFunction(url)){Ext.log.warn('Using a function for url is deprecated, use pollFn instead.');me.pollFn=pollFn=url;me.url=url=null}
if(url||pollFn){me.setInterval(me.interval);me.pollTask.start()}},doDisconnect:function(){if(this.pollTask){this.pollTask.stop()}},getInterval:function(){return this.pollTask&&this.pollTask.interval},setInterval:function(interval){var me=this,pollTask=me.pollTask;if(interval<100){Ext.raise("Attempting to configure PollProvider "+me.id+" with interval that is less than 100ms.")}
me.interval=pollTask.interval=interval;if(me.isConnected()){pollTask.restart(interval)}},runPoll:function(){var me=this,url=me.url,pollFn=me.pollFn,baseParams=me.baseParams,args,request;if(me.fireEvent('beforepoll',me)!==!1){if(pollFn){args=pollFn.directCfg.method.getArgs({params:baseParams!==undefined?baseParams:{},callback:me.onPollFn,scope:me});pollFn.apply(window,args)}else{request={url:url,callback:me.onData,scope:me,params:baseParams,headers:me.getHeaders()};if(me.timeout!=null){request.timeout=me.timeout}
me.sendAjaxRequest(request)}
me.fireEvent('poll',me)}},onData:function(opt,success,response){var me=this,i,len,events,event;if(success){events=me.createEvents(response);for(i=0,len=events.length;i<len;++i){event=events[i];me.fireEvent('data',me,event);if(!event.status){me.fireEvent('exception',me,event)}}}else{event=new Ext.direct.ExceptionEvent({data:null,code:Ext.direct.Manager.exceptions.TRANSPORT,message:'Unable to connect to the server.',xhr:response});me.fireEvent('data',me,event);me.fireEvent('exception',me,event)}
me.callParent([opt,success,response])},onPollFn:function(result,event,success,options){this.onData(null,success,{responseText:result})},inheritableStatics:{checkConfig:function(config){return config&&config.type==='polling'&&(config.url||config.pollFn)}}})
;
Ext.define('Ext.direct.RemotingMethod',{constructor:function(config){var me=this,params=config.params,len=config.len,metadataCfg=config.metadata,metadata={},name,pLen,p,param;me.name=config.name;me.disableBatching=config.batched!=null?!config.batched:!1;if(config.formHandler){me.formHandler=config.formHandler}else if(Ext.isNumeric(len)){me.len=len;me.ordered=!0}else{me.named=!0;me.strict=config.strict!==undefined?config.strict:!0;me.params={};pLen=params&&params.length;for(p=0;p<pLen;p++){param=params[p];name=Ext.isObject(param)?param.name:param;me.params[name]=!0}}
if(metadataCfg){params=metadataCfg.params;len=metadataCfg.len;if(Ext.isNumeric(len)){if(len===0){Ext.raise('metadata.len cannot be 0 '+'for Ext Direct method '+me.name)}
metadata.ordered=!0;metadata.len=len}else if(Ext.isArray(params)){metadata.named=!0;metadata.params={};for(p=0,pLen=params.length;p<pLen;p++){param=params[p];metadata.params[param]=!0}
metadata.strict=metadataCfg.strict!==undefined?metadataCfg.strict:!0}else{Ext.raise('metadata is neither named nor ordered '+'for Ext Direct method '+me.name)}
me.metadata=metadata}},getArgs:function(config){var me=this,params=config.params,paramOrder=config.paramOrder,metadata=config.metadata,options=config.options,args=[],flatten,i,len;if(me.ordered){if(me.len>0){if(paramOrder){flatten=config.paramsAsArray&&me.len===1&&(paramOrder.length>1||Ext.isArray(params));if(flatten){if(Ext.isArray(params)){for(i=0,len=params.length;i<len;i++){args.push(me.convertParams(params[i],paramOrder,paramOrder.length,!0))}}else{args=me.convertParams(params,paramOrder,paramOrder.length,!0)}
if(!params.allowSingle||args.length>1){args=[args]}}else{args=me.convertParams(params,paramOrder,me.len,!1)}}else{args.push(params)}}}else{args.push(params)}
args.push(config.callback,config.scope||window);if(options||metadata){options=Ext.apply({},options);if(metadata){options.metadata=metadata}
args.push(options)}
return args},convertParams:function(params,paramOrder,count,flatten){var ret=[],paramName,i,len;for(i=0,len=count;i<len;i++){paramName=paramOrder[i];ret.push(params[paramName])}
if(flatten){return ret.length===0?undefined:ret.length===1?ret[0]:ret}else{return ret}},getCallData:function(args){var me=this,data=null,len=me.len,params=me.params,strict=me.strict,form,callback,scope,name,options,metadata;if(me.ordered){callback=args[len];scope=args[len+1];options=args[len+2];if(len!==0){data=args.slice(0,len)}}else if(me.formHandler){form=args[0];callback=args[1];scope=args[2];options=args[3]}else{data=Ext.apply({},args[0]);callback=args[1];scope=args[2];options=args[3];if(strict){for(name in data){if(data.hasOwnProperty(name)&&!params[name]){delete data[name]}}}}
if(me.metadata&&options&&options.metadata){if(me.metadata.ordered){if(!Ext.isArray(options.metadata)){Ext.raise('options.metadata is not an Array '+'for Ext Direct method '+me.name)}else if(options.metadata.length<me.metadata.len){Ext.raise('Not enough parameters in options.metadata '+'for Ext Direct method '+me.name)}
metadata=options.metadata.slice(0,me.metadata.len)}else{if(!Ext.isObject(options.metadata)){Ext.raise('options.metadata is not an Object '+'for Ext Direct method '+me.name)}
metadata=Ext.apply({},options.metadata);if(me.metadata.strict){for(name in metadata){if(metadata.hasOwnProperty(name)&&!me.metadata.params[name]){delete metadata[name]}}}
for(name in me.metadata.params){if(!metadata.hasOwnProperty(name)){Ext.raise('Named parameter '+name+' is missing '+'in options.metadata for Ext Direct method '+me.name)}}}
delete options.metadata}
return{form:form,data:data,metadata:metadata,callback:callback,scope:scope,options:options}}})
;
Ext.define('Ext.direct.Transaction',{alias:'direct.transaction',statics:{TRANSACTION_ID:0},constructor:function(config){var me=this;Ext.apply(me,config);me.id=me.tid=++me.self.TRANSACTION_ID;me.retryCount=0},send:function(){var me=this;me.provider.queueTransaction(me)},retry:function(){var me=this;me.retryCount++;me.send()},getProvider:function(){return this.provider}})
;
Ext.define('Ext.direct.RemotingProvider',{extend:'Ext.direct.JsonProvider',alias:'direct.remotingprovider',requires:['Ext.util.MixedCollection','Ext.util.DelayedTask','Ext.direct.Transaction','Ext.direct.RemotingMethod','Ext.direct.Manager'],type:'remoting',enableBuffer:10,bufferLimit:Number.MAX_VALUE,maxRetries:1,constructor:function(config){var me=this;me.callParent([config]);me.namespace=(Ext.isString(me.namespace)?Ext.ns(me.namespace):me.namespace)||Ext.global;me.callBuffer=[]},destroy:function(){if(this.callTask){this.callTask.cancel()}
this.callParent()},connect:function(){var me=this;if(!me.url){Ext.raise('Error initializing RemotingProvider "'+me.id+'", no url configured.')}
me.callParent()},doConnect:function(){if(!this.apiCreated){this.initAPI();this.apiCreated=!0}},getNamespace:function(root,action){var parts,ns,i,len;root=root||Ext.global;parts=action.toString().split('.');for(i=0,len=parts.length;i<len;i++){ns=parts[i];root=root[ns];if(typeof root==='undefined'){return root}}
return root},createNamespaces:function(root,action){var parts,ns,i,len;root=root||Ext.global;parts=action.toString().split('.');for(i=0,len=parts.length;i<len;i++){ns=parts[i];root[ns]=root[ns]||{};root=root[ns]}
return root},initAPI:function(){var me=this,actions=me.actions,namespace=me.namespace,Manager=Ext.direct.Manager,action,cls,methods,i,len,method,handler;for(action in actions){if(actions.hasOwnProperty(action)){if(me.disableNestedActions){cls=namespace[action];if(!cls){cls=namespace[action]={}}}else{cls=me.getNamespace(namespace,action);if(!cls){cls=me.createNamespaces(namespace,action)}}
methods=actions[action];for(i=0,len=methods.length;i<len;++i){method=new Ext.direct.RemotingMethod(methods[i]);cls[method.name]=handler=me.createHandler(action,method);Manager.registerMethod(handler.$name,handler)}}}},createHandler:function(action,method){var me=this,handler;handler=function(){me.invokeFunction(action,method,Array.prototype.slice.call(arguments,0))};handler.name=handler.$name=action+'.'+method.name;handler.$directFn=!0;handler.directCfg=handler.$directCfg={action:action,method:method};return handler},invokeFunction:function(action,method,args){var me=this,transaction,form,isUpload,postParams;transaction=me.configureTransaction(action,method,args);if(me.fireEvent('beforecall',me,transaction,method)!==!1){Ext.direct.Manager.addTransaction(transaction);if(transaction.isForm){form=transaction.form;isUpload=String(form.getAttribute("enctype")).toLowerCase()==='multipart/form-data';postParams={extTID:transaction.id,extAction:action,extMethod:method.name,extType:'rpc',extUpload:String(isUpload)};if(transaction.metadata){postParams.extMetadata=Ext.JSON.encode(transaction.metadata)}
Ext.apply(transaction,{form:form,isUpload:isUpload,params:postParams})}
me.queueTransaction(transaction);me.fireEvent('call',me,transaction,method)}},configureTransaction:function(action,method,args,isForm){var data,cb,scope,options,params;data=method.getCallData(args);cb=data.callback;scope=data.scope;options=data.options;if(cb&&!Ext.isFunction(cb)){Ext.raise("Callback argument is not a function "+"for Ext Direct method "+action+"."+method.name)}
cb=cb&&scope?cb.bind(scope):cb;params=Ext.apply({},{provider:this,args:args,action:action,method:method.name,form:data.form,data:data.data,metadata:data.metadata,callbackOptions:options,callback:cb,isForm:!!method.formHandler,disableBatching:method.disableBatching});if(options&&options.timeout!=null){params.timeout=options.timeout}
return new Ext.direct.Transaction(params)},queueTransaction:function(transaction){var me=this,callBuffer=me.callBuffer,enableBuffer=me.enableBuffer;if(transaction.isForm||enableBuffer===!1||transaction.disableBatching||transaction.timeout!=null){me.sendTransaction(transaction);return}
callBuffer.push(transaction);if(enableBuffer&&callBuffer.length<me.bufferLimit){if(!me.callTask){me.callTask=new Ext.util.DelayedTask(me.combineAndSend,me)}
me.callTask.delay(Ext.isNumber(enableBuffer)?enableBuffer:10)}else{me.combineAndSend()}},combineAndSend:function(){var me=this,buffer=me.callBuffer,len=buffer.length;if(len>0){me.sendTransaction(len===1?buffer[0]:buffer);me.callBuffer=[]}},sendTransaction:function(transaction){var me=this,request,callData,params,enableUrlEncode=me.enableUrlEncode,payload,i,len;request={url:me.url,callback:me.onData,scope:me,transaction:transaction,headers:me.getHeaders()};if(transaction.timeout!=null){request.timeout=transaction.timeout}else if(me.timeout!=null){request.timeout=me.timeout}
if(transaction.isForm){Ext.apply(request,{params:transaction.params,form:transaction.form,isUpload:transaction.isUpload})}else{if(Ext.isArray(transaction)){callData=[];for(i=0,len=transaction.length;i<len;++i){payload=me.getPayload(transaction[i]);callData.push(payload)}}else{callData=me.getPayload(transaction)}
if(enableUrlEncode){params={};params[Ext.isString(enableUrlEncode)?enableUrlEncode:'data']=Ext.encode(callData);request.params=params}else{request.jsonData=callData}}
return me.sendAjaxRequest(request)},getPayload:function(transaction){var result={action:transaction.action,method:transaction.method,data:transaction.data,type:'rpc',tid:transaction.id};if(transaction.metadata){result.metadata=transaction.metadata}
return result},onData:function(options,success,response){var me=this,i,len,events,event,transaction,transactions;if(me.destroying||me.destroyed){return}
events=success&&me.createEvents(response);success=events&&events.length&&!events[0].parsingError;if(success){for(i=0,len=events.length;i<len;++i){event=events[i];me.fireEvent('data',me,event);transaction=me.getTransaction(event);if(transaction){if(me.fireEvent('beforecallback',me,event,transaction)!==!1){me.runCallback(transaction,event,!0)}
Ext.direct.Manager.removeTransaction(transaction)}}}else{transactions=[].concat(options.transaction);event=events[0]||new Ext.direct.ExceptionEvent({data:null,transaction:transaction,code:Ext.direct.Manager.exceptions.TRANSPORT,message:'Unable to connect to the server.',xhr:response});for(i=0,len=transactions.length;i<len;++i){transaction=me.getTransaction(transactions[i]);if(transaction&&transaction.retryCount<me.maxRetries){transaction.retry()}else{me.fireEvent('data',me,event);me.fireEvent('exception',me,event);if(transaction&&me.fireEvent('beforecallback',me,event,transaction)!==!1){me.runCallback(transaction,event,!1)}
Ext.direct.Manager.removeTransaction(transaction)}}}
me.callParent([options,success,response])},getTransaction:function(options){return options&&options.tid?Ext.direct.Manager.getTransaction(options.tid):null},runCallback:function(transaction,event){var success=!!event.status,funcName=success?'success':'failure',callback,options,result;if(transaction&&transaction.callback){callback=transaction.callback;options=transaction.callbackOptions;result=typeof event.result!=='undefined'?event.result:event.data;if(Ext.isFunction(callback)){callback(result,event,success,options)}else{Ext.callback(callback[funcName],callback.scope,[result,event,success,options]);Ext.callback(callback.callback,callback.scope,[result,event,success,options])}}},inheritableStatics:{checkConfig:function(config){return config&&config.type==='remoting'&&config.url&&Ext.isArray(config.actions)}}})
;
Ext.define('Ext.dom.GarbageCollector',{singleton:!0,interval:30000,constructor:function(){var me=this;me.lastTime=Ext.now();me.onTick=me.onTick.bind(me);me.onTick.$skipTimerCheck=!0;me.resume()},collect:function(){var me=this,cache=Ext.cache,eid,dom,el,t,isGarbage,tagName;var collectedIds=[];for(eid in cache){if(!cache.hasOwnProperty(eid)){continue}
el=cache[eid];if(el.skipGarbageCollection){continue}
dom=el.dom;if(!dom){Ext.raise('Missing DOM node in element garbage collection: '+eid)}
try{isGarbage=Ext.isGarbage(dom)}catch(e){delete cache[eid];collectedIds.push('#'+el.id);continue}
if(isGarbage){isGarbage=!1;if(el&&el.dom){tagName=el.dom.tagName;el.collect();collectedIds.push((tagName?tagName:'')+'#'+el.id)}}}
if(Ext.isIE9m){t={};for(eid in cache){if(cache.hasOwnProperty(eid)){t[eid]=cache[eid]}}
Ext.cache=Ext.dom.Element.cache=t}
me.lastTime=Ext.now();return collectedIds},onTick:function(){this.timerId=null;if(Ext.enableGarbageCollector){this.collect()}
this.resume()},pause:function(){var timerId=this.timerId;if(timerId){this.timerId=null;Ext.undefer(timerId)}},resume:function(){var me=this,lastTime=me.lastTime;if(Ext.enableGarbageCollector&&(Ext.now()-lastTime)>me.interval){me.collect()}
if(!me.timerId){me.timerId=Ext.defer(me.onTick,me.interval)}}})
;
Ext.define('Ext.dom.TouchAction',{singleton:!0,requires:['Ext.dom.Element','Ext.util.Point'],lastTouchStartTime:0,minMoveDistance:8,spaceRe:/\s+/,preventSingle:null,preventMulti:null,disabledOverflowDom:null,panXCls:Ext.baseCSSPrefix+'touch-action-pan-x',panYCls:Ext.baseCSSPrefix+'touch-action-pan-y',cssValues:['none','pan-x','pan-y','pan-x pan-y','pinch-zoom','pan-x pinch-zoom','pan-y pinch-zoom','pan-x pan-y pinch-zoom','double-tap-zoom','pan-x double-tap-zoom','pan-y double-tap-zoom','pan-x pan-y double-tap-zoom','pinch-zoom double-tap-zoom','pan-x pinch-zoom double-tap-zoom','pan-y pinch-zoom double-tap-zoom',''],objectValues:[{panX:!1,panY:!1,pinchZoom:!1,doubleTapZoom:!1},{panX:!0,panY:!1,pinchZoom:!1,doubleTapZoom:!1},{panX:!1,panY:!0,pinchZoom:!1,doubleTapZoom:!1},{panX:!0,panY:!0,pinchZoom:!1,doubleTapZoom:!1},{panX:!1,panY:!1,pinchZoom:!0,doubleTapZoom:!1},{panX:!0,panY:!1,pinchZoom:!0,doubleTapZoom:!1},{panX:!1,panY:!0,pinchZoom:!0,doubleTapZoom:!1},{panX:!0,panY:!0,pinchZoom:!0,doubleTapZoom:!1},{panX:!1,panY:!1,pinchZoom:!1,doubleTapZoom:!0},{panX:!0,panY:!1,pinchZoom:!1,doubleTapZoom:!0},{panX:!1,panY:!0,pinchZoom:!1,doubleTapZoom:!0},{panX:!0,panY:!0,pinchZoom:!1,doubleTapZoom:!0},{panX:!1,panY:!1,pinchZoom:!0,doubleTapZoom:!0},{panX:!0,panY:!1,pinchZoom:!0,doubleTapZoom:!0},{panX:!1,panY:!0,pinchZoom:!0,doubleTapZoom:!0},{panX:!0,panY:!0,pinchZoom:!0,doubleTapZoom:!0}],attributeName:'data-extTouchAction',constructor:function(){var me=this,supports=Ext.supports;if(supports.TouchAction){me.cssProp='touch-action'}else if(supports.MSPointerEvents){me.cssProp='-ms-touch-action'}
if(supports.TouchEvents){Ext.getWin().on({touchstart:'onTouchStart',touchmove:'onTouchMove',touchend:'onTouchEnd',scope:me,delegated:!1,translate:!1,capture:!0,priority:5000});Ext.on({scroll:'onScroll',scope:me,destroyable:!0})}
if(Ext.isFunction(Object.freeze)){var objectValues=me.objectValues,i,ln;for(i=0,ln=objectValues.length;i<ln;i++){Object.freeze(objectValues[i])}}},containsTargets:function(dom,e){var contains=!0,event=e.browserEvent,touches=e.type==='touchend'?event.changedTouches:event.touches,i,ln;for(i=0,ln=touches.length;i<ln;i++){if(!dom.contains(touches[i].target)){contains=!1;break}}
return contains},disableOverflow:function(dom,vertical){var me=this,overflowName=vertical?'overflow-y':'overflow-x',overflowStyle,cls;if(!me.disabledOverflowDom&&!Ext.isiOS&&!Ext.scrollbar.width()){me.disabledOverflowDom=dom;cls=vertical?me.panXCls:me.panYCls;while(dom){overflowStyle=Ext.fly(dom).getStyle(overflowName);if(overflowStyle==='auto'||overflowStyle==='scroll'){Ext.fly(dom).addCls(cls)}
dom=dom.parentNode}}},get:function(dom){var flags=dom.getAttribute(this.attributeName),ret=null;if(flags!=null){ret=this.objectValues[flags]}
return ret},getFlags:function(touchAction){var flags;if(typeof touchAction==='number'){flags=touchAction}else{flags=0;if(touchAction.panX!==!1){flags|=1}
if(touchAction.panY!==!1){flags|=2}
if(touchAction.pinchZoom!==!1){flags|=4}
if(touchAction.doubleTapZoom!==!1){flags|=8}}
return flags},isScrollable:function(el,vertical,forward){var overflowStyle=Ext.fly(el).getStyle(vertical?'overflow-y':'overflow-x'),isScrollable=(overflowStyle==='auto'||overflowStyle==='scroll');if(isScrollable){if(vertical){isScrollable=forward?(el.scrollTop+el.clientHeight)<el.scrollHeight:el.scrollTop>0}else{isScrollable=forward?(el.scrollLeft+el.clientWidth)<el.scrollWidth:el.scrollLeft>0}}
return isScrollable},lookupFlags:function(dom){return parseInt((dom.getAttribute&&dom.getAttribute(this.attributeName))||15,10)},onScroll:function(){this.scrollOccurred=!0;this.isDoubleTap=!1},onTouchEnd:function(e){var me=this,dom=e.target,touchCount,flags,doubleTapZoom;touchCount=e.browserEvent.touches.length;if(touchCount===0){if(me.isDoubleTap){while(dom){flags=me.lookupFlags(dom);if(flags!=null){doubleTapZoom=flags&8;if(!doubleTapZoom){e.preventDefault()}}
dom=dom.parentNode}}
me.isDoubleTap=!1;me.preventSingle=null;me.preventMulti=null;me.resetOverflow()}},onTouchMove:function(e){var me=this,prevent=null,dom=e.target,flags,touchCount,panX,panY,point,startPoint,isVertical,scale,distance,deltaX,deltaY,preventSingle,preventMulti;preventSingle=me.preventSingle;preventMulti=me.preventMulti;touchCount=e.browserEvent.touches.length;if((touchCount===1&&(preventSingle===!1))||(preventMulti===!1)){return}
if((touchCount>1&&(preventMulti===!0))||(touchCount===1&&(preventSingle===!0))){prevent=!0}else{if(touchCount===1){point=e.getPoint();startPoint=me.startPoint;scale=Ext.Element.getViewportScale();distance=point.getDistanceTo(me.startPoint)*scale;deltaX=point.x-startPoint.x;deltaY=point.y-startPoint.y;isVertical=Math.abs(deltaY)>=Math.abs(deltaX)}
while(dom&&(dom.nodeType===1)){flags=me.lookupFlags(dom);if(flags&0){prevent=!0}else if(touchCount===1){panX=!!(flags&1);panY=!!(flags&2);if(panX&&panY){prevent=!1}else if(!panX&&!panY){prevent=!0}else if(distance>=me.minMoveDistance){prevent=!!((panX&&isVertical)||(panY&&!isVertical))}
if(!prevent&&me.isScrollable(dom,isVertical,(isVertical?deltaY:deltaX)<0)){break}}else if(me.containsTargets(dom,e)){prevent=!(flags&4)}else{prevent=!1}
if(prevent){break}
dom=dom.parentNode}}
if(touchCount===1){me.preventSingle=prevent}else if(touchCount>1){me.preventMulti=prevent}
if(prevent){e.preventDefault()}},onTouchStart:function(e){var me=this,time,flags,dom,panX,panY;if(e.browserEvent.touches.length===1){time=e.time;if(!me.scrollOccurred&&((time-me.lastTouchStartTime)<=500)){me.isDoubleTap=!0}
me.lastTouchStartTime=time;me.scrollOccurred=!1;me.startPoint=e.getPoint();dom=e.target;while(dom){flags=me.lookupFlags(dom);if(flags!=null){panX=!!(flags&1);panY=!!(flags&2);if(panX!==panY){me.disableOverflow(dom,panX);break}}
dom=dom.parentNode}}else{me.isDoubleTap=!1}},resetOverflow:function(){var me=this,dom=me.disabledOverflowDom;while(dom){Ext.fly(dom).removeCls([me.panXCls,me.panYCls]);dom=dom.parentNode}
me.disabledOverflowDom=null},set:function(dom,value){var me=this,cssProp=me.cssProp,flags=me.getFlags(value),supportedFlags=(flags&Ext.supports.TouchAction),attributeName=me.attributeName;if(cssProp){Ext.fly(dom).setStyle(cssProp,me.cssValues[supportedFlags])}
if(flags===15){dom.removeAttribute(attributeName)}else{dom.setAttribute(attributeName,flags)}}})
;
Ext.define('Ext.drag.Constraint',{alias:'drag.constraint.base',mixins:['Ext.mixin.Factoryable'],factoryConfig:{defaultType:'base',type:'drag.constraint'},config:{element:null,horizontal:null,region:null,snap:null,source:null,vertical:null,x:null,y:null},constructor:function(config){this.initConfig(config)},applyElement:function(element){if(element&&typeof element!=='boolean'){element=Ext.get(element)}
return element||null},applySnap:function(snap){if(typeof snap==='number'){snap={x:snap,y:snap}}
return snap},constrain:function(xy,info){var me=this,x=xy[0],y=xy[1],constrainInfo=me.constrainInfo,initial=constrainInfo.initial,constrainX=constrainInfo.x,constrainY=constrainInfo.y,snap=constrainInfo.snap,min,max;if(!constrainInfo.vertical){if(snap&&snap.x){if(snap.xFn){x=snap.x.call(me,info,x)}else{x=me.doSnap(x,initial.x,snap.x)}}
if(constrainX){min=constrainX[0];max=constrainX[1];if(min!==null&&x<min){x=min}
if(max!==null&&x>max){x=max}}}else{x=initial.x}
if(!constrainInfo.horizontal){if(snap&&snap.y){if(snap.yFn){y=snap.y.call(me,info,y)}else{y=me.doSnap(y,initial.y,snap.y)}}
if(constrainY){min=constrainY[0];max=constrainY[1];if(min!==null&&y<min){y=min}
if(max!==null&&y>max){y=max}}}else{y=initial.y}
return[x,y]},destroy:function(){this.setSource(null);this.setElement(null);this.callParent()},privates:{constrainValue:function(a,b,resolver){var val=null,aNull=a===null,bNull=b===null;if(!(aNull&&bNull)){if(aNull){val=b}else if(bNull){val=a}else{val=resolver(a,b)}}
return val},doSnap:function(position,initial,snap){if(!snap){return position}
var ratio=(position-initial)/snap,floor=Math.floor(ratio);if(ratio-floor<=0.5){ratio=floor}else{ratio=floor+1}
return initial+(snap*ratio)},onDragStart:function(info){var me=this,snap=me.getSnap(),vertical=!!me.getVertical(),horizontal=!!me.getHorizontal(),element=me.getElement(),region=me.getRegion(),proxy=info.proxy,proxyEl=proxy.element,x=me.getX(),y=me.getY(),minX=null,maxX=null,minY=null,maxY=null,rminX=null,rmaxX=null,rminY=null,rmaxY=null,pos,size;if(element){if(typeof element==='boolean'){element=me.getSource().getElement().parent()}
if(info.local){pos=element.getStyle('position');if(pos==='relative'||pos==='absolute'){size=element.getSize();region=new Ext.util.Region(0,size.width,size.height,0)}else{region=element.getRegion(!0,!0)}}else{region=element.getRegion(!0)}}
if(region){if(!vertical){rminX=region.left;rmaxX=region.right-(proxyEl?proxy.width:0)}
if(!horizontal){rminY=region.top;rmaxY=region.bottom-(proxyEl?proxy.height:0)}}
if(!vertical&&(region||x)){if(x){minX=x[0];maxX=x[1]}
if(minX!==null||maxX!==null||rminX!==null||rmaxX!==null){minX=me.constrainValue(minX,rminX,Math.max);maxX=me.constrainValue(maxX,rmaxX,Math.min);x=[minX,maxX]}}
if(!horizontal&&(region||y)){if(y){minY=y[0];maxY=y[1]}
if(minY!==null||maxY!==null||rminY!==null||rmaxY!==null){minY=me.constrainValue(minY,rminY,Math.max);maxY=me.constrainValue(maxY,rmaxY,Math.min);y=[minY,maxY]}}
if(snap){snap={x:snap.x,xFn:typeof snap.x==='function',y:snap.y,yFn:typeof snap.y==='function'}}
me.constrainInfo={initial:info.element.initial,vertical:vertical,horizontal:horizontal,x:x,y:y,snap:snap}}}})
;
Ext.define('Ext.drag.Info',{requires:['Ext.Promise'],constructor:function(source,e){if(!source){return}
var me=this,local=source.getLocal(),el,proxyEl,proxy,x,xy,y,pageXY,elPageXY;me.source=source;me.local=local;xy=me.getEventXY(e);pageXY=e.getXY();el=source.getElement();elPageXY=el.getXY();xy=local?el.getLocalXY():elPageXY;x=xy[0];y=xy[1];me.initialEvent=e;me.eventTarget=e.target;me.cursor={current:{x:x,y:y},delta:{x:0,y:0},initial:{x:pageXY[0],y:pageXY[1]},offset:{x:pageXY[0]-elPageXY[0],y:pageXY[1]-elPageXY[1]}};me.element={current:{x:x,y:y},delta:{x:0,y:0},initial:{x:x,y:y}};me.proxy={instance:source.getProxy(),current:{x:x,y:y},delta:{x:0,y:0},initial:{x:x,y:y},element:el,isUnderCursor:!1,isElement:!0};me.types=[];me.data={};source.describe(me);proxy=me.proxy;proxyEl=proxy.instance.setupElement(me);proxy.isElement=proxyEl===source.getElement();proxy.element=proxyEl;if(proxyEl){proxy.width=proxyEl.getWidth();proxy.height=proxyEl.getHeight()}
if(proxy.isElement){el=me.element;el.current=proxy.current;el.delta=proxy.delta}
me.needsCursorCheck=proxy.element&&source.manager&&source.manager.pointerBug},cursor:null,element:null,eventTarget:null,files:null,isNative:!1,proxy:null,source:null,target:null,types:null,valid:!1,clearData:function(type){Ext.Array.remove(this.types,type);delete this.data[type]},clone:function(){var me=this,ret=new Ext.drag.Info();ret.cursor=Ext.merge({},me.cursor);ret.data=Ext.apply({},me.data);ret.element=Ext.merge({},me.element);ret.eventTarget=me.eventTarget;ret.proxy=Ext.merge({},me.proxy);ret.source=me.source;ret.target=me.target;ret.types=Ext.Array.clone(me.types);ret.valid=me.valid;return ret},getData:function(type){var me=this,data=me.data,dt=me.dataTransfer,ret;if(dt){ret=dt.getData(type)}else{if(!me.finalized){Ext.raise('Unable to call getData until the drop is complete')}
ret=data[type];if(typeof ret==='function'){data[type]=ret=ret.call(me.source,me)}
if(!ret&&ret!==0){ret=''}}
return Ext.Promise.resolve(ret)},setData:function(type,value){Ext.Array.include(this.types,type);this.data[type]=value},destroy:function(){var me=this;me.eventTarget=me.data=me.proxy=me.targetMap=me.targetMap=me.types=me.elementMap=me.possibleTargets=me.target=null;me.callParent()},privates:{data:null,dataTransfer:null,elementMap:null,possibleTargets:null,targetMap:null,copyNativeData:function(target,e){var dt=e.browserEvent.dataTransfer;this.target=target;this.dataTransfer=dt;this.files=dt.files},finalize:function(){var me=this,target=me.target;me.finalized=!0;if(target){target.info=null;target.handleDrop(me)}},getAlignXY:function(x,y){var me=this,source=me.source,cursorOffset=me.cursor.offset,proxy=source.getProxy(),proxyEl=me.proxy.element,constrain=source.getConstrain(),xy=[x,y];if(proxyEl){if(me.proxy.isElement){xy[0]-=cursorOffset.x;xy[1]-=cursorOffset.y}else{xy=proxy.adjustCursorOffset(me,xy)}
if(constrain){xy=constrain.constrain(xy,me)}}
return xy},getEventXY:function(e){var xy=e.getXY(),source=this.source;if(this.local){xy=source.convertToLocalXY(xy)}
return xy},onNativeDragEnter:function(target,e){var me=this;me.valid=target.accepts(me);target.info=me;me.copyNativeData(target,e)},onNativeDragLeave:function(target,e){var me=this;if(me.target===target){target.info=null;me.valid=!1;me.target=me.dataTransfer=me.files=null}},onNativeDragMove:function(target,e){this.copyNativeData(target,e)},onNativeDrop:function(target,e){this.copyNativeData(target,e);target.info=null},setActive:function(target){var me=this,source=me.source,current=me.target,changed=current!==target;if(current&&changed){current.handleDragLeave(me);current.info=null}
me.target=target;if(target){if(changed){me.valid=!!me.possibleTargets[target.getId()]&&target.accepts(me)!==!1;target.handleDragEnter(me);target.info=me}
target.handleDragMove(me)}else{me.valid=!1}
if(changed){source.getProxy().update(me)}},update:function(event,beforeStart){var me=this,xy=me.getEventXY(event),x=xy[0],y=xy[1],alignXY=me.getAlignXY(x,y),alignX=alignXY[0],alignY=alignXY[1],proxyData=me.proxy,cursor=me.cursor,current=cursor.current,delta=cursor.delta,initial=cursor.initial,proxy=proxyData.instance;current.x=x;current.y=y;delta.x=x-initial.x;delta.y=y-initial.y;current=proxyData.current;delta=proxyData.delta;initial=proxyData.initial;current.x=alignX;current.y=alignY;delta.x=alignX-initial.x;delta.y=alignY-initial.y;if(me.needsCursorCheck){proxyData.isUnderCursor=!(x<alignX||y<alignY||x>proxyData.width+alignX||y>proxyData.height+alignY)}
if(!beforeStart&&proxy){proxy.setXY(me,alignXY)}}}})
;
Ext.define('Ext.drag.Item',{mixins:['Ext.mixin.Observable','Ext.mixin.Identifiable'],config:{autoDestroy:!0,component:null,element:null,groups:null},constructor:function(config){this.mixins.observable.constructor.call(this,config)},isDisabled:function(){return this.disabled},disable:function(){this.disabled=!0},enable:function(){this.disabled=!1},updateComponent:function(comp,was){var el;if(comp){el=comp.el}else if(was&&was.el===this.getElement()){el=null}else{return}
this.setElement(el)},applyElement:function(element){return element?Ext.get(element):null},updateElement:function(){this.setupListeners()},applyGroups:function(group){if(typeof group==='string'){group=[group]}
return group},destroy:function(){var me=this,el=me.getElement();me.destroying=!0;me.setElement(null);if(el&&me.getAutoDestroy()){el.destroy()}
me.callParent()},privates:{disabled:!1,convertToLocalXY:function(xy){var c=this.getComponent();if(c){xy=c.convertToLocalXY(xy)}else{xy=this.getElement().translateXY(xy[0],xy[1]);xy=[xy.x,xy.y]}
return xy},getElListeners:Ext.privateFn,setupListeners:function(element){var me=this,elListeners=me.elListeners;element=element||me.getElement();if(elListeners){elListeners.destroy();me.elListeners=null}
if(element){me.elListeners=element.on(Ext.apply({scope:me,destroyable:!0},me.getElListeners()))}}}})
;
Ext.define('Ext.drag.Manager',{singleton:!0,uses:['Ext.mixin.Inheritable'],dragCls:Ext.baseCSSPrefix+'drag-body',pointerBug:Ext.isTouch||(!Ext.supports.CSSPointerEvents||Ext.isIE10m||Ext.isOpera),constructor:function(){this.targets={};this.nativeTargets=[];Ext.onReady(this.init,this)},init:function(){Ext.getDoc().on({scope:this,dragenter:{capture:!0,fn:'onNativeDragEnter'},dragleave:'onNativeDragLeave',dragover:'onNativeDragOver',drop:'onNativeDrop'})},destroy:function(){var me=this,targets=me.targets,key;me.destroying=!0;for(key in targets){targets[key].destroy()}
me.targets=null;me.callParent()},privates:{elementFromPoint:function(x,y){if(Ext.rootInheritedState.rtl){x=Ext.Element.getViewportWidth()-x}
return Ext.dom.Element.fromPagePoint(x,y,!0)},getAtPoint:function(info){var current=info.cursor.current,elementMap=info.elementMap,isUnderCursor=info.proxy.isUnderCursor,proxyEl=this.pointerBug&&isUnderCursor?info.proxy.element.dom:null,target,el;if(proxyEl){proxyEl.style.visibility='hidden'}
el=this.elementFromPoint(current.x,current.y);if(proxyEl){proxyEl.style.visibility='visible'}
while(el){target=elementMap[el.id];if(target){return target}
el=el.parentNode}
return null},getNativeDragInfo:function(e){var info=this.nativeDragInfo;if(!info){this.nativeDragInfo=info=new Ext.drag.Info();info.isNative=!0}
return info},onDragCancel:function(){Ext.getBody().removeCls(this.dragCls)},onDragEnd:function(info,e){info.finalize();Ext.getBody().removeCls(this.dragCls)},onDragMove:function(info,e){this.processDrag(info)},onDragStart:function(info,e){var me=this,source=info.source,targets=me.targets,groups=source.getGroups(),targetMap={},possibleTargets={},elementMap={},id,target,targetGroups,groupMap,groupOk,len,i;elementMap={};possibleTargets={};if(groups){groupMap=Ext.Array.toMap(groups)}
for(id in targets){target=targets[id];if(!target.isDisabled()){groupOk=!1;targetGroups=target.getGroups();if(!groupMap&&!targetGroups){groupOk=!0}else if(groupMap&&targetGroups){for(i=0,len=targetGroups.length;i<len;++i){if(groupMap[targetGroups[i]]){groupOk=!0;break}}}
if(groupOk){possibleTargets[id]=target}}
targetMap[id]=target;elementMap[target.getElement().id]=target}
info.possibleTargets=possibleTargets;info.targetMap=targetMap;info.elementMap=elementMap;Ext.getBody().addCls(me.dragCls);me.processDrag(info)},onNativeDragEnter:function(e){var nativeTargets=this.nativeTargets,target=e.target;e.preventDefault();if(nativeTargets[nativeTargets.length-1]!==target){nativeTargets.push(target)}},onNativeDragLeave:function(e){var nativeTargets=this.nativeTargets;Ext.Array.remove(nativeTargets,e.target);if(nativeTargets.length===0){this.nativeDragInfo=null}},onNativeDragOver:function(e){e.preventDefault()},onNativeDrop:function(e){e.preventDefault();this.nativeTargets.length=0;this.nativeDragInfo=null},processDrag:function(info){info.setActive(this.getAtPoint(info))},register:function(target){this.targets[target.getId()]=target},unregister:function(target){var id;if(this.destroying){return}
id=target.getId();this.targets[id]=null;delete this.targets[id]}}})
;
Ext.define('Ext.drag.Source',{extend:'Ext.drag.Item',defaultIdPrefix:'source-',requires:['Ext.GlobalEvents','Ext.drag.Constraint'],config:{activateOnLongPress:!1,activeCls:null,constrain:null,handle:null,local:null,proxy:'original',revert:!1},dragging:!1,constructor:function(config){var describe=config&&config.describe;if(describe){this.describe=describe;config=Ext.apply({},config);delete config.describe}
this.callParent([config]);this.manager=Ext.drag.Manager},describe:Ext.emptyFn,isDragging:function(){return this.dragging},beforeDragStart:Ext.emptyFn,onDragCancel:Ext.emptyFn,onDragEnd:Ext.emptyFn,onDragMove:Ext.emptyFn,onDragStart:Ext.emptyFn,applyActivateOnLongPress:function(activateOnLongPress){if(typeof activateOnLongPress==='string'){activateOnLongPress=[activateOnLongPress]}
return activateOnLongPress},updateActivateOnLongPress:function(activateOnLongPress){if(!this.isConfiguring){this.setupListeners()}},updateActiveCls:function(cls,oldCls){var el;if(this.dragging){el=this.getElement();el.replaceCls(oldCls,cls)}},applyConstrain:function(constrain){if(constrain&&!constrain.$isClass){if(constrain.isRegion){constrain={region:constrain}}else if(constrain.isElement||!Ext.isObject(constrain)){constrain={element:constrain}}
constrain=Ext.apply({source:this},constrain);constrain=Ext.Factory.dragConstraint(constrain)}
return constrain},updateElement:function(element,oldElement){if(oldElement&&!oldElement.destroyed){oldElement.un('dragstart','stopNativeDrag',this)}
if(element&&!this.getHandle()){element.setTouchAction({panX:!1,panY:!1});element.on('dragstart','stopNativeDrag',this,{translate:!1,delegated:!1})}
this.callParent([element,oldElement])},updateHandle:function(){if(!this.isConfiguring){this.setupListeners()}},applyProxy:function(proxy){if(proxy){proxy=Ext.Factory.dragproxy(proxy)}
return proxy},updateProxy:function(proxy,oldProxy){if(oldProxy){oldProxy.destroy()}
if(proxy){proxy.setSource(this)}},resolveListenerScope:function(){var ownerCmp=this.ownerCmp,a=arguments;if(ownerCmp){return ownerCmp.resolveListenerScope.apply(ownerCmp,a)}
return this.callParent(a)},destroy:function(){var me=this;me.manager=me.initialEvent=null;me.setConstrain(null);me.setProxy(null);me.callParent()},privates:{draggingCls:Ext.baseCSSPrefix+'drag-dragging',info:null,revertCls:Ext.baseCSSPrefix+'drag-revert',canActivateOnLongPress:function(e){var activate=this.getActivateOnLongPress();return!!(activate&&(activate===!0||Ext.Array.contains(activate,e.pointerType)))},dragCleanup:function(info){var me=this,cls=me.getActiveCls(),proxy=me.getProxy(),el=me.getElement(),proxyEl=info?info.proxy.element:null;if(cls){el.removeCls(cls)}
if(proxyEl){proxyEl.removeCls(me.draggingCls)}
proxy.cleanup(info);me.dragging=!1;me.initialEvent=me.info=null},getElListeners:function(){var handle=this.getHandle(),o={touchstart:'handleTouchStart',dragstart:'handleDragStart',drag:'handleDragMove',dragend:'handleDragEnd',dragcancel:'handleDragCancel'};if(handle){o.dragstart={fn:o.dragstart,delegate:handle}}
if(this.getActivateOnLongPress()){o.longpress='handleLongPress'}
return o},handleDragCancel:function(e){var me=this,info=me.info,manager=me.manager;if(manager){manager.onDragCancel(info,e)}
me.onDragCancel(info);if(me.hasListeners.dragcancel){me.fireEvent('dragcancel',me,info,e)}
Ext.fireEvent('dragcancel',me,info,e);me.dragCleanup(info)},handleDragEnd:function(e){if(!this.dragging){return}
var me=this,manager=me.manager,revert=me.getRevert(),info=me.info,proxy=info.proxy;info.update(e);if(manager){manager.onDragEnd(info,e)}
me.onDragEnd(info);if(me.hasListeners.dragend){me.fireEvent('dragend',me,info,e)}
Ext.fireEvent('dragend',me,info,e);proxy=proxy.instance;if(revert&&proxy){proxy.dragRevert(info,me.revertCls,revert,function(){me.dragCleanup(info)})}else{me.dragCleanup(info)}},handleDragMove:function(e){var me=this,info=me.info,manager=me.manager;if(!me.dragging){return}
e.stopPropagation();e.claimGesture();info.update(e);if(manager){manager.onDragMove(info,e)}
me.onDragMove(info);if(me.hasListeners.dragmove){me.fireEvent('dragmove',me,info,e)}},handleDragStart:function(e){var me=this,hasListeners=me.hasListeners,manager=me.manager,constrain=me.getConstrain(),initialEvent=me.initialEvent,el,cls,info,cancel,proxyEl;if(me.preventStart(e)){return!1}
if(hasListeners.initdragconstraints){me.fireEvent('initdragconstraints',me,e)}
me.info=info=new Ext.drag.Info(me,initialEvent);me.setup(info);if(constrain){constrain.onDragStart(info)}
info.update(e,!0);cancel=me.beforeDragStart(info)===!1;if(!cancel&&hasListeners.beforedragstart){cancel=me.fireEvent('beforedragstart',me,info,e)===!1}
if(cancel){me.dragCleanup();return!1}
e.claimGesture();me.dragging=!0;cls=me.getActiveCls();el=me.getElement();if(cls){el.addCls(cls)}
proxyEl=info.proxy.element;if(proxyEl){proxyEl.addCls(me.draggingCls)}
info.update(e);if(manager){manager.onDragStart(info,e)}
me.onDragStart(info);if(hasListeners.dragstart){me.fireEvent('dragstart',me,info,e)}
Ext.fireEvent('dragstart',me,info,e)},handleLongPress:function(e){if(!this.isDisabled()&&this.canActivateOnLongPress(e)){this.initialEvent=e;e.startDrag()}},handleTouchStart:function(e){if(!this.isDisabled()){this.initialEvent=e}},preventStart:function(e){return this.isDisabled()||(!e.longpress&&this.canActivateOnLongPress(e))},setup:Ext.privateFn,stopNativeDrag:function(e){e.preventDefault()}}})
;
Ext.define('Ext.drag.Target',{extend:'Ext.drag.Item',requires:['Ext.drag.Manager'],defaultIdPrefix:'target-',config:{invalidCls:'',validCls:''},constructor:function(config){var me=this,accepts=config&&config.accepts;if(accepts){me.accepts=accepts;config=Ext.apply({},config);delete config.accepts}
me.callParent([config]);Ext.drag.Manager.register(me)},accepts:function(info){return!0},disable:function(){this.callParent();this.setupListeners(null)},enable:function(){this.callParent();this.setupListeners()},beforeDrop:Ext.emptyFn,onDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragLeave:Ext.emptyFn,onDragMove:Ext.emptyFn,updateInvalidCls:function(invalidCls,oldInvalidCls){var info=this.info;this.doUpdateCls(info&&!info.valid,invalidCls,oldInvalidCls)},updateValidCls:function(validCls,oldValidCls){var info=this.info;this.doUpdateCls(info&&info.valid,validCls,oldValidCls)},destroy:function(){Ext.drag.Manager.unregister(this);this.callParent()},privates:{doUpdateCls:function(needsAdd,cls,oldCls){var el=this.getElement();if(oldCls){el.removeCls(oldCls)}
if(cls&&needsAdd){el.addCls(cls)}},getElListeners:function(){return{dragenter:'handleNativeDragEnter',dragleave:'handleNativeDragLeave',dragover:'handleNativeDragMove',drop:'handleNativeDrop'}},handleDrop:function(info){var me=this,hasListeners=me.hasListeners,valid=info.valid;me.getElement().removeCls([me.getInvalidCls(),me.getValidCls()]);if(valid&&me.beforeDrop(info)!==!1){if(hasListeners.beforedrop&&me.fireEvent('beforedrop',me,info)===!1){return!1}
me.onDrop(info);if(hasListeners.drop){me.fireEvent('drop',me,info)}}else{return!1}},handleDragEnter:function(info){var me=this,cls=info.valid?me.getValidCls():me.getInvalidCls();if(cls){me.getElement().addCls(cls)}
me.onDragEnter(info);if(me.hasListeners.dragenter){me.fireEvent('dragenter',me,info)}},handleDragLeave:function(info){var me=this;me.getElement().removeCls([me.getInvalidCls(),me.getValidCls()]);me.onDragLeave(info);if(me.hasListeners.dragleave){me.fireEvent('dragleave',me,info)}},handleDragMove:function(info){var me=this;me.onDragMove(info);if(me.hasListeners.dragmove){me.fireEvent('dragmove',me,info)}},handleNativeDragEnter:function(e){var me=this,info=Ext.drag.Manager.getNativeDragInfo(e);info.onNativeDragEnter(me,e);if(me.hasListeners.dragenter){me.fireEvent('dragenter',me,info)}},handleNativeDragLeave:function(e){var me=this,info=Ext.drag.Manager.getNativeDragInfo(e);info.onNativeDragLeave(me,e);if(me.hasListeners.dragleave){me.fireEvent('dragleave',me,info)}},handleNativeDragMove:function(e){var me=this,info=Ext.drag.Manager.getNativeDragInfo(e);info.onNativeDragMove(me,e);if(me.hasListeners.dragmove){me.fireEvent('dragmove',me,info)}},handleNativeDrop:function(e){var me=this,hasListeners=me.hasListeners,info=Ext.drag.Manager.getNativeDragInfo(e),valid=info.valid;info.onNativeDrop(me,e);if(valid){if(hasListeners.beforedrop&&me.fireEvent('beforedrop',me,info)===!1){return}
if(hasListeners.drop){me.fireEvent('drop',me,info)}}}}})
;
Ext.define('Ext.drag.proxy.None',{mixins:['Ext.mixin.Factoryable'],alias:'drag.proxy.none',factoryConfig:{aliasPrefix:'drag.proxy.',type:'dragproxy'},config:{source:null},constructor:function(config){var getElement=config&&config.getElement;if(getElement){this.getElement=getElement;config=Ext.apply({},config);delete config.getElement}
this.initConfig(config)},cleanup:Ext.emptyFn,dragRevert:function(info,revertCls,options,callback){var positionable=this.getPositionable(info),initial=info.proxy.initial;positionable.addCls(revertCls);positionable.setXY([initial.x,initial.y],Ext.apply({callback:function(){positionable.removeCls(revertCls);callback()}},options))},getElement:function(){return null},getPositionable:function(){return this.element},setXY:function(info,xy,animation){var positionable=this.getPositionable(info);if(positionable){positionable.setXY(xy,animation)}},update:Ext.emptyFn,privates:{setupElement:function(info){return(this.element=this.getElement(info))},adjustCursorOffset:function(info,pos){return pos}}})
;
Ext.define('Ext.drag.proxy.Original',{extend:'Ext.drag.proxy.None',alias:'drag.proxy.original',getElement:function(info){return info.source.getElement()},getPositionable:function(info){var source=info.source;return source.getComponent()||source.getElement()}})
;
Ext.define('Ext.drag.proxy.Placeholder',{extend:'Ext.drag.proxy.None',alias:'drag.proxy.placeholder',config:{cls:'',cursorOffset:[12,20],html:null,invalidCls:'',validCls:''},placeholderCls:Ext.baseCSSPrefix+'drag-proxy-placeholder',cleanup:function(){this.element=Ext.destroy(this.element)},getElement:function(){var el=Ext.getBody().createChild({cls:this.getCls(),html:this.getHtml()});el.addCls(this.placeholderCls);el.setTouchAction({panX:!1,panY:!1});return el},update:function(info){var el=this.element,invalidCls=this.getInvalidCls(),validCls=this.getValidCls(),valid=info.valid;if(info.target){el.replaceCls(valid?invalidCls:validCls,valid?validCls:invalidCls)}else{el.removeCls([invalidCls,validCls])}},updateCls:function(cls,oldCls){var el=this.element;if(el){if(oldCls){el.removeCls(oldCls)}
if(cls){el.addCls(cls)}}},updateHtml:function(html){var el=this.element;if(el){el.setHtml(html||'')}},updateInvalidCls:function(invalidCls,oldInvalidCls){this.doUpdateCls(invalidCls,oldInvalidCls)},updateValidCls:function(validCls,oldValidCls){this.doUpdateCls(validCls,oldValidCls)},destroy:function(){this.element=Ext.destroy(this.element);this.callParent()},privates:{adjustCursorOffset:function(info,xy){var offset=this.getCursorOffset();if(offset){xy[0]+=(offset[0]||0);xy[1]+=(offset[1]||0)}
return xy},doUpdateCls:function(cls,oldCls){var el=this.element,hasCls;if(el){if(oldCls){hasCls=cls&&el.hasCls(oldCls);el.removeCls(oldCls)}
if(cls&&hasCls){el.addCls(cls)}}}}})
;
Ext.define('Ext.event.gesture.Recognizer',{requires:['Ext.event.publisher.Gesture'],mixins:['Ext.mixin.Identifiable'],priority:0,handledEvents:[],isStarted:!1,config:{onRecognized:Ext.emptyFn,callbackScope:null},constructor:function(config){this.initConfig(config);Ext.event.publisher.Gesture.instance.registerRecognizer(this)},onStart:Ext.emptyFn,onEnd:Ext.emptyFn,onTouchStart:Ext.emptyFn,onTouchMove:Ext.emptyFn,onTouchEnd:function(){return this.reset()},onTouchCancel:function(e){return this.cancel(e)},fire:function(eventName,e,info,isCancel){this.getOnRecognized().call(this.getCallbackScope(),this,eventName,e,info,isCancel)},cancel:function(e){if(this.isStarted){this.onCancel(e)}
return this.reset()},onCancel:Ext.emptyFn,reset:function(){this.isStarted=!1;return!1}})
;
Ext.define('Ext.event.gesture.SingleTouch',{extend:'Ext.event.gesture.Recognizer',isSingleTouch:!0,onTouchStart:function(e){if(e.touches.length>1){return this.cancel(e)}}})
;
Ext.define('Ext.event.gesture.DoubleTap',{extend:'Ext.event.gesture.SingleTouch',priority:300,config:{moveDistance:8,tapDistance:24,maxDuration:300},handledEvents:['singletap','doubletap'],singleTapTimer:null,startTime:0,lastTapTime:0,onTouchStart:function(e){var me=this,ret=me.callParent([e]),lastStartPoint;if(ret!==!1){me.isStarted=!0;lastStartPoint=me.lastStartPoint=e.changedTouches[0].point;me.startPoint=me.startPoint||lastStartPoint;me.startTime=e.time;Ext.undefer(me.singleTapTimer)}
return ret},onTouchMove:function(e){var me=this,point=e.changedTouches[0].point,scale=Ext.Element.getViewportScale(),distance=Math.round(Math.abs(point.getDistanceTo(me.lastStartPoint)*scale));if(distance>=me.getMoveDistance()){return me.cancel(e)}},onTouchEnd:function(e){var me=this,maxDuration=me.getMaxDuration(),time=e.time,target=e.target,lastTapTime=me.lastTapTime,lastTarget=me.lastTarget,point=e.changedTouches[0].point,duration,scale,distance;me.lastTapTime=time;me.lastTarget=target;if(lastTapTime){duration=time-lastTapTime;if(duration<=maxDuration){scale=Ext.Element.getViewportScale();distance=Math.round(Math.abs(point.getDistanceTo(me.startPoint)*scale));if(distance<=me.getTapDistance()){if(target!==lastTarget){return me.cancel(e)}
me.lastTarget=null;me.lastTapTime=0;me.fire('doubletap',e,{touch:e.changedTouches[0],duration:duration});return me.callParent([e])}}}
if(time-me.startTime>maxDuration){me.fire('singletap',e);me.reset()}else{me.setSingleTapTimer(e)}},setSingleTapTimer:function(e){var me=this;me.singleTapTimer=Ext.defer(function(){me.fire('singletap',e);me.reset()},me.getMaxDuration())},reset:function(){var me=this;Ext.undefer(me.singleTapTimer);me.startTime=me.lastTapTime=0;me.lastStartPoint=me.startPoint=me.singleTapTimer=null;return me.callParent()}},function(DoubleTap){var gestures=Ext.manifest.gestures;DoubleTap.instance=new DoubleTap(gestures&&gestures.doubleTap)})
;
Ext.define('Ext.event.gesture.Drag',{extend:'Ext.event.gesture.SingleTouch',priority:100,startPoint:null,previousPoint:null,lastPoint:null,handledEvents:['dragstart','drag','dragend','dragcancel'],config:{minDistance:8},constructor:function(){this.callParent(arguments);this.initInfo()},initInfo:function(){this.info={touch:null,previous:{x:0,y:0},x:0,y:0,delta:{x:0,y:0},absDelta:{x:0,y:0},flick:{velocity:{x:0,y:0}},direction:{x:0,y:0},time:0,previousTime:{x:0,y:0},longpress:!1}},onTouchStart:function(e){var me=this,ret=me.callParent([e]);if(ret!==!1){me.startTime=e.time;me.startPoint=e.changedTouches[0].point}
return ret},tryDragStart:function(e){var me=this,point=e.changedTouches[0].point,minDistance=me.getMinDistance(),scale=Ext.Element.getViewportScale(),distance=Math.round(Math.abs(point.getDistanceTo(me.startPoint)*scale));if(distance>=minDistance){me.doDragStart(e)}},doDragStart:function(e,isLongPress){var me=this,touch=e.changedTouches[0],point=touch.point,info=me.info,time;if(isLongPress){time=Ext.now();me.startTime=time;me.startPoint=point;info.longpress=!0}else{time=e.time}
me.isStarted=!0;me.previousPoint=me.lastPoint=point;me.resetInfo('x',e,touch);me.resetInfo('y',e,touch);info.time=time;me.fire('dragstart',e,info)},onTouchMove:function(e){var me=this,touch,point;if(!me.startPoint){return}
if(!me.isStarted){me.tryDragStart(e)}
if(!me.isStarted){return}
touch=e.changedTouches[0];point=touch.point;if(me.lastPoint){me.previousPoint=me.lastPoint}
me.lastPoint=point;me.lastMoveEvent=e;me.updateInfo('x',e,touch);me.updateInfo('y',e,touch);me.info.time=e.time;me.fire('drag',e,me.info)},onAxisDragEnd:function(axis,info){var duration=info.time-info.previousTime[axis];if(duration>0){info.flick.velocity[axis]=(info[axis]-info.previous[axis])/duration}},resetInfo:function(axis,e,touch){var me=this,value=me.lastPoint[axis],startValue=me.startPoint[axis],delta=value-startValue,capAxis=axis.toUpperCase(),info=me.info;info.touch=touch;info.delta[axis]=delta;info.absDelta[axis]=Math.abs(delta);info.previousTime[axis]=me.startTime;info.previous[axis]=startValue;info[axis]=value;info.direction[axis]=0;info['start'+capAxis]=me.startPoint[axis];info['previous'+capAxis]=info.previous[axis];info['page'+capAxis]=info[axis];info['delta'+capAxis]=info.delta[axis];info['absDelta'+capAxis]=info.absDelta[axis];info['previousDelta'+capAxis]=0;info.startTime=me.startTime},updateInfo:function(axis,e,touch){var me=this,value=me.lastPoint[axis],previousValue=me.previousPoint[axis],startValue=me.startPoint[axis],delta=value-startValue,info=me.info,direction=info.direction,capAxis=axis.toUpperCase(),previousFlick=info.previous[axis];info.touch=touch;info.delta[axis]=delta;info.absDelta[axis]=Math.abs(delta);if(value!==previousFlick&&value!==info[axis]){info.previous[axis]=info[axis];info.previousTime[axis]=info.time}
info[axis]=value;if(value>previousValue){direction[axis]=1}else if(value<previousValue){direction[axis]=-1}
info['start'+capAxis]=startValue;info['previous'+capAxis]=info.previous[axis];info['page'+capAxis]=info[axis];info['delta'+capAxis]=info.delta[axis];info['absDelta'+capAxis]=info.absDelta[axis];info['previousDelta'+capAxis]=info.previous[axis]-startValue;info.startTime=me.startTime},onTouchEnd:function(e){var me=this,touch,point,info;if(me.isStarted){touch=e.changedTouches[0];point=touch.point;info=me.info;me.lastPoint=point;me.updateInfo('x',e,touch);me.updateInfo('y',e,touch);info.time=e.time;me.onAxisDragEnd('x',info);me.onAxisDragEnd('y',info);me.fire('dragend',e,info)}
return this.callParent([e])},onCancel:function(e){var me=this,touch=e.changedTouches[0],info=me.info;if(!e.touches.length){me.lastPoint=touch.point}
me.updateInfo('x',e,touch);me.updateInfo('y',e,touch);info.time=e.time;me.fire('dragcancel',e,info,!0)},reset:function(){var me=this;me.lastPoint=me.startPoint=me.previousPoint=me.lastPoint=me.lastMoveEvent=null;me.initInfo();return me.callParent()}},function(Drag){var gestures=Ext.manifest.gestures;Drag.instance=new Drag(gestures&&gestures.drag)})
;
Ext.define('Ext.event.gesture.Swipe',{extend:'Ext.event.gesture.SingleTouch',priority:600,handledEvents:['swipestart','swipe','swipecancel'],config:{minDistance:80,maxOffset:35,maxDuration:1000},onTouchStart:function(e){var me=this,ret=me.callParent([e]),touch;if(ret!==!1){touch=e.changedTouches[0];me.startTime=e.time;me.isHorizontal=!0;me.isVertical=!0;me.startX=touch.pageX;me.startY=touch.pageY}
return ret},onTouchMove:function(e){var me=this,touch=e.changedTouches[0],x=touch.pageX,y=touch.pageY,deltaX=x-me.startX,deltaY=y-me.startY,absDeltaX=Math.abs(x-me.startX),absDeltaY=Math.abs(y-me.startY),duration=e.time-me.startTime,minDistance,direction,distance;if((absDeltaX===0&&absDeltaY===0)||(duration>me.getMaxDuration())){return me.cancel(e)}
if(me.isHorizontal&&absDeltaY>me.getMaxOffset()){me.isHorizontal=!1}
if(me.isVertical&&absDeltaX>me.getMaxOffset()){me.isVertical=!1}
if(!me.isVertical||!me.isHorizontal){minDistance=me.getMinDistance();if(me.isHorizontal&&absDeltaX<minDistance){direction=(deltaX<0)?'left':'right';distance=absDeltaX}else if(me.isVertical&&absDeltaY<minDistance){direction=(deltaY<0)?'up':'down';distance=absDeltaY}}
if(!me.isHorizontal&&!me.isVertical){return me.cancel(e)}
if(direction&&!me.isStarted){me.isStarted=!0;me.fire('swipestart',e,{touch:touch,direction:direction,distance:distance,duration:duration})}},onTouchEnd:function(e){var me=this,touch,x,y,deltaX,deltaY,absDeltaX,absDeltaY,minDistance,duration,direction,distance;if(me.onTouchMove(e)!==!1){touch=e.changedTouches[0];x=touch.pageX;y=touch.pageY;deltaX=x-me.startX;deltaY=y-me.startY;absDeltaX=Math.abs(deltaX);absDeltaY=Math.abs(deltaY);minDistance=me.getMinDistance();duration=e.time-me.startTime;if(me.isVertical&&absDeltaY<minDistance){me.isVertical=!1}
if(me.isHorizontal&&absDeltaX<minDistance){me.isHorizontal=!1}
if(me.isHorizontal){direction=(deltaX<0)?'left':'right';distance=absDeltaX}else if(me.isVertical){direction=(deltaY<0)?'up':'down';distance=absDeltaY}
me.fire('swipe',e,{touch:touch,direction:direction,distance:distance,duration:duration})}
return this.callParent([e])},onCancel:function(e){this.fire('swipecancel',e,null,!0)},reset:function(){var me=this;me.startTime=me.isHorizontal=me.isVertical=me.startX=me.startY=null;return me.callParent()}},function(Swipe){var gestures=Ext.manifest.gestures;Swipe.instance=new Swipe(gestures&&gestures.swipe)})
;
Ext.define('Ext.event.gesture.EdgeSwipe',{extend:'Ext.event.gesture.Swipe',priority:500,handledEvents:['edgeswipe','edgeswipestart','edgeswipeend','edgeswipecancel'],config:{minDistance:60},onTouchStart:function(e){var me=this,ret=me.callParent([e]),touch;if(ret!==!1){touch=e.changedTouches[0];me.direction=null;me.isHorizontal=!0;me.isVertical=!0;me.startX=touch.pageX;me.startY=touch.pageY}
return ret},onTouchMove:function(e){var me=this,touch=e.changedTouches[0],x=touch.pageX,y=touch.pageY,deltaX=x-me.startX,deltaY=y-me.startY,absDeltaY=Math.abs(y-me.startY),absDeltaX=Math.abs(x-me.startX),minDistance=me.getMinDistance(),maxOffset=me.getMaxOffset(),duration=e.time-me.startTime,elementWidth=Ext.Viewport&&Ext.Element.getViewportWidth(),elementHeight=Ext.Viewport&&Ext.Element.getViewportHeight(),direction,distance;if(me.isVertical&&absDeltaX>maxOffset){me.isVertical=!1}
if(me.isHorizontal&&absDeltaY>maxOffset){me.isHorizontal=!1}
if(me.isVertical&&me.isHorizontal){if(absDeltaY>absDeltaX){me.isHorizontal=!1}else{me.isVertical=!1}}
if(me.isHorizontal){direction=(deltaX<0)?'left':'right';distance=deltaX}else if(me.isVertical){direction=(deltaY<0)?'up':'down';distance=deltaY}
direction=me.direction||(me.direction=direction);if(direction==='up'){distance=deltaY*-1}else if(direction==='left'){distance=deltaX*-1}
me.distance=distance;if(!distance){return me.cancel(e)}
if(!me.isStarted){if((direction==='right'&&me.startX>minDistance)||(direction==='down'&&me.startY>minDistance)||(direction==='left'&&(elementWidth-me.startX)>minDistance)||(direction==='up'&&(elementHeight-me.startY)>minDistance)){return me.cancel(e)}
me.isStarted=!0;me.startTime=e.time;me.fire('edgeswipestart',e,{touch:touch,direction:direction,distance:distance,duration:duration})}else{me.fire('edgeswipe',e,{touch:touch,direction:direction,distance:distance,duration:duration})}},onTouchEnd:function(e){var me=this,duration;if(me.onTouchMove(e)!==!1){duration=e.time-me.startTime;me.fire('edgeswipeend',e,{touch:e.changedTouches[0],direction:me.direction,distance:me.distance,duration:duration})}
return this.reset()},onCancel:function(e){this.fire('edgeswipecancel',e,{touch:e.changedTouches[0]},!0)},reset:function(){var me=this;me.direction=me.isHorizontal=me.isVertical=me.startX=me.startY=me.startTime=me.distance=null;return me.callParent()}},function(EdgeSwipe){var gestures=Ext.manifest.gestures;EdgeSwipe.instance=new EdgeSwipe(gestures&&gestures.edgeSwipe)})
;
Ext.define('Ext.event.gesture.LongPress',{extend:'Ext.event.gesture.SingleTouch',priority:400,config:{moveDistance:8,minDuration:1000},handledEvents:['longpress','taphold'],onTouchStart:function(e){var me=this,ret=me.callParent([e]);if(ret!==!1){me.startPoint=e.changedTouches[0].point;me.setLongPressTimer(e)}
return ret},setLongPressTimer:function(e){var me=this;Ext.undefer(me.timer);me.timer=Ext.defer(me.fireLongPress,me.getMinDuration(),me,[e])},onTouchMove:function(e){var me=this,point=e.changedTouches[0].point,scale=Ext.Element.getViewportScale(),distance=Math.round(Math.abs(point.getDistanceTo(me.startPoint)*scale));if(distance>=me.getMoveDistance()){return me.cancel(e)}},reset:function(){var me=this;me.timer=me.startPoint=Ext.undefer(me.timer);return me.callParent()},fireLongPress:function(e){var me=this,info={touch:e.changedTouches[0],duration:me.getMinDuration(),startDrag:me.startDrag};this.fire('taphold',e,info);this.fire('longpress',e,info);this.reset()},startDrag:function(){var dragRecognizer=Ext.event.gesture.Drag.instance,touchStartEvent=this.parentEvent;dragRecognizer.doDragStart(touchStartEvent,!0);Ext.event.publisher.Gesture.instance.claimRecognizer(dragRecognizer,touchStartEvent)}},function(LongPress){var gestures=Ext.manifest.gestures;LongPress.instance=new LongPress(gestures&&gestures.longPress)})
;
Ext.define('Ext.event.gesture.MultiTouch',{extend:'Ext.event.gesture.Recognizer',requiredTouchesCount:2,isTracking:!1,isMultiTouch:!0,onTouchStart:function(e){var me=this,requiredTouchesCount=me.requiredTouchesCount,touches=e.touches,touchesCount=touches.length;if(touchesCount===requiredTouchesCount){me.isTracking=!0}else if(touchesCount>requiredTouchesCount){return me.cancel(e)}},reset:function(){this.isTracking=!1;return this.callParent()}})
;
Ext.define('Ext.event.gesture.Pinch',{extend:'Ext.event.gesture.MultiTouch',priority:700,handledEvents:['pinchstart','pinch','pinchend','pinchcancel'],startDistance:0,lastTouches:null,onTouchMove:function(e){var me=this,touches,firstPoint,secondPoint,distance;if(me.isTracking){touches=e.touches;firstPoint=touches[0].point;secondPoint=touches[1].point;distance=firstPoint.getDistanceTo(secondPoint);if(distance===0){return}
if(!me.isStarted){me.isStarted=!0;me.startDistance=distance;me.fire('pinchstart',e,{touches:touches,distance:distance,scale:1})}else{me.fire('pinch',e,{touches:touches,distance:distance,scale:distance/me.startDistance})}}},onTouchEnd:function(e){if(this.isStarted){this.fire('pinchend',e)}
return this.callParent([e])},onCancel:function(e){this.fire('pinchcancel',e,null,!0)},reset:function(){this.lastTouches=null;this.startDistance=0;return this.callParent()}},function(Pinch){var gestures=Ext.manifest.gestures;Pinch.instance=new Pinch(gestures&&gestures.pinch)})
;
Ext.define('Ext.event.gesture.Rotate',{extend:'Ext.event.gesture.MultiTouch',priority:800,handledEvents:['rotatestart','rotate','rotateend','rotatecancel'],startAngle:0,lastTouches:null,lastAngle:null,onTouchMove:function(e){var me=this,touches,lastAngle,firstPoint,secondPoint,angle,nextAngle,previousAngle,diff;if(me.isTracking){touches=e.touches;lastAngle=me.lastAngle;firstPoint=touches[0].point;secondPoint=touches[1].point;angle=firstPoint.getAngleTo(secondPoint);if(lastAngle!==null){diff=Math.abs(lastAngle-angle);nextAngle=angle+360;previousAngle=angle-360;if(Math.abs(nextAngle-lastAngle)<diff){angle=nextAngle}else if(Math.abs(previousAngle-lastAngle)<diff){angle=previousAngle}}
me.lastAngle=angle;if(!me.isStarted){me.isStarted=!0;me.startAngle=angle;me.fire('rotatestart',e,{touches:touches,angle:angle,rotation:0})}else{me.fire('rotate',e,{touches:touches,angle:angle,rotation:angle-me.startAngle})}
me.lastTouches=Ext.Array.clone(touches)}},onTouchEnd:function(e){if(this.isStarted){this.fire('rotateend',e)}
return this.callParent([e])},onCancel:function(e){this.fire('rotatecancel',e,null,!0)},reset:function(){var me=this;me.lastTouches=me.lastAngle=me.startAngle=null;return this.callParent()}},function(Rotate){var gestures=Ext.manifest.gestures;Rotate.instance=new Rotate(gestures&&gestures.rotate)})
;
Ext.define('Ext.event.gesture.Tap',{extend:'Ext.event.gesture.SingleTouch',priority:200,handledEvents:['tap','tapcancel'],config:{moveDistance:8},onTouchStart:function(e){var me=this,ret=me.callParent([e]);if(ret!==!1){me.isStarted=!0;me.startPoint=e.changedTouches[0].point}
return ret},onTouchMove:function(e){var me=this,point=e.changedTouches[0].point,scale=Ext.Element.getViewportScale(),distance=Math.round(Math.abs(point.getDistanceTo(me.startPoint)*scale));if(distance>=me.getMoveDistance()){return me.cancel(e)}},onTouchEnd:function(e){this.fire('tap',e,{touch:e.changedTouches[0]});return this.callParent([e])},onCancel:function(e){this.fire('tapcancel',e,{touch:e.changedTouches[0]},!0)},reset:function(){this.startPoint=null;return this.callParent()}},function(Tap){var gestures=Ext.manifest.gestures;Tap.instance=new Tap(gestures&&gestures.tap)})
;
Ext.define('Ext.event.publisher.Focus',{extend:'Ext.event.publisher.Dom',requires:['Ext.dom.Element','Ext.GlobalEvents'],type:'focus',handledEvents:['focusenter','focusleave','focusmove'],handledDomEvents:['focusin','focusout'],publishDelegatedDomEvent:function(e){var me=this,relatedTarget=e.relatedTarget;if(me.$suppressEvents){return}
if(e.type==='focusout'){if(relatedTarget==null){me.processFocusIn(e,e.target,document.body)}}else{if(relatedTarget==null||!relatedTarget.tagName){relatedTarget=document.body}
me.processFocusIn(e,relatedTarget,e.target)}},processFocusIn:function(e,fromElement,toElement){var me=this,focusFly=me.focusFly,targets=[],commonAncestor,node,backwards,event,focusEnterEvent;if((fromElement&&focusFly.attach(fromElement).isFocusSuspended())||(toElement&&focusFly.attach(toElement).isFocusSuspended())){return}
if(toElement.compareDocumentPosition){backwards=!!(toElement.compareDocumentPosition(fromElement)&4)}
for(node=fromElement,commonAncestor=Ext.dom.Element.getCommonAncestor(toElement,fromElement,!0);node&&node!==commonAncestor;node=node.parentNode){targets.push(node)}
if(targets.length){event=me.createSyntheticEvent('focusleave',e,fromElement,toElement,fromElement,toElement,backwards);me.publish(event,targets);if(event.stopped){return}}
targets.length=0;for(node=toElement;node&&node!==commonAncestor;node=node.parentNode){targets.push(node)}
focusEnterEvent=me.createSyntheticEvent('focusenter',e,toElement,fromElement,fromElement,toElement,backwards);if(targets.length){me.publish(focusEnterEvent,targets);if(focusEnterEvent.stopped){return}}
targets=me.getPropagatingTargets(commonAncestor);if(targets.length){event=me.createSyntheticEvent('focusmove',e,toElement,fromElement,fromElement,toElement,backwards);me.publish(event,targets);if(event.stopped){return}}
if(Ext.GlobalEvents.hasListeners.focus){Ext.GlobalEvents.fireEvent('focus',{event:focusEnterEvent,toElement:toElement,fromElement:fromElement,backwards:backwards})}},createSyntheticEvent:function(eventName,browserEvent,target,relatedTarget,fromElement,toElement,backwards){var event=new Ext.event.Event(browserEvent);event.type=eventName;event.relatedTarget=relatedTarget;event.target=target;event.fromElement=fromElement;event.toElement=toElement;event.backwards=backwards;return event}},function(Focus){var focusTimeout;Focus.prototype.focusFly=new Ext.dom.Fly();Focus.instance=new Focus();if(!Ext.supports.FocusinFocusoutEvents){this.override({handledDomEvents:['focus','blur'],publishDelegatedDomEvent:function(e){var me=this,targetIsElement;me.callSuper([e]);targetIsElement=e.target!==window&&e.target!==document;if(e.type==='blur'){if(!targetIsElement){if(e.explicitOriginalTarget===Focus.previousActiveElement){if(e.target===window){Ext.undefer(focusTimeout);focusTimeout=0;me.processFocusIn(e,Focus.previousActiveElement,document.body);Focus.previousActiveElement=null}}}else{focusTimeout=Ext.defer(function(){focusTimeout=0;me.processFocusIn(e,e.target,document.body);Focus.previousActiveElement=null},1);if(targetIsElement&&Ext.cache[e.target.id]){Ext.cache[e.target.id].focusinTimeout=focusTimeout}}
Focus.previousActiveElement=targetIsElement?e.target:null}else{Ext.undefer(focusTimeout);focusTimeout=0;me.processFocusIn(e,Focus.previousActiveElement||document.body,targetIsElement?e.target:document.body)}}});Ext.define(null,{override:'Ext.dom.Element',destroy:function(){if(this.focusinTimeout){Ext.undefer(this.focusinTimeout);this.focusinTimeout=null}
this.callParent()}})}})
;
Ext.define('Ext.field.InputMask',function(InputMask){return{requires:['Ext.util.LRU'],cachedConfig:{blank:'_',characters:{'*':'[A-Za-z0-9]','a':'[a-z]','A':'[A-Z]','0':'[0-9]','9':'[0-9]'},ignoreCase:!0},config:{pattern:null},_cached:!1,_lastEditablePos:null,_mask:null,statics:{active:{},from:function(value,existing){var active=InputMask.active,ret;if(value===null){ret=null}else if(typeof value!=='string'){if(existing&&!existing._cached){ret=existing;ret.setConfig(value)}else{ret=new InputMask(value)}}else if(!(ret=active[value])){if(!(ret=InputMask.cache.remove(value))){ret=new InputMask({pattern:value})}
active[value]=ret;ret._cached=1}else{++ret._cached}
return ret}},constructor:function(config){this.initConfig(config)},release:function(){var me=this,cache=InputMask.cache,key;if(me._cached&&!--me._cached){key=me.getPattern();if(InputMask.active[key]!==me){Ext.raise('Invalid call to InputMask#release (not active)')}
if(cache.map[key]){Ext.raise('Invalid call to InputMask#release (already cached)')}
delete InputMask.active[key];cache.add(key,me);cache.trim(cache.maxSize)}else if(me._cached===0){Ext.raise('Invalid call to InputMask#release (already released)')}},clearRange:function(value,start,len){var me=this,blank=me.getBlank(),end=start+len,n=value.length,s='',i,mask,prefixLen;if(!blank){prefixLen=me._prefix.length;for(i=0;i<n;++i){if(i<prefixLen||i<start||i>=end){s+=value[i]}}
s=me.formatValue(s)}else{mask=me.getPattern();for(i=0;i<n;++i){if(i<start||i>=end){s+=value[i]}else if(me.isFixedChar(i)){s+=mask[i]}else{s+=blank}}}
return s},formatValue:function(value){var me=this,blank=me.getBlank(),i,length,mask,prefix,s;if(!blank){prefix=me._prefix;length=prefix.length;s=this.insertRange('',value,0);for(i=s.length;i>length&&me.isFixedChar(i-1);){--i}
s=(i<length)?prefix:s.slice(0,i-1)}else if(value){s=me.formatValue('');s=me.insertRange(s,value,0)}else{mask=me.getPattern();s='';for(i=0,length=mask.length;i<length;++i){if(me.isFixedChar(i)){s+=mask[i]}else{s+=blank}}}
return s},getEditPosLeft:function(pos){var i;for(i=pos;i>=0;--i){if(!this.isFixedChar(i)){return i}}
return null},getEditPosRight:function(pos){var mask=this._mask,len=mask.length,i;for(i=pos;i<len;++i){if(!this.isFixedChar(i)){return i}}
return null},getFilledLength:function(value){var me=this,blank=me.getBlank(),c,i;if(!blank){return value.length}
for(i=value&&value.length;i-->0;){c=value[i];if(!me.isFixedChar(i)&&me.isAllowedChar(c,i)){break}}
return++i||me._prefix.length},getSubLength:function(value,substr,pos){var me=this,mask=me.getPattern(),k=0,maskLen=mask.length,substrLen=substr.length,i;for(i=pos;i<maskLen&&k<substrLen;){if(!me.isFixedChar(i)||mask[i]===substr[k]){if(me.isAllowedChar(substr[k++],i,!0)){++i}}else{++i}}
return i-pos},insertRange:function(value,substr,pos){var me=this,mask=me.getPattern(),blank=me.getBlank(),filled=me.isFilled(value),prefixLen=me._prefix.length,maskLen=mask.length,substrLen=substr.length,s=value,ch,fixed,i,k;if(!blank&&pos>s.length){s+=mask.slice(s.length,pos)}
for(i=pos,k=0;i<maskLen&&k<substrLen;){fixed=me.isFixedChar(i);if(!fixed||mask[i]===substr[k]){ch=substr[k++];if(me.isAllowedChar(ch,i,!0)){if(i<s.length){if(blank||filled||i<prefixLen){s=s.slice(0,i)+ch+s.slice(i+1)}else{s=me.formatValue(s.substr(0,i)+ch+s.substr(i))}}else if(!blank){s+=ch}
++i}}else{if(!blank&&i>=s.length){s+=mask[i]}else if(blank&&fixed&&substr[k]===blank){++k}
++i}}
return s},isAllowedChar:function(character,pos,allowBlankChar){var me=this,mask=me.getPattern(),c,characters,rule;if(me.isFixedChar(pos)){return mask[pos]===character}
c=mask[pos];characters=me.getCharacters();rule=characters[c];return!rule||rule.test(character||'')||(allowBlankChar&&character===me.getBlank())},isEmpty:function(value){var i,len;for(i=0,len=value.length;i<len;++i){if(!this.isFixedChar(i)&&this.isAllowedChar(value[i],i)){return!1}}
return!0},isFilled:function(value){return this.getFilledLength(value)===this._mask.length},isFixedChar:function(pos){return Ext.Array.indexOf(this._fixedCharPositions,pos)>-1},setCaretToEnd:function(field,value){var filledLen=this.getFilledLength(value),pos=this.getEditPosRight(filledLen);if(pos!==null){Ext.raf(function(){if(!field.destroyed){field.setCaretPos(pos);Ext.raf(function(){if(!field.destroyed){field.setCaretPos(pos)}})}})}},onBlur:function(field,value){if(field.getAutoHideInputMask()!==!1){if(this.isEmpty(value)){field.maskProcessed=!0;field.setValue('')}}},onFocus:function(field,value){if(field.getAutoHideInputMask()!==!1){if(!value){field.maskProcessed=!0;field.setValue(this._mask)}}
this.setCaretToEnd(field,value)},onChange:function(field,value,oldValue){var me=this,s;if(field.maskProcessed||value===oldValue){field.maskProcessed=!1;return!0}
if(value){s=me.formatValue(value);field.maskProcessed=!0;field.setValue(s)}},processAutocomplete:function(field,value){var me=this,s;if(value){if(value.length>me._mask.length){value=value.substr(0,me._mask.length)}
s=me.formatValue(value);field.maskProcessed=!0;field.inputElement.dom.value=s;field.setValue(s);this.setCaretToEnd(field,value)}},showEmptyMask:function(field,adjustCaret){var s=this.formatValue();field.maskProcessed=!0;field.setValue(s);if(adjustCaret){this.setCaretToEnd(field)}},onKeyDown:function(field,value,event){if(event.ctrlKey||event.metaKey){return}
var me=this,key=event.keyCode===event.DELETE,del=key==='Delete',handled=del||(event.keyCode===event.BACKSPACE),s=value,caret,editPos,len,prefixLen,textSelection,start;if(handled){caret=field.getCaretPos();prefixLen=me._prefix.length;textSelection=field.getTextSelection();start=textSelection[0];len=textSelection[1]-start;if(len){s=me.clearRange(value,start,len)}else if(caret<prefixLen||(!del&&caret===prefixLen)){caret=prefixLen}else{editPos=del?me.getEditPosRight(caret):me.getEditPosLeft(caret-1);if(editPos!==null){s=me.clearRange(value,editPos,1);caret=editPos}}
if(s!==value){field.maskProcessed=!0;field.setValue(s)}
event.preventDefault();field.setCaretPos(caret)}},onKeyPress:function(field,value,event){var me=this,key=event.keyCode,ch=event.getChar(),mask=me.getPattern(),prefixLen=me._prefix.length,s=value,caretPos,pos,start,textSelection;if(key===event.ENTER||key===event.TAB||event.ctrlKey||event.metaKey){return}
caretPos=field.getCaretPos();textSelection=field.getTextSelection();if(me.isFixedChar(caretPos)&&mask[caretPos]===ch){s=me.insertRange(s,ch,caretPos);++caretPos}else{pos=me.getEditPosRight(caretPos);if(pos!==null&&me.isAllowedChar(ch,pos)){start=textSelection[0];s=me.clearRange(s,start,textSelection[1]-start);s=me.insertRange(s,ch,pos);caretPos=pos+1}}
if(s!==value){field.maskProcessed=!0;field.setValue(s)}
event.preventDefault();if(caretPos<me._lastEditablePos&&caretPos>prefixLen){caretPos=me.getEditPosRight(caretPos)}
field.setCaretPos(caretPos)},onPaste:function(field,value,event){var text,clipdData=event.browserEvent.clipboardData;if(clipdData&&clipdData.getData){text=clipdData.getData('text/plain')}else if(Ext.global.clipboardData&&Ext.global.clipboardData.getData){text=Ext.global.clipboardData.getData('Text')}
if(text){this.paste(field,value,text,field.getTextSelection())}
event.preventDefault()},paste:function(field,value,text,selection){var me=this,caretPos=selection[0],len=selection[1]-caretPos,s=len?me.clearRange(value,caretPos,len):value,textLen=me.getSubLength(s,text,caretPos);s=me.insertRange(s,text,caretPos);caretPos+=textLen;caretPos=me.getEditPosRight(caretPos)||caretPos;if(s!==value){field.maskProcessed=!0;field.setValue(s)}
field.setCaretPos(caretPos)},syncPattern:function(field){var fieldValue=field.getValue(),s;if(field.getAutoHideInputMask()===!1){if(!fieldValue){this.showEmptyMask(field)}else{s=this.formatValue(fieldValue);field.maskProcessed=!0;field.setValue(s)}}else{if(fieldValue){s=this.formatValue(fieldValue);field.maskProcessed=!0;field.setValue(s)}}},applyCharacters:function(map){var ret={},flags=this.getIgnoreCase()?'i':'',c,v;for(c in map){v=map[c];if(typeof v==='string'){v=new RegExp(v,flags)}
ret[c]=v}
return ret},updatePattern:function(mask){var me=this,characters=me.getCharacters(),lastEditablePos=0,n=mask&&mask.length,blank=me.getBlank(),fixedPosArr=[],prefix='',str='',c,i;for(i=0;i<n;++i){c=mask[i];if(!characters[c]){fixedPosArr.push(str.length);str+=c}else{lastEditablePos=str.length+1;str+=blank}}
me._lastEditablePos=lastEditablePos;me._mask=str;me._fixedCharPositions=fixedPosArr;for(i=0;i<str.length&&me.isFixedChar(i);++i){prefix+=str[i]}
me._prefix=prefix}}},function(InputMask){InputMask.cache=new Ext.util.LRU();InputMask.cache.maxSize=100})
;
Ext.define('Ext.fx.State',{isAnimatable:{'background-color':!0,'background-image':!0,'background-position':!0,'border-bottom-color':!0,'border-bottom-width':!0,'border-color':!0,'border-left-color':!0,'border-left-width':!0,'border-right-color':!0,'border-right-width':!0,'border-spacing':!0,'border-top-color':!0,'border-top-width':!0,'border-width':!0,'bottom':!0,'color':!0,'crop':!0,'font-size':!0,'font-weight':!0,'height':!0,'left':!0,'letter-spacing':!0,'line-height':!0,'margin-bottom':!0,'margin-left':!0,'margin-right':!0,'margin-top':!0,'max-height':!0,'max-width':!0,'min-height':!0,'min-width':!0,'opacity':!0,'outline-color':!0,'outline-offset':!0,'outline-width':!0,'padding-bottom':!0,'padding-left':!0,'padding-right':!0,'padding-top':!0,'right':!0,'text-indent':!0,'text-shadow':!0,'top':!0,'vertical-align':!0,'visibility':!0,'width':!0,'word-spacing':!0,'z-index':!0,'zoom':!0,'transform':!0},constructor:function(data){this.data={};this.set(data)},setConfig:function(data){this.set(data);return this},setRaw:function(data){this.data=data;return this},clear:function(){return this.setRaw({})},setTransform:function(name,value){var data=this.data,isArray=Ext.isArray(value),transform=data.transform,ln,key;if(!transform){transform=data.transform={translateX:0,translateY:0,translateZ:0,scaleX:1,scaleY:1,scaleZ:1,rotate:0,rotateX:0,rotateY:0,rotateZ:0,skewX:0,skewY:0}}
if(typeof name==='string'){switch(name){case 'translate':if(isArray){ln=value.length;if(ln===0){break}
transform.translateX=value[0];if(ln===1){break}
transform.translateY=value[1];if(ln===2){break}
transform.translateZ=value[2]}else{transform.translateX=value}
break;case 'rotate':if(isArray){ln=value.length;if(ln===0){break}
transform.rotateX=value[0];if(ln===1){break}
transform.rotateY=value[1];if(ln===2){break}
transform.rotateZ=value[2]}else{transform.rotate=value}
break;case 'scale':if(isArray){ln=value.length;if(ln===0){break}
transform.scaleX=value[0];if(ln===1){break}
transform.scaleY=value[1];if(ln===2){break}
transform.scaleZ=value[2]}else{transform.scaleX=value;transform.scaleY=value}
break;case 'skew':if(isArray){ln=value.length;if(ln===0){break}
transform.skewX=value[0];if(ln===1){break}
transform.skewY=value[1]}else{transform.skewX=value}
break;default:transform[name]=value}}else{for(key in name){if(name.hasOwnProperty(key)){value=name[key];this.setTransform(key,value)}}}},set:function(name,value){var data=this.data,key;if(typeof name!=='string'){for(key in name){value=name[key];if(key==='transform'){this.setTransform(value)}else{data[key]=value}}}else{if(name==='transform'){this.setTransform(value)}else{data[name]=value}}
return this},unset:function(name){var data=this.data;if(data.hasOwnProperty(name)){delete data[name]}
return this},getData:function(){return this.data}})
;
Ext.define('Ext.fx.animation.Abstract',{extend:'Ext.Evented',mixins:['Ext.mixin.Factoryable'],factoryConfig:{type:'animation'},isAnimation:!0,requires:['Ext.fx.State'],config:{name:'',element:null,before:null,from:{},to:{},after:null,states:{},duration:300,easing:'linear',iteration:1,direction:'normal',delay:0,onBeforeStart:null,callback:null,onEnd:null,onBeforeEnd:null,scope:null,reverse:null,preserveEndState:!1,replacePrevious:!0},STATE_FROM:'0%',STATE_TO:'100%',DIRECTION_UP:'up',DIRECTION_TOP:'top',DIRECTION_DOWN:'down',DIRECTION_BOTTOM:'bottom',DIRECTION_LEFT:'left',DIRECTION_RIGHT:'right',stateNameRegex:/^(?:[\d.]+)%$/,constructor:function(){this.states={};this.callParent(arguments);return this},applyElement:function(element){return Ext.get(element)},applyBefore:function(before,current){if(before){return Ext.factory(before,Ext.fx.State,current)}},applyAfter:function(after,current){if(after){return Ext.factory(after,Ext.fx.State,current)}},setFrom:function(from){return this.setState(this.STATE_FROM,from)},setTo:function(to){return this.setState(this.STATE_TO,to)},getFrom:function(){return this.getState(this.STATE_FROM)},getTo:function(){return this.getState(this.STATE_TO)},setStates:function(states){var validNameRegex=this.stateNameRegex,name;for(name in states){if(validNameRegex.test(name)){this.setState(name,states[name])}}
return this},getStates:function(){return this.states},updateCallback:function(callback){if(callback){this.setOnEnd(callback)}},end:function(){this.stop()},stop:function(){this.fireEvent('stop',this)},destroy:function(){this.destroying=!0;this.stop();this.callParent();this.destroying=!1;this.destroyed=!0},setState:function(name,state){var states=this.getStates(),stateInstance;stateInstance=Ext.factory(state,Ext.fx.State,states[name]);if(stateInstance){states[name]=stateInstance}else if(name===this.STATE_TO){Ext.Logger.error("Setting and invalid '100%' / 'to' state of: "+state)}
return this},getState:function(name){return this.getStates()[name]},getData:function(){var me=this,states=me.getStates(),statesData={},before=me.getBefore(),after=me.getAfter(),from=states[me.STATE_FROM],to=states[me.STATE_TO],fromData=from.getData(),toData=to.getData(),data,name,state;for(name in states){if(states.hasOwnProperty(name)){state=states[name];data=state.getData();statesData[name]=data}}
return{before:before?before.getData():{},after:after?after.getData():{},states:statesData,from:fromData,to:toData,duration:me.getDuration(),iteration:me.getIteration(),direction:me.getDirection(),easing:me.getEasing(),delay:me.getDelay(),onEnd:me.getOnEnd(),onBeforeEnd:me.getOnBeforeEnd(),onBeforeStart:me.getOnBeforeStart(),scope:me.getScope(),preserveEndState:me.getPreserveEndState(),replacePrevious:me.getReplacePrevious()}}})
;
Ext.define('Ext.fx.animation.Slide',{extend:'Ext.fx.animation.Abstract',alternateClassName:'Ext.fx.animation.SlideIn',alias:['animation.slide','animation.slideIn'],config:{direction:'left',out:!1,offset:0,easing:'auto',containerBox:'auto',elementBox:'auto',isElementBoxFit:!0,useCssTransform:!0},reverseDirectionMap:{up:'down',top:'down',down:'up',bottom:'up',left:'right',right:'left'},applyEasing:function(easing){if(easing==='auto'){return'ease-'+((this.getOut())?'in':'out')}
return easing},getContainerBox:function(){var box=this._containerBox;if(box==='auto'){box=this.getElement().getParent().getBox()}
return box},getElementBox:function(){var box=this._elementBox;if(this.getIsElementBoxFit()){return this.getContainerBox()}
if(box==='auto'){box=this.getElement().getBox()}
return box},getData:function(){var elementBox=this.getElementBox(),containerBox=this.getContainerBox(),box=elementBox?elementBox:containerBox,from=this.getFrom(),to=this.getTo(),out=this.getOut(),offset=this.getOffset(),direction=this.getDirection(),useCssTransform=this.getUseCssTransform(),reverse=this.getReverse(),translateX=0,translateY=0,offsetPct,fromX,fromY,toX,toY;if(typeof offset==='string'){offsetPct=!0;offset=parseFloat(offset)}
if(reverse){direction=this.reverseDirectionMap[direction]}
switch(direction){case this.DIRECTION_UP:case this.DIRECTION_TOP:if(offsetPct){offset=box.height*offset/100}
if(out){translateY=containerBox.top-box.top-box.height-offset}else{translateY=containerBox.bottom-box.bottom+box.height+offset}
break;case this.DIRECTION_DOWN:case this.DIRECTION_BOTTOM:if(offsetPct){offset=box.height*offset/100}
if(out){translateY=containerBox.bottom-box.bottom+box.height+offset}else{translateY=containerBox.top-box.height-box.top-offset}
break;case this.DIRECTION_RIGHT:if(offsetPct){offset=box.width*offset/100}
if(out){translateX=containerBox.right-box.right+box.width+offset}else{translateX=containerBox.left-box.left-box.width-offset}
break;case this.DIRECTION_LEFT:if(offsetPct){offset=box.width*offset/100}
if(out){translateX=containerBox.left-box.left-box.width-offset}else{translateX=containerBox.right-box.right+box.width+offset}
break}
fromX=(out)?0:translateX;fromY=(out)?0:translateY;if(useCssTransform){from.setTransform({translateX:fromX,translateY:fromY})}else{from.set('left',fromX);from.set('top',fromY)}
toX=(out)?translateX:0;toY=(out)?translateY:0;if(useCssTransform){to.setTransform({translateX:toX,translateY:toY})}else{to.set('left',toX);to.set('top',toY)}
return this.callParent(arguments)}})
;
Ext.define('Ext.fx.animation.SlideOut',{extend:'Ext.fx.animation.Slide',alias:['animation.slideOut'],config:{out:!0}})
;
Ext.define('Ext.fx.animation.Fade',{extend:'Ext.fx.animation.Abstract',alternateClassName:'Ext.fx.animation.FadeIn',alias:['animation.fade','animation.fadeIn'],config:{out:!1,before:{display:null,opacity:0},after:{opacity:null},reverse:null},updateOut:function(newOut){var to=this.getTo(),from=this.getFrom();if(newOut){from.set('opacity',1);to.set('opacity',0)}else{from.set('opacity',0);to.set('opacity',1)}}})
;
Ext.define('Ext.fx.animation.FadeOut',{extend:'Ext.fx.animation.Fade',alias:'animation.fadeOut',config:{out:!0,before:{}}})
;
Ext.define('Ext.fx.animation.Flip',{extend:'Ext.fx.animation.Abstract',alias:'animation.flip',config:{easing:'ease-in',direction:'right',half:!1,out:null},getData:function(){var me=this,from=me.getFrom(),to=me.getTo(),direction=me.getDirection(),out=me.getOut(),half=me.getHalf(),rotate=half?90:180,fromScale=1,toScale=1,fromRotateX=0,fromRotateY=0,toRotateX=0,toRotateY=0;if(out){toScale=0.8}else{fromScale=0.8}
switch(direction){case this.DIRECTION_UP:case this.DIRECTION_TOP:if(out){toRotateX=rotate}else{fromRotateX=-rotate}
break;case this.DIRECTION_DOWN:case this.DIRECTION_BOTTOM:if(out){toRotateX=-rotate}else{fromRotateX=rotate}
break;case this.DIRECTION_RIGHT:if(out){toRotateY=rotate}else{fromRotateY=-rotate}
break;case this.DIRECTION_LEFT:if(out){toRotateY=-rotate}else{fromRotateY=rotate}
break}
from.setTransform({rotateX:fromRotateX,rotateY:fromRotateY,scale:fromScale});to.setTransform({rotateX:toRotateX,rotateY:toRotateY,scale:toScale});return this.callParent()}})
;
Ext.define('Ext.fx.animation.Pop',{extend:'Ext.fx.animation.Abstract',alias:['animation.pop','animation.popIn'],alternateClassName:'Ext.fx.animation.PopIn',config:{out:!1,before:{display:null,opacity:0},after:{opacity:null}},getData:function(){var to=this.getTo(),from=this.getFrom(),out=this.getOut();if(out){from.set('opacity',1);from.setTransform({scale:1});to.set('opacity',0);to.setTransform({scale:0})}else{from.set('opacity',0);from.setTransform({scale:0});to.set('opacity',1);to.setTransform({scale:1})}
return this.callParent(arguments)}})
;
Ext.define('Ext.fx.animation.PopOut',{extend:'Ext.fx.animation.Pop',alias:'animation.popOut',config:{out:!0,before:{}}})
;
Ext.define('Ext.fx.Animation',{requires:['Ext.fx.animation.Slide','Ext.fx.animation.SlideOut','Ext.fx.animation.Fade','Ext.fx.animation.FadeOut','Ext.fx.animation.Flip','Ext.fx.animation.Pop','Ext.fx.animation.PopOut'],constructor:function(config){var defaultClass=Ext.fx.animation.Abstract,type;if(typeof config==='string'){type=config;config={}}else if(config&&config.type){type=config.type}
if(type){defaultClass=Ext.ClassManager.getByAlias('animation.'+type);if(!defaultClass){Ext.Logger.error("Invalid animation type of: '"+type+"'")}}
return Ext.factory(config,defaultClass)}})
;
Ext.define('Ext.fx.runner.Css',{extend:'Ext.Evented',requires:['Ext.fx.Animation'],prefixedProperties:{'transform':!0,'transform-origin':!0,'perspective':!0,'transform-style':!0,'transition':!0,'transition-property':!0,'transition-duration':!0,'transition-timing-function':!0,'transition-delay':!0,'animation':!0,'animation-name':!0,'animation-duration':!0,'animation-iteration-count':!0,'animation-direction':!0,'animation-timing-function':!0,'animation-delay':!0},lengthProperties:{'top':!0,'right':!0,'bottom':!0,'left':!0,'width':!0,'height':!0,'max-height':!0,'max-width':!0,'min-height':!0,'min-width':!0,'margin-bottom':!0,'margin-left':!0,'margin-right':!0,'margin-top':!0,'padding-bottom':!0,'padding-left':!0,'padding-right':!0,'padding-top':!0,'border-bottom-width':!0,'border-left-width':!0,'border-right-width':!0,'border-spacing':!0,'border-top-width':!0,'border-width':!0,'outline-width':!0,'letter-spacing':!0,'line-height':!0,'text-indent':!0,'word-spacing':!0,'font-size':!0,'translate':!0,'translateX':!0,'translateY':!0,'translateZ':!0,'translate3d':!0,'x':!0,'y':!0},durationProperties:{'transition-duration':!0,'transition-delay':!0,'animation-duration':!0,'animation-delay':!0},angleProperties:{rotate:!0,rotateX:!0,rotateY:!0,rotateZ:!0,skew:!0,skewX:!0,skewY:!0},DEFAULT_UNIT_LENGTH:'px',DEFAULT_UNIT_ANGLE:'deg',DEFAULT_UNIT_DURATION:'ms',customProperties:{x:!0,y:!0},formattedNameCache:{'x':'left','y':'top'},transformMethods3d:['translateX','translateY','translateZ','rotate','rotateX','rotateY','rotateZ','skewX','skewY','scaleX','scaleY','scaleZ'],transformMethodsNo3d:['translateX','translateY','rotate','skewX','skewY','scaleX','scaleY'],constructor:function(){var me=this;me.transformMethods=Ext.feature.has.Css3dTransforms?me.transformMethods3d:me.transformMethodsNo3d;me.vendorPrefix=Ext.browser.getStyleDashPrefix();me.ruleStylesCache={};me.callParent()},getStyleSheet:function(){var styleSheet=this.styleSheet,styleElement,styleSheets;if(!styleSheet){styleElement=document.createElement('style');styleElement.type='text/css';(document.head||document.getElementsByTagName('head')[0]).appendChild(styleElement);styleSheets=document.styleSheets;this.styleSheet=styleSheet=styleSheets[styleSheets.length-1]}
return styleSheet},applyRules:function(selectors){var styleSheet=this.getStyleSheet(),ruleStylesCache=this.ruleStylesCache,rules=styleSheet.cssRules,selector,properties,ruleStyle,ruleStyleCache,rulesLength,name,value;for(selector in selectors){properties=selectors[selector];ruleStyle=ruleStylesCache[selector];if(ruleStyle===undefined){rulesLength=rules.length;styleSheet.insertRule(selector+'{}',rulesLength);ruleStyle=ruleStylesCache[selector]=rules.item(rulesLength).style}
ruleStyleCache=ruleStyle.$cache;if(!ruleStyleCache){ruleStyleCache=ruleStyle.$cache={}}
for(name in properties){value=this.formatValue(properties[name],name);name=this.formatName(name);if(ruleStyleCache[name]!==value){ruleStyleCache[name]=value;if(value===null){ruleStyle.removeProperty(name)}else{ruleStyle.setProperty(name,value)}}}}
return this},applyStyles:function(styles){var id,element,elementStyle,properties,name,value;for(id in styles){if(styles.hasOwnProperty(id)){this.activeElement=element=document.getElementById(id);if(!element){continue}
elementStyle=element.style;properties=styles[id];for(name in properties){if(properties.hasOwnProperty(name)){value=this.formatValue(properties[name],name);name=this.formatName(name);if(value===null){elementStyle.removeProperty(name)}else{elementStyle.setProperty(name,value)}}}}}
this.activeElement=null;return this},formatName:function(name){var cache=this.formattedNameCache,formattedName=cache[name];if(!formattedName){if((Ext.os.is.Tizen||!Ext.feature.has.CssTransformNoPrefix)&&this.prefixedProperties[name]){formattedName=this.vendorPrefix+name}else{formattedName=name}
cache[name]=formattedName}
return formattedName},formatValue:function(value,name){var type=typeof value,defaultLengthUnit=this.DEFAULT_UNIT_LENGTH,isCustom=this.customProperties[name],transformMethods,method,i,ln,transformValues,values;if(value===null){return''}
if(type==='string'){if(this.lengthProperties[name]){if(!Ext.dom.Element.hasUnit(value)){value=value+defaultLengthUnit;if(isCustom){value=this.getCustomValue(value,name)}}}
return value}else if(type==='number'){if(value===0){return'0'}
if(this.lengthProperties[name]){value=value+defaultLengthUnit;if(isCustom){value=this.getCustomValue(value,name)}
return value}
if(this.angleProperties[name]){return value+this.DEFAULT_UNIT_ANGLE}
if(this.durationProperties[name]){return value+this.DEFAULT_UNIT_DURATION}}else if(name==='transform'){transformMethods=this.transformMethods;transformValues=[];for(i=0,ln=transformMethods.length;i<ln;i++){method=transformMethods[i];transformValues.push(method+'('+this.formatValue(value[method],method)+')')}
return transformValues.join(' ')}else if(Ext.isArray(value)){values=[];for(i=0,ln=value.length;i<ln;i++){values.push(this.formatValue(value[i],name))}
return(values.length>0)?values.join(', '):'none'}
return value},getCustomValue:function(value,name){var el=Ext.fly(this.activeElement);if(name==='x'){value=el.translateXY(parseInt(value,10)).x}else if(name==='y'){value=el.translateXY(null,parseInt(value,10)).y}
return value+this.DEFAULT_UNIT_LENGTH}})
;
Ext.define('Ext.fx.runner.CssTransition',{extend:'Ext.fx.runner.Css',requires:['Ext.AnimationQueue'],alternateClassName:'Ext.Animator',singleton:!0,listenersAttached:!1,constructor:function(){this.runningAnimationsData={};this.transitionQueue={toData:{},transitionData:{}};return this.callParent(arguments)},attachListeners:function(){var target=(top===window)?Ext.getWin():Ext.getBody();this.listenersAttached=!0;target.on('transitionend','onTransitionEnd',this)},onTransitionEnd:function(e){var target=e.target,id=target.id;if(id&&this.runningAnimationsData.hasOwnProperty(id)){this.refreshRunningAnimationsData(Ext.get(target),[e.browserEvent.propertyName])}},getElementId:function(element){return element.getId?element.getId():element.id},onAnimationEnd:function(element,data,animation,isInterrupted,isReplaced){var id=this.getElementId(element),runningData=this.runningAnimationsData[id],endRules={},endData={},runningNameMap,toPropertyNames,i,ln,name;animation.un('stop','onAnimationStop',this);if(runningData){runningNameMap=runningData.nameMap}
endRules[id]=endData;if(data.onBeforeEnd){data.onBeforeEnd.call(data.scope||this,element,isInterrupted)}
animation.fireEvent('animationbeforeend',animation,element,isInterrupted);this.fireEvent('animationbeforeend',this,animation,element,isInterrupted);if(isReplaced||(!isInterrupted&&!data.preserveEndState)){toPropertyNames=data.toPropertyNames;for(i=0,ln=toPropertyNames.length;i<ln;i++){name=toPropertyNames[i];if(runningNameMap&&!runningNameMap.hasOwnProperty(name)){endData[name]=null}}}
if(data.after){Ext.merge(endData,data.after)}
this.applyStyles(endRules);if(data.onEnd){data.onEnd.call(data.scope||this,element,isInterrupted)}
animation.fireEvent('animationend',animation,element,isInterrupted);this.fireEvent('animationend',this,animation,element,isInterrupted);Ext.AnimationQueue.stop(Ext.emptyFn,animation)},onAllAnimationsEnd:function(element){var id=this.getElementId(element),transitionQueue=this.transitionQueue,endRules={};delete this.runningAnimationsData[id];endRules[id]={'transition-property':null,'transition-duration':null,'transition-timing-function':null,'transition-delay':null};delete transitionQueue.toData[id];delete transitionQueue.transitionData[id];this.applyStyles(endRules);this.fireEvent('animationallend',this,element)},hasRunningAnimations:function(element){var id=this.getElementId(element),runningAnimationsData=this.runningAnimationsData;return runningAnimationsData.hasOwnProperty(id)&&runningAnimationsData[id].sessions.length>0},refreshRunningAnimationsData:function(element,propertyNames,interrupt,replace){var id=this.getElementId(element),runningAnimationsData=this.runningAnimationsData,runningData=runningAnimationsData[id],hasCompletedSession=!1,nameMap,nameList,sessions,name,session,map,list,i,ln,j,subLn;if(!runningData){return}
nameMap=runningData.nameMap;nameList=runningData.nameList;sessions=runningData.sessions;interrupt=Boolean(interrupt);replace=Boolean(replace);if(!sessions){return this}
ln=sessions.length;if(ln===0){return this}
if(replace){runningData.nameMap={};nameList.length=0;for(i=0;i<ln;i++){session=sessions[i];this.onAnimationEnd(element,session.data,session.animation,interrupt,replace)}
sessions.length=0}else{for(i=0;i<ln;i++){session=sessions[i];map=session.map;list=session.list;for(j=0,subLn=propertyNames.length;j<subLn;j++){name=propertyNames[j];if(map[name]){delete map[name];Ext.Array.remove(list,name);session.length--;if(--nameMap[name]===0){delete nameMap[name];Ext.Array.remove(nameList,name)}}}
if(session.length===0){sessions.splice(i,1);i--;ln--;hasCompletedSession=!0;this.onAnimationEnd(element,session.data,session.animation,interrupt)}}}
if(!replace&&!interrupt&&sessions.length===0&&hasCompletedSession){this.onAllAnimationsEnd(element)}},getRunningData:function(id){var runningAnimationsData=this.runningAnimationsData;if(!runningAnimationsData.hasOwnProperty(id)){runningAnimationsData[id]={nameMap:{},nameList:[],sessions:[]}}
return runningAnimationsData[id]},getTestElement:function(){var me=this,testElement=me.testElement,iframe=me.iframe,iframeDocument,iframeStyle;if(testElement){if(testElement.ownerDocument.defaultView!==iframe.contentWindow){iframeDocument=iframe.contentDocument;iframeDocument.body.appendChild(testElement);me.testElementComputedStyle=iframeDocument.defaultView.getComputedStyle(testElement)}}else{iframe=me.iframe=document.createElement('iframe');iframe.setAttribute('data-sticky',!0);iframe.setAttribute('tabIndex',-1);iframeStyle=iframe.style;iframeStyle.setProperty('visibility','hidden','important');iframeStyle.setProperty('width','0px','important');iframeStyle.setProperty('height','0px','important');iframeStyle.setProperty('position','absolute','important');iframeStyle.setProperty('border','0px','important');iframeStyle.setProperty('zIndex','-1000','important');document.body.appendChild(iframe);iframeDocument=iframe.contentDocument;iframeDocument.open();iframeDocument.writeln('</body>');iframeDocument.close();me.testElement=testElement=iframeDocument.createElement('div');testElement.style.setProperty('position','absolute','important');iframeDocument.body.appendChild(testElement);me.testElementComputedStyle=iframeDocument.defaultView.getComputedStyle(testElement)}
return testElement},getCssStyleValue:function(name,value){var testElement=this.getTestElement(),computedStyle=this.testElementComputedStyle,style=testElement.style;style.setProperty(name,value);if(Ext.browser.is.Firefox){testElement.offsetHeight}
value=computedStyle.getPropertyValue(name);style.removeProperty(name);return value},run:function(animations){var me=this,ret=[],isLengthPropertyMap=me.lengthProperties,fromData={},toData=me.transitionQueue.toData,data={},transitionData=me.transitionQueue.transitionData,element,elementId,from,to,before,fromPropertyNames,toPropertyNames,doApplyTo,message,runningData,elementData,i,j,ln,animation,propertiesLength,sessionNameMap,computedStyle,formattedName,name,toFormattedValue,computedValue,fromFormattedValue,isLengthProperty,runningNameMap,runningNameList,runningSessions,runningSession,messageTimerFn,onBeforeStart;if(!me.listenersAttached){me.attachListeners()}
animations=Ext.Array.from(animations);for(i=0,ln=animations.length;i<ln;i++){animation=animations[i];animation=Ext.factory(animation,Ext.fx.Animation);ret.push(animation);me.activeElement=element=animation.getElement();Ext.AnimationQueue.start(Ext.emptyFn,animation);computedStyle=window.getComputedStyle(element.dom);elementId=me.getElementId(element);data[elementId]=data=Ext.merge({},animation.getData());onBeforeStart=animation.getOnBeforeStart();if(onBeforeStart){onBeforeStart.call(animation.scope||me,element)}
animation.fireEvent('animationstart',animation,data);me.fireEvent('animationstart',me,animation,data);before=data.before;from=data.from;to=data.to;data.fromPropertyNames=fromPropertyNames=[];data.toPropertyNames=toPropertyNames=[];for(name in to){if(to.hasOwnProperty(name)){to[name]=toFormattedValue=me.formatValue(to[name],name);formattedName=me.formatName(name);isLengthProperty=isLengthPropertyMap.hasOwnProperty(name);if(!isLengthProperty){toFormattedValue=me.getCssStyleValue(formattedName,toFormattedValue)}
if(from.hasOwnProperty(name)){from[name]=fromFormattedValue=me.formatValue(from[name],name);if(!isLengthProperty){fromFormattedValue=me.getCssStyleValue(formattedName,fromFormattedValue)}
if(toFormattedValue!==fromFormattedValue){fromPropertyNames.push(formattedName);toPropertyNames.push(formattedName)}}else{computedValue=computedStyle.getPropertyValue(formattedName);if(toFormattedValue!==computedValue){toPropertyNames.push(formattedName)}}}}
propertiesLength=toPropertyNames.length;if(propertiesLength===0){me.onAnimationEnd(element,data,animation);continue}
runningData=me.getRunningData(elementId);runningSessions=runningData.sessions;if(runningSessions.length>0){me.refreshRunningAnimationsData(element,Ext.Array.merge(fromPropertyNames,toPropertyNames),!0,data.replacePrevious)}
runningNameMap=runningData.nameMap;runningNameList=runningData.nameList;sessionNameMap={};for(j=0;j<propertiesLength;j++){name=toPropertyNames[j];sessionNameMap[name]=!0;if(!runningNameMap.hasOwnProperty(name)){runningNameMap[name]=1;runningNameList.push(name)}else{runningNameMap[name]++}}
runningSession={element:element,map:sessionNameMap,list:toPropertyNames.slice(),length:propertiesLength,data:data,animation:animation};runningSessions.push(runningSession);animation.on('stop','onAnimationStop',me);elementData=Ext.apply({},before);Ext.apply(elementData,from);if(runningNameList.length>0){fromPropertyNames=Ext.Array.difference(runningNameList,fromPropertyNames);toPropertyNames=Ext.Array.merge(fromPropertyNames,toPropertyNames);elementData['transition-property']=fromPropertyNames}
fromData[elementId]=elementData;toData[elementId]=Ext.apply({},to);transitionData[elementId]={'transition-property':toPropertyNames,'transition-duration':data.duration,'transition-timing-function':data.easing,'transition-delay':data.delay};animation.startTime=Date.now()}
me.activeElement=null;message=me.$className;me.applyStyles(fromData);doApplyTo=function(e){if(e.data===message&&e.source===window){window.removeEventListener('message',doApplyTo,!1);me.applyStyles(me.transitionQueue.toData)}};if(!me.messageTimerId){messageTimerFn=function(){var messageFollowupFn;me.messageTimerId=null;if(Ext.isIE){me.applyStyles(me.transitionQueue.transitionData);if(!me.messageFollowupId){messageFollowupFn=function(){me.messageFollowupId=null;window.addEventListener('message',doApplyTo,!1);window.postMessage(message,'*')};messageFollowupFn.$skipTimerCheck=!0;me.messageFollowupId=Ext.raf(messageFollowupFn)}}else{Ext.merge(me.transitionQueue.toData,me.transitionQueue.transitionData);window.addEventListener('message',doApplyTo,!1);window.postMessage(message,'*')}};messageTimerFn.$skipTimerCheck=!0;me.messageTimerId=Ext.raf(messageTimerFn)}
return ret},onAnimationStop:function(animation){var me=this,runningAnimationsData=me.runningAnimationsData,activeAnimations=0,stoppedAnimations=0,id,runningData,sessions,i,ln,session;for(id in runningAnimationsData){if(runningAnimationsData.hasOwnProperty(id)){runningData=runningAnimationsData[id];sessions=runningData.sessions;activeAnimations++;for(i=0,ln=sessions.length;i<ln;i++){session=sessions[i];if(session.animation===animation){me.refreshRunningAnimationsData(session.element,session.list.slice(),!1);if(animation.destroying){stoppedAnimations++}}}}}
if(activeAnimations===stoppedAnimations){if(me.messageFollowupId){Ext.unraf(me.messageFollowupId);me.messageFollowupId=null}
if(me.messageTimerId){Ext.unraf(me.messageTimerId);me.messageTimerId=null}
Ext.apply(me.transitionQueue,{toData:{},transitionData:{}})}}})
;
Ext.define('Ext.fx.Runner',{requires:['Ext.fx.runner.CssTransition'],constructor:function(){return new Ext.fx.runner.CssTransition()}})
;
Ext.define('Ext.fx.animation.Cube',{extend:'Ext.fx.animation.Abstract',alias:'animation.cube',config:{before:{},after:{},direction:'right',out:!1},getData:function(){var to=this.getTo(),from=this.getFrom(),before=this.getBefore(),after=this.getAfter(),out=this.getOut(),direction=this.getDirection(),el=this.getElement(),elW=el.getWidth(),origin=out?'100% 100%':'0% 0%',fromOpacity=1,toOpacity=1,transformFrom={rotateY:0,translateZ:0},transformTo={rotateY:0,translateZ:0};if(direction==="left"||direction==="right"){if(out){toOpacity=0.5;transformTo.translateZ=elW;transformTo.rotateY=-90}else{fromOpacity=0.5;transformFrom.translateZ=elW;transformFrom.rotateY=90}}
before['transform-origin']=origin;after['transform-origin']=null;to.set('transform',transformTo);from.set('transform',transformFrom);from.set('opacity',fromOpacity);to.set('opacity',toOpacity);return this.callParent(arguments)}})
;
Ext.define('Ext.fx.animation.Wipe',{extend:'Ext.fx.Animation',alternateClassName:'Ext.fx.animation.WipeIn',config:{easing:'ease-out',direction:'right',out:!1},refresh:function(){var me=this,el=me.getElement(),elBox=el.dom.getBoundingClientRect(),elWidth=elBox.width,elHeight=elBox.height,from=me.getFrom(),to=me.getTo(),out=me.getOut(),direction=me.getDirection(),maskFromX=0,maskFromY=0,maskToX=0,maskToY=0,mask,tmp;switch(direction){case 'up':if(out){mask='-webkit-gradient(linear, left top, left bottom, from(#000), to(transparent), color-stop(33%, #000), color-stop(66%, transparent))';maskFromY=elHeight*3+'px';maskToY=elHeight+'px'}else{mask='-webkit-gradient(linear, left top, left bottom, from(transparent), to(#000), color-stop(66%, #000), color-stop(33%, transparent))';maskFromY=-elHeight*2+'px';maskToY=0}
break;case 'down':if(out){mask='-webkit-gradient(linear, left top, left bottom, from(transparent), to(#000), color-stop(66%, #000), color-stop(33%, transparent))';maskFromY=-elHeight*2+'px';maskToY=0}else{mask='-webkit-gradient(linear, left top, left bottom, from(#000), to(transparent), color-stop(33%, #000), color-stop(66%, transparent))';maskFromY=elHeight*3+'px';maskToY=elHeight+'px'}
break;case 'right':if(out){mask='-webkit-gradient(linear, right top, left top, from(#000), to(transparent), color-stop(33%, #000), color-stop(66%, transparent))';maskFromX=-elWidth*2+'px';maskToX=0}else{mask='-webkit-gradient(linear, right top, left top, from(transparent), to(#000), color-stop(66%, #000), color-stop(33%, transparent))';maskToX=-elWidth*2+'px'}
break;case 'left':if(out){mask='-webkit-gradient(linear, right top, left top, from(transparent), to(#000), color-stop(66%, #000), color-stop(33%, transparent))';maskToX=-elWidth*2+'px'}else{mask='-webkit-gradient(linear, right top, left top, from(#000), to(transparent), color-stop(33%, #000), color-stop(66%, transparent))';maskFromX=-elWidth*2+'px';maskToX=0}
break}
if(!out){tmp=maskFromY;maskFromY=maskToY;maskToY=tmp;tmp=maskFromX;maskFromX=maskToX;maskToX=tmp}
from.set('mask-image',mask);from.set('mask-size',elWidth*3+'px '+elHeight*3+'px');from.set('mask-position-x',maskFromX);from.set('mask-position-y',maskFromY);to.set('mask-position-x',maskToX);to.set('mask-position-y',maskToY)}})
;
Ext.define('Ext.fx.animation.WipeOut',{extend:'Ext.fx.animation.Wipe',config:{out:!0}})
;
Ext.define('Ext.fx.easing.Bounce',{extend:'Ext.fx.easing.Abstract',config:{springTension:0.3,acceleration:30,startVelocity:0},getValue:function(){var deltaTime=Ext.Date.now()-this.getStartTime(),theta=(deltaTime/this.getAcceleration()),powTime=theta*Math.pow(Math.E,-this.getSpringTension()*theta);return this.getStartValue()+(this.getStartVelocity()*powTime)}})
;
Ext.define('Ext.fx.easing.Momentum',{extend:'Ext.fx.easing.Abstract',config:{acceleration:30,friction:0,startVelocity:0},alpha:0,updateFriction:function(friction){var theta=Math.log(1-(friction/10));this.theta=theta;this.alpha=theta/this.getAcceleration()},updateStartVelocity:function(velocity){this.velocity=velocity*this.getAcceleration()},updateAcceleration:function(acceleration){this.velocity=this.getStartVelocity()*acceleration;this.alpha=this.theta/acceleration},getValue:function(){return this.getStartValue()-this.velocity*(1-this.getFrictionFactor())/this.theta},getFrictionFactor:function(){var deltaTime=Ext.Date.now()-this.getStartTime();return Math.exp(deltaTime*this.alpha)},getVelocity:function(){return this.getFrictionFactor()*this.velocity}})
;
Ext.define('Ext.fx.easing.BoundMomentum',{extend:'Ext.fx.easing.Abstract',requires:['Ext.fx.easing.Momentum','Ext.fx.easing.Bounce'],config:{momentum:null,bounce:null,minMomentumValue:0,maxMomentumValue:0,minVelocity:0.01,startVelocity:0},applyMomentum:function(config,currentEasing){return Ext.factory(config,Ext.fx.easing.Momentum,currentEasing)},applyBounce:function(config,currentEasing){return Ext.factory(config,Ext.fx.easing.Bounce,currentEasing)},updateStartTime:function(startTime){this.getMomentum().setStartTime(startTime);this.callParent(arguments)},updateStartVelocity:function(startVelocity){this.getMomentum().setStartVelocity(startVelocity)},updateStartValue:function(startValue){this.getMomentum().setStartValue(startValue)},reset:function(){this.lastValue=null;this.isBouncingBack=!1;this.isOutOfBound=!1;return this.callParent(arguments)},getValue:function(){var momentum=this.getMomentum(),bounce=this.getBounce(),startVelocity=momentum.getStartVelocity(),direction=startVelocity>0?1:-1,minValue=this.getMinMomentumValue(),maxValue=this.getMaxMomentumValue(),boundedValue=(direction===1)?maxValue:minValue,lastValue=this.lastValue,value,velocity;if(startVelocity===0){return this.getStartValue()}
if(!this.isOutOfBound){value=momentum.getValue();velocity=momentum.getVelocity();if(Math.abs(velocity)<this.getMinVelocity()){this.isEnded=!0}
if(value>=minValue&&value<=maxValue){return value}
this.isOutOfBound=!0;bounce.setStartTime(Ext.Date.now()).setStartVelocity(velocity).setStartValue(boundedValue)}
value=bounce.getValue();if(!this.isEnded){if(!this.isBouncingBack){if(lastValue!==null){if((direction===1&&value<lastValue)||(direction===-1&&value>lastValue)){this.isBouncingBack=!0}}}else{if(Math.round(value)===boundedValue){this.isEnded=!0}}}
this.lastValue=value;return value}})
;
Ext.define('Ext.fx.easing.EaseIn',{extend:'Ext.fx.easing.Linear',alias:'easing.ease-in',config:{exponent:4,duration:1500},getValue:function(){var deltaTime=Ext.Date.now()-this.getStartTime(),duration=this.getDuration(),startValue=this.getStartValue(),endValue=this.getEndValue(),distance=this.distance,theta=deltaTime/duration,thetaEnd=Math.pow(theta,this.getExponent()),currentValue=startValue+(thetaEnd*distance);if(deltaTime>=duration){this.isEnded=!0;return endValue}
return currentValue}})
;
Ext.define('Ext.fx.easing.EaseOut',{extend:'Ext.fx.easing.Linear',alias:'easing.ease-out',config:{exponent:4,duration:1500},getValue:function(){var deltaTime=Ext.Date.now()-this.getStartTime(),duration=this.getDuration(),startValue=this.getStartValue(),endValue=this.getEndValue(),distance=this.distance,theta=deltaTime/duration,thetaC=1-theta,thetaEnd=1-Math.pow(thetaC,this.getExponent()),currentValue=startValue+(thetaEnd*distance);if(deltaTime>=duration){this.isEnded=!0;return endValue}
return currentValue}})
;
Ext.define('Ext.fx.easing.Easing',{requires:['Ext.fx.easing.Linear'],constructor:function(easing){return Ext.factory(easing,Ext.fx.easing.Linear,null,'easing')}})
;
Ext.define('Ext.fx.runner.CssAnimation',{extend:'Ext.fx.runner.Css',constructor:function(){this.runningAnimationsMap={};this.elementEndStates={};this.animationElementMap={};this.keyframesRulesCache={};this.uniqueId=0;return this.callParent(arguments)},attachListeners:function(){this.listenersAttached=!0;Ext.getWin().on({animationstart:'onAnimationStart',animationend:'onAnimationEnd',scope:this})},onAnimationStart:function(e){var name=e.browserEvent.animationName,elementId=this.animationElementMap[name],animation=this.runningAnimationsMap[elementId][name],elementEndStates=this.elementEndStates,elementEndState=elementEndStates[elementId],data={};if(elementEndState){delete elementEndStates[elementId];data[elementId]=elementEndState;this.applyStyles(data)}
if(animation.before){data[elementId]=animation.before;this.applyStyles(data)}},onAnimationEnd:function(e){var element=e.target,name=e.browserEvent.animationName,animationElementMap=this.animationElementMap,elementId=animationElementMap[name],runningAnimationsMap=this.runningAnimationsMap,runningAnimations=runningAnimationsMap[elementId],animation=runningAnimations[name];if(animation.onBeforeEnd){animation.onBeforeEnd.call(animation.scope||this,element)}
if(animation.onEnd){animation.onEnd.call(animation.scope||this,element)}
delete animationElementMap[name];delete runningAnimations[name];this.removeKeyframesRule(name)},generateAnimationId:function(){return'animation-'+(++this.uniqueId)},run:function(animations){var data={},elementEndStates=this.elementEndStates,animationElementMap=this.animationElementMap,runningAnimationsMap=this.runningAnimationsMap,runningAnimations,states,elementId,animationId,i,ln,animation,name,runningAnimation,names,durations,easings,delays,directions,iterations;if(!this.listenersAttached){this.attachListeners()}
animations=Ext.Array.from(animations);for(i=0,ln=animations.length;i<ln;i++){animation=animations[i];animation=Ext.factory(animation,Ext.fx.Animation);elementId=animation.getElement().getId();animationId=animation.getName()||this.generateAnimationId();animationElementMap[animationId]=elementId;animation=animation.getData();states=animation.states;this.addKeyframesRule(animationId,states);runningAnimations=runningAnimationsMap[elementId];if(!runningAnimations){runningAnimations=runningAnimationsMap[elementId]={}}
runningAnimations[animationId]=animation;names=[];durations=[];easings=[];delays=[];directions=[];iterations=[];for(name in runningAnimations){if(runningAnimations.hasOwnProperty(name)){runningAnimation=runningAnimations[name];names.push(name);durations.push(runningAnimation.duration);easings.push(runningAnimation.easing);delays.push(runningAnimation.delay);directions.push(runningAnimation.direction);iterations.push(runningAnimation.iteration)}}
data[elementId]={'animation-name':names,'animation-duration':durations,'animation-timing-function':easings,'animation-delay':delays,'animation-direction':directions,'animation-iteration-count':iterations};if(animation.preserveEndState){elementEndStates[elementId]=states['100%']}}
this.applyStyles(data)},addKeyframesRule:function(name,keyframes){var percentage,properties,keyframesRule,styleSheet,rules,styles,rulesLength,key,value;styleSheet=this.getStyleSheet();rules=styleSheet.cssRules;rulesLength=rules.length;styleSheet.insertRule('@'+this.vendorPrefix+'keyframes '+name+'{}',rulesLength);keyframesRule=rules[rulesLength];for(percentage in keyframes){properties=keyframes[percentage];rules=keyframesRule.cssRules;rulesLength=rules.length;styles=[];for(key in properties){value=this.formatValue(properties[key],key);key=this.formatName(key);styles.push(key+':'+value)}
keyframesRule.insertRule(percentage+'{'+styles.join(';')+'}',rulesLength)}
return this},removeKeyframesRule:function(name){var styleSheet=this.getStyleSheet(),rules=styleSheet.cssRules,i,ln,rule;for(i=0,ln=rules.length;i<ln;i++){rule=rules[i];if(rule.name===name){styleSheet.removeRule(i);break}}
return this}})
;
Ext.define('Ext.list.AbstractTreeItem',{extend:'Ext.Widget',isTreeListItem:!0,cachedConfig:{expandable:!1,expanded:!1,iconCls:'',leaf:!0,loading:!1,selected:!1,selectedParent:!1},config:{iconClsProperty:'iconCls',indent:null,owner:null,node:null,over:null,parentItem:null,text:{lazy:!0,$value:''},textProperty:'text'},updateNode:function(node){if(node){var me=this,map=me.itemMap,childNodes,owner,len,i,item,child;me.element.dom.setAttribute('data-recordId',node.internalId);if(!map){childNodes=node.childNodes;owner=me.getOwner();me.itemMap=map={};for(i=0,len=childNodes.length;i<len;++i){child=childNodes[i];if(child.data.visible){item=owner.createItem(child,me);map[child.internalId]=item;me.insertItem(item,null)}}}
me.setExpanded(node.isExpanded());me.doNodeUpdate(node)}},updateSelected:function(selected){var parent;if(!this.isConfiguring){parent=this.getParentItem();while(parent&&!parent.isRootListItem){parent.setSelectedParent(selected);parent=parent.getParentItem()}}},collapse:function(){this.getNode().collapse()},expand:function(){this.getNode().expand()},getToolElement:Ext.emptyFn,insertItem:Ext.emptyFn,isExpanded:function(){return this.getExpanded()},isSelectionEvent:Ext.emptyFn,isToggleEvent:Ext.emptyFn,nodeCollapse:function(node,collapsingForExpand){var me=this,owner=me.getOwner(),animation=me.preventAnimation?null:owner.getAnimation();me.nodeCollapseBegin(animation,collapsingForExpand);if(!animation){me.nodeCollapseEnd(collapsingForExpand)}},nodeCollapseBegin:function(animation,collapsingForExpand){var me=this,owner=me.getOwner();me.setExpanded(!1);owner.fireEvent('itemcollapse',owner,me)},nodeCollapseEnd:function(collapsingForExpand){if(!collapsingForExpand&&!this.destroying){this.getOwner().updateLayout()}},nodeExpand:function(node){var me=this,owner=me.getOwner(),floated=me.getFloated(),animation=!floated&&owner.getAnimation();me.nodeExpandBegin(animation);if(!animation){me.nodeExpandEnd()}},nodeExpandBegin:function(animation){var me=this,owner=me.getOwner();me.setExpanded(!0);owner.fireEvent('itemexpand',owner,me)},nodeExpandEnd:function(){if(!this.destroying){this.getOwner().updateLayout()}},nodeInsert:function(node,refNode){var me=this,owner=me.getOwner(),map=me.itemMap,id=node.internalId,item=owner.getItem(node),refItem=null,oldParent;if(item){oldParent=item.getParentItem();oldParent.removeItem(item);if(oldParent!==me){oldParent.doUpdateExpandable();item.setParentItem(me)}}else{item=me.getOwner().createItem(node,me)}
map[id]=item;if(refNode){refItem=map[refNode.internalId]}
me.insertItem(item,refItem);me.doUpdateExpandable();owner.fireEvent('iteminsert',owner,me,item,refItem);owner.updateLayout()},nodeRemove:function(node){var me=this,map=me.itemMap,owner=me.getOwner(),id=node.internalId,item=map[id];if(item){delete map[id];me.removeItem(item);item.destroy();me.doUpdateExpandable();owner.fireEvent('itemremove',owner,me,item);owner.updateLayout()}},nodeUpdate:function(node,modifiedFieldNames){this.doNodeUpdate(node)},onClick:function(e){var me=this,owner=me.getOwner(),node=me.getNode(),info={event:e,item:me,node:node,tree:owner,select:node.get('selectable')!==!1&&me.isSelectionEvent(e),toggle:me.isToggleEvent(e)};if(owner.fireEvent('itemclick',owner,info)!==!1){if(info.toggle){me.toggleExpanded();e.preventDefault()}
if(info.select){owner.setSelection(me.getNode())}}},removeItem:Ext.emptyFn,destroy:function(){var me=this,map=me.itemMap,owner=me.getOwner(),key;if(map){for(key in map){map[key].destroy()}
me.itemMap=null}
if(owner){owner.removeItem(me.getNode())}
me.setNode(null);me.setParentItem(null);me.setOwner(null);me.callParent()},privates:{doNodeUpdate:function(node,modifiedFieldNames){var me=this,textProperty=this.getTextProperty(),iconClsProperty=this.getIconClsProperty();if(textProperty){me.setText(node.data[textProperty])}
if(iconClsProperty){me.setIconCls(node.data[iconClsProperty])}
me.setLoading(node.isLoading());me.setLeaf(node.isLeaf());me.doUpdateExpandable()},doUpdateExpandable:function(){var node=this.getNode();this.setExpandable(node.isExpandable())},toggleExpanded:function(){if(this.isExpanded()){this.collapse()}else{this.expand()}},updateIndent:function(value){var items=this.itemMap,id;for(id in items){items[id].setIndent(value)}},updateOwner:function(owner){this.parent=owner}}})
;
Ext.define('Ext.overrides.list.AbstractTreeItem',{override:'Ext.list.AbstractTreeItem',config:{floated:null}})
;
Ext.define('Ext.list.RootTreeItem',{extend:'Ext.list.AbstractTreeItem',isRootListItem:!0,element:{reference:'element',tag:'ul',cls:Ext.baseCSSPrefix+'treelist-root-container'},insertItem:function(item,refItem){if(refItem){item.element.insertBefore(refItem.element)}else{this.element.appendChild(item.element)}},isToggleEvent:function(e){return!1}})
;
Ext.define('Ext.mixin.ItemRippler',{mixinId:'itemrippler',config:{itemRipple:null},shouldRippleItem:function(item,e){var itemRipple,ripple;if(e.getTarget(this.noItemRippleSelector,this.element)){return!1}
itemRipple=item&&this.getItemRipple();if(itemRipple&&item.isWidget){ripple=item.shouldRipple(e);if(ripple){itemRipple=Ext.apply({},itemRipple,ripple)}}
return itemRipple},rippleItem:function(item,e){if(!item){return}
var me=this,start=e.type.match(me.rippleStateRe),itemRipple=me.shouldRippleItem(item,e),release=itemRipple&&itemRipple.release,isRelease=release===!0,el=item.isWidget?item.el:item,pos,delta,rs,rippledItems;if(itemRipple&&start&&isRelease){me.$rippleStart=e.getXY()}
if(itemRipple&&el&&((!start&&isRelease)||(start&&release!==!0))){rippledItems=me.$rippledItems||(me.$rippledItems=[]);rs=me.$rippleStart;if(rs){pos=e.getXY();delta=Math.sqrt(Math.pow((pos[0]-rs[0]),2)+Math.pow((pos[1]-rs[1]),2));if(delta<=8){el.ripple(e,itemRipple);rippledItems.push(el)}}else{el.ripple(e,itemRipple);rippledItems.push(el)}
me.$rippleStart=null}},destroyAllRipples:function(){var items;for(items=this.$rippledItems;items&&items.length;){items.pop().destroyAllRipples()}},privates:{noItemRippleSelector:'.'+Ext.baseCSSPrefix+'item-no-ripple, '+'.'+Ext.baseCSSPrefix+'item-no-tap',rippleStateRe:/start|down/}})
;
Ext.define('Ext.list.TreeItem',{extend:'Ext.list.AbstractTreeItem',xtype:'treelistitem',collapsedCls:Ext.baseCSSPrefix+'treelist-item-collapsed',expandedCls:Ext.baseCSSPrefix+'treelist-item-expanded',floatedToolCls:Ext.baseCSSPrefix+'treelist-item-tool-floated',leafCls:Ext.baseCSSPrefix+'treelist-item-leaf',expandableCls:Ext.baseCSSPrefix+'treelist-item-expandable',hideIconCls:Ext.baseCSSPrefix+'treelist-item-hide-icon',loadingCls:Ext.baseCSSPrefix+'treelist-item-loading',selectedCls:Ext.baseCSSPrefix+'treelist-item-selected',selectedParentCls:Ext.baseCSSPrefix+'treelist-item-selected-parent',withIconCls:Ext.baseCSSPrefix+'treelist-item-with-icon',hoverCls:Ext.baseCSSPrefix+'treelist-item-over',rowHoverCls:Ext.baseCSSPrefix+'treelist-row-over',isTreeListItem:!0,config:{rowCls:null},rowClsProperty:'rowCls',element:{reference:'element',tag:'li',cls:Ext.baseCSSPrefix+'treelist-item',children:[{reference:'rowElement',cls:Ext.baseCSSPrefix+'treelist-row',children:[{reference:'wrapElement',cls:Ext.baseCSSPrefix+'treelist-item-wrap',children:[{reference:'iconElement',cls:Ext.baseCSSPrefix+'treelist-item-icon'},{reference:'textElement',cls:Ext.baseCSSPrefix+'treelist-item-text'},{reference:'expanderElement',cls:Ext.baseCSSPrefix+'treelist-item-expander'}]}]},{reference:'itemContainer',tag:'ul',cls:Ext.baseCSSPrefix+'treelist-container'},{reference:'toolElement',cls:Ext.baseCSSPrefix+'treelist-item-tool'}]},constructor:function(config){var toolDom;this.callParent([config]);toolDom=this.toolElement.dom;toolDom.parentNode.removeChild(toolDom)},getToolElement:function(){return this.toolElement},insertItem:function(item,refItem){if(refItem){item.element.insertBefore(refItem.element)}else{this.itemContainer.appendChild(item.element)}},isSelectionEvent:function(e){var owner=this.getOwner();return(!this.isToggleEvent(e)||!owner.getExpanderOnly()||owner.getSelectOnExpander())},isToggleEvent:function(e){var isExpand=!1;if(this.getOwner().getExpanderOnly()){isExpand=e.target===this.expanderElement.dom}else{isExpand=!this.itemContainer.contains(e.target)}
return isExpand},nodeCollapseBegin:function(animation,collapsingForExpand){var me=this,itemContainer=me.itemContainer,height;if(me.expanding){me.stopAnimation(me.expanding)}
height=animation&&itemContainer.getHeight();me.callParent([animation,collapsingForExpand]);if(animation){itemContainer.dom.style.display='block';me.collapsingForExpand=collapsingForExpand;me.collapsing=this.runAnimation(Ext.merge({from:{height:height},to:{height:0},callback:me.nodeCollapseDone,scope:me},animation))}},nodeCollapseDone:function(animation){var me=this,itemContainer=me.itemContainer;if(!me.destroying&&!me.destroyed){me.collapsing=null;itemContainer.dom.style.display='';itemContainer.setHeight(null);me.nodeCollapseEnd(me.collapsingForExpand)}},nodeExpandBegin:function(animation){var me=this,itemContainer=me.itemContainer,height;if(me.collapsing){me.stopAnimation(me.collapsing)}
me.callParent([animation]);if(animation){height=itemContainer.getHeight();itemContainer.setHeight(0);me.expanding=me.runAnimation(Ext.merge({to:{height:height},callback:me.nodeExpandDone,scope:me},animation))}},nodeExpandDone:function(){this.expanding=null;this.itemContainer.setHeight(null);this.nodeExpandEnd()},removeItem:function(item){this.itemContainer.removeChild(item.element)},updateNode:function(node,oldNode){this.syncIndent();this.callParent([node,oldNode])},updateExpandable:function(expandable){this.updateExpandCls()},updateExpanded:function(expanded){var node=this.getNode();this.updateExpandCls();if(node){node.set('expanded',expanded)}},updateIconCls:function(iconCls,oldIconCls){var me=this,el=me.element;me.doIconCls(me.iconElement,iconCls,oldIconCls);me.doIconCls(me.toolElement,iconCls,oldIconCls);el.toggleCls(me.withIconCls,!!iconCls);el.toggleCls(me.hideIconCls,iconCls===null)},updateLeaf:function(leaf){this.element.toggleCls(this.leafCls,leaf)},updateLoading:function(loading){this.element.toggleCls(this.loadingCls,loading)},updateOver:function(over){var me=this;me.element.toggleCls(me.hoverCls,!!over);me.rowElement.toggleCls(me.rowHoverCls,over>1)},updateRowCls:function(value,oldValue){this.rowElement.replaceCls(oldValue,value)},updateSelected:function(selected,oldSelected){var me=this,cls=me.selectedCls,tool=me.getToolElement();me.callParent([selected,oldSelected]);me.element.toggleCls(cls,selected);if(tool){tool.toggleCls(cls,selected)}},updateSelectedParent:function(selectedParent){var me=this,tool;me.element.toggleCls(me.selectedParentCls,selectedParent);tool=me.getToolElement();if(tool){tool.toggleCls(me.selectedCls,selectedParent)}},updateText:function(text){this.textElement.update(text)},privates:{doNodeUpdate:function(node){this.callParent([node]);this.setRowCls(node&&node.data[this.rowClsProperty])},doIconCls:function(element,iconCls,oldIconCls){if(oldIconCls){element.removeCls(oldIconCls)}
if(iconCls){element.addCls(iconCls)}},syncIndent:function(){var me=this,indent=me.getIndent(),node=me.getNode(),depth;if(node){depth=node.data.depth-1;me.wrapElement.dom.style.marginLeft=(depth*indent)+'px'}},updateExpandCls:function(){if(!this.updatingExpandCls){var me=this,expandable=me.getExpandable(),element=me.element,expanded=me.getExpanded(),expandedCls=me.expandedCls,collapsedCls=me.collapsedCls;me.updatingExpandCls=!0;element.toggleCls(me.expandableCls,expandable);if(expandable){element.toggleCls(expandedCls,expanded);element.toggleCls(collapsedCls,!expanded)}else{element.removeCls([expandedCls,collapsedCls])}
me.updatingExpandCls=!1}},updateIndent:function(value,oldValue){this.syncIndent();this.callParent([value,oldValue])}}},function(TreeItem){TreeItem.prototype.floatedCls=[Ext.Widget.prototype.floatedCls,Ext.baseCSSPrefix+'treelist-item-floated']})
;
Ext.define('Ext.overrides.list.TreeItem',{override:'Ext.list.TreeItem',setFloated:function(floated){var me=this,el=me.element,placeholder=me.placeholder,node,wasExpanded;if(me.treeItemFloated!==floated){if(floated){placeholder=el.clone(!1,!0);placeholder.id+='-placeholder';me.placeholder=Ext.get(placeholder);me.wasExpanded=me.getExpanded();me.setExpanded(!0);el.addCls(me.floatedCls);el.dom.parentNode.insertBefore(placeholder,el.dom);me.floater=me.createFloater()}else if(placeholder){wasExpanded=me.wasExpanded;node=me.getNode();me.setExpanded(wasExpanded);if(!wasExpanded&&node.isExpanded()){me.preventAnimation=!0;node.collapse();me.preventAnimation=!1}
me.floater.remove(me,!1);el.removeCls(me.floatedCls);placeholder.dom.parentNode.insertBefore(el.dom,placeholder.dom);placeholder.destroy();me.floater.destroy();me.placeholder=me.floater=null}
me.treeItemFloated=floated}},getFloated:function(){return this.treeItemFloated},runAnimation:function(animation){return this.itemContainer.addAnimation(animation)},stopAnimation:function(animation){animation.jumpToEnd()},privates:{createFloater:function(){var me=this,owner=me.getOwner(),ownerTree=me.up('treelist'),floater,toolElement=me.getToolElement(),expandedWidth=ownerTree.expandedWidth,defaultListWidth=ownerTree.defaultListWidth;if(expandedWidth===null){expandedWidth=defaultListWidth}
me.floater=floater=new Ext.container.Container({cls:ownerTree.self.prototype.element.cls+' '+ownerTree.uiPrefix+ownerTree.getUi()+' '+Ext.baseCSSPrefix+'treelist-floater',floating:!0,width:Ext.isIE8?defaultListWidth:(expandedWidth-toolElement.getWidth()),shadow:!1,hidden:!0,renderTo:Ext.getBody(),listeners:{element:'el',click:function(e){return owner.onClick(e)}}});floater.add(me);floater.show();floater.el.alignTo(toolElement,'tr?');return floater}}})
;
Ext.define('Ext.theme.triton.list.TreeItem',{override:'Ext.list.TreeItem',compatibility:Ext.isIE8,setFloated:function(floated,wasFloated){this.callParent([floated,wasFloated]);this.toolElement.syncRepaint()}})
;
Ext.define('Ext.list.Tree',{extend:'Ext.Gadget',xtype:'treelist',mixins:['Ext.mixin.ItemRippler'],requires:['Ext.list.RootTreeItem'],expanderFirstCls:Ext.baseCSSPrefix+'treelist-expander-first',expanderOnlyCls:Ext.baseCSSPrefix+'treelist-expander-only',highlightPathCls:Ext.baseCSSPrefix+'treelist-highlight-path',microCls:Ext.baseCSSPrefix+'treelist-micro',uiPrefix:Ext.baseCSSPrefix+'treelist-',element:{reference:'element',cls:Ext.baseCSSPrefix+'treelist '+Ext.baseCSSPrefix+'unselectable',listeners:{click:'onClick',touchstart:'onTouchStart',touchend:'onTouchEnd',mouseenter:'onMouseEnter',mouseleave:'onMouseLeave',mouseover:'onMouseOver'},children:[{reference:'toolsElement',cls:Ext.baseCSSPrefix+'treelist-toolstrip',listeners:{click:'onToolStripClick',mouseover:'onToolStripMouseOver'}}]},cachedConfig:{animation:{duration:500,easing:'ease'},expanderFirst:!0,expanderOnly:!0},config:{floatLeafItems:!1,defaults:{xtype:'treelistitem'},highlightPath:null,iconSize:null,indent:null,micro:!1,overItem:null,selection:null,selectOnExpander:!1,singleExpand:null,store:null,ui:null},twoWayBindable:{selection:1},publishes:{selection:1},defaultBindProperty:'store',constructor:function(config){this.callParent([config]);this.publishState('selection',this.getSelection())},destroy:function(){var me=this;me.unfloatAll();me.activeFloater=null;me.setSelection(null);me.setStore(null);me.callParent()},updateOverItem:function(over,wasOver){var map={},state=2,c,node;for(c=over;c;c=this.getItem(node.parentNode)){node=c.getNode();map[node.internalId]=!0;c.setOver(state);state=1}
if(wasOver&&!wasOver.destroyed){for(c=wasOver;c;c=this.getItem(node.parentNode)){node=c.getNode();if(map[node.internalId]){break}
c.setOver(0)}}},applyMicro:function(micro){return Boolean(micro)},applySelection:function(selection,oldSelection){var store=this.getStore();if(!store){selection=null}
if(store&&selection!==null&&!(selection instanceof Ext.data.Model)){selection=store.getNodeById(selection)}
if(selection&&selection.get('selectable')===!1){selection=oldSelection}
return selection},updateSelection:function(selection,oldSelection){var me=this,item,parent;if(!me.destroying){item=me.getItem(oldSelection);if(item){item.setSelected(!1)}
item=me.getItem(selection);if(item){item.setSelected(!0);while(parent=item.getParentItem()){parent.setExpanded(!0);item=parent}}
me.fireEvent('selectionchange',me,selection)}},applyStore:function(store){return store&&Ext.StoreManager.lookup(store,'tree')},updateStore:function(store,oldStore){var me=this,root;if(oldStore){if(!oldStore.destroyed){if(oldStore.getAutoDestroy()){oldStore.destroy()}else{me.storeListeners.destroy()}}
me.removeRoot();me.storeListeners=null}
if(store){me.storeListeners=store.on({destroyable:!0,scope:me,nodeappend:'onNodeAppend',nodecollapse:'onNodeCollapse',nodeexpand:'onNodeExpand',nodeinsert:'onNodeInsert',noderemove:'onNodeRemove',rootchange:'onRootChange',update:'onNodeUpdate',refresh:'onRefresh'});root=store.getRoot();if(root){me.createRootItem(root)}}
if(!me.destroying){me.updateLayout()}},updateExpanderFirst:function(expanderFirst){this.element.toggleCls(this.expanderFirstCls,expanderFirst)},updateExpanderOnly:function(value){this.element.toggleCls(this.expanderOnlyCls,!value)},updateHighlightPath:function(updatePath){this.element.toggleCls(this.highlightPathCls,updatePath)},updateMicro:function(micro){var me=this;if(!micro){me.unfloatAll();me.activeFloater=null}
me.element.toggleCls(me.microCls,micro)},updateUi:function(ui,oldValue){var me=this,el=me.element,uiPrefix=me.uiPrefix;if(oldValue){el.removeCls(uiPrefix+oldValue)}
if(ui){el.addCls(uiPrefix+ui)}
delete me.iconSize;me.syncIconSize()},getItem:function(node){var map=this.itemMap,ret;if(node&&map){ret=map[node.internalId]}
return ret||null},getItemConfig:function(node,parent){return Ext.apply({parentItem:parent.isRootListItem?null:parent,owner:this,node:node,indent:this.getIndent()},this.getDefaults())},privates:{checkForOutsideClick:function(e){var floater=this.activeFloater;if(!floater.element.contains(e.target)){this.unfloatAll()}},collapsingForExpand:!1,createItem:function(node,parent){var me=this,item=Ext.create(me.getItemConfig(node,parent)),toolsElement=me.toolsElement,toolEl,previousSibling;if(parent.isRootListItem){toolEl=item.getToolElement();if(toolEl){previousSibling=me.findVisiblePreviousSibling(node);if(!previousSibling){toolsElement.insertFirst(toolEl)}else{previousSibling=me.getItem(previousSibling);toolEl.insertAfter(previousSibling.getToolElement())}
toolEl.dom.setAttribute('data-recordId',node.internalId);toolEl.isTool=!0}}
me.itemMap[node.internalId]=item;return item},createRootItem:function(root){var me=this,item;me.itemMap={};me.rootItem=item=new Ext.list.RootTreeItem({indent:me.getIndent(),node:root,owner:me});me.element.appendChild(item.element);me.itemMap[root.internalId]=item},findVisiblePreviousSibling:function(node){var sibling=node.previousSibling;while(sibling){if(sibling.data.visible){return sibling}
sibling=sibling.previousSibling}
return null},floatItem:function(item,byHover){var me=this,floater;if(item.getFloated()){return}
if(me.toolMouseListeners){me.toolMouseListeners.destroy();me.floaterMouseListeners.destroy();me.floaterMouseListeners=me.toolMouseListeners=null}
me.unfloatAll();if(!byHover&&!me.getFloatLeafItems()&&item.getNode().isLeaf()){return}
me.activeFloater=floater=item;me.floatedByHover=byHover;item.setFloated(!0);if(byHover){me.toolMouseListeners=item.getToolElement().monitorMouseLeave(300,me.checkForMouseLeave,me);me.floaterMouseListeners=(item.floater||item).el.monitorMouseLeave(300,me.checkForMouseLeave,me);floater.element.on('mouseover','onMouseOver',me)}else{Ext.on('mousedown','checkForOutsideClick',me)}},shouldRippleItem:function(item,e){if(item&&item.getSelected()){return!1}
return this.mixins.itemrippler.shouldRippleItem.call(this,item,e)},onTouchStart:function(e){this.doItemRipple(e)},onTouchEnd:function(e){this.doItemRipple(e)},doItemRipple:function(e){var me=this,item=e.getTarget('[data-recordId]'),id;if(item){id=item.getAttribute('data-recordId');item=me.itemMap[id];if(item&&me.shouldRippleItem(item,e)){this.rippleItem(item,e)}}},onClick:function(e){var item=e.getTarget('[data-recordId]'),id;if(item){id=item.getAttribute('data-recordId');item=this.itemMap[id];if(item){item.onClick(e)}}},onMouseEnter:function(e){this.onMouseOver(e)},onMouseLeave:function(){this.setOverItem(null)},onMouseOver:function(e){var comp=Ext.Component.from(e);this.setOverItem(comp&&comp.isTreeListItem&&comp)},checkForMouseLeave:function(e){var floater=this.activeFloater,relatedTarget=e.getRelatedTarget();if(floater){if(relatedTarget!==floater.getToolElement().dom&&!floater.element.contains(relatedTarget)){this.unfloatAll()}}},onNodeAppend:function(parentNode,node){var item;if(parentNode){item=this.itemMap[parentNode.internalId];if(item){item.nodeInsert(node,null)}}},onNodeCollapse:function(node){var item=this.itemMap[node.internalId];if(item){item.nodeCollapse(node,this.collapsingForExpand)}},onNodeExpand:function(node){var me=this,item=me.itemMap[node.internalId],childNodes,len,i,parentNode,child;if(item){if(!item.isRootItem&&me.getSingleExpand()){me.collapsingForExpand=!0;parentNode=(item.getParentItem()||me.rootItem).getNode();childNodes=parentNode.childNodes;for(i=0,len=childNodes.length;i<len;++i){child=childNodes[i];if(child!==node){child.collapse()}}
me.collapsing=!1}
item.nodeExpand(node)}},onNodeInsert:function(parentNode,node,refNode){var item=this.itemMap[parentNode.internalId];if(item){item.nodeInsert(node,refNode)}},onNodeRemove:function(parentNode,node,isMove){var item;if(parentNode&&!isMove){item=this.itemMap[parentNode.internalId];if(item){item.nodeRemove(node)}}},onNodeUpdate:function(store,node,type,modifiedFieldNames){var item=this.itemMap[node.internalId];if(item){item.nodeUpdate(node,modifiedFieldNames)}},onRefresh:function(store){this.onRootChange(store.getRoot())},onRootChange:function(root){var me=this;me.removeRoot();if(root){me.createRootItem(root)}
me.updateLayout();me.fireEvent('refresh',me)},removeItem:function(node){var map=this.itemMap,id=node.internalId,item,toolEl;if(map){item=map[id];if(item.getParentItem()===null){toolEl=item.getToolElement();if(toolEl){this.toolsElement.removeChild(toolEl)}}
delete map[id]}},removeRoot:function(){var me=this,rootItem=me.rootItem;if(rootItem){me.element.removeChild(rootItem.element);me.rootItem=me.itemMap=Ext.destroy(rootItem)}},onToolStripClick:function(e){var item=e.getTarget('[data-recordId]'),id;if(item){id=item.getAttribute('data-recordId');item=this.itemMap[id];if(item){if(item===this.activeFloater){this.unfloatAll()}else{this.floatItem(item,!1)}}}},onToolStripMouseOver:function(e){var item=e.getTarget('[data-recordId]'),id;if(item){id=item.getAttribute('data-recordId');item=this.itemMap[id];if(item){this.floatItem(item,!0)}}},syncIconSize:function(){var me=this,size=me.iconSize||(me.iconSize=parseInt(me.element.getStyle('background-position'),10));me.setIconSize(size)},unfloatAll:function(){var me=this,floater=me.activeFloater;if(floater){floater.setFloated(!1);me.activeFloater=null;if(me.floatedByHover){if(me.toolMouseListeners){me.toolMouseListeners.destroy();me.floaterMouseListeners.destroy();me.floaterMouseListeners=me.toolMouseListeners=null}
floater.element.un('mouseover','onMouseOver',me)}else{Ext.un('mousedown','checkForOutsideClick',me)}}},defaultIconSize:22,updateIconSize:function(value){this.setIndent(value||this.defaultIconSize)},updateIndent:function(value){var rootItem=this.rootItem;if(rootItem){rootItem.setIndent(value)}}}})
;
Ext.define('Ext.overrides.list.Tree',{override:'Ext.list.Tree',canMeasure:!0,constructor:function(config){this.callParent([config]);if(!Ext.isIE8){this.element.on('resize','onElResize',this)}},beforeLayout:function(){this.syncIconSize()},onElResize:function(el,details){if(!this.getMicro()&&this.canMeasure){this.expandedWidth=details.width}},privates:{defaultListWidth:200,expandedWidth:null}})
;
Ext.define('Ext.mixin.ConfigProxy',function(ConfigProxy){return{extend:'Ext.Mixin',mixinConfig:{id:'configproxy',extended:function(baseClass,derivedClass,classBody){var proxyConfig=classBody.proxyConfig;derivedClass.$configProxies=Ext.apply({},derivedClass.superclass.self.$configProxies);if(proxyConfig){delete classBody.proxyConfig;ConfigProxy.processClass(derivedClass,proxyConfig)}}},onClassMixedIn:function(targetClass){var prototype=targetClass.prototype,proxyConfig=prototype.proxyConfig,initConfig=prototype.initConfig;prototype.$proxiedConfigs=null;targetClass.$configProxies={};prototype.initConfig=function(config){initConfig.apply(this,arguments);this.$proxiedConfigs=null;return this};if(proxyConfig){delete prototype.proxyConfig;ConfigProxy.processClass(targetClass,proxyConfig)}},getProxiedConfigs:function(name){var me=this,configs=me.config,configProxies=me.self.$configProxies[name],i=configProxies&&configProxies.length,cfg,proxiedConfigs,ret,s,v;if(i&&me.isConfiguring){proxiedConfigs=me.$proxiedConfigs||(me.$proxiedConfigs={});while(i-->0){cfg=configProxies[i];proxiedConfigs[s=cfg.name]=cfg;if((v=configs[s])!==undefined){(ret||(ret={}))[s]=v}}}
return ret},mergeProxiedConfigs:function(name,itemConfig,alwaysClone){var me=this,ret=itemConfig,proxied=me.getProxiedConfigs(name),configurator;if(proxied){if(!itemConfig){ret=proxied}else if(itemConfig.constructor===Object){configurator=me.self.getConfigurator();ret=configurator.merge(me,Ext.clone(itemConfig),proxied)}}
if(alwaysClone&&ret===itemConfig){ret=Ext.clone(ret)}
return ret},statics:{processClass:function(targetClass,proxyConfig){var ExtConfig=Ext.Config,targetProto=targetClass.prototype,add={},proxies=targetClass.$configProxies,cfg,configs,itemGetter,i,item,methods,n,name,proxiedConfigs,s;for(item in proxyConfig){itemGetter=ExtConfig.get(item).names.get;configs=proxyConfig[item];if(Ext.isArray(configs)){methods=null}else{methods=configs.methods;configs=configs.configs}
if(!(proxiedConfigs=proxies[item])){proxies[item]=proxiedConfigs=[]}else{proxies[item]=proxiedConfigs=proxiedConfigs.slice()}
for(i=0,n=methods&&methods.length;i<n;++i){if(!targetProto[name=methods[i]]){targetProto[name]=ConfigProxy.wrapFn(itemGetter,name)}else{Ext.raise('Cannot proxy method "'+name+'"')}}
for(i=0,n=configs&&configs.length;i<n;++i){cfg=ExtConfig.get(s=configs[i]);if(s in add){Ext.raise('Duplicate proxy config definitions for "'+s+'"')}
if(s in targetProto.config){Ext.raise('Config "'+s+'" already defined for class '+targetProto.$className)}
add[s]=undefined;proxiedConfigs.push(cfg);if(!targetProto[name=cfg.names.get]){targetProto[name]=ConfigProxy.wrapGet(itemGetter,name)}else{Ext.raise('Cannot proxy "'+s+'" config getter')}
if(!targetProto[name=cfg.names.set]){targetProto[name]=ConfigProxy.wrapSet(itemGetter,name,s)}else{Ext.raise('Cannot proxy "'+s+'" config setter')}}}
targetClass.addConfig(add)},wrapFn:function(itemGetter,name){return function(){var item=this[itemGetter]();return item&&item[name].apply(item,arguments)}},wrapGet:function(itemGetter,configGetter){return function(){var item=this[itemGetter]();return item&&item[configGetter]()}},wrapSet:function(itemGetter,configSetter,itemName){return function(value){var me=this,item,proxiedConfigs;if(!me.isConfiguring||value!==undefined){item=me[itemGetter]();proxiedConfigs=me.$proxiedConfigs;if(proxiedConfigs&&proxiedConfigs[itemName]){delete proxiedConfigs[itemName];item=null}
if(item){item[configSetter](value)}}
return me}}}}})
;
Ext.define('Ext.mixin.ConfigState',{extend:'Ext.Mixin',mixinConfig:{id:'configstate'},alternateStateConfig:'',toggleConfigState:function(isAlternate){var me=this,state=me.capturedConfigState,cfg=me.getConfig(me.alternateStateConfig),key;if(!cfg){return}
if(isAlternate){state={};for(key in cfg){state[key]=me.getConfig(key)}
me.capturedConfigState=state;me.setConfig(cfg)}else if(!me.isConfiguring&&state){me.setConfig(state);delete me.capturedConfigState}}})
;
Ext.define('Ext.mixin.Container',{extend:'Ext.Mixin',mixinConfig:{id:'container'},isContainer:!0,nameHolder:!1,referenceHolder:!1,getNamedItems:function(){if(Ext.referencesDirty){Ext.fixReferences()}
return this.nameRefs||null},getReferences:function(){if(Ext.referencesDirty){Ext.fixReferences()}
return this.refs||null},lookup:function(ref){var refs=this.getReferences();return(refs&&refs[ref])||null},lookupName:function(name){var items=this.getNamedItems();return(items&&items[name])||null},lookupReference:function(ref){return this.lookup(ref)},privates:{attachNameRef:function(component){var me=this,key=component.name||component._name,entry,nameRefs;if(key&&!me.destroying&&!me.destroyed){nameRefs=me.nameRefs||(me.nameRefs={});entry=nameRefs[key];if(!entry){entry=component.shareableName?[component]:component}else if(!entry.isInstance){entry.push(component)}else{Ext.raise('Duplicate name: "'+key+'" on '+me.id+' between '+entry.id+' and '+component.id)}
nameRefs[key]=entry}},attachReference:function(component){var me=this,key,refs;if(!me.destroying&&!me.destroyed){refs=me.refs||(me.refs={});key=component.referenceKey;if(refs[key]&&refs[key]!==component){Ext.log.warn('Duplicate reference: "'+key+'" on '+me.id)}
refs[key]=component}},containerOnAdded:function(component,instanced){Ext.ComponentManager.markReferencesDirty()},containerOnRemoved:function(destroying){if(!destroying){Ext.ComponentManager.markReferencesDirty()}},initContainerInheritedState:function(inheritedState,inheritedStateInner){var me=this,controller=me.getController(),session=me.getSession(),viewModel=me.getConfig('viewModel',!0),reference=me.reference,referenceHolder=me.referenceHolder;if(me.nameHolder){inheritedState.nameHolder=me}
if(controller){inheritedState.referenceHolder=controller;referenceHolder=!0}else if(referenceHolder){inheritedState.referenceHolder=me}
if(referenceHolder){inheritedState.referencePath=''}else if(reference&&me.isParentReference){inheritedState.referencePath=me.referenceKey+'.'}
if(session){inheritedState.session=session}
if(viewModel){inheritedState.viewModelPath=''}else if(reference&&me.isParentReference){inheritedState.viewModelPath=me.viewModelKey+'.'}},setupReference:function(reference){var len;if(reference&&reference.charAt(len=reference.length-1)==='>'){this.isParentReference=!0;reference=reference.substring(0,len)}
if(reference&&!Ext.validIdRe.test(reference)){Ext.Error.raise('Invalid reference "'+reference+'" for '+this.getId()+' - not a valid identifier')}
return reference}}})
;
Ext.define('Ext.util.KeyMap',{alternateClassName:'Ext.KeyMap',eventName:'keydown',constructor:function(config){var me=this;if((arguments.length!==1)||(typeof config==='string')||config.dom||config.tagName||config===document||config.isComponent){Ext.raise("Legacy multi-argument KeyMap constructor is removed. "+"Use a config object instead.")}
Ext.apply(me,config);me.bindings=[];if(!me.target.isComponent){me.target=Ext.get(me.target)}
if(me.binding){me.addBinding(me.binding)}else if(config.key){me.addBinding(config)}
me.enable()},addBinding:function(binding){var me=this,keyCode=binding.key,i,len;if(me.processing){me.bindings=me.bindings.slice(0)}
if(Ext.isArray(binding)){for(i=0,len=binding.length;i<len;i++){me.addBinding(binding[i])}
return}
me.bindings.push(Ext.apply({keyCode:me.processKeys(keyCode)},binding))},removeBinding:function(binding){var me=this,bindings=me.bindings,len=bindings.length,i,item,keys;if(me.processing){me.bindings=bindings.slice(0)}
keys=me.processKeys(binding.key);for(i=0;i<len;i++){item=bindings[i];if((item.fn||item.handler)===(binding.fn||binding.handler)&&item.scope===binding.scope){if(binding.alt===item.alt&&binding.ctrl===item.ctrl&&binding.shift===item.shift){if(Ext.Array.equals(item.keyCode,keys)){Ext.Array.erase(me.bindings,i,1);return}}}}},processKeys:function(keyCode){var processed=!1,key,keys,keyString,len,i;if(keyCode.test){return keyCode}
if(Ext.isString(keyCode)){keys=[];keyString=keyCode.toUpperCase();for(i=0,len=keyString.length;i<len;i++){keys.push(keyString.charCodeAt(i))}
keyCode=keys;processed=!0}
if(!Ext.isArray(keyCode)){keyCode=[keyCode]}
if(!processed){for(i=0,len=keyCode.length;i<len;i++){key=keyCode[i];if(Ext.isString(key)){keyCode[i]=key.toUpperCase().charCodeAt(0)}}}
return keyCode},handleTargetEvent:function(event){var me=this,bindings,i,len,result;if(me.enabled){bindings=me.bindings;event=me.processEvent.apply(me.processEventScope||me,arguments);if(event){me.lastKeyEvent=event;if(me.ignoreInputFields&&Ext.fly(event.target).isInputField()){return}
if(!event.getKey){return event}
me.processing=!0;for(i=0,len=bindings.length;i<len;i++){result=me.processBinding(bindings[i],event);if(result===!1){me.processing=!1;return result}}
me.processing=!1}}},processEvent:Ext.identityFn,processBinding:function(binding,event){if(this.checkModifiers(binding,event)){var key=event.getKey(),handler=binding.fn||binding.handler,scope=binding.scope||this,keyCode=binding.keyCode,defaultEventAction=binding.defaultEventAction,i,len,result;if(keyCode.test){if(keyCode.test(String.fromCharCode(event.getCharCode()))){result=handler.call(scope,key,event);if(result!==!0&&defaultEventAction){event[defaultEventAction]()}
if(result===!1){return result}}}else if(keyCode.length){for(i=0,len=keyCode.length;i<len;i++){if(key===keyCode[i]){result=handler.call(scope,key,event);if(result!==!0&&defaultEventAction){event[defaultEventAction]()}
if(result===!1){return result}
break}}}}},checkModifiers:function(binding,event){var keys=['shift','ctrl','alt'],i,len,val,key;for(i=0,len=keys.length;i<len;i++){key=keys[i];val=binding[key];if(!(val===undefined||(val===event[key+'Key']))){return!1}}
return!0},on:function(key,fn,scope){var keyCode,shift,ctrl,alt;if(Ext.isObject(key)&&!Ext.isArray(key)){keyCode=key.key;shift=key.shift;ctrl=key.ctrl;alt=key.alt}else{keyCode=key}
this.addBinding({key:keyCode,shift:shift,ctrl:ctrl,alt:alt,fn:fn,scope:scope})},un:function(key,fn,scope){var keyCode,shift,ctrl,alt;if(Ext.isObject(key)&&!Ext.isArray(key)){keyCode=key.key;shift=key.shift;ctrl=key.ctrl;alt=key.alt}else{keyCode=key}
this.removeBinding({key:keyCode,shift:shift,ctrl:ctrl,alt:alt,fn:fn,scope:scope})},isEnabled:function(){return!!this.enabled},enable:function(){var me=this;if(!me.enabled){me.target.on(me.eventName,me.handleTargetEvent,me,{capture:me.capture,priority:me.priority});me.enabled=!0}},disable:function(){var me=this;if(me.enabled){if(!me.target.destroyed){me.target.removeListener(me.eventName,me.handleTargetEvent,me)}
me.enabled=!1}},setDisabled:function(disabled){if(disabled){this.disable()}else{this.enable()}},destroy:function(removeTarget){var me=this,target=me.target;me.bindings=[];me.disable();me.target=null;if(removeTarget){target.destroy();Ext.raise("Using removeTarget argument in KeyMap destructor is not supported.")}
me.callParent()}})
;
Ext.define('Ext.util.KeyNav',{alternateClassName:'Ext.KeyNav',requires:['Ext.util.KeyMap'],disabled:!1,defaultEventAction:!1,forceKeyDown:!1,eventName:'keypress',statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(config){var me=this,keymapCfg,map;if(arguments.length===2){Ext.raise("2-argument KeyNav constructor is removed. Use a config object instead.")}
config=config||{};keymapCfg={target:config.target,ignoreInputFields:config.ignoreInputFields,eventName:me.getKeyEvent('forceKeyDown' in config?config.forceKeyDown:me.forceKeyDown,config.eventName),capture:config.capture};if(me.map){me.map.destroy()}
me.initConfig(config);if(config.processEvent){keymapCfg.processEvent=config.processEvent;keymapCfg.processEventScope=config.processEventScope||me}
if(config.priority){keymapCfg.priority=config.priority}
if(config.keyMap){map=me.map=config.keyMap}else{map=me.map=new Ext.util.KeyMap(keymapCfg);me.destroyKeyMap=!0}
me.addBindings(config);map.disable();if(!config.disabled){map.enable()}},addBindings:function(bindings){var me=this,map=me.map,keyCodes=Ext.util.KeyNav.keyOptions,Event=Ext.event.Event,defaultScope=bindings.scope||me,binding,keyName,keyCode;for(keyName in bindings){binding=bindings[keyName];keyCode=keyName.length===1?keyName.charCodeAt(0):(keyCodes[keyName]||Event[keyName.toUpperCase()]);if(keyCode!=null){keyName=keyCode}
if(binding&&(keyName.length===1||!isNaN(keyName=parseInt(keyName,10)))){if(typeof binding==='function'){binding={handler:binding,defaultEventAction:(bindings.defaultEventAction!==undefined)?bindings.defaultEventAction:me.defaultEventAction}}
map.addBinding({key:keyName,ctrl:binding.ctrl,shift:binding.shift,alt:binding.alt,handler:Ext.Function.bind(me.handleEvent,binding.scope||defaultScope,[binding.handler||binding.fn,me],!0),defaultEventAction:(binding.defaultEventAction!==undefined)?binding.defaultEventAction:me.defaultEventAction})}}},handleEvent:function(keyCode,event,handler,keyNav){keyNav.lastKeyEvent=event;return handler.call(this,event)},destroy:function(removeEl){var me=this;if(removeEl){Ext.raise("removeEl argument in KeyNav destructor is not supported anymore.")}
if(me.destroyKeyMap){me.map.destroy(removeEl)}
me.map=null;me.callParent()},enable:function(){if(this.map){this.map.enable();this.disabled=!1}},disable:function(){if(this.map){this.map.disable()}
this.disabled=!0},setDisabled:function(disabled){this.map.setDisabled(disabled);this.disabled=disabled},isEnabled:function(){return!this.disabled},getKeyEvent:function(forceKeyDown,configuredEventName){if(forceKeyDown||(Ext.supports.SpecialKeyDownRepeat&&!configuredEventName)){return'keydown'}else{return configuredEventName||this.eventName}}})
;
Ext.define('Ext.mixin.FocusableContainer',{extend:'Ext.Mixin',requires:['Ext.util.KeyNav'],mixinConfig:{id:'focusablecontainer'},isFocusableContainer:!0,focusableContainer:!1,resetFocusPosition:!1,activeChildTabIndex:0,inactiveChildTabIndex:-1,allowFocusingDisabledChildren:!1,focusableContainerEl:'el',privates:{initFocusableContainer:function(clearChildren){var items,i,len;if(this.focusableContainer){clearChildren=clearChildren!=null?clearChildren:!0;this.doInitFocusableContainer(clearChildren)}else{items=this.getFocusables();for(i=0,len=items.length;i<len;i++){items[i].ownerFocusableContainer=null}}},doInitFocusableContainer:function(clearChildren){var me=this,el=me.focusableContainerEl,child;if(!el.isElement){el=me.focusableContainerEl=me[el]}
if(me.initFocusableContainerKeyNav){me.initFocusableContainerKeyNav(el)}
if(clearChildren){me.clearFocusables();if(!me.isDisabled()){child=me.findNextFocusableChild({step:1})||me.findNextFocusableChild({beforeRender:!0});if(child){me.activateFocusable(child)}}}
child=me.findNextFocusableChild({firstTabbable:!0});me.activateFocusableContainer(!!child&&!me.isDisabled())},initFocusableContainerKeyNav:function(el){var me=this;if(!me.focusableKeyNav){el=el||me.focusableContainerEl;me.focusableKeyNav=new Ext.util.KeyNav({target:el,disabled:!0,eventName:'keydown',processEvent:me.processFocusableContainerKeyEvent,processEventScope:me,scope:me,tab:me.onFocusableContainerTabKey,enter:{handler:me.onFocusableContainerEnterKey,ctrl:!1,shift:!1,alt:!1},space:{handler:me.onFocusableContainerSpaceKey,ctrl:!1,shift:!1,alt:!1},up:{handler:me.onFocusableContainerUpKey,ctrl:!1,shift:!1,alt:!1},down:{handler:me.onFocusableContainerDownKey,ctrl:!1,shift:!1,alt:!1},left:{handler:me.onFocusableContainerLeftKey,ctrl:!1,shift:!1,alt:!1},right:{handler:me.onFocusableContainerRightKey,ctrl:!1,shift:!1,alt:!1}})}},destroyFocusableContainer:function(){this.focusableKeyNav=Ext.destroy(this.focusableKeyNav)},activateFocusableContainer:function(enable){var keyNav=this.focusableKeyNav;if(keyNav){keyNav.setDisabled(!enable)}},isFocusableContainerActive:function(){var keyNav=this.focusableKeyNav;return keyNav?!keyNav.disabled:!1},getFocusables:function(){return this.items.items},initDefaultFocusable:function(){var me=this,haveFocusable=!1,items,item,i,len;items=me.getFocusables();len=items.length;if(!len){return}
for(i=0;i<len;i++){item=items[i];if(!item.isDisabled()&&item.isFocusable()){haveFocusable=!0;break}}
if(!haveFocusable){return}
item=me.findNextFocusableChild({items:items,step:!0});if(item){me.activateFocusable(item)}
return item},clearFocusables:function(skipFocused){var me=this,items=me.getFocusables(),len=items.length,item,i;for(i=0;i<len;i++){item=items[i];if(!item.destroyed&&item.focusable&&item.isTabbable()){me.deactivateFocusable(item)}}},processFocusableContainerKeyEvent:function(e){if(!Ext.fly(e.target).isInputField()){return e}},activateFocusable:function(child){child.setTabIndex(this.activeChildTabIndex)},deactivateFocusable:function(child){child.setTabIndex(this.inactiveChildTabIndex)},onFocusableContainerTabKey:function(){return!0},onFocusableContainerEnterKey:function(){return!0},onFocusableContainerSpaceKey:function(){return!0},onFocusableContainerUpKey:function(e){e.preventDefault();return this.moveChildFocus(e,!1)},onFocusableContainerDownKey:function(e){e.preventDefault();return this.moveChildFocus(e,!0)},onFocusableContainerLeftKey:function(e){e.preventDefault();return this.moveChildFocus(e,!1)},onFocusableContainerRightKey:function(e){e.preventDefault();return this.moveChildFocus(e,!0)},getFocusableFromEvent:function(e){var child=Ext.Component.from(e);if(!child){Ext.raise("No focusable child found for keyboard event!")}
return child},moveChildFocus:function(e,forward){var child=this.getFocusableFromEvent(e);return this.focusChild(child,forward,e)},focusChild:function(child,forward){var nextChild=this.findNextFocusableChild({child:child,step:forward});if(nextChild){nextChild.focus()}
return nextChild},findNextFocusableChild:function(options){var beforeRender=options.beforeRender,firstTabbable=options.firstTabbable,items,item,child,step,idx,i,len,allowDisabled;items=options.items||this.getFocusables();step=options.step!=null?options.step:1;child=options.child;allowDisabled=!!this.allowFocusingDisabledChildren;idx=Ext.Array.indexOf(items,child);step=step===!0?1:step===!1?-1:step;len=items.length;i=step>0?(idx<len?idx+step:0):(idx>0?idx+step:len-1);for(;;i+=step){if(idx<0&&(i>=len||i<0)){return null}else if(i>=len){i=-1;continue}else if(i<0){i=len;continue}else if(i===idx){return null}
item=items[i];if(!item||!item.focusable||(item.isDisabled()&&!allowDisabled)){continue}
if(firstTabbable){if(item.isTabbable&&item.isTabbable()){return item}}else if(beforeRender||(item.isFocusable&&item.isFocusable())){return item}}
return null},onFocusEnter:function(e){var me=this,target=e.toComponent,child;if(target===me){child=me.initDefaultFocusable();if(child){child.focus()}}
me.activateFocusableContainer(!0)},onFocusLeave:function(e){var me=this;if(me.resetFocusPosition){me.clearFocusables();me.initDefaultFocusable()}},beforeFocusableChildBlur:Ext.privateFn,afterFocusableChildBlur:Ext.privateFn,beforeFocusableChildFocus:function(child){var me=this;if(!me.focusableContainer||me.destroying||me.destroyed){return}
me.clearFocusables();me.activateFocusable(child)},afterFocusableChildFocus:function(child){var me=this;if(!me.focusableContainer||me.destroying||me.destroyed){return}
me.lastFocusedChild=child},onFocusableChildAdd:function(child){var me=this;if(child.focusable){child.ownerFocusableContainer=me}},onFocusableChildRemove:function(child){var me=this,next;child.ownerFocusableContainer=null;if(child===me.lastFocusedChild){me.lastFocusedChild=null;next=me.initDefaultFocusable();if(child.hasFocus){next=next||child.findFocusTarget();if(next){next.focus()}}}
child=next||me.findNextFocusableChild({step:1,beforeRender:!0});if(!child){me.activateFocusableContainer(!1)}},beforeFocusableChildEnable:Ext.privateFn,onFocusableChildEnable:function(child){var me=this,active;if(!me.focusableContainer||me.destroying||me.destroyed){return}
if(me.containsFocus){active=Ext.ComponentManager.getActiveComponent();me.clearFocusables();me.activateFocusable(active)}else if(me.resetFocusPosition||me.lastFocusedChild==null){me.clearFocusables();if(child.hasFocus){me.activateFocusable(child);active=child}}else{me.deactivateFocusable(child);if(child===me.lastFocusedChild){me.clearFocusables();me.activateFocusable(child)}
active=me.findNextFocusableChild({firstTabbable:!0})}
if(!active){me.initDefaultFocusable()}
me.activateFocusableContainer(!0)},beforeFocusableChildDisable:function(child){var me=this,next;if(!me.focusableContainer||me.destroying||me.destroyed){return}
if(child.hasFocus){next=me.findNextFocusableChild({child:child})||child.findFocusTarget();if(next){next.focus()}}},onFocusableChildDisable:function(child){var me=this,next;if(!me.focusableContainer||me.destroying||me.destroyed){return}
next=me.findNextFocusableChild({firstTabbable:!0});if(!next){next=me.initDefaultFocusable()}
if(!next){me.activateFocusableContainer(!1)}},beforeFocusableChildHide:function(child){return this.beforeFocusableChildDisable(child)},onFocusableChildHide:function(child){return this.onFocusableChildDisable(child)},beforeFocusableChildShow:function(child){return this.beforeFocusableChildEnable(child)},onFocusableChildShow:function(child){return this.onFocusableChildEnable(child)},onFocusableChildMasked:Ext.privateFn,onFocusableChildDestroy:Ext.privateFn,onFocusableChildUpdate:Ext.privateFn},deprecated:{7:{configs:{enableFocusableContainer:'focusableContainer'}}}})
;
Ext.define('Ext.mixin.Hookable',{extend:'Ext.Mixin',mixinConfig:{id:'hookable'},bindHook:function(instance,boundMethod,bindingMethod,preventDefault,extraArgs){instance.afterMethod(boundMethod,bindingMethod||boundMethod,this,preventDefault,extraArgs);return this},unbindHook:function(instance,boundMethod,bindingMethod){instance.removeMethodListener(boundMethod,bindingMethod||boundMethod,this);return this}})
;
Ext.define('Ext.mixin.Mashup',function(Mashup){return{extend:'Ext.Mixin',mixinConfig:{id:'mashup',extended:function(baseClass,derivedClass){Mashup.process(derivedClass)}},statics:{process:function(targetClass){var body=targetClass.prototype,requiredScripts=body.requiredScripts,hooks=targetClass._classHooks,onCreated=hooks.onCreated,xtypes=targetClass.prototype.xtypes,mashup=Ext.manifest.mashup||{},options=body.mashupConfig,i,script;if(requiredScripts){delete body.requiredScripts;hooks.onCreated=function(){var me=this,scripts=[],args=Ext.Array.slice(arguments),redirect=mashup.redirect||{};requiredScripts=scripts.concat(requiredScripts);options=options&&mashup[options.key];if(xtypes){for(i=0;!options&&i<xtypes.length;++i){options=mashup[xtypes[i]]}}
for(i=0;i<requiredScripts.length;i++){script=requiredScripts[i];if(redirect[script]===!1){continue}
script=redirect[script]||script;if(script.indexOf('{')>-1){if(options){script=new Ext.Template(script).apply(options)}else{Ext.log.error('Missing mashup options for '+body.$className+' script "'+script+'"')}}
scripts.push(script)}
if(!scripts.length){hooks.onCreated=onCreated;hooks.onCreated.call(me,args);return}
Ext.Loader.loadScripts({url:scripts,cache:!0,onError:function(opts,error){targetClass.scriptError=targetClass.prototype.scriptError=error;hooks.onCreated=onCreated;hooks.onCreated.call(me,args)},onLoad:function(){hooks.onCreated=onCreated;hooks.onCreated.call(me,args)}})}}}},onClassMixedIn:function(targetClass){Mashup.process(targetClass)}}})
;
Ext.define('Ext.mixin.Selectable',{extend:'Ext.Mixin',mixinConfig:{id:'selectable',after:{updateStore:'updateStore'}},config:{disableSelection:null,mode:'SINGLE',allowDeselect:!1,lastSelected:null,lastFocused:null,deselectOnContainerClick:!0,selected:!0,pruneRemoved:!0,selection:null,twoWayBindable:{selection:1},publishes:{selection:1}},modes:{SINGLE:!0,SIMPLE:!0,MULTI:!0},onNavigate:function(event){},selectableEventHooks:{add:'onSelectionStoreAdd',remove:'onSelectionStoreRemove',update:'onSelectionStoreUpdate',clear:{fn:'onSelectionStoreClear',priority:1000},load:'refreshSelection',refresh:'refreshSelection'},initSelectable:function(){this.publishState('selection',this.getSelection())},applySelected:function(selected){if(!selected.isCollection){selected=new Ext.util.Collection(selected)}
selected.addObserver(this);return selected},applyMode:function(mode){mode=mode?mode.toUpperCase():'SINGLE';return this.modes[mode]?mode:'SINGLE'},updateStore:function(newStore,oldStore){var me=this,bindEvents=Ext.apply({},me.selectableEventHooks,{scope:me});if(oldStore&&Ext.isObject(oldStore)&&oldStore.isStore){if(oldStore.autoDestroy){oldStore.destroy()}else{oldStore.un(bindEvents)}}
if(newStore){newStore.on(bindEvents);me.refreshSelection()}},selectAll:function(silent){var me=this,selections=me.getStore().getRange();me.select(selections,!0,silent)},deselectAll:function(supress){var me=this;me.deselect(me.getSelected().getRange(),supress);me.setLastSelected(null);me.setLastFocused(null)},updateSelection:function(selection){if(this.changingSelection){return}
if(selection){this.select(selection)}else{this.deselectAll()}},selectWithEvent:function(record){var me=this,isSelected=me.isSelected(record);switch(me.getMode()){case 'MULTI':case 'SIMPLE':if(isSelected){me.deselect(record)}else{me.select(record,!0)}
break;case 'SINGLE':if(me.getAllowDeselect()&&isSelected){me.deselect(record)}else{me.select(record,!1)}
break}},selectRange:function(startRecord,endRecord,keepExisting){var me=this,store=me.getStore(),records=[],tmp,i;if(me.getDisableSelection()){return}
if(startRecord>endRecord){tmp=endRecord;endRecord=startRecord;startRecord=tmp}
for(i=startRecord;i<=endRecord;i++){records.push(store.getAt(i))}
this.doMultiSelect(records,keepExisting)},select:function(records,keepExisting,suppressEvent){var me=this,record;if(me.getDisableSelection()){return}
if(typeof records==="number"){records=[me.getStore().getAt(records)]}
if(!records){return}
if(me.getMode()==="SINGLE"&&records){record=records.length?records[0]:records;me.doSingleSelect(record,suppressEvent)}else{me.doMultiSelect(records,keepExisting,suppressEvent)}},doSingleSelect:function(record,suppressEvent){this.doMultiSelect([record],!1,suppressEvent)},doMultiSelect:function(records,keepExisting,suppressEvent){if(records===null||this.getDisableSelection()){return}
records=!Ext.isArray(records)?[records]:records;var me=this,selected=me.getSelected(),selectionCount=selected.getCount(),store=me.getStore(),toRemove=[],record,i,len;if(!keepExisting&&selectionCount){toRemove=selected.getRange()}
for(i=0,len=records.length;i<len;i++){record=records[i];if(typeof record==='number'){records[i]=store.getAt(record)}}
selected.suppressEvent=suppressEvent;selected.splice(selectionCount,toRemove,records);selected.suppressEvent=!1},deselect:function(records,suppressEvent){var me=this,selected,store,record,i,len;if(me.getDisableSelection()){return}
records=Ext.isArray(records)?records:[records];selected=me.getSelected();store=me.getStore();for(i=0,len=records.length;i<len;i++){record=records[i];if(typeof record==='number'){records[i]=store.getAt(record)}}
selected.suppressEvent=suppressEvent;selected.remove(records);selected.suppressEvent=!1},onCollectionRemove:function(selectedCollection,chunk){var me=this,lastSelected=me.getLastSelected(),records=chunk.items;if(lastSelected&&!selectedCollection.contains(lastSelected)){me.setLastSelected(selectedCollection.last())}
me.onItemDeselect(records,selectedCollection.suppressEvent);if(!selectedCollection.suppressEvent){me.fireSelectionChange(records)}},onCollectionAdd:function(selectedCollection,adds){var me=this,records=adds.items;me.setLastSelected(selectedCollection.last());me.onItemSelect(records,selectedCollection.suppressEvent);if(!selectedCollection.suppressEvent){me.fireSelectionChange(records)}},updateLastFocused:function(newRecord,oldRecord){this.onLastFocusChanged(oldRecord,newRecord)},fireSelectionChange:function(records){var me=this;me.changingSelection=!0;me.setSelection(me.getLastSelected()||null);me.changingSelection=!1;me.fireAction('selectionchange',[me,records],'getSelections')},getSelections:function(){return this.getSelected().getRange()},isSelected:function(record){record=Ext.isNumber(record)?this.getStore().getAt(record):record;return this.getSelected().indexOf(record)!==-1},hasSelection:function(){return this.getSelected().getCount()>0},refreshSelection:function(){var me=this,selected=me.getSelected(),selections=selected.getRange(),selectionLength=selections.length,storeCollection=me.getStore().getData(),toDeselect=[],toReselect=[],i,rec,matchingSelection;if(me.getPruneRemoved()){storeCollection=storeCollection.getSource()||storeCollection;for(i=0;i<selectionLength;i++){rec=selections[i];matchingSelection=storeCollection.get(storeCollection.getKey(rec));if(matchingSelection){if(matchingSelection!==rec){toDeselect.push(rec);toReselect.push(matchingSelection)}}else{toDeselect.push(rec)}}}
selected.suppressEvent=!0;selected.splice(selected.getCount(),toDeselect,toReselect);selected.suppressEvent=!1},onSelectionStoreRemove:function(store,records){var me=this,selected=me.getSelected(),ln=records.length,removed,record,i;if(me.getDisableSelection()){return}
for(i=0;i<ln;i++){record=records[i];if(selected.remove(record)){if(me.getLastSelected()==record){me.setLastSelected(null)}
if(me.getLastFocused()==record){me.setLastFocused(null)}
removed=removed||[];removed.push(record)}}
if(removed){me.fireSelectionChange([removed])}},onSelectionStoreClear:function(store){var records=store.getData().items;this.onSelectionStoreRemove(store,records)},getSelectionCount:function(){return this.getSelected().getCount()},onSelectionStoreAdd:Ext.emptyFn,onSelectionStoreUpdate:Ext.emptyFn,onItemSelect:Ext.emptyFn,onItemDeselect:Ext.emptyFn,onLastFocusChanged:Ext.emptyFn,onEditorKey:Ext.emptyFn},function(){})
;
Ext.define('Ext.mixin.StoreWatcher',{mixinId:'storewatcher',config:{dataSource:null,owner:null,ownerListeners:{destroyable:!0,storechange:'onOwnerStoreChange'},sourceListeners:null,store:null,storeListeners:null},afterClassMixedIn:function(targetClass){var configurator=this.getConfigurator(),prototype=targetClass.prototype,config={},prop;for(prop in configurator.configs){if(prototype.hasOwnProperty(prop)){config[prop]=prototype[prop];delete prototype[prop]}}
targetClass.addConfig(config)},onOwnerStoreChange:function(comp,store){this.setStore(store)},updateDataSource:function(source){this.syncListeners(source,'$sourceListeners','getSourceListeners')},updateOwner:function(owner){var me=this,ownerProperty=me.ownerProperty;if(ownerProperty){me[ownerProperty]=owner}
me.syncListeners(owner,'$ownerListeners','getOwnerListeners');me.setStore(owner?owner.getStore():null)},applyStore:function(store){return(store&&!store.isEmptyStore)?store:null},updateStore:function(store){this.syncListeners(store,'$storeListeners','getStoreListeners');this.syncDataSource()},privates:{syncDataSource:function(){var store=this.getStore(),source;if(!store){source=null}else if(store.getDataSource){source=store.getDataSource()}else{source=store.getData()}
this.setDataSource(source)},syncListeners:function(instance,token,listeners){var me=this,old=me[token];if(old){me[token]=null;old.destroy()}
if(instance){listeners=me[listeners]();listeners=Ext.applyIf({destroyable:!0,scope:me},listeners);me[token]=instance.on(listeners)}}}})
;
Ext.define('Ext.mixin.StyleCacher',{extend:'Ext.Mixin',mixinConfig:{id:'stylecacher'},getCachedStyle:function(el,style){var cache=this.$styleCache;if(!cache){cache=this.$styleCache={}}
if(!(style in cache)){cache[style]=Ext.fly(el).getStyle(style)}
return cache[style]}})
;
Ext.define('Ext.mixin.Traversable',{extend:'Ext.Mixin',mixinConfig:{id:'traversable'},setParent:function(parent){this.parent=parent;return this},hasParent:function(){return Boolean(this.getParent())},is:function(){return!0},getParent:function(){return this.parent||this.$initParent},getAncestors:function(){var ancestors=[],parent=this.getParent();while(parent){ancestors.push(parent);parent=parent.getParent()}
return ancestors},getAncestorIds:function(){var ancestorIds=[],parent=this.getParent();while(parent){ancestorIds.push(parent.getId());parent=parent.getParent()}
return ancestorIds},previousNode:function(selector,includeSelf){var node=this,parent=node.getRefOwner(),result,it,i,sibling;if(includeSelf&&node.is(selector)){return node}
if(parent){for(it=parent.items.items,i=Ext.Array.indexOf(it,node)-1;i>-1;i--){sibling=it[i];if(sibling.query){result=sibling.query(selector);result=result[result.length-1];if(result){return result}}
if(!selector||sibling.is(selector)){return sibling}}
return parent.previousNode(selector,!0)}
return null},previousSibling:function(selector){var parent=this.getRefOwner(),it,idx,sibling;if(parent){it=parent.items;idx=it.indexOf(this);if(idx!==-1){if(selector){for(--idx;idx>=0;idx--){if((sibling=it.getAt(idx)).is(selector)){return sibling}}}else{if(idx){return it.getAt(--idx)}}}}
return null},nextNode:function(selector,includeSelf){var node=this,parent=node.getRefOwner(),result,it,len,i,sibling;if(includeSelf&&node.is(selector)){return node}
if(parent){for(it=parent.items.items,i=Ext.Array.indexOf(it,node)+1,len=it.length;i<len;i++){sibling=it[i];if(!selector||sibling.is(selector)){return sibling}
if(sibling.down){result=sibling.down(selector);if(result){return result}}}
return parent.nextNode(selector)}
return null},nextSibling:function(selector){var parent=this.getRefOwner(),it,last,idx,sibling;if(parent){it=parent.items;idx=it.indexOf(this)+1;if(idx){if(selector){for(last=it.getCount();idx<last;idx++){if((sibling=it.getAt(idx)).is(selector)){return sibling}}}else{if(idx<it.getCount()){return it.getAt(idx)}}}}
return null}})
;
Ext.define('Ext.perf.Accumulator',function(){var currentFrame=null,khrome=Ext.global.chrome,formatTpl,getTimestamp=function(){var interval,toolbox;getTimestamp=Ext.now;if(Ext.isChrome&&khrome&&khrome.Interval){interval=new khrome.Interval();interval.start();getTimestamp=function(){return interval.microseconds()/1000}}else if(window.ActiveXObject){try{toolbox=new ActiveXObject('SenchaToolbox.Toolbox');Ext.senchaToolbox=toolbox;getTimestamp=function(){return toolbox.milliseconds}}catch(e){}}
Ext.perf.getTimestamp=Ext.perf.Accumulator.getTimestamp=getTimestamp;return getTimestamp()};function adjustSet(set,time){set.sum+=time;set.min=Math.min(set.min,time);set.max=Math.max(set.max,time)}
function leaveFrame(time){var totalTime=time?time:(getTimestamp()-this.time),me=this,accum=me.accum;++accum.count;if(!--accum.depth){adjustSet(accum.total,totalTime)}
adjustSet(accum.pure,totalTime-me.childTime);currentFrame=me.parent;if(currentFrame){++currentFrame.accum.childCount;currentFrame.childTime+=totalTime}}
function makeSet(){return{min:Number.MAX_VALUE,max:0,sum:0}}
function makeTap(me,fn){return function(){var frame=me.enter(),ret=fn.apply(this,arguments);frame.leave();return ret}}
function setToJSON(count,childCount,calibration,set){var data={avg:0,min:set.min,max:set.max,sum:0};if(count){calibration=calibration||0;data.sum=set.sum-childCount*calibration;data.avg=data.sum/count}
return data}
return{requires:['Ext.XTemplate','Ext.ClassManager'],constructor:function(name){var me=this;me.count=me.childCount=me.depth=me.maxDepth=0;me.pure=makeSet();me.total=makeSet();me.name=name},statics:{getTimestamp:getTimestamp},format:function(calibration){var data;if(!formatTpl){formatTpl=new Ext.XTemplate(['{name} - {count} call(s)','<tpl if="count">','<tpl if="childCount">',' ({childCount} children)','</tpl>','<tpl if="depth - 1">',' ({depth} deep)','</tpl>','<tpl for="times">',', {type}: {[this.time(values.sum)]} msec (','avg={[this.time(values.sum / parent.count)]}',')','</tpl>','</tpl>'].join(''),{time:function(t){return Math.round(t*100)/100}})}
data=this.getData(calibration);data.name=this.name;data.pure.type='Pure';data.total.type='Total';data.times=[data.pure,data.total];return formatTpl.apply(data)},getData:function(calibration){var me=this;return{count:me.count,childCount:me.childCount,depth:me.maxDepth,pure:setToJSON(me.count,me.childCount,calibration,me.pure),total:setToJSON(me.count,me.childCount,calibration,me.total)}},enter:function(){var me=this,frame={accum:me,leave:leaveFrame,childTime:0,parent:currentFrame};++me.depth;if(me.maxDepth<me.depth){me.maxDepth=me.depth}
currentFrame=frame;frame.time=getTimestamp();return frame},monitor:function(fn,scope,args){var frame=this.enter();if(args){fn.apply(scope,args)}else{fn.call(scope)}
frame.leave()},report:function(){Ext.log(this.format())},tap:function(className,methodName){var me=this,methods=typeof methodName==='string'?[methodName]:methodName,klass,statik,i,parts,length,name,src,tapFunc;tapFunc=function(){if(typeof className==='string'){klass=Ext.global;parts=className.split('.');for(i=0,length=parts.length;i<length;++i){klass=klass[parts[i]]}}else{klass=className}
for(i=0,length=methods.length;i<length;++i){name=methods[i];statik=name.charAt(0)==='!';if(statik){name=name.substring(1)}else{statik=!(name in klass.prototype)}
src=statik?klass:klass.prototype;src[name]=makeTap(me,src[name])}};Ext.ClassManager.onCreated(tapFunc,me,className);return me}}},function(){Ext.perf.getTimestamp=this.getTimestamp})
;
Ext.define('Ext.perf.Monitor',{singleton:!0,alternateClassName:'Ext.Perf',requires:['Ext.perf.Accumulator'],constructor:function(){this.accumulators=[];this.accumulatorsByName={}},calibrate:function(){var accum=new Ext.perf.Accumulator('$'),total=accum.total,getTimestamp=Ext.perf.Accumulator.getTimestamp,count=0,frame,endTime,startTime;startTime=getTimestamp();do{frame=accum.enter();frame.leave();++count}while(total.sum<100);endTime=getTimestamp();return(endTime-startTime)/count},get:function(name){var me=this,accum=me.accumulatorsByName[name];if(!accum){me.accumulatorsByName[name]=accum=new Ext.perf.Accumulator(name);me.accumulators.push(accum)}
return accum},enter:function(name){return this.get(name).enter()},monitor:function(name,fn,scope){this.get(name).monitor(fn,scope)},report:function(){var me=this,accumulators=me.accumulators,calibration=me.calibrate();accumulators.sort(function(a,b){return(a.name<b.name)?-1:((b.name<a.name)?1:0)});me.updateGC();Ext.log('Calibration: '+Math.round(calibration*100)/100+' msec/sample');Ext.each(accumulators,function(accum){Ext.log(accum.format(calibration))})},getData:function(all){var ret={},accumulators=this.accumulators;Ext.each(accumulators,function(accum){if(all||accum.count){ret[accum.name]=accum.getData()}});return ret},reset:function(){Ext.each(this.accumulators,function(accum){var me=accum;me.count=me.childCount=me.depth=me.maxDepth=0;me.pure={min:Number.MAX_VALUE,max:0,sum:0};me.total={min:Number.MAX_VALUE,max:0,sum:0}})},updateGC:function(){var accumGC=this.accumulatorsByName.GC,toolbox=Ext.senchaToolbox,bucket;if(accumGC){accumGC.count=toolbox.garbageCollectionCounter||0;if(accumGC.count){bucket=accumGC.pure;accumGC.total.sum=bucket.sum=toolbox.garbageCollectionMilliseconds;bucket.min=bucket.max=bucket.sum/accumGC.count;bucket=accumGC.total;bucket.min=bucket.max=bucket.sum/accumGC.count}}},watchGC:function(){var toolbox=Ext.senchaToolbox;Ext.perf.getTimestamp();if(toolbox){this.get("GC");toolbox.watchGarbageCollector(!1)}},setup:function(config){var key,prop,accum,className,methods;if(!config){config={render:{'Ext.Component':'render'},layout:{'Ext.layout.Context':'run'}}}
this.currentConfig=config;for(key in config){if(config.hasOwnProperty(key)){prop=config[key];accum=Ext.Perf.get(key);for(className in prop){if(prop.hasOwnProperty(className)){methods=prop[className];accum.tap(className,methods)}}}}
this.watchGC()},setupLog:function(config){var className,cls,methods,method,override;for(className in config){if(config.hasOwnProperty(className)){cls=Ext.ClassManager.get(className);if(cls){methods=config[className];override={};for(method in methods){override[method]=(function(methodName,idProp){return function(){var before,diff,id,idHolder,ret;before=+Date.now();ret=this.callParent(arguments);diff=+Date.now()-before;if(window.console&&diff>0){idHolder=idProp==='this'?this:typeof idProp==='string'?this[idProp]:typeof idProp==='number'?arguments[idProp]:null;if(idHolder){id=idHolder.id}
if(id!=null){console.log(methodName+' for '+id+': '+diff+'ms')}else{console.log(methodName+' for unknown: '+diff+'ms')}
if(console.trace){console.trace()}}
return ret}})(method,methods[method])}
Ext.override(cls,override)}}}}})
;
Ext.define('Ext.plugin.AbstractClipboard',{extend:'Ext.plugin.Abstract',requires:['Ext.util.KeyMap'],cachedConfig:{formats:{text:{get:'getTextData',put:'putTextData'}}},config:{memory:null,source:'system',system:'text',gridListeners:null},destroy:function(){var me=this,keyMap=me.keyMap,shared=me.shared;Ext.destroy(me.destroyListener);if(keyMap){me.keyMap=Ext.destroy(keyMap);if(!--shared.counter){shared.textArea=Ext.destroy(shared.textArea)}}else{me.renderListener=Ext.destroy(me.renderListener)}
me.callParent()},init:function(comp){var me=this,listeners=me.getGridListeners();if(comp.rendered){me.finishInit(comp)}else if(listeners){me.renderListener=comp.on(Ext.apply({scope:me,destroyable:!0,single:!0},listeners))}},onCmpReady:function(){this.renderListener=null;this.finishInit(this.getCmp())},getTarget:function(comp){return comp.el},privates:{shared:{counter:0,data:null,textArea:null},applyMemory:function(value){value=this.applySource(value);if(value){for(var i=value.length;i-->0;){if(value[i]==='system'){Ext.raise('Invalid clipboard format "'+value[i]+'"')}}}
return value},applySource:function(value){if(value){if(Ext.isString(value)){value=[value]}else if(value.length===0){value=null}}
if(value){var formats=this.getFormats(),i;for(i=value.length;i-->0;){if(value[i]!=='system'&&!formats[value[i]]){Ext.raise('Invalid clipboard format "'+value[i]+'"')}}}
return value||null},applySystem:function(value){var formats=this.getFormats();if(!formats[value]){Ext.raise('Invalid clipboard format "'+value+'"')}
return value},doCutCopy:function(event,erase){var me=this,formats=me.allFormats||me.syncFormats(),data=me.getData(erase,formats),memory=me.getMemory(),system=me.getSystem(),sys;if(me.validateAction(event)===!1){return}
me.shared.data=memory&&data;if(system){sys=data[system];if(formats[system]<3){delete data[system]}
me.setClipboardData(sys)}},doPaste:function(format,data){var formats=this.getFormats();this[formats[format].put](data,format)},finishInit:function(comp){var me=this;me.keyMap=new Ext.util.KeyMap({target:me.getTarget(comp),ignoreInputFields:!0,binding:[{ctrl:!0,key:'x',fn:me.onCut,scope:me},{ctrl:!0,key:'c',fn:me.onCopy,scope:me},{ctrl:!0,key:'v',fn:me.onPaste,scope:me}]});++me.shared.counter;me.destroyListener=comp.on({destroyable:!0,destroy:'destroy',scope:me})},getData:function(erase,format){var me=this,formats=me.getFormats(),data,i,name,names;if(Ext.isString(format)){if(!formats[format]){Ext.raise('Invalid clipboard format "'+format+'"')}
data=me[formats[format].get](format,erase)}else{data={};names=[];if(format){for(name in format){if(!formats[name]){Ext.raise('Invalid clipboard format "'+name+'"')}
names.push(name)}}else{names=Ext.Object.getAllKeys(formats)}
for(i=names.length;i-->0;){data[name]=me[formats[name].get](name,erase&&!i)}}
return data},getHiddenTextArea:function(){var shared=this.shared,el;el=shared.textArea;if(!el){el=shared.textArea=Ext.getBody().createChild({tag:'textarea',tabIndex:-1,style:{position:'absolute',top:'-1000px',width:'1px',height:'1px'}});el.suspendFocusEvents()}
return el},onCopy:function(keyCode,event){this.doCutCopy(event,!1)},onCut:function(keyCode,event){this.doCutCopy(event,!0)},onPaste:function(keyCode,event){var me=this,sharedData=me.shared.data,source=me.getSource(),i,n,s;if(me.validateAction(event)===!1){return}
if(source){for(i=0,n=source.length;i<n;++i){s=source[i];if(s==='system'){s=me.getSystem();me.pasteClipboardData(s);break}else if(sharedData&&(s in sharedData)){me.doPaste(s,sharedData[s]);break}}}},pasteClipboardData:function(format){var me=this,clippy=window.clipboardData,area,focusEl;if(clippy&&clippy.getData){me.doPaste(format,clippy.getData("text"))}else{focusEl=Ext.Element.getActiveElement(!0);area=me.getHiddenTextArea().dom;area.value='';if(focusEl){focusEl.suspendFocusEvents()}
area.focus();Ext.defer(function(){if(focusEl){focusEl.focus();focusEl.resumeFocusEvents()}
me.doPaste(format,area.value);area.value=''},100,me)}},setClipboardData:function(data){var me=this,clippy=window.clipboardData,area,focusEl;if(clippy&&clippy.setData){clippy.setData("text",data)}else{area=me.getHiddenTextArea().dom;focusEl=Ext.Element.getActiveElement(!0);area.value=data;if(focusEl){focusEl.suspendFocusEvents()}
area.focus();area.select();Ext.defer(function(){area.value='';if(focusEl){focusEl.focus();focusEl.resumeFocusEvents()}},50)}},syncFormats:function(){var me=this,map={},memory=me.getMemory(),system=me.getSystem(),i,s;if(system){map[system]=1}
if(memory){for(i=memory.length;i-->0;){s=memory[i];map[s]=map[s]?3:2}}
return me.allFormats=map},updateMemory:function(){this.allFormats=null},updateSystem:function(){this.allFormats=null},validateAction:Ext.privateFn}})
;
Ext.define('Ext.plugin.MouseEnter',{extend:'Ext.plugin.Abstract',alias:'plugin.mouseenter',element:'el',init:function(component){if(!this.delegate){Ext.raise('mouseenter plugin must be configured with a delegate selector')}
if(!this.handler){Ext.raise('mouseenter plugin must be configured with handler callback')}
var me=this,listeners={mouseover:'onMouseEvent',scope:me,destroyable:!0},element=me.element;if(me.leaveHandler||me.delay){listeners.mouseout='onMouseEvent'}
if(typeof element==='string'){element=component[me.element]}
if(element){me.mouseListener=Ext.get(element).on(listeners)}else{component.on({render:function(){me.mouseListener=component[me.element].on(listeners)},single:!0})}},onMouseEvent:function(e){var me=this,delegate=e.getTarget(me.delegate);if(delegate&&delegate!==e.getRelatedTarget(me.delegate)){if(me.delay){Ext.undefer(me.mouseEventTimer);me.mouseEventTimer=Ext.defer(me.handleMouseEvent,me.delay,me,[e,delegate])}else{me.handleMouseEvent(e,delegate)}}},handleMouseEvent:function(e,delegate){var me=this;if(e.type==='mouseover'){Ext.callback(me.handler,null,[e,delegate],0,me.cmp,me.scope)}else if(me.leaveHandler){Ext.callback(me.leaveHandler,null,[e,delegate],0,me.cmp,me.scope)}},destroy:function(){Ext.destroy(this.mouseListener);this.callParent()}})
;
Ext.define('Ext.sparkline.Shape',{constructor:function(target,id,type,args){var me=this;me.target=target;me.id=id;me.type=type;me.args=args},append:function(){this.target.appendShape(this);return this}})
;
Ext.define('Ext.sparkline.CanvasBase',{requires:['Ext.sparkline.Shape'],shapeCount:0,_pxregex:/(\d+)(px)?\s*$/i,constructor:function(ownerSparkLine){this.owner=ownerSparkLine;this.rtl=this.owner.getInherited().rtl},setWidth:function(width){this.pixelWidth=width},setHeight:function(height){this.pixelHeight=height},drawLine:function(x1,y1,x2,y2,lineColor,lineWidth){return this.drawShape([[x1,y1],[x2,y2]],lineColor,lineWidth)},drawShape:function(path,lineColor,fillColor,lineWidth){return this._genShape('Shape',[path,lineColor,fillColor,lineWidth])},drawCircle:function(x,y,radius,lineColor,fillColor,lineWidth){return this._genShape('Circle',[x,y,radius,lineColor,fillColor,lineWidth])},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){return this._genShape('PieSlice',[x,y,radius,startAngle,endAngle,lineColor,fillColor])},drawRect:function(x,y,width,height,lineColor,fillColor){return this._genShape('Rect',[x,y,width,height,lineColor,fillColor])},getElement:function(){return this.el},getLastShapeId:function(){return this.lastShapeId},reset:function(){Ext.raise('reset not implemented')},_genShape:function(shapetype,shapeargs){var id=this.shapeCount++;shapeargs.unshift(id);return new Ext.sparkline.Shape(this,id,shapetype,shapeargs)},appendShape:function(shape){Ext.raise('appendShape not implemented')},replaceWithShape:function(shapeid,shape){Ext.raise('replaceWithShape not implemented')},insertAfterShape:function(shapeid,shape){Ext.raise('insertAfterShape not implemented')},removeShapeId:function(shapeid){Ext.raise('removeShapeId not implemented')},getShapeAt:function(x,y){Ext.raise('getShapeAt not implemented')},render:function(){Ext.raise('render not implemented')}})
;
Ext.define('Ext.sparkline.CanvasCanvas',{extend:'Ext.sparkline.CanvasBase',statics:{contextOverrides:(function(){var ratio=window.devicePixelRatio||1;return{moveTo:function(x,y){if(this.rtl){x=this.canvas.width-x-1}
this.$moveTo(x*ratio,y*ratio)},lineTo:function(x,y){if(this.rtl){x=this.canvas.width-x-1}
this.$lineTo(x*ratio,y*ratio)},arc:function(x,y,radius,startAngle,endAngle,counterclockwise){if(this.rtl){x=this.canvas.width-x-1}
this.$arc(x*ratio,y*ratio,radius*ratio,startAngle,endAngle,counterclockwise)},clearRect:function(x,y,width,height){if(this.rtl){x=this.canvas.width-x-width}
this.$clearRect(x*ratio,y*ratio,width*ratio,height*ratio)}}})()},setWidth:function(width){this.callParent(arguments);this.owner.element.dom.width=width*(window.devicePixelRatio||1)},setHeight:function(height){this.callParent(arguments);this.owner.element.dom.height=height*(window.devicePixelRatio||1)},onOwnerUpdate:function(){var me=this;me.el=me.owner.element;me.interact=!me.owner.initialConfig.disableInteraction;me.shapes={};me.shapeseq=[];me.currentTargetShapeId=me.lastShapeId=null},_getContext:function(lineColor,fillColor,lineWidth){var context=this.context,overrides,name;if(!context){this.context=context=this.el.dom.getContext('2d');overrides=Ext.sparkline.CanvasCanvas.contextOverrides;for(name in overrides){context['$'+name]=context[name]}
Ext.apply(context,overrides);context.rtl=this.rtl}
if(lineColor!=null){context.strokeStyle=lineColor}
context.lineWidth=lineWidth||1;if(fillColor!=null){context.fillStyle=fillColor}
return context},reset:function(){var context=this._getContext();context.clearRect(0,0,this.pixelWidth,this.pixelHeight);this.shapes={};this.shapeseq=[];this.currentTargetShapeId=this.lastShapeId=null},_drawShape:function(shapeid,path,lineColor,fillColor,lineWidth){var context=this._getContext(lineColor,fillColor,lineWidth),xIncr=this.rtl?-0.5:0.5,i,plen;context.beginPath();context.moveTo(path[0][0]+xIncr,path[0][1]+0.5);for(i=1,plen=path.length;i<plen;i++){context.lineTo(path[i][0]+xIncr,path[i][1]+0.5)}
if(lineColor!=null){context.stroke()}
if(fillColor!=null){context.fill()}
if(this.targetX!=null&&this.targetY!=null&&context.isPointInPath(this.targetX,this.targetY)){this.currentTargetShapeId=shapeid}},_drawCircle:function(shapeid,x,y,radius,lineColor,fillColor,lineWidth){var context=this._getContext(lineColor,fillColor,lineWidth);context.beginPath();context.arc(x,y,radius,0,2*Math.PI,!1);if(this.targetX!=null&&this.targetY!=null&&context.isPointInPath(this.targetX,this.targetY)){this.currentTargetShapeId=shapeid}
if(lineColor!=null){context.stroke()}
if(fillColor!=null){context.fill()}},_drawPieSlice:function(shapeid,x,y,radius,startAngle,endAngle,lineColor,fillColor){var context=this._getContext(lineColor,fillColor);context.beginPath();context.moveTo(x,y);context.arc(x,y,radius,startAngle,endAngle,!1);context.lineTo(x,y);context.closePath();if(lineColor!=null){context.stroke()}
if(fillColor){context.fill()}
if(this.targetX!==undefined&&this.targetY!==undefined&&context.isPointInPath(this.targetX,this.targetY)){this.currentTargetShapeId=shapeid}},_drawRect:function(shapeid,x,y,width,height,lineColor,fillColor){return this._drawShape(shapeid,[[x,y],[x+width,y],[x+width,y+height],[x,y+height],[x,y]],lineColor,fillColor)},appendShape:function(shape){this.shapes[shape.id]=shape;this.shapeseq.push(shape.id);this.lastShapeId=shape.id;return shape.id},replaceWithShape:function(shapeid,shape){var shapeseq=this.shapeseq,i;this.shapes[shape.id]=shape;for(i=shapeseq.length;i--;){if(shapeseq[i]===shapeid){shapeseq[i]=shape.id}}
delete this.shapes[shapeid]},replaceWithShapes:function(shapeids,shapes){var shapeseq=this.shapeseq,shapemap={},sid,i,first;for(i=shapeids.length;i--;){shapemap[shapeids[i]]=!0}
for(i=shapeseq.length;i--;){sid=shapeseq[i];if(shapemap[sid]){shapeseq.splice(i,1);delete this.shapes[sid];first=i}}
for(i=shapes.length;i--;){shapeseq.splice(first,0,shapes[i].id);this.shapes[shapes[i].id]=shapes[i]}},insertAfterShape:function(shapeid,shape){var shapeseq=this.shapeseq,i;for(i=shapeseq.length;i--;){if(shapeseq[i]===shapeid){shapeseq.splice(i+1,0,shape.id);this.shapes[shape.id]=shape;return}}},removeShapeId:function(shapeid){var shapeseq=this.shapeseq,i;for(i=shapeseq.length;i--;){if(shapeseq[i]===shapeid){shapeseq.splice(i,1);break}}
delete this.shapes[shapeid]},getShapeAt:function(x,y){if(this.rtl){x=this.el.dom.width-x-1}
this.targetX=x;this.targetY=y;this.render();return this.currentTargetShapeId},render:function(){var shapeseq=this.shapeseq,shapes=this.shapes,shapeCount=shapeseq.length,context=this._getContext(),shapeid,shape,i;context.clearRect(0,0,this.pixelWidth,this.pixelHeight);for(i=0;i<shapeCount;i++){shapeid=shapeseq[i];shape=shapes[shapeid];this['_draw'+shape.type].apply(this,shape.args)}
if(!this.interact){this.shapes={};this.shapeseq=[]}}})
;
Ext.define('Ext.sparkline.VmlCanvas',{extend:'Ext.sparkline.CanvasBase',setWidth:function(width){var me=this;me.callParent(arguments);me.owner.groupEl.dom.coordsize=me.width+' '+(me.height||0);me.owner.groupEl.dom.style.width=width+'px'},setHeight:function(height){var me=this;me.callParent(arguments);me.owner.groupEl.dom.coordsize=(me.width||0)+' '+me.height;me.owner.groupEl.dom.style.height=height+'px'},onOwnerUpdate:function(){var me=this;me.group=me.owner.groupEl;me.el=me.owner.element;me.prerender=[]},_drawShape:function(shapeid,path,lineColor,fillColor,lineWidth){var vpath=[],initial,stroke,fill,closed,plen,i;for(i=0,plen=path.length;i<plen;i++){vpath[i]=(path[i][0])+','+(path[i][1])}
initial=vpath.splice(0,1);lineWidth=lineWidth==null?1:lineWidth;stroke=lineColor==null?' stroked="false" ':' strokeWeight="'+lineWidth+'px" strokeColor="'+lineColor+'" ';fill=fillColor==null?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';closed=vpath[0]===vpath[vpath.length-1]?'x ':'';return['<svml:shape coordorigin="0 0" coordsize="',this.pixelWidth,' ',this.pixelHeight,'" id="jqsshape',shapeid,'" ',stroke,fill,' style="position:absolute;height:',this.pixelHeight,'px;width:',this.pixelWidth,'px" ',' path="m ',initial,' l ',vpath.join(', '),' ',closed,'e"></svml:shape>'].join('')},_drawCircle:function(shapeid,x,y,radius,lineColor,fillColor,lineWidth){var circumference=radius*2,stroke,fill;x-=radius;y-=radius;stroke=lineColor==null?' stroked="false" ':' strokeWeight="'+lineWidth+'px" strokeColor="'+lineColor+'" ';fill=fillColor==null?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';return['<svml:oval id="jqsshape',shapeid,'" ',stroke,fill,' style="position:absolute;top:',y,'px; left:',x,'px;width:',circumference,'px;height:',circumference,'px"></svml:oval>'].join('')},_drawPieSlice:function(shapeid,x,y,radius,startAngle,endAngle,lineColor,fillColor){var vpath,width=this.pixelWidth,height=this.pixelHeight,startx,starty,endx,endy,stroke,fill;stroke=lineColor==null?' stroked="false" ':' strokeWeight="1px" strokeColor="'+lineColor+'" ';fill=fillColor==null?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';if(startAngle===endAngle){return''}
if((endAngle-startAngle)===(2*Math.PI)){startAngle=0.0;endAngle=(2*Math.PI)}
startx=x+Math.round(Math.cos(startAngle)*radius);starty=y+Math.round(Math.sin(startAngle)*radius);endx=x+Math.round(Math.cos(endAngle)*radius);endy=y+Math.round(Math.sin(endAngle)*radius);if(startx===endx&&starty===endy){if((endAngle-startAngle)<Math.PI){return''}
startx=endx=x+radius;starty=endy=y}
if(startx===endx&&starty===endy&&(endAngle-startAngle)<Math.PI){return''}
vpath=[x-radius,y-radius,x+radius,y+radius,startx,starty,endx,endy];return['<svml:shape coordorigin="0 0" coordsize="',width,' ',height,'" id="jqsshape',shapeid,'" ',stroke,fill,' style="position:absolute;height:',height,'px;width:',width,'px" path="m ',x,',',y,' wa ',vpath.join(', '),' x e"></svml:shape>'].join('')},_drawRect:function(shapeid,x,y,width,height,lineColor,fillColor){return this._drawShape(shapeid,[[x,y],[x,y+height],[x+width,y+height],[x+width,y],[x,y]],lineColor,fillColor)},reset:function(){Ext.fly(this.group).empty()},appendShape:function(shape){this.prerender.push(this['_draw'+shape.type].apply(this,shape.args));this.lastShapeId=shape.id;return shape.id},replaceWithShape:function(shapeid,shape){var existing=this.el.getById('jqsshape'+shapeid,!0),vel=this['_draw'+shape.type].apply(this,shape.args);existing.outerHTML=vel},replaceWithShapes:function(shapeids,shapes){var existing=this.el.getById('jqsshape'+shapeids[0],!0),replace='',slen=shapes.length,i;for(i=0;i<slen;i++){replace+=this['_draw'+shapes[i].type].apply(this,shapes[i].args)}
existing.outerHTML=replace;for(i=1;i<shapeids.length;i++){this.el.getById('jqsshape'+shapeids[i]).destroy()}},insertAfterShape:function(shapeid,shape){var existing=this.el.getById('jqsshape'+shapeid,!0),vel=this['_draw'+shape.type].apply(this,shape.args);existing.insertAdjacentHTML('afterEnd',vel)},removeShapeId:function(shapeid){var existing=this.el.getById('jqsshape'+shapeid,!0);this.group.removeChild(existing)},getShapeAt:function(x,y){var shapeid=this.el.id.substr(8);return shapeid},render:function(){this.group.dom.innerHTML=this.prerender.join('')}},function(){Ext.onInternalReady(function(){var doc=document;if(doc.namespaces&&!doc.namespaces.svml){doc.namespaces.add("svml","urn:schemas-microsoft-com:vml",'#default#VML')}})})
;
Ext.define('Ext.util.Color',{alternateClassName:'Ext.draw.Color',statics:{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbToHexRe:/\s*rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbaToHexRe:/\s*rgba\((\d+),\s*(\d+),\s*(\d+),\s*([.\d]+)\)/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,NONE:'none',RGBA_NONE:'rgba(0, 0, 0, 0)'},isColor:!0,lightnessFactor:0.2,constructor:function(red,green,blue,alpha){this.setRGB(red,green,blue,alpha)},clone:function(){var me=this;return new this.self(me.r,me.g,me.b,me.a)},setRGB:function(red,green,blue,alpha){var me=this;me.r=Math.min(255,Math.max(0,red));me.g=Math.min(255,Math.max(0,green));me.b=Math.min(255,Math.max(0,blue));if(alpha===undefined){me.a=1}else{me.a=Math.min(1,Math.max(0,alpha))}},getBrightness:function(){var r=this.r/255*100,g=this.g/255*100,b=this.b/255*100;return((r*299)+(g*587)+(b*114))/1000},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},getHSL:function(){var me=this,r=me.r/255,g=me.g/255,b=me.b/255,max=Math.max(r,g,b),min=Math.min(r,g,b),delta=max-min,h,s=0,l=0.5*(max+min);if(min!==max){s=(l<=0.5)?delta/(max+min):delta/(2-max-min);if(r===max){h=60*(g-b)/delta}else if(g===max){h=120+60*(b-r)/delta}else{h=240+60*(r-g)/delta}
if(h<0){h+=360}
if(h>=360){h-=360}}
return[h,s,l]},getHSV:function(){var me=this,r=me.r/255,g=me.g/255,b=me.b/255,max=Math.max(r,g,b),min=Math.min(r,g,b),C=max-min,h,s=0,v=max;if(min!=max){s=v?C/v:0;if(r===max){h=60*(g-b)/C}else if(g===max){h=60*(b-r)/C+120}else{h=60*(r-g)/C+240}
if(h<0){h+=360}
if(h>=360){h-=360}}
return[h,s,v]},setHSL:function(h,s,l){var me=this,abs=Math.abs,c,x,m;h=(h%360+360)%360;s=s>1?1:s<0?0:s;l=l>1?1:l<0?0:l;if(s===0||h===null){l*=255;me.setRGB(l,l,l)}else{h/=60;c=s*(1-abs(2*l-1));x=c*(1-abs(h%2-1));m=l-c/2;m*=255;c*=255;x*=255;switch(Math.floor(h)){case 0:me.setRGB(c+m,x+m,m);break;case 1:me.setRGB(x+m,c+m,m);break;case 2:me.setRGB(m,c+m,x+m);break;case 3:me.setRGB(m,x+m,c+m);break;case 4:me.setRGB(x+m,m,c+m);break;case 5:me.setRGB(c+m,m,x+m);break}}
return me},setHSV:function(h,s,v){var me=this,c,x,m;h=(h%360+360)%360;s=s>1?1:s<0?0:s;v=v>1?1:v<0?0:v;if(s===0||h===null){v*=255;me.setRGB(v,v,v)}else{h/=60;c=v*s;x=c*(1-Math.abs(h%2-1));m=v-c;m*=255;c*=255;x*=255;switch(Math.floor(h)){case 0:me.setRGB(c+m,x+m,m);break;case 1:me.setRGB(x+m,c+m,m);break;case 2:me.setRGB(m,c+m,x+m);break;case 3:me.setRGB(m,x+m,c+m);break;case 4:me.setRGB(x+m,m,c+m);break;case 5:me.setRGB(c+m,m,x+m);break}}
return me},createLighter:function(factor){var color=this.clone();color.lighten(factor);return color},lighten:function(factor){var hsl;if(!factor&&factor!==0){factor=this.lightnessFactor}
hsl=this.getHSL();this.setHSL(hsl[0],hsl[1],Ext.Number.constrain(hsl[2]+factor,0,1))},createDarker:function(factor){var color=this.clone();color.darken(factor);return color},darken:function(factor){if(!factor&&factor!==0){factor=this.lightnessFactor}
return this.lighten(-factor)},toString:function(){var me=this,round=Math.round,r,g,b;if(me.a===1){r=round(me.r).toString(16);g=round(me.g).toString(16);b=round(me.b).toString(16);r=(r.length===1)?'0'+r:r;g=(g.length===1)?'0'+g:g;b=(b.length===1)?'0'+b:b;return['#',r,g,b].join('')}else{return'rgba('+[round(me.r),round(me.g),round(me.b),me.a===0?0:me.a.toFixed(15)].join(', ')+')'}},toHex:function(color){var r=this.r,g=this.g,b=this.b,rgb=b|(g<<8)|(r<<16);return'#'+('000000'+rgb.toString(16)).slice(-6)},setFromString:function(str){var values,r,g,b,a=1,parse=parseInt;if(str===Ext.util.Color.NONE){this.r=this.g=this.b=this.a=0;return this}
if((str.length===4||str.length===7)&&str.substr(0,1)==='#'){values=str.match(Ext.util.Color.hexRe);if(values){r=parse(values[1],16)>>0;g=parse(values[2],16)>>0;b=parse(values[3],16)>>0;if(str.length===4){r+=(r*16);g+=(g*16);b+=(b*16)}}}else if((values=str.match(Ext.util.Color.rgbToHexRe))){r=+values[1];g=+values[2];b=+values[3]}else if((values=str.match(Ext.util.Color.rgbaToHexRe))){r=+values[1];g=+values[2];b=+values[3];a=+values[4]}else{if(Ext.util.Color.ColorList.hasOwnProperty(str.toLowerCase())){return this.setFromString(Ext.util.Color.ColorList[str.toLowerCase()])}}
if(typeof r==='undefined'){return this}
this.r=r;this.g=g;this.b=b;this.a=a;return this}},function(){var flyColor=new this();this.addStatics({fly:function(red,green,blue,alpha){switch(arguments.length){case 1:flyColor.setFromString(red);break;case 3:case 4:flyColor.setRGB(red,green,blue,alpha);break;default:return null}
return flyColor},ColorList:{aliceblue:'#f0f8ff',antiquewhite:'#faebd7',aqua:'#00ffff',aquamarine:'#7fffd4',azure:'#f0ffff',beige:'#f5f5dc',bisque:'#ffe4c4',black:'#000000',blanchedalmond:'#ffebcd',blue:'#0000ff',blueviolet:'#8a2be2',brown:'#a52a2a',burlywood:'#deb887',cadetblue:'#5f9ea0',chartreuse:'#7fff00',chocolate:'#d2691e',coral:'#ff7f50',cornflowerblue:'#6495ed',cornsilk:'#fff8dc',crimson:'#dc143c',cyan:'#00ffff',darkblue:'#00008b',darkcyan:'#008b8b',darkgoldenrod:'#b8860b',darkgray:'#a9a9a9',darkgreen:'#006400',darkkhaki:'#bdb76b',darkmagenta:'#8b008b',darkolivegreen:'#556b2f',darkorange:'#ff8c00',darkorchid:'#9932cc',darkred:'#8b0000',darksalmon:'#e9967a',darkseagreen:'#8fbc8f',darkslateblue:'#483d8b',darkslategray:'#2f4f4f',darkturquoise:'#00ced1',darkviolet:'#9400d3',deeppink:'#ff1493',deepskyblue:'#00bfff',dimgray:'#696969',dodgerblue:'#1e90ff',firebrick:'#b22222',floralwhite:'#fffaf0',forestgreen:'#228b22',fuchsia:'#ff00ff',gainsboro:'#dcdcdc',ghostwhite:'#f8f8ff',gold:'#ffd700',goldenrod:'#daa520',gray:'#808080',green:'#008000',greenyellow:'#adff2f',honeydew:'#f0fff0',hotpink:'#ff69b4',indianred:'#cd5c5c',indigo:'#4b0082',ivory:'#fffff0',khaki:'#f0e68c',lavender:'#e6e6fa',lavenderblush:'#fff0f5',lawngreen:'#7cfc00',lemonchiffon:'#fffacd',lightblue:'#add8e6',lightcoral:'#f08080',lightcyan:'#e0ffff',lightgoldenrodyellow:'#fafad2',lightgray:'#d3d3d3',lightgrey:'#d3d3d3',lightgreen:'#90ee90',lightpink:'#ffb6c1',lightsalmon:'#ffa07a',lightseagreen:'#20b2aa',lightskyblue:'#87cefa',lightslategray:'#778899',lightsteelblue:'#b0c4de',lightyellow:'#ffffe0',lime:'#00ff00',limegreen:'#32cd32',linen:'#faf0e6',magenta:'#ff00ff',maroon:'#800000',mediumaquamarine:'#66cdaa',mediumblue:'#0000cd',mediumorchid:'#ba55d3',mediumpurple:'#9370d8',mediumseagreen:'#3cb371',mediumslateblue:'#7b68ee',mediumspringgreen:'#00fa9a',mediumturquoise:'#48d1cc',mediumvioletred:'#c71585',midnightblue:'#191970',mintcream:'#f5fffa',mistyrose:'#ffe4e1',moccasin:'#ffe4b5',navajowhite:'#ffdead',navy:'#000080',oldlace:'#fdf5e6',olive:'#808000',olivedrab:'#6b8e23',orange:'#ffa500',orangered:'#ff4500',orchid:'#da70d6',palegoldenrod:'#eee8aa',palegreen:'#98fb98',paleturquoise:'#afeeee',palevioletred:'#d87093',papayawhip:'#ffefd5',peachpuff:'#ffdab9',peru:'#cd853f',pink:'#ffc0cb',plum:'#dda0dd',powderblue:'#b0e0e6',purple:'#800080',red:'#ff0000',rosybrown:'#bc8f8f',royalblue:'#4169e1',saddlebrown:'#8b4513',salmon:'#fa8072',sandybrown:'#f4a460',seagreen:'#2e8b57',seashell:'#fff5ee',sienna:'#a0522d',silver:'#c0c0c0',skyblue:'#87ceeb',slateblue:'#6a5acd',slategray:'#708090',snow:'#fffafa',springgreen:'#00ff7f',steelblue:'#4682b4',tan:'#d2b48c',teal:'#008080',thistle:'#d8bfd8',tomato:'#ff6347',turquoise:'#40e0d0',violet:'#ee82ee',wheat:'#f5deb3',white:'#ffffff',whitesmoke:'#f5f5f5',yellow:'#ffff00',yellowgreen:'#9acd32'},fromHSL:function(h,s,l){return(new this(0,0,0,0)).setHSL(h,s,l)},fromHSV:function(h,s,v){return(new this(0,0,0,0)).setHSL(h,s,v)},fromString:function(color){return(new this(0,0,0,0)).setFromString(color)},create:function(arg){if(arg instanceof this){return arg}else if(Ext.isArray(arg)){return new Ext.util.Color(arg[0],arg[1],arg[2],arg[3])}else if(Ext.isString(arg)){return Ext.util.Color.fromString(arg)}else if(arguments.length>2){return new Ext.util.Color(arguments[0],arguments[1],arguments[2],arguments[3])}else{return new Ext.util.Color(0,0,0,0)}}})})
;
Ext.define('Ext.sparkline.Base',{extend:'Ext.Gadget',xtype:'sparkline',requires:['Ext.XTemplate','Ext.sparkline.CanvasCanvas','Ext.sparkline.VmlCanvas','Ext.util.Color'],cachedConfig:{lineColor:'#157fcc',defaultPixelsPerValue:3,tagValuesAttribute:'values',enableTagOptions:!1,enableHighlight:!0,highlightColor:null,highlightLighten:0.1,tooltipSkipNull:!0,tooltipPrefix:'',tooltipSuffix:'',disableTooltips:!1,disableInteraction:!1,tipTpl:null},config:{values:null},baseCls:Ext.baseCSSPrefix+'sparkline',element:{tag:'canvas',reference:'element',style:{display:'inline-block',verticalAlign:'top'},listeners:{mouseenter:'onMouseEnter',mouseleave:'onMouseLeave',mousemove:'onMouseMove'},width:0,height:0},defaultBindProperty:'values',redrawQueue:{},inheritableStatics:{onClassCreated:function(cls){var configUpdater=cls.prototype.updateConfigChange,proto=cls.prototype,configs=cls.getConfigurator().configs,config,updaterName;for(config in configs){if(config!=='tipTpl'){updaterName=Ext.Config.get(config).names.update;if(proto[updaterName]){proto[updaterName]=Ext.Function.createSequence(proto[updaterName],configUpdater)}else{proto[updaterName]=configUpdater}}}}},constructor:function(config){var me=this,ns=Ext.sparkline;me.canvas=Ext.supports.Canvas?new ns.CanvasCanvas(me):new ns.VmlCanvas(me);me.callParent([config])},all:function(val,arr,ignoreNull){var i;for(i=arr.length;i--;){if(ignoreNull&&arr[i]===null){continue}
if(arr[i]!==val){return!1}}
return!0},updateConfigChange:function(newValue){var me=this;if(me.bufferRedraw||!me.height||!me.width){me.redrawQueue[me.getId()]=me;if(!me.redrawTimer){Ext.sparkline.Base.prototype.redrawTimer=Ext.raf(me.processRedrawQueue)}}else{me.redraw()}
return newValue},applyTipTpl:function(tipTpl){if(tipTpl&&!tipTpl.isTemplate){tipTpl=new Ext.XTemplate(tipTpl)}
return tipTpl},normalizeValue:function(val){var nf;switch(val){case 'undefined':val=undefined;break;case 'null':val=null;break;case 'true':val=!0;break;case 'false':val=!1;break;default:nf=parseFloat(val);if(val==nf){val=nf}}
return val},normalizeValues:function(vals){var i,result=[];for(i=vals.length;i--;){result[i]=this.normalizeValue(vals[i])}
return result},updateWidth:function(width,oldWidth){var me=this,dom=me.element.dom,measurer=me.measurer;me.callParent([width,oldWidth]);me.canvas.setWidth(width);me.width=width;if(me.height==null&&measurer){me.setHeight(parseInt(measurer.getCachedStyle(dom.parentNode,'line-height'),10))}},updateHeight:function(height,oldHeight){var me=this;me.callParent([height,oldHeight]);me.canvas.setHeight(height);me.height=height},setValues:function(values){var me=this,oldValues=me.getValues();values=values==null?[]:Ext.Array.from(values);me.values=values;me.callParent([values]);if(values===oldValues){me.updateValues([values,oldValues])}},redraw:function(){var me=this;if(!me.destroyed){me.canvas.onOwnerUpdate();me.canvas.reset();if(me.getValues()){me.onUpdate();me.renderGraph()}}},onUpdate:Ext.emptyFn,renderGraph:function(){var ret=!0;if(this.disabled){this.canvas.reset();ret=!1}
return ret},onMouseEnter:function(e){this.onMouseMove(e)},onMouseMove:function(e){var me=this;me.canvasRegion=me.canvasRegion||me.canvas.el.getRegion();me.currentPageXY=e.getPoint();me.redraw()},onMouseLeave:function(){var me=this;me.canvasRegion=me.currentPageXY=me.targetX=me.targetY=null;me.redraw();me.hideTip()},updateDisplay:function(){var me=this,values=me.getValues(),tipHtml,region;if(values&&values.length&&me.currentPageXY&&me.canvasRegion.contains(me.currentPageXY)){region=me.getRegion(me.currentPageXY[0]-me.canvasRegion.left,(me.canvasRegion.bottom-1)-me.currentPageXY[1]);if(region!=null&&me.isValidRegion(region,values)){if(!me.disableHighlight){me.renderHighlight(region)}
if(!me.getDisableTooltips()){tipHtml=me.getRegionTooltip(region)}}
if(me.hasListeners.sparklineregionchange){me.fireEvent('sparklineregionchange',me)}
if(tipHtml){me.getSharedTooltip().setHtml(tipHtml);me.showTip()}}
if(!tipHtml){me.hideTip()}},getRegion:Ext.emptyFn,getRegionTooltip:function(region){var me=this,entries=[],tipTpl=me.getTipTpl(),fields,showFields,showFieldsKey,newFields,fv,formatter,fieldlen,i,j;fields=me.getRegionFields(region);formatter=me.tooltipFormatter;if(formatter){return formatter(me,me,fields)}
if(!tipTpl){return''}
if(!Ext.isArray(fields)){fields=[fields]}
showFields=me.tooltipFormatFieldlist;showFieldsKey=me.tooltipFormatFieldlistKey;if(showFields&&showFieldsKey){newFields=[];for(i=fields.length;i--;){fv=fields[i][showFieldsKey];if((j=Ext.Array.indexOf(fv,showFields))!==-1){newFields[j]=fields[i]}}
fields=newFields}
fieldlen=fields.length;for(j=0;j<fieldlen;j++){if(!fields[j].isNull||!me.getTooltipSkipNull()){Ext.apply(fields[j],{prefix:me.getTooltipPrefix(),suffix:me.getTooltipSuffix()});entries.push(tipTpl.apply(fields[j]))}}
if(entries.length){return entries.join('<br>')}
return''},getRegionFields:Ext.emptyFn,calcHighlightColor:function(color){var me=this,highlightColor=me.getHighlightColor(),lighten=me.getHighlightLighten(),o;if(highlightColor){return highlightColor}
if(lighten){o=Ext.util.Color.fromString(color);if(o){o.lighten(lighten);color=o.toHex()}}
return color},destroy:function(){delete this.redrawQueue[this.getId()];this.callParent()},privates:{hideTip:Ext.privateFn,isValidRegion:function(region,values){return region<values.length},showTip:Ext.privateFn}},function(SparklineBase){var proto=SparklineBase.prototype;proto.getSharedTooltip=function(){var me=this,tooltip=me.tooltip;if(!tooltip){proto.tooltip=tooltip=SparklineBase.constructTip()}
return tooltip};SparklineBase.onClassCreated(SparklineBase);proto.processRedrawQueue=function(){var redrawQueue=proto.redrawQueue,id;for(id in redrawQueue){redrawQueue[id].redraw()}
proto.redrawQueue={};proto.redrawTimer=0}})
;
Ext.define('Ext.override.sparkline.Base',{override:'Ext.sparkline.Base',statics:{constructTip:function(){return new Ext.tip.ToolTip({id:'sparklines-tooltip',showDelay:0,dismissDelay:0,hideDelay:400})}},onMouseMove:function(e){this.getSharedTooltip().triggerEvent=e;this.callParent([e])},onMouseLeave:function(e){this.callParent([e]);this.getSharedTooltip().target=null},privates:{hideTip:function(){var tip=this.getSharedTooltip();tip.target=null;tip.hide()},showTip:function(){var tip=this.getSharedTooltip();tip.target=this.el;tip.onTargetOver(tip.triggerEvent)}}},function(Cls){if(!Ext.supports.Canvas){Cls.prototype.element={tag:'span',reference:'element',listeners:{mouseenter:'onMouseEnter',mouseleave:'onMouseLeave',mousemove:'onMouseMove'},style:{display:'inline-block',position:'relative',overflow:'hidden',margin:'0px',padding:'0px',verticalAlign:'top',cursor:'default'},children:[{tag:'svml:group',reference:'groupEl',coordorigin:'0 0',coordsize:'0 0',style:'position:absolute;width:0;height:0;pointer-events:none'}]}}})
;
Ext.define('Ext.sparkline.BarBase',{extend:'Ext.sparkline.Base',renderHighlight:function(region){this.renderRegion(region,!0)},renderGraph:function(){var me=this,values=me.values,canvas=me.canvas,regionShapes=me.regionShapes||(me.regionShapes={}),shapes,ids,i,j;if(!me.callParent()){return}
for(i=values.length;i--;){shapes=me.renderRegion(i);if(shapes){if(Ext.isArray(shapes)){ids=[];for(j=shapes.length;j--;){shapes[j].append();ids.push(shapes[j].id)}
regionShapes[i]=ids}else{shapes.append();regionShapes[i]=shapes.id}}else{regionShapes[i]=null}}
if(me.currentPageXY){me.currentRegion=null;me.updateDisplay()}
canvas.render()}})
;
Ext.define('Ext.sparkline.RangeMap',{constructor:function(map){var key,range,rangelist=[];for(key in map){if(map.hasOwnProperty(key)&&typeof key==='string'&&key.indexOf(':')>-1){range=key.split(':');range[0]=range[0].length===0?-Infinity:parseFloat(range[0]);range[1]=range[1].length===0?Infinity:parseFloat(range[1]);range[2]=map[key];rangelist.push(range)}}
this.map=map;this.rangelist=rangelist||!1},get:function(value){var rangelist=this.rangelist,i,range,result;if((result=this.map[value])!==undefined){return result}
if(rangelist){for(i=rangelist.length;i--;){range=rangelist[i];if(range[0]<=value&&range[1]>=value){return range[2]}}}}})
;
Ext.define('Ext.sparkline.Bar',{extend:'Ext.sparkline.BarBase',requires:['Ext.sparkline.RangeMap'],alias:'widget.sparklinebar',config:{barColor:'#3366cc',negBarColor:'#f44',stackedBarColor:['#3366cc','#dc3912','#ff9900','#109618','#66aa00','#dd4477','#0099c6','#990099'],zeroColor:null,nullColor:null,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMin:null,chartRangeMax:null,chartRangeClip:!1,colorMap:null},tipTpl:'&#9679; {prefix}{value}{suffix}',remove:function(vals,filter){var result=[],i,vl;for(i=0,vl=vals.length;i<vl;i++){if(vals[i]!==filter){result.push(vals[i])}}
return result},all:function(arr,val,ignoreNull){var i;for(i=arr.length;i--;){if(ignoreNull&&arr[i]===null){continue}
if(arr[i]!==val){return!1}}
return!0},applyColorMap:function(colorMap){var me=this;if(Ext.isArray(colorMap)){me.colorMapByIndex=colorMap;me.colorMapByValue=null}else{me.colorMapByIndex=null;me.colorMapByValue=colorMap;if(me.colorMapByValue&&me.colorMapByValue.get==null){me.colorMapByValue=new Ext.sparkline.RangeMap(colorMap)}}
me.updateConfigChange();return colorMap},onUpdate:function(){var me=this,values=me.values,barWidth=me.getBarWidth(),barSpacing=me.getBarSpacing(),chartRangeMin=me.getChartRangeMin(),chartRangeMax=me.getChartRangeMax(),chartRangeClip=me.getChartRangeClip(),stackMin=Infinity,stackMax=-Infinity,zeroAxis=me.getZeroAxis(),stackTotals=[],stackRangesNeg=[],isStackString,groupMin,groupMax,stackRanges,numValues,i,vlen,range,xAxisOffset,min,max,clipMin,clipMax,stacked,vlist,j,slen,svals,val,yoffset,yMaxCalc;for(i=0,vlen=values.length;i<vlen;i++){val=values[i];isStackString=typeof(val)==='string'&&val.indexOf(':')>-1;if(isStackString||Ext.isArray(val)){stacked=!0;if(isStackString){val=values[i]=me.normalizeValues(val.split(':'))}
val=me.remove(val,null);groupMin=Math.min.apply(Math,val);groupMax=Math.max.apply(Math,val);if(groupMin<stackMin){stackMin=groupMin}
if(groupMax>stackMax){stackMax=groupMax}}}
me.stacked=stacked;me.regionShapes={};me.totalBarWidth=barWidth+barSpacing;if(values.length){me.width=(values.length*barWidth)+((values.length-1)*barSpacing)}
if(chartRangeClip){clipMin=chartRangeMin==null?-Infinity:chartRangeMin;clipMax=chartRangeMax==null?Infinity:chartRangeMax}
numValues=[];stackRanges=stacked?[]:numValues;for(i=0,vlen=values.length;i<vlen;i++){if(stacked){vlist=values[i];values[i]=svals=[];stackTotals[i]=0;stackRanges[i]=stackRangesNeg[i]=0;for(j=0,slen=vlist.length;j<slen;j++){val=svals[j]=chartRangeClip?Ext.Number.constrain(vlist[j],clipMin,clipMax):vlist[j];if(val!==null){if(val>0){stackTotals[i]+=val}
if(stackMin<0&&stackMax>0){if(val<0){stackRangesNeg[i]+=Math.abs(val)}else{stackRanges[i]+=val}}else{stackRanges[i]+=Math.abs(val-(val<0?stackMax:stackMin))}
numValues.push(val)}}}else{val=chartRangeClip?Ext.Number.constrain(values[i],clipMin,clipMax):values[i];val=values[i]=me.normalizeValue(val);if(val!==null){numValues.push(val)}}}
me.max=max=Math.max.apply(Math,numValues);me.min=min=Math.min.apply(Math,numValues);me.stackMax=stackMax=stacked?Math.max.apply(Math,stackTotals):max;me.stackMin=stackMin=stacked?Math.min.apply(Math,numValues):min;if(chartRangeMin!=null&&(chartRangeClip||chartRangeMin<min)){min=chartRangeMin}
if(chartRangeMax!=null&&(chartRangeClip||chartRangeMax>max)){max=chartRangeMax}
if(min<=0&&max>=0&&zeroAxis){xAxisOffset=0}else if(!zeroAxis){xAxisOffset=min}else if(min>0){xAxisOffset=min}else{xAxisOffset=max}
me.xAxisOffset=xAxisOffset;range=stacked?(Math.max.apply(Math,stackRanges)+Math.max.apply(Math,stackRangesNeg)):max-min;me.canvasHeightEf=(zeroAxis&&min<0)?me.getHeight()-2:me.getHeight()-1;if(min<xAxisOffset){yMaxCalc=(stacked&&max>=0)?stackMax:max;yoffset=(yMaxCalc-xAxisOffset)/range*me.getHeight();if(yoffset!==Math.ceil(yoffset)){me.canvasHeightEf-=2;yoffset=Math.ceil(yoffset)}}else{yoffset=me.getHeight()}
me.yoffset=yoffset;me.range=range},getRegion:function(x,y){var result=Math.floor(x/this.totalBarWidth);return(result<0||result>=this.values.length)?undefined:result},getRegionFields:function(region){var values=Ext.Array.from(this.values[region]),result=[],value,i;for(i=values.length;i--;){value=values[i];result.push({isNull:value===null,value:value,color:this.calcColor(i,value,region),offset:region})}
return result},calcColor:function(stacknum,value,valuenum){var me=this,colorMapByIndex=me.colorMapByIndex,colorMapByValue=me.colorMapByValue,color,newColor,zeroColor=me.getZeroColor();if(this.stacked){color=me.getStackedBarColor()}else{color=(value<0)?me.getNegBarColor():me.getBarColor()}
if(value===0&&zeroColor!=null){color=zeroColor}
if(colorMapByValue&&(newColor=colorMapByValue.get(value))){color=newColor}else if(colorMapByIndex&&colorMapByIndex.length>valuenum){color=colorMapByIndex[valuenum]}
return Ext.isArray(color)?color[stacknum%color.length]:color},renderRegion:function(valuenum,highlight){var me=this,vals=me.values[valuenum],xaxisOffset=me.xAxisOffset,range=me.range,stacked=me.stacked,canvas=me.canvas,barWidth=me.getBarWidth(),x=valuenum*me.totalBarWidth,canvasHeightEf=me.canvasHeightEf,yoffset=me.yoffset,y,height,color,isNull,yoffsetNeg,i,valcount,val,minPlotted,allMin,nullColor=me.getNullColor();vals=Ext.isArray(vals)?vals:[vals];valcount=vals.length;val=vals[0];isNull=me.all(vals,null);allMin=me.all(vals,xaxisOffset,!0);if(isNull){if(nullColor){color=highlight?nullColor:me.calcHighlightColor(nullColor,me);y=(yoffset>0)?yoffset-1:yoffset;canvas.drawRect(x,y,barWidth-1,0,color,color).append()}
return}
yoffsetNeg=yoffset;for(i=0;i<valcount;i++){val=vals[i];if(stacked&&val===xaxisOffset){if(!allMin||minPlotted){continue}
minPlotted=!0}
if(range>0){height=Math.floor(canvasHeightEf*((Math.abs(val-xaxisOffset)/range)))+1}else{height=1}
if(val<xaxisOffset||(val===xaxisOffset&&yoffset===0)){y=yoffsetNeg;yoffsetNeg+=height}else{y=yoffset-height;yoffset-=height}
color=me.calcColor(i,val,valuenum);if(highlight){color=me.calcHighlightColor(color,me)}
canvas.drawRect(x,y,barWidth-1,height-1,color,color).append()}}},function(cls){cls.onClassCreated(cls)})
;
Ext.define('Ext.sparkline.Box',{extend:'Ext.sparkline.Base',alias:'widget.sparklinebox',config:{raw:!1,boxLineColor:'#000',boxFillColor:'#cdf',whiskerColor:'#000',outlierLineColor:'#333',outlierFillColor:'#fff',medianColor:'#f00',showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:null,targetColor:'#4a2',chartRangeMin:null,chartRangeMax:null},tipTpl:['{field:this.fields}: {value}',{fields:function(v){var fields={lq:'Lower Quartile',med:'Median',uq:'Upper Quartile',lo:'Left Outlier',ro:'Right Outlier',lw:'Left Whisker',rw:'Right Whisker'};return fields[v]}}],tooltipFormatFieldlistKey:'field',quartile:function(values,q){var vl;if(q===2){vl=Math.floor(values.length/2);return values.length%2?values[vl]:(values[vl-1]+values[vl])/2}else{if(values.length%2){vl=(values.length*q+q)/4;return vl%1?(values[Math.floor(vl)]+values[Math.floor(vl)-1])/2:values[vl-1]}else{vl=(values.length*q+2)/4;return vl%1?(values[Math.floor(vl)]+values[Math.floor(vl)-1])/2:values[vl-1]}}},applyValues:function(newValues){newValues=Ext.Array.map(Ext.Array.from(newValues),Number);if(!this.raw){newValues.sort(function(a,b){return a-b})}
this.disabled=!(newValues&&newValues.length);this.updateConfigChange();return newValues},getRegion:function(){return 1},getRegionFields:function(){var result=[{field:'lq',value:this.quartiles[0]},{field:'med',value:this.quartiles[1]},{field:'uq',value:this.quartiles[2]}];if(this.loutlier!==undefined){result.push({field:'lo',value:this.loutlier})}
if(this.routlier!==undefined){result.push({field:'ro',value:this.routlier})}
if(this.lwhisker!==undefined){result.push({field:'lw',value:this.lwhisker})}
if(this.rwhisker!==undefined){result.push({field:'rw',value:this.rwhisker})}
return result},renderHighlight:Ext.emptyFn,renderGraph:function(){var me=this,canvas=me.canvas,values=me.values,vlen=values.length,canvasWidth=me.getWidth(),canvasHeight=me.getHeight(),chartRangeMin=me.getChartRangeMin(),chartRangeMax=me.getChartRangeMax(),minValue=chartRangeMin==null?Math.min.apply(Math,values):chartRangeMin,maxValue=chartRangeMax==null?Math.max.apply(Math,values):chartRangeMax,canvasLeft=0,lwhisker,loutlier,iqr,q1,q2,q3,rwhisker,routlier,i,size,unitSize,spotRadius=me.getSpotRadius(),outlierLineColor=me.getOutlierLineColor(),outlierFillColor=me.getOutlierFillColor(),showOutliers=me.getShowOutliers(),outlierIQR=me.getOutlierIQR(),lineColor=me.getLineColor(),whiskerColor=me.getWhiskerColor(),targetColor=me.getTargetColor();if(!me.callParent()){return}
if(me.raw){if(showOutliers&&values.length>5){loutlier=values[0];lwhisker=values[1];q1=values[2];q2=values[3];q3=values[4];rwhisker=values[5];routlier=values[6]}else{lwhisker=values[0];q1=values[1];q2=values[2];q3=values[3];rwhisker=values[4]}}else{q1=me.quartile(values,1);q2=me.quartile(values,2);q3=me.quartile(values,3);iqr=q3-q1;if(showOutliers){lwhisker=rwhisker=null;for(i=0;i<vlen;i++){if(lwhisker==null&&values[i]>q1-(iqr*outlierIQR)){lwhisker=values[i]}
if(values[i]<q3+(iqr*outlierIQR)){rwhisker=values[i]}}
loutlier=values[0];routlier=values[vlen-1]}else{lwhisker=values[0];rwhisker=values[vlen-1]}}
me.quartiles=[q1,q2,q3];me.lwhisker=lwhisker;me.rwhisker=rwhisker;me.loutlier=loutlier;me.routlier=routlier;unitSize=canvasWidth/(maxValue-minValue+1);if(showOutliers){canvasLeft=Math.ceil(spotRadius);canvasWidth-=2*Math.ceil(spotRadius);unitSize=canvasWidth/(maxValue-minValue+1);if(loutlier<lwhisker){canvas.drawCircle((loutlier-minValue)*unitSize+canvasLeft,canvasHeight/2,spotRadius,outlierLineColor,outlierFillColor).append()}
if(routlier>rwhisker){canvas.drawCircle((routlier-minValue)*unitSize+canvasLeft,canvasHeight/2,spotRadius,outlierLineColor,outlierFillColor).append()}}
canvas.drawRect(Math.round((q1-minValue)*unitSize+canvasLeft),Math.round(canvasHeight*0.1),Math.round((q3-q1)*unitSize),Math.round(canvasHeight*0.8),me.getBoxLineColor(),me.getBoxFillColor()).append();canvas.drawLine(Math.round((lwhisker-minValue)*unitSize+canvasLeft),Math.round(canvasHeight/2),Math.round((q1-minValue)*unitSize+canvasLeft),Math.round(canvasHeight/2),lineColor).append();canvas.drawLine(Math.round((lwhisker-minValue)*unitSize+canvasLeft),Math.round(canvasHeight/4),Math.round((lwhisker-minValue)*unitSize+canvasLeft),Math.round(canvasHeight-canvasHeight/4),whiskerColor).append();canvas.drawLine(Math.round((rwhisker-minValue)*unitSize+canvasLeft),Math.round(canvasHeight/2),Math.round((q3-minValue)*unitSize+canvasLeft),Math.round(canvasHeight/2),lineColor).append();canvas.drawLine(Math.round((rwhisker-minValue)*unitSize+canvasLeft),Math.round(canvasHeight/4),Math.round((rwhisker-minValue)*unitSize+canvasLeft),Math.round(canvasHeight-canvasHeight/4),whiskerColor).append();canvas.drawLine(Math.round((q2-minValue)*unitSize+canvasLeft),Math.round(canvasHeight*0.1),Math.round((q2-minValue)*unitSize+canvasLeft),Math.round(canvasHeight*0.9),me.getMedianColor()).append();if(me.target){size=Math.ceil(me.spotRadius);canvas.drawLine(Math.round((me.target-minValue)*unitSize+canvasLeft),Math.round((canvasHeight/2)-size),Math.round((me.target-minValue)*unitSize+canvasLeft),Math.round((canvasHeight/2)+size),targetColor).append();canvas.drawLine(Math.round((me.target-minValue)*unitSize+canvasLeft-size),Math.round(canvasHeight/2),Math.round((me.target-minValue)*unitSize+canvasLeft+size),Math.round(canvasHeight/2),targetColor).append()}
if(me.currentPageXY&&me.canvasRegion.contains(me.currentPageXY)){me.currentRegion=null;me.updateDisplay()}
canvas.render()}})
;
Ext.define('Ext.sparkline.Bullet',{extend:'Ext.sparkline.Base',alias:'widget.sparklinebullet',config:{targetColor:'#f33',targetWidth:3,performanceColor:'#33f',rangeColors:['#d3dafe','#a8b6ff','#7f94ff'],base:null},tipTpl:['{fieldkey:this.fields} - {value}',{fields:function(v){if(v==='r'){return'Range'}
if(v==='p'){return'Performance'}
if(v==='t'){return'Target'}}}],applyValues:function(newValues){newValues=Ext.Array.map(Ext.Array.from(newValues),this.normalizeValue);this.disabled=!(newValues&&newValues.length);this.updateConfigChange();return newValues},onUpdate:function(){var me=this,values=me.values,min,max,vals,base=me.getBase();me.callParent(arguments);vals=values.slice();vals[0]=vals[0]===null?vals[2]:vals[0];vals[1]=values[1]===null?vals[2]:vals[1];min=Math.min.apply(Math,values);max=Math.max.apply(Math,values);if(base==null){min=min<0?min:0}else{min=base}
me.min=min;me.max=max;me.range=max-min;me.shapes={};me.valueShapes={};me.regiondata={};if(!values.length){me.disabled=!0}},getRegion:function(x,y){var shapeid=this.canvas.getShapeAt(x,y);return(shapeid!==undefined&&this.shapes[shapeid]!==undefined)?this.shapes[shapeid]:undefined},getRegionFields:function(region){return{fieldkey:region.substr(0,1),value:this.values[parseInt(region.substr(1),10)],region:region}},renderHighlight:function(region){var me=this,valueShapes=me.valueShapes,shapes=me.shapes,shapeId=valueShapes[region],shape;delete shapes[shapeId];switch(region.substr(0,1)){case 'r':shape=me.renderRange(parseInt(region.substr(1),10),!0);break;case 'p':shape=me.renderPerformance(!0);break;case 't':shape=me.renderTarget(!0);break}
valueShapes[region]=shape.id;shapes[shape.id]=region;me.canvas.replaceWithShape(shapeId,shape)},renderRange:function(region,highlight){var me=this,rangeval=me.values[region],rangewidth=Math.round(me.getWidth()*((rangeval-me.min)/me.range)),colors=me.getRangeColors(),color=colors[Math.min(region-2,colors.length-1)];if(highlight){color=me.calcHighlightColor(color)}
return me.canvas.drawRect(0,0,rangewidth-1,me.getHeight()-1,color,color)},renderPerformance:function(highlight){var perfval=this.values[1],perfwidth=Math.round(this.getWidth()*((perfval-this.min)/this.range)),color=this.getPerformanceColor();if(highlight){color=this.calcHighlightColor(color)}
return this.canvas.drawRect(0,Math.round(this.getHeight()*0.3),perfwidth-1,Math.round(this.getHeight()*0.4)-1,color,color)},renderTarget:function(highlight){var targetval=this.values[0],targetWidth=this.getTargetWidth(),x=Math.round(this.getWidth()*((targetval-this.min)/this.range)-(targetWidth/2)),targettop=Math.round(this.getHeight()*0.10),targetheight=this.getHeight()-(targettop*2),color=this.getTargetColor();if(highlight){color=this.calcHighlightColor(color)}
return this.canvas.drawRect(x,targettop,targetWidth-1,targetheight-1,color,color)},renderGraph:function(){var me=this,vlen=me.values.length,canvas=me.canvas,i,shape,shapes=me.shapes||(me.shapes={}),valueShapes=me.valueShapes||(me.valueShapes={});if(!me.callParent()){return}
for(i=2;i<vlen;i++){shape=me.renderRange(i).append();shapes[shape.id]='r'+i;valueShapes['r'+i]=shape.id}
if(me.values[1]!==null){shape=me.renderPerformance().append();shapes[shape.id]='p1';valueShapes.p1=shape.id}
if(me.values[0]!==null){shape=this.renderTarget().append();shapes[shape.id]='t0';valueShapes.t0=shape.id}
if(me.currentPageXY&&me.canvasRegion.contains(me.currentPageXY)){me.updateDisplay()}
canvas.render()},privates:{isValidRegion:function(region,values){return parseInt(region.substr(1),10)<values.length}}})
;
Ext.define('Ext.sparkline.Discrete',{extend:'Ext.sparkline.BarBase',alias:'widget.sparklinediscrete',config:{lineHeight:'auto',thresholdColor:null,thresholdValue:0,chartRangeMax:null,chartRangeMin:null,chartRangeClip:!1},tipTpl:'{prefix}{value}{suffix}',applyValues:function(newValues){newValues=Ext.Array.map(Ext.Array.from(newValues),Number);this.disabled=!(newValues&&newValues.length);this.updateConfigChange();return newValues},onUpdate:function(){var me=this,values=me.values,chartRangeMin=me.getChartRangeMin(),chartRangeMax=me.getChartRangeMax(),chartRangeClip=me.getChartRangeClip();me.callParent(arguments);me.regionShapes={};me.min=Math.min.apply(Math,values);me.max=Math.max.apply(Math,values);me.range=me.max-me.min;me.width=me.getWidth();me.interval=Math.floor(me.width/values.length);me.itemWidth=me.width/values.length;if(chartRangeMin!=null&&(chartRangeClip||chartRangeMin<me.min)){me.min=chartRangeMin}
if(chartRangeMax!=null&&(chartRangeClip||chartRangeMax>me.max)){me.max=chartRangeMax}
if(me.canvas){if(me.getLineHeight()==='auto'){me.setLineHeight(Math.round(me.getHeight()*0.3))}}},getRegion:function(x,y){return Math.floor(x/this.itemWidth)},getRegionFields:function(region){return{isNull:this.values[region]===undefined,value:this.values[region],offset:region}},renderRegion:function(valuenum,highlight){var me=this,values=me.values,min=me.min,max=me.max,range=me.range,interval=me.interval,canvas=me.canvas,canvasHeight=me.getHeight(),lineHeight=me.getLineHeight(),pheight=canvasHeight-lineHeight,ytop,val,color,x,thresholdColor=me.getThresholdColor();val=Ext.Number.constrain(values[valuenum],min,max);x=valuenum*interval;ytop=Math.round(pheight-pheight*((val-min)/range));color=(thresholdColor&&val<me.getThresholdValue())?thresholdColor:me.getLineColor();if(highlight){color=me.calcHighlightColor(color)}
canvas.drawLine(x,ytop,x,ytop+lineHeight,color).append()}})
;
Ext.define('Ext.sparkline.Line',{extend:'Ext.sparkline.Base',requires:['Ext.sparkline.RangeMap'],alias:'widget.sparklineline',config:{fillColor:'#def',spotColor:'#f80',highlightSpotColor:'#5f5',highlightLineColor:'#f22',spotRadius:1.5,minSpotColor:'#f80',maxSpotColor:'#f80',lineWidth:1,normalRangeMin:null,normalRangeMax:null,normalRangeColor:'#ccc',drawNormalOnTop:!1,chartRangeMin:null,chartRangeMax:null,chartRangeMinX:null,chartRangeMaxX:null,valueSpots:null},tipTpl:'&#9679; {prefix}{y}{suffix}',applyValueSpots:function(valueSpots){if(valueSpots&&!valueSpots.get){valueSpots=new Ext.sparkline.RangeMap(valueSpots)}
this.updateConfigChange();return valueSpots},onUpdate:function(){this.vertices=[];this.regionMap=[];this.xvalues=[];this.yvalues=[];this.yminmax=[]},getRegion:function(x,y){var i,regionMap=this.regionMap;for(i=regionMap.length;i--;){if(regionMap[i]!==null&&x>=regionMap[i][0]&&x<=regionMap[i][1]){return regionMap[i][2]}}
return undefined},getRegionFields:function(region){return{isNull:this.yvalues[region]===null,x:this.xvalues[region],y:this.yvalues[region],color:this.getLineColor(),fillColor:this.getFillColor(),offset:region}},renderHighlight:function(region){var me=this,canvas=me.canvas,vertex=me.vertices[region],spotRadius=me.getSpotRadius(),highlightSpotColor=me.getHighlightSpotColor(),highlightLineColor=me.getHighlightLineColor();if(!vertex){return}
if(spotRadius&&highlightSpotColor){canvas.drawCircle(vertex[0],vertex[1],spotRadius,null,highlightSpotColor).append()}
if(highlightLineColor){canvas.drawLine(vertex[0],me.canvasTop,vertex[0],me.canvasTop+me.getHeight(),highlightLineColor).append()}},scanValues:function(){var me=this,values=me.values,valcount=values.length,xvalues=me.xvalues,yvalues=me.yvalues,yminmax=me.yminmax,i,val;for(i=0;i<valcount;i++){val=values[i];if(typeof val==='string'){val=val.split(':')}
if(val&&val.length===2){xvalues.push(Number(val[0]));yvalues.push(val=Number(val[1]));yminmax.push(val)}else{xvalues.push(i);if(val==null||val==='null'){yvalues.push(null)}else{yvalues.push(val=Number(val));yminmax.push(val)}}}
if(me.xvalues){xvalues=me.xvalues}
me.maxy=me.maxyorg=Math.max.apply(Math,yminmax);me.miny=me.minyorg=Math.min.apply(Math,yminmax);me.maxx=Math.max.apply(Math,xvalues);me.minx=Math.min.apply(Math,xvalues);me.xvalues=xvalues;me.yvalues=yvalues;me.yminmax=yminmax},processRangeOptions:function(){var me=this,normalRangeMin=me.getNormalRangeMin(),normalRangeMax=me.getNormalRangeMax(),chartRangeMin=me.getChartRangeMin(),chartRangeMinX=me.getChartRangeMinX(),chartRangeMax=me.getChartRangeMax(),chartRangeMaxX=me.getChartRangeMaxX();if(normalRangeMin!=null){if(normalRangeMin<me.miny){me.miny=normalRangeMin}
if(normalRangeMax>me.maxy){me.maxy=normalRangeMax}}
if(chartRangeMin!=null&&(me.chartRangeClip||chartRangeMin<me.miny)){me.miny=chartRangeMin}
if(chartRangeMax!=null&&(me.chartRangeClip||chartRangeMax>me.maxy)){this.maxy=chartRangeMax}
if(chartRangeMinX!=null&&(me.chartRangeClipX||chartRangeMinX<me.minx)){me.minx=chartRangeMinX}
if(chartRangeMaxX!=null&&(me.chartRangeClipX||chartRangeMaxX>me.maxx)){me.maxx=chartRangeMaxX}},drawNormalRange:function(canvasLeft,canvasTop,canvasHeight,canvasWidth,rangey){var normalRangeMin=this.getNormalRangeMin(),normalRangeMax=this.getNormalRangeMax(),ytop=canvasTop+Math.round(canvasHeight-(canvasHeight*((normalRangeMax-this.miny)/rangey))),height=Math.round((canvasHeight*(normalRangeMax-normalRangeMin))/rangey);this.canvas.drawRect(canvasLeft,ytop,canvasWidth,height,undefined,this.normalRangeColor).append()},renderGraph:function(){var me=this,canvas=me.canvas,canvasWidth=me.getWidth(),canvasHeight=me.getHeight(),vertices=me.vertices,spotRadius=me.getSpotRadius(),regionMap=me.regionMap,rangeX,Y,yvallast,canvasTop,canvasLeft,vertex,path,paths,x,y,xNext,xPos,xPosNext,last,next,yValCount,lineShapes,fillShapes,plen,valueSpots=me.getValueSpots(),hlSpotsEnabled,color,xValues,yValues,i,spotColor=me.getSpotColor(),minSpotColor=me.getMinSpotColor(),maxSpotColor=me.getMaxSpotColor(),normalRangeMin=me.getNormalRangeMin(),drawNormalOnTop=me.getDrawNormalOnTop();if(!me.callParent()){return}
me.scanValues();me.processRangeOptions();xValues=me.xvalues;yValues=me.yvalues;if(!me.yminmax.length||me.yvalues.length<2){return}
canvasTop=canvasLeft=0;rangeX=me.maxx-me.minx===0?1:me.maxx-me.minx;Y=me.maxy-me.miny===0?1:me.maxy-me.miny;yvallast=me.yvalues.length-1;if(spotRadius&&(canvasWidth<(spotRadius*4)||canvasHeight<(spotRadius*4))){spotRadius=0}
if(spotRadius){hlSpotsEnabled=me.getHighlightSpotColor()&&!me.disableInteraction;if(hlSpotsEnabled||minSpotColor||(spotColor&&yValues[yvallast]===me.miny)){canvasHeight-=Math.ceil(spotRadius)}
if(hlSpotsEnabled||maxSpotColor||(spotColor&&yValues[yvallast]===me.maxy)){canvasHeight-=Math.ceil(spotRadius);canvasTop+=Math.ceil(spotRadius)}
if(hlSpotsEnabled||((minSpotColor||maxSpotColor)&&(yValues[0]===me.miny||yValues[0]===me.maxy))){canvasLeft+=Math.ceil(spotRadius);canvasWidth-=Math.ceil(spotRadius)}
if(hlSpotsEnabled||spotColor||(minSpotColor||maxSpotColor&&(yValues[yvallast]===me.miny||yValues[yvallast]===me.maxy))){canvasWidth-=Math.ceil(spotRadius)}}
canvasHeight--;if(normalRangeMin!=null&&!drawNormalOnTop){me.drawNormalRange(canvasLeft,canvasTop,canvasHeight,canvasWidth,Y)}
path=[];paths=[path];last=next=null;yValCount=yValues.length;for(i=0;i<yValCount;i++){x=xValues[i];xNext=xValues[i+1];y=yValues[i];xPos=canvasLeft+Math.round((x-me.minx)*(canvasWidth/rangeX));xPosNext=i<yValCount-1?canvasLeft+Math.round((xNext-me.minx)*(canvasWidth/rangeX)):canvasWidth;next=xPos+((xPosNext-xPos)/2);regionMap[i]=[last||0,next,i];last=next;if(y===null){if(i){if(yValues[i-1]!==null){path=[];paths.push(path)}
vertices.push(null)}}else{if(y<me.miny){y=me.miny}
if(y>me.maxy){y=me.maxy}
if(!path.length){path.push([xPos,canvasTop+canvasHeight])}
vertex=[xPos,canvasTop+Math.round(canvasHeight-(canvasHeight*((y-this.miny)/Y)))];path.push(vertex);vertices.push(vertex)}}
lineShapes=[];fillShapes=[];plen=paths.length;for(i=0;i<plen;i++){path=paths[i];if(path.length){if(me.fillColor){path.push([path[path.length-1][0],(canvasTop+canvasHeight)]);fillShapes.push(path.slice(0));path.pop()}
if(path.length>2){path[0]=[path[0][0],path[1][1]]}
lineShapes.push(path)}}
plen=fillShapes.length;for(i=0;i<plen;i++){canvas.drawShape(fillShapes[i],me.fillColor,me.fillColor).append()}
if(normalRangeMin!=null&&drawNormalOnTop){me.drawNormalRange(canvasLeft,canvasTop,canvasHeight,canvasWidth,Y)}
plen=lineShapes.length;for(i=0;i<plen;i++){canvas.drawShape(lineShapes[i],me.getLineColor(),null,me.getLineWidth()).append()}
if(spotRadius&&valueSpots){if(valueSpots.get==null){valueSpots=new Ext.sparkline.RangeMap(valueSpots)}
for(i=0;i<yValCount;i++){color=valueSpots.get(yValues[i]);if(color){canvas.drawCircle(canvasLeft+Math.round((xValues[i]-me.minx)*(canvasWidth/rangeX)),canvasTop+Math.round(canvasHeight-(canvasHeight*((yValues[i]-me.miny)/Y))),spotRadius,null,color).append()}}}
if(spotRadius&&spotColor&&yValues[yvallast]!=null){canvas.drawCircle(canvasLeft+Math.round((xValues[xValues.length-1]-me.minx)*(canvasWidth/rangeX)),canvasTop+Math.round(canvasHeight-(canvasHeight*((yValues[yvallast]-me.miny)/Y))),spotRadius,null,spotColor).append()}
if(me.maxy!==me.minyorg){if(spotRadius&&minSpotColor){x=xValues[Ext.Array.indexOf(yValues,me.minyorg)];canvas.drawCircle(canvasLeft+Math.round((x-me.minx)*(canvasWidth/rangeX)),canvasTop+Math.round(canvasHeight-(canvasHeight*((me.minyorg-me.miny)/Y))),spotRadius,null,minSpotColor).append()}
if(spotRadius&&maxSpotColor){x=xValues[Ext.Array.indexOf(yValues,me.maxyorg)];canvas.drawCircle(canvasLeft+Math.round((x-me.minx)*(canvasWidth/rangeX)),canvasTop+Math.round(canvasHeight-(canvasHeight*((me.maxyorg-me.miny)/Y))),spotRadius,null,maxSpotColor).append()}}
me.canvasTop=canvasTop;if(me.currentPageXY&&me.canvasRegion.contains(me.currentPageXY)){me.updateDisplay()}
canvas.render()}})
;
Ext.define('Ext.sparkline.Pie',{extend:'Ext.sparkline.Base',alias:'widget.sparklinepie',config:{offset:0,sliceColors:['#3366cc','#dc3912','#ff9900','#109618','#66aa00','#dd4477','#0099c6','#990099'],borderWidth:0,borderColor:'#000'},tipTpl:'&#9679; {value} ({percent:number("0.0")}%)',applyValues:function(newValues){newValues=Ext.Array.map(Ext.Array.from(newValues),Number);this.disabled=!(newValues&&newValues.length);this.updateConfigChange();return newValues},onUpdate:function(){var me=this,values=me.values,total=0,i;me.callParent(arguments);me.shapes={};me.valueShapes={};if(values.length>0){for(i=values.length;i--;){total+=values[i]}}
me.total=total;me.radius=Math.floor(Math.min(me.getWidth(),me.getHeight())/2)},getRegion:function(x,y){var ratio=window.devicePixelRatio||1,shapeid=this.canvas.getShapeAt(x*ratio,y*ratio);return(shapeid!=null&&this.shapes[shapeid]!=null)?this.shapes[shapeid]:null},getRegionFields:function(region){var sliceColors=this.getSliceColors();return{isNull:this.values[region]==null,value:this.values[region],percent:this.values[region]/this.total*100,color:sliceColors[region%sliceColors.length],offset:region}},renderHighlight:function(region){this.renderSlice(region,!0).append()},renderSlice:function(valuenum,highlight){var me=this,canvas=me.canvas,radius=me.radius,borderWidth=me.getBorderWidth(),offset=me.getOffset(),circle=2*Math.PI,values=me.values,total=me.total,next=offset?(2*Math.PI)*(offset/360):0,start,end,i,vlen,color,sliceColors=this.getSliceColors();vlen=values.length;for(i=0;i<vlen;i++){start=next;end=next;if(total>0){end=next+(circle*(values[i]/total))}
if(valuenum===i){color=sliceColors[i%sliceColors.length];if(highlight){color=me.calcHighlightColor(color)}
return canvas.drawPieSlice(radius,radius,radius-borderWidth,start,end,null,color)}
next=end}},renderGraph:function(){var me=this,canvas=me.canvas,values=me.values,radius=me.radius,borderWidth=me.getBorderWidth(),shape,i,shapes=me.shapes||(me.shapes={}),valueShapes=me.valueShapes||(me.valueShapes={});if(!me.callParent()){return}
if(borderWidth){canvas.drawCircle(radius,radius,Math.floor(radius-(borderWidth/2)),me.getBorderColor(),null,borderWidth).append()}
for(i=values.length;i--;){if(values[i]){shape=me.renderSlice(i).append();valueShapes[i]=shape.id;shapes[shape.id]=i}}
if(me.currentPageXY&&me.canvasRegion.contains(me.currentPageXY)){me.currentRegion=null;me.updateDisplay()}
canvas.render()}})
;
Ext.define('Ext.sparkline.TriState',{extend:'Ext.sparkline.BarBase',requires:['Ext.sparkline.RangeMap'],alias:'widget.sparklinetristate',config:{barWidth:4,barSpacing:1,posBarColor:'#6f6',negBarColor:'#f44',zeroBarColor:'#999',colorMap:{}},tipTpl:['&#9679; {value:this.states}',{states:function(v){var value=Number(v);if(value===-1){return'Loss'}
if(value===0){return'Draw'}
if(value===1){return'Win'}
return v}}],applyColorMap:function(colorMap){var me=this;if(Ext.isArray(colorMap)){me.colorMapByIndex=colorMap;me.colorMapByValue=null}else{me.colorMapByIndex=null;me.colorMapByValue=colorMap;if(me.colorMapByValue&&me.colorMapByValue.get==null){me.colorMapByValue=new Ext.sparkline.RangeMap(colorMap)}}
me.updateConfigChange();return colorMap},applyValues:function(newValues){newValues=Ext.Array.map(Ext.Array.from(newValues),Number);this.disabled=!(newValues&&newValues.length);this.updateConfigChange();return newValues},onUpdate:function(){this.totalBarWidth=this.getBarWidth()+this.getBarSpacing()},getBarWidth:function(){var values=this.values;return this._barWidth||(this.getWidth()-(values.length-1)*this.getBarSpacing())/values.length},getRegion:function(x,y){return Math.floor(x/this.totalBarWidth)},getRegionFields:function(region){return{isNull:this.values[region]==null,value:this.values[region],color:this.calcColor(this.values[region],region),offset:region}},calcColor:function(value,valuenum){var me=this,values=me.values,colorMapByIndex=me.colorMapByIndex,colorMapByValue=me.colorMapByValue,color,newColor;if(colorMapByValue&&(newColor=colorMapByValue.get(value))){color=newColor}else if(colorMapByIndex&&colorMapByIndex.length>valuenum){color=colorMapByIndex[valuenum]}else if(values[valuenum]<0){color=me.getNegBarColor()}else if(values[valuenum]>0){color=me.getPosBarColor()}else{color=me.getZeroBarColor()}
return color},renderRegion:function(valuenum,highlight){var me=this,values=me.values,canvas=me.canvas,canvasHeight,height,halfHeight,x,y,color;canvasHeight=canvas.pixelHeight;halfHeight=Math.round(canvasHeight/2);x=valuenum*me.totalBarWidth;if(values[valuenum]<0){y=halfHeight;height=halfHeight-1}else if(values[valuenum]>0){y=0;height=halfHeight-1}else{y=halfHeight-1;height=2}
color=me.calcColor(values[valuenum],valuenum);if(color==null){return}
if(highlight){color=me.calcHighlightColor(color)}
canvas.drawRect(x,y,me.getBarWidth()-1,height-1,color,color).append()}})
;
Ext.define('Ext.util.Base64',{singleton:!0,_str:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var me=this,output='',i=0,chr1,chr2,chr3,enc1,enc2,enc3,enc4,len;input=me._utf8_encode(input);len=input.length;while(i<len){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}
output=output+me._str.charAt(enc1)+me._str.charAt(enc2)+me._str.charAt(enc3)+me._str.charAt(enc4)}
return output},decode:function(input){var me=this,output='',i=0,chr1,chr2,chr3,enc1,enc2,enc3,enc4,len;input=input.replace(/[^A-Za-z0-9+=\/]/g,"");len=input.length;while(i<len){enc1=me._str.indexOf(input.charAt(i++));enc2=me._str.indexOf(input.charAt(i++));enc3=me._str.indexOf(input.charAt(i++));enc4=me._str.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}
if(enc4!==64){output=output+String.fromCharCode(chr3)}}
output=me._utf8_decode(output);return output},_utf8_encode:function(string){var utftext='',c,n,len;string=string.replace(/\r\n/g,"\n");for(n=0,len=string.length;n<len;n++){c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}
return utftext},_utf8_decode:function(utftext){var string='',i=0,c=0,c3=0,c2=0,len=utftext.length;while(i<len){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++}else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3}}
return string}})
;
Ext.define('Ext.util.DelimitedValue',{dateFormat:'C',delimiter:'\t',lineBreak:'\n',quote:'"',lineBreakRe:/\r?\n/g,lastLineBreakRe:/(\r?\n|\r)$/,constructor:function(config){if(config){Ext.apply(this,config)}
this.parseREs={};this.quoteREs={}},decode:function(input,delimiter,quoteChar){if(!input){return[]}
var me=this,row=[],result=[row],quote=quoteChar!==undefined?quoteChar:me.quote,quoteREs=me.quoteREs,parseREs=me.parseREs,parseRE,dblQuoteRE,arrMatches,strMatchedDelimiter,strMatchedValue;delimiter=delimiter||me.delimiter;parseRE=parseREs[delimiter]||new RegExp('(\\'+delimiter+'|\\r?\\n|\\r|^)'+'(?:\\'+quote+'([^\\'+quote+']*(?:\\'+quote+'\\'+quote+'[^\\'+quote+']*)*)\\'+quote+'|'+'([^\\'+delimiter+'\\r\\n]*))','gi');dblQuoteRE=quoteREs[quote]||(quoteREs[quote]=new RegExp('\\'+quote+'\\'+quote,'g'));while((arrMatches=parseRE.exec(input))){strMatchedDelimiter=arrMatches[1];if(strMatchedDelimiter.length&&strMatchedDelimiter!==delimiter){result.push(row=[])}
if(!arrMatches.index&&arrMatches[0].charAt(0)===delimiter){row.push('')}
if(arrMatches[2]){strMatchedValue=arrMatches[2].replace(dblQuoteRE,quote)}else{strMatchedValue=arrMatches[3]}
row.push(strMatchedValue)}
return result},encode:function(input,delimiter,quoteChar){var me=this,delim=delimiter||me.delimiter,dateFormat=me.dateFormat,quote=quoteChar!==undefined?quoteChar:me.quote,twoQuotes=quote+quote,rowIndex=input.length,lineBreakRe=me.lineBreakRe,result=[],outputRow=[],col,columnIndex,inputRow;while(rowIndex-->0){inputRow=input[rowIndex];outputRow.length=columnIndex=inputRow.length;while(columnIndex-->0){col=inputRow[columnIndex];if(col==null){col=''}else if(typeof col==='string'){if(col&&quote!==null){if(col.indexOf(quote)>-1){col=quote+col.split(quote).join(twoQuotes)+quote}else if(col.indexOf(delim)>-1||lineBreakRe.test(col)){col=quote+col+quote}}}else if(Ext.isDate(col)){col=Ext.Date.format(col,dateFormat)}else if(col&&(isNaN(col)||Ext.isArray(col))){Ext.raise('Cannot serialize '+Ext.typeOf(col)+' into CSV')}
outputRow[columnIndex]=col}
result[rowIndex]=outputRow.join(delim)}
return result.join(me.lineBreak)}})
;
Ext.define('Ext.util.CSV',{extend:'Ext.util.DelimitedValue',singleton:!0,delimiter:','})
;
Ext.define('Ext.util.ClickRepeater',{alternateClassName:'Ext.util.TapRepeater',mixins:['Ext.mixin.Observable'],config:{el:null,target:null,disabled:null},interval:20,delay:250,preventDefault:!0,stopDefault:!1,timer:0,handler:null,scope:null,constructor:function(config){var me=this;if(arguments.length===2){me.setEl(config);config=arguments[1]}
me.mixins.observable.constructor.call(this,config)},destroy:function(){this.setEl(null);this.callParent()},privates:{fireClick:function(e){var me=this;me.fireEvent("click",me,e);Ext.callback(me.handler,me.scope,[me,e],0,me.getTarget())},updateDisabled:function(disabled){var me=this;if(disabled){me.savedEl=me.getEl();me.setEl(null)}else if(me.savedEl){me.setEl(me.savedEl)}},updateTarget:function(target){this.setEl(target.el)},updateEl:function(newEl,oldEl){var me=this,elListeners;if(oldEl){oldEl.selectable();Ext.undefer(me.timer);if(me.pressedCls){oldEl.removeCls(me.pressedCls)}
Ext.getDoc().un('mouseup',me.handleMouseUp,me);me.elListeners=Ext.destroy(me.elListeners)}
if(newEl){newEl.unselectable();elListeners={mousedown:me.handleMouseDown,scope:me,destroyable:!0};if(me.preventDefault||me.stopDefault){elListeners.click=me.eventOptions}
me.elListeners=newEl.on(elListeners)}},eventOptions:function(e){if(this.preventDefault){e.preventDefault()}
if(this.stopDefault){e.stopEvent()}},handleMouseDown:function(e){var me=this,el=me.getEl();Ext.undefer(me.timer);if(me.pressedCls){el.addCls(me.pressedCls)}
me.mousedownTime=Ext.now();if(e.pointerType==='mouse'){el.on("mouseout",me.handleMouseOut,me)}
Ext.getDoc().on("mouseup",me.handleMouseUp,me);me.fireEvent("mousedown",me,e);me.fireClick(e);if(me.accelerate){me.delay=400}
me.timer=Ext.defer(me.click,me.delay||me.interval,me,[e]);if(me.mousedownPreventDefault){e.preventDefault()}
if(me.mousedownStopEvent){e.stopEvent()}},click:function(e){var me=this;me.fireClick(e);me.timer=Ext.defer(me.click,me.accelerate?me.easeOutExpo(Ext.now()-me.mousedownTime,400,-390,12000):me.interval,me,[e])},easeOutExpo:function(t,b,c,d){return(t===d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},handleMouseOut:function(){var me=this,el=me.getEl();Ext.undefer(me.timer);if(me.pressedCls){el.removeCls(me.pressedCls)}
el.on("mouseover",me.handleMouseReturn,me)},handleMouseReturn:function(e){var me=this,el=me.getEl();el.un("mouseover",me.handleMouseReturn,me);if(me.pressedCls){el.addCls(me.pressedCls)}
me.click(e)},handleMouseUp:function(e){var me=this,el=me.getEl();Ext.undefer(me.timer);el.un("mouseover",me.handleMouseReturn,me);el.un("mouseout",me.handleMouseOut,me);Ext.getDoc().un("mouseup",me.handleMouseUp,me);if(me.pressedCls){el.removeCls(me.pressedCls)}
me.fireEvent("mouseup",me,e)}}})
;
Ext.define('Ext.util.Cookies',{singleton:!0,set:function(name,value){var argv=arguments,argc=argv.length,expires=(argc>2)?argv[2]:null,path=(argc>3)?argv[3]:'/',domain=(argc>4)?argv[4]:null,secure=(argc>5)?argv[5]:!1;document.cookie=name+"="+escape(value)+((expires===null)?"":("; expires="+expires.toUTCString()))+((path===null)?"":("; path="+path))+((domain===null)?"":("; domain="+domain))+((secure===!0)?"; secure":"")},get:function(name){var parts=document.cookie.split('; '),len=parts.length,item,i,ret;for(i=0;i<len;++i){item=parts[i].split('=');if(item[0]===name){ret=item[1];return ret?unescape(ret):''}}
return null},clear:function(name,path){if(this.get(name)){path=path||'/';document.cookie=name+'='+'; expires=Thu, 01-Jan-1970 00:00:01 GMT; path='+path}}})
;
Ext.define('Ext.util.ItemCollection',{extend:'Ext.util.MixedCollection',alternateClassName:'Ext.ItemCollection',getKey:function(item){return item.getItemId&&item.getItemId()},has:function(item){return this.map.hasOwnProperty(item.getId())}})
;
Ext.define('Ext.util.LocalStorage',{id:null,destroyed:!1,lazyKeys:!0,prefix:'',session:!1,_keys:null,_store:null,_users:0,statics:{cache:{},get:function(id){var me=this,cache=me.cache,config={_users:1},instance;if(Ext.isString(id)){config.id=id}else{Ext.apply(config,id)}
if(!(instance=cache[config.id])){instance=new me(config)}else{if(instance===!0){Ext.raise('Creating a shared instance of private local store "'+me.id+'".')}
++instance._users}
return instance},supported:!0},constructor:function(config){var me=this;Ext.apply(me,config);if(!me.hasOwnProperty('id')){Ext.raise("No id was provided to the local store.")}
if(me._users){Ext.util.LocalStorage.cache[me.id]=me}else{if(Ext.util.LocalStorage.cache[me.id]){Ext.raise('Cannot create duplicate instance of local store "'+me.id+'". Use Ext.util.LocalStorage.get() to share instances.')}
Ext.util.LocalStorage.cache[me.id]=!0}
me.init()},init:function(){var me=this,id=me.id;if(!me.prefix&&id){me.prefix=id+'-'}
me._store=(me.session?window.sessionStorage:window.localStorage)},destroy:function(){var me=this;if(me._users){Ext.log.warn('LocalStorage(id='+me.id+') destroyed while in use')}
delete Ext.util.LocalStorage.cache[me.id];me._store=me._keys=null;me.callParent()},getKeys:function(){var me=this,store=me._store,prefix=me.prefix,keys=me._keys,n=prefix.length,i,key;if(!keys){me._keys=keys=[];for(i=store.length;i--;){key=store.key(i);if(key.length>n){if(prefix===key.substring(0,n)){keys.push(key.substring(n))}}}}
return keys},release:function(){if(!--this._users){this.destroy()}},save:Ext.emptyFn,clear:function(){var me=this,store=me._store,prefix=me.prefix,keys=me._keys||me.getKeys(),i;for(i=keys.length;i--;){store.removeItem(prefix+keys[i])}
keys.length=0},key:function(index){var keys=this._keys||this.getKeys();return(0<=index&&index<keys.length)?keys[index]:null},getItem:function(key){var k=this.prefix+key;return this._store.getItem(k)},removeItem:function(key){var me=this,k=me.prefix+key,store=me._store,keys=me._keys,length=store.length;store.removeItem(k);if(keys&&length!==store.length){if(me.lazyKeys){me._keys=null}else{Ext.Array.remove(keys,key)}}},setItem:function(key,value){var me=this,k=me.prefix+key,store=me._store,length=store.length,keys=me._keys;store.setItem(k,value);if(keys&&length!==store.length){keys.push(key)}}})
;
Ext.define('Ext.util.Spans',{isSpans:!0,constructor:function(){this.spans=this.spans||[]},clear:function(){this.spans.length=0;return this},add:function(begin,end){if(end===undefined){if(typeof begin==='number'){end=begin+1}else{end=begin[1];begin=begin[0]}}
var me=this,spans=me.spans,b,e,first,last,span;first=me.bisect(begin);if(first){span=spans[first-1];b=span[0];e=span[1];if(begin<=e){if(end<=e){return!1}
begin=b;spans.splice(--first,1)}}
last=me.bisect(end);if(last>first){span=spans[last-1];end=Math.max(end,span[1])}
if(last<spans.length){span=spans[last];if(end===span[0]){end=span[1];++last}}
spans.splice(first,last-first,[begin,end]);return!0},contains:function(begin,end){if(end===undefined){if(typeof begin==='number'){end=begin+1}else{end=begin[1];begin=begin[0]}}
var spans=this.spans,index=this.bisect(begin),ret=!1,e,span;if(index&&begin<(e=spans[index-1][1])){ret=end<=e}else if(index<spans.length){span=spans[index];ret=span[0]<=begin&&end<=span[1]}
return ret},each:function(fn,scope){var spans=this.spans,len=spans.length,i,span,j;for(i=0;i<len;i++){span=spans[i];for(j=span[0];j<span[1];j++){if(fn.call(scope||this,i)===!1){return}}}},intersects:function(begin,end){if(end===undefined){if(typeof begin==='number'){end=begin+1}else{end=begin[1];begin=begin[0]}}
var spans=this.spans,index=this.bisect(begin),ret=!1;if(index&&begin<spans[index-1][1]){ret=!0}else if(index<spans.length){ret=spans[index][0]<end}
return ret},remove:function(begin,end){if(end===undefined){if(typeof begin==='number'){end=begin+1}else{end=begin[1];begin=begin[0]}}
var me=this,spans=me.spans,first=me.bisect(begin),ret=!1,last,span,tmp;if(first){span=spans[first-1];tmp=span[1];if(begin<tmp){span[1]=begin;if(end<tmp){spans.splice(first,0,[end,tmp]);return!0}
ret=!0}}
last=me.bisect(end);if(first<last){ret=!0;span=spans[last-1];if(end<span[1]){span[0]=end;--last}
last-=first;if(last){spans.splice(first,last)}}
return ret},stash:function(){return this.spans.slice()},unstash:function(pickle){this.spans=pickle;return this},getCount:function(){var spans=this.spans,len=spans.length,result=0,i,span;for(i=0;i<len;i++){span=spans[i];result+=span[1]-span[0]}
return result},privates:{bisect:function(value){return Ext.Number.bisectTuples(this.spans,value,0)}}})
;
Ext.define('Ext.util.TsvDecoder',{extend:'Ext.util.DelimitedValue',alternateClassName:'Ext.util.TSV',delimiter:'\t'},function(TSVClass){Ext.util.TSV=new TSVClass()})
;
Ext.define('Ext.util.TaskManager',{extend:'Ext.util.TaskRunner',alternateClassName:['Ext.TaskManager'],singleton:!0})
;
Ext.define('Ext.util.TextMetrics',{requires:['Ext.dom.Element'],statics:{shared:null,measure:function(el,text,fixedWidth){var me=this,shared=me.shared||(me.shared=new me(el,fixedWidth));shared.bind(el);shared.setFixedWidth(fixedWidth||'auto');return shared.getSize(text)},destroy:function(){this.shared=Ext.destroy(this.shared)}},constructor:function(bindTo,fixedWidth){var me=this,measure=me.measure=Ext.getBody().createChild({'data-sticky':!0,role:'presentation',cls:Ext.baseCSSPrefix+'textmetrics',style:{position:'absolute',left:'-1000px',top:'-1000px',visibility:'hidden'}});if(bindTo){me.bind(bindTo)}
if(fixedWidth){measure.setWidth(fixedWidth)}},getSize:function(text){var measure=this.measure,size;measure.setHtml(text);size=measure.getSize();measure.setHtml('');return size},bind:function(el){this.measure.setStyle((this.el||(this.self.prototype.el=new Ext.dom.Fly())).attach(el).getStyle(['font-size','font-size-adjust','font-style','font-weight','font-family','font-kerning','font-stretch','line-height','text-transform','text-decoration','letter-spacing','word-break']))},setFixedWidth:function(width){this.measure.setWidth(width)},getWidth:function(text){this.measure.dom.style.width='auto';return this.getSize(text).width},getHeight:function(text){return this.getSize(text).height},destroy:function(){var me=this;me.el=me.measure=Ext.destroy(me.measure);me.callParent()}},function(){Ext.Element.override({getTextWidth:function(text,min,max){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.valueFrom(text,this.dom.innerHTML,!0)).width,min||0,max||1000000)}})})
;
Ext.define('Ext.util.paintmonitor.OverflowChange',{extend:'Ext.util.paintmonitor.Abstract',eventName:Ext.browser.is.Firefox?'overflow':'overflowchanged',monitorClass:'overflowchange',onElementPainted:function(e){this.getCallback().apply(this.getScope(),this.getArgs())}})
;
Ext.define('Ext.util.sizemonitor.OverflowChange',{extend:'Ext.util.sizemonitor.Abstract',constructor:function(config){this.onExpand=this.onExpand.bind(this);this.onShrink=this.onShrink.bind(this);this.callParent(arguments)},getElementConfig:function(){return{reference:'detectorsContainer',classList:[Ext.baseCSSPrefix+'size-monitors','overflowchanged'],children:[{reference:'expandMonitor',className:'expand',children:[{reference:'expandHelper'}]},{reference:'shrinkMonitor',className:'shrink',children:[{reference:'shrinkHelper'}]}]}},bindListeners:function(bind){var method=bind?'addEventListener':'removeEventListener';this.expandMonitor[method](Ext.browser.is.Firefox?'underflow':'overflowchanged',this.onExpand,!0);this.shrinkMonitor[method](Ext.browser.is.Firefox?'overflow':'overflowchanged',this.onShrink,!0)},onExpand:function(e){if(!(this.destroyed||(Ext.browser.is.Webkit&&e.horizontalOverflow&&e.verticalOverflow))){Ext.TaskQueue.requestRead('refresh',this)}},onShrink:function(e){if(!(this.destroyed||(Ext.browser.is.Webkit&&!e.horizontalOverflow&&!e.verticalOverflow))){Ext.TaskQueue.requestRead('refresh',this)}},refreshMonitors:function(){if(this.destroying||this.destroyed){return}
var expandHelper=this.expandHelper,shrinkHelper=this.shrinkHelper,contentBounds=this.getContentBounds(),width=contentBounds.width,height=contentBounds.height,style;if(expandHelper&&!expandHelper.destroyed){style=expandHelper.style;style.width=(width+1)+'px';style.height=(height+1)+'px'}
if(shrinkHelper&&!shrinkHelper.destroyed){style=shrinkHelper.style;style.width=width+'px';style.height=height+'px'}
Ext.TaskQueue.requestRead('refresh',this)},destroy:function(){this.onExpand=this.onShrink=null;this.callParent()}})
;
Ext.define('Ext.util.translatable.CssPosition',{extend:'Ext.util.translatable.Dom',alias:'translatable.cssposition',doTranslate:function(x,y){var domStyle=this.getElement().dom.style;if(typeof x==='number'){domStyle.left=x+'px'}
if(typeof y==='number'){domStyle.top=y+'px'}},syncPosition:function(){var domStyle=this.getElement().dom.style;return[this.x=parseFloat(domStyle.left),this.y=parseFloat(domStyle.top)]},destroy:function(){var domStyle=this.getElement().dom.style;domStyle.left=null;domStyle.top=null;this.callParent()}})
;
Ext.define('Ext.util.translatable.CssTransform',{extend:'Ext.util.translatable.Dom',alias:'translatable.csstransform',isCssTransform:!0,posRegex:/(\d+)px[^\d]*(\d+)px/,doTranslate:function(x,y){this.getElement().translate(x,y)},syncPosition:function(){var pos=this.posRegex.exec(this.getElement().dom.style.tranform);if(pos){this.x=parseFloat(pos[1]);this.y=parseFloat(pos[2])}
return[this.x,this.y]},destroy:function(){var element=this.getElement();if(element&&!element.destroyed){element.dom.style.webkitTransform=null}
this.callParent()}})
;
Ext.define('Ext.util.translatable.ScrollParent',{extend:'Ext.util.translatable.Dom',alias:'translatable.scrollparent',isScrollParent:!0,applyElement:function(element){var el=Ext.get(element);if(el){this.parent=el.parent()}
return el},doTranslate:function(x,y){var parent=this.parent;parent.setScrollLeft(Math.round(-x));parent.setScrollTop(Math.round(-y))},getPosition:function(){var me=this,position=me.position,parent=me.parent;position.x=parent.getScrollLeft();position.y=parent.getScrollTop();return position}})
;

;
Ext.define(null,{override:'Ext.form.field.Checkbox',compatibility:Ext.isIE8,changeEventName:'propertychange',onChangeEvent:function(e){if(this.duringSetRawValue||e.browserEvent.propertyName!=='checked'){return}
this.callParent([e])},updateCheckedCls:function(checked){var me=this,displayEl=me.displayEl;me.callParent([checked]);if(displayEl&&checked!==me.lastValue){displayEl.repaint()}}})
;
Ext.define(null,{override:'Ext.form.field.Radio',compatibility:Ext.isIE8,getSubTplData:function(fieldData){var data=this.callParent([fieldData]);delete data.checked;return data},afterRender:function(){this.callParent();if(this.checked){this.inputEl.dom.checked=!0}},onChange:function(newValue,oldValue){this.callSuper([newValue,oldValue])}})
;
Ext.define(null,{override:'Ext.scroll.Scroller',compatibility:Ext.isIE8,privates:{doScrollTo:function(x,y,animate){var me=this,element=me.getScrollElement(),maxPosition,dom,to,xInf,yInf,ret,deferred,callback;if(element&&!element.destroyed){dom=element.dom;xInf=(x===Infinity);yInf=(y===Infinity);if(xInf||yInf){maxPosition=me.getMaxPosition();if(xInf){x=maxPosition.x}
if(yInf){y=maxPosition.y}}
if(x!==null){x=me.convertX(x)}
if(animate){to={};if(y!=null){to.scrollTop=y}
if(x!=null){to.scrollLeft=x}
animate=Ext.mergeIf({to:{scrollTop:y,scrollLeft:x}},animate);deferred=new Ext.Deferred();callback=animate.callback;animate.callback=function(){if(callback){callback.call(animate.scope||Ext.global,arguments)}
if(me.destroyed){deferred.reject()}else{deferred.resolve()}};element.animate(animate);ret=deferred.promise}else{if((x!=null&&x!==0)&&y!=null){me.deferDomScroll=!0}
if(y!=null){dom.scrollTop=y}
if(x!=null){dom.scrollLeft=x}
if(me.deferDomScroll){me.deferDomScroll=!1;+dom.scrollLeft;dom.scrollLeft=x;+dom.scrollTop;dom.scrollTop=y}
ret=Ext.Deferred.getCachedResolved()}
me.positionDirty=!0}else{ret=Ext.Deferred.getCachedRejected()}
return ret},onDomScroll:function(){var me=this;if(me.deferDomScroll){return}
me.callParent()}}})
;
Ext.define('Ext.Action',{constructor:function(config){this.initialConfig=config;this.itemId=config.itemId=(config.itemId||config.id||Ext.id());this.items=[]},isAction:!0,setText:function(text){this.initialConfig.text=text;this.callEach('setText',[text])},getText:function(){return this.initialConfig.text},setIconCls:function(cls){this.initialConfig.iconCls=cls;this.callEach('setIconCls',[cls])},setGlyph:function(glyph){this.initialConfig.glyph=glyph;this.callEach('setGlyph',[glyph])},getIconCls:function(){return this.initialConfig.iconCls},setDisabled:function(disabled){this.initialConfig.disabled=disabled;this.callEach('setDisabled',[disabled])},enable:function(){this.setDisabled(!1)},disable:function(){this.setDisabled(!0)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(hidden){this.initialConfig.hidden=hidden;this.callEach('setVisible',[!hidden])},show:function(){this.setHidden(!1)},hide:function(){this.setHidden(!0)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(handler,scope){this.initialConfig.handler=handler;this.initialConfig.scope=scope;this.callEach('setHandler',[handler,scope])},each:function(fn,scope){Ext.each(this.items,fn,scope)},callEach:function(fnName,args){var items=this.items,i=0,len=items.length,item;Ext.suspendLayouts();for(;i<len;i++){item=items[i];item[fnName].apply(item,args)}
Ext.resumeLayouts(!0)},addComponent:function(comp){this.items.push(comp);comp.on('destroy',this.removeComponent,this)},removeComponent:function(comp){Ext.Array.remove(this.items,comp)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||Ext.global,arguments)}})
;
Ext.define('Ext.ElementLoader',{mixins:['Ext.util.Observable'],uses:['Ext.data.Connection','Ext.Ajax'],statics:{Renderer:{Html:function(loader,response,active){loader.getTarget().setHtml(response.responseText,active.scripts===!0,active.callback,active.rendererScope);return!0}}},url:null,params:null,baseParams:null,autoLoad:!1,target:null,loadMask:!1,ajaxOptions:null,scripts:!1,isLoader:!0,constructor:function(config){var me=this,autoLoad;me.callParent([config]);me.mixins.observable.constructor.call(me,config);me.setTarget(me.target);if(me.autoLoad){autoLoad=me.autoLoad;if(autoLoad===!0){autoLoad=null}
me.load(autoLoad)}},setTarget:function(target){var me=this;target=Ext.get(target);if(me.target&&me.target!==target){me.abort()}
me.target=target},getTarget:function(){return this.target||null},abort:function(){var active=this.active;if(active!==undefined){Ext.Ajax.abort(active.request);if(active.mask){this.removeMask()}
delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(mask){this.target.mask(mask===!0?null:mask)},load:function(options){if(this.destroying||this.destroyed){return}
if(!this.target){Ext.raise('A valid target is required when loading content for '+this.id)}
options=Ext.apply({},options);var me=this,mask=Ext.isDefined(options.loadMask)?options.loadMask:me.loadMask,params=Ext.apply({},options.params),ajaxOptions=Ext.apply({},options.ajaxOptions),callback=options.callback||me.callback,scope=options.scope||me.scope||me;Ext.applyIf(ajaxOptions,me.ajaxOptions);Ext.applyIf(options,ajaxOptions);Ext.applyIf(params,me.params);Ext.apply(params,me.baseParams);Ext.applyIf(options,{url:me.url});if(!options.url){Ext.raise('You must specify the URL from which content should be loaded')}
Ext.apply(options,{scope:me,params:params,callback:me.onComplete});if(me.fireEvent('beforeload',me,options)===!1){return}
if(mask){me.addMask(mask)}
me.active={options:options,mask:mask,scope:scope,callback:callback,success:options.success||me.success,failure:options.failure||me.failure,renderer:options.renderer||me.renderer,scripts:Ext.isDefined(options.scripts)?options.scripts:me.scripts};me.active.request=Ext.Ajax.request(options);me.setOptions(me.active,options)},setOptions:function(active,options){active.rendererScope=options.rendererScope||this.rendererScope||this},onComplete:function(options,success,response){var me=this,active=me.active,rendererScope,scope;if(active){scope=active.scope;rendererScope=active.rendererScope;if(success){success=me.getRenderer(active.renderer).call(rendererScope,me,response,active)!==!1}
if(success){Ext.callback(active.success,scope,[me,response,options]);me.fireEvent('load',me,response,options)}else{Ext.callback(active.failure,scope,[me,response,options]);me.fireEvent('exception',me,response,options)}
Ext.callback(active.callback,scope,[me,success,response,options]);if(active.mask){me.removeMask()}}
delete me.active},getRenderer:function(renderer){if(Ext.isFunction(renderer)){return renderer}
return this.statics().Renderer.Html},startAutoRefresh:function(interval,options){var me=this;me.stopAutoRefresh();me.autoRefresh=Ext.interval(function(){me.load(options)},interval)},stopAutoRefresh:function(){Ext.uninterval(this.autoRefresh);this.autoRefresh=null},isAutoRefreshing:function(){return!!this.autoRefresh},destroy:function(){var me=this;me.stopAutoRefresh();me.abort();me.callParent()}})
;
Ext.define('Ext.ComponentLoader',{extend:'Ext.ElementLoader',statics:{Renderer:{Data:function(loader,response,active){var success=!0;try{loader.getTarget().update(Ext.decode(response.responseText))}catch(e){success=!1}
return success},Component:function(loader,response,active){var success=!0,target=loader.getTarget(),items=[];if(!target.isContainer){Ext.raise({target:target,msg:'Components can only be loaded into a container'})}
try{items=Ext.decode(response.responseText)}catch(e){success=!1}
if(success){target.suspendLayouts();if(active.removeAll){target.removeAll()}
target.add(items);target.resumeLayouts(!0)}
return success}}},target:null,loadOnRender:!1,loadMask:!1,renderer:'html',setTarget:function(target){var me=this;if(Ext.isString(target)){target=Ext.getCmp(target)}
if(me.target&&me.target!==target){me.abort()}
me.target=target;if(target&&me.loadOnRender){if(target.rendered){me.doLoadOnRender()}else{me.mon(target,'render',me.doLoadOnRender,me)}}},doLoadOnRender:function(){var loadOnRender=this.loadOnRender;this.load(Ext.isObject(loadOnRender)?loadOnRender:null)},removeMask:function(){this.target.setLoading(!1)},addMask:function(mask){this.target.setLoading(mask)},setOptions:function(active,options){active.removeAll=Ext.isDefined(options.removeAll)?options.removeAll:this.removeAll;active.rendererScope=options.rendererScope||this.rendererScope||this.target},getRenderer:function(renderer){var renderers;if(Ext.isFunction(renderer)){return renderer}
renderers=this.statics().Renderer;switch(renderer){case 'component':return renderers.Component;case 'data':return renderers.Data;default:return Ext.ElementLoader.Renderer.Html}}})
;
Ext.define('Ext.layout.SizeModel',{constructor:function(config){var me=this,SizeModel=me.self,sizeModelsArray=SizeModel.sizeModelsArray,name;Ext.apply(me,config);me[name=me.name]=!0;me.fixed=!(me.auto=me.natural||me.shrinkWrap);sizeModelsArray[me.ordinal=sizeModelsArray.length]=SizeModel[name]=SizeModel.sizeModels[name]=me},statics:{sizeModelsArray:[],sizeModels:{}},calculated:!1,configured:!1,constrainedMax:!1,constrainedMin:!1,natural:!1,shrinkWrap:!1,calculatedFromConfigured:!1,calculatedFromNatural:!1,calculatedFromShrinkWrap:!1,names:null},function(){var SizeModel=this,sizeModelsArray=SizeModel.sizeModelsArray,i,j,n,pairs,sizeModel;new SizeModel({name:'calculated'});new SizeModel({name:'configured',names:{width:'width',height:'height'}});new SizeModel({name:'natural'});new SizeModel({name:'shrinkWrap'});new SizeModel({name:'calculatedFromConfigured',configured:!0,calculatedFrom:!0,names:{width:'width',height:'height'}});new SizeModel({name:'calculatedFromNatural',natural:!0,calculatedFrom:!0});new SizeModel({name:'calculatedFromShrinkWrap',shrinkWrap:!0,calculatedFrom:!0});new SizeModel({name:'constrainedMax',configured:!0,constrained:!0,names:{width:'maxWidth',height:'maxHeight'}});new SizeModel({name:'constrainedMin',configured:!0,constrained:!0,names:{width:'minWidth',height:'minHeight'}});new SizeModel({name:'constrainedDock',configured:!0,constrained:!0,constrainedByMin:!0,names:{width:'dockConstrainedWidth',height:'dockConstrainedHeight'}});for(i=0,n=sizeModelsArray.length;i<n;++i){sizeModel=sizeModelsArray[i];sizeModel.pairsByHeightOrdinal=pairs=[];for(j=0;j<n;++j){pairs.push({width:sizeModel,height:sizeModelsArray[j],ordinal:j})}}})
;
Ext.define('Ext.layout.Layout',{mixins:['Ext.mixin.Factoryable'],requires:['Ext.XTemplate','Ext.layout.SizeModel'],uses:['Ext.layout.Context'],factoryConfig:{type:'layout',defaultType:'autocontainer',instanceProp:'isLayout'},isLayout:!0,initialized:!1,running:!1,needsItemSize:!0,setsItemSize:!0,autoSizePolicy:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},$configPrefixed:!1,$configStrict:!1,constructor:function(config){var me=this;me.id=Ext.id(null,me.type+'-');me.initConfig(config);delete me.type;me.layoutCount=0},beginLayout:Ext.emptyFn,beginLayoutCycle:function(ownerContext){var me=this,context=me.context,changed;if(me.lastWidthModel!==ownerContext.widthModel){if(me.lastWidthModel){changed=!0}
me.lastWidthModel=ownerContext.widthModel}
if(me.lastHeightModel!==ownerContext.heightModel){if(me.lastWidthModel){changed=!0}
me.lastHeightModel=ownerContext.heightModel}
if(changed){(context=ownerContext.context).clearTriggers(me,!1);context.clearTriggers(me,!0);me.triggerCount=0}},finishedLayout:function(ownerContext){this.lastWidthModel=ownerContext.widthModel;this.lastHeightModel=ownerContext.heightModel;this.ownerContext=null},redoLayout:Ext.emptyFn,undoLayout:Ext.emptyFn,getAnimatePolicy:function(){return this.animatePolicy},getItemSizePolicy:function(item){return this.autoSizePolicy},isItemBoxParent:function(itemContext){return!1},isItemLayoutRoot:function(item){var sizeModel=item.getSizeModel(),width=sizeModel.width,height=sizeModel.height;if(!item.componentLayout.lastComponentSize&&(width.calculated||height.calculated)){return!1}
return!width.shrinkWrap&&!height.shrinkWrap},isItemShrinkWrap:function(item){return item.shrinkWrap},isRunning:function(){return!!this.ownerContext},getItemsRenderTree:function(items,renderCfgs){var length=items.length,i,item,itemConfig,result;if(length){result=[];for(i=0;i<length;++i){item=items[i];if(!item.rendered){if(renderCfgs&&(renderCfgs[item.id]!==undefined)){itemConfig=renderCfgs[item.id]}else{this.configureItem(item);itemConfig=item.getRenderTree();if(renderCfgs){renderCfgs[item.id]=itemConfig}}
if(itemConfig){result.push(itemConfig)}}}}
return result},finishRender:Ext.emptyFn,finishRenderItems:function(target,items){var length=items.length,i,item;for(i=0;i<length;i++){item=items[i];if(item.rendering){item.finishRender(i)}}},renderChildren:function(){var me=this,items=me.getLayoutItems(),target=me.getRenderTarget();me.renderItems(items,target)},renderItems:function(items,target){var me=this,ln=items.length,i=0,pos=0,item;if(ln){Ext.suspendLayouts();for(;i<ln;i++,pos++){item=items[i];if(item&&!item.rendered){me.renderItem(item,target,pos)}else if(item.ignoreDomPosition){--pos}else if(!me.isValidParent(item,target,pos)){me.moveItem(item,target,pos)}else{me.configureItem(item)}}
Ext.resumeLayouts(!0)}},isValidParent:function(item,target,position){var targetDom=(target&&target.dom)||target,itemDom=this.getItemLayoutEl(item);if(itemDom&&targetDom){if(typeof position==='number'){position=this.getPositionOffset(position);return itemDom===targetDom.childNodes[position]}
return itemDom.parentNode===targetDom}
return!1},getItemLayoutEl:function(item){var dom=item.el?item.el.dom:Ext.getDom(item),parentNode=dom.parentNode,className;if(parentNode){className=parentNode.className;if(className&&className.indexOf(Ext.baseCSSPrefix+'resizable-wrap')!==-1){dom=dom.parentNode}}
return dom},getPositionOffset:function(position){return position},configureItem:function(item){item.ownerLayout=this},renderItem:function(item,target,position){var me=this;if(!item.rendered){me.configureItem(item);item.render(target,position)}},moveItem:function(item,target,position){var activeEl=Ext.fly(document.activeElement);target=target.dom||target;if(typeof position==='number'){position=target.childNodes[position]}
if(item.el.contains(activeEl)){activeEl.suspendFocusEvents()}else{activeEl=null}
target.insertBefore(item.el.dom,position||null);item.container=Ext.get(target);this.configureItem(item);if(activeEl){activeEl.focus();activeEl.resumeFocusEvents()}},onContentChange:function(){this.owner.updateLayout();return!0},initLayout:function(){this.initialized=!0},setOwner:function(owner){this.owner=owner},getLayoutItems:function(){return[]},onAdd:function(item){item.ownerLayout=this},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,afterRemove:function(item){var me=this,el=item.el,owner=me.owner,removeClasses;if(item.rendered){removeClasses=[].concat(me.itemCls||[]);if(owner.itemCls){removeClasses=Ext.Array.push(removeClasses,owner.itemCls)}
if(removeClasses.length){el.removeCls(removeClasses)}}
delete item.ownerLayout},afterCollapse:function(owner,animated){if(animated){this.onContentChange(owner)}},afterExpand:function(owner,animated){if(animated){this.onContentChange(owner)}},destroy:function(){var me=this,target;if(me.targetCls){target=me.getTarget();if(target){target.removeCls(me.targetCls)}}
if(!me.onDestroy.$emptyFn){me.onDestroy()}
me.callParent()},sortWeightedItems:function(items,reverseProp){var i,length;for(i=0,length=items.length;i<length;++i){items[i].$i=i}
Ext.Array.sort(items,function(item1,item2){var ret=item2.weight-item1.weight;if(!ret){ret=item1.$i-item2.$i;if(item1[reverseProp]){ret=-ret}}
return ret});for(i=0;i<length;++i){delete items[i].$i}}},function(){var Layout=this;Layout.prototype.sizeModels=Layout.sizeModels=Ext.layout.SizeModel.sizeModels})
;
Ext.define('Ext.layout.container.Container',{extend:'Ext.layout.Layout',alternateClassName:'Ext.layout.ContainerLayout',alias:'layout.container',mixins:['Ext.util.ElementContainer'],requires:['Ext.XTemplate'],type:'container',beginCollapse:Ext.emptyFn,beginExpand:Ext.emptyFn,animatePolicy:null,activeItemCount:0,renderTpl:['{%this.renderBody(out,values)%}'],usesContainerHeight:!0,usesContainerWidth:!0,usesHeight:!0,usesWidth:!0,constructor:function(){this.callParent(arguments);this.mixins.elementCt.constructor.call(this)},destroy:function(){this.mixins.elementCt.destroy.call(this);this.callParent()},beginLayout:function(ownerContext){this.callParent(arguments);ownerContext.targetContext=ownerContext.paddingContext=ownerContext.getEl('getTarget',this);this.cacheChildItems(ownerContext)},beginLayoutCycle:function(ownerContext,firstCycle){var me=this;me.callParent(arguments);if(firstCycle){if(me.usesContainerHeight){++ownerContext.consumersContainerHeight}
if(me.usesContainerWidth){++ownerContext.consumersContainerWidth}}},cacheChildItems:function(ownerContext){var me=this,context,childItems,items,length,i;if(me.needsItemSize||me.setsItemSize){context=ownerContext.context;childItems=ownerContext.childItems=[];items=ownerContext.visibleItems=me.getVisibleItems();length=items.length;for(i=0;i<length;++i){childItems.push(context.getCmp(items[i]))}}},cacheElements:function(){var owner=this.owner;this.attachChildEls(owner.el,owner)},calculate:function(ownerContext){var props=ownerContext.props,el=ownerContext.el;if(ownerContext.widthModel.shrinkWrap&&isNaN(props.width)){ownerContext.setContentWidth(el.getWidth())}
if(ownerContext.heightModel.shrinkWrap&&isNaN(props.height)){ownerContext.setContentHeight(el.getHeight())}},configureItem:function(item){var me=this,itemCls=me.itemCls,ownerItemCls=me.owner.itemCls,needsCopy,addClasses;item.ownerLayout=me;if(itemCls){if(typeof itemCls==='string'){addClasses=[itemCls]}else{addClasses=itemCls;needsCopy=!!addClasses}}
if(ownerItemCls){if(needsCopy){addClasses=Ext.Array.clone(addClasses)}
addClasses=Ext.Array.push(addClasses||[],ownerItemCls)}
if(addClasses){item.addCls(addClasses)}},doRenderBody:function(out,renderData){this.renderItems(out,renderData);this.renderContent(out,renderData)},doRenderContainer:function(out,renderData){var me=renderData.$comp.layout,tpl=me.getRenderTpl(),data=me.getRenderData();tpl.applyOut(data,out)},doRenderItems:function(out,renderData){var me=renderData.$layout,tree=me.getRenderTree();if(tree){Ext.DomHelper.generateMarkup(tree,out)}},doRenderTabGuard:function(out,renderData,position){var cmp=renderData.$comp,tabGuardTpl;if(cmp.tabGuard&&!renderData.$skipTabGuards){tabGuardTpl=cmp.lookupTpl('tabGuardTpl');if(tabGuardTpl){renderData.tabGuard=position;renderData.tabGuardEl=cmp.tabGuardElements[position];cmp.addChildEl(renderData.tabGuardEl);tabGuardTpl.applyOut(renderData,out);delete renderData.tabGuard;delete renderData.tabGuardEl}}},finishRender:function(){var me=this,target,items;me.callParent();me.cacheElements();target=me.getRenderTarget();items=me.getLayoutItems();me.finishRenderItems(target,items)},notifyOwner:function(){if(!this._hasTargetWarning&&this.targetCls&&!this.getTarget().hasCls(this.targetCls)){this._hasTargetWarning=!0;Ext.log.warn('targetCls is missing. This may mean that getTargetEl() '+'is being overridden but not applyTargetCls(). '+this.owner.id)}
this.owner.afterLayout(this)},getContainerSize:function(ownerContext,inDom){var targetContext=ownerContext.targetContext,frameInfo=targetContext.getFrameInfo(),padding=ownerContext.paddingContext.getPaddingInfo(),got=0,needed=0,gotWidth,gotHeight,width,height;if(!ownerContext.widthModel.shrinkWrap){++needed;width=inDom?targetContext.getDomProp('width'):targetContext.getProp('width');gotWidth=(typeof width==='number');if(gotWidth){++got;width-=frameInfo.width+padding.width;if(width<0){width=0}}}
if(!ownerContext.heightModel.shrinkWrap){++needed;height=inDom?targetContext.getDomProp('height'):targetContext.getProp('height');gotHeight=(typeof height==='number');if(gotHeight){++got;height-=frameInfo.height+padding.height;if(height<0){height=0}}}
return{width:width,height:height,needed:needed,got:got,gotAll:got===needed,gotWidth:gotWidth,gotHeight:gotHeight}},getPositionOffset:function(position){var offset;if(!this.createsInnerCt){offset=this.owner.itemNodeOffset;if(offset){position+=offset}}
return position},getLayoutItems:function(){var owner=this.owner,items=owner&&owner.items;return(items&&items.items)||[]},getRenderData:function(){var comp=this.owner;return{$comp:comp,$layout:this,ownerId:comp.id}},getRenderedItems:function(){var me=this,target=me.getRenderTarget(),items=me.getLayoutItems(),ln=items.length,renderedItems=[],i,pos,item;for(i=0,pos=0;i<ln;i++,pos++){item=items[i];if(item.rendered){if(item.ignoreDomPosition){--pos}else if(!this.isValidParent(item,target,pos)){continue}
renderedItems.push(item)}}
return renderedItems},getRenderTarget:function(){return this.owner.getTargetEl()},getElementTarget:function(){return this.getRenderTarget()},getRenderTpl:function(){var me=this,renderTpl=Ext.XTemplate.getTpl(this,'renderTpl');if(!renderTpl.renderContent){me.owner.setupRenderTpl(renderTpl)}
return renderTpl},getRenderTree:function(){var result,items=this.owner.items,itemsGen,renderCfgs={};do{itemsGen=items.generation;result=this.getItemsRenderTree(this.getLayoutItems(),renderCfgs)}while(items.generation!==itemsGen);return result},renderChildren:function(){var me=this,ownerItems=me.owner.items,target=me.getRenderTarget(),itemsGen,items;do{itemsGen=ownerItems.generation;items=me.getLayoutItems();me.renderItems(items,target)}while(ownerItems.generation!==itemsGen);},getScrollbarsNeeded:function(width,height,contentWidth,contentHeight){var scrollbarSize=Ext.scrollbar.size(),hasWidth=typeof width==='number',hasHeight=typeof height==='number',needHorz=0,needVert=0;if(!scrollbarSize.width){return 0}
if(hasHeight&&height<contentHeight){needVert=2;width-=scrollbarSize.width}
if(hasWidth&&width<contentWidth){needHorz=1;if(!needVert&&hasHeight){height-=scrollbarSize.height;if(height<contentHeight){needVert=2}}}
return needVert+needHorz},getTarget:function(){return this.owner.getTargetEl()},getVisibleItems:function(){var target=this.getRenderTarget(),items=this.getLayoutItems(),ln=items.length,visibleItems=[],i,pos,item;for(i=0,pos=0;i<ln;i++,pos++){item=items[i];if(item.rendered&&item.hidden!==!0&&!item.floated){if(item.ignoreDomPosition){--pos}else if(!this.isValidParent(item,target,pos)){continue}
visibleItems.push(item)}}
return visibleItems},getMoveAfterIndex:function(after){return this.owner.items.indexOf(after)+1},moveItemBefore:function(item,before){var owner=this.owner,items=owner.items,index=items.indexOf(item),toIndex;if(item===before){return item}
if(before){toIndex=items.indexOf(before);if(index>-1&&index<toIndex){--toIndex}}else{toIndex=items.length}
return owner.insert(toIndex,item)},setupRenderTpl:function(renderTpl){renderTpl.renderBody=this.doRenderBody;renderTpl.renderContainer=this.doRenderContainer;renderTpl.renderItems=this.doRenderItems;renderTpl.renderTabGuard=this.doRenderTabGuard},getContentTarget:function(){return this.owner.getDefaultContentTarget()},onAdd:function(item){if(!item.liquidLayout){++this.activeItemCount}
this.callParent([item])},onRemove:function(item,isDestroying){if(!item.liquidLayout){--this.activeItemCount}
this.callParent([item,isDestroying])}})
;
Ext.define('Ext.layout.container.Auto',{extend:'Ext.layout.container.Container',alias:['layout.auto','layout.autocontainer'],type:'autocontainer',childEls:['outerCt','innerCt'],reserveScrollbar:!1,managePadding:!0,manageOverflow:!1,needsItemSize:!1,setsItemSize:!1,lastOverflowAdjust:{width:0,height:0},outerCtCls:Ext.baseCSSPrefix+'autocontainer-outerCt',innerCtCls:Ext.baseCSSPrefix+'autocontainer-innerCt',renderTpl:['<div id="{ownerId}-outerCt" data-ref="outerCt" class="{outerCtCls}" role="presentation">','<div id="{ownerId}-innerCt" data-ref="innerCt" style="{%this.renderPadding(out, values)%}" ','<tpl if="!$comp.html">role="presentation"</tpl>','class="{innerCtCls}">','{%this.renderBody(out,values)%}','</div>','</div>'],beginLayout:function(ownerContext){this.callParent(arguments);this.initContextItems(ownerContext)},beforeLayoutCycle:function(ownerContext){var comp=this.owner,inheritedState=comp.inheritedState,inheritedStateInner=comp.inheritedStateInner;if(!inheritedState||inheritedState.invalid){inheritedState=comp.getInherited();inheritedStateInner=comp.inheritedStateInner}
if(ownerContext.widthModel.shrinkWrap){inheritedStateInner.inShrinkWrapTable=!0}else{delete inheritedStateInner.inShrinkWrapTable}},beginLayoutCycle:function(ownerContext){var me=this,outerCt=me.outerCt,lastOuterCtWidth=me.lastOuterCtWidth||'',lastOuterCtHeight=me.lastOuterCtHeight||'',lastOuterCtTableLayout=me.lastOuterCtTableLayout||'',state=ownerContext.state,overflowXStyle,outerCtWidth,outerCtHeight,outerCtTableLayout,inheritedStateInner;me.callParent(arguments);outerCtWidth=outerCtHeight=outerCtTableLayout='';if(!ownerContext.widthModel.shrinkWrap){outerCtWidth='100%';inheritedStateInner=me.owner.inheritedStateInner;overflowXStyle=me.getOverflowXStyle(ownerContext);outerCtTableLayout=(inheritedStateInner.inShrinkWrapTable||overflowXStyle==='auto'||overflowXStyle==='scroll')?'':'fixed'}
if(!ownerContext.heightModel.shrinkWrap&&!Ext.supports.PercentageHeightOverflowBug){outerCtHeight='100%'}
if((outerCtWidth!==lastOuterCtWidth)||me.hasOuterCtPxWidth){outerCt.setStyle('width',outerCtWidth);me.lastOuterCtWidth=outerCtWidth;me.hasOuterCtPxWidth=!1}
if(outerCtTableLayout!==lastOuterCtTableLayout){outerCt.setStyle('table-layout',outerCtTableLayout);me.lastOuterCtTableLayout=outerCtTableLayout}
if((outerCtHeight!==lastOuterCtHeight)||me.hasOuterCtPxHeight){outerCt.setStyle('height',outerCtHeight);me.lastOuterCtHeight=outerCtHeight;me.hasOuterCtPxHeight=!1}
if(me.hasInnerCtPxHeight){me.innerCt.setStyle('height','');me.hasInnerCtPxHeight=!1}
state.overflowAdjust=state.overflowAdjust||me.lastOverflowAdjust},calculate:function(ownerContext){var me=this,state=ownerContext.state,containerSize=me.getContainerSize(ownerContext,!0),calculatedItems;calculatedItems=state.calculatedItems||(state.calculatedItems=me.calculateItems?me.calculateItems(ownerContext,containerSize):!0);me.setCtSizeIfNeeded(ownerContext,containerSize);if(calculatedItems&&ownerContext.hasDomProp('containerChildrenSizeDone')){me.calculateContentSize(ownerContext);if(containerSize.gotAll){if(me.manageOverflow&&!ownerContext.state.secondPass&&!me.reserveScrollbar){me.calculateOverflow(ownerContext,containerSize)}
return}}
me.done=!1},calculateContentSize:function(ownerContext){var me=this,containerDimensions=((ownerContext.widthModel.shrinkWrap?1:0)|(ownerContext.heightModel.shrinkWrap?2:0)),calcWidth=(containerDimensions&1)||undefined,calcHeight=(containerDimensions&2)||undefined,needed=0,props=ownerContext.props;if(calcWidth){if(isNaN(props.contentWidth)){++needed}else{calcWidth=undefined}}
if(calcHeight){if(isNaN(props.contentHeight)){++needed}else{calcHeight=undefined}}
if(needed){if(calcWidth&&!ownerContext.setContentWidth(me.measureContentWidth(ownerContext))){me.done=!1}
if(calcHeight&&!ownerContext.setContentHeight(me.measureContentHeight(ownerContext))){me.done=!1}}},calculateOverflow:function(ownerContext){var me=this,width,height,scrollbarSize,scrollbars,xauto,yauto,targetEl;xauto=(me.getOverflowXStyle(ownerContext)==='auto');yauto=(me.getOverflowYStyle(ownerContext)==='auto');if(xauto||yauto){scrollbarSize=Ext.scrollbar.size();targetEl=ownerContext.overflowContext.el.dom;scrollbars=0;if(targetEl.scrollWidth>targetEl.clientWidth){scrollbars|=1}
if(targetEl.scrollHeight>targetEl.clientHeight){scrollbars|=2}
width=(yauto&&(scrollbars&2))?scrollbarSize.width:0;height=(xauto&&(scrollbars&1))?scrollbarSize.height:0;if(width!==me.lastOverflowAdjust.width||height!==me.lastOverflowAdjust.height){me.done=!1;ownerContext.invalidate({state:{overflowAdjust:{width:width,height:height},overflowState:scrollbars,secondPass:!0}})}}},completeLayout:function(ownerContext){this.lastOverflowAdjust=ownerContext.state.overflowAdjust},doRenderBody:function(out,renderData){var me=renderData.$layout,XTemplate=Ext.XTemplate,beforeBodyTpl=me.beforeBodyTpl,afterBodyTpl=me.afterBodyTpl;if(beforeBodyTpl){XTemplate.getTpl(me,'beforeBodyTpl').applyOut(renderData,out)}
this.renderItems(out,renderData);this.renderContent(out,renderData);if(afterBodyTpl){XTemplate.getTpl(me,'afterBodyTpl').applyOut(renderData,out)}},doRenderPadding:function(out,renderData){var me=renderData.$layout,owner=renderData.$layout.owner,padding=owner[owner.contentPaddingProperty];if(me.managePadding&&padding){out.push('padding:',owner.unitizeBox(padding))}},finishedLayout:function(ownerContext){var innerCt=this.innerCt;this.callParent(arguments);if(Ext.isIE8){innerCt.repaint()}
if(Ext.isOpera){innerCt.setStyle('position','relative');innerCt.dom.scrollWidth;innerCt.setStyle('position','')}},getContainerSize:function(ownerContext,inDom){var size=this.callParent(arguments),overflowAdjust=ownerContext.state.overflowAdjust;if(overflowAdjust){size.width-=overflowAdjust.width;size.height-=overflowAdjust.height}
return size},getRenderData:function(){var me=this,data=me.callParent();data.innerCtCls=me.innerCtCls;data.outerCtCls=me.outerCtCls;return data},getRenderTarget:function(){return this.innerCt},getElementTarget:function(){return this.innerCt},getOverflowXStyle:function(ownerContext){return ownerContext.overflowXStyle||(ownerContext.overflowXStyle=this.owner.scrollFlags.overflowX||ownerContext.overflowContext.getStyle('overflow-x'))},getOverflowYStyle:function(ownerContext){return ownerContext.overflowYStyle||(ownerContext.overflowYStyle=this.owner.scrollFlags.overflowY||ownerContext.overflowContext.getStyle('overflow-y'))},initContextItems:function(ownerContext){var me=this,target=ownerContext.target,overflowEl=me.owner.getOverflowEl();ownerContext.outerCtContext=ownerContext.getEl('outerCt',me);ownerContext.innerCtContext=ownerContext.getEl('innerCt',me);ownerContext.overflowContext=(overflowEl===ownerContext.el)?ownerContext:ownerContext.getEl(overflowEl);if(target[target.contentPaddingProperty]!==undefined){ownerContext.paddingContext=ownerContext.innerCtContext}},initLayout:function(){var me=this,scrollbarWidth=Ext.scrollbar.width(),owner=me.owner;me.callParent();if(scrollbarWidth&&me.manageOverflow&&!me.hasOwnProperty('lastOverflowAdjust')){if(owner.scrollable||me.reserveScrollbar){me.lastOverflowAdjust={width:scrollbarWidth,height:0}}}},measureContentHeight:function(ownerContext){var contentHeight=this.outerCt.getHeight(),target=ownerContext.target;if(this.managePadding&&(target[target.contentPaddingProperty]===undefined)){contentHeight+=ownerContext.targetContext.getPaddingInfo().height}
return contentHeight},measureContentWidth:function(ownerContext){var dom,style,old,contentWidth,target;if(this.chromeCellMeasureBug){dom=this.innerCt.dom;style=dom.style;old=style.display;if(old==='table-cell'){style.display='';dom.offsetWidth;style.display=old}}
if(Ext.isSafari){dom=this.outerCt.dom;style=dom.style;style.display='table-cell';dom.offsetWidth;dom.style.display=''}
contentWidth=this.outerCt.getWidth();target=ownerContext.target;if(this.managePadding&&(target[target.contentPaddingProperty]===undefined)){contentWidth+=ownerContext.targetContext.getPaddingInfo().width}
return contentWidth},setCtSizeIfNeeded:function(ownerContext,containerSize){var me=this,height=containerSize.height,padding=ownerContext.paddingContext.getPaddingInfo(),targetEl=me.getTarget(),overflowXStyle=me.getOverflowXStyle(ownerContext),canOverflowX=(overflowXStyle==='auto'||overflowXStyle==='scroll'),scrollbarSize=Ext.scrollbar.size(),needsOuterHeight,needsInnerHeight;if(height&&!ownerContext.heightModel.shrinkWrap){if(Ext.supports.PercentageHeightOverflowBug){needsOuterHeight=!0}
if(Ext.isIE8){needsInnerHeight=!0}
if((needsOuterHeight||needsInnerHeight)&&canOverflowX&&(targetEl.dom.scrollWidth>targetEl.dom.clientWidth)){height=Math.max(height-scrollbarSize.height,0)}
if(needsOuterHeight){ownerContext.outerCtContext.setProp('height',height+padding.height);me.hasOuterCtPxHeight=!0}
if(needsInnerHeight){ownerContext.innerCtContext.setProp('height',height);me.hasInnerCtPxHeight=!0}}},setupRenderTpl:function(renderTpl){this.callParent(arguments);renderTpl.renderPadding=this.doRenderPadding},getContentTarget:function(){return this.innerCt}},function(Cls){var v=Ext.chromeVersion;Cls.prototype.chromeCellMeasureBug=Ext.isChrome&&v>=26&&v<=34})
;
Ext.define('Ext.ZIndexManager',{alternateClassName:'Ext.WindowGroup',requires:['Ext.util.SorterCollection','Ext.util.FilterCollection','Ext.GlobalEvents'],statics:{zBase:9000,activeCounter:0},reflowSuspended:0,constructor:function(container){var me=this;me.id=Ext.id(null,'zindex-mgr-');me.zIndexStack=new Ext.util.Collection({sorters:{sorterFn:function(comp1,comp2){var ret=(comp1.alwaysOnTop||0)-(comp2.alwaysOnTop||0);if(!ret){ret=comp1.getActiveCounter()-comp2.getActiveCounter()}
return ret}},filters:{filterFn:function(comp){return comp.isVisible()}}});me.zIndexStack.addObserver(me);me.front=null;me.sortCount=0;me.globalListeners=Ext.GlobalEvents.on({beforehide:me.onComponentShowHide,show:me.onComponentShowHide,scope:me,destroyable:!0});if(container){if(container.isContainer){me.resizeListeners=container.on({resize:me.onContainerResize,scope:me,destroyable:!0});me.zseed=Ext.Number.from(me.rendered?container.getEl().getStyle('zIndex'):undefined,me.getNextZSeed());me.targetEl=container.getTargetEl();me.container=container}else{me.resizeListeners=Ext.on({resize:me.onContainerResize,scope:me,destroyable:!0});me.zseed=me.getNextZSeed();me.targetEl=Ext.get(container)}}else{me.zseed=me.getNextZSeed();Ext.onInternalReady(function(){me.resizeListeners=Ext.on({resize:me.scheduleContainerResize,scope:me,destroyable:!0,priority:-10000});me.targetEl=Ext.getBody()})}},getId:function(){return this.id},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(baseZIndex){this.zseed=baseZIndex;return this.onCollectionSort()},onCollectionSort:function(){var me=this,oldFront=me.front,zIndex=me.zseed,a=me.zIndexStack.getRange(),len=a.length,i,comp,topModal,topFocusable,topMost,doFocus=!oldFront||oldFront.isVisible();me.sortCount++;for(i=0;i<len;i++){comp=a[i];if(comp.destroying||comp.destroyed){continue}
zIndex=comp.setZIndex(zIndex);if(!comp.hidden){topMost=comp;if(comp.modal){topModal=comp;topFocusable=null}
if(doFocus&&(comp.isFocusable(!0)&&(comp.modal||comp.focusOnToFront))){topFocusable=comp}}}
if(topFocusable&&topFocusable!==oldFront&&!topFocusable.preventFocusOnActivate){topFocusable.onFocusTopmost()}
if(topModal){if(topModal===me.topModal){me.syncModalMask(topModal)}else{me.showModalMask(topModal)}}else{me.hideModalMask()}
if(topMost!==me.topMost){if(me.topMost){me.topMost.onZIndexChange(!1)}
if(topMost){topMost.onZIndexChange(!0)}}
me.front=topFocusable;me.topModal=topModal;me.topMost=topMost;if(!me.front&&me.topMost){me.front=me.topMost}
return zIndex},onComponentUpdate:function(comp){if(!this.reflowSuspended&&this.zIndexStack.contains(comp)){this.zIndexStack.sort()}},suspendReflow:function(){this.reflowSuspended++},resumeReflow:function(flush){if(this.reflowSuspended&&!--this.reflowSuspended){if(flush){this.zIndexStack.sort()}}},onAfterComponentRender:function(comp){if(!this.reflowSuspended&&comp.isVisible()&&comp.toFrontOnShow){this.zIndexStack.itemChanged(comp,'hidden');this.zIndexStack.sort()}},onComponentShowHide:function(comp){var me=this,zIndexStack=me.zIndexStack,sortCount=me.sortCount;if(comp.isFloating()&&!me.hidingAll&&(zIndexStack.getSource()||zIndexStack).contains(comp)){if(me.tempHidden){Ext.Array.remove(me.tempHidden,comp)}
zIndexStack.beginUpdate();if(comp.isVisible()){if(comp.toFrontOnShow){zIndexStack.itemChanged(comp,'hidden');comp.setActiveCounter(++Ext.ZIndexManager.activeCounter)}}else{zIndexStack.itemChanged(comp,'hidden')}
zIndexStack.endUpdate();if(me.sortCount===sortCount&&!me.reflowSuspended){me.onCollectionSort()}}},register:function(comp){var me=this;if(comp.zIndexManager){comp.zIndexManager.unregister(comp)}
comp.zIndexManager=me;if(!comp.rendered){comp.on('afterrender',me.onAfterComponentRender,me,{single:!0})}
me.zIndexStack.add(comp)},unregister:function(comp){var me=this;delete comp.zIndexManager;comp.un('afterrender',me.onAfterComponentRender,me);me.zIndexStack.remove(comp);me.onCollectionSort()},get:function(id){return id.isComponent?id:this.zIndexStack.get(id)},bringToFront:function(comp,preventFocus){var me=this,zIndexStack=me.zIndexStack,oldFront=zIndexStack.last(),newFront,preventFocusSetting;comp=me.get(comp);if(!comp){return!1}
preventFocusSetting=comp.preventFocusOnActivate;comp.preventFocusOnActivate=preventFocus;comp.setActiveCounter(++Ext.ZIndexManager.activeCounter);comp.preventFocusOnActivate=preventFocusSetting;newFront=zIndexStack.last();return(newFront===comp&&newFront!==oldFront)},sendToBack:function(comp){comp=this.get(comp);if(comp){comp.setActiveCounter(0)}
return comp||null},hideAll:function(){var me=this,all=me.zIndexStack.getRange(),len=all.length,i;me.hidingAll=!0;for(i=0;i<len;i++){all[i].hide()}
me.hidingAll=!1;me.hideModalMask();me.front=null},hide:function(){var me=this,activeElement=Ext.Element.getActiveElement(),all=me.zIndexStack.getRange(),len=all.length,comp,i;me.focusRestoreElement=null;(me.tempHidden||(me.tempHidden=[])).length=0;for(i=0;i<len;i++){comp=all[i];if(comp.isVisible()){if(comp.el.contains(activeElement)){me.focusRestoreElement=activeElement}
comp.el.hide();comp.pendingShow=comp.hidden=!0;me.tempHidden.push(comp)}}},show:function(){var me=this,tempHidden=me.tempHidden,len=tempHidden?tempHidden.length:0,comp,i;for(i=0;i<len;i++){comp=tempHidden[i];comp.hidden=!1;if(comp.pendingShow){comp.el.show();comp.pendingShow=!1;comp.setPosition(comp.x,comp.y);comp.onFloatShow()}else{comp.hide()}}
me.tempHidden=null;if(me.focusRestoreElement){me.focusRestoreElement.focus()}},getActive:function(){return this.zIndexStack.last()},getBy:function(fn,scope){return this.zIndexStack.filterBy(fn,scope).getRange()},each:function(fn,scope){this.zIndexStack.each(fn,scope)},eachBottomUp:function(fn,scope){var stack=this.zIndexStack.getRange(),len=stack.length,comp,i;for(i=0;i<len;i++){comp=stack[i];if(comp.isComponent&&fn.call(scope||comp,comp)===!1){return}}},eachTopDown:function(fn,scope){var stack=this.zIndexStack.getRange(),comp,i;for(i=stack.length;i-->0;){comp=stack[i];if(comp.isComponent&&fn.call(scope||comp,comp)===!1){return}}},destroy:function(){var me=this,stack=me.zIndexStack.getRange(),len=stack.length,i;for(i=0;i<len;i++){Ext.destroy(stack[i])}
Ext.destroy(me.mask,me.maskShim,me.zIndexStack,me.globalListeners,me.resizeListeners);me.callParent()},privates:{getMaskBox:function(){var maskTarget=this.mask.maskTarget;if(maskTarget.dom===document.body){return{height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,Ext.dom.Element.getDocumentWidth()),x:0,y:0}}else{return maskTarget.getBox()}},scheduleContainerResize:function(){if(!this.containerResizeTimer){this.containerResizeTimer=Ext.raf(this.onContainerResize,this)}},onContainerResize:function(){var me=this,mask=me.mask,maskShim=me.maskShim,viewSize;me.containerResizeTimer=null;if(mask&&mask.isVisible()){mask.hide();if(maskShim){maskShim.hide()}
viewSize=me.getMaskBox();if(maskShim){maskShim.setSize(viewSize);maskShim.show()}
mask.setSize(viewSize);mask.show()}},onMaskMousedown:function(e){if(this.topModal){this.topModal.focus();e.preventDefault()}},onMaskClick:function(){var front=this.topModal,methodName;if(front){if(!front.hasListeners.maskclick||front.fireEvent('maskclick',front)!==!1){methodName=front.maskClickAction||'focus';front[methodName]()}}},showModalMask:function(comp){var me=this,compEl=comp.el,maskTarget=comp.floatParent?comp.floatParent.getEl():comp.container,mask=me.mask;if(!mask){me.mask=mask=Ext.getBody().createChild({'data-sticky':!0,role:'presentation',cls:Ext.baseCSSPrefix+'mask '+Ext.baseCSSPrefix+'border-box',style:'height:0;width:0'});mask.setVisibilityMode(Ext.Element.DISPLAY);mask.on({mousedown:me.onMaskMousedown,click:me.onMaskClick,scope:me})}else{me.hideModalMask()}
mask.maskTarget=maskTarget;maskTarget.saveTabbableState({excludeRoot:compEl});me.syncModalMask(comp)},syncModalMask:function(comp){var me=this,zIndex=comp.el.getZIndex()-4,mask=me.mask,shim=me.maskShim,viewSize=me.getMaskBox();if(shim){shim.setZIndex(zIndex);shim.show();shim.setBox(viewSize)}
mask.setZIndex(zIndex);mask.show();mask.setBox(viewSize)},hideModalMask:function(){var mask=this.mask,maskShim=this.maskShim;if(mask&&mask.isVisible()){mask.maskTarget.restoreTabbableState();mask.maskTarget=undefined;mask.hide();if(maskShim){maskShim.hide()}}}}},function(){Ext.WindowManager=Ext.WindowMgr=new this()})
;
Ext.define('Ext.container.Container',{extend:'Ext.Component',xtype:'container',alternateClassName:['Ext.Container','Ext.AbstractContainer'],requires:['Ext.Action','Ext.util.MixedCollection','Ext.layout.container.Auto','Ext.ZIndexManager','Ext.util.ItemCollection'],mixins:['Ext.mixin.Queryable','Ext.mixin.Container','Ext.mixin.FocusableContainer'],renderTpl:'<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'before\'); %}</tpl>'+'{% this.renderContainer(out,values) %}'+'<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'after\'); %}</tpl>',config:{actions:null},autoDestroy:!0,defaultType:'panel',detachOnRemove:!0,items:undefined,layout:'auto',suspendLayout:!1,tabGuardTpl:'<span id="{id}-{tabGuardEl}" data-ref="{tabGuardEl}" aria-hidden="true"'+' class="'+Ext.baseCSSPrefix+'tab-guard '+Ext.baseCSSPrefix+'tab-guard-{tabGuardPosition}"'+' style="width:0px;height:0px;">'+'</span>',tabGuardElements:{before:'tabGuardBeforeEl',after:'tabGuardAfterEl'},_applyDefaultsOptions:{defaults:!0,strict:!1},ariaRole:'presentation',baseCls:Ext.baseCSSPrefix+'container',layoutCounter:0,add:function(){var me=this,args=Ext.Array.slice(arguments),index=(typeof args[0]==='number')?args.shift():-1,layout=me.getLayout(),needsLayout=!1,addingArray,items,i,length,item,pos,ret,instanced;if(args.length===1&&Ext.isArray(args[0])){items=args[0];addingArray=!0}else{items=args}
if(me.rendered){Ext.suspendLayouts()}
ret=items=me.prepareItems(items,!0);length=items.length;if(!addingArray&&length===1){ret=items[0]}
for(i=0;i<length;i++){item=items[i];if(!item){Ext.raise("Cannot add null item to Container with itemId/id: "+me.getItemId())}
if(item.destroyed){Ext.raise("Cannot add destroyed item '"+item.getId()+"' to Container '"+me.getId()+"'")}
pos=(index<0)?me.items.length:(index+i);instanced=!!item.instancedCmp;delete item.instancedCmp;if(item.floating){(me.floatingItems||(me.floatingItems=new Ext.util.ItemCollection())).add(item);item.onAdded(me,pos,instanced);delete item.$initParent;if(me.hasListeners.add){me.fireEvent('add',me,item,pos)}}else if((!me.hasListeners.beforeadd||me.fireEvent('beforeadd',me,item,pos)!==!1)&&me.onBeforeAdd(item)!==!1){me.items.insert(pos,item);item.onAdded(me,pos,instanced);delete item.$initParent;if(me.focusableContainer){me.onFocusableChildAdd(item)}
me.onAdd(item,pos);layout.onAdd(item,pos);needsLayout=!0;if(me.hasListeners.add){me.fireEvent('add',me,item,pos)}}
item.isLayoutMoving=!1}
if(needsLayout){me.updateLayout()}
if(me.rendered){if(length&&me.focusableContainer){me.$initFocusableContainerAfterLayout=!0}
Ext.resumeLayouts(!0)}
return ret},onAdded:function(container,pos,instanced){this.callParent([container,pos,instanced]);this.containerOnAdded(container,instanced)},onRemoved:function(destroying){this.containerOnRemoved(destroying);this.callParent(arguments)},afterComponentLayout:function(){var floaters=this.floatingItems,floaterCount,i,floater;this.callParent(arguments);if(floaters){floaters=floaters.items;floaterCount=floaters.length;for(i=0;i<floaterCount;i++){floater=floaters[i];if(!floater.rendered&&floater.autoShow){floater.show()}}}},afterLayout:function(layout){var me=this;++me.layoutCounter;if(me.hasListeners.afterlayout){me.fireEvent('afterlayout',me,layout)}
if(me.focusableContainer&&me.$initFocusableContainerAfterLayout){me.initFocusableContainer()}
delete me.$initFocusableContainerAfterLayout},doDestroy:function(){var me=this,items=me.items,floatingItems=me.floatingItems,c;if(me.focusableContainer){me.destroyFocusableContainer()}
if(items){while((c=items.first())){me.doRemove(c,!0)}
items.destroy();me.items=null}
if(floatingItems){while((c=floatingItems.first())){me.doRemove(c,!0)}
floatingItems.destroy();me.floatingItems=null}
Ext.destroy(me.layout);me.callParent()},beforeRender:function(){var me=this,layout=me.getLayout(),targetCls;me.preventChildDisable=!0;me.callParent();me.preventChildDisable=!1;if(!layout.initialized){layout.initLayout()}
targetCls=layout.targetCls;if(targetCls){me.applyTargetCls(targetCls)}},cascade:function(fn,scope,origArgs){var me=this,cs=me.items?me.items.items:[],len=cs.length,i=0,c,args=origArgs?origArgs.concat(me):[me],componentIndex=args.length-1;if(fn.apply(scope||me,args)!==!1){for(;i<len;i++){c=cs[i];if(c.cascade){c.cascade(fn,scope,origArgs)}else{args[componentIndex]=c;fn.apply(scope||c,args)}}}
return this},contains:function(comp,deep){var result=!1;if(deep){this.cascade(function(c){if(c.contains&&c.contains(comp)){result=!0;return!1}});return result}else{return this.items.contains(comp)||(this.floatingItems&&this.floatingItems.contains(comp))}},disable:function(silent,fromParent){var me=this,wasDisabled=me.disabled,itemsToDisable,len,i;me.callParent([silent,fromParent]);if(!fromParent&&!me.preventChildDisable&&!wasDisabled){itemsToDisable=me.getChildItemsToDisable();len=itemsToDisable.length;for(i=0;i<len;i++){itemsToDisable[i].disable(silent,!0)}}
if(me.focusableContainer){me.activateFocusableContainer(!1)}
return me},enable:function(silent,fromParent){var me=this,wasDisabled=me.disabled,itemsToDisable,len,i;me.callParent([silent,fromParent]);if(wasDisabled){itemsToDisable=me.getChildItemsToDisable();len=itemsToDisable.length;for(i=0;i<len;i++){itemsToDisable[i].enable(silent,!0)}}
if(me.focusableContainer){me.activateFocusableContainer(!0)}
return me},getChildByElement:function(el,deep){var item,itemEl,i=0,it=this.getRefItems(),ln=it.length;el=Ext.getDom(el);for(;i<ln;i++){item=it[i];itemEl=item.getEl();if(itemEl&&((itemEl.dom===el)||itemEl.contains(el))){return(deep&&item.getChildByElement)?item.getChildByElement(el,deep):item}}
return null},getComponent:function(comp){if(Ext.isObject(comp)){comp=comp.getItemId()}
var c=this.items.get(comp),floaters=this.floatingItems;if(!c&&floaters&&typeof comp!=='number'){c=floaters.get(comp)}
return c},getFocusEl:function(){var delegate=this.getDefaultFocus();if(delegate){return delegate}else if(this.focusable){return this.getTargetEl()}
return undefined},getLayout:function(){var me=this,layout=me.layout;if(!layout||!layout.isLayout){me.setLayout(layout)}
return me.layout},getRefItems:function(deep){var me=this,items=me.items.items,len=items.length,i=0,item,result=[];for(;i<len;i++){item=items[i];result[result.length]=item;if(deep&&item.getRefItems){result.push.apply(result,item.getRefItems(!0))}}
if(me.floatingItems){items=me.floatingItems.items;len=items.length;for(i=0;i<len;i++){item=items[i];result[result.length]=item;if(deep&&item.getRefItems){result.push.apply(result,item.getRefItems(!0))}}}
return result},getDefaultFocus:function(){var defaultFocus=this.defaultFocus,result;if(defaultFocus&&!this.isConfiguring){result=this.down(defaultFocus)}
return result},setDefaultFocus:function(value){this.defaultFocus=value},initComponent:function(){var me=this;me.callParent();me.getLayout();me.constructing=!0;me.initItems();if(me.disabled){me.disabled=!1;me.disable(!0)}
me.reference=me.setupReference(me.reference);delete me.constructing},initItems:function(){var me=this,items=me.items;if(!items||!items.isMixedCollection){me.items=new Ext.util.ItemCollection();if(items){if(!Ext.isArray(items)){items=[items]}
me.$initingItems=!0;me.add(items);delete me.$initingItems}}},initInheritedState:function(inheritedState,inheritedStateInner){var me=this,layout=me.layout;me.callParent([inheritedState,inheritedStateInner]);if(me.collapsed){inheritedState.collapsed=!0}
me.initContainerInheritedState(inheritedState,inheritedStateInner);if(layout&&layout.initInheritedState){layout.initInheritedState(inheritedState,inheritedStateInner)}},insert:function(index,component){var compIdx;if(component&&component.isComponent){compIdx=this.items.indexOf(component);if(compIdx!==-1){return this.move(compIdx,index)}}
return this.add(index,component)},lookupComponent:function(comp){var me=this,defaultType=me.defaultType,wasAction;if(!comp.isComponent){if(typeof comp==='string'){if(!(wasAction=(comp[0]==='@'))){return Ext.ComponentManager.get(comp)}
comp=me.getAction(comp.substr(1));defaultType=me.defaultActionType||defaultType}
comp=Ext.ComponentManager.create(comp,defaultType);if(wasAction){comp.instancedCmp=!0}}
return comp},move:function(fromIdx,toIdx){var me=this,items=me.items,item;if(fromIdx.isComponent){fromIdx=items.indexOf(fromIdx)}
item=items.getAt(fromIdx);if(fromIdx!==toIdx){item=items.removeAt(fromIdx);if(item===!1){return!1}
toIdx=Math.min(toIdx,items.getCount());items.insert(toIdx,item);me.onMove(item,fromIdx,toIdx);if(me.hasListeners.childmove){me.fireEvent('childmove',me,item,fromIdx,toIdx)}
me.updateLayout()}
return item},moveBefore:function(item,before){var activeEl,refocusEl;if(item!==before){activeEl=Ext.Element.getActiveElement(!0);if(item.el&&item.el.contains(activeEl)){refocusEl=activeEl;refocusEl.suspendFocusEvents();item.isLayoutMoving=!0}
item=this.layout.moveItemBefore(item,before);if(refocusEl){item.isLayoutMoving=!1;refocusEl.focus();refocusEl.resumeFocusEvents()}}
return item},moveAfter:function(item,after){var layout=this.layout,index;if(item!==after){index=after?layout.getMoveAfterIndex(after):0;item=this.moveBefore(item,this.items.getAt(index))}
return item},nextChild:function(child,selector){var me=this,items=me.items,childIndex=items.indexOf(child),i=0,len=items.length,result;if(childIndex!==-1){if(selector){for(;i<len;i++){result=items.getAt(childIndex+i);if(!result||Ext.ComponentQuery.is(result,selector)){break}}}else{result=items.getAt(childIndex+1)}}
return result||null},onAdd:Ext.emptyFn,onBeforeAdd:function(item){var owner=item.ownerCt;if(item.isDetached){item.reattachToBody()}
if(owner&&owner!==this){item.isLayoutMoving=!0;owner.remove(item,{destroy:!1,detach:!1})}},onMove:Ext.emptyFn,onRemove:Ext.emptyFn,onPosition:function(){this.callParent(arguments);this.repositionFloatingItems()},onResize:function(){this.callParent(arguments);this.repositionFloatingItems()},prevChild:function(child,selector){var me=this,items=me.items,childIndex=items.indexOf(child),i=0,len=items.length,result;if(childIndex!==-1){if(selector){for(;i<len;i++){result=items.getAt(childIndex-i);if(!result||Ext.ComponentQuery.is(result,selector)){break}}}else{result=items.getAt(childIndex-1)}}
return result||null},remove:function(component,autoDestroy){var me=this,c;if(me.destroyed||me.destroying){return}
c=me.getComponent(component);if(!arguments.length){Ext.log.warn("Ext.container.Container: remove takes an argument of the component "+"to remove. cmp.remove() is incorrect usage.")}
if(c&&(!me.hasListeners.beforeremove||me.fireEvent('beforeremove',me,c)!==!1)){me.doRemove(c,autoDestroy);if(me.hasListeners.remove){me.fireEvent('remove',me,c)}
if(!me.destroying&&!me.destroyAfterRemoving&&!c.floating){me.updateLayout()}
if(me.destroyAfterRemoving){me.destroy()}}
return c},removeAll:function(autoDestroy){var me=this,removeItems,floaters=me.floatingItems,items=[],i=0,len,item;if(floaters){removeItems=me.items.items.concat(floaters.items)}else{removeItems=me.items.items.slice()}
len=removeItems.length;Ext.suspendLayouts();me.removingAll=!0;for(;i<len;i++){item=removeItems[i];me.remove(item,autoDestroy);if(item.ownerCt!==me){items.push(item)}}
me.removingAll=!1;Ext.resumeLayouts(!!len);return items},setLayout:function(configuration){var me=this,oldLayout=me.layout,type;if(configuration){if(typeof configuration==='string'){configuration={type:configuration}}
type=configuration.type;if(oldLayout){if(oldLayout.isLayout){if(!type||(type===oldLayout.type)){oldLayout.setConfig(configuration);configuration=oldLayout}else{oldLayout.setOwner(null)}}else{if(typeof oldLayout==='string'){oldLayout={type:oldLayout}}
configuration=Ext.merge({},oldLayout,configuration)}}
if(!(configuration&&configuration.isLayout)){configuration.owner=this;configuration=Ext.Factory.layout(configuration)}
configuration.setOwner(this)}
me.layout=configuration;if(me.rendered){me.updateLayout()}},setActiveItem:function(item){return this.getLayout().setActiveItem(item)},updateActions:function(actions){var actionName;for(actionName in actions){if(!actions[actionName].isAction){actions[actionName]=new Ext.Action(actions[actionName])}}},getAction:function(name){var owner=this;for(owner=this;owner;owner=owner.getRefOwner()){if(owner.actions&&owner.actions[name]){return owner.actions[name]}}},onShowComplete:function(cb,scope){var me=this;me.callParent([cb,scope]);if(me.focusableContainer&&me.activateFocusableContainer){me.activateFocusableContainer()}},onFocusEnter:function(e){var me=this;me.callParent([e]);if(me.focusableContainer&&!me.destroying&&!me.destroyed){me.mixins.focusablecontainer.onFocusEnter.call(me,e)}},onFocusLeave:function(e){var me=this;me.callParent([e]);if(me.focusableContainer&&!me.destroying&&!me.destroyed){me.mixins.focusablecontainer.onFocusLeave.call(me,e)}},privates:{applyDefaults:function(config){var me=this,defaults=me.defaults;if(defaults){if(Ext.isFunction(defaults)){defaults=defaults.call(me,config)}
if(Ext.isString(config)){config=Ext.ComponentManager.get(config)}
if(config.isComponent){config.setConfig(defaults,null,me._applyDefaultsOptions)}else{config=me.self.getConfigurator().merge(me,Ext.Object.fork(defaults),config)}}
return config},applyTargetCls:function(targetCls){this.layoutTargetCls=targetCls},doRemove:function(component,flags){var me=this,layout=me.layout,hasLayout=layout&&me.rendered,floating=component.floating,doDetach=me.detachOnRemove,doDestroy=me.autoDestroy,isDestroying;if(typeof flags==='boolean'){doDestroy=flags}else if(typeof flags==='object'){if(flags.destroy!=null){doDestroy=flags.destroy}
if(flags.detach!=null){doDetach=flags.detach}}
isDestroying=component.destroying||doDestroy;if(floating){me.floatingItems.remove(component)}else{me.items.remove(component)}
if(hasLayout&&!floating){if(layout.running){Ext.Component.cancelLayout(component,isDestroying)}
layout.onRemove(component,isDestroying)}
if(!component.destroyed){component.onRemoved(isDestroying)}
if(me.focusableContainer&&!me.destroying&&!me.destroyed){me.onFocusableChildRemove(component,isDestroying)}
me.onRemove(component,isDestroying);if(doDestroy){component.destroy()}else if(!me.destroyed){if(hasLayout&&!floating){layout.afterRemove(component)}
if(doDetach&&component.rendered){component.detachFromBody()}}},finishRenderChildren:function(){var layout;this.callParent();layout=this.getLayout();if(layout){layout.finishRender()}},getChildItemsToDisable:function(){return this.query('[isLabelable],[isFocusableContainer],button')},getContentTarget:function(){return this.getLayout().getContentTarget()},getDefaultContentTarget:function(){return this.el},prepareItems:function(items,applyDefaults){if(Ext.isArray(items)){items=items.slice()}else{items=[items]}
var me=this,i=0,len=items.length,item;for(;i<len;i++){item=items[i];if(item==null){Ext.Array.erase(items,i,1);--i;--len}else{if(applyDefaults){item=this.applyDefaults(item)}
item.$initParent=me;if(item.isComponent){item.instancedCmp=!0}
items[i]=me.lookupComponent(item);delete item.$initParent}}
return items},repositionFloatingItems:function(){var floaters=this.floatingItems,floaterCount,i,floater;if(floaters){floaters=floaters.items;floaterCount=floaters.length;for(i=0;i<floaterCount;i++){floater=floaters[i];if(floater.el&&!floater.hidden){floater.setPosition(floater.x,floater.y)}}}},initTabGuards:function(activate){var me=this,beforeGuard=me.tabGuardBeforeEl,afterGuard=me.tabGuardAfterEl,minTabIndex=me.tabGuardBeforeIndex||0,maxTabIndex=me.tabGuardAfterIndex||0,i,tabIndex,nodes;if(!me.rendered||!me.tabGuard){return}
nodes=me.el.findTabbableElements({skipSelf:!0});if(nodes[0]===beforeGuard.dom){nodes.shift()}
if(nodes[nodes.length-1]===afterGuard.dom){nodes.pop()}
if(nodes&&nodes.length){if(minTabIndex==null||maxTabIndex==null){for(i=0;i<nodes.length;i++){tabIndex=+nodes[i].getAttribute('tabIndex');if(tabIndex>0){minTabIndex=Math.min(minTabIndex,tabIndex);maxTabIndex=Math.max(maxTabIndex,tabIndex)}}}
beforeGuard.dom.setAttribute('tabIndex',minTabIndex);afterGuard.dom.setAttribute('tabIndex',maxTabIndex)}else{beforeGuard.dom.removeAttribute('tabIndex');afterGuard.dom.removeAttribute('tabIndex')}
if(me.onTabGuardFocusEnter){if(!beforeGuard.hasListeners.focusenter){beforeGuard.on('focusenter',me.onTabGuardFocusEnter,me)}
if(!afterGuard.hasListeners.focusenter){afterGuard.on('focusenter',me.onTabGuardFocusEnter,me)}}},_noMargin:{'margin-top':'','margin-right':'','margin-bottom':'','margin-left':''},resetItemMargins:function(){var items=this.items.items,i=items.length,noMargin=this._noMargin,item;while(i--){item=items[i];item.margin$=null;item.el.setStyle(noMargin)}},setupRenderTpl:function(renderTpl){this.callParent(arguments);this.getLayout().setupRenderTpl(renderTpl)}}})
;
Ext.define('Ext.rtl.container.Container',{override:'Ext.container.Container',privates:{moveChildFocus:function(e,forward){var fwd=this.getInherited().rtl?!forward:forward;return this.callParent([e,fwd])}}})
;
Ext.define('Ext.layout.container.Editor',{extend:'Ext.layout.container.Container',alias:'layout.editor',autoSizeDefault:{width:'field',height:'field'},sizePolicies:{$:{$:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},boundEl:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1}},boundEl:{$:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},boundEl:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}}},getItemSizePolicy:function(item){var me=this,autoSize=me.owner.autoSize,key=autoSize&&autoSize.width,policy=me.sizePolicies;policy=policy[key]||policy.$;key=autoSize&&autoSize.height;policy=policy[key]||policy.$;return policy},calculate:function(ownerContext){var me=this,owner=me.owner,autoSize=owner.autoSize,fieldWidth,fieldHeight;if(autoSize===!0){autoSize=me.autoSizeDefault}
if(autoSize){fieldWidth=me.getDimension(owner,autoSize.width,'getWidth',owner.width);fieldHeight=me.getDimension(owner,autoSize.height,'getHeight',owner.height)}
ownerContext.childItems[0].setSize(fieldWidth,fieldHeight);ownerContext.setWidth(fieldWidth);ownerContext.setHeight(fieldHeight);ownerContext.setContentSize(fieldWidth||owner.field.getWidth(),fieldHeight||owner.field.getHeight())},getDimension:function(owner,type,getMethod,ownerSize){switch(type){case 'boundEl':return owner.boundEl[getMethod]();case 'field':return undefined;default:return ownerSize}}})
;
Ext.define('Ext.Editor',{extend:'Ext.container.Container',xtype:'editor',requires:['Ext.layout.container.Editor'],layout:'editor',allowBlur:!0,revertInvalid:!0,value:'',alignment:'c-c?',offsets:[0,0],shadow:'frame',constrain:!1,swallowKeys:!0,completeOnEnter:!0,cancelOnEsc:!0,updateEl:!1,focusOnToFront:!1,baseCls:Ext.baseCSSPrefix+'editor',editing:!1,preventDefaultAlign:!0,useBoundValue:!0,specialKeyDelay:1,initComponent:function(){var me=this,field=me.field=Ext.ComponentManager.create(me.field||{},'textfield');field.msgTarget=field.msgTarget||'qtip';me.mon(field,{scope:me,specialkey:me.onSpecialKey});if(field.grow){me.mon(field,'autosize',me.onFieldAutosize,me,{delay:1})}
me.floating={constrain:me.constrain};me.items=field;me.callParent()},onAdded:function(container){this.ownerCmp=container},onFieldAutosize:function(){this.updateLayout()},afterRender:function(ct,position){var me=this,field=me.field,inputEl=field.inputEl;me.callParent(arguments);if(inputEl){inputEl.dom.name='';if(me.swallowKeys){inputEl.swallowEvent(['keypress','keydown'])}}},onSpecialKey:function(field,event){var me=this,key=event.getKey(),complete=me.completeOnEnter&&key===event.ENTER,cancel=me.cancelOnEsc&&key===event.ESC,task=me.specialKeyTask;if(complete||cancel){event.stopEvent();if(!task){me.specialKeyTask=task=new Ext.util.DelayedTask()}
task.delay(me.specialKeyDelay,complete?me.completeEdit:me.cancelEdit,me);if(me.specialKeyDelay===0){task.cancel();if(complete){me.completeEdit()}else{me.cancelEdit()}}}
me.fireEvent('specialkey',me,field,event)},startEdit:function(el,value,doFocus,isResuming){var me=this,field=me.field,dom,ownerCt,renderTo;if(!isResuming){me.completeEdit(!0)}
me.boundEl=Ext.get(el);dom=me.boundEl.dom;if(me.useBoundValue&&!Ext.isDefined(value)){value=Ext.String.trim(dom.textContent||dom.innerText||dom.innerHTML)}
if(me.fireEvent('beforestartedit',me,me.boundEl,value)!==!1){if(me.context){value=me.context.value}
Ext.suspendLayouts();if(!me.rendered){ownerCt=me.ownerCt;renderTo=me.renderTo||(ownerCt&&ownerCt.getEl())||Ext.getBody();Ext.fly(renderTo).position();me.renderTo=renderTo}
me.startValue=value;me.show();me.realign(!0);field.suspendEvents();field.setValue(value);field.resetOriginalValue();field.resumeEvents();if(doFocus!==!1){field.focus(field.selectOnFocus?!0:[Ext.Number.MAX_SAFE_INTEGER])}
if(field.autoSize){field.autoSize()}
Ext.resumeLayouts(!0);me.toggleBoundEl(!1);me.editing=!0}},realign:function(autoSize){var me=this;if(autoSize===!0){me.updateLayout()}
me.alignTo(me.boundEl,me.alignment,me.offsets)},completeEdit:function(remainVisible){var me=this,field=me.field,startValue=me.startValue,cancel=me.context&&me.context.cancel,value;if(!me.editing){return}
if(field.assertValue){field.assertValue()}
value=me.getValue();if(!field.isValid()){if(me.revertInvalid!==!1){me.cancelEdit(remainVisible)}
return}
if(me.ignoreNoChange&&!field.didValueChange(value,startValue)){me.onEditComplete(remainVisible);return}
if(me.fireEvent('beforecomplete',me,value,startValue)!==!1){value=me.getValue();if(me.updateEl&&me.boundEl){me.boundEl.setHtml(value)}
me.onEditComplete(remainVisible,cancel);me.fireEvent('complete',me,value,startValue)}},onShow:function(){var me=this;me.callParent(arguments);me.fireEvent('startedit',me,me.boundEl,me.startValue)},cancelEdit:function(remainVisible){var me=this,startValue=me.startValue,field=me.field,value;if(me.editing){if(field){value=me.editedValue=me.getValue();field.suspendEvents();me.setValue(startValue);field.resumeEvents()}
me.onEditComplete(remainVisible,!0);me.fireEvent('canceledit',me,value,startValue);delete me.editedValue}},onEditComplete:function(remainVisible,canceling){this.editing=!1;if(remainVisible!==!0){this.hide();this.toggleBoundEl(!0)}},onFocusLeave:function(e){var me=this;if(me.allowBlur===!0&&me.editing){me.completeEdit()}
me.callParent([e])},onHide:function(){var me=this,field=me.field;if(me.editing){me.completeEdit()}else if(field.collapse){field.collapse()}
me.callParent(arguments)},getValue:function(){return this.field.getValue()},setValue:function(value){this.field.setValue(value)},toggleBoundEl:function(visible){if(this.hideEl!==!1){this.boundEl.setVisible(visible)}},doDestroy:function(){var me=this,task=me.specialKeyTask;if(task){task.cancel()}
Ext.destroy(me.field);me.callParent()}})
;
Ext.define('Ext.EventManager',{singleton:!0,mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,addListener:function(element,eventName,fn,scope,options){Ext.log.warn("Ext.EventManager is deprecated. "+"Use Ext.dom.Element#addListener to attach an event listener.");Ext.get(element).addListener(eventName,fn,scope,options)},onWindowResize:function(fn,scope,options){Ext.log.warn("Ext.EventManager is deprecated. "+"Use Ext.on('resize', fn) to attach a window resize listener.");Ext.GlobalEvents.on('resize',fn,scope,options)},onWindowUnload:function(fn,scope,options){Ext.log.warn("Ext.EventManager is deprecated. "+"Use Ext.getWin().on('unload', fn) to attach a window unload listener.");Ext.getWin().on('unload',fn,scope,options)},purgeElement:function(element,eventName){Ext.log.warn("Ext.EventManager is deprecated. "+"Call clearListeners() on a Ext.dom.Element to remove all listeners.");Ext.get(element).clearListeners()},removeAll:function(element){Ext.log.warn("Ext.EventManager is deprecated. "+"Call clearListeners() on a Ext.dom.Element to remove all listeners.");Ext.get(element).clearListeners()},removeListener:function(element,eventName,fn,scope,options){Ext.log.warn("Ext.EventManager is deprecated. "+"Use Ext.dom.Element#removeListener to remove an event listener.");Ext.get(element).removeListener(eventName,fn,scope,options)},removeResizeListener:function(fn,scope){Ext.log.warn("Ext.EventManager is deprecated. "+"Use Ext.on('resize', fn) to detach a window resize listener.");Ext.GlobalEvents.un('resize',fn,scope)},removeUnloadListener:function(fn,scope){Ext.log.warn("Ext.EventManager is deprecated. "+"Use Ext.getWin().un('unload', fn) to detach a window unload listener.");Ext.getWin().un('unload',fn,scope)},stopEvent:function(event){Ext.log.warn("Ext.EventManager.stopEvent() is deprecated. "+"Call stopEvent() directly on the Ext.event.Event instance instead.");this.stopPropagation(event);this.preventDefault(event)},stopPropagation:function(event){Ext.log.warn("Ext.EventManager.stopPropagation() is deprecated. "+"Call stopPropagation() directly on the Ext.event.Event instance instead.");event=event.browserEvent||event;if(event.stopPropagation){event.stopPropagation()}else{event.cancelBubble=!0}},preventDefault:function(event){Ext.log.warn("Ext.EventManager.preventDefault() is deprecated. "+"Call preventDefault() directly on the Ext.event.Event instance instead.");event=event.browserEvent||event;if(event.preventDefault){event.preventDefault()}else{event.returnValue=!1;try{if(event.ctrlKey||event.keyCode>111&&event.keyCode<124){event.keyCode=-1}}catch(e){}}},getId:function(element){Ext.log.warn("Ext.EventManager.getId() is deprecated. "+"Call Ext.get() to assign ids to elements.");element=Ext.get(element);return element.id},getRelatedTarget:function(event){var target;Ext.log.warn("Ext.EventManager.getRelatedTarget() is deprecated. "+"Call getRelatedTarget() directly on the Ext.event.Event instance instead.");event=event.browserEvent||event;target=event.relatedTarget;if(!target){if(this.mouseLeaveRe.test(event.type)){target=event.toElement}else if(this.mouseEnterRe.test(event.type)){target=event.fromElement}}
return this.resolveTextNode(target)},getPageX:function(event){Ext.log.warn("Ext.EventManager.getPageX() is deprecated. "+"Call getX() directly on the Ext.event.Event instance instead.");return this.getPageXY(event)[0]},getPageXY:function(event){Ext.log.warn("Ext.EventManager.getPageXY() is deprecated. "+"Call getXY() directly on the Ext.event.Event instance instead.");event=event.browserEvent||event;var x=event.pageX,y=event.pageY,docEl=document.documentElement,body=document.body;if(!x&&x!==0){x=event.clientX+(docEl&&docEl.scrollLeft||body&&body.scrollLeft||0)-(docEl&&docEl.clientLeft||body&&body.clientLeft||0);y=event.clientY+(docEl&&docEl.scrollTop||body&&body.scrollTop||0)-(docEl&&docEl.clientTop||body&&body.clientTop||0)}
return[x,y]},getPageY:function(event){Ext.log.warn("Ext.EventManager.getPageY() is deprecated. "+"Call getY() directly on the Ext.event.Event instance instead.");return this.getPageXY(event)[1]},getTarget:function(event){Ext.log.warn("Ext.EventManager.getTarget() is deprecated. "+"Call getTarget() directly on the Ext.event.Event instance instead.");event=event.browserEvent||event;return Ext.EventManager.resolveTextNode(event.target||event.srcElement)},resolveTextNode:Ext.isGecko?function(node){var s;if(node){s=HTMLElement.prototype.toString.call(node);if(s!=='[xpconnect wrapped native prototype]'&&s!=='[object XULElement]'){return node.nodeType===3?node.parentNode:node}}}:function(node){return node&&node.nodeType===3?node.parentNode:node}},function(EventManager){EventManager.on=EventManager.addListener;EventManager.un=EventManager.removeListener})
;

;
Ext.define('Ext.Img',{extend:'Ext.Component',alias:['widget.image','widget.imagecomponent'],requires:['Ext.Glyph'],autoEl:'img',baseCls:Ext.baseCSSPrefix+'img',config:{src:null,glyph:null},alt:'',title:'',imgCls:'',maskOnDisable:!1,applySrc:function(src){return src&&Ext.resolveResource(src)},getElConfig:function(){var me=this,autoEl=me.autoEl,config=me.callParent(),glyph=me.glyph,img;if(glyph){config.tag='div';config.html=glyph.character;config.style=config.style||{};config.style.fontFamily=glyph.fontFamily;config.role='img'}else if(autoEl==='img'||(Ext.isObject(autoEl)&&autoEl.tag==='img')){img=config}else{config.cn=[img={tag:'img',id:me.id+'-img'}]}
if(img){if(me.imgCls){img.cls=(img.cls?img.cls+' ':'')+me.imgCls}
img.src=me.src||Ext.BLANK_IMAGE_URL}
if(me.alt){(img||config).alt=me.alt}else{(img||config).alt='';Ext.log.warn('For WAI-ARIA compliance, IMG elements SHOULD have an alt attribute.')}
if(me.title){(img||config).title=me.title}
return config},onRender:function(){var me=this,autoEl=me.autoEl,el;me.callParent(arguments);el=me.el;if(autoEl==='img'||(Ext.isObject(autoEl)&&autoEl.tag==='img')){me.imgEl=el}else{me.imgEl=el.getById(me.id+'-img')}},doDestroy:function(){var me=this,imgEl=me.imgEl;if(imgEl&&me.el!==imgEl){imgEl.destroy()}
me.imgEl=null;me.callParent()},getTitle:function(){return this.title},setTitle:function(title){var me=this,imgEl=me.imgEl;me.title=title||'';if(imgEl){imgEl.dom.title=title||''}},afterComponentLayout:function(width,height,oldWidth,oldHeight){var heightModel=this.getSizeModel().height,h;if((heightModel.calculated||heightModel.configured)&&height&&this.glyph){h=height+'px';this.setStyle({'line-height':h,'font-size':h})}
this.callParent([width,height,oldWidth,oldHeight])},getAlt:function(){return this.alt},setAlt:function(alt){var me=this,imgEl=me.imgEl;me.alt=alt||'';if(imgEl){imgEl.dom.alt=alt||''}},_naturalSize:null,getNaturalSize:function(){var me=this,img=me.imgEl,naturalSize=me._naturalSize,style,w,h;if(img&&!naturalSize){img=img.dom;me._naturalSize=naturalSize={width:w=img.naturalWidth,height:img.naturalHeight};if(!w){style=img.style;w=style.width;h=style.height;style.width=style.height='auto';naturalSize.width=img.width;naturalSize.height=img.height;style.width=w;style.height=h}
naturalSize.aspect=naturalSize.width/naturalSize.height}
return naturalSize},updateSrc:function(src){var imgEl=this.imgEl;if(imgEl){imgEl.dom.src=src||Ext.BLANK_IMAGE_URL}},applyGlyph:function(glyph,oldGlyph){if(glyph){if(!glyph.isGlyph){glyph=new Ext.Glyph(glyph)}
if(glyph.isEqual(oldGlyph)){glyph=undefined}}
return glyph},updateGlyph:function(glyph,oldGlyph){var el=this.el;if(el){el.dom.innerHTML=glyph.character;el.setStyle(glyph.getStyle())}}})
;
Ext.define('Ext.util.StoreHolder',{requires:['Ext.data.StoreManager'],mixinId:'storeholder',autoDestroyBoundStore:!1,bindStore:function(store,initial,propertyName){var me=this,oldStore;propertyName=propertyName||'store';oldStore=initial?null:me[propertyName];if(store!==oldStore){if(oldStore){if(!me.onUnbindStore.$emptyFn){me.onUnbindStore(oldStore,initial,propertyName)}
if(!oldStore.destroyed){if(me.autoDestroyBoundStore&&propertyName==='store'&&oldStore.autoDestroy){oldStore.destroy()}else{me.unbindStoreListeners(oldStore)}}}
if(store){me[propertyName]=store=Ext.data.StoreManager.lookup(store);me.bindStoreListeners(store);if(!me.onBindStore.$emptyFn){me.onBindStore(store,oldStore,initial)}}else{me[propertyName]=null}
if(me.fireEvent){me.fireEvent('storechange',me,store,oldStore)}}
return me},getStore:function(){return this.store},setStore:function(store){this.bindStore(store)},unbindStoreListeners:function(store){var listeners=this.storeListeners;if(listeners){store.un(listeners)}},bindStoreListeners:function(store){var listeners=this.getStoreListeners(store);if(listeners){listeners=Ext.apply({},listeners);if(!listeners.scope){listeners.scope=this}
this.storeListeners=listeners;store.on(listeners)}},getStoreListeners:Ext.emptyFn,onUnbindStore:Ext.emptyFn,onBindStore:Ext.emptyFn})
;
Ext.define('Ext.LoadMask',{extend:'Ext.Component',alias:'widget.loadmask',mixins:['Ext.util.StoreHolder'],uses:['Ext.data.StoreManager'],isLoadMask:!0,msg:'Loading...',msgCls:Ext.baseCSSPrefix+'mask-loading',msgWrapCls:Ext.baseCSSPrefix+'mask-msg',useMsg:!0,useTargetEl:!1,cls:Ext.baseCSSPrefix+'mask',componentCls:Ext.baseCSSPrefix+'border-box',ariaRole:'progressbar',focusable:!0,tabIndex:0,childEls:['msgWrapEl','msgEl','msgTextEl'],renderTpl:['<div id="{id}-msgWrapEl" data-ref="msgWrapEl" class="{[values.$comp.msgWrapCls]}" role="presentation">','<div id="{id}-msgEl" data-ref="msgEl" class="{[values.$comp.msgCls]} ',Ext.baseCSSPrefix,'mask-msg-inner {childElCls}" role="presentation">','<div id="{id}-msgTextEl" data-ref="msgTextEl" class="',Ext.baseCSSPrefix,'mask-msg-text','{childElCls}" role="presentation">{msg}</div>','</div>','</div>'],maskOnDisable:!1,skipLayout:!0,constructor:function(config){var me=this,comp;if(arguments.length===2){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.LoadMask: LoadMask now uses a standard 1 arg constructor: '+'use the target config')}
comp=me.target=config;config=arguments[1]}else{comp=config.target}
if(config.maskCls){Ext.log.warn('Ext.LoadMask property maskCls is deprecated, use msgWrapCls instead');config.msgWrapCls=config.msgWrapCls||config.maskCls}
me.callParent([config]);if(comp.isComponent){me.ownerCt=comp;me.hidden=!0;me.renderTo=me.getMaskTarget();me.external=me.renderTo===Ext.getBody();me.bindComponent(comp)}else{if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.LoadMask: LoadMask for elements has been deprecated, '+'use Ext.dom.Element.mask & Ext.dom.Element.unmask')}
comp=Ext.get(comp);me.isElement=!0;me.renderTo=me.target}
me.render(me.renderTo);if(me.store){me.bindStore(me.store,!0)}},initRenderData:function(){var result=this.callParent(arguments);result.msg=this.msg||'';return result},onRender:function(){this.callParent(arguments);this.maskEl=this.el},bindComponent:function(comp){var me=this,listeners={scope:this,resize:me.sizeMask};if(me.external){listeners.added=me.onComponentAdded;listeners.removed=me.onComponentRemoved;if(comp.floating){listeners.move=me.sizeMask;me.activeOwner=comp}else if(comp.ownerCt){me.onComponentAdded(comp.ownerCt)}}
me.mon(comp,listeners);if(me.external){me.mon(Ext.GlobalEvents,{show:me.onContainerShow,hide:me.onContainerHide,expand:me.onContainerExpand,collapse:me.onContainerCollapse,scope:me})}},onComponentAdded:function(owner){var me=this;delete me.activeOwner;me.floatParent=owner;if(!owner.floating){owner=owner.up('[floating]')}
if(owner){me.activeOwner=owner;me.mon(owner,'move',me.sizeMask,me);me.mon(owner,'tofront',me.onOwnerToFront,me)}else{me.preventBringToFront=!0}
owner=me.floatParent.ownerCt;if(me.rendered&&me.isVisible()&&owner){me.floatOwner=owner;me.mon(owner,'afterlayout',me.sizeMask,me,{single:!0})}},onComponentRemoved:function(owner){var me=this,activeOwner=me.activeOwner,floatOwner=me.floatOwner;if(activeOwner){me.mun(activeOwner,'move',me.sizeMask,me);me.mun(activeOwner,'tofront',me.onOwnerToFront,me)}
if(floatOwner){me.mun(floatOwner,'afterlayout',me.sizeMask,me)}
delete me.activeOwner;delete me.floatOwner},afterRender:function(){var me=this;me.callParent(arguments);if(Ext.isIE){me.el.on('mousedown',me.onMouseDown,me)}
this.el.skipGarbageCollection=!0},onMouseDown:function(e){var el=this.el;if(e.within(el)){e.preventDefault();el.focus()}},onOwnerToFront:function(owner,zIndex){this.el.setStyle('zIndex',zIndex+1)},onContainerShow:function(container){if(!this.isHierarchicallyHidden()){this.onComponentShow()}},onContainerHide:function(container){if(this.isHierarchicallyHidden()){this.onComponentHide()}},onContainerExpand:function(container){if(!this.isHierarchicallyHidden()){this.onComponentShow()}},onContainerCollapse:function(container){if(this.isHierarchicallyHidden()){this.onComponentHide()}},onComponentHide:function(){var me=this;if(me.rendered&&me.isVisible()){me.hide();me.showNext=!0}},onComponentShow:function(){if(this.showNext){this.show()}
delete this.showNext},sizeMask:function(){var me=this,target=me.activeOwner||me.target,boxTarget=me.external?me.getOwner().el:me.getMaskTarget(),zIndex;if(me.rendered&&me.isVisible()){if(me.external){if(!me.isElement&&target.floating){zIndex=target.el.getZIndex();if(!isNaN(zIndex)){me.onOwnerToFront(target,zIndex)}}
me.el.setSize(boxTarget.getSize()).alignTo(boxTarget,'tl-tl')}
me.msgWrapEl.center(me.el)}},bindStore:function(store,initial){var me=this;Ext.destroy(me.proxyListeners);me.mixins.storeholder.bindStore.apply(me,arguments);store=me.store;if(store){while(store.getSource){store=store.getSource()}
if(!store.loadsSynchronously()){me.proxyListeners=store.getProxy().on({exception:me.onLoad,scope:me,destroyable:!0})}
if(store.isLoading()){me.onBeforeLoad()}}},getStoreListeners:function(store){var onLoad=this.onLoad,beforeLoad=this.onBeforeLoad,result={cachemiss:beforeLoad,cachefilled:{fn:onLoad,buffer:100}};if(!store.loadsSynchronously()){result.beforeload=beforeLoad;result.load=onLoad}
return result},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.ownerCmp||this.floatParent},getMaskTarget:function(){var owner=this.getOwner();if(this.isElement){return this.target}
return this.useTargetEl?owner.getTargetEl():(owner.getMaskTarget()||Ext.getBody())},onBeforeLoad:function(){var me=this,owner=me.getOwner(),origin;if(!me.disabled){me.loading=!0;if(owner.componentLayoutCounter){me.maybeShow()}else{origin=owner.afterComponentLayout;owner.afterComponentLayout=function(){owner.afterComponentLayout=origin;origin.apply(owner,arguments);me.maybeShow()}}}},maybeShow:function(){var me=this,owner=me.getOwner(),ownerVisible;ownerVisible=owner.isVisible(!0)&&(!me.isComponent||owner.el.isVisible(!0));if(!ownerVisible){me.showNext=!0}else if(me.loading&&owner.rendered){me.show()}},hide:function(){var me=this,ownerCt=me.ownerCt;me.target.removeCls(Ext.baseCSSPrefix+"masked");if(me.isElement){ownerCt.unmask();me.fireEvent('hide',this);return}
if(ownerCt){ownerCt.updateMaskState(!1,me)}
delete me.showNext;return me.callParent(arguments)},show:function(){var me=this;me.target.addCls(Ext.baseCSSPrefix+"masked");if(me.isElement){me.ownerCt.mask(this.useMsg?this.msg:'',this.msgCls);me.fireEvent('show',this);return}
return me.callParent(arguments)},afterShow:function(){var me=this,ownerCt=me.ownerCt;me.loading=!0;me.callParent(arguments);ownerCt.updateMaskState(!0,me);me.el.restoreTabbableState();me.syncMaskState()},syncMaskState:function(){var me=this,ownerCt=me.ownerCt,el=me.el;if(me.isVisible()){if(me.hasOwnProperty('msgWrapCls')){el.dom.className=me.msgWrapCls}
if(me.useMsg){me.msgTextEl.setHtml(me.msg);me.ariaEl.dom.setAttribute('aria-valuetext',me.msg)}else{me.msgWrapEl.hide()}
if(me.shim||Ext.useShims){el.enableShim(null,!0)}else{el.disableShim()}
if(ownerCt.el.contains(Ext.Element.getActiveElement())){me.focus()}
me.sizeMask()}},onLoad:function(){this.loading=!1;this.hide()},doDestroy:function(){var me=this;me.ownerCt=null;me.bindStore(null);if(me.isElement){me.ownerCt.unmask()}
me.callParent()}})
;
Ext.define('Ext.layout.component.Component',{extend:'Ext.layout.Layout',type:'component',isComponentLayout:!0,nullBox:{},usesContentHeight:!0,usesContentWidth:!0,usesHeight:!0,usesWidth:!0,widthCache:{},heightCache:{},beginLayoutCycle:function(ownerContext,firstCycle){var me=this,owner=me.owner,ownerCtContext=ownerContext.ownerCtContext,heightModel=ownerContext.heightModel,widthModel=ownerContext.widthModel,body=owner.el.dom===document.body,lastBox=owner.lastBox||me.nullBox,lastSize=owner.el.lastBox||me.nullBox,dirty=!body,isTopLevel=ownerContext.isTopLevel,ownerLayout,v,width,height,scroller;me.callParent([ownerContext,firstCycle]);if(firstCycle){scroller=owner.getScrollable&&owner.getScrollable();if(scroller){scroller.flushOnDomScrollEnd()}
if(me.usesContentWidth){++ownerContext.consumersContentWidth}
if(me.usesContentHeight){++ownerContext.consumersContentHeight}
if(me.usesWidth){++ownerContext.consumersWidth}
if(me.usesHeight){++ownerContext.consumersHeight}
if(ownerCtContext&&!ownerCtContext.hasRawContent){ownerLayout=owner.ownerLayout;if(ownerLayout){if(ownerLayout.usesWidth){++ownerContext.consumersWidth}
if(ownerLayout.usesHeight){++ownerContext.consumersHeight}}}}
if(widthModel.configured){width=owner[widthModel.names.width];if(isTopLevel&&widthModel.calculatedFrom){width=lastBox.width}
if(!body){dirty=me.setWidthInDom||(firstCycle?width!==lastSize.width:widthModel.constrained)}
ownerContext.setWidth(width,dirty)}else if(isTopLevel){if(widthModel.calculated){v=lastBox.width;ownerContext.setWidth(v,v!==lastSize.width)}else if(widthModel.calculatedFromNatural){owner.el.dom.style.width=owner.width}
v=lastBox.x;ownerContext.setProp('x',v,v!==lastSize.x)}
if(heightModel.configured){height=owner[heightModel.names.height];if(isTopLevel&&heightModel.calculatedFrom){height=lastBox.height}
if(!body){dirty=firstCycle?height!==lastSize.height:heightModel.constrained}
ownerContext.setHeight(height,dirty)}else if(isTopLevel){if(heightModel.calculated){v=lastBox.height;ownerContext.setHeight(v,v!==lastSize.height)}else if(heightModel.calculatedFromNatural){owner.el.dom.style.height=owner.height}
v=lastBox.y;ownerContext.setProp('y',v,v!==lastSize.y)}},finishedLayout:function(ownerContext){var me=this,elementChildren=ownerContext.children,owner=me.owner,len,i,elContext,lastBox,props;if(elementChildren){len=elementChildren.length;for(i=0;i<len;i++){elContext=elementChildren[i];elContext.el.lastBox=elContext.props}}
ownerContext.previousSize=me.lastComponentSize;me.lastComponentSize=owner.el.lastBox=props=ownerContext.props;lastBox=owner.lastBox||(owner.lastBox={});lastBox.x=props.x;lastBox.y=props.y;lastBox.width=props.width;lastBox.height=props.height;lastBox.invalid=!1;me.callParent([ownerContext])},notifyOwner:function(ownerContext){var me=this,currentSize=me.lastComponentSize,prevSize=ownerContext.previousSize;me.owner.afterComponentLayout(currentSize.width,currentSize.height,prevSize?prevSize.width:undefined,prevSize?prevSize.height:undefined)},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},cacheTargetInfo:function(ownerContext){var me=this,targetInfo=me.targetInfo,target;if(!targetInfo){target=ownerContext.getEl('getTarget',me);me.targetInfo=targetInfo={padding:target.getPaddingInfo(),border:target.getBorderInfo()}}
return targetInfo},measureAutoDimensions:function(ownerContext,dimensions){var me=this,owner=me.owner,containerLayout=owner.layout,heightModel=ownerContext.heightModel,widthModel=ownerContext.widthModel,boxParent=ownerContext.boxParent,isBoxParent=ownerContext.isBoxParent,target=ownerContext.target,props=ownerContext.props,isContainer,ret={gotWidth:!1,gotHeight:!1,isContainer:(isContainer=!ownerContext.hasRawContent)},hv=dimensions||3,zeroWidth,zeroHeight,needed=0,got=0,ready,size,temp,key,cache;if(widthModel.shrinkWrap&&ownerContext.consumersContentWidth){++needed;zeroWidth=!(hv&1);if(isContainer){if(zeroWidth){ret.contentWidth=0;ret.gotWidth=!0;++got}else if((ret.contentWidth=ownerContext.getProp('contentWidth'))!==undefined){ret.gotWidth=!0;++got}}else{size=props.contentWidth;if(typeof size==='number'){ret.contentWidth=size;ret.gotWidth=!0;++got}else{if(zeroWidth){ready=!0}else if(!ownerContext.hasDomProp('containerChildrenSizeDone')){ready=!1}else if(isBoxParent||!boxParent||boxParent.widthModel.shrinkWrap){ready=!0}else{ready=boxParent.hasDomProp('width')}
if(ready){if(zeroWidth){temp=0}else if(containerLayout&&containerLayout.measureContentWidth){temp=containerLayout.measureContentWidth(ownerContext)}else{if(target.cacheWidth){key=target.xtype+'-'+target.ui;cache=me.widthCache;temp=cache[key]||(cache[key]=me.measureContentWidth(ownerContext))}else{temp=me.measureContentWidth(ownerContext)}}
if(!isNaN(ret.contentWidth=temp)){ownerContext.setContentWidth(temp,!0);ret.gotWidth=!0;++got}}}}}else if(widthModel.natural&&ownerContext.consumersWidth){++needed;size=props.width;if(typeof size==='number'){ret.width=size;ret.gotWidth=!0;++got}else{if(isBoxParent||!boxParent){ready=!0}else{ready=boxParent.hasDomProp('width')}
if(ready){if(!isNaN(ret.width=me.measureOwnerWidth(ownerContext))){ownerContext.setWidth(ret.width,!1);ret.gotWidth=!0;++got}}}}
if(heightModel.shrinkWrap&&ownerContext.consumersContentHeight){++needed;zeroHeight=!(hv&2);if(isContainer){if(zeroHeight){ret.contentHeight=0;ret.gotHeight=!0;++got}else if((ret.contentHeight=ownerContext.getProp('contentHeight'))!==undefined){ret.gotHeight=!0;++got}}else{size=props.contentHeight;if(typeof size==='number'){ret.contentHeight=size;ret.gotHeight=!0;++got}else{if(zeroHeight){ready=!0}else if(!ownerContext.hasDomProp('containerChildrenSizeDone')){ready=!1}else if(owner.noWrap){ready=!0}else if(!widthModel.shrinkWrap){ready=(ownerContext.bodyContext||ownerContext).hasDomProp('width')}else if(isBoxParent||!boxParent||boxParent.widthModel.shrinkWrap){ready=!0}else{ready=boxParent.hasDomProp('width')}
if(ready){if(zeroHeight){temp=0}else if(containerLayout&&containerLayout.measureContentHeight){temp=containerLayout.measureContentHeight(ownerContext)}else{if(target.cacheHeight){key=target.xtype+'-'+target.ui;cache=me.heightCache;temp=cache[key]||(cache[key]=me.measureContentHeight(ownerContext))}else{temp=me.measureContentHeight(ownerContext)}}
if(!isNaN(ret.contentHeight=temp)){ownerContext.setContentHeight(temp,!0);ret.gotHeight=!0;++got}}}}}else if(heightModel.natural&&ownerContext.consumersHeight){++needed;size=props.height;if(typeof size==='number'){ret.height=size;ret.gotHeight=!0;++got}else{if(isBoxParent||!boxParent){ready=!0}else{ready=boxParent.hasDomProp('width')}
if(ready){if(!isNaN(ret.height=me.measureOwnerHeight(ownerContext))){ownerContext.setHeight(ret.height,!1);ret.gotHeight=!0;++got}}}}
if(boxParent){ownerContext.onBoxMeasured()}
ret.gotAll=got===needed;return ret},measureContentWidth:function(ownerContext){return ownerContext.el.getWidth()-ownerContext.getFrameInfo().width},measureContentHeight:function(ownerContext){return ownerContext.el.getHeight()-ownerContext.getFrameInfo().height},measureOwnerHeight:function(ownerContext){return ownerContext.el.getHeight()},measureOwnerWidth:function(ownerContext){return ownerContext.el.getWidth()}})
;
Ext.define('Ext.layout.component.Auto',{alias:'layout.autocomponent',extend:'Ext.layout.component.Component',type:'autocomponent',setHeightInDom:!1,setWidthInDom:!1,waitForOuterHeightInDom:!1,waitForOuterWidthInDom:!1,beginLayoutCycle:function(ownerContext,firstCycle){var me=this,lastWidthModel=me.lastWidthModel,lastHeightModel=me.lastHeightModel,el=me.owner.el;me.callParent(arguments);if(lastWidthModel&&lastWidthModel.fixed&&ownerContext.widthModel.shrinkWrap){el.setWidth(null)}
if(lastHeightModel&&lastHeightModel.fixed&&ownerContext.heightModel.shrinkWrap){el.setHeight(null)}},calculate:function(ownerContext){var me=this,measurement=me.measureAutoDimensions(ownerContext),heightModel=ownerContext.heightModel,widthModel=ownerContext.widthModel,width,height;if(measurement.gotWidth){if(widthModel.shrinkWrap){me.publishOwnerWidth(ownerContext,measurement.contentWidth)}else if(me.publishInnerWidth){me.publishInnerWidth(ownerContext,measurement.width)}}else if(!widthModel.auto&&me.publishInnerWidth){width=me.waitForOuterWidthInDom?ownerContext.getDomProp('width'):ownerContext.getProp('width');if(width===undefined){me.done=!1}else{me.publishInnerWidth(ownerContext,width)}}
if(measurement.gotHeight){if(heightModel.shrinkWrap){me.publishOwnerHeight(ownerContext,measurement.contentHeight)}else if(me.publishInnerHeight){me.publishInnerHeight(ownerContext,measurement.height)}}else if(!heightModel.auto&&me.publishInnerHeight){height=me.waitForOuterHeightInDom?ownerContext.getDomProp('height'):ownerContext.getProp('height');if(height===undefined){me.done=!1}else{me.publishInnerHeight(ownerContext,height)}}
if(!measurement.gotAll){me.done=!1}},calculateOwnerHeightFromContentHeight:function(ownerContext,contentHeight){return contentHeight+ownerContext.getFrameInfo().height},calculateOwnerWidthFromContentWidth:function(ownerContext,contentWidth){return contentWidth+ownerContext.getFrameInfo().width},publishOwnerHeight:function(ownerContext,contentHeight){var me=this,owner=me.owner,height=me.calculateOwnerHeightFromContentHeight(ownerContext,contentHeight),constrainedHeight,dirty,heightModel;if(isNaN(height)){me.done=!1}else{constrainedHeight=Ext.Number.constrain(height,owner.minHeight,owner.maxHeight);if(constrainedHeight===height){dirty=me.setHeightInDom}else{heightModel=me.sizeModels[(constrainedHeight<height)?'constrainedMax':'constrainedMin'];height=constrainedHeight;if(ownerContext.heightModel.calculatedFromShrinkWrap){ownerContext.heightModel=heightModel}else{ownerContext.invalidate({heightModel:heightModel})}}
ownerContext.setHeight(height,dirty)}},publishOwnerWidth:function(ownerContext,contentWidth){var me=this,owner=me.owner,width=me.calculateOwnerWidthFromContentWidth(ownerContext,contentWidth),constrainedWidth,dirty,widthModel;if(isNaN(width)){me.done=!1}else{constrainedWidth=Ext.Number.constrain(width,owner.minWidth,owner.maxWidth);if(constrainedWidth===width){dirty=me.setWidthInDom}else{widthModel=me.sizeModels[(constrainedWidth<width)?'constrainedMax':'constrainedMin'];width=constrainedWidth;if(ownerContext.widthModel.calculatedFromShrinkWrap){ownerContext.widthModel=widthModel}else{ownerContext.invalidate({widthModel:widthModel})}}
ownerContext.setWidth(width,dirty)}}})
;
Ext.define('Ext.layout.component.ProgressBar',{extend:'Ext.layout.component.Auto',alias:'layout.progressbar',type:'progressbar',beginLayout:function(ownerContext){var me=this,i,textEls;me.callParent(arguments);if(!ownerContext.textEls){textEls=me.owner.textEl;if(textEls.isComposite){ownerContext.textEls=[];textEls=textEls.elements;for(i=textEls.length;i--;){ownerContext.textEls[i]=ownerContext.getEl(Ext.get(textEls[i]))}}else{ownerContext.textEls=[ownerContext.getEl('textEl')]}}},calculate:function(ownerContext){var me=this,i,textEls,width;me.callParent(arguments);if(Ext.isNumber(width=ownerContext.getProp('width'))){width-=ownerContext.getBorderInfo().width;textEls=ownerContext.textEls;for(i=textEls.length;i--;){textEls[i].setWidth(width)}}else{me.done=!1}}})
;
Ext.define('Ext.ProgressBar',{extend:'Ext.Component',xtype:'progressbar',mixins:['Ext.ProgressBase'],requires:['Ext.Template','Ext.CompositeElement','Ext.TaskManager','Ext.layout.component.ProgressBar'],uses:['Ext.fx.Anim'],baseCls:Ext.baseCSSPrefix+'progress',animate:!1,text:'',waitTimer:null,childEls:['bar'],defaultBindProperty:'value',renderTpl:['<tpl if="internalText">','<div class="{baseCls}-text {baseCls}-text-back" role="presentation">{text}</div>','</tpl>','<div id="{id}-bar" data-ref="bar" class="{baseCls}-bar {baseCls}-bar-{ui}" role="presentation" style="width:{percentage}%">','<tpl if="internalText">','<div class="{baseCls}-text" role="presentation">','<div role="presentation">{text}</div>','</div>','</tpl>','</div>'],componentLayout:'progressbar',ariaRole:'progressbar',focusable:!0,tabIndex:0,autoEl:{'aria-valuemin':'0','aria-valuenow':'0','aria-valuemax':'100'},initRenderData:function(){var me=this,value=me.value||0,data;data=me.callParent();return Ext.apply(data,{internalText:!me.hasOwnProperty('textEl'),text:me.text||Math.round(value*100)+'%',percentage:value*100})},onRender:function(){var me=this;me.callParent(arguments);if(me.textEl){me.textEl=Ext.get(me.textEl);me.updateText(me.text)}else{me.textEl=me.el.select('.'+me.baseCls+'-text')}},afterRender:function(){var me=this;me.callParent(arguments);if(me.text){me.ariaEl.dom.setAttribute('aria-valuetext',me.text)}},updateValue:function(value){this.updateProgress(value)},updateProgress:function(value,text,animate){var me=this,oldValue=me.value,textTpl=me.getTextTpl();value=value||0;me.value=value||(value=0);if(text!=null){me.autoText=!1;me.updateText(text)}else if(textTpl){me.autoText=!1;me.updateText(textTpl.apply({value:value,percent:value*100}))}else if(!me.text&&me.autoText!==!1){me.autoText=!0;me.updateText(Math.round(value*100)+'%')}else if(me.text&&me.ariaEl.dom){me.ariaEl.dom.removeAttribute('aria-valuetext')}
if(me.rendered&&!me.destroyed){if(animate===!0||(animate!==!1&&me.animate)){me.bar.stopAnimation();me.bar.animate(Ext.apply({from:{width:(oldValue*100)+'%'},to:{width:(value*100)+'%'}},me.animate))}else{me.bar.setStyle('width',(value*100)+'%')}
me.ariaEl.dom.setAttribute('aria-valuenow',Math.round(value*100))}
me.fireEvent('update',me,value,text);return me},updateText:function(text){var me=this;if(!me.autoText){me.text=text}
if(me.rendered){me.textEl.setHtml(text);if(!me.autoText){me.ariaEl.dom.setAttribute('aria-valuetext',text)}else{me.ariaEl.dom.removeAttribute('aria-valuetext')}}
return me},applyText:function(text){this.updateText(text)},getText:function(){return this.text},wait:function(config){var me=this,scope;if(!me.waitTimer){scope=me;config=config||{};if(config.text!=null){me.autoText=!1}
me.updateText(config.text);me.waitTimer=Ext.TaskManager.start({run:function(i){var inc=config.increment||10;i-=1;me.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01,null,config.animate)},interval:config.interval||1000,duration:config.duration,onStop:function(){if(config.fn){config.fn.apply(config.scope||me)}
me.reset()},scope:scope})}
return me},isWaiting:function(){return this.waitTimer!==null},reset:function(hide){var me=this;me.updateProgress(0);me.clearTimer();if(hide===!0){me.hide()}
if(me.rendered){me.ariaEl.dom.removeAttribute('aria-valuetext')}
return me},clearTimer:function(){var me=this;if(me.waitTimer){me.waitTimer.onStop=null;Ext.TaskManager.stop(me.waitTimer);me.waitTimer=null}},doDestroy:function(){var me=this,bar=me.bar,nodes,el,i,len;me.clearTimer();if(me.rendered){if(me.textEl.isComposite){nodes=me.textEl.slice();for(i=0,len=nodes.length;i<len;i++){el=Ext.get(nodes[i]);el.destroy()}}
Ext.destroyMembers(me,'textEl','progressBar');if(bar&&me.animate){bar.stopAnimation()}}
me.callParent()}})
;
Ext.define('Ext.dom.ButtonElement',{extend:'Ext.dom.Element',setSize:function(width,height,animate){var me=this,component=me.component;me.callParent([width,height,animate]);component.btnWrap.setStyle('table-layout',(!width||width==='auto')?'':'fixed');component.btnEl.setStyle('height',(!height||height==='auto')?'':'auto');return me},setStyle:function(prop,value){var me=this,component=me.component,width,height;me.callParent([prop,value]);if(prop){if(prop==='width'||(typeof prop!=='string'&&'width' in prop)){width=value||prop.width;component.btnWrap.setStyle('table-layout',(!width||width==='auto')?'':'fixed')}
if(prop==='height'||(typeof prop!=='string'&&'height' in prop)){height=value||prop.height;component.btnEl.setStyle('height',(!height||height==='auto')?'':'auto')}}
return me},setHeight:function(height,animate){this.callParent([height,animate]);this.component.btnEl.setStyle('height',(!height||height==='auto')?'':'auto');return this},setWidth:function(width,animate){this.callParent([width,animate]);this.component.btnWrap.setStyle('table-layout',(!width||width==='auto')?'':'fixed');return this}})
;
Ext.define('Ext.button.Manager',{singleton:!0,alternateClassName:'Ext.ButtonToggleManager',groups:{},pressedButton:null,init:function(){var me=this;if(!me.initialized){Ext.getDoc().on({mouseup:me.onDocumentMouseUp,scope:me});me.initialized=!0}},onButtonMousedown:function(button,e){var pressed=this.pressedButton;if(pressed&&!pressed.destroying&&!pressed.destroyed){pressed.onMouseUp(e)}
this.pressedButton=button},onDocumentMouseUp:function(e){var pressed=this.pressedButton;if(pressed&&!pressed.destroying&&!pressed.destroyed){pressed.onMouseUp(e);this.pressedButton=null}},toggleGroup:function(btn,state){var g,i,length;if(state){g=this.groups[btn.toggleGroup];for(i=0,length=g.length;i<length;i++){if(g[i]!==btn){g[i].toggle(!1)}}}},register:function(btn){var me=this,groups=this.groups,group=groups[btn.toggleGroup];me.init();if(!btn.toggleGroup){return}
if(!group){group=groups[btn.toggleGroup]=[]}
group.push(btn);btn.on('toggle',me.toggleGroup,me)},unregister:function(btn){if(!btn.toggleGroup){return}
var me=this,group=me.groups[btn.toggleGroup];if(group){Ext.Array.remove(group,btn);btn.un('toggle',me.toggleGroup,me)}},getPressed:function(groupName){var group=this.groups[groupName],i=0,len;if(group){for(len=group.length;i<len;i++){if(group[i].pressed===!0){return group[i]}}}
return null}})
;
Ext.define('Ext.menu.Manager',{singleton:!0,alternateClassName:'Ext.menu.MenuMgr',uses:['Ext.menu.Menu'],groups:{},visible:[],constructor:function(){var me=this;me.onShow=function(){me.registerGlobalListeners();return me.onShow.apply(me,arguments)}},onGlobalScroll:function(scroller){var allMenus=this.visible,len=allMenus.length,i,menu,scrollerEl=scroller.getElement();if(len&&scroller!==Ext.scroll.Scroller.viewport){allMenus=allMenus.slice();for(i=0;i<len;++i){menu=allMenus[i];if(!menu.alignOnScroll&&menu.hideOnScroll!==!1&&!menu.owns(scrollerEl)){menu.hide()}}}},checkActiveMenus:function(e){var allMenus=this.visible,len=allMenus.length,i,menu,mousedownCmp=Ext.Component.from(e);if(len){allMenus=allMenus.slice();for(i=0;i<len;++i){menu=allMenus[i];if(!(menu.owns(e)||(mousedownCmp&&mousedownCmp.isMenuItem&&mousedownCmp.getMenu()===menu))){menu.hide()}}}},onShow:function(menu){if(menu.floating){Ext.Array.include(this.visible,menu)}},onHide:function(menu){if(menu.floating){Ext.Array.remove(this.visible,menu)}},hideAll:function(){var allMenus=this.visible,len=allMenus.length,result=!1,i;if(len){allMenus=allMenus.slice();for(i=0;i<len;i++){allMenus[i].hide();result=!0}}
return result},get:function(menu,config){var result;if(typeof menu==='string'){result=Ext.getCmp(menu);if(result instanceof Ext.menu.Menu){menu=result}}else if(Ext.isArray(menu)){config=Ext.apply({items:menu},config);menu=new Ext.menu.Menu(config)}else if(!menu.isComponent){config=Ext.apply({},menu,config);menu=Ext.ComponentManager.create(config,'menu')}
return menu},registerCheckable:function(menuItem){var groups=this.groups,groupId=menuItem.group;if(groupId){if(!groups[groupId]){groups[groupId]=[]}
groups[groupId].push(menuItem)}},unregisterCheckable:function(menuItem){var groups=this.groups,groupId=menuItem.group;if(groupId){Ext.Array.remove(groups[groupId],menuItem)}},onCheckChange:function(menuItem,state){var groups=this.groups,groupId=menuItem.group,i=0,group,ln,curr;if(groupId&&state){group=groups[groupId];ln=group.length;for(;i<ln;i++){curr=group[i];if(curr!==menuItem){curr.setChecked(!1)}}}},registerGlobalListeners:function(){var me=this;delete me.onShow;Ext.on({mousedown:me.checkActiveMenus,scroll:me.onGlobalScroll,scope:me})}})
;
Ext.define('Ext.button.Button',{alias:'widget.button',extend:'Ext.Component',requires:['Ext.dom.ButtonElement','Ext.button.Manager','Ext.menu.Manager','Ext.util.ClickRepeater','Ext.util.TextMetrics','Ext.Glyph'],mixins:['Ext.mixin.Queryable'],alternateClassName:'Ext.Button',config:{iconAlign:'left',text:null,textAlign:'center',arrowVisible:!0,glyph:null},isButton:!0,_syncFrameHeight:!0,liquidLayout:!0,hidden:!1,disabled:!1,pressed:!1,tabIndex:0,enableToggle:!1,menuAlign:'tl-bl?',showEmptyMenu:!1,clickEvent:'click',preventDefault:!0,handleMouseEvents:!0,tooltipType:'qtip',baseCls:Ext.baseCSSPrefix+'btn',hrefTarget:'_blank',destroyMenu:!0,focusable:!0,ariaRole:'button',keyMap:{scope:'this',SPACE:'onEnterKey',ENTER:'onEnterKey',DOWN:'onDownKey'},defaultBindProperty:'text',childEls:['btnEl','btnWrap','btnInnerEl','btnIconEl','arrowEl'],publishes:{pressed:1},_btnWrapCls:Ext.baseCSSPrefix+'btn-wrap',_btnCls:Ext.baseCSSPrefix+'btn-button',_baseIconCls:Ext.baseCSSPrefix+'btn-icon-el',_glyphCls:Ext.baseCSSPrefix+'btn-glyph',_innerCls:Ext.baseCSSPrefix+'btn-inner',_textCls:Ext.baseCSSPrefix+'btn-text',_noTextCls:Ext.baseCSSPrefix+'btn-no-text',_hasIconCls:Ext.baseCSSPrefix+'btn-icon',_pressedCls:Ext.baseCSSPrefix+'btn-pressed',overCls:Ext.baseCSSPrefix+'btn-over',_disabledCls:Ext.baseCSSPrefix+'btn-disabled',_menuActiveCls:Ext.baseCSSPrefix+'btn-menu-active',_arrowElCls:Ext.baseCSSPrefix+'btn-arrow-el',_focusCls:Ext.baseCSSPrefix+'btn-focus',_arrowFocusCls:Ext.baseCSSPrefix+'arrow-focus',_arrowOverCls:Ext.baseCSSPrefix+'arrow-over',_arrowPressedCls:Ext.baseCSSPrefix+'arrow-pressed',renderTpl:'<span id="{id}-btnWrap" data-ref="btnWrap" role="presentation" unselectable="on" style="{btnWrapStyle}" '+'class="{btnWrapCls} {btnWrapCls}-{ui} {splitCls}{childElCls}">'+'<span id="{id}-btnEl" data-ref="btnEl" role="presentation" unselectable="on" style="{btnElStyle}" '+'class="{btnCls} {btnCls}-{ui} {textCls} {noTextCls} {hasIconCls} '+'{iconAlignCls} {textAlignCls} {btnElAutoHeightCls}{childElCls}">'+'<tpl if="iconBeforeText">{[values.$comp.renderIcon(values)]}</tpl>'+'<span id="{id}-btnInnerEl" data-ref="btnInnerEl" unselectable="on" '+'class="{innerCls} {innerCls}-{ui}{childElCls}">{text}</span>'+'<tpl if="!iconBeforeText">{[values.$comp.renderIcon(values)]}</tpl>'+'</span>'+'</span>'+'{[values.$comp.getAfterMarkup ? values.$comp.getAfterMarkup(values) : ""]}'+'<tpl if="closable">'+'<span id="{id}-closeEl" data-ref="closeEl" class="{baseCls}-close-btn">'+'<tpl if="closeText">'+' {closeText}'+'</tpl>'+'</span>'+'</tpl>'+'<tpl if="split">'+'<span id="{id}-arrowEl" class="{arrowElCls}" data-ref="arrowEl" '+'role="button" hidefocus="on" unselectable="on"'+'<tpl if="tabIndex != null"> tabindex="{tabIndex}"</tpl>'+'<tpl foreach="arrowElAttributes"> {$}="{.}"</tpl>'+' style="{arrowElStyle}"'+'>{arrowElText}</span>'+'</tpl>',iconTpl:'<span id="{id}-btnIconEl" data-ref="btnIconEl" role="presentation" unselectable="on" class="{baseIconCls} '+'{baseIconCls}-{ui} {iconCls} {glyphCls}{childElCls}" style="'+'<tpl if="iconUrl">background-image:url({iconUrl});</tpl>'+'<tpl if="glyph">'+'<tpl if="glyphFontFamily">'+'font-family:{glyphFontFamily};'+'</tpl>'+'">{glyph}'+'<tpl else>'+'">'+'</tpl>'+'</span>',scale:'small',allowedScales:['small','medium','large'],arrowAlign:'right',arrowCls:'arrow',maskOnDisable:!1,shrinkWrap:3,frame:!0,autoEl:{tag:'a',hidefocus:'on',unselectable:'on'},hasFrameTable:function(){return this.href&&this.frameTable},frameTableListener:function(){if(!this.disabled){this.doNavigate()}},doNavigate:function(){if(this.hrefTarget==='_blank'){window.open(this.getHref(),this.hrefTarget)}else{location.href=this.getHref()}},_triggerRegion:{},initComponent:function(){var me=this;if(!me.isSplitButton&&me.menu){if(me.enableToggle||me.toggleGroup){Ext.ariaWarn(me,"According to WAI-ARIA 1.0 Authoring guide "+"(http://www.w3.org/TR/wai-aria-practices/#menubutton), "+"menu button '"+me.id+"' behavior will conflict with "+"toggling.")}
if(me.href){Ext.ariaWarn(me,"According to WAI-ARIA 1.0 Authoring guide "+"(http://www.w3.org/TR/wai-aria-practices/#menubutton), "+"menu button '"+me.id+"' cannot behave as a link.")}
if(me.handler||me.hasListeners.hasOwnProperty('click')){Ext.ariaWarn(me,"According to WAI-ARIA 1.0 Authoring guide "+"(http://www.w3.org/TR/wai-aria-practices/#menubutton), "+"menu button '"+me.id+"' should display the menu "+"on SPACE and ENTER keys, which will conflict with the "+"button handler.")}}
me.addCls(Ext.baseCSSPrefix+'unselectable');me.callParent();if(me.menu){me.split=!0;me.setMenu(me.menu,!1,!0)}
if(me.url){me.href=me.url}
me.configuredWithPreventDefault=me.hasOwnProperty('preventDefault');if(me.href&&!me.configuredWithPreventDefault){me.preventDefault=!1}
if(Ext.isString(me.toggleGroup)&&me.toggleGroup!==''){me.enableToggle=!0}
if(me.html&&!me.text){me.text=me.html;delete me.html}},getElConfig:function(){var me=this,config=me.callParent(),href=me.getHref(),hrefTarget=me.hrefTarget;if(config.tag==='a'){if(!me.disabled){config.tabIndex=me.tabIndex}
if(href){if(!me.disabled){config.href=href;if(hrefTarget){config.target=hrefTarget}}}}
if(!me.ariaStaticRoles[me.ariaRole]){if(me.menu&&!me.isSplitButton){config['aria-haspopup']=!0}
if(me.enableToggle){config['aria-pressed']=!!me.pressed}}
return config},beforeRender:function(){this.callParent();if(this.pressed){this.addCls(this._pressedCls)}},initRenderData:function(){return Ext.apply(this.callParent(),this.getTemplateArgs())},getMenu:function(){return this.menu||null},setMenu:function(menu,destroyMenu,initial){var me=this,oldMenu=me.menu,ariaDom=me.isSplitButton?me.arrowEl&&me.arrowEl.dom:me.ariaEl.dom,instanced,ariaAttr;if(oldMenu&&!initial){if(destroyMenu!==!1&&me.destroyMenu){oldMenu.destroy()}
oldMenu.ownerCmp=null}
if(menu){instanced=menu.isMenu;menu=Ext.menu.Manager.get(menu,{ownerCmp:me});menu.setOwnerCmp(me,instanced);menu.menuClickBuffer=250;me.mon(menu,{scope:me,show:me.onMenuShow,hide:me.onMenuHide});if(!oldMenu&&me.getArrowVisible()){me.split=!0;if(me.rendered){me._addSplitCls();me.updateLayout()}}
me.menu=menu;if(ariaDom){ariaDom.setAttribute('aria-haspopup',!0);ariaDom.setAttribute('aria-owns',menu.id)}else{ariaAttr=me.isSplitButton?(me.ariaArrowElAttributes||(me.ariaArrowElAttributes={})):(me.ariaRenderAttributes||(me.ariaRenderAttributes={}));ariaAttr['aria-haspopup']=!0;ariaAttr['aria-owns']=menu.id}}else{if(me.rendered){ariaDom.removeAttribute('aria-haspopup');ariaDom.removeAttribute('aria-owns');me._removeSplitCls();me.updateLayout()}else{ariaAttr=me.isSplitButton?me.ariaArrowElAttributes:me.ariaRenderAttributes;if(ariaAttr){delete ariaAttr['aria-haspopup'];delete ariaAttr['aria-owns']}}
me.split=!1;me.menu=null}},onRender:function(){var me=this,addOnclick,btn,btnListeners;me.callParent(arguments);btn=me.el;if(me.tooltip){me.setTooltip(me.tooltip,!0)}
if(me.handleMouseEvents){btnListeners={scope:me,mouseover:me.onMouseOver,mouseout:me.onMouseOut,mousedown:me.onMouseDown};if(me.split){btnListeners.mousemove=me.onMouseMove}}else{btnListeners={scope:me}}
if(Ext.supports.Touch){btnListeners.touchstart=me.onTouchStart}
if(me.repeat){me.mon(new Ext.util.ClickRepeater(btn,Ext.isObject(me.repeat)?me.repeat:{}),'click',me.onRepeatClick,me)}else{if(btnListeners[me.clickEvent]){addOnclick=!0}else{btnListeners[me.clickEvent]=me.onClick}}
me.mon(btn,btnListeners);if(me.hasFrameTable()){me.mon(me.frameTable,'click',me.frameTableListener,me)}
if(addOnclick){me.mon(btn,me.clickEvent,me.onClick,me)}
Ext.button.Manager.register(me)},onFocusLeave:function(e){this.callParent([e]);if(this.menu){this.menu.hide()}},getTemplateArgs:function(){var me=this,btnCls=me._btnCls,baseIconCls=me._baseIconCls,iconAlign=me.getIconAlign(),glyph=me.glyph,glyphFontFamily,text=me.text,hasIcon=me._hasIcon(),hasIconCls=me._hasIconCls;if(glyph){glyphFontFamily=glyph.fontFamily;glyph=glyph.character}
return{split:me.isSplitButton,innerCls:me._innerCls,splitCls:me.getArrowVisible()?me.getSplitCls():'',iconUrl:me.icon,iconCls:me.iconCls,glyph:glyph,glyphCls:glyph?me._glyphCls:'',glyphFontFamily:glyphFontFamily,text:text||'&#160;',closeText:me.closeText,textCls:text?me._textCls:'',noTextCls:text?'':me._noTextCls,hasIconCls:hasIcon?hasIconCls:'',btnWrapCls:me._btnWrapCls,btnWrapStyle:me.width?'table-layout:fixed;':'',btnElStyle:me.height?'height:auto;':'',btnCls:btnCls,baseIconCls:baseIconCls,iconBeforeText:iconAlign==='left'||iconAlign==='top',iconAlignCls:hasIcon?(hasIconCls+'-'+iconAlign):'',textAlignCls:btnCls+'-'+me.getTextAlign(),arrowElCls:me._arrowElCls,arrowElStyle:me.arrowVisible?'':'display:none',tabIndex:me.tabIndex}},renderIcon:function(values){return this.lookupTpl('iconTpl').apply(values)},setHref:function(href){var me=this,hrefTarget=me.hrefTarget,dom;me.href=href;if(!me.configuredWithPreventDefault){me.preventDefault=!href}
if(me.rendered){dom=me.el.dom;if(!href||me.disabled){dom.removeAttribute('href');dom.removeAttribute('hrefTarget')}else{dom.href=me.getHref();if(hrefTarget){dom.target=hrefTarget}}}},getHref:function(){var me=this,href=me.href;return href?Ext.urlAppend(href,Ext.Object.toQueryString(Ext.apply({},me.params,me.baseParams))):!1},setParams:function(params){var me=this,dom;me.params=params;if(me.rendered){dom=me.el.dom;if(me.disabled){dom.removeAttribute('href')}else{dom.href=me.getHref()||''}}},getSplitCls:function(){var me=this;return me.split?(me.baseCls+'-'+me.arrowCls)+' '+(me.baseCls+'-'+me.arrowCls+'-'+me.arrowAlign):''},setIcon:function(icon){var me=this,btnIconEl=me.btnIconEl,oldIcon=me.icon||'';icon=icon||'';if(me.glyph){me.setGlyph(null)}
me.icon=icon;if(icon!==oldIcon){if(btnIconEl){btnIconEl.removeCls(me.iconCls);btnIconEl.setStyle('background-image',icon?'url('+icon+')':'');me._syncHasIconCls();if(me.didIconStateChange(oldIcon,icon)){me.updateLayout()}}
me.fireEvent('iconchange',me,oldIcon,icon)}
return me},setIconCls:function(cls){var me=this,btnIconEl=me.btnIconEl,oldCls=me.iconCls||'';cls=cls||'';if(me.glyph){me.setGlyph(null)}
me.iconCls=cls;if(oldCls!==cls){if(btnIconEl){btnIconEl.setStyle('background-image','');btnIconEl.removeCls(oldCls);btnIconEl.addCls(cls);me._syncHasIconCls();if(me.didIconStateChange(oldCls,cls)){me.updateLayout()}}
me.fireEvent('iconchange',me,oldCls,cls)}
return me},applyGlyph:function(glyph,oldGlyph){if(glyph){if(!glyph.isGlyph){glyph=new Ext.Glyph(glyph)}
if(glyph.isEqual(oldGlyph)){glyph=undefined}}
return glyph},updateGlyph:function(glyph,oldGlyph){var me=this,btnIconEl=me.btnIconEl,glyphCls=me._glyphCls;if(btnIconEl){me.icon=null;btnIconEl.setStyle('background-image','');if(glyph){btnIconEl.dom.innerHTML=glyph.character;btnIconEl.addCls(glyphCls);btnIconEl.setStyle(glyph.getStyle())}else{btnIconEl.dom.innerHTML='';btnIconEl.removeCls(glyphCls)}
me._syncHasIconCls();if(me.didIconStateChange(oldGlyph,glyph)){me.updateLayout()}}
me.fireEvent('glyphchange',me,glyph&&glyph.glyphConfig,oldGlyph&&oldGlyph.glyphConfig);return me},setTooltip:function(tooltip,initial){var me=this;if(me.rendered){if(!initial||!tooltip){me.clearTip()}
if(tooltip){if(Ext.quickTipsActive&&Ext.isObject(tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:me.el.id},tooltip));me.tooltip=tooltip}else{me.el.dom.setAttribute(me.getTipAttr(),tooltip)}}}else{me.tooltip=tooltip}
return me},updateIconAlign:function(align,oldAlign){var me=this,btnEl,btnIconEl,hasIconCls;if(me.rendered){btnEl=me.btnEl;btnIconEl=me.btnIconEl;hasIconCls=me._hasIconCls;if(oldAlign){btnEl.removeCls(hasIconCls+'-'+oldAlign)}
btnEl.addCls(hasIconCls+'-'+align);if(align==='top'||align==='left'){btnEl.insertFirst(btnIconEl)}else{btnEl.appendChild(btnIconEl)}
me.updateLayout()}},updateTextAlign:function(align,oldAlign){var me=this,btnEl=me.btnEl,btnCls=me._btnCls;if(me.rendered){btnEl.removeCls(btnCls+'-'+oldAlign);btnEl.addCls(btnCls+'-'+align)}},getTipAttr:function(){return this.tooltipType==='qtip'?'data-qtip':'title'},getRefItems:function(deep){var menu=this.menu,items=[];if(menu){if(deep){items=menu.getRefItems(deep)}
items.unshift(menu)}
return items},clearTip:function(){var me=this,el=me.el;if(Ext.quickTipsActive&&Ext.isObject(me.tooltip)){Ext.tip.QuickTipManager.unregister(el)}else{el.dom.removeAttribute(me.getTipAttr())}},doDestroy:function(){var me=this,menu=me.menu;if(me.deferFocusTimer){Ext.undefer(me.deferFocusTimer);me.deferFocusTimer=null}
if(me.rendered){me.clearTip()}
Ext.destroy(me.repeater);if(menu&&me.destroyMenu){me.menu=Ext.destroy(menu)}
Ext.button.Manager.unregister(me);me.callParent()},setHandler:function(handler,scope){this.handler=handler;if(arguments.length>1){this.scope=scope}
return this},updateText:function(text,oldText){var me=this,btnInnerEl=me.btnInnerEl,btnEl=me.btnEl;text=text==null?'':String(text);oldText=oldText||'';if(me.rendered){btnInnerEl.setHtml(text||'&#160;');btnEl[text?'addCls':'removeCls'](me._textCls);btnEl[text?'removeCls':'addCls'](me._noTextCls);me.updateLayout()}
me.fireEvent('textchange',me,oldText,text)},didIconStateChange:function(old,current){var currentEmpty=Ext.isEmpty(current);return Ext.isEmpty(old)?!currentEmpty:currentEmpty},click:function(e){return this.onClick(e)},setPressed:function(pressed){return this.toggle(pressed!==!1)},toggle:function(state,suppressEvent){var me=this,ariaDom=me.ariaEl.dom;if(!me.enableToggle){return me}
state=state===undefined?!me.pressed:!!state;if(me.fireEvent('beforetoggle',me,state)!==!1){if(state!==me.pressed){me[state?'addCls':'removeCls'](me._pressedCls);me.pressed=state;if(ariaDom){ariaDom.setAttribute('aria-pressed',state)}
if(!suppressEvent){me.fireEvent('toggle',me,state);Ext.callback(me.toggleHandler,me.scope,[me,state],0,me);if(me.publishState){me.publishState('pressed',state)}}}}
return me},maybeShowMenu:function(e){if(this.menu){this.showMenu(e)}},showMenu:function(clickEvent){var me=this,menu=me.menu,isPointerEvent=!clickEvent||clickEvent.pointerType;if(menu&&me.rendered){if(me.tooltip&&Ext.quickTipsActive&&me.getTipAttr()!=='title'){Ext.tip.QuickTipManager.getQuickTip().cancelShow(me.el)}
if(menu.isVisible()){if(isPointerEvent){menu.hide()}else{menu.focus()}}else if(!clickEvent||me.showEmptyMenu||menu.items.getCount()>0){menu.autoFocus=!isPointerEvent;menu.showBy(me.el,me.menuAlign)}}
return me},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}
return this},hasVisibleMenu:function(){var menu=this.menu;return menu&&menu.rendered&&menu.isVisible()},onRepeatClick:function(repeat,e){this.onClick(e)},onTouchStart:function(e){if(this.disabled){this.doPreventDefault(e)}},onEnterKey:function(e){if(!this.href){this.onClick(e);e.stopEvent();return!1}},onClick:function(e){var me=this;if(e){me.doPreventDefault(e)}
if(e&&e.type!=='keydown'&&e.button){return}
if(!me.disabled){me.doToggle();me.maybeShowMenu(e);me.fireHandler(e)}},doToggle:function(){var me=this;if(me.allowDepress!==!1||!me.pressed){me.toggle()}},doPreventDefault:function(e){if(e&&(this.preventDefault||(this.disabled&&this.getHref()))){e.preventDefault()}},fireHandler:function(e){var me=this;if(me.fireEvent('click',me,e)!==!1&&!me.destroyed){Ext.callback(me.handler,me.scope,[me,e],0,me)}},onMouseOver:function(e){var me=this;if(!me.disabled&&!e.within(me.el,!0,!0)){me.onMouseEnter(e)}},onMouseOut:function(e){var me=this;if(!e.within(me.el,!0,!0)){if(me.overMenuTrigger){me.onMenuTriggerOut(e)}
me.onMouseLeave(e)}},onMouseMove:function(e){var me=this,over=me.overMenuTrigger;if(me.split){if(me.isWithinTrigger(e)){if(!over){me.onMenuTriggerOver(e)}}else if(over){me.onMenuTriggerOut(e)}}},isWithinTrigger:function(e){var me=this,el=me.el,overPosition,triggerRegion;overPosition=(me.arrowAlign==='right')?e.getX()-me.getX():e.getY()-el.getY();triggerRegion=me.getTriggerRegion();return overPosition>triggerRegion.begin&&overPosition<triggerRegion.end},getTriggerRegion:function(){var me=this,region=me._triggerRegion,isRight=me.arrowAlign==='right',getEnd=isRight?'getRight':'getBottom',btnSize=isRight?me.getWidth():me.getHeight();region.begin=btnSize-(me.el[getEnd]()-me.btnEl[getEnd]());region.end=btnSize;return region},onMouseEnter:function(e){this.fireEvent('mouseover',this,e)},onMouseLeave:function(e){this.fireEvent('mouseout',this,e)},onMenuTriggerOver:function(e){var me=this,arrowTip=me.arrowTooltip;me.overMenuTrigger=!0;if(me.split&&arrowTip){me.btnWrap.dom.setAttribute(me.getTipAttr(),arrowTip)}
me.fireEvent('menutriggerover',me,me.menu,e)},onMenuTriggerOut:function(e){var me=this;delete me.overMenuTrigger;if(me.split&&me.arrowTooltip){me.btnWrap.dom.setAttribute(me.getTipAttr(),'')}
me.fireEvent('menutriggerout',me,me.menu,e)},onEnable:function(){var me=this,href=me.href,hrefTarget=me.hrefTarget,dom=me.el.dom;me.callParent();me.removeCls(me._disabledCls);me.el.setTabIndex(me.tabIndex);if(href){dom.href=href}
if(hrefTarget){dom.target=hrefTarget}},onDisable:function(){var me=this,dom=me.el.dom;me.callParent();me.addCls(me._disabledCls);me.removeCls(me.overCls);me.el.setTabIndex(null);if(me.href){dom.removeAttribute('href')}
if(me.hrefTarget){dom.removeAttribute('target')}},setScale:function(scale){var me=this,ui=me.ui.replace('-'+me.scale,'');if(!Ext.Array.contains(me.allowedScales,scale)){throw new Error('#setScale: scale must be an allowed scale ('+me.allowedScales.join(', ')+')')}
me.scale=scale;me.setUI(ui)},setUI:function(ui){var me=this;if(me.scale&&!ui.match(me.scale)){ui=ui+'-'+me.scale}
me.callParent([ui])},onMouseDown:function(e){var me=this,activeEl;if(Ext.isIE||Ext.isEdge||e.pointerType==='touch'){if(me.deferFocusTimer){Ext.undefer(me.deferFocusTimer)}
activeEl=Ext.Element.getActiveElement();me.deferFocusTimer=Ext.defer(function(){var focusEl;me.deferFocusTimer=null;if(me.destroying||me.destroyed||(Ext.Element.getActiveElement()!==activeEl)||!me.canFocus()){return}
focusEl=me.getFocusEl();if(focusEl&&!e.defaultPrevented){focusEl.focus()}},1)}
if(!me.disabled&&e.button===0){Ext.button.Manager.onButtonMousedown(me,e);me.removeCls(me._arrowPressedCls);me.addCls(me._pressedCls)}},onMouseUp:function(e){var me=this;if(!me.destroyed&&e.button===0){if(!me.pressed){me.removeCls(me._pressedCls)}}},onMenuShow:function(){var me=this;me.addCls(me._menuActiveCls);me.fireEvent('menushow',me,me.menu)},onMenuHide:function(e){var me=this;me.removeCls(me._menuActiveCls);me.fireEvent('menuhide',me,me.menu)},onDownKey:function(e){var me=this;if(me.menu&&!me.disabled){me.showMenu(e);e.stopEvent();return!1}},updateArrowVisible:function(visible){var me=this;if(me.rendered){if(visible){if(me.menu||me.isSplitButton){me.split=!0;me._addSplitCls()}}else{me._removeSplitCls();me.split=!1}}
return visible},privates:{elClsMap:{'btnWrap':'_btnWrapCls','btnEl':'_btnCls','btnIconEl':'_baseIconCls','btnInnerEl':'_innerCls'},addUIToElement:function(){this.callParent();this.updateChildElsUICls(!0)},addOverCls:function(){if(!this.disabled){this.addCls(this.overCls)}},_addSplitCls:function(){var me=this;me.btnWrap.addCls(me.getSplitCls())},getTdCls:function(){return Ext.baseCSSPrefix+'button-'+this.ui+'-'+this.scale+'-cell'},getValue:function(){return this.value},removeUIFromElement:function(){this.callParent();this.updateChildElsUICls(!1)},removeOverCls:function(){this.removeCls(this.overCls)},_removeSplitCls:function(){var me=this;me.btnWrap.removeCls(me.getSplitCls())},_syncHasIconCls:function(){var me=this,btnEl=me.btnEl,hasIconCls=me._hasIconCls;if(btnEl){btnEl[me._hasIcon()?'addCls':'removeCls']([hasIconCls,hasIconCls+'-'+me.iconAlign])}},_hasIcon:function(){return!!(this.icon||this.iconCls||this.glyph)},updateChildElsUICls:function(add){var me=this,ui=me.ui,state=add?'addCls':'removeCls',elClsMap=me.elClsMap,key,el,mapCls,cls;for(key in elClsMap){el=me[key];mapCls=elClsMap[key];cls=me[mapCls];if(el&&cls){el[state](cls+'-'+ui)}}},wrapPrimaryEl:function(dom){this.el=new Ext.dom.ButtonElement(dom);this.callParent([dom])}}})
;
Ext.define('Ext.rtl.button.Button',{override:'Ext.button.Button',getTriggerRegion:function(){var me=this,region=me._triggerRegion;if(!Ext.rootInheritedState.rtl!==!this.getInherited().rtl&&me.arrowAlign==='right'){region.begin=0;region.end=me.btnEl.getX()-me.el.getX()}else{region=me.callParent()}
return region}})
;
Ext.define('Ext.button.Split',{extend:'Ext.button.Button',alternateClassName:'Ext.SplitButton',alias:'widget.splitbutton',isSplitButton:!0,separateArrowStyling:!1,arrowCls:'split',split:!0,componentCls:Ext.baseCSSPrefix+'split-button',initComponent:function(){var me=this;if(me.menu&&(me.arrowHandler||me.hasListeners.hasOwnProperty('arrowclick'))){Ext.ariaWarn(me,"Using both menu and arrowHandler config options in Split buttons "+"leads to confusing user experience and conflicts with accessibility "+"best practices. See WAI-ARIA 1.0 Authoring guide: "+"http://www.w3.org/TR/wai-aria-practices/#menubutton")}
me.callParent()},getTemplateArgs:function(){var me=this,ariaAttr,data;data=me.callParent();if(me.disabled){data.tabIndex=null}
ariaAttr=me.ariaArrowElAttributes||{};ariaAttr['aria-hidden']=!!me.hidden;ariaAttr['aria-disabled']=!!me.disabled;if(me.arrowTooltip){ariaAttr['aria-label']=me.arrowTooltip}else{ariaAttr['aria-labelledby']=me.id}
data.arrowElAttributes=ariaAttr;return data},onRender:function(){var me=this,el;me.callParent();el=me.getFocusEl();if(el){el.on({scope:me,focus:me.onMainElFocus,blur:me.onMainElBlur})}
el=me.arrowEl;if(el){el.dom.setAttribute('data-componentid',me.id);el.setVisibilityMode(Ext.dom.Element.DISPLAY);el.on({scope:me,focus:me.onArrowElFocus,blur:me.onArrowElBlur})}},setArrowHandler:function(handler,scope){this.arrowHandler=handler;this.scope=scope},onMouseDown:function(e){var me=this;if(me.separateArrowStyling&&!me.disabled&&e.button===0&&me.isWithinTrigger(e)){e.preventDefault();me.arrowEl.focus();Ext.button.Manager.onButtonMousedown(me,e);me.addCls(me._arrowPressedCls)}else{me.callParent([e])}},onMouseUp:function(e){var me=this;if(me.separateArrowStyling&&!me.destroyed&&e.button===0&&me.isWithinTrigger(e)){me.removeCls(me._arrowPressedCls)}else{me.callParent([e])}},onMenuTriggerOver:function(e){var me=this;if(me.separateArrowStyling&&!me.disabled){me.addCls(me._arrowOverCls)}
me.callParent([e])},onMenuTriggerOut:function(e){var me=this;if(me.separateArrowStyling&&!me.disabled){me.removeCls(me._arrowOverCls)}
me.callParent([e])},onClick:function(e){var me=this,arrowKeydown=e.type==='keydown'&&e.target===me.arrowEl.dom;me.doPreventDefault(e);if(!me.disabled){if(arrowKeydown||me.isWithinTrigger(e)){e.preventDefault();me.maybeShowMenu(e);me.fireEvent("arrowclick",me,e);if(me.arrowHandler){me.arrowHandler.call(me.scope||me,me,e)}}else{me.doToggle();me.fireHandler(e)}}},enable:function(silent){var me=this,arrowEl=me.arrowEl;me.callParent([silent]);if(arrowEl){arrowEl.dom.setAttribute('tabIndex',me.tabIndex);arrowEl.dom.setAttribute('aria-disabled','false')}},disable:function(silent){var me=this,arrowEl=me.arrowEl;me.callParent([silent]);if(arrowEl){arrowEl.dom.removeAttribute('tabIndex');arrowEl.dom.setAttribute('aria-disabled','true')}},afterHide:function(cb,scope){this.callParent([cb,scope]);this.arrowEl.dom.setAttribute('aria-hidden','true')},afterShow:function(animateTarget,cb,scope){this.callParent([animateTarget,cb,scope]);this.arrowEl.dom.setAttribute('aria-hidden','false')},privates:{isFocusing:function(e){var me=this,from=e.fromElement,to=e.toElement,focusEl=me.focusEl&&me.focusEl.dom,arrowEl=me.arrowEl&&me.arrowEl.dom;if(me.focusable){if(to===focusEl){return from===arrowEl?!1:!0}else if(to===arrowEl){return from===focusEl?!1:!0}
return!0}
return!1},isBlurring:function(e){var me=this,from=e.fromElement,to=e.toElement,focusEl=me.focusEl&&me.focusEl.dom,arrowEl=me.arrowEl&&me.arrowEl.dom;if(me.focusable){if(from===focusEl){return to===arrowEl?!1:!0}else if(from===arrowEl){return to===focusEl?!1:!0}
return!0}
return!1},getFocusClsEl:Ext.privateFn,onMainElFocus:function(e){this.el.addCls(this._focusCls)},onMainElBlur:function(e){this.el.removeCls(this._focusCls)},onArrowElFocus:function(e){this.el.addCls(this._arrowFocusCls)},onArrowElBlur:function(){this.el.removeCls(this._arrowFocusCls)},setTabIndex:function(newTabIndex){this.callParent([newTabIndex]);if(this.arrowEl){this.arrowEl.set({tabIndex:newTabIndex})}},_addSplitCls:function(){var arrowEl=this.arrowEl;this.callParent();arrowEl.dom.setAttribute('tabIndex',this.tabIndex);arrowEl.setVisible(!0)},_removeSplitCls:function(){var arrowEl=this.arrowEl;this.callParent();arrowEl.dom.removeAttribute('tabIndex');arrowEl.setVisible(!1)}}})
;
Ext.define('Ext.button.Cycle',{extend:'Ext.button.Split',alternateClassName:'Ext.CycleButton',alias:'widget.cycle',getButtonText:function(item){var me=this,text='';if(item&&me.showText===!0){if(me.prependText){text+=me.prependText}
text+=item.text;return text}
return me.text},setActiveItem:function(item,suppressEvent){var me=this,changeHandler=me.changeHandler,forceIcon=me.forceIcon,forceGlyph=me.forceGlyph;me.settingActive=!0;if(!Ext.isObject(item)){item=me.menu.getComponent(item)}
if(item){me.setText(me.getButtonText(item));me.setIconCls(forceIcon?forceIcon:item.iconCls);me.setGlyph(forceGlyph?forceGlyph:item.glyph);me.activeItem=item;if(!item.checked){item.setChecked(!0,!1)}
if(!suppressEvent){if(changeHandler){Ext.callback(changeHandler,me.scope,[me,item],0,me)}
me.fireEvent('change',me,item)}}
me.settingActive=!1},getActiveItem:function(){return this.activeItem},initComponent:function(){var me=this,checked=0,items,i,iLen,item;Ext.ariaWarn(me,"Using Cycle buttons is not recommended in accessible "+"applications, because their behavior conflicts "+"with accessibility best practices. See WAI-ARIA 1.0 "+"Authoring guide: http://www.w3.org/TR/wai-aria-practices/#menubutton");items=(me.menu.items||[]).concat(me.items||[]);me.menu=Ext.applyIf({cls:Ext.baseCSSPrefix+'cycle-menu',items:[]},me.menu);iLen=items.length;for(i=0;i<iLen;i++){item=items[i];item=Ext.applyIf({group:me.id,itemIndex:i,checkHandler:me.checkHandler,scope:me,checked:item.checked||!1},item);me.menu.items.push(item);if(item.checked){checked=i}}
me.itemCount=me.menu.items.length;me.callParent(arguments);me.on('click',me.toggleSelected,me);me.setActiveItem(checked,!0)},checkHandler:function(item,pressed){if(pressed&&!this.settingActive){this.setActiveItem(item)}},toggleSelected:function(){var me=this,m=me.menu,checkItem;checkItem=me.activeItem.next(':not([disabled])')||m.items.getAt(0);checkItem.setChecked(!0)}})
;
Ext.define('Ext.layout.container.SegmentedButton',{extend:'Ext.layout.container.Container',alias:'layout.segmentedbutton',needsItemSize:!1,setsItemSize:!1,_btnRowCls:Ext.baseCSSPrefix+'segmented-button-row',getRenderTree:function(){var me=this,result=me.callParent(),i,ln;if(me.owner.getVertical()){for(i=0,ln=result.length;i<ln;i++){result[i]={cls:me._btnRowCls,cn:result[i]}}}
return result},getItemLayoutEl:function(item){var dom=item.el.dom;return this.owner.getVertical()?dom.parentNode:dom},onDestroy:function(){var targetEl,row;if(this.owner.rendered){targetEl=this.getRenderTarget();while((row=targetEl.last())){row.destroy()}}}})
;
Ext.define('Ext.button.Segmented',{extend:'Ext.container.Container',xtype:'segmentedbutton',requires:['Ext.button.Button','Ext.layout.container.SegmentedButton'],config:{allowDepress:!1,allowMultiple:!1,forceSelection:!1,allowToggle:!0,vertical:!1,defaultUI:'default'},beforeRenderConfig:{value:undefined},defaultBindProperty:'value',publishes:['value'],twoWayBindable:['value'],layout:'segmentedbutton',defaultType:'button',maskOnDisable:!1,isSegmentedButton:!0,baseCls:Ext.baseCSSPrefix+'segmented-button',itemCls:Ext.baseCSSPrefix+'segmented-button-item',_firstCls:Ext.baseCSSPrefix+'segmented-button-first',_lastCls:Ext.baseCSSPrefix+'segmented-button-last',_middleCls:Ext.baseCSSPrefix+'segmented-button-middle',applyValue:function(value,oldValue){var me=this,allowMultiple=me.getAllowMultiple(),buttonValue,button,values,oldValues,items,i,ln,hasPressed;values=(value instanceof Array)?value:(value==null)?[]:[value];oldValues=(oldValue instanceof Array)?oldValue:(oldValue==null)?[]:[oldValue];me._isApplyingValue=!0;if(!me.rendered){items=me.items.items;for(i=items.length-1;i>=0;i--){button=items[i];if(me.forceSelection&&!i&&!hasPressed){button.pressed=!0}
if(button.pressed){hasPressed=!0;buttonValue=button.value;if(buttonValue==null){buttonValue=me.items.indexOf(button)}
if(!Ext.Array.contains(values,buttonValue)){values.unshift(buttonValue)}}}}
ln=values.length;if(ln>1&&!allowMultiple){Ext.raise('Cannot set multiple values when allowMultiple is false')}
for(i=0;i<ln;i++){value=values[i];button=me._lookupButtonByValue(value);if(button){buttonValue=button.value;if((buttonValue!=null)&&buttonValue!==value){values[i]=buttonValue}
if(!button.pressed){button.setPressed(!0)}}else{Ext.raise("Invalid value '"+value+"' for segmented button: '"+me.id+"'")}}
value=allowMultiple?values:ln?values[0]:null;for(i=0,ln=oldValues.length;i<ln;i++){oldValue=oldValues[i];if(!Ext.Array.contains(values,oldValue)){me._lookupButtonByValue(oldValue).setPressed(!1)}}
me._isApplyingValue=!1;return value},updateValue:function(value,oldValue){var me=this,same;if(me.hasListeners.change){if(value&&oldValue&&me.getAllowMultiple()){same=Ext.Array.equals(value,oldValue)}
if(!same){me.fireEvent('change',me,value,oldValue)}}},beforeRender:function(){var me=this;me.addCls(me.baseCls+me._getClsSuffix());me._syncItemClasses(!0);me.callParent()},onAdd:function(item){var me=this,syncItemClasses='_syncItemClasses';var items=me.items.items,ln=items.length,i=0,value,defaultUI;if(item.ui==='default'&&!item.hasOwnProperty('ui')){defaultUI=me.getDefaultUI();if(defaultUI!=='default'){item.ui=defaultUI}}
for(;i<ln;i++){if(items[i]!==item){value=items[i].value;if(value!=null&&value===item.value){Ext.raise("Segmented button '"+me.id+"' cannot contain multiple items with value: '"+value+"'")}}}
me.mon(item,{hide:syncItemClasses,show:syncItemClasses,beforetoggle:'_onBeforeItemToggle',toggle:'_onItemToggle',scope:me});if(me.getAllowToggle()){item.enableToggle=!0;if(!me.getAllowMultiple()){item.toggleGroup=me.getId();item.allowDepress=me.getAllowDepress()}}
item.addCls(me.itemCls+me._getClsSuffix());me._syncItemClasses();me.callParent([item])},onRemove:function(item){var me=this;item.removeCls(me.itemCls+me._getClsSuffix());me._syncItemClasses();me.callParent([item])},beforeLayout:function(){if(Ext.isChrome){this.el.dom.offsetWidth}
this.callParent()},updateDefaultUI:function(defaultUI){var items=this.items,item,i,ln;if(this.rendered){Ext.raise("Changing the ui config of a segmented button after render is not supported.")}else if(items){if(items.items){items=items.items}
for(i=0,ln=items.length;i<ln;i++){item=items[i];if(item.ui==='default'&&defaultUI!=='default'&&!item.hasOwnProperty('ui')){items[i].ui=defaultUI}}}},updateAllowDepress:function(newAllowDepress,oldAllowDepress){if(this.rendered&&(newAllowDepress!==oldAllowDepress)){Ext.raise("Changing the allowDepress config of a segmented button after render "+"is not supported.")}},updateAllowMultiple:function(newAllowMultiple,oldAllowMultiple){if(this.rendered&&(newAllowMultiple!==oldAllowMultiple)){Ext.raise("Changing the allowMultiple config of a segmented button after render "+"is not supported.")}},updateAllowToggle:function(newAllowToggle,oldAllowToggle){if(this.rendered&&(newAllowToggle!==oldAllowToggle)){Ext.raise("Changing the allowToggle config of a segmented button after render "+"is not supported.")}},updateVertical:function(newVertical,oldVertical){if(this.rendered&&(newVertical!==oldVertical)){Ext.raise("Changing the orientation of a segmented button after render "+"is not supported.")}},privates:{_getClsSuffix:function(){return this.getVertical()?'-vertical':'-horizontal'},_getFirstCls:function(){return this._firstCls},_getLastCls:function(){return this._lastCls},_lookupButtonByValue:function(value){var items=this.items.items,ln=items.length,i=0,button=null,buttonValue,btn;for(;i<ln;i++){btn=items[i];buttonValue=btn.value;if((buttonValue!=null)&&buttonValue===value){button=btn;break}}
if(!button&&typeof value==='number'){button=items[value]}
return button},_onBeforeItemToggle:function(button,pressed){if(this.allowMultiple&&this.forceSelection&&!pressed&&this.getValue().length===1){return!1}},_onItemToggle:function(button,pressed){if(this._isApplyingValue){return}
var me=this,Array=Ext.Array,allowMultiple=me.allowMultiple,buttonValue=(button.value!=null)?button.value:me.items.indexOf(button),value=me.getValue(),valueIndex;if(allowMultiple){valueIndex=Array.indexOf(value,buttonValue)}
if(pressed){if(allowMultiple){if(valueIndex===-1){value=Array.slice(value);value.push(buttonValue)}}else{value=buttonValue}}else{if(allowMultiple){if(valueIndex>-1){value=Array.slice(value);value.splice(valueIndex,1)}}else if(value===buttonValue){value=null}}
me.setValue(value);me.fireEvent('toggle',me,button,pressed)},_syncItemClasses:function(force){var me=this,firstCls,middleCls,lastCls,items,ln,visibleItems,item,i;if(!force&&!me.rendered){return}
firstCls=me._getFirstCls();middleCls=me._middleCls;lastCls=me._getLastCls();items=me.items.items;ln=items.length;visibleItems=[];for(i=0;i<ln;i++){item=items[i];if(!item.hidden){visibleItems.push(item)}}
ln=visibleItems.length;for(i=0;i<ln;i++){visibleItems[i].removeCls([firstCls,middleCls,lastCls])}
if(ln>1){visibleItems[0].addCls(firstCls);for(i=1;i<ln-1;i++){visibleItems[i].addCls(middleCls)}
visibleItems[ln-1].addCls(lastCls)}}}})
;
Ext.define('Ext.rtl.button.Segmented',{override:'Ext.button.Segmented',privates:{_getFirstCls:function(){var cls=this._firstCls;if(!this.getVertical()&&this.getInherited().rtl){cls=this._lastCls}
return cls},_getLastCls:function(){var cls=this._lastCls;if(!this.getVertical()&&this.getInherited().rtl){cls=this._firstCls}
return cls}}})
;
Ext.define('Ext.panel.Bar',{extend:'Ext.container.Container',vertical:!1,_verticalSides:{left:1,right:1},initComponent:function(){var me=this,vertical=me.vertical;me.dock=me.dock||(vertical?'left':'top');me.layout=Ext.apply(vertical?{type:'vbox',align:'middle',alignRoundingMethod:'ceil'}:{type:'hbox',align:'middle',alignRoundingMethod:'floor'},me.layout);this.callParent()},onAdded:function(container,pos,instanced){this.initOrientation();this.callParent([container,pos,instanced])},onRemoved:function(destroying){this.removeClsWithUI(this.uiCls);this.callParent([destroying])},beforeRender:function(){var me=this;if(me.forceOrientation||!me.ownerCt){me.initOrientation()}
me.callParent()},setDock:function(dock){var me=this,layout,vertical;if(dock!==me.dock){Ext.suspendLayouts();me.clearOrientation();me.callParent([dock]);me.initOrientation();vertical=me.vertical;layout=me.layout;layout.setVertical(vertical);layout.setAlignRoundingMethod(vertical?'ceil':'floor');Ext.resumeLayouts(!0)}},privates:{clearOrientation:function(){this.removeClsWithUI([this.vertical?'vertical':'horizontal',this.getDockName()])},getDockName:function(){return this.dock},initOrientation:function(){var me=this,dock=me.dock,vertical=(me.vertical=(dock?dock in me._verticalSides:me.vertical));me.addClsWithUI([vertical?'vertical':'horizontal',me.getDockName()])}}})
;
Ext.define('Ext.rtl.panel.Bar',{override:'Ext.panel.Bar',rtlPositions:{top:'top',right:'left',bottom:'bottom',left:'right'},_rtlRotationClasses:{1:Ext.baseCSSPrefix+'title-rotate-left',2:Ext.baseCSSPrefix+'title-rotate-right'},_rtlRotationAngles:{1:270,2:90},onAdded:function(container,pos,instanced){var me=this;if(me.isParentRtl()){me._rotationClasses=me._rtlRotationClasses;me._rotationAngles=me._rtlRotationAngles}
this.callParent([container,pos,instanced])},privates:{getDockName:function(){var me=this,dock=me.dock;return me.isParentRtl()?me.rtlPositions[dock]:dock}}})
;
Ext.define('Ext.panel.Title',{extend:'Ext.Component',xtype:'title',requires:['Ext.Glyph'],isTitle:!0,noWrap:!0,textAlign:'left',iconAlign:'left',rotation:0,text:'&#160;',beforeRenderConfig:{textAlign:null,text:null,glyph:null,icon:null,iconAlign:null,iconCls:null,rotation:null},autoEl:{role:'presentation',unselectable:'on'},textElRole:'presentation',tabIndex:0,childEls:['textEl','iconEl','iconWrapEl'],renderTpl:'<tpl if="iconMarkup && iconBeforeTitle">{iconMarkup}</tpl>'+'<div id="{id}-textEl" data-ref="textEl"'+' class="{textCls} {textCls}-{ui} {itemCls}{childElCls}" unselectable="on"'+'<tpl if="textElRole"> role="{textElRole}"</tpl>'+'>'+'{text}'+'</div>'+'<tpl if="iconMarkup && !iconBeforeTitle">{iconMarkup}</tpl>',iconTpl:'<div id="{id}-iconWrapEl" data-ref="iconWrapEl" role="presentation" '+'class="{iconWrapCls} {iconWrapCls}-{ui} {iconAlignCls} {itemCls}{childElCls}"'+'<tpl if="iconWrapStyle"> style="{iconWrapStyle}"</tpl>>'+'<div id="{id}-iconEl" data-ref="iconEl" role="presentation" unselectable="on" '+'class="{baseIconCls} {baseIconCls}-{ui} {iconCls} {glyphCls}" style="'+'<tpl if="iconUrl">background-image:url({iconUrl});</tpl>'+'<tpl if="glyph && glyphFontFamily">font-family:{glyphFontFamily};</tpl>">'+'<tpl if="glyph">{glyph}</tpl>'+'</div>'+'</div>',_textAlignClasses:{left:Ext.baseCSSPrefix+'title-align-left',center:Ext.baseCSSPrefix+'title-align-center',right:Ext.baseCSSPrefix+'title-align-right'},_iconAlignClasses:{top:Ext.baseCSSPrefix+'title-icon-top',right:Ext.baseCSSPrefix+'title-icon-right',bottom:Ext.baseCSSPrefix+'title-icon-bottom',left:Ext.baseCSSPrefix+'title-icon-left'},_rotationClasses:{0:Ext.baseCSSPrefix+'title-rotate-none',1:Ext.baseCSSPrefix+'title-rotate-right',2:Ext.baseCSSPrefix+'title-rotate-left'},_rotationAngles:{1:90,2:270},baseCls:Ext.baseCSSPrefix+'title',_titleSuffix:'-title',_glyphCls:Ext.baseCSSPrefix+'title-glyph',_iconWrapCls:Ext.baseCSSPrefix+'title-icon-wrap',_baseIconCls:Ext.baseCSSPrefix+'title-icon',_itemCls:Ext.baseCSSPrefix+'title-item',_textCls:Ext.baseCSSPrefix+'title-text',afterComponentLayout:function(){var me=this,rotation=me.getRotation(),lastBox,lastX,el;if(rotation&&!Ext.isIE8){el=me.el;lastBox=me.lastBox;lastX=lastBox.x;el.setStyle(me._getVerticalAdjustDirection(),(lastX+((rotation===1)?lastBox.width:-lastBox.height))+'px')}
this.callParent()},onRender:function(){var me=this,rotation=me.getRotation(),el=me.el;me.callParent();if(rotation){el.setVertical(me._rotationAngles[rotation])}
if(Ext.supports.FixedTableWidthBug){el._needsTableWidthFix=!0}},applyText:function(text){if(!text){text='&#160;'}
return text},beforeRender:function(){var me=this;me.callParent();me.addCls(me._rotationClasses[me.getRotation()]);me.addCls(me._textAlignClasses[me.getTextAlign()])},getIconMarkup:function(){return this.lookupTpl('iconTpl').apply(this.getIconRenderData())},getIconRenderData:function(){var me=this,icon=me.getIcon(),iconCls=me.getIconCls(),glyph=me.getGlyph(),glyphFontFamily,iconAlign=me.getIconAlign();if(glyph){glyphFontFamily=glyph.fontFamily;glyph=glyph.character}
return{id:me.id,ui:me.ui,itemCls:me._itemCls,iconUrl:icon,iconCls:iconCls,iconWrapCls:me._iconWrapCls,baseIconCls:me._baseIconCls,iconAlignCls:me._iconAlignClasses[iconAlign],glyph:glyph,glyphCls:glyph?me._glyphCls:'',glyphFontFamily:glyphFontFamily}},initRenderData:function(){var me=this,iconAlign,renderData;renderData=Ext.apply({text:me.getText(),textElRole:me.textElRole,id:me.id,ui:me.ui,itemCls:me._itemCls,textCls:me._textCls,iconMarkup:null,iconBeforeTitle:null},me.callParent());if(me._hasIcon()){iconAlign=me.getIconAlign();renderData.iconMarkup=me.getIconMarkup();renderData.iconBeforeTitle=(iconAlign==='top'||iconAlign==='left')}
return renderData},onAdded:function(container,pos,instanced){var me=this,suffix=me._titleSuffix,baseCls=container.baseCls;me.addCls([baseCls+suffix,baseCls+suffix+'-'+container.ui]);me.callParent([container,pos,instanced])},applyGlyph:function(glyph,oldGlyph){if(glyph){if(!glyph.isGlyph){glyph=new Ext.Glyph(glyph)}
if(glyph.isEqual(oldGlyph)){glyph=undefined}}
return glyph},updateGlyph:function(glyph,oldGlyph){var me=this,glyphCls=me._glyphCls,iconEl;if(me.rendered){me._syncIconVisibility();iconEl=me.iconEl;if(glyph){iconEl.dom.innerHTML=glyph.character;iconEl.addCls(glyphCls);iconEl.setStyle('font-family',glyph.fontFamily)}else if(oldGlyph!==glyph){iconEl.dom.innerHTML='';iconEl.removeCls(glyphCls)}
if(me._didIconStateChange(oldGlyph,glyph)){me.updateLayout()}}},updateIcon:function(icon,oldIcon){var me=this,iconEl;icon=icon||'';if(me.rendered&&icon!==oldIcon){me._syncIconVisibility();iconEl=me.iconEl;iconEl.setStyle('background-image',icon?'url('+icon+')':'');if(me._didIconStateChange(oldIcon,icon)){me.updateLayout()}}},updateIconAlign:function(align,oldAlign){var me=this,iconWrapEl=me.iconWrapEl,el,iconAlignClasses;if(me.iconWrapEl){el=me.el;iconAlignClasses=me._iconAlignClasses;if(oldAlign){iconWrapEl.removeCls(iconAlignClasses[oldAlign])}
iconWrapEl.addCls(iconAlignClasses[align]);if(align==='top'||align==='left'){el.insertFirst(iconWrapEl)}else{el.appendChild(iconWrapEl)}
me.updateLayout()}},updateIconCls:function(cls,oldCls){var me=this,iconEl;cls=cls||'';if(me.rendered&&oldCls!==cls){me._syncIconVisibility();iconEl=me.iconEl;if(oldCls){iconEl.removeCls(oldCls)}
iconEl.addCls(cls);if(me._didIconStateChange(oldCls,cls)){me.updateLayout()}}},updateRotation:function(rotation,oldRotation){var me=this,el,rotationClasses;if(me.rendered){el=me.el;rotationClasses=me._rotationClasses;me.removeCls(rotationClasses[oldRotation]);me.addCls(rotationClasses[rotation]);el.setHorizontal();if(rotation){el.setVertical(me._rotationAngles[rotation])}
el.setStyle({right:'',left:'',top:'',height:'',width:''});me.lastBox=null;me.updateLayout()}},updateText:function(text){if(this.rendered){this.textEl.setHtml(text);this.updateLayout()}},updateTextAlign:function(align,oldAlign){var me=this,textAlignClasses=me._textAlignClasses;if(me.rendered){if(oldAlign){me.removeCls(textAlignClasses[oldAlign])}
me.addCls(textAlignClasses[align]);me.updateLayout()}},privates:{_getVerticalAdjustDirection:function(){return'left'},_didIconStateChange:function(old,current){var currentEmpty=Ext.isEmpty(current);return Ext.isEmpty(old)?!currentEmpty:currentEmpty},_hasIcon:function(){return!!(this.getIcon()||this.getIconCls()||this.getGlyph())},_syncIconVisibility:function(){var me=this,el=me.el,hasIcon=me._hasIcon(),iconWrapEl=me.iconWrapEl,isBefore,iconAlign;if(hasIcon&&!iconWrapEl){iconAlign=me.iconAlign;isBefore=(iconAlign==='left'||iconAlign==='top');el.dom.insertAdjacentHTML(isBefore?'afterbegin':'beforeend',me.getIconMarkup());iconWrapEl=me.iconWrapEl=el[isBefore?'first':'last']();me.iconEl=iconWrapEl.first()}
if(iconWrapEl){iconWrapEl.setDisplayed(hasIcon)}}}})
;
Ext.define('Ext.rtl.panel.Title',{override:'Ext.panel.Title',getIconRenderData:function(){var me=this,data=me.callParent(),header=me.ownerCt;if(header&&header.isParentRtl()){data.childElCls=' '+me._rtlCls}
return data},privates:{_getVerticalAdjustDirection:function(){var header=this.ownerCt;return(header&&header.isParentRtl())?'right':'left'}}})
;
Ext.define('Ext.panel.Tool',{extend:'Ext.Component',uses:['Ext.tip.QuickTipManager'],xtype:'tool',requires:['Ext.Glyph'],config:{glyph:null},isTool:!0,baseCls:Ext.baseCSSPrefix+'tool',disabledCls:Ext.baseCSSPrefix+'tool-disabled',toolPressedCls:Ext.baseCSSPrefix+'tool-pressed',toolOverCls:Ext.baseCSSPrefix+'tool-over',childEls:['toolEl'],renderTpl:['<div id="{id}-toolEl" data-ref="toolEl" class="{className} {childElCls}" role="presentation"'+'<tpl if="glyph">'+'<tpl if="glyphFontFamily">'+' style="font-family:{glyphFontFamily};">'+'</tpl>'+'{glyph}'+'<tpl else>'+'>'+'</tpl>'+'</div>'],toolOwner:null,tooltipType:'qtip',stopEvent:!0,ariaRole:'button',focusable:!0,tabIndex:0,keyMap:{scope:'this',SPACE:'onClick',ENTER:'onClick'},cacheHeight:!0,cacheWidth:!0,_toolTypes:{close:1,collapse:1,down:1,expand:1,gear:1,help:1,left:1,maximize:1,minimize:1,minus:1,next:1,pin:1,plus:1,prev:1,print:1,refresh:1,restore:1,right:1,save:1,search:1,toggle:1,unpin:1,up:1},initComponent:function(){var me=this;if(me.id&&me._toolTypes[me.id]){Ext.raise('When specifying a tool you should use the type option, '+'the id can conflict now that tool is a Component')}
me.tooltip=me.tooltip||me.qtip;me.callParent()},initRenderData:function(){var me=this,data=me.callParent(),glyph=me.getGlyph(),glyphFontFamily;if(glyph){glyphFontFamily=glyph.fontFamily;glyph=glyph.character}
Ext.applyIf(data,{className:me.calculateClassName(),glyph:glyph,glyphFontFamily:glyphFontFamily});return data},calculateClassName:function(){var me=this,result=me.baseCls+'-tool-el ';if(me.type){result+=me.baseCls+'-img '+me.baseCls+'-'+me.type}else if(me.iconCls){result+=me.iconCls}
return result},afterRender:function(){var me=this,tip;me.callParent();if(me.setTypeAfterRender){me.setTypeAfterRender=!1;me.setType(me.type)}
me.el.on({click:me.onClick,mousedown:me.onMouseDown,mouseover:me.onMouseOver,mouseout:me.onMouseOut,scope:me});tip=me.tooltip;if(tip){me.setTooltip(tip)}},tipAttrs:{qtip:'data-qtip'},setTooltip:function(tooltip,type){var me=this,oldTip=me.tooltip,oldType=me.tooltipType,id=me.id,el=me.el,attr;if(oldTip&&Ext.quickTipsActive&&Ext.isObject(oldTip)){Ext.tip.QuickTipManager.unregister(id)}
me.tooltip=tooltip;if(type){me.tooltipType=type}
if(tooltip){if(Ext.quickTipsActive&&Ext.isObject(tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:id},tooltip))}else if(el){if(type&&oldType&&type!==oldType){attr=me.tipAttrs[oldType]||'title';el.dom.removeAttribute(attr)}
attr=me.tipAttrs[type||oldType]||'title';el.dom.setAttribute(attr,tooltip)}
if(attr!=='title'&&me.ariaRole&&me.ariaRole!=='presentation'){if(el){el.dom.setAttribute('aria-label',tooltip)}else{me.ariaRenderAttributes=me.ariaRenderAttributes||{};me.ariaRenderAttributes['aria-label']=tooltip}}}},setType:function(type){var me=this,updating=me.updating,rendering=me.rendering,oldClassName,clear;if(!updating){oldClassName=me.calculateClassName();if(!rendering){me.updating=clear=!0}
me.setIconCls(null);me.setGlyph(null)}
me.type=type;if(clear){me.updateToolCls(oldClassName);me.updating=!1}else if(rendering){me.setTypeAfterRender=!0}
return me},setIconCls:function(iconCls){var me=this,updating=me.updating,oldClassName,clear;if(!updating){oldClassName=me.calculateClassName();me.updating=clear=!0;me.setType(null);me.setGlyph(null)}
me.iconCls=iconCls;if(clear){me.updateToolCls(oldClassName);me.updating=!1}
return me},doDestroy:function(){var me=this;me.setTooltip(null);delete me.toolOwner;me.callParent()},applyGlyph:function(glyph,oldGlyph){if(glyph){if(!glyph.isGlyph){glyph=new Ext.Glyph(glyph)}
if(glyph.isEqual(oldGlyph)){glyph=undefined}}
return glyph},updateGlyph:function(glyph,oldGlyph){var me=this,toolEl=me.toolEl,updating=me.updating,oldClassName,clear;if(!updating){oldClassName=me.calculateClassName();me.updating=clear=!0;me.setType(null);me.setIconCls(null)}
if(toolEl){if(glyph){toolEl.dom.innerHTML=glyph.character;toolEl.setStyle(glyph.getStyle())}else{toolEl.dom.innerHTML=''}}
if(clear){me.updateToolCls(oldClassName);me.updating=!1}},privates:{onClick:function(e,target){var me=this;if(me.disabled){return!1}
if(e.type!=='keydown'){me.el.removeCls(me.toolPressedCls+' '+me.toolOverCls)}
if(me.stopEvent!==!1){e.stopEvent()}
if(me.handler){Ext.callback(me.handler,me.scope,[e,target,me.ownerCt,me],0,me)}else if(me.callback){Ext.callback(me.callback,me.scope,[me.toolOwner||me.ownerCt,me,e],0,me)}
if(me.destroyed){return}
me.fireEvent('click',me,e,me.toolOwner||me.ownerCt);return!0},onMouseDown:function(e){e.preventDefault();if(this.disabled){return!1}
this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return!1}
this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)},updateToolCls:function(oldCls){var toolEl=this.toolEl;if(toolEl){toolEl.removeCls(oldCls);toolEl.addCls(this.calculateClassName())}}}})
;
Ext.define('Ext.panel.Header',{extend:'Ext.panel.Bar',xtype:'header',requires:['Ext.panel.Title','Ext.panel.Tool'],isHeader:!0,defaultType:'tool',indicateDrag:!1,weight:-1,shrinkWrap:3,focusableContainer:!0,iconAlign:'left',titleAlign:'left',titlePosition:0,titleRotation:'default',autoEl:{role:'presentation'},beforeRenderConfig:{glyph:null,icon:null,iconCls:null,iconAlign:null,title:{$value:{xtype:'title',flex:1},merge:function(newValue,oldValue){if(typeof newValue!=='object'){newValue={text:newValue}}
return Ext.merge(oldValue?Ext.Object.chain(oldValue):{},newValue)}},titleAlign:null,titlePosition:null,titleRotation:null},headerCls:Ext.baseCSSPrefix+'header',initComponent:function(){var me=this,items=me.items,itemPosition=me.itemPosition,cls=[me.headerCls];me.tools=me.tools||[];me.items=items=(items?items.slice():[]);if(itemPosition!==undefined){me._userItems=items.slice();me.items=items=[]}
me.indicateDragCls=me.headerCls+'-draggable';if(me.indicateDrag){cls.push(me.indicateDragCls)}
me.addCls(cls);me.syncNoBorderCls();Ext.Array.push(items,me.tools);me.tools.length=0;me.callParent();me.on({dblclick:me.onDblClick,click:me.onClick,element:'el',scope:me})},addTool:function(tool){var me=this;me.add(Ext.ComponentManager.create(tool,'tool'));me.checkFocusableTools()},afterLayout:function(){var me=this,frameBR,frameTR,frameTL,xPos;if(me.vertical){frameTR=me.frameTR;if(frameTR){frameBR=me.frameBR;frameTL=me.frameTL;xPos=(me.getWidth()-frameTR.getPadding('r')-((frameTL)?frameTL.getPadding('l'):me.el.getBorderWidth('l')))+'px';frameBR.setStyle('background-position-x',xPos);frameTR.setStyle('background-position-x',xPos)}}
this.callParent()},applyTitle:function(title,oldTitle){var me=this,isString,configHasRotation;title=title||'';isString=Ext.isString(title);if(!Ext.isObject(title)){title={text:title.toString()}}
if(oldTitle){Ext.suspendLayouts();oldTitle.setConfig(title);Ext.resumeLayouts(!0);title=oldTitle}else{if(isString){title.xtype='title'}
title.ui=me.ui;configHasRotation=('rotation' in title);title.id=me.id+'-title';if(me.isAccordionHeader){title.ariaRole='tab';title.textElRole=null;title.focusable=!0}
title=Ext.create(title);if(!configHasRotation&&me.vertical&&me.titleRotation==='default'){title.rotation=1}}
return title},applyTitlePosition:function(position){var max=this.items.getCount();if(this._titleInItems){--max}
return Math.max(Math.min(position,max),0)},beforeLayout:function(){this.callParent();this.syncBeforeAfterTitleClasses()},beforeRender:function(){var me=this,itemPosition=me.itemPosition;me.protoEl.unselectable();me.callParent();if(itemPosition!==undefined){me.insert(itemPosition,me._userItems)}
me.checkFocusableTools()},checkFocusableTools:function(){var me=this,tools=me.tools,haveFocusableTool,i,len;if(me.isAccordionHeader){me.focusableContainer=!1;return}
for(i=0,len=tools.length;i<len;i++){if(tools[i].focusable){haveFocusableTool=!0;break}}
if(haveFocusableTool){if(!me.initialConfig.hasOwnProperty('focusableContainer')||me.focusableContainer){me.ariaRole='toolbar';me.focusableContainer=!0;if(me.rendered){me.ariaEl.dom.setAttribute('role','toolbar');me.initFocusableContainer(!0)}}}else{me.ariaRole='presentation';me.focusableContainer=!1;if(me.rendered){me.ariaEl.dom.setAttribute('role','presentation');me.initFocusableContainer(!0)}}},getTools:function(){return this.tools.slice()},onAdd:function(component,index){var tools=this.tools;this.callParent([component,index]);if(component.isTool){tools.push(component);tools[component.type]=component}},onAdded:function(container,pos,instanced){this.syncNoBorderCls();this.callParent([container,pos,instanced])},onRemoved:function(container,pos,instanced){this.syncNoBorderCls();this.callParent([container,pos,instanced])},setDock:function(dock){var me=this,title=me.getTitle(),rotation=me.getTitleRotation(),titleRotation=title.getRotation();Ext.suspendLayouts();me.callParent([dock]);if(rotation==='default'){rotation=(me.vertical?1:0);if(rotation!==titleRotation){title.setRotation(rotation)}
if(me.rendered){me.resetItemMargins()}}
Ext.resumeLayouts(!0)},updateGlyph:function(glyph){this.getTitle().setGlyph(glyph)},updateIcon:function(icon){this.getTitle().setIcon(icon)},updateIconAlign:function(align,oldAlign){this.getTitle().setIconAlign(align)},updateIconCls:function(cls){this.getTitle().setIconCls(cls)},updateTitle:function(title,oldTitle){if(!oldTitle){this.insert(this.getTitlePosition(),title);this._titleInItems=!0}
this.titleCmp=title},updateTitleAlign:function(align,oldAlign){this.getTitle().setTextAlign(align)},updateTitlePosition:function(position){this.insert(position,this.getTitle())},updateTitleRotation:function(rotation){if(rotation==='default'){rotation=(this.vertical?1:0)}
this.getTitle().setRotation(rotation)},privates:{fireClickEvent:function(type,e){var toolCls='.'+Ext.panel.Tool.prototype.baseCls;if(!e.getTarget(toolCls)){this.fireEvent(type,this,e)}},getFramingInfoCls:function(){var me=this,cls=me.callParent(),owner=me.ownerCt;if(!me.expanding&&owner&&(owner.collapsed||me.isCollapsedExpander)){cls+='-'+owner.collapsedCls}
return cls+'-'+me.dock},onClick:function(e){this.fireClickEvent('click',e)},onDblClick:function(e){this.fireClickEvent('dblclick',e)},syncBeforeAfterTitleClasses:function(force){var me=this,items=me.items,childItems=items.items,titlePosition=me.getTitlePosition(),itemCount=childItems.length,itemGeneration=items.generation,syncGen=me.syncBeforeAfterGen,afterCls,beforeCls,i,item;if(!force&&(syncGen===itemGeneration)){return}
me.syncBeforeAfterGen=itemGeneration;for(i=0;i<itemCount;++i){item=childItems[i];afterCls=item.afterTitleCls||(item.afterTitleCls=item.baseCls+'-after-title');beforeCls=item.beforeTitleCls||(item.beforeTitleCls=item.baseCls+'-before-title');if(!me.title||i<titlePosition){if(syncGen){item.removeCls(afterCls)}
item.addCls(beforeCls)}else if(i>titlePosition){if(syncGen){item.removeCls(beforeCls)}
item.addCls(afterCls)}}},syncNoBorderCls:function(){var me=this,ownerCt=this.ownerCt,noBorderCls=me.headerCls+'-noborder';if(ownerCt?(ownerCt.border===!1&&!ownerCt.frame):me.border===!1){me.addCls(noBorderCls)}else{me.removeCls(noBorderCls)}}}})
;
Ext.define('Ext.layout.container.boxOverflow.None',{alternateClassName:'Ext.layout.boxOverflow.None',alias:['box.overflow.none','box.overflow.None'],mixins:['Ext.mixin.Factoryable'],factoryConfig:{defaultType:'none'},isBoxOverflowHandler:!0,$configPrefixed:!1,$configStrict:!1,constructor:function(config){this.initConfig(config)},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,calculate:function(ownerContext){var me=this,plan=ownerContext.state.boxPlan,overflow;if(plan&&plan.tooNarrow){overflow=me.handleOverflow(ownerContext);if(overflow){if(overflow.reservedSpace){me.layout.publishInnerCtSize(ownerContext,overflow.reservedSpace)}}}else{me.clearOverflow()}},completeLayout:Ext.emptyFn,finishedLayout:function(ownerContext){var me=this,owner=me.layout.owner,hiddens,hiddenCount;if(owner.hasListeners.overflowchange){hiddens=owner.query('>[hidden]');hiddenCount=hiddens.length;if(hiddenCount!==me.lastHiddenCount){owner.fireEvent('overflowchange',me.lastHiddenCount,hiddenCount,hiddens);me.lastHiddenCount=hiddenCount}}},onRemove:Ext.emptyFn,getItem:function(item){return this.layout.owner.getComponent(item)},getOwnerType:function(owner){var type;if(owner.isToolbar){type='toolbar'}else if(owner.isTabBar){type='tab-bar'}else if(owner.isMenu){type='menu'}else if(owner.isBreadcrumb){type='breadcrumb'}else{type=owner.getXType()}
return type},getPrefixConfig:Ext.emptyFn,getSuffixConfig:Ext.emptyFn,getOverflowCls:function(){return''},setVertical:function(){var me=this,layout=me.layout,innerCt=layout.innerCt;innerCt.removeCls(me.getOverflowCls(layout.oppositeDirection));innerCt.addCls(me.getOverflowCls(layout.direction))}})
;
Ext.define('Ext.layout.container.boxOverflow.Scroller',{extend:'Ext.layout.container.boxOverflow.None',alternateClassName:'Ext.layout.boxOverflow.Scroller',alias:['box.overflow.scroller','box.overflow.Scroller'],requires:['Ext.util.ClickRepeater','Ext.Element'],mixins:{observable:'Ext.mixin.Observable'},animateScroll:!1,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+'box-scroller',beforeSuffix:'-before-scroller',afterSuffix:'-after-scroller',constructor:function(config){var me=this;me.mixins.observable.constructor.call(me,config);me.layout.owner.on({afterrender:me.onOwnerRender,scope:me,single:!0});me.layout.owner.getOverflowEl=me.ownerGetOverflowImpl;me.scrollPosition=0;me.scrollSize=0},onOwnerRender:function(owner){var me=this,scrollable={isBoxOverflowScroller:!0,x:!1,y:!1,listeners:{scrollend:this.onScrollEnd,scope:this}};if(!Ext.scrollbar.width()&&!Ext.platformTags.desktop){scrollable[owner.layout.horizontal?'x':'y']=!0}else{me.wheelListener=me.layout.innerCt.on('mousewheel',me.onMouseWheel,me,{destroyable:!0})}
owner.setScrollable(scrollable)},getPrefixConfig:function(){return{role:'presentation',id:this.layout.owner.id+this.beforeSuffix,cls:this.createScrollerCls('beforeX'),style:'display:none'}},getSuffixConfig:function(){return{role:'presentation',id:this.layout.owner.id+this.afterSuffix,cls:this.createScrollerCls('afterX'),style:'display:none'}},createScrollerCls:function(xName){var me=this,layout=me.layout,owner=layout.owner,type=me.getOwnerType(owner),scrollerCls=me.scrollerCls,cls=scrollerCls+' '+scrollerCls+'-'+layout.names[xName]+' '+scrollerCls+'-'+type+' '+scrollerCls+'-'+type+'-'+owner.ui;if(owner.plain){cls+=' '+scrollerCls+'-plain'}
return cls},getOverflowCls:function(direction){return this.scrollerCls+'-body-'+direction},beginLayout:function(ownerContext){ownerContext.innerCtScrollPos=this.getScrollPosition();this.callParent(arguments)},finishedLayout:function(ownerContext){var me=this,plan=ownerContext.state.boxPlan,layout=me.layout,names=layout.names,scrollPos=Math.min(me.getMaxScrollPosition(),ownerContext.innerCtScrollPos),lastProps;if(plan&&plan.tooNarrow){lastProps=ownerContext.childItems[ownerContext.childItems.length-1].props;me.scrollSize=lastProps[names.x]+lastProps[names.width];me.updateScrollButtons();layout.innerCt[names.setScrollLeft](scrollPos)}
me.callParent([ownerContext])},handleOverflow:function(ownerContext){var me=this,names=me.layout.names,getWidth=names.getWidth,parallelMargins=names.parallelMargins,scrollerWidth,targetPaddingWidth,beforeScroller,afterScroller;me.showScrollers();beforeScroller=me.getBeforeScroller();afterScroller=me.getAfterScroller();scrollerWidth=beforeScroller[getWidth]()+afterScroller[getWidth]()+beforeScroller.getMargin(parallelMargins)+afterScroller.getMargin(parallelMargins);targetPaddingWidth=ownerContext.targetContext.getPaddingInfo()[names.width];return{reservedSpace:Math.max(scrollerWidth-targetPaddingWidth,0)}},getBeforeScroller:function(){var me=this;return me._beforeScroller||(me._beforeScroller=me.createScroller(me.beforeSuffix,'beforeRepeater','scrollLeft'))},getAfterScroller:function(){var me=this;return me._afterScroller||(me._afterScroller=me.createScroller(me.afterSuffix,'afterRepeater','scrollRight'))},createScroller:function(suffix,repeaterName,scrollHandler){var me=this,owner=me.layout.owner,scrollerCls=me.scrollerCls,scrollerEl;scrollerEl=owner.el.getById(owner.id+suffix);scrollerEl.addClsOnOver(scrollerCls+'-hover');scrollerEl.addClsOnClick(scrollerCls+'-pressed');scrollerEl.setVisibilityMode(Ext.Element.DISPLAY);me[repeaterName]=new Ext.util.ClickRepeater(scrollerEl,{interval:me.scrollRepeatInterval,handler:scrollHandler,scope:me});return scrollerEl},onMouseWheel:function(e){var cmp=Ext.Component.from(e.target),cmpScroller=cmp.getScrollable&&cmp.getScrollable();if(!cmpScroller||(cmpScroller===this.layout.owner.getScrollable())){e.stopEvent();this.scrollBy(this.getWheelDelta(e)*this.wheelIncrement*-1,!1)}},getWheelDelta:function(e){return e.getWheelDelta()},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){var me=this;me.getBeforeScroller().show();me.getAfterScroller().show();me.layout.owner.addClsWithUI(me.layout.direction==='vertical'?'vertical-scroller':'scroller')},hideScrollers:function(){var me=this,beforeScroller=me.getBeforeScroller(),afterScroller=me.getAfterScroller();if(beforeScroller){beforeScroller.hide();afterScroller.hide();me.layout.owner.removeClsWithUI(me.layout.direction==='vertical'?'vertical-scroller':'scroller')}},destroy:function(){Ext.destroyMembers(this,'beforeRepeater','afterRepeater','_beforeScroller','_afterScroller','wheelListener');this.callParent()},scrollBy:function(delta,animate){var layout=this.layout,scroller=layout.owner.getScrollable(),args=[0,0,animate?this.getScrollAnim():!1];args[layout.horizontal?0:1]=delta;scroller.scrollBy.apply(scroller,args)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var me=this,beforeScroller=me.getBeforeScroller(),afterScroller=me.getAfterScroller(),scrollPos=me.getScrollPosition(),disabledCls;if(!beforeScroller||!afterScroller){return}
disabledCls=me.scrollerCls+'-disabled';beforeScroller[scrollPos?'removeCls':'addCls'](disabledCls);afterScroller[scrollPos>=me.getMaxScrollPosition()?'addCls':'removeCls'](disabledCls)},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,!1)},scrollRight:function(){this.scrollBy(this.scrollIncrement,!1)},getScrollPosition:function(){var layout=this.layout;return layout.owner.getScrollable().getPosition()[layout.horizontal?'x':'y']},getMaxScrollPosition:function(){var layout=this.layout;return layout.owner.getScrollable().getMaxPosition()[layout.horizontal?'x':'y']},setVertical:function(){var me=this,beforeScroller=me.getBeforeScroller(),afterScroller=me.getAfterScroller(),names=me.layout.names,scrollerCls=me.scrollerCls;beforeScroller.removeCls(scrollerCls+'-'+names.beforeY);afterScroller.removeCls(scrollerCls+'-'+names.afterY);beforeScroller.addCls(scrollerCls+'-'+names.beforeX);afterScroller.addCls(scrollerCls+'-'+names.afterX);me.callParent()},scrollTo:function(position,animate){var layout=this.layout,scroller=layout.owner.getScrollable(),args=[0,0,animate?this.getScrollAnim():!1];args[layout.horizontal?0:1]=position;scroller.scrollTo.apply(scroller,args)},onScrollEnd:function(scroller,x,y){this.updateScrollButtons();this.fireEvent('scroll',this,this.layout.horizontal?x:y,!1)},scrollToItem:function(item,animate){item=this.getItem(item);if(item!==undefined){this.layout.owner.getScrollable().ensureVisible(item.el,{animation:animate})}},privates:{ownerGetOverflowImpl:function(){return this.layout.innerCt}}})
;
Ext.define('Ext.rtl.layout.container.boxOverflow.Scroller',{override:'Ext.layout.container.boxOverflow.Scroller',getWheelDelta:function(e){var layout=this.layout,delta=e.getWheelDelta();if(layout.direction==='horizontal'&&layout.owner.getInherited().rtl){delta=-delta}
return delta}})
;
Ext.define('Ext.dd.DragDropManager',{singleton:!0,requires:['Ext.util.Region'],uses:['Ext.tip.QuickTipManager'],alternateClassName:['Ext.dd.DragDropMgr','Ext.dd.DDM'],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:!0,stopPropagation:!1,initialized:!1,locked:!1,init:function(){this.initialized=!0},POINT:0,INTERSECT:1,mode:0,notifyOccluded:!1,dragCls:Ext.baseCSSPrefix+'dd-drag-current',currentPoint:new Ext.util.Point(),_execOnAll:function(sMethod,args){var ids=this.ids,i,j,oDD,item;for(i in ids){if(ids.hasOwnProperty(i)){item=ids[i];for(j in item){if(item.hasOwnProperty(j)){oDD=item[j];if(!this.isTypeOfDD(oDD)){continue}
oDD[sMethod].apply(oDD,args)}}}}},addListeners:function(){var me=this;me.init();Ext.getWin().on({unload:me._onUnload,resize:me._onResize,scope:me})},_onResize:function(e){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=!0},unlock:function(){this.locked=!1},isLocked:function(){return this.locked},locationCache:{},useCache:!0,clickPixelThresh:8,dragThreshMet:!1,clickTimeout:null,startX:0,startY:0,regDragDrop:function(oDD,sGroup){if(!this.initialized){this.init()}
if(!this.ids[sGroup]){this.ids[sGroup]={}}
this.ids[sGroup][oDD.id]=oDD},removeDDFromGroup:function(oDD,sGroup){var obj;if(!this.ids[sGroup]){this.ids[sGroup]={}}
obj=this.ids[sGroup];if(obj&&obj[oDD.id]){delete obj[oDD.id]}},_remove:function(oDD,clearGroup){var me=this,ids=me.ids,groups=oDD.groups,g;if(me.clearingAll){return}
if(me.dragCurrent===oDD){me.dragCurrent=null}
for(g in groups){if(groups.hasOwnProperty(g)){if(clearGroup){delete ids[g]}else if(ids[g]){delete ids[g][oDD.id]}}}
delete me.handleIds[oDD.id];delete me.locationCache[oDD.id]},regHandle:function(sDDId,sHandleId){if(!this.handleIds[sDDId]){this.handleIds[sDDId]={}}
this.handleIds[sDDId][sHandleId]=sHandleId},isDragDrop:function(id){return(this.getDDById(id))?!0:!1},getRelated:function(p_oDD,bTargetsOnly){var oDDs=[],i,j,dd;for(i in p_oDD.groups){for(j in this.ids[i]){dd=this.ids[i][j];if(!this.isTypeOfDD(dd)){continue}
if(!bTargetsOnly||dd.isTarget){oDDs[oDDs.length]=dd}}}
return oDDs},isLegalTarget:function(oDD,oTargetDD){var targets=this.getRelated(oDD,!0),i,len;for(i=0,len=targets.length;i<len;++i){if(targets[i].id===oTargetDD.id){return!0}}
return!1},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop)},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId])},getDDById:function(id,force){var i,dd;for(i in this.ids){dd=this.ids[i][id];if(dd instanceof Ext.dd.DDTarget||force){return dd}}
return null},handleMouseDown:function(e,oDD){var me=this,xy=e.getXY(),el=oDD.getEl(),pointerup={translate:!1,fn:me.handleMouseUp,capture:!1,priority:-1000},pointermove={translate:!1,fn:me.handleMouseMove,capture:!1},listeners={capture:!0,destroyable:!0,scope:me},DomEventType=e.browserEvent.type;listeners.touchstart=me.handleMouseUp;if(DomEventType==='pointerdown'){listeners.pointerup=pointerup;listeners.pointermove=pointermove}else if(DomEventType==='MSPointerDown'){listeners.MSPointerUp=pointerup;listeners.MSPointerMove=pointermove}else if(DomEventType==='mousedown'){listeners.mouseup=pointerup;listeners.mousemove=pointermove}else{listeners.touchend=pointerup;listeners.touchmove=pointermove}
me.pointerMoveListeners=Ext.getDoc().on(listeners);me.isMouseDown=!0;me.currentPoint.setPosition(xy);if(me.dragCurrent){me.handleMouseUp(e)}
me.mousedownEvent=e;me.currentTarget=e.getTarget();me.dragCurrent=oDD;Ext.fly(el).setCapture();me.startX=xy[0];me.startY=xy[1];me.offsetX=me.offsetY=0;me.deltaX=me.startX-el.offsetLeft;me.deltaY=me.startY-el.offsetTop;me.dragThreshMet=!1},startDrag:function(x,y){var me=this,current=me.dragCurrent,dragEl;Ext.undefer(me.clickTimeout);if(Ext.quickTipsActive){Ext.tip.QuickTipManager.ddDisable()}
if(current){current.b4StartDrag(x,y);current.startDrag(x,y);dragEl=Ext.fly(current.getDragEl());if(dragEl){dragEl.addCls(me.dragCls);if(dragEl.shim&&dragEl.shim.el){dragEl.shim.el.addCls(me.dragCls)}}}
me.dragThreshMet=!0},handleMouseUp:function(e){var me=this;me.pointerMoveListeners.destroy();me.isMouseDown=!1;if(!me.dragCurrent){return}
if(Ext.isIE&&document.releaseCapture){document.releaseCapture()}
Ext.undefer(me.clickTimeout);if(me.dragThreshMet){me.fireEvents(e,!0)}
me.stopDrag(e);if(me.dragThreshMet){me.stopEvent(e)}
me.mousedownEvent=me.currentTarget=null},stopEvent:function(e){if(this.stopPropagation){e.stopPropagation()}
if(this.preventDefault&&e.pointerType==='touch'){e.preventDefault()}},stopDrag:function(e){var me=this,current=me.dragCurrent,dragEl;if(Ext.quickTipsActive){Ext.tip.QuickTipManager.ddEnable()}
if(current){if(me.dragThreshMet){dragEl=Ext.fly(current.getDragEl());if(dragEl){dragEl.removeCls(me.dragCls);if(dragEl.shim&&dragEl.shim.el){dragEl.shim.el.removeCls(me.dragCls)}}
current.b4EndDrag(e);current.endDrag(e)}
me.dragCurrent.onMouseUp(e)}
me.dragCurrent=null;me.dragOvers={}},handleMouseMove:function(e){var me=this,current=me.dragCurrent,point=e.getXY(),currentX=point[0],currentY=point[1],diffX,diffY;me.offsetX=currentX-me.startX;me.offsetY=currentY-me.startY;me.currentPoint.setPosition(point);if(!current){return!0}
if(!me.dragThreshMet){diffX=Math.abs(me.offsetX);diffY=Math.abs(me.offsetY);if(diffX>me.clickPixelThresh||diffY>me.clickPixelThresh){e.claimGesture();me.startDrag(me.startX,me.startY)}}
if(me.dragThreshMet){current.b4Drag(e);current.onDrag(e);if(!current.moveOnly){me.fireEvents(e,!1)}}
me.stopEvent(e);return!0},fireEvents:function(e,isDrop){var me=this,isTouch=Ext.supports.Touch,dragCurrent=me.dragCurrent,mousePoint=me.currentPoint,allTargets=[],oldOvers=[],outEvts=[],overEvts=[],dropEvts=[],enterEvts=[],dragEl,overTarget,overTargetEl,needsSort,i,len,sGroup,overDragEl;if(!dragCurrent||dragCurrent.isLocked()){return}
overDragEl=!(dragCurrent.deltaX<0||dragCurrent.deltaY<0);if(isTouch||(!me.notifyOccluded&&(!Ext.supports.CSSPointerEvents||Ext.isIE10m||Ext.isOpera)&&overDragEl)){dragEl=dragCurrent.getDragEl();if(overDragEl){dragEl.style.visibility='hidden'}
e=e.chain({target:me.elementFromPoint(e.clientX,e.clientY)||document.documentElement});if(overDragEl){dragEl.style.visibility='visible'}}
for(i in me.dragOvers){overTarget=me.dragOvers[i];delete me.dragOvers[i];if(!me.isTypeOfDD(overTarget)||overTarget.destroyed){continue}
if(isDrop){outEvts.push(overTarget)}else{if(me.notifyOccluded){if(!this.isOverTarget(mousePoint,overTarget,me.mode)){outEvts.push(overTarget)}}else{if(!e.within(overTarget.getEl())){outEvts.push(overTarget)}}}
oldOvers[i]=!0}
for(sGroup in dragCurrent.groups){if("string"!==typeof sGroup){continue}
for(i in me.ids[sGroup]){overTarget=me.ids[sGroup][i];if(me.isTypeOfDD(overTarget)&&(overTargetEl=overTarget.getEl())&&(overTarget.isTarget)&&(!overTarget.isLocked())&&(Ext.fly(overTargetEl).isVisible(!0))&&((overTarget!==dragCurrent)||(dragCurrent.ignoreSelf===!1))){if(me.notifyOccluded){if((overTarget.zIndex=me.getZIndex(overTargetEl))!==-1){needsSort=!0}
allTargets.push(overTarget)}else{if(e.within(overTargetEl)){allTargets.push(overTarget);break}}}}}
if(needsSort){Ext.Array.sort(allTargets,me.byZIndex)}
for(i=0,len=allTargets.length;i<len;i++){overTarget=allTargets[i];if(me.isOverTarget(mousePoint,overTarget,me.mode)){if(isDrop){dropEvts.push(overTarget)}else{if(!oldOvers[overTarget.id]){enterEvts.push(overTarget)}else{overEvts.push(overTarget)}
me.dragOvers[overTarget.id]=overTarget}
if(!me.notifyOccluded){break}}}
if(me.mode){if(enterEvts.length){dragCurrent.onDragEnter(e,enterEvts)}
if(overEvts.length){dragCurrent.b4DragOver(e,overEvts);dragCurrent.onDragOver(e,overEvts)}
if(dropEvts.length){dragCurrent.b4DragDrop(e,dropEvts);dragCurrent.onDragDrop(e,dropEvts)}
if(outEvts.length){dragCurrent.b4DragOut(e,outEvts);dragCurrent.onDragOut(e,outEvts)}}else{for(i=0,len=enterEvts.length;i<len;++i){dragCurrent.onDragEnter(e,enterEvts[i].id)}
for(i=0,len=overEvts.length;i<len;++i){dragCurrent.b4DragOver(e,overEvts[i].id);dragCurrent.onDragOver(e,overEvts[i].id)}
for(i=0,len=dropEvts.length;i<len;++i){dragCurrent.b4DragDrop(e,dropEvts[i].id);dragCurrent.onDragDrop(e,dropEvts[i].id)}
for(i=0,len=outEvts.length;i<len;++i){dragCurrent.b4DragOut(e,outEvts[i].id);dragCurrent.onDragOut(e,outEvts[i].id)}}
if(isDrop&&!dropEvts.length){dragCurrent.onInvalidDrop(e)}},elementFromPoint:function(x,y){if(Ext.rootInheritedState.rtl){x=Ext.Element.getViewportWidth()-x}
return Ext.Element.fromPoint(x,y,!0)},getZIndex:function(element){var body=document.body,z,zIndex=-1;element=Ext.getDom(element);while(element!==body){if(!isNaN(z=Number(Ext.fly(element).getStyle('zIndex')))){zIndex=z}
element=element.parentNode}
return zIndex},byZIndex:function(d1,d2){return d1.zIndex<d2.zIndex},getBestMatch:function(dds){var winner=null,len=dds.length,i,dd;if(len===1){winner=dds[0]}else{for(i=0;i<len;++i){dd=dds[i];if(dd.cursorIsOver){winner=dd;break}else{if(!winner||winner.overlap.getArea()<dd.overlap.getArea()){winner=dd}}}}
return winner},refreshCache:function(groups){var sGroup,i,oDD,loc;for(sGroup in groups){if("string"!==typeof sGroup){continue}
for(i in this.ids[sGroup]){oDD=this.ids[sGroup][i];if(this.isTypeOfDD(oDD)){loc=this.getLocation(oDD);if(loc){this.locationCache[oDD.id]=loc}else{delete this.locationCache[oDD.id]}}}}},verifyEl:function(el){return Ext.getBody().contains(el)},getLocation:function(oDD){var el,pos,x1,x2,y1,y2,t,r,b,l;if(!this.isTypeOfDD(oDD)){return null}
if(oDD.getRegion){return oDD.getRegion()}
el=oDD.getEl();try{pos=Ext.fly(el).getXY()}catch(e){}
if(!pos){return null}
x1=pos[0];x2=x1+el.offsetWidth;y1=pos[1];y2=y1+el.offsetHeight;t=y1-oDD.padding[0];r=x2+oDD.padding[1];b=y2+oDD.padding[2];l=x1-oDD.padding[3];return new Ext.util.Region(t,r,b,l)},isOverTarget:function(pt,oTarget,intersect){var loc=this.locationCache[oTarget.id],dc,pos,el,curRegion,overlap;if(!loc||!this.useCache){loc=this.getLocation(oTarget);this.locationCache[oTarget.id]=loc}
if(!loc){return!1}
oTarget.cursorIsOver=loc.contains(pt);dc=this.dragCurrent;if(!dc||!dc.getTargetCoord||(!intersect&&!dc.constrainX&&!dc.constrainY)){return oTarget.cursorIsOver}
oTarget.overlap=null;pos=dc.getTargetCoord(pt.x,pt.y);el=dc.getDragEl();curRegion=new Ext.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);overlap=curRegion.intersect(loc);if(overlap){oTarget.overlap=overlap;return(intersect)?!0:oTarget.cursorIsOver}else{return!1}},_onUnload:function(e,me){Ext.dd.DragDropManager.unregAll()},unregAll:function(){var me=this,cache=me.elementCache,i;if(me.dragCurrent){me.stopDrag();me.dragCurrent=null}
me.clearingAll=!0;me._execOnAll("unreg",[]);delete me.clearingAll;for(i in cache){delete cache[i]}
me.elementCache={};me.ids={};me.handleIds={}},elementCache:{},getElWrapper:function(id){var oWrapper=this.elementCache[id];if(!oWrapper||!oWrapper.el){oWrapper=this.elementCache[id]=new this.ElementWrapper(Ext.getDom(id))}
return oWrapper},getElement:function(id){return Ext.getDom(id)},getCss:function(id){var el=Ext.getDom(id);return(el)?el.style:null},ElementWrapper:function(el){this.el=el||null;this.id=this.el&&el.id;this.css=this.el&&el.style},getPosX:function(el){return Ext.fly(el).getX()},getPosY:function(el){return Ext.fly(el).getY()},swapNode:function(n1,n2){var p,s;if(n1.swapNode){n1.swapNode(n2)}else{p=n2.parentNode;s=n2.nextSibling;if(s===n1){p.insertBefore(n1,n2)}else if(n2===n1.nextSibling){p.insertBefore(n2,n1)}else{n1.parentNode.replaceChild(n2,n1);p.insertBefore(n1,s)}}},getScroll:function(){var doc=window.document,docEl=doc.documentElement,body=doc.body,top=0,left=0;if(docEl&&(docEl.scrollTop||docEl.scrollLeft)){top=docEl.scrollTop;left=docEl.scrollLeft}else if(body){top=body.scrollTop;left=body.scrollLeft}
return{top:top,left:left}},getStyle:function(el,styleProp){return Ext.fly(el).getStyle(styleProp)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(moveEl,targetEl){var aCoord=Ext.fly(targetEl).getXY();Ext.fly(moveEl).setXY(aCoord)},numericSort:function(a,b){return(a-b)},handleWasClicked:function(node,id){var p;if(this.isHandle(id,node.id)){return!0}else{p=node.parentNode;while(p){if(this.isHandle(id,p.id)){return!0}else{p=p.parentNode}}}
return!1}},function(DragDropManager){Ext.onInternalReady(function(){DragDropManager.addListeners()})})
;
Ext.define('Ext.resizer.Splitter',{extend:'Ext.Component',xtype:'splitter',requires:['Ext.XTemplate'],uses:['Ext.resizer.SplitterTracker'],childEls:['collapseEl'],renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" data-ref="collapseEl" role="presentation" class="',Ext.baseCSSPrefix,'collapse-el ',Ext.baseCSSPrefix,'layout-split-{collapseDir}{childElCls}">','</div>','</tpl>'],isSplitter:!0,baseCls:Ext.baseCSSPrefix+'splitter',collapsedClsInternal:Ext.baseCSSPrefix+'splitter-collapsed',canResize:!0,collapsible:null,collapseOnDblClick:!0,defaultSplitMin:40,defaultSplitMax:1000,collapseTarget:'next',horizontal:!1,vertical:!1,touchAction:undefined,size:5,tracker:null,ariaRole:'separator',focusable:!0,tabIndex:0,applyTouchAction:function(touchAction,oldTouchAction){if(touchAction===undefined){touchAction=this.vertical?{panX:!1}:{panY:!1}}
return this.callParent([touchAction,oldTouchAction])},getTrackerConfig:function(){return Ext.apply({xclass:'Ext.resizer.SplitterTracker',el:this.el,splitter:this},this.tracker)},beforeRender:function(){var me=this,target=me.getCollapseTarget(),collapsible=me.collapsible;me.callParent();if(target.collapsed){me.addCls(me.collapsedClsInternal)}
if(!me.canResize){me.addCls(me.baseCls+'-noresize')}
Ext.applyIf(me.renderData,{collapseDir:me.getCollapseDirection(),collapsible:(collapsible!==null)?collapsible:target.collapsible});me.ariaRenderAttributes=me.ariaRenderAttributes||{};me.ariaRenderAttributes['aria-orientation']=me.orientation;me.protoEl.unselectable()},onRender:function(){var me=this,target,collapseEl;me.callParent(arguments);if(me.performCollapse!==!1){if(me.renderData.collapsible){me.mon(me.collapseEl,'click',me.toggleTargetCmp,me)}
if(me.collapseOnDblClick){me.mon(me.el,'dblclick',me.toggleTargetCmp,me)}}
target=me.getCollapseTarget();if(target&&target.isPanel){target.on({collapse:me.onTargetCollapse,expand:me.onTargetExpand,beforeexpand:me.onBeforeTargetExpand,beforecollapse:me.onBeforeTargetCollapse,scope:me})}
if(me.canResize){me.tracker=Ext.create(me.getTrackerConfig());me.relayEvents(me.tracker,['beforedragstart','dragstart','dragend'])}
collapseEl=me.collapseEl;if(collapseEl){collapseEl.lastCollapseDirCls=me.collapseDirProps[me.collapseDirection].cls}},getCollapseDirection:function(){var me=this,dir=me.collapseDirection,collapseTarget,idx,items,type;if(!dir){collapseTarget=me.collapseTarget;if(collapseTarget.isComponent){dir=collapseTarget.collapseDirection}
if(!dir){type=me.ownerCt.layout.type;if(collapseTarget.isComponent){items=me.ownerCt.items;idx=Number(items.indexOf(collapseTarget)===items.indexOf(me)-1)<<1|Number(type==='hbox')}else{idx=Number(me.collapseTarget==='prev')<<1|Number(type==='hbox')}
dir=['bottom','right','top','left'][idx]}
me.collapseDirection=dir}
me.setOrientation((dir==='top'||dir==='bottom')?'horizontal':'vertical');return dir},getCollapseTarget:function(){var me=this;return me.collapseTarget.isComponent?me.collapseTarget:me.collapseTarget==='prev'?me.previousSibling():me.nextSibling()},setCollapseEl:function(display){var el=this.collapseEl;if(el){el.setDisplayed(display)}},onBeforeTargetExpand:function(target){this.setCollapseEl('none')},onBeforeTargetCollapse:function(){this.setCollapseEl('none')},onTargetCollapse:function(target){var me=this;if(target===me.getCollapseTarget()&&target[me.orientation==='vertical'?'collapsedHorizontal':'collapsedVertical']()){me.el.addCls(me.collapsedClsInternal+' '+(me.collapsedCls||''))}
me.setCollapseEl('')},onTargetExpand:function(target){var me=this;me.el.removeCls(me.collapsedClsInternal+' '+(me.collapsedCls||''));me.setCollapseEl('')},collapseDirProps:{top:{cls:Ext.baseCSSPrefix+'layout-split-top'},right:{cls:Ext.baseCSSPrefix+'layout-split-right'},bottom:{cls:Ext.baseCSSPrefix+'layout-split-bottom'},left:{cls:Ext.baseCSSPrefix+'layout-split-left'}},orientationProps:{horizontal:{opposite:'vertical',fixedAxis:'height',stretchedAxis:'width'},vertical:{opposite:'horizontal',fixedAxis:'width',stretchedAxis:'height'}},applyCollapseDirection:function(){var me=this,collapseEl=me.collapseEl,collapseDirProps=me.collapseDirProps[me.collapseDirection],cls;if(collapseEl){cls=collapseEl.lastCollapseDirCls;if(cls){collapseEl.removeCls(cls)}
collapseEl.addCls(collapseEl.lastCollapseDirCls=collapseDirProps.cls)}},applyOrientation:function(){var me=this,orientation=me.orientation,orientationProps=me.orientationProps[orientation],defaultSize=me.size,fixedSizeProp=orientationProps.fixedAxis,stretchSizeProp=orientationProps.stretchedAxis,cls=me.baseCls+'-';me[orientation]=!0;me[orientationProps.opposite]=!1;if(!me.hasOwnProperty(fixedSizeProp)||me[fixedSizeProp]==='100%'){me[fixedSizeProp]=defaultSize}
if(!me.hasOwnProperty(stretchSizeProp)||me[stretchSizeProp]===defaultSize){me[stretchSizeProp]='100%'}
me.removeCls(cls+orientationProps.opposite);me.addCls(cls+orientation)},setOrientation:function(orientation){var me=this;if(me.orientation!==orientation){me.orientation=orientation;me.applyOrientation()}},updateOrientation:function(){delete this.collapseDirection;this.getCollapseDirection();this.applyCollapseDirection()},toggleTargetCmp:function(e,t){var cmp=this.getCollapseTarget(),placeholder=cmp.placeholder,toggle;if(Ext.isFunction(cmp.expand)&&Ext.isFunction(cmp.collapse)){if(placeholder&&!placeholder.hidden){toggle=!0}else{toggle=!cmp.hidden}
if(toggle){if(cmp.collapsed||cmp.floatedFromCollapse){cmp.expand()}else if(cmp.collapseDirection){cmp.collapse()}else{cmp.collapse(this.renderData.collapseDir)}}}},setSize:function(){var me=this;me.callParent(arguments);if(Ext.isIE&&me.el){me.el.repaint()}},doDestroy:function(){Ext.destroy(this.tracker);this.callParent()}})
;
Ext.define('Ext.theme.neptune.resizer.Splitter',{override:'Ext.resizer.Splitter',size:8})
;
Ext.define('Ext.theme.triton.resizer.Splitter',{override:'Ext.resizer.Splitter',size:10})
;
Ext.define('Ext.layout.container.Box',{extend:'Ext.layout.container.Container',alternateClassName:'Ext.layout.BoxLayout',alias:'layout.box',requires:['Ext.layout.container.boxOverflow.None','Ext.layout.container.boxOverflow.Scroller','Ext.util.Format','Ext.dd.DragDropManager','Ext.resizer.Splitter'],type:'box',config:{align:'begin',constrainAlign:!1,enableSplitters:!0,overflowHandler:{$value:null,merge:function(newValue,oldValue){if(typeof newValue==='string'){newValue={type:newValue}}
return Ext.merge(oldValue?Ext.Object.chain(oldValue):{},newValue)}},padding:0,pack:'start',stretchMaxPartner:undefined,vertical:!1,alignRoundingMethod:'round'},itemCls:Ext.baseCSSPrefix+'box-item',targetCls:Ext.baseCSSPrefix+'box-layout-ct',targetElCls:Ext.baseCSSPrefix+'box-target',innerCls:Ext.baseCSSPrefix+'box-inner',manageMargins:!0,createsInnerCt:!0,childEls:['innerCt','targetEl'],renderTpl:['{%var oc,l=values.$comp.layout,oh=l.overflowHandler;'+'if (oh && oh.getPrefixConfig!==Ext.emptyFn) {'+'if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)'+'}%}'+'<div id="{ownerId}-innerCt" data-ref="innerCt" role="presentation" class="{[l.innerCls]}'+'{[oh ? (" " + oh.getOverflowCls(l.direction)) : ""]}">'+'<div id="{ownerId}-targetEl" data-ref="targetEl" class="{targetElCls}" role="presentation">'+'{%this.renderBody(out, values)%}'+'</div>'+'</div>'+'{%if (oh && oh.getSuffixConfig!==Ext.emptyFn) {'+'if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)'+'}%}',{disableFormats:!0,definitions:'var dh=Ext.DomHelper;'}],constructor:function(config){var me=this,type;me.callParent([config]);me.setVertical(me.vertical);me.flexSortFn=me.flexSort.bind(me);type=typeof me.padding;if(type==='string'||type==='number'){me.padding=Ext.util.Format.parseBox(me.padding);me.padding.height=me.padding.top+me.padding.bottom;me.padding.width=me.padding.left+me.padding.right}},_beginRe:/^(?:begin|left|top)$/,_centerRe:/^(?:center|middle)$/,_endRe:/^(?:end|right|bottom)$/,_percentageRe:/^\s*(\d+(?:\.\d*)?)\s*[%]\s*$/,getItemSizePolicy:function(item,ownerSizeModel){var me=this,policy=me.sizePolicy,align=me.align,flex=item.flex,key=align,names=me.names,heightName=names.height,widthName=names.width,width=item[widthName],height=item[heightName],percentageRe=me._percentageRe,percentageWidth=percentageRe.test(width),isStretch=(align==='stretch'),isStretchMax=(align==='stretchmax'),constrain=me.constrainAlign;if(!ownerSizeModel&&(isStretch||flex||percentageWidth||(constrain&&!isStretchMax))){ownerSizeModel=me.owner.getSizeModel()}
if(isStretch){if(!percentageRe.test(height)&&ownerSizeModel[heightName].shrinkWrap){key='stretchmax'}}else if(!isStretchMax){if(percentageRe.test(height)){key='stretch'}else if(constrain&&!ownerSizeModel[heightName].shrinkWrap){key='stretchmax'}else{key=''}}
if(flex||percentageWidth){if(!ownerSizeModel[widthName].shrinkWrap){policy=policy.flex}}
return policy[key]},flexSort:function(a,b){var maxWidthName=this.names.maxWidth,minWidthName=this.names.minWidth,infiniteValue=Infinity,aTarget=a.target,bTarget=b.target,aFlex=aTarget.flex,bFlex=bTarget.flex,result=0,aMin,bMin,aMax,bMax,hasMin,hasMax;aMax=aTarget[maxWidthName]||infiniteValue;bMax=bTarget[maxWidthName]||infiniteValue;aMin=aTarget[minWidthName]||0;bMin=bTarget[minWidthName]||0;hasMin=isFinite(aMin)||isFinite(bMin);hasMax=isFinite(aMax)||isFinite(bMax);if(hasMin||hasMax){if(hasMax){result=aMax-bMax}
if(result===0&&hasMin){result=bMin-aMin}
if(result===0){if(hasMax){result=bFlex-aFlex}else{result=aFlex-bFlex}}}
return result},isItemBoxParent:function(itemContext){return!0},isItemShrinkWrap:function(item){return!0},roundFlex:function(width){return Math.floor(width)},beginCollapse:function(child){var me=this;if(me.direction==='vertical'&&child.collapsedVertical()){child.collapseMemento.capture(['flex']);delete child.flex}else if(me.direction==='horizontal'&&child.collapsedHorizontal()){child.collapseMemento.capture(['flex']);delete child.flex}},beginExpand:function(child){child.collapseMemento.restore(['flex'])},beginLayout:function(ownerContext){var me=this,owner=me.owner,smp=owner.stretchMaxPartner,style=me.innerCt.dom.style,names=me.names,overflowHandler=me.overflowHandler;ownerContext.boxNames=names;if(overflowHandler){overflowHandler.beginLayout(ownerContext)}
if(typeof smp==='string'){smp=Ext.getCmp(smp)||owner.query(smp)[0]}
ownerContext.stretchMaxPartner=smp&&ownerContext.context.getCmp(smp);me.callParent([ownerContext]);ownerContext.innerCtContext=ownerContext.getEl('innerCt',me);ownerContext.targetElContext=ownerContext.getEl('targetEl',me);ownerContext.ownerScrollable=owner.getScrollable();style.width=style.height=''},beginLayoutCycle:function(ownerContext,firstCycle){var me=this,state=ownerContext.state,scrollable=ownerContext.ownerScrollable,align=me.align,names=ownerContext.boxNames,pack=me.pack,centerRe=me._centerRe,overflowHandler=me.overflowHandler,canScroll=ownerContext.state.canScroll,widthModel,heightModel;if(overflowHandler){overflowHandler.beginLayoutCycle(ownerContext,firstCycle)}
me.callParent([ownerContext,firstCycle]);ownerContext.parallelSizeModel=widthModel=ownerContext[names.widthModel];ownerContext.perpendicularSizeModel=heightModel=ownerContext[names.heightModel];ownerContext.boxOptions={align:align={stretch:align==='stretch',stretchmax:align==='stretchmax',center:centerRe.test(align),bottom:me._endRe.test(align)},pack:pack={center:centerRe.test(pack),end:pack==='end'}};if(scrollable&&!scrollable.isBoxOverflowScroller){if(!canScroll){state.canScroll={parallel:!widthModel.shrinkWrap&&scrollable[names.getX](),perpendicular:!heightModel.shrinkWrap&&scrollable[names.getY]()}}
if(!state.actualScroll){state.actualScroll={parallel:!1,perpendicular:!1}}}
if(align.stretch&&heightModel.shrinkWrap){align.stretchmax=!0;align.stretch=!1}
align.nostretch=!(align.stretch||align.stretchmax);if(widthModel.shrinkWrap){pack.center=pack.end=!1}
me.cacheFlexes(ownerContext);me.targetEl.setWidth(20000)},cacheFlexes:function(ownerContext){var me=this,names=ownerContext.boxNames,widthModelName=names.widthModel,heightModelName=names.heightModel,nostretch=ownerContext.boxOptions.align.nostretch,totalFlex=0,childItems=ownerContext.childItems,i=childItems.length,flexedItems=[],minWidth=0,smallestHeight=0,smallestWidth=0,minWidthName=names.minWidth,minHeightName=names.minHeight,percentageRe=me._percentageRe,percentageWidths=0,percentageHeights=0,child,childContext,flex,match,heightModel,widthModel,width,height;while(i--){childContext=childItems[i];child=childContext.target;widthModel=childContext[widthModelName];if(widthModel.calculated){childContext.flex=flex=child.flex;if(flex){totalFlex+=flex;flexedItems.push(childContext);minWidth+=child[minWidthName]||0}else if((match=percentageRe.exec(child[names.width]))){childContext.percentageParallel=parseFloat(match[1])/100;++percentageWidths}}
if(widthModel.configured){width=child[names.width]}else{width=child[minWidthName]||0}
smallestWidth+=width;heightModel=childContext[heightModelName];if(nostretch&&heightModel.calculated){match=percentageRe.exec(child[names.height]);childContext.percentagePerpendicular=parseFloat(match[1])/100;++percentageHeights}
if(heightModel.configured){height=child[names.height]}else{height=child[minHeightName]||0}
if(height>smallestHeight){smallestHeight=height}}
ownerContext.flexedItems=flexedItems;ownerContext.flexedMinWidth=minWidth;ownerContext.smallestWidth=smallestWidth;ownerContext.smallestHeight=smallestHeight;ownerContext.totalFlex=totalFlex;ownerContext.percentageWidths=percentageWidths;ownerContext.percentageHeights=percentageHeights;Ext.Array.sort(flexedItems,me.flexSortFn)},calculate:function(ownerContext){var me=this,names=ownerContext.boxNames,state=ownerContext.state,actualScroll=state.actualScroll,needsScroll=state.needsScroll,canScroll=state.canScroll,plan=state.boxPlan||(state.boxPlan={}),overflowHandler=me.overflowHandler;plan.targetSize=me.getContainerSize(ownerContext);if(canScroll&&!needsScroll){state.needsScroll=needsScroll={parallel:canScroll.parallel&&plan.targetSize[names.width]<ownerContext.smallestWidth,perpendicular:canScroll.perpendicular&&plan.targetSize[names.height]<ownerContext.smallestHeight}}
if(!state.parallelDone){state.parallelDone=me.calculateParallel(ownerContext,names,plan)}
if(!state.perpendicularDone){state.perpendicularDone=me.calculatePerpendicular(ownerContext,names,plan)}
if(state.parallelDone&&state.perpendicularDone){if(canScroll&&!state.scrollPass){if(needsScroll.parallel!==actualScroll.parallel||needsScroll.perpendicular!==actualScroll.perpendicular){ownerContext.invalidate({state:{scrollPass:!0,canScroll:canScroll,needsScroll:actualScroll}});me.done=!1;return}}
me.publishInnerCtSize(ownerContext);if(me.done&&ownerContext.boxOptions.align.stretchmax&&!state.stretchMaxDone){me.calculateStretchMax(ownerContext,names,plan);state.stretchMaxDone=!0}
if(overflowHandler){overflowHandler.calculate(ownerContext)}}else{me.done=!1}},calculateParallel:function(ownerContext,names,plan){var me=this,widthShrinkWrap=ownerContext.parallelSizeModel.shrinkWrap,widthName=names.width,childItems=ownerContext.childItems,beforeXName=names.beforeX,afterXName=names.afterX,setWidthName=names.setWidth,childItemsLength=childItems.length,flexedItems=ownerContext.flexedItems,flexedItemsLength=flexedItems.length,pack=ownerContext.boxOptions.pack,padding=me.padding,targetSize=plan.targetSize,containerWidth=targetSize[widthName],state=ownerContext.state,needsScroll=state.needsScroll,canScroll=state.canScroll,totalMargin=0,left=padding[beforeXName],nonFlexWidth=left+padding[afterXName],scrollbarSize=Ext.scrollbar.size(),scrollbarWidth=scrollbarSize[names.width],scrollbarHeight=scrollbarSize[names.height],i,childMargins,remainingWidth,remainingFlex,childContext,flex,flexedWidth,contentWidth,childWidth,percentageSpace,availableSpace;if(!widthShrinkWrap&&!targetSize[names.gotWidth]){return!1}
for(i=0;i<childItemsLength;++i){childContext=childItems[i];childMargins=childContext.marginInfo||childContext.getMarginInfo();totalMargin+=childMargins[widthName];if(!childContext[names.widthModel].calculated){childWidth=childContext.getProp(widthName);nonFlexWidth+=childWidth;if(isNaN(nonFlexWidth)){return!1}}}
nonFlexWidth+=totalMargin;if(ownerContext.percentageWidths){percentageSpace=containerWidth-totalMargin;if(isNaN(percentageSpace)){return!1}
for(i=0;i<childItemsLength;++i){childContext=childItems[i];if(childContext.percentageParallel){childWidth=Math.ceil(percentageSpace*childContext.percentageParallel);childWidth=childContext[setWidthName](childWidth);nonFlexWidth+=childWidth}}}
if(widthShrinkWrap){availableSpace=0;plan.tooNarrow=!1}else{availableSpace=containerWidth-nonFlexWidth;if(needsScroll&&needsScroll.perpendicular){availableSpace-=scrollbarHeight}
plan.tooNarrow=availableSpace<ownerContext.flexedMinWidth;if(plan.tooNarrow&&canScroll&&canScroll.parallel){state.actualScroll.parallel=!0}}
contentWidth=nonFlexWidth;remainingWidth=availableSpace;remainingFlex=ownerContext.totalFlex;for(i=0;i<flexedItemsLength;i++){childContext=flexedItems[i];flex=childContext.flex;flexedWidth=me.roundFlex((flex/remainingFlex)*remainingWidth);flexedWidth=childContext[setWidthName](flexedWidth);contentWidth+=flexedWidth;remainingWidth=Math.max(0,remainingWidth-flexedWidth);remainingFlex-=flex}
if(pack.center){left+=remainingWidth/2;if(left<0){left=0}}else if(pack.end){left+=remainingWidth}
for(i=0;i<childItemsLength;++i){childContext=childItems[i];childMargins=childContext.marginInfo;left+=childMargins[beforeXName];childContext.setProp(names.x,left);left+=childMargins[afterXName]+childContext.props[widthName]}
contentWidth+=ownerContext.targetContext.getPaddingInfo()[widthName];ownerContext.state.contentWidth=contentWidth;if(needsScroll&&needsScroll.perpendicular){if(widthShrinkWrap){contentWidth+=scrollbarWidth}
ownerContext[names.hasOverflowY]=!0;ownerContext.target.componentLayout[names.setWidthInDom]=!0;ownerContext[names.invalidateScrollY]=Ext.isIE8}
ownerContext[names.setContentWidth](contentWidth);return!0},calculatePerpendicular:function(ownerContext,names,plan){var me=this,state=ownerContext.state,needsScroll=state.needsScroll,canScroll=state.canScroll,heightShrinkWrap=ownerContext.perpendicularSizeModel.shrinkWrap,targetSize=plan.targetSize,childItems=ownerContext.childItems,childItemsLength=childItems.length,mmax=Math.max,heightName=names.height,setHeightName=names.setHeight,beforeYName=names.beforeY,topPositionName=names.y,padding=me.padding,top=padding[beforeYName],availHeight=targetSize[heightName]-top-padding[names.afterY],align=ownerContext.boxOptions.align,isStretch=align.stretch,isStretchMax=align.stretchmax,isCenter=align.center,isBottom=align.bottom,constrain=me.constrainAlign,maxHeight=0,hasPercentageSizes=0,onBeforeInvalidateChild=me.onBeforeConstrainInvalidateChild,onAfterInvalidateChild=me.onAfterConstrainInvalidateChild,scrollbarHeight=Ext.scrollbar.height(),childTop,i,childHeight,childMargins,diff,height,childContext,stretchMaxPartner,stretchMaxChildren,shrinkWrapParallelOverflow,percentagePerpendicular;if(!heightShrinkWrap&&!targetSize[names.gotHeight]){return!1}
if(isStretch||((isCenter||isBottom)&&!heightShrinkWrap)){if(isNaN(availHeight)){return!1}}
if(needsScroll&&needsScroll.parallel){if(heightShrinkWrap){shrinkWrapParallelOverflow=!0}else{availHeight-=scrollbarHeight;plan.targetSize[heightName]-=scrollbarHeight}}
if(isStretch){height=availHeight;maxHeight=mmax(height,ownerContext.smallestHeight)}else{for(i=0;i<childItemsLength;i++){childContext=childItems[i];childMargins=(childContext.marginInfo||childContext.getMarginInfo())[heightName];if(!(percentagePerpendicular=childContext.percentagePerpendicular)){childHeight=childContext.getProp(heightName)}else{++hasPercentageSizes;if(heightShrinkWrap){continue}else{childHeight=percentagePerpendicular*availHeight-childMargins;childHeight=childContext[setHeightName](childHeight)}}
if(!heightShrinkWrap&&constrain&&childContext[names.heightModel].shrinkWrap&&childHeight>availHeight){childContext.invalidate({before:onBeforeInvalidateChild,after:onAfterInvalidateChild,layout:me,childHeight:availHeight,names:names});ownerContext.state.parallelDone=!1}
if(isNaN(maxHeight=mmax(maxHeight,childHeight+childMargins,childContext.target[names.minHeight]||0))){return!1}}}
if(shrinkWrapParallelOverflow){maxHeight+=scrollbarHeight;ownerContext[names.hasOverflowX]=!0;ownerContext.target.componentLayout[names.setHeightInDom]=!0;ownerContext[names.invalidateScrollX]=Ext.isIE8}
stretchMaxPartner=ownerContext.stretchMaxPartner;if(stretchMaxPartner){ownerContext.setProp('maxChildHeight',maxHeight);stretchMaxChildren=stretchMaxPartner.childItems;if(stretchMaxChildren&&stretchMaxChildren.length){maxHeight=mmax(maxHeight,stretchMaxPartner.getProp('maxChildHeight'));if(isNaN(maxHeight)){return!1}}}
ownerContext[names.setContentHeight](maxHeight+me.padding[heightName]+ownerContext.targetContext.getPaddingInfo()[heightName]);if(shrinkWrapParallelOverflow){maxHeight-=scrollbarHeight}
if(maxHeight>targetSize[heightName]&&canScroll&&canScroll.perpendicular){state.actualScroll.perpendicular=!0}
plan.maxSize=maxHeight;if(isStretchMax){height=maxHeight}else if(isCenter||isBottom||hasPercentageSizes){if(constrain){height=heightShrinkWrap?maxHeight:availHeight}else{height=heightShrinkWrap?maxHeight:mmax(availHeight,maxHeight)}
height-=ownerContext.innerCtContext.getBorderInfo()[heightName]}
for(i=0;i<childItemsLength;i++){childContext=childItems[i];childMargins=childContext.marginInfo||childContext.getMarginInfo();childTop=top+childMargins[beforeYName];if(isStretch){childContext[setHeightName](height-childMargins[heightName])}else{percentagePerpendicular=childContext.percentagePerpendicular;if(heightShrinkWrap&&percentagePerpendicular){childMargins=childContext.marginInfo||childContext.getMarginInfo();childHeight=percentagePerpendicular*height-childMargins[heightName];childHeight=childContext[setHeightName](childHeight)}
if(isCenter){diff=height-childContext.props[heightName];if(diff>0){childTop=top+Math[me.alignRoundingMethod](diff/2)}}else if(isBottom){childTop=mmax(0,height-childTop-childContext.props[heightName])}}
childContext.setProp(topPositionName,childTop)}
return!0},onBeforeConstrainInvalidateChild:function(childContext,options){var heightModelName=options.names.heightModel;if(!childContext[heightModelName].constrainedMin){childContext[heightModelName]=Ext.layout.SizeModel.calculated}},onAfterConstrainInvalidateChild:function(childContext,options){var names=options.names;childContext.setProp(names.beforeY,0);if(childContext[names.heightModel].calculated){childContext[names.setHeight](options.childHeight)}},calculateStretchMax:function(ownerContext,names,plan){var me=this,heightName=names.height,widthName=names.width,childItems=ownerContext.childItems,length=childItems.length,height=plan.maxSize,onBeforeStretchMaxInvalidateChild=me.onBeforeStretchMaxInvalidateChild,onAfterStretchMaxInvalidateChild=me.onAfterStretchMaxInvalidateChild,childContext,props,i,childHeight;for(i=0;i<length;++i){childContext=childItems[i];props=childContext.props;childHeight=height-childContext.getMarginInfo()[heightName];if(childHeight!==props[heightName]||childContext[names.heightModel].constrained){childContext.invalidate({before:onBeforeStretchMaxInvalidateChild,after:onAfterStretchMaxInvalidateChild,layout:me,childWidth:props[widthName],childHeight:childHeight,childX:props.x,childY:props.y,names:names})}}},onBeforeStretchMaxInvalidateChild:function(childContext,options){var heightModelName=options.names.heightModel;if(!childContext[heightModelName].constrainedMax){childContext[heightModelName]=Ext.layout.SizeModel.calculated}},onAfterStretchMaxInvalidateChild:function(childContext,options){var names=options.names,childHeight=options.childHeight,childWidth=options.childWidth;childContext.setProp('x',options.childX);childContext.setProp('y',options.childY);if(childContext[names.heightModel].calculated){childContext[names.setHeight](childHeight)}
if(childContext[names.widthModel].calculated){childContext[names.setWidth](childWidth)}},completeLayout:function(ownerContext){var me=this,invalidateScrollX=ownerContext.invalidateScrollX,invalidateScrollY=ownerContext.invalidateScrollY,overflowHandler=me.overflowHandler,dom,el,overflowX,overflowY,styles;if(overflowHandler){overflowHandler.completeLayout(ownerContext)}
if(invalidateScrollX||invalidateScrollY){el=me.getTarget();dom=el.dom;styles=dom.style;if(invalidateScrollX){overflowX=el.getStyle('overflowX');if(overflowX==='auto'){overflowX=styles.overflowX;styles.overflowX='scroll'}else{invalidateScrollX=!1}}
if(invalidateScrollY){overflowY=el.getStyle('overflowY');if(overflowY==='auto'){overflowY=styles.overflowY;styles.overflowY='scroll'}else{invalidateScrollY=!1}}
if(invalidateScrollX||invalidateScrollY){dom.scrollWidth;if(invalidateScrollX){styles.overflowX=overflowX}
if(invalidateScrollY){styles.overflowY=overflowY}}}},finishedLayout:function(ownerContext){var overflowHandler=this.overflowHandler;if(overflowHandler){overflowHandler.finishedLayout(ownerContext)}
this.callParent([ownerContext])},getLayoutItems:function(){var items=this.callParent(),n=items.length,lastVisibleItem,hide,i,item,splitAfter,splitBefore,splitter;for(i=0;i<n;++i){if((item=items[i]).isSplitter){continue}
splitter=item.splitter;if(item.hidden){if(splitter){if(!splitter.hidden){splitter.hidden=!0;if(splitter.el){splitter.el.hide()}}}
continue}
if(splitter){splitBefore=splitter.collapseTarget==='next'}else{splitBefore=!1}
hide=null;if(lastVisibleItem&&splitAfter){if(splitAfter.hidden){splitAfter.hidden=!1;if(splitAfter.el){splitAfter.el.show()}}
if(splitBefore){hide=!0}}else if(splitBefore){hide=!lastVisibleItem}
if(hide!==null&&splitter.hidden!==hide){splitter.hidden=hide;if(splitter.el){splitter.el.setVisible(!hide)}}
splitAfter=!splitBefore&&splitter;lastVisibleItem=item}
if(lastVisibleItem&&splitAfter&&!splitAfter.hidden){splitAfter.hidden=!0;if(splitAfter.el){splitAfter.el.hide()}}
return items},insertSplitter:function(item,index,hidden,splitterCfg){var splitter={xtype:'splitter',id:item.id+'-splitter',hidden:hidden,splitterFor:item,synthetic:!0},at=index+((splitterCfg.collapseTarget==='prev')?1:0);splitter[this.names.height]='100%';if(splitterCfg){Ext.apply(splitter,splitterCfg)}
item.splitter=this.owner.add(at,splitter)},publishInnerCtSize:function(ownerContext,widthOffset){var me=this,state=ownerContext.state,names=ownerContext.boxNames,heightName=names.height,widthName=names.width,align=ownerContext.boxOptions.align,padding=me.padding,plan=state.boxPlan,targetSize=plan.targetSize,height=plan.maxSize,needsScroll=state.needsScroll,innerCtContext=ownerContext.innerCtContext,innerCtWidth,innerCtHeight;widthOffset=widthOffset||0;if(ownerContext.parallelSizeModel.shrinkWrap||(plan.tooNarrow&&state.canScroll)){innerCtWidth=state.contentWidth-ownerContext.targetContext.getPaddingInfo()[widthName]}else{innerCtWidth=targetSize[widthName];if(needsScroll&&needsScroll.perpendicular){innerCtWidth-=Ext.scrollbar.size()[widthName]}}
innerCtWidth-=widthOffset;me.owner.tooNarrow=plan.tooNarrow;if(align.stretch){innerCtHeight=height}else{innerCtHeight=plan.maxSize+padding[names.beforeY]+padding[names.afterY]+innerCtContext.getBorderInfo()[heightName];if(!ownerContext.perpendicularSizeModel.shrinkWrap&&(align.center||align.bottom)){innerCtHeight=Math.max(targetSize[heightName],innerCtHeight)}}
innerCtContext[names.setWidth](innerCtWidth);innerCtContext[names.setHeight](innerCtHeight);ownerContext.targetElContext.setWidth(ownerContext.innerCtContext.props.width-(me.vertical?0:(widthOffset||0)));if(isNaN(innerCtWidth+innerCtHeight)){me.done=!1}},onAdd:function(item,index){var me=this,split=me.enableSplitters&&!item.isButton&&item.split;me.callParent([item,index]);if(split){if(split===!0){split={collapseTarget:'next'}}else if(Ext.isString(split)){split={collapseTarget:split==='before'?'next':'prev'}}else{split=Ext.apply({collapseTarget:split.side==='before'?'next':'prev'},split)}
me.insertSplitter(item,index,!!item.hidden,split)}},onRemove:function(comp,isDestroying){var me=this,names=me.names,owner=me.owner,splitter=comp.splitter,overflowHandler=me.overflowHandler,el;me.callParent([comp,isDestroying]);if(splitter&&owner.contains(splitter)){owner.doRemove(splitter,!0);comp.splitter=null}
if(overflowHandler){overflowHandler.onRemove(comp)}
if(comp.layoutMarginCap===me.id){delete comp.layoutMarginCap}
if(!owner.destroying&&!isDestroying&&comp.rendered){el=comp.getEl();if(el){el.setStyle(names.beforeY,'');el.setStyle(names.beforeX,'');el.setStyle('margin','')}}},applyOverflowHandler:function(overflowHandler,oldOverflowHandler){if(typeof overflowHandler==='string'){overflowHandler={type:overflowHandler}}
if(oldOverflowHandler&&oldOverflowHandler.type===overflowHandler.type){delete overflowHandler.type;oldOverflowHandler.setConfig(overflowHandler);return oldOverflowHandler}
overflowHandler.layout=this;return Ext.Factory.boxOverflow(overflowHandler)},getRenderTarget:function(){return this.targetEl},getElementTarget:function(){return this.innerCt},calculateChildBox:Ext.deprecated(),calculateChildBoxes:Ext.deprecated(),updateChildBoxes:Ext.deprecated(),destroy:function(){var me=this;Ext.destroy(me.innerCt,me.overflowHandler);me.flexSortFn=me.innerCt=null;me.callParent()},getRenderData:function(){var data=this.callParent();data.targetElCls=this.targetElCls;return data},updateVertical:function(vertical){var me=this,overflowHandler=me.overflowHandler,owner=me.owner,props=me._props;Ext.apply(me,vertical?props.vbox:props.hbox);if(overflowHandler&&owner&&owner.rendered){overflowHandler.setVertical(vertical)}},_props:{'hbox':{direction:'horizontal',oppositeDirection:'vertical',horizontal:!0,vertical:!1,names:{beforeX:'left',beforeScrollX:'left',leftCap:'Left',afterX:'right',width:'width',contentWidth:'contentWidth',minWidth:'minWidth',maxWidth:'maxWidth',widthCap:'Width',widthModel:'widthModel',widthIndex:0,x:'x',getX:'getX',setX:'setX',scrollLeft:'scrollLeft',overflowX:'overflowX',hasOverflowX:'hasOverflowX',invalidateScrollX:'invalidateScrollX',parallelMargins:'lr',center:'middle',beforeY:'top',afterY:'bottom',height:'height',contentHeight:'contentHeight',minHeight:'minHeight',maxHeight:'maxHeight',heightCap:'Height',heightModel:'heightModel',heightIndex:1,y:'y',getY:'getY',setY:'setY',overflowY:'overflowY',hasOverflowY:'hasOverflowY',invalidateScrollY:'invalidateScrollY',perpendicularMargins:'tb',getWidth:'getWidth',getHeight:'getHeight',setWidth:'setWidth',setHeight:'setHeight',gotWidth:'gotWidth',gotHeight:'gotHeight',setContentWidth:'setContentWidth',setContentHeight:'setContentHeight',setWidthInDom:'setWidthInDom',setHeightInDom:'setHeightInDom',getScrollLeft:'getScrollLeft',setScrollLeft:'setScrollLeft',scrollTo:'scrollTo'},sizePolicy:{flex:{'':{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},stretch:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1},stretchmax:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:1}},'':{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},stretch:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},stretchmax:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:1}}},'vbox':{direction:'vertical',oppositeDirection:'horizontal',horizontal:!1,vertical:!0,names:{beforeX:'top',beforeScrollX:'top',leftCap:'Top',afterX:'bottom',width:'height',contentWidth:'contentHeight',minWidth:'minHeight',maxWidth:'maxHeight',widthCap:'Height',widthModel:'heightModel',widthIndex:1,x:'y',getX:'getY',setX:'setY',scrollLeft:'scrollTop',overflowX:'overflowY',hasOverflowX:'hasOverflowY',invalidateScrollX:'invalidateScrollY',parallelMargins:'tb',center:'center',beforeY:'left',afterY:'right',height:'width',contentHeight:'contentWidth',minHeight:'minWidth',maxHeight:'maxWidth',heightCap:'Width',heightModel:'widthModel',heightIndex:0,y:'x',getY:'getX',setY:'setX',overflowY:'overflowX',hasOverflowY:'hasOverflowX',invalidateScrollY:'invalidateScrollX',perpendicularMargins:'lr',getWidth:'getHeight',getHeight:'getWidth',setWidth:'setHeight',setHeight:'setWidth',gotWidth:'gotHeight',gotHeight:'gotWidth',setContentWidth:'setContentHeight',setContentHeight:'setContentWidth',setWidthInDom:'setHeightInDom',setHeightInDom:'setWidthInDom',getScrollLeft:'getScrollTop',setScrollLeft:'setScrollTop',scrollTo:'scrollTo'},sizePolicy:{flex:{'':{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},stretch:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1},stretchmax:{readsWidth:1,readsHeight:0,setsWidth:1,setsHeight:1}},'':{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},stretch:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},stretchmax:{readsWidth:1,readsHeight:1,setsWidth:1,setsHeight:0}}}}})
;
Ext.define('Ext.rtl.layout.container.Box',{override:'Ext.layout.container.Box',initLayout:function(){var me=this;if(me.owner.getInherited().rtl){me.names=Ext.Object.chain(me.names);Ext.apply(me.names,me.rtlNames)}
me.callParent(arguments)},getRenderData:function(){var renderData=this.callParent();if(this.owner.getInherited().rtl){renderData.targetElCls=(renderData.targetElCls||'')+' '+Ext.baseCSSPrefix+'rtl'}
return renderData}})
;
Ext.define('Ext.layout.container.HBox',{extend:'Ext.layout.container.Box',alias:'layout.hbox',alternateClassName:'Ext.layout.HBoxLayout',type:'hbox',vertical:!1})
;
Ext.define('Ext.rtl.layout.container.HBox',{override:'Ext.layout.container.HBox',rtlNames:{beforeX:'right',afterX:'left',getScrollLeft:'rtlGetScrollLeft',setScrollLeft:'rtlSetScrollLeft',scrollTo:'rtlScrollTo',beforeScrollerSuffix:'-after-scroller',afterScrollerSuffix:'-before-scroller'}})
;
Ext.define('Ext.layout.container.VBox',{extend:'Ext.layout.container.Box',alias:'layout.vbox',alternateClassName:'Ext.layout.VBoxLayout',type:'vbox',vertical:!0})
;
Ext.define('Ext.rtl.layout.container.VBox',{override:'Ext.layout.container.VBox',rtlNames:{beforeY:'right',afterY:'left',scrollTo:'rtlScrollTo'}})
;
Ext.define('Ext.toolbar.Toolbar',{extend:'Ext.container.Container',requires:['Ext.layout.container.HBox','Ext.layout.container.VBox'],uses:['Ext.toolbar.Fill','Ext.toolbar.Separator','Ext.toolbar.Spacer','Ext.plugin.MouseEnter'],alias:'widget.toolbar',alternateClassName:'Ext.Toolbar',isToolbar:!0,baseCls:Ext.baseCSSPrefix+'toolbar',ariaRole:'toolbar',focusableContainer:!0,defaultType:'button',layout:undefined,vertical:undefined,enableOverflow:!1,overflowHandler:null,defaultButtonUI:'default-toolbar',defaultFieldUI:'default',defaultFooterButtonUI:'default',defaultFooterFieldUI:'default',trackMenus:!0,itemCls:Ext.baseCSSPrefix+'toolbar-item',statics:{shortcuts:{'-':'tbseparator',' ':'tbspacer'},shortcutsHV:{0:{'->':{xtype:'tbfill',height:0}},1:{'->':{xtype:'tbfill',width:0}}}},initComponent:function(){var me=this,layout=me.layout,vertical=me.vertical;if(vertical===undefined){me.vertical=vertical=me.dock==='right'||me.dock==='left'}
me.layout=layout=Ext.applyIf(Ext.isString(layout)?{type:layout}:layout||{},{type:vertical?'vbox':'hbox',align:vertical?'stretchmax':'middle'});if(me.overflowHandler){layout.overflowHandler=me.overflowHandler}else if(me.enableOverflow){layout.overflowHandler='menu'}
if(vertical){me.addClsWithUI('vertical')}
if(me.ui==='footer'){me.ignoreBorderManagement=!0}
me.callParent()},afterFirstLayout:function(width,height){var me=this,el=me.layout.getRenderTarget().dom;me.callParent([width,height]);if(me.trackMenus){me.addPlugin({ptype:'mouseenter',element:el,delegate:function(e){return e.parentNode===el},handler:me.onItemOver,scope:me})}},getRefItems:function(deep){var me=this,items=me.callParent(arguments),layout=me.layout,handler;if(deep&&(me.enableOverflow||(me.overflowHandler==='menu'))){handler=layout.overflowHandler;if(handler&&handler.menu){items=items.concat(handler.menu.getRefItems(deep))}}
return items},lookupComponent:function(c){var args=arguments,shortcut,T;if(typeof c==='string'&&c[0]!=='@'){T=Ext.toolbar.Toolbar;shortcut=T.shortcutsHV[this.vertical?1:0][c]||T.shortcuts[c];if(typeof shortcut==='string'){c={xtype:shortcut}}else if(shortcut){c=Ext.apply({},shortcut)}else{c={xtype:'tbtext',text:c}}
this.applyDefaults(c);args=[c]}
return this.callParent(args)},onBeforeAdd:function(component){var me=this,isFooter=me.ui==='footer',defaultButtonUI=isFooter?me.defaultFooterButtonUI:me.defaultButtonUI;if(component.isSegmentedButton){if(component.getDefaultUI()==='default'&&!component.config.hasOwnProperty('defaultUI')){component.setDefaultUI(defaultButtonUI)}}else if(component.ui==='default'&&!component.hasOwnProperty('ui')){if(component.isButton){component.ui=defaultButtonUI}else if(component.isFormField){component.ui=isFooter?me.defaultFooterFieldUI:me.defaultFieldUI}}
if(component instanceof Ext.toolbar.Separator){component.setUI(me.vertical?'vertical':'horizontal')}
me.callParent(arguments)},onAdd:function(component){var me=this;if(component.needArrowKeys&&me.focusableContainer&&!me.hasOwnProperty('focusableContainer')){me.focusableContainer=!1;me.ariaRole='group'}
me.callParent(arguments);me.trackMenu(component)},onRemove:function(c){this.callParent(arguments);this.trackMenu(c,!0)},privates:{applyDefaults:function(c){if(!Ext.isString(c)){c=this.callParent(arguments)}
return c},trackMenu:function(item,remove){var me=this;if(item.menu){item[remove?'un':'on']({menushow:me.onButtonMenuShow,menuhide:me.onButtonMenuHide,scope:me})}},getChildItemsToDisable:function(){return this.items.getRange()},onItemOver:function(e,target){var btn=Ext.Component.from(target),activeMenuBtn=this.activeMenuBtn;if(activeMenuBtn&&activeMenuBtn!==btn&&btn.showMenu&&btn.menu){btn.focus();btn.showMenu(e)}},onButtonMenuShow:function(btn){this.activeMenuBtn=btn},onButtonMenuHide:function(btn){this.activeMenuBtn=null}}})
;
Ext.define('Ext.theme.neptune.toolbar.Toolbar',{override:'Ext.toolbar.Toolbar',usePlainButtons:!1,border:!1})
;
Ext.define('Ext.dd.DragDrop',{requires:['Ext.dd.DragDropManager'],constructor:function(id,sGroup,config){if(id){this.init(id,sGroup,config)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:!1,lock:function(){this.locked=!0},moveOnly:!1,unlock:function(){this.locked=!1},isTarget:!0,padding:null,_domRef:null,__ygDragDrop:!0,constrainX:!1,constrainY:!1,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:!1,xTicks:null,yTicks:null,primaryButtonOnly:!0,available:!1,hasOuterHandles:!1,triggerEvent:'mousedown',b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(constrainTo,pad,inContent){if(Ext.isNumber(pad)){pad={left:pad,right:pad,top:pad,bottom:pad}}
pad=pad||this.defaultPadding;var ddBox=Ext.get(this.getEl()).getBox(),constrainEl=Ext.get(constrainTo),s=constrainEl.getScroll(),constrainDom=constrainEl.dom,c,xy,topSpace,leftSpace;if(constrainDom===document.body){c={x:s.left,y:s.top,width:Ext.Element.getViewportWidth(),height:Ext.Element.getViewportHeight()}}else{xy=constrainEl.getXY();c={x:xy[0],y:xy[1],width:constrainDom.clientWidth,height:constrainDom.clientHeight}}
topSpace=ddBox.y-c.y;leftSpace=ddBox.x-c.x;this.resetConstraints();this.setXConstraint(leftSpace-(pad.left||0),c.width-leftSpace-ddBox.width-(pad.right||0),this.xTickSize);this.setYConstraint(topSpace-(pad.top||0),c.height-topSpace-ddBox.height-(pad.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(id,sGroup,config){var me=this;me.el=me.el||Ext.get(id);me.initTarget(id,sGroup,config);Ext.get(me.id).on(me.triggerEvent,me.handleMouseDown,me);if(Ext.supports.Touch&&me.triggerEvent==='longpress'){Ext.get(me.id).swallowEvent('contextmenu',!0)}},initTarget:function(id,sGroup,config){this.config=config||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof id!=="string"){id=Ext.id(id)}
this.id=id;this.addToGroup((sGroup)?sGroup:"default");this.handleElId=id;this.setDragElId(id);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!==!1);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==!1)},handleOnAvailable:function(){this.available=!0;this.resetConstraints();this.onAvailable()},setPadding:function(iTop,iRight,iBot,iLeft){if(!iRight&&0!==iRight){this.padding=[iTop,iTop,iTop,iTop]}else if(!iBot&&0!==iBot){this.padding=[iTop,iRight,iTop,iRight]}else{this.padding=[iTop,iRight,iBot,iLeft]}},setInitPosition:function(diffX,diffY){var el=this.getEl(),dx,dy,p;if(!this.DDMInstance.verifyEl(el)){return}
dx=diffX||0;dy=diffY||0;p=Ext.fly(el).getXY();this.initPageX=p[0]-dx;this.initPageY=p[1]-dy;this.lastPageX=p[0];this.lastPageY=p[1];this.setStartPosition(p)},setStartPosition:function(pos){var p=pos||Ext.fly(this.getEl()).getXY();this.deltaSetXY=null;this.startPageX=p[0];this.startPageY=p[1]},addToGroup:function(sGroup){this.groups[sGroup]=!0;this.DDMInstance.regDragDrop(this,sGroup)},removeFromGroup:function(sGroup){if(this.groups[sGroup]){delete this.groups[sGroup]}
this.DDMInstance.removeDDFromGroup(this,sGroup)},setDragElId:function(id){this.dragElId=id},setHandleElId:function(id){if(typeof id!=="string"){id=Ext.id(id)}
this.handleElId=id;this.DDMInstance.regHandle(this.id,id)},setOuterHandleElId:function(id){if(typeof id!=="string"){id=Ext.id(id)}
Ext.get(id).on(this.triggerEvent,this.handleMouseDown,this);this.setHandleElId(id);this.hasOuterHandles=!0},unreg:function(){var me=this,el;if(me._domRef){el=Ext.fly(me.id);if(el){el.un(me.triggerEvent,me.handleMouseDown,me)}}
me._domRef=null;me.DDMInstance._remove(me,me.autoGroup)},destroy:function(){this.unreg();this.callParent()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(e,oDD){var me=this;if((me.primaryButtonOnly&&e.button)||me.isLocked()){return}
me.DDMInstance.refreshCache(me.groups);if(me.hasOuterHandles||me.DDMInstance.isOverTarget(e.getPoint(),me)){if(me.clickValidator(e)){me.setStartPosition();me.b4MouseDown(e);me.onMouseDown(e);me.DDMInstance.handleMouseDown(e,me);me.DDMInstance.stopEvent(e)}}},clickValidator:function(e){var target=e.getTarget();return(this.isValidHandleChild(target)&&(this.id===this.handleElId||this.DDMInstance.handleWasClicked(target,this.id)))},addInvalidHandleType:function(tagName){var type=tagName.toUpperCase();this.invalidHandleTypes[type]=type},addInvalidHandleId:function(id){if(typeof id!=="string"){id=Ext.id(id)}
this.invalidHandleIds[id]=id},addInvalidHandleClass:function(cssClass){this.invalidHandleClasses.push(cssClass)},removeInvalidHandleType:function(tagName){var type=tagName.toUpperCase();delete this.invalidHandleTypes[type]},removeInvalidHandleId:function(id){if(typeof id!=="string"){id=Ext.id(id)}
delete this.invalidHandleIds[id]},removeInvalidHandleClass:function(cssClass){var invalidHandleClasses=this.invalidHandleClasses,len=invalidHandleClasses.length,i;for(i=0;i<len;++i){if(invalidHandleClasses[i]===cssClass){delete invalidHandleClasses[i]}}},isValidHandleChild:function(node){var valid=!0,nodeName,i,len;try{nodeName=node.nodeName.toUpperCase()}catch(e){nodeName=node.nodeName}
valid=valid&&!this.invalidHandleTypes[nodeName];valid=valid&&!this.invalidHandleIds[node.id];for(i=0,len=this.invalidHandleClasses.length;valid&&i<len;++i){valid=!Ext.fly(node).hasCls(this.invalidHandleClasses[i])}
return valid},setXTicks:function(iStartX,iTickSize){var tickMap={},i;this.xTicks=[];this.xTickSize=iTickSize;for(i=this.initPageX;i>=this.minX;i=i-iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=!0}}
for(i=this.initPageX;i<=this.maxX;i=i+iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=!0}}
Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(iStartY,iTickSize){var tickMap={},i;this.yTicks=[];this.yTickSize=iTickSize;for(i=this.initPageY;i>=this.minY;i=i-iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=!0}}
for(i=this.initPageY;i<=this.maxY;i=i+iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=!0}}
Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(iLeft,iRight,iTickSize){this.leftConstraint=iLeft;this.rightConstraint=iRight;this.minX=this.initPageX-iLeft;this.maxX=this.initPageX+iRight;if(iTickSize){this.setXTicks(this.initPageX,iTickSize)}
this.constrainX=!0},clearConstraints:function(){this.constrainX=!1;this.constrainY=!1;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(iUp,iDown,iTickSize){this.topConstraint=iUp;this.bottomConstraint=iDown;this.minY=this.initPageY-iUp;this.maxY=this.initPageY+iDown;if(iTickSize){this.setYTicks(this.initPageY,iTickSize)}
this.constrainY=!0},resetConstraints:function(){var dx,dy;if(this.initPageX||this.initPageX===0){dx=(this.maintainOffset)?this.lastPageX-this.initPageX:0;dy=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(dx,dy)}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(val,tickArray){var i,len,next,diff1,diff2;if(!tickArray){return val}else if(tickArray[0]>=val){return tickArray[0]}else{for(i=0,len=tickArray.length;i<len;++i){next=i+1;if(tickArray[next]&&tickArray[next]>=val){diff1=val-tickArray[i];diff2=tickArray[next]-val;return(diff2>diff1)?tickArray[i]:tickArray[next]}}
return tickArray[tickArray.length-1]}},toString:function(){return("DragDrop "+this.id)}})
;
Ext.define('Ext.dd.DD',{extend:'Ext.dd.DragDrop',requires:['Ext.dd.DragDropManager'],constructor:function(id,sGroup,config){if(id){this.init(id,sGroup,config)}},scroll:!0,autoOffset:function(iPageX,iPageY){var x=iPageX-this.startPageX,y=iPageY-this.startPageY;this.setDelta(x,y)},setDelta:function(iDeltaX,iDeltaY){this.deltaX=iDeltaX;this.deltaY=iDeltaY},setDragElPos:function(iPageX,iPageY){var el=this.getDragEl();this.alignElWithMouse(el,iPageX,iPageY)},alignElWithMouse:function(el,iPageX,iPageY){var oCoord=this.getTargetCoord(iPageX,iPageY),fly=el.dom?el:Ext.fly(el,'_dd'),elSize=fly.getSize(),EL=Ext.Element,vpSize,aCoord,newLeft,newTop;if(!this.deltaSetXY){vpSize=this.cachedViewportSize={width:EL.getDocumentWidth(),height:EL.getDocumentHeight()};aCoord=[Math.max(0,Math.min(oCoord.x,vpSize.width-elSize.width)),Math.max(0,Math.min(oCoord.y,vpSize.height-elSize.height))];fly.setXY(aCoord);newLeft=this.getLocalX(fly);newTop=fly.getLocalY();this.deltaSetXY=[newLeft-oCoord.x,newTop-oCoord.y]}else{vpSize=this.cachedViewportSize;this.setLocalXY(fly,Math.max(0,Math.min(oCoord.x+this.deltaSetXY[0],vpSize.width-elSize.width)),Math.max(0,Math.min(oCoord.y+this.deltaSetXY[1],vpSize.height-elSize.height)))}
this.cachePosition(oCoord.x,oCoord.y);this.autoScroll(oCoord.x,oCoord.y,el.offsetHeight,el.offsetWidth);return oCoord},cachePosition:function(iPageX,iPageY){var aCoord;if(iPageX){this.lastPageX=iPageX;this.lastPageY=iPageY}else{aCoord=Ext.fly(this.getEl()).getXY();this.lastPageX=aCoord[0];this.lastPageY=aCoord[1]}},autoScroll:function(x,y,h,w){var clientH,clientW,st,sl,bot,right,toBot,toRight,thresh,scrAmt;if(this.scroll){clientH=Ext.Element.getViewportHeight();clientW=Ext.Element.getViewportWidth();st=this.DDMInstance.getScrollTop();sl=this.DDMInstance.getScrollLeft();bot=h+y;right=w+x;toBot=(clientH+st-y-this.deltaY);toRight=(clientW+sl-x-this.deltaX);thresh=40;scrAmt=(document.all)?80:30;if(bot>clientH&&toBot<thresh){window.scrollTo(sl,st+scrAmt)}
if(y<st&&st>0&&y-st<thresh){window.scrollTo(sl,st-scrAmt)}
if(right>clientW&&toRight<thresh){window.scrollTo(sl+scrAmt,st)}
if(x<sl&&sl>0&&x-sl<thresh){window.scrollTo(sl-scrAmt,st)}}},getTargetCoord:function(iPageX,iPageY){var x=iPageX-this.deltaX,y=iPageY-this.deltaY;if(this.constrainX){if(x<this.minX){x=this.minX}
if(x>this.maxX){x=this.maxX}}
if(this.constrainY){if(y<this.minY){y=this.minY}
if(y>this.maxY){y=this.maxY}}
x=this.getTick(x,this.xTicks);y=this.getTick(y,this.yTicks);return{x:x,y:y}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==!1)},b4MouseDown:function(e){var xy=e.getXY();this.autoOffset(xy[0],xy[1])},b4Drag:function(e){var xy=e.getXY();this.setDragElPos(xy[0],xy[1])},toString:function(){return("DD "+this.id)},getLocalX:function(el){return el.getLocalX()},setLocalXY:function(el,x,y){el.setLocalXY(x,y)}})
;
Ext.define('Ext.rtl.dd.DD',{override:'Ext.dd.DD',getLocalX:function(el){return Ext.rootInheritedState.rtl?el.rtlGetLocalX():el.getLocalX()},setLocalXY:function(el,x,y){if(Ext.rootInheritedState.rtl){el.rtlSetLocalXY(x,y)}else{el.setLocalXY(x,y)}}})
;
Ext.define('Ext.dd.DDProxy',{extend:'Ext.dd.DD',statics:{dragElId:"ygddfdiv"},constructor:function(id,sGroup,config){if(id){this.init(id,sGroup,config);this.initFrame()}},resizeFrame:!0,centerFrame:!1,createFrame:function(){var self=this,body=document.body,div,s;if(!body||!body.firstChild){Ext.defer(function(){self.createFrame()},50);return}
div=this.getDragEl();if(!div){div=document.createElement("div");div.id=this.dragElId;div.setAttribute('role','presentation');s=div.style;s.position="absolute";s.visibility="hidden";s.cursor="move";s.border="2px solid #aaa";s.zIndex=999;body.insertBefore(div,body.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==!1);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(iPageX,iPageY){var me=this,dragEl=me.getDragEl(),s=dragEl.style;me._resizeProxy();if(me.centerFrame){me.setDelta(Math.round(parseInt(s.width,10)/2),Math.round(parseInt(s.height,10)/2))}
me.setDragElPos(iPageX,iPageY);Ext.fly(dragEl).show()},_resizeProxy:function(){var el;if(this.resizeFrame){el=this.getEl();Ext.fly(this.getDragEl()).setSize(el.offsetWidth,el.offsetHeight)}},b4MouseDown:function(e){var xy=e.getXY(),x=xy[0],y=xy[1];this.autoOffset(x,y);this.setDragElPos(x,y)},b4StartDrag:function(x,y){this.showFrame(x,y)},b4EndDrag:function(e){Ext.fly(this.getDragEl()).hide()},endDrag:function(e){var lel=this.getEl(),del=this.getDragEl();del.style.visibility="";this.beforeMove();lel.style.visibility="hidden";Ext.dd.DDM.moveToEl(lel,del);del.style.visibility="hidden";lel.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}})
;
Ext.define('Ext.dd.StatusProxy',{extend:'Ext.Component',animRepair:!1,childEls:['ghost'],renderTpl:['<div class="'+Ext.baseCSSPrefix+'dd-drop-icon" role="presentation"></div>'+'<div id="{id}-ghost" data-ref="ghost" class="'+Ext.baseCSSPrefix+'dd-drag-ghost" role="presentation"></div>'],repairCls:Ext.baseCSSPrefix+'dd-drag-repair',ariaRole:'presentation',skipLayout:!0,alignOnScroll:!1,constructor:function(config){var me=this;config=config||{};Ext.apply(me,{hideMode:'visibility',hidden:!0,floating:!0,id:me.id||Ext.id(),cls:Ext.baseCSSPrefix+'dd-drag-proxy '+this.dropNotAllowed,shadow:config.shadow||!1,renderTo:Ext.getDetachedBody()});me.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+'dd-drop-ok',dropNotAllowed:Ext.baseCSSPrefix+'dd-drop-nodrop',setStatus:function(cssClass){cssClass=cssClass||this.dropNotAllowed;if(this.dropStatus!==cssClass){this.el.replaceCls(this.dropStatus,cssClass);this.dropStatus=cssClass}},reset:function(clearGhost){var me=this,clsPrefix=Ext.baseCSSPrefix+'dd-drag-proxy ';me.el.replaceCls(clsPrefix+me.dropAllowed,clsPrefix+me.dropNotAllowed);me.dropStatus=me.dropNotAllowed;if(clearGhost){me.ghost.setHtml('')}},update:function(html){var el;if(typeof html==="string"){this.ghost.setHtml(html)}else{this.ghost.setHtml('');html.style.margin="0";this.ghost.dom.appendChild(html)}
el=this.ghost.dom.firstChild;if(el){Ext.fly(el).setStyle('float','none')}},getGhost:function(){return this.ghost},hide:function(clear){this.callParent();if(clear){this.reset(!0)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.syncUnderlays()},repair:function(xy,callback,scope){var me=this;me.callback=callback;me.scope=scope;if(xy&&me.animRepair!==!1){me.el.addCls(me.repairCls);me.el.setUnderlaysVisible(!1);me.anim=me.el.animate({duration:me.repairDuration||500,easing:'ease-out',to:{x:xy[0],y:xy[1]},stopAnimation:!0,callback:me.afterRepair,scope:me})}else{me.afterRepair()}},afterRepair:function(){var me=this;me.hide(!0);me.el.removeCls(me.repairCls);if(typeof me.callback==="function"){me.callback.call(me.scope||me)}
delete me.callback;delete me.scope}})
;
Ext.define('Ext.dd.DragSource',{extend:'Ext.dd.DDProxy',requires:['Ext.dd.StatusProxy','Ext.dd.DragDropManager'],dropAllowed:Ext.baseCSSPrefix+'dd-drop-ok',dropNotAllowed:Ext.baseCSSPrefix+'dd-drop-nodrop',animRepair:!0,repairHighlightColor:'c3daf9',constructor:function(el,config){this.el=Ext.get(el);if(!this.dragData){this.dragData={}}
Ext.apply(this,config);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+'-drag-status-proxy',animRepair:this.animRepair})}
this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:!1,isTarget:!1,scroll:this.scroll===!0}]);this.dragging=!1},getDragData:function(e){return this.dragData},onDragEnter:function(e,id){var target=Ext.dd.DragDropManager.getDDById(id),status;this.cachedTarget=target;if(this.beforeDragEnter(target,e,id)!==!1){if(target.isNotifyTarget){status=target.notifyEnter(this,e,this.dragData);this.proxy.setStatus(status)}else{this.proxy.setStatus(this.dropAllowed)}
if(this.afterDragEnter){this.afterDragEnter(target,e,id)}}},beforeDragEnter:function(target,e,id){return!0},onDragOver:function(e,id){var target=this.cachedTarget||Ext.dd.DragDropManager.getDDById(id),status;if(this.beforeDragOver(target,e,id)!==!1){if(target.isNotifyTarget){status=target.notifyOver(this,e,this.dragData);this.proxy.setStatus(status)}
if(this.afterDragOver){this.afterDragOver(target,e,id)}}},beforeDragOver:function(target,e,id){return!0},onDragOut:function(e,id){var target=this.cachedTarget||Ext.dd.DragDropManager.getDDById(id);if(this.beforeDragOut(target,e,id)!==!1){if(target.isNotifyTarget){target.notifyOut(this,e,this.dragData)}
this.proxy.reset();if(this.afterDragOut){this.afterDragOut(target,e,id)}}
this.cachedTarget=null},beforeDragOut:function(target,e,id){return!0},onDragDrop:function(e,id){var target=this.cachedTarget||Ext.dd.DragDropManager.getDDById(id);if(this.beforeDragDrop(target,e,id)!==!1){if(target.isNotifyTarget){if(target.notifyDrop(this,e,this.dragData)!==!1){this.onValidDrop(target,e,id)}else{this.onInvalidDrop(target,e,id)}}else{this.onValidDrop(target,e,id)}
if(this.afterDragDrop){this.afterDragDrop(target,e,id)}}
delete this.cachedTarget},beforeDragDrop:function(target,e,id){return!0},onValidDrop:function(target,e,id){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(target,e,id)}},getRepairXY:function(e,data){return this.el.getXY()},onInvalidDrop:function(target,e,id){var me=this;if(!e){e=target;target=null;id=e.getTarget().id}
if(me.beforeInvalidDrop(target,e,id)!==!1){if(me.cachedTarget){if(me.cachedTarget.isNotifyTarget){me.cachedTarget.notifyOut(me,e,me.dragData)}
me.cacheTarget=null}
me.proxy.repair(me.getRepairXY(e,me.dragData),me.afterRepair,me);if(me.afterInvalidDrop){me.afterInvalidDrop(e,id)}}},afterRepair:function(){var me=this;if(Ext.enableFx){me.el.highlight(me.repairHighlightColor)}
me.dragging=!1},beforeInvalidDrop:function(target,e,id){return!0},handleMouseDown:function(e){var data;if(this.dragging){return}
data=this.getDragData(e);if(data&&this.onBeforeDrag(data,e)!==!1){this.dragData=data;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(data,e){return!0},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(!0);return this.callParent(arguments)},startDrag:function(x,y){this.proxy.reset();this.proxy.hidden=!1;this.dragging=!0;this.proxy.update("");this.onInitDrag(x,y);this.proxy.show()},onInitDrag:function(x,y){var clone=this.el.dom.cloneNode(!0);clone.id=Ext.id();this.proxy.update(clone);this.onStartDrag(x,y);return!0},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(!0);this.dragging=!1},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(e){},endDrag:function(e){this.onEndDrag(this.dragData,e)},onEndDrag:function(data,e){},autoOffset:function(x,y){this.setDelta(-12,-20)},destroy:function(){Ext.destroy(this.proxy);this.callParent()}})
;
Ext.define('Ext.panel.Proxy',{alternateClassName:'Ext.dd.PanelProxy',moveOnDrag:!0,constructor:function(panel,config){var me=this;me.panel=panel;me.id=me.panel.id+'-ddproxy';Ext.apply(me,config)},insertProxy:!0,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var me=this;if(me.ghost){if(me.proxy){me.proxy.destroy();delete me.proxy}
me.panel.unghost(null,me.moveOnDrag);delete me.ghost}},show:function(){var me=this,panelSize;if(!me.ghost){panelSize=me.panel.getSize();me.panel.el.setVisibilityMode(Ext.Element.DISPLAY);me.ghost=me.panel.ghost();if(me.insertProxy){me.proxy=me.panel.el.insertSibling({role:'presentation',cls:Ext.baseCSSPrefix+'panel-dd-spacer'});me.proxy.setSize(panelSize)}}},repair:function(xy,callback,scope){this.hide();Ext.callback(callback,scope||this)},moveProxy:function(parentNode,before){if(this.proxy){parentNode.insertBefore(this.proxy.dom,before)}}})
;
Ext.define('Ext.panel.DD',{extend:'Ext.dd.DragSource',requires:['Ext.panel.Proxy'],constructor:function(panel,cfg){var me=this;me.panel=panel;me.dragData={panel:panel};me.panelProxy=new Ext.panel.Proxy(panel,cfg);me.proxy=me.panelProxy.proxy;me.callParent([panel.el,cfg]);me.setupEl(panel)},setupEl:function(panel){var me=this,header=panel.header,el=panel.body;if(header){me.setHandleElId(header.id);el=header.el}
if(el){el.setStyle('cursor','move');me.scroll=!1}else{panel.on('boxready',me.setupEl,me,{single:!0})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(x,y){this.panelProxy.show()},b4MouseDown:function(e){var xy=e.getXY(),x=xy[0],y=xy[1];this.autoOffset(x,y)},onInitDrag:function(x,y){this.onStartDrag(x,y);return!0},createFrame:Ext.emptyFn,getDragEl:function(e){var ghost=this.panelProxy.ghost;if(ghost){return ghost.el.dom}},endDrag:function(e){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(x,y){x-=this.startPageX;y-=this.startPageY;this.setDelta(x,y)},onInvalidDrop:function(target,e,id){var me=this;if(me.beforeInvalidDrop(target,e,id)!==!1){if(me.cachedTarget){if(me.cachedTarget.isNotifyTarget){me.cachedTarget.notifyOut(me,e,me.dragData)}
me.cacheTarget=null}
if(me.afterInvalidDrop){me.afterInvalidDrop(e,id)}}}})
;
Ext.define('Ext.layout.component.Dock',{extend:'Ext.layout.component.Component',alias:'layout.dock',alternateClassName:'Ext.layout.component.AbstractDock',type:'dock',horzAxisProps:{name:'horz',oppositeName:'vert',dockBegin:'left',dockEnd:'right',horizontal:!0,marginBegin:'margin-left',maxSize:'maxWidth',minSize:'minWidth',pos:'x',setSize:'setWidth',shrinkWrapDock:'shrinkWrapDockWidth',size:'width',sizeModel:'widthModel'},vertAxisProps:{name:'vert',oppositeName:'horz',dockBegin:'top',dockEnd:'bottom',horizontal:!1,marginBegin:'margin-top',maxSize:'maxHeight',minSize:'minHeight',pos:'y',setSize:'setHeight',shrinkWrapDock:'shrinkWrapDockHeight',size:'height',sizeModel:'heightModel'},initializedBorders:-1,horizontalCollapsePolicy:{width:!0,x:!0},verticalCollapsePolicy:{height:!0,y:!0},finishRender:function(){var me=this,target,items;me.callParent();target=me.getRenderTarget();items=me.getDockedItems();me.finishRenderItems(target,items)},isItemBoxParent:function(itemContext){return!0},isItemShrinkWrap:function(item){return!0},noBorderClasses:[Ext.baseCSSPrefix+'docked-noborder-top',Ext.baseCSSPrefix+'docked-noborder-right',Ext.baseCSSPrefix+'docked-noborder-bottom',Ext.baseCSSPrefix+'docked-noborder-left'],noBorderClassesSides:{top:Ext.baseCSSPrefix+'docked-noborder-top',right:Ext.baseCSSPrefix+'docked-noborder-right',bottom:Ext.baseCSSPrefix+'docked-noborder-bottom',left:Ext.baseCSSPrefix+'docked-noborder-left'},borderWidthProps:{top:'border-top-width',right:'border-right-width',bottom:'border-bottom-width',left:'border-left-width'},_itemCls:Ext.baseCSSPrefix+'docked',handleItemBorders:function(){var me=this,owner=me.owner,borders,docked,lastItems=me.lastDockedItems,oldBorders=me.borders,currentGeneration=owner.dockedItems.generation,noBorderClassesSides=me.noBorderClassesSides,borderWidthProps=me.borderWidthProps,i,ln,item,dock,side,collapsed=me.collapsed;if(me.initializedBorders===currentGeneration||(owner.border&&!owner.manageBodyBorders)||(owner.collapsed&&owner.collapseMode==='mini')){return}
me.initializedBorders=currentGeneration;me.collapsed=!1;me.lastDockedItems=docked=me.getLayoutItems();me.collapsed=collapsed;borders={top:[],right:[],bottom:[],left:[]};for(i=0,ln=docked.length;i<ln;i++){item=docked[i];dock=item.dock;if(item.ignoreBorderManagement){continue}
if(!borders[dock].satisfied){borders[dock].push(item);borders[dock].satisfied=!0}
if(!borders.top.satisfied&&dock!=='bottom'){borders.top.push(item)}
if(!borders.right.satisfied&&dock!=='left'){borders.right.push(item)}
if(!borders.bottom.satisfied&&dock!=='top'){borders.bottom.push(item)}
if(!borders.left.satisfied&&dock!=='right'){borders.left.push(item)}}
if(lastItems){for(i=0,ln=lastItems.length;i<ln;i++){item=lastItems[i];if(!item.destroyed&&!item.ignoreBorderManagement&&!owner.manageBodyBorders){item.removeCls(me.noBorderClasses)}}}
if(oldBorders){for(side in oldBorders){if(owner.manageBodyBorders&&oldBorders[side].satisfied){owner.setBodyStyle(borderWidthProps[side],'')}}}
for(side in borders){ln=borders[side].length;if(!owner.manageBodyBorders){for(i=0;i<ln;i++){borders[side][i].addCls(noBorderClassesSides[side])}
if((!borders[side].satisfied&&!owner.bodyBorder)||owner.bodyBorder===!1){owner.addBodyCls(noBorderClassesSides[side])}else{owner.removeBodyCls(noBorderClassesSides[side])}}else if(borders[side].satisfied){owner.setBodyStyle(borderWidthProps[side],'1px')}}
me.borders=borders},beforeLayoutCycle:function(ownerContext){var me=this,owner=me.owner,shrinkWrap=me.sizeModels.shrinkWrap,shrinkWrapDock=owner.shrinkWrapDock,collapsedHorz,collapsedVert;if(owner.collapsed){if(owner.collapsedVertical()){collapsedVert=!0;ownerContext.measureDimensions=1}else{collapsedHorz=!0;ownerContext.measureDimensions=2}}
ownerContext.collapsedVert=collapsedVert;ownerContext.collapsedHorz=collapsedHorz;if(collapsedVert){ownerContext.heightModel=shrinkWrap}else if(collapsedHorz){ownerContext.widthModel=shrinkWrap}
shrinkWrapDock=shrinkWrapDock===!0?3:(shrinkWrapDock||0);ownerContext.shrinkWrapDockHeight=(shrinkWrapDock&1)&&ownerContext.heightModel.shrinkWrap;ownerContext.shrinkWrapDockWidth=(shrinkWrapDock&2)&&ownerContext.widthModel.shrinkWrap},beginLayout:function(ownerContext){var me=this,owner=me.owner,docked=me.getLayoutItems(),layoutContext=ownerContext.context,dockedItemCount=docked.length,lastCollapsedState=me.lastCollapsedState,dockedItems,i,item,itemContext,offsets,collapsed,dock;me.callParent(arguments);collapsed=owner.getCollapsed();if(collapsed!==lastCollapsedState&&lastCollapsedState!==undefined){if(me.owner.collapsed){ownerContext.isCollapsingOrExpanding=1;owner.addClsWithUI(owner.collapsedCls)}else{ownerContext.isCollapsingOrExpanding=2;owner.removeClsWithUI(owner.collapsedCls);ownerContext.lastCollapsedState=me.lastCollapsedState}}
me.lastCollapsedState=collapsed;ownerContext.dockedItems=dockedItems=[];for(i=0;i<dockedItemCount;i++){item=docked[i];if(item.rendered){dock=item.dock;itemContext=layoutContext.getCmp(item);itemContext.dockedAt={x:0,y:0};itemContext.offsets=offsets=Ext.Element.parseBox(item.offsets||0);itemContext.horizontal=dock==='top'||dock==='bottom';offsets.width=offsets.left+offsets.right;offsets.height=offsets.top+offsets.bottom;dockedItems.push(itemContext)}}
ownerContext.bodyContext=ownerContext.getEl('body')},beginLayoutCycle:function(ownerContext){var me=this,docked=ownerContext.dockedItems,len=docked.length,owner=me.owner,frameBody=owner.frameBody,lastHeightModel=me.lastHeightModel,i,item,dock;me.callParent(arguments);if(me.owner.manageHeight){if(me.lastBodyDisplay){owner.body.dom.style.display=me.lastBodyDisplay=''}}else{if(me.lastBodyDisplay!=='inline-block'){owner.body.dom.style.display=me.lastBodyDisplay='inline-block'}
if(lastHeightModel&&lastHeightModel.shrinkWrap&&!ownerContext.heightModel.shrinkWrap){owner.body.dom.style.marginBottom=''}}
if(ownerContext.widthModel.auto){if(ownerContext.widthModel.shrinkWrap){owner.el.setWidth(null)}
owner.body.setWidth(null);if(frameBody){frameBody.setWidth(null)}}
if(ownerContext.heightModel.auto){owner.body.setHeight(null);if(frameBody){frameBody.setHeight(null)}}
if(ownerContext.collapsedVert){ownerContext.setContentHeight(0)}else if(ownerContext.collapsedHorz){ownerContext.setContentWidth(0)}
for(i=0;i<len;i++){item=docked[i].target;dock=item.dock;if(dock==='right'){item.setLocalX(0)}else if(dock!=='left'){continue}}},calculate:function(ownerContext){var me=this,measure=me.measureAutoDimensions(ownerContext,ownerContext.measureDimensions),state=ownerContext.state,horzDone=state.horzDone,vertDone=state.vertDone,bodyContext=ownerContext.bodyContext,framing,horz,vert,forward,backward;ownerContext.borderInfo||ownerContext.getBorderInfo();ownerContext.paddingInfo||ownerContext.getPaddingInfo();ownerContext.frameInfo||ownerContext.getFrameInfo();bodyContext.borderInfo||bodyContext.getBorderInfo();bodyContext.paddingInfo||bodyContext.getPaddingInfo();if(!ownerContext.frameBorder){if(!(framing=ownerContext.framing)){ownerContext.frameBorder=ownerContext.borderInfo;ownerContext.framePadding=ownerContext.paddingInfo}else{ownerContext.frameBorder=framing.border;ownerContext.framePadding=framing.padding}}
horz=!horzDone&&me.createAxis(ownerContext,measure.contentWidth,ownerContext.widthModel,me.horzAxisProps,ownerContext.collapsedHorz);vert=!vertDone&&me.createAxis(ownerContext,measure.contentHeight,ownerContext.heightModel,me.vertAxisProps,ownerContext.collapsedVert);for(forward=0,backward=ownerContext.dockedItems.length;backward--;++forward){if(horz){me.dockChild(ownerContext,horz,backward,forward)}
if(vert){me.dockChild(ownerContext,vert,backward,forward)}}
if(horz&&me.finishAxis(ownerContext,horz)){state.horzDone=horzDone=horz}
if(vert&&me.finishAxis(ownerContext,vert)){state.vertDone=vertDone=vert}
if(horzDone&&vertDone&&me.finishConstraints(ownerContext,horzDone,vertDone)){me.finishPositions(ownerContext,horzDone,vertDone)}else{me.done=!1}},createAxis:function(ownerContext,contentSize,sizeModel,axisProps,collapsedAxis){var me=this,begin=0,owner=me.owner,maxSize=owner[axisProps.maxSize],minSize=owner[axisProps.minSize]||0,dockBegin=axisProps.dockBegin,dockEnd=axisProps.dockEnd,posProp=axisProps.pos,sizeProp=axisProps.size,hasMaxSize=maxSize!=null,shrinkWrap=sizeModel.shrinkWrap,bodyContext,framing,padding,end;if(shrinkWrap){if(collapsedAxis){end=0}else{bodyContext=ownerContext.bodyContext;end=contentSize+bodyContext.borderInfo[sizeProp]}}else{framing=ownerContext.frameBorder;padding=ownerContext.framePadding;begin=framing[dockBegin]+padding[dockBegin];end=ownerContext.getProp(sizeProp)-(framing[dockEnd]+padding[dockEnd])}
return{shrinkWrap:sizeModel.shrinkWrap,sizeModel:sizeModel,initialBegin:begin,begin:begin,end:end,collapsed:collapsedAxis,horizontal:axisProps.horizontal,ignoreFrameBegin:null,ignoreFrameEnd:null,initialSize:end-begin,maxChildSize:0,hasMinMaxConstraints:(minSize||hasMaxSize)&&sizeModel.shrinkWrap,minSize:minSize,maxSize:hasMaxSize?maxSize:1e9,bodyPosProp:me.owner.manageHeight?posProp:axisProps.marginBegin,dockBegin:dockBegin,dockEnd:dockEnd,posProp:posProp,sizeProp:sizeProp,setSize:axisProps.setSize,shrinkWrapDock:ownerContext[axisProps.shrinkWrapDock],sizeModelName:axisProps.sizeModel,dockedPixelsEnd:0}},dockChild:function(ownerContext,axis,backward,forward){var me=this,itemContext=ownerContext.dockedItems[axis.shrinkWrap?backward:forward],item=itemContext.target,dock=item.dock,sizeProp=axis.sizeProp,pos,size;if(item.ignoreParentFrame&&ownerContext.isCollapsingOrExpanding){itemContext.clearMarginCache()}
if(!itemContext.marginInfo){itemContext.getMarginInfo()}
if(dock===axis.dockBegin){if(axis.shrinkWrap){pos=me.dockOutwardBegin(ownerContext,itemContext,item,axis)}else{pos=me.dockInwardBegin(ownerContext,itemContext,item,axis)}}else if(dock===axis.dockEnd){if(axis.shrinkWrap){pos=me.dockOutwardEnd(ownerContext,itemContext,item,axis)}else{pos=me.dockInwardEnd(ownerContext,itemContext,item,axis)}}else{if(axis.shrinkWrapDock){size=itemContext.getProp(sizeProp)+itemContext.marginInfo[sizeProp];axis.maxChildSize=Math.max(axis.maxChildSize,size);pos=0}else{pos=me.dockStretch(ownerContext,itemContext,item,axis)}}
itemContext.dockedAt[axis.posProp]=pos},dockInwardBegin:function(ownerContext,itemContext,item,axis){var pos=axis.begin,sizeProp=axis.sizeProp,ignoreParentFrame=item.ignoreParentFrame,delta,size,dock;if(ignoreParentFrame){axis.ignoreFrameBegin=itemContext;dock=item.dock;delta=ownerContext.frameBorder[dock];pos-=delta+ownerContext.framePadding[dock]}
if(!item.overlay){size=itemContext.getProp(sizeProp)+itemContext.marginInfo[sizeProp];axis.begin+=size;if(ignoreParentFrame){axis.begin-=delta}}
return pos},dockInwardEnd:function(ownerContext,itemContext,item,axis){var sizeProp=axis.sizeProp,size=itemContext.getProp(sizeProp)+itemContext.marginInfo[sizeProp],pos=axis.end-size,frameEnd;if(!item.overlay){axis.end=pos}
if(item.ignoreParentFrame){axis.ignoreFrameEnd=itemContext;frameEnd=ownerContext.frameBorder[item.dock];pos+=frameEnd+ownerContext.framePadding[item.dock];axis.end+=frameEnd}
return pos},dockOutwardBegin:function(ownerContext,itemContext,item,axis){var pos=axis.begin,sizeProp=axis.sizeProp,size;if(axis.collapsed){axis.ignoreFrameBegin=axis.ignoreFrameEnd=itemContext}else if(item.ignoreParentFrame){axis.ignoreFrameBegin=itemContext}
if(!item.overlay){size=itemContext.getProp(sizeProp)+itemContext.marginInfo[sizeProp];pos-=size;axis.begin=pos}
return pos},dockOutwardEnd:function(ownerContext,itemContext,item,axis){var pos=axis.end,sizeProp=axis.sizeProp,size;size=itemContext.getProp(sizeProp)+itemContext.marginInfo[sizeProp];if(axis.collapsed){axis.ignoreFrameBegin=axis.ignoreFrameEnd=itemContext}else if(item.ignoreParentFrame){axis.ignoreFrameEnd=itemContext}
if(!item.overlay){axis.end=pos+size;axis.dockedPixelsEnd+=size}
return pos},dockStretch:function(ownerContext,itemContext,item,axis){var dock=item.dock,sizeProp=axis.sizeProp,horizontal=dock==='top'||dock==='bottom',border=ownerContext.frameBorder,offsets=itemContext.offsets,padding=ownerContext.framePadding,endProp=horizontal?'right':'bottom',startProp=horizontal?'left':'top',pos=axis.begin+offsets[startProp],margin,size;if(item.stretch!==!1){size=axis.end-pos-offsets[endProp];if(item.ignoreParentFrame){pos-=padding[startProp]+border[startProp];size+=padding[sizeProp]+border[sizeProp]}
margin=itemContext.marginInfo;size-=margin[sizeProp];itemContext[axis.setSize](size)}
return pos},finishAxis:function(ownerContext,axis){if(isNaN(axis.maxChildSize)){return!1}
var axisBegin=axis.begin,size=axis.end-axisBegin,collapsed=axis.collapsed,setSizeMethod=axis.setSize,beginName=axis.dockBegin,endName=axis.dockEnd,padding=ownerContext.framePadding,border=ownerContext.frameBorder,borderBegin=border[beginName],framing=ownerContext.framing,framingBegin=framing&&framing[beginName],paddingBegin=collapsed?0:padding[beginName],sizeProp=axis.sizeProp,ignoreFrameBegin=axis.ignoreFrameBegin,ignoreFrameEnd=axis.ignoreFrameEnd,bodyContext=ownerContext.bodyContext,extraPaddingBegin=Math.max(borderBegin+paddingBegin-framingBegin,0),bodyPos,bodySize,delta,dirty;if(axis.shrinkWrap){bodySize=axis.initialSize;if(framing){delta=-axisBegin+borderBegin+paddingBegin;bodyPos=delta-framingBegin-extraPaddingBegin}else{bodyPos=-axisBegin;delta=bodyPos+paddingBegin}
if(!collapsed){size+=padding[sizeProp]}
if(ignoreFrameBegin){delta-=borderBegin;bodyPos-=borderBegin;ignoreFrameBegin.dockedAt[axis.posProp]-=paddingBegin}else{size+=borderBegin}
if(collapsed){}else if(ignoreFrameEnd){ignoreFrameEnd.dockedAt[axis.posProp]+=padding[endName]}else{size+=border[endName]}
axis.size=size;if(!axis.horizontal&&!this.owner.manageHeight){dirty=!1}}else{if(framing){delta=0;bodyPos=axisBegin-framingBegin-extraPaddingBegin}else{delta=-borderBegin;bodyPos=axisBegin-paddingBegin-borderBegin}
bodySize=size}
axis.delta=delta;bodyContext[setSizeMethod](bodySize,dirty);bodyContext.setProp(axis.bodyPosProp,bodyPos);return!isNaN(size)},beforeInvalidateShrinkWrapDock:function(itemContext,options){var sizeModelName=options.axis.sizeModelName;if(!itemContext[sizeModelName].constrainedMin){itemContext[sizeModelName]=Ext.layout.SizeModel.calculated}},afterInvalidateShrinkWrapDock:function(itemContext,options){var axis=options.axis,me=options.layout,pos;if(itemContext[axis.sizeModelName].calculated){pos=me.dockStretch(options.ownerContext,itemContext,itemContext.target,axis);itemContext.setProp(axis.posProp,axis.delta+pos)}},finishConstraints:function(ownerContext,horz,vert){var me=this,sizeModels=me.sizeModels,publishWidth=horz.shrinkWrap,publishHeight=vert.shrinkWrap,owner=me.owner,dirty,height,width,heightModel,widthModel,size,minSize,maxSize,maxChildSize,desiredSize;if(publishWidth){size=horz.size;minSize=horz.collapsed?0:horz.minSize;maxSize=horz.maxSize;maxChildSize=horz.maxChildSize;desiredSize=Math.max(size,maxChildSize);if(desiredSize>maxSize){widthModel=sizeModels.constrainedMax;width=maxSize}else if(desiredSize<minSize){widthModel=sizeModels.constrainedMin;width=minSize}else if(size<maxChildSize){widthModel=sizeModels.constrainedDock;owner.dockConstrainedWidth=width=maxChildSize}else{width=size}}
if(publishHeight){size=vert.size;minSize=vert.collapsed?0:vert.minSize;maxSize=vert.maxSize;maxChildSize=vert.maxChildSize;desiredSize=Math.max(size,maxChildSize+size-vert.initialSize);if(desiredSize>maxSize){heightModel=sizeModels.constrainedMax;height=maxSize}else if(desiredSize<minSize){heightModel=sizeModels.constrainedMin;height=minSize}else if(size<maxChildSize){heightModel=sizeModels.constrainedDock;owner.dockConstrainedHeight=height=maxChildSize}else{if(!ownerContext.collapsedVert&&!owner.manageHeight){dirty=!1;ownerContext.bodyContext.setProp('margin-bottom',vert.dockedPixelsEnd)}
height=size}}
if(widthModel||heightModel){if(widthModel&&heightModel&&widthModel.constrainedMax&&heightModel.constrainedByMin){ownerContext.invalidate({widthModel:widthModel});return!1}
if(!ownerContext.widthModel.calculatedFromShrinkWrap&&!ownerContext.heightModel.calculatedFromShrinkWrap){ownerContext.invalidate({widthModel:widthModel,heightModel:heightModel});return!1}}else{me.invalidateAxes(ownerContext,horz,vert)}
if(publishWidth){ownerContext.setWidth(width);if(widthModel){ownerContext.widthModel=widthModel}}
if(publishHeight){ownerContext.setHeight(height,dirty);if(heightModel){ownerContext.heightModel=heightModel}}
return!0},invalidateAxes:function(ownerContext,horz,vert){var before=this.beforeInvalidateShrinkWrapDock,after=this.afterInvalidateShrinkWrapDock,horzSize=horz.end-horz.begin,vertSize=vert.initialSize,invalidateHorz=horz.shrinkWrapDock&&horz.maxChildSize<=horzSize,invalidateVert=vert.shrinkWrapDock&&vert.maxChildSize<=vertSize,dockedItems,len,i,itemContext,itemSize,isHorz,axis,sizeProp;if(invalidateHorz||invalidateVert){if(invalidateVert){vert.begin=vert.initialBegin;vert.end=vert.begin+vert.initialSize}
dockedItems=ownerContext.dockedItems;for(i=0,len=dockedItems.length;i<len;++i){itemContext=dockedItems[i];isHorz=itemContext.horizontal;axis=null;if(invalidateHorz&&isHorz){sizeProp=horz.sizeProp;itemSize=horzSize;axis=horz}else if(invalidateVert&&!isHorz){sizeProp=vert.sizeProp;itemSize=vertSize;axis=vert}
if(axis){itemSize-=itemContext.getMarginInfo()[sizeProp];if(itemSize!==itemContext.props[sizeProp]){itemContext.invalidate({before:before,after:after,axis:axis,ownerContext:ownerContext,layout:this})}}}}},finishPositions:function(ownerContext,horz,vert){var dockedItems=ownerContext.dockedItems,length=dockedItems.length,deltaX=horz.delta,deltaY=vert.delta,index,itemContext;for(index=0;index<length;++index){itemContext=dockedItems[index];itemContext.setProp('x',deltaX+itemContext.dockedAt.x);itemContext.setProp('y',deltaY+itemContext.dockedAt.y)}},finishedLayout:function(ownerContext){var me=this,target=ownerContext.target;me.callParent(arguments);if(!ownerContext.animatePolicy){if(ownerContext.isCollapsingOrExpanding===1){target.afterCollapse(!1)}else if(ownerContext.isCollapsingOrExpanding===2){target.afterExpand(!1)}}},getAnimatePolicy:function(ownerContext){var me=this,lastCollapsedState,policy;if(ownerContext.isCollapsingOrExpanding===1){lastCollapsedState=me.lastCollapsedState}else if(ownerContext.isCollapsingOrExpanding===2){lastCollapsedState=ownerContext.lastCollapsedState}
if(lastCollapsedState==='left'||lastCollapsedState==='right'){policy=me.horizontalCollapsePolicy}else if(lastCollapsedState==='top'||lastCollapsedState==='bottom'){policy=me.verticalCollapsePolicy}
return policy},getDockedItems:function(order,beforeBody){var me=this,renderedOnly=(order==='visual'),all=renderedOnly?Ext.ComponentQuery.query('[rendered]',me.owner.dockedItems.items):me.owner.dockedItems.items,sort=all&&all.length&&order!==!1,renderOrder,dock,dockedItems,i,isBefore,length;if(beforeBody==null){dockedItems=sort&&!renderedOnly?all.slice():all}else{dockedItems=[];for(i=0,length=all.length;i<length;++i){dock=all[i].dock;isBefore=(dock==='top'||dock==='left');if(beforeBody?isBefore:!isBefore){dockedItems.push(all[i])}}
sort=sort&&dockedItems.length}
if(sort){renderOrder=(order=order||'render')==='render';Ext.Array.sort(dockedItems,function(a,b){var aw,bw;if(renderOrder&&((aw=me.owner.dockOrder[a.dock])!==(bw=me.owner.dockOrder[b.dock]))){if(!(aw+bw)){return aw-bw}}
aw=me.getItemWeight(a,order);bw=me.getItemWeight(b,order);if((aw!==undefined)&&(bw!==undefined)){return aw-bw}
return 0})}
return dockedItems||[]},getItemWeight:function(item,order){var weight=item.weight||this.owner.defaultDockWeights[item.dock];return weight[order]||weight},getLayoutItems:function(){var me=this,items,itemCount,item,i,result;if(me.owner.collapsed){result=me.owner.getCollapsedDockedItems()}else{items=me.getDockedItems('visual');itemCount=items.length;result=[];for(i=0;i<itemCount;i++){item=items[i];if(!item.hidden){result.push(item)}}}
return result},measureContentWidth:function(ownerContext){var bodyContext=ownerContext.bodyContext;return bodyContext.el.getWidth()-bodyContext.getBorderInfo().width},measureContentHeight:function(ownerContext){var bodyContext=ownerContext.bodyContext;return bodyContext.el.getHeight()-bodyContext.getBorderInfo().height},redoLayout:function(ownerContext){var me=this,owner=me.owner;if(ownerContext.isCollapsingOrExpanding===1){if(owner.reExpander){owner.reExpander.el.show()}
owner.addClsWithUI(owner.collapsedCls);ownerContext.redo(!0)}else if(ownerContext.isCollapsingOrExpanding===2){owner.removeClsWithUI(owner.collapsedCls);ownerContext.bodyContext.redo()}},getRenderTarget:function(){return this.owner.bodyWrap},renderChildren:function(){var me=this,items=me.getDockedItems(),target=me.getRenderTarget();me.handleItemBorders();me.renderItems(items,target)},renderItems:function(items,target){var me=this,owner=me.owner,dockedItemIds={},dockedItemCount=items.length,bodyDom=owner.body.dom,bodyWrapDom=owner.bodyWrap.dom,hasFrame=!!owner.frameSize,bodyContainer=owner.bodyContainer,childNodes,childNodeCount,hasDockedToEl,item,dom,elFound,gap,bodyBaseIndex,bodyDockIndex,wrapBaseIndex,wrapDockIndex,i,insertPosition,insertTarget;if(dockedItemCount){for(i=0;i<dockedItemCount;i++){item=items[i];dockedItemIds[item.id]=item;if(item.dockToEl){hasDockedToEl=!0}}
childNodes=me.getRenderTarget().dom.childNodes;childNodeCount=childNodes.length;gap=0;for(i=0;i<childNodeCount;++i){dom=childNodes[i];elFound=dom===bodyDom;if(elFound){bodyBaseIndex=i;break}
if(dockedItemIds[dom.id]){++gap}}
if(!elFound){Ext.log.error('Dock layout error for '+owner.id+': bodyEl not found!')}
bodyBaseIndex-=gap;if(hasDockedToEl){elFound=!1;gap=0;childNodes=owner.el.dom.childNodes;childNodeCount=childNodes.length;for(i=0;i<childNodeCount;i++){dom=childNodes[i];if(hasFrame){elFound=dom===bodyWrapDom||dom===bodyContainer;if(!elFound&&Ext.fly(dom).contains(bodyWrapDom)){elFound=!0;owner.bodyContainer=dom}}else{elFound=dom===bodyWrapDom}
if(elFound){wrapBaseIndex=i;break}
if(dockedItemIds[dom.id]){++gap}}
if(!elFound){Ext.log.error('Dock layout error for '+owner.id+': bodyWrapEl not found!')}
wrapBaseIndex-=gap}
bodyDockIndex=wrapDockIndex=0;for(i=0;i<dockedItemCount;i++){item=items[i];if(item.dockToEl){insertTarget=owner.el;insertPosition=wrapBaseIndex+wrapDockIndex++;if(item.dock==='right'||item.dock==='bottom'){insertPosition++;if(hasFrame){insertPosition++}}else if(hasFrame&&insertPosition>0){insertPosition--}}else{insertTarget=target;insertPosition=bodyBaseIndex+bodyDockIndex++;if(item.dock==='right'||item.dock==='bottom'){insertPosition++}}
if(!item.rendered){me.renderItem(item,insertTarget,insertPosition)}else if(!me.isValidParent(item,insertTarget,insertPosition)){me.moveItem(item,insertTarget,insertPosition)}}}},undoLayout:function(ownerContext){var me=this,owner=me.owner;if(ownerContext.isCollapsingOrExpanding===1){if(owner.reExpander){owner.reExpander.el.hide()}
owner.removeClsWithUI(owner.collapsedCls);ownerContext.undo(!0)}else if(ownerContext.isCollapsingOrExpanding===2){owner.addClsWithUI(owner.collapsedCls);ownerContext.bodyContext.undo()}},sizePolicy:{nostretch:{setsWidth:0,setsHeight:0},horz:{shrinkWrap:{setsWidth:1,setsHeight:0,readsWidth:1},stretch:{setsWidth:1,setsHeight:0}},vert:{shrinkWrap:{setsWidth:0,setsHeight:1,readsHeight:1},stretch:{setsWidth:0,setsHeight:1}},stretchV:{setsWidth:0,setsHeight:1},autoStretchH:{readsWidth:1,setsWidth:1,setsHeight:0},autoStretchV:{readsHeight:1,setsWidth:0,setsHeight:1}},getItemSizePolicy:function(item,ownerSizeModel){var me=this,policy=me.sizePolicy,shrinkWrapDock=me.owner.shrinkWrapDock,dock,vertical;if(item.stretch===!1){return policy.nostretch}
dock=item.dock;vertical=(dock==='left'||dock==='right');shrinkWrapDock=shrinkWrapDock===!0?3:(shrinkWrapDock||0);if(vertical){policy=policy.vert;shrinkWrapDock=shrinkWrapDock&1}else{policy=policy.horz;shrinkWrapDock=shrinkWrapDock&2}
if(shrinkWrapDock){if(!ownerSizeModel){ownerSizeModel=me.owner.getSizeModel()}
if(ownerSizeModel[vertical?'height':'width'].shrinkWrap){return policy.shrinkWrap}}
return policy.stretch},configureItem:function(item,pos){this.callParent(arguments);item.addCls(this._itemCls);if(!item.ignoreBorderManagement){item.addClsWithUI(this.getDockCls(item.dock))}},getDockCls:function(dock){return'docked-'+dock},afterRemove:function(item){var dom;this.callParent(arguments);item.removeCls(this._itemCls);if(!item.ignoreBorderManagement){item.removeClsWithUI(this.getDockCls(item.dock))}
dom=item.el&&item.el.dom;if(dom&&!item.destroying){dom.parentNode.removeChild(dom)}
this.childrenChanged=!0},borderCollapseMap:{},getBorderCollapseTable:function(){var me=this,map=me.borderCollapseMap,owner=me.owner,baseCls=owner.baseCls,ui=owner.ui,table;map=map[baseCls]||(map[baseCls]={});table=map[ui];if(!table){baseCls+='-'+ui+'-outer-border-';map[ui]=table=[0,baseCls+'l',baseCls+'b',baseCls+'bl',baseCls+'r',baseCls+'rl',baseCls+'rb',baseCls+'rbl',baseCls+'t',baseCls+'tl',baseCls+'tb',baseCls+'tbl',baseCls+'tr',baseCls+'trl',baseCls+'trb',baseCls+'trbl']}
return table}})
;
Ext.define('Ext.rtl.layout.component.Dock',{override:'Ext.layout.component.Dock',rtlPositions:{top:'top',right:'left',bottom:'bottom',left:'right'},getDockCls:function(dock){return'docked-'+(this.owner.getInherited().rtl?this.rtlPositions[dock]:dock)},getBorderClassTable:function(){var me=this;if(!me.borderTablesInited){me.initBorderTables()}
return me.owner.getInherited().rtl?me.noBorderClassTableRtl:me.noBorderClassTableLtr},getBorderCollapseTable:function(){var me=this,table=me.callParent();if(!table.rtl){me.setupBorderTable(table,table.rtl=[])}
return me.owner.getInherited().rtl?table.rtl:table},initBorderTables:function(){var me=Ext.layout.component.Dock.prototype,ltr=me.noBorderClassTable,rtl=[];me.setupBorderTable(ltr,rtl);me.noBorderClassTableLtr=ltr;me.noBorderClassTableRtl=rtl;me.borderTablesInited=!0},setupBorderTable:function(ltr,rtl){rtl[0]=ltr[0];rtl[1]=ltr[4];rtl[2]=ltr[2];rtl[3]=ltr[6];rtl[4]=ltr[1];rtl[5]=ltr[5];rtl[6]=ltr[3];rtl[7]=ltr[7];rtl[8]=ltr[8];rtl[9]=ltr[12];rtl[10]=ltr[10];rtl[11]=ltr[14];rtl[12]=ltr[9];rtl[13]=ltr[13];rtl[14]=ltr[11];rtl[15]=ltr[15]}})
;
Ext.define('Ext.theme.neptune.layout.component.Dock',{override:'Ext.layout.component.Dock',noBorderClassTable:[0,Ext.baseCSSPrefix+'noborder-l',Ext.baseCSSPrefix+'noborder-b',Ext.baseCSSPrefix+'noborder-bl',Ext.baseCSSPrefix+'noborder-r',Ext.baseCSSPrefix+'noborder-rl',Ext.baseCSSPrefix+'noborder-rb',Ext.baseCSSPrefix+'noborder-rbl',Ext.baseCSSPrefix+'noborder-t',Ext.baseCSSPrefix+'noborder-tl',Ext.baseCSSPrefix+'noborder-tb',Ext.baseCSSPrefix+'noborder-tbl',Ext.baseCSSPrefix+'noborder-tr',Ext.baseCSSPrefix+'noborder-trl',Ext.baseCSSPrefix+'noborder-trb',Ext.baseCSSPrefix+'noborder-trbl'],edgeMasks:{top:8,right:4,bottom:2,left:1},handleItemBorders:function(){var me=this,edges=0,maskT=8,maskR=4,maskB=2,maskL=1,owner=me.owner,bodyBorder=owner.bodyBorder,ownerBorder=owner.border,collapsed=me.collapsed,edgeMasks=me.edgeMasks,noBorderCls=me.noBorderClassTable,dockedItemsGen=owner.dockedItems.generation,b,borderCls,docked,edgesTouched,i,ln,item,dock,lastValue,mask,addCls,removeCls;if(me.initializedBorders===dockedItemsGen){return}
addCls=[];removeCls=[];borderCls=me.getBorderCollapseTable();noBorderCls=me.getBorderClassTable?me.getBorderClassTable():noBorderCls;me.initializedBorders=dockedItemsGen;me.collapsed=!1;docked=me.getDockedItems('visual');me.collapsed=collapsed;for(i=0,ln=docked.length;i<ln;i++){item=docked[i];if(item.ignoreBorderManagement){continue}
dock=item.dock;mask=edgesTouched=0;addCls.length=0;removeCls.length=0;if(dock!=='bottom'){if(edges&maskT){b=item.border}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskT}}
if(b===!1){mask+=maskT}}
if(dock!=='left'){if(edges&maskR){b=item.border}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskR}}
if(b===!1){mask+=maskR}}
if(dock!=='top'){if(edges&maskB){b=item.border}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskB}}
if(b===!1){mask+=maskB}}
if(dock!=='right'){if(edges&maskL){b=item.border}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskL}}
if(b===!1){mask+=maskL}}
if((lastValue=item.lastBorderMask)!==mask){item.lastBorderMask=mask;if(lastValue){removeCls[0]=noBorderCls[lastValue]}
if(mask){addCls[0]=noBorderCls[mask]}}
if((lastValue=item.lastBorderCollapse)!==edgesTouched){item.lastBorderCollapse=edgesTouched;if(lastValue){removeCls[removeCls.length]=borderCls[lastValue]}
if(edgesTouched){addCls[addCls.length]=borderCls[edgesTouched]}}
if(removeCls.length){item.removeCls(removeCls)}
if(addCls.length){item.addCls(addCls)}
edges|=edgeMasks[dock]}
mask=edgesTouched=0;addCls.length=0;removeCls.length=0;if(edges&maskT){b=bodyBorder}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskT}}
if(b===!1){mask+=maskT}
if(edges&maskR){b=bodyBorder}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskR}}
if(b===!1){mask+=maskR}
if(edges&maskB){b=bodyBorder}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskB}}
if(b===!1){mask+=maskB}
if(edges&maskL){b=bodyBorder}else{b=ownerBorder;if(b!==!1){edgesTouched+=maskL}}
if(b===!1){mask+=maskL}
if((lastValue=me.lastBodyBorderMask)!==mask){me.lastBodyBorderMask=mask;if(lastValue){removeCls[0]=noBorderCls[lastValue]}
if(mask){addCls[0]=noBorderCls[mask]}}
if((lastValue=me.lastBodyBorderCollapse)!==edgesTouched){me.lastBodyBorderCollapse=edgesTouched;if(lastValue){removeCls[removeCls.length]=borderCls[lastValue]}
if(edgesTouched){addCls[addCls.length]=borderCls[edgesTouched]}}
if(removeCls.length){owner.removeBodyCls(removeCls)}
if(addCls.length){owner.addBodyCls(addCls)}},onRemove:function(item){var me=this,lastBorderMask=item.lastBorderMask,lastBorderCollapse=item.lastBorderCollapse;if(!item.destroyed&&!item.ignoreBorderManagement){if(lastBorderMask){item.lastBorderMask=0;item.removeCls(me.noBorderClassTable[lastBorderMask])}
if(lastBorderCollapse){item.lastBorderCollapse=0;item.removeCls(me.getBorderCollapseTable()[lastBorderCollapse])}}
me.callParent([item])}})
;
Ext.define('Ext.util.Memento',(function(){function captureOne(src,target,prop,prefix){src[prefix?prefix+prop:prop]=target[prop]}
function removeOne(src,target,prop){delete src[prop]}
function restoreOne(src,target,prop,prefix){var name=prefix?prefix+prop:prop,value=src[name];if(value||src.hasOwnProperty(name)){restoreValue(target,prop,value)}}
function restoreValue(target,prop,value){if(Ext.isDefined(value)){target[prop]=value}else{delete target[prop]}}
function doMany(doOne,src,target,props,prefix){var p,pLen;if(src){if(Ext.isArray(props)){for(p=0,pLen=props.length;p<pLen;p++){doOne(src,target,props[p],prefix)}}else{doOne(src,target,props,prefix)}}}
return{data:null,target:null,constructor:function(target,props){this.data={};if(target){this.target=target;if(props){this.capture(props)}}},capture:function(props,target,prefix){var me=this;doMany(captureOne,me.data||(me.data={}),target||me.target,props,prefix)},remove:function(props){doMany(removeOne,this.data,null,props)},restore:function(props,clear,target,prefix){doMany(restoreOne,this.data,target||this.target,props,prefix);if(clear!==!1){this.remove(props)}},restoreAll:function(clear,target){var me=this,t=target||this.target,data=me.data,prop;clear=clear!==!1;for(prop in data){if(data.hasOwnProperty(prop)){restoreValue(t,prop,data[prop]);if(clear){delete data[prop]}}}}}}()))
;
Ext.define('Ext.container.DockingContainer',{requires:['Ext.util.MixedCollection','Ext.Element'],isDockingContainer:!0,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},dockOrder:{top:-1,left:-1,right:1,bottom:1},horizontalDocks:0,addDocked:function(items,pos){var me=this,rendered=me.rendered,i=0,dockedItems=me.dockedItems,lastIndex=dockedItems.getCount(),index,instanced,item,length;items=me.prepareItems(items);length=items.length;if(rendered){Ext.suspendLayouts()}
if(pos===undefined){pos=lastIndex}else{pos=Math.min(pos,lastIndex)}
for(;i<length;i++){item=items[i];if(item.isDetached){item.reattachToBody()}
item.dock=item.dock||'top';if(item.dock==='left'||item.dock==='right'){me.horizontalDocks++}
index=pos+i;dockedItems.insert(index,item);instanced=!!item.instancedCmp;delete item.instancedCmp;item.onAdded(me,index,instanced);delete item.$initParent;if(me.onDockedAdd!==Ext.emptyFn){me.onDockedAdd(item)}
if(me.hasListeners.dockedadd){me.fireEvent('dockedadd',me,item,index)}}
if(me.rendered){me.updateLayout();Ext.resumeLayouts(!0)}
return items},destroyDockedItems:function(){var dockedItems=this.dockedItems,c;if(dockedItems){while((c=dockedItems.first())){this.removeDocked(c,{destroy:!0})}}},doRenderDockedItems:function(out,renderData,after){var me=renderData.$comp,layout=me.componentLayout,tabGuard=me.tabGuard&&me.lookupTpl('tabGuardTpl'),items,tree;if(layout.getDockedItems){items=layout.getDockedItems('render',!after);tree=items&&layout.getItemsRenderTree(items);if(tree){Ext.DomHelper.generateMarkup(tree,out)}}},getDockedComponent:function(comp){if(Ext.isObject(comp)){comp=comp.getItemId()}
return this.dockedItems.get(comp)},getDockedItems:function(selector,beforeBody){var dockedItems=this.getComponentLayout().getDockedItems('render',beforeBody);if(selector&&dockedItems.length){dockedItems=Ext.ComponentQuery.query(selector,dockedItems)}
return dockedItems},getDockingRefItems:function(deep,containerItems){var selector=deep&&'*,* *',dockedItems=this.getDockedItems(selector,!0),items;dockedItems.push.apply(dockedItems,containerItems);items=this.getDockedItems(selector,!1);dockedItems.push.apply(dockedItems,items);return dockedItems},initDockingItems:function(){var me=this,items=me.dockedItems;if(!items||!items.isMixedCollection){me.dockedItems=new Ext.util.ItemCollection();if(items){me.addDocked(items)}}},insertDocked:function(pos,items){this.addDocked(items,pos)},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,removeDocked:function(item,flags){var me=this,layout,hasLayout,doDestroy,doDetach;if(!me.dockedItems.contains(item)){return item}
if(flags==null){doDestroy=me.autoDestroy}else if(typeof flags==='boolean'){doDestroy=flags}else{doDestroy=('destroy' in flags)&&flags.destroy;doDetach=('detach' in flags)&&flags.detach}
if(item.dock==='left'||item.dock==='right'){me.horizontalDocks--}
layout=me.componentLayout;hasLayout=layout&&me.rendered;if(hasLayout){layout.onRemove(item)}
me.dockedItems.remove(item);if(!item.destroyed){item.onRemoved(item.destroying||doDestroy)}
me.onDockedRemove(item);if(doDestroy){item.destroy()}else if(!me.destroyed){if(hasLayout){layout.afterRemove(item)}
if(doDetach&&item.rendered){item.detachFromBody()}}
if(me.hasListeners.dockedremove){me.fireEvent('dockedremove',me,item)}
if(!me.destroying){me.updateLayout()}
return item},moveDocked:function(item,side){var me=this;if(me.rendered){Ext.suspendLayouts()}
me.removeDocked(item,{destroy:!1,detach:!0});item.dock=side;me.addDocked(item);if(me.rendered){if(item.frame){item.updateFrame()}
Ext.resumeLayouts(!0)}},setupDockingRenderTpl:function(renderTpl){renderTpl.renderDockedItems=this.doRenderDockedItems}})
;
Ext.define('Ext.panel.Panel',{extend:'Ext.container.Container',alias:'widget.panel',alternateClassName:'Ext.Panel',requires:['Ext.panel.Header','Ext.util.MixedCollection','Ext.toolbar.Toolbar','Ext.fx.Anim','Ext.panel.DD','Ext.XTemplate','Ext.layout.component.Dock','Ext.util.Memento'],mixins:{docking:'Ext.container.DockingContainer'},childEls:['bodyWrap','body'],renderTpl:['<tpl if="headingText">','<div id="{id}-headingEl" data-ref="headingEl" role="heading"',' class="',Ext.baseCSSPrefix,'hidden-clip" style="height:0">','{headingText}','</div>','</tpl>','<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'before\'); %}</tpl>','<div id="{id}-bodyWrap" data-ref="bodyWrap" class="{baseCls}-bodyWrap"','<tpl if="bodyWrapAriaAttributes">','<tpl foreach="bodyWrapAriaAttributes"> {$}="{.}"</tpl>','<tpl else>',' role="presentation"','</tpl>','>','{% this.renderDockedItems(out,values,0); %}','<div id="{id}-body" data-ref="body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>{childElCls}"','<tpl if="bodyAriaAttributes">','<tpl foreach="bodyAriaAttributes"> {$}="{.}"</tpl>','<tpl else>',' role="presentation"','</tpl>','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>','{%this.renderContainer(out,values);%}','</div>','{% this.renderDockedItems(out,values,1); %}','</div>','<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'after\'); %}</tpl>'],headerPosition:'top',iconAlign:'left',titleAlign:'left',titleRotation:'default',titlePosition:0,headerConfigs:{glyph:1,icon:1,iconAlign:1,iconCls:1,title:1,titleAlign:1,titlePosition:1,titleRotation:1},beforeRenderConfig:{glyph:null,headerPosition:null,icon:null,iconAlign:null,iconCls:null,title:null,titleAlign:null,titlePosition:null,titleRotation:null},animCollapse:Ext.enableFx,border:!0,closable:!1,closeAction:'destroy',closeToolText:'Close panel',collapsed:!1,collapsedCls:'collapsed',collapseFirst:!0,collapsible:undefined,collapseToolText:'Collapse panel',expandToolText:'Expand panel',constrain:!1,constrainHeader:!1,dockedItems:null,tbar:null,bbar:null,fbar:null,lbar:null,rbar:null,buttons:null,floatable:!0,frame:!1,frameHeader:!0,hideCollapseTool:!1,manageHeight:!0,maskElement:'el',minButtonWidth:75,preventHeader:!1,maintainTitlePosition:!1,shrinkWrapDock:!1,titleCollapse:undefined,baseCls:Ext.baseCSSPrefix+'panel',bodyPosProps:{x:'x',y:'y'},componentLayout:'dock',contentPaddingProperty:'bodyPadding',emptyArray:[],isPanel:!0,defaultBindProperty:'title',addBodyCls:function(cls){var me=this,body=me.rendered?me.body:me.getProtoBody();body.addCls(cls);return me},addTool:function(tools){if(!Ext.isArray(tools)){tools=[tools]}
var me=this,header=me.header,len=tools.length,curTools=me.tools,t,tool;if(!header||!header.isHeader){header=null;if(!curTools){me.tools=curTools=[]}}
for(t=0;t<len;t++){tool=tools[t];if(typeof tool!=='string'&&!tool.isTool){tool=Ext.apply({},tool)}
tool.toolOwner=me;if(header){header.addTool(tool)}else{curTools.push(tool)}}
me.updateHeader()},addTools:Ext.emptyFn,getClosable:function(){return this.closable},setClosable:function(closable){var me=this,tab=me.tab;closable=!!closable;if(me.closable!==closable){me.closable=closable;if(tab){tab.setClosable(closable)}}},setCollapsible:function(collapsible){var me=this,current=me.collapsible,collapseTool=me.collapseTool;me.collapsible=collapsible;if(collapsible&&!current){me.updateCollapseTool();collapseTool=me.collapseTool;if(collapseTool){collapseTool.show()}}else if(!collapsible&&current){if(collapseTool){collapseTool.hide()}}},addUIClsToElement:function(cls){var me=this,result=me.callParent(arguments);me.addBodyCls([Ext.baseCSSPrefix+cls,me.baseCls+'-body-'+cls,me.baseCls+'-body-'+me.ui+'-'+cls]);return result},afterCollapse:function(animated){var me=this,ownerLayout=me.ownerLayout;me.isCollapsingOrExpanding=0;me.updateCollapseTool();if(animated){me.removeCls(Ext.baseCSSPrefix+'animating-size')}
if(ownerLayout){ownerLayout.afterCollapse(me,animated)}
me.setHiddenDocked();me.fireEvent('collapse',me)},afterExpand:function(animated){var me=this,ownerLayout=me.ownerLayout;me.isCollapsingOrExpanding=0;me.updateCollapseTool();if(animated){me.removeCls(Ext.baseCSSPrefix+'animating-size')}
if(ownerLayout){ownerLayout.afterExpand(me,animated)}
me.fireEvent('expand',me);me.fireHierarchyEvent('expand')},doDestroy:function(){var me=this;if(me.slideOutTask){me.slideOutTask.cancel()}
Ext.destroy(me.placeholder,me.ghostPanel,me.dd,me.accordionHeaderKeyNav,me.accordionBodyKeyNav,me.defaultButtonKeyNav);me.destroyDockedItems();me.callParent()},beforeRender:function(){var me=this,wasCollapsed;me.getProtoBody();me.callParent();me.initTools();if(!(me.preventHeader||(me.header===!1))||me.isViewportBorderChild){me.updateHeader()}
me.afterHeaderInit=!0;if(me.collapsed){if(me.isPlaceHolderCollapse()){if(!me.hidden){me.setHiddenState(!0);me.preventCollapseFire=!0;me.placeholderCollapse();delete me.preventCollapseFire;wasCollapsed=me.collapsed;me.collapsed=!1}}else{me.beginCollapse();me.addClsWithUI(me.collapsedCls)}}
if(wasCollapsed){me.collapsed=wasCollapsed}},getMemento:function(name){var me=this;if(name&&typeof name==='string'){name+='Memento';return me[name]||(me[name]=new Ext.util.Memento(me))}},beginCollapse:function(){var me=this,lastBox=me.lastBox,rendered=me.rendered,collapseMemento=me.getMemento('collapse'),sizeModel=me.getSizeModel(),header=me.header,reExpander;collapseMemento.capture(['height','minHeight','width','minWidth']);if(lastBox){collapseMemento.capture(me.restoreDimension(),lastBox,'last.')}
if(me.collapsedVertical()){if(sizeModel.width.shrinkWrap){me.width=rendered?me.getWidth():me.width||me.minWidth||100}
delete me.height;me.minHeight=0}else if(me.collapsedHorizontal()){if(sizeModel.height.shrinkWrap){me.height=rendered?me.getHeight():me.height||me.minHeight||100}
delete me.width;me.minWidth=0}
if(me.ownerCt){me.ownerCt.getLayout().beginCollapse(me)}
if(!me.isPlaceHolderCollapse()&&header!==!1){if(header===(reExpander=me.getReExpander())){header.collapseImmune=!0;header.getInherited().collapseImmune=!0;header.addClsWithUI(me.getHeaderCollapsedClasses(header));if(header.rendered){header.updateFrame()}}else if(reExpander.el){reExpander.el.show();reExpander.hidden=!1}}
if(me.resizer){me.resizer.disable()}
if(me.rendered){me.ariaEl.dom.setAttribute('aria-expanded',!1);if(me.isAccordionPanel){me.body.dom.setAttribute('aria-hidden',!0)}}},beginDrag:function(){if(this.floatingDescendants){this.floatingDescendants.hide()}},beginExpand:function(){var me=this,lastBox=me.lastBox,collapseMemento=me.getMemento('collapse'),restoreDimension=me.restoreDimension(),header=me.header,reExpander;if(collapseMemento){collapseMemento.restore(['minHeight','minWidth',restoreDimension]);if(lastBox){collapseMemento.restore(restoreDimension,!0,lastBox,'last.')}}
if(me.ownerCt){me.ownerCt.getLayout().beginExpand(me)}
if(!me.isPlaceHolderCollapse()&&header!==!1){if(header===(reExpander=me.getReExpander())){delete header.collapseImmune;delete header.getInherited().collapseImmune;header.removeClsWithUI(me.getHeaderCollapsedClasses(header));if(header.rendered){header.expanding=!0;header.updateFrame();delete header.expanding}}else{reExpander.hidden=!0;reExpander.el.hide()}}
if(me.resizer){me.resizer.enable()}
if(me.rendered){me.ariaEl.dom.setAttribute('aria-expanded',!0);if(me.isAccordionPanel){me.body.dom.setAttribute('aria-hidden',!1)}}},bridgeToolbars:function(){var me=this,docked=[],minButtonWidth=me.minButtonWidth,fbar,fbarDefaults,fbarIsButtons;function initToolbar(toolbar,pos,useButtonAlign,disableFocusableContainer){if(Ext.isArray(toolbar)){toolbar={xtype:'toolbar',items:toolbar}}else if(!toolbar.isComponent){toolbar=Ext.apply({},toolbar)}
if(!toolbar.xtype){toolbar.xtype='toolbar'}
toolbar.dock=pos;if(disableFocusableContainer){toolbar.focusableContainer=!1}
if(useButtonAlign){toolbar.layout=Ext.apply({pack:{left:'start',center:'center'}[me.buttonAlign]||'end'},toolbar.layout)}
return toolbar}
if(me.tbar){docked.push(initToolbar(me.tbar,'top'));me.tbar=null}
if(me.bbar){docked.push(initToolbar(me.bbar,'bottom'));me.bbar=null}
if(me.buttons){me.fbar=me.buttons;me.buttons=null;fbarIsButtons=!0}
if(me.fbar){fbar=initToolbar(me.fbar,'bottom',!0,fbarIsButtons);fbar.ui='footer';if(minButtonWidth){fbarDefaults=fbar.defaults;fbar.defaults=function(config){var defaults=fbarDefaults||{},isButton=!config.xtype||config.isButton,cls;if(!isButton){cls=Ext.ClassManager.getByAlias('widget.'+config.xtype);if(cls){isButton=cls.prototype.isButton}}
if(isButton&&!('minWidth' in defaults)){defaults=Ext.apply({minWidth:minButtonWidth},defaults)}
return defaults}}
docked.push(fbar);me.fbar=null}
if(me.lbar){docked.push(initToolbar(me.lbar,'left'));me.lbar=null}
if(me.rbar){docked.push(initToolbar(me.rbar,'right'));me.rbar=null}
if(me.dockedItems){if(me.dockedItems.isMixedCollection){me.addDocked(docked)}else{if(!Ext.isArray(me.dockedItems)){me.dockedItems=[me.dockedItems]}
me.dockedItems=me.dockedItems.concat(docked)}}else{me.dockedItems=docked}},close:function(){if(this.fireEvent('beforeclose',this)!==!1){this.doClose()}},collapse:function(direction,animate){var me=this,collapseDir=direction||me.collapseDirection,ownerCt=me.ownerCt,layout=me.ownerLayout,rendered=me.rendered;if(me.isCollapsingOrExpanding){return me}
if(arguments.length<2){animate=me.animCollapse}
if(me.collapsed||me.fireEvent('beforecollapse',me,direction,animate)===!1){return me}
if(layout&&layout.onBeforeComponentCollapse){if(layout.onBeforeComponentCollapse(me)===!1){return me}}
if(rendered&&ownerCt&&me.isPlaceHolderCollapse()){return me.placeholderCollapse(direction,animate)}
me.collapsed=collapseDir;if(rendered){me.beginCollapse()}
me.getInherited().collapsed=!0;me.fireHierarchyEvent('collapse');if(rendered){me.doCollapseExpand(1,animate)}
return me},collapsedHorizontal:function(){var dir=this.getCollapsed();return dir==='left'||dir==='right'},collapsedVertical:function(){var dir=this.getCollapsed();return dir==='top'||dir==='bottom'},convertCollapseDir:function(collapseDir){return collapseDir.substr(0,1)},createGhost:function(cls){var me=this,header=me.header,frame=me.frame&&!me.alwaysFramed;return{xtype:'panel',hidden:!1,header:header?{titleAlign:header.getTitleAlign()}:null,ui:frame?me.ui.replace(/-framed$/,''):me.ui,id:me.id+'-ghost',renderTo:Ext.getBody(),resizable:!1,draggable:!1,closable:!1,focusable:!1,floating:!0,alignOnScroll:!1,shadow:!1,frame:frame,shim:me.shim,alwaysFramed:me.alwaysFramed,overlapHeader:me.overlapHeader,headerPosition:me.getHeaderPosition(),titleRotation:me.getTitleRotation(),baseCls:me.baseCls,getRefOwner:function(){return me.getRefOwner()},cls:me.baseCls+'-ghost '+(cls||'')}},createReExpander:function(direction,defaults){var me=this,isLeft=direction==='left',isRight=direction==='right',isVertical=isLeft||isRight,ownerCt=me.ownerCt,header=me.header,result=Ext.apply({hideMode:'offsets',title:me.getTitle(),titleAlign:me.getTitleAlign(),titlePosition:me.getTitlePosition(),vertical:isVertical,textCls:me.headerTextCls,icon:me.getIcon(),iconCls:me.getIconCls(),iconAlign:me.getIconAlign(),glyph:me.getGlyph(),baseCls:me.self.prototype.baseCls+'-header',ui:me.ui,frame:me.frame&&me.frameHeader,ignoreParentFrame:me.frame||me.overlapHeader,ignoreBorderManagement:me.frame||me.ignoreHeaderBorderManagement,indicateDrag:me.draggable,collapseImmune:!0,ariaRole:me.ariaRole,preventRefocus:!0,ownerCt:(ownerCt&&me.collapseMode==='placeholder')?ownerCt:me,ownerLayout:me.componentLayout,forceOrientation:!0,margin:me.margin,defaultFocus:'tool[isDefaultExpandTool]'},defaults);if(me.collapseMode==='mini'){if(isVertical){result.width=1}else{result.height=1}}
if(header){Ext.apply(result,{focusableContainer:header.focusableContainer,activeChildTabIndex:header.activeChildTabIndex,inactiveChildTabIndex:header.inactiveChildTabIndex,allowFocusingDisabledChildren:header.allowFocusingDisabledChildren})}
if(!me.hideCollapseTool){if(!me.maintainTitlePosition&&(isLeft||(isRight&&me.isPlaceHolderCollapse()))){result.titlePosition=1}
result.tools=[{xtype:'tool',type:'expand-'+me.getOppositeDirection(direction),isDefaultExpandTool:!0,uiCls:['top'],handler:me.toggleCollapse,scope:me,tooltip:me.expandToolText}]}
result=new Ext.panel.Header(result);result.addClsWithUI(me.getHeaderCollapsedClasses(result));result.expandTool=result.down('tool[isDefaultExpandTool=true]');return result},doClose:function(){this.fireEvent('close',this);this[this.closeAction]()},doCollapseExpand:function(flags,animate){var me=this,originalAnimCollapse=me.animCollapse,ownerLayout=me.ownerLayout;me.animCollapse=animate;me.isCollapsingOrExpanding=flags;if(animate){me.addCls(Ext.baseCSSPrefix+'animating-size')}
if(ownerLayout&&!animate){ownerLayout.onContentChange(me)}else{me.updateLayout({isRoot:!0})}
me.animCollapse=originalAnimCollapse;return me},endDrag:function(){if(this.floatingDescendants){this.floatingDescendants.show()}},expand:function(animate){var me=this,layout=me.ownerLayout,rendered=me.rendered;if(me.isCollapsingOrExpanding){return me}
if(!arguments.length){animate=me.animCollapse}
if(!me.collapsed&&!me.floatedFromCollapse){return me}
if(me.fireEvent('beforeexpand',me,animate)===!1){return me}
if(layout&&layout.onBeforeComponentExpand){if(layout.onBeforeComponentExpand(me)===!1){return me}}
delete me.getInherited().collapsed;if(rendered&&me.isPlaceHolderCollapse()){return me.placeholderExpand(animate)}
me.restoreHiddenDocked();if(rendered){me.beginExpand()}
me.collapsed=!1;if(me.rendered){me.doCollapseExpand(2,animate)}
return me},findReExpander:function(direction){var me=this,c=Ext.Component,dockedItems=me.dockedItems.items,dockedItemCount=dockedItems.length,comp,i;if(me.collapseMode==='mini'){return}
switch(direction){case c.DIRECTION_TOP:case c.DIRECTION_BOTTOM:for(i=0;i<dockedItemCount;i++){comp=dockedItems[i];if(!comp.hidden){if(comp.isHeader&&(!comp.dock||comp.dock==='top'||comp.dock==='bottom')){return comp}}}
break;case c.DIRECTION_LEFT:case c.DIRECTION_RIGHT:for(i=0;i<dockedItemCount;i++){comp=dockedItems[i];if(!comp.hidden){if(comp.isHeader&&(comp.dock==='left'||comp.dock==='right')){return comp}}}
break;default:throw new Error('Panel#findReExpander must be passed a valid collapseDirection')}},floatCollapsedPanel:function(){var me=this,placeholder=me.placeholder,splitter=me.splitter,phBox=Ext.util.Region.from(placeholder.getBox(!1,!0)),floatCls=Ext.panel.Panel.floatCls,collapsed=me.collapsed,layoutOwner=me.ownerCt||me,slideDirection,myBox,hoverlisteners={mouseleave:me.onMouseLeaveFloated,mouseenter:me.onMouseEnterFloated,scope:me,destroyable:!0};if(me.isSliding){return}
if(me.el.hasCls(floatCls)){me.slideOutFloatedPanel();return}
me.isSliding=!0;placeholder.el.hide();placeholder.hidden=!0;me.el.show();me.setHiddenState(!1);me.collapsed=!1;layoutOwner.updateLayout();placeholder.el.show();placeholder.hidden=!1;me.el.hide();me.setHiddenState(!0);me.collapsed=collapsed;layoutOwner.updateLayout();myBox=me.getBox(!1,!0);if(me.fireEvent('beginfloat',me)===!1){return}
me.slideOutTask=me.slideOutTask||new Ext.util.DelayedTask(me.slideOutFloatedPanel,me);me.pointerLeaveListener=Ext.getDoc().on({mousedown:me.onFloatedPointerEvent,mousemove:me.onFloatedPointerEvent,scope:me,destroyable:!0});if(!me.placeholderListener){me.placeholderListener=placeholder.on({resize:me.onPlaceholderResize,scope:me,destroyable:!0})}
me.phHoverListeners=placeholder.el.on(hoverlisteners);me.elHoverListeners=me.el.on(hoverlisteners);me.el.addCls(floatCls);me.floated=collapsed;if(me.collapseTool){me.collapseTool.el.hide()}
if(splitter){phBox=phBox.union(splitter.getBox(!1,!0))}
switch(me.collapsed){case 'top':me.width=phBox.width;me.setLocalXY(myBox.x,myBox.y+phBox.height);break;case 'right':me.height=phBox.height;me.setLocalXY(myBox.x-phBox.width,myBox.y);break;case 'bottom':me.width=phBox.width;me.setLocalXY(myBox.x,myBox.y-phBox.height);break;case 'left':me.height=phBox.height;me.setLocalXY(myBox.x+phBox.width,myBox.y);break}
slideDirection=me.convertCollapseDir(me.collapsed);me.floatedFromCollapse=me.collapsed;me.collapsed=!1;me.setHiddenState(!1);me.el.slideIn(slideDirection,{preserveScroll:!0,duration:Ext.Number.from(me.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){me.isSliding=!1;me.fireEvent('endfloat',me);me.fireEvent('float',me)}}})},onFloatedPointerEvent:function(event){var me=this;if(me.owns(event)||me.placeholder.owns(event)||(me.splitter&&me.splitter.owns(event))||(me.floatCollapsedPanel&&me.el.getRegion().contains(event.getPoint()))){me.slideOutTask.cancel()}else{me.slideOutTask.delay(500)}},onMouseEnterFloated:function(e){this.slideOutTask.cancel()},onMouseLeaveFloated:function(e){var toElement=e.getRelatedTarget();if(toElement&&(this.owns(toElement)||this.placeholder.owns(toElement))){return}
this.slideOutTask.delay(500)},onPlaceholderResize:function(ph,newWidth,newHeight){var me=this,splitter=me.splitter,myBox=me.getBox(!1,!0),phBox=Ext.util.Region.from(ph.getBox(!1,!0));if(splitter){phBox=phBox.union(splitter.getBox(!1,!0))}
switch(me.floated){case 'top':me.width=newWidth;me.setLocalY(phBox.y+phBox.height);break;case 'right':me.height=newHeight;me.setLocalX(phBox.x-myBox.width);break;case 'bottom':me.width=newWidth;me.setLocalY(phBox.y-myBox.height);break;case 'left':me.height=newHeight;me.setLocalX(phBox.x+phBox.width);break}
me.updateLayout({isRoot:!0})},getAnimationProps:function(){var me=this,props;props=me.callParent();if(typeof me.animCollapseDuration==='number'){props.duration=me.animCollapseDuration}else if(typeof me.animCollapse==='number'){props.duration=me.animCollapse}
return props},getCollapsed:function(){var me=this;if(me.collapsed===!0){return me.collapseDirection}
return me.collapsed},getCollapsedDockedItems:function(){var me=this;return me.header===!1||(me.collapseMode==='placeholder'?me.emptyArray:[me.getReExpander()])},getComponent:function(comp){var component=this.callParent(arguments);if(component===undefined&&!Ext.isNumber(comp)){component=this.getDockedComponent(comp)}
return component},getHeader:function(){return this.header},getHeaderCollapsedClasses:function(header){var me=this,collapsedCls=me.collapsedCls,collapsedClasses;collapsedClasses=[collapsedCls,collapsedCls+'-'+header.getDockName()];if(me.border&&(!me.frame||(me.frame&&Ext.supports.CSS3BorderRadius))){collapsedClasses.push(collapsedCls+'-border-'+header.getDockName())}
return collapsedClasses},getOppositeDirection:function(d){var c=Ext.Component;switch(d){case c.DIRECTION_TOP:return c.DIRECTION_BOTTOM;case c.DIRECTION_RIGHT:return c.DIRECTION_LEFT;case c.DIRECTION_BOTTOM:return c.DIRECTION_TOP;case c.DIRECTION_LEFT:return c.DIRECTION_RIGHT}},getPlaceholder:function(direction){var me=this,collapseDir=direction||me.collapseDirection,listeners=null,placeholder=me.placeholder,floatable=me.floatable,titleCollapse=me.titleCollapse;if(!placeholder){if(floatable||(me.collapsible&&titleCollapse)){listeners={click:{fn:function(e,target){var expandTool=placeholder.expandTool;if(!(expandTool&&expandTool.el.dom.contains(arguments[1]))){me[(!titleCollapse&&floatable)?'floatCollapsedPanel':'toggleCollapse']()}},element:'el',scope:me}}}
me.placeholder=placeholder=Ext.widget(me.createReExpander(collapseDir,{id:me.id+'-placeholder',listeners:listeners}))}
if(!placeholder.placeholderFor){if(!placeholder.isComponent){me.placeholder=placeholder=me.lookupComponent(placeholder)}
Ext.applyIf(placeholder,{margin:me.margin,placeholderFor:me,synthetic:!0});placeholder.addCls([Ext.baseCSSPrefix+'region-collapsed-placeholder',Ext.baseCSSPrefix+'region-collapsed-'+collapseDir+'-placeholder',me.collapsedCls])}
return placeholder},getProtoBody:function(){var me=this,body=me.protoBody;if(!body){me.protoBody=body=new Ext.util.ProtoElement({cls:me.bodyCls,style:me.bodyStyle,clsProp:'bodyCls',styleProp:'bodyStyle',styleIsText:!0})}
return body},getReExpander:function(direction){var me=this,collapseDir=direction||me.collapseDirection,reExpander=me.reExpander||me.findReExpander(collapseDir),titleCollapse=me.titleCollapse,listeners=null;me.expandDirection=me.getOppositeDirection(collapseDir);if(!reExpander){if(titleCollapse){listeners={click:{fn:me.toggleCollapse,element:'el',scope:me}}}
me.reExpander=reExpander=me.createReExpander(collapseDir,{dock:collapseDir,cls:Ext.baseCSSPrefix+'docked '+me.baseCls+'-'+me.ui+'-collapsed',isCollapsedExpander:!0,listeners:listeners});me.dockedItems.insert(0,reExpander)}
return reExpander},getRefItems:function(deep){var placeholder=this.placeholder,result;if(placeholder&&placeholder.isComponent){result=[placeholder];if(deep&&placeholder.getRefItems){result.push.apply(result,placeholder.getRefItems(deep))}}else{result=[]}
result.push.apply(result,this.getDockingRefItems(deep,this.callParent([deep])));return result},getState:function(){var me=this,state=me.callParent()||{},collapsed=me.collapsed,floated=me.floated,memento,placeholder;if(floated){me.collapsed=floated}
state=me.addPropertyToState(state,'collapsed');if(floated){me.collapsed=collapsed}
if(me.getCollapsed()){memento=me.getMemento('collapse').data;state=me.addPropertyToState(state,'collapsed',memento);placeholder=me.isPlaceHolderCollapse();if(me.collapsedVertical()){if(placeholder){state=me.addPropertyToState(state,'height');delete state.width}else{delete state.height;if(memento){state=me.addPropertyToState(state,'height',memento.height)}}}else{if(placeholder){state=me.addPropertyToState(state,'width');delete state.height}else{delete state.width;if(memento){state=me.addPropertyToState(state,'width',memento.width)}}}}
return state},applyState:function(state){var me=this,collapseMemento={},collapsed;if(state){collapsed=state.collapsed;if(collapsed){collapseMemento=me.getMemento('collapse');Ext.Object.merge(collapseMemento.data,collapsed);state.collapsed=!0}
me.callParent([state])}},ghost:function(cls){var me=this,myEl=me.el,ghostPanel=me.ghostPanel,box=me.getBox(),header=me.header,ghostHeader,tools,icon,iconCls,glyph,i;Ext.suspendLayouts();if(!ghostPanel){me.ghostPanel=ghostPanel=Ext.widget(me.createGhost(cls));ghostPanel.el.dom.removeAttribute('tabIndex')}else{ghostPanel.el.show()}
ghostPanel.setHiddenState(!1);ghostPanel.setXY([box.x,box.y]);ghostPanel.setSize(box.width,box.height);ghostPanel.floatParent=me.floatParent;if(header&&!me.preventHeader&&me.lastHeaderGen!==header.items.generation){ghostHeader=ghostPanel.header;tools=ghostHeader.query('tool');for(i=tools.length;i--;){ghostHeader.remove(tools[i])}
ghostHeader.setTitlePosition(0);ghostPanel.addTool(me.ghostTools());ghostPanel.setTitle(me.getTitle());ghostHeader.setTitlePosition(header.getTitlePosition());ghostHeader.setIconAlign(header.getIconAlign());ghostHeader.setTitleAlign(header.getTitleAlign());iconCls=me.getIconCls();if(iconCls){ghostPanel.setIconCls(iconCls)}else{icon=me.getIcon();if(icon){ghostPanel.setIcon(icon)}else{glyph=me.getGlyph();if(glyph){ghostPanel.setGlyph(glyph)}}}
ghostHeader.addCls(Ext.baseCSSPrefix+'header-ghost');me.lastHeaderGen=header.items.generation}
Ext.resumeLayouts(!0);me.elVisMode=myEl.getVisibilityMode();myEl.setVisibilityMode(Ext.Element.CLIP);myEl.hide();return ghostPanel},ghostTools:function(){var tools=[],header=this.header,headerTools=header?header.query('tool[hidden=false]'):[],t,tLen,tool;if(headerTools.length){t=0;tLen=headerTools.length;for(;t<tLen;t++){tool=headerTools[t];tools.push({type:tool.type,focusable:!1})}}else{tools=[{type:'placeholder'}]}
return tools},initBodyBorder:function(){var me=this;if(me.frame&&me.bodyBorder){if(!Ext.isNumber(me.bodyBorder)){me.bodyBorder=1}
me.getProtoBody().setStyle('border-width',this.unitizeBox(me.bodyBorder))}},initBodyStyles:function(){var me=this,body=me.getProtoBody();if(me.bodyPadding!==undefined){if(me.layout.managePadding){body.setStyle('padding',0)}else{body.setStyle('padding',this.unitizeBox((me.bodyPadding===!0)?5:me.bodyPadding))}}
me.initBodyBorder()},initBorderProps:function(){var me=this;if(me.frame&&me.border&&me.bodyBorder===undefined){me.bodyBorder=!1}
if(me.frame&&me.border&&(me.bodyBorder===!1||me.bodyBorder===0)){me.manageBodyBorders=!0}},initComponent:function(){var me=this;if(me.collapsible){me.addStateEvents(['expand','collapse'])}
if(me.unstyled){me.setUI('plain')}
if(me.frame){me.setUI(me.ui+'-framed')}
me.bridgeToolbars();me.initBorderProps();me.callParent();me.collapseDirection=me.collapseDirection||me.getHeaderPosition()||Ext.Component.DIRECTION_TOP;if(typeof me.animCollapse==='number'){me.animCollapseDuration=me.animCollapse}
me.hiddenOnCollapse=new Ext.dom.CompositeElement()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var me=this,bodyWrapRole=me.bodyWrapAriaRole,bodyRole=me.bodyAriaRole,data;data=me.callParent();me.initBodyStyles();me.protoBody.writeTo(data);delete me.protoBody;if(me.headingText){data.headingText=me.headingText;me.addChildEl('headingEl')}
if(bodyWrapRole){data.bodyWrapAriaAttributes={role:bodyWrapRole};if(!me.ariaStaticRoles[bodyWrapRole]&&me.bodyWrapAriaRenderAttributes){Ext.apply(data.bodyWrapAriaAttributes,me.bodyWrapAriaRenderAttributes)}}
if(bodyRole){data.bodyAriaAttributes={role:bodyRole};if(!me.ariaStaticRoles[bodyRole]&&me.bodyAriaRenderAttributes){Ext.apply(data.bodyAriaAttributes,me.bodyAriaRenderAttributes)}}
return data},calculateConstrainedPosition:function(constrainTo,proposedPosition,local,proposedSize){var me=this,header=me.header,lastBox,fp;if(me.constrainHeader){lastBox=header.lastBox;if(proposedSize){if(!header.vertical){proposedSize=[proposedSize[0],lastBox?lastBox.height:proposedSize[1]]}else{proposedSize=[lastBox?lastBox.width:proposedSize[0],proposedSize[1]]}}else if(lastBox){proposedSize=[lastBox.width,lastBox.height]}
fp=me.floatParent;constrainTo=constrainTo||me.constrainTo||(fp?fp.getTargetEl():null)||me.container||me.el.parent()}
return me.callParent([constrainTo,proposedPosition,local,proposedSize])},initTools:function(){var me=this,tools=me.tools,len=tools&&tools.length,i,toolCfg,tool;me.tools=[];if(len){for(i=0;i<len;++i){tool=tools[i];if(typeof tool!=='string'&&!tool.isTool){tool=Ext.apply({},tool)}
me.tools.push(tool);tool.toolOwner=me}}
if(me.collapsible&&!(me.hideCollapseTool||me.header===!1||me.preventHeader)){me.updateCollapseTool();if(me.collapseFirst){me.tools.unshift(me.collapseTool)}}
me.addTools();if(me.pinnable){me.initPinnable()}
if(me.closable){me.addClsWithUI('closable');toolCfg={xtype:'tool',type:'close',scope:me,handler:me.close,tooltip:me.closeToolText};if(me.isAccordionPanel||me.disableCloseToolFocus){toolCfg.focusable=!1;toolCfg.ariaRole='presentation'}
me.addTool(toolCfg)}
if(me.collapseTool&&!me.collapseFirst){me.addTool(me.collapseTool)}},isLayoutRoot:function(){if(this.floatedFromCollapse){return!0}
return this.callParent()},isPlaceHolderCollapse:function(){return this.collapseMode==='placeholder'},isVisible:function(deep){var me=this;if(me.collapsed&&me.placeholder){return me.placeholder.isVisible(deep)}
return me.callParent(arguments)},onBoxReady:function(){var me=this,target;me.callParent(arguments);if(me.collapsed){me.setHiddenDocked()}
if(me.isAccordionPanel){me.ariaEl=me.header.titleCmp.el;me.ariaEl.dom.setAttribute('aria-expanded',!me.collapsed);me.ariaEl.dom.setAttribute('aria-controls',me.body.id);me.body.dom.setAttribute('aria-labelledby',me.header.titleCmp.id);me.body.dom.setAttribute('aria-hidden',!!me.collapsed);me.accordionHeaderKeyNav=new Ext.util.KeyNav({target:me.header.titleCmp.el,scope:me,left:me.navigateAccordionHeader,right:me.navigateAccordionHeader,up:me.navigateAccordionHeader,down:me.navigateAccordionHeader,home:me.navigateAccordionHeader,end:me.navigateAccordionHeader,space:me.toggleCollapse,enter:me.toggleCollapse,del:{alt:!0,fn:me.maybeClose}});me.accordionBodyKeyNav=new Ext.util.KeyNav({target:me.bodyWrap,scope:me,up:{ctrl:!0,fn:me.navigateAccordionBody}})}
if(me.defaultButton){target=me.defaultButtonTarget?me[me.defaultButtonTarget]:me.body;me.defaultButtonKeyNav=new Ext.util.KeyNav({target:target,scope:me,defaultEventAction:'stopEvent',enter:me.fireDefaultButton})}},onHide:function(animateTarget,cb,scope){var me=this,dd=me.dd;if(me.floatedFromCollapse){me.slideOutFloatedPanel(!0)}
if(me.draggable&&dd){dd.endDrag()}
if(me.collapsed&&me.placeholder){if(me.splitter){Ext.suspendLayouts();me.splitter.hide();Ext.resumeLayouts()}
me.placeholder.hide()}else{me.callParent([animateTarget,cb,scope])}},onRemoved:function(destroying){var me=this;if(me.placeholder&&!destroying){me.ownerCt.remove(me.placeholder,!1)}
me.callParent(arguments)},onShow:function(){var me=this;if(me.collapsed&&me.isPlaceHolderCollapse()){if(me.splitter){Ext.suspendLayouts();me.splitter.show();Ext.resumeLayouts()}
me.setHiddenState(!0);me.placeholderCollapse()}else{me.callParent(arguments)}},placeholderCollapse:function(direction,animate){var me=this,ownerCt=me.ownerCt,collapseDir=direction||me.collapseDirection,floatCls=Ext.panel.Panel.floatCls,collapseTool=me.collapseTool,placeholder=me.getPlaceholder(collapseDir),slideInDirection;if(Ext.Component.layoutSuspendCount||me.isLayoutSuspended()){animate=!1}
me.fireEvent('beginfloat',me);me.isCollapsingOrExpanding=1;me.setHiddenState(!0);me.collapsed=collapseDir;if(placeholder.rendered){if(placeholder.el.dom.parentNode!==me.el.dom.parentNode){me.el.dom.parentNode.insertBefore(placeholder.el.dom,me.el.dom)}
placeholder.hidden=!1;placeholder.setHiddenState(!1);placeholder.el.show();ownerCt.updateLayout()}else{ownerCt.insert(ownerCt.items.indexOf(me),placeholder)}
if(me.rendered){me.focusPlaceholderExpandTool=me.focusPlaceHolder=!1;if(collapseTool&&Ext.ComponentManager.getActiveComponent()===collapseTool){me.focusPlaceholderExpandTool=!0}else if(me.containsFocus){me.focusPlaceHolder=!0}
me.el.setVisibilityMode(me.placeholderCollapseHideMode);if(animate){me.el.addCls(floatCls);placeholder.el.hide();slideInDirection=me.convertCollapseDir(collapseDir);me.el.slideOut(slideInDirection,{preserveScroll:!0,duration:Ext.Number.from(animate,Ext.fx.Anim.prototype.duration),listeners:{scope:me,afteranimate:function(){var me=this,placeholderEl=me.placeholder.el;me.el.removeCls(floatCls);placeholderEl.show();if(me.ownerCt){placeholderEl.setStyle('display','none');placeholderEl.slideIn(slideInDirection,{easing:'linear',duration:100,listeners:{afteranimate:me.doPlaceholderCollapse,scope:me}})}else{me.doPlaceholderCollapse()}}}})}else{me.el.hide();me.doPlaceholderCollapse()}}else{me.isCollapsingOrExpanding=0;if(!me.preventCollapseFire){me.fireEvent('collapse',me)}}
return me},doPlaceholderCollapse:function(){var me=this,placeholder=me.placeholder,expandTool=placeholder.expandTool,dom;if(me.focusPlaceholderExpandTool&&expandTool){expandTool.focus()}else if(me.focusPlaceHolder){placeholder.focus()}
me.focusPlaceholderExpandTool=!1;placeholder.setHiddenState(!1);if(placeholder.rendered){dom=placeholder.ariaEl.dom;dom.setAttribute('aria-hidden',!1);dom.setAttribute('aria-expanded',!1)}
dom=me.ariaEl.dom;dom.setAttribute('aria-hidden',!0);dom.setAttribute('aria-expanded',!1);me.isCollapsingOrExpanding=0;me.fireEvent('collapse',me);me.fireEvent('endfloat',me)},placeholderExpand:function(animate){var me=this,collapseDir=me.collapsed,expandTool=me.placeholder.expandTool,floatCls=Ext.panel.Panel.floatCls,center=me.ownerLayout?me.ownerLayout.centerRegion:null,finalPos,floatedPos;if(Ext.Component.layoutSuspendCount){animate=!1}
if(me.floatedFromCollapse){floatedPos=me.getPosition(!0);me.slideOutFloatedPanelBegin();me.slideOutFloatedPanelEnd();me.floated=!1}
if(expandTool&&Ext.ComponentManager.getActiveComponent()===expandTool){me.focusHeaderCollapseTool=!0;expandTool._ariaRole=expandTool.ariaEl.dom.getAttribute('role');expandTool._ariaLabel=expandTool.ariaEl.dom.getAttribute('aria-label');expandTool.ariaEl.dom.setAttribute('role','presentation');expandTool.ariaEl.dom.removeAttribute('aria-label')}
if(animate){Ext.suspendLayouts();me.placeholder.hide();me.el.show();me.collapsed=!1;me.setHiddenState(!1);if(center&&!floatedPos){center.hidden=!0}
Ext.resumeLayouts(!0);if(center){center.hidden=!1}
if(!me.floatedFromCollapse){me.fireEvent('beginfloat',me)}
me.el.addCls(floatCls);me.isCollapsingOrExpanding=2;if(floatedPos){finalPos=me.getXY();me.setLocalXY(floatedPos[0],floatedPos[1]);me.setXY([finalPos[0],finalPos[1]],{duration:Ext.Number.from(animate,Ext.fx.Anim.prototype.duration),listeners:{scope:me,afteranimate:function(){var me=this;me.el.removeCls(floatCls);me.isCollapsingOrExpanding=0;me.fireEvent('expand',me);me.fireEvent('endfloat',me)}}})}else{me.el.hide();me.placeholder.el.show();me.placeholder.hidden=!1;me.setHiddenState(!1);me.el.slideIn(me.convertCollapseDir(collapseDir),{preserveScroll:!0,duration:Ext.Number.from(animate,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:me.doPlaceholderExpand,scope:me}})}}else{me.floated=me.collapsed=!1;me.doPlaceholderExpand(!0)}
return me},doPlaceholderExpand:function(nonAnimated){var me=this,placeholder=me.placeholder,collapseTool=me.collapseTool,expandTool=placeholder.expandTool;nonAnimated=nonAnimated===!0;if(nonAnimated){Ext.suspendLayouts();me.show()}
me.el.removeCls(Ext.panel.Panel.floatCls);placeholder.hide();if(nonAnimated){Ext.resumeLayouts(!0)}else{me.updateLayout()}
if(me.focusHeaderCollapseTool&&collapseTool){collapseTool.focus()}
me.focusHeaderCollapseTool=!1;placeholder.ariaEl.dom.setAttribute('aria-expanded',!0);me.ariaEl.dom.setAttribute('aria-expanded',!0);if(expandTool&&expandTool._ariaRole){expandTool.ariaEl.dom.setAttribute('role',expandTool._ariaRole);expandTool.ariaEl.dom.setAttribute('aria-label',expandTool._ariaLabel);expandTool._ariaRole=expandTool._ariaLabel=null}
me.isCollapsingOrExpanding=0;me.fireEvent('expand',me);me.fireEvent('endfloat',me)},remove:function(component,autoDestroy){var dockedItems=this.dockedItems;if(dockedItems&&dockedItems.contains(component)){this.removeDocked(component,autoDestroy)}else{this.callParent([component,autoDestroy])}
return component},removeBodyCls:function(cls){var me=this,body=me.rendered?me.body:me.getProtoBody();body.removeCls(cls);return me},removeUIClsFromElement:function(cls){var me=this,result=me.callParent(arguments);me.removeBodyCls([Ext.baseCSSPrefix+cls,me.baseCls+'-body-'+cls,me.baseCls+'-body-'+me.ui+'-'+cls]);return result},restoreDimension:function(){var dir=this.collapseDirection;return(dir==='top'||dir==='bottom')?'height':'width'},restoreHiddenDocked:function(){this.setDockedItemsVisibility(this.hiddenOnCollapse,!0)},setBodyStyle:function(style,value){var me=this,body=me.rendered?me.body:me.getProtoBody();if(Ext.isFunction(style)){style=style()}
if(arguments.length===1){if(Ext.isString(style)){style=Ext.Element.parseStyles(style)}
body.setStyle(style)}else{body.setStyle(style,value)}
return me},setBorder:function(border,targetEl){if(targetEl){return}
var me=this,header=me.header;if(!border){border=0}else if(border===!0){border='1px'}else{border=me.unitizeBox(border)}
if(header){if(header.isHeader){header.setBorder(border)}else{header.border=border}}
if(me.rendered&&me.bodyBorder!==!1){me.body.setStyle('border-width',border)}
me.updateLayout();me.border=border},setCollapsed:function(collapsed){this[collapsed?'collapse':'expand']()},setDockedItemsVisibility:function(els,show){var me=this,items=me.getDockedItems(),len=items.length,i=0,item,reExpander;if(me.header!==!1){reExpander=me.getReExpander()}
for(;i<len;i++){item=items[i];if(item&&item!==reExpander&&item.el){els.add(item.el)}}
els.setStyle('visibility',show?'':'hidden');els.clear()},setGlyph:function(glyph){this.setHeaderConfig(glyph,'glyph','setGlyph',!0)},setIcon:function(icon){this.setHeaderConfig(icon,'icon','setIcon',!0)},setIconCls:function(iconCls){this.setHeaderConfig(iconCls,'iconCls','setIconCls',!0)},setIconAlign:function(iconAlign){this.setHeaderConfig(iconAlign,'iconAlign','setIconAlign',!0)},setTitleAlign:function(titleAlign){this.setHeaderConfig(titleAlign,'titleAlign','setTitleAlign',!0)},setTitlePosition:function(titlePosition){this.setHeaderConfig(titlePosition,'titlePosition','setTitlePosition',!0)},setTitleRotation:function(titleRotation){this.setHeaderConfig(titleRotation,'titleRotation','setTitleRotation',!0)},setTitle:function(title){var me=this,oldTitle=me.title;if(title!==oldTitle&&me.headingEl){me.headingEl.setHtml(title)}
this.setHeaderConfig(title,'title','setTitle',!1)},setHeaderConfig:function(value,prop,setter,addToHeaderCfg){var me=this,oldValue=me[prop],header=me.header,placeholder=me.placeholder,reExpander=me.reExpander,eventName;if(value!==oldValue){me[prop]=value;if(header){if(header.isHeader){header[setter](value)}else if(addToHeaderCfg){header[prop]=value}}else if(me.rendered||me.afterHeaderInit){me.updateHeader()}
if(reExpander){reExpander[setter](value)}
if(placeholder&&placeholder[setter]){placeholder[setter](value)}
eventName=prop.toLowerCase()+'change';if(me.hasListeners[eventName]){me.fireEvent(eventName,me,value,oldValue)}}},setHiddenDocked:function(){var me=this,toHide=new Ext.dom.CompositeElement();me.hiddenOnCollapse.add(me.body);toHide.add(me.body);me.setDockedItemsVisibility(toHide,!1)},setUI:function(ui){var me=this;me.callParent(arguments);if(me.header&&me.header.rendered){me.header.setUI(ui)}},toggleCollapse:function(){return(this.collapsed||this.floatedFromCollapse)?this.expand():this.collapse()},updateCollapseTool:function(){var me=this,collapseTool=me.collapseTool,toolCfg;if(!collapseTool&&me.collapsible){me.collapseDirection=me.collapseDirection||me.getHeaderPosition()||'top';toolCfg={xtype:'tool',handler:me.toggleCollapse,scope:me};if(me.isAccordionPanel){toolCfg.focusable=!1;toolCfg.ariaRole='presentation'}
me.collapseTool=me.expandTool=collapseTool=Ext.widget(toolCfg)}
if(collapseTool){if(me.collapsed&&!me.isPlaceHolderCollapse()){collapseTool.setType('expand-'+me.getOppositeDirection(me.collapseDirection));collapseTool.setTooltip(me.expandToolText)}else{collapseTool.setType('collapse-'+me.collapseDirection);collapseTool.setTooltip(me.collapseToolText)}}},navigateAccordionHeader:function(e){var me=this,key,target;key=e.getKey();switch(key){case e.UP:case e.LEFT:target=me.findAccordionSibling('prev');break;case e.DOWN:case e.RIGHT:target=me.findAccordionSibling('next');break;case e.HOME:target=me.findAccordionSibling('first');break;case e.END:target=me.findAccordionSibling('last');break;case e.DELETE:target=me.findAccordionSibling('prev')||me.findAccordionSibling('next');if(!target){e.doNotClose=!0}
break}
e.stopEvent();if(target&&target!==me){target.header.titleCmp.focus()}},navigateAccordionBody:function(e){var target;if(e.getKey()===e.UP){target=this}
e.stopEvent();if(target){target.header.titleCmp.focus()}},findAccordionSibling:function(which,forceFind){var me=this,siblingSel='[isAccordionPanel]',sibling;switch(which){case 'prev':sibling=me.prev(siblingSel);if(!sibling){if(me.accordionWrapOver){sibling=me.ownerCt.child(siblingSel+':last')}else if(forceFind){sibling=me}}
break;case 'next':sibling=me.next(siblingSel);if(!sibling){if(me.accordionWrapOver){sibling=me.ownerCt.child(siblingSel+':first')}else if(forceFind){sibling=me}}
break;case 'first':sibling=me.ownerCt.child(siblingSel+':first');break;case 'last':sibling=me.ownerCt.child(siblingSel+':last');break}
return sibling},fireDefaultButton:function(e){var me=this,refHolder,btn;if(e.target.tagName==='TEXTAREA'||e.target.getAttribute('aria-multiline')==='true'){return!0}
refHolder=me.lookupReferenceHolder(!1)||me;btn=refHolder.lookupReference(me.defaultButton);if(btn&&btn.click){btn.click(e);e.stopEvent();return!1}else if(!btn){Ext.raise({msg:'No component found for defaultButton reference "'+me.defaultButton+'" in '+me.xtype+' '+me.id,panel:me})}else{Ext.raise({msg:'Component referenced by defaultButton config "'+me.defaultButton+'" in '+me.xtype+' '+me.id+' does not have click() method',component:btn})}},maybeClose:function(e){var me=this;if(me.closable){me.navigateAccordionHeader(e);if(!e.doNotClose){me.close()}}},canFocus:function(skipVisibility,includeFocusTarget){if(this.collapsed){return!!(this.placeholder&&this.placeholder.canFocus(skipVisibility,includeFocusTarget))}
return this.mixins.focusable.canFocus.call(this,skipVisibility,includeFocusTarget)},focus:function(){var me=this,placeholder=me.placeholder;if(me.collapsed&&placeholder&&placeholder.canFocus()){placeholder.focus.apply(placeholder,arguments)}else{me.callParent(arguments)}},onFocusEnter:function(e){var me=this,ariaDom=me.ariaEl.dom;me.callParent([e]);if(me.isAccordionPanel&&ariaDom){ariaDom.setAttribute('aria-selected',!0)}},onFocusLeave:function(e){var me=this,ariaDom=me.ariaEl.dom;me.callParent([e]);if(me.isAccordionPanel&&ariaDom){ariaDom.setAttribute('aria-selected','false')}},updateHeaderPosition:function(position){var header=this.header;if(header&&header.isHeader){header.setDock(position)}},unghost:function(show,matchPosition,focus){var me=this,el=me.el,ghostPanel=me.ghostPanel;if(!ghostPanel){return}
el.show();el.setVisibilityMode(me.elVisMode);if(show!==!1){if(matchPosition!==!1){me.setPagePosition(ghostPanel.getXY())}}else{el.hide()}
ghostPanel.el.hide();ghostPanel.setHiddenState(!0)},updateHeader:function(force){var me=this,header=me.header,title=me.getTitle(),tools=me.tools,icon=me.getIcon(),glyph=me.getGlyph(),iconCls=me.getIconCls(),hasIcon=glyph||icon||iconCls,ariaDom=me.ariaEl.dom,headerPosition=me.getHeaderPosition(),vertical=headerPosition==='left'||headerPosition==='right',headingEl,ariaAttr;if(Ext.isObject(header)||(header!==!1&&(force||(title||hasIcon)||(tools&&tools.length)||(me.collapsible&&!me.titleCollapse)))){if(header&&header.isHeader){header.dockToEl=!0;header.show()}else{if(Ext.isObject(header)){me.syncHeaderConfigs(header)}
header=me.header=Ext.widget(Ext.merge({xtype:'header',title:title,titleAlign:me.getTitleAlign(),titlePosition:me.getTitlePosition(),vertical:vertical,dock:me.getHeaderPosition()||'top',dockToEl:!0,titleRotation:me.getTitleRotation(),textCls:me.headerTextCls,iconCls:iconCls,iconAlign:me.getIconAlign(),icon:icon,glyph:glyph,baseCls:me.baseCls+'-header',tools:tools,ui:me.ui,id:me.id+'_header',overCls:me.headerOverCls,indicateDrag:me.draggable,frame:(me.frame||me.alwaysFramed)&&me.frameHeader,ignoreParentFrame:me.frame||me.overlapHeader,ignoreBorderManagement:me.frame||me.ignoreHeaderBorderManagement,isAccordionHeader:me.isAccordionPanel,ownerCt:me,synthetic:!0,listeners:me.collapsible&&me.titleCollapse?{click:me.toggleCollapse,scope:me}:null},me.header));me.addDocked(header,0)}
if(me.isAccordionPanel){if(ariaDom){ariaDom.setAttribute('aria-labelledby',header.id+'-title');ariaDom.removeAttribute('aria-label')}else{ariaAttr=me.ariaRenderAttributes||(me.ariaRenderAttributes={});ariaAttr['aria-labelledby']=header.id+'-title';delete ariaAttr['aria-label']}}else{if(title){if(me.ariaRole!=='tabpanel'){if(ariaDom){ariaDom.setAttribute('aria-labelledby',header.id+'-title-textEl');ariaDom.removeAttribute('aria-label')}else{ariaAttr=me.ariaRenderAttributes||(me.ariaRenderAttributes={});ariaAttr['aria-labelledby']=header.id+'-title-textEl';delete ariaAttr['aria-label']}}}else if(me.ariaRenderAttributes){delete me.ariaRenderAttributes['aria-label']}}}else{if(header){header.hide()}
title=Ext.util.Format.stripTags(title);if(ariaDom){if(!ariaDom.hasAttribute('aria-labelledby')){if(title){ariaDom.setAttribute('aria-label',title)}else{ariaDom.removeAttribute('aria-label')}}}else{ariaAttr=me.ariaRenderAttributes||(me.ariaRenderAttributes={});if(!ariaAttr['aria-labelledby']){if(title){ariaAttr['aria-label']=title}else{delete ariaAttr['aria-label']}}}}
if(me.isViewportBorderChild&&!me.hasOwnProperty('ariaRole')){me.ariaRole='region'}
if(me.ariaRole==='region'&&!title){Ext.ariaWarn(me,"Panel "+me.id+" is a region section of the application, "+"but it does not have a title. Per WAI-ARIA, all regions "+"should have a heading element that contains region's title.")}
if(title&&me.ariaRole==='region'){headingEl=me.headingEl;if(headingEl){headingEl.setHtml(title)}else{if(me.rendered){me.headingEl=Ext.dom.Helper.insertFirst(me.el,{tag:'div',id:me.id+'-headingEl',role:'heading','class':Ext.baseCSSPrefix+'hidden-clip',style:'height:0',html:title},!0);ariaDom.removeAttribute('aria-label');ariaDom.setAttribute('aria-labelledby',me.id+'-headingEl')}else{me.headingText=me.title;ariaAttr=me.ariaRenderAttributes||(me.ariaRenderAttributes={});ariaAttr['aria-labelledby']=me.id+'-headingEl';delete ariaAttr['aria-label']}}}else if(me.headingEl){me.headingEl.destroy();me.headingEl=null}},statics:{floatCls:Ext.baseCSSPrefix+'border-region-slide-in'},privates:{addUIToElement:function(){var me=this;me.callParent(arguments);me.addBodyCls(me.baseCls+'-body-'+me.ui)},applyTargetCls:function(targetCls){this.getProtoBody().addCls(targetCls)},getDefaultContentTarget:function(){return this.body},getTargetEl:function(){var me=this;return me.body||me.protoBody||me.frameBody||me.el},initDraggable:function(){var me=this;if(me.simpleDrag){me.initSimpleDraggable()}else{me.dd=new Ext.panel.DD(me,Ext.isBoolean(me.draggable)?null:me.draggable)}},initResizable:function(resizable){this.callParent([resizable]);if(this.collapsed){this.resizer.disable()}},initSimpleDraggable:function(){var me=this,dd=me.draggable;if(!me.header&&!dd.delegate){me.updateHeader(!0)}
if(me.header||dd.delegate){dd=Ext.apply({el:me.el,delegate:me.header&&me.header.el},dd);if(me.constrain||me.constrainHeader){dd.constrain=me.constrain;dd.constrainDelegate=me.constrainHeader;dd.constrainTo=me.constrainTo||me.container}
dd=me.dd=new Ext.util.ComponentDragger(me,dd);me.relayEvents(dd,['dragstart','drag','dragend'])}},removeUIFromElement:function(){var me=this;me.callParent(arguments);me.removeBodyCls(me.baseCls+'-body-'+me.ui)},setupRenderTpl:function(renderTpl){this.callParent(arguments);this.setupDockingRenderTpl(renderTpl)},slideOutFloatedPanel:function(preventAnimate){var me=this,compEl=me.el,collapseDirection,focusTarget,afterSlideOut=function(){me.slideOutFloatedPanelEnd();me.el.removeCls(Ext.baseCSSPrefix+'border-region-slide-in');me.fireEvent('endfloat',me)};if(me.isSliding||me.destroyed){return}
me.isSliding=!0;me.floated=!1;me.slideOutFloatedPanelBegin();if(preventAnimate){compEl.hide();return afterSlideOut()}
if(typeof me.collapsed==='string'){collapseDirection=me.convertCollapseDir(me.collapsed)}
me.fireEvent('beginfloat',me);compEl.slideOut(collapseDirection,{preserveScroll:!0,duration:Ext.Number.from(me.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:afterSlideOut}});if(this.containsFocus){focusTarget=this.findFocusTarget();if(focusTarget){focusTarget.focus()}}},slideOutFloatedPanelBegin:function(){var me=this;me.collapsed=me.floatedFromCollapse;me.setHiddenState(!0);me.floatedFromCollapse=null;Ext.destroy(me.pointerLeaveListener,me.phHoverListeners,me.elHoverListeners)},slideOutFloatedPanelEnd:function(suppressEvents){var me=this;if(me.collapseTool){me.collapseTool.el.show()}
me.slideOutTask.cancel();me.isSliding=!1;if(!suppressEvents){me.fireEvent('unfloat',me)}},syncHeaderConfigs:function(header){var me=this,config,value;for(config in header){value=header[config];if(me.headerConfigs[config]&&value!==undefined){me[config]=value}}}}},function(){var proto=this.prototype;proto.animCollapse=Ext.enableFx;proto.placeholderCollapseHideMode=Ext.Element.VISIBILITY})
;
Ext.define('Ext.rtl.panel.Panel',{override:'Ext.panel.Panel',rtlCollapseDirs:{top:'top',right:'left',bottom:'bottom',left:'right'},convertCollapseDir:function(collapseDir){if(!!Ext.rootInheritedState.rtl!==this.isLocalRtl()){collapseDir=this.rtlCollapseDirs[collapseDir]}
return this.callParent(arguments)}})
;
Ext.define('Ext.theme.neptune.panel.Panel',{override:'Ext.panel.Panel',border:!1,bodyBorder:!1,initBorderProps:Ext.emptyFn,initBodyBorder:function(){if(this.bodyBorder!==!0){this.callParent()}}})
;
Ext.define('Ext.layout.container.Table',{extend:'Ext.layout.container.Container',alternateClassName:'Ext.layout.TableLayout',alias:'layout.table',type:'table',createsInnerCt:!0,targetCls:Ext.baseCSSPrefix+'table-layout-ct',tableCls:Ext.baseCSSPrefix+'table-layout',cellCls:Ext.baseCSSPrefix+'table-layout-cell',childEls:['table','tbody'],tableAttrs:null,getItemSizePolicy:function(item){return this.autoSizePolicy},initInheritedState:function(inheritedState,inheritedStateInner){inheritedStateInner.inShrinkWrapTable=!0},getLayoutItems:function(){var me=this,result=[],items=me.callParent(),len=items.length,item,i;for(i=0;i<len;i++){item=items[i];if(!item.hidden){result.push(item)}}
return result},getHiddenItems:function(){var result=[],items=this.owner.items.items,len=items.length,i,item;for(i=0;i<len;++i){item=items[i];if(item.rendered&&item.hidden){result.push(item)}}
return result},renderChildren:function(){var me=this,items=me.getLayoutItems(),tbody=me.tbody.dom,rows=tbody.rows,len=items.length,hiddenItems=me.getHiddenItems(),cells,curCell,rowIdx,cellIdx,item,trEl,tdEl,i;cells=me.calculateCells(items);for(i=0;i<len;i++){curCell=cells[i];rowIdx=curCell.rowIdx;cellIdx=curCell.cellIdx;item=items[i];trEl=rows[rowIdx];if(!trEl){trEl=tbody.insertRow(rowIdx);if(me.trAttrs){trEl.set(me.trAttrs)}}
tdEl=Ext.get(trEl.cells[cellIdx]||trEl.insertCell(cellIdx));if(!item.rendered){me.renderItem(item,tdEl,0)}else if(!me.isValidParent(item,tdEl,rowIdx,cellIdx,tbody)){me.moveItem(item,tdEl,0)}
if(me.tdAttrs){tdEl.set(me.tdAttrs)}
if(item.tdAttrs){tdEl.set(item.tdAttrs)}
tdEl.set({colSpan:item.colspan||1,rowSpan:item.rowspan||1,cls:me.cellCls+' '+(item.cellCls||'')});if(!cells[i+1]||cells[i+1].rowIdx!==rowIdx){cellIdx++;while(trEl.cells[cellIdx]){trEl.deleteCell(cellIdx)}}}
rowIdx++;while(tbody.rows[rowIdx]){tbody.deleteRow(rowIdx)}
for(i=0,len=hiddenItems.length;i<len;++i){me.ensureInDocument(hiddenItems[i].getEl())}},ensureInDocument:function(el){var dom=el.dom.parentNode;while(dom){if(dom.tagName.toUpperCase()==='BODY'){return}
dom=dom.parentNode}
Ext.getDetachedBody().appendChild(el,!0)},calculate:function(ownerContext){if(!ownerContext.hasDomProp('containerChildrenSizeDone')){this.done=!1}else{var targetContext=ownerContext.targetContext,widthShrinkWrap=ownerContext.widthModel.shrinkWrap,heightShrinkWrap=ownerContext.heightModel.shrinkWrap,shrinkWrap=heightShrinkWrap||widthShrinkWrap,table=shrinkWrap&&this.table.dom,targetPadding=shrinkWrap&&targetContext.getPaddingInfo();if(widthShrinkWrap){ownerContext.setContentWidth(table.offsetWidth+targetPadding.width,!0)}
if(heightShrinkWrap){ownerContext.setContentHeight(table.offsetHeight+targetPadding.height,!0)}}},calculateCells:function(items){var cells=[],rowIdx=0,colIdx=0,cellIdx=0,totalCols=this.columns||Infinity,rowspans=[],len=items.length,item,i,j;for(i=0;i<len;i++){item=items[i];while(colIdx>=totalCols||rowspans[colIdx]>0){if(colIdx>=totalCols){colIdx=0;cellIdx=0;rowIdx++;for(j=0;j<totalCols;j++){if(rowspans[j]>0){rowspans[j]--}}}else{colIdx++}}
cells.push({rowIdx:rowIdx,cellIdx:cellIdx});for(j=item.colspan||1;j;--j){rowspans[colIdx]=item.rowspan||1;++colIdx}
++cellIdx}
return cells},getRenderTree:function(){var me=this,items=me.getLayoutItems(),rows=[],result=Ext.apply({tag:'table',id:me.owner.id+'-table',"data-ref":'table',role:'presentation',cls:me.tableCls,cellspacing:0,cellpadding:0,cn:{tag:'tbody',id:me.owner.id+'-tbody',"data-ref":'tbody',role:'presentation',cn:rows}},me.tableAttrs),tdAttrs=me.tdAttrs,len=items.length,item,curCell,tr,rowIdx,cellIdx,cell,cells,i;cells=me.calculateCells(items);for(i=0;i<len;i++){item=items[i];curCell=cells[i];rowIdx=curCell.rowIdx;cellIdx=curCell.cellIdx;tr=rows[rowIdx];if(!tr){tr=rows[rowIdx]={tag:'tr',role:'presentation',cn:[]};if(me.trAttrs){Ext.apply(tr,me.trAttrs)}}
cell=tr.cn[cellIdx]={tag:'td',role:'presentation'};if(tdAttrs){Ext.apply(cell,tdAttrs)}
Ext.apply(cell,{colSpan:item.colspan||1,rowSpan:item.rowspan||1,cls:me.cellCls+' '+(item.cellCls||'')});me.configureItem(item);cell.cn=item.getRenderTree()}
return result},isValidParent:function(item,target,rowIdx,cellIdx){if(arguments.length===3){return this.table.isAncestor(item.el)}
return item.el.dom.parentNode===this.tbody.dom.rows[rowIdx].cells[cellIdx]},destroy:function(){var targetEl,cells,i,len;if(this.owner.rendered){targetEl=this.getRenderTarget();if(targetEl){cells=targetEl.query('.'+this.cellCls,!1);for(i=0,len=cells.length;i<len;i++){cells[i].destroy()}}}
this.callParent()}})
;
Ext.define('Ext.container.ButtonGroup',{extend:'Ext.panel.Panel',alias:'widget.buttongroup',alternateClassName:'Ext.ButtonGroup',requires:['Ext.layout.container.Table'],baseCls:Ext.baseCSSPrefix+'btn-group',layout:{type:'table'},defaultType:'button',frame:!0,frameHeader:!1,titleAlign:'center',noTitleCls:'notitle',bodyAriaRole:'toolbar',focusableContainerEl:'body',focusableContainer:!0,initComponent:function(){var me=this,cols=me.columns;if(cols){me.layout=Ext.apply({columns:cols},me.layout)}
if(!me.title){me.addClsWithUI(me.noTitleCls)}
me.callParent()},onBeforeAdd:function(component){if(component.isButton){if(this.defaultButtonUI&&component.ui==='default'&&!component.hasOwnProperty('ui')){component.ui=this.defaultButtonUI}else{component.ui=component.ui+'-toolbar'}}
this.callParent(arguments)},beforeRender:function(){var me=this,ariaAttr;me.callParent();if(me.afterHeaderInit&&!me.header&&me.title){ariaAttr=me.bodyAriaRenderAttributes||(me.bodyAriaRenderAttributes={});ariaAttr['aria-label']=me.title}},updateHeader:function(force){var me=this,bodyEl=me.body,header,ariaAttr;me.callParent([force]);header=me.header;if(header){if(bodyEl){bodyEl.dom.setAttribute('aria-labelledby',header.id+'-title-textEl');bodyEl.dom.removeAttribute('aria-label')}else{ariaAttr=me.bodyAriaRenderAttributes||(me.bodyAriaRenderAttributes={});ariaAttr['aria-labelledby']=header.id+'-title-textEl';delete ariaAttr['aria-label']}}else if(me.title){if(bodyEl){bodyEl.dom.setAttribute('aria-label',me.title);bodyEl.dom.removeAttribute('aria-labelledby')}else{ariaAttr=me.bodyAriaRenderAttributes||(me.bodyAriaRenderAttributes={});ariaAttr['aria-label']=me.title;delete ariaAttr['aria-labelledby']}}},privates:{applyDefaults:function(c){if(!Ext.isString(c)){c=this.callParent(arguments)}
return c}}})
;
Ext.define('Ext.theme.neptune.container.ButtonGroup',{override:'Ext.container.ButtonGroup',usePlainButtons:!1})
;
Ext.define('Ext.container.Monitor',{target:null,selector:'',scope:null,addHandler:null,removeHandler:null,invalidateHandler:null,clearPropertiesOnDestroy:!1,clearPrototypeOnDestroy:!1,disabled:0,constructor:function(config){Ext.apply(this,config)},destroy:function(){this.unbind();this.callParent()},bind:function(target){var me=this;me.target=target;target.on('beforedestroy',me.disable,me);me.onContainerAdd(target)},unbind:function(){var me=this,target=me.target;if(target&&!target.destroying&&!target.destroyed){me.onContainerRemove(target,target);target.un('beforedestroy',me.disable,me)}
me.items=Ext.destroy(me.items)},disable:function(){++this.disabled},enable:function(){if(this.disabled>0){--this.disabled}},handleAdd:function(ct,comp){if(!this.disabled){if(Ext.ComponentQuery.is(comp,this.selector)){this.onItemAdd(comp.ownerCt,comp)}
if(comp.isQueryable){this.onContainerAdd(comp)}}},onItemAdd:function(ct,comp){var me=this,items=me.items,handler=me.addHandler;if(!me.disabled){if(handler){handler.call(me.scope||comp,comp)}
if(items){items.add(comp)}}
comp.clearPropertiesOnDestroy=comp.clearPrototypeOnDestroy=!1},onItemRemove:function(ct,comp){var me=this,items=me.items,handler=me.removeHandler;if(!me.disabled){if(handler){handler.call(me.scope||comp,comp)}
if(items){items.remove(comp)}}},onContainerAdd:function(ct,preventChildren){var me=this,items,len,i,comp;if(ct.isContainer){ct.on({scope:me,add:me.handleAdd,dockedadd:me.handleAdd,remove:me.handleRemove,dockedremove:me.handleRemove})}
if(preventChildren!==!0){items=ct.query(me.selector);for(i=0,len=items.length;i<len;++i){comp=items[i];me.onItemAdd(comp.ownerCt,comp)}}
items=ct.query('>container');for(i=0,len=items.length;i<len;++i){me.onContainerAdd(items[i],!0)}
ct.clearPropertiesOnDestroy=ct.clearPrototypeOnDestroy=!1},handleRemove:function(ct,comp){var me=this;if(!me.disabled){if(Ext.ComponentQuery.is(comp,me.selector)){me.onItemRemove(ct,comp)}
if(comp.isQueryable){me.onContainerRemove(ct,comp)}}},onContainerRemove:function(ct,comp){var me=this,items,i,len,item;if(!comp.destroyed&&comp.isContainer){me.removeCtListeners(comp);if(!comp.destroying){items=comp.query(me.selector);for(i=0,len=items.length;i<len;++i){item=items[i];me.onItemRemove(item.ownerCt,item)}
items=comp.query('container');for(i=0,len=items.length;i<len;++i){me.removeCtListeners(items[i])}}}
me.invalidateItems(!0)},removeCtListeners:function(ct){var me=this;ct.un({scope:me,add:me.handleAdd,dockedadd:me.handleAdd,remove:me.handleRemove,dockedremove:me.handleRemove})},getItems:function(){var me=this,items=me.items;if(!items){items=me.items=new Ext.util.MixedCollection();items.addAll(me.target.query(me.selector))}
return items},invalidateItems:function(triggerHandler){var me=this,handler=me.invalidateHandler;if(triggerHandler&&handler){handler.call(me.scope||me,me)}
me.items=Ext.destroy(me.items)}})
;
Ext.define('Ext.plugin.Viewport',{extend:'Ext.plugin.Abstract',requires:['Ext.Responsive'],alias:'plugin.viewport',setCmp:function(cmp){this.cmp=cmp;if(cmp&&!cmp.isViewport){this.decorate(cmp);if(cmp.renderConfigs){cmp.flushRenderConfigs()}
cmp.setupViewport()}},destroy:function(){var el=this.cmp.el;this.callParent();if(el){delete el.setHeight;delete el.setWidth}},statics:{decorate:function(target){Ext.applyIf(target.prototype||target,{ariaRole:'application',viewportCls:Ext.baseCSSPrefix+'viewport'});Ext.override(target,{isViewport:!0,preserveElOnDestroy:!0,initComponent:function(){this.callParent();this.setupViewport()},getSizeModel:function(){var configured=Ext.layout.SizeModel.configured;return configured.pairsByHeightOrdinal[configured.ordinal]},handleViewportResize:function(){var me=this,Element=Ext.dom.Element,width=Element.getViewportWidth(),height=Element.getViewportHeight();if(width!==me.width||height!==me.height){me.setSize(width,height)}},setupViewport:function(){var me=this,el=document.body;if(!me.$responsiveId){me.setResponsiveConfig(!0);Ext.mixin.Responsive.register(me);me.setupResponsiveContext()}
if(!el.id){el.id=me.id}
el.setAttribute('data-componentid',me.id);if(!me.ariaStaticRoles[me.ariaRole]){el.setAttribute('role',me.ariaRole)}
el=me.el=Ext.getBody();Ext.fly(document.documentElement).addCls(me.viewportCls);el.setHeight=el.setWidth=Ext.emptyFn;el.dom.scroll='no';me.allowDomMove=!1;me.renderTo=el;if(Ext.supports.Touch){me.addMeta('apple-mobile-web-app-capable','yes')}
Ext.scrollbar.size();me.width=me.height=undefined;me.initialViewportHeight=Ext.Element.getViewportHeight();me.initialViewportWidth=Ext.Element.getViewportWidth()},afterLayout:function(layout){if(Ext.supports.Touch){document.body.scrollTop=0}
this.callParent([layout])},onRender:function(){var me=this,overflowEl=me.getOverflowEl(),body=Ext.getBody();me.callParent(arguments);Ext.setViewportScroller(me.getScrollable()||{x:!1,y:!1,element:body});if(me.getOverflowEl()!==body){body.setStyle('overflow','hidden')}
me.width=me.initialViewportWidth;me.height=me.initialViewportHeight;me.initialViewportWidth=me.initialViewportHeight=null},initInheritedState:function(inheritedState,inheritedStateInner){var me=this,root=Ext.rootInheritedState;if(inheritedState!==root){me.initInheritedState(me.inheritedState=root,me.inheritedStateInner=Ext.Object.chain(root))}else{me.callParent([inheritedState,inheritedStateInner])}},doDestroy:function(){var me=this,root=Ext.rootInheritedState,scroller=me.scrollable,key;if(scroller){scroller.setConfig({x:!0,y:!0});me.scrollable=null}
for(key in root){if(key!=='rtl'){delete root[key]}}
delete me.el.setHeight;delete me.el.setWidth;me.removeUIFromElement();me.el.removeCls(me.baseCls);Ext.fly(document.body.parentNode).removeCls(me.viewportCls);me.callParent()},addMeta:function(name,content){var meta=document.createElement('meta');meta.setAttribute('name',name);meta.setAttribute('content',content);Ext.getHead().appendChild(meta,!0)},privates:{applyTargetCls:function(targetCls){var el=this.el;if(el===this.getTargetEl()){this.el.addCls(targetCls)}else{this.callParent([targetCls])}},disableTabbing:function(){var el=this.el;if(el){el.saveTabbableState({skipSelf:!0})}},enableTabbing:function(){var el=this.el;if(el){el.restoreTabbableState({skipSelf:!0})}},updateResponsiveState:function(){this.handleViewportResize();this.callParent()}}})}}},function(Viewport){Viewport.prototype.decorate=Viewport.decorate})
;
Ext.define('Ext.container.Viewport',{extend:'Ext.container.Container',requires:['Ext.plugin.Viewport','Ext.Responsive'],alias:'widget.viewport',alternateClassName:'Ext.Viewport',ariaRole:'application',responsiveConfig:!0,privates:{updateResponsiveState:function(){this.handleViewportResize();this.mixins.responsive.updateResponsiveState.call(this)}}},function(){Ext.plugin.Viewport.decorate(this)})
;
Ext.define('Ext.layout.container.Anchor',{extend:'Ext.layout.container.Auto',alternateClassName:'Ext.layout.AnchorLayout',alias:'layout.anchor',type:'anchor',defaultAnchor:'100%',parseAnchorRE:/^(r|right|b|bottom)$/i,manageOverflow:!0,setsItemSize:!0,beginLayoutCycle:function(ownerContext){var me=this,dimensions=0,anchorSpec,childContext,childItems,i,length;me.callParent(arguments);childItems=ownerContext.childItems;length=childItems.length;for(i=0;i<length;++i){childContext=childItems[i];anchorSpec=childContext.target.anchorSpec;if(anchorSpec){if(childContext.widthModel.calculated&&anchorSpec.right){dimensions|=1}
if(childContext.heightModel.calculated&&anchorSpec.bottom){dimensions|=2}
if(dimensions===3){break}}}
ownerContext.anchorDimensions=dimensions;me.sanityCheck(ownerContext)},calculateItems:function(ownerContext,containerSize){var me=this,childItems=ownerContext.childItems,length=childItems.length,gotHeight=containerSize.gotHeight,gotWidth=containerSize.gotWidth,ownerHeight=containerSize.height,ownerWidth=containerSize.width,knownDimensions=(gotWidth?1:0)|(gotHeight?2:0),anchorDimensions=ownerContext.anchorDimensions,anchorSpec,childContext,childMargins,height,i,width;if(!anchorDimensions){return!0}
for(i=0;i<length;i++){childContext=childItems[i];childMargins=childContext.getMarginInfo();anchorSpec=childContext.target.anchorSpec;if(gotWidth&&childContext.widthModel.calculated){width=anchorSpec.right(ownerWidth)-childMargins.width;width=me.adjustWidthAnchor(width,childContext);childContext.setWidth(width)}
if(gotHeight&&childContext.heightModel.calculated){height=anchorSpec.bottom(ownerHeight)-childMargins.height;height=me.adjustHeightAnchor(height,childContext);childContext.setHeight(height)}}
return(knownDimensions&anchorDimensions)===anchorDimensions},sanityCheck:function(ownerContext){var shrinkWrapWidth=ownerContext.widthModel.shrinkWrap,shrinkWrapHeight=ownerContext.heightModel.shrinkWrap,children=ownerContext.childItems,anchorSpec,comp,childContext,i,length;for(i=0,length=children.length;i<length;++i){childContext=children[i];comp=childContext.target;anchorSpec=comp.anchorSpec;if(anchorSpec){if(childContext.widthModel.calculated&&anchorSpec.right){if(shrinkWrapWidth){Ext.log({level:'warn',msg:'Right anchor on '+comp.id+' in shrinkWrap width container'})}}
if(childContext.heightModel.calculated&&anchorSpec.bottom){if(shrinkWrapHeight){Ext.log({level:'warn',msg:'Bottom anchor on '+comp.id+' in shrinkWrap height container'})}}}}},anchorFactory:{offset:function(delta){return function(v){return v+delta}},ratio:function(ratio){return function(v){return Math.floor(v*ratio)}},standard:function(diff){return function(v){return v-diff}}},parseAnchor:function(a,start,cstart){var factory=this.anchorFactory,delta;if(a&&a!=='none'){if(this.parseAnchorRE.test(a)){return factory.standard(cstart-start)}
if(a.indexOf('%')!==-1){return factory.ratio(parseFloat(a.replace('%',''))*0.01)}
delta=parseInt(a,10);if(!isNaN(delta)){return factory.offset(delta)}}
return null},adjustWidthAnchor:function(value,childContext){return value},adjustHeightAnchor:function(value,childContext){return value},configureItem:function(item){var me=this,owner=me.owner,anchor=item.anchor,anchorsArray,anchorWidth,anchorHeight;me.callParent(arguments);if(!item.anchor&&item.items&&!Ext.isNumber(item.width)){item.anchor=anchor=me.defaultAnchor}
if(owner.anchorSize){if(typeof owner.anchorSize==='number'){anchorWidth=owner.anchorSize}else{anchorWidth=owner.anchorSize.width;anchorHeight=owner.anchorSize.height}}else{anchorWidth=owner.initialConfig.width;anchorHeight=owner.initialConfig.height}
if(anchor){anchorsArray=anchor.split(' ');item.anchorSpec={right:me.parseAnchor(anchorsArray[0],item.initialConfig.width,anchorWidth),bottom:me.parseAnchor(anchorsArray[1],item.initialConfig.height,anchorHeight)}}},sizePolicy:{$:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},b:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},r:{$:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},b:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}}},getItemSizePolicy:function(item){var anchorSpec=item.anchorSpec,key='$',policy=this.sizePolicy,sizeModel;if(anchorSpec){sizeModel=this.owner.getSizeModel();if(anchorSpec.right&&!sizeModel.width.shrinkWrap){policy=policy.r}
if(anchorSpec.bottom&&!sizeModel.height.shrinkWrap){key='b'}}
return policy[key]}})
;
Ext.define('Ext.dashboard.Panel',{extend:'Ext.panel.Panel',xtype:'dashboard-panel',cls:Ext.baseCSSPrefix+'dashboard-panel',anchor:'100%',layout:'fit',frame:!0,closable:!0,collapsible:!0,animCollapse:!0,titleCollapse:!0,stateful:!0,draggable:{moveOnDrag:!1},animateClose:!0,loadMask:!0,loadMessage:'Loading...',minHeight:90,resizable:!0,resizeHandles:'s',doClose:function(){var me=this;if(me.animateClose){if(!me.closing){me.closing=!0;me.el.animate({opacity:0,callback:me.finishClose,scope:me})}}else{me.finishClose()}},finishClose:function(){var me=this,closeAction=me.closeAction;me.closing=!1;me.fireEvent('close',me);Ext.suspendLayouts();me[closeAction]();Ext.resumeLayouts(!0);if(closeAction==='hide'){me.el.setOpacity(1)}},afterRender:function(){this.callParent();if(this.loading){this.onViewBeforeLoad()}},doCollapseExpand:function(flags){this._expandCollapseRoot=this._isLayoutRoot;this._isLayoutRoot=!0;this.callParent(arguments)},afterExpand:function(){this._isLayoutRoot=this._expandCollapseRoot;this.callParent(arguments)},afterCollapse:function(){this._isLayoutRoot=this._expandCollapseRoot;this.callParent(arguments)},getLoadMask:function(){var me=this,loadMask=me.rendered&&me.loadMask,config;if(loadMask&&!loadMask.isComponent){config={target:me};if(loadMask===!0){loadMask=config}else{Ext.apply(config,loadMask)}
me.loadMask=loadMask=Ext.ComponentManager.create(config,'loadmask')}
return loadMask||null},onAdd:function(view){this.callParent(arguments);view.on({beforeload:'onViewBeforeLoad',load:'onViewLoaded',scope:this})},onViewBeforeLoad:function(){var loadMask;this.loading=!0;loadMask=this.getLoadMask();if(loadMask){loadMask.show()}},onViewLoaded:function(){var loadMask,view,title;this.loading=!1;loadMask=this.getLoadMask();if(loadMask){loadMask.hide()}
view=this.items.getAt(0);if(view.getTitle){title=view.getTitle();if(title){this.setTitle(title)}}},setBox:function(box){this.setSize(box.width,box.height)},getState:function(){var me=this,state=me.callParent()||{};if(!state.collapsed){me.addPropertyToState(state,'height',me.rendered?me.getHeight():me.height||me.minHeight||100)}
return state}})
;
Ext.define('Ext.dashboard.Column',{extend:'Ext.container.Container',xtype:'dashboard-column',requires:['Ext.layout.container.Anchor','Ext.dashboard.Panel'],layout:'anchor',isDashboardColumn:!0,defaultType:'dashboard-panel',cls:Ext.baseCSSPrefix+'dashboard-column',synthetic:!0,onRemove:function(dashPanel,isDestroying){var me=this,ownerCt=me.ownerCt,remainingSiblings,numRemaining,columnWidth,totalColumnWidth=0,i;if(ownerCt&&me.items.getCount()===0){remainingSiblings=Ext.Array.filter(ownerCt.query('>'+me.xtype+'[rowIndex='+me.rowIndex+']'),function(c){return c!==me});numRemaining=remainingSiblings.length;if(!me.destroying&&!me.destroyed){ownerCt.remove(me);if(numRemaining===1){remainingSiblings[0].columnWidth=1}else{for(i=0;i<numRemaining;i++){totalColumnWidth+=remainingSiblings[i].columnWidth||0}
for(i=0;i<numRemaining;i++){columnWidth=remainingSiblings[i].columnWidth;remainingSiblings[i].columnWidth=Math.floor(columnWidth/totalColumnWidth*100)/100}}
if(isDestroying){ownerCt.updateLayout()}}}}})
;
Ext.define('Ext.layout.container.Column',{extend:'Ext.layout.container.Auto',alternateClassName:'Ext.layout.ColumnLayout',alias:'layout.column',type:'column',itemCls:Ext.baseCSSPrefix+'column',targetCls:Ext.baseCSSPrefix+'column-layout-ct',clearSide:'left',columnWidthSizePolicy:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},createsInnerCt:!0,manageOverflow:!0,setsItemSize:!0,needsItemSize:!0,isItemShrinkWrap:function(item){return!0},getItemSizePolicy:function(item,ownerSizeModel){if(item.columnWidth){if(!ownerSizeModel){ownerSizeModel=this.owner.getSizeModel()}
if(!ownerSizeModel.width.shrinkWrap){return this.columnWidthSizePolicy}}
return this.autoSizePolicy},calculateItems:function(ownerContext,containerSize){var me=this,columnCount=me.columnCount,targetContext=ownerContext.targetContext,items=ownerContext.childItems,len=items.length,contentWidth=0,gotWidth=containerSize.gotWidth,blocked,availableWidth,i,itemContext,itemMarginWidth,itemWidth;if(gotWidth===!1){targetContext.domBlock(me,'width');blocked=!0}else if(gotWidth){availableWidth=containerSize.width}else{return!0}
for(i=0;i<len;++i){itemContext=items[i];if(columnCount){if(i%columnCount){itemContext.setProp('clear',null)}else{itemContext.setProp('clear',me.clearSide)}}
itemMarginWidth=itemContext.getMarginInfo().width;if(!itemContext.widthModel.calculated){itemWidth=itemContext.getProp('width');if(typeof itemWidth!=='number'){itemContext.block(me,'width');blocked=!0}
contentWidth+=itemWidth+itemMarginWidth}}
if(!blocked){contentWidth=me.calculateItemSizeWithContent(availableWidth,contentWidth,items);ownerContext.setContentWidth(contentWidth+ownerContext.paddingContext.getPaddingInfo().width)}
return!blocked},calculateItemSizeWithContent:function(availableWidth,contentWidth,items){var itemMarginWidth,itemContext,itemWidth,i,len=items.length;availableWidth=(availableWidth<contentWidth)?0:availableWidth-contentWidth;for(i=0;i<len;++i){itemContext=items[i];if(itemContext.widthModel.calculated){itemMarginWidth=itemContext.marginInfo.width;itemWidth=itemContext.target.columnWidth;itemWidth=Math.floor(itemWidth*availableWidth)-itemMarginWidth;itemWidth=itemContext.setWidth(itemWidth);contentWidth+=itemWidth+itemMarginWidth}}
return contentWidth}})
;
Ext.define('Ext.rtl.layout.container.Column',{override:'Ext.layout.container.Column',getRenderData:function(){var renderData=this.callParent();if(this.owner.getInherited().rtl){this.clearSide='right';renderData.innerCtCls=(renderData.innerCtCls||'')+' '+Ext.baseCSSPrefix+'rtl'}
return renderData}})
;
Ext.define('Ext.dd.DragTracker',{uses:['Ext.util.Region'],mixins:{observable:'Ext.util.Observable'},active:!1,trackOver:!1,tolerance:5,autoStart:!1,constructor:function(config){var me=this;Ext.apply(me,config);me.dragRegion=new Ext.util.Region(0,0,0,0);if(me.el){me.initEl(me.el)}
me.mixins.observable.constructor.call(me);if(me.disabled){me.disable()}
if(Ext.supports.Touch){Ext.getWin().on({touchstart:'onWindowTouchStart',scope:me,capture:!0})}},initEl:function(el){var me=this,delegate=me.delegate,elCmp,touchScrollable,unselectable;me.el=el=Ext.get(el);if(delegate){if(delegate.isElement){me.handle=delegate;unselectable=delegate}}else{unselectable=el}
if(unselectable){unselectable.addCls(Ext.baseCSSPrefix+'unselectable')}
me.delegate=me.handle?undefined:me.delegate;if(Ext.supports.Touch){elCmp=Ext.Component.from(el);touchScrollable=elCmp&&elCmp.getScrollable();if(touchScrollable){elCmp=touchScrollable.getElement();if(me.handle&&!elCmp.contains(me.handle)){touchScrollable=!1}else if(me.delegate&&!elCmp.down(me.delegate)){touchScrollable=!1}else{touchScrollable=touchScrollable.getX()||touchScrollable.getY()}}}
if(!me.handle){me.handle=el}
me.handleListeners={scope:me,delegate:me.delegate,dragstart:me.onDragStart};if(touchScrollable){me.handleListeners.longpress=me.onMouseDown;me.handleListeners.mousedown={fn:me.onMouseDown,delegate:me.delegate,translate:!1};me.handleListeners.contextmenu=function(e){e.stopEvent()}}else{me.handleListeners.mousedown=me.onMouseDown}
if(!Ext.supports.TouchEvents&&(me.trackOver||me.overCls)){Ext.apply(me.handleListeners,{mouseover:me.onMouseOver,mouseout:me.onMouseOut})}
me.mon(me.handle,me.handleListeners);me.keyNav=new Ext.util.KeyNav({target:el,up:me.onResizeKeyDown,left:me.onResizeKeyDown,right:me.onResizeKeyDown,down:me.onResizeKeyDown,scope:me})},disable:function(){this.disabled=!0},enable:function(){this.disabled=!1},destroy:function(){this.endDrag({});Ext.destroy(this.keyNav);this.callParent()},onWindowTouchStart:function(e){if(this.mouseIsDown){this.onMouseUp(e)}},onMouseOver:function(e,target){var me=this,handleCls,el,i,len,cls;if(!me.disabled){if(e.within(e.target,!0,!0)||me.delegate){handleCls=me.handleCls;me.mouseIsOut=!1;if(handleCls){for(i=0,len=me.handleEls.length;i<len;i++){el=me.handleEls[i];cls=el.delegateCls;if(!cls){cls=el.delegateCls=[handleCls,'-',el.region,'-over'].join('')}
el.addCls([cls,me.overCls])}}
me.fireEvent('mouseover',me,e,me.delegate?e.getTarget(me.delegate,target):me.handle)}}},onMouseOut:function(e){var me=this,el,i,len;if(me.mouseIsDown){me.mouseIsOut=!0}else{if(me.handleCls){for(i=0,len=me.handleEls.length;i<len;i++){el=me.handleEls[i];el.removeCls([el.delegateCls,me.overCls])}}
me.fireEvent('mouseout',me,e)}},onMouseDown:function(e,target){var me=this,trackEvent=e.parentEvent||e;if(e.button||me.disabled||trackEvent.dragTracked){return}
me.dragTarget=me.delegate?target:me.handle.dom;me.startXY=me.lastXY=e.getXY();me.startRegion=Ext.fly(me.dragTarget).getRegion();if(me.fireEvent('mousedown',me,e)===!1||me.fireEvent('beforedragstart',me,e)===!1||me.onBeforeStart(e)===!1){return}
me.mouseIsDown=!0;trackEvent.dragTracked=!0;me.el.setCapture();e.stopPropagation();if(me.preventDefault!==!1||e.pointerType==='touch'){e.preventDefault()}
Ext.getDoc().on({scope:me,capture:!0,mouseup:me.onMouseUp,mousemove:me.onMouseMove,selectstart:me.stopSelect});me.dragEnded=!1;if(!me.tolerance){me.triggerStart()}else if(me.autoStart){me.timer=Ext.defer(me.triggerStart,me.autoStart===!0?1000:me.autoStart,me,[e])}},onMouseMove:function(e,target){var me=this,xy=e.getXY(),s=me.startXY;e.stopPropagation();if(me.preventDefault!==!1){e.preventDefault()}
if(me.dragEnded){return}
me.lastXY=xy;if(!me.active){if(Math.max(Math.abs(s[0]-xy[0]),Math.abs(s[1]-xy[1]))>me.tolerance){me.triggerStart(e)}else{return}}
if(me.fireEvent('mousemove',me,e)===!1){me.onMouseUp(e)}else{me.onDrag(e);me.fireEvent('drag',me,e)}},onMouseUp:function(e){var me=this;me.mouseIsDown=!1;if(me.mouseIsOut){me.mouseIsOut=!1;me.onMouseOut(e)}
if(me.preventDefault!==!1){e.preventDefault()}
if(Ext.isIE&&document.releaseCapture){document.releaseCapture()}
me.fireEvent('mouseup',me,e);me.endDrag(e)},endDrag:function(e){var me=this,wasActive=me.active;Ext.getDoc().un({mousemove:me.onMouseMove,mouseup:me.onMouseUp,selectstart:me.stopSelect,capture:!0,scope:me});me.clearStart();me.active=!1;me.dragEnded=!0;if(wasActive){me.onEnd(e);me.fireEvent('dragend',me,e)}else{me.onCancel(e)}
me._constrainRegion=null},triggerStart:function(e){var me=this;me.clearStart();me.active=!0;me.onStart(e);me.fireEvent('dragstart',me,e)},clearStart:function(){var timer=this.timer;if(timer){Ext.undefer(timer);this.timer=null}},stopSelect:function(e){e.stopEvent();return!1},onBeforeStart:function(e){},onStart:function(e){},onDrag:function(e){},onCancel:function(e){},onEnd:function(e){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){var me=this;if(me.constrainTo){if(me.constrainTo instanceof Ext.util.Region){return me.constrainTo}
if(!me._constrainRegion){me._constrainRegion=Ext.fly(me.constrainTo).getViewRegion()}}else{if(!me._constrainRegion){me._constrainRegion=me.getDragCt().getViewRegion()}}
return me._constrainRegion},getXY:function(constrain){return constrain?this.constrainModes[constrain](this,this.lastXY):this.lastXY},getOffset:function(constrain){var xy=this.getXY(constrain),s=this.startXY;return[xy[0]-s[0],xy[1]-s[1]]},onDragStart:function(e){e.stopPropagation()},constrainModes:{point:function(me,xy){var dr=me.dragRegion,constrainTo=me.getConstrainRegion();if(!constrainTo){return xy}
dr.x=dr.left=dr[0]=dr.right=xy[0];dr.y=dr.top=dr[1]=dr.bottom=xy[1];dr.constrainTo(constrainTo);return[dr.left,dr.top]},dragTarget:function(me,xy){var s=me.startXY,dr=me.startRegion.copy(),constrainTo=me.getConstrainRegion(),adjust;if(!constrainTo){return xy}
dr.translateBy(xy[0]-s[0],xy[1]-s[1]);if(dr.right>constrainTo.right){xy[0]+=adjust=(constrainTo.right-dr.right);dr.left+=adjust}
if(dr.left<constrainTo.left){xy[0]+=(constrainTo.left-dr.left)}
if(dr.bottom>constrainTo.bottom){xy[1]+=adjust=(constrainTo.bottom-dr.bottom);dr.top+=adjust}
if(dr.top<constrainTo.top){xy[1]+=(constrainTo.top-dr.top)}
return xy}}})
;
Ext.define('Ext.resizer.SplitterTracker',{extend:'Ext.dd.DragTracker',requires:['Ext.util.Region'],enabled:!0,overlayCls:Ext.baseCSSPrefix+'resizable-overlay',createDragOverlay:function(){var overlay,El=Ext.dom.Element;overlay=this.overlay=Ext.getBody().createChild({role:'presentation',cls:this.overlayCls,html:'&#160;'});overlay.unselectable();overlay.setSize(El.getDocumentWidth(),El.getDocumentHeight());overlay.show()},getPrevCmp:function(){var splitter=this.getSplitter();return splitter.previousSibling(':not([hidden])')},getNextCmp:function(){var splitter=this.getSplitter();return splitter.nextSibling(':not([hidden])')},onBeforeStart:function(e){var me=this,prevCmp=me.getPrevCmp(),nextCmp=me.getNextCmp(),collapseEl=me.getSplitter().collapseEl,target=e.getTarget(),box;if(!prevCmp||!nextCmp){return!1}
if(collapseEl&&target===collapseEl.dom){return!1}
if(nextCmp.collapsed||prevCmp.collapsed){return!1}
me.prevBox=prevCmp.getEl().getBox();me.nextBox=nextCmp.getEl().getBox();me.constrainTo=box=me.calculateConstrainRegion();if(!box){return!1}
return box},onMouseDown:function(e,target){this.callParent([e,target]);if(this.mouseIsDown&&this.getSplitter().el.dom===target){Ext.dom.Element.maskIframes()}},onMouseUp:function(e){this.callParent([e]);Ext.dom.Element.unmaskIframes()},onStart:function(e){var splitter=this.getSplitter();this.createDragOverlay();splitter.addCls(splitter.baseCls+'-active')},onResizeKeyDown:function(e){var me=this,splitter=me.getSplitter(),key=e.getKey(),incrIdx=splitter.orientation==='vertical'?0:1,incr=key===e.UP||key===e.LEFT?-1:1,easing;if(!me.active&&me.onBeforeStart(e)){Ext.fly(e.target).on('keyup',me.onResizeKeyUp,me);me.triggerStart(e);me.onMouseDown(e);me.startXY=splitter.getXY();me.lastKeyDownXY=Ext.Array.slice(me.startXY);easing=me.easing=new Ext.fx.easing.Linear();easing.setStartTime(Ext.Date.now());easing.setStartValue(1);easing.setEndValue(4);easing.setDuration(2000)}
if(me.active){me.lastKeyDownXY[incrIdx]=Math.round(me.lastKeyDownXY[incrIdx]+(incr*me.easing.getValue()));me.lastXY=me.lastKeyDownXY;splitter.setXY(me.getXY('dragTarget'))}},onResizeKeyUp:function(e){this.onMouseUp(e)},calculateConstrainRegion:function(){var me=this,splitter=me.getSplitter(),splitWidth=splitter.getWidth(),defaultMin=splitter.defaultSplitMin,orient=splitter.orientation,prevBox=me.prevBox,prevCmp=me.getPrevCmp(),nextBox=me.nextBox,nextCmp=me.getNextCmp(),prevConstrainRegion,nextConstrainRegion,constrainOptions;if(orient==='vertical'){constrainOptions={prevCmp:prevCmp,nextCmp:nextCmp,prevBox:prevBox,nextBox:nextBox,defaultMin:defaultMin,splitWidth:splitWidth};prevConstrainRegion=new Ext.util.Region(prevBox.y,me.getVertPrevConstrainRight(constrainOptions),prevBox.bottom,me.getVertPrevConstrainLeft(constrainOptions));nextConstrainRegion=new Ext.util.Region(nextBox.y,me.getVertNextConstrainRight(constrainOptions),nextBox.bottom,me.getVertNextConstrainLeft(constrainOptions))}else{prevConstrainRegion=new Ext.util.Region(prevBox.y+(prevCmp.minHeight||defaultMin),prevBox.right,(prevCmp.maxHeight?prevBox.y+prevCmp.maxHeight:nextBox.bottom-(nextCmp.minHeight||defaultMin))+splitWidth,prevBox.x);nextConstrainRegion=new Ext.util.Region((nextCmp.maxHeight?nextBox.bottom-nextCmp.maxHeight:prevBox.y+(prevCmp.minHeight||defaultMin))-splitWidth,nextBox.right,nextBox.bottom-(nextCmp.minHeight||defaultMin),nextBox.x)}
return prevConstrainRegion.intersect(nextConstrainRegion)},performResize:function(e,offset){var me=this,splitter=me.getSplitter(),orient=splitter.orientation,prevCmp=me.getPrevCmp(),nextCmp=me.getNextCmp(),owner=splitter.ownerCt,flexedSiblings=owner.query('>[flex]'),len=flexedSiblings.length,vertical=orient==='vertical',i=0,dimension=vertical?'width':'height',item,size;for(;i<len;i++){item=flexedSiblings[i];size=vertical?item.getWidth():item.getHeight();item.flex=size}
offset=vertical?offset[0]:offset[1];if(prevCmp){size=me.prevBox[dimension]+offset;if(prevCmp.flex){prevCmp.flex=size}else{prevCmp[dimension]=size}}
if(nextCmp){size=me.nextBox[dimension]-offset;if(nextCmp.flex){nextCmp.flex=size}else{nextCmp[dimension]=size}}
owner.updateLayout()},endDrag:function(){var me=this;if(me.overlay){me.overlay.destroy();delete me.overlay}
me.callParent(arguments)},onEnd:function(e){var me=this,splitter=me.getSplitter();splitter.removeCls(splitter.baseCls+'-active');me.performResize(e,me.getResizeOffset())},onDrag:function(e){var me=this,offset=me.getOffset('dragTarget'),splitter=me.getSplitter(),splitEl=splitter.getEl(),orient=splitter.orientation;if(orient==="vertical"){splitEl.setX(me.startRegion.left+offset[0])}else{splitEl.setY(me.startRegion.top+offset[1])}},getSplitter:function(){return this.splitter},getVertPrevConstrainRight:function(o){return(o.prevCmp.maxWidth?o.prevBox.x+o.prevCmp.maxWidth:o.nextBox.right-(o.nextCmp.minWidth||o.defaultMin))+o.splitWidth},getVertPrevConstrainLeft:function(o){return o.prevBox.x+(o.prevCmp.minWidth||o.defaultMin)},getVertNextConstrainRight:function(o){return o.nextBox.right-(o.nextCmp.minWidth||o.defaultMin)},getVertNextConstrainLeft:function(o){return(o.nextCmp.maxWidth?o.nextBox.right-o.nextCmp.maxWidth:o.prevBox.x+(o.prevBox.minWidth||o.defaultMin))-o.splitWidth},getResizeOffset:function(){return this.getOffset('dragTarget')}})
;
Ext.define('Ext.rtl.resizer.SplitterTracker',{override:'Ext.resizer.SplitterTracker',getVertPrevConstrainLeft:function(o){return(!this.splitter.getInherited().rtl!==!Ext.rootInheritedState.rtl)?((o.prevCmp.maxWidth?o.prevBox.right-o.prevCmp.maxWidth:o.nextBox.x+(o.nextCmp.minWidth||o.defaultMin))-o.splitWidth):this.callParent(arguments)},getVertPrevConstrainRight:function(o){return(!this.splitter.getInherited().rtl!==!Ext.rootInheritedState.rtl)?o.prevBox.right-(o.prevCmp.minWidth||o.defaultMin):this.callParent(arguments)},getVertNextConstrainLeft:function(o){return(!this.splitter.getInherited().rtl!==!Ext.rootInheritedState.rtl)?o.nextBox.x+(o.nextCmp.minWidth||o.defaultMin):this.callParent(arguments)},getVertNextConstrainRight:function(o){return(!this.splitter.getInherited().rtl!==!Ext.rootInheritedState.rtl)?((o.nextCmp.maxWidth?o.nextBox.x+o.nextCmp.maxWidth:o.prevBox.right-(o.prevBox.minWidth||o.defaultMin))+o.splitWidth):this.callParent(arguments)},getResizeOffset:function(){var offset=this.getOffset('dragTarget');if(!this.splitter.getInherited().rtl!==!Ext.rootInheritedState.rtl){offset[0]=-offset[0]}
return offset}})
;
Ext.define('Ext.layout.container.ColumnSplitterTracker',{extend:'Ext.resizer.SplitterTracker',onStart:function(e){Ext.apply(this.getSplitter().el.dom.style,{top:0,left:0});this.callParent(arguments)},endDrag:function(){var me=this;me.callParent(arguments);me.getSplitter().el.dom.style.left=0},performResize:function(e,offset){var me=this,prevCmp=me.getPrevCmp(),nextCmp=me.getNextCmp(),splitter=me.getSplitter(),owner=splitter.ownerCt,delta=offset[0],prevWidth,nextWidth,ratio;if(prevCmp&&nextCmp){prevCmp.width=prevWidth=me.prevBox.width+delta;nextCmp.width=nextWidth=me.nextBox.width-delta;ratio=(prevCmp.columnWidth+nextCmp.columnWidth)/(prevWidth+nextWidth);prevCmp.columnWidth=prevWidth*ratio;nextCmp.columnWidth=nextWidth*ratio}
owner.updateLayout()}})
;
Ext.define('Ext.layout.container.ColumnSplitter',{extend:'Ext.resizer.Splitter',xtype:'columnsplitter',requires:['Ext.layout.container.ColumnSplitterTracker'],isSplitter:!0,synthetic:!0,cls:Ext.baseCSSPrefix+'splitter-vertical',orientation:'vertical',collapseDirection:'left',trackerClass:'Ext.layout.container.ColumnSplitterTracker',width:7,height:1,getTrackerConfig:function(){var tracker=this.callParent();tracker.xclass=this.trackerClass;return tracker}})
;
Ext.define('Ext.layout.container.Dashboard',{extend:'Ext.layout.container.Column',alias:'layout.dashboard',requires:['Ext.layout.container.ColumnSplitter'],type:'dashboard',firstColumnCls:Ext.baseCSSPrefix+'dashboard-column-first',lastColumnCls:Ext.baseCSSPrefix+'dashboard-column-last',getSplitterConfig:function(){return{xtype:'columnsplitter'}},getColumns:function(items){var array=Ext.Array;return array.filter(array.from(items),function(item){return item.target&&item.target.isSplitter!==!0})},beginLayout:function(ownerContext){var me=this;me.callParent([ownerContext]);var childItems=ownerContext.childItems,rows=(ownerContext.rows=[]),length=childItems.length,totalWidth=2,columnTargets=0,lastRow=0,maxColumns=me.owner.getMaxColumns(),child,i,prev,row,splitter,target,width;for(i=0;i<length;++i){target=(child=childItems[i]).target;splitter=target&&target.isSplitter;columnTargets+=(splitter?0:1);width=splitter?0:target.columnWidth||1;if(totalWidth+width>1||(maxColumns&&(columnTargets>maxColumns))){if(prev){prev.orphan=1;prev.el.setHeight(0)}
totalWidth=0;columnTargets=1;if(rows.length){lastRow=rows.length-1;me.syncFirstLast(me.getColumns(rows[lastRow].items))}
rows.push(row={index:rows.length,items:[],maxHeight:0})}
totalWidth+=width;row.items.push(child);child.row=row;target.rowIndex=row.index;if(splitter){child.el.setHeight(1)}
prev=child}
if(rows.length){me.syncFirstLast(me.getColumns(rows[rows.length-1].items))}},beforeLayoutCycle:function(ownerContext){var me=this,items=me.owner.items;if(me.splitterGen!==items.generation){me.syncSplitters();me.splitterGen=items.generation}
me.callParent(arguments)},finishedLayout:function(ownerContext){var items=ownerContext.childItems,len=items.length,box,child,i,target,row;this.callParent([ownerContext]);for(i=0;i<len;i+=2){target=(child=items[i]).target;box=target.lastBox;row=child.row;row.maxHeight=Math.max(row.maxHeight,box.height);target.width=box.width}
for(i=0;i<len;i ++){target=(child=items[i]).target;if(!child.orphan){if(i%2===0){target.el.setMinHeight(child.row.maxHeight)}else{target.el.setHeight(child.row.maxHeight)}}else{target.el.setWidth(0)}}},syncSplitters:function(){var me=this,owner=me.owner,items=owner.items.items,index=items.length,ok=!0,shouldBeSplitter=!1,item,splitter;while(index-->0){item=items[index];if(shouldBeSplitter){if(item.isSplitter){shouldBeSplitter=!1}else{if(ok){ok=!1;owner.suspendLayouts()}
splitter=owner.add(index+1,me.getSplitterConfig())}}else{if(item.isSplitter){if(ok){ok=!1;owner.suspendLayouts()}
owner.remove(item)}else{shouldBeSplitter=!0}}}
while(items.length&&(item=items[0]).isSplitter){if(ok){ok=!1;owner.suspendLayouts()}
owner.remove(item)}
if(!ok){owner.resumeLayouts()}},syncFirstLast:function(items){var me=this,firstCls=me.firstColumnCls,lastCls=me.lastColumnCls,len,firstAndLast=[firstCls,lastCls],i,item,last;items=Ext.Array.from(items);len=items.length;for(i=0;i<len;++i){item=items[i].target;last=(i===len-1);if(!i){if(last){item.addCls(firstAndLast)}else{item.addCls(firstCls);item.removeCls(lastCls)}}else if(last){item.addCls(lastCls);item.removeCls(firstCls)}else{item.removeCls(firstAndLast)}}},calculateItemSizeWithContent:function(availableWidth,contentWidth,items){var itemMarginWidth,itemContext,splitterItemWidth=0,halfSplitterItemWidth=0,itemWidth,i,len=items.length,rowindex,rowLen;availableWidth=(availableWidth<contentWidth)?0:availableWidth;for(i=0;i<len;i+=2){itemContext=items[i];rowLen=itemContext.row.items.length;rowindex=itemContext.row.items.indexOf(itemContext);itemMarginWidth=itemContext.marginInfo.width;itemWidth=itemContext.target.columnWidth;itemWidth=Math.floor(itemWidth*availableWidth)-itemMarginWidth;if(splitterItemWidth===0&&(rowindex+1<rowLen)){splitterItemWidth=items[i+1].getProp('width');halfSplitterItemWidth=Math.ceil(splitterItemWidth/2)}
if(halfSplitterItemWidth){if(rowindex+2<rowLen){itemWidth-=halfSplitterItemWidth}
if(rowindex>0){itemWidth-=halfSplitterItemWidth}}
itemWidth=itemContext.setWidth(itemWidth);contentWidth+=itemWidth+itemMarginWidth}
return contentWidth}})
;
Ext.define('Ext.dd.DDTarget',{extend:'Ext.dd.DragDrop',constructor:function(id,sGroup,config){if(id){this.initTarget(id,sGroup,config)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}})
;
Ext.define('Ext.dd.ScrollManager',{singleton:!0,requires:['Ext.dd.DragDropManager'],vthresh:25*(window.devicePixelRatio||1),hthresh:25*(window.devicePixelRatio||1),increment:100,frequency:500,animate:!0,animDuration:0.4,ddGroup:undefined,dirTrans:{up:-1,left:-1,down:1,right:1},constructor:function(){var ddm=Ext.dd.DragDropManager;ddm.fireEvents=Ext.Function.createSequence(ddm.fireEvents,this.onFire,this);ddm.stopDrag=Ext.Function.createSequence(ddm.stopDrag,this.onStop,this);this.doScroll=this.doScroll.bind(this);this.ddmInstance=ddm;this.els={};this.dragEl=null;this.proc={}},onStop:function(e){var sm=Ext.dd.ScrollManager;sm.dragEl=null;sm.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){var me=this;if(me.ddmInstance.dragCurrent){var proc=me.proc,procEl=proc.el,scrollComponent=proc.component,ddScrollConfig=proc.el.ddScrollConfig,distance,animate,afterScroll;distance=ddScrollConfig&&ddScrollConfig.increment?ddScrollConfig.increment:me.increment;animate=ddScrollConfig&&'animate' in ddScrollConfig?ddScrollConfig.animate:me.animate;afterScroll=function(){me.triggerRefresh()};if(animate){if(animate===!0){animate={callback:afterScroll}}else{animate.callback=animate.callback?Ext.Function.createSequence(animate.callback,afterScroll):afterScroll}}
if(scrollComponent){distance=distance*me.dirTrans[proc.dir];if(proc.dir==='up'||proc.dir==='down'){scrollComponent.scrollBy(0,distance,animate)}else{scrollComponent.scrollBy(distance,0,animate)}}else{procEl.scroll(proc.dir,distance,animate)}
if(!animate){afterScroll()}}},clearProc:function(){var proc=this.proc;if(proc.id){Ext.uninterval(proc.id)}
proc.id=0;proc.el=null;proc.dir=""},startProc:function(el,dir){var me=this,proc=me.proc,group,freq;me.clearProc();proc.el=el;proc.dir=dir;group=el.ddScrollConfig?el.ddScrollConfig.ddGroup:undefined;freq=(el.ddScrollConfig&&el.ddScrollConfig.frequency)?el.ddScrollConfig.frequency:me.frequency;if(group===undefined||me.ddmInstance.dragCurrent.ddGroup===group){proc.id=Ext.interval(me.doScroll,freq)}},onFire:function(e,isDrop){var me=this,pt,proc,els,id,el,elementRegion,configSource,ownerCt,scrollerOwner;if(isDrop||!me.ddmInstance.dragCurrent){return}
if(!me.dragEl||me.dragEl!==me.ddmInstance.dragCurrent){me.dragEl=me.ddmInstance.dragCurrent;me.refreshCache()}
pt=e.getPoint();proc=me.proc;els=me.els;for(id in els){el=els[id];elementRegion=el.getRegion();configSource=el.ddScrollConfig||me;if(elementRegion&&elementRegion.contains(pt)){if(!el.isScrollable()){ownerCt=el.component&&el.component.ownerCt;scrollerOwner=ownerCt&&ownerCt.getScrollerOwner&&ownerCt.getScrollerOwner();if(scrollerOwner){el=scrollerOwner.getScrollable().getElement();elementRegion=el.getRegion()}else{continue}}
if(elementRegion.bottom-pt.y<=configSource.vthresh){if(proc.el!==el){me.startProc(el,"down")}
return}else if(elementRegion.right-pt.x<=configSource.hthresh){if(proc.el!==el){me.startProc(el,"right")}
return}else if(pt.y-elementRegion.top<=configSource.vthresh){if(proc.el!==el){me.startProc(el,"up")}
return}else if(pt.x-elementRegion.left<=configSource.hthresh){if(proc.el!==el){me.startProc(el,"left")}
return}}}
me.clearProc()},register:function(el){var i,len;if(Ext.isArray(el)){for(i=0,len=el.length;i<len;i++){this.register(el[i])}}else{el=Ext.get(el);this.els[el.id]=el}},unregister:function(el){var i,len;if(Ext.isArray(el)){for(i=0,len=el.length;i<len;i++){this.unregister(el[i])}}else{el=Ext.get(el);delete this.els[el.id]}},refreshCache:function(){var els=this.els,id;for(id in els){if(typeof els[id]==='object'){els[id]._region=els[id].getRegion()}}}})
;
Ext.define('Ext.dd.DropTarget',{extend:'Ext.dd.DDTarget',requires:['Ext.dd.ScrollManager'],constructor:function(el,config){this.el=Ext.get(el);Ext.apply(this,config);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}
this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:!0}])},containerScroll:!1,dropAllowed:Ext.baseCSSPrefix+'dd-drop-ok',dropNotAllowed:Ext.baseCSSPrefix+'dd-drop-nodrop',isTarget:!0,isNotifyTarget:!0,notifyEnter:function(source,e,data){if(this.overClass){this.el.addCls(this.overClass)}
return this.dropAllowed},notifyOver:function(source,e,data){return this.dropAllowed},notifyOut:function(source,e,data){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(source,e,data){if(this.overClass){this.el.removeCls(this.overClass)}
return!1},destroy:function(){if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}
this.callParent()}})
;
Ext.define('Ext.dashboard.DropZone',{extend:'Ext.dd.DropTarget',ddScrollConfig:{vthresh:75,hthresh:-1,animate:!0,increment:200},containerScroll:!0,overClass:Ext.baseCSSPrefix+'dashboard-dd-over',constructor:function(dashboard,cfg){this.dashboard=dashboard;dashboard.body.ddScrollConfig=this.ddScrollConfig;this.callParent([dashboard.body,cfg])},getOverEvent:function(dd,e,data){var dashboard=this.dashboard,dbody=dashboard.body,items=dashboard.items.items,bodyBox=dbody.getBox(),count=items.length,xy=e.getXY(),orginalX=xy[0]-bodyBox.x+dbody.getScrollLeft(),orginalY=xy[1]-bodyBox.y+dbody.getScrollTop(),x=orginalX,y=orginalY,yOffset=0,rowIterationIndex=0,over={columnIndex:0,column:null,dashboard:dashboard,above:null,extensible:!1,beforeAfter:0,data:data,panel:data.panel,rawEvent:e,source:dd,status:this.dropAllowed},t,ht,i,k,item,w,h,childCount,childItems,childItem;for(i=0;i<count;i+=2){item=items[i];if(rowIterationIndex!==item.rowIndex){rowIterationIndex=item.rowIndex;x=orginalX;if(rowIterationIndex>0){y-=yOffset;yOffset=0}}
w=item.lastBox.width;h=item.lastBox.height;if(yOffset<=h){yOffset=h}
if(items[i+1]){w+=items[i+1].lastBox.width}
if(e.within(item.el)){over.columnIndex=i;over.column=item;over.extensible=this.isRowExtensible(item.rowIndex);t=Math.min(80,w*0.2);over.beforeAfter=t=(over.extensible&&((x<t)?-1:((x>w-t)?1:0)));if(!t||!over.extensible){childItems=item.items.items;for(k=0,childCount=childItems.length;k<childCount;++k){childItem=childItems[k];ht=childItem.el.getHeight();if(y<ht/2){over.above=childItem;break}
y-=ht}}
break}
x-=w}
return over},notifyOver:function(dd,e,data){var me=this,dashboard=me.dashboard,hasListeners=dashboard.hasListeners,over=me.getOverEvent(dd,e,data),colEl=over.column&&over.column.el,proxy=dd.proxy,aboveItem=over.above,width=0,proxyProxy,colWidth,padding;data.lastOver=over;if((!hasListeners.validatedrop||dashboard.fireEvent('validatedrop',over)!==!1)&&(!hasListeners.beforedragover||dashboard.fireEvent('beforedragover',over)!==!1)){proxyProxy=dd.panelProxy.getProxy();proxy.getProxy().setWidth('auto');if(colEl){width=colWidth=colEl.getWidth();if(over.beforeAfter){dd.panelProxy.moveProxy(colEl.dom,colEl.dom.firstChild);width=colWidth/2;proxyProxy.setWidth(width)}else{if(aboveItem){dd.panelProxy.moveProxy(aboveItem.el.dom.parentNode,aboveItem.el.dom)}else{dd.panelProxy.moveProxy(colEl.dom,null)}
proxyProxy.setWidth('auto')}
proxyProxy.setStyle({'float':'none','clear':'none','margin-left':(over.beforeAfter>0)?(colWidth-width-colEl.getPadding('lr'))+'px':'','margin-top':'7px'})}else{padding=dashboard.body.getPadding('lr');proxyProxy.setStyle({'float':'left','clear':'left','margin':'0 7px 0 7px'});proxyProxy.setWidth(dashboard.body.getWidth()-padding);dd.panelProxy.moveProxy(dashboard.body.dom.firstChild.firstChild,null)}
this.scrollPos=dashboard.body.getScroll();if(hasListeners.dragover){dashboard.fireEvent('dragover',over)}}
return over.status},isRowExtensible:function(rowIndex){var me=this,dashboard=me.dashboard,maxColumns=dashboard.getMaxColumns()||1,items;items=dashboard.query('>dashboard-column[rowIndex='+rowIndex+']');return Ext.Array.from(items).length<maxColumns},notifyDrop:function(dd,e,data){this.callParent(arguments);var dashboard=this.dashboard,over=data.lastOver,panel=over.panel,fromCt=panel.ownerCt,toCt=over.column,side=toCt?over.beforeAfter:1,currentIndex=fromCt.items.indexOf(panel),newIndex=toCt?(over.above?toCt.items.indexOf(over.above):toCt.items.getCount()):0,colIndex,newCol,hasListeners=dashboard.hasListeners;if(fromCt===toCt){if(fromCt.items.getCount()===1){return}
if(!side){if(currentIndex<newIndex){--newIndex}
if(currentIndex===newIndex){return}}}
if((hasListeners.validatedrop&&dashboard.fireEvent('validatedrop',over)===!1)||(hasListeners.beforedrop&&dashboard.fireEvent('beforedrop',over)===!1)){return}
Ext.suspendLayouts();panel.isMoving=!0;if(side){colIndex=dashboard.items.indexOf(toCt);if(colIndex<0){colIndex=dashboard.items.getCount()}else if(side>0){++colIndex}
newCol=dashboard.createColumn();if(toCt){newCol.columnWidth=toCt.columnWidth=toCt.columnWidth/2;delete toCt.width}else{newCol.columnWidth=1}
toCt=dashboard.insert(colIndex,newCol);newIndex=0}
panel.el.dom.style.display='';toCt.insert(newIndex,panel);panel.isMoving=!1;toCt.updateLayout();Ext.resumeLayouts(!0);if(hasListeners.drop){dashboard.fireEvent('drop',over)}}})
;
Ext.define('Ext.dashboard.Part',{mixins:['Ext.mixin.Factoryable','Ext.mixin.Identifiable'],requires:['Ext.util.ObjectTemplate'],alias:'part.part',factoryConfig:{type:'part'},isPart:!0,_lastId:0,config:{id:null,dashboard:null,viewTemplate:{collapsed:'{collapsed}',columnIndex:'{columnIndex}',id:'{id}',title:'{title}',height:'{height}'}},viewTemplateOptions:{excludeProperties:{bind:1}},valueRe:/^[{][a-z]*[}]$/i,constructor:function(config){this.initConfig(config)},applyViewTemplate:function(template){if(!Ext.isObject(template)){Ext.raise('The viewTemplate for '+this.$className+' is not an Object')}
return Ext.util.ObjectTemplate.create(template,this.viewTemplateOptions)},displayForm:function(instance,currentConfig,callback,scope){callback.call(scope||this,{})},createView:function(config){var me=this,template=me.getViewTemplate(),ret=template.apply(config);ret.dashboard=me.getDashboard();ret.part=me;ret._partConfig=config;return ret}})
;
Ext.define('Ext.dashboard.Dashboard',{extend:'Ext.panel.Panel',xtype:'dashboard',requires:['Ext.layout.container.Dashboard','Ext.dashboard.DropZone','Ext.dashboard.Column','Ext.dashboard.Part'],isDashboard:!0,cls:Ext.baseCSSPrefix+'dashboard',bodyCls:Ext.baseCSSPrefix+'dashboard-body',defaultType:'dashboard-column',scrollable:!0,layout:{type:'dashboard'},stateful:!1,idSeed:1,config:{parts:null},renderConfig:{maxColumns:4},initComponent:function(){var me=this;me.callParent();me.addStateEvents('remove')},applyParts:function(parts,collection){var id,part;if(!collection){collection=new Ext.util.Collection({decoder:Ext.Factory.part})}
for(id in parts){part=parts[id];if(Ext.isString(part)){part={type:part}}
part.id=id;part.dashboard=this;collection.add(part)}
return collection},getPart:function(type){var parts=this.getParts();return parts.getByKey(type)},addNew:function(type,columnIndex,beforeAfter){var me=this,part=me.getPart(type);part.displayForm(null,null,function(config){config.type=type;me.addView(config,columnIndex,beforeAfter)})},addView:function(instance,columnIndex,beforeAfter){var me=this,items=me.query('dashboard-column'),count=items.length,index=columnIndex||0,view=instance.id?instance:me.createView(instance),columnWidths=me.columnWidths,column;if(!count){column=me.add(0,me.createColumn({columnWidth:(Ext.isArray(columnWidths)?columnWidths[0]:1)}));items=[column];count=1}
if(index>=count){index=count-1;beforeAfter=1}
if(!beforeAfter){column=items[index];if(column){return column.add(view)}}
if(beforeAfter>0){++index}
column=me.createColumn();if(columnWidths){column.columnWidth=columnWidths[index]||(columnWidths[index]=1)}
if(!column.items){column.items=[]}
column.items.push(view);column=me.add(column);return column.items.first()},createColumn:function(config){var cycle=this.cycleLayout;return Ext.apply({items:[],bubbleEvents:['add','childmove','resize'],listeners:{expand:cycle,collapse:cycle,scope:this}},config)},createView:function(config){var me=this,type=config.type,part=me.getPart(type),view=part.createView(config);if(!view.id){view.id=me.id+'_'+type+(me.idSeed++)}
view.bubbleEvents=Ext.Array.from(view.bubbleEvents).concat(['expand','collapse']);view.stateful=me.stateful;view.listeners={removed:this.onItemRemoved,scope:this};return view},initEvents:function(){this.callParent();this.dd=new Ext.dashboard.DropZone(this,this.dropConfig)},cycleLayout:function(){this.updateLayout()},doDestroy:function(){if(this.dd){Ext.destroy(this.dd)}
this.callParent()},applyState:function(state){delete state.items;this.callParent([state]);var me=this,columnWidths=state.columnWidths,items=me.items.items,length=items.length,columnLength=columnWidths?columnWidths.length:0,i;if(columnLength){me.columnWidths=[];for(i=0;i<length;++i){me.columnWidths.push(items[i].columnWidth=(i<columnLength)?columnWidths[i]:(1/length))}}},getState:function(){var me=this,columnWidths=[],items=me.items.items,state=me.callParent()||{},length=items.length,i,item;for(i=0;i<length;++i){if(!(item=items[i]).isSplitter){columnWidths.push(item.columnWidth)}}
state.idSeed=me.idSeed;state.items=me.serializeItems();if(columnWidths.length){state.columnWidths=me.columnWidths=columnWidths}else{delete state.columnWidths}
return state},initItems:function(){var me=this,defaultContent=me.defaultContent,state;if(me.stateful){state=Ext.state.Manager.get(me.getStateId());defaultContent=(state&&state.items)||defaultContent}
if(!me.items&&defaultContent){me.items=me.deserializeItems(defaultContent)}
me.callParent()},deserializeItems:function(serialized){var me=this,length=serialized.length,columns=[],columnWidths=me.columnWidths,maxColumns=me.getMaxColumns(),column,columnIndex,columnWidth,i,item,partConfig;for(i=0;i<length;++i){partConfig=serialized[i];columnIndex=Math.min(partConfig.columnIndex||0,maxColumns-1);delete partConfig.columnIndex;if(!(column=columns[columnIndex])){columns[columnIndex]=column=me.createColumn();columnWidth=columnWidths&&columnWidths[columnIndex];if(columnWidth){column.columnWidth=columnWidth}}
item=me.createView(partConfig);column.items.push(item)}
for(i=0,length=columns.length;i<length;++i){column=columns[i];if(!column.columnWidth){column.columnWidth=1/length}}
return columns},serializeItem:function(item){return Ext.apply({type:item.part.id,id:item.id,columnIndex:item.columnIndex},item._partConfig)},serializeItems:function(){var me=this,items=me.items.items,length=items.length,ret=[],columnIndex=0,child,childItems,i,item,j,k;for(i=0;i<length;++i){item=items[i];if(!item.isSplitter){childItems=item.items.items;for(j=0,k=childItems.length;j<k;++j){child=childItems[j];child.columnIndex=columnIndex;ret.push(me.serializeItem(child))}
++columnIndex}}
return ret},onItemRemoved:function(item,column){if(item.stateful&&!item.isMoving){Ext.state.Manager.clear(item.getStateId())}}})
;
Ext.define('Ext.dd.DragZone',{extend:'Ext.dd.DragSource',constructor:function(el,config){var me=this,scroll;me.callParent([el,config]);scroll=me.containerScroll;if(scroll){el=me.scrollEl||el;el=Ext.get(el);if(Ext.isObject(scroll)){el.ddScrollConfig=scroll}
Ext.dd.ScrollManager.register(el)}},getDragData:function(e){return Ext.dd.Registry.getHandleFromEvent(e)},onInitDrag:function(x,y){this.proxy.update(this.dragData.ddel.cloneNode(!0));this.onStartDrag(x,y);return!0},getRepairXY:function(e){return Ext.fly(this.dragData.ddel).getXY()},destroy:function(){if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.scrollEl||this.el)}
this.callParent()}})
;
Ext.define('Ext.dd.Registry',{singleton:!0,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(el,autogen){var id;if(typeof el==="string"){return el}
id=el.id;if(!id&&autogen!==!1){id="extdd-"+(++this.autoIdSeed);el.id=id}
return id},register:function(el,data){var hs,i,len;data=data||{};if(typeof el==="string"){el=document.getElementById(el)}
data.ddel=el;this.elements[this.getId(el)]=data;if(data.isHandle!==!1){this.handles[data.ddel.id]=data}
if(data.handles){hs=data.handles;for(i=0,len=hs.length;i<len;i++){this.handles[this.getId(hs[i])]=data}}},unregister:function(el){var id=this.getId(el,!1),data=this.elements[id],hs,i,len;if(data){delete this.elements[id];if(data.handles){hs=data.handles;for(i=0,len=hs.length;i<len;i++){delete this.handles[this.getId(hs[i],!1)]}}}},getHandle:function(id){if(typeof id!=="string"){id=id.id}
return this.handles[id]},getHandleFromEvent:function(e){var t=e.getTarget();return t?this.handles[t.id]:null},getTarget:function(id){if(typeof id!=="string"){id=id.id}
return this.elements[id]},getTargetFromEvent:function(e){var t=e.getTarget();return t?this.elements[t.id]||this.handles[t.id]:null}})
;
Ext.define('Ext.dd.DropZone',{extend:'Ext.dd.DropTarget',requires:['Ext.dd.Registry'],getTargetFromEvent:function(e){return Ext.dd.Registry.getTargetFromEvent(e)},onNodeEnter:function(nodeData,source,e,data){},onNodeOver:function(nodeData,source,e,data){return this.dropAllowed},onNodeOut:function(nodeData,source,e,data){},onNodeDrop:function(nodeData,source,e,data){return!1},onContainerOver:function(source,e,data){return this.dropNotAllowed},onContainerDrop:function(source,e,data){return!1},notifyEnter:function(source,e,data){this.callParent([source,e,data]);return this.dropNotAllowed},notifyOver:function(source,e,data){var me=this,n=me.getTargetFromEvent(e);if(!n){if(me.lastOverNode){me.onNodeOut(me.lastOverNode,source,e,data);me.lastOverNode=null}
return me.onContainerOver(source,e,data)}
if(me.lastOverNode!==n){if(me.lastOverNode){me.onNodeOut(me.lastOverNode,source,e,data)}
me.onNodeEnter(n,source,e,data);me.lastOverNode=n}
return me.onNodeOver(n,source,e,data)},notifyOut:function(source,e,data){this.callParent([source,e,data]);if(this.lastOverNode){this.onNodeOut(this.lastOverNode,source,e,data);this.lastOverNode=null}},notifyDrop:function(source,e,data){var me=this,n=me.getTargetFromEvent(e),result=n?me.onNodeDrop(n,source,e,data):me.onContainerDrop(source,e,data);if(me.lastOverNode){me.onNodeOut(me.lastOverNode,source,e,data);me.lastOverNode=null}
return result},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}})
;
Ext.define('Ext.dom.Layer',{extend:'Ext.dom.Element',alternateClassName:'Ext.Layer',isLayer:!0,constructor:function(config,existingEl){config=config||{};var me=this,dh=Ext.DomHelper,cp=config.parentEl,pel=cp?Ext.getDom(cp):document.body,hm=config.hideMode,cls=Ext.baseCSSPrefix+(config.fixed?'fixed-layer':'layer'),dom,id,element,shadowConfig;if(existingEl){dom=Ext.getDom(existingEl);if(!dom.parentNode){pel.appendChild(dom)}}
if(!dom){dom=dh.append(pel,config.dh||{tag:'div',cls:cls})}
if(config.id){dom.id=config.id}
id=dom.id;if(id){element=Ext.cache[id];if(element){delete Ext.cache[id];element.dom=null}}
this.callParent([dom]);if(existingEl){me.addCls(cls)}
if(config.preventSync){me.preventSync=!0}
if(config.cls){me.addCls(config.cls)}
me.constrain=config.constrain!==!1;if(hm){me.setVisibilityMode(Ext.Element[hm.toUpperCase()])}else if(config.useDisplay){me.setVisibilityMode(Ext.Element.DISPLAY)}else{me.setVisibilityMode(Ext.Element.VISIBILITY)}
if(config.shadow){me.shadowOffset=config.shadowOffset||4;shadowConfig={offset:me.shadowOffset,fixed:config.fixed};if(config.shadow!==!0){shadowConfig.mode=config.shadow}
me.enableShadow(shadowConfig)}else{me.shadowOffset=0}
if(config.shim){me.enableShim({fixed:config.fixed})}
if(config.hidden===!0){me.hide()}else if(config.hidden===!1){me.show()}}})
;

;
Ext.define('Ext.event.publisher.MouseEnterLeave',{extend:'Ext.event.publisher.Dom',type:'mouseEnterLeave'},function(MouseEnterLeave){var eventMap={mouseover:'mouseenter',mouseout:'mouseleave'};if(!Ext.supports.MouseEnterLeave){MouseEnterLeave.override({handledDomEvents:['mouseover','mouseout'],handledEvents:['mouseenter','mouseleave'],publishDelegatedDomEvent:function(e){var target,relatedTarget,id,el,type,event;this.callParent([e]);target=e.getTarget();relatedTarget=e.getRelatedTarget();if(relatedTarget&&Ext.fly(target).contains(relatedTarget)){return}
id=target.id;if(id){el=Ext.cache[id];if(el){type=eventMap[e.type];e=e.chain({type:type});if(el.hasListeners[type]){event=el.events[type];if(event){event=event.directs;if(event){e.setCurrentTarget(el.dom);event.fire(e,e.target)}}}}}}})}
MouseEnterLeave.instance=new MouseEnterLeave()})
;
Ext.define('Ext.flash.Component',{extend:'Ext.Component',alternateClassName:'Ext.FlashComponent',alias:'widget.flash',flashVersion:'9.0.115',backgroundColor:'#ffffff',wmode:'opaque',swfWidth:'100%',swfHeight:'100%',expressInstall:!1,renderTpl:['<div id="{swfId}" role="application"></div>'],initComponent:function(){if(!('swfobject' in window)){Ext.raise('The SWFObject library is not loaded. Ext.flash.Component requires '+'SWFObject version 2.2 or later: http://code.google.com/p/swfobject/')}
if(!this.url){Ext.raise('The "url" config is required for Ext.flash.Component')}
this.callParent()},beforeRender:function(){this.callParent();Ext.applyIf(this.renderData,{swfId:this.getSwfId()})},afterRender:function(){var me=this,flashParams=Ext.apply({},me.flashParams),flashVars=Ext.apply({},me.flashVars);me.callParent();flashParams=Ext.apply({allowScriptAccess:'always',bgcolor:me.backgroundColor,wmode:me.wmode},flashParams);flashVars=Ext.apply({allowedDomain:document.location.hostname},flashVars);new swfobject.embedSWF(me.url,me.getSwfId(),me.swfWidth,me.swfHeight,me.flashVersion,me.expressInstall?me.statics.EXPRESS_INSTALL_URL:undefined,flashVars,flashParams,me.flashAttributes,me.swfCallback.bind(me))},swfCallback:function(e){var me=this;if(e.success){me.swf=Ext.get(e.ref);me.onSuccess();me.fireEvent('success',me)}else{me.onFailure();me.fireEvent('failure',me)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle('visibility','inherit')},onFailure:Ext.emptyFn,doDestroy:function(){var me=this,swf=me.swf;if(swf){swfobject.removeSWF(me.getSwfId());me.swf=Ext.destroy(swf)}
me.callParent()},statics:{EXPRESS_INSTALL_URL:'http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf'}})
;
Ext.define('Ext.form.action.Action',{alternateClassName:'Ext.form.Action',submitEmptyText:!0,constructor:function(config){var params;if(config){Ext.apply(this,config)}
params=config.params;if(Ext.isString(params)){this.params=Ext.Object.fromQueryString(params)}},run:Ext.emptyFn,onFailure:function(response){var form=this.form,formActive=form&&!form.destroying&&!form.destroyed;this.response=response;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;if(formActive){form.afterAction(this,!1)}},processResponse:function(response){this.response=response;if(!response.responseText&&!response.responseXML){return!0}
return(this.result=this.handleResponse(response))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||'POST').toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var me=this;return{success:me.onSuccess,failure:me.onFailure,scope:me,timeout:(me.timeout||me.form.timeout)*1000}},statics:{CLIENT_INVALID:'client',SERVER_INVALID:'server',CONNECT_FAILURE:'connect',LOAD_FAILURE:'load'}})
;
Ext.define('Ext.form.action.Load',{extend:'Ext.form.action.Action',requires:['Ext.data.Connection'],alternateClassName:'Ext.form.Action.Load',alias:'formaction.load',type:'load',run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(response){var result=this.processResponse(response),form=this.form,formActive=form&&!form.destroying&&!form.destroyed;if(result===!0||!result.success||!result.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;if(formActive){form.afterAction(this,!1)}
return}
if(formActive){form.clearInvalid();form.setValues(result.data);form.afterAction(this,!0)}},handleResponse:function(response){var reader=this.form.reader,rs,data;if(reader){rs=reader.read(response);data=rs.records&&rs.records[0]?rs.records[0].data:null;return{success:rs.success,data:data}}
return Ext.decode(response.responseText)}})
;
Ext.define('Ext.form.action.Submit',{extend:'Ext.form.action.Action',alternateClassName:'Ext.form.Action.Submit',alias:'formaction.submit',type:'submit',run:function(){var me=this,form=me.form;if(me.clientValidation===!1||form.isValid()){me.doSubmit()}else{me.failureType=Ext.form.action.Action.CLIENT_INVALID;form.afterAction(me,!1)}},doSubmit:function(){var me=this,ajaxOptions=Ext.apply(me.createCallback(),{url:me.getUrl(),method:me.getMethod(),headers:me.headers}),form=me.form,jsonSubmit=me.jsonSubmit||form.jsonSubmit,paramsProp=jsonSubmit?'jsonData':'params',formInfo;if(form.hasUpload()){formInfo=me.buildForm();ajaxOptions.form=formInfo.formEl;ajaxOptions.isUpload=!0}else{ajaxOptions[paramsProp]=me.getParams(jsonSubmit)}
Ext.Ajax.request(ajaxOptions);if(formInfo){me.cleanup(formInfo)}},cleanup:function(formInfo){var formEl=formInfo.formEl,uploadEls=formInfo.uploadEls,uploadFields=formInfo.uploadFields,len=uploadFields.length,i,field;for(i=0;i<len;++i){field=uploadFields[i];if(!field.clearOnSubmit){field.restoreInput(uploadEls[i])}}
if(formEl){Ext.removeNode(formEl)}},getParams:function(useModelValues){var falseVal=!1,configParams=this.callParent(),fieldParams;fieldParams=this.form.getValues(falseVal,falseVal,this.submitEmptyText!==falseVal,useModelValues,!0);return Ext.apply({},fieldParams,configParams)},buildForm:function(){var me=this,fieldsSpec=[],formSpec,formEl,basicForm=me.form,params=me.getParams(),uploadFields=[],uploadEls=[],fields=basicForm.getFields().items,i,len=fields.length,field,key,value,v,vLen,el;for(i=0;i<len;++i){field=fields[i];if(field.isFileUpload()){uploadFields.push(field)}}
for(key in params){if(params.hasOwnProperty(key)){value=params[key];if(Ext.isArray(value)){vLen=value.length;for(v=0;v<vLen;v++){fieldsSpec.push(me.getFieldConfig(key,value[v]))}}else{fieldsSpec.push(me.getFieldConfig(key,value))}}}
formSpec={tag:'form',role:'presentation',action:me.getUrl(),method:me.getMethod(),target:me.target?(Ext.isString(me.target)?me.target:Ext.fly(me.target).dom.name):'_self',style:'display:none',cn:fieldsSpec};if(!formSpec.target){Ext.raise('Invalid form target.')}
if(uploadFields.length){formSpec.encoding=formSpec.enctype='multipart/form-data'}
formEl=Ext.DomHelper.append(Ext.getBody(),formSpec);len=uploadFields.length;for(i=0;i<len;++i){el=uploadFields[i].extractFileInput();formEl.appendChild(el);uploadEls.push(el)}
return{formEl:formEl,uploadFields:uploadFields,uploadEls:uploadEls}},getFieldConfig:function(name,value){return{tag:'input',type:'hidden',name:name,value:Ext.String.htmlEncode(value)}},onSuccess:function(response){var form=this.form,formActive=form&&!form.destroying&&!form.destroyed,success=!0,result=this.processResponse(response);if(result!==!0&&!result.success){if(result.errors&&formActive){form.markInvalid(result.errors)}
this.failureType=Ext.form.action.Action.SERVER_INVALID;success=!1}
if(formActive){form.afterAction(this,success)}},handleResponse:function(response){var form=this.form,errorReader=form.errorReader,rs,errors,i,len,records,result;if(errorReader){rs=errorReader.read(response);records=rs.records;errors=[];if(records){for(i=0,len=records.length;i<len;i++){errors[i]=records[i].data}}
if(errors.length<1){errors=null}
result={success:rs.success,errors:errors}}else{try{result=Ext.decode(response.responseText)}catch(e){result={success:!1,errors:[]}}}
return result}})
;
Ext.define('Ext.form.action.StandardSubmit',{extend:'Ext.form.action.Submit',alias:'formaction.standardsubmit',doSubmit:function(){var formInfo=this.buildForm();formInfo.formEl.submit();this.cleanup(formInfo)}})
;
Ext.define('Ext.util.ComponentDragger',{extend:'Ext.dd.DragTracker',autoStart:500,constructor:function(comp,config){this.comp=comp;this.initialConstrainTo=config.constrainTo;this.callParent([config])},onStart:function(e){var me=this,comp=me.comp;me.dragTarget=me.el;me.startRegion=me.el.getRegion();me.startPosition=comp.getXY();if(comp.ghost&&!comp.liveDrag){me.proxy=comp.ghost()}
if(me.constrain||me.constrainDelegate){me.constrainTo=me.calculateConstrainRegion()}
if(comp.beginDrag){comp.beginDrag()}
Ext.dom.Element.maskIframes()},calculateConstrainRegion:function(){var me=this,comp=me.comp,constrainTo=me.initialConstrainTo||me.comp.el.dom.parentNode,constraintInsets=comp.constraintInsets,constrainEl,delegateRegion,elRegion,dragEl=me.proxy?me.proxy.el:comp.el,shadow=dragEl.shadow,shadowSize=(shadow&&!me.constrainDelegate&&comp.constrainShadow&&!shadow.disabled)?shadow.getShadowSize():0;if(!(constrainTo instanceof Ext.util.Region)){constrainEl=Ext.fly(constrainTo);constrainTo=constrainEl.getConstrainRegion()}else{constrainTo=constrainTo.copy()}
if(constraintInsets){constraintInsets=Ext.isObject(constraintInsets)?constraintInsets:Ext.Element.parseBox(constraintInsets);constrainTo.adjust(constraintInsets.top,constraintInsets.right,constraintInsets.bottom,constraintInsets.left)}
if(shadowSize){constrainTo.adjust(shadowSize[0],-shadowSize[1],-shadowSize[2],shadowSize[3])}
if(me.constrainDelegate){delegateRegion=Ext.fly(me.handle).getRegion();elRegion=dragEl.getRegion();constrainTo.adjust(elRegion.top-delegateRegion.top,elRegion.right-delegateRegion.right,elRegion.bottom-delegateRegion.bottom,elRegion.left-delegateRegion.left)}
return constrainTo},onDrag:function(e){var me=this,comp=(me.proxy&&!me.comp.liveDrag)?me.proxy:me.comp,offset=me.getOffset(me.constrain||me.constrainDelegate?'dragTarget':null);comp.setPagePosition(me.startPosition[0]+offset[0],me.startPosition[1]+offset[1])},onEnd:function(e){var comp=this.comp;if(comp.destroyed||comp.destroying){return}
if(this.proxy&&!comp.liveDrag){comp.unghost()}
if(comp.endDrag){comp.endDrag()}
Ext.dom.Element.unmaskIframes()}})
;
Ext.define('Ext.window.Window',{extend:'Ext.panel.Panel',alias:'widget.window',alternateClassName:'Ext.Window',requires:['Ext.util.ComponentDragger','Ext.util.Region'],baseCls:Ext.baseCSSPrefix+'window',resizable:!0,draggable:!0,constrain:!1,constrainHeader:!1,plain:!1,minimizable:!1,maximizable:!1,minHeight:50,minWidth:50,expandOnShow:!0,collapsible:!1,closable:!0,hidden:!0,autoRender:!0,hideMode:'offsets',floating:!0,alignOnScroll:!1,itemCls:Ext.baseCSSPrefix+'window-item',overlapHeader:!0,ignoreHeaderBorderManagement:!0,alwaysFramed:!0,isRootCfg:{isRoot:!0},isWindow:!0,ariaRole:'dialog',focusable:!0,tabGuard:!0,closeToolText:'Close dialog',keyMap:{scope:'this',ESC:'onEsc'},maskClickAction:'focus',disableCloseToolFocus:!0,initComponent:function(){var me=this;me.frame=!1;me.callParent();if(me.plain){me.addClsWithUI('plain')}
me.addStateEvents(['maximize','restore','resize','dragend'])},getElConfig:function(){var me=this,elConfig;elConfig=me.callParent();elConfig.tabIndex=-1;return elConfig},getFocusEl:function(){return this.getDefaultFocus()||this.el},getState:function(){var me=this,state=me.callParent()||{},maximized=!!me.maximized,ghostBox=me.ghostBox,pos;state.maximized=maximized;if(maximized){pos=me.restorePos}else if(ghostBox){pos=[ghostBox.x,ghostBox.y]}else{pos=me.getPosition(!0)}
Ext.apply(state,{size:maximized?me.restoreSize:me.getSize(),pos:pos});return state},applyState:function(state){var me=this;if(state){me.maximized=state.maximized;if(me.maximized){me.hasSavedRestore=!0;me.restoreSize=state.size;me.restorePos=state.pos}else{Ext.apply(me,{width:state.size.width,height:state.size.height,x:state.pos[0],y:state.pos[1]})}}},onRender:function(ct,position){var me=this;me.callParent(arguments);if(me.header){me.header.on({scope:me,click:me.onHeaderClick})}
if(me.maximizable){me.header.on({scope:me,dblclick:me.toggleMaximize})}},afterRender:function(){var me=this,header=me.header;if(me.maximized){me.maximized=!1;me.maximize(null,!0);if(header){header.removeCls(header.indicateDragCls)}}
me.callParent();me.initTabGuards()},onEsc:function(e){if(this.closable){e.stopEvent();this.close();return!1}},doDestroy:function(){var me=this;if(me.rendered){Ext.un('resize',me.onWindowResize,me);delete me.animateTarget;me.hide()}
me.callParent()},addTools:function(){var me=this,tools=[];me.callParent();if(me.minimizable){tools.push({type:'minimize',handler:'minimize',scope:me})}
if(me.maximizable){tools.push({type:'maximize',handler:'toggleMaximize',scope:me})}
if(tools.length){me.addTool(tools)}},addTool:function(tools){var me=this;me.callParent([tools]);if(me.rendered&&me.tabGuard){me.initTabGuards()}},add:function(){var me=this,ret;ret=me.callParent(arguments);if(me.rendered&&me.tabGuard){me.initTabGuards()}
return ret},remove:function(){var me=this,ret;ret=me.callParent(arguments);if(me.rendered&&me.tabGuard){me.initTabGuards()}
return ret},addDocked:function(){var me=this,ret;ret=me.callParent(arguments);if(me.rendered&&me.tabGuard){me.initTabGuards()}
return ret},removeDocked:function(){var me=this,ret;ret=me.callParent(arguments);if(me.rendered&&me.tabGuard){me.initTabGuards()}
return ret},onShow:function(){var me=this;me.callParent(arguments);if(me.expandOnShow){me.expand(!1)}
me.syncMonitorWindowResize();if(me.rendered&&me.tabGuard){me.initTabGuards()}},doClose:function(){var me=this;if(me.hidden){me.fireEvent('close',me);if(me.closeAction==='destroy'&&!me.destroying&&!me.destroyed){me.destroy()}}else{me.hide(me.animateTarget,me.doClose,me)}},afterHide:function(){var me=this;me.syncMonitorWindowResize();me.callParent(arguments);if(!me.destroyed&&me.rendered&&me.tabGuard){me.initTabGuards()}},onWindowResize:function(){var me=this,sizeModel;if(!me.destroyed){if(me.maximized){me.fitContainer()}else{sizeModel=me.getSizeModel();if(sizeModel.width.natural||sizeModel.height.natural){me.updateLayout()}
me.doConstrain()}}},minimize:function(){this.fireEvent('minimize',this);return this},resumeHeaderLayout:function(changed){this.header.resumeLayouts(changed?this.isRootCfg:null)},afterCollapse:function(){var me=this,header=me.header,tools=me.tools;if(header&&me.maximizable){header.suspendLayouts();tools.maximize.hide();this.resumeHeaderLayout(!0)}
if(me.resizer){me.resizer.disable()}
me.callParent(arguments)},afterExpand:function(){var me=this,header=me.header,tools=me.tools,changed;if(header){header.suspendLayouts();if(me.maximizable){tools.maximize.show();changed=!0}
this.resumeHeaderLayout(changed)}
if(me.resizer){me.resizer.enable()}
me.callParent(arguments)},maximize:function(animate,initial){var me=this,header=me.header,tools=me.tools,width=me.width,height=me.height,changed;if(!me.maximized&&!me.maximizing){me.maximizing=!0;me.expand(!1);if(!me.hasSavedRestore){me.restoreSize={width:width?width:null,height:height?height:null};if(initial){me.restorePos=[me.x||0,me.y||0]}else{me.restorePos=me.getPosition()}}
if(header){header.suspendLayouts();if(tools.maximize){tools.maximize.setType('restore')}
if(me.collapseTool){me.collapseTool.hide();changed=!0}
me.resumeHeaderLayout(changed)}
me.el.disableShadow();if(me.dd){me.dd.disable();if(header){header.removeCls(header.indicateDragCls)}}
if(me.resizer){me.resizer.disable()}
me.el.addCls(Ext.baseCSSPrefix+'window-maximized');me.container.addCls(Ext.baseCSSPrefix+'window-maximized-ct');me.syncMonitorWindowResize();me.fitContainer(animate=(animate||!!me.animateTarget)?{callback:function(){me.maximizing=!1;me.maximized=!0;if(!initial){me.fireEvent('maximize',me)}}}:null);if(!animate){me.maximizing=!1;me.maximized=!0;if(!initial){me.fireEvent('maximize',me)}}}
return me},restore:function(animate){var me=this,tools=me.tools,header=me.header,newBox=me.restoreSize,changed;if(me.maximized){me.hasSavedRestore=null;me.removeCls(Ext.baseCSSPrefix+'window-maximized');if(header){header.suspendLayouts();if(tools.maximize){tools.maximize.setType('maximize')}
if(me.collapseTool){me.collapseTool.show();changed=!0}
me.resumeHeaderLayout(changed)}
newBox.x=me.restorePos[0];newBox.y=me.restorePos[1];me.setBox(newBox,animate=(animate||!!me.animateTarget)?{callback:function(){me.el.enableShadow(null,!0);me.maximized=!1;me.fireEvent('restore',me)}}:null);me.restorePos=me.restoreSize=null;if(me.dd){me.dd.enable();if(header){header.addCls(header.indicateDragCls)}}
if(me.resizer){me.resizer.enable()}
me.container.removeCls(Ext.baseCSSPrefix+'window-maximized-ct');me.syncMonitorWindowResize();if(!animate){me.el.enableShadow(null,!0);me.maximized=!1;me.fireEvent('restore',me)}}
return me},syncMonitorWindowResize:function(){var me=this,currentlyMonitoring=me._monitoringResize,yes=me.monitorResize||me.constrain||me.constrainHeader||me.maximized,veto=me.hidden||me.destroying||me.destroyed;if(yes&&!veto){if(!currentlyMonitoring){Ext.on('resize',me.onWindowResize,me,{buffer:1});me._monitoringResize=!0}}else if(currentlyMonitoring){Ext.un('resize',me.onWindowResize,me);me._monitoringResize=!1}},toggleMaximize:function(){return this[this.maximized?'restore':'maximize']()},createGhost:function(){var ghost=this.callParent(arguments);ghost.xtype='window';ghost.focusOnToFront=!1;return ghost},getDefaultFocus:function(){var me=this,result,defaultComp=me.defaultFocus,selector;if(defaultComp!==undefined){if(Ext.isNumber(defaultComp)){result=me.query('button')[defaultComp]}else if(Ext.isString(defaultComp)){selector=defaultComp;if(Ext.validIdRe.test(selector)){result=me.down(Ext.makeIdSelector(selector))}
if(!result){result=me.down(selector)}}else if(defaultComp.focus){result=defaultComp}}
return result},privates:{initDraggable:function(){this.initSimpleDraggable()},onHeaderClick:function(header,e){var delegate;if(header.el.contains(e.getTarget())){delegate=this.getDefaultFocus();if(delegate){delegate.focus()}}},initResizable:function(resizable){var me=this;me.callParent([resizable]);if(me.maximized||me.maximizing){me.resizer.disable()}},initSimpleDraggable:function(){var me=this,dd;me.callParent();dd=me.dd;if(dd&&me.maximized||me.maximizing){dd.disable()}},onTabGuardFocusEnter:function(e,target){var me=this,el=me.el,beforeGuard=me.tabGuardBeforeEl,afterGuard=me.tabGuardAfterEl,from=e.relatedTarget,nodes,forward,nextFocus;nodes=el.findTabbableElements({skipSelf:!0});if(nodes[0]===beforeGuard.dom){nodes.shift()}
if(nodes[nodes.length-1]===afterGuard.dom){nodes.pop()}
if(nodes.length===0){nextFocus=el}else if(from===el.dom){forward=target===beforeGuard.dom}else if(el.contains(from)){forward=!!e.forwardTab}else{forward=target===beforeGuard.dom}
nextFocus=nextFocus||(forward?nodes[0]:nodes[nodes.length-1]);if(nextFocus){Ext.fly(nextFocus).focus(nodes.length===1?1:0)}}}})
;
Ext.define("Ext.form.Labelable",{extend:'Ext.Mixin',requires:['Ext.XTemplate','Ext.overrides.dom.Element'],isLabelable:!0,mixinConfig:{id:'labelable',on:{beforeRender:'beforeLabelRender',onRender:'onLabelRender'}},config:{childEls:['labelEl','bodyEl','errorEl','errorWrapEl','ariaErrorEl','ariaStatusEl','ariaHelpEl','labelTextEl']},labelableRenderTpl:['{beforeLabelTpl}','<label id="{id}-labelEl" data-ref="labelEl" class="{labelCls} {labelCls}-{ui} {labelClsExtra} ','{childElCls} {unselectableCls}" style="{labelStyle}"','<tpl if="inputId && !skipLabelForAttribute"> for="{inputId}"</tpl>',' {labelAttrTpl}>','<span class="{labelInnerCls} {labelInnerCls}-{ui}" style="{labelInnerStyle}">','{beforeLabelTextTpl}','<span id="{id}-labelTextEl" data-ref="labelTextEl" class="{labelTextCls}">','<tpl if="fieldLabel">{fieldLabel}','<tpl if="labelSeparator">{labelSeparator}</tpl>','</tpl>','</span>','{afterLabelTextTpl}','</span>','</label>','{afterLabelTpl}','<div id="{id}-bodyEl" data-ref="bodyEl" role="presentation"',' class="{baseBodyCls} {baseBodyCls}-{ui}<tpl if="fieldBodyCls">',' {fieldBodyCls} {fieldBodyCls}-{ui}</tpl> {growCls} {extraFieldBodyCls}"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>','{beforeBodyEl}','{beforeSubTpl}','{[values.$comp.getSubTplMarkup(values)]}','{afterSubTpl}','{afterBodyEl}','<tpl if="renderAriaElements">','<tpl if="ariaHelp">','<span id="{id}-ariaHelpEl" data-ref="ariaHelpEl"',' class="'+Ext.baseCSSPrefix+'hidden-offsets">','{ariaHelp}','</span>','</tpl>','<span id="{id}-ariaStatusEl" data-ref="ariaStatusEl" aria-hidden="true"',' class="'+Ext.baseCSSPrefix+'hidden-offsets">','{ariaStatus}','</span>','<span id="{id}-ariaErrorEl" data-ref="ariaErrorEl" aria-hidden="true" aria-live="assertive"',' class="'+Ext.baseCSSPrefix+'hidden-clip">','</span>','</tpl>','</div>','<tpl if="renderError">','<div id="{id}-errorWrapEl" data-ref="errorWrapEl" class="{errorWrapCls} {errorWrapCls}-{ui}',' {errorWrapExtraCls}" style="{errorWrapStyle}">','<div role="presentation" id="{id}-errorEl" data-ref="errorEl" ','class="{errorMsgCls} {invalidMsgCls} {invalidMsgCls}-{ui}" ','data-anchorTarget="{tipAnchorTarget}">','</div>','</div>','</tpl>',{disableFormats:!0}],activeErrorsTpl:undefined,htmlActiveErrorsTpl:['<tpl if="errors && errors.length">','<ul class="{listCls}">','<tpl for="errors"><li>{.}</li></tpl>','</ul>','</tpl>'],plaintextActiveErrorsTpl:['<tpl if="errors && errors.length">','<tpl for="errors"><tpl if="xindex &gt; 1">\n</tpl>{.}</tpl>','</tpl>'],ariaActiveErrorsTpl:['<tpl if="errors && errors.length">','<tpl for="errors" between=". ">{.}</tpl>','</tpl>'],isFieldLabelable:!0,formItemCls:Ext.baseCSSPrefix+'form-item',labelCls:Ext.baseCSSPrefix+'form-item-label',topLabelCls:Ext.baseCSSPrefix+'form-item-label-top',rightLabelCls:Ext.baseCSSPrefix+'form-item-label-right',labelInnerCls:Ext.baseCSSPrefix+'form-item-label-inner',labelTextCls:Ext.baseCSSPrefix+'form-item-label-text',topLabelSideErrorCls:Ext.baseCSSPrefix+'form-item-label-top-side-error',errorMsgCls:Ext.baseCSSPrefix+'form-error-msg',errorWrapCls:Ext.baseCSSPrefix+'form-error-wrap',errorWrapSideCls:Ext.baseCSSPrefix+'form-error-wrap-side',errorWrapUnderCls:Ext.baseCSSPrefix+'form-error-wrap-under',errorWrapUnderSideLabelCls:Ext.baseCSSPrefix+'form-error-wrap-under-side-label',baseBodyCls:Ext.baseCSSPrefix+'form-item-body',invalidIconCls:Ext.baseCSSPrefix+'form-invalid-icon',invalidUnderCls:Ext.baseCSSPrefix+'form-invalid-under',noLabelCls:Ext.baseCSSPrefix+'form-item-no-label',fieldBodyCls:'',extraFieldBodyCls:'',invalidCls:Ext.baseCSSPrefix+'form-invalid',fieldLabel:undefined,labelAlign:'left',labelWidth:100,labelPad:5,labelSeparator:':',hideLabel:!1,hideEmptyLabel:!0,preventMark:!1,autoFitErrors:!0,msgTarget:'qtip',msgTargets:{qtip:1,title:1,under:1,side:1,none:1},noWrap:!0,ariaHelp:undefined,ariaErrorText:'Input error. {0}.',labelableInsertions:['beforeBodyEl','afterBodyEl','beforeLabelTpl','afterLabelTpl','beforeSubTpl','afterSubTpl','beforeLabelTextTpl','afterLabelTextTpl','labelAttrTpl'],statics:{initTip:function(){var tip=this.tip,cfg,copy;if(tip){return}
cfg={id:'ext-form-error-tip',sticky:!0,ui:'form-invalid'};if(Ext.supports.Touch){cfg.dismissDelay=0;cfg.anchor='top';cfg.showDelay=0;cfg.showOnTap=!0;cfg.listeners={beforeshow:function(){this.minWidth=Ext.fly(this.activeTarget.el).getWidth()}}}
tip=this.tip=Ext.create('Ext.tip.QuickTip',cfg);copy=Ext.apply({},tip.tagConfig);copy.attribute='errorqtip';tip.setTagConfig(copy)},destroyTip:function(){this.tip=Ext.destroy(this.tip)}},initLabelable:function(){var me=this,padding=me.padding;if(padding){me.padding=undefined;me.extraMargins=Ext.Element.parseBox(padding)}
if(Ext.isIE8){me.restoreDisplay=Ext.Function.createDelayed(me.doRestoreDisplay,0,me)}
if(!me.activeErrorsTpl){if(me.msgTarget==='title'){me.activeErrorsTpl=me.plaintextActiveErrorsTpl}else{me.activeErrorsTpl=me.htmlActiveErrorsTpl}}
me.addCls([me.formItemCls,me.formItemCls+'-'+me.ui]);me.lastActiveError='';me.enableBubble('errorchange')},trimLabelSeparator:function(){var me=this,separator=me.labelSeparator,label=me.fieldLabel||'',lastChar=label.substr(label.length-1);return lastChar===separator?label.slice(0,-1):label},getFieldLabel:function(){return this.trimLabelSeparator()},setFieldLabel:function(label){var me=this,separator=me.labelSeparator,errorWrapEl=me.errorWrapEl,sideLabel=(me.labelAlign!=='top'),noLabelCls=me.noLabelCls,errorWrapUnderSideLabelCls=me.errorWrapUnderSideLabelCls;label=label||'';me.fieldLabel=label;if(me.rendered){if(Ext.isEmpty(label)&&me.hideEmptyLabel){me.addCls(noLabelCls);if(sideLabel&&errorWrapEl){errorWrapEl.removeCls(errorWrapUnderSideLabelCls)}}else{if(separator){label=me.trimLabelSeparator()+separator}
me.labelTextEl.dom.innerHTML=label;me.removeCls(noLabelCls);if(sideLabel&&errorWrapEl){errorWrapEl.addCls(errorWrapUnderSideLabelCls)}}
me.updateLayout()}},setHideLabel:function(hideLabel){var me=this;if(hideLabel!==me.hideLabel){me.hideLabel=hideLabel;if(me.rendered){me[hideLabel?'addCls':'removeCls'](me.noLabelCls);me.updateLayout()}}},setHideEmptyLabel:function(hideEmptyLabel){var me=this,hide;if(hideEmptyLabel!==me.hideEmptyLabel){me.hideEmptyLabel=hideEmptyLabel;if(me.rendered&&!me.hideLabel){hide=hideEmptyLabel&&!me.getFieldLabel();me[hide?'addCls':'removeCls'](me.noLabelCls);me.updateLayout()}}},getInsertionRenderData:function(data,names){var i=names.length,name,value;while(i--){name=names[i];value=this[name];if(value){if(typeof value!=='string'){if(!value.isTemplate){value=Ext.XTemplate.getTpl(this,name)}
value=value.apply(data)}}
data[name]=value||''}
return data},getLabelableRenderData:function(){var me=this,labelAlign=me.labelAlign,topLabel=(labelAlign==='top'),rightLabel=(labelAlign==='right'),sideError=(me.msgTarget==='side'),underError=(me.msgTarget==='under'),errorMsgCls=me.errorMsgCls,labelPad=me.labelPad,labelWidth=me.labelWidth,labelClsExtra=me.labelClsExtra||'',errorWrapExtraCls=sideError?me.errorWrapSideCls:me.errorWrapUnderCls,labelStyle='',labelInnerStyle='',labelVisible=me.hasVisibleLabel(),autoFitErrors=me.autoFitErrors,defaultBodyWidth=me.defaultBodyWidth,bodyStyle,data;if(topLabel){labelClsExtra+=' '+me.topLabelCls;if(labelPad){labelInnerStyle='padding-bottom:'+labelPad+'px;'}
if(sideError&&!autoFitErrors){labelClsExtra+=' '+me.topLabelSideErrorCls}}else{if(rightLabel){labelClsExtra+=' '+me.rightLabelCls}
if(labelPad){labelStyle+=me.getHorizontalPaddingStyle()+labelPad+'px;'}
labelStyle+='width:'+(labelWidth+(labelPad?labelPad:0))+'px;';labelInnerStyle='width:'+labelWidth+'px'}
if(labelVisible){if(!topLabel&&underError){errorWrapExtraCls+=' '+me.errorWrapUnderSideLabelCls}}
if(defaultBodyWidth){bodyStyle='min-width:'+defaultBodyWidth+'px;max-width:'+defaultBodyWidth+'px;'}
data={id:me.id,inputId:me.getInputId(),labelCls:me.labelCls,labelClsExtra:labelClsExtra,labelStyle:labelStyle+(me.labelStyle||''),labelInnerStyle:labelInnerStyle,labelInnerCls:me.labelInnerCls,labelTextCls:me.labelTextCls,skipLabelForAttribute:!!me.skipLabelForAttribute,unselectableCls:Ext.Element.unselectableCls,bodyStyle:bodyStyle,baseBodyCls:me.baseBodyCls,fieldBodyCls:me.fieldBodyCls,extraFieldBodyCls:me.extraFieldBodyCls,errorWrapCls:me.errorWrapCls,errorWrapExtraCls:errorWrapExtraCls,renderError:sideError||underError,invalidMsgCls:sideError?me.invalidIconCls:underError?me.invalidUnderCls:'',errorMsgCls:errorMsgCls,growCls:me.grow?me.growCls:'',tipAnchorTarget:me.id+'-inputEl',errorWrapStyle:(sideError&&!autoFitErrors)?'visibility:hidden':'display:none',fieldLabel:me.getFieldLabel(),labelSeparator:me.labelSeparator,renderAriaElements:!!me.renderAriaElements,ariaStatus:''};if(me.ariaHelp){data.ariaHelp=Ext.String.htmlEncode(me.ariaHelp)}
me.getInsertionRenderData(data,me.labelableInsertions);return data},getHorizontalPaddingStyle:function(){return'padding-right:'},beforeLabelRender:function(){var me=this;me.setFieldDefaults(me.getInherited().fieldDefaults);if(me.ownerLayout){me.addCls(Ext.baseCSSPrefix+me.ownerLayout.type+'-form-item')}
if(!me.hasVisibleLabel()){me.addCls(me.noLabelCls)}},onLabelRender:function(){var me=this,style={},ExtElement=Ext.Element,errorWrapEl=me.errorWrapEl,margins,side;if(errorWrapEl){errorWrapEl.setVisibilityMode((me.msgTarget==='side'&&!me.autoFitErrors)?ExtElement.VISIBILITY:ExtElement.DISPLAY)}
if(me.extraMargins){margins=me.el.getMargin();for(side in margins){if(margins.hasOwnProperty(side)){style['margin-'+side]=(margins[side]+me.extraMargins[side])+'px'}}
me.el.setStyle(style)}},hasVisibleLabel:function(){if(this.hideLabel){return!1}
return!(this.hideEmptyLabel&&!this.getFieldLabel())},getSubTplMarkup:function(){return''},getInputId:function(){return''},getActiveError:function(){return this.activeError||''},hasActiveError:function(){return!!this.getActiveError()},setActiveError:function(msg){this.setActiveErrors(msg)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(errors){var me=this,errorWrapEl=me.errorWrapEl,msgTarget=me.msgTarget,isSide=msgTarget==='side',isQtip=msgTarget==='qtip',ariaErrorEl=me.ariaErrorEl,actionEl,activeError,tpl,targetEl,ariaTpl,errStr,errText;errors=Ext.Array.from(errors);tpl=me.lookupTpl('activeErrorsTpl');me.activeErrors=errors;activeError=me.activeError=tpl.apply({fieldLabel:me.fieldLabel,errors:errors,listCls:Ext.baseCSSPrefix+'list-plain'});me.renderActiveError();if(me.rendered){actionEl=me.getActionEl();if(isSide){me.errorEl.dom.setAttribute('data-errorqtip',activeError)}else if(isQtip){actionEl.dom.setAttribute('data-errorqtip',activeError)}else if(msgTarget==='title'){actionEl.dom.setAttribute('title',activeError)}
if(msgTarget!=='title'&&ariaErrorEl){ariaTpl=me.lookupTpl('ariaActiveErrorsTpl');errStr=ariaTpl.apply({errors:errors});errText=Ext.String.formatEncode(me.ariaErrorText,errStr,me.fieldLabel);if(ariaErrorEl.dom.innerHTML!==errText){ariaErrorEl.dom.innerHTML=errText}
me.ariaStatusEl.dom.innerHTML=Ext.String.htmlEncode(errStr)}
if(isSide||isQtip){Ext.form.Labelable.initTip()}
if(!me.msgTargets[msgTarget]){targetEl=Ext.get(msgTarget);if(targetEl){targetEl.dom.innerHTML=activeError}}}
if(errorWrapEl){errorWrapEl.setVisible(errors.length>0);if(isSide&&me.autoFitErrors){me.labelEl.addCls(me.topLabelSideErrorCls)}
me.updateLayout()}},unsetActiveError:function(){var me=this,errorWrapEl=me.errorWrapEl,ariaErrorEl=me.ariaErrorEl,msgTarget=me.msgTarget,restoreDisplay=me.restoreDisplay,actionEl,targetEl;if(me.hasActiveError()){delete me.activeError;delete me.activeErrors;me.renderActiveError();if(me.rendered){actionEl=me.getActionEl();if(msgTarget==='qtip'){actionEl.dom.removeAttribute('data-errorqtip')}else if(msgTarget==='title'){actionEl.dom.removeAttribute('title')}
if(msgTarget!=='title'&&ariaErrorEl){ariaErrorEl.dom.innerHTML=me.ariaStatusEl.dom.innerHTML=''}
if(!me.msgTargets[msgTarget]){targetEl=Ext.get(msgTarget);if(targetEl){targetEl.dom.innerHTML=''}}
if(errorWrapEl){errorWrapEl.hide();if(msgTarget==='side'&&me.autoFitErrors){me.labelEl.removeCls(me.topLabelSideErrorCls)}
me.updateLayout();if(restoreDisplay){me.el.dom.style.display='block';me.restoreDisplay()}}}}},doRestoreDisplay:function(){var el=this.el;if(el&&el.dom){el.dom.style.display=''}},renderActiveError:function(){var me=this,activeError=me.getActiveError(),hasError=!!activeError;if(activeError!==me.lastActiveError){me.lastActiveError=activeError;me.fireEvent('errorchange',me,activeError)}
if(me.rendered&&!me.destroyed&&!me.preventMark){me.toggleInvalidCls(hasError);if(me.errorEl){me.errorEl.dom.innerHTML=activeError}}},toggleInvalidCls:function(hasError){this.el[hasError?'addCls':'removeCls'](this.invalidCls)},setFieldDefaults:function(defaults){var key;for(key in defaults){if(!this.hasOwnProperty(key)){this[key]=defaults[key]}}}},function(){if(Ext.supports.Touch){this.prototype.msgTarget='side'}})
;
Ext.define('Ext.rtl.form.Labelable',{override:'Ext.form.Labelable',getHorizontalPaddingStyle:function(){return this.getInherited().rtl?'padding-left:':'padding-right:'}})
;
Ext.define('Ext.form.field.Field',{mixinId:'field',isFormField:!0,config:{validation:null,validationField:null},disabled:!1,submitValue:!0,validateOnChange:!0,valuePublishEvent:'change',suspendCheckChange:0,dirty:!1,initField:function(){var me=this,valuePublishEvent=me.valuePublishEvent,len,i;me.initValue();var badNames=['tagName','nodeName','children','childNodes'],name=this.name;if(name&&Ext.Array.indexOf(badNames,name)>-1){Ext.log.warn('It is recommended to not use "'+name+'" as a field name, because it '+'can cause naming collisions during form submission.')}
if(Ext.isString(valuePublishEvent)){me.on(valuePublishEvent,me.publishValue,me)}else{for(i=0,len=valuePublishEvent.length;i<len;++i){me.on(valuePublishEvent[i],me.publishValue,me)}}},initValue:function(){var me=this;if('value' in me){me.suspendCheckChange++;me.setValue(me.value);me.suspendCheckChange--}
me.initialValue=me.originalValue=me.lastValue=me.getValue()},cleanupField:function(){delete this._ownerRecord},getFieldIdentifier:function(){return this.isEditorComponent?this.dataIndex:this.name},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(value){var me=this;me.value=value;me.checkChange();return me},isEqual:function(value1,value2){return String(value1)===String(value2)},isEqualAsString:function(value1,value2){return String(Ext.valueFrom(value1,''))===String(Ext.valueFrom(value2,''))},getSubmitData:function(){var me=this,data=null;if(!me.disabled&&me.submitValue){data={};data[me.getName()]=''+me.getValue()}
return data},getModelData:function(includeEmptyText,isSubmitting){var me=this,data=null;if(!me.disabled&&(me.submitValue||!isSubmitting)){data={};data[me.getFieldIdentifier()]=me.getValue()}
return data},reset:function(){var me=this;me.beforeReset();me.setValue(me.originalValue);me.clearInvalid();delete me.wasValid},beforeReset:Ext.emptyFn,resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){var me=this,newVal,oldVal;if(!me.suspendCheckChange&&!me.destroying&&!me.destroyed){newVal=me.getValue();oldVal=me.lastValue;if(me.didValueChange(newVal,oldVal)){me.lastValue=newVal;me.fireEvent('change',me,newVal,oldVal);me.onChange(newVal,oldVal)}}},didValueChange:function(newVal,oldVal){return!this.isEqual(newVal,oldVal)},onChange:function(newVal){var me=this;if(me.validateOnChange){me.validate()}
me.checkDirty()},publishValue:function(){var me=this;if(me.rendered&&!me.getErrors().length){me.publishState('value',me.getValue())}},isDirty:function(){var me=this;return!me.disabled&&!me.isEqual(me.getValue(),me.originalValue)},checkDirty:function(){var me=this,isDirty=me.isDirty();if(isDirty!==me.wasDirty){me.dirty=isDirty;me.fireEvent('dirtychange',me,isDirty);me.onDirtyChange(isDirty);me.wasDirty=isDirty}},onDirtyChange:Ext.emptyFn,getErrors:function(value){var errors=[],validationField=this.getValidationField(),validation=this.getValidation(),result;if(validationField){result=validationField.validate(value,null,null,this._ownerRecord);if(result!==!0){errors.push(result)}}
if(validation&&validation!==!0){errors.push(validation)}
return errors},isValid:function(){var me=this;return me.disabled||Ext.isEmpty(me.getErrors())},validate:function(){return this.checkValidityChange(this.isValid())},checkValidityChange:function(isValid){var me=this;if(isValid!==me.wasValid){me.wasValid=isValid;me.fireEvent('validitychange',me,isValid)}
return isValid},setValidationField:function(value,record){this.callParent([value]);this._ownerRecord=record},batchChanges:function(fn){try{this.suspendCheckChange++;fn()}finally{this.suspendCheckChange--}
this.checkChange()},isFileUpload:function(){return!1},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,updateValidation:function(validation,oldValidation){if(oldValidation){this.validate()}},privates:{resetToInitialValue:function(){var me=this,originalValue=me.originalValue;me.originalValue=me.initialValue;me.reset();me.originalValue=originalValue}}})
;
Ext.define('Ext.form.field.Base',{extend:'Ext.Component',alternateClassName:['Ext.form.Field','Ext.form.BaseField'],xtype:'field',requires:['Ext.util.DelayedTask','Ext.XTemplate'],mixins:['Ext.form.Labelable','Ext.form.field.Field'],focusable:!0,shrinkWrap:!0,fieldSubTpl:['<input id="{id}" data-ref="inputEl" type="{type}" {inputAttrTpl}',' size="1"','<tpl if="name"> name="{name}"</tpl>','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','{%if (values.maxLength !== undefined){%} maxlength="{maxLength}"{%}%}','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx != null"> tabindex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>','<tpl if="ariaEl == \'inputEl\'">','<tpl foreach="ariaElAttributes"> {$}="{.}"</tpl>','</tpl>','<tpl foreach="inputElAriaAttributes"> {$}="{.}"</tpl>',' class="{fieldCls} {typeCls} {typeCls}-{ui} {editableCls} {inputCls} {fixCls}" autocomplete="off"/>',{disableFormats:!0}],defaultBindProperty:'value',autoEl:{role:'presentation'},subTplInsertions:['inputAttrTpl'],childEls:['inputEl'],inputType:'text',isTextInput:!0,invalidText:'The value in this field is invalid',fieldCls:Ext.baseCSSPrefix+'form-field',focusCls:'form-focus',dirtyCls:Ext.baseCSSPrefix+'form-dirty',checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<=9)?['change','propertychange','keyup']:['change','input','textInput','keyup','dragdrop'],ignoreChangeRe:/data-errorqtip|style\.|className/,checkChangeBuffer:50,liquidLayout:!0,readOnly:!1,readOnlyCls:Ext.baseCSSPrefix+'form-readonly',validateOnBlur:!0,validateOnFocusLeave:!1,hasFocus:!1,baseCls:Ext.baseCSSPrefix+'field',fieldBodyCls:Ext.baseCSSPrefix+'field-body',webkitBorderBoxBugCls:Ext.baseCSSPrefix+'webkit-border-box-bug',maskOnDisable:!1,stretchInputElFixed:!0,ariaEl:'inputEl',focusEl:'inputEl',renderAriaElements:!0,initComponent:function(){var me=this;me.callParent();me.subTplData=me.subTplData||{};me.initLabelable();me.initField();me.initDefaultName();if(me.validateOnFocusLeave){me.validateOnBlur=!1}
if(me.readOnly){me.addCls(me.readOnlyCls)}
me.addCls(Ext.baseCSSPrefix+'form-type-'+me.inputType);if(me.format&&me.formatText&&!me.ariaHelp){me.ariaHelp=Ext.String.format(me.formatText,me.format)}},initDefaultName:function(){var me=this;if(!me.name){me.name=me.getInputId()}},getInputId:function(){return this.inputId||(this.inputId=this.id+'-inputEl')},getSubTplData:function(fieldData){var me=this,id=me.id,type=me.inputType,inputId=me.getInputId(),inputCls=me.inputCls||'',fixCls='',data,ariaAttr,inputElAttr;if(Ext.supports.WebKitInputTableBoxModelBug){fixCls+=me.webkitBorderBoxBugCls}
data=Ext.apply({ui:me.ui,id:inputId,cmpId:id,name:me.name||inputId,disabled:me.disabled,readOnly:me.readOnly,value:me.getRawValue(),type:type,fieldCls:me.fieldCls,fieldStyle:me.getFieldStyle(),childElCls:fieldData.childElCls,tabIdx:me.tabIndex,inputCls:inputCls,typeCls:Ext.baseCSSPrefix+'form-'+(me.isTextInput?'text':type),fixCls:fixCls,ariaEl:me.ariaEl},me.subTplData);if(me.ariaRole){ariaAttr={};if(!me.ariaStaticRoles[me.ariaRole]){ariaAttr['aria-hidden']=!!me.hidden;ariaAttr['aria-disabled']=!!me.disabled;inputElAttr={'aria-invalid':!1,'aria-readonly':!!me.readOnly};if(me.ariaLabel){ariaAttr['aria-label']=Ext.String.htmlEncode(me.ariaLabel)}
ariaAttr=Ext.apply(ariaAttr,me.getAriaAttributes());if(!ariaAttr['aria-describedby']){if(me.ariaHelp){inputElAttr['aria-describedby']=id+'-ariaStatusEl '+id+'-ariaHelpEl'}else{inputElAttr['aria-describedby']=id+'-ariaStatusEl'}}
data.inputElAriaAttributes=inputElAttr}
if(me.ariaRole!=='native'){ariaAttr.role=me.ariaRole}
if(me.ariaLabel){ariaAttr['aria-label']=me.ariaLabel}
if(me.format&&me.formatText&&!data.title){ariaAttr.title=Ext.String.formatEncode(me.formatText,me.format)}
data.ariaElAttributes=ariaAttr}
me.getInsertionRenderData(data,me.subTplInsertions);return data},getSubTplMarkup:function(fieldData){var me=this,data=me.getSubTplData(fieldData),preSubTpl=me.lookupTpl('preSubTpl'),postSubTpl=me.lookupTpl('postSubTpl'),markup='';if(preSubTpl){markup+=preSubTpl.apply(data)}
markup+=me.lookupTpl('fieldSubTpl').apply(data);if(postSubTpl){markup+=postSubTpl.apply(data)}
return markup},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(style){var me=this,inputEl=me.inputEl;if(inputEl){inputEl.applyStyles(style)}
me.fieldStyle=style},getFieldStyle:function(){var style=this.fieldStyle;return Ext.isObject(style)?Ext.DomHelper.generateStyles(style,null,!0):style||''},onRender:function(){this.callParent(arguments);this.mixins.labelable.self.initTip();this.renderActiveError()},beforeBlur:function(e){if(this.validateOnBlur){this.validate()}},onFocusLeave:function(e){if(this.validateOnFocusLeave){this.validate()}
this.callParent([e]);this.completeEdit()},completeEdit:Ext.emptyFn,isFileUpload:function(){return this.inputType==='file'},getSubmitData:function(){var me=this,data=null,val;if(!me.disabled&&me.submitValue){val=me.getSubmitValue();if(val!==null){data={};data[me.getName()]=val}}
return data},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var me=this,v=(me.inputEl?me.inputEl.getValue():Ext.valueFrom(me.rawValue,''));me.rawValue=v;return v},setRawValue:function(value){var me=this,rawValue=me.rawValue;if(!me.transformRawValue.$nullFn){value=me.transformRawValue(value)}
value=Ext.valueFrom(value,'');if(rawValue===undefined||rawValue!==value){me.rawValue=value;if(me.inputEl){me.bindChangeEvents(!1);me.inputEl.dom.value=value;me.bindChangeEvents(!0)}}
if(me.rendered&&me.reference){me.publishState('rawValue',value)}
return value},transformRawValue:Ext.identityFn,valueToRaw:function(value){return''+Ext.valueFrom(value,'')},rawToValue:Ext.identityFn,processRawValue:Ext.identityFn,getValue:function(){var me=this,val=me.rawToValue(me.processRawValue(me.getRawValue()));me.value=val;return val},setValue:function(value){var me=this;me.setRawValue(me.valueToRaw(value));return me.mixins.field.setValue.call(me,value)},onBoxReady:function(){var me=this;me.callParent(arguments);if(me.setReadOnlyOnBoxReady){me.setReadOnly(me.readOnly)}},onDisable:function(){var me=this,inputEl=me.inputEl;me.callParent();if(inputEl){inputEl.dom.disabled=!0;if(me.hasActiveError()){me.clearInvalid();me.hadErrorOnDisable=!0}}
if(me.wasValid===!1){me.checkValidityChange(!0)}},onEnable:function(){var me=this,inputEl=me.inputEl,mark=me.preventMark,valid;me.callParent();if(inputEl){inputEl.dom.disabled=!1}
if(me.wasValid!==undefined){me.forceValidation=!0;me.preventMark=!me.hadErrorOnDisable;valid=me.isValid();me.forceValidation=!1;me.preventMark=mark;me.checkValidityChange(valid)}
delete me.hadErrorOnDisable},setReadOnly:function(readOnly){var me=this,inputEl=me.inputEl,old=me.readOnly;readOnly=!!readOnly;me[readOnly?'addCls':'removeCls'](me.readOnlyCls);me.readOnly=readOnly;if(inputEl){inputEl.dom.readOnly=readOnly;inputEl.dom.setAttribute('aria-readonly',readOnly)}else if(me.rendering){me.setReadOnlyOnBoxReady=!0}
if(readOnly!==old){me.fireEvent('writeablechange',me,readOnly)}},fireKey:function(e,eOpts){if(e.isSpecialKey()){this.fireEvent('specialkey',this,e,eOpts)}},initEvents:function(){var me=this,inputEl=me.inputEl,onFieldMutation=me.onFieldMutation,events=me.checkChangeEvents,len=events.length,i,event;if(inputEl){me.mon(inputEl,Ext.supports.SpecialKeyDownRepeat?'keydown':'keypress',me.fireKey,me);for(i=0;i<len;++i){event=events[i];if(event==='propertychange'){me.usesPropertychange=!0}
if(event==='textInput'){me.usesTextInput=!0}
me.mon(inputEl,event,onFieldMutation,me)}}
me.callParent()},onFieldMutation:function(e){if(!this.readOnly&&!(e.type==='propertychange'&&this.ignoreChangeRe.test(e.browserEvent.propertyName))){this.startCheckChangeTask()}},startCheckChangeTask:function(){var me=this,task=me.checkChangeTask;if(!task){me.checkChangeTask=task=new Ext.util.DelayedTask(me.doCheckChangeTask,me)}
if(!me.bindNotifyListener){me.bindNotifyListener=Ext.on('beforebindnotify',me.onBeforeNotify,me,{destroyable:!0})}
task.delay(me.checkChangeBuffer)},doCheckChangeTask:function(){var bindNotifyListener=this.bindNotifyListener;if(bindNotifyListener){bindNotifyListener.destroy();this.bindNotifyListener=null}
this.checkChange()},publishValue:function(){var me=this;if(me.rendered&&!me.getErrors().length){me.publishState('value',me.getValue())}},onDirtyChange:function(isDirty){var me=this;me[isDirty?'addCls':'removeCls'](me.dirtyCls);if(me.rendered&&me.reference){me.publishState('dirty',isDirty)}},isValid:function(){var me=this,disabled=me.disabled,validate=me.forceValidation||!disabled;return validate?me.validateValue(me.processRawValue(me.getRawValue())):disabled},validateValue:function(value){var me=this,errors=me.getErrors(value),isValid=Ext.isEmpty(errors);if(!me.preventMark){if(isValid){me.clearInvalid()}else{me.markInvalid(errors)}}
return isValid},markInvalid:function(errors){var me=this,oldMsg=me.getActiveError(),active;me.setActiveErrors(Ext.Array.from(errors));active=me.getActiveError();if(oldMsg!==active){me.setError(active);if(!me.ariaStaticRoles[me.ariaRole]&&me.inputEl){me.inputEl.dom.setAttribute('aria-invalid',!0)}}},clearInvalid:function(){var me=this,hadError=me.hasActiveError();delete me.hadErrorOnDisable;me.unsetActiveError();if(hadError){me.setError('');if(!me.ariaStaticRoles[me.ariaRole]&&me.inputEl){me.inputEl.dom.setAttribute('aria-invalid',!1)}}},setError:function(error){var me=this,msgTarget=me.msgTarget,prop;if(me.rendered){if(msgTarget==='title'||msgTarget==='qtip'){prop=msgTarget==='qtip'?'data-errorqtip':'title';me.getActionEl().dom.setAttribute(prop,error||'')}else{me.updateLayout()}}},renderActiveError:function(){var me=this,hasError=me.hasActiveError(),invalidCls=me.invalidCls+'-field';if(me.inputEl){me.inputEl[hasError?'addCls':'removeCls']([invalidCls,invalidCls+'-'+me.ui])}
me.mixins.labelable.renderActiveError.call(me)},doDestroy:function(){var me=this,task=me.checkChangeTask;if(task){task.cancel()}
Ext.destroy(me.bindNotifyListener);me.cleanupField();me.callParent()},privates:{applyBind:function(bind,currentBindings){var me=this,valueBinding=currentBindings&&currentBindings.value,bindings,newValueBind;bindings=me.callParent([bind,currentBindings]);if(bindings){newValueBind=bindings.value;me.hasBindingValue=!!newValueBind;if(newValueBind!==valueBinding&&me.getInherited().modelValidation){me.updateValueBinding(bindings)}}
return bindings},applyRenderSelectors:function(){var me=this;me.callParent();if(!me.inputEl){me.inputEl=me.el.getById(me.getInputId())}},bindChangeEvents:function(active){var method=active?'resumeEvent':'suspendEvent',inputEl=this.inputEl;if(this.usesPropertychange){inputEl[method]('propertychange')}
if(this.usesTextInput){inputEl[method]('textInput')}},getActionEl:function(){return this.inputEl||this.el},getFocusEl:function(){return this.inputEl},initRenderTpl:function(){var me=this;if(!me.hasOwnProperty('renderTpl')){me.renderTpl=me.lookupTpl('labelableRenderTpl')}
return me.callParent()},onBeforeNotify:function(){this.checkChangeTask.cancel();this.checkChange()},updateValueBinding:function(bindings){var me=this,newBinding=bindings.value,fieldBinding=bindings.$fieldBinding;if(fieldBinding){fieldBinding.destroy();bindings.$fieldBinding=null}
if(newBinding&&newBinding.bindValidationField){me.fieldBinding=newBinding.bindValidationField('setValidationField',me)}}},deprecated:{"5":{methods:{doComponentLayout:function(){this.bindChangeEvents(!1);this.callParent(arguments);this.bindChangeEvents(!0)}}}}})
;
Ext.define('Ext.layout.component.field.Text',{extend:'Ext.layout.component.Auto',alias:'layout.textfield',beginLayoutCycle:function(ownerContext,firstCycle){var target=ownerContext.target;ownerContext.el.toggleCls(target.heightedCls,!ownerContext.heightModel.shrinkWrap||target.minHeight!=null);this.callParent([ownerContext,firstCycle])}})
;
Ext.define('Ext.form.field.VTypes',function(){var alpha=/^[a-zA-Z_]+$/,alphanum=/^[a-zA-Z0-9_]+$/,email=/^(")?(?:[^\."\s])(?:(?:[\.])?(?:[\w\-!#$%&'*+/=?^_`{|}~]))*\1@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,url=/(((^https?)|(^ftp)):\/\/((([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*)|(localhost|LOCALHOST))\/?)/i;return{singleton:!0,alternateClassName:'Ext.form.VTypes',email:function(value){return email.test(value)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[\w.\-@'"!#$%&'*+/=?^_`{|}~]/i,url:function(value){return url.test(value)},urlText:'This field should be a URL in the format "http:/'+'/www.example.com"',alpha:function(value){return alpha.test(value)},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(value){return alphanum.test(value)},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i}})
;
Ext.define('Ext.form.trigger.Trigger',{alias:'trigger.trigger',requires:['Ext.util.ClickRepeater'],mixins:['Ext.mixin.Factoryable'],factoryConfig:{defaultType:'trigger'},repeatClick:!1,hidden:!1,hideOnReadOnly:undefined,tooltip:null,weight:0,preventMouseDown:!0,focusOnMousedown:!1,baseCls:Ext.baseCSSPrefix+'form-trigger',focusCls:Ext.baseCSSPrefix+'form-trigger-focus',overCls:Ext.baseCSSPrefix+'form-trigger-over',clickCls:Ext.baseCSSPrefix+'form-trigger-click',validIdRe:Ext.validIdRe,renderTpl:['<div id="{triggerId}" class="{baseCls} {baseCls}-{ui} {cls} {cls}-{ui} {extraCls} ','{childElCls}"<tpl if="triggerStyle"> style="{triggerStyle}"</tpl>','<tpl if="ariaRole"> role="{ariaRole}"<tpl else> role="presentation"</tpl>','>','{[values.$trigger.renderBody(values)]}','</div>'],constructor:function(config){var me=this,cls;Ext.apply(me,config);if(me.compat4Mode){cls=me.cls;me.focusCls=[me.focusCls,cls+'-focus'];me.overCls=[me.overCls,cls+'-over'];me.clickCls=[me.clickCls,cls+'-click']}
if(!me.validIdRe.test(me.id)){Ext.raise('Invalid trigger "id": "'+me.id+'"')}},afterFieldRender:function(){var me=this,tip=me.tooltip;me.initEvents();if(tip){me.tooltip=null;me.setTooltip(tip)}},destroy:function(){var me=this;me.clickRepeater=me.el=Ext.destroy(me.clickRepeater,me.el);me.callParent()},getBodyRenderData:Ext.emptyFn,getEl:function(){return this.el||null},getStateEl:function(){return this.el},hide:function(){var me=this,el=me.el;me.hidden=!0;if(el){el.hide()}},initEvents:function(){var me=this,isFieldEnabled=me.isFieldEnabled,stateEl=me.getStateEl(),el=me.el;stateEl.addClsOnOver(me.overCls,isFieldEnabled,me);stateEl.addClsOnClick(me.clickCls,isFieldEnabled,me);if(me.repeatClick){me.clickRepeater=new Ext.util.ClickRepeater(el,{preventDefault:!0,handler:me.onClick,listeners:{mousedown:me.onClickRepeaterMouseDown,mouseup:me.onClickRepeaterMouseUp,scope:me},scope:me})}else{me.field.mon(el,{click:me.onClick,mousedown:me.onMouseDown,scope:me})}},isFieldEnabled:function(){return!this.field.disabled},isVisible:function(){var me=this,field=me.field,hidden=!1;if(me.hidden||!field||!me.rendered||me.destroyed){hidden=!0}
return!hidden},onClick:function(){var me=this,args=arguments,e=me.clickRepeater?args[1]:args[0],handler=me.handler,field=me.field;if(handler&&!field.readOnly&&me.isFieldEnabled()){Ext.callback(me.handler,me.scope,[field,me,e],0,field)}},resolveListenerScope:function(scope){return this.field.resolveSatelliteListenerScope(this,scope)},onMouseDown:function(e){if(e.pointerType!=='touch'&&(!this.field.containsFocus||this.focusOnMousedown)){this.field.focus()}
if(this.preventMouseDown){e.preventDefault()}},onClickRepeaterMouseDown:function(clickRepeater,e){if(!e.parentEvent||e.parentEvent.type==='mousedown'){this.field.inputEl.focus()}
e.preventDefault()},onClickRepeaterMouseUp:function(clickRepeater,e){var me=this,field=me.field;Ext.callback(me.endHandler,me.scope,[field,me,e],0,field)},onFieldBlur:function(){this.getStateEl().removeCls(this.focusCls)},onFieldFocus:function(){this.getStateEl().addCls(this.focusCls)},onFieldRender:function(){var me=this,el=me.el=me.field.triggerWrap.selectNode('#'+me.domId,!1);el.setVisibilityMode(Ext.Element.DISPLAY);me.rendered=!0},renderBody:function(renderData){var me=this,bodyTpl=me.bodyTpl;Ext.apply(renderData,me.getBodyRenderData());return bodyTpl?Ext.XTemplate.getTpl(me,'bodyTpl').apply(renderData):''},renderTrigger:function(fieldData){var me=this,width=me.width,triggerStyle=me.hidden?'display:none;':'';if(width){triggerStyle+='width:'+width}
return Ext.XTemplate.getTpl(me,'renderTpl').apply({$trigger:me,fieldData:fieldData,ui:fieldData.ui,childElCls:fieldData.childElCls,triggerId:me.domId=me.field.id+'-trigger-'+me.id,cls:me.cls,triggerStyle:triggerStyle,extraCls:me.extraCls,baseCls:me.baseCls,ariaRole:me.ariaRole})},setHidden:function(hidden){if(hidden!==this.hidden){this[hidden?'hide':'show']()}},setTooltip:function(tip){var me=this,el=me.el,was=me.tooltip;if(tip!==was){me.tooltip=tip;if(el){el.dom.setAttribute('data-qtip',Ext.htmlEncode(tip))}}},setVisible:function(visible){this.setHidden(!visible)},show:function(){var me=this,el=me.el;me.hidden=!1;if(el){el.show()}}})
;
Ext.define('Ext.form.field.Text',{extend:'Ext.form.field.Base',alias:'widget.textfield',alternateClassName:['Ext.form.TextField','Ext.form.Text'],requires:['Ext.layout.component.field.Text','Ext.form.field.VTypes','Ext.form.trigger.Trigger','Ext.util.TextMetrics'],componentLayout:'textfield',config:{hideTrigger:!1,autoHideInputMask:null,inputMask:null,triggers:undefined},renderConfig:{editable:!0},growMin:30,growMax:800,allowBlank:!0,validateBlank:!1,allowOnlyWhitespace:!0,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:'The minimum length for this field is {0}',maxLengthText:'The maximum length for this field is {0}',blankText:'This field is required',regexText:'',emptyText:'',emptyCls:Ext.baseCSSPrefix+'form-empty-field',placeholderCoverCls:Ext.baseCSSPrefix+'placeholder-label',requiredCls:Ext.baseCSSPrefix+'form-required-field',ariaRole:'textbox',repeatTriggerClick:!1,triggerWrapCls:Ext.baseCSSPrefix+'form-trigger-wrap',triggerWrapFocusCls:Ext.baseCSSPrefix+'form-trigger-wrap-focus',triggerWrapInvalidCls:Ext.baseCSSPrefix+'form-trigger-wrap-invalid',fieldBodyCls:Ext.baseCSSPrefix+'form-text-field-body',inputWrapCls:Ext.baseCSSPrefix+'form-text-wrap',inputWrapFocusCls:Ext.baseCSSPrefix+'form-text-wrap-focus',inputWrapInvalidCls:Ext.baseCSSPrefix+'form-text-wrap-invalid',growCls:Ext.baseCSSPrefix+'form-text-grow',heightedCls:Ext.baseCSSPrefix+'form-text-heighted',emptyClsElements:null,needArrowKeys:!0,childEls:['triggerWrap','inputWrap','placeholderLabel'],preSubTpl:['<div id="{cmpId}-triggerWrap" data-ref="triggerWrap"','<tpl if="ariaEl == \'triggerWrap\'">','<tpl foreach="ariaElAttributes"> {$}="{.}"</tpl>','<tpl else>',' role="presentation"','</tpl>',' class="{triggerWrapCls} {triggerWrapCls}-{ui}">','<div id={cmpId}-inputWrap data-ref="inputWrap"',' role="presentation" class="{inputWrapCls} {inputWrapCls}-{ui}">'],postSubTpl:['<tpl if="!Ext.supports.Placeholder">','<label id="{cmpId}-placeholderLabel" data-ref="placeholderLabel" for="{id}" class="{placeholderCoverCls} {placeholderCoverCls}-{ui}">{placeholder}</label>','</tpl>','</div>','<tpl for="triggers">{[values.renderTrigger(parent)]}</tpl>','</div>'],initComponent:function(){var me=this,emptyCls=me.emptyCls;if(me.allowOnlyWhitespace===!1){me.allowBlank=!1}
if(me.grow){me.liquidLayout=!1}
if(me.size){Ext.log.warn('Ext.form.field.Text "size" config was deprecated in Ext 5.0. '+'Please specify a "width" or use a layout instead.')}
if(me.size){me.defaultBodyWidth=me.size*6.5+20}
if(!me.onTrigger1Click){me.onTrigger1Click=me.onTriggerClick}
me.callParent();if(me.readOnly){me.setReadOnly(me.readOnly)}
me.fieldFocusCls=me.baseCls+'-focus';me.emptyUICls=emptyCls+' '+emptyCls+'-'+me.ui;me.addStateEvents('change')},initEvents:function(){var me=this,el=me.inputEl;me.callParent();if(me.maskRe||(me.vtype&&me.disableKeyFilter!==!0&&(me.maskRe=Ext.form.field.VTypes[me.vtype+'Mask']))){me.mon(el,'keypress',me.filterKeys,me)}
if(me.enableKeyEvents){me.mon(el,{scope:me,keyup:me.onKeyUp,keydown:me.onKeyDown,keypress:me.onKeyPress,paste:me.onPaste})}},isEqual:function(value1,value2){return this.isEqualAsString(value1,value2)},onChange:function(newVal,oldVal){var me=this,inputMask=me.getInputMask();me.callParent([newVal,oldVal]);me.autoSize();if(inputMask){inputMask.onChange(me,newVal,oldVal)}},getSubTplData:function(fieldData){var me=this,value=me.getRawValue(),isEmpty=me.emptyText&&value.length<1,maxLength=me.maxLength,placeholder,data,inputElAttr;if(me.enforceMaxLength){if(maxLength===Number.MAX_VALUE){maxLength=undefined}}else{maxLength=undefined}
if(me.emptyText){placeholder=Ext.String.htmlEncode(me.emptyText)}
data=Ext.apply(me.callParent([fieldData]),{triggerWrapCls:me.triggerWrapCls,inputWrapCls:me.inputWrapCls,placeholderCoverCls:me.placeholderCoverCls,triggers:me.orderedTriggers,maxLength:maxLength,readOnly:!me.editable||me.readOnly,placeholder:placeholder,value:value,fieldCls:me.fieldCls+(me.allowBlank?'':' '+me.requiredCls)+(isEmpty?' '+me.emptyUICls:'')});inputElAttr=data.inputElAriaAttributes;if(inputElAttr){inputElAttr['aria-required']=!me.allowBlank}
return data},beforeRender:function(){var me=this,heighted;heighted=me.height!=null||me.minHeight!=null||!!(me.ownerLayout&&me.ownerLayout.getItemSizePolicy(me,me.fakeSizeModel).setsHeight);if(heighted){me.protoEl.addCls(me.heightedCls)}
me.callParent()},onRender:function(){var me=this,triggers=me.getTriggers(),elements=[],id;if(Ext.supports.FixedTableWidthBug){me.el._needsTableWidthFix=!0}
me.callParent();me.emptyClsElements=[me.inputEl];if(triggers){me.invokeTriggers('onFieldRender');for(id in triggers){elements.push(triggers[id].el)}
me.triggerEl=me.triggerCell=new Ext.CompositeElement(elements,!0)}
me.inputCell=me.inputWrap;me.refreshEmptyText()},onResize:function(width,height,oldWidth,oldHeight){var me=this;if(me.rendered&&me.grow){me.autoSize()}
me.callParent([width,height,oldWidth,oldHeight])},afterRender:function(){this.callParent();this.invokeTriggers('afterFieldRender')},onBoxReady:function(width,height){var me=this;me.callParent([width,height]);if(!me.liquidLayout){this.autoSize()}},applyInputMask:function(value,instance){var field=Ext.field,InputMask=field&&field.InputMask;if(value){if(!InputMask){Ext.raise('Missing Ext.field.InputMask (required to use inputMask)')}}
return value?InputMask.from(value,instance):null},applyTriggers:function(triggers){var me=this,hideAllTriggers=me.getHideTrigger(),readOnly=me.readOnly,orderedTriggers=me.orderedTriggers=[],repeatTriggerClick=me.repeatTriggerClick,id,triggerCfg,trigger,triggerCls,i;if(me.rendered){Ext.raise("Cannot set triggers after field has already been rendered.")}
if((me.triggerCls&&!triggers)||me.trigger1Cls){Ext.log.warn("Ext.form.field.Text: 'triggerCls' and 'trigger<n>Cls'"+" are deprecated.  Use 'triggers' instead.")}
if(!triggers){triggers={};if(me.triggerCls&&!me.trigger1Cls){me.trigger1Cls=me.triggerCls}
for(i=1;(triggerCls=me['trigger'+i+'Cls']);i++){triggers['trigger'+i]={cls:triggerCls,extraCls:Ext.baseCSSPrefix+'trigger-index-'+i,handler:'onTrigger'+i+'Click',compat4Mode:!0,scope:me}}}
for(id in triggers){if(triggers.hasOwnProperty(id)){triggerCfg=triggers[id];triggerCfg.field=me;triggerCfg.id=id;if((readOnly&&triggerCfg.hideOnReadOnly!==!1)||(hideAllTriggers&&triggerCfg.hidden!==!1)){triggerCfg.hidden=!0}
if(repeatTriggerClick&&(triggerCfg.repeatClick!==!1)){triggerCfg.repeatClick=!0}
trigger=triggers[id]=Ext.form.trigger.Trigger.create(triggerCfg);orderedTriggers.push(trigger)}}
Ext.sortByWeight(orderedTriggers);return triggers},invokeTriggers:function(methodName,args){var me=this,triggers=me.getTriggers(),id,trigger;if(triggers){for(id in triggers){if(triggers.hasOwnProperty(id)){trigger=triggers[id];trigger[methodName].apply(trigger,args||[])}}}},getTrigger:function(id){return this.getTriggers()[id]},updateMinHeight:function(minHeight,oldMinHeight){this.callParent([minHeight,oldMinHeight]);this.toggleCls(Ext.baseCSSPrefix+'has-min-height',!!minHeight)},updateInputMask:function(inputMask,previous){if(previous){previous.release()}
if(inputMask){this.enableKeyEvents=!0}},updateHideTrigger:function(hideTrigger){this.invokeTriggers(hideTrigger?'hide':'show')},updateEditable:function(editable,oldEditable){this.setReadOnlyAttr(!editable||this.readOnly)},setReadOnly:function(readOnly){var me=this,triggers=me.getTriggers(),hideTriggers=me.getHideTrigger(),trigger,id;readOnly=!!readOnly;me.callParent([readOnly]);if(me.rendered){me.setReadOnlyAttr(readOnly||!me.editable)}
if(triggers){for(id in triggers){trigger=triggers[id];if(trigger.hideOnReadOnly===!0||(trigger.hideOnReadOnly!==!1&&!hideTriggers)){trigger.setVisible(!readOnly)}}}},setReadOnlyAttr:function(readOnly){var me=this,readOnlyName='readonly',inputEl=me.inputEl.dom;if(readOnly){inputEl.setAttribute(readOnlyName,readOnlyName)}else{inputEl.removeAttribute(readOnlyName)}
if(!me.ariaStaticRoles[me.ariaRole]){me.inputEl.dom.setAttribute('aria-readonly',!!readOnly)}},processRawValue:function(value){var me=this,stripRe=me.stripCharsRe,mod,newValue;if(stripRe){if(!stripRe.global){mod='g';mod+=(stripRe.ignoreCase)?'i':'';mod+=(stripRe.multiline)?'m':'';stripRe=new RegExp(stripRe.source,mod)}
newValue=value.replace(stripRe,'');if(newValue!==value){me.setRawValue(newValue);if(me.lastValue===value){me.lastValue=newValue}
value=newValue}}
return value},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable='on'}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=''}},onKeyDown:function(event){var me=this,inputMask=me.getInputMask();if(inputMask){inputMask.onKeyDown(me,me.getValue(),event)}
this.fireEvent('keydown',this,event)},onKeyUp:function(e){this.fireEvent('keyup',this,e)},onKeyPress:function(event){var me=this,inputMask=me.getInputMask();if(inputMask){inputMask.onKeyPress(me,me.getValue(),event)}
me.fireEvent('keypress',me,event)},onPaste:function(e){var me=this,inputMask=me.getInputMask();if(inputMask){inputMask.onPaste(me,me.getValue(),e)}
me.fireEvent('paste',me,e)},getEmptyText:function(){return this.emptyText},setEmptyText:function(value){var me=this,inputEl=me.inputEl;value=value||'';me.emptyText=value;if(me.rendered){if(Ext.supports.Placeholder&&!me.simulatePlaceholder){if(value){inputEl.dom.setAttribute('placeholder',value)}else{inputEl.dom.removeAttribute('placeholder')}}else{me.placeholderLabel.setHtml(value)}
me.refreshEmptyText()}
return this},afterFirstLayout:function(){var el;this.callParent();if(Ext.isIE&&this.disabled){el=this.inputEl;if(el){el.dom.unselectable='on'}}},toggleInvalidCls:function(hasError){var method=hasError?'addCls':'removeCls';this.callParent([hasError]);this.triggerWrap[method](this.triggerWrapInvalidCls);this.inputWrap[method](this.inputWrapInvalidCls)},onFieldMutation:function(e){this.refreshEmptyText();this.callParent([e])},refreshEmptyText:function(){var me=this,inputEl=me.inputEl,emptyClsElements=me.emptyClsElements,value,isEmpty,i;if(inputEl){value=me.getValue();isEmpty=!(inputEl.dom.value||(Ext.isArray(value)&&value.length));if(me.placeholderLabel){me.placeholderLabel.setDisplayed(isEmpty)}
for(i=0;i<emptyClsElements.length;i++){emptyClsElements[i].toggleCls(me.emptyUICls,isEmpty)}}},setValue:function(value){value=this.callParent([value]);this.refreshEmptyText();return value},onFocus:function(e){var me=this,inputEl=me.inputEl.dom,inputMask=me.getInputMask(),value,len;me.callParent([e]);if(me.emptyText){me.autoSize()}
if(inputMask){inputMask.onFocus(me,inputEl.value)}
me.addCls(me.fieldFocusCls);me.triggerWrap.addCls(me.triggerWrapFocusCls);me.inputWrap.addCls(me.inputWrapFocusCls);me.invokeTriggers('onFieldFocus',[e]);if(me.selectOnFocus&&document.activeElement===inputEl){value=inputEl.value;len=value.length;Ext.asap(me.selectText,me,[0,len])}},onBlur:function(e){var me=this,inputEl=me.inputEl.dom,inputMask=me.getInputMask(),value;me.callParent([e]);value=inputEl&&inputEl.value;me.removeCls(me.fieldFocusCls);me.triggerWrap.removeCls(me.triggerWrapFocusCls);me.inputWrap.removeCls(me.inputWrapFocusCls);me.invokeTriggers('onFieldBlur',[e]);if(inputMask&&me.getAutoHideInputMask()!==!1){inputMask.onBlur(me,value)}},filterKeys:function(e){var charCode;if((e.ctrlKey&&!e.altKey)||e.isSpecialKey()){return}
charCode=String.fromCharCode(e.getCharCode());if(!this.maskRe.test(charCode)){e.stopEvent()}},getState:function(){return this.addPropertyToState(this.callParent(),'value')},applyState:function(state){this.callParent([state]);if(state.hasOwnProperty('value')){this.setValue(state.value)}},getErrors:function(value){value=arguments.length?(value==null?'':value):this.processRawValue(this.getRawValue());var me=this,errors=me.callParent([value]),validator=me.validator,vtype=me.vtype,vtypes=Ext.form.field.VTypes,regex=me.regex,format=Ext.String.format,msg,trimmed,isBlank;if(Ext.isFunction(validator)){msg=validator.call(me,value);if(msg!==!0){errors.push(msg)}}
trimmed=me.allowOnlyWhitespace?value:Ext.String.trim(value);if(trimmed.length<1){if(!me.allowBlank){errors.push(me.blankText)}
if(!me.validateBlank){return errors}
isBlank=!0}
if(!isBlank&&value.length<me.minLength){errors.push(format(me.minLengthText,me.minLength))}
if(value.length>me.maxLength){errors.push(format(me.maxLengthText,me.maxLength))}
if(vtype){if(!vtypes[vtype](value,me)){errors.push(me.vtypeText||vtypes[vtype+'Text'])}}
if(regex&&!regex.test(value)){errors.push(me.regexText||me.invalidText)}
return errors},getCaretPos:function(){return this.inputEl.getCaretPos()},setCaretPos:function(pos){this.inputEl.setCaretPos(pos)},getTextSelection:function(){return this.inputEl.getTextSelection()},selectText:function(start,end,direction){var me=this;Ext.defer(function(){if(!me.destroyed&&me.inputEl.isVisible(!0)){me.inputEl.selectText(start,end,direction)}},Ext.isIE?10:0);return me},getGrowWidth:function(){return this.inputEl.dom.value},autoSize:function(){var me=this,triggers,triggerId,triggerWidth,inputEl,width,value;if(me.grow&&me.rendered&&me.getSizeModel().width.auto){inputEl=me.inputEl;triggers=me.getTriggers();triggerWidth=0;value=Ext.util.Format.htmlEncode(me.getGrowWidth()||(me.hasFocus?'':me.emptyText)||'');value=value.replace(/\s/g,'&nbsp;');for(triggerId in triggers){triggerWidth+=triggers[triggerId].el.getWidth()}
width=inputEl.getTextWidth(value)+triggerWidth+me.inputWrap.getBorderWidth('lr')+me.triggerWrap.getBorderWidth('lr')+inputEl.getPadding('lr');width=Math.min(Math.max(width,me.growMin),me.growMax);me.bodyEl.setWidth(width);me.updateLayout();me.fireEvent('autosize',me,width)}},doDestroy:function(){var me=this;me.invokeTriggers('destroy');Ext.destroy(me.triggerRepeater);me.setInputMask(null);me.callParent()},onTriggerClick:Ext.emptyFn,privates:{getTdType:function(){return'textfield'}},deprecated:{5:{methods:{getTriggerWidth:function(){var triggers=this.getTriggers(),width=0,id;if(triggers&&this.rendered){for(id in triggers){if(triggers.hasOwnProperty(id)){width+=triggers[id].el.getWidth()}}}
return width}}}}},function(TextField){var calculated=Ext.layout.SizeModel.calculated;TextField.prototype.fakeSizeModel=calculated.pairsByHeightOrdinal[calculated.ordinal]})
;
Ext.define('Ext.form.field.TextArea',{extend:'Ext.form.field.Text',alias:['widget.textareafield','widget.textarea'],alternateClassName:'Ext.form.TextArea',requires:['Ext.XTemplate','Ext.util.DelayedTask'],fieldSubTpl:['<textarea id="{id}" data-ref="inputEl" rows="1" {inputAttrTpl}','<tpl if="name"> name="{name}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx != null"> tabindex="{tabIdx}"</tpl>',' class="{fieldCls} {typeCls} {typeCls}-{ui} {inputCls} {fixCls}" ','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>','<tpl foreach="ariaElAttributes"> {$}="{.}"</tpl>','<tpl foreach="inputElAriaAttributes"> {$}="{.}"</tpl>',' autocomplete="off">\n','<tpl if="value">{[Ext.util.Format.htmlEncode(values.value)]}</tpl>','</textarea>',{disableFormats:!0}],growMin:60,growMax:1000,growAppend:'\n-',enterIsSpecial:!1,preventScrollbars:!1,returnRe:/\r/g,inputCls:Ext.baseCSSPrefix+'form-textarea',extraFieldBodyCls:Ext.baseCSSPrefix+'form-textarea-body',ariaAttributes:{'aria-multiline':!0},constructor:function(config){this.callParent([config]);if(this.cols){Ext.log.warn('Ext.form.field.TextArea "cols" config was removed in Ext 5.0. '+'Please specify a "width" or use a layout instead.')}
if(this.rows){Ext.log.warn('Ext.form.field.TextArea "rows" config was removed in Ext 5.0. '+'Please specify a "height" or use a layout instead.')}},getSubTplData:function(fieldData){var me=this,fieldStyle=me.getFieldStyle(),ret=me.callParent(arguments);if(me.grow){if(me.preventScrollbars){ret.fieldStyle=(fieldStyle||'')+';overflow:hidden;'}}
return ret},afterRender:function(){var me=this;me.callParent(arguments);me.needsMaxCheck=me.enforceMaxLength&&me.maxLength!==Number.MAX_VALUE&&!Ext.supports.TextAreaMaxLength;if(me.needsMaxCheck){me.inputEl.on('paste',me.onPaste,me)}},transformRawValue:function(value){return this.stripReturns(value)},getValue:function(){return this.stripReturns(this.callParent())},valueToRaw:function(value){value=this.stripReturns(value);return this.callParent([value])},stripReturns:function(value){if(value&&typeof value==='string'){value=value.replace(this.returnRe,'')}
return value},onPaste:function(){var me=this;if(!me.pasteTask){me.pasteTask=new Ext.util.DelayedTask(me.pasteCheck,me)}
me.pasteTask.delay(1)},pasteCheck:function(){var me=this,value=me.getValue(),max=me.maxLength;if(value.length>max){value=value.substr(0,max);me.setValue(value)}},fireKey:function(e){var me=this,key=e.getKey(),value;if(e.isSpecialKey()&&(me.enterIsSpecial||(key!==e.ENTER||e.hasModifier()))){me.fireEvent('specialkey',me,e)}
if(me.needsMaxCheck&&key!==e.BACKSPACE&&key!==e.DELETE&&!e.isNavKeyPress()&&!me.isCutCopyPasteSelectAll(e,key)){value=me.getValue();if(value.length>=me.maxLength){e.stopEvent()}}},isCutCopyPasteSelectAll:function(e,key){if(e.ctrlKey){return key===e.A||key===e.C||key===e.V||key===e.X}
return!1},autoSize:function(){var me=this,inputEl,hideScroller,height,curWidth,value;if(me.grow&&me.rendered&&me.getSizeModel().height.auto){inputEl=me.inputEl;curWidth=inputEl.getWidth(!0);value=Ext.util.Format.htmlEncode(inputEl.dom.value)||'&#160;';value+=me.growAppend;value=value.replace(/\n/g,'<br/>');height=Ext.util.TextMetrics.measure(inputEl,value,curWidth).height+inputEl.getPadding('tb')+me.inputWrap.getBorderWidth('tb')+me.triggerWrap.getBorderWidth('tb');height=Math.min(Math.max(height,me.growMin),me.growMax);hideScroller=me.preventScrollbars||!me.growMax||height<me.growMax;inputEl.setStyle('overflow-y',hideScroller?'hidden':'auto');me.bodyEl.setHeight(height);me.updateLayout();me.fireEvent('autosize',me,height)}},doDestroy:function(){var task=this.pasteTask;if(task){task.cancel()}
this.callParent()}})
;
Ext.define('Ext.window.MessageBox',{extend:'Ext.window.Window',requires:['Ext.toolbar.Toolbar','Ext.form.field.Text','Ext.form.field.TextArea','Ext.button.Button','Ext.layout.container.Anchor','Ext.layout.container.HBox','Ext.ProgressBar'],alias:'widget.messagebox',OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:Ext.baseCSSPrefix+'message-box-info',WARNING:Ext.baseCSSPrefix+'message-box-warning',QUESTION:Ext.baseCSSPrefix+'message-box-question',ERROR:Ext.baseCSSPrefix+'message-box-error',hideMode:'offsets',closeAction:'hide',resizable:!1,scrollable:!0,title:'&#160;',defaultMinWidth:250,defaultMaxWidth:600,defaultMinHeight:110,defaultMaxHeight:500,minWidth:null,maxWidth:null,minHeight:null,maxHeight:null,constrain:!0,cls:[Ext.baseCSSPrefix+'message-box',Ext.baseCSSPrefix+'hidden-offsets'],layout:{type:'vbox',align:'stretch'},shrinkWrapDock:!0,defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:'OK',yes:'Yes',no:'No',cancel:'Cancel'},buttonIds:['ok','yes','no','cancel'],baseIconCls:Ext.baseCSSPrefix+'message-box-icon',ariaRole:'alertdialog',makeButton:function(btnIdx){var btnId=this.buttonIds[btnIdx];return new Ext.button.Button({handler:this.btnCallback,itemId:btnId,scope:this,text:this.buttonText[btnId],minWidth:75})},btnCallback:function(btn,event){var me=this,value,field;if(event&&event.type==='keydown'&&!event.isSpecialKey()){event.getTarget(null,null,!0).on({keyup:function(e){me.btnCallback(btn,e)},single:!0});return}
if(me.cfg.prompt||me.cfg.multiline){if(me.cfg.multiline){field=me.textArea}else{field=me.textField}
value=field.getValue();field.reset()}
me.hide();me.userCallback(btn.itemId,value,me.cfg)},hide:function(){var me=this,cls=me.cfg?me.cfg.cls:'';me.progressBar.reset();if(cls){me.removeCls(cls)}
me.callParent(arguments)},constructor:function(cfg){var me=this;me.callParent(arguments);me.minWidth=me.defaultMinWidth=(me.minWidth||me.defaultMinWidth);me.maxWidth=me.defaultMaxWidth=(me.maxWidth||me.defaultMaxWidth);me.minHeight=me.defaultMinHeight=(me.minHeight||me.defaultMinHeight);me.maxHeight=me.defaultMaxHeight=(me.maxHeight||me.defaultMaxHeight)},initComponent:function(cfg){var me=this,baseId=me.id,i,button;me.title=me.title||'&#160;';me.iconCls=me.iconCls||'';me.topContainer=new Ext.container.Container({layout:'hbox',padding:10,style:{overflow:'hidden'},items:[me.iconComponent=new Ext.Component({cls:me.baseIconCls}),me.promptContainer=new Ext.container.Container({flex:1,layout:{type:'vbox',align:'stretch'},items:[me.msg=new Ext.Component({id:baseId+'-msg',cls:me.baseCls+'-text'}),me.textField=new Ext.form.field.Text({id:baseId+'-textfield',enableKeyEvents:!0,ariaAttributes:{'aria-labelledby':me.msg.id},listeners:{keydown:me.onPromptKey,scope:me}}),me.textArea=new Ext.form.field.TextArea({id:baseId+'-textarea',height:75,ariaAttributes:{'aria-labelledby':me.msg.id}})]})]});me.progressBar=new Ext.ProgressBar({id:baseId+'-progressbar',margin:'0 10 10 10'});me.items=[me.topContainer,me.progressBar];me.msgButtons=[];for(i=0;i<4;i++){button=me.makeButton(i);me.msgButtons[button.itemId]=button;me.msgButtons.push(button)}
me.bottomTb=new Ext.toolbar.Toolbar({id:baseId+'-toolbar',ui:'footer',dock:'bottom',focusableContainer:!1,ariaRole:null,layout:{pack:{left:'start',right:'end'}[me.buttonAlign]||'center'},items:[me.msgButtons[0],me.msgButtons[1],me.msgButtons[2],me.msgButtons[3]]});me.dockedItems=[me.bottomTb];me.on('close',me.onClose,me);me.callParent()},afterRender:function(){var me=this;me.callParent(arguments);me.textField.labelEl.dom.removeAttribute('for');me.textArea.labelEl.dom.removeAttribute('for')},onClose:function(){var btn=this.msgButtons[3];if(btn){this.btnCallback(btn)}},onPromptKey:function(textField,e){var me=this;if(e.keyCode===e.RETURN||e.keyCode===10){if(me.msgButtons.ok.isVisible()){me.msgButtons.ok.handler.call(me,me.msgButtons.ok)}else if(me.msgButtons.yes.isVisible()){me.msgButtons.yes.handler.call(me,me.msgButtons.yes)}}},reconfigure:function(cfg){var me=this,buttons=0,hideToolbar=!0,oldButtonText=me.buttonText,resizer=me.resizer,header=me.header,headerCfg=header&&!header.isHeader,message=cfg&&(cfg.message||cfg.msg),buttonTips=cfg.buttonTips,title,iconCls,resizeTracker,width,height,i,textArea,textField,msg,progressBar,msgButtons,wait,tool;me.updateButtonText();me.cfg=cfg=cfg||{};wait=cfg.wait;if(cfg.width){width=cfg.width}
if(cfg.height){height=cfg.height}
me.minWidth=cfg.minWidth||me.defaultMinWidth;me.maxWidth=cfg.maxWidth||me.defaultMaxWidth;me.minHeight=cfg.minHeight||me.defaultMinHeight;me.maxHeight=cfg.maxHeight||me.defaultMaxHeight;if('maskClickAction' in cfg){me.maskClickAction=cfg.maskClickAction}else{delete me.maskClickAction}
if(resizer){resizeTracker=resizer.resizeTracker;resizer.minWidth=resizeTracker.minWidth=me.minWidth;resizer.maxWidth=resizeTracker.maxWidth=me.maxWidth;resizer.minHeight=resizeTracker.minHeight=me.minHeight;resizer.maxHeight=resizeTracker.maxHeight=me.maxHeight}
delete me.defaultFocus;if(cfg.defaultFocus){me.defaultFocus=cfg.defaultFocus}
me.animateTarget=cfg.animateTarget||undefined;me.modal=cfg.modal!==!1;if(cfg.title!=null){title=cfg.title}else if(headerCfg&&header.title!=null){title=header.title}else{title=me.title}
if(cfg.iconCls!=null){iconCls=cfg.iconCls}else if(headerCfg&&header.iconCls!=null){iconCls=header.iconCls}else{iconCls=me.iconCls}
me.setTitle(title);me.setIconCls(iconCls);if(Ext.isObject(cfg.buttons)){me.buttonText=cfg.buttons;buttons=0}else{me.buttonText=cfg.buttonText||me.buttonText;buttons=Ext.isNumber(cfg.buttons)?cfg.buttons:0}
Ext.each(me.buttonIds,function(buttonId){me.msgButtons[buttonId].setTooltip((buttonTips&&buttonTips[buttonId])||null)});buttons=buttons|me.updateButtonText();me.buttonText=oldButtonText;Ext.suspendLayouts();me.width=me.height=null;if(width||height){if(width){me.setWidth(width)}
if(height){me.setHeight(height)}}
if(!me.rendered){me.render(Ext.getBody())}
me.closable=cfg.closable!==!1&&!wait;header=me.header;if(header){tool=header.child('[type=close]');if(tool){tool.setVisible(me.closable)}
if(!cfg.title&&!me.closable&&!cfg.iconCls){header.hide()}else{header.show()}}
me.liveDrag=!cfg.proxyDrag;me.userCallback=Ext.Function.bindCallback(cfg.callback||cfg.fn||Ext.emptyFn,cfg.scope||Ext.global);me.setIcon(cfg.icon);msg=me.msg;if(message){msg.setHtml(message);msg.show();me.ariaEl.dom.setAttribute('aria-describedby',msg.id)}else{msg.hide();me.ariaEl.dom.removeAttribute('aria-describedby')}
textArea=me.textArea;textField=me.textField;if(cfg.prompt||cfg.multiline){me.multiline=cfg.multiline;if(cfg.multiline){textArea.setValue(cfg.value);textArea.setHeight(cfg.defaultTextHeight||me.defaultTextHeight);textArea.show();textField.hide();me.defaultFocus=textArea}else{textField.setValue(cfg.value);textArea.hide();textField.show();me.defaultFocus=textField}
me.ariaEl.dom.removeAttribute('aria-describedby')}else{textArea.hide();textField.hide()}
progressBar=me.progressBar;if(cfg.progress||wait){progressBar.show();me.updateProgress(0,cfg.progressText);me.defaultFocus=progressBar;if(wait){progressBar.wait(wait===!0?cfg.waitConfig:wait)}}else{progressBar.hide()}
msgButtons=me.msgButtons;for(i=0;i<4;i++){if(buttons&Math.pow(2,i)){if(!me.defaultFocus){me.defaultFocus=msgButtons[i]}
msgButtons[i].show();hideToolbar=!1}else{msgButtons[i].hide()}}
if(hideToolbar){me.bottomTb.hide()}else{me.bottomTb.show()}
Ext.resumeLayouts(!0)},updateButtonText:function(){var me=this,buttonText=me.buttonText,buttons=0,btnId,btn;for(btnId in buttonText){if(buttonText.hasOwnProperty(btnId)){btn=me.msgButtons[btnId];if(btn){if(me.cfg&&me.cfg.buttonText){buttons=buttons|Math.pow(2,Ext.Array.indexOf(me.buttonIds,btnId))}
if(btn.text!==buttonText[btnId]){btn.setText(buttonText[btnId])}}}}
return buttons},show:function(cfg){var me=this,visibleFocusables;cfg=cfg||{};if(Ext.Component.layoutSuspendCount){Ext.on({resumelayouts:function(){me.show(cfg)},single:!0});return me}
me.reconfigure(cfg);if(cfg.cls){me.addCls(cfg.cls)}
visibleFocusables=me.query('textfield:not([hidden]),textarea:not([hidden]),button:not([hidden])');me.preventFocusOnActivate=!visibleFocusables.length;me.callParent();return me},onShow:function(){this.callParent(arguments);this.center()},updateText:function(text){this.msg.setHtml(text)},setIcon:function(icon,width,height){var me=this,iconCmp=me.iconComponent,cls=me.messageIconCls;if(cls){iconCmp.removeCls(cls)}
if(icon){iconCmp.show();if(width||height){iconCmp.setSize(width||iconCmp.getWidth(),height||iconCmp.getHeight())}
iconCmp.addCls(Ext.baseCSSPrefix+'dlg-icon');iconCmp.addCls(me.messageIconCls=icon)}else{iconCmp.removeCls(Ext.baseCSSPrefix+'dlg-icon');iconCmp.hide()}
return me},updateProgress:function(value,progressText,message){this.progressBar.updateProgress(value,progressText);if(message){this.updateText(message)}
return this},onEsc:function(){if(this.closable!==!1){this.callParent(arguments)}},confirm:function(title,message,fn,scope){if(Ext.isString(title)){title={title:title,icon:this.QUESTION,message:message,buttons:this.YESNO,callback:fn,scope:scope}}
return this.show(title)},prompt:function(title,message,fn,scope,multiline,value){if(Ext.isString(title)){title={prompt:!0,title:title,minWidth:this.minPromptWidth,message:message,buttons:this.OKCANCEL,callback:fn,scope:scope,multiline:multiline,value:value}}
return this.show(title)},wait:function(message,title,config){if(Ext.isString(message)){message={title:title,message:message,closable:!1,wait:!0,modal:!0,minWidth:this.minProgressWidth,waitConfig:config}}
return this.show(message)},alert:function(title,message,fn,scope){if(Ext.isString(title)){title={title:title,message:message,buttons:this.OK,fn:fn,scope:scope,minWidth:this.minWidth}}
return this.show(title)},progress:function(title,message,progressText){if(Ext.isString(title)){title={title:title,message:message,progress:!0,progressText:progressText}}
return this.show(title)},privates:{syncHeaderConfigs:Ext.privateFn}},function(MessageBox){Ext.onInternalReady(function(){Ext.MessageBox=Ext.Msg=new MessageBox()})})
;
Ext.define('Ext.form.Basic',{extend:'Ext.util.Observable',alternateClassName:'Ext.form.BasicForm',requires:['Ext.util.MixedCollection','Ext.form.action.Load','Ext.form.action.Submit','Ext.form.action.StandardSubmit','Ext.window.MessageBox','Ext.data.ErrorCollection','Ext.util.DelayedTask'],taskDelay:10,constructor:function(owner,config){var me=this,reader;me.owner=owner;me.fieldMonitors={validitychange:me.checkValidityDelay,enable:me.checkValidityDelay,disable:me.checkValidityDelay,dirtychange:me.checkDirtyDelay,errorchange:me.checkErrorDelay,scope:me};me.checkValidityTask=new Ext.util.DelayedTask(me.checkValidity,me);me.checkDirtyTask=new Ext.util.DelayedTask(me.checkDirty,me);me.checkErrorTask=new Ext.util.DelayedTask(me.checkError,me);me.monitor=new Ext.container.Monitor({selector:'[isFormField]:not([excludeForm])',scope:me,addHandler:me.onFieldAdd,removeHandler:me.onFieldRemove,invalidateHandler:me.onMonitorInvalidate});me.monitor.bind(owner);Ext.apply(me,config);if(Ext.isString(me.paramOrder)){me.paramOrder=me.paramOrder.split(/[\s,|]/)}
reader=me.reader;if(reader&&!reader.isReader){if(typeof reader==='string'){reader={type:reader}}
me.reader=Ext.createByAlias('reader.'+reader.type,reader)}
reader=me.errorReader;if(reader&&!reader.isReader){if(typeof reader==='string'){reader={type:reader}}
me.errorReader=Ext.createByAlias('reader.'+reader.type,reader)}
me.callParent()},initialize:function(){this.initialized=!0;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:!1,waitTitle:'Please Wait...',trackResetOnLoad:!1,wasDirty:!1,destroy:function(){var me=this,mon=me.monitor;Ext.undefer(me.actionTimer);if(mon){mon.unbind();me.monitor=null}
me.clearListeners();me.checkValidityTask.cancel();me.checkDirtyTask.cancel();me.checkErrorTask.cancel();me.checkValidityTask=me.checkDirtyTask=me.checkErrorTask=null;me.callParent()},onFieldAdd:function(field){field.on(this.fieldMonitors);this.onMonitorInvalidate()},onFieldRemove:function(field){field.un(this.fieldMonitors);this.onMonitorInvalidate()},onMonitorInvalidate:function(){if(this.initialized){this.checkValidityDelay()}},getFields:function(){return this.monitor.getItems()},getBoundItems:function(){var boundItems=this._boundItems;if(!boundItems||boundItems.getCount()===0){boundItems=this._boundItems=new Ext.util.MixedCollection();boundItems.addAll(this.owner.query('[formBind]'))}
return boundItems},hasInvalidField:function(){return!!this.getFields().findBy(function(field){var preventMark=field.preventMark,isValid;field.preventMark=!0;isValid=field.isValid();field.preventMark=preventMark;return!isValid})},isValid:function(){var me=this,invalid;Ext.suspendLayouts();invalid=me.getFields().filterBy(function(field){return!field.validate()});Ext.resumeLayouts(!0);return invalid.length<1},checkValidity:function(){var me=this,valid;if(me.destroyed){return}
valid=!me.hasInvalidField();if(valid!==me.wasValid){me.onValidityChange(valid);me.fireEvent('validitychange',me,valid);me.wasValid=valid}},checkValidityDelay:function(){var timer=this.taskDelay;if(timer){this.checkValidityTask.delay(timer)}else{this.checkValidity()}},checkError:function(){this.fireEvent('errorchange',this)},checkErrorDelay:function(){var timer=this.taskDelay;if(timer){this.checkErrorTask.delay(timer)}else{this.checkError()}},onValidityChange:function(valid){var boundItems=this.getBoundItems(),items,i,iLen,cmp;if(boundItems){items=boundItems.items;iLen=items.length;for(i=0;i<iLen;i++){cmp=items[i];if(cmp.disabled===valid){cmp.setDisabled(!valid)}}}},isDirty:function(){return!!this.getFields().findBy(function(f){return f.isDirty()})},checkDirtyDelay:function(){var timer=this.taskDelay;if(timer){this.checkDirtyTask.delay(timer)}else{this.checkDirty()}},checkDirty:function(){var me=this,dirty;if(me.destroyed){return}
dirty=this.isDirty();if(dirty!==this.wasDirty){this.fireEvent('dirtychange',this,dirty);this.wasDirty=dirty}},hasUpload:function(){return!!this.getFields().findBy(function(f){return f.isFileUpload()})},doAction:function(action,options){var me=this;if(Ext.isString(action)){action=Ext.ClassManager.instantiateByAlias('formaction.'+action,Ext.apply({},options,{form:me}))}
if(me.fireEvent('beforeaction',me,action)!==!1){me.beforeAction(action);me.actionTimer=Ext.defer(action.run,100,action)}
return me},submit:function(options){var me=this,action;options=options||{};if(options.standardSubmit||me.standardSubmit){action='standardsubmit'}else{action=me.api?'directsubmit':'submit'}
return me.doAction(action,options)},load:function(options){return this.doAction(this.api?'directload':'load',options)},updateRecord:function(record){record=record||this._record;if(!record){Ext.raise("A record is required.");return this}
var fields=record.self.fields,values=this.getFieldValues(),obj={},i=0,len=fields.length,name;for(;i<len;++i){name=fields[i].name;if(values.hasOwnProperty(name)){obj[name]=values[name]}}
record.beginEdit();record.set(obj);record.endEdit();return this},loadRecord:function(record){this._record=record;return this.setValues(record.getData())},getRecord:function(){return this._record},beforeAction:function(action){var me=this,waitMsg=action.waitMsg,maskCls=Ext.baseCSSPrefix+'mask-loading',fields=me.getFields().items,f,fLen=fields.length,field,waitMsgTarget;for(f=0;f<fLen;f++){field=fields[f];if(field.isFormField&&field.syncValue){field.syncValue()}}
if(waitMsg){waitMsgTarget=me.waitMsgTarget;if(waitMsgTarget===!0){me.owner.el.mask(waitMsg,maskCls)}else if(waitMsgTarget){waitMsgTarget=me.waitMsgTarget=Ext.get(waitMsgTarget);waitMsgTarget.mask(waitMsg,maskCls)}else{me.floatingAncestor=me.owner.up('[floating]');if(me.floatingAncestor){me.savePreventFocusOnActivate=me.floatingAncestor.preventFocusOnActivate;me.floatingAncestor.preventFocusOnActivate=!0}
Ext.MessageBox.wait(waitMsg,action.waitTitle||me.waitTitle)}}},afterAction:function(action,success){var me=this,messageBox=Ext.MessageBox,waitMsgTarget;if(action.waitMsg){waitMsgTarget=me.waitMsgTarget;if(waitMsgTarget===!0){me.owner.el.unmask()}else if(waitMsgTarget){waitMsgTarget.unmask()}else{messageBox.hide()}}
if(me.floatingAncestor){me.floatingAncestor.preventFocusOnActivate=me.savePreventFocusOnActivate}
if(success){if(action.reset){me.reset()}
Ext.callback(action.success,action.scope||action,[me,action]);me.fireEvent('actioncomplete',me,action)}else{Ext.callback(action.failure,action.scope||action,[me,action]);me.fireEvent('actionfailed',me,action)}},findField:function(id){return this.getFields().findBy(function(f){return f.id===id||f.name===id||f.dataIndex===id})},markInvalid:function(errors){var me=this,e,eLen,error,value,key;function mark(fieldId,msg){var field=me.findField(fieldId);if(field){field.markInvalid(msg)}}
if(Ext.isArray(errors)){eLen=errors.length;for(e=0;e<eLen;e++){error=errors[e];mark(error.id||error.field,error.msg||error.message)}}else if(errors instanceof Ext.data.ErrorCollection){eLen=errors.items.length;for(e=0;e<eLen;e++){error=errors.items[e];mark(error.field,error.message)}}else{for(key in errors){if(errors.hasOwnProperty(key)){value=errors[key];mark(key,value,errors)}}}
return this},setValues:function(values){var me=this,v,vLen,val;function setVal(fieldId,val){var field=me.findField(fieldId);if(field){field.setValue(val);if(me.trackResetOnLoad){field.resetOriginalValue()}}}
Ext.suspendLayouts();if(Ext.isArray(values)){vLen=values.length;for(v=0;v<vLen;v++){val=values[v];setVal(val.id,val.value)}}else{Ext.iterate(values,setVal)}
Ext.resumeLayouts(!0);return this},getValues:function(asString,dirtyOnly,includeEmptyText,useDataValues,isSubmitting){var values={},fields=this.getFields().items,fLen=fields.length,isArray=Ext.isArray,dataMethod=useDataValues?'getModelData':'getSubmitData',field,data,val,bucket,name,f;for(f=0;f<fLen;f++){field=fields[f];if(!dirtyOnly||field.isDirty()){data=field[dataMethod](includeEmptyText,isSubmitting);if(Ext.isObject(data)){for(name in data){if(data.hasOwnProperty(name)){val=data[name];if(includeEmptyText&&val===''){val=field.emptyText||''}
if(!field.isRadio){if(values.hasOwnProperty(name)){bucket=values[name];if(!isArray(bucket)){bucket=values[name]=[bucket]}
if(isArray(val)){values[name]=bucket.concat(val)}else{bucket.push(val)}}else{values[name]=val}}else{values[name]=values[name]||val}}}}}}
if(asString){values=Ext.Object.toQueryString(values)}
return values},getFieldValues:function(dirtyOnly){return this.getValues(!1,dirtyOnly,!1,!0)},clearInvalid:function(){Ext.suspendLayouts();var me=this,fields=me.getFields().items,fLen=fields.length,f;for(f=0;f<fLen;f++){fields[f].clearInvalid()}
Ext.resumeLayouts(!0);return me},reset:function(resetRecord){Ext.suspendLayouts();var me=this,fields=me.getFields().items,fLen=fields.length,f;for(f=0;f<fLen;f++){fields[f].reset()}
Ext.resumeLayouts(!0);if(resetRecord===!0){delete me._record}
return me},applyToFields:function(obj){var fields=this.getFields().items,f,fLen=fields.length;for(f=0;f<fLen;f++){Ext.apply(fields[f],obj)}
return this},applyIfToFields:function(obj){var fields=this.getFields().items,f,fLen=fields.length;for(f=0;f<fLen;f++){Ext.applyIf(fields[f],obj)}
return this}})
;
Ext.define('Ext.layout.component.field.FieldContainer',{extend:'Ext.layout.component.Auto',alias:'layout.fieldcontainer',type:'fieldcontainer',waitForOuterHeightInDom:!0,waitForOuterWidthInDom:!0,beginLayout:function(ownerContext){var containerEl=this.owner.containerEl;this.callParent([ownerContext]);ownerContext.hasRawContent=!0;containerEl.setStyle('width','');containerEl.setStyle('height','');ownerContext.containerElContext=ownerContext.getEl('containerEl')},calculateOwnerHeightFromContentHeight:function(ownerContext,contentHeight){var h=this.callParent([ownerContext,contentHeight]);return h+this.getHeightAdjustment()},calculateOwnerWidthFromContentWidth:function(ownerContext,contentWidth){var w=this.callParent([ownerContext,contentWidth]);return w+this.getWidthAdjustment()},measureContentHeight:function(ownerContext){return ownerContext.hasDomProp('containerLayoutDone')?this.callParent([ownerContext]):NaN},measureContentWidth:function(ownerContext){return ownerContext.hasDomProp('containerLayoutDone')?this.callParent([ownerContext]):NaN},publishInnerHeight:function(ownerContext,height){height-=this.getHeightAdjustment();ownerContext.containerElContext.setHeight(height)},publishInnerWidth:function(ownerContext,width){width-=this.getWidthAdjustment();ownerContext.containerElContext.setWidth(width)},privates:{getHeightAdjustment:function(){var owner=this.owner,h=0;if(owner.labelAlign==='top'&&owner.hasVisibleLabel()){h+=owner.labelEl.getHeight()}
if(owner.msgTarget==='under'&&owner.hasActiveError()){h+=owner.errorWrapEl.getHeight()}
return h+owner.bodyEl.getPadding('tb')},getWidthAdjustment:function(){var owner=this.owner,w=0;if(owner.labelAlign!=='top'&&owner.hasVisibleLabel()){w+=(owner.labelWidth+(owner.labelPad||0))}
if(owner.msgTarget==='side'&&owner.hasActiveError()){w+=owner.errorWrapEl.getWidth()}
return w+owner.bodyEl.getPadding('lr')}}})
;
Ext.define('Ext.form.FieldAncestor',{extend:'Ext.Mixin',requires:['Ext.container.Monitor'],mixinConfig:{id:'fieldAncestor',after:{initInheritedState:'initFieldInheritedState'},before:{doDestroy:'onBeforeDestroy'}},initFieldAncestor:function(){var me=this;me.monitor=new Ext.container.Monitor({scope:me,selector:'[isFormField]:not([excludeForm])',addHandler:me.onChildFieldAdd,removeHandler:me.onChildFieldRemove});me.initFieldDefaults()},initMonitor:function(){this.monitor.bind(this)},initFieldInheritedState:function(inheritedState){var inheritedFieldDefaults=inheritedState.fieldDefaults,fieldDefaults=this.fieldDefaults;if(fieldDefaults){if(inheritedFieldDefaults){inheritedState.fieldDefaults=Ext.apply(Ext.Object.chain(inheritedFieldDefaults),fieldDefaults)}else{inheritedState.fieldDefaults=fieldDefaults}}},onChildFieldAdd:function(field){var me=this;me.mon(field,'errorchange',me.handleFieldErrorChange,me);me.mon(field,'validitychange',me.handleFieldValidityChange,me)},onChildFieldRemove:function(field){var me=this;me.mun(field,'errorchange',me.handleFieldErrorChange,me);me.mun(field,'validitychange',me.handleFieldValidityChange,me)},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},handleFieldValidityChange:function(field,isValid){var me=this;if(field!==me){me.fireEvent('fieldvaliditychange',me,field,isValid);me.onFieldValidityChange(field,isValid)}},handleFieldErrorChange:function(labelable,activeError){var me=this;if(labelable!==me){me.fireEvent('fielderrorchange',me,labelable,activeError);me.onFieldErrorChange(labelable,activeError)}},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn,onBeforeDestroy:function(){this.monitor=Ext.destroy(this.monitor)}})
;
Ext.define('Ext.form.FieldContainer',{extend:'Ext.container.Container',alias:'widget.fieldcontainer',requires:['Ext.layout.component.field.FieldContainer'],mixins:{labelable:'Ext.form.Labelable',fieldAncestor:'Ext.form.FieldAncestor'},componentLayout:'fieldcontainer',componentCls:Ext.baseCSSPrefix+'form-fieldcontainer',shrinkWrap:!0,autoEl:{tag:'div',role:'presentation'},childEls:['containerEl'],combineLabels:!1,labelConnector:', ',combineErrors:!1,maskOnDisable:!1,invalidCls:'',fieldSubTpl:['<div id="{id}-containerEl" data-ref="containerEl" class="{containerElCls}"','<tpl if="ariaAttributes">','<tpl foreach="ariaAttributes"> {$}="{.}"</tpl>','<tpl else>',' role="presentation"','</tpl>','>','{%this.renderContainer(out,values)%}','</div>'],initComponent:function(){var me=this;me.initLabelable();me.initFieldAncestor();me.callParent();me.initMonitor()},onAdd:function(labelItem){var me=this;if(labelItem.isLabelable&&Ext.isGecko&&Ext.firefoxVersion<37&&me.layout.type==='absolute'&&!me.hideLabel&&me.labelAlign!=='top'){labelItem.x+=(me.labelWidth+me.labelPad)}
me.callParent(arguments);if(labelItem.isLabelable&&me.combineLabels){labelItem.oldHideLabel=labelItem.hideLabel;labelItem.hideLabel=!0}
me.updateLabel()},onRemove:function(labelItem,isDestroying){var me=this;me.callParent(arguments);if(!isDestroying){if(labelItem.isLabelable&&me.combineLabels){labelItem.hideLabel=labelItem.oldHideLabel}
me.updateLabel()}},initRenderData:function(){var me=this,data=me.callParent();data.containerElCls=me.containerElCls;data=Ext.applyIf(data,me.getLabelableRenderData());if(me.labelAlign==='top'||me.msgTarget==='under'){data.extraFieldBodyCls+=' '+Ext.baseCSSPrefix+'field-container-body-vertical'}
data.tipAnchorTarget=me.id+'-containerEl';return data},getFieldLabel:function(){var label=this.fieldLabel||'';if(!label&&this.combineLabels){label=Ext.Array.map(this.query('[isFieldLabelable]'),function(field){return field.getFieldLabel()}).join(this.labelConnector)}
return label},getSubTplData:function(){var ret=this.initRenderData();Ext.apply(ret,this.subTplData);return ret},getSubTplMarkup:function(fieldData){var me=this,tpl=me.lookupTpl('fieldSubTpl'),html;if(!tpl.renderContent){me.setupRenderTpl(tpl)}
html=tpl.apply(me.getSubTplData(fieldData));return html},updateLabel:function(){var me=this,label=me.labelEl;if(label){me.setFieldLabel(me.getFieldLabel())}},onFieldErrorChange:function(){if(this.combineErrors){var me=this,oldError=me.getActiveError(),invalidFields=Ext.Array.filter(me.query('[isFormField]'),function(field){return field.hasActiveError()}),newErrors=me.getCombinedErrors(invalidFields);if(newErrors){me.setActiveErrors(newErrors)}else{me.unsetActiveError()}
if(oldError!==me.getActiveError()){me.updateLayout()}}},getCombinedErrors:function(invalidFields){var errors=[],fLen=invalidFields.length,f,field,activeErrors,a,aLen,error,label;for(f=0;f<fLen;f++){field=invalidFields[f];activeErrors=field.getActiveErrors();aLen=activeErrors.length;for(a=0;a<aLen;a++){error=activeErrors[a];label=field.getFieldLabel();errors.push((label?label+': ':'')+error)}}
return errors},privates:{applyTargetCls:function(targetCls){var containerElCls=this.containerElCls;this.containerElCls=containerElCls?containerElCls+' '+targetCls:targetCls},getTargetEl:function(){return this.containerEl},initRenderTpl:function(){var me=this;if(!me.hasOwnProperty('renderTpl')){me.renderTpl=me.lookupTpl('labelableRenderTpl')}
return me.callParent()}}})
;
Ext.define('Ext.layout.container.CheckboxGroup',{extend:'Ext.layout.container.Container',alias:['layout.checkboxgroup'],autoFlex:!0,type:'checkboxgroup',createsInnerCt:!0,childEls:['innerCt'],renderTpl:'<table id="{ownerId}-innerCt" data-ref="innerCt" class="'+Ext.baseCSSPrefix+'table-plain" cellpadding="0"'+'role="presentation" style="{tableStyle}">'+'<tbody role="presentation">'+'<tr role="presentation">'+'<tpl for="columns">'+'<td class="{parent.colCls}" valign="top" style="{style}" role="presentation">'+'{% this.renderColumn(out,parent,xindex-1) %}'+'</td>'+'</tpl>'+'</tr>'+'</tbody>'+'</table>',lastOwnerItemsGeneration:null,initLayout:function(){var me=this,owner=me.owner;me.columnsArray=Ext.isArray(owner.columns);me.autoColumns=!owner.columns||owner.columns==='auto';if(!me.autoColumns){me.vertical=owner.vertical||(owner.columns===1||owner.columns.length===1)}
me.callParent()},beginLayout:function(ownerContext){var me=this,autoFlex=me.autoFlex,innerCtStyle=me.innerCt.dom.style,totalFlex=0,flexedCols=0,columns,numCols,i,width,cwidth;me.callParent(arguments);columns=me.rowNodes[0].children;ownerContext.innerCtContext=ownerContext.getEl('innerCt',me);if(!ownerContext.widthModel.shrinkWrap){numCols=columns.length;if(me.columnsArray){for(i=0;i<numCols;i++){width=me.owner.columns[i];if(width<1){totalFlex+=width;flexedCols++}}
for(i=0;i<numCols;i++){width=me.owner.columns[i];if(width<1){cwidth=((width/totalFlex)*100)+'%'}else{cwidth=width+'px'}
columns[i].style.width=cwidth}}else{for(i=0;i<numCols;i++){cwidth=autoFlex?(1/numCols*100)+'%':'';columns[i].style.width=cwidth;flexedCols++}}
if(!flexedCols){innerCtStyle.tableLayout='fixed';innerCtStyle.width=''}else if(flexedCols<numCols){innerCtStyle.tableLayout='fixed';innerCtStyle.width='100%'}else{innerCtStyle.tableLayout='auto';if(autoFlex){innerCtStyle.width='100%'}else{innerCtStyle.width=''}}}else{innerCtStyle.tableLayout='auto';innerCtStyle.width=''}},cacheElements:function(){var me=this;me.callParent();me.rowNodes=me.innerCt.query('tr',!0);me.tBodyNode=me.rowNodes[0].parentNode},calculate:function(ownerContext){var me=this,targetContext,widthShrinkWrap,heightShrinkWrap,shrinkWrap,table,targetPadding;if(!ownerContext.getDomProp('containerChildrenSizeDone')){me.done=!1}else{targetContext=ownerContext.innerCtContext;widthShrinkWrap=ownerContext.widthModel.shrinkWrap;heightShrinkWrap=ownerContext.heightModel.shrinkWrap;shrinkWrap=heightShrinkWrap||widthShrinkWrap;table=targetContext.el.dom;targetPadding=shrinkWrap&&targetContext.getPaddingInfo();if(widthShrinkWrap){ownerContext.setContentWidth(table.offsetWidth+targetPadding.width,!0)}
if(heightShrinkWrap){ownerContext.setContentHeight(table.offsetHeight+targetPadding.height,!0)}}},doRenderColumn:function(out,renderData,columnIndex){var me=renderData.$layout,owner=me.owner,columnCount=renderData.columnCount,items=owner.items.items,itemCount=items.length,item,itemIndex,rowCount,increment,tree;if(owner.vertical){rowCount=Math.ceil(itemCount/columnCount);itemIndex=columnIndex*rowCount;itemCount=Math.min(itemCount,itemIndex+rowCount);increment=1}else{itemIndex=columnIndex;increment=columnCount}
for(;itemIndex<itemCount;itemIndex+=increment){item=items[itemIndex];me.configureItem(item);tree=item.getRenderTree();Ext.DomHelper.generateMarkup(tree,out)}},getColumnCount:function(){var me=this,owner=me.owner,ownerColumns=owner.columns;if(me.columnsArray){return ownerColumns.length}
if(Ext.isNumber(ownerColumns)){return ownerColumns}
return owner.items.length},getItemSizePolicy:function(item){return this.autoSizePolicy},getRenderData:function(){var me=this,data=me.callParent(),owner=me.owner,columns=me.getColumnCount(),autoFlex=me.autoFlex,totalFlex=0,flexedCols=0,width,column,cwidth,i;if(me.columnsArray){for(i=0;i<columns;i++){width=me.owner.columns[i];if(width<1){totalFlex+=width;flexedCols++}}}
data.colCls=owner.groupCls;data.columnCount=columns;data.columns=[];for(i=0;i<columns;i++){column=(data.columns[i]={});if(me.columnsArray){width=me.owner.columns[i];if(width<1){cwidth=((width/totalFlex)*100)+'%'}else{cwidth=width+'px'}
column.style='width:'+cwidth}else{column.style='width:'+(1/columns*100)+'%';flexedCols++}}
data.tableStyle=!flexedCols?'table-layout:fixed;':(flexedCols<columns)?'table-layout:fixed;width:100%':(autoFlex)?'table-layout:auto;width:100%':'table-layout:auto;';return data},isValidParent:Ext.returnTrue,setupRenderTpl:function(renderTpl){this.callParent(arguments);renderTpl.renderColumn=this.doRenderColumn},renderChildren:function(){var me=this,generation=me.owner.items.generation;if(me.lastOwnerItemsGeneration!==generation){me.lastOwnerItemsGeneration=generation;me.renderItems(me.getLayoutItems())}},renderItems:function(items){var me=this,itemCount=items.length,item,rowCount,columnCount,rowIndex,columnIndex,i;if(itemCount){Ext.suspendLayouts();if(me.autoColumns){columnCount=itemCount;rowCount=1}else{columnCount=me.columnsArray?me.owner.columns.length:me.owner.columns;rowCount=Math.ceil(itemCount/columnCount)}
for(i=0;i<itemCount;i++){item=items[i];rowIndex=me.getRenderRowIndex(i,rowCount,columnCount);columnIndex=me.getRenderColumnIndex(i,rowCount,columnCount);if(!item.rendered){me.renderItem(item,rowIndex,columnIndex)}else if(!me.isItemAtPosition(item,rowIndex,columnIndex)){me.moveItem(item,rowIndex,columnIndex)}}
me.pruneRows(rowCount,columnCount);Ext.resumeLayouts(!0)}},isItemAtPosition:function(item,rowIndex,columnIndex){return item.el.dom===this.getItemNodeAt(rowIndex,columnIndex)},getRenderColumnIndex:function(itemIndex,rowCount,columnCount){if(this.vertical){return Math.floor(itemIndex/rowCount)}else{return itemIndex%columnCount}},getRenderRowIndex:function(itemIndex,rowCount,columnCount){if(this.vertical){return itemIndex%rowCount}else{return Math.floor(itemIndex/columnCount)}},getItemNodeAt:function(rowIndex,columnIndex){var column=this.getColumnNodeAt(rowIndex,columnIndex);return this.vertical?column.children[rowIndex]:column.children[0]},getRowNodeAt:function(rowIndex){var me=this,row;rowIndex=me.vertical?0:rowIndex;row=me.rowNodes[rowIndex];if(!row){row=me.rowNodes[rowIndex]=document.createElement('tr');row.role='presentation';me.tBodyNode.appendChild(row)}
return row},getColumnNodeAt:function(rowIndex,columnIndex,row){var column;row=row||this.getRowNodeAt(rowIndex);column=row.children[columnIndex];if(!column){column=Ext.fly(row).appendChild({tag:'td',cls:this.owner.groupCls,vAlign:'top',role:'presentation'},!0)}
return column},pruneRows:function(rowCount,columnCount){var me=this,rows=me.tBodyNode.children,columns,row,column,i,j;rowCount=me.vertical?1:rowCount;while(rows.length>rowCount){row=rows[rows.length-1];while(row.children.length){Ext.get(row.children[0]).destroy()}
row.parentNode.removeChild(row)}
for(i=rowCount-1;i>=0;i--){row=rows[i];columns=row.children;while(columns.length>columnCount){column=columns[columns.length-1];Ext.get(column).destroy()}
if(i>0){for(j=columns.length-1;j>=0;j--){column=columns[j];if(column.children.length===0){Ext.get(column).destroy()}else{break}}}}},renderItem:function(item,rowIndex,columnIndex){var me=this,column,itemIndex;me.configureItem(item);itemIndex=me.vertical?rowIndex:0;column=Ext.get(me.getColumnNodeAt(rowIndex,columnIndex));item.render(column,itemIndex)},moveItem:function(item,rowIndex,columnIndex){var me=this,column,itemIndex,targetNode;itemIndex=me.vertical?rowIndex:0;column=me.getColumnNodeAt(rowIndex,columnIndex);targetNode=column.children[itemIndex];column.insertBefore(item.el.dom,targetNode||null)},destroy:function(){if(this.owner.rendered){var target=this.getRenderTarget(),cells,i,len;if(target){cells=target.query('.'+this.owner.groupCls,!1);for(i=0,len=cells.length;i<len;i++){cells[i].destroy()}}}
this.callParent()}})
;
Ext.define('Ext.form.CheckboxManager',{extend:'Ext.util.MixedCollection',singleton:!0,getByName:function(name,formId){return this.filterBy(function(item){return item.name===name&&item.getFormId()===formId})}})
;
Ext.define('Ext.form.field.Checkbox',{extend:'Ext.form.field.Base',alias:['widget.checkboxfield','widget.checkbox'],alternateClassName:'Ext.form.Checkbox',requires:['Ext.XTemplate','Ext.form.CheckboxManager'],modelValue:!0,modelValueUnchecked:!1,stretchInputElFixed:!1,childEls:['boxLabelEl','innerWrapEl','displayEl'],fieldSubTpl:['<div id="{cmpId}-innerWrapEl" data-ref="innerWrapEl" role="presentation"',' class="{wrapInnerCls}">','<tpl if="labelAlignedBefore">','{beforeBoxLabelTpl}','<label id="{cmpId}-boxLabelEl" data-ref="boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} ','{boxLabelCls}-{ui} {boxLabelCls}-{boxLabelAlign} {noBoxLabelCls} {childElCls}" for="{id}">','{beforeBoxLabelTextTpl}','{boxLabel}','{afterBoxLabelTextTpl}','</label>','{afterBoxLabelTpl}','</tpl>','<span id="{cmpId}-displayEl" data-ref="displayEl" role="presentation" class="{fieldCls} {typeCls} ','{typeCls}-{ui} {inputCls} {inputCls}-{ui} {fixCls} {childElCls} {afterLabelCls}">','<input type="{inputType}" id="{id}" name="{inputName}" data-ref="inputEl" {inputAttrTpl}','<tpl if="tabIdx != null"> tabindex="{tabIdx}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="checked"> checked="checked"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{checkboxCls}" autocomplete="off" hidefocus="true" ','<tpl foreach="ariaElAttributes"> {$}="{.}"</tpl>','<tpl foreach="inputElAriaAttributes"> {$}="{.}"</tpl>','/>','</span>','<tpl if="!labelAlignedBefore">','{beforeBoxLabelTpl}','<label id="{cmpId}-boxLabelEl" data-ref="boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} ','{boxLabelCls}-{ui} {boxLabelCls}-{boxLabelAlign} {noBoxLabelCls} {childElCls}" for="{id}">','{beforeBoxLabelTextTpl}','{boxLabel}','{afterBoxLabelTextTpl}','</label>','{afterBoxLabelTpl}','</tpl>','</div>',{disableFormats:!0,compiled:!0}],publishes:{checked:1},subTplInsertions:['beforeBoxLabelTpl','afterBoxLabelTpl','beforeBoxLabelTextTpl','afterBoxLabelTextTpl','boxLabelAttrTpl','inputAttrTpl'],isCheckbox:!0,focusCls:'form-checkbox-focus',fieldBodyCls:Ext.baseCSSPrefix+'form-cb-wrap',checked:!1,checkedCls:Ext.baseCSSPrefix+'form-cb-checked',boxLabelCls:Ext.baseCSSPrefix+'form-cb-label',boxLabelAlign:'after',afterLabelCls:Ext.baseCSSPrefix+'form-cb-after',wrapInnerCls:Ext.baseCSSPrefix+'form-cb-wrap-inner',noBoxLabelCls:Ext.baseCSSPrefix+'form-cb-no-box-label',inputValue:'on',checkChangeEvents:[],changeEventName:'change',inputType:'checkbox',isTextInput:!1,ariaRole:'native',onRe:/^on$/i,inputCls:Ext.baseCSSPrefix+'form-cb',_checkboxCls:Ext.baseCSSPrefix+'form-cb-input',initComponent:function(){var me=this,value=me.value;if(value!==undefined){me.checked=me.isChecked(value,me.inputValue)}
me.callParent();me.getManager().add(me)},initDefaultName:Ext.emptyFn,initValue:function(){var me=this,checked=!!me.checked;me.originalValue=me.initialValue=me.lastValue=checked;me.setValue(checked)},getElConfig:function(){var me=this;if(me.isChecked(me.rawValue,me.inputValue)){me.addCls(me.checkedCls)}
if(!me.fieldLabel){me.skipLabelForAttribute=!0}
return me.callParent()},getModelData:function(){var me=this,o=me.callParent(arguments);if(o){o[me.getName()]=me.checked?me.modelValue:me.modelValueUnchecked}
return o},getSubTplData:function(fieldData){var me=this,boxLabel=me.boxLabel,boxLabelAlign=me.boxLabelAlign,labelAlignedBefore=boxLabelAlign==='before',data,inputElAttr;data=Ext.apply(me.callParent([fieldData]),{inputType:me.inputType,checkboxCls:me._checkboxCls,disabled:me.readOnly||me.disabled,checked:!!me.checked,wrapInnerCls:me.wrapInnerCls,boxLabel:boxLabel,boxLabelCls:me.boxLabelCls,boxLabelAlign:boxLabelAlign,labelAlignedBefore:labelAlignedBefore,afterLabelCls:labelAlignedBefore?me.afterLabelCls:'',noBoxLabelCls:!boxLabel?me.noBoxLabelCls:'',inputName:me.name||me.id});inputElAttr=data.inputElAriaAttributes;if(inputElAttr){delete inputElAttr['aria-readonly']}
return data},initEvents:function(){var me=this;me.callParent();me.inputEl.on(me.changeEventName,me.onChangeEvent,me,{delegated:!1});if(Ext.isIE){me.bodyEl.on('mousedown',me.onBodyElMousedown,me)}else if(Ext.isMac&&(Ext.isGecko||Ext.isSafari)){me.boxLabelEl.on('mousedown',me.onBoxLabelOrInputMousedown,me);me.inputEl.on('mousedown',me.onBoxLabelOrInputMousedown,me)}},setBoxLabel:function(boxLabel){var me=this;me.boxLabel=boxLabel;if(me.rendered){me.boxLabelEl.setHtml(boxLabel);me.boxLabelEl[boxLabel?'removeCls':'addCls'](me.noBoxLabelCls);me.updateLayout()}},onBodyElMousedown:function(e){if(e.target!==this.inputEl.dom){e.preventDefault()}},onBoxLabelOrInputMousedown:function(e){this.inputEl.focus();e.preventDefault()},onChangeEvent:function(e){this.updateValueFromDom()},updateValueFromDom:function(){var me=this,inputEl=me.inputEl&&me.inputEl.dom;if(inputEl){me.checked=me.rawValue=me.value=inputEl.checked;me.checkChange()}},updateCheckedCls:function(checked){var me=this;checked=checked!=null?checked:me.getValue();me[checked?'addCls':'removeCls'](me.checkedCls)},getRawValue:function(){var inputEl=this.inputEl&&this.inputEl.dom;return inputEl?inputEl.checked:this.checked},getValue:function(){var inputEl=this.inputEl&&this.inputEl.dom;return inputEl?inputEl.checked:this.checked},getSubmitValue:function(){var unchecked=this.uncheckedValue,uncheckedVal=Ext.isDefined(unchecked)?unchecked:null;return this.getValue()?this.inputValue:uncheckedVal},isChecked:function(rawValue,inputValue){var ret=!1;if(rawValue===!0||rawValue==='true'){ret=!0}else{if(inputValue!=='on'&&(inputValue||inputValue===0)&&(Ext.isString(rawValue)||Ext.isNumber(rawValue))){ret=rawValue==inputValue}else{ret=rawValue==='1'||rawValue===1||this.onRe.test(rawValue)}}
return ret},setRawValue:function(value){var me=this,inputEl=me.inputEl&&me.inputEl.dom,checked=me.isChecked(value,me.inputValue);if(inputEl){me.duringSetRawValue=!0;inputEl.checked=checked;me.duringSetRawValue=!1;me.updateCheckedCls(checked)}
me.checked=me.rawValue=checked;if(!me.duringSetValue){me.lastValue=checked}
return checked},setValue:function(checked){var me=this,boxes,i,len,box;if(Ext.isArray(checked)){boxes=me.getManager().getByName(me.name,me.getFormId()).items;len=boxes.length;for(i=0;i<len;++i){box=boxes[i];box.setValue(Ext.Array.contains(checked,box.inputValue))}}else{me.duringSetValue=!0;me.callParent(arguments);delete me.duringSetValue}
return me},valueToRaw:Ext.identityFn,onChange:function(newVal,oldVal){var me=this,handler=me.handler;me.updateCheckedCls(newVal);if(handler){Ext.callback(handler,me.scope,[me,newVal],0,me)}
me.callParent(arguments);if(me.reference&&me.publishState){me.publishState('checked',newVal)}},resetOriginalValue:function(fromBoxInGroup){var me=this,boxes,box,len,i;if(!fromBoxInGroup){boxes=me.getManager().getByName(me.name,me.getFormId()).items;len=boxes.length;for(i=0;i<len;++i){box=boxes[i];if(box!==me){boxes[i].resetOriginalValue(!0)}}}
me.callParent()},doDestroy:function(){this.getManager().removeAtKey(this.id);this.callParent()},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var me=this,inputEl=me.inputEl&&me.inputEl.dom;me.callParent();if(inputEl){inputEl.disabled=me.readOnly}},setReadOnly:function(readOnly){var me=this,inputEl=me.inputEl&&me.inputEl.dom;if(inputEl){inputEl.disabled=!!readOnly||me.disabled}
me.callParent(arguments)},getFormId:function(){var me=this,form;if(!me.formId){form=me.up('form');if(form){me.formId=form.id}}
return me.formId},getFocusClsEl:function(){return this.displayEl}})
;
Ext.define('Ext.theme.triton.form.field.Checkbox',{override:'Ext.form.field.Checkbox',compatibility:Ext.isIE8,initComponent:function(){this.callParent();Ext.on({show:'onGlobalShow',scope:this})},onFocus:function(e){var focusClsEl;this.callParent([e]);focusClsEl=this.getFocusClsEl();if(focusClsEl){focusClsEl.syncRepaint()}},onBlur:function(e){var focusClsEl;this.callParent([e]);focusClsEl=this.getFocusClsEl();if(focusClsEl){focusClsEl.syncRepaint()}},onGlobalShow:function(cmp){if(cmp.isAncestor(this)){this.getFocusClsEl().syncRepaint()}}})
;
Ext.define('Ext.form.CheckboxGroup',{extend:'Ext.form.FieldContainer',xtype:'checkboxgroup',isCheckboxGroup:!0,mixins:{field:'Ext.form.field.Field'},requires:['Ext.layout.container.CheckboxGroup','Ext.form.field.Checkbox','Ext.form.field.Base'],columns:'auto',vertical:!1,allowBlank:!0,blankText:"You must select at least one item in this group",defaultType:'checkboxfield',defaultBindProperty:'value',groupCls:Ext.baseCSSPrefix+'form-check-group',extraFieldBodyCls:Ext.baseCSSPrefix+'form-checkboxgroup-body',layout:'checkboxgroup',componentCls:Ext.baseCSSPrefix+'form-checkboxgroup',ariaRole:'group',ariaEl:'containerEl',skipLabelForAttribute:!0,ariaRenderAttributes:{'aria-invalid':!1},initComponent:function(){var me=this;me.name=me.name||me.id;me.callParent();me.initField()},initRenderData:function(){var me=this,data,ariaAttr;data=me.callParent();data.inputId=me.id+'-'+me.ariaEl;ariaAttr=data.ariaAttributes;if(ariaAttr){if(!ariaAttr['aria-labelledby']){ariaAttr['aria-labelledby']=me.id+'-labelTextEl'}}
return data},initValue:function(){var me=this,valueCfg=me.value;me.originalValue=me.lastValue=valueCfg||me.getValue();if(valueCfg){me.setValue(valueCfg)}},onAdd:function(field){var me=this,items,len,i;if(field.isCheckbox){if(field.name==null){field.name=me.name}
me.mon(field,'change',me.checkChange,me)}else if(field.isContainer){items=field.items.items;for(i=0,len=items.length;i<len;i++){me.onAdd(items[i])}}
me.callParent(arguments)},onRemove:function(item){var me=this,items,len,i;if(item.isCheckbox){me.mun(item,'change',me.checkChange,me)}else if(item.isContainer){items=item.items.items;for(i=0,len=items.length;i<len;i++){me.onRemove(items[i])}}
me.callParent(arguments)},isEqual:function(value1,value2){var toQueryString=Ext.Object.toQueryString;return toQueryString(value1)===toQueryString(value2)},getErrors:function(){var errors=[];if(!this.allowBlank&&Ext.isEmpty(this.getChecked())){errors.push(this.blankText)}
return errors},getBoxes:function(query){return this.query('[isCheckbox]'+(query||''))},eachBox:function(fn,scope){Ext.Array.forEach(this.getBoxes(),fn,scope||this)},getChecked:function(){return this.getBoxes('[checked]')},isDirty:function(){var boxes=this.getBoxes(),b,bLen=boxes.length;for(b=0;b<bLen;b++){if(boxes[b].isDirty()){return!0}}},setReadOnly:function(readOnly){var boxes=this.getBoxes(),b,bLen=boxes.length;for(b=0;b<bLen;b++){boxes[b].setReadOnly(readOnly)}
this.readOnly=readOnly},reset:function(){var me=this,hadError=me.hasActiveError(),preventMark=me.preventMark;me.preventMark=!0;me.batchChanges(function(){var boxes=me.getBoxes(),b,bLen=boxes.length;for(b=0;b<bLen;b++){boxes[b].reset()}});me.preventMark=preventMark;me.unsetActiveError();if(hadError){me.updateLayout()}},resetOriginalValue:function(){var me=this,boxes=me.getBoxes(),b,bLen=boxes.length;for(b=0;b<bLen;b++){boxes[b].resetOriginalValue()}
me.originalValue=me.getValue();me.checkDirty()},setValue:function(value){var me=this,boxes=me.getBoxes(),b,bLen=boxes.length,box,name,cbValue;me.batchChanges(function(){Ext.suspendLayouts();for(b=0;b<bLen;b++){box=boxes[b];name=box.getName();cbValue=!1;if(value){if(Ext.isArray(value[name])){cbValue=Ext.Array.contains(value[name],box.inputValue)}else{cbValue=value[name]}}
box.setValue(cbValue)}
Ext.resumeLayouts(!0)});return me},getValue:function(){var values={},boxes=this.getBoxes(),b,bLen=boxes.length,box,name,inputValue,bucket;for(b=0;b<bLen;b++){box=boxes[b];name=box.getName();inputValue=box.inputValue;if(box.getValue()){if(values.hasOwnProperty(name)){bucket=values[name];if(!Ext.isArray(bucket)){bucket=values[name]=[bucket]}
bucket.push(inputValue)}else{values[name]=inputValue}}}
return values},getSubmitData:function(){return null},getModelData:function(){return null},validate:function(){var me=this,errors,isValid,wasValid;if(me.disabled){isValid=!0}else{errors=me.getErrors();isValid=Ext.isEmpty(errors);wasValid=me.wasValid;if(isValid){me.unsetActiveError()}else{me.setActiveError(errors)}}
if(isValid!==wasValid){me.wasValid=isValid;me.fireEvent('validitychange',me,isValid);if(wasValid!=null||!isValid){me.updateLayout()}}
return isValid}},function(){this.borrow(Ext.form.field.Base,['markInvalid','clearInvalid','setError'])})
;
Ext.define('Ext.form.FieldSet',{extend:'Ext.container.Container',alias:'widget.fieldset',mixins:{fieldAncestor:'Ext.form.FieldAncestor'},uses:['Ext.form.field.Checkbox','Ext.panel.Tool','Ext.layout.container.Anchor','Ext.layout.component.FieldSet'],checkboxUI:'default',collapsed:!1,toggleOnTitleClick:!0,baseCls:Ext.baseCSSPrefix+'fieldset',layout:'anchor',descriptionText:'{0} field set',expandText:'Expand field set',componentLayout:'fieldset',ariaRole:'group',focusable:!1,autoEl:'fieldset',checkbox:null,childEls:['body'],renderTpl:['{%this.renderLegend(out,values);%}','<div id="{id}-body" data-ref="body" class="{baseCls}-body {baseCls}-body-{ui} {bodyTargetCls}" ','role="presentation"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>','{%this.renderContainer(out,values);%}','</div>'],stateEvents:['collapse','expand'],maskOnDisable:!1,initComponent:function(){var me=this,baseCls=me.baseCls;if(me.ariaRole&&!me.ariaLabel){me.ariaLabel=Ext.String.formatEncode(me.descriptionText,me.title||'')}
me.ariaRenderAttributes=me.ariaRenderAttributes||{};me.ariaRenderAttributes['aria-expanded']=!me.collapsed;me.initFieldAncestor();me.callParent();me.layout.managePadding=me.layout.manageOverflow=!1;if(me.collapsed){me.addCls(baseCls+'-collapsed');me.collapse()}
if(me.title||me.checkboxToggle||me.collapsible){me.addTitleClasses();me.legend=me.createLegendCt()}
me.initMonitor()},initRenderData:function(){var me=this,data=me.callParent();data.bodyTargetCls=me.bodyTargetCls;me.protoBody.writeTo(data);delete me.protoBody;return data},doDestroy:function(){var me=this,legend=me.legend;if(legend){delete legend.ownerCt;legend.destroy();me.legend=null}
me.callParent()},getState:function(){var state=this.callParent();state=this.addPropertyToState(state,'collapsed');return state},afterCollapse:Ext.emptyFn,afterExpand:Ext.emptyFn,collapsedHorizontal:function(){return!0},collapsedVertical:function(){return!0},createLegendCt:function(){var me=this,items=[],legendCfg={baseCls:me.baseCls+'-header',layout:'container',ui:me.ui,id:me.id+'-legend',autoEl:'legend',ariaRole:null,items:items,ownerCt:me,shrinkWrap:!0,ownerLayout:me.componentLayout},legend;if(me.checkboxToggle){items.push(me.createCheckboxCmp())}else if(me.collapsible){items.push(me.createToggleCmp())}
items.push(me.createTitleCmp());legend=new Ext.container.Container(legendCfg);return legend},createTitleCmp:function(){var me=this,cfg={html:me.title,ui:me.ui,cls:me.baseCls+'-header-text',id:me.id+'-legendTitle',ariaRole:'presentation'};if(me.collapsible&&me.toggleOnTitleClick){cfg.listeners={click:{element:'el',scope:me,fn:me.toggle}};cfg.cls+=' '+me.baseCls+'-header-text-collapsible'}
me.titleCmp=new Ext.Component(cfg);return me.titleCmp},createCheckboxCmp:function(){var me=this,suffix='-checkbox',cls=me.baseCls+'-header'+suffix,checkboxCmp;cls+=' '+cls+'-'+me.ui;me.checkboxCmp=checkboxCmp=new Ext.form.field.Checkbox(Ext.apply({hideEmptyLabel:!0,name:me.checkboxName||me.id+suffix,cls:cls,id:me.id+'-legendChk',ui:me.checkboxUI,checked:!me.collapsed,msgTarget:'none',listeners:{change:me.onCheckChange,scope:me},ariaLabel:me.expandText},me.checkbox));return checkboxCmp},createToggleCmp:function(){var me=this,toggleCmp;me.toggleCmp=toggleCmp=new Ext.panel.Tool({cacheHeight:!1,cls:me.baseCls+'-header-tool-'+me.ui,type:'toggle',handler:me.toggle,id:me.id+'-legendToggle',scope:me,ariaRole:'checkbox',ariaLabel:me.expandText,ariaRenderAttributes:{'aria-checked':!me.collapsed}});return toggleCmp},doRenderLegend:function(out,renderData){var me=renderData.$comp,legend=me.legend,tree;if(legend){legend.ownerLayout.configureItem(legend);me.setLegendCollapseImmunity(legend);tree=legend.getRenderTree();Ext.DomHelper.generateMarkup(tree,out)}},getCollapsed:function(){return this.collapsed?'top':!1},getCollapsedDockedItems:function(){var legend=this.legend;return legend?[legend]:[]},setTitle:function(title){var me=this,legend=me.legend;me.title=title;me.ariaLabel=Ext.String.formatEncode(me.descriptionText,title||'');if(me.rendered){if(!legend){me.legend=legend=me.createLegendCt();me.addTitleClasses();legend.ownerLayout.configureItem(legend);me.setLegendCollapseImmunity(legend);legend.render(me.el,0)}
me.titleCmp.update(title);me.ariaEl.dom.setAttribute('aria-label',me.ariaLabel)}else if(legend){me.titleCmp.update(title)}else{me.addTitleClasses();me.legend=me.createLegendCt()}
return me},addTitleClasses:function(){var me=this,title=me.title,baseCls=me.baseCls;if(title){me.addCls(baseCls+'-with-title')}
if(title||me.checkboxToggle||me.collapsible){me.addCls(baseCls+'-with-legend')}},expand:function(){return this.setExpanded(!0)},collapse:function(){return this.setExpanded(!1)},setCollapsed:function(collapsed){this.setExpanded(!collapsed)},setExpanded:function(expanded){var me=this,checkboxCmp=me.checkboxCmp,toggleCmp=me.toggleCmp,operation=expanded?'expand':'collapse';if(!me.rendered||me.fireEvent('before'+operation,me)!==!1){expanded=!!expanded;if(checkboxCmp){checkboxCmp.setValue(expanded)}else if(toggleCmp&&toggleCmp.ariaEl.dom){toggleCmp.ariaEl.dom.setAttribute('aria-checked',expanded)}
if(expanded){me.removeCls(me.baseCls+'-collapsed')}else{me.addCls(me.baseCls+'-collapsed')}
if(me.ariaEl.dom){me.ariaEl.dom.setAttribute('aria-expanded',!!expanded)}
me.collapsed=!expanded;if(expanded){delete me.getInherited().collapsed}else{me.getInherited().collapsed=!0}
if(me.rendered){me.updateLayout({isRoot:!1});me.fireEvent(operation,me)}}
return me},getRefItems:function(deep){var refItems=this.callParent(arguments),legend=this.legend;if(legend){refItems.unshift(legend);if(deep){refItems.unshift.apply(refItems,legend.getRefItems(!0))}}
return refItems},toggle:function(){this.setExpanded(!!this.collapsed)},privates:{applyTargetCls:function(targetCls){this.bodyTargetCls=targetCls},finishRender:function(){var legend=this.legend;this.callParent();if(legend){legend.finishRender()}},getProtoBody:function(){var me=this,body=me.protoBody;if(!body){me.protoBody=body=new Ext.util.ProtoElement({styleProp:'bodyStyle',styleIsText:!0})}
return body},getDefaultContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},initPadding:function(targetEl){var me=this,body=me.getProtoBody(),padding=me.padding,bodyPadding;if(padding!==undefined){if(Ext.isIE8){padding=me.parseBox(padding);bodyPadding=Ext.Element.parseBox(0);bodyPadding.top=padding.top;padding.top=0;body.setStyle('padding',me.unitizeBox(bodyPadding))}
targetEl.setStyle('padding',me.unitizeBox(padding))}},onCheckChange:function(cmp,checked){this.setExpanded(checked)},setLegendCollapseImmunity:function(legend){legend.collapseImmune=!0;legend.getInherited().collapseImmune=!0},setupRenderTpl:function(renderTpl){this.callParent(arguments);renderTpl.renderLegend=this.doRenderLegend}}})
;
Ext.define('Ext.form.Label',{extend:'Ext.Component',alias:'widget.label',requires:['Ext.util.Format'],autoEl:'label',maskOnDisable:!1,getElConfig:function(){var me=this;me.html=me.text?Ext.util.Format.htmlEncode(me.text):(me.html||'');return Ext.apply(me.callParent(),{htmlFor:me.forId||''})},setText:function(text,encode){var me=this;encode=encode!==!1;if(encode){me.text=text;delete me.html}else{me.html=text;delete me.text}
if(me.rendered){me.el.dom.innerHTML=encode!==!1?Ext.util.Format.htmlEncode(text):text;me.updateLayout()}
return me}})
;
Ext.define('Ext.form.Panel',{extend:'Ext.panel.Panel',alias:'widget.form',alternateClassName:['Ext.FormPanel','Ext.form.FormPanel'],requires:['Ext.form.Basic','Ext.util.TaskRunner'],mixins:{fieldAncestor:'Ext.form.FieldAncestor'},layout:'anchor',bodyAriaRole:'form',basicFormConfigs:['api','baseParams','errorReader','jsonSubmit','method','paramOrder','paramsAsHash','reader','standardSubmit','timeout','trackResetOnLoad','url','waitMsgTarget','waitTitle'],initComponent:function(){var me=this;if(me.frame){me.border=!1}
me.initFieldAncestor();me.callParent();me.relayEvents(me.form,['beforeaction','actionfailed','actioncomplete','validitychange','dirtychange']);if(me.pollForChanges){me.startPolling(me.pollInterval||500)}},initItems:function(){this.callParent();this.initMonitor();this.form=this.createForm()},afterFirstLayout:function(){this.callParent(arguments);this.form.initialize()},createForm:function(){var cfg={},props=this.basicFormConfigs,len=props.length,i=0,prop;for(;i<len;++i){prop=props[i];cfg[prop]=this[prop]}
return new Ext.form.Basic(this,cfg)},getForm:function(){return this.form},loadRecord:function(record){return this.getForm().loadRecord(record)},getRecord:function(){return this.getForm().getRecord()},updateRecord:function(record){return this.getForm().updateRecord(record)},getValues:function(asString,dirtyOnly,includeEmptyText,useDataValues){return this.getForm().getValues(asString,dirtyOnly,includeEmptyText,useDataValues)},isDirty:function(){return this.form.isDirty()},isValid:function(){return this.form.isValid()},reset:function(resetRecord){return this.form.reset(resetRecord)},hasInvalidField:function(){return this.form.hasInvalidField()},doDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(options){this.form.load(options)},submit:function(options){this.form.submit(options)},startPolling:function(interval){this.stopPolling();this.pollTask=Ext.util.TaskManager.start({interval:interval,run:this.checkChange,scope:this})},stopPolling:function(){var task=this.pollTask;if(task){Ext.util.TaskManager.stop(task,!0);this.pollTask=null}},checkChange:function(){var fields=this.form.getFields().items,f,fLen=fields.length;for(f=0;f<fLen;f++){fields[f].checkChange()}}})
;
Ext.define('Ext.form.RadioManager',{extend:'Ext.util.MixedCollection',singleton:!0,getByName:function(name,formId){return this.filterBy(function(item){return item.name===name&&item.getFormId()===formId})},getWithValue:function(name,value,formId){return this.filterBy(function(item){return item.name===name&&item.inputValue==value&&item.getFormId()===formId})},getChecked:function(name,formId){return this.findBy(function(item){return item.name===name&&item.checked&&item.getFormId()===formId})}})
;
Ext.define('Ext.form.field.Radio',{extend:'Ext.form.field.Checkbox',alias:['widget.radiofield','widget.radio'],alternateClassName:'Ext.form.Radio',requires:['Ext.form.RadioManager'],isRadio:!0,inputType:'radio',formId:null,modelValue:undefined,modelValueUnchecked:null,initComponent:function(){var me=this;if(me.modelValue===undefined){me.modelValue=me.inputValue}
me.callParent()},getGroupValue:function(){var selected=this.getManager().getChecked(this.name,this.getFormId());return selected?selected.inputValue:null},onRemoved:function(){this.callParent(arguments);this.formId=null},setValue:function(value){var me=this,active;if(Ext.isBoolean(value)){me.callParent(arguments)}else{active=me.getManager().getWithValue(me.name,value,me.getFormId()).getAt(0);if(active){active.setValue(!0)}}
return me},getSubmitValue:function(){return this.checked?this.inputValue:null},onChange:function(newVal,oldVal){var me=this,ownerCt=me.ownerCt,r,rLen,radio,radios;me.callParent(arguments);if(!me.$groupChange){if(newVal){radios=me.getManager().getByName(me.name,me.getFormId()).items;rLen=radios.length;for(r=0;r<rLen;r++){radio=radios[r];if(radio!==me){radio.updateValueFromDom()}}}
if(ownerCt&&ownerCt.isRadioGroup&&ownerCt.simpleValue){ownerCt.checkChange()}}},getManager:function(){return Ext.form.RadioManager}})
;
Ext.define('Ext.form.RadioGroup',{extend:'Ext.form.CheckboxGroup',xtype:'radiogroup',isRadioGroup:!0,requires:['Ext.form.field.Radio'],allowBlank:!0,blankText:'You must select one item in this group',defaultType:'radiofield',local:!1,simpleValue:!1,defaultBindProperty:'value',groupCls:Ext.baseCSSPrefix+'form-radio-group',ariaRole:'radiogroup',initRenderData:function(){var me=this,data,ariaAttr;data=me.callParent();ariaAttr=data.ariaAttributes;if(ariaAttr){ariaAttr['aria-required']=!me.allowBlank;ariaAttr['aria-invalid']=!1}
return data},lookupComponent:function(config){var result=this.callParent([config]);if(this.local){result.formId=this.getId()}
return result},getBoxes:function(query,root){return(root||this).query('[isRadio]'+(query||''))},checkChange:function(){var me=this,value,key;value=me.getValue();key=typeof value==='object'&&Ext.Object.getKeys(value)[0];if(me.simpleValue||(key&&!Ext.isArray(value[key]))){me.callParent(arguments)}},isEqual:function(value1,value2){if(this.simpleValue){return value1===value2}
return this.callParent([value1,value2])},getValue:function(){var me=this,items=me.items.items,i,item,ret;if(me.simpleValue){for(i=items.length;i-->0;){item=items[i];if(item.checked){ret=item.inputValue;break}}}else{ret=me.callParent()}
return ret},setValue:function(value){var items=this.items,cbValue,cmp,formId,radios,i,len,name;Ext.suspendLayouts();if(this.simpleValue){for(i=0,len=items.length;i<len;++i){cmp=items.items[i];cmp.$groupChange=!0;cmp.setValue(cmp.inputValue===value);delete cmp.$groupChange}}else if(Ext.isObject(value)){cmp=items.first();formId=cmp?cmp.getFormId():null;for(name in value){cbValue=value[name];radios=Ext.form.RadioManager.getWithValue(name,cbValue,formId).items;len=radios.length;for(i=0;i<len;++i){radios[i].setValue(!0)}}}
Ext.resumeLayouts(!0);return this},markInvalid:function(errors){var ariaDom=this.ariaEl.dom;this.callParent([errors]);if(ariaDom){ariaDom.setAttribute('aria-invalid',!0)}},clearInvalid:function(){var ariaDom=this.ariaEl.dom;this.callParent();if(ariaDom){ariaDom.setAttribute('aria-invalid',!1)}}},function(){if(Ext.isGecko){this.override({onFocusEnter:function(e){var target=e.toComponent,radios,i,len;if(target.isRadio){radios=target.getManager().getByName(target.name,target.getFormId()).items;for(i=0,len=radios.length;i<len;i++){radios[i].disableTabbing()}}},onFocusLeave:function(e){var target=e.fromComponent,radios,i,len;if(target.isRadio){radios=target.getManager().getByName(target.name,target.getFormId()).items;for(i=0,len=radios.length;i<len;i++){radios[i].enableTabbing()}}}})}})
;
Ext.define('Ext.form.action.DirectAction',{extend:'Ext.Mixin',mixinConfig:{id:'directaction'},resolveMethod:function(type){var me=this,form=me.form,api,fn;api=Ext.direct.Manager.resolveApi(form.api,me);if(!api){Ext.raise("Cannot resolve Ext Direct API method for "+type+" action; form "+form.id+" has no api object defined")}
fn=api[type];if(!fn){Ext.raise("Cannot resolve Ext Direct API method for "+type+" action")}
return fn}})
;
Ext.define('Ext.form.action.DirectLoad',{extend:'Ext.form.action.Load',alternateClassName:'Ext.form.Action.DirectLoad',alias:'formaction.directload',requires:['Ext.direct.Manager'],mixins:['Ext.form.action.DirectAction'],type:'directload',run:function(){var me=this,form=me.form,metadata=me.metadata||form.metadata,timeout=me.timeout||form.timeout,args,fn;fn=me.resolveMethod('load');args=fn.directCfg.method.getArgs({params:me.getParams(),paramOrder:form.paramOrder,paramsAsHash:form.paramsAsHash,options:timeout!=null?{timeout:timeout*1000}:null,metadata:metadata,callback:me.onComplete,scope:me});fn.apply(window,args)},processResponse:function(result){return(this.result=result)},onComplete:function(data){if(data){this.onSuccess(data)}else{this.onFailure(null)}}})
;
Ext.define('Ext.form.action.DirectSubmit',{extend:'Ext.form.action.Submit',alternateClassName:'Ext.form.Action.DirectSubmit',alias:'formaction.directsubmit',requires:['Ext.direct.Manager'],mixins:['Ext.form.action.DirectAction'],type:'directsubmit',doSubmit:function(){var me=this,form=me.form,metadata=me.metadata||form.metadata,timeout=me.timeout||form.timeout,fn,formInfo,args;fn=me.resolveMethod('submit');formInfo=me.buildForm();args=fn.directCfg.method.getArgs({params:formInfo.formEl,options:timeout!=null?{timeout:timeout*1000}:null,metadata:metadata,callback:me.onComplete,scope:me});fn.apply(window,args);me.cleanup(formInfo)},processResponse:function(result){return(this.result=result)},onComplete:function(data){if(data){this.onSuccess(data)}else{this.onFailure(null)}}})
;
Ext.define('Ext.form.field.Picker',{extend:'Ext.form.field.Text',alias:'widget.pickerfield',alternateClassName:'Ext.form.Picker',requires:['Ext.util.KeyNav'],config:{triggers:{picker:{handler:'onTriggerClick',scope:'this',focusOnMousedown:!0}}},renderConfig:{editable:!0},keyMap:{scope:'this',DOWN:'onDownArrow',ESC:'onEsc'},keyMapTarget:'inputEl',isPickerField:!0,matchFieldWidth:!0,pickerAlign:'tl-bl?',openCls:Ext.baseCSSPrefix+'pickerfield-open',isExpanded:!1,applyTriggers:function(triggers){var me=this,picker=triggers.picker;if(!picker.cls){picker.cls=me.triggerCls}
return me.callParent([triggers])},getSubTplData:function(fieldData){var me=this,data,ariaAttr;data=me.callParent([fieldData]);if(!me.ariaStaticRoles[me.ariaRole]){ariaAttr=data.ariaElAttributes;if(ariaAttr){ariaAttr['aria-haspopup']=!0;ariaAttr['aria-expanded']=!1}}
return data},initEvents:function(){this.callParent();if(Ext.isGecko){this.inputEl.dom.setAttribute('autocomplete','off')}},updateEditable:function(editable,oldEditable){var me=this;if(!editable){me.inputEl.on('click',me.onInputElClick,me)}else{me.inputEl.un('click',me.onInputElClick,me)}
me.callParent([editable,oldEditable])},onEsc:function(e){if(Ext.isIE){e.preventDefault()}
if(this.isExpanded){this.collapse();e.stopEvent()}},onDownArrow:function(e){var me=this;if((e.time-me.lastDownArrow)>150){delete me.lastDownArrow}
if(!me.isExpanded){e.stopEvent();me.onTriggerClick(me,me.getPickerTrigger(),e);me.lastDownArrow=e.time}else if(!e.stopped&&(e.time-me.lastDownArrow)<150){delete me.lastDownArrow}},expand:function(){var me=this,bodyEl,picker,doc;if(me.rendered&&!me.isExpanded&&!me.destroyed){bodyEl=me.bodyEl;picker=me.getPicker();doc=Ext.getDoc();picker.setMaxHeight(picker.initialConfig.maxHeight);if(me.matchFieldWidth){picker.setWidth(me.bodyEl.getWidth())}
picker.show();me.isExpanded=!0;me.alignPicker();bodyEl.addCls(me.openCls);if(!me.ariaStaticRoles[me.ariaRole]){if(!me.ariaEl.dom.hasAttribute('aria-owns')){me.ariaEl.dom.setAttribute('aria-owns',picker.listEl?picker.listEl.id:picker.el.id)}
me.ariaEl.dom.setAttribute('aria-expanded',!0)}
me.touchListeners=doc.on({translate:!1,touchstart:me.collapseIf,scope:me,delegated:!1,destroyable:!0});me.scrollListeners=Ext.on({scroll:me.onGlobalScroll,scope:me,destroyable:!0});Ext.on('resize',me.alignPicker,me,{buffer:1});me.fireEvent('expand',me);me.onExpand()}},onExpand:Ext.emptyFn,alignPicker:function(){var me=this,picker;if(me.rendered&&!me.destroyed){picker=me.getPicker();if(picker.isVisible()&&picker.isFloating()){me.doAlign()}}},doAlign:function(){var me=this,picker=me.picker,aboveSfx='-above',newPos,isAbove;picker.el.alignTo(me.triggerWrap,me.pickerAlign,me.pickerOffset);newPos=picker.floatParent?picker.getOffsetsTo(picker.floatParent.getTargetEl()):picker.getXY();picker.x=newPos[0];picker.y=newPos[1];isAbove=picker.el.getY()<me.inputEl.getY();me.bodyEl[isAbove?'addCls':'removeCls'](me.openCls+aboveSfx);picker[isAbove?'addCls':'removeCls'](picker.baseCls+aboveSfx)},collapse:function(){var me=this,openCls=me.openCls,aboveSfx='-above',picker;if(me.isExpanded&&!me.destroyed&&!me.destroying){picker=me.picker;picker.hide();me.isExpanded=!1;me.bodyEl.removeCls([openCls,openCls+aboveSfx]);picker.el.removeCls(picker.baseCls+aboveSfx);if(!me.ariaStaticRoles[me.ariaRole]){me.ariaEl.dom.setAttribute('aria-expanded',!1)}
me.touchListeners.destroy();me.scrollListeners.destroy();Ext.un('resize',me.alignPicker,me);me.fireEvent('collapse',me);me.onCollapse()}},onCollapse:Ext.emptyFn,collapseIf:function(e){var me=this;if(!me.destroyed&&!e.within(me.bodyEl,!1,!0)&&!me.owns(e.target)&&!Ext.fly(e.target).isFocusable()){me.collapse()}},getPicker:function(){var me=this,picker=me.picker;if(!picker){me.creatingPicker=!0;me.picker=picker=me.createPicker();picker.ownerCmp=me;delete me.creatingPicker}
return me.picker},onFocusLeave:function(e){this.collapse();this.callParent([e])},getRefItems:function(){var result=[];if(this.picker){result[0]=this.picker}
return result},getPickerTrigger:function(){return this.triggers&&this.triggers.picker},createPicker:Ext.emptyFn,onInputElClick:function(e){this.onTriggerClick(this,this.getPickerTrigger(),e)},onTriggerClick:function(field,trigger,e){var me=this;if(!me.readOnly&&!me.disabled){if(me.isExpanded){me.collapse()}else{me.expand()}}},doDestroy:function(){var me=this,picker=me.picker;Ext.un('resize',me.alignPicker,me);Ext.destroy(me.keyNav,picker);if(picker){me.picker=picker.pickerField=null}
me.callParent()},privates:{onGlobalScroll:function(scroller){var scrollEl=scroller.getElement();if(!this.picker.owns(scrollEl)&&scrollEl.isAncestor(this.el)){this.collapse()}}}})
;
Ext.define('Ext.selection.Model',{extend:'Ext.mixin.Observable',alternateClassName:'Ext.AbstractSelectionModel',alias:'selection.abstract',requires:['Ext.util.Bag'],mixins:['Ext.util.StoreHolder','Ext.mixin.Factoryable'],factoryConfig:{defaultType:'dataviewmodel'},$configPrefixed:!1,$configStrict:!1,config:{store:null,selected:{}},isSelectionModel:!0,allowDeselect:undefined,toggleOnClick:!0,ordered:!1,selected:null,pruneRemoved:!0,suspendChange:0,ignoreRightMouseSelection:!1,constructor:function(cfg){var me=this;me.modes={SINGLE:!0,SIMPLE:!0,MULTI:!0};me.callParent([cfg]);me.setSelectionMode(me.mode);if(me.selectionMode!=='SINGLE'){me.allowDeselect=!0}},updateStore:function(store,oldStore){this.bindStore(store,!oldStore)},applySelected:function(selected){if(!selected.isBag&&!selected.isCollection){selected=new Ext.util[this.ordered?'Collection':'Bag'](Ext.apply({rootProperty:'data'},selected))}
return selected},getStoreListeners:function(){var me=this;return{add:me.onStoreAdd,clear:me.onStoreClear,remove:me.onStoreRemove,update:me.onStoreUpdate,idchanged:me.onIdChanged,load:me.onStoreLoad,refresh:me.onStoreRefresh,pageadd:me.onPageAdd,pageremove:me.onPageRemove}},onBindStore:function(store,oldStore,initial){if(!initial){this.updateSelectedInstances(this.selected)}},suspendChanges:function(){++this.suspendChange},resumeChanges:function(){if(this.suspendChange){--this.suspendChange}},selectAll:function(suppressEvent){var me=this,selections=me.store.getRange(),start=me.getSelection().length;me.suspendChanges();me.doSelect(selections,!0,suppressEvent);if(!me.destroyed){me.resumeChanges();if(!suppressEvent){me.maybeFireSelectionChange(me.getSelection().length!==start)}}},deselectAll:function(suppressEvent){var me=this,selections=me.getSelection(),selIndexes={},store=me.store,start=selections.length,i,l,rec;for(i=0,l=selections.length;i<l;i++){rec=selections[i];selIndexes[rec.id]=store.indexOf(rec)}
selections=Ext.Array.sort(selections,function(r1,r2){var idx1=selIndexes[r1.id],idx2=selIndexes[r2.id];return idx1<idx2?-1:1});me.suspendChanges();me.doDeselect(selections,suppressEvent);if(!me.destroyed){me.resumeChanges();if(!suppressEvent){me.maybeFireSelectionChange(me.getSelection().length!==start)}}},getSelectionStart:function(){return this.selectionStart},setSelectionStart:function(selection){this.selectionStart=selection},selectWithEvent:function(record,e){var me=this,isSelected=me.isSelected(record),shift=e.shiftKey;switch(me.selectionMode){case 'MULTI':me.selectWithEventMulti(record,e,isSelected);break;case 'SIMPLE':me.selectWithEventSimple(record,e,isSelected);break;case 'SINGLE':me.selectWithEventSingle(record,e,isSelected);break}
if(me.destroyed){return}
if(!shift){if(me.isSelected(record)){me.selectionStart=record}else{me.selectionStart=null}}},vetoSelection:function(e){if(e.stopSelection){return!0}else if(e.type!=='keydown'&&e.button!==0){if(this.ignoreRightMouseSelection||this.isSelected(e.record)){return!0}}else{return e.type==='mousedown'}},onNavigate:function(e){if(!e.record||this.vetoSelection(e.keyEvent)){return}
this.onBeforeNavigate(e);var me=this,keyEvent=e.keyEvent,ctrlKey=keyEvent.ctrlKey||e.ctrlKey,recIdx=e.recordIndex,record=e.record,lastFocused=e.previousRecord,isSelected=me.isSelected(record),from=(me.selectionStart&&me.isSelected(e.previousRecord))?me.selectionStart:(me.selectionStart=e.previousRecord),fromIdx=e.previousRecordIndex,key=keyEvent.getCharCode(),isSpace=key===keyEvent.SPACE,changedRec=e.record!==e.previousRecord,direction;direction=key===keyEvent.UP||key===keyEvent.PAGE_UP||key===keyEvent.HOME||(key===keyEvent.LEFT&&changedRec)?'up':(key===keyEvent.DOWN||key===keyEvent.PAGE_DOWN||key===keyEvent.END||(key===keyEvent.RIGHT&&changedRec)?'down':null);switch(me.selectionMode){case 'MULTI':me.setSelectionStart(e.selectionStart);if(key===keyEvent.A&&ctrlKey){me.selected.beginUpdate();me.selectRange(0,me.store.getCount()-1);me.selected.endUpdate()}else if(isSpace){if(keyEvent.shiftKey){me.selectRange(from,record,ctrlKey)}else{if(isSelected){if(me.allowDeselect){me.doDeselect(record)}}else{me.doSelect(record,ctrlKey)}}}else if(keyEvent.shiftKey&&from){if(direction==='up'&&fromIdx<=recIdx){me.deselectRange(lastFocused,recIdx+1)}else if(direction==='down'&&fromIdx>=recIdx){me.deselectRange(lastFocused,recIdx-1)}else if(from!==record){me.selectRange(from,record,ctrlKey)}
me.lastSelected=record}else if(key){if(!ctrlKey){me.doSelect(record,!1)}}else{me.selectWithEvent(record,keyEvent)}
break;case 'SIMPLE':if(key===keyEvent.A&&ctrlKey){me.selected.beginUpdate();me.selectRange(0,me.store.getCount()-1);me.selected.endUpdate()}else if(isSelected){me.doDeselect(record)}else{me.doSelect(record,!0)}
break;case 'SINGLE':if(!ctrlKey){if(direction){me.doSelect(record,!1)}else if(isSpace||!key){me.selectWithEvent(record,keyEvent)}}
break}
if(!keyEvent.shiftKey&&!me.destroyed&&me.isSelected(record)){me.selectionStart=record;me.selectionStartIdx=recIdx}},selectRange:function(startRow,endRow,keepExisting){var me=this,store=me.store,selected=me.selected.items,result,i,len,toSelect,toDeselect,idx,rec;if(me.isLocked()){return}
result=me.normalizeRowRange(startRow,endRow);startRow=result[0];endRow=result[1];toSelect=[];for(i=startRow;i<=endRow;i++){if(!me.isSelected(store.getAt(i))){toSelect.push(store.getAt(i))}}
if(!keepExisting){toDeselect=[];me.suspendChanges();for(i=0,len=selected.length;i<len;++i){rec=selected[i];idx=store.indexOf(rec);if(idx<startRow||idx>endRow){toDeselect.push(rec)}}
for(i=0,len=toDeselect.length;i<len;++i){me.doDeselect(toDeselect[i]);if(me.destroyed){break}}
if(!me.destroyed){me.resumeChanges()}}
if(!me.destroyed){if(toSelect.length){me.doMultiSelect(toSelect,!0)}else if(toDeselect){me.maybeFireSelectionChange(toDeselect.length>0)}}},deselectRange:function(startRow,endRow){var me=this,store=me.store,result,i,toDeselect,record;if(me.isLocked()){return}
result=me.normalizeRowRange(startRow,endRow);startRow=result[0];endRow=result[1];toDeselect=[];for(i=startRow;i<=endRow;i++){record=store.getAt(i);if(me.isSelected(record)){toDeselect.push(record)}}
if(toDeselect.length){me.doDeselect(toDeselect)}},normalizeRowRange:function(startRow,endRow){var store=this.store,tmp;if(!Ext.isNumber(startRow)){startRow=store.indexOf(startRow)}
startRow=Math.max(0,startRow);if(!Ext.isNumber(endRow)){endRow=store.indexOf(endRow)}
endRow=Math.min(endRow,store.getCount()-1);if(startRow>endRow){tmp=endRow;endRow=startRow;startRow=tmp}
return[startRow,endRow]},select:function(records,keepExisting,suppressEvent){if(Ext.isDefined(records)&&!(Ext.isArray(records)&&!records.length)){this.doSelect(records,keepExisting,suppressEvent)}},deselect:function(records,suppressEvent){this.doDeselect(records,suppressEvent)},doSelect:function(records,keepExisting,suppressEvent){var me=this,record;if(me.locked||records==null){return}
if(typeof records==="number"){record=me.store.getAt(records);if(!record){return}
records=[record]}
if(me.selectionMode==="SINGLE"){if(records.isModel){records=[records]}
if(records.length){me.doSingleSelect(records[0],suppressEvent)}}else{me.doMultiSelect(records,keepExisting,suppressEvent)}},doMultiSelect:function(records,keepExisting,suppressEvent){var me=this,selected=me.selected,change=!1,result,i,len,record,commit;if(me.locked){return}
records=!Ext.isArray(records)?[records]:records;len=records.length;if(!keepExisting&&selected.getCount()>0){result=me.deselectDuringSelect(records,suppressEvent);if(me.destroyed){return}
if(result[0]){me.maybeFireSelectionChange(result[1]>0&&!suppressEvent);return}else{change=result[1]>0}}
commit=function(){if(!selected.getCount()){me.selectionStart=record}
if(!suppressEvent){selected.add(record)}
change=!0};for(i=0;i<len;i++){record=records[i];if(me.isSelected(record)){continue}
me.onSelectChange(record,!0,suppressEvent,commit);if(me.destroyed){return}}
me.lastSelected=record;if(suppressEvent){selected.add(records)}
me.maybeFireSelectionChange(change&&!suppressEvent)},deselectDuringSelect:function(toSelect,suppressEvent){var me=this,selected=me.selected.getRange(),len=selected.length,changed=0,failed=!1,item,i;me.suspendChanges();me.deselectingDuringSelect=!0;for(i=0;i<len;++i){item=selected[i];if(!Ext.Array.contains(toSelect,item)){if(me.doDeselect(item,suppressEvent)){++changed}else{failed=!0}}
if(me.destroyed){failed=!0;changed=0;break}}
me.deselectingDuringSelect=!1;if(!me.destroyed){me.resumeChanges()}
return[failed,changed]},doDeselect:function(records,suppressEvent){var me=this,selected=me.selected,i=0,len,record,attempted=0,accepted=0,commit;if(me.locked||!me.store){return!1}
if(typeof records==="number"){record=me.store.getAt(records);if(!record){return!1}
records=[record]}else if(!Ext.isArray(records)){records=[records]}
commit=function(){++accepted;if(!suppressEvent){selected.remove(record)}
if(record===me.selectionStart){me.selectionStart=null}};len=records.length;me.suspendChanges();for(;i<len;i++){record=records[i];if(me.isSelected(record)){if(me.lastSelected===record){me.lastSelected=selected.last()}
++attempted;me.onSelectChange(record,!1,suppressEvent,commit);if(me.destroyed){return!1}}}
me.resumeChanges();if(suppressEvent){selected.remove(records)}
me.maybeFireSelectionChange(accepted>0&&!suppressEvent);return accepted===attempted},doSingleSelect:function(record,suppressEvent){var me=this,changed=!1,selected=me.selected,commit;if(me.locked){return}
if(me.isSelected(record)){return}
commit=function(){var result;if(selected.getCount()){me.suspendChanges();result=me.deselectDuringSelect([record],suppressEvent);if(me.destroyed){return}
me.resumeChanges();if(result[0]){return!1}}
me.lastSelected=record;if(!selected.getCount()){me.selectionStart=record}
selected.add(record);changed=!0};me.onSelectChange(record,!0,suppressEvent,commit);if(changed&&!me.destroyed){me.maybeFireSelectionChange(!suppressEvent)}},maybeFireSelectionChange:function(fireEvent){var me=this;if(fireEvent&&!me.suspendChange){me.fireEvent('selectionchange',me,me.getSelection())}},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(selMode){selMode=selMode?selMode.toUpperCase():'SINGLE';this.selectionMode=this.modes[selMode]?selMode:'SINGLE'},isLocked:function(){return this.locked},setLocked:function(locked){this.locked=!!locked},isRangeSelected:function(startRow,endRow){var me=this,store=me.store,i,result;result=me.normalizeRowRange(startRow,endRow);startRow=result[0];endRow=result[1];for(i=startRow;i<=endRow;i++){if(!me.isSelected(store.getAt(i))){return!1}}
return!0},isSelected:function(record){record=Ext.isNumber(record)?this.store.getAt(record):record;return this.selected?this.selected.contains(record):!1},hasSelection:function(){var selected=this.getSelected();return!!(selected&&selected.getCount())},refresh:function(){var me=this,store=me.store,toBeRemoved=[],oldSelections=me.getSelection(),len=oldSelections.length,selected=me.getSelected(),change,d,storeData,selection,rec,i;if(!store||!(selected.isCollection||selected.isBag||selected.isRows)||!selected.getCount()){return}
storeData=store.getData();if(storeData.getSource){d=storeData.getSource();if(d){storeData=d}}
me.refreshing=!0;selected.beginUpdate();me.suspendChanges();for(i=0;i<len;i++){selection=oldSelections[i];rec=storeData.get(selection.getId());if(rec){if(rec!==selection){if(selected.replace){selected.replace(rec)}else{selected.add(rec)}}
if(!me.lastSelected){me.lastSelected=rec}}else if(me.pruneRemoved){toBeRemoved.push(selection)}}
if(toBeRemoved.length){change=!0;selected.remove(toBeRemoved)}
me.resumeChanges();if(change){selected.endUpdate()}else{selected.updating--}
me.refreshing=!1;me.maybeFireSelectionChange(change)},clearSelections:function(){var selected=this.getSelected();if(selected){selected.clear()}
this.lastSelected=null},onStoreAdd:Ext.emptyFn,onStoreClear:function(){if((!this.store.isLoading()||this.store.clearing)&&this.hasSelection()){this.clearSelections();this.maybeFireSelectionChange(!0)}},onStoreRemove:function(store,records,index,isMove){var me=this,toDeselect=records,i,len,rec,moveMap;if(me.selectionStart&&Ext.Array.contains(records,me.selectionStart)){me.selectionStart=null}
if(isMove||me.locked||!me.pruneRemoved){return}
moveMap=store.isMoving(null,!0);if(moveMap){toDeselect=null;for(i=0,len=records.length;i<len;++i){rec=records[i];if(!moveMap[rec.id]){(toDeselect||(toDeselect=[])).push(rec)}}}
if(toDeselect){me.deselect(toDeselect)}},onPageRemove:function(pageMap,pageNumber,records){this.onStoreRemove(this.store,records)},onPageAdd:function(pageMap,pageNumber,records){var len=records.length,i,record;for(i=0;i<len;i++){record=records[i];if(this.selected.get(record.id)){this.selected.replace(record)}}},getCount:function(){return this.selected.getCount()},onUpdate:Ext.emptyFn,destroy:function(){var me=this;me.clearSelections();me.bindStore(null);me.selected=Ext.destroy(me.selected);me.callParent()},onStoreUpdate:Ext.emptyFn,onIdChanged:function(store,rec,oldId,newId){this.selected.updateKey(rec,oldId)},onStoreRefresh:function(){this.updateSelectedInstances(this.selected)},updateSelectedInstances:function(selected){var me=this,store=me.getStore(),lastSelected=me.lastSelected,removeCount=0,prune=me.pruneRemovedOnRefresh(),items,length,i,selectedRec,rec,lastSelectedChanged;if(store&&store.isBufferedStore){return}
items=selected.getRange();length=items.length;if(lastSelected){me.lastSelected=store.getById(lastSelected.id);lastSelectedChanged=me.lastSelected!==lastSelected}
me.refreshing=!0;if(store){for(i=0;i<length;++i){selectedRec=items[i];rec=store.getById(selectedRec.id);if(rec){if(rec!==selectedRec){selected.add(rec)}}else if(prune){selected.remove(selectedRec);++removeCount}}}else{removeCount=selected.getCount();selected.removeAll()}
me.refreshing=!1;me.maybeFireSelectionChange(removeCount>0);if(lastSelectedChanged){me.fireEvent('lastselectedchanged',me,me.getSelection(),lastSelected)}},pruneRemovedOnRefresh:function(){return this.pruneRemoved},onStoreLoad:Ext.emptyFn,onSelectChange:function(record,isSelected,suppressEvent,commitFn){var me=this,eventName=isSelected?'select':'deselect';if((suppressEvent||me.fireEvent('before'+eventName,me,record))!==!1&&commitFn()!==!1){if(!suppressEvent&&!me.destroyed){me.fireEvent(eventName,me,record)}}},onEditorKey:Ext.emptyFn,beforeViewRender:function(view){Ext.Array.include(this.views||(this.views=[]),view)},onHeaderClick:Ext.emptyFn,resolveListenerScope:function(defaultScope){var view=this.view,scope;if(view){scope=view.resolveSatelliteListenerScope(this,defaultScope)}
return scope||this.callParent([defaultScope])},bindComponent:Ext.emptyFn,privates:{onBeforeNavigate:Ext.privateFn,getLastSelected:function(){return this.lastSelected},selectWithEventMulti:function(record,e,isSelected){var me=this,shift=e.shiftKey,ctrl=e.ctrlKey,start=shift?(me.getSelectionStart()):null,selected=me.getSelection(),len=selected.length,toDeselect,i,item;if(shift&&start){me.selectRange(start,record,ctrl)}else if(ctrl&&isSelected){if(me.allowDeselect){me.doDeselect(record,!1)}}else if(ctrl){me.doSelect(record,!0,!1)}else if(isSelected&&!shift&&!ctrl&&len>1){if(me.allowDeselect){toDeselect=[];for(i=0;i<len;++i){item=selected[i];if(item!==record){toDeselect.push(item)}}
me.doDeselect(toDeselect)}}else if(!isSelected){me.doSelect(record,!1)}},selectWithEventSimple:function(record,e,isSelected){if(isSelected){this.doDeselect(record)}else{this.doSelect(record,!0)}},selectWithEventSingle:function(record,e,isSelected){var me=this,allowDeselect=me.allowDeselect;if(allowDeselect&&!e.ctrlKey){allowDeselect=me.toggleOnClick}
if(allowDeselect&&isSelected){me.doDeselect(record)}else{me.doSelect(record,!1)}}}})
;
Ext.define('Ext.selection.DataViewModel',{extend:'Ext.selection.Model',alias:'selection.dataviewmodel',requires:['Ext.util.KeyNav'],deselectOnContainerClick:!0,bindComponent:function(view){var me=this,viewListeners;if(me.view!==view){if(me.view){me.navigationModel=null;Ext.destroy(me.viewListeners,me.navigationListeners)}
me.view=view;if(view){viewListeners=me.getViewListeners();viewListeners.scope=me;viewListeners.destroyable=!0;me.navigationModel=view.getNavigationModel();me.viewListeners=view.on(viewListeners);me.navigationListeners=me.navigationModel.on({navigate:me.onNavigate,scope:me,destroyable:!0})}}},getViewListeners:function(){var me=this,eventListeners={};eventListeners[me.view.triggerCtEvent]=me.onContainerClick;return eventListeners},onUpdate:function(record){var view=this.view;if(view&&this.isSelected(record)){view.onItemSelect(record)}},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},onSelectChange:function(record,isSelected,suppressEvent,commitFn){var me=this,view=me.view,eventName=isSelected?'select':'deselect',recordIndex=me.store.indexOf(record);if((suppressEvent||me.fireEvent('before'+eventName,me,record,recordIndex))!==!1&&commitFn()!==!1){if(view&&!view.destroyed){if(isSelected){view.onItemSelect(record)}else{view.onItemDeselect(record)}}
if(!suppressEvent&&!me.destroyed){me.fireEvent(eventName,me,record,recordIndex)}}},destroy:function(){this.bindComponent();Ext.destroy(this.keyNav);this.callParent()}})
;
Ext.define('Ext.view.NavigationModel',{alias:'view.navigation.default',mixins:['Ext.util.Observable','Ext.mixin.Factoryable','Ext.util.StoreHolder'],config:{store:null},focusCls:Ext.baseCSSPrefix+'view-item-focused',constructor:function(){this.mixins.observable.constructor.call(this)},bindComponent:function(view){if(this.view!==view){this.view=view;this.bindView(view)}},bindView:function(view){var me=this,dataSource=view.dataSource,listeners;me.initKeyNav(view);if(!dataSource.isEmptyStore){me.setStore(dataSource)}
listeners=me.getViewListeners();listeners.destroyable=!0;me.viewListeners=me.viewListeners||[];me.viewListeners.push(view.on(listeners))},updateStore:function(store){this.mixins.storeholder.bindStore.apply(this,[store])},getViewListeners:function(){var me=this;return{containermousedown:me.onContainerMouseDown,itemmousedown:me.onItemMouseDown,itemclick:me.onItemClick,itemcontextmenu:me.onItemMouseDown,scope:me}},initKeyNav:function(view){var me=this;me.keyNav=new Ext.util.KeyNav({target:view,ignoreInputFields:!0,eventName:'itemkeydown',defaultEventAction:'stopEvent',processEvent:me.processViewEvent,up:me.onKeyUp,down:me.onKeyDown,right:me.onKeyRight,left:me.onKeyLeft,pageDown:me.onKeyPageDown,pageUp:me.onKeyPageUp,home:me.onKeyHome,end:me.onKeyEnd,space:me.onKeySpace,enter:me.onKeyEnter,A:{ctrl:!0,handler:me.onSelectAllKeyPress},scope:me})},processViewEvent:function(view,record,node,index,event){return event},addKeyBindings:function(binding){this.keyNav.addBindings(binding)},enable:function(){this.keyNav.enable();this.disabled=!1},disable:function(){this.keyNav.disable();this.disabled=!0},onContainerMouseDown:function(view,mousedownEvent){if(Ext.scrollbar.width()){if(!view.el.getClientRegion().contains(mousedownEvent.getPoint())){mousedownEvent.preventDefault();view.lastFocused='scrollbar'}}},onItemMouseDown:function(view,record,item,index,mousedownEvent){if(mousedownEvent.pointerType!=='touch'){this.setPosition(index)}},onItemClick:function(view,record,item,index,clickEvent){if(this.record===record){this.fireNavigateEvent(clickEvent)}else{this.setPosition(index,clickEvent)}},setPosition:function(recordIndex,keyEvent,suppressEvent,preventNavigation,preventFocus){var me=this,view=me.view,selModel=view.getSelectionModel(),dataSource=view.dataSource,newRecord,newRecordIndex;if(recordIndex==null||!view.all.getCount()){me.record=me.recordIndex=null}else{if(typeof recordIndex==='number'){newRecordIndex=Math.max(Math.min(recordIndex,dataSource.getCount()-1),0);newRecord=dataSource.getAt(recordIndex)}else if(recordIndex.isEntity){newRecord=dataSource.getById(recordIndex.id);newRecordIndex=dataSource.indexOf(newRecord);if(newRecordIndex===-1){newRecord=dataSource.getAt(0);newRecordIndex=0}}else if(recordIndex.tagName){newRecord=view.getRecord(recordIndex);newRecordIndex=dataSource.indexOf(newRecord)}else{newRecord=newRecordIndex=null}}
if(newRecord===me.record){me.recordIndex=newRecordIndex;return me.focusPosition(newRecordIndex)}
if(me.item){me.item.removeCls(me.focusCls)}
me.previousRecordIndex=me.recordIndex;me.previousRecord=me.record;me.previousItem=me.item;me.recordIndex=newRecordIndex;me.record=newRecord;preventNavigation=preventNavigation||me.record===me.lastFocused;if(newRecord){me.focusPosition(me.recordIndex)}else if(!preventFocus){me.item=null}
if(!suppressEvent){selModel.fireEvent('focuschange',selModel,me.previousRecord,me.record)}
if(!preventNavigation&&keyEvent){me.fireNavigateEvent(keyEvent)}},focusPosition:function(recordIndex){var me=this;if(recordIndex!=null&&recordIndex!==-1){if(recordIndex.isEntity){recordIndex=me.view.dataSource.indexOf(recordIndex)}
me.item=me.view.all.item(recordIndex);if(me.item){me.lastFocused=me.record;me.lastFocusedIndex=me.recordIndex;me.focusItem(me.item)}else{me.record=null}}else{me.item=null}},focusItem:function(item){item.addCls(this.focusCls);item.focus()},getPosition:function(){return this.record?this.recordIndex:null},getRecordIndex:function(){return this.recordIndex},getItem:function(){return this.item},getRecord:function(){return this.record},getLastFocused:function(){if(this.view.dataSource.indexOf(this.lastFocused)===-1){return null}
return this.lastFocused},onKeyUp:function(keyEvent){var newPosition=this.recordIndex-1;if(newPosition<0){newPosition=this.view.all.getCount()-1}
this.setPosition(newPosition,keyEvent)},onKeyDown:function(keyEvent){var newPosition=this.recordIndex+1;if(newPosition>this.view.all.getCount()-1){newPosition=0}
this.setPosition(newPosition,keyEvent)},onKeyRight:function(keyEvent){var newPosition=this.recordIndex+1;if(newPosition>this.view.all.getCount()-1){newPosition=0}
this.setPosition(newPosition,keyEvent)},onKeyLeft:function(keyEvent){var newPosition=this.recordIndex-1;if(newPosition<0){newPosition=this.view.all.getCount()-1}
this.setPosition(newPosition,keyEvent)},onKeyPageDown:Ext.emptyFn,onKeyPageUp:Ext.emptyFn,onKeyHome:function(keyEvent){this.setPosition(0,keyEvent)},onKeyEnd:function(keyEvent){this.setPosition(this.view.all.getCount()-1,keyEvent)},onKeySpace:function(keyEvent){this.fireNavigateEvent(keyEvent)},onKeyEnter:function(keyEvent){keyEvent.stopEvent();keyEvent.view.fireEvent('itemclick',keyEvent.view,keyEvent.record,keyEvent.item,keyEvent.recordIndex,keyEvent)},onSelectAllKeyPress:function(keyEvent){this.fireNavigateEvent(keyEvent)},fireNavigateEvent:function(keyEvent){var me=this;me.fireEvent('navigate',{navigationModel:me,keyEvent:keyEvent,previousRecordIndex:me.previousRecordIndex,previousRecord:me.previousRecord,previousItem:me.previousItem,recordIndex:me.recordIndex,record:me.record,item:me.item})},destroy:function(){this.setStore(null);Ext.destroy(this.viewListeners,this.keyNav);this.callParent()}})
;
Ext.define('Ext.rtl.view.NavigationModel',{override:'Ext.view.NavigationModel',initKeyNav:function(view){var me=this,proto=me.self.prototype;if(view.getInherited().rtl){me.onKeyLeft=proto.onKeyRight;me.onKeyRight=proto.onKeyLeft}
me.callParent([view])}})
;
Ext.define('Ext.view.AbstractView',{extend:'Ext.Component',requires:['Ext.LoadMask','Ext.CompositeElementLite','Ext.selection.DataViewModel','Ext.view.NavigationModel','Ext.util.CSS'],mixins:['Ext.util.StoreHolder'],isDataView:!0,inheritableStatics:{getRecord:function(node){return this.getBoundView(node).getRecord(node)},getBoundView:function(node){return Ext.getCmp(node.getAttribute('data-boundView'))}},defaultBindProperty:'store',renderBuffer:new Ext.dom.Fly(document.createElement('div')),statics:{updateDelay:Ext.platformTags.desktop?200:1000,queueRecordChange:function(view,store,record,operation,modifiedFieldNames){var me=this,changeQueue=me.changeQueue||(me.changeQueue={}),recId=record.internalId,recChange,updated,len,i,fieldName,value,checkForReversion;recChange=changeQueue[recId]||(changeQueue[recId]={operation:operation,record:record,data:{},views:[]});updated=recChange.data;Ext.Array.include(recChange.views,view);if(modifiedFieldNames&&(len=modifiedFieldNames.length)){for(i=0;i<len;i++){fieldName=modifiedFieldNames[i];value=record.data[fieldName];if(updated.hasOwnProperty(fieldName)){if(record.isEqual(updated[fieldName],value)){delete updated[fieldName];checkForReversion=!0}}else{updated[fieldName]=value}}
if(checkForReversion&&!Ext.Object.getKeys(updated).length){delete changeQueue[recId]}}else{Ext.apply(updated,record.data)}
if(!me.flushQueueTask){me.flushQueueTask=new Ext.util.DelayedTask(Ext.global.requestAnimationFrame?Ext.Function.createAnimationFrame(me.flushChangeQueue,me):me.flushChangeQueue.bind(me),me,null,!1)}
if(!me.flushTimer){me.flushTimer=me.flushQueueTask.delay(Ext.view.AbstractView.updateDelay)}},flushChangeQueue:function(){var me=this,dirtyViews,len,changeQueue,recChange,recId,i,view;if(Ext.isScrolling){return me.flushTimer=me.flushQueueTask.delay(1)}
me.flushTimer=null;changeQueue=me.changeQueue;me.changeQueue={};for(recId in changeQueue){recChange=changeQueue[recId];dirtyViews=recChange.views;len=dirtyViews.length;for(i=0;i<len;i++){view=dirtyViews[i];if(!view.destroyed){view.handleUpdate(view.dataSource,recChange.record,recChange.operation,Ext.Object.getKeys(recChange.data))}}}}},config:{store:'ext-empty-store',navigationModel:{type:'default'},selectionModel:{type:'dataviewmodel'}},publishes:['selection'],twoWayBindable:['selection'],selection:null,throttledUpdate:!1,deferInitialRefresh:!1,itemCls:Ext.baseCSSPrefix+'dataview-item',loadingText:'Loading...',loadMask:!0,loadingUseMsg:!0,selectedItemCls:Ext.baseCSSPrefix+'item-selected',emptyText:"",deferEmptyText:!0,trackOver:!1,blockRefresh:!1,preserveScrollOnRefresh:!1,preserveScrollOnReload:!1,autoDestroyBoundStore:!0,ariaRole:'listbox',itemAriaRole:'option',last:!1,focusable:!0,tabIndex:0,triggerEvent:'itemclick',triggerCtEvent:'containerclick',refreshNeeded:!0,updateSuspendCounter:0,addCmpEvents:Ext.emptyFn,constructor:function(config){if(config&&config.selModel){config.selectionModel=config.selModel}
this.callParent([config])},initComponent:function(){var me=this,isDef=Ext.isDefined,itemTpl=me.itemTpl,memberFn={},selection=me.selection,store;if(selection){me.selection=null;me.setSelection(selection)}
if(itemTpl){if(Ext.isArray(itemTpl)){if(typeof itemTpl[itemTpl.length-1]!=='string'){itemTpl=itemTpl.slice(0);memberFn=itemTpl.pop()}
itemTpl=itemTpl.join('')}else if(Ext.isObject(itemTpl)){memberFn=Ext.apply(memberFn,itemTpl.initialConfig);itemTpl=itemTpl.html}
if(!me.itemSelector){me.itemSelector='.'+me.itemCls}
if(memberFn.fn){memberFn.baseFn=memberFn.fn;delete memberFn.fn;itemTpl="{%this.baseFn(out, values, parent, xindex, xcount, xkey)%}"}
itemTpl=Ext.String.format('<tpl for="."><div class="{0}" role="{2}">{1}</div></tpl>',me.itemCls,itemTpl,me.itemAriaRole);me.tpl=new Ext.XTemplate(itemTpl,memberFn)}
if(!isDef(me.tpl)||!isDef(me.itemSelector)){Ext.raise({sourceClass:'Ext.view.View',tpl:me.tpl,itemSelector:me.itemSelector,msg:"DataView requires both tpl and itemSelector configurations to be defined."})}
me.callParent();me.tpl=me.lookupTpl('tpl');if(isDef(me.overCls)||isDef(me.overClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.view.View: Using the deprecated overCls or overClass configuration. '+'Use overItemCls instead.')}
me.overItemCls=me.overCls||me.overClass;delete me.overCls;delete me.overClass}
if(isDef(me.selectedCls)||isDef(me.selectedClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.view.View: Using the deprecated selectedCls or selectedClass '+'configuration. Use selectedItemCls instead.')}
me.selectedItemCls=me.selectedCls||me.selectedClass;delete me.selectedCls;delete me.selectedClass}
if(me.overItemCls){me.trackOver=!0}
me.addCmpEvents();store=me.store=Ext.data.StoreManager.lookup(me.store||'ext-empty-store');if(!me.dataSource){me.dataSource=store}
me.bindStore(store,!0);me.getNavigationModel().bindComponent(this);if(!me.all){me.all=new Ext.CompositeElementLite()}
me.scrollState={top:0,left:0};me.savedTabIndexAttribute='data-savedtabindex-'+me.id},getElConfig:function(){var result=this.mixins.renderable.getElConfig.call(this);if(this.focusable){result.tabIndex=0}
return result},onRender:function(parentNode,containerIdx){var mask=this.loadMask;this.callParent([parentNode,containerIdx]);if(mask){this.createMask(mask)}},beforeLayout:function(){var me=this;me.callParent();if(me.refreshNeeded&&!me.pendingRefresh){if(me.refreshCounter){me.refreshView()}else{me.doFirstRefresh(me.dataSource)}}},onMaskBeforeShow:function(){var me=this,loadingHeight=me.loadingHeight;if(loadingHeight&&loadingHeight>me.getHeight()){me.hasLoadingHeight=!0;me.oldMinHeight=me.minHeight;me.minHeight=loadingHeight;me.updateLayout()}},onMaskHide:function(){var me=this;if(!me.destroying&&me.hasLoadingHeight){me.minHeight=me.oldMinHeight;me.updateLayout();delete me.hasLoadingHeight}},beforeRender:function(){this.callParent();this.getSelectionModel().beforeViewRender(this)},afterRender:function(){this.callParent();if(this.focusable){this.focusEl=this.el}},getRefItems:function(){var mask=this.loadMask,result=[];if(mask&&mask.isComponent){result.push(mask)}
return result},getSelection:function(){return this.getSelectionModel().getSelection()},setSelection:function(selection){var current=this.selection;if(selection!==current){this.selection=selection;this.updateSelection(selection,current)}},updateSelection:function(selection){var me=this,sm;if(!me.ignoreNextSelection){me.ignoreNextSelection=!0;sm=me.getSelectionModel();if(selection){sm.select(selection)}else{sm.deselectAll()}
me.ignoreNextSelection=!1}
me.publishState('selection',selection)},updateBindSelection:function(selModel,selection){var me=this,selected=null;if(!me.ignoreNextSelection){me.ignoreNextSelection=!0;if(selection.length){selected=selModel.getLastSelected();me.hasHadSelection=!0}
if(me.hasHadSelection){me.setSelection(selected)}
me.ignoreNextSelection=!1}},applySelectionModel:function(selModel,oldSelModel){var me=this,grid=me.grid,mode,ariaAttr,ariaDom;if(oldSelModel){if(!oldSelModel.destroyed){oldSelModel.un({scope:me,selectionchange:me.updateBindSelection,lastselectedchanged:me.updateBindSelection})}
Ext.destroy(me.selModelRelayer);selModel=Ext.Factory.selection(selModel)}else{if(selModel&&selModel.isSelectionModel){selModel.locked=me.disableSelection}else{if(me.simpleSelect){mode='SIMPLE'}else if(me.multiSelect){mode='MULTI'}else{mode='SINGLE'}
if(typeof selModel==='string'){selModel={type:selModel}}
selModel=Ext.Factory.selection(Ext.apply({allowDeselect:me.allowDeselect||me.multiSelect,mode:mode,locked:me.disableSelection},selModel))}}
if(selModel.mode!=='SINGLE'){ariaDom=(grid||me).ariaEl.dom;if(ariaDom){ariaDom.setAttribute('aria-multiselectable',!0)}else if(!grid){ariaAttr=me.ariaRenderAttributes||(me.ariaRenderAttributes={});ariaAttr['aria-multiselectable']=!0}}
me.selModelRelayer=me.relayEvents(selModel,['selectionchange','beforeselect','beforedeselect','select','deselect','focuschange']);selModel.on({scope:me,lastselectedchanged:me.updateBindSelection,selectionchange:me.updateBindSelection});return selModel},updateSelectionModel:function(selectionModel){this.selModel=selectionModel},applyNavigationModel:function(navigationModel){return Ext.Factory.viewNavigation(navigationModel)},onFocusEnter:function(e){var me=this,navigationModel=me.getNavigationModel(),focusPosition=me.lastFocused;me.lastFocused=null;if(focusPosition==='scrollbar'){e.relatedTarget.focus();return}
me.toggleChildrenTabbability(!1);if(!me.itemFocused&&me.all.getCount()){if(e.event.getTarget()===me.tabGuardEl){focusPosition=me.all.getCount()-1}else{focusPosition=navigationModel.getLastFocused()}
navigationModel.setPosition(focusPosition||0,e.event,null,!focusPosition);me.itemFocused=navigationModel.getPosition()!=null}
if(me.itemFocused){me.el.dom.setAttribute('tabIndex',-1);if(me.tabGuardEl){me.tabGuardEl.setAttribute('tabIndex',-1)}}
me.callParent([e])},onFocusLeave:function(e){var me=this;if(me.itemFocused&&!me.refreshing){me.getNavigationModel().setPosition(null,e.event,null,!0);me.itemFocused=!1;me.el.dom.setAttribute('tabIndex',0);if(me.tabGuardEl){me.tabGuardEl.setAttribute('tabIndex',0)}}
me.callParent([e])},cancelFocusTask:function(){var task=this.getFocusTask();if(task){task.cancel()}},onRemoved:function(isDestroying){this.callParent([isDestroying]);if(!isDestroying){this.onFocusLeave({})}},refresh:function(){var me=this,items=me.all,prevItemCount=items.getCount(),refreshCounter=me.refreshCounter,targetEl,records,selModel=me.getSelectionModel(),restoreFocus,scroller=refreshCounter&&items.getCount()&&me.preserveScrollOnRefresh&&me.getScrollable(),bufferedRenderer=me.bufferedRenderer,scrollPos;if(!me.rendered||me.destroyed){return}
if(!me.hasListeners.beforerefresh||me.fireEvent('beforerefresh',me)!==!1){me.refreshing=!0;restoreFocus=me.saveFocusState();targetEl=me.getTargetEl();records=me.getViewRange();if(scroller){scrollPos=scroller.getPosition();if(!(scrollPos.x||scrollPos.y)){scrollPos=null}}
if(refreshCounter||me.emptyEl){me.clearViewEl()}
if(refreshCounter){me.refreshCounter++}else{me.refreshCounter=1}
me.tpl.append(targetEl,me.collectData(records,items.startIndex||0));if(records.length<1){me.addEmptyText();items.clear()}else{me.collectNodes(targetEl.dom);me.updateIndexes(0)}
restoreFocus();if(me.refreshSelmodelOnRefresh!==!1){selModel.refresh()}
me.refreshNeeded=!1;me.refreshSize(items.getCount()!==prevItemCount);me.fireItemMutationEvent('refresh',me,records);if(scroller){scroller.scrollTo(scrollPos)}
if(!me.viewReady){me.viewReady=!0;me.fireEvent('viewready',me)}
me.refreshing=!1;if(bufferedRenderer){bufferedRenderer.refreshSize()}
me.cleanupData()}
if(!me.tabGuardEl){me.tabGuardEl=me.el.createChild({cls:Ext.baseCSSPrefix+'tab-guard '+Ext.baseCSSPrefix+'tab-guard-after',tabIndex:"0"},null,!0)}},addEmptyText:function(){var me=this,store=me.getStore();if(me.emptyText&&!store.isLoading()&&(!me.deferEmptyText||me.refreshCounter>1||store.isLoaded())){if(!me.emptyEl){me.emptyEl=Ext.core.DomHelper.insertHtml('beforeEnd',me.getTargetEl().dom,me.emptyText)}else{Ext.fly(me.emptyEl).setHtml(me.emptyText)}}},getEmptyText:function(){return this.emptyText},setEmptyText:function(emptyText){var me=this;if(me.emptyText!==emptyText){me.emptyText=emptyText;me.refresh()}
return me},getViewRange:function(){return this.dataSource.getRange()},refreshSize:function(forceLayout){var me=this,sizeModel=me.getSizeModel();if(sizeModel.height.shrinkWrap||sizeModel.width.shrinkWrap||forceLayout){me.updateLayout()}},afterFirstLayout:function(width,height){var me=this,scroller=me.getScrollable();if(scroller){me.viewScrollListeners=scroller.on({scroll:me.onViewScroll,scrollend:me.onViewScrollEnd,scope:me,onFrame:!!Ext.global.requestAnimationFrame,destroyable:!0})}
me.callParent([width,height])},clearViewEl:function(){var me=this,targetEl=me.getTargetEl(),all=me.all,store=me.getStore(),nodeContainerIsTarget=me.getNodeContainer()===targetEl,i,removedItems,removedRecs;removedItems=all.slice();removedRecs=[];for(i=all.startIndex;i<=all.endIndex;i++){removedRecs.push(store.getByInternalId(all.item(i,!0).getAttribute('data-recordId')))}
me.fireItemMutationEvent('itemremove',removedRecs,all.startIndex||0,removedItems,me);me.clearEmptyEl();me.all.clear(!nodeContainerIsTarget);targetEl=nodeContainerIsTarget?targetEl.dom:me.getNodeContainer();if(targetEl){targetEl.innerHTML=''}},clearEmptyEl:function(){var emptyEl=this.emptyEl;if(emptyEl){Ext.removeNode(emptyEl)}
this.emptyEl=null},onViewScroll:function(scroller,x,y){if(!this.destroyed){this.fireEvent('scroll',this,x,y)}},onViewScrollEnd:function(scroller,x,y){if(!this.destroyed){this.fireEvent('scrollend',this,x,y)}},saveScrollState:function(){var me=this,state=me.scrollState;if(me.rendered){state.left=me.getScrollX();state.top=me.getScrollY()}},restoreScrollState:function(){var me=this,state=me.scrollState;if(me.rendered){me.setScrollX(state.left);me.setScrollY(state.top)}},prepareData:function(data,recordIndex,record){var associatedData,attr,hasCopied;if(record){associatedData=record.getAssociatedData();for(attr in associatedData){if(associatedData.hasOwnProperty(attr)){if(!hasCopied){data=Ext.Object.chain(data);hasCopied=!0}
data[attr]=associatedData[attr]}}}
return data},collectData:function(records,startIndex){var data=[],i=0,len=records.length,record;for(;i<len;i++){record=records[i];data[i]=this.prepareData(record.data,startIndex+i,record)}
return data},cleanupData:Ext.emptyFn,bufferRender:function(records,index){var me=this,div=me.renderBuffer,result=document.createDocumentFragment(),nodes,len,i;me.tpl.overwrite(div,me.collectData(records,index));nodes=div.query(me.getItemSelector());for(i=0,len=nodes.length;i<len;i++){result.appendChild(nodes[i])}
return{fragment:result,children:nodes}},nodeContainerSelector:null,setItemsDraggable:function(draggable){var me=this,selector='#'+me.id+' '+me.getItemSelector(),styleSheet=me.viewStyleSheet;if(draggable){if(!styleSheet){styleSheet=Ext.view.AbstractView.prototype.viewStyleSheet=Ext.util.CSS.createStyleSheet('','AbstractView')}
Ext.util.CSS.createRule(styleSheet,selector,'touch-action: pinch-zoom double-tap-zoom;'+'-ms-touch-action: pinch-zoom double-tap-zoom;-webkit-user-drag: none;')}else if(styleSheet){Ext.util.CSS.deleteRule(selector)}},getNodeContainerSelector:function(){return this.nodeContainerSelector},onUpdate:function(store,record,operation,modifiedFieldNames,details){var me=this,isFiltered=details&&details.filtered;if(!isFiltered&&me.getNode(record)){if(me.throttledUpdate){me.statics().queueRecordChange(me,store,record,operation,modifiedFieldNames)}else{me.handleUpdate(store,record,operation,modifiedFieldNames,details)}}},handleUpdate:function(store,record){var me=this,selModel=me.getSelectionModel(),index,node;if(me.viewReady&&!me.refreshNeeded){index=me.dataSource.indexOf(record);if(index>-1){if(me.getNode(record)){node=me.bufferRender([record],index).children[0];me.all.replaceElement(index,node,!0);me.updateIndexes(index,index);selModel.onUpdate(record);me.refreshSizePending=!0;if(selModel.isSelected(record)){me.onItemSelect(record)}
if(me.hasListeners.itemupdate){me.fireEvent('itemupdate',record,index,node,me)}
return node}}}},onReplace:function(store,startIndex,oldRecords,newRecords){var me=this,all=me.all,scroller=me.getScrollable(),yPos=scroller&&scroller.getPosition().y,selModel=me.getSelectionModel(),origStart=startIndex,result,item,fragment,children,oldItems,endIndex,restoreFocus;if(me.rendered){result=me.bufferRender(newRecords,startIndex,!0);fragment=result.fragment;children=result.children;item=all.item(startIndex);if(item){all.item(startIndex).insertSibling(fragment,'before',!0)}else{me.appendNodes(fragment)}
all.insert(startIndex,children);if(oldRecords.length){restoreFocus=me.saveFocusState()}
startIndex+=newRecords.length;endIndex=startIndex+oldRecords.length-1;oldItems=all.removeRange(startIndex,endIndex,!0);if(scroller){scroller.scrollTo(null,yPos)}
if(me.refreshSelmodelOnRefresh!==!1){selModel.refresh()}
me.updateIndexes(startIndex);me.fireItemMutationEvent('itemremove',oldRecords,origStart,oldItems,me);me.fireItemMutationEvent('itemadd',newRecords,origStart,children,me);restoreFocus();me.refreshSize()}},onAdd:function(store,records,index){var me=this,nodes,selModel=me.getSelectionModel();if(me.rendered&&!me.refreshNeeded){if(me.all.getCount()===0){me.refresh();nodes=me.all.slice()}else{nodes=me.doAdd(records,index);if(me.refreshSelmodelOnRefresh!==!1){selModel.refresh()}
me.updateIndexes(index);me.refreshSizePending=!0}
me.fireItemMutationEvent('itemadd',records,index,nodes,me)}},appendNodes:function(nodes){var all=this.all,count=all.getCount();if(this.nodeContainerSelector){this.getNodeContainer().appendChild(nodes)}else{all.item(count-1).insertSibling(nodes,'after')}},doAdd:function(records,index){var me=this,result=me.bufferRender(records,index,!0),fragment=result.fragment,children=result.children,all=me.all,count=all.getCount(),firstRowIndex=all.startIndex||0,lastRowIndex=all.endIndex||count-1;if(count===0||index>lastRowIndex){me.appendNodes(fragment)}else if(index<=firstRowIndex){all.item(firstRowIndex).insertSibling(fragment,'before',!0)}else{all.item(index).insertSibling(children,'before',!0)}
all.insert(index,children);return children},onRemove:function(store,records,index){var me=this,rows=me.all,currIdx,i,record,nodes,node,restoreFocus;if(me.rendered&&!me.refreshNeeded&&rows.getCount()){if(me.dataSource.getCount()===0){me.refresh()}else{restoreFocus=me.saveFocusState();nodes=[];for(i=records.length-1;i>=0;--i){record=records[i];currIdx=index+i;if(nodes){node=rows.item(currIdx);nodes[i]=node?node.dom:undefined}
if(rows.item(currIdx)){me.doRemove(record,currIdx)}}
me.fireItemMutationEvent('itemremove',records,index,nodes,me);restoreFocus();me.updateIndexes(index)}
me.refreshSizePending=!0}},doRemove:function(record,index){this.all.removeElement(index,!0)},eventLifecycleMap:{refresh:'onViewRefresh',itemremove:'onItemRemove',itemadd:'onItemAdd'},fireItemMutationEvent:function(eventName){var me=this,ownerGrid=me.ownerGrid,vm;Ext.suspendLayouts();if(ownerGrid){if(eventName!=='refresh'){vm=me.lookupViewModel()}
ownerGrid[me.eventLifecycleMap[eventName]].apply(ownerGrid,Ext.Array.slice(arguments,1))}
me.fireEvent.apply(me,arguments);if(vm){vm.notify()}
Ext.resumeLayouts(!0)},saveFocusState:function(){var me=this,store=me.dataSource||me.store,navModel=me.getNavigationModel(),lastFocusedIndex=navModel.recordIndex,lastFocusedRec=navModel.record,containsFocus=me.el.contains(Ext.Element.getActiveElement());if(lastFocusedRec){if(containsFocus){me.el.dom.focus()}
return function(){if(store.getCount()){lastFocusedIndex=Math.min(lastFocusedIndex,me.all.getCount()-1);navModel.setPosition(store.contains(lastFocusedRec)?lastFocusedRec:lastFocusedIndex,null,null,!0,!containsFocus)}}}
return Ext.emptyFn},refreshNode:function(record){if(Ext.isNumber(record)){record=this.store.getAt(record)}
this.onUpdate(this.dataSource,record)},updateIndexes:function(startIndex,endIndex){var me=this,nodes=me.all.elements,records=me.getViewRange(),selModel=me.getSelectionModel(),myId=me.id,node,record,i;startIndex=startIndex||0;endIndex=endIndex||((endIndex===0)?0:(nodes.length-1));for(i=startIndex;i<=endIndex;i++){node=nodes[i];record=records[i];node.setAttribute('data-recordIndex',i);node.setAttribute('data-recordId',record.internalId);node.setAttribute('data-boundView',myId);if(selModel.getLastSelected()){me[selModel.isSelected(record)?'onItemSelect':'onItemDeselect'](record)}}},bindStore:function(store,initial){var me=this,selModel=me.getSelectionModel(),navModel=me.getNavigationModel();if(selModel&&!selModel.destroyed){selModel.bindStore(store,initial);selModel.bindComponent(store?me:null)}
me.mixins.storeholder.bindStore.apply(me,arguments);if(navModel&&!navModel.destroyed){navModel.setStore(store)}
if(store&&me.componentLayoutCounter&&!me.blockRefresh){me.doFirstRefresh(store,!initial)}},doFirstRefresh:function(store,noDefer){var me=this;if(me.deferInitialRefresh&&!noDefer){Ext.defer(me.doFirstRefresh,1,me,[store,!0])}else{if(store&&!me.deferRefreshForLoad(store)){me.refresh()}}},onUnbindStore:function(store){this.setMaskBind(null);if(this.dataSource===store){this.dataSource=null}},onBindStore:function(store,oldStore){var me=this;if(me.store.isBufferedStore){me.store.preserveScrollOnReload=me.preserveScrollOnReload}
if(oldStore&&oldStore.isBufferedStore){delete oldStore.preserveScrollOnReload}
me.setMaskBind(store);if(!me.dataSource){me.dataSource=store}},setMaskBind:function(store){var mask=this.loadMask;if(this.rendered&&mask&&store&&!mask.bindStore){mask=this.createMask()}
if(mask&&mask.bindStore){mask.bindStore(store)}},getStoreListeners:function(){var me=this;return{refresh:me.onDataRefresh,replace:me.onReplace,add:me.onAdd,remove:me.onRemove,update:me.onUpdate,clear:me.onDataRefresh,beginupdate:me.onBeginUpdate,endupdate:me.onEndUpdate}},onBeginUpdate:function(){++this.updateSuspendCounter;Ext.suspendLayouts()},onEndUpdate:function(){var me=this;if(me.updateSuspendCounter){--me.updateSuspendCounter}
Ext.resumeLayouts(!0);if(me.refreshSizePending){me.refreshSize(!0);me.refreshSizePending=!1}},onDataRefresh:function(store){var me=this,preserveScrollOnRefresh=me.preserveScrollOnRefresh;if(store.loadCount>=(me.lastRefreshLoadCount||0)){me.preserveScrollOnRefresh=me.preserveScrollOnReload}
me.refreshView();me.preserveScrollOnRefresh=preserveScrollOnRefresh;me.lastRefreshLoadCount=store.loadCount},refreshView:function(startIndex){var me=this,blocked=me.blockRefresh||!me.rendered||me.up('[collapsed],[isCollapsingOrExpanding=1],[hidden]'),bufferedRenderer=me.bufferedRenderer;if(blocked){me.refreshNeeded=!0}else{if(bufferedRenderer){bufferedRenderer.refreshView(startIndex)}else{me.refresh()}}},findItemByChild:function(node){return Ext.fly(node).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(e){return e.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var nodes=[],records=this.getSelectionModel().getSelection(),ln=records.length,i=0;for(;i<ln;i++){nodes.push(this.getNode(records[i]))}
return nodes},getRecords:function(nodes){var me=this,records=[],i;for(i=0;i<nodes.length;i++){records.push(me.getRecord(nodes[i]))}
return records},getRecord:function(node){var dom=Ext.getDom(node),id=dom.getAttribute('data-recordId');return this.dataSource.getByInternalId(id)},isSelected:function(node){var r=this.getRecord(node);return this.getSelectionModel().isSelected(r)},select:function(records,keepExisting,suppressEvent){this.getSelectionModel().select(records,keepExisting,suppressEvent)},deselect:function(records,suppressEvent){this.getSelectionModel().deselect(records,suppressEvent)},getNode:function(nodeInfo){var me=this,out;if(me.rendered&&(nodeInfo||nodeInfo===0)){if(Ext.isString(nodeInfo)){out=document.getElementById(nodeInfo)}else if(nodeInfo.isModel){out=me.getNodeByRecord(nodeInfo)}else if(Ext.isNumber(nodeInfo)){out=me.all.elements[nodeInfo]}else{if(nodeInfo.target&&nodeInfo.target.nodeType){nodeInfo=nodeInfo.target}
out=Ext.fly(nodeInfo).findParent(me.itemSelector,me.getTargetEl())}}
return out||null},getNodeByRecord:function(record){var index=this.store.indexOf(record);return this.all.elements[index]||null},getNodes:function(start,end){var all=this.all;if(end!==undefined){end++}
return all.slice(start,end)},indexOf:function(node){node=this.getNode(node);if(!node&&node!==0){return-1}
if(node.getAttribute('data-recordIndex')){return Number(node.getAttribute('data-recordIndex'))}
return this.all.indexOf(node)},doDestroy:function(){var me=this,count=me.updateSuspendCounter,tabGuardEl=me.tabGuardEl;if(me.viewScrollListeners){me.viewScrollListeners.destroy()}
if(me.all&&!me.all.destroyed){me.all.clear()}
if(tabGuardEl){if(tabGuardEl.parentNode){tabGuardEl.parentNode.removeChild(tabGuardEl)}}
me.emptyEl=null;me.setItemsDraggable(!1);me.bindStore(null);if(me.selModelRelayer){me.selModelRelayer.destroy()}
Ext.destroy(me.navigationModel,me.selectionModel,me.loadMask);while(count--){Ext.resumeLayouts(!0)}
me.callParent()},onItemSelect:function(record){var node=this.getNode(record);if(node){Ext.fly(node).addCls(this.selectedItemCls);node.setAttribute('aria-selected','true')}
return node},onItemDeselect:function(record){var node=this.getNode(record);if(node){Ext.fly(node).removeCls(this.selectedItemCls);node.setAttribute('aria-selected','false')}
return node},getItemSelector:function(){return this.itemSelector},addItemCls:function(itemInfo,cls){var item=this.getNode(itemInfo);if(item){Ext.fly(item).addCls(cls)}},removeItemCls:function(itemInfo,cls){var item=this.getNode(itemInfo);if(item){Ext.fly(item).removeCls(cls)}},setStore:function(newStore){var me=this;if(me.store!==newStore){if(me.isConfiguring){me.store=newStore}else{me.bindStore(newStore,!1)}}},privates:{deferRefreshForLoad:function(store){return store.isLoading()},toggleChildrenTabbability:function(enableTabbing){var focusEl=this.getTargetEl();if(enableTabbing){focusEl.restoreTabbableState({skipSelf:!0})}else{focusEl.saveTabbableState({skipSelf:!0,includeSaved:!1})}},collectNodes:function(targetEl){var all=this.all,options={role:this.itemAriaRole};all.fill(Ext.fly(targetEl).query(this.getItemSelector()),all.startIndex||0);if(this.focusable){options.tabindex='-1'}
all.set(options)},createMask:function(mask){var me=this,maskStore=me.getStore(),cfg;if(maskStore&&!maskStore.isEmptyStore&&!maskStore.loadsSynchronously()){cfg={target:me,msg:me.loadingText,useMsg:me.loadingUseMsg,store:maskStore};if(me.loadingCls){cfg.msgCls=me.loadingCls}
if(Ext.isObject(mask)){cfg=Ext.apply(cfg,mask)}
me.loadMask=new Ext.LoadMask(cfg);me.loadMask.on({scope:me,beforeshow:me.onMaskBeforeShow,hide:me.onMaskHide})}
return me.loadMask},getNodeContainer:function(){var target=this.getTargetEl(),selector=this.nodeContainerSelector;return selector?target.down(selector,!0):target},getOverflowEl:function(){return Ext.Component.prototype.getTargetEl.call(this)}}},function(){Ext.deprecate('extjs','4.0',function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact "+"with the Ext.selection.DataViewModel")}
return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact "+"with the Ext.selection.DataViewModel")}
return this.selModel.getSelection()},select:function(records,keepExisting,supressEvents){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through "+"a DataView's SelectionModel, ie: view.getSelectionModel().select()")}
var sm=this.getSelectionModel();return sm.select.apply(sm,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access "+"deselectAll through DataView's SelectionModel, ie: "+"view.getSelectionModel().deselectAll()")}
var sm=this.getSelectionModel();return sm.deselectAll()}})})})
;
Ext.define('Ext.view.View',{extend:'Ext.view.AbstractView',alternateClassName:'Ext.DataView',alias:'widget.dataview',inputTagRe:/^textarea$|^input$/i,keyEventRe:/^key/,manageLayoutScroll:!1,inheritableStatics:{EventMap:{longpress:'LongPress',mousedown:'MouseDown',mouseup:'MouseUp',click:'Click',dblclick:'DblClick',contextmenu:'ContextMenu',mouseover:'MouseOver',mouseout:'MouseOut',mouseenter:'MouseEnter',mouseleave:'MouseLeave',keydown:'KeyDown',keyup:'KeyUp',keypress:'KeyPress',focus:'Focus'},TouchEventMap:{touchstart:'mousedown',touchend:'mouseup',tap:'click',doubletap:'dblclick'}},afterRender:function(){var me=this;me.callParent();me.mon(me.el,{scope:me,click:me.handleEvent,longpress:me.handleEvent,mousedown:me.handleEvent,mouseup:me.handleEvent,dblclick:me.handleEvent,contextmenu:me.handleEvent,keydown:me.handleEvent,keyup:me.handleEvent,keypress:me.handleEvent,mouseover:me.handleMouseOver,mouseout:me.handleMouseOut})},getTargetSelector:function(){return this.dataRowSelector||this.itemSelector},handleMouseOver:function(e){var me=this,itemSelector=me.getTargetSelector(),item=e.getTarget(itemSelector);if(!me.destroyed){if(item){if(me.mouseOverItem!==item&&me.el.contains(item)){me.mouseOverItem=e.item=item;e.newType='mouseenter';me.handleEvent(e)}}else{me.handleEvent(e)}}},handleMouseOut:function(e){var me=this,itemSelector=me.getTargetSelector(),item=e.getTarget(itemSelector),computedRelatedTarget=e.getRelatedTarget(itemSelector),sourceView;if((item===computedRelatedTarget)&&!(item===null&&computedRelatedTarget===null)){return}
if(!me.destroyed){if(item&&(sourceView=me.self.getBoundView(item))){e.item=item;e.newType='mouseleave';sourceView.handleEvent(e);sourceView.mouseOverItem=null}else{me.handleEvent(e)}}},handleEvent:function(e){var me=this,isKeyEvent=me.keyEventRe.test(e.type);e.isInputFieldEvent=Ext.fly(e.target).isInputField();e.view=me;e.item=e.getTarget(me.itemSelector);if(e.item){e.record=me.getRecord(e.item)}
if(me.processUIEvent(e)!==!1&&!me.destroyed){me.processSpecialEvent(e)}
if(isKeyEvent&&!e.isInputFieldEvent){if(e.getKey()===e.SPACE||e.isNavKeyPress(!0)){e.preventDefault()}}
e.view=null},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,processUIEvent:function(e){if(!Ext.getBody().isAncestor(e.target)){return}
var me=this,item=e.item,self=me.self,map=self.EventMap,touchMap=self.TouchEventMap,index,record=e.record,type=e.type,newType=type;if(e.newType){newType=e.newType}
if(item){newType=touchMap[newType]||newType;index=e.recordIndex=me.indexInStore?me.indexInStore(record):me.indexOf(item);if(!record||me.processItemEvent(record,item,index,e)===!1){return!1}
if((me['onBeforeItem'+map[newType]](record,item,index,e)===!1)||(me.fireEvent('beforeitem'+newType,me,record,item,index,e)===!1)||(me['onItem'+map[newType]](record,item,index,e)===!1)){return!1}
me.fireEvent('item'+newType,me,record,item,index,e)}else{type=touchMap[type]||type;if((me.processContainerEvent(e)===!1)||(me['onBeforeContainer'+map[type]](e)===!1)||(me.fireEvent('beforecontainer'+type,me,e)===!1)||(me['onContainer'+map[type]](e)===!1)){return!1}
me.fireEvent('container'+type,me,e)}
return!0},onItemMouseEnter:function(record,item,index,e){if(this.trackOver){this.highlightItem(item)}},onItemMouseLeave:function(record,item,index,e){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemLongPress:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onItemKeyUp:Ext.emptyFn,onItemKeyPress:Ext.emptyFn,onBeforeItemLongPress:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onBeforeItemKeyUp:Ext.emptyFn,onBeforeItemKeyPress:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerLongPress:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onContainerKeyUp:Ext.emptyFn,onContainerKeyPress:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerLongPress:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,onBeforeContainerKeyUp:Ext.emptyFn,onBeforeContainerKeyPress:Ext.emptyFn,setHighlightedItem:function(item){var me=this,highlighted=me.highlightedItem,overItemCls=me.overItemCls;if(highlighted!==item){if(highlighted){Ext.fly(highlighted).removeCls(overItemCls);if(Ext.isIE8){me.repaintBorder(highlighted);me.repaintBorder(highlighted.nextSibling)}
if(me.hasListeners.unhighlightitem){me.fireEvent('unhighlightitem',me,highlighted)}}
me.highlightedItem=item;if(item){Ext.fly(item).addCls(me.overItemCls);if(Ext.isIE8){me.repaintBorder(item.nextSibling)}
if(me.hasListeners.highlightitem){me.fireEvent('highlightitem',me,item)}}}},highlightItem:function(item){this.setHighlightedItem(item)},clearHighlight:function(){this.setHighlightedItem(undefined)},handleUpdate:function(store,record){var me=this,node,newNode,highlighted;if(me.viewReady){node=me.getNode(record);newNode=me.callParent(arguments);highlighted=me.highlightedItem;if(highlighted&&highlighted===node){delete me.highlightedItem;if(newNode){me.highlightItem(newNode)}}}},refresh:function(){this.clearHighlight();this.callParent(arguments)},focusNode:function(rec){var me=this,node=Ext.fly(me.getNode(rec)),el=me.el,adjustmentY=0,adjustmentX=0,elRegion=el.getRegion(),nodeRegion;elRegion.bottom=elRegion.top+el.dom.clientHeight;elRegion.right=elRegion.left+el.dom.clientWidth;if(node){nodeRegion=node.getRegion();if(nodeRegion.top<elRegion.top){adjustmentY=nodeRegion.top-elRegion.top}else if(nodeRegion.bottom>elRegion.bottom){adjustmentY=nodeRegion.bottom-elRegion.bottom}
if(nodeRegion.left<elRegion.left){adjustmentX=nodeRegion.left-elRegion.left}else if(nodeRegion.right>elRegion.right){adjustmentX=nodeRegion.right-elRegion.right}
if(adjustmentX||adjustmentY){me.scrollBy(adjustmentX,adjustmentY,!1)}
node.set({tabIndex:-1});node.focus()}},privates:{repaintBorder:function(rowIdx){var node=this.getNode(rowIdx);if(node){node.className=node.className}}}})
;
Ext.define('Ext.view.BoundListKeyNav',{extend:'Ext.view.NavigationModel',alias:'view.navigation.boundlist',navigateOnSpace:!0,initKeyNav:function(view){var me=this,field=view.pickerField;if(!me.keyNav){me.callParent([view]);me.keyNav.map.addBinding({key:Ext.event.Event.ESC,fn:me.onKeyEsc,scope:me})}
if(!field){return}
if(!field.rendered){field.on('render',Ext.Function.bind(me.initKeyNav,me,[view],0),me,{single:!0});return}
me.fieldKeyNav=new Ext.util.KeyNav({disabled:!0,target:field.inputEl,forceKeyDown:!0,up:me.onKeyUp,down:me.onKeyDown,right:me.onKeyRight,left:me.onKeyLeft,pageDown:me.onKeyPageDown,pageUp:me.onKeyPageUp,home:me.onKeyHome,end:me.onKeyEnd,tab:me.onKeyTab,space:me.onKeySpace,enter:me.onKeyEnter,A:{ctrl:!0,handler:me.onSelectAllKeyPress},priority:1001,scope:me})},processViewEvent:function(view,record,node,index,event){if(event.within(view.listWrap)){return event}
if(event.getKey()===event.ESC){if(Ext.fly(event.target).isInputField()){event.target=event.target.parentNode}
return event}},enable:function(){this.fieldKeyNav.enable();this.callParent()},disable:function(){this.fieldKeyNav.disable();this.callParent()},onItemMouseDown:function(view,record,item,index,event){this.callParent([view,record,item,index,event]);if(event.pointerType==='mouse'){event.preventDefault()}},onKeyUp:function(e){var me=this,boundList=me.view,allItems=boundList.all,oldItem=boundList.highlightedItem,oldItemIdx=oldItem?boundList.indexOf(oldItem):-1,newItemIdx=oldItemIdx>0?oldItemIdx-1:allItems.getCount()-1;me.setPosition(newItemIdx);e.preventDefault()},onKeyDown:function(e){var me=this,boundList=me.view,allItems=boundList.all,oldItem=boundList.highlightedItem,oldItemIdx=oldItem?boundList.indexOf(oldItem):-1,newItemIdx=oldItemIdx<allItems.getCount()-1?oldItemIdx+1:0;me.setPosition(newItemIdx);e.preventDefault()},onKeyLeft:Ext.returnTrue,onKeyRight:Ext.returnTrue,onKeyTab:function(e){var view=this.view,field=view.pickerField;if(view.isVisible()){if(field.selectOnTab){this.selectHighlighted(e)}
if(field.collapse){field.collapse()}}
return!0},onKeyEnter:function(e){var view=this.view,selModel=view.getSelectionModel(),field=view.pickerField,count=selModel.getCount();e.stopEvent();this.selectHighlighted(e);if(!field.multiSelect&&count===selModel.getCount()&&field.collapse){field.collapse()}
field.fireEvent('specialkey',field,e,{fromBoundList:!0});return!1},onKeySpace:function(){if(this.navigateOnSpace){this.callParent(arguments)}
return!0},onKeyEsc:function(){if(this.view.pickerField){this.view.pickerField.collapse()}},focusItem:function(item){var me=this,boundList=me.view;if(typeof item==='number'){item=boundList.all.item(item)}
if(item){item=item.dom;boundList.highlightItem(item);boundList.getScrollable().ensureVisible(item,{x:!1})}},selectHighlighted:function(e){var me=this,boundList=me.view,selModel=boundList.getSelectionModel(),highlightedRec,highlightedPosition=me.recordIndex;if(boundList.all.getCount()){highlightedRec=me.getRecord();if(highlightedRec){if(e.getKey()===e.ENTER||!selModel.isSelected(highlightedRec)){selModel.selectWithEvent(highlightedRec,e);if(!boundList.store.data.contains(highlightedRec)){me.setPosition(Math.min(highlightedPosition,boundList.store.getCount()-1))}}}}},destroy:function(){this.fieldKeyNav=Ext.destroy(this.fieldKeyNav);this.callParent()}})
;
Ext.define('Ext.layout.component.BoundList',{extend:'Ext.layout.component.Auto',alias:'layout.boundlist',type:'component',beginLayout:function(ownerContext){var me=this,owner=me.owner,toolbar=owner.pagingToolbar;me.scrollPos=owner.listWrap.getScroll();me.callParent(arguments);if(owner.floating){ownerContext.savedXY=owner.getXY();owner.setXY([0,-9999])}
if(toolbar){ownerContext.toolbarContext=ownerContext.context.getCmp(toolbar)}
ownerContext.listContext=ownerContext.getEl('listWrap')},beginLayoutCycle:function(ownerContext){var owner=this.owner;this.callParent(arguments);if(ownerContext.heightModel.auto){owner.el.setHeight('auto');owner.listWrap.setHeight('auto')}},getLayoutItems:function(){var toolbar=this.owner.pagingToolbar;return toolbar?[toolbar]:[]},isValidParent:function(){return!0},finishedLayout:function(ownerContext){var me=this,xy=ownerContext.savedXY,owner=me.owner,listWrap=owner.listWrap,scrollPos=me.scrollPos;me.callParent(arguments);if(xy){me.owner.setXY(xy)}
listWrap.setScrollLeft(scrollPos.left);listWrap.setScrollTop(scrollPos.top)},measureContentWidth:function(ownerContext){return this.owner.listWrap.getWidth()},measureContentHeight:function(ownerContext){return this.owner.listWrap.getHeight()},publishInnerHeight:function(ownerContext,height){var toolbar=ownerContext.toolbarContext,toolbarHeight=0;if(toolbar){toolbarHeight=toolbar.getProp('height')}
if(toolbarHeight===undefined){this.done=!1}else{ownerContext.listContext.setHeight(height-ownerContext.getFrameInfo().height-toolbarHeight)}},calculateOwnerHeightFromContentHeight:function(ownerContext){var height=this.callParent(arguments),toolbar=ownerContext.toolbarContext;if(toolbar){height+=toolbar.getProp('height')}
return height}})
;
Ext.define('Ext.toolbar.Item',{extend:'Ext.Component',alias:'widget.tbitem',alternateClassName:'Ext.Toolbar.Item',requires:['Ext.toolbar.Toolbar'],enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn})
;
Ext.define('Ext.toolbar.TextItem',{extend:'Ext.toolbar.Item',alias:'widget.tbtext',alternateClassName:'Ext.Toolbar.TextItem',requires:['Ext.toolbar.Toolbar','Ext.XTemplate'],text:'',baseCls:Ext.baseCSSPrefix+'toolbar-text',ariaRole:null,beforeRender:function(){var text=this.text;this.callParent();if(text){this.html=text}},setText:function(text){this.update(text)}})
;
Ext.define('Ext.form.trigger.Spinner',{extend:'Ext.form.trigger.Trigger',alias:'trigger.spinner',cls:Ext.baseCSSPrefix+'form-trigger-spinner',spinnerCls:Ext.baseCSSPrefix+'form-spinner',spinnerUpCls:Ext.baseCSSPrefix+'form-spinner-up',spinnerDownCls:Ext.baseCSSPrefix+'form-spinner-down',focusCls:Ext.baseCSSPrefix+'form-spinner-focus',overCls:Ext.baseCSSPrefix+'form-spinner-over',clickCls:Ext.baseCSSPrefix+'form-spinner-click',focusFieldOnClick:!0,vertical:!0,bodyTpl:'<tpl if="vertical">'+'<div class="{spinnerCls} {spinnerCls}-{ui} {spinnerUpCls} {spinnerUpCls}-{ui}'+' {childElCls} {upDisabledCls}"></div>'+'</tpl>'+'<div class="{spinnerCls} {spinnerCls}-{ui} {spinnerDownCls} {spinnerDownCls}-{ui}'+' {childElCls} {downDisabledCls}"></div>'+'<tpl if="!vertical">'+'<div class="{spinnerCls} {spinnerCls}-{ui} {spinnerUpCls} {spinnerUpCls}-{ui}'+' {childElCls} {upDisabledCls}"></div>'+'</tpl>',destroy:function(){var me=this;if(me.spinnerEl){me.spinnerEl.destroy();me.spinnerEl=me.upEl=me.downEl=null}
me.callParent()},getBodyRenderData:function(){var me=this;return{vertical:me.vertical,upDisabledCls:me.upEnabled?'':(me.spinnerUpCls+'-disabled'),downDisabledCls:me.downEnabled?'':(me.spinnerDownCls+'-disabled'),spinnerCls:me.spinnerCls,spinnerUpCls:me.spinnerUpCls,spinnerDownCls:me.spinnerDownCls}},getStateEl:function(){return this.spinnerEl},onClick:function(){var me=this,args=arguments,e=me.clickRepeater?args[1]:args[0],field=me.field;if(!field.readOnly&&!field.disabled){if(me.upEl.contains(e.target)){Ext.callback(me.upHandler,me.scope,[field,me,e],0,field)}else if(me.downEl.contains(e.target)){Ext.callback(me.downHandler,me.scope,[field,me,e],0,field)}}
field.inputEl.focus()},onFieldRender:function(){var me=this,vertical=me.vertical,spinnerEl,elements;me.callParent();spinnerEl=me.spinnerEl=me.el.select('.'+me.spinnerCls,!0);elements=spinnerEl.elements;me.upEl=vertical?elements[0]:elements[1];me.downEl=vertical?elements[1]:elements[0]},setUpEnabled:function(enabled){this.upEl[enabled?'removeCls':'addCls'](this.spinnerUpCls+'-disabled')},setDownEnabled:function(enabled){this.downEl[enabled?'removeCls':'addCls'](this.spinnerDownCls+'-disabled')}})
;
Ext.define('Ext.form.field.Spinner',{extend:'Ext.form.field.Text',alias:'widget.spinnerfield',alternateClassName:'Ext.form.Spinner',requires:['Ext.form.trigger.Spinner','Ext.util.KeyNav'],config:{triggers:{spinner:{type:'spinner',upHandler:'onSpinnerUpClick',downHandler:'onSpinnerDownClick',endHandler:'onSpinEnd',scope:'this'}}},spinUpEnabled:!0,spinDownEnabled:!0,keyNavEnabled:!0,mouseWheelEnabled:!0,repeatTriggerClick:!0,onSpinUp:Ext.emptyFn,onSpinDown:Ext.emptyFn,ariaRole:'spinbutton',applyTriggers:function(triggers){var me=this,spinnerTrigger=triggers.spinner;spinnerTrigger.upEnabled=me.spinUpEnabled;spinnerTrigger.downEnabled=me.spinDownEnabled;return me.callParent([triggers])},onRender:function(){var me=this,spinnerTrigger=me.getTrigger('spinner');me.callParent();if(me.keyNavEnabled){me.spinnerKeyNav=new Ext.util.KeyNav({target:me.inputEl,scope:me,up:me.spinUp,down:me.spinDown});me.inputEl.on({keyup:me.onInputElKeyUp,scope:me})}
if(me.mouseWheelEnabled){me.mon(me.bodyEl,'mousewheel',me.onMouseWheel,me)}
me.spinUpEl=spinnerTrigger.upEl;me.spinDownEl=spinnerTrigger.downEl},onSpinnerUpClick:function(){this.spinUp()},onSpinnerDownClick:function(){this.spinDown()},spinUp:function(){var me=this;if(me.spinUpEnabled&&!me.disabled){me.fireEvent('spin',me,'up');me.fireEvent('spinup',me);me.onSpinUp()}},spinDown:function(){var me=this;if(me.spinDownEnabled&&!me.disabled){me.fireEvent('spin',me,'down');me.fireEvent('spindown',me);me.onSpinDown()}},setSpinUpEnabled:function(enabled){var me=this,wasEnabled=me.spinUpEnabled;me.spinUpEnabled=enabled;if(wasEnabled!==enabled&&me.rendered){me.getTrigger('spinner').setUpEnabled(enabled)}},setSpinDownEnabled:function(enabled){var me=this,wasEnabled=me.spinDownEnabled;me.spinDownEnabled=enabled;if(wasEnabled!==enabled&&me.rendered){me.getTrigger('spinner').setDownEnabled(enabled)}},onMouseWheel:function(e){var me=this,delta;if(me.hasFocus){delta=e.getWheelDelta();if(delta>0){me.spinUp()}else if(delta<0){me.spinDown()}
e.stopEvent();me.onSpinEnd()}},onInputElKeyUp:function(e){if(e.keyCode===e.UP||e.keyCode===e.DOWN){this.onSpinEnd()}},doDestroy:function(){Ext.destroyMembers(this,'spinnerKeyNav');this.callParent()}},function(Spinner){var spinEnd=function(){if(!this.destroying&&!this.destroyed){this.fireEvent('spinend',this)}};spinEnd.$skipTimerCheck=!0;Spinner.prototype.onSpinEnd=Ext.Function.createBuffered(spinEnd,100)})
;
Ext.define('Ext.form.field.Number',{extend:'Ext.form.field.Spinner',alias:'widget.numberfield',alternateClassName:['Ext.form.NumberField','Ext.form.Number'],allowExponential:!0,allowDecimals:!0,decimalSeparator:null,submitLocaleSeparator:!0,decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,minText:'The minimum value for this field is {0}',maxText:'The maximum value for this field is {0}',nanText:'{0} is not a valid number',negativeText:'The value cannot be negative',baseChars:'0123456789',autoStripChars:!1,initComponent:function(){var me=this;if(me.decimalSeparator===null){me.decimalSeparator=Ext.util.Format.decimalSeparator}
me.callParent();me.setMinValue(me.minValue);me.setMaxValue(me.maxValue)},getSubTplData:function(fieldData){var me=this,min=me.minValue,max=me.maxValue,data,inputElAttr,value;data=me.callParent([fieldData]);inputElAttr=data.inputElAriaAttributes;if(inputElAttr){if(min>Number.NEGATIVE_INFINITY){inputElAttr['aria-valuemin']=min}
if(max<Number.MAX_VALUE){inputElAttr['aria-valuemax']=max}
value=me.getValue();if(value!=null&&value>=min&&value<=max){inputElAttr['aria-valuenow']=value}}
return data},setValue:function(value){var me=this,bind,valueBind;if(me.hasFocus){bind=me.getBind();valueBind=bind&&bind.value;if(valueBind&&valueBind.syncing&&value===me.value){return me}}
return me.callParent([value])},getErrors:function(value){value=arguments.length>0?value:this.processRawValue(this.getRawValue());var me=this,errors=me.callParent([value]),format=Ext.String.format,num;if(value.length<1){return errors}
value=String(value).replace(me.decimalSeparator,'.');if(isNaN(value)){errors.push(format(me.nanText,value))}
num=me.parseValue(value);if(me.minValue===0&&num<0){errors.push(this.negativeText)}else if(num<me.minValue){errors.push(format(me.minText,me.minValue))}
if(num>me.maxValue){errors.push(format(me.maxText,me.maxValue))}
return errors},rawToValue:function(rawValue){var value=this.fixPrecision(this.parseValue(rawValue));if(value===null){value=rawValue||null}
return value},valueToRaw:function(value){var me=this,decimalSeparator=me.decimalSeparator;value=me.parseValue(value);value=me.fixPrecision(value);value=Ext.isNumber(value)?value:parseFloat(String(value).replace(decimalSeparator,'.'));value=isNaN(value)?'':String(value).replace('.',decimalSeparator);return value},getSubmitValue:function(){var me=this,value=me.callParent();if(!me.submitLocaleSeparator){value=value.replace(me.decimalSeparator,'.')}
return value},onChange:function(newValue){var ariaDom=this.ariaEl.dom;this.toggleSpinners();this.callParent(arguments);if(ariaDom){if(Ext.isNumber(newValue)&&isFinite(newValue)){ariaDom.setAttribute('aria-valuenow',newValue)}else{ariaDom.removeAttribute('aria-valuenow')}}},toggleSpinners:function(){var me=this,value=me.getValue(),valueIsNull=value===null,enabled;if(me.spinUpEnabled||me.spinUpDisabledByToggle){enabled=valueIsNull||value<me.maxValue;me.setSpinUpEnabled(enabled,!0)}
if(me.spinDownEnabled||me.spinDownDisabledByToggle){enabled=valueIsNull||value>me.minValue;me.setSpinDownEnabled(enabled,!0)}},setMinValue:function(value){var me=this,ariaDom=me.ariaEl.dom,minValue,allowed;me.minValue=minValue=Ext.Number.from(value,Number.NEGATIVE_INFINITY);me.toggleSpinners();if(ariaDom){if(minValue>Number.NEGATIVE_INFINITY){ariaDom.setAttribute('aria-valuemin',minValue)}else{ariaDom.removeAttribute('aria-valuemin')}}
if(me.disableKeyFilter!==!0){allowed=me.baseChars+'';if(me.allowExponential){allowed+=me.decimalSeparator+'e+-'}else{if(me.allowDecimals){allowed+=me.decimalSeparator}
if(me.minValue<0){allowed+='-'}}
allowed=Ext.String.escapeRegex(allowed);me.maskRe=new RegExp('['+allowed+']');if(me.autoStripChars){me.stripCharsRe=new RegExp('[^'+allowed+']','gi')}}},setMaxValue:function(value){var ariaDom=this.ariaEl.dom,maxValue;this.maxValue=maxValue=Ext.Number.from(value,Number.MAX_VALUE);if(ariaDom){if(maxValue<Number.MAX_VALUE){ariaDom.setAttribute('aria-valuemax',maxValue)}else{ariaDom.removeAttribute('aria-valuemax')}}
this.toggleSpinners()},parseValue:function(value){value=parseFloat(String(value).replace(this.decimalSeparator,'.'));return isNaN(value)?null:value},fixPrecision:function(value){var me=this,nan=isNaN(value),precision=me.decimalPrecision;if(nan||!value){return nan?'':value}else if(!me.allowDecimals||precision<=0){precision=0}
return parseFloat(Ext.Number.toFixed(parseFloat(value),precision))},onBlur:function(e){var me=this,v=me.rawToValue(me.getRawValue());if(!Ext.isEmpty(v)){me.setValue(v)}
me.callParent([e])},setSpinUpEnabled:function(enabled,internal){this.callParent(arguments);if(!internal){delete this.spinUpDisabledByToggle}else{this.spinUpDisabledByToggle=!enabled}},onSpinUp:function(){var me=this;if(!me.readOnly){me.setSpinValue(Ext.Number.constrain(me.getValue()+me.step,me.minValue,me.maxValue))}},setSpinDownEnabled:function(enabled,internal){this.callParent(arguments);if(!internal){delete this.spinDownDisabledByToggle}else{this.spinDownDisabledByToggle=!enabled}},onSpinDown:function(){var me=this;if(!me.readOnly){me.setSpinValue(Ext.Number.constrain(me.getValue()-me.step,me.minValue,me.maxValue))}},setSpinValue:function(value){var me=this;if(me.enforceMaxLength){if(me.fixPrecision(value).toString().length>me.maxLength){return}}
me.setValue(value)}})
;
Ext.define('Ext.toolbar.Paging',{extend:'Ext.toolbar.Toolbar',xtype:'pagingtoolbar',alternateClassName:'Ext.PagingToolbar',requires:['Ext.toolbar.TextItem','Ext.form.field.Number'],mixins:['Ext.util.StoreHolder'],displayInfo:!1,prependButtons:!1,displayMsg:'Displaying {0} - {1} of {2}',emptyMsg:'No data to display',beforePageText:'Page',afterPageText:'of {0}',firstText:'First Page',prevText:'Previous Page',nextText:'Next Page',lastText:'Last Page',refreshText:'Refresh',inputItemWidth:30,emptyPageData:{total:0,currentPage:0,pageCount:0,toRecord:0,fromRecord:0},defaultBindProperty:'store',_pagingToolbarCls:Ext.baseCSSPrefix+'grid-paging-toolbar',getPagingItems:function(){var me=this,inputListeners={scope:me,blur:me.onPagingBlur};inputListeners[Ext.supports.SpecialKeyDownRepeat?'keydown':'keypress']=me.onPagingKeyDown;return[{itemId:'first',tooltip:me.firstText,overflowText:me.firstText,iconCls:Ext.baseCSSPrefix+'tbar-page-first',disabled:!0,handler:me.moveFirst,scope:me},{itemId:'prev',tooltip:me.prevText,overflowText:me.prevText,iconCls:Ext.baseCSSPrefix+'tbar-page-prev',disabled:!0,handler:me.movePrevious,scope:me},'-',me.beforePageText,{xtype:'numberfield',itemId:'inputItem',name:'inputItem',cls:Ext.baseCSSPrefix+'tbar-page-number',allowDecimals:!1,minValue:1,hideTrigger:!0,enableKeyEvents:!0,keyNavEnabled:!1,selectOnFocus:!0,submitValue:!1,isFormField:!1,width:me.inputItemWidth,margin:'-1 2 3 2',listeners:inputListeners},{xtype:'tbtext',itemId:'afterTextItem',html:Ext.String.format(me.afterPageText,1)},'-',{itemId:'next',tooltip:me.nextText,overflowText:me.nextText,iconCls:Ext.baseCSSPrefix+'tbar-page-next',disabled:!0,handler:me.moveNext,scope:me},{itemId:'last',tooltip:me.lastText,overflowText:me.lastText,iconCls:Ext.baseCSSPrefix+'tbar-page-last',disabled:!0,handler:me.moveLast,scope:me},'-',{itemId:'refresh',tooltip:me.refreshText,overflowText:me.refreshText,iconCls:Ext.baseCSSPrefix+'tbar-loading',disabled:me.store.isLoading(),handler:me.doRefresh,scope:me}]},initComponent:function(){var me=this,userItems=me.items||me.buttons||[],pagingItems;me.bindStore(me.store||'ext-empty-store',!0);if(me.store&&!me.store.nextPage){Ext.raise('Store is not compatible with this component (does not support paging)')}
pagingItems=me.getPagingItems();if(me.prependButtons){me.items=userItems.concat(pagingItems)}else{me.items=pagingItems.concat(userItems)}
delete me.buttons;if(me.displayInfo){me.items.push('->');me.items.push({xtype:'tbtext',itemId:'displayItem'})}
me.callParent()},beforeRender:function(){this.callParent(arguments);this.updateBarInfo()},afterRender:function(){this.callParent();this.el.addCls(this._pagingToolbarCls)},onAdded:function(owner){var me=this,oldStore=me.store,autoStore=me._autoStore,listener,store;if(autoStore===undefined){me._autoStore=autoStore=!(oldStore&&!oldStore.isEmptyStore)}
if(autoStore){listener=me._storeChangeListener;if(listener){listener.destroy();listener=null}
store=owner&&owner.store;if(store){listener=owner.on({destroyable:!0,scope:me,storechange:'onOwnerStoreChange'})}
me._storeChangeListener=listener;me.onOwnerStoreChange(owner,store)}
me.callParent(arguments)},onOwnerStoreChange:function(owner,store){this.setStore(store||Ext.getStore('ext-empty-store'))},updateBarInfo:function(){var me=this;if(!me.store.isLoading()){me.calledInternal=!0;me.onLoad();me.calledInternal=!1}},updateInfo:function(){var me=this,displayItem=me.child('#displayItem'),store=me.store,pageData=me.getPageData(),count,msg;if(displayItem){count=store.getCount();if(count===0){msg=me.emptyMsg}else{msg=Ext.String.format(me.displayMsg,pageData.fromRecord,pageData.toRecord,pageData.total)}
displayItem.setText(msg)}},onLoad:function(){var me=this,pageData,currPage,pageCount,afterText,count,isEmpty,item;count=me.store.getCount();isEmpty=count===0;if(!isEmpty){pageData=me.getPageData();currPage=pageData.currentPage;pageCount=pageData.pageCount;if(currPage>pageCount){if(pageCount>0){me.store.loadPage(pageCount)}else{me.getInputItem().reset()}
return}
afterText=Ext.String.format(me.afterPageText,isNaN(pageCount)?1:pageCount)}else{currPage=0;pageCount=0;afterText=Ext.String.format(me.afterPageText,0)}
Ext.suspendLayouts();item=me.child('#afterTextItem');if(item){item.update(afterText)}
item=me.getInputItem();if(item){item.setDisabled(isEmpty).setValue(currPage)}
me.setChildDisabled('#first',currPage===1||isEmpty);me.setChildDisabled('#prev',currPage===1||isEmpty);me.setChildDisabled('#next',currPage===pageCount||isEmpty);me.setChildDisabled('#last',currPage===pageCount||isEmpty);me.setChildDisabled('#refresh',!1);me.updateInfo();Ext.resumeLayouts(!0);if(!me.calledInternal){me.fireEvent('change',me,pageData||me.emptyPageData)}},setChildDisabled:function(selector,disabled){var item=this.child(selector);if(item){item.setDisabled(disabled)}},getPageData:function(){var store=this.store,totalCount=store.getTotalCount(),pageCount=Math.ceil(totalCount/store.pageSize),toRecord=Math.min(store.currentPage*store.pageSize,totalCount);return{total:totalCount,currentPage:store.currentPage,pageCount:Ext.Number.isFinite(pageCount)?pageCount:1,fromRecord:((store.currentPage-1)*store.pageSize)+1,toRecord:toRecord||totalCount}},onLoadError:function(){this.setChildDisabled('#refresh',!1)},getInputItem:function(){return this.child('#inputItem')},readPageFromInput:function(pageData){var inputItem=this.getInputItem(),pageNum=!1,v;if(inputItem){v=inputItem.getValue();pageNum=parseInt(v,10);if(!v||isNaN(pageNum)){inputItem.setValue(pageData.currentPage);return!1}}
return pageNum},onPagingBlur:function(e){var inputItem=this.getInputItem(),curPage;if(inputItem){curPage=this.getPageData().currentPage;inputItem.setValue(curPage)}},onPagingKeyDown:function(field,e){this.processKeyEvent(field,e)},processKeyEvent:function(field,e){var me=this,key=e.getKey(),pageData=me.getPageData(),increment=e.shiftKey?10:1,pageNum;if(key===e.RETURN){e.stopEvent();pageNum=me.readPageFromInput(pageData);if(pageNum!==!1){pageNum=Math.min(Math.max(1,pageNum),pageData.pageCount);if(pageNum!==pageData.currentPage&&me.fireEvent('beforechange',me,pageNum)!==!1){me.store.loadPage(pageNum)}}}else if(key===e.HOME||key===e.END){e.stopEvent();pageNum=key===e.HOME?1:pageData.pageCount;field.setValue(pageNum)}else if(key===e.UP||key===e.PAGE_UP||key===e.DOWN||key===e.PAGE_DOWN){e.stopEvent();pageNum=me.readPageFromInput(pageData);if(pageNum){if(key===e.DOWN||key===e.PAGE_DOWN){increment*=-1}
pageNum+=increment;if(pageNum>=1&&pageNum<=pageData.pageCount){field.setValue(pageNum)}}}},beforeLoad:function(){this.setChildDisabled('#refresh',!0)},moveFirst:function(){if(this.fireEvent('beforechange',this,1)!==!1){this.store.loadPage(1);return!0}
return!1},movePrevious:function(){var me=this,store=me.store,prev=store.currentPage-1;if(prev>0){if(me.fireEvent('beforechange',me,prev)!==!1){store.previousPage();return!0}}
return!1},moveNext:function(){var me=this,store=me.store,total=me.getPageData().pageCount,next=store.currentPage+1;if(next<=total){if(me.fireEvent('beforechange',me,next)!==!1){store.nextPage();return!0}}
return!1},moveLast:function(){var me=this,last=me.getPageData().pageCount;if(me.fireEvent('beforechange',me,last)!==!1){me.store.loadPage(last);return!0}
return!1},doRefresh:function(){var me=this,store=me.store,current=store.currentPage;if(me.fireEvent('beforechange',me,current)!==!1){store.loadPage(current);return!0}
return!1},getStoreListeners:function(){return{beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}},onBindStore:function(){if(this.rendered){this.updateBarInfo()}},doDestroy:function(){var me=this,listener=me._storeChangeListener;if(listener){listener.destroy();me._storeChangeListener=null}
me.bindStore(null);me.callParent()}})
;
Ext.define('Ext.theme.neptune.toolbar.Paging',{override:'Ext.toolbar.Paging',defaultButtonUI:'plain-toolbar',inputItemWidth:40})
;
Ext.define('Ext.theme.triton.toolbar.Paging',{override:'Ext.toolbar.Paging',inputItemWidth:50})
;
Ext.define('Ext.view.BoundList',{extend:'Ext.view.View',alias:'widget.boundlist',alternateClassName:'Ext.BoundList',requires:['Ext.view.BoundListKeyNav','Ext.layout.component.BoundList','Ext.toolbar.Paging'],mixins:['Ext.mixin.Queryable'],pageSize:0,baseCls:Ext.baseCSSPrefix+'boundlist',itemCls:Ext.baseCSSPrefix+'boundlist-item',listItemCls:'',shadow:!1,trackOver:!0,preserveScrollOnRefresh:!0,enableInitialSelection:!1,refreshSelmodelOnRefresh:!0,componentLayout:'boundlist',navigationModel:'boundlist',scrollable:!0,ariaEl:'listEl',tabIndex:-1,childEls:['listWrap','listEl'],renderTpl:['<div id="{id}-listWrap" data-ref="listWrap"',' class="{baseCls}-list-ct ',Ext.dom.Element.unselectableCls,'">','<ul id="{id}-listEl" data-ref="listEl" class="',Ext.baseCSSPrefix,'list-plain"','<tpl foreach="ariaAttributes"> {$}="{.}"</tpl>','>','</ul>','</div>','{%','var pagingToolbar=values.$comp.pagingToolbar;','if (pagingToolbar) {','Ext.DomHelper.generateMarkup(pagingToolbar.getRenderTree(), out);','}','%}',{disableFormats:!0}],focusOnToFront:!1,alignOnScroll:!1,initComponent:function(){var me=this,baseCls=me.baseCls,itemCls=me.itemCls;me.selectedItemCls=baseCls+'-selected';if(me.trackOver){me.overItemCls=baseCls+'-item-over'}
me.itemSelector='.'+itemCls;if(me.floating){me.addCls(baseCls+'-floating')}
if(!me.tpl){me.generateTpl()}else if(!me.tpl.isTemplate){me.tpl=new Ext.XTemplate(me.tpl)}
if(me.pageSize){me.pagingToolbar=me.createPagingToolbar()}
me.callParent()},generateTpl:function(){var me=this;me.tpl=new Ext.XTemplate('<tpl for=".">','<li role="option" unselectable="on" class="'+me.itemCls+'">'+me.getInnerTpl(me.displayField)+'</li>','</tpl>')},setDisplayField:function(displayField){this.displayField=displayField;this.generateTpl()},getRefOwner:function(){return this.pickerField||this.callParent()},getRefItems:function(){var result=this.callParent(),toolbar=this.pagingToolbar;if(toolbar){result.push(toolbar)}
return result},createPagingToolbar:function(){var me=this;return new Ext.toolbar.Paging({id:me.id+'-paging-toolbar',pageSize:me.pageSize,store:me.dataSource,border:!1,ownerCt:me,ownerLayout:me.getComponentLayout()})},refresh:function(){var me=this,tpl=me.tpl;tpl.field=me.pickerField;tpl.store=me.store;me.callParent();tpl.field=tpl.store=null;if(!me.ariaStaticRoles[me.ariaRole]){me.refreshAriaAttributes()}},refreshAriaAttributes:function(){var me=this,store=me.store,selModel=me.getSelectionModel(),multiSelect,totalCount,nodes,node,record,index,i,len;totalCount=store.isFiltered()?store.getCount():store.getTotalCount()||store.getCount();nodes=me.getNodes();multiSelect=me.pickerField&&me.pickerField.multiSelect;for(i=0,len=nodes.length;i<len;i++){node=nodes[i];record=null;if(totalCount!==len){record=me.getRecord(node);index=store.indexOf(record);node.setAttribute('aria-setsize',totalCount);node.setAttribute('aria-posinset',index)}
if(multiSelect){record=record||me.getRecord(node);node.setAttribute('aria-selected',selModel.isSelected(record))}}},bindStore:function(store,initial){var toolbar=this.pagingToolbar;this.callParent(arguments);if(toolbar){toolbar.bindStore(store,initial)}},getInnerTpl:function(displayField){return'{'+displayField+'}'},onShow:function(){var field=this.pickerField;this.callParent();if(field&&field.rendered&&!field.hasFocus){field.focus()}},afterComponentLayout:function(width,height,oldWidth,oldHeight){var field=this.pickerField;this.callParent([width,height,oldWidth,oldHeight]);if(field&&field.alignPicker){field.alignPicker()}},onItemSelect:function(record){var me=this,node;node=me.callParent([record]);if(node){if(me.ariaSelectable){node.setAttribute('aria-selected','true')}else{node.removeAttribute('aria-selected')}}
return node},onItemDeselect:function(record){var me=this,node;node=me.callParent([record]);if(node&&me.ariaSelectable){if(me.pickerField&&me.pickerField.multiSelect){node.setAttribute('aria-selected','false')}else{node.removeAttribute('aria-selected')}}
return node},onItemClick:function(record){var me=this,field=me.pickerField,valueField,selected;if(!field){return}
valueField=field.valueField;selected=me.getSelectionModel().getSelection();if(!field.multiSelect&&selected.length){selected=selected[0];if(selected&&field.isEqual(record.get(valueField),selected.get(valueField))&&field.collapse){field.collapse()}}},onContainerClick:function(e){var toolbar=this.pagingToolbar,clientRegion;if(toolbar&&toolbar.rendered&&e.within(toolbar.el)){return!1}
if(Ext.isIE10||Ext.isIE11){clientRegion=this.listWrap.getClientRegion();if(!e.getPoint().isContainedBy(clientRegion)){return!1}}},doDestroy:function(){this.pagingToolbar=Ext.destroy(this.pagingToolbar);this.callParent()},privates:{getNodeContainer:function(){return this.listEl},getTargetEl:function(){return this.listEl},getOverflowEl:function(){return this.listWrap},finishRenderChildren:function(){var toolbar=this.pagingToolbar;this.callParent(arguments);if(toolbar){toolbar.finishRender()}}}})
;
Ext.define('Ext.form.field.ComboBox',{extend:'Ext.form.field.Picker',alternateClassName:'Ext.form.ComboBox',alias:['widget.combobox','widget.combo'],requires:['Ext.util.DelayedTask','Ext.view.BoundList','Ext.data.StoreManager'],mixins:['Ext.util.StoreHolder'],config:{filters:null,selection:null,valueNotFoundText:null,displayTpl:null,delimiter:', ',displayField:'text'},publishes:['selection'],twoWayBindable:['selection'],triggerCls:Ext.baseCSSPrefix+'form-arrow-trigger',hiddenName:'',collapseOnSelect:!1,hiddenDataCls:Ext.baseCSSPrefix+'hidden-display '+Ext.baseCSSPrefix+'form-data-hidden',ariaRole:'combobox',autoDestroyBoundStore:!0,childEls:{'hiddenDataEl':!0},filtered:!1,afterRender:function(){var me=this;me.callParent(arguments);me.setHiddenValue(me.value)},multiSelect:!1,triggerAction:'all',allQuery:'',queryParam:'query',queryMode:'remote',queryCaching:!0,autoLoadOnValue:!1,pageSize:0,anyMatch:!1,caseSensitive:!1,autoSelect:!0,autoSelectLast:!0,typeAhead:!1,typeAheadDelay:250,selectOnTab:!0,forceSelection:!1,growToLongestValue:!0,clearFilterOnBlur:!0,defaultListConfig:{loadingHeight:70,minWidth:70,maxHeight:300,shadow:'sides'},transformInPlace:!0,clearValueOnEmpty:!0,newlineRe:/\r?\n/g,getGrowWidth:function(){var me=this,value=me.inputEl.dom.value,field,store,dataLn,currentLongestLength,i,item,itemLn;if(me.growToLongestValue){field=me.displayField;store=me.store;dataLn=store.data.length;currentLongestLength=0;for(i=0;i<dataLn;i++){item=store.getAt(i).data[field];itemLn=item.length;if(itemLn>currentLongestLength){currentLongestLength=itemLn;value=item}}}
return value},initComponent:function(){var me=this,isDefined=Ext.isDefined,store=me.store,transform=me.transform,transformSelect,isLocalMode;if(me.typeAhead&&me.multiSelect){Ext.raise('typeAhead and multiSelect are mutually exclusive options -- '+'please remove one of them.')}
if(me.typeAhead&&!me.editable){Ext.raise('If typeAhead is enabled the combo must be editable: true -- '+'please change one of those settings.')}
if(me.selectOnFocus&&!me.editable){Ext.raise('If selectOnFocus is enabled the combo must be editable: true -- '+'please change one of those settings.')}
if('pinList' in me){me.collapseOnSelect=!me.pinList}
if(transform){transformSelect=Ext.getDom(transform);if(transformSelect){if(!me.store){store=Ext.Array.map(Ext.Array.from(transformSelect.options),function(option){return[option.value,option.text]})}
if(!me.name){me.name=transformSelect.name}
if(!('value' in me)){me.value=transformSelect.value}}}
if(!me.displayTpl||me.displayTpl.auto){me.setDisplayTpl(!1)}
me.bindStore(store||'ext-empty-store',!0,!0);isLocalMode=me.queryMode==='local';if(!isDefined(me.queryDelay)){me.queryDelay=isLocalMode?10:500}
if(!isDefined(me.minChars)){me.minChars=isLocalMode?0:4}
me.callParent();me.doQueryTask=new Ext.util.DelayedTask(me.doRawQuery,me);if(transformSelect){if(me.transformInPlace){me.render(transformSelect.parentNode,transformSelect);delete me.renderTo}
Ext.removeNode(transformSelect)}},initEvents:function(){var me=this;me.callParent();me.altArrowKeyNav=new Ext.util.KeyNav({target:me.inputEl,forceKeyDown:!0,priority:1002,scope:me,down:{alt:!0,handler:me.onAltDownArrow},up:{alt:!0,handler:me.onAltUpArrow}})},getSubTplData:function(fieldData){var me=this,id=me.id,data,ariaAttr;data=me.callParent([fieldData]);if(!me.ariaStaticRoles[me.ariaRole]){ariaAttr=data.ariaElAttributes;if(ariaAttr){ariaAttr['aria-owns']=id+'-inputEl '+id+'-picker-listEl';ariaAttr['aria-autocomplete']='list'}}
return data},getSubTplMarkup:function(fieldData){var me=this,hiddenDataElMarkup='',markup=me.callParent(arguments);if(me.hiddenName){hiddenDataElMarkup='<div id="'+fieldData.id+'-hiddenDataEl" data-ref="hiddenDataEl" class="'+me.hiddenDataCls+'" role="presentation"></div>'}
return hiddenDataElMarkup+markup},applyDisplayTpl:function(displayTpl){var me=this;if(!displayTpl){displayTpl=new Ext.XTemplate('<tpl for=".">'+'{[typeof values === "string" ? values : values["'+me.getDisplayField()+'"]]}'+'<tpl if="xindex < xcount">'+me.getDelimiter()+'</tpl>'+'</tpl>');displayTpl.auto=!0}else if(!displayTpl.isTemplate){displayTpl=new Ext.XTemplate(displayTpl)}
return displayTpl},applyFilters:function(filters,collection){var me=this;if(filters===null||filters.isFilterCollection){return filters}
if(filters){if(!collection){collection=this.getFilters()}
collection.beginUpdate();collection.splice(0,collection.length,filters);collection.each(function(filter){filter.ownerId=me.id});collection.endUpdate()}
return collection},applyValueNotFoundText:function(v){var me=this,displayField=me.getDisplayField(),valueField=me.valueField,valueNotFoundRecord=me.valueNotFoundRecord;if(!valueNotFoundRecord){valueNotFoundRecord=me.valueNotFoundRecord=new Ext.data.Model()}
valueNotFoundRecord.set(displayField,v);if(valueField&&displayField!==valueField){valueNotFoundRecord.set(valueField,v)}
return v},updateDisplayField:function(displayField){if(displayField&&!this.displayTpl||this.displayTpl.auto){this.setDisplayTpl(!1)}},getFilters:function(autoCreate){var ret=this.filters;if(!ret&&autoCreate!==!1){ret=new Ext.util.FilterCollection();this.setFilters(ret)}
return ret},updateFilters:function(newFilters,oldFilters){var me=this;if(oldFilters){oldFilters.un('endupdate','onEndUpdateFilters',me)}
if(newFilters){newFilters.on('endupdate','onEndUpdateFilters',me)}
me.onEndUpdateFilters(newFilters)},onEndUpdateFilters:function(filters){var me=this,was=me.filtered,is=!!filters&&(filters.length>0),old,storeFilters;if(was||is){me.filtered=is;old=[];storeFilters=me.store.getFilters();storeFilters.each(function(filter){if(filter.ownerId===me.id&&!filters.contains(filter)){old.push(filter)}});storeFilters.splice(0,old,filters.items)}},clearLocalFilter:function(){var me=this,filter=me.queryFilter;if(filter){me.queryFilter=null;me.changingFilters=!0;me.store.removeFilter(filter,!0);me.changingFilters=!1}},completeEdit:function(e){var me=this;this.callParent([e]);me.doQueryTask.cancel();me.assertValue();if(me.queryFilter&&me.queryMode==='local'&&me.clearFilterOnBlur){me.clearLocalFilter()}},onFocus:function(e){var me=this;me.callParent([e]);if(me.triggerAction!=='all'&&me.queryFilter&&me.queryMode==='local'&&me.clearFilterOnBlur){delete me.lastQuery;me.doRawQuery()}},onAltDownArrow:function(e){e.stopEvent();if(!this.isExpanded){this.onDownArrow(e)}
return!1},onAltUpArrow:function(e){e.stopEvent();if(this.isExpanded){this.onEsc(e)}
return!1},assertValue:function(){var me=this,rawValue=me.getRawValue(),displayValue=me.getDisplayValue(),lastRecords=me.lastSelectedRecords,preventChange=!1,needToSelect=!1,value,rec;if(me.forceSelection){if(me.multiSelect){if(rawValue!==displayValue){me.setRawValue(displayValue)}}else{rec=me.findRecordByDisplay(rawValue);if(!rec){if(me.displayTplData&&me.displayTplData.length){rec=me.findRecordByValue(me.displayTplData[0][me.valueField])}
if(!rec&&lastRecords&&(!me.allowBlank||me.rawValue)){rec=lastRecords[0];needToSelect=!0}}else if(me.getDisplayValue([me.getRecordDisplayData(rec)])===displayValue){rec=null;preventChange=!0}
if(rec){if(needToSelect||!(lastRecords&&lastRecords[0]===rec)){me.select(rec,!0);me.fireEvent('select',me,rec)}}else if(!preventChange){if(lastRecords){delete me.lastSelectedRecords}
me.setRawValue('')}}}else if((value=me.getValue())&&value==rawValue){rec=me.findRecordByDisplay(value);if(rec&&(rec!==(lastRecords&&lastRecords[0])||me.displayField!==me.valueField)){me.select(rec,!0);me.fireEvent('select',me,rec)}}
me.collapse()},onTypeAhead:function(){var me=this,displayField=me.displayField,record=me.store.findRecord(displayField,me.getRawValue()),newValue,len,selStart;if(record){newValue=record.get(displayField);len=newValue.length;selStart=me.getRawValue().length;if(selStart!==0&&selStart!==len){me.lastMutatedValue=newValue;me.setRawValue(newValue);me.selectText(selStart,newValue.length)}}},resetToDefault:Ext.emptyFn,beforeReset:function(){this.callParent();this.clearLocalFilter()},onUnbindStore:function(){var me=this,picker=me.picker;if(me.queryFilter&&!me.store.destroyed){me.clearLocalFilter()}
if(picker){picker.bindStore(null)}
me.pickerSelectionModel.destroy()},onBindStore:function(store,initial){var me=this,picker=me.picker,extraKeySpec,valueCollectionConfig;if(store){if(store.autoCreated){me.queryMode='local';me.valueField=me.displayField='field1';if(!store.expanded){me.displayField='field2'}
if(me.getDisplayTpl().auto){me.setDisplayTpl(null)}}
if(!Ext.isDefined(me.valueField)){me.valueField=me.displayField}
extraKeySpec={byValue:{rootProperty:'data',unique:!1}};extraKeySpec.byValue.property=me.valueField;store.setExtraKeys(extraKeySpec);if(me.displayField===me.valueField){store.byText=store.byValue}else{extraKeySpec.byText={rootProperty:'data',unique:!1};extraKeySpec.byText.property=me.displayField;store.setExtraKeys(extraKeySpec)}
valueCollectionConfig={rootProperty:'data',extraKeys:{byInternalId:{property:'internalId'},byValue:{property:me.valueField,rootProperty:'data'}},listeners:{beginupdate:me.onValueCollectionBeginUpdate,endupdate:me.onValueCollectionEndUpdate,scope:me}};me.valueCollection=new Ext.util.Collection(valueCollectionConfig);me.pickerSelectionModel=new Ext.selection.DataViewModel({mode:me.multiSelect?'SIMPLE':'SINGLE',ordered:!0,deselectOnContainerClick:!1,enableInitialSelection:!1,pruneRemoved:!1,selected:me.valueCollection,store:store,listeners:{scope:me,lastselectedchanged:me.updateBindSelection}});if(!initial){me.resetToDefault()}
if(picker){me.pickerSelectionModel.on({scope:me,beforeselect:me.onBeforeSelect,beforedeselect:me.onBeforeDeselect});picker.setSelectionModel(me.pickerSelectionModel);if(picker.getStore()!==store){picker.bindStore(store)}}}},bindStore:function(store,preventFilter,initial){var me=this,filter=me.queryFilter;me.mixins.storeholder.bindStore.call(me,store,initial);store=me.getStore();if(store&&filter&&!preventFilter){store.getFilters().add(filter)}
if(!initial&&store&&!store.isEmptyStore){me.setValueOnData()}},getStoreListeners:function(store){var me=this,result;if(!store.isEmptyStore){result={datachanged:me.onDataChanged,load:me.onLoad,exception:me.onException,update:me.onStoreUpdate,remove:me.checkValueOnChange};if(!store.getRemoteFilter()){result.filterchange=me.checkValueOnChange}
return result}},onDataChanged:function(){if(this.grow&&this.growToLongestValue){this.autoSize()}},checkValueOnChange:function(){var me=this;if(!me.destroying&&me.getStore().isLoaded()){if(me.multiSelect){}else{if(me.forceSelection&&!me.changingFilters&&!me.findRecordByValue(me.value)){if(me.queryMode!=='local'&&(me.hasFocus||me.isPaging)){return}
me.setValue(null)}}}},onStoreUpdate:function(store,record){this.updateValue()},onException:function(){this.isPaging=!1;this.collapse()},onLoad:function(store,records,success){var me=this,needsValueUpdating=!me.valueCollection.byValue.get(me.value);if(success&&needsValueUpdating&&!me.isPaging&&!(store.lastOptions&&'rawQuery' in store.lastOptions)){me.setValueOnData()}
me.checkValueOnChange();me.isPaging=!1},setValueOnData:function(){var me=this;me.setValue(me.value);if(me.isExpanded&&me.getStore().getCount()){me.doAutoSelect()}},doRawQuery:function(){var me=this,rawValue=me.inputEl.dom.value;if(me.multiSelect){rawValue=rawValue.split(me.delimiter).pop()}
me.doQuery(rawValue,!1,!0)},doQuery:function(queryString,forceAll,rawQuery){var me=this,store=me.getStore(),filters=store.getFilters(),queryPlan=me.beforeQuery({lastQuery:me.lastQuery||'',query:queryString||'',rawQuery:rawQuery,forceAll:forceAll,combo:me,cancel:!1}),refreshFilters;if(queryPlan!==!1&&!queryPlan.cancel){refreshFilters=!!queryString&&(!me.queryFilter||me.queryFilter&&(filters.indexOf(me.queryFilter)<0));if(me.queryCaching&&!refreshFilters&&queryPlan.query===me.lastQuery){me.getPicker().refresh();me.expand();me.afterQuery(queryPlan)}else{me.lastQuery=queryPlan.query;if(me.queryMode==='local'){me.doLocalQuery(queryPlan)}else{me.doRemoteQuery(queryPlan)}}
return!0}else{me.startCheckChangeTask()}
return!1},beforeQuery:function(queryPlan){var me=this;if(me.fireEvent('beforequery',queryPlan)===!1){queryPlan.cancel=!0}else if(!queryPlan.cancel){if(queryPlan.query.length<me.minChars&&!queryPlan.forceAll){queryPlan.cancel=!0}}
return queryPlan},doLocalQuery:function(queryPlan){var me=this,queryString=queryPlan.query,store=me.getStore(),value=queryString,filter;me.clearLocalFilter();if(queryString){if(me.enableRegEx){try{value=new RegExp(value)}catch(e){value=null}}
if(value!==null){me.changingFilters=!0;filter=me.queryFilter=new Ext.util.Filter({id:me.id+'-filter',anyMatch:me.anyMatch,caseSensitive:me.caseSensitive,root:'data',property:me.displayField,value:value});store.addFilter(filter,!0);me.changingFilters=!1}}
if(me.store.getCount()||me.getPicker().emptyText){me.getPicker().refresh();me.expand()}else{me.collapse()}
me.afterQuery(queryPlan)},doRemoteQuery:function(queryPlan){var me=this,loadCallback=function(){if(!me.destroyed){me.afterQuery(queryPlan)}};me.expand();if(me.pageSize){me.loadPage(1,{rawQuery:queryPlan.rawQuery,callback:loadCallback})}else{me.store.load({params:me.getParams(queryPlan.query),rawQuery:queryPlan.rawQuery,callback:loadCallback})}},afterQuery:function(queryPlan){var me=this;if(me.store.getCount()){if(me.typeAhead){me.doTypeAhead(queryPlan)}
if(queryPlan.rawQuery){if(me.picker&&!me.picker.getSelectionModel().hasSelection()){me.doAutoSelect()}}else{me.doAutoSelect()}}
me.startCheckChangeTask()},loadPage:function(pageNum,options){this.isPaging=!0;this.store.loadPage(pageNum,Ext.apply({params:this.getParams(this.lastQuery)},options))},onPageChange:function(toolbar,newPage){this.loadPage(newPage);return!1},getParams:function(queryString){var params={},param=this.queryParam;if(param){params[param]=queryString}
return params},doAutoSelect:function(){var me=this,store=me.store,picker=me.picker,itemNode=0,selectionModel,lastSelected;if(picker&&me.autoSelect&&store.getCount()>0){if(me.autoSelectLast){selectionModel=picker.getSelectionModel();lastSelected=selectionModel.lastSelected;if(lastSelected&&selectionModel.selected.length&&store.indexOf(lastSelected)>-1){itemNode=lastSelected}}
picker.getNavigationModel().setPosition(itemNode)}},doTypeAhead:function(queryPlan){var me=this;if(!me.typeAheadTask){me.typeAheadTask=new Ext.util.DelayedTask(me.onTypeAhead,me)}
if(queryPlan.query.length>queryPlan.lastQuery.length||!Ext.String.startsWith(queryPlan.lastQuery,queryPlan.query)){me.typeAheadTask.delay(me.typeAheadDelay)}},onTriggerClick:function(comboBox,trigger,e){var me=this,oldAutoSelect;if(!me.readOnly&&!me.disabled){if(me.isExpanded){me.collapse()}else{if(e&&e.type==='keydown'&&e.altKey){oldAutoSelect=me.autoSelect;me.autoSelect=!1;me.expand();me.autoSelect=oldAutoSelect}else{if(me.triggerAction==='all'){me.doQuery(me.allQuery,!0)}else if(me.triggerAction==='last'){me.doQuery(me.lastQuery,!0)}else{me.doQuery(me.getRawValue(),!1,!0)}}}}},onFieldMutation:function(e){var me=this,key=e.getKey(),isDelete=key===e.BACKSPACE||key===e.DELETE,rawValue=me.inputEl.dom.value,len=rawValue.length;if(!me.readOnly&&(rawValue!==me.lastMutatedValue||isDelete)&&key!==e.TAB){me.lastMutatedValue=rawValue;me.refreshEmptyText();if(len&&(e.type!=='keyup'||(!e.isSpecialKey()||isDelete))){me.doQueryTask.delay(me.queryDelay)}else{if(!len&&(!key||isDelete)){++me.suspendCheckChange;if(!me.multiSelect){me.value=null;me.displayTplData=undefined}
if(me.clearValueOnEmpty){me.valueCollection.beginUpdate();me.pickerSelectionModel.deselectAll();me.valueCollection.removeAll();me.valueCollection.endUpdate()}
me.collapse();if(me.queryFilter){me.clearLocalFilter()}
me.lastQuery=null;--me.suspendCheckChange}
me.callParent([e])}}},doDestroy:function(){var me=this;me.doQueryTask.cancel();if(me.typeAheadTask){me.typeAheadTask.cancel();me.typeAheadTask=null}
me.bindStore(null);Ext.destroy(me.altArrowKeyNav,me.valueCollection);me.callParent()},onAdded:function(){var me=this;me.callParent(arguments);if(me.picker){me.picker.ownerCt=me.up('[floating]');me.picker.registerWithOwnerCt()}},createPicker:function(){var me=this,picker,pickerCfg=Ext.apply({xtype:'boundlist',id:me.id+'-picker',pickerField:me,selectionModel:me.pickerSelectionModel,floating:!0,hidden:!0,store:me.getPickerStore(),displayField:me.displayField,preserveScrollOnRefresh:!0,pageSize:me.pageSize,tpl:me.tpl,ariaSelectable:me.ariaSelectable},me.listConfig,me.defaultListConfig);picker=me.picker=Ext.widget(pickerCfg);if(me.pageSize){picker.pagingToolbar.on('beforechange',me.onPageChange,me)}
if(!picker.initialConfig.maxHeight){picker.on({beforeshow:me.onBeforePickerShow,scope:me})}
picker.getSelectionModel().on({beforeselect:me.onBeforeSelect,beforedeselect:me.onBeforeDeselect,focuschange:me.onFocusChange,scope:me});picker.getNavigationModel().navigateOnSpace=!1;return picker},getPickerStore:function(){return this.store},onBeforePickerShow:function(picker){var me=this,heightAbove=me.getPosition()[1]-Ext.getBody().getScroll().top,heightBelow=Ext.Element.getViewportHeight()-heightAbove-me.getHeight();picker.maxHeight=Math.max(heightAbove,heightBelow)-5},onBeforeSelect:function(list,record,recordIndex){return this.fireEvent('beforeselect',this,record,recordIndex)},onBeforeDeselect:function(list,record,recordIndex){return this.fireEvent('beforedeselect',this,record,recordIndex)},onFocusChange:function(selModel,prevRecord,newRecord){var picker=this.picker,inputEl=this.inputEl,el;if(newRecord){el=picker.getNodeByRecord(newRecord);if(el){if(!el.id){el.id=Ext.id()}
inputEl.dom.setAttribute('aria-activedescendant',el.id)}else{inputEl.dom.removeAttribute('aria-activedescendant')}}},getSelection:function(){var selModel=this.getPicker().getSelectionModel(),selection=selModel.getSelection();return selection.length?selModel.getLastSelected():null},updateSelection:function(selection){var me=this,sm;if(!me.ignoreNextSelection){me.ignoreNextSelection=!0;sm=me.getPicker().getSelectionModel();if(selection){sm.select(selection);me.hasHadSelection=!0}else{sm.deselectAll()}
me.ignoreNextSelection=!1}},updateBindSelection:function(selModel,selection){var me=this,selected=null;if(!me.ignoreNextSelection){me.ignoreNextSelection=!0;if(selection.length){selected=selModel.getLastSelected();me.hasHadSelection=!0}
if(me.hasHadSelection){me.setSelection(selected)}
me.ignoreNextSelection=!1}},onValueCollectionBeginUpdate:Ext.emptyFn,onValueCollectionEndUpdate:function(){var me=this,store=me.store,selectedRecords=me.valueCollection.getRange(),selectedRecord=selectedRecords[0],selectionCount=selectedRecords.length;me.updateBindSelection(me.pickerSelectionModel,selectedRecords);if(me.isSelectionUpdating()){return}
Ext.suspendLayouts();me.lastSelection=selectedRecords;if(selectionCount){me.lastSelectedRecords=selectedRecords}
me.updateValue();if(selectionCount&&((!me.multiSelect&&store.contains(selectedRecord))||me.collapseOnSelect||!store.getCount())){me.updatingValue=!0;me.collapse();me.updatingValue=!1}
Ext.resumeLayouts(!0);if(!me.suspendCheckChange){if(!me.multiSelect){selectedRecords=selectedRecord}
me.fireEvent('select',me,selectedRecords)}},isSelectionUpdating:function(){var selModel=this.pickerSelectionModel;return selModel.deselectingDuringSelect||selModel.refreshing},onExpand:function(){var me=this,picker=me.getPicker(),keyNav=picker.getNavigationModel(),node;if(keyNav){keyNav.enable()}
me.doAutoSelect();node=picker.highlightedItem;if(node){if(!node.id){node.id=Ext.id()}
me.inputEl.dom.setAttribute('aria-activedescendant',node.id)}},onCollapse:function(){var me=this,keyNav=me.getPicker().getNavigationModel();if(keyNav){keyNav.disable()}
if(me.updatingValue){me.doQueryTask.cancel()}
me.inputEl.dom.removeAttribute('aria-activedescendant')},select:function(r,assert){var me=this,picker=me.picker,fireSelect;if(r&&r.isModel&&assert===!0&&picker){fireSelect=!picker.getSelectionModel().isSelected(r)}
if(!fireSelect){me.suspendEvent('select')}
me.setValue(r);me.resumeEvent('select')},findRecord:function(field,value){var ds=this.store,idx=ds.findExact(field,value);return idx!==-1?ds.getAt(idx):!1},getSelectedRecord:function(){return this.findRecordByValue(this.value)||null},findRecordByValue:function(value){var result=this.store.byValue.get(value),ret=!1;if(result){ret=result[0]||result}
return ret},findRecordByDisplay:function(value){var result=this.store.byText.get(value),ret=!1;if(result){ret=result[0]||result}
return ret},addValue:function(value){if(value!=null){return this.doSetValue(value,!0)}},setValue:function(value){var me=this,bind,valueBind;if(!me.getDisplayField()&&!me.getDisplayTpl()){Ext.error.raise('Combobox must have either displayField or displayTpl')}
if(me.hasFocus){bind=me.getBind();valueBind=bind&&bind.value;if(valueBind&&valueBind.syncing){if((Ext.isEmpty(value)&&Ext.isEmpty(me.value))||value===me.value){return me}else if(Ext.isArray(value)&&Ext.isArray(me.value)&&Ext.Array.equals(value,me.value)){return me}}}else{me.lastSelectedRecords=null}
if(value!=null){me.doSetValue(value)}else{me.suspendEvent('select');me.valueCollection.beginUpdate();me.pickerSelectionModel.deselectAll();me.valueCollection.endUpdate();me.resumeEvent('select')}
return me},setRawValue:function(rawValue){this.callParent([rawValue]);this.lastMutatedValue=rawValue},doSetValue:function(value,add){var me=this,store=me.getStore(),Model=store.getModel(),matchedRecords=[],valueArray=[],autoLoadOnValue=me.autoLoadOnValue,isLoaded=store.getCount()>0||store.isLoaded(),pendingLoad=store.hasPendingLoad(),unloaded=autoLoadOnValue&&!isLoaded&&!pendingLoad,forceSelection=me.forceSelection,selModel=me.pickerSelectionModel,displayField=me.displayField,valueField=me.valueField,displayIsValue=displayField===valueField,isEmptyStore=store.isEmptyStore,lastSelection=me.lastSelection,i,len,record,dataObj,valueChanged,key,val;if(add&&!me.multiSelect){Ext.raise('Cannot add values to non multiSelect ComboBox')}
if(pendingLoad||unloaded||!isLoaded||isEmptyStore){if(!value.isModel){if(add){me.value=Ext.Array.from(me.value).concat(value)}else{me.value=value}
me.setHiddenValue(me.value);me.setRawValue(displayIsValue?value:'');if(displayIsValue&&!Ext.isEmpty(value)&&me.inputEl&&me.emptyText){me.inputEl.removeCls(me.emptyUICls)}}
if(unloaded&&!isEmptyStore){store.load()}
if(!value.isModel||isEmptyStore){return me}}
value=add?Ext.Array.from(me.value).concat(value):Ext.Array.from(value);for(i=0,len=value.length;i<len;i++){record=val=value[i];if(!record||!record.isModel){record=me.findRecordByValue(key=record);if(!record){record=me.valueCollection.find(valueField,key)}}
if(!record){if(!forceSelection){if(!record&&val){dataObj={};if(Ext.isObject(val)){dataObj[displayField]=val[displayField];dataObj[valueField]=val[valueField]}else{dataObj[displayField]=val;if(valueField&&displayField!==valueField){dataObj[valueField]=val}}
record=new Model(dataObj)}}else if(me.valueNotFoundRecord){record=me.valueNotFoundRecord}}
if(record){matchedRecords.push(record);valueArray.push(record.get(valueField))}}
if(lastSelection){len=lastSelection.length;if(len===matchedRecords.length){for(i=0;!valueChanged&&i<len;i++){if(Ext.Array.indexOf(me.lastSelection,matchedRecords[i])===-1){valueChanged=!0}}}else{valueChanged=!0}}else{valueChanged=matchedRecords.length}
if(valueChanged){me.suspendEvent('select');me.valueCollection.beginUpdate();if(matchedRecords.length){selModel.select(matchedRecords,!1)}else{selModel.deselectAll()}
me.valueCollection.endUpdate();me.resumeEvent('select')}else{me.updateValue()}
return me},updateValue:function(){var me=this,selectedRecords=me.valueCollection.getRange(),len=selectedRecords.length,valueArray=[],displayTplData=me.displayTplData||(me.displayTplData=[]),inputEl=me.inputEl,i,record,displayValue;displayTplData.length=0;for(i=0;i<len;i++){record=selectedRecords[i];displayTplData.push(me.getRecordDisplayData(record));if(record!==me.valueNotFoundRecord){valueArray.push(record.get(me.valueField))}}
me.setHiddenValue(valueArray);me.value=me.multiSelect?valueArray:valueArray[0];if(!Ext.isDefined(me.value)){me.value=undefined}
me.displayTplData=displayTplData;displayValue=me.getDisplayValue();me.setRawValue(displayValue);me.refreshEmptyText();me.checkChange();if(!me.lastSelectedRecords&&selectedRecords.length){me.lastSelectedRecords=selectedRecords}
if(inputEl&&me.typeAhead&&me.hasFocus){me.selectText(displayValue.length)}},setHiddenValue:function(values){var me=this,name=me.hiddenName,i,dom,childNodes,input,valueCount,childrenCount;if(!me.hiddenDataEl||!name){return}
values=Ext.Array.from(values);dom=me.hiddenDataEl.dom;childNodes=dom.childNodes;input=childNodes[0];valueCount=values.length;childrenCount=childNodes.length;if(!input&&valueCount>0){me.hiddenDataEl.setHtml(Ext.DomHelper.markup({tag:'input',type:'hidden',name:name}));childrenCount=1;input=dom.firstChild}
while(childrenCount>valueCount){dom.removeChild(childNodes[0]);--childrenCount}
while(childrenCount<valueCount){dom.appendChild(input.cloneNode(!0));++childrenCount}
for(i=0;i<valueCount;i++){childNodes[i].value=values[i]}},getDisplayValue:function(tplData){var s;tplData=tplData||this.displayTplData;s=this.getDisplayTpl().apply(tplData);s=(s==null)?'':String(s);return s.replace(this.newlineRe,'')},getRecordDisplayData:function(record){return record.data},getValue:function(){var me=this,store=me.getStore(),picker=me.picker,rawValue=me.getRawValue(),value=me.value;if(!store.isEmptyStore&&me.getDisplayValue()!==rawValue){me.displayTplData=undefined;if(picker){me.valueCollection.suspendEvents();picker.getSelectionModel().deselectAll();me.valueCollection.resumeEvents();me.lastSelection=null}
if(store.isLoaded()&&(me.multiSelect||me.forceSelection)){value=me.value=undefined}else{value=me.value=rawValue}}
me.value=value==null?null:value;return me.value},getSubmitValue:function(){var value=this.getValue();if(Ext.isEmpty(value)){value=''}
return value},isEqual:function(v1,v2){var fromArray=Ext.Array.from,i,len;v1=fromArray(v1);v2=fromArray(v2);len=v1.length;if(len!==v2.length){return!1}
for(i=0;i<len;i++){if(v2[i]!==v1[i]){return!1}}
return!0},clearValue:function(){this.setValue(null)}})
;
Ext.define('Ext.picker.Month',{extend:'Ext.Component',alias:'widget.monthpicker',alternateClassName:'Ext.MonthPicker',requires:['Ext.XTemplate','Ext.util.ClickRepeater','Ext.Date','Ext.button.Button'],isMonthPicker:!0,focusable:!0,childEls:['bodyEl','prevEl','nextEl','monthEl','yearEl','buttons'],renderTpl:['<div id="{id}-bodyEl" data-ref="bodyEl" class="{baseCls}-body">','<div id="{id}-monthEl" data-ref="monthEl" class="{baseCls}-months">','<tpl for="months">','<div class="{parent.baseCls}-item {parent.baseCls}-month">','<a style="{parent.monthStyle}" role="button" hidefocus="on" class="{parent.baseCls}-item-inner">{.}</a>','</div>','</tpl>','</div>','<div id="{id}-yearEl" data-ref="yearEl" class="{baseCls}-years">','<div class="{baseCls}-yearnav">','<div class="{baseCls}-yearnav-button-ct">','<a id="{id}-prevEl" data-ref="prevEl" class="{baseCls}-yearnav-button {baseCls}-yearnav-prev" hidefocus="on" role="button"></a>','</div>','<div class="{baseCls}-yearnav-button-ct">','<a id="{id}-nextEl" data-ref="nextEl" class="{baseCls}-yearnav-button {baseCls}-yearnav-next" hidefocus="on" role="button"></a>','</div>','</div>','<tpl for="years">','<div class="{parent.baseCls}-item {parent.baseCls}-year">','<a hidefocus="on" class="{parent.baseCls}-item-inner" role="button">{.}</a>','</div>','</tpl>','</div>','<div class="'+Ext.baseCSSPrefix+'clear"></div>','<tpl if="showButtons">','<div id="{id}-buttons" data-ref="buttons" class="{baseCls}-buttons">{%','var me=values.$comp, okBtn=me.okBtn, cancelBtn=me.cancelBtn;','okBtn.ownerLayout = cancelBtn.ownerLayout = me.componentLayout;','okBtn.ownerCt = cancelBtn.ownerCt = me;','Ext.DomHelper.generateMarkup(okBtn.getRenderTree(), out);','Ext.DomHelper.generateMarkup(cancelBtn.getRenderTree(), out);','%}</div>','</tpl>','</div>'],okText:'OK',cancelText:'Cancel',baseCls:Ext.baseCSSPrefix+'monthpicker',showButtons:!0,footerButtonUI:'default',measureWidth:35,measureMaxHeight:20,smallCls:Ext.baseCSSPrefix+'monthpicker-small',totalYears:10,yearOffset:5,monthOffset:6,alignOnScroll:!1,initComponent:function(){var me=this;me.selectedCls=me.baseCls+'-selected';if(me.small){me.addCls(me.smallCls)}
me.setValue(me.value);me.activeYear=me.getYear(new Date().getFullYear()-4,-4);if(me.showButtons){me.okBtn=new Ext.button.Button({ui:me.footerButtonUI,text:me.okText,handler:me.onOkClick,scope:me});me.cancelBtn=new Ext.button.Button({ui:me.footerButtonUI,text:me.cancelText,handler:me.onCancelClick,scope:me})}
me.callParent()},beforeRender:function(){var me=this,i=0,months=[],shortName=Ext.Date.getShortMonthName,monthLen=me.monthOffset,margin=me.monthMargin,style='';if(me.padding&&!me.width){me.cacheWidth()}
me.callParent();for(;i<monthLen;++i){months.push(shortName(i),shortName(i+monthLen))}
if(Ext.isDefined(margin)){style='margin: 0 '+margin+'px;'}
Ext.apply(me.renderData,{months:months,years:me.getYears(),showButtons:me.showButtons,monthStyle:style})},cacheWidth:function(){var me=this,padding=me.parseBox(me.padding),widthEl=Ext.getBody().createChild({cls:me.baseCls+' '+me.borderBoxCls,style:'position:absolute;top:-1000px;left:-1000px;',html:'&nbsp;'});me.self.prototype.width=widthEl.getWidth()+padding.left+padding.right;widthEl.destroy()},afterRender:function(){var me=this,body=me.bodyEl;me.callParent();if(me.up('[floating=true]')){me.el.on('mousedown',me.onElClick,me,{translate:!1})}
body.on({scope:me,click:'onBodyClick',dblclick:'onBodyClick'});me.years=body.select('.'+me.baseCls+'-year a');me.months=body.select('.'+me.baseCls+'-month a');me.backRepeater=new Ext.util.ClickRepeater(me.prevEl,{handler:Ext.Function.bind(me.adjustYear,me,[-me.totalYears])});me.prevEl.addClsOnOver(me.baseCls+'-yearnav-prev-over');me.nextRepeater=new Ext.util.ClickRepeater(me.nextEl,{handler:Ext.Function.bind(me.adjustYear,me,[me.totalYears])});me.nextEl.addClsOnOver(me.baseCls+'-yearnav-next-over');me.updateBody();if(!Ext.isDefined(me.monthMargin)){Ext.picker.Month.prototype.monthMargin=me.calculateMonthMargin()}},calculateMonthMargin:function(){var me=this,months=me.months,first=months.first(),itemMargin=first.getMargin('l');while(itemMargin&&me.getLargest()>me.measureMaxHeight){--itemMargin;months.setStyle('margin','0 '+itemMargin+'px')}
return itemMargin},getLargest:function(months){var largest=0;this.months.each(function(item){var h=item.getHeight();if(h>largest){largest=h}});return largest},setValue:function(value){var me=this,active=me.activeYear,year;if(!value){me.value=[null,null]}else if(Ext.isDate(value)){me.value=[value.getMonth(),value.getFullYear()]}else{me.value=[value[0],value[1]]}
if(me.rendered){year=me.value[1];if(year!==null){if((year<active||year>active+me.yearOffset)){me.activeYear=year-me.yearOffset+1}}
me.updateBody()}
return me},getValue:function(){return this.value},hasSelection:function(){var value=this.value;return value[0]!==null&&value[1]!==null},getYears:function(){var me=this,offset=me.yearOffset,start=me.activeYear,end=start+offset,i=start,years=[];for(;i<end;++i){years.push(i,i+offset)}
return years},updateBody:function(){var me=this,years=me.years,months=me.months,yearNumbers=me.getYears(),cls=me.selectedCls,value=me.getYear(null),month=me.value[0],monthOffset=me.monthOffset,year,yearItems,y,yLen,el;if(me.rendered){years.removeCls(cls);months.removeCls(cls);yearItems=years.elements;yLen=yearItems.length;for(y=0;y<yLen;y++){el=Ext.fly(yearItems[y]);year=yearNumbers[y];el.dom.innerHTML=year;if(year===value){el.addCls(cls)}}
if(month!==null){if(month<monthOffset){month=month*2}else{month=(month-monthOffset)*2+1}
months.item(month).addCls(cls)}}},getYear:function(defaultValue,offset){var year=this.value[1];offset=offset||0;return year===null?defaultValue:year+offset},onElClick:function(e){e.stopEvent()},onBodyClick:function(e,t){var me=this,isDouble=e.type==='dblclick';if(e.getTarget('.'+me.baseCls+'-month')){e.stopEvent();me.onMonthClick(t,isDouble)}else if(e.getTarget('.'+me.baseCls+'-year')){e.stopEvent();me.onYearClick(t,isDouble)}},adjustYear:function(offset){if(typeof offset!=='number'){offset=this.totalYears}
this.activeYear+=offset;this.updateBody()},onOkClick:function(){this.fireEvent('okclick',this,this.value)},onCancelClick:function(){this.fireEvent('cancelclick',this)},onMonthClick:function(target,isDouble){var me=this;me.value[0]=me.resolveOffset(me.months.indexOf(target),me.monthOffset);me.updateBody();me.fireEvent('month'+(isDouble?'dbl':'')+'click',me,me.value);me.fireEvent('select',me,me.value)},onYearClick:function(target,isDouble){var me=this;me.value[1]=me.activeYear+me.resolveOffset(me.years.indexOf(target),me.yearOffset);me.updateBody();me.fireEvent('year'+(isDouble?'dbl':'')+'click',me,me.value);me.fireEvent('select',me,me.value)},resolveOffset:function(index,offset){if(index%2===0){return(index/2)}else{return offset+Math.floor(index/2)}},doDestroy:function(){Ext.destroy(this.backRepeater,this.nextRepeater,this.okBtn,this.cancelBtn);this.callParent()},privates:{finishRenderChildren:function(){var me=this;this.callParent(arguments);if(this.showButtons){me.okBtn.finishRender();me.cancelBtn.finishRender()}}}})
;
Ext.define('Ext.theme.neptune.picker.Month',{override:'Ext.picker.Month',measureMaxHeight:36})
;
Ext.define('Ext.theme.triton.picker.Month',{override:'Ext.picker.Month',footerButtonUI:'default-toolbar',calculateMonthMargin:Ext.emptyFn})
;
Ext.define('Ext.picker.Date',{extend:'Ext.Component',alias:'widget.datepicker',alternateClassName:'Ext.DatePicker',requires:['Ext.XTemplate','Ext.button.Button','Ext.button.Split','Ext.util.ClickRepeater','Ext.util.KeyNav','Ext.fx.Manager','Ext.picker.Month'],todayText:'Today',ariaTitle:'Date Picker: {0}',ariaTitleDateFormat:'F d',todayTip:'{0} (Spacebar)',minText:'This date is before the minimum date',ariaMinText:"This date is before the minimum date",maxText:'This date is after the maximum date',ariaMaxText:"This date is after the maximum date",disabledDaysText:'Disabled',ariaDisabledDaysText:"This day of week is disabled",disabledDatesText:'Disabled',ariaDisabledDatesText:"This date is disabled",nextText:'Next Month (Control+Right)',prevText:'Previous Month (Control+Left)',monthYearText:'Choose a month (Control+Up/Down to move years)',monthYearFormat:'F Y',showToday:!0,disableAnim:!1,baseCls:Ext.baseCSSPrefix+'datepicker',longDayFormat:'F d, Y',footerButtonUI:'default',isDatePicker:!0,alignOnScroll:!1,ariaRole:'region',focusable:!0,childEls:['innerEl','eventEl','prevEl','nextEl','middleBtnEl','footerEl'],border:!0,renderTpl:['<div id="{id}-innerEl" data-ref="innerEl" role="presentation">','<div class="{baseCls}-header">','<div id="{id}-prevEl" data-ref="prevEl" class="{baseCls}-prev {baseCls}-arrow" role="presentation" title="{prevText}"></div>','<div id="{id}-middleBtnEl" data-ref="middleBtnEl" class="{baseCls}-month" role="heading">{%this.renderMonthBtn(values, out)%}</div>','<div id="{id}-nextEl" data-ref="nextEl" class="{baseCls}-next {baseCls}-arrow" role="presentation" title="{nextText}"></div>','</div>','<table role="grid" id="{id}-eventEl" data-ref="eventEl" class="{baseCls}-inner" cellspacing="0" tabindex="0" aria-readonly="true">','<thead>','<tr role="row">','<tpl for="dayNames">','<th role="columnheader" class="{parent.baseCls}-column-header" aria-label="{.}">','<div role="presentation" class="{parent.baseCls}-column-header-inner">{.:this.firstInitial}</div>','</th>','</tpl>','</tr>','</thead>','<tbody>','<tr role="row">','<tpl for="days">','{#:this.isEndOfWeek}','<td role="gridcell">','<div hidefocus="on" class="{parent.baseCls}-date"></div>','</td>','</tpl>','</tr>','</tbody>','</table>','<tpl if="showToday">','<div id="{id}-footerEl" data-ref="footerEl" role="presentation" class="{baseCls}-footer">{%this.renderTodayBtn(values, out)%}</div>','</tpl>','<div id="{id}-todayText" class="'+Ext.baseCSSPrefix+'hidden-clip">{todayText}.</div>','<div id="{id}-ariaMinText" class="'+Ext.baseCSSPrefix+'hidden-clip">{ariaMinText}.</div>','<div id="{id}-ariaMaxText" class="'+Ext.baseCSSPrefix+'hidden-clip">{ariaMaxText}.</div>','<div id="{id}-ariaDisabledDaysText" class="'+Ext.baseCSSPrefix+'hidden-clip">{ariaDisabledDaysText}.</div>','<div id="{id}-ariaDisabledDatesText" class="'+Ext.baseCSSPrefix+'hidden-clip">{ariaDisabledDatesText}.</div>','</div>',{firstInitial:function(value){return Ext.picker.Date.prototype.getDayInitial(value)},isEndOfWeek:function(value){value--;var end=value%7===0&&value!==0;return end?'</tr><tr role="row">':''},renderTodayBtn:function(values,out){Ext.DomHelper.generateMarkup(values.$comp.todayBtn.getRenderTree(),out)},renderMonthBtn:function(values,out){Ext.DomHelper.generateMarkup(values.$comp.monthBtn.getRenderTree(),out)}}],initHour:12,numDays:42,initComponent:function(){var me=this,clearTime=Ext.Date.clearTime;me.selectedCls=me.baseCls+'-selected';me.disabledCellCls=me.baseCls+'-disabled';me.prevCls=me.baseCls+'-prevday';me.activeCls=me.baseCls+'-active';me.cellCls=me.baseCls+'-cell';me.nextCls=me.baseCls+'-prevday';me.todayCls=me.baseCls+'-today';me.defaultValue=Ext.isDate(me.defaultValue)?me.defaultValue:new Date();if(!me.format){me.format=Ext.Date.defaultFormat}
if(!me.dayNames){me.dayNames=Ext.Date.dayNames}
if(me.startDay==null){me.startDay=Ext.Date.firstDayOfWeek}
me.dayNames=me.dayNames.slice(me.startDay).concat(me.dayNames.slice(0,me.startDay));me.callParent();me.value=me.value?clearTime(me.value,!0):clearTime(me.defaultValue);me.initDisabledDays()},getRefOwner:function(){return this.pickerField||this.callParent()},getRefItems:function(){var results=[],monthBtn=this.monthBtn,todayBtn=this.todayBtn;if(monthBtn){results.push(monthBtn)}
if(todayBtn){results.push(todayBtn)}
return results},beforeRender:function(){var me=this,encode=Ext.String.htmlEncode,days=new Array(me.numDays),today=Ext.Date.format(new Date(),me.format);if(me.padding&&!me.width){me.cacheWidth()}
me.monthBtn=new Ext.button.Button({ownerCt:me,ownerLayout:me.getComponentLayout(),text:'',tooltip:me.monthYearText,tabIndex:-1,ariaRole:'presentation',showEmptyMenu:!1,menu:[],listeners:{click:me.doShowMonthPicker,scope:me}});if(me.showToday){me.todayBtn=new Ext.button.Button({ui:me.footerButtonUI,ownerCt:me,ownerLayout:me.getComponentLayout(),text:Ext.String.format(me.todayText,today),tooltip:Ext.String.format(me.todayTip,today),tooltipType:'title',tabIndex:-1,ariaRole:'presentation',handler:me.selectToday,scope:me})}
me.callParent();Ext.applyIf(me,{renderData:{}});Ext.apply(me.renderData,{dayNames:me.dayNames,showToday:me.showToday,prevText:encode(me.prevText),nextText:encode(me.nextText),todayText:encode(me.todayText),ariaMinText:encode(me.ariaMinText),ariaMaxText:encode(me.ariaMaxText),ariaDisabledDaysText:encode(me.ariaDisabledDaysText),ariaDisabledDatesText:encode(me.ariaDisabledDatesText),days:days});me.protoEl.unselectable()},cacheWidth:function(){var me=this,padding=me.parseBox(me.padding),widthEl=Ext.getBody().createChild({cls:me.baseCls+' '+me.borderBoxCls,style:'position:absolute;top:-1000px;left:-1000px;'});me.self.prototype.width=widthEl.getWidth()+padding.left+padding.right;widthEl.destroy()},onRender:function(container,position){var me=this,dateCellSelector='div.'+me.baseCls+'-date';me.callParent(arguments);me.cells=me.eventEl.select('tbody td');me.textNodes=me.eventEl.query(dateCellSelector);me.eventEl.set({'aria-labelledby':me.monthBtn.id});me.mon(me.eventEl,{scope:me,mousewheel:me.handleMouseWheel,click:{fn:me.handleDateClick,delegate:dateCellSelector}})},initEvents:function(){var me=this;me.callParent();if(me.pickerField){me.el.on('mousedown',me.onMouseDown,me)}
me.monthBtn.el.on('mousedown',me.onMouseDown,me);me.prevRepeater=new Ext.util.ClickRepeater({el:me.prevEl,handler:me.showPrevMonth,scope:me,mousedownStopEvent:!0});me.nextRepeater=new Ext.util.ClickRepeater({el:me.nextEl,handler:me.showNextMonth,scope:me,mousedownStopEvent:!0});me.keyNav=new Ext.util.KeyNav(Ext.apply({target:me.eventEl,scope:me,left:me.onLeftKey,right:me.onRightKey,up:me.onUpKey,down:me.onDownKey,pageUp:me.onPageUpKey,pageDown:me.onPageDownKey,home:me.onHomeKey,end:me.onEndKey,enter:me.onEnterKey,space:me.onSpaceKey,tab:function(e){this.handleTabKey(e);return!0}},me.keyNavConfig));if(me.disabled){me.syncDisabled(!0,!0)}
if(me.minDate&&me.minDate>me.value){me.value=me.minDate}else if(me.maxDate&&me.maxDate<me.value){me.value=me.maxDate}
me.update(me.value)},onMouseDown:function(e){e.preventDefault()},handleTabKey:function(e){var me=this,t=me.getSelectedDate(me.activeDate),handler=me.handler;if(!me.disabled&&t.dateValue&&!Ext.fly(t.parentNode).hasCls(me.disabledCellCls)){me.setValue(new Date(t.dateValue));me.fireEvent('select',me,me.value);if(handler){Ext.callback(handler,me.scope,[me,me.value],null,me,me)}
if(me.pickerField&&me.pickerField.isEditorComponent){e.preventDefault()}
me.onSelect()}else{me.fireEventArgs('tabout',[me])}},getSelectedDate:function(date){var me=this,t=date.getTime(),cells=me.cells,cls=me.selectedCls,cellItems=cells.elements,cLen=cellItems.length,cell,c;cells.removeCls(cls);for(c=0;c<cLen;c++){cell=cellItems[c].firstChild;if(cell.dateValue===t){return cell}}
return null},initDisabledDays:function(){var me=this,dd=me.disabledDates,re='(?:',len,d,dLen,dI;if(!me.disabledDatesRE&&dd){len=dd.length-1;dLen=dd.length;for(d=0;d<dLen;d++){dI=dd[d];re+=Ext.isDate(dI)?'^'+Ext.String.escapeRegex(Ext.Date.dateFormat(dI,me.format))+'$':dI;if(d!==len){re+='|'}}
me.disabledDatesRE=new RegExp(re+')')}},setDisabledDates:function(dd){var me=this;if(Ext.isArray(dd)){me.disabledDates=dd;me.disabledDatesRE=null}else{me.disabledDatesRE=dd}
me.initDisabledDays();me.update(me.value,!0);return me},setDisabledDays:function(disabledDays){this.disabledDays=disabledDays;return this.update(this.value,!0)},setMinDate:function(minDate){this.minDate=minDate;return this.update(this.value,!0)},setMaxDate:function(maxDate){this.maxDate=maxDate;return this.update(this.value,!0)},setValue:function(value){this.value=Ext.Date.clearTime(value||this.defaultValue,!0);return this.update(this.value)},getValue:function(){return this.value},getDayInitial:function(value){return value.substr(0,1)},onEnable:function(){var me=this;me.callParent();me.syncDisabled(!1,!0);me.update(me.activeDate)},onShow:function(){var me=this;me.callParent();me.syncDisabled(!1);if(me.pickerField){me.startValue=me.pickerField.getValue()}},onHide:function(){this.callParent();this.syncDisabled(!0)},onDisable:function(){this.callParent();this.syncDisabled(!0,!0)},getActive:function(){return this.activeDate||this.value},runAnimation:function(isHide){var picker=this.monthPicker,options={duration:200,callback:function(){picker.setVisible(!isHide)}};if(isHide){picker.el.slideOut('t',options)}else{picker.el.slideIn('t',options)}},hideMonthPicker:function(animate){var me=this,picker=me.monthPicker;if(picker&&picker.isVisible()){me.focus();if(me.shouldAnimate(animate)){me.runAnimation(!0)}else{picker.hide()}}
return me},doShowMonthPicker:function(){this.showMonthPicker()},doHideMonthPicker:function(){this.hideMonthPicker()},showMonthPicker:function(animate){var me=this,el=me.el,picker;if(me.rendered&&!me.disabled){picker=me.createMonthPicker();if(!picker.isVisible()){picker.setValue(me.getActive());picker.setSize(el.getSize());picker.floatParent=null;picker.setPosition(-el.getBorderWidth('l'),-el.getBorderWidth('t'));if(me.shouldAnimate(animate)){me.runAnimation(!1)}else{picker.show()}}}
return me},shouldAnimate:function(animate){return Ext.isDefined(animate)?animate:!this.disableAnim},createMonthPicker:function(){var me=this,picker=me.monthPicker;if(!picker){me.monthPicker=picker=new Ext.picker.Month({renderTo:me.el,ownerCmp:me,floating:!0,padding:me.padding,shadow:!1,small:me.showToday===!1,footerButtonUI:me.footerButtonUI,listeners:{scope:me,cancelclick:me.onCancelClick,okclick:me.onOkClick,yeardblclick:me.onOkClick,monthdblclick:me.onOkClick}});if(!me.disableAnim){picker.el.setStyle('display','none')}
picker.hide();me.on('beforehide',me.doHideMonthPicker,me)}
return picker},onLeftKey:function(e){if(e.ctrlKey){this.showPrevMonth()}else{this.update(Ext.Date.add(this.activeDate,Ext.Date.DAY,-1))}
e.preventDefault()},onRightKey:function(e){if(e.ctrlKey){this.showNextMonth()}else{this.update(Ext.Date.add(this.activeDate,Ext.Date.DAY,1))}
e.preventDefault()},onUpKey:function(e){if(e.ctrlKey){this.showNextYear()}else{this.update(Ext.Date.add(this.activeDate,Ext.Date.DAY,-7))}
e.preventDefault()},onDownKey:function(e){if(e.ctrlKey){this.showPrevYear()}else{this.update(Ext.Date.add(this.activeDate,Ext.Date.DAY,7))}
e.preventDefault()},onPageUpKey:function(e){if(e.ctrlKey){this.showPrevYear()}else{this.showPrevMonth()}
e.preventDefault()},onPageDownKey:function(e){if(e.ctrlKey){this.showNextYear()}else{this.showNextMonth()}
e.preventDefault()},onHomeKey:function(e){this.update(Ext.Date.getFirstDateOfMonth(this.activeDate));e.preventDefault()},onEndKey:function(e){this.update(Ext.Date.getLastDateOfMonth(this.activeDate));e.preventDefault()},onEnterKey:function(e){this.handleDateClick(e,this.activeCell.firstChild)},onSpaceKey:function(e){var me=this,pickerField=me.pickerField,startValue,value,pickerValue;me.setValue(new Date(me.activeCell.firstChild.dateValue));if(pickerField){startValue=me.startValue;value=me.value;pickerValue=pickerField.getValue();if(pickerValue&&startValue&&pickerValue.getTime()===value.getTime()){pickerField.setValue(startValue)}else{pickerField.setValue(value)}}
e.preventDefault()},onOkClick:function(picker,value){var me=this,month=value[0],year=value[1],date=new Date(year,month,me.getActive().getDate());if(date.getMonth()!==month){date=Ext.Date.getLastDateOfMonth(new Date(year,month,1))}
me.setValue(date);me.hideMonthPicker()},onCancelClick:function(){this.selectedUpdate(this.activeDate);this.hideMonthPicker()},showPrevMonth:function(e){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.MONTH,-1))},showNextMonth:function(e){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.MONTH,1))},showPrevYear:function(){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.YEAR,-1))},showNextYear:function(){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.YEAR,1))},handleMouseWheel:function(e){var delta;e.stopEvent();if(!this.disabled){delta=e.getWheelDelta();if(delta>0){this.showPrevMonth()}else if(delta<0){this.showNextMonth()}}},handleDateClick:function(e,t){var me=this,handler=me.handler;e.stopEvent();if(!me.disabled&&t.dateValue&&!Ext.fly(t.parentNode).hasCls(me.disabledCellCls)){me.setValue(new Date(t.dateValue));me.fireEvent('select',me,me.value);if(handler){Ext.callback(handler,me.scope,[me,me.value],null,me,me)}
me.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var me=this,btn=me.todayBtn,handler=me.handler;if(btn&&!btn.disabled){me.setValue(Ext.Date.clearTime(new Date()));me.fireEvent('select',me,me.value);if(handler){Ext.callback(handler,me.scope,[me,me.value],null,me,me)}
me.onSelect()}
return me},selectedUpdate:function(date){var me=this,t=date.getTime(),cells=me.cells,cls=me.selectedCls,c,cLen=cells.getCount(),cell;me.eventEl.dom.setAttribute('aria-busy','true');cell=me.activeCell;if(cell){Ext.fly(cell).removeCls(cls);cell.setAttribute('aria-selected',!1)}
for(c=0;c<cLen;c++){cell=cells.item(c);if(me.textNodes[c].dateValue===t){me.activeCell=cell.dom;me.eventEl.dom.setAttribute('aria-activedescendant',cell.dom.id);cell.dom.setAttribute('aria-selected',!0);cell.addCls(cls);me.fireEvent('highlightitem',me,cell);break}}
me.eventEl.dom.removeAttribute('aria-busy')},fullUpdate:function(date){var me=this,cells=me.cells.elements,textNodes=me.textNodes,disabledCls=me.disabledCellCls,eDate=Ext.Date,i=0,extraDays=0,newDate=+eDate.clearTime(date,!0),today=+eDate.clearTime(new Date()),min=me.minDate?eDate.clearTime(me.minDate,!0):Number.NEGATIVE_INFINITY,max=me.maxDate?eDate.clearTime(me.maxDate,!0):Number.POSITIVE_INFINITY,ddMatch=me.disabledDatesRE,ddText=me.disabledDatesText,ddays=me.disabledDays?me.disabledDays.join(''):!1,ddaysText=me.disabledDaysText,format=me.format,days=eDate.getDaysInMonth(date),firstOfMonth=eDate.getFirstDateOfMonth(date),startingPos=firstOfMonth.getDay()-me.startDay,previousMonth=eDate.add(date,eDate.MONTH,-1),ariaTitleDateFormat=me.ariaTitleDateFormat,prevStart,current,disableToday,tempDate,setCellClass,html,cls,formatValue,value;if(startingPos<0){startingPos+=7}
days+=startingPos;prevStart=eDate.getDaysInMonth(previousMonth)-startingPos;current=new Date(previousMonth.getFullYear(),previousMonth.getMonth(),prevStart,me.initHour);if(me.showToday){tempDate=eDate.clearTime(new Date());disableToday=(tempDate<min||tempDate>max||(ddMatch&&format&&ddMatch.test(eDate.dateFormat(tempDate,format)))||(ddays&&ddays.indexOf(tempDate.getDay())!==-1));me.todayDisabled=disableToday;if(!me.disabled){me.todayBtn.setDisabled(disableToday)}}
setCellClass=function(cellIndex,cls){var cell=cells[cellIndex],describedBy=[];if(!cell.hasAttribute('id')){cell.setAttribute('id',me.id+'-cell-'+cellIndex)}
value=+eDate.clearTime(current,!0);cell.firstChild.dateValue=value;cell.setAttribute('aria-label',eDate.format(current,ariaTitleDateFormat));cell.removeAttribute('aria-describedby');cell.removeAttribute('data-qtip');if(value===today){cls+=' '+me.todayCls;describedBy.push(me.id+'-todayText')}
if(value===newDate){me.activeCell=cell;me.eventEl.dom.setAttribute('aria-activedescendant',cell.id);cell.setAttribute('aria-selected',!0);cls+=' '+me.selectedCls;me.fireEvent('highlightitem',me,cell)}else{cell.setAttribute('aria-selected',!1)}
if(value<min){cls+=' '+disabledCls;describedBy.push(me.id+'-ariaMinText');cell.setAttribute('data-qtip',me.minText)}else if(value>max){cls+=' '+disabledCls;describedBy.push(me.id+'-ariaMaxText');cell.setAttribute('data-qtip',me.maxText)}else if(ddays&&ddays.indexOf(current.getDay())!==-1){cell.setAttribute('data-qtip',ddaysText);describedBy.push(me.id+'-ariaDisabledDaysText');cls+=' '+disabledCls}else if(ddMatch&&format){formatValue=eDate.dateFormat(current,format);if(ddMatch.test(formatValue)){cell.setAttribute('data-qtip',ddText.replace('%0',formatValue));describedBy.push(me.id+'-ariaDisabledDatesText');cls+=' '+disabledCls}}
if(describedBy.length){cell.setAttribute('aria-describedby',describedBy.join(' '))}
cell.className=cls+' '+me.cellCls};me.eventEl.dom.setAttribute('aria-busy','true');for(;i<me.numDays;++i){if(i<startingPos){html=(++prevStart);cls=me.prevCls}else if(i>=days){html=(++extraDays);cls=me.nextCls}else{html=i-startingPos+1;cls=me.activeCls}
textNodes[i].innerHTML=html;current.setDate(current.getDate()+1);setCellClass(i,cls)}
me.eventEl.dom.removeAttribute('aria-busy');me.monthBtn.setText(Ext.Date.format(date,me.monthYearFormat))},update:function(date,forceRefresh){var me=this,active=me.activeDate;if(me.rendered){me.activeDate=date;if(!forceRefresh&&active&&me.el&&active.getMonth()===date.getMonth()&&active.getFullYear()===date.getFullYear()){me.selectedUpdate(date,active)}else{me.fullUpdate(date,active)}}
return me},doDestroy:function(){var me=this;if(me.rendered){Ext.destroy(me.keyNav,me.monthPicker,me.monthBtn,me.nextRepeater,me.prevRepeater,me.todayBtn,me.todayElSpan)}
me.callParent()},privates:{finishRenderChildren:function(){var me=this;me.callParent();me.monthBtn.finishRender();if(me.showToday){me.todayBtn.finishRender()}},getFocusEl:function(){return this.eventEl},syncDisabled:function(disabled,doButton){var me=this,keyNav=me.keyNav,todayBtn=me.todayBtn;if(keyNav){keyNav.setDisabled(disabled);me.prevRepeater.setDisabled(disabled);me.nextRepeater.setDisabled(disabled)}
if(doButton&&todayBtn){todayBtn.setDisabled(me.todayDisabled||disabled)}}}})
;
Ext.define('Ext.theme.triton.picker.Date',{override:'Ext.picker.Date',footerButtonUI:'default-toolbar'})
;
Ext.define('Ext.form.field.Date',{extend:'Ext.form.field.Picker',alias:'widget.datefield',requires:['Ext.picker.Date'],alternateClassName:['Ext.form.DateField','Ext.form.Date'],format:"m/d/Y",ariaFormat:'M j Y',altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",ariaDisabledDaysText:"This day of week is disabled",disabledDatesText:"Disabled",ariaDisabledDatesText:"This date cannot be selected",minText:"The date in this field must be equal to or after {0}",ariaMinText:"The date must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",ariaMaxText:"The date must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",formatText:'Expected date format {0}.',triggerCls:Ext.baseCSSPrefix+'form-date-trigger',showToday:!0,useStrict:undefined,initTime:'12',initTimeFormat:'H',matchFieldWidth:!1,startDay:0,valuePublishEvent:['select','blur'],componentCls:Ext.baseCSSPrefix+'form-field-date',ariaRole:'combobox',rawDate:null,rawDateText:'',validateOnFocusLeave:!0,initComponent:function(){var me=this,isString=Ext.isString,min,max;min=me.minValue;max=me.maxValue;if(isString(min)){me.minValue=me.parseDate(min)}
if(isString(max)){me.maxValue=me.parseDate(max)}
me.disabledDatesRE=null;me.initDisabledDays();me.callParent()},getSubTplData:function(fieldData){var me=this,data,ariaAttr;data=me.callParent([fieldData]);if(!me.ariaStaticRoles[me.ariaRole]){ariaAttr=data.ariaElAttributes;if(ariaAttr){ariaAttr['aria-owns']=me.id+'-inputEl '+me.id+'-picker-eventEl';ariaAttr['aria-autocomplete']='none'}}
return data},initValue:function(){var me=this,value=me.value;if(Ext.isString(value)){me.value=me.rawToValue(value);me.rawDate=me.value;me.rawDateText=me.parseDate(me.value)}else{me.value=value||null;me.rawDate=me.value;me.rawDateText=me.value?me.parseDate(me.value):''}
me.callParent()},initDisabledDays:function(){if(this.disabledDates){var dd=this.disabledDates,len=dd.length-1,re="(?:",d,dLen=dd.length,date;for(d=0;d<dLen;d++){date=dd[d];re+=Ext.isDate(date)?'^'+Ext.String.escapeRegex(date.dateFormat(this.format))+'$':date;if(d!==len){re+='|'}}
this.disabledDatesRE=new RegExp(re+')')}},setDisabledDates:function(disabledDates){var me=this,picker=me.picker;me.disabledDates=disabledDates;me.initDisabledDays();if(picker){picker.setDisabledDates(me.disabledDatesRE)}},setDisabledDays:function(disabledDays){var picker=this.picker;this.disabledDays=disabledDays;if(picker){picker.setDisabledDays(disabledDays)}},setMinValue:function(value){var me=this,picker=me.picker,minValue=(Ext.isString(value)?me.parseDate(value):value);me.minValue=minValue;if(picker){picker.minText=Ext.String.format(me.minText,me.formatDate(me.minValue));picker.setMinDate(minValue)}},setMaxValue:function(value){var me=this,picker=me.picker,maxValue=(Ext.isString(value)?me.parseDate(value):value);me.maxValue=maxValue;if(picker){picker.maxText=Ext.String.format(me.maxText,me.formatDate(me.maxValue));picker.setMaxDate(maxValue)}},getErrors:function(value){value=arguments.length>0?value:this.formatDate(this.processRawValue(this.getRawValue()));var me=this,format=Ext.String.format,clearTime=Ext.Date.clearTime,errors=me.callParent([value]),disabledDays=me.disabledDays,disabledDatesRE=me.disabledDatesRE,minValue=me.minValue,maxValue=me.maxValue,len=disabledDays?disabledDays.length:0,i=0,svalue,fvalue,day,time;if(value===null||value.length<1){return errors}
svalue=value;value=me.parseDate(value);if(!value){errors.push(format(me.invalidText,svalue,Ext.Date.unescapeFormat(me.format)));return errors}
time=value.getTime();if(minValue&&time<clearTime(minValue).getTime()){errors.push(format(me.minText,me.formatDate(minValue)))}
if(maxValue&&time>clearTime(maxValue).getTime()){errors.push(format(me.maxText,me.formatDate(maxValue)))}
if(disabledDays){day=value.getDay();for(;i<len;i++){if(day===disabledDays[i]){errors.push(me.disabledDaysText);break}}}
fvalue=me.formatDate(value);if(disabledDatesRE&&disabledDatesRE.test(fvalue)){errors.push(format(me.disabledDatesText,fvalue))}
return errors},rawToValue:function(rawValue){var me=this;if(rawValue===me.rawDateText){return me.rawDate}
return me.parseDate(rawValue)||rawValue||null},valueToRaw:function(value){return this.formatDate(this.parseDate(value))},setValue:function(v){var me=this,utilDate=Ext.Date,rawDate,oldVal=me.lastValue;me.lastValue=me.rawDateText;me.lastDate=me.rawDate;if(Ext.isDate(v)){rawDate=me.rawDate=v;me.rawDateText=me.formatDate(v)}else{rawDate=me.rawDate=me.rawToValue(v);me.rawDateText=me.formatDate(v);if(rawDate===v){rawDate=me.rawDate=null;me.rawDateText=''}}
if(rawDate&&!utilDate.formatContainsHourInfo(me.format)){me.rawDate=utilDate.clearTime(rawDate,!0)}
me.callParent(arguments);if(!me.destroyed&&me.didValueChange(me.rawDate,oldVal)){me.fireEvent('select',me,v)}},checkChange:function(){var me=this,newVal,oldVal,lastDate;if(!me.suspendCheckChange){newVal=me.getRawValue();oldVal=me.lastValue;lastDate=me.lastDate;if(!me.destroyed&&me.didValueChange(newVal,oldVal)){me.rawDate=me.rawToValue(newVal);me.rawDateText=me.formatDate(newVal);me.lastValue=newVal;me.lastDate=me.rawDate;me.fireEvent('change',me,me.getValue(),lastDate);me.onChange(newVal,oldVal)}}},safeParse:function(value,format){var me=this,utilDate=Ext.Date,result=null,strict=me.useStrict,parsedDate;if(utilDate.formatContainsHourInfo(format)){result=utilDate.parse(value,format,strict)}else{parsedDate=utilDate.parse(value+' '+me.initTime,format+' '+me.initTimeFormat,strict);if(parsedDate){result=utilDate.clearTime(parsedDate)}}
return result},getSubmitValue:function(){var format=this.submitFormat||this.format,value=this.rawDate;return value?Ext.Date.format(value,format):''},getValue:function(){return this.rawDate||null},setRawValue:function(value){var me=this;me.callParent([value]);me.rawDate=Ext.isDate(value)?value:me.rawToValue(value);me.rawDateText=this.formatDate(value)},parseDate:function(value){if(!value||Ext.isDate(value)){return value}
var me=this,val=me.safeParse(value,me.format),altFormats=me.altFormats,altFormatsArray=me.altFormatsArray,i=0,len;if(!val&&altFormats){altFormatsArray=altFormatsArray||altFormats.split('|');len=altFormatsArray.length;for(;i<len&&!val;++i){val=me.safeParse(value,altFormatsArray[i])}}
return val},formatDate:function(date,format){return Ext.isDate(date)?Ext.Date.dateFormat(date,format||this.format):date},createPicker:function(){var me=this,format=Ext.String.format;return new Ext.picker.Date({id:me.id+'-picker',pickerField:me,floating:!0,preventRefocus:!0,hidden:!0,minDate:me.minValue,maxDate:me.maxValue,disabledDatesRE:me.disabledDatesRE,disabledDatesText:me.disabledDatesText,ariaDisabledDatesText:me.ariaDisabledDatesText,disabledDays:me.disabledDays,disabledDaysText:me.disabledDaysText,ariaDisabledDaysText:me.ariaDisabledDaysText,format:me.format,showToday:me.showToday,startDay:me.startDay,minText:format(me.minText,me.formatDate(me.minValue)),ariaMinText:format(me.ariaMinText,me.formatDate(me.minValue,me.ariaFormat)),maxText:format(me.maxText,me.formatDate(me.maxValue)),ariaMaxText:format(me.ariaMaxText,me.formatDate(me.maxValue,me.ariaFormat)),listeners:{scope:me,select:me.onSelect,tabout:me.onTabOut},keyNavConfig:{esc:function(){me.inputEl.focus();me.collapse()}}})},createInitialDate:function(value){var minValue=this.minValue,maxValue=this.maxValue;value=value||new Date();if(minValue&&minValue>value){value=minValue}else if(maxValue&&maxValue<value){value=maxValue}
return value},onSelect:function(m,d){var me=this;me.setValue(d);me.rawDate=d;me.onTabOut(m)},onTabOut:function(picker){this.inputEl.focus();this.collapse()},onExpand:function(){var value=this.rawDate;this.picker.setValue(Ext.isDate(value)?value:this.createInitialDate())},onBlur:function(e){var me=this,v=me.rawToValue(me.getRawValue());if(v===''||Ext.isDate(v)){me.setValue(v)}
me.callParent([e])}})
;
Ext.define('Ext.form.field.Display',{extend:'Ext.form.field.Base',alias:'widget.displayfield',alternateClassName:['Ext.form.DisplayField','Ext.form.Display'],requires:['Ext.util.Format','Ext.XTemplate'],fieldSubTpl:['<div id="{id}" data-ref="inputEl" role="textbox" aria-readonly="true"',' aria-labelledby="{cmpId}-labelEl" {inputAttrTpl}',' tabindex="<tpl if="tabIdx != null">{tabIdx}<tpl else>-1</tpl>"','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {fieldCls}-{ui}">{value}</div>',{compiled:!0,disableFormats:!0}],ariaRole:undefined,focusable:!1,skipLabelForAttribute:!0,readOnly:!0,fieldCls:Ext.baseCSSPrefix+'form-display-field',fieldBodyCls:Ext.baseCSSPrefix+'form-display-field-body',htmlEncode:!1,noWrap:!1,validateOnChange:!1,initEvents:Ext.emptyFn,submitValue:!1,getValue:function(){return this.value},valueToRaw:function(value){if(value||value===0||value===!1){return value}else{return''}},isDirty:function(){return!1},isValid:Ext.returnTrue,validate:Ext.returnTrue,getRawValue:function(){return this.rawValue},setRawValue:function(value){var me=this;value=Ext.valueFrom(value,'');me.rawValue=value;if(me.rendered){me.inputEl.dom.innerHTML=me.getDisplayValue();me.updateLayout()}
return value},getDisplayValue:function(){var me=this,value=this.getRawValue(),renderer=me.renderer,display;if(renderer){display=Ext.callback(renderer,me.scope,[value,me],0,me)}else{display=me.htmlEncode?Ext.util.Format.htmlEncode(value):value}
return display},getSubTplData:function(fieldData){var ret=this.callParent(arguments);ret.value=this.getDisplayValue();return ret}})
;
Ext.define('Ext.form.field.FileButton',{extend:'Ext.button.Button',alias:'widget.filebutton',childEls:['fileInputEl'],inputCls:Ext.baseCSSPrefix+'form-file-input',cls:Ext.baseCSSPrefix+'form-file-btn',preventDefault:!1,tabIndex:undefined,useTabGuards:Ext.isIE||Ext.isEdge,promptCalled:!1,autoEl:{tag:'div',unselectable:'on'},afterTpl:['<input id="{id}-fileInputEl" data-ref="fileInputEl" class="{childElCls} {inputCls}" ','type="file" size="1" name="{inputName}" unselectable="on" ','<tpl if="accept != null">accept="{accept}"</tpl>','<tpl if="tabIndex != null">tabindex="{tabIndex}"</tpl>','>'],keyMap:null,ariaEl:'fileInputEl',getAfterMarkup:function(values){return this.lookupTpl('afterTpl').apply(values)},getTemplateArgs:function(){var me=this,args;args=me.callParent();args.inputCls=me.inputCls;args.inputName=me.inputName||me.id;args.tabIndex=me.tabIndex!=null?me.tabIndex:null;args.accept=me.accept||null;args.role=me.ariaRole;return args},afterRender:function(){var me=this,listeners,cfg;me.callParent(arguments);listeners={scope:me,mousedown:me.handlePrompt,keydown:me.handlePrompt,change:me.fireChange,focus:me.onFileFocus,blur:me.onFileBlur,destroyable:!0};if(me.useTabGuards){cfg={tag:'span',role:'button','aria-hidden':'true','data-tabguard':'true',style:{height:0,width:0}};cfg.tabIndex=me.tabIndex!=null?me.tabIndex:0;me.beforeInputGuard=me.el.createChild(cfg,me.fileInputEl);me.afterInputGuard=me.el.createChild(cfg);me.afterInputGuard.insertAfter(me.fileInputEl);me.beforeInputGuard.on('focus',me.onInputGuardFocus,me);me.afterInputGuard.on('focus',me.onInputGuardFocus,me);listeners.keydown=me.onFileInputKeydown}
me.fileInputElListeners=me.fileInputEl.on(listeners)},doDestroy:function(){var me=this;if(me.fileInputElListeners){me.fileInputElListeners.destroy()}
if(me.beforeInputGuard){me.beforeInputGuard.destroy();me.beforeInputGuard=null}
if(me.afterInputGuard){me.afterInputGuard.destroy();me.afterInputGuard=null}
me.callParent()},fireChange:function(e){this.fireEvent('change',this,e,this.fileInputEl.dom.value)},createFileInput:function(isTemporary){var me=this,fileInputEl,listeners;fileInputEl=me.fileInputEl=me.el.createChild({name:me.inputName||me.id,id:!isTemporary?me.id+'-fileInputEl':undefined,cls:me.inputCls+(me.getInherited().rtl?' '+Ext.baseCSSPrefix+'rtl':''),tag:'input',type:'file',size:1,unselectable:'on'},me.afterInputGuard);fileInputEl.dom.setAttribute('data-componentid',me.id);if(me.tabIndex!=null){me.setTabIndex(me.tabIndex)}
if(me.accept){fileInputEl.dom.setAttribute('accept',me.accept)}
listeners={scope:me,change:me.fireChange,mousedown:me.handlePrompt,keydown:me.handlePrompt,focus:me.onFileFocus,blur:me.onFileBlur};if(me.useTabGuards){listeners.keydown=me.onFileInputKeydown}
fileInputEl.on(listeners)},handlePrompt:function(e){var key;if(e.type==='keydown'){key=e.getKey();this.promptCalled=((!Ext.isIE&&key===e.ENTER)||key===e.SPACE)?!0:!1}else{this.promptCalled=!0}},onFileFocus:function(e){var ownerCt=this.ownerCt;if(!this.hasFocus){this.onFocus(e)}
if(ownerCt&&!ownerCt.hasFocus){ownerCt.onFocus(e)}},onFileBlur:function(e){var ownerCt=this.ownerCt;if(this.promptCalled){this.promptCalled=!1;e.preventDefault();return}
if(this.hasFocus){this.onBlur(e)}
if(ownerCt&&ownerCt.hasFocus){ownerCt.onBlur(e)}},onInputGuardFocus:function(e){this.fileInputEl.focus()},onFileInputKeydown:function(e){var key=e.getKey(),focusTo;if(key===e.TAB){focusTo=e.shiftKey?this.beforeInputGuard:this.afterInputGuard;if(focusTo){focusTo.suspendEvent('focus');focusTo.focus();Ext.defer(function(){focusTo.resumeEvent('focus')},1)}}else if(key===e.ENTER||key===e.SPACE){this.handlePrompt(e)}
return!0},reset:function(remove){var me=this;if(remove){me.fileInputEl.destroy()}
me.createFileInput(!remove);if(remove){me.ariaEl=me.fileInputEl}},restoreInput:function(el){var me=this;me.fileInputEl.destroy();el=Ext.get(el);if(me.useTabGuards){el.insertBefore(me.afterInputGuard)}else{me.el.appendChild(el)}
me.fileInputEl=el},onDisable:function(){this.callParent();this.fileInputEl.dom.disabled=!0},onEnable:function(){this.callParent();this.fileInputEl.dom.disabled=!1},privates:{getFocusEl:function(){return this.fileInputEl},getFocusClsEl:function(){return this.el},setTabIndex:function(tabIndex){var me=this;if(!me.focusable){return}
me.tabIndex=tabIndex;if(!me.rendered||me.destroying||me.destroyed){return}
if(me.useTabGuards){me.fileInputEl.dom.setAttribute('tabIndex',-1);me.beforeInputGuard.dom.setAttribute('tabIndex',tabIndex);me.afterInputGuard.dom.setAttribute('tabIndex',tabIndex)}else{me.fileInputEl.dom.setAttribute('tabIndex',tabIndex)}}}})
;
Ext.define('Ext.form.trigger.Component',{extend:'Ext.form.trigger.Trigger',alias:'trigger.component',cls:Ext.baseCSSPrefix+'form-trigger-cmp',onFieldRender:function(){var me=this,component=me.component;me.callParent();if(!component.isComponent&&!component.isWidget){component=Ext.widget(component)}
me.component=component;component.render(me.el)},destroy:function(){var component=this.component;if(component.isComponent||component.isWidget){component.destroy()}
this.component=null;this.callParent()}})
;
Ext.define('Ext.form.field.File',{extend:'Ext.form.field.Text',alias:['widget.filefield','widget.fileuploadfield'],alternateClassName:['Ext.form.FileUploadField','Ext.ux.form.FileUploadField','Ext.form.File'],requires:['Ext.form.field.FileButton','Ext.form.trigger.Component'],emptyText:undefined,needArrowKeys:!1,triggers:{filebutton:{type:'component',hideOnReadOnly:!1,preventMouseDown:!1}},buttonText:'Browse...',buttonOnly:!1,buttonMargin:3,clearOnSubmit:!0,extraFieldBodyCls:Ext.baseCSSPrefix+'form-file-wrap',inputCls:Ext.baseCSSPrefix+'form-text-file',readOnly:!0,editable:!1,submitValue:!1,triggerNoEditCls:'',childEls:['browseButtonWrap'],applyTriggers:function(triggers){var me=this,triggerCfg=(triggers||{}).filebutton;if(triggerCfg){triggerCfg.component=Ext.apply({xtype:'filebutton',ownerCt:me,id:me.id+'-button',ui:me.ui,disabled:me.disabled,tabIndex:me.tabIndex,text:me.buttonText,style:me.buttonOnly?'':me.getButtonMarginProp()+me.buttonMargin+'px',accept:me.accept,inputName:me.getName(),listeners:{scope:me,change:me.onFileChange}},me.buttonConfig);return me.callParent([triggers])}else{Ext.raise(me.$className+' requires a valid trigger config containing '+'"filebutton" specification')}},getSubTplData:function(fieldData){var data=this.callParent([fieldData]);data.tabIdx=-1;return data},onRender:function(){var me=this,inputEl,button,buttonEl,trigger;me.callParent(arguments);inputEl=me.inputEl;inputEl.dom.name='';inputEl.on('focus',me.onInputFocus,me);inputEl.on('mousedown',me.onInputMouseDown,me);trigger=me.getTrigger('filebutton');button=me.button=trigger.component;me.fileInputEl=button.fileInputEl;buttonEl=button.el;if(me.buttonOnly){me.inputWrap.setDisplayed(!1);me.shrinkWrap=3}
trigger.el.setWidth(buttonEl.getWidth()+buttonEl.getMargin('lr'));if(Ext.isIE8){me.button.getEl().repaint()}},getTriggerMarkup:function(){return'<td id="'+this.id+'-browseButtonWrap" data-ref="browseButtonWrap" role="presentation"></td>'},onFileChange:function(button,e,value){this.duringFileSelect=!0;Ext.form.field.File.superclass.setValue.call(this,value);delete this.duringFileSelect},didValueChange:function(){return!!this.duringFileSelect},setEmptyText:Ext.emptyFn,setValue:Ext.emptyFn,reset:function(){var me=this,clear=me.clearOnSubmit;if(me.rendered){me.button.reset(clear);me.fileInputEl=me.button.fileInputEl;if(clear){me.inputEl.dom.value='';Ext.form.field.File.superclass.setValue.call(this,null)}}
me.callParent()},onShow:function(){this.callParent();this.button.updateLayout()},onDisable:function(){this.callParent();this.button.disable()},onEnable:function(){this.callParent();this.button.enable()},isFileUpload:Ext.returnTrue,extractFileInput:function(){var me=this,fileInput;if(me.rendered){fileInput=me.button.fileInputEl.dom;me.reset()}else{fileInput=document.createElement('input');fileInput.type='file';fileInput.className=Ext.baseCSSPrefix+'hidden-display';fileInput.name=me.getName()}
return fileInput},restoreInput:function(el){var button;if(this.rendered){button=this.button;button.restoreInput(el);this.fileInputEl=button.fileInputEl}},doDestroy:function(){this.fileInputEl=this.button=null;this.callParent()},getButtonMarginProp:function(){return this.getInherited().rtl?'margin-right:':'margin-left:'},onInputFocus:function(e){var me=this;if(me.selectOnFocus&&document.activeElement===me.inputEl.dom){me.inputEl.dom.select()}
me.focus();if(Ext.isIE9m){me.fileInputEl.addCls(Ext.baseCSSPrefix+'position-relative');me.fileInputEl.removeCls(Ext.baseCSSPrefix+'position-relative')}},onInputMouseDown:function(e){e.preventDefault();this.focus()},privates:{getFocusEl:function(){return this.button},getFocusClsEl:Ext.privateFn}})
;
Ext.define('Ext.form.field.Hidden',{extend:'Ext.form.field.Base',alias:['widget.hiddenfield','widget.hidden'],alternateClassName:'Ext.form.Hidden',focusable:!1,inputType:'hidden',isTextInput:!1,hideLabel:!0,hidden:!0,ariaRole:'presentation',initComponent:function(){this.formItemCls+='-hidden';this.callParent()},isEqual:function(value1,value2){return this.isEqualAsString(value1,value2)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn})
;
Ext.define('Ext.tip.Tip',{extend:'Ext.panel.Panel',xtype:'tip',alternateClassName:'Ext.Tip',minWidth:40,maxWidth:500,shadow:"sides",constrainPosition:!0,autoRender:!0,hidden:!0,baseCls:Ext.baseCSSPrefix+'tip',focusOnToFront:!1,maskOnDisable:!1,closeAction:'hide',alwaysFramed:!0,frameHeader:!1,initComponent:function(){var me=this;me.floating=Ext.apply({},{shadow:me.shadow},me.self.prototype.floating);me.callParent(arguments);me.constrain=me.constrain||me.constrainPosition},showAt:function(xy){var me=this;me.calledFromShowAt=!0;me.callParent(arguments);if(me.isVisible()){me.doAlignment(me.getRegion().alignTo({target:new Ext.util.Point(xy[0],xy[1]),inside:me.constrainPosition?Ext.getBody().getRegion().adjust(5,-5,-5,5):null,align:'tl-tl',overlap:!0}))}
me.calledFromShowAt=0},doAlignment:function(newRegion){var me=this,anchorEl=me.anchorEl,anchorRegion=newRegion.anchor;me.setPagePosition([newRegion.x,newRegion.y]);if(anchorEl){anchorEl.removeCls(me.anchorCls);if(anchorRegion){me.anchorCls=Ext.baseCSSPrefix+'tip-anchor-'+anchorRegion.position;anchorEl.addCls(me.anchorCls);anchorEl.show();if(anchorRegion.align&1){anchorEl.setTop(newRegion.anchor.y-newRegion.y);anchorEl.dom.style.left=''}else{anchorEl.setLeft(newRegion.anchor.x-newRegion.x);anchorEl.dom.style.top=''}}else{anchorEl.hide()}}},privates:{initDraggable:function(){var me=this;me.draggable={el:me.getDragEl(),delegate:me.header.el,constrain:me,constrainTo:me.el.dom.parentNode};Ext.Component.prototype.initDraggable.call(me)}},ghost:undefined,unghost:undefined})
;
Ext.define('Ext.tip.ToolTip',{extend:'Ext.tip.Tip',alias:'widget.tooltip',alternateClassName:'Ext.ToolTip',requires:['Ext.util.Offset'],autoHide:!0,showDelay:500,hideDelay:200,dismissDelay:5000,mouseOffset:[15,18],trackMouse:!1,anchorToTarget:!0,targetCounter:0,quickShowInterval:250,hideAction:'hide',fadeOutDuration:1000,defaultAlign:'bl-tl',ariaRole:'tooltip',alwaysOnTop:!0,initComponent:function(){var me=this;me.callParent();me.setTarget(me.target);me.currentTarget=new Ext.dom.Fly()},onRender:function(ct,position){var me=this;me.callParent(arguments);if(me.sticky){me.el.dom.setAttribute('data-sticky',!0)}
me.anchorEl=me.el.createChild({role:'presentation',cls:Ext.baseCSSPrefix+'tip-anchor'})},show:function(){if(!this.currentTarget.dom&&this.target){return this.showBy(this.target)}
this.callParent()},setTarget:function(target){var me=this,listeners;if(me.targetListeners){me.targetListeners.destroy()}
if(target){me.target=target=Ext.get(target.el||target);listeners={mouseover:'onTargetOver',mouseout:'onTargetOut',mousemove:'onMouseMove',tap:'onTargetTap',scope:me,destroyable:!0};me.targetListeners=target.on(listeners)}else{me.target=null}},onMouseMove:function(e){var me=this,dismissDelay=me.dismissDelay;me.pointerEvent=e;if(me.isVisible()&&me.currentTarget.contains(e.target)){if(dismissDelay&&me.autoHide!==!1){me.clearTimer('dismiss');me.dismissTimer=Ext.defer(me.hide,dismissDelay,me)}
if(me.trackMouse){me.doAlignment(me.getAlignRegion())}}},getAlignRegion:function(){var me=this,anchorEl=me.anchorEl,align=me.getAnchorAlign(),overlap,alignSpec,target,mouseOffset=me.mouseOffset;if(!me.anchorSize){anchorEl.addCls(Ext.baseCSSPrefix+'tip-anchor-top');anchorEl.show();me.anchorSize=new Ext.util.Offset(anchorEl.getWidth(!1,!0),anchorEl.getHeight(!1,!0));anchorEl.removeCls(Ext.baseCSSPrefix+'tip-anchor-top');anchorEl.hide()}
if((me.anchor||me.align)&&me.anchorToTarget&&!me.trackMouse){target=me.currentTarget.getRegion()}else{target=me.pointerEvent?me.pointerEvent.getPoint().adjust(-Math.abs(mouseOffset[1]),Math.abs(mouseOffset[0]),Math.abs(mouseOffset[1]),-Math.abs(mouseOffset[0])):new Ext.util.Point();if(!me.anchor){overlap=!0;if(mouseOffset[0]>0){if(mouseOffset[1]>0){align='tl-br'}else{align='bl-tr'}}else{if(mouseOffset[1]>0){align='tr-bl'}else{align='br-tl'}}}}
alignSpec={align:me.convertPositionSpec(align),axisLock:me.axisLock,target:target,overlap:overlap,offset:me.targetOffset,inside:me.constrainPosition?(me.constrainTo||Ext.getBody().getRegion().adjust(5,-5,-5,5)):null};if(me.anchor){alignSpec.anchorSize=me.anchorSize}
return me.getRegion().alignTo(alignSpec)},fadeOut:function(){var me=this;me.el.fadeOut({duration:me.fadeOutDuration,callback:function(){me.hide();me.el.setOpacity('')}})},getAnchorAlign:function(){switch(this.anchor){case 'top':return'tl-bl';case 'left':return'tl-tr';case 'right':return'tr-tl';default:return this.defaultAlign}},onTargetTap:function(e){if(this.showOnTap&&e.pointerType!=='mouse'&&Ext.fly(e.target).isVisible(!0)){this.onTargetOver(e)}},onTargetOver:function(e){var me=this,delegate=me.delegate,currentTarget=me.currentTarget,fromElement=e.relatedTarget||e.fromElement,newTarget,myListeners=me.hasListeners;if(me.disabled){return}
if(delegate){if(currentTarget.contains(e.target)){return}
newTarget=e.getTarget(delegate);if(newTarget&&e.getRelatedTarget(delegate)===newTarget){return}}else if(!me.target.contains(fromElement)){newTarget=me.target.dom}else{return}
if(newTarget){if((myListeners.beforeshow||myListeners.show)&&me.isVisible()){me.hide()}
me.triggerElement=newTarget;me.pointerEvent=e;currentTarget.attach(newTarget);me.handleTargetOver(newTarget,e)}else if(currentTarget.dom){me.handleTargetOut()}},handleTargetOver:function(target,event){if(event.pointerType!=='mouse'){this.showFromDelay()}else{this.delayShow()}},delayShow:function(){var me=this;me.clearTimer('hide');if(me.hidden&&!me.showTimer){if(me.delegate&&Ext.Date.getElapsed(me.lastHidden)<me.quickShowInterval){me.showFromDelay()}else{me.showTimer=Ext.defer(me.showFromDelay,me.pointerEvent.pointerType!=='mouse'?0:me.showDelay,me)}}else if(!me.hidden&&me.autoHide!==!1){me.showFromDelay()}},showFromDelay:function(){var me=this;if(!me.disabled){me.fireEvent('hovertarget',me,me.currentTarget,me.currentTarget.dom);if(me.isVisible()){me.realignToTarget()}else{me.triggerElement=me.currentTarget.dom;me.fromDelayShow=!0;me.show();me.fromDelayShow=!1}}},onTargetOut:function(e){if(this.currentTarget.dom&&!this.currentTarget.contains(e.relatedTarget)){this.handleTargetOut()}},handleTargetOut:function(){var me=this;if(me.showTimer){me.clearTimer('show')}
if(me.isVisible()&&me.autoHide){me.delayHide()}},delayHide:function(){var me=this;if(!me.hidden&&!me.hideTimer){me.clearTimer('dismiss');me.hideTimer=Ext.defer(me[me.hideAction],me.hideDelay,me)}},hide:function(){var me=this;me.currentTarget.detach();me.clearTimer('dismiss');me.lastHidden=new Date();if(me.anchorEl){me.anchorEl.hide()}
me.callParent(arguments);me.triggerElement=null},afterShow:function(){this.callParent();this.realignToTarget()},realignToTarget:function(){var me=this;me.clearTimers();if(!me.calledFromShowAt){me.doAlignment(me.getAlignRegion())}
if(me.dismissDelay&&me.autoHide!==!1){me.dismissTimer=Ext.defer(me.hide,me.dismissDelay,me)}},showBy:function(target){var me=this;me.align=me.defaultAlign;if(target.isEvent){me.currentTarget.attach(target.target);me.pointerEvent=target}else{me.currentTarget.attach(Ext.getDom(target.el||target));me.triggerElement=me.currentTarget.dom}
if(me.isVisible()){me.realignToTarget()}else{me.show()}
return me},_timerNames:{},clearTimer:function(name){var me=this,names=me._timerNames,propName=names[name]||(names[name]=name+'Timer'),timer=me[propName];if(timer){Ext.undefer(timer);me[propName]=null;if(name==='show'&&me.isHidden()){me.currentTarget.detach()}}},clearTimers:function(){var me=this;me.clearTimer('show');me.clearTimer('dismiss');me.clearTimer('hide');me.clearTimer('enable')},onShow:function(){var me=this;me.callParent();me.mousedownListener=Ext.on({mousedown:'onDocMouseDown',scope:me,destroyable:!0})},onHide:function(){var me=this;me.callParent();Ext.destroy(me.mousedownListener)},onDocMouseDown:function(e){var me=this,delegate=me.delegate;if(e.within(me.el.dom)){if(e.pointerType!=='mouse'&&me.allowOver){me.clearTimer('dismiss')}}else if(!me.closable){if(e.within(me.target)&&(!delegate||e.getTarget(delegate))){me.delayHide()}else{me.disable();me.enableTimer=Ext.defer(me.enable,100,me)}}},doEnable:function(){if(!this.destroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},doDestroy:function(){var me=this;me.clearTimers();me.destroyMembers('mousedownListener','anchorEl');me.callParent()},privates:{getTrackMouse:function(){return this.trackMouse},clipTo:function(clippingEl,sides){var clippingRegion;if(clippingEl.isRegion){clippingRegion=clippingEl}else{clippingRegion=(clippingEl.isComponent?clippingEl.el:Ext.fly(clippingEl)).getConstrainRegion()}
this.callParent([clippingRegion,sides]);this.anchorEl.clipTo(clippingRegion,sides)}}})
;
Ext.define('Ext.tip.QuickTip',{extend:'Ext.tip.ToolTip',alias:'widget.quicktip',alternateClassName:'Ext.QuickTip',interceptTitles:!1,title:'&#160;',tagConfig:{namespace:'data-',attribute:'qtip',width:'qwidth',target:'target',title:'qtitle',hide:'hide',cls:'qclass',align:'qalign',anchor:'anchor',showDelay:'qshowDelay',hideAction:'hideAction',anchorTarget:'anchorTarget'},isQuickTip:!0,shrinkWrapDock:!0,initComponent:function(){var me=this;me.delegate=me.delegate.bind(me);me.target=me.target||Ext.getDoc();me.targets=me.targets||{};me.header=me.header||{};me.header.focusableContainer=!1;me.callParent()},setTagConfig:function(cfg){this.tagConfig=Ext.apply({},cfg);delete this.tagConfig.attr},text:null,register:function(config){var configs=Ext.isArray(config)?config:arguments,i=0,len=configs.length,target,j,targetLen;for(;i<len;i++){config=configs[i];target=config.target;if(target){if(Ext.isArray(target)){for(j=0,targetLen=target.length;j<targetLen;j++){this.targets[Ext.id(target[j])]=config}}else{this.targets[Ext.id(target)]=config}}}},unregister:function(el){delete this.targets[Ext.id(el)]},cancelShow:function(el){var me=this,currentTarget=me.currentTarget;el=Ext.getDom(el);if(me.isVisible()){if(currentTarget.dom===el){me.hide()}}else if(currentTarget.dom===el){me.clearTimer('show')}},delegate:function(target){var me=this,cfg=me.tagConfig,attr=cfg.attr||(cfg.attr=cfg.namespace+cfg.attribute),text;text=target.getAttribute(attr)||(me.interceptTitles&&target.title);return!!text},getTipText:function(target){var titleText=target.title,cfg=this.tagConfig,attr=cfg.attr||(cfg.attr=cfg.namespace+cfg.attribute);if(this.interceptTitles&&titleText){target.setAttribute(attr,titleText);target.removeAttribute('title');return titleText}else{return target.getAttribute(attr)}},onTargetOver:function(event){var me=this,currentTarget=me.currentTarget,target=event.target,targets,registeredTarget,key;if(!target||target.nodeType!==1||target===document.documentElement||target===document.body){return}
me.pointerEvent=event;targets=me.targets;for(key in targets){if(targets.hasOwnProperty(key)){registeredTarget=targets[key];target=Ext.getDom(registeredTarget.target);if(target&&Ext.fly(target).contains(event.target)&&!Ext.fly(target).contains(event.relatedTarget)){currentTarget.attach(target);me.activeTarget=registeredTarget;registeredTarget.el=currentTarget;me.anchor=registeredTarget.anchor;me.activateTarget();return}}}
me.callParent([event])},handleTargetOver:function(target,event){var me=this,currentTarget=me.currentTarget,cfg=me.tagConfig,ns=cfg.namespace,tipText=me.getTipText(target,event),autoHide;if(tipText){autoHide=currentTarget.getAttribute(ns+cfg.hide);me.activeTarget={el:currentTarget,text:tipText,width:+currentTarget.getAttribute(ns+cfg.width)||null,autoHide:autoHide!=="user"&&autoHide!=='false',title:currentTarget.getAttribute(ns+cfg.title),cls:currentTarget.getAttribute(ns+cfg.cls),align:currentTarget.getAttribute(ns+cfg.align),showDelay:currentTarget.getAttribute(ns+cfg.showDelay),hideAction:currentTarget.getAttribute(ns+cfg.hideAction),alignTarget:currentTarget.getAttribute(ns+cfg.anchorTarget)};if(!me.initialConfig.hasOwnProperty('anchor')){me.anchor=currentTarget.getAttribute(ns+cfg.anchor)}
if(me.anchor&&!me.initialConfig.hasOwnProperty('anchorTarget')){me.alignTarget=me.activeTarget.alignTarget||target}
me.activateTarget()}},activateTarget:function(){var me=this,activeTarget=me.activeTarget,delay=activeTarget.showDelay,hideAction=activeTarget.hideAction;if(me.isVisible()){me.updateContent();me.realignToTarget()}else{if(activeTarget.showDelay){delay=me.showDelay;me.showDelay=parseInt(activeTarget.showDelay,10)}
me.delayShow();if(activeTarget.showDelay){me.showDelay=delay}
if(!(hideAction=activeTarget.hideAction)){delete me.hideAction}else{me.hideAction=hideAction}}},getAnchorAlign:function(){var active=this.activeTarget;return(active&&active.align)||this.callParent()},getAlignRegion:function(){var me=this,activeTarget=me.activeTarget,currentTargetDom=me.currentTarget.dom,result;if(activeTarget&&activeTarget.alignTarget&&me.anchor&&!me.initialConfig.hasOwnProperty('anchorTarget')){me.currentTarget.attach(Ext.getDom(activeTarget.alignTarget))}
me.anchorToTarget=!!(activeTarget.align||me.anchor);result=me.callParent();me.currentTarget.attach(currentTargetDom);return result},handleTargetOut:function(e){var me=this,active=me.activeTarget,autoHide=me.autoHide,hideDelay=me.hideDelay;if(active&&autoHide!==!1){me.autoHide=!0;if(active.hideDelay){me.hideDelay=parseInt(active.hideDelay,10)}
me.callParent([e]);me.autoHide=autoHide;me.hideDelay=hideDelay}},targetTextEmpty:function(){var me=this,target=me.activeTarget,cfg=me.tagConfig,el,text;if(target){el=target.el;if(el){text=el.getAttribute(cfg.namespace+cfg.attribute);if(!text&&!me.targets[Ext.id(target.el.dom)]){return!0}}}
return!1},show:function(){var me=this,fromDelay=me.fromDelayShow;if(fromDelay&&me.targetTextEmpty()){me.activeTarget=null;me.currentTarget.detach();return}
me.callParent(arguments)},beforeShow:function(){this.updateContent();this.callParent(arguments)},updateContent:function(){var me=this,target=me.activeTarget,header=me.header,dismiss,cls;if(target){me.suspendLayouts();if(target.title){me.setTitle(target.title);header.show()}else if(header){header.hide()}
me.update(target.text);me.autoHide=target.autoHide;dismiss=target.dismissDelay;me.dismissDelay=Ext.isNumber(dismiss)?dismiss:me.dismissDelay;cls=me.lastCls;if(cls){me.removeCls(cls);delete me.lastCls}
cls=target.cls;if(cls){me.addCls(cls);me.lastCls=cls}
me.setWidth(target.width);me.align=target.align;me.resumeLayouts(!0)}},hide:function(){this.activeTarget=null;this.callParent()}})
;
Ext.define('Ext.tip.QuickTipManager',{singleton:!0,alternateClassName:'Ext.QuickTips',requires:['Ext.tip.QuickTip'],disabled:!1,init:function(autoRender,config){var me=this;if(!me.tip){if(!Ext.isReady){Ext.onInternalReady(function(){Ext.tip.QuickTipManager.init(autoRender,config)});return!1}
var tipConfig=Ext.apply({sticky:!0,disabled:me.disabled,id:'ext-quicktips-tip'},config),className=tipConfig.className,xtype=tipConfig.xtype;if(className){delete tipConfig.className}else if(xtype){className='widget.'+xtype;delete tipConfig.xtype}
if(autoRender!==!1){tipConfig.renderTo=document.body;if(tipConfig.renderTo.tagName.toUpperCase()!=='BODY'){Ext.raise({sourceClass:'Ext.tip.QuickTipManager',sourceMethod:'init',msg:'Cannot init QuickTipManager: no document body'})}}
me.tip=Ext.create(className||'Ext.tip.QuickTip',tipConfig);me.tip.destroy=Ext.emptyFn;Ext.quickTipsActive=!0}},destroy:function(){var tip=this.tip;if(tip){delete tip.destroy;tip.destroy();this.tip=null}
Ext.quickTipsActive=!1},ddDisable:function(){var me=this,tip=me.tip;if(tip&&!me.disabled){tip.disable()}},ddEnable:function(){var me=this,tip=me.tip;if(tip&&!me.disabled){tip.enable()}},enable:function(){var me=this,tip=me.tip;if(tip){tip.enable()}
me.disabled=!1},disable:function(){var me=this,tip=me.tip;if(tip){tip.disable()}
me.disabled=!0},isEnabled:function(){var tip=this.tip;return tip!==undefined&&!tip.disabled},getQuickTip:function(){return this.tip},register:function(){var tip=this.tip;tip.register.apply(tip,arguments)},unregister:function(){var tip=this.tip;tip.unregister.apply(tip,arguments)},tips:function(){var tip=this.tip;tip.register.apply(tip,arguments)}})
;
Ext.define('Ext.rtl.tip.QuickTipManager',{override:'Ext.tip.QuickTipManager',init:function(){var me=this;if(me.callParent(arguments)!==!1){me.tip.on('beforeshow',me.onBeforeFirstShow,me,{single:!0})}},onBeforeFirstShow:function(tip){tip._isOffsetParentRtl=undefined}})
;
Ext.define('Ext.picker.Color',{extend:'Ext.Component',requires:'Ext.XTemplate',alias:'widget.colorpicker',alternateClassName:'Ext.ColorPalette',focusable:!0,componentCls:Ext.baseCSSPrefix+'color-picker',selectedCls:Ext.baseCSSPrefix+'color-picker-selected',itemCls:Ext.baseCSSPrefix+'color-picker-item',value:null,clickEvent:'click',allowReselect:!1,colors:['000000','993300','333300','003300','003366','000080','333399','333333','800000','FF6600','808000','008000','008080','0000FF','666699','808080','FF0000','FF9900','99CC00','339966','33CCCC','3366FF','800080','969696','FF00FF','FFCC00','FFFF00','00FF00','00FFFF','00CCFF','993366','C0C0C0','FF99CC','FFCC99','FFFF99','CCFFCC','CCFFFF','99CCFF','CC99FF','FFFFFF'],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['<tpl for="colors">','<a href="#" role="button" class="color-{.} {parent.itemCls}" hidefocus="on">','<span class="{parent.itemCls}-inner" style="background:#{.}">&#160;</span>','</a>','</tpl>'],initComponent:function(){var me=this;me.callParent(arguments);if(me.handler){me.on('select',me.handler,me.scope,!0)}},initRenderData:function(){var me=this;return Ext.apply(me.callParent(),{itemCls:me.itemCls,colors:me.colors})},onRender:function(){var me=this,clickEvent=me.clickEvent;me.callParent(arguments);me.mon(me.el,clickEvent,me.handleClick,me,{delegate:'a'});if(clickEvent!=='click'){me.mon(me.el,'click',Ext.emptyFn,me,{delegate:'a',stopEvent:!0})}},afterRender:function(){var me=this,value;me.callParent(arguments);if(me.value){value=me.value;me.value=null;me.select(value,!0)}},handleClick:function(event){var me=this,color;event.stopEvent();if(!me.disabled){color=event.currentTarget.className.match(me.colorRe)[1];me.select(color.toUpperCase())}},select:function(color,suppressEvent){var me=this,selectedCls=me.selectedCls,value=me.value,el,item;color=color.replace('#','');if(!me.rendered){me.value=color;return}
if(color!==value||me.allowReselect){el=me.el;if(me.value){item=el.down('a.color-'+value,!0);Ext.fly(item).removeCls(selectedCls)}
item=el.down('a.color-'+color,!0);Ext.fly(item).addCls(selectedCls);me.value=color;if(suppressEvent!==!0){me.fireEvent('select',me,color)}}},clear:function(){var me=this,value=me.value,el;if(value&&me.rendered){el=me.el.down('a.color-'+value,!0);Ext.fly(el).removeCls(me.selectedCls)}
me.value=null},getValue:function(){return this.value||null}})
;
Ext.define('Ext.layout.component.field.HtmlEditor',{extend:'Ext.layout.component.field.FieldContainer',alias:['layout.htmleditor'],type:'htmleditor',naturalHeight:150,naturalWidth:300,beginLayout:function(ownerContext){var owner=this.owner,dom;if(Ext.isGecko){dom=owner.textareaEl.dom;this.lastValue=dom.value;dom.value=''}
this.callParent(arguments);ownerContext.toolbarContext=ownerContext.context.getCmp(owner.toolbar);ownerContext.inputCmpContext=ownerContext.context.getCmp(owner.inputCmp);ownerContext.bodyCellContext=ownerContext.getEl('bodyEl');ownerContext.textAreaContext=ownerContext.getEl('textareaEl');ownerContext.iframeContext=ownerContext.getEl('iframeEl')},beginLayoutCycle:function(ownerContext){var me=this,widthModel=ownerContext.widthModel,heightModel=ownerContext.heightModel,owner=me.owner,iframeEl=owner.iframeEl,textareaEl=owner.textareaEl,height=(heightModel.natural||heightModel.shrinkWrap)?me.naturalHeight:'';me.callParent(arguments);if(widthModel.shrinkWrap){iframeEl.setStyle('width','');textareaEl.setStyle('width','')}else if(widthModel.natural){ownerContext.bodyCellContext.setWidth(me.naturalWidth)}
iframeEl.setStyle('height',height);textareaEl.setStyle('height',height)},finishedLayout:function(){var owner=this.owner;this.callParent(arguments);if(Ext.isGecko){owner.textareaEl.dom.value=this.lastValue}}})
;
Ext.define('Ext.toolbar.Separator',{extend:'Ext.toolbar.Item',alias:'widget.tbseparator',alternateClassName:'Ext.Toolbar.Separator',requires:['Ext.toolbar.Toolbar'],baseCls:Ext.baseCSSPrefix+'toolbar-separator',ariaRole:'separator'})
;
Ext.define('Ext.layout.container.boxOverflow.Menu',{extend:'Ext.layout.container.boxOverflow.None',alternateClassName:'Ext.layout.boxOverflow.Menu',alias:['box.overflow.menu','box.overflow.Menu'],requires:['Ext.toolbar.Separator','Ext.button.Button'],noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items" role="menuitem">(None)</div>',menuCls:Ext.baseCSSPrefix+'box-menu',constructor:function(config){var me=this;me.callParent([config]);me.menuItems=[]},beginLayout:function(ownerContext){this.callParent([ownerContext]);this.clearOverflow(ownerContext)},beginLayoutCycle:function(ownerContext,firstCycle){this.callParent([ownerContext,firstCycle]);if(!firstCycle){this.clearOverflow(ownerContext);this.layout.cacheChildItems(ownerContext)}},onRemove:function(comp){Ext.Array.remove(this.menuItems,comp)},clearItem:function(comp){var menu=comp.menu;if(comp.isButton&&menu){comp.setMenu(menu,!1)}},getSuffixConfig:function(){var me=this,layout=me.layout,owner=layout.owner,oid=owner.id;me.menu=new Ext.menu.Menu({listeners:{scope:me,beforeshow:me.beforeMenuShow}});me.menuTrigger=new Ext.button.Button({id:oid+'-menu-trigger',cls:me.menuCls+'-after '+Ext.baseCSSPrefix+'toolbar-item',plain:owner.usePlainButtons,ownerCt:owner,ownerLayout:layout,iconCls:Ext.baseCSSPrefix+me.getOwnerType(owner)+'-more-icon',ui:owner.defaultButtonUI||'default',menu:me.menu,showEmptyMenu:!0,getSplitCls:function(){return''}});return me.menuTrigger.getRenderTree()},getOverflowCls:function(direction){return this.menuCls+'-body-'+direction},handleOverflow:function(ownerContext){var me=this,layout=me.layout;me.showTrigger(ownerContext);if(layout.direction!=='vertical'){me.menuTrigger.setLocalY((ownerContext.state.boxPlan.maxSize-me.menuTrigger[layout.names.getHeight]())/2)}
return{reservedSpace:me.triggerTotalWidth}},captureChildElements:function(){var me=this,menuTrigger=me.menuTrigger,names=me.layout.names;if(menuTrigger.rendering){menuTrigger.finishRender();me.triggerTotalWidth=menuTrigger[names.getWidth]()+menuTrigger.el.getMargin(names.parallelMargins)}},clearOverflow:function(ownerContext){var me=this,items=me.menuItems,length=items.length,owner=me.layout.owner,asLayoutRoot=owner._asLayoutRoot,item,i;owner.suspendLayouts();me.captureChildElements();me.hideTrigger();owner.resumeLayouts();for(i=0;i<length;i++){item=items[i];item.suspendLayouts();item.show();me.clearItem(item);item.resumeLayouts(asLayoutRoot)}
items.length=0},showTrigger:function(ownerContext){var me=this,layout=me.layout,owner=layout.owner,names=layout.names,startProp=names.x,sizeProp=names.width,plan=ownerContext.state.boxPlan,available=plan.targetSize[sizeProp],childItems=ownerContext.childItems,menuTrigger=me.menuTrigger,menuItems=me.menuItems,childContext,comp,i,props,len;menuTrigger.suspendLayouts();menuTrigger.show();menuTrigger.resumeLayouts(me._asLayoutRoot);available-=me.triggerTotalWidth;owner.suspendLayouts();for(i=0,len=menuItems.length;i<len;++i){me.clearItem(menuItems[i])}
menuItems.length=0;for(i=0,len=childItems.length;i<len;i++){childContext=childItems[i];props=childContext.props;if(props[startProp]+props[sizeProp]>available){comp=childContext.target;me.menuItems.push(comp);comp.hide()}}
owner.resumeLayouts()},hideTrigger:function(){var menuTrigger=this.menuTrigger;if(menuTrigger){menuTrigger.hide()}},beforeMenuShow:function(menu){var me=this,items=me.menuItems,i=0,len=items.length,item,prev,needsSep=function(group,prev){return group.isXType('buttongroup')&&!(prev instanceof Ext.toolbar.Separator)};menu.suspendLayouts();menu.removeAll(!1);for(;i<len;i++){item=items[i];if(!i&&(item instanceof Ext.toolbar.Separator)){continue}
if(prev&&(needsSep(item,prev)||needsSep(prev,item))){menu.add('-')}
me.addComponentToMenu(menu,item);prev=item}
if(menu.items.length<1){menu.add(me.noItemsMenuText)}
menu.resumeLayouts()},createMenuConfig:function(component,hideOnClick){var config=Ext.apply({},component.initialConfig),group=component.toggleGroup;Ext.copy(config,component,['iconCls','icon','itemId','disabled','handler','scope','menu','tabIndex']);Ext.applyIf(config,{hideOnClick:hideOnClick,destroyMenu:!1,listeners:null});config.text=component.overflowText||component.text;config.masterComponent=component;if(component.isFormField){config.value=component.getValue();if(component instanceof Ext.form.field.Checkbox){config={xtype:'menucheckitem',group:component.isRadio?component.name+'_clone':undefined,text:component.boxLabel||component.fieldLabel,name:component.name,masterComponent:component,checked:component.getValue(),hideOnClick:!1,checkChangeDisabled:!0}}
config.listeners={change:function(c,newVal,oldVal){c.masterComponent.setValue(newVal)}};component.on('change',function(c,newVal,oldVal){c.overflowClone.setValue(newVal)})}else if(group||component.enableToggle){Ext.apply(config,{hideOnClick:!1,group:group,checked:component.pressed,handler:function(item,e){item.masterComponent.onClick(e)}})}
if(component.isButton&&!component.changeListenersAdded){component.on({textchange:this.onButtonAttrChange,iconchange:this.onButtonAttrChange,toggle:this.onButtonToggle});component.changeListenersAdded=!0}
component.on({enable:this.onComponentStatusChange,disable:this.onComponentStatusChange});delete config.margin;delete config.ownerCt;delete config.xtype;delete config.id;delete config.itemId;return config},onButtonAttrChange:function(btn){var clone=btn.overflowClone;clone.suspendLayouts();clone.setText(btn.text);clone.setIcon(btn.icon);clone.setIconCls(btn.iconCls);clone.resumeLayouts(!0)},onButtonToggle:function(btn,state){if(btn.overflowClone.checked!==state){btn.overflowClone.setChecked(state)}},onComponentStatusChange:function(cmp){var clone=cmp.overflowClone;if(clone){clone.setDisabled(cmp.disabled)}},addComponentToMenu:function(menu,component){var me=this,i,items,iLen;if(component instanceof Ext.toolbar.Fill){return}else if(component instanceof Ext.toolbar.Separator){menu.add('-')}else if(component.overflowClone){menu.add(component.overflowClone)}else if(component.isComponent){if(component.isXType('splitbutton')){component.overflowClone=menu.add(me.createMenuConfig(component,!0))}else if(component.isXType('button')){component.overflowClone=menu.add(me.createMenuConfig(component,!component.menu))}else if(component.isXType('buttongroup')){items=component.items.items;iLen=items.length;for(i=0;i<iLen;i++){me.addComponentToMenu(menu,items[i])}}else if(component.isCheckbox){component.overflowClone=menu.add(me.createMenuConfig(component));Ext.apply(component.overflowClone,{getValue:function(){return component.overflowClone.checked},setValue:function(){component.overflowClone.setChecked(component.getValue())}});component.overflowClone.on('click',function(item){item.setChecked(item.masterComponent.isRadio?!0:!item.checked);item.fireEvent('change',item,item.checked)})}else{component.overflowClone=menu.add(Ext.create(Ext.getClassName(component),me.createMenuConfig(component)))}}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger);this.callParent()}})
;
Ext.define('Ext.rtl.layout.container.boxOverflow.Menu',{override:'Ext.layout.container.boxOverflow.Menu',getPrefixConfig:function(isFromRTL){if(isFromRTL||!this.layout.owner.getInherited().rtl){return this.callParent()}else{return this.getSuffixConfig(!0)}},getSuffixConfig:function(isFromRTL){if(isFromRTL||!this.layout.owner.getInherited().rtl){return this.callParent()}else{return this.getPrefixConfig(!0)}}})
;
Ext.define('Ext.form.field.HtmlEditor',{extend:'Ext.form.FieldContainer',alias:'widget.htmleditor',alternateClassName:'Ext.form.HtmlEditor',requires:['Ext.tip.QuickTipManager','Ext.picker.Color','Ext.layout.container.VBox','Ext.toolbar.Item','Ext.toolbar.Toolbar','Ext.util.Format','Ext.layout.component.field.HtmlEditor','Ext.util.TaskManager','Ext.layout.container.boxOverflow.Menu'],mixins:{field:'Ext.form.field.Field'},focusable:!0,componentLayout:'htmleditor',textareaCls:Ext.baseCSSPrefix+'htmleditor-textarea',componentTpl:['{beforeTextAreaTpl}','<textarea id="{id}-textareaEl" data-ref="textareaEl" name="{name}" tabindex="-1" {inputAttrTpl}',' class="{textareaCls}" autocomplete="off">','{[Ext.util.Format.htmlEncode(values.value)]}','</textarea>','{afterTextAreaTpl}','{beforeIFrameTpl}','<iframe id="{id}-iframeEl" data-ref="iframeEl" name="{iframeName}" frameBorder="0" {iframeAttrTpl}',' src="{iframeSrc}" class="{iframeCls}"></iframe>','{afterIFrameTpl}',{disableFormats:!0}],stretchInputElFixed:!0,subTplInsertions:['beforeTextAreaTpl','afterTextAreaTpl','beforeIFrameTpl','afterIFrameTpl','iframeAttrTpl','inputAttrTpl'],enableFormat:!0,enableFontSize:!0,enableColors:!0,enableAlignments:!0,enableLists:!0,enableSourceEdit:!0,enableLinks:!0,enableFont:!0,createLinkText:'Please enter the URL for the link:',defaultLinkValue:'http:/'+'/',fontFamilies:['Arial','Courier New','Tahoma','Times New Roman','Verdana'],defaultValue:Ext.isOpera?'&#160;':'&#8203;',extraFieldBodyCls:Ext.baseCSSPrefix+'html-editor-wrap',defaultButtonUI:'default-toolbar',buttonDefaults:null,initialized:!1,activated:!1,sourceEditMode:!1,iframePad:3,hideMode:'offsets',layout:{type:'vbox',align:'stretch'},maskOnDisable:!0,containerElCls:Ext.baseCSSPrefix+'html-editor-container',reStripQuotes:/^['"]*|['"]*$/g,textAlignRE:/text-align:(.*?);/i,safariNonsenseRE:/\sclass="(?:Apple-style-span|Apple-tab-span|khtml-block-placeholder)"/gi,nonDigitsRE:/\D/g,initComponent:function(){var me=this;me.items=[me.createToolbar(),me.createInputCmp()];if(me.value==null){me.value=''}
me.callParent(arguments);me.initField()},createInputCmp:function(){this.inputCmp=Ext.widget(this.getInputCmpCfg());return this.inputCmp},getInputCmpCfg:function(){var me=this,id=me.id+'-inputCmp',data={id:id,name:me.name,textareaCls:me.textareaCls+' '+Ext.baseCSSPrefix+'hidden',value:me.value,iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,iframeCls:Ext.baseCSSPrefix+'htmleditor-iframe'};me.getInsertionRenderData(data,me.subTplInsertions);return{flex:1,xtype:'component',tpl:me.lookupTpl('componentTpl'),childEls:['iframeEl','textareaEl'],id:id,cls:Ext.baseCSSPrefix+'html-editor-input',data:data}},createToolbar:function(){this.toolbar=Ext.widget(this.getToolbarCfg());return this.toolbar},getToolbarCfg:function(){var me=this,items=[],i,tipsEnabled=Ext.quickTipsActive&&Ext.tip.QuickTipManager.isEnabled(),baseCSSPrefix=Ext.baseCSSPrefix,fontSelectItem,undef;function btn(id,toggle,handler){return Ext.merge({itemId:id,cls:baseCSSPrefix+'btn-icon',iconCls:baseCSSPrefix+'edit-'+id,enableToggle:toggle!==!1,scope:me,handler:handler||me.relayBtnCmd,clickEvent:'mousedown',tooltip:tipsEnabled?me.buttonTips[id]:undef,overflowText:me.buttonTips[id].title||undef,tabIndex:-1},me.buttonDefaults)}
if(me.enableFont){fontSelectItem=Ext.widget('component',{itemId:'fontSelect',renderTpl:['<select id="{id}-selectEl" data-ref="selectEl" class="'+baseCSSPrefix+'font-select">','</select>'],childEls:['selectEl'],afterRender:function(){me.fontSelect=this.selectEl;Ext.Component.prototype.afterRender.apply(this,arguments)},onDisable:function(){var selectEl=this.selectEl;if(selectEl){selectEl.dom.disabled=!0}
Ext.Component.prototype.onDisable.apply(this,arguments)},onEnable:function(){var selectEl=this.selectEl;if(selectEl){selectEl.dom.disabled=!1}
Ext.Component.prototype.onEnable.apply(this,arguments)},listeners:{change:function(){me.win.focus();me.relayCmd('fontName',me.fontSelect.dom.value);me.deferFocus()},element:'selectEl'}});items.push(fontSelectItem,'-')}
if(me.enableFormat){items.push(btn('bold'),btn('italic'),btn('underline'))}
if(me.enableFontSize){items.push('-',btn('increasefontsize',!1,me.adjustFont),btn('decreasefontsize',!1,me.adjustFont))}
if(me.enableColors){items.push('-',Ext.merge({itemId:'forecolor',cls:baseCSSPrefix+'btn-icon',iconCls:baseCSSPrefix+'edit-forecolor',overflowText:me.buttonTips.forecolor.title,tooltip:tipsEnabled?me.buttonTips.forecolor||undef:undef,tabIndex:-1,menu:Ext.widget('menu',{plain:!0,items:[{xtype:'colorpicker',allowReselect:!0,focus:Ext.emptyFn,value:'000000',plain:!0,clickEvent:'mousedown',handler:function(cp,color){me.relayCmd('forecolor',Ext.isWebKit||Ext.isIE||Ext.isEdge?'#'+color:color);this.up('menu').hide()}}]})},me.buttonDefaults),Ext.merge({itemId:'backcolor',cls:baseCSSPrefix+'btn-icon',iconCls:baseCSSPrefix+'edit-backcolor',overflowText:me.buttonTips.backcolor.title,tooltip:tipsEnabled?me.buttonTips.backcolor||undef:undef,tabIndex:-1,menu:Ext.widget('menu',{plain:!0,items:[{xtype:'colorpicker',focus:Ext.emptyFn,value:'FFFFFF',plain:!0,allowReselect:!0,clickEvent:'mousedown',handler:function(cp,color){if(Ext.isGecko){me.execCmd('useCSS',!1);me.execCmd('hilitecolor','#'+color);me.execCmd('useCSS',!0);me.deferFocus()}else{me.relayCmd(Ext.isOpera?'hilitecolor':'backcolor',Ext.isWebKit||Ext.isIE||Ext.isEdge||Ext.isOpera?'#'+color:color)}
this.up('menu').hide()}}]})},me.buttonDefaults))}
if(me.enableAlignments){items.push('-',btn('justifyleft'),btn('justifycenter'),btn('justifyright'))}
if(me.enableLinks){items.push('-',btn('createlink',!1,me.createLink))}
if(me.enableLists){items.push('-',btn('insertorderedlist'),btn('insertunorderedlist'))}
if(me.enableSourceEdit){items.push('-',btn('sourceedit',!0,function(){me.toggleSourceEdit(!me.sourceEditMode)}))}
for(i=0;i<items.length;i++){if(items[i].itemId!=='sourceedit'){items[i].disabled=!0}}
return{xtype:'toolbar',defaultButtonUI:me.defaultButtonUI,cls:Ext.baseCSSPrefix+'html-editor-tb',enableOverflow:!0,items:items,listeners:{click:function(e){e.preventDefault()},element:'el'}}},getMaskTarget:function(){return Ext.isGecko?this.inputCmp.el:this.bodyEl},setReadOnly:function(readOnly){var me=this,textareaEl=me.textareaEl,iframeEl=me.iframeEl,body;me.readOnly=readOnly;if(textareaEl){textareaEl.dom.readOnly=readOnly}
if(me.initialized){body=me.getEditorBody();if(Ext.isIE){iframeEl.setDisplayed(!1);body.contentEditable=!readOnly;iframeEl.setDisplayed(!0)}else{me.setDesignMode(!readOnly)}
if(body){body.style.cursor=readOnly?'default':'text'}
me.disableItems(readOnly)}},getDocMarkup:function(){var me=this,h=me.iframeEl.getHeight()-me.iframePad*2;return Ext.String.format('<!DOCTYPE html>'+'<html><head><style type="text/css">'+(Ext.isOpera||Ext.isIE?'p{margin:0;}':'')+'body{border:0;margin:0;padding:{0}px;direction:'+(me.rtl?'rtl;':'ltr;')+(Ext.isIE8?Ext.emptyString:'min-')+'height:{1}px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;cursor:text;background-color:white;'+(Ext.isIE?'':'font-size:12px;font-family:{2}')+'}</style></head><body></body></html>',me.iframePad,h,me.defaultFont)},getEditorBody:function(){var doc=this.getDoc();return doc&&doc.body},getDoc:function(){return this.iframeEl.dom.contentDocument||this.getWin().document},getWin:function(){return this.iframeEl.dom.contentWindow||window.frames[this.iframeEl.dom.name]},initDefaultFont:function(){var me=this,selIdx=0,fonts,font,select,option,i,len,lower;if(!me.defaultFont){font=me.textareaEl.getStyle('font-family');font=Ext.String.capitalize(font.split(',')[0]);fonts=Ext.Array.clone(me.fontFamilies);Ext.Array.include(fonts,font);fonts.sort();me.defaultFont=font;select=me.down('#fontSelect').selectEl.dom;for(i=0,len=fonts.length;i<len;++i){font=fonts[i];lower=font.toLowerCase();option=new Option(font,lower);if(font===me.defaultFont){selIdx=i}
option.style.fontFamily=lower;if(Ext.isIE){select.add(option)}else{select.options.add(option)}}
select.options[selIdx].selected=!0}},isEqual:function(value1,value2){return this.isEqualAsString(value1,value2)},afterRender:function(){var me=this,inputCmp=me.inputCmp;me.callParent(arguments);me.iframeEl=inputCmp.iframeEl;me.textareaEl=inputCmp.textareaEl;me.inputEl=me.iframeEl;if(me.enableFont){me.initDefaultFont()}
me.initPhase=0;me.initializeTask=Ext.TaskManager.start({run:me.initFrameDoc,scope:me,interval:10,duration:5000})},initFrameDoc:function(){var me=this,doc=me.getDoc();if(me.destroying||me.destroyed){return Ext.TaskManager.stop(me.initializeTask)}
switch(me.initPhase){case 0:if(doc){me.win=me.getWin();doc.open();doc.write(me.getDocMarkup());doc.close();me.initPhase++}
break;case 1:if(doc.body||doc.readyState==='complete'){me.setDesignMode(!0);me.initPhase++}
break;case 2:me.initEditor();Ext.TaskManager.stop(me.initializeTask)}},setDesignMode:function(mode){var me=this,doc=me.getDoc();if(doc){if(me.readOnly){mode=!1}
doc.designMode=(/on|true/i).test(String(mode).toLowerCase())?'on':'off'}},getDesignMode:function(){var doc=this.getDoc();return!doc?'':String(doc.designMode).toLowerCase()},disableItems:function(disabled){var items=this.getToolbar().items.items,i,iLen=items.length,item;for(i=0;i<iLen;i++){item=items[i];if(item.getItemId()!=='sourceedit'){item.setDisabled(disabled)}}},toggleSourceEdit:function(sourceEditMode){var me=this,iframe=me.iframeEl,textarea=me.textareaEl,hiddenCls=Ext.baseCSSPrefix+'hidden',btn=me.getToolbar().getComponent('sourceedit');if(!Ext.isBoolean(sourceEditMode)){sourceEditMode=!me.sourceEditMode}
me.sourceEditMode=sourceEditMode;if(btn.pressed!==sourceEditMode){btn.toggle(sourceEditMode)}
if(sourceEditMode){me.disableItems(!0);me.syncValue();iframe.addCls(hiddenCls);textarea.removeCls(hiddenCls);textarea.dom.removeAttribute('tabIndex');textarea.focus();me.inputEl=textarea}else{if(me.initialized){me.disableItems(me.readOnly)}
me.pushValue();iframe.removeCls(hiddenCls);textarea.addCls(hiddenCls);textarea.dom.setAttribute('tabIndex',-1);me.deferFocus();me.inputEl=iframe}
me.fireEvent('editmodechange',me,sourceEditMode);me.updateLayout()},createLink:function(){var url=prompt(this.createLinkText,this.defaultLinkValue);if(url&&url!=='http:/'+'/'){this.relayCmd('createlink',url)}},clearInvalid:Ext.emptyFn,setValue:function(value){var me=this,textarea=me.textareaEl;if(value===null||value===undefined){value=''}
if(me.value!==value){if(textarea){textarea.dom.value=value}
me.pushValue();if(!me.rendered&&me.inputCmp){me.inputCmp.data.value=value}
me.mixins.field.setValue.call(me,value)}
return me},cleanHtml:function(html){html=String(html);if(Ext.isWebKit){html=html.replace(this.safariNonsenseRE,'')}
if(html.charCodeAt(0)===parseInt(this.defaultValue.replace(this.nonDigitsRE,''),10)){html=html.substring(1)}
return html},syncValue:function(){var me=this,body,changed,html,bodyStyleText,match,textElDom;if(me.initialized){body=me.getEditorBody();html=body.innerHTML;textElDom=me.textareaEl.dom;if(Ext.isWebKit){bodyStyleText=body.style.cssText;match=bodyStyleText.match(me.textAlignRE);if(match&&match[1]){html='<div style="'+match[0]+'">'+html+'</div>'}}
html=me.cleanHtml(html);if(me.fireEvent('beforesync',me,html)!==!1){if(Ext.isGecko&&textElDom.value===''&&html==='<br>'){html=''}
if(textElDom.value!==html){textElDom.value=html;changed=!0}
me.fireEvent('sync',me,html);if(changed){me.checkChange()}}}},getValue:function(){var me=this,value;if(!me.sourceEditMode){me.syncValue()}
value=me.rendered?me.textareaEl.dom.value:me.value;me.value=value;return value},pushValue:function(){var me=this,v;if(me.initialized){v=me.textareaEl.dom.value||'';if(!me.activated&&v.length<1){v=me.defaultValue}
if(me.fireEvent('beforepush',me,v)!==!1){me.getEditorBody().innerHTML=v;if(Ext.isGecko){me.setDesignMode(!1);me.setDesignMode(!0)}
me.fireEvent('push',me,v)}}},focus:function(selectText,delay){var me=this,value,focusEl;if(delay){if(!me.focusTask){me.focusTask=new Ext.util.DelayedTask(me.focus)}
me.focusTask.delay(Ext.isNumber(delay)?delay:10,null,me,[selectText,!1])}else{if(selectText){if(me.textareaEl&&me.textareaEl.dom){value=me.textareaEl.dom.value}
if(value&&value.length){me.execCmd('selectall',!0)}}
focusEl=me.getFocusEl();if(focusEl&&focusEl.focus){focusEl.focus()}}
return me},initEditor:function(){var me=this,dbody=me.getEditorBody(),ss=me.textareaEl.getStyle(['font-size','font-family','background-image','background-repeat','background-color','color']),doc=me.getDoc(),docEl=Ext.get(doc),fn;ss['background-attachment']='fixed';dbody.bgProperties='fixed';Ext.DomHelper.applyStyles(dbody,ss);if(docEl){try{docEl.clearListeners()}catch(e){}
fn=Ext.Function.createBuffered(me.updateToolbar,100,me);docEl.on({mousedown:fn,dblclick:fn,click:fn,keyup:fn,delegated:!1});fn=me.onRelayedEvent;docEl.on({mousedown:fn,mousemove:fn,mouseup:fn,click:fn,dblclick:fn,delegated:!1,scope:me});if(Ext.isGecko){docEl.on('keypress',me.applyCommand,me)}
if(me.fixKeys){docEl.on('keydown',me.fixKeys,me,{delegated:!1})}
if(me.fixKeysAfter){docEl.on('keyup',me.fixKeysAfter,me,{delegated:!1})}
if(Ext.isIE9){Ext.get(doc.documentElement).on('focus',me.focus,me)}
if(Ext.isIE8){docEl.on('focusout',function(){me.savedSelection=doc.selection.type!=='None'?doc.selection.createRange():null},me);docEl.on('focusin',function(){if(me.savedSelection){me.savedSelection.select()}},me)}
Ext.getWin().on('unload',me.destroyEditor,me);me.initialized=!0;me.pushValue();me.setReadOnly(me.readOnly);me.fireEvent('initialize',me)}},destroyEditor:function(){var me=this,initializeTask=me.initializeTask,doc,prop;if(initializeTask){Ext.TaskManager.stop(initializeTask,!0)}
if(me.rendered){Ext.getWin().un('unload',me.destroyEditor,me);doc=me.getDoc();if(doc){Ext.get(doc).destroy();if(doc.hasOwnProperty){for(prop in doc){try{if(doc.hasOwnProperty(prop)){delete doc[prop]}}catch(e){}}}}}},doDestroy:function(){this.destroyEditor();this.callParent()},onRelayedEvent:function(event){var iframeEl=this.iframeEl,iframeXY=Ext.fly(iframeEl).getTrueXY(),originalEventXY=event.getXY(),eventXY=event.getXY();event.xy=[iframeXY[0]+eventXY[0],iframeXY[1]+eventXY[1]];event.injectEvent(iframeEl);event.xy=originalEventXY},onFirstFocus:function(){var me=this,selection,range;me.activated=!0;me.disableItems(me.readOnly);if(Ext.isGecko){me.win.focus();selection=me.win.getSelection();if(selection.focusNode&&!me.getValue().length){range=selection.getRangeAt(0);range.selectNodeContents(me.getEditorBody());range.collapse(!0);me.deferFocus()}
try{me.execCmd('useCSS',!0);me.execCmd('styleWithCSS',!1)}catch(e){}}
me.fireEvent('activate',me)},adjustFont:function(btn){var adjust=btn.getItemId()==='increasefontsize'?1:-1,size=this.getDoc().queryCommandValue('FontSize')||'2',isPxSize=Ext.isString(size)&&size.indexOf('px')!==-1,isSafari;size=parseInt(size,10);if(isPxSize){if(size<=10){size=1+adjust}else if(size<=13){size=2+adjust}else if(size<=16){size=3+adjust}else if(size<=18){size=4+adjust}else if(size<=24){size=5+adjust}else{size=6+adjust}
size=Ext.Number.constrain(size,1,6)}else{isSafari=Ext.isSafari;if(isSafari){adjust*=2}
size=Math.max(1,size+adjust)+(isSafari?'px':0)}
this.relayCmd('FontSize',size)},updateToolbar:function(){var me=this,i,l,btns,doc,name,queriedName,fontSelect,toolbarSubmenus;if(me.readOnly){return}
if(!me.activated){me.onFirstFocus();return}
btns=me.getToolbar().items.map;doc=me.getDoc();if(me.enableFont){queriedName=doc.queryCommandValue('fontName');name=(queriedName?queriedName.split(",")[0].replace(me.reStripQuotes,''):me.defaultFont).toLowerCase();fontSelect=me.fontSelect.dom;if(name!==fontSelect.value||name!==queriedName){fontSelect.value=name}}
function updateButtons(){var state;for(i=0,l=arguments.length,name;i<l;i++){name=arguments[i];try{state=doc.queryCommandState(name)}catch(e){state=!1}
btns[name].toggle(state)}}
if(me.enableFormat){updateButtons('bold','italic','underline')}
if(me.enableAlignments){updateButtons('justifyleft','justifycenter','justifyright')}
if(me.enableLists){updateButtons('insertorderedlist','insertunorderedlist')}
toolbarSubmenus=me.toolbar.query('menu');for(i=0;i<toolbarSubmenus.length;i++){toolbarSubmenus[i].hide()}
me.syncValue()},relayBtnCmd:function(btn){this.relayCmd(btn.getItemId())},relayCmd:function(cmd,value){Ext.defer(function(){var me=this;if(!this.destroyed){me.win.focus();me.execCmd(cmd,value);me.updateToolbar()}},10,this)},execCmd:function(cmd,value){var me=this,doc=me.getDoc();doc.execCommand(cmd,!1,(value===undefined?null:value));me.syncValue()},applyCommand:function(e){if(e.ctrlKey){var me=this,c=e.getCharCode(),cmd;if(c>0){c=String.fromCharCode(c);switch(c){case 'b':cmd='bold';break;case 'i':cmd='italic';break;case 'u':cmd='underline';break}
if(cmd){me.win.focus();me.execCmd(cmd);me.deferFocus();e.preventDefault()}}}},insertAtCursor:function(text){var me=this,win=me.getWin(),doc=me.getDoc(),sel,range,el,frag,node,lastNode;if(me.activated){win.focus();if(win.getSelection){sel=win.getSelection();if(sel.getRangeAt&&sel.rangeCount){range=sel.getRangeAt(0);range.deleteContents();el=doc.createElement("div");el.innerHTML=text;frag=doc.createDocumentFragment();while((node=el.firstChild)){lastNode=frag.appendChild(node)}
range.insertNode(frag);if(lastNode){range=range.cloneRange();range.setStartAfter(lastNode);range.collapse(!0);sel.removeAllRanges();sel.addRange(range)}}}else if(doc.selection&&sel.type!=='Control'){sel=doc.selection;range=sel.createRange();range.collapse(!0);sel.createRange().pasteHTML(text)}
me.deferFocus()}},fixKeys:(function(){if(Ext.isIE10m){return function(e){var me=this,k=e.getKey(),doc=me.getDoc(),readOnly=me.readOnly,range;if(k===e.TAB){e.stopEvent();if(!readOnly){range=doc.selection.createRange();if(range){if(range.collapse){range.collapse(!0);range.pasteHTML('&#160;&#160;&#160;&#160;')}
me.deferFocus()}}}}}
if(Ext.isOpera){return function(e){var me=this,k=e.getKey(),readOnly=me.readOnly;if(k===e.TAB){e.stopEvent();if(!readOnly){me.win.focus();me.execCmd('InsertHTML','&#160;&#160;&#160;&#160;');me.deferFocus()}}}}
return null}()),fixKeysAfter:(function(){if(Ext.isIE){return function(e){var me=this,k=e.getKey(),doc=me.getDoc(),readOnly=me.readOnly,innerHTML;if(!readOnly&&(k===e.BACKSPACE||k===e.DELETE)){innerHTML=doc.body.innerHTML;if(innerHTML==='<p>&nbsp;</p>'||innerHTML==='<P>&nbsp;</P>'){doc.body.innerHTML=''}}}}
return null}()),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:'Bold (Ctrl+B)',text:'Make the selected text bold.',cls:Ext.baseCSSPrefix+'html-editor-tip'},italic:{title:'Italic (Ctrl+I)',text:'Make the selected text italic.',cls:Ext.baseCSSPrefix+'html-editor-tip'},underline:{title:'Underline (Ctrl+U)',text:'Underline the selected text.',cls:Ext.baseCSSPrefix+'html-editor-tip'},increasefontsize:{title:'Grow Text',text:'Increase the font size.',cls:Ext.baseCSSPrefix+'html-editor-tip'},decreasefontsize:{title:'Shrink Text',text:'Decrease the font size.',cls:Ext.baseCSSPrefix+'html-editor-tip'},backcolor:{title:'Text Highlight Color',text:'Change the background color of the selected text.',cls:Ext.baseCSSPrefix+'html-editor-tip'},forecolor:{title:'Font Color',text:'Change the color of the selected text.',cls:Ext.baseCSSPrefix+'html-editor-tip'},justifyleft:{title:'Align Text Left',text:'Align text to the left.',cls:Ext.baseCSSPrefix+'html-editor-tip'},justifycenter:{title:'Center Text',text:'Center text in the editor.',cls:Ext.baseCSSPrefix+'html-editor-tip'},justifyright:{title:'Align Text Right',text:'Align text to the right.',cls:Ext.baseCSSPrefix+'html-editor-tip'},insertunorderedlist:{title:'Bullet List',text:'Start a bulleted list.',cls:Ext.baseCSSPrefix+'html-editor-tip'},insertorderedlist:{title:'Numbered List',text:'Start a numbered list.',cls:Ext.baseCSSPrefix+'html-editor-tip'},createlink:{title:'Hyperlink',text:'Make the selected text a hyperlink.',cls:Ext.baseCSSPrefix+'html-editor-tip'},sourceedit:{title:'Source Edit',text:'Switch to source editing mode.',cls:Ext.baseCSSPrefix+'html-editor-tip'}},privates:{deferFocus:function(){this.focus(!1,!0)},getFocusEl:function(){return this.sourceEditMode?this.textareaEl:this.iframeEl}}})
;
Ext.define('Ext.theme.neptune.form.field.HtmlEditor',{override:'Ext.form.field.HtmlEditor',defaultButtonUI:'plain-toolbar'})
;
Ext.define('Ext.view.TagKeyNav',{extend:'Ext.view.BoundListKeyNav',alias:'view.navigation.tagfield',onKeySpace:function(e){var me=this,field=me.view.pickerField;if(field.isExpanded&&field.inputEl.dom.value===''){field.preventKeyUpEvent=!0;me.navigateOnSpace=!0;me.callParent([e]);e.stopEvent();return!1}
return!0}})
;
Ext.define('Ext.form.field.Tag',{extend:'Ext.form.field.ComboBox',xtype:'tagfield',requires:['Ext.selection.Model','Ext.data.Store','Ext.data.ChainedStore','Ext.view.TagKeyNav'],noWrap:!1,multiSelect:!0,delimiter:',',tipTpl:undefined,forceSelection:!0,createNewOnEnter:!1,createNewOnBlur:!1,encodeSubmitValue:!1,triggerOnClick:!0,stacked:!1,filterPickList:!1,clearOnBackspace:!0,grow:!0,growMin:!1,growMax:!1,simulatePlaceholder:!0,selectOnFocus:!0,ariaHelpText:'Use Up and Down arrows to view available values, Enter to select. '+'Use Left and Right arrows to view selected values, Delete key to deselect.',ariaHelpTextEditable:'Use Up and Down arrows to view available values, Enter to select. '+'Type and press Enter to create a new value. '+'Use Left and Right arrows to view selected values, '+'Delete key to deselect.',ariaSelectedText:'Selected {0}.',ariaDeselectedText:'{0} removed from selection.',ariaNoneSelectedText:'No value selected.',ariaSelectedListLabel:'Selected values',ariaAvailableListLabel:'Available values',fieldSubTpl:['<div id="{cmpId}-listWrapper" data-ref="listWrapper"'+(Ext.isGecko?' tabindex="-1"':''),'<tpl foreach="ariaElAttributes"> {$}="{.}"</tpl>',' class="'+Ext.baseCSSPrefix+'tagfield {fieldCls} {typeCls} {typeCls}-{ui}"<tpl if="wrapperStyle"> style="{wrapperStyle}"</tpl>>','<span id="{cmpId}-selectedText" data-ref="selectedText" aria-hidden="true" class="'+Ext.baseCSSPrefix+'hidden-clip"></span>','<ul id="{cmpId}-itemList" data-ref="itemList" role="presentation" class="'+Ext.baseCSSPrefix+'tagfield-list{itemListCls}">','<li id="{cmpId}-inputElCt" data-ref="inputElCt" role="presentation" class="'+Ext.baseCSSPrefix+'tagfield-input">','<input id="{cmpId}-inputEl" data-ref="inputEl" type="{type}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx != null">tabindex="{tabIdx}" </tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl foreach="inputElAriaAttributes"> {$}="{.}"</tpl>','class="'+Ext.baseCSSPrefix+'tagfield-input-field {inputElCls} {emptyCls} {fixCls}" autocomplete="off">','</li>','</ul>','<ul id="{cmpId}-ariaList" data-ref="ariaList" role="listbox"','<tpl if="ariaSelectedListLabel"> aria-label="{ariaSelectedListLabel}"</tpl>','<tpl if="multiSelect"> aria-multiselectable="true"</tpl>',' class="'+Ext.baseCSSPrefix+'tagfield-arialist">','</ul>','</div>',{disableFormats:!0}],postSubTpl:['<label id="{cmpId}-placeholderLabel" data-ref="placeholderLabel" for="{cmpId}-inputEl" class="{placeholderCoverCls} {placeholderCoverCls}-{ui} {emptyCls}">{emptyText}</label>','</div>','<tpl for="triggers">{[values.renderTrigger(parent)]}</tpl>','</div>'],extraFieldBodyCls:Ext.baseCSSPrefix+'tagfield-body',childEls:['listWrapper','itemList','inputEl','inputElCt','selectedText','ariaList'],clearValueOnEmpty:!1,ariaSelectable:!0,ariaEl:'listWrapper',tagItemCls:Ext.baseCSSPrefix+'tagfield-item',tagItemTextCls:Ext.baseCSSPrefix+'tagfield-item-text',tagItemCloseCls:Ext.baseCSSPrefix+'tagfield-item-close',tagItemSelector:'.'+Ext.baseCSSPrefix+'tagfield-item',tagItemCloseSelector:'.'+Ext.baseCSSPrefix+'tagfield-item-close',tagSelectedCls:Ext.baseCSSPrefix+'tagfield-item-selected',initComponent:function(){var me=this,typeAhead=me.typeAhead,delimiter=me.delimiter;if(typeAhead&&!me.editable){Ext.raise('If typeAhead is enabled the combo must be editable: true -- '+'please change one of those settings.')}
if(me.createNewOnEnter||me.createNewOnBlur){me.forceSelection=!1}
me.typeAhead=!1;if(me.value==null){me.value=[]}
me.selectionModel=new Ext.selection.Model({mode:'MULTI',onSelectChange:function(record,isSelected,suppressEvent,commitFn){commitFn()},listeners:{scope:me,selectionchange:me.onSelectionChange,focuschange:me.onFocusChange}});if(!me.ariaHelp){me.ariaHelp=me.createNewOnEnter?me.ariaHelpTextEditable:me.ariaHelpText}
me.callParent();me.typeAhead=typeAhead;if(delimiter&&me.multiSelect){me.delimiterRegexp=new RegExp(Ext.String.escapeRegex(delimiter))}},initEvents:function(){var me=this,inputEl=me.inputEl;me.callParent(arguments);if(!me.enableKeyEvents){inputEl.on('keydown',me.onKeyDown,me);inputEl.on('keyup',me.onKeyUp,me)}
me.listWrapper.on({scope:me,click:me.onItemListClick,mousedown:me.onItemMouseDown})},createPicker:function(){var me=this,config;config=Ext.apply({navigationModel:'tagfield'},me.defaultListConfig);if(me.ariaAvailableListLabel){config.ariaRenderAttributes={'aria-label':Ext.String.htmlEncode(me.ariaAvailableListLabel)}}
me.defaultListConfig=config;return me.callParent()},isValid:function(){var me=this,disabled=me.disabled,validate=me.forceValidation||!disabled;return validate?me.validateValue(me.getValue()):disabled},onBindStore:function(store){var me=this;me.callParent([store]);if(store){me.valueStore=new Ext.data.Store({model:store.getModel(),proxy:'memory',useModelWarning:!1});me.selectionModel.bindStore(me.valueStore);if(me.filterPickList){me.listFilter=new Ext.util.Filter({scope:me,filterFn:me.filterPicked});me.changingFilters=!0;store.filter(me.listFilter);me.changingFilters=!1}}},filterPicked:function(rec){return!this.valueCollection.contains(rec)},onUnbindStore:function(store){var me=this,valueStore=me.valueStore,picker=me.picker;if(picker){picker.bindStore(null)}
if(valueStore){valueStore.destroy();me.valueStore=null}
if(me.filterPickList&&!store.destroyed){me.changingFilters=!0;store.removeFilter(me.listFilter);me.changingFilters=!1}
me.callParent(arguments)},clearInput:function(){var me=this,valueRecords=me.getValueRecords(),inputValue=me.inputEl&&me.inputEl.dom.value,lastDisplayValue;if(valueRecords.length&&inputValue){lastDisplayValue=valueRecords[valueRecords.length-1].get(me.displayField);if(!Ext.String.startsWith(lastDisplayValue,inputValue,!0)){return}
me.inputEl.dom.value='';if(me.queryMode==='local'){me.clearLocalFilter();me.getPicker().refresh()}}},onValueCollectionEndUpdate:function(){var me=this,pickedRecords=me.valueCollection.items,valueStore=me.valueStore;if(me.isSelectionUpdating()){return}
if(me.filterPickList){me.changingFilters=!0;me.store.filter(me.listFilter);me.changingFilters=!1}
me.callParent();Ext.suspendLayouts();if(valueStore){valueStore.suspendEvents();valueStore.loadRecords(pickedRecords);valueStore.resumeEvents()}
me.refreshEmptyText();me.clearInput();Ext.resumeLayouts(!0);me.alignPicker()},checkValueOnDataChange:Ext.emptyFn,onSelectionChange:function(selModel,selectedRecs){var me=this,inputEl=me.inputEl,item;me.applyMultiselectItemMarkup();me.applyAriaListMarkup();me.applyAriaSelectedText();if(inputEl){if(selectedRecs.length===0){inputEl.dom.removeAttribute('aria-activedescendant')}else{item=me.getAriaListNode(selectedRecs[0]);if(item){inputEl.dom.setAttribute('aria-activedescendant',item.id)}}}
me.fireEvent('valueselectionchange',me,selectedRecs)},onFocusChange:function(selectionModel,oldFocused,newFocused){var me=this;me.callParent([selectionModel,oldFocused,newFocused]);me.fireEvent('valuefocuschange',me,oldFocused,newFocused)},getAriaListNode:function(record){var ariaList=this.ariaList,node;if(ariaList&&record){node=ariaList.selectNode('[data-recordid="'+record.internalId+'"]')}
return node},doDestroy:function(){Ext.destroy(this.selectionModel);this.callParent()},getSubTplData:function(fieldData){var me=this,id=me.id,data=me.callParent(arguments),emptyText=me.emptyText,isEmpty=emptyText&&data.value.length<1,growMin=me.growMin,growMax=me.growMax,wrapperStyle='',attr;data.value='';data.emptyText=isEmpty?emptyText:'';data.itemListCls='';data.emptyCls=isEmpty?me.emptyUICls:'';if(me.grow){if(Ext.isNumber(growMin)&&growMin>0){wrapperStyle+='min-height:'+growMin+'px;'}
if(Ext.isNumber(growMax)&&growMax>0){wrapperStyle+='max-height:'+growMax+'px;'}}else{wrapperStyle+='max-height: 1px;'}
data.wrapperStyle=wrapperStyle;if(me.stacked===!0){data.itemListCls+=' '+Ext.baseCSSPrefix+'tagfield-stacked'}
if(!me.multiSelect){data.itemListCls+=' '+Ext.baseCSSPrefix+'tagfield-singleselect'}
if(!me.ariaStaticRoles[me.ariaRole]){data.multiSelect=me.multiSelect;data.ariaSelectedListLabel=Ext.String.htmlEncode(me.ariaSelectedListLabel);attr=data.ariaElAttributes;if(attr){attr['aria-owns']=id+'-inputEl '+id+'-picker '+id+'-ariaList'}
attr=data.inputElAriaAttributes;if(attr){attr.role='textbox';attr['aria-describedby']=id+'-selectedText '+(attr['aria-describedby']||'')}}
return data},onRender:function(container,index){var me=this;me.callParent([container,index]);me.emptyClsElements.push(me.listWrapper,me.placeholderLabel)},afterRender:function(){var me=this,inputEl=me.inputEl,emptyText=me.emptyText;if(emptyText){if(Ext.supports.Placeholder&&inputEl){inputEl.dom.removeAttribute('placeholder')}}
me.applyMultiselectItemMarkup();me.applyAriaListMarkup();me.applyAriaSelectedText();me.callParent()},findRecord:function(field,value){var matches=this.getStore().queryRecords(field,value);return matches.length?matches[0]:!1},getCursorPosition:function(){var cursorPos;if(document.selection){cursorPos=document.selection.createRange();cursorPos.collapse(!0);cursorPos.moveStart('character',-this.inputEl.dom.value.length);cursorPos=cursorPos.text.length}else{cursorPos=this.inputEl.dom.selectionStart}
return cursorPos},hasSelectedText:function(){var inputEl=this.inputEl.dom,sel,range;if(document.selection){sel=document.selection;range=sel.createRange();return(range.parentElement()===inputEl)}else{return inputEl.selectionStart!==inputEl.selectionEnd}},onKeyDown:function(e){var me=this,key=e.getKey(),inputEl=me.inputEl,rawValue=inputEl&&inputEl.dom.value,valueCollection=me.valueCollection,selModel=me.selectionModel,stopEvent=!1,valueCount,lastSelectionIndex,records,text,i,len;if(me.destroyed||me.readOnly||me.disabled||!me.editable){return}
valueCount=valueCollection.getCount();if(valueCount>0&&rawValue===''){lastSelectionIndex=(selModel.getCount()>0)?valueCollection.indexOf(selModel.getLastSelected()):-1;if((key===e.BACKSPACE&&me.clearOnBackspace)||(key===e.DELETE&&lastSelectionIndex>-1)){if(lastSelectionIndex>-1){if(selModel.getCount()>1){lastSelectionIndex=-1}
records=selModel.getSelection();text=[];for(i=0,len=records.length;i<len;i++){text.push(records[i].get(me.displayField))}
text=text.join(', ')}else{records=valueCollection.last();text=records.get(me.displayField)}
valueCollection.remove(records);if(text){me.ariaErrorEl.dom.innerHTML=Ext.String.formatEncode(me.ariaDeselectedText,text)}
selModel.clearSelections();if(lastSelectionIndex===(valueCount-1)){selModel.select(valueCollection.last())}else if(lastSelectionIndex>-1){selModel.select(lastSelectionIndex)}else if(valueCollection.getCount()){selModel.select(valueCollection.last())}
stopEvent=!0}else if(key===e.RIGHT||key===e.LEFT){if(lastSelectionIndex===-1&&key===e.LEFT){selModel.select(valueCollection.last());stopEvent=!0}else if(lastSelectionIndex>-1){if(key===e.RIGHT){if(lastSelectionIndex<(valueCount-1)){selModel.select(lastSelectionIndex+1,e.shiftKey);stopEvent=!0}else if(!e.shiftKey){selModel.deselectAll();stopEvent=!0}}else if(key===e.LEFT&&(lastSelectionIndex>0)){selModel.select(lastSelectionIndex-1,e.shiftKey);stopEvent=!0}}}else if(key===e.A&&e.ctrlKey){selModel.selectAll();stopEvent=e.A}}
if(stopEvent){me.preventKeyUpEvent=stopEvent;e.stopEvent();return}
if(me.isExpanded&&key===e.ENTER&&me.picker.highlightedItem){me.preventKeyUpEvent=!0}
if(me.enableKeyEvents){me.callParent(arguments)}
if(!e.isSpecialKey()&&!e.hasModifier()){selModel.deselectAll()}},onKeyUp:function(e,t){var me=this,inputEl=me.inputEl,rawValue=inputEl.dom.value,preventKeyUpEvent=me.preventKeyUpEvent;if(me.preventKeyUpEvent){e.stopEvent();if(preventKeyUpEvent===!0||e.getKey()===preventKeyUpEvent){delete me.preventKeyUpEvent}
return}
if(me.multiSelect&&me.delimiterRegexp&&me.delimiterRegexp.test(rawValue)||(me.createNewOnEnter&&e.getKey()===e.ENTER)){if(me.createNewOnEnter&&rawValue){me.ariaErrorEl.dom.innerHTML=Ext.String.formatEncode(me.ariaSelectedText,rawValue)}
rawValue=Ext.Array.clean(rawValue.split(me.delimiterRegexp));inputEl.dom.value='';me.setValue(me.valueStore.getRange().concat(rawValue));inputEl.focus()}
me.callParent([e,t])},onEsc:function(e){var me=this,selModel=me.selectionModel,isExpanded=me.isExpanded;me.callParent([e]);if(!isExpanded&&selModel.getCount()>0){selModel.deselectAll()}
e.stopEvent()},onTypeAhead:function(){var me=this,displayField=me.displayField,inputElDom=me.inputEl.dom,record=me.getStore().findRecord(displayField,inputElDom.value),newValue,len,selStart;if(record){newValue=record.get(displayField);len=newValue.length;selStart=inputElDom.value.length;if(selStart!==0&&selStart!==len){me.lastMutatedValue=newValue;inputElDom.value=newValue;me.selectText(selStart,newValue.length)}}},onItemListClick:function(e){var me=this,selectionModel=me.selectionModel,itemEl=e.getTarget(me.tagItemSelector),closeEl=itemEl?e.getTarget(me.tagItemCloseSelector):!1;if(me.readOnly||me.disabled){return}
e.stopPropagation();if(itemEl){if(closeEl){me.removeByListItemNode(itemEl);if(me.valueStore.getCount()>0){me.fireEvent('select',me,me.valueStore.getRange())}}else{me.toggleSelectionByListItemNode(itemEl,e.shiftKey)}
if(!Ext.supports.TouchEvents){me.inputEl.focus()}}else{if(selectionModel.getCount()>0){selectionModel.deselectAll()}
me.inputEl.focus();if(me.triggerOnClick){me.onTriggerClick()}}},onItemMouseDown:function(e){if(e.target!==this.inputEl.dom){e.preventDefault()}},getMultiSelectItemMarkup:function(){var me=this,childElCls=(me._getChildElCls&&me._getChildElCls())||'';if(!me.multiSelectItemTpl){if(!me.labelTpl){me.labelTpl='{'+me.displayField+'}'}
me.labelTpl=me.lookupTpl('labelTpl');if(me.tipTpl){me.tipTpl=me.lookupTpl('tipTpl')}
me.multiSelectItemTpl=new Ext.XTemplate(['<tpl for=".">','<li data-selectionIndex="{[xindex - 1]}" data-recordId="{internalId}" role="presentation" class="'+me.tagItemCls+childElCls,'<tpl if="this.isSelected(values)">',' '+me.tagSelectedCls,'</tpl>','{%','values = values.data;','%}',me.tipTpl?'" data-qtip="{[this.getTip(values)]}">':'">','<div role="presentation" class="'+me.tagItemTextCls+'">{[this.getItemLabel(values)]}</div>','<div role="presentation" class="'+me.tagItemCloseCls+childElCls+'"></div>','</li>','</tpl>',{isSelected:function(rec){return me.selectionModel.isSelected(rec)},getItemLabel:function(values){return Ext.String.htmlEncode(me.labelTpl.apply(values))},getTip:function(values){return Ext.String.htmlEncode(me.tipTpl.apply(values))},strict:!0}])}
if(!me.multiSelectItemTpl.isTemplate){me.multiSelectItemTpl=this.lookupTpl('multiSelectItemTpl')}
return me.multiSelectItemTpl.apply(me.valueCollection.getRange())},applyMultiselectItemMarkup:function(){var me=this,itemList=me.itemList;if(itemList){itemList.select('.'+Ext.baseCSSPrefix+'tagfield-item').destroy();me.inputElCt.insertHtml('beforeBegin',me.getMultiSelectItemMarkup());me.autoSize()}},getAriaListMarkup:function(){var me=this,values;if(!me.ariaListItemTpl){me.ariaListItemTpl=new Ext.XTemplate(['<tpl for=".">','<li id="'+me.id+'-{internalId}" role="option"',' class="'+Ext.baseCSSPrefix+'tagfield-arialist-item"',' aria-selected="{[this.isPicked(values)]}"','  data-recordId="{internalId}"','>','{[this.getItemLabel(values.data)]}','</li>','</tpl>',{isPicked:function(rec){return me.filterPicked(rec)?'false':'true'},isSelected:function(rec){return me.selectionModel.isSelected(rec)?'true':'false'},getItemLabel:function(values){return Ext.String.htmlEncode(me.labelTpl.apply(values))},strict:!0}])}
if(!me.ariaListItemTpl.isTemplate){me.ariaListtemTpl=me.lookupTpl('ariaListItemTpl')}
values=me.valueCollection.getRange();return me.ariaListItemTpl.apply(values)},applyAriaListMarkup:function(){var me=this,ariaList=me.ariaList;if(ariaList){ariaList.select('*').destroy();ariaList.insertHtml('afterBegin',me.getAriaListMarkup())}},getAriaSelectedText:function(values){var me=this;if(!me.ariaSelectedItemTpl){me.ariaSelectedItemTpl=new Ext.XTemplate(['<tpl for="." between=", ">','{[this.getItemLabel(values.data)]}','</tpl>',{getItemLabel:function(values){return Ext.String.htmlEncode(me.labelTpl.apply(values))},strict:!0}])}
if(!me.ariaSelectedItemTpl.isTemplate){me.ariaSelectedItemTpl=me.lookupTpl('ariaSelectedItemTpl')}
return Ext.String.format(me.ariaSelectedText,me.ariaSelectedItemTpl.apply(values))},applyAriaSelectedText:function(){var me=this,selectedText=me.selectedText,records,text;if(selectedText){records=me.valueCollection.getRange();text=records.length?me.getAriaSelectedText(records):me.ariaNoneSelectedText;selectedText.dom.innerHTML=Ext.String.htmlEncode(text)}},getRecordByListItemNode:function(itemEl){return this.valueCollection.items[Number(itemEl.getAttribute('data-selectionIndex'))]},toggleSelectionByListItemNode:function(itemEl,keepExisting){var me=this,rec=me.getRecordByListItemNode(itemEl),selModel=me.selectionModel;if(rec){if(selModel.isSelected(rec)){selModel.deselect(rec)}else{selModel.select(rec,keepExisting)}}},removeByListItemNode:function(itemEl){var me=this,rec=me.getRecordByListItemNode(itemEl);if(rec){me.pickerSelectionModel.deselect(rec)}},getDisplayValue:function(){return this.getRawValue()},getRawValue:function(){var me=this,records=me.getValueRecords(),values=[],i,len;for(i=0,len=records.length;i<len;i++){values.push(records[i].data[me.displayField])}
return values.join(',')},setRawValue:function(value){return},removeValue:function(value){var me=this,valueCollection=me.valueCollection,len,i,item,toRemove=[];if(value){value=Ext.Array.from(value);for(i=0,len=value.length;i<len;++i){item=value[i];if(!item.isModel){item=valueCollection.byValue.get(item)}
if(item){toRemove.push(item)}}
me.valueCollection.beginUpdate();me.pickerSelectionModel.deselect(toRemove);me.valueCollection.endUpdate()}},getValue:function(){var value=this.callParent();if(value){value=Ext.Array.from(value)}
return value},setValue:function(value,add,skipLoad){var me=this,valueStore=me.valueStore,valueField=me.valueField,unknownValues=[],store=me.store,autoLoadOnValue=me.autoLoadOnValue,isLoaded=store.getCount()>0||store.isLoaded(),pendingLoad=store.hasPendingLoad(),unloaded=autoLoadOnValue&&!isLoaded&&!pendingLoad,record,len,i,valueRecord,cls,params,isNull;if(Ext.isEmpty(value)){value=null;isNull=!0}else if(Ext.isString(value)&&me.multiSelect){value=value.split(me.delimiter)}else{value=Ext.Array.from(value,!0)}
if(!isNull&&me.queryMode==='remote'&&!store.isEmptyStore&&skipLoad!==!0&&unloaded){for(i=0,len=value.length;i<len;i++){record=value[i];if(!record||!record.isModel){valueRecord=valueStore.findExact(valueField,record);if(valueRecord>-1){value[i]=valueStore.getAt(valueRecord)}else{valueRecord=me.findRecord(valueField,record);if(!valueRecord){if(me.forceSelection){unknownValues.push(record)}else{valueRecord={};valueRecord[me.valueField]=record;valueRecord[me.displayField]=record;cls=me.valueStore.getModel();valueRecord=new cls(valueRecord)}}
if(valueRecord){value[i]=valueRecord}}}}
if(unknownValues.length){params={};params[me.valueParam||me.valueField]=unknownValues.join(me.delimiter);store.load({params:params,callback:function(){me.setValue(value,add,!0);me.autoSize();me.lastQuery=!1}});return!1}}
if(!isNull&&!me.multiSelect&&value.length>0){for(i=value.length-1;i>=0;i--){if(value[i].isModel){value=value[i];break}}
if(Ext.isArray(value)){value=value[value.length-1]}}
return me.callParent([value,add])},updateValue:function(){var me=this,valueArray=me.valueCollection.getRange(),len=valueArray.length,i;for(i=0;i<len;i++){valueArray[i]=valueArray[i].get(me.valueField)}
me.setHiddenValue(valueArray);me.value=me.multiSelect?valueArray:valueArray[0];if(!Ext.isDefined(me.value)){me.value=undefined}
me.applyMultiselectItemMarkup();me.applyAriaListMarkup();me.applyAriaSelectedText();me.checkChange()},getValueRecords:function(){return this.valueCollection.getRange()},getSubmitData:function(){var me=this,val=me.callParent(arguments);if(me.multiSelect&&me.encodeSubmitValue&&val&&val[me.name]){val[me.name]=Ext.encode(val[me.name])}
return val},assertValue:function(){var me=this,rawValue=me.inputEl.dom.value,rec=!Ext.isEmpty(rawValue)?me.findRecordByDisplay(rawValue):!1,value=!1;if(!rec&&!me.forceSelection&&me.createNewOnBlur&&!Ext.isEmpty(rawValue)){value=rawValue}else if(rec){value=rec}
if(value){me.addValue(value)}
me.inputEl.dom.value='';me.collapse();me.refreshEmptyText()},isEqual:function(v1,v2){var fromArray=Ext.Array.from,valueField=this.valueField,i,len,t1,t2;v1=fromArray(v1);v2=fromArray(v2);len=v1.length;if(len!==v2.length){return!1}
for(i=0;i<len;i++){t1=v1[i].isModel?v1[i].get(valueField):v1[i];t2=v2[i].isModel?v2[i].get(valueField):v2[i];if(t1!==t2){return!1}}
return!0},onFocus:function(){var me=this,focusCls=me.focusCls,itemList=me.itemList;if(focusCls&&itemList){itemList.addCls(focusCls)}
me.callParent(arguments)},onBlur:function(){var me=this,focusCls=me.focusCls,itemList=me.itemList;if(focusCls&&itemList){itemList.removeCls(focusCls)}
me.callParent(arguments)},renderActiveError:function(){var me=this,invalidCls=me.invalidCls,itemList=me.itemList,hasError=me.hasActiveError();if(invalidCls&&itemList){itemList[hasError?'addCls':'removeCls'](me.invalidCls+'-field')}
me.callParent(arguments)},autoSize:function(){var me=this;if(me.grow&&me.rendered){me.autoSizing=!0;me.updateLayout()}
return me},afterComponentLayout:function(){var me=this,height;if(me.autoSizing){height=me.getHeight();if(height!==me.lastInputHeight){if(me.isExpanded){me.alignPicker()}
me.fireEvent('autosize',me,height);me.lastInputHeight=height;me.autoSizing=!1}}}})
;
Ext.define('Ext.rtl.form.field.Tag',{override:'Ext.form.field.Tag',privates:{_getChildElCls:function(){return this.getInherited().rtl?(' '+this._rtlCls):''}}})
;
Ext.define('Ext.picker.Time',{extend:'Ext.view.BoundList',alias:'widget.timepicker',requires:['Ext.data.Store','Ext.Date'],config:{store:!0},statics:{createStore:function(format,increment){var dateUtil=Ext.Date,clearTime=dateUtil.clearTime,initDate=this.prototype.initDate,times=[],min,max;min=clearTime(new Date(initDate[0],initDate[1],initDate[2]));max=dateUtil.add(clearTime(new Date(initDate[0],initDate[1],initDate[2])),'mi',(24*60)-1);while(min<=max){times.push({disp:dateUtil.dateFormat(min,format),date:min});min=dateUtil.add(min,'mi',increment)}
return new Ext.data.Store({model:Ext.picker.Time.prototype.modelType,data:times})}},increment:15,format:"g:i A",displayField:'disp',initDate:[2008,0,1],componentCls:Ext.baseCSSPrefix+'timepicker',alignOnScroll:!1,loadMask:!1,initComponent:function(){var me=this,dateUtil=Ext.Date,clearTime=dateUtil.clearTime,initDate=me.initDate;me.absMin=clearTime(new Date(initDate[0],initDate[1],initDate[2]));me.absMax=dateUtil.add(clearTime(new Date(initDate[0],initDate[1],initDate[2])),'mi',(24*60)-1);me.updateList();me.callParent()},setStore:function(store){this.store=(store===!0)?Ext.picker.Time.createStore(this.format,this.increment):store},setMinValue:function(value){this.minValue=value;this.updateList()},setMaxValue:function(value){this.maxValue=value;this.updateList()},normalizeDate:function(date){var initDate=this.initDate;date.setFullYear(initDate[0],initDate[1],initDate[2]);return date},updateList:function(){var me=this,min=me.normalizeDate(me.minValue||me.absMin),max=me.normalizeDate(me.maxValue||me.absMax),filters=me.getStore().getFilters(),filter=me.rangeFilter;filters.beginUpdate();if(filter){filters.remove(filter)}
filter=me.rangeFilter=new Ext.util.Filter({filterFn:function(record){var date=record.get('date');return date>=min&&date<=max}});filters.add(filter);filters.endUpdate()}},function(){this.prototype.modelType=Ext.define(null,{extend:'Ext.data.Model',fields:['disp','date']})})
;
Ext.define('Ext.form.field.Time',{extend:'Ext.form.field.ComboBox',alias:'widget.timefield',alternateClassName:['Ext.form.TimeField','Ext.form.Time'],requires:['Ext.form.field.Date','Ext.picker.Time','Ext.view.BoundListKeyNav','Ext.Date'],triggerCls:Ext.baseCSSPrefix+'form-time-trigger',minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",formatText:'Expected time format HH:MM space AM or PM',increment:15,pickerMaxHeight:300,selectOnTab:!0,snapToIncrement:!1,valuePublishEvent:['select','blur'],initDate:'1/1/2008',initDateParts:[2008,0,1],initDateFormat:'j/n/Y',queryMode:'local',displayField:'disp',valueField:'date',initComponent:function(){var me=this,min=me.minValue,max=me.maxValue;if(min){me.setMinValue(min)}
if(max){me.setMaxValue(max)}
me.displayTpl=new Ext.XTemplate('<tpl for=".">'+'{[typeof values === "string" ? values : this.formatDate(values["'+me.displayField+'"])]}'+'<tpl if="xindex < xcount">'+me.delimiter+'</tpl>'+'</tpl>',{formatDate:me.formatDate.bind(me)});me.store=Ext.picker.Time.createStore(me.format,me.increment);me.callParent();me.getPicker()},afterQuery:function(queryPlan){var me=this;me.callParent([queryPlan]);if(me.value===null&&me.getRawValue()&&me.validateOnChange){me.validate()}},isEqual:function(v1,v2){var fromArray=Ext.Array.from,isEqual=Ext.Date.isEqual,i,len;v1=fromArray(v1);v2=fromArray(v2);len=v1.length;if(len!==v2.length){return!1}
for(i=0;i<len;i++){if(!(v2[i]instanceof Date)||!(v1[i]instanceof Date)||!isEqual(v2[i],v1[i])){return!1}}
return!0},setMinValue:function(value){var me=this,picker=me.picker;me.setLimit(value,!0);if(picker){picker.setMinValue(me.minValue)}},setMaxValue:function(value){var me=this,picker=me.picker;me.setLimit(value,!1);if(picker){picker.setMaxValue(me.maxValue)}},setLimit:function(value,isMin){var me=this,d,val;if(Ext.isString(value)){d=me.parseDate(value)}else if(Ext.isDate(value)){d=value}
if(d){val=me.getInitDate();val.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds())}else{val=null}
me[isMin?'minValue':'maxValue']=val},getInitDate:function(hours,minutes,seconds){var parts=this.initDateParts;return new Date(parts[0],parts[1],parts[2],hours||0,minutes||0,seconds||0,0)},valueToRaw:function(value){return this.formatDate(this.parseDate(value))},getErrors:function(value){value=arguments.length>0?value:this.getRawValue();var me=this,format=Ext.String.format,errors=me.callParent([value]),minValue=me.minValue,maxValue=me.maxValue,data=me.displayTplData,raw=me.getRawValue(),i,len,date,item;if(data&&data.length>0){for(i=0,len=data.length;i<len;i++){item=data[i];item=item.date||item.disp;date=me.parseDate(item);if(!date){errors.push(format(me.invalidText,item,Ext.Date.unescapeFormat(me.format)));continue}}}else if(raw.length){date=me.parseDate(raw);if(!date){errors.push(format(me.invalidText,raw,Ext.Date.unescapeFormat(me.format)))}}
if(!errors.length){if(minValue&&date<minValue){errors.push(format(me.minText,me.formatDate(minValue)))}
if(maxValue&&date>maxValue){errors.push(format(me.maxText,me.formatDate(maxValue)))}}
return errors},formatDate:function(items){var formatted=[],i,len;items=Ext.Array.from(items);for(i=0,len=items.length;i<len;i++){formatted.push(Ext.form.field.Date.prototype.formatDate.call(this,items[i]))}
return formatted.join(this.delimiter)},parseDate:function(value){var me=this,val=value,altFormats=me.altFormats,altFormatsArray=me.altFormatsArray,i=0,len;if(value&&!Ext.isDate(value)){val=me.safeParse(value,me.format);if(!val&&altFormats){altFormatsArray=altFormatsArray||altFormats.split('|');len=altFormatsArray.length;for(;i<len&&!val;++i){val=me.safeParse(value,altFormatsArray[i])}}}
if(val&&me.snapToIncrement){val=new Date(Ext.Number.snap(val.getTime(),me.increment*60*1000))}
return val},safeParse:function(value,format){var me=this,utilDate=Ext.Date,parsedDate,result=null;if(utilDate.formatContainsDateInfo(format)){result=utilDate.parse(value,format)}else{parsedDate=utilDate.parse(me.initDate+' '+value,me.initDateFormat+' '+format);if(parsedDate){result=parsedDate}}
return result},getSubmitValue:function(){var me=this,format=me.submitFormat||me.format,value=me.getValue();return value?Ext.Date.format(value,format):null},createPicker:function(){var me=this;me.listConfig=Ext.apply({xtype:'timepicker',pickerField:me,cls:undefined,minValue:me.minValue,maxValue:me.maxValue,increment:me.increment,format:me.format,maxHeight:me.pickerMaxHeight},me.listConfig);return me.callParent()},completeEdit:function(){var me=this,val=me.getValue();me.callParent(arguments);if(me.validateValue(val)){me.setValue(val)}},findRecordByValue:function(value){if(typeof value==='string'){value=this.parseDate(value)}
return this.callParent([value])},rawToValue:function(item){var me=this,items,values,i,len;if(me.multiSelect){values=[];items=Ext.Array.from(item);for(i=0,len=items.length;i<len;i++){values.push(me.parseDate(items[i]))}
return values}
return me.parseDate(item)},setValue:function(v){var me=this;if(me.creatingPicker){return}
me.getPicker();if(Ext.isDate(v)){v=me.getInitDate(v.getHours(),v.getMinutes(),v.getSeconds())}
return me.callParent([v])},getValue:function(){return this.rawToValue(this.callParent(arguments))}})
;
Ext.define('Ext.form.field.Trigger',{extend:'Ext.form.field.Text',alias:['widget.triggerfield','widget.trigger'],alternateClassName:['Ext.form.TriggerField','Ext.form.TwinTriggerField','Ext.form.Trigger'],requires:['Ext.dom.Helper','Ext.util.ClickRepeater'],triggerCls:Ext.baseCSSPrefix+'form-arrow-trigger',inheritableStatics:{warnDeprecated:function(){Ext.log.warn('Ext.form.field.Trigger is deprecated. Use Ext.form.field.Text instead.')}},onClassExtended:function(){this.warnDeprecated()},constructor:function(config){this.self.warnDeprecated();this.callParent([config])}})
;
Ext.define('Ext.grid.CellContext',{isCellContext:!0,generation:0,constructor:function(view){this.view=view},setPosition:function(row,col){var me=this;if(arguments.length===1){if(row.length){col=row[0];row=row[1]}else if(row.isCellContext){return me.setAll(row.view,row.rowIdx,row.colIdx,row.record,row.column)}else{if(row.view){me.view=row.view}
col=row.column;row=row.row}}
me.setRow(row);me.setColumn(col);return me},setAll:function(view,recordIndex,columnIndex,record,columnHeader){var me=this;me.view=view;me.rowIdx=recordIndex;me.colIdx=columnIndex;me.record=record;me.column=columnHeader;me.generation++;return me},setRow:function(row){var me=this,dataSource=me.view.dataSource,oldRecord=me.record,count;if(row!=undefined){if(typeof row==='number'){count=dataSource.getCount();row=row<0?Math.max(count+row,0):Math.max(Math.min(row,count-1),0);me.rowIdx=row;me.record=dataSource.getAt(row)}else if(row.isModel){me.record=row;me.rowIdx=dataSource.indexOf(row)}else if(row.tagName||row.isElement){me.record=me.view.getRecord(row);me.rowIdx=me.record?(me.record.isCollapsedPlaceholder?dataSource.indexOfPlaceholder(me.record):dataSource.indexOf(me.record)):-1}}
if(me.record!==oldRecord){me.generation++}
return me},setColumn:function(col){var me=this,colMgr=me.view.getVisibleColumnManager(),oldColumn=me.column;if(col!=undefined){if(typeof col==='number'){me.colIdx=col;me.column=colMgr.getHeaderAtIndex(col)}else if(col.isHeader){me.column=col;me.colIdx=colMgr.indexOf(col)}}
if(me.column!==oldColumn){me.generation++}
return me},setView:function(view){this.view=view;this.refresh()},getCell:function(returnDom){return this.view.getCellByPosition(this,returnDom)},getRow:function(returnDom){var result=this.view.getRow(this.record);return returnDom?result:Ext.get(result)},getNode:function(returnDom){var result=this.view.getNode(this.record);return returnDom?result:Ext.get(result)},isEqual:function(other){return other&&other.isCellContext&&other.record===this.record&&other.column===this.column},clone:function(){var me=this,result=new me.self(me.view);result.rowIdx=me.rowIdx;result.colIdx=me.colIdx;result.record=me.record;result.column=me.column;return result},privates:{isFirstColumn:function(){var cell=this.getCell(!0);if(cell){return!cell.previousSibling}},isLastColumn:function(){var cell=this.getCell(!0);if(cell){return!cell.nextSibling}},isLastRenderedRow:function(){return this.view.all.endIndex===this.rowIdx},getLastColumnIndex:function(){var row=this.getRow(!0);if(row){return row.lastChild.cellIndex}
return-1},refresh:function(){var me=this,newRowIdx=me.view.dataSource.indexOf(me.record),newColIdx=me.view.getVisibleColumnManager().indexOf(me.column);me.setRow(newRowIdx===-1?me.rowIdx:me.record);me.setColumn(newColIdx===-1?me.colIdx:me.column)},navigate:function(direction){var me=this,columns=me.view.getVisibleColumnManager().getColumns();switch(direction){case-1:do{if(!me.colIdx){me.colIdx=columns.length-1}else{me.colIdx--}
me.setColumn(me.colIdx)}while(!me.getCell(!0));break;case 1:do{if(me.colIdx>=columns.length){me.colIdx=0}else{me.colIdx++}
me.setColumn(me.colIdx)}while(!me.getCell(!0));break}}},statics:{compare:function(c1,c2){return c1.rowIdx-c2.rowIdx||c1.colIdx-c2.colIdx}}})
;
Ext.define('Ext.grid.CellEditor',{extend:'Ext.Editor',alias:'widget.celleditor',isCellEditor:!0,alignment:'l-l!',hideEl:!1,cls:Ext.baseCSSPrefix+'small-editor '+Ext.baseCSSPrefix+'grid-editor '+Ext.baseCSSPrefix+'grid-cell-editor',treeNodeSelector:'.'+Ext.baseCSSPrefix+'tree-node-text',shim:!1,shadow:!1,floating:!0,alignOnScroll:!1,useBoundValue:!1,focusLeaveAction:'completeEdit',setGrid:function(grid){this.grid=grid},startEdit:function(boundEl,value,doFocus,isResuming){this.context=this.editingPlugin.context;this.callParent([boundEl,value,doFocus,isResuming])},onShow:function(){var me=this,innerCell=me.boundEl.dom.querySelector(me.context.view.innerSelector);if(innerCell){if(me.isForTree){innerCell=innerCell.querySelector(me.treeNodeSelector)}
Ext.fly(innerCell).hide()}
me.callParent(arguments)},onFocusEnter:function(){var me=this,context=me.context,view=context.view;me.reattachToBody();context.node=view.getNode(context.record);context.row=view.getRow(context.record);context.cell=context.getCell(!0);context.rowIdx=view.indexOf(context.row);me.realign(!0);me.callParent(arguments);me.focusEnterEvent=null},onFocusLeave:function(e){var me=this,view=me.context.view,related=Ext.fly(e.relatedTarget);if(me[me.focusLeaveAction]()===!1){e.event.stopEvent();return}
delete me.focusLeaveAction;if(!view.destroyed&&view.el.contains(related)&&(!related.isAncestor(e.target)||related===view.el)&&!related.up(view.getCellSelector(),view.el,!0)){me.context.grid.setActionableMode(!1,view.actionPosition)}
me.cacheElement();Ext.container.Container.prototype.onFocusLeave.apply(me,arguments)},completeEdit:function(remainVisible){var me=this,context=me.context;if(me.editing){context.value=me.field.value;if(me.editingPlugin.validateEdit(context)===!1){if(context.cancel){context.value=me.originalValue;me.editingPlugin.cancelEdit()}
return!!context.cancel}}
me.callParent([remainVisible])},onEditComplete:function(remainVisible,canceling){var me=this,activeElement=Ext.Element.getActiveElement(),ctx=me.context,store=ctx&&ctx.store,boundEl;me.editing=!1;boundEl=me.boundEl=me.context.getCell();if(boundEl){me.restoreCell();if(boundEl.contains(activeElement)&&boundEl.dom!==activeElement){boundEl.focus()}}
me.callParent(arguments);if(canceling){me.editingPlugin.cancelEdit(me);if(remainVisible&&store&&store.isExpandingOrCollapsing){me.cacheElement()}}else{me.editingPlugin.onEditComplete(me,me.getValue(),me.startValue)}},cacheElement:function(force){if((!this.editing||force)&&!this.destroyed&&!this.isDetaching){this.isDetaching=!0;this.detachFromBody();this.isDetaching=!1}},onHide:function(){this.cacheElement(!0);Ext.Editor.superclass.onHide.apply(this,arguments)},onSpecialKey:function(field,event,eOpts){var me=this,key=event.getKey(),complete=me.completeOnEnter&&key===event.ENTER&&(!eOpts||!eOpts.fromBoundList),cancel=me.cancelOnEsc&&key===event.ESC,view=me.editingPlugin.view;if(complete||cancel){event.stopEvent();if(cancel){me.focusLeaveAction='cancelEdit'}
view.ownerGrid.setActionableMode(!1)}},getRefOwner:function(){return this.column&&this.column.getView()},restoreCell:function(){var me=this,innerCell=me.boundEl.dom.querySelector(me.context.view.innerSelector);if(innerCell){if(me.isForTree){innerCell=innerCell.querySelector(me.treeNodeSelector)}
Ext.fly(innerCell).show()}},afterRender:function(){var me=this,field=me.field;me.callParent(arguments);if(field.isCheckbox){field.mon(field.inputEl,{mousedown:me.onCheckBoxMouseDown,click:me.onCheckBoxClick,scope:me})}},onCheckBoxMouseDown:function(){this.completeEdit=Ext.emptyFn},onCheckBoxClick:function(){delete this.completeEdit;this.field.focus(!1,10)},realign:function(autoSize){var me=this,boundEl=me.boundEl,innerCell=boundEl.dom.querySelector(me.context.view.innerSelector),innerCellTextNode=innerCell.firstChild,width=boundEl.getWidth(),offsets=Ext.Array.clone(me.offsets),grid=me.grid,xOffset,v='',isEmpty=!innerCellTextNode||(innerCellTextNode.nodeType===3&&!(Ext.String.trim(v=innerCellTextNode.data).length));if(me.isForTree){xOffset=me.getTreeNodeOffset(innerCell);width-=Math.abs(xOffset);offsets[0]+=xOffset}
if(grid.columnLines){width-=boundEl.getBorderWidth('rl')}
if(autoSize===!0){me.field.setWidth(width)}
if(isEmpty){innerCell.innerHTML='X'}
me.alignTo(boundEl,me.alignment,offsets);if(isEmpty){innerCell.firstChild.data=v}},getTreeNodeOffset:function(innerCell){return Ext.fly(innerCell.querySelector(this.treeNodeSelector)).getOffsetsTo(innerCell)[0]}})
;
Ext.define('Ext.rtl.grid.CellEditor',{override:'Ext.grid.CellEditor',getTreeNodeOffset:function(innerCell){var offset=this.callParent(arguments);if(this.editingPlugin.grid.isOppositeRootDirection()){offset=-(innerCell.getWidth()-offset-innerCell.child(this.treeNodeSelector).getWidth())}
return offset}})
;
Ext.define('Ext.grid.ColumnComponentLayout',{extend:'Ext.layout.component.Auto',alias:'layout.columncomponent',type:'columncomponent',setWidthInDom:!0,_paddingReset:{paddingTop:'',paddingBottom:''},columnAutoCls:Ext.baseCSSPrefix+'column-header-text-container-auto',beginLayout:function(ownerContext){this.callParent(arguments);ownerContext.titleContext=ownerContext.getEl('titleEl')},beginLayoutCycle:function(ownerContext){var me=this,owner=me.owner,shrinkWrap=ownerContext.widthModel.shrinkWrap;me.callParent(arguments);if(shrinkWrap){owner.el.setWidth('')}
owner.textContainerEl[shrinkWrap&&!owner.isGroupHeader?'addCls':'removeCls'](me.columnAutoCls);owner.titleEl.setStyle(me._paddingReset)},publishInnerHeight:function(ownerContext,outerHeight){var me=this,owner=me.owner,innerHeight;if(owner.getRootHeaderCt().hiddenHeaders){ownerContext.setProp('innerHeight',0);return}
if(!ownerContext.hasRawContent){if(owner.headerWrap&&!ownerContext.hasDomProp('width')){me.done=!1;return}
innerHeight=outerHeight-ownerContext.getBorderInfo().height;ownerContext.setProp('innerHeight',innerHeight-owner.titleEl.getHeight(),!1)}},measureContentHeight:function(ownerContext){return ownerContext.el.dom.offsetHeight},publishInnerWidth:function(ownerContext,outerWidth){if(!ownerContext.hasRawContent){ownerContext.setProp('innerWidth',outerWidth-ownerContext.getBorderInfo().width,!1)}},calculateOwnerHeightFromContentHeight:function(ownerContext,contentHeight){var result=this.callParent(arguments),owner=this.owner;if(!ownerContext.hasRawContent){if(!owner.headerWrap||ownerContext.hasDomProp('width')){return contentHeight+owner.titleEl.getHeight()+ownerContext.getBorderInfo().height}
return null}
return result},calculateOwnerWidthFromContentWidth:function(ownerContext,contentWidth){var owner=this.owner,padWidth=ownerContext.getPaddingInfo().width,triggerOffset=this.getTriggerOffset(owner,ownerContext),inner;if(owner.isGroupHeader){inner=contentWidth}else{inner=Math.max(contentWidth,owner.textEl.getWidth()+ownerContext.titleContext.getPaddingInfo().width)}
return inner+padWidth+triggerOffset},getTriggerOffset:function(owner,ownerContext){var width=0;if(ownerContext.widthModel.shrinkWrap&&!owner.menuDisabled){if(owner.query('>:not([hidden])').length===0){width=owner.getTriggerElWidth()}}
return width}})
;
Ext.define('Ext.layout.container.Fit',{extend:'Ext.layout.container.Container',alternateClassName:['Ext.layout.FitLayout','Ext.layout.Fit'],alias:'layout.fit',itemCls:Ext.baseCSSPrefix+'fit-item',type:'fit',manageMargins:!0,sizePolicies:[{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}],getItemSizePolicy:function(item,ownerSizeModel){var sizeModel=ownerSizeModel||this.owner.getSizeModel(),mode=(sizeModel.width.shrinkWrap?0:1)|(sizeModel.height.shrinkWrap?0:2);return this.sizePolicies[mode]},beginLayoutCycle:function(ownerContext,firstCycle){var me=this,resetHeight=me.lastHeightModel&&me.lastHeightModel.calculated,resetWidth=me.lastWidthModel&&me.lastWidthModel.calculated,resetSizes=resetWidth||resetHeight,maxChildMinHeight=0,maxChildMinWidth=0,c,childItems,i,item,length,margins,minHeight,minWidth,style,undef;me.callParent(arguments);if(resetSizes&&ownerContext.targetContext.el.dom.tagName.toUpperCase()!=='TD'){resetSizes=resetWidth=resetHeight=!1}
childItems=ownerContext.childItems;length=childItems.length;for(i=0;i<length;++i){item=childItems[i];if(firstCycle){c=item.target;minHeight=c.minHeight;minWidth=c.minWidth;if(minWidth||minHeight){margins=item.marginInfo||item.getMarginInfo();minHeight+=margins.height;minWidth+=margins.height;if(maxChildMinHeight<minHeight){maxChildMinHeight=minHeight}
if(maxChildMinWidth<minWidth){maxChildMinWidth=minWidth}}}
if(resetSizes){style=item.el.dom.style;if(resetHeight){style.height=''}
if(resetWidth){style.width=''}}}
if(firstCycle){ownerContext.maxChildMinHeight=maxChildMinHeight;ownerContext.maxChildMinWidth=maxChildMinWidth}
c=ownerContext.target;ownerContext.overflowX=(!ownerContext.widthModel.shrinkWrap&&ownerContext.maxChildMinWidth&&c.scrollFlags.x)||undef;ownerContext.overflowY=(!ownerContext.heightModel.shrinkWrap&&ownerContext.maxChildMinHeight&&c.scrollFlags.y)||undef},calculate:function(ownerContext){var me=this,childItems=ownerContext.childItems,length=childItems.length,containerSize=me.getContainerSize(ownerContext),info={length:length,ownerContext:ownerContext,targetSize:containerSize},shrinkWrapWidth=ownerContext.widthModel.shrinkWrap,shrinkWrapHeight=ownerContext.heightModel.shrinkWrap,overflowX=ownerContext.overflowX,overflowY=ownerContext.overflowY,scrollbars,scrollbarSize,padding,i,contentWidth,contentHeight;ownerContext.state.info=info;if(overflowX||overflowY){scrollbars=me.getScrollbarsNeeded(overflowX&&containerSize.width,overflowY&&containerSize.height,ownerContext.maxChildMinWidth,ownerContext.maxChildMinHeight);if(scrollbars){scrollbarSize=Ext.scrollbar.size();if(scrollbars&1){containerSize.height-=scrollbarSize.height}
if(scrollbars&2){containerSize.width-=scrollbarSize.width}}}
if(length>0){for(i=0;i<length;++i){info.index=i;me.fitItem(childItems[i],info)}}else{info.contentWidth=info.contentHeight=0}
if(shrinkWrapHeight||shrinkWrapWidth){padding=ownerContext.targetContext.getPaddingInfo();if(shrinkWrapWidth){if(overflowY&&!containerSize.gotHeight){me.done=!1}else{contentWidth=info.contentWidth+padding.width;if(scrollbars&2){contentWidth+=scrollbarSize.width}
if(!ownerContext.setContentWidth(contentWidth)){me.done=!1}}}
if(shrinkWrapHeight){if(overflowX&&!containerSize.gotWidth){me.done=!1}else{contentHeight=info.contentHeight+padding.height;if(scrollbars&1){contentHeight+=scrollbarSize.height}
if(!ownerContext.setContentHeight(contentHeight)){me.done=!1}}}}},fitItem:function(itemContext,info){var me=this;if(itemContext.invalid){me.done=!1;return}
info.margins=itemContext.getMarginInfo();info.needed=info.got=0;me.fitItemWidth(itemContext,info);me.fitItemHeight(itemContext,info);if(info.got!==info.needed){me.done=!1}},fitItemWidth:function(itemContext,info){var contentWidth,width;if(info.ownerContext.widthModel.shrinkWrap){width=itemContext.getProp('width')+info.margins.width;contentWidth=info.contentWidth;if(contentWidth===undefined){info.contentWidth=width}else{info.contentWidth=Math.max(contentWidth,width)}}else if(itemContext.widthModel.calculated){++info.needed;if(info.targetSize.gotWidth){++info.got;this.setItemWidth(itemContext,info)}else{return}}
this.positionItemX(itemContext,info)},fitItemHeight:function(itemContext,info){var contentHeight,height;if(info.ownerContext.heightModel.shrinkWrap){height=itemContext.getProp('height')+info.margins.height;contentHeight=info.contentHeight;if(contentHeight===undefined){info.contentHeight=height}else{info.contentHeight=Math.max(contentHeight,height)}}else if(itemContext.heightModel.calculated){++info.needed;if(info.targetSize.gotHeight){++info.got;this.setItemHeight(itemContext,info)}else{return}}
this.positionItemY(itemContext,info)},positionItemX:function(itemContext,info){var margins=info.margins;if(info.index||margins.left){itemContext.setProp('x',margins.left)}
if(margins.width&&info.ownerContext.widthModel.shrinkWrap){itemContext.setProp('margin-right',margins.width)}},positionItemY:function(itemContext,info){var margins=info.margins;if(info.index||margins.top){itemContext.setProp('y',margins.top)}
if(margins.height&&info.ownerContext.heightModel.shrinkWrap){itemContext.setProp('margin-bottom',margins.height)}},setItemHeight:function(itemContext,info){itemContext.setHeight(info.targetSize.height-info.margins.height)},setItemWidth:function(itemContext,info){itemContext.setWidth(info.targetSize.width-info.margins.width)}})
;
Ext.define('Ext.panel.Table',{extend:'Ext.panel.Panel',xtype:'tablepanel',requires:['Ext.layout.container.Fit'],uses:['Ext.selection.RowModel','Ext.selection.CellModel','Ext.selection.CheckboxModel','Ext.grid.plugin.BufferedRenderer','Ext.grid.header.Container','Ext.grid.locking.Lockable','Ext.grid.NavigationModel','Ext.grid.RowContext','Ext.grid.CellContext'],extraBaseCls:Ext.baseCSSPrefix+'grid',extraBodyCls:Ext.baseCSSPrefix+'grid-body',actionableModeCls:Ext.baseCSSPrefix+'grid-actionable',noHeaderBordersCls:Ext.baseCSSPrefix+'no-header-borders',defaultBindProperty:'store',layout:'fit',manageLayoutScroll:!1,ariaRole:'presentation',config:{focused:null,headerBorders:!0,hideHeaders:null},publishes:['selection'],twoWayBindable:['selection'],selection:null,autoLoad:!1,variableRowHeight:!1,numFromEdge:2,trailingBufferZone:10,leadingBufferZone:20,hasView:!1,viewType:null,deferRowRender:!1,sortableColumns:!0,multiColumnSort:!1,enableLocking:!1,scrollerOwner:!0,enableColumnMove:!0,sealedColumns:!1,enableColumnResize:!0,columnLines:!1,rowLines:!0,bufferedRenderer:!0,preciseHeight:!1,ownerGrid:null,colLinesCls:Ext.baseCSSPrefix+'grid-with-col-lines',rowLinesCls:Ext.baseCSSPrefix+'grid-with-row-lines',noRowLinesCls:Ext.baseCSSPrefix+'grid-no-row-lines',hiddenHeaderCtCls:Ext.baseCSSPrefix+'grid-header-ct-hidden',hiddenHeaderCls:Ext.baseCSSPrefix+'grid-header-hidden',resizeMarkerCls:Ext.baseCSSPrefix+'grid-resize-marker',emptyCls:Ext.baseCSSPrefix+'grid-empty',focusable:!0,constructor:function(config){var me=this,topGrid=config&&config.ownerGrid,store;me.ownerGrid=topGrid||me;me.actionables=topGrid?topGrid.actionables:[];me.callParent([config]);store=me.store;store.trackStateChanges=!0;if(me.autoLoad){if(!store.isEmptyStore){store.load()}}},registerActionable:function(actionable){Ext.Array.include(this.actionables,actionable)},initComponent:function(){if(this.verticalScroller){Ext.raise("The verticalScroller config is not supported.")}
if(!this.viewType){Ext.raise("You must specify a viewType config.")}
if(this.headers){Ext.raise("The headers config is not supported. Please specify columns instead.")}
var me=this,columns=me.columns||me.colModel||[],selection=me.selection,store,view,i,len,bufferedRenderer,headerCtCfg,headerCt;if(selection){me.selection=null;me.setSelection(selection)}
store=me.store;if(store&&Ext.isObject(store)&&!store.isStore&&!store.storeId){store=Ext.apply({autoDestroy:!0},store)}
store=me.store=Ext.data.StoreManager.lookup(store||'ext-empty-store');me.enableLocking=me.enableLocking||me.hasLockedColumns(columns);if(me.plugins){me.plugins=me.constructPlugins()}
if(me.columnLines){me.addBodyCls(me.colLinesCls)}
me.addBodyCls(me.rowLines?me.rowLinesCls:me.noRowLinesCls);me.addBodyCls(me.extraBodyCls);if(me.enableLocking){if(!me.mixins.lockable){me.self.mixin('lockable',Ext.grid.locking.Lockable)}
me.injectLockable()}else{if(columns.isRootHeader){me.headerCt=headerCt=columns;headerCt.grid=me;headerCt.forceFit=!!me.forceFit;columns=[];me.columnManager=headerCt.columnManager;me.visibleColumnManager=headerCt.visibleColumnManager}else{headerCtCfg={grid:me,$initParent:me,forceFit:me.forceFit,sortable:me.sortableColumns,enableColumnMove:me.enableColumnMove,enableColumnResize:me.enableColumnResize,columnLines:me.columnLines,sealed:me.sealedColumns};if(Ext.isObject(columns)){Ext.apply(headerCtCfg,columns);columns=columns.items;delete headerCtCfg.items}
me.headerCt=headerCt=new Ext.grid.header.Container(headerCtCfg)}
if(Ext.isDefined(me.enableColumnHide)){headerCt.enableColumnHide=me.enableColumnHide}}
me.scrollTask=new Ext.util.DelayedTask(me.syncHorizontalScroll,me);me.cls=(me.cls||'')+(' '+me.extraBaseCls);delete me.autoScroll;bufferedRenderer=me.plugins&&Ext.Array.findBy(me.plugins,function(p){return p.isBufferedRenderer});if(bufferedRenderer){me.bufferedRenderer=bufferedRenderer}
if(!me.hasView){if(store.isBufferedStore&&!store.getRemoteSort()){for(i=0,len=columns.length;i<len;i++){columns[i].sortable=!1}}
me.relayHeaderCtEvents(headerCt);me.features=me.features||[];if(!Ext.isArray(me.features)){me.features=[me.features]}
me.viewConfig=me.viewConfig||{};view=me.getView();me.items=[view];me.hasView=!0;me.bindStore(store,!0);me.mon(view,{viewready:me.onViewReady,refresh:me.onRestoreHorzScroll,scope:me})}
me.selModel=me.view.getSelectionModel();me.selModel.on({scope:me,lastselectedchanged:me.updateBindSelection,selectionchange:me.updateBindSelection});me.relayEvents(me.view,['beforeitemlongpress','beforeitemmousedown','beforeitemmouseup','beforeitemmouseenter','beforeitemmouseleave','beforeitemclick','beforeitemdblclick','beforeitemcontextmenu','itemlongpress','itemmousedown','itemmouseup','itemmouseenter','itemmouseleave','itemclick','itemdblclick','itemcontextmenu','beforecellclick','cellclick','beforecelldblclick','celldblclick','beforecellcontextmenu','cellcontextmenu','beforecellmousedown','cellmousedown','beforecellmouseup','cellmouseup','beforecellkeydown','cellkeydown','rowclick','rowdblclick','rowcontextmenu','rowmousedown','rowmouseup','rowkeydown','beforeitemkeydown','itemkeydown','beforeitemkeyup','itemkeyup','beforeitemkeypress','itemkeypress','beforecontainermousedown','beforecontainermouseup','beforecontainermouseover','beforecontainermouseout','beforecontainerclick','beforecontainerdblclick','beforecontainercontextmenu','beforecontainerkeydown','beforecontainerkeyup','beforecontainerkeypress','containermouseup','containermousedown','containermouseover','containermouseout','containerclick','containerdblclick','containercontextmenu','containerkeydown','containerkeyup','containerkeypress','beforeselect','select','beforedeselect','deselect','beforerowexit']);if(!me.selModel.isSpreadsheetModel){me.relayEvents(me.view,['selectionchange'])}
if(headerCt){headerCt.view=me.view;(me.dockedItems=Ext.Array.from(me.dockedItems,!0)).unshift(headerCt);headerCt.add(columns)}
me.columns=me.headerCt.getGridColumns();me.callParent();me.syncHeaderVisibility();if(me.enableLocking){me.afterInjectLockable()}
me.addStateEvents(['columnresize','columnmove','columnhide','columnshow','sortchange','filteractivate','filterdeactivate','filterchange','groupchange'])},updateHideHeaders:function(hideHeaders){if(!this.isConfiguring){this.syncHeaderVisibility()}},beforeRender:function(){var me=this,bufferedRenderer=me.bufferedRenderer,ariaAttr;if(me.lockable){me.getProtoBody().addCls(me.lockingBodyCls)}else{if(bufferedRenderer&&me.getSizeModel().height.auto){if(bufferedRenderer.isBufferedRenderer){Ext.raise('Cannot use buffered rendering with auto height')}
me.bufferedRenderer=bufferedRenderer=!1}
if(bufferedRenderer&&!bufferedRenderer.isBufferedRenderer){bufferedRenderer={xclass:'Ext.grid.plugin.BufferedRenderer'};Ext.copy(bufferedRenderer,me,'variableRowHeight,numFromEdge,trailingBufferZone,leadingBufferZone,scrollToLoadBuffer',!0);me.bufferedRenderer=me.addPlugin(bufferedRenderer)}
ariaAttr=me.ariaRenderAttributes||(me.ariaRenderAttributes={});ariaAttr['aria-readonly']=!me.isEditable;ariaAttr['aria-multiselectable']=me.selModel.selectionMode!=='SINGLE'}
me.callParent(arguments)},beforeLayout:function(){var lockable=this.mixins.lockable;if(lockable){lockable.beforeLayout.call(this)}
this.callParent()},onHide:function(animateTarget,cb,scope){this.getView().onOwnerGridHide();this.callParent([animateTarget,cb,scope])},onShow:function(){this.callParent();this.getView().onOwnerGridShow()},getHeaderContainer:function(){return this.getView().getHeaderCt()},getColumns:function(){return this.getColumnManager().getColumns()},getVisibleColumns:function(){return this.getVisibleColumnManager().getColumns()},getScrollable:function(){return this.scrollable||this.view.getScrollable()},focus:function(){var view=this.getView();if(!view.isVisible(!0)){return!1}
view.focus()},disableColumnHeaders:function(){this.headerCt.disable()},enableColumnHeaders:function(){this.headerCt.enable()},hasLockedColumns:function(columns){var i,len,column;if(columns.isRootHeader){columns=columns.items.items}else if(Ext.isObject(columns)){columns=columns.items}
for(i=0,len=columns.length;i<len;i++){column=columns[i];if(!column.processed&&column.locked){return!0}}},relayHeaderCtEvents:function(headerCt){this.relayEvents(headerCt,['columnresize','columnmove','columnhide','columnshow','columnschanged','sortchange','headerclick','headercontextmenu','headertriggerclick'])},getState:function(){var me=this,state=me.callParent(),storeState=me.store.getState();state=me.addPropertyToState(state,'columns',me.headerCt.getColumnsState());if(storeState){state.storeState=storeState}
return state},applyState:function(state){var me=this,sorter=state.sort,storeState=state.storeState,store=me.store,columns=state.columns=me.buildColumnHash(state.columns);me.callParent([state]);if(columns){me.headerCt.applyColumnsState(columns,storeState)}
if(store.isEmptyStore){return}
if(sorter){if(store.getRemoteSort()){store.sort({property:sorter.property,direction:sorter.direction,root:sorter.root},null,!1)}else{store.sort(sorter.property,sorter.direction)}}else if(storeState){store.applyState(storeState)}},buildColumnHash:function(columns){var len,columnState,i,result;if(columns){result={};for(i=0,len=columns.length;i<len;i++){columnState=columns[i];columnState.index=i;if(columnState.columns){columnState.columns=this.buildColumnHash(columnState.columns)}
result[columnState.id]=columnState}
return result}},getStore:function(){return this.store},onViewRefresh:function(view,records){this.onItemAdd(records,0)},onItemAdd:function(records,index,nodes,view){var me=this,recCount=records.length,freeRowContexts=me.freeRowContexts,liveRowContexts=me.liveRowContexts||(me.liveRowContexts={}),rowContext,i,record;for(i=0;i<recCount;i++){record=records[i];if(!liveRowContexts[record.internalId]){rowContext=freeRowContexts&&freeRowContexts.shift();if(!rowContext){rowContext=new Ext.grid.RowContext({ownerGrid:me})}
me.liveRowContexts[record.internalId]=rowContext;rowContext.setRecord(record,index++)}}},onItemRemove:function(records,index,nodes,view){var me=this,freeRowContexts=me.freeRowContexts||(me.freeRowContexts=[]),liveRowContexts=me.liveRowContexts,len=nodes.length,i,id,context;for(i=0;i<len;i++){id=nodes[i].getAttribute('data-recordId');context=liveRowContexts[id];if(context){context.free(view);freeRowContexts.push(context);delete liveRowContexts[id]}}},createManagedWidget:function(view,ownerId,widgetConfig,record){return this.liveRowContexts[record.internalId].getWidget(view,ownerId,widgetConfig)},destroyManagedWidgets:function(ownerId){var me=this,contexts=me.liveRowContexts,freeRowContexts=me.freeRowContexts,len=freeRowContexts&&freeRowContexts.length,i,recInternalId,rowWidgets;for(recInternalId in contexts){rowWidgets=contexts[recInternalId].widgets;if(rowWidgets){Ext.destroy(rowWidgets[ownerId]);delete rowWidgets[ownerId]}}
for(i=0;i<len;i++){rowWidgets=freeRowContexts[i].widgets;if(rowWidgets){Ext.destroy(rowWidgets[ownerId]);delete rowWidgets[ownerId]}}},getManagedWidgets:function(ownerId){var me=this,contexts=me.liveRowContexts,recInternalId,result=[];for(recInternalId in contexts){result.push(contexts[recInternalId].widgets[ownerId])}
return result},getView:function(){var me=this,scroll,scrollable,viewConfig;if(!me.view){viewConfig=me.viewConfig;scroll=viewConfig.scroll||me.scroll;scrollable=me.scrollable;if(scrollable==null&&viewConfig.scrollable==null&&scroll!==null){if(scroll===!0||scroll==='both'){scrollable=!0}else if(scroll===!1||scroll==='none'){scrollable=!1}else if(scroll==='vertical'){scrollable={x:!1,y:!0}}else if(scroll==='horizontal'){scrollable={x:!0,y:!1}}}
viewConfig=Ext.apply({grid:me,ownerGrid:me.ownerGrid,deferInitialRefresh:me.deferRowRender,variableRowHeight:me.variableRowHeight,preserveScrollOnRefresh:!0,trackOver:me.trackMouseOver!==!1,throttledUpdate:me.throttledUpdate===!0,xtype:me.viewType,store:me.store,headerCt:me.headerCt,columnLines:me.columnLines,rowLines:me.rowLines,navigationModel:'grid',features:me.features,panel:me,emptyText:me.emptyText||''},me.viewConfig);if(!('scrollable' in viewConfig||'scroll' in viewConfig||'autoScroll' in viewConfig)&&scrollable!=null){viewConfig.scrollable=scrollable}
viewConfig.$initParent=me;Ext.create(viewConfig);delete viewConfig.$initParent;if(me.view.emptyText){me.view.emptyText='<div class="'+me.emptyCls+'">'+me.view.emptyText+'</div>'}
me.view.getComponentLayout().headerCt=me.headerCt;me.mon(me.view,{uievent:me.processEvent,scope:me});if(me.hasListeners.viewcreated){me.fireEvent('viewcreated',me,me.view)}}
return me.view},getEmptyText:function(){return this.view.emptyText},setEmptyText:function(emptyText){this.emptyText=emptyText;this.view.setEmptyText('<div class="'+this.emptyCls+'">'+emptyText+'</div>');return this},getColumnManager:function(){return this.columnManager},getVisibleColumnManager:function(){return this.visibleColumnManager},getTopLevelColumnManager:function(){return this.ownerGrid.getColumnManager()},getTopLevelVisibleColumnManager:function(){return this.ownerGrid.getVisibleColumnManager()},setAutoScroll:Ext.emptyFn,applyScrollable:function(scrollable){var view=this.view;view=view&&(view.normalView||view);if(view){view.setScrollable(scrollable)}
return scrollable},processEvent:function(type,view,cell,recordIndex,cellIndex,e,record,row){var header=e.position.column;if(header){return header.processEvent.apply(header,arguments)}},ensureVisible:function(record,options){this.doEnsureVisible(record,options)},scrollByDeltaY:function(yDelta,animate){this.getView().scrollBy(null,yDelta,animate)},scrollByDeltaX:function(xDelta,animate){this.getView().scrollBy(xDelta,null,animate)},afterCollapse:function(){this.saveScrollPos();this.callParent(arguments)},afterExpand:function(){this.callParent(arguments);this.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderResize:Ext.emptyFn,onHeaderMove:function(headerCt,header,colsToMove,fromIdx,toIdx){var me=this;if(me.optimizedColumnMove===!1){me.view.refreshView()}else{me.view.moveColumn(fromIdx,toIdx,colsToMove)}
me.delayScroll()},onHeaderHide:function(headerCt,header){var view=this.view;if(!headerCt.childHideCount&&view.refreshCounter){view.refreshView()}},onHeaderShow:function(headerCt,header){var view=this.view;if(view.refreshCounter){view.refreshView()}},onHeadersChanged:function(headerCt,header){var me=this;if(me.rendered&&!me.reconfiguring){me.view.refreshView();me.delayScroll()}},delayScroll:function(){var target=this.view;if(target){this.scrollTask.delay(10,null,null,[target])}},onViewReady:function(){this.fireEvent('viewready',this)},onRestoreHorzScroll:function(){var me=this,x=me.scrollXPos;if(x){me.syncHorizontalScroll(me,!0)}},getScrollerOwner:function(){var rootCmp=this;if(!this.scrollerOwner){rootCmp=this.up('[scrollerOwner]')}
return rootCmp},getLhsMarker:function(){var me=this;return me.lhsMarker||(me.lhsMarker=Ext.DomHelper.append(me.el,{role:'presentation',cls:me.resizeMarkerCls},!0))},getRhsMarker:function(){var me=this;return me.rhsMarker||(me.rhsMarker=Ext.DomHelper.append(me.el,{role:'presentation',cls:me.resizeMarkerCls},!0))},getSelection:function(){return this.getSelectionModel().getSelection()},setSelection:function(selection){var current=this.selection;if(selection!==current){this.selection=selection;this.updateSelection(selection,current)}},updateSelection:function(selection){var me=this,sm;if(!me.ignoreNextSelection){me.ignoreNextSelection=!0;sm=me.getSelectionModel();if(selection){sm.select(selection)}else{sm.deselectAll()}
me.ignoreNextSelection=!1}
me.publishState('selection',selection)},updateBindSelection:function(selModel,selection){var me=this,selected=null;if(!me.ignoreNextSelection){me.ignoreNextSelection=!0;if(selection.length){selected=selModel.getLastSelected();me.hasHadSelection=!0}
if(me.hasHadSelection){me.setSelection(selected)}
me.ignoreNextSelection=!1}},updateFocused:function(record){this.getNavigationModel().setPosition(record)},updateHeaderBorders:function(headerBorders){this[headerBorders?'removeCls':'addCls'](this.noHeaderBordersCls)},getNavigationModel:function(){return this.getView().getNavigationModel()},getSelectionModel:function(){return this.getView().getSelectionModel()},getScrollTarget:function(){var items=this.getScrollerOwner().query('tableview');return items[items.length-1]},syncHorizontalScroll:function(target,setBody){var me=this,x=me.view.getScrollX(),scrollTarget;setBody=setBody===!0;if(me.rendered&&(setBody||x!==me.scrollXPos)){if(setBody){scrollTarget=me.getScrollTarget();scrollTarget.setScrollX(x)}
me.headerCt.setScrollX(x);me.scrollXPos=x}},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(store,initial){var me=this,view=me.getView(),oldStore=me.getStore();if(store){me.store=store;if(view.store!==store){view.bindStore(store,!1)}
me.mon(store,{load:me.onStoreLoad,scope:me});me.storeRelayers=me.relayEvents(store,['filterchange','groupchange']);if(!me.reconfiguring&&me.hasListeners.storechange&&store!==oldStore){me.fireEvent('storechange',me,store,oldStore)}}else{me.unbindStore()}},unbindStore:function(){var me=this,store=me.store,view;if(store){store.trackStateChanges=!1;me.store=null;me.mun(store,{load:me.onStoreLoad,scope:me});Ext.destroy(me.storeRelayers);view=me.view;if(view.store){view.bindStore(null)}else if(!store.destroyed&&store.autoDestroy){store.destroy()}
if(!me.reconfiguring&&me.hasListeners.storechange){me.fireEvent('storechange',me,null,store)}}},setColumns:function(columns){if(columns.length||this.getColumnManager().getColumns().length){this.reconfigure(undefined,columns)}},setStore:function(store){var me=this;me.reconfigure(store,undefined,!0);if(me.isVisible(!0)){if(store&&me.autoLoad&&!store.isEmptyStore&&!(store.loading||store.isLoaded())){store.load()}}else if(!me.globalShowListener){me.globalShowListener=Ext.GlobalEvents.on({show:me.onGlobalShow,scope:me,destroyable:!0})}},onGlobalShow:function(comp){var me=this,store=me.store;if(comp===me||(comp.isAncestor(me)&&me.isVisible(!0))){if(store&&me.autoLoad&&!store.isEmptyStore&&!(store.loading||store.isLoaded())){store.load()}
Ext.destroy(me.globalShowListener)}},reconfigure:function(store,columns,allowUnbind){var me=this,oldStore=me.store,headerCt=me.headerCt,lockable=me.lockable,oldColumns=headerCt?headerCt.items.getRange():me.columns,view=me.getView(),scroller,block,refreshCounter,storeChanged,columnsChanged,state,stateId,restoreFocus;if(arguments.length===1&&Ext.isArray(store)){columns=store;store=null}
if(columns){columns=Ext.Array.slice(columns)}
me.reconfiguring=!0;if(store){store=Ext.StoreManager.lookup(store);storeChanged=store&&store!==oldStore}else if(allowUnbind){store=Ext.StoreManager.lookup('ext-empty-store');storeChanged=store!==oldStore}
me.fireEvent('beforereconfigure',me,store,columns,oldStore,oldColumns);Ext.suspendLayouts();if(me.rendered&&me.layoutCounter&&(scroller=me.getScrollable())){scroller.scrollTo(0,0)}
if(lockable){me.reconfigureLockable(store,columns,allowUnbind)}else{block=view.blockRefresh;view.blockRefresh=!0;restoreFocus=view.saveFocusState();if(storeChanged){me.unbindStore();me.bindStore(store)}
if(columns){delete me.scrollXPos;headerCt.removeAll();headerCt.add(columns);columnsChanged=!0}
headerCt.onOwnerGridReconfigure(storeChanged,columnsChanged);refreshCounter=view.refreshCounter}
if(me.stateful){stateId=me.getStateId();state=stateId&&Ext.state.Manager.get(stateId);if(state){me.applyState(state)}}
Ext.resumeLayouts(!0);me.reconfiguring=!1;if(lockable){me.afterReconfigureLockable()}else{view.blockRefresh=block;if(view.refreshCounter===refreshCounter){view.refreshView();restoreFocus()}}
me.fireEvent('reconfigure',me,store,columns,oldStore,oldColumns);delete me.reconfiguring;if(storeChanged){me.fireEvent('storechange',me,store,oldStore);if(!oldStore.destroyed&&oldStore.autoDestroy){oldStore.destroy()}}},doDestroy:function(){var me=this,task=me.scrollTask,view=me.view;if(view){view.destroying=!0}
if(me.lockable){me.destroyLockable()}
if(task){task.cancel()}
Ext.destroy(me.rowContextParent,me.plugins,me.focusEnterLeaveListeners,me.freeRowContents,Ext.Object.getValues(me.liveRowContexts),me.lhsMarker,me.rhsMarker);me.callParent();me.unbindStore()},getElementHeight:function(el){var rect=this.preciseHeight&&el.getBoundingClientRect();return rect?(rect.height||(rect.bottom-rect.top)):el.offsetHeight},getElementSize:function(el){var rect=this.preciseHeight&&el.getBoundingClientRect();return{width:rect?(rect.width||(rect.right-rect.left)):el.offsetWidth,height:rect?(rect.height||(rect.bottom-rect.top)):el.offsetHeight}},privates:{initFocusableElement:function(){},doEnsureVisible:function(record,options){if(this.lockable){return this.ensureLockedVisible(record,options)}
if(typeof record!=='number'&&!record.isEntity){record=this.store.getById(record)}
var me=this,view=me.getView(),domNode=view.getNode(record),isLocking=me.ownerGrid.lockable,callback,scope,animate,highlight,select,doFocus,verticalScroller,column,cell,targetContext,internalCallback,scrollPromise;if(options){callback=options.callback;scope=options.scope;animate=options.animate;highlight=options.highlight;select=options.select;doFocus=options.focus;column=options.column}
if(me.deferredEnsureVisible){me.deferredEnsureVisible.destroy()}
if(!view.componentLayoutCounter){me.deferredEnsureVisible=view.on({resize:me.doEnsureVisible,args:Ext.Array.slice(arguments),scope:me,single:!0,destroyable:!0});return}
if(typeof column==='number'){column=me.ownerGrid.getVisibleColumnManager().getColumns()[column]}
if(domNode){if(!record.isEntity){record=view.getRecord(domNode)}
verticalScroller=isLocking?me.ownerGrid.getScrollable():view.getScrollable();if(callback||select||doFocus){internalCallback=function(){targetContext=new Ext.grid.CellContext(view).setPosition(record,column||0);if(select){view.getSelectionModel().selectByPosition(targetContext)}
if(doFocus){view.getNavigationModel().setPosition(targetContext)}
Ext.callback(callback,scope||me,[!0,record,domNode])}}
if(verticalScroller){if(column){cell=Ext.fly(domNode).selectNode(column.getCellSelector())}
if(isLocking&&column){verticalScroller.ensureVisible(domNode,{x:!1});scrollPromise=view.getScrollable().ensureVisible(cell||domNode,{animation:animate,highlight:highlight})}else{scrollPromise=verticalScroller.ensureVisible(cell||domNode,{animation:animate,highlight:highlight,x:!!column})}
if(scrollPromise&&internalCallback){scrollPromise.then(internalCallback)}}}else if(view.bufferedRenderer){view.bufferedRenderer.scrollTo(record,{animate:animate,highlight:highlight,select:select,focus:doFocus,column:column,callback:function(recordIdx,record,domNode){Ext.callback(callback,scope||me,[!0,record,domNode])}})}else{Ext.callback(callback,scope||me,[!1,null])}},getFocusEl:function(){return this.getView().getFocusEl()},getRowContextViewModelParent:function(){var vm=this.lookupViewModel()||this.rowContextParent;if(!vm){this.rowContextParent=vm=new Ext.app.ViewModel()}
return vm},handleWidgetViewChange:function(view,ownerId){var contexts=this.liveRowContexts,freeRowContexts=this.freeRowContexts,len=freeRowContexts&&freeRowContexts.length,i,recInternalId;for(recInternalId in contexts){contexts[recInternalId].handleWidgetViewChange(view,ownerId)}
for(i=0;i<len;i++){freeRowContexts[i].handleWidgetViewChange(view,ownerId)}},initInheritedState:function(inheritedState,inheritedStateInner){inheritedState.inLockedGrid=!!this.isLocked;this.callParent([inheritedState,inheritedStateInner])},setActionableMode:function(enabled,position){var me=this.ownerGrid;if(!me.destroying&&me.view.setActionableMode(enabled,position)!==!1){me.fireEvent('actionablemodechange',enabled);me[enabled?'addCls':'removeCls'](me.actionableModeCls);return!0}},getOverflowStyle:function(){this.scrollFlags=this._scrollFlags['false']['false'];return{overflowX:'hidden',overflowY:'hidden'}},getOverflowEl:function(){return null},shouldAutoHideHeaders:function(){var me=this,columns=me.headerCt.items.items,len=columns.length,autoHideHeaders=!!len,column,i;for(i=0;autoHideHeaders&&i<len;i++){column=columns[i];if(!column.isEmptyText(column.text,!0)||column.columns||(column.isGroupHeader&&column.items.items.length)){autoHideHeaders=!1}}
return autoHideHeaders},syncHeaderVisibility:function(){var me=this,headerCt=me.headerCt,hideHeaders=me.hideHeaders,viewScroller,currentHideHeaderState;if(me.lockable){me.syncLockableHeaderVisibility();return}
if(hideHeaders==null){hideHeaders=me.shouldAutoHideHeaders()}
currentHideHeaderState=headerCt.height===0;if(!headerCt.rendered||hideHeaders!==currentHideHeaderState){headerCt.setHeight(hideHeaders?0:null);headerCt.hiddenHeaders=hideHeaders;headerCt.toggleCls(me.hiddenHeaderCtCls,hideHeaders);me.toggleCls(me.hiddenHeaderCls,hideHeaders);if(!hideHeaders){headerCt.setScrollable({x:!1,y:!1});viewScroller=me.view.getScrollable();if(viewScroller){headerCt.getScrollable().addPartner(viewScroller,'x')}}}}}})
;
Ext.define('Ext.theme.neptune.panel.Table',{override:'Ext.panel.Table',lockableBodyBorder:!0,initComponent:function(){var me=this;me.callParent();if(!me.hasOwnProperty('bodyBorder')&&!me.hideHeaders&&(me.lockableBodyBorder||!me.lockable)){me.bodyBorder=!0}}})
;
Ext.define('Ext.grid.ColumnLayout',{extend:'Ext.layout.container.HBox',alias:'layout.gridcolumn',type:'gridcolumn',requires:['Ext.panel.Table'],firstHeaderCls:Ext.baseCSSPrefix+'column-header-first',lastHeaderCls:Ext.baseCSSPrefix+'column-header-last',initLayout:function(){this.callParent();if(this.scrollbarWidth===undefined){this.self.prototype.scrollbarWidth=Ext.scrollbar.width()}},beginLayout:function(ownerContext){var me=this,owner=me.owner,firstCls=me.firstHeaderCls,lastCls=me.lastHeaderCls,bothCls=[firstCls,lastCls],items=me.getVisibleItems(),len=items.length,i,item;me.callParent([ownerContext]);for(i=0;i<len;i++){item=items[i];if(len===1){item.addCls(bothCls)}else if(i===0){item.addCls(firstCls);item.removeCls(lastCls)}else if(i===len-1){item.removeCls(firstCls);item.addCls(lastCls)}else{item.removeCls(bothCls)}}
me.scrollbarWidth=0;if(owner.isRootHeader&&!owner.grid.isLocked){me.determineScrollbarWidth(ownerContext)}
if(!me.scrollbarWidth){ownerContext.manageScrollbar=!1}},moveItemBefore:function(item,before){var prevOwner=item.ownerCt,nextSibling=before&&before.nextSibling();if(item!==before&&prevOwner){prevOwner.remove(item,{destroy:!1,detach:!1});if(before&&before.destroyed){before=nextSibling}}
return this.callParent([item,before])},determineScrollbarWidth:function(ownerContext){var me=this,owner=me.owner,grid=owner.grid,reserveScrollbar=grid.reserveScrollbar,scrollable=grid.view.getScrollable(),manageScrollbar=!reserveScrollbar&&scrollable&&scrollable.getY();ownerContext.manageScrollbar=manageScrollbar;if(!grid.ownerGrid.collapsed&&(reserveScrollbar||manageScrollbar)){delete me.scrollbarWidth}},calculate:function(ownerContext){var me=this,owner=me.owner,grid=owner.grid,viewContext=ownerContext.viewContext,state=ownerContext.state,context=ownerContext.context,lockingPartnerContext,columnsChanged,columns,len,i,column,scrollbarAdjustment,viewOverflowY;me.callParent([ownerContext]);if(grid&&owner.isRootHeader&&state.parallelDone){lockingPartnerContext=viewContext.lockingPartnerContext;if(grid.forceFit&&!state.reflexed){if(me.convertWidthsToFlexes(ownerContext)){me.cacheFlexes(ownerContext);me.done=!1;ownerContext.invalidate({state:{reflexed:!0,scrollbarAdjustment:me.getScrollbarAdjustment(ownerContext)}});return}}
if((columnsChanged=state.columnsChanged)===undefined){columns=ownerContext.target.getVisibleGridColumns();columnsChanged=!1;for(i=0,len=columns.length;i<len;i++){column=context.getCmp(columns[i]);if(!column.lastBox||column.props.width!==column.lastBox.width){(columnsChanged||(columnsChanged=[]))[i]=column}}
state.columnsChanged=columnsChanged;ownerContext.setProp('columnsChanged',columnsChanged)}
if(ownerContext.manageScrollbar){scrollbarAdjustment=me.getScrollbarAdjustment(ownerContext);if(scrollbarAdjustment){viewOverflowY=viewContext.getProp('viewOverflowY');if(viewOverflowY===undefined){me.done=!1;return}
if(!viewOverflowY){if(lockingPartnerContext){lockingPartnerContext.invalidate();lockingPartnerContext.headerContext.invalidate()}
viewContext.invalidate();ownerContext.invalidate({state:{scrollbarAdjustment:0}})}}}}},finishedLayout:function(ownerContext){this.callParent([ownerContext]);if(this.owner.ariaRole==='rowgroup'){this.innerCt.dom.setAttribute('role','row')}
ownerContext.props.columnsChanged=null},convertWidthsToFlexes:function(ownerContext){var me=this,totalWidth=0,calculated=me.sizeModels.calculated,childItems,len,i,childContext,item;childItems=ownerContext.childItems;len=childItems.length;for(i=0;i<len;i++){childContext=childItems[i];item=childContext.target;totalWidth+=childContext.props.width;if(!(item.fixed||item.resizable===!1)){item.flex=ownerContext.childItems[i].flex=childContext.props.width;item.width=null;childContext.widthModel=calculated}}
return totalWidth!==ownerContext.props.width},getScrollbarAdjustment:function(ownerContext){var me=this,state=ownerContext.state,grid=me.owner.grid,scrollbarAdjustment=state.scrollbarAdjustment;if(scrollbarAdjustment===undefined){scrollbarAdjustment=0;if(grid.reserveScrollbar||(ownerContext.manageScrollbar&&!grid.ownerGrid.getSizeModel().height.shrinkWrap)){scrollbarAdjustment=me.scrollbarWidth}
state.scrollbarAdjustment=scrollbarAdjustment}
return scrollbarAdjustment},getContainerSize:function(ownerContext){var me=this,got,needed,padding,gotWidth,gotHeight,width,height,result;if(me.owner.isRootHeader){result=me.callParent([ownerContext]);if(result.gotWidth){result.width-=me.getScrollbarAdjustment(ownerContext)}}else{padding=ownerContext.paddingContext.getPaddingInfo();got=needed=0;if(!ownerContext.widthModel.shrinkWrap){++needed;width=ownerContext.getProp('innerWidth');gotWidth=(typeof width==='number');if(gotWidth){++got;width-=padding.width;if(width<0){width=0}}}
if(!ownerContext.heightModel.shrinkWrap){++needed;height=ownerContext.getProp('innerHeight');gotHeight=(typeof height==='number');if(gotHeight){++got;height-=padding.height;if(height<0){height=0}}}
return{width:width,height:height,needed:needed,got:got,gotAll:got===needed,gotWidth:gotWidth,gotHeight:gotHeight}}
return result},publishInnerCtSize:function(ownerContext){var me=this,owner=me.owner,cw=ownerContext.peek('contentWidth'),adjustment=0;if(cw!=null&&owner.isRootHeader){adjustment=-ownerContext.state.scrollbarAdjustment}
return me.callParent([ownerContext,adjustment])},roundFlex:function(width){return Math.round(width)}})
;
Ext.define('Ext.rtl.grid.ColumnLayout',{override:'Ext.grid.ColumnLayout',determineScrollbarWidth:function(ownerContext){var me=this,view=me.owner.grid.view;me.callParent([ownerContext]);if(view.getInherited().rtl){if(view.bufferedRenderer&&Ext.supports.xOriginBug){me.scrollbarWidth=-Math.abs(me.scrollbarWidth)}else if(Ext.supports.rtlVertScrollbarOverflowBug||Ext.supports.rtlVertScrollbarOnRight){me.scrollbarWidth=0}}},calculateParallel:function(ownerContext,names,plan){var me=this,owner=me.owner;if(owner.isRootHeader){if((Ext.supports.rtlVertScrollbarOnRight&&owner.ownerCt.view.getInherited().rtl)||(owner.grid.view.bufferedRenderer&&Ext.supports.xOriginBug)){me.padding.right=me.scrollbarWidth}}
return me.callParent(arguments)}})
;
Ext.define('Ext.grid.ColumnManager',{alternateClassName:['Ext.grid.ColumnModel'],columns:null,constructor:function(visibleOnly,headerCt,secondHeaderCt){if(!headerCt.isRootHeader&&!headerCt.isGroupHeader){Ext.raise('ColumnManager must be passed an instantiated HeaderContainer '+'or group header')}
this.headerCt=headerCt;if(secondHeaderCt){if(!headerCt.isRootHeader&&!headerCt.isGroupHeader){Ext.raise('ColumnManager must be passed an instantiated HeaderContainer '+'or group header')}
this.secondHeaderCt=secondHeaderCt}
this.visibleOnly=!!visibleOnly},getColumns:function(){if(!this.columns){this.cacheColumns()}
return this.columns},hasVariableRowHeight:function(){var me=this,columns=me.getColumns(),len=columns.length,i;if(me.variableRowHeight==null){me.variableRowHeight=!1;for(i=0;!me.variableRowHeight&&i<len;i++){me.variableRowHeight=!!columns[i].variableRowHeight}}
return me.variableRowHeight},getHeaderIndex:function(header){if(header.isGroupHeader){header=this.getHeaderColumns(header)[0]}
return Ext.Array.indexOf(this.getColumns(),header)},getHeaderAtIndex:function(index){var columns=this.getColumns(),col=columns[index];return col||null},getPreviousSibling:function(header){var index=this.getHeaderIndex(header),col=null;if(index>0){col=this.getColumns()[index-1]}
return col},getNextSibling:function(header){var index=this.getHeaderIndex(header),col;if(index!==-1){col=this.getColumns()[index+1]}
return col||null},getFirst:function(){var columns=this.getColumns();return columns.length>0?columns[0]:null},getLast:function(){var columns=this.getColumns(),len=columns.length;return len>0?columns[len-1]:null},getHeaderByDataIndex:function(dataIndex){var columns=this.getColumns(),len=columns.length,i,header;if(Ext.isEmpty(dataIndex)){return null}
for(i=0;i<len;++i){header=columns[i];if(header.dataIndex===dataIndex){return header}}
return null},getHeaderById:function(id){var columns=this.getColumns(),len=columns.length,i,header;for(i=0;i<len;++i){header=columns[i];if(header.getItemId()===id){return header}}
return null},getVisibleHeaderClosestToIndex:function(index){var result=this.getHeaderAtIndex(index);if(result&&result.hidden){result=result.next(':not([hidden])')||result.prev(':not([hidden])')}
return result},cacheColumns:function(){var columns=this.getHeaderColumns(this.headerCt),second=this.secondHeaderCt;if(second){columns=columns.concat(this.getHeaderColumns(second))}
this.columns=columns},getHeaderColumns:function(header){var result=this.visibleOnly?header.getVisibleGridColumns():header.getGridColumns();return Ext.Array.clone(result)},invalidate:function(){var root=this.rootColumns;this.columns=this.variableRowHeight=null;if(root){root.invalidate()}},destroy:function(){this.columns=this.rootColumns=null;this.callParent()}},function(){this.createAlias('indexOf','getHeaderIndex')})
;
Ext.define('Ext.grid.NavigationModel',{extend:'Ext.view.NavigationModel',alias:'view.navigation.grid',focusCls:Ext.baseCSSPrefix+'grid-item-focused',getViewListeners:function(){var me=this;return{focusmove:{element:'el',fn:me.onFocusMove},containermousedown:me.onContainerMouseDown,cellmousedown:me.onCellMouseDown,cellclick:me.onCellClick,itemmousedown:me.onItemMouseDown,itemclick:me.onItemClick,itemcontextmenu:me.onItemClick,scope:me}},initKeyNav:function(view){var me=this,nav;if(!me.keyNav){me.keyNav=[];me.position=new Ext.grid.CellContext(view)}
nav=new Ext.util.KeyNav({target:view,ignoreInputFields:!0,eventName:Ext.supports.SpecialKeyDownRepeat?'itemkeydown':'itemkeypress',defaultEventAction:'stopEvent',processEvent:me.processViewEvent,up:me.onKeyUp,down:me.onKeyDown,right:me.onKeyRight,left:me.onKeyLeft,pageDown:me.onKeyPageDown,pageUp:me.onKeyPageUp,home:me.onKeyHome,end:me.onKeyEnd,space:me.onKeySpace,enter:me.onKeyEnter,esc:me.onKeyEsc,113:{ctrl:!1,shift:!1,alt:!1,handler:me.onKeyF2},tab:me.onKeyTab,A:{ctrl:!0,handler:me.onSelectAllKeyPress},scope:me});me.keyNav.push(nav);me.onKeyNavCreate(nav)},onKeyNavCreate:Ext.emptyFn,addKeyBindings:function(binding){var len=this.keyNav.length,i;for(i=0;i<len;i++){this.keyNav[i].addBindings(binding)}},enable:function(){var len=this.keyNav.length,i;for(i=0;i<len;i++){this.keyNav[i].enable()}
this.disabled=!1},disable:function(){var len=this.keyNav.length,i;for(i=0;i<len;i++){this.keyNav[i].disable()}
this.disabled=!0},processViewEvent:function(view,record,row,recordIndex,event){var key=event.getKey();if(view.actionableMode){this.map.ignoreInputFields=!1;if(key===event.TAB||key===event.ESC||key===event.F2){return event}}else{this.map.ignoreInputFields=!0;return key===event.TAB?null:event}},onContainerMouseDown:function(view,mousedownEvent){var me=this,context=new Ext.grid.CellContext(view),lastFocused,position;me.callParent([view,mousedownEvent]);lastFocused=view.lastFocused;position=(view.actionableMode&&view.actionPosition)||lastFocused;if(!position||lastFocused==='scrollbar'){return}
context.setPosition(position.record,position.column);mousedownEvent.position=context;me.attachClosestCell(mousedownEvent);if(!me.position.isEqual(context)){me.setPosition(context,null,mousedownEvent)}},onCellMouseDown:function(view,cell,cellIndex,record,row,recordIndex,mousedownEvent){var targetComponent=Ext.Component.from(mousedownEvent,cell),actionableEl=mousedownEvent.getTarget(this.isFocusableEl,cell),ac;if(view.actionableMode){if(!actionableEl){actionableEl=(ac=Ext.ComponentManager.getActiveComponent())&&ac!==view&&ac.owns(mousedownEvent)}
if(actionableEl){view.setActionableMode(!0,mousedownEvent.position)}else{view.setActionableMode(!1,mousedownEvent.position)}
return}
if(mousedownEvent.pointerType!=='touch'){if(mousedownEvent.position.column.cellFocusable!==!1){if(actionableEl){if(!view.containsFocus){view.containsFocus=!0;view.toggleChildrenTabbability(!1)}
if(view.setActionableMode(!0,mousedownEvent.position)!==!1){actionableEl.focus()}}else{cell.focus()}
if(mousedownEvent.button===2){this.fireNavigateEvent(mousedownEvent)}
if(targetComponent&&targetComponent.isFocusable&&targetComponent.isFocusable()){view.setActionableMode(!0,mousedownEvent.position);targetComponent.focus()}}else{mousedownEvent.preventDefault(!0)}}},onCellClick:function(view,cell,cellIndex,record,row,recordIndex,clickEvent){var me=this,targetComponent=Ext.Component.from(clickEvent,cell),clickOnFocusable=targetComponent&&targetComponent.isFocusable&&targetComponent.isFocusable();if(!Ext.isIE10m&&!view.el.contains(Ext.Element.getActiveElement())&&clickEvent.pointerType!=='touch'){return}
if(view.actionableMode){if(!clickEvent.position.isEqual(view.actionPosition)){if(!clickOnFocusable){view.setActionableMode(!1,clickEvent.position)}}
me.fireEvent('navigate',{view:view,navigationModel:me,keyEvent:clickEvent,previousPosition:me.previousPosition,previousRecordIndex:me.previousRecordIndex,previousRecord:me.previousRecord,previousItem:me.previousItem,previousCell:me.previousCell,previousColumnIndex:me.previousColumnIndex,previousColumn:me.previousColumn,position:clickEvent.position,recordIndex:clickEvent.position.rowIdx,record:clickEvent.position.record,selectionStart:me.selectionStart,item:clickEvent.item,cell:clickEvent.position.cellElement,columnIndex:clickEvent.position.colIdx,column:clickEvent.position.column})}else{if(me.position.isEqual(clickEvent.position)||clickOnFocusable){if(Ext.isIE10m&&!me.record){return}
me.fireNavigateEvent(clickEvent)}else if(clickEvent.position.column.cellFocusable!==!1){me.setPosition(clickEvent.position,null,clickEvent)}else{clickEvent.preventDefault()}}},onFocusMove:function(e){var view=Ext.Component.from(e.delegatedTarget,null,'tableview'),cell=e.target,isCell=Ext.fly(cell).is(view.cellSelector),record,column,newPosition;if(view){if(e.toElement===view.el.dom){view.actionableMode=!1;return view.onFocusEnter(e)}
if(!view.actionableMode&&isCell){record=view.getRecord(cell);column=view.getHeaderByCell(cell);if(record&&column){newPosition=new Ext.grid.CellContext(view).setPosition(record,column);if(!newPosition.isEqual(this.position)){this.setPosition(newPosition)}}}else if((view.actionableMode||view.activating)&&!isCell&&view.el.contains(e.target)&&view.el.dom!==e.target){view.ownerGrid.fireEvent('cellactivate',view.ownerGrid,view.actionPosition)}}},onItemMouseDown:function(view,record,item,index,mousedownEvent){var me=this,scroller;if(!mousedownEvent.position.cellElement&&(mousedownEvent.pointerType!=='touch')){if(!view.enableTextSelection){mousedownEvent.preventDefault()}
me.attachClosestCell(mousedownEvent);if(!me.position.isEqual(mousedownEvent.position)){me.setPosition(mousedownEvent.position,null,mousedownEvent)}
scroller=view.getScrollable();if(scroller){scroller.restoreState()}}},onItemClick:function(view,record,item,index,clickEvent){if(!clickEvent.position.cellElement){this.attachClosestCell(clickEvent);if(clickEvent.pointerType==='touch'){this.setPosition(clickEvent.position,null,clickEvent)}else{this.fireNavigateEvent(clickEvent)}}},attachClosestCell:function(event){var position=event.position,targetCell=position.cellElement,x,columns,len,i,b;if(!targetCell){x=event.getX();columns=position.view.getVisibleColumnManager().getColumns();len=columns.length;for(i=0;i<len;i++){b=columns[i].getBox();if(x>=b.left&&x<b.right){position.setColumn(columns[i]);position.rowElement=position.getRow(!0);position.cellElement=position.getCell(!0);return}}}},deferSetPosition:function(delay,recordIndex,columnIndex,keyEvent,suppressEvent,preventNavigation){var setPositionTask=this.view.getFocusTask();setPositionTask.delay(delay,this.setPosition,this,[recordIndex,columnIndex,keyEvent,suppressEvent,preventNavigation]);return setPositionTask},setPosition:function(recordIndex,columnIndex,keyEvent,suppressEvent,preventNavigation){var me=this,clearing=recordIndex==null&&columnIndex==null,isClear=me.record==null&&me.recordIndex==null&&me.item==null,view,scroller,selModel,dataSource,columnManager,newRecordIndex,newColumnIndex,newRecord,newColumn,columns;if(recordIndex&&recordIndex.isCellContext){view=recordIndex.view}else if(keyEvent&&keyEvent.view){view=keyEvent.view}else if(me.lastFocused){view=me.lastFocused.view}else{view=me.view}
view.cancelFocusTask();if(view.destroyed||!view.refreshCounter||!view.ownerCt||clearing&&isClear||!view.all.getCount()){return}
selModel=view.getSelectionModel();dataSource=view.dataSource;columnManager=view.getVisibleColumnManager();columns=columnManager.getColumns();if(recordIndex&&recordIndex.isCellContext){newRecord=recordIndex.record;newRecordIndex=recordIndex.rowIdx;newColumnIndex=Math.min(recordIndex.colIdx,columns.length-1);newColumn=columns[newColumnIndex];if(dataSource.indexOf(newRecord)===-1){scroller=view.getScrollable();me.recordIndex=-1;if(scroller&&(scroller.getPosition().y>=scroller.getMaxPosition().y-view.all.last(!0).offsetHeight)){recordIndex.rowIdx--}
newRecordIndex=Math.min(recordIndex.rowIdx,dataSource.getCount()-1);newRecord=dataSource.getAt(newRecordIndex)}}else{if(clearing){newRecord=newRecordIndex=null}else{if(columnIndex==null){columnIndex=me.lastFocused?me.lastFocused.column:0}
if(typeof recordIndex==='number'){newRecordIndex=Math.max(Math.min(recordIndex,dataSource.getCount()-1),0);newRecord=dataSource.getAt(recordIndex)}else if(recordIndex.isEntity){newRecord=recordIndex;newRecordIndex=dataSource.indexOf(newRecord)}else if(recordIndex.tagName){newRecord=view.getRecord(recordIndex);newRecordIndex=dataSource.indexOf(newRecord);if(newRecordIndex===-1){newRecord=null}}else{if(isClear){return}
clearing=!0;newRecord=newRecordIndex=null}}
if(newRecord){if(newRecordIndex===-1){me.recordIndex=-1;newRecord=dataSource.getAt(0);newRecordIndex=0;columnIndex=null}
if(columnIndex==null){if(!(newColumn=me.column)){newColumnIndex=0;newColumn=columns[0]}}else if(typeof columnIndex==='number'){newColumn=columns[columnIndex];newColumnIndex=columnIndex}else{newColumn=columnIndex;newColumnIndex=columnManager.indexOf(columnIndex)}}else{clearing=!0;newColumn=newColumnIndex=null}}
if(newColumn&&columnManager.indexOf(newColumn)===-1){if(newColumnIndex===-1){newColumnIndex=0}else{newColumnIndex=Math.min(newColumnIndex,columns.length-1)}
newColumn=columns[newColumnIndex]}
if(view.actionableMode&&!clearing){return view.ownerGrid.setActionableMode(!1,new Ext.grid.CellContext(view).setPosition(newRecord,newColumn))}
if(newRecordIndex===me.recordIndex&&newColumnIndex===me.columnIndex&&view===me.position.view){return me.focusPosition(me.position)}
if(me.cell){me.cell.removeCls(me.focusCls)}
me.previousRecordIndex=me.recordIndex;me.previousRecord=me.record;me.previousItem=me.item;me.previousCell=me.cell;me.previousColumn=me.column;me.previousColumnIndex=me.columnIndex;me.previousPosition=me.position.clone();me.selectionStart=selModel.selectionStart;me.position.setAll(view,me.recordIndex=newRecordIndex,me.columnIndex=newColumnIndex,me.record=newRecord,me.column=newColumn);if(clearing){me.item=me.cell=null}else{me.focusPosition(me.position,preventNavigation)}
if(!suppressEvent){selModel.fireEvent('focuschange',selModel,me.previousRecord,me.record);view.fireEvent('rowfocus',me.record,me.item,me.recordIndex);view.fireEvent('cellfocus',me.record,me.cell,me.position)}
if(keyEvent&&!preventNavigation&&me.cell!==me.previousCell){me.fireNavigateEvent(keyEvent)}},focusPosition:function(position){var me=this,view,row,scroller;me.item=me.cell=null;if(position&&position.record&&position.column){view=position.view;if(position.rowElement){row=me.item=position.rowElement}else{row=view.getRowByRecord(position.record)}
if(row){me.cell=position.cellElement||Ext.fly(row).down(position.column.getCellSelector(),!0);if(me.cell){me.cell=new Ext.dom.Fly(me.cell);view.lastFocused=me.lastFocused=me.position.clone();scroller=view.getScrollable();if(scroller){scroller.ensureVisible(me.cell)}
me.focusItem(me.cell);view.focusEl=me.cell}else{me.position.setAll();me.record=me.column=me.recordIndex=me.columnIndex=null}}else{row=view.dataSource.indexOf(position.record);me.position.setAll();me.record=me.column=me.recordIndex=me.columnIndex=null;if(row!==-1&&view.bufferedRenderer){me.lastKeyEvent=null;view.bufferedRenderer.scrollTo(row,!1,me.afterBufferedScrollTo,me)}}}},focusItem:function(item){item.addCls(this.focusCls);item.focus()},getCell:function(){return this.cell},getPosition:function(skipChecks){var me=this,position=me.position,curIndex,view,dataSource;if(position.record&&position.column){if(skipChecks){return position}
view=position.view;dataSource=view.dataSource;curIndex=dataSource.indexOf(position.record);if(curIndex===-1){curIndex=position.rowIdx;if(!(position.record=dataSource.getAt(curIndex))){curIndex=-1}}
if(curIndex===-1||view.getVisibleColumnManager().indexOf(position.column)===-1){position.setAll();me.record=me.column=me.recordIndex=me.columnIndex=null}else{return position}}
return null},getLastFocused:function(){var me=this,view,lastFocused=me.lastFocused;if(lastFocused&&lastFocused.record&&lastFocused.column){view=lastFocused.view;if(view.dataSource.indexOf(lastFocused.record)!==-1&&view.getVisibleColumnManager().indexOf(lastFocused.column)!==-1){return lastFocused}}},onKeyTab:function(keyEvent){var forward=!keyEvent.shiftKey,view=keyEvent.position.view,ret,focusTarget,position;ret=view.findFocusPosition(keyEvent.target,keyEvent.position,forward,keyEvent);focusTarget=ret.target;position=ret.position;if(focusTarget){this.actionPosition=position.view.actionPosition=position;Ext.fly(focusTarget).focus()}else{view.onRowExit(keyEvent,keyEvent.item,keyEvent.item[forward?'nextSibling':'previousSibling'],forward)}
keyEvent.preventDefault()},onKeyUp:function(keyEvent){var newRecord=keyEvent.view.walkRecs(keyEvent.record,-1),pos=this.getPosition();if(newRecord){pos.setRow(newRecord);if(!pos.getCell(!0)){pos.navigate(-1)}
this.setPosition(pos,null,keyEvent)}},onKeyDown:function(keyEvent){var newRecord=keyEvent.record.isExpandingOrCollapsing?null:keyEvent.view.walkRecs(keyEvent.record,1),pos=this.getPosition();if(newRecord){pos.setRow(newRecord);if(!pos.getCell(!0)){pos.navigate(-1)}
this.setPosition(pos,null,keyEvent)}},onKeyRight:function(keyEvent){var newPosition=this.move('right',keyEvent);if(newPosition){this.setPosition(newPosition,null,keyEvent)}},onKeyLeft:function(keyEvent){var newPosition=this.move('left',keyEvent);if(newPosition){this.setPosition(newPosition,null,keyEvent)}},onKeyEnter:function(keyEvent){var eventArgs=['cellclick',keyEvent.view,keyEvent.position.cellElement,keyEvent.position.colIdx,keyEvent.record,keyEvent.position.rowElement,keyEvent.recordIndex,keyEvent],actionCell=keyEvent.position.getCell(!0);if(actionCell){if(!actionCell.querySelector('[tabIndex="-1"]')){keyEvent.stopEvent();keyEvent.view.fireEvent.apply(keyEvent.view,eventArgs);eventArgs[0]='celldblclick';keyEvent.view.fireEvent.apply(keyEvent.view,eventArgs)}
if(!this.view.actionableMode){this.view.ownerGrid.setActionableMode(!0,this.getPosition())}}},onKeyF2:function(keyEvent){var grid=this.view.ownerGrid,actionableMode=grid.actionableMode;grid.setActionableMode(!actionableMode,actionableMode?null:this.getPosition())},onKeyEsc:function(keyEvent){var grid=this.view.ownerGrid;if(grid.actionableMode){grid.setActionableMode(!1)}else{return!0}},move:function(dir,keyEvent){var me=this,position=me.getPosition(),result=position,rowVeto=keyEvent.shiftKey&&(dir==='right'||dir==='left');if(position&&position.record){while(result){result=result.view.walkCells(result,dir,rowVeto?me.vetoRowChange:null,me);if(result&&result.getCell(!0)&&result.column.cellFocusable!==!1){return result}}}
return null},vetoRowChange:function(newPosition){return this.getPosition().record===newPosition.record},onKeyPageDown:function(keyEvent){var me=this,view=keyEvent.view,rowsVisible=me.getRowsVisible(),newIdx,newRecord;if(rowsVisible){if(view.bufferedRenderer){newIdx=Math.min(keyEvent.recordIndex+rowsVisible,view.dataSource.getCount()-1);me.lastKeyEvent=keyEvent;view.bufferedRenderer.scrollTo(newIdx,!1,me.afterBufferedScrollTo,me)}else{newRecord=view.walkRecs(keyEvent.record,rowsVisible);me.setPosition(newRecord,null,keyEvent)}}},onKeyPageUp:function(keyEvent){var me=this,view=keyEvent.view,rowsVisible=me.getRowsVisible(),newIdx,newRecord;if(rowsVisible){if(view.bufferedRenderer){newIdx=Math.max(keyEvent.recordIndex-rowsVisible,0);me.lastKeyEvent=keyEvent;view.bufferedRenderer.scrollTo(newIdx,!1,me.afterBufferedScrollTo,me)}else{newRecord=view.walkRecs(keyEvent.record,-rowsVisible);me.setPosition(newRecord,null,keyEvent)}}},onKeyHome:function(keyEvent){var me=this,view=keyEvent.view;if(keyEvent.altKey){if(view.bufferedRenderer){me.lastKeyEvent=keyEvent;view.bufferedRenderer.scrollTo(0,!1,me.afterBufferedScrollTo,me)}else{me.setPosition(view.walkRecs(keyEvent.record,-view.dataSource.indexOf(keyEvent.record)),null,keyEvent)}}else{me.setPosition(keyEvent.record,0,keyEvent)}},afterBufferedScrollTo:function(newIdx,newRecord){this.setPosition(newRecord,null,this.lastKeyEvent,null,!this.lastKeyEvent)},onKeyEnd:function(keyEvent){var me=this,view=keyEvent.view;if(keyEvent.altKey){if(view.bufferedRenderer){me.lastKeyEvent=keyEvent;view.bufferedRenderer.scrollTo(view.store.getCount()-1,!1,me.afterBufferedScrollTo,me)}else{me.setPosition(view.walkRecs(keyEvent.record,view.dataSource.getCount()-1-view.dataSource.indexOf(keyEvent.record)),null,keyEvent)}}else{me.setPosition(keyEvent.record,keyEvent.view.getVisibleColumnManager().getColumns().length-1,keyEvent)}},getRowsVisible:function(){var rowsVisible=!1,view=this.view,firstRow=view.all.first(),rowHeight,gridViewHeight;if(firstRow){rowHeight=firstRow.getHeight();gridViewHeight=view.el.getHeight();rowsVisible=Math.floor(gridViewHeight/rowHeight)}
return rowsVisible},fireNavigateEvent:function(keyEvent){var me=this;me.fireEvent('navigate',{view:me.position.view,navigationModel:me,keyEvent:keyEvent||new Ext.event.Event({}),previousPosition:me.previousPosition,previousRecordIndex:me.previousRecordIndex,previousRecord:me.previousRecord,previousItem:me.previousItem,previousCell:me.previousCell,previousColumnIndex:me.previousColumnIndex,previousColumn:me.previousColumn,position:me.position,recordIndex:me.recordIndex,record:me.record,selectionStart:me.selectionStart,item:me.item,cell:me.cell,columnIndex:me.columnIndex,column:me.column})},isFocusableEl:function(el){return Ext.fly(el).isFocusable()}})
;
Ext.define('Ext.rtl.grid.NavigationModel',{override:'Ext.grid.NavigationModel',initKeyNav:function(view){var me=this,proto=me.self.prototype;if(view.getInherited().rtl){me.onKeyLeft=proto.onKeyRight;me.onKeyRight=proto.onKeyLeft}
me.callParent([view])}})
;
Ext.define('Ext.view.TableLayout',{extend:'Ext.layout.component.Auto',alias:'layout.tableview',type:'tableview',beginLayout:function(ownerContext){var me=this,owner=me.owner,ownerGrid=owner.ownerGrid,partner=owner.lockingPartner,partnerContext=ownerContext.lockingPartnerContext,context=ownerContext.context,scrollable=ownerGrid.getScrollable(),partnerVisible;partnerVisible=partner&&partner.grid.isVisible()&&!(partner.grid.collapsed||partner.grid.floatedFromCollapse);ownerContext.doSyncRowHeights=partnerVisible&&(ownerGrid.syncRowHeight||ownerGrid.syncRowHeightOnNextLayout);ownerContext.allowScrollX=scrollable&&scrollable.config&&scrollable.config.x;if(!me.columnFlusherId){me.columnFlusherId=me.id+'-columns';me.rowHeightFlusherId=me.id+'-rows'}
me.callParent([ownerContext]);if(partnerVisible){if(!partnerContext&&partner.componentLayout.isRunning()){(partnerContext=ownerContext.lockingPartnerContext=context.getCmp(partner)).lockingPartnerContext=ownerContext;if(!partnerContext.lockingPartnerContext){partnerContext.lockingPartnerContext=ownerContext}}
if(ownerContext.doSyncRowHeights){if(partnerContext&&!partnerContext.rowHeightSynchronizer){partnerContext.rowHeightSynchronizer=partnerContext.target.syncRowHeightBegin()}
ownerContext.rowHeightSynchronizer=me.owner.syncRowHeightBegin()}}(ownerContext.headerContext=context.getCmp(me.headerCt)).viewContext=ownerContext},beginLayoutCycle:function(ownerContext,firstCycle){this.callParent([ownerContext,firstCycle]);if(ownerContext.syncRowHeights){ownerContext.target.syncRowHeightClear(ownerContext.rowHeightSynchronizer);ownerContext.syncRowHeights=!1}},calculate:function(ownerContext){var me=this,context=ownerContext.context,lockingPartnerContext=ownerContext.lockingPartnerContext,headerContext=ownerContext.headerContext,ownerCtContext=ownerContext.ownerCtContext,state=ownerContext.state,owner=me.owner,bodyDom=owner.body.dom,columnsChanged=headerContext.getProp('columnsChanged'),overflowable,columnFlusher,otherSynchronizer,synchronizer,rowHeightFlusher,bodyHeight,ctSize,overflowY,overflowX,scrollbarHeight;if(!owner.all.getCount()&&(!bodyDom||!owner.body.child('table',!0))){ownerContext.setProp('viewOverflowY',!1);me.callParent([ownerContext]);return}
if(me.calcCount===1&&me.owner.bufferedRenderer){me.owner.bufferedRenderer.beforeTableLayout(ownerContext)}
if(columnsChanged===undefined){me.done=!1;return}
if(columnsChanged){if(!(columnFlusher=state.columnFlusher)){context.queueFlush(state.columnFlusher=columnFlusher={ownerContext:ownerContext,columnsChanged:columnsChanged,layout:me,id:me.columnFlusherId,flush:me.flushColumnWidths},!0)}
if(!columnFlusher.flushed){me.done=!1;return}}
if(ownerContext.doSyncRowHeights){if(!(rowHeightFlusher=state.rowHeightFlusher)){if(!(synchronizer=state.rowHeights)){state.rowHeights=synchronizer=ownerContext.rowHeightSynchronizer;me.owner.syncRowHeightMeasure(synchronizer);ownerContext.setProp('rowHeights',synchronizer)}
if(!(otherSynchronizer=lockingPartnerContext.getProp('rowHeights'))){me.done=!1;return}
context.queueFlush(state.rowHeightFlusher=rowHeightFlusher={ownerContext:ownerContext,synchronizer:synchronizer,otherSynchronizer:otherSynchronizer,layout:me,id:me.rowHeightFlusherId,flush:me.flushRowHeights},!0)}
if(!rowHeightFlusher.flushed){me.done=!1;return}}
me.callParent([ownerContext]);if(!ownerContext.heightModel.shrinkWrap){if(!ownerCtContext.heightModel.shrinkWrap){overflowable=!0;ctSize=ownerCtContext.target.layout.getContainerSize(ownerCtContext);if(!ctSize.gotHeight){me.done=!1;return}
bodyHeight=bodyDom.offsetHeight;if(bodyHeight>ctSize.height){overflowY=!0}}}
scrollbarHeight=Ext.scrollbar.height();if(me.done&&ownerContext.allowScrollX&&scrollbarHeight){if(!owner.lockingPartner){if(owner.isAutoTree){overflowX=!0}else{overflowX=!!ownerContext.headerContext.state.boxPlan.tooNarrow}
ownerContext.setProp('overflowX',overflowX)}
if(overflowX&&bodyHeight&&overflowable){overflowY=(bodyHeight+scrollbarHeight)>ctSize.height}}
if(me.done||overflowY!=null){ownerContext.setProp('viewOverflowY',!!overflowY)}},measureContentHeight:function(ownerContext){var owner=this.owner,bodyDom=owner.body.dom,emptyEl=owner.emptyEl,bodyHeight=0;if(emptyEl){bodyHeight+=emptyEl.offsetHeight}
if(bodyDom){bodyHeight+=bodyDom.offsetHeight}
if(ownerContext.headerContext.state.boxPlan.tooNarrow){bodyHeight+=Ext.scrollbar.height()}
return bodyHeight},flushColumnWidths:function(){var flusher=this,me=flusher.layout,ownerContext=flusher.ownerContext,columnsChanged=flusher.columnsChanged,owner=ownerContext.target,len=columnsChanged.length,column,i,colWidth,lastBox;if(ownerContext.state.columnFlusher!==flusher){return}
for(i=0;i<len;i++){if(!(column=columnsChanged[i])){continue}
colWidth=column.props.width;owner.body.select(owner.getColumnSizerSelector(column.target)).setWidth(colWidth);if(column.target.onCellsResized){column.target.onCellsResized(colWidth)}
lastBox=column.lastBox;if(lastBox){lastBox.width=colWidth}}
flusher.flushed=!0;if(!me.pending){ownerContext.context.queueLayout(me)}},flushRowHeights:function(){var flusher=this,me=flusher.layout,ownerContext=flusher.ownerContext;if(ownerContext.state.rowHeightFlusher!==flusher){return}
ownerContext.target.syncRowHeightFinish(flusher.synchronizer,flusher.otherSynchronizer);flusher.flushed=!0;ownerContext.syncRowHeights=!0;if(!me.pending){ownerContext.context.queueLayout(me)}},finishedLayout:function(ownerContext){var me=this,ownerGrid=me.owner.ownerGrid,nodeContainer=Ext.fly(me.owner.getNodeContainer()),scroller=this.owner.getScrollable(),buffered;me.callParent([ownerContext]);if(nodeContainer){nodeContainer.setWidth(ownerContext.headerContext.props.contentWidth)}
buffered=me.owner.bufferedRenderer;if(buffered){buffered.afterTableLayout(ownerContext)}
if(ownerGrid){ownerGrid.syncRowHeightOnNextLayout=!1}
if(scroller&&!scroller.isScrolling){if(buffered){if(buffered.nextRefreshStartIndex===0||me.owner.hasVariableRowHeight()){return}}
scroller.restoreState()}},getLayoutItems:function(){return this.owner.getRefItems()},isValidParent:function(){return!0}})
;
Ext.define('Ext.grid.locking.RowSynchronizer',{constructor:function(view,rowEl){var me=this,rowTpl;me.view=view;me.rowEl=rowEl;me.els={};me.add('data',view.rowSelector);for(rowTpl=view.rowTpl;rowTpl;rowTpl=rowTpl.nextTpl){if(rowTpl.beginRowSync){rowTpl.beginRowSync(me)}}},add:function(name,selector){var el=Ext.fly(this.rowEl).down(selector,!0);if(el){this.els[name]={el:el}}},finish:function(other){var me=this,els=me.els,otherEls=other.els,otherEl,growth=0,otherGrowth=0,delta,name,otherHeight;for(name in els){otherEl=otherEls[name];otherHeight=otherEl?otherEl.height:0;delta=otherHeight-els[name].height;if(delta>0){growth+=delta;Ext.fly(els[name].el).setHeight(otherHeight)}else{otherGrowth-=delta}}
otherHeight=other.rowHeight+otherGrowth;if(Ext.isIE9&&me.view.ownerGrid.rowLines){otherHeight--}
if(me.rowHeight+growth<otherHeight){Ext.fly(me.rowEl).setHeight(otherHeight)}},measure:function(){var me=this,els=me.els,grid=me.view.ownerGrid,name;me.rowHeight=grid.getElementHeight(me.rowEl);for(name in els){els[name].height=grid.getElementHeight(els[name].el)}},reset:function(){var els=this.els,name;this.rowEl.style.height='';for(name in els){els[name].el.style.height=''}}})
;
Ext.define('Ext.view.NodeCache',{requires:['Ext.dom.CompositeElementLite'],statics:{range:document.createRange&&document.createRange()},constructor:function(view){this.view=view;this.clear();this.el=new Ext.dom.Fly()},destroy:function(){var me=this;if(!me.destroyed){me.el.destroy();me.el=me.view=null;me.destroyed=!0}
me.callParent()},clear:function(removeDom){var me=this,elements=me.elements,range=me.statics().range,key;if(me.count&&removeDom){if(range&&Ext.getBody().contains(elements[0])){range.setStartBefore(elements[me.startIndex]);range.setEndAfter(elements[me.endIndex]);range.deleteContents()}else{for(key in elements){Ext.removeNode(elements[key])}}}
me.elements={};me.count=me.startIndex=0;me.endIndex=-1},fill:function(newElements,startIndex,fixedNodes){var me=this,elements=me.elements={},i,len;fixedNodes=fixedNodes||0;if(!startIndex){startIndex=0}
for(i=0,len=newElements.length-fixedNodes;i<len;i++){elements[startIndex+i]=newElements[i+fixedNodes]}
me.startIndex=startIndex;me.endIndex=startIndex+len-1;me.count=len;return this},insert:function(insertPoint,nodes){var me=this,elements=me.elements,i,nodeCount=nodes.length;if(me.count){if(insertPoint>me.endIndex+1||insertPoint+nodes.length<me.startIndex){Ext.raise('Discontiguous range would result from inserting '+nodes.length+' nodes at '+insertPoint)}
if(insertPoint<me.count){for(i=me.endIndex+nodeCount;i>=insertPoint+nodeCount;i--){elements[i]=elements[i-nodeCount];elements[i].setAttribute('data-recordIndex',i)}}
me.endIndex=me.endIndex+nodeCount}else{me.startIndex=insertPoint;me.endIndex=insertPoint+nodeCount-1}
for(i=0;i<nodeCount;i++,insertPoint++){elements[insertPoint]=nodes[i];elements[insertPoint].setAttribute('data-recordIndex',insertPoint)}
me.count+=nodeCount},invoke:function(fn,args){var me=this,element,i;fn=Ext.dom.Element.prototype[fn];for(i=me.startIndex;i<=me.endIndex;i++){element=me.item(i);if(element){fn.apply(element,args)}}
return me},item:function(index,asDom){var el=this.elements[index],result=null;if(el){result=asDom?this.elements[index]:this.el.attach(this.elements[index])}
return result},first:function(asDom){return this.item(this.startIndex,asDom)},last:function(asDom){return this.item(this.endIndex,asDom)},moveBlock:function(increment){var me=this,elements=me.elements,node,end,step,i;if(!increment){return}
if(increment<0){i=me.startIndex-1;end=me.endIndex;step=1}else{i=me.endIndex+1;end=me.startIndex;step=-1}
me.startIndex+=increment;me.endIndex+=increment;do{i+=step;node=elements[i+increment]=elements[i];node.setAttribute('data-recordIndex',i+increment);if(i<me.startIndex||i>me.endIndex){delete elements[i]}}while(i!==end);delete elements[i]},getCount:function(){return this.count},slice:function(start,end){var elements=this.elements,result=[],i;if(!end){end=this.endIndex}else{end=Math.min(this.endIndex,end-1)}
for(i=start||this.startIndex;i<=end;i++){result.push(elements[i])}
return result},replaceElement:function(el,replacement,domReplace){var elements=this.elements,index=(typeof el==='number')?el:this.indexOf(el);if(index>-1){replacement=Ext.getDom(replacement);if(domReplace){el=elements[index];el.parentNode.insertBefore(replacement,el);Ext.removeNode(el);replacement.setAttribute('data-recordIndex',index)}
this.elements[index]=replacement}
return this},indexOf:function(el){var elements=this.elements,index;el=Ext.getDom(el);for(index=this.startIndex;index<=this.endIndex;index++){if(elements[index]===el){return index}}
return-1},clip:function(removeEnd,removeCount){var me=this,elements=me.elements,removed=[],start,end,el,i;if(removeEnd===1){start=me.startIndex;me.startIndex+=removeCount}else{me.endIndex-=removeCount;start=me.endIndex+1}
for(i=start,end=start+removeCount-1;i<=end;i++){el=elements[i];removed.push(el);Ext.removeNode(el);delete elements[i]}
me.count-=removeCount;me.view.fireItemMutationEvent('itemremove',me.view.dataSource.getRange(start,end),start,removed,me.view)},removeRange:function(start,end,removeDom){var me=this,elements=me.elements,removed=[],el,i,removeCount,fromPos;if(end==null){end=me.endIndex+1}else{end=Math.min(me.endIndex+1,end+1)}
if(start==null){start=me.startIndex}
removeCount=end-start;for(i=start,fromPos=end;i<=me.endIndex;i++,fromPos++){el=elements[i];if(i<end){removed.push(el);if(removeDom){Ext.removeNode(el)}}
if(fromPos<=me.endIndex){el=elements[i]=elements[fromPos];el.setAttribute('data-recordIndex',i)}else{delete elements[i]}}
me.count-=removeCount;me.endIndex-=removeCount;return removed},removeElement:function(keys,removeDom){var me=this,elements=me.elements,keyIndex=0,inKeys,key,el,deleteCount,index,fromIndex;if(Ext.isArray(keys)){inKeys=keys;keys=[];deleteCount=inKeys.length;for(keyIndex=0;keyIndex<deleteCount;keyIndex++){key=inKeys[keyIndex];if(typeof key!=='number'){key=me.indexOf(key)}
if(key>=me.startIndex&&key<=me.endIndex){keys[keys.length]=key}}
Ext.Array.sort(keys);deleteCount=keys.length}else{if(keys<me.startIndex||keys>me.endIndex){return}
deleteCount=1;keys=[keys]}
for(index=fromIndex=keys[0],keyIndex=0;index<=me.endIndex;index++,fromIndex++){if(keyIndex<deleteCount&&index===keys[keyIndex]){fromIndex++;keyIndex++;if(removeDom){Ext.removeNode(elements[index])}}
if(fromIndex<=me.endIndex&&fromIndex>=me.startIndex){el=elements[index]=elements[fromIndex];el.setAttribute('data-recordIndex',index)}else{delete elements[index]}}
me.endIndex-=deleteCount;me.count-=deleteCount},scroll:function(newRecords,direction,removeCount){var me=this,view=me.view,store=view.store,elements=me.elements,recCount=newRecords.length,nodeContainer=view.getNodeContainer(),range=me.statics().range,i,el,removeEnd,children,result,removeStart,removedRecords,removedItems;if(!(newRecords.length||removeCount)){return}
if(direction===-1){if(removeCount){removedRecords=[];removedItems=[];removeStart=(me.endIndex-removeCount)+1;if(range){range.setStartBefore(elements[removeStart]);range.setEndAfter(elements[me.endIndex]);range.deleteContents();for(i=removeStart;i<=me.endIndex;i++){el=elements[i];delete elements[i];removedRecords.push(store.getByInternalId(el.getAttribute('data-recordId')));removedItems.push(el)}}else{for(i=removeStart;i<=me.endIndex;i++){el=elements[i];delete elements[i];Ext.removeNode(el);removedRecords.push(store.getByInternalId(el.getAttribute('data-recordId')));removedItems.push(el)}}
view.fireItemMutationEvent('itemremove',removedRecords,removeStart,removedItems,view);me.endIndex-=removeCount}
if(newRecords.length){result=view.bufferRender(newRecords,me.startIndex-=recCount);children=result.children;for(i=0;i<recCount;i++){elements[me.startIndex+i]=children[i]}
nodeContainer.insertBefore(result.fragment,nodeContainer.firstChild);view.fireItemMutationEvent('itemadd',newRecords,me.startIndex,children,view)}}else{if(removeCount){removedRecords=[];removedItems=[];removeEnd=me.startIndex+removeCount;if(range){range.setStartBefore(elements[me.startIndex]);range.setEndAfter(elements[removeEnd-1]);range.deleteContents();for(i=me.startIndex;i<removeEnd;i++){el=elements[i];delete elements[i];removedRecords.push(store.getByInternalId(el.getAttribute('data-recordId')));removedItems.push(el)}}else{for(i=me.startIndex;i<removeEnd;i++){el=elements[i];delete elements[i];Ext.removeNode(el);removedRecords.push(store.getByInternalId(el.getAttribute('data-recordId')));removedItems.push(el)}}
view.fireItemMutationEvent('itemremove',removedRecords,me.startIndex,removedItems,view);me.startIndex=removeEnd}
result=view.bufferRender(newRecords,me.endIndex+1);children=result.children;for(i=0;i<recCount;i++){elements[me.endIndex+=1]=children[i]}
nodeContainer.appendChild(result.fragment);view.fireItemMutationEvent('itemadd',newRecords,me.endIndex+1,children,view)}
me.count=me.endIndex-me.startIndex+1;return children},sumHeights:function(){var result=0,elements=this.elements,i;for(i=this.startIndex;i<=this.endIndex;i++){result+=elements[i].offsetHeight}
return result}},function(){Ext.dom.CompositeElementLite.importElementMethods.call(this)})
;
Ext.define('Ext.scroll.TableScroller',{extend:'Ext.scroll.Scroller',alias:'scroller.table',config:{lockingScroller:null},privates:{getEnsureVisibleXY:function(el,options){var lockingScroller=this.getLockingScroller(),position=this.getPosition(),newPosition;if(el&&el.element&&!el.isElement){options=el;el=options.element}
options=options||{};if(lockingScroller){position.y=lockingScroller.position.y}
newPosition=Ext.fly(el).getScrollIntoViewXY(this.getElement(),position.x,position.y);newPosition.x=(options.x===!1)?position.x:newPosition.x;if(lockingScroller){newPosition.y=(options.y===!1)?position.y:Ext.fly(el).getScrollIntoViewXY(lockingScroller.getElement(),position.x,position.y).y}
return newPosition},doScrollTo:function(x,y,animate){var lockingScroller,lockedPromise,ret;if(y!=null){lockingScroller=this.getLockingScroller();if(lockingScroller){lockedPromise=lockingScroller.doScrollTo(null,y,animate);y=null}}
ret=this.callParent([x,y,animate]);if(lockedPromise){ret=Ext.Promise.all([ret,lockedPromise])}
return ret},restoreState:function(){var me=this,el=me.getScrollElement(),lockingScroller=me.getLockingScroller(),trackingScrollTop;if(el){trackingScrollTop=lockingScroller?lockingScroller.trackingScrollTop:me.trackingScrollTop;if(trackingScrollTop!==undefined){if(!me.restoreTimer){me.restoreTimer=Ext.defer(function(){me.restoreTimer=null},50)}
me.doScrollTo(me.trackingScrollLeft,trackingScrollTop,!1)}}}}})
;
Ext.define('Ext.view.Table',{extend:'Ext.view.View',xtype:['tableview','gridview'],alternateClassName:'Ext.grid.View',requires:['Ext.grid.CellContext','Ext.view.TableLayout','Ext.grid.locking.RowSynchronizer','Ext.view.NodeCache','Ext.util.DelayedTask','Ext.util.MixedCollection','Ext.scroll.TableScroller'],mixins:['Ext.mixin.Queryable'],isTableView:!0,config:{selectionModel:{type:'rowmodel'}},inheritableStatics:{normalSideEvents:["deselect","select","beforedeselect","beforeselect","selectionchange"],events:["blur","focus","move","resize","destroy","beforedestroy","boxready","afterrender","render","beforerender","removed","hide","beforehide","show","beforeshow","enable","disable","added","deactivate","beforedeactivate","activate","beforeactivate","cellkeydown","beforecellkeydown","cellmouseup","beforecellmouseup","cellmousedown","beforecellmousedown","cellcontextmenu","beforecellcontextmenu","celldblclick","beforecelldblclick","cellclick","beforecellclick","refresh","itemremove","itemadd","beforeitemupdate","itemupdate","viewready","beforerefresh","unhighlightitem","highlightitem","focuschange","containerkeydown","containercontextmenu","containerdblclick","containerclick","containermouseout","containermouseover","containermouseup","containermousedown","beforecontainerkeydown","beforecontainercontextmenu","beforecontainerdblclick","beforecontainerclick","beforecontainermouseout","beforecontainermouseover","beforecontainermouseup","beforecontainermousedown","itemkeydown","itemcontextmenu","itemdblclick","itemclick","itemmouseleave","itemmouseenter","itemmouseup","itemmousedown","rowclick","rowcontextmenu","rowdblclick","rowkeydown","rowmouseup","rowmousedown","rowkeydown","beforeitemkeydown","beforeitemcontextmenu","beforeitemdblclick","beforeitemclick","beforeitemmouseleave","beforeitemmouseenter","beforeitemmouseup","beforeitemmousedown","statesave","beforestatesave","staterestore","beforestaterestore","uievent","groupcollapse","groupexpand","scroll"]},scrollable:!0,componentLayout:'tableview',baseCls:Ext.baseCSSPrefix+'grid-view',unselectableCls:Ext.baseCSSPrefix+'unselectable',firstCls:Ext.baseCSSPrefix+'grid-cell-first',lastCls:Ext.baseCSSPrefix+'grid-cell-last',itemCls:Ext.baseCSSPrefix+'grid-item',selectedItemCls:Ext.baseCSSPrefix+'grid-item-selected',selectedCellCls:Ext.baseCSSPrefix+'grid-cell-selected',focusedItemCls:Ext.baseCSSPrefix+'grid-item-focused',overItemCls:Ext.baseCSSPrefix+'grid-item-over',altRowCls:Ext.baseCSSPrefix+'grid-item-alt',dirtyCls:Ext.baseCSSPrefix+'grid-dirty-cell',rowClsRe:new RegExp('(?:^|\\s*)'+Ext.baseCSSPrefix+'grid-item-alt(?:\\s+|$)','g'),cellRe:new RegExp(Ext.baseCSSPrefix+'grid-cell-([^\\s]+)(?:\\s|$)',''),positionBody:!0,positionCells:!1,stripeOnUpdate:null,actionableMode:!1,trackOver:!0,getRowClass:null,stripeRows:!0,markDirty:!0,ariaRole:'rowgroup',rowAriaRole:'row',cellAriaRole:'gridcell',tpl:['{%','view = values.view;','if (!(columns = values.columns)) {','columns = values.columns = view.ownerCt.getVisibleColumnManager().getColumns();','}','values.fullWidth = 0;','for (i = 0, len = columns.length; i < len; i++) {','column = columns[i];','values.fullWidth += (column.cellWidth = column.lastBox ? column.lastBox.width : column.width || column.minWidth);','}','tableCls=values.tableCls=[];','%}','<div class="'+Ext.baseCSSPrefix+'grid-item-container" role="presentation" style="width:{fullWidth}px">','{[view.renderTHead(values, out, parent)]}','{%','view.renderRows(values.rows, values.columns, values.viewStartIndex, out);','%}','{[view.renderTFoot(values, out, parent)]}','</div>','{% ','view = columns = column = null;','%}',{definitions:'var view, tableCls, columns, i, len, column;',priority:0}],outerRowTpl:['<table id="{rowId}" role="presentation" ','data-boundView="{view.id}" ','data-recordId="{record.internalId}" ','data-recordIndex="{recordIndex}" ','class="{[values.itemClasses.join(" ")]}" cellpadding="0" cellspacing="0" style="{itemStyle};width:0">','{%','this.nextTpl.applyOut(values, out, parent)','%}','</table>',{priority:9999}],rowTpl:['{%','var dataRowCls = values.recordIndex === -1 ? "" : " '+Ext.baseCSSPrefix+'grid-row";','%}','<tr class="{[values.rowClasses.join(" ")]} {[dataRowCls]}"',' role="{rowRole}" {rowAttr:attributes}>','<tpl for="columns">'+'{%','parent.view.renderCell(values, parent.record, parent.recordIndex, parent.rowIndex, xindex - 1, out, parent)','%}','</tpl>','</tr>',{priority:0}],cellTpl:['<td class="{tdCls}" {tdAttr} {cellAttr:attributes}',' style="width:{column.cellWidth}px;','{% if(values.tdStyle){out.push(values.tdStyle);}%}"','{% if (values.column.cellFocusable === false) {%}',' role="presentation"','{% } else { %}',' role="{cellRole}" tabindex="-1"','{% } %}','  data-columnid="{[values.column.getItemId()]}">','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'grid-cell-inner {innerCls}" ','style="text-align:{align};','{% if (values.style) {out.push(values.style);} %}" ','{cellInnerAttr:attributes}>{value}</div>','</td>',{priority:0}],refreshSelmodelOnRefresh:!1,scrollableType:'table',tableValues:{},rowValues:{itemClasses:[],rowClasses:[]},cellValues:{classes:[Ext.baseCSSPrefix+'grid-cell '+Ext.baseCSSPrefix+'grid-td']},constructor:function(config){if(config.grid.isTree){config.baseCls=Ext.baseCSSPrefix+'tree-view'}
this.callParent([config])},hasVariableRowHeight:function(fromLockingPartner){var me=this;return me.variableRowHeight||me.store.isGrouped()||me.getVisibleColumnManager().hasVariableRowHeight()||(!fromLockingPartner&&me.lockingPartner&&me.lockingPartner.hasVariableRowHeight(!0))},initComponent:function(){var me=this;if(me.columnLines){me.addCls(me.grid.colLinesCls)}
if(me.rowLines){me.addCls(me.grid.rowLinesCls)}
me.body=new Ext.dom.Fly();me.body.id=me.id+'gridBody';if(!me.trackOver){me.overItemCls=null}
me.headerCt.view=me;me.grid.view=me;me.initFeatures(me.grid);me.itemSelector=me.getItemSelector();me.all=new Ext.view.NodeCache(me);me.actionRowFly=new Ext.dom.Fly();me.callParent()},applySelectionModel:function(selModel,oldSelModel){var me=this,grid=me.ownerGrid,defaultType=selModel.type,disableSelection=me.disableSelection||grid.disableSelection;if(!oldSelModel){if(!(selModel&&selModel.isSelectionModel)){selModel=grid.selModel||selModel}}
if(selModel){if(selModel.isSelectionModel){selModel.allowDeselect=grid.allowDeselect||selModel.selectionMode!=='SINGLE';selModel.locked=disableSelection}else{if(typeof selModel==='string'){selModel={type:selModel}}else{selModel.type=grid.selType||selModel.selType||selModel.type||defaultType}
if(!selModel.mode){if(grid.simpleSelect){selModel.mode='SIMPLE'}else if(grid.multiSelect){selModel.mode='MULTI'}}
selModel=Ext.Factory.selection(Ext.apply({allowDeselect:grid.allowDeselect,locked:disableSelection},selModel))}}
return selModel},updateSelectionModel:function(selModel,oldSelModel){var me=this;if(oldSelModel){oldSelModel.un({scope:me,lastselectedchanged:me.updateBindSelection,selectionchange:me.updateBindSelection});Ext.destroy(me.selModelRelayer)}
me.selModelRelayer=me.relayEvents(selModel,['selectionchange','beforeselect','beforedeselect','select','deselect','focuschange']);selModel.on({scope:me,lastselectedchanged:me.updateBindSelection,selectionchange:me.updateBindSelection});me.selModel=selModel},getVisibleColumnManager:function(){return this.ownerCt.getVisibleColumnManager()},getColumnManager:function(){return this.ownerCt.getColumnManager()},getTopLevelVisibleColumnManager:function(){return this.ownerGrid.getVisibleColumnManager()},moveColumn:function(fromIdx,toIdx,colsToMove){var me=this,multiMove=colsToMove>1,range=multiMove&&document.createRange?document.createRange():null,fragment=multiMove&&!range?document.createDocumentFragment():null,destinationCellIdx=toIdx,colCount=me.getGridColumns().length,lastIndex=colCount-1,i,j,rows,len,tr,cells,colGroups,doFirstLastClasses;doFirstLastClasses=(me.firstCls||me.lastCls)&&(toIdx===0||toIdx===colCount||fromIdx===0||fromIdx===lastIndex);if(me.rendered&&toIdx!==fromIdx){rows=me.el.query(me.rowSelector);for(i=0,len=rows.length;i<len;i++){tr=rows[i];cells=tr.childNodes;if(doFirstLastClasses){if(cells.length===1){Ext.fly(cells[0]).addCls(me.firstCls);Ext.fly(cells[0]).addCls(me.lastCls);continue}
if(fromIdx===0){Ext.fly(cells[0]).removeCls(me.firstCls);Ext.fly(cells[1]).addCls(me.firstCls)}else if(fromIdx===lastIndex){Ext.fly(cells[lastIndex]).removeCls(me.lastCls);Ext.fly(cells[lastIndex-1]).addCls(me.lastCls)}
if(toIdx===0){Ext.fly(cells[0]).removeCls(me.firstCls);Ext.fly(cells[fromIdx]).addCls(me.firstCls)}else if(toIdx===colCount){Ext.fly(cells[lastIndex]).removeCls(me.lastCls);Ext.fly(cells[fromIdx]).addCls(me.lastCls)}}
if(multiMove){if(range){range.setStartBefore(cells[fromIdx]);range.setEndAfter(cells[fromIdx+colsToMove-1]);fragment=range.extractContents()}else{for(j=0;j<colsToMove;j++){fragment.appendChild(cells[fromIdx])}}
tr.insertBefore(fragment,cells[destinationCellIdx]||null)}else{tr.insertBefore(cells[fromIdx],cells[destinationCellIdx]||null)}}
colGroups=me.el.query('colgroup');for(i=0,len=colGroups.length;i<len;i++){tr=colGroups[i];if(multiMove){if(range){range.setStartBefore(tr.childNodes[fromIdx]);range.setEndAfter(tr.childNodes[fromIdx+colsToMove-1]);fragment=range.extractContents()}else{for(j=0;j<colsToMove;j++){fragment.appendChild(tr.childNodes[fromIdx])}}
tr.insertBefore(fragment,tr.childNodes[destinationCellIdx]||null)}else{tr.insertBefore(tr.childNodes[fromIdx],tr.childNodes[destinationCellIdx]||null)}}}},scrollToTop:Ext.emptyFn,addElListener:function(eventName,fn,scope){this.mon(this,eventName,fn,scope,{element:'el'})},getGridColumns:function(){return this.ownerCt.getVisibleColumnManager().getColumns()},getHeaderAtIndex:function(index){return this.ownerCt.getVisibleColumnManager().getHeaderAtIndex(index)},getCell:function(record,column,returnElement){var row=this.getRow(record),cell;if(row){if(typeof column==='number'){column=this.getHeaderAtIndex(column)}
cell=row.querySelector(column.getCellSelector());return returnElement?Ext.get(cell):cell}},getFeature:function(id){var features=this.featuresMC;if(features){return features.get(id)}},findFeature:function(ftype){if(this.features){return Ext.Array.findBy(this.features,function(feature){if(feature.ftype===ftype){return!0}})}},initFeatures:function(grid){var me=this,features,feature,i,len;me.tpl=this.lookupTpl('tpl');me.rowTpl=me.lookupTpl('rowTpl');me.addRowTpl(me.lookupTpl('outerRowTpl'));me.cellTpl=me.lookupTpl('cellTpl');me.featuresMC=new Ext.util.MixedCollection();features=me.features=me.constructFeatures();for(i=0,len=features?features.length:0;i<len;i++){feature=features[i];feature.view=me;feature.grid=grid;me.featuresMC.add(feature);feature.init(grid)}},renderTHead:function(values,out,parent){var headers=values.view.headerFns,len,i;if(headers){for(i=0,len=headers.length;i<len;++i){headers[i].call(this,values,out,parent)}}},addHeaderFn:function(fn){var headers=this.headerFns;if(!headers){headers=this.headerFns=[]}
headers.push(fn)},renderTFoot:function(values,out,parent){var footers=values.view.footerFns,len,i;if(footers){for(i=0,len=footers.length;i<len;++i){footers[i].call(this,values,out,parent)}}},addFooterFn:function(fn){var footers=this.footerFns;if(!footers){footers=this.footerFns=[]}
footers.push(fn)},addTpl:function(newTpl){return this.insertTpl('tpl',newTpl)},addRowTpl:function(newTpl){return this.insertTpl('rowTpl',newTpl)},addCellTpl:function(newTpl){return this.insertTpl('cellTpl',newTpl)},insertTpl:function(which,newTpl){var me=this,tpl,prevTpl;if(newTpl.isTemplate){newTpl=Ext.Object.chain(newTpl)}else{newTpl=new Ext.XTemplate('{%this.nextTpl.applyOut(values, out, parent);%}',newTpl)}
for(tpl=me[which];newTpl.priority<tpl.priority;tpl=tpl.nextTpl){prevTpl=tpl}
if(prevTpl){prevTpl.nextTpl=newTpl}else{me[which]=newTpl}
newTpl.nextTpl=tpl;return newTpl},tplApplyOut:function(values,out,parent){if(this.before){if(this.before(values,out,parent)===!1){return}}
this.nextTpl.applyOut(values,out,parent);if(this.after){this.after(values,out,parent)}},constructFeatures:function(){var me=this,features=me.features,feature,result,i,len;if(features){result=[];for(i=0,len=features.length;i<len;i++){feature=features[i];if(!feature.isFeature){feature=Ext.create('feature.'+feature.ftype,feature)}
result[i]=feature}}
return result},beforeRender:function(){this.callParent();if(!this.enableTextSelection){this.protoEl.unselectable()}},updateScrollable:function(scrollable){var me=this,ownerGrid=me.grid.ownerGrid;if(!ownerGrid.lockable&&scrollable.isScroller&&scrollable!==ownerGrid.scrollable){ownerGrid.scrollable=scrollable}},afterComponentLayout:function(width,height,oldWidth,oldHeight){var me=this,ownerGrid=me.grid.ownerGrid;if(ownerGrid.mixins.lockable){ownerGrid.syncLockableLayout()}
me.callParent([width,height,oldWidth,oldHeight])},getElConfig:function(){var config=this.callParent();delete config['aria-hidden'];delete config['aria-disabled'];return config},onBindStore:function(store){var me=this,bufferedRenderer=me.bufferedRenderer;if(bufferedRenderer&&bufferedRenderer.store!==store){bufferedRenderer.bindStore(store)}
if(me.all&&me.all.getCount()&&!me.grid.reconfiguring){me.clearViewEl(!0)}
me.callParent(arguments)},onOwnerGridHide:function(){var scroller=this.getScrollable(),bufferedRenderer=this.bufferedRederer;if(scroller){scroller.suspendPartnerSync()}
if(bufferedRenderer){bufferedRenderer.disable()}},onOwnerGridShow:function(){var scroller=this.getScrollable(),bufferedRenderer=this.bufferedRederer;if(scroller){scroller.resumePartnerSync()}
if(bufferedRenderer){bufferedRenderer.enable()}},getStoreListeners:function(store){var me=this,result=me.callParent([store]),dataSource=me.dataSource;if(dataSource&&dataSource.isFeatureStore){delete result.add;delete result.remove}
if(me.bufferedRenderer){delete result.clear}
result.beforepageremove=me.beforePageRemove;return result},beforePageRemove:function(pageMap,pageNumber){var rows=this.all,pageSize=pageMap.getPageSize();if(rows.startIndex>=(pageNumber-1)*pageSize&&rows.endIndex<=(pageNumber*pageSize-1)){pageMap.get(pageNumber);return!1}},onViewScroll:function(scroller,x,y){if(!this.destroyed&&!this.ignoreScroll){this.callParent([scroller,x,y])}},createRowElement:function(record,index,updateColumns){var me=this,div=me.renderBuffer,tplData=me.collectData([record],index),result;tplData.columns=updateColumns;me.tpl.overwrite(div,tplData);me.cleanupData();result=div.dom.querySelector(me.getNodeContainerSelector()).firstChild;Ext.fly(result).saveTabbableState(me.saveTabOptions);return result},bufferRender:function(records,index){var me=this,div=me.renderBuffer,range=document.createRange?document.createRange():null,result;me.tpl.overwrite(div,me.collectData(records,index));me.cleanupData();div.saveTabbableState(me.saveTabOptions);div=div.dom.querySelector(me.getNodeContainerSelector());if(range){range.selectNodeContents(div);result=range.extractContents()}else{result=document.createDocumentFragment();while(div.firstChild){result.appendChild(div.firstChild)}}
return{fragment:result,children:Ext.Array.toArray(result.childNodes)}},collectData:function(records,startIndex){var me=this,tableValues=me.tableValues;me.rowValues.view=me;tableValues.view=me;tableValues.rows=records;tableValues.columns=null;tableValues.viewStartIndex=startIndex;tableValues.tableStyle='width:'+me.headerCt.getTableWidth()+'px';return tableValues},cleanupData:function(){var tableValues=this.tableValues;tableValues.view=tableValues.columns=tableValues.rows=this.rowValues.view=null},refreshSize:function(forceLayout){var me=this,bodySelector=me.getBodySelector(),lockingPartner=me.lockingPartner,restoreFocus;if(!me.actionableMode){restoreFocus=me.saveFocusState()}
if(bodySelector){me.body.attach(me.el.dom.querySelector(bodySelector))}
if(!me.hasLoadingHeight){Ext.suspendLayouts();me.callParent([forceLayout]);if(forceLayout||(me.hasVariableRowHeight()&&me.dataSource.getCount())){me.grid.updateLayout()}
Ext.resumeLayouts(!lockingPartner||!lockingPartner.grid.isVisible()||(lockingPartner.all.getCount()===me.all.getCount()));if(restoreFocus){restoreFocus()}}},isLayoutRoot:function(){return!1},clearViewEl:function(leaveNodeContainer){var me=this,nodeContainer;if(me.rendered){me.callParent();if(!leaveNodeContainer){nodeContainer=Ext.get(me.getNodeContainer());if(nodeContainer&&nodeContainer.dom!==me.getTargetEl().dom){nodeContainer.destroy()}}}},getRefItems:function(deep){var me=this,rowContexts=me.ownerGrid.liveRowContexts,isLocked=!!me.isLockedView,result=me.callParent([deep]),widgetCount,i,widgets,widget,recordId;for(recordId in rowContexts){widgets=rowContexts[recordId].getWidgets();widgetCount=widgets.length;for(i=0;i<widgetCount;i++){widget=widgets[i];if(isLocked===widget.$fromLocked){result[result.length]=widget;if(deep&&widget.getRefItems){result.push.apply(result,widget.getRefItems(!0))}}}}
return result},getMaskTarget:function(){return this.ownerCt.body},statics:{getBoundView:function(node){return Ext.getCmp(node.getAttribute('data-boundView'))}},getRecord:function(node){if(this.store.destroyed){return}
if(node.isModel){return node}
node=this.getNode(node);if(node){return this.dataSource.getByInternalId(node.getAttribute('data-recordId'))}},indexOf:function(node){node=this.getNode(node);if(!node&&node!==0){return-1}
return this.all.indexOf(node)},indexInStore:function(node){return node?this.dataSource.indexOf(this.getRecord(node)):-1},indexOfRow:function(record){var dataSource=this.dataSource,idx;if(record.isCollapsedPlaceholder){idx=dataSource.indexOfPlaceholder(record)}else{idx=dataSource.indexOf(record)}
return idx},renderRows:function(rows,columns,viewStartIndex,out){var me=this,rowValues=me.rowValues,rowCount=rows.length,i;rowValues.view=me;rowValues.columns=columns;rowValues.rowRole=me.rowAriaRole;me.cellValues.cellRole=me.cellAriaRole;for(i=0;i<rowCount;i++,viewStartIndex++){rowValues.itemClasses.length=rowValues.rowClasses.length=0;me.renderRow(rows[i],viewStartIndex,out)}
rowValues.view=rowValues.columns=rowValues.record=null},renderColumnSizer:function(values,out){var columns=values.columns||this.getGridColumns(),len=columns.length,i,column,width;out.push('<colgroup role="presentation">');for(i=0;i<len;i++){column=columns[i];width=column.cellWidth?column.cellWidth:Ext.grid.header.Container.prototype.defaultWidth;out.push('<col role="presentation" class="',Ext.baseCSSPrefix,'grid-cell-',columns[i].getItemId(),'" style="width:'+width+'px">')}
out.push('</colgroup>')},renderRow:function(record,rowIdx,out){var me=this,isMetadataRecord=rowIdx===-1,selModel=me.selectionModel,rowValues=me.rowValues,itemClasses=rowValues.itemClasses,rowClasses=rowValues.rowClasses,itemCls=me.itemCls,cls,rowTpl=me.rowTpl;rowValues.rowAttr={};rowValues.record=record;rowValues.recordId=record.internalId;rowValues.recordIndex=me.store.indexOf(record);rowValues.rowIndex=rowIdx;rowValues.rowId=me.getRowId(record);rowValues.itemCls=rowValues.rowCls='';if(!rowValues.columns){rowValues.columns=me.ownerCt.getVisibleColumnManager().getColumns()}
itemClasses.length=rowClasses.length=0;if(!isMetadataRecord){itemClasses[0]=itemCls;if(!me.ownerCt.disableSelection&&selModel.isRowSelected){if(selModel.isRowSelected(record)){itemClasses.push(me.selectedItemCls)}}
if(me.stripeRows&&rowIdx%2!==0){itemClasses.push(me.altRowCls)}
if(me.getRowClass){cls=me.getRowClass(record,rowIdx,null,me.dataSource);if(cls){rowClasses.push(cls)}}}
if(out){rowTpl.applyOut(rowValues,out,me.tableValues)}else{return rowTpl.apply(rowValues,me.tableValues)}},renderCell:function(column,record,recordIndex,rowIndex,columnIndex,out){var me=this,renderer=column.renderer,fullIndex,selModel=me.selectionModel,cellValues=me.cellValues,classes=cellValues.classes,fieldValue=record.data[column.dataIndex],cellTpl=me.cellTpl,enableTextSelection=column.enableTextSelection,value,clsInsertPoint,lastFocused=me.navigationModel.getPosition();if(enableTextSelection==null){enableTextSelection=me.enableTextSelection}
cellValues.record=record;cellValues.column=column;cellValues.recordIndex=recordIndex;cellValues.rowIndex=rowIndex;cellValues.columnIndex=cellValues.cellIndex=columnIndex;cellValues.align=column.textAlign;cellValues.innerCls=column.innerCls;cellValues.tdCls=cellValues.tdStyle=cellValues.tdAttr=cellValues.style="";cellValues.unselectableAttr=enableTextSelection?'':'unselectable="on"';classes[1]=column.getCellId();clsInsertPoint=2;if(renderer&&renderer.call){fullIndex=renderer.length>4?me.ownerCt.columnManager.getHeaderIndex(column):columnIndex;value=renderer.call(column.usingDefaultRenderer?column:column.scope||me.ownerCt,fieldValue,cellValues,record,recordIndex,fullIndex,me.dataSource,me);if(cellValues.css){record.cssWarning=!0;cellValues.tdCls+=' '+cellValues.css;cellValues.css=null}
if(cellValues.tdCls){classes[clsInsertPoint++]=cellValues.tdCls}}else{value=fieldValue}
cellValues.value=(value==null||value.length===0)?column.emptyCellText:value;if(column.tdCls){classes[clsInsertPoint++]=column.tdCls}
if(me.markDirty&&record.dirty&&record.isModified(column.dataIndex)){classes[clsInsertPoint++]=me.dirtyCls;if(column.dirtyTextElementId){cellValues.tdAttr=(cellValues.tdAttr?cellValues.tdAttr+' ':'')+'aria-describedby="'+column.dirtyTextElementId+'"'}}
if(column.isFirstVisible){classes[clsInsertPoint++]=me.firstCls}
if(column.isLastVisible){classes[clsInsertPoint++]=me.lastCls}
if(!enableTextSelection){classes[clsInsertPoint++]=me.unselectableCls}
if(selModel&&(selModel.isCellModel||selModel.isSpreadsheetModel)&&selModel.isCellSelected(me,recordIndex,column)){classes[clsInsertPoint++]=me.selectedCellCls}
if(lastFocused&&lastFocused.record.id===record.id&&lastFocused.column===column){classes[clsInsertPoint++]=me.focusedItemCls}
classes.length=clsInsertPoint;cellValues.tdCls=classes.join(' ');cellTpl.applyOut(cellValues,out);cellValues.column=cellValues.record=null},getRow:function(nodeInfo){var me=this,rowSelector=me.rowSelector;if((!nodeInfo&&nodeInfo!==0)||!me.rendered){return null}
if(Ext.isString(nodeInfo)){nodeInfo=Ext.getDom(nodeInfo);return nodeInfo&&nodeInfo.querySelectorAll(rowSelector)[0]}
if(Ext.isNumber(nodeInfo)){nodeInfo=me.all.item(nodeInfo,!0);return nodeInfo&&nodeInfo.querySelectorAll(rowSelector)[0]}
if(nodeInfo.isModel){return me.getRowByRecord(nodeInfo)}
nodeInfo=Ext.fly(nodeInfo.target||nodeInfo);if(nodeInfo.is(me.itemSelector)){return me.getRowFromItem(nodeInfo)}
return nodeInfo.findParent(rowSelector,me.getTargetEl())},getRowId:function(record){return this.id+'-record-'+record.internalId},constructRowId:function(internalId){return this.id+'-record-'+internalId},getNodeById:function(id){id=this.constructRowId(id);return this.retrieveNode(id,!1)},getRowById:function(id){id=this.constructRowId(id);return this.retrieveNode(id,!0)},getNodeByRecord:function(record){return this.retrieveNode(this.getRowId(record),!1)},getRowByRecord:function(record){return this.retrieveNode(this.getRowId(record),!0)},getRowFromItem:function(item){var rows=Ext.getDom(item).tBodies[0].childNodes,len=rows.length,i;for(i=0;i<len;i++){if(Ext.fly(rows[i]).is(this.rowSelector)){return rows[i]}}},retrieveNode:function(id,dataRow){var result=this.el.getById(id,!0);if(dataRow&&result){return result.querySelector(this.rowSelector,!0)}
return result},updateIndexes:Ext.emptyFn,bodySelector:'div.'+Ext.baseCSSPrefix+'grid-item-container',nodeContainerSelector:'div.'+Ext.baseCSSPrefix+'grid-item-container',itemSelector:'table.'+Ext.baseCSSPrefix+'grid-item',rowSelector:'tr.'+Ext.baseCSSPrefix+'grid-row',cellSelector:'td.'+Ext.baseCSSPrefix+'grid-cell',sizerSelector:'.'+Ext.baseCSSPrefix+'grid-cell',innerSelector:'div.'+Ext.baseCSSPrefix+'grid-cell-inner',getBodySelector:function(){return this.bodySelector},getColumnSizerSelector:function(header){var selector=this.sizerSelector+'-'+header.getItemId();return'td'+selector+',col'+selector},getItemSelector:function(){return this.itemSelector},getCellSelector:function(header){return header?header.getCellSelector():this.cellSelector},getCellInnerSelector:function(header){return this.getCellSelector(header)+' '+this.innerSelector},addRowCls:function(rowInfo,cls){var row=this.getRow(rowInfo);if(row){Ext.fly(row).addCls(cls)}},removeRowCls:function(rowInfo,cls){var row=this.getRow(rowInfo);if(row){Ext.fly(row).removeCls(cls)}},onRowSelect:function(rowIdx){var me=this,rowNode;me.addItemCls(rowIdx,me.selectedItemCls);rowNode=me.getRow(rowIdx);if(rowNode){rowNode.setAttribute('aria-selected',!0)}
if(Ext.isIE8){me.repaintBorder(rowIdx+1)}},onRowDeselect:function(rowIdx){var me=this,rowNode;me.removeItemCls(rowIdx,me.selectedItemCls);rowNode=me.getRow(rowIdx);if(rowNode){rowNode.removeAttribute('aria-selected')}
if(Ext.isIE8){me.repaintBorder(rowIdx+1)}},onCellSelect:function(position){var cell=this.getCellByPosition(position,!0);if(cell){Ext.fly(cell).addCls(this.selectedCellCls);cell.setAttribute('aria-selected',!0)}},onCellDeselect:function(position){var cell=this.getCellByPosition(position,!0);if(cell){Ext.fly(cell).removeCls(this.selectedCellCls);cell.removeAttribute('aria-selected')}},getCellInclusive:function(position,returnDom){var header,row,cell;if(position){row=this.getRow(position.row);header=this.ownerCt.getColumnManager().getHeaderAtIndex(position.column);if(header&&row){cell=row.querySelector(this.getCellSelector(header));return returnDom?cell:Ext.get(cell)}}
return!1},getColumnByPosition:function(position){var view,column;if(position){column=position.column;if(column&&!column.destroyed&&column.isColumn){return column}else{view=position.view||this;column=typeof column==='number'?column:position.colIdx;return view.getVisibleColumnManager().getHeaderAtIndex(column)}}
return!1},getCellByPosition:function(position,returnDom){var view,row,header,cell;if(position){view=position.view||this;row=view.getRow(position.record||position.row);header=view.getColumnByPosition(position);if(header&&row){cell=row.querySelector(view.getCellSelector(header));return returnDom?cell:Ext.get(cell)}}
return!1},onFocusEnter:function(e){var me=this,fromComponent=e.fromComponent,navigationModel=me.getNavigationModel(),focusPosition,cell,focusTarget;if(me.containsFocus){return Ext.Component.prototype.onFocusEnter.call(me,e)}
if(me.actionableMode){if(me.actionPosition){me.el.dom.setAttribute('tabIndex','-1');me.cellFocused=!0;return}
me.ownerGrid.setActionableMode(!1)}
e=e.event;if(!me.cellFocused&&me.all.getCount()&&me.dataSource.getCount()){focusTarget=e.getTarget();if(focusTarget===me.el.dom){if(me.lastFocused==='scrollbar'){if(e.relatedTarget&&e.relatedTarget.focus){e.relatedTarget.focus()}
return}
focusPosition=me.getDefaultFocusPosition(fromComponent);if(!focusPosition){e.stopEvent();me.el.focus();return}
focusTarget=null}else if(focusTarget===me.tabGuardEl){focusPosition=new Ext.grid.CellContext(me).setPosition(me.all.endIndex,me.getVisibleColumnManager().getColumns().length-1);focusTarget=null}else if(cell=e.getTarget(me.getCellSelector())){if(focusTarget===cell){focusPosition=new Ext.grid.CellContext(me).setPosition(me.getRecord(focusTarget),me.getHeaderByCell(cell));focusTarget=null}else if(focusTarget&&Ext.fly(focusTarget).isFocusable()&&me.el.contains(focusTarget)){focusPosition=new Ext.grid.CellContext(me).setPosition(me.getRecord(focusTarget),me.getHeaderByCell(cell))}}}
if(focusPosition){me.toggleChildrenTabbability(!1);if(focusTarget){focusPosition.target=focusTarget;if(me.ownerGrid.setActionableMode(!0,focusPosition)){focusPosition=null}}
if(focusPosition){navigationModel.setPosition(focusPosition,null,e,null,!0)}
me.cellFocused=me.el.contains(Ext.Element.getActiveElement());if(me.cellFocused){me.el.dom.setAttribute('tabIndex','-1')}}
Ext.Component.prototype.onFocusEnter.call(me,e)},onFocusLeave:function(e){var me=this,isLeavingGrid;if(!me.destroying&&!me.refreshing){isLeavingGrid=!me.lockingPartner||!e.toComponent||(e.toComponent!==me.lockingPartner&&!me.lockingPartner.isAncestor(e.toComponent));if(me.cellFocused){if(isLeavingGrid){me.getNavigationModel().setPosition(null,null,e.event,null,!0)}
me.cellFocused=!1;me.focusEl=me.el;me.focusEl.dom.setAttribute('tabIndex',0)}
if(isLeavingGrid){if(me.ownerGrid.actionableMode){me.lastFocused=me.actionPosition;me.ownerGrid.setActionableMode(!1)}}else{me.actionPosition=null}
Ext.Component.prototype.onFocusLeave.call(me,e)}},onRowFocus:function(rowIdx,highlight,suppressFocus){var me=this;if(highlight){me.addItemCls(rowIdx,me.focusedItemCls);if(!suppressFocus){me.focusRow(rowIdx)}}else{me.removeItemCls(rowIdx,me.focusedItemCls)}
if(Ext.isIE8){me.repaintBorder(rowIdx+1)}},focusRow:function(row,delay){var me=this,focusTask=me.getFocusTask();if(delay){focusTask.delay(Ext.isNumber(delay)?delay:10,me.focusRow,me,[row,!1]);return}
focusTask.cancel();if(me.isVisible(!0)){me.getNavigationModel().setPosition(me.getRecord(row))}},focusNode:function(row,delay){this.focusRow(row,delay)},scrollRowIntoView:function(row,animate){row=this.getRow(row);if(row){this.scrollElIntoView(row,!1,animate)}},focusCell:function(position,delay){var me=this,focusTask=me.getFocusTask(),cell;if(delay){focusTask.delay(Ext.isNumber(delay)?delay:10,me.focusCell,me,[position,!1]);return}
focusTask.cancel();if(me.isVisible(!0)&&(cell=me.getCellByPosition(position))){me.getNavigationModel().setPosition(position)}},findFocusPosition:function(from,currentPosition,forward,keyEvent){var me=this,cell=currentPosition.cellElement,actionables=me.ownerGrid.actionables,len=actionables.length,position,tabbableChildren,focusTarget,i;position=currentPosition.clone();tabbableChildren=Ext.fly(cell).findTabbableElements();focusTarget=tabbableChildren[Ext.Array.indexOf(tabbableChildren,from)+(forward?1:-1)];while(!focusTarget&&(cell=cell[forward?'nextSibling':'previousSibling'])){position.setColumn(me.getHeaderByCell(cell));for(i=0;i<len;i++){actionables[i].activateCell(position)}
cell=position.getCell(!0);if(cell&&(tabbableChildren=Ext.fly(cell).findTabbableElements()).length){focusTarget=tabbableChildren[forward?0:tabbableChildren.length-1]}}
return{target:focusTarget,position:position}},getDefaultFocusPosition:function(fromComponent){var me=this,store=me.dataSource,focusPosition=me.lastFocused,newPosition=new Ext.grid.CellContext(me).setPosition(0,0),targetCell,scroller;if(fromComponent){if(fromComponent.isColumn&&fromComponent.cellFocusable!==!1){if(!focusPosition){focusPosition=newPosition}
focusPosition.setColumn(fromComponent);focusPosition.setView(fromComponent.getView())}else if(fromComponent.isTableView&&fromComponent.lastFocused&&fromComponent.ownerGrid===me.ownerGrid){focusPosition=new Ext.grid.CellContext(me).setPosition(fromComponent.lastFocused.record,0)}}
if(focusPosition){scroller=me.getScrollable();if(!store.contains(focusPosition.record)||(scroller&&!scroller.isInView(focusPosition.getRow(!0)).y)){focusPosition.setRow(store.getAt(Math.min(focusPosition.rowIdx,store.getCount()-1)))}}else{focusPosition=newPosition;targetCell=me.el.dom.querySelector(me.getCellSelector()+'[tabIndex="-1"]');if(targetCell){focusPosition.setPosition(me.getRecord(targetCell),me.getHeaderByCell(targetCell))}else{focusPosition=null}}
return focusPosition},getLastFocused:function(){var me=this,lastFocused=me.lastFocused;if(lastFocused&&lastFocused.record&&lastFocused.column){if(me.dataSource.indexOf(lastFocused.record)!==-1&&me.getVisibleColumnManager().indexOf(lastFocused.column)!==-1&&me.getNode(lastFocused.record)){return lastFocused}}},scrollCellIntoView:function(cell,animate){if(cell.isCellContext){cell=this.getCellByPosition(cell)}
if(cell){this.scrollElIntoView(cell,null,animate)}},scrollElIntoView:function(el,hscroll,animate){var scroller=this.getScrollable();if(scroller){scroller.ensureVisible(el,{animation:animate,x:hscroll})}},syncRowHeightBegin:function(){var me=this,itemEls=me.all,ln=itemEls.count,synchronizer=[],RowSynchronizer=Ext.grid.locking.RowSynchronizer,i,j,rowSync;for(i=0,j=itemEls.startIndex;i<ln;i++,j++){synchronizer[i]=rowSync=new RowSynchronizer(me,itemEls.elements[j]);rowSync.reset()}
return synchronizer},syncRowHeightClear:function(synchronizer){var me=this,itemEls=me.all,ln=itemEls.count,i;for(i=0;i<ln;i++){synchronizer[i].reset()}},syncRowHeightMeasure:function(synchronizer){var ln=synchronizer.length,i;for(i=0;i<ln;i++){synchronizer[i].measure()}},syncRowHeightFinish:function(synchronizer,otherSynchronizer){var ln=synchronizer.length,bufferedRenderer=this.bufferedRenderer,i;for(i=0;i<ln;i++){synchronizer[i].finish(otherSynchronizer[i])}
if(bufferedRenderer){bufferedRenderer.syncRowHeightsFinish()}},refreshNode:function(record){if(Ext.isNumber(record)){record=this.store.getAt(record)}
this.handleUpdate(this.dataSource,record,null,null,null,!0)},handleUpdate:function(store,record,operation,changedFieldNames,info,allColumns){var me=this,recordIndex=me.store.indexOf(record),rowTpl=me.rowTpl,markDirty=me.markDirty,dirtyCls=me.dirtyCls,columnsToUpdate=[],hasVariableRowHeight=me.variableRowHeight,updateTypeFlags=0,ownerCt=me.ownerCt,cellFly=me.cellFly||(me.self.prototype.cellFly=new Ext.dom.Fly()),oldItemDom,oldDataRow,newItemDom,newAttrs,attLen,attName,attrIndex,overItemCls,columns,column,len,i,cellUpdateFlag,cell,fieldName,value,clearDirty,defaultRenderer,scope,elData,emptyValue;operation=operation||Ext.data.Model.EDIT;clearDirty=operation!==Ext.data.Model.EDIT;if(me.viewReady){me.updatingRows=!0;oldItemDom=me.getNodeByRecord(record);if(oldItemDom){if(record.isCollapsedPlaceholder){Ext.fly(oldItemDom).syncContent(me.createRowElement(record,me.indexOfRow(record)));return}
overItemCls=me.overItemCls;columns=me.ownerCt.getVisibleColumnManager().getColumns();if(allColumns){columnsToUpdate=columns;updateTypeFlags=1}else{for(i=0,len=columns.length;i<len;i++){column=columns[i];if(column.preventUpdate){cell=oldItemDom.querySelector(column.getCellSelector());if(cell&&!clearDirty&&markDirty){cellFly.attach(cell);if(record.isModified(column.dataIndex)){cellFly.addCls(dirtyCls);if(column.dirtyTextElementId){cell.setAttribute('aria-describedby',column.dirtyTextElementId)}}else{cellFly.removeCls(dirtyCls);cell.removeAttribute('aria-describedby')}}}else{cellUpdateFlag=me.shouldUpdateCell(record,column,changedFieldNames);if(cellUpdateFlag){updateTypeFlags=updateTypeFlags|cellUpdateFlag;columnsToUpdate[columnsToUpdate.length]=column;hasVariableRowHeight=hasVariableRowHeight||column.variableRowHeight}}}}
if(me.hasListeners.beforeitemupdate){me.fireEvent('beforeitemupdate',record,recordIndex,oldItemDom,columnsToUpdate)}
if(me.getRowClass||!me.getRowFromItem(oldItemDom)||(updateTypeFlags&1)||(oldItemDom.tBodies[0].childNodes.length>1)){elData=oldItemDom._extData;newItemDom=me.createRowElement(record,me.indexOfRow(record),columnsToUpdate);if(Ext.fly(oldItemDom,'_internal').hasCls(overItemCls)){Ext.fly(newItemDom).addCls(overItemCls)}
if(Ext.isIE9m&&oldItemDom.mergeAttributes){oldItemDom.mergeAttributes(newItemDom,!0)}else{newAttrs=newItemDom.attributes;attLen=newAttrs.length;for(attrIndex=0;attrIndex<attLen;attrIndex++){attName=newAttrs[attrIndex].name;value=newAttrs[attrIndex].value;if(attName!=='id'&&oldItemDom.getAttribute(attName)!==value){oldItemDom.setAttribute(attName,value)}}}
if(elData){elData.isSynchronized=!1}
if(columns.length&&(oldDataRow=me.getRow(oldItemDom))){me.updateColumns(oldDataRow,newItemDom.querySelector(me.rowSelector),columnsToUpdate,record)}
while(rowTpl){if(rowTpl.syncContent){if(rowTpl.syncContent(oldItemDom,newItemDom,changedFieldNames?columnsToUpdate:null)===!1){break}}
rowTpl=rowTpl.nextTpl}}else{for(i=0,len=columnsToUpdate.length;i<len;i++){column=columnsToUpdate[i];fieldName=column.dataIndex;value=record.get(fieldName);cell=oldItemDom.querySelector(column.getCellSelector());cellFly.attach(cell);if(!clearDirty&&markDirty){if(record.isModified(column.dataIndex)){cellFly.addCls(dirtyCls);if(column.dirtyTextElementId){cell.setAttribute('aria-describedby',column.dirtyTextElementId)}}else{cellFly.removeCls(dirtyCls);cell.removeAttribute('aria-describedby')}}
defaultRenderer=column.usingDefaultRenderer;scope=defaultRenderer?column:column.scope;if(column.updater){Ext.callback(column.updater,scope,[cell,value,record,me,me.dataSource],0,column,ownerCt)}else{if(column.renderer){value=Ext.callback(column.renderer,scope,[value,null,record,0,0,me.dataSource,me],0,column,ownerCt)}
emptyValue=value==null||value.length===0;value=emptyValue?column.emptyCellText:value;if(column.producesHTML||emptyValue){cell.querySelector(me.innerSelector).innerHTML=value}else{cell.querySelector(me.innerSelector).childNodes[0].data=value}}
if(me.highlightClass){Ext.fly(cell).addCls(me.highlightClass);if(!me.changedCells){me.self.prototype.changedCells=[];me.prototype.clearChangedTask=new Ext.util.DelayedTask(me.clearChangedCells,me.prototype);me.clearChangedTask.delay(me.unhighlightDelay)}
me.changedCells.push({cell:cell,cls:me.highlightClass,expires:Ext.Date.now()+1000})}}}
if(clearDirty&&markDirty&&!record.dirty){Ext.fly(oldItemDom,'_internal').select('.'+dirtyCls).removeCls(dirtyCls).set({'aria-describedby':undefined})}
if(hasVariableRowHeight){Ext.suspendLayouts()}
if(me.hasListeners.itemupdate){me.fireEvent('itemupdate',record,recordIndex,oldItemDom,me)}
if(hasVariableRowHeight){me.ownerGrid.updateLayout();Ext.resumeLayouts(!0)}}
me.updatingRows=!1}},clearChangedCells:function(){var me=this,now=Ext.Date.now(),changedCell,i,len;for(i=0,len=me.changedCells.length;i<len;){changedCell=me.changedCells[i];if(changedCell.expires<=now){Ext.fly(changedCell.cell).removeCls(changedCell.highlightClass);Ext.Array.erase(me.changedCells,i,1);len--}else{break}}
if(len){me.clearChangedTask.delay(me.unhighlightDelay)}},updateColumns:function(oldRow,newRow,columnsToUpdate,record){var me=this,cellSelector=me.getCellSelector(),colCount=columnsToUpdate.length,newAttrs,attLen,attName,attrIndex,colIndex,column,oldCell,newCell,elData,value;if(oldRow.mergeAttributes){oldRow.mergeAttributes(newRow,!0)}else{newAttrs=newRow.attributes;attLen=newAttrs.length;for(attrIndex=0;attrIndex<attLen;attrIndex++){attName=newAttrs[attrIndex].name;value=newAttrs[attrIndex].value;if(attName!=='id'&&oldRow.getAttribute(attName)!==value){oldRow.setAttribute(attName,value)}}}
elData=oldRow._extData;if(elData){elData.isSynchronized=!1}
for(colIndex=0;colIndex<colCount;colIndex++){column=columnsToUpdate[colIndex];cellSelector=me.getCellSelector(column);oldCell=oldRow.querySelector(cellSelector);newCell=newRow.querySelector(cellSelector);newAttrs=newCell.attributes;attLen=newAttrs.length;for(attrIndex=0;attrIndex<attLen;attrIndex++){attName=newAttrs[attrIndex].name;value=newAttrs[attrIndex].value;if(attName!=='id'&&oldCell.getAttribute(attName)!==value){oldCell.setAttribute(attName,value)}}
elData=oldCell._extData;if(elData){elData.isSynchronized=!1}
me.oldCellFly.attach(oldCell.querySelector(me.innerSelector)).syncContent(newCell.querySelector(me.innerSelector));if(record&&column.onItemAdd){column.onItemAdd([record])}}},shouldUpdateCell:function(record,column,changedFieldNames){return column.shouldUpdateCell(record,changedFieldNames)},refresh:function(){var me=this;if(me.destroying){return}
if(me.getVisibleColumnManager().getColumns().length){me.callParent(arguments);me.headerCt.setSortState()}else{if(me.refreshCounter){me.clearViewEl(!0)}
me.addEmptyText()}},processContainerEvent:function(e){var cmp=Ext.Component.from(e.target.parentNode);if(cmp&&cmp.up(this.ownerCt)){return!1}},processItemEvent:function(record,item,rowIndex,e){var me=this,self=me.self,map=self.EventMap,type=e.type,features=me.features,len=features.length,i,cellIndex,result,feature,column,eventPosition=e.position=me.eventPosition||(me.eventPosition=new Ext.grid.CellContext()),row,cell;if(Ext.isIE&&type==='mouseup'&&!e.within(me.el)){return!1}
if(me.indexInStore(item)!==-1){row=eventPosition.rowElement=item.querySelector(me.rowSelector);cell=e.getTarget(me.getCellSelector(),row);type=self.TouchEventMap[type]||type;if(cell){if(!cell.parentNode){return!1}
column=me.getHeaderByCell(cell);if(column){cellIndex=me.ownerCt.getColumnManager().getHeaderIndex(column)}else{column=cell=null;cellIndex=-1}}else{cellIndex=-1}
eventPosition.setAll(me,rowIndex,column?me.getVisibleColumnManager().getHeaderIndex(column):-1,record,column);eventPosition.cellElement=cell;result=me.fireEvent('uievent',type,me,cell,rowIndex,cellIndex,e,record,row);if((result===!1||me.callParent(arguments)===!1)){return!1}
for(i=0;i<len;++i){feature=features[i];if(feature.wrapsItem){if(feature.vetoEvent(record,row,rowIndex,e)===!1){me.processSpecialEvent(e);return!1}}}
if(cell&&type!=='mouseover'&&type!=='mouseout'){result=!((me['onBeforeCell'+map[type]](cell,cellIndex,record,row,rowIndex,e)===!1)||(me.fireEvent('beforecell'+type,me,cell,cellIndex,record,row,rowIndex,e)===!1)||(me['onCell'+map[type]](cell,cellIndex,record,row,rowIndex,e)===!1)||(me.fireEvent('cell'+type,me,cell,cellIndex,record,row,rowIndex,e)===!1))}
if(result!==!1){result=me.fireEvent('row'+type,me,record,row,rowIndex,e)}
return result}else{me.processSpecialEvent(e);if(e.pointerType==='mouse'){e.preventDefault()}
return!1}},processSpecialEvent:function(e){var me=this,features=me.features,ln=features.length,type=e.type,i,feature,prefix,featureTarget,beforeArgs,args,panel=me.ownerCt;me.callParent(arguments);if(type==='mouseover'||type==='mouseout'){return}
type=me.self.TouchEventMap[type]||type;for(i=0;i<ln;i++){feature=features[i];if(feature.hasFeatureEvent){featureTarget=e.getTarget(feature.eventSelector,me.getTargetEl());if(featureTarget){prefix=feature.eventPrefix;beforeArgs=feature.getFireEventArgs('before'+prefix+type,me,featureTarget,e);args=feature.getFireEventArgs(prefix+type,me,featureTarget,e);if((me.fireEvent.apply(me,beforeArgs)===!1)||(panel.fireEvent.apply(panel,beforeArgs)===!1)||(me.fireEvent.apply(me,args)===!1)||(panel.fireEvent.apply(panel,args)===!1)){return!1}}}}
return!0},onCellMouseDown:Ext.emptyFn,onCellLongPress:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onCellKeyUp:Ext.emptyFn,onCellKeyPress:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellLongPress:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,onBeforeCellKeyUp:Ext.emptyFn,onBeforeCellKeyPress:Ext.emptyFn,expandToFit:function(header){this.autoSizeColumn(header)},autoSizeColumn:function(header){if(Ext.isNumber(header)){header=this.getGridColumns()[header]}
if(header){if(header.isGroupHeader){header.autoSize();return}
delete header.flex;header.setWidth(this.getMaxContentWidth(header))}},getMaxContentWidth:function(header){var me=this,cells=me.getHeaderCells(header),originalWidth=header.getWidth(),columnSizers=me.getColumnResizers(header),ln=cells.length,max=Math.max,widthAdjust=0,i,maxWidth;if(ln>0){if(Ext.supports.ScrollWidthInlinePaddingBug){widthAdjust+=me.getCellPaddingAfter(cells[0])}
if(me.columnLines){widthAdjust+=Ext.fly(cells[0].parentNode).getBorderWidth('lr')}}
for(i=0;i<columnSizers.length;i++){columnSizers[i].setWidth(1)}
header.textEl.setStyle({"text-overflow":'clip',display:'table-cell'});maxWidth=header.textEl.dom.offsetWidth+header.titleEl.getPadding('lr');header.textEl.setStyle({"text-overflow":'',display:''});for(i=0;i<ln;i++){maxWidth=max(maxWidth,cells[i].scrollWidth)}
maxWidth+=widthAdjust;maxWidth=max(maxWidth+1,40);for(i=0;i<columnSizers.length;i++){columnSizers[i].setWidth(originalWidth)}
return maxWidth},getColumnResizers:function(header){var me=this,features=me.features||[],resizers=[me.body.select(me.getColumnSizerSelector(header))],featureSizer,i;for(i=0;i<features.length;i++){featureSizer=features[i].columnSizer;if(featureSizer){resizers.push(featureSizer.select(me.getColumnSizerSelector(header)))}}
return resizers},getHeaderCells:function(header){var me=this,features=me.features||[],headerCells=me.el.query(header.getCellInnerSelector()),featureSizer,i;for(i=0;i<features.length;i++){featureSizer=features[i].columnSizer;if(featureSizer){headerCells=headerCells.concat(featureSizer.query(header.getCellInnerSelector()))}}
return headerCells},getPositionByEvent:function(e){var me=this,cellNode=e.getTarget(me.cellSelector),rowNode=e.getTarget(me.itemSelector),record=me.getRecord(rowNode),header=me.getHeaderByCell(cellNode);return me.getPosition(record,header)},getHeaderByCell:function(cell){if(cell){return this.ownerGrid.getVisibleColumnManager().getHeaderById(Ext.getDom(cell).getAttribute('data-columnId'))}
return!1},walkCells:function(pos,direction,verifierFn,scope){var me=this,result=pos.clone(),lockingPartner=me.lockingPartner&&me.lockingPartner.grid.isVisible()?me.lockingPartner:null,rowIdx=pos.rowIdx,maxRowIdx=me.dataSource.getCount()-1,columns=me.ownerCt.getVisibleColumnManager().getColumns();switch(direction.toLowerCase()){case 'right':if(pos.isLastColumn()){rowIdx=lockingPartner&&me.isLockedView?rowIdx:rowIdx+1;if(rowIdx>maxRowIdx){return!1}
if(lockingPartner){result.view=lockingPartner}
result.setPosition(rowIdx,0)}else{result.navigate(+1)}
break;case 'left':if(pos.isFirstColumn()){rowIdx=lockingPartner&&me.isNormalView?rowIdx:rowIdx-1;if(rowIdx<0){return!1}
if(lockingPartner){result.view=lockingPartner;columns=lockingPartner.getVisibleColumnManager().getColumns()}
result.setPosition(rowIdx,columns[columns.length-1])}else{result.navigate(-1)}
break;case 'up':if(rowIdx===0){return!1}else{result.setRow(rowIdx-1)}
break;case 'down':if(rowIdx===maxRowIdx){return!1}else{result.setRow(rowIdx+1)}
break}
if(verifierFn&&verifierFn.call(scope||me,result)!==!0){return!1}
return result},walkRows:function(startRow,distance){var me=this,store=me.dataSource,moved=0,lastValid=startRow,node,limit=(distance<0)?0:store.getCount()-1,increment=limit?1:-1,result=startRow;do{if(limit?result>=limit:result<=limit){return lastValid||limit}
result+=increment;if((node=Ext.fly(me.getRow(result)))&&node.isVisible(!0)){moved+=increment;lastValid=result}}while(moved!==distance);return result},walkRecs:function(startRec,distance){var me=this,store=me.dataSource,moved=0,lastValid=startRec,limit=(distance<0)?0:(store.isBufferedStore?store.getTotalCount():store.getCount())-1,increment=limit?1:-1,testIndex=store.indexOf(startRec),node,rec;do{if(limit?testIndex>=limit:testIndex<=limit){return lastValid}
testIndex+=increment;rec=store.getAt(testIndex);if(!rec.isCollapsedPlaceholder&&(node=Ext.fly(me.getNodeByRecord(rec)))&&node.isVisible(!0)){moved+=increment;lastValid=rec}}while(moved!==distance);return lastValid},getFirstVisibleRowIndex:function(){var me=this,result=me.indexOf(me.all.first())-1,count;count=me.dataSource.isBufferedStore?me.dataSource.getTotalCount():me.dataSource.getCount();do{result+=1;if(result===count){return}}while(!Ext.fly(me.getRow(result)).isVisible(!0));return result},getLastVisibleRowIndex:function(){var me=this,result=me.indexOf(me.all.last());do{result-=1;if(result===-1){return}}while(!Ext.fly(me.getRow(result)).isVisible(!0));return result},getHeaderCt:function(){return this.headerCt},getPosition:function(record,header){return new Ext.grid.CellContext(this).setPosition(record,header)},doDestroy:function(){var me=this,features=me.featuresMC,feature,i,len;me.bindStore(null);if(features){for(i=0,len=features.getCount();i<len;++i){feature=features.getAt(i);if(feature&&!feature.destroyed){feature.destroy()}}}
me.all.destroy();me.body.destroy();me.actionRowFly.destroy();me.callParent()},onReplace:function(store,startIndex,oldRecords,newRecords){var me=this,bufferedRenderer=me.bufferedRenderer,restoreFocus;if(me.rendered&&bufferedRenderer){restoreFocus=me.saveFocusState();bufferedRenderer.onReplace(store,startIndex,oldRecords,newRecords);restoreFocus()}else{me.callParent(arguments)}
me.setPendingStripe(startIndex)},onResize:function(width,height,oldWidth,oldHeight){var me=this,bufferedRenderer=me.bufferedRenderer;if(bufferedRenderer){bufferedRenderer.onViewResize(me,width,height,oldWidth,oldHeight)}
me.callParent([width,height,oldWidth,oldHeight])},onAdd:function(store,records,index){var me=this,bufferedRenderer=me.bufferedRenderer;me.addingRows=!0;if(me.rendered&&bufferedRenderer&&(bufferedRenderer.bodyTop||me.dataSource.getCount()+records.length>=bufferedRenderer.viewSize)){bufferedRenderer.onReplace(store,index,[],records)}else{me.callParent(arguments)}
me.setPendingStripe(index);me.addingRows=!1},onRemove:function(store,records,index){var me=this,bufferedRenderer=me.bufferedRenderer,restoreFocus;if(me.rendered&&bufferedRenderer&&me.dataSource.getCount()+records.length>=bufferedRenderer.viewSize){restoreFocus=me.saveFocusState();bufferedRenderer.onReplace(store,index,records,[]);restoreFocus()}else{me.callParent(arguments)}
if(me.actionPosition&&Ext.Array.indexOf(records,me.actionPosition.record)!==-1){me.actionPosition=null}
me.setPendingStripe(index)},saveFocusState:function(){var me=this,store=me.dataSource,actionableMode=me.actionableMode,navModel=me.getNavigationModel(),focusPosition=actionableMode?me.actionPosition:navModel.getPosition(!0),activeElement=Ext.fly(Ext.Element.getActiveElement()),focusCell=focusPosition&&focusPosition.view===me&&Ext.fly(focusPosition.getCell(!0)),refocusRow,refocusCol,record;if(!me.skipSaveFocusState&&focusCell&&focusCell.contains(activeElement)){focusPosition=focusPosition.clone();activeElement.suspendFocusEvents();if(actionableMode&&focusCell.dom!==activeElement.dom){me.suspendActionableMode()}else{actionableMode=!1;navModel.setPosition()}
activeElement.resumeFocusEvents();if(store.isExpandingOrCollapsing){return Ext.emptyFn}
return function(){var all;store=me.dataSource;if(store.getCount()){all=me.all;refocusRow=Math.min(Math.max(focusPosition.rowIdx,all.startIndex),all.endIndex);refocusCol=Math.min(focusPosition.colIdx,me.getVisibleColumnManager().getColumns().length-1);record=focusPosition.record;focusPosition=new Ext.grid.CellContext(me).setPosition(record&&store.contains(record)&&!record.isCollapsedPlaceholder?record:refocusRow,refocusCol);if(focusPosition.getCell(!0)){if(actionableMode){me.resumeActionableMode(focusPosition)}else{navModel.setPosition(focusPosition,null,null,null,!0);if(!navModel.getPosition()){focusPosition.column.focus()}}}}else{focusPosition.column.focus()}}}
return Ext.emptyFn},onDataRefresh:function(store){var me=this,owner=me.ownerCt;if(owner&&owner.isCollapsingOrExpanding===2){owner.on('expand',me.onDataRefresh,me,{single:!0});return}
me.callParent([store])},getViewRange:function(){var me=this;if(me.bufferedRenderer){return me.bufferedRenderer.getViewRange()}
return me.callParent()},setPendingStripe:function(index){var current=this.stripeOnUpdate;if(current===null){current=index}else{current=Math.min(current,index)}
this.stripeOnUpdate=current},onEndUpdate:function(){var me=this,stripeOnUpdate=me.stripeOnUpdate,startIndex=me.all.startIndex;if(me.rendered&&(stripeOnUpdate||stripeOnUpdate===0)){if(stripeOnUpdate<startIndex){stripeOnUpdate=startIndex}
me.doStripeRows(stripeOnUpdate);me.stripeOnUpdate=null}
me.callParent(arguments)},doStripeRows:function(startRow,endRow){var me=this,rows,rowsLn,i,row;if(me.rendered&&me.stripeRows){rows=me.getNodes(startRow,endRow);for(i=0,rowsLn=rows.length;i<rowsLn;i++){row=rows[i];row.className=row.className.replace(me.rowClsRe,' ');startRow++;if(startRow%2===0){row.className+=(' '+me.altRowCls)}}}},hasActiveFeature:function(){return(this.isGrouping&&this.store.isGrouped())||this.isRowWrapped},getCellPaddingAfter:function(cell){return Ext.fly(cell).getPadding('r')},privates:{saveTabOptions:{skipSelf:!0,includeHidden:!0},collectNodes:function(targetEl){this.all.fill(this.getNodeContainer().childNodes,this.all.startIndex)},setActionableMode:function(enabled,position){var me=this,navModel=me.getNavigationModel(),actionables=me.grid.actionables,len=actionables.length,isActionable=!1,activeEl,record,column,lockingPartner,cell,i;if(me.actionableMode===enabled){if(!enabled||position.isEqual(me.actionPosition)){return!1}}
if(enabled){if(position&&(position.view===me||(position.view===(lockingPartner=me.lockingPartner)&&lockingPartner.actionableMode))){isActionable=me.activateCell(position)}
return isActionable}else{activeEl=Ext.fly(Ext.Element.getActiveElement());if(me.el.contains(activeEl)&&!Ext.fly(activeEl).is(me.getCellSelector())){record=(me.actionPosition&&me.actionPosition.record)||me.getRecord(activeEl);column=me.getHeaderByCell(activeEl.findParent(me.getCellSelector()));cell=position&&position.getCell(!0);if(!position||!cell){position=new Ext.grid.CellContext(me).setPosition(record||0,column||0);cell=position.getCell(!0)}
Ext.fly(cell).focus();activeEl=Ext.fly(Ext.Element.getActiveElement());if(!(me.el.contains(activeEl)&&activeEl.is(me.getCellSelector()))){position=null}}
for(i=0;i<len;i++){if(actionables[i].deactivate){actionables[i].deactivate()}}
if(me.actionRow){me.actionRow.saveTabbableState({skipSelf:!0,includeSaved:!1})}
if(me.destroyed){return!1}
me.actionableMode=me.ownerGrid.actionableMode=!1;me.actionPosition=navModel.actionPosition=me.actionRow=null;if(position){navModel.setPosition(position)}}},activateCell:function(position){var me=this,lockingPartner=position.view!==me?me.lockingPartner:null,actionables=me.grid.actionables,len=actionables.length,navModel=me.getNavigationModel(),focusTarget=position.target,record,prevRow,focusRow,focusCell,i,isActionable,tabbableChildren;position=position.clone();record=position.record;position.view.grid.ensureVisible(record,{column:position.column});focusRow=me.all.item(position.rowIdx,!0);if(me.actionPosition){prevRow=me.all.item(me.actionPosition.rowIdx,!0);if(prevRow&&focusRow!==prevRow){Ext.fly(prevRow).saveTabbableState({skipSelf:!0,includeSaved:!1})}}
me.activating=!0;if(!lockingPartner){focusCell=Ext.fly(position.getCell(!0));me.actionPosition=position;for(i=0;i<len;i++){isActionable=isActionable||actionables[i].activateCell(position,null,!0)}
focusCell=Ext.fly(position.getCell(!0))}
if(lockingPartner||(focusCell&&(focusCell.restoreTabbableState({skipSelf:!0}).length|(tabbableChildren=focusCell.findTabbableElements()).length))||isActionable){for(i=0;i<len;i++){if(actionables[i].activateRow){actionables[i].activateRow(focusRow)}}
if(lockingPartner||tabbableChildren.length){Ext.fly(focusRow).restoreTabbableState({skipSelf:!0});if(lockingPartner){me.actionableMode=!0;me.actionPosition=null;me.activating=!1;return!0}
if(tabbableChildren){me.actionRow=me.actionRowFly.attach(focusRow);me.actionableMode=me.ownerGrid.actionableMode=!0;navModel.setPosition();navModel.actionPosition=me.actionPosition=position;if(focusTarget&&Ext.Array.contains(tabbableChildren,focusTarget)){Ext.fly(focusTarget).focus()}else{Ext.fly(tabbableChildren[0]).focus()}
me.activating=!1;return!0}}}
me.activating=!1},suspendActionableMode:function(){var me=this,actionables=me.grid.actionables,len=actionables.length,i;for(i=0;i<len;i++){actionables[i].suspend()}},resumeActionableMode:function(position){var me=this,actionables=me.grid.actionables,len=actionables.length,i,activated;me.toggleChildrenTabbability(!1);for(i=0;i<len;i++){activated=activated||actionables[i].resume(position)}
if(!activated){me.activateCell(position)}},onRowExit:function(keyEvent,prevRow,newRow,forward,wrapDone){var me=this,direction=forward?'nextSibling':'previousSibling',lockingPartner=me.lockingPartner,rowIdx;if(lockingPartner&&lockingPartner.grid.isVisible()){rowIdx=me.all.indexOf(prevRow);if(forward){if(me.isNormalView){rowIdx++}}else if(me.isLockedView){rowIdx--}
me.actionPosition=null;me=lockingPartner;newRow=me.all.item(rowIdx,!0)}
if(!me.hasListeners.beforerowexit||me.fireEvent('beforerowexit',me,keyEvent,prevRow,newRow,forward)!==!1){me.findFirstActionableElement(keyEvent,newRow,direction,forward,wrapDone)}else{return!1}},findFirstActionableElement:function(keyEvent,focusRow,direction,forward,wrapDone){var me=this,columns=me.getVisibleColumnManager().getColumns(),columnCount=columns.length,actionables=me.grid.actionables,actionableCount=actionables.length,position=new Ext.grid.CellContext(me),focusCell,focusTarget,i,j,column,isActionable,tabbableChildren,prevRow;if(focusRow){position.setRow(focusRow);for(i=0;i<actionableCount;i++){if(actionables[i].activateRow){actionables[i].activateRow(focusRow)}}
for(i=(forward?0:columnCount-1);(forward?i<columnCount:i>-1)&&!focusTarget;i=i+(forward?1:-1)){column=columns[i];position.setColumn(column);focusCell=(focusRow.dom||focusRow).querySelector(position.column.getCellSelector());for(j=0;j<actionableCount;j++){isActionable=isActionable||actionables[j].activateCell(position)}
focusCell=Ext.fly(position.getCell(!0));if(focusCell){focusRow=position.getNode(!0);focusCell.restoreTabbableState({skipSelf:!0});if((tabbableChildren=focusCell.findTabbableElements()).length||isActionable){prevRow=me.actionRow&&me.actionRow.dom;me.actionRow=me.actionRowFly.attach(focusRow);me.actionRow.restoreTabbableState({skipSelf:!0});focusTarget=tabbableChildren[forward?0:tabbableChildren.length-1]}}}
if(focusTarget){me.actionPosition=me.getNavigationModel().actionPosition=position;Ext.fly(focusTarget).focus(Ext.asyncFocus?1:0);if(prevRow&&focusRow!==prevRow){Ext.fly(prevRow).saveTabbableState({skipSelf:!0,includeSaved:!1})}}else{me.onRowExit(keyEvent,focusRow,me.all.item(position.rowIdx+(forward?1:-1)),forward,wrapDone)}}else if(!wrapDone){me.grid.ensureVisible(forward?0:me.dataSource.getCount()-1,{callback:function(success,record,row){if(success){me.findFirstActionableElement(keyEvent,row,direction,forward,!0)}else{me.ownerGrid.setActionableMode(!1)}}})}else{me.ownerGrid.setActionableMode(!1)}},stretchHeight:function(height){var me=this,scroller=me.getScrollable(),stretchers=me.stretchers,shortfall;if(height&&me.tabGuardEl){if(stretchers){stretchers[0].style.marginTop=stretchers[1].style.marginTop=me.el.dom.style.height=0}
me.el.dom.style.height=scroller.constrainScrollRange(height)+'px';shortfall=height-me.el.dom.offsetHeight;if(shortfall>0){me.el.dom.style.height='';stretchers=me.getStretchers();shortfall=height-me.el.dom.offsetHeight;if(shortfall>0){stretchers[0].style.marginTop=scroller.constrainScrollRange(shortfall)+'px';shortfall=height-me.el.dom.offsetHeight;if(shortfall>0){stretchers[1].style.marginTop=Math.min(shortfall,scroller.maxSpacerMargin||0)+'px'}}}}},getStretchers:function(){var me=this,stretchers=me.stretchers,stretchCfg;if(stretchers){me.el.appendChild(stretchers)}else{stretchCfg={cls:'x-scroller-spacer',style:'position:relative'};stretchers=me.stretchers=me.el.appendChild([stretchCfg,stretchCfg],!0)}
return stretchers}}},function(Table){Table.prototype.oldCellFly=new Ext.dom.Fly()})
;
Ext.define('Ext.rtl.view.Table',{override:'Ext.view.Table',rtlCellTpl:['<td class="'+Ext.baseCSSPrefix+'rtl {tdCls}" {tdAttr} {[Ext.aria ? "id=\\"" + Ext.id() + "\\"" : ""]} style="width:{column.cellWidth}px;<tpl if="tdStyle">{tdStyle}</tpl>" tabindex="-1" {ariaCellAttr} data-columnid="{[values.column.getItemId()]}">','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'rtl '+Ext.baseCSSPrefix+'grid-cell-inner {innerCls}" ','style="text-align:{align};<tpl if="style">{style}</tpl>" {ariaCellInnerAttr}>{value}</div>','</td>',{priority:0}],beforeRender:function(){var me=this;me.callParent();if(me.getInherited().rtl){me.addCellTpl(me.lookupTpl('rtlCellTpl'))}},getCellPaddingAfter:function(cell){return Ext.fly(cell).getPadding(this.getInherited().rtl?'l':'r')}})
;
Ext.define('Ext.grid.Panel',{extend:'Ext.panel.Table',alias:['widget.gridpanel','widget.grid'],alternateClassName:['Ext.list.ListView','Ext.ListView','Ext.grid.GridPanel'],requires:['Ext.view.Table'],viewType:'tableview',ariaRole:'grid',lockable:!1,rowLines:!0})
;
Ext.define('Ext.grid.RowContext',{constructor:function(config){Ext.apply(this,config);this.widgets={}},setRecord:function(record,recordIndex){var viewModel=this.viewModel;this.record=record;this.recordIndex=recordIndex;if(viewModel){viewModel.set('record',record);viewModel.set('recordIndex',recordIndex)}},free:function(view){var me=this,widgets=me.widgets,widgetId,widget,focusEl,viewModel=me.viewModel;me.record=null;if(viewModel){viewModel.set('record');viewModel.set('recordIndex')}
for(widgetId in widgets){widget=widgets[widgetId];if(view&&view.refreshing&&!view.el.contains(widget.el)){continue}
focusEl=widget.getFocusEl();if(focusEl){if(focusEl.isTabbable(!0)){focusEl.saveTabbableState({includeHidden:!0})}
focusEl.blur()}
widget.detachFromBody()}},getWidget:function(view,ownerId,widgetCfg){var me=this,widgets=me.widgets||(me.widgets={}),ownerGrid=me.ownerGrid,rowViewModel=ownerGrid.rowViewModel,rowVM=me.viewModel,result;if((widgetCfg.bind||rowViewModel)&&!rowVM){if(typeof rowViewModel==='string'){rowViewModel={type:rowViewModel}}
me.viewModel=rowVM=Ext.Factory.viewModel(Ext.merge({parent:ownerGrid.getRowContextViewModelParent(),data:{record:me.record,recordIndex:me.recordIndex}},rowViewModel))}
if(!(result=widgets[ownerId])){result=widgets[ownerId]=Ext.widget(Ext.apply({ownerCmp:view,_rowContext:me,$vmParent:rowVM||ownerGrid.getRowContextViewModelParent(),initInheritedState:me.initInheritedStateHook,lookupViewModel:me.lookupViewModelHook},widgetCfg));result.$fromLocked=!!view.isLockedView;if(result.isWidget){result.initBindable()}else{result.collectContainerElement=!0}}
return result},getWidgets:function(){var widgets=this.widgets,id,result=[];for(id in widgets){result.push(widgets[id])}
return result},handleWidgetViewChange:function(view,ownerId){var widget=this.widgets[ownerId];if(widget){widget.ownerCmp=view;widget.$fromLocked=!!view.isLockedView}},destroy:function(){var me=this,widgets=me.widgets,widgetId,widget;for(widgetId in widgets){widget=widgets[widgetId];widget._rowContext=null;widget.destroy()}
Ext.destroy(me.viewModel);me.callParent()},privates:{initInheritedStateHook:function(inheritedState,inheritedStateInner){var vmParent=this.$vmParent;this.self.prototype.initInheritedState.call(this,inheritedState,inheritedStateInner);if(!inheritedState.hasOwnProperty('viewModel')&&vmParent){inheritedState.viewModel=vmParent}},lookupViewModelHook:function(skipThis){var ret=skipThis?null:this.getViewModel();if(!ret){ret=this.$vmParent||null}
return ret}}})
;
Ext.define('Ext.grid.RowEditorButtons',{extend:'Ext.container.Container',alias:'widget.roweditorbuttons',frame:!0,shrinkWrap:!0,position:'bottom',ariaRole:'toolbar',constructor:function(config){var me=this,rowEditor=config.rowEditor,cssPrefix=Ext.baseCSSPrefix,plugin=rowEditor.editingPlugin;config=Ext.apply({baseCls:cssPrefix+'grid-row-editor-buttons',defaults:{xtype:'button',ui:rowEditor.buttonUI,scope:plugin,flex:1,minWidth:Ext.panel.Panel.prototype.minButtonWidth},items:[{cls:cssPrefix+'row-editor-update-button',itemId:'update',handler:plugin.completeEdit,text:rowEditor.saveBtnText,disabled:rowEditor.updateButtonDisabled,listeners:{element:'el',keydown:me.onUpdateKeyDown,scope:me}},{cls:cssPrefix+'row-editor-cancel-button',itemId:'cancel',handler:plugin.cancelEdit,text:rowEditor.cancelBtnText,listeners:{element:'el',keydown:me.onCancelKeyDown,scope:me}}]},config);me.callParent([config]);me.addClsWithUI(me.position)},onUpdateKeyDown:function(e){if(e.shiftKey&&e.getKey()===e.TAB){e.stopEvent();this.rowEditor.child(':focusable:not([isButton]):last').focus(!1,!0)}},onCancelKeyDown:function(e){if(!e.shiftKey&&e.getKey()===e.TAB){e.stopEvent();this.rowEditor.child(':focusable').focus(!1,!0)}},setButtonPosition:function(position){var me=this,rowEditor=this.rowEditor,rowEditorHeight=rowEditor.getHeight(),rowEditorBody=rowEditor.body,bottom='',top='';me.removeClsWithUI(me.position);me.position=position;me.addClsWithUI(position);if(position==='top'){bottom=(rowEditorHeight-rowEditorBody.getBorderWidth('t'))+'px'}else{top=(rowEditorHeight-rowEditorBody.getBorderWidth('b'))+'px'}
me.el.setStyle({top:top,bottom:bottom})},privates:{getFramingInfoCls:function(){return this.baseCls+'-'+this.ui+'-'+this.position},getFrameInfo:function(){var frameInfo=this.callParent();frameInfo.top=!0;return frameInfo}}})
;
Ext.define('Ext.grid.RowEditor',{extend:'Ext.form.Panel',alias:'widget.roweditor',requires:['Ext.tip.ToolTip','Ext.util.KeyNav','Ext.grid.RowEditorButtons'],saveBtnText:'Update',cancelBtnText:'Cancel',errorsText:'Errors',dirtyText:'You need to commit or cancel your changes',lastScrollLeft:0,lastScrollTop:0,border:!1,tabGuard:!0,_wrapCls:Ext.baseCSSPrefix+'grid-row-editor-wrap',errorCls:Ext.baseCSSPrefix+'grid-row-editor-errors-item',buttonUI:'default',hideMode:'offsets',defaultFocus:'field:canfocus',layout:{type:'hbox',align:'middle'},_cachedNode:!1,initComponent:function(){var me=this,grid=me.editingPlugin.grid,Container=Ext.container.Container,form,normalCt,lockedCt;me.cls=Ext.baseCSSPrefix+'grid-editor '+Ext.baseCSSPrefix+'grid-row-editor';me.lockable=grid.lockable;if(me.lockable){me.items=[lockedCt=me.lockedColumnContainer=new Container({$initParent:me,id:grid.id+'-locked-editor-cells',scrollable:{x:!1,y:!1},layout:{type:'hbox',align:'middle'},margin:'0 1 0 0'}),normalCt=me.normalColumnContainer=new Container({$initParent:me,id:grid.id+'-normal-editor-cells',scrollable:{x:!1,y:!1},layout:{type:'hbox',align:'middle'},flex:1})];delete lockedCt.$initParent;delete normalCt.$initParent;lockedCt.getScrollable().addPartner(grid.lockedGrid.view.getScrollable(),'x');normalCt.getScrollable().addPartner(grid.normalGrid.view.getScrollable(),'x');grid.lockedGrid.on({collapse:me.onGridResize,expand:me.onGridResize,beginfloat:me.onBeginFloat,scope:me})}else{me.setScrollable({x:!1,y:!1});me.getScrollable().addPartner(grid.view.getScrollable(),'x');me.lockedColumnContainer=me.normalColumnContainer=me}
me.callParent();if(me.fields){me.addFieldsForColumn(me.fields,!0);me.insertColumnEditor(me.fields);delete me.fields}
me.mon(Ext.GlobalEvents,{scope:me,show:me.repositionIfVisible});form=me.getForm();form.trackResetOnLoad=!0;form.on('validitychange',me.onValidityChange,me);form.on('errorchange',me.onErrorChange,me)},onGridResize:function(){if(this.rendered){var me=this,clientWidth=me.getClientWidth(),grid=me.editingPlugin.grid,gridBody=grid.body,btns=me.getFloatingButtons();me.wrapEl.setLocalX(gridBody.getOffsetsTo(grid)[0]+gridBody.getBorderWidth('l')-grid.el.getBorderWidth('l'));me.setWidth(clientWidth);btns.setLocalX((clientWidth-btns.getWidth())/2);if(me.lockable){me.lockedColumnContainer.setWidth(grid.normalGrid.el.getLeft(!0))}}},onBeginFloat:function(lockedGrid){if(lockedGrid.isSliding&&this.isVisible()){return!1}},syncAllFieldWidths:function(){var me=this,editors=me.query('[isEditorComponent]'),len=editors.length,column,i;me.preventReposition=!0;for(i=0;i<len;++i){column=editors[i].column;if(column.isVisible()){me.onColumnShow(column)}}
me.preventReposition=!1},syncFieldWidth:function(column){var field=column.getEditor(),width;field._marginWidth=(field._marginWidth||field.el.getMargin('lr'));width=Math.max(column.getWidth()-field._marginWidth,0);field.setWidth(width);if(field.xtype==='displayfield'){field.inputWidth=width}},onValidityChange:function(form,valid){this.updateButton(valid)},onErrorChange:function(){var me=this,valid;if(me.errorSummary&&me.isVisible()){valid=me.getForm().isValid();me[valid?'hideToolTip':'showToolTip']()}},updateButton:function(valid){var buttons=this.floatingButtons;if(buttons){buttons.child('#update').setDisabled(!valid)}else{this.updateButtonDisabled=!valid}},afterRender:function(){var me=this,plugin=me.editingPlugin,grid=plugin.grid;me.scroller=grid.getScrollable();me.callParent(arguments);me.scrollingView=grid.lockable?grid.normalGrid.view:grid.view;me.scrollingViewEl=me.scrollingView.el;me.scroller.on('scroll',me.onViewScroll,me);me.mon(me.el,{click:Ext.emptyFn,stopPropagation:!0});me.mon(grid,'resize',me.onGridResize,me);if(me.lockable){grid.lockedGrid.view.on('resize','onGridResize',me)}
me.el.swallowEvent(['keypress','keydown']);me.initKeyNav();me.mon(plugin.view,{beforerefresh:me.onBeforeViewRefresh,refresh:me.onViewRefresh,itemremove:me.onViewItemRemove,scope:me});me.syncAllFieldWidths();if(me.floatingButtons){me.body.dom.setAttribute('aria-owns',me.floatingButtons.id)}},initKeyNav:function(){var me=this,plugin=me.editingPlugin;me.keyNav=new Ext.util.KeyNav({target:me.el,tab:{fn:me.onFieldTab,scope:me},enter:plugin.onEnterKey,esc:plugin.onEscKey,scope:plugin})},onBeforeViewRefresh:function(view){var me=this,viewDom=view.el.dom;if(me.el.dom.parentNode===viewDom){viewDom.removeChild(me.el.dom)}},onViewRefresh:function(view){var me=this,context=me.context,row;if(!me.completing){if(context&&!context.column.destroyed&&(row=view.getRow(context.record))){if(view===context.column.getView()){context.row=row;context.view=view;me.reposition();if(me.tooltip&&me.tooltip.isVisible()){me.tooltip.setTarget(context.row)}}}else{me.editingPlugin.cancelEdit()}}},onViewItemRemove:function(records,index,items,view){var me=this,context=me.context,grid,store,gridView,plugin;if(!view.refreshing&&context){plugin=me.editingPlugin;grid=plugin.grid;store=grid.getStore();gridView=me.editingPlugin.view;if(store.getById(me.getRecord().getId())&&!me._cachedNode){if(plugin.editing){me._cachedNode=!0;me.mon(gridView,{itemadd:me.onViewItemAdd,scope:me})}}else if(!me._cachedNode){me.activeField=null;me.editingPlugin.cancelEdit()}}},onViewItemAdd:function(records,index,items,view){var me=this,plugin=me.editingPlugin,gridView,idx,record;if(me._cachedNode&&me.context){gridView=plugin.view;if((idx=Ext.Array.indexOf(records,me.context.record))!==-1){record=records[idx];me.context.node=record;me.context.row=gridView.getRow(record);me.context.cell=gridView.getCellByPosition(me.context,!0);me.clearCache()}}},onViewScroll:function(){var me=this,viewEl=me.editingPlugin.view.el,scrollingView=me.scrollingView,scrollTop=me.scroller.getPosition().y,scrollLeft=scrollingView.getScrollX(),scrollTopChanged=scrollTop!==me.lastScrollTop,row;me.lastScrollTop=scrollTop;me.lastScrollLeft=scrollLeft;if(me.isVisible()){row=Ext.getDom(me.context.row);if(row&&viewEl.contains(row)){if(me.getLocalY()){me.setLocalY(0)}
if(scrollTopChanged){me.context.row=row;me.reposition(null,!0);if((me.tooltip&&me.tooltip.isVisible())){me.repositionTip()}}}else{me.setLocalY(-400);me.floatingButtons.hide()}}},onColumnResize:function(column,width){var me=this;if(me.rendered&&!me.editingPlugin.reconfiguring){me.onGridResize();me.onViewScroll();if(me.lockable){me.lockedColumnContainer.getScrollable().syncWithPartners();me.normalColumnContainer.getScrollable().syncWithPartners()}else{me.getScrollable().syncWithPartners()}
if(!column.isGroupHeader){me.syncFieldWidth(column);me.repositionIfVisible()}}},onColumnHide:function(column){if(!this.editingPlugin.reconfiguring&&!column.isGroupHeader){column.getEditor().hide();this.repositionIfVisible()}},onColumnShow:function(column){var me=this;if(me.rendered&&!me.editingPlugin.reconfiguring&&!column.isGroupHeader&&column.getEditor){column.getEditor().show();me.syncFieldWidth(column);if(!me.preventReposition){me.repositionIfVisible()}}},onColumnMove:function(column,fromIdx,toIdx){var me=this,locked=column.isLocked(),fieldContainer=locked?me.lockedColumnContainer:me.normalColumnContainer,columns,i,len,after,offset;if(column.isGroupHeader){Ext.suspendLayouts();after=toIdx>fromIdx;offset=after?1:0;columns=column.getGridColumns();for(i=0,len=columns.length;i<len;++i){column=columns[i];toIdx=column.getIndex();if(after){++offset}
me.setColumnEditor(column,toIdx+offset,fieldContainer)}
Ext.resumeLayouts(!0)}else{me.setColumnEditor(column,column.getIndex(),fieldContainer)}},setColumnEditor:function(column,idx,fieldContainer){this.addFieldsForColumn(column);fieldContainer.insert(idx,column.getEditor())},onColumnAdd:function(column,pos){if(column.isGroupHeader){column=column.getGridColumns()}
this.preventReposition=!0;this.addFieldsForColumn(column);this.insertColumnEditor(column,pos);this.preventReposition=!1},insertColumnEditor:function(column,pos){var me=this,field,fieldContainer,len,i;if(Ext.isArray(column)){for(i=0,len=column.length;i<len;i++){me.insertColumnEditor(column[i])}
return}
if(!column.getEditor){return}
if(pos==null){pos=column.getIndex()}
fieldContainer=column.isLocked()?me.lockedColumnContainer:me.normalColumnContainer;fieldContainer.insert(pos,field=column.getEditor());field.on('focus',me.onFieldFocus,me);me.needsSyncFieldWidths=!0},onFieldFocus:function(field){if(field.selectText){field.selectText(field.inputEl.dom.value.length)}
this.activeField=field;this.context.setColumn(field.column);if(!this.skipFocusScroll){field.column.getView().getScrollable().ensureVisible(field.el)}else{this.skipFocusScroll=null}},onFieldTab:function(e){var me=this,activeField=me.activeField,rowIdx=me.context.rowIdx,forwards=!e.shiftKey,target=activeField[forwards?'nextNode':'previousNode'](':focusable'),count;e.stopEvent();if(!target||!target.isDescendant(me)){if(me.isDirty()&&!me.autoUpdate){me.floatingButtons.child('#update').focus()}else{count=me.view.dataSource.getCount();rowIdx=rowIdx+(forwards?1:-1);if(rowIdx<0){rowIdx=count-1}else if(rowIdx>=count){rowIdx=0}
if(forwards){target=me.down(':focusable:not([isButton]):first');activeField.column.getView().getScrollable().ensureVisible(activeField.ownerCt.child(':focusable').el)}else{target=me.down(':focusable:not([isButton]):last')}
me.tabGuardBeforeEl.focus();me.editingPlugin.startEdit(rowIdx,target.column)}}else{target.focus()}},destroyColumnEditor:function(column){var field;if(column.hasEditor()&&(field=column.getEditor())){field.destroy()}},getFloatingButtons:function(){var me=this,btns=me.floatingButtons;if(!btns&&!me.destroying&&!me.destroyed){me.floatingButtons=btns=new Ext.grid.RowEditorButtons({ownerCmp:me,rowEditor:me,hidden:me.hidden})}
return btns},repositionIfVisible:function(c){var me=this,view=me.view;if(c&&(c===me||!c.el.isAncestor(view.el))){return}
if(me.isVisible()&&view.isVisible(!0)){me.reposition()}},isLayoutChild:function(ownerCandidate){return!1},getRefOwner:function(){return this.editingPlugin.grid},getRefItems:function(deep){var me=this,result,buttons;if(me.lockable){result=[me.lockedColumnContainer];result.push.apply(result,me.lockedColumnContainer.getRefItems(deep));result.push(me.normalColumnContainer);result.push.apply(result,me.normalColumnContainer.getRefItems(deep))}else{result=me.callParent(arguments)}
buttons=me.getFloatingButtons();if(buttons){result.push.apply(result,buttons.getRefItems(deep))}
return result},reposition:function(animateConfig,fromScrollHandler){var me=this,context=me.context,row=context&&context.row,wrapEl=me.wrapEl,rowTop,localY,deltaY,afterPosition;if(row&&Ext.isElement(row)){deltaY=me.syncButtonPosition(context);rowTop=me.calculateLocalRowTop(row);localY=me.calculateEditorTop(rowTop);afterPosition=function(){me.syncEditorClip();me.wrapAnim=null;if(!fromScrollHandler){if(deltaY){me.scroller.scrollBy(0,deltaY,!0)}
me.focusColumnField(context.column)}};if(animateConfig){me.wrapAnim=wrapEl.addAnimation(Ext.applyIf({to:{top:localY},duration:animateConfig.duration||125,callback:afterPosition},animateConfig))}else{wrapEl.setLocalY(localY);afterPosition()}}},getScrollDelta:function(){var me=this,scrollingViewDom=me.scroller.getElement().dom,context=me.context,body=me.body,deltaY=0,clientHeight,scrollHeight,editorHeight;if(context){deltaY=Ext.fly(context.row).getOffsetsTo(scrollingViewDom)[1];if(deltaY<0){deltaY-=body.getBorderPadding().beforeY}else if(deltaY>0){clientHeight=scrollingViewDom.clientHeight;scrollHeight=scrollingViewDom.scrollHeight;editorHeight=me.getHeight()+me.floatingButtons.getHeight();if(clientHeight===scrollHeight&&editorHeight>clientHeight){return 0}
deltaY=Math.max(deltaY+editorHeight-clientHeight-body.getBorderWidth('b'),0);if(deltaY>0){deltaY-=body.getBorderPadding().afterY}}}
return deltaY},calculateLocalRowTop:function(row){var grid=this.editingPlugin.grid;return Ext.fly(row).getOffsetsTo(grid)[1]-grid.el.getBorderWidth('t')+this.lastScrollTop},calculateEditorTop:function(rowTop){var result=rowTop-this.lastScrollTop;if(this._buttonsOnTop){result-=(this.body.dom.offsetHeight-this.context.row.offsetHeight-this.body.getBorderPadding().afterY)}else{result-=this.body.getBorderPadding().beforeY}
return result},getClientWidth:function(){var me=this,grid=me.editingPlugin.grid,lockedCmp,result;if(me.lockable){lockedCmp=(grid.lockedGrid.collapsed&&grid.lockedGrid.placeholder)||grid.lockedGrid;result=lockedCmp.getRegion().union(grid.scrollBody.el.getClientRegion()).width}else{result=grid.view.el.dom.clientWidth}
return result},getEditor:function(fieldInfo){var me=this;if(Ext.isNumber(fieldInfo)){return me.query('[isEditorComponent]')[fieldInfo]}else if(fieldInfo.isHeader&&!fieldInfo.isGroupHeader){return fieldInfo.getEditor()}},addFieldsForColumn:function(column,initial){var me=this,i,len,field,style;if(Ext.isArray(column)){for(i=0,len=column.length;i<len;i++){me.addFieldsForColumn(column[i],initial)}
return}
if(column.getEditor){field=column.getEditor(null,me.getDefaultFieldCfg());field.preventRefocus=!0;if(column.align==='right'){style=field.fieldStyle;if(style){if(Ext.isObject(style)){style=Ext.apply({},style)}else{style=Ext.dom.Element.parseStyles(style)}
if(!style.textAlign&&!style['text-align']){style.textAlign='right'}}else{style='text-align:right'}
field.fieldStyle=style}
if(column.xtype==='actioncolumn'){field.fieldCls+=' '+Ext.baseCSSPrefix+'form-action-col-field'}
if(me.isVisible()&&me.context){if(field.is('displayfield')){me.renderColumnData(field,me.context.record,column)}else{field.suspendEvents();field.setValue(me.context.record.get(column.dataIndex));field.resumeEvents()}}
if(column.hidden){me.onColumnHide(column)}else if(column.rendered&&!initial){me.onColumnShow(column)}}},getDefaultFieldCfg:function(){return{xtype:'displayfield',skipLabelForAttribute:!0,getModelData:function(){return null}}},loadRecord:function(record){var me=this,form=me.getForm(),fields=form.getFields(),items=fields.items,length=items.length,i,displayFields,isValid,item;for(i=0;i<length;i++){item=items[i];item.suspendEvents();item.resetToInitialValue()}
form.loadRecord(record);for(i=0;i<length;i++){items[i].resumeEvents()}
if(form.hasInvalidField()===form.wasValid){delete form.wasValid}
isValid=form.isValid();if(me.errorSummary){if(isValid){me.hideToolTip()}else{me.showToolTip()}}
me.updateButton(isValid);displayFields=me.query('>displayfield');length=displayFields.length;for(i=0;i<length;i++){me.renderColumnData(displayFields[i],record)}},renderColumnData:function(field,record,activeColumn){var me=this,grid=me.editingPlugin.grid,headerCt=grid.headerCt,view=me.scrollingView,store=view.dataSource,column=activeColumn||field.column,value=record.get(column.dataIndex),renderer=column.editRenderer||column.renderer,metaData,rowIdx,colIdx,scope=(column.usingDefaultRenderer&&!column.scope)?column:column.scope;if(renderer){metaData={tdCls:'',style:''};rowIdx=store.indexOf(record);colIdx=headerCt.getHeaderIndex(column);value=renderer.call(scope||headerCt.ownerCt,value,metaData,record,rowIdx,colIdx,store,view)}
field.setRawValue(value)},beforeEdit:function(){var me=this,scrollDelta;if(me.lockable&&me.editingPlugin.grid.lockedGrid.floatedFromCollapse){return!1}
if(me.isVisible()&&(me.isDirty()||me.context.record.phantom)){if(me.autoUpdate){me.editingPlugin.completeEdit()}else if(me.autoCancel){me.editingPlugin.cancelEdit()}else if(me.errorSummary){scrollDelta=me.getScrollDelta();if(scrollDelta){me.scrollingViewEl.scrollBy(0,scrollDelta,!0)}
me.showToolTip();return!1}}},startEdit:function(record,columnHeader){var me=this,editingPlugin=me.editingPlugin,grid=editingPlugin.grid,context=me.context=editingPlugin.context,alreadyVisible=me.isVisible(),wrapEl=me.wrapEl,wasRendered=me.rendered,label;if(me._cachedNode){me.clearCache()}
Ext.suspendLayouts();if(!wasRendered){me.width=me.getClientWidth();me.render(grid.el,grid.el.dom.firstChild);wrapEl=me.wrapEl=me.el.wrap();wrapEl.setVisibilityMode(3);wrapEl.addCls(me._wrapCls);me.getFloatingButtons().render(wrapEl);me.onViewScroll()}
me.setLocalY(0);context.grid.getSelectionModel().selectByPosition({row:record,column:columnHeader});if(me.rendered&&me.formAriaLabel){label=Ext.String.formatEncode(me.formAriaLabel,me.formAriaLabelRowBase+context.rowIdx);me.body.dom.setAttribute('aria-label',label)}
me.onGridResize();Ext.resumeLayouts(alreadyVisible);if(alreadyVisible){me.reposition(!0)}else{me.skipFocusScroll=!0;me.show()}
me.loadRecord(record);if(!wasRendered){if(me.lockable){me.lockedColumnContainer.getScrollable().syncWithPartners();me.normalColumnContainer.getScrollable().syncWithPartners()}else{me.getScrollable().syncWithPartners()}}},syncButtonPosition:function(context){var me=this,scrollDelta=me.getScrollDelta(),floatingButtons=me.getFloatingButtons(),scrollHeight=Math.max(0,me.scroller.getSize().y-me.scroller.getClientSize().y),overflow=scrollDelta-(scrollHeight-me.scroller.getPosition().y);floatingButtons.show();if(overflow>0||(context.rowIdx>0&&context.isLastRenderedRow())){if(!me._buttonsOnTop){floatingButtons.setButtonPosition('top');me._buttonsOnTop=!0;me.layout.setAlign('bottom');me.updateLayout()}
scrollDelta=0}else if(me._buttonsOnTop!==!1){floatingButtons.setButtonPosition('bottom');me._buttonsOnTop=!1;me.layout.setAlign('top');me.updateLayout()}else{floatingButtons.setButtonPosition(floatingButtons.position)}
return scrollDelta},syncEditorClip:function(){var me=this,tip=me.tooltip,clipRegion=me.scroller.getElement().getConstrainRegion();me.clipTo(clipRegion);me.floatingButtons.clipTo(clipRegion);if(tip&&tip.isVisible()){tip.clipTo(clipRegion,5)}},focusColumnField:function(column){var field,didFocus;if(column&&!column.destroyed){if(column.isVisible()){field=this.getEditor(column);if(field&&field.isFocusable(!0)){didFocus=!0;field.focus()}}
if(!didFocus){this.focusColumnField(column.next())}}},cancelEdit:function(){var me=this,form=me.getForm(),fields=form.getFields(),items=fields.items,length=items.length,i,record=me.context.record;if(me._cachedNode){me.clearCache()}
me.hide();if(record&&record.phantom&&!record.modified&&me.removeUnmodified){me.editingPlugin.grid.store.remove(record)}
form.clearInvalid();for(i=0;i<length;i++){items[i].suspendEvents()}
form.reset();for(i=0;i<length;i++){items[i].resumeEvents()}},clearCache:function(){var me=this;me.mun(me.editingPlugin.view,{itemadd:me.onViewItemAdd,scope:me});me._cachedNode=!1},completeEdit:function(){var me=this,form=me.getForm();if(!form.isValid()){return!1}
me.completing=!0;form.updateRecord(me.context.record);me.hide();me.completing=!1;return!0},onShow:function(){var me=this;me.wrapEl.show();me.callParent(arguments);if(me.needsSyncFieldWidths){me.suspendLayouts();me.preventReposition=!0;me.syncAllFieldWidths();me.preventReposition=!1;me.resumeLayouts(!0)}
delete me.needsSyncFieldWidths;if(me.rendered){me.initTabGuards(!0)}
me.reposition()},onHide:function(){var me=this,context=me.context,column,focusContext,activeEl=Ext.Element.getActiveElement();me.context=null;if(me.el.contains(activeEl)&&me.activeField){column=me.activeField.column}else{column=context.column}
if(column&&!column.destroyed){focusContext=new Ext.grid.CellContext(column.getView()).setPosition(context.record,column);focusContext.view.getNavigationModel().setPosition(focusContext)}
me.activeField=null;me.wrapEl.hide();me.callParent(arguments);if(me.rendered){me.initTabGuards(!1)}
if(me.tooltip){me.hideToolTip()}},onResize:function(width,height){this.wrapEl.setSize(width,height)},isDirty:function(){return this.getForm().isDirty()},getToolTip:function(){var me=this,tip=me.tooltip,grid=me.editingPlugin.grid;if(!tip){me.tooltip=tip=new Ext.tip.ToolTip({cls:Ext.baseCSSPrefix+'grid-row-editor-errors',title:me.errorsText,autoHide:!1,closable:!0,closeAction:'disable',anchor:'left',anchorToTarget:!0,targetOffset:[Ext.scrollbar.width(),0],constrainPosition:!0,constrainTo:document.body});grid.add(tip);me.mon(grid,{afterlayout:me.onGridLayout,scope:me})}
return tip},hideToolTip:function(){var me=this,tip=me.getToolTip();if(tip.rendered){tip.disable()}},showToolTip:function(wrapAnim){var me=this,tip=me.getToolTip();if(!wrapAnim&&me.wrapAnim){return me.wrapAnim.on({afteranimate:me.showToolTip,scope:me,single:!0})}
tip.update(me.getErrors());me.repositionTip();tip.enable()},onGridLayout:function(){if(this.tooltip&&this.tooltip.isVisible()){this.repositionTip()}},repositionTip:function(){var me=this,tip=me.getToolTip();if(tip.isVisible()){tip.realignToTarget()}else{tip.showBy(me.el)}
me.syncEditorClip()},getErrors:function(){var me=this,errors=[],fields=me.query('>[isFormField]'),length=fields.length,i,fieldErrors,field;for(i=0;i<length;i++){field=fields[i];fieldErrors=field.getErrors();if(fieldErrors.length){errors.push(me.createErrorListItem(fieldErrors[0],field.column.text))}}
if(!errors.length&&!me.autoCancel&&me.isDirty()){errors[0]=me.createErrorListItem(me.dirtyText)}
return'<ul class="'+Ext.baseCSSPrefix+'list-plain">'+errors.join('')+'</ul>'},createErrorListItem:function(e,name){e=name?name+': '+e:e;return'<li class="'+this.errorCls+'">'+e+'</li>'},doDestroy:function(){var me=this;if(me.wrapAnim){Ext.fx.Manager.removeAnim(me.wrapAnim);me.wrapAnim=null}
me.keyNav=me.floatingButtons=me.tooltip=Ext.destroy(me.keyNav,me.floatingButtons,me.tooltip,me.wrapEl);me.callParent()}})
;
Ext.define('Ext.theme.neptune.grid.RowEditor',{override:'Ext.grid.RowEditor',buttonUI:'default-toolbar'})
;
Ext.define('Ext.grid.Scroller',{constructor:Ext.deprecated()})
;
Ext.define('Ext.view.DropZone',{extend:'Ext.dd.DropZone',indicatorCls:Ext.baseCSSPrefix+'grid-drop-indicator',indicatorHtml:['<div class="',Ext.baseCSSPrefix,'grid-drop-indicator-left" role="presentation"></div>','<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right" role="presentation"></div>'].join(''),constructor:function(config){var me=this;Ext.apply(me,config);if(!me.ddGroup){me.ddGroup='view-dd-zone-'+me.view.id}
me.callParent([me.view.el])},fireViewEvent:function(){var me=this,result;me.lock();result=me.view.fireEvent.apply(me.view,arguments);me.unlock();return result},getTargetFromEvent:function(e){var node=e.getTarget(this.view.getItemSelector()),mouseY,nodeList,testNode,i,len,box;if(!node){mouseY=e.getY();for(i=0,nodeList=this.view.getNodes(),len=nodeList.length;i<len;i++){testNode=nodeList[i];box=Ext.fly(testNode).getBox();if(mouseY<=box.bottom){return testNode}}}
return node},getIndicator:function(){var me=this;if(!me.indicator){me.indicator=new Ext.Component({ariaRole:'presentation',html:me.indicatorHtml,cls:me.indicatorCls,ownerCt:me.view,floating:!0,alignOnScroll:!1,shadow:!1})}
return me.indicator},getPosition:function(e,node){var y=e.getXY()[1],region=Ext.fly(node).getRegion(),pos;if((region.bottom-y)>=(region.bottom-region.top)/2){pos="before"}else{pos="after"}
return pos},containsRecordAtOffset:function(records,record,offset){if(!record){return!1}
var view=this.view,recordIndex=view.indexOf(record),nodeBefore=view.getNode(recordIndex+offset),recordBefore=nodeBefore?view.getRecord(nodeBefore):null;return recordBefore&&Ext.Array.contains(records,recordBefore)},positionIndicator:function(node,data,e){var me=this,view=me.view,pos=me.getPosition(e,node),overRecord=view.getRecord(node),draggingRecords=data.records,indicatorY,scrollable,scrollableEl,container,containerY;if(!Ext.Array.contains(draggingRecords,overRecord)&&(pos==='before'&&!me.containsRecordAtOffset(draggingRecords,overRecord,-1)||pos==='after'&&!me.containsRecordAtOffset(draggingRecords,overRecord,1))){me.valid=!0;if(me.overRecord!==overRecord||me.currentPosition!==pos){scrollable=me.view.getScrollable();scrollableEl=scrollable&&scrollable.getElement();container=(scrollableEl&&scrollableEl.isScrollable())?scrollableEl:Ext.fly(view.getNodeContainer());containerY=container.getY();indicatorY=Ext.fly(node).getY()-containerY-1;if(pos==='after'){indicatorY+=Ext.fly(node).getHeight()}
me.getIndicator().setWidth(Ext.fly(view.el).getWidth()).showAt(0,indicatorY);me.overRecord=overRecord;me.currentPosition=pos}}else{me.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=!1;this.getIndicator().hide()}},onNodeOver:function(node,dragZone,e,data){var me=this;if(!Ext.Array.contains(data.records,me.view.getRecord(node))){me.positionIndicator(node,data,e)}
return me.valid?me.dropAllowed:me.dropNotAllowed},notifyOut:function(node,dragZone,e,data){var me=this;me.callParent([node,dragZone,e,data]);me.overRecord=me.currentPosition=null;me.valid=!1;if(me.indicator){me.indicator.hide()}},onContainerOver:function(dd,e,data){var me=this,view=me.view,count=view.dataSource.getCount();if(count){me.positionIndicator(view.all.last(),data,e)}else{me.overRecord=me.currentPosition=null;me.getIndicator().setWidth(Ext.fly(view.el).getWidth()).showAt(0,0);me.valid=!0}
return me.dropAllowed},onContainerDrop:function(dd,e,data){return this.onNodeDrop(dd,null,e,data)},onNodeDrop:function(targetNode,dragZone,e,data){var me=this,dropHandled=!1,overRecord=me.overRecord,currentPosition=me.currentPosition,dropHandlers={wait:!1,processDrop:function(){me.invalidateDrop();me.handleNodeDrop(data,overRecord,currentPosition);dropHandled=!0;me.fireViewEvent('drop',targetNode,data,overRecord,currentPosition)},cancelDrop:function(){me.invalidateDrop();dropHandled=!0}},performOperation=!1;if(me.valid){performOperation=me.fireViewEvent('beforedrop',targetNode,data,overRecord,currentPosition,dropHandlers);if(dropHandlers.wait){return}
if(performOperation!==!1){if(!dropHandled){dropHandlers.processDrop()}}}
return performOperation},destroy:function(){this.indicator=Ext.destroy(this.indicator);this.callParent()}})
;
Ext.define('Ext.grid.ViewDropZone',{extend:'Ext.view.DropZone',indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left" role="presentation"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right" role="presentation"></div>',indicatorCls:Ext.baseCSSPrefix+'grid-drop-indicator',handleNodeDrop:function(data,record,position){var view=this.view,store=view.getStore(),crossView=view!==data.view,selectAfter=crossView||data.records.length>1,index,records,i,len;if(data.copy){records=data.records;for(i=0,len=records.length;i<len;i++){records[i]=records[i].copy()}}else if(selectAfter){data.view.store.remove(data.records)}
if(record&&position){index=store.indexOf(record);if(position!=='before'){index++}
store.insert(index,data.records)}else{store.add(data.records)}
if(selectAfter){view.getSelectionModel().select(data.records)}
view.getNavigationModel().setPosition(data.records[0])}})
;
Ext.define('Ext.grid.plugin.HeaderResizer',{extend:'Ext.plugin.Abstract',alias:'plugin.gridheaderresizer',requires:['Ext.dd.DragTracker','Ext.util.Region'],disabled:!1,config:{dynamic:!1},colHeaderCls:Ext.baseCSSPrefix+'column-header',minColWidth:40,maxColWidth:1000,eResizeCursor:'col-resize',init:function(headerCt){var me=this;me.headerCt=headerCt;headerCt.on('render',me.afterHeaderRender,me,{single:me});if(!me.minColWidth){me.self.prototype.minColWidth=Ext.grid.column.Column.prototype.minWidth}},destroy:function(){var me=this,tracker=me.tracker;if(tracker){tracker.destroy();me.tracker=null}
me.headerCt.un('render',me.afterHeaderRender,me);me.headerCt=null;me.callParent()},afterHeaderRender:function(){var me=this,headerCt=me.headerCt,el=headerCt.el;headerCt.mon(el,'mousemove',me.onHeaderCtMouseMove,me);me.markerOwner=me.ownerGrid=me.headerCt.up('tablepanel').ownerGrid;me.tracker=new Ext.dd.DragTracker({disabled:me.disabled,onBeforeStart:me.onBeforeStart.bind(me),onStart:me.onStart.bind(me),onDrag:me.onDrag.bind(me),onEnd:me.onEnd.bind(me),onCancel:me.onCancel.bind(me),tolerance:3,autoStart:300,el:el});headerCt.setTouchAction({panX:!1})},onHeaderCtMouseMove:function(e){var me=this;if(me.headerCt.dragging||me.disabled){if(me.activeHd){me.activeHd.el.dom.style.cursor='';delete me.activeHd}}else if(e.pointerType!=='touch'){me.findActiveHeader(e)}},findActiveHeader:function(e){var me=this,headerCt=me.headerCt,headerEl=e.getTarget('.'+me.colHeaderCls,headerCt.el,!0),ownerGrid=me.ownerGrid,ownerLockable=ownerGrid.ownerLockable,overHeader,resizeHeader,headers,header;me.activeHd=null;if(headerEl){overHeader=Ext.getCmp(headerEl.id);if(overHeader.isAtEndEdge(e)){if(headerCt.visibleColumnManager.getColumns().length===1&&headerCt.forceFit){return}
resizeHeader=overHeader}else if(overHeader.isAtStartEdge(e)){headers=headerCt.visibleColumnManager.getColumns();header=overHeader.isGroupHeader?overHeader.getGridColumns()[0]:overHeader;resizeHeader=headers[Ext.Array.indexOf(headers,header)-1];if(!resizeHeader&&ownerLockable&&!ownerGrid.isLocked){headers=ownerLockable.lockedGrid.headerCt.visibleColumnManager.getColumns();resizeHeader=headers[headers.length-1]}}
if(resizeHeader){if(resizeHeader.isGroupHeader){headers=resizeHeader.getGridColumns();resizeHeader=headers[headers.length-1]}
if(resizeHeader&&!(resizeHeader.fixed||(resizeHeader.resizable===!1))){me.activeHd=resizeHeader;overHeader.el.dom.style.cursor=me.eResizeCursor;if(overHeader.triggerEl){overHeader.triggerEl.dom.style.cursor=me.eResizeCursor}}}else{overHeader.el.dom.style.cursor='';if(overHeader.triggerEl){overHeader.triggerEl.dom.style.cursor=''}}}
return me.activeHd},onBeforeStart:function(e){var me=this;me.dragHd=me.activeHd||e.pointerType==='touch'&&me.findActiveHeader(e);if(me.dragHd&&!me.headerCt.dragging){e.claimGesture();me.xDelta=me.dragHd.getX()+me.dragHd.getWidth()-me.tracker.getXY()[0];me.tracker.constrainTo=me.getConstrainRegion();return!0}else{me.headerCt.dragging=!1;return!1}},onCancel:function(e){this.dragHd=this.activeHd=null;this.headerCt.dragging=!1},getConstrainRegion:function(){var me=this,dragHdEl=me.dragHd.el,nextHd,ownerGrid=me.ownerGrid,widthModel=ownerGrid.getSizeModel().width,maxColWidth=widthModel.shrinkWrap?me.headerCt.getWidth()-me.headerCt.visibleColumnManager.getColumns().length*me.minColWidth:me.maxColWidth,result;if(me.headerCt.forceFit){nextHd=me.dragHd.nextNode('gridcolumn:not([hidden]):not([isGroupHeader])');if(nextHd&&me.headerInSameGrid(nextHd)){maxColWidth=dragHdEl.getWidth()+(nextHd.getWidth()-me.minColWidth)}}else if(ownerGrid.isLocked&&widthModel.shrinkWrap){maxColWidth=me.dragHd.up('[scrollerOwner]').getTargetEl().getWidth(!0)-ownerGrid.getWidth()-(ownerGrid.ownerLockable.normalGrid.visibleColumnManager.getColumns().length*me.minColWidth+Ext.scrollbar.width())}
result=me.adjustConstrainRegion(dragHdEl.getRegion(),0,0,0,me.minColWidth);result.right=dragHdEl.getX()+maxColWidth;return result},onStart:function(e){var me=this,dragHd=me.dragHd,width=dragHd.el.getWidth(),headerCt=dragHd.getRootHeaderCt(),x,y,markerOwner,lhsMarker,rhsMarker,markerHeight;me.headerCt.dragging=!0;me.origWidth=width;if(!me.dynamic){markerOwner=me.markerOwner;if(markerOwner.frame&&markerOwner.resizable){me.gridOverflowSetting=markerOwner.el.dom.style.overflow;markerOwner.el.dom.style.overflow='hidden'}
x=me.getLeftMarkerX(markerOwner);lhsMarker=markerOwner.getLhsMarker();rhsMarker=markerOwner.getRhsMarker();markerHeight=me.ownerGrid.body.getHeight()+headerCt.getHeight();y=headerCt.getOffsetsTo(markerOwner)[1]-markerOwner.el.getBorderWidth('t');lhsMarker.dom.style.cursor=me.eResizeCursor;rhsMarker.dom.style.cursor=me.eResizeCursor;lhsMarker.setLocalY(y);rhsMarker.setLocalY(y);lhsMarker.setHeight(markerHeight);rhsMarker.setHeight(markerHeight);me.setMarkerX(lhsMarker,x);me.setMarkerX(rhsMarker,x+width)}},onDrag:function(e){var me=this;if(me.dynamic){me.doResize()}else{me.setMarkerX(me.getMovingMarker(me.markerOwner),me.calculateDragX(me.markerOwner))}},getMovingMarker:function(markerOwner){return markerOwner.getRhsMarker()},onEnd:function(e){var me=this,markerOwner=me.markerOwner;me.headerCt.dragging=!1;if(me.dragHd){if(!me.dynamic){if('gridOverflowSetting' in me){markerOwner.el.dom.style.overflow=me.gridOverflowSetting}
me.setMarkerX(markerOwner.getLhsMarker(),-9999);me.setMarkerX(markerOwner.getRhsMarker(),-9999)}
me.doResize();if(e.pointerType!=='touch'){me.dragHd=null;me.activeHd.el.dom.style.cursor=me.eResizeCursor}else{me.dragHd=me.activeHd=null}}
me.headerCt.blockNextEvent()},doResize:function(){var me=this,dragHd=me.dragHd,nextHd,offset=me.tracker.getOffset('point');if(dragHd&&offset[0]){if(dragHd.flex){delete dragHd.flex}
Ext.suspendLayouts();me.adjustColumnWidth(offset[0]-me.xDelta);if(me.headerCt.forceFit){nextHd=dragHd.nextNode('gridcolumn:not([hidden]):not([isGroupHeader])');if(nextHd&&!me.headerInSameGrid(nextHd)){nextHd=null}
if(nextHd){delete nextHd.flex;nextHd.setWidth(nextHd.getWidth()-offset[0])}}
Ext.resumeLayouts(!0)}},headerInSameGrid:function(header){var grid=this.dragHd.up('tablepanel');return!!header.up(grid)},disable:function(){var tracker=this.tracker;this.disabled=!0;if(tracker){tracker.disable()}},enable:function(){var tracker=this.tracker;this.disabled=!1;if(tracker){tracker.enable()}},calculateDragX:function(markerOwner){return this.tracker.getXY('point')[0]+this.xDelta-markerOwner.getX()-markerOwner.el.getBorderWidth('l')},getLeftMarkerX:function(markerOwner){return this.dragHd.getX()-markerOwner.getX()-markerOwner.el.getBorderWidth('l')-1},setMarkerX:function(marker,x){marker.setLocalX(x)},adjustConstrainRegion:function(region,t,r,b,l){return region.adjust(t,r,b,l)},adjustColumnWidth:function(offsetX){this.dragHd.setWidth(this.origWidth+offsetX)}})
;
Ext.define('Ext.rtl.grid.plugin.HeaderResizer',{override:'Ext.grid.plugin.HeaderResizer',onBeforeStart:function(e){var me=this;if(this.headerCt.isOppositeRootDirection()){me.dragHd=me.activeHd;if(!!me.dragHd&&!me.headerCt.dragging){me.xDelta=me.dragHd.getX()-me.tracker.getXY()[0];this.tracker.constrainTo=this.getConstrainRegion();return!0}else{me.headerCt.dragging=!1;return!1}}else{return this.callParent(arguments)}},adjustColumnWidth:function(offsetX){if(this.headerCt.isOppositeRootDirection()){offsetX=-offsetX}
this.callParent([offsetX])},adjustConstrainRegion:function(region,t,r,b,l){return this.headerCt.isOppositeRootDirection()?region.adjust(t,-l,b,-r):this.callParent(arguments)},calculateDragX:function(gridSection){var gridX=gridSection.getX(),mouseX=this.tracker.getXY('point')[0];if(this.headerCt.isOppositeRootDirection()){return mouseX-gridX+this.xDelta}else{return this.callParent(arguments)}},getMovingMarker:function(markerOwner){if(this.headerCt.isOppositeRootDirection()){return markerOwner.getLhsMarker()}else{return markerOwner.getRhsMarker()}},setMarkerX:function(marker,x){var headerCt=this.headerCt;if(headerCt.getInherited().rtl&&!headerCt.isOppositeRootDirection()){marker.rtlSetLocalX(x)}else{this.callParent(arguments)}}})
;
Ext.define('Ext.grid.header.DragZone',{extend:'Ext.dd.DragZone',colHeaderSelector:'.'+Ext.baseCSSPrefix+'column-header',colInnerSelector:'.'+Ext.baseCSSPrefix+'column-header-inner',maxProxyWidth:120,constructor:function(headerCt){var me=this;me.headerCt=headerCt;me.ddGroup=me.getDDGroup();me.autoGroup=!0;me.callParent([headerCt.el]);me.proxy.el.addCls(Ext.baseCSSPrefix+'grid-col-dd')},getDDGroup:function(){return'header-dd-zone-'+this.headerCt.up('[scrollerOwner]').id},getDragData:function(e){if(e.getTarget(this.colInnerSelector)){var header=e.getTarget(this.colHeaderSelector),headerCmp,ddel;if(header){headerCmp=Ext.getCmp(header.id);if(!this.headerCt.dragging&&headerCmp.draggable&&!(headerCmp.isAtStartEdge(e)||headerCmp.isAtEndEdge(e))){ddel=document.createElement('div');ddel.role='presentation';ddel.innerHTML=headerCmp.text;return{ddel:ddel,header:headerCmp}}}}
return!1},onBeforeDrag:function(){return!(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=!0;this.headerCt.hideMenu();this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=!1;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=!1},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=!0},enable:function(){this.disabled=!1}})
;
Ext.define('Ext.grid.header.DropZone',{extend:'Ext.dd.DropZone',colHeaderCls:Ext.baseCSSPrefix+'column-header',proxyOffsets:[-4,-9],constructor:function(headerCt){var me=this;me.headerCt=headerCt;me.ddGroup=me.getDDGroup();me.autoGroup=!0;me.callParent([headerCt.el])},destroy:function(){Ext.destroy(this.topIndicator,this.bottomIndicator);this.callParent()},getDDGroup:function(){return'header-dd-zone-'+this.headerCt.up('[scrollerOwner]').id},getTargetFromEvent:function(e){return e.getTarget('.'+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.getBody().createChild({role:'presentation',cls:Ext.baseCSSPrefix+"col-move-top","data-sticky":!0,html:"&#160;"});this.indicatorXOffset=Math.floor((this.topIndicator.dom.offsetWidth+1)/2)}
return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.getBody().createChild({role:'presentation',cls:Ext.baseCSSPrefix+"col-move-bottom","data-sticky":!0,html:"&#160;"})}
return this.bottomIndicator},getLocation:function(e,t){var x=e.getXY()[0],region=Ext.fly(t).getRegion(),pos;if((region.right-x)<=(region.right-region.left)/2){pos="after"}else{pos="before"}
return{pos:pos,header:Ext.getCmp(t.id),node:t}},positionIndicator:function(data,node,e){var me=this,dragHeader=data.header,dropLocation=me.getLocation(e,node),targetHeader=dropLocation.header,pos=dropLocation.pos,nextHd,prevHd,topIndicator,bottomIndicator,topAnchor,bottomAnchor,topXY,bottomXY,headerCtEl,minX,maxX,allDropZones,ln,i,dropZone;if(targetHeader===me.lastTargetHeader&&pos===me.lastDropPos){return}
nextHd=dragHeader.nextSibling('gridcolumn:not([hidden])');prevHd=dragHeader.previousSibling('gridcolumn:not([hidden])');me.lastTargetHeader=targetHeader;me.lastDropPos=pos;if(!targetHeader.draggable&&pos==='before'&&targetHeader.getIndex()===0){return!1}
data.dropLocation=dropLocation;if((dragHeader!==targetHeader)&&((pos==="before"&&nextHd!==targetHeader)||(pos==="after"&&prevHd!==targetHeader))&&!targetHeader.isDescendantOf(dragHeader)){allDropZones=Ext.dd.DragDropManager.getRelated(me);ln=allDropZones.length;i=0;for(;i<ln;i++){dropZone=allDropZones[i];if(dropZone!==me&&dropZone.invalidateDrop){dropZone.invalidateDrop()}}
me.valid=!0;topIndicator=me.getTopIndicator();bottomIndicator=me.getBottomIndicator();if(pos==='before'){topAnchor='bc-tl';bottomAnchor='tc-bl'}else{topAnchor='bc-tr';bottomAnchor='tc-br'}
topXY=topIndicator.getAlignToXY(targetHeader.el,topAnchor);bottomXY=bottomIndicator.getAlignToXY(targetHeader.el,bottomAnchor);headerCtEl=me.headerCt.el;minX=headerCtEl.getX()-me.indicatorXOffset;maxX=headerCtEl.getX()+headerCtEl.getWidth();topXY[0]=Ext.Number.constrain(topXY[0],minX,maxX);bottomXY[0]=Ext.Number.constrain(bottomXY[0],minX,maxX);topIndicator.setXY(topXY);bottomIndicator.setXY(bottomXY);topIndicator.show();bottomIndicator.show()}else{me.invalidateDrop()}},invalidateDrop:function(){this.valid=!1;this.hideIndicators()},onNodeOver:function(node,dragZone,e,data){var me=this,from=data.header,doPosition,fromPanel,to,toPanel;if(data.header.el.dom===node){doPosition=!1}else{data.isLock=data.isUnlock=data.crossPanel=!1;to=me.getLocation(e,node).header;doPosition=(from.ownerCt===to.ownerCt);if(!doPosition&&(!from.ownerCt.isSealed()&&!to.ownerCt.isSealed())){doPosition=!0;fromPanel=from.up('tablepanel');toPanel=to.up('tablepanel');if(fromPanel!==toPanel){data.crossPanel=!0;data.isLock=toPanel.isLocked&&!fromPanel.isLocked;data.isUnlock=!toPanel.isLocked&&fromPanel.isLocked;if((data.isUnlock&&from.lockable===!1)||(data.isLock&&!from.isLockable())){doPosition=!1}}}}
if(doPosition){me.positionIndicator(data,node,e)}else{me.valid=!1}
return me.valid?me.dropAllowed:me.dropNotAllowed},hideIndicators:function(){var me=this;me.getTopIndicator().hide();me.getBottomIndicator().hide();me.lastTargetHeader=me.lastDropPos=null},onNodeOut:function(){this.hideIndicators()},getNestedHeader:function(header,first){var items=header.items,pos;if(header.isGroupHeader&&items.length){pos=!first?'first':'last';header=this.getNestedHeader(items[pos](),first)}
return header},onNodeDrop:function(node,dragZone,e,data){this.headerCt.blockNextEvent();if(!this.valid){return}
var me=this,dragHeader=data.header,dropLocation=data.dropLocation,dropPosition=dropLocation.pos,targetHeader=dropLocation.header,fromCt=dragHeader.ownerCt,fromCtRoot=fromCt.getRootHeaderCt(),toCt=targetHeader.ownerCt,visibleColumnManager=me.headerCt.visibleColumnManager,visibleFromIdx=visibleColumnManager.getHeaderIndex(dragHeader),visibleToIdx,colsToMove,scrollerOwner,savedWidth;if(data.isLock||data.isUnlock){scrollerOwner=fromCt.up('[scrollerOwner]');visibleToIdx=toCt.items.indexOf(targetHeader);if(dropPosition==='after'){visibleToIdx++}
if(data.isLock){scrollerOwner.lock(dragHeader,visibleToIdx,toCt)}else{scrollerOwner.unlock(dragHeader,visibleToIdx,toCt)}}else{visibleToIdx=dropPosition==='after'?visibleColumnManager.getHeaderIndex(me.getNestedHeader(targetHeader,1))+1:visibleColumnManager.getHeaderIndex(me.getNestedHeader(targetHeader,0));me.invalidateDrop();savedWidth=dragHeader.getWidth();Ext.suspendLayouts();fromCtRoot.isDDMoveInGrid=!data.crossPanel;if(dragHeader.isGroupHeader&&targetHeader.isGroupHeader){dragHeader.setNestedParent(targetHeader)}
if(dropPosition==='before'){toCt.moveBefore(dragHeader,targetHeader)}else{toCt.moveAfter(dragHeader,targetHeader)}
if(visibleToIdx>=0&&!(targetHeader.isGroupHeader&&(!targetHeader.items||!targetHeader.items.length))&&visibleFromIdx!==visibleToIdx){colsToMove=dragHeader.isGroupHeader?dragHeader.query('gridcolumn:not([hidden]):not([isGroupHeader])').length:1;if((visibleFromIdx<=visibleToIdx)&&colsToMove>1){visibleToIdx-=colsToMove}
toCt.getRootHeaderCt().grid.view.moveColumn(visibleFromIdx,visibleToIdx,colsToMove)}
fromCtRoot.fireEvent('columnmove',fromCt,dragHeader,visibleFromIdx,visibleToIdx);fromCtRoot.isDDMoveInGrid=!1;if(toCt.isGroupHeader&&!fromCt.isGroupHeader){if(fromCt!==toCt){dragHeader.savedFlex=dragHeader.flex;delete dragHeader.flex;dragHeader.width=savedWidth}}else if(!fromCt.isGroupHeader){if(dragHeader.savedFlex){dragHeader.flex=dragHeader.savedFlex;delete dragHeader.width}}
Ext.resumeLayouts(!0);if(me.headerCt.grid.floated){me.headerCt.grid.updateLayout()}}}})
;
Ext.define('Ext.grid.plugin.HeaderReorderer',{extend:'Ext.plugin.Abstract',alias:'plugin.gridheaderreorderer',requires:['Ext.grid.header.DragZone','Ext.grid.header.DropZone'],init:function(headerCt){this.headerCt=headerCt;headerCt.on({boxready:this.onHeaderCtRender,single:!0,scope:this})},destroy:function(){var me=this;me.headerCt.un('boxready',me.onHeaderCtRender,me);Ext.destroy(me.dragZone,me.dropZone);me.headerCt=me.dragZone=me.dropZone=null;me.callParent()},onHeaderCtRender:function(headerCt){var me=this;me.dragZone=new Ext.grid.header.DragZone(me.headerCt);me.dropZone=new Ext.grid.header.DropZone(me.headerCt);if(me.disabled){me.dragZone.disable()}
headerCt.setTouchAction({panX:!1})},enable:function(){this.disabled=!1;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=!0;if(this.dragZone){this.dragZone.disable()}}})
;
Ext.define('Ext.grid.header.Container',{extend:'Ext.container.Container',alias:'widget.headercontainer',requires:['Ext.grid.ColumnLayout','Ext.grid.plugin.HeaderResizer','Ext.grid.plugin.HeaderReorderer','Ext.util.KeyNav'],uses:['Ext.grid.column.Column','Ext.grid.ColumnManager','Ext.menu.Menu','Ext.menu.CheckItem','Ext.menu.Separator'],border:!0,baseCls:Ext.baseCSSPrefix+'grid-header-ct',dock:'top',weight:100,defaultType:'gridcolumn',defaultWidth:100,sortAscText:'Sort Ascending',sortDescText:'Sort Descending',sortClearText:'Clear Sort',columnsText:'Columns',headerOpenCls:Ext.baseCSSPrefix+'column-header-open',menuSortAscCls:Ext.baseCSSPrefix+'hmenu-sort-asc',menuSortDescCls:Ext.baseCSSPrefix+'hmenu-sort-desc',menuColsIcon:Ext.baseCSSPrefix+'cols-icon',blockEvents:!1,dragging:!1,sortOnClick:!0,focusableContainer:!1,childHideCount:0,sortable:!0,enableColumnHide:!0,initComponent:function(){var me=this;me.plugins=me.plugins||[];me.defaults=me.defaults||{};if(!me.isColumn){me.isRootHeader=!0;if(me.enableColumnResize){me.resizer=new Ext.grid.plugin.HeaderResizer();me.plugins.push(me.resizer)}
if(me.enableColumnMove){me.reorderer=new Ext.grid.plugin.HeaderReorderer();me.plugins.push(me.reorderer)}}
if(me.isColumn&&!me.isGroupHeader){if(!me.items||me.items.length===0){me.isContainer=me.isFocusableContainer=!1;if(!me.hasOwnProperty('focusable')){me.focusable=!0}
me.layout={type:'container',calculate:Ext.emptyFn}}}else{me.layout=Ext.apply({type:'gridcolumn',align:'stretch'},me.initialConfig.layout);me.defaults.columnLines=me.columnLines;if(me.isRootHeader){if(!me.hiddenHeaders){me.focusableContainer=!0;me.ariaRole='rowgroup'}
me.columnManager=new Ext.grid.ColumnManager(!1,me);me.visibleColumnManager=new Ext.grid.ColumnManager(!0,me);if(me.grid){me.grid.columnManager=me.columnManager;me.grid.visibleColumnManager=me.visibleColumnManager}}else{me.visibleColumnManager=new Ext.grid.ColumnManager(!0,me);me.columnManager=new Ext.grid.ColumnManager(!1,me)}}
me.menuTask=new Ext.util.DelayedTask(me.updateMenuDisabledState,me);me.callParent()},isNested:function(){return!!this.getRootHeaderCt().down('[isNestedParent]')},isNestedGroupHeader:function(){var header=this,items=header.getRefOwner().query('>:not([hidden])');return(items.length===1&&items[0]===header)},isSealed:function(){return!!(this.sealed||this.getInherited().sealed)},maybeShowNestedGroupHeader:function(){var items=this.items,item;if(items&&items.length===1&&(item=items.getAt(0))&&item.hidden){item.show()}},setNestedParent:function(target){target.isNestedParent=!1;target.ownerCt.isNestedParent=!!(this.ownerCt.items.length===1&&target.ownerCt.items.length===1)},initEvents:function(){var me=this,onHeaderCtEvent,listeners;me.callParent();if(!me.isColumn&&!me.isGroupHeader){onHeaderCtEvent=me.onHeaderCtEvent;listeners={click:onHeaderCtEvent,dblclick:onHeaderCtEvent,contextmenu:onHeaderCtEvent,mousedown:me.onHeaderCtMouseDown,mouseover:me.onHeaderCtMouseOver,mouseout:me.onHeaderCtMouseOut,scope:me};if(Ext.supports.Touch){listeners.longpress=me.onHeaderCtLongPress}
me.mon(me.el,listeners)}},onHeaderCtEvent:function(e,t){var me=this,headerEl=me.getHeaderElByEvent(e),header,targetEl,activeHeader;if(me.longPressFired){me.longPressFired=!1;return}
if(headerEl&&!me.blockEvents){header=Ext.getCmp(headerEl.id);if(header){targetEl=header[header.clickTargetName];if((!header.isGroupHeader&&!header.isContainer)||e.within(targetEl)){if(e.type==='click'||e.type==='tap'){activeHeader=header.onTitleElClick(e,targetEl,me.sortOnClick);if(activeHeader){me.onHeaderTriggerClick(activeHeader,e,e.pointerType==='touch'?activeHeader.el:activeHeader.triggerEl)}else{me.onHeaderClick(header,e,t)}}else if(e.type==='contextmenu'){me.onHeaderContextMenu(header,e,t)}else if(e.type==='dblclick'){header.onTitleElDblClick(e,targetEl.dom)}}}}},blockNextEvent:function(){var me=this;me.blockEvents=!0;if(!me.unblockTimer){me.unblockTimer=Ext.asap(me.unblockEvents,me)}},unblockEvents:function(){this.blockEvents=this.unblockTimer=!1},onHeaderCtMouseDown:function(e,target){var targetCmp=Ext.Component.from(target),cols,i,len,scrollable,col;if(!e.defaultPrevented&&targetCmp!==this){if(targetCmp.isGroupHeader){cols=targetCmp.getVisibleGridColumns();scrollable=this.getScrollable();for(i=0,len=cols.length;i<len;++i){col=cols[i];if(scrollable.doIsInView(col.el,!0).x){targetCmp=col;break}}}
targetCmp.focus()}},onHeaderCtMouseOver:function(e,t){var headerEl,header,targetEl;if(!e.within(this.el,!0)){headerEl=e.getTarget('.'+Ext.grid.column.Column.prototype.baseCls);header=headerEl&&Ext.getCmp(headerEl.id);if(header){targetEl=header[header.clickTargetName];if(e.within(targetEl)){header.onTitleMouseOver(e,targetEl.dom)}}}},onHeaderCtMouseOut:function(e,t){var headerSelector='.'+Ext.grid.column.Column.prototype.baseCls,outHeaderEl=e.getTarget(headerSelector),inHeaderEl=e.getRelatedTarget(headerSelector),header,targetEl;if(outHeaderEl!==inHeaderEl){if(outHeaderEl){header=Ext.getCmp(outHeaderEl.id);if(header){targetEl=header[header.clickTargetName];header.onTitleMouseOut(e,targetEl.dom)}}
if(inHeaderEl){header=Ext.getCmp(inHeaderEl.id);if(header){targetEl=header[header.clickTargetName];header.onTitleMouseOver(e,targetEl.dom)}}}},onHeaderCtLongPress:function(e){var me=this,headerEl=me.getHeaderElByEvent(e),header;if(headerEl){header=Ext.getCmp(headerEl.id);if(header&&!header.menuDisabled){me.longPressFired=!0;me.showMenuBy(e,headerEl,header)}}},getHeaderElByEvent:function(e){return e.getTarget('.'+Ext.grid.column.Column.prototype.baseCls)},isLayoutRoot:function(){if(this.hiddenHeaders){return!1}
return this.callParent()},getRootHeaderCt:function(){return this.isRootHeader?this:this.up('[isRootHeader]')},doDestroy:function(){var me=this;if(me.menu){me.menu.un('hide',me.onMenuHide,me)}
Ext.unasap(me.unblockTimer);me.menuTask.cancel();Ext.destroy(me.visibleColumnManager,me.columnManager,me.menu);me.callParent()},removeAll:function(autoDestroy){var me=this;me.suspendEvent('columnschanged');me.callParent([autoDestroy]);me.resumeEvent('columnschanged');me.fireEvent('columnschanged',me)},applyColumnsState:function(columnsState,storeState){if(!columnsState){return}
var me=this,items=me.items.items,count=items.length,i=0,moved=!1,newOrder=[],newCols=[],length,col,columnState,index;me.purgeCache();for(i=0;i<count;i++){col=items[i];columnState=columnsState[col.getStateId()];if(columnState){index=columnState.index;newOrder[index]=col;if(i!==index){moved=!0}
if(col.applyColumnState){col.applyColumnState(columnState,storeState)}}else{newCols.push({index:i,column:col})}}
newOrder=Ext.Array.clean(newOrder);length=newCols.length;if(length){for(i=0;i<length;i++){columnState=newCols[i];index=columnState.index;if(index<newOrder.length){moved=!0;Ext.Array.splice(newOrder,index,0,columnState.column)}else{newOrder.push(columnState.column)}}}
if(moved){me.applyingState=!0;me.removeAll(!1);delete me.applyingState;me.add(newOrder)}},getColumnsState:function(){var me=this,columns=[],state;me.items.each(function(col){state=col.getColumnState&&col.getColumnState();if(state){columns.push(state)}});return columns},onAdd:function(c){var me=this,rootHeader,stateId=c.getStateId();if(stateId!=null){if(!me._usedIDs){me._usedIDs={}}
if(me._usedIDs[stateId]&&me._usedIDs[stateId]!==c){Ext.log.warn(this.$className+' attempted to reuse an existing id: '+stateId)}
me._usedIDs[stateId]=c}
me.callParent(arguments);rootHeader=me.getRootHeaderCt();me.onHeadersChanged(c,rootHeader&&rootHeader.isDDMoveInGrid)},move:function(fromIdx,toIdx){var me=this,items=me.items,headerToMove;if(fromIdx.isComponent){headerToMove=fromIdx;fromIdx=items.indexOf(headerToMove)}else{headerToMove=items.getAt(fromIdx)}
headerToMove.visibleFromIdx=me.getRootHeaderCt().visibleColumnManager.indexOf(headerToMove);me.callParent(arguments)},onMove:function(headerToMove,fromIdx,toIdx){var me=this,gridHeaderCt=me.getRootHeaderCt(),gridVisibleColumnManager=gridHeaderCt.visibleColumnManager,numColsToMove=1,visibleToIdx;me.onHeadersChanged(headerToMove,!0);visibleToIdx=gridVisibleColumnManager.indexOf(headerToMove);if(visibleToIdx>=headerToMove.visibleFromIdx){visibleToIdx++}
me.callParent(arguments);if(headerToMove.isGroupHeader){numColsToMove=headerToMove.visibleColumnManager.getColumns().length}
gridHeaderCt.onHeaderMoved(headerToMove,numColsToMove,headerToMove.visibleFromIdx,visibleToIdx)},maybeContinueRemove:function(){var me=this;return(me.isGroupHeader&&!me.applyingState)&&!me.isNestedParent&&me.ownerCt&&!me.items.getCount()},onRemove:function(c,isDestroying){var me=this,ownerCt=me.ownerCt;me.callParent([c,isDestroying]);if(!me._usedIDs){me._usedIDs={}}
delete me._usedIDs[c.headerId];if(!me.destroying){if(!me.getRootHeaderCt().isDDMoveInGrid){me.onHeadersChanged(c,!1)}
if(me.maybeContinueRemove()){if(c.rendered){c.detachFromBody()}
me.destroyAfterRemoving=!0;Ext.suspendLayouts();ownerCt.remove(me,!1);Ext.resumeLayouts(!0)}}},onHeadersChanged:function(c,isMove){var gridPanel,gridHeaderCt=this.getRootHeaderCt();this.purgeHeaderCtCache(this);if(gridHeaderCt){gridHeaderCt.onColumnsChanged();gridPanel=gridHeaderCt.ownerCt;if(gridPanel&&!isMove){gridPanel.onHeadersChanged(gridHeaderCt,c)}}},onHeaderMoved:function(header,colsToMove,fromIdx,toIdx){var me=this,gridSection=me.ownerCt;if(me.rendered){if(gridSection&&gridSection.onHeaderMove){gridSection.onHeaderMove(me,header,colsToMove,fromIdx,toIdx)}
me.fireEvent('columnmove',me,header,fromIdx,toIdx)}},onColumnsChanged:function(){var me=this,menu=me.menu,columnItemSeparator,columnItem;if(me.rendered){me.fireEvent('columnschanged',me);if(menu){columnItemSeparator=menu.child('#columnItemSeparator');columnItem=menu.child('#columnItem');if(columnItemSeparator){columnItemSeparator.destroy()}
if(columnItem){columnItem.destroy()}}}},lookupComponent:function(comp){var result=this.callParent(arguments);if(!result.isGroupHeader&&result.width===undefined&&!result.flex){result.width=this.defaultWidth}
return result},setSortState:function(){var store=this.up('[store]').store,columns=this.visibleColumnManager.getColumns(),len=columns.length,i,header,sorter;for(i=0;i<len;i++){header=columns[i];sorter=header.getSorter();if(sorter){if(!store.getSorters().contains(sorter)){sorter=null}}else{sorter=store.getSorters().get(header.getSortParam())}
header.setSortState(sorter)}},getHeaderMenu:function(){var menu=this.getMenu(),item;if(menu){item=menu.child('#columnItem');if(item){return item.menu}}
return null},onHeaderVisibilityChange:function(header,visible){var me=this,menu=me.getHeaderMenu(),item;me.purgeHeaderCtCache(header.ownerCt);if(menu){item=me.getMenuItemForHeader(menu,header);if(item){item.setChecked(visible,!0)}
if(menu.isVisible()){me.menuTask.delay(50)}}},updateMenuDisabledState:function(menu){var me=this,columns=me.query('gridcolumn:not([hidden])'),i,len=columns.length,item,checkItem,method;if(!menu){menu=me.getMenu()}
for(i=0;i<len;++i){item=columns[i];checkItem=me.getMenuItemForHeader(menu,item);if(checkItem){method=item.isHideable()?'enable':'disable';if(checkItem.menu){method+='CheckChange'}
checkItem[method]()}}},getMenuItemForHeader:function(menu,header){return header?menu.down('menucheckitem[headerId='+header.id+']'):null},onHeaderShow:function(header){var me=this,ownerCt=me.ownerCt,lastHiddenHeader=header.lastHiddenHeader;if(!ownerCt){return}
if(me.forceFit){delete me.flex}
if(lastHiddenHeader&&!header.query('[hidden=false]').length){lastHiddenHeader.show();header.lastHiddenHeader=null}
me.onHeaderVisibilityChange(header,!0);ownerCt.onHeaderShow(me,header);me.fireEvent('columnshow',me,header);me.fireEvent('columnschanged',this)},onHeaderHide:function(header){var me=this,ownerCt=me.ownerCt;if(!ownerCt){return}
me.onHeaderVisibilityChange(header,!1);ownerCt.onHeaderHide(me,header);me.fireEvent('columnhide',me,header);me.fireEvent('columnschanged',this)},onHeaderResize:function(header,w){var me=this,gridSection=me.ownerCt;if(gridSection){gridSection.onHeaderResize(me,header,w)}
me.fireEvent('columnresize',me,header,w)},onHeaderClick:function(header,e,t){var me=this,selModel=header.getView().getSelectionModel(),ret;header.fireEvent('headerclick',me,header,e,t);ret=me.fireEvent('headerclick',me,header,e,t);if(ret!==!1){if(selModel.onHeaderClick){selModel.onHeaderClick(me,header,e)}}
return ret},onHeaderContextMenu:function(header,e,t){header.fireEvent('headercontextmenu',this,header,e,t);this.fireEvent('headercontextmenu',this,header,e,t)},onHeaderTriggerClick:function(header,e,t){var me=this;if(header.fireEvent('headertriggerclick',me,header,e,t)!==!1&&me.fireEvent('headertriggerclick',me,header,e,t)!==!1){if(header.activeMenu){if(e.pointerType){header.activeMenu.hide()}else{header.activeMenu.focus()}}else{me.showMenuBy(e,t,header)}}},showMenuBy:function(clickEvent,t,header){var menu=this.getMenu(),ascItem=menu.down('#ascItem'),descItem=menu.down('#descItem'),sortableMth;menu.activeHeader=menu.ownerCmp=header;header.setMenuActive(menu);sortableMth=header.sortable?'enable':'disable';if(ascItem){ascItem[sortableMth]()}
if(descItem){descItem[sortableMth]()}
menu.autoFocus=!clickEvent||clickEvent.keyCode;menu.showBy(t,'tl-bl?');if(!menu.isVisible()){this.onMenuHide(menu)}},hideMenu:function(){if(this.menu){this.menu.hide()}},onMenuHide:function(menu){menu.activeHeader.setMenuActive(!1)},purgeHeaderCtCache:function(headerCt){while(headerCt){headerCt.purgeCache();if(headerCt.isRootHeader){return}
headerCt=headerCt.ownerCt}},purgeCache:function(){var me=this,visibleColumnManager=me.visibleColumnManager,columnManager=me.columnManager;me.gridVisibleColumns=me.gridDataColumns=me.hideableColumns=null;if(visibleColumnManager){visibleColumnManager.invalidate();columnManager.invalidate()}},getMenu:function(){var me=this,grid=me.view&&me.view.ownerGrid;if(!me.menu){me.menu=new Ext.menu.Menu({hideOnParentHide:!1,items:me.getMenuItems(),listeners:{beforeshow:me.beforeMenuShow,hide:me.onMenuHide,scope:me}});me.fireEvent('menucreate',me,me.menu);if(grid){grid.fireEvent('headermenucreate',grid,me.menu,me)}}
return me.menu},beforeMenuShow:function(menu){var me=this,columnItem=menu.child('#columnItem'),hideableColumns,insertPoint;if(!columnItem){hideableColumns=me.enableColumnHide?me.getColumnMenu(me):null;insertPoint=me.sortable?2:0;if(hideableColumns&&hideableColumns.length){menu.insert(insertPoint,[{itemId:'columnItemSeparator',xtype:'menuseparator'},{itemId:'columnItem',text:me.columnsText,iconCls:me.menuColsIcon,menu:{items:hideableColumns},hideOnClick:!1}])}}
me.updateMenuDisabledState(me.menu)},getMenuItems:function(){var me=this,menuItems=[],hideableColumns=me.enableColumnHide?me.getColumnMenu(me):null;if(me.sortable){menuItems=[{itemId:'ascItem',text:me.sortAscText,iconCls:me.menuSortAscCls,handler:me.onSortAscClick,scope:me},{itemId:'descItem',text:me.sortDescText,iconCls:me.menuSortDescCls,handler:me.onSortDescClick,scope:me}]}
if(hideableColumns&&hideableColumns.length){if(me.sortable){menuItems.push({itemId:'columnItemSeparator',xtype:'menuseparator'})}
menuItems.push({itemId:'columnItem',text:me.columnsText,iconCls:me.menuColsIcon,menu:hideableColumns,hideOnClick:!1})}
return menuItems},onSortAscClick:function(){var menu=this.getMenu(),activeHeader=menu.activeHeader;activeHeader.sort('ASC')},onSortDescClick:function(){var menu=this.getMenu(),activeHeader=menu.activeHeader;activeHeader.sort('DESC')},getColumnMenu:function(headerContainer){var menuItems=[],i=0,item,items=headerContainer.query('>gridcolumn[hideable]'),itemsLn=items.length,menuItem;for(;i<itemsLn;i++){item=items[i];menuItem=new Ext.menu.CheckItem({text:item.menuText||item.text,checked:!item.hidden,hideOnClick:!1,headerId:item.id,menu:item.isGroupHeader?this.getColumnMenu(item):undefined,checkHandler:this.onColumnCheckChange,scope:this});menuItems.push(menuItem)}
return menuItems.length?menuItems:null},onColumnCheckChange:function(checkItem,checked){var header=Ext.getCmp(checkItem.headerId);if(header.rendered){header[checked?'show':'hide']()}else{header.hidden=!checked}},getColumnCount:function(){return this.getGridColumns().length},getTableWidth:function(){var fullWidth=0,headers=this.getVisibleGridColumns(),headersLn=headers.length,i;for(i=0;i<headersLn;i++){fullWidth+=headers[i].getCellWidth()||0}
return fullWidth},getVisibleGridColumns:function(){var me=this,allColumns,rootHeader,result,len,i,column;if(me.gridVisibleColumns){return me.gridVisibleColumns}
allColumns=me.getGridColumns();rootHeader=me.getRootHeaderCt();result=[];len=allColumns.length;for(i=0;i<len;i++){column=allColumns[i];if(!column.hidden&&!column.isColumnHidden(rootHeader)){result[result.length]=column}}
me.gridVisibleColumns=result;return result},isColumnHidden:function(rootHeader){var owner=this.getRefOwner();while(owner&&owner!==rootHeader){if(owner.hidden){return!0}
owner=owner.getRefOwner()}
return!1},getGridColumns:function(inResult,hiddenAncestor){if(!inResult&&this.gridDataColumns){return this.gridDataColumns}
var me=this,result=inResult||[],items,i,len,item,lastVisibleColumn;hiddenAncestor=hiddenAncestor||me.hidden;if(me.items){items=me.items.items;if(items){for(i=0,len=items.length;i<len;i++){item=items[i];if(item.isGroupHeader){item.visibleIndex=result.length;item.getGridColumns(result,hiddenAncestor)}else{item.hiddenAncestor=hiddenAncestor;result.push(item)}}}}
if(!inResult){me.gridDataColumns=result}
if(!inResult&&len){for(i=0,len=result.length;i<len;i++){item=result[i];item.fullColumnIndex=i;item.isFirstVisible=item.isLastVisible=!1;if(!(item.hidden||item.hiddenAncestor)){if(!lastVisibleColumn){item.isFirstVisible=!0}
lastVisibleColumn=item}}
if(lastVisibleColumn){lastVisibleColumn.isLastVisible=!0}}
return result},getHideableColumns:function(){var me=this,result=me.hideableColumns;if(!result){result=me.hideableColumns=me.query('[hideable]')}
return result},getHeaderIndex:function(header){if(!this.columnManager){this.columnManager=this.getRootHeaderCt().columnManager}
return this.columnManager.getHeaderIndex(header)},getHeaderAtIndex:function(index){if(!this.columnManager){this.columnManager=this.getRootHeaderCt().columnManager}
return this.columnManager.getHeaderAtIndex(index)},getVisibleHeaderClosestToIndex:function(index){if(!this.visibleColumnManager){this.visibleColumnManager=this.getRootHeaderCt().visibleColumnManager}
return this.visibleColumnManager.getVisibleHeaderClosestToIndex(index)},applyForceFit:function(header){var me=this,view=me.view,minWidth=Ext.grid.plugin.HeaderResizer.prototype.minColWidth,useMinWidthForFlex=!1,defaultWidth=Ext.grid.header.Container.prototype.defaultWidth,availFlex=me.el.dom.clientWidth-(view.el.dom.scrollHeight>view.el.dom.clientHeight?Ext.scrollbar.width():0),totalFlex=0,items=me.getVisibleGridColumns(),hidden=header.hidden,len,i,item,maxAvailFlexOneColumn,myWidth;function getTotalFlex(){for(i=0,len=items.length;i<len;i++){item=items[i];if(item===header){continue}
item.flex=item.flex||item.width||item.getWidth();totalFlex+=item.flex;item.width=null}}
function applyWidth(){var isCurrentHeader;for(i=0,len=items.length;i<len;i++){item=items[i];isCurrentHeader=(item===header);if(useMinWidthForFlex&&!isCurrentHeader){item.flex=minWidth;item.width=null}else if(!isCurrentHeader){myWidth=item.flex||defaultWidth;item.flex=Math.max(Math.ceil((myWidth/totalFlex)*availFlex),minWidth);item.width=null}
item.setWidth(item.width||item.flex)}}
Ext.suspendLayouts();maxAvailFlexOneColumn=(availFlex-((items.length+1)*minWidth));header.flex=null;if(hidden){myWidth=header.width||header.savedWidth||Math.floor(maxAvailFlexOneColumn/(items.length+1));header.savedWidth=null}else{myWidth=view.getMaxContentWidth(header)}
if(myWidth>maxAvailFlexOneColumn){header.width=maxAvailFlexOneColumn;useMinWidthForFlex=!0}else{header.width=myWidth;availFlex-=myWidth+defaultWidth;getTotalFlex()}
applyWidth();Ext.resumeLayouts(!0)},autoSizeColumn:function(header){var view=this.view;if(view){view.autoSizeColumn(header);if(this.forceFit){this.applyForceFit(header)}}},getRefItems:function(deep){var result=this.callParent([deep]);if(this.menu){result.push(this.menu)}
return result},initInheritedState:function(inheritedState,inheritedStateInner){if(this.sealed){inheritedState.sealed=!0}
this.callParent([inheritedState,inheritedStateInner])},privates:{beginChildHide:function(){++this.childHideCount},endChildHide:function(){--this.childHideCount},getFocusables:function(){return this.isRootHeader?this.getVisibleGridColumns():this.items.items},initFocusableContainerKeyNav:function(el){var me=this;if(!me.focusableKeyNav){me.focusableKeyNav=new Ext.util.KeyNav({target:el,scope:me,down:me.showHeaderMenu,left:me.onFocusableContainerLeftKey,right:me.onFocusableContainerRightKey,home:me.onHomeKey,end:me.onEndKey,space:me.onHeaderActivate,enter:me.onHeaderActivate})}},onHomeKey:function(e){return this.focusChild(null,!0,e)},onEndKey:function(e){return this.focusChild(null,!1,e)},showHeaderMenu:function(e){var column=this.getFocusableFromEvent(e);if(column&&column.isColumn&&column.triggerEl){this.onHeaderTriggerClick(column,e,column.triggerEl)}},onHeaderActivate:function(e){var column=this.getFocusableFromEvent(e),view,lastFocused;if(column&&column.isColumn){view=column.getView();if(column.sortable&&this.sortOnClick){lastFocused=view.getNavigationModel().getLastFocused();column.toggleSortState();if(lastFocused){view.ownerCt.ensureVisible(lastFocused.record)}}else if(e.getKey()===e.SPACE){column.onTitleElClick(e,e.target,this.sortOnClick)}
return this.onHeaderClick(column,e,column.el)}},onOwnerGridReconfigure:function(storeChanged,columnsChanged){var me=this;if(!me.rendered||me.destroying||me.destroyed){return}
if(storeChanged||columnsChanged){if(Ext.Component.layoutSuspendCount){me.$initFocusableContainerAfterLayout=!0}else{me.initFocusableContainer()}}}}})
;
Ext.define('Ext.grid.column.Column',{extend:'Ext.grid.header.Container',xtype:'gridcolumn',requires:['Ext.grid.ColumnComponentLayout','Ext.grid.ColumnLayout','Ext.app.bind.Parser'],alternateClassName:'Ext.grid.Column',config:{triggerVisible:!1,sorter:null,align:'start'},baseCls:Ext.baseCSSPrefix+'column-header',hoverCls:Ext.baseCSSPrefix+'column-header-over',ariaRole:'columnheader',focusableContainer:!1,sortState:null,possibleSortStates:['ASC','DESC'],ariaSortStates:{ASC:'ascending',DESC:'descending'},childEls:['titleEl','triggerEl','textEl','textContainerEl','textInnerEl'],headerWrap:!1,renderTpl:['<div id="{id}-titleEl" data-ref="titleEl" role="presentation"','{tipMarkup}class="',Ext.baseCSSPrefix,'column-header-inner<tpl if="!$comp.isContainer"> ',Ext.baseCSSPrefix,'leaf-column-header</tpl>','<tpl if="empty"> ',Ext.baseCSSPrefix,'column-header-inner-empty</tpl>">','<div id="{id}-textContainerEl" data-ref="textContainerEl" role="presentation" class="',Ext.baseCSSPrefix,'column-header-text-container">','<div role="presentation" class="',Ext.baseCSSPrefix,'column-header-text-wrapper">','<div id="{id}-textEl" data-ref="textEl" role="presentation" class="',Ext.baseCSSPrefix,'column-header-text','{childElCls}">','<span id="{id}-textInnerEl" data-ref="textInnerEl" role="presentation" class="',Ext.baseCSSPrefix,'column-header-text-inner">{text}</span>','</div>','{%','values.$comp.afterText(out, values);','%}','</div>','</div>','<tpl if="!menuDisabled">','<div id="{id}-triggerEl" data-ref="triggerEl" role="presentation" unselectable="on" class="',Ext.baseCSSPrefix,'column-header-trigger','{childElCls}" style="{triggerStyle}"></div>','</tpl>','</div>','{%this.renderContainer(out,values)%}'],dataIndex:null,text:'\u00a0',menuText:null,emptyCellText:'\u00a0',sortable:!0,resizable:!0,hideable:!0,menuDisabled:!1,renderer:!1,draggable:!0,tooltipType:'qtip',initDraggable:Ext.emptyFn,tdCls:'',dirtyText:"Cell value has been edited",producesHTML:!0,ignoreExport:!1,exportStyle:null,exportRenderer:!1,exportSummaryRenderer:!1,isHeader:!0,isColumn:!0,scrollable:!1,requiresMenu:!1,tabIndex:-1,ascSortCls:Ext.baseCSSPrefix+'column-header-sort-ASC',descSortCls:Ext.baseCSSPrefix+'column-header-sort-DESC',componentLayout:'columncomponent',groupSubHeaderCls:Ext.baseCSSPrefix+'group-sub-header',groupHeaderCls:Ext.baseCSSPrefix+'group-header',clickTargetName:'titleEl',detachOnRemove:!0,initResizable:Ext.emptyFn,rendererNames:{column:'renderer',edit:'editRenderer',summary:'summaryRenderer'},formatterNames:{column:'formatter',edit:'editFormatter',summary:'summaryFormatter'},initComponent:function(){var me=this;if(!me.rendererScope){me.rendererScope=me.scope}
if(me.header!=null){me.text=me.header;me.header=null}
if(me.cellWrap){me.tdCls=(me.tdCls||'')+' '+Ext.baseCSSPrefix+'wrap-cell'}
if(me.columns!=null){me.isGroupHeader=!0;me.ariaRole='presentation';if(me.dataIndex){Ext.raise('Ext.grid.column.Column: Group header may not accept a dataIndex')}
if((me.width&&me.width!==Ext.grid.header.Container.prototype.defaultWidth)){Ext.raise('Ext.grid.column.Column: Group header does not support '+'setting explicit widths. A group header either shrinkwraps '+'its children, or must be flexed.')}
me.items=me.columns;me.columns=null;me.cls=(me.cls||'')+' '+me.groupHeaderCls;me.sortable=me.resizable=!1;me.align='center'}else{if(me.flex){me.minWidth=me.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}}
me.addCls(Ext.baseCSSPrefix+'column-header-align-'+me.getMappedAlignment(me.align));me.setupRenderer();me.setupRenderer('edit');me.setupRenderer('summary');me.callParent()},beforeLayout:function(){var me=this,items=me.items,colCount=0,flex=me.flex,len,i,item,hasFlexedChildren;if(flex&&me.isGroupHeader){if(!Ext.isArray(items)){items=items.items}
len=items.length;for(i=0;!hasFlexedChildren&&i<len;i++){item=items[i];if(item.isColumn&&!item.hidden){++colCount;hasFlexedChildren=item.flex}}
if(!hasFlexedChildren&&colCount){me.savedFlex=flex;me.flex=null}}
me.callParent()},onAdded:function(container,pos,instanced){var me=this;me.callParent([container,pos,instanced]);me.view=me.rootHeaderCt=me.cellSelector=me.visibleIndex=null;if(!me.headerId){me.calculateHeaderId()}
me.configureStateInfo()},_initSorterFn:function(a,b){var sorter=this,column=sorter.column,scope=column.resolveListenerScope(),name=sorter.methodName,fn=scope&&scope[name],ret=0;if(fn){sorter.setSorterFn(fn);sorter.column=null;ret=fn.call(scope,a,b)}else if(!scope){Ext.raise('Cannot resolve scope for column '+column.id)}else{Ext.raise('No such method "'+name+'" on '+scope.$className)}
return ret},applySorter:function(sorter){var me=this,sorterFn=sorter?sorter.sorterFn:null,tablepanel,ret;if(typeof sorterFn==='string'){ret=new Ext.util.Sorter(Ext.applyIf({sorterFn:me._initSorterFn},sorter));ret.methodName=sorterFn;ret.column=me}else{tablepanel=me.getRootHeaderCt().up('tablepanel');ret=tablepanel.store.getData().getSorters().decodeSorter(sorter)}
return ret},updateAlign:function(align){this.textAlign=this.getMappedAlignment(align)},bindFormatter:function(format){var me=this;return function(v){return format(v,me.rendererScope||me.resolveListenerScope())}},bindRenderer:function(renderer){var me=this;if(renderer in Ext.util.Format){Ext.log.warn('Use "formatter" config instead of "renderer" to use '+'Ext.util.Format to format cell values')}
me.hasCustomRenderer=!0;return function(){return Ext.callback(renderer,me.rendererScope,arguments,0,me)}},setupRenderer:function(type){var me=this,format,renderer,isColumnRenderer,parser,dynamic;type=type||'column';format=me[me.formatterNames[type]];renderer=me[me.rendererNames[type]];isColumnRenderer=type==='column';if(!format){if(renderer){if(typeof renderer==='string'){renderer=me[me.rendererNames[type]]=me.bindRenderer(renderer);dynamic=!0}
if(isColumnRenderer){me.hasCustomRenderer=dynamic||me.shouldFlagCustomRenderer(renderer)}}else if(isColumnRenderer&&me.defaultRenderer){me.renderer=me.defaultRenderer;me.usingDefaultRenderer=!0}}else{parser=Ext.app.bind.Parser.fly(format);format=parser.compileFormat();parser.release();me[me.formatterNames[type]]=null;me[me.rendererNames[type]]=me.bindFormatter(format)}},getView:function(){var rootHeaderCt;if(!this.view){rootHeaderCt=this.getRootHeaderCt();if(rootHeaderCt){this.view=rootHeaderCt.view}}
return this.view},onFocusLeave:function(e){this.callParent([e]);if(this.activeMenu){this.activeMenu.hide()}},initItems:function(){var me=this;me.callParent(arguments);if(me.isGroupHeader){if(me.config.hidden||!me.hasVisibleChildColumns()){me.hide()}}},hasVisibleChildColumns:function(){var items=this.items.items,len=items.length,i,item;for(i=0;i<len;++i){item=items[i];if(item.isColumn&&!item.hidden){return!0}}
return!1},onAdd:function(child){var me=this;if(child.isColumn){child.isSubHeader=!0;child.addCls(me.groupSubHeaderCls)}
if(me.isGroupHeader&&me.hidden&&me.hasVisibleChildColumns()){me.show()}
me.callParent([child])},onRemove:function(child,isDestroying){var me=this;if(child.isSubHeader){child.isSubHeader=!1;child.removeCls(me.groupSubHeaderCls)}
me.callParent([child,isDestroying]);if(!(me.destroyed||me.destroying)&&!me.hasVisibleChildColumns()&&(me.ownerCt&&!me.ownerCt.isNested())){me.hide()}},initRenderData:function(){var me=this,tipMarkup='',tip=me.tooltip,text=me.text,attr=me.tooltipType==='qtip'?'data-qtip':'title';if(!Ext.isEmpty(tip)){tipMarkup=attr+'="'+tip+'" '}
return Ext.applyIf(me.callParent(arguments),{text:text,empty:me.isEmptyText(text),menuDisabled:me.menuDisabled,tipMarkup:tipMarkup,triggerStyle:this.getTriggerVisible()?'display:block':''})},applyColumnState:function(state,storeState){var me=this,sorter=me.getSorter(),stateSorters=storeState&&storeState.sorters,len,i,savedSorter,mySorterId;if(sorter&&stateSorters&&(len=stateSorters.length)){mySorterId=sorter.getId();for(i=0;!savedSorter&&i<len;i++){if(stateSorters[i].id===mySorterId){sorter.setDirection(stateSorters[i].direction);stateSorters[i]=sorter;break}}}
me.applyColumnsState(state.columns);if(state.hidden!=null){me.hidden=state.hidden}
if(state.locked!=null){me.locked=state.locked}
if(state.sortable!=null){me.sortable=state.sortable}
if(state.width!=null){me.flex=null;me.width=state.width}else if(state.flex!=null){me.width=null;me.flex=state.flex}},getColumnState:function(){var me=this,items=me.items.items,state={id:me.getStateId()};me.savePropsToState(['hidden','sortable','locked','flex','width'],state);if(me.isGroupHeader&&items&&items.length){state.columns=me.getColumnsState()}
if('width' in state){delete state.flex}
return state},setText:function(text){var me=this,grid;me.text=text;if(me.rendered){grid=me.getView().ownerGrid;me.textInnerEl.setHtml(text);me.titleEl.toggleCls(Ext.baseCSSPrefix+'column-header-inner-empty',me.isEmptyText(text));grid.syncHeaderVisibility()}},getIndex:function(){return this.isGroupColumn?!1:this.getRootHeaderCt().getHeaderIndex(this)},getVisibleIndex:function(){return this.visibleIndex!=null?this.visibleIndex:this.isGroupColumn?!1:Ext.Array.indexOf(this.getRootHeaderCt().getVisibleGridColumns(),this)},getLabelChain:function(){var child=this,labels=[],parent;while((parent=child.up('headercontainer'))){if(parent.text){labels.unshift(Ext.util.Format.stripTags(parent.text))}
child=parent}
return labels},beforeRender:function(){var me=this,rootHeaderCt=me.getRootHeaderCt(),isSortable=me.isSortable(),labels=[],ariaAttr;me.textAlign=me.getMappedAlignment(me.getAlign());me.callParent();if(!me.requiresMenu&&!isSortable&&!me.groupable&&!me.lockable&&(rootHeaderCt.grid.enableColumnHide===!1||!rootHeaderCt.getHideableColumns().length)){me.menuDisabled=!0}
if(me.cellWrap){me.variableRowHeight=!0}
ariaAttr=me.ariaRenderAttributes||(me.ariaRenderAttributes={});ariaAttr['aria-readonly']=!0;if(isSortable){ariaAttr['aria-sort']=me.ariaSortStates[me.sortState]}
if(me.isSubHeader){labels=me.getLabelChain();if(me.text){labels.push(Ext.util.Format.stripTags(me.text))}
if(labels.length){ariaAttr['aria-label']=labels.join(' ')}}
me.protoEl.unselectable()},getTriggerElWidth:function(){var me=this,triggerEl=me.triggerEl,width=me.self.triggerElWidth;if(triggerEl&&width===undefined){triggerEl.setStyle('display','block');width=me.self.triggerElWidth=triggerEl.getWidth();triggerEl.setStyle('display','')}
return width},afterComponentLayout:function(width,height,oldWidth,oldHeight){var me=this,rootHeaderCt=me.getRootHeaderCt(),savedFlex=me.savedFlex;me.callParent([width,height,oldWidth,oldHeight]);if(rootHeaderCt&&(oldWidth!=null||me.flex)&&width!==oldWidth){rootHeaderCt.onHeaderResize(me,width)}
if(savedFlex){me.flex=savedFlex;delete me.savedFlex}},doDestroy:function(){Ext.destroy(this.field,this.editor);this.callParent()},onTitleMouseOver:function(){this.titleEl.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleEl.removeCls(this.hoverCls)},onDownKey:function(e){if(this.triggerEl){this.onTitleElClick(e,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(e){this.onTitleElClick(e,this.el.dom)},onTitleElDblClick:function(e){var me=this,prev,leafColumns,headerCt;if(me.isAtStartEdge(e)){prev=me.previousNode('gridcolumn:not([hidden]):not([isGroupHeader])');if(prev&&prev.getRootHeaderCt()===me.getRootHeaderCt()){prev.autoSize()}}else if(me.isAtEndEdge(e)){if(me.isGroupHeader&&e.getPoint().isContainedBy(me.layout.innerCt)){leafColumns=me.query('gridcolumn:not([hidden]):not([isGroupHeader])');leafColumns[leafColumns.length-1].autoSize();return}else{headerCt=me.getRootHeaderCt();if(headerCt.visibleColumnManager.getColumns().length===1&&headerCt.forceFit){return}}
me.autoSize()}},autoSize:function(){var me=this,leafColumns,numLeaves,i,headerCt;if(me.resizable){if(me.isGroupHeader){leafColumns=me.query('gridcolumn:not([hidden]):not([isGroupHeader])');numLeaves=leafColumns.length;headerCt=me.getRootHeaderCt();Ext.suspendLayouts();for(i=0;i<numLeaves;i++){headerCt.autoSizeColumn(leafColumns[i])}
Ext.resumeLayouts(!0);return}
me.getRootHeaderCt().autoSizeColumn(me)}},isEmptyText:function(text,visual){if(visual){return Ext.String.trim(text).length===0}else{return text==null||text===''}},onTitleElClick:function(e,t,sortOnClick){var me=this,activeHeader,prevSibling,tapMargin;if(e.pointerType==='touch'){prevSibling=me.previousSibling(':not([hidden])');if(!me.menuDisabled){tapMargin=parseInt(me.triggerEl.getStyle('width'),10);if(isNaN(tapMargin)){tapMargin=me.getHandleWidth(e)*3}
if(me.isAtEndEdge(e,tapMargin)){activeHeader=me}}
if(!activeHeader&&prevSibling&&!prevSibling.menuDisabled&&me.isAtStartEdge(e)){activeHeader=prevSibling}}else{activeHeader=me.triggerEl&&(e.target===me.triggerEl.dom||t===me.triggerEl||e.within(me.triggerEl))?me:null}
if(sortOnClick!==!1&&(!activeHeader&&!me.isAtStartEdge(e)&&!me.isAtEndEdge(e)||e.getKey())){me.toggleSortState()}
return activeHeader},processEvent:function(type,view,cell,recordIndex,cellIndex,e){return this.fireEvent.apply(this,arguments)},isSortable:function(){var rootHeader=this.getRootHeaderCt(),grid=rootHeader?rootHeader.grid:null,sortable=this.sortable;if(grid&&grid.sortableColumns===!1){sortable=!1}
return sortable},toggleSortState:function(){if(this.isSortable()){this.sort()}},sort:function(direction){var me=this,grid=me.up('tablepanel'),store=grid.store,storeIsSorted=store.isSorted(),storeSorters=storeIsSorted&&store.getSorters(),sorter=me.getSorter(),idx=storeSorters&&storeSorters.indexOf(sorter),currentDirection;Ext.suspendLayouts();if(sorter){currentDirection=sorter.getDirection();if(!direction||currentDirection!==direction||!storeIsSorted||idx===-1){if((!storeIsSorted||idx===-1)&&currentDirection!==direction){sorter.setDirection(direction)}
store.sort(sorter,grid.multiColumnSort?'multi':'replace')}}else{store.sort(me.getSortParam(),direction,grid.multiColumnSort?'multi':'replace')}
Ext.resumeLayouts(!0)},getSortParam:function(){return this.dataIndex},setSortState:function(sorter){var me=this,direction=sorter&&sorter.getDirection(),ascCls=me.ascSortCls,descCls=me.descSortCls,rootHeaderCt=me.getRootHeaderCt(),ariaDom=me.ariaEl.dom,changed;switch(direction){case 'DESC':if(!me.hasCls(descCls)){me.addCls(descCls);me.sortState='DESC';changed=!0}
me.removeCls(ascCls);break;case 'ASC':if(!me.hasCls(ascCls)){me.addCls(ascCls);me.sortState='ASC';changed=!0}
me.removeCls(descCls);break;default:me.removeCls([ascCls,descCls]);me.sortState=null;break}
if(ariaDom){if(me.sortState){ariaDom.setAttribute('aria-sort',me.ariaSortStates[me.sortState])}else{ariaDom.removeAttribute('aria-sort')}}
if(changed){rootHeaderCt.fireEvent('sortchange',rootHeaderCt,me,direction)}},isHideable:function(){var result={hideCandidate:this,result:this.hideable};if(result.result){this.ownerCt.bubble(this.hasOtherMenuEnabledChildren,null,[result])}
return result.result},hasOtherMenuEnabledChildren:function(result){var visibleChildren,count;if(!this.isXType('headercontainer')){result.result=!1;return!1}
visibleChildren=this.query('>gridcolumn:not([hidden]):not([menuDisabled])');count=visibleChildren.length;if(Ext.Array.contains(visibleChildren,result.hideCandidate)){count--}
if(count){return!1}
result.hideCandidate=this},isLockable:function(){var result={result:this.lockable!==!1};if(result.result){this.ownerCt.bubble(this.hasMultipleVisibleChildren,null,[result])}
return result.result},isLocked:function(){if(this.locked==null){this.locked=this.getInherited().inLockedGrid}
return this.locked},hasMultipleVisibleChildren:function(result){if(!this.isXType('headercontainer')){result.result=!1;return!1}
if(this.query('>gridcolumn:not([hidden])').length>1){return!1}},hide:function(){var me=this,rootHeaderCt=me.getRootHeaderCt(),owner=me.getRefOwner();if(owner.constructing){me.callParent();return me}
if(me.rendered&&!me.isVisible()){return me}
if(rootHeaderCt.forceFit){me.visibleSiblingCount=rootHeaderCt.getVisibleGridColumns().length-1;if(me.flex){me.savedWidth=me.getWidth();me.flex=null}}
rootHeaderCt.beginChildHide();Ext.suspendLayouts();if(owner.isGroupHeader){if(me.isNestedGroupHeader()){owner.hide()}
if(me.isSubHeader&&!me.isGroupHeader&&owner.query('>gridcolumn:not([hidden])').length===1){owner.lastHiddenHeader=me}}
me.callParent();rootHeaderCt.endChildHide();rootHeaderCt.onHeaderHide(me);Ext.resumeLayouts(!0);return me},show:function(){var me=this,rootHeaderCt=me.getRootHeaderCt(),ownerCt=me.getRefOwner();if(me.isVisible()){return me}
if(ownerCt.isGroupHeader){ownerCt.lastHiddenHeader=null}
if(me.rendered){if(rootHeaderCt.forceFit){rootHeaderCt.applyForceFit(me)}}
Ext.suspendLayouts();if(me.isSubHeader&&ownerCt.hidden){ownerCt.show(!1,!0)}
me.callParent(arguments);if(me.isGroupHeader){me.maybeShowNestedGroupHeader()}
ownerCt=me.getRootHeaderCt();if(ownerCt){ownerCt.onHeaderShow(me)}
Ext.resumeLayouts(!0);return me},shouldUpdateCell:function(record,changedFieldNames){var len,i,field;if(!this.preventUpdate){if(this.hasCustomRenderer){return 1}
if(changedFieldNames){len=changedFieldNames.length;for(i=0;i<len;++i){field=changedFieldNames[i];if(field===this.dataIndex||field===record.idProperty){return 2}}}else{return 2}}},getCellWidth:function(){var me=this,result;if(me.rendered&&me.componentLayout&&me.componentLayout.lastComponentSize){result=me.componentLayout.lastComponentSize.width}else if(me.width){result=me.width}else if(!me.isColumn){result=me.getTableWidth()}
return result},getCellId:function(){return Ext.baseCSSPrefix+'grid-cell-'+this.getItemId()},getCellSelector:function(){var view;if(!this.cellSelector){view=this.getView();this.cellSelector=(view?view.getCellSelector():'')+'.'+this.getCellId()}
return this.cellSelector},getCellInnerSelector:function(){return this.getCellSelector()+' .'+Ext.baseCSSPrefix+'grid-cell-inner'},isAtStartEdge:function(e){var offset=e.getXY()[0]-this.getX();if(offset<0&&this.getIndex()===0){return!1}
return(offset<this.getHandleWidth(e))},isAtEndEdge:function(e,margin){return(this.getX()+this.getWidth()-e.getXY()[0]<=(margin||this.getHandleWidth(e)))},getHandleWidth:function(e){return e.pointerType==='touch'?10:4},setMenuActive:function(menu){this.activeMenu=menu;this.titleEl[menu?'addCls':'removeCls'](this.headerOpenCls)},privates:{_alignMap:{start:'left',end:'right'},afterText:function(out,values){if(this.dirtyText){this.dirtyTextElementId=this.id+'-dirty-cell-text';out.push('<span id="'+this.dirtyTextElementId+'" class="'+Ext.baseCSSPrefix+'hidden-offsets">'+this.dirtyText+'</span>')}},calculateHeaderId:function(){var me=this,ownerGrid,counterOwner,items,item,i,len;if(!me.headerId){ownerGrid=me.up('tablepanel');if(!ownerGrid){return}
items=me.items.items;if(items){for(i=0,len=items.length;i<len;++i){item=items[i];if(item.isColumn){item.calculateHeaderId()}}}
counterOwner=ownerGrid?ownerGrid.ownerGrid:me.getRootHeaderCt();counterOwner.headerCounter=(counterOwner.headerCounter||0)+1;me.headerId='h'+counterOwner.headerCounter}
me.configureStateInfo()},getMappedAlignment:function(align){return this._alignMap[align]||align},configureStateInfo:function(){var me=this,sorter;if(!me.stateId){me.stateId=me.initialConfig.id||me.headerId}
sorter=me.getSorter();if(!me.hasSetSorter&&sorter&&!sorter.initialConfig.id){if(me.dataIndex||me.stateId){sorter.setId((me.dataIndex||me.stateId)+'-sorter');me.hasSetSorter=!0}}},onLock:function(header){var items=this.items.items,len=items.length,i,item;for(i=0;i<len;++i){item=items[i];if(item.isColumn){item.onLock(header)}}},onUnlock:function(header){var items=this.items.items,len=items.length,i,item;for(i=0;i<len;++i){item=items[i];if(item.isColumn){item.onUnlock(header)}}},shouldFlagCustomRenderer:function(renderer){return renderer.length>1}},deprecated:{5:{methods:{bindRenderer:function(renderer){return function(value){return Ext.util.Format[renderer](value)}}}}}})
;
Ext.define('Ext.rtl.grid.column.Column',{override:'Ext.grid.column.Column',beforeRender:function(){var me=this;if(me.getInherited().rtl){me._alignMap=me._rtlAlignMap}
me.callParent()},isAtStartEdge:function(e,margin){var me=this,offset;if(!me.getInherited().rtl!==!Ext.rootInheritedState.rtl){offset=me.getX()+me.getWidth()-e.getXY()[0];if(offset<0&&this.getIndex()===0){return!1}
return(offset<=me.getHandleWidth(e))}else{return me.callParent([e,margin])}},isAtEndEdge:function(e,margin){var me=this;return(!me.getInherited().rtl!==!Ext.rootInheritedState.rtl)?(e.getXY()[0]-me.getX()<=me.getHandleWidth(e)):me.callParent([e,margin])},privates:{_rtlAlignMap:{start:'right',end:'left'}}})
;
Ext.define('Ext.theme.triton.grid.column.Column',{override:'Ext.grid.column.Column',compatibility:Ext.isIE8,onTitleMouseOver:function(){var triggerEl=this.triggerEl;this.callParent(arguments);if(triggerEl){triggerEl.syncRepaint()}}})
;
Ext.define('Ext.grid.column.ActionProxy',{constructor:function(column,item,itemIndex){this.column=column;this.item=item;this.itemIndex=itemIndex},setHandler:function(handler){this.item.handler=handler},setDisabled:function(disabled){if(disabled){this.column.disableAction(this.itemIndex)}else{this.column.enableAction(this.itemIndex)}},setIconCls:function(iconCls){this.item.iconCls=iconCls;this.column.getView().refreshView()},setIconGlyph:function(glyph){this.item.glyph=glyph;this.column.getView().refreshView()},setHidden:function(hidden){this.item.hidden=hidden;this.column.getView().refreshView()},setVisible:function(visible){this.setHidden(!visible)},on:function(){return this.column.on.apply(this.column,arguments)}})
;
Ext.define('Ext.grid.column.Action',{extend:'Ext.grid.column.Column',alias:['widget.actioncolumn'],alternateClassName:'Ext.grid.ActionColumn',requires:['Ext.grid.column.ActionProxy','Ext.util.Format','Ext.Glyph'],stopSelection:!0,actionIdRe:new RegExp(Ext.baseCSSPrefix+'action-col-(\\d+)'),altText:'',menuText:'<i>Actions</i>',itemTabIndex:0,itemAriaRole:'button',maskOnDisable:!1,ignoreExport:!0,sortable:!1,innerCls:Ext.baseCSSPrefix+'grid-cell-inner-action-col',actionIconCls:Ext.baseCSSPrefix+'action-col-icon',constructor:function(config){var me=this,cfg=Ext.apply({},config),items=cfg.items||me.items||[me],hasGetClass,i,len,item;me.origRenderer=cfg.renderer||me.renderer;me.origScope=cfg.scope||me.scope;me.renderer=me.scope=cfg.renderer=cfg.scope=null;cfg.items=null;me.callParent([cfg]);if(me.hasOwnProperty('isDisabled')){Ext.log.warn('[Ext.grid.column.Action] The isDisabled config is deprecated. '+'Use isActionDisabled to avoid conflict with Ext.Component#isDisabled().');me.isActionDisabled=me.isDisabled;delete me.isDisabled}
me.items=items;for(i=0,len=items.length;i<len;++i){item=items[i];if(item.substr&&item[0]==='@'){item=me.getAction(item.substr(1))}
if(item.hasOwnProperty('isDisabled')){Ext.log.warn('[Ext.grid.column.Action] The isDisabled config is deprecated. '+'Use isActionDisabled to avoid conflict with Ext.Component#isDisabled().');item.isActionDisabled=item.isDisabled;delete item.isDisabled}
if(item.isAction){items[i]=item.initialConfig;item.addComponent(new Ext.grid.column.ActionProxy(me,items[i],i))}
if(item.getClass){hasGetClass=!0}}
if(me.origRenderer||hasGetClass){me.hasCustomRenderer=!0}},initComponent:function(){var me=this;me.callParent();if(me.sortable&&!me.dataIndex){me.sortable=!1}},defaultRenderer:function(v,cellValues,record,rowIdx,colIdx,store,view){var me=this,scope=me.origScope||me,items=me.items,len=items.length,i,item,ret,disabled,tooltip,altText,icon,glyph,tabIndex,ariaRole;ret=Ext.isFunction(me.origRenderer)?me.origRenderer.apply(scope,arguments)||'':'';cellValues.tdCls+=' '+Ext.baseCSSPrefix+'action-col-cell';for(i=0;i<len;i++){item=items[i];icon=item.icon;glyph=item.glyph;disabled=item.disabled||(item.isActionDisabled?Ext.callback(item.isActionDisabled,item.scope||me.origScope,[view,rowIdx,colIdx,item,record],0,me):!1);tooltip=item.tooltip||(item.getTip?Ext.callback(item.getTip,item.scope||me.origScope,arguments,0,me):null);altText=item.getAltText?Ext.callback(item.getAltText,item.scope||me.origScope,arguments,0,me):item.altText||me.altText;if(!item.hasActionConfiguration){item.stopSelection=me.stopSelection;item.disable=Ext.Function.bind(me.disableAction,me,[i],0);item.enable=Ext.Function.bind(me.enableAction,me,[i],0);item.hasActionConfiguration=!0}
if(glyph){glyph=Ext.Glyph.fly(glyph)}
tabIndex=(item!==me&&item.tabIndex!==undefined)?item.tabIndex:me.itemTabIndex;ariaRole=(item!==me&&item.ariaRole!==undefined)?item.ariaRole:me.itemAriaRole;ret+='<'+(icon?'img':'div')+(typeof tabIndex==='number'?' tabIndex="'+tabIndex+'"':'')+(ariaRole?' role="'+ariaRole+'"':' role="presentation"')+(icon?(' alt="'+altText+'" src="'+item.icon+'"'):'')+' class="'+me.actionIconCls+' '+Ext.baseCSSPrefix+'action-col-'+String(i)+' '+(disabled?me.disabledCls+' ':' ')+(item.hidden?Ext.baseCSSPrefix+'hidden-display ':'')+(item.getClass?Ext.callback(item.getClass,item.scope||me.origScope,arguments,undefined,me):(item.iconCls||me.iconCls||''))+'"'+(tooltip?' data-qtip="'+Ext.util.Format.htmlEncode(tooltip)+'"':'')+(icon?'/>':glyph?(' style="font-family:'+glyph.fontFamily+'">'+glyph.character+'</div>'):'></div>')}
return ret},updater:function(cell,value,record,view,dataSource){var cellValues={};Ext.fly(cell).addCls(cellValues.tdCls).down(this.getView().innerSelector,!0).innerHTML=this.defaultRenderer(value,cellValues,record,null,null,dataSource,view)},enableAction:function(index,silent){var me=this;if(!index){index=0}else if(!Ext.isNumber(index)){index=Ext.Array.indexOf(me.items,index)}
me.items[index].disabled=!1;me.up('tablepanel').el.select('.'+Ext.baseCSSPrefix+'action-col-'+index).removeCls(me.disabledCls);if(!silent){me.fireEvent('enable',me)}},disableAction:function(index,silent){var me=this;if(!index){index=0}else if(!Ext.isNumber(index)){index=Ext.Array.indexOf(me.items,index)}
me.items[index].disabled=!0;me.up('tablepanel').el.select('.'+Ext.baseCSSPrefix+'action-col-'+index).addCls(me.disabledCls);if(!silent){me.fireEvent('disable',me)}},doDestroy:function(){this.renderer=this.items=null;return this.callParent()},processEvent:function(type,view,cell,recordIndex,cellIndex,e,record,row){var me=this,target=e.getTarget(),key=type==='keydown'&&e.getKey(),match,item,disabled,cellFly=Ext.fly(cell),oldActiveEl;e.stopSelection=!key&&me.stopSelection;if(key&&(target===cell||!cellFly.contains(target))){target=cellFly.query('.'+me.actionIconCls,!0);if(target.length===1){target=target[0]}else{return}}
if(target&&(match=target.className.match(me.actionIdRe))){item=me.items[parseInt(match[1],10)];disabled=item.disabled||(item.isActionDisabled?Ext.callback(item.isActionDisabled,item.scope||me.origScope,[view,recordIndex,cellIndex,item,record],0,me):!1);if(item&&!disabled){if(type==='mousedown'&&!me.getView().actionableMode){e.preventDefault()}else if(type==='click'||(key===e.ENTER||key===e.SPACE)){oldActiveEl=Ext.Element.getActiveElement();Ext.callback(item.handler||me.handler,item.scope||me.origScope,[view,recordIndex,cellIndex,item,e,record,row],undefined,me);if(view.destroyed){return!1}else{if(!e.position.getNode(!0)){e.position.refresh()}
if(Ext.Element.getActiveElement()!==oldActiveEl){return!1}}}}}
return me.callParent(arguments)},cascade:function(fn,scope){fn.call(scope||this,this)},getRefItems:function(){return[]},contains:function(){return!1},privates:{getFocusables:function(){return[]},shouldUpdateCell:function(){return 2}}})
;
Ext.define('Ext.grid.column.Boolean',{extend:'Ext.grid.column.Column',alias:['widget.booleancolumn'],alternateClassName:'Ext.grid.BooleanColumn',trueText:'true',falseText:'false',undefinedText:'\u00a0',defaultFilterType:'boolean',producesHTML:!1,defaultRenderer:function(value){if(value===undefined){return this.undefinedText}
if(!value||value==='false'){return this.falseText}
return this.trueText},updater:function(cell,value){Ext.fly(cell).down(this.getView().innerSelector,!0).innerHTML=Ext.grid.column.Boolean.prototype.defaultRenderer.call(this,value)}})
;
Ext.define('Ext.grid.column.Check',{extend:'Ext.grid.column.Column',alternateClassName:['Ext.ux.CheckColumn','Ext.grid.column.CheckColumn'],alias:'widget.checkcolumn',isCheckColumn:!0,config:{headerCheckbox:!1},align:'center',triggerEvent:'click',invert:!1,ignoreExport:!0,stopSelection:!0,headerCheckedCls:Ext.baseCSSPrefix+'grid-hd-checker-on',headerCheckboxCls:Ext.baseCSSPrefix+'column-header-checkbox',checkboxCls:Ext.baseCSSPrefix+'grid-checkcolumn',checkboxCheckedCls:Ext.baseCSSPrefix+'grid-checkcolumn-checked',innerCls:Ext.baseCSSPrefix+'grid-checkcolumn-cell-inner',clickTargetName:'el',defaultFilterType:'boolean',checkboxAriaRole:'button',constructor:function(config){this.scope=this;this.callParent([config])},afterComponentLayout:function(){var me=this;me.callParent(arguments);if(me.useAriaElements&&me.headerCheckbox){me.updateHeaderAriaDescription(me.areAllChecked())}
if(!me.storeListeners){me.updateHeaderState();me.storeListeners=me.getView().dataSource.on({datachanged:me.onDataChanged,scope:me,destroyable:!0})}},onRemoved:function(){this.callParent(arguments);this.storeListeners=Ext.destroy(this.storeListeners)},onDataChanged:function(store,records){this.updateHeaderState()},updateHeaderCheckbox:function(headerCheckbox){var me=this,cls=Ext.baseCSSPrefix+'column-header-checkbox';if(headerCheckbox){me.addCls(cls);me.sortable=!1;if(me.useAriaElements){me.updateHeaderAriaDescription(me.areAllChecked())}}else{me.removeCls(cls);if(me.useAriaElements&&me.ariaEl.dom){me.ariaEl.dom.removeAttribute('aria-describedby')}}
me.updateHeaderState()},processEvent:function(type,view,cell,recordIndex,cellIndex,e,record,row){var me=this,key=type==='keydown'&&e.getKey(),isClick=type===me.triggerEvent,disabled=me.disabled,ret,checked;e.stopSelection=!key&&me.stopSelection;if(!disabled&&(isClick||(key===e.ENTER||key===e.SPACE))){checked=!me.isRecordChecked(record);if(me.fireEvent('beforecheckchange',me,recordIndex,checked,record,e)!==!1){me.setRecordCheck(record,recordIndex,checked,cell,e);if(isClick&&!view.actionableMode){e.preventDefault()}
if(me.hasListeners.checkchange){me.fireEvent('checkchange',me,recordIndex,checked,record,e)}}}else{ret=me.callParent(arguments)}
return ret},onTitleElClick:function(e,t,sortOnClick){var me=this;if(!me.disabled&&(e.keyCode||!me.text||(Ext.fly(e.target).hasCls(me.headerCheckboxCls)))){me.toggleAll(e)}else{return me.callParent([e,t,sortOnClick])}},toggleAll:function(e){var me=this,view=me.getView(),store=view.getStore(),checked=!me.allChecked;if(me.fireEvent('beforeheadercheckchange',me,checked,e)!==!1){if(me.hasListeners.checkchange||me.hasListeners.beforecheckchange){e.position=new Ext.grid.CellContext(view)}
store.each(function(record,recordIndex){me.setRecordCheck(record,recordIndex,checked,view.getCell(record,me))});me.setHeaderStatus(checked,e);me.fireEvent('headercheckchange',me,checked,e)}},setHeaderStatus:function(checked,e){var me=this;if(me.allChecked!==checked){me.allChecked=checked;if(me.headerCheckbox){me[checked?'addCls':'removeCls'](me.headerCheckedCls);if(me.useAriaElements){me.updateHeaderAriaDescription(checked)}}}},updateHeaderState:function(e){var me=this;if(!me.headerStateTimer){me.headerStateTimer=Ext.raf(me.doUpdateHeaderState,me)}},doUpdateHeaderState:function(e){var me=this;me.headerStateTimer=null;if(!me.destroyed&&me.headerCheckbox){me.setHeaderStatus(me.areAllChecked(),e)}},onEnable:function(){this.callParent(arguments);this._setDisabled(!1)},onDisable:function(){this._setDisabled(!0)},_setDisabled:function(disabled){var me=this,cls=me.disabledCls,items;items=me.up('tablepanel').el.select(me.getCellSelector());if(disabled){items.addCls(cls)}else{items.removeCls(cls)}},defaultRenderer:function(value,cellValues){var me=this,cls=me.checkboxCls,tip='';if(me.invert){value=!value}
if(me.disabled){cellValues.tdCls+=' '+me.disabledCls}
if(value){cls+=' '+me.checkboxCheckedCls;tip=me.checkedTooltip}else{tip=me.tooltip}
if(tip){cellValues.tdAttr+=' data-qtip="'+Ext.htmlEncode(tip)+'"'}
if(me.useAriaElements){cellValues.tdAttr+=' aria-describedby="'+me.id+'-cell-description'+(!value?'-not':'')+'-selected"'}
me.updateHeaderState();return'<span class="'+cls+'" role="'+me.checkboxAriaRole+'"'+(!me.ariaStaticRoles[me.checkboxAriaRole]?' tabIndex="0"':'')+'></span>'},isRecordChecked:function(record){var prop=this.property;if(prop){return record[prop]}
return record.get(this.dataIndex)},areAllChecked:function(){var me=this,store=me.getView().getStore(),records,len,i;if(!store.isBufferedStore&&store.getCount()>0){records=store.getData().items;len=records.length;for(i=0;i<len;++i){if(!me.isRecordChecked(records[i])){return!1}}
return!0}},setRecordCheck:function(record,recordIndex,checked,cell){var me=this,prop=me.property;if((prop?record[prop]:record.get(me.dataIndex))!=checked){if(prop){record[prop]=checked;me.updater(cell,checked)}else{record.set(me.dataIndex,checked)}}},updater:function(cell,value){var me=this,tip;if(me.invert){value=!value}
if(value){tip=me.checkedTooltip}else{tip=me.tooltip}
if(tip){cell.setAttribute('data-qtip',tip)}else{cell.removeAttribute('data-qtip')}
if(me.useAriaElements){me.updateCellAriaDescription(null,value,cell)}
cell=Ext.fly(cell);cell[me.disabled?'addCls':'removeCls'](me.disabledCls);Ext.fly(cell.down(me.getView().innerSelector,!0).firstChild)[value?'addCls':'removeCls'](Ext.baseCSSPrefix+'grid-checkcolumn-checked');me.updateHeaderState()},updateHeaderAriaDescription:function(isSelected){var me=this;if(me.useAriaElements&&me.ariaEl.dom){me.ariaEl.dom.setAttribute('aria-describedby',me.id+'-header-description'+(!isSelected?'-not':'')+'-selected')}},updateCellAriaDescription:function(record,isSelected,cell){var me=this;if(me.useAriaElements){cell=cell||me.getView().getCell(record,me);if(cell){cell.setAttribute('aria-describedby',me.id+'-cell-description'+(!isSelected?'-not':'')+'-selected')}}},doDestroy:function(){Ext.unraf(this.headerStateTimer);this.callParent()},privates:{afterText:function(out,values){var me=this,id=me.id;out.push('<span role="presentation" class="',me.headerCheckboxCls,'"></span>');if(me.useAriaElements){out.push('<span id="'+id+'-header-description-selected" class="'+Ext.baseCSSPrefix+'hidden-offsets">'+me.headerDeselectText+'</span>'+'<span id="'+id+'-header-description-not-selected" class="'+Ext.baseCSSPrefix+'hidden-offsets">'+me.headerSelectText+'</span>'+'<span id="'+id+'-cell-description-selected" class="'+Ext.baseCSSPrefix+'hidden-offsets">'+me.rowDeselectText+'</span>'+'<span id="'+id+'-cell-description-not-selected" class="'+Ext.baseCSSPrefix+'hidden-offsets">'+me.rowSelectText+'</span>')}}}})
;
Ext.define('Ext.theme.triton.grid.column.Check',{override:'Ext.grid.column.Check',compatibility:Ext.isIE8,setRecordCheck:function(record,index,checked,cell){this.callParent(arguments);Ext.fly(cell).syncRepaint()}})
;
Ext.define('Ext.grid.column.Date',{extend:'Ext.grid.column.Column',alias:['widget.datecolumn'],alternateClassName:'Ext.grid.DateColumn',requires:['Ext.Date'],isDateColumn:!0,defaultFilterType:'date',producesHTML:!1,initComponent:function(){if(!this.format){this.format=Ext.Date.defaultFormat}
this.callParent(arguments)},defaultRenderer:function(value){return Ext.util.Format.date(value,this.format)},updater:function(cell,value){Ext.fly(cell).down(this.getView().innerSelector,!0).innerHTML=Ext.grid.column.Date.prototype.defaultRenderer.call(this,value)}})
;
Ext.define('Ext.grid.column.Number',{extend:'Ext.grid.column.Column',alias:['widget.numbercolumn'],alternateClassName:'Ext.grid.NumberColumn',requires:['Ext.util.Format'],defaultFilterType:'number',format:'0,000.00',producesHTML:!1,defaultRenderer:function(value){return Ext.util.Format.number(value,this.format)},updater:function(cell,value){Ext.fly(cell).down(this.getView().innerSelector,!0).innerHTML=Ext.grid.column.Number.prototype.defaultRenderer.call(this,value)}})
;
Ext.define('Ext.grid.column.RowNumberer',{extend:'Ext.grid.column.Column',alternateClassName:'Ext.grid.RowNumberer',alias:'widget.rownumberer',isRowNumberer:!0,text:"&#160;",width:30,sortable:!1,draggable:!1,autoLock:!0,lockable:!1,align:'right',producesHTML:!1,ignoreExport:!0,constructor:function(config){var me=this;me.width=me.width;me.callParent(arguments);me.sortable=!1;me.scope=me},resizable:!1,hideable:!1,menuDisabled:!0,dataIndex:'',cls:Ext.baseCSSPrefix+'row-numberer',tdCls:Ext.baseCSSPrefix+'grid-cell-row-numberer '+Ext.baseCSSPrefix+'grid-cell-special',innerCls:Ext.baseCSSPrefix+'grid-cell-inner-row-numberer',rowspan:undefined,onAdded:function(){var me=this;me.renumberRows=Ext.Function.createBuffered(me.renumberRows,1,me);me.callParent(arguments);me.storeListener=me.getView().on({itemadd:me.renumberRows,itemremove:me.renumberRows,destroyable:!0})},onRemoved:function(){var me=this;me.callParent(arguments);if(me.storeListener){me.storeListener=me.storeListener.destroy()}
if(me.renumberRows.timer){Ext.undefer(me.renumberRows.timer)}
me.renumberRows=null;delete me.renumberRows},defaultRenderer:function(value,metaData,record,rowIdx,colIdx,dataSource,view){var me=this,rowspan=me.rowspan,page=dataSource.currentPage,result=record?view.store.indexOf(record):value-1;if(metaData&&rowspan){metaData.tdAttr='rowspan="'+rowspan+'"'}
if(page>1){result+=(page-1)*dataSource.pageSize}
return result+1},updater:function(cell,value,record,view,dataSource){var cellInner=cell&&cell.querySelector(this.getView().innerSelector);if(cellInner){cellInner.innerHTML=this.defaultRenderer(value,null,record,null,null,dataSource,view)}},renumberRows:function(){if(this.destroying||this.destroyed){return}
var me=this,view=me.getView(),dataSource=view.dataSource,recCount=dataSource.getCount(),context=new Ext.grid.CellContext(view).setColumn(me),rows=me.getView().all,index=rows.startIndex;while(index<=rows.endIndex&&index<recCount){context.setRow(index);me.updater(context.getCell(!0),++index,null,view,dataSource)}}})
;
Ext.define('Ext.theme.neptune.grid.column.RowNumberer',{override:'Ext.grid.column.RowNumberer',width:25})
;
Ext.define('Ext.theme.triton.grid.column.RowNumberer',{override:'Ext.grid.column.RowNumberer',width:32})
;
Ext.define('Ext.grid.column.Template',{extend:'Ext.grid.column.Column',alias:['widget.templatecolumn'],alternateClassName:'Ext.grid.TemplateColumn',requires:['Ext.XTemplate'],initComponent:function(){var me=this;me.tpl=(!Ext.isPrimitive(me.tpl)&&me.tpl.compile)?me.tpl:new Ext.XTemplate(me.tpl);me.hasCustomRenderer=!0;me.callParent()},defaultRenderer:function(value,meta,record){var data=Ext.apply({},record.data,record.getAssociatedData());return this.tpl.apply(data)},updater:function(cell,value){Ext.fly(cell).down(this.getView().innerSelector,!0).innerHTML=Ext.grid.column.CheckColumn.prototype.defaultRenderer.call(this,value)}})
;
Ext.define('Ext.grid.column.Widget',{extend:'Ext.grid.column.Column',xtype:'widgetcolumn',mixins:['Ext.mixin.StyleCacher'],config:{defaultWidgetUI:{}},ignoreExport:!0,sortable:!1,onWidgetAttach:null,preventUpdate:!0,innerCls:Ext.baseCSSPrefix+'grid-widgetcolumn-cell-inner',stopSelection:!0,initComponent:function(){var me=this,widget;me.callParent(arguments);widget=me.widget;if(!widget||widget.isComponent){Ext.raise('column.Widget requires a widget configuration.')}
me.widget=widget=Ext.apply({},widget);if(!widget.ui){widget.ui=me.getDefaultWidgetUI()[widget.xtype]||'default'}
me.isFixedSize=Ext.isNumber(widget.width)},processEvent:function(type,view,cell,recordIndex,cellIndex,e,record,row){var target;if(this.stopSelection&&type==='click'){target=e.getTarget(view.innerSelector);if(target&&target!==e.target){e.stopSelection=!0}}},beforeRender:function(){var me=this,tdCls=me.tdCls,widget;widget=Ext.widget(me.widget);me.bindDataIndex=me.dataIndex&&widget.defaultBindProperty&&!widget.bind;tdCls=tdCls?tdCls+' ':'';me.tdCls=tdCls+widget.getTdCls();me.setupViewListeners(me.getView());me.callParent();widget.destroy()},afterRender:function(){var view=this.getView();this.callParent();if(view&&view.viewReady&&!view.ownerGrid.reconfiguring){this.onViewRefresh(view,view.getViewRange())}},defaultRenderer:Ext.emptyFn,updater:function(cell,value,record){this.updateWidget(record)},onCellsResized:function(newWidth){var me=this,liveWidgets=me.ownerGrid.getManagedWidgets(me.getId()),len=liveWidgets.length,view=me.getView(),i,cell;if(!me.isFixedSize&&me.rendered&&view&&view.viewReady){cell=view.getEl().down(me.getCellInnerSelector());if(cell){newWidth-=parseInt(me.getCachedStyle(cell,'padding-left'),10)+parseInt(me.getCachedStyle(cell,'padding-right'),10);for(i=0;i<len;++i){liveWidgets[i].ownerLayout=null;liveWidgets[i].setWidth(newWidth);liveWidgets[i].ownerLayout=view.componentLayout}}}},onAdded:function(){var me=this,view;me.callParent(arguments);me.ownerGrid=me.up('tablepanel').ownerGrid;if(me.ownerGrid.lockable){me.variableRowHeight=!0}
view=me.getView();if(view){me.setupViewListeners(view)}},onRemoved:function(isDestroying){var viewListeners=this.viewListeners;if(viewListeners){Ext.destroy(viewListeners)}
if(isDestroying){this.ownerGrid.destroyManagedWidgets(this.getId())}
this.callParent(arguments)},doDestroy:function(){this.ownerGrid.destroyManagedWidgets(this.getId());this.callParent()},privates:{getWidget:function(record){var me=this,result=null;if(record){result=me.ownerGrid.createManagedWidget(me.getView(),me.getId(),me.widget,record);result.getWidgetRecord=me.widgetRecordDecorator;result.getWidgetColumn=me.widgetColumnDecorator;result.measurer=me;result.isLayoutChild=me.returnFalse}
return result},onItemAdd:function(records){var me=this,view=me.getView(),hasAttach=!!me.onWidgetAttach,dataIndex=me.dataIndex,isFixedSize=me.isFixedSize,len=records.length,i,record,cell,widget,el,focusEl,width;if(me.isVisible(!0)){for(i=0;i<len;i++){record=records[i];if(record.isNonData){continue}
cell=view.getCell(record,me);if(cell){cell=cell.firstChild;if(!isFixedSize&&!width&&me.lastBox){width=me.lastBox.width-parseInt(me.getCachedStyle(cell,'padding-left'),10)-parseInt(me.getCachedStyle(cell,'padding-right'),10)}
widget=me.getWidget(record);widget.$widgetColumn=me;widget.$widgetRecord=record;Ext.fly(cell).empty();if(widget.defaultBindProperty&&dataIndex){widget.setConfig(widget.defaultBindProperty,record.get(dataIndex))}
el=widget.el||widget.element;if(el){cell.appendChild(el.dom);if(!isFixedSize){widget.setWidth(width)}
widget.reattachToBody()}else{if(!isFixedSize){widget.width=width||100}
widget.render(cell)}
if(hasAttach){Ext.callback(me.onWidgetAttach,me.scope,[me,widget,record],0,me)}
focusEl=widget.getFocusEl();if(focusEl){if(view.actionableMode){if(!focusEl.isTabbable()){focusEl.restoreTabbableState()}}else{if(focusEl.isTabbable()){focusEl.saveTabbableState()}}}}}}else{view.refreshNeeded=!0}},onItemUpdate:function(record,recordIndex,oldItemDom){this.updateWidget(record)},onLock:function(header){this.callParent([header]);this.resetView()},onUnlock:function(header){this.callParent([header]);this.resetView()},onViewRefresh:function(view,records){Ext.suspendLayouts();this.onItemAdd(records);Ext.resumeLayouts(!0)},resetView:function(){var me=this,viewListeners=me.viewListeners;if(viewListeners){Ext.destroy(viewListeners)}
me.setupViewListeners(me.getView());me.ownerGrid.handleWidgetViewChange(me.getView(),me.getId())},returnFalse:function(){return!1},setupViewListeners:function(view){var me=this,listeners={refresh:me.onViewRefresh,itemadd:me.onItemAdd,scope:me,destroyable:!0};if(me.bindDataIndex){listeners.itemUpdate=me.onItemUpdate}
me.viewListeners=view.on(listeners)},updateWidget:function(record){var dataIndex=this.dataIndex,widget;if(this.rendered&&this.bindDataIndex){widget=this.getWidget(record);if(widget){widget.setConfig(widget.defaultBindProperty,record.get(dataIndex))}}},widgetRecordDecorator:function(){return this.$widgetRecord},widgetColumnDecorator:function(){return this.$widgetColumn}}})
;
Ext.define('Ext.grid.feature.Feature',{extend:'Ext.util.Observable',alias:'feature.feature',wrapsItem:!1,isFeature:!0,disabled:!1,hasFeatureEvent:!0,eventPrefix:null,eventSelector:null,view:null,grid:null,columnSizer:null,constructor:function(config){this.initialConfig=config;this.callParent(arguments)},clone:function(){return new this.self(this.initialConfig)},init:Ext.emptyFn,getFireEventArgs:function(eventName,view,featureTarget,e){return[eventName,view,featureTarget,e]},vetoEvent:Ext.emptyFn,enable:function(){this.disabled=!1},disable:function(){this.disabled=!0}})
;
Ext.define('Ext.grid.feature.AbstractSummary',{extend:'Ext.grid.feature.Feature',alias:'feature.abstractsummary',summaryRowCls:Ext.baseCSSPrefix+'grid-row-summary',summaryRowSelector:'.'+Ext.baseCSSPrefix+'grid-row-summary',readDataOptions:{recordCreator:Ext.identityFn},summaryRowTpl:{fn:function(out,values,parent){if(values.record.isSummary){this.summaryFeature.outputSummaryRecord(values.record,values,out,parent)}else{this.nextTpl.applyOut(values,out,parent)}},priority:1000},showSummaryRow:!0,init:function(){var me=this;me.view.summaryFeature=me;me.rowTpl=me.view.self.prototype.rowTpl;me.view.addRowTpl(me.summaryRowTpl).summaryFeature=me;me.summaryData={};me.groupInfo={};if(!me.summaryTableCls){me.summaryTableCls=Ext.baseCSSPrefix+'grid-item'}
if(me.hasOwnProperty('summaryRowCls')){me.summaryRowSelector='.'+me.summaryRowCls}},bindStore:function(grid,store){var me=this;Ext.destroy(me.readerListeners);if(me.remoteRoot){me.readerListeners=store.getProxy().getReader().on({scope:me,destroyable:!0,rawdata:me.onReaderRawData})}},onReaderRawData:function(data){this.summaryRows=null;this.readerRawData=data},toggleSummaryRow:function(visible,fromLockingPartner){var me=this,prev=me.showSummaryRow,doRefresh;visible=visible!=null?!!visible:!me.showSummaryRow;me.showSummaryRow=visible;if(visible&&visible!==prev){me.updateSummaryRow=!0}
if(me.lockingPartner){if(!fromLockingPartner){me.lockingPartner.toggleSummaryRow(visible,!0);doRefresh=!0}}else{doRefresh=!0}
if(doRefresh){me.grid.ownerGrid.getView().refreshView()}},createRenderer:function(column,record){var me=this,ownerGroup=record.ownerGroup,summaryData=ownerGroup?me.summaryData[ownerGroup]:me.summaryData,dataIndex=column.dataIndex||column.getItemId();return function(value,metaData){return column.summaryRenderer?column.summaryRenderer(record.data[dataIndex],summaryData,dataIndex,metaData):record.data[dataIndex]}},outputSummaryRecord:function(summaryRecord,contextValues,out){var view=contextValues.view,savedRowValues=view.rowValues,columns=contextValues.columns||view.headerCt.getVisibleGridColumns(),colCount=columns.length,i,column,values={view:view,record:summaryRecord,rowStyle:'',rowClasses:[this.summaryRowCls,this.summaryItemCls],itemClasses:[],recordIndex:-1,rowId:view.getRowId(summaryRecord),columns:columns};for(i=0;i<colCount;i++){column=columns[i];column.savedRenderer=column.renderer;if(column.summaryType||column.summaryRenderer){column.renderer=this.createRenderer(column,summaryRecord)}else{column.renderer=Ext.emptyFn}}
view.rowValues=values;view.self.prototype.rowTpl.applyOut(values,out,parent);view.rowValues=savedRowValues;for(i=0;i<colCount;i++){column=columns[i];column.renderer=column.savedRenderer;column.savedRenderer=null}},getSummary:function(store,type,field,group){var isGrouped=!!group,item=isGrouped?group:store;if(type){if(Ext.isFunction(type)){if(isGrouped){return item.aggregate(field,type)}else{return item.aggregate(type,null,!1,[field])}}
switch(type){case 'count':return item.count();case 'min':return item.min(field);case 'max':return item.max(field);case 'sum':return item.sum(field);case 'average':return item.average(field);default:return''}}},getRawData:function(){var data=this.readerRawData;if(data){return data}
return this.view.getStore().getProxy().getReader().rawData},generateSummaryData:function(groupField){var me=this,summaryRows=me.summaryRows,convertedSummaryRow={},remoteData={},storeReader,reader,rawData,i,len,rows,row;if(!summaryRows){rawData=me.getRawData();if(!rawData){return}
storeReader=me.view.store.getProxy().getReader();reader=Ext.create('reader.'+storeReader.type,storeReader.getConfig());reader.setRootProperty(me.remoteRoot);summaryRows=reader.getRoot(rawData);if(summaryRows){rows=[];if(!Ext.isArray(summaryRows)){summaryRows=[summaryRows]}
len=summaryRows.length;for(i=0;i<len;++i){row=reader.extractRecordData(summaryRows[i],me.readDataOptions);rows.push(row)}
me.summaryRows=summaryRows=rows}
reader.destroy();me.readerRawData=null}
if(summaryRows){for(i=0,len=summaryRows.length;i<len;i++){convertedSummaryRow=summaryRows[i];if(groupField){remoteData[convertedSummaryRow[groupField]]=convertedSummaryRow}}}
return groupField?remoteData:convertedSummaryRow},setSummaryData:function(record,colId,summaryValue,groupName){var summaryData=this.summaryData;if(groupName){if(!summaryData[groupName]){summaryData[groupName]={}}
summaryData[groupName][colId]=summaryValue}else{summaryData[colId]=summaryValue}},destroy:function(){Ext.destroy(this.readerListeners);this.readerRawData=this.summaryRows=null;this.callParent()}})
;
Ext.define('Ext.grid.feature.GroupStore',{extend:'Ext.util.Observable',isStore:!0,defaultViewSize:100,isFeatureStore:!0,badGrouperKey:'[object Object]',constructor:function(groupingFeature,store){var me=this;me.callParent();me.groupingFeature=groupingFeature;me.bindStore(store);if(!groupingFeature.grid.isLocked){me.bindViewStoreListeners()}},bindStore:function(store){var me=this;if(!store||me.store!==store){Ext.destroy(me.storeListeners);me.store=null}
if(store){me.storeListeners=store.on({datachanged:me.onDataChanged,groupchange:me.onGroupChange,idchanged:me.onIdChanged,update:me.onUpdate,scope:me,destroyable:!0});me.store=store;me.processStore(store)}},bindViewStoreListeners:function(){var view=this.groupingFeature.view,listeners=view.getStoreListeners(this);listeners.scope=view;this.on(listeners)},each:function(fn,scope,includeOptions){this.store.each(fn,scope,includeOptions)},processStore:function(store){var me=this,groupingFeature=me.groupingFeature,collapseAll=groupingFeature.startCollapsed,data=me.data,groups=store.getGroups(),groupCount=groups?groups.length:0,groupField=store.getGroupField(),metaGroup,i,featureGrouper,group,key;if(data){data.clear()}else{data=me.data=new Ext.util.Collection({rootProperty:'data',extraKeys:{byInternalId:{property:'internalId',rootProperty:''}}})}
if(store.getCount()){groupingFeature.startCollapsed=!1;if(groupCount>0){for(i=0;i<groupCount;i++){group=groups.getAt(i);key=group.getGroupKey();if(me.badGrouperKey===key&&(featureGrouper=groupingFeature.getGrouper(groupField))){store.getGroups().remove(group);groupingFeature.startCollapsed=collapseAll;store.group(featureGrouper);return}
metaGroup=groupingFeature.getMetaGroup(group);if(collapseAll){metaGroup.isCollapsed=collapseAll}
if(metaGroup.isCollapsed){data.add(metaGroup.placeholder)}else{data.insert(me.data.length,group.items)}}}else{data.add(store.getRange())}}},isCollapsed:function(name){return this.groupingFeature.getCache()[name].isCollapsed},isLoading:function(){return!1},getData:function(){return this.data},getCount:function(){return this.data.getCount()},getTotalCount:function(){return this.data.getCount()},rangeCached:function(start,end){return end<this.getCount()},getRange:function(start,end,options){var result=this.data.getRange(start,Ext.isNumber(end)?end+1:end);if(options&&options.callback){options.callback.call(options.scope||this,result,start,end,options)}
return result},getAt:function(index){return this.data.getAt(index)},getById:function(id){return this.store.getById(id)},getByInternalId:function(internalId){return this.store.getByInternalId(internalId)||this.data.byInternalId.get(internalId)},expandGroup:function(group){var me=this,groupingFeature=me.groupingFeature,lockingPartner=groupingFeature.lockingPartner,metaGroup,placeholder,startIdx,items;if(typeof group==='string'){group=groupingFeature.getGroup(group)}
if(group){items=group.items;metaGroup=groupingFeature.getMetaGroup(group);placeholder=metaGroup.placeholder}
if(items.length&&(startIdx=me.data.indexOf(placeholder))!==-1){metaGroup.isCollapsed=!1;if(lockingPartner){lockingPartner.getMetaGroup(group).isCollapsed=!1}
me.isExpandingOrCollapsing=1;me.data.removeAt(startIdx);me.data.insert(startIdx,group.items);me.fireEvent('replace',me,startIdx,[placeholder],group.items);me.fireEvent('groupexpand',me,group);me.isExpandingOrCollapsing=0}},collapseGroup:function(group){var me=this,groupingFeature=me.groupingFeature,lockingPartner=groupingFeature.lockingPartner,startIdx,placeholder,len,items;if(typeof group==='string'){group=groupingFeature.getGroup(group)}
if(group){items=group.items}
if(items&&(len=items.length)&&(startIdx=me.data.indexOf(items[0]))!==-1){groupingFeature.getMetaGroup(group).isCollapsed=!0;if(lockingPartner){lockingPartner.getMetaGroup(group).isCollapsed=!0}
me.isExpandingOrCollapsing=2;me.data.removeAt(startIdx,len);me.data.insert(startIdx,placeholder=me.getGroupPlaceholder(group));me.fireEvent('replace',me,startIdx,items,[placeholder]);me.fireEvent('groupcollapse',me,group);me.isExpandingOrCollapsing=0}},getGroupPlaceholder:function(group){var metaGroup=this.groupingFeature.getMetaGroup(group);if(!metaGroup.placeholder){var store=this.store,Model=store.getModel(),modelData={},key=group.getGroupKey(),groupPlaceholder;modelData[store.getGroupField()]=key;groupPlaceholder=metaGroup.placeholder=new Model(modelData,store.session,!0);groupPlaceholder.isNonData=groupPlaceholder.isCollapsedPlaceholder=!0;groupPlaceholder.groupKey=key}
return metaGroup.placeholder},indexOf:function(record){var ret=-1;if(record&&!record.isCollapsedPlaceholder){ret=this.data.indexOf(record)}
return ret},contains:function(record){return this.indexOf(record)>-1},indexOfPlaceholder:function(record){return this.data.indexOf(record)},indexOfId:function(id){return this.data.indexOfKey(id)},indexOfTotal:function(record){return this.store.indexOf(record)},onIdChanged:function(store,rec,oldId,newId){this.data.updateKey(rec,oldId)},onUpdate:function(store,record,operation,modifiedFieldNames){var me=this,groupingFeature=me.groupingFeature,group,metaGroup,firstRec,lastRec,items;if(store.isGrouped()){group=record.group=groupingFeature.getGroup(record);if(group){metaGroup=groupingFeature.getMetaGroup(record);if(modifiedFieldNames&&Ext.Array.contains(modifiedFieldNames,groupingFeature.getGroupField())){me.onDataChanged();delete record.group;return}
if(metaGroup.isCollapsed){me.fireEvent('update',me,metaGroup.placeholder)}else{Ext.suspendLayouts();me.fireEvent('update',me,record,operation,modifiedFieldNames);items=group.items;firstRec=items[0];lastRec=items[items.length-1];if(firstRec!==record){firstRec.group=group;me.fireEvent('update',me,firstRec,'edit',modifiedFieldNames);delete firstRec.group}
if(lastRec!==record&&lastRec!==firstRec&&groupingFeature.showSummaryRow){lastRec.group=group;me.fireEvent('update',me,lastRec,'edit',modifiedFieldNames);delete lastRec.group}
Ext.resumeLayouts(!0)}}
delete record.group}else{me.fireEvent('update',me,record,operation,modifiedFieldNames)}},onGroupChange:function(store,grouper){if(!grouper){this.processStore(store)}
this.fireEvent('groupchange',store,grouper)},onDataChanged:function(){this.processStore(this.store);this.fireEvent('refresh',this)},destroy:function(){var me=this;me.bindStore(null);Ext.destroy(me.data);me.groupingFeature=null;me.callParent()}})
;
Ext.define('Ext.grid.feature.Grouping',{extend:'Ext.grid.feature.Feature',alias:'feature.grouping',mixins:{summary:'Ext.grid.feature.AbstractSummary'},requires:['Ext.grid.feature.GroupStore'],eventPrefix:'group',eventSelector:'.'+Ext.baseCSSPrefix+'grid-group-hd',refreshData:{},wrapsItem:!0,groupHeaderTpl:'{columnName}: {name}',depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+'grid-group-collapsed',hdCollapsedCls:Ext.baseCSSPrefix+'grid-group-hd-collapsed',hdNotCollapsibleCls:Ext.baseCSSPrefix+'grid-group-hd-not-collapsible',collapsibleCls:Ext.baseCSSPrefix+'grid-group-hd-collapsible',ctCls:Ext.baseCSSPrefix+'group-hd-container',groupByText:'Group by this field',showGroupsText:'Show in groups',hideGroupedHeader:!1,startCollapsed:!1,enableGroupingMenu:!0,enableNoGroups:!0,collapsible:!0,groupers:null,expandTip:'Click to expand. CTRL key collapses all others',collapseTip:'Click to collapse. CTRL/click collapses all others',showSummaryRow:!1,outerTpl:['{%','if (!(this.groupingFeature.disabled || values.rows.length === 1 && values.rows[0].isSummary)) {','this.groupingFeature.setup(values.rows, values.view.rowValues);','}','this.nextTpl.applyOut(values, out, parent);','if (!(this.groupingFeature.disabled || values.rows.length === 1 && values.rows[0].isSummary)) {','this.groupingFeature.cleanup(values.rows, values.view.rowValues);','}','%}',{priority:200}],groupRowTpl:['{%','var me = this.groupingFeature,','colspan = "colspan=" + values.columns.length;','if (me.disabled || parent.rows.length === 1 && parent.rows[0].isSummary) {','values.needsWrap = false;','} else {','me.setupRowData(values.record, values.rowIndex, values);','}','%}','<tpl if="needsWrap">','<tpl if="isFirstRow">','{% values.view.renderColumnSizer(values, out); %}','<tr data-boundView="{view.id}" data-recordId="{record.internalId:htmlEncode}" data-recordIndex="{[values.isCollapsedGroup ? -1 : values.recordIndex]}" class="{groupHeaderCls}">','<td class="{[me.ctCls]}" {[colspan]}>','{%','var groupTitleStyle = (!values.view.lockingPartner || (values.view.ownerCt === values.view.ownerCt.ownerLockable.lockedGrid) || (values.view.lockingPartner.headerCt.getVisibleGridColumns().length === 0)) ? "" : "visibility:hidden",','tooltip = "";','if (me.collapsible) {','tooltip = Ext.String.format(\'data-qtip="{0}"\', values.isCollapsedGroup ? me.expandTip : me.collapseTip);','}','%}','<div data-groupname="{groupName:htmlEncode}" class="',Ext.baseCSSPrefix,'grid-group-hd {collapsibleCls}" nottabindex="0" hidefocus="on" {ariaCellInnerAttr}>','<div class="',Ext.baseCSSPrefix,'grid-group-title" style="{[groupTitleStyle]}" {ariaGroupTitleAttr} {[tooltip]}>','{[values.groupHeaderTpl.apply(values.groupRenderInfo, parent) || "&#160;"]}','</div>','</div>','</td>','</tr>','</tpl>','<tpl if="!isCollapsedGroup">','{%','values.itemClasses.length = 0;','this.nextTpl.applyOut(values, out, parent);','%}','</tpl>','<tpl if="summaryRecord">','{%me.outputSummaryRecord(values.summaryRecord, values, out, parent);%}','</tpl>','<tpl else>','{%this.nextTpl.applyOut(values, out, parent);%}','</tpl>',{priority:200,beginRowSync:function(rowSync){var groupingFeature=this.groupingFeature;rowSync.add('header',groupingFeature.eventSelector);rowSync.add('summary',groupingFeature.summaryRowSelector)},syncContent:function(destRow,sourceRow,columnsToUpdate){destRow=Ext.fly(destRow,'syncDest');sourceRow=Ext.fly(sourceRow,'syncSrc');var groupingFeature=this.groupingFeature,destHd=destRow.down(groupingFeature.eventSelector,!0),sourceHd=sourceRow.down(groupingFeature.eventSelector,!0),destSummaryRow=destRow.down(groupingFeature.summaryRowSelector,!0),sourceSummaryRow=sourceRow.down(groupingFeature.summaryRowSelector,!0);if(destHd&&sourceHd){Ext.fly(destHd).syncContent(sourceHd)}
if(destSummaryRow&&sourceSummaryRow){if(columnsToUpdate){this.groupingFeature.view.updateColumns(destSummaryRow,sourceSummaryRow,columnsToUpdate)}else{Ext.fly(destSummaryRow).syncContent(sourceSummaryRow)}}}}],relayedEvents:['groupcollapse','groupexpand'],init:function(grid){var me=this,view=me.view,store=me.gridStore=grid.getStore(),dataSource;view.isGrouping=store.isGrouped();me.mixins.summary.init.call(me);me.callParent([grid]);view.headerCt.on({columnhide:me.onColumnHideShow,columnshow:me.onColumnHideShow,columnmove:me.onColumnMove,scope:me});view.addTpl(Ext.XTemplate.getTpl(me,'outerTpl')).groupingFeature=me;view.addRowTpl(Ext.XTemplate.getTpl(me,'groupRowTpl')).groupingFeature=me;view.preserveScrollOnRefresh=!0;if(store.isBufferedStore){me.collapsible=!1}else if(!store.isEmptyStore){dataSource=me.createDataSource()}
grid=grid.ownerLockable||grid;grid.on('beforereconfigure',me.beforeReconfigure,me);if(!view.isLockedView){me.gridEventRelayers=grid.relayEvents(view,me.relayedEvents)}
view.on({afterrender:me.afterViewRender,scope:me,single:!0});me.groupRenderInfo={};if(store.isEmptyStore){return}else if(dataSource){dataSource.on('groupchange',me.onGroupChange,me)}else{me.setupStoreListeners(store)}
me.mixins.summary.bindStore.call(me,grid,grid.getStore())},getGridStore:function(){return this.gridStore},indexOf:function(record){if(record.isCollapsedPlaceholder){return this.dataSource.indexOfPlaceholder(record)}
return this.dataSource.indexOf(record)},indexOfPlaceholder:function(record){return this.dataSource.indexOfPlaceholder(record)},isInCollapsedGroup:function(record){var me=this,store=me.getGridStore(),result=!1,metaGroup;if(store.isGrouped()&&(metaGroup=me.getMetaGroup(record))){result=!!(metaGroup&&metaGroup.isCollapsed)}
return result},getCache:function(){var me=this,id=me.getId(),metaGroupCache={},groups=this.getGridStore().getGroups(),groupingContext;if(groups){groups.eachKey(function(key,group){groupingContext=group.$groupingContext||(group.$groupingContext={});metaGroupCache[key]=groupingContext[id]})}
return metaGroupCache},invalidateCache:function(){var me=this,id=me.getId(),groups=me.getGridStore().getGroups(),groupingContext;if(groups){groups.eachKey(function(key,group){groupingContext=group.$groupingContext;if(groupingContext){groupingContext[id]=null}})}},vetoEvent:function(record,row,rowIndex,e){var shouldVeto=!1;if(e.type!=='mouseover'&&e.type!=='mouseout'&&e.type!=='mouseenter'&&e.type!=='mouseleave'&&e.getTarget(this.eventSelector)){shouldVeto=!0}
if(this.showSummaryRow&&!shouldVeto&&e.getTarget(this.summaryRowSelector)){shouldVeto=!0}
if(shouldVeto){return!1}},enable:function(){var me=this,view=me.view,store=me.getGridStore(),currentGroupedHeader=me.hideGroupedHeader&&me.getGroupedHeader(),groupToggleMenuItem;view.isGrouping=!0;if(view.lockingPartner){view.lockingPartner.isGrouping=!0}
me.callParent();if(me.lastGrouper){store.group(me.lastGrouper);me.lastGrouper=null}
if(currentGroupedHeader){currentGroupedHeader.hide()}
groupToggleMenuItem=me.view.headerCt.getMenu().down('#groupToggleMenuItem');if(groupToggleMenuItem){groupToggleMenuItem.setChecked(!0,!0)}},disable:function(){var me=this,view=me.view,store=me.getGridStore(),currentGroupedHeader=me.hideGroupedHeader&&me.getGroupedHeader(),lastGrouper=store.getGrouper(),groupToggleMenuItem;view.isGrouping=!1;if(view.lockingPartner){view.lockingPartner.isGrouping=!1}
me.callParent();if(lastGrouper){me.lastGrouper=lastGrouper;store.clearGrouping()}
if(currentGroupedHeader){currentGroupedHeader.show()}
groupToggleMenuItem=me.view.headerCt.getMenu().down('#groupToggleMenuItem');if(groupToggleMenuItem){groupToggleMenuItem.setChecked(!1,!0);groupToggleMenuItem.disable()}},afterViewRender:function(){var me=this,view=me.view;view.on({scope:me,groupmousedown:me.onGroupMousedown,groupclick:me.onGroupClick});if(me.enableGroupingMenu){me.injectGroupingMenu()}
me.pruneGroupedHeader();me.lastGrouper=me.getGridStore().getGrouper();if(me.disabled){me.disable()}},injectGroupingMenu:function(){var me=this,headerCt=me.view.headerCt;headerCt.showMenuBy=Ext.Function.createInterceptor(headerCt.showMenuBy,me.showMenuBy);headerCt.getMenuItems=me.getMenuItems()},onColumnHideShow:function(headerOwnerCt,header){var me=this,view=me.view,headerCt=view.headerCt,menu=headerCt.getMenu(),activeHeader=menu.activeHeader,groupMenuItem=menu.down('#groupMenuItem'),groupMenuMethod,colCount=me.grid.getVisibleColumnManager().getColumns().length,items,len,i;if(activeHeader&&groupMenuItem){groupMenuMethod=(activeHeader.groupable===!1||!activeHeader.dataIndex||(me.view.headerCt.getVisibleGridColumns().length<2))?'disable':'enable';groupMenuItem[groupMenuMethod]()}
if(view.rendered&&colCount){items=view.el.query('.'+me.ctCls);for(i=0,len=items.length;i<len;++i){items[i].colSpan=colCount}}},onColumnMove:function(){var me=this,view=me.view,groupName,groupNames,group,firstRec,lastRec,metaGroup;if(view.getStore().isGrouped()){groupNames=me.getCache();Ext.suspendLayouts();for(groupName in groupNames){group=me.getGroup(groupName);if(group){firstRec=group.first();lastRec=group.last();metaGroup=me.getMetaGroup(group);if(metaGroup.isCollapsed){firstRec=lastRec=me.dataSource.getGroupPlaceholder(groupName)}
view.refreshNode(firstRec);if(me.showSummaryRow&&lastRec!==firstRec){view.refreshNode(lastRec)}}}
Ext.resumeLayouts(!0)}},showMenuBy:function(clickEvent,t,header){var me=this,menu=me.getMenu(),groupMenuItem=menu.down('#groupMenuItem'),groupMenuMethod=(header.groupable===!1||!header.dataIndex||(me.view.headerCt.getVisibleGridColumns().length<2))?'disable':'enable',groupToggleMenuItem=menu.down('#groupToggleMenuItem'),isGrouped=me.grid.getStore().isGrouped();groupMenuItem[groupMenuMethod]();if(groupToggleMenuItem){groupToggleMenuItem.setChecked(isGrouped,!0);groupToggleMenuItem[isGrouped?'enable':'disable']()}},getMenuItems:function(){var me=this,groupByText=me.groupByText,disabled=me.disabled||!me.getGroupField(),showGroupsText=me.showGroupsText,enableNoGroups=me.enableNoGroups,getMenuItems=me.view.headerCt.getMenuItems;return function(){var o=getMenuItems.call(this);o.push('-',{iconCls:Ext.baseCSSPrefix+'group-by-icon',itemId:'groupMenuItem',text:groupByText,handler:me.onGroupMenuItemClick,scope:me});if(enableNoGroups){o.push({itemId:'groupToggleMenuItem',text:showGroupsText,checked:!disabled,checkHandler:me.onGroupToggleMenuItemClick,scope:me})}
return o}},onGroupMenuItemClick:function(menuItem,e){var me=this,menu=menuItem.parentMenu,hdr=menu.activeHeader,view=me.view,store=me.getGridStore();if(me.disabled){me.lastGrouper=null;me.block();me.enable();me.unblock()}
view.isGrouping=!0;store.group(me.getGrouper(hdr.dataIndex)||hdr.dataIndex);me.pruneGroupedHeader()},block:function(fromPartner){var me=this;me.blockRefresh=me.view.blockRefresh=!0;if(me.lockingPartner&&!fromPartner){me.lockingPartner.block(!0)}},unblock:function(fromPartner){var me=this;me.blockRefresh=me.view.blockRefresh=!1;if(me.lockingPartner&&!fromPartner){me.lockingPartner.unblock(!0)}},onGroupToggleMenuItemClick:function(menuItem,checked){this[checked?'enable':'disable']()},pruneGroupedHeader:function(){var me=this,header=me.getGroupedHeader();if(me.hideGroupedHeader&&header){Ext.suspendLayouts();if(me.prunedHeader&&me.prunedHeader!==header){me.prunedHeader.show()}
me.prunedHeader=header;if(header.rendered){header.hide()}
Ext.resumeLayouts(!0)}},getHeaderNode:function(groupName){var el=this.view.getEl(),nodes,i,len,node;if(el){nodes=el.query(this.eventSelector);for(i=0,len=nodes.length;i<len;++i){node=nodes[i];if(node.getAttribute('data-groupName')===groupName){return node}}}},getGroup:function(name){var store=this.getGridStore(),value=name,groups,group;if(store.isGrouped()){if(name.isModel){name=name.get(store.getGroupField())}
if(typeof name!=='string'){name=store.getGrouper().getGroupString(value)}
if(store.isBufferedStore){groups=store.groups||(store.groups={});group=groups[name]||(groups[name]={getGroupKey:function(){return name}})}else{group=store.getGroups().getByKey(name)}}
return group},getGrouper:function(dataIndex){var groupers=this.groupers;if(!groupers){return null}
return Ext.Array.findBy(groupers,function(grouper){return grouper.property===dataIndex})},getGroupField:function(){return this.getGridStore().getGroupField()},getMetaGroup:function(group){var me=this,id=me.getId(),gridStore,key,metaGroup,Model,modelData,groupPlaceholder,aggregateRecord,groupingContext;if(group.isModel||typeof group==='string'){group=me.getGroup(group)}
if(group){key=group.getGroupKey();groupingContext=group.$groupingContext||(group.$groupingContext={});metaGroup=groupingContext[id];if(!metaGroup){gridStore=me.getGridStore();Model=gridStore.getModel();modelData={};modelData[me.getGroupField()]=key;groupPlaceholder=new Model(modelData,gridStore.session,!0);groupPlaceholder.isNonData=groupPlaceholder.isCollapsedPlaceholder=!0;groupPlaceholder.groupKey=key;aggregateRecord=new Ext.data.Model(modelData);aggregateRecord.isNonData=aggregateRecord.isSummary=!0;aggregateRecord.groupKey=key;metaGroup=groupingContext[id]={placeholder:groupPlaceholder,isCollapsed:!1,lastGroup:null,lastGroupGeneration:null,lastFilterGeneration:null,aggregateRecord:aggregateRecord}}}
return metaGroup},isExpanded:function(groupName){return!this.getMetaGroup(groupName).isCollapsed},expand:function(groupName,options){this.doCollapseExpand(!1,groupName,options)},expandAll:function(){var me=this,metaGroupCache=me.getCache(),lockingPartner=me.lockingPartner,groupName;for(groupName in metaGroupCache){if(metaGroupCache.hasOwnProperty(groupName)){metaGroupCache[groupName].isCollapsed=!1}}
Ext.suspendLayouts();me.dataSource.onDataChanged();Ext.resumeLayouts(!0);for(groupName in metaGroupCache){if(metaGroupCache.hasOwnProperty(groupName)){me.afterCollapseExpand(!1,groupName);if(lockingPartner){lockingPartner.afterCollapseExpand(!1,groupName)}}}},collapse:function(groupName,options){this.doCollapseExpand(!0,groupName,options)},isAllCollapsed:function(){var me=this,metaGroupCache=me.getCache(),groupName;for(groupName in metaGroupCache){if(metaGroupCache.hasOwnProperty(groupName)){if(!metaGroupCache[groupName].isCollapsed){return!1}}}
return!0},isAllExpanded:function(){var me=this,metaGroupCache=me.getCache(),groupName;for(groupName in metaGroupCache){if(metaGroupCache.hasOwnProperty(groupName)){if(metaGroupCache[groupName].isCollapsed){return!1}}}
return!0},collapseAll:function(){var me=this,metaGroupCache=me.getCache(),groupName,lockingPartner=me.lockingPartner;for(groupName in metaGroupCache){if(metaGroupCache.hasOwnProperty(groupName)){metaGroupCache[groupName].isCollapsed=!0}}
Ext.suspendLayouts();me.dataSource.onDataChanged();Ext.resumeLayouts(!0);for(groupName in metaGroupCache){if(metaGroupCache.hasOwnProperty(groupName)){me.afterCollapseExpand(!0,groupName);if(lockingPartner){lockingPartner.afterCollapseExpand(!0,groupName)}}}},doCollapseExpand:function(collapsed,groupName,options){var me=this,lockingPartner=me.lockingPartner,group=me.getGroup(groupName);if(options===!0){options={focus:!0}}
if(me.getMetaGroup(group).isCollapsed!==collapsed){me.isExpandingOrCollapsing=!0;Ext.suspendLayouts();if(collapsed){me.dataSource.collapseGroup(group)}else{me.dataSource.expandGroup(group)}
Ext.resumeLayouts(!0);me.afterCollapseExpand(collapsed,groupName,options);if(lockingPartner){if(options&&options.focus){options=Ext.Object.chain(options);options.focus=!1}
lockingPartner.afterCollapseExpand(collapsed,groupName,options)}
me.isExpandingOrCollapsing=!1}},afterCollapseExpand:function(collapsed,groupName,options){var me=this,view=me.view,header,record;header=me.getHeaderNode(groupName);view.fireEvent(collapsed?'groupcollapse':'groupexpand',view,header,groupName);if(options){if(collapsed){options.focus=!1;record=me.getMetaGroup(groupName).placeholder}else{record=me.getGroup(groupName).getAt(0)}
me.grid.ensureVisible(record,options)}},onGroupChange:function(store,grouper){if(!grouper){this.view.ownerGrid.getView().refreshView()}else{this.lastGrouper=grouper}},getMenuItem:function(dataIndex){var view=this.view,header=view.headerCt.down('gridcolumn[dataIndex='+dataIndex+']'),menu=view.headerCt.getMenu();return header?menu.down('menuitem[headerId='+header.id+']'):null},onGroupKey:function(keyCode,event){var me=this,groupName=me.getGroupName(event.target);if(groupName){me.onGroupClick(me.view,event.target,groupName,event)}},onGroupMousedown:function(view,rowElement,groupName,e){e.preventDefault()},onGroupClick:function(view,rowElement,groupName,e){var me=this,metaGroupCache,groupIsCollapsed,g;if(!me.collapsible){return}
metaGroupCache=me.getCache();groupIsCollapsed=!me.isExpanded(groupName);if(e.ctrlKey){Ext.suspendLayouts();for(g in metaGroupCache){if(g===groupName){if(groupIsCollapsed){me.expand(groupName)}}else if(!metaGroupCache[g].isCollapsed){me.doCollapseExpand(!0,g,!1)}}
Ext.resumeLayouts(!0)}else{me[groupIsCollapsed?'expand':'collapse'](groupName)}},setupRowData:function(record,idx,rowValues){var me=this,recordIndex=rowValues.recordIndex,data=me.refreshData,groupRenderInfo=me.groupRenderInfo,header=data.header,groupField=data.groupField,store=me.getGridStore(),dataSource=me.view.dataSource,isBufferedStore=dataSource.isBufferedStore,column=me.grid.columnManager.getHeaderByDataIndex(groupField),hasRenderer=!!(column&&column.renderer),groupKey=record.groupKey,group=record.isCollapsedPlaceholder&&Ext.isDefined(groupKey)?me.getGroup(groupKey):record.group,grouper,groupName,prev,next,items;rowValues.isCollapsedGroup=!1;rowValues.summaryRecord=rowValues.groupHeaderCls=null;if(data.doGrouping){grouper=store.getGrouper();if(record.isCollapsedPlaceholder){groupName=group.getGroupKey();items=group.items;record=items[0];rowValues.isFirstRow=rowValues.isLastRow=!0;rowValues.groupHeaderCls=me.hdCollapsedCls;rowValues.isCollapsedGroup=rowValues.needsWrap=!0;rowValues.groupName=groupName;rowValues.groupRenderInfo=groupRenderInfo;groupRenderInfo.groupField=groupField;groupRenderInfo.groupValue=record.get(groupField);groupRenderInfo.name=groupRenderInfo.renderedGroupValue=hasRenderer?column.renderer(groupRenderInfo.groupValue,{},record):groupName;groupRenderInfo.columnName=header?header.text:groupField;rowValues.collapsibleCls=me.collapsible?me.collapsibleCls:me.hdNotCollapsibleCls;groupRenderInfo.rows=groupRenderInfo.children=items;if(me.showSummaryRow){rowValues.summaryRecord=data.summaryData[groupName]}
return}
groupName=grouper.getGroupString(record);if(group){items=group.items;rowValues.isFirstRow=record===items[0];rowValues.isLastRow=record===items[items.length-1]}else{rowValues.isFirstRow=recordIndex===0;if(!rowValues.isFirstRow){prev=store.getAt(recordIndex-1);if(prev){rowValues.isFirstRow=!prev.isEqual(grouper.getGroupString(prev),groupName)}}
rowValues.isLastRow=recordIndex===(isBufferedStore?store.getTotalCount():store.getCount())-1;if(!rowValues.isLastRow){next=store.getAt(recordIndex+1);if(next){rowValues.isLastRow=!next.isEqual(grouper.getGroupString(next),groupName)}}}
if(rowValues.isFirstRow){groupRenderInfo.groupField=groupField;groupRenderInfo.name=groupRenderInfo.renderedGroupValue=hasRenderer?column.renderer(record.get(groupField),{},record):groupName;groupRenderInfo.groupValue=record.get(groupField);groupRenderInfo.columnName=header?header.text:groupField;rowValues.collapsibleCls=me.collapsible?me.collapsibleCls:me.hdNotCollapsibleCls;rowValues.groupName=groupName;if(!me.isExpanded(groupName)){rowValues.itemClasses.push(me.hdCollapsedCls);rowValues.isCollapsedGroup=!0}
if(isBufferedStore){groupRenderInfo.rows=groupRenderInfo.children=[]}else{groupRenderInfo.rows=groupRenderInfo.children=me.getRecordGroup(record).items}
rowValues.groupRenderInfo=groupRenderInfo}
if(rowValues.isLastRow){if(me.showSummaryRow){rowValues.summaryRecord=data.summaryData[groupName];rowValues.itemClasses.push(Ext.baseCSSPrefix+'grid-group-last')}}
rowValues.needsWrap=(rowValues.isFirstRow||rowValues.summaryRecord)}},setup:function(rows,rowValues){var me=this,data=me.refreshData,view=rowValues.view,isGrouping=view.isGrouping=!me.disabled&&me.getGridStore().isGrouped(),bufferedRenderer=view.bufferedRenderer;me.skippedRows=0;if(bufferedRenderer){bufferedRenderer.variableRowHeight=view.hasVariableRowHeight()||isGrouping}
data.groupField=me.getGroupField();data.header=me.getGroupedHeader(data.groupField);data.doGrouping=isGrouping;rowValues.groupHeaderTpl=Ext.XTemplate.getTpl(me,'groupHeaderTpl');if(isGrouping&&me.showSummaryRow){data.summaryData=me.generateSummaryData()}},cleanup:function(rows,rowValues){var data=this.refreshData;rowValues.groupRenderInfo=rowValues.groupHeaderTpl=rowValues.isFirstRow=null;data.groupField=data.header=data.summaryData=null},generateSummaryData:function(){var me=this,store=me.getGridStore(),filters=store.getFilters(),groups=store.getGroups().items,groupField=me.getGroupField(),lockingPartner=me.lockingPartner,updateSummaryRow=me.updateSummaryRow,data={},ownerCt=me.view.ownerCt,columnsChanged=me.didColumnsChange(),i,len,group,metaGroup,record,hasRemote,remoteData;if(me.remoteRoot){remoteData=me.mixins.summary.generateSummaryData.call(me,groupField);hasRemote=!!remoteData}
for(i=0,len=groups.length;i<len;++i){group=groups[i];metaGroup=me.getMetaGroup(group);if(updateSummaryRow||hasRemote||store.updating||me.grid.reconfiguring||columnsChanged||me.didGroupChange(group,metaGroup,filters)){record=me.populateRecord(group,metaGroup,remoteData);if(!lockingPartner||(ownerCt===ownerCt.ownerLockable.normalGrid)){metaGroup.lastGroup=group;metaGroup.lastGroupGeneration=group.generation;metaGroup.lastFilterGeneration=filters.generation}}else{record=metaGroup.aggregateRecord}
data[group.getGroupKey()]=record}
me.updateSummaryRow=!1;return data},getGroupName:function(element){var me=this,view=me.view,eventSelector=me.eventSelector,targetEl,row;targetEl=Ext.fly(element).findParent(eventSelector);if(!targetEl){row=Ext.fly(element).findParent(view.itemSelector);if(row){targetEl=row.down(eventSelector,!0)}}
if(targetEl){return targetEl.getAttribute('data-groupname')}},getRecordGroup:function(record){var store=this.getGridStore(),grouper=store.getGrouper();if(grouper){return store.getGroups().getItemGroup(record)}},getGroupedHeader:function(groupField){var me=this,headerCt=me.view.headerCt,partner=me.lockingPartner,selector,header;groupField=groupField||me.getGroupField();if(groupField){selector='[dataIndex='+groupField+']';header=headerCt.down(selector);if(!header&&partner){header=partner.view.headerCt.down(selector)}}
return header||null},getFireEventArgs:function(type,view,targetEl,e){return[type,view,targetEl,this.getGroupName(targetEl),e]},destroy:function(){var me=this,dataSource=me.dataSource;Ext.destroy(me.gridEventRelayers);me.gridEventRelayers=null;me.storeListeners=Ext.destroy(me.storeListeners);me.view=me.prunedHeader=me.grid=me.dataSource=me.groupers=null;if(dataSource&&!dataSource.destroyed){dataSource.bindStore(null);Ext.destroy(dataSource)}
me.callParent()},beforeReconfigure:function(grid,store,columns,oldStore,oldColumns){var me=this,view=me.view,dataSource=me.dataSource,bufferedRenderer=view.bufferedRenderer,bufferedStore;if(store&&store!==oldStore){me.gridStore=store;bufferedStore=store.isBufferedStore;if(me.storeListeners){Ext.destroy(me.storeListeners)}
if(!oldStore.isEmptyStore&&bufferedStore!==oldStore.isBufferedStore){Ext.raise('Cannot reconfigure grouping switching between buffered '+'and non-buffered stores')}
if(!dataSource){if(bufferedStore){me.collapsible=!1;me.setupStoreListeners(store)}else{dataSource=me.createDataSource();dataSource.on('groupchange',me.onGroupChange,me);if(bufferedRenderer){bufferedRenderer.bindStore(dataSource)}}}
if(!bufferedStore){view.isGrouping=!!store.getGrouper();dataSource.bindStore(store)}
me.mixins.summary.bindStore.call(me,grid,store)}},createDataSource:function(){var me=this,view=me.view,lockPartner=me.lockingPartner,dataSource;if(lockPartner&&lockPartner.dataSource){me.dataSource=view.dataSource=dataSource=lockPartner.dataSource}else{me.dataSource=view.dataSource=dataSource=new Ext.grid.feature.GroupStore(me,me.gridStore)}
return dataSource},populateRecord:function(group,metaGroup,remoteData){var me=this,view=me.grid.ownerLockable?me.grid.ownerLockable.view:me.view,store=me.getGridStore(),record=metaGroup.aggregateRecord,columns=view.headerCt.getGridColumns(),len=columns.length,groupName=group.getGroupKey(),groupData,field,i,column,fieldName,summaryValue;record.beginEdit();if(remoteData){groupData=remoteData[groupName];for(field in groupData){if(groupData.hasOwnProperty(field)){if(field!==record.idProperty){record.set(field,groupData[field])}}}}
for(i=0;i<len;++i){column=columns[i];fieldName=column.dataIndex||column.getItemId();if(!remoteData){summaryValue=me.getSummary(store,column.summaryType,fieldName,group);record.set(fieldName,summaryValue)}else{summaryValue=record.get(column.dataIndex)}
me.setSummaryData(record,column.getItemId(),summaryValue,groupName)}
record.ownerGroup=groupName;record.endEdit(!0);record.commit();return record},privates:{didGroupChange:function(group,metaGroup,filters){var ret=!0;if(group===metaGroup.lastGroup){ret=metaGroup.lastGroupGeneration!==group.generation||metaGroup.lastFilterGeneration!==filters.generation}
return ret},didColumnsChange:function(){var me=this,result=(me.view.headerCt.items.generation!==me.lastHeaderCtGeneration);me.lastHeaderCtGeneration=me.view.headerCt.items.generation;return result},setupStoreListeners:function(store){var me=this;me.storeListeners=store.on({groupchange:me.onGroupChange,scope:me,destroyable:!0})}}})
;
Ext.define('Ext.grid.feature.GroupingSummary',{extend:'Ext.grid.feature.Grouping',alias:'feature.groupingsummary',showSummaryRow:!0})
;
Ext.define('Ext.grid.feature.RowBody',{extend:'Ext.grid.feature.Feature',alias:'feature.rowbody',rowBodyCls:Ext.baseCSSPrefix+'grid-row-body',innerSelector:'.'+Ext.baseCSSPrefix+'grid-rowbody',rowBodyHiddenCls:Ext.baseCSSPrefix+'grid-row-body-hidden',rowBodyTdSelector:'td.'+Ext.baseCSSPrefix+'grid-cell-rowbody',eventPrefix:'rowbody',eventSelector:'tr.'+Ext.baseCSSPrefix+'grid-rowbody-tr',bodyBefore:!1,outerTpl:{fn:function(out,values,parent){var me=this.rowBody,view=values.view,columns=view.getVisibleColumnManager().getColumns(),rowValues=view.rowValues,rowExpanderCol=me.rowExpander&&me.rowExpander.expanderColumn;rowValues.rowBodyColspan=columns.length;rowValues.rowBodyCls=me.rowBodyCls;rowValues.rowIdCls=me.rowIdCls;if(rowExpanderCol&&rowExpanderCol.getView()===view){view.grid.removeCls(Ext.baseCSSPrefix+'grid-hide-row-expander-spacer');rowValues.addSpacerCell=!0;rowValues.rowBodyColspan-=1;rowValues.spacerCellCls=Ext.baseCSSPrefix+'grid-cell '+Ext.baseCSSPrefix+'grid-row-expander-spacer '+Ext.baseCSSPrefix+'grid-cell-special'}else{view.grid.addCls(Ext.baseCSSPrefix+'grid-hide-row-expander-spacer');rowValues.addSpacerCell=!1}
this.nextTpl.applyOut(values,out,parent);rowValues.rowBodyCls=rowValues.rowBodyColspan=rowValues.rowBody=null},priority:100},extraRowTpl:['{%','if(this.rowBody.bodyBefore) {','values.view.renderColumnSizer(values, out);','} else {','this.nextTpl.applyOut(values, out, parent);','}','values.view.rowBodyFeature.setupRowData(values.record, values.recordIndex, values);','%}','<tr class="'+Ext.baseCSSPrefix+'grid-rowbody-tr {rowBodyCls} {rowIdCls}" {ariaRowAttr}>','<tpl if="addSpacerCell">','<td class="{spacerCellCls}"></td>','</tpl>','<td class="'+Ext.baseCSSPrefix+'grid-td '+Ext.baseCSSPrefix+'grid-cell-rowbody" colspan="{rowBodyColspan}" {ariaCellAttr}>','<div class="'+Ext.baseCSSPrefix+'grid-rowbody {rowBodyDivCls}" {ariaCellInnerAttr}>{rowBody}</div>','</td>','</tr>','{%','if(this.rowBody.bodyBefore) {','this.nextTpl.applyOut(values, out, parent);','}','%}',{priority:100,beginRowSync:function(rowSync){rowSync.add('rowBody',this.owner.eventSelector)},syncContent:function(destRow,sourceRow,columnsToUpdate){var rowBody=this.rowBody,destRowBody,sourceRowBody;if(rowBody.doSync){destRowBody=Ext.fly(destRow).down(rowBody.eventSelector,!0);if(destRowBody&&(sourceRowBody=Ext.fly(sourceRow).down(rowBody.eventSelector,!0))){Ext.fly(destRowBody).syncContent(sourceRowBody)}}}}],doSync:!0,init:function(grid){var me=this,view=me.view=grid.getView();if(!me.rowExpander&&grid.findPlugin('rowexpander')){Ext.raise('The RowBody feature shouldn\'t be manually added when the grid'+'has a RowExpander.')}
grid.variableRowHeight=view.variableRowHeight=!0;view.rowBodyFeature=me;view.headerCt.on({columnschanged:me.onColumnsChanged,scope:me});view.addTpl(me.outerTpl).rowBody=me;view.addRowTpl(Ext.XTemplate.getTpl(this,'extraRowTpl')).rowBody=me;me.callParent(arguments)},getSelectedRow:function(view,rowIndex){var selectedRow=view.getNode(rowIndex);if(selectedRow){return Ext.fly(selectedRow).down(this.eventSelector)}
return null},onColumnsChanged:function(headerCt){var view=this.view,items,colspan,len,i;if(!view.rendered){return}
items=view.el.query(this.rowBodyTdSelector);colspan=headerCt.getVisibleGridColumns().length;len=items.length;for(i=0;i<len;++i){items[i].setAttribute('colSpan',colspan)}},setupRowData:function(record,rowIndex,rowValues){if(this.getAdditionalData){Ext.apply(rowValues,this.getAdditionalData(record.data,rowIndex,record,rowValues))}}})
;
Ext.define('Ext.grid.feature.Summary',{extend:'Ext.grid.feature.AbstractSummary',alias:'feature.summary',dock:undefined,summaryItemCls:Ext.baseCSSPrefix+'grid-row-summary-item',dockedSummaryCls:Ext.baseCSSPrefix+'docked-summary',summaryRowCls:Ext.baseCSSPrefix+'grid-row-summary '+Ext.baseCSSPrefix+'grid-row-total',summaryRowSelector:'.'+Ext.baseCSSPrefix+'grid-row-summary.'+Ext.baseCSSPrefix+'grid-row-total',panelBodyCls:Ext.baseCSSPrefix+'summary-',hasFeatureEvent:!1,fullSummaryTpl:{fn:function(out,values,parent){var me=this.summaryFeature,record=me.summaryRecord,view=values.view,bufferedRenderer=view.bufferedRenderer;this.nextTpl.applyOut(values,out,parent);if(!me.disabled&&me.showSummaryRow&&!view.addingRows&&view.store.isLast(values.record)){if(bufferedRenderer&&!me.dock){bufferedRenderer.variableRowHeight=!0}
me.outputSummaryRecord((record&&record.isModel)?record:me.createSummaryRecord(view),values,out,parent)}},priority:300,beginRowSync:function(rowSync){rowSync.add('fullSummary',this.summaryFeature.summaryRowSelector)},syncContent:function(destRow,sourceRow,columnsToUpdate){destRow=Ext.fly(destRow,'syncDest');sourceRow=Ext.fly(sourceRow,'syncSrc');var summaryFeature=this.summaryFeature,selector=summaryFeature.summaryRowSelector,destSummaryRow=destRow.down(selector,!0),sourceSummaryRow=sourceRow.down(selector,!0);if(destSummaryRow&&sourceSummaryRow){if(columnsToUpdate){this.summaryFeature.view.updateColumns(destSummaryRow,sourceSummaryRow,columnsToUpdate)}else{Ext.fly(destSummaryRow).syncContent(sourceSummaryRow)}}}},init:function(grid){var me=this,view=me.view,dock=me.dock;me.callParent([grid]);if(dock){grid.addBodyCls(me.panelBodyCls+dock);grid.headerCt.on({add:me.onStoreUpdate,afterlayout:me.onStoreUpdate,remove:me.onStoreUpdate,scope:me});grid.on({beforerender:function(){var tableCls=[me.summaryTableCls];if(view.columnLines){tableCls[tableCls.length]=view.ownerCt.colLinesCls}
me.summaryBar=grid.addDocked({childEls:['innerCt','item'],renderTpl:['<div id="{id}-innerCt" data-ref="innerCt" role="presentation">','<table id="{id}-item" data-ref="item" cellPadding="0" cellSpacing="0" class="'+tableCls.join(' ')+'">','<tr class="'+me.summaryRowCls+'"></tr>','</table>','</div>'],scrollable:{x:!1,y:!1},hidden:!me.showSummaryRow,itemId:'summaryBar',cls:[me.dockedSummaryCls,me.dockedSummaryCls+'-'+dock],xtype:'component',dock:dock,weight:10000000})[0]},afterrender:function(){grid.getView().getScrollable().addPartner(me.summaryBar.getScrollable(),'x');me.onStoreUpdate();me.columnSizer=me.summaryBar.el},single:!0})}else{if(grid.bufferedRenderer){me.wrapsItem=!0;view.addRowTpl(me.fullSummaryTpl).summaryFeature=me;view.on('refresh',me.onViewRefresh,me)}else{me.wrapsItem=!1;me.view.addFooterFn(me.renderSummaryRow)}}
grid.headerCt.on({afterlayout:me.afterHeaderCtLayout,scope:me});grid.ownerGrid.on({beforereconfigure:me.onBeforeReconfigure,columnmove:me.onStoreUpdate,scope:me});me.bindStore(grid,grid.getStore())},onBeforeReconfigure:function(grid,store){this.summaryRecord=null;if(store){this.bindStore(grid,store)}},bindStore:function(grid,store){var me=this;Ext.destroy(me.storeListeners);me.storeListeners=store.on({scope:me,destroyable:!0,update:me.onStoreUpdate,datachanged:me.onStoreUpdate});me.callParent([grid,store])},renderSummaryRow:function(values,out,parent){var view=values.view,me=view.findFeature('summary'),record;if(!me.disabled&&me.showSummaryRow&&!view.addingRows&&!view.updatingRows){record=me.summaryRecord;out.push('<table cellpadding="0" cellspacing="0" class="'+me.summaryItemCls+'" style="table-layout: fixed; width: 100%;">');me.outputSummaryRecord((record&&record.isModel)?record:me.createSummaryRecord(view),values,out,parent);out.push('</table>')}},toggleSummaryRow:function(visible,fromLockingPartner){var me=this,bar=me.summaryBar;me.callParent([visible,fromLockingPartner]);if(bar){bar.setVisible(me.showSummaryRow);me.onViewScroll()}},getSummaryBar:function(){return this.summaryBar},getSummaryRowPlaceholder:function(view){var placeholderCls=this.summaryItemCls,nodeContainer,row;nodeContainer=Ext.fly(view.getNodeContainer());if(!nodeContainer){return null}
row=nodeContainer.down('.'+placeholderCls,!0);if(!row){row=nodeContainer.createChild({tag:'table',cellpadding:0,cellspacing:0,cls:placeholderCls,style:'table-layout: fixed; width: 100%',children:[{tag:'tbody'}]},!1,!0)}
return row},vetoEvent:function(record,row,rowIndex,e){return!e.getTarget(this.summaryRowSelector)},onViewScroll:function(){this.summaryBar.setScrollX(this.view.getScrollX())},onViewRefresh:function(view){var me=this,record,row;if(!me.disabled&&me.showSummaryRow&&!view.all.getCount()){record=me.createSummaryRecord(view);row=me.getSummaryRowPlaceholder(view);row.tBodies[0].appendChild(view.createRowElement(record,-1).querySelector(me.summaryRowSelector))}},createSummaryRecord:function(view){var me=this,columns=view.headerCt.getGridColumns(),remoteRoot=me.remoteRoot,summaryRecord=me.summaryRecord||(me.summaryRecord=new Ext.data.Model({id:view.id+'-summary-record'})),colCount=columns.length,i,column,dataIndex,summaryValue;summaryRecord.beginEdit();if(remoteRoot){summaryValue=me.generateSummaryData();if(summaryValue){summaryRecord.set(summaryValue)}}else{for(i=0;i<colCount;i++){column=columns[i];dataIndex=column.dataIndex||column.getItemId();summaryValue=me.getSummary(view.store,column.summaryType,dataIndex);summaryRecord.set(dataIndex,summaryValue);me.setSummaryData(summaryRecord,column.getItemId(),summaryValue)}}
summaryRecord.endEdit(!0);summaryRecord.commit(!0);summaryRecord.isSummary=!0;return summaryRecord},onStoreUpdate:function(){var me=this,view=me.view,selector=me.summaryRowSelector,dock=me.dock,record,newRowDom,oldRowDom,p;if(!view.rendered){return}
record=me.createSummaryRecord(view);newRowDom=Ext.fly(view.createRowElement(record,-1)).down(selector,!0);if(!newRowDom){return}
if(dock){p=me.summaryBar.item.dom.firstChild;oldRowDom=p.firstChild;p.insertBefore(newRowDom,oldRowDom);p.removeChild(oldRowDom)}else{oldRowDom=view.el.down(selector,!0);p=oldRowDom&&oldRowDom.parentNode;if(p){p.removeChild(oldRowDom)}
p=view.getRow(view.all.last());if(p){p=p.parentElement}else{p=me.getSummaryRowPlaceholder(view);p=p&&p.tBodies&&p.tBodies[0]}
if(p){p.appendChild(newRowDom)}}},afterHeaderCtLayout:function(headerCt){var me=this,view=me.view,columns=view.getVisibleColumnManager().getColumns(),len=columns.length,i,column,summaryEl,el,width,innerCt;if(me.showSummaryRow&&view.refreshCounter){if(me.dock){summaryEl=me.summaryBar.el;width=headerCt.getTableWidth();innerCt=me.summaryBar.innerCt;me.summaryBar.item.setWidth(width);if(headerCt.tooNarrow){width+=Ext.scrollbar.width()}
innerCt.setWidth(width)}else{summaryEl=Ext.fly(Ext.fly(view.getNodeContainer()).down('.'+me.summaryItemCls,!0))}
if(summaryEl){for(i=0;i<len;i++){column=columns[i];el=summaryEl.down(view.getCellSelector(column),!0);if(el){Ext.fly(el).setWidth(column.width||(column.lastBox?column.lastBox.width:100))}}}}},destroy:function(){var me=this;me.summaryRecord=me.storeListeners=Ext.destroy(me.storeListeners);me.callParent()}})
;
Ext.define('Ext.menu.Item',{extend:'Ext.Component',alias:'widget.menuitem',alternateClassName:'Ext.menu.TextItem',isMenuItem:!0,mixins:['Ext.mixin.Queryable'],requires:['Ext.Glyph'],config:{glyph:null},activated:!1,activeCls:Ext.baseCSSPrefix+'menu-item-active',clickHideDelay:0,destroyMenu:!0,disabledCls:Ext.baseCSSPrefix+'menu-item-disabled',hideOnClick:!0,menuAlign:'tl-tr?',menuExpandDelay:200,menuHideDelay:200,tooltipType:'qtip',focusable:!0,ariaRole:'menuitem',ariaEl:'itemEl',baseCls:Ext.baseCSSPrefix+'menu-item',arrowCls:Ext.baseCSSPrefix+'menu-item-arrow',baseIconCls:Ext.baseCSSPrefix+'menu-item-icon',textCls:Ext.baseCSSPrefix+'menu-item-text',indentCls:Ext.baseCSSPrefix+'menu-item-indent',indentNoSeparatorCls:Ext.baseCSSPrefix+'menu-item-indent-no-separator',indentRightIconCls:Ext.baseCSSPrefix+'menu-item-indent-right-icon',indentRightArrowCls:Ext.baseCSSPrefix+'menu-item-indent-right-arrow',linkCls:Ext.baseCSSPrefix+'menu-item-link',linkHrefCls:Ext.baseCSSPrefix+'menu-item-link-href',childEls:['itemEl','iconEl','textEl','arrowEl'],renderTpl:'<tpl if="plain">'+'{text}'+'<tpl else>'+'<a id="{id}-itemEl" data-ref="itemEl"'+' class="{linkCls}<tpl if="hasHref"> {linkHrefCls}</tpl>{childElCls}"'+' href="{href}" '+'<tpl if="hrefTarget"> target="{hrefTarget}"</tpl>'+' hidefocus="true"'+' unselectable="on"'+'<tpl if="tabIndex != null">'+' tabindex="{tabIndex}"'+'</tpl>'+'<tpl foreach="ariaAttributes"> {$}="{.}"</tpl>'+'>'+'<span id="{id}-textEl" data-ref="textEl" class="{textCls} {textCls}-{ui} {indentCls}{childElCls}" unselectable="on" role="presentation">{text}</span>'+'<tpl if="hasIcon">'+'<div role="presentation" id="{id}-iconEl" data-ref="iconEl" class="{baseIconCls}-{ui} {baseIconCls}'+'{[values.rightIcon ? "-right" : ""]} {iconCls}'+'{childElCls} {glyphCls}" style="<tpl if="icon">background-image:url({icon});</tpl>'+'<tpl if="glyph">'+'<tpl if="glyphFontFamily">'+'font-family:{glyphFontFamily};'+'</tpl>'+'">'+'{glyph}'+'<tpl else>'+'">'+'</tpl>'+'</div>'+'</tpl>'+'<tpl if="showCheckbox">'+'<div role="presentation" id="{id}-checkEl" data-ref="checkEl" class="{baseIconCls}-{ui} {baseIconCls}'+'{[(values.hasIcon && !values.rightIcon) ? "-right" : ""]} '+'{groupCls} {checkboxCls}{childElCls}">'+'</div>'+'</tpl>'+'<tpl if="hasMenu">'+'<div role="presentation" id="{id}-arrowEl" data-ref="arrowEl" class="{arrowCls} {arrowCls}-{ui}{childElCls}"></div>'+'</tpl>'+'</a>'+'</tpl>',autoEl:{role:'presentation'},maskOnDisable:!1,iconAlign:'left',initComponent:function(){var me=this,cls=me.cls?[me.cls]:[],menu;if(me.hasOwnProperty('canActivate')){me.focusable=me.canActivate}
if(me.plain){cls.push(Ext.baseCSSPrefix+'menu-item-plain')}
if(cls.length){me.cls=cls.join(' ')}
if(me.menu){menu=me.menu;me.menu=null;me.setMenu(menu)}
me.callParent(arguments)},canFocus:function(){var me=this;return me.focusable&&me.rendered&&me.canActivate!==!1&&!me.destroying&&!me.destroyed&&me.isVisible(!0)},onFocus:function(e){var me=this;me.callParent([e]);if(!me.plain){me.addCls(me.activeCls)}
me.activated=!0;if(me.hasListeners.activate){me.fireEvent('activate',me)}},onFocusLeave:function(e){var me=this;me.callParent([e]);if(!me.plain){me.removeCls(me.activeCls)}
me.doHideMenu();me.activated=!1;if(me.hasListeners.deactivate){me.fireEvent('deactivate',me)}},doHideMenu:function(){var menu=this.menu;this.cancelDeferExpand();if(menu&&menu.isVisible()){menu.hide()}},deferHideParentMenus:function(){var menu;for(menu=this.getRefOwner();menu&&((menu.isMenu&&menu.floating)||menu.isMenuItem);menu=menu.getRefOwner()){if(menu.isMenu){menu.hide()}}},expandMenu:function(event,delay){var me=this;if(!me.disabled&&me.activated&&me.menu){me.hideOnClick=!1;me.cancelDeferHide();delay=delay==null?me.menuExpandDelay:delay;if(delay===0){me.doExpandMenu(event)}else{me.cancelDeferExpand();me.expandMenuTimer=Ext.defer(me.doExpandMenu,delay,me,[event])}}},doExpandMenu:function(clickEvent){var me=this,menu=me.menu;if(!menu.isVisible()){me.parentMenu.activeChild=menu;menu.ownerCmp=me;menu.parentMenu=me.parentMenu;menu.constrainTo=document.body;menu.autoFocus=!clickEvent||!clickEvent.pointerType;menu.showBy(me,me.menuAlign)}else if(clickEvent&&clickEvent.type==='keydown'){menu.focus()}},getRefItems:function(deep){var menu=this.menu,items;if(menu){items=menu.getRefItems(deep);items.unshift(menu)}
return items||[]},getValue:function(){return this.value},hideMenu:function(delay){var me=this;if(me.menu){me.cancelDeferExpand();me.hideMenuTimer=Ext.defer(me.doHideMenu,Ext.isNumber(delay)?delay:me.menuHideDelay,me)}},onClick:function(e){var me=this,clickHideDelay=me.clickHideDelay,browserEvent=e.browserEvent,clickResult,preventDefault;if(!me.href||me.disabled){e.stopEvent();if(me.disabled){return!1}}
if(me.disabled||me.handlingClick){return}
if(me.hideOnClick&&!me.menu){if(!clickHideDelay){me.deferHideParentMenus()}else{me.deferHideParentMenusTimer=Ext.defer(me.deferHideParentMenus,clickHideDelay,me)}}
clickResult=me.fireEvent('click',me,e);if(me.destroyed){return}
if(clickResult!==!1&&me.handler){Ext.callback(me.handler,me.scope,[me,e],0,me)}
if(me.destroyed){return}
if(Ext.isIE9m){preventDefault=browserEvent.returnValue===!1?!0:!1}else{preventDefault=!!browserEvent.defaultPrevented}
if(me.href&&e.type!=='click'&&!preventDefault){me.handlingClick=!0;me.itemEl.dom.click();me.handlingClick=!1}
if(!me.hideOnClick&&!me.hasFocus){me.focus()}
return clickResult},onRemoved:function(){var me=this;if(me.activated&&me.parentMenu.activeItem===me){me.parentMenu.deactivateActiveItem()}
me.callParent(arguments);me.parentMenu=me.ownerCmp=null},doDestroy:function(){var me=this;if(me.rendered){me.clearTip()}
me.cancelDeferExpand();me.cancelDeferHide();Ext.undefer(me.deferHideParentMenusTimer);me.setMenu(null);me.callParent()},beforeRender:function(){var me=this,glyph=me.glyph,glyphFontFamily,hasIcon=!!(me.icon||me.iconCls||glyph),hasMenu=!!me.menu,rightIcon=((me.iconAlign==='right')&&!hasMenu),isCheckItem=me.isMenuCheckItem,indentCls=[],ownerCt=me.ownerCt,isOwnerPlain=ownerCt.plain;if(me.plain){me.ariaEl='el'}
me.callParent();if(hasIcon){if(hasMenu&&me.showCheckbox){hasIcon=!1}}
if(glyph){glyphFontFamily=glyph.fontFamily;glyph=glyph.character}
if(!isOwnerPlain||(hasIcon&&!rightIcon)||isCheckItem){if(ownerCt.showSeparator&&!isOwnerPlain){indentCls.push(me.indentCls)}else{indentCls.push(me.indentNoSeparatorCls)}}
if(hasMenu){indentCls.push(me.indentRightArrowCls)}else if(hasIcon&&(rightIcon||isCheckItem)){indentCls.push(me.indentRightIconCls)}
Ext.applyIf(me.renderData,{hasHref:!!me.href,href:me.href||'#',hrefTarget:me.hrefTarget,icon:me.icon,iconCls:me.iconCls,glyph:glyph,glyphCls:glyph?Ext.baseCSSPrefix+'menu-item-glyph':undefined,glyphFontFamily:glyphFontFamily,hasIcon:hasIcon,hasMenu:hasMenu,indent:!isOwnerPlain||hasIcon||isCheckItem,isCheckItem:isCheckItem,rightIcon:rightIcon,plain:me.plain,text:me.text,arrowCls:me.arrowCls,baseIconCls:me.baseIconCls,textCls:me.textCls,indentCls:indentCls.join(' '),linkCls:me.linkCls,linkHrefCls:me.linkHrefCls,groupCls:me.group?me.groupCls:'',tabIndex:me.tabIndex})},onRender:function(){var me=this;me.callParent(arguments);if(me.tooltip){me.setTooltip(me.tooltip,!0)}},getMenu:function(){return this.menu||null},setMenu:function(menu,destroyMenu){var me=this,oldMenu=me.menu,arrowEl=me.arrowEl,ariaDom=me.ariaEl.dom,ariaAttr,instanced;if(oldMenu){oldMenu.ownerCmp=oldMenu.parentMenu=null;if(destroyMenu===!0||(destroyMenu!==!1&&me.destroyMenu)){Ext.destroy(oldMenu)}
if(ariaDom){ariaDom.removeAttribute('aria-haspopup');ariaDom.removeAttribute('aria-owns')}else{ariaAttr=(me.ariaRenderAttributes||(me.ariaRenderAttributes={}));delete ariaAttr['aria-haspopup'];delete ariaAttr['aria-owns']}}
if(menu){instanced=menu.isMenu;menu=me.menu=Ext.menu.Manager.get(menu,{ownerCmp:me,focusOnToFront:!1});menu.setOwnerCmp(me,instanced);if(ariaDom){ariaDom.setAttribute('aria-haspopup',!0);ariaDom.setAttribute('aria-owns',menu.id)}else{ariaAttr=(me.ariaRenderAttributes||(me.ariaRenderAttributes={}));ariaAttr['aria-haspopup']=!0;ariaAttr['aria-owns']=menu.id}}else{menu=me.menu=null}
if(menu&&me.rendered&&!me.destroying&&arrowEl){arrowEl[menu?'addCls':'removeCls'](me.arrowCls)}},setHandler:function(fn,scope){this.handler=fn||null;this.scope=scope},setIcon:function(icon){var me=this,iconEl=me.iconEl,oldIcon=me.icon;if(me.glyph){me.setGlyph(null)}
if(iconEl){iconEl.setStyle('background-image',icon?'url('+icon+')':'')}
me.icon=icon;me.fireEvent('iconchange',me,oldIcon,icon)},setIconCls:function(iconCls){var me=this,iconEl=me.iconEl,oldCls=me.iconCls;if(me.glyph){me.setGlyph(null)}
if(iconEl){iconEl.setStyle('background-image','');if(me.iconCls){iconEl.removeCls(me.iconCls)}
if(iconCls){iconEl.addCls(iconCls)}}
me.iconCls=iconCls;me.fireEvent('iconchange',me,oldCls,iconCls)},setText:function(text){var me=this,el=me.textEl||me.el,oldText=me.text;me.text=text;if(me.rendered){el.setHtml(text||'');me.updateLayout()}
me.fireEvent('textchange',me,oldText,text)},getTipAttr:function(){return this.tooltipType==='qtip'?'data-qtip':'title'},clearTip:function(){if(Ext.quickTipsActive&&Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.itemEl)}},setTooltip:function(tooltip,initial){var me=this;if(me.rendered){if(!initial){me.clearTip()}
if(Ext.quickTipsActive&&Ext.isObject(tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:me.itemEl.id},tooltip));me.tooltip=tooltip}else{me.itemEl.dom.setAttribute(me.getTipAttr(),tooltip)}}else{me.tooltip=tooltip}
return me},getFocusEl:function(){return this.plain?this.el:this.itemEl},getFocusClsEl:function(){return this.el},privates:{cancelDeferExpand:function(){window.clearTimeout(this.expandMenuTimer)},cancelDeferHide:function(){window.clearTimeout(this.hideMenuTimer)}},applyGlyph:function(glyph,oldGlyph){if(glyph){if(!glyph.isGlyph){glyph=new Ext.Glyph(glyph)}
if(glyph.isEqual(oldGlyph)){glyph=undefined}}
return glyph},updateGlyph:function(glyph,oldGlyph){var iconEl=this.iconEl;if(iconEl){iconEl.setStyle('background-image','none');this.icon=null;if(glyph){iconEl.dom.innerHTML=glyph.character;iconEl.setStyle(glyph.getStyle())}else{iconEl.dom.innerHTML=''}}}})
;
Ext.define('Ext.theme.triton.menu.Item',{override:'Ext.menu.Item',compatibility:Ext.isIE8,onFocus:function(e){this.callParent([e]);this.repaintIcons()},onFocusLeave:function(e){this.callParent([e]);this.repaintIcons()},privates:{repaintIcons:function(){var iconEl=this.iconEl,arrowEl=this.arrowEl,checkEl=this.checkEl;if(iconEl){iconEl.syncRepaint()}
if(arrowEl){arrowEl.syncRepaint()}
if(checkEl){checkEl.syncRepaint()}}}})
;
Ext.define('Ext.menu.CheckItem',{extend:'Ext.menu.Item',alias:'widget.menucheckitem',checkedCls:Ext.baseCSSPrefix+'menu-item-checked',uncheckedCls:Ext.baseCSSPrefix+'menu-item-unchecked',groupCls:Ext.baseCSSPrefix+'menu-group-icon',hideOnClick:!1,checkChangeDisabled:!1,submenuText:'{0} submenu',ariaRole:'menuitemcheckbox',childEls:['checkEl'],defaultBindProperty:'checked',showCheckbox:!0,isMenuCheckItem:!0,checkboxCls:Ext.baseCSSPrefix+'menu-item-checkbox',initComponent:function(){var me=this,checked=me.checked;me.checkedConfigure=checked;me.checked=!!checked;me.callParent();if(me.group){Ext.menu.Manager.registerCheckable(me);if(me.initialConfig.hideOnClick!==!1){me.hideOnClick=!0}}},beforeRender:function(){var me=this,ariaAttr;me.callParent();Ext.apply(me.renderData,{checkboxCls:me.checkboxCls,showCheckbox:me.showCheckbox});ariaAttr=(me.ariaRenderAttributes||(me.ariaRenderAttributes={}));ariaAttr['aria-checked']=me.menu?'mixed':me.checked;if(me.menu){ariaAttr['aria-label']=Ext.String.formatEncode(me.submenuText,me.text)}},afterRender:function(){var me=this;me.callParent();me.checked=!me.checked;me.initial=!0;me.setChecked(!me.checked,!0);me.initial=!1;if(me.checkChangeDisabled){me.disableCheckChange()}
if(Ext.isGecko&&me.checkEl){me.checkEl.on('mousedown',me.onMouseDownCheck)}},disableCheckChange:function(){var me=this,checkEl=me.checkEl;if(checkEl){checkEl.addCls(me.disabledCls)}
if(Ext.isIE8&&me.rendered){me.el.repaint()}
me.checkChangeDisabled=!0},enableCheckChange:function(){var me=this,checkEl=me.checkEl;if(checkEl){checkEl.removeCls(me.disabledCls)}
me.checkChangeDisabled=!1},onMouseDownCheck:function(e){e.preventDefault()},onClick:function(e){var me=this;if(!(me.disabled||me.checkChangeDisabled||me.checked&&me.group||me.menu&&"touch"===e.pointerType&&!me.checkEl.contains(e.target))){me.setChecked(!me.checked);if(e.type==='keydown'&&me.menu){return!1}}
return me.callParent([e])},doDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent()},setText:function(text){var me=this,ariaDom=me.ariaEl.dom;me.callParent([text]);if(ariaDom&&me.menu){ariaDom.setAttribute('aria-label',Ext.String.formatEncode(me.submenuText,text))}},setChecked:function(checked,suppressEvents){var me=this,checkedCls=me.checkedCls,uncheckedCls=me.uncheckedCls,el=me.el,ariaDom=me.ariaEl.dom,checkedConfigure=me.checkedConfigure;if(me.checked!==checked&&(suppressEvents||me.fireEvent('beforecheckchange',me,checked)!==!1)){if(el){if(checked){el.addCls(checkedCls);el.removeCls(uncheckedCls)}else{el.addCls(uncheckedCls);el.removeCls(checkedCls)}}
if(ariaDom){ariaDom.setAttribute('aria-checked',me.menu?'mixed':!!checked)}
me.checked=checked;me.checkedConfigure=checked;Ext.menu.Manager.onCheckChange(me,checked);if(!(me.initial&&checkedConfigure==null)){me.publishState('checked',checked)}
if(!suppressEvents){Ext.callback(me.checkHandler,me.scope,[me,checked],0,me);me.fireEvent('checkchange',me,checked)}}}})
;
Ext.define('Ext.menu.Separator',{extend:'Ext.menu.Item',alias:'widget.menuseparator',focusable:!1,canActivate:!1,hideOnClick:!1,plain:!0,separatorCls:Ext.baseCSSPrefix+'menu-item-separator',text:'&#160;',ariaRole:'separator',beforeRender:function(){this.addCls(this.separatorCls);this.callParent()}})
;
Ext.define('Ext.theme.neptune.menu.Separator',{override:'Ext.menu.Separator',border:!0})
;
Ext.define('Ext.menu.Menu',{extend:'Ext.panel.Panel',alias:'widget.menu',requires:['Ext.layout.container.VBox','Ext.menu.CheckItem','Ext.menu.Item','Ext.menu.Manager','Ext.menu.Separator'],defaultType:'menuitem',enableKeyNav:!0,allowOtherMenus:!1,ariaRole:'menu',floating:!0,constrain:!0,hidden:!0,hideMode:'visibility',ignoreParentClicks:!1,mouseLeaveDelay:50,isMenu:!0,showSeparator:!0,minWidth:undefined,defaultMinWidth:120,defaultAlign:'tl-bl?',focusOnToFront:!1,bringParentToFront:!1,alignOnScroll:!1,focusable:!0,tabIndex:-1,focusableContainer:!0,defaultFocus:':focusable',allowFocusingDisabledChildren:!0,menuClickBuffer:0,baseCls:Ext.baseCSSPrefix+'menu',_iconSeparatorCls:Ext.baseCSSPrefix+'menu-icon-separator',_itemCmpCls:Ext.baseCSSPrefix+'menu-item-cmp',layout:{type:'vbox',align:'stretchmax',overflowHandler:'Scroller'},initComponent:function(){var me=this,cls=[Ext.baseCSSPrefix+'menu'],bodyCls=me.bodyCls?[me.bodyCls]:[],isFloating=me.floating!==!1,listeners={element:'el',click:me.onClick,mouseover:me.onMouseOver,scope:me};if(Ext.supports.Touch){listeners.pointerdown=me.onMouseOver}
me.on(listeners);me.on({beforeshow:me.onBeforeShow,scope:me});if(me.plain){cls.push(Ext.baseCSSPrefix+'menu-plain')}
me.cls=cls.join(' ');bodyCls.push(Ext.baseCSSPrefix+'menu-body',Ext.dom.Element.unselectableCls);me.bodyCls=bodyCls.join(' ');if(isFloating){if(me.minWidth===undefined){me.minWidth=me.defaultMinWidth}}else{me.hidden=!!me.initialConfig.hidden;me.constrain=!1}
me.callParent();Ext.override(me.getLayout(),{configureItem:me.configureItem});me.itemOverTask=new Ext.util.DelayedTask(me.handleItemOver,me)},initFloatConstrain:Ext.emptyFn,getInherited:function(){var result=this.callParent();if(this.floating){result.hidden=this.hidden}
return result},beforeRender:function(){var me=this;me.callParent();if(!me.getSizeModel().width.shrinkWrap){me.layout.align='stretch'}
if(me.floating){me.ariaRenderAttributes=me.ariaRenderAttributes||{};me.ariaRenderAttributes['aria-expanded']=!!me.autoShow}},onBoxReady:function(width,height){var me=this,iconSeparatorCls=me._iconSeparatorCls,keyNav=me.focusableKeyNav;if(keyNav){keyNav.map.addBinding([{key:Ext.event.Event.ESC,handler:me.onEscapeKey,scope:me},{key:/[\w]/,handler:me.onShortcutKey,scope:me,shift:!1,ctrl:!1,alt:!1}])}else{me.escapeKeyNav=new Ext.util.KeyNav({target:me.el,eventName:'keydown',scope:me,esc:me.onEscapeKey})}
me.callParent([width,height]);if(me.showSeparator){me.iconSepEl=me.body.insertFirst({role:'presentation',cls:iconSeparatorCls+' '+iconSeparatorCls+'-'+me.ui,html:'&#160;'})}
if(Ext.supports.Touch||Ext.supports.MSPointerEvents||Ext.supports.PointerEvents){me.el.on({scope:me,click:me.preventClick,translate:!1})}
me.mouseMonitor=me.el.monitorMouseLeave(me.mouseLeaveDelay,me.onMouseLeave,me)},onFocusEnter:function(e){var me=this,hierarchyState;me.callParent([e]);me.mixins.focusablecontainer.onFocusEnter.call(me,e);if(me.floating){hierarchyState=me.getInherited();if(!hierarchyState.topmostFocusEvent){hierarchyState.topmostFocusEvent=e}}},onFocusLeave:function(e){var me=this;me.callParent([e]);me.lastFocusedChild=null;me.mixins.focusablecontainer.onFocusLeave.call(me,e);if(me.floating){me.hide()}},handleItemOver:function(e,item){if(!item.containsFocus&&(e.pointerType==='mouse'||item.isMenuItem)){item.focus()}
if(item.expandMenu){item.expandMenu(e)}},canActivateItem:function(item){return item&&item.isFocusable()},deactivateActiveItem:function(){var me=this,activeItem=me.lastFocusedChild;if(activeItem){activeItem.blur()}},getItemFromEvent:function(e){var me=this,renderTarget=me.layout.getRenderTarget().dom,toEl=e.getTarget();while(toEl.parentNode!==renderTarget){toEl=toEl.parentNode;if(!toEl){return}}
return Ext.getCmp(toEl.id)},lookupComponent:function(cmp){var me=this;if(typeof cmp==='string'){if(cmp[0]==='@'){cmp=this.callParent([cmp])}else{cmp=me.lookupItemFromString(cmp)}}else if(Ext.isObject(cmp)){cmp=me.lookupItemFromObject(cmp)}
if(!cmp.dock){cmp.minWidth=cmp.minWidth||me.minWidth}
return cmp},lookupItemFromObject:function(cmp){var type=this.defaultType;if(!cmp.isComponent){if(!cmp.xtype&&Ext.isBoolean(cmp.checked)){type='menucheckitem'}
cmp=Ext.ComponentManager.create(cmp,type)}
if(cmp.isMenuItem){cmp.parentMenu=this}
return cmp},lookupItemFromString:function(cmp){return(cmp==='separator'||cmp==='-')?new Ext.menu.Separator():new Ext.menu.Item({canActivate:!1,hideOnClick:!1,plain:!0,text:cmp})},configureItem:function(cmp){var me=this.owner,prefix=Ext.baseCSSPrefix,ui=me.ui,cls,cmpCls;if(cmp.isMenuItem){cmp.setUI(ui)}else if(me.items.getCount()>1&&!cmp.rendered&&!cmp.dock){cmpCls=me._itemCmpCls;cls=[cmpCls,cmpCls+'-'+ui];if(!me.plain&&(cmp.indent!==!1||cmp.iconCls==='no-icon')){cls.push(prefix+'menu-item-indent-'+ui)}
if(cmp.rendered){cmp.el.addCls(cls)}else{cmp.cls=(cmp.cls||'')+' '+cls.join(' ')}
cmp.$extraMenuCls=cls}
this.callParent(arguments)},onRemove:function(cmp){this.callParent([cmp]);if(!cmp.destroyed&&cmp.$extraMenuCls){cmp.el.removeCls(cmp.$extraMenuCls)}},onClick:function(e){var me=this,type=e.type,item,clickResult,iskeyEvent=type==='keydown';if(me.disabled){e.stopEvent();return}
item=me.getItemFromEvent(e);if(item&&item.isMenuItem){if(!item.menu||!me.ignoreParentClicks){clickResult=item.onClick(e)}else{e.stopEvent()}
if(me.destroyed){return}
if(item.menu&&clickResult!==!1&&iskeyEvent){item.expandMenu(e,0)}}
if(!item||item.disabled){item=undefined}
me.fireEvent('click',me,item,e)},doDestroy:function(){var me=this;if(me.escapeKeyNav){me.escapeKeyNav.destroy()}
me.itemOverTask.cancel();me.parentMenu=me.ownerCmp=me.escapeKeyNav=null;if(me.rendered){me.el.un(me.mouseMonitor);Ext.destroy(me.iconSepEl)}
Ext.menu.Manager.onHide(me);me.callParent()},onMouseLeave:function(e){var me=this;if(me.itemOverTask){me.itemOverTask.cancel()}
if(me.disabled){return}
me.fireEvent('mouseleave',me,e)},onMouseOver:function(e){var me=this,fromEl=e.getRelatedTarget(),mouseEnter=!me.el.contains(fromEl),item=me.getItemFromEvent(e),parentMenu=me.parentMenu,ownerCmp=me.ownerCmp;if(mouseEnter&&parentMenu){parentMenu.setActiveItem(ownerCmp);ownerCmp.cancelDeferHide();parentMenu.mouseMonitor.mouseenter();parentMenu.itemOverTask.cancel()}
if(me.disabled){return}
if(item){if(e.pointerType==='touch'){me.handleItemOver(e,item)}else{me.itemOverTask.delay(me.expanded?me.mouseLeaveDelay:0,null,null,[e,item])}}
if(mouseEnter){me.fireEvent('mouseenter',me,e)}
me.fireEvent('mouseover',me,item,e)},setActiveItem:function(item){var me=this;if(item&&(item!==me.lastFocusedChild)){me.focusChild(item,1)}},onEscapeKey:function(){if(this.floating){this.hide()}},onShortcutKey:function(keyCode,e){var shortcutChar=String.fromCharCode(e.getCharCode()),items=this.query('>[text]'),len=items.length,item=this.lastFocusedChild,focusIndex=Ext.Array.indexOf(items,item),i=focusIndex;if(len===0){return}
for(;;){if(++i===len){i=0}
item=items[i];if(i===focusIndex){return}
if(item.text&&item.text[0].toUpperCase()===shortcutChar){item.focus();return}}},onBeforeShow:function(){if(Ext.Date.getElapsed(this.lastHide)<this.menuClickBuffer){return!1}},beforeShow:function(){var me=this,parent;if(me.floating){parent=me.hasFloatMenuParent();if(!parent&&!me.allowOtherMenus){Ext.menu.Manager.hideAll()}}
me.callParent()},afterShow:function(animateTarget,callback,scope){var me=this,ariaDom=me.ariaEl.dom;me.callParent([animateTarget,callback,scope]);Ext.menu.Manager.onShow(me);if(me.parentMenu){me.parentMenu.expanded=!0}
if(me.floating&&ariaDom){ariaDom.setAttribute('aria-expanded',!0)}
if(me.floating){me.maxHeight=me.savedMaxHeight}
if(me.autoFocus){me.focus()}},onHide:function(animateTarget,cb,scope){var me=this,ariaDom=me.ariaEl.dom;me.callParent([animateTarget,cb,scope]);me.lastHide=Ext.Date.now();Ext.menu.Manager.onHide(me);if(me.parentMenu){me.parentMenu.expanded=!1}
if(me.floating&&ariaDom){ariaDom.setAttribute('aria-expanded',!1)}},afterHide:function(cb,scope){this.callParent([cb,scope]);delete this.getInherited().topmostFocusEvent},preventClick:function(e){var item=this.getItemFromEvent(e);if(item&&item.isMenuItem&&!item.href){e.preventDefault()}},privates:{applyDefaults:function(config){if(!Ext.isString(config)){config=this.callParent([config])}
return config},initFocusableElement:function(){var me=this,tabIndex=me.tabIndex,el=me.el;if(me.floating&&tabIndex!=null&&el&&el.dom){el.dom.setAttribute('tabIndex',tabIndex);el.dom.setAttribute('data-componentid',me.id)}},processFocusableContainerKeyEvent:function(e){if(e.keyCode===e.ESC){e.target=this.el.dom}else if(e.keyCode===e.TAB&&Ext.fly(e.target).is('input[type=text],textarea')){e.preventDefault();e.target=this.getItemFromEvent(e).el.dom;if(e.shiftKey){e.shiftKey=!1;e.keyCode=e.UP}else{e.keyCode=e.DOWN}}else{return this.callParent([e])}
return e},onFocusableContainerTabKey:function(e){var me=this;if(me.floating){if(e.shiftKey){e.preventDefault()}else{me.focusEnterEvent=me.getInherited().topmostFocusEvent}
me.hide()}},onFocusableContainerEnterKey:function(e){this.onClick(e)},onFocusableContainerSpaceKey:function(e){this.onClick(e)},onFocusableContainerLeftKey:function(e){e.preventDefault();if(this.parentMenu){this.ownerCmp.focus();this.hide()}},onFocusableContainerRightKey:function(e){var me=this,focusItem=me.lastFocusedChild;e.preventDefault();if(focusItem&&focusItem.expandMenu){focusItem.expandMenu(e,0)}},hasFloatMenuParent:function(){return this.parentMenu||this.up('menu[floating=true]')},setOwnerCmp:function(comp,instanced){var me=this;me.parentMenu=comp.isMenuItem?comp:null;me.ownerCmp=comp;me.registerWithOwnerCt();delete me.hierarchicallyHidden;me.onInheritedAdd(comp,instanced);me.containerOnAdded(comp,instanced)}}})
;
Ext.define('Ext.theme.neptune.menu.Menu',{override:'Ext.menu.Menu',showSeparator:!1})
;
Ext.define('Ext.theme.triton.menu.Menu',{override:'Ext.menu.Menu',compatibility:Ext.isIE8,afterShow:function(){var me=this,items,item,i,len;me.callParent(arguments);items=me.items.getRange();for(i=0,len=items.length;i<len;i++){item=items[i];if(item&&item.repaintIcons){item.repaintIcons()}}}})
;
Ext.define('Ext.grid.filters.filter.Base',{mixins:['Ext.mixin.Factoryable'],factoryConfig:{type:'grid.filter'},$configPrefixed:!1,$configStrict:!1,config:{itemDefaults:null,menuDefaults:{xtype:'menu'},updateBuffer:500,serializer:null},active:!1,type:'string',dataIndex:null,menu:null,isGridFilter:!0,defaultRoot:'data',filterIdPrefix:Ext.baseCSSPrefix+'gridfilter',constructor:function(config){var me=this,column;me.callParent([config]);me.initConfig(config);column=me.column;me.columnListeners=column.on('destroy',me.destroy,me,{destroyable:!0});me.dataIndex=me.dataIndex||column.dataIndex;me.task=new Ext.util.DelayedTask(me.setValue,me)},destroy:function(){var me=this;if(me.task){me.task.cancel();me.task=null}
me.columnListeners=me.columnListeners.destroy();me.grid=me.menu=Ext.destroy(me.menu);me.callParent()},addStoreFilter:function(filter){var filters=this.getGridStore().getFilters(),idx=filters.indexOf(filter),existing=idx!==-1?filters.getAt(idx):null;if(!existing||!Ext.util.Filter.isEqual(existing,filter)){filters.add(filter)}},createFilter:function(config,key){var filter=new Ext.util.Filter(this.getFilterConfig(config,key));filter.isGridFilter=!0;return filter},getFilterConfig:function(config,key){config.id=this.getBaseIdPrefix();if(!config.property){config.property=this.dataIndex}
if(!config.root){config.root=this.defaultRoot}
if(key){config.id+='-'+key}
config.serializer=this.getSerializer();return config},createMenu:function(){this.menu=Ext.widget(this.getMenuConfig())},getActiveState:function(config,value){var active=config.active;return(active!==undefined)?active:value!==undefined},getBaseIdPrefix:function(){return this.filterIdPrefix+'-'+this.dataIndex},getMenuConfig:function(){return Ext.apply({},this.getMenuDefaults())},getGridStore:function(){return this.grid.getStore()},getStoreFilter:function(key){var id=this.getBaseIdPrefix();if(key){id+='-'+key}
return this.getGridStore().getFilters().get(id)},onValueChange:function(field,e){var me=this,keyCode=e.getKey(),updateBuffer=me.updateBuffer,value;if(keyCode===e.TAB){return}
if(!field.isFormField){Ext.raise('`field` should be a form field instance.')}
if(field.isValid()){if(keyCode===e.RETURN){me.menu.hide();return}
value=me.getValue(field);if(value===me.value){return}
if(updateBuffer){me.task.delay(updateBuffer,null,null,[value])}else{me.setValue(value)}}},preprocess:Ext.emptyFn,removeStoreFilter:function(filter){this.getGridStore().getFilters().remove(filter)},getValue:Ext.emptyFn,setActive:function(active){var me=this,menuItem=me.owner.activeFilterMenuItem,filterCollection;if(me.active!==active){me.active=active;filterCollection=me.getGridStore().getFilters();filterCollection.beginUpdate();if(active){me.activate()}else{me.deactivate()}
filterCollection.endUpdate();if(menuItem&&menuItem.activeFilter===me){menuItem.setChecked(active)}
me.setColumnActive(active);me.grid.fireEventArgs(active?'filteractivate':'filterdeactivate',[me,me.column])}},setColumnActive:function(active){this.column[active?'addCls':'removeCls'](this.owner.filterCls)},showMenu:function(menuItem){var me=this;if(!me.menu){me.createMenu()}
menuItem.activeFilter=me;menuItem.setMenu(me.menu,!1);menuItem.setChecked(me.active);menuItem.setDisabled(me.disabled===!0);me.activate(!0)},updateStoreFilter:function(){this.getGridStore().getFilters().notify('endupdate')}})
;
Ext.define('Ext.grid.filters.filter.SingleFilter',{extend:'Ext.grid.filters.filter.Base',constructor:function(config){var me=this,filter,value;me.callParent([config]);value=me.value;filter=me.getStoreFilter();if(filter){me.active=!0}else{if(me.grid.stateful&&me.getGridStore().saveStatefulFilters){value=undefined}
me.active=me.getActiveState(config,value);filter=me.createFilter({operator:me.operator,value:value});if(me.active){me.addStoreFilter(filter)}}
if(me.active){me.setColumnActive(!0)}
me.filter=filter},activate:function(showingMenu){if(showingMenu){this.activateMenu()}else{this.addStoreFilter(this.filter)}},deactivate:function(){this.removeStoreFilter(this.filter)},getValue:function(field){return field.getValue()},onFilterRemove:function(){if(!this.menu||this.active){this.active=!1}}})
;
Ext.define('Ext.grid.filters.filter.Boolean',{extend:'Ext.grid.filters.filter.SingleFilter',alias:'grid.filter.boolean',type:'boolean',operator:'==',defaultValue:!1,yesText:'Yes',noText:'No',updateBuffer:0,constructor:function(config){var me=this,filterValue;me.callParent([config]);if(me.filter){filterValue=me.filter.getValue();if(Ext.isEmpty(filterValue,!0)&&me.defaultValue!==null){me.filter.setValue(!!me.defaultValue)}}},createMenu:function(config){var me=this,gId=Ext.id(),listeners={scope:me,click:me.onClick},itemDefaults=me.getItemDefaults();me.callParent(arguments);me.menu.add([Ext.apply({text:me.yesText,filterKey:1,group:gId,checked:!!me.defaultValue,hideOnClick:!1,listeners:listeners},itemDefaults),Ext.apply({text:me.noText,filterKey:0,group:gId,checked:!me.defaultValue&&me.defaultValue!==null,hideOnClick:!1,listeners:listeners},itemDefaults)])},onClick:function(field){this.setValue(!!field.filterKey)},setValue:function(value){var me=this;me.filter.setValue(value);if(value!==undefined&&me.active){me.value=value;me.updateStoreFilter()}else{me.setActive(!0)}},activateMenu:Ext.emptyFn})
;
Ext.define('Ext.grid.filters.filter.TriFilter',{extend:'Ext.grid.filters.filter.Base',menuItems:['lt','gt','-','eq'],constructor:function(config){var me=this,stateful=!1,filter={},filterGt,filterLt,filterEq,value,operator;me.callParent([config]);value=me.value;filterLt=me.getStoreFilter('lt');filterGt=me.getStoreFilter('gt');filterEq=me.getStoreFilter('eq');if(filterLt||filterGt||filterEq){stateful=me.active=!0;if(filterLt){me.onStateRestore(filterLt)}
if(filterGt){me.onStateRestore(filterGt)}
if(filterEq){me.onStateRestore(filterEq)}}else{if(me.grid.stateful&&me.getGridStore().saveStatefulFilters){value=undefined}
me.active=me.getActiveState(config,value)}
filter.lt=filterLt||me.createFilter({operator:'lt',value:(!stateful&&value&&Ext.isDefined(value.lt))?value.lt:null},'lt');filter.gt=filterGt||me.createFilter({operator:'gt',value:(!stateful&&value&&Ext.isDefined(value.gt))?value.gt:null},'gt');filter.eq=filterEq||me.createFilter({operator:'eq',value:(!stateful&&value&&Ext.isDefined(value.eq))?value.eq:null},'eq');me.filter=filter;if(me.active){me.setColumnActive(!0);if(!stateful){for(operator in value){me.addStoreFilter(me.filter[operator])}}}},activate:function(showingMenu){var me=this,filters=me.filter,fields=me.fields,filter,field,operator,value,isRootMenuItem;if(me.preventFilterRemoval){return}
for(operator in filters){filter=filters[operator];field=fields[operator];value=filter.getValue();if(value||value===0){if(field.isComponent){field.setValue(value);if(isRootMenuItem===undefined){isRootMenuItem=me.owner.activeFilterMenuItem===field.up('menuitem')}
if(!isRootMenuItem){field.up('menuitem').setChecked(!0,!0)}}else{field.value=value}
if(!showingMenu){me.addStoreFilter(filter)}}}},deactivate:function(){var me=this,filters=me.filter,f,filter,value;if(!me.countActiveFilters()||me.preventFilterRemoval){return}
me.preventFilterRemoval=!0;for(f in filters){filter=filters[f];value=filter.getValue();if(value||value===0){me.removeStoreFilter(filter)}}
me.preventFilterRemoval=!1},countActiveFilters:function(){var filters=this.filter,filterCollection=this.getGridStore().getFilters(),prefix=this.getBaseIdPrefix(),i=0,filter;if(filterCollection.length){for(filter in filters){if(filterCollection.get(prefix+'-'+filter)){i++}}}
return i},onFilterRemove:function(operator){var me=this,value;if(!me.menu&&me.countActiveFilters()){me.active=!1}else if(me.menu){value={};value[operator]=null;me.setValue(value)}},onStateRestore:Ext.emptyFn,setValue:function(value){var me=this,filters=me.filter,add=[],remove=[],active=!1,filterCollection=me.getGridStore().getFilters(),filter,v,i,rLen,aLen;if(me.preventFilterRemoval){return}
me.preventFilterRemoval=!0;if('eq' in value){v=filters.lt.getValue();if(v||v===0){remove.push(filters.lt)}
v=filters.gt.getValue();if(v||v===0){remove.push(filters.gt)}
v=value.eq;if(v||v===0){add.push(filters.eq);filters.eq.setValue(v)}else{remove.push(filters.eq)}}else{v=filters.eq.getValue();if(v||v===0){remove.push(filters.eq)}
if('lt' in value){v=value.lt;if(v||v===0){add.push(filters.lt);filters.lt.setValue(v)}else{remove.push(filters.lt)}}
if('gt' in value){v=value.gt;if(v||v===0){add.push(filters.gt);filters.gt.setValue(v)}else{remove.push(filters.gt)}}}
rLen=remove.length;aLen=add.length;active=!!(me.countActiveFilters()+aLen-rLen);if(rLen||aLen||active!==me.active){filterCollection.beginUpdate();if(rLen){for(i=0;i<rLen;i++){filter=remove[i];me.fields[filter.getOperator()].setValue(null);filter.setValue(null);me.removeStoreFilter(filter)}}
if(aLen){for(i=0;i<aLen;i++){me.addStoreFilter(add[i])}}
me.setActive(active);filterCollection.endUpdate()}
me.preventFilterRemoval=!1}})
;
Ext.define('Ext.grid.filters.filter.Date',{extend:'Ext.grid.filters.filter.TriFilter',alias:'grid.filter.date',uses:['Ext.picker.Date','Ext.menu.DatePicker'],type:'date',config:{fields:{lt:{text:'Before'},gt:{text:'After'},eq:{text:'On'}},pickerDefaults:{xtype:'datepicker',border:0},updateBuffer:0,dateFormat:undefined},itemDefaults:{xtype:'menucheckitem',selectOnFocus:!0,width:125,menu:{layout:'auto',plain:!0}},applyDateFormat:function(dateFormat){return dateFormat||Ext.Date.defaultFormat},createMenu:function(config){var me=this,listeners={scope:me,checkchange:me.onCheckChange},menuItems=me.menuItems,fields,itemDefaults,pickerCfg,i,len,key,item,cfg,field;me.callParent(arguments);itemDefaults=me.getItemDefaults();fields=me.getFields();pickerCfg=Ext.apply({minDate:me.minDate,maxDate:me.maxDate,format:me.dateFormat,listeners:{scope:me,select:me.onMenuSelect}},me.getPickerDefaults());me.fields={};for(i=0,len=menuItems.length;i<len;i++){key=menuItems[i];if(key!=='-'){cfg={menu:{xtype:'datemenu',hideOnClick:!1,pickerCfg:Ext.apply({itemId:key},pickerCfg)}};if(itemDefaults){Ext.merge(cfg,itemDefaults)}
if(fields){Ext.merge(cfg,fields[key])}
item=me.menu.add(cfg);field=me.fields[key]=item.down('datepicker');field.filter=me.filter[key];field.filterKey=key;item.on(listeners)}else{me.menu.add(key)}}},getPicker:function(item){return this.fields[item]},onCheckChange:function(field,checked){var filter=field.down('datepicker').filter,v;if(!checked&&filter.getValue()){v={};v[filter.getOperator()]=null;this.setValue(v)}},onFilterRemove:function(operator){var v={};v[operator]=null;this.setValue(v);this.fields[operator].up('menuitem').setChecked(!1,!0)},onStateRestore:function(filter){filter.setSerializer(this.getSerializer());filter.setConvert(this.convertDateOnly)},getFilterConfig:function(config,key){config=this.callParent([config,key]);config.serializer=this.getSerializer();config.convert=this.convertDateOnly;return config},convertDateOnly:function(v){var result=null;if(v){result=Ext.Date.clearTime(v,!0).getTime()}
return result},getSerializer:function(){var me=this;return function(data){var value=data.value;if(value){data.value=Ext.Date.format(value,me.getDateFormat())}}},onMenuSelect:function(picker,date){var me=this,fields=me.fields,filters=me.filter,field=fields[picker.itemId],gt=fields.gt,lt=fields.lt,eq=fields.eq,v={};field.up('menuitem').setChecked(!0,!0);if(field===eq){lt.up('menuitem').setChecked(!1,!0);gt.up('menuitem').setChecked(!1,!0)}else{eq.up('menuitem').setChecked(!1,!0);if(field===gt&&(+lt.value<+date)){lt.up('menuitem').setChecked(!1,!0);if(filters.lt.getValue()!=null){v.lt=null}}else if(field===lt&&(+gt.value>+date)){gt.up('menuitem').setChecked(!1,!0);if(filters.gt.getValue()!=null){v.gt=null}}}
v[field.filterKey]=date;me.setValue(v);picker.up('menu').hide()}})
;
Ext.define('Ext.grid.filters.filter.List',{extend:'Ext.grid.filters.filter.SingleFilter',alias:'grid.filter.list',type:'list',operator:'in',itemDefaults:{checked:!1,hideOnClick:!1},idField:'id',labelField:'text',labelIndex:null,loadingText:'Loading...',loadOnShow:!0,single:!1,plain:!0,gridStoreListenersCfg:{add:'onDataChanged',refresh:'onDataChanged',remove:'onDataChanged',update:'onDataChanged'},constructor:function(config){var me=this,gridStore;me.callParent([config]);if(me.itemDefaults.checked){Ext.raise('The itemDefaults.checked config is not supported, '+'use the value config instead.')}
me.labelIndex=me.labelIndex||me.column.dataIndex;if(me.store){me.store=Ext.StoreManager.lookup(me.store)}
if(!me.store&&!me.options){gridStore=me.getGridStore();if(me.value!=null&&me.active){me.gridStoreListeners=gridStore.on(Ext.apply({scope:me,destroyable:!0},me.gridStoreListenersCfg))}
me.gridListeners=me.grid.on({reconfigure:me.onReconfigure,scope:me,destroyable:!0});me.inferOptionsFromGridStore=!0}},destroy:function(){var me=this,store=me.store,autoStore=me.autoStore;if(store&&store.isStore){if(autoStore||store.autoDestroy){store.destroy()}else{store.un('load',me.bindMenuStore,me)}
me.store=null}
Ext.destroy(me.gridStoreListeners,me.gridListeners);me.callParent()},activateMenu:function(){var me=this,value=me.filter.getValue(),items,i,len,checkItem;if(!value||!value.length){return}
items=me.menu.items;for(i=0,len=items.length;i<len;i++){checkItem=items.getAt(i);if(Ext.Array.indexOf(value,checkItem.value)>-1){checkItem.setChecked(!0,!0)}}},bindMenuStore:function(options){var me=this;if(me.grid.destroyed||me.preventFilterRemoval){return}
me.createListStore(options);me.createMenuItems(me.store);me.loaded=!0},createListStore:function(options){var me=this,store=me.store,isStore=options.isStore,idField=me.idField,labelField=me.labelField,optionsStore=!1,storeData,o,i,len,value;if(isStore){if(options!==me.getGridStore()){optionsStore=!0;store=me.store=options}else{me.autoStore=!0;storeData=me.getOptionsFromStore(options)}}else{storeData=[];for(i=0,len=options.length;i<len;i++){value=options[i];switch(Ext.typeOf(value)){case 'array':storeData.push(value);break;case 'object':storeData.push(value);break;default:if(value!=null){o={};o[idField]=value;o[labelField]=value;storeData.push(o)}}}}
if(!optionsStore){if(store){store.destroy()}
store=me.store=new Ext.data.Store({fields:[idField,labelField],data:storeData});if(me.inferOptionsFromGridStore&!me.gridStoreListeners){me.gridStoreListeners=me.getGridStore().on(Ext.apply({scope:me,destroyable:!0},me.gridStoreListenersCfg))}
me.loaded=!0}
me.setStoreFilter(store)},createMenu:function(config){var me=this,gridStore=me.getGridStore(),store=me.store,options=me.options,menu;if(store){me.store=store=Ext.StoreManager.lookup(store)}
me.callParent([config]);menu=me.menu;if(store){if(!store.getCount()){menu.add({text:me.loadingText,iconCls:Ext.baseCSSPrefix+'mask-msg-text'});menu.on({show:me.show,scope:me});store.on('load',me.bindMenuStore,me,{single:!0})}else{me.createMenuItems(store)}}else if(options){me.bindMenuStore(options)}else if(gridStore.getCount()||gridStore.isFiltered()){me.bindMenuStore(gridStore)}else{gridStore.on('load',me.bindMenuStore,me,{single:!0})}},createMenuItems:function(store){var me=this,menu=me.menu,len=store.getCount(),contains=Ext.Array.contains,itemDefaults,record,gid,idValue,idField,labelValue,labelField,i,processed;if(len&&menu){itemDefaults=me.getItemDefaults();menu.suspendLayouts();menu.removeAll(!0);gid=me.single?Ext.id():null;idField=me.idField;labelField=me.labelField;processed=[];for(i=0;i<len;i++){record=store.getAt(i);idValue=record.get(idField);labelValue=record.get(labelField);if(labelValue==null||contains(processed,idValue)){continue}
processed.push(labelValue);menu.add(Ext.apply({text:labelValue,group:gid,value:idValue,checkHandler:me.onCheckChange,scope:me},itemDefaults))}
menu.resumeLayouts(!0)}},getFilterConfig:function(config,key){var value=config.value;if(Ext.isEmpty(value)){value=[]}else if(!Ext.isArray(value)){value=[value]}
config.value=value;return this.callParent([config,key])},getOptionsFromStore:function(store){var me=this,data=store.getData(),map={},ret=[],dataIndex=me.dataIndex,labelIndex=me.labelIndex,recData,idValue,labelValue;if(store.isFiltered()&&!store.remoteFilter){data=data.getSource()}
store.each(function(record){recData=record.data;idValue=recData[dataIndex];labelValue=recData[labelIndex];if(labelValue===undefined){labelValue=idValue}
if(!map[idValue]){map[idValue]=1;ret.push([idValue,labelValue])}},null,{filtered:!0,collapsed:!0});return ret},onCheckChange:function(){var me=this,updateBuffer=me.updateBuffer;if(updateBuffer){me.task.delay(updateBuffer)}else{me.setValue()}},onDataChanged:function(store){if(this.preventDefault){this.preventDefault=!1}else{this.bindMenuStore(store)}},onReconfigure:function(grid,store){if(store){this.bindMenuStore(store)}},setActive:function(active){if(this.active!==active){this.preventDefault=!0;this.callParent([active])}},setStoreFilter:function(options){var me=this,value=me.value,filter=me.filter;if(value){if(!Ext.isArray(value)){value=[value]}
filter.setValue(value)}
if(me.active){me.preventFilterRemoval=!0;me.addStoreFilter(filter);me.preventFilterRemoval=!1}},setValue:function(){var me=this,items=me.menu.items,value=[],i,len,checkItem;me.preventDefault=!0;for(i=0,len=items.length;i<len;i++){checkItem=items.getAt(i);if(checkItem.checked){value.push(checkItem.value)}}
if(!Ext.Array.equals(value,me.filter.getValue())){me.filter.setValue(value);len=value.length;if(len&&me.active){me.updateStoreFilter()}else{me.setActive(!!len)}}},show:function(){var store=this.store;if(this.loadOnShow&&!this.loaded&&!store.hasPendingLoad()){store.load()}}})
;
Ext.define('Ext.grid.filters.filter.Number',{extend:'Ext.grid.filters.filter.TriFilter',alias:['grid.filter.number','grid.filter.numeric'],uses:['Ext.form.field.Number'],type:'number',config:{fields:{gt:{iconCls:Ext.baseCSSPrefix+'grid-filters-gt',margin:'0 0 3px 0'},lt:{iconCls:Ext.baseCSSPrefix+'grid-filters-lt',margin:'0 0 3px 0'},eq:{iconCls:Ext.baseCSSPrefix+'grid-filters-eq',margin:0}}},emptyText:'Enter Number...',itemDefaults:{xtype:'numberfield',enableKeyEvents:!0,hideEmptyLabel:!1,labelSeparator:'',labelWidth:29,selectOnFocus:!1},menuDefaults:{bodyPadding:3,showSeparator:!1},createMenu:function(){var me=this,listeners={scope:me,keyup:me.onValueChange,spin:{fn:me.onInputSpin,buffer:200},el:{click:me.stopFn}},itemDefaults=me.getItemDefaults(),menuItems=me.menuItems,fields=me.getFields(),field,i,len,key,item,cfg;me.callParent();me.fields={};for(i=0,len=menuItems.length;i<len;i++){key=menuItems[i];if(key!=='-'){field=fields[key];cfg={labelClsExtra:Ext.baseCSSPrefix+'grid-filters-icon '+field.iconCls};if(itemDefaults){Ext.merge(cfg,itemDefaults)}
Ext.merge(cfg,field);cfg.emptyText=cfg.emptyText||me.emptyText;delete cfg.iconCls;me.fields[key]=item=me.menu.add(cfg);item.filter=me.filter[key];item.filterKey=key;item.on(listeners)}else{me.menu.add(key)}}},getValue:function(field){var value={};value[field.filterKey]=field.getValue();return value},onInputSpin:function(field,direction){var value={};value[field.filterKey]=field.getValue();this.setValue(value)},stopFn:function(e){e.stopPropagation()}})
;
Ext.define('Ext.grid.filters.filter.String',{extend:'Ext.grid.filters.filter.SingleFilter',alias:'grid.filter.string',type:'string',operator:'like',emptyText:'Enter Filter Text...',itemDefaults:{xtype:'textfield',enableKeyEvents:!0,hideEmptyLabel:!1,iconCls:Ext.baseCSSPrefix+'grid-filters-find',labelSeparator:'',labelWidth:29,margin:0,selectOnFocus:!0},menuDefaults:{bodyPadding:3,showSeparator:!1},createMenu:function(){var me=this,config;me.callParent();config=Ext.apply({},me.getItemDefaults());if(config.iconCls&&!('labelClsExtra' in config)){config.labelClsExtra=Ext.baseCSSPrefix+'grid-filters-icon '+config.iconCls}
delete config.iconCls;config.emptyText=config.emptyText||me.emptyText;me.inputItem=me.menu.add(config);me.inputItem.on({scope:me,keyup:me.onValueChange,el:{click:function(e){e.stopPropagation()}}})},setValue:function(value){var me=this;if(me.inputItem){me.inputItem.setValue(value)}
me.filter.setValue(value);if(value&&me.active){me.value=value;me.updateStoreFilter()}else{me.setActive(!!value)}},activateMenu:function(){this.inputItem.setValue(this.filter.getValue())},createFilter:function(config,key){var me=this;if(me.filterFn){return new Ext.util.Filter({filterFn:function(rec){return Ext.callback(me.filterFn,me.scope,[rec,me.inputItem.getValue()])}})}else{return me.callParent([config,key])}}})
;
Ext.define('Ext.grid.filters.Filters',{extend:'Ext.plugin.Abstract',alias:'plugin.gridfilters',mixins:['Ext.util.StoreHolder'],requires:['Ext.grid.filters.filter.*'],id:'gridfilters',defaultFilterTypes:{'boolean':'boolean','int':'number',date:'date',number:'number'},filterCls:Ext.baseCSSPrefix+'grid-filters-filtered-column',menuFilterText:'Filters',showMenu:!0,stateId:undefined,init:function(grid){var me=this,store,headerCt;Ext.Assert.falsey(me.grid);me.grid=grid;grid.filters=me;if(me.grid.normalGrid){me.isLocked=!0}
grid.clearFilters=me.clearFilters.bind(me);store=grid.store;headerCt=grid.headerCt;me.headerCtListeners=headerCt.on({destroyable:!0,scope:me,add:me.onAdd,menucreate:me.onMenuCreate});if(headerCt.menu&&!headerCt.menu.destroyed){this.onMenuCreate(headerCt,headerCt.menu)}
me.gridListeners=grid.on({destroyable:!0,scope:me,reconfigure:me.onReconfigure});if(store.isEmptyStore){return}
me.bindStore(store);me.initColumns()},initColumns:function(){var grid=this.grid,store=grid.getStore(),columns=grid.columnManager.getColumns(),len=columns.length,i,column,filter,filterCollection;for(i=0;i<len;i++){column=columns[i];filter=column.filter;if(filter&&!filter.isGridFilter){if(!filterCollection){filterCollection=store.getFilters();filterCollection.beginUpdate()}
this.createColumnFilter(column)}}
if(filterCollection){filterCollection.endUpdate()}},createColumnFilter:function(column){var me=this,columnFilter=column.filter,filter={column:column,grid:me.grid,owner:me},field,model,type;if(Ext.isString(columnFilter)){filter.type=columnFilter}else{Ext.apply(filter,columnFilter)}
if(!filter.type){model=me.store.getModel();field=model&&model.getField(column.dataIndex);type=field&&field.type;filter.type=(type&&me.defaultFilterTypes[type])||column.defaultFilterType||'string'}
column.filter=Ext.Factory.gridFilter(filter);if(!column.menuDisabled){column.requiresMenu=!0}},onAdd:function(headerCt,column,index){var filter=column.filter;if(filter&&!filter.isGridFilter){this.createColumnFilter(column)}},onMenuCreate:function(headerCt,menu){var me=this;if(me.headerMenuListeners){Ext.destroy(me.headerMenuListeners);me.headerMenuListeners=null}
me.headerMenuListeners=menu.on({beforeshow:me.onMenuBeforeShow,destroyable:!0,scope:me})},onMenuBeforeShow:function(menu){var me=this,menuItem,filter,parentTable,parentTableId;if(me.showMenu){if(!me.filterMenuItem){me.filterMenuItem={}}
parentTable=menu.up('tablepanel');parentTableId=parentTable.id;menuItem=me.filterMenuItem[parentTableId];if(!menuItem||menuItem.destroyed){menuItem=me.createMenuItem(menu,parentTableId)}
me.activeFilterMenuItem=menuItem;filter=me.getMenuFilter(parentTable.headerCt);if(filter){filter.showMenu(menuItem)}
menuItem.setVisible(!!filter);if(me.sep){me.sep.setVisible(!!filter)}}},createMenuItem:function(menu,parentTableId){var me=this,item;if(menu.items.length){me.sep=menu.add('-')}
item=menu.add({checked:!1,itemId:'filters',text:me.menuFilterText,listeners:{scope:me,checkchange:me.onCheckChange}});return(me.filterMenuItem[parentTableId]=item)},destroy:function(){var me=this,filterMenuItem=me.filterMenuItem,item;Ext.destroy(me.headerCtListeners,me.gridListeners,me.headerMenuListeners);me.bindStore(null);me.sep=Ext.destroy(me.sep);for(item in filterMenuItem){filterMenuItem[item].destroy()}
this.callParent()},onUnbindStore:function(store){if(store&&!store.destroyed){store.getFilters().un('remove',this.onFilterRemove,this)}},onBindStore:function(store,initial,propName){var me=this;me.local=!store.getRemoteFilter();store.getFilters().on('remove',me.onFilterRemove,me);if(me.grid.stateful&&store.initialConfig.statefulFilters!==!1){store.statefulFilters=!0}},onFilterRemove:function(filterCollection,list){var len=list.items.length,columnManager=this.grid.columnManager,i,item,header,filter;for(i=0;i<len;i++){item=list.items[i];header=columnManager.getHeaderByDataIndex(item.getProperty());if(header){filter=header.filter;if(!filter||!filter.menu||item.getId().indexOf(filter.getBaseIdPrefix())===-1){continue}
if(!filter.preventFilterRemoval){filter.onFilterRemove(item.getOperator())}}}},getMenuFilter:function(headerCt){return headerCt.getMenu().activeHeader.filter},onCheckChange:function(item,value){var parentTable=this.isLocked?item.up('tablepanel'):this.grid,filter=this.getMenuFilter(parentTable.headerCt);filter.setActive(value)},getHeaders:function(){return this.grid.view.headerCt.columnManager.getColumns()},isStateful:function(){return this.grid.stateful},addFilter:function(filters){var me=this,grid=me.grid,store=me.store,hasNewColumns=!1,suppressNextFilter=!0,dataIndex,column,i,len,filter,columnFilter;if(!Ext.isArray(filters)){filters=[filters]}
for(i=0,len=filters.length;i<len;i++){filter=filters[i];dataIndex=filter.dataIndex;column=grid.columnManager.getHeaderByDataIndex(dataIndex);if(column){hasNewColumns=!0;if(filter.value){suppressNextFilter=!1}
columnFilter=column.filter;if(columnFilter&&columnFilter.isGridFilter){columnFilter.deactivate();columnFilter.destroy();if(me.activeFilterMenuItem){me.activeFilterMenuItem.menu=null}}
column.filter=filter}}
if(hasNewColumns){store.suppressNextFilter=suppressNextFilter;me.initColumns();store.suppressNextFilter=!1}},addFilters:function(filters){if(filters){this.addFilter(filters)}},clearFilters:function(){var grid=this.grid,columns=grid.columnManager.getColumns(),store=grid.store,column,filter,i,len,filterCollection;for(i=0,len=columns.length;i<len;i++){column=columns[i];filter=column.filter;if(filter&&filter.isGridFilter){if(!filterCollection){filterCollection=store.getFilters();filterCollection.beginUpdate()}
filter.setActive(!1)}}
if(filterCollection){filterCollection.endUpdate()}},onReconfigure:function(grid,store,columns,oldStore){var me=this,filterMenuItem=me.filterMenuItem,changed=oldStore!==store,key;if(columns){for(key in filterMenuItem){filterMenuItem[key].setMenu(null)}}
if(store){if(oldStore&&!oldStore.destroyed&&changed){me.resetFilters(oldStore)}
if(changed){me.bindStore(store);me.applyFilters(store)}}
me.initColumns()},privates:{applyFilters:function(store){var columns=this.grid.columnManager.getColumns(),len=columns.length,i,column,filter,filterCollection;for(i=0;i<len;i++){column=columns[i];filter=column.filter;if(filter&&filter.isGridFilter){if(!filterCollection){filterCollection=store.getFilters();filterCollection.beginUpdate()}
if(filter.active){filter.activate()}}}
if(filterCollection){filterCollection.endUpdate()}},resetFilters:function(store){var filters=store.getFilters(),i,updating,filter;if(filters){for(i=filters.getCount()-1;i>=0;--i){filter=filters.getAt(i);if(filter.isGridFilter){if(!updating){filters.beginUpdate()}
filters.remove(filter);updating=!0}}
if(updating){filters.endUpdate()}}}}})
;
Ext.define('Ext.grid.locking.HeaderContainer',{extend:'Ext.grid.header.Container',requires:['Ext.grid.ColumnManager'],headerCtRelayEvents:["blur","focus","move","resize","destroy","beforedestroy","boxready","afterrender","render","beforerender","removed","hide","beforehide","show","beforeshow","enable","disable","added","deactivate","beforedeactivate","activate","beforeactivate","remove","add","beforeremove","beforeadd","afterlayout","menucreate","sortchange","columnschanged","columnshow","columnhide","columnmove","headertriggerclick","headercontextmenu","headerclick","columnresize","statesave","beforestatesave","staterestore","beforestaterestore"],constructor:function(lockable){var me=this,lockedGrid=lockable.lockedGrid,normalGrid=lockable.normalGrid;me.lockable=lockable;me.callParent();lockedGrid.visibleColumnManager.rootColumns=normalGrid.visibleColumnManager.rootColumns=lockable.visibleColumnManager=me.visibleColumnManager=new Ext.grid.ColumnManager(!0,lockedGrid.headerCt,normalGrid.headerCt);lockedGrid.columnManager.rootColumns=normalGrid.columnManager.rootColumns=lockable.columnManager=me.columnManager=new Ext.grid.ColumnManager(!1,lockedGrid.headerCt,normalGrid.headerCt);me.lockedEventRelayers=me.relayEvents(lockedGrid.headerCt,me.headerCtRelayEvents);me.normalEventRelayers=me.relayEvents(normalGrid.headerCt,me.headerCtRelayEvents)},getRefItems:function(){return this.lockable.lockedGrid.headerCt.getRefItems().concat(this.lockable.normalGrid.headerCt.getRefItems())},getGridColumns:function(){return this.lockable.lockedGrid.headerCt.getGridColumns().concat(this.lockable.normalGrid.headerCt.getGridColumns())},getColumnsState:function(){var me=this,locked=me.lockable.lockedGrid.headerCt.getColumnsState(),normal=me.lockable.normalGrid.headerCt.getColumnsState();return locked.concat(normal)},applyColumnsState:function(columnsState,storeState){var me=this,lockedGrid=me.lockable.lockedGrid,normalGrid=me.lockable.normalGrid,lockedHeaderCt=lockedGrid.headerCt,normalHeaderCt=me.lockable.normalGrid.headerCt,columns=lockedHeaderCt.items.items.concat(normalHeaderCt.items.items),length=columns.length,i,colState,column,lockedCount,switchSides;for(i=0;i<length;i++){column=columns[i];colState=columnsState[column.getStateId()];if(colState){switchSides=colState.locked!=null&&!!column.locked!==colState.locked;if(column.applyColumnState){column.applyColumnState(colState,storeState)}
if(switchSides){(column.locked?lockedHeaderCt:normalHeaderCt).add(column)}}}
lockedCount=lockedHeaderCt.items.items.length;for(i=0;i<length;i++){column=columns[i];colState=columnsState[column.getStateId()];if(colState&&!column.locked){colState.index=Math.max(0,colState.index-lockedCount)}}
lockedHeaderCt.applyColumnsState(columnsState,storeState);normalHeaderCt.applyColumnsState(columnsState,storeState);if(!lockedGrid.getVisibleColumnManager().getColumns().length){lockedGrid.hide()}
if(!normalGrid.getVisibleColumnManager().getColumns().length){normalGrid.hide()}},disable:function(){var topGrid=this.lockable;topGrid.lockedGrid.headerCt.disable();topGrid.normalGrid.headerCt.disable()},enable:function(){var topGrid=this.lockable;topGrid.lockedGrid.headerCt.enable();topGrid.normalGrid.headerCt.enable()}})
;
Ext.define('Ext.grid.locking.View',{alternateClassName:'Ext.grid.LockingView',requires:['Ext.view.AbstractView','Ext.view.Table'],mixins:['Ext.util.Observable','Ext.util.StoreHolder','Ext.mixin.Focusable'],isLockingView:!0,loadMask:!0,eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell|refresh)/,constructor:function(config){var ext=Ext,me=this,lockedView,normalView;me.ownerGrid=config.ownerGrid;me.ownerGrid.view=me;me.navigationModel=config.locked.xtype==='treepanel'?new ext.tree.NavigationModel(me):new ext.grid.NavigationModel(me);config.locked.viewConfig.bindStore=ext.emptyFn;config.normal.viewConfig.bindStore=me.subViewBindStore;config.normal.viewConfig.isNormalView=config.locked.viewConfig.isLockedView=!0;config.locked.viewConfig.navigationModel=config.normal.viewConfig.navigationModel=me.navigationModel;me.lockedGrid=me.ownerGrid.lockedGrid=ext.ComponentManager.create(config.locked);me.lockedView=lockedView=me.lockedGrid.getView();me.selModel=config.normal.viewConfig.selModel=lockedView.getSelectionModel();if(me.lockedGrid.isTree){me.lockedView.animate=!1;config.normal.store=lockedView.store;config.normal.viewConfig.stripeRows=me.lockedView.stripeRows;config.normal.rowLines=me.lockedGrid.rowLines}
me.normalGrid=me.ownerGrid.normalGrid=ext.ComponentManager.create(config.normal);lockedView.lockingPartner=normalView=me.normalView=me.normalGrid.getView();normalView.lockingPartner=lockedView;Ext.override(me.normalGrid,{beforeRender:me.beforeNormalGridRender});me.loadMask=(config.loadMask!==undefined)?config.loadMask:me.loadMask;me.mixins.observable.constructor.call(me);me.lockedViewEventRelayers=me.relayEvents(lockedView,ext.view.Table.events);me.normalViewEventRelayers=me.relayEvents(normalView,ext.view.Table.events.concat(ext.view.Table.normalSideEvents));normalView.on({scope:me,itemmouseleave:me.onItemMouseLeave,itemmouseenter:me.onItemMouseEnter});lockedView.on({scope:me,itemmouseleave:me.onItemMouseLeave,itemmouseenter:me.onItemMouseEnter});me.loadingText=normalView.loadingText;me.loadingCls=normalView.loadingCls;me.loadingUseMsg=normalView.loadingUseMsg;me.itemSelector=me.getItemSelector();me.all=normalView.all;me.bindStore(normalView.dataSource,!0,'dataSource')},subViewBindStore:function(store,initial){var me=this,grid=me.ownerGrid,selModel;if(me.destroying||me.destroyed||grid.destroying||grid.destroyed){return}
selModel=me.getSelectionModel();selModel.bindStore(store,initial);selModel.bindComponent(me)},beforeNormalGridRender:function(){if(this.ownerGrid.lockedGrid.getHeader()&&!this.title){this.title='\u00a0'}
this.callParent()},onPanelRender:function(el){var me=this,mask=me.loadMask,cfg={target:me.ownerGrid,msg:me.loadingText,msgCls:me.loadingCls,useMsg:me.loadingUseMsg,store:me.ownerGrid.store};me.el=el;me.rendered=!0;me.fireEvent('render',me);if(mask){if(Ext.isObject(mask)){cfg=Ext.apply(cfg,mask)}
me.loadMask=new Ext.LoadMask(cfg)}},getRefOwner:function(){return this.ownerGrid},getVisibleColumnManager:function(){return this.ownerGrid.getVisibleColumnManager()},getTopLevelVisibleColumnManager:function(){return this.ownerGrid.getVisibleColumnManager()},getGridColumns:function(){return this.getVisibleColumnManager().getColumns()},getEl:function(column){return column.getView().getEl()},getCellSelector:function(){return this.normalView.getCellSelector()},getItemSelector:function(){return this.normalView.getItemSelector()},onItemMouseEnter:function(view,record){var me=this,locked=me.lockedView,other=me.normalView,item;if(view.trackOver){if(view!==locked){other=locked}
item=other.getNode(record);other.highlightItem(item)}},onItemMouseLeave:function(view,record){var me=this,locked=me.lockedView,other=me.normalView;if(view.trackOver){if(view!==locked){other=locked}
other.clearHighlight()}},relayFn:function(name,args){var me=this,view=me.lockedView;args=args||[];me.relayingOperation=!0;view[name].apply(view,args);view=me.normalView;view[name].apply(view,args);me.relayingOperation=!1},getSelectionModel:function(){return this.normalView.getSelectionModel()},getNavigationModel:function(){return this.navigationModel},getStore:function(){return this.ownerGrid.store},onBindStore:function(store){var me=this,lockedView=me.lockedView,normalView=me.normalView;if(normalView.componentLayoutCounter&&!(lockedView.blockRefresh&&normalView.blockRefresh)){Ext.suspendLayouts();lockedView.doFirstRefresh(store);normalView.doFirstRefresh(store);Ext.resumeLayouts(!0)}},getStoreListeners:function(){var me=this;return{priority:1000,refresh:me.onDataRefresh,replace:me.onReplace,add:me.onAdd,remove:me.onRemove,update:me.onUpdate,clear:me.onDataRefresh,beginupdate:me.onBeginUpdate,endupdate:me.onEndUpdate}},onOwnerGridHide:function(){Ext.suspendLayouts();this.relayFn('onOwnerGridHide',arguments);Ext.resumeLayouts(!0)},onOwnerGridShow:function(){Ext.suspendLayouts();this.relayFn('onOwnerGridShow',arguments);Ext.resumeLayouts(!0)},onBeginUpdate:function(){Ext.suspendLayouts();this.relayFn('onBeginUpdate',arguments);Ext.resumeLayouts(!0)},onEndUpdate:function(){Ext.suspendLayouts();this.relayFn('onEndUpdate',arguments);Ext.resumeLayouts(!0)},onDataRefresh:function(){Ext.suspendLayouts();this.relayFn('onDataRefresh',arguments);Ext.resumeLayouts(!0)},onReplace:function(){Ext.suspendLayouts();this.relayFn('onReplace',arguments);Ext.resumeLayouts(!0)},onAdd:function(){Ext.suspendLayouts();this.relayFn('onAdd',arguments);Ext.resumeLayouts(!0)},onRemove:function(){Ext.suspendLayouts();this.relayFn('onRemove',arguments);Ext.resumeLayouts(!0)},setActionableMode:function(enabled,position){var result,targetView;if(enabled){if(!position){position=this.getNavigationModel().getPosition()}
if(position){position=position.clone();position.view=targetView=position.column.getView();result=targetView.setActionableMode(enabled,position);if(result!==!1&&targetView.lockingPartner.grid.isVisible()){targetView.lockingPartner.setActionableMode(enabled,position);if(!targetView.lockingPartner.actionableMode){targetView.setActionableMode(!1);result=!1}}
return result}else{return!1}}else{this.relayFn('setActionableMode',[!1,position])}},onUpdate:function(){Ext.suspendLayouts();this.relayFn('onUpdate',arguments);Ext.resumeLayouts(!0)},refresh:function(){var lockedView=this.lockedView,normalView=this.normalView;Ext.suspendLayouts();lockedView.clearViewEl(!0);normalView.clearViewEl(!0);normalView.refresh();lockedView.refresh();Ext.resumeLayouts(!0)},refreshView:function(){var lockedView=this.lockedView,normalView=this.normalView,startIndex=normalView.all.startIndex;Ext.suspendLayouts();lockedView.clearViewEl(!0);normalView.clearViewEl(!0);normalView.refreshView(startIndex);lockedView.refreshView(startIndex);Ext.resumeLayouts(!0)},setScrollable:function(scrollable){Ext.suspendLayouts();this.lockedView.setScrollable(scrollable);if(scrollable.isScroller){scrollable=new Ext.scroll.Scroller(scrollable.initialConfig)}
this.normalView.setScrollable(scrollable);Ext.resumeLayouts(!0)},getNode:function(nodeInfo){return this.normalView.getNode(nodeInfo)},getRow:function(nodeInfo){return this.normalView.getRow(nodeInfo)},getCell:function(record,column,returnElement){var row=column.getView().getRow(record),cell=row.querySelector(column.getCellSelector());return returnElement?Ext.get(cell):cell},indexOf:function(record){var result=this.lockedView.indexOf(record);if(!result){result=this.normalView.indexOf(record)}
return result},focus:function(){var target=this.ownerGrid.down('>tablepanel:not(hidden)>tableview');if(target){target.focus()}},focusRow:function(row){var view,lastFocused=this.getNavigationModel().lastFocused;view=lastFocused?lastFocused.view:this.normalView;view.focusRow(row)},focusCell:function(position){position.view.focusCell(position)},onRowFocus:function(){this.relayFn('onRowFocus',arguments)},cancelFocusTask:function(){this.lockedView.cancelFocusTask();this.normalView.cancelFocusTask()},isVisible:function(deep){return this.ownerGrid.isVisible(deep)},getCellInclusive:function(pos,returnDom){var col=pos.column,lockedSize=this.lockedGrid.getColumnManager().getColumns().length;if(col>=lockedSize){pos=Ext.apply({},pos);pos.column-=lockedSize;return this.normalView.getCellInclusive(pos,returnDom)}else{return this.lockedView.getCellInclusive(pos,returnDom)}},getHeaderByCell:function(cell){if(cell){return this.getVisibleColumnManager().getHeaderById(cell.getAttribute('data-columnId'))}
return!1},onRowSelect:function(){this.relayFn('onRowSelect',arguments)},onRowDeselect:function(){this.relayFn('onRowDeselect',arguments)},onCellSelect:function(cellContext){cellContext.column.getView().onCellSelect({record:cellContext.record,column:cellContext.column})},onCellDeselect:function(cellContext){cellContext.column.getView().onCellDeselect({record:cellContext.record,column:cellContext.column})},getCellByPosition:function(pos,returnDom){var me=this,view=pos.view,col=pos.column;if(view===me){pos=new Ext.grid.CellContext(col.getView()).setPosition(pos.record,pos.column)}
return view.getCellByPosition(pos,returnDom)},getRecord:function(node){var result=this.lockedView.getRecord(node);if(!result){result=this.normalView.getRecord(node)}
return result},scrollBy:function(){var scroller=this.ownerGrid.getScrollable();scroller.scrollBy.apply(scroller,arguments)},ensureVisible:function(){var normal=this.normalView;normal.ensureVisible.apply(normal,arguments)},disable:function(){this.relayFn('disable',arguments)},enable:function(){this.relayFn('enable',arguments)},addElListener:function(){this.relayFn('addElListener',arguments)},refreshNode:function(){this.relayFn('refreshNode',arguments)},addRowCls:function(){this.relayFn('addRowCls',arguments)},removeRowCls:function(){this.relayFn('removeRowCls',arguments)},destroy:function(){var me=this;me.rendered=!1;me.bindStore(null,!1,'dataSource');Ext.destroy(me.selModel,me.navigationModel,me.loadMask);me.lockedView.lockingPartner=me.normalView.lockingPartner=null;me.callParent()}},function(){this.borrow(Ext.Component,['up']);this.borrow(Ext.view.AbstractView,['doFirstRefresh','applyFirstRefresh']);this.borrow(Ext.view.Table,['cellSelector','selectedCellCls','selectedItemCls'])})
;
Ext.define('Ext.scroll.LockingScroller',{extend:'Ext.scroll.Scroller',alias:'scroller.locking',config:{lockedScroller:null,normalScroller:null},scrollTo:function(x,y,animate){var lockedX,lockedPromise,ret;if(Ext.isObject(x)){lockedX=x.lockedX;if(lockedX){lockedPromise=this.getLockedScroller().scrollTo(lockedX,null,animate)}}
ret=this.callParent([x,y,animate]);if(lockedPromise){ret=Ext.Promise.all([ret,lockedPromise])}
return ret},updateLockedScroller:function(lockedScroller){lockedScroller.on('scroll','onLockedScroll',this);lockedScroller.setLockingScroller(this)},updateNormalScroller:function(normalScroller){normalScroller.on('scroll','onNormalScroll',this);normalScroller.setLockingScroller(this)},updateTouchAction:function(touchAction,oldTouchAction){this.callParent([touchAction,oldTouchAction]);this.getLockedScroller().setTouchAction(touchAction);this.getNormalScroller().setTouchAction(touchAction)},getPosition:function(){var position=this.callParent();position.x=this.getNormalScroller().getPosition().x;position.lockedX=this.getLockedScroller().getPosition().x;return position},privates:{updateSpacerXY:function(pos){var me=this,lockedScroller=me.getLockedScroller(),normalScroller=me.getNormalScroller(),lockedView=lockedScroller.component,normalView=normalScroller.component,height;height=pos.y+((normalView.headerCt.tooNarrow||lockedView.headerCt.tooNarrow)?Ext.scrollbar.height():0);normalView.stretchHeight(height);lockedView.stretchHeight(height);me.callParent([pos])},doScrollTo:function(x,y,animate){var ret,normalPromise;if(x!=null){normalPromise=this.getNormalScroller().scrollTo(x,null,animate);x=null}
ret=this.callParent([x,y,animate]);if(normalPromise){ret=Ext.Promise.all([ret,normalPromise])}
return ret},onLockedScroll:function(lockedScroller,x,y){this.position.lockedX=x},onNormalScroll:function(normalScroller,x,y){this.position.x=x},readPosition:function(position){var me=this;position=me.callParent([position]);position=position||{};position.x=me.getNormalScroller().getPosition().x;return position}}})
;
Ext.define('Ext.grid.locking.Lockable',{alternateClassName:'Ext.grid.Lockable',requires:['Ext.grid.locking.View','Ext.grid.header.Container','Ext.grid.locking.HeaderContainer','Ext.view.Table','Ext.scroll.LockingScroller'],syncRowHeight:!0,headerCounter:0,lockedGridCls:Ext.baseCSSPrefix+'grid-inner-locked',normalGridCls:Ext.baseCSSPrefix+'grid-inner-normal',lockingBodyCls:Ext.baseCSSPrefix+'grid-locking-body',scrollContainerCls:Ext.baseCSSPrefix+'grid-scroll-container',scrollBodyCls:Ext.baseCSSPrefix+'grid-scroll-body',scrollbarClipperCls:Ext.baseCSSPrefix+'grid-scrollbar-clipper',scrollbarCls:Ext.baseCSSPrefix+'grid-scrollbar',scrollbarVisibleCls:Ext.baseCSSPrefix+'grid-scrollbar-visible',lockText:'Lock',unlockText:'Unlock',bothCfgCopy:['hideHeaders','enableColumnHide','enableColumnMove','enableColumnResize','sortableColumns','multiColumnSort','columnLines','rowLines','variableRowHeight','numFromEdge','trailingBufferZone','leadingBufferZone','scrollToLoadBuffer','syncRowHeight'],normalCfgCopy:['scroll'],lockedCfgCopy:[],determineXTypeToCreate:function(lockedSide){var me=this;if(me.subGridXType){return me.subGridXType}else if(!lockedSide){return'gridpanel'}
return me.isXType('treepanel')?'treepanel':'gridpanel'},injectLockable:function(){this.focusable=!1;this.lockable=!0;this.hasView=!0;var me=this,store=me.store=Ext.StoreManager.lookup(me.store),lockedViewConfig=me.lockedViewConfig,normalViewConfig=me.normalViewConfig,viewConfig=me.viewConfig,loadMaskCfg=viewConfig&&viewConfig.loadMask,loadMask=(loadMaskCfg!==undefined)?loadMaskCfg:me.loadMask,bufferedRenderer=me.bufferedRenderer,Obj=Ext.Object,allFeatures,allPlugins,lockedGrid,normalGrid,columns,lockedHeaderCt,normalHeaderCt,setWidth,i;allFeatures=me.constructLockableFeatures();me.scrollable=new Ext.scroll.LockingScroller({component:me,x:!1,y:!0});me.features=null;allPlugins=me.constructLockablePlugins();me.plugins=allPlugins.topPlugins;lockedGrid={id:me.id+'-locked',$initParent:me,isLocked:!0,bufferedRenderer:bufferedRenderer,ownerGrid:me,ownerLockable:me,xtype:me.determineXTypeToCreate(!0),store:store,scrollerOwner:!1,animate:!1,border:!1,cls:me.lockedGridCls,isLayoutRoot:function(){return this.floatedFromCollapse||this.ownerGrid.normalGrid.floatedFromCollapse},features:allFeatures.lockedFeatures,plugins:allPlugins.lockedPlugins};normalGrid={id:me.id+'-normal',$initParent:me,isLocked:!1,bufferedRenderer:bufferedRenderer,ownerGrid:me,ownerLockable:me,xtype:me.determineXTypeToCreate(),store:store,reserveScrollbar:me.reserveScrollbar,scrollerOwner:!1,border:!1,cls:me.normalGridCls,isLayoutRoot:function(){return this.floatedFromCollapse||this.ownerGrid.lockedGrid.floatedFromCollapse},features:allFeatures.normalFeatures,plugins:allPlugins.normalPlugins};me.addCls(Ext.baseCSSPrefix+'grid-locked');Ext.copy(normalGrid,me,me.bothCfgCopy,!0);Ext.copy(lockedGrid,me,me.bothCfgCopy,!0);Ext.copy(normalGrid,me,me.normalCfgCopy,!0);Ext.copy(lockedGrid,me,me.lockedCfgCopy,!0);Ext.apply(normalGrid,me.normalGridConfig);Ext.apply(lockedGrid,me.lockedGridConfig);for(i=0;i<me.normalCfgCopy.length;i++){delete me[me.normalCfgCopy[i]]}
for(i=0;i<me.lockedCfgCopy.length;i++){delete me[me.lockedCfgCopy[i]]}
me.addStateEvents(['lockcolumn','unlockcolumn']);columns=me.processColumns(me.columns||[],lockedGrid);lockedGrid.columns=columns.locked;if(!lockedGrid.columns.items.length){lockedGrid.hidden=!0}
normalGrid.columns=columns.normal;if(!normalGrid.columns.items.length){normalGrid.hidden=!0}
normalGrid.flex=1;lockedGrid.viewConfig=lockedViewConfig=(lockedViewConfig?Obj.chain(lockedViewConfig):{});normalGrid.viewConfig=normalViewConfig=(normalViewConfig?Obj.chain(normalViewConfig):{});lockedViewConfig.loadingUseMsg=!1;lockedViewConfig.loadMask=!1;normalViewConfig.loadMask=!1;if(viewConfig&&viewConfig.id){Ext.log.warn('id specified on Lockable viewConfig, it will be shared '+'between both views: "'+viewConfig.id+'"')}
Ext.applyIf(lockedViewConfig,viewConfig);Ext.applyIf(normalViewConfig,viewConfig);if(me.layout===Ext.panel.Table.prototype.layout){me.layout={type:'hbox',align:'stretch'}}
me.getLayout();if(me.layout.type==='border'){if(me.split){lockedGrid.split=me.split}
if(!lockedGrid.region){lockedGrid.region='west'}
if(!normalGrid.region){normalGrid.region='center'}
me.addCls(Ext.baseCSSPrefix+'grid-locked-split')}
if(!(me.layout instanceof Ext.layout.container.Box)){me.split=!1}
me.view=new Ext.grid.locking.View({loadMask:loadMask,locked:lockedGrid,normal:normalGrid,ownerGrid:me});me.view.relayEvents(me.scrollable,['scroll']);lockedGrid=me.lockedGrid;normalGrid=me.normalGrid;lockedGrid.on({beginfloat:me.onBeginLockedFloat,endfloat:me.onEndLockedFloat,scope:me});setWidth=lockedGrid.setWidth;lockedGrid.setWidth=function(){lockedGrid.shrinkWrapColumns=!1;setWidth.apply(lockedGrid,arguments)};if(!lockedGrid.getVisibleColumnManager().getColumns().length){lockedGrid.hide()}
if(!normalGrid.getVisibleColumnManager().getColumns().length){normalGrid.hide()}
lockedHeaderCt=lockedGrid.headerCt;normalHeaderCt=normalGrid.headerCt;me.headerCt=me.view.headerCt=new Ext.grid.locking.HeaderContainer(me);lockedHeaderCt.lockedCt=!0;lockedHeaderCt.lockableInjected=!0;normalHeaderCt.lockableInjected=!0;lockedHeaderCt.on({add:me.delaySyncLockedWidth,remove:me.delaySyncLockedWidth,columnshow:me.delaySyncLockedWidth,columnhide:me.delaySyncLockedWidth,sortchange:me.onLockedHeaderSortChange,columnresize:me.delaySyncLockedWidth,scope:me});normalHeaderCt.on({add:me.delaySyncLockedWidth,remove:me.delaySyncLockedWidth,columnshow:me.delaySyncLockedWidth,columnhide:me.delaySyncLockedWidth,sortchange:me.onNormalHeaderSortChange,scope:me});me.modifyHeaderCt();me.items=[lockedGrid];if(me.split){me.addCls(Ext.baseCSSPrefix+'grid-locked-split');me.items[1]=Ext.apply({xtype:'splitter'},me.split)}
me.items.push(normalGrid);me.relayHeaderCtEvents(lockedHeaderCt);me.relayHeaderCtEvents(normalHeaderCt);me.storeRelayers=me.relayEvents(store,['filterchange','groupchange','beforeload','load']);me.gridRelayers=me.relayEvents(normalGrid,['viewready'])},afterInjectLockable:function(){var me=this;me.maskElement='scrollContainer';if(me.disableOnRender){me.on('afterrender',function(){me.unmask()},{single:!0})}
delete me.lockedGrid.$initParent;delete me.normalGrid.$initParent},syncLockableHeaderVisibility:function(){var me=this,hideHeaders=me.hideHeaders,locked=me.lockedGrid,normal=me.normalGrid;if(hideHeaders===null){hideHeaders=locked.shouldAutoHideHeaders()&&normal.shouldAutoHideHeaders()}
locked.hideHeaders=normal.hideHeaders=hideHeaders;locked.syncHeaderVisibility();normal.syncHeaderVisibility()},getLockingViewConfig:function(){return{xclass:'Ext.grid.locking.View',locked:this.lockedGrid,normal:this.normalGrid,panel:this}},onBeginLockedFloat:function(locked){var el=locked.getContentTarget().dom,lockedHeaderCt=this.lockedGrid.headerCt,normalHeaderCt=this.normalGrid.headerCt,headerCtHeight=Math.max(normalHeaderCt.getHeight(),lockedHeaderCt.getHeight());lockedHeaderCt.minHeight=headerCtHeight;normalHeaderCt.minHeight=headerCtHeight;locked.el.addCls(Ext.panel.Panel.floatCls);if(el.firstChild!==locked.view.el.dom){el.appendChild(locked.view.el.dom)}
locked.body.dom.scrollTop=this.getScrollable().getPosition().y},onEndLockedFloat:function(){var locked=this.lockedGrid;if(locked.collapsed){locked.el.removeCls(Ext.panel.Panel.floatCls)}else{this.lockedGrid.headerCt.minHeight=this.normalGrid.headerCt.minHeight=null}
this.lockedScrollbarClipper.appendChild(locked.view.el.dom);this.doSyncLockableLayout()},beforeLayout:function(){var me=this,lockedGrid=me.lockedGrid,normalGrid=me.normalGrid,totalColumnWidth;if(lockedGrid&&normalGrid){if(lockedGrid.getSizeModel().width.shrinkWrap){lockedGrid.gridPanelBorderWidth=lockedGrid.el.getBorderWidth('lr');lockedGrid.shrinkWrapColumns=!0}
if(lockedGrid.shrinkWrapColumns){totalColumnWidth=lockedGrid.headerCt.getTableWidth();if(isNaN(totalColumnWidth)){Ext.raise("Locked columns in an unsized locked side do NOT support "+"a flex width.")}
lockedGrid.setWidth(totalColumnWidth+lockedGrid.gridPanelBorderWidth);lockedGrid.shrinkWrapColumns=!0}
if(!me.scrollContainer){me.initScrollContainer()}
me.lastScrollPos=Ext.clone(me.getScrollable().getPosition());lockedGrid.view.el.setStyle('margin-bottom','');normalGrid.view.el.setStyle('margin-bottom','')}},syncLockableLayout:function(){var me=this;if(!me.afterLayoutListener){me.afterLayoutListener=Ext.on({afterlayout:me.doSyncLockableLayout,scope:me,single:!0})}},doSyncLockableLayout:function(){var me=this,collapseExpand=me.isCollapsingOrExpanding,lockedGrid=me.lockedGrid,normalGrid=me.normalGrid,lockedViewEl,normalViewEl,lockedViewRegion,normalViewRegion,scrollbarSize,scrollbarWidth,scrollbarHeight,normalViewWidth,normalViewX,hasVerticalScrollbar,hasHorizontalScrollbar,scrollContainerHeight,scrollBodyHeight,lockedScrollbar,normalScrollbar,scrollbarVisibleCls,scrollHeight,lockedGridVisible,normalGridVisible,scrollBodyDom,viewRegion,scrollerElHeight,scrollable;me.afterLayoutListener=null;if(collapseExpand){if(collapseExpand===2){me.on('expand','doSyncLockableLayout',me,{single:!0})}
return}
if(lockedGrid&&normalGrid){lockedGridVisible=lockedGrid.isVisible(!0)&&!lockedGrid.collapsed;normalGridVisible=normalGrid.isVisible(!0);lockedViewEl=lockedGrid.view.el;normalViewEl=normalGrid.view.el;scrollBodyDom=me.scrollBody.dom;lockedViewRegion=lockedGridVisible?lockedGrid.body.getRegion(!0):new Ext.util.Region(0,0,0,0);normalViewRegion=normalGridVisible?normalGrid.body.getRegion(!0):new Ext.util.Region(0,0,0,0);scrollbarSize=Ext.scrollbar.size();scrollbarWidth=scrollbarSize.width;scrollbarHeight=scrollerElHeight=scrollbarSize.height;normalViewWidth=normalGridVisible?normalViewRegion.width:0;normalViewX=lockedGridVisible?(normalGridVisible?normalViewRegion.x-lockedViewRegion.x:lockedViewRegion.width):0;hasHorizontalScrollbar=(normalGrid.headerCt.tooNarrow||lockedGrid.headerCt.tooNarrow)?scrollbarHeight:0;scrollContainerHeight=normalViewRegion.height||lockedViewRegion.height;scrollBodyHeight=scrollContainerHeight;lockedScrollbar=me.lockedScrollbar;normalScrollbar=me.normalScrollbar;scrollbarVisibleCls=me.scrollbarVisibleCls;scrollable=me.getScrollable();if(Ext.supports.CannotScrollExactHeight){scrollerElHeight+=1}
if(hasHorizontalScrollbar){lockedViewEl.setStyle('margin-bottom',-scrollbarHeight+'px');normalViewEl.setStyle('margin-bottom',-scrollbarHeight+'px');scrollBodyHeight-=scrollbarHeight;if(lockedGridVisible&&lockedGrid.view.body.dom){me.lockedScrollbarScroller.setSize({x:lockedGrid.headerCt.getTableWidth()})}
if(normalGrid.view.body.dom){me.normalScrollbarScroller.setSize({x:normalGrid.headerCt.getTableWidth()})}}
me.scrollBody.setHeight(scrollBodyHeight);lockedViewEl.dom.style.height=normalViewEl.dom.style.height='';scrollHeight=(me.scrollable.getSize().y+hasHorizontalScrollbar);normalGrid.view.stretchHeight(scrollHeight);lockedGrid.view.stretchHeight(scrollHeight);hasVerticalScrollbar=scrollbarWidth&&scrollBodyDom.scrollHeight>scrollBodyDom.clientHeight;if(hasVerticalScrollbar&&normalViewWidth){normalViewWidth-=scrollbarWidth;normalViewEl.setStyle('width',normalViewWidth+'px')}
lockedScrollbar.toggleCls(scrollbarVisibleCls,lockedGridVisible&&!!hasHorizontalScrollbar);normalScrollbar.toggleCls(scrollbarVisibleCls,!!hasHorizontalScrollbar);me.normalScrollbarClipper.toggleCls(me.scrollbarClipperCls+'-floated',!!me.normalGrid.floatedFromCollapse);me.normalScrollbar.toggleCls(me.scrollbarCls+'-floated',!!me.normalGrid.floatedFromCollapse);me.lockedScrollbarClipper.toggleCls(me.scrollbarClipperCls+'-floated',!!me.lockedGrid.floatedFromCollapse);me.lockedScrollbar.toggleCls(me.scrollbarCls+'-floated',!!me.lockedGrid.floatedFromCollapse);lockedScrollbar.setSize(me.lockedScrollbarClipper.dom.offsetWidth,scrollerElHeight);normalScrollbar.setSize(normalViewWidth,scrollerElHeight);me.setNormalScrollerX(normalViewX);if(lockedGridVisible&&normalGridVisible){viewRegion=lockedViewRegion.union(normalViewRegion)}else if(lockedGridVisible){viewRegion=lockedViewRegion}else{viewRegion=normalViewRegion}
me.scrollContainer.setBox(viewRegion);me.onSyncLockableLayout(hasVerticalScrollbar,viewRegion.width);if(!Ext.Object.equals(scrollable.getPosition(),me.lastScrollPos)){scrollable.scrollTo(me.lastScrollPos)}}},onSyncLockableLayout:Ext.emptyFn,setNormalScrollerX:function(x){this.normalScrollbar.setLocalX(x);this.normalScrollbarClipper.setLocalX(x)},getScrollExtraCls:function(){return''},initScrollContainer:function(){var me=this,extraCls=me.getScrollExtraCls(),scrollContainer=me.scrollContainer=me.body.insertFirst({cls:[me.scrollContainerCls,extraCls]}),scrollBody=me.scrollBody=scrollContainer.appendChild({cls:me.scrollBodyCls}),lockedScrollbar=me.lockedScrollbar=scrollContainer.appendChild({cls:[me.scrollbarCls,me.scrollbarCls+'-locked',extraCls]}),normalScrollbar=me.normalScrollbar=scrollContainer.appendChild({cls:[me.scrollbarCls,extraCls]}),lockedView=me.lockedGrid.view,normalView=me.normalGrid.view,lockedScroller=lockedView.getScrollable(),normalScroller=normalView.getScrollable(),Scroller=Ext.scroll.Scroller,lockedScrollbarScroller,normalScrollbarScroller,lockedScrollbarClipper,normalScrollbarClipper;lockedView.stretchHeight(0);normalView.stretchHeight(0);me.scrollable.setConfig({element:scrollBody,lockedScroller:lockedScroller,normalScroller:normalScroller});lockedScrollbarClipper=me.lockedScrollbarClipper=scrollBody.appendChild({cls:[me.scrollbarClipperCls,me.scrollbarClipperCls+'-locked',extraCls]});normalScrollbarClipper=me.normalScrollbarClipper=scrollBody.appendChild({cls:[me.scrollbarClipperCls,extraCls]});lockedScrollbarClipper.appendChild(lockedView.el);normalScrollbarClipper.appendChild(normalView.el);lockedView.ignoreDomPosition=!0;normalView.ignoreDomPosition=!0;lockedScrollbarScroller=me.lockedScrollbarScroller=new Scroller({element:lockedScrollbar,x:'scroll',y:!1,rtl:lockedScroller.getRtl&&lockedScroller.getRtl()});normalScrollbarScroller=me.normalScrollbarScroller=new Scroller({element:normalScrollbar,x:'scroll',y:!1,rtl:normalScroller.getRtl&&normalScroller.getRtl()});me.initScrollers();lockedScrollbarScroller.addPartner(lockedScroller,'x');normalScrollbarScroller.addPartner(normalScroller,'x');me.view.onPanelRender(scrollBody)},initScrollers:Ext.emptyFn,processColumns:function(columns,lockedGrid){var me=this,i,len,column,cp=new Ext.grid.header.Container({"$initParent":me}),lockedHeaders=[],normalHeaders=[],lockedHeaderCt={itemId:'lockedHeaderCt',stretchMaxPartner:'^^>>#normalHeaderCt',items:lockedHeaders},normalHeaderCt={itemId:'normalHeaderCt',stretchMaxPartner:'^^>>#lockedHeaderCt',items:normalHeaders},result={locked:lockedHeaderCt,normal:normalHeaderCt},copy;if(Ext.isObject(columns)){Ext.applyIf(lockedHeaderCt,columns);Ext.applyIf(normalHeaderCt,columns);copy=Ext.apply({},columns);delete copy.items;Ext.apply(cp,copy);columns=columns.items}
cp.constructing=!0;for(i=0,len=columns.length;i<len;++i){column=columns[i];if(!column.isComponent){column=cp.applyDefaults(column);column.$initParent=cp;column=cp.lookupComponent(column);delete column.$initParent}
column.processed=!0;if(column.locked||column.autoLock){lockedHeaders.push(column)}else{normalHeaders.push(column)}}
me.fireEvent('processcolumns',me,lockedHeaders,normalHeaders);cp.destroy();return result},ensureLockedVisible:function(record,options){var column=options&&options.column,lockedGrid=this.lockedGrid,grid=column?column.getView().ownerCt:lockedGrid.isVisible()?lockedGrid:this.normalGrid;grid.ensureVisible.apply(grid,arguments)},syncRowHeights:function(){if(!this.destroyed){var me=this,normalView=me.normalGrid.getView(),lockedView=me.lockedGrid.getView(),normalSync=normalView.syncRowHeightBegin(),lockedSync=lockedView.syncRowHeightBegin(),scrollTop;normalView.syncRowHeightMeasure(normalSync);lockedView.syncRowHeightMeasure(lockedSync);normalView.syncRowHeightFinish(normalSync,lockedSync);lockedView.syncRowHeightFinish(lockedSync,normalSync);scrollTop=normalView.getScrollY();lockedView.setScrollY(scrollTop);me.syncRowHeightOnNextLayout=!1}},modifyHeaderCt:function(){var me=this;me.lockedGrid.headerCt.getMenuItems=me.getMenuItems(me.lockedGrid.headerCt.getMenuItems,!0);me.normalGrid.headerCt.getMenuItems=me.getMenuItems(me.normalGrid.headerCt.getMenuItems,!1);me.lockedGrid.headerCt.showMenuBy=Ext.Function.createInterceptor(me.lockedGrid.headerCt.showMenuBy,me.showMenuBy);me.normalGrid.headerCt.showMenuBy=Ext.Function.createInterceptor(me.normalGrid.headerCt.showMenuBy,me.showMenuBy)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},showMenuBy:function(clickEvent,t,header){var menu=this.getMenu(),unlockItem=menu.down('#unlockItem'),lockItem=menu.down('#lockItem'),sep=unlockItem.prev();if(header.lockable===!1){sep.hide();unlockItem.hide();lockItem.hide()}else{sep.show();unlockItem.show();lockItem.show();if(!unlockItem.initialConfig.disabled){unlockItem.setDisabled(header.lockable===!1)}
if(!lockItem.initialConfig.disabled){lockItem.setDisabled(!header.isLockable())}}},getMenuItems:function(getMenuItems,locked){var me=this,unlockText=me.unlockText,lockText=me.lockText,unlockCls=Ext.baseCSSPrefix+'hmenu-unlock',lockCls=Ext.baseCSSPrefix+'hmenu-lock',unlockHandler=me.onUnlockMenuClick.bind(me),lockHandler=me.onLockMenuClick.bind(me);return function(){var o=getMenuItems.call(this);o.push('-',{itemId:'unlockItem',iconCls:unlockCls,text:unlockText,handler:unlockHandler,disabled:!locked});o.push({itemId:'lockItem',iconCls:lockCls,text:lockText,handler:lockHandler,disabled:locked});return o}},syncTaskDelay:1,delaySyncLockedWidth:function(){var me=this,task=me.syncLockedWidthTask||(me.syncLockedWidthTask=new Ext.util.DelayedTask(me.syncLockedWidth,me));if(me.reconfiguring){return}
if(!Ext.Component.layoutSuspendCount||me.syncTaskDelay===0){me.syncLockedWidth()}else{task.delay(1)}},syncLockedWidth:function(){var me=this,rendered=me.rendered,locked=me.lockedGrid,normal=me.normalGrid,lockedColCount=locked.getVisibleColumnManager().getColumns().length,normalColCount=normal.getVisibleColumnManager().getColumns().length,task=me.syncLockedWidthTask;if(task){task.cancel()}
if(me.reconfiguring){return}
Ext.suspendLayouts();if(normalColCount){normal.show();if(lockedColCount){if(me.layout.type==='border'){locked.region=locked.initialConfig.region}
if(rendered&&locked.shrinkWrapColumns&&!locked.headerCt.forceFit){delete locked.flex;locked.width=locked.headerCt.getTableWidth()+locked.gridPanelBorderWidth;locked.updateLayout()}
locked.addCls(me.lockedGridCls);locked.show();if(locked.split){me.child('splitter').show();me.addCls(Ext.baseCSSPrefix+'grid-locked-split')}}else{locked.hide();if(rendered){locked.getView().clearViewEl(!0)}
if(locked.split){me.child('splitter').hide();me.removeCls(Ext.baseCSSPrefix+'grid-locked-split')}}}else{normal.hide();delete locked.width;if(me.layout.type==='border'){locked.region='center';normal.region='west'}else{locked.flex=1}
locked.removeCls(me.lockedGridCls);locked.show()}
Ext.resumeLayouts(!0);return{locked:!!lockedColCount,normal:!!normalColCount}},onLockedHeaderSortChange:Ext.emptyFn,onNormalHeaderSortChange:Ext.emptyFn,lock:function(activeHd,toIdx,toCt){var me=this,normalGrid=me.normalGrid,lockedGrid=me.lockedGrid,normalView=normalGrid.view,lockedView=lockedGrid.view,normalScroller=normalView.getScrollable(),lockedScroller=lockedView.getScrollable(),normalHCt=normalGrid.headerCt,refreshFlags,ownerCt,lbr;activeHd=activeHd||normalHCt.getMenu().activeHeader;activeHd.unlockedWidth=activeHd.width;if(activeHd.flex){if(activeHd.lockedWidth){activeHd.width=activeHd.lockedWidth;activeHd.lockedWidth=null}else{activeHd.width=activeHd.lastBox.width}
activeHd.flex=null}
toCt=toCt||lockedGrid.headerCt;ownerCt=activeHd.ownerCt;if(ownerCt&&!activeHd.isLockable()){return}
Ext.suspendLayouts();if(normalScroller){normalScroller.suspendPartnerSync();lockedScroller.suspendPartnerSync()}
if(lockedGrid.hidden){if(!lockedGrid.componentLayoutCounter){lockedGrid.height=normalGrid.lastBox.height;lbr=lockedView.bufferedRenderer;if(lbr){lbr.rowHeight=normalView.bufferedRenderer.rowHeight;lbr.onViewResize(lockedView,0,normalGrid.body.lastBox.height)}}
lockedGrid.show()}
lockedGrid.reconfiguring=normalGrid.reconfiguring=!0;activeHd.ownerCmp=activeHd.ownerCt;activeHd.locked=!0;if(Ext.isDefined(toIdx)){toCt.insert(toIdx,activeHd)}else{toCt.add(activeHd)}
lockedGrid.reconfiguring=normalGrid.reconfiguring=!1;activeHd.ownerCmp=null;activeHd.rootHeaderCt=null;activeHd.view=lockedView;refreshFlags=me.syncLockedWidth();if(refreshFlags.locked){lockedView.clearViewEl(!0)}
if(refreshFlags.normal){normalView.clearViewEl(!0)}
normalGrid.getView().refreshNeeded=refreshFlags.normal;lockedGrid.getView().refreshNeeded=refreshFlags.locked;activeHd.onLock(activeHd);me.fireEvent('lockcolumn',me,activeHd);Ext.resumeLayouts(!0);if(normalScroller){normalScroller.resumePartnerSync(!0);lockedScroller.resumePartnerSync()}},unlock:function(activeHd,toIdx,toCt){var me=this,normalGrid=me.normalGrid,lockedGrid=me.lockedGrid,normalView=normalGrid.view,lockedView=lockedGrid.view,startIndex=normalView.all.startIndex,lockedHCt=lockedGrid.headerCt,refreshFlags;if(!Ext.isDefined(toIdx)){toIdx=0}
activeHd=activeHd||lockedHCt.getMenu().activeHeader;activeHd.lockedWidth=activeHd.width;if(activeHd.flex){if(activeHd.unlockedWidth){activeHd.width=activeHd.unlockedWidth;activeHd.unlockedWidth=null}else{activeHd.width=activeHd.lastBox.width}
activeHd.flex=null}
toCt=toCt||normalGrid.headerCt;Ext.suspendLayouts();lockedGrid.reconfiguring=normalGrid.reconfiguring=!0;activeHd.ownerCmp=activeHd.ownerCt;if(activeHd.ownerCt){activeHd.ownerCt.remove(activeHd,!1)}
activeHd.locked=!1;toCt.insert(toIdx,activeHd);lockedGrid.reconfiguring=normalGrid.reconfiguring=!1;activeHd.ownerCmp=null;activeHd.rootHeaderCt=null;activeHd.view=normalView;refreshFlags=me.syncLockedWidth();if(refreshFlags.locked){lockedView.clearViewEl(!0)}
if(refreshFlags.normal){normalView.clearViewEl(!0)}
if(refreshFlags.normal){normalGrid.getView().refreshView(startIndex)}
if(refreshFlags.locked){lockedGrid.getView().refreshView(startIndex)}
activeHd.onUnlock(activeHd);me.fireEvent('unlockcolumn',me,activeHd);Ext.resumeLayouts(!0)},reconfigureLockable:function(store,columns,allowUnbind){var me=this,oldStore=me.store,lockedGrid=me.lockedGrid,normalGrid=me.normalGrid,view,loadMask;if(!store&&allowUnbind){store=Ext.StoreManager.lookup('ext-empty-store')}
if(store&&store!==oldStore){store=Ext.data.StoreManager.lookup(store);me.store=store;lockedGrid.view.blockRefresh=normalGrid.view.blockRefresh=!0;lockedGrid.bindStore(store);view=lockedGrid.view;view.store=store;if(!view.dataSource.isFeatureStore){view.dataSource=store}
if(view.bufferedRenderer){view.bufferedRenderer.bindStore(store)}
normalGrid.bindStore(store);view=normalGrid.view;view.store=store;if(!view.dataSource.isFeatureStore){view.dataSource=store}
if(view.bufferedRenderer){view.bufferedRenderer.bindStore(store)}
me.view.store=store;loadMask=me.view.loadMask;if(loadMask&&loadMask.isLoadMask){loadMask.bindStore(store)}
me.view.bindStore(normalGrid.view.dataSource,!1,'dataSource');lockedGrid.view.blockRefresh=normalGrid.view.blockRefresh=!1}
if(columns){lockedGrid.reconfiguring=normalGrid.reconfiguring=!0;lockedGrid.headerCt.removeAll();normalGrid.headerCt.removeAll();columns=me.processColumns(columns,lockedGrid);lockedGrid.headerCt.add(columns.locked.items);normalGrid.headerCt.add(columns.normal.items);lockedGrid.reconfiguring=normalGrid.reconfiguring=!1;me.syncLockedWidth()}
me.refreshCounter=normalGrid.view.refreshCounter},afterReconfigureLockable:function(){this.syncLockedWidth();if(this.refreshCounter===this.normalGrid.getView().refreshCounter){this.view.refreshView()}},constructLockableFeatures:function(){var features=this.features,feature,featureClone,lockedFeatures,normalFeatures,i,len;if(features){if(!Ext.isArray(features)){features=[features]}
lockedFeatures=[];normalFeatures=[];for(i=0,len=features.length;i<len;i++){feature=features[i];if(!feature.isFeature){feature=Ext.create('feature.'+feature.ftype,feature)}
switch(feature.lockableScope){case 'locked':lockedFeatures.push(feature);break;case 'normal':normalFeatures.push(feature);break;default:feature.lockableScope='both';lockedFeatures.push(feature);normalFeatures.push(featureClone=feature.clone());featureClone.lockingPartner=feature;feature.lockingPartner=featureClone}}}
return{normalFeatures:normalFeatures,lockedFeatures:lockedFeatures}},constructLockablePlugins:function(){var plugins=this.plugins,plugin,normalPlugin,lockedPlugin,topPlugins,lockedPlugins,normalPlugins,lockableScope,pluginCls,i,len;if(plugins){if(!Ext.isArray(plugins)){plugins=[plugins]}
topPlugins=[];lockedPlugins=[];normalPlugins=[];for(i=0,len=plugins.length;i<len;i++){plugin=plugins[i];if(plugin.init){lockableScope=plugin.lockableScope}else{pluginCls=plugin.ptype?Ext.ClassManager.getByAlias(('plugin.'+plugin.ptype)):Ext.ClassManager.get(plugin.xclass);lockableScope=pluginCls.prototype.lockableScope}
switch(lockableScope){case 'both':lockedPlugins.push(lockedPlugin=plugin.clonePlugin());normalPlugins.push(normalPlugin=plugin.clonePlugin());lockedPlugin.lockingPartner=normalPlugin;normalPlugin.lockingPartner=lockedPlugin;Ext.destroy(plugin);break;case 'locked':lockedPlugins.push(plugin);break;case 'normal':normalPlugins.push(plugin);break;default:topPlugins.push(plugin)}}}
return{topPlugins:topPlugins,normalPlugins:normalPlugins,lockedPlugins:lockedPlugins}},destroyLockable:function(){var me=this,task=me.syncLockedWidthTask;if(task){task.cancel();me.syncLockedWidthTask=null}
if(me.lockedGrid&&me.lockedGrid.headerCt){me.lockedGrid.headerCt.showMenuBy=null}
if(me.normalGrid&&me.normalGrid.headerCt){me.normalGrid.headerCt.showMenuBy=null}
Ext.destroy(me.normalScrollbarClipper,me.lockedScrollbarClipper,me.normalScrollbar,me.lockedScrollbar,me.scrollBody,me.scrollContainer,me.normalScrollbarScroller,me.lockedScrollbarScroller,me.view,me.headerCt)}},function(){this.borrow(Ext.Component,['constructPlugin'])})
;
Ext.define('Ext.rtl.grid.locking.Lockable',{override:'Ext.grid.locking.Lockable',getScrollExtraCls:function(){return this.getInherited().rtl?this._rtlCls:''},initScrollers:function(){var me=this,normalView=me.normalGrid.view;if(normalView.el._rtlScrollbarOnRight&&me.getInherited().rtl){me.verticalScrollbar=me.scrollContainer.appendChild({cls:me.scrollbarCls,style:{top:0,left:0,bottom:0,width:Ext.scrollbar.width()+'px'}});me.verticalScrollbarScroller=new Ext.scroll.Scroller({element:me.verticalScrollbar,x:!1,y:!0});me.verticalScrollbarScroller.addPartner(me.scrollable,'y')}},onSyncLockableLayout:function(hasVerticalScrollbar,viewWidth){var me=this,verticalScrollbar=me.verticalScrollbar,scrollbarWidth,normalGrid,style;if(verticalScrollbar){if(hasVerticalScrollbar){normalGrid=me.normalGrid;scrollbarWidth=Ext.scrollbar.width();style=me.scrollBody.dom.style;style.width=(viewWidth+scrollbarWidth)+'px';style.right=-scrollbarWidth+'px';normalGrid.headerCt.layout.innerCt.setWidth(normalGrid.headerCt.layout.innerCt.getWidth()+scrollbarWidth);me.verticalScrollbarScroller.setSize({y:me.scrollable.getSize().y});me.verticalScrollbar.show()}else{me.verticalScrollbar.hide()}}},setNormalScrollerX:function(x){var me=this;if(me.getInherited().rtl){me.normalScrollbar.rtlSetLocalX(x);me.normalScrollbarClipper.rtlSetLocalX(x)}else{me.callParent([x])}}})
;
Ext.define('Ext.grid.plugin.BufferedRenderer',{extend:'Ext.plugin.Abstract',requires:['Ext.grid.locking.RowSynchronizer'],alias:'plugin.bufferedrenderer',isBufferedRenderer:!0,lockableScope:'both',numFromEdge:2,trailingBufferZone:10,leadingBufferZone:20,synchronousRender:!0,scrollToLoadBuffer:200,viewSize:100,rowHeight:21,position:0,scrollTop:0,lastScrollDirection:1,bodyTop:0,scrollHeight:0,loadId:0,init:function(grid){var me=this,view=grid.view,viewListeners={refresh:me.onViewRefresh,columnschanged:me.checkVariableRowHeight,scope:me,destroyable:!0},scrollerListeners={scroll:me.onViewScroll,scope:me},initialConfig=view.initialConfig;me.scroller=view.lockingPartner?view.ownerGrid.scrollable:view.getScrollable();if(grid.isTree||(grid.ownerLockable&&grid.ownerLockable.isTree)){view.blockRefresh=!1;if(initialConfig&&initialConfig.loadMask===undefined){view.loadMask=!0}}
if(view.positionBody){viewListeners.refresh=me.onViewRefresh}
me.grid=grid;me.view=view;me.isRTL=view.getInherited().rtl;view.bufferedRenderer=me;view.preserveScrollOnRefresh=!0;view.animate=!1;me.bindStore(view.dataSource);if(view.hasOwnProperty('rowHeight')){me.rowHeight=view.rowHeight}
me.position=0;me.viewListeners=view.on(viewListeners);if(me.scroller){me.scrollListeners=me.scroller.on(scrollerListeners)}},checkVariableRowHeight:function(){var hadVariableRowHeight=this.variableRowHeight;this.variableRowHeight=this.view.hasVariableRowHeight();if(!!this.variableRowHeight!==!!hadVariableRowHeight){delete this.rowHeight}},bindStore:function(newStore){var me=this,currentStore=me.store;if(currentStore&&currentStore.isFeatureStore){return}
if(currentStore){me.unbindStore()}
me.storeListeners=newStore.on({scope:me,groupchange:me.onStoreGroupChange,clear:me.onStoreClear,beforeload:me.onBeforeStoreLoad,load:me.onStoreLoad,destroyable:!0});me.store=newStore;me.setBodyTop(me.position=me.scrollTop=0);delete me.viewSize;delete me.rowHeight;if(newStore.isBufferedStore){newStore.setViewSize(me.viewSize)}},unbindStore:function(){this.storeListeners.destroy();this.storeListeners=this.store=null},onBeforeStoreLoad:function(store){var me=this,view=me.view;if(view&&view.refreshCounter){if(store.isTreeStore||view.preserveScrollOnReload){me.nextRefreshStartIndex=view.all.startIndex}else{if(me.scrollTop!==0){me.setBodyTop(me.bodyTop=me.scrollTop=me.position=me.scrollHeight=me.nextRefreshStartIndex=0);me.scroller.scrollTo(null,0)}}
me.lastScrollDirection=me.scrollOffset=null}
me.disable()},onStoreLoad:function(){this.isStoreLoading=!0;this.enable()},onStoreClear:function(){var me=this,view=me.view;if(view.rendered&&!me.store.destroyed){if(me.scrollTop!==0){me.bodyTop=me.scrollTop=me.position=me.scrollHeight=0;me.nextRefreshStartIndex=null;me.scroller.scrollTo(null,0)}
view.refresh();me.lastScrollDirection=me.scrollOffset=null}},onStoreGroupChange:function(store){this.refreshSize()},onViewRefresh:function(view,records){var me=this,rows=view.all,height;me.checkVariableRowHeight();if(!view.componentLayoutCounter&&(view.headerCt.down('{flex}')||me.variableRowHeight)){view.on({boxready:Ext.Function.pass(me.onViewRefresh,[view,records],me),single:!0});me.skipNextRefreshSize=!0;return}
me.skipNextRefreshSize=!1;if(me.refreshing){return}
me.refreshSize();if(me.scroller){if(me.scrollTop!==me.scroller.getPosition().y){me.onViewScroll()}else{if(!me.hasOwnProperty('bodyTop')){me.bodyTop=rows.startIndex*me.rowHeight;me.scroller.scrollTo(null,me.bodyTop)}
me.setBodyTop(me.bodyTop);height=view.lastBox&&view.lastBox.height;if(height&&rows.getCount()){me.onViewResize(view,null,height);if(records&&(rows.getCount()!==records.length)){records.length=0;records.push.apply(records,me.store.getRange(rows.startIndex,rows.endIndex))}}}}},beforeTableLayout:function(ownerContext){var dom=this.view.body.dom,size;if(dom){size=this.grid.getElementSize(dom);ownerContext.bodyHeight=size.height;ownerContext.bodyWidth=size.width}},afterTableLayout:function(ownerContext){var me=this,view=me.view,renderedBlockHeight;if(ownerContext.bodyHeight&&view.body.dom){delete me.rowHeight;me.refreshSize();renderedBlockHeight=me.grid.getElementHeight(view.body.dom);if(renderedBlockHeight!==ownerContext.bodyHeight){me.onViewResize(view,null,view.el.lastBox.height);renderedBlockHeight=me.bodyHeight;if(renderedBlockHeight<ownerContext.bodyHeight){if(me.viewSize>=me.store.getCount()){me.setBodyTop(0)}else if(me.bodyTop>me.scrollTop||me.bodyTop+renderedBlockHeight<me.scrollTop+me.viewClientHeight){me.setBodyTop(me.scrollTop-me.trailingBufferZone*me.rowHeight)}}
if(view.all.endIndex===(view.dataSource.getCount())-1){me.stretchView(view,me.scrollHeight=me.bodyTop+renderedBlockHeight-1)}}}},refreshSize:function(){var me=this,view=me.view,skipNextRefreshSize=me.skipNextRefreshSize||(Ext.Component.pendingLayouts&&Ext.Component.layoutSuspendCount)||!view.body.dom;me.skipNextRefreshSize=!1;if(skipNextRefreshSize){return}
me.bodyHeight=me.grid.getElementHeight(view.body.dom);me.scrollHeight=me.getScrollHeight();me.stretchView(view,me.scrollHeight)},onViewResize:function(view,width,height,oldWidth,oldHeight){var me=this,newViewSize;me.refreshSize();if(!oldHeight||height!==oldHeight){Ext.suspendLayouts();me.viewClientHeight=height||view.el.dom.clientHeight;newViewSize=Math.ceil(height/Math.min(me.getThemeRowHeight(),me.rowHeight))+me.trailingBufferZone+me.leadingBufferZone;me.viewSize=me.setViewSize(newViewSize);Ext.resumeLayouts(!0)}},stretchView:function(view,scrollRange){var me=this,newY;if(me.scrollTop>scrollRange){newY=me.nextRefreshStartIndex==null?me.bodyHeight:scrollRange-me.bodyHeight;me.position=me.scrollTop=Math.max(newY,0);me.scroller.scrollTo(null,me.scrollTop)}
if(me.bodyTop>scrollRange){view.body.translate(null,me.bodyTop=me.position)}
if(view.getScrollable()){me.refreshScroller(view,scrollRange)}},refreshScroller:function(view,scrollRange){var scroller=view.getScrollable();if(scroller){if(scroller.setElementSize){scroller.setElementSize()}
scroller.setSize({x:view.headerCt.getTableWidth(),y:view.lockingPartner?null:scrollRange});if(view.lockingPartner){this.scroller.setSize({x:0,y:scrollRange})}}},setViewSize:function(viewSize,fromLockingPartner){var me=this,store=me.store,view=me.view,ownerGrid,rows=view.all,elCount=rows.getCount(),storeCount=store.getCount(),start,end,lockingPartner=me.view.lockingPartner&&me.view.lockingPartner.bufferedRenderer,diff=elCount-viewSize,oldTop=0,maxIndex=Math.max(0,storeCount-1),pointyEnd=Ext.Number.sign((me.getFirstVisibleRowIndex()-rows.startIndex)-(rows.endIndex-me.getLastVisibleRowIndex()));if(lockingPartner&&!fromLockingPartner){lockingPartner.setViewSize(viewSize,!0)}
diff=elCount-viewSize;if(diff){me.scrollTop=me.scroller?me.scroller.getPosition().y:0;me.viewSize=viewSize;if(store.isBufferedStore){store.setViewSize(viewSize)}
if(elCount){start=Math.max(0,Math.min(rows.startIndex,storeCount-viewSize));end=Math.min(start+viewSize-1,maxIndex);if(start===rows.startIndex&&end===rows.endIndex){if(diff<0){me.handleViewScroll(pointyEnd)}}else{if(lockingPartner){lockingPartner.disable()}
if(diff<0){if(storeCount>viewSize&&storeCount>elCount){store.getRange(start,end,{callback:function(newRecords,start,end){ownerGrid=view.ownerGrid;if(end>rows.endIndex){rows.scroll(Ext.Array.slice(newRecords,rows.endIndex+1,Infinity),1,0)}
if(start<rows.startIndex){oldTop=rows.first(!0);rows.scroll(Ext.Array.slice(newRecords,0,rows.startIndex-start),-1,0);me.bodyTop-=oldTop.offsetTop}
me.setBodyTop(me.bodyTop);if(lockingPartner&&!fromLockingPartner&&(ownerGrid.syncRowHeight||ownerGrid.syncRowHeightOnNextLayout)){lockingPartner.setViewSize(viewSize,!0);ownerGrid.syncRowHeights()}}})}else{me.refreshView(0)}}else{if(pointyEnd===1){oldTop=rows.item(rows.startIndex+diff,!0).offsetTop}
rows.clip(pointyEnd,diff);me.setBodyTop(me.bodyTop+oldTop)}
if(lockingPartner){lockingPartner.enable()}}}
me.refreshSize()}
return viewSize},getViewRange:function(){var me=this,view=me.view,rows=view.all,rowCount=rows.getCount(),lockingPartnerRows=view.lockingPartner&&view.lockingPartner.all,store=me.store,startIndex=0,endIndex;if(!me.hasOwnProperty('viewSize')&&me.ownerCt&&me.ownerCt.height){me.viewSize=Math.ceil(me.ownerCt.height/me.rowHeight)}
if(!store.data.getCount()){return[]}
if(!rowCount&&lockingPartnerRows&&lockingPartnerRows.getCount()){startIndex=lockingPartnerRows.startIndex;endIndex=Math.min(lockingPartnerRows.endIndex,startIndex+me.viewSize-1,store.getCount()-1)}else{if(rowCount){startIndex=rows.startIndex}else if(store.isBufferedStore){if(!store.currentPage){store.currentPage=1}
startIndex=rows.startIndex=(store.currentPage-1)*(store.pageSize||1);store.currentPage=1}
endIndex=startIndex+(me.viewSize||store.defaultViewSize)-1}
return store.getRange(startIndex,endIndex)},onReplace:function(store,startIndex,oldRecords,newRecords){var me=this,scroller=me.scroller,view=me.view,rows=view.all,oldStartIndex,renderedSize=rows.getCount(),lastAffectedIndex=startIndex+oldRecords.length-1,recordIncrement=newRecords.length-oldRecords.length,scrollIncrement=recordIncrement*me.rowHeight,preserveScrollOnRefresh;if(startIndex>=rows.startIndex+me.viewSize){me.refreshSize();return}
if(renderedSize&&lastAffectedIndex<rows.startIndex&&rows.getCount()>=me.viewSize){rows.moveBlock(recordIncrement);me.refreshSize();oldStartIndex=rows.startIndex;if(recordIncrement>0){me.doNotMirror=!0;me.handleViewScroll(-1);me.doNotMirror=!1}
if(rows.startIndex===oldStartIndex){if(rows.startIndex){me.setBodyTop(me.bodyTop+=scrollIncrement);view.suspendEvent('scroll');view.scrollBy(0,scrollIncrement);view.resumeEvent('scroll');me.position=me.scrollTop=me.scroller.getPosition().y}}else{view.suspendEvent('scroll');view.scrollBy(0,(oldStartIndex-rows.startIndex)*me.rowHeight);view.resumeEvent('scroll')}
view.refreshSize(rows.getCount()!==renderedSize);return}
if(renderedSize&&startIndex>rows.endIndex){me.refreshSize();if(recordIncrement>0){me.onRangeFetched(null,rows.startIndex,Math.min(store.getCount(),rows.startIndex+me.viewSize)-1)}
view.refreshSize(rows.getCount()!==renderedSize);return}
if(startIndex<rows.startIndex&&lastAffectedIndex<=rows.endIndex){preserveScrollOnRefresh=view.preserveScrollOnRefresh;view.preserveScrollOnRefresh=!1;me.refreshView(rows.startIndex-oldRecords.length+newRecords.length);view.preserveScrollOnRefresh=preserveScrollOnRefresh;return}
if(startIndex<rows.startIndex&&lastAffectedIndex<=rows.endIndex&&scrollIncrement){me.doVerticalScroll(scroller,me.scrollTop+=scrollIncrement,!0)}
me.refreshView(rows.startIndex,scrollIncrement)},doVerticalScroll:function(scroller,pos,supressEvents){var me=this;if(!scroller){return}
if(supressEvents){scroller.suspendEvent('scroll')}
scroller.scrollTo(null,me.position=pos);if(supressEvents){scroller.resumeEvent('scroll')}},scrollTo:function(recordIdx,options){var args=arguments,me=this,view=me.view,lockingPartner=view.lockingPartner&&view.lockingPartner.grid.isVisible()&&view.lockingPartner.bufferedRenderer,store=me.store,total=store.getCount(),startIdx,endIdx,targetRow,tableTop,groupingFeature,metaGroup,record,direction;if(options!==undefined&&!(options instanceof Object)){options={select:args[1],callback:args[2],scope:args[3]}}
if((groupingFeature=view.dataSource.groupingFeature)&&(groupingFeature.collapsible)){if(recordIdx.isEntity){record=recordIdx}else{record=view.store.getAt(Math.min(Math.max(recordIdx,0),view.store.getCount()-1))}
metaGroup=groupingFeature.getMetaGroup(record);if(metaGroup&&metaGroup.isCollapsed){if(!groupingFeature.isExpandingOrCollapsing&&record!==metaGroup.placeholder){groupingFeature.expand(groupingFeature.getGroup(record).getGroupKey());total=store.getCount();recordIdx=groupingFeature.indexOf(record)}else{record=metaGroup.placeholder;recordIdx=groupingFeature.indexOfPlaceholder(record)}}else{recordIdx=groupingFeature.indexOf(record)}}else{if(recordIdx.isEntity){record=recordIdx;recordIdx=store.indexOf(record);if(recordIdx===-1){Ext.raise('Unknown record passed to BufferedRenderer#scrollTo');return}}else{recordIdx=Math.min(Math.max(recordIdx,0),total-1);record=store.getAt(recordIdx)}}
if(record&&(targetRow=view.getNode(record))){view.grid.ensureVisible(record,options);me.onViewScroll();return}
if(recordIdx<view.all.startIndex){direction=-1;startIdx=Math.max(Math.min(recordIdx-(Math.floor((me.leadingBufferZone+me.trailingBufferZone)/2)),total-me.viewSize+1),0);endIdx=Math.min(startIdx+me.viewSize-1,total-1)}else{direction=1;endIdx=Math.min(recordIdx+(Math.floor((me.leadingBufferZone+me.trailingBufferZone)/2)),total-1);startIdx=Math.max(endIdx-(me.viewSize-1),0)}
tableTop=Math.max(startIdx*me.rowHeight,0);store.getRange(startIdx,endIdx,{callback:function(range,start,end){me.renderRange(start,end,!0);record=store.data.getRange(recordIdx,recordIdx+1)[0];targetRow=view.getNode(record);view.body.translate(null,me.bodyTop=tableTop);if(direction===1&&view.hasVariableRowHeight()){me.refreshSize()}
if(lockingPartner){lockingPartner.renderRange(start,end,!0);me.syncRowHeights();lockingPartner.view.body.translate(null,lockingPartner.bodyTop=tableTop);if(direction===1){lockingPartner.refreshSize()}}
if(!targetRow){return}
view.grid.ensureVisible(record,options);me.scrollTop=me.position=me.scroller.getPosition().y;if(lockingPartner){lockingPartner.position=lockingPartner.scrollTop=me.scrollTop}}})},onViewScroll:function(scroller,x,scrollTop){var me=this,bodyDom=me.view.body.dom,store=me.store,totalCount=(store.getCount()),vscrollDistance,scrollDirection;me.scrollTop=scrollTop==null?(scrollTop=me.scroller.getPosition().y):scrollTop;if(bodyDom){if(!(me.disabled||totalCount<me.viewSize)){vscrollDistance=scrollTop-me.position;scrollDirection=vscrollDistance>0?1:-1;if(Math.abs(vscrollDistance)>=20||(scrollDirection!==me.lastScrollDirection)){me.lastScrollDirection=scrollDirection;me.handleViewScroll(me.lastScrollDirection,vscrollDistance)}}}},handleViewScroll:function(direction,vscrollDistance){var me=this,rows=me.view.all,store=me.store,storeCount=store.getCount(),viewSize=me.viewSize,lastItemIndex=storeCount-1,maxRequestStart=Math.max(0,storeCount-viewSize),requestStart,requestEnd;if(direction===-1){if(rows.startIndex){if(me.topOfViewCloseToEdge()){requestStart=Math.max(0,me.getLastVisibleRowIndex()+me.trailingBufferZone-viewSize);if(requestStart>rows.startIndex){requestStart=Math.max(0,rows.startIndex+Math.floor(vscrollDistance/me.rowHeight))}}}}else{if(rows.endIndex<lastItemIndex){if(me.bottomOfViewCloseToEdge()){requestStart=Math.max(0,Math.min(me.getFirstVisibleRowIndex()-me.trailingBufferZone,maxRequestStart))}}}
if(requestStart==null){me.position=me.scrollTop;me.loadId++}else{requestEnd=Math.min(requestStart+viewSize-1,lastItemIndex);if(me.variableRowHeight&&requestEnd===rows.endIndex&&requestEnd<lastItemIndex){requestEnd++;requestStart++}
if(requestStart!==rows.startIndex||requestEnd!==rows.endIndex){me.scroller.trackingScrollTop=me.scrollTop;me.renderRange(requestStart,requestEnd);return!0}}},bottomOfViewCloseToEdge:function(){var me=this;if(me.variableRowHeight){return me.bodyTop+me.bodyHeight<me.scrollTop+me.view.lastBox.height+(me.numFromEdge*me.rowHeight)}else{return(me.view.all.endIndex-me.getLastVisibleRowIndex())<me.numFromEdge}},topOfViewCloseToEdge:function(){var me=this;if(me.variableRowHeight){return me.bodyTop>me.scrollTop-(me.numFromEdge*me.rowHeight)}else{return(me.getFirstVisibleRowIndex()-me.view.all.startIndex)<me.numFromEdge}},refreshView:function(startIndex,scrollIncrement){var me=this,viewSize=me.viewSize,view=me.view,rows=view.all,store=me.store,storeCount=store.getCount(),maxIndex=Math.max(0,storeCount-1),lockingPartnerRows=view.lockingPartner&&view.lockingPartner.all,preserveScroll=me.bodyTop&&view.preserveScrollOnRefresh||scrollIncrement,endIndex;if(!storeCount){return me.doRefreshView([],0,0)}else if(storeCount<viewSize){startIndex=0;endIndex=maxIndex;me.nextRefreshStartIndex=preserveScroll?null:0}else if(startIndex==null&&!rows.getCount()&&lockingPartnerRows&&lockingPartnerRows.getCount()){startIndex=lockingPartnerRows.startIndex;endIndex=Math.min(lockingPartnerRows.endIndex,startIndex+viewSize-1,maxIndex)}else{if(startIndex==null){if(me.nextRefreshStartIndex!=null&&!preserveScroll){startIndex=me.nextRefreshStartIndex}else{startIndex=rows.startIndex}
me.nextRefreshStartIndex=null}
startIndex=Math.max(0,Math.min(startIndex,maxIndex-viewSize+1));endIndex=Math.min(startIndex+viewSize-1,maxIndex);if(endIndex-startIndex+1>viewSize){startIndex=endIndex-viewSize+1}}
if(startIndex===0&&endIndex===-1){me.doRefreshView([],0,0)}else{store.getRange(startIndex,endIndex,{callback:me.doRefreshView,scope:me})}},doRefreshView:function(range,startIndex,endIndex){var me=this,view=me.view,scroller=me.scroller,rows=view.all,previousStartIndex=rows.startIndex,previousEndIndex=rows.endIndex,prevRowCount=rows.getCount(),viewMoved=startIndex!==rows.startIndex&&!me.isStoreLoading,calculatedTop=-1,previousFirstItem,previousLastItem,scrollIncrement,restoreFocus;me.isStoreLoading=!1;view.refreshing=me.refreshing=!0;if(view.refreshCounter){if(view.hasListeners.beforerefresh&&view.fireEvent('beforerefresh',view)===!1){return view.refreshNeeded=view.refreshing=me.refreshing=!1}
restoreFocus=view.saveFocusState();view.clearViewEl(!0);view.refreshCounter++;if(range.length){view.doAdd(range,startIndex);if(viewMoved){previousFirstItem=rows.item(previousStartIndex,!0);previousLastItem=rows.item(previousEndIndex,!0);if(previousFirstItem){scrollIncrement=-previousFirstItem.offsetTop}else if(previousLastItem){scrollIncrement=rows.last(!0).offsetTop-previousLastItem.offsetTop}
if(scrollIncrement){calculatedTop=Math.max(me.bodyTop+scrollIncrement,0);me.scrollTop=calculatedTop?me.scrollTop+scrollIncrement:0}else{calculatedTop=startIndex*me.rowHeight;me.scrollTop=Math.max(calculatedTop+me.rowHeight*(calculatedTop<me.bodyTop?me.leadingBufferZone:me.trailingBufferZone),0)}}}else{me.scrollTop=calculatedTop=me.position=0;view.addEmptyText()}
if(calculatedTop!==-1){me.setBodyTop(calculatedTop);me.doVerticalScroll(scroller,me.scrollTop,!0)}
me.refreshSize();view.refreshSize(rows.getCount()!==prevRowCount);view.fireItemMutationEvent('refresh',view,range);restoreFocus();if(view.preserveScrollOnRefresh&&restoreFocus!==Ext.emptyFn){me.doVerticalScroll(scroller,me.scrollTop,!0)}
view.headerCt.setSortState()}else{view.refresh()}
if(view.getVisibleColumnManager().getColumns().length&&rows.getCount()!==Math.min(me.store.getCount(),me.viewSize)){Ext.raise('rendered block refreshed at '+rows.getCount()+' rows while BufferedRenderer view size is '+me.viewSize)}
view.refreshNeeded=view.refreshing=me.refreshing=!1},renderRange:function(start,end,forceSynchronous){var me=this,rows=me.view.all,store=me.store;if(rows.startIndex===start&&rows.endIndex===end){return}
if(!(start===rows.startIndex&&end===rows.endIndex)){if(store.rangeCached(start,end)){me.cancelLoad();if(me.synchronousRender||forceSynchronous){me.onRangeFetched(null,start,end)}else{if(!me.renderTask){me.renderTask=new Ext.util.DelayedTask(me.onRangeFetched,me)}
me.renderTask.delay(-1,null,null,[null,start,end])}}else{me.attemptLoad(start,end,me.scrollTop)}}},onRangeFetched:function(range,start,end){var me=this,view=me.view,scroller=me.scroller,viewEl=view.el,rows=view.all,increment=0,calculatedTop,partnerView=!me.doNotMirror&&view.lockingPartner,partnerColManger=partnerView&&partnerView.getVisibleColumnManager(),partnerViewConfigured=partnerColManger&&partnerColManger.getColumns().length,lockingPartner=partnerViewConfigured&&partnerView.bufferedRenderer,partnerRows=partnerViewConfigured&&partnerView.all,variableRowHeight=me.variableRowHeight,doSyncRowHeight=partnerViewConfigured&&partnerView.ownerCt.isVisible()&&(view.ownerGrid.syncRowHeight||view.ownerGrid.syncRowHeightOnNextLayout||(lockingPartner.variableRowHeight!==variableRowHeight)),activeEl,focusedView,i,newRows,newTop,noOverlap,oldStart,partnerNewRows,pos,removeCount,topAdditionSize,topBufferZone,records;if(view.destroyed){return}
if(range){me.scrollTop=scroller.getPosition().y}else{range=me.store.getRange(start,end);if(!range){return}}
activeEl=Ext.fly(Ext.Element.getActiveElement());if(viewEl.contains(activeEl)){focusedView=view}else if(partnerView&&partnerView.el.contains(activeEl)){focusedView=partnerView}
if(focusedView){activeEl.suspendFocusEvents()}
calculatedTop=start*me.rowHeight;if(start<rows.startIndex&&end>rows.endIndex){topAdditionSize=rows.startIndex-start;view.clearViewEl(!0);newRows=view.doAdd(range,start);view.fireItemMutationEvent('itemadd',range,start,newRows,view);if(lockingPartner){partnerView.clearViewEl(!0);partnerNewRows=partnerView.doAdd(range,start);partnerView.fireItemMutationEvent('itemadd',range,start,partnerNewRows,partnerView);if(doSyncRowHeight){me.syncRowHeights(newRows,partnerNewRows);doSyncRowHeight=!1}}
for(i=0;i<topAdditionSize;i++){increment-=me.grid.getElementHeight(newRows[i])}
newTop=me.bodyTop+increment}else{noOverlap=me.teleported||start>rows.endIndex||end<rows.startIndex;if(noOverlap){view.clearViewEl(!0);me.teleported=!1}
if(!rows.getCount()){newRows=view.doAdd(range,start);view.fireItemMutationEvent('itemadd',range,start,newRows,view);if(lockingPartner){partnerView.clearViewEl(!0);partnerNewRows=lockingPartner.view.doAdd(range,start);partnerView.fireItemMutationEvent('itemadd',range,start,partnerNewRows,partnerView)}
newTop=calculatedTop;if(noOverlap&&variableRowHeight){topBufferZone=me.scrollTop<me.position?me.leadingBufferZone:me.trailingBufferZone;if(start>topBufferZone){newTop=Math.max(me.scrollTop-rows.item(rows.startIndex+topBufferZone-1,!0).offsetTop,0)}}}else if(end>rows.endIndex){removeCount=Math.max(start-rows.startIndex,0);if(variableRowHeight){increment=rows.item(rows.startIndex+removeCount,!0).offsetTop}
records=Ext.Array.slice(range,rows.endIndex+1-start);newRows=rows.scroll(records,1,removeCount);if(lockingPartner){partnerNewRows=partnerRows.scroll(records,1,removeCount)}
if(variableRowHeight){newTop=me.bodyTop+increment}else{newTop=calculatedTop}}else{removeCount=Math.max(rows.endIndex-end,0);oldStart=rows.startIndex;records=Ext.Array.slice(range,0,rows.startIndex-start);newRows=rows.scroll(records,-1,removeCount);if(lockingPartner){partnerNewRows=partnerRows.scroll(records,-1,removeCount)}
if(doSyncRowHeight){me.syncRowHeights(newRows,partnerNewRows);doSyncRowHeight=!1;newTop=me.bodyTop-rows.item(oldStart,!0).offsetTop;if(!rows.startIndex){if(newTop){me.doVerticalScroll(scroller,me.scrollTop-=newTop);newTop=0}}else if(newTop<0){increment=rows.startIndex*me.rowHeight;me.doVerticalScroll(scroller,me.scrollTop+=increment);newTop=me.bodyTop+increment}}else{newTop=calculatedTop}}
me.position=me.scrollTop}
if(focusedView){activeEl.resumeFocusEvents();if(!focusedView.el.contains(activeEl)){pos=focusedView.actionableMode?focusedView.actionPosition:focusedView.lastFocused;if(pos&&pos.column){focusedView.renderingRows=!0;focusedView.onFocusLeave({});focusedView.renderingRows=!1;me.getNewFocusTarget(pos).focus()}}}
newTop=Math.max(Math.floor(newTop),0);if(view.positionBody){me.setBodyTop(newTop,!0)}
if(lockingPartner){lockingPartner.scrollTop=me.scrollTop;if(lockingPartner.bodyTop!==newTop){lockingPartner.setBodyTop(newTop,!0)}
if(doSyncRowHeight){me.syncRowHeights(newRows,partnerNewRows)}}else if(variableRowHeight){delete me.rowHeight;me.refreshSize()}
if(view.getVisibleColumnManager().getColumns().length&&rows.getCount()!==Math.min(me.store.getCount(),me.viewSize)){Ext.raise('rendered block refreshed at '+rows.getCount()+' rows while BufferedRenderer view size is '+me.viewSize)}
return newRows},getNewFocusTarget:function(pos){var view=pos.view,grid=view.grid,column=pos.column,hiddenHeaders=column.isHidden()||grid.hideHeaders,tabbableItems;if(column.focusable&&!hiddenHeaders){return column}
tabbableItems=column.el.findTabbableElements();if(tabbableItems&&tabbableItems.length){return tabbableItems[0]}
return grid.findFocusTarget()||view.el},syncRowHeights:function(itemEls,partnerItemEls){var me=this,ln=0,otherLn=1,mySynchronizer=[],otherSynchronizer=[],RowSynchronizer=Ext.grid.locking.RowSynchronizer,i,rowSync;if(itemEls&&partnerItemEls){ln=itemEls.length;otherLn=partnerItemEls.length}
if(ln!==otherLn){itemEls=me.view.all.slice();partnerItemEls=me.view.lockingPartner.all.slice();ln=otherLn=itemEls.length}
for(i=0;i<ln;i++){mySynchronizer[i]=rowSync=new RowSynchronizer(me.view,itemEls[i]);rowSync.measure()}
for(i=0;i<otherLn;i++){otherSynchronizer[i]=rowSync=new RowSynchronizer(me.view.lockingPartner,partnerItemEls[i]);rowSync.measure()}
for(i=0;i<ln;i++){mySynchronizer[i].finish(otherSynchronizer[i]);otherSynchronizer[i].finish(mySynchronizer[i])}
me.syncRowHeightsFinish()},syncRowHeightsFinish:function(){var me=this,view=me.view,lockingPartner=view.lockingPartner.bufferedRenderer,ownerGrid=view.ownerGrid,scrollable=view.getScrollable();ownerGrid.syncRowHeightOnNextLayout=!1;if(view.componentLayoutCounter){delete me.rowHeight;me.refreshSize();delete lockingPartner.rowHeight;lockingPartner.refreshSize()}
if(scrollable){scrollable.restoreState()}},setBodyTop:function(bodyTop,skipStretchView){var me=this,view=me.view,rows=view.all,store=me.store,body=view.body;if(!body.dom){return}
me.translateBody(body,bodyTop);if(me.variableRowHeight){me.bodyHeight=me.grid.getElementHeight(body.dom);if(rows.endIndex===store.getCount()-1){me.scrollHeight=bodyTop+me.bodyHeight-1}else{me.scrollHeight=me.getScrollHeight()}
if(!skipStretchView){me.stretchView(view,me.scrollHeight)}}else{me.bodyHeight=rows.getCount()*me.rowHeight}},translateBody:function(body,bodyTop){body.translate(null,this.bodyTop=bodyTop)},getFirstVisibleRowIndex:function(startRow,endRow,viewportTop,viewportBottom){var me=this,view=me.view,rows=view.all,elements=rows.elements,clientHeight=me.viewClientHeight,target,targetTop,bodyTop=me.bodyTop;if(rows.getCount()&&me.variableRowHeight){if(!arguments.length){startRow=rows.startIndex;endRow=rows.endIndex;viewportTop=me.scrollTop;viewportBottom=viewportTop+clientHeight;if(bodyTop>viewportBottom||bodyTop+me.bodyHeight<viewportTop){me.teleported=!0;return Math.floor(me.scrollTop/me.rowHeight)}
target=startRow+Math.min(me.numFromEdge+((me.lastScrollDirection===-1)?me.leadingBufferZone:me.trailingBufferZone),Math.floor((endRow-startRow)/2))}else{if(startRow===endRow){return endRow}
target=startRow+Math.floor((endRow-startRow)/2)}
targetTop=bodyTop+elements[target].offsetTop;if(targetTop+me.grid.getElementHeight(elements[target])<=viewportTop){return me.getFirstVisibleRowIndex(target+1,endRow,viewportTop,viewportBottom)}
if(targetTop<=viewportTop){return target}else if(target!==startRow){return me.getFirstVisibleRowIndex(startRow,target-1,viewportTop,viewportBottom)}}
return Math.floor(me.scrollTop/me.rowHeight)},getLastVisibleRowIndex:function(startRow,endRow,viewportTop,viewportBottom){var me=this,view=me.view,rows=view.all,elements=rows.elements,clientHeight=me.viewClientHeight,target,targetTop,targetBottom,bodyTop=me.bodyTop;if(rows.getCount()&&me.variableRowHeight){if(!arguments.length){startRow=rows.startIndex;endRow=rows.endIndex;viewportTop=me.scrollTop;viewportBottom=viewportTop+clientHeight;if(bodyTop>viewportBottom||bodyTop+me.bodyHeight<viewportTop){me.teleported=!0;return Math.floor(me.scrollTop/me.rowHeight)+Math.ceil(clientHeight/me.rowHeight)}
target=endRow-Math.min(me.numFromEdge+((me.lastScrollDirection===1)?me.leadingBufferZone:me.trailingBufferZone),Math.floor((endRow-startRow)/2))}else{if(startRow===endRow){return endRow}
target=startRow+Math.floor((endRow-startRow)/2)}
targetTop=bodyTop+elements[target].offsetTop;if(targetTop>viewportBottom){return me.getLastVisibleRowIndex(startRow,target-1,viewportTop,viewportBottom)}
targetBottom=targetTop+me.grid.getElementHeight(elements[target]);if(targetBottom>=viewportBottom){return target}else if(target!==endRow){return me.getLastVisibleRowIndex(target+1,endRow,viewportTop,viewportBottom)}}
return Math.min(me.getFirstVisibleRowIndex()+Math.ceil(clientHeight/me.rowHeight),rows.endIndex)},getScrollHeight:function(){var me=this,view=me.view,rows=view.all,store=me.store,recCount=store.getCount(),rowCount=rows.getCount(),row,rowHeight,borderWidth,scrollHeight;if(!recCount){return 0}
if(!me.hasOwnProperty('rowHeight')){if(rowCount){if(me.variableRowHeight){me.rowHeight=Math.floor(me.bodyHeight/rowCount)}else{row=rows.first();rowHeight=row.getHeight();if(Ext.isIE8){borderWidth=row.getBorderWidth('b');if(borderWidth>0){rowHeight-=borderWidth}}
me.rowHeight=rowHeight}}else{delete me.rowHeight}}
if(me.variableRowHeight){if(rows.endIndex===recCount-1){scrollHeight=me.bodyTop+me.bodyHeight-1}else{scrollHeight=Math.floor((recCount-rowCount)*me.rowHeight)+me.bodyHeight;scrollHeight+=me.bodyTop-rows.startIndex*me.rowHeight}}else{scrollHeight=Math.floor(recCount*me.rowHeight)}
return(me.scrollHeight=scrollHeight)},getThemeRowHeight:function(){var me=this,testEl;if(!me.themeRowHeight){testEl=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+'theme-row-height-el'});me.self.prototype.themeRowHeight=testEl.dom.offsetHeight;testEl.destroy()}
return me.themeRowHeight},attemptLoad:function(start,end,loadScrollPosition){var me=this;if(me.scrollToLoadBuffer){if(!me.loadTask){me.loadTask=new Ext.util.DelayedTask()}
me.loadTask.delay(me.scrollToLoadBuffer,me.doAttemptLoad,me,[start,end,loadScrollPosition])}else{me.doAttemptLoad(start,end,loadScrollPosition)}},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(start,end,loadScrollPosition){var me=this;if(!me.destroyed){me.store.getRange(start,end,{loadId:++me.loadId,callback:function(range,start,end,options){if(options.loadId===me.loadId&&me.scrollTop===loadScrollPosition){me.onRangeFetched(range,start,end)}},fireEvent:!1})}},destroy:function(){var me=this;me.cancelLoad();if(me.store){me.unbindStore()}
Ext.destroy(me.viewListeners,me.stretcher,me.gridListeners,me.scrollListeners);me.callParent()}})
;
Ext.define('Ext.rtl.grid.plugin.BufferedRenderer',{override:'Ext.grid.plugin.BufferedRenderer',translateBody:function(body,bodyTop){var scroller=this.view.getScrollable();if(this.isRTL&&Ext.supports.xOriginBug&&scroller&&scroller.getY()){body.translate(Ext.scrollbar.width(),this.bodyTop=bodyTop)}else{this.callParent([body,bodyTop])}}})
;
Ext.define('Ext.grid.plugin.Editing',{extend:'Ext.plugin.Abstract',alias:'editing.editing',requires:['Ext.grid.column.Column','Ext.util.KeyNav','Ext.form.field.Base','Ext.view.Table'],mixins:['Ext.mixin.Observable'],clicksToEdit:2,triggerEvent:undefined,relayedEvents:['beforeedit','edit','validateedit','canceledit'],defaultFieldUI:'default',defaultFieldXType:'textfield',editStyle:'',constructor:function(config){var me=this;me.callParent([config]);me.mixins.observable.constructor.call(me);me.on("edit",function(editor,e){me.fireEvent("afteredit",editor,e)})},init:function(grid){var me=this,ownerLockable=grid.ownerLockable;me.grid=grid;me.view=grid.view;me.initEvents();if(grid.rendered){me.setup()}else{me.mon(grid,{beforereconfigure:me.onBeforeReconfigure,reconfigure:me.onReconfigure,scope:me,beforerender:{fn:me.onBeforeRender,single:!0,scope:me}})}
grid.editorEventRelayers=grid.relayEvents(me,me.relayedEvents);if(ownerLockable){ownerLockable.editorEventRelayers=ownerLockable.relayEvents(me,me.relayedEvents)}
grid.isEditable=!0;grid.editingPlugin=grid.view.editingPlugin=me},onBeforeReconfigure:function(){this.reconfiguring=!0},onReconfigure:function(){this.setup();delete this.reconfiguring},onBeforeRender:function(){this.setup()},setup:function(){this.initFieldAccessors(this.grid.getTopLevelColumnManager().getColumns())},destroy:function(){var me=this,grid=me.grid;Ext.destroy(me.keyNav);me.clearListeners();if(grid){if(grid.ownerLockable){Ext.destroy(grid.ownerLockable.editorEventRelayers);grid.ownerLockable.editorEventRelayers=null}
Ext.destroy(grid.editorEventRelayers);grid.editorEventRelayers=null;grid.editingPlugin=grid.view.editingPlugin=null}
me.callParent()},getEditStyle:function(){return this.editStyle},initFieldAccessors:function(columns){if(columns.isGroupHeader){columns=columns.getGridColumns()}else if(!Ext.isArray(columns)){columns=[columns]}
var me=this,c,cLen=columns.length,getEditor=function(record,defaultField){return me.getColumnField(this,defaultField)},hasEditor=function(){return me.hasColumnField(this)},setEditor=function(field){me.setColumnField(this,field)},column;for(c=0;c<cLen;c++){column=columns[c];if(!column.getEditor){column.getEditor=getEditor}
if(!column.hasEditor){column.hasEditor=hasEditor}
if(!column.setEditor){column.setEditor=setEditor}}},removeFieldAccessors:function(columns){if(columns.isGroupHeader){columns=columns.getGridColumns()}else if(!Ext.isArray(columns)){columns=[columns]}
var c,cLen=columns.length,column;for(c=0;c<cLen;c++){column=columns[c];column.getEditor=column.hasEditor=column.setEditor=column.field=column.editor=null}},getColumnField:function(columnHeader,defaultField){var me=this,field=columnHeader.field;if(!(field&&field.isFormField)){field=columnHeader.field=me.createColumnField(columnHeader,defaultField)}
if(field&&field.ui==='default'&&!field.hasOwnProperty('ui')){field.ui=me.defaultFieldUI}
return field},hasColumnField:function(columnHeader){return!!(columnHeader.field&&columnHeader.field.isComponent)},setColumnField:function(columnHeader,field){columnHeader.field=field;columnHeader.field=this.createColumnField(columnHeader)},createColumnField:function(column,defaultField){var field=column.field,dataIndex;if(!field&&column.editor){field=column.editor=Ext.clone(column.editor);if(field.field){field=field.field;field.editorCfg=column.editor;delete field.editorCfg.field}
column.editor=null}
if(!field&&defaultField){field=defaultField}
if(field){dataIndex=column.dataIndex;if(field.isComponent){field.column=column}else{if(Ext.isString(field)){field={name:dataIndex,xtype:field,column:column}}else{field=Ext.apply({name:dataIndex,column:column},field)}
field=Ext.ComponentManager.create(field,this.defaultFieldXType)}
field.dataIndex=dataIndex;field.isEditorComponent=!0;column.field=field}
return field},initEvents:function(){var me=this;me.initEditTriggers();me.initCancelTriggers()},initCancelTriggers:Ext.emptyFn,initEditTriggers:function(){var me=this,view=me.view;if(me.triggerEvent==='cellfocus'){me.mon(view,'cellfocus',me.onCellFocus,me)}else if(me.triggerEvent==='rowfocus'){me.mon(view,'rowfocus',me.onRowFocus,me)}else{if(view.getSelectionModel().isCellModel){view.onCellFocus=me.beforeViewCellFocus.bind(me)}
me.mon(view,me.triggerEvent||('cell'+(me.clicksToEdit===1?'click':'dblclick')),me.onCellClick,me)}
me.initAddRemoveHeaderEvents();me.view.getNavigationModel().addKeyBindings({esc:me.onEscKey,defaultEventAction:!1,scope:me})},beforeViewCellFocus:function(position){if(this.view.selModel.keyNavigation||!this.editing||!this.isCellEditable||!this.isCellEditable(position.row,position.columnHeader)){this.view.focusCell.apply(this.view,arguments)}},onRowFocus:function(record,row,rowIdx){this.startEdit(row,0)},onCellFocus:function(record,cell,position){this.startEdit(position.row,position.column)},onCellClick:function(view,cell,colIdx,record,row,rowIdx,e){var ownerGrid=view.ownerGrid,expanderSelector=view.expanderSelector,columnHeader=view.ownerCt.getColumnManager().getHeaderAtIndex(colIdx),editor=columnHeader.getEditor(record),targetCmp;if(this.shouldStartEdit(editor)&&(!expanderSelector||!e.getTarget(expanderSelector))){ownerGrid.setActionableMode(!0,e.position)}else if(ownerGrid.actionableMode&&view.owns(e.target)&&(targetCmp=Ext.Component.from(e,cell))&&targetCmp.focusable){return}else if(ownerGrid.actionableMode){ownerGrid.setActionableMode(!1)}},initAddRemoveHeaderEvents:function(){var me=this,headerCt=me.grid.headerCt;me.mon(headerCt,{scope:me,add:me.onColumnAdd,columnmove:me.onColumnMove,beforedestroy:me.beforeGridHeaderDestroy})},onColumnAdd:function(ct,column){this.initFieldAccessors(column)},onColumnMove:Ext.emptyFn,onEscKey:function(e){var targetComponent;if(this.editing){targetComponent=Ext.getCmp(e.getTarget().getAttribute('componentId'));if(!(targetComponent&&targetComponent.isPickerField&&targetComponent.isExpanded)){e.stopEvent();return this.cancelEdit()}}},beforeEdit:Ext.emptyFn,shouldStartEdit:function(editor){return!!editor},getEditingContext:function(record,columnHeader,horizontalScroll,view){var me=this,grid=me.grid,colMgr=((view&&view.grid)||grid).visibleColumnManager,layoutView=me.grid.lockable?me.grid:me.view,gridRow,rowIdx,colIdx,result;if(!layoutView.componentLayoutCounter){layoutView.on({boxready:Ext.Function.bind(me.startEdit,me,[record,columnHeader]),single:!0});return}
if(me.disabled||me.grid.collapsed||!me.grid.view.isVisible(!0)){return}
if(Ext.isNumber(columnHeader)){columnHeader=colMgr.getHeaderAtIndex(Math.min(columnHeader,colMgr.getColumns().length))}
if(!columnHeader){return}
if(columnHeader.hidden){columnHeader=columnHeader.next(':not([hidden])')||columnHeader.prev(':not([hidden])')}
if(!view){view=columnHeader.getView()}
grid=view.ownerCt;if(Ext.isNumber(record)){rowIdx=Math.min(record,view.dataSource.getCount()-1);record=view.dataSource.getAt(rowIdx)}else{rowIdx=view.dataSource.indexOf(record)}
grid.ensureVisible(record,{column:horizontalScroll?columnHeader:null});gridRow=view.getRow(record);if(!gridRow){return}
colIdx=view.getVisibleColumnManager().indexOf(columnHeader);if(!record){return}
result=new Ext.grid.CellContext(view).setAll(view,rowIdx,colIdx,record,columnHeader);result.grid=grid;result.store=view.dataSource;result.field=columnHeader.dataIndex;result.value=result.originalValue=record.get(columnHeader.dataIndex);result.row=gridRow;result.node=view.getNode(record);result.cell=result.getCell(!0);return result},cancelEdit:function(){var me=this;me.editing=!1;me.fireEvent('canceledit',me,me.context)},completeEdit:function(){var me=this;if(me.editing&&me.validateEdit()){me.fireEvent('edit',me,me.context)}
me.context=null;me.editing=!1},validateEdit:function(context){var me=this;return me.fireEvent('validateedit',me,context)!==!1&&!context.cancel}})
;
Ext.define('Ext.grid.plugin.CellEditing',{alias:'plugin.cellediting',extend:'Ext.grid.plugin.Editing',requires:['Ext.grid.CellEditor','Ext.util.DelayedTask'],restartEvent:null,cachedEditorValue:null,init:function(grid){var me=this;grid.registerActionable(me);me.callParent(arguments);me.editors=new Ext.util.MixedCollection(!1,function(editor){return editor.editorId})},beforeGridHeaderDestroy:function(headerCt){var me=this,columns=me.grid.getColumnManager().getColumns(),len=columns.length,i,column,editor;for(i=0;i<len;i++){column=columns[i];editor=me.editors.getByKey(column.getItemId());if(!editor){editor=column.editor||column.field}
Ext.destroy(editor);me.removeFieldAccessors(column)}},onReconfigure:function(grid,store,columns){if(columns){this.destroyEditors()}
this.callParent()},destroy:function(){var me=this;me.destroyEditors();if(me.restartEvent){me.restartEvent=me.cachedEditorValue=Ext.destroy(me.restartEvent)}
me.callParent()},initCancelTriggers:function(){var me=this,grid=me.grid;me.mon(grid,{columnresize:me.cancelEdit,columnmove:me.cancelEdit,scope:me})},isCellEditable:function(record,columnHeader){var me=this,context=me.getEditingContext(record,columnHeader);if(context.view.isVisible(!0)&&context){columnHeader=context.column;record=context.record;if(columnHeader&&me.getEditor(record,columnHeader)){return!0}}},activateCell:function(position,skipBeforeCheck,doFocus){var me=this,record=position.record,column=position.column,prevEditor=me.getActiveEditor(),view=me.view,isResuming=me.restartEvent!=null,context,contextGeneration,cell,editor,p,editValue,abortEdit;if(isResuming){me.restartEvent=Ext.destroy(me.restartEvent)}
context=me.getEditingContext(record,column);if(!context||!column.getEditor(record)){return}
if(prevEditor&&prevEditor.editing){view.actionPosition=null;contextGeneration=context.generation;if(prevEditor.completeEdit()===!1){return}
if(context.generation===contextGeneration){context.refresh()}}
if(!skipBeforeCheck){contextGeneration=context.generation;if(view.actionableMode){view.skipSaveFocusState=!0}
abortEdit=me.beforeEdit(context)===!1||me.fireEvent('beforeedit',me,context)===!1||context.cancel;view.skipSaveFocusState=!1;if(abortEdit){return}
if(context.generation===contextGeneration){context.refresh()}}
editor=me.getEditor(record,column);if(context.cell!==context.getCell(!0)){context=me.getEditingContext(context.rowIdx,context.colIdx,null,context.view);position.setPosition(context)}
if(editor){cell=Ext.get(context.cell);if(!editor.rendered){editor.hidden=!0;editor.render(cell)}else{p=editor.el.dom.parentNode;if(p!==cell.dom){try{p.removeChild(editor.el.dom)}catch(e){}
if(editor.container&&editor.container.dom!==cell.dom){editor.container.collect()}
editor.container=cell;cell.dom.appendChild(editor.el.dom,cell.dom.firstChild)}}
editValue=context.record.get(context.column.dataIndex);if(editValue!==context.originalValue){context.value=context.originalValue=editValue}
me.setEditingContext(context);editor.startEdit(cell,context.value,(doFocus&&!isResuming)||!1,isResuming);if(editor.editing){me.setActiveEditor(editor);me.setActiveRecord(context.record);me.setActiveColumn(context.column);me.editing=!0;me.scroll=position.view.el.getScroll();if(isResuming){editor.setValue(me.cachedEditorValue);me.cachedEditorValue=null}}
return editor.editing}},activateRow:Ext.emptyFn,deactivate:function(){var me=this,context=me.context,editors=me.editors.items,len=editors.length,editor,i,callback;for(i=0;i<len;i++){editor=editors[i];if(context.view.renderingRows&&!me.suspendedEditor){if(editor.editing){me.suspendedEditor=editor;me.cachedEditorValue=editor.getValue();callback=function(){var ctx;if(me.suspendedEditor){ctx=me.suspendedEditor.context;if(me.view.getNode(ctx.record)){me.view.ownerGrid.setActionableMode(!0,ctx);me.suspendedEditor=null}}else{me.restartEvent=Ext.destroy(me.restartEvent);me.cachedEditorValue=null}};me.cancelEdit(editor);me.restartEvent=me.view.on({itemadd:callback,destroyable:!0})}
editor.cacheElement(!0)}}},suspend:function(){var me=this,editor=me.activeEditor;if(editor&&editor.editing){me.suspendedEditor=editor;me.suspendEvents();editor.suspendEvents();editor.cancelEdit(!0);editor.resumeEvents();me.resumeEvents()}},resume:function(position){var me=this,editor=me.activeEditor=me.suspendedEditor,result;if(editor){me.suspendEvents();editor.suspendEvents();result=me.activateCell(position,!0,!0);editor.resumeEvents();me.resumeEvents();me.suspendedEditor=null}
return result},startEdit:function(record,columnHeader){this.startEditByPosition(new Ext.grid.CellContext(this.view).setPosition(record,columnHeader))},completeEdit:function(remainVisible){var activeEd=this.getActiveEditor();if(activeEd){activeEd.completeEdit(remainVisible)}},setEditingContext:function(context){this.context=context},setActiveEditor:function(ed){this.activeEditor=ed},getActiveEditor:function(){return this.activeEditor},setActiveColumn:function(column){this.activeColumn=column},getActiveColumn:function(){return this.activeColumn},setActiveRecord:function(record){this.activeRecord=record},getActiveRecord:function(){return this.activeRecord},getEditor:function(record,column){return this.getCachedEditor(column.getItemId(),record,column)},getCachedEditor:function(editorId,record,column){var me=this,editors=me.editors,editor=editors.getByKey(editorId);if(!editor){editor=column.getEditor(record);if(!editor){return!1}
if(!(editor instanceof Ext.grid.CellEditor)){editor=Ext.widget(Ext.apply({xtype:'celleditor',floating:!0,editorId:editorId,field:editor},editor.editorCfg))}
editor.field.excludeForm=!0;if(editor.column!==column){editor.column=column;column.on('removed',me.onColumnRemoved,me)}
editors.add(editor)}
editor.ownerCmp=me.grid.ownerGrid;if(column.isTreeColumn){editor.isForTree=column.isTreeColumn;editor.addCls(Ext.baseCSSPrefix+'tree-cell-editor')}
editor.setGrid(me.grid);editor.editingPlugin=me;editor.collectContainerElement=!0;return editor},onColumnRemoved:function(column){var me=this,context=me.context;if(context&&context.column===column){me.cancelEdit()}
column.un('removed',me.onColumnRemoved,me)},setColumnField:function(column,field){var ed=this.editors.getByKey(column.getItemId());Ext.destroy(ed,column.field);this.editors.removeAtKey(column.getItemId());this.callParent(arguments)},getCell:function(record,column,returnElement){return this.grid.getView().getCell(record,column,returnElement)},onEditComplete:function(ed,value,startValue){var me=this,context=ed.context,view,record;view=context.view;record=context.record;context.value=value;if(!record.isEqual(value,startValue)){view.skipSaveFocusState=!0;record.set(context.column.dataIndex,value);view.skipSaveFocusState=!1;context.rowIdx=view.indexOf(record)}
if(me.context===context){me.setActiveEditor(null);me.setActiveColumn(null);me.setActiveRecord(null);me.editing=!1}
me.fireEvent('edit',me,context)},cancelEdit:function(activeEd){var me=this,context=me.context;if(activeEd&&activeEd.isCellEditor){me.context.value=('editedValue' in activeEd)?activeEd.editedValue:activeEd.getValue();me.callParent(arguments);if(activeEd.context===context){me.setActiveEditor(null);me.setActiveColumn(null);me.setActiveRecord(null)}else{me.editing=!0}}else{activeEd=me.getActiveEditor();if(activeEd&&activeEd.field){activeEd.cancelEdit()}}},startEditByPosition:function(position){var me=this,cm=me.grid.getColumnManager(),index,activeEditor=me.getActiveEditor();if(!position.isCellContext){position=new Ext.grid.CellContext(me.view).setPosition(position.row,me.grid.getColumnManager().getColumns()[position.column])}
index=cm.getHeaderIndex(position.column);position.column=cm.getVisibleHeaderClosestToIndex(index);if(me.grid.actionableMode){if(me.editing&&position.isEqual(me.context)){return}
if(activeEditor){activeEditor.completeEdit()}}
if(me.grid.actionableMode){if(me.activateCell(position)){me.activateRow(me.view.all.item(position.rowIdx,!0));activeEditor=me.getEditor(position.record,position.column);if(activeEditor){activeEditor.field.focus()}}}else{return me.grid.setActionableMode(!0,position)}},destroyEditors:function(){var me=this,editors=me.editors;if(editors){editors.each(Ext.destroy,Ext);editors.clear()}}})
;
Ext.define('Ext.grid.plugin.Clipboard',{extend:'Ext.plugin.AbstractClipboard',alias:'plugin.clipboard',requires:['Ext.util.Format','Ext.util.TSV'],formats:{cell:{get:'getCells'},html:{get:'getCellData'},raw:{get:'getCellData',put:'putCellData'}},gridListeners:{render:'onCmpReady'},getCellData:function(format,erase){var cmp=this.getCmp(),selection=cmp.getSelectionModel().getSelected(),ret=[],isRaw=format==='raw',isText=format==='text',viewNode,cell,data,dataIndex,lastRecord,column,record,row,view;if(selection){selection.eachCell(function(cellContext){column=cellContext.column;view=cellContext.column.getView();record=cellContext.record;if(column.ignoreExport){return}
if(lastRecord!==record){lastRecord=record;ret.push(row=[])}
dataIndex=column.dataIndex;if(isRaw){data=record.data[dataIndex]}else{viewNode=view.all.item(cellContext.rowIdx);if(!viewNode){viewNode=Ext.fly(view.createRowElement(record,cellContext.rowIdx))}
cell=viewNode.dom.querySelector(column.getCellInnerSelector());data=cell.innerHTML;if(isText){data=Ext.util.Format.stripTags(data)}}
row.push(data);if(erase&&dataIndex){record.set(dataIndex,null)}})}
return Ext.util.TSV.encode(ret,undefined,null)},getCells:function(format,erase){var cmp=this.getCmp(),selection=cmp.getSelectionModel().getSelected(),ret=[],dataIndex,lastRecord,record,row;if(selection){selection.eachCell(function(cellContext){record=cellContext.record;if(lastRecord!==record){lastRecord=record;ret.push(row={model:record.self,fields:[]})}
dataIndex=cellContext.column.dataIndex;row.fields.push({name:dataIndex,value:record.data[dataIndex]});if(erase&&dataIndex){record.set(dataIndex,null)}})}
return ret},getTextData:function(format,erase){return this.getCellData(format,erase)},putCellData:function(data,format){var values=Ext.util.TSV.decode(data,undefined,null),row,recCount=values.length,colCount=recCount?values[0].length:0,sourceRowIdx,sourceColIdx,view=this.getCmp().getView(),maxRowIdx=view.dataSource.getCount()-1,maxColIdx=view.getVisibleColumnManager().getColumns().length-1,selModel=view.getSelectionModel(),selected=selModel.getSelected(),navModel=view.getNavigationModel(),destination=selected.startCell||navModel.getPosition(),dataIndex,destinationStartColumn,dataObject={};if(!destination&&selected){selected.eachCell(function(c){destination=c;return!1})}
if(destination){destination=new Ext.grid.CellContext(view).setPosition(destination.record,destination.column)}else{destination=new Ext.grid.CellContext(view).setPosition(0,0)}
destinationStartColumn=destination.colIdx;for(sourceRowIdx=0;sourceRowIdx<recCount;sourceRowIdx++){row=values[sourceRowIdx];for(sourceColIdx=0;sourceColIdx<colCount;sourceColIdx++){dataIndex=destination.column.dataIndex;if(dataIndex){switch(format){case 'raw':dataObject[dataIndex]=row[sourceColIdx];break;case 'text':dataObject[dataIndex]=row[sourceColIdx];break;case 'html':break}}
if(destination.colIdx===maxColIdx){break}
destination.setColumn(destination.colIdx+1)}
destination.record.set(dataObject);if(destination.rowIdx===maxRowIdx){break}
destination.setPosition(destination.rowIdx+1,destinationStartColumn)}},putTextData:function(data,format){this.putCellData(data,format)},getTarget:function(comp){return comp.body},privates:{validateAction:function(event){var view=this.getCmp().getView();if(view.actionableMode){return!1}}}})
;
Ext.define('Ext.grid.plugin.DragDrop',{extend:'Ext.plugin.Abstract',alias:'plugin.gridviewdragdrop',uses:['Ext.view.DragZone','Ext.grid.ViewDropZone'],dragText:'{0} selected row{1}',ddGroup:"GridDD",enableDrop:!0,enableDrag:!0,containerScroll:!1,init:function(view){Ext.applyIf(view,{copy:this.copy,allowCopy:this.allowCopy});view.on('render',this.onViewRender,this,{single:!0})},destroy:function(){var me=this;me.dragZone=me.dropZone=Ext.destroy(me.dragZone,me.dropZone);me.callParent()},enable:function(){var me=this;if(me.dragZone){me.dragZone.unlock()}
if(me.dropZone){me.dropZone.unlock()}
me.callParent()},disable:function(){var me=this;if(me.dragZone){me.dragZone.lock()}
if(me.dropZone){me.dropZone.lock()}
me.callParent()},onViewRender:function(view){var me=this,ownerGrid=view.ownerCt.ownerGrid||view.ownerCt,dragZone=me.dragZone||{};ownerGrid.relayEvents(view,['beforedrop','drop']);if(me.enableDrag){if(me.containerScroll){dragZone.scrollEl=view.getEl();dragZone.containerScroll=!0}
me.dragZone=new Ext.view.DragZone(Ext.apply({view:view,ddGroup:me.dragGroup||me.ddGroup,dragText:me.dragText},dragZone))}
if(me.enableDrop){me.dropZone=new Ext.grid.ViewDropZone(Ext.apply({view:view,ddGroup:me.dropGroup||me.ddGroup},me.dropZone))}}})
;
Ext.define('Ext.grid.plugin.RowEditing',{extend:'Ext.grid.plugin.Editing',alias:'plugin.rowediting',requires:['Ext.grid.RowEditor'],lockableScope:'top',editStyle:'row',autoCancel:!0,autoUpdate:!1,errorSummary:!0,formAriaLabel:'Editing row {0}',formAriaLabelRowBase:2,constructor:function(){var me=this;me.callParent(arguments);if(!me.clicksToMoveEditor){me.clicksToMoveEditor=me.clicksToEdit}
me.autoCancel=!!me.autoCancel;me.autoUpdate=!!me.autoUpdate;if(me.autoUpdate){me.autoCancel=!1}},init:function(grid){this.callParent([grid]);if(grid.lockedGrid){grid.lockedGrid.registerActionable(this);grid.normalGrid.registerActionable(this)}else{grid.registerActionable(this)}},destroy:function(){Ext.destroy(this.editor);this.callParent()},onBeforeReconfigure:function(){this.callParent(arguments);this.cancelEdit()},onReconfigure:function(grid,store,columns){var ed=this.editor;this.callParent(arguments);if(columns&&ed&&ed.rendered){ed.needsSyncFieldWidths=!0}},shouldStartEdit:function(editor){return!0},startEdit:function(record,columnHeader){var me=this,editor=me.getEditor(),context;if(Ext.isEmpty(columnHeader)){columnHeader=me.grid.getTopLevelVisibleColumnManager().getHeaderAtIndex(0)}
if(editor.beforeEdit()!==!1){context=me.getEditingContext(record,columnHeader,!0);if(context&&me.beforeEdit(context)!==!1&&me.fireEvent('beforeedit',me,context)!==!1&&!context.cancel){me.context=context;if(me.lockingPartner){me.lockingPartner.cancelEdit()}
editor.startEdit(context.record,context.column,context);me.editing=!0;return!0}}
return!1},activateCell:function(pos){if(!pos.getCell(!0).querySelector('[tabIndex="-1"]')){this.startEdit(pos.record,pos.column);return!0}},suspend:Ext.emptyFn,resume:Ext.emptyFn,onEnterKey:function(e){var me=this,targetComponent;if(!me.grid.ownerGrid.actionableMode&&me.editing){targetComponent=Ext.getCmp(e.getTarget().getAttribute('componentId'));if(!(targetComponent&&targetComponent.isPickerField&&targetComponent.isExpanded)){me.completeEdit()}}},cancelEdit:function(){var me=this;if(me.editing){me.getContextFieldValues();me.getEditor().cancelEdit();me.callParent(arguments);return}
return!0},completeEdit:function(){var me=this,context=me.context;if(me.editing&&me.validateEdit(context)){me.editing=!1;me.fireEvent('edit',me,context)}},validateEdit:function(){this.getContextFieldValues();return this.callParent(arguments)&&this.getEditor().completeEdit()},getEditor:function(){var me=this;if(!me.editor){me.editor=me.initEditor()}
return me.editor},getContextFieldValues:function(){var editor=this.editor,context=this.context,record=context.record,newValues={},originalValues={},editors=editor.query('>[isFormField]'),len=editors.length,i,name,item;for(i=0;i<len;i++){item=editors[i];name=item.dataIndex;newValues[name]=item.getValue();originalValues[name]=record.get(name)}
Ext.apply(context,{newValues:newValues,originalValues:originalValues})},initEditor:function(){return new Ext.grid.RowEditor(this.initEditorConfig())},initEditorConfig:function(){var me=this,grid=me.grid,view=me.view,headerCt=grid.headerCt,btns=['saveBtnText','cancelBtnText','errorsText','dirtyText'],b,bLen=btns.length,cfg={autoCancel:me.autoCancel,autoUpdate:me.autoUpdate,removeUnmodified:me.removeUnmodified,errorSummary:me.errorSummary,formAriaLabel:me.formAriaLabel,formAriaLabelRowBase:me.formAriaLabelRowBase+(grid.hideHeaders?-1:0),fields:headerCt.getGridColumns(),hidden:!0,view:view,editingPlugin:me},item;for(b=0;b<bLen;b++){item=btns[b];if(Ext.isDefined(me[item])){cfg[item]=me[item]}}
return cfg},initEditTriggers:function(){var me=this,view=me.view,moveEditorEvent=me.clicksToMoveEditor===1?'click':'dblclick';me.callParent(arguments);if(me.clicksToMoveEditor!==me.clicksToEdit){me.mon(view,'cell'+moveEditorEvent,me.moveEditorByClick,me)}
view.on({render:function(){me.mon(me.grid.headerCt,{scope:me,columnresize:me.onColumnResize,columnhide:me.onColumnHide,columnshow:me.onColumnShow})},single:!0})},moveEditorByClick:function(){var me=this;if(me.editing){me.superclass.onCellClick.apply(me,arguments)}},onColumnAdd:function(ct,column,pos){var me=this,editor;if(column.isHeader){me.initFieldAccessors(column);editor=me.editor;if(editor){editor.onColumnAdd(column,pos)}}},beforeGridHeaderDestroy:function(headerCt){var columns=this.grid.getColumnManager().getColumns(),len=columns.length,i,column,field;for(i=0;i<len;i++){column=columns[i];if(column.hasEditor){if(column.hasEditor()&&(field=column.getEditor())){field.destroy()}
this.removeFieldAccessors(column)}}},onColumnResize:function(ct,column,width){var me=this,editor;if(column.isHeader){editor=me.getEditor();if(editor){editor.onColumnResize(column,width)}}},onColumnHide:function(ct,column){var me=this,editor=me.getEditor();if(editor){editor.onColumnHide(column)}},onColumnShow:function(ct,column){var me=this,editor=me.getEditor();if(editor){editor.onColumnShow(column)}},onColumnMove:function(ct,column,fromIdx,toIdx){var me=this,editor=me.getEditor();me.initFieldAccessors(column);if(editor){editor.onColumnMove(column,fromIdx,toIdx)}},setColumnField:function(column,field){var me=this,editor=me.getEditor();if(editor){editor.destroyColumnEditor(column)}
me.callParent(arguments);if(editor){editor.insertColumnEditor(column)}},createColumnField:function(column,defaultField){var editor=this.editor,def,field;if(editor){def=editor.getDefaultFieldCfg()}
field=this.callParent([column,defaultField||def]);if(field){field.skipLabelForAttribute=!0;field.ariaAttributes=field.ariaAttributes||{};if(this.grid.hideHeaders){field.ariaAttributes['aria-label']=column.text}else{field.ariaAttributes['aria-labelledby']=column.id}}
return field}})
;
Ext.define('Ext.rtl.grid.plugin.RowEditing',{override:'Ext.grid.plugin.RowEditing',initEditorConfig:function(){var cfg=this.callParent();cfg.rtl=this.grid.getInherited().rtl;return cfg}})
;
Ext.define('Ext.grid.plugin.RowExpander',{extend:'Ext.plugin.Abstract',lockableScope:'top',requires:['Ext.grid.feature.RowBody'],alias:'plugin.rowexpander',columnWidth:24,rowBodyTpl:null,lockedTpl:null,expandOnDblClick:!0,selectRowOnExpand:!1,scrollIntoViewOnExpand:!0,headerWidth:24,bodyBefore:!1,rowBodyTrSelector:'.'+Ext.baseCSSPrefix+'grid-rowbody-tr',rowBodyHiddenCls:Ext.baseCSSPrefix+'grid-row-body-hidden',rowCollapsedCls:Ext.baseCSSPrefix+'grid-row-collapsed',addCollapsedCls:{fn:function(out,values,parent){var me=this.rowExpander;if(!me.recordsExpanded[values.record.internalId]){values.itemClasses.push(me.rowCollapsedCls)}
this.nextTpl.applyOut(values,out,parent)},syncRowHeights:function(lockedItem,normalItem){this.rowExpander.syncRowHeights(lockedItem,normalItem)},priority:20000},setCmp:function(grid){var me=this,features;me.callParent([grid]);me.recordsExpanded={};if(!me.rowBodyTpl){Ext.raise("The 'rowBodyTpl' config is required and is not defined.")}
me.rowBodyTpl=Ext.XTemplate.getTpl(me,'rowBodyTpl');features=me.getFeatureConfig(grid);if(grid.features){grid.features=Ext.Array.push(features,grid.features)}else{grid.features=features}},getFeatureConfig:function(grid){var me=this,features=[],featuresCfg={ftype:'rowbody',rowExpander:me,rowIdCls:me.rowIdCls,bodyBefore:me.bodyBefore,recordsExpanded:me.recordsExpanded,rowBodyHiddenCls:me.rowBodyHiddenCls,rowCollapsedCls:me.rowCollapsedCls,setupRowData:me.getRowBodyFeatureData,setup:me.setup};features.push(Ext.apply({lockableScope:'normal',getRowBodyContents:me.getRowBodyContentsFn(me.rowBodyTpl)},featuresCfg));if(grid.enableLocking){features.push(Ext.apply({lockableScope:'locked',getRowBodyContents:me.lockedTpl?me.getRowBodyContentsFn(me.lockedTpl):function(){return''}},featuresCfg))}
return features},getRowBodyContentsFn:function(rowBodyTpl){var me=this;return function(rowValues){rowBodyTpl.owner=me;return rowBodyTpl.applyTemplate(rowValues.record.getData())}},init:function(grid){var me=this,ownerLockable=grid.lockable&&grid,view,lockedView,normalView;if(ownerLockable){me.lockedGrid=ownerLockable.lockedGrid;me.normalGrid=ownerLockable.normalGrid;lockedView=me.lockedView=me.lockedGrid.getView();normalView=me.normalView=me.normalGrid.getView()}
me.callParent([grid]);me.grid=grid;view=me.view=grid.getView();if(ownerLockable){me.bindView(lockedView);me.bindView(normalView);me.addExpander(me.lockedGrid.headerCt.items.getCount()?me.lockedGrid:me.normalGrid);lockedView.addRowTpl(me.addCollapsedCls).rowExpander=normalView.addRowTpl(me.addCollapsedCls).rowExpander=lockedView.rowExpander=normalView.rowExpander=me;ownerLockable.mon(ownerLockable,{processcolumns:me.onLockableProcessColumns,lockcolumn:me.onColumnLock,unlockcolumn:me.onColumnUnlock,scope:me})}else{me.bindView(view);view.addRowTpl(me.addCollapsedCls).rowExpander=view.rowExpander=me;me.addExpander(grid);grid.on('beforereconfigure',me.beforeReconfigure,me)}},onItemAdd:function(newRecords,startIndex,newItems){var me=this,ownerLockable=me.grid.lockable,len=newItems.length,record,i;for(i=0;i<len;i++){record=newRecords[i];if(!record.isNonData&&me.recordsExpanded[record.internalId]){if(ownerLockable){me.grid.syncRowHeightOnNextLayout=!0}
return}}},beforeReconfigure:function(grid,store,columns,oldStore,oldColumns){var me=this;if(columns){me.expanderColumn=new Ext.grid.column.Column(me.getHeaderConfig());columns.unshift(me.expanderColumn)}},onLockableProcessColumns:function(lockable,lockedHeaders,normalHeaders){this.addExpander(lockedHeaders.length?lockable.lockedGrid:lockable.normalGrid)},addExpander:function(expanderGrid){var me=this,selModel=expanderGrid.getSelectionModel(),checkBoxPosition=selModel.injectCheckbox;me.expanderColumn=expanderGrid.headerCt.insert(0,me.getHeaderConfig());if(checkBoxPosition===0||checkBoxPosition==='first'){checkBoxPosition=1}
selModel.injectCheckbox=checkBoxPosition},getRowBodyFeatureData:function(record,idx,rowValues){var me=this;me.self.prototype.setupRowData.apply(me,arguments);rowValues.rowBody=me.getRowBodyContents(rowValues);rowValues.rowBodyCls=me.recordsExpanded[record.internalId]?'':me.rowBodyHiddenCls},bindView:function(view){var me=this,listeners={itemkeydown:me.onKeyDown,scope:me};if(me.expandOnDblClick){listeners.itemdblclick=me.onDblClick}
if(me.grid.lockable){listeners.itemadd=me.onItemAdd}
view.on(listeners)},onKeyDown:function(view,record,row,rowIdx,e){var me=this,key=e.getKey(),pos=view.getNavigationModel().getPosition(),isCollapsed;if(pos){row=Ext.fly(row);isCollapsed=row.hasCls(me.rowCollapsedCls);if(((key===107||(key===187&&e.shiftKey))&&isCollapsed)||((key===109||key===189)&&!isCollapsed)){me.toggleRow(rowIdx,record)}}},onDblClick:function(view,record,row,rowIdx,e){this.toggleRow(rowIdx,record)},toggleRow:function(rowIdx,record){var me=this,view=me.normalView||me.view,fireView=view,rowNode=view.getNode(rowIdx),normalRow=Ext.fly(rowNode),lockedRow,nextBd=normalRow.down(me.rowBodyTrSelector,!0),wasCollapsed=normalRow.hasCls(me.rowCollapsedCls),addOrRemoveCls=wasCollapsed?'removeCls':'addCls',ownerLockable=me.grid.lockable&&me.grid;normalRow[addOrRemoveCls](me.rowCollapsedCls);Ext.fly(nextBd)[addOrRemoveCls](me.rowBodyHiddenCls);me.recordsExpanded[record.internalId]=wasCollapsed;Ext.suspendLayouts();if(ownerLockable){fireView=ownerLockable.getView();if(me.lockedGrid.isVisible()){view=me.lockedView;view.lockingPartner.updateLayout();lockedRow=Ext.fly(view.getNode(rowIdx));if(lockedRow){lockedRow[addOrRemoveCls](me.rowCollapsedCls);nextBd=lockedRow.down(me.rowBodyTrSelector,!0);Ext.fly(nextBd)[addOrRemoveCls](me.rowBodyHiddenCls)}}
ownerLockable.syncRowHeightOnNextLayout=!0}
fireView.fireEvent(wasCollapsed?'expandbody':'collapsebody',rowNode,record,nextBd);view.refreshSize(!0);Ext.resumeLayouts(!0);if(me.scrollIntoViewOnExpand&&wasCollapsed){me.grid.ensureVisible(rowIdx)}},syncRowHeights:function(lockedItem,normalItem){var me=this,lockedBd=Ext.fly(lockedItem).down(me.rowBodyTrSelector),normalBd=Ext.fly(normalItem).down(me.rowBodyTrSelector),lockedHeight,normalHeight;if(normalBd.isVisible()){if((lockedHeight=lockedBd.getHeight())!==(normalHeight=normalBd.getHeight())){if(lockedHeight>normalHeight){normalBd.setHeight(lockedHeight)}else{lockedBd.setHeight(normalHeight)}}}else{lockedBd.dom.style.height=normalBd.dom.style.height=''}},onColumnUnlock:function(lockable,column){var me=this,lockedColumns;lockable=lockable||me.grid;lockedColumns=lockable.lockedGrid.visibleColumnManager.getColumns();if(lockedColumns.length===1){lockable.normalGrid.removeCls(Ext.baseCSSPrefix+'grid-hide-row-expander-spacer');lockable.lockedGrid.addCls(Ext.baseCSSPrefix+'grid-hide-row-expander-spacer');if(lockedColumns[0]===me.expanderColumn){lockable.unlock(me.expanderColumn)}else{lockable.lock(me.expanderColumn,0)}}},onColumnLock:function(lockable,column){var me=this,lockedColumns;lockable=lockable||me.grid;lockedColumns=me.lockedGrid.visibleColumnManager.getColumns();if(lockedColumns.length===1){me.lockedGrid.headerCt.insert(0,me.expanderColumn);lockable.normalGrid.addCls(Ext.baseCSSPrefix+'grid-hide-row-expander-spacer');lockable.lockedGrid.removeCls(Ext.baseCSSPrefix+'grid-hide-row-expander-spacer')}},getHeaderConfig:function(){var me=this,lockable=me.grid.lockable&&me.grid;return{width:me.headerWidth,ignoreExport:!0,lockable:!1,autoLock:!0,sortable:!1,resizable:!1,draggable:!1,hideable:!1,menuDisabled:!0,tdCls:Ext.baseCSSPrefix+'grid-cell-special',innerCls:Ext.baseCSSPrefix+'grid-cell-inner-row-expander',renderer:function(){return'<div class="'+Ext.baseCSSPrefix+'grid-row-expander" role="presentation" tabIndex="0"></div>'},processEvent:function(type,view,cell,rowIndex,cellIndex,e,record){var isTouch=e.pointerType==='touch',isExpanderClick=!!e.getTarget('.'+Ext.baseCSSPrefix+'grid-row-expander');if((type==="click"&&isExpanderClick)||(type==='keydown'&&e.getKey()===e.SPACE)){if(isTouch){cell.focus()}
me.toggleRow(rowIndex,record,e);e.stopSelection=!me.selectRowOnExpand}else if(e.type==='mousedown'&&!isTouch&&isExpanderClick){e.preventDefault()}},isLocked:function(){return lockable&&(lockable.lockedGrid.isVisible()||this.locked)},editRenderer:function(){return'&#160;'}}}})
;
Ext.define('Ext.theme.triton.grid.plugin.RowExpander',{override:'Ext.grid.plugin.RowExpander',headerWidth:32})
;
Ext.define('Ext.grid.plugin.RowWidget',{extend:'Ext.grid.plugin.RowExpander',alias:'plugin.rowwidget',mixins:['Ext.mixin.Identifiable','Ext.mixin.StyleCacher'],lockableScope:'top',config:{defaultWidgetUI:{}},widget:null,lockedWidget:null,addCollapsedCls:{fn:function(out,values,parent){var me=this.rowExpander;if(!me.recordsExpanded[values.record.internalId]){values.itemClasses.push(me.rowCollapsedCls)}
this.nextTpl.applyOut(values,out,parent)},priority:20000},setCmp:function(grid){var me=this,features,widget;me.rowIdCls=Ext.id(null,Ext.baseCSSPrefix+'rowwidget-');me.recordsExpanded={};Ext.plugin.Abstract.prototype.setCmp.apply(me,arguments);widget=me.widget;if(!widget||widget.isComponent){Ext.raise('RowWidget requires a widget configuration.')}
me.widget=widget=Ext.apply({},widget);if(!widget.ui){widget.ui=me.getDefaultWidgetUI()[widget.xtype]||'default'}
if(grid.enableLocking&&me.lockedWidget){me.lockedWidget=widget=Ext.apply({},me.lockedWidget);if(!widget.ui){widget.ui=me.getDefaultWidgetUI()[widget.xtype]||'default'}}
features=me.getFeatureConfig(grid);if(grid.features){grid.features=Ext.Array.push(features,grid.features)}else{grid.features=features}},getFeatureConfig:function(grid){var me=this,features=[],featuresCfg={ftype:'rowbody',rowExpander:me,doSync:!1,rowIdCls:me.rowIdCls,bodyBefore:me.bodyBefore,recordsExpanded:me.recordsExpanded,rowBodyHiddenCls:me.rowBodyHiddenCls,rowCollapsedCls:me.rowCollapsedCls,setupRowData:me.setupRowData,setup:me.setup,onClick:Ext.emptyFn};features.push(Ext.apply({lockableScope:'normal'},featuresCfg));if(grid.enableLocking){features.push(Ext.apply({lockableScope:'locked'},featuresCfg))}
return features},setupRowData:function(record,rowIndex,rowValues){var me=this.rowExpander;me.rowBodyFeature=this;rowValues.rowBodyCls=me.recordsExpanded[record.internalId]?'':me.rowBodyHiddenCls},bindView:function(view){var me=this;me.viewListeners=view.on({refresh:me.onViewRefresh,itemadd:me.onItemAdd,scope:me,destroyable:!0});Ext.override(view,me.viewOverrides)},destroy:function(){var me=this,id=me.getId();me.viewListeners.destroy();if(me.grid.lockable){me.grid.destroyManagedWidgets(id+'-'+me.lockedView.getId());me.grid.destroyManagedWidgets(id+'-'+me.normalView.getId())}else{me.grid.destroyManagedWidgets(id+'-'+me.view.getId())}
me.callParent()},privates:{viewOverrides:{handleEvent:function(e){if(e.getTarget('.'+this.rowExpander.rowIdCls,this.body)){return}
this.callParent([e])},onFocusEnter:function(e){if(e.event.getTarget('.'+this.rowExpander.rowIdCls,this.body)){return}
this.callParent([e])},toggleChildrenTabbability:function(enableTabbing){var focusEl=this.getTargetEl(),rows=this.all,restoreOptions={skipSelf:!0},saveOptions={skipSelf:!0,includeSaved:!1},i;for(i=rows.startIndex;i<=rows.endIndex;i++){focusEl=Ext.fly(this.getRow(rows.item(i)));if(!focusEl){continue}
if(enableTabbing){focusEl.restoreTabbableState(restoreOptions)}else{focusEl.saveTabbableState(saveOptions)}}}},destroyLiveWidget:function(recId,widget){widget.destroy()},destroyFreeWidget:function(widget){widget.destroy()},onItemAdd:function(newRecords,startIndex,newItems,view){var me=this,len=newItems.length,i,record,ownerLockable=me.grid.lockable;Ext.suspendLayouts();for(i=0;i<len;i++){record=newRecords[i];if(!record.isNonData&&me.recordsExpanded[record.internalId]){if(ownerLockable){me.grid.syncRowHeightOnNextLayout=!0}
me.addWidget(view,record)}}
Ext.resumeLayouts(!0)},onViewRefresh:function(view,records){var me=this,rows=view.all,itemIndex,recordIndex;Ext.suspendLayouts();for(itemIndex=rows.startIndex,recordIndex=0;itemIndex<=rows.endIndex;itemIndex++,recordIndex++){if(me.recordsExpanded[records[recordIndex].internalId]){me.addWidget(view,records[recordIndex])}}
Ext.resumeLayouts(!0)},returnFalse:function(){return!1},getWidget:function(view,record){var me=this,result,widget;if(record){widget=me.grid.lockable&&view===me.lockedView?me.lockedWidget:me.widget;if(widget){result=me.grid.createManagedWidget(view,me.getId()+'-'+view.getId(),widget,record);result.measurer=me;result.ownerLayout=view.componentLayout}}
return result},addWidget:function(view,record){var me=this,target,width,widget,hasAttach=!!me.onWidgetAttach,isFixedSize=me.isFixedSize,el;if(record.isNonData||!me.recordsExpanded[record.internalId]){return}
target=Ext.fly(view.getNode(record).querySelector(me.rowBodyFeature.innerSelector));width=target.getWidth(!0)-target.getPadding('lr');widget=me.getWidget(view,record);if(widget){if(hasAttach){Ext.callback(me.onWidgetAttach,me.scope,[me,widget,record],0,me)}
el=widget.el||widget.element;if(el){target.dom.appendChild(el.dom);if(!isFixedSize&&widget.width!==width){widget.setWidth(width)}else{widget.updateLayout()}
widget.reattachToBody()}else{if(!isFixedSize){widget.width=width}
widget.render(target)}
widget.updateLayout()}
return widget},toggleRow:function(rowIdx,record){var me=this,view=me.normalView||me.view,rowNode=view.getNode(rowIdx),normalRow=Ext.fly(rowNode),lockedRow,nextBd=normalRow.down(me.rowBodyTrSelector,!0),wasCollapsed=normalRow.hasCls(me.rowCollapsedCls),addOrRemoveCls=wasCollapsed?'removeCls':'addCls',ownerLockable=me.grid.lockable&&me.grid,widget,vm;normalRow[addOrRemoveCls](me.rowCollapsedCls);Ext.fly(nextBd)[addOrRemoveCls](me.rowBodyHiddenCls);Ext.suspendLayouts();if(wasCollapsed){me.recordsExpanded[record.internalId]=!0;widget=me.addWidget(view,record);vm=widget.lookupViewModel()}else{delete me.recordsExpanded[record.internalId];widget=me.getWidget(view,record)}
if(ownerLockable){if(ownerLockable.lockedGrid.isVisible()){view=me.lockedView;lockedRow=Ext.fly(view.getNode(rowIdx));if(lockedRow){lockedRow[addOrRemoveCls](me.rowCollapsedCls);nextBd=lockedRow.down(me.rowBodyTrSelector,!0);Ext.fly(nextBd)[addOrRemoveCls](me.rowBodyHiddenCls);if(wasCollapsed&&me.lockedWidget){widget=[widget,me.addWidget(view,record)]}else{widget=[widget,me.getWidget(view,record)]}}
ownerLockable.syncRowHeightOnNextLayout=!0}}
me.view.fireEvent(wasCollapsed?'expandbody':'collapsebody',rowNode,record,nextBd,widget);view.updateLayout();if(vm){vm.notify()}
Ext.resumeLayouts(!0);if(me.scrollIntoViewOnExpand&&wasCollapsed){me.grid.ensureVisible(rowIdx)}}}})
;
Ext.define('Ext.grid.property.Grid',{extend:'Ext.grid.Panel',alias:'widget.propertygrid',alternateClassName:'Ext.grid.PropertyGrid',uses:['Ext.grid.plugin.CellEditing','Ext.grid.property.Store','Ext.grid.property.HeaderContainer','Ext.XTemplate','Ext.grid.CellEditor','Ext.form.field.Date','Ext.form.field.Text','Ext.form.field.Number','Ext.form.field.ComboBox'],valueField:'value',nameField:'name',inferTypes:!0,enableColumnMove:!1,columnLines:!0,stripeRows:!1,trackMouseOver:!1,clicksToEdit:1,enableHdMenu:!1,gridCls:Ext.baseCSSPrefix+'property-grid',initComponent:function(){var me=this,selectOnFocus=!Ext.isIE,view;me.source=me.source||{};me.addCls(me.gridCls);me.plugins=me.plugins||[];me.plugins.push(new Ext.grid.plugin.CellEditing({clicksToEdit:me.clicksToEdit,startEdit:function(record,column){return this.self.prototype.startEdit.call(this,record,me.valueColumn)},getEditor:function(record,column){return this.getCachedEditor(record.get(me.nameField),record,column)}}));me.selModel={type:'cellmodel',onCellSelect:function(position){position.column=me.valueColumn;position.colIdx=me.valueColumn.getVisibleIndex();return this.self.prototype.onCellSelect.call(this,position)}};me.sourceConfig=Ext.apply({},me.sourceConfig);if(!me.store){me.propStore=me.store=new Ext.grid.property.Store(me,me.source)}
me.configure(me.sourceConfig);if(me.sortableColumns){me.store.sort('name','ASC')}
me.columns=new Ext.grid.property.HeaderContainer(me,me.store);me.callParent();view=me.getView();view.walkCells=me.walkCells;view.getDefaultFocusPosition=me.getDefaultFocusPosition;me.editors={'date':new Ext.grid.CellEditor({field:new Ext.form.field.Date({selectOnFocus:selectOnFocus})}),'string':new Ext.grid.CellEditor({field:new Ext.form.field.Text({selectOnFocus:selectOnFocus})}),'number':new Ext.grid.CellEditor({field:new Ext.form.field.Number({selectOnFocus:selectOnFocus})}),'boolean':new Ext.grid.CellEditor({field:new Ext.form.field.ComboBox({editable:!1,store:[[!0,me.headerCt.trueText],[!1,me.headerCt.falseText]]})})};me.store.on('update',me.onUpdate,me)},configure:function(config){var me=this,store=me.store,i=0,len=me.store.getCount(),nameField=me.nameField,valueField=me.valueField,name,value,rec,type;me.configureLegacy(config);if(me.inferTypes){for(;i<len;++i){rec=store.getAt(i);name=rec.get(nameField);if(!me.getConfigProp(name,'type')){value=rec.get(valueField);if(Ext.isDate(value)){type='date'}else if(Ext.isNumber(value)){type='number'}else if(Ext.isBoolean(value)){type='boolean'}else{type='string'}
me.setConfigProp(name,'type',type)}}}},getConfigProp:function(fieldName,key,defaultValue){var config=this.sourceConfig[fieldName],out;if(config){out=config[key]}
return out||defaultValue},setConfigProp:function(fieldName,key,value){var sourceCfg=this.sourceConfig,o=sourceCfg[fieldName];if(!o){o=sourceCfg[fieldName]={__copied:!0}}else if(!o.__copied){o=Ext.apply({__copied:!0},o);sourceCfg[fieldName]=o}
o[key]=value;return value},configureLegacy:function(config){var me=this;me.copyLegacyObject(config,me.customRenderers,'renderer');me.copyLegacyObject(config,me.customEditors,'editor');me.copyLegacyObject(config,me.propertyNames,'displayName');if(me.customRenderers||me.customEditors||me.propertyNames){if(Ext.global.console&&Ext.global.console.warn){Ext.global.console.warn(this.$className,'customRenderers, customEditors & propertyNames have been consolidated '+'into a new config, see "sourceConfig". '+'These configurations will be deprecated.')}}},copyLegacyObject:function(config,o,keyName){var key;for(key in o){if(o.hasOwnProperty(key)){if(!config[key]){config[key]={}}
config[key][keyName]=o[key]}}},onUpdate:function(store,record,operation){var me=this,v,oldValue;if(me.rendered&&operation===Ext.data.Model.EDIT){v=record.get(me.valueField);oldValue=record.modified.value;if(me.fireEvent('beforepropertychange',me.source,record.getId(),v,oldValue)!==!1){if(me.source){me.source[record.getId()]=v}
record.commit();me.fireEvent('propertychange',me.source,record.getId(),v,oldValue)}else{record.reject()}}},walkCells:function(pos,direction,e,preventWrap,verifierFn,scope){var me=this,valueColumn=me.ownerCt.valueColumn;if(direction==='left'){direction='up'}else if(direction==='right'){direction='down'}
pos=Ext.view.Table.prototype.walkCells.call(me,pos,direction,e,preventWrap,verifierFn,scope);pos.column=valueColumn;pos.colIdx=valueColumn.getVisibleIndex();return pos},getDefaultFocusPosition:function(){var view=this,focusPosition;focusPosition=new Ext.grid.CellContext(view).setColumn(1);return focusPosition},getCellEditor:function(record,column){var me=this,propName=record.get(me.nameField),val=record.get(me.valueField),editor=me.getConfigProp(propName,'editor'),type=me.getConfigProp(propName,'type'),editors=me.editors,field;if(editor){if(!(editor instanceof Ext.grid.CellEditor)){if(!(editor instanceof Ext.form.field.Base)){editor=Ext.ComponentManager.create(editor,'textfield')}
editor=me.setConfigProp(propName,'editor',new Ext.grid.CellEditor({field:editor}))}}else if(type){switch(type){case 'date':editor=editors.date;break;case 'number':editor=editors.number;break;case 'boolean':editor=editors[type];break;default:editor=editors.string}}else if(Ext.isDate(val)){editor=editors.date}else if(Ext.isNumber(val)){editor=editors.number}else if(Ext.isBoolean(val)){editor=editors.boolean}else{editor=editors.string}
field=editor.field;if(field&&field.ui==='default'&&!field.hasOwnProperty('ui')){field.ui=me.editingPlugin.defaultFieldUI}
editor.editorId=propName;editor.field.column=me.valueColumn;if(propName){propName=Ext.String.htmlEncode(propName);if(field.rendered){field.inputEl.dom.setAttribute('aria-label',propName)}else{field.ariaLabel=propName}}
return editor},doDestroy:function(){var me=this;me.destroyEditors(me.editors);me.destroyEditors(me.customEditors);me.callParent()},destroyEditors:function(editors){var ed;for(ed in editors){if(editors.hasOwnProperty(ed)){Ext.destroy(editors[ed])}}},setSource:function(source,sourceConfig){var me=this;me.source=source;if(sourceConfig!==undefined){me.sourceConfig=Ext.apply({},sourceConfig);me.configure(me.sourceConfig)}
me.propStore.setSource(source)},getSource:function(){return this.propStore.getSource()},getProperty:function(prop){return this.propStore.getProperty(prop)},setProperty:function(prop,value,create){this.propStore.setValue(prop,value,create)},removeProperty:function(prop){this.propStore.remove(prop)}})
;
Ext.define('Ext.grid.property.HeaderContainer',{extend:'Ext.grid.header.Container',alternateClassName:'Ext.grid.PropertyColumnModel',nameWidth:115,nameText:'Name',valueText:'Value',dateFormat:'m/j/Y',trueText:'true',falseText:'false',nameColumnCls:Ext.baseCSSPrefix+'grid-property-name',nameColumnInnerCls:Ext.baseCSSPrefix+'grid-cell-inner-property-name',constructor:function(grid,source){var me=this;me.grid=grid;me.store=source;me.callParent([{isRootHeader:!0,enableColumnResize:Ext.isDefined(grid.enableColumnResize)?grid.enableColumnResize:me.enableColumnResize,enableColumnMove:Ext.isDefined(grid.enableColumnMove)?grid.enableColumnMove:me.enableColumnMove,items:[{header:me.nameText,width:grid.nameColumnWidth||me.nameWidth,sortable:grid.sortableColumns,dataIndex:grid.nameField,scope:me,renderer:me.renderProp,itemId:grid.nameField,menuDisabled:!0,tdCls:me.nameColumnCls,innerCls:me.nameColumnInnerCls},{header:me.valueText,scope:me,renderer:me.renderCell,getEditor:me.getCellEditor.bind(me),sortable:grid.sortableColumns,flex:1,fixed:!0,dataIndex:grid.valueField,itemId:grid.valueField,menuDisabled:!0}]}]);me.grid.valueColumn=me.items.getAt(1)},getCellEditor:function(record){return this.grid.getCellEditor(record,this)},renderProp:function(v){return this.getPropertyName(v)},renderCell:function(val,meta,rec){var me=this,grid=me.grid,renderer=grid.getConfigProp(rec.get(grid.nameField),'renderer'),result=val;if(renderer){return Ext.callback(renderer,null,arguments,0,me)}
if(Ext.isDate(val)){result=me.renderDate(val)}else if(Ext.isBoolean(val)){result=me.renderBool(val)}
return Ext.util.Format.htmlEncode(result)},renderDate:Ext.util.Format.date,renderBool:function(bVal){return this[bVal?'trueText':'falseText']},getPropertyName:function(name){return this.grid.getConfigProp(name,'displayName',name)}})
;
Ext.define('Ext.grid.property.Property',{extend:'Ext.data.Model',alternateClassName:'Ext.PropGridProperty',fields:[{name:'name',type:'string'},{name:'value'}],idProperty:'name',constructor:function(data,value){if(!Ext.isObject(data)){data={name:data,value:value}}
this.callParent([data])}})
;
Ext.define('Ext.grid.property.Reader',{extend:'Ext.data.reader.Reader',successProperty:null,totalProperty:null,messageProperty:null,read:function(dataObject){return this.readRecords(dataObject)},readRecords:function(dataObject){var Model=this.getModel(),result={records:[],success:!0},val,propName;for(propName in dataObject){if(dataObject.hasOwnProperty(propName)){val=dataObject[propName];if(this.isEditableValue(val)){result.records.push(new Model({name:propName,value:val}))}}}
result.total=result.count=result.records.length;return new Ext.data.ResultSet(result)},isEditableValue:function(val){return Ext.isPrimitive(val)||Ext.isDate(val)||val===null}})
;
Ext.define('Ext.grid.property.Store',{extend:'Ext.data.Store',alternateClassName:'Ext.grid.PropertyStore',requires:['Ext.grid.property.Reader','Ext.data.proxy.Memory','Ext.grid.property.Property'],remoteSort:!0,constructor:function(grid,source){var me=this;me.grid=grid;me.source=source;me.callParent([{data:source,model:Ext.grid.property.Property,proxy:me.getProxy()}])},getProxy:function(){var proxy=this.proxy;if(!proxy){proxy=this.proxy=new Ext.data.proxy.Memory({model:Ext.grid.property.Property,reader:this.getReader()})}
return proxy},getReader:function(){var reader=this.reader;if(!reader){reader=this.reader=new Ext.grid.property.Reader({model:Ext.grid.property.Property})}
return reader},setSource:function(dataObject){var me=this;me.source=dataObject;me.suspendEvents();me.removeAll();me.getProxy().setData(dataObject);me.load();me.resumeEvents();me.fireEvent('datachanged',me);me.fireEvent('refresh',me)},getProperty:function(row){var rec=Ext.isNumber(row)?this.getAt(row):this.getById(row),ret=null;if(rec){ret=rec.get('value')}
return ret},setValue:function(prop,value,create){var me=this,rec=me.getRec(prop);if(rec){rec.set('value',value);me.source[prop]=value}else if(create){me.source[prop]=value;rec=new Ext.grid.property.Property({name:prop,value:value},prop);me.add(rec)}},remove:function(prop){var rec=this.getRec(prop);if(rec){this.callParent([rec]);delete this.source[prop]}},getRec:function(prop){return this.getById(prop)},getSource:function(){return this.source},doDestroy:function(){Ext.destroy(this.reader,this.proxy);this.callParent()}})
;
Ext.define('Ext.grid.selection.Selection',{constructor:function(view){if(!view||!(view.isTableView||view.isLockingView)){Ext.raise('Selection must be created for a given TableView or LockingView')}
this.view=view.ownerGrid.view}})
;
Ext.define('Ext.grid.selection.Cells',{extend:'Ext.grid.selection.Selection',type:'cells',isCells:!0,clone:function(){var me=this,result=new me.self(me.view);if(me.startCell){result.startCell=me.startCell.clone();result.endCell=me.endCell.clone()}
return result},contains:function(cellContext){var range;if(!cellContext||!cellContext.isCellContext){return!1}
if(this.startCell){range=this.getRowRange();if(cellContext.rowIdx>=range[0]&&cellContext.rowIdx<=range[1]){range=this.getColumnRange();return(cellContext.colIdx>=range[0]&&cellContext.colIdx<=range[1])}}
return!1},eachRow:function(fn,scope){var me=this,rowRange=me.getRowRange(),context=new Ext.grid.CellContext(me.view),rowIdx;for(rowIdx=rowRange[0];rowIdx<=rowRange[1];rowIdx++){context.setRow(rowIdx);if(fn.call(scope||me,context.record)===!1){return}}},eachColumn:function(fn,scope){var me=this,colRange=me.getColumnRange(),context=new Ext.grid.CellContext(me.view),colIdx;for(colIdx=colRange[0];colIdx<=colRange[1];colIdx++){context.setColumn(colIdx);if(fn.call(scope||me,context.column,colIdx)===!1){return}}},eachCell:function(fn,scope){var me=this,rowRange=me.getRowRange(),colRange=me.getColumnRange(),context=new Ext.grid.CellContext(me.view),rowIdx,colIdx;for(rowIdx=rowRange[0];rowIdx<=rowRange[1];rowIdx++){context.setRow(rowIdx);for(colIdx=colRange[0];colIdx<=colRange[1];colIdx++){context.setColumn(colIdx);if(fn.call(scope||me,context,colIdx,rowIdx)===!1){return}}}},getFirstRowIndex:function(){return this.startCell?Math.min(this.startCell.rowIdx,this.endCell.rowIdx):0},getLastRowIndex:function(){return this.startCell?Math.max(this.startCell.rowIdx,this.endCell.rowIdx):-1},getFirstColumnIndex:function(){return this.startCell?Math.min(this.startCell.colIdx,this.endCell.colIdx):0},getLastColumnIndex:function(){return this.startCell?Math.max(this.startCell.colIdx,this.endCell.colIdx):-1},privates:{clear:function(){var me=this,view=me.view;if(view.getVisibleColumnManager().getColumns().length){me.eachCell(function(cellContext){view.onCellDeselect(cellContext)})}
me.startCell=me.endCell=null},setRangeStart:function(startCell,endCell){this.startCell=(this.endCell=startCell.clone()).clone();this.view.onCellSelect(startCell)},setRangeEnd:function(endCell){var me=this,view=me.view,rows=view.all,cell=new Ext.grid.CellContext(view),maxColIdx=view.getVisibleColumnManager().getColumns().length-1,range,lastRange,rowStart,rowEnd,colStart,colEnd,rowIdx,colIdx;me.endCell=endCell.clone();range=me.getRange();lastRange=me.lastRange||range;rowStart=Math.max(Math.min(range[0][1],lastRange[0][1]),rows.startIndex);rowEnd=Math.min(Math.max(range[1][1],lastRange[1][1]),rows.endIndex);colStart=Math.min(range[0][0],lastRange[0][0]);colEnd=Math.min(Math.max(range[1][0],lastRange[1][0]),maxColIdx);for(rowIdx=rowStart;rowIdx<=rowEnd;rowIdx++){for(colIdx=colStart;colIdx<=colEnd;colIdx++){cell.setPosition(rowIdx,colIdx);if(rowIdx<range[0][1]||rowIdx>range[1][1]||colIdx<range[0][0]||colIdx>range[1][0]){view.onCellDeselect(cell)}else{view.onCellSelect(cell)}}}
me.lastRange=range},extendRange:function(extensionVector){var me=this,newEndCell;if(extensionVector[extensionVector.type]<0){newEndCell=me.endCell.clone().setPosition(me.getLastRowIndex(),me.getLastColumnIndex());me.startCell=extensionVector.start.clone();me.setRangeEnd(newEndCell);me.view.getNavigationModel().setPosition(extensionVector.start)}else{me.startCell=me.startCell.setPosition(me.getFirstRowIndex(),me.getFirstColumnIndex());me.setRangeEnd(extensionVector.end);me.view.getNavigationModel().setPosition(extensionVector.end)}},reduceRange:function(extensionVector){var me=this,newEndCell;if(extensionVector[extensionVector.type]<0){newEndCell=extensionVector.end.clone();me.startCell=extensionVector.start.clone();me.setRangeEnd(newEndCell);me.view.getNavigationModel().setPosition(extensionVector.start)}},getRange:function(){return[[this.getFirstColumnIndex(),this.getFirstRowIndex()],[this.getLastColumnIndex(),this.getLastRowIndex()]]},getRangeSize:function(){return this.getCount()},getCount:function(){var range=this.getRange();return(range[1][0]-range[0][0]+1)*(range[1][1]-range[0][1]+1)},selectAll:function(){var me=this,view=me.view;me.clear();me.setRangeStart(new Ext.grid.CellContext(view).setPosition(0,0));me.setRangeEnd(new Ext.grid.CellContext(view).setPosition(view.dataSource.getCount()-1,view.getVisibleColumnManager().getColumns().length-1))},isAllSelected:function(){var start=this.rangeStart,end=this.rangeEnd;if(start){if(!start.colIdx&&!start.rowIdx){return end.colIdx===end.view.getVisibleColumnManager().getColumns().length-1&&end.rowIdx===end.view.dataSource.getCount-1}}
return!1},getColumnRange:function(){return[this.getFirstColumnIndex(),this.getLastColumnIndex()]},getLastSelected:function(){return this.view.dataSource.getAt(this.endCell.rowIdx)},getRowRange:function(){return[this.getFirstRowIndex(),this.getLastRowIndex()]},onSelectionFinish:function(){var me=this;if(me.getCount()){me.view.getSelectionModel().onSelectionFinish(me,new Ext.grid.CellContext(me.view).setPosition(me.getFirstRowIndex(),me.getFirstColumnIndex()),new Ext.grid.CellContext(me.view).setPosition(me.getLastRowIndex(),me.getLastColumnIndex()))}else{me.view.getSelectionModel().onSelectionFinish(me)}}}})
;
Ext.define('Ext.grid.selection.Columns',{extend:'Ext.grid.selection.Selection',type:'columns',isColumns:!0,clone:function(){var me=this,result=new me.self(me.view),columns=me.selectedColumns;if(columns){result.selectedColumns=Ext.Array.slice(columns)}
return result},eachRow:function(fn,scope){var columns=this.selectedColumns;if(columns&&columns.length){this.view.dataSource.each(fn,scope||this)}},eachColumn:function(fn,scope){var me=this,view=me.view,columns=me.selectedColumns,len,i,context=new Ext.grid.CellContext(view);if(columns){len=columns.length;for(i=0;i<len;i++){context.setColumn(columns[i]);if(fn.call(scope||me,context.column,context.colIdx)===!1){return!1}}}},eachCell:function(fn,scope){var me=this,view=me.view,columns=me.selectedColumns,len,i,context=new Ext.grid.CellContext(view);if(columns){len=columns.length;view.dataSource.each(function(record){context.setRow(record);for(i=0;i<len;i++){context.setColumn(columns[i]);if(fn.call(scope||me,context,context.colIdx,context.rowIdx)===!1){return!1}}})}},contains:function(column){var selectedColumns=this.selectedColumns;if(column&&column.isColumn&&selectedColumns&&selectedColumns.length){return Ext.Array.contains(selectedColumns,column)}
return!1},getCount:function(){var selectedColumns=this.selectedColumns;return selectedColumns?selectedColumns.length:0},getColumns:function(){return this.selectedColumns||[]},privates:{add:function(column){if(!column.isColumn){Ext.raise('Column selection must be passed a grid Column header object')}
Ext.Array.include((this.selectedColumns||(this.selectedColumns=[])),column);this.refreshColumns(column)},clear:function(){var me=this,prevSelection=me.selectedColumns;if(prevSelection&&prevSelection.length){me.selectedColumns=[];me.refreshColumns.apply(me,prevSelection)}
me.setRangeStart(null)},setRangeStart:function(startColumn){var me=this,prevSelection=me.getColumns();me.startColumn=startColumn;if(startColumn!=null){me.selectedColumns=[startColumn];prevSelection.push(startColumn);me.refreshColumns.apply(me,prevSelection)}},setRangeEnd:function(endColumn){var me=this,prevSelection=me.getColumns(),colManager=this.view.ownerGrid.getVisibleColumnManager(),columns=colManager.getColumns(),start=colManager.indexOf(me.startColumn),end=colManager.indexOf(endColumn),i;if(end<start){i=start;start=end;end=i}
me.selectedColumns=[];for(i=start;i<=end;i++){me.selectedColumns.push(columns[i]);prevSelection.push(columns[i])}
me.refreshColumns.apply(me,prevSelection)},isAllSelected:function(){var selectedColumns=this.selectedColumns;return selectedColumns&&selectedColumns.length===this.view.ownerGrid.getVisibleColumnManager().getColumns().length},refreshColumns:function(column){var me=this,view=me.view,rows=view.all,rowIdx,columns=arguments,len=columns.length,colIdx,cellContext=new Ext.grid.CellContext(view),selected=[];if(view.rendered){for(colIdx=0;colIdx<len;colIdx++){selected[colIdx]=me.contains(columns[colIdx])}
for(rowIdx=rows.startIndex;rowIdx<=rows.endIndex;rowIdx++){cellContext.setRow(rowIdx);for(colIdx=0;colIdx<len;colIdx++){cellContext.setColumn(columns[colIdx]);if(selected[colIdx]){view.onCellSelect(cellContext)}else{view.onCellDeselect(cellContext)}}}}},remove:function(column){if(!column.isColumn){Ext.raise('Column selection must be passed a grid Column header object')}
if(this.selectedColumns){Ext.Array.remove(this.selectedColumns,column);if(column.getView()&&column.isVisible()){this.refreshColumns(column)}}},selectAll:function(){var me=this;me.clear();me.selectedColumns=me.view.getSelectionModel().lastContiguousColumnRange=me.view.getVisibleColumnManager().getColumns();me.refreshColumns.apply(me,me.selectedColumns)},extendRange:function(extensionVector){var me=this,columns=me.view.getVisibleColumnManager().getColumns(),i;for(i=extensionVector.start.colIdx;i<=extensionVector.end.colIdx;i++){me.add(columns[i])}},reduceRange:function(extensionVector){var me=this,columns=me.view.getVisibleColumnManager().getColumns(),startIdx=extensionVector.start.colIdx,endIdx=extensionVector.end.colIdx,reduceTo=Math.abs(startIdx-endIdx)+1,diff=me.selectedColumns.length-reduceTo,i;for(i=diff;i>0;i--){me.remove(columns[endIdx+i])}},onSelectionFinish:function(){var me=this,range=me.getContiguousSelection();if(range){me.view.getSelectionModel().onSelectionFinish(me,new Ext.grid.CellContext(me.view).setPosition(0,range[0]),new Ext.grid.CellContext(me.view).setPosition(me.view.dataSource.getCount()-1,range[1]))}else{me.view.getSelectionModel().onSelectionFinish(me)}},getContiguousSelection:function(){var selection=Ext.Array.sort(this.getColumns(),function(c1,c2){return c1.getView().ownerGrid.getVisibleColumnManager().indexOf(c1)-c2.getView().ownerGrid.getVisibleColumnManager().indexOf(c2)}),len=selection.length,i;if(len){for(i=1;i<len;i++){if(selection[i].getVisibleIndex()!==selection[i-1].getVisibleIndex()+1){return!1}}
return[selection[0],selection[len-1]]}}}})
;
Ext.define('Ext.grid.selection.Replicator',{extend:'Ext.plugin.Abstract',alias:'plugin.selectionreplicator',init:function(grid){this.gridListeners=grid.on({beforeselectionextend:this.onBeforeSelectionExtend,scope:this,destroyable:!0})},onBeforeSelectionExtend:function(ownerGrid,sel,extension){var columns=this.columns=[];sel.eachColumn(function(column){columns.push(column)});return this.replicateSelection(ownerGrid,sel,extension)},replicateSelection:function(ownerGrid,sel,extension){if(extension.columns||sel.isColumns){return}
var me=this,columns=me.columns,selFirstRowIdx=sel.getFirstRowIndex(),selLastRowIdx=sel.getLastRowIndex(),selectedRowCount=selLastRowIdx-selFirstRowIdx+1,lastTwoRecords=[],colCount,i,j,column,values,startIdx,endIdx,increment,store,record,prevValues,prevValue,x,y;colCount=columns.length;store=columns[0].getView().dataSource;if(selectedRowCount===1){values=me.getColumnValues(sel.view.dataSource.getAt(selFirstRowIdx))}else{values=new Array(colCount);if(extension.rows<0){lastTwoRecords=[store.getAt(selFirstRowIdx+1),store.getAt(selFirstRowIdx)]}else{lastTwoRecords=[store.getAt(selLastRowIdx-1),store.getAt(selLastRowIdx)]}
lastTwoRecords[0]=me.getColumnValues(lastTwoRecords[0]);lastTwoRecords[1]=me.getColumnValues(lastTwoRecords[1]);for(j=0;j<colCount;j++){x=lastTwoRecords[1][j];y=lastTwoRecords[0][j];if(!isNaN(x)&&!isNaN(y)){values[j]=Number(x)-Number(y)}}}
if(extension.rows<0){startIdx=extension.end.rowIdx;endIdx=extension.start.rowIdx-1;increment=-1}else{startIdx=extension.start.rowIdx;endIdx=extension.end.rowIdx+1;increment=1}
if(selectedRowCount===1){for(i=startIdx;i!==endIdx;i+=increment){record=store.getAt(i);for(j=0;j<colCount;j++){column=columns[j];if(column.dataIndex){record.set(column.dataIndex,values[j])}}}}else{for(i=startIdx;i!==endIdx;i+=increment){record=store.getAt(i);prevValues=me.getColumnValues(store.getAt(i-increment));for(j=0;j<colCount;j++){column=columns[j];if(column.dataIndex){prevValue=prevValues[j];if(!isNaN(prevValue)){record.set(column.dataIndex,Ext.coerce(Number(prevValue)+values[j],prevValue))}}}}}},getColumnValues:function(record){var columns=this.columns,len=columns.length,result=new Array(columns.length),i,column;for(i=0;i<len;i++){column=columns[i];if(column.dataIndex){result[i]=record.get(column.dataIndex)}}
return result},destroy:function(){this.gridListeners=Ext.destroy(this.gridListeners);this.callParent()}})
;
Ext.define('Ext.grid.selection.Rows',{extend:'Ext.grid.selection.Selection',requires:['Ext.util.Collection'],type:'rows',isRows:!0,clone:function(){var me=this,result=new me.self(me.view);if(me.selectedRecords){result.selectedRecords=me.selectedRecords.clone()}
if(me.rangeStart){result.setRangeStart(me.rangeStart);result.setRangeEnd(me.rangeEnd)}
return result},addOne:function(record){var me=this,selection;if(!(record.isModel)){Ext.raise('Row selection must be passed a record')}
selection=me.selectedRecords||(me.selectedRecords=me.createRecordCollection());if(!selection.byInternalId.get(record.internalId)){selection.add(record);me.view.onRowSelect(record)}},add:function(record){var me=this,i,len;if(record.isModel){me.addOne(record)}else if(Ext.isArray(record)){for(i=0,len=record.length;i<len;i++){me.addOne(record[i])}}else{Ext.raise('add must be called with a record or array of records')}},removeOne:function(record){var me=this;if(!(record.isModel)){Ext.raise('Row selection must be passed a record')}
if(me.selectedRecords&&me.selectedRecords.byInternalId.get(record.internalId)){me.selectedRecords.remove(record);me.view.onRowDeselect(record);me.allSelected=!1;return!0}
return!1},remove:function(record){var me=this,ret=!0,i,len;if(record.isModel){return me.removeOne(record)}else if(Ext.isArray(record)){for(i=0,len=record.length;i<len;i++){ret&=me.removeOne(record[i])}}else{Ext.raise('remove must be called with a record or array of records')}
return ret},contains:function(record){if(!record||!record.isModel){return!1}
var me=this,result=!1,selectedRecords=me.selectedRecords;if(me.allSelected){me.add(record);return!0}
if(selectedRecords){result=!!selectedRecords.byInternalId.get(record.internalId)}
return result},getCount:function(){var selectedRecords=this.selectedRecords;return(selectedRecords&&selectedRecords.length)||0},getRecords:function(){var selectedRecords=this.selectedRecords;return selectedRecords?selectedRecords.getRange():[]},selectAll:function(){var me=this,ds=me.view.dataSource,rangeSize=ds.isBufferedStore?ds.getData().getCount():ds.getCount();me.clear();me.setRangeStart(0);me.setRangeEnd(rangeSize-1);me.addRange();me.allSelected=!0},getFirstRowIndex:function(){return this.getCount()?this.view.dataSource.indexOf(this.selectedRecords.first()):0},getLastRowIndex:function(){return this.getCount()?this.view.dataSource.indexOf(this.selectedRecords.last()):-1},eachRow:function(fn,scope){var selectedRecords=this.selectedRecords;if(selectedRecords){selectedRecords.each(fn,scope||this)}},eachColumn:function(fn,scope){var columns=this.view.getVisibleColumnManager().getColumns(),len=columns.length,i;if(this.selectedRecords){for(i=0;i<len;i++){if(fn.call(this||scope,columns[i],i)===!1){return}}}},eachCell:function(fn,scope){var me=this,selection=me.selectedRecords,view=me.view,columns=view.ownerGrid.getVisibleColumnManager().getColumns(),abort=!1,colCount,i,j,context,range,recCount;if(columns){colCount=columns.length;context=new Ext.grid.CellContext(view);if(selection){selection.each(function(record){context.setRow(record);for(i=0;i<colCount;i++){context.setColumn(columns[i]);if(fn.call(scope||me,context,context.colIdx,context.rowIdx)===!1){abort=!0;return!1}}})}
if(!abort){range=me.getRange();if(range[0]===range[1]){return}
me.view.dataSource.getRange(range[0],range[1],{forRender:!1,callback:function(records){recCount=records.length;for(i=0;!abort&&i<recCount;i++){context.setRow(records[i]);for(j=0;!abort&&j<colCount;j++){context.setColumn(columns[j]);if(fn.call(scope||me,context,context.colIdx,context.rowIdx)===!1){abort=!0}}}}})}}},beginUpdate:function(){var selectedRecords=this.selectedRecords;if(selectedRecords){selectedRecords.beginUpdate()}},endUpdate:function(){var selectedRecords=this.selectedRecords;if(selectedRecords){selectedRecords.endUpdate()}},destroy:function(){this.selectedRecords=Ext.destroy(this.selectedRecords);this.callParent()},privates:{clear:function(){var me=this,view=me.view;me.allSelected=!1;if(me.selectedRecords){me.eachRow(function(record){view.onRowDeselect(record)});me.selectedRecords.clear()}
me.setRangeStart(null)},isAllSelected:function(){return!!this.allSelected},setRangeStart:function(start,suppressEvent){this.allSelected=!1;this.rangeStart=this.rangeEnd=start;if(!suppressEvent){this.view.onRowSelect(start)}},setRangeEnd:function(end,append){var me=this,view=me.view,store=view.dataSource,selected=me.selectedRecords,withinRange,range,lastRange,rowIdx,rec;me.rangeEnd=end;range=me.getRange();lastRange=me.lastRange||range;rowIdx=Math.min(range[0],lastRange[0]);end=Math.max(range[1],lastRange[1]);for(;rowIdx<=end;rowIdx++){rec=store.getAt(rowIdx);withinRange=(rowIdx<range[0]||rowIdx>range[1]);if(!append&&withinRange){if(selected&&me.contains(rec)){selected.remove(rec)}
view.onRowDeselect(rowIdx)}else{if(append&&withinRange){continue}
view.onRowSelect(rowIdx)}}
me.lastRange=range},extendRange:function(extensionVector){var me=this,store=me.view.dataSource,i;for(i=extensionVector.start.rowIdx;i<=extensionVector.end.rowIdx;i++){me.add(store.getAt(i))}},getLastSelected:function(){var sel=this.selectedRecords;return sel&&sel.last()},getRange:function(){var start=this.rangeStart,end=this.rangeEnd;if(start==null){return[0,-1]}else if(start<=end){return[start,end]}
return[end,start]},getRangeSize:function(){var range=this.getRange();return range[1]-range[0]+1},createRecordCollection:function(){var store=this.view.dataSource,result=new Ext.util.Collection({rootProperty:'data',extraKeys:{byInternalId:{rootProperty:!1,property:'internalId'}},sorters:[function(r1,r2){return store.indexOf(r1)-store.indexOf(r2)}]});return result},addRange:function(){var me=this,range,selection;if(me.rangeStart!=null){range=me.getRange();selection=me.selectedRecords||(me.selectedRecords=me.createRecordCollection());me.view.dataSource.getRange(range[0],range[1],{forRender:!1,callback:function(range){selection.add.apply(selection,range)}})}},onSelectionFinish:function(){var me=this,range=me.getContiguousSelection();if(range){me.view.getSelectionModel().onSelectionFinish(me,new Ext.grid.CellContext(me.view).setPosition(range[0],0),new Ext.grid.CellContext(me.view).setPosition(range[1],me.view.getVisibleColumnManager().getColumns().length-1))}else{me.view.getSelectionModel().onSelectionFinish(me)}},getContiguousSelection:function(){var store=this.view.dataSource,selection,len,i;if(this.selectedRecords){selection=Ext.Array.sort(this.selectedRecords.getRange(),function(r1,r2){return store.indexOf(r1)-store.indexOf(r2)});len=selection.length;if(len){for(i=1;i<len;i++){if(store.indexOf(selection[i])!==store.indexOf(selection[i-1])+1){return!1}}
return[store.indexOf(selection[0]),store.indexOf(selection[len-1])]}}}}})
;
Ext.define('Ext.grid.selection.SelectionExtender',{extend:'Ext.dd.DragTracker',maskBox:{},constructor:function(config){var me=this;if(config.view.rendered){me.initSelectionExtender(config)}else{me.view=config.view;config.view.on({render:me.initSelectionExtender,args:[config],scope:me})}},initSelectionExtender:function(config){var me=this,displayMode=Ext.dom.Element.DISPLAY;me.el=config.view.el;me.handle=config.view.ownerGrid.body.createChild({cls:Ext.baseCSSPrefix+'ssm-extender-drag-handle',style:'display:none'}).setVisibilityMode(displayMode);me.handle.on({contextmenu:function(e){e.stopEvent()}});me.mask=me.el.createChild({cls:Ext.baseCSSPrefix+'ssm-extender-mask',style:'display:none'}).setVisibilityMode(displayMode);me.superclass.constructor.call(me,config);me.mask.skipGarbageCollection=me.handle.skipGarbageCollection=!0;me.viewListeners=me.view.on({scroll:me.onViewScroll,scope:me,destroyable:!0});me.gridListeners=me.view.ownerGrid.on({columnResize:me.alignHandle,scope:me,destroyable:!0});me.extendX=!!(me.axes&1);me.extendY=!!(me.axes&2)},setHandle:function(firstPos,lastPos){var me=this;if(!me.view.rendered){me.view.on({render:me.initSelectionExtender,args:[firstPos,lastPos],scope:me});return}
me.firstPos=firstPos;me.lastPos=lastPos;if(firstPos&&lastPos&&firstPos.getCell(!0)&&lastPos.getCell(!0)){if(me.curPos){me.curPos.setPosition(lastPos)}else{me.curPos=lastPos.clone()}
me.alignHandle()}else{me.disable()}},alignHandle:function(){var me=this,firstCell=me.firstPos&&me.firstPos.getCell(!0),lastCell=me.lastPos&&me.lastPos.getCell(!0),handle=me.handle,shouldDisplay;if(firstCell&&lastCell){me.enable();handle.alignTo(lastCell,'c-br');shouldDisplay=me.isHandleWithinView(Ext.fly(lastCell).up('.x-grid-view'));handle.setVisible(shouldDisplay)}else{me.disable()}},isHandleWithinView:function(view){var me=this,viewBox=view.getBox(),handleBox=me.handle.getBox(),withinX;withinX=viewBox.left<=handleBox.left&&viewBox.right>=(handleBox.right-handleBox.width);return withinX},enable:function(){this.handle.show();this.callParent()},disable:function(){this.handle.hide();this.mask.hide();this.callParent()},onDrag:function(e){if(e.target===this.mask.dom){this.mask.hide();e.target=document.elementFromPoint.apply(document,e.getXY());this.mask.show()}
var me=this,view=me.view,viewTop=view.el.getY(),viewLeft=view.el.getX(),overCell=e.getTarget(me.view.getCellSelector()),scrollTask=me.scrollTask||(me.scrollTask=Ext.util.TaskManager.newTask({run:me.doAutoScroll,scope:me,interval:10})),scrollBy=me.scrollBy||(me.scrollBy=[]);if(!me.el.contains(e.target)){scrollBy[0]=scrollBy[1]=0;return scrollTask.stop()}
if(me.lastXY[1]>viewTop+view.el.getHeight(!0)-15){if(me.extendY){scrollBy[1]=3;scrollTask.start()}}else if(me.lastXY[1]<viewTop+10){if(me.extendY){scrollBy[1]=-3;scrollTask.start()}}else if(me.lastXY[0]>viewLeft+view.el.getWidth(!0)-15){if(me.extendX){scrollBy[0]=3;scrollTask.start()}}else if(me.lastXY[0]<viewLeft+10){if(me.extendX){scrollBy[0]=-3;scrollTask.start()}}else{scrollBy[0]=scrollBy[1]=0;scrollTask.stop()}
if(overCell&&overCell!==me.lastOverCell){me.lastOverCell=overCell;me.syncMaskOnCell(overCell)}},doAutoScroll:function(){var me=this,view=me.view,scrollOverCell;view.scrollBy.apply(view,me.scrollBy);scrollOverCell=document.elementFromPoint.apply(document,me.lastXY);if(scrollOverCell){scrollOverCell=Ext.fly(scrollOverCell).up(view.cellSelector);if(scrollOverCell&&scrollOverCell!==me.lastOverCell){me.lastOverCell=scrollOverCell;me.syncMaskOnCell(scrollOverCell)}}},onEnd:function(e){var me=this;if(me.scrollTask){me.scrollTask.stop()}
if(me.extensionDescriptor){me.disable();me.view.getSelectionModel().extendSelection(me.extensionDescriptor)}},onViewScroll:function(){var me=this;if(me.active&&me.lastOverCell){me.syncMaskOnCell(me.lastOverCell)}
if(me.firstPos){me.alignHandle()}},syncMaskOnCell:function(overCell){var me=this,view=me.view,rows=view.all,curPos=me.curPos,maskBox=me.maskBox,selRegion,firstPos=me.firstPos.clone(),lastPos=me.lastPos.clone(),extensionStart=me.firstPos.clone(),extensionEnd=me.lastPos.clone(),preventReduce=!me.allowReduceSelection;firstPos.setRow(Math.min(Math.max(firstPos.rowIdx,rows.startIndex),rows.endIndex));lastPos.setRow(Math.min(Math.max(lastPos.rowIdx,rows.startIndex),rows.endIndex));me.selectionRegion=selRegion=firstPos.getCell().getRegion().union(lastPos.getCell().getRegion());curPos.setPosition(view.getRecord(overCell),view.getHeaderByCell(overCell));overCell=Ext.fly(overCell);me.mask.dom.style.borderTopWidth=me.mask.dom.style.borderRightWidth=me.mask.dom.style.borderBottomWidth=me.mask.dom.style.borderLeftWidth='';if(curPos.rowIdx<me.firstPos.rowIdx&&me.extendY){me.extensionDescriptor={type:'rows',start:extensionStart.setRow(curPos.rowIdx),end:extensionEnd.setRow(me.firstPos.rowIdx-1),rows:curPos.rowIdx-me.firstPos.rowIdx,mousePosition:me.lastXY};me.mask.dom.style.borderBottomWidth='0';maskBox.x=selRegion.x;maskBox.y=overCell.getY();maskBox.width=selRegion.right-selRegion.left;maskBox.height=selRegion.top-overCell.getY()}else if(curPos.rowIdx>me.lastPos.rowIdx&&me.extendY){me.extensionDescriptor={type:'rows',start:extensionStart.setRow(me.lastPos.rowIdx+1),end:extensionEnd.setRow(curPos.rowIdx),rows:curPos.rowIdx-me.lastPos.rowIdx,mousePosition:me.lastXY};me.mask.dom.style.borderTopWidth='0';maskBox.x=selRegion.x;maskBox.y=selRegion.bottom;maskBox.width=selRegion.right-selRegion.left;maskBox.height=overCell.getRegion().bottom-selRegion.bottom}else if(!preventReduce&&curPos.rowIdx<me.lastPos.rowIdx&&me.extendY&&curPos.colIdx===me.lastPos.colIdx){me.extensionDescriptor={type:'rows',start:extensionStart.setRow(me.firstPos.rowIdx),end:extensionEnd.setRow(curPos.rowIdx),rows:-1,mousePosition:me.lastXY,reduce:!0};me.mask.dom.style.borderTopWidth='0';maskBox.x=selRegion.x;maskBox.y=selRegion.top;maskBox.width=selRegion.right-selRegion.left;maskBox.height=overCell.getRegion().bottom-selRegion.top}else{if(curPos.colIdx<me.firstPos.colIdx&&me.extendX){me.extensionDescriptor={type:'columns',start:extensionStart.setColumn(curPos.colIdx),end:extensionEnd.setColumn(me.firstPos.colIdx-1),columns:curPos.colIdx-me.firstPos.colIdx,mousePosition:me.lastXY};me.mask.dom.style.borderRightWidth='0';maskBox.x=overCell.getX();maskBox.y=selRegion.top;maskBox.width=selRegion.left-overCell.getRegion().left;maskBox.height=selRegion.bottom-selRegion.top}else if(curPos.colIdx>me.lastPos.colIdx&&me.extendX){me.extensionDescriptor={type:'columns',start:extensionStart.setColumn(me.lastPos.colIdx+1),end:extensionEnd.setColumn(curPos.colIdx),columns:curPos.colIdx-me.lastPos.colIdx,mousePosition:me.lastXY};me.mask.dom.style.borderLeftWidth='0';maskBox.x=selRegion.right;maskBox.y=selRegion.top;maskBox.width=overCell.getRegion().right-selRegion.right;maskBox.height=selRegion.bottom-selRegion.top}else if(!preventReduce&&curPos.colIdx<me.lastPos.colIdx&&me.extendX){me.extensionDescriptor={type:'columns',start:extensionStart.setColumn(me.firstPos.colIdx),end:extensionEnd.setColumn(curPos.colIdx),columns:-1,mousePosition:me.lastXY,reduce:!0};me.mask.dom.style.borderLeftWidth='0';maskBox.x=selRegion.left;maskBox.y=selRegion.top;maskBox.width=overCell.getRegion().right-selRegion.left;maskBox.height=selRegion.bottom-selRegion.top}else{me.extensionDescriptor=null}}
if(view.ownerGrid.hasListeners.selectionextenderdrag){view.ownerGrid.fireEvent('selectionextenderdrag',view.ownerGrid,view.getSelectionModel().getSelected(),me.extensionDescriptor)}
if(me.extensionDescriptor){me.mask.show();me.mask.setBox(maskBox)}else{me.mask.hide()}},destroy:function(){var me=this;Ext.destroy(me.gridListeners,me.viewListeners,me.mask,me.handle);me.callParent()}})
;
Ext.define('Ext.grid.selection.SpreadsheetModel',{extend:'Ext.selection.Model',requires:['Ext.grid.selection.Selection','Ext.grid.selection.Cells','Ext.grid.selection.Rows','Ext.grid.selection.Columns','Ext.grid.selection.SelectionExtender'],alias:'selection.spreadsheet',isSpreadsheetModel:!0,config:{columnSelect:{$value:!1,lazy:!0},cellSelect:{$value:!0,lazy:!0},rowSelect:{$value:!0,lazy:!0},dragSelect:{$value:!0,lazy:!0},selected:null,extensible:{$value:!0,lazy:!0},reducible:!0},checkboxSelect:!1,checkboxColumnIndex:0,showHeaderCheckbox:!0,checkColumnHeaderText:null,checkboxHeaderWidth:24,rowNumbererHeaderWidth:46,columnSelectCls:Ext.baseCSSPrefix+'ssm-column-select',rowNumbererHeaderCls:Ext.baseCSSPrefix+'ssm-row-numberer-hd',tdCls:Ext.baseCSSPrefix+'grid-cell-special '+Ext.baseCSSPrefix+'selmodel-column',bindComponent:function(view){var me=this,viewListeners,storeListeners,lockedGrid;if(me.view!==view){if(me.view){me.navigationModel=null;Ext.destroy(me.viewListeners,me.navigationListeners)}
me.view=view;if(view){me.getCellSelect();lockedGrid=view.ownerGrid.lockedGrid;if(lockedGrid){me.hasLockedHeader=!0;me.onViewCreated(lockedGrid,lockedGrid.getView())}else{view.grid.on({viewcreated:me.onViewCreated,scope:me,single:!0})}
me.gridListeners=view.ownerGrid.on({columnschanged:me.onColumnsChanged,columnmove:me.onColumnMove,scope:me,destroyable:!0});storeListeners=me.getStoreListeners();storeListeners.scope=me;storeListeners.destroyable=!0;me.storeListeners=me.store.on(storeListeners);viewListeners=me.getViewListeners();viewListeners.scope=me;viewListeners.destroyable=!0;me.viewListeners=view.on(viewListeners);me.navigationModel=view.getNavigationModel();me.navigationListeners=me.navigationModel.on({navigate:me.onNavigate,scope:me,destroyable:!0});if(me.getColumnSelect()){view.ownerGrid.addCls(me.columnSelectCls)}
me.updateHeaderState()}}},getCheckboxHeaderConfig:function(){var me=this,showCheck=me.showHeaderCheckbox!==!1;return{xtype:'checkcolumn',isCheckerHd:showCheck,headerCheckbox:showCheck,ignoreExport:!0,text:me.checkColumnHeaderText,clickTargetName:'el',width:me.checkboxHeaderWidth,sortable:!1,draggable:!1,resizable:!1,hideable:!1,menuDisabled:!0,tdCls:me.tdCls,cls:Ext.baseCSSPrefix+'selmodel-column',stopSelection:!1,editRenderer:me.editRenderer||me.renderEmpty,locked:me.hasLockedHeader,updateHeaderState:me.updateHeaderState.bind(me),toggleAll:Ext.emptyFn,setRecordCheck:Ext.emptyFn,isRecordChecked:Ext.emptyFn}},renderEmpty:function(){return'\u00a0'},getStoreListeners:function(){var me=this,r=me.callParent();r.priority=2000;r.refresh=me.onStoreChanged;r.clear=me.onStoreChanged;return r},onHeaderClick:function(headerCt,header,e){var me=this,sel=me.selected,isSelected=!1;if(header===me.numbererColumn||header===me.checkColumn){e.stopEvent();if(!sel||!sel.isAllSelected()){me.selectAll()}else{me.deselectAll()}
me.updateHeaderState();me.lastColumnSelected=null}else if(me.columnSelect){if(e.shiftKey&&sel&&sel.lastColumnSelected){sel.setRangeEnd(header);me.fireSelectionChange()}else{isSelected=me.isColumnSelected(header);if(sel){if(!e.ctrlKey){sel.clear();me.updateSelectionExtender()}else if(isSelected){me.deselectColumn(header);me.selected.lastColumnSelected=null}}
if(!isSelected||(!e.ctrlKey&&e.pointerType!=='touch')){me.selectColumn(header,e.ctrlKey);sel=me.selected;sel.lastColumnSelected=header;if(!sel.startColumn){sel.startColumn=header}}}
me.lastOverColumn=header}},selectByPosition:function(position){var me=this;position=new Ext.grid.CellContext(me.view).setPosition(position.row,position.column);if(me.getCellSelect()){me.selectCells(position,position)}else if(me.getRowSelect()){this.select(position.record)}else if(me.getColumnSelect()){me.selectColumn(position.column)}},updateHeaderState:function(){var me=this,store=me.view.dataSource,views=me.views,sel=me.selected,isChecked=!1,checkHd=me.checkColumn,storeCount;if(store&&sel&&sel.isRows){storeCount=store.getCount();if(store.isBufferedStore){isChecked=sel.allSelected}else{isChecked=storeCount>0&&(storeCount===sel.getCount())}}
if(views&&views.length){if(checkHd){checkHd.setHeaderStatus(isChecked)}}},onBindStore:function(store,oldStore,initial){if(!initial){this.onStoreRefresh()}},onBeforeReconfigure:function(grid,store,columns,oldStore,oldColumns){var me=this,checkboxColumnIndex=me.checkboxColumnIndex;if(columns){Ext.suspendLayouts();if(me.numbererColumn){me.numbererColumn.ownerCt.remove(me.numbererColumn,!1);columns.unshift(me.numbererColumn)}
if(me.checkColumn){if(checkboxColumnIndex==='first'){checkboxColumnIndex=0}else if(checkboxColumnIndex==='last'){checkboxColumnIndex=columns.length}
me.checkColumn.ownerCt.remove(me.checkColumn,!1);Ext.Array.insert(columns,checkboxColumnIndex,[me.checkColumn])}
Ext.resumeLayouts()}},getCellContext:function(record,column){return new Ext.grid.CellContext(this.view.ownerGrid.getView()).setPosition(record,column)},select:function(records,keepExisting,suppressEvent){var me=this,sel=me.selected,view=me.view,store=view.dataSource,len,i,record,changed=!1;if(!sel||!sel.isRows){me.resetSelection(!0);sel=me.selected=new Ext.grid.selection.Rows(view)}else if(!keepExisting){sel.clear()}
if(!Ext.isArray(records)){records=[records]}
len=records.length;for(i=0;i<len;i++){record=records[i];if(typeof record==='number'){record=store.getAt(record)}
if(!sel.contains(record)){sel.add(record);changed=!0}}
if(changed){me.updateHeaderState();if(!suppressEvent){me.fireSelectionChange()}}},deselect:function(records,suppressEvent){var me=this,sel=me.selected,store=me.view.dataSource,len,i,record,changed=!1;if(sel&&sel.isRows){if(!Ext.isArray(records)){records=[records]}
len=records.length;for(i=0;i<len;i++){record=records[i];if(typeof record==='number'){record=store.getAt(record)}
sel.remove(record);if(!changed){changed=!0}}}
if(changed){me.updateHeaderState();if(!suppressEvent){me.fireSelectionChange()}}},selectCells:function(rangeStart,rangeEnd,suppressEvent){var me=this,view=me.view.ownerGrid.view,sel;rangeStart=rangeStart.isCellContext?rangeStart.clone():new Ext.grid.CellContext(view).setPosition(rangeStart);rangeEnd=rangeEnd.isCellContext?rangeEnd.clone():new Ext.grid.CellContext(view).setPosition(rangeEnd);me.resetSelection(!0);me.selected=sel=new Ext.grid.selection.Cells(rangeStart.view);sel.setRangeStart(rangeStart);sel.setRangeEnd(rangeEnd);if(!suppressEvent){me.fireSelectionChange()}},selectAll:function(suppressEvent){var me=this,sel=me.selected,doSelect,view=me.view;if(me.rowSelect){if(!sel||!sel.isRows){me.resetSelection(!0);me.selected=sel=new Ext.grid.selection.Rows(view)}
doSelect=!0}else if(me.cellSelect){if(!sel||!sel.isCells){me.resetSelection(!0);me.selected=sel=new Ext.grid.selection.Cells(view)}
doSelect=!0}else if(me.columnSelect){if(!sel||!sel.isColumns){me.resetSelection(!0);me.selected=sel=new Ext.grid.selection.Columns(view)}
doSelect=!0}
if(sel){sel.allSelected=!0}
if(doSelect){me.updateHeaderState();sel.selectAll();if(!suppressEvent){me.fireSelectionChange()}}},deselectAll:function(suppressEvent){var me=this,sel=me.selected;if(sel&&sel.getCount()){sel.clear();sel.allSelected=!1;me.updateHeaderState();if(!suppressEvent){me.fireSelectionChange()}}},selectRows:function(rows,keepSelection,suppressEvent){var me=this,sel=me.selected,isSelectingRows=sel&&sel.isRows,len=rows.length,i;if(!keepSelection||!isSelectingRows){me.resetSelection(!0)}
if(!isSelectingRows){me.selected=sel=new Ext.grid.selection.Rows(me.view)}
if(rows.isEntity){sel.add(rows)}else{for(i=0;i<len;i++){sel.add(rows[i])}}
if(!suppressEvent){me.fireSelectionChange()}},isSelected:function(record){return this.isRowSelected(record)},selectColumn:function(column,keepSelection,suppressEvent){var me=this,selData=me.selected,view=column.getView();if(!selData||!selData.isColumns||selData.view!==view.ownerGrid.view){me.resetSelection(!0);me.selected=selData=new Ext.grid.selection.Columns(view)}
if(!selData.contains(column)){if(!keepSelection){selData.clear()}
selData.add(column);me.updateHeaderState();if(!suppressEvent){me.fireSelectionChange()}}},deselectColumn:function(column,suppressEvent){var me=this,selData=me.getSelected();if(selData&&selData.isColumns&&selData.contains(column)){selData.remove(column);me.updateHeaderState();if(!suppressEvent){me.fireSelectionChange()}}},getSelection:function(){var selData=this.selected;if(selData&&selData.isRows){return selData.getRecords()}
return[]},destroy:function(){var me=this,scrollEls=me.scrollEls;Ext.destroy(me.gridListeners,me.viewListeners,me.selected,me.navigationListeners,me.extensible);if(scrollEls){Ext.dd.ScrollManager.unregister(scrollEls)}
if(me._onMouseUp&&!me._onMouseUp.destroyed){me.stopAutoScroller();me._onMouseUp.destroy()}
me.selected=me.gridListeners=me.viewListeners=me.selectionData=me.navigationListeners=me.scrollEls=null;me.callParent()},privates:{axesConfigs:{x:1,y:2,xy:3,both:3,"true":3},getNumbererColumnConfig:function(){var me=this;return{xtype:'rownumberer',width:me.rowNumbererHeaderWidth,editRenderer:me.renderEmpty,tdCls:me.rowNumbererTdCls,cls:me.rowNumbererHeaderCls,locked:me.hasLockedHeader}},getViewListeners:function(){return{refresh:this.onViewRefresh,keyup:{element:'el',fn:this.onViewKeyUp,scope:this}}},onViewKeyUp:function(e){var sel=this.selected;if(e.keyCode===e.SHIFT&&sel&&sel.isRows&&sel.getRangeSize()){sel.addRange()}},onStoreChanged:function(){var me=this,selData=me.selected;if(selData){if(selData.isCells){me.resetSelection()}else if(selData.isRows){if(me.pruneRemoved===!1&&selData.selectedRecords.length){me.refresh()}else{me.resetSelection()}}}},onColumnsChanged:function(){var me=this,selectionChanged=me.onViewChanged(me.view,!0);Ext.on('idle',selectionChanged?me.fireSelectionChange:me.updateSelectionExtender,me,{single:!0})},onColumnMove:function(){this.updateSelectionExtender()},onViewRefresh:function(view){var me=this,selectionChanged=me.onViewChanged(view);me[selectionChanged?'fireSelectionChange':'updateSelectionExtender']()},resetSelection:function(suppressEvent){var sel=this.selected;if(sel){sel.clear();if(!suppressEvent){this.fireSelectionChange()}}},onViewChanged:function(view,isColumnChange){var me=this,selData=me.selected,store=view.store,selectionChanged=!1,rowRange,colCount,colIdx,rowIdx,context;if(selData){view=selData.view;if(isColumnChange){if(selData.isCells){context=new Ext.grid.CellContext(view);rowRange=selData.getRowRange();colCount=view.ownerGrid.getColumnManager().getColumns().length;if(colCount){for(rowIdx=rowRange[0];rowIdx<=rowRange[1];rowIdx++){context.setRow(rowIdx);for(colIdx=0;colIdx<colCount;colIdx++){context.setColumn(colIdx);if(context.column){view.onCellDeselect(context)}
if(me.maybeClearSelection(context)){selectionChanged=!0}}}}else{me.clearSelections();selectionChanged=!0}}else if(selData.isColumns){selectionChanged=!1;selData.eachColumn(function(column,columnIdx){if(!column.isVisible()||!view.ownerGrid.isAncestor(column)){me.remove(column);if(me.maybeClearSelection({column:column})){selectionChanged=!0}}})}}else if(selData.isRows&&store.isFiltered()){selData.eachRow(function(rec){if(!store.contains(rec)){this.remove(rec);if(me.maybeClearSelection({rowIdx:view.indexOf(rec)})){selectionChanged=!0}}})}}
return selectionChanged},onViewCreated:function(grid,view){var me=this,ownerGrid=view.ownerGrid,headerCt=view.headerCt;if(!ownerGrid.lockable||view.isLockedView){if(me.getRowSelect()){me.getNumbererColumn()}
if(me.checkboxSelect){me.addCheckbox(view,!0)}
me.mon(view.ownerGrid,'beforereconfigure',me.onBeforeReconfigure,me)}
headerCt.sortOnClick=!me.getColumnSelect();if(me.getDragSelect()){view.on('render',me.onViewRender,me,{single:!0})}},onViewRender:function(view){var me=this,el=view.getEl(),views=me.views,len=views.length,i;for(i=0;i<len;i++){views[i].headerCt.sortOnClick=!me.columnSelect}
el.ddScrollConfig={vthresh:50,hthresh:50,frequency:300,increment:100};Ext.dd.ScrollManager.register(el);(me.scrollEls||(me.scrollEls=[])).push(el);view.on('cellmousedown',me.handleMouseDown,me);if(view.lockingPartner){view.lockingPartner.on('cellmousedown',me.handleMouseDown,me)}},handleMouseDown:function(view,td,cellIndex,record,tr,rowIdx,e){var me=this,sel=me.selected,header=e.position.column,resumingSelection=!1,isCheckClick,startDragSelect,containsSelection;if(e.button||e.altKey||e.pointerType==='touch'||!header){return}
me.mousedownPosition=e.position.clone();isCheckClick=header===me.checkColumn;if(isCheckClick){me.checkCellClicked=e.position.getCell(!0)}else if(view.actionableMode){return}
if(header===me.numbererColumn||isCheckClick||!me.cellSelect){if(me.rowSelect){if(sel){containsSelection=sel.contains(record);if(e.shiftKey&&containsSelection){resumingSelection=!0}else if(!e.shiftKey&&!e.ctrlKey&&!isCheckClick){sel.clear()}}
if(!sel||!sel.isRows){if(sel){sel.clear()}
sel=me.selected=new Ext.grid.selection.Rows(view)}}else if(me.columnSelect){if(sel){containsSelection=sel.contains(me.mousedownPosition.column);if(e.shiftKey&&containsSelection){resumingSelection=!0}else if(!e.shiftKey&&!e.ctrlKey&&!isCheckClick){sel.clear()}}
if(!sel||!sel.isColumns){if(sel){sel.clear()}
sel=me.selected=new Ext.grid.selection.Columns(view)}}else{return!1}}else{if(sel){containsSelection=sel.contains(me.getCellContext(record,cellIndex));if(e.shiftKey&&containsSelection){resumingSelection=!0}else if(!e.shiftKey){sel.clear()}}
if(!sel||!sel.isCells){if(sel){sel.clear()}
sel=me.selected=new Ext.grid.selection.Cells(view)}}
startDragSelect=resumingSelection||!e.shiftKey;if(!resumingSelection){if(e.shiftKey){return}
me.lastOverRecord=me.lastOverColumn=null}
me._onMouseUp=Ext.getBody().on('mouseup',me.onMouseUp,me,{single:!0,view:sel.view,destroyable:!0});if(startDragSelect){sel.view.el.on('mousemove',me.onMouseMove,me,{view:sel.view})}},onMouseMove:function(e,target,opts){var me=this,view=opts.view,cell=e.getTarget(view.cellSelector),header=opts.view.getHeaderByCell(cell),selData=me.selected;if(view.isLockingView){view=e.within(view.lockedView.el)?view.lockedView:view.normalView}
if(me.checkCellClicked){if(cell===me.checkCellClicked){if(!me.lastOverRecord){me.lastOverRecord=view.getRecord(cell.parentNode)}
return}else{me.checkCellClicked=null;if(me.lastOverRecord){me.select(me.lastOverRecord);selData.setRangeStart(me.store.indexOf(me.lastOverRecord))}}}
me.isDragging=!0;if(me.extensible){me.extensible.disable()}
if(header){me.changeSelectionRange(view,cell,header,e)}else if(!e.within(view.body.el)){me.scrollTowardsPointer(e,view.ownerGrid.view)}},changeSelectionRange:function(view,cell,header,e){var me=this,selData=me.selected,record,rowIdx,recChange,colChange,pos;me.stopAutoScroller();record=view.getRecord(cell.parentNode);rowIdx=me.store.indexOf(record);recChange=record!==me.lastOverRecord;colChange=header!==me.lastOverColumn;if(recChange||colChange){pos=me.getCellContext(record,header)}
if(selData.isRows){if(recChange){if(me.lastOverRecord){selData.setRangeEnd(rowIdx,e.ctrlKey)}else{selData.setRangeStart(rowIdx)}}}else if(selData.isCells){if(recChange||colChange){if(me.lastOverRecord){selData.setRangeEnd(pos)}else{selData.setRangeStart(pos)}}}else if(selData.isColumns){if(colChange){if(me.lastOverColumn){selData.setRangeEnd(pos.column)}else{selData.setRangeStart(pos.column)}}}
if(recChange||colChange){view.getNavigationModel().setPosition(new Ext.grid.CellContext(header.getView()).setPosition(record,header))}
me.lastOverColumn=header;me.lastOverRecord=record},scrollTowardsPointer:function(e,view){var me=this,viewRegion=view.el.getConstrainRegion(),point=e.getXY(),scrollTask,scrollBy;scrollTask=me.scrollTask||(me.scrollTask=Ext.util.TaskManager.newTask({run:me.doAutoScroll,args:[e,view],scope:me,interval:10}));scrollBy=me.scrollBy||(me.scrollBy=[]);if(point[1]>viewRegion.bottom){scrollBy[0]=0;scrollBy[1]=3;scrollTask.start()}else if(point[1]<viewRegion.top){scrollBy[0]=0;scrollBy[1]=-3;scrollTask.start()}else if(point[0]>viewRegion.right){scrollBy[0]=3;scrollBy[1]=0;scrollTask.start()}else if(point[0]<viewRegion.left){scrollBy[0]=-3;scrollBy[1]=0;scrollTask.start()}},doAutoScroll:function(e,view){var me=this,viewRegion=view.el.getConstrainRegion(),xy=[],cell,record,header;if(me.destroyed){return}
if(view.scrollBy){view.scrollBy.apply(view,me.scrollBy)}
if(me.scrollBy[0]){xy[0]=me.scrollBy[0]>0?viewRegion.right-5:viewRegion.left+5}else{xy[0]=e.getX()}
if(me.scrollBy[1]){xy[1]=me.scrollBy[1]>0?viewRegion.bottom-5:viewRegion.top+5}else{xy[1]=e.getY()}
cell=document.elementFromPoint.apply(document,xy);if(cell){cell=Ext.fly(cell).up(view.cellSelector);if(!cell){me.stopAutoScroller();return}
record=view.getRecord(cell.dom.parentNode);header=view.getHeaderByCell(cell.dom);if(cell&&(record!==me.lastOverRecord||header!==me.lastOverColumn)){me.changeSelectionRange(view,cell.dom,header,e)}}},stopAutoScroller:function(){var me=this;if(me.scrollTask){me.scrollBy[0]=me.scrollBy[1]=0;me.scrollTask.stop();me.scrollTask=null}},onMouseUp:function(e,target,opts){var me=this,view=opts.view,lastPos=me.lastOverRecord&&new Ext.grid.CellContext(view).setPosition(me.lastOverRecord,me.lastOverColumn),changedCell=lastPos&&!lastPos.isEqual(me.mousedownPosition),cell,record;me.checkCellClicked=null;me.stopAutoScroller();if(view&&!view.destroyed){if(!e.position){cell=e.getTarget(view.cellSelector);if(cell){record=view.getRecord(cell);if(record){e.position=new Ext.grid.CellContext(view).setPosition(record,view.getHeaderByCell(cell))}}}
if(e.position){changedCell=!e.position.isEqual(me.mousedownPosition)}
if(me.extensible&&changedCell){me.extensible.disable()}
view.el.un('mousemove',me.onMouseMove,me);if(me.selected.isRows&&me.isDragging){me.selected.addRange()}
if(changedCell){me.fireSelectionChange()}}
me.isDragging=!1},addCheckbox:function(view,initial){var me=this,checkbox=me.checkboxColumnIndex,headerCt=view.headerCt;if(checkbox!==!1){if(checkbox==='first'){checkbox=0}else if(checkbox==='last'){checkbox=headerCt.getColumnCount()}
me.checkColumn=headerCt.add(checkbox,me.getCheckboxHeaderConfig())}
if(initial!==!0){view.refresh()}},onNavigate:function(navigateEvent){var me=this,view=navigateEvent.view&&navigateEvent.view.ownerGrid.view,record=navigateEvent.record,sel=me.selected,pos=view&&new Ext.grid.CellContext(view).setPosition(record,navigateEvent.column),keyEvent=navigateEvent.keyEvent,ctrlKey=keyEvent.ctrlKey,shiftKey=keyEvent.shiftKey,keyCode=keyEvent.getKey(),selectionChanged,rowRangeStart,lastRecord;if(!pos){return}
if(keyEvent.stopSelection){return}
if(ctrlKey&&(keyCode===keyEvent.UP||keyCode===keyEvent.LEFT||keyCode===keyEvent.RIGHT||keyCode===keyEvent.DOWN)){return}
if(sel&&(sel.isCells||(sel.isColumns&&!me.getRowSelect()&&!ctrlKey))&&sel.getCount()>1){if(shiftKey&&keyEvent.type==='click'&&!keyEvent.position.isEqual(me.mousedownPosition)){return}}
if(!(me.cellSelect||me.columnSelect||me.rowSelect)||!navigateEvent.record||keyEvent.type==='mousedown'){return}
if(ctrlKey&&keyEvent.keyCode===keyEvent.A){if(!sel||sel.getCount()<2){me.selectAll()}else{me.deselectAll()}
me.updateHeaderState();return}
if(shiftKey){if(pos.column===me.numbererColumn||pos.column===me.checkColumn||!(me.cellSelect||me.columnSelect)||(sel&&sel.isRows)){if(me.rowSelect){if(!sel||!sel.isRows||sel.view!==view){me.resetSelection(!0);sel=me.selected=new Ext.grid.selection.Rows(view)}
if(!sel.getRangeSize()){rowRangeStart=navigateEvent.previousRecordIndex;if(rowRangeStart==null){lastRecord=me.getLastSelected();rowRangeStart=lastRecord?me.store.indexOf(lastRecord):0}
sel.setRangeStart(rowRangeStart)}
sel.setRangeEnd(navigateEvent.recordIndex);sel.addRange();selectionChanged=!0}}else{if(me.cellSelect){if(!sel||!sel.isCells||sel.view!==view){me.resetSelection(!0);sel=me.selected=new Ext.grid.selection.Cells(view)}
if(!sel.getRangeSize()){sel.setRangeStart(navigateEvent.previousPosition||me.getCellContext(0,0))}
sel.setRangeEnd(pos);selectionChanged=!0}else if(me.columnSelect){if(!sel||!sel.isColumns||sel.view!==view){me.resetSelection(!0);sel=me.selected=new Ext.grid.selection.Columns(view)}
if(!sel.getCount()){sel.setRangeStart(pos.column)}
sel.setRangeEnd(navigateEvent.position.column);selectionChanged=!0}}}else{if(pos.column===me.numbererColumn||pos.column===me.checkColumn||(me.rowSelect&&!me.cellSelect)){if(!sel||!sel.isRows||sel.view!==view){me.resetSelection(!0);sel=me.selected=new Ext.grid.selection.Rows(view)}
if(ctrlKey||pos.column===me.checkColumn){if(sel.contains(record)){sel.remove(record)}else{sel.add(record)}}else{sel.clear();sel.add(record);sel.setRangeStart(pos.rowIdx,!0)}
selectionChanged=!0}else if(keyEvent.getTarget(me.view.getCellSelector())){if(me.cellSelect){if(!sel||!sel.isCells||sel.view!==view){me.resetSelection(!0);me.selected=sel=new Ext.grid.selection.Cells(view)}else{sel.clear()}
sel.setRangeStart(pos);selectionChanged=!0}else if(me.columnSelect){if(!sel||!sel.isColumns||sel.view!==view){me.resetSelection(!0);me.selected=sel=new Ext.grid.selection.Columns(view)}
if(ctrlKey){if(sel.contains(pos.column)){sel.remove(pos.column)}else{sel.add(pos.column)}}else{sel.setRangeStart(pos.column)}
selectionChanged=!0}}}
if(selectionChanged){if(sel.isRows){me.updateHeaderState()}
me.lastOverRecord=record;me.lastOverColumn=pos.column;me.fireSelectionChange()}},maybeClearSelection:function(removedContext){var me=this,selData=me.selected,startCell=selData.startCell,endCell=selData.endCell,column=removedContext.column,colIdx=removedContext.colIdx,rowIdx=removedContext.rowIdx,changed;if(startCell&&(startCell.column===column||startCell.colIdx===colIdx)&&startCell.rowIdx===rowIdx){selData.startCell=changed=null}
if(endCell&&(endCell.column===column||endCell.colIdx===colIdx)&&endCell.rowIdx===rowIdx){selData.endCell=changed=null}
return changed===null},isRowSelected:function(record){var me=this,sel=me.selected;if(sel&&sel.isRows){record=Ext.isNumber(record)?me.store.getAt(record):record;return sel.contains(record)}else{return!1}},isColumnSelected:function(column){var me=this,sel=me.selected;if(sel&&sel.isColumns){return sel.contains(column)}else{return!1}},isCellSelected:function(view,row,column){var me=this,testPos,sel=me.selected;view=view.ownerGrid.view;if(sel){if(sel.isColumns){if(typeof column==='number'){column=view.getVisibleColumnManager().getColumns()[column]}
return sel.contains(column)}
if(sel.isCells){testPos=new Ext.grid.CellContext(view).setPosition({row:row,column:column});return sel.contains(testPos)}}
return!1},applySelected:function(selected){if(selected&&!(selected.isRows||selected.isCells||selected.isColumns)){Ext.raise('SpreadsheelModel#setSelected must be passed an instance '+'of Ext.grid.selection.Selection')}
return selected},updateSelected:function(selected,oldSelected){var view,columns,len,i,cell;if(oldSelected){oldSelected.clear()}
if(selected&&selected.getCount()){view=selected.view;if(selected.isRows){selected.eachRow(view.onRowSelect,view)}else if(selected.isColumns){columns=selected.getColumns();len=columns.length;if(len){cell=new Ext.grid.CelContext(view);view.store.each(function(rec){cell.setRow(rec);for(i=0;i<len;i++){cell.setColumn(columns[i]);view.onCellSelect(cell)}})}}else if(selected.isCells){selected.eachCell(view.onCellSelect,view)}}},getNumbererColumn:function(col){var me=this,result=me.numbererColumn,view=me.view;if(!result){if(view.isNormalView){view=view.ownerGrid.lockedGrid}
result=me.numbererColumn=view.headerCt.down('rownumberer')||view.headerCt.add(0,me.getNumbererColumnConfig())}
return result},updateRowSelect:function(rowSelect){var me=this,sel=me.selected,view=me.view;if(view&&view.rendered){if(rowSelect){if(me.checkColumn){me.checkColumn.show()}
me.getNumbererColumn().show()}else{if(me.checkColumn){me.checkColumn.hide()}
if(me.numbererColumn){me.numbererColumn.hide()}}
if(!rowSelect&&sel&&sel.isRows){sel.clear();me.fireSelectionChange()}}},updateColumnSelect:function(columnSelect){var me=this,sel=me.selected,views=me.views,len=views?views.length:0,i;for(i=0;i<len;i++){views[i].headerCt.sortOnClick=!columnSelect}
if(!columnSelect&&sel&&sel.isColumns){sel.clear();me.fireSelectionChange()}
if(columnSelect){me.view.ownerGrid.addCls(me.columnSelectCls)}else{me.view.ownerGrid.removeCls(me.columnSelectCls)}},updateCellSelect:function(cellSelect){var me=this,sel=me.selected;if(!cellSelect&&sel&&sel.isCells){sel.clear();me.fireSelectionChange()}},fireSelectionChange:function(){var me=this,sel=me.selected,view=sel.view,grid=view.ownerGrid,store=view.dataSource,records,count;me.updateSelectionExtender();if(sel.isRows){records=sel.getRecords();count=store.getTotalCount()||store.getCount();me.selected.allSelected=!!(store.isBufferedStore?me.selected.allSelected:count&&records.length&&(count===records.length));me.fireEvent('selectionchange',me,records)}else if(sel.isCells){me.selected.allSelected=!1;me.fireEvent('selectionchange',me,sel.getCount()?me.store.getRange.apply(sel.view.dataSource,sel.getRowRange()):[])}
grid.fireEvent('selectionchange',grid,sel)},getLastSelected:function(){var sel=this.selected;if(sel.getLastSelected){return sel.getLastSelected()}},updateSelectionExtender:function(){var sel=this.selected;if(sel){sel.onSelectionFinish()}},onSelectionFinish:function(sel,firstCell,lastCell){var extensible=this.getExtensible();if(extensible){extensible.setHandle(firstCell,lastCell)}},applyExtensible:function(extensible){var me=this;if(!extensible){return undefined}
if(extensible===!0||typeof extensible==='string'){extensible={axes:me.axesConfigs[extensible]}}else{extensible=Ext.Object.chain(extensible)}
extensible.allowReduceSelection=me.getReducible();extensible.view=me.selected.view;return new Ext.grid.selection.SelectionExtender(extensible)},applyReducible:function(reducible){return!!reducible},updateReducible:function(reducible){var extensible=this.extensible;if(extensible){extensible.allowReduceSelection=reducible}},extendSelection:function(extension){var me=this,sel=me.selected,action=extension.reduce?'reduce':'extend';if(me.view.ownerGrid.fireEvent('beforeselectionextend',me.view.ownerGrid,sel,extension)!==!1){sel[action+'Range'](extension);me.fireSelectionChange()}},onIdChanged:function(store,rec,oldId,newId){var sel=this.selected;if(sel&&sel.isRows&&sel.selectedRecords){sel.selectedRecords.updateKey(rec,oldId)}},onPageAdd:function(pageMap,pageNumber,records){var sel=this.selected,len=records.length,i,record,selected=sel&&sel.selectedRecords;if(selected&&sel.isRows){for(i=0;i<len;i++){record=records[i];if(selected.get(record.id)){selected.replace(record)}else if(sel.allSelected){selected.add(record)}}}},refresh:function(){var sel=this.getSelected();if(sel&&sel.isRows){this.callParent()}},onStoreAdd:function(){var sel=this.getSelected();if(sel&&sel.isRows){this.callParent(arguments);this.updateHeaderState()}},onStoreClear:function(){this.resetSelection()},onStoreLoad:function(){var sel=this.getSelected();if(sel&&sel.isRows){this.callParent(arguments);this.updateHeaderState()}},onStoreRefresh:function(){var sel=this.selected;if(sel&&sel.isRows&&sel.selectedRecords){this.updateSelectedInstances(sel.selectedRecords)}
if(this.view){this.updateHeaderState()}},onPageRemove:function(pageMap,pageNumber,records){var sel=this.selected;if(!(sel&&sel.allSelected)){this.onStoreRemove(this.store,records)}},onStoreRemove:function(){var sel=this.getSelected();if(sel&&sel.isRows){this.callParent(arguments)}}}},function(SpreadsheetModel){var RowNumberer=Ext.ClassManager.get('Ext.grid.column.RowNumberer');if(RowNumberer){SpreadsheetModel.prototype.rowNumbererTdCls=Ext.grid.column.RowNumberer.prototype.tdCls+' '+Ext.baseCSSPrefix+'ssm-row-numberer-cell'}})
;
Ext.define('Ext.theme.triton.grid.selection.SpreadsheetModel',{override:'Ext.grid.selection.SpreadsheetModel',checkboxHeaderWidth:32})
;
Ext.define('Ext.util.Queue',{constructor:function(){this.clear()},add:function(obj,replace){var me=this,key=me.getKey(obj),prevEntry;if(!(prevEntry=me.map[key])){++me.length;me.items.push(obj);me.map[key]=obj}else if(replace){me.map[key]=obj;me.items[Ext.Array.indexOf(me.items,prevEntry)]=obj}
return obj},clear:function(){var me=this,items=me.items;me.items=[];me.map={};me.length=0;return items},contains:function(obj){var key=this.getKey(obj);return this.map.hasOwnProperty(key)},getCount:function(){return this.length},getKey:function(obj){return obj.id},remove:function(obj){var me=this,key=me.getKey(obj),items=me.items,index;if(me.map[key]){index=Ext.Array.indexOf(items,obj);Ext.Array.erase(items,index,1);delete me.map[key];--me.length}
return obj}})
;
Ext.define('Ext.layout.ContextItem',{heightModel:null,widthModel:null,sizeModel:null,optOut:!1,ownerSizePolicy:null,boxChildren:null,boxParent:null,children:[],dirty:null,dirtyCount:0,hasRawContent:!0,isContextItem:!0,isTopLevel:!1,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildDimensions:0,props:null,state:null,wrapsComponent:!1,constructor:function(config){var me=this,sizeModels=Ext.layout.SizeModel.sizeModels,configured=sizeModels.configured,shrinkWrap=sizeModels.shrinkWrap,el,lastBox,ownerCt,ownerCtContext,props,sizeModel,target,lastWidth,lastHeight,sameWidth,sameHeight,widthModel,heightModel,optOut;Ext.apply(me,config);target=me.target;el=me.el;me.id=target.id;me.flushedProps={};me.props=props={};me.styles={};if(!target.isComponent){lastBox=el.lastBox}else{me.wrapsComponent=!0;me.framing=target.frameSize||null;me.isComponentChild=target.ownerLayout&&target.ownerLayout.isComponentLayout;lastBox=target.lastBox;ownerCt=target.ownerCt;if(ownerCt&&(ownerCtContext=ownerCt.el&&me.context.items[ownerCt.el.id])){me.ownerCtContext=ownerCtContext}
me.sizeModel=sizeModel=target.getSizeModel(ownerCtContext&&ownerCtContext.widthModel.pairsByHeightOrdinal[ownerCtContext.heightModel.ordinal]);me.widthModel=widthModel=sizeModel.width;me.heightModel=heightModel=sizeModel.height;if(lastBox&&lastBox.invalid===!1){sameWidth=(target.width===(lastWidth=lastBox.width));sameHeight=(target.height===(lastHeight=lastBox.height));if(widthModel===shrinkWrap&&heightModel===shrinkWrap){optOut=!0}else if(widthModel===configured&&sameWidth){optOut=heightModel===shrinkWrap||(heightModel===configured&&sameHeight)}
if(optOut){me.optOut=!0;props.width=lastWidth;props.height=lastHeight}}}
me.lastBox=lastBox},init:function(full,options){var me=this,oldProps=me.props,oldDirty=me.dirty,ownerCtContext=me.ownerCtContext,ownerLayout=me.target.ownerLayout,firstTime=!me.state,ret=full||firstTime,children,i,n,ownerCt,sizeModel,target,oldHeightModel=me.heightModel,oldWidthModel=me.widthModel,newHeightModel,newWidthModel,remainingCount=0;me.dirty=me.invalid=!1;me.props={};me.remainingChildDimensions=0;if(me.boxChildren){me.boxChildren.length=0}
if(!firstTime){me.clearAllBlocks('blocks');me.clearAllBlocks('domBlocks')}
if(!me.wrapsComponent){return ret}
target=me.target;me.state={};if(firstTime){if(target.beforeLayout&&target.beforeLayout!==Ext.emptyFn){target.beforeLayout()}
if(!ownerCtContext&&(ownerCt=target.ownerCt)){ownerCtContext=me.context.items[ownerCt.el.id]}
if(ownerCtContext){me.ownerCtContext=ownerCtContext;me.isBoxParent=ownerLayout&&ownerLayout.isItemBoxParent(me)}else{me.isTopLevel=!0}
me.frameBodyContext=me.getEl('frameBody')}else{ownerCtContext=me.ownerCtContext;me.isTopLevel=!ownerCtContext;children=me.children;for(i=0,n=children.length;i<n;++i){children[i].init(!0)}}
me.hasRawContent=!(target.isContainer&&target.items.items.length>0);if(full){me.widthModel=me.heightModel=null;sizeModel=target.getSizeModel(ownerCtContext&&ownerCtContext.widthModel.pairsByHeightOrdinal[ownerCtContext.heightModel.ordinal]);if(firstTime){me.sizeModel=sizeModel}
me.widthModel=sizeModel.width;me.heightModel=sizeModel.height;if(ownerCtContext&&!me.isComponentChild){if(ownerLayout.needsItemSize||!target.liquidLayout){ownerCtContext.remainingChildDimensions+=2}else{if(me.widthModel.calculated){++ownerCtContext.remainingChildDimensions}
if(me.heightModel.calculated){++ownerCtContext.remainingChildDimensions}}}}else if(oldProps){me.recoverProp('x',oldProps,oldDirty);me.recoverProp('y',oldProps,oldDirty);if(me.widthModel.calculated){me.recoverProp('width',oldProps,oldDirty)}else if('width' in oldProps){++remainingCount}
if(me.heightModel.calculated){me.recoverProp('height',oldProps,oldDirty)}else if('height' in oldProps){++remainingCount}
if(ownerCtContext&&!me.isComponentChild){ownerCtContext.remainingChildDimensions+=remainingCount}}
if(oldProps&&ownerLayout&&ownerLayout.manageMargins){me.recoverProp('margin-top',oldProps,oldDirty);me.recoverProp('margin-right',oldProps,oldDirty);me.recoverProp('margin-bottom',oldProps,oldDirty);me.recoverProp('margin-left',oldProps,oldDirty)}
if(options){newHeightModel=options.heightModel;newWidthModel=options.widthModel;if(newWidthModel&&newHeightModel&&oldWidthModel&&oldHeightModel){if(oldWidthModel.shrinkWrap&&oldHeightModel.shrinkWrap){if(newWidthModel.constrainedMax&&newHeightModel.constrainedMin){newHeightModel=null}}}
if(newWidthModel){me.widthModel=newWidthModel}
if(newHeightModel){me.heightModel=newHeightModel}
if(options.state){Ext.apply(me.state,options.state)}}
return ret},initContinue:function(full){var me=this,ownerCtContext=me.ownerCtContext,comp=me.target,widthModel=me.widthModel,inheritedState=comp.getInherited(),boxParent;if(widthModel.fixed){inheritedState.inShrinkWrapTable=!1}else{delete inheritedState.inShrinkWrapTable}
if(full){if(ownerCtContext&&widthModel.shrinkWrap){boxParent=ownerCtContext.isBoxParent?ownerCtContext:ownerCtContext.boxParent;if(boxParent){boxParent.addBoxChild(me)}}else if(widthModel.natural){me.boxParent=ownerCtContext}}
return full},initDone:function(containerLayoutDone){var me=this,props=me.props,state=me.state;if(me.remainingChildDimensions===0){props.containerChildrenSizeDone=!0}
if(containerLayoutDone){props.containerLayoutDone=!0}
if(me.boxChildren&&me.boxChildren.length&&me.widthModel.shrinkWrap){me.el.setWidth(10000);state.blocks=(state.blocks||0)+1}},initAnimation:function(){var me=this,target=me.target,ownerCtContext=me.ownerCtContext;if(ownerCtContext&&ownerCtContext.isTopLevel){me.animatePolicy=target.ownerLayout.getAnimatePolicy(me)}else if(!ownerCtContext&&target.isCollapsingOrExpanding&&target.animCollapse){me.animatePolicy=target.componentLayout.getAnimatePolicy(me)}
if(me.animatePolicy){me.context.queueAnimation(me)}},addBlock:function(name,layout,propName){var me=this,collection=me[name]||(me[name]={}),blockedLayouts=collection[propName]||(collection[propName]={});if(!blockedLayouts[layout.id]){blockedLayouts[layout.id]=layout;++layout.blockCount;++me.context.blockCount}},addBoxChild:function(boxChildItem){var me=this,children,widthModel=boxChildItem.widthModel;boxChildItem.boxParent=this;boxChildItem.measuresBox=widthModel.shrinkWrap?boxChildItem.hasRawContent:widthModel.natural;if(boxChildItem.measuresBox){children=me.boxChildren;if(children){children.push(boxChildItem)}else{me.boxChildren=[boxChildItem]}}},addPositionStyles:function(styles,props){var x=props.x,y=props.y,count=0;if(x!==undefined){styles[this.translateProps.x]=x+'px';++count}
if(y!==undefined){styles.top=y+'px';++count}
return count},addTrigger:function(propName,inDom){var me=this,name=inDom?'domTriggers':'triggers',collection=me[name]||(me[name]={}),context=me.context,layout=context.currentLayout,triggers=collection[propName]||(collection[propName]={});if(!triggers[layout.id]){triggers[layout.id]=layout;++layout.triggerCount;triggers=context.triggers[inDom?'dom':'data'];(triggers[layout.id]||(triggers[layout.id]=[])).push({item:this,prop:propName});if(me.props[propName]!==undefined){if(!inDom||!(me.dirty&&(propName in me.dirty))){++layout.firedTriggers}}}},boxChildMeasured:function(){var me=this,state=me.state,count=(state.boxesMeasured=(state.boxesMeasured||0)+1);if(count===me.boxChildren.length){state.clearBoxWidth=1;++me.context.progressCount;me.markDirty()}},borderNames:['border-top-width','border-right-width','border-bottom-width','border-left-width'],marginNames:['margin-top','margin-right','margin-bottom','margin-left'],paddingNames:['padding-top','padding-right','padding-bottom','padding-left'],trblNames:['top','right','bottom','left'],cacheMissHandlers:{borderInfo:function(me){var info=me.getStyles(me.borderNames,me.trblNames);info.width=info.left+info.right;info.height=info.top+info.bottom;return info},marginInfo:function(me){var info=me.getStyles(me.marginNames,me.trblNames);info.width=info.left+info.right;info.height=info.top+info.bottom;return info},paddingInfo:function(me){var item=me.frameBodyContext||me,info=item.getStyles(me.paddingNames,me.trblNames);info.width=info.left+info.right;info.height=info.top+info.bottom;return info}},checkCache:function(entry){return this.cacheMissHandlers[entry](this)},clearAllBlocks:function(name){var collection=this[name],propName;if(collection){for(propName in collection){this.clearBlocks(name,propName)}}},clearBlocks:function(name,propName){var collection=this[name],blockedLayouts=collection&&collection[propName],context,layout,layoutId;if(blockedLayouts){delete collection[propName];context=this.context;for(layoutId in blockedLayouts){layout=blockedLayouts[layoutId];--context.blockCount;if(!--layout.blockCount&&!layout.pending&&!layout.done){context.queueLayout(layout)}}}},block:function(layout,propName){this.addBlock('blocks',layout,propName)},domBlock:function(layout,propName){this.addBlock('domBlocks',layout,propName)},fireTriggers:function(name,propName){var collection=this[name],triggers=collection&&collection[propName],context=this.context,layout,layoutId;if(triggers){for(layoutId in triggers){layout=triggers[layoutId];++layout.firedTriggers;if(!layout.done&&!layout.blockCount&&!layout.pending){context.queueLayout(layout)}}}},flush:function(){var me=this,dirty=me.dirty,state=me.state,targetEl=me.el;me.dirtyCount=0;if('attributes' in me){targetEl.set(me.attributes);delete me.attributes}
if('innerHTML' in me){targetEl.innerHTML=me.innerHTML;delete me.innerHTML}
if(state&&state.clearBoxWidth){state.clearBoxWidth=0;me.el.setStyle('width',null);if(!--state.blocks){me.context.queueItemLayouts(me)}}
if(dirty){delete me.dirty;me.writeProps(dirty,!0)}},flushAnimations:function(){var me=this,animateFrom=me.previousSize,target,animQueue,targetAnim,duration,animateProps,anim,changeCount,j,propsLen,propName,oldValue,newValue,flag;if(animateFrom){target=me.target;targetAnim=target.getAnimationProps();duration=targetAnim.duration;animateProps=Ext.Object.getKeys(me.animatePolicy);anim=Ext.apply({},{from:{},to:{},duration:duration||Ext.fx.Anim.prototype.duration},targetAnim);for(changeCount=0,j=0,propsLen=animateProps.length;j<propsLen;j++){propName=animateProps[j];oldValue=animateFrom[propName];newValue=me.peek(propName);if(oldValue!==newValue&&newValue!=null){propName=me.translateProps[propName]||propName;anim.from[propName]=oldValue;anim.to[propName]=newValue;++changeCount}}
if(changeCount){if(me.isCollapsingOrExpanding===1){target.componentLayout.undoLayout(me)}else{me.writeProps(anim.from)}
me.el.animate(anim);animQueue=Ext.fx.Manager.getFxQueue(me.el.id);anim=animQueue[animQueue.length-1];target.$layoutAnim=anim;anim.on({afteranimate:function(){var flag;delete target.$layoutAnim;if(target.destroying||target.destroyed){return}
flag=me.isCollapsingOrExpanding;if(flag===1){target.componentLayout.redoLayout(me);target.afterCollapse(!0)}else if(flag===2){target.afterExpand(!0)}
if(target.hasListeners.afterlayoutanimation){target.fireEvent('afterlayoutanimation',target)}}})}else{flag=me.isCollapsingOrExpanding;if(flag===1){target.afterCollapse(!0)}else if(flag===2){target.afterExpand(!0)}}}},getBorderInfo:function(){var me=this,info=me.borderInfo;if(!info){me.borderInfo=info=me.checkCache('borderInfo')}
return info},getEl:function(nameOrEl,owner){var me=this,src,el,elContext;if(nameOrEl){if(nameOrEl.dom){el=nameOrEl}else{src=me.target;if(owner){src=owner}
el=src[nameOrEl];if(typeof el==='function'){el=el.call(src);if(el===me.el){return this}}}
if(el){elContext=me.context.getEl(me,el)}}
return elContext||null},getFrameInfo:function(){var me=this,info=me.frameInfo,framing,border;if(!info){framing=me.framing;border=me.getBorderInfo();me.frameInfo=info=framing?{top:framing.top+border.top,right:framing.right+border.right,bottom:framing.bottom+border.bottom,left:framing.left+border.left,width:framing.width+border.width,height:framing.height+border.height}:border}
return info},getMarginInfo:function(){var me=this,info=me.marginInfo,comp,manageMargins,ownerLayout,ownerLayoutId;if(!info){if(!me.wrapsComponent){info=me.checkCache('marginInfo')}else{comp=me.target;ownerLayout=comp.ownerLayout;ownerLayoutId=ownerLayout?ownerLayout.id:null;manageMargins=ownerLayout&&ownerLayout.manageMargins;info=comp.margin$;if(info&&info.ownerId!==ownerLayoutId){info=null}
if(!info){info=me.parseMargins(comp,comp.margin)||me.checkCache('marginInfo');if(manageMargins){me.setProp('margin-top',0);me.setProp('margin-right',0);me.setProp('margin-bottom',0);me.setProp('margin-left',0)}
info.ownerId=ownerLayoutId;comp.margin$=info}
info.width=info.left+info.right;info.height=info.top+info.bottom}
me.marginInfo=info}
return info},clearMarginCache:function(){delete this.marginInfo;delete this.target.margin$},getPaddingInfo:function(){var me=this,info=me.paddingInfo;if(!info){me.paddingInfo=info=me.checkCache('paddingInfo')}
return info},getProp:function(propName){var me=this,result=me.props[propName];me.addTrigger(propName);return result},getDomProp:function(propName){var me=this,result=(me.dirty&&(propName in me.dirty))?undefined:me.props[propName];me.addTrigger(propName,!0);return result},getStyle:function(styleName){var me=this,styles=me.styles,info,value;if(styleName in styles){value=styles[styleName]}else{info=me.styleInfo[styleName];value=me.el.getStyle(styleName);if(info&&info.parseInt){value=parseInt(value,10)||0}
styles[styleName]=value}
return value},getStyles:function(styleNames,altNames){var me=this,styleCache=me.styles,values={},hits=0,n=styleNames.length,i,missing,missingAltNames,name,info,styleInfo,styles,value;altNames=altNames||styleNames;for(i=0;i<n;++i){name=styleNames[i];if(name in styleCache){values[altNames[i]]=styleCache[name];++hits;if(i&&hits===1){missing=styleNames.slice(0,i);missingAltNames=altNames.slice(0,i)}}else if(hits){(missing||(missing=[])).push(name);(missingAltNames||(missingAltNames=[])).push(altNames[i])}}
if(hits<n){missing=missing||styleNames;missingAltNames=missingAltNames||altNames;styleInfo=me.styleInfo;styles=me.el.getStyle(missing);for(i=missing.length;i--;){name=missing[i];info=styleInfo[name];value=styles[name];if(info&&info.parseInt){value=parseInt(value,10)||0}
values[missingAltNames[i]]=value;styleCache[name]=value}}
return values},hasProp:function(propName){return this.getProp(propName)!=null},hasDomProp:function(propName){return this.getDomProp(propName)!=null},invalidate:function(options){this.context.queueInvalidate(this,options)},markDirty:function(){if(++this.dirtyCount===1){this.context.queueFlush(this)}},onBoxMeasured:function(){var boxParent=this.boxParent,state=this.state;if(boxParent&&boxParent.widthModel.shrinkWrap&&!state.boxMeasured&&this.measuresBox){state.boxMeasured=1;boxParent.boxChildMeasured()}},parseMargins:function(comp,margins){var type,ret;if(margins===!0){margins=5}
type=typeof margins;if(type==='string'||type==='number'){ret=comp.parseBox(margins)}else if(margins){ret={top:0,right:0,bottom:0,left:0};if(margins){margins=Ext.apply(ret,comp.parseBox(margins))}}
return ret},peek:function(propName){return this.props[propName]},recalculateSizeModel:function(){var me=this,target=me.target,componentLayout=target.componentLayout,ownerCtContext=me.ownerCtContext,oldContext=componentLayout.ownerContext,sizeModel;componentLayout.ownerContext=null;me.sizeModel=sizeModel=target.getSizeModel(ownerCtContext&&ownerCtContext.widthModel.pairsByHeightOrdinal[ownerCtContext.heightModel.ordinal]);me.widthModel=sizeModel.width;me.heightModel=sizeModel.height;if(oldContext){componentLayout.ownerContext=me}},recoverProp:function(propName,oldProps,oldDirty){var me=this,props=me.props,dirty;if(propName in oldProps){props[propName]=oldProps[propName];if(oldDirty&&propName in oldDirty){dirty=me.dirty||(me.dirty={});dirty[propName]=oldDirty[propName]}}},redo:function(deep){var me=this,items,len,i;me.revertProps(me.props);if(deep&&me.wrapsComponent){if(me.childItems){for(i=0,items=me.childItems,len=items.length;i<len;i++){items[i].redo(deep)}}
for(i=0,items=me.children,len=items.length;i<len;i++){items[i].redo()}}},removeEl:function(nameOrEl,owner){var me=this,src,el;if(nameOrEl){if(nameOrEl.dom){el=nameOrEl}else{src=me.target;if(owner){src=owner}
el=src[nameOrEl];if(typeof el==='function'){el=el.call(src);if(el===me.el){return this}}}
if(el){me.context.removeEl(el,me)}}},revertProps:function(props){var name,flushed=this.flushedProps,reverted={};for(name in props){if(flushed.hasOwnProperty(name)){reverted[name]=props[name]}}
this.writeProps(reverted)},setAttribute:function(name,value){var me=this;if(!me.attributes){me.attributes={}}
me.attributes[name]=value;me.markDirty()},setBox:function(box){var me=this;if('left' in box){me.setProp('x',box.left)}
if('top' in box){me.setProp('y',box.top)}
me.setSize(box.width,box.height)},setContentHeight:function(height,measured){if(!measured&&this.hasRawContent){return 1}
return this.setProp('contentHeight',height)},setContentWidth:function(width,measured){if(!measured&&this.hasRawContent){return 1}
return this.setProp('contentWidth',width)},setContentSize:function(width,height,measured){return this.setContentWidth(width,measured)+this.setContentHeight(height,measured)===2},setProp:function(propName,value,dirty){var me=this,valueType=typeof value,info;if(valueType==='undefined'||(valueType==='number'&&isNaN(value))){return 0}
if(me.props[propName]===value){return 1}
me.props[propName]=value;++me.context.progressCount;if(dirty===!1){me.fireTriggers('domTriggers',propName);me.clearBlocks('domBlocks',propName)}else{info=me.styleInfo[propName];if(info){if(!me.dirty){me.dirty={}}
me.dirty[propName]=value;me.markDirty()}}
me.fireTriggers('triggers',propName);me.clearBlocks('blocks',propName);return 1},setHeight:function(height,dirty){var me=this,comp=me.target,ownerCtContext=me.ownerCtContext,frameBody,frameInfo,min,oldHeight,rem;if(height<0){height=0}
if(!me.wrapsComponent){if(!me.setProp('height',height,dirty)){return NaN}}else{min=me.collapsedVert?0:(comp.minHeight||0);height=Ext.Number.constrain(height,min,comp.maxHeight);oldHeight=me.props.height;if(!me.setProp('height',height,dirty)){return NaN}
if(ownerCtContext&&!me.isComponentChild&&isNaN(oldHeight)){rem=--ownerCtContext.remainingChildDimensions;if(!rem){ownerCtContext.setProp('containerChildrenSizeDone',!0)}}
frameBody=me.frameBodyContext;if(frameBody){frameInfo=me.getFrameInfo();frameBody[me.el.vertical?'setWidth':'setHeight'](height-frameInfo.height,dirty)}}
return height},setWidth:function(width,dirty){var me=this,comp=me.target,ownerCtContext=me.ownerCtContext,frameBody,frameInfo,min,oldWidth,rem;if(width<0){width=0}
if(!me.wrapsComponent){if(!me.setProp('width',width,dirty)){return NaN}}else{min=me.collapsedHorz?0:(comp.minWidth||0);width=Ext.Number.constrain(width,min,comp.maxWidth);oldWidth=me.props.width;if(!me.setProp('width',width,dirty)){return NaN}
if(ownerCtContext&&!me.isComponentChild&&isNaN(oldWidth)){rem=--ownerCtContext.remainingChildDimensions;if(!rem){ownerCtContext.setProp('containerChildrenSizeDone',!0)}}
frameBody=me.frameBodyContext;if(frameBody){frameInfo=me.getFrameInfo();frameBody.setWidth(width-frameInfo.width,dirty)}}
return width},setSize:function(width,height,dirty){this.setWidth(width,dirty);this.setHeight(height,dirty)},translateProps:{x:'left',y:'top'},undo:function(deep){var me=this,items,len,i;me.revertProps(me.lastBox);if(deep&&me.wrapsComponent){if(me.childItems){for(i=0,items=me.childItems,len=items.length;i<len;i++){items[i].undo(deep)}}
for(i=0,items=me.children,len=items.length;i<len;i++){items[i].undo()}}},unsetProp:function(propName){var dirty=this.dirty;delete this.props[propName];if(dirty){delete dirty[propName]}},writeProps:function(dirtyProps,flushing){if(!(dirtyProps&&typeof dirtyProps==='object')){Ext.Logger.warn('writeProps expected dirtyProps to be an object');return}
var me=this,el=me.el,target=me.target,styleInfo=me.styleInfo,styles={},width=dirtyProps.width,height=dirtyProps.height,styleCount=0,info,propName,numericValue,hasWidth,hasHeight,isAbsolute,scrollbarSize,style,targetEl,scroller;if('displayed' in dirtyProps){el.setDisplayed(dirtyProps.displayed)}
for(propName in dirtyProps){if(flushing){me.fireTriggers('domTriggers',propName);me.clearBlocks('domBlocks',propName);me.flushedProps[propName]=1}
info=styleInfo[propName];if(info&&info.dom){if(info.suffix&&(numericValue=parseInt(dirtyProps[propName],10))){styles[propName]=numericValue+info.suffix}else{styles[propName]=dirtyProps[propName]}
++styleCount}}
if('x' in dirtyProps||'y' in dirtyProps){if(target.isComponent){target.setPosition(dirtyProps.x,dirtyProps.y)}else{styleCount+=me.addPositionStyles(styles,dirtyProps)}}
if('overflowX' in dirtyProps){scroller=target.getScrollable();if(scroller){scroller.setX(dirtyProps.overflowX)}}
if('overflowY' in dirtyProps){if(scroller||(scroller=target.getScrollable())){scroller.setY(dirtyProps.overflowY)}}
if(me.wrapsComponent&&Ext.isIE9){if((hasWidth=width!==undefined&&me.hasOverflowY)||(hasHeight=height!==undefined&&me.hasOverflowX)){isAbsolute=me.isAbsolute;if(isAbsolute===undefined){isAbsolute=!1;targetEl=me.target.getTargetEl();style=targetEl.getStyle('position');me.isAbsolute=isAbsolute=(style==='absolute')}
if(isAbsolute){scrollbarSize=Ext.scrollbar.size();if(hasWidth){width=parseInt(width,10)+scrollbarSize.width;styles.width=width+'px';++styleCount}
if(hasHeight){height=parseInt(height,10)+scrollbarSize.height;styles.height=height+'px';++styleCount}}}}
if(styleCount){el.setStyle(styles)}},debugHooks:{$enabled:!1,addBlock:function(name,layout,propName){var blockedBy=(layout.blockedBy||(layout.blockedBy={}));blockedBy[this.id+'.'+propName+(name.substring(0,3)==='dom'?':dom':'')]=1;return this.callParent(arguments)},addBoxChild:function(boxChildItem){var ret=this.callParent(arguments),boxChildren=this.boxChildren,boxParents;if(boxChildren&&boxChildren.length===1){boxParents=this.context.boxParents||(this.context.boxParents=new Ext.util.MixedCollection());boxParents.add(this)}
return ret},addTrigger:function(propName,inDom){var layout=this.context.currentLayout,triggers;this.callParent(arguments);triggers=this.context.triggersByLayoutId;(triggers[layout.id]||(triggers[layout.id]={}))[this.id+'.'+propName+(inDom?':dom':'')]={item:this,name:propName}},checkAuthority:function(prop){var me=this,model=me[prop+'Model'],layout=me.context.currentLayout,ok,setBy;if(layout===me.target.ownerLayout){ok=model.calculated}else if(layout.isComponentLayout){ok=me.isTopLevel||model.auto||model.configured}
if(!ok){setBy=me.context.getLayoutName(layout);Ext.log(setBy+' cannot set '+prop)}},clearBlocks:function(name,propName){var collection=this[name],blockedLayouts=collection&&collection[propName],key=this.id+'.'+propName+(name.substring(0,3)==='dom'?':dom':''),layout,layoutId;if(blockedLayouts){for(layoutId in blockedLayouts){layout=blockedLayouts[layoutId];delete layout.blockedBy[key]}}
return this.callParent(arguments)},getEl:function(el){var child=this.callParent(arguments);if(child&&child!==this&&child.parent!==this){Ext.raise({msg:'Got element from wrong component'})}
return child},init:function(){var me=this,ret;ret=me.callParent(arguments);if(me.context.logOn.initItem){Ext.log(me.id,' consumers: content=',me.consumersContentWidth,'/',me.consumersContentHeight,', container=',me.consumersContainerWidth,'/',me.consumersContainerHeight,', size=',me.consumersWidth,'/',me.consumersHeight)}
return ret},invalidate:function(){if(this.wrapsComponent){if(this.context.logOn.invalidate){Ext.log('invalidate: ',this.id)}}else{Ext.raise({msg:'Cannot invalidate an element contextItem'})}
return this.callParent(arguments)},setProp:function(propName,value,dirty){var me=this,layout=me.context.currentLayout,setBy=me.context.getLayoutName(layout),fullName=me.id+'.'+propName,setByProps;if(value!==null){setByProps=me.setBy||(me.setBy={});if(!setByProps[propName]){setByProps[propName]=setBy}else if(setByProps[propName]!==setBy){Ext.log({level:'warn'},'BAD! ',fullName,' set by ',setByProps[propName],' and ',setBy)}}
if(me.context.logOn.setProp){if(typeof value!=='undefined'&&!isNaN(value)&&me.props[propName]!==value){Ext.log('set ',fullName,' = ',value,' (',dirty,')')}}
return this.callParent(arguments)},setHeight:function(height,dirty,force){if(!force&&this.wrapsComponent){this.checkAuthority('height')}
return this.callParent(arguments)},setWidth:function(width,dirty,force){if(!force&&this.wrapsComponent){this.checkAuthority('width')}
return this.callParent(arguments)}}},function(){var px={dom:!0,parseInt:!0,suffix:'px'},isDom={dom:!0},faux={dom:!1};this.prototype.styleInfo={containerChildrenSizeDone:faux,containerLayoutDone:faux,displayed:faux,done:faux,x:faux,y:faux,columnsChanged:faux,rowHeights:faux,viewOverflowY:faux,overflowX:faux,overflowY:faux,left:px,top:px,right:px,bottom:px,width:px,height:px,'border-top-width':px,'border-right-width':px,'border-bottom-width':px,'border-left-width':px,'margin-top':px,'margin-right':px,'margin-bottom':px,'margin-left':px,'padding-top':px,'padding-right':px,'padding-bottom':px,'padding-left':px,'line-height':isDom,display:isDom,clear:isDom}})
;
Ext.define('Ext.rtl.layout.ContextItem',{override:'Ext.layout.ContextItem',rtlTranslateProps:{x:'right',y:'top'},constructor:function(config){var me=this,componentContext=config.componentContext;me.callParent([config]);me.rtl=componentContext?componentContext.rtl:me.target.getInherited().rtl;if(me.rtl){me.translateProps=me.rtlTranslateProps}}})
;
Ext.define('Ext.layout.Context',{requires:['Ext.perf.Monitor','Ext.util.Queue','Ext.layout.ContextItem','Ext.layout.Layout','Ext.fx.Anim','Ext.fx.Manager'],remainingLayouts:0,state:0,cycleWatchDog:200,constructor:function(config){var me=this;Ext.apply(me,config);me.items={};me.layouts={};me.blockCount=0;me.cycleCount=0;me.flushCount=0;me.calcCount=0;me.animateQueue=me.newQueue();me.completionQueue=me.newQueue();me.finalizeQueue=me.newQueue();me.finishQueue=me.newQueue();me.flushQueue=me.newQueue();me.invalidateData={};me.layoutQueue=me.newQueue();me.invalidQueue=[];me.triggers={data:{},dom:{}}},callLayout:function(layout,methodName){this.currentLayout=layout;layout[methodName](this.getCmp(layout.owner))},cancelComponent:function(comp,isChild,isDestroying){var me=this,components=comp,isArray=!comp.isComponent,length=isArray?components.length:1,i,k,klen,items,layout,newQueue,oldQueue,entry,temp,ownerCtContext;for(i=0;i<length;++i){if(isArray){comp=components[i]}
if(isDestroying){if(comp.ownerCt){ownerCtContext=this.items[comp.ownerCt.el.id];if(ownerCtContext){Ext.Array.remove(ownerCtContext.childItems,me.getCmp(comp))}}else if(comp.rendered){me.removeEl(comp.el)}}
if(!isChild){oldQueue=me.invalidQueue;klen=oldQueue.length;if(klen){me.invalidQueue=newQueue=[];for(k=0;k<klen;++k){entry=oldQueue[k];temp=entry.item.target;if(temp!==comp&&!temp.up(comp)){newQueue.push(entry)}}}}
layout=comp.componentLayout;me.cancelLayout(layout);if(!comp.destroying){if(layout.getLayoutItems){items=layout.getLayoutItems();if(items.length){me.cancelComponent(items,!0)}}
if(comp.isContainer&&!comp.collapsed){layout=comp.layout;me.cancelLayout(layout);items=layout.getVisibleItems();if(items.length){me.cancelComponent(items,!0)}}}}},cancelLayout:function(layout){var me=this;me.completionQueue.remove(layout);me.finalizeQueue.remove(layout);me.finishQueue.remove(layout);me.layoutQueue.remove(layout);if(layout.running){me.layoutDone(layout)}
layout.ownerContext=null},clearTriggers:function(layout,inDom){var id=layout.id,collection=this.triggers[inDom?'dom':'data'],triggers=collection&&collection[id],length=(triggers&&triggers.length)||0,i,item,trigger;for(i=0;i<length;++i){trigger=triggers[i];item=trigger.item;collection=inDom?item.domTriggers:item.triggers;delete collection[trigger.prop][id]}},flush:function(){var me=this,items=me.flushQueue.clear(),length=items.length,i;if(length){++me.flushCount;for(i=0;i<length;++i){items[i].flush()}}},flushAnimations:function(){var me=this,items=me.animateQueue.clear(),len=items.length,i;if(len){for(i=0;i<len;i++){if(items[i].target.animate!==!1){items[i].flushAnimations()}}
Ext.fx.Manager.runner()}},flushInvalidates:function(){var me=this,queue=me.invalidQueue,length=queue&&queue.length,comp,components,entry,i;me.invalidQueue=[];if(length){components=[];for(i=0;i<length;++i){comp=(entry=queue[i]).item.target;if(!comp.container.isDetachedBody){components.push(comp);if(entry.options){me.invalidateData[comp.id]=entry.options}}}
me.invalidate(components,null)}},flushLayouts:function(queueName,methodName,dontClear){var me=this,layouts=dontClear?me[queueName].items:me[queueName].clear(),length=layouts.length,i,layout;if(length){for(i=0;i<length;++i){layout=layouts[i];if(!layout.running){me.callLayout(layout,methodName)}}
me.currentLayout=null}},getCmp:function(cmp){return this.getItem(cmp,cmp.el)},getEl:function(parent,el){var item=this.getItem(el,el,parent);if(!item.parent){item.parent=parent;if(parent.children.length){parent.children.push(item)}else{parent.children=[item]}}
return item},getItem:function(target,el,componentContext){var id=el.id,items=this.items,item;item=items[id]||(items[id]=new Ext.layout.ContextItem({context:this,target:target,el:el,componentContext:componentContext}));return item},handleFailure:function(){var layouts=this.layouts,layout,key;Ext.failedLayouts=(Ext.failedLayouts||0)+1;for(key in layouts){layout=layouts[key];if(layouts.hasOwnProperty(key)){layout.running=!1;layout.ownerContext=null}}
if(Ext.devMode===2&&!this.pageAnalyzerMode){Ext.raise('Layout run failed')}else{Ext.log.error('Layout run failed')}},invalidate:function(components,full){var me=this,isArray=!components.isComponent,containerLayoutDone,ownerLayout,firstTime,i,comp,item,items,length,componentLayout,layout,invalidateOptions,token,skipLayout;for(i=0,length=isArray?components.length:1;i<length;++i){comp=isArray?components[i]:components;if(comp.rendered&&!comp.hidden){ownerLayout=comp.ownerLayout;componentLayout=comp.componentLayout;skipLayout=!1;if((!ownerLayout||!ownerLayout.needsItemSize)&&comp.liquidLayout){skipLayout=!0}
if(!skipLayout||(ownerLayout&&ownerLayout.setsItemSize)){item=me.getCmp(comp);firstTime=!item.state;layout=(comp.isContainer&&!comp.collapsed)?comp.layout:null;invalidateOptions=me.invalidateData[item.id];delete me.invalidateData[item.id];token=item.init(full,invalidateOptions)}
if(skipLayout){continue}
if(invalidateOptions){me.processInvalidate(invalidateOptions,item,'before')}
if(componentLayout.beforeLayoutCycle){componentLayout.beforeLayoutCycle(item)}
if(layout&&layout.beforeLayoutCycle){layout.beforeLayoutCycle(item)}
token=item.initContinue(token);containerLayoutDone=!0;if(componentLayout.getLayoutItems){componentLayout.renderChildren();items=componentLayout.getLayoutItems();if(items.length){me.invalidate(items,!0)}}
if(layout){containerLayoutDone=!1;layout.renderChildren();if(layout.needsItemSize||layout.activeItemCount){items=layout.getVisibleItems();if(items.length){me.invalidate(items,!0)}}}
item.initDone(containerLayoutDone);me.resetLayout(componentLayout,item,firstTime);if(layout){me.resetLayout(layout,item,firstTime)}
item.initAnimation();if(invalidateOptions){me.processInvalidate(invalidateOptions,item,'after')}}}
me.currentLayout=null},isDescendant:function(ancestor,descendant){var c;if(ancestor.isContainer){for(c=descendant.ownerCt;c;c=c.ownerCt){if(c===ancestor){return!0}}}
return!1},layoutDone:function(layout){var ownerContext=layout.ownerContext;layout.running=!1;if(layout.isComponentLayout){if(ownerContext.measuresBox){ownerContext.onBoxMeasured()}
ownerContext.setProp('done',!0)}else{ownerContext.setProp('containerLayoutDone',!0)}
--this.remainingLayouts;++this.progressCount},newQueue:function(){return new Ext.util.Queue()},processInvalidate:function(options,item,name){var me=this,currentLayout;if(options[name]){currentLayout=me.currentLayout;me.currentLayout=options.layout||null;options[name](item,options);me.currentLayout=currentLayout}},queueAnimation:function(item){this.animateQueue.add(item)},queueCompletion:function(layout){this.completionQueue.add(layout)},queueFinalize:function(layout){this.finalizeQueue.add(layout)},queueFlush:function(item,replace){this.flushQueue.add(item,replace)},chainFns:function(oldOptions,newOptions,funcName){var me=this,oldLayout=oldOptions.layout,newLayout=newOptions.layout,oldFn=oldOptions[funcName],newFn=newOptions[funcName];return function(contextItem){var prev=me.currentLayout;if(oldFn){me.currentLayout=oldLayout;oldFn.call(oldOptions.scope||oldOptions,contextItem,oldOptions)}
me.currentLayout=newLayout;newFn.call(newOptions.scope||newOptions,contextItem,newOptions);me.currentLayout=prev}},purgeInvalidates:function(){var me=this,newQueue=[],oldQueue=me.invalidQueue,oldLength=oldQueue.length,oldIndex,newIndex,newEntry,newComp,oldEntry,oldComp,keep;for(oldIndex=0;oldIndex<oldLength;++oldIndex){oldEntry=oldQueue[oldIndex];oldComp=oldEntry.item.target;keep=!0;for(newIndex=newQueue.length;newIndex--;){newEntry=newQueue[newIndex];newComp=newEntry.item.target;if(oldComp.isLayoutChild(newComp)){keep=!1;break}
if(newComp.isLayoutChild(oldComp)){Ext.Array.erase(newQueue,newIndex,1)}}
if(keep){newQueue.push(oldEntry)}}
me.invalidQueue=newQueue},queueInvalidate:function(item,options){var me=this,newQueue=[],oldQueue=me.invalidQueue,index=oldQueue.length,comp,old,oldComp,oldOptions,oldState;if(item.isComponent){comp=item;item=me.items[comp.el.id];if(item){item.recalculateSizeModel()}else{item=me.getCmp(comp)}}else{comp=item.target}
item.invalid=!0;while(index--){old=oldQueue[index];oldComp=old.item.target;if(!comp.isFloating&&comp.up(oldComp)){return}
if(oldComp===comp){if(!(oldOptions=old.options)){old.options=options}else if(options){if(options.widthModel){oldOptions.widthModel=options.widthModel}
if(options.heightModel){oldOptions.heightModel=options.heightModel}
if(!(oldState=oldOptions.state)){oldOptions.state=options.state}else if(options.state){Ext.apply(oldState,options.state)}
if(options.before){oldOptions.before=me.chainFns(oldOptions,options,'before')}
if(options.after){oldOptions.after=me.chainFns(oldOptions,options,'after')}}
return}
if(!oldComp.isLayoutChild(comp)){newQueue.push(old)}}
newQueue.push({item:item,options:options});me.invalidQueue=newQueue},queueItemLayouts:function(item){var comp=item.isComponent?item:item.target,layout=comp.componentLayout;if(!layout.pending&&!layout.invalid&&!layout.done){this.queueLayout(layout)}
layout=comp.layout;if(layout&&!layout.pending&&!layout.invalid&&!layout.done&&!comp.collapsed){this.queueLayout(layout)}},queueLayout:function(layout){this.layoutQueue.add(layout);layout.pending=!0},removeEl:function(el,parent){var id=el.id,children=parent?parent.children:null,items=this.items;if(children){Ext.Array.remove(children,items[id])}
delete items[id]},resetLayout:function(layout,ownerContext,firstTime){var me=this;me.currentLayout=layout;layout.done=!1;layout.pending=!0;layout.firedTriggers=0;me.layoutQueue.add(layout);if(firstTime){me.layouts[layout.id]=layout;layout.running=!0;if(layout.finishedLayout){me.finishQueue.add(layout)}
++me.remainingLayouts;++layout.layoutCount;layout.ownerContext=ownerContext;layout.beginCount=0;layout.blockCount=0;layout.calcCount=0;layout.triggerCount=0;if(!layout.initialized){layout.initLayout()}
layout.beginLayout(ownerContext)}else{++layout.beginCount;if(!layout.running){++me.remainingLayouts;layout.running=!0;layout.ownerContext=ownerContext;if(layout.isComponentLayout){ownerContext.unsetProp('done')}
me.completionQueue.remove(layout);me.finalizeQueue.remove(layout)}}
layout.beginLayoutCycle(ownerContext,firstTime)},run:function(){var me=this,flushed=!1,watchDog=me.cycleWatchDog;me.purgeInvalidates();me.flushInvalidates();me.state=1;me.totalCount=me.layoutQueue.getCount();me.flush();while((me.remainingLayouts||me.invalidQueue.length)&&watchDog--){if(me.invalidQueue.length){me.flushInvalidates()}
if(me.runCycle()){flushed=!1}else if(!flushed){me.flush();flushed=!0;me.flushLayouts('completionQueue','completeLayout')}else if(!me.invalidQueue.length){me.state=2;break}
if(!(me.remainingLayouts||me.invalidQueue.length)){me.flush();me.flushLayouts('completionQueue','completeLayout');me.flushLayouts('finalizeQueue','finalizeLayout')}}
return me.runComplete()},runComplete:function(){var me=this;me.state=2;if(me.remainingLayouts){me.handleFailure();return!1}
me.flush();me.flushLayouts('finishQueue','finishedLayout',!0);me.flushLayouts('finishQueue','notifyOwner');me.flush();me.flushAnimations();return!0},runCycle:function(){var me=this,layouts=me.layoutQueue.clear(),length=layouts.length,i;++me.cycleCount;me.progressCount=0;for(i=0;i<length;++i){me.runLayout(me.currentLayout=layouts[i])}
me.currentLayout=null;return me.progressCount>0},runLayout:function(layout){var me=this,ownerContext=me.getCmp(layout.owner);layout.pending=!1;if(ownerContext.state.blocks){return}
layout.done=!0;++layout.calcCount;++me.calcCount;layout.calculate(ownerContext);if(layout.done){me.layoutDone(layout);if(layout.completeLayout){me.queueCompletion(layout)}
if(layout.finalizeLayout){me.queueFinalize(layout)}}else if(!layout.pending&&!layout.invalid&&!(layout.blockCount+layout.triggerCount-layout.firedTriggers)){me.queueLayout(layout)}},setItemSize:function(item,width,height){var items=item,len=1,contextItem,i;if(item.isComposite){items=item.elements;len=items.length;item=items[0]}else if(!item.dom&&!item.el){len=items.length;item=items[0]}
for(i=0;i<len;){contextItem=this.get(item);contextItem.setSize(width,height);item=items[++i]}},debugHooks:{$enabled:!1,pageAnalyzerMode:!0,logOn:{0:0},cancelComponent:function(comp){if(this.logOn.cancelComponent){Ext.log('cancelCmp: ',comp.id)}
this.callParent(arguments)},cancelLayout:function(layout){if(this.logOn.cancelLayout){Ext.log('cancelLayout: ',this.getLayoutName(layout))}
this.callParent(arguments)},callLayout:function(layout,methodName){var accum=this.accumByType[layout.type],frame=accum&&accum.enter();this.callParent(arguments);if(accum){frame.leave()}},checkRemainingLayouts:function(){var me=this,expected=0,key,layout;for(key in me.layouts){layout=me.layouts[key];if(me.layouts.hasOwnProperty(key)&&layout.running){++expected}}
if(me.remainingLayouts!==expected){Ext.raise({msg:'Bookkeeping error me.remainingLayouts'})}},flush:function(){var items;if(this.logOn.flush){items=this.flushQueue;Ext.log('--- Flush ',items&&items.getCount())}
return this.callParent(arguments)},flushInvalidates:function(){var ret;if(this.logOn.flushInvalidate){Ext.log('>> flushInvalidates')}
ret=this.callParent(arguments);if(this.logOn.flushInvalidate){Ext.log('<< flushInvalidates')}
return ret},getCmp:function(target){var ret=this.callParent(arguments);if(!ret.wrapsComponent){Ext.raise({msg:target.id+' is not a component'})}
return ret},getEl:function(parent,target){var ret=this.callParent(arguments);if(ret&&ret.wrapsComponent){Ext.raise({msg:parent.id+'/'+target.id+' is a component (expected element)'})}
return ret},getLayoutName:function(layout){return layout.owner.id+'<'+layout.type+'>'},layoutDone:function(layout){var me=this,name=me.getLayoutName(layout);if(me.logOn.layoutDone){Ext.log('layoutDone: ',name,' ( ',me.remainingLayouts,' running)')}
if(!layout.running){Ext.raise({msg:name+' is already done'})}
if(!me.remainingLayouts){Ext.raise({msg:name+' finished but no layouts are running'})}
me.callParent(arguments)},layoutTreeHasFailures:function(layout,reported){var me=this;function hasFailure(lo){var failure=!lo.done,key,childLayout;if(lo.done){for(key in me.layouts){if(me.layouts.hasOwnProperty(key)){childLayout=me.layouts[key];if(childLayout.owner.ownerLayout===lo){if(hasFailure(childLayout)){failure=!0}}}}}
return failure}
if(hasFailure(layout)){return!0}
function markReported(lo){var key,childLayout;reported[lo.id]=1;for(key in me.layouts){if(me.layouts.hasOwnProperty(key)){childLayout=me.layouts[key];if(childLayout.owner.ownerLayout===lo){markReported(childLayout)}}}}
markReported(layout);return!1},queueLayout:function(layout){if(layout.done||layout.blockCount||layout.pending){Ext.raise({msg:this.getLayoutName(layout)+' should not be queued for layout'})}
if(this.logOn.queueLayout){Ext.log('Queue ',this.getLayoutName(layout))}
return this.callParent(arguments)},reportLayoutResult:function(layout,reported){var me=this,owner=layout.owner,ownerContext=me.getCmp(owner),blockedBy=[],triggeredBy=[],key,value,i,length,childLayout,item,setBy,info;reported[layout.id]=1;for(key in layout.blockedBy){if(layout.blockedBy.hasOwnProperty(key)){blockedBy.push(layout.blockedBy[key])}}
blockedBy.sort();for(key in me.triggersByLayoutId[layout.id]){if(me.triggersByLayoutId[layout.id].hasOwnProperty(key)){value=me.triggersByLayoutId[layout.id][key];triggeredBy.push({name:key,info:value})}}
triggeredBy.sort(function(a,b){return a.name<b.name?-1:(b.name<a.name?1:0)});Ext.log({indent:1},(layout.done?'++':'--'),me.getLayoutName(layout),(ownerContext.isBoxParent?' [isBoxParent]':''),(ownerContext.boxChildren?' - boxChildren: '+ownerContext.state.boxesMeasured+'/'+ownerContext.boxChildren.length:''),ownerContext.boxParent?(' - boxParent: '+ownerContext.boxParent.id):'',' - size: ',ownerContext.widthModel.name,'/',ownerContext.heightModel.name);if(!layout.done||me.reportOnSuccess){if(blockedBy.length){++Ext.log.indent;Ext.log({indent:1},'blockedBy:  count=',layout.blockCount);length=blockedBy.length;for(i=0;i<length;i++){Ext.log(blockedBy[i])}
Ext.log.indent-=2}
if(triggeredBy.length){++Ext.log.indent;Ext.log({indent:1},'triggeredBy: count='+layout.triggerCount);length=triggeredBy.length;for(i=0;i<length;i++){info=value.info||value;item=info.item;setBy=(item.setBy&&item.setBy[info.name])||'?';value=triggeredBy[i];Ext.log(value.name,' (',item.props[info.name],') dirty: ',(item.dirty?!!item.dirty[info.name]:!1),', setBy: ',setBy)}
Ext.log.indent-=2}}
for(key in me.layouts){if(me.layouts.hasOwnProperty(key)){childLayout=me.layouts[key];if(!childLayout.done&&childLayout.owner.ownerLayout===layout){me.reportLayoutResult(childLayout,reported)}}}
for(key in me.layouts){if(me.layouts.hasOwnProperty(key)){childLayout=me.layouts[key];if(childLayout.done&&childLayout.owner.ownerLayout===layout){me.reportLayoutResult(childLayout,reported)}}}
--Ext.log.indent},resetLayout:function(layout){var me=this,type=layout.type,name=me.getLayoutName(layout),accum=me.accumByType[type],frame;if(me.logOn.resetLayout){Ext.log('resetLayout: ',name,' ( ',me.remainingLayouts,' running)')}
if(!me.state){if(!accum&&me.profileLayoutsByType){me.accumByType[type]=accum=Ext.Perf.get('layout_'+layout.type)}
me.numByType[type]=(me.numByType[type]||0)+1}
frame=accum&&accum.enter();me.callParent(arguments);if(accum){frame.leave()}
me.checkRemainingLayouts()},round:function(t){return Math.round(t*1000)/1000},run:function(){var me=this,ret,time,key,i,layout,boxParent,children,n,reported,unreported,calcs,total,calcsLength,calc;me.accumByType={};me.calcsByType={};me.numByType={};me.timesByType={};me.triggersByLayoutId={};Ext.log.indentSize=3;Ext.log('==================== LAYOUT ====================');time=Ext.perf.getTimestamp();ret=me.callParent(arguments);time=Ext.perf.getTimestamp()-time;if(me.logOn.boxParent&&me.boxParents){for(key in me.boxParents){if(me.boxParents.hasOwnProperty(key)){boxParent=me.boxParents[key];children=boxParent.boxChildren;n=children.length;Ext.log('boxParent: ',boxParent.id);for(i=0;i<n;++i){Ext.log(' --> ',children[i].id)}}}}
if(ret){Ext.log('----------------- SUCCESS -----------------')}else{Ext.log({level:'error'},'----------------- FAILURE -----------------')}
for(key in me.layouts){if(me.layouts.hasOwnProperty(key)){layout=me.layouts[key];if(layout.running){Ext.log.error('Layout left running: ',me.getLayoutName(layout))}
if(layout.ownerContext){Ext.log.error('Layout left connected: ',me.getLayoutName(layout))}}}
if(!ret||me.reportOnSuccess){reported={};unreported=0;for(key in me.layouts){if(me.layouts.hasOwnProperty(key)){layout=me.layouts[key];if(me.items[layout.owner.el.id].isTopLevel){if(me.reportOnSuccess||me.layoutTreeHasFailures(layout,reported)){me.reportLayoutResult(layout,reported)}}}}
for(key in me.layouts){if(me.layouts.hasOwnProperty(key)){layout=me.layouts[key];if(!reported[layout.id]){if(!unreported){Ext.log('----- Unreported!! -----')}
++unreported;me.reportLayoutResult(layout,reported)}}}}
Ext.log('Cycles: ',me.cycleCount,', Flushes: ',me.flushCount,', Calculates: ',me.calcCount,' in ',me.round(time),' msec');Ext.log('Calculates by type:');calcs=[];for(key in me.numByType){if(me.numByType.hasOwnProperty(key)){total=me.numByType[key];calcs.push({type:key,total:total,calcs:me.calcsByType[key],multiple:Math.round(me.calcsByType[key]/total*10)/10,calcTime:me.round(me.timesByType[key]),avgCalcTime:me.round(me.timesByType[key]/me.calcsByType[key])})}}
calcs.sort(function(a,b){return b.calcTime-a.calcTime});calcsLength=calcs.length;for(i=0;i<calcsLength;i++){calc=calcs[i];Ext.log(calc.type,': ',calc.total,' in ',calc.calcs,' tries (',calc.multiple,'x) at ',calc.calcTime,' msec (avg ',calc.avgCalcTime,' msec)')}
return ret},runCycle:function(){if(this.logOn.runCycle){Ext.log('>>> Cycle ',this.cycleCount,' (queue length: ',this.layoutQueue.length,')')}
return this.callParent(arguments)},runLayout:function(layout){var me=this,type=layout.type,accum=me.accumByType[type],frame,ret,time;if(me.logOn.calculate){Ext.log('-- calculate ',this.getLayoutName(layout))}
frame=accum&&accum.enter();time=Ext.perf.getTimestamp();ret=me.callParent(arguments);time=Ext.perf.getTimestamp()-time;if(accum){frame.leave()}
me.calcsByType[type]=(me.calcsByType[type]||0)+1;me.timesByType[type]=(me.timesByType[type]||0)+time;return ret}}})
;

;
Ext.define('Ext.layout.component.Body',{extend:'Ext.layout.component.Auto',alias:'layout.body',type:'body',beginLayout:function(ownerContext){this.callParent(arguments);ownerContext.bodyContext=ownerContext.getEl('body')},beginLayoutCycle:function(ownerContext,firstCycle){var me=this,lastWidthModel=me.lastWidthModel,lastHeightModel=me.lastHeightModel,body=me.owner.body;me.callParent(arguments);if(lastWidthModel&&lastWidthModel.fixed&&ownerContext.widthModel.shrinkWrap){body.setWidth(null)}
if(lastHeightModel&&lastHeightModel.fixed&&ownerContext.heightModel.shrinkWrap){body.setHeight(null)}},calculateOwnerHeightFromContentHeight:function(ownerContext,contentHeight){var height=this.callParent(arguments);if(ownerContext.targetContext!==ownerContext){height+=ownerContext.getPaddingInfo().height}
return height},calculateOwnerWidthFromContentWidth:function(ownerContext,contentWidth){var width=this.callParent(arguments);if(ownerContext.targetContext!==ownerContext){width+=ownerContext.getPaddingInfo().width}
return width},measureContentWidth:function(ownerContext){return ownerContext.bodyContext.setWidth(ownerContext.bodyContext.el.dom.offsetWidth,!1)},measureContentHeight:function(ownerContext){return ownerContext.bodyContext.setHeight(ownerContext.bodyContext.el.dom.offsetHeight,!1)},publishInnerHeight:function(ownerContext,height){var innerHeight=height-ownerContext.getFrameInfo().height,targetContext=ownerContext.targetContext;if(targetContext!==ownerContext){innerHeight-=ownerContext.getPaddingInfo().height}
return ownerContext.bodyContext.setHeight(innerHeight,!ownerContext.heightModel.natural)},publishInnerWidth:function(ownerContext,width){var innerWidth=width-ownerContext.getFrameInfo().width,targetContext=ownerContext.targetContext;if(targetContext!==ownerContext){innerWidth-=ownerContext.getPaddingInfo().width}
ownerContext.bodyContext.setWidth(innerWidth,!ownerContext.widthModel.natural)}})
;
Ext.define('Ext.layout.component.FieldSet',{extend:'Ext.layout.component.Body',alias:['layout.fieldset'],type:'fieldset',defaultCollapsedWidth:100,beforeLayoutCycle:function(ownerContext){if(ownerContext.target.collapsed){ownerContext.heightModel=this.sizeModels.shrinkWrap}},beginLayout:function(ownerContext){var legend=this.owner.legend;this.callParent([ownerContext]);if(legend){ownerContext.legendContext=ownerContext.context.getCmp(legend)}},beginLayoutCycle:function(ownerContext){var target=ownerContext.target,lastSize;this.callParent(arguments);if(target.collapsed){ownerContext.setContentHeight(0);ownerContext.restoreMinHeight=target.minHeight;delete target.minHeight;if(ownerContext.widthModel.shrinkWrap){lastSize=this.lastComponentSize;ownerContext.setContentWidth((lastSize&&lastSize.contentWidth)||this.defaultCollapsedWidth)}}},finishedLayout:function(ownerContext){var owner=this.owner,restore=ownerContext.restoreMinHeight;this.callParent(arguments);if(restore){owner.minHeight=restore}},calculateOwnerWidthFromContentWidth:function(ownerContext,contentWidth){var legendContext=ownerContext.legendContext;if(legendContext){contentWidth=Math.max(contentWidth,legendContext.getProp('width'))}
return this.callParent([ownerContext,contentWidth])},calculateOwnerHeightFromContentHeight:function(ownerContext,contentHeight){var border=ownerContext.getBorderInfo(),legendContext=ownerContext.legendContext;return ownerContext.getProp('contentHeight')+ownerContext.getPaddingInfo().height+(Ext.isIE8?ownerContext.bodyContext.getPaddingInfo().top:0)+(legendContext?legendContext.getProp('height'):border.top)+border.bottom},publishInnerHeight:function(ownerContext,height){var legendContext=ownerContext.legendContext,legendHeight=0;if(legendContext){legendHeight=legendContext.getProp('height')}
if(legendHeight===undefined){this.done=!1}else{this.callParent([ownerContext,height-legendHeight])}},getLayoutItems:function(){var legend=this.owner.legend;return legend?[legend]:[]}})
;
Ext.define('Ext.layout.container.Absolute',{alias:'layout.absolute',extend:'Ext.layout.container.Anchor',alternateClassName:'Ext.layout.AbsoluteLayout',targetCls:Ext.baseCSSPrefix+'abs-layout-ct',itemCls:Ext.baseCSSPrefix+'abs-layout-item',type:'absolute',adjustWidthAnchor:function(width,childContext){var padding=this.targetPadding,x=childContext.getStyle('left');return width-x+padding.left},adjustHeightAnchor:function(height,childContext){var padding=this.targetPadding,y=childContext.getStyle('top');return height-y+padding.top},isItemShrinkWrap:function(item){return!0},onContentChange:function(comp,context){var ret=!1;if(comp.anchor&&context&&context.show){ret=this.callParent([comp,context])}
return ret},beginLayout:function(ownerContext){var me=this,target=me.getTarget();me.callParent([ownerContext]);if(target.dom!==document.body){target.position()}
me.targetPadding=ownerContext.targetContext.getPaddingInfo()},isItemBoxParent:function(itemContext){return!0},calculateContentSize:function(ownerContext,dimensions){var me=this,containerDimensions=(dimensions||0)|((ownerContext.widthModel.shrinkWrap?1:0)|(ownerContext.heightModel.shrinkWrap?2:0)),calcWidth=(containerDimensions&1)||undefined,calcHeight=(containerDimensions&2)||undefined,childItems=ownerContext.childItems,length=childItems.length,contentHeight=0,contentWidth=0,needed=0,props=ownerContext.props,targetPadding,child,childContext,height,i,margins,width;if(calcWidth){if(isNaN(props.contentWidth)){++needed}else{calcWidth=undefined}}
if(calcHeight){if(isNaN(props.contentHeight)){++needed}else{calcHeight=undefined}}
if(needed){for(i=0;i<length;++i){childContext=childItems[i];child=childContext.target;height=calcHeight&&childContext.getProp('height');width=calcWidth&&childContext.getProp('width');margins=childContext.getMarginInfo();height+=margins.bottom;width+=margins.right;contentHeight=Math.max(contentHeight,(child.y||0)+height);contentWidth=Math.max(contentWidth,(child.x||0)+width);if(isNaN(contentHeight)&&isNaN(contentWidth)){me.done=!1;return}}
if(calcWidth||calcHeight){targetPadding=ownerContext.targetContext.getPaddingInfo()}
if(calcWidth&&!ownerContext.setContentWidth(contentWidth+targetPadding.width)){me.done=!1}
if(calcHeight&&!ownerContext.setContentHeight(contentHeight+targetPadding.height)){me.done=!1}}}})
;
Ext.define('Ext.rtl.layout.container.Absolute',{override:'Ext.layout.container.Absolute',adjustWidthAnchor:function(width,childContext){if(this.owner.getInherited().rtl){var padding=this.targetPadding,x=childContext.getStyle('right');return width-x+padding.right}else{return this.callParent([width,childContext])}}})
;
Ext.define('Ext.layout.container.Accordion',{extend:'Ext.layout.container.VBox',alias:'layout.accordion',type:'accordion',alternateClassName:'Ext.layout.AccordionLayout',targetCls:Ext.baseCSSPrefix+'accordion-layout-ct',itemCls:[Ext.baseCSSPrefix+'box-item',Ext.baseCSSPrefix+'accordion-item'],align:'stretch',enableSplitters:!1,fill:!0,titleCollapse:!0,hideCollapseTool:!1,collapseFirst:undefined,animate:!0,activeOnTop:!1,multi:!1,wrapOver:!0,panelCollapseMode:'header',defaultAnimatePolicy:{y:!0,height:!0},constructor:function(){var me=this;me.callParent(arguments);if(me.animate){me.animatePolicy={};me.animatePolicy[me.names.x]=!0;me.animatePolicy[me.names.width]=!0}else{me.animatePolicy=null}},beforeRenderItems:function(items){var me=this,ln=items.length,owner=me.owner,collapseFirst=me.collapseFirst,hasCollapseFirst=Ext.isDefined(collapseFirst),expandedItem=me.getExpanded(!0)[0],multi=me.multi,comp,i;for(i=0;i<ln;i++){comp=items[i];if(!comp.rendered){comp.isAccordionPanel=!0;comp.bodyAriaRole='tabpanel';comp.accordionWrapOver=me.wrapOver;if(!multi||comp.collapsible!==!1){comp.collapsible=!0}
if(comp.collapsible){if(hasCollapseFirst){comp.collapseFirst=collapseFirst}
if(me.hideCollapseTool){comp.hideCollapseTool=me.hideCollapseTool;comp.titleCollapse=!0}else if(me.titleCollapse&&comp.titleCollapse===undefined){comp.titleCollapse=me.titleCollapse}}
comp.hideHeader=comp.width=null;comp.title=comp.title||'&#160;';comp.addBodyCls(Ext.baseCSSPrefix+'accordion-body');if(!multi){if(expandedItem){comp.collapsed=expandedItem!==comp}else if(comp.hasOwnProperty('collapsed')&&comp.collapsed===!1){expandedItem=comp}else{comp.collapsed=!0}
owner.mon(comp,'show',me.onComponentShow,me)}
comp.headerOverCls=Ext.baseCSSPrefix+'accordion-hd-over'}}
if(!me.processing&&!multi){if(!expandedItem){if(ln){items[0].collapsed=!1}}else if(me.activeOnTop){expandedItem.collapsed=!1;me.configureItem(expandedItem);if(owner.items.indexOf(expandedItem)>0){owner.insert(0,expandedItem)}}}},getItemsRenderTree:function(items){this.beforeRenderItems(items);return this.callParent(arguments)},renderItems:function(items,target){this.beforeRenderItems(items);this.callParent(arguments)},configureItem:function(item){this.callParent(arguments);item.ignoreHeaderBorderManagement=!0;item.animCollapse=!1;if(this.fill){item.flex=1}},beginLayout:function(ownerContext){this.callParent(arguments);this.innerCt.dom.setAttribute('role','tablist');this.innerCt.dom.setAttribute('aria-multiselectable',!0);this.updatePanelClasses(ownerContext)},updatePanelClasses:function(ownerContext){var children=ownerContext.visibleItems,ln=children.length,siblingCollapsed=!0,i,child,header;for(i=0;i<ln;i++){child=children[i];header=child.header;header.addCls(Ext.baseCSSPrefix+'accordion-hd');if(siblingCollapsed){header.removeCls(Ext.baseCSSPrefix+'accordion-hd-sibling-expanded')}else{header.addCls(Ext.baseCSSPrefix+'accordion-hd-sibling-expanded')}
if(i+1===ln&&child.collapsed){header.addCls(Ext.baseCSSPrefix+'accordion-hd-last-collapsed')}else{header.removeCls(Ext.baseCSSPrefix+'accordion-hd-last-collapsed')}
siblingCollapsed=child.collapsed}},onBeforeComponentExpand:function(toExpand){var me=this,owner=me.owner,multi=me.multi,moveToTop=!multi&&!me.animate&&me.activeOnTop,expanded,previousValue,anim;if(!me.processing){me.processing=!0;previousValue=owner.deferLayouts;owner.deferLayouts=!0;if(!multi){expanded=me.getExpanded()[0];if(expanded&&expanded!==toExpand){anim=expanded.$layoutAnim;if(anim){anim.jumpToEnd()}
expanded.collapse()}}
if(moveToTop){Ext.suspendLayouts();owner.insert(0,toExpand);Ext.resumeLayouts()}
owner.deferLayouts=previousValue;me.processing=!1}},onBeforeComponentCollapse:function(comp){var me=this,owner=me.owner,toExpand,expanded,previousValue;if(me.owner.items.getCount()===1){return!1}
if(!me.processing){me.processing=!0;previousValue=owner.deferLayouts;owner.deferLayouts=!0;toExpand=comp.next()||comp.prev();if(me.multi){expanded=me.getExpanded();if(expanded.length===1){toExpand.expand()}}else if(toExpand){toExpand.expand()}
owner.deferLayouts=previousValue;me.processing=!1}},onComponentShow:function(comp){this.onBeforeComponentExpand(comp)},onAdd:function(item){var me=this;me.callParent(arguments);if(item.collapseMode==='placeholder'){item.collapseMode=me.panelCollapseMode}
item.collapseDirection=item.headerPosition;if(me.layoutCount&&!me.multi&&me.owner.items.getCount()>1){me.processing=!0;item.collapse();me.processing=!1}},onRemove:function(panel,destroying){var me=this,item;me.callParent(arguments);if(!me.owner.destroying&&!me.multi&&!panel.collapsed){item=me.owner.items.first();if(item){item.expand()}}},getExpanded:function(explicitCheck){var items=this.owner.items.items,len=items.length,i=0,out=[],add,item;for(;i<len;++i){item=items[i];if(!item.hidden){if(explicitCheck){add=item.hasOwnProperty('collapsed')&&item.collapsed===!1}else{add=!item.collapsed}
if(add){out.push(item)}}}
return out},afterCollapse:Ext.emptyFn,afterExpand:Ext.emptyFn})
;
Ext.define('Ext.resizer.BorderSplitter',{extend:'Ext.resizer.Splitter',alias:'widget.bordersplitter',uses:['Ext.resizer.BorderSplitterTracker'],collapseTarget:null,getTrackerConfig:function(){var trackerConfig=this.callParent();trackerConfig.xclass='Ext.resizer.BorderSplitterTracker';return trackerConfig},onTargetCollapse:function(target){this.callParent([target]);if(this.performCollapse!==!1&&target.collapseMode==='mini'){target.addCls(target.baseCls+'-'+target.collapsedCls+'-mini')}},onTargetExpand:function(target){this.callParent([target]);if(this.performCollapse!==!1&&target.collapseMode==='mini'){target.removeCls(target.baseCls+'-'+target.collapsedCls+'-mini')}}})
;
Ext.define('Ext.layout.container.Border',{extend:'Ext.layout.container.Container',alias:'layout.border',alternateClassName:'Ext.layout.BorderLayout',requires:['Ext.resizer.BorderSplitter','Ext.fx.Anim','Ext.layout.container.border.Region'],targetCls:Ext.baseCSSPrefix+'border-layout-ct',itemCls:[Ext.baseCSSPrefix+'border-item',Ext.baseCSSPrefix+'box-item'],type:'border',isBorderLayout:!0,padding:undefined,percentageRe:/(\d+)%/,horzPositionProp:'left',padOnContainerProp:'left',padNotOnContainerProp:'right',axisProps:{horz:{borderBegin:'west',borderEnd:'east',horizontal:!0,posProp:'x',sizeProp:'width',sizePropCap:'Width'},vert:{borderBegin:'north',borderEnd:'south',horizontal:!1,posProp:'y',sizeProp:'height',sizePropCap:'Height'}},centerRegion:null,manageMargins:!0,panelCollapseAnimate:!0,panelCollapseMode:'placeholder',regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(ownerContext,regions,name){var me=this,props=me.axisProps[name],isVert=!props.horizontal,sizeProp=props.sizeProp,totalFlex=0,childItems=ownerContext.childItems,length=childItems.length,center,i,childContext,centerFlex,comp,region,match,size,type,target,placeholder;for(i=0;i<length;++i){childContext=childItems[i];comp=childContext.target;childContext.layoutPos={};if(comp.region){childContext.region=region=comp.region;childContext.isCenter=comp.isCenter;childContext.isHorz=comp.isHorz;childContext.isVert=comp.isVert;childContext.weight=comp.weight||me.regionWeights[region]||0;comp.weight=childContext.weight;regions[comp.id]=childContext;if(comp.isCenter){center=childContext;centerFlex=comp.flex;ownerContext.centerRegion=center;continue}
if(isVert!==childContext.isVert){continue}
childContext.reverseWeighting=(region===props.borderEnd);size=comp[sizeProp];type=typeof size;if(!comp.collapsed){if(type==='string'&&(match=me.percentageRe.exec(size))){childContext.percentage=parseInt(match[1],10)}else if(comp.flex){totalFlex+=childContext.flex=comp.flex}}}}
if(center){target=center.target;if((placeholder=target.placeholderFor)){if(!centerFlex&&isVert===placeholder.collapsedVertical()){centerFlex=0;center.collapseAxis=name}}else if(target.collapsed&&(isVert===target.collapsedVertical())){centerFlex=0;center.collapseAxis=name}}
if(centerFlex==null){centerFlex=1}
totalFlex+=centerFlex;return Ext.apply({before:isVert?'top':'left',totalFlex:totalFlex},props)},beginLayout:function(ownerContext){var me=this,items=me.getLayoutItems(),pad=me.padding,type=typeof pad,padOnContainer=!1,childContext,item,length,i,regions,collapseTarget,doShow,hidden,region;if(ownerContext.heightModel.shrinkWrap){Ext.raise("Border layout does not currently support shrinkWrap height. "+"Please specify a height on component: "+me.owner.id+", or use a container layout that sets the component's height.")}
if(ownerContext.widthModel.shrinkWrap){Ext.raise("Border layout does not currently support shrinkWrap width. "+"Please specify a width on component: "+me.owner.id+", or use a container layout that sets the component's width.")}
if(pad){if(type==='string'||type==='number'){pad=Ext.util.Format.parseBox(pad)}}else{pad=ownerContext.getEl('getTargetEl').getPaddingInfo();padOnContainer=!0}
ownerContext.outerPad=pad;ownerContext.padOnContainer=padOnContainer;for(i=0,length=items.length;i<length;++i){item=items[i];collapseTarget=me.getSplitterTarget(item);if(collapseTarget){doShow=undefined;hidden=!!item.hidden;if(!collapseTarget.split){if(collapseTarget.isCollapsingOrExpanding){doShow=!!collapseTarget.collapsed}}else if(hidden!==collapseTarget.hidden){doShow=!collapseTarget.hidden}
if(doShow){item.show()}else if(doShow===!1){item.hide()}}}
me.callParent(arguments);items=ownerContext.childItems;length=items.length;regions={};ownerContext.borderAxisHorz=me.beginAxis(ownerContext,regions,'horz');ownerContext.borderAxisVert=me.beginAxis(ownerContext,regions,'vert');for(i=0;i<length;++i){childContext=items[i];collapseTarget=me.getSplitterTarget(childContext.target);if(collapseTarget){region=regions[collapseTarget.id];if(!region){region=ownerContext.getEl(collapseTarget.el,me);region.region=collapseTarget.region}
childContext.collapseTarget=collapseTarget=region;childContext.weight=collapseTarget.weight;childContext.reverseWeighting=collapseTarget.reverseWeighting;collapseTarget.splitter=childContext;childContext.isHorz=collapseTarget.isHorz;childContext.isVert=collapseTarget.isVert}}
me.sortWeightedItems(items,'reverseWeighting');me.setupSplitterNeighbors(items)},calculate:function(ownerContext){var me=this,containerSize=me.getContainerSize(ownerContext),childItems=ownerContext.childItems,length=childItems.length,horz=ownerContext.borderAxisHorz,vert=ownerContext.borderAxisVert,pad=ownerContext.outerPad,padOnContainer=ownerContext.padOnContainer,i,childContext,childMargins,size,horzPercentTotal,vertPercentTotal;horz.begin=pad[me.padOnContainerProp];vert.begin=pad.top;horzPercentTotal=horz.end=horz.flexSpace=containerSize.width+(padOnContainer?pad[me.padOnContainerProp]:-pad[me.padNotOnContainerProp]);vertPercentTotal=vert.end=vert.flexSpace=containerSize.height+(padOnContainer?pad.top:-pad.bottom);for(i=0;i<length;++i){childContext=childItems[i];childMargins=childContext.getMarginInfo();if(childContext.isHorz||childContext.isCenter){horz.addUnflexed(childMargins.width);horzPercentTotal-=childMargins.width}
if(childContext.isVert||childContext.isCenter){vert.addUnflexed(childMargins.height);vertPercentTotal-=childMargins.height}
if(!childContext.flex&&!childContext.percentage){if(childContext.isHorz||(childContext.isCenter&&childContext.collapseAxis==='horz')){size=childContext.getProp('width');horz.addUnflexed(size);if(childContext.collapseTarget){horzPercentTotal-=size}}else if(childContext.isVert||(childContext.isCenter&&childContext.collapseAxis==='vert')){size=childContext.getProp('height');vert.addUnflexed(size);if(childContext.collapseTarget){vertPercentTotal-=size}}}}
for(i=0;i<length;++i){childContext=childItems[i];childMargins=childContext.getMarginInfo();if(childContext.percentage){if(childContext.isHorz){size=Math.ceil(horzPercentTotal*childContext.percentage/100);size=childContext.setWidth(size);horz.addUnflexed(size)}else if(childContext.isVert){size=Math.ceil(vertPercentTotal*childContext.percentage/100);size=childContext.setHeight(size);vert.addUnflexed(size)}}}
for(i=0;i<length;++i){childContext=childItems[i];if(!childContext.isCenter){me.calculateChildAxis(childContext,horz);me.calculateChildAxis(childContext,vert)}}
if(me.finishAxis(ownerContext,vert)+me.finishAxis(ownerContext,horz)<2){me.done=!1}else{me.finishPositions(childItems)}},calculateChildAxis:function(childContext,axis){var collapseTarget=childContext.collapseTarget,setSizeMethod='set'+axis.sizePropCap,sizeProp=axis.sizeProp,childMarginSize=childContext.getMarginInfo()[sizeProp],region,isBegin,flex,pos,size;if(collapseTarget){region=collapseTarget.region}else{region=childContext.region;flex=childContext.flex}
isBegin=region===axis.borderBegin;if(!isBegin&&region!==axis.borderEnd){childContext[setSizeMethod](axis.end-axis.begin-childMarginSize);pos=axis.begin}else{if(flex){size=Math.ceil(axis.flexSpace*(flex/axis.totalFlex));size=childContext[setSizeMethod](size)}else if(childContext.percentage){size=childContext.peek(sizeProp)}else{size=childContext.getProp(sizeProp)}
size+=childMarginSize;if(isBegin){pos=axis.begin;axis.begin+=size}else{axis.end=pos=axis.end-size}}
childContext.layoutPos[axis.posProp]=pos},eachItem:function(region,fn,scope){var me=this,items=me.getLayoutItems(),i=0,item;if(Ext.isFunction(region)){fn=region;scope=fn}
for(i;i<items.length;i++){item=items[i];if(!region||item.region===region){if(fn.call(scope,item)===!1){break}}}},finishAxis:function(ownerContext,axis){var size=axis.end-axis.begin,center=ownerContext.centerRegion;if(center){center['set'+axis.sizePropCap](size-center.getMarginInfo()[axis.sizeProp]);center.layoutPos[axis.posProp]=axis.begin}
return Ext.isNumber(size)?1:0},finishPositions:function(childItems){var length=childItems.length,index,childContext,marginProp=this.horzPositionProp;for(index=0;index<length;++index){childContext=childItems[index];childContext.setProp('x',childContext.layoutPos.x+childContext.marginInfo[marginProp]);childContext.setProp('y',childContext.layoutPos.y+childContext.marginInfo.top)}},getLayoutItems:function(){var owner=this.owner,ownerItems=(owner&&owner.items&&owner.items.items)||[],length=ownerItems.length,items=[],i=0,ownerItem,placeholderFor;for(;i<length;i++){ownerItem=ownerItems[i];placeholderFor=ownerItem.placeholderFor;if(ownerItem.hidden||((!ownerItem.floated||ownerItem.isCollapsingOrExpanding===2)&&!(placeholderFor&&placeholderFor.isCollapsingOrExpanding===2))){items.push(ownerItem)}}
return items},getPlaceholder:function(comp){return comp.getPlaceholder&&comp.getPlaceholder()},getMaxWeight:function(region){return this.getMinMaxWeight(region)},getMinWeight:function(region){return this.getMinMaxWeight(region,!0)},getMinMaxWeight:function(region,min){var me=this,weight=null;me.eachItem(region,function(item){if(item.hasOwnProperty('weight')){if(weight===null){weight=item.weight;return}
if((min&&item.weight<weight)||item.weight>weight){weight=item.weight}}},this);return weight},getSplitterTarget:function(splitter){var collapseTarget=splitter.collapseTarget;if(collapseTarget&&collapseTarget.collapsed){return collapseTarget.placeholder||collapseTarget}
return collapseTarget},isItemBoxParent:function(itemContext){return!0},isItemShrinkWrap:function(item){return!0},insertSplitter:function(item,index,hidden,splitterCfg){var region=item.region,splitter=Ext.apply({xtype:'bordersplitter',collapseTarget:item,id:item.id+'-splitter',hidden:hidden,canResize:item.splitterResize!==!1,splitterFor:item,synthetic:!0},splitterCfg),at=index+((region==='south'||region==='east')?0:1);if(item.collapseMode==='mini'){splitter.collapsedCls=item.collapsedCls}
item.splitter=this.owner.add(at,splitter)},getMoveAfterIndex:function(after){var index=this.callParent(arguments);if(after.splitter){index++}
return index},moveItemBefore:function(item,before){var beforeRegion;if(before&&before.splitter){beforeRegion=before.region;if(beforeRegion==='south'||beforeRegion==='east'){before=before.splitter}}
return this.callParent([item,before])},onAdd:function(item,index){var me=this,placeholderFor=item.placeholderFor,region=item.region,isCenter,split,hidden,cfg;me.callParent(arguments);if(region){Ext.apply(item,me.regionFlags[region]);if(me.owner.isViewport){item.isViewportBorderChild=!0}
if(item.initBorderRegion){item.initBorderRegion()}
isCenter=region==='center';if(isCenter){if(me.centerRegion){Ext.raise("Cannot have multiple center regions in a BorderLayout.")}
me.centerRegion=item}else{split=item.split;hidden=!!item.hidden;if(typeof split==='object'){cfg=split;split=!0}
if((item.isHorz||item.isVert)&&(split||item.collapseMode==='mini')){if(item.collapseMode==='mini'&&item.collapsed){hidden=!1}else if(!split){hidden=!0}
me.insertSplitter(item,index,hidden,cfg)}}
if(!isCenter&&!item.hasOwnProperty('collapseMode')){item.collapseMode=me.panelCollapseMode}
if(!item.hasOwnProperty('animCollapse')){if(item.collapseMode!=='placeholder'){item.animCollapse=!1}else{item.animCollapse=me.panelCollapseAnimate}}
if(hidden&&item.placeholder&&item.placeholder.isVisible()){me.owner.insert(index,item.placeholder)}}else if(placeholderFor){Ext.apply(item,me.regionFlags[placeholderFor.region]);item.region=placeholderFor.region;item.weight=placeholderFor.weight}},onDestroy:function(){this.centerRegion=null;this.callParent()},onRemove:function(comp,isDestroying){var me=this,region=comp.region,splitter=comp.splitter,owner=me.owner,destroying=owner.destroying,el;if(region){if(comp.isCenter){me.centerRegion=null}
delete comp.isCenter;delete comp.isHorz;delete comp.isVert;if(splitter&&!owner.destroying){owner.doRemove(splitter,!0)}
delete comp.splitter}
me.callParent(arguments);if(!destroying&&!isDestroying&&comp.rendered){el=comp.getEl();if(el){el.setStyle('top','');el.setStyle(me.horzPositionProp,'')}}},regionMeta:{center:{splitterDelta:0},north:{splitterDelta:1},south:{splitterDelta:-1},west:{splitterDelta:1},east:{splitterDelta:-1}},regionFlags:{center:{isCenter:!0,isHorz:!1,isVert:!1},north:{isCenter:!1,isHorz:!1,isVert:!0,collapseDirection:'top'},south:{isCenter:!1,isHorz:!1,isVert:!0,collapseDirection:'bottom'},west:{isCenter:!1,isHorz:!0,isVert:!1,collapseDirection:'left'},east:{isCenter:!1,isHorz:!0,isVert:!1,collapseDirection:'right'}},setupSplitterNeighbors:function(items){var edgeRegions={},length=items.length,touchedRegions=this.touchedRegions,i,j,center,count,edge,comp,region,splitter,touched;for(i=0;i<length;++i){comp=items[i].target;region=comp.region;if(comp.isCenter){center=comp}else if(region){touched=touchedRegions[region];for(j=0,count=touched.length;j<count;++j){edge=edgeRegions[touched[j]];if(edge){edge.neighbors.push(comp)}}
if(comp.placeholderFor){splitter=comp.placeholderFor.splitter}else{splitter=comp.splitter}
if(splitter){splitter.neighbors=[]}
edgeRegions[region]=splitter}}
if(center){touched=touchedRegions.center;for(j=0,count=touched.length;j<count;++j){edge=edgeRegions[touched[j]];if(edge){edge.neighbors.push(center)}}}},touchedRegions:{center:['north','south','east','west'],north:['north','east','west'],south:['south','east','west'],east:['east','north','south'],west:['west','north','south']},sizePolicies:{vert:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},horz:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},flexAll:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}},getItemSizePolicy:function(item){var me=this,policies=this.sizePolicies,collapseTarget,size,policy,placeholderFor;if(item.isCenter){placeholderFor=item.placeholderFor;if(placeholderFor){if(placeholderFor.collapsedVertical()){return policies.vert}
return policies.horz}
if(item.collapsed){if(item.collapsedVertical()){return policies.vert}
return policies.horz}
return policies.flexAll}
collapseTarget=item.collapseTarget;if(collapseTarget){return collapseTarget.isVert?policies.vert:policies.horz}
if(item.region){if(item.isVert){size=item.height;policy=policies.vert}else{size=item.width;policy=policies.horz}
if(item.flex||(typeof size==='string'&&me.percentageRe.test(size))){return policies.flexAll}
return policy}
return me.autoSizePolicy}},function(){var methods={addUnflexed:function(px){this.flexSpace=Math.max(this.flexSpace-px,0)}},props=this.prototype.axisProps;Ext.apply(props.horz,methods);Ext.apply(props.vert,methods)})
;
Ext.define('Ext.rtl.layout.container.Border',{override:'Ext.layout.container.Border',initLayout:function(){var me=this;if(me.owner.getInherited().rtl){me.padOnContainerProp='right';me.padNotOnContainerProp='left';me.horzPositionProp='right'}
me.callParent(arguments)}})
;
Ext.define('Ext.layout.container.Card',{extend:'Ext.layout.container.Fit',alternateClassName:'Ext.layout.CardLayout',alias:'layout.card',type:'card',hideInactive:!0,deferredRender:!1,getRenderTree:function(){var me=this,activeItem=me.getActiveItem();if(activeItem){if(activeItem.hasListeners.beforeactivate&&activeItem.fireEvent('beforeactivate',activeItem)===!1){activeItem=me.activeItem=me.owner.activeItem=null}else if(activeItem.hasListeners.activate){activeItem.on({boxready:function(){activeItem.fireEvent('activate',activeItem)},single:!0})}
if(me.deferredRender){if(activeItem){return me.getItemsRenderTree([activeItem])}}else{return me.callParent(arguments)}}},renderChildren:function(){var me=this,active=me.getActiveItem();if(!me.deferredRender){me.callParent()}else if(active){me.renderItems([active],me.getRenderTarget())}},isValidParent:function(item,target,position){var itemEl=item.el?item.el.dom:Ext.getDom(item);return(itemEl&&itemEl.parentNode===(target.dom||target))||!1},getActiveItem:function(){var me=this,item=me.activeItem===undefined?(me.owner&&me.owner.activeItem):me.activeItem,result=me.parseActiveItem(item);if(result&&me.owner.items.indexOf(result)!==-1){me.activeItem=result}
return result==null?null:(me.activeItem||me.owner.activeItem)},parseActiveItem:function(item){var activeItem;if(item&&item.isComponent){activeItem=item}else if(typeof item==='number'||item===undefined){activeItem=this.getLayoutItems()[item||0]}else if(item===null){activeItem=null}else{activeItem=this.owner.getComponent(item)}
return activeItem},configureItem:function(item){item.setHiddenState(item!==this.getActiveItem());this.callParent(arguments)},onAdd:function(item,pos){this.callParent([item,pos]);this.setItemHideMode(item)},onRemove:function(component){var me=this;me.callParent([component]);me.resetItemHideMode(component);if(component===me.activeItem){me.activeItem=undefined}},getAnimation:function(newCard,owner){var newAnim=(newCard||{}).cardSwitchAnimation;if(newAnim===!1){return!1}
return newAnim||owner.cardSwitchAnimation},getNext:function(){var wrap=arguments[0],items=this.getLayoutItems(),index=Ext.Array.indexOf(items,this.activeItem);return items[index+1]||(wrap?items[0]:!1)},next:function(){var anim=arguments[0],wrap=arguments[1];return this.setActiveItem(this.getNext(wrap),anim)},getPrev:function(){var wrap=arguments[0],items=this.getLayoutItems(),index=Ext.Array.indexOf(items,this.activeItem);return items[index-1]||(wrap?items[items.length-1]:!1)},prev:function(){var anim=arguments[0],wrap=arguments[1];return this.setActiveItem(this.getPrev(wrap),anim)},setActiveItem:function(newCard){var me=this,owner=me.owner,oldCard=me.activeItem,rendered=owner.rendered,newIndex,focusNewCard;newCard=me.parseActiveItem(newCard);newIndex=owner.items.indexOf(newCard);if(newIndex===-1){newIndex=owner.items.items.length;Ext.suspendLayouts();newCard=owner.add(newCard);Ext.resumeLayouts()}
if(newCard&&oldCard!==newCard){if(newCard.fireEvent('beforeactivate',newCard,oldCard)===!1){return!1}
if(oldCard&&oldCard.fireEvent('beforedeactivate',oldCard,newCard)===!1){return!1}
if(rendered){Ext.suspendLayouts();if(!newCard.rendered){me.renderItem(newCard,me.getRenderTarget(),owner.items.length)}
if(oldCard){if(me.hideInactive){focusNewCard=oldCard.el.contains(Ext.Element.getActiveElement());oldCard.hide();if(oldCard.hidden){oldCard.hiddenByLayout=!0;oldCard.fireEvent('deactivate',oldCard,newCard)}else{return!1}}}
if(newCard.hidden){newCard.show()}
if(newCard.hidden){me.activeItem=newCard=null}else{me.activeItem=newCard;if(focusNewCard){if(!newCard.defaultFocus){newCard.defaultFocus=':focusable'}
newCard.focus()}}
Ext.resumeLayouts(!0)}else{me.activeItem=newCard}
newCard.fireEvent('activate',newCard,oldCard);return me.activeItem}
return!1},resetItemHideMode:function(item){item.hideMode=item.originalHideMode;delete item.originalHideMode},setItemHideMode:function(item){item.originalHideMode=item.hideMode;item.hideMode='offsets'}})
;
Ext.define('Ext.layout.container.Center',{extend:'Ext.layout.container.Fit',alternateClassName:'Ext.ux.layout.Center',alias:['layout.center','layout.ux.center'],type:'center',percentRe:/^\d+(?:\.\d+)?%$/,itemCls:Ext.baseCSSPrefix+'center-layout-item',childEls:['targetEl'],renderTpl:['<div id="{ownerId}-targetEl" data-ref="targetEl" class="{targetElCls}" role="presentation">'+'{%this.renderBody(out, values)%}'+'</div>'],targetElCls:Ext.baseCSSPrefix+'center-target',beginLayout:function(ownerContext){var me=this,percentRe=me.percentRe,childItems,len,i,itemContext,item;me.callParent([ownerContext]);childItems=ownerContext.childItems;for(i=0,len=childItems.length;i<len;++i){itemContext=childItems[i];item=itemContext.target;if(percentRe.test(item.width)){item.getEl().setStyle('width','')}
if(percentRe.test(item.height)){item.getEl().setStyle('height','')}}
ownerContext.targetElContext=ownerContext.getEl('targetEl',me)},beginLayoutCycle:function(ownerContext,firstCycle){var targetEl=this.targetEl;this.callParent([ownerContext,firstCycle]);targetEl.setStyle('width','');targetEl.setStyle('height','')},getRenderData:function(){var data=this.callParent();data.targetElCls=this.targetElCls;return data},getRenderTarget:function(){return this.targetEl},getItemSizePolicy:function(item,ownerSizeModel){var me=this,sizeModel=ownerSizeModel||me.owner.getSizeModel(),percentRe=me.percentRe,mode=((sizeModel.width.shrinkWrap||!percentRe.test(item.width))?0:1)|((sizeModel.height.shrinkWrap||!percentRe.test(item.height))?0:2);return me.sizePolicies[mode]},isItemShrinkWrap:function(item){return!0},calculate:function(ownerContext){var targetElContext=ownerContext.targetElContext,info;this.callParent([ownerContext]);info=ownerContext.state.info;if(ownerContext.widthModel.shrinkWrap){targetElContext.setWidth(info.contentWidth)}
if(ownerContext.heightModel.shrinkWrap){targetElContext.setHeight(info.contentHeight)}},getPos:function(itemContext,info,dimension){var modelName=dimension+'Model',size=itemContext.props[dimension],pos=0;if(!itemContext[modelName].calculated){size+=info.margins[dimension]}
if(!info.ownerContext[modelName].shrinkWrap){pos=Math.round((info.targetSize[dimension]-size)/2);if(isNaN(pos)){this.done=!1}}
return Math.max(pos,0)},positionItemX:function(itemContext,info){var left=this.getPos(itemContext,info,'width');itemContext.setProp('x',left)},positionItemY:function(itemContext,info){var top=this.getPos(itemContext,info,'height');itemContext.setProp('y',top)},setItemHeight:function(itemContext,info){var ratio=parseFloat(itemContext.target.height)/100;itemContext.setHeight(Math.round((info.targetSize.height-info.margins.height)*ratio))},setItemWidth:function(itemContext,info){var ratio=parseFloat(itemContext.target.width)/100;itemContext.setWidth(Math.round((info.targetSize.width-info.margins.width)*ratio))}})
;
Ext.define('Ext.layout.container.Form',{extend:'Ext.layout.container.Auto',alternateClassName:'Ext.layout.FormLayout',alias:'layout.form',type:'form',formWrapCls:Ext.baseCSSPrefix+'form-layout-wrap',formWrapAutoLabelCls:Ext.baseCSSPrefix+'form-layout-auto-label',formWrapSizedLabelCls:Ext.baseCSSPrefix+'form-layout-sized-label',formColGroupCls:Ext.baseCSSPrefix+'form-layout-colgroup',formColumnCls:Ext.baseCSSPrefix+'form-layout-column',formLabelColumnCls:Ext.baseCSSPrefix+'form-layout-label-column',childEls:['formWrap','labelColumn'],beforeBodyTpl:'<div id="{ownerId}-formWrap" data-ref="formWrap" class="{formWrapCls}"'+'<tpl if="itemSpacing"> style="border-spacing:{itemSpacing}px"</tpl>>'+'<div class="{formColGroupCls}">'+'<div id="{ownerId}-labelColumn" data-ref="labelColumn" class="{formColumnCls} {formLabelColumnCls}"'+'<tpl if="labelWidth"> style="width:{labelWidth}"</tpl>>'+'</div>'+'<div class="{formColumnCls}"></div>'+'</div>',afterBodyTpl:'</div>',getRenderData:function(){var me=this,labelWidth=me.labelWidth,formWrapCls=me.formWrapCls,data=me.callParent();if(labelWidth){if(typeof labelWidth==='number'){labelWidth+='px'}
data.labelWidth=labelWidth;formWrapCls+=' '+me.formWrapSizedLabelCls}else{formWrapCls+=' '+me.formWrapAutoLabelCls}
data.formWrapCls=formWrapCls;data.formColGroupCls=me.formColGroupCls;data.formColumnCls=me.formColumnCls;data.formLabelColumnCls=me.formLabelColumnCls;return data},getRenderTarget:function(){return this.formWrap}})
;
Ext.define('Ext.menu.Bar',{extend:'Ext.menu.Menu',xtype:'menubar',isMenuBar:!0,defaultMenuAlign:'tl-bl?',floating:!1,constrain:!1,showSeparator:!1,allowOtherMenus:!0,ariaRole:'menubar',ui:'default-menubar',layout:{type:'hbox',align:'stretchmax',pack:'start',overflowHandler:'menu'},lookupComponent:function(comp){comp=this.callParent([comp]);if(comp.isMenuItem){comp.menuAlign=this.defaultMenuAlign}
return comp},privates:{onFocusableContainerLeftKey:function(e){e.preventDefault();this.mixins.focusablecontainer.onFocusableContainerLeftKey.call(this,e)},onFocusableContainerRightKey:function(e){e.preventDefault();this.mixins.focusablecontainer.onFocusableContainerRightKey.call(this,e)},onFocusableContainerUpKey:function(e){var focusItem=this.lastFocusedChild;e.preventDefault();if(focusItem&&focusItem.expandMenu){focusItem.expandMenu(e,0)}},onFocusableContainerDownKey:function(e){var focusItem=this.lastFocusedChild;e.preventDefault();if(focusItem&&focusItem.expandMenu){focusItem.expandMenu(e,0)}}}})
;
Ext.define('Ext.menu.ColorPicker',{extend:'Ext.menu.Menu',alias:'widget.colormenu',requires:['Ext.picker.Color'],hideOnClick:!0,pickerId:null,initComponent:function(){var me=this,cfg=Ext.apply({},me.initialConfig),pickerConfig;delete cfg.listeners;pickerConfig=Ext.applyIf({cls:Ext.baseCSSPrefix+'menu-color-item',margin:0,id:me.pickerId,xtype:'colorpicker'},cfg);delete pickerConfig.ownerCmp;Ext.apply(me,{plain:!0,showSeparator:!1,bodyPadding:0,items:[pickerConfig]});me.callParent();me.picker=me.down('colorpicker');me.relayEvents(me.picker,['select']);if(me.hideOnClick){me.on('select',me.hidePickerOnSelect,me)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}})
;
Ext.define('Ext.menu.DatePicker',{extend:'Ext.menu.Menu',alias:'widget.datemenu',requires:['Ext.picker.Date'],ariaRole:'dialog',ariaLabel:'Date picker',hideOnClick:!0,pickerId:null,focusableContainer:!1,initComponent:function(){var me=this,cfg,pickerConfig;if(me.pickerCfg){pickerConfig=Ext.apply({cls:Ext.baseCSSPrefix+'menu-date-item',margin:0,border:!1,xtype:'datepicker'},me.pickerCfg)}else{cfg=Ext.apply({},me.initialConfig);delete cfg.listeners;pickerConfig=Ext.applyIf({cls:Ext.baseCSSPrefix+'menu-date-item',margin:0,border:!1,xtype:'datepicker'},cfg)}
if(me.pickerId!=null&&pickerConfig.id==null){pickerConfig.id=me.pickerId}
delete pickerConfig.ownerCmp;Ext.apply(me,{showSeparator:!1,plain:!0,bodyPadding:0,items:[pickerConfig]});me.callParent();me.picker=me.down('datepicker');me.relayEvents(me.picker,['select']);if(me.hideOnClick){me.on('select',me.hidePickerOnSelect,me)}},onEscapeKey:function(e){var me=this;if(me.floating&&me.ownerCmp&&me.ownerCmp.focus){me.ownerCmp.focus();me.hide()}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}})
;
Ext.define('Ext.panel.Pinnable',{extend:'Ext.Mixin',mixinId:'pinnable',pinnable:!0,pinnedTip:'Unpin this item',unpinnedTip:'Pin this item',initPinnable:function(){var me=this,pinned=me.isPinned();me.addTool(me.pinTool=Ext.widget({xtype:'tool',type:pinned?'unpin':'pin',callback:'togglePin',scope:me,tooltip:pinned?me.pinnedTip:me.unpinnedTip}))},isPinned:function(){return!this.floating},setPinned:function(pinned){var me=this,args;if(pinned!==me.isPinned()){args=[me,pinned];if(me.fireEventArgs('beforepinchange',args)!==!1){me.updatePinned(pinned);me.fireEventArgs('pinchange',args)}}},togglePin:function(){this.setPinned(!this.isPinned())},updatePinned:function(pinned){var me=this,tool=me.pinTool;tool.setTooltip(pinned?me.pinnedTip:me.unpinnedTip);tool.setType(pinned?'unpin':'pin')}})
;
Ext.define('Ext.plugin.LazyItems',{extend:'Ext.plugin.Abstract',alias:'plugin.lazyitems',init:function(comp){this.callParent(arguments);if(this.items){if(this.eagerInstantiation){this.items=comp.prepareItems(this.items)}}
comp.beforeRender=Ext.Function.createInterceptor(comp.beforeRender,this.beforeComponentRender,this)},beforeComponentRender:function(){this.cmp.add(this.items);this.cmp.beforeComponentRender=null}})
;
Ext.define('Ext.plugin.Responsive',{extend:'Ext.plugin.Abstract',alias:'plugin.responsive',requires:['Ext.Responsive'],constructor:function(){this.callParent(arguments);Ext.log.warn('responsive plugin is deprecated; require "Ext.Responsive" instead')},id:'responsive'})
;
Ext.define('Ext.resizer.BorderSplitterTracker',{extend:'Ext.resizer.SplitterTracker',requires:['Ext.util.Region'],getPrevCmp:null,getNextCmp:null,calculateConstrainRegion:function(){var me=this,splitter=me.splitter,collapseTarget=splitter.collapseTarget,defaultSplitMin=splitter.defaultSplitMin,sizePropCap=splitter.vertical?'Width':'Height',minSizeProp='min'+sizePropCap,maxSizeProp='max'+sizePropCap,getSizeMethod='get'+sizePropCap,neighbors=splitter.neighbors,length=neighbors.length,box=collapseTarget.el.getBox(),left=box.x,top=box.y,right=box.right,bottom=box.bottom,size=splitter.vertical?(right-left):(bottom-top),i,neighbor,neighborMaxSize,minRange,maxRange,maxGrowth,maxShrink,targetSize;minRange=(collapseTarget[minSizeProp]||Math.min(size,defaultSplitMin))-size;maxRange=collapseTarget[maxSizeProp];if(!maxRange){maxRange=1e9}else{maxRange-=size}
targetSize=size;for(i=0;i<length;++i){neighbor=neighbors[i];size=neighbor[getSizeMethod]();neighborMaxSize=neighbor[maxSizeProp];if(neighborMaxSize===null){neighborMaxSize=undefined}
maxGrowth=size-neighborMaxSize;maxShrink=size-(neighbor[minSizeProp]||Math.min(size,defaultSplitMin));if(!isNaN(maxGrowth)){if(minRange<maxGrowth){minRange=maxGrowth}}
if(maxRange>maxShrink){maxRange=maxShrink}}
if(maxRange-minRange<2){return null}
box=new Ext.util.Region(top,right,bottom,left);me.constraintAdjusters[me.getCollapseDirection()](box,minRange,maxRange,splitter);me.dragInfo={minRange:minRange,maxRange:maxRange,targetSize:targetSize};return box},constraintAdjusters:{left:function(box,minRange,maxRange,splitter){box[0]=box.x=box.left=box.right+minRange;box.right+=maxRange+splitter.getWidth()},top:function(box,minRange,maxRange,splitter){box[1]=box.y=box.top=box.bottom+minRange;box.bottom+=maxRange+splitter.getHeight()},bottom:function(box,minRange,maxRange,splitter){box.bottom=box.top-minRange;box.top-=maxRange+splitter.getHeight()},right:function(box,minRange,maxRange,splitter){box.right=box.left-minRange;box[0]=box.x=box.left=box.x-maxRange+splitter.getWidth()}},onBeforeStart:function(e){var me=this,splitter=me.splitter,collapseTarget=splitter.collapseTarget,neighbors=splitter.neighbors,length=neighbors.length,i,neighbor;if(collapseTarget.collapsed){return!1}
for(i=0;i<length;++i){neighbor=neighbors[i];if(neighbor.collapsed&&neighbor.isHorz===collapseTarget.isHorz){return!1}}
if(!(me.constrainTo=me.calculateConstrainRegion())){return!1}
return!0},performResize:function(e,offset){var me=this,splitter=me.splitter,collapseDirection=splitter.getCollapseDirection(),collapseTarget=splitter.collapseTarget,adjusters=me.splitAdjusters[splitter.vertical?'horz':'vert'],delta=offset[adjusters.index],dragInfo=me.dragInfo,owner;if(collapseDirection==='right'||collapseDirection==='bottom'){delta=-delta}
delta=Math.min(Math.max(dragInfo.minRange,delta),dragInfo.maxRange);if(delta){(owner=splitter.ownerCt).suspendLayouts();adjusters.adjustTarget(collapseTarget,dragInfo.targetSize,delta);owner.resumeLayouts(!0)}},splitAdjusters:{horz:{index:0,adjustTarget:function(target,size,delta){target.flex=null;target.setSize(size+delta)}},vert:{index:1,adjustTarget:function(target,targetSize,delta){target.flex=null;target.setSize(undefined,targetSize+delta)}}},getCollapseDirection:function(){return this.splitter.getCollapseDirection()}})
;
Ext.define('Ext.rtl.resizer.BorderSplitterTracker',{override:'Ext.resizer.BorderSplitterTracker',rtlDirections:{top:'top',right:'left',bottom:'bottom',left:'right'},getCollapseDirection:function(){var direction=this.splitter.getCollapseDirection();if(!this.splitter.getInherited().rtl!==!Ext.rootInheritedState.rtl){direction=this.rtlDirections[direction]}
return direction}})
;
Ext.define('Ext.resizer.Handle',{extend:'Ext.Component',handleCls:'',baseHandleCls:Ext.baseCSSPrefix+'resizable-handle',region:'',ariaRole:'presentation',beforeRender:function(){var me=this;me.callParent();me.protoEl.unselectable();me.addCls(me.baseHandleCls,me.baseHandleCls+'-'+me.region,me.handleCls)}})
;
Ext.define('Ext.resizer.ResizeTracker',{extend:'Ext.dd.DragTracker',dynamic:!0,preserveRatio:!1,preventDefault:!1,constrainTo:null,proxyCls:Ext.baseCSSPrefix+'resizable-proxy',constructor:function(config){var me=this,widthRatio,heightRatio,throttledResizeFn;if(!config.el){if(config.target.isComponent){me.el=config.target.getEl()}else{me.el=config.target}}
this.callParent(arguments);if(me.preserveRatio&&me.minWidth&&me.minHeight){widthRatio=me.minWidth/me.el.getWidth();heightRatio=me.minHeight/me.el.getHeight();if(heightRatio>widthRatio){me.minWidth=me.el.getWidth()*heightRatio}else{me.minHeight=me.el.getHeight()*widthRatio}}
if(me.throttle){throttledResizeFn=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(me,arguments)},me.throttle);me.resize=function(box,direction,atEnd){if(atEnd){Ext.resizer.ResizeTracker.prototype.resize.apply(me,arguments)}else{throttledResizeFn.apply(null,arguments)}}}},onBeforeStart:function(e){this.startBox=this.target.getBox()},getProxy:function(){var me=this;if(!me.dynamic&&!me.proxy){me.proxy=me.createProxy(me.target||me.el);me.hideProxy=!0}
if(me.proxy){me.proxy.show();return me.proxy}},createProxy:function(target){var proxy,cls=this.proxyCls;if(target.isComponent){proxy=target.getProxy().addCls(cls)}else{proxy=target.createProxy({tag:'div',role:'presentation',cls:cls,id:target.id+'-rzproxy'},Ext.getBody())}
proxy.removeCls(Ext.baseCSSPrefix+'proxy-el');return proxy},onStart:function(e){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox)}},onMouseDown:function(e,target){this.callParent([e,target]);Ext.dom.Element.maskIframes()},onMouseUp:function(e){this.callParent([e]);Ext.dom.Element.unmaskIframes()},onDrag:function(e){if(this.dynamic||this.proxy){this.updateDimensions(e)}},updateDimensions:function(e,atEnd){var me=this,region=me.activeResizeHandle.region,offset=me.getOffset(me.constrainTo?'dragTarget':null),box=me.startBox,ratio,widthAdjust=0,heightAdjust=0,snappedWidth,snappedHeight,adjustX=0,adjustY=0,dragRatio,oppositeCorner,axis,newBox,newHeight,newWidth;region=me.convertRegionName(region);switch(region){case 'south':heightAdjust=offset[1];axis=2;break;case 'north':heightAdjust=-offset[1];adjustY=-heightAdjust;axis=2;break;case 'east':widthAdjust=offset[0];axis=1;break;case 'west':widthAdjust=-offset[0];adjustX=-widthAdjust;axis=1;break;case 'northeast':heightAdjust=-offset[1];adjustY=-heightAdjust;widthAdjust=offset[0];oppositeCorner=[box.x,box.y+box.height];axis=3;break;case 'southeast':heightAdjust=offset[1];widthAdjust=offset[0];oppositeCorner=[box.x,box.y];axis=3;break;case 'southwest':widthAdjust=-offset[0];adjustX=-widthAdjust;heightAdjust=offset[1];oppositeCorner=[box.x+box.width,box.y];axis=3;break;case 'northwest':heightAdjust=-offset[1];adjustY=-heightAdjust;widthAdjust=-offset[0];adjustX=-widthAdjust;oppositeCorner=[box.x+box.width,box.y+box.height];axis=3;break}
newBox={width:box.width+widthAdjust,height:box.height+heightAdjust,x:box.x+adjustX,y:box.y+adjustY};snappedWidth=Ext.Number.snap(newBox.width,me.widthIncrement);snappedHeight=Ext.Number.snap(newBox.height,me.heightIncrement);if(snappedWidth!==newBox.width||snappedHeight!==newBox.height){switch(region){case 'northeast':newBox.y-=snappedHeight-newBox.height;break;case 'north':newBox.y-=snappedHeight-newBox.height;break;case 'southwest':newBox.x-=snappedWidth-newBox.width;break;case 'west':newBox.x-=snappedWidth-newBox.width;break;case 'northwest':newBox.x-=snappedWidth-newBox.width;newBox.y-=snappedHeight-newBox.height}
newBox.width=snappedWidth;newBox.height=snappedHeight}
if(newBox.width<me.minWidth||newBox.width>me.maxWidth){newBox.width=Ext.Number.constrain(newBox.width,me.minWidth,me.maxWidth);if(adjustX){newBox.x=box.x+(box.width-newBox.width)}}else{me.lastX=newBox.x}
if(newBox.height<me.minHeight||newBox.height>me.maxHeight){newBox.height=Ext.Number.constrain(newBox.height,me.minHeight,me.maxHeight);if(adjustY){newBox.y=box.y+(box.height-newBox.height)}}else{me.lastY=newBox.y}
if(me.preserveRatio||e.shiftKey){ratio=me.startBox.width/me.startBox.height;newHeight=Math.min(Math.max(me.minHeight,newBox.width/ratio),me.maxHeight);newWidth=Math.min(Math.max(me.minWidth,newBox.height*ratio),me.maxWidth);if(axis===1){newBox.height=newHeight}else if(axis===2){newBox.width=newWidth}else{dragRatio=Math.abs(oppositeCorner[0]-this.lastXY[0])/Math.abs(oppositeCorner[1]-this.lastXY[1]);if(dragRatio>ratio){newBox.height=newHeight}else{newBox.width=newWidth}
if(region==='northeast'){newBox.y=box.y-(newBox.height-box.height)}else if(region==='northwest'){newBox.y=box.y-(newBox.height-box.height);newBox.x=box.x-(newBox.width-box.width)}else if(region==='southwest'){newBox.x=box.x-(newBox.width-box.width)}}}
me.setPosition=newBox.x!==me.startBox.x||newBox.y!==me.startBox.y;me.resize(newBox,atEnd)},resize:function(box,atEnd){var me=this,target,setPosition=me.setPosition;if(me.dynamic||(!me.dynamic&&atEnd)){if(setPosition){me.target.setBox(box)}else{me.target.setSize(box.width,box.height)}}
if(!atEnd){target=me.getProxy();if(target&&target!==me.target){if(setPosition||me.hideProxy){target.setBox(box)}else{target.setSize(box.width,box.height)}}}},onEnd:function(e){this.updateDimensions(e,!0);if(this.proxy&&this.hideProxy){this.proxy.hide()}},convertRegionName:function(name){return name}})
;
Ext.define('Ext.rtl.resizer.ResizeTracker',{override:'Ext.resizer.ResizeTracker',_rtlRegionNames:{south:'south',north:'north',east:'west',west:'east',northeast:'northwest',southeast:'southwest',southwest:'southeast',northwest:'northeast'},convertRegionName:function(name){return(Ext.rootInheritedState.rtl)?this._rtlRegionNames[name]:name}})
;
Ext.define('Ext.resizer.Resizer',{alternateClassName:'Ext.Resizable',mixins:{observable:'Ext.util.Observable'},uses:['Ext.resizer.ResizeTracker','Ext.Component'],handleCls:Ext.baseCSSPrefix+'resizable-handle',overCls:Ext.baseCSSPrefix+'resizable-handle-over',pinnedCls:Ext.baseCSSPrefix+'resizable-pinned',wrapCls:Ext.baseCSSPrefix+'resizable-wrap',wrappedCls:Ext.baseCSSPrefix+'resizable-wrapped',delimiterRe:/(?:\s*[,;]\s*)|\s+/,dynamic:!0,handles:'s e se',height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:!1,preserveRatio:!1,transparent:!1,possiblePositions:{n:'north',s:'south',e:'east',w:'west',se:'southeast',sw:'southwest',nw:'northwest',ne:'northeast'},touchActionMap:{n:{panY:!1},s:{panY:!1},e:{panX:!1},w:{panX:!1},se:{panX:!1,panY:!1},sw:{panX:!1,panY:!1},nw:{panX:!1,panY:!1},ne:{panX:!1,panY:!1}},ariaRole:'presentation',constructor:function(config){var me=this,unselectableCls=Ext.dom.Element.unselectableCls,handleEls=[],resizeTarget,handleCls,possibles,tag,len,i,pos,box,handle,handles,handleEl,wrapTarget,positioning,targetBaseCls;if(Ext.isString(config)||Ext.isElement(config)||config.dom){resizeTarget=config;config=arguments[1]||{};config.target=resizeTarget}
me.mixins.observable.constructor.call(me,config);resizeTarget=me.target;if(resizeTarget){if(resizeTarget.isComponent){resizeTarget.addClsWithUI('resizable');if(resizeTarget.minWidth){me.minWidth=resizeTarget.minWidth}
if(resizeTarget.minHeight){me.minHeight=resizeTarget.minHeight}
if(resizeTarget.maxWidth){me.maxWidth=resizeTarget.maxWidth}
if(resizeTarget.maxHeight){me.maxHeight=resizeTarget.maxHeight}
if(resizeTarget.floating){if(!me.hasOwnProperty('handles')){me.handles='n ne e se s sw w nw'}}
me.el=resizeTarget.getEl()}else{resizeTarget=me.el=me.target=Ext.get(resizeTarget)}}else{resizeTarget=me.target=me.el=Ext.get(me.el)}
me.el.addCls(Ext.Component.prototype.borderBoxCls);if(Ext.isNumber(me.width)){me.width=Ext.Number.constrain(me.width,me.minWidth,me.maxWidth)}
if(Ext.isNumber(me.height)){me.height=Ext.Number.constrain(me.height,me.minHeight,me.maxHeight)}
if(me.width!==null||me.height!==null){me.target.setSize(me.width,me.height)}
tag=me.el.dom.tagName.toUpperCase();if(tag==='TEXTAREA'||tag==='IMG'||tag==='TABLE'){me.originalTarget=me.target;wrapTarget=resizeTarget.isComponent?resizeTarget.getEl():resizeTarget;me.el.addCls(me.wrappedCls);me.target=me.el=me.el.wrap({role:'presentation',cls:me.wrapCls,id:me.el.id+'-rzwrap',style:wrapTarget.getStyle(['margin-top','margin-bottom'])});positioning=wrapTarget.getPositioning();me.el.setPositioning(positioning);wrapTarget.clearPositioning();box=wrapTarget.getBox();if(positioning.position!=='absolute'){box.x=0;box.y=0}
me.el.setBox(box);wrapTarget.setStyle('position','absolute');me.isTargetWrapped=!0}
me.el.position();if(me.pinned){me.el.addCls(me.pinnedCls)}
me.resizeTracker=new Ext.resizer.ResizeTracker({disabled:me.disabled,target:resizeTarget,el:me.el,constrainTo:me.constrainTo,handleCls:me.handleCls,overCls:me.overCls,throttle:me.throttle,proxy:me.originalTarget?me.el:null,dynamic:me.originalTarget?!0:me.dynamic,originalTarget:me.originalTarget,delegate:'.'+me.handleCls,preserveRatio:me.preserveRatio,heightIncrement:me.heightIncrement,widthIncrement:me.widthIncrement,minHeight:me.minHeight,maxHeight:me.maxHeight,minWidth:me.minWidth,maxWidth:me.maxWidth});me.resizeTracker.on({mousedown:me.onBeforeResize,drag:me.onResize,dragend:me.onResizeEnd,scope:me});if(me.handles==='all'){me.handles='n s e w ne nw se sw'}
handles=me.handles=me.handles.split(me.delimiterRe);possibles=me.possiblePositions;len=handles.length;handleCls=me.handleCls+' '+me.handleCls+'-{0}';if(me.target.isComponent){targetBaseCls=me.target.baseCls;handleCls+=' '+targetBaseCls+'-handle '+targetBaseCls+'-handle-{0}';if(Ext.supports.CSS3BorderRadius){handleCls+=' '+targetBaseCls+'-handle-{0}-br'}}
for(i=0;i<len;i++){handle=handles[i];if(handle&&possibles[handle]){pos=possibles[handle];handleEl=me[pos]=me.el.createChild({id:me.el.id+'-'+pos+'-handle',cls:Ext.String.format(handleCls,pos)+' '+unselectableCls,unselectable:'on',role:'presentation'});handleEl.region=pos;if(me.transparent){handleEl.setOpacity(0)}
handleEl.setTouchAction(me.touchActionMap[handle]);handleEls.push(handleEl)}}
me.resizeTracker.handleEls=handleEls},disable:function(){this.disabled=!0;this.resizeTracker.disable()},enable:function(){this.disabled=!1;this.resizeTracker.enable()},onBeforeResize:function(tracker,e){return this.fireResizeEvent('beforeresize',tracker,e)},onResize:function(tracker,e){return this.fireResizeEvent('resizedrag',tracker,e)},onResizeEnd:function(tracker,e){return this.fireResizeEvent('resize',tracker,e)},fireResizeEvent:function(name,tracker,e){var me=this,box;if(me.hasListeners[name]){box=me.el.getBox();return me.fireEvent(name,me,box.width,box.height,e)}},resizeTo:function(width,height){var me=this;me.target.setSize(width,height);me.fireEvent('resize',me,width,height,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var me=this,handles=me.handles,len=handles.length,positions=me.possiblePositions,handle,pos,i;me.resizeTracker.destroy();if(me.isTargetWrapped){me.target.destroy()}
for(i=0;i<len;i++){pos=positions[handles[i]];if((handle=me[pos])){handle.destroy();me[pos]=null}}
me.callParent()}})
;
Ext.define('Ext.selection.CellModel',{extend:'Ext.selection.DataViewModel',alias:'selection.cellmodel',requires:['Ext.grid.CellContext'],isCellModel:!0,deselectOnContainerClick:!1,enableKeyNav:!0,preventWrap:!1,bindComponent:function(view){var me=this,grid;if(me.view&&me.gridListeners){me.gridListeners.destroy()}
me.callParent([view]);if(view){grid=view.grid||view.ownerCt;if(grid.optimizedColumnMove!==!1){me.gridListeners=grid.on({columnmove:me.onColumnMove,scope:me,destroyable:!0})}}},getViewListeners:function(){var result=this.callParent();result.refresh=this.onViewRefresh;return result},getHeaderCt:function(){var selection=this.navigationModel.getPosition(),view=selection?selection.view:this.primaryView;return view.headerCt},onNavigate:function(e){if(!e.record||e.keyEvent.stopSelection){return}
this.setPosition(e.position)},selectWithEvent:function(record,e){this.select(record)},select:function(pos,keepExisting,suppressEvent){var me=this,row,oldPos=me.getPosition(),store=me.view.store;if(pos||pos===0){if(pos.isModel){row=store.indexOf(pos);if(row!==-1){pos={row:row,column:oldPos?oldPos.column:0}}else{pos=null}}else if(typeof pos==='number'){pos={row:pos,column:0}}}
if(pos){me.selectByPosition(pos,suppressEvent)}else{me.deselect()}},getCurrentPosition:function(){var position=this.selecting?this.nextSelection:this.selection;return position?{view:position.view,record:position.record,row:position.rowIdx,columnHeader:position.column,column:position.view.getColumnManager().indexOf(position.column)}:position},getPosition:function(){return(this.selecting?this.nextSelection:this.selection)||null},setCurrentPosition:function(pos,suppressEvent,preventCheck){if(pos&&!pos.isCellContext){pos=new Ext.grid.CellContext(this.view).setPosition({row:pos.row,column:typeof pos.column==='number'?this.view.getColumnManager().getColumns()[pos.column]:pos.column})}
return this.setPosition(pos,suppressEvent,preventCheck)},setPosition:function(pos,suppressEvent,preventCheck){var me=this,last=me.selection;if(pos){pos=pos.isCellContext?pos.clone():new Ext.grid.CellContext(me.view).setPosition(pos)}
if(!preventCheck&&last){if(pos&&(pos.record===last.record&&pos.column===last.column&&pos.view===last.view)){pos=null}else{me.onCellDeselect(me.selection,suppressEvent)}}
if(pos){me.nextSelection=pos;me.selecting=!0;me.onCellSelect(me.nextSelection,suppressEvent);me.selecting=!1;return(me.selection=pos)}
return null},isCellSelected:function(view,row,column){var me=this,testPos,pos=me.getPosition();if(pos&&pos.view===view){testPos=new Ext.grid.CellContext(view).setPosition({row:row,column:typeof column==='number'?view.getColumnManager().getColumns()[column]:column});return(testPos.record===pos.record)&&(testPos.column===pos.column)}},onStoreRemove:function(store,records,indices){var me=this,pos=me.getPosition();me.callParent(arguments);if(pos&&store.isMoving(pos.record)){return}
if(pos&&store.getCount()&&store.indexOf(pos.record)!==-1){pos.setRow(pos.record)}else{me.selection=null}},onStoreClear:function(){this.callParent(arguments);this.selection=null},onStoreAdd:function(){var me=this,pos=me.getPosition();me.callParent(arguments);if(pos){pos.setRow(pos.record)}else{me.selection=null}},updateSelectedInstances:function(selected){var pos=this.getPosition(),selRec=selected.getAt(0);if(selRec&&pos&&pos.record.id===selRec.id){pos.setRow(selRec)}
this.callParent([selected]);if(selected.length===0&&selRec){this.selection=null}},onCellClick:function(view,cell,cellIndex,record,row,recordIndex,e){if(recordIndex!==-1){this.setPosition(e.position)}},onCellSelect:function(position,supressEvent){if(position&&position.rowIdx!==undefined&&position.rowIdx>-1){this.doSelect(position.record,!1,supressEvent)}},onCellDeselect:function(position,supressEvent){if(position&&position.rowIdx!==undefined){this.doDeselect(position.record,supressEvent)}},onSelectChange:function(record,isSelected,suppressEvent,commitFn){var me=this,pos,eventName,view;if(isSelected){pos=me.nextSelection;eventName='select'}else{pos=me.selection;eventName='deselect'}
view=pos.view||me.primaryView;if((suppressEvent||me.fireEvent('before'+eventName,me,record,pos.rowIdx,pos.colIdx))!==!1&&commitFn()!==!1){if(isSelected){view.onCellSelect(pos)}else{view.onCellDeselect(pos);delete me.selection}
if(!suppressEvent){me.fireEvent(eventName,me,record,pos.rowIdx,pos.colIdx)}}},refresh:function(){var pos=this.getPosition(),selRowIdx;if(pos&&(selRowIdx=this.store.indexOf(this.selected.last()))!==-1){pos.rowIdx=selRowIdx}},onColumnMove:function(headerCt,header,fromIdx,toIdx){var grid=headerCt.up('tablepanel');if(grid){this.onViewRefresh(grid.view)}},onUpdate:function(record){var me=this,pos;if(me.isSelected(record)){pos=me.selecting?me.nextSelection:me.selection;me.view.onCellSelect(pos)}},onViewRefresh:function(view){var me=this,pos=me.getPosition(),newPos,headerCt=view.headerCt,record,column;if(pos&&pos.view===view){record=pos.record;column=view.getColumnByPosition(pos);if(column&&!column.isDescendantOf(headerCt)){column=headerCt.queryById(column.id)||headerCt.down('[text="'+column.text+'"]')||headerCt.down('[dataIndex="'+column.dataIndex+'"]')}
if(column&&record){if(view.store.indexOfId(record.getId())!==-1){newPos=new Ext.grid.CellContext(view).setPosition({row:record,column:column});me.setPosition(newPos)}}else{me.selection=null}}},selectByPosition:function(position,suppressEvent){this.setPosition(position,suppressEvent)}})
;
Ext.define('Ext.selection.RowModel',{extend:'Ext.selection.DataViewModel',alias:'selection.rowmodel',requires:['Ext.grid.CellContext'],enableKeyNav:!0,isRowModel:!0,deselectOnContainerClick:!1,onUpdate:function(record){var me=this,view=me.view,index;if(view&&me.isSelected(record)){index=view.indexOf(record);view.onRowSelect(index);if(record===me.lastFocused){view.onRowFocus(index,!0)}}},onSelectChange:function(record,isSelected,suppressEvent,commitFn){var me=this,views=me.views||[me.view],viewsLn=views.length,recordIndex=me.store.indexOf(record),eventName=isSelected?'select':'deselect',i,view;if((suppressEvent||me.fireEvent('before'+eventName,me,record,recordIndex))!==!1&&commitFn()!==!1){for(i=0;i<viewsLn;i++){view=views[i];recordIndex=view.indexOf(record);if(view.indexOf(record)!==-1){if(isSelected){view.onRowSelect(recordIndex,suppressEvent)}else{view.onRowDeselect(recordIndex,suppressEvent)}}}
if(!suppressEvent){me.fireEvent(eventName,me,record,recordIndex)}}},getCurrentPosition:function(){var firstSelection=this.selected.getAt(0);if(firstSelection){return new Ext.grid.CellContext(this.view).setPosition(this.store.indexOf(firstSelection),0)}},selectByPosition:function(position,keepExisting){if(!position.isCellContext){position=new Ext.grid.CellContext(this.view).setPosition(position.row,position.column)}
this.select(position.record,keepExisting)},selectNext:function(keepExisting,suppressEvent){var me=this,store=me.store,selection=me.getSelection(),record=selection[selection.length-1],index=me.view.indexOf(record)+1,success;if(index===store.getCount()||index===0){success=!1}else{me.doSelect(index,keepExisting,suppressEvent);success=!0}
return success},selectPrevious:function(keepExisting,suppressEvent){var me=this,selection=me.getSelection(),record=selection[0],index=me.view.indexOf(record)-1,success;if(index<0){success=!1}else{me.doSelect(index,keepExisting,suppressEvent);success=!0}
return success},isRowSelected:function(record){return this.isSelected(record)},isCellSelected:function(view,record,columnHeader){return this.isSelected(record)},vetoSelection:function(e){var navModel=this.view.getNavigationModel(),key=e.getKey(),isLeftRight=key===e.RIGHT||key===e.LEFT;return(isLeftRight&&navModel.previousRecord===navModel.record)||this.callParent([e])}})
;
Ext.define('Ext.selection.CheckboxModel',{alias:'selection.checkboxmodel',extend:'Ext.selection.RowModel',requires:['Ext.grid.column.Check'],mode:'MULTI',injectCheckbox:0,checkOnly:!1,locked:!1,showHeaderCheckbox:undefined,headerText:undefined,headerAriaLabel:'Row selector',headerSelectText:'Press Space to select all rows',headerDeselectText:'Press Space to deselect all rows',rowSelectText:'Press Space to select this row',rowDeselectText:'Press Space to deselect this row',allowDeselect:!0,headerWidth:24,checkerOnCls:Ext.baseCSSPrefix+'grid-hd-checker-on',tdCls:Ext.baseCSSPrefix+'grid-cell-special '+Ext.baseCSSPrefix+'selmodel-column',constructor:function(){var me=this;me.callParent(arguments);if(me.mode==='SINGLE'){if(me.showHeaderCheckbox){Ext.Error.raise('The header checkbox is not supported for SINGLE mode '+'selection models.')}
me.showHeaderCheckbox=!1}},beforeViewRender:function(view){var me=this,ownerLockable=view.grid.ownerLockable,isLocked=me.locked||me.config&&me.config.locked;me.callParent(arguments);if(me.injectCheckbox!==!1){if(ownerLockable&&!me.lockListeners){me.lockListeners=ownerLockable.mon(ownerLockable,{lockcolumn:me.onColumnLock,unlockcolumn:me.onColumnUnlock,scope:me,destroyable:!0})}
if(!ownerLockable||(view.isLockedView&&(me.hasLockedHeader()||isLocked))||(view.isNormalView&&!me.column)){me.addCheckbox(view);me.mon(view.ownerGrid,{beforereconfigure:me.onBeforeReconfigure,reconfigure:me.onReconfigure,scope:me})}}},onColumnUnlock:function(lockable,column){var me=this,checkbox=me.injectCheckbox,lockedColumns=lockable.lockedGrid.visibleColumnManager.getColumns();if(lockedColumns.length===1&&lockedColumns[0]===me.column){if(checkbox==='first'){checkbox=0}else if(checkbox==='last'){checkbox=lockable.normalGrid.visibleColumnManager.getColumns().length}
lockable.unlock(me.column,checkbox)}},onColumnLock:function(lockable,column){var me=this,checkbox=me.injectCheckbox,lockedColumns=lockable.lockedGrid.visibleColumnManager.getColumns();if(lockedColumns.length===1){if(checkbox==='first'){checkbox=0}else if(checkbox==='last'){checkbox=lockable.lockedGrid.visibleColumnManager.getColumns().length}
lockable.lock(me.column,checkbox)}},bindComponent:function(view){this.sortable=!1;this.callParent(arguments)},hasLockedHeader:function(){var columns=this.view.ownerGrid.getVisibleColumnManager().getColumns(),len=columns.length,i;for(i=0;i<len;i++){if(columns[i].locked){return!0}}
return!1},addCheckbox:function(view){var me=this,checkboxIndex=me.injectCheckbox,headerCt=view.headerCt;if(checkboxIndex!==!1){if(checkboxIndex==='first'){checkboxIndex=0}else if(checkboxIndex==='last'){checkboxIndex=headerCt.getColumnCount()}
Ext.suspendLayouts();if(view.getStore().isBufferedStore){me.showHeaderCheckbox=!1}
me.column=headerCt.add(checkboxIndex,me.column||me.getHeaderConfig());Ext.resumeLayouts()}},onBeforeReconfigure:function(grid,store,columns,oldStore,oldColumns){var column=this.column,headerCt=column.ownerCt;if(columns&&headerCt){headerCt.remove(column,!1)}},onReconfigure:function(grid,store,columns){var me=this;if(columns){if(grid.lockable){if(grid.lockedGrid.isVisible()){grid.lock(me.column,0)}else{grid.unlock(me.column,0)}}else{me.addCheckbox(me.view)}
grid.view.refreshView()}},onHeaderClick:function(headerCt,header,e){var me=this,store=me.store,isChecked,records,i,len,selections,selection;if(me.showHeaderCheckbox!==!1&&header===me.column&&me.mode!=='SINGLE'){e.stopEvent();isChecked=header.el.hasCls(Ext.baseCSSPrefix+'grid-hd-checker-on');if(isChecked){records=[];selections=this.getSelection();for(i=0,len=selections.length;i<len;++i){selection=selections[i];if(store.indexOf(selection)>-1){records.push(selection)}}
if(records.length>0){me.deselect(records)}}else{me.selectAll()}}},getHeaderConfig:function(){var me=this,showCheck=me.showHeaderCheckbox!==!1,htmlEncode=Ext.String.htmlEncode,config;config={xtype:'checkcolumn',headerCheckbox:showCheck,isCheckerHd:showCheck,ignoreExport:!0,text:me.headerText,width:me.headerWidth,sortable:!1,draggable:!1,resizable:!1,hideable:!1,menuDisabled:!0,checkOnly:me.checkOnly,checkboxAriaRole:'presentation',tdCls:Ext.baseCSSPrefix+'selmodel-checkbox '+me.tdCls,cls:Ext.baseCSSPrefix+'selmodel-column',editRenderer:me.editRenderer||me.renderEmpty,locked:me.hasLockedHeader(),processEvent:Ext.emptyFn,renderer:me.renderer||me.defaultRenderer,toggleAll:Ext.emptyFn,setRecordCheck:Ext.emptyFn,isRecordChecked:me.isRowSelected.bind(me)};if(!me.checkOnly){config.ariaRole='presentation'}else{config.useAriaElements=!0;config.ariaLabel=htmlEncode(me.headerAriaLabel);config.headerSelectText=htmlEncode(me.headerSelectText);config.headerDeselectText=htmlEncode(me.headerDeselectText);config.rowSelectText=htmlEncode(me.rowSelectText);config.rowDeselectText=htmlEncode(me.rowDeselectText)}
return config},toggleRecord:function(record,recordIndex,checked,cell){this[checked?'select':'deselect']([record],this.mode!=='SINGLE')},renderEmpty:function(){return'&#160;'},refresh:function(){this.callParent(arguments);this.updateHeaderState()},selectByPosition:function(position,keepExisting){if(!position.isCellContext){position=new Ext.grid.CellContext(this.view).setPosition(position.row,position.column)}
if(!this.checkOnly||position.column===this.column){this.callParent([position,keepExisting])}},onSelectChange:function(record,isSelected){var me=this;me.callParent(arguments);if(me.column){me.column.updateCellAriaDescription(record,isSelected)}
if(!me.suspendChange){me.updateHeaderState()}},onStoreLoad:function(){this.callParent(arguments);this.updateHeaderState()},onStoreAdd:function(){this.callParent(arguments);this.updateHeaderState()},onStoreRemove:function(){this.callParent(arguments);this.updateHeaderState()},onStoreRefresh:function(){this.callParent(arguments);this.updateHeaderState()},maybeFireSelectionChange:function(fireEvent){if(fireEvent&&!this.suspendChange){this.updateHeaderState()}
this.callParent(arguments)},resumeChanges:function(){this.callParent();if(!this.suspendChange){this.updateHeaderState()}},updateHeaderState:function(){var me=this,store=me.store,storeCount=store.getCount(),views=me.views,hdSelectStatus=!1,selectedCount=0,selected,len,i;if(!store.isBufferedStore&&storeCount>0){selected=me.selected;hdSelectStatus=!0;for(i=0,len=selected.getCount();i<len;++i){if(store.indexOfId(selected.getAt(i).id)>-1){++selectedCount}}
hdSelectStatus=storeCount===selectedCount}
if(views&&views.length){me.column.setHeaderStatus(hdSelectStatus)}},vetoSelection:function(e){var me=this,column=me.column,veto,isClick,isSpace;if(me.checkOnly){isClick=e.type===column.triggerEvent&&e.getTarget(me.column.getCellSelector());isSpace=e.getKey()===e.SPACE&&e.position.column===column;veto=!(isClick||isSpace)}
return veto||me.callParent([e])},privates:{onBeforeNavigate:function(metaEvent){var e=metaEvent.keyEvent;if(this.selectionMode!=='SINGLE'){metaEvent.ctrlKey=metaEvent.ctrlKey||e.ctrlKey||(e.type===this.column.triggerEvent&&!e.shiftKey)||e.getKey()===e.SPACE}},selectWithEventMulti:function(record,e,isSelected){var me=this;if(!e.shiftKey&&!e.ctrlKey&&e.getTarget(me.column.getCellSelector())){if(isSelected){me.doDeselect(record)}else{me.doSelect(record,!0)}}else{me.callParent([record,e,isSelected])}}}},function(CheckboxModel){CheckboxModel.prototype.checkSelector='.'+Ext.grid.column.Check.prototype.checkboxCls})
;
Ext.define('Ext.theme.triton.selection.CheckboxModel',{override:'Ext.selection.CheckboxModel',headerWidth:32,onHeaderClick:function(headerCt,header,e){this.callParent([headerCt,header,e]);if(Ext.isIE8){header.getView().ownerGrid.el.syncRepaint()}}})
;
Ext.define('Ext.selection.TreeModel',{extend:'Ext.selection.RowModel',alias:'selection.treemodel',selectOnExpanderClick:!1,constructor:function(config){var me=this;me.callParent([config]);if(me.pruneRemoved){me.pruneRemoved=!1;me.pruneRemovedNodes=!0}},getStoreListeners:function(){var me=this,result=me.callParent();result.noderemove=me.onNodeRemove;return result},onNodeRemove:function(parent,node,isMove){if(!isMove){var toDeselect=[];this.gatherSelected(node,toDeselect);if(toDeselect.length){this.deselect(toDeselect)}}},pruneRemovedOnRefresh:function(){return this.pruneRemovedNodes},vetoSelection:function(e){var view=this.view,select=this.selectOnExpanderClick,veto;veto=!select&&e.type==='click'&&e.getTarget(view.expanderSelector||(view.lockingPartner&&view.lockingPartner.expanderSelector));return veto||this.callParent([e])},privates:{gatherSelected:function(node,toDeselect){var childNodes=node.childNodes,i,len,child;if(this.selected.containsKey(node.id)){toDeselect.push(node)}
if(childNodes){for(i=0,len=childNodes.length;i<len;++i){child=childNodes[i];this.gatherSelected(child,toDeselect)}}}}})
;
Ext.define('Ext.slider.Thumb',{requires:['Ext.dd.DragTracker','Ext.util.Format'],overCls:Ext.baseCSSPrefix+'slider-thumb-over',constructor:function(config){var me=this;Ext.apply(me,config||{},{cls:Ext.baseCSSPrefix+'slider-thumb',constrain:!1});if(me.id==null){Ext.id(me,'ext-slider-thumb-')}
me.callParent([config])},render:function(){var me=this;me.el=me.slider.innerEl.insertFirst(me.getElConfig());me.onRender()},onRender:function(){var me=this,panDisable=me.slider.vertical?'panY':'panX',touchAction={};touchAction[panDisable]=!1;me.el.setTouchAction(touchAction);if(me.disabled){me.disable()}
me.initEvents()},getElConfig:function(){var me=this,slider=me.slider,style={};style[slider.vertical?'bottom':slider.horizontalProp]=slider.calculateThumbPosition(slider.normalizeValue(me.value))+'%';return{style:style,id:me.id,cls:me.cls,role:'presentation'}},move:function(v,animate){var me=this,el=me.el,slider=me.slider,styleProp=slider.vertical?'bottom':slider.horizontalProp,to,from,animCfg;v+='%';if(!animate){el.dom.style[styleProp]=v}else{to={};to[styleProp]=v;if(!Ext.supports.GetPositionPercentage){from={};from[styleProp]=el.dom.style[styleProp]}
animCfg={target:el,duration:350,from:from,to:to,scope:me,callback:me.onAnimComplete};if(animate!==!0){Ext.apply(animCfg,animate)}
me.anim=new Ext.fx.Anim(animCfg)}},onAnimComplete:function(){this.anim=null},enable:function(){var el=this.el;this.disabled=!1;if(el){el.removeCls(this.slider.disabledCls)}},disable:function(){var el=this.el;this.disabled=!0;if(el){el.addCls(this.slider.disabledCls)}},initEvents:function(){var me=this;me.tracker=new Ext.dd.DragTracker({el:me.el,onBeforeStart:me.onBeforeDragStart.bind(me),onStart:me.onDragStart.bind(me),onDrag:me.onDrag.bind(me),onEnd:me.onDragEnd.bind(me),tolerance:3,autoStart:300});me.el.hover(me.addOverCls,me.removeOverCls,me)},addOverCls:function(){var me=this;if(!me.disabled){me.el.addCls(me.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},onBeforeDragStart:function(e){var me=this,el=me.el,trackerXY=me.tracker.getXY(),delta=me.pointerOffset=el.getXY();if(me.disabled){return!1}else{delta[0]+=Math.floor(el.getWidth()/2)-trackerXY[0];delta[1]+=Math.floor(el.getHeight()/2)-trackerXY[1];me.slider.promoteThumb(me);return!0}},onDragStart:function(e){var me=this,slider=me.slider;slider.onDragStart(me,e);me.el.addCls(Ext.baseCSSPrefix+'slider-thumb-drag');me.dragging=me.slider.dragging=!0;me.dragStartValue=me.value;slider.fireEvent('dragstart',slider,e,me)},onDrag:function(e){var me=this,slider=me.slider,index=me.index,newValue=me.getValueFromTracker(),above,below;if(newValue!==undefined){if(me.constrain){above=slider.thumbs[index+1];below=slider.thumbs[index-1];if(below!==undefined&&newValue<=below.value){newValue=below.value}
if(above!==undefined&&newValue>=above.value){newValue=above.value}}
slider.setValue(index,newValue,!1);slider.fireEvent('drag',slider,e,me)}},getValueFromTracker:function(){var slider=this.slider,trackerXY=this.tracker.getXY(),trackPoint;trackerXY[0]+=this.pointerOffset[0];trackerXY[1]+=this.pointerOffset[1];trackPoint=slider.getTrackpoint(trackerXY);if(trackPoint!=null){return slider.reversePixelValue(trackPoint)}},onDragEnd:function(e){var me=this,slider=me.slider,value=me.value;slider.onDragEnd(me,e);me.el.removeCls(Ext.baseCSSPrefix+'slider-thumb-drag');me.dragging=slider.dragging=!1;slider.fireEvent('dragend',slider,e);if(me.dragStartValue!==value){slider.fireEvent('changecomplete',slider,value,me)}},destroy:function(){var me=this,anim=this.anim;if(anim){anim.end()}
me.el=me.tracker=me.anim=Ext.destroy(me.el,me.tracker);me.callParent()}})
;
Ext.define('Ext.slider.Tip',{extend:'Ext.tip.Tip',alias:'widget.slidertip',offsets:null,align:null,position:'',minWidth:10,defaultVerticalPosition:'left',defaultHorizontalPosition:'top',isSliderTip:!0,init:function(slider){var me=this,align,offsets;if(!me.position){me.position=slider.vertical?me.defaultVerticalPosition:me.defaultHorizontalPosition}
switch(me.position){case 'top':offsets=[0,-10];align='b-t?';break;case 'bottom':offsets=[0,10];align='t-b?';break;case 'left':offsets=[-10,0];align='r-l?';break;case 'right':offsets=[10,0];align='l-r?';break}
if(!me.align){me.align=align}
if(!me.offsets){me.offsets=offsets}
slider.on({scope:me,dragstart:me.onSlide,drag:me.onSlide,dragend:me.hide,destroy:me.destroy})},onSlide:function(slider,e,thumb){var me=this;me.update(me.getText(thumb));me.show();me.el.alignTo(thumb.el,me.align,me.offsets)},getText:function(thumb){return String(thumb.value)}})
;
Ext.define('Ext.slider.Multi',{extend:'Ext.form.field.Base',alias:'widget.multislider',alternateClassName:'Ext.slider.MultiSlider',requires:['Ext.slider.Thumb','Ext.slider.Tip','Ext.Number','Ext.util.Format','Ext.Template'],vertical:!1,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,pageSize:10,increment:0,clickRange:[5,15],clickToChange:!0,animate:!0,dragging:!1,constrainThumbs:!0,useTips:!0,tipText:null,defaultBindProperty:'value',publishes:['value'],thumbPerValue:!1,ariaRole:'slider',focusable:!0,needArrowKeys:!0,tabIndex:0,skipLabelForAttribute:!0,focusCls:'slider-focus',childEls:['endEl','innerEl'],fieldSubTpl:['<div id="{id}" data-ref="inputEl" {inputAttrTpl}',' class="',Ext.baseCSSPrefix,'slider {fieldCls} {vertical}','{childElCls}"','<tpl if="tabIdx != null"> tabindex="{tabIdx}"</tpl>','<tpl foreach="ariaElAttributes"> {$}="{.}"</tpl>','<tpl foreach="inputElAriaAttributes"> {$}="{.}"</tpl>','>','<div id="{cmpId}-endEl" data-ref="endEl" class="'+Ext.baseCSSPrefix+'slider-end" role="presentation">','<div id="{cmpId}-innerEl" data-ref="innerEl" class="'+Ext.baseCSSPrefix+'slider-inner" role="presentation">','{%this.renderThumbs(out, values)%}','</div>','</div>','</div>',{renderThumbs:function(out,values){var me=values.$comp,i=0,thumbs=me.thumbs,len=thumbs.length,thumb,thumbConfig;for(;i<len;i++){thumb=thumbs[i];thumbConfig=thumb.getElConfig();thumbConfig.id=me.id+'-thumb-'+i;Ext.DomHelper.generateMarkup(thumbConfig,out)}},disableFormats:!0}],horizontalProp:'left',initValue:function(){var me=this,extValueFrom=Ext.valueFrom,thumbPerValue=me.thumbPerValue,values;values=extValueFrom(me.values,[extValueFrom(me.value,extValueFrom(me.minValue,0))]);me.originalValue=values;me.initializingValues=!0;me.updateValues(values);me.initializingValues=!1;me.thumbPerValue=thumbPerValue},initComponent:function(){var me=this,tipText=me.tipText,tipPlug,hasTip,p,pLen,plugins;me.thumbs=[];me.keyIncrement=Math.max(me.increment,me.keyIncrement);me.extraFieldBodyCls=Ext.baseCSSPrefix+'slider-ct-'+(me.vertical?'vert':'horz');me.callParent();if(me.useTips){tipPlug={};if(Ext.isObject(me.useTips)){Ext.apply(tipPlug,me.useTips)}else if(tipText){tipPlug.getText=tipText}
if(typeof(tipText=tipPlug.getText)==='string'){tipPlug.getText=function(thumb){return Ext.callback(tipText,null,[thumb],0,me,me)}}
plugins=me.plugins=me.plugins||[];pLen=plugins.length;for(p=0;p<pLen;p++){if(plugins[p].isSliderTip){hasTip=!0;break}}
if(!hasTip){me.plugins.push(new Ext.slider.Tip(tipPlug))}}},addThumb:function(value){var me=this,thumb=new Ext.slider.Thumb({ownerCt:me,value:value,slider:me,index:me.thumbs.length,constrain:me.constrainThumbs,disabled:!!me.readOnly});me.thumbs.push(thumb);if(me.rendered){thumb.render()}
return thumb},promoteThumb:function(topThumb){var thumbs=this.thumbStack||(this.thumbStack=Ext.Array.slice(this.thumbs)),ln=thumbs.length,zIndex=10000,i;if(thumbs[0]!==topThumb){Ext.Array.remove(thumbs,topThumb);thumbs.unshift(topThumb)}
for(i=0;i<ln;i++){thumbs[i].el.setStyle('zIndex',zIndex);zIndex-=1000}},getSubTplData:function(fieldData){var me=this,data,ariaAttr;data=Ext.apply(me.callParent([fieldData]),{$comp:me,vertical:me.vertical?Ext.baseCSSPrefix+'slider-vert':Ext.baseCSSPrefix+'slider-horz',minValue:me.minValue,maxValue:me.maxValue,value:me.value,tabIdx:me.tabIndex,childElCls:''});ariaAttr=data.inputElAriaAttributes;if(ariaAttr){if(!ariaAttr['aria-labelledby']){ariaAttr['aria-labelledby']=me.id+'-labelEl'}
ariaAttr['aria-orientation']=me.vertical?'vertical':'horizontal';ariaAttr['aria-valuemin']=me.minValue;ariaAttr['aria-valuemax']=me.maxValue;ariaAttr['aria-valuenow']=me.value}
return data},onRender:function(){var me=this,thumbs=me.thumbs,len=thumbs.length,i=0,thumb;me.callParent(arguments);for(i=0;i<len;i++){thumb=thumbs[i];thumb.el=me.el.getById(me.id+'-thumb-'+i);thumb.onRender()}},initEvents:function(){var me=this;me.callParent();me.mon(me.el,{scope:me,mousedown:me.onMouseDown,keydown:me.onKeyDown})},onDragStart:Ext.emptyFn,onDragEnd:Ext.emptyFn,getTrackpoint:function(xy){var me=this,vertical=me.vertical,sliderTrack=me.innerEl,trackLength,result,positionProperty;if(vertical){positionProperty='top';trackLength=sliderTrack.getHeight()}else{positionProperty=me.horizontalProp;trackLength=sliderTrack.getWidth()}
xy=me.transformTrackPoints(sliderTrack.translatePoints(xy));result=Ext.Number.constrain(xy[positionProperty],0,trackLength);return vertical?trackLength-result:result},transformTrackPoints:Ext.identityFn,checkChange:Ext.emptyFn,onMouseDown:function(e){var me=this,thumbClicked=!1,i=0,thumbs=me.thumbs,len=thumbs.length,trackPoint;if(me.disabled){return}
for(;!thumbClicked&&i<len;i++){thumbClicked=thumbClicked||e.target===thumbs[i].el.dom}
me.focus();if(me.clickToChange&&!thumbClicked){trackPoint=me.getTrackpoint(e.getXY());if(trackPoint!==undefined){me.onClickChange(trackPoint)}}},onClickChange:function(trackPoint){var me=this,thumb,index;thumb=me.getNearest(trackPoint);if(!thumb.disabled){index=thumb.index;me.setValue(index,Ext.util.Format.round(me.reversePixelValue(trackPoint),me.decimalPrecision),undefined,!0)}},getNearest:function(trackPoint){var me=this,clickValue=me.reversePixelValue(trackPoint),nearestDistance=me.getRange()+5,nearest=null,thumbs=me.thumbs,i=0,len=thumbs.length,thumb,value,dist;for(;i<len;i++){thumb=me.thumbs[i];value=thumb.value;dist=Math.abs(value-clickValue);if(Math.abs(dist)<=nearestDistance){if(nearest&&nearest.value==value&&value>clickValue&&thumb.index>nearest.index){continue}
nearest=thumb;nearestDistance=dist}}
return nearest},onKeyDown:function(e){var me=this,ariaDom=me.ariaEl.dom,k,val;k=e.getKey();if(me.disabled||me.thumbs.length!==1){if(k!==e.TAB){e.preventDefault()}
return}
switch(k){case e.UP:case e.RIGHT:val=e.ctrlKey?me.maxValue:me.getValue(0)+me.keyIncrement;break;case e.DOWN:case e.LEFT:val=e.ctrlKey?me.minValue:me.getValue(0)-me.keyIncrement;break;case e.HOME:val=me.minValue;break;case e.END:val=me.maxValue;break;case e.PAGE_UP:val=me.getValue(0)+me.pageSize;break;case e.PAGE_DOWN:val=me.getValue(0)-me.pageSize;break}
if(val!==undefined){e.stopEvent();val=me.normalizeValue(val);me.setValue(0,val,undefined,!0);if(ariaDom){ariaDom.setAttribute('aria-valuenow',val)}}},normalizeValue:function(value){var me=this,snapFn=me.zeroBasedSnapping?'snap':'snapInRange';value=Ext.Number[snapFn](value,me.increment,me.minValue,me.maxValue);value=Ext.util.Format.round(value,me.decimalPrecision);value=Ext.Number.constrain(value,me.minValue,me.maxValue);return value},setMinValue:function(val){var me=this,thumbs=me.thumbs,len=thumbs.length,ariaDom=me.ariaEl.dom,thumb,i;me.minValue=val;for(i=0;i<len;++i){thumb=thumbs[i];if(thumb.value<val){me.setValue(i,val,!1)}}
if(ariaDom){ariaDom.setAttribute('aria-valuemin',val)}
me.syncThumbs()},setMaxValue:function(val){var me=this,thumbs=me.thumbs,len=thumbs.length,ariaDom=me.ariaEl.dom,thumb,i;me.maxValue=val;for(i=0;i<len;++i){thumb=thumbs[i];if(thumb.value>val){me.setValue(i,val,!1)}}
if(ariaDom){ariaDom.setAttribute('aria-valuemax',val)}
me.syncThumbs()},setValue:function(index,value,animate,changeComplete){var me=this,ariaDom=me.ariaEl.dom,thumb;if(Ext.isArray(index)){me.updateValues(index,value);return me}
thumb=me.thumbs[index];value=me.normalizeValue(value);if(value!==thumb.value&&me.fireEvent('beforechange',me,value,thumb.value,thumb,'update')!==!1){thumb.value=value;if(me.rendered){if(Ext.isDefined(animate)){animate=animate===!1?!1:animate}else{animate=me.animate}
thumb.move(me.calculateThumbPosition(value),animate);if(index===0&&ariaDom){ariaDom.setAttribute('aria-valuenow',value)}
me.fireEvent('change',me,value,thumb,'update');me.checkDirty();if(changeComplete){me.fireEvent('changecomplete',me,value,thumb)}}}
return me},calculateThumbPosition:function(v){var me=this,minValue=me.minValue,pos=(v-minValue)/me.getRange()*100;if(isNaN(pos)){pos=0}
return pos},getRatio:function(){var me=this,innerEl=me.innerEl,trackLength=me.vertical?innerEl.getHeight():innerEl.getWidth(),valueRange=me.getRange();return valueRange===0?trackLength:(trackLength/valueRange)},getRange:function(){return this.maxValue-this.minValue},reversePixelValue:function(pos){return this.minValue+(pos/this.getRatio())},reversePercentageValue:function(pos){return this.minValue+this.getRange()*(pos/100)},onDisable:function(){var me=this,i=0,thumbs=me.thumbs,len=thumbs.length,thumb,el,xy;me.callParent();for(;i<len;i++){thumb=thumbs[i];el=thumb.el;thumb.disable();if(Ext.isIE){xy=el.getXY();el.hide();me.innerEl.addCls(me.disabledCls).dom.disabled=!0;if(!me.thumbHolder){me.thumbHolder=me.endEl.createChild({role:'presentation',cls:Ext.baseCSSPrefix+'slider-thumb '+me.disabledCls})}
me.thumbHolder.show().setXY(xy)}}},onEnable:function(){var me=this,i=0,thumbs=me.thumbs,len=thumbs.length,thumb,el;this.callParent();for(;i<len;i++){thumb=thumbs[i];el=thumb.el;thumb.enable();if(Ext.isIE){me.innerEl.removeCls(me.disabledCls).dom.disabled=!1;if(me.thumbHolder){me.thumbHolder.hide()}
el.show();me.syncThumbs()}}},syncThumbs:function(){if(this.rendered){var thumbs=this.thumbs,length=thumbs.length,i=0;for(;i<length;i++){thumbs[i].move(this.calculateThumbPosition(thumbs[i].value))}}},getValue:function(index){return Ext.isNumber(index)?this.thumbs[index].value:this.getValues()},getValues:function(){var values=[],i=0,thumbs=this.thumbs,len=thumbs.length;for(;i<len;i++){values.push(thumbs[i].value)}
return values},getSubmitValue:function(){var me=this;return(me.disabled||!me.submitValue)?null:me.getValue()},reset:function(){var me=this,arr=[].concat(me.originalValue);me.updateValues(arr);me.clearInvalid();delete me.wasValid},updateValues:function(values,animate,supressEvents){var me=this,len=values.length,thumbs=me.thumbs,thumbLen=thumbs.length,newValues=[],skipEvents=me.initializingValues||supressEvents,i,thumb,value,addLen,removeLen;for(i=0;i<len;i++){thumb=thumbs[i];value=values[i];if(thumb){me.setValue(i,value,animate)}else{newValues.push(value)}}
if(me.thumbPerValue||me.initializingValues){addLen=newValues.length;removeLen=thumbLen-len;for(i=0;i<addLen;i++){value=newValues[i];if(skipEvents||me.fireEvent('beforechange',me,value,null,null,'add')!==!1){thumb=me.addThumb(me.normalizeValue(value));if(!skipEvents){me.fireEvent('change',me,value,thumb,'add')}
me.checkDirty()}}
for(i=0;i<removeLen;i++){thumb=thumbs[thumbs.length-1];if(skipEvents||me.fireEvent('beforechange',me,null,thumb.value,thumb,'remove')!==!1){me.removeThumb(thumb);if(!skipEvents){me.fireEvent('change',me,null,null,'remove')}
me.checkDirty()}}}
return me},removeThumb:function(thumb){var me=this,thumbs=me.thumbs,index;if(Ext.isNumber(thumb)){index=thumb;thumb=thumbs[index]}else{index=me.findThumbIndex(thumb)}
if(thumb&&Ext.isNumber(index)){thumbs.splice(index,1);me.thumbStack=Ext.Array.slice(me.thumbs);Ext.destroy(thumb)}},findThumbIndex:function(thumb){var thumbs=this.thumbs,len=thumbs.length,index=null,i;for(i=0;i<len;i++){if(thumbs[i]===thumb){index=i;break}}
return index},setReadOnly:function(readOnly){var me=this,thumbs=me.thumbs,len=thumbs.length,i=0;me.callParent(arguments);readOnly=me.readOnly;for(;i<len;++i){if(readOnly){thumbs[i].disable()}else{thumbs[i].enable()}}},doDestroy:function(){var me=this;if(me.rendered){Ext.destroy(me.thumbs)}
if(me.thumbHolder){me.thumbHolder.destroy();me.thumbHolder=null}
me.callParent()}})
;
Ext.define('Ext.rtl.slider.Multi',{override:'Ext.slider.Multi',initComponent:function(){if(this.getInherited().rtl){this.horizontalProp='right'}
this.callParent()},onDragStart:function(){this.callParent(arguments);this._rtlInnerWidth=this.innerEl.getWidth()},onDragEnd:function(){this.callParent(arguments);delete this._rtlInnerWidth},onKeyDown:function(e){var key;if(this.getInherited().rtl){key=e.getKey();if(key===e.RIGHT){e.keyCode=e.LEFT}else if(key===e.LEFT){e.keyCode=e.RIGHT}}
return this.callParent([e])},transformTrackPoints:function(pos){var left,innerWidth;if(this.isOppositeRootDirection()){left=pos.left;delete pos.left;innerWidth=typeof this._rtlInnerWidth!=='undefined'?this._rtlInnerWidth:this.innerEl.getWidth();pos.right=innerWidth-left;return pos}else{return this.callParent(arguments)}}})
;
Ext.define('Ext.slider.Single',{extend:'Ext.slider.Multi',alias:['widget.slider','widget.sliderfield'],alternateClassName:['Ext.Slider','Ext.form.SliderField','Ext.slider.SingleSlider','Ext.slider.Slider'],initComponent:function(){if(this.publishOnComplete){this.valuePublishEvent='changecomplete'}
this.callParent()},publishOnComplete:!0,getValue:function(){return this.callParent([0])},setValue:function(value,animate){var args=arguments,len=args.length;if(len===1||(len<=3&&typeof args[1]!=='number')){args=Ext.toArray(args);args.unshift(0)}
return this.callParent(args)},getNearest:function(){return this.thumbs[0]}})
;
Ext.define('Ext.slider.Widget',{extend:'Ext.Widget',alias:'widget.sliderwidget',requires:['Ext.slider.Multi'],cachedConfig:{vertical:!1},config:{clickToChange:!0,ui:'widget',value:0,minValue:0,maxValue:100,publishOnComplete:!0,twoWayBindable:{value:1}},decimalPrecision:0,defaultBindProperty:'value',element:{reference:'element',cls:Ext.baseCSSPrefix+'slider',listeners:{mousedown:'onMouseDown',dragstart:'cancelDrag',drag:'cancelDrag',dragend:'cancelDrag'},children:[{reference:'endEl',cls:Ext.baseCSSPrefix+'slider-end',children:[{reference:'innerEl',cls:Ext.baseCSSPrefix+'slider-inner'}]}]},thumbCls:Ext.baseCSSPrefix+'slider-thumb',horizontalProp:'left',animateOnSetValue:undefined,applyValue:function(value){var me=this,animate=me.animateOnSetValue,i,len;if(Ext.isArray(value)){value=Ext.Array.from(value);for(i=0,len=value.length;i<len;++i){me.setThumbValue(i,value[i]=me.normalizeValue(value[i]),animate,!0)}}else{value=me.normalizeValue(value);me.setThumbValue(0,value,animate,!0)}
return value},updateVertical:function(vertical,oldVertical){this.element.removeCls(Ext.baseCSSPrefix+'slider-'+(oldVertical?'vert':'horz'));this.element.addCls(Ext.baseCSSPrefix+'slider-'+(vertical?'vert':'horz'))},updateHeight:function(height,oldHeight){this.callParent([height,oldHeight]);this.endEl.dom.style.height=this.innerEl.dom.style.height='100%'},cancelDrag:function(e){e.stopPropagation()},getThumb:function(ordinal){var me=this,thumbConfig,result=(me.thumbs||(me.thumbs=[]))[ordinal],panDisable=me.getVertical()?'panY':'panX',touchAction={};if(!result){thumbConfig={cls:me.thumbCls,style:{}};thumbConfig['data-thumbIndex']=ordinal;result=me.thumbs[ordinal]=me.innerEl.createChild(thumbConfig);touchAction[panDisable]=!1;result.setTouchAction(touchAction)}
return result},getThumbPositionStyle:function(){return this.getVertical()?'bottom':this.horizontalProp},update:function(){var me=this,values=me.getValues(),len=values.length,i;for(i=0;i<len;i++){this.thumbs[i].dom.style[me.getThumbPositionStyle()]=me.calculateThumbPosition(values[i])+'%'}},updateMaxValue:function(maxValue){this.onRangeAdjustment(maxValue,'min')},updateMinValue:function(minValue){this.onRangeAdjustment(minValue,'max')},onRangeAdjustment:function(rangeValue,compareType){var value=this._value,newValue;if(!isNaN(value)){newValue=Math[compareType](value,rangeValue)}
if(newValue!==undefined){this.setValue(newValue)}
this.update()},onMouseDown:function(e){var me=this,thumb,trackPoint=e.getXY(),delta;if(!me.disabled&&e.button===0){Ext.getDoc().on({scope:me,capture:!0,selectstart:me.stopSelect});thumb=e.getTarget('.'+me.thumbCls,null,!0);if(thumb){me.animateOnSetValue=!1;me.promoteThumb(thumb);me.captureMouse(me.onMouseMove,me.onMouseUp,[thumb],1);delta=me.pointerOffset=thumb.getXY();delta[0]+=Math.floor(thumb.getWidth()/2)-trackPoint[0];delta[1]+=Math.floor(thumb.getHeight()/2)-trackPoint[1]}else{if(me.getClickToChange()){trackPoint=me.getTrackpoint(trackPoint);if(trackPoint!=null){me.onClickChange(trackPoint)}}}}},onClickChange:function(trackPoint){var me=this,thumb,index,value;thumb=me.getNearest(trackPoint);index=parseInt(thumb.getAttribute('data-thumbIndex'),10);value=Ext.util.Format.round(me.reversePixelValue(trackPoint),me.decimalPrecision);if(index){me.setThumbValue(index,value,undefined,!0)}else{me.setValue(value)}},getNearest:function(trackPoint){var me=this,clickValue=me.reversePixelValue(trackPoint),nearestDistance=me.getRange()+5,nearest=null,thumbs=me.thumbs,i=0,len=thumbs.length,thumb,value,dist;for(;i<len;i++){thumb=thumbs[i];value=thumb.value;dist=Math.abs(value-clickValue);if(Math.abs(dist)<=nearestDistance){nearest=thumb;nearestDistance=dist}}
return nearest},promoteThumb:function(topThumb){var thumbs=this.thumbStack||(this.thumbStack=Ext.Array.slice(this.thumbs)),ln=thumbs.length,zIndex=10000,i;if(thumbs[0]!==topThumb){Ext.Array.remove(thumbs,topThumb);thumbs.unshift(topThumb)}
for(i=0;i<ln;i++){thumbs[i].el.setStyle('zIndex',zIndex);zIndex-=1000}},doMouseMove:function(e,thumb,changeComplete){var me=this,trackerXY=e.getXY(),newValue,thumbIndex,trackPoint;trackerXY[0]+=me.pointerOffset[0];trackerXY[1]+=me.pointerOffset[1];trackPoint=me.getTrackpoint(trackerXY);if(trackPoint!=null){newValue=Ext.util.Format.round(me.reversePixelValue(trackPoint),me.decimalPrecision);thumbIndex=parseInt(thumb.getAttribute('data-thumbIndex'),10);if(thumbIndex||(!changeComplete&&me.getPublishOnComplete())){me.setThumbValue(thumbIndex,newValue,!1,changeComplete)}else{me.setValue(newValue)}}},onMouseMove:function(e,thumb){this.doMouseMove(e,thumb,!1)},onMouseUp:function(e,thumb){var me=this;me.doMouseMove(e,thumb,!0);Ext.getDoc().un({scope:me,capture:!0,selectstart:me.stopSelect});delete me.animateOnSetValue},stopSelect:function(e){e.stopEvent();return!1},setThumbValue:function(index,value,animate,changeComplete){var me=this,thumb,len,i,values;if(Ext.isArray(index)){values=index;animate=value;for(i=0,len=values.length;i<len;++i){me.setThumbValue(i,values[i],animate,changeComplete)}
return me}
thumb=me.getThumb(index);value=me.normalizeValue(value);if(value!==thumb.value&&me.fireEvent('beforechange',me,value,thumb.value,thumb)!==!1){thumb.value=value;if(me.element.dom){me.element.set({'aria-valuenow':value,'aria-valuetext':value});me.moveThumb(thumb,me.calculateThumbPosition(value),Ext.isDefined(animate)?animate!==!1:me.animate);me.fireEvent('change',me,value,thumb)}}
return me},getValue:function(index){var me=this,value;if(Ext.isNumber(index)){value=me.thumbs[index].value}else{value=me.getValues();if(value.length===1){value=value[0]}}
return value},getValues:function(){var me=this,values=[],i=0,thumbs=me.thumbs,len=thumbs&&thumbs.length;for(;i<len;i++){values.push(me.thumbs[i].value)}
return values},moveThumb:function(thumb,v,animate){var me=this,styleProp=me.getThumbPositionStyle(),to,from;v+='%';if(!animate){thumb.dom.style[styleProp]=v}else{to={};to[styleProp]=v;if(!Ext.supports.GetPositionPercentage){from={};from[styleProp]=thumb.dom.style[styleProp]}
new Ext.fx.Anim({target:thumb,duration:350,from:from,to:to})}},normalizeValue:function(v){var me=this,snapFn=me.zeroBasedSnapping?'snap':'snapInRange';v=Ext.Number[snapFn](v,me.increment,me.minValue,me.maxValue);v=Ext.util.Format.round(v,me.decimalPrecision);v=Ext.Number.constrain(v,me.minValue,me.maxValue);return v},getTrackpoint:function(xy){var me=this,vertical=me.getVertical(),sliderTrack=me.innerEl,trackLength,result,positionProperty;if(vertical){positionProperty='top';trackLength=sliderTrack.getHeight()}else{positionProperty=me.horizontalProp;trackLength=sliderTrack.getWidth()}
xy=me.transformTrackPoints(sliderTrack.translatePoints(xy));result=Ext.Number.constrain(xy[positionProperty],0,trackLength);return vertical?trackLength-result:result},transformTrackPoints:Ext.identityFn,calculateThumbPosition:function(v){var me=this,pos=(v-me.getMinValue())/me.getRange()*100;if(isNaN(pos)){pos=0}
return pos},getRatio:function(){var me=this,innerEl=me.innerEl,trackLength=me.getVertical()?innerEl.getHeight():innerEl.getWidth(),valueRange=me.getRange();return valueRange===0?trackLength:(trackLength/valueRange)},getRange:function(){return this.getMaxValue()-this.getMinValue()},reversePixelValue:function(pos){return this.getMinValue()+(pos/this.getRatio())},captureMouse:function(onMouseMove,onMouseUp,args,appendArgs){var me=this,onMouseupWrap,listeners;onMouseMove=onMouseMove&&Ext.Function.bind(onMouseMove,me,args,appendArgs);onMouseUp=onMouseUp&&Ext.Function.bind(onMouseUp,me,args,appendArgs);onMouseupWrap=function(){Ext.getDoc().un(listeners);if(onMouseUp){onMouseUp.apply(me,arguments)}};listeners={mousemove:onMouseMove,mouseup:onMouseupWrap};Ext.getDoc().on(listeners)},doDestroy:function(){Ext.destroy(this.thumbs);this.callParent()}})
;
Ext.define('Ext.rtl.slider.Widget',{override:'Ext.slider.Widget',constructor:function(config){this.callParent([config]);if(this.getInherited().rtl){this.horizontalProp='right'}}})
;
Ext.define('Ext.state.CookieProvider',{extend:'Ext.state.Provider',constructor:function(config){var me=this;me.path="/";me.expires=new Date(Ext.Date.now()+(1000*60*60*24*7));me.domain=null;me.secure=!1;me.callParent(arguments);me.state=me.readCookies()},set:function(name,value){var me=this;if(typeof value==="undefined"||value===null){me.clear(name);return}
me.setCookie(name,value);me.callParent(arguments)},clear:function(name){this.clearCookie(name);this.callParent(arguments)},readCookies:function(){var cookies={},c=document.cookie+";",re=/\s?(.*?)=(.*?);/g,prefix=this.prefix,len=prefix.length,matches,name,value;while((matches=re.exec(c))!=null){name=matches[1];value=matches[2];if(name&&name.substring(0,len)===prefix){cookies[name.substr(len)]=this.decodeValue(value)}}
return cookies},setCookie:function(name,value){var me=this;document.cookie=me.prefix+name+"="+me.encodeValue(value)+((me.expires==null)?"":("; expires="+me.expires.toUTCString()))+((me.path==null)?"":("; path="+me.path))+((me.domain==null)?"":("; domain="+me.domain))+(me.secure?"; secure":"")},clearCookie:function(name){var me=this;document.cookie=me.prefix+name+"=null; expires=Thu, 01-Jan-1970 00:00:01 GMT"+((me.path==null)?"":("; path="+me.path))+((me.domain==null)?"":("; domain="+me.domain))+(me.secure?"; secure":"")}})
;
Ext.define('Ext.state.LocalStorageProvider',{extend:'Ext.state.Provider',requires:['Ext.util.LocalStorage'],alias:'state.localstorage',constructor:function(){var me=this;me.callParent(arguments);me.store=me.getStorageObject();if(me.store){me.state=me.readLocalStorage()}else{me.state={}}},readLocalStorage:function(){var store=this.store,data={},keys=store.getKeys(),i=keys.length,key;while(i--){key=keys[i];data[key]=this.decodeValue(store.getItem(key))}
return data},set:function(name,value){var me=this;me.clear(name);if(value!=null){me.store.setItem(name,me.encodeValue(value));me.callParent(arguments)}},clear:function(name){this.store.removeItem(name);this.callParent(arguments)},getStorageObject:function(){var prefix=this.prefix,id=prefix,n=id.length-1;if(id.charAt(n)==='-'){id=id.substring(0,n)}
return new Ext.util.LocalStorage({id:id,prefix:prefix})}})
;
Ext.define('Ext.tab.Tab',{extend:'Ext.button.Button',alias:'widget.tab',isTab:!0,baseCls:Ext.baseCSSPrefix+'tab',closeElOverCls:Ext.baseCSSPrefix+'tab-close-btn-over',closeElPressedCls:Ext.baseCSSPrefix+'tab-close-btn-pressed',config:{rotation:'default',tabPosition:'top'},closable:!0,closeText:'removable',active:!1,childEls:['closeEl'],scale:!1,ariaRole:'tab',tabIndex:-1,keyMap:{scope:'this',DELETE:'onDeleteKey'},_btnWrapCls:Ext.baseCSSPrefix+'tab-wrap',_btnCls:Ext.baseCSSPrefix+'tab-button',_baseIconCls:Ext.baseCSSPrefix+'tab-icon-el',_glyphCls:Ext.baseCSSPrefix+'tab-glyph',_innerCls:Ext.baseCSSPrefix+'tab-inner',_textCls:Ext.baseCSSPrefix+'tab-text',_noTextCls:Ext.baseCSSPrefix+'tab-no-text',_hasIconCls:Ext.baseCSSPrefix+'tab-icon',_activeCls:Ext.baseCSSPrefix+'tab-active',_closableCls:Ext.baseCSSPrefix+'tab-closable',overCls:Ext.baseCSSPrefix+'tab-over',_pressedCls:Ext.baseCSSPrefix+'tab-pressed',_disabledCls:Ext.baseCSSPrefix+'tab-disabled',_rotateClasses:{1:Ext.baseCSSPrefix+'tab-rotate-right',2:Ext.baseCSSPrefix+'tab-rotate-left'},_positions:{top:{'default':'top',0:'top',1:'left',2:'right'},right:{'default':'top',0:'right',1:'top',2:'bottom'},bottom:{'default':'bottom',0:'bottom',1:'right',2:'left'},left:{'default':'top',0:'left',1:'bottom',2:'top'}},_defaultRotations:{top:0,right:1,bottom:0,left:2},initComponent:function(){var me=this;if(me.closable){Ext.ariaWarn(me,"Closable tabs can be confusing to users relying on Assistive Technologies "+"such as Screen Readers, and are not recommended in accessible applications. "+"Please consider setting "+me.title+" tab ("+me.id+") to closable: false.")}
if(me.card){me.setCard(me.card)}
me.callParent(arguments)},getActualRotation:function(){var rotation=this.getRotation();return(rotation!=='default')?rotation:this._defaultRotations[this.getTabPosition()]},updateRotation:function(){this.syncRotationAndPosition()},updateTabPosition:function(){this.syncRotationAndPosition()},syncRotationAndPosition:function(){var me=this,rotateClasses=me._rotateClasses,position=me.getTabPosition(),rotation=me.getActualRotation(),oldRotateCls=me._rotateCls,rotateCls=me._rotateCls=rotateClasses[rotation],oldPositionCls=me._positionCls,positionCls=me._positionCls=me._positions[position][rotation];if(oldRotateCls!==rotateCls){if(oldRotateCls){me.removeCls(oldRotateCls)}
if(rotateCls){me.addCls(rotateCls)}}
if(oldPositionCls!==positionCls){if(oldPositionCls){me.removeClsWithUI(oldPositionCls)}
if(positionCls){me.addClsWithUI(positionCls)}
if(me.rendered){me.updateFrame()}}
if(me.rendered){me.setElOrientation()}},onAdded:function(container,pos,instanced){this.callParent([container,pos,instanced]);this.syncRotationAndPosition()},getTemplateArgs:function(){var me=this,result=me.callParent();result.closable=me.closable;result.closeText=me.closeText;return result},beforeRender:function(){var me=this,tabBar=me.up('tabbar'),tabPanel=me.up('tabpanel');me.callParent();me.ariaRenderAttributes=me.ariaRenderAttributes||{};if(me.active){me.ariaRenderAttributes['aria-selected']=!0;me.addCls(me._activeCls)}else{me.ariaRenderAttributes['aria-selected']=!1}
me.syncClosableCls();if(!me.minWidth){me.minWidth=(tabBar)?tabBar.minTabWidth:me.minWidth;if(!me.minWidth&&tabPanel){me.minWidth=tabPanel.minTabWidth}
if(me.minWidth&&me.iconCls){me.minWidth+=25}}
if(!me.maxWidth){me.maxWidth=(tabBar)?tabBar.maxTabWidth:me.maxWidth;if(!me.maxWidth&&tabPanel){me.maxWidth=tabPanel.maxTabWidth}}},onRender:function(){var me=this;me.setElOrientation();me.callParent(arguments);if(me.closable){me.closeEl.addClsOnOver(me.closeElOverCls);me.closeEl.addClsOnClick(me.closeElPressedCls)}},setElOrientation:function(){var me=this,rotation=me.getActualRotation(),el=me.el;if(rotation){el.setVertical(rotation===1?90:270)}else{el.setHorizontal()}},enable:function(silent){var me=this;me.callParent(arguments);me.removeCls(me._disabledCls);return me},disable:function(silent){var me=this;me.callParent(arguments);me.addCls(me._disabledCls);return me},setClosable:function(closable){var me=this;closable=(!arguments.length||!!closable);if(me.closable!==closable){me.closable=closable;if(me.card){me.card.closable=closable}
me.syncClosableCls();if(me.rendered){me.syncClosableElements();me.updateLayout()}}},syncClosableElements:function(){var me=this,closeEl=me.closeEl;if(me.closable){if(!closeEl){closeEl=me.closeEl=me.btnWrap.insertSibling({tag:'span',id:me.id+'-closeEl',cls:me.baseCls+'-close-btn',html:me.closeText},'after')}
closeEl.addClsOnOver(me.closeElOverCls);closeEl.addClsOnClick(me.closeElPressedCls)}else if(closeEl){closeEl.destroy();delete me.closeEl}},syncClosableCls:function(){var me=this,closableCls=me._closableCls;if(me.closable){me.addCls(closableCls)}else{me.removeCls(closableCls)}},setCard:function(card){var me=this;me.card=card;if(card.iconAlign){me.setIconAlign(card.iconAlign)}
if(card.textAlign){me.setTextAlign(card.textAlign)}
me.setText(me.title||card.title);me.setIconCls(me.iconCls||card.iconCls);me.setIcon(me.icon||card.icon);me.setGlyph(me.glyph||card.glyph)},onCloseClick:function(){var me=this;if(me.fireEvent('beforeclose',me)!==!1){if(me.tabBar){if(me.tabBar.closeTab(me)===!1){return}}else{me.fireClose()}}},fireClose:function(){this.fireEvent('close',this)},onEnterKey:function(e){var me=this;if(me.tabBar){me.tabBar.onClick(e,me.el);e.stopEvent();return!1}},onDeleteKey:function(e){if(this.closable){this.onCloseClick();e.stopEvent();return!1}},beforeClick:function(isCloseClick){if(!isCloseClick){this.focus()}},activate:function(supressEvent){var me=this,card=me.card,ariaDom=me.ariaEl.dom;me.active=!0;me.addCls(me._activeCls);if(ariaDom){ariaDom.setAttribute('aria-selected',!0)}else{me.ariaRenderAttributes=me.ariaRenderAttributes||{};me.ariaRenderAttributes['aria-selected']=!0}
if(card){if(card.ariaEl.dom){card.ariaEl.dom.setAttribute('aria-expanded',!0)}else{card.ariaRenderAttributes=card.ariaRenderAttributes||{};card.ariaRenderAttributes['aria-expanded']=!0}}
if(supressEvent!==!0){me.fireEvent('activate',me)}},deactivate:function(supressEvent){var me=this,card=me.card,ariaDom=me.ariaEl.dom;me.active=!1;me.removeCls(me._activeCls);if(ariaDom){ariaDom.setAttribute('aria-selected',!1)}else{me.ariaRenderAttributes=me.ariaRenderAttributes||{};me.ariaRenderAttributes['aria-selected']=!1}
if(card){if(card.ariaEl.dom){card.ariaEl.dom.setAttribute('aria-expanded',!1)}else{card.ariaRenderAttributes=card.ariaRenderAttributes||{};card.ariaRenderAttributes['aria-expanded']=!1}}
if(supressEvent!==!0){me.fireEvent('deactivate',me)}},privates:{getFramingInfoCls:function(){return this.baseCls+'-'+this.ui+'-'+this._positionCls},wrapPrimaryEl:function(dom){Ext.Button.superclass.wrapPrimaryEl.call(this,dom)}}})
;
Ext.define('Ext.tab.Bar',{extend:'Ext.panel.Bar',xtype:'tabbar',requires:['Ext.tab.Tab','Ext.util.Point','Ext.layout.component.Body'],baseCls:Ext.baseCSSPrefix+'tab-bar',componentLayout:'body',isTabBar:!0,config:{tabRotation:'default',tabStretchMax:!0,activateOnFocus:!0},defaultType:'tab',plain:!1,ensureActiveVisibleOnChange:!0,ariaRole:'tablist',focusableContainer:!0,childEls:['body','strip'],_stripCls:Ext.baseCSSPrefix+'tab-bar-strip',_baseBodyCls:Ext.baseCSSPrefix+'tab-bar-body',renderTpl:'<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'before\'); %}</tpl>'+'<div id="{id}-body" data-ref="body" role="presentation" class="{baseBodyCls} {baseBodyCls}-{ui} '+'{bodyCls} {bodyTargetCls}{childElCls}"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>'+'{%this.renderContainer(out,values)%}'+'</div>'+'<tpl if="hasTabGuard">{% this.renderTabGuard(out, values, \'after\'); %}</tpl>'+'<div id="{id}-strip" data-ref="strip" role="presentation" class="{stripCls} {stripCls}-{ui}{childElCls}"></div>',_reverseDockNames:{left:'right',right:'left'},_layoutAlign:{top:'end',right:'begin',bottom:'begin',left:'end'},initComponent:function(){var me=this,initialLayout=me.initialConfig.layout,initialAlign=initialLayout&&initialLayout.align,initialOverflowHandler=initialLayout&&initialLayout.overflowHandler;if(me.plain){me.addCls(me.baseCls+'-plain')}
me.layout=Ext.apply({align:initialAlign||(me.getTabStretchMax()?'stretchmax':me._layoutAlign[me.dock]),overflowHandler:initialOverflowHandler||'scroller'},me.layout);me.callParent();me.on({click:me.onClick,element:'el',scope:me})},ensureTabVisible:function(tab){var me=this,tabPanel=me.tabPanel,overflowHandler=me.layout.overflowHandler;if(me.rendered&&overflowHandler&&me.tooNarrow&&overflowHandler.scrollToItem){if(tab||tab===0){if(!tab.isTab){if(Ext.isNumber(tab)){tab=this.items.getAt(tab)}else if(tab.isComponent&&tabPanel&&tabPanel.items.contains(tab)){tab=tab.tab}}}
if(!tab){tab=me.activeTab}
if(tab){overflowHandler.scrollToItem(tab)}}},initRenderData:function(){var me=this;return Ext.apply(me.callParent(),{bodyCls:me.bodyCls,baseBodyCls:me._baseBodyCls,bodyTargetCls:me.bodyTargetCls,stripCls:me._stripCls,dock:me.dock})},setDock:function(dock){var me=this,items=me.items,ownerCt=me.ownerCt,item,i,ln;items=items&&items.items;if(items){for(i=0,ln=items.length;i<ln;i++){item=items[i];if(item.isTab){item.setTabPosition(dock)}}}
if(me.rendered){me.resetItemMargins();if(ownerCt&&ownerCt.isHeader){ownerCt.resetItemMargins()}
me.needsScroll=!0}
me.callParent([dock])},updateTabRotation:function(tabRotation){var me=this,items=me.items,i,ln,item;items=items&&items.items;if(items){for(i=0,ln=items.length;i<ln;i++){item=items[i];if(item.isTab){item.setRotation(tabRotation)}}}
if(me.rendered){me.resetItemMargins();me.needsScroll=!0;me.updateLayout()}},onRender:function(){var me=this,overflowHandler=this.layout.overflowHandler;me.callParent();if(Ext.isIE8&&me.vertical){me.el.on({mousemove:me.onMouseMove,scope:me})}
if(overflowHandler&&overflowHandler.type==='menu'){overflowHandler.menu.on('click','onOverflowMenuItemClick',me)}},afterLayout:function(){this.adjustTabPositions();this.callParent(arguments)},onAdd:function(tab,pos){var fn=this.onTabContentChange;if(this.ensureActiveVisibleOnChange){tab.barListeners=tab.on({scope:this,destroyable:!0,glyphchange:fn,iconchange:fn,textchange:fn})}
this.callParent([tab,pos])},onAdded:function(container,pos,instanced){if(container.isHeader){this.addCls(container.baseCls+'-'+container.ui+'-tab-bar')}
this.callParent([container,pos,instanced])},onRemove:function(tab,destroying){var me=this;if(me.ensureActiveVisibleOnChange){if(!destroying){tab.barListeners.destroy()}
tab.barListeners=null}
if(tab===me.previousTab){me.previousTab=null}
me.callParent([tab,destroying])},onRemoved:function(destroying){var ownerCt=this.ownerCt;if(ownerCt.isHeader){this.removeCls(ownerCt.baseCls+'-'+ownerCt.ui+'-tab-bar')}
this.callParent([destroying])},onTabContentChange:function(tab){if(tab===this.activeTab){this.ensureTabVisible(tab)}},afterComponentLayout:function(width){var me=this,needsScroll=me.needsScroll,overflowHandler=me.layout.overflowHandler;me.callParent(arguments);if(overflowHandler&&needsScroll&&me.tooNarrow&&overflowHandler.scrollToItem){overflowHandler.scrollToItem(me.activeTab)}
delete me.needsScroll},onMouseMove:function(e){var me=this,overTab=me._overTab,tabInfo,tab;if(e.getTarget('.'+Ext.baseCSSPrefix+'box-scroller')){return}
tabInfo=me.getTabInfoFromPoint(e.getXY());tab=tabInfo.tab;if(tab!==overTab){if(overTab&&overTab.rendered){overTab.onMouseLeave(e);me._overTab=null}
if(tab){tab.onMouseEnter(e);me._overTab=tab;if(!tab.disabled){me.el.setStyle('cursor','pointer')}}else{me.el.setStyle('cursor','default')}}},onMouseLeave:function(e){var overTab=this._overTab;if(overTab&&overTab.rendered){overTab.onMouseLeave(e)}},getTabInfoFromPoint:function(xy){var me=this,tabs=me.items.items,length=tabs.length,innerCt=me.layout.innerCt,innerCtXY=innerCt.getXY(),point=new Ext.util.Point(xy[0],xy[1]),i=0,lastBox,tabRegion,closeEl,close,closeXY,closeX,closeY,closeWidth,closeHeight,tabX,tabY,tabWidth,tabHeight,closeRegion,isTabReversed,direction,tab;for(;i<length;i++){tab=tabs[i];lastBox=tab.lastBox;if(!lastBox||!tab.isTab){continue}
tabX=innerCtXY[0]+lastBox.x;tabY=innerCtXY[1]-innerCt.dom.scrollTop+lastBox.y;tabWidth=lastBox.width;tabHeight=lastBox.height;tabRegion=new Ext.util.Region(tabY,tabX+tabWidth,tabY+tabHeight,tabX);if(tabRegion.contains(point)){closeEl=tab.closeEl;if(closeEl){if(me._isTabReversed===undefined){me._isTabReversed=isTabReversed=(tab.btnWrap.dom.currentStyle.filter.indexOf('rotation=2')!==-1)}
direction=isTabReversed?this._reverseDockNames[me.dock]:me.dock;closeWidth=closeEl.getWidth();closeHeight=closeEl.getHeight();closeXY=me.getCloseXY(closeEl,tabX,tabY,tabWidth,tabHeight,closeWidth,closeHeight,direction);closeX=closeXY[0];closeY=closeXY[1];closeRegion=new Ext.util.Region(closeY,closeX+closeWidth,closeY+closeHeight,closeX);close=closeRegion.contains(point)}
break}}
return{tab:tab,close:close}},getCloseXY:function(closeEl,tabX,tabY,tabWidth,tabHeight,closeWidth,closeHeight,direction){var closeXY=closeEl.getXY(),closeX,closeY;if(direction==='right'){closeX=tabX+tabWidth-((closeXY[1]-tabY)+closeHeight);closeY=tabY+(closeXY[0]-tabX)}else{closeX=tabX+(closeXY[1]-tabY);closeY=tabY+tabX+tabHeight-closeXY[0]-closeWidth}
return[closeX,closeY]},closeTab:function(toClose){var me=this,card=toClose.card,tabPanel=me.tabPanel,toActivate;if(card&&card.fireEvent('beforeclose',card)===!1){return!1}
toActivate=me.findNextActivatable(toClose);Ext.suspendLayouts();if(toActivate){if(tabPanel){tabPanel.setActiveTab(toActivate.card)}else{me.setActiveTab(toActivate)}
toActivate.focus()}
if(tabPanel&&card){delete toClose.ownerCt;card.fireEvent('close',card);tabPanel.remove(card);if(card.ownerCt!==tabPanel){toClose.fireClose();me.remove(toClose)}else{toClose.ownerCt=me;Ext.resumeLayouts(!0);return!1}}
Ext.resumeLayouts(!0)},findNextActivatable:function(toClose){var me=this,previousTab=me.previousTab,nextTab;if(toClose.active&&me.items.getCount()>1){if(previousTab&&previousTab!==toClose&&!previousTab.disabled){nextTab=previousTab}else{nextTab=toClose.next('tab[disabled=false]')||toClose.prev('tab[disabled=false]')}}
return nextTab||me.activeTab},setActiveTab:function(tab,initial){var me=this;if(!tab.disabled&&tab!==me.activeTab){if(me.activeTab){if(me.activeTab.destroyed){me.previousTab=null}else{me.previousTab=me.activeTab;me.activeTab.deactivate();me.deactivateFocusable(me.activeTab)}}
tab.activate();me.activateFocusable(tab);me.activeTab=tab;me.needsScroll=!0;if(!initial){me.fireEvent('change',me,tab,tab.card);me.updateLayout()}}},privates:{adjustTabPositions:function(){var me=this,items=me.items.items,i=items.length,tab,lastBox,el,rotation,prop;if(!Ext.isIE8){prop=me._getTabAdjustProp();while(i--){tab=items[i];el=tab.el;lastBox=tab.lastBox;rotation=tab.isTab?tab.getActualRotation():0;if(rotation===1&&tab.isVisible()){el.setStyle(prop,(lastBox.x+lastBox.width)+'px')}else if(rotation===2&&tab.isVisible()){el.setStyle(prop,(lastBox.x-lastBox.height)+'px')}}}},applyTargetCls:function(targetCls){this.bodyTargetCls=targetCls},_getTabAdjustProp:function(){return'left'},getTargetEl:function(){return this.body||this.frameBody||this.el},onClick:function(e,target){var me=this,tabEl,tab,isCloseClick,tabInfo;if(e.getTarget('.'+Ext.baseCSSPrefix+'box-scroller')){return}
if(Ext.isIE8&&me.vertical){tabInfo=me.getTabInfoFromPoint(e.getXY());tab=tabInfo.tab;isCloseClick=tabInfo.close}else{tabEl=e.getTarget('.'+Ext.tab.Tab.prototype.baseCls);tab=tabEl&&Ext.getCmp(tabEl.id);isCloseClick=tab&&tab.closeEl&&(target===tab.closeEl.dom)}
if(isCloseClick){e.preventDefault()}
if(tab&&tab.isDisabled&&!tab.isDisabled()){tab.beforeClick(isCloseClick);if(tab.closable&&isCloseClick){tab.onCloseClick()}else{me.doActivateTab(tab)}}},onOverflowMenuItemClick:function(menu,item,e,eOpts){var tab=item&&item.masterComponent,overflowHandler=this.layout.overflowHandler;if(tab&&!tab.isDisabled()){this.doActivateTab(tab);if(overflowHandler.menuTrigger){overflowHandler.menuTrigger.focus()}}},doActivateTab:function(tab){var tabPanel=this.tabPanel;if(tabPanel){if(!tab.disabled){tabPanel.setActiveTab(tab.card)}}else{this.setActiveTab(tab)}},onFocusableContainerFocus:function(e){var me=this,mixin=me.mixins.focusablecontainer,child;child=mixin.onFocusableContainerFocus.call(me,e);if(child&&child.isTab){me.doActivateTab(child)}},onFocusableContainerFocusEnter:function(e){var me=this,mixin=me.mixins.focusablecontainer,child;child=mixin.onFocusableContainerFocusEnter.call(me,e);if(child&&child.isTab){me.doActivateTab(child)}},focusChild:function(child,forward){var me=this,mixin=me.mixins.focusablecontainer,nextChild;nextChild=mixin.focusChild.call(me,child,forward);if(me.activateOnFocus&&nextChild&&nextChild.isTab){me.doActivateTab(nextChild)}}}})
;
Ext.define('Ext.rtl.tab.Bar',{override:'Ext.tab.Bar',privates:{_getTabAdjustProp:function(){return this.getInherited().rtl?'right':'left'},getCloseXY:function(closeEl,tabX,tabY,tabWidth,tabHeight,closeWidth,closeHeight,direction){var closeXY,closeX,closeY,xy;if(this.isOppositeRootDirection()){closeXY=closeEl.getXY();if(direction==='right'){closeX=tabX+closeXY[1]-tabY;closeY=tabY+tabHeight-(closeXY[0]-(tabX+tabWidth-tabHeight))-closeWidth}else{closeX=tabX+tabWidth-(closeXY[1]-tabY)-closeHeight;closeY=tabY+(closeXY[0]-(tabX+tabWidth-tabHeight))}
xy=[closeX,closeY]}else{xy=this.callParent(arguments)}
return xy}}})
;
Ext.define('Ext.tab.Panel',{extend:'Ext.panel.Panel',alias:'widget.tabpanel',alternateClassName:['Ext.TabPanel'],requires:['Ext.layout.container.Card','Ext.tab.Bar'],config:{tabBar:undefined,tabPosition:'top',tabRotation:'default',tabStretchMax:!0},removePanelHeader:!0,plain:!1,itemCls:Ext.baseCSSPrefix+'tabpanel-child',minTabWidth:undefined,maxTabWidth:undefined,deferredRender:!0,_defaultTabRotation:{top:0,right:1,bottom:0,left:2},initComponent:function(){var me=this,activeTab=me.activeTab!==null?(me.activeTab||0):null,dockedItems=me.dockedItems,header=me.header,tabBarHeaderPosition=me.tabBarHeaderPosition,tabBar=me.getTabBar(),headerItems;me.layout=Ext.apply({type:'card',deferredRender:me.deferredRender,itemCls:me.itemCls,activeItem:activeTab},me.layout);if(tabBarHeaderPosition!=null){header=me.header=Ext.apply({},header);headerItems=header.items=(header.items?header.items.slice():[]);header.itemPosition=tabBarHeaderPosition;headerItems.push(tabBar);header.hasTabBar=!0}else{dockedItems=[].concat(me.dockedItems||[]);dockedItems.push(tabBar);me.dockedItems=dockedItems}
me.callParent(arguments);activeTab=me.activeTab=me.getComponent(activeTab);if(activeTab){tabBar.setActiveTab(activeTab.tab,!0)}},onRender:function(){var items=this.items.items,len=items.length,i;this.callParent(arguments);for(i=0;i<len;++i){items[i].getBind()}},setActiveTab:function(card){var me=this,previous;if(!Ext.isObject(card)||card.isComponent){card=me.getComponent(card)}
previous=me.getActiveTab();if(card){Ext.suspendLayouts();if(!card.isComponent){card=me.add(card)}
if(previous===card||me.fireEvent('beforetabchange',me,card,previous)===!1){Ext.resumeLayouts(!0);return previous}
me.activeTab=card;me.layout.setActiveItem(card);card=me.activeTab=me.layout.getActiveItem();if(card&&card!==previous){me.tabBar.setActiveTab(card.tab);Ext.resumeLayouts(!0);if(previous!==card){me.fireEvent('tabchange',me,card,previous)}}else{Ext.resumeLayouts(!0)}
return card}
return previous},setActiveItem:function(item){return this.setActiveTab(item)},getActiveTab:function(){var me=this,result=me.getComponent(me.activeTab);if(result&&me.items.indexOf(result)!==-1){me.activeTab=result}else{me.activeTab=undefined}
return me.activeTab},applyTabBar:function(tabBar){var me=this,dock=(me.tabBarHeaderPosition!=null)?me.getHeaderPosition():me.getTabPosition();return new Ext.tab.Bar(Ext.apply({ui:me.ui,dock:dock,tabRotation:me.getTabRotation(),vertical:(dock==='left'||dock==='right'),plain:me.plain,tabStretchMax:me.getTabStretchMax(),tabPanel:me},tabBar))},updateHeaderPosition:function(headerPosition,oldHeaderPosition){var tabBar=this.getTabBar();if(tabBar&&(this.tabBarHeaderPosition!=null)){tabBar.setDock(headerPosition)}
this.callParent([headerPosition,oldHeaderPosition])},updateTabPosition:function(tabPosition){var tabBar=this.getTabBar();if(tabBar&&(this.tabBarHeaderPosition==null)){tabBar.setDock(tabPosition)}},updateTabRotation:function(tabRotation){var tabBar=this.getTabBar();if(tabBar){tabBar.setTabRotation(tabRotation)}},onAdd:function(item,index){var me=this,cfg=Ext.apply({},item.tabConfig),tabBar=me.getTabBar(),ariaDom,defaultConfig={xtype:'tab',title:item.title,icon:item.icon,iconCls:item.iconCls,glyph:item.glyph,ui:tabBar.ui,card:item,disabled:item.disabled,closable:item.closable,hidden:item.hidden&&!item.hiddenByLayout,tooltip:item.tooltip,tabBar:tabBar,tabPosition:tabBar.dock,rotation:tabBar.getTabRotation()};if(item.closeText!==undefined){defaultConfig.closeText=item.closeText}
cfg=Ext.applyIf(cfg,defaultConfig);item.tab=me.tabBar.insert(index,cfg);item.ariaRole='tabpanel';ariaDom=item.ariaEl.dom;if(ariaDom){ariaDom.setAttribute('aria-labelledby',item.tab.id)}else{item.ariaRenderAttributes=item.ariaRenderAttributes||{};item.ariaRenderAttributes['aria-labelledby']=item.tab.id}
item.on({scope:me,enable:me.onItemEnable,disable:me.onItemDisable,beforeshow:me.onItemBeforeShow,iconchange:me.onItemIconChange,iconclschange:me.onItemIconClsChange,glyphchange:me.onItemGlyphChange,titlechange:me.onItemTitleChange});if(item.isPanel){if(me.removePanelHeader){if(item.rendered){if(item.header){item.header.hide()}}else{item.header=!1}}
if(item.isPanel&&me.border){item.setBorder(!1)}}
if(me.rendered){item.getBind()}
if(me.rendered&&me.loader&&me.activeTab===undefined&&me.layout.activeItem!==null){me.setActiveTab(0)}},onMove:function(item,fromIdx,toIdx){var tabBar=this.getTabBar();this.callParent([item,fromIdx,toIdx]);if(tabBar.items.indexOf(item.tab)!==toIdx){tabBar.move(item.tab,toIdx)}},onItemEnable:function(item){item.tab.enable()},onItemDisable:function(item){item.tab.disable()},onItemBeforeShow:function(item){if(item!==this.activeTab){this.setActiveTab(item);return!1}},onItemGlyphChange:function(item,newGlyph){item.tab.setGlyph(newGlyph)},onItemIconChange:function(item,newIcon){item.tab.setIcon(newIcon)},onItemIconClsChange:function(item,newIconCls){item.tab.setIconCls(newIconCls)},onItemTitleChange:function(item,newTitle){item.tab.setText(newTitle)},onRemove:function(item,destroying){var me=this;item.un({scope:me,enable:me.onItemEnable,disable:me.onItemDisable,beforeshow:me.onItemBeforeShow,iconchange:me.onItemIconChange,iconclschange:me.onItemIconClsChange,glyphchange:me.onItemGlyphChange,titlechange:me.onItemTitleChange});if(item.tab&&!me.destroying&&item.tab.ownerCt===me.tabBar){me.tabBar.remove(item.tab)}},enable:function(){var me=this,activeTab=me.activeTab!==null?(me.activeTab||0):null,wasDisabled=me.disabled;me.callParent(arguments);if(wasDisabled){activeTab=activeTab.isComponent?activeTab:me.getComponent(activeTab);if(activeTab){me.getTabBar().setActiveTab(activeTab.tab)}}
return me},privates:{doRemove:function(item,autoDestroy){var me=this,toActivate;Ext.suspendLayouts();if(me.removingAll||me.destroying||me.items.getCount()===1){me.activeTab=null}else if(item.tab&&(toActivate=me.tabBar.items.indexOf(me.tabBar.findNextActivatable(item.tab)))!==-1){me.setActiveTab(toActivate)}
me.callParent([item,autoDestroy]);Ext.resumeLayouts();if(item.tab){delete item.tab.card;delete item.tab}}}})
;
Ext.define('Ext.toolbar.Breadcrumb',{extend:'Ext.container.Container',xtype:'breadcrumb',requires:['Ext.data.TreeStore','Ext.button.Split'],isBreadcrumb:!0,baseCls:Ext.baseCSSPrefix+'breadcrumb',layout:{type:'hbox',align:'middle'},config:{buttonUI:'plain-toolbar',displayField:'text',overflowHandler:null,showIcons:null,showMenuIcons:null,store:null,useSplitButtons:!0},renderConfig:{selection:'root'},publishes:['selection'],twoWayBindable:['selection'],_breadcrumbCls:Ext.baseCSSPrefix+'breadcrumb',_btnCls:Ext.baseCSSPrefix+'breadcrumb-btn',_folderIconCls:Ext.baseCSSPrefix+'breadcrumb-icon-folder',_leafIconCls:Ext.baseCSSPrefix+'breadcrumb-icon-leaf',focusableContainer:!0,initComponent:function(){var me=this,layout=me.layout,overflowHandler=me.getOverflowHandler();if(typeof layout==='string'){layout={type:layout}}
if(overflowHandler){layout.overflowHandler=overflowHandler}
me.layout=layout;me.defaultButtonUI=me.getButtonUI();me._buttons=[];me.addCls([me._breadcrumbCls,me._breadcrumbCls+'-'+me.ui]);me.callParent()},doDestroy:function(){Ext.destroy(this._buttons);this.setStore(null);this.callParent()},onRemove:function(component,destroying){this.callParent([component,destroying]);delete component._breadcrumbNodeId},afterComponentLayout:function(){var me=this,overflowHandler=me.layout.overflowHandler;me.callParent(arguments);if(overflowHandler&&me.tooNarrow&&overflowHandler.scrollToItem){overflowHandler.scrollToItem(me.getSelection().get('depth'))}},applySelection:function(node){var store=this.getStore();if(store){node=(node==='root')?this.getStore().getRoot():node}else{node=null}
return node},updateSelection:function(node,prevNode){var me=this,buttons=me._buttons,items=[],itemCount=Ext.ComponentQuery.query('[isCrumb]',me.getRefItems()).length,needsSync=me._needsSync,displayField=me.getDisplayField(),showIcons,glyph,iconCls,icon,newItemCount,currentNode,text,button,id,depth,i;Ext.suspendLayouts();if(node){currentNode=node;depth=node.get('depth');newItemCount=depth+1;i=depth;while(currentNode){id=currentNode.getId();button=buttons[i];if(!needsSync&&button&&button._breadcrumbNodeId===id){break}
text=currentNode.get(displayField);if(button){button.setText(text)}else{button=buttons[i]=Ext.create({isCrumb:!0,xtype:me.getUseSplitButtons()?'splitbutton':'button',ui:me.getButtonUI(),componentCls:me._btnCls+' '+me._btnCls+'-'+me.ui,separateArrowStyling:!1,text:text,showEmptyMenu:!0,menu:{listeners:{click:'_onMenuClick',beforeshow:'_onMenuBeforeShow',scope:this}},handler:'_onButtonClick',scope:me})}
showIcons=this.getShowIcons();if(showIcons!==!1){glyph=currentNode.get('glyph');icon=currentNode.get('icon');iconCls=currentNode.get('iconCls');if(glyph){button.setGlyph(glyph);button.setIcon(null);button.setIconCls(iconCls)}else if(icon){button.setGlyph(null);button.setIconCls(null);button.setIcon(icon)}else if(iconCls){button.setGlyph(null);button.setIcon(null);button.setIconCls(iconCls)}else if(showIcons){button.setGlyph(null);button.setIcon(null);button.setIconCls((currentNode.isLeaf()?me._leafIconCls:me._folderIconCls)+'-'+me.ui)}else{button.setGlyph(null);button.setIcon(null);button.setIconCls(null)}}
button.setArrowVisible(currentNode.hasChildNodes());button._breadcrumbNodeId=currentNode.getId();currentNode=currentNode.parentNode;i--}
if(newItemCount>itemCount){items=buttons.slice(itemCount,depth+1);me.add(items)}else{for(i=itemCount-1;i>=newItemCount;i--){me.remove(buttons[i],!1)}}}else{for(i=0;i<buttons.length;i++){me.remove(buttons[i],!1)}}
Ext.resumeLayouts(!0);me.fireEvent('selectionchange',me,node,prevNode);if(me._shouldFireChangeEvent){me.fireEvent('change',me,node,prevNode)}
me._shouldFireChangeEvent=!0;me._needsSync=!1},applyUseSplitButtons:function(useSplitButtons,oldUseSplitButtons){if(this.rendered&&useSplitButtons!==oldUseSplitButtons){Ext.raise("Cannot reconfigure 'useSplitButtons' config of Ext.toolbar.Breadcrumb "+"after initial render")}
return useSplitButtons},applyStore:function(store){if(store){store=Ext.data.StoreManager.lookup(store)}
return store},updateStore:function(store,oldStore){this._needsSync=!0;if(store&&!this.isConfiguring){this.setSelection(store.getRoot())}},updateOverflowHandler:function(overflowHandler){if(overflowHandler==='menu'){Ext.raise("Using Menu overflow with breadcrumb is not currently supported.")}},privates:{_onButtonClick:function(button,e){if(this.getUseSplitButtons()){this.setSelection(this.getStore().getNodeById(button._breadcrumbNodeId))}},_onMenuClick:function(menu,item,e){if(item){item=this.getStore().getNodeById(item._breadcrumbNodeId);this.setSelection(item);item=this._buttons[item.getDepth()];if(item){item.focus()}}},_onMenuBeforeShow:function(menu){var me=this,node=me.getStore().getNodeById(menu.ownerCmp._breadcrumbNodeId),displayField=me.getDisplayField(),showMenuIcons=me.getShowMenuIcons(),childNodes,child,glyph,items,i,icon,iconCls,ln,item;if(node.hasChildNodes()){childNodes=node.childNodes;items=[];for(i=0,ln=childNodes.length;i<ln;i++){child=childNodes[i];item={text:child.get(displayField),_breadcrumbNodeId:child.getId()};if(showMenuIcons!==!1){glyph=child.get('glyph');icon=child.get('icon');iconCls=child.get('iconCls');if(glyph){item.glyph=glyph;item.iconCls=iconCls}else if(icon){item.icon=icon}else if(iconCls){item.iconCls=iconCls}else if(showMenuIcons){item.iconCls=(child.isLeaf()?me._leafIconCls:me._folderIconCls)+'-'+me.ui}}
items.push(item)}
menu.removeAll();menu.add(items)}else{return!1}}}})
;
Ext.define('Ext.toolbar.Fill',{extend:'Ext.Component',alias:'widget.tbfill',alternateClassName:'Ext.Toolbar.Fill',requires:['Ext.toolbar.Toolbar'],ariaRole:'presentation',isFill:!0,flex:1})
;
Ext.define('Ext.toolbar.Spacer',{extend:'Ext.Component',alias:'widget.tbspacer',alternateClassName:'Ext.Toolbar.Spacer',requires:['Ext.toolbar.Toolbar'],baseCls:Ext.baseCSSPrefix+'toolbar-spacer',ariaRole:'presentation'})
;
Ext.define('Ext.tree.Column',{extend:'Ext.grid.column.Column',alias:'widget.treecolumn',tdCls:Ext.baseCSSPrefix+'grid-cell-treecolumn',autoLock:!0,lockable:!1,draggable:!1,hideable:!1,iconCls:Ext.baseCSSPrefix+'tree-icon',checkboxCls:Ext.baseCSSPrefix+'tree-checkbox',elbowCls:Ext.baseCSSPrefix+'tree-elbow',expanderCls:Ext.baseCSSPrefix+'tree-expander',textCls:Ext.baseCSSPrefix+'tree-node-text',innerCls:Ext.baseCSSPrefix+'grid-cell-inner-treecolumn',customIconCls:Ext.baseCSSPrefix+'tree-icon-custom',isTreeColumn:!0,cellTpl:['<tpl for="lines">','<div class="{parent.childCls} {parent.elbowCls}-img ','{parent.elbowCls}-<tpl if=".">line<tpl else>empty</tpl>" role="presentation"></div>','</tpl>','<div class="{childCls} {elbowCls}-img {elbowCls}','<tpl if="isLast">-end</tpl><tpl if="expandable">-plus {expanderCls}</tpl>" role="presentation"></div>','<tpl if="checked !== null">','<div role="button" {ariaCellCheckboxAttr}',' class="{childCls} {checkboxCls}<tpl if="checked"> {checkboxCls}-checked</tpl>"></div>','</tpl>','<tpl if="glyph">','<span class="{baseIconCls}" ','<tpl if="glyphFontFamily">','style="font-family:{glyphFontFamily}"','</tpl>','>{glyph}</span>','<tpl else>','<tpl if="icon">','<img src="{blankUrl}"','<tpl else>','<div','</tpl>',' role="presentation" class="{childCls} {baseIconCls} {customIconCls} ','{baseIconCls}-<tpl if="leaf">leaf<tpl else><tpl if="expanded">parent-expanded<tpl else>parent</tpl></tpl> {iconCls}" ','<tpl if="icon">style="background-image:url({icon})"/><tpl else>></div></tpl>','</tpl>','<tpl if="href">','<a href="{href}" role="link" target="{hrefTarget}" class="{textCls} {childCls}">{value}</a>','<tpl else>','<span class="{textCls} {childCls}">{value}</span>','</tpl>'],uiFields:{checked:1,icon:1,iconCls:1},rowFields:{expanded:1,loaded:1,expandable:1,leaf:1,loading:1,qtip:1,qtitle:1,cls:1},initComponent:function(){var me=this;me.rendererScope=me.scope;me.setupRenderer();me.innerRenderer=me.renderer;me.renderer=me.treeRenderer;me.callParent();me.scope=me},treeRenderer:function(value,metaData,record,rowIdx,colIdx,store,view){var me=this,cls=record.get('cls'),rendererData;if(metaData&&cls){metaData.tdCls+=' '+cls}
rendererData=me.initTemplateRendererData(value,metaData,record,rowIdx,colIdx,store,view);return me.lookupTpl('cellTpl').apply(rendererData)},initTemplateRendererData:function(value,metaData,record,rowIdx,colIdx,store,view){var me=this,innerRenderer=me.innerRenderer,data=record.data,parent=record.parentNode,rootVisible=view.rootVisible,lines=[],parentData,glyph,glyphFontFamily;while(parent&&(rootVisible||parent.data.depth>0)){parentData=parent.data;lines[rootVisible?parentData.depth:parentData.depth-1]=parent.isLastVisible()?0:1;parent=parent.parentNode}
if(metaData){metaData.iconCls=metaData.icon=metaData.glyph=null}else{metaData={}}
value=innerRenderer?innerRenderer.apply(me.rendererScope,arguments):value;glyph=metaData.glyph||data.glyph;if(glyph){glyph=Ext.Glyph.fly(glyph);glyphFontFamily=glyph.fontFamily;glyph=glyph.character}
return{record:record,baseIconCls:me.iconCls,customIconCls:(data.icon||data.iconCls)?me.customIconCls:'',glyph:glyph,glyphFontFamily:glyphFontFamily,iconCls:metaData.iconCls||data.iconCls,icon:metaData.icon||data.icon,checkboxCls:me.checkboxCls,checked:data.checked,elbowCls:me.elbowCls,expanderCls:me.expanderCls,textCls:me.textCls,leaf:data.leaf,expandable:record.isExpandable(),expanded:data.expanded,isLast:record.isLastVisible(),blankUrl:Ext.BLANK_IMAGE_URL,href:data.href,hrefTarget:data.hrefTarget,lines:lines,metaData:metaData,childCls:me.getChildCls?me.getChildCls()+' ':'',value:value||store.defaultRootText}},shouldUpdateCell:function(record,changedFieldNames){var me=this,i=0,len,field;if(me.hasCustomRenderer){return 1}
if(changedFieldNames){len=changedFieldNames.length;for(;i<len;++i){field=changedFieldNames[i];if(me.rowFields[field]){return 1}
if(me.uiFields[field]){return 2}}}
return me.callParent([record,changedFieldNames])},privates:{shouldFlagCustomRenderer:function(){return this.hasCustomRenderer||(this.innerRenderer&&this.innerRenderer.length>1)}}})
;
Ext.define('Ext.rtl.tree.Column',{override:'Ext.tree.Column',getChildCls:function(){return this._childCls||(this._childCls=(this.getInherited().rtl?Ext.baseCSSPrefix+'rtl':''))}})
;
Ext.define('Ext.tree.NavigationModel',{extend:'Ext.grid.NavigationModel',alias:'view.navigation.tree',initKeyNav:function(view){var me=this,columns=me.view.ownerGrid.columns;me.isTreeGrid=columns&&columns.length>1;me.callParent([view]);me.view.grid.on({columnschanged:me.onColumnsChanged,scope:me})},onKeyNavCreate:function(keyNav){var fn=this.onAsterisk;keyNav.map.addBinding([{key:'8',shift:!0,handler:fn,scope:this},{key:Ext.event.Event.NUM_MULTIPLY,handler:fn,scope:this}])},onColumnsChanged:function(){this.isTreeGrid=this.view.ownerGrid.getVisibleColumnManager().getColumns().length>1},onCellClick:function(view,cell,cellIndex,record,row,recordIndex,clickEvent){this.callParent([view,cell,cellIndex,record,row,recordIndex,clickEvent]);return!clickEvent.nodeToggled},onKeyLeft:function(keyEvent){var me=this,view=keyEvent.view,record=me.record;if(me.isTreeGrid&&!keyEvent.ctrlKey){return me.callParent([keyEvent])}
if(keyEvent.position.column.isTreeColumn&&record.isExpanded()){view.collapse(record)}else{record=record.parentNode;if(record&&!(record.isRoot()&&!view.rootVisible)){me.setPosition(record,null,keyEvent)}}},onKeyRight:function(keyEvent){var me=this,record=me.record;if(me.isTreeGrid&&!keyEvent.ctrlKey){return me.callParent([keyEvent])}
if(!record.isLeaf()){if(keyEvent.position.column.isTreeColumn&&!record.isExpanded()){keyEvent.view.expand(record)}else if(record.isExpanded()){record=record.childNodes[0];if(record){me.setPosition(record)}}}},onKeyEnter:function(keyEvent){if(this.record.data.checked!=null){this.toggleCheck(keyEvent)}else{this.callParent([keyEvent])}},onKeySpace:function(keyEvent){if(this.record.data.checked!=null){this.toggleCheck(keyEvent)}else{this.callParent([keyEvent])}},toggleCheck:function(keyEvent){this.view.onCheckChange(keyEvent)},onAsterisk:function(keyEvent){this.view.ownerGrid.expandAll()}})
;
Ext.define('Ext.tree.View',{extend:'Ext.view.Table',alias:'widget.treeview',config:{selectionModel:{type:'treemodel'}},isTreeView:!0,loadingCls:Ext.baseCSSPrefix+'grid-tree-loading',expandedCls:Ext.baseCSSPrefix+'grid-tree-node-expanded',leafCls:Ext.baseCSSPrefix+'grid-tree-node-leaf',expanderSelector:'.'+Ext.baseCSSPrefix+'tree-expander',checkboxSelector:'.'+Ext.baseCSSPrefix+'tree-checkbox',expanderIconOverCls:Ext.baseCSSPrefix+'tree-expander-over',nodeAnimWrapCls:Ext.baseCSSPrefix+'tree-animator-wrap',loadMask:!1,rootVisible:!0,expandDuration:250,collapseDuration:250,toggleOnDblClick:!0,stripeRows:!1,treeRowTpl:['{%','this.processRowValues(values);','this.nextTpl.applyOut(values, out, parent);','%}',{priority:10,processRowValues:function(rowValues){var record=rowValues.record,view=rowValues.view;rowValues.rowAttr['data-qtip']=record.get('qtip')||'';rowValues.rowAttr['data-qtitle']=record.get('qtitle')||'';rowValues.rowAttr['aria-level']=record.getDepth()+1;if(record.isLeaf()){rowValues.rowClasses.push(view.leafCls)}else{if(record.isExpanded()){rowValues.rowClasses.push(view.expandedCls);rowValues.rowAttr['aria-expanded']=!0}else{rowValues.rowAttr['aria-expanded']=!1}}
if(record.isLoading()){rowValues.rowClasses.push(view.loadingCls)}}}],initComponent:function(){var me=this;if(me.bufferedRenderer){me.animate=!1}else if(me.initialConfig.animate===undefined){me.animate=Ext.enableFx}
me.store=me.panel.getStore();me.onRootChange(me.store.getRoot());me.animQueue={};me.animWraps={};me.callParent();me.store.setRootVisible(me.rootVisible);me.addRowTpl(me.lookupTpl('treeRowTpl'))},onFillComplete:function(treeStore,fillRoot,newNodes){var me=this,store=me.store,start=store.indexOf(newNodes[0]);fillRoot.triggerUIUpdate();if(!newNodes.length||start===-1){return}
me.onAdd(me.store,newNodes,start);me.refreshPartner()},refreshPartner:function(){var partner=this.lockingPartner;if(partner){partner.refresh()}},afterRender:function(){var me=this;me.callParent();me.el.on({scope:me,delegate:me.expanderSelector,mouseover:me.onExpanderMouseOver,mouseout:me.onExpanderMouseOut})},processUIEvent:function(e){if(e.getTarget('.'+this.nodeAnimWrapCls,this.el)){return!1}
return this.callParent([e])},setRootNode:function(node){this.node=node},getChecked:function(){var checked=[];this.node.cascade(function(rec){if(rec.get('checked')){checked.push(rec)}});return checked},isItemChecked:function(rec){return rec.get('checked')},createAnimWrap:function(record,index){var me=this,node=me.getNode(record),tmpEl;tmpEl=Ext.fly(node).insertSibling({role:'presentation',tag:'div',cls:me.nodeAnimWrapCls},'after');return{record:record,node:node,el:tmpEl,expanding:!1,collapsing:!1,animateEl:tmpEl,targetEl:tmpEl}},getAnimWrap:function(parent,bubble){if(!this.animate){return null}
var wraps=this.animWraps,wrap=wraps[parent.internalId];if(bubble!==!1){while(!wrap&&parent){parent=parent.parentNode;if(parent){wrap=wraps[parent.internalId]}}}
return wrap},doAdd:function(records,index){var me=this,record=records[0],parent=record.parentNode,all=me.all,relativeIndex,animWrap=me.getAnimWrap(parent),targetEl,childNodes,len,result,children;if(!animWrap||!animWrap.expanding){return me.callParent([records,index])}
result=me.bufferRender(records,index,!0);children=result.children;parent=animWrap.record;targetEl=animWrap.targetEl;childNodes=targetEl.dom.childNodes;len=childNodes.length;relativeIndex=index-me.indexInStore(parent)-1;if(!len||relativeIndex>=len){targetEl.appendChild(result.fragment,!0)}else{Ext.fly(childNodes[relativeIndex]).insertSibling(children,'before',!0)}
all.insert(index,children);return children},onRemove:function(ds,records,index){var me=this,empty,i,oldItems;if(me.viewReady){empty=me.store.getCount()===0;if(me.bufferedRenderer){return me.callParent([ds,records,index])}
oldItems=this.all.slice(index,index+records.length);if(empty){me.refresh()}else{for(i=records.length-1,index+=i;i>=0;--i,--index){me.doRemove(records[i],index)}
me.refreshSizePending=!0}
me.fireItemMutationEvent('itemremove',records,index,oldItems,me)}},doRemove:function(record,index){var me=this,all=me.all,animWrap=me.getAnimWrap(record),item=all.item(index),node=item?item.dom:null;if(!node||!animWrap||!animWrap.collapsing){return me.callParent([record,index])}
animWrap.targetEl.dom.insertBefore(node,animWrap.targetEl.dom.firstChild);all.removeElement(index)},onBeforeExpand:function(parent,records,index){var me=this,animWrap;if(me.rendered&&me.all.getCount()&&me.animate){if(me.getNode(parent)){animWrap=me.getAnimWrap(parent,!1);if(!animWrap){animWrap=me.animWraps[parent.internalId]=me.createAnimWrap(parent);animWrap.animateEl.setHeight(0)}else if(animWrap.collapsing){animWrap.targetEl.select(me.itemSelector).destroy()}
animWrap.expanding=!0;animWrap.collapsing=!1}}},onExpand:function(parent){var me=this,queue=me.animQueue,id=parent.getId(),node=me.getNode(parent),index=node?me.indexOf(node):-1,animWrap,animateEl,targetEl;if(me.singleExpand){me.ensureSingleExpand(parent)}
if(index===-1){return}
animWrap=me.getAnimWrap(parent,!1);if(!animWrap){parent.isExpandingOrCollapsing=!1;me.fireEvent('afteritemexpand',parent,index,node);return}
animateEl=animWrap.animateEl;targetEl=animWrap.targetEl;animateEl.stopAnimation();queue[id]=!0;Ext.on('idle',function(){animateEl.dom.style.height='0px'},null,{single:!0});animateEl.animate({from:{height:0},to:{height:targetEl.dom.scrollHeight},duration:me.expandDuration,listeners:{afteranimate:function(){var items=targetEl.dom.childNodes,activeEl=Ext.Element.getActiveElement();if(items.length){if(!targetEl.contains(activeEl)){activeEl=null}
animWrap.el.insertSibling(items,'before',!0);if(activeEl){Ext.fly(activeEl).focus()}}
animWrap.el.destroy();queue[id]=null;if(!me.destroyed){me.animWraps[animWrap.record.internalId]=null}}},callback:function(){parent.isExpandingOrCollapsing=!1;if(!me.destroyed){me.refreshSize(!0)}
me.fireEvent('afteritemexpand',parent,index,node)}})},onBeforeCollapse:function(parent,records,index,callback,scope){var me=this,animWrap;if(me.rendered&&me.all.getCount()){if(me.animate){if(parent.getTreeStore().isVisible(parent)){animWrap=me.getAnimWrap(parent);if(!animWrap){animWrap=me.animWraps[parent.internalId]=me.createAnimWrap(parent,index)}else if(animWrap.expanding){animWrap.targetEl.select(this.itemSelector).destroy()}
animWrap.expanding=!1;animWrap.collapsing=!0;animWrap.callback=callback;animWrap.scope=scope}}else{me.onCollapseCallback=callback;me.onCollapseScope=scope}}},onCollapse:function(parent){var me=this,queue=me.animQueue,id=parent.getId(),node=me.getNode(parent),index=node?me.indexOf(node):-1,animWrap=me.getAnimWrap(parent),animateEl;if(!me.all.getCount()||!parent.isVisible()){return}
if(!animWrap){parent.isExpandingOrCollapsing=!1;me.fireEvent('afteritemcollapse',parent,index,node);Ext.callback(me.onCollapseCallback,me.onCollapseScope);me.onCollapseCallback=me.onCollapseScope=null;return}
animateEl=animWrap.animateEl;queue[id]=!0;animateEl.stopAnimation();animateEl.animate({to:{height:0},duration:me.collapseDuration,listeners:{afteranimate:function(){animWrap.el.destroy();queue[id]=null;if(!me.destroyed){me.animWraps[animWrap.record.internalId]=null}}},callback:function(){parent.isExpandingOrCollapsing=!1;if(!me.destroyed){me.refreshSize(!0)}
me.fireEvent('afteritemcollapse',parent,index,node);Ext.callback(animWrap.callback,animWrap.scope);animWrap.callback=animWrap.scope=null}})},isAnimating:function(node){return!!this.animQueue[node.getId()]},expand:function(record,deep,callback,scope){var me=this,doAnimate=!!me.animate,result;if(!doAnimate||!record.isExpandingOrCollapsing){if(!record.isLeaf()){record.isExpandingOrCollapsing=doAnimate}
Ext.suspendLayouts();result=record.expand(deep,callback,scope);Ext.resumeLayouts(!0);return result}},collapse:function(record,deep,callback,scope){var me=this,doAnimate=!!me.animate;if(!doAnimate||!record.isExpandingOrCollapsing){if(!record.isLeaf()){record.isExpandingOrCollapsing=doAnimate}
return record.collapse(deep,callback,scope)}},toggle:function(record,deep,callback,scope){if(record.isExpanded()){this.collapse(record,deep,callback,scope)}else{this.expand(record,deep,callback,scope)}},onItemDblClick:function(record,item,index,e){var me=this,editingPlugin=me.editingPlugin;me.callParent([record,item,index,e]);if(me.toggleOnDblClick&&record.isExpandable()&&!(editingPlugin&&editingPlugin.clicksToEdit===2)){me.toggle(record)}},onCellClick:function(cell,cellIndex,record,row,rowIndex,e){var me=this,column=e.position.column;if(column.isTreeColumn){if(e.getTarget(me.checkboxSelector,cell)&&record.get('checked')!=null){me.onCheckChange(e);if(column.stopSelection){e.stopSelection=!0}}else if(e.getTarget(me.expanderSelector,cell)&&record.isExpandable()){me.getNavigationModel().setPosition(e.position);me.toggle(record,e.ctrlKey);e.nodeToggled=!0}
return me.callParent([cell,cellIndex,record,row,rowIndex,e])}},onCheckChange:function(e){var me=this,record=e.record,wasChecked=record.get('checked'),checked;if(wasChecked===1){checked=!0}else{checked=!wasChecked}
me.setChecked(record,checked,e)},setChecked:function(record,meChecked,e,options){var me=this,checkPropagation=me.checkPropagationFlags[me.ownerGrid.checkPropagation.toLowerCase()],wasChecked=record.data.checked,halfCheckedValue=me.ownerGrid.triStateCheckbox?1:!1,progagateCheck=(!options||options.propagateCheck!==!1)&&(checkPropagation&1),checkParent=(!options||options.checkParent!==!1)&&(checkPropagation&2),matchedChildCount=0,parentNode,parentChecked,foundCheck,foundClear,childNodes,len,i;if(me.fireEvent('beforecheckchange',record,wasChecked,e)===!1){return}
if(meChecked!==1&&progagateCheck){childNodes=record.childNodes;len=childNodes.length;for(i=0;i<len;i++){me.setChecked(childNodes[i],meChecked,e,{checkParent:!1});if(childNodes[i].get('checked')===meChecked){matchedChildCount++}}
if(matchedChildCount!==len){meChecked=matchedChildCount?halfCheckedValue:!1}}
if(record.get('checked')!==meChecked){record.set('checked',meChecked,options);me.fireEvent('checkchange',record,meChecked,e);if(checkParent&&(parentNode=record.parentNode)&&(parentChecked=parentNode.data.checked)!=null){childNodes=parentNode.childNodes;len=childNodes.length;if(meChecked===halfCheckedValue){parentChecked=halfCheckedValue}else if(len===1){parentChecked=meChecked}else{foundCheck=foundClear=!1;for(i=0;!(foundCheck&&foundClear)&i<len;i++){if(childNodes[i].data.checked===1){foundCheck=foundClear=!0}else if(!childNodes[i].data.checked){foundClear=!0}else{foundCheck=!0}}
parentChecked=foundCheck&&foundClear?halfCheckedValue:(foundCheck?!0:!1)}
if(parentNode.get('checked')!==parentChecked){me.setChecked(parentNode,parentChecked,e,{propagateCheck:!1})}}}},onExpanderMouseOver:function(e){Ext.fly(e.getTarget(this.cellSelector,10)).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(e){Ext.fly(e.getTarget(this.cellSelector,10)).removeCls(this.expanderIconOverCls)},getStoreListeners:function(){return Ext.apply(this.callParent(),{rootchange:this.onRootChange,fillcomplete:this.onFillComplete})},onBindStore:function(store,initial,propName,oldStore){var oldRoot=oldStore&&oldStore.getRootNode(),newRoot=store&&store.getRootNode();this.callParent([store,initial,propName,oldStore]);if(newRoot!==oldRoot){this.onRootChange(newRoot,oldRoot)}},onRootChange:function(newRoot,oldRoot){var me=this,grid=me.grid;if(oldRoot){me.rootListeners.destroy();me.rootListeners=null}
if(newRoot){me.rootListeners=newRoot.on({beforeexpand:me.onBeforeExpand,expand:me.onExpand,beforecollapse:me.onBeforeCollapse,collapse:me.onCollapse,destroyable:!0,scope:me});grid.addRelayers(newRoot)}},ensureSingleExpand:function(node){var parent=node.parentNode;if(parent){parent.eachChild(function(child){if(child!==node&&child.isExpanded()){child.collapse()}})}},privates:{checkPropagationFlags:{none:0,down:1,up:2,both:3},deferRefreshForLoad:function(store){var ret=this.callParent([store]),options,node;if(ret){options=store.lastOptions;node=options&&options.node;if(node&&node!==store.getRoot()){ret=!1}}
return ret}}})
;
Ext.define('Ext.tree.Panel',{extend:'Ext.panel.Table',alias:'widget.treepanel',alternateClassName:['Ext.tree.TreePanel','Ext.TreePanel'],requires:['Ext.tree.View','Ext.selection.TreeModel','Ext.tree.Column','Ext.data.TreeStore','Ext.tree.NavigationModel'],viewType:'treeview',treeCls:Ext.baseCSSPrefix+'tree-panel',rowLines:!1,lines:!0,useArrows:!1,singleExpand:!1,ddConfig:{enableDrag:!0,enableDrop:!0},ariaRole:'treegrid',rootVisible:!0,displayField:'text',root:null,checkPropagation:'none',normalCfgCopy:['displayField','root','singleExpand','useArrows','lines','rootVisible','scroll'],lockedCfgCopy:['displayField','root','singleExpand','useArrows','lines','rootVisible'],isTree:!0,arrowCls:Ext.baseCSSPrefix+'tree-arrows',linesCls:Ext.baseCSSPrefix+'tree-lines',noLinesCls:Ext.baseCSSPrefix+'tree-no-lines',autoWidthCls:Ext.baseCSSPrefix+'autowidth-table',constructor:function(config){config=config||{};if(config.animate===undefined){config.animate=Ext.isBoolean(this.animate)?this.animate:Ext.enableFx}
this.enableAnimations=config.animate;delete config.animate;this.callParent([config])},initComponent:function(){var me=this,cls=[me.treeCls],store,autoTree,view;if(me.useArrows){cls.push(me.arrowCls);me.lines=!1}
if(me.lines){cls.push(me.linesCls)}else if(!me.useArrows){cls.push(me.noLinesCls)}
store=me.applyStore(me.store);if(!store.getRoot()){store.setRoot({})}
store.setRootVisible(me.rootVisible);if(!me.columns){me.isAutoTree=autoTree=!0}
me.viewConfig=Ext.apply({rootVisible:me.rootVisible,animate:me.enableAnimations,singleExpand:me.singleExpand,node:store.getRoot(),navigationModel:'tree',isAutoTree:autoTree},me.viewConfig);if(autoTree){me.addCls(me.autoWidthCls);me.columns=[{xtype:'treecolumn',text:me.hideHeaders===!0?'Name':null,flex:1,dataIndex:me.displayField}]}
if(me.cls){cls.push(me.cls)}
me.cls=cls.join(' ');me.callParent();view=me.getView();me.relayEvents(view,['beforecheckchange','checkchange','afteritemexpand','afteritemcollapse'])},applyStore:function(store){var me=this;if(Ext.isString(store)){store=me.store=Ext.StoreMgr.lookup(store)}else if(!store||!store.isStore){store=Ext.apply({type:'tree',proxy:'memory'},store);if(me.root){store.root=me.root}
if(me.fields){store.fields=me.fields}else if(me.model){store.model=me.model}
if(me.folderSort){store.folderSort=me.folderSort}
store=me.store=Ext.StoreMgr.lookup(store)}else if(me.root){store=me.store=Ext.data.StoreManager.lookup(store);store.setRoot(me.root);if(me.folderSort!==undefined){store.folderSort=me.folderSort;store.sort()}}
return store},setRoot:function(root){this.store.setRoot(root)},setStore:function(store){var me=this;store=me.applyStore(store);if(!store.getRoot()){store.setRoot({})}
store.setRootVisible(me.rootVisible);if(me.enableLocking){me.reconfigure(store)}else{if(me.view){me.view.setRootNode(store.getRootNode())}
me.bindStore(store)}},bindStore:function(store,initial){var me=this,root=store.getRoot();me.callParent(arguments);store.singleExpand=me.singleExpand;me.storeListeners=me.mon(store,{destroyable:!0,rootchange:me.onRootChange,scope:me});me.storeRelayers=me.relayEvents(store,['beforeload','load']);if(!me.rootVisible&&!store.autoLoad&&!(root.isExpanded()||root.isLoading())){if(root.isLoaded()){root.data.expanded=!0;store.onNodeExpand(root,root.childNodes)}else if(store.autoLoad!==!1&&!store.hasPendingLoad()){root.data.expanded=!1;root.expand()}}
store.ownerTree=me;if(!initial){me.view.setRootNode(root)}},addRelayers:function(newRoot){var me=this;if(me.rootRelayers){me.rootRelayers.destroy();me.rootRelayers=null}
me.rootRelayers=me.mon(newRoot,{destroyable:!0,append:me.createRelayer('itemappend'),remove:me.createRelayer('itemremove'),move:me.createRelayer('itemmove',[0,4]),insert:me.createRelayer('iteminsert'),beforeappend:me.createRelayer('beforeitemappend'),beforeremove:me.createRelayer('beforeitemremove'),beforemove:me.createRelayer('beforeitemmove'),beforeinsert:me.createRelayer('beforeiteminsert'),expand:me.createRelayer('itemexpand',[0,1]),collapse:me.createRelayer('itemcollapse',[0,1]),beforeexpand:me.createRelayer('beforeitemexpand',[0,1]),beforecollapse:me.createRelayer('beforeitemcollapse',[0,1]),scope:me})},unbindStore:function(){var me=this,store=me.store;if(store){me.callParent();Ext.destroy(me.storeListeners,me.storeRelayers,me.rootRelayers);delete store.ownerTree;store.singleExpand=null}},setRootNode:function(){return this.store.setRoot.apply(this.store,arguments)},getRootNode:function(){return this.store.getRoot()},onRootChange:function(root){this.view.setRootNode(root)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(rec){return rec.get('checked')},expandNode:function(record,deep,callback,scope){return this.getView().expand(record,deep,callback,scope||this)},collapseNode:function(record,deep,callback,scope){return this.getView().collapse(record,deep,callback,scope||this)},expandAll:function(callback,scope){var me=this,root=me.getRootNode();if(root){Ext.suspendLayouts();root.expand(!0,callback,scope||me);Ext.resumeLayouts(!0)}},collapseAll:function(callback,scope){var me=this,root=me.getRootNode(),view=me.getView();if(root){Ext.suspendLayouts();scope=scope||me;if(view.rootVisible){root.collapse(!0,callback,scope)}else{root.collapseChildren(!0,callback,scope)}
Ext.resumeLayouts(!0)}},expandPath:function(path,options){var args=arguments,me=this,view=me.view,field=(options&&options.field)||me.store.model.idProperty,separator=(options&&options.separator)||'/',select,doFocus,callback,scope,current,index,keys,rooted,expander;if(options&&typeof options==='object'){field=options.field||me.store.model.idProperty;separator=options.separator||'/';callback=options.callback;scope=options.scope;select=options.select;doFocus=options.focus}else{field=args[1]||me.store.model.idProperty;separator=args[2]||'/';callback=args[3];scope=args[4]}
if(Ext.isEmpty(path)){return Ext.callback(callback,scope||me,[!1,null])}
keys=path.split(separator);rooted=!keys[0];if(rooted){current=me.getRootNode();index=1}else{current=me.store.findNode(field,keys[0]);index=0}
if(!current||(rooted&&(current.get(field)+'')!==keys[1])){return Ext.callback(callback,scope||me,[!1,current])}
expander=function(newChildren){var node=this,len,i,value;if(++index===keys.length){if(select){view.getSelectionModel().select(node)}
if(doFocus){view.getNavigationModel().setPosition(node,0)}
return Ext.callback(callback,scope||me,[!0,node,view.getNode(node)])}
for(i=0,len=newChildren?newChildren.length:0;i<len;i++){node=newChildren[i];value=node.get(field);if(value||value===0){value=value.toString()}
if(value===keys[index]){return node.expand(!1,expander)}}
node=this;Ext.callback(callback,scope||me,[!1,node,view.getNode(node)])};current.expand(!1,expander)},ensureVisible:function(path,options){if(path.isEntity||typeof path==='number'){return this.callParent([path,options])}
var me=this,field=(options&&options.field)||me.store.model.idProperty,separator=(options&&options.separator)||'/',callback,scope,keys,rooted,last,node,parentNode,onLastExpanded;onLastExpanded=function(success,lastExpanded,lastExpandedHtmlNode,targetNode){if(!targetNode&&success&&lastExpanded){targetNode=lastExpanded.findChild(field,last)}
if(targetNode){me.doEnsureVisible(targetNode,options)}else{Ext.callback(callback,scope||me,[!1,lastExpanded])}};if(options){callback=options.callback;scope=options.scope}
keys=path.split(separator);rooted=!keys[0];last=keys.pop();if(keys.length&&!(rooted&&keys.length===1)){me.expandPath(keys.join(separator),field,separator,onLastExpanded)}else{node=me.store.findNode(field,last);if(node){parentNode=node.parentNode;if(parentNode&&!parentNode.isExpanded()){parentNode.expand()}
onLastExpanded(!0,null,null,node)}else{Ext.callback(callback,scope||me,[!1,null])}}},selectPath:function(path,field,separator,callback,scope){this.ensureVisible(path,{field:field,separator:separator,select:!0,callback:callback,scope:scope})}})
;
Ext.define('Ext.view.DragZone',{extend:'Ext.dd.DragZone',containerScroll:!1,constructor:function(config){var me=this,view,ownerCt,el;Ext.apply(me,config);if(!me.ddGroup){me.ddGroup='view-dd-zone-'+me.view.id}
view=me.view;view.setItemsDraggable(!0);ownerCt=view.ownerCt;if(ownerCt){el=ownerCt.getTargetEl().dom}else{el=view.el.dom.parentNode}
me.callParent([el]);me.ddel=document.createElement('div');me.ddel.className=Ext.baseCSSPrefix+'grid-dd-wrap'},init:function(id,sGroup,config){var me=this,eventSpec={itemmousedown:me.onItemMouseDown,scope:me};if(Ext.supports.Touch){eventSpec.itemlongpress=me.onItemLongPress;eventSpec.contextmenu={element:'el',fn:me.onViewContextMenu}}
me.initTarget(id,sGroup,config);me.view.mon(me.view,eventSpec)},onValidDrop:function(target,e,id){this.callParent([target,e,id]);if(!target.el.contains(Ext.Element.getActiveElement())){target.el.focus()}},onViewContextMenu:function(e){if(e.pointerType!=='mouse'){e.preventDefault()}},onItemMouseDown:function(view,record,item,index,e){if(e.pointerType==='mouse'){this.onTriggerGesture(view,record,item,index,e)}},onItemLongPress:function(view,record,item,index,e){if(e.pointerType!=='mouse'){this.onTriggerGesture(view,record,item,index,e)}},onTriggerGesture:function(view,record,item,index,e){var navModel;if((e.pointerType==='touch'&&e.type!=='longpress')||(e.position&&e.position.isEqual(e.view.actionPosition))){return}
if(!this.isPreventDrag(e,record,item,index)){navModel=view.getNavigationModel();if(e.position){navModel.setPosition(e.position)}else{navModel.setPosition(index)}
this.handleMouseDown(e)}},isPreventDrag:function(e,record,item,index){return!!e.isInputFieldEvent},getDragData:function(e){var view=this.view,item=e.getTarget(view.getItemSelector());if(item){return{copy:view.copy||(view.allowCopy&&e.ctrlKey),event:e,view:view,ddel:this.ddel,item:item,records:view.getSelectionModel().getSelection(),fromPosition:Ext.fly(item).getXY()}}},onInitDrag:function(x,y){var me=this,data=me.dragData,view=data.view,selectionModel=view.getSelectionModel(),record=view.getRecord(data.item);if(!selectionModel.isSelected(record)){selectionModel.selectWithEvent(record,me.DDMInstance.mousedownEvent)}
data.records=selectionModel.getSelection();Ext.fly(me.ddel).setHtml(me.getDragText());me.proxy.update(me.ddel);me.onStartDrag(x,y);return!0},getDragText:function(){var count=this.dragData.records.length;return Ext.String.format(this.dragText,count,count===1?'':'s')},getRepairXY:function(e,data){return data?data.fromPosition:!1}})
;
Ext.define('Ext.tree.ViewDragZone',{extend:'Ext.view.DragZone',isPreventDrag:function(e,record){return(record.get('allowDrag')===!1)||!!e.getTarget(this.view.expanderSelector)},getDragText:function(){var records=this.dragData.records,count=records.length,text=records[0].get(this.displayField),suffix='s',formatRe=/\{\d+\}/,dragText=this.dragText;if(formatRe.test(dragText)&&count===1&&text){return text}else if(!text){suffix=''}
return Ext.String.format(dragText,count,suffix)},afterRepair:function(){var me=this,view=me.view,selectedRowCls=view.selectedItemCls,records=me.dragData.records,r,rLen=records.length,fly=Ext.fly,item;if(Ext.enableFx&&me.repairHighlight){for(r=0;r<rLen;r++){item=view.getNode(records[r]);fly(item.firstChild).highlight(me.repairHighlightColor,{listeners:{beforeanimate:function(){if(view.isSelected(item)){fly(item).removeCls(selectedRowCls)}},afteranimate:function(){if(view.isSelected(item)){fly(item).addCls(selectedRowCls)}}}})}}
me.dragging=!1}})
;
Ext.define('Ext.tree.ViewDropZone',{extend:'Ext.view.DropZone',allowParentInserts:!1,allowContainerDrops:!1,appendOnly:!1,expandDelay:500,indicatorCls:Ext.baseCSSPrefix+'tree-ddindicator',expandNode:function(node){var view=this.view;this.expandProcId=!1;if(!node.isLeaf()&&!node.isExpanded()){view.expand(node);this.expandProcId=!1}},queueExpand:function(node){this.expandProcId=Ext.defer(this.expandNode,this.expandDelay,this,[node])},cancelExpand:function(){this.expandProcId=Ext.undefer(this.expandProcId)},getPosition:function(e,node){var view=this.view,record=view.getRecord(node),y=e.getY(),noAppend=record.isLeaf(),noBelow=!1,region=Ext.fly(node).getRegion(),fragment;if(record.isRoot()){return'append'}
if(this.appendOnly){return noAppend?!1:'append'}
if(!this.allowParentInserts){noBelow=record.hasChildNodes()&&record.isExpanded()}
fragment=(region.bottom-region.top)/(noAppend?2:3);if(y>=region.top&&y<(region.top+fragment)){return'before'}else if(!noBelow&&(noAppend||(y>=(region.bottom-fragment)&&y<=region.bottom))){return'after'}else{return'append'}},isValidDropPoint:function(node,position,dragZone,e,data){if(!node||!data.item){return!1}
var view=this.view,targetNode=view.getRecord(node),draggedRecords=data.records,dataLength=draggedRecords.length,ln=draggedRecords.length,i,record;if(!(targetNode&&position&&dataLength)){return!1}
for(i=0;i<ln;i++){record=draggedRecords[i];if(record.isNode&&record.contains(targetNode)){return!1}}
if(position==='append'&&targetNode.get('allowDrop')===!1){return!1}else if(position!=='append'&&targetNode.parentNode.get('allowDrop')===!1){return!1}
if(Ext.Array.contains(draggedRecords,targetNode)){return!1}
return view.fireEvent('nodedragover',targetNode,position,data,e)!==!1},onNodeOver:function(node,dragZone,e,data){var position=this.getPosition(e,node),returnCls=this.dropNotAllowed,view=this.view,targetNode=view.getRecord(node),indicator=this.getIndicator(),indicatorY=0;this.cancelExpand();if(position==='append'&&!this.expandProcId&&!Ext.Array.contains(data.records,targetNode)&&!targetNode.isLeaf()&&!targetNode.isExpanded()){this.queueExpand(targetNode)}
if(this.isValidDropPoint(node,position,dragZone,e,data)){this.valid=!0;this.currentPosition=position;this.overRecord=targetNode;indicator.setWidth(Ext.fly(node).getWidth());indicatorY=Ext.fly(node).getY()-Ext.fly(view.el).getY()-1;if(position==='before'){returnCls=targetNode.isFirst()?Ext.baseCSSPrefix+'tree-drop-ok-above':Ext.baseCSSPrefix+'tree-drop-ok-between';indicator.showAt(0,indicatorY);dragZone.proxy.show()}else if(position==='after'){returnCls=targetNode.isLast()?Ext.baseCSSPrefix+'tree-drop-ok-below':Ext.baseCSSPrefix+'tree-drop-ok-between';indicatorY+=Ext.fly(node).getHeight();indicator.showAt(0,indicatorY);dragZone.proxy.show()}else{returnCls=Ext.baseCSSPrefix+'tree-drop-ok-append';indicator.hide()}}else{this.valid=!1}
this.currentCls=returnCls;return returnCls},onNodeOut:function(n,dd,e,data){this.valid=!1;this.getIndicator().hide()},onContainerOver:function(dd,e,data){return this.allowContainerDrops?this.dropAllowed:e.getTarget('.'+this.indicatorCls)?this.currentCls:this.dropNotAllowed},onContainerDrop:function(dragZone,e,data){if(this.allowContainerDrops){this.valid=!0;this.currentPosition='append';this.overRecord=this.view.store.getRoot();this.onNodeDrop(this.overRecord,dragZone,e,data)}},notifyOut:function(){this.callParent(arguments);this.cancelExpand()},handleNodeDrop:function(data,targetNode,position){var me=this,targetView=me.view,parentNode=targetNode?targetNode.parentNode:targetView.panel.getRootNode(),Model=targetView.store.getModel(),records,i,len,record,insertionMethod,argList,needTargetExpand,transferData;if(data.copy){records=data.records;data.records=[];for(i=0,len=records.length;i<len;i++){record=records[i];if(record.isNode){data.records.push(record.copy(undefined,!0))}else{data.records.push(new Model(Ext.apply({},record.data)))}}}
me.cancelExpand();if(position==='before'){insertionMethod=parentNode.insertBefore;argList=[null,targetNode];targetNode=parentNode}else if(position==='after'){if(targetNode.nextSibling){insertionMethod=parentNode.insertBefore;argList=[null,targetNode.nextSibling]}else{insertionMethod=parentNode.appendChild;argList=[null]}
targetNode=parentNode}else{if(!(targetNode.isExpanded()||targetNode.isLoading())){needTargetExpand=!0}
insertionMethod=targetNode.appendChild;argList=[null]}
transferData=function(){var color,n;Ext.suspendLayouts();for(i=0,len=data.records.length;i<len;i++){record=data.records[i];if(!record.isNode){if(record.isModel){record=new Model(record.data,record.getId())}else{record=new Model(record)}
data.records[i]=record}
argList[0]=record;insertionMethod.apply(targetNode,argList)}
if(me.sortOnDrop){targetNode.sort(targetNode.getTreeStore().getSorters().sortFn)}
Ext.resumeLayouts(!0);record=data.records[0];targetView.ownerGrid.ensureVisible(record);targetView.getNavigationModel().setPosition(record);if(Ext.enableFx&&me.dropHighlight){color=me.dropHighlightColor;for(i=0;i<len;i++){n=targetView.getNode(data.records[i]);if(n){Ext.fly(n).highlight(color)}}}};if(needTargetExpand){targetNode.expand(!1,transferData)}else if(targetNode.isLoading()){targetNode.on({expand:transferData,delay:1,single:!0})}else{transferData()}}})
;
Ext.define('Ext.tree.plugin.TreeViewDragDrop',{extend:'Ext.plugin.Abstract',alias:'plugin.treeviewdragdrop',uses:['Ext.tree.ViewDragZone','Ext.tree.ViewDropZone'],dragText:'{0} selected node{1}',allowParentInserts:!1,allowContainerDrops:!1,appendOnly:!1,ddGroup:"TreeDD",containerScroll:!1,expandDelay:1000,enableDrop:!0,enableDrag:!0,nodeHighlightColor:'c3daf9',nodeHighlightOnDrop:Ext.enableFx,displayField:'text',init:function(view){Ext.applyIf(view,{copy:this.copy,allowCopy:this.allowCopy});view.on('render',this.onViewRender,this,{single:!0})},destroy:function(){var me=this;me.dragZone=me.dropZone=Ext.destroy(me.dragZone,me.dropZone);me.callParent()},onViewRender:function(view){var me=this,ownerGrid=view.ownerCt.ownerGrid||view.ownerCt,scrollEl;ownerGrid.relayEvents(view,['beforedrop','drop']);if(me.enableDrag){if(me.containerScroll){scrollEl=view.getEl()}
me.dragZone=new Ext.tree.ViewDragZone(Ext.apply({view:view,ddGroup:me.dragGroup||me.ddGroup,dragText:me.dragText,displayField:me.displayField,repairHighlightColor:me.nodeHighlightColor,repairHighlight:me.nodeHighlightOnRepair,scrollEl:scrollEl},me.dragZone))}
if(me.enableDrop){me.dropZone=new Ext.tree.ViewDropZone(Ext.apply({view:view,ddGroup:me.dropGroup||me.ddGroup,allowContainerDrops:me.allowContainerDrops,appendOnly:me.appendOnly,allowParentInserts:me.allowParentInserts,expandDelay:me.expandDelay,dropHighlightColor:me.nodeHighlightColor,dropHighlight:me.nodeHighlightOnDrop,sortOnDrop:me.sortOnDrop,containerScroll:me.containerScroll},me.dropZone))}}},function(){var proto=this.prototype;proto.nodeHighlightOnDrop=proto.nodeHighlightOnRepair=Ext.enableFx})
;
Ext.define('Ext.view.MultiSelectorSearch',{extend:'Ext.panel.Panel',xtype:'multiselector-search',layout:'fit',floating:!0,alignOnScroll:!1,minWidth:200,minHeight:200,border:!0,keyMap:{scope:'this',ESC:'hide'},platformConfig:{desktop:{resizable:!0},'tablet && rtl':{resizable:{handles:'sw'}},'tablet && !rtl':{resizable:{handles:'se'}}},defaultListenerScope:!0,referenceHolder:!0,searchText:'Search...',initComponent:function(){var me=this,owner=me.owner,items=me.makeItems(),i,item,records,store;me.dockedItems=me.makeDockedItems();me.items=items;store=Ext.data.StoreManager.lookup(me.store);for(i=items.length;i--;){if((item=items[i]).xtype==='grid'){item.store=store;item.isSearchGrid=!0;item.selModel=item.selModel||{type:'checkboxmodel',pruneRemoved:!1,listeners:{selectionchange:'onSelectionChange'}};Ext.merge(item,me.grid);if(!item.columns){item.hideHeaders=!0;item.columns=[{flex:1,dataIndex:me.field}]}
break}}
me.callParent();records=me.getOwnerStore().getRange();if(!owner.convertSelectionRecord.$nullFn){for(i=records.length;i--;){records[i]=owner.convertSelectionRecord(records[i])}}
if(store.isLoading()||(store.loadCount===0&&!store.getCount())){store.on('load',function(){if(!me.destroyed){me.selectRecords(records)}},null,{single:!0})}else{me.selectRecords(records)}},getOwnerStore:function(){return this.owner.getStore()},afterShow:function(){var searchField;this.callParent(arguments);if(!this.invocationEvent||this.invocationEvent.pointerType!=='touch'){searchField=this.lookupReference('searchField');if(searchField){searchField.focus()}}
this.invocationEvent=null},getSearchStore:function(){var searchGrid=this.lookupReference('searchGrid');return searchGrid.getStore()},makeDockedItems:function(){return[{xtype:'textfield',reference:'searchField',dock:'top',hideFieldLabel:!0,emptyText:this.searchText,cls:Ext.baseCSSPrefix+'multiselector-search-input',triggers:{clear:{cls:Ext.baseCSSPrefix+'form-clear-trigger',handler:'onClearSearch',hidden:!0}},listeners:{specialKey:'onSpecialKey',change:{fn:'onSearchChange',buffer:300}}}]},onSpecialKey:function(field,event){if(event.getKey()===event.TAB&&event.shiftKey){event.preventDefault();this.owner.searchTool.focus()}},makeItems:function(){return[{xtype:'grid',reference:'searchGrid',trailingBufferZone:2,leadingBufferZone:2,viewConfig:{deferEmptyText:!1,emptyText:'No results.'}}]},getMatchingRecords:function(records){var searchGrid=this.lookupReference('searchGrid'),store=searchGrid.getStore(),selections=[],i,record,len;records=Ext.isArray(records)?records:[records];for(i=0,len=records.length;i<len;i++){record=store.getById(records[i].getId());if(record){selections.push(record)}}
return selections},selectRecords:function(records){var searchGrid=this.lookupReference('searchGrid');records=this.getMatchingRecords(records);return searchGrid.getSelectionModel().select(records)},deselectRecords:function(records){var searchGrid=this.lookupReference('searchGrid');records=this.getMatchingRecords(records);return searchGrid.getSelectionModel().deselect(records)},search:function(text){var me=this,filter=me.searchFilter,filters=me.getSearchStore().getFilters();if(text){filters.beginUpdate();if(filter){filter.setValue(text)}else{me.searchFilter=filter=new Ext.util.Filter({id:'search',property:me.field,value:text})}
filters.add(filter);filters.endUpdate()}else if(filter){filters.remove(filter)}},privates:{onClearSearch:function(){var searchField=this.lookupReference('searchField');searchField.setValue(null);searchField.focus()},onSearchChange:function(searchField){var value=searchField.getValue(),trigger=searchField.getTrigger('clear');trigger.setHidden(!value);this.search(value)},onSelectionChange:function(selModel,selection){var owner=this.owner,store=owner.getStore(),data=store.data,remove=0,map={},add,i,id,record;for(i=selection.length;i--;){record=selection[i];id=record.id;map[id]=record;if(!data.containsKey(id)){(add||(add=[])).push(owner.convertSearchRecord(record))}}
for(i=data.length;i--;){record=data.getAt(i);if(!map[record.id]){(remove||(remove=[])).push(record)}}
if(add||remove){data.splice(data.length,remove,add)}}}})
;
Ext.define('Ext.view.MultiSelector',{extend:'Ext.grid.Panel',xtype:'multiselector',config:{search:{xtype:'multiselector-search',width:200,height:200,store:{autoLoad:!0}}},fieldName:'name',fieldTitle:null,removeRowText:'\u2716',removeRowTip:'Remove this item',emptyText:'Nothing selected',addToolText:'Search for items to add',initComponent:function(){var me=this,emptyText=me.emptyText,store=me.getStore(),search=me.getSearch(),fieldTitle=me.fieldTitle,searchStore,model;if(!search){Ext.raise('The search configuration is required for the multi selector')}
searchStore=search.store;if(searchStore.isStore){model=searchStore.getModel()}else{model=searchStore.model}
if(!store){me.store={model:model}}
if(emptyText&&!me.viewConfig){me.viewConfig={deferEmptyText:!1,emptyText:emptyText}}
if(!me.columns){me.hideHeaders=!fieldTitle;me.columns=[{text:fieldTitle,dataIndex:me.fieldName,flex:1},me.makeRemoveRowColumn()]}
me.callParent()},addTools:function(){var me=this;me.addTool({type:'plus',tooltip:me.addToolText,callback:'onShowSearch',scope:me});me.searchTool=me.tools[me.tools.length-1]},convertSearchRecord:Ext.identityFn,convertSelectionRecord:Ext.identityFn,makeRemoveRowColumn:function(){var me=this;return{width:32,align:'center',menuDisabled:!0,tdCls:Ext.baseCSSPrefix+'multiselector-remove',processEvent:me.processRowEvent.bind(me),renderer:me.renderRemoveRow,updater:Ext.emptyFn,scope:me}},processRowEvent:function(type,view,cell,recordIndex,cellIndex,e,record,row){var body=Ext.getBody();if(e.type==='click'||(e.type==='keydown'&&(e.keyCode===e.SPACE||e.keyCode===e.ENTER))){body.suspendFocusEvents();this.store.remove(record);body.resumeFocusEvents();if(this.searchPopup){this.searchPopup.deselectRecords(record)}}},renderRemoveRow:function(){return'<span data-qtip="'+this.removeRowTip+'" role="button" tabIndex="0">'+this.removeRowText+'</span>'},onFocusLeave:function(e){this.onDismissSearch();this.callParent([e])},afterComponentLayout:function(width,height,prevWidth,prevHeight){var me=this,popup=me.searchPopup;me.callParent([width,height,prevWidth,prevHeight]);if(popup&&popup.isVisible()){popup.showBy(me,me.popupAlign)}},privates:{popupAlign:'tl-tr?',onGlobalScroll:function(scroller){if(!this.owns(scroller.getElement())){this.onDismissSearch()}},onDismissSearch:function(e){var searchPopup=this.searchPopup;if(searchPopup&&(!e||!(searchPopup.owns(e.getTarget())||this.owns(e.getTarget())))){this.scrollListeners.destroy();this.touchListeners.destroy();searchPopup.hide()}},onShowSearch:function(panel,tool,event){var me=this,searchPopup=me.searchPopup,store=me.getStore();if(!searchPopup){searchPopup=Ext.merge({owner:me,field:me.fieldName,floating:!0,alignOnScroll:!1},me.getSearch());me.searchPopup=searchPopup=me.add(searchPopup);if(store.getCount()){searchPopup.selectRecords(store.getRange())}}
searchPopup.invocationEvent=event;searchPopup.showBy(me,me.popupAlign);if(!event||event.pointerType!=='touch'){searchPopup.lookupReference('searchField').focus()}
me.scrollListeners=Ext.on({scroll:'onGlobalScroll',scope:me,destroyable:!0});me.touchListeners=Ext.getDoc().on({translate:!1,touchstart:me.onDismissSearch,scope:me,delegated:!1,destroyable:!0})}}})
;
Ext.define('Ext.window.Toast',{extend:'Ext.window.Window',xtype:'toast',isToast:!0,cls:Ext.baseCSSPrefix+'toast',bodyPadding:10,autoClose:!0,plain:!1,draggable:!1,resizable:!1,shadow:!1,focus:Ext.emptyFn,anchor:null,useXAxis:!1,align:'t',alwaysOnTop:!0,spacing:6,paddingX:30,paddingY:10,slideInAnimation:'easeIn',slideBackAnimation:'bounceOut',slideInDuration:500,slideBackDuration:500,hideDuration:500,autoCloseDelay:3000,stickOnClick:!1,stickWhileHover:!0,closeOnMouseDown:!1,closable:!1,minHeight:1,focusable:!1,isHiding:!1,isFading:!1,destroyAfterHide:!1,closeOnMouseOut:!1,xPos:0,yPos:0,constructor:function(config){config=config||{};if(config.animate===undefined){config.animate=Ext.isBoolean(this.animate)?this.animate:Ext.enableFx}
this.enableAnimations=config.animate;delete config.animate;this.callParent([config])},initComponent:function(){var me=this;if(me.autoClose&&me.closable==null){me.closable=!1}
me.updateAlignment(me.align);me.setAnchor(me.anchor);me.callParent()},onRender:function(){var me=this;me.callParent(arguments);me.el.hover(me.onMouseEnter,me.onMouseLeave,me);if(me.closeOnMouseDown){Ext.getDoc().on('mousedown',me.onDocumentMousedown,me)}},alignmentProps:{br:{paddingFactorX:-1,paddingFactorY:-1,siblingAlignment:"br-br",anchorAlign:"tr-br"},bl:{paddingFactorX:1,paddingFactorY:-1,siblingAlignment:"bl-bl",anchorAlign:"tl-bl"},tr:{paddingFactorX:-1,paddingFactorY:1,siblingAlignment:"tr-tr",anchorAlign:"br-tr"},tl:{paddingFactorX:1,paddingFactorY:1,siblingAlignment:"tl-tl",anchorAlign:"bl-tl"},b:{paddingFactorX:0,paddingFactorY:-1,siblingAlignment:"b-b",useXAxis:0,anchorAlign:"t-b"},t:{paddingFactorX:0,paddingFactorY:1,siblingAlignment:"t-t",useXAxis:0,anchorAlign:"b-t"},l:{paddingFactorX:1,paddingFactorY:0,siblingAlignment:"l-l",useXAxis:1,anchorAlign:"r-l"},r:{paddingFactorX:-1,paddingFactorY:0,siblingAlignment:"r-r",useXAxis:1,anchorAlign:"l-r"},x:{br:{anchorAlign:"bl-br"},bl:{anchorAlign:"br-bl"},tr:{anchorAlign:"tl-tr"},tl:{anchorAlign:"tr-tl"}}},updateAlignment:function(align){var me=this,alignmentProps=me.alignmentProps,props=alignmentProps[align],xprops=alignmentProps.x[align];if(xprops&&me.useXAxis){Ext.applyIf(me,xprops)}
Ext.applyIf(me,props)},getXposAlignedToAnchor:function(){var me=this,align=me.align,anchor=me.anchor,anchorEl=anchor&&anchor.el,el=me.el,xPos=0;if(anchorEl&&anchorEl.dom){if(!me.useXAxis){xPos=el.getLeft()}else if(align==='br'||align==='tr'||align==='r'){xPos+=anchorEl.getAnchorXY('r')[0];xPos-=(el.getWidth()+me.paddingX)}else{xPos+=anchorEl.getAnchorXY('l')[0];xPos+=me.paddingX}}
return xPos},getYposAlignedToAnchor:function(){var me=this,align=me.align,anchor=me.anchor,anchorEl=anchor&&anchor.el,el=me.el,yPos=0;if(anchorEl&&anchorEl.dom){if(me.useXAxis){yPos=el.getTop()}else if(align==='br'||align==='bl'||align==='b'){yPos+=anchorEl.getAnchorXY('b')[1];yPos-=(el.getHeight()+me.paddingY)}else{yPos+=anchorEl.getAnchorXY('t')[1];yPos+=me.paddingY}}
return yPos},getXposAlignedToSibling:function(sibling){var me=this,align=me.align,el=me.el,xPos;if(!me.useXAxis){xPos=el.getLeft()}else if(align==='tl'||align==='bl'||align==='l'){xPos=(sibling.xPos+sibling.el.getWidth()+sibling.spacing)}else{xPos=(sibling.xPos-el.getWidth()-me.spacing)}
return xPos},getYposAlignedToSibling:function(sibling){var me=this,align=me.align,el=me.el,yPos;if(me.useXAxis){yPos=el.getTop()}else if(align==='tr'||align==='tl'||align==='t'){yPos=(sibling.yPos+sibling.el.getHeight()+sibling.spacing)}else{yPos=(sibling.yPos-el.getHeight()-sibling.spacing)}
return yPos},getToasts:function(){var anchor=this.anchor,alignment=this.anchorAlign,activeToasts=anchor.activeToasts||(anchor.activeToasts={});return activeToasts[alignment]||(activeToasts[alignment]=[])},setAnchor:function(anchor){var me=this,Toast;me.anchor=anchor=((typeof anchor==='string')?Ext.getCmp(anchor):anchor);if(!anchor){Toast=Ext.window.Toast;me.anchor=Toast.bodyAnchor||(Toast.bodyAnchor={el:Ext.getBody()})}},beforeShow:function(){var me=this;if(me.stickOnClick){me.body.on('click',function(){me.cancelAutoClose()})}
if(me.autoClose){if(!me.closeTask){me.closeTask=new Ext.util.DelayedTask(me.doAutoClose,me)}}
me.el.setX(-10000);me.el.setOpacity(1)},afterShow:function(){var me=this,el=me.el,activeToasts,sibling,length,xy;me.callParent(arguments);activeToasts=me.getToasts();length=activeToasts.length;sibling=length&&activeToasts[length-1];if(sibling){el.alignTo(sibling.el,me.siblingAlignment,[0,0]);me.xPos=me.getXposAlignedToSibling(sibling);me.yPos=me.getYposAlignedToSibling(sibling)}else{el.alignTo(me.anchor.el,me.anchorAlign,[(me.paddingX*me.paddingFactorX),(me.paddingY*me.paddingFactorY)],!1);me.xPos=me.getXposAlignedToAnchor();me.yPos=me.getYposAlignedToAnchor()}
Ext.Array.include(activeToasts,me);if(me.enableAnimations){xy=el.getXY();el.animate({from:{x:xy[0],y:xy[1]},to:{x:me.xPos,y:me.yPos,opacity:1},easing:me.slideInAnimation,duration:me.slideInDuration,dynamic:!0,callback:me.afterPositioned,scope:me})}else{me.setLocalXY(me.xPos,me.yPos);me.afterPositioned()}},afterPositioned:function(){var me=this;if(!me.destroying&&!me.destroyed&&me.autoClose){me.closeTask.delay(me.autoCloseDelay)}},onDocumentMousedown:function(e){if(this.isVisible()&&!this.owns(e.getTarget())){this.hide()}},slideBack:function(){var me=this,anchor=me.anchor,anchorEl=anchor&&anchor.el,el=me.el,activeToasts=me.getToasts(),index=Ext.Array.indexOf(activeToasts,me);if(!me.isHiding&&el&&el.dom&&anchorEl&&anchorEl.isVisible()){if(index){me.xPos=me.getXposAlignedToSibling(activeToasts[index-1]);me.yPos=me.getYposAlignedToSibling(activeToasts[index-1])}else{me.xPos=me.getXposAlignedToAnchor();me.yPos=me.getYposAlignedToAnchor()}
me.stopAnimation();if(me.enableAnimations){el.animate({to:{x:me.xPos,y:me.yPos},easing:me.slideBackAnimation,duration:me.slideBackDuration,dynamic:!0})}}},update:function(){var me=this;if(me.isVisible()){me.isHiding=!0;me.hide()}
me.callParent(arguments);me.show()},cancelAutoClose:function(){var closeTask=this.closeTask;if(closeTask){closeTask.cancel()}},doAutoClose:function(){var me=this;if(!(me.stickWhileHover&&me.mouseIsOver)){me.close()}else{me.closeOnMouseOut=!0}},doDestroy:function(){this.removeFromAnchor();this.cancelAutoClose();this.callParent()},onMouseEnter:function(){this.mouseIsOver=!0},onMouseLeave:function(){var me=this;me.mouseIsOver=!1;if(me.closeOnMouseOut){me.closeOnMouseOut=!1;me.close()}},removeFromAnchor:function(){var me=this,activeToasts,index;if(me.anchor){activeToasts=me.getToasts();index=Ext.Array.indexOf(activeToasts,me);if(index!==-1){Ext.Array.erase(activeToasts,index,1);for(;index<activeToasts.length;index++){activeToasts[index].slideBack()}}}},getFocusEl:Ext.emptyFn,hide:function(){var me=this,el=me.el;me.cancelAutoClose();if(me.isHiding){if(!me.isFading){me.callParent(arguments);me.isHiding=!1}}else{me.isHiding=!0;me.isFading=!0;me.cancelAutoClose();if(el){if(me.enableAnimations&&!me.destroying&&!me.destroyed){el.fadeOut({opacity:0,easing:'easeIn',duration:me.hideDuration,listeners:{scope:me,afteranimate:function(){var me=this;me.isFading=!1;if(!me.destroying&&!me.destroyed){me.hide(me.animateTarget,me.doClose,me)}}}})}else{me.isFading=!1;me.hide(me.animateTarget,me.doClose,me)}}}
return me}},function(Toast){Ext.toast=function(message,title,align,iconCls){var config=message,toast;if(Ext.isString(message)){config={title:title,html:message,iconCls:iconCls};if(align){config.align=align}}
toast=new Toast(config);toast.show();return toast}})
;
Ext.define('Ext.draw.ContainerBase',{extend:'Ext.panel.Panel',requires:['Ext.window.Window'],previewTitleText:'Chart Preview',previewAltText:'Chart preview',layout:'container',addElementListener:function(){var me=this,args=arguments;if(me.rendered){me.el.on.apply(me.el,args)}else{me.on('render',function(){me.el.on.apply(me.el,args)})}},removeElementListener:function(){var me=this;if(me.rendered){me.el.un.apply(me.el,arguments)}},afterRender:function(){this.callParent(arguments);this.initAnimator()},getItems:function(){var me=this,items=me.items;if(!items||!items.isMixedCollection){me.initItems()}
return me.items},onRender:function(){this.callParent(arguments);this.element=this.el;this.bodyElement=this.body},setItems:function(items){this.items=items;return items},setSurfaceSize:function(width,height){this.resizeHandler({width:width,height:height});this.renderFrame()},onResize:function(width,height,oldWidth,oldHeight){this.handleResize({width:width,height:height},!this.size)},preview:function(image){var items;if(Ext.isIE8){return!1}
image=image||this.getImage();if(image.type==='svg-markup'){items={xtype:'container',html:image.data}}else{items={xtype:'image',mode:'img',cls:Ext.baseCSSPrefix+'chart-image',alt:this.previewAltText,src:image.data,listeners:{afterrender:function(){var me=this,img=me.imgEl.dom,ratio=image.type==='svg'?1:(window.devicePixelRatio||1),size;if(!img.naturalWidth||!img.naturalHeight){img.onload=function(){var width=img.naturalWidth,height=img.naturalHeight;me.setWidth(Math.floor(width/ratio));me.setHeight(Math.floor(height/ratio))}}else{size=me.getSize();me.setWidth(Math.floor(size.width/ratio));me.setHeight(Math.floor(size.height/ratio))}}}}}
new Ext.window.Window({title:this.previewTitleText,closable:!0,renderTo:Ext.getBody(),autoShow:!0,maximizeable:!0,maximized:!0,border:!0,layout:{type:'hbox',pack:'center',align:'middle'},items:{xtype:'container',items:items}})},privates:{getTargetEl:function(){return this.bodyElement},reattachToBody:function(){var me=this;if(me.pendingDetachSize){me.handleResize()}
me.pendingDetachSize=!1;me.callParent()}}})
;
Ext.define('Ext.draw.SurfaceBase',{extend:'Ext.Widget',getOwnerBody:function(){return this.ownerCt.body}})
;
Ext.define('Ext.draw.sprite.AnimationParser',function(){function compute(from,to,delta){return from+(to-from)*delta}
return{singleton:!0,attributeRe:/^url\(#([a-zA-Z-]+)\)$/,requires:['Ext.draw.Color'],color:{parseInitial:function(color1,color2){if(Ext.isString(color1)){color1=Ext.util.Color.create(color1)}
if(Ext.isString(color2)){color2=Ext.util.Color.create(color2)}
if((color1&&color1.isColor)&&(color2&&color2.isColor)){return[[color1.r,color1.g,color1.b,color1.a],[color2.r,color2.g,color2.b,color2.a]]}else{return[color1||color2,color2||color1]}},compute:function(from,to,delta){if(!Ext.isArray(from)||!Ext.isArray(to)){return to||from}else{return[compute(from[0],to[0],delta),compute(from[1],to[1],delta),compute(from[2],to[2],delta),compute(from[3],to[3],delta)]}},serve:function(array){var color=Ext.util.Color.fly(array[0],array[1],array[2],array[3]);return color.toString()}},number:{parse:function(n){return n===null?null:+n},compute:function(from,to,delta){if(!Ext.isNumber(from)||!Ext.isNumber(to)){return to||from}else{return compute(from,to,delta)}}},angle:{parseInitial:function(from,to){if(to-from>Math.PI){to-=Math.PI*2}else if(to-from<-Math.PI){to+=Math.PI*2}
return[from,to]},compute:function(from,to,delta){if(!Ext.isNumber(from)||!Ext.isNumber(to)){return to||from}else{return compute(from,to,delta)}}},path:{parseInitial:function(from,to){var fromStripes=from.toStripes(),toStripes=to.toStripes(),i,j,fromLength=fromStripes.length,toLength=toStripes.length,fromStripe,toStripe,length,lastStripe=toStripes[toLength-1],endPoint=[lastStripe[lastStripe.length-2],lastStripe[lastStripe.length-1]];for(i=fromLength;i<toLength;i++){fromStripes.push(fromStripes[fromLength-1].slice(0))}
for(i=toLength;i<fromLength;i++){toStripes.push(endPoint.slice(0))}
length=fromStripes.length;toStripes.path=to;toStripes.temp=new Ext.draw.Path();for(i=0;i<length;i++){fromStripe=fromStripes[i];toStripe=toStripes[i];fromLength=fromStripe.length;toLength=toStripe.length;toStripes.temp.commands.push('M');for(j=toLength;j<fromLength;j+=6){toStripe.push(endPoint[0],endPoint[1],endPoint[0],endPoint[1],endPoint[0],endPoint[1])}
lastStripe=toStripes[toStripes.length-1];endPoint=[lastStripe[lastStripe.length-2],lastStripe[lastStripe.length-1]];for(j=fromLength;j<toLength;j+=6){fromStripe.push(endPoint[0],endPoint[1],endPoint[0],endPoint[1],endPoint[0],endPoint[1])}
for(i=0;i<toStripe.length;i++){toStripe[i]-=fromStripe[i]}
for(i=2;i<toStripe.length;i+=6){toStripes.temp.commands.push('C')}}
return[fromStripes,toStripes]},compute:function(fromStripes,toStripes,delta){if(delta>=1){return toStripes.path}
var i=0,ln=fromStripes.length,j=0,ln2,from,to,temp=toStripes.temp.params,pos=0;for(;i<ln;i++){from=fromStripes[i];to=toStripes[i];ln2=from.length;for(j=0;j<ln2;j++){temp[pos++]=to[j]*delta+from[j]}}
return toStripes.temp}},data:{compute:function(from,to,delta,target){var iMaxFrom=from.length-1,iMaxTo=to.length-1,iMax=Math.max(iMaxFrom,iMaxTo),i,start,end;if(!target||target===from){target=[]}
target.length=iMax+1;for(i=0;i<=iMax;i++){start=from[Math.min(i,iMaxFrom)];end=to[Math.min(i,iMaxTo)];if(Ext.isNumber(start)){if(!Ext.isNumber(end)){end=0}
target[i]=start+(end-start)*delta}else{target[i]=end}}
return target}},text:{compute:function(from,to,delta){return from.substr(0,Math.round(from.length*(1-delta)))+to.substr(Math.round(to.length*(1-delta)))}},limited:'number',limited01:'number'}})
;
(function(){if(!Ext.global.Float32Array){var Float32Array=function(array){var i,len;if(typeof array==='number'){this.length=array}else if('length' in array){this.length=array.length;for(i=0,len=array.length;i<len;i++){this[i]=+array[i]}}};Float32Array.prototype=[];Ext.global.Float32Array=Float32Array}})();Ext.define('Ext.draw.Draw',{singleton:!0,radian:Math.PI/180,pi2:Math.PI*2,reflectFn:function(a){return a},rad:function(degrees){return(degrees%360)*this.radian},degrees:function(radian){return(radian/this.radian)%360},isBBoxIntersect:function(bbox1,bbox2,padding){padding=padding||0;return(Math.max(bbox1.x,bbox2.x)-padding>Math.min(bbox1.x+bbox1.width,bbox2.x+bbox2.width))||(Math.max(bbox1.y,bbox2.y)-padding>Math.min(bbox1.y+bbox1.height,bbox2.y+bbox2.height))},isPointInBBox:function(x,y,bbox){return!!bbox&&x>=bbox.x&&x<=(bbox.x+bbox.width)&&y>=bbox.y&&y<=(bbox.y+bbox.height)},naturalSpline:function(points){var i,j,ln=points.length,nd,d,y,ny,r=0,zs=new Float32Array(points.length),result=new Float32Array(points.length*3-2);zs[0]=0;zs[ln-1]=0;for(i=1;i<ln-1;i++){zs[i]=(points[i+1]+points[i-1]-2*points[i])-zs[i-1];r=1/(4-r);zs[i]*=r}
for(i=ln-2;i>0;i--){r=3.732050807568877+48.248711305964385/(-13.928203230275537+Math.pow(0.07179676972449123,i));zs[i]-=zs[i+1]*r}
ny=points[0];nd=ny-zs[0];for(i=0,j=0;i<ln-1;j+=3){y=ny;d=nd;i++;ny=points[i];nd=ny-zs[i];result[j]=y;result[j+1]=(nd+2*d)/3;result[j+2]=(nd*2+d)/3}
result[j]=ny;return result},spline:function(points){return this.naturalSpline(points)},cardinalToBezier:function(P1,P2,P3,P4,tension){return[P2,P2+(P3-P1)/6*tension,P3-(P4-P2)/6*tension,P3]},cardinalSpline:function(P,tension){var n=P.length,result=new Float32Array(n*3-2),i,bezier;if(tension===undefined){tension=0.5}
bezier=this.cardinalToBezier(P[0],P[0],P[1],P[2],tension);result[0]=bezier[0];result[1]=bezier[1];result[2]=bezier[2];result[3]=bezier[3];for(i=0;i<n-3;i++){bezier=this.cardinalToBezier(P[i],P[i+1],P[i+2],P[i+3],tension);result[4+i*3]=bezier[1];result[4+i*3+1]=bezier[2];result[4+i*3+2]=bezier[3]}
bezier=this.cardinalToBezier(P[n-3],P[n-2],P[n-1],P[n-1],tension);result[4+i*3]=bezier[1];result[4+i*3+1]=bezier[2];result[4+i*3+2]=bezier[3];return result},getAnchors:function(prevX,prevY,curX,curY,nextX,nextY,value){var PI=Math.PI,halfPI=PI/2,abs=Math.abs,sin=Math.sin,cos=Math.cos,atan=Math.atan,control1Length,control2Length,control1Angle,control2Angle,control1X,control1Y,control2X,control2Y,alpha;value=value||4;control1Length=(curX-prevX)/value;control2Length=(nextX-curX)/value;if((curY>=prevY&&curY>=nextY)||(curY<=prevY&&curY<=nextY)){control1Angle=control2Angle=halfPI}else{control1Angle=atan((curX-prevX)/abs(curY-prevY));if(prevY<curY){control1Angle=PI-control1Angle}
control2Angle=atan((nextX-curX)/abs(curY-nextY));if(nextY<curY){control2Angle=PI-control2Angle}}
alpha=halfPI-((control1Angle+control2Angle)%(PI*2))/2;if(alpha>halfPI){alpha-=PI}
control1Angle+=alpha;control2Angle+=alpha;control1X=curX-control1Length*sin(control1Angle);control1Y=curY+control1Length*cos(control1Angle);control2X=curX+control2Length*sin(control2Angle);control2Y=curY+control2Length*cos(control2Angle);if((curY>prevY&&control1Y<prevY)||(curY<prevY&&control1Y>prevY)){control1X+=abs(prevY-control1Y)*(control1X-curX)/(control1Y-curY);control1Y=prevY}
if((curY>nextY&&control2Y<nextY)||(curY<nextY&&control2Y>nextY)){control2X-=abs(nextY-control2Y)*(control2X-curX)/(control2Y-curY);control2Y=nextY}
return{x1:control1X,y1:control1Y,x2:control2X,y2:control2Y}},smooth:function(dataX,dataY,value){var ln=dataX.length,prevX,prevY,curX,curY,nextX,nextY,x,y,smoothX=[],smoothY=[],i,anchors;for(i=0;i<ln-1;i++){prevX=dataX[i];prevY=dataY[i];if(i===0){x=prevX;y=prevY;smoothX.push(x);smoothY.push(y);if(ln===1){break}}
curX=dataX[i+1];curY=dataY[i+1];nextX=dataX[i+2];nextY=dataY[i+2];if(!(Ext.isNumber(nextX)&&Ext.isNumber(nextY))){smoothX.push(x,curX,curX);smoothY.push(y,curY,curY);break}
anchors=this.getAnchors(prevX,prevY,curX,curY,nextX,nextY,value);smoothX.push(x,anchors.x1,curX);smoothY.push(y,anchors.y1,curY);x=anchors.x2;y=anchors.y2}
return{smoothX:smoothX,smoothY:smoothY}},beginUpdateIOS:Ext.os.is.iOS?function(){this.iosUpdateEl=Ext.getBody().createChild({'data-sticky':!0,style:'position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; '+'background: rgba(0,0,0,0.001); z-index: 100000'})}:Ext.emptyFn,endUpdateIOS:function(){this.iosUpdateEl=Ext.destroy(this.iosUpdateEl)}})
;
Ext.define('Ext.draw.gradient.Gradient',{requires:['Ext.draw.Color'],isGradient:!0,config:{stops:[]},applyStops:function(newStops){var stops=[],ln=newStops.length,i,stop,color;for(i=0;i<ln;i++){stop=newStops[i];color=stop.color;if(!(color&&color.isColor)){color=Ext.util.Color.fly(color||Ext.util.Color.NONE)}
stops.push({offset:Math.min(1,Math.max(0,'offset' in stop?stop.offset:stop.position||0)),color:color.toString()})}
stops.sort(function(a,b){return a.offset-b.offset});return stops},onClassExtended:function(subClass,member){if(!member.alias&&member.type){member.alias='gradient.'+member.type}},constructor:function(config){this.initConfig(config)},generateGradient:Ext.emptyFn})
;
Ext.define('Ext.draw.gradient.GradientDefinition',{singleton:!0,urlStringRe:/^url\(#([\w-]+)\)$/,gradients:{},add:function(gradients){var store=this.gradients,i,n,gradient;for(i=0,n=gradients.length;i<n;i++){gradient=gradients[i];if(Ext.isString(gradient.id)){store[gradient.id]=gradient}}},get:function(str){var store=this.gradients,match=str.match(this.urlStringRe),gradient;if(match&&match[1]&&(gradient=store[match[1]])){return gradient||str}
return str}})
;
Ext.define('Ext.draw.sprite.AttributeParser',{singleton:!0,attributeRe:/^url\(#([a-zA-Z-]+)\)$/,requires:['Ext.draw.Color','Ext.draw.gradient.GradientDefinition'],'default':Ext.identityFn,string:function(n){return String(n)},number:function(n){if(Ext.isNumber(+n)){return n}},angle:function(n){if(Ext.isNumber(n)){n%=Math.PI*2;if(n<-Math.PI){n+=Math.PI*2}else if(n>=Math.PI){n-=Math.PI*2}
return n}},data:function(n){if(Ext.isArray(n)){return n.slice()}else if(n instanceof Float32Array){return new Float32Array(n)}},bool:function(n){return!!n},color:function(n){if(n&&n.isColor){return n.toString()}else if(n&&n.isGradient){return n}else if(!n){return Ext.util.Color.NONE}else if(Ext.isString(n)){if(n.substr(0,3)==='url'){n=Ext.draw.gradient.GradientDefinition.get(n);if(Ext.isString(n)){return n}}else{return Ext.util.Color.fly(n).toString()}}
if(n.type==='linear'){return Ext.create('Ext.draw.gradient.Linear',n)}else if(n.type==='radial'){return Ext.create('Ext.draw.gradient.Radial',n)}else if(n.type==='pattern'){return Ext.create('Ext.draw.gradient.Pattern',n)}else{return Ext.util.Color.NONE}},limited:function(low,hi){return function(n){n=+n;return Ext.isNumber(n)?Math.min(Math.max(n,low),hi):undefined}},limited01:function(n){n=+n;return Ext.isNumber(n)?Math.min(Math.max(n,0),1):undefined},enums:function(){var enums={},args=Array.prototype.slice.call(arguments,0),i,ln;for(i=0,ln=args.length;i<ln;i++){enums[args[i]]=!0}
return function(n){return n in enums?n:undefined}}})
;
Ext.define('Ext.draw.sprite.AttributeDefinition',{requires:['Ext.draw.sprite.AttributeParser','Ext.draw.sprite.AnimationParser'],config:{defaults:{$value:{},lazy:!0},aliases:{},animationProcessors:{},processors:{$value:{},lazy:!0},dirtyTriggers:{},triggers:{},updaters:{}},inheritableStatics:{processorFactoryRe:/^(\w+)\(([\w\-,]*)\)$/},spriteClass:null,constructor:function(config){var me=this;me.initConfig(config)},applyDefaults:function(defaults,oldDefaults){oldDefaults=Ext.apply(oldDefaults||{},this.normalize(defaults));return oldDefaults},applyAliases:function(aliases,oldAliases){return Ext.apply(oldAliases||{},aliases)},applyProcessors:function(processors,oldProcessors){this.getAnimationProcessors();var result=oldProcessors||{},defaultProcessor=Ext.draw.sprite.AttributeParser,processorFactoryRe=this.self.processorFactoryRe,animationProcessors={},anyAnimationProcessors,name,match,fn;for(name in processors){fn=processors[name];if(typeof fn==='string'){match=fn.match(processorFactoryRe);if(match){fn=defaultProcessor[match[1]].apply(defaultProcessor,match[2].split(','))}else if(defaultProcessor[fn]){animationProcessors[name]=fn;anyAnimationProcessors=!0;fn=defaultProcessor[fn]}}
if(!Ext.isFunction(fn)){Ext.raise(this.spriteClass.$className+": processor '"+name+"' has not been found.")}
result[name]=fn}
if(anyAnimationProcessors){this.setAnimationProcessors(animationProcessors)}
return result},applyAnimationProcessors:function(animationProcessors,oldAnimationProcessors){var parser=Ext.draw.sprite.AnimationParser,name,item;if(!oldAnimationProcessors){oldAnimationProcessors={}}
for(name in animationProcessors){item=animationProcessors[name];if(item==='none'){oldAnimationProcessors[name]=null}else if(Ext.isString(item)&&!(name in oldAnimationProcessors)){if(item in parser){while(Ext.isString(parser[item])){item=parser[item]}
oldAnimationProcessors[name]=parser[item]}}else if(Ext.isObject(item)){oldAnimationProcessors[name]=item}}
return oldAnimationProcessors},updateDirtyTriggers:function(dirtyTriggers){this.setTriggers(dirtyTriggers)},applyTriggers:function(triggers,oldTriggers){var name;if(!oldTriggers){oldTriggers={}}
for(name in triggers){oldTriggers[name]=triggers[name].split(',')}
return oldTriggers},applyUpdaters:function(updaters,oldUpdaters){return Ext.apply(oldUpdaters||{},updaters)},batchedNormalize:function(batchedChanges,keepUnrecognized){if(!batchedChanges){return{}}
var processors=this.getProcessors(),aliases=this.getAliases(),translation=batchedChanges.translation||batchedChanges.translate,normalized={},i,ln,name,val,rotation,scaling,matrix,subVal,split;if('rotation' in batchedChanges){rotation=batchedChanges.rotation}else{rotation=('rotate' in batchedChanges)?batchedChanges.rotate:undefined}
if('scaling' in batchedChanges){scaling=batchedChanges.scaling}else{scaling=('scale' in batchedChanges)?batchedChanges.scale:undefined}
if(typeof scaling!=='undefined'){if(Ext.isNumber(scaling)){normalized.scalingX=scaling;normalized.scalingY=scaling}else{if('x' in scaling){normalized.scalingX=scaling.x}
if('y' in scaling){normalized.scalingY=scaling.y}
if('centerX' in scaling){normalized.scalingCenterX=scaling.centerX}
if('centerY' in scaling){normalized.scalingCenterY=scaling.centerY}}}
if(typeof rotation!=='undefined'){if(Ext.isNumber(rotation)){rotation=Ext.draw.Draw.rad(rotation);normalized.rotationRads=rotation}else{if('rads' in rotation){normalized.rotationRads=rotation.rads}else if('degrees' in rotation){if(Ext.isArray(rotation.degrees)){normalized.rotationRads=Ext.Array.map(rotation.degrees,function(deg){return Ext.draw.Draw.rad(deg)})}else{normalized.rotationRads=Ext.draw.Draw.rad(rotation.degrees)}}
if('centerX' in rotation){normalized.rotationCenterX=rotation.centerX}
if('centerY' in rotation){normalized.rotationCenterY=rotation.centerY}}}
if(typeof translation!=='undefined'){if('x' in translation){normalized.translationX=translation.x}
if('y' in translation){normalized.translationY=translation.y}}
if('matrix' in batchedChanges){matrix=Ext.draw.Matrix.create(batchedChanges.matrix);split=matrix.split();normalized.matrix=matrix;normalized.rotationRads=split.rotation;normalized.rotationCenterX=0;normalized.rotationCenterY=0;normalized.scalingX=split.scaleX;normalized.scalingY=split.scaleY;normalized.scalingCenterX=0;normalized.scalingCenterY=0;normalized.translationX=split.translateX;normalized.translationY=split.translateY}
for(name in batchedChanges){val=batchedChanges[name];if(typeof val==='undefined'){continue}else if(Ext.isArray(val)){if(name in aliases){name=aliases[name]}
if(name in processors){normalized[name]=[];for(i=0,ln=val.length;i<ln;i++){subVal=processors[name].call(this,val[i]);if(typeof subVal!=='undefined'){normalized[name][i]=subVal}}}else if(keepUnrecognized){normalized[name]=val}}else{if(name in aliases){name=aliases[name]}
if(name in processors){val=processors[name].call(this,val);if(typeof val!=='undefined'){normalized[name]=val}}else if(keepUnrecognized){normalized[name]=val}}}
return normalized},normalize:function(changes,keepUnrecognized){if(!changes){return{}}
var processors=this.getProcessors(),aliases=this.getAliases(),translation=changes.translation||changes.translate,normalized={},name,val,rotation,scaling,matrix,split;if('rotation' in changes){rotation=changes.rotation}else{rotation=('rotate' in changes)?changes.rotate:undefined}
if('scaling' in changes){scaling=changes.scaling}else{scaling=('scale' in changes)?changes.scale:undefined}
if(translation){if('x' in translation){normalized.translationX=translation.x}
if('y' in translation){normalized.translationY=translation.y}}
if(typeof scaling!=='undefined'){if(Ext.isNumber(scaling)){normalized.scalingX=scaling;normalized.scalingY=scaling}else{if('x' in scaling){normalized.scalingX=scaling.x}
if('y' in scaling){normalized.scalingY=scaling.y}
if('centerX' in scaling){normalized.scalingCenterX=scaling.centerX}
if('centerY' in scaling){normalized.scalingCenterY=scaling.centerY}}}
if(typeof rotation!=='undefined'){if(Ext.isNumber(rotation)){rotation=Ext.draw.Draw.rad(rotation);normalized.rotationRads=rotation}else{if('rads' in rotation){normalized.rotationRads=rotation.rads}else if('degrees' in rotation){normalized.rotationRads=Ext.draw.Draw.rad(rotation.degrees)}
if('centerX' in rotation){normalized.rotationCenterX=rotation.centerX}
if('centerY' in rotation){normalized.rotationCenterY=rotation.centerY}}}
if('matrix' in changes){matrix=Ext.draw.Matrix.create(changes.matrix);split=matrix.split();normalized.matrix=matrix;normalized.rotationRads=split.rotation;normalized.rotationCenterX=0;normalized.rotationCenterY=0;normalized.scalingX=split.scaleX;normalized.scalingY=split.scaleY;normalized.scalingCenterX=0;normalized.scalingCenterY=0;normalized.translationX=split.translateX;normalized.translationY=split.translateY}
for(name in changes){val=changes[name];if(typeof val==='undefined'){continue}
if(name in aliases){name=aliases[name]}
if(name in processors){val=processors[name].call(this,val);if(typeof val!=='undefined'){normalized[name]=val}}else if(keepUnrecognized){normalized[name]=val}}
return normalized},setBypassingNormalization:function(attr,modifierStack,changes){return modifierStack.pushDown(attr,changes)},set:function(attr,modifierStack,changes){changes=this.normalize(changes);return this.setBypassingNormalization(attr,modifierStack,changes)}})
;
Ext.define('Ext.draw.Matrix',{isMatrix:!0,statics:{createAffineMatrixFromTwoPair:function(x0,y0,x1,y1,x0p,y0p,x1p,y1p){var dx=x1-x0,dy=y1-y0,dxp=x1p-x0p,dyp=y1p-y0p,r=1/(dx*dx+dy*dy),a=dx*dxp+dy*dyp,b=dxp*dy-dx*dyp,c=-a*x0-b*y0,f=b*x0-a*y0;return new this(a*r,-b*r,b*r,a*r,c*r+x0p,f*r+y0p)},createPanZoomFromTwoPair:function(x0,y0,x1,y1,x0p,y0p,x1p,y1p){if(arguments.length===2){return this.createPanZoomFromTwoPair.apply(this,x0.concat(y0))}
var dx=x1-x0,dy=y1-y0,cx=(x0+x1)*0.5,cy=(y0+y1)*0.5,dxp=x1p-x0p,dyp=y1p-y0p,cxp=(x0p+x1p)*0.5,cyp=(y0p+y1p)*0.5,r=dx*dx+dy*dy,rp=dxp*dxp+dyp*dyp,scale=Math.sqrt(rp/r);return new this(scale,0,0,scale,cxp-scale*cx,cyp-scale*cy)},fly:(function(){var flyMatrix=null,simplefly=function(elements){flyMatrix.elements=elements;return flyMatrix};return function(elements){if(!flyMatrix){flyMatrix=new Ext.draw.Matrix()}
flyMatrix.elements=elements;Ext.draw.Matrix.fly=simplefly;return flyMatrix}})(),create:function(mat){if(mat instanceof this){return mat}
return new this(mat)}},constructor:function(xx,xy,yx,yy,dx,dy){if(xx&&xx.length===6){this.elements=xx.slice()}else if(xx!==undefined){this.elements=[xx,xy,yx,yy,dx,dy]}else{this.elements=[1,0,0,1,0,0]}},prepend:function(xx,xy,yx,yy,dx,dy){var elements=this.elements,xx0=elements[0],xy0=elements[1],yx0=elements[2],yy0=elements[3],dx0=elements[4],dy0=elements[5];elements[0]=xx*xx0+yx*xy0;elements[1]=xy*xx0+yy*xy0;elements[2]=xx*yx0+yx*yy0;elements[3]=xy*yx0+yy*yy0;elements[4]=xx*dx0+yx*dy0+dx;elements[5]=xy*dx0+yy*dy0+dy;return this},prependMatrix:function(matrix){return this.prepend.apply(this,matrix.elements)},append:function(xx,xy,yx,yy,dx,dy){var elements=this.elements,xx0=elements[0],xy0=elements[1],yx0=elements[2],yy0=elements[3],dx0=elements[4],dy0=elements[5];elements[0]=xx*xx0+xy*yx0;elements[1]=xx*xy0+xy*yy0;elements[2]=yx*xx0+yy*yx0;elements[3]=yx*xy0+yy*yy0;elements[4]=dx*xx0+dy*yx0+dx0;elements[5]=dx*xy0+dy*yy0+dy0;return this},appendMatrix:function(matrix){return this.append.apply(this,matrix.elements)},set:function(xx,xy,yx,yy,dx,dy){var elements=this.elements;elements[0]=xx;elements[1]=xy;elements[2]=yx;elements[3]=yy;elements[4]=dx;elements[5]=dy;return this},inverse:function(target){var elements=this.elements,a=elements[0],b=elements[1],c=elements[2],d=elements[3],e=elements[4],f=elements[5],rDim=1/(a*d-b*c);a*=rDim;b*=rDim;c*=rDim;d*=rDim;if(target){target.set(d,-b,-c,a,c*f-d*e,b*e-a*f);return target}else{return new Ext.draw.Matrix(d,-b,-c,a,c*f-d*e,b*e-a*f)}},translate:function(x,y,prepend){if(prepend){return this.prepend(1,0,0,1,x,y)}else{return this.append(1,0,0,1,x,y)}},scale:function(sx,sy,scx,scy,prepend){var me=this;if(sy==null){sy=sx}
if(scx===undefined){scx=0}
if(scy===undefined){scy=0}
if(prepend){return me.prepend(sx,0,0,sy,scx-scx*sx,scy-scy*sy)}else{return me.append(sx,0,0,sy,scx-scx*sx,scy-scy*sy)}},rotate:function(angle,rcx,rcy,prepend){var me=this,cos=Math.cos(angle),sin=Math.sin(angle);rcx=rcx||0;rcy=rcy||0;if(prepend){return me.prepend(cos,sin,-sin,cos,rcx-cos*rcx+rcy*sin,rcy-cos*rcy-rcx*sin)}else{return me.append(cos,sin,-sin,cos,rcx-cos*rcx+rcy*sin,rcy-cos*rcy-rcx*sin)}},rotateFromVector:function(x,y,prepend){var me=this,d=Math.sqrt(x*x+y*y),cos=x/d,sin=y/d;if(prepend){return me.prepend(cos,sin,-sin,cos,0,0)}else{return me.append(cos,sin,-sin,cos,0,0)}},clone:function(){return new Ext.draw.Matrix(this.elements)},flipX:function(){return this.append(-1,0,0,1,0,0)},flipY:function(){return this.append(1,0,0,-1,0,0)},skewX:function(angle){return this.append(1,0,Math.tan(angle),1,0,0)},skewY:function(angle){return this.append(1,Math.tan(angle),0,1,0,0)},shearX:function(factor){return this.append(1,0,factor,1,0,0)},shearY:function(factor){return this.append(1,factor,0,1,0,0)},reset:function(){return this.set(1,0,0,1,0,0)},precisionCompensate:function(devicePixelRatio,comp){var elements=this.elements,x2x=elements[0],x2y=elements[1],y2x=elements[2],y2y=elements[3],newDx=elements[4],newDy=elements[5],r=x2y*y2x-x2x*y2y;comp.b=devicePixelRatio*x2y/x2x;comp.c=devicePixelRatio*y2x/y2y;comp.d=devicePixelRatio;comp.xx=x2x/devicePixelRatio;comp.yy=y2y/devicePixelRatio;comp.dx=(newDy*x2x*y2x-newDx*x2x*y2y)/r/devicePixelRatio;comp.dy=(newDx*x2y*y2y-newDy*x2x*y2y)/r/devicePixelRatio},precisionCompensateRect:function(devicePixelRatio,comp){var elements=this.elements,x2x=elements[0],x2y=elements[1],y2x=elements[2],y2y=elements[3],newDx=elements[4],newDy=elements[5],yxOnXx=y2x/x2x;comp.b=devicePixelRatio*x2y/x2x;comp.c=devicePixelRatio*yxOnXx;comp.d=devicePixelRatio*y2y/x2x;comp.xx=x2x/devicePixelRatio;comp.yy=x2x/devicePixelRatio;comp.dx=(newDy*y2x-newDx*y2y)/(x2y*yxOnXx-y2y)/devicePixelRatio;comp.dy=-(newDy*x2x-newDx*x2y)/(x2y*yxOnXx-y2y)/devicePixelRatio},x:function(x,y){var elements=this.elements;return x*elements[0]+y*elements[2]+elements[4]},y:function(x,y){var elements=this.elements;return x*elements[1]+y*elements[3]+elements[5]},get:function(i,j){return+this.elements[i+j*2].toFixed(4)},transformPoint:function(point){var elements=this.elements,x,y;if(point.isPoint){x=point.x;y=point.y}else{x=point[0];y=point[1]}
return[x*elements[0]+y*elements[2]+elements[4],x*elements[1]+y*elements[3]+elements[5]]},transformBBox:function(bbox,radius,target){var elements=this.elements,l=bbox.x,t=bbox.y,w0=bbox.width*0.5,h0=bbox.height*0.5,xx=elements[0],xy=elements[1],yx=elements[2],yy=elements[3],cx=l+w0,cy=t+h0,w,h,scales;if(radius){w0-=radius;h0-=radius;scales=[Math.sqrt(elements[0]*elements[0]+elements[2]*elements[2]),Math.sqrt(elements[1]*elements[1]+elements[3]*elements[3])];w=Math.abs(w0*xx)+Math.abs(h0*yx)+Math.abs(scales[0]*radius);h=Math.abs(w0*xy)+Math.abs(h0*yy)+Math.abs(scales[1]*radius)}else{w=Math.abs(w0*xx)+Math.abs(h0*yx);h=Math.abs(w0*xy)+Math.abs(h0*yy)}
if(!target){target={}}
target.x=cx*xx+cy*yx+elements[4]-w;target.y=cx*xy+cy*yy+elements[5]-h;target.width=w+w;target.height=h+h;return target},transformList:function(list){var elements=this.elements,xx=elements[0],yx=elements[2],dx=elements[4],xy=elements[1],yy=elements[3],dy=elements[5],ln=list.length,p,i;for(i=0;i<ln;i++){p=list[i];list[i]=[p[0]*xx+p[1]*yx+dx,p[0]*xy+p[1]*yy+dy]}
return list},isIdentity:function(){var elements=this.elements;return elements[0]===1&&elements[1]===0&&elements[2]===0&&elements[3]===1&&elements[4]===0&&elements[5]===0},isEqual:function(matrix){var elements=matrix&&matrix.isMatrix?matrix.elements:matrix,myElements=this.elements;return myElements[0]===elements[0]&&myElements[1]===elements[1]&&myElements[2]===elements[2]&&myElements[3]===elements[3]&&myElements[4]===elements[4]&&myElements[5]===elements[5]},equals:function(matrix){return this.isEqual(matrix)},toArray:function(){var elements=this.elements;return[elements[0],elements[2],elements[4],elements[1],elements[3],elements[5]]},toVerticalArray:function(){return this.elements.slice()},toString:function(){var me=this;return[me.get(0,0),me.get(0,1),me.get(1,0),me.get(1,1),me.get(2,0),me.get(2,1)].join(',')},toContext:function(ctx){ctx.transform.apply(ctx,this.elements);return this},toSvg:function(){var elements=this.elements;return"matrix("+elements[0].toFixed(9)+','+elements[1].toFixed(9)+','+elements[2].toFixed(9)+','+elements[3].toFixed(9)+','+elements[4].toFixed(9)+','+elements[5].toFixed(9)+")"},getScaleX:function(){var elements=this.elements;return Math.sqrt(elements[0]*elements[0]+elements[2]*elements[2])},getScaleY:function(){var elements=this.elements;return Math.sqrt(elements[1]*elements[1]+elements[3]*elements[3])},getXX:function(){return this.elements[0]},getXY:function(){return this.elements[1]},getYX:function(){return this.elements[2]},getYY:function(){return this.elements[3]},getDX:function(){return this.elements[4]},getDY:function(){return this.elements[5]},split:function(){var el=this.elements,xx=el[0],xy=el[1],yy=el[3],out={translateX:el[4],translateY:el[5]};out.rotate=out.rotation=Math.atan2(xy,xx);out.scaleX=xx/Math.cos(out.rotate);out.scaleY=yy/xx*out.scaleX;return out}},function(){function registerName(properties,name,i){properties[name]={get:function(){return this.elements[i]},set:function(val){this.elements[i]=val}}}
if(Object.defineProperties){var properties={};registerName(properties,'a',0);registerName(properties,'b',1);registerName(properties,'c',2);registerName(properties,'d',3);registerName(properties,'e',4);registerName(properties,'f',5);Object.defineProperties(this.prototype,properties)}
this.prototype.multiply=this.prototype.appendMatrix})
;
Ext.define('Ext.draw.modifier.Modifier',{isModifier:!0,mixins:{observable:'Ext.mixin.Observable'},config:{lower:null,upper:null,sprite:null},constructor:function(config){this.mixins.observable.constructor.call(this,config)},updateUpper:function(upper){if(upper){upper.setLower(this)}},updateLower:function(lower){if(lower){lower.setUpper(this)}},prepareAttributes:function(attr){if(this._lower){this._lower.prepareAttributes(attr)}},popUp:function(attr,changes){if(this._upper){this._upper.popUp(attr,changes)}else{Ext.apply(attr,changes)}},filterChanges:function(attr,changes,receiver){var targets=attr.targets,name,value;if(receiver){for(name in changes){value=changes[name];if(value!==attr[name]||(targets&&value!==targets[name])){receiver[name]=value}}}else{for(name in changes){value=changes[name];if(value===attr[name]&&(!targets||value===targets[name])){delete changes[name]}}}
return receiver||changes},pushDown:function(attr,changes){return this._lower?this._lower.pushDown(attr,changes):this.filterChanges(attr,changes)}})
;
Ext.define('Ext.draw.modifier.Target',{requires:['Ext.draw.Matrix'],extend:'Ext.draw.modifier.Modifier',alias:'modifier.target',statics:{uniqueId:0},prepareAttributes:function(attr){if(this._lower){this._lower.prepareAttributes(attr)}
attr.attributeId='attribute-'+Ext.draw.modifier.Target.uniqueId++;if(!attr.hasOwnProperty('canvasAttributes')){attr.bbox={plain:{dirty:!0},transform:{dirty:!0}};attr.dirty=!0;attr.pendingUpdaters={};attr.canvasAttributes={};attr.matrix=new Ext.draw.Matrix();attr.inverseMatrix=new Ext.draw.Matrix()}},applyChanges:function(attr,changes){Ext.apply(attr,changes);var sprite=this.getSprite(),pendingUpdaters=attr.pendingUpdaters,triggers=sprite.self.def.getTriggers(),updaters,instances,instance,name,hasChanges,canvasAttributes,i,j,ln;for(name in changes){hasChanges=!0;if((updaters=triggers[name])){sprite.scheduleUpdaters(attr,updaters,[name])}
if(attr.template&&changes.removeFromInstance&&changes.removeFromInstance[name]){delete attr[name]}}
if(!hasChanges){return}
if(pendingUpdaters.canvas){canvasAttributes=pendingUpdaters.canvas;delete pendingUpdaters.canvas;for(i=0,ln=canvasAttributes.length;i<ln;i++){name=canvasAttributes[i];attr.canvasAttributes[name]=attr[name]}}
if(attr.hasOwnProperty('children')){instances=attr.children;for(i=0,ln=instances.length;i<ln;i++){instance=instances[i];Ext.apply(instance.pendingUpdaters,pendingUpdaters);if(canvasAttributes){for(j=0;j<canvasAttributes.length;j++){name=canvasAttributes[j];instance.canvasAttributes[name]=instance[name]}}
sprite.callUpdaters(instance)}}
sprite.setDirty(!0);sprite.callUpdaters(attr)},popUp:function(attr,changes){this.applyChanges(attr,changes)},pushDown:function(attr,changes){if(this._lower){changes=this._lower.pushDown(attr,changes)}
this.applyChanges(attr,changes);return changes}})
;
Ext.define('Ext.draw.TimingFunctions',function(){var pow=Math.pow,sin=Math.sin,cos=Math.cos,sqrt=Math.sqrt,pi=Math.PI,poly=['quad','cube','quart','quint'],easings={pow:function(p,x){return pow(p,x||6)},expo:function(p){return pow(2,8*(p-1))},circ:function(p){return 1-sqrt(1-p*p)},sine:function(p){return 1-sin((1-p)*pi/2)},back:function(p,n){n=n||1.616;return p*p*((n+1)*p-n)},bounce:function(p){var a,b;for(a=0,b=1;1;a+=b,b/=2){if(p>=(7-4*a)/11){return b*b-pow((11-6*a-11*p)/4,2)}}},elastic:function(p,x){return pow(2,10*--p)*cos(20*p*pi*(x||1)/3)}},easingsMap={},name,len,i;function createPoly(times){return function(p){return pow(p,times)}}
function addEasing(name,easing){easingsMap[name+'In']=function(pos){return easing(pos)};easingsMap[name+'Out']=function(pos){return 1-easing(1-pos)};easingsMap[name+'InOut']=function(pos){return(pos<=0.5)?easing(2*pos)/2:(2-easing(2*(1-pos)))/2}}
for(i=0,len=poly.length;i<len;++i){easings[poly[i]]=createPoly(i+2)}
for(name in easings){addEasing(name,easings[name])}
easingsMap.linear=Ext.identityFn;easingsMap.easeIn=easingsMap.quadIn;easingsMap.easeOut=easingsMap.quadOut;easingsMap.easeInOut=easingsMap.quadInOut;return{singleton:!0,easingMap:easingsMap}},function(Cls){Ext.apply(Cls,Cls.easingMap)})
;
Ext.define('Ext.draw.Animator',{uses:['Ext.draw.Draw'],singleton:!0,frameCallbacks:{},frameCallbackId:0,scheduled:0,frameStartTimeOffset:Ext.now(),animations:[],running:!1,animationTime:function(){return Ext.AnimationQueue.frameStartTime-this.frameStartTimeOffset},add:function(animation){var me=this;if(!me.contains(animation)){me.animations.push(animation);me.ignite();if('fireEvent' in animation){animation.fireEvent('animationstart',animation)}}},remove:function(animation){var me=this,animations=me.animations,i=0,l=animations.length;for(;i<l;++i){if(animations[i]===animation){animations.splice(i,1);if('fireEvent' in animation){animation.fireEvent('animationend',animation)}
return}}},contains:function(animation){return Ext.Array.indexOf(this.animations,animation)>-1},empty:function(){return this.animations.length===0},idle:function(){return this.scheduled===0&&this.animations.length===0},step:function(frameTime){var me=this,animations=me.animations,animation,i=0,ln=animations.length;for(;i<ln;i++){animation=animations[i];animation.step(frameTime);if(!animation.animating){animations.splice(i,1);i--;ln--;if(animation.fireEvent){animation.fireEvent('animationend',animation)}}}},schedule:function(callback,scope){var id='frameCallback'+(this.frameCallbackId++);scope=scope||this;if(Ext.isString(callback)){callback=scope[callback]}
Ext.draw.Animator.frameCallbacks[id]={fn:callback,scope:scope,once:!0};this.scheduled++;Ext.draw.Animator.ignite();return id},scheduleIf:function(callback,scope){var frameCallbacks=Ext.draw.Animator.frameCallbacks,cb,id;scope=scope||this;if(Ext.isString(callback)){callback=scope[callback]}
for(id in frameCallbacks){cb=frameCallbacks[id];if(cb.once&&cb.fn===callback&&cb.scope===scope){return null}}
return this.schedule(callback,scope)},cancel:function(id){if(Ext.draw.Animator.frameCallbacks[id]&&Ext.draw.Animator.frameCallbacks[id].once){this.scheduled=Math.max(--this.scheduled,0);delete Ext.draw.Animator.frameCallbacks[id];Ext.draw.Draw.endUpdateIOS()}
if(this.idle()){this.extinguish()}},clear:function(){this.animations.length=0;Ext.draw.Animator.frameCallbacks={};this.extinguish()},addFrameCallback:function(callback,scope){var id='frameCallback'+(this.frameCallbackId++);scope=scope||this;if(Ext.isString(callback)){callback=scope[callback]}
Ext.draw.Animator.frameCallbacks[id]={fn:callback,scope:scope};return id},removeFrameCallback:function(id){delete Ext.draw.Animator.frameCallbacks[id];if(this.idle()){this.extinguish()}},fireFrameCallbacks:function(){var callbacks=this.frameCallbacks,id,fn,cb;for(id in callbacks){cb=callbacks[id];fn=cb.fn;if(Ext.isString(fn)){fn=cb.scope[fn]}
fn.call(cb.scope);if(callbacks[id]&&cb.once){this.scheduled=Math.max(--this.scheduled,0);delete callbacks[id]}}},handleFrame:function(){var me=this;me.step(me.animationTime());me.fireFrameCallbacks();if(me.idle()){me.extinguish()}},ignite:function(){if(!this.running){this.running=!0;Ext.AnimationQueue.start(this.handleFrame,this);Ext.draw.Draw.beginUpdateIOS()}},extinguish:function(){this.running=!1;Ext.AnimationQueue.stop(this.handleFrame,this);Ext.draw.Draw.endUpdateIOS()}})
;
Ext.define('Ext.draw.modifier.Animation',{extend:'Ext.draw.modifier.Modifier',alias:'modifier.animation',requires:['Ext.draw.TimingFunctions','Ext.draw.Animator'],config:{easing:Ext.identityFn,duration:0,customEasings:{},customDurations:{}},constructor:function(config){var me=this;me.anyAnimation=me.anySpecialAnimations=!1;me.animating=0;me.animatingPool=[];me.callParent([config])},prepareAttributes:function(attr){if(!attr.hasOwnProperty('timers')){attr.animating=!1;attr.timers={};attr.targets=Ext.Object.chain(attr);attr.targets.prototype=attr}
if(this._lower){this._lower.prepareAttributes(attr.targets)}},updateSprite:function(sprite){this.setConfig(sprite.config.animation)},updateDuration:function(duration){this.anyAnimation=duration>0},applyEasing:function(easing){if(typeof easing==='string'){easing=Ext.draw.TimingFunctions.easingMap[easing]}
return easing},applyCustomEasings:function(newEasings,oldEasings){var any,key,attrs,easing,i,ln;oldEasings=oldEasings||{};for(key in newEasings){any=!0;easing=newEasings[key];attrs=key.split(',');if(typeof easing==='string'){easing=Ext.draw.TimingFunctions.easingMap[easing]}
for(i=0,ln=attrs.length;i<ln;i++){oldEasings[attrs[i]]=easing}}
if(any){this.anySpecialAnimations=any}
return oldEasings},setEasingOn:function(attrs,easing){var customEasings={},i,ln;attrs=Ext.Array.from(attrs).slice();for(i=0,ln=attrs.length;i<ln;i++){customEasings[attrs[i]]=easing}
this.setCustomEasings(customEasings)},clearEasingOn:function(attrs){var i,ln;attrs=Ext.Array.from(attrs,!0);for(i=0,ln=attrs.length;i<ln;i++){delete this._customEasings[attrs[i]]}},applyCustomDurations:function(newDurations,oldDurations){var any,key,duration,attrs,i,ln;oldDurations=oldDurations||{};for(key in newDurations){any=!0;duration=newDurations[key];attrs=key.split(',');for(i=0,ln=attrs.length;i<ln;i++){oldDurations[attrs[i]]=duration}}
if(any){this.anySpecialAnimations=any}
return oldDurations},setDurationOn:function(attrs,duration){var customDurations={},i,ln;attrs=Ext.Array.from(attrs).slice();for(i=0,ln=attrs.length;i<ln;i++){customDurations[attrs[i]]=duration}
this.setCustomDurations(customDurations)},clearDurationOn:function(attrs){var i,ln;attrs=Ext.Array.from(attrs,!0);for(i=0,ln=attrs.length;i<ln;i++){delete this._customDurations[attrs[i]]}},setAnimating:function(attr,animating){var me=this,pool=me.animatingPool,i;if(attr.animating!==animating){attr.animating=animating;if(animating){pool.push(attr);if(me.animating===0){Ext.draw.Animator.add(me)}
me.animating++}else{for(i=pool.length;i--;){if(pool[i]===attr){pool.splice(i,1)}}
me.animating=pool.length}}},setAttrs:function(attr,changes){var me=this,timers=attr.timers,parsers=me._sprite.self.def._animationProcessors,defaultEasing=me._easing,defaultDuration=me._duration,customDurations=me._customDurations,customEasings=me._customEasings,anySpecial=me.anySpecialAnimations,any=me.anyAnimation||anySpecial,targets=attr.targets,ignite=!1,timer,name,newValue,startValue,parser,easing,duration,initial;if(!any){for(name in changes){if(attr[name]===changes[name]){delete changes[name]}else{attr[name]=changes[name]}
delete targets[name];delete timers[name]}
return changes}else{for(name in changes){newValue=changes[name];startValue=attr[name];if(newValue!==startValue&&startValue!==undefined&&startValue!==null&&(parser=parsers[name])){easing=defaultEasing;duration=defaultDuration;if(anySpecial){if(name in customEasings){easing=customEasings[name]}
if(name in customDurations){duration=customDurations[name]}}
if(startValue&&startValue.isGradient||newValue&&newValue.isGradient){duration=0}
if(duration){if(!timers[name]){timers[name]={}}
timer=timers[name];timer.start=0;timer.easing=easing;timer.duration=duration;timer.compute=parser.compute;timer.serve=parser.serve||Ext.identityFn;timer.remove=changes.removeFromInstance&&changes.removeFromInstance[name];if(parser.parseInitial){initial=parser.parseInitial(startValue,newValue);timer.source=initial[0];timer.target=initial[1]}else if(parser.parse){timer.source=parser.parse(startValue);timer.target=parser.parse(newValue)}else{timer.source=startValue;timer.target=newValue}
targets[name]=newValue;delete changes[name];ignite=!0;continue}else{delete targets[name]}}else{delete targets[name]}
delete timers[name]}}
if(ignite&&!attr.animating){me.setAnimating(attr,!0)}
return changes},updateAttributes:function(attr){if(!attr.animating){return{}}
var changes={},any=!1,timers=attr.timers,targets=attr.targets,now=Ext.draw.Animator.animationTime(),name,timer,delta;if(attr.lastUpdate===now){return null}
for(name in timers){timer=timers[name];if(!timer.start){timer.start=now;delta=0}else{delta=(now-timer.start)/timer.duration}
if(delta>=1){changes[name]=targets[name];delete targets[name];if(timers[name].remove){changes.removeFromInstance=changes.removeFromInstance||{};changes.removeFromInstance[name]=!0}
delete timers[name]}else{changes[name]=timer.serve(timer.compute(timer.source,timer.target,timer.easing(delta),attr[name]));any=!0}}
attr.lastUpdate=now;this.setAnimating(attr,any);return changes},pushDown:function(attr,changes){changes=this.callParent([attr.targets,changes]);return this.setAttrs(attr,changes)},popUp:function(attr,changes){attr=attr.prototype;changes=this.setAttrs(attr,changes);if(this._upper){return this._upper.popUp(attr,changes)}else{return Ext.apply(attr,changes)}},step:function(frameTime){var me=this,pool=me.animatingPool.slice(),ln=pool.length,i=0,attr,changes;for(;i<ln;i++){attr=pool[i];changes=me.updateAttributes(attr);if(changes&&me._upper){me._upper.popUp(attr,changes)}}},stop:function(){var me=this,pool=me.animatingPool,i,ln;this.step();for(i=0,ln=pool.length;i<ln;i++){pool[i].animating=!1}
me.animatingPool.length=0;me.animating=0;Ext.draw.Animator.remove(me)},destroy:function(){Ext.draw.Animator.remove(this);this.callParent()}})
;
Ext.define('Ext.draw.modifier.Highlight',{extend:'Ext.draw.modifier.Modifier',alias:'modifier.highlight',config:{enabled:!1,style:null},preFx:!0,applyStyle:function(style,oldStyle){oldStyle=oldStyle||{};if(this.getSprite()){Ext.apply(oldStyle,this.getSprite().self.def.normalize(style))}else{Ext.apply(oldStyle,style)}
return oldStyle},prepareAttributes:function(attr){if(!attr.hasOwnProperty('highlightOriginal')){attr.highlighted=!1;attr.highlightOriginal=Ext.Object.chain(attr);attr.highlightOriginal.prototype=attr;attr.highlightOriginal.removeFromInstance={}}
if(this._lower){this._lower.prepareAttributes(attr.highlightOriginal)}},updateSprite:function(sprite,oldSprite){var me=this,style=me.getStyle(),attributeDefinitions;if(sprite){attributeDefinitions=sprite.self.def;if(style){me._style=attributeDefinitions.normalize(style)}
me.setStyle(sprite.config.highlight);attributeDefinitions.setConfig({defaults:{highlighted:!1},processors:{highlighted:'bool'}})}
this.setSprite(sprite)},filterChanges:function(attr,changes){var me=this,highlightOriginal=attr.highlightOriginal,style=me.getStyle(),name;if(attr.highlighted){for(name in changes){if(style.hasOwnProperty(name)){highlightOriginal[name]=changes[name];delete changes[name]}}}
return changes},pushDown:function(attr,changes){var style=this.getStyle(),highlightOriginal=attr.highlightOriginal,removeFromInstance=highlightOriginal.removeFromInstance,highlighted,name,tplAttr,timer;if(changes.hasOwnProperty('highlighted')){highlighted=changes.highlighted;delete changes.highlighted;if(this._lower){changes=this._lower.pushDown(highlightOriginal,changes)}
changes=this.filterChanges(attr,changes);if(highlighted!==attr.highlighted){if(highlighted){for(name in style){if(name in changes){highlightOriginal[name]=changes[name]}else{tplAttr=attr.template&&attr.template.ownAttr;if(tplAttr&&!attr.prototype.hasOwnProperty(name)){removeFromInstance[name]=!0;highlightOriginal[name]=tplAttr.targets[name]}else{timer=highlightOriginal.timers[name];if(timer&&timer.remove){removeFromInstance[name]=!0}
highlightOriginal[name]=attr[name]}}
if(highlightOriginal[name]!==style[name]){changes[name]=style[name]}}}else{for(name in style){if(!(name in changes)){changes[name]=highlightOriginal[name]}
delete highlightOriginal[name]}
changes.removeFromInstance=changes.removeFromInstance||{};Ext.apply(changes.removeFromInstance,removeFromInstance);highlightOriginal.removeFromInstance={}}
changes.highlighted=highlighted}}else{if(this._lower){changes=this._lower.pushDown(highlightOriginal,changes)}
changes=this.filterChanges(attr,changes)}
return changes},popUp:function(attr,changes){changes=this.filterChanges(attr,changes);this.callParent([attr,changes])}})
;
Ext.define('Ext.draw.sprite.Sprite',{alias:'sprite.sprite',mixins:{observable:'Ext.mixin.Observable'},requires:['Ext.draw.Draw','Ext.draw.gradient.Gradient','Ext.draw.sprite.AttributeDefinition','Ext.draw.modifier.Target','Ext.draw.modifier.Animation','Ext.draw.modifier.Highlight'],isSprite:!0,$configStrict:!1,statics:{debug:!1,defaultHitTestOptions:{fill:!0,stroke:!0}},inheritableStatics:{def:{processors:{debug:'default',strokeStyle:"color",fillStyle:"color",strokeOpacity:"limited01",fillOpacity:"limited01",lineWidth:"number",lineCap:"enums(butt,round,square)",lineJoin:"enums(round,bevel,miter)",lineDash:"data",lineDashOffset:"number",miterLimit:"number",shadowColor:"color",shadowOffsetX:"number",shadowOffsetY:"number",shadowBlur:"number",globalAlpha:"limited01",globalCompositeOperation:"enums(source-over,destination-over,source-in,destination-in,source-out,destination-out,source-atop,destination-atop,lighter,xor,copy)",hidden:"bool",transformFillStroke:"bool",zIndex:"number",translationX:"number",translationY:"number",rotationRads:"number",rotationCenterX:"number",rotationCenterY:"number",scalingX:"number",scalingY:"number",scalingCenterX:"number",scalingCenterY:"number",constrainGradients:"bool"},aliases:{"stroke":"strokeStyle","fill":"fillStyle","color":"fillStyle","stroke-width":"lineWidth","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","text-anchor":"textAlign","opacity":"globalAlpha",translateX:"translationX",translateY:"translationY",rotateRads:"rotationRads",rotateCenterX:"rotationCenterX",rotateCenterY:"rotationCenterY",scaleX:"scalingX",scaleY:"scalingY",scaleCenterX:"scalingCenterX",scaleCenterY:"scalingCenterY"},defaults:{hidden:!1,zIndex:0,strokeStyle:"none",fillStyle:"none",lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,shadowColor:"none",shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,globalAlpha:1,strokeOpacity:1,fillOpacity:1,transformFillStroke:!1,translationX:0,translationY:0,rotationRads:0,rotationCenterX:null,rotationCenterY:null,scalingX:1,scalingY:1,scalingCenterX:null,scalingCenterY:null,constrainGradients:!1},triggers:{zIndex:"zIndex",globalAlpha:"canvas",globalCompositeOperation:"canvas",transformFillStroke:"canvas",strokeStyle:"canvas",fillStyle:"canvas",strokeOpacity:"canvas",fillOpacity:"canvas",lineWidth:"canvas",lineCap:"canvas",lineJoin:"canvas",lineDash:"canvas",lineDashOffset:"canvas",miterLimit:"canvas",shadowColor:"canvas",shadowOffsetX:"canvas",shadowOffsetY:"canvas",shadowBlur:"canvas",translationX:"transform",translationY:"transform",rotationRads:"transform",rotationCenterX:"transform",rotationCenterY:"transform",scalingX:"transform",scalingY:"transform",scalingCenterX:"transform",scalingCenterY:"transform",constrainGradients:"canvas"},updaters:{bbox:'bboxUpdater',zIndex:function(attr){attr.dirtyZIndex=!0},transform:function(attr){attr.dirtyTransform=!0;attr.bbox.transform.dirty=!0}}}},config:{parent:null,surface:null},onClassExtended:function(subClass,data){var superclassCfg=subClass.superclass.self.def.initialConfig,ownCfg=data.inheritableStatics&&data.inheritableStatics.def,cfg;if(ownCfg){cfg=Ext.Object.merge({},superclassCfg,ownCfg);subClass.def=new Ext.draw.sprite.AttributeDefinition(cfg);delete data.inheritableStatics.def}else{subClass.def=new Ext.draw.sprite.AttributeDefinition(superclassCfg)}
subClass.def.spriteClass=subClass},constructor:function(config){if(Ext.getClassName(this)==='Ext.draw.sprite.Sprite'){throw 'Ext.draw.sprite.Sprite is an abstract class'}
var me=this,attributeDefinition=me.self.def,defaults=attributeDefinition.getDefaults(),processors=attributeDefinition.getProcessors(),modifiers,name;config=Ext.isObject(config)?config:{};me.id=config.id||Ext.id(null,'ext-sprite-');me.attr={};me.mixins.observable.constructor.apply(me,arguments);modifiers=Ext.Array.from(config.modifiers,!0);me.createModifiers(modifiers);me.initializeAttributes();me.setAttributes(defaults,!0);for(name in config){if(name in processors&&me['get'+name.charAt(0).toUpperCase()+name.substr(1)]){Ext.raise('The '+me.$className+' sprite has both a config and an attribute with the same name: '+name+'.')}}
me.setAttributes(config)},updateSurface:function(surface,oldSurface){if(oldSurface){oldSurface.remove(this)}},getDirty:function(){return this.attr.dirty},setDirty:function(dirty){var parent;this.attr.dirty=dirty;if(dirty){parent=this.getParent();if(parent){parent.setDirty(!0)}}},addModifier:function(modifier,reinitializeAttributes){var me=this,mods=me.modifiers,animation=mods.animation,target=mods.target,type;if(!(modifier instanceof Ext.draw.modifier.Modifier)){type=typeof modifier==='string'?modifier:modifier.type;if(type&&!mods[type]){mods[type]=modifier=Ext.factory(modifier,null,null,'modifier')}}
modifier.setSprite(me);if(modifier.preFx||modifier.config&&modifier.config.preFx){if(animation._lower){animation._lower.setUpper(modifier)}
modifier.setUpper(animation)}else{target._lower.setUpper(modifier);modifier.setUpper(target)}
if(reinitializeAttributes){me.initializeAttributes()}
return modifier},createModifiers:function(modifiers){var me=this,Modifier=Ext.draw.modifier,animation=me.getInitialConfig().animation,mods,i,ln;me.modifiers=mods={target:new Modifier.Target({sprite:me}),animation:new Modifier.Animation(Ext.apply({sprite:me},animation))};mods.animation.setUpper(mods.target);for(i=0,ln=modifiers.length;i<ln;i++){me.addModifier(modifiers[i],!1)}
return mods},getAnimation:function(){return this.modifiers.animation},setAnimation:function(config){if(!this.isConfiguring){this.modifiers.animation.setConfig(config||{duration:0})}},initializeAttributes:function(){this.modifiers.target.prepareAttributes(this.attr)},callUpdaters:function(attr){var me=this,updaters=me.self.def.getUpdaters(),any=!1,dirty=!1,pendingUpdaters,flags,updater,fn;attr=attr||this.attr;pendingUpdaters=attr.pendingUpdaters;me.callUpdaters=Ext.emptyFn;do{any=!1;for(updater in pendingUpdaters){any=!0;flags=pendingUpdaters[updater];delete pendingUpdaters[updater];fn=updaters[updater];if(typeof fn==='string'){fn=me[fn]}
if(fn){fn.call(me,attr,flags)}}
dirty=dirty||any}while(any);delete me.callUpdaters;if(dirty){me.setDirty(!0)}},callUpdater:function(attr,updater,triggers){this.scheduleUpdater(attr,updater,triggers);this.callUpdaters(attr)},scheduleUpdaters:function(attr,updaters,triggers){var updater,i,ln;attr=attr||this.attr;if(triggers){for(i=0,ln=updaters.length;i<ln;i++){updater=updaters[i];this.scheduleUpdater(attr,updater,triggers)}}else{for(updater in updaters){triggers=updaters[updater];this.scheduleUpdater(attr,updater,triggers)}}},scheduleUpdater:function(attr,updater,triggers){var pendingUpdaters;triggers=triggers||[];attr=attr||this.attr;pendingUpdaters=attr.pendingUpdaters;if(updater in pendingUpdaters){if(triggers.length){pendingUpdaters[updater]=Ext.Array.merge(pendingUpdaters[updater],triggers)}}else{pendingUpdaters[updater]=triggers}},setAttributes:function(changes,bypassNormalization,avoidCopy){var me=this,changesToPush;if(me.destroyed){Ext.Error.raise("Setting attributes of a destroyed sprite.")}
if(bypassNormalization){if(avoidCopy){changesToPush=changes}else{changesToPush=Ext.apply({},changes)}}else{changesToPush=me.self.def.normalize(changes)}
me.modifiers.target.pushDown(me.attr,changesToPush)},setAttributesBypassingNormalization:function(changes,avoidCopy){return this.setAttributes(changes,!0,avoidCopy)},bboxUpdater:function(attr){var hasRotation=attr.rotationRads!==0,hasScaling=attr.scalingX!==1||attr.scalingY!==1,noRotationCenter=attr.rotationCenterX===null||attr.rotationCenterY===null,noScalingCenter=attr.scalingCenterX===null||attr.scalingCenterY===null;attr.bbox.plain.dirty=!0;attr.bbox.transform.dirty=!0;if(hasRotation&&noRotationCenter||hasScaling&&noScalingCenter){this.scheduleUpdater(attr,'transform')}},getBBox:function(isWithoutTransform){var me=this,attr=me.attr,bbox=attr.bbox,plain=bbox.plain,transform=bbox.transform;if(plain.dirty){me.updatePlainBBox(plain);plain.dirty=!1}
if(!isWithoutTransform){me.applyTransformations();if(transform.dirty){me.updateTransformedBBox(transform,plain);transform.dirty=!1}
return transform}
return plain},updatePlainBBox:Ext.emptyFn,updateTransformedBBox:function(transform,plain){this.attr.matrix.transformBBox(plain,0,transform)},getBBoxCenter:function(isWithoutTransform){var bbox=this.getBBox(isWithoutTransform);if(bbox){return[bbox.x+bbox.width*0.5,bbox.y+bbox.height*0.5]}else{return[0,0]}},hide:function(){this.attr.hidden=!0;this.setDirty(!0);return this},show:function(){this.attr.hidden=!1;this.setDirty(!0);return this},useAttributes:function(ctx,rect){this.applyTransformations(this.isSpriteInstance);var attr=this.attr,canvasAttributes=attr.canvasAttributes,strokeStyle=canvasAttributes.strokeStyle,fillStyle=canvasAttributes.fillStyle,lineDash=canvasAttributes.lineDash,lineDashOffset=canvasAttributes.lineDashOffset,id;if(strokeStyle){if(strokeStyle.isGradient){ctx.strokeStyle='black';ctx.strokeGradient=strokeStyle}else{ctx.strokeGradient=!1}}
if(fillStyle){if(fillStyle.isGradient){ctx.fillStyle='black';ctx.fillGradient=fillStyle}else{ctx.fillGradient=!1}}
if(lineDash){ctx.setLineDash(lineDash)}
if(Ext.isNumber(lineDashOffset)&&Ext.isNumber(ctx.lineDashOffset)){ctx.lineDashOffset=lineDashOffset}
for(id in canvasAttributes){if(canvasAttributes[id]!==undefined&&canvasAttributes[id]!==ctx[id]){ctx[id]=canvasAttributes[id]}}
this.setGradientBBox(ctx,rect)},setGradientBBox:function(ctx,rect){var attr=this.attr;if(attr.constrainGradients){ctx.setGradientBBox({x:rect[0],y:rect[1],width:rect[2],height:rect[3]})}else{ctx.setGradientBBox(this.getBBox(attr.transformFillStroke))}},applyTransformations:function(force){if(!force&&!this.attr.dirtyTransform){return}
var me=this,attr=me.attr,center=me.getBBoxCenter(!0),centerX=center[0],centerY=center[1],tx=attr.translationX,ty=attr.translationY,sx=attr.scalingX,sy=attr.scalingY===null?attr.scalingX:attr.scalingY,scx=attr.scalingCenterX===null?centerX:attr.scalingCenterX,scy=attr.scalingCenterY===null?centerY:attr.scalingCenterY,rad=attr.rotationRads,rcx=attr.rotationCenterX===null?centerX:attr.rotationCenterX,rcy=attr.rotationCenterY===null?centerY:attr.rotationCenterY,cos=Math.cos(rad),sin=Math.sin(rad),tx_4,ty_4;if(sx===1&&sy===1){scx=0;scy=0}
if(rad===0){rcx=0;rcy=0}
tx_4=scx*(1-sx)-rcx;ty_4=scy*(1-sy)-rcy;attr.matrix.elements=[cos*sx,sin*sx,-sin*sy,cos*sy,cos*tx_4-sin*ty_4+rcx+tx,sin*tx_4+cos*ty_4+rcy+ty];attr.matrix.inverse(attr.inverseMatrix);attr.dirtyTransform=!1;attr.bbox.transform.dirty=!0},transform:function(matrix,isSplit){var attr=this.attr,spriteMatrix=attr.matrix,elements;if(matrix&&matrix.isMatrix){elements=matrix.elements}else{elements=matrix}
if(!(Ext.isArray(elements)&&elements.length===6)){Ext.raise("An instance of Ext.draw.Matrix or an array of 6 numbers is expected.")}
spriteMatrix.prepend.apply(spriteMatrix,elements.slice());spriteMatrix.inverse(attr.inverseMatrix);if(isSplit){this.updateTransformAttributes()}
attr.dirtyTransform=!1;attr.bbox.transform.dirty=!0;this.setDirty(!0);return this},updateTransformAttributes:function(){var attr=this.attr,split=attr.matrix.split();attr.rotationRads=split.rotate;attr.rotationCenterX=0;attr.rotationCenterY=0;attr.scalingX=split.scaleX;attr.scalingY=split.scaleY;attr.scalingCenterX=0;attr.scalingCenterY=0;attr.translationX=split.translateX;attr.translationY=split.translateY},resetTransform:function(isSplit){var attr=this.attr;attr.matrix.reset();attr.inverseMatrix.reset();if(!isSplit){this.updateTransformAttributes()}
attr.dirtyTransform=!1;attr.bbox.transform.dirty=!0;this.setDirty(!0);return this},setTransform:function(matrix,isSplit){this.resetTransform(!0);this.transform.call(this,matrix,isSplit);return this},preRender:Ext.emptyFn,render:Ext.emptyFn,renderBBox:function(surface,ctx){var bbox=this.getBBox();ctx.beginPath();ctx.moveTo(bbox.x,bbox.y);ctx.lineTo(bbox.x+bbox.width,bbox.y);ctx.lineTo(bbox.x+bbox.width,bbox.y+bbox.height);ctx.lineTo(bbox.x,bbox.y+bbox.height);ctx.closePath();ctx.strokeStyle='red';ctx.strokeOpacity=1;ctx.lineWidth=0.5;ctx.stroke()},hitTest:function(point,options){var x,y,bbox,isBBoxHit;if(this.isVisible()){x=point[0];y=point[1];bbox=this.getBBox();isBBoxHit=bbox&&x>=bbox.x&&x<=(bbox.x+bbox.width)&&y>=bbox.y&&y<=(bbox.y+bbox.height);if(isBBoxHit){return{sprite:this}}}
return null},isVisible:function(){var attr=this.attr,parent=this.getParent(),hasParent=parent&&(parent.isSurface||parent.isVisible()),isSeen=hasParent&&!attr.hidden&&attr.globalAlpha,none1=Ext.util.Color.NONE,none2=Ext.util.Color.RGBA_NONE,hasFill=attr.fillOpacity&&attr.fillStyle!==none1&&attr.fillStyle!==none2,hasStroke=attr.strokeOpacity&&attr.strokeStyle!==none1&&attr.strokeStyle!==none2,result=isSeen&&(hasFill||hasStroke);return!!result},repaint:function(){var surface=this.getSurface();if(surface){surface.renderFrame()}},remove:function(){var surface=this.getSurface();if(surface&&surface.isSurface){return surface.remove(this)}
return null},destroy:function(){var me=this,modifier=me.modifiers.target,currentModifier;while(modifier){currentModifier=modifier;modifier=modifier._lower;currentModifier.destroy()}
delete me.attr;me.remove();if(me.fireEvent('beforedestroy',me)!==!1){me.fireEvent('destroy',me)}
me.callParent()}},function(){this.def=new Ext.draw.sprite.AttributeDefinition(this.def);this.def.spriteClass=this})
;
Ext.define('Ext.draw.Path',{requires:['Ext.draw.Draw'],statics:{pathRe:/,?([achlmqrstvxz]),?/gi,pathRe2:/-/gi,pathSplitRe:/\s|,/g},svgString:'',constructor:function(pathString){var me=this;me.commands=[];me.params=[];me.cursor=null;me.startX=0;me.startY=0;if(pathString){me.fromSvgString(pathString)}},clear:function(){var me=this;me.params.length=0;me.commands.length=0;me.cursor=null;me.startX=0;me.startY=0;me.dirt()},dirt:function(){this.svgString=''},moveTo:function(x,y){var me=this;if(!me.cursor){me.cursor=[x,y]}
me.params.push(x,y);me.commands.push('M');me.startX=x;me.startY=y;me.cursor[0]=x;me.cursor[1]=y;me.dirt()},lineTo:function(x,y){var me=this;if(!me.cursor){me.cursor=[x,y];me.params.push(x,y);me.commands.push('M')}else{me.params.push(x,y);me.commands.push('L')}
me.cursor[0]=x;me.cursor[1]=y;me.dirt()},bezierCurveTo:function(cx1,cy1,cx2,cy2,x,y){var me=this;if(!me.cursor){me.moveTo(cx1,cy1)}
me.params.push(cx1,cy1,cx2,cy2,x,y);me.commands.push('C');me.cursor[0]=x;me.cursor[1]=y;me.dirt()},quadraticCurveTo:function(cx,cy,x,y){var me=this;if(!me.cursor){me.moveTo(cx,cy)}
me.bezierCurveTo((2*cx+me.cursor[0])/3,(2*cy+me.cursor[1])/3,(2*cx+x)/3,(2*cy+y)/3,x,y)},closePath:function(){var me=this;if(me.cursor){me.cursor=null;me.commands.push('Z');me.dirt()}},arcTo:function(x1,y1,x2,y2,rx,ry,rotation){var me=this;if(ry===undefined){ry=rx}
if(rotation===undefined){rotation=0}
if(!me.cursor){me.moveTo(x1,y1);return}
if(rx===0||ry===0){me.lineTo(x1,y1);return}
x2-=x1;y2-=y1;var x0=me.cursor[0]-x1,y0=me.cursor[1]-y1,area=x2*y0-y2*x0,cos,sin,xx,yx,xy,yy,l0=Math.sqrt(x0*x0+y0*y0),l2=Math.sqrt(x2*x2+y2*y2),dist,cx,cy,temp;if(area===0){me.lineTo(x1,y1);return}
if(ry!==rx){cos=Math.cos(rotation);sin=Math.sin(rotation);xx=cos/rx;yx=sin/ry;xy=-sin/rx;yy=cos/ry;temp=xx*x0+yx*y0;y0=xy*x0+yy*y0;x0=temp;temp=xx*x2+yx*y2;y2=xy*x2+yy*y2;x2=temp}else{x0/=rx;y0/=ry;x2/=rx;y2/=ry}
cx=x0*l2+x2*l0;cy=y0*l2+y2*l0;dist=1/(Math.sin(Math.asin(Math.abs(area)/(l0*l2))*0.5)*Math.sqrt(cx*cx+cy*cy));cx*=dist;cy*=dist;var k0=(cx*x0+cy*y0)/(x0*x0+y0*y0),k2=(cx*x2+cy*y2)/(x2*x2+y2*y2),cosStart=x0*k0-cx,sinStart=y0*k0-cy,cosEnd=x2*k2-cx,sinEnd=y2*k2-cy,startAngle=Math.atan2(sinStart,cosStart),endAngle=Math.atan2(sinEnd,cosEnd);if(area>0){if(endAngle<startAngle){endAngle+=Math.PI*2}}else{if(startAngle<endAngle){startAngle+=Math.PI*2}}
if(ry!==rx){cx=cos*cx*rx-sin*cy*ry+x1;cy=sin*cy*ry+cos*cy*ry+y1;me.lineTo(cos*rx*cosStart-sin*ry*sinStart+cx,sin*rx*cosStart+cos*ry*sinStart+cy);me.ellipse(cx,cy,rx,ry,rotation,startAngle,endAngle,area<0)}else{cx=cx*rx+x1;cy=cy*ry+y1;me.lineTo(rx*cosStart+cx,ry*sinStart+cy);me.ellipse(cx,cy,rx,ry,rotation,startAngle,endAngle,area<0)}},ellipse:function(cx,cy,radiusX,radiusY,rotation,startAngle,endAngle,anticlockwise){var me=this,params=me.params,start=params.length,count,temp,i,j;if(endAngle-startAngle>=Math.PI*2){me.ellipse(cx,cy,radiusX,radiusY,rotation,startAngle,startAngle+Math.PI,anticlockwise);me.ellipse(cx,cy,radiusX,radiusY,rotation,startAngle+Math.PI,endAngle,anticlockwise);return}
if(!anticlockwise){if(endAngle<startAngle){endAngle+=Math.PI*2}
count=me.approximateArc(params,cx,cy,radiusX,radiusY,rotation,startAngle,endAngle)}else{if(startAngle<endAngle){startAngle+=Math.PI*2}
count=me.approximateArc(params,cx,cy,radiusX,radiusY,rotation,endAngle,startAngle);for(i=start,j=params.length-2;i<j;i+=2,j-=2){temp=params[i];params[i]=params[j];params[j]=temp;temp=params[i+1];params[i+1]=params[j+1];params[j+1]=temp}}
if(!me.cursor){me.cursor=[params[params.length-2],params[params.length-1]];me.commands.push('M')}else{me.cursor[0]=params[params.length-2];me.cursor[1]=params[params.length-1];me.commands.push('L')}
for(i=2;i<count;i+=6){me.commands.push('C')}
me.dirt()},arc:function(x,y,radius,startAngle,endAngle,anticlockwise){this.ellipse(x,y,radius,radius,0,startAngle,endAngle,anticlockwise)},rect:function(x,y,width,height){var me=this;if(width===0||height===0){return}
me.moveTo(x,y);me.lineTo(x+width,y);me.lineTo(x+width,y+height);me.lineTo(x,y+height);me.closePath()},approximateArc:function(result,cx,cy,rx,ry,phi,theta1,theta2){var cosPhi=Math.cos(phi),sinPhi=Math.sin(phi),cosTheta1=Math.cos(theta1),sinTheta1=Math.sin(theta1),xx=cosPhi*cosTheta1*rx-sinPhi*sinTheta1*ry,yx=-cosPhi*sinTheta1*rx-sinPhi*cosTheta1*ry,xy=sinPhi*cosTheta1*rx+cosPhi*sinTheta1*ry,yy=-sinPhi*sinTheta1*rx+cosPhi*cosTheta1*ry,rightAngle=Math.PI/2,count=2,exx=xx,eyx=yx,exy=xy,eyy=yy,rho=0.547443256150549,temp,y1,x3,y3,x2,y2;theta2-=theta1;if(theta2<0){theta2+=Math.PI*2}
result.push(xx+cx,xy+cy);while(theta2>=rightAngle){result.push(exx+eyx*rho+cx,exy+eyy*rho+cy,exx*rho+eyx+cx,exy*rho+eyy+cy,eyx+cx,eyy+cy);count+=6;theta2-=rightAngle;temp=exx;exx=eyx;eyx=-temp;temp=exy;exy=eyy;eyy=-temp}
if(theta2){y1=(0.3294738052815987+0.012120855841304373*theta2)*theta2;x3=Math.cos(theta2);y3=Math.sin(theta2);x2=x3+y1*y3;y2=y3-y1*x3;result.push(exx+eyx*y1+cx,exy+eyy*y1+cy,exx*x2+eyx*y2+cx,exy*x2+eyy*y2+cy,exx*x3+eyx*y3+cx,exy*x3+eyy*y3+cy);count+=6}
return count},arcSvg:function(rx,ry,rotation,fA,fS,x2,y2){if(rx<0){rx=-rx}
if(ry<0){ry=-ry}
var me=this,x1=me.cursor[0],y1=me.cursor[1],hdx=(x1-x2)/2,hdy=(y1-y2)/2,cosPhi=Math.cos(rotation),sinPhi=Math.sin(rotation),xp=hdx*cosPhi+hdy*sinPhi,yp=-hdx*sinPhi+hdy*cosPhi,ratX=xp/rx,ratY=yp/ry,lambda=ratX*ratX+ratY*ratY,cx=(x1+x2)*0.5,cy=(y1+y2)*0.5,cpx=0,cpy=0,theta1,deltaTheta;if(lambda>=1){lambda=Math.sqrt(lambda);rx*=lambda;ry*=lambda}else{lambda=Math.sqrt(1/lambda-1);if(fA===fS){lambda=-lambda}
cpx=lambda*rx*ratY;cpy=-lambda*ry*ratX;cx+=cosPhi*cpx-sinPhi*cpy;cy+=sinPhi*cpx+cosPhi*cpy}
theta1=Math.atan2((yp-cpy)/ry,(xp-cpx)/rx);deltaTheta=Math.atan2((-yp-cpy)/ry,(-xp-cpx)/rx)-theta1;if(fS){if(deltaTheta<=0){deltaTheta+=Math.PI*2}}else{if(deltaTheta>=0){deltaTheta-=Math.PI*2}}
me.ellipse(cx,cy,rx,ry,rotation,theta1,theta1+deltaTheta,1-fS)},fromSvgString:function(pathString){if(!pathString){return}
var me=this,parts,paramCounts={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0,A:7,C:6,H:1,L:2,M:2,Q:4,S:4,T:2,V:1,Z:0},lastCommand='',lastControlX,lastControlY,lastX=0,lastY=0,part=!1,i,partLength;if(Ext.isString(pathString)){parts=pathString.replace(Ext.draw.Path.pathRe," $1 ").replace(Ext.draw.Path.pathRe2," -").split(Ext.draw.Path.pathSplitRe)}else if(Ext.isArray(pathString)){parts=pathString.join(',').split(Ext.draw.Path.pathSplitRe)}
for(i=0,partLength=0;i<parts.length;i++){if(parts[i]!==''){parts[partLength++]=parts[i]}}
parts.length=partLength;me.clear();for(i=0;i<parts.length;){lastCommand=part;part=parts[i];i++;switch(part){case 'M':me.moveTo(lastX=+parts[i],lastY=+parts[i+1]);i+=2;while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX=+parts[i],lastY=+parts[i+1]);i+=2}
break;case 'L':me.lineTo(lastX=+parts[i],lastY=+parts[i+1]);i+=2;while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX=+parts[i],lastY=+parts[i+1]);i+=2}
break;case 'A':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.arcSvg(+parts[i],+parts[i+1],+parts[i+2]*Math.PI/180,+parts[i+3],+parts[i+4],lastX=+parts[i+5],lastY=+parts[i+6]);i+=7}
break;case 'C':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.bezierCurveTo(+parts[i],+parts[i+1],lastControlX=+parts[i+2],lastControlY=+parts[i+3],lastX=+parts[i+4],lastY=+parts[i+5]);i+=6}
break;case 'Z':me.closePath();break;case 'm':me.moveTo(lastX+=+parts[i],lastY+=+parts[i+1]);i+=2;while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX+=+parts[i],lastY+=+parts[i+1]);i+=2}
break;case 'l':me.lineTo(lastX+=+parts[i],lastY+=+parts[i+1]);i+=2;while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX+=+parts[i],lastY+=+parts[i+1]);i+=2}
break;case 'a':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.arcSvg(+parts[i],+parts[i+1],+parts[i+2]*Math.PI/180,+parts[i+3],+parts[i+4],lastX+=+parts[i+5],lastY+=+parts[i+6]);i+=7}
break;case 'c':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.bezierCurveTo(lastX+(+parts[i]),lastY+(+parts[i+1]),lastControlX=lastX+(+parts[i+2]),lastControlY=lastY+(+parts[i+3]),lastX+=+parts[i+4],lastY+=+parts[i+5]);i+=6}
break;case 'z':me.closePath();break;case 's':if(!(lastCommand==='c'||lastCommand==='C'||lastCommand==='s'||lastCommand==='S')){lastControlX=lastX;lastControlY=lastY}
while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.bezierCurveTo(lastX+lastX-lastControlX,lastY+lastY-lastControlY,lastControlX=lastX+(+parts[i]),lastControlY=lastY+(+parts[i+1]),lastX+=+parts[i+2],lastY+=+parts[i+3]);i+=4}
break;case 'S':if(!(lastCommand==='c'||lastCommand==='C'||lastCommand==='s'||lastCommand==='S')){lastControlX=lastX;lastControlY=lastY}
while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.bezierCurveTo(lastX+lastX-lastControlX,lastY+lastY-lastControlY,lastControlX=+parts[i],lastControlY=+parts[i+1],lastX=(+parts[i+2]),lastY=(+parts[i+3]));i+=4}
break;case 'q':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.quadraticCurveTo(lastControlX=lastX+(+parts[i]),lastControlY=lastY+(+parts[i+1]),lastX+=+parts[i+2],lastY+=+parts[i+3]);i+=4}
break;case 'Q':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.quadraticCurveTo(lastControlX=+parts[i],lastControlY=+parts[i+1],lastX=+parts[i+2],lastY=+parts[i+3]);i+=4}
break;case 't':if(!(lastCommand==='q'||lastCommand==='Q'||lastCommand==='t'||lastCommand==='T')){lastControlX=lastX;lastControlY=lastY}
while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.quadraticCurveTo(lastControlX=lastX+lastX-lastControlX,lastControlY=lastY+lastY-lastControlY,lastX+=+parts[i+1],lastY+=+parts[i+2]);i+=2}
break;case 'T':if(!(lastCommand==='q'||lastCommand==='Q'||lastCommand==='t'||lastCommand==='T')){lastControlX=lastX;lastControlY=lastY}
while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.quadraticCurveTo(lastControlX=lastX+lastX-lastControlX,lastControlY=lastY+lastY-lastControlY,lastX=(+parts[i+1]),lastY=(+parts[i+2]));i+=2}
break;case 'h':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX+=+parts[i],lastY);i++}
break;case 'H':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX=+parts[i],lastY);i++}
break;case 'v':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX,lastY+=+parts[i]);i++}
break;case 'V':while(i<partLength&&!paramCounts.hasOwnProperty(parts[i])){me.lineTo(lastX,lastY=+parts[i]);i++}
break}}},clone:function(){var me=this,path=new Ext.draw.Path();path.params=me.params.slice(0);path.commands=me.commands.slice(0);path.cursor=me.cursor?me.cursor.slice(0):null;path.startX=me.startX;path.startY=me.startY;path.svgString=me.svgString;return path},transform:function(matrix){if(matrix.isIdentity()){return}
var xx=matrix.getXX(),yx=matrix.getYX(),dx=matrix.getDX(),xy=matrix.getXY(),yy=matrix.getYY(),dy=matrix.getDY(),params=this.params,i=0,ln=params.length,x,y;for(;i<ln;i+=2){x=params[i];y=params[i+1];params[i]=x*xx+y*yx+dx;params[i+1]=x*xy+y*yy+dy}
this.dirt()},getDimension:function(target){if(!target){target={}}
if(!this.commands||!this.commands.length){target.x=0;target.y=0;target.width=0;target.height=0;return target}
target.left=Infinity;target.top=Infinity;target.right=-Infinity;target.bottom=-Infinity;var i=0,j=0,commands=this.commands,params=this.params,ln=commands.length,x,y;for(;i<ln;i++){switch(commands[i]){case 'M':case 'L':x=params[j];y=params[j+1];target.left=Math.min(x,target.left);target.top=Math.min(y,target.top);target.right=Math.max(x,target.right);target.bottom=Math.max(y,target.bottom);j+=2;break;case 'C':this.expandDimension(target,x,y,params[j],params[j+1],params[j+2],params[j+3],x=params[j+4],y=params[j+5]);j+=6;break}}
target.x=target.left;target.y=target.top;target.width=target.right-target.left;target.height=target.bottom-target.top;return target},getDimensionWithTransform:function(matrix,target){if(!this.commands||!this.commands.length){if(!target){target={}}
target.x=0;target.y=0;target.width=0;target.height=0;return target}
target.left=Infinity;target.top=Infinity;target.right=-Infinity;target.bottom=-Infinity;var xx=matrix.getXX(),yx=matrix.getYX(),dx=matrix.getDX(),xy=matrix.getXY(),yy=matrix.getYY(),dy=matrix.getDY(),i=0,j=0,commands=this.commands,params=this.params,ln=commands.length,x,y;for(;i<ln;i++){switch(commands[i]){case 'M':case 'L':x=params[j]*xx+params[j+1]*yx+dx;y=params[j]*xy+params[j+1]*yy+dy;target.left=Math.min(x,target.left);target.top=Math.min(y,target.top);target.right=Math.max(x,target.right);target.bottom=Math.max(y,target.bottom);j+=2;break;case 'C':this.expandDimension(target,x,y,params[j]*xx+params[j+1]*yx+dx,params[j]*xy+params[j+1]*yy+dy,params[j+2]*xx+params[j+3]*yx+dx,params[j+2]*xy+params[j+3]*yy+dy,x=params[j+4]*xx+params[j+5]*yx+dx,y=params[j+4]*xy+params[j+5]*yy+dy);j+=6;break}}
if(!target){target={}}
target.x=target.left;target.y=target.top;target.width=target.right-target.left;target.height=target.bottom-target.top;return target},expandDimension:function(target,x1,y1,cx1,cy1,cx2,cy2,x2,y2){var me=this,l=target.left,r=target.right,t=target.top,b=target.bottom,dim=me.dim||(me.dim=[]);me.curveDimension(x1,cx1,cx2,x2,dim);l=Math.min(l,dim[0]);r=Math.max(r,dim[1]);me.curveDimension(y1,cy1,cy2,y2,dim);t=Math.min(t,dim[0]);b=Math.max(b,dim[1]);target.left=l;target.right=r;target.top=t;target.bottom=b},curveDimension:function(a,b,c,d,dim){var qa=3*(-a+3*(b-c)+d),qb=6*(a-2*b+c),qc=-3*(a-b),x,y,min=Math.min(a,d),max=Math.max(a,d),delta;if(qa===0){if(qb===0){dim[0]=min;dim[1]=max;return}else{x=-qc/qb;if(0<x&&x<1){y=this.interpolate(a,b,c,d,x);min=Math.min(min,y);max=Math.max(max,y)}}}else{delta=qb*qb-4*qa*qc;if(delta>=0){delta=Math.sqrt(delta);x=(delta-qb)/2/qa;if(0<x&&x<1){y=this.interpolate(a,b,c,d,x);min=Math.min(min,y);max=Math.max(max,y)}
if(delta>0){x-=delta/qa;if(0<x&&x<1){y=this.interpolate(a,b,c,d,x);min=Math.min(min,y);max=Math.max(max,y)}}}}
dim[0]=min;dim[1]=max},interpolate:function(a,b,c,d,t){var rate;if(t===0){return a}
if(t===1){return d}
rate=(1-t)/t;return t*t*t*(d+rate*(3*c+rate*(3*b+rate*a)))},fromStripes:function(stripes){var me=this,i=0,ln=stripes.length,j,ln2,stripe;me.clear();for(;i<ln;i++){stripe=stripes[i];me.params.push.apply(me.params,stripe);me.commands.push('M');for(j=2,ln2=stripe.length;j<ln2;j+=6){me.commands.push('C')}}
if(!me.cursor){me.cursor=[]}
me.cursor[0]=me.params[me.params.length-2];me.cursor[1]=me.params[me.params.length-1];me.dirt()},toStripes:function(target){var stripes=target||[],curr,x,y,lastX,lastY,startX,startY,i,j,commands=this.commands,params=this.params,ln=commands.length;for(i=0,j=0;i<ln;i++){switch(commands[i]){case 'M':curr=[startX=lastX=params[j++],startY=lastY=params[j++]];stripes.push(curr);break;case 'L':x=params[j++];y=params[j++];curr.push((lastX+lastX+x)/3,(lastY+lastY+y)/3,(lastX+x+x)/3,(lastY+y+y)/3,lastX=x,lastY=y);break;case 'C':curr.push(params[j++],params[j++],params[j++],params[j++],lastX=params[j++],lastY=params[j++]);break;case 'Z':x=startX;y=startY;curr.push((lastX+lastX+x)/3,(lastY+lastY+y)/3,(lastX+x+x)/3,(lastY+y+y)/3,lastX=x,lastY=y);break}}
return stripes},updateSvgString:function(){var result=[],commands=this.commands,params=this.params,ln=commands.length,i=0,j=0;for(;i<ln;i++){switch(commands[i]){case 'M':result.push('M'+params[j]+','+params[j+1]);j+=2;break;case 'L':result.push('L'+params[j]+','+params[j+1]);j+=2;break;case 'C':result.push('C'+params[j]+','+params[j+1]+' '+params[j+2]+','+params[j+3]+' '+params[j+4]+','+params[j+5]);j+=6;break;case 'Z':result.push('Z');break}}
this.svgString=result.join('')},toString:function(){if(!this.svgString){this.updateSvgString()}
return this.svgString}})
;
Ext.define('Ext.draw.overrides.hittest.Path',{override:'Ext.draw.Path',rayOrigin:{x:-10000,y:-10000},isPointInPath:function(x,y){var me=this,commands=me.commands,solver=Ext.draw.PathUtil,origin=me.rayOrigin,params=me.params,ln=commands.length,firstX=null,firstY=null,lastX=0,lastY=0,count=0,i,j;for(i=0,j=0;i<ln;i++){switch(commands[i]){case 'M':if(firstX!==null){if(solver.linesIntersection(firstX,firstY,lastX,lastY,origin.x,origin.y,x,y)){count+=1}}
firstX=lastX=params[j];firstY=lastY=params[j+1];j+=2;break;case 'L':if(solver.linesIntersection(lastX,lastY,params[j],params[j+1],origin.x,origin.y,x,y)){count+=1}
lastX=params[j];lastY=params[j+1];j+=2;break;case 'C':count+=solver.cubicLineIntersections(lastX,params[j],params[j+2],params[j+4],lastY,params[j+1],params[j+3],params[j+5],origin.x,origin.y,x,y).length;lastX=params[j+4];lastY=params[j+5];j+=6;break;case 'Z':if(firstX!==null){if(solver.linesIntersection(firstX,firstY,lastX,lastY,origin.x,origin.y,x,y)){count+=1}}
break}}
return count%2===1},isPointOnPath:function(x,y){var me=this,commands=me.commands,solver=Ext.draw.PathUtil,params=me.params,ln=commands.length,firstX=null,firstY=null,lastX=0,lastY=0,i,j;for(i=0,j=0;i<ln;i++){switch(commands[i]){case 'M':if(firstX!==null){if(solver.pointOnLine(firstX,firstY,lastX,lastY,x,y)){return!0}}
firstX=lastX=params[j];firstY=lastY=params[j+1];j+=2;break;case 'L':if(solver.pointOnLine(lastX,lastY,params[j],params[j+1],x,y)){return!0}
lastX=params[j];lastY=params[j+1];j+=2;break;case 'C':if(solver.pointOnCubic(lastX,params[j],params[j+2],params[j+4],lastY,params[j+1],params[j+3],params[j+5],x,y)){return!0}
lastX=params[j+4];lastY=params[j+5];j+=6;break;case 'Z':if(firstX!==null){if(solver.pointOnLine(firstX,firstY,lastX,lastY,x,y)){return!0}}
break}}
return!1},getSegmentIntersections:function(x1,y1,x2,y2,x3,y3,x4,y4){var me=this,count=arguments.length,solver=Ext.draw.PathUtil,commands=me.commands,params=me.params,ln=commands.length,firstX=null,firstY=null,lastX=0,lastY=0,intersections=[],i,j,points;for(i=0,j=0;i<ln;i++){switch(commands[i]){case 'M':if(firstX!==null){switch(count){case 4:points=solver.linesIntersection(firstX,firstY,lastX,lastY,x1,y1,x2,y2);if(points){intersections.push(points)}
break;case 8:points=solver.cubicLineIntersections(x1,x2,x3,x4,y1,y2,y3,y4,firstX,firstY,lastX,lastY);intersections.push.apply(intersections,points);break}}
firstX=lastX=params[j];firstY=lastY=params[j+1];j+=2;break;case 'L':switch(count){case 4:points=solver.linesIntersection(lastX,lastY,params[j],params[j+1],x1,y1,x2,y2);if(points){intersections.push(points)}
break;case 8:points=solver.cubicLineIntersections(x1,x2,x3,x4,y1,y2,y3,y4,lastX,lastY,params[j],params[j+1]);intersections.push.apply(intersections,points);break}
lastX=params[j];lastY=params[j+1];j+=2;break;case 'C':switch(count){case 4:points=solver.cubicLineIntersections(lastX,params[j],params[j+2],params[j+4],lastY,params[j+1],params[j+3],params[j+5],x1,y1,x2,y2);intersections.push.apply(intersections,points);break;case 8:points=solver.cubicsIntersections(lastX,params[j],params[j+2],params[j+4],lastY,params[j+1],params[j+3],params[j+5],x1,x2,x3,x4,y1,y2,y3,y4);intersections.push.apply(intersections,points);break}
lastX=params[j+4];lastY=params[j+5];j+=6;break;case 'Z':if(firstX!==null){switch(count){case 4:points=solver.linesIntersection(firstX,firstY,lastX,lastY,x1,y1,x2,y2);if(points){intersections.push(points)}
break;case 8:points=solver.cubicLineIntersections(x1,x2,x3,x4,y1,y2,y3,y4,firstX,firstY,lastX,lastY);intersections.push.apply(intersections,points);break}}
break}}
return intersections},getIntersections:function(path){var me=this,commands=me.commands,params=me.params,ln=commands.length,firstX=null,firstY=null,lastX=0,lastY=0,intersections=[],i,j,points;for(i=0,j=0;i<ln;i++){switch(commands[i]){case 'M':if(firstX!==null){points=path.getSegmentIntersections.call(path,firstX,firstY,lastX,lastY);intersections.push.apply(intersections,points)}
firstX=lastX=params[j];firstY=lastY=params[j+1];j+=2;break;case 'L':points=path.getSegmentIntersections.call(path,lastX,lastY,params[j],params[j+1]);intersections.push.apply(intersections,points);lastX=params[j];lastY=params[j+1];j+=2;break;case 'C':points=path.getSegmentIntersections.call(path,lastX,lastY,params[j],params[j+1],params[j+2],params[j+3],params[j+4],params[j+5]);intersections.push.apply(intersections,points);lastX=params[j+4];lastY=params[j+5];j+=6;break;case 'Z':if(firstX!==null){points=path.getSegmentIntersections.call(path,firstX,firstY,lastX,lastY);intersections.push.apply(intersections,points)}
break}}
return intersections}})
;
Ext.define('Ext.draw.sprite.Path',{extend:'Ext.draw.sprite.Sprite',requires:['Ext.draw.Draw','Ext.draw.Path'],alias:['sprite.path','Ext.draw.Sprite'],type:'path',isPath:!0,inheritableStatics:{def:{processors:{path:function(n,o){if(!(n instanceof Ext.draw.Path)){n=new Ext.draw.Path(n)}
return n}},aliases:{d:'path'},triggers:{path:'bbox'},updaters:{path:function(attr){var path=attr.path;if(!path||path.bindAttr!==attr){path=new Ext.draw.Path();path.bindAttr=attr;attr.path=path}
path.clear();this.updatePath(path,attr);this.scheduleUpdater(attr,'bbox',['path'])}}}},updatePlainBBox:function(plain){if(this.attr.path){this.attr.path.getDimension(plain)}},updateTransformedBBox:function(transform){if(this.attr.path){this.attr.path.getDimensionWithTransform(this.attr.matrix,transform)}},render:function(surface,ctx){var mat=this.attr.matrix,attr=this.attr;if(!attr.path||attr.path.params.length===0){return}
mat.toContext(ctx);ctx.appendPath(attr.path);ctx.fillStroke(attr);var debug=attr.debug||this.statics().debug||Ext.draw.sprite.Sprite.debug;if(debug){if(debug.bbox){this.renderBBox(surface,ctx)}
if(debug.xray){this.renderXRay(surface,ctx)}}},renderXRay:function(surface,ctx){var attr=this.attr,mat=attr.matrix,imat=attr.inverseMatrix,path=attr.path,commands=path.commands,params=path.params,ln=commands.length,twoPi=Math.PI*2,size=2,i,j;mat.toContext(ctx);ctx.beginPath();for(i=0,j=0;i<ln;i++){switch(commands[i]){case 'M':ctx.moveTo(params[j]-size,params[j+1]-size);ctx.rect(params[j]-size,params[j+1]-size,size*2,size*2);j+=2;break;case 'L':ctx.moveTo(params[j]-size,params[j+1]-size);ctx.rect(params[j]-size,params[j+1]-size,size*2,size*2);j+=2;break;case 'C':ctx.moveTo(params[j]+size,params[j+1]);ctx.arc(params[j],params[j+1],size,0,twoPi,!0);j+=2;ctx.moveTo(params[j]+size,params[j+1]);ctx.arc(params[j],params[j+1],size,0,twoPi,!0);j+=2;ctx.moveTo(params[j]+size*2,params[j+1]);ctx.rect(params[j]-size,params[j+1]-size,size*2,size*2);j+=2;break;default:}}
imat.toContext(ctx);ctx.strokeStyle='black';ctx.strokeOpacity=1;ctx.lineWidth=1;ctx.stroke();mat.toContext(ctx);ctx.beginPath();for(i=0,j=0;i<ln;i++){switch(commands[i]){case 'M':ctx.moveTo(params[j],params[j+1]);j+=2;break;case 'L':ctx.moveTo(params[j],params[j+1]);j+=2;break;case 'C':ctx.lineTo(params[j],params[j+1]);j+=2;ctx.moveTo(params[j],params[j+1]);j+=2;ctx.lineTo(params[j],params[j+1]);j+=2;break;default:}}
imat.toContext(ctx);ctx.lineWidth=0.5;ctx.stroke()},updatePath:function(path,attr){}})
;
Ext.define('Ext.draw.overrides.hittest.sprite.Path',{override:'Ext.draw.sprite.Path',requires:['Ext.draw.Color'],isPointInPath:function(x,y){var attr=this.attr,path,matrix,params,result;if(attr.fillStyle===Ext.util.Color.RGBA_NONE){return this.isPointOnPath(x,y)}
path=attr.path;matrix=attr.matrix;if(!matrix.isIdentity()){params=path.params.slice(0);path.transform(attr.matrix)}
result=path.isPointInPath(x,y);if(params){path.params=params}
return result},isPointOnPath:function(x,y){var attr=this.attr,path=attr.path,matrix=attr.matrix,params,result;if(!matrix.isIdentity()){params=path.params.slice(0);path.transform(attr.matrix)}
result=path.isPointOnPath(x,y);if(params){path.params=params}
return result},hitTest:function(point,options){var me=this,attr=me.attr,path=attr.path,matrix=attr.matrix,x=point[0],y=point[1],parentResult=me.callParent([point,options]),result=null,params,isFilled;if(!parentResult){return result}
options=options||Ext.draw.sprite.Sprite.defaultHitTestOptions;if(!matrix.isIdentity()){params=path.params.slice(0);path.transform(attr.matrix)}
if(options.fill&&options.stroke){isFilled=attr.fillStyle!==Ext.util.Color.NONE&&attr.fillStyle!==Ext.util.Color.RGBA_NONE;if(isFilled){if(path.isPointInPath(x,y)){result={sprite:me}}}else{if(path.isPointInPath(x,y)||path.isPointOnPath(x,y)){result={sprite:me}}}}else if(options.stroke&&!options.fill){if(path.isPointOnPath(x,y)){result={sprite:me}}}else if(options.fill&&!options.stroke){if(path.isPointInPath(x,y)){result={sprite:me}}}
if(params){path.params=params}
return result},getIntersections:function(path){if(!(path.isSprite&&path.isPath)){return[]}
var aAttr=this.attr,bAttr=path.attr,aPath=aAttr.path,bPath=bAttr.path,aMatrix=aAttr.matrix,bMatrix=bAttr.matrix,aParams,bParams,intersections;if(!aMatrix.isIdentity()){aParams=aPath.params.slice(0);aPath.transform(aAttr.matrix)}
if(!bMatrix.isIdentity()){bParams=bPath.params.slice(0);bPath.transform(bAttr.matrix)}
intersections=aPath.getIntersections(bPath);if(aParams){aPath.params=aParams}
if(bParams){bPath.params=bParams}
return intersections}})
;
Ext.define('Ext.draw.sprite.Circle',{extend:'Ext.draw.sprite.Path',alias:'sprite.circle',type:'circle',inheritableStatics:{def:{processors:{cx:'number',cy:'number',r:'number'},aliases:{radius:'r',x:'cx',y:'cy',centerX:'cx',centerY:'cy'},defaults:{cx:0,cy:0,r:4},triggers:{cx:'path',cy:'path',r:'path'}}},updatePlainBBox:function(plain){var attr=this.attr,cx=attr.cx,cy=attr.cy,r=attr.r;plain.x=cx-r;plain.y=cy-r;plain.width=r+r;plain.height=r+r},updateTransformedBBox:function(transform){var attr=this.attr,cx=attr.cx,cy=attr.cy,r=attr.r,matrix=attr.matrix,scaleX=matrix.getScaleX(),scaleY=matrix.getScaleY(),rx,ry;rx=scaleX*r;ry=scaleY*r;transform.x=matrix.x(cx,cy)-rx;transform.y=matrix.y(cx,cy)-ry;transform.width=rx+rx;transform.height=ry+ry},updatePath:function(path,attr){path.arc(attr.cx,attr.cy,attr.r,0,Math.PI*2,!1)}})
;
Ext.define('Ext.draw.sprite.Arc',{extend:'Ext.draw.sprite.Circle',alias:'sprite.arc',type:'arc',inheritableStatics:{def:{processors:{startAngle:'number',endAngle:'number',anticlockwise:'bool'},aliases:{from:'startAngle',to:'endAngle',start:'startAngle',end:'endAngle'},defaults:{startAngle:0,endAngle:Math.PI*2,anticlockwise:!1},triggers:{startAngle:'path',endAngle:'path',anticlockwise:'path'}}},updatePath:function(path,attr){path.arc(attr.cx,attr.cy,attr.r,attr.startAngle,attr.endAngle,attr.anticlockwise)}})
;
Ext.define('Ext.draw.sprite.Arrow',{extend:'Ext.draw.sprite.Path',alias:'sprite.arrow',inheritableStatics:{def:{processors:{x:'number',y:'number',size:'number'},defaults:{x:0,y:0,size:4},triggers:{x:'path',y:'path',size:'path'}}},updatePath:function(path,attr){var s=attr.size*1.5,x=attr.x-attr.lineWidth/2,y=attr.y;path.fromSvgString('M'.concat(x-s*0.7,',',y-s*0.4,'l',[s*0.6,0,0,-s*0.4,s,s*0.8,-s,s*0.8,0,-s*0.4,-s*0.6,0],'z'))}})
;
Ext.define('Ext.draw.sprite.Composite',{extend:'Ext.draw.sprite.Sprite',alias:'sprite.composite',type:'composite',isComposite:!0,config:{sprites:[]},constructor:function(config){this.sprites=[];this.map={};this.callParent([config])},addSprite:function(sprite){var i=0,attr,results,oldTransformations;if(Ext.isArray(sprite)){results=[];while(i<sprite.length){results.push(this.addSprite(sprite[i++]))}
return results}
if(sprite&&sprite.type&&!sprite.isSprite){sprite=Ext.create('sprite.'+sprite.type,sprite)}
if(!sprite||!sprite.isSprite||sprite.isComposite){return null}
sprite.setSurface(null);sprite.setParent(this);attr=this.attr;oldTransformations=sprite.applyTransformations;sprite.applyTransformations=function(force){if(sprite.attr.dirtyTransform){attr.dirtyTransform=!0;attr.bbox.plain.dirty=!0;attr.bbox.transform.dirty=!0}
oldTransformations.call(sprite,force)};this.sprites.push(sprite);this.map[sprite.id]=sprite.getId();attr.bbox.plain.dirty=!0;attr.bbox.transform.dirty=!0;return sprite},add:function(sprite){return this.addSprite(sprite)},removeSprite:function(sprite,isDestroy){var me=this,id,isOwnSprite;if(sprite){if(sprite.charAt){sprite=me.map[sprite]}
if(!sprite||!sprite.isSprite){return null}
if(sprite.destroyed||sprite.destroying){return sprite}
id=sprite.getId();isOwnSprite=me.map[id];delete me.map[id];if(isDestroy){sprite.destroy()}
if(!isOwnSprite){return sprite}
sprite.setParent(null);Ext.Array.remove(me.sprites,sprite);me.dirtyZIndex=!0;me.setDirty(!0)}
return sprite||null},addAll:function(sprites){var i=0;if(sprites.isSprite||sprites.type){this.add(sprites)}else if(Ext.isArray(sprites)){while(i<sprites.length){this.add(sprites[i++])}}},updatePlainBBox:function(plain){var me=this,left=Infinity,right=-Infinity,top=Infinity,bottom=-Infinity,sprite,bbox,i,ln;for(i=0,ln=me.sprites.length;i<ln;i++){sprite=me.sprites[i];sprite.applyTransformations();bbox=sprite.getBBox();if(left>bbox.x){left=bbox.x}
if(right<bbox.x+bbox.width){right=bbox.x+bbox.width}
if(top>bbox.y){top=bbox.y}
if(bottom<bbox.y+bbox.height){bottom=bbox.y+bbox.height}}
plain.x=left;plain.y=top;plain.width=right-left;plain.height=bottom-top},isVisible:function(){var attr=this.attr,parent=this.getParent(),hasParent=parent&&(parent.isSurface||parent.isVisible()),isSeen=hasParent&&!attr.hidden&&attr.globalAlpha;return!!isSeen},render:function(surface,ctx,rect){var me=this,attr=me.attr,mat=me.attr.matrix,sprites=me.sprites,ln=sprites.length,i=0;mat.toContext(ctx);for(;i<ln;i++){surface.renderSprite(sprites[i],rect)}
var debug=attr.debug||me.statics().debug||Ext.draw.sprite.Sprite.debug;if(debug){attr.inverseMatrix.toContext(ctx);if(debug.bbox){me.renderBBox(surface,ctx)}}},destroy:function(){var me=this,sprites=me.sprites,ln=sprites.length,i;for(i=0;i<ln;i++){sprites[i].destroy()}
sprites.length=0;me.callParent()}})
;
Ext.define('Ext.draw.sprite.Cross',{extend:'Ext.draw.sprite.Path',alias:'sprite.cross',inheritableStatics:{def:{processors:{x:'number',y:'number',size:'number'},defaults:{x:0,y:0,size:4},triggers:{x:'path',y:'path',size:'path'}}},updatePath:function(path,attr){var s=attr.size/1.7,x=attr.x-attr.lineWidth/2,y=attr.y;path.fromSvgString('M'.concat(x-s,',',y,'l',[-s,-s,s,-s,s,s,s,-s,s,s,-s,s,s,s,-s,s,-s,-s,-s,s,-s,-s,'z']))}})
;
Ext.define('Ext.draw.sprite.Diamond',{extend:'Ext.draw.sprite.Path',alias:'sprite.diamond',inheritableStatics:{def:{processors:{x:'number',y:'number',size:'number'},defaults:{x:0,y:0,size:4},triggers:{x:'path',y:'path',size:'path'}}},updatePath:function(path,attr){var s=attr.size*1.25,x=attr.x-attr.lineWidth/2,y=attr.y;path.fromSvgString(['M',x,y-s,'l',s,s,-s,s,-s,-s,s,-s,'z'])}})
;
Ext.define("Ext.draw.sprite.Ellipse",{extend:"Ext.draw.sprite.Path",alias:'sprite.ellipse',type:'ellipse',inheritableStatics:{def:{processors:{cx:"number",cy:"number",rx:"number",ry:"number",axisRotation:"number"},aliases:{radius:"r",x:"cx",y:"cy",centerX:"cx",centerY:"cy",radiusX:"rx",radiusY:"ry"},defaults:{cx:0,cy:0,rx:1,ry:1,axisRotation:0},triggers:{cx:'path',cy:'path',rx:'path',ry:'path',axisRotation:'path'}}},updatePlainBBox:function(plain){var attr=this.attr,cx=attr.cx,cy=attr.cy,rx=attr.rx,ry=attr.ry;plain.x=cx-rx;plain.y=cy-ry;plain.width=rx+rx;plain.height=ry+ry},updateTransformedBBox:function(transform){var attr=this.attr,cx=attr.cx,cy=attr.cy,rx=attr.rx,ry=attr.ry,rxy=ry/rx,matrix=attr.matrix.clone(),xx,xy,yx,yy,dx,dy,w,h;matrix.append(1,0,0,rxy,0,cy*(1-rxy));xx=matrix.getXX();yx=matrix.getYX();dx=matrix.getDX();xy=matrix.getXY();yy=matrix.getYY();dy=matrix.getDY();w=Math.sqrt(xx*xx+yx*yx)*rx;h=Math.sqrt(xy*xy+yy*yy)*rx;transform.x=cx*xx+cy*yx+dx-w;transform.y=cx*xy+cy*yy+dy-h;transform.width=w+w;transform.height=h+h},updatePath:function(path,attr){path.ellipse(attr.cx,attr.cy,attr.rx,attr.ry,attr.axisRotation,0,Math.PI*2,!1)}})
;
Ext.define('Ext.draw.sprite.EllipticalArc',{extend:'Ext.draw.sprite.Ellipse',alias:'sprite.ellipticalArc',type:'ellipticalArc',inheritableStatics:{def:{processors:{startAngle:'number',endAngle:'number',anticlockwise:'bool'},aliases:{from:'startAngle',to:'endAngle',start:'startAngle',end:'endAngle'},defaults:{startAngle:0,endAngle:Math.PI*2,anticlockwise:!1},triggers:{startAngle:'path',endAngle:'path',anticlockwise:'path'}}},updatePath:function(path,attr){path.ellipse(attr.cx,attr.cy,attr.rx,attr.ry,attr.axisRotation,attr.startAngle,attr.endAngle,attr.anticlockwise)}})
;
Ext.define('Ext.draw.sprite.Rect',{extend:'Ext.draw.sprite.Path',alias:'sprite.rect',type:'rect',inheritableStatics:{def:{processors:{x:'number',y:'number',width:'number',height:'number',radius:'number'},aliases:{},triggers:{x:'path',y:'path',width:'path',height:'path',radius:'path'},defaults:{x:0,y:0,width:8,height:8,radius:0}}},updatePlainBBox:function(plain){var attr=this.attr;plain.x=attr.x;plain.y=attr.y;plain.width=attr.width;plain.height=attr.height},updateTransformedBBox:function(transform,plain){this.attr.matrix.transformBBox(plain,this.attr.radius,transform)},updatePath:function(path,attr){var x=attr.x,y=attr.y,width=attr.width,height=attr.height,radius=Math.min(attr.radius,Math.abs(height)*0.5,Math.abs(width)*0.5);if(radius===0){path.rect(x,y,width,height)}else{path.moveTo(x+radius,y);path.arcTo(x+width,y,x+width,y+height,radius);path.arcTo(x+width,y+height,x,y+height,radius);path.arcTo(x,y+height,x,y,radius);path.arcTo(x,y,x+radius,y,radius);path.closePath()}}})
;
Ext.define('Ext.draw.sprite.Image',{extend:'Ext.draw.sprite.Rect',alias:'sprite.image',type:'image',statics:{imageLoaders:{}},inheritableStatics:{def:{processors:{src:'string'},triggers:{src:'src'},updaters:{src:'updateSource'},defaults:{src:'',width:null,height:null}}},updateSurface:function(surface){if(surface){this.updateSource(this.attr)}},updateSource:function(attr){var me=this,src=attr.src,surface=me.getSurface(),loadingStub=Ext.draw.sprite.Image.imageLoaders[src],width=attr.width,height=attr.height,imageLoader,i;if(!surface){return}
if(!loadingStub){imageLoader=new Image();loadingStub=Ext.draw.sprite.Image.imageLoaders[src]={image:imageLoader,done:!1,pendingSprites:[me],pendingSurfaces:[surface]};imageLoader.width=width;imageLoader.height=height;imageLoader.onload=function(){var item;if(!loadingStub.done){loadingStub.done=!0;for(i=0;i<loadingStub.pendingSprites.length;i++){item=loadingStub.pendingSprites[i];if(!item.destroyed){item.setDirty(!0)}}
for(i=0;i<loadingStub.pendingSurfaces.length;i++){item=loadingStub.pendingSurfaces[i];if(!item.destroyed){item.renderFrame()}}}};imageLoader.src=src}else{Ext.Array.include(loadingStub.pendingSprites,me);Ext.Array.include(loadingStub.pendingSurfaces,surface)}},render:function(surface,ctx){var me=this,attr=me.attr,mat=attr.matrix,src=attr.src,x=attr.x,y=attr.y,width=attr.width,height=attr.height,loadingStub=Ext.draw.sprite.Image.imageLoaders[src],image;if(loadingStub&&loadingStub.done){mat.toContext(ctx);image=loadingStub.image;ctx.drawImage(image,x,y,width||(image.naturalWidth||image.width)/surface.devicePixelRatio,height||(image.naturalHeight||image.height)/surface.devicePixelRatio)}
var debug=attr.debug||this.statics().debug||Ext.draw.sprite.Sprite.debug;if(debug&&debug.bbox){this.renderBBox(surface,ctx)}},isVisible:function(){var attr=this.attr,parent=this.getParent(),hasParent=parent&&(parent.isSurface||parent.isVisible()),isSeen=hasParent&&!attr.hidden&&attr.globalAlpha;return!!isSeen}})
;
Ext.define('Ext.draw.sprite.Instancing',{extend:'Ext.draw.sprite.Sprite',alias:'sprite.instancing',type:'instancing',isInstancing:!0,config:{template:null,instances:null},instances:null,applyTemplate:function(template){var surface;if(!Ext.isObject(template)){Ext.raise("A template of an instancing sprite must either be "+"a sprite instance or a valid config object from which a template "+"sprite will be created.")}else if(template.isInstancing||template.isComposite){Ext.raise("Can't use an instancing or composite sprite "+"as a template for an instancing sprite.")}
if(!template.isSprite){if(!template.xclass&&!template.type){template.type='circle'}
template=Ext.create(template.xclass||'sprite.'+template.type,template)}
surface=template.getSurface();if(surface){surface.remove(template)}
template.setParent(this);return template},updateTemplate:function(template,oldTemplate){if(oldTemplate){delete oldTemplate.ownAttr}
template.setSurface(this.getSurface());template.ownAttr=template.attr;this.clearAll();this.setDirty(!0)},updateInstances:function(instances){var i,ln;this.clearAll();if(Ext.isArray(instances)){for(i=0,ln=instances.length;i<ln;i++){this.add(instances[i])}}},updateSurface:function(surface){var template=this.getTemplate();if(template&&!template.destroyed){template.setSurface(surface)}},get:function(index){return this.instances[index]},getCount:function(){return this.instances.length},clearAll:function(){var template=this.getTemplate();template.attr.children=this.instances=[];this.position=0},createInstance:function(config,bypassNormalization,avoidCopy){return this.add(config,bypassNormalization,avoidCopy)},add:function(config,bypassNormalization,avoidCopy){var me=this,template=me.getTemplate(),originalAttr=template.attr,attr=Ext.Object.chain(originalAttr);template.modifiers.target.prepareAttributes(attr);template.attr=attr;template.setAttributes(config,bypassNormalization,avoidCopy);attr.template=template;me.instances.push(attr);template.attr=originalAttr;me.position++;return attr},getBBox:function(){return null},getBBoxFor:function(index,isWithoutTransform){var template=this.getTemplate(),originalAttr=template.attr,bbox;template.attr=this.instances[index];bbox=template.getBBox(isWithoutTransform);template.attr=originalAttr;return bbox},isVisible:function(){var attr=this.attr,parent=this.getParent(),result;result=parent&&parent.isSurface&&!attr.hidden&&attr.globalAlpha;return!!result},isInstanceVisible:function(index){var me=this,template=me.getTemplate(),originalAttr=template.attr,instances=me.instances,result=!1;if(!Ext.isNumber(index)||index<0||index>=instances.length||!me.isVisible()){return result}
template.attr=instances[index];result=template.isVisible(point,options);template.attr=originalAttr;return result},render:function(surface,ctx,rect){if(!this.getTemplate()){Ext.raise('An instancing sprite must have a template.')}
var me=this,template=me.getTemplate(),surfaceRect=surface.getRect(),mat=me.attr.matrix,originalAttr=template.attr,instances=me.instances,ln=me.position,i;mat.toContext(ctx);template.preRender(surface,ctx,rect);template.useAttributes(ctx,surfaceRect);template.isSpriteInstance=!0;for(i=0;i<ln;i++){if(instances[i].hidden){continue}
ctx.save();template.attr=instances[i];template.useAttributes(ctx,surfaceRect);template.render(surface,ctx,rect);ctx.restore()}
template.isSpriteInstance=!1;template.attr=originalAttr},setAttributesFor:function(index,changes,bypassNormalization){var template=this.getTemplate(),originalAttr=template.attr,attr=this.instances[index];if(!attr){return}
template.attr=attr;if(bypassNormalization){changes=Ext.apply({},changes)}else{changes=template.self.def.normalize(changes)}
template.modifiers.target.pushDown(attr,changes);template.attr=originalAttr},destroy:function(){var me=this,template=me.getTemplate();me.instances=null;if(template){template.destroy()}
me.callParent()}})
;
Ext.define('Ext.draw.overrides.hittest.sprite.Instancing',{override:'Ext.draw.sprite.Instancing',hitTest:function(point,options){var me=this,template=me.getTemplate(),originalAttr=template.attr,instances=me.instances,ln=instances.length,i=0,result=null;if(!me.isVisible()){return result}
for(;i<ln;i++){template.attr=instances[i];result=template.hitTest(point,options);if(result){result.isInstance=!0;result.template=result.sprite;result.sprite=this;result.instance=instances[i];result.index=i;return result}}
template.attr=originalAttr;return result}})
;
Ext.define('Ext.draw.sprite.Line',{extend:'Ext.draw.sprite.Sprite',alias:'sprite.line',type:'line',inheritableStatics:{def:{processors:{fromX:'number',fromY:'number',toX:'number',toY:'number',crisp:'bool'},defaults:{fromX:0,fromY:0,toX:1,toY:1,crisp:!1,strokeStyle:'black'},aliases:{x1:'fromX',y1:'fromY',x2:'toX',y2:'toY'},triggers:{crisp:'bbox'}}},updateLineBBox:function(bbox,isTransform,x1,y1,x2,y2){var attr=this.attr,matrix=attr.matrix,halfLineWidth=attr.lineWidth/2,fromX,fromY,toX,toY,p,angle,sin,cos,dx,dy;if(attr.crisp){x1=this.align(x1);x2=this.align(x2);y1=this.align(y1);y2=this.align(y2)}
if(isTransform){p=matrix.transformPoint([x1,y1]);x1=p[0];y1=p[1];p=matrix.transformPoint([x2,y2]);x2=p[0];y2=p[1]}
fromX=Math.min(x1,x2);toX=Math.max(x1,x2);fromY=Math.min(y1,y2);toY=Math.max(y1,y2);angle=Math.atan2(toX-fromX,toY-fromY);sin=Math.sin(angle);cos=Math.cos(angle);dx=halfLineWidth*cos;dy=halfLineWidth*sin;fromX-=dx;fromY-=dy;toX+=dx;toY+=dy;bbox.x=fromX;bbox.y=fromY;bbox.width=toX-fromX;bbox.height=toY-fromY},updatePlainBBox:function(plain){var attr=this.attr;this.updateLineBBox(plain,!1,attr.fromX,attr.fromY,attr.toX,attr.toY)},updateTransformedBBox:function(transform,plain){var attr=this.attr;this.updateLineBBox(transform,!0,attr.fromX,attr.fromY,attr.toX,attr.toY)},align:function(x){return Math.round(x)-0.5},render:function(surface,ctx){var me=this,attr=me.attr,matrix=attr.matrix;matrix.toContext(ctx);ctx.beginPath();if(attr.crisp){ctx.moveTo(me.align(attr.fromX),me.align(attr.fromY));ctx.lineTo(me.align(attr.toX),me.align(attr.toY))}else{ctx.moveTo(attr.fromX,attr.fromY);ctx.lineTo(attr.toX,attr.toY)}
ctx.stroke();var debug=attr.debug||this.statics().debug||Ext.draw.sprite.Sprite.debug;if(debug){this.attr.inverseMatrix.toContext(ctx);if(debug.bbox){this.renderBBox(surface,ctx)}}}})
;
Ext.define('Ext.draw.sprite.Plus',{extend:'Ext.draw.sprite.Path',alias:'sprite.plus',inheritableStatics:{def:{processors:{x:'number',y:'number',size:'number'},defaults:{x:0,y:0,size:4},triggers:{x:'path',y:'path',size:'path'}}},updatePath:function(path,attr){var s=attr.size/1.3,x=attr.x-attr.lineWidth/2,y=attr.y;path.fromSvgString('M'.concat(x-s/2,',',y-s/2,'l',[0,-s,s,0,0,s,s,0,0,s,-s,0,0,s,-s,0,0,-s,-s,0,0,-s,'z']))}})
;
Ext.define('Ext.draw.sprite.Sector',{extend:'Ext.draw.sprite.Path',alias:'sprite.sector',type:'sector',inheritableStatics:{def:{processors:{centerX:'number',centerY:'number',startAngle:'number',endAngle:'number',startRho:'number',endRho:'number',margin:'number'},aliases:{rho:'endRho'},triggers:{centerX:'path,bbox',centerY:'path,bbox',startAngle:'path,bbox',endAngle:'path,bbox',startRho:'path,bbox',endRho:'path,bbox',margin:'path,bbox'},defaults:{centerX:0,centerY:0,startAngle:0,endAngle:0,startRho:0,endRho:150,margin:0,path:'M 0,0'}}},getMidAngle:function(){return this.midAngle||0},updatePath:function(path,attr){var startAngle=Math.min(attr.startAngle,attr.endAngle),endAngle=Math.max(attr.startAngle,attr.endAngle),midAngle=this.midAngle=(startAngle+endAngle)*0.5,fullPie=Ext.Number.isEqual(Math.abs(endAngle-startAngle),Ext.draw.Draw.pi2,1e-10),margin=attr.margin,centerX=attr.centerX,centerY=attr.centerY,startRho=Math.min(attr.startRho,attr.endRho),endRho=Math.max(attr.startRho,attr.endRho);if(margin){centerX+=margin*Math.cos(midAngle);centerY+=margin*Math.sin(midAngle)}
if(!fullPie){path.moveTo(centerX+startRho*Math.cos(startAngle),centerY+startRho*Math.sin(startAngle));path.lineTo(centerX+endRho*Math.cos(startAngle),centerY+endRho*Math.sin(startAngle))}
path.arc(centerX,centerY,endRho,startAngle,endAngle,!1);path[fullPie?'moveTo':'lineTo'](centerX+startRho*Math.cos(endAngle),centerY+startRho*Math.sin(endAngle));path.arc(centerX,centerY,startRho,endAngle,startAngle,!0)}})
;
Ext.define('Ext.draw.sprite.Square',{extend:'Ext.draw.sprite.Path',alias:'sprite.square',inheritableStatics:{def:{processors:{x:'number',y:'number',size:'number'},defaults:{x:0,y:0,size:4},triggers:{x:'path',y:'path',size:'size'}}},updatePath:function(path,attr){var size=attr.size*1.2,s=size*2,x=attr.x-attr.lineWidth/2,y=attr.y;path.fromSvgString('M'.concat(x-size,',',y-size,'l',[s,0,0,s,-s,0,0,-s,'z']))}})
;
Ext.define('Ext.draw.TextMeasurer',{singleton:!0,requires:['Ext.util.TextMetrics'],measureDiv:null,measureCache:{},precise:Ext.isIE8,measureDivTpl:{id:'ext-draw-text-measurer',tag:'div',style:{overflow:'hidden',position:'relative','float':'left',width:0,height:0},'data-sticky':!0,children:{tag:'div',style:{display:'block',position:'absolute',x:-100000,y:-100000,padding:0,margin:0,'z-index':-100000,'white-space':'nowrap'}}},actualMeasureText:function(text,font){var me=Ext.draw.TextMeasurer,measureDiv=me.measureDiv,FARAWAY=100000,size,parent;if(!measureDiv){parent=Ext.Element.create({'data-sticky':!0,style:{"overflow":"hidden","position":"relative","float":"left","width":0,"height":0}});me.measureDiv=measureDiv=Ext.Element.create({style:{"position":'absolute',"x":FARAWAY,"y":FARAWAY,"z-index":-FARAWAY,"white-space":"nowrap","display":'block',"padding":0,"margin":0}});Ext.getBody().appendChild(parent);parent.appendChild(measureDiv)}
if(font){measureDiv.setStyle({font:font,lineHeight:'normal'})}
measureDiv.setText('('+text+')');size=measureDiv.getSize();measureDiv.setText('()');size.width-=measureDiv.getSize().width;return size},measureTextSingleLine:function(text,font){var width=0,height=0,cache,cachedItem,chars,charactor,i,ln,size;if(this.precise){return this.preciseMeasureTextSingleLine(text,font)}
text=text.toString();cache=this.measureCache;chars=text.split('');if(!cache[font]){cache[font]={}}
cache=cache[font];if(cache[text]){return cache[text]}
for(i=0,ln=chars.length;i<ln;i++){charactor=chars[i];if(!(cachedItem=cache[charactor])){size=this.actualMeasureText(charactor,font);cachedItem=cache[charactor]=size}
width+=cachedItem.width;height=Math.max(height,cachedItem.height)}
return cache[text]={width:width,height:height}},preciseMeasureTextSingleLine:function(text,font){var measureDiv;text=text.toString();measureDiv=this.measureDiv||(this.measureDiv=Ext.getBody().createChild(this.measureDivTpl).down('div'));measureDiv.setStyle({font:font||''});return Ext.util.TextMetrics.measure(measureDiv,text)},measureText:function(text,font){var lines=text.split('\n'),ln=lines.length,height=0,width=0,line,i,sizes;if(ln===1){return this.measureTextSingleLine(text,font)}
sizes=[];for(i=0;i<ln;i++){line=this.measureTextSingleLine(lines[i],font);sizes.push(line);height+=line.height;width=Math.max(width,line.width)}
return{width:width,height:height,sizes:sizes}}})
;
Ext.define('Ext.draw.sprite.Text',function(){var fontSizes={'xx-small':!0,'x-small':!0,'small':!0,'medium':!0,'large':!0,'x-large':!0,'xx-large':!0},fontWeights={normal:!0,bold:!0,bolder:!0,lighter:!0,100:!0,200:!0,300:!0,400:!0,500:!0,600:!0,700:!0,800:!0,900:!0},textAlignments={start:'start',left:'start',center:'center',middle:'center',end:'end',right:'end'},textBaselines={top:'top',hanging:'hanging',middle:'middle',center:'middle',alphabetic:'alphabetic',ideographic:'ideographic',bottom:'bottom'};return{extend:'Ext.draw.sprite.Sprite',requires:['Ext.draw.TextMeasurer','Ext.draw.Color'],alias:'sprite.text',type:'text',lineBreakRe:/\r?\n/g,statics:{debug:!1,fontSizes:fontSizes,fontWeights:fontWeights,textAlignments:textAlignments,textBaselines:textBaselines},inheritableStatics:{def:{animationProcessors:{text:'text'},processors:{x:'number',y:'number',text:'string',fontSize:function(n){if(Ext.isNumber(+n)){return n+'px'}else if(n.match(Ext.dom.Element.unitRe)){return n}else if(n in fontSizes){return n}},fontStyle:'enums(,italic,oblique)',fontVariant:'enums(,small-caps)',fontWeight:function(n){if(n in fontWeights){return String(n)}else{return''}},fontFamily:'string',textAlign:function(n){return textAlignments[n]||'center'},textBaseline:function(n){return textBaselines[n]||'alphabetic'},debug:'default',font:'string'},aliases:{'font-size':'fontSize','font-family':'fontFamily','font-weight':'fontWeight','font-variant':'fontVariant','text-anchor':'textAlign','dominant-baseline':'textBaseline'},defaults:{fontStyle:'',fontVariant:'',fontWeight:'',fontSize:'10px',fontFamily:'sans-serif',font:'10px sans-serif',textBaseline:'alphabetic',textAlign:'start',strokeStyle:'rgba(0, 0, 0, 0)',fillStyle:'#000',x:0,y:0,text:''},triggers:{fontStyle:'fontX,bbox',fontVariant:'fontX,bbox',fontWeight:'fontX,bbox',fontSize:'fontX,bbox',fontFamily:'fontX,bbox',font:'font,bbox,canvas',textBaseline:'bbox',textAlign:'bbox',x:'bbox',y:'bbox',text:'bbox'},updaters:{fontX:'makeFontShorthand',font:'parseFontShorthand'}}},config:{preciseMeasurement:undefined},constructor:function(config){var key;if(config&&config.font){config=Ext.clone(config);for(key in config){if(key!=='font'&&key.indexOf('font')===0){delete config[key]}}}
Ext.draw.sprite.Sprite.prototype.constructor.call(this,config)},fontValuesMap:{'italic':'fontStyle','oblique':'fontStyle','small-caps':'fontVariant','bold':'fontWeight','bolder':'fontWeight','lighter':'fontWeight','100':'fontWeight','200':'fontWeight','300':'fontWeight','400':'fontWeight','500':'fontWeight','600':'fontWeight','700':'fontWeight','800':'fontWeight','900':'fontWeight','xx-small':'fontSize','x-small':'fontSize','small':'fontSize','medium':'fontSize','large':'fontSize','x-large':'fontSize','xx-large':'fontSize'},makeFontShorthand:function(attr){var parts=[];if(attr.fontStyle){parts.push(attr.fontStyle)}
if(attr.fontVariant){parts.push(attr.fontVariant)}
if(attr.fontWeight){parts.push(attr.fontWeight)}
if(attr.fontSize){parts.push(attr.fontSize)}
if(attr.fontFamily){parts.push(attr.fontFamily)}
this.setAttributes({font:parts.join(' ')},!0)},parseFontShorthand:function(attr){var value=attr.font,ln=value.length,changes={},dispatcher=this.fontValuesMap,start=0,end,slashIndex,part,fontProperty;while(start<ln&&end!==-1){end=value.indexOf(' ',start);if(end<0){part=value.substr(start)}else if(end>start){part=value.substr(start,end-start)}else{continue}
slashIndex=part.indexOf('/');if(slashIndex>0){part=part.substr(0,slashIndex)}else if(slashIndex===0){continue}
if(part!=='normal'&&part!=='inherit'){fontProperty=dispatcher[part];if(fontProperty){changes[fontProperty]=part}else if(part.match(Ext.dom.Element.unitRe)){changes.fontSize=part}else{changes.fontFamily=value.substr(start);break}}
start=end+1}
if(!changes.fontStyle){changes.fontStyle=''}
if(!changes.fontVariant){changes.fontVariant=''}
if(!changes.fontWeight){changes.fontWeight=''}
this.setAttributes(changes,!0)},fontProperties:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,fontFamily:!0},setAttributes:function(changes,bypassNormalization,avoidCopy){var key,obj;if(changes&&changes.font){obj={};for(key in changes){if(!(key in this.fontProperties)){obj[key]=changes[key]}}
changes=obj}
this.callParent([changes,bypassNormalization,avoidCopy])},getBBox:function(isWithoutTransform){var me=this,plain=me.attr.bbox.plain,surface=me.getSurface();if(plain.dirty){me.updatePlainBBox(plain);plain.dirty=!1}
if(surface&&surface.getInherited().rtl&&surface.getFlipRtlText()){me.updatePlainBBox(plain,!0)}
return me.callParent([isWithoutTransform])},rtlAlignments:{start:'end',center:'center',end:'start'},updatePlainBBox:function(plain,useOldSize){var me=this,attr=me.attr,x=attr.x,y=attr.y,dx=[],font=attr.font,text=attr.text,baseline=attr.textBaseline,alignment=attr.textAlign,precise=me.getPreciseMeasurement(),size,textMeasurerPrecision;if(useOldSize&&me.oldSize){size=me.oldSize}else{textMeasurerPrecision=Ext.draw.TextMeasurer.precise;if(Ext.isBoolean(precise)){Ext.draw.TextMeasurer.precise=precise}
size=me.oldSize=Ext.draw.TextMeasurer.measureText(text,font);Ext.draw.TextMeasurer.precise=textMeasurerPrecision}
var surface=me.getSurface(),isRtl=(surface&&surface.getInherited().rtl)||!1,flipRtlText=isRtl&&surface.getFlipRtlText(),sizes=size.sizes,blockHeight=size.height,blockWidth=size.width,ln=sizes?sizes.length:0,lineWidth,rect,i=0;switch(baseline){case 'hanging':case 'top':break;case 'ideographic':case 'bottom':y-=blockHeight;break;case 'alphabetic':y-=blockHeight*0.8;break;case 'middle':y-=blockHeight*0.5;break}
if(flipRtlText){rect=surface.getRect();x=rect[2]-rect[0]-x;alignment=me.rtlAlignments[alignment]}
switch(alignment){case 'start':if(isRtl){for(;i<ln;i++){lineWidth=sizes[i].width;dx.push(-(blockWidth-lineWidth))}}
break;case 'end':x-=blockWidth;if(isRtl){break}
for(;i<ln;i++){lineWidth=sizes[i].width;dx.push(blockWidth-lineWidth)}
break;case 'center':x-=blockWidth*0.5;for(;i<ln;i++){lineWidth=sizes[i].width;dx.push((isRtl?-1:1)*(blockWidth-lineWidth)*0.5)}
break}
attr.textAlignOffsets=dx;plain.x=x;plain.y=y;plain.width=blockWidth;plain.height=blockHeight},setText:function(text){this.setAttributes({text:text},!0)},render:function(surface,ctx,rect){var me=this,attr=me.attr,mat=Ext.draw.Matrix.fly(attr.matrix.elements.slice(0)),bbox=me.getBBox(!0),dx=attr.textAlignOffsets,none=Ext.util.Color.RGBA_NONE,x,y,i,lines,lineHeight;if(attr.text.length===0){return}
lines=attr.text.split(me.lineBreakRe);lineHeight=bbox.height/lines.length;x=attr.bbox.plain.x;y=attr.bbox.plain.y+lineHeight*0.78;mat.toContext(ctx);if(surface.getInherited().rtl){x+=attr.bbox.plain.width}
for(i=0;i<lines.length;i++){if(ctx.fillStyle!==none){ctx.fillText(lines[i],x+(dx[i]||0),y+lineHeight*i)}
if(ctx.strokeStyle!==none){ctx.strokeText(lines[i],x+(dx[i]||0),y+lineHeight*i)}}
var debug=attr.debug||this.statics().debug||Ext.draw.sprite.Sprite.debug;if(debug){this.attr.inverseMatrix.toContext(ctx);if(debug.bbox){me.renderBBox(surface,ctx)}}}}})
;
Ext.define('Ext.draw.sprite.Tick',{extend:'Ext.draw.sprite.Line',alias:'sprite.tick',inheritableStatics:{def:{processors:{x:'number',y:'number',size:'number'},defaults:{x:0,y:0,size:4},triggers:{x:'tick',y:'tick',size:'tick'},updaters:{tick:function(attr){var size=attr.size*1.5,halfLineWidth=attr.lineWidth/2,x=attr.x,y=attr.y;this.setAttributes({fromX:x-halfLineWidth,fromY:y-size,toX:x-halfLineWidth,toY:y+size})}}}}})
;
Ext.define('Ext.draw.sprite.Triangle',{extend:'Ext.draw.sprite.Path',alias:'sprite.triangle',inheritableStatics:{def:{processors:{x:'number',y:'number',size:'number'},defaults:{x:0,y:0,size:4},triggers:{x:'path',y:'path',size:'path'}}},updatePath:function(path,attr){var s=attr.size*2.2,x=attr.x,y=attr.y;path.fromSvgString('M'.concat(x,',',y,'m0-',s*0.48,'l',s*0.5,',',s*0.87,'-',s,',0z'))}})
;
Ext.define('Ext.draw.gradient.Linear',{extend:'Ext.draw.gradient.Gradient',requires:['Ext.draw.Color'],type:'linear',config:{degrees:0,radians:0},applyRadians:function(radians,oldRadians){if(Ext.isNumber(radians)){return radians}
return oldRadians},applyDegrees:function(degrees,oldDegrees){if(Ext.isNumber(degrees)){return degrees}
return oldDegrees},updateRadians:function(radians){this.setDegrees(Ext.draw.Draw.degrees(radians))},updateDegrees:function(degrees){this.setRadians(Ext.draw.Draw.rad(degrees))},generateGradient:function(ctx,bbox){var angle=this.getRadians(),cos=Math.cos(angle),sin=Math.sin(angle),w=bbox.width,h=bbox.height,cx=bbox.x+w*0.5,cy=bbox.y+h*0.5,stops=this.getStops(),ln=stops.length,gradient,l,i;if(Ext.isNumber(cx)&&Ext.isNumber(cy)&&h>0&&w>0){l=(Math.sqrt(h*h+w*w)*Math.abs(Math.cos(angle-Math.atan(h/w))))/2;gradient=ctx.createLinearGradient(cx+cos*l,cy+sin*l,cx-cos*l,cy-sin*l);for(i=0;i<ln;i++){gradient.addColorStop(stops[i].offset,stops[i].color)}
return gradient}
return Ext.util.Color.NONE}})
;
Ext.define('Ext.draw.gradient.Radial',{extend:'Ext.draw.gradient.Gradient',type:'radial',config:{start:{x:0,y:0,r:0},end:{x:0,y:0,r:1}},applyStart:function(newStart,oldStart){var circle;if(!oldStart){return newStart}
circle={x:oldStart.x,y:oldStart.y,r:oldStart.r};if('x' in newStart){circle.x=newStart.x}else if('centerX' in newStart){circle.x=newStart.centerX}
if('y' in newStart){circle.y=newStart.y}else if('centerY' in newStart){circle.y=newStart.centerY}
if('r' in newStart){circle.r=newStart.r}else if('radius' in newStart){circle.r=newStart.radius}
return circle},applyEnd:function(newEnd,oldEnd){var circle;if(!oldEnd){return newEnd}
circle={x:oldEnd.x,y:oldEnd.y,r:oldEnd.r};if('x' in newEnd){circle.x=newEnd.x}else if('centerX' in newEnd){circle.x=newEnd.centerX}
if('y' in newEnd){circle.y=newEnd.y}else if('centerY' in newEnd){circle.y=newEnd.centerY}
if('r' in newEnd){circle.r=newEnd.r}else if('radius' in newEnd){circle.r=newEnd.radius}
return circle},generateGradient:function(ctx,bbox){var start=this.getStart(),end=this.getEnd(),w=bbox.width*0.5,h=bbox.height*0.5,x=bbox.x+w,y=bbox.y+h,gradient=ctx.createRadialGradient(x+start.x*w,y+start.y*h,start.r*Math.max(w,h),x+end.x*w,y+end.y*h,end.r*Math.max(w,h)),stops=this.getStops(),ln=stops.length,i;for(i=0;i<ln;i++){gradient.addColorStop(stops[i].offset,stops[i].color)}
return gradient}})
;
Ext.define('Ext.draw.Surface',{extend:'Ext.draw.SurfaceBase',xtype:'surface',requires:['Ext.draw.sprite.*','Ext.draw.gradient.*','Ext.draw.sprite.AttributeDefinition','Ext.draw.Matrix','Ext.draw.Draw'],uses:['Ext.draw.engine.Canvas'],devicePixelRatio:window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,deprecated:{'5.1.0':{statics:{methods:{stableSort:function(list){return Ext.Array.sort(list,function(a,b){return a.attr.zIndex-b.attr.zIndex})}}}}},cls:Ext.baseCSSPrefix+'surface',config:{rect:null,background:null,items:[],dirty:!1,flipRtlText:!1},isSurface:!0,isPendingRenderFrame:!1,dirtyPredecessorCount:0,emptyRect:[0,0,0,0],constructor:function(config){var me=this;me.predecessors=[];me.successors=[];me.map={};me.callParent([config]);me.matrix=new Ext.draw.Matrix();me.inverseMatrix=me.matrix.inverse()},roundPixel:function(num){return Math.round(this.devicePixelRatio*num)/this.devicePixelRatio},waitFor:function(surface){var me=this,predecessors=me.predecessors;if(!Ext.Array.contains(predecessors,surface)){predecessors.push(surface);surface.successors.push(me);if(surface.getDirty()){me.dirtyPredecessorCount++}}},updateDirty:function(dirty){var successors=this.successors,ln=successors.length,i=0,successor;for(;i<ln;i++){successor=successors[i];if(dirty){successor.dirtyPredecessorCount++;successor.setDirty(!0)}else{successor.dirtyPredecessorCount--;if(successor.dirtyPredecessorCount===0&&successor.isPendingRenderFrame){successor.renderFrame()}}}},applyBackground:function(background,oldBackground){this.setDirty(!0);if(Ext.isString(background)){background={fillStyle:background}}
return Ext.factory(background,Ext.draw.sprite.Rect,oldBackground)},applyRect:function(rect,oldRect){if(oldRect&&rect[0]===oldRect[0]&&rect[1]===oldRect[1]&&rect[2]===oldRect[2]&&rect[3]===oldRect[3]){return oldRect}
if(Ext.isArray(rect)){return[rect[0],rect[1],rect[2],rect[3]]}else if(Ext.isObject(rect)){return[rect.x||rect.left,rect.y||rect.top,rect.width||(rect.right-rect.left),rect.height||(rect.bottom-rect.top)]}},updateRect:function(rect){var me=this,l=rect[0],t=rect[1],r=l+rect[2],b=t+rect[3],background=me.getBackground(),element=me.element;element.setLocalXY(Math.floor(l),Math.floor(t));element.setSize(Math.ceil(r-Math.floor(l)),Math.ceil(b-Math.floor(t)));if(background){background.setAttributes({x:0,y:0,width:Math.ceil(r-Math.floor(l)),height:Math.ceil(b-Math.floor(t))})}
me.setDirty(!0)},resetTransform:function(){this.matrix.set(1,0,0,1,0,0);this.inverseMatrix.set(1,0,0,1,0,0);this.setDirty(!0)},get:function(id){return this.map[id]||this.getItems()[id]},add:function(){var me=this,args=Array.prototype.slice.call(arguments),argIsArray=Ext.isArray(args[0]),map=me.map,results=[],items,item,sprite,oldSurface,i,ln;items=Ext.Array.clean(argIsArray?args[0]:args);if(!items.length){return results}
for(i=0,ln=items.length;i<ln;i++){item=items[i];if(!item||item.destroyed){continue}
sprite=null;if(item.isSprite&&!map[item.getId()]){sprite=item}else if(!map[item.id]){sprite=this.createItem(item)}
if(sprite){map[sprite.getId()]=sprite;results.push(sprite);oldSurface=sprite.getSurface();if(oldSurface&&oldSurface.isSurface){oldSurface.remove(sprite)}
sprite.setParent(me);sprite.setSurface(me);me.onAdd(sprite)}}
items=me.getItems();if(items){items.push.apply(items,results)}
me.dirtyZIndex=!0;me.setDirty(!0);if(!argIsArray&&results.length===1){return results[0]}else{return results}},onAdd:Ext.emptyFn,remove:function(sprite,isDestroy){var me=this,destroying=me.clearing,id,isOwnSprite;if(sprite){if(sprite.charAt){sprite=me.map[sprite]}
if(!sprite||!sprite.isSprite){return null}
id=sprite.id;isOwnSprite=me.map[id];delete me.map[id];if(sprite.destroyed||sprite.destroying){if(isOwnSprite&&!destroying){Ext.Array.remove(me.getItems(),sprite)}
return sprite}
if(!isOwnSprite){if(isDestroy){sprite.destroy()}
return sprite}
sprite.setParent(null);sprite.setSurface(null);if(isDestroy){sprite.destroy()}
if(!destroying){Ext.Array.remove(me.getItems(),sprite);me.dirtyZIndex=!0;me.setDirty(!0)}}
return sprite||null},removeAll:function(isDestroy){var me=this,items=me.getItems(),item,i;me.clearing=!!isDestroy;for(i=items.length-1;i>=0;i--){item=items[i];if(isDestroy){item.destroy()}else{item.setParent(null);item.setSurface(null)}}
me.clearing=!1;items.length=0;me.map={};me.dirtyZIndex=!0;if(!me.destroying){me.setDirty(!0)}},applyItems:function(items){if(this.getItems()){this.removeAll(!0)}
return Ext.Array.from(this.add(items))},createItem:function(config){return Ext.create(config.xclass||'sprite.'+config.type,config)},getBBox:function(sprites,isWithoutTransform){var left=Infinity,right=-Infinity,top=Infinity,bottom=-Infinity,sprite,bbox,i,ln;sprites=Ext.Array.from(sprites);for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];bbox=sprite.getBBox(isWithoutTransform);if(left>bbox.x){left=bbox.x}
if(right<bbox.x+bbox.width){right=bbox.x+bbox.width}
if(top>bbox.y){top=bbox.y}
if(bottom<bbox.y+bbox.height){bottom=bbox.y+bbox.height}}
return{x:left,y:top,width:right-left,height:bottom-top}},getEventXY:function(e){var me=this,isRtl=me.getInherited().rtl,pageXY=e.getXY(),container=me.getOwnerBody(),xy=container.getXY(),rect=me.getRect()||me.emptyRect,result=[],width;if(isRtl){width=container.getWidth();result[0]=xy[0]-pageXY[0]-rect[0]+width}else{result[0]=pageXY[0]-xy[0]-rect[0]}
result[1]=pageXY[1]-xy[1]-rect[1];return result},clear:Ext.emptyFn,orderByZIndex:function(){var me=this,items=me.getItems(),dirtyZIndex=!1,i,ln;if(me.getDirty()){for(i=0,ln=items.length;i<ln;i++){if(items[i].attr.dirtyZIndex){dirtyZIndex=!0;break}}
if(dirtyZIndex){Ext.Array.sort(items,function(a,b){return a.attr.zIndex-b.attr.zIndex});this.setDirty(!0)}
for(i=0,ln=items.length;i<ln;i++){items[i].attr.dirtyZIndex=!1}}},repaint:function(){var me=this;me.repaint=Ext.emptyFn;Ext.defer(function(){delete me.repaint;me.element.repaint()},1)},renderFrame:function(){var me=this,background,items,item,i,ln;if(!(me.element&&me.getDirty()&&me.getRect())){return}
if(me.dirtyPredecessorCount>0){me.isPendingRenderFrame=!0;return}
background=me.getBackground();items=me.getItems();me.orderByZIndex();if(me.getDirty()){me.clear();me.clearTransform();if(background){me.renderSprite(background)}
for(i=0,ln=items.length;i<ln;i++){item=items[i];if(me.renderSprite(item)===!1){return}
item.attr.textPositionCount=me.textPosition}
me.setDirty(!1)}},renderSprite:Ext.emptyFn,clearTransform:Ext.emptyFn,destroy:function(){var me=this;me.destroying=!0;me.removeAll(!0);me.destroying=!1;me.predecessors=me.successors=null;if(me.hasListeners.destroy){me.fireEvent('destroy',me)}
me.callParent()}})
;
Ext.define('Ext.draw.overrides.hittest.Surface',{override:'Ext.draw.Surface',hitTest:function(point,options){var me=this,sprites=me.getItems(),i,sprite,result;options=options||Ext.draw.sprite.Sprite.defaultHitTestOptions;for(i=sprites.length-1;i>=0;i--){sprite=sprites[i];if(sprite.hitTest){result=sprite.hitTest(point,options);if(result){return result}}}
return null},hitTestEvent:function(event,options){var xy=this.getEventXY(event);return this.hitTest(xy,options)}})
;
Ext.define('Ext.draw.engine.SvgContext',{requires:['Ext.draw.Color'],toSave:['strokeOpacity','strokeStyle','fillOpacity','fillStyle','globalAlpha','lineWidth','lineCap','lineJoin','lineDash','lineDashOffset','miterLimit','shadowOffsetX','shadowOffsetY','shadowBlur','shadowColor','globalCompositeOperation','position','fillGradient','strokeGradient'],strokeOpacity:1,strokeStyle:'none',fillOpacity:1,fillStyle:'none',lineDas:[],lineDashOffset:0,globalAlpha:1,lineWidth:1,lineCap:'butt',lineJoin:'miter',miterLimit:10,shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:'none',globalCompositeOperation:'src',urlStringRe:/^url\(#([\w-]+)\)$/,constructor:function(SvgSurface){var me=this;me.surface=SvgSurface;me.state=[];me.matrix=new Ext.draw.Matrix();me.path=null;me.clear()},clear:function(){this.group=this.surface.mainGroup;this.position=0;this.path=null},getElement:function(tag){return this.surface.getSvgElement(this.group,tag,this.position++)},save:function(){var toSave=this.toSave,obj={},group=this.getElement('g'),key,i;for(i=0;i<toSave.length;i++){key=toSave[i];if(key in this){obj[key]=this[key]}}
this.position=0;obj.matrix=this.matrix.clone();this.state.push(obj);this.group=group;return group},restore:function(){var toSave=this.toSave,obj=this.state.pop(),group=this.group,children=group.dom.childNodes,key,i;while(children.length>this.position){group.last().destroy()}
for(i=0;i<toSave.length;i++){key=toSave[i];if(key in obj){this[key]=obj[key]}else{delete this[key]}}
this.setTransform.apply(this,obj.matrix.elements);this.group=group.getParent()},transform:function(xx,yx,xy,yy,dx,dy){var inv;if(this.path){inv=Ext.draw.Matrix.fly([xx,yx,xy,yy,dx,dy]).inverse();this.path.transform(inv)}
this.matrix.append(xx,yx,xy,yy,dx,dy)},setTransform:function(xx,yx,xy,yy,dx,dy){if(this.path){this.path.transform(this.matrix)}
this.matrix.reset();this.transform(xx,yx,xy,yy,dx,dy)},scale:function(x,y){this.transform(x,0,0,y,0,0)},rotate:function(angle){var xx=Math.cos(angle),yx=Math.sin(angle),xy=-Math.sin(angle),yy=Math.cos(angle);this.transform(xx,yx,xy,yy,0,0)},translate:function(x,y){this.transform(1,0,0,1,x,y)},setGradientBBox:function(bbox){this.bbox=bbox},beginPath:function(){this.path=new Ext.draw.Path()},moveTo:function(x,y){if(!this.path){this.beginPath()}
this.path.moveTo(x,y);this.path.element=null},lineTo:function(x,y){if(!this.path){this.beginPath()}
this.path.lineTo(x,y);this.path.element=null},rect:function(x,y,width,height){this.moveTo(x,y);this.lineTo(x+width,y);this.lineTo(x+width,y+height);this.lineTo(x,y+height);this.closePath()},strokeRect:function(x,y,width,height){this.beginPath();this.rect(x,y,width,height);this.stroke()},fillRect:function(x,y,width,height){this.beginPath();this.rect(x,y,width,height);this.fill()},closePath:function(){if(!this.path){this.beginPath()}
this.path.closePath();this.path.element=null},arcSvg:function(r1,r2,rotation,large,swipe,x2,y2){if(!this.path){this.beginPath()}
this.path.arcSvg(r1,r2,rotation,large,swipe,x2,y2);this.path.element=null},arc:function(x,y,radius,startAngle,endAngle,anticlockwise){if(!this.path){this.beginPath()}
this.path.arc(x,y,radius,startAngle,endAngle,anticlockwise);this.path.element=null},ellipse:function(x,y,radiusX,radiusY,rotation,startAngle,endAngle,anticlockwise){if(!this.path){this.beginPath()}
this.path.ellipse(x,y,radiusX,radiusY,rotation,startAngle,endAngle,anticlockwise);this.path.element=null},arcTo:function(x1,y1,x2,y2,radiusX,radiusY,rotation){if(!this.path){this.beginPath()}
this.path.arcTo(x1,y1,x2,y2,radiusX,radiusY,rotation);this.path.element=null},bezierCurveTo:function(x1,y1,x2,y2,x3,y3){if(!this.path){this.beginPath()}
this.path.bezierCurveTo(x1,y1,x2,y2,x3,y3);this.path.element=null},strokeText:function(text,x,y){var element,tspan;text=String(text);if(this.strokeStyle){element=this.getElement('text');tspan=this.surface.getSvgElement(element,'tspan',0);this.surface.setElementAttributes(element,{"x":x,"y":y,"transform":this.matrix.toSvg(),"stroke":this.strokeStyle,"fill":"none","opacity":this.globalAlpha,"stroke-opacity":this.strokeOpacity,"style":"font: "+this.font,"stroke-dasharray":this.lineDash.join(','),"stroke-dashoffset":this.lineDashOffset});if(this.lineDash.length){this.surface.setElementAttributes(element,{"stroke-dasharray":this.lineDash.join(','),"stroke-dashoffset":this.lineDashOffset})}
if(tspan.dom.firstChild){tspan.dom.removeChild(tspan.dom.firstChild)}
this.surface.setElementAttributes(tspan,{"alignment-baseline":"alphabetic"});tspan.dom.appendChild(document.createTextNode(Ext.String.htmlDecode(text)))}},fillText:function(text,x,y){var element,tspan;text=String(text);if(this.fillStyle){element=this.getElement('text');tspan=this.surface.getSvgElement(element,'tspan',0);this.surface.setElementAttributes(element,{"x":x,"y":y,"transform":this.matrix.toSvg(),"fill":this.fillStyle,"opacity":this.globalAlpha,"fill-opacity":this.fillOpacity,"style":"font: "+this.font});if(tspan.dom.firstChild){tspan.dom.removeChild(tspan.dom.firstChild)}
this.surface.setElementAttributes(tspan,{"alignment-baseline":"alphabetic"});tspan.dom.appendChild(document.createTextNode(Ext.String.htmlDecode(text)))}},drawImage:function(image,sx,sy,sw,sh,dx,dy,dw,dh){var me=this,element=me.getElement('image'),x=sx,y=sy,width=typeof sw==='undefined'?image.width:sw,height=typeof sh==='undefined'?image.height:sh,viewBox=null;if(typeof dh!=='undefined'){viewBox=sx+" "+sy+" "+sw+" "+sh;x=dx;y=dy;width=dw;height=dh}
element.dom.setAttributeNS("http:/"+"/www.w3.org/1999/xlink","href",image.src);me.surface.setElementAttributes(element,{viewBox:viewBox,x:x,y:y,width:width,height:height,opacity:me.globalAlpha,transform:me.matrix.toSvg()})},fill:function(){var me=this,path,fillGradient,element,bbox,fill;if(!me.path){return}
if(me.fillStyle){fillGradient=me.fillGradient;element=me.path.element;bbox=me.bbox;if(!element){path=me.path.toString();element=me.path.element=me.getElement('path');me.surface.setElementAttributes(element,{"d":path,"transform":me.matrix.toSvg()})}
if(fillGradient&&bbox){fill=fillGradient.generateGradient(me,bbox)}else{fill=me.fillStyle}
me.surface.setElementAttributes(element,{"fill":fill,"fill-opacity":me.fillOpacity*me.globalAlpha})}},stroke:function(){var me=this,path,strokeGradient,element,bbox,stroke;if(!me.path){return}
if(me.strokeStyle){strokeGradient=me.strokeGradient;element=me.path.element;bbox=me.bbox;if(!element||!me.path.svgString){path=me.path.toString();if(!path){return}
element=me.path.element=me.getElement('path');me.surface.setElementAttributes(element,{"fill":"none","d":path,"transform":me.matrix.toSvg()})}
if(strokeGradient&&bbox){stroke=strokeGradient.generateGradient(me,bbox)}else{stroke=me.strokeStyle}
me.surface.setElementAttributes(element,{"stroke":stroke,"stroke-linecap":me.lineCap,"stroke-linejoin":me.lineJoin,"stroke-width":me.lineWidth,"stroke-opacity":me.strokeOpacity*me.globalAlpha,"stroke-dasharray":me.lineDash.join(','),"stroke-dashoffset":me.lineDashOffset});if(me.lineDash.length){me.surface.setElementAttributes(element,{"stroke-dasharray":me.lineDash.join(','),"stroke-dashoffset":me.lineDashOffset})}}},fillStroke:function(attr,transformFillStroke){var ctx=this,fillStyle=ctx.fillStyle,strokeStyle=ctx.strokeStyle,fillOpacity=ctx.fillOpacity,strokeOpacity=ctx.strokeOpacity;if(transformFillStroke===undefined){transformFillStroke=attr.transformFillStroke}
if(!transformFillStroke){attr.inverseMatrix.toContext(ctx)}
if(fillStyle&&fillOpacity!==0){ctx.fill()}
if(strokeStyle&&strokeOpacity!==0){ctx.stroke()}},appendPath:function(path){this.path=path.clone()},setLineDash:function(lineDash){this.lineDash=lineDash},getLineDash:function(){return this.lineDash},createLinearGradient:function(x0,y0,x1,y1){var me=this,element=me.surface.getNextDef('linearGradient'),gradient;me.surface.setElementAttributes(element,{"x1":x0,"y1":y0,"x2":x1,"y2":y1,"gradientUnits":"userSpaceOnUse"});gradient=new Ext.draw.engine.SvgContext.Gradient(me,me.surface,element);return gradient},createRadialGradient:function(x0,y0,r0,x1,y1,r1){var me=this,element=me.surface.getNextDef('radialGradient'),gradient;me.surface.setElementAttributes(element,{fx:x0,fy:y0,cx:x1,cy:y1,r:r1,gradientUnits:'userSpaceOnUse'});gradient=new Ext.draw.engine.SvgContext.Gradient(me,me.surface,element,r0/r1);return gradient}});Ext.define('Ext.draw.engine.SvgContext.Gradient',{isGradient:!0,constructor:function(ctx,surface,element,compression){var me=this;me.ctx=ctx;me.surface=surface;me.element=element;me.position=0;me.compression=compression||0},addColorStop:function(offset,color){var me=this,stop=me.surface.getSvgElement(me.element,'stop',me.position++),compression=me.compression;me.surface.setElementAttributes(stop,{"offset":(((1-compression)*offset+compression)*100).toFixed(2)+'%',"stop-color":color,"stop-opacity":Ext.util.Color.fly(color).a.toFixed(15)})},toString:function(){var children=this.element.dom.childNodes;while(children.length>this.position){Ext.fly(children[children.length-1]).destroy()}
return'url(#'+this.element.getId()+')'}})
;
Ext.define('Ext.draw.engine.Svg',{extend:'Ext.draw.Surface',requires:['Ext.draw.engine.SvgContext'],isSVG:!0,config:{highPrecision:!1},getElementConfig:function(){return{reference:'element',style:{position:'absolute'},children:[{reference:'bodyElement',style:{width:'100%',height:'100%',position:'relative'},children:[{tag:'svg',reference:'svgElement',namespace:"http://www.w3.org/2000/svg",width:'100%',height:'100%',version:1.1}]}]}},constructor:function(config){var me=this;me.callParent([config]);me.mainGroup=me.createSvgNode("g");me.defsElement=me.createSvgNode("defs");me.svgElement.appendChild(me.mainGroup);me.svgElement.appendChild(me.defsElement);me.ctx=new Ext.draw.engine.SvgContext(me)},createSvgNode:function(type){var node=document.createElementNS("http://www.w3.org/2000/svg",type);return Ext.get(node)},getSvgElement:function(group,tag,position){var childNodes=group.dom.childNodes,length=childNodes.length,element;if(position<length){element=childNodes[position];if(element.tagName===tag){return Ext.get(element)}else{Ext.destroy(element)}}else if(position>length){Ext.raise("Invalid position.")}
element=Ext.get(this.createSvgNode(tag));if(position===0){group.insertFirst(element)}else{element.insertAfter(Ext.fly(childNodes[position-1]))}
element.cache={};return element},setElementAttributes:function(element,attributes){var dom=element.dom,cache=element.cache,name,value;for(name in attributes){value=attributes[name];if(cache[name]!==value){cache[name]=value;dom.setAttribute(name,value)}}},getNextDef:function(tagName){return this.getSvgElement(this.defsElement,tagName,this.defsPosition++)},clearTransform:function(){var me=this;me.mainGroup.set({transform:me.matrix.toSvg()})},clear:function(){this.ctx.clear();this.removeSurplusDefs();this.defsPosition=0},removeSurplusDefs:function(){var defsElement=this.defsElement,defs=defsElement.dom.childNodes,ln=defs.length,i;for(i=ln-1;i>this.defsPosition;i--){defsElement.removeChild(defs[i])}},renderSprite:function(sprite){var me=this,rect=me.getRect(),ctx=me.ctx;if(sprite.attr.hidden||sprite.attr.globalAlpha===0){ctx.save();ctx.restore();return}
sprite.element=ctx.save();sprite.preRender(this);sprite.useAttributes(ctx,rect);if(!1===sprite.render(this,ctx,[0,0,rect[2],rect[3]])){return!1}
sprite.setDirty(!1);ctx.restore()},toSVG:function(size,surfaces){var className=Ext.getClassName(this),svg,surface,rect,i;svg='<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg"'+' width="'+size.width+'"'+' height="'+size.height+'">';for(i=0;i<surfaces.length;i++){surface=surfaces[i];if(Ext.getClassName(surface)!==className){continue}
rect=surface.getRect();svg+='<g transform="translate('+rect[0]+','+rect[1]+')">';svg+=this.serializeNode(surface.svgElement.dom);svg+='</g>'}
svg+='</svg>';return svg},b64EncodeUnicode:function(str){return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,function(match,p1){return String.fromCharCode('0x'+p1)}))},flatten:function(size,surfaces){var svg='<?xml version="1.0" standalone="yes"?>';svg+=this.toSVG(size,surfaces);return{data:'data:image/svg+xml;base64,'+this.b64EncodeUnicode(svg),type:'svg'}},serializeNode:function(node){var result='',i,n,attr,child;if(node.nodeType===document.TEXT_NODE){return node.nodeValue}
result+='<'+node.nodeName;if(node.attributes.length){for(i=0,n=node.attributes.length;i<n;i++){attr=node.attributes[i];result+=' '+attr.name+'="'+Ext.String.htmlEncode(attr.value)+'"'}}
result+='>';if(node.childNodes&&node.childNodes.length){for(i=0,n=node.childNodes.length;i<n;i++){child=node.childNodes[i];result+=this.serializeNode(child)}}
result+='</'+node.nodeName+'>';return result},destroy:function(){var me=this;me.ctx.destroy();me.mainGroup.destroy();me.defsElement.destroy();delete me.mainGroup;delete me.defsElement;delete me.ctx;me.callParent()},remove:function(sprite,destroySprite){if(sprite&&sprite.element){sprite.element.destroy();sprite.element=null}
this.callParent(arguments)}})
;
if(!Ext.draw){Ext.draw={}}
if(!Ext.draw.engine){Ext.draw.engine={}}
Ext.draw.engine.excanvas=!0;if(!document.createElement('canvas').getContext){(function(){var m=Math;var mr=m.round;var ms=m.sin;var mc=m.cos;var abs=m.abs;var sqrt=m.sqrt;var Z=10;var Z2=Z/2;var IE_VERSION=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];function getContext(){return this.context_||(this.context_=new CanvasRenderingContext2D_(this))}
var slice=Array.prototype.slice;function bind(f,obj,var_args){var a=slice.call(arguments,2);return function(){return f.apply(obj,a.concat(slice.call(arguments)))}}
function encodeHtmlAttribute(s){return String(s).replace(/&/g,'&amp;').replace(/"/g,'&quot;')}
function addNamespace(doc,prefix,urn){Ext.onReady(function(){if(!doc.namespaces[prefix]){doc.namespaces.add(prefix,urn,'#default#VML')}})}
function addNamespacesAndStylesheet(doc){addNamespace(doc,'g_vml_','urn:schemas-microsoft-com:vml');addNamespace(doc,'g_o_','urn:schemas-microsoft-com:office:office');if(!doc.styleSheets.ex_canvas_){var ss=doc.createStyleSheet();ss.owningElement.id='ex_canvas_';ss.cssText='canvas{display:inline-block;overflow:hidden;'+'text-align:left;width:300px;height:150px}'}}
addNamespacesAndStylesheet(document);var G_vmlCanvasManager_={init:function(opt_doc){var doc=opt_doc||document;doc.createElement('canvas');doc.attachEvent('onreadystatechange',bind(this.init_,this,doc))},init_:function(doc){var els=doc.getElementsByTagName('canvas');for(var i=0;i<els.length;i++){this.initElement(els[i])}},initElement:function(el){if(!el.getContext){el.getContext=getContext;addNamespacesAndStylesheet(el.ownerDocument);el.innerHTML='';el.attachEvent('onpropertychange',onPropertyChange);el.attachEvent('onresize',onResize);var attrs=el.attributes;if(attrs.width&&attrs.width.specified){el.style.width=attrs.width.nodeValue+'px'}else{el.width=el.clientWidth}
if(attrs.height&&attrs.height.specified){el.style.height=attrs.height.nodeValue+'px'}else{el.height=el.clientHeight}}
return el}};function onPropertyChange(e){var el=e.srcElement;switch(e.propertyName){case 'width':el.getContext().clearRect();el.style.width=el.attributes.width.nodeValue+'px';el.firstChild.style.width=el.clientWidth+'px';break;case 'height':el.getContext().clearRect();el.style.height=el.attributes.height.nodeValue+'px';el.firstChild.style.height=el.clientHeight+'px';break}}
function onResize(e){var el=e.srcElement;if(el.firstChild){el.firstChild.style.width=el.clientWidth+'px';el.firstChild.style.height=el.clientHeight+'px'}}
G_vmlCanvasManager_.init();var decToHex=[];for(var i=0;i<16;i++){for(var j=0;j<16;j++){decToHex[i*16+j]=i.toString(16)+j.toString(16)}}
function createMatrixIdentity(){return[[1,0,0],[0,1,0],[0,0,1]]}
function matrixMultiply(m1,m2){var result=createMatrixIdentity();for(var x=0;x<3;x++){for(var y=0;y<3;y++){var sum=0;for(var z=0;z<3;z++){sum+=m1[x][z]*m2[z][y]}
result[x][y]=sum}}
return result}
function copyState(o1,o2){o2.fillStyle=o1.fillStyle;o2.lineCap=o1.lineCap;o2.lineJoin=o1.lineJoin;o2.lineDash=o1.lineDash;o2.lineWidth=o1.lineWidth;o2.miterLimit=o1.miterLimit;o2.shadowBlur=o1.shadowBlur;o2.shadowColor=o1.shadowColor;o2.shadowOffsetX=o1.shadowOffsetX;o2.shadowOffsetY=o1.shadowOffsetY;o2.strokeStyle=o1.strokeStyle;o2.globalAlpha=o1.globalAlpha;o2.font=o1.font;o2.textAlign=o1.textAlign;o2.textBaseline=o1.textBaseline;o2.arcScaleX_=o1.arcScaleX_;o2.arcScaleY_=o1.arcScaleY_;o2.lineScale_=o1.lineScale_}
var colorData={aliceblue:'#F0F8FF',antiquewhite:'#FAEBD7',aquamarine:'#7FFFD4',azure:'#F0FFFF',beige:'#F5F5DC',bisque:'#FFE4C4',black:'#000000',blanchedalmond:'#FFEBCD',blueviolet:'#8A2BE2',brown:'#A52A2A',burlywood:'#DEB887',cadetblue:'#5F9EA0',chartreuse:'#7FFF00',chocolate:'#D2691E',coral:'#FF7F50',cornflowerblue:'#6495ED',cornsilk:'#FFF8DC',crimson:'#DC143C',cyan:'#00FFFF',darkblue:'#00008B',darkcyan:'#008B8B',darkgoldenrod:'#B8860B',darkgray:'#A9A9A9',darkgreen:'#006400',darkgrey:'#A9A9A9',darkkhaki:'#BDB76B',darkmagenta:'#8B008B',darkolivegreen:'#556B2F',darkorange:'#FF8C00',darkorchid:'#9932CC',darkred:'#8B0000',darksalmon:'#E9967A',darkseagreen:'#8FBC8F',darkslateblue:'#483D8B',darkslategray:'#2F4F4F',darkslategrey:'#2F4F4F',darkturquoise:'#00CED1',darkviolet:'#9400D3',deeppink:'#FF1493',deepskyblue:'#00BFFF',dimgray:'#696969',dimgrey:'#696969',dodgerblue:'#1E90FF',firebrick:'#B22222',floralwhite:'#FFFAF0',forestgreen:'#228B22',gainsboro:'#DCDCDC',ghostwhite:'#F8F8FF',gold:'#FFD700',goldenrod:'#DAA520',grey:'#808080',greenyellow:'#ADFF2F',honeydew:'#F0FFF0',hotpink:'#FF69B4',indianred:'#CD5C5C',indigo:'#4B0082',ivory:'#FFFFF0',khaki:'#F0E68C',lavender:'#E6E6FA',lavenderblush:'#FFF0F5',lawngreen:'#7CFC00',lemonchiffon:'#FFFACD',lightblue:'#ADD8E6',lightcoral:'#F08080',lightcyan:'#E0FFFF',lightgoldenrodyellow:'#FAFAD2',lightgreen:'#90EE90',lightgrey:'#D3D3D3',lightpink:'#FFB6C1',lightsalmon:'#FFA07A',lightseagreen:'#20B2AA',lightskyblue:'#87CEFA',lightslategray:'#778899',lightslategrey:'#778899',lightsteelblue:'#B0C4DE',lightyellow:'#FFFFE0',limegreen:'#32CD32',linen:'#FAF0E6',magenta:'#FF00FF',mediumaquamarine:'#66CDAA',mediumblue:'#0000CD',mediumorchid:'#BA55D3',mediumpurple:'#9370DB',mediumseagreen:'#3CB371',mediumslateblue:'#7B68EE',mediumspringgreen:'#00FA9A',mediumturquoise:'#48D1CC',mediumvioletred:'#C71585',midnightblue:'#191970',mintcream:'#F5FFFA',mistyrose:'#FFE4E1',moccasin:'#FFE4B5',navajowhite:'#FFDEAD',oldlace:'#FDF5E6',olivedrab:'#6B8E23',orange:'#FFA500',orangered:'#FF4500',orchid:'#DA70D6',palegoldenrod:'#EEE8AA',palegreen:'#98FB98',paleturquoise:'#AFEEEE',palevioletred:'#DB7093',papayawhip:'#FFEFD5',peachpuff:'#FFDAB9',peru:'#CD853F',pink:'#FFC0CB',plum:'#DDA0DD',powderblue:'#B0E0E6',rosybrown:'#BC8F8F',royalblue:'#4169E1',saddlebrown:'#8B4513',salmon:'#FA8072',sandybrown:'#F4A460',seagreen:'#2E8B57',seashell:'#FFF5EE',sienna:'#A0522D',skyblue:'#87CEEB',slateblue:'#6A5ACD',slategray:'#708090',slategrey:'#708090',snow:'#FFFAFA',springgreen:'#00FF7F',steelblue:'#4682B4',tan:'#D2B48C',thistle:'#D8BFD8',tomato:'#FF6347',turquoise:'#40E0D0',violet:'#EE82EE',wheat:'#F5DEB3',whitesmoke:'#F5F5F5',yellowgreen:'#9ACD32'};function getRgbHslContent(styleString){var start=styleString.indexOf('(',3);var end=styleString.indexOf(')',start+1);var parts=styleString.substring(start+1,end).split(',');if(parts.length!=4||styleString.charAt(3)!='a'){parts[3]=1}
return parts}
function percent(s){return parseFloat(s)/100}
function clamp(v,min,max){return Math.min(max,Math.max(min,v))}
function hslToRgb(parts){var r,g,b,h,s,l;h=parseFloat(parts[0])/360%360;if(h<0)
h++;s=clamp(percent(parts[1]),0,1);l=clamp(percent(parts[2]),0,1);if(s==0){r=g=b=l}else{var q=l<0.5?l*(1+s):l+s-l*s;var p=2*l-q;r=hueToRgb(p,q,h+1/3);g=hueToRgb(p,q,h);b=hueToRgb(p,q,h-1/3)}
return'#'+decToHex[Math.floor(r*255)]+decToHex[Math.floor(g*255)]+decToHex[Math.floor(b*255)]}
function hueToRgb(m1,m2,h){if(h<0)
h++;if(h>1)
h--;if(6*h<1)
return m1+(m2-m1)*6*h;else if(2*h<1)
return m2;else if(3*h<2)
return m1+(m2-m1)*(2/3-h)*6;else return m1}
var processStyleCache={};function processStyle(styleString){if(styleString in processStyleCache){return processStyleCache[styleString]}
var str,alpha=1;styleString=String(styleString);if(styleString.charAt(0)=='#'){str=styleString}else if(/^rgb/.test(styleString)){var parts=getRgbHslContent(styleString);var str='#',n;for(var i=0;i<3;i++){if(parts[i].indexOf('%')!=-1){n=Math.floor(percent(parts[i])*255)}else{n=+parts[i]}
str+=decToHex[clamp(n,0,255)]}
alpha=+parts[3]}else if(/^hsl/.test(styleString)){var parts=getRgbHslContent(styleString);str=hslToRgb(parts);alpha=parts[3]}else{str=colorData[styleString]||styleString}
return processStyleCache[styleString]={color:str,alpha:alpha}}
var DEFAULT_STYLE={style:'normal',variant:'normal',weight:'normal',size:10,family:'sans-serif'};var fontStyleCache={};function processFontStyle(styleString){if(fontStyleCache[styleString]){return fontStyleCache[styleString]}
var el=document.createElement('div');var style=el.style;try{style.font=styleString}catch(ex){}
return fontStyleCache[styleString]={style:style.fontStyle||DEFAULT_STYLE.style,variant:style.fontVariant||DEFAULT_STYLE.variant,weight:style.fontWeight||DEFAULT_STYLE.weight,size:style.fontSize||DEFAULT_STYLE.size,family:style.fontFamily||DEFAULT_STYLE.family}}
function getComputedStyle(style,element){var computedStyle={};for(var p in style){computedStyle[p]=style[p]}
var canvasFontSize=parseFloat(element.currentStyle.fontSize),fontSize=parseFloat(style.size);if(typeof style.size=='number'){computedStyle.size=style.size}else if(style.size.indexOf('px')!=-1){computedStyle.size=fontSize}else if(style.size.indexOf('em')!=-1){computedStyle.size=canvasFontSize*fontSize}else if(style.size.indexOf('%')!=-1){computedStyle.size=(canvasFontSize/100)*fontSize}else if(style.size.indexOf('pt')!=-1){computedStyle.size=fontSize/.75}else{computedStyle.size=canvasFontSize}
computedStyle.size*=0.981;return computedStyle}
function buildStyle(style){return style.style+' '+style.variant+' '+style.weight+' '+style.size+'px '+style.family}
var lineCapMap={'butt':'flat','round':'round'};function processLineCap(lineCap){return lineCapMap[lineCap]||'square'}
function CanvasRenderingContext2D_(canvasElement){this.m_=createMatrixIdentity();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle='#000';this.fillStyle='#000';this.lineWidth=1;this.lineJoin='miter';this.lineDash=[];this.lineCap='butt';this.miterLimit=Z*1;this.globalAlpha=1;this.font='10px sans-serif';this.textAlign='left';this.textBaseline='alphabetic';this.canvas=canvasElement;var cssText='width:'+canvasElement.clientWidth+'px;height:'+canvasElement.clientHeight+'px;overflow:hidden;position:absolute';var el=canvasElement.ownerDocument.createElement('div');el.style.cssText=cssText;canvasElement.appendChild(el);var overlayEl=el.cloneNode(!1);overlayEl.style.backgroundColor='red';overlayEl.style.filter='alpha(opacity=0)';canvasElement.appendChild(overlayEl);this.element_=el;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}
var contextPrototype=CanvasRenderingContext2D_.prototype;contextPrototype.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(!0);this.textMeasureEl_=null}
this.element_.innerHTML=''};contextPrototype.beginPath=function(){this.currentPath_=[]};contextPrototype.moveTo=function(aX,aY){var p=getCoords(this,aX,aY);this.currentPath_.push({type:'moveTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y};contextPrototype.lineTo=function(aX,aY){var p=getCoords(this,aX,aY);this.currentPath_.push({type:'lineTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y};contextPrototype.bezierCurveTo=function(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){var p=getCoords(this,aX,aY);var cp1=getCoords(this,aCP1x,aCP1y);var cp2=getCoords(this,aCP2x,aCP2y);bezierCurveTo(this,cp1,cp2,p)};function bezierCurveTo(self,cp1,cp2,p){self.currentPath_.push({type:'bezierCurveTo',cp1x:cp1.x,cp1y:cp1.y,cp2x:cp2.x,cp2y:cp2.y,x:p.x,y:p.y});self.currentX_=p.x;self.currentY_=p.y}
contextPrototype.quadraticCurveTo=function(aCPx,aCPy,aX,aY){var cp=getCoords(this,aCPx,aCPy);var p=getCoords(this,aX,aY);var cp1={x:this.currentX_+2.0/3.0*(cp.x-this.currentX_),y:this.currentY_+2.0/3.0*(cp.y-this.currentY_)};var cp2={x:cp1.x+(p.x-this.currentX_)/3.0,y:cp1.y+(p.y-this.currentY_)/3.0};bezierCurveTo(this,cp1,cp2,p)};contextPrototype.arc=function(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){aRadius*=Z;var arcType=aClockwise?'at':'wa';var xStart=aX+mc(aStartAngle)*aRadius-Z2;var yStart=aY+ms(aStartAngle)*aRadius-Z2;var xEnd=aX+mc(aEndAngle)*aRadius-Z2;var yEnd=aY+ms(aEndAngle)*aRadius-Z2;if(xStart==xEnd&&!aClockwise){xStart+=0.125}
var p=getCoords(this,aX,aY);var pStart=getCoords(this,xStart,yStart);var pEnd=getCoords(this,xEnd,yEnd);this.currentPath_.push({type:arcType,x:p.x,y:p.y,radius:aRadius,xStart:pStart.x,yStart:pStart.y,xEnd:pEnd.x,yEnd:pEnd.y})};contextPrototype.rect=function(aX,aY,aWidth,aHeight){this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath()};contextPrototype.strokeRect=function(aX,aY,aWidth,aHeight){var oldPath=this.currentPath_;this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.stroke();this.currentPath_=oldPath};contextPrototype.fillRect=function(aX,aY,aWidth,aHeight){var oldPath=this.currentPath_;this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.fill();this.currentPath_=oldPath};contextPrototype.createLinearGradient=function(aX0,aY0,aX1,aY1){var gradient=new CanvasGradient_('gradient');gradient.x0_=aX0;gradient.y0_=aY0;gradient.x1_=aX1;gradient.y1_=aY1;return gradient};contextPrototype.createRadialGradient=function(aX0,aY0,aR0,aX1,aY1,aR1){var gradient=new CanvasGradient_('gradientradial');gradient.x0_=aX0;gradient.y0_=aY0;gradient.r0_=aR0;gradient.x1_=aX1;gradient.y1_=aY1;gradient.r1_=aR1;return gradient};contextPrototype.drawImage=function(image,var_args){var dx,dy,dw,dh,sx,sy,sw,sh;var oldRuntimeWidth=image.runtimeStyle.width;var oldRuntimeHeight=image.runtimeStyle.height;image.runtimeStyle.width='auto';image.runtimeStyle.height='auto';var w=image.width;var h=image.height;image.runtimeStyle.width=oldRuntimeWidth;image.runtimeStyle.height=oldRuntimeHeight;if(arguments.length==3){dx=arguments[1];dy=arguments[2];sx=sy=0;sw=dw=w;sh=dh=h}else if(arguments.length==5){dx=arguments[1];dy=arguments[2];dw=arguments[3];dh=arguments[4];sx=sy=0;sw=w;sh=h}else if(arguments.length==9){sx=arguments[1];sy=arguments[2];sw=arguments[3];sh=arguments[4];dx=arguments[5];dy=arguments[6];dw=arguments[7];dh=arguments[8]}else{throw Error('Invalid number of arguments')}
var d=getCoords(this,dx,dy);var vmlStr=[];var W=10;var H=10;var m=this.m_;vmlStr.push(' <g_vml_:group',' coordsize="',Z*W,',',Z*H,'"',' coordorigin="0,0"',' style="width:',mr(W*m[0][0]),'px;height:',mr(H*m[1][1]),'px;position:absolute;','top:',mr(d.y/Z),'px;left:',mr(d.x/Z),'px; rotation:',mr(Math.atan(m[0][1]/m[1][1])*180/Math.PI),';');vmlStr.push('" >','<g_vml_:image src="',image.src,'"',' style="width:',Z*dw,'px;',' height:',Z*dh,'px"',' cropleft="',sx/w,'"',' croptop="',sy/h,'"',' cropright="',(w-sx-sw)/w,'"',' cropbottom="',(h-sy-sh)/h,'"',' />','</g_vml_:group>');this.element_.insertAdjacentHTML('BeforeEnd',vmlStr.join(''))};contextPrototype.setLineDash=function(lineDash){if(lineDash.length===1){lineDash=lineDash.slice();lineDash[1]=lineDash[0]}
this.lineDash=lineDash};contextPrototype.getLineDash=function(){return this.lineDash};contextPrototype.stroke=function(aFill){var lineStr=[];var W=10;var H=10;lineStr.push('<g_vml_:shape',' filled="',!!aFill,'"',' style="position:absolute;width:',W,'px;height:',H,'px;left:0px;top:0px;"',' coordorigin="0,0"',' coordsize="',Z*W,',',Z*H,'"',' stroked="',!aFill,'"',' path="');var min={x:null,y:null};var max={x:null,y:null};for(var i=0;i<this.currentPath_.length;i++){var p=this.currentPath_[i];var c;switch(p.type){case 'moveTo':c=p;lineStr.push(' m ',mr(p.x),',',mr(p.y));break;case 'lineTo':lineStr.push(' l ',mr(p.x),',',mr(p.y));break;case 'close':lineStr.push(' x ');p=null;break;case 'bezierCurveTo':lineStr.push(' c ',mr(p.cp1x),',',mr(p.cp1y),',',mr(p.cp2x),',',mr(p.cp2y),',',mr(p.x),',',mr(p.y));break;case 'at':case 'wa':lineStr.push(' ',p.type,' ',mr(p.x-this.arcScaleX_*p.radius),',',mr(p.y-this.arcScaleY_*p.radius),' ',mr(p.x+this.arcScaleX_*p.radius),',',mr(p.y+this.arcScaleY_*p.radius),' ',mr(p.xStart),',',mr(p.yStart),' ',mr(p.xEnd),',',mr(p.yEnd));break}
if(p){if(min.x==null||p.x<min.x){min.x=p.x}
if(max.x==null||p.x>max.x){max.x=p.x}
if(min.y==null||p.y<min.y){min.y=p.y}
if(max.y==null||p.y>max.y){max.y=p.y}}}
lineStr.push(' ">');if(!aFill){appendStroke(this,lineStr)}else{appendFill(this,lineStr,min,max)}
lineStr.push('</g_vml_:shape>');this.element_.insertAdjacentHTML('beforeEnd',lineStr.join(''))};function appendStroke(ctx,lineStr){var a=processStyle(ctx.strokeStyle);var color=a.color;var opacity=a.alpha*ctx.globalAlpha;var lineWidth=ctx.lineScale_*ctx.lineWidth;if(lineWidth<1){opacity*=lineWidth}
lineStr.push('<g_vml_:stroke',' opacity="',opacity,'"',' joinstyle="',ctx.lineJoin,'"',' dashstyle="',ctx.lineDash.join(' '),'"',' miterlimit="',ctx.miterLimit,'"',' endcap="',processLineCap(ctx.lineCap),'"',' weight="',lineWidth,'px"',' color="',color,'" />')}
function appendFill(ctx,lineStr,min,max){var fillStyle=ctx.fillStyle;var arcScaleX=ctx.arcScaleX_;var arcScaleY=ctx.arcScaleY_;var width=max.x-min.x;var height=max.y-min.y;if(fillStyle instanceof CanvasGradient_){var angle=0;var focus={x:0,y:0};var shift=0;var expansion=1;if(fillStyle.type_=='gradient'){var x0=fillStyle.x0_/arcScaleX;var y0=fillStyle.y0_/arcScaleY;var x1=fillStyle.x1_/arcScaleX;var y1=fillStyle.y1_/arcScaleY;var p0=getCoords(ctx,x0,y0);var p1=getCoords(ctx,x1,y1);var dx=p1.x-p0.x;var dy=p1.y-p0.y;angle=Math.atan2(dx,dy)*180/Math.PI;if(angle<0){angle+=360}
if(angle<1e-6){angle=0}}else{var p0=getCoords(ctx,fillStyle.x0_,fillStyle.y0_);focus={x:(p0.x-min.x)/width,y:(p0.y-min.y)/height};width/=arcScaleX*Z;height/=arcScaleY*Z;var dimension=m.max(width,height);shift=2*fillStyle.r0_/dimension;expansion=2*fillStyle.r1_/dimension-shift}
var stops=fillStyle.colors_;stops.sort(function(cs1,cs2){return cs1.offset-cs2.offset});var length=stops.length;var color1=stops[0].color;var color2=stops[length-1].color;var opacity1=stops[0].alpha*ctx.globalAlpha;var opacity2=stops[length-1].alpha*ctx.globalAlpha;var colors=[];for(var i=0;i<length;i++){var stop=stops[i];colors.push(stop.offset*expansion+shift+' '+stop.color)}
lineStr.push('<g_vml_:fill type="',fillStyle.type_,'"',' method="none" focus="100%"',' color="',color1,'"',' color2="',color2,'"',' colors="',colors.join(','),'"',' opacity="',opacity2,'"',' g_o_:opacity2="',opacity1,'"',' angle="',angle,'"',' focusposition="',focus.x,',',focus.y,'" />')}else if(fillStyle instanceof CanvasPattern_){if(width&&height){var deltaLeft=-min.x;var deltaTop=-min.y;lineStr.push('<g_vml_:fill',' position="',deltaLeft/width*arcScaleX*arcScaleX,',',deltaTop/height*arcScaleY*arcScaleY,'"',' type="tile"',' src="',fillStyle.src_,'" />')}}else{var a=processStyle(ctx.fillStyle);var color=a.color;var opacity=a.alpha*ctx.globalAlpha;lineStr.push('<g_vml_:fill color="',color,'" opacity="',opacity,'" />')}}
contextPrototype.fill=function(){this.$stroke(!0)};contextPrototype.closePath=function(){this.currentPath_.push({type:'close'})};function getCoords(ctx,aX,aY){var m=ctx.m_;return{x:Z*(aX*m[0][0]+aY*m[1][0]+m[2][0])-Z2,y:Z*(aX*m[0][1]+aY*m[1][1]+m[2][1])-Z2}}
contextPrototype.save=function(){var o={};copyState(this,o);this.aStack_.push(o);this.mStack_.push(this.m_)};contextPrototype.restore=function(){if(this.aStack_.length){copyState(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function matrixIsFinite(m){return isFinite(m[0][0])&&isFinite(m[0][1])&&isFinite(m[1][0])&&isFinite(m[1][1])&&isFinite(m[2][0])&&isFinite(m[2][1])}
function setM(ctx,m,updateLineScale){if(!matrixIsFinite(m)){return}
ctx.m_=m;if(updateLineScale){var det=m[0][0]*m[1][1]-m[0][1]*m[1][0];ctx.lineScale_=sqrt(abs(det))}}
contextPrototype.translate=function(aX,aY){var m1=[[1,0,0],[0,1,0],[aX,aY,1]];setM(this,matrixMultiply(m1,this.m_),!1)};contextPrototype.rotate=function(aRot){var c=mc(aRot);var s=ms(aRot);var m1=[[c,s,0],[-s,c,0],[0,0,1]];setM(this,matrixMultiply(m1,this.m_),!1)};contextPrototype.scale=function(aX,aY){this.arcScaleX_*=aX;this.arcScaleY_*=aY;var m1=[[aX,0,0],[0,aY,0],[0,0,1]];setM(this,matrixMultiply(m1,this.m_),!0)};contextPrototype.transform=function(m11,m12,m21,m22,dx,dy){var m1=[[m11,m12,0],[m21,m22,0],[dx,dy,1]];setM(this,matrixMultiply(m1,this.m_),!0)};contextPrototype.setTransform=function(m11,m12,m21,m22,dx,dy){var m=[[m11,m12,0],[m21,m22,0],[dx,dy,1]];setM(this,m,!0)};contextPrototype.drawText_=function(text,x,y,maxWidth,stroke){var m=this.m_,delta=1000,left=0,right=delta,offset={x:0,y:0},lineStr=[];var fontStyle=getComputedStyle(processFontStyle(this.font),this.element_);var fontStyleString=buildStyle(fontStyle);var elementStyle=this.element_.currentStyle;var textAlign=this.textAlign.toLowerCase();switch(textAlign){case 'left':case 'center':case 'right':break;case 'end':textAlign=elementStyle.direction=='ltr'?'right':'left';break;case 'start':textAlign=elementStyle.direction=='rtl'?'right':'left';break;default:textAlign='left'}
switch(this.textBaseline){case 'hanging':case 'top':offset.y=fontStyle.size/1.75;break;case 'middle':break;default:case null:case 'alphabetic':case 'ideographic':case 'bottom':offset.y=-fontStyle.size/3;break}
switch(textAlign){case 'right':left=delta;right=0.05;break;case 'center':left=right=delta/2;break}
var d=getCoords(this,x+offset.x,y+offset.y);lineStr.push('<g_vml_:line from="',-left,' 0" to="',right,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!stroke,'" stroked="',!!stroke,'" style="position:absolute;width:1px;height:1px;left:0px;top:0px;">');if(stroke){appendStroke(this,lineStr)}else{appendFill(this,lineStr,{x:-left,y:0},{x:right,y:fontStyle.size})}
var skewM=m[0][0].toFixed(3)+','+m[1][0].toFixed(3)+','+m[0][1].toFixed(3)+','+m[1][1].toFixed(3)+',0,0';var skewOffset=mr(d.x/Z)+','+mr(d.y/Z);lineStr.push('<g_vml_:skew on="t" matrix="',skewM,'" ',' offset="',skewOffset,'" origin="',left,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',encodeHtmlAttribute(text),'" style="v-text-align:',textAlign,';font:',encodeHtmlAttribute(fontStyleString),'" /></g_vml_:line>');this.element_.insertAdjacentHTML('beforeEnd',lineStr.join(''))};contextPrototype.fillText=function(text,x,y,maxWidth){this.drawText_(text,x,y,maxWidth,!1)};contextPrototype.strokeText=function(text,x,y,maxWidth){this.drawText_(text,x,y,maxWidth,!0)};contextPrototype.measureText=function(text){if(!this.textMeasureEl_){var s='<span style="position:absolute;'+'top:-20000px;left:0;padding:0;margin:0;border:none;'+'white-space:pre;"></span>';this.element_.insertAdjacentHTML('beforeEnd',s);this.textMeasureEl_=this.element_.lastChild}
var doc=this.element_.ownerDocument;this.textMeasureEl_.innerHTML='';this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(doc.createTextNode(text));return{width:this.textMeasureEl_.offsetWidth}};contextPrototype.clip=function(){};contextPrototype.arcTo=function(){};contextPrototype.createPattern=function(image,repetition){return new CanvasPattern_(image,repetition)};function CanvasGradient_(aType){this.type_=aType;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}
CanvasGradient_.prototype.addColorStop=function(aOffset,aColor){aColor=processStyle(aColor);this.colors_.push({offset:aOffset,color:aColor.color,alpha:aColor.alpha})};function CanvasPattern_(image,repetition){assertImageIsValid(image);switch(repetition){case 'repeat':case null:case '':this.repetition_='repeat';break;case 'repeat-x':case 'repeat-y':case 'no-repeat':this.repetition_=repetition;break;default:throwException('SYNTAX_ERR')}
this.src_=image.src;this.width_=image.width;this.height_=image.height}
function throwException(s){throw new DOMException_(s)}
function assertImageIsValid(img){if(!img||img.nodeType!=1||img.tagName!='IMG'){throwException('TYPE_MISMATCH_ERR')}
if(img.readyState!='complete'){throwException('INVALID_STATE_ERR')}}
function DOMException_(s){this.code=this[s];this.message=s+': DOM Exception '+this.code}
var p=DOMException_.prototype=new Error;p.INDEX_SIZE_ERR=1;p.DOMSTRING_SIZE_ERR=2;p.HIERARCHY_REQUEST_ERR=3;p.WRONG_DOCUMENT_ERR=4;p.INVALID_CHARACTER_ERR=5;p.NO_DATA_ALLOWED_ERR=6;p.NO_MODIFICATION_ALLOWED_ERR=7;p.NOT_FOUND_ERR=8;p.NOT_SUPPORTED_ERR=9;p.INUSE_ATTRIBUTE_ERR=10;p.INVALID_STATE_ERR=11;p.SYNTAX_ERR=12;p.INVALID_MODIFICATION_ERR=13;p.NAMESPACE_ERR=14;p.INVALID_ACCESS_ERR=15;p.VALIDATION_ERR=16;p.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=G_vmlCanvasManager_;CanvasRenderingContext2D=CanvasRenderingContext2D_;CanvasGradient=CanvasGradient_;CanvasPattern=CanvasPattern_;DOMException=DOMException_})()}
;
Ext.define('Ext.draw.engine.Canvas',{extend:'Ext.draw.Surface',isCanvas:!0,requires:['Ext.draw.engine.excanvas','Ext.draw.Animator','Ext.draw.Color'],config:{highPrecision:!1},statics:{contextOverrides:{setGradientBBox:function(bbox){this.bbox=bbox},fill:function(){var fillStyle=this.fillStyle,fillGradient=this.fillGradient,fillOpacity=this.fillOpacity,alpha=this.globalAlpha,bbox=this.bbox;if(fillStyle!==Ext.util.Color.RGBA_NONE&&fillOpacity!==0){if(fillGradient&&bbox){this.fillStyle=fillGradient.generateGradient(this,bbox)}
if(fillOpacity!==1){this.globalAlpha=alpha*fillOpacity}
this.$fill();if(fillOpacity!==1){this.globalAlpha=alpha}
if(fillGradient&&bbox){this.fillStyle=fillStyle}}},stroke:function(){var strokeStyle=this.strokeStyle,strokeGradient=this.strokeGradient,strokeOpacity=this.strokeOpacity,alpha=this.globalAlpha,bbox=this.bbox;if(strokeStyle!==Ext.util.Color.RGBA_NONE&&strokeOpacity!==0){if(strokeGradient&&bbox){this.strokeStyle=strokeGradient.generateGradient(this,bbox)}
if(strokeOpacity!==1){this.globalAlpha=alpha*strokeOpacity}
this.$stroke();if(strokeOpacity!==1){this.globalAlpha=alpha}
if(strokeGradient&&bbox){this.strokeStyle=strokeStyle}}},fillStroke:function(attr,transformFillStroke){var ctx=this,fillStyle=this.fillStyle,fillOpacity=this.fillOpacity,strokeStyle=this.strokeStyle,strokeOpacity=this.strokeOpacity,shadowColor=ctx.shadowColor,shadowBlur=ctx.shadowBlur,none=Ext.util.Color.RGBA_NONE;if(transformFillStroke===undefined){transformFillStroke=attr.transformFillStroke}
if(!transformFillStroke){attr.inverseMatrix.toContext(ctx)}
if(fillStyle!==none&&fillOpacity!==0){ctx.fill();ctx.shadowColor=none;ctx.shadowBlur=0}
if(strokeStyle!==none&&strokeOpacity!==0){ctx.stroke()}
ctx.shadowColor=shadowColor;ctx.shadowBlur=shadowBlur},setLineDash:function(dashList){if(this.$setLineDash){this.$setLineDash(dashList)}},getLineDash:function(){if(this.$getLineDash){return this.$getLineDash()}},ellipse:function(cx,cy,rx,ry,rotation,start,end,anticlockwise){var cos=Math.cos(rotation),sin=Math.sin(rotation);this.transform(cos*rx,sin*rx,-sin*ry,cos*ry,cx,cy);this.arc(0,0,1,start,end,anticlockwise);this.transform(cos/rx,-sin/ry,sin/rx,cos/ry,-(cos*cx+sin*cy)/rx,(sin*cx-cos*cy)/ry)},appendPath:function(path){var me=this,i=0,j=0,commands=path.commands,params=path.params,ln=commands.length;me.beginPath();for(;i<ln;i++){switch(commands[i]){case 'M':me.moveTo(params[j],params[j+1]);j+=2;break;case 'L':me.lineTo(params[j],params[j+1]);j+=2;break;case 'C':me.bezierCurveTo(params[j],params[j+1],params[j+2],params[j+3],params[j+4],params[j+5]);j+=6;break;case 'Z':me.closePath();break}}},save:function(){var toSave=this.toSave,ln=toSave.length,obj=ln&&{},i=0,key;for(;i<ln;i++){key=toSave[i];if(key in this){obj[key]=this[key]}}
this.state.push(obj);this.$save()},restore:function(){var obj=this.state.pop(),key;if(obj){for(key in obj){this[key]=obj[key]}}
this.$restore()}}},splitThreshold:3000,toSave:['fillGradient','strokeGradient'],element:{reference:'element',children:[{reference:'bodyElement',style:{width:'100%',height:'100%',position:'relative'}}]},createCanvas:function(){var canvas,overrides,ctx,name;canvas=Ext.Element.create({tag:'canvas',cls:Ext.baseCSSPrefix+'surface-canvas'});if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(canvas.dom);this.isVML=!0}
overrides=Ext.draw.engine.Canvas.contextOverrides;ctx=canvas.dom.getContext('2d');if(ctx.ellipse){delete overrides.ellipse}
ctx.state=[];ctx.toSave=this.toSave;for(name in overrides){ctx['$'+name]=ctx[name]}
Ext.apply(ctx,overrides);if(this.getHighPrecision()){this.enablePrecisionCompensation(ctx)}else{this.disablePrecisionCompensation(ctx)}
this.bodyElement.appendChild(canvas);this.canvases.push(canvas);this.contexts.push(ctx)},updateHighPrecision:function(highPrecision){var contexts=this.contexts,ln=contexts.length,i,context;for(i=0;i<ln;i++){context=contexts[i];if(highPrecision){this.enablePrecisionCompensation(context)}else{this.disablePrecisionCompensation(context)}}},precisionNames:['rect','fillRect','strokeRect','clearRect','moveTo','lineTo','arc','arcTo','save','restore','updatePrecisionCompensate','setTransform','transform','scale','translate','rotate','quadraticCurveTo','bezierCurveTo','createLinearGradient','createRadialGradient','fillText','strokeText','drawImage'],disablePrecisionCompensation:function(ctx){var regularOverrides=Ext.draw.engine.Canvas.contextOverrides,precisionOverrides=this.precisionNames,ln=precisionOverrides.length,i,name;for(i=0;i<ln;i++){name=precisionOverrides[i];if(!(name in regularOverrides)){delete ctx[name]}}
this.setDirty(!0)},enablePrecisionCompensation:function(ctx){var surface=this,xx=1,yy=1,dx=0,dy=0,matrix=new Ext.draw.Matrix(),transStack=[],comp={},regularOverrides=Ext.draw.engine.Canvas.contextOverrides,originalCtx=ctx.constructor.prototype,precisionOverrides={toSave:surface.toSave,rect:function(x,y,w,h){return originalCtx.rect.call(this,x*xx+dx,y*yy+dy,w*xx,h*yy)},fillRect:function(x,y,w,h){this.updatePrecisionCompensateRect();originalCtx.fillRect.call(this,x*xx+dx,y*yy+dy,w*xx,h*yy);this.updatePrecisionCompensate()},strokeRect:function(x,y,w,h){this.updatePrecisionCompensateRect();originalCtx.strokeRect.call(this,x*xx+dx,y*yy+dy,w*xx,h*yy);this.updatePrecisionCompensate()},clearRect:function(x,y,w,h){return originalCtx.clearRect.call(this,x*xx+dx,y*yy+dy,w*xx,h*yy)},moveTo:function(x,y){return originalCtx.moveTo.call(this,x*xx+dx,y*yy+dy)},lineTo:function(x,y){return originalCtx.lineTo.call(this,x*xx+dx,y*yy+dy)},arc:function(x,y,radius,startAngle,endAngle,anticlockwise){this.updatePrecisionCompensateRect();originalCtx.arc.call(this,x*xx+dx,y*xx+dy,radius*xx,startAngle,endAngle,anticlockwise);this.updatePrecisionCompensate()},arcTo:function(x1,y1,x2,y2,radius){this.updatePrecisionCompensateRect();originalCtx.arcTo.call(this,x1*xx+dx,y1*yy+dy,x2*xx+dx,y2*yy+dy,radius*xx);this.updatePrecisionCompensate()},save:function(){transStack.push(matrix);matrix=matrix.clone();regularOverrides.save.call(this);originalCtx.save.call(this)},restore:function(){matrix=transStack.pop();regularOverrides.restore.call(this);originalCtx.restore.call(this);this.updatePrecisionCompensate()},updatePrecisionCompensate:function(){matrix.precisionCompensate(surface.devicePixelRatio,comp);xx=comp.xx;yy=comp.yy;dx=comp.dx;dy=comp.dy;originalCtx.setTransform.call(this,surface.devicePixelRatio,comp.b,comp.c,comp.d,0,0)},updatePrecisionCompensateRect:function(){matrix.precisionCompensateRect(surface.devicePixelRatio,comp);xx=comp.xx;yy=comp.yy;dx=comp.dx;dy=comp.dy;originalCtx.setTransform.call(this,surface.devicePixelRatio,comp.b,comp.c,comp.d,0,0)},setTransform:function(x2x,x2y,y2x,y2y,newDx,newDy){matrix.set(x2x,x2y,y2x,y2y,newDx,newDy);this.updatePrecisionCompensate()},transform:function(x2x,x2y,y2x,y2y,newDx,newDy){matrix.append(x2x,x2y,y2x,y2y,newDx,newDy);this.updatePrecisionCompensate()},scale:function(sx,sy){this.transform(sx,0,0,sy,0,0)},translate:function(dx,dy){this.transform(1,0,0,1,dx,dy)},rotate:function(radians){var cos=Math.cos(radians),sin=Math.sin(radians);this.transform(cos,sin,-sin,cos,0,0)},quadraticCurveTo:function(cx,cy,x,y){originalCtx.quadraticCurveTo.call(this,cx*xx+dx,cy*yy+dy,x*xx+dx,y*yy+dy)},bezierCurveTo:function(c1x,c1y,c2x,c2y,x,y){originalCtx.bezierCurveTo.call(this,c1x*xx+dx,c1y*yy+dy,c2x*xx+dx,c2y*yy+dy,x*xx+dx,y*yy+dy)},createLinearGradient:function(x0,y0,x1,y1){var grad;this.updatePrecisionCompensateRect();grad=originalCtx.createLinearGradient.call(this,x0*xx+dx,y0*yy+dy,x1*xx+dx,y1*yy+dy);this.updatePrecisionCompensate();return grad},createRadialGradient:function(x0,y0,r0,x1,y1,r1){var grad;this.updatePrecisionCompensateRect();grad=originalCtx.createLinearGradient.call(this,x0*xx+dx,y0*xx+dy,r0*xx,x1*xx+dx,y1*xx+dy,r1*xx);this.updatePrecisionCompensate();return grad},fillText:function(text,x,y,maxWidth){originalCtx.setTransform.apply(this,matrix.elements);if(typeof maxWidth==='undefined'){originalCtx.fillText.call(this,text,x,y)}else{originalCtx.fillText.call(this,text,x,y,maxWidth)}
this.updatePrecisionCompensate()},strokeText:function(text,x,y,maxWidth){originalCtx.setTransform.apply(this,matrix.elements);if(typeof maxWidth==='undefined'){originalCtx.strokeText.call(this,text,x,y)}else{originalCtx.strokeText.call(this,text,x,y,maxWidth)}
this.updatePrecisionCompensate()},fill:function(){var fillGradient=this.fillGradient,bbox=this.bbox;this.updatePrecisionCompensateRect();if(fillGradient&&bbox){this.fillStyle=fillGradient.generateGradient(this,bbox)}
originalCtx.fill.call(this);this.updatePrecisionCompensate()},stroke:function(){var strokeGradient=this.strokeGradient,bbox=this.bbox;this.updatePrecisionCompensateRect();if(strokeGradient&&bbox){this.strokeStyle=strokeGradient.generateGradient(this,bbox)}
originalCtx.stroke.call(this);this.updatePrecisionCompensate()},drawImage:function(img_elem,arg1,arg2,arg3,arg4,dst_x,dst_y,dw,dh){switch(arguments.length){case 3:return originalCtx.drawImage.call(this,img_elem,arg1*xx+dx,arg2*yy+dy);case 5:return originalCtx.drawImage.call(this,img_elem,arg1*xx+dx,arg2*yy+dy,arg3*xx,arg4*yy);case 9:return originalCtx.drawImage.call(this,img_elem,arg1,arg2,arg3,arg4,dst_x*xx+dx,dst_y*yy*dy,dw*xx,dh*yy)}}};Ext.apply(ctx,precisionOverrides);this.setDirty(!0)},updateRect:function(rect){this.callParent([rect]);var me=this,l=Math.floor(rect[0]),t=Math.floor(rect[1]),r=Math.ceil(rect[0]+rect[2]),b=Math.ceil(rect[1]+rect[3]),devicePixelRatio=me.devicePixelRatio,canvases=me.canvases,w=r-l,h=b-t,splitThreshold=Math.round(me.splitThreshold/devicePixelRatio),xSplits=me.xSplits=Math.ceil(w/splitThreshold),ySplits=me.ySplits=Math.ceil(h/splitThreshold),i,j,k,offsetX,offsetY,dom,width,height;for(j=0,offsetY=0;j<ySplits;j++,offsetY+=splitThreshold){for(i=0,offsetX=0;i<xSplits;i++,offsetX+=splitThreshold){k=j*xSplits+i;if(k>=canvases.length){me.createCanvas()}
dom=canvases[k].dom;dom.style.left=offsetX+'px';dom.style.top=offsetY+'px';height=Math.min(splitThreshold,h-offsetY);if(height*devicePixelRatio!==dom.height){dom.height=height*devicePixelRatio;dom.style.height=height+'px'}
width=Math.min(splitThreshold,w-offsetX);if(width*devicePixelRatio!==dom.width){dom.width=width*devicePixelRatio;dom.style.width=width+'px'}
me.applyDefaults(me.contexts[k])}}
me.activeCanvases=k=xSplits*ySplits;while(canvases.length>k){canvases.pop().destroy()}
me.clear()},clearTransform:function(){var me=this,xSplits=me.xSplits,ySplits=me.ySplits,contexts=me.contexts,splitThreshold=me.splitThreshold,devicePixelRatio=me.devicePixelRatio,i,j,k,ctx;for(i=0;i<xSplits;i++){for(j=0;j<ySplits;j++){k=j*xSplits+i;ctx=contexts[k];ctx.translate(-splitThreshold*i,-splitThreshold*j);ctx.scale(devicePixelRatio,devicePixelRatio);me.matrix.toContext(ctx)}}},renderSprite:function(sprite){var me=this,rect=me.getRect(),surfaceMatrix=me.matrix,parent=sprite.getParent(),matrix=Ext.draw.Matrix.fly([1,0,0,1,0,0]),splitThreshold=me.splitThreshold/me.devicePixelRatio,xSplits=me.xSplits,ySplits=me.ySplits,offsetX,offsetY,ctx,bbox,width,height,left=0,right,top=0,bottom,w=rect[2],h=rect[3],i,j,k;while(parent&&parent.isSprite){matrix.prependMatrix(parent.matrix||parent.attr&&parent.attr.matrix);parent=parent.getParent()}
matrix.prependMatrix(surfaceMatrix);bbox=sprite.getBBox();if(bbox){bbox=matrix.transformBBox(bbox)}
sprite.preRender(me);if(sprite.attr.hidden||sprite.attr.globalAlpha===0){sprite.setDirty(!1);return}
for(j=0,offsetY=0;j<ySplits;j++,offsetY+=splitThreshold){for(i=0,offsetX=0;i<xSplits;i++,offsetX+=splitThreshold){k=j*xSplits+i;ctx=me.contexts[k];width=Math.min(splitThreshold,w-offsetX);height=Math.min(splitThreshold,h-offsetY);left=offsetX;right=left+width;top=offsetY;bottom=top+height;if(bbox){if(bbox.x>right||bbox.x+bbox.width<left||bbox.y>bottom||bbox.y+bbox.height<top){continue}}
ctx.save();sprite.useAttributes(ctx,rect);if(!1===sprite.render(me,ctx,[left,top,width,height])){return!1}
ctx.restore()}}
sprite.setDirty(!1)},flatten:function(size,surfaces){var targetCanvas=document.createElement('canvas'),className=Ext.getClassName(this),ratio=this.devicePixelRatio,ctx=targetCanvas.getContext('2d'),surface,canvas,rect,i,j,xy;targetCanvas.width=Math.ceil(size.width*ratio);targetCanvas.height=Math.ceil(size.height*ratio);for(i=0;i<surfaces.length;i++){surface=surfaces[i];if(Ext.getClassName(surface)!==className){continue}
rect=surface.getRect();for(j=0;j<surface.canvases.length;j++){canvas=surface.canvases[j];xy=canvas.getOffsetsTo(canvas.getParent());ctx.drawImage(canvas.dom,(rect[0]+xy[0])*ratio,(rect[1]+xy[1])*ratio)}}
return{data:targetCanvas.toDataURL(),type:'png'}},applyDefaults:function(ctx){var none=Ext.util.Color.RGBA_NONE;ctx.strokeStyle=none;ctx.fillStyle=none;ctx.textAlign='start';ctx.textBaseline='alphabetic';ctx.miterLimit=1},clear:function(){var me=this,activeCanvases=me.activeCanvases,i,canvas,ctx;for(i=0;i<activeCanvases;i++){canvas=me.canvases[i].dom;ctx=me.contexts[i];ctx.setTransform(1,0,0,1,0,0);ctx.clearRect(0,0,canvas.width,canvas.height)}
me.setDirty(!0)},destroy:function(){var me=this,canvases=me.canvases,ln=canvases.length,i;for(i=0;i<ln;i++){me.contexts[i]=null;canvases[i].destroy();canvases[i]=null}
me.contexts=me.canvases=null;me.callParent()},privates:{initElement:function(){var me=this;me.callParent();me.canvases=[];me.contexts=[];me.activeCanvases=me.xSplits=me.ySplits=0}}},function(){var me=this,proto=me.prototype,splitThreshold=1e10;if(Ext.os.is.Android4&&Ext.browser.is.Chrome){splitThreshold=3000}else if(Ext.is.iOS){splitThreshold=2200}
proto.splitThreshold=splitThreshold})
;
Ext.define('Ext.draw.Container',{extend:'Ext.draw.ContainerBase',alternateClassName:'Ext.draw.Component',xtype:'draw',defaultType:'surface',isDrawContainer:!0,requires:['Ext.draw.Surface','Ext.draw.engine.Svg','Ext.draw.engine.Canvas','Ext.draw.gradient.GradientDefinition'],engine:'Ext.draw.engine.Canvas',config:{cls:[Ext.baseCSSPrefix+'draw-container',Ext.baseCSSPrefix+'unselectable'],resizeHandler:null,sprites:null,gradients:[],downloadServerUrl:undefined,touchAction:{panX:!1,panY:!1,pinchZoom:!1,doubleTapZoom:!1},surfaceZIndexes:{main:1}},defaultDownloadServerUrl:'http://svg.sencha.io',supportedFormats:['png','pdf','jpeg','gif'],supportedOptions:{version:Ext.isNumber,data:Ext.isString,format:function(format){return Ext.Array.indexOf(this.supportedFormats,format)>=0},filename:Ext.isString,width:Ext.isNumber,height:Ext.isNumber,scale:Ext.isNumber,pdf:Ext.isObject,jpeg:Ext.isObject},initAnimator:function(){this.frameCallbackId=Ext.draw.Animator.addFrameCallback('renderFrame',this)},applyDownloadServerUrl:function(url){var defaultUrl=this.defaultDownloadServerUrl;if(!url){url=defaultUrl;if(!window.jasmine){Ext.log.warn('Using Sencha\'s download server could expose your data and pose '+'a security risk. Please see Ext.draw.Container#download method '+'docs for more info. (component id='+this.getId()+')')}}
return url},applyGradients:function(gradients){var result=[],i,n,gradient,offset;if(!Ext.isArray(gradients)){return result}
for(i=0,n=gradients.length;i<n;i++){gradient=gradients[i];if(!Ext.isObject(gradient)){continue}
if(typeof gradient.type!=='string'){gradient.type='linear'}
if(gradient.angle){gradient.degrees=gradient.angle;delete gradient.angle}
if(Ext.isObject(gradient.stops)){gradient.stops=(function(stops){var result=[],stop;for(offset in stops){stop=stops[offset];stop.offset=offset/100;result.push(stop)}
return result})(gradient.stops)}
result.push(gradient)}
Ext.draw.gradient.GradientDefinition.add(result);return result},applySprites:function(sprites){var result,surface,sprite,i,ln;if(!sprites){return}
sprites=Ext.Array.from(sprites);result=[];for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];surface=sprite.surface;if(!(surface&&surface.isSurface)){if(Ext.isString(surface)){surface=this.getSurface(surface);delete sprite.surface}else{surface=this.getSurface('main')}}
sprite=surface.add(sprite);result.push(sprite)}
return result},resizeDelay:500,resizeTimerId:0,lastResizeTime:null,size:null,handleResize:function(size,instantly){var me=this,el=me.element,resizeHandler=me.getResizeHandler()||me.defaultResizeHandler,resizeDelay=me.resizeDelay,lastResizeTime=me.lastResizeTime,defer,result;if(!el){return}
size=size||el.getSize();if(!(size.width&&size.height)){return}
me.size=size;me.stopResizeTimer();defer=!instantly&&lastResizeTime&&(Ext.Date.now()-lastResizeTime<resizeDelay);if(defer){me.resizeTimerId=Ext.defer(me.handleResize,resizeDelay,me,[size,!0]);return}
me.fireEvent('bodyresize',me,size);Ext.callback(resizeHandler,null,[size],0,me);if(result!==!1){me.renderFrame()}
me.lastResizeTime=Ext.Date.now()},stopResizeTimer:function(){if(this.resizeTimerId){Ext.undefer(this.resizeTimerId);this.resizeTimerId=0}},defaultResizeHandler:function(size){this.getItems().each(function(surface){surface.setRect([0,0,size.width,size.height])})},getSurface:function(id,type){var me=this,surfaces=me.getItems(),oldCount=surfaces.getCount(),zIndexes=me.getSurfaceZIndexes(),surface;id=id||'main';type=type||id;surface=me.createSurface(id);if(type in zIndexes){surface.element.setStyle('zIndex',zIndexes[type])}
if(surfaces.getCount()>oldCount){me.handleResize(null,!0)}
return surface},createSurface:function(id){var me=this,surfaces=me.getItems(),surface;id=this.getId()+'-'+(id||'main');surface=surfaces.get(id);if(!surface){surface=me.add({xclass:me.engine,id:id})}
return surface},renderFrame:function(){var me=this,surfaces=me.getItems(),i,ln,item;for(i=0,ln=surfaces.length;i<ln;i++){item=surfaces.items[i];if(item.isSurface){item.renderFrame()}}},getSurfaces:function(sort){var surfaces=Array.prototype.slice.call(this.items.items),zIndexes=this.getSurfaceZIndexes(),i,j,surface,zIndex;if(sort){for(j=1;j<surfaces.length;j++){surface=surfaces[j];zIndex=zIndexes[surface.type];i=j-1;while(i>=0&&zIndexes[surfaces[i].type]>zIndex){surfaces[i+1]=surfaces[i];i--}
surfaces[i+1]=surface}}
return surfaces},getImage:function(format){var size=this.bodyElement.getSize(),surfaces=this.getSurfaces(!0),surface=surfaces[0],image,imageElement;if((Ext.isIE||Ext.isEdge)&&surface.isSVG){image={data:surface.toSVG(size,surfaces),type:'svg-markup'}}else{image=surface.flatten(size,surfaces);if(format==='image'){imageElement=new Image();imageElement.src=image.data;image.data=imageElement;return image}
if(format==='stream'){image.data=image.data.replace(/^data:image\/[^;]+/,'data:application/octet-stream');return image}}
return image},download:function(config){var me=this,inputs=[],markup,name,value;if(Ext.isIE8){return!1}
config=config||{};config.version=2;if(!config.data){config.data=me.getImage().data}
for(name in config){if(config.hasOwnProperty(name)){value=config[name];if(name in me.supportedOptions){if(me.supportedOptions[name].call(me,value)){inputs.push({tag:'input',type:'hidden',name:name,value:Ext.String.htmlEncode(Ext.isObject(value)?Ext.JSON.encode(value):value)})}else{Ext.log.error('Invalid value for image download option "'+name+'": '+value)}}else{Ext.log.error('Invalid image download option: "'+name+'"')}}}
markup=Ext.dom.Helper.markup({tag:'html',children:[{tag:'head'},{tag:'body',children:[{tag:'form',method:'POST',action:config.url||me.getDownloadServerUrl(),children:inputs},{tag:'script',type:'text/javascript',children:'document.getElementsByTagName("form")[0].submit();'}]}]});window.open('','ImageDownload_'+Date.now()).document.write(markup)},doDestroy:function(){var me=this,callbackId=me.frameCallbackId;if(callbackId){Ext.draw.Animator.removeFrameCallback(callbackId)}
me.stopResizeTimer();me.callParent()}},function(){if(location.search.match('svg')){Ext.draw.Container.prototype.engine='Ext.draw.engine.Svg'}else if((Ext.os.is.BlackBerry&&Ext.os.version.getMajor()===10)||(Ext.browser.is.AndroidStock4&&(Ext.os.version.getMinor()===1||Ext.os.version.getMinor()===2||Ext.os.version.getMinor()===3))){Ext.draw.Container.prototype.engine='Ext.draw.engine.Svg'}})
;
Ext.define('Ext.chart.theme.BaseTheme',{defaultsDivCls:'x-component'})
;
Ext.define('Ext.chart.theme.Base',{extend:'Ext.chart.theme.BaseTheme',mixins:{factoryable:'Ext.mixin.Factoryable'},requires:['Ext.draw.Color'],factoryConfig:{type:'chart.theme'},isTheme:!0,isBase:!0,config:{baseColor:null,colors:undefined,gradients:null,chart:{defaults:{captions:{title:{docked:'top',padding:5,style:{textAlign:'center',fontFamily:'default',fontWeight:'500',fillStyle:'black',fontSize:'default*1.6'}},subtitle:{docked:'top',style:{textAlign:'center',fontFamily:'default',fontWeight:'normal',fillStyle:'black',fontSize:'default*1.3'}},credits:{docked:'bottom',padding:5,style:{textAlign:'left',fontFamily:'default',fontWeight:'lighter',fillStyle:'black',fontSize:'default'}}},background:'white'}},axis:{defaults:{label:{x:0,y:0,textBaseline:'middle',textAlign:'center',fontSize:'default',fontFamily:'default',fontWeight:'default',fillStyle:'black'},title:{fillStyle:'black',fontSize:'default*1.23',fontFamily:'default',fontWeight:'default'},style:{strokeStyle:'black'},grid:{strokeStyle:'rgb(221, 221, 221)'}},top:{style:{textPadding:5}},bottom:{style:{textPadding:5}}},series:{defaults:{label:{fillStyle:'black',strokeStyle:'none',fontFamily:'default',fontWeight:'default',fontSize:'default*1.077',textBaseline:'middle',textAlign:'center'},labelOverflowPadding:5}},sprites:{text:{fontSize:'default',fontWeight:'default',fontFamily:'default',fillStyle:'black'}},legend:{label:{fontSize:14,fontWeight:'default',fontFamily:'default',fillStyle:'black'},border:{lineWidth:1,radius:4,fillStyle:'none',strokeStyle:'gray'},background:'white'},seriesThemes:undefined,markerThemes:{type:['circle','cross','plus','square','triangle','diamond']},useGradients:!1,background:null},colorDefaults:['#94ae0a','#115fa6','#a61120','#ff8809','#ffd13e','#a61187','#24ad9a','#7c7474','#a66111'],constructor:function(config){this.initConfig(config);this.resolveDefaults()},defaultRegEx:/^default([+\-/*]\d+(?:\.\d+)?)?$/,defaultOperators:{'*':function(v1,v2){return v1*v2},'+':function(v1,v2){return v1+v2},'-':function(v1,v2){return v1-v2}},resolveChartDefaults:function(){var chart=Ext.clone(this.getChart()),chartType,captionName,chartConfig,captionConfig;for(chartType in chart){chartConfig=chart[chartType];if('captions' in chartConfig){for(captionName in chartConfig.captions){captionConfig=chartConfig.captions[captionName];if(captionConfig){this.replaceDefaults(captionConfig.style)}}}}
this.setChart(chart)},resolveDefaults:function(){var me=this;Ext.onInternalReady(function(){var sprites=Ext.clone(me.getSprites()),legend=Ext.clone(me.getLegend()),axis=Ext.clone(me.getAxis()),series=Ext.clone(me.getSeries()),div,key,config;if(!me.superclass.defaults){div=Ext.getBody().createChild({tag:'div',cls:me.defaultsDivCls});me.superclass.defaults={fontFamily:div.getStyle('fontFamily'),fontWeight:div.getStyle('fontWeight'),fontSize:parseFloat(div.getStyle('fontSize')),fontVariant:div.getStyle('fontVariant'),fontStyle:div.getStyle('fontStyle')};div.destroy()}
me.resolveChartDefaults();me.replaceDefaults(sprites.text);me.setSprites(sprites);me.replaceDefaults(legend.label);me.setLegend(legend);for(key in axis){config=axis[key];me.replaceDefaults(config.label);me.replaceDefaults(config.title)}
me.setAxis(axis);for(key in series){config=series[key];me.replaceDefaults(config.label)}
me.setSeries(series)})},replaceDefaults:function(target){var me=this,defaults=me.superclass.defaults,defaultRegEx=me.defaultRegEx,key,value,match,binaryFn;if(Ext.isObject(target)){for(key in defaults){match=defaultRegEx.exec(target[key]);if(match){value=defaults[key];match=match[1];if(match){binaryFn=me.defaultOperators[match.charAt(0)];value=Math.round(binaryFn(value,parseFloat(match.substr(1))))}
target[key]=value}}}},applyBaseColor:function(baseColor){var midColor,midL;if(baseColor){midColor=baseColor.isColor?baseColor:Ext.util.Color.fromString(baseColor);midL=midColor.getHSL()[2];if(midL<0.15){midColor=midColor.createLighter(0.3)}else if(midL<0.3){midColor=midColor.createLighter(0.15)}else if(midL>0.85){midColor=midColor.createDarker(0.3)}else if(midL>0.7){midColor=midColor.createDarker(0.15)}
this.setColors([midColor.createDarker(0.3).toString(),midColor.createDarker(0.15).toString(),midColor.toString(),midColor.createLighter(0.12).toString(),midColor.createLighter(0.24).toString(),midColor.createLighter(0.31).toString()])}
return baseColor},applyColors:function(newColors){return newColors||this.colorDefaults},updateUseGradients:function(useGradients){if(useGradients){this.updateGradients({type:'linear',degrees:90})}},updateBackground:function(background){var chart;if(background){chart=this.getChart();chart.defaults.background=background;this.setChart(chart)}},updateGradients:function(gradients){var colors=this.getColors(),items=[],gradient,midColor,color,i,ln;if(Ext.isObject(gradients)){for(i=0,ln=colors&&colors.length||0;i<ln;i++){midColor=Ext.util.Color.fromString(colors[i]);if(midColor){color=midColor.createLighter(0.15).toString();gradient=Ext.apply(Ext.Object.chain(gradients),{stops:[{offset:1,color:midColor.toString()},{offset:0,color:color.toString()}]});items.push(gradient)}}
this.setColors(items)}},applySeriesThemes:function(newSeriesThemes){var colors,color;this.getBaseColor();this.getUseGradients();this.getGradients();colors=this.getColors();if(!newSeriesThemes){newSeriesThemes={fillStyle:Ext.Array.clone(colors),strokeStyle:Ext.Array.map(colors,function(value){color=Ext.util.Color.fromString(value.stops?value.stops[0].color:value);return color.createDarker(0.15).toString()})}}
return newSeriesThemes}})
;
Ext.define('Ext.chart.theme.Default',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.default','chart.theme.Default','chart.theme.Base']})
;
Ext.define('Ext.chart.Util',{singleton:!0,expandRange:function(range,data){var length=data.length,min=range[0],max=range[1],i,value;for(i=0;i<length;i++){value=data[i];if(value==null||!isFinite(value)){continue}
if(value<min||!isFinite(min)){min=value}
if(value>max||!isFinite(max)){max=value}}
range[0]=min;range[1]=max},defaultRange:[0,1],validateRange:function(range,defaultRange,padding){var isFin0,isFin1;defaultRange=defaultRange||this.defaultRange.slice();if(!(padding===0||padding>0)){padding=0.5}
if(!range||range.length!==2){return defaultRange}
range=[range[0],range[1]];if(!range[0]){range[0]=0}
if(!range[1]){range[1]=0}
if(padding&&range[0]===range[1]){range=[range[0]-padding,range[0]+padding];if(range[0]===range[1]){return defaultRange}}
isFin0=isFinite(range[0]);isFin1=isFinite(range[1]);if(!isFin0&&!isFin1){return defaultRange}
if(isFin0&&!isFin1){range[1]=range[0]+Ext.Number.sign(range[1])*(defaultRange[1]-defaultRange[0])}else if(isFin1&&!isFin0){range[0]=range[1]+Ext.Number.sign(range[0])*(defaultRange[1]-defaultRange[0])}
return[Math.min(range[0],range[1]),Math.max(range[0],range[1])]},applyAnimation:function(animation,oldAnimation){if(!animation){animation={duration:0}}else if(animation===!0){animation={easing:'easeInOut',duration:500}}
return oldAnimation?Ext.apply({},animation,oldAnimation):animation}})
;
Ext.define('Ext.chart.Markers',{extend:'Ext.draw.sprite.Instancing',isMarkers:!0,defaultCategory:'default',constructor:function(){this.callParent(arguments);this.categories={};this.revisions={}},destroy:function(){this.categories=null;this.revisions=null;this.callParent()},getMarkerFor:function(category,index){var categoryInstances;if(category in this.categories){categoryInstances=this.categories[category];if(index in categoryInstances){return this.get(categoryInstances[index])}}},clear:function(category){category=category||this.defaultCategory;if(!(category in this.revisions)){this.revisions[category]=1}else{this.revisions[category]++}},clearAll:function(){this.callParent();this.categories={};this.revisions={}},putMarkerFor:function(category,attr,index,bypassNormalization,keepRevision){var me=this,categoryInstances,instance;category=category||this.defaultCategory;categoryInstances=me.categories[category]||(me.categories[category]={});if(index in categoryInstances){me.setAttributesFor(categoryInstances[index],attr,bypassNormalization)}else{categoryInstances[index]=me.getCount();me.add(attr,bypassNormalization)}
instance=me.get(categoryInstances[index]);if(instance){instance.category=category;if(!keepRevision){instance.revision=me.revisions[category]||(me.revisions[category]=1)}}},getMarkerBBoxFor:function(category,index,isWithoutTransform){var categoryInstances;if(category in this.categories){categoryInstances=this.categories[category];if(index in categoryInstances){return this.getBBoxFor(categoryInstances[index],isWithoutTransform)}}},getBBox:function(){return null},render:function(surface,ctx,rect){var me=this,surfaceRect=surface.getRect(),revisions=me.revisions,mat=me.attr.matrix,template=me.getTemplate(),templateAttr=template.attr,ln=me.instances.length,instance,i;mat.toContext(ctx);template.preRender(surface,ctx,rect);template.useAttributes(ctx,surfaceRect);for(i=0;i<ln;i++){instance=me.get(i);if(instance.hidden||instance.revision!==revisions[instance.category]){continue}
ctx.save();template.attr=instance;template.useAttributes(ctx,surfaceRect);template.render(surface,ctx,rect);ctx.restore()}
template.attr=templateAttr}})
;
Ext.define('Ext.chart.modifier.Callout',{extend:'Ext.draw.modifier.Modifier',alternateClassName:'Ext.chart.label.Callout',prepareAttributes:function(attr){if(!attr.hasOwnProperty('calloutOriginal')){attr.calloutOriginal=Ext.Object.chain(attr);attr.calloutOriginal.prototype=attr}
if(this._lower){this._lower.prepareAttributes(attr.calloutOriginal)}},setAttrs:function(attr,changes){var callout=attr.callout,origin=attr.calloutOriginal,bbox=attr.bbox.plain,width=(bbox.width||0)+attr.labelOverflowPadding,height=(bbox.height||0)+attr.labelOverflowPadding,dx,dy,rotationRads,x,y,calloutPlaceX,calloutPlaceY,calloutVertical,temp;if('callout' in changes){callout=changes.callout}
if('callout' in changes||'calloutPlaceX' in changes||'calloutPlaceY' in changes||'x' in changes||'y' in changes){rotationRads='rotationRads' in changes?origin.rotationRads=changes.rotationRads:origin.rotationRads;x='x' in changes?(origin.x=changes.x):origin.x;y='y' in changes?(origin.y=changes.y):origin.y;calloutPlaceX='calloutPlaceX' in changes?changes.calloutPlaceX:attr.calloutPlaceX;calloutPlaceY='calloutPlaceY' in changes?changes.calloutPlaceY:attr.calloutPlaceY;calloutVertical='calloutVertical' in changes?changes.calloutVertical:attr.calloutVertical;rotationRads%=Math.PI*2;if(Math.cos(rotationRads)<0){rotationRads=(rotationRads+Math.PI)%(Math.PI*2)}
if(rotationRads>Math.PI){rotationRads-=Math.PI*2}
if(calloutVertical){rotationRads=rotationRads*(1-callout)-Math.PI/2*callout;temp=width;width=height;height=temp}else{rotationRads=rotationRads*(1-callout)}
changes.rotationRads=rotationRads;changes.x=x*(1-callout)+calloutPlaceX*callout;changes.y=y*(1-callout)+calloutPlaceY*callout;dx=calloutPlaceX-x;dy=calloutPlaceY-y;if(Math.abs(dy*width)>Math.abs(dx*height)){if(dy>0){changes.calloutEndX=changes.x-(height/2)*(dx/dy)*callout;changes.calloutEndY=changes.y-(height/2)*callout}else{changes.calloutEndX=changes.x+(height/2)*(dx/dy)*callout;changes.calloutEndY=changes.y+(height/2)*callout}}else{if(dx>0){changes.calloutEndX=changes.x-width/2;changes.calloutEndY=changes.y-(width/2)*(dy/dx)*callout}else{changes.calloutEndX=changes.x+width/2;changes.calloutEndY=changes.y+(width/2)*(dy/dx)*callout}}
if(changes.calloutStartX&&changes.calloutStartY){changes.calloutHasLine=(dx>0&&changes.calloutStartX<changes.calloutEndX)||(dx<=0&&changes.calloutStartX>changes.calloutEndX)||(dy>0&&changes.calloutStartY<changes.calloutEndY)||(dy<=0&&changes.calloutStartY>changes.calloutEndY)}else{changes.calloutHasLine=!0}}
return changes},pushDown:function(attr,changes){changes=this.callParent([attr.calloutOriginal,changes]);return this.setAttrs(attr,changes)},popUp:function(attr,changes){attr=attr.prototype;changes=this.setAttrs(attr,changes);if(this._upper){return this._upper.popUp(attr,changes)}else{return Ext.apply(attr,changes)}}})
;
Ext.define('Ext.chart.sprite.Label',{extend:'Ext.draw.sprite.Text',alternateClassName:'Ext.chart.label.Label',requires:['Ext.chart.modifier.Callout'],inheritableStatics:{def:{processors:{callout:'limited01',calloutHasLine:'bool',calloutPlaceX:'number',calloutPlaceY:'number',calloutStartX:'number',calloutStartY:'number',calloutEndX:'number',calloutEndY:'number',calloutColor:'color',calloutWidth:'number',calloutVertical:'bool',labelOverflowPadding:'number',display:'enums(none,under,over,rotate,insideStart,insideEnd,inside,outside)',orientation:'enums(horizontal,vertical)',renderer:'default'},defaults:{callout:0,calloutHasLine:!0,calloutPlaceX:0,calloutPlaceY:0,calloutStartX:0,calloutStartY:0,calloutEndX:0,calloutEndY:0,calloutWidth:1,calloutVertical:!1,calloutColor:'black',labelOverflowPadding:5,display:'none',orientation:'',renderer:null},triggers:{callout:'transform',calloutPlaceX:'transform',calloutPlaceY:'transform',labelOverflowPadding:'transform',calloutRotation:'transform',display:'hidden'},updaters:{hidden:function(attr){attr.hidden=(attr.display==='none')}}}},config:{animation:{customDurations:{callout:200}},field:null,calloutLine:!0,hideLessThan:20},applyCalloutLine:function(calloutLine){if(calloutLine){return Ext.apply({},calloutLine)}
return calloutLine},createModifiers:function(){var me=this,mods=me.callParent(arguments);mods.callout=new Ext.chart.modifier.Callout({sprite:me});mods.animation.setUpper(mods.callout);mods.callout.setUpper(mods.target)},render:function(surface,ctx){var me=this,attr=me.attr,calloutColor=attr.calloutColor;ctx.save();ctx.globalAlpha*=attr.callout;if(ctx.globalAlpha>0&&attr.calloutHasLine){if(calloutColor&&calloutColor.isGradient){calloutColor=calloutColor.getStops()[0].color}
ctx.strokeStyle=calloutColor;ctx.fillStyle=calloutColor;ctx.lineWidth=attr.calloutWidth;ctx.beginPath();ctx.moveTo(me.attr.calloutStartX,me.attr.calloutStartY);ctx.lineTo(me.attr.calloutEndX,me.attr.calloutEndY);ctx.stroke();ctx.beginPath();ctx.arc(me.attr.calloutStartX,me.attr.calloutStartY,1*attr.calloutWidth,0,2*Math.PI,!0);ctx.fill();ctx.beginPath();ctx.arc(me.attr.calloutEndX,me.attr.calloutEndY,1*attr.calloutWidth,0,2*Math.PI,!0);ctx.fill()}
ctx.restore();Ext.draw.sprite.Text.prototype.render.apply(me,arguments)}})
;
Ext.define('Ext.chart.series.Series',{requires:['Ext.chart.Util','Ext.chart.Markers','Ext.chart.sprite.Label','Ext.tip.ToolTip'],mixins:['Ext.mixin.Observable','Ext.mixin.Bindable'],isSeries:!0,defaultBindProperty:'store',type:null,seriesType:'sprite',identifiablePrefix:'ext-line-',observableType:'series',darkerStrokeRatio:0.15,config:{chart:null,title:null,renderer:null,showInLegend:!0,triggerAfterDraw:!1,theme:null,style:{},subStyle:{},themeStyle:{},colors:null,useDarkerStrokeColor:!0,store:null,label:null,labelOverflowPadding:null,showMarkers:!0,marker:null,markerSubStyle:null,itemInstancing:null,background:null,surface:null,overlaySurface:null,hidden:!1,highlight:!1,highlightCfg:{merge:function(value){return value},$value:{fillStyle:'yellow',strokeStyle:'red'}},animation:null,tooltip:null},directions:[],sprites:null,themeColorCount:function(){return 1},isStoreDependantColorCount:!1,themeMarkerCount:function(){return 0},getFields:function(fieldCategory){var me=this,fields=[],ln=fieldCategory.length,i,field;for(i=0;i<ln;i++){field=me['get'+fieldCategory[i]+'Field']();if(Ext.isArray(field)){fields.push.apply(fields,field)}else{fields.push(field)}}
return fields},applyAnimation:function(animation,oldAnimation){var chart=this.getChart();if(!chart.isSettingSeriesAnimation){this.isUserAnimation=!0}
return Ext.chart.Util.applyAnimation(animation,oldAnimation)},updateAnimation:function(animation){var sprites=this.getSprites(),itemsMarker,markersMarker,i,ln,sprite;for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];if(sprite.isMarkerHolder){itemsMarker=sprite.getMarker('items');if(itemsMarker){itemsMarker.getTemplate().setAnimation(animation)}
markersMarker=sprite.getMarker('markers');if(markersMarker){markersMarker.getTemplate().setAnimation(animation)}}
sprite.setAnimation(animation)}},getAnimation:function(){var chart=this.getChart(),animation;if(chart&&chart.animationSuspendCount){animation={duration:0}}else{if(this.isUserAnimation){animation=this.callParent()}else{animation=chart.getAnimation()}}
return animation},updateTitle:function(){var me=this,chart=me.getChart();if(chart&&!chart.isInitializing){chart.refreshLegendStore()}},applyHighlight:function(highlight,oldHighlight){var me=this,highlightCfg=me.getHighlightCfg();if(Ext.isObject(highlight)){highlight=Ext.merge({},highlightCfg,highlight)}else if(highlight===!0){highlight=highlightCfg}
if(highlight){highlight.type='highlight'}
return highlight&&Ext.merge({},oldHighlight,highlight)},updateHighlight:function(highlight){var me=this,sprites=me.sprites,highlightCfg=me.getHighlightCfg(),i,ln,sprite,items,markers;me.getStyle();me.getMarker();if(!Ext.Object.isEmpty(highlight)){me.addItemHighlight();for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];if(sprite.isMarkerHolder){items=sprite.getMarker('items');if(items){items.getTemplate().modifiers.highlight.setStyle(highlight)}
markers=sprite.getMarker('markers');if(markers){markers.getTemplate().modifiers.highlight.setStyle(highlight)}}}}else if(!Ext.Object.equals(highlightCfg,this.defaultConfig.highlightCfg)){this.addItemHighlight()}},updateHighlightCfg:function(highlightCfg){if(!this.isConfiguring&&!Ext.Object.equals(highlightCfg,this.defaultConfig.highlightCfg)){this.addItemHighlight()}},applyItemInstancing:function(config,oldConfig){if(config&&oldConfig&&(!config.type||config.type===oldConfig.type)){config=Ext.merge({},oldConfig,config)}
if(config&&!config.type){config=null}
return config},setAttributesForItem:function(item,change){var sprite=item&&item.sprite,i;if(sprite){if(sprite.isMarkerHolder&&item.category==='items'){sprite.putMarker(item.category,change,item.index,!1,!0)}
if(sprite.isMarkerHolder&&item.category==='markers'){sprite.putMarker(item.category,change,item.index,!1,!0)}else if(sprite.isInstancing){sprite.setAttributesFor(item.index,change)}else if(Ext.isArray(sprite)){for(i=0;i<sprite.length;i++){sprite[i].setAttributes(change)}}else{sprite.setAttributes(change)}}},getBBoxForItem:function(item){var sprite=item&&item.sprite,result=null;if(sprite){if(sprite.getMarker('items')&&item.category==='items'){result=sprite.getMarkerBBox(item.category,item.index)}else if(sprite instanceof Ext.draw.sprite.Instancing){result=sprite.getBBoxFor(item.index)}else{result=sprite.getBBox()}}
return result},dataRange:null,constructor:function(config){var me=this,id;config=config||{};if(config.tips){config=Ext.apply({tooltip:config.tips},config)}
if(config.highlightCfg){config=Ext.apply({highlight:config.highlightCfg},config)}
if('id' in config){id=config.id}else if('id' in me.config){id=me.config.id}else{id=me.getId()}
me.setId(id);me.sprites=[];me.dataRange=[];me.mixins.observable.constructor.call(me,config);me.initBindable()},lookupViewModel:function(skipThis){var chart=this.getChart();return chart?chart.lookupViewModel(skipThis):null},applyTooltip:function(tooltip,oldTooltip){var config=Ext.apply({xtype:'tooltip',renderer:Ext.emptyFn,constrainPosition:!0,shrinkWrapDock:!0,autoHide:!0,hideDelay:200,mouseOffset:[20,20],trackMouse:!0},tooltip);return Ext.create(config)},updateTooltip:function(){this.addItemHighlight()},addItemHighlight:function(){var chart=this.getChart(),interactions,interaction,hasRequiredInteraction,i;if(!chart){return}
interactions=chart.getInteractions();for(i=0;i<interactions.length;i++){interaction=interactions[i];if(interaction.isItemHighlight||interaction.isItemEdit){hasRequiredInteraction=!0;break}}
if(!hasRequiredInteraction){interactions.push('itemhighlight');chart.setInteractions(interactions)}},showTooltip:function(item,event){var me=this,tooltip=me.getTooltip();if(!tooltip){return}
Ext.callback(tooltip.renderer,tooltip.scope,[tooltip,item.record,item],0,me);tooltip.showBy(event)},showTooltipAt:function(item,x,y){var me=this,tooltip=me.getTooltip(),mouseOffset=tooltip.config.mouseOffset;if(!tooltip||!tooltip.showAt){return}
if(mouseOffset){x+=mouseOffset[0];y+=mouseOffset[1]}
Ext.callback(tooltip.renderer,tooltip.scope,[tooltip,item.record,item],0,me);tooltip.showAt([x,y])},hideTooltip:function(item,immediate){var me=this,tooltip=me.getTooltip();if(!tooltip){return}
if(immediate){tooltip.hide()}else{tooltip.delayHide()}},applyStore:function(store){return store&&Ext.StoreManager.lookup(store)},getStore:function(){return this._store||this.getChart()&&this.getChart().getStore()},updateStore:function(newStore,oldStore){var me=this,chart=me.getChart(),chartStore=chart&&chart.getStore(),sprites,sprite,len,i;oldStore=oldStore||chartStore;if(oldStore&&oldStore!==newStore){oldStore.un({datachanged:'onDataChanged',update:'onDataChanged',scope:me})}
if(newStore){newStore.on({datachanged:'onDataChanged',update:'onDataChanged',scope:me});sprites=me.getSprites();for(i=0,len=sprites.length;i<len;i++){sprite=sprites[i];if(sprite.setStore){sprite.setStore(newStore)}}
me.onDataChanged()}
me.fireEvent('storechange',me,newStore,oldStore)},onStoreChange:function(chart,newStore,oldStore){if(!this._store){this.updateStore(newStore,oldStore)}},defaultRange:[0,1],coordinate:function(direction,directionOffset,directionCount){var me=this,store=me.getStore(),hidden=me.getHidden(),items=store.getData().items,axis=me['get'+direction+'Axis'](),dataRange=[NaN,NaN],fieldCategory=me['fieldCategory'+direction]||[direction],fields=me.getFields(fieldCategory),i,field,data,style={},sprites=me.getSprites(),axisRange;if(sprites.length&&!Ext.isBoolean(hidden)||!hidden){for(i=0;i<fieldCategory.length;i++){field=fields[i];data=me.coordinateData(items,field,axis);Ext.chart.Util.expandRange(dataRange,data);style['data'+fieldCategory[i]]=data}
dataRange=Ext.chart.Util.validateRange(dataRange,me.defaultRange,0);me.dataRange[directionOffset]=dataRange[0];me.dataRange[directionOffset+directionCount]=dataRange[1];style['dataMin'+direction]=dataRange[0];style['dataMax'+direction]=dataRange[1];if(axis){axisRange=axis.getRange(!0);axis.setBoundSeriesRange(axisRange)}
for(i=0;i<sprites.length;i++){sprites[i].setAttributes(style)}}},coordinateData:function(items,field,axis){var data=[],length=items.length,layout=axis&&axis.getLayout(),i,x;for(i=0;i<length;i++){x=items[i].data[field];if(!Ext.isEmpty(x,!0)){if(layout){data[i]=layout.getCoordFor(x,field,i,items)}else{x=+x;data[i]=Ext.isNumber(x)?x:i}}else{data[i]=x}}
return data},updateLabelData:function(){var label=this.getLabel();if(!label){return}
var store=this.getStore(),items=store.getData().items,sprites=this.getSprites(),labelTpl=label.getTemplate(),labelFields=Ext.Array.from(labelTpl.getField()),i,j,ln,labels,sprite,field;if(!sprites.length||!labelFields.length){return}
for(i=0;i<sprites.length;i++){sprite=sprites[i];if(!sprite.getField){continue}
labels=[];field=sprite.getField();if(Ext.Array.indexOf(labelFields,field)<0){field=labelFields[i]}
for(j=0,ln=items.length;j<ln;j++){labels.push(items[j].get(field))}
sprite.setAttributes({labels:labels})}},processData:function(){var me=this,directions=me.directions,direction,axis,name,i,ln;if(me.isProcessingData||!me.getStore()){return}
me.isProcessingData=!0;for(i=0,ln=directions.length;i<ln;i++){direction=directions[i];axis=me['get'+direction+'Axis']();if(axis){axis.processData(me);continue}
name='coordinate'+direction;if(me[name]){me[name]()}}
me.updateLabelData();me.isProcessingData=!1},applyBackground:function(background){var surface,result;if(this.getChart()){surface=this.getSurface();surface.setBackground(background);result=surface.getBackground()}else{result=background}
return result},updateChart:function(newChart,oldChart){var me=this,store=me._store;if(oldChart){oldChart.un('axeschange','onAxesChange',me);me.clearSprites();me.setSurface(null);me.setOverlaySurface(null);oldChart.unregister(me);me.onChartDetached(oldChart);if(!store){me.updateStore(null)}}
if(newChart){me.setSurface(newChart.getSurface('series'));me.setOverlaySurface(newChart.getSurface('overlay'));newChart.on('axeschange','onAxesChange',me);if(newChart.getAxes()){me.onAxesChange(newChart)}
me.onChartAttached(newChart);newChart.register(me);if(!store){me.updateStore(newChart.getStore())}}},onAxesChange:function(chart,force){if(chart.destroying||chart.destroyed){return}
var me=this,axes=chart.getAxes(),axis,directionToAxesMap={},directionToFieldsMap={},needHighPrecision=!1,directions=this.directions,direction,i,ln;for(i=0,ln=directions.length;i<ln;i++){direction=directions[i];directionToFieldsMap[direction]=me.getFields(me['fieldCategory'+direction])}
for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];direction=axis.getDirection();if(!directionToAxesMap[direction]){directionToAxesMap[direction]=[axis]}else{directionToAxesMap[direction].push(axis)}}
for(i=0,ln=directions.length;i<ln;i++){direction=directions[i];if(!force&&me['get'+direction+'Axis']()){continue}
if(directionToAxesMap[direction]){axis=me.findMatchingAxis(directionToAxesMap[direction],directionToFieldsMap[direction]);if(axis){me['set'+direction+'Axis'](axis);if(axis.getNeedHighPrecision()){needHighPrecision=!0}}}}
this.getSurface().setHighPrecision(needHighPrecision)},findMatchingAxis:function(directionAxes,directionFields){var axis,axisFields,i,j;for(i=0;i<directionAxes.length;i++){axis=directionAxes[i];axisFields=axis.getFields();if(!axisFields.length){return axis}else if(directionFields){for(j=0;j<directionFields.length;j++){if(Ext.Array.indexOf(axisFields,directionFields[j])>=0){return axis}}}}},onChartDetached:function(oldChart){var me=this;me.fireEvent('chartdetached',oldChart,me);oldChart.un('storechange','onStoreChange',me)},onChartAttached:function(chart){var me=this;me.fireEvent('chartattached',chart,me);chart.on('storechange','onStoreChange',me);me.processData()},updateOverlaySurface:function(overlaySurface){var label=this.getLabel();if(overlaySurface&&label){overlaySurface.add(label)}},getLabel:function(){return this.labelMarker},setLabel:function(label){var me=this,chart=me.getChart(),marker=me.labelMarker,template;if(!label&&marker){marker.getTemplate().destroy();marker.destroy();me.labelMarker=marker=null}
if(label){if(!marker){marker=me.labelMarker=new Ext.chart.Markers({zIndex:10});marker.setTemplate(new Ext.chart.sprite.Label);me.getOverlaySurface().add(marker)}
template=marker.getTemplate();template.setAttributes(label);template.setConfig(label);if(label.field){template.setField(label.field)}
if(label.display){marker.setAttributes({hidden:label.display==='none'})}
marker.setDirty(!0)}
me.updateLabelData();if(chart&&!chart.isInitializing&&!me.isConfiguring){chart.redraw()}},createItemInstancingSprite:function(sprite,itemInstancing){var me=this,markers=new Ext.chart.Markers(),config=Ext.apply({modifiers:'highlight'},itemInstancing),style=me.getStyle(),template,animation;markers.setAttributes({zIndex:Number.MAX_VALUE});markers.setTemplate(config);template=markers.getTemplate();template.setAttributes(style);animation=template.getAnimation();animation.on('animationstart','onSpriteAnimationStart',this);animation.on('animationend','onSpriteAnimationEnd',this);sprite.bindMarker('items',markers);me.getSurface().add(markers);return markers},getDefaultSpriteConfig:function(){return{type:this.seriesType,renderer:this.getRenderer()}},updateRenderer:function(renderer){var me=this,chart=me.getChart();if(chart&&chart.isInitializing){return}
if(me.sprites.length){me.sprites[0].setAttributes({renderer:renderer||null});if(chart&&!chart.isInitializing){chart.redraw()}}},updateShowMarkers:function(showMarkers){var sprite=this.getSprite(),markers=sprite&&sprite.getMarker('markers');if(markers){markers.getTemplate().setAttributes({hidden:!showMarkers})}},createSprite:function(){var me=this,surface=me.getSurface(),itemInstancing=me.getItemInstancing(),sprite=surface.add(me.getDefaultSpriteConfig()),animation,label;sprite.setAttributes(me.getStyle());sprite.setSeries(me);if(itemInstancing){me.createItemInstancingSprite(sprite,itemInstancing)}
if(sprite.isMarkerHolder){label=me.getLabel();if(label&&label.getTemplate().getField()){sprite.bindMarker('labels',label)}}
if(sprite.setStore){sprite.setStore(me.getStore())}
animation=sprite.getAnimation();animation.on('animationstart','onSpriteAnimationStart',me);animation.on('animationend','onSpriteAnimationEnd',me);me.sprites.push(sprite);return sprite},getSprites:null,getSprite:function(){var sprites=this.getSprites();return sprites&&sprites[0]},withSprite:function(fn){var sprite=this.getSprite();return sprite&&fn(sprite)||undefined},forEachSprite:function(fn){var sprites=this.getSprites(),i,ln;for(i=0,ln=sprites.length;i<ln;i++){fn(sprites[i])}},onDataChanged:function(){var me=this,chart=me.getChart(),chartStore=chart&&chart.getStore(),seriesStore=me.getStore();if(seriesStore!==chartStore){me.processData()}},isXType:function(xtype){return xtype==='series'},getItemId:function(){return this.getId()},applyThemeStyle:function(theme,oldTheme){var me=this,fill,stroke;fill=theme&&theme.subStyle&&theme.subStyle.fillStyle;stroke=fill&&theme.subStyle.strokeStyle;if(fill&&!stroke){theme.subStyle.strokeStyle=me.getStrokeColorsFromFillColors(fill)}
fill=theme&&theme.markerSubStyle&&theme.markerSubStyle.fillStyle;stroke=fill&&theme.markerSubStyle.strokeStyle;if(fill&&!stroke){theme.markerSubStyle.strokeStyle=me.getStrokeColorsFromFillColors(fill)}
return Ext.apply(oldTheme||{},theme)},applyStyle:function(style,oldStyle){return Ext.apply({},style,oldStyle)},applySubStyle:function(subStyle,oldSubStyle){var name=Ext.ClassManager.getNameByAlias('sprite.'+this.seriesType),cls=Ext.ClassManager.get(name);if(cls&&cls.def){subStyle=cls.def.batchedNormalize(subStyle,!0)}
return Ext.merge({},oldSubStyle,subStyle)},applyMarker:function(marker,oldMarker){var type,cls;if(marker){if(!Ext.isObject(marker)){marker={}}
type=marker.type||'circle';if(oldMarker&&type===oldMarker.type){marker=Ext.merge({},oldMarker,marker)}}
if(type){cls=Ext.ClassManager.get(Ext.ClassManager.getNameByAlias('sprite.'+type))}
if(cls&&cls.def){marker=cls.def.normalize(marker,!0);marker.type=type}else{marker=null;Ext.log.warn('Invalid series marker type: '+type)}
return marker},updateMarker:function(marker){var me=this,sprites=me.getSprites(),seriesSprite,markerSprite,markerTplConfig,i,ln;for(i=0,ln=sprites.length;i<ln;i++){seriesSprite=sprites[i];if(!seriesSprite.isMarkerHolder){continue}
markerSprite=seriesSprite.getMarker('markers');if(marker){if(!markerSprite){markerSprite=new Ext.chart.Markers();seriesSprite.bindMarker('markers',markerSprite);me.getOverlaySurface().add(markerSprite)}
markerTplConfig=Ext.Object.merge({modifiers:'highlight'},marker);markerSprite.setTemplate(markerTplConfig);markerSprite.getTemplate().getAnimation().setCustomDurations({translationX:0,translationY:0})}else if(markerSprite){seriesSprite.releaseMarker('markers');me.getOverlaySurface().remove(markerSprite,!0)}
seriesSprite.setDirty(!0)}
if(!me.isConfiguring){me.doUpdateStyles();me.updateHighlight(me.getHighlight())}},applyMarkerSubStyle:function(marker,oldMarker){var type=(marker&&marker.type)||(oldMarker&&oldMarker.type)||'circle',cls=Ext.ClassManager.get(Ext.ClassManager.getNameByAlias('sprite.'+type));if(cls&&cls.def){marker=cls.def.batchedNormalize(marker,!0)}
return Ext.merge(oldMarker||{},marker)},updateHidden:function(hidden){var me=this;me.getColors();me.getSubStyle();me.setSubStyle({hidden:hidden});me.processData();me.doUpdateStyles();if(!Ext.isArray(hidden)){me.updateLegendStore(hidden)}},updateLegendStore:function(hidden,index){var me=this,chart=me.getChart(),legendStore=chart&&chart.getLegendStore(),id=me.getId(),record;if(legendStore){if(arguments.length>1){record=legendStore.findBy(function(rec){return rec.get('series')===id&&rec.get('index')===index});if(record!==-1){record=legendStore.getAt(record)}}else{record=legendStore.findRecord('series',id)}
if(record&&record.get('disabled')!==hidden){record.set('disabled',hidden)}}},setHiddenByIndex:function(index,value){var me=this;if(Ext.isArray(me.getHidden())){me.getHidden()[index]=value;me.updateHidden(me.getHidden());me.updateLegendStore(value,index)}else{me.setHidden(value)}},getStrokeColorsFromFillColors:function(colors){var me=this,darker=me.getUseDarkerStrokeColor(),darkerRatio=(Ext.isNumber(darker)?darker:me.darkerStrokeRatio),strokeColors;if(darker){strokeColors=Ext.Array.map(colors,function(color){color=Ext.isString(color)?color:color.stops[0].color;color=Ext.util.Color.fromString(color);return color.createDarker(darkerRatio).toString()})}else{strokeColors=Ext.Array.clone(colors)}
return strokeColors},updateThemeColors:function(colors){var me=this,theme=me.getThemeStyle(),fillColors=Ext.Array.clone(colors),strokeColors=me.getStrokeColorsFromFillColors(colors),newSubStyle={fillStyle:fillColors,strokeStyle:strokeColors};theme.subStyle=Ext.apply(theme.subStyle||{},newSubStyle);theme.markerSubStyle=Ext.apply(theme.markerSubStyle||{},newSubStyle);me.doUpdateStyles();if(!me.isConfiguring){me.getChart().refreshLegendStore()}},themeOnlyIfConfigured:{},updateTheme:function(theme){var me=this,seriesTheme=theme.getSeries(),initialConfig=me.getInitialConfig(),defaultConfig=me.defaultConfig,configs=me.self.getConfigurator().configs,genericSeriesTheme=seriesTheme.defaults,specificSeriesTheme=seriesTheme[me.type],themeOnlyIfConfigured=me.themeOnlyIfConfigured,key,value,isObjValue,isUnusedConfig,initialValue,cfg;seriesTheme=Ext.merge({},genericSeriesTheme,specificSeriesTheme);for(key in seriesTheme){value=seriesTheme[key];cfg=configs[key];if(value!==null&&value!==undefined&&cfg){initialValue=initialConfig[key];isObjValue=Ext.isObject(value);isUnusedConfig=initialValue===defaultConfig[key];if(isObjValue){if(isUnusedConfig&&themeOnlyIfConfigured[key]){continue}
value=Ext.merge({},value,initialValue)}
if(isUnusedConfig||isObjValue){me[cfg.names.set](value)}}}},updateChartColors:function(colors){var me=this;if(!me.getColors()){me.updateThemeColors(colors)}},updateColors:function(colors){var chart;this.updateThemeColors(colors);if(!this.isConfiguring){chart=this.getChart();if(chart){chart.refreshLegendStore()}}},updateStyle:function(){this.doUpdateStyles()},updateSubStyle:function(){this.doUpdateStyles()},updateThemeStyle:function(){this.doUpdateStyles()},doUpdateStyles:function(){var me=this,sprites=me.sprites,itemInstancing=me.getItemInstancing(),ln=sprites&&sprites.length,showMarkers=me.getConfig('showMarkers',!0),style,sprite,marker,i;for(i=0;i<ln;i++){sprite=sprites[i];style=me.getStyleByIndex(i);if(itemInstancing){sprite.getMarker('items').getTemplate().setAttributes(style)}
sprite.setAttributes(style);marker=sprite.isMarkerHolder&&sprite.getMarker('markers');if(marker){marker.getTemplate().setAttributes(me.getMarkerStyleByIndex(i))}}},getStyleWithTheme:function(){var me=this,theme=me.getThemeStyle(),style=Ext.clone(me.getStyle());if(theme&&theme.style){Ext.applyIf(style,theme.style)}
return style},getSubStyleWithTheme:function(){var me=this,theme=me.getThemeStyle(),subStyle=Ext.clone(me.getSubStyle());if(theme&&theme.subStyle){Ext.applyIf(subStyle,theme.subStyle)}
return subStyle},getStyleByIndex:function(i){var me=this,theme=me.getThemeStyle(),style,themeStyle,subStyle,themeSubStyle,result={};style=me.getStyle();themeStyle=(theme&&theme.style)||{};subStyle=me.styleDataForIndex(me.getSubStyle(),i);themeSubStyle=me.styleDataForIndex((theme&&theme.subStyle),i);Ext.apply(result,themeStyle);Ext.apply(result,themeSubStyle);Ext.apply(result,style);Ext.apply(result,subStyle);return result},getMarkerStyleByIndex:function(i){var me=this,theme=me.getThemeStyle(),style,themeStyle,subStyle,themeSubStyle,markerStyle,themeMarkerStyle,markerSubStyle,themeMarkerSubStyle,result={};style=me.getStyle();themeStyle=(theme&&theme.style)||{};subStyle=me.styleDataForIndex(me.getSubStyle(),i);if(subStyle.hasOwnProperty('hidden')){subStyle.hidden=subStyle.hidden||!this.getConfig('showMarkers',!0)}
themeSubStyle=me.styleDataForIndex((theme&&theme.subStyle),i);markerStyle=me.getMarker();themeMarkerStyle=(theme&&theme.marker)||{};markerSubStyle=me.getMarkerSubStyle();themeMarkerSubStyle=me.styleDataForIndex((theme&&theme.markerSubStyle),i);Ext.apply(result,themeStyle);Ext.apply(result,themeSubStyle);Ext.apply(result,themeMarkerStyle);Ext.apply(result,themeMarkerSubStyle);Ext.apply(result,style);Ext.apply(result,subStyle);Ext.apply(result,markerStyle);Ext.apply(result,markerSubStyle);return result},styleDataForIndex:function(style,i){var value,name,result={};if(style){for(name in style){value=style[name];if(Ext.isArray(value)){result[name]=value[i%value.length]}else{result[name]=value}}}
return result},getItemForPoint:Ext.emptyFn,getItemByIndex:function(index,category){var me=this,sprites=me.getSprites(),sprite=sprites&&sprites[0],item;if(!sprite){return}
if(category===undefined&&sprite.isMarkerHolder){category=me.getItemInstancing()?'items':'markers'}else if(!category||category===''||category==='sprites'){sprite=sprites[index]}
if(sprite){item={series:me,category:category,index:index,record:me.getStore().getData().items[index],field:me.getYField(),sprite:sprite};return item}},onSpriteAnimationStart:function(sprite){this.fireEvent('animationstart',this,sprite)},onSpriteAnimationEnd:function(sprite){this.fireEvent('animationend',this,sprite)},resolveListenerScope:function(defaultScope){var me=this,namedScope=Ext._namedScopes[defaultScope],chart=me.getChart(),scope;if(!namedScope){scope=chart?chart.resolveListenerScope(defaultScope,!1):(defaultScope||me)}else if(namedScope.isThis){scope=me}else if(namedScope.isController){scope=chart?chart.resolveListenerScope(defaultScope,!1):me}else if(namedScope.isSelf){scope=chart?chart.resolveListenerScope(defaultScope,!1):me;if(scope===chart&&!chart.getInheritedConfig('defaultListenerScope')){scope=me}}
return scope},provideLegendInfo:function(target){var me=this,style=me.getSubStyleWithTheme(),fill=style.fillStyle;if(Ext.isArray(fill)){fill=fill[0]}
target.push({name:me.getTitle()||me.getYField()||me.getId(),mark:(Ext.isObject(fill)?fill.stops&&fill.stops[0].color:fill)||style.strokeStyle||'black',disabled:me.getHidden(),series:me.getId(),index:0})},clearSprites:function(){var sprites=this.sprites,sprite,i,ln;for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];if(sprite&&sprite.isSprite){sprite.destroy()}}
this.sprites=[]},destroy:function(){var me=this,store=me._store,tooltip=me.getConfig('tooltip',!0);if(store&&store.getAutoDestroy()){Ext.destroy(store)}
me.setChart(null);me.clearListeners();if(tooltip){Ext.destroy(tooltip)}
me.callParent()}})
;
Ext.define('Ext.chart.interactions.Abstract',{xtype:'interaction',mixins:{observable:'Ext.mixin.Observable'},config:{gestures:{tap:'onGesture'},chart:null,enabled:!0},throttleGap:0,stopAnimationBeforeSync:!1,constructor:function(config){var me=this,id;config=config||{};if('id' in config){id=config.id}else if('id' in me.config){id=me.config.id}else{id=me.getId()}
me.setId(id);me.mixins.observable.constructor.call(me,config)},updateChart:function(newChart,oldChart){var me=this;if(oldChart===newChart){return}
if(oldChart){oldChart.unregister(me);me.removeChartListener(oldChart)}
if(newChart){newChart.register(me);me.addChartListener()}},updateEnabled:function(enabled){var me=this,chart=me.getChart();if(chart){if(enabled){me.addChartListener()}else{me.removeChartListener(chart)}}},onGesture:Ext.emptyFn,getItemForEvent:function(e){var me=this,chart=me.getChart(),chartXY=chart.getEventXY(e);return chart.getItemForPoint(chartXY[0],chartXY[1])},getItemsForEvent:function(e){var me=this,chart=me.getChart(),chartXY=chart.getEventXY(e);return chart.getItemsForPoint(chartXY[0],chartXY[1])},addChartListener:function(){var me=this,chart=me.getChart(),gestures=me.getGestures(),gesture;if(!me.getEnabled()){return}
function insertGesture(name,fn){chart.addElementListener(name,me.listeners[name]=function(e){var locks=me.getLocks(),result;if(me.getEnabled()&&(!(name in locks)||locks[name]===me)){result=(Ext.isFunction(fn)?fn:me[fn]).apply(this,arguments);if(result===!1&&e&&e.stopPropagation){e.stopPropagation()}
return result}},me)}
me.listeners=me.listeners||{};for(gesture in gestures){insertGesture(gesture,gestures[gesture])}},removeChartListener:function(chart){var me=this,gestures=me.getGestures(),gesture;function removeGesture(name){var fn=me.listeners[name];if(fn){chart.removeElementListener(name,fn);delete me.listeners[name]}}
if(me.listeners){for(gesture in gestures){removeGesture(gesture)}}},lockEvents:function(){var me=this,locks=me.getLocks(),args=Array.prototype.slice.call(arguments),i=args.length;while(i--){locks[args[i]]=me}},unlockEvents:function(){var locks=this.getLocks(),args=Array.prototype.slice.call(arguments),i=args.length;while(i--){delete locks[args[i]]}},getLocks:function(){var chart=this.getChart();return chart.lockedEvents||(chart.lockedEvents={})},doSync:function(){var me=this,chart=me.getChart();if(me.syncTimer){Ext.undefer(me.syncTimer);me.syncTimer=null}
if(me.stopAnimationBeforeSync){chart.animationSuspendCount++}
chart.redraw();if(me.stopAnimationBeforeSync){chart.animationSuspendCount--}
me.syncThrottle=Date.now()+me.throttleGap},sync:function(){var me=this;if(me.throttleGap&&Ext.frameStartTime<me.syncThrottle){if(me.syncTimer){return}
me.syncTimer=Ext.defer(function(){me.doSync()},me.throttleGap)}else{me.doSync()}},getItemId:function(){return this.getId()},isXType:function(xtype){return xtype==='interaction'},destroy:function(){var me=this;me.setChart(null);delete me.listeners;me.callParent()}},function(){if(Ext.os.is.Android4){this.prototype.throttleGap=40}})
;
Ext.define('Ext.chart.MarkerHolder',{extend:'Ext.Mixin',requires:['Ext.chart.Markers'],mixinConfig:{id:'markerHolder',after:{constructor:'constructor',preRender:'preRender'},before:{destroy:'destroy'}},isMarkerHolder:!0,surfaceMatrix:null,inverseSurfaceMatrix:null,deprecated:{6:{methods:{getBoundMarker:{message:"Please use the 'getMarker' method instead.",fn:function(name){var marker=this.boundMarkers[name];return marker?[marker]:marker}}}}},constructor:function(){this.boundMarkers={};this.cleanRedraw=!1},bindMarker:function(name,marker){var me=this,markers=me.boundMarkers;if(marker&&marker.isMarkers){if(markers[name]&&markers[name]===marker){Ext.log.warn(me.getId()," (MarkerHolder): the Markers instance '",marker.getId(),"' is already bound under the name '",name,"'.")}
me.releaseMarker(name);markers[name]=marker;marker.on('destroy',me.onMarkerDestroy,me)}},onMarkerDestroy:function(marker){this.releaseMarker(marker)},releaseMarker:function(marker){var markers=this.boundMarkers,name;if(marker&&marker.isMarkers){for(name in markers){if(markers[name]===marker){delete markers[name];break}}}else{name=marker;marker=markers[name];delete markers[name]}
return marker||null},getMarker:function(name){return this.boundMarkers[name]||null},preRender:function(surface,ctx,rect){var me=this,id=me.getId(),boundMarkers=me.boundMarkers,parent=me.getParent(),name,marker,matrix;if(me.surfaceMatrix){matrix=me.surfaceMatrix.set(1,0,0,1,0,0)}else{matrix=me.surfaceMatrix=new Ext.draw.Matrix()}
me.cleanRedraw=!me.attr.dirty;if(!me.cleanRedraw){for(name in boundMarkers){marker=boundMarkers[name];if(marker){marker.clear(id)}}}
while(parent&&parent.attr&&parent.attr.matrix){matrix.prependMatrix(parent.attr.matrix);parent=parent.getParent()}
matrix.prependMatrix(parent.matrix);me.surfaceMatrix=matrix;me.inverseSurfaceMatrix=matrix.inverse(me.inverseSurfaceMatrix)},putMarker:function(name,attr,index,bypassNormalization,keepRevision){var marker=this.boundMarkers[name];if(marker){marker.putMarkerFor(this.getId(),attr,index,bypassNormalization,keepRevision)}},getMarkerBBox:function(name,index,isWithoutTransform){var marker=this.boundMarkers[name];if(marker){return marker.getMarkerBBoxFor(this.getId(),index,isWithoutTransform)}},destroy:function(){var boundMarkers=this.boundMarkers,name,marker;for(name in boundMarkers){marker=boundMarkers[name];marker.destroy()}}})
;
Ext.define('Ext.chart.axis.sprite.Axis',{extend:'Ext.draw.sprite.Sprite',alias:'sprite.axis',type:'axis',mixins:{markerHolder:'Ext.chart.MarkerHolder'},requires:['Ext.draw.sprite.Text'],inheritableStatics:{def:{processors:{grid:'bool',axisLine:'bool',minorTicks:'bool',minorTickSize:'number',majorTicks:'bool',majorTickSize:'number',length:'number',startGap:'number',endGap:'number',dataMin:'number',dataMax:'number',visibleMin:'number',visibleMax:'number',position:'enums(left,right,top,bottom,angular,radial,gauge)',minStepSize:'number',estStepSize:'number',titleOffset:'number',textPadding:'number',min:'number',max:'number',centerX:'number',centerY:'number',radius:'number',totalAngle:'number',baseRotation:'number',data:'default',enlargeEstStepSizeByText:'bool'},defaults:{grid:!1,axisLine:!0,minorTicks:!1,minorTickSize:3,majorTicks:!0,majorTickSize:5,length:0,startGap:0,endGap:0,visibleMin:0,visibleMax:1,dataMin:0,dataMax:1,position:'',minStepSize:0,estStepSize:20,min:0,max:1,centerX:0,centerY:0,radius:1,baseRotation:0,data:null,titleOffset:0,textPadding:0,scalingCenterY:0,scalingCenterX:0,strokeStyle:'black',enlargeEstStepSizeByText:!1},triggers:{minorTickSize:'bbox',majorTickSize:'bbox',position:'bbox,layout',axisLine:'bbox,layout',minorTicks:'layout',min:'layout',max:'layout',length:'layout',minStepSize:'layout',estStepSize:'layout',data:'layout',dataMin:'layout',dataMax:'layout',visibleMin:'layout',visibleMax:'layout',enlargeEstStepSizeByText:'layout'},updaters:{layout:'layoutUpdater'}}},config:{label:null,labelOffset:10,layout:null,segmenter:null,renderer:null,layoutContext:null,axis:null},thickness:0,stepSize:0,getBBox:function(){return null},defaultRenderer:function(v){return this.segmenter.renderer(v,this)},layoutUpdater:function(){var me=this,chart=me.getAxis().getChart();if(chart.isInitializing){return}
var attr=me.attr,layout=me.getLayout(),isRtl=chart.getInherited().rtl,dataRange=attr.dataMax-attr.dataMin,min=attr.dataMin+dataRange*attr.visibleMin,max=attr.dataMin+dataRange*attr.visibleMax,range=max-min,position=attr.position,context={attr:attr,segmenter:me.getSegmenter(),renderer:me.defaultRenderer};if(position==='left'||position==='right'){attr.translationX=0;attr.translationY=max*attr.length/range;attr.scalingX=1;attr.scalingY=-attr.length/range;attr.scalingCenterY=0;attr.scalingCenterX=0;me.applyTransformations(!0)}else if(position==='top'||position==='bottom'){if(isRtl){attr.translationX=attr.length+min*attr.length/range+1}else{attr.translationX=-min*attr.length/range}
attr.translationY=0;attr.scalingX=(isRtl?-1:1)*attr.length/range;attr.scalingY=1;attr.scalingCenterY=0;attr.scalingCenterX=0;me.applyTransformations(!0)}
if(layout){layout.calculateLayout(context);me.setLayoutContext(context)}},iterate:function(snaps,fn){var i,position,id,axis,floatingAxes,floatingValues,some=Ext.Array.some,abs=Math.abs,threshold,isTickVisible;if(snaps.getLabel){if(snaps.min<snaps.from){fn.call(this,snaps.min,snaps.getLabel(snaps.min),-1,snaps)}
for(i=0;i<=snaps.steps;i++){fn.call(this,snaps.get(i),snaps.getLabel(i),i,snaps)}
if(snaps.max>snaps.to){fn.call(this,snaps.max,snaps.getLabel(snaps.max),snaps.steps+1,snaps)}}else{axis=this.getAxis();floatingAxes=axis.floatingAxes;floatingValues=[];threshold=(snaps.to-snaps.from)/(snaps.steps+1);if(axis.getFloating()){for(id in floatingAxes){floatingValues.push(floatingAxes[id])}}
isTickVisible=function(position){return!floatingValues.length||some(floatingValues,function(value){return abs(value-position)>threshold})};if(snaps.min<snaps.from&&isTickVisible(snaps.min)){fn.call(this,snaps.min,snaps.min,-1,snaps)}
for(i=0;i<=snaps.steps;i++){position=snaps.get(i);if(isTickVisible(position)){fn.call(this,position,position,i,snaps)}}
if(snaps.max>snaps.to&&isTickVisible(snaps.max)){fn.call(this,snaps.max,snaps.max,snaps.steps+1,snaps)}}},renderTicks:function(surface,ctx,layout,clipRect){var me=this,attr=me.attr,docked=attr.position,matrix=attr.matrix,halfLineWidth=0.5*attr.lineWidth,xx=matrix.getXX(),dx=matrix.getDX(),yy=matrix.getYY(),dy=matrix.getDY(),majorTicks=layout.majorTicks,majorTickSize=attr.majorTickSize,minorTicks=layout.minorTicks,minorTickSize=attr.minorTickSize,gaugeAngles;if(majorTicks){switch(docked){case 'right':function getRightTickFn(size){return function(position,labelText,i){position=surface.roundPixel(position*yy+dy)+halfLineWidth;ctx.moveTo(0,position);ctx.lineTo(size,position)}}
me.iterate(majorTicks,getRightTickFn(majorTickSize));if(minorTicks){me.iterate(minorTicks,getRightTickFn(minorTickSize))}
break;case 'left':function getLeftTickFn(size){return function(position,labelText,i){position=surface.roundPixel(position*yy+dy)+halfLineWidth;ctx.moveTo(clipRect[2]-size,position);ctx.lineTo(clipRect[2],position)}}
me.iterate(majorTicks,getLeftTickFn(majorTickSize));if(minorTicks){me.iterate(minorTicks,getLeftTickFn(minorTickSize))}
break;case 'bottom':function getBottomTickFn(size){return function(position,labelText,i){position=surface.roundPixel(position*xx+dx)-halfLineWidth;ctx.moveTo(position,0);ctx.lineTo(position,size)}}
me.iterate(majorTicks,getBottomTickFn(majorTickSize));if(minorTicks){me.iterate(minorTicks,getBottomTickFn(minorTickSize))}
break;case 'top':function getTopTickFn(size){return function(position,labelText,i){position=surface.roundPixel(position*xx+dx)-halfLineWidth;ctx.moveTo(position,clipRect[3]);ctx.lineTo(position,clipRect[3]-size)}}
me.iterate(majorTicks,getTopTickFn(majorTickSize));if(minorTicks){me.iterate(minorTicks,getTopTickFn(minorTickSize))}
break;case 'angular':me.iterate(majorTicks,function(position,labelText,i){position=position/(attr.max+1)*Math.PI*2+attr.baseRotation;ctx.moveTo(attr.centerX+(attr.length)*Math.cos(position),attr.centerY+(attr.length)*Math.sin(position));ctx.lineTo(attr.centerX+(attr.length+majorTickSize)*Math.cos(position),attr.centerY+(attr.length+majorTickSize)*Math.sin(position))});break;case 'gauge':gaugeAngles=me.getGaugeAngles();me.iterate(majorTicks,function(position,labelText,i){position=(position-attr.min)/(attr.max-attr.min)*attr.totalAngle-attr.totalAngle+gaugeAngles.start;ctx.moveTo(attr.centerX+(attr.length)*Math.cos(position),attr.centerY+(attr.length)*Math.sin(position));ctx.lineTo(attr.centerX+(attr.length+majorTickSize)*Math.cos(position),attr.centerY+(attr.length+majorTickSize)*Math.sin(position))});break}}},renderLabels:function(surface,ctx,layoutContext,clipRect){var me=this,attr=me.attr,halfLineWidth=0.5*attr.lineWidth,docked=attr.position,matrix=attr.matrix,textPadding=attr.textPadding,xx=matrix.getXX(),dx=matrix.getDX(),yy=matrix.getYY(),dy=matrix.getDY(),thickness=0,majorTicks=layoutContext.majorTicks,tickPadding=Math.max(attr.majorTickSize,attr.minorTickSize)+attr.lineWidth,isBBoxIntersect=Ext.draw.Draw.isBBoxIntersect,label=me.getLabel(),font,labelOffset=me.getLabelOffset(),lastLabelText=null,textSize=0,textCount=0,segmenter=layoutContext.segmenter,renderer=me.getRenderer(),axis=me.getAxis(),title=axis.getTitle(),titleBBox=title&&title.attr.text!==''&&title.getBBox(),labelInverseMatrix,lastBBox=null,bbox,fly,text,titlePadding,translation,gaugeAngles,angle;if(majorTicks&&label&&!label.attr.hidden){font=label.attr.font;if(ctx.font!==font){ctx.font=font}
label.setAttributes({translationX:0,translationY:0},!0);label.applyTransformations();labelInverseMatrix=label.attr.inverseMatrix.elements.slice(0);switch(docked){case 'left':titlePadding=titleBBox?titleBBox.x+titleBBox.width:0;switch(label.attr.textAlign){case 'start':translation=surface.roundPixel(titlePadding+dx)-halfLineWidth;break;case 'end':translation=surface.roundPixel(clipRect[2]-tickPadding+dx)-halfLineWidth;break;default:translation=surface.roundPixel(titlePadding+(clipRect[2]-titlePadding-tickPadding)/2+dx)-halfLineWidth}
label.setAttributes({translationX:translation},!0);break;case 'right':titlePadding=titleBBox?clipRect[2]-titleBBox.x:0;switch(label.attr.textAlign){case 'start':translation=surface.roundPixel(tickPadding+dx)+halfLineWidth;break;case 'end':translation=surface.roundPixel(clipRect[2]-titlePadding+dx)+halfLineWidth;break;default:translation=surface.roundPixel(tickPadding+(clipRect[2]-tickPadding-titlePadding)/2+dx)+halfLineWidth}
label.setAttributes({translationX:translation},!0);break;case 'top':titlePadding=titleBBox?titleBBox.y+titleBBox.height:0;label.setAttributes({translationY:surface.roundPixel(titlePadding+(clipRect[3]-titlePadding-tickPadding)/2)-halfLineWidth},!0);break;case 'bottom':titlePadding=titleBBox?clipRect[3]-titleBBox.y:0;label.setAttributes({translationY:surface.roundPixel(tickPadding+(clipRect[3]-tickPadding-titlePadding)/2)+halfLineWidth},!0);break;case 'radial':label.setAttributes({translationX:attr.centerX},!0);break;case 'angular':label.setAttributes({translationY:attr.centerY},!0);break;case 'gauge':label.setAttributes({translationY:attr.centerY},!0);break}
if(docked==='left'||docked==='right'){me.iterate(majorTicks,function(position,labelText,i){if(labelText===undefined){return}
if(renderer){text=Ext.callback(renderer,null,[axis,labelText,layoutContext,lastLabelText],0,axis)}else{text=segmenter.renderer(labelText,layoutContext,lastLabelText)}
lastLabelText=labelText;label.setAttributes({text:String(text),translationY:surface.roundPixel(position*yy+dy)},!0);label.applyTransformations();thickness=Math.max(thickness,label.getBBox().width+tickPadding);fly=Ext.draw.Matrix.fly(label.attr.matrix.elements.slice(0));bbox=fly.prepend.apply(fly,labelInverseMatrix).transformBBox(label.getBBox(!0));if(lastBBox&&!isBBoxIntersect(bbox,lastBBox,textPadding)){return}
surface.renderSprite(label);lastBBox=bbox;textSize+=bbox.height;textCount++})}else if(docked==='top'||docked==='bottom'){me.iterate(majorTicks,function(position,labelText,i){if(labelText===undefined){return}
if(renderer){text=Ext.callback(renderer,null,[axis,labelText,layoutContext,lastLabelText],0,axis)}else{text=segmenter.renderer(labelText,layoutContext,lastLabelText)}
lastLabelText=labelText;label.setAttributes({text:String(text),translationX:surface.roundPixel(position*xx+dx)},!0);label.applyTransformations();thickness=Math.max(thickness,label.getBBox().height+tickPadding);fly=Ext.draw.Matrix.fly(label.attr.matrix.elements.slice(0));bbox=fly.prepend.apply(fly,labelInverseMatrix).transformBBox(label.getBBox(!0));if(lastBBox&&!isBBoxIntersect(bbox,lastBBox,textPadding)){return}
surface.renderSprite(label);lastBBox=bbox;textSize+=bbox.width;textCount++})}else if(docked==='radial'){me.iterate(majorTicks,function(position,labelText,i){if(labelText===undefined){return}
if(renderer){text=Ext.callback(renderer,null,[axis,labelText,layoutContext,lastLabelText],0,axis)}else{text=segmenter.renderer(labelText,layoutContext,lastLabelText)}
lastLabelText=labelText;if(typeof text!=='undefined'){label.setAttributes({text:String(text),translationX:attr.centerX-surface.roundPixel(position)/attr.max*attr.length*Math.cos(attr.baseRotation+Math.PI/2),translationY:attr.centerY-surface.roundPixel(position)/attr.max*attr.length*Math.sin(attr.baseRotation+Math.PI/2)},!0);label.applyTransformations();bbox=label.attr.matrix.transformBBox(label.getBBox(!0));if(lastBBox&&!isBBoxIntersect(bbox,lastBBox)){return}
surface.renderSprite(label);lastBBox=bbox;textSize+=bbox.width;textCount++}})}else if(docked==='angular'){labelOffset+=attr.majorTickSize+attr.lineWidth*0.5;me.iterate(majorTicks,function(position,labelText,i){if(labelText===undefined){return}
if(renderer){text=Ext.callback(renderer,null,[axis,labelText,layoutContext,lastLabelText],0,axis)}else{text=segmenter.renderer(labelText,layoutContext,lastLabelText)}
lastLabelText=labelText;thickness=Math.max(thickness,Math.max(attr.majorTickSize,attr.minorTickSize)+(attr.lineCap!=='butt'?attr.lineWidth*0.5:0));if(typeof text!=='undefined'){angle=position/(attr.max+1)*Math.PI*2+attr.baseRotation;label.setAttributes({text:String(text),translationX:attr.centerX+(attr.length+labelOffset)*Math.cos(angle),translationY:attr.centerY+(attr.length+labelOffset)*Math.sin(angle)},!0);label.applyTransformations();bbox=label.attr.matrix.transformBBox(label.getBBox(!0));if(lastBBox&&!isBBoxIntersect(bbox,lastBBox)){return}
surface.renderSprite(label);lastBBox=bbox;textSize+=bbox.width;textCount++}})}else if(docked==='gauge'){gaugeAngles=me.getGaugeAngles();labelOffset+=attr.majorTickSize+attr.lineWidth*0.5;me.iterate(majorTicks,function(position,labelText,i){if(labelText===undefined){return}
if(renderer){text=Ext.callback(renderer,null,[axis,labelText,layoutContext,lastLabelText],0,axis)}else{text=segmenter.renderer(labelText,layoutContext,lastLabelText)}
lastLabelText=labelText;if(typeof text!=='undefined'){angle=(position-attr.min)/(attr.max-attr.min)*attr.totalAngle-attr.totalAngle+gaugeAngles.start;label.setAttributes({text:String(text),translationX:attr.centerX+(attr.length+labelOffset)*Math.cos(angle),translationY:attr.centerY+(attr.length+labelOffset)*Math.sin(angle)},!0);label.applyTransformations();bbox=label.attr.matrix.transformBBox(label.getBBox(!0));if(lastBBox&&!isBBoxIntersect(bbox,lastBBox)){return}
surface.renderSprite(label);lastBBox=bbox;textSize+=bbox.width;textCount++}})}
if(attr.enlargeEstStepSizeByText&&textCount){textSize/=textCount;textSize+=tickPadding;textSize*=2;if(attr.estStepSize<textSize){attr.estStepSize=textSize}}
if(Math.abs(me.thickness-thickness)>1){me.thickness=thickness;attr.bbox.plain.dirty=!0;attr.bbox.transform.dirty=!0;me.doThicknessChanged();return!1}}},renderAxisLine:function(surface,ctx,layout,clipRect){var me=this,attr=me.attr,halfLineWidth=attr.lineWidth*0.5,docked=attr.position,position,gaugeAngles;if(attr.axisLine&&attr.length){switch(docked){case 'left':position=surface.roundPixel(clipRect[2])-halfLineWidth;ctx.moveTo(position,-attr.endGap);ctx.lineTo(position,attr.length+attr.startGap+1);break;case 'right':ctx.moveTo(halfLineWidth,-attr.endGap);ctx.lineTo(halfLineWidth,attr.length+attr.startGap+1);break;case 'bottom':ctx.moveTo(-attr.startGap,halfLineWidth);ctx.lineTo(attr.length+attr.endGap,halfLineWidth);break;case 'top':position=surface.roundPixel(clipRect[3])-halfLineWidth;ctx.moveTo(-attr.startGap,position);ctx.lineTo(attr.length+attr.endGap,position);break;case 'angular':ctx.moveTo(attr.centerX+attr.length,attr.centerY);ctx.arc(attr.centerX,attr.centerY,attr.length,0,Math.PI*2,!0);break;case 'gauge':gaugeAngles=me.getGaugeAngles();ctx.moveTo(attr.centerX+Math.cos(gaugeAngles.start)*attr.length,attr.centerY+Math.sin(gaugeAngles.start)*attr.length);ctx.arc(attr.centerX,attr.centerY,attr.length,gaugeAngles.start,gaugeAngles.end,!0);break}}},getGaugeAngles:function(){var me=this,angle=me.attr.totalAngle,offset;if(angle<=Math.PI){offset=(Math.PI-angle)*0.5}else{offset=-(Math.PI*2-angle)*0.5}
offset=Math.PI*2-offset;return{start:offset,end:offset-angle}},renderGridLines:function(surface,ctx,layout,clipRect){var me=this,axis=me.getAxis(),attr=me.attr,matrix=attr.matrix,startGap=attr.startGap,endGap=attr.endGap,xx=matrix.getXX(),yy=matrix.getYY(),dx=matrix.getDX(),dy=matrix.getDY(),position=attr.position,alignment=axis.getGridAlignment(),majorTicks=layout.majorTicks,anchor,j,lastAnchor;if(attr.grid){if(majorTicks){if(position==='left'||position==='right'){lastAnchor=attr.min*yy+dy+endGap+startGap;me.iterate(majorTicks,function(position,labelText,i){anchor=position*yy+dy+endGap;me.putMarker(alignment+'-'+(i%2?'odd':'even'),{y:anchor,height:lastAnchor-anchor},j=i,!0);lastAnchor=anchor});j++;anchor=0;me.putMarker(alignment+'-'+(j%2?'odd':'even'),{y:anchor,height:lastAnchor-anchor},j,!0)}else if(position==='top'||position==='bottom'){lastAnchor=attr.min*xx+dx+startGap;if(startGap){me.putMarker(alignment+'-even',{x:0,width:lastAnchor},-1,!0)}
me.iterate(majorTicks,function(position,labelText,i){anchor=position*xx+dx+startGap;me.putMarker(alignment+'-'+(i%2?'odd':'even'),{x:anchor,width:lastAnchor-anchor},j=i,!0);lastAnchor=anchor});j++;anchor=attr.length+attr.startGap+attr.endGap;me.putMarker(alignment+'-'+(j%2?'odd':'even'),{x:anchor,width:lastAnchor-anchor},j,!0)}else if(position==='radial'){me.iterate(majorTicks,function(position,labelText,i){if(!position){return}
anchor=position/attr.max*attr.length;me.putMarker(alignment+'-'+(i%2?'odd':'even'),{scalingX:anchor,scalingY:anchor},i,!0);lastAnchor=anchor})}else if(position==='angular'){me.iterate(majorTicks,function(position,labelText,i){if(!attr.length){return}
anchor=position/(attr.max+1)*Math.PI*2+attr.baseRotation;me.putMarker(alignment+'-'+(i%2?'odd':'even'),{rotationRads:anchor,rotationCenterX:0,rotationCenterY:0,scalingX:attr.length,scalingY:attr.length},i,!0);lastAnchor=anchor})}}}},renderLimits:function(clipRect){var me=this,attr=me.attr,axis=me.getAxis(),limits=Ext.Array.from(axis.getLimits());if(!limits.length||attr.dataMin===attr.dataMax){if(axis.limits){axis.limits.titles.attr.hidden=!0}
return}
var chart=axis.getChart(),innerPadding=chart.getInnerPadding(),limitsRect=axis.limits.surface.getRect(),matrix=attr.matrix,position=attr.position,chain=Ext.Object.chain,titles=axis.limits.titles,titleBBox,titlePosition,titleFlip,limit,value,i,ln,x,y;titles.attr.hidden=!1;titles.instances=[];titles.position=0;if(position==='left'||position==='right'){for(i=0,ln=limits.length;i<ln;i++){limit=chain(limits[i]);if(!limit.line){limit.line={}}
value=Ext.isString(limit.value)?axis.getCoordFor(limit.value):limit.value;value=value*matrix.getYY()+matrix.getDY();limit.line.y=value+innerPadding.top;limit.line.strokeStyle=limit.line.strokeStyle||attr.strokeStyle;me.putMarker('horizontal-limit-lines',limit.line,i,!0);if(limit.line.title){titles.add(limit.line.title);titleBBox=titles.getBBoxFor(titles.position-1);titlePosition=limit.line.title.position||(position==='left'?'start':'end');switch(titlePosition){case 'start':x=10;break;case 'end':x=limitsRect[2]-10;break;case 'middle':x=limitsRect[2]/2;break}
titles.setAttributesFor(titles.position-1,{x:x,y:limit.line.y-titleBBox.height/2,textAlign:titlePosition,fillStyle:limit.line.title.fillStyle||limit.line.strokeStyle})}}}else if(position==='top'||position==='bottom'){for(i=0,ln=limits.length;i<ln;i++){limit=chain(limits[i]);if(!limit.line){limit.line={}}
value=Ext.isString(limit.value)?axis.getCoordFor(limit.value):limit.value;value=value*matrix.getXX()+matrix.getDX();limit.line.x=value+innerPadding.left;limit.line.strokeStyle=limit.line.strokeStyle||attr.strokeStyle;me.putMarker('vertical-limit-lines',limit.line,i,!0);if(limit.line.title){titles.add(limit.line.title);titleBBox=titles.getBBoxFor(titles.position-1);titlePosition=limit.line.title.position||(position==='top'?'end':'start');switch(titlePosition){case 'start':y=limitsRect[3]-titleBBox.width/2-10;break;case 'end':y=titleBBox.width/2+10;break;case 'middle':y=limitsRect[3]/2;break}
titles.setAttributesFor(titles.position-1,{x:limit.line.x+titleBBox.height/2,y:y,fillStyle:limit.line.title.fillStyle||limit.line.strokeStyle,rotationRads:Math.PI/2})}}}else if(position==='radial'){for(i=0,ln=limits.length;i<ln;i++){limit=chain(limits[i]);if(!limit.line){limit.line={}}
value=Ext.isString(limit.value)?axis.getCoordFor(limit.value):limit.value;if(value>attr.max){continue}
value=value/attr.max*attr.length;limit.line.cx=attr.centerX;limit.line.cy=attr.centerY;limit.line.scalingX=value;limit.line.scalingY=value;limit.line.strokeStyle=limit.line.strokeStyle||attr.strokeStyle;me.putMarker('circular-limit-lines',limit.line,i,!0);if(limit.line.title){titles.add(limit.line.title);titleBBox=titles.getBBoxFor(titles.position-1);titles.setAttributesFor(titles.position-1,{x:attr.centerX,y:attr.centerY-value-titleBBox.height/2,fillStyle:limit.line.title.fillStyle||limit.line.strokeStyle})}}}else if(position==='angular'){for(i=0,ln=limits.length;i<ln;i++){limit=chain(limits[i]);if(!limit.line){limit.line={}}
value=Ext.isString(limit.value)?axis.getCoordFor(limit.value):limit.value;value=value/(attr.max+1)*Math.PI*2+attr.baseRotation;limit.line.translationX=attr.centerX;limit.line.translationY=attr.centerY;limit.line.rotationRads=value;limit.line.rotationCenterX=0;limit.line.rotationCenterY=0;limit.line.scalingX=attr.length;limit.line.scalingY=attr.length;limit.line.strokeStyle=limit.line.strokeStyle||attr.strokeStyle;me.putMarker('radial-limit-lines',limit.line,i,!0);if(limit.line.title){titles.add(limit.line.title);titleBBox=titles.getBBoxFor(titles.position-1);titleFlip=((value>-0.5*Math.PI&&value<0.5*Math.PI)||(value>1.5*Math.PI&&value<2*Math.PI))?1:-1;titles.setAttributesFor(titles.position-1,{x:attr.centerX+0.5*attr.length*Math.cos(value)+titleFlip*titleBBox.height/2*Math.sin(value),y:attr.centerY+0.5*attr.length*Math.sin(value)-titleFlip*titleBBox.height/2*Math.cos(value),rotationRads:titleFlip===1?value:value-Math.PI,fillStyle:limit.line.title.fillStyle||limit.line.strokeStyle})}}}else if(position==='gauge'){}},doThicknessChanged:function(){var axis=this.getAxis();if(axis){axis.onThicknessChanged()}},render:function(surface,ctx,rect){var me=this,layoutContext=me.getLayoutContext();if(layoutContext){if(me.renderLabels(surface,ctx,layoutContext,rect)===!1){return!1}
ctx.beginPath();me.renderTicks(surface,ctx,layoutContext,rect);me.renderAxisLine(surface,ctx,layoutContext,rect);me.renderGridLines(surface,ctx,layoutContext,rect);me.renderLimits(rect);ctx.stroke()}}})
;
Ext.define('Ext.chart.axis.segmenter.Segmenter',{config:{axis:null},constructor:function(config){this.initConfig(config)},renderer:function(value,context){return String(value)},from:function(value){return value},diff:Ext.emptyFn,align:Ext.emptyFn,add:Ext.emptyFn,preferredStep:Ext.emptyFn})
;
Ext.define('Ext.chart.axis.segmenter.Names',{extend:'Ext.chart.axis.segmenter.Segmenter',alias:'segmenter.names',renderer:function(value,context){return value},diff:function(min,max,unit){return Math.floor(max-min)},align:function(value,step,unit){return Math.floor(value)},add:function(value,step,unit){return value+step},preferredStep:function(min,estStepSize,minIdx,data){return{unit:1,step:1}}})
;
Ext.define('Ext.chart.axis.segmenter.Numeric',{extend:'Ext.chart.axis.segmenter.Segmenter',alias:'segmenter.numeric',isNumeric:!0,renderer:function(value,context){return value.toFixed(Math.max(0,context.majorTicks.unit.fixes))},diff:function(min,max,unit){return Math.floor((max-min)/unit.scale)},align:function(value,step,unit){var scaledStep=unit.scale*step;return Math.floor(value/scaledStep)*scaledStep},add:function(value,step,unit){return value+step*unit.scale},preferredStep:function(min,estStepSize){var order=Math.floor(Math.log(estStepSize)*Math.LOG10E),scale=Math.pow(10,order);estStepSize/=scale;if(estStepSize<2){estStepSize=2}else if(estStepSize<5){estStepSize=5}else if(estStepSize<10){estStepSize=10;order++}
return{unit:{fixes:-order,scale:scale},step:estStepSize}},leadingZeros:function(n){return-Math.floor(Ext.Number.log10(Math.abs(n)))},exactStep:function(min,estStepSize){var stepZeros=this.leadingZeros(estStepSize),scale=Math.pow(10,stepZeros);return{unit:{fixes:stepZeros+(estStepSize%scale===0?0:1),scale:estStepSize<1?estStepSize:1},step:estStepSize<1?1:estStepSize}},adjustByMajorUnit:function(step,scale,range){var min=range[0],max=range[1],increment=step*scale,remainder,multiplier;multiplier=Math.max(1/(min||1),1/(increment||1));multiplier=multiplier>1?multiplier:1;remainder=((min*multiplier)%(increment*multiplier))/multiplier;if(remainder!==0){range[0]=min-remainder+(min<0?-increment:0)}
multiplier=Math.max(1/(max||1),1/(increment||1));multiplier=multiplier>1?multiplier:1;remainder=((max*multiplier)%(increment*multiplier))/multiplier;if(remainder!==0){range[1]=max-remainder+(max>0?increment:0)}}})
;
Ext.define('Ext.chart.axis.segmenter.Time',{extend:'Ext.chart.axis.segmenter.Segmenter',alias:'segmenter.time',config:{step:null},renderer:function(value,context){var ExtDate=Ext.Date;switch(context.majorTicks.unit){case 'y':return ExtDate.format(value,'Y');case 'mo':return ExtDate.format(value,'Y-m');case 'd':return ExtDate.format(value,'Y-m-d')}
return ExtDate.format(value,'Y-m-d\nH:i:s')},from:function(value){return new Date(value)},diff:function(min,max,unit){if(isFinite(min)){min=new Date(min)}
if(isFinite(max)){max=new Date(max)}
return Ext.Date.diff(min,max,unit)},updateStep:function(){var axis=this.getAxis();if(axis&&!this.isConfiguring){axis.performLayout()}},align:function(date,step,unit){if(unit==='d'&&step>=7){date=Ext.Date.align(date,'d',step);date.setDate(date.getDate()-date.getDay()+1);return date}else{return Ext.Date.align(date,unit,step)}},add:function(value,step,unit){return Ext.Date.add(new Date(value),unit,step)},timeBuckets:[{unit:Ext.Date.YEAR,steps:[1,2,5,10,20,50,100,200,500]},{unit:Ext.Date.MONTH,steps:[1,3,6]},{unit:Ext.Date.DAY,steps:[1,7,14]},{unit:Ext.Date.HOUR,steps:[1,6,12]},{unit:Ext.Date.MINUTE,steps:[1,5,15,30]},{unit:Ext.Date.SECOND,steps:[1,5,15,30]},{unit:Ext.Date.MILLI,steps:[1,2,5,10,20,50,100,200,500]}],getTimeBucket:function(min,max){var buckets=this.timeBuckets,unit,unitCount,steps,step,result,i,j;for(i=0;i<buckets.length;i++){unit=buckets[i].unit;unitCount=this.diff(min,max,unit);if(unitCount>0){steps=buckets[i].steps;for(j=0;j<steps.length;j++){step=steps[j];if(unitCount<=step){break}}
result={unit:unit,step:step};break}}
if(!result){result={unit:Ext.Date.MILLI,step:1}}
return result},preferredStep:function(min,estStepSize){var step=this.getStep();return step?step:this.getTimeBucket(new Date(+min),new Date(+min+Math.ceil(estStepSize)))}})
;
Ext.define('Ext.chart.axis.layout.Layout',{mixins:{observable:'Ext.mixin.Observable'},config:{axis:null},constructor:function(config){this.mixins.observable.constructor.call(this,config)},processData:function(series){var me=this,axis=me.getAxis(),direction=axis.getDirection(),boundSeries=axis.boundSeries,i,ln;if(series){series['coordinate'+direction]()}else{for(i=0,ln=boundSeries.length;i<ln;i++){boundSeries[i]['coordinate'+direction]()}}},calculateMajorTicks:function(context){var me=this,attr=context.attr,range=attr.max-attr.min,zoom=range/Math.max(1,attr.length)*(attr.visibleMax-attr.visibleMin),viewMin=attr.min+range*attr.visibleMin,viewMax=attr.min+range*attr.visibleMax,estStepSize=attr.estStepSize*zoom,majorTicks=me.snapEnds(context,attr.min,attr.max,estStepSize);if(majorTicks){me.trimByRange(context,majorTicks,viewMin,viewMax);context.majorTicks=majorTicks}},calculateMinorTicks:function(context){if(this.snapMinorEnds){context.minorTicks=this.snapMinorEnds(context)}},calculateLayout:function(context){var me=this,attr=context.attr;if(attr.length===0){return null}
if(attr.majorTicks){me.calculateMajorTicks(context);if(attr.minorTicks){me.calculateMinorTicks(context)}}},snapEnds:Ext.emptyFn,trimByRange:function(context,ticks,trimMin,trimMax){var segmenter=context.segmenter,unit=ticks.unit,beginIdx=segmenter.diff(ticks.from,trimMin,unit),endIdx=segmenter.diff(ticks.from,trimMax,unit),begin=Math.max(0,Math.ceil(beginIdx/ticks.step)),end=Math.min(ticks.steps,Math.floor(endIdx/ticks.step));if(end<ticks.steps){ticks.to=segmenter.add(ticks.from,end*ticks.step,unit)}
if(ticks.max>trimMax){ticks.max=ticks.to}
if(ticks.from<trimMin){ticks.from=segmenter.add(ticks.from,begin*ticks.step,unit);while(ticks.from<trimMin){begin++;ticks.from=segmenter.add(ticks.from,ticks.step,unit)}}
if(ticks.min<trimMin){ticks.min=ticks.from}
ticks.steps=end-begin}})
;
Ext.define('Ext.chart.axis.layout.Discrete',{extend:'Ext.chart.axis.layout.Layout',alias:'axisLayout.discrete',isDiscrete:!0,processData:function(){var me=this,axis=me.getAxis(),seriesList=axis.boundSeries,direction=axis.getDirection(),i,ln,series;me.labels=[];me.labelMap={};for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];if(series['get'+direction+'Axis']()===axis){series['coordinate'+direction]()}}
axis.getSprites()[0].setAttributes({data:me.labels});me.fireEvent('datachange',me.labels)},calculateLayout:function(context){context.data=this.labels;this.callParent([context])},calculateMajorTicks:function(context){var me=this,attr=context.attr,data=context.data,range=attr.max-attr.min,viewMin=attr.min+range*attr.visibleMin,viewMax=attr.min+range*attr.visibleMax,out;out=me.snapEnds(context,Math.max(0,attr.min),Math.min(attr.max,data.length-1),1);if(out){me.trimByRange(context,out,viewMin,viewMax);context.majorTicks=out}},snapEnds:function(context,min,max,estStepSize){var data=context.data,steps;estStepSize=Math.ceil(estStepSize);steps=Math.floor((max-min)/estStepSize);return{min:min,max:max,from:min,to:steps*estStepSize+min,step:estStepSize,steps:steps,unit:1,getLabel:function(currentStep){return data[this.from+this.step*currentStep]},get:function(currentStep){return this.from+this.step*currentStep}}},trimByRange:function(context,out,trimMin,trimMax){var unit=out.unit,beginIdx=Math.ceil((trimMin-out.from)/unit)*unit,endIdx=Math.floor((trimMax-out.from)/unit)*unit,begin=Math.max(0,Math.ceil(beginIdx/out.step)),end=Math.min(out.steps,Math.floor(endIdx/out.step));if(end<out.steps){out.to=end}
if(out.max>trimMax){out.max=out.to}
if(out.from<trimMin&&out.step>0){out.from=out.from+begin*out.step*unit;while(out.from<trimMin){begin++;out.from+=out.step*unit}}
if(out.min<trimMin){out.min=out.from}
out.steps=end-begin},getCoordFor:function(value,field,idx,items){this.labels.push(value);return this.labels.length-1}})
;
Ext.define('Ext.chart.axis.layout.CombineByIndex',{extend:'Ext.chart.axis.layout.Discrete',alias:'axisLayout.combineByIndex',getCoordFor:function(value,field,idx,items){var labels=this.labels,result=idx;if(labels[idx]!==value){result=labels.push(value)-1}
return result}})
;
Ext.define('Ext.chart.axis.layout.CombineDuplicate',{extend:'Ext.chart.axis.layout.Discrete',alias:'axisLayout.combineDuplicate',getCoordFor:function(value,field,idx,items){var result;if(!(value in this.labelMap)){result=this.labelMap[value]=this.labels.length;this.labels.push(value);return result}
return this.labelMap[value]}})
;
Ext.define('Ext.chart.axis.layout.Continuous',{extend:'Ext.chart.axis.layout.Layout',alias:'axisLayout.continuous',isContinuous:!0,config:{adjustMinimumByMajorUnit:!1,adjustMaximumByMajorUnit:!1},getCoordFor:function(value,field,idx,items){return+value},snapEnds:function(context,min,max,estStepSize){var segmenter=context.segmenter,axis=this.getAxis(),noAnimation=!axis.spriteAnimationCount,majorTickSteps=axis.getMajorTickSteps(),bucket=majorTickSteps&&segmenter.exactStep?segmenter.exactStep(min,(max-min)/majorTickSteps):segmenter.preferredStep(min,estStepSize),unit=bucket.unit,step=bucket.step,diffSteps=segmenter.diff(min,max,unit),steps=(majorTickSteps||diffSteps)+1,from;if(majorTickSteps||(noAnimation&&+segmenter.add(min,diffSteps,unit)===max)){from=min}else{from=segmenter.align(min,step,unit)}
return{min:segmenter.from(min),max:segmenter.from(max),from:from,to:segmenter.add(from,steps,unit),step:step,steps:steps,unit:unit,get:function(currentStep){return segmenter.add(this.from,this.step*currentStep,this.unit)}}},snapMinorEnds:function(context){var majorTicks=context.majorTicks,minorTickSteps=this.getAxis().getMinorTickSteps(),segmenter=context.segmenter,min=majorTicks.min,max=majorTicks.max,from=majorTicks.from,unit=majorTicks.unit,step=majorTicks.step/minorTickSteps,scaledStep=step*unit.scale,fromMargin=from-min,offset=Math.floor(fromMargin/scaledStep),extraSteps=offset+Math.floor((max-majorTicks.to)/scaledStep)+1,steps=majorTicks.steps*minorTickSteps+extraSteps;return{min:min,max:max,from:min+fromMargin%scaledStep,to:segmenter.add(from,steps*step,unit),step:step,steps:steps,unit:unit,get:function(current){return(current%minorTickSteps+offset+1!==0)?segmenter.add(this.from,this.step*current,unit):null}}}})
;
Ext.define('Ext.chart.axis.Axis',{xtype:'axis',mixins:{observable:'Ext.mixin.Observable'},requires:['Ext.chart.axis.sprite.Axis','Ext.chart.axis.segmenter.*','Ext.chart.axis.layout.*','Ext.chart.Util'],isAxis:!0,config:{position:'bottom',fields:[],label:undefined,grid:!1,limits:null,renderer:null,chart:null,style:null,margin:0,titleMargin:4,background:null,minimum:NaN,maximum:NaN,reconcileRange:!1,minZoom:1,maxZoom:10000,layout:'continuous',segmenter:'numeric',hidden:!1,majorTickSteps:0,minorTickSteps:0,adjustByMajorUnit:!0,title:null,expandRangeBy:0,length:0,center:null,radius:null,totalAngle:Math.PI,rotation:null,visibleRange:[0,1],needHighPrecision:!1,linkedTo:null,floating:null},titleOffset:0,spriteAnimationCount:0,boundSeries:[],sprites:null,surface:null,range:null,defaultRange:[0,1],rangePadding:0.5,xValues:[],yValues:[],masterAxis:null,applyRotation:function(rotation){var twoPie=Math.PI*2;return(rotation%twoPie+Math.PI)%twoPie-Math.PI},updateRotation:function(rotation){var sprites=this.getSprites(),position=this.getPosition();if(!this.getHidden()&&position==='angular'&&sprites[0]){sprites[0].setAttributes({baseRotation:rotation})}},applyTitle:function(title,oldTitle){var surface;if(Ext.isString(title)){title={text:title}}
if(!oldTitle){oldTitle=Ext.create('sprite.text',title);if((surface=this.getSurface())){surface.add(oldTitle)}}else{oldTitle.setAttributes(title)}
return oldTitle},getAdjustByMajorUnit:function(){return!this.getHidden()&&this.callParent()},applyFloating:function(floating,oldFloating){if(floating===null){floating={value:null,alongAxis:null}}else if(Ext.isNumber(floating)){floating={value:floating,alongAxis:null}}
if(Ext.isObject(floating)){if(oldFloating&&oldFloating.alongAxis){delete this.getChart().getAxis(oldFloating.alongAxis).floatingAxes[this.getId()]}
return floating}
return oldFloating},constructor:function(config){var me=this,id;me.sprites=[];me.labels=[];me.floatingAxes={};config=config||{};if(config.position==='angular'){config.style=config.style||{};config.style.estStepSize=1}
if('id' in config){id=config.id}else if('id' in me.config){id=me.config.id}else{id=me.getId()}
me.setId(id);me.mixins.observable.constructor.apply(me,arguments)},getAlignment:function(){switch(this.getPosition()){case 'left':case 'right':return'vertical';case 'top':case 'bottom':return'horizontal';case 'radial':return'radial';case 'angular':return'angular'}},getGridAlignment:function(){switch(this.getPosition()){case 'left':case 'right':return'horizontal';case 'top':case 'bottom':return'vertical';case 'radial':return'circular';case 'angular':return'radial'}},getSurface:function(){var me=this,chart=me.getChart(),surface,gridSurface;if(chart&&!me.surface){surface=me.surface=chart.getSurface(me.getId(),'axis');gridSurface=me.gridSurface=chart.getSurface('main');gridSurface.waitFor(surface);me.getGrid();me.createLimits()}
return me.surface},createLimits:function(){var me=this,chart=me.getChart(),axisSprite=me.getSprites()[0],gridAlignment=me.getGridAlignment(),limits;if(me.getLimits()&&gridAlignment){gridAlignment=gridAlignment.replace('3d','');me.limits=limits={surface:chart.getSurface('overlay'),lines:new Ext.chart.Markers(),titles:new Ext.draw.sprite.Instancing()};limits.lines.setTemplate({xclass:'grid.'+gridAlignment});limits.lines.getTemplate().setAttributes({strokeStyle:'black'},!0);limits.surface.add(limits.lines);axisSprite.bindMarker(gridAlignment+'-limit-lines',me.limits.lines);me.limitTitleTpl=new Ext.draw.sprite.Text();limits.titles.setTemplate(me.limitTitleTpl);limits.surface.add(limits.titles)}},applyGrid:function(grid){if(grid===!0){return{}}
return grid},updateGrid:function(grid){var me=this,chart=me.getChart(),gridSurface=me.gridSurface,axisSprite,gridAlignment,gridSprite;if(!chart){me.on({chartattached:Ext.bind(me.updateGrid,me,[grid]),single:!0});return}
axisSprite=me.getSprites()[0];gridAlignment=me.getGridAlignment();if(grid){gridSprite=me.gridSpriteEven;if(!gridSprite){gridSprite=me.gridSpriteEven=new Ext.chart.Markers();gridSprite.setTemplate({xclass:'grid.'+gridAlignment});gridSurface.add(gridSprite);axisSprite.bindMarker(gridAlignment+'-even',gridSprite)}
if(Ext.isObject(grid)){gridSprite.getTemplate().setAttributes(grid);if(Ext.isObject(grid.even)){gridSprite.getTemplate().setAttributes(grid.even)}}
gridSprite=me.gridSpriteOdd;if(!gridSprite){gridSprite=me.gridSpriteOdd=new Ext.chart.Markers();gridSprite.setTemplate({xclass:'grid.'+gridAlignment});gridSurface.add(gridSprite);axisSprite.bindMarker(gridAlignment+'-odd',gridSprite)}
if(Ext.isObject(grid)){gridSprite.getTemplate().setAttributes(grid);if(Ext.isObject(grid.odd)){gridSprite.getTemplate().setAttributes(grid.odd)}}}},updateMinorTickSteps:function(minorTickSteps){var me=this,sprites=me.getSprites(),axisSprite=sprites&&sprites[0],surface;if(axisSprite){axisSprite.setAttributes({minorTicks:!!minorTickSteps});surface=me.getSurface();if(!me.isConfiguring&&surface){surface.renderFrame()}}},getCoordFor:function(value,field,idx,items){return this.getLayout().getCoordFor(value,field,idx,items)},applyPosition:function(pos){return pos.toLowerCase()},applyLength:function(length,oldLength){return length>0?length:oldLength},applyLabel:function(label,oldLabel){if(!oldLabel){oldLabel=new Ext.draw.sprite.Text({})}
if(label){if(this.limitTitleTpl){this.limitTitleTpl.setAttributes(label)}
oldLabel.setAttributes(label)}
return oldLabel},applyLayout:function(layout,oldLayout){layout=Ext.factory(layout,null,oldLayout,'axisLayout');layout.setAxis(this);return layout},applySegmenter:function(segmenter,oldSegmenter){segmenter=Ext.factory(segmenter,null,oldSegmenter,'segmenter');segmenter.setAxis(this);return segmenter},updateMinimum:function(){this.range=null},updateMaximum:function(){this.range=null},hideLabels:function(){this.getSprites()[0].setDirty(!0);this.setLabel({hidden:!0})},showLabels:function(){this.getSprites()[0].setDirty(!0);this.setLabel({hidden:!1})},renderFrame:function(){this.getSurface().renderFrame()},updateChart:function(newChart,oldChart){var me=this,surface;if(oldChart){oldChart.unregister(me);oldChart.un('serieschange',me.onSeriesChange,me);me.linkAxis();me.fireEvent('chartdetached',oldChart,me)}
if(newChart){newChart.on('serieschange',me.onSeriesChange,me);me.surface=null;surface=me.getSurface();me.getLabel().setSurface(surface);surface.add(me.getSprites());surface.add(me.getTitle());newChart.register(me);me.fireEvent('chartattached',newChart,me)}},applyBackground:function(background){var rect=Ext.ClassManager.getByAlias('sprite.rect');return rect.def.normalize(background)},processData:function(){this.getLayout().processData();this.range=null},getDirection:function(){return this.getChart().getDirectionForAxis(this.getPosition())},isSide:function(){var position=this.getPosition();return position==='left'||position==='right'},applyFields:function(fields){return Ext.Array.from(fields)},applyVisibleRange:function(visibleRange,oldVisibleRange){var temp;this.getChart();if(visibleRange[0]>visibleRange[1]){temp=visibleRange[0];visibleRange[0]=visibleRange[1];visibleRange[0]=temp}
if(visibleRange[1]===visibleRange[0]){visibleRange[1]+=1/this.getMaxZoom()}
if(visibleRange[1]>visibleRange[0]+1){visibleRange[0]=0;visibleRange[1]=1}else if(visibleRange[0]<0){visibleRange[1]-=visibleRange[0];visibleRange[0]=0}else if(visibleRange[1]>1){visibleRange[0]-=visibleRange[1]-1;visibleRange[1]=1}
if(oldVisibleRange&&visibleRange[0]===oldVisibleRange[0]&&visibleRange[1]===oldVisibleRange[1]){return undefined}
return visibleRange},updateVisibleRange:function(visibleRange){this.fireEvent('visiblerangechange',this,visibleRange)},onSeriesChange:function(chart){var me=this,series=chart.getSeries(),boundSeries=[],linkedTo,masterAxis,getAxisMethod,i,ln;if(series){getAxisMethod='get'+me.getDirection()+'Axis';for(i=0,ln=series.length;i<ln;i++){if(this===series[i][getAxisMethod]()){boundSeries.push(series[i])}}}
me.boundSeries=boundSeries;linkedTo=me.getLinkedTo();masterAxis=!Ext.isEmpty(linkedTo)&&chart.getAxis(linkedTo);if(masterAxis){me.linkAxis(masterAxis)}else{me.getLayout().processData()}},linkAxis:function(masterAxis){var me=this;function link(action,slave,master){master.getLayout()[action]('datachange','onDataChange',slave);master[action]('rangechange','onMasterAxisRangeChange',slave)}
if(me.masterAxis){if(!me.masterAxis.destroyed){link('un',me,me.masterAxis)}
me.masterAxis=null}
if(masterAxis){if(masterAxis.type!==this.type){Ext.Error.raise("Linked axes must be of the same type.")}
link('on',me,masterAxis);me.onDataChange(masterAxis.getLayout().labels);me.onMasterAxisRangeChange(masterAxis,masterAxis.range);me.setStyle(Ext.apply({},me.config.style,masterAxis.config.style));me.setTitle(Ext.apply({},me.config.title,masterAxis.config.title));me.setLabel(Ext.apply({},me.config.label,masterAxis.config.label));me.masterAxis=masterAxis}},onDataChange:function(data){this.getLayout().labels=data},onMasterAxisRangeChange:function(masterAxis,range){this.range=range},applyRange:function(newRange){if(!newRange){return this.dataRange.slice(0)}else{return[newRange[0]===null?this.dataRange[0]:newRange[0],newRange[1]===null?this.dataRange[1]:newRange[1]]}},setBoundSeriesRange:function(range){var boundSeries=this.boundSeries,style={},series,i,sprites,j,ln;style['range'+this.getDirection()]=range;for(i=0,ln=boundSeries.length;i<ln;i++){series=boundSeries[i];if(series.getHidden()===!0){continue}
sprites=series.getSprites();for(j=0;j<sprites.length;j++){sprites[j].setAttributes(style)}}},getRange:function(recalculate){var me=this,range=recalculate?null:me.range,oldRange=me.oldRange,minimum,maximum;if(!range){if(me.masterAxis){range=me.masterAxis.range}else{minimum=me.getMinimum();maximum=me.getMaximum();if(Ext.isNumber(minimum)&&Ext.isNumber(maximum)){range=[minimum,maximum]}else{range=me.calculateRange()}
me.range=range}}
if(range&&(!oldRange||range[0]!==oldRange[0]||range[1]!==oldRange[1])){me.fireEvent('rangechange',me,range,oldRange);me.oldRange=range}
return range},isSingleDataPoint:function(range){return(range[0]+this.rangePadding)===0&&(range[1]-this.rangePadding)===0},calculateRange:function(){var me=this,boundSeries=me.boundSeries,layout=me.getLayout(),segmenter=me.getSegmenter(),minimum=me.getMinimum(),maximum=me.getMaximum(),visibleRange=me.getVisibleRange(),getRangeMethod='get'+me.getDirection()+'Range',expandRangeBy=me.getExpandRangeBy(),context,attr,majorTicks,series,i,ln,seriesRange,range=[NaN,NaN];for(i=0,ln=boundSeries.length;i<ln;i++){series=boundSeries[i];if(series.getHidden()===!0){continue}
seriesRange=series[getRangeMethod]();if(seriesRange){Ext.chart.Util.expandRange(range,seriesRange)}}
range=Ext.chart.Util.validateRange(range,me.defaultRange,me.rangePadding);if(expandRangeBy&&(!me.isSingleDataPoint(range))){range[0]-=expandRangeBy;range[1]+=expandRangeBy}
if(isFinite(minimum)){range[0]=minimum}
if(isFinite(maximum)){range[1]=maximum}
range[0]=Ext.Number.correctFloat(range[0]);range[1]=Ext.Number.correctFloat(range[1]);me.range=range;if(me.getReconcileRange()){me.reconcileRange()}
if(range[0]!==range[1]&&me.getAdjustByMajorUnit()&&segmenter.adjustByMajorUnit&&!me.getMajorTickSteps()){attr=Ext.Object.chain(me.getSprites()[0].attr);attr.min=range[0];attr.max=range[1];attr.visibleMin=visibleRange[0];attr.visibleMax=visibleRange[1];context={attr:attr,segmenter:segmenter};layout.calculateLayout(context);majorTicks=context.majorTicks;if(majorTicks){segmenter.adjustByMajorUnit(majorTicks.step,majorTicks.unit.scale,range);attr.min=range[0];attr.max=range[1];context.majorTicks=null;layout.calculateLayout(context);majorTicks=context.majorTicks;segmenter.adjustByMajorUnit(majorTicks.step,majorTicks.unit.scale,range)}else if(!me.hasClearRangePending){me.hasClearRangePending=!0;me.getChart().on('layout','clearRange',me)}}
return range},clearRange:function(){this.hasClearRangePending=null;this.range=null},reconcileRange:function(){var me=this,axes=me.getChart().getAxes(),direction=me.getDirection(),i,ln,axis,range;if(!axes){return}
for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];range=axis.getRange();if(axis===me||axis.getDirection()!==direction||!range||!axis.getReconcileRange()){continue}
if(range[0]<me.range[0]){me.range[0]=range[0]}
if(range[1]>me.range[1]){me.range[1]=range[1]}}},applyStyle:function(style,oldStyle){var cls=Ext.ClassManager.getByAlias('sprite.'+this.seriesType);if(cls&&cls.def){style=cls.def.normalize(style)}
oldStyle=Ext.apply(oldStyle||{},style);return oldStyle},themeOnlyIfConfigured:{grid:!0},updateTheme:function(theme){var me=this,axisTheme=theme.getAxis(),position=me.getPosition(),initialConfig=me.getInitialConfig(),defaultConfig=me.defaultConfig,configs=me.self.getConfigurator().configs,genericAxisTheme=axisTheme.defaults,specificAxisTheme=axisTheme[position],themeOnlyIfConfigured=me.themeOnlyIfConfigured,key,value,isObjValue,isUnusedConfig,initialValue,cfg;axisTheme=Ext.merge({},genericAxisTheme,specificAxisTheme);for(key in axisTheme){value=axisTheme[key];cfg=configs[key];if(value!==null&&value!==undefined&&cfg){initialValue=initialConfig[key];isObjValue=Ext.isObject(value);isUnusedConfig=initialValue===defaultConfig[key];if(isObjValue){if(isUnusedConfig&&themeOnlyIfConfigured[key]){continue}
value=Ext.merge({},value,initialValue)}
if(isUnusedConfig||isObjValue){me[cfg.names.set](value)}}}},updateCenter:function(center){var me=this,sprites=me.getSprites(),axisSprite=sprites[0],centerX=center[0],centerY=center[1];if(axisSprite){axisSprite.setAttributes({centerX:centerX,centerY:centerY})}
if(me.gridSpriteEven){me.gridSpriteEven.getTemplate().setAttributes({translationX:centerX,translationY:centerY,rotationCenterX:centerX,rotationCenterY:centerY})}
if(me.gridSpriteOdd){me.gridSpriteOdd.getTemplate().setAttributes({translationX:centerX,translationY:centerY,rotationCenterX:centerX,rotationCenterY:centerY})}},getSprites:function(){if(!this.getChart()){return}
var me=this,range=me.getRange(),position=me.getPosition(),chart=me.getChart(),animation=chart.getAnimation(),length=me.getLength(),axisClass=me.superclass,mainSprite,style,animationModifier;if(animation===!1){animation={duration:0}}
style=Ext.applyIf({position:position,axis:me,length:length,grid:me.getGrid(),hidden:me.getHidden(),titleOffset:me.titleOffset,layout:me.getLayout(),segmenter:me.getSegmenter(),totalAngle:me.getTotalAngle(),label:me.getLabel()},me.getStyle());if(range){style.min=range[0];style.max=range[1]}
if(!me.sprites.length){while(!axisClass.xtype){axisClass=axisClass.superclass}
mainSprite=Ext.create('sprite.'+axisClass.xtype,style);animationModifier=mainSprite.getAnimation();animationModifier.setCustomDurations({baseRotation:0});animationModifier.on('animationstart','onAnimationStart',me);animationModifier.on('animationend','onAnimationEnd',me);mainSprite.setLayout(me.getLayout());mainSprite.setSegmenter(me.getSegmenter());mainSprite.setLabel(me.getLabel());me.sprites.push(mainSprite);me.updateTitleSprite()}else{mainSprite=me.sprites[0];mainSprite.setAnimation(animation);mainSprite.setAttributes(style)}
if(me.getRenderer()){mainSprite.setRenderer(me.getRenderer())}
return me.sprites},performLayout:function(){if(this.isConfiguring){return}
var me=this,sprites=me.getSprites(),surface=me.getSurface(),chart=me.getChart(),sprite=sprites&&sprites[0];if(chart&&surface&&sprite){sprite.callUpdater(null,'layout');chart.scheduleLayout()}},updateTitleSprite:function(){var me=this,length=me.getLength(),surface,thickness,title,position,margin,titleMargin,anchor;if(!me.sprites[0]||!Ext.isNumber(length)){return}
thickness=this.sprites[0].thickness;surface=me.getSurface();title=me.getTitle();position=me.getPosition();margin=me.getMargin();titleMargin=me.getTitleMargin();anchor=surface.roundPixel(length/2);if(title){switch(position){case 'top':title.setAttributes({x:anchor,y:margin+titleMargin/2,textBaseline:'top',textAlign:'center'},!0);title.applyTransformations();me.titleOffset=title.getBBox().height+titleMargin;break;case 'bottom':title.setAttributes({x:anchor,y:thickness+titleMargin/2,textBaseline:'top',textAlign:'center'},!0);title.applyTransformations();me.titleOffset=title.getBBox().height+titleMargin;break;case 'left':title.setAttributes({x:margin+titleMargin/2,y:anchor,textBaseline:'top',textAlign:'center',rotationCenterX:margin+titleMargin/2,rotationCenterY:anchor,rotationRads:-Math.PI/2},!0);title.applyTransformations();me.titleOffset=title.getBBox().width+titleMargin;break;case 'right':title.setAttributes({x:thickness-margin+titleMargin/2,y:anchor,textBaseline:'bottom',textAlign:'center',rotationCenterX:thickness+titleMargin/2,rotationCenterY:anchor,rotationRads:Math.PI/2},!0);title.applyTransformations();me.titleOffset=title.getBBox().width+titleMargin;break}}},onThicknessChanged:function(){this.getChart().onThicknessChanged()},getThickness:function(){if(this.getHidden()){return 0}
return(this.sprites[0]&&this.sprites[0].thickness||1)+this.titleOffset+this.getMargin()},onAnimationStart:function(){this.spriteAnimationCount++;if(this.spriteAnimationCount===1){this.fireEvent('animationstart',this)}},onAnimationEnd:function(){this.spriteAnimationCount--;if(this.spriteAnimationCount===0){this.fireEvent('animationend',this)}},getItemId:function(){return this.getId()},getAncestorIds:function(){return[this.getChart().getId()]},isXType:function(xtype){return xtype==='axis'},resolveListenerScope:function(defaultScope){var me=this,namedScope=Ext._namedScopes[defaultScope],chart=me.getChart(),scope;if(!namedScope){scope=chart?chart.resolveListenerScope(defaultScope,!1):(defaultScope||me)}else if(namedScope.isThis){scope=me}else if(namedScope.isController){scope=chart?chart.resolveListenerScope(defaultScope,!1):me}else if(namedScope.isSelf){scope=chart?chart.resolveListenerScope(defaultScope,!1):me;if(scope===chart&&!chart.getInheritedConfig('defaultListenerScope')){scope=me}}
return scope},destroy:function(){var me=this;me.setChart(null);me.surface.destroy();me.surface=null;me.callParent()}})
;
Ext.define('Ext.chart.legend.LegendBase',{extend:'Ext.view.View',config:{tpl:['<div class="',Ext.baseCSSPrefix,'legend-inner">','<div class="',Ext.baseCSSPrefix,'legend-container">','<tpl for=".">','<div class="',Ext.baseCSSPrefix,'legend-item">','<span ','class="',Ext.baseCSSPrefix,'legend-item-marker {[ values.disabled ? Ext.baseCSSPrefix + \'legend-item-inactive\' : \'\' ]}" ','style="background:{mark};">','</span>{name}','</div>','</tpl>','</div>','</div>'],nodeContainerSelector:'div.'+Ext.baseCSSPrefix+'legend-inner',itemSelector:'div.'+Ext.baseCSSPrefix+'legend-item',docked:'bottom'},setDocked:function(docked){var me=this,panel=me.ownerCt;me.docked=me.dock=docked;switch(docked){case 'top':case 'bottom':me.addCls(me.horizontalCls);me.removeCls(me.verticalCls);break;case 'left':case 'right':me.addCls(me.verticalCls);me.removeCls(me.horizontalCls);break}
if(panel){panel.setDock(docked)}},setStore:function(store){this.bindStore(store)},clearViewEl:function(){this.callParent(arguments);Ext.removeNode(this.getNodeContainer())},onItemClick:function(record,item,index,e){this.callParent(arguments);this.toggleItem(index)}})
;
Ext.define('Ext.chart.legend.Legend',{extend:'Ext.chart.legend.LegendBase',alternateClassName:'Ext.chart.Legend',xtype:'legend',alias:'legend.dom',type:'dom',isLegend:!0,isDomLegend:!0,config:{rect:null,toggleable:!0},baseCls:Ext.baseCSSPrefix+'legend',horizontalCls:Ext.baseCSSPrefix+'legend-horizontal',verticalCls:Ext.baseCSSPrefix+'legend-vertical',toggleItem:function(index){var disabledCount=0,canToggle=!0,disabled,store,count,record,i;if(!this.getToggleable()){return}
store=this.getStore();if(store){count=store.getCount();for(i=0;i<count;i++){record=store.getAt(i);if(record.get('disabled')){disabledCount++}}
canToggle=count-disabledCount>1;record=store.getAt(index);if(record){disabled=record.get('disabled');if(disabled||canToggle){record.set('disabled',!disabled)}}}},onResize:function(width,height,oldWidth,oldHeight){var me=this,chart=me.chart;if(!me.isConfiguring){if(chart){chart.scheduleLayout()}}}})
;
Ext.define('Ext.chart.legend.sprite.Item',{extend:'Ext.draw.sprite.Composite',alias:'sprite.legenditem',type:'legenditem',isLegendItem:!0,requires:['Ext.draw.sprite.Text','Ext.draw.sprite.Circle'],inheritableStatics:{def:{processors:{enabled:'limited01',markerLabelGap:'number'},animationProcessors:{enabled:null,markerLabelGap:null},defaults:{enabled:!0,markerLabelGap:5},triggers:{enabled:'enabled',markerLabelGap:'layout'},updaters:{layout:'layoutUpdater',enabled:'enabledUpdater'}}},config:{label:{$value:{type:'text'},lazy:!0},marker:{$value:{type:'circle'},lazy:!0},legend:null,store:null,record:null,series:null},applyLabel:function(label,oldLabel){var sprite;if(label){if(label.isSprite&&label.type==='text'){sprite=label}else{if(oldLabel&&label.type===oldLabel.type){oldLabel.setConfig(label);sprite=oldLabel;this.scheduleUpdater(this.attr,'layout')}else{sprite=new Ext.draw.sprite.Text(label)}}}
return sprite},defaultMarkerSize:10,updateLabel:function(label,oldLabel){var me=this;me.removeSprite(oldLabel);label.setAttributes({textBaseline:'middle'});me.addSprite(label);me.scheduleUpdater(me.attr,'layout')},applyMarker:function(config){var marker;if(config){if(config.isSprite){marker=config}else{marker=this.createMarker(config)}}
marker=this.resetMarker(marker,config);return marker},createMarker:function(config){var marker;delete config.animation;if(config.type==='image'){delete config.width;delete config.height}
marker=Ext.create('sprite.'+config.type,config);return marker},resetMarker:function(sprite,config){var size=config.size||this.defaultMarkerSize,bbox,max,scale;sprite.setTransform([1,0,0,1,0,0],!0);if(config.type==='image'){sprite.setAttributes({width:size,height:size})}else{bbox=sprite.getBBox();max=Math.max(bbox.width,bbox.height);scale=size/max;sprite.setAttributes({scalingX:scale,scalingY:scale})}
return sprite},updateMarker:function(marker,oldMarker){var me=this;me.removeSprite(oldMarker);me.addSprite(marker);me.scheduleUpdater(me.attr,'layout')},updateSurface:function(surface,oldSurface){var me=this;me.callParent([surface,oldSurface]);if(surface){me.scheduleUpdater(me.attr,'layout')}},enabledUpdater:function(attr){var marker=this.getMarker();if(marker){marker.setAttributes({globalAlpha:attr.enabled?1:0.3})}},layoutUpdater:function(){var me=this,attr=me.attr,label=me.getLabel(),marker=me.getMarker(),labelBBox,markerBBox,totalHeight;markerBBox=marker.getBBox();labelBBox=label.getBBox();totalHeight=Math.max(markerBBox.height,labelBBox.height);marker.transform([1,0,0,1,-markerBBox.x,-markerBBox.y+(totalHeight-markerBBox.height)/2],!0);label.transform([1,0,0,1,-labelBBox.x+markerBBox.width+attr.markerLabelGap,-labelBBox.y+(totalHeight-labelBBox.height)/2],!0);me.bboxUpdater(attr)}})
;
Ext.define('Ext.chart.legend.sprite.Border',{extend:'Ext.draw.sprite.Rect',alias:'sprite.legendborder',type:'legendborder',isLegendBorder:!0})
;
Ext.define('Ext.draw.PathUtil',function(){var abs=Math.abs,pow=Math.pow,cos=Math.cos,acos=Math.acos,sqrt=Math.sqrt,PI=Math.PI;return{singleton:!0,requires:['Ext.draw.overrides.hittest.Path','Ext.draw.overrides.hittest.sprite.Path'],cubicRoots:function(P){var a=P[0],b=P[1],c=P[2],d=P[3];if(a===0){return this.quadraticRoots(b,c,d)}
var A=b/a,B=c/a,C=d/a,Q=(3*B-pow(A,2))/9,R=(9*A*B-27*C-2*pow(A,3))/54,D=pow(Q,3)+pow(R,2),t=[],S,T,Im,th,i,sign=Ext.Number.sign;if(D>=0){S=sign(R+sqrt(D))*pow(abs(R+sqrt(D)),1/3);T=sign(R-sqrt(D))*pow(abs(R-sqrt(D)),1/3);t[0]=-A/3+(S+T);t[1]=-A/3-(S+T)/2;t[2]=t[1];Im=abs(sqrt(3)*(S-T)/2);if(Im!==0){t[1]=-1;t[2]=-1}}else{th=acos(R/sqrt(-pow(Q,3)));t[0]=2*sqrt(-Q)*cos(th/3)-A/3;t[1]=2*sqrt(-Q)*cos((th+2*PI)/3)-A/3;t[2]=2*sqrt(-Q)*cos((th+4*PI)/3)-A/3}
for(i=0;i<3;i++){if(t[i]<0||t[i]>1){t[i]=-1}}
return t},quadraticRoots:function(a,b,c){var D,rD,t,i;if(a===0){return this.linearRoot(b,c)}
D=b*b-4*a*c;if(D===0){t=[-b/(2*a)]}else if(D>0){rD=sqrt(D);t=[(-b-rD)/(2*a),(-b+rD)/(2*a)]}else{return[]}
for(i=0;i<t.length;i++){if(t[i]<0||t[i]>1){t[i]=-1}}
return t},linearRoot:function(a,b){var t=-b/a;if(a===0||t<0||t>1){return[]}
return[t]},bezierCoeffs:function(P0,P1,P2,P3){var Z=[];Z[0]=-P0+3*P1-3*P2+P3;Z[1]=3*P0-6*P1+3*P2;Z[2]=-3*P0+3*P1;Z[3]=P0;return Z},cubicLineIntersections:function(px1,px2,px3,px4,py1,py2,py3,py4,x1,y1,x2,y2){var P=[],intersections=[],A=y1-y2,B=x2-x1,C=x1*(y2-y1)-y1*(x2-x1),bx=this.bezierCoeffs(px1,px2,px3,px4),by=this.bezierCoeffs(py1,py2,py3,py4),i,r,s,t,tt,ttt,cx,cy;P[0]=A*bx[0]+B*by[0];P[1]=A*bx[1]+B*by[1];P[2]=A*bx[2]+B*by[2];P[3]=A*bx[3]+B*by[3]+C;r=this.cubicRoots(P);for(i=0;i<r.length;i++){t=r[i];if(t<0||t>1){continue}
tt=t*t;ttt=tt*t;cx=bx[0]*ttt+bx[1]*tt+bx[2]*t+bx[3];cy=by[0]*ttt+by[1]*tt+by[2]*t+by[3];if((x2-x1)!==0){s=(cx-x1)/(x2-x1)}else{s=(cy-y1)/(y2-y1)}
if(!(s<0||s>1)){intersections.push([cx,cy])}}
return intersections},splitCubic:function(P1,P2,P3,P4,z){var zz=z*z,zzz=z*zz,iz=z-1,izz=iz*iz,izzz=iz*izz,P=zzz*P4-3*zz*iz*P3+3*z*izz*P2-izzz*P1;return[[P1,z*P2-iz*P1,zz*P3-2*z*iz*P2+izz*P1,P],[P,zz*P4-2*z*iz*P3+izz*P2,z*P4-iz*P3,P4]]},cubicDimension:function(a,b,c,d){var qa=3*(-a+3*(b-c)+d),qb=6*(a-2*b+c),qc=-3*(a-b),x,y,min=Math.min(a,d),max=Math.max(a,d),delta;if(qa===0){if(qb===0){return[min,max]}else{x=-qc/qb;if(0<x&&x<1){y=this.interpolateCubic(a,b,c,d,x);min=Math.min(min,y);max=Math.max(max,y)}}}else{delta=qb*qb-4*qa*qc;if(delta>=0){delta=sqrt(delta);x=(delta-qb)/2/qa;if(0<x&&x<1){y=this.interpolateCubic(a,b,c,d,x);min=Math.min(min,y);max=Math.max(max,y)}
if(delta>0){x-=delta/qa;if(0<x&&x<1){y=this.interpolateCubic(a,b,c,d,x);min=Math.min(min,y);max=Math.max(max,y)}}}}
return[min,max]},interpolateCubic:function(a,b,c,d,t){var rate;if(t===0){return a}
if(t===1){return d}
rate=(1-t)/t;return t*t*t*(d+rate*(3*c+rate*(3*b+rate*a)))},cubicsIntersections:function(ax1,ax2,ax3,ax4,ay1,ay2,ay3,ay4,bx1,bx2,bx3,bx4,by1,by2,by3,by4){var me=this,axDim=me.cubicDimension(ax1,ax2,ax3,ax4),ayDim=me.cubicDimension(ay1,ay2,ay3,ay4),bxDim=me.cubicDimension(bx1,bx2,bx3,bx4),byDim=me.cubicDimension(by1,by2,by3,by4),splitAx,splitAy,splitBx,splitBy,points=[];if(axDim[0]>bxDim[1]||axDim[1]<bxDim[0]||ayDim[0]>byDim[1]||ayDim[1]<byDim[0]){return[]}
if(abs(ay1-ay2)<1&&abs(ay3-ay4)<1&&abs(ax1-ax4)<1&&abs(ax2-ax3)<1&&abs(by1-by2)<1&&abs(by3-by4)<1&&abs(bx1-bx4)<1&&abs(bx2-bx3)<1){return[[(ax1+ax4)*0.5,(ay1+ay2)*0.5]]}
splitAx=me.splitCubic(ax1,ax2,ax3,ax4,0.5);splitAy=me.splitCubic(ay1,ay2,ay3,ay4,0.5);splitBx=me.splitCubic(bx1,bx2,bx3,bx4,0.5);splitBy=me.splitCubic(by1,by2,by3,by4,0.5);points.push.apply(points,me.cubicsIntersections.apply(me,splitAx[0].concat(splitAy[0],splitBx[0],splitBy[0])));points.push.apply(points,me.cubicsIntersections.apply(me,splitAx[0].concat(splitAy[0],splitBx[1],splitBy[1])));points.push.apply(points,me.cubicsIntersections.apply(me,splitAx[1].concat(splitAy[1],splitBx[0],splitBy[0])));points.push.apply(points,me.cubicsIntersections.apply(me,splitAx[1].concat(splitAy[1],splitBx[1],splitBy[1])));return points},linesIntersection:function(x1,y1,x2,y2,x3,y3,x4,y4){var d=(x2-x1)*(y4-y3)-(y2-y1)*(x4-x3),ua,ub;if(d===0){return null}
ua=((x4-x3)*(y1-y3)-(x1-x3)*(y4-y3))/d;ub=((x2-x1)*(y1-y3)-(y2-y1)*(x1-x3))/d;if(ua>=0&&ua<=1&&ub>=0&&ub<=1){return[x1+ua*(x2-x1),y1+ua*(y2-y1)]}
return null},pointOnLine:function(x1,y1,x2,y2,x,y){var t,_;if(abs(x2-x1)<abs(y2-y1)){_=x1;x1=y1;y1=_;_=x2;x2=y2;y2=_;_=x;x=y;y=_}
t=(x-x1)/(x2-x1);if(t<0||t>1){return!1}
return abs(y1+t*(y2-y1)-y)<4},pointOnCubic:function(px1,px2,px3,px4,py1,py2,py3,py4,x,y){var me=this,bx=me.bezierCoeffs(px1,px2,px3,px4),by=me.bezierCoeffs(py1,py2,py3,py4),i,j,rx,ry,t;bx[3]-=x;by[3]-=y;rx=me.cubicRoots(bx);ry=me.cubicRoots(by);for(i=0;i<rx.length;i++){t=rx[i];for(j=0;j<ry.length;j++){if(t>=0&&t<=1&&abs(t-ry[j])<0.05){return!0}}}
return!1}}})
;
Ext.define('Ext.draw.overrides.hittest.All',{requires:['Ext.draw.PathUtil','Ext.draw.overrides.hittest.sprite.Instancing','Ext.draw.overrides.hittest.Surface']})
;
Ext.define('Ext.chart.legend.SpriteLegend',{alias:'legend.sprite',type:'sprite',isLegend:!0,isSpriteLegend:!0,mixins:['Ext.mixin.Observable'],requires:['Ext.chart.legend.sprite.Item','Ext.chart.legend.sprite.Border','Ext.draw.overrides.hittest.All','Ext.draw.Animator'],config:{docked:'bottom',store:null,chart:null,surface:null,size:{width:0,height:0},toggleable:!0,padding:10,label:{preciseMeasurement:!0},marker:{},border:{$value:{type:'legendborder'},lazy:!0},background:null,hidden:!1},sprites:null,spriteZIndexes:{background:0,border:1,item:2},dockedValues:{left:!0,right:!0,top:!0,bottom:!0},constructor:function(config){var me=this;me.oldSize={width:0,height:0};me.getId();me.mixins.observable.constructor.call(me,config)},applyStore:function(store){return store&&Ext.StoreManager.lookup(store)},updateStore:function(store,oldStore){var me=this;if(oldStore){oldStore.un('datachanged',me.onDataChanged,me);oldStore.un('update',me.onDataUpdate,me)}
if(store){store.on('datachanged',me.onDataChanged,me);store.on('update',me.onDataUpdate,me);me.onDataChanged(store)}
me.performLayout()},applyDocked:function(docked){if(!(docked in this.dockedValues)){Ext.raise("Invalid 'docked' config value.")}
return docked},updateDocked:function(docked){this.isTop=docked==='top';if(!this.isConfiguring){this.layoutChart()}},updateHidden:function(hidden){var surface;this.getChart();surface=this.getSurface();if(surface){surface.setHidden(hidden)}
if(!this.isConfiguring){this.layoutChart()}},layoutChart:function(){var chart;if(!this.isConfiguring){chart=this.getChart();if(chart){chart.scheduleLayout()}}},computeRect:function(chartRect){var rect,docked,size,height,width;if(this.getHidden()){return null}
rect=[0,0,0,0];docked=this.getDocked();size=this.getSize();height=size.height;width=size.width;switch(docked){case 'top':rect[1]=chartRect[1];rect[2]=chartRect[2];rect[3]=height;chartRect[1]+=height;chartRect[3]-=height;break;case 'bottom':chartRect[3]-=height;rect[1]=chartRect[3];rect[2]=chartRect[2];rect[3]=height;break;case 'left':chartRect[0]+=width;chartRect[2]-=width;rect[2]=width;rect[3]=chartRect[3];break;case 'right':chartRect[2]-=width;rect[0]=chartRect[2];rect[2]=width;rect[3]=chartRect[3];break}
return rect},applyBorder:function(config){var border;if(config){if(config.isSprite){border=config}else{border=Ext.create('sprite.'+config.type,config)}}
if(border){border.isLegendBorder=!0;border.setAttributes({zIndex:this.spriteZIndexes.border})}
return border},updateBorder:function(border,oldBorder){var surface=this.getSurface();this.borderSprite=null;if(surface){if(oldBorder){surface.remove(oldBorder)}
if(border){this.borderSprite=surface.add(border)}}},scheduleLayout:function(){if(!this.scheduledLayoutId){this.scheduledLayoutId=Ext.draw.Animator.schedule('performLayout',this)}},cancelLayout:function(){Ext.draw.Animator.cancel(this.scheduledLayoutId);this.scheduledLayoutId=null},performLayout:function(){var me=this,size=me.getSize(),gap=me.getPadding(),sprites=me.getSprites(),surface=me.getSurface(),background=me.getBackground(),surfaceRect=surface.getRect(),store=me.getStore(),ln=(sprites&&sprites.length)||0,i,sprite;if(!surface||!surfaceRect||!store){return!1}
me.cancelLayout();var docked=me.getDocked(),surfaceWidth=surfaceRect[2],surfaceHeight=surfaceRect[3],border=me.borderSprite,bboxes=[],startX,startY,columnSize,columnCount,columnWidth,itemsWidth,itemsHeight,paddedItemsWidth,paddedItemsHeight,paddedBorderWidth,paddedBorderHeight,itemHeight,bbox,x,y;for(i=0;i<ln;i++){sprite=sprites[i];bbox=sprite.getBBox();bboxes.push(bbox)}
if(bbox){itemHeight=bbox.height}
switch(docked){case 'bottom':case 'top':if(!surfaceWidth){return!1}
columnSize=0;do{itemsWidth=0;columnWidth=0;columnCount=0;columnSize++;for(i=0;i<ln;i++){bbox=bboxes[i];if(bbox.width>columnWidth){columnWidth=bbox.width;columnWidth=Math.min(columnWidth,surfaceWidth-(gap*4))}
if((i+1)%columnSize===0){itemsWidth+=columnWidth;columnWidth=0;columnCount++}}
if(i%columnSize!==0){itemsWidth+=columnWidth;columnCount++}
paddedItemsWidth=itemsWidth+(columnCount-1)*gap;paddedBorderWidth=paddedItemsWidth+gap*4}while(paddedBorderWidth>surfaceWidth);paddedItemsHeight=itemHeight*columnSize+(columnSize-1)*gap;break;case 'right':case 'left':if(!surfaceHeight){return!1}
columnSize=ln*2;do{columnSize=(columnSize>>1)+(columnSize%2);itemsWidth=0;itemsHeight=0;columnWidth=0;columnCount=0;for(i=0;i<ln;i++){bbox=bboxes[i];if(!columnCount){itemsHeight+=bbox.height}
if(bbox.width>columnWidth){columnWidth=bbox.width}
if((i+1)%columnSize===0){itemsWidth+=columnWidth;columnWidth=0;columnCount++}}
if(i%columnSize!==0){itemsWidth+=columnWidth;columnCount++}
paddedItemsWidth=itemsWidth+(columnCount-1)*gap;paddedItemsHeight=itemsHeight+(columnSize-1)*gap;paddedBorderWidth=paddedItemsWidth+gap*4;paddedBorderHeight=paddedItemsHeight+gap*4}while(paddedItemsHeight>surfaceHeight);break}
startX=(surfaceWidth-paddedItemsWidth)/2;startY=(surfaceHeight-paddedItemsHeight)/2;x=0;y=0;columnWidth=0;for(i=0;i<ln;i++){sprite=sprites[i];bbox=bboxes[i];sprite.setAttributes({translationX:startX+x,translationY:startY+y});if(bbox.width>columnWidth){columnWidth=bbox.width}
if((i+1)%columnSize===0){x+=columnWidth+gap;y=0;columnWidth=0}else{y+=bbox.height+gap}}
if(border){border.setAttributes({hidden:!ln,x:startX-gap,y:startY-gap,width:paddedItemsWidth+gap*2,height:paddedItemsHeight+gap*2})}
size.width=border.attr.width+gap*2;size.height=border.attr.height+gap*2;if(size.width!==me.oldSize.width||size.height!==me.oldSize.height){Ext.apply(me.oldSize,size);me.getChart().scheduleLayout();return!1}
if(background){me.resizeBackground(surface,background)}
surface.renderFrame();return!0},getSprites:function(){this.updateSprites();return this.sprites},createSprite:function(surface,record){var me=this,data=record.data,chart=me.getChart(),series=chart.get(data.series),seriesMarker=series.getMarker(),sprite=null,markerConfig,labelConfig,legendItemConfig;if(surface){markerConfig=series.getMarkerStyleByIndex(data.index);markerConfig.fillStyle=data.mark;markerConfig.hidden=!1;if(seriesMarker&&seriesMarker.type){markerConfig.type=seriesMarker.type}
Ext.apply(markerConfig,me.getMarker());markerConfig.surface=surface;labelConfig=me.getLabel();legendItemConfig={type:'legenditem',zIndex:me.spriteZIndexes.item,text:data.name,enabled:!data.disabled,marker:markerConfig,label:labelConfig,series:data.series,record:record};sprite=surface.add(legendItemConfig)}
return sprite},updateSprites:function(){var me=this,chart=me.getChart(),store=me.getStore(),surface=me.getSurface(),item,items,itemSprite,i,ln,sprites,unusedSprites,border;if(!(chart&&store&&surface)){return}
me.sprites=sprites=me.sprites||[];items=store.getData().items;ln=items.length;for(i=0;i<ln;i++){item=items[i];itemSprite=sprites[i];if(itemSprite){me.updateSprite(itemSprite,item)}else{itemSprite=me.createSprite(surface,item);surface.add(itemSprite);sprites.push(itemSprite)}}
unusedSprites=Ext.Array.splice(sprites,i,sprites.length);for(i=0,ln=unusedSprites.length;i<ln;i++){itemSprite=unusedSprites[i];itemSprite.destroy()}
border=me.getBorder();if(border){me.borderSprite=border}
me.updateTheme(chart.getTheme())},updateSprite:function(sprite,record){var data=record.data,chart=this.getChart(),series=chart.get(data.series),marker,label,markerConfig;if(sprite){label=sprite.getLabel();label.setAttributes({text:data.name});sprite.setAttributes({enabled:!data.disabled});sprite.setConfig({series:data.series,record:record});markerConfig=series.getMarkerStyleByIndex(data.index);markerConfig.fillStyle=data.mark;markerConfig.hidden=!1;Ext.apply(markerConfig,this.getMarker());marker=sprite.getMarker();marker.setAttributes({fillStyle:markerConfig.fillStyle,strokeStyle:markerConfig.strokeStyle});sprite.layoutUpdater(sprite.attr)}},updateChart:function(newChart,oldChart){var me=this;if(oldChart){me.setSurface(null)}
if(newChart){me.setSurface(newChart.getSurface('legend'))}},updateSurface:function(surface,oldSurface){if(oldSurface){oldSurface.el.un('click','onClick',this);oldSurface.removeAll(!0)}
if(surface){surface.isLegendSurface=!0;surface.el.on('click','onClick',this)}},onClick:function(event){var chart=this.getChart(),surface=this.getSurface(),result,point;if(chart&&chart.hasFirstLayout&&surface){point=surface.getEventXY(event);result=surface.hitTest(point);if(result&&result.sprite){this.toggleItem(result.sprite)}}},applyBackground:function(newBackground,oldBackground){var me=this,chart=me.getChart(),surface=me.getSurface(),background;background=chart.refreshBackground(surface,newBackground,oldBackground);if(background){background.setAttributes({zIndex:me.spriteZIndexes.background})}
return background},resizeBackground:function(surface,background){var width=background.attr.width,height=background.attr.height,surfaceRect=surface.getRect();if(surfaceRect&&(width!==surfaceRect[2]||height!==surfaceRect[3])){background.setAttributes({width:surfaceRect[2],height:surfaceRect[3]})}},themeableConfigs:{background:!0},updateTheme:function(theme){var me=this,surface=me.getSurface(),sprites=surface.getItems(),legendTheme=theme.getLegend(),labelConfig=me.getLabel(),configs=me.self.getConfigurator().configs,themeableConfigs=me.themeableConfigs,themeOnlyIfConfigured=me.themeOnlyIfConfigured,initialConfig=me.getInitialConfig(),defaultConfig=me.defaultConfig,value,cfg,isObjValue,isUnusedConfig,initialValue,sprite,style,labelSprite,key,attr,i,ln;for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];if(sprite.isLegendItem){style=legendTheme.label;if(style){attr=null;for(key in style){if(!(key in labelConfig)){attr=attr||{};attr[key]=style[key]}}
if(attr){labelSprite=sprite.getLabel();labelSprite.setAttributes(attr)}}
continue}else if(sprite.isLegendBorder){style=legendTheme.border}else{continue}
if(style){attr={};for(key in style){if(!(key in sprite.config)){attr[key]=style[key]}}
sprite.setAttributes(attr)}}
value=legendTheme.background;cfg=configs.background;if(value!==null&&value!==undefined&&cfg){}
for(key in legendTheme){if(!(key in themeableConfigs)){continue}
value=legendTheme[key];cfg=configs[key];if(value!==null&&value!==undefined&&cfg){initialValue=initialConfig[key];isObjValue=Ext.isObject(value);isUnusedConfig=initialValue===defaultConfig[key];if(isObjValue){if(isUnusedConfig&&themeOnlyIfConfigured[key]){continue}
value=Ext.merge({},value,initialValue)}
if(isUnusedConfig||isObjValue){me[cfg.names.set](value)}}}},onDataChanged:function(store){this.updateSprites();this.scheduleLayout()},onDataUpdate:function(store,record){var me=this,sprites=me.sprites,ln=sprites.length,i=0,sprite,spriteRecord,match;for(;i<ln;i++){sprite=sprites[i];spriteRecord=sprite.getRecord();if(spriteRecord===record){match=sprite;break}}
if(match){me.updateSprite(match,record);me.scheduleLayout()}},toggleItem:function(sprite){var disabledCount=0,canToggle=!0,store,i,count,record,disabled;if(!this.getToggleable()||!sprite.isLegendItem){return}
store=this.getStore();if(store){count=store.getCount();for(i=0;i<count;i++){record=store.getAt(i);if(record.get('disabled')){disabledCount++}}
canToggle=count-disabledCount>1;record=sprite.getRecord();if(record){disabled=record.get('disabled');if(disabled||canToggle){record.set('disabled',!disabled);sprite.setAttributes({enabled:disabled})}}}},destroy:function(){var me=this;me.destroying=!0;me.cancelLayout();me.setChart(null);me.callParent()}})
;
Ext.define('Ext.chart.Caption',{mixins:['Ext.mixin.Observable','Ext.mixin.Bindable'],isCaption:!0,config:{weight:0,text:'',align:'center',alignTo:'series',padding:0,hidden:!1,docked:'top',style:{fontSize:'14px',fontWeight:'bold',fontFamily:'Verdana, Aria, sans-serif'},chart:null,sprite:{type:'text',preciseMeasurement:!0,zIndex:10},debug:!1,rect:null},surfaceName:'caption',constructor:function(config){var me=this,id;if('id' in config){id=config.id}else if('id' in me.config){id=me.config.id}else{id=me.getId()}
me.setId(id);me.mixins.observable.constructor.call(me,config);me.initBindable()},updateChart:function(){if(!this.isConfiguring){this.setSprite({type:'text'})}},applySprite:function(sprite){var me=this,chart=me.getChart(),surface=me.surface=chart.getSurface(me.surfaceName);me.rectSprite=surface.add({type:'rect',fillStyle:'yellow',strokeStyle:'red'});return sprite&&surface.add(sprite)},updateSprite:function(sprite,oldSprite){if(oldSprite){oldSprite.destroy()}},updateText:function(text){this.getSprite().setAttributes({text:text})},updateStyle:function(style){this.getSprite().setAttributes(style)},updateDebug:function(debug){var me=this,sprite=me.getSprite();if(debug&&!me.rectSprite){me.rectSprite=me.surface.add({type:'rect',fillStyle:'yellow',strokeStyle:'red'})}
if(sprite){sprite.setAttributes({debug:debug?{bbox:!0}:null})}
if(me.rectSprite){me.rectSprite.setAttributes({hidden:!debug})}
if(!me.isConfiguring){me.surface.renderFrame()}},updateRect:function(rect){if(this.rectSprite){this.rectSprite.setAttributes({x:rect[0],y:rect[1],width:rect[2],height:rect[3]})}},updateDocked:function(){var chart=this.getChart();if(chart&&!this.isConfiguring){chart.scheduleLayout()}},computeRect:function(chartRect,shrinkRect){if(this.getHidden()){return null}
var rect=[0,0,chartRect[2],0],docked=this.getDocked(),padding=this.getPadding(),textSize=this.getSprite().getBBox(),height=textSize.height+padding*2;switch(docked){case 'top':rect[1]=shrinkRect.top;rect[3]=height;chartRect[1]+=height;chartRect[3]-=height;shrinkRect.top+=height;break;case 'bottom':chartRect[3]-=height;shrinkRect.bottom-=height;rect[1]=shrinkRect.bottom;rect[3]=height;break}
this.setRect(rect)},alignRect:function(seriesRect){var surfaceRect=this.surface.getRect(),rect=this.getRect();rect[0]=seriesRect[0]-surfaceRect[0];rect[2]=seriesRect[2];this.setRect(rect.slice())},performLayout:function(){var me=this,rect=me.getRect(),x=rect[0],y=rect[1],width=rect[2],height=rect[3],sprite=me.getSprite(),tx=sprite.attr.translationX,ty=sprite.attr.translationY,bbox=sprite.getBBox(),align=me.getAlign(),dx,dy;switch(align){case 'left':dx=x-bbox.x;break;case 'right':dx=(x+width)-(bbox.x+bbox.width);break;case 'center':dx=x+(width-bbox.width)/2-bbox.x;break}
dy=y+(height-bbox.height)/2-bbox.y;sprite.setAttributes({translationX:tx+dx,translationY:ty+dy})},destroy:function(){var me=this;if(me.rectSprite){me.rectSprite.destroy()}
me.getSprite().destroy();me.callParent()}})
;
Ext.define('Ext.chart.legend.store.Item',{extend:'Ext.data.Model',fields:['id','name','mark','disabled','series','index']})
;
Ext.define('Ext.chart.legend.store.Store',{extend:'Ext.data.Store',requires:['Ext.chart.legend.store.Item'],model:'Ext.chart.legend.store.Item',isLegendStore:!0,config:{autoDestroy:!0}})
;
Ext.define('Ext.chart.AbstractChart',{extend:'Ext.draw.Container',requires:['Ext.chart.theme.Default','Ext.chart.series.Series','Ext.chart.interactions.Abstract','Ext.chart.axis.Axis','Ext.chart.Util','Ext.data.StoreManager','Ext.chart.legend.Legend','Ext.chart.legend.SpriteLegend','Ext.chart.Caption','Ext.chart.legend.store.Store','Ext.data.Store'],isChart:!0,defaultBindProperty:'store',config:{store:'ext-empty-store',theme:'default',captions:null,style:null,animation:!Ext.isIE8,series:[],axes:[],legend:null,colors:null,insetPadding:{top:10,left:10,right:10,bottom:10},background:null,interactions:[],mainRect:null,resizeHandler:null,highlightItem:null,surfaceZIndexes:{background:0,main:1,grid:2,series:3,axis:4,chart:5,caption:6,overlay:7,legend:8}},legendStore:null,animationSuspendCount:0,chartLayoutSuspendCount:0,chartLayoutCount:0,scheduledLayoutId:null,axisThicknessSuspendCount:0,isThicknessChanged:!1,constructor:function(config){var me=this;me.itemListeners={};me.surfaceMap={};me.chartComponents={};me.isInitializing=!0;me.suspendChartLayout();me.animationSuspendCount++;me.callParent(arguments);me.isInitializing=!1;me.getSurface('main');me.getSurface('chart').setFlipRtlText(me.getInherited().rtl);me.getSurface('overlay').waitFor(me.getSurface('series'));me.animationSuspendCount--;me.resumeChartLayout()},applyAnimation:function(animation,oldAnimation){return Ext.chart.Util.applyAnimation(animation,oldAnimation)},updateAnimation:function(){if(this.isConfiguring){return}
var seriesList=this.getSeries(),ln=seriesList.length,i,series;this.isSettingSeriesAnimation=!0;for(i=0;i<ln;i++){series=seriesList[i];if(!series.isUserAnimation||this.animationSuspendCount){series.setAnimation(series.getAnimation())}}
this.isSettingSeriesAnimation=!1},getAnimation:function(){var result;if(this.animationSuspendCount){result={duration:0}}else{result=this.callParent()}
return result},suspendAnimation:function(){this.animationSuspendCount++;if(this.animationSuspendCount===1){this.updateAnimation()}},resumeAnimation:function(){this.animationSuspendCount--;if(this.animationSuspendCount===0){this.updateAnimation()}},applyInsetPadding:function(padding,oldPadding){var result;if(!Ext.isObject(padding)){result=Ext.util.Format.parseBox(padding)}else if(!oldPadding){result=padding}else{result=Ext.apply(oldPadding,padding)}
return result},suspendChartLayout:function(){var me=this;me.chartLayoutSuspendCount++;if(me.chartLayoutSuspendCount===1){if(me.scheduledLayoutId){me.layoutInSuspension=!0;me.cancelChartLayout()}else{me.layoutInSuspension=!1}}},resumeChartLayout:function(){var me=this;me.chartLayoutSuspendCount--;if(me.chartLayoutSuspendCount===0){if(me.layoutInSuspension){me.scheduleLayout()}}},cancelChartLayout:function(){if(this.scheduledLayoutId){Ext.draw.Animator.cancel(this.scheduledLayoutId);this.scheduledLayoutId=null;this.checkLayoutEnd()}},scheduleLayout:function(){var me=this;if(me.allowSchedule()&&!me.scheduledLayoutId){me.scheduledLayoutId=Ext.draw.Animator.schedule('doScheduleLayout',me)}},allowSchedule:function(){return!0},doScheduleLayout:function(){var me=this;me.scheduledLayoutId=null;if(me.chartLayoutSuspendCount){me.layoutInSuspension=!0}else{me.performLayout()}},suspendThicknessChanged:function(){this.axisThicknessSuspendCount++},resumeThicknessChanged:function(){if(this.axisThicknessSuspendCount>0){this.axisThicknessSuspendCount--;if(this.axisThicknessSuspendCount===0&&this.isThicknessChanged){this.onThicknessChanged()}}},onThicknessChanged:function(){if(this.axisThicknessSuspendCount===0){this.isThicknessChanged=!1;this.performLayout()}else{this.isThicknessChanged=!0}},applySprites:function(sprites){var surface=this.getSurface('chart');sprites=Ext.Array.from(sprites);surface.removeAll(!0);surface.add(sprites);return sprites},initItems:function(){var items=this.items,i,ln,item;if(items&&!items.isMixedCollection){this.items=[];items=Ext.Array.from(items);for(i=0,ln=items.length;i<ln;i++){item=items[i];if(item.type){Ext.raise("To add custom sprites to the chart use the 'sprites' config.")}else{this.items.push(item)}}}
this.callParent()},applyBackground:function(newBackground,oldBackground){var surface=this.getSurface('background');return this.refreshBackground(surface,newBackground,oldBackground)},refreshBackground:function(surface,newBackground,oldBackground){var width,height,isUpdateOld;if(newBackground){if(oldBackground){width=oldBackground.attr.width;height=oldBackground.attr.height;isUpdateOld=oldBackground.type===(newBackground.type||'rect')}
if(newBackground.isSprite){oldBackground=newBackground}else if(newBackground.type==='image'&&Ext.isString(newBackground.src)){if(isUpdateOld){oldBackground.setAttributes({src:newBackground.src})}else{surface.remove(oldBackground,!0);oldBackground=surface.add(newBackground)}}else{if(isUpdateOld){oldBackground.setAttributes({fillStyle:newBackground})}else{surface.remove(oldBackground,!0);oldBackground=surface.add({type:'rect',fillStyle:newBackground,animation:{customDurations:{x:0,y:0,width:0,height:0}}})}}}
if(width&&height){oldBackground.setAttributes({width:width,height:height})}
oldBackground.setAnimation(this.getAnimation());return oldBackground},defaultResizeHandler:function(size){this.scheduleLayout();return!1},applyMainRect:function(newRect,rect){if(!rect){return newRect}
this.getSeries();this.getAxes();if(newRect[0]===rect[0]&&newRect[1]===rect[1]&&newRect[2]===rect[2]&&newRect[3]===rect[3]){return rect}else{return newRect}},register:function(component){var map=this.chartComponents,id=component.getId();if(id===undefined){Ext.raise('Chart component id is undefined. '+'Please ensure the component has an id.')}
if(id in map){Ext.raise('Registering duplicate chart component id "'+id+'"')}
map[id]=component},unregister:function(component){var map=this.chartComponents,id=component.getId();delete map[id]},get:function(id){return this.chartComponents[id]},getAxis:function(axis){if(axis instanceof Ext.chart.axis.Axis){return axis}else if(Ext.isNumber(axis)){return this.getAxes()[axis]}else if(Ext.isString(axis)){return this.get(axis)}},getSurface:function(id,type){var me=this,map=me.surfaceMap,surface;id=id||'main';type=type||id;surface=this.callParent([id,type]);if(!map[type]){map[type]=[]}
if(Ext.Array.indexOf(map[type],surface)<0){surface.type=type;map[type].push(surface);surface.on('destroy',me.forgetSurface,me)}
return surface},forgetSurface:function(surface){var map=this.surfaceMap,group,index;if(!map||this.destroying){return}
group=map[surface.type];index=group?Ext.Array.indexOf(group,surface):-1;if(index>=0){group.splice(index,1)}},applyAxes:function(newAxes,oldAxes){var me=this,positions={left:'right',right:'left'},result=[],axis,oldAxis,linkedTo,id,oldMap,series,i,j,ln;me.animationSuspendCount++;me.getStore();if(!oldAxes){oldAxes=[];oldAxes.map={}}
oldMap=oldAxes.map;result.map={};newAxes=Ext.Array.from(newAxes,!0);for(i=0,ln=newAxes.length;i<ln;i++){axis=newAxes[i];if(!axis){continue}
if(axis instanceof Ext.chart.axis.Axis){oldAxis=oldMap[axis.getId()];axis.setChart(me)}else{axis=Ext.Object.chain(axis);linkedTo=axis.linkedTo;id=axis.id;if(Ext.isNumber(linkedTo)){axis=Ext.merge({},newAxes[linkedTo],axis)}else if(Ext.isString(linkedTo)){Ext.Array.each(newAxes,function(item){if(item.id===axis.linkedTo){axis=Ext.merge({},item,axis);return!1}})}
axis.id=id;axis.chart=me;if(me.getInherited().rtl){axis.position=positions[axis.position]||axis.position}
id=axis.getId&&axis.getId()||axis.id;axis=Ext.factory(axis,null,oldAxis=oldMap[id],'axis')}
if(axis){result.push(axis);result.map[axis.getId()]=axis}}
me.axesChangeSeries={};for(i in oldMap){if(!result.map[i]){oldAxis=oldMap[i];if(oldAxis&&!oldAxis.destroyed){for(j=0,ln=oldAxis.boundSeries.length;j<ln;j++){series=oldAxis.boundSeries[j];me.axesChangeSeries[series.getId()]=series}
oldAxis.destroy()}}}
me.animationSuspendCount--;return result},updateAxes:function(axes){var me=this,seriesMap=me.axesChangeSeries,series,id,i,ln,axis;for(id in seriesMap){series=seriesMap[id];series.onAxesChange(me,!0)}
for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];axis.onSeriesChange(me)}
if(!me.isConfiguring&&!me.destroying){me.scheduleLayout()}},circularCopyArray:function(inArray,startIndex,count){var outArray=[],i,len=inArray&&inArray.length;if(len){for(i=0;i<count;i++){outArray.push(inArray[(startIndex+i)%len])}}
return outArray},circularCopyObject:function(inObject,startIndex,count){var me=this,name,value,outObject={};if(count){for(name in inObject){if(inObject.hasOwnProperty(name)){value=inObject[name];if(Ext.isArray(value)){outObject[name]=me.circularCopyArray(value,startIndex,count)}else{outObject[name]=value}}}}
return outObject},getColors:function(){var me=this,configColors=me.config.colors,theme=me.getTheme();if(Ext.isArray(configColors)&&configColors.length>0){configColors=me.applyColors(configColors)}
return configColors||(theme&&theme.getColors())},applyColors:function(newColors){newColors=Ext.Array.map(newColors,function(color){if(Ext.isString(color)){return color}else{return color.toString()}});return newColors},updateColors:function(newColors){var me=this,theme=me.getTheme(),colors=newColors||(theme&&theme.getColors()),colorIndex=0,series=me.getSeries(),seriesCount=series&&series.length,i,seriesItem,seriesColors,seriesColorCount;if(colors.length){for(i=0;i<seriesCount;i++){seriesItem=series[i];seriesColorCount=seriesItem.themeColorCount();seriesColors=me.circularCopyArray(colors,colorIndex,seriesColorCount);colorIndex+=seriesColorCount;seriesItem.updateChartColors(seriesColors)}}
if(!me.isConfiguring){me.refreshLegendStore()}},applyTheme:function(theme){if(theme&&theme.isTheme){return theme}
return Ext.Factory.chartTheme(theme)},updateGradients:function(gradients){if(!Ext.isEmpty(gradients)){this.updateTheme(this.getTheme())}},updateTheme:function(theme,oldTheme){var me=this,axes=me.getAxes(),series=me.getSeries(),colors=me.getColors(),i;if(!series){return}
me.updateChartTheme(theme);for(i=0;i<axes.length;i++){axes[i].updateTheme(theme)}
for(i=0;i<series.length;i++){series[i].setTheme(theme)}
me.updateSpriteTheme(theme);me.updateColors(colors);me.redraw();me.fireEvent('themechange',me,theme,oldTheme)},themeOnlyIfConfigured:{captions:!0},updateChartTheme:function(theme){var me=this,chartTheme=theme.getChart(),initialConfig=me.getInitialConfig(),defaultConfig=me.defaultConfig,configs=me.self.getConfigurator().configs,genericChartTheme=chartTheme.defaults,specificChartTheme=chartTheme[me.xtype],themeOnlyIfConfigured=me.themeOnlyIfConfigured,key,value,isObjValue,isUnusedConfig,initialValue,cfg;chartTheme=Ext.merge({},genericChartTheme,specificChartTheme);for(key in chartTheme){value=chartTheme[key];cfg=configs[key];if(value!==null&&value!==undefined&&cfg){initialValue=initialConfig[key];isObjValue=Ext.isObject(value);isUnusedConfig=initialValue===defaultConfig[key];if(isObjValue){if(isUnusedConfig&&themeOnlyIfConfigured[key]){continue}
value=Ext.merge({},value,initialValue)}
if(isUnusedConfig||isObjValue){me[cfg.names.set](value)}}}},updateSpriteTheme:function(theme){var me=this,chartSurface,sprites,styles,sprite,style,key,attr,isText,i,ln;me.getSprites();chartSurface=me.getSurface('chart');sprites=chartSurface.getItems();styles=theme.getSprites();for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];style=styles[sprite.type];if(style){attr={};isText=sprite.type==='text';for(key in style){if(!(key in sprite.config)){if(!(isText&&key.indexOf('font')===0&&sprite.config.font)){attr[key]=style[key]}}}
sprite.setAttributes(attr)}}},addSeries:function(newSeries){var series=this.getSeries();series=series.concat(Ext.Array.from(newSeries));this.setSeries(series)},removeSeries:function(series){var existingSeries=this.getSeries(),newSeries=[],removeMap={},i,len,s;series=Ext.Array.from(series);for(i=0,len=series.length;i<len;i++){s=series[i];if(typeof s!=='string'){s=s.getId()}
removeMap[s]=!0}
for(i=0,len=existingSeries.length;i<len;i++){if(!removeMap[existingSeries[i].getId()]){newSeries.push(existingSeries[i])}}
this.setSeries(newSeries)},applySeries:function(newSeries,oldSeries){var me=this,result=[],oldMap,oldSeriesItem,i,ln,series;me.animationSuspendCount++;me.getAxes();if(oldSeries){oldMap=oldSeries.map}else{oldSeries=[];oldMap=oldSeries.map={}}
result.map={};newSeries=Ext.Array.from(newSeries,!0);for(i=0,ln=newSeries.length;i<ln;i++){series=newSeries[i];if(!series){continue}
oldSeriesItem=oldMap[series.getId&&series.getId()||series.id];if(series instanceof Ext.chart.series.Series){if(oldSeriesItem&&oldSeriesItem!==series){oldSeriesItem.destroy()}
series.setChart(me)}else if(Ext.isObject(series)){if(oldSeriesItem){oldSeriesItem.setConfig(series);series=oldSeriesItem}else{if(Ext.isString(series)){series={type:series}}
series.chart=me;series=Ext.create(series.xclass||('series.'+series.type),series)}}
result.push(series);result.map[series.getId()]=series}
for(i in oldMap){if(!result.map[oldMap[i].id]){oldMap[i].destroy()}}
me.animationSuspendCount--;return result},updateSeries:function(newSeries,oldSeries){var me=this;if(me.destroying){return}
me.animationSuspendCount++;me.fireEvent('serieschange',me,newSeries,oldSeries);if(!Ext.isEmpty(newSeries)){me.updateTheme(me.getTheme())}
me.refreshLegendStore();if(!me.isConfiguring&&!me.destroying){me.scheduleLayout()}
me.animationSuspendCount--},defaultLegendType:'sprite',applyLegend:function(legend,oldLegend){var me=this,result=null,alias;if(oldLegend&&!(oldLegend.destroyed||oldLegend.destroying)){if(me.legendStoreListeners){me.legendStoreListeners.destroy()}
if(me.legendStore){me.legendStore.destroy()}
oldLegend.destroy()}
if(legend){if(Ext.isBoolean(legend)){result=Ext.create('legend.'+me.defaultLegendType,{docked:'bottom',chart:me})}else{legend.docked=legend.docked||'bottom';legend.chart=me;alias='legend.'+(legend.type||me.defaultLegendType);result=Ext.create(alias,legend)}}
return result},updateLegend:function(legend){var me=this;me.destroyLegendStore();if(legend){me.getItems();legend.setStore(me.refreshLegendStore())}
if(!me.isConfiguring){me.scheduleLayout()}},captionApplier:function(caption,oldCaption){var me=this,result;if(oldCaption&&!(oldCaption.destroyed||oldCaption.destroying)){oldCaption.destroy()}
if(caption){caption.chart=me;result=new Ext.chart.Caption(caption)}
return result},applyCaptions:function(captions,oldCaptions){var map={},caption,oldCaption,name,any;for(name in captions){caption=captions[name];if(caption&&!caption.length&&!(caption.text&&caption.text.length)){caption=null}else if(typeof caption==='string'){caption={text:caption};this.getInitialConfig().captions[name]=caption}
oldCaption=oldCaptions&&oldCaptions[name];caption=this.captionApplier(caption,oldCaption);if(caption){any=!0;map[name]=caption}}
return any&&map},updateCaptions:function(){var me=this;if(!me.isConfiguring){me.scheduleLayout()}},getLegendStore:function(){var me=this,store=me.legendStore;if(!store){store=me.legendStore=new Ext.chart.legend.store.Store({chart:me});me.legendStoreListeners=store.on({scope:me,update:'onLegendStoreUpdate',destroyable:!0})}
return store},destroyLegendStore:function(){var store=this.legendStore;if(store&&!(store.destroyed||store.destroying)){store.destroy()}
this.legendStore=null},refreshLegendStore:function(){var me=this,legendStore=me.getLegendStore(),series,seriesList,legendData,i,ln;if(legendStore){seriesList=me.getSeries();legendData=[];for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];if(series.getShowInLegend()){series.provideLegendInfo(legendData)}}
legendStore.setData(legendData)}
return legendStore},onLegendStoreUpdate:function(store,record){var me=this,series;if(record){series=this.getSeries().map[record.get('series')];if(series){series.setHiddenByIndex(record.get('index'),record.get('disabled'));me.redraw()}}},applyInteractions:function(interactions,oldInteractions){var me=this,result=[],oldMap,interaction,i,ln;interactions=Ext.Array.from(interactions,!0);if(!oldInteractions){oldInteractions=[];oldInteractions.map={}}
oldMap=oldInteractions.map;result.map={};for(i=0,ln=interactions.length;i<ln;i++){interaction=interactions[i];if(!interaction){continue}
interaction=Ext.factory(interaction,null,oldMap[interaction.getId&&interaction.getId()||interaction.id],'interaction');if(interaction){interaction.setChart(me);result.push(interaction);result.map[interaction.getId()]=interaction}}
for(i in oldMap){if(!result.map[i]){oldMap[i].destroy()}}
return result},getInteraction:function(type){var interactions=this.getInteractions(),len=interactions&&interactions.length,out=null,interaction,i;if(len){for(i=0;i<len;++i){interaction=interactions[i];if(interaction.type===type){out=interaction;break}}}
return out},applyStore:function(store){return store&&Ext.StoreManager.lookup(store)},updateStore:function(newStore,oldStore){var me=this;if(oldStore&&!oldStore.destroyed){oldStore.un({datachanged:'onDataChanged',update:'onDataChanged',scope:me,order:'after'});if(oldStore.autoDestroy){oldStore.destroy()}}
if(newStore){newStore.on({datachanged:'onDataChanged',update:'onDataChanged',scope:me,order:'after'})}
me.fireEvent('storechange',me,newStore,oldStore);me.onDataChanged()},redraw:function(){this.fireEvent('redraw',this)},performLayout:function(){if(this.destroying||this.destroyed){Ext.raise('Attempting to lay out a dead chart: '+this.getId());return!1}
var me=this,legend=me.getLegend(),chartRect=me.getChartRect(!0),background=me.getBackground(),result=!0,legendRect;me.cancelChartLayout();me.fireEvent('beforelayout',me);if(background){me.getSurface('background').setRect(chartRect.slice());background.setAttributes({width:chartRect[2],height:chartRect[3]})}
if(legend&&legend.isSpriteLegend&&!legend.isTop){legendRect=legend.computeRect(chartRect)}
me.layoutCaptions(chartRect);if(legend&&legend.isSpriteLegend&&legend.isTop){legendRect=legend.computeRect(chartRect)}
if(legendRect){me.getSurface('legend').setRect(legendRect);result=legend.performLayout()}
me.getSurface('chart').setRect(chartRect);if(result){me.hasFirstLayout=!0}
return result},layoutCaptions:function(chartRect){var captions=this.getCaptions(),shrinkRect={left:0,top:0,right:chartRect[2],bottom:chartRect[3]},caption,captionName,captionList,i,ln;if(captions){captionList=[];for(captionName in captions){captionList.push(captions[captionName])}
captionList.sort(function(a,b){return a.getWeight()-b.getWeight()});for(i=0,ln=captionList.length;i<ln;i++){caption=captionList[i];if(!i){this.getSurface(caption.surfaceName).setRect(chartRect.slice())}
caption.computeRect(chartRect,shrinkRect)}
this.captionList=captionList}},checkLayoutEnd:function(){if(!this.chartLayoutCount&&!this.scheduledLayoutId){this.onLayoutEnd()}},onLayoutEnd:function(){var me=this;me.fireEvent('layout',me)},getChartRect:function(isRecompute){var me=this,chartRect,bodySize;if(isRecompute){me.chartRect=null}
if(me.chartRect){chartRect=me.chartRect}else{bodySize=me.bodyElement.getSize();chartRect=me.chartRect=[0,0,bodySize.width,bodySize.height]}
return chartRect},getEventXY:function(e){return this.getSurface('series').getEventXY(e)},getItemForPoint:function(x,y){var me=this,seriesList=me.getSeries(),rect=me.getMainRect(),ln=seriesList.length,minDistance=Infinity,result=null,i,item;if(!(me.hasFirstLayout&&rect&&x>=0&&x<=rect[2]&&y>=0&&y<=rect[3])){return null}
for(i=ln-1;i>=0;i--){item=seriesList[i].getItemForPoint(x,y);if(item){if(!item.distance){result=item;break}
if(item.distance<minDistance){minDistance=item.distance;result=item}}}
return result},getItemsForPoint:function(x,y){var me=this,seriesList=me.getSeries(),ln=seriesList.length,i=me.hasFirstLayout?ln-1:-1,items=[],series,item;for(;i>=0;i--){series=seriesList[i];item=series.getItemForPoint(x,y);if(item&&(item.category==='items'||item.category==='markers')){items.push(item)}}
return items},onDataChanged:function(){var me=this,rect,store,series,axes;if(me.isInitializing){return}
rect=me.getMainRect();store=me.getStore();series=me.getSeries();axes=me.getAxes();if(!store||!axes||!series){return}
if(!rect){me.on({redraw:me.onDataChanged,scope:me,single:!0});return}
me.processData();me.redraw()},recordCount:0,processData:function(){var me=this,recordCount=me.getStore().getCount(),seriesList=me.getSeries(),ln=seriesList.length,isNeedUpdateColors=!1,i=0,series;for(;i<ln;i++){series=seriesList[i];series.processData();if(!isNeedUpdateColors&&series.isStoreDependantColorCount){isNeedUpdateColors=!0}}
if(isNeedUpdateColors&&recordCount>me.recordCount){me.updateColors(me.getColors());me.recordCount=recordCount}
if(!me.isConfiguring){me.refreshLegendStore()}},bindStore:function(store){this.setStore(store)},applyHighlightItem:function(newHighlightItem,oldHighlightItem){var i1,i2,s1,s2;if(newHighlightItem===oldHighlightItem){return}
if(Ext.isObject(newHighlightItem)&&Ext.isObject(oldHighlightItem)){i1=newHighlightItem;i2=oldHighlightItem;s1=i1.sprite&&(i1.sprite[0]||i1.sprite);s2=i2.sprite&&(i2.sprite[0]||i2.sprite);if(s1===s2&&i1.index===i2.index){return}}
return newHighlightItem},updateHighlightItem:function(newHighlightItem,oldHighlightItem){var newHighlight,oldHighlight;if(oldHighlightItem){oldHighlight=oldHighlightItem.series.getHighlight();if(oldHighlight){oldHighlightItem.series.setAttributesForItem(oldHighlightItem,{highlighted:!1})}}
if(newHighlightItem){newHighlight=newHighlightItem.series.getHighlight();if(newHighlight){newHighlightItem.series.setAttributesForItem(newHighlightItem,{highlighted:!0})}}
if(oldHighlight||newHighlight){this.fireEvent('itemhighlight',this,newHighlightItem,oldHighlightItem)}},destroyChart:function(){var me=this;me.setInteractions(null);me.setAxes(null);me.setSeries(null);me.setLegend(null);me.setStore(null);me.cancelChartLayout()},getRefItems:function(deep){var me=this,series=me.getSeries(),axes=me.getAxes(),interaction=me.getInteractions(),legend=me.getLegend(),ans=[],i,ln;for(i=0,ln=series.length;i<ln;i++){ans.push(series[i]);if(series[i].getRefItems){ans.push.apply(ans,series[i].getRefItems(deep))}}
for(i=0,ln=axes.length;i<ln;i++){ans.push(axes[i]);if(axes[i].getRefItems){ans.push.apply(ans,axes[i].getRefItems(deep))}}
for(i=0,ln=interaction.length;i<ln;i++){ans.push(interaction[i]);if(interaction[i].getRefItems){ans.push.apply(ans,interaction[i].getRefItems(deep))}}
if(legend){ans.push(legend)}
return ans}})
;
Ext.define('Ext.chart.overrides.AbstractChart',{override:'Ext.chart.AbstractChart',updateLegend:function(legend,oldLegend){this.callParent([legend,oldLegend]);if(legend&&legend.isDomLegend){this.addDocked(legend)}},performLayout:function(){if(this.isVisible(!0)){return this.callParent()}
this.cancelChartLayout();return!1},afterComponentLayout:function(width,height,oldWidth,oldHeight){this.callParent([width,height,oldWidth,oldHeight]);if(!this.hasFirstLayout){this.scheduleLayout()}},allowSchedule:function(){return this.rendered},doDestroy:function(){this.destroyChart();this.callParent()}})
;
Ext.define('Ext.chart.grid.HorizontalGrid',{extend:'Ext.draw.sprite.Sprite',alias:'grid.horizontal',inheritableStatics:{def:{processors:{x:'number',y:'number',width:'number',height:'number'},defaults:{x:0,y:0,width:1,height:1,strokeStyle:'#DDD'}}},render:function(surface,ctx,rect){var attr=this.attr,y=surface.roundPixel(attr.y),halfLineWidth=ctx.lineWidth*0.5;ctx.beginPath();ctx.rect(rect[0]-surface.matrix.getDX(),y+halfLineWidth,+rect[2],attr.height);ctx.fill();ctx.beginPath();ctx.moveTo(rect[0]-surface.matrix.getDX(),y+halfLineWidth);ctx.lineTo(rect[0]+rect[2]-surface.matrix.getDX(),y+halfLineWidth);ctx.stroke()}})
;
Ext.define('Ext.chart.grid.VerticalGrid',{extend:'Ext.draw.sprite.Sprite',alias:'grid.vertical',inheritableStatics:{def:{processors:{x:'number',y:'number',width:'number',height:'number'},defaults:{x:0,y:0,width:1,height:1,strokeStyle:'#DDD'}}},render:function(surface,ctx,rect){var attr=this.attr,x=surface.roundPixel(attr.x),halfLineWidth=ctx.lineWidth*0.5;ctx.beginPath();ctx.rect(x-halfLineWidth,rect[1]-surface.matrix.getDY(),attr.width,rect[3]);ctx.fill();ctx.beginPath();ctx.moveTo(x-halfLineWidth,rect[1]-surface.matrix.getDY());ctx.lineTo(x-halfLineWidth,rect[1]+rect[3]-surface.matrix.getDY());ctx.stroke()}})
;
Ext.define('Ext.chart.CartesianChart',{extend:'Ext.chart.AbstractChart',alternateClassName:'Ext.chart.Chart',requires:['Ext.chart.grid.HorizontalGrid','Ext.chart.grid.VerticalGrid'],xtype:['cartesian','chart'],isCartesian:!0,config:{flipXY:!1,innerRect:[0,0,1,1],innerPadding:{top:0,left:0,right:0,bottom:0}},applyInnerPadding:function(padding,oldPadding){if(!Ext.isObject(padding)){return Ext.util.Format.parseBox(padding)}else if(!oldPadding){return padding}else{return Ext.apply(oldPadding,padding)}},getDirectionForAxis:function(position){var flipXY=this.getFlipXY(),direction;if(position==='left'||position==='right'){direction=flipXY?'X':'Y'}else{direction=flipXY?'Y':'X'}
return direction},performLayout:function(){var me=this;if(me.callParent()===!1){return}
me.chartLayoutCount++;me.suspendAnimation();var chartRect=me.getSurface('chart').getRect(),left=chartRect[0],top=chartRect[1],width=chartRect[2],height=chartRect[3],captionList=me.captionList,axes=me.getAxes(),axis,seriesList=me.getSeries(),series,axisSurface,thickness,insetPadding=me.getInsetPadding(),innerPadding=me.getInnerPadding(),surface,gridSurface,shrinkBox=Ext.apply({},insetPadding),mainRect,innerWidth,innerHeight,elements,floating,floatingValue,matrix,i,ln,isRtl=me.getInherited().rtl,flipXY=me.getFlipXY(),caption;if(width<=0||height<=0){return}
me.suspendThicknessChanged();for(i=0;i<axes.length;i++){axis=axes[i];axisSurface=axis.getSurface();floating=axis.getFloating();floatingValue=floating?floating.value:null;thickness=axis.getThickness();switch(axis.getPosition()){case 'top':axisSurface.setRect([left,top+shrinkBox.top+1,width,thickness]);break;case 'bottom':axisSurface.setRect([left,top+height-(shrinkBox.bottom+thickness),width,thickness]);break;case 'left':axisSurface.setRect([left+shrinkBox.left,top,thickness,height]);break;case 'right':axisSurface.setRect([left+width-(shrinkBox.right+thickness),top,thickness,height]);break}
if(floatingValue===null){shrinkBox[axis.getPosition()]+=thickness}}
width-=shrinkBox.left+shrinkBox.right;height-=shrinkBox.top+shrinkBox.bottom;mainRect=[left+shrinkBox.left,top+shrinkBox.top,width,height];shrinkBox.left+=innerPadding.left;shrinkBox.top+=innerPadding.top;shrinkBox.right+=innerPadding.right;shrinkBox.bottom+=innerPadding.bottom;innerWidth=width-innerPadding.left-innerPadding.right;innerHeight=height-innerPadding.top-innerPadding.bottom;me.setInnerRect([shrinkBox.left,shrinkBox.top,innerWidth,innerHeight]);if(innerWidth<=0||innerHeight<=0){return}
me.setMainRect(mainRect);me.getSurface().setRect(mainRect);for(i=0,ln=me.surfaceMap.grid&&me.surfaceMap.grid.length;i<ln;i++){gridSurface=me.surfaceMap.grid[i];gridSurface.setRect(mainRect);gridSurface.matrix.set(1,0,0,1,innerPadding.left,innerPadding.top);gridSurface.matrix.inverse(gridSurface.inverseMatrix)}
for(i=0;i<axes.length;i++){axis=axes[i];axis.getRange(!0);axisSurface=axis.getSurface();matrix=axisSurface.matrix;elements=matrix.elements;switch(axis.getPosition()){case 'top':case 'bottom':elements[4]=shrinkBox.left;axis.setLength(innerWidth);break;case 'left':case 'right':elements[5]=shrinkBox.top;axis.setLength(innerHeight);break}
axis.updateTitleSprite();matrix.inverse(axisSurface.inverseMatrix)}
for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];surface=series.getSurface();surface.setRect(mainRect);if(flipXY){if(isRtl){surface.matrix.set(0,-1,-1,0,innerPadding.left+innerWidth,innerPadding.top+innerHeight)}else{surface.matrix.set(0,-1,1,0,innerPadding.left,innerPadding.top+innerHeight)}}else{surface.matrix.set(1,0,0,-1,innerPadding.left,innerPadding.top+innerHeight)}
surface.matrix.inverse(surface.inverseMatrix);series.getOverlaySurface().setRect(mainRect)}
if(captionList){for(i=0,ln=captionList.length;i<ln;i++){caption=captionList[i];if(caption.getAlignTo()==='series'){caption.alignRect(mainRect)}
caption.performLayout()}}
me.afterChartLayout();me.redraw();me.resumeAnimation();me.resumeThicknessChanged();me.chartLayoutCount--;me.checkLayoutEnd()},afterChartLayout:Ext.emptyFn,refloatAxes:function(){var me=this,axes=me.getAxes(),axesCount=(axes&&axes.length)||0,axis,axisSurface,axisRect,floating,value,alongAxis,matrix,chartRect=me.getChartRect(),inset=me.getInsetPadding(),inner=me.getInnerPadding(),width=chartRect[2]-inset.left-inset.right,height=chartRect[3]-inset.top-inset.bottom,isHorizontal,i;for(i=0;i<axesCount;i++){axis=axes[i];floating=axis.getFloating();value=floating?floating.value:null;if(value===null){axis.floatingAtCoord=null;continue}
axisSurface=axis.getSurface();axisRect=axisSurface.getRect();if(!axisRect){continue}
axisRect=axisRect.slice();alongAxis=me.getAxis(floating.alongAxis);if(alongAxis){isHorizontal=alongAxis.getAlignment()==='horizontal';if(Ext.isString(value)){value=alongAxis.getCoordFor(value)}
alongAxis.floatingAxes[axis.getId()]=value;matrix=alongAxis.getSprites()[0].attr.matrix;if(isHorizontal){value=value*matrix.getXX()+matrix.getDX();axis.floatingAtCoord=value+inner.left+inner.right}else{value=value*matrix.getYY()+matrix.getDY();axis.floatingAtCoord=value+inner.top+inner.bottom}}else{isHorizontal=axis.getAlignment()==='horizontal';if(isHorizontal){axis.floatingAtCoord=value+inner.top+inner.bottom}else{axis.floatingAtCoord=value+inner.left+inner.right}
value=axisSurface.roundPixel(0.01*value*(isHorizontal?height:width))}
switch(axis.getPosition()){case 'top':axisRect[1]=inset.top+inner.top+value-axisRect[3]+1;break;case 'bottom':axisRect[1]=inset.top+inner.top+(alongAxis?value:height-value);break;case 'left':axisRect[0]=inset.left+inner.left+value-axisRect[2];break;case 'right':axisRect[0]=inset.left+inner.left+(alongAxis?value:width-value)-1;break}
axisSurface.setRect(axisRect)}},redraw:function(){var me=this,seriesList=me.getSeries(),axes=me.getAxes(),rect=me.getMainRect(),innerWidth,innerHeight,innerPadding=me.getInnerPadding(),sprites,xRange,yRange,isSide,attr,i,j,ln,axis,axisX,axisY,range,visibleRange,flipXY=me.getFlipXY(),zBase=1000,zIndex,markersZIndex,series,sprite,markers;if(!rect){return}
innerWidth=rect[2]-innerPadding.left-innerPadding.right;innerHeight=rect[3]-innerPadding.top-innerPadding.bottom;for(i=0;i<seriesList.length;i++){series=seriesList[i];axisX=series.getXAxis();if(axisX){visibleRange=axisX.getVisibleRange();xRange=axisX.getRange();xRange=[xRange[0]+(xRange[1]-xRange[0])*visibleRange[0],xRange[0]+(xRange[1]-xRange[0])*visibleRange[1]]}else{xRange=series.getXRange()}
axisY=series.getYAxis();if(axisY){visibleRange=axisY.getVisibleRange();yRange=axisY.getRange();yRange=[yRange[0]+(yRange[1]-yRange[0])*visibleRange[0],yRange[0]+(yRange[1]-yRange[0])*visibleRange[1]]}else{yRange=series.getYRange()}
attr={visibleMinX:xRange[0],visibleMaxX:xRange[1],visibleMinY:yRange[0],visibleMaxY:yRange[1],innerWidth:innerWidth,innerHeight:innerHeight,flipXY:flipXY};sprites=series.getSprites();for(j=0,ln=sprites.length;j<ln;j++){sprite=sprites[j];zIndex=sprite.attr.zIndex;if(zIndex<zBase){zIndex+=(i+1)*100+zBase;sprite.attr.zIndex=zIndex;markers=sprite.getMarker('items');if(markers){markersZIndex=markers.attr.zIndex;if(markersZIndex===Number.MAX_VALUE){markers.attr.zIndex=zIndex}else if(markersZIndex<zBase){markers.attr.zIndex=zIndex+markersZIndex}}}
sprite.setAttributes(attr,!0)}}
for(i=0;i<axes.length;i++){axis=axes[i];isSide=axis.isSide();sprites=axis.getSprites();range=axis.getRange();visibleRange=axis.getVisibleRange();attr={dataMin:range[0],dataMax:range[1],visibleMin:visibleRange[0],visibleMax:visibleRange[1]};if(isSide){attr.length=innerHeight;attr.startGap=innerPadding.bottom;attr.endGap=innerPadding.top}else{attr.length=innerWidth;attr.startGap=innerPadding.left;attr.endGap=innerPadding.right}
for(j=0,ln=sprites.length;j<ln;j++){sprites[j].setAttributes(attr,!0)}}
me.renderFrame();me.callParent()},renderFrame:function(){this.refloatAxes();this.callParent()}})
;
Ext.define('Ext.chart.grid.CircularGrid',{extend:'Ext.draw.sprite.Circle',alias:'grid.circular',inheritableStatics:{def:{defaults:{r:1,strokeStyle:'#DDD'}}}})
;
Ext.define('Ext.chart.grid.RadialGrid',{extend:'Ext.draw.sprite.Path',alias:'grid.radial',inheritableStatics:{def:{processors:{startRadius:'number',endRadius:'number'},defaults:{startRadius:0,endRadius:1,scalingCenterX:0,scalingCenterY:0,strokeStyle:'#DDD'},triggers:{startRadius:'path,bbox',endRadius:'path,bbox'}}},render:function(){this.callParent(arguments)},updatePath:function(path,attr){var startRadius=attr.startRadius,endRadius=attr.endRadius;path.moveTo(startRadius,0);path.lineTo(endRadius,0)}})
;
Ext.define('Ext.chart.PolarChart',{extend:'Ext.chart.AbstractChart',requires:['Ext.chart.grid.CircularGrid','Ext.chart.grid.RadialGrid'],xtype:'polar',isPolar:!0,config:{center:[0,0],radius:0,innerPadding:0},getDirectionForAxis:function(position){return position==='radial'?'Y':'X'},updateCenter:function(center){var me=this,axes=me.getAxes(),series=me.getSeries(),i,ln,axis,seriesItem;for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];axis.setCenter(center)}
for(i=0,ln=series.length;i<ln;i++){seriesItem=series[i];seriesItem.setCenter(center)}},applyInnerPadding:function(padding,oldPadding){return Ext.isNumber(padding)?padding:oldPadding},updateInnerPadding:function(){if(!this.isConfiguring){this.performLayout()}},doSetSurfaceRect:function(surface,rect){var mainRect=this.getMainRect();surface.setRect(rect);surface.matrix.set(1,0,0,1,mainRect[0]-rect[0],mainRect[1]-rect[1]);surface.inverseMatrix.set(1,0,0,1,rect[0]-mainRect[0],rect[1]-mainRect[1])},applyAxes:function(newAxes,oldAxes){var me=this,firstSeries=Ext.Array.from(me.config.series)[0],i,ln,axis,foundAngular;if(firstSeries&&firstSeries.type==='radar'&&newAxes&&newAxes.length){for(i=0,ln=newAxes.length;i<ln;i++){axis=newAxes[i];if(axis.position==='angular'){foundAngular=!0;break}}
if(!foundAngular){newAxes.push({type:'category',position:'angular',fields:firstSeries.xField||firstSeries.angleField,style:{estStepSize:1},grid:!0})}}
return this.callParent([newAxes,oldAxes])},performLayout:function(){var me=this,applyThickness=!0;try{me.chartLayoutCount++;me.suspendAnimation();if(this.callParent()===!1){applyThickness=!1;return}
me.suspendThicknessChanged();var chartRect=me.getSurface('chart').getRect(),inset=me.getInsetPadding(),inner=me.getInnerPadding(),shrinkBox=Ext.apply({},inset),width=Math.max(1,chartRect[2]-chartRect[0]-inset.left-inset.right),height=Math.max(1,chartRect[3]-chartRect[1]-inset.top-inset.bottom),mainRect=[chartRect[0]+inset.left,chartRect[1]+inset.top,width+chartRect[0],height+chartRect[1]],seriesList=me.getSeries(),innerWidth=width-inner*2,innerHeight=height-inner*2,center=[(chartRect[0]+innerWidth)*0.5+inner,(chartRect[1]+innerHeight)*0.5+inner],radius=Math.min(innerWidth,innerHeight)*0.5,axes=me.getAxes(),angularAxes=[],radialAxes=[],seriesRadius=radius-inner,grid=me.surfaceMap.grid,captionList=me.captionList,i,ln,shrinkRadius,floating,floatingValue,gaugeSeries,gaugeRadius,side,series,axis,thickness,halfLineWidth,caption;me.setMainRect(mainRect);me.doSetSurfaceRect(me.getSurface(),mainRect);if(grid){for(i=0,ln=grid.length;i<ln;i++){me.doSetSurfaceRect(grid[i],chartRect)}}
for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];switch(axis.getPosition()){case 'angular':angularAxes.push(axis);break;case 'radial':radialAxes.push(axis);break}}
for(i=0,ln=angularAxes.length;i<ln;i++){axis=angularAxes[i];floating=axis.getFloating();floatingValue=floating?floating.value:null;me.doSetSurfaceRect(axis.getSurface(),chartRect);thickness=axis.getThickness();for(side in shrinkBox){shrinkBox[side]+=thickness}
width=chartRect[2]-shrinkBox.left-shrinkBox.right;height=chartRect[3]-shrinkBox.top-shrinkBox.bottom;shrinkRadius=Math.min(width,height)*0.5;if(i===0){seriesRadius=shrinkRadius-inner}
axis.setMinimum(0);axis.setLength(shrinkRadius);axis.getSprites();halfLineWidth=axis.sprites[0].attr.lineWidth*0.5;for(side in shrinkBox){shrinkBox[side]+=halfLineWidth}}
for(i=0,ln=radialAxes.length;i<ln;i++){axis=radialAxes[i];me.doSetSurfaceRect(axis.getSurface(),chartRect);axis.setMinimum(0);axis.setLength(seriesRadius);axis.getSprites()}
for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];if(series.type==='gauge'&&!gaugeSeries){gaugeSeries=series}else{series.setRadius(seriesRadius)}
me.doSetSurfaceRect(series.getSurface(),mainRect)}
me.doSetSurfaceRect(me.getSurface('overlay'),chartRect);if(gaugeSeries){gaugeSeries.setRect(mainRect);gaugeRadius=gaugeSeries.getRadius()-inner;me.setRadius(gaugeRadius);me.setCenter(gaugeSeries.getCenter());gaugeSeries.setRadius(gaugeRadius);if(axes.length&&axes[0].getPosition()==='gauge'){axis=axes[0];me.doSetSurfaceRect(axis.getSurface(),chartRect);axis.setTotalAngle(gaugeSeries.getTotalAngle());axis.setLength(gaugeRadius)}}else{me.setRadius(radius);me.setCenter(center)}
if(captionList){for(i=0,ln=captionList.length;i<ln;i++){caption=captionList[i];if(caption.getAlignTo()==='series'){caption.alignRect(mainRect)}
caption.performLayout()}}
me.redraw()}finally{me.resumeAnimation();if(applyThickness){me.resumeThicknessChanged()}
me.chartLayoutCount--;me.checkLayoutEnd()}},refloatAxes:function(){var me=this,axes=me.getAxes(),mainRect=me.getMainRect(),floating,value,alongAxis,i,n,axis,radius;if(!mainRect){return}
radius=0.5*Math.min(mainRect[2],mainRect[3]);for(i=0,n=axes.length;i<n;i++){axis=axes[i];floating=axis.getFloating();value=floating?floating.value:null;if(value!==null){alongAxis=me.getAxis(floating.alongAxis);if(axis.getPosition()==='angular'){if(alongAxis){value=alongAxis.getLength()*value/alongAxis.getRange()[1]}else{value=0.01*value*radius}
axis.sprites[0].setAttributes({length:value},!0)}else{if(alongAxis){if(Ext.isString(value)){value=alongAxis.getCoordFor(value)}
value=value/(alongAxis.getRange()[1]+1)*Math.PI*2-Math.PI*1.5+axis.getRotation()}else{value=Ext.draw.Draw.rad(value)}
axis.sprites[0].setAttributes({baseRotation:value},!0)}}}},redraw:function(){var me=this,axes=me.getAxes(),axis,seriesList=me.getSeries(),series,i,ln;for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];axis.getSprites()}
for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];series.getSprites()}
me.renderFrame();me.callParent()},renderFrame:function(){this.refloatAxes();this.callParent()}})
;
Ext.define('Ext.chart.SpaceFillingChart',{extend:'Ext.chart.AbstractChart',xtype:'spacefilling',config:{},performLayout:function(){var me=this;try{me.chartLayoutCount++;me.suspendAnimation();if(me.callParent()===!1){return}
var chartRect=me.getSurface('chart').getRect(),padding=me.getInsetPadding(),width=chartRect[2]-padding.left-padding.right,height=chartRect[3]-padding.top-padding.bottom,mainRect=[padding.left,padding.top,width,height],seriesList=me.getSeries(),series,i,ln;me.getSurface().setRect(mainRect);me.setMainRect(mainRect);for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];series.getSurface().setRect(mainRect);if(series.setRect){series.setRect(mainRect)}
series.getOverlaySurface().setRect(chartRect)}
me.redraw()}finally{me.resumeAnimation();me.chartLayoutCount--;me.checkLayoutEnd()}},redraw:function(){var me=this,seriesList=me.getSeries(),series,i,ln;for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];series.getSprites()}
me.renderFrame();me.callParent()}})
;
Ext.define('Ext.chart.axis.sprite.Axis3D',{extend:'Ext.chart.axis.sprite.Axis',alias:'sprite.axis3d',type:'axis3d',inheritableStatics:{def:{processors:{depth:'number'},defaults:{depth:0},triggers:{depth:'layout'}}},config:{animation:{customDurations:{depth:0}}},layoutUpdater:function(){var me=this,chart=me.getAxis().getChart();if(chart.isInitializing){return}
var attr=me.attr,layout=me.getLayout(),depth=layout.isDiscrete?0:attr.depth,isRtl=chart.getInherited().rtl,min=attr.dataMin+(attr.dataMax-attr.dataMin)*attr.visibleMin,max=attr.dataMin+(attr.dataMax-attr.dataMin)*attr.visibleMax,context={attr:attr,segmenter:me.getSegmenter(),renderer:me.defaultRenderer};if(attr.position==='left'||attr.position==='right'){attr.translationX=0;attr.translationY=max*(attr.length-depth)/(max-min)+depth;attr.scalingX=1;attr.scalingY=(-attr.length+depth)/(max-min);attr.scalingCenterY=0;attr.scalingCenterX=0;me.applyTransformations(!0)}else if(attr.position==='top'||attr.position==='bottom'){if(isRtl){attr.translationX=attr.length+min*attr.length/(max-min)+1}else{attr.translationX=-min*attr.length/(max-min)}
attr.translationY=0;attr.scalingX=(isRtl?-1:1)*(attr.length-depth)/(max-min);attr.scalingY=1;attr.scalingCenterY=0;attr.scalingCenterX=0;me.applyTransformations(!0)}
if(layout){layout.calculateLayout(context);me.setLayoutContext(context)}},renderAxisLine:function(surface,ctx,layout,clipRect){var me=this,attr=me.attr,halfLineWidth=attr.lineWidth*0.5,layout=me.getLayout(),depth=layout.isDiscrete?0:attr.depth,docked=attr.position,position,gaugeAngles;if(attr.axisLine&&attr.length){switch(docked){case 'left':position=surface.roundPixel(clipRect[2])-halfLineWidth;ctx.moveTo(position,-attr.endGap+depth);ctx.lineTo(position,attr.length+attr.startGap);break;case 'right':ctx.moveTo(halfLineWidth,-attr.endGap);ctx.lineTo(halfLineWidth,attr.length+attr.startGap);break;case 'bottom':ctx.moveTo(-attr.startGap,halfLineWidth);ctx.lineTo(attr.length-depth+attr.endGap,halfLineWidth);break;case 'top':position=surface.roundPixel(clipRect[3])-halfLineWidth;ctx.moveTo(-attr.startGap,position);ctx.lineTo(attr.length+attr.endGap,position);break;case 'angular':ctx.moveTo(attr.centerX+attr.length,attr.centerY);ctx.arc(attr.centerX,attr.centerY,attr.length,0,Math.PI*2,!0);break;case 'gauge':gaugeAngles=me.getGaugeAngles();ctx.moveTo(attr.centerX+Math.cos(gaugeAngles.start)*attr.length,attr.centerY+Math.sin(gaugeAngles.start)*attr.length);ctx.arc(attr.centerX,attr.centerY,attr.length,gaugeAngles.start,gaugeAngles.end,!0);break}}}})
;
Ext.define('Ext.chart.axis.Axis3D',{extend:'Ext.chart.axis.Axis',xtype:'axis3d',requires:['Ext.chart.axis.sprite.Axis3D'],config:{depth:0},onSeriesChange:function(chart){var me=this,eventName='depthchange',listenerName='onSeriesDepthChange',i,series;function toggle(action){var boundSeries=me.boundSeries;for(i=0;i<boundSeries.length;i++){series=boundSeries[i];series[action](eventName,listenerName,me)}}
toggle('un');me.callParent(arguments);toggle('on')},onSeriesDepthChange:function(series,depth){var me=this,maxDepth=depth,boundSeries=me.boundSeries,i,item;if(depth>me.getDepth()){maxDepth=depth}else{for(i=0;i<boundSeries.length;i++){item=boundSeries[i];if(item!==series&&item.getDepth){depth=item.getDepth();if(depth>maxDepth){maxDepth=depth}}}}
me.setDepth(maxDepth)},updateDepth:function(depth){var me=this,sprites=me.getSprites(),attr={depth:depth};if(sprites&&sprites.length){sprites[0].setAttributes(attr)}
if(me.gridSpriteEven&&me.gridSpriteOdd){me.gridSpriteEven.getTemplate().setAttributes(attr);me.gridSpriteOdd.getTemplate().setAttributes(attr)}},getGridAlignment:function(){switch(this.getPosition()){case 'left':case 'right':return'horizontal3d';case 'top':case 'bottom':return'vertical3d'}}})
;
Ext.define('Ext.chart.axis.Category',{requires:['Ext.chart.axis.layout.CombineDuplicate','Ext.chart.axis.segmenter.Names'],extend:'Ext.chart.axis.Axis',alias:'axis.category',type:'category',isCategory:!0,config:{layout:'combineDuplicate',segmenter:'names'}})
;
Ext.define('Ext.chart.axis.Category3D',{requires:['Ext.chart.axis.layout.CombineDuplicate','Ext.chart.axis.segmenter.Names'],extend:'Ext.chart.axis.Axis3D',alias:'axis.category3d',type:'category3d',config:{layout:'combineDuplicate',segmenter:'names'}})
;
Ext.define('Ext.chart.axis.Numeric',{extend:'Ext.chart.axis.Axis',type:'numeric',alias:['axis.numeric','axis.radial'],requires:['Ext.chart.axis.layout.Continuous','Ext.chart.axis.segmenter.Numeric'],config:{layout:'continuous',segmenter:'numeric',aggregator:'double'}})
;
Ext.define('Ext.chart.axis.Numeric3D',{extend:'Ext.chart.axis.Axis3D',alias:['axis.numeric3d'],type:'numeric3d',requires:['Ext.chart.axis.layout.Continuous','Ext.chart.axis.segmenter.Numeric'],config:{layout:'continuous',segmenter:'numeric',aggregator:'double'}})
;
Ext.define('Ext.chart.axis.Time',{extend:'Ext.chart.axis.Numeric',alias:'axis.time',type:'time',requires:['Ext.chart.axis.layout.Continuous','Ext.chart.axis.segmenter.Time'],config:{dateFormat:null,fromDate:null,toDate:null,layout:'continuous',segmenter:'time',aggregator:'time'},updateDateFormat:function(format){var renderer=this.getRenderer();if(!renderer||renderer.isDefault){renderer=function(axis,date){return Ext.Date.format(new Date(date),format)};renderer.isDefault=!0;this.setRenderer(renderer);this.performLayout()}},updateRenderer:function(renderer){var dateFormat=this.getDateFormat();if(renderer){this.performLayout()}else if(dateFormat){this.updateDateFormat(dateFormat)}},updateFromDate:function(date){this.setMinimum(+date)},updateToDate:function(date){this.setMaximum(+date)},getCoordFor:function(value){if(Ext.isString(value)){value=new Date(value)}
return+value}})
;
Ext.define('Ext.chart.axis.Time3D',{extend:'Ext.chart.axis.Numeric3D',alias:'axis.time3d',type:'time3d',requires:['Ext.chart.axis.layout.Continuous','Ext.chart.axis.segmenter.Time'],config:{dateFormat:null,fromDate:null,toDate:null,layout:'continuous',segmenter:'time',aggregator:'time'},updateDateFormat:function(format){this.setRenderer(function(axis,date){return Ext.Date.format(new Date(date),format)})},updateFromDate:function(date){this.setMinimum(+date)},updateToDate:function(date){this.setMaximum(+date)},getCoordFor:function(value){if(Ext.isString(value)){value=new Date(value)}
return+value}})
;
Ext.define('Ext.chart.grid.HorizontalGrid3D',{extend:'Ext.chart.grid.HorizontalGrid',alias:'grid.horizontal3d',inheritableStatics:{def:{processors:{depth:'number'},defaults:{depth:0}}},render:function(surface,ctx,rect){var attr=this.attr,x=surface.roundPixel(attr.x),y=surface.roundPixel(attr.y),dx=surface.matrix.getDX(),halfLineWidth=ctx.lineWidth*0.5,height=attr.height,depth=attr.depth,left,top;if(y<=rect[1]){return}
left=rect[0]+depth-dx;top=y+halfLineWidth-depth;ctx.beginPath();ctx.rect(left,top,rect[2],height);ctx.fill();ctx.beginPath();ctx.moveTo(left,top);ctx.lineTo(left+rect[2],top);ctx.stroke();left=rect[0]+x-dx;top=y+halfLineWidth;ctx.beginPath();ctx.moveTo(left,top);ctx.lineTo(left+depth,top-depth);ctx.lineTo(left+depth,top-depth+height);ctx.lineTo(left,top+height);ctx.closePath();ctx.fill();ctx.beginPath();ctx.moveTo(left,top);ctx.lineTo(left+depth,top-depth);ctx.stroke()}})
;
Ext.define('Ext.chart.grid.VerticalGrid3D',{extend:'Ext.chart.grid.VerticalGrid',alias:'grid.vertical3d',inheritableStatics:{def:{processors:{depth:'number'},defaults:{depth:0}}},render:function(surface,ctx,clipRect){var attr=this.attr,x=surface.roundPixel(attr.x),dy=surface.matrix.getDY(),halfLineWidth=ctx.lineWidth*0.5,width=attr.width,depth=attr.depth,left,top;if(x>=clipRect[2]){return}
left=x-halfLineWidth+depth;top=clipRect[1]-depth-dy;ctx.beginPath();ctx.rect(left,top,width,clipRect[3]);ctx.fill();ctx.beginPath();ctx.moveTo(left,top);ctx.lineTo(left,top+clipRect[3]);ctx.stroke();left=x-halfLineWidth;top=clipRect[3];ctx.beginPath();ctx.moveTo(left,top);ctx.lineTo(left+depth,top-depth);ctx.lineTo(left+depth+width,top-depth);ctx.lineTo(left+width,top);ctx.closePath();ctx.fill();left=x-halfLineWidth;top=clipRect[3];ctx.beginPath();ctx.moveTo(left,top);ctx.lineTo(left+depth,top-depth);ctx.stroke()}})
;
Ext.define('Ext.chart.interactions.CrossZoom',{extend:'Ext.chart.interactions.Abstract',type:'crosszoom',alias:'interaction.crosszoom',isCrossZoom:!0,config:{axes:!0,gestures:{dragstart:'onGestureStart',drag:'onGesture',dragend:'onGestureEnd',dblclick:'onDoubleTap'},undoButton:{}},stopAnimationBeforeSync:!1,zoomAnimationInProgress:!1,constructor:function(){this.callParent(arguments);this.zoomHistory=[]},applyAxes:function(axesConfig){var result={};if(axesConfig===!0){return{top:{},right:{},bottom:{},left:{}}}else if(Ext.isArray(axesConfig)){result={};Ext.each(axesConfig,function(axis){result[axis]={}})}else if(Ext.isObject(axesConfig)){Ext.iterate(axesConfig,function(key,val){if(val===!0){result[key]={}}else if(val!==!1){result[key]=val}})}
return result},applyUndoButton:function(button,oldButton){var me=this;if(oldButton){oldButton.destroy()}
if(button){return Ext.create('Ext.Button',Ext.apply({cls:[],text:'Undo Zoom',disabled:!0,handler:function(){me.undoZoom()}},button))}},getSurface:function(){return this.getChart()&&this.getChart().getSurface('overlay')},setSeriesOpacity:function(opacity){var surface=this.getChart()&&this.getChart().getSurface('series');if(surface){surface.element.setStyle('opacity',opacity)}},onGestureStart:function(e){var me=this,chart=me.getChart(),surface=me.getSurface(),rect=chart.getInnerRect(),innerPadding=chart.getInnerPadding(),minX=innerPadding.left,maxX=minX+rect[2],minY=innerPadding.top,maxY=minY+rect[3],xy=chart.getEventXY(e),x=xy[0],y=xy[1];e.claimGesture();if(me.zoomAnimationInProgress){return}
if(x>minX&&x<maxX&&y>minY&&y<maxY){me.gestureEvent='drag';me.lockEvents(me.gestureEvent);me.startX=x;me.startY=y;me.selectionRect=surface.add({type:'rect',globalAlpha:0.5,fillStyle:'rgba(80,80,140,0.5)',strokeStyle:'rgba(80,80,140,1)',lineWidth:2,x:x,y:y,width:0,height:0,zIndex:10000});me.setSeriesOpacity(0.8);return!1}},onGesture:function(e){var me=this;if(me.zoomAnimationInProgress){return}
if(me.getLocks()[me.gestureEvent]===me){var chart=me.getChart(),surface=me.getSurface(),rect=chart.getInnerRect(),innerPadding=chart.getInnerPadding(),minX=innerPadding.left,maxX=minX+rect[2],minY=innerPadding.top,maxY=minY+rect[3],xy=chart.getEventXY(e),x=xy[0],y=xy[1];if(x<minX){x=minX}else if(x>maxX){x=maxX}
if(y<minY){y=minY}else if(y>maxY){y=maxY}
me.selectionRect.setAttributes({width:x-me.startX,height:y-me.startY});if(Math.abs(me.startX-x)<11||Math.abs(me.startY-y)<11){me.selectionRect.setAttributes({globalAlpha:0.5})}else{me.selectionRect.setAttributes({globalAlpha:1})}
surface.renderFrame();return!1}},onGestureEnd:function(e){var me=this;if(me.zoomAnimationInProgress){return}
if(me.getLocks()[me.gestureEvent]===me){var chart=me.getChart(),surface=me.getSurface(),rect=chart.getInnerRect(),innerPadding=chart.getInnerPadding(),minX=innerPadding.left,maxX=minX+rect[2],minY=innerPadding.top,maxY=minY+rect[3],rectWidth=rect[2],rectHeight=rect[3],xy=chart.getEventXY(e),x=xy[0],y=xy[1];if(x<minX){x=minX}else if(x>maxX){x=maxX}
if(y<minY){y=minY}else if(y>maxY){y=maxY}
if(Math.abs(me.startX-x)<11||Math.abs(me.startY-y)<11){surface.remove(me.selectionRect)}else{me.zoomBy([Math.min(me.startX,x)/rectWidth,1-Math.max(me.startY,y)/rectHeight,Math.max(me.startX,x)/rectWidth,1-Math.min(me.startY,y)/rectHeight]);me.selectionRect.setAttributes({x:Math.min(me.startX,x),y:Math.min(me.startY,y),width:Math.abs(me.startX-x),height:Math.abs(me.startY-y)});me.selectionRect.setAnimation(chart.getAnimation()||{duration:0});me.selectionRect.setAttributes({globalAlpha:0,x:0,y:0,width:rectWidth,height:rectHeight});me.zoomAnimationInProgress=!0;chart.suspendThicknessChanged();me.selectionRect.getAnimation().on('animationend',function(){chart.resumeThicknessChanged();surface.remove(me.selectionRect);me.selectionRect=null;me.zoomAnimationInProgress=!1})}
surface.renderFrame();me.sync();me.unlockEvents(me.gestureEvent);me.setSeriesOpacity(1.0);if(!me.zoomAnimationInProgress){surface.remove(me.selectionRect);me.selectionRect=null}}},zoomBy:function(rect){var me=this,axisConfigs=me.getAxes(),chart=me.getChart(),axes=chart.getAxes(),isRtl=chart.getInherited().rtl,zoomMap={},config,axis,x1,x2,isSide,oldRange,i;if(isRtl){rect=rect.slice();x1=1-rect[0];x2=1-rect[2];rect[0]=Math.min(x1,x2);rect[2]=Math.max(x1,x2)}
for(i=0;i<axes.length;i++){axis=axes[i];config=axisConfigs[axis.getPosition()];if(config&&config.allowZoom!==!1){isSide=axis.isSide();oldRange=axis.getVisibleRange();zoomMap[axis.getId()]=oldRange.slice(0);if(!isSide){axis.setVisibleRange([(oldRange[1]-oldRange[0])*rect[0]+oldRange[0],(oldRange[1]-oldRange[0])*rect[2]+oldRange[0]])}else{axis.setVisibleRange([(oldRange[1]-oldRange[0])*rect[1]+oldRange[0],(oldRange[1]-oldRange[0])*rect[3]+oldRange[0]])}}}
me.zoomHistory.push(zoomMap);me.getUndoButton().setDisabled(!1)},undoZoom:function(){var zoomMap=this.zoomHistory.pop(),axes=this.getChart().getAxes(),axis,i;if(zoomMap){for(i=0;i<axes.length;i++){axis=axes[i];if(zoomMap[axis.getId()]){axis.setVisibleRange(zoomMap[axis.getId()])}}}
this.getUndoButton().setDisabled(this.zoomHistory.length===0);this.sync()},onDoubleTap:function(e){this.undoZoom()},destroy:function(){this.setUndoButton(null);this.callParent()}})
;
Ext.define('Ext.chart.interactions.Crosshair',{extend:'Ext.chart.interactions.Abstract',requires:['Ext.chart.grid.HorizontalGrid','Ext.chart.grid.VerticalGrid','Ext.chart.CartesianChart','Ext.chart.axis.layout.Discrete'],type:'crosshair',alias:'interaction.crosshair',config:{axes:{top:{label:{},rect:{}},right:{label:{},rect:{}},bottom:{label:{},rect:{}},left:{label:{},rect:{}}},lines:{horizontal:{strokeStyle:'black',lineDash:[5,5]},vertical:{strokeStyle:'black',lineDash:[5,5]}},gesture:'drag'},applyAxes:function(axesConfig,oldAxesConfig){return Ext.merge(oldAxesConfig||{},axesConfig)},applyLines:function(linesConfig,oldLinesConfig){return Ext.merge(oldLinesConfig||{},linesConfig)},updateChart:function(chart){if(chart&&!chart.isCartesian){Ext.raise("Crosshair interaction can only be used on cartesian charts.")}
this.callParent(arguments)},getGestures:function(){var me=this,gestures={},gesture=me.getGesture();gestures[gesture]='onGesture';gestures[gesture+'start']='onGestureStart';gestures[gesture+'end']='onGestureEnd';gestures[gesture+'cancel']='onGestureCancel';return gestures},onGestureStart:function(e){var me=this,chart=me.getChart(),axesTheme=chart.getTheme().getAxis(),axisTheme,surface=chart.getSurface('overlay'),rect=chart.getInnerRect(),chartWidth=rect[2],chartHeight=rect[3],xy=chart.getEventXY(e),x=xy[0],y=xy[1],axes=chart.getAxes(),axesConfig=me.getAxes(),linesConfig=me.getLines(),axis,axisSurface,axisRect,axisWidth,axisHeight,axisPosition,axisAlignment,axisLabel,axisLabelConfig,crosshairLabelConfig,tickPadding,axisSprite,attr,lineWidth,halfLineWidth,title,titleBBox,horizontalLineCfg,verticalLineCfg,i;e.claimGesture();if(x>0&&x<chartWidth&&y>0&&y<chartHeight){me.lockEvents(me.getGesture());horizontalLineCfg=Ext.apply({xclass:'Ext.chart.grid.HorizontalGrid',x:0,y:y,width:chartWidth},linesConfig.horizontal);verticalLineCfg=Ext.apply({xclass:'Ext.chart.grid.VerticalGrid',x:x,y:0,height:chartHeight},linesConfig.vertical);me.axesLabels=me.axesLabels||{};for(i=0;i<axes.length;i++){axis=axes[i];axisSurface=axis.getSurface();axisRect=axisSurface.getRect();axisSprite=axis.getSprites()[0];axisWidth=axisRect[2];axisHeight=axisRect[3];axisPosition=axis.getPosition();axisAlignment=axis.getAlignment();title=axis.getTitle();titleBBox=title&&title.attr.text!==''&&title.getBBox();attr=axisSprite.attr;lineWidth=attr.axisLine?attr.lineWidth:0;halfLineWidth=lineWidth/2;tickPadding=Math.max(attr.majorTickSize,attr.minorTickSize)+lineWidth;axisLabel=me.axesLabels[axisPosition]=axisSurface.add({type:'composite'});axisLabel.labelRect=axisLabel.addSprite(Ext.apply({type:'rect',fillStyle:'white',x:axisPosition==='right'?lineWidth:0,y:axisPosition==='bottom'?lineWidth:0,width:axisWidth-lineWidth-(axisAlignment==='vertical'&&titleBBox?titleBBox.width:0),height:axisHeight-lineWidth-(axisAlignment==='horizontal'&&titleBBox?titleBBox.height:0),translationX:axisPosition==='left'&&titleBBox?titleBBox.width:0,translationY:axisPosition==='top'&&titleBBox?titleBBox.height:0},axesConfig.rect||axesConfig[axisPosition].rect));if(axisAlignment==='vertical'&&!verticalLineCfg.strokeStyle){verticalLineCfg.strokeStyle=attr.strokeStyle}
if(axisAlignment==='horizontal'&&!horizontalLineCfg.strokeStyle){horizontalLineCfg.strokeStyle=attr.strokeStyle}
axisTheme=Ext.merge({},axesTheme.defaults,axesTheme[axisPosition]);axisLabelConfig=Ext.apply({},axis.config.label,axisTheme.label);crosshairLabelConfig=axesConfig.label||axesConfig[axisPosition].label;axisLabel.labelText=axisLabel.addSprite(Ext.apply(axisLabelConfig,crosshairLabelConfig,{type:'text',x:me.calculateLabelTextPoint(!1,axisPosition,tickPadding,titleBBox,axisWidth,halfLineWidth),y:me.calculateLabelTextPoint(!0,axisPosition,tickPadding,titleBBox,axisHeight,halfLineWidth)}))}
me.horizontalLine=surface.add(horizontalLineCfg);me.verticalLine=surface.add(verticalLineCfg);return!1}},onGesture:function(e){var me=this;if(me.getLocks()[me.getGesture()]!==me){return}
var chart=me.getChart(),surface=chart.getSurface('overlay'),rect=Ext.Array.slice(chart.getInnerRect()),padding=chart.getInnerPadding(),px=padding.left,py=padding.top,chartWidth=rect[2],chartHeight=rect[3],xy=chart.getEventXY(e),x=xy[0],y=xy[1],axes=chart.getAxes(),axis,axisPosition,axisAlignment,axisSurface,axisSprite,axisMatrix,axisLayoutContext,axisSegmenter,axisLabel,labelBBox,textPadding,xx,yy,dx,dy,xValue,yValue,text,i;if(x<0){x=0}else if(x>chartWidth){x=chartWidth}
if(y<0){y=0}else if(y>chartHeight){y=chartHeight}
x+=px;y+=py;for(i=0;i<axes.length;i++){axis=axes[i];axisPosition=axis.getPosition();axisAlignment=axis.getAlignment();axisSurface=axis.getSurface();axisSprite=axis.getSprites()[0];axisMatrix=axisSprite.attr.matrix;textPadding=axisSprite.attr.textPadding*2;axisLabel=me.axesLabels[axisPosition];axisLayoutContext=axisSprite.getLayoutContext();axisSegmenter=axis.getSegmenter();if(axisLabel){if(axisAlignment==='vertical'){yy=axisMatrix.getYY();dy=axisMatrix.getDY();yValue=(y-dy-py)/yy;if(axis.getLayout()instanceof Ext.chart.axis.layout.Discrete){y=Math.round(yValue)*yy+dy+py;yValue=axisSegmenter.from(Math.round(yValue));yValue=axisSprite.attr.data[yValue]}else{yValue=axisSegmenter.from(yValue)}
text=axisSegmenter.renderer(yValue,axisLayoutContext);axisLabel.setAttributes({translationY:y-py});axisLabel.labelText.setAttributes({text:text});labelBBox=axisLabel.labelText.getBBox();axisLabel.labelRect.setAttributes({height:labelBBox.height+textPadding,y:-(labelBBox.height+textPadding)/2});axisSurface.renderFrame()}else{xx=axisMatrix.getXX();dx=axisMatrix.getDX();xValue=(x-dx-px)/xx;if(axis.getLayout()instanceof Ext.chart.axis.layout.Discrete){x=Math.round(xValue)*xx+dx+px;xValue=axisSegmenter.from(Math.round(xValue));xValue=axisSprite.attr.data[xValue]}else{xValue=axisSegmenter.from(xValue)}
text=axisSegmenter.renderer(xValue,axisLayoutContext);axisLabel.setAttributes({translationX:x-px});axisLabel.labelText.setAttributes({text:text});labelBBox=axisLabel.labelText.getBBox();axisLabel.labelRect.setAttributes({width:labelBBox.width+textPadding,x:-(labelBBox.width+textPadding)/2});axisSurface.renderFrame()}}}
me.horizontalLine.setAttributes({y:y,strokeStyle:axisSprite.attr.strokeStyle});me.verticalLine.setAttributes({x:x,strokeStyle:axisSprite.attr.strokeStyle});surface.renderFrame();return!1},onGestureEnd:function(e){var me=this,chart=me.getChart(),surface=chart.getSurface('overlay'),axes=chart.getAxes(),axis,axisPosition,axisSurface,axisLabel,i;surface.remove(me.verticalLine);surface.remove(me.horizontalLine);for(i=0;i<axes.length;i++){axis=axes[i];axisPosition=axis.getPosition();axisSurface=axis.getSurface();axisLabel=me.axesLabels[axisPosition];if(axisLabel){delete me.axesLabels[axisPosition];axisSurface.remove(axisLabel)}
axisSurface.renderFrame()}
surface.renderFrame();me.unlockEvents(me.getGesture())},onGestureCancel:function(e){this.onGestureEnd(e)},privates:{vertMap:{top:'start',bottom:'end'},horzMap:{left:'start',right:'end'},calculateLabelTextPoint:function(vertical,position,tickPadding,titleBBox,axisSize,halfLineWidth){var titlePadding,sizeProp,pointProp;if(vertical){pointProp='y';sizeProp='height';position=this.vertMap[position]}else{pointProp='x';sizeProp='width';position=this.horzMap[position]}
switch(position){case 'start':titlePadding=titleBBox?titleBBox[pointProp]+titleBBox[sizeProp]:0;return titlePadding+(axisSize-titlePadding-tickPadding)/2-halfLineWidth;case 'end':titlePadding=titleBBox?axisSize-titleBBox[pointProp]:0;return tickPadding+(axisSize-tickPadding-titlePadding)/2+halfLineWidth;default:return 0}}}})
;
Ext.define('Ext.chart.interactions.ItemHighlight',{extend:'Ext.chart.interactions.Abstract',type:'itemhighlight',alias:'interaction.itemhighlight',isItemHighlight:!0,config:{gestures:{tap:'onTapGesture',mousemove:'onMouseMoveGesture',mousedown:'onMouseDownGesture',mouseup:'onMouseUpGesture',mouseleave:'onMouseUpGesture'},sticky:!1,multiTooltips:!1},constructor:function(config){this.callParent([config]);this.stickyHighlightItem=null;this.tooltipItems=[]},destroy:function(){this.stickyHighlightItem=this.tooltipItems=null;this.callParent()},onMouseMoveGesture:function(e){var me=this,tooltipItems=me.tooltipItems,isMousePointer=e.pointerType==='mouse',tooltips=[],item,oldItem,items,tooltip,oldTooltip,i,len,j,jLen;if(me.getSticky()){return!0}
if(isMousePointer&&me.stickyHighlightItem){me.stickyHighlightItem=null;me.highlight(null)}
if(me.isDragging){if(tooltipItems.length&&isMousePointer){me.hideTooltips(tooltipItems);tooltipItems.length=0}}else if(!me.stickyHighlightItem){if(me.getMultiTooltips()){items=me.getItemsForEvent(e)}else{item=me.getItemForEvent(e);items=item?[item]:[]}
for(i=0,len=items.length;i<len;i++){item=items[i];if(i===0&&item!==me.getChart().getHighlightItem()){me.highlight(item);me.sync()}
tooltip=item.series.getTooltip();if(tooltip){tooltips.push(tooltip)}}
if(isMousePointer){if(items.length){for(i=0,len=items.length;i<len;i++){item=items[i];tooltip=item.series.getTooltip();if(tooltip){for(j=0,jLen=tooltipItems.length;j<jLen;j++){oldItem=tooltipItems[j];if(!Ext.Array.contains(items,oldItem)){oldTooltip=oldItem.series.getTooltip();if(!Ext.Array.contains(tooltips,oldTooltip)){oldItem.series.hideTooltip(oldItem,!0)}}}
if(tooltip.getTrackMouse()){item.series.showTooltip(item,e)}else{me.showUntracked(item)}}}
me.tooltipItems=items}else{me.hideTooltips(tooltipItems);tooltipItems.length=0}}
return!1}},highlight:function(item){this.getChart().setHighlightItem(item)},showTooltip:function(e,item){item.series.showTooltip(item,e);Ext.Array.include(this.tooltipItems,item)},showUntracked:function(item){var marker=item.sprite.getMarker(item.category),surface,surfaceXY,isInverseY,itemBBox,matrix;if(marker){surface=marker.getSurface();isInverseY=surface.matrix.elements[3]<0;surfaceXY=surface.element.getXY();itemBBox=Ext.clone(marker.getBBoxFor(item.index));if(isInverseY){if(surface.getInherited().rtl){matrix=surface.inverseMatrix.clone().flipX().translate(item.sprite.attr.innerWidth,0,!0)}else{matrix=surface.inverseMatrix}
itemBBox=matrix.transformBBox(itemBBox)}
itemBBox.x+=surfaceXY[0];itemBBox.y+=surfaceXY[1];item.series.showTooltipAt(item,itemBBox.x+itemBBox.width*0.5,itemBBox.y+itemBBox.height*0.5)}},onMouseDownGesture:function(){this.isDragging=!0},onMouseUpGesture:function(){this.isDragging=!1},isSameItem:function(a,b){return a&&b&&a.series===b.series&&a.field===b.field&&a.index===b.index},onTapGesture:function(e){var me=this,item;if(e.pointerType==='mouse'&&!me.getSticky()){return}
item=me.getItemForEvent(e);if(me.isSameItem(me.stickyHighlightItem,item)){item=null}
me.stickyHighlightItem=item;me.highlight(item)},privates:{hideTooltips:function(items,force){var item,i,len;items=Ext.isArray(items)?items:[items];for(i=0,len=items.length;i<len;i++){item=items[i];if(item&&item.series&&!item.series.destroyed){item.series.hideTooltip(item,force)}}}}})
;
Ext.define('Ext.chart.interactions.ItemEdit',{extend:'Ext.chart.interactions.ItemHighlight',requires:['Ext.tip.ToolTip'],type:'itemedit',alias:'interaction.itemedit',isItemEdit:!0,config:{style:null,renderer:null,tooltip:!0,gestures:{dragstart:'onDragStart',drag:'onDrag',dragend:'onDragEnd'},cursors:{ewResize:'ew-resize',nsResize:'ns-resize',move:'move'}},item:null,applyTooltip:function(tooltip){var config;if(tooltip){config=Ext.apply({},tooltip,{renderer:this.defaultTooltipRenderer,constrainPosition:!0,shrinkWrapDock:!0,autoHide:!0,trackMouse:!0,mouseOffset:[20,20]});tooltip=new Ext.tip.ToolTip(config)}
return tooltip},defaultTooltipRenderer:function(tooltip,item,target,e){var parts=[];if(target.xField){parts.push(target.xField+': '+target.xValue)}
if(target.yField){parts.push(target.yField+': '+target.yValue)}
tooltip.setHtml(parts.join('<br>'))},onDragStart:function(e){var me=this,chart=me.getChart(),item=chart.getHighlightItem();e.claimGesture();if(item){chart.fireEvent('beginitemedit',chart,me,me.item=item);return!1}},onDrag:function(e){var me=this,chart=me.getChart(),item=chart.getHighlightItem(),type=item&&item.sprite.type;if(item){switch(type){case 'barSeries':return me.onDragBar(e);case 'scatterSeries':return me.onDragScatter(e)}}},highlight:function(item){var me=this,chart=me.getChart(),flipXY=chart.getFlipXY(),cursors=me.getCursors(),type=item&&item.sprite.type,style=chart.el.dom.style;me.callParent([item]);if(item){switch(type){case 'barSeries':if(flipXY){style.cursor=cursors.ewResize}else{style.cursor=cursors.nsResize}
break;case 'scatterSeries':style.cursor=cursors.move;break}}else{chart.el.dom.style.cursor='default'}},onDragBar:function(e){var me=this,chart=me.getChart(),isRtl=chart.getInherited().rtl,flipXY=chart.isCartesian&&chart.getFlipXY(),item=chart.getHighlightItem(),marker=item.sprite.getMarker('items'),instance=marker.getMarkerFor(item.sprite.getId(),item.index),surface=item.sprite.getSurface(),surfaceRect=surface.getRect(),xy=surface.getEventXY(e),matrix=item.sprite.attr.matrix,renderer=me.getRenderer(),style,changes,params,positionY;if(flipXY){positionY=isRtl?surfaceRect[2]-xy[0]:xy[0]}else{positionY=surfaceRect[3]-xy[1]}
style={x:instance.x,y:positionY,width:instance.width,height:instance.height+(instance.y-positionY),radius:instance.radius,fillStyle:'none',lineDash:[4,4],zIndex:100};Ext.apply(style,me.getStyle());if(Ext.isArray(item.series.getYField())){positionY=positionY-instance.y-instance.height}
me.target={index:item.index,yField:item.field,yValue:(positionY-matrix.getDY())/matrix.getYY()};params=[chart,{target:me.target,style:style,item:item}];changes=Ext.callback(renderer,null,params,0,chart);if(changes){Ext.apply(style,changes)}
item.sprite.putMarker('items',style,'itemedit');me.showTooltip(e,me.target,item);surface.renderFrame()},onDragScatter:function(e){var me=this,chart=me.getChart(),isRtl=chart.getInherited().rtl,flipXY=chart.isCartesian&&chart.getFlipXY(),item=chart.getHighlightItem(),marker=item.sprite.getMarker('markers'),instance=marker.getMarkerFor(item.sprite.getId(),item.index),surface=item.sprite.getSurface(),surfaceRect=surface.getRect(),xy=surface.getEventXY(e),matrix=item.sprite.attr.matrix,xAxis=item.series.getXAxis(),isEditableX=xAxis&&xAxis.getLayout().isContinuous,renderer=me.getRenderer(),style,changes,params,positionX,positionY,hintX,hintY;if(flipXY){positionY=isRtl?surfaceRect[2]-xy[0]:xy[0]}else{positionY=surfaceRect[3]-xy[1]}
if(isEditableX){if(flipXY){positionX=surfaceRect[3]-xy[1]}else{positionX=xy[0]}}else{positionX=instance.translationX}
if(isEditableX){hintX=xy[0];hintY=xy[1]}else{if(flipXY){hintX=xy[0];hintY=instance.translationY}else{hintX=instance.translationX;hintY=xy[1]}}
style={translationX:hintX,translationY:hintY,scalingX:instance.scalingX,scalingY:instance.scalingY,r:instance.r,fillStyle:'none',lineDash:[4,4],zIndex:100};Ext.apply(style,me.getStyle());me.target={index:item.index,yField:item.field,yValue:(positionY-matrix.getDY())/matrix.getYY()};if(isEditableX){Ext.apply(me.target,{xField:item.series.getXField(),xValue:(positionX-matrix.getDX())/matrix.getXX()})}
params=[chart,{target:me.target,style:style,item:item}];changes=Ext.callback(renderer,null,params,0,chart);if(changes){Ext.apply(style,changes)}
item.sprite.putMarker('markers',style,'itemedit');me.showTooltip(e,me.target,item);surface.renderFrame()},showTooltip:function(e,target,item){var tooltip=this.getTooltip(),config,chart;if(tooltip&&Ext.toolkit!=='modern'){config=tooltip.config;chart=this.getChart();Ext.callback(config.renderer,null,[tooltip,item,target,e],0,chart);tooltip.pointerEvent=e;if(tooltip.isVisible()){tooltip.realignToTarget()}else{tooltip.show()}}},hideTooltip:function(){var tooltip=this.getTooltip();if(tooltip&&Ext.toolkit!=='modern'){tooltip.hide()}},onDragEnd:function(e){var me=this,target=me.target,chart=me.getChart(),store=chart.getStore(),record;if(target){record=store.getAt(target.index);if(target.yField){record.set(target.yField,target.yValue,{convert:!1})}
if(target.xField){record.set(target.xField,target.xValue,{convert:!1})}
if(target.yField||target.xField){me.getChart().onDataChanged()}
me.target=null}
me.hideTooltip();if(me.item){chart.fireEvent('enditemedit',chart,me,me.item,target)}
me.highlight(me.item=null)},destroy:function(){var tooltip=this.getConfig('tooltip',!0);Ext.destroy(tooltip);this.callParent()}})
;
Ext.define('Ext.chart.interactions.PanZoom',{extend:'Ext.chart.interactions.Abstract',type:'panzoom',alias:'interaction.panzoom',requires:['Ext.draw.Animator'],config:{axes:{top:{},right:{},bottom:{},left:{}},minZoom:null,maxZoom:null,showOverflowArrows:!0,panGesture:'drag',zoomGesture:'pinch',zoomOnPanGesture:null,zoomOnPan:!1,doubleTapReset:!1,modeToggleButton:{xtype:'segmentedbutton',width:200,defaults:{ui:'default-toolbar'},cls:Ext.baseCSSPrefix+'panzoom-toggle',items:[{text:'Pan',value:'pan'},{text:'Zoom',value:'zoom'}]},hideLabelInGesture:!1},stopAnimationBeforeSync:!0,applyAxes:function(axesConfig,oldAxesConfig){return Ext.merge(oldAxesConfig||{},axesConfig)},updateZoomOnPan:function(zoomOnPan){var button=this.getModeToggleButton();button.setValue(zoomOnPan?'zoom':'pan')},updateZoomOnPanGesture:function(zoomOnPanGesture){this.setZoomOnPan(zoomOnPanGesture)},getZoomOnPanGesture:function(){return this.getZoomOnPan()},applyModeToggleButton:function(button,oldButton){return Ext.factory(button,'Ext.button.Segmented',oldButton)},updateModeToggleButton:function(button){if(button){button.on('change','onModeToggleChange',this)}},onModeToggleChange:function(segmentedButton,value){this.setZoomOnPan(value==='zoom')},getGestures:function(){var me=this,gestures={},pan=me.getPanGesture(),zoom=me.getZoomGesture();gestures[zoom]='onZoomGestureMove';gestures[zoom+'start']='onZoomGestureStart';gestures[zoom+'end']='onZoomGestureEnd';gestures[pan]='onPanGestureMove';gestures[pan+'start']='onPanGestureStart';gestures[pan+'end']='onPanGestureEnd';gestures.doubletap='onDoubleTap';return gestures},onDoubleTap:function(e){var me=this,doubleTapReset=me.getDoubleTapReset(),chart,axes,axis,i,ln;if(doubleTapReset){chart=me.getChart();axes=chart.getAxes();for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];axis.setVisibleRange([0,1])}
chart.redraw()}},onPanGestureStart:function(e){var me=this,chart,rect,xy;if(!e||!e.touches||e.touches.length<2){chart=me.getChart();rect=chart.getInnerRect();xy=chart.element.getXY();e.claimGesture();chart.suspendAnimation();me.startX=e.getX()-xy[0]-rect[0];me.startY=e.getY()-xy[1]-rect[1];me.oldVisibleRanges=null;me.hideLabels();chart.suspendThicknessChanged();me.lockEvents(me.getPanGesture());return!1}},onPanGestureMove:function(e){var me=this,isMouse=e.pointerType==='mouse',isZoomOnPan=isMouse&&me.getZoomOnPan(),chart,rect,xy;if(me.getLocks()[me.getPanGesture()]===me){chart=me.getChart();rect=chart.getInnerRect();xy=chart.element.getXY();if(isZoomOnPan){me.transformAxesBy(me.getZoomableAxes(e),0,0,(e.getX()-xy[0]-rect[0])/me.startX,me.startY/(e.getY()-xy[1]-rect[1]))}else{me.transformAxesBy(me.getPannableAxes(e),e.getX()-xy[0]-rect[0]-me.startX,e.getY()-xy[1]-rect[1]-me.startY,1,1)}
me.sync();return!1}},onPanGestureEnd:function(e){var me=this,pan=me.getPanGesture(),chart;if(me.getLocks()[pan]===me){chart=me.getChart();chart.resumeThicknessChanged();me.showLabels();me.sync();me.unlockEvents(pan);chart.resumeAnimation();return!1}},onZoomGestureStart:function(e){if(e.touches&&e.touches.length===2){var me=this,chart=me.getChart(),xy=chart.element.getXY(),rect=chart.getInnerRect(),x=xy[0]+rect[0],y=xy[1]+rect[1],newPoints=[e.touches[0].point.x-x,e.touches[0].point.y-y,e.touches[1].point.x-x,e.touches[1].point.y-y],xDistance=Math.max(44,Math.abs(newPoints[2]-newPoints[0])),yDistance=Math.max(44,Math.abs(newPoints[3]-newPoints[1]));e.claimGesture();chart.suspendAnimation();chart.suspendThicknessChanged();me.lastZoomDistances=[xDistance,yDistance];me.lastPoints=newPoints;me.oldVisibleRanges=null;me.hideLabels();me.lockEvents(me.getZoomGesture());return!1}},onZoomGestureMove:function(e){var me=this;if(me.getLocks()[me.getZoomGesture()]===me){var chart=me.getChart(),rect=chart.getInnerRect(),xy=chart.element.getXY(),x=xy[0]+rect[0],y=xy[1]+rect[1],abs=Math.abs,lastPoints=me.lastPoints,newPoints=[e.touches[0].point.x-x,e.touches[0].point.y-y,e.touches[1].point.x-x,e.touches[1].point.y-y],xDistance=Math.max(44,abs(newPoints[2]-newPoints[0])),yDistance=Math.max(44,abs(newPoints[3]-newPoints[1])),lastDistances=this.lastZoomDistances||[xDistance,yDistance],zoomX=xDistance/lastDistances[0],zoomY=yDistance/lastDistances[1];me.transformAxesBy(me.getZoomableAxes(e),rect[2]*(zoomX-1)/2+newPoints[2]-lastPoints[2]*zoomX,rect[3]*(zoomY-1)/2+newPoints[3]-lastPoints[3]*zoomY,zoomX,zoomY);me.sync();return!1}},onZoomGestureEnd:function(e){var me=this,zoom=me.getZoomGesture(),chart;if(me.getLocks()[zoom]===me){chart=me.getChart();chart.resumeThicknessChanged();me.showLabels();me.sync();me.unlockEvents(zoom);chart.resumeAnimation();return!1}},hideLabels:function(){if(this.getHideLabelInGesture()){this.eachInteractiveAxes(function(axis){axis.hideLabels()})}},showLabels:function(){if(this.getHideLabelInGesture()){this.eachInteractiveAxes(function(axis){axis.showLabels()})}},isEventOnAxis:function(e,axis){var rect=axis.getSurface().getRect();return rect[0]<=e.getX()&&e.getX()<=rect[0]+rect[2]&&rect[1]<=e.getY()&&e.getY()<=rect[1]+rect[3]},getPannableAxes:function(e){var me=this,axisConfigs=me.getAxes(),axes=me.getChart().getAxes(),i,ln=axes.length,result=[],isEventOnAxis=!1,config;if(e){for(i=0;i<ln;i++){if(this.isEventOnAxis(e,axes[i])){isEventOnAxis=!0;break}}}
for(i=0;i<ln;i++){config=axisConfigs[axes[i].getPosition()];if(config&&config.allowPan!==!1&&(!isEventOnAxis||this.isEventOnAxis(e,axes[i]))){result.push(axes[i])}}
return result},getZoomableAxes:function(e){var me=this,axisConfigs=me.getAxes(),axes=me.getChart().getAxes(),result=[],i,ln=axes.length,axis,isEventOnAxis=!1,config;if(e){for(i=0;i<ln;i++){if(this.isEventOnAxis(e,axes[i])){isEventOnAxis=!0;break}}}
for(i=0;i<ln;i++){axis=axes[i];config=axisConfigs[axis.getPosition()];if(config&&config.allowZoom!==!1&&(!isEventOnAxis||this.isEventOnAxis(e,axis))){result.push(axis)}}
return result},eachInteractiveAxes:function(fn){var me=this,axisConfigs=me.getAxes(),axes=me.getChart().getAxes(),i;for(i=0;i<axes.length;i++){if(axisConfigs[axes[i].getPosition()]){if(!1===fn.call(this,axes[i])){return}}}},transformAxesBy:function(axes,panX,panY,sx,sy){var rect=this.getChart().getInnerRect(),axesCfg=this.getAxes(),oldVisibleRanges=this.oldVisibleRanges,result=!1,axisCfg,i;if(!oldVisibleRanges){this.oldVisibleRanges=oldVisibleRanges={};this.eachInteractiveAxes(function(axis){oldVisibleRanges[axis.getId()]=axis.getVisibleRange()})}
if(!rect){return}
for(i=0;i<axes.length;i++){axisCfg=axesCfg[axes[i].getPosition()];result=this.transformAxisBy(axes[i],oldVisibleRanges[axes[i].getId()],panX,panY,sx,sy,this.minZoom||axisCfg.minZoom,this.maxZoom||axisCfg.maxZoom)||result}
return result},transformAxisBy:function(axis,oldVisibleRange,panX,panY,sx,sy,minZoom,maxZoom){var me=this,visibleLength=oldVisibleRange[1]-oldVisibleRange[0],visibleRange=axis.getVisibleRange(),actualMinZoom=minZoom||me.getMinZoom()||axis.config.minZoom,actualMaxZoom=maxZoom||me.getMaxZoom()||axis.config.maxZoom,rect=me.getChart().getInnerRect(),left,right,isSide,pan,length;if(!rect){return}
isSide=axis.isSide();length=isSide?rect[3]:rect[2];pan=isSide?-panY:panX;visibleLength/=isSide?sy:sx;if(visibleLength<0){visibleLength=-visibleLength}
if(visibleLength*actualMinZoom>1){visibleLength=1}
if(visibleLength*actualMaxZoom<1){visibleLength=1/actualMaxZoom}
left=oldVisibleRange[0];right=oldVisibleRange[1];visibleRange=visibleRange[1]-visibleRange[0];if(visibleLength===visibleRange&&visibleRange===1){return}
axis.setVisibleRange([(oldVisibleRange[0]+oldVisibleRange[1]-visibleLength)*0.5-pan/length*visibleLength,(oldVisibleRange[0]+oldVisibleRange[1]+visibleLength)*0.5-pan/length*visibleLength]);return Math.abs(left-axis.getVisibleRange()[0])>1e-10||Math.abs(right-axis.getVisibleRange()[1])>1e-10},destroy:function(){this.setModeToggleButton(null);this.callParent()}})
;
Ext.define('Ext.chart.interactions.Rotate',{extend:'Ext.chart.interactions.Abstract',type:'rotate',alternateClassName:'Ext.chart.interactions.RotatePie3D',alias:['interaction.rotate','interaction.rotatePie3d'],config:{gesture:'rotate',gestures:{dragstart:'onGestureStart',drag:'onGesture',dragend:'onGestureEnd'},rotation:0},oldRotations:null,getAngle:function(e){var me=this,chart=me.getChart(),xy=chart.getEventXY(e),center=chart.getCenter();return Math.atan2(xy[1]-center[1],xy[0]-center[0])},onGestureStart:function(e){var me=this;e.claimGesture();me.lockEvents('drag');me.angle=me.getAngle(e);me.oldRotations={};me.getChart().suspendAnimation();me.fireEvent('rotatestart',me,me.getRotation());return!1},onGesture:function(e){var me=this,angle=me.getAngle(e)-me.angle;if(me.getLocks().drag===me){me.doRotateTo(angle,!0);return!1}},doRotateTo:function(angle,relative){var me=this,chart=me.getChart(),axes=chart.getAxes(),seriesList=chart.getSeries(),oldRotations=me.oldRotations,rotation,oldRotation,axis,series,id,i,ln;for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];id=axis.getId();oldRotation=oldRotations[id]||(oldRotations[id]=axis.getRotation());rotation=angle+(relative?oldRotation:0);axis.setRotation(rotation)}
for(i=0,ln=seriesList.length;i<ln;i++){series=seriesList[i];id=series.getId();oldRotation=oldRotations[id]||(oldRotations[id]=series.getRotation());rotation=Ext.draw.Draw.degrees(angle+(relative?oldRotation:0));series.setRotation(rotation)}
me.setRotation(rotation);me.fireEvent('rotate',me,me.getRotation());me.sync()},rotateTo:function(angle,relative,animate){var me=this,chart=me.getChart();if(!animate){chart.suspendAnimation()}
me.doRotateTo(angle,relative,animate);me.oldRotations={};if(!animate){chart.resumeAnimation()}},onGestureEnd:function(e){var me=this;if(me.getLocks().drag===me){me.onGesture(e);me.unlockEvents('drag');me.getChart().resumeAnimation();me.fireEvent('rotateend',me,me.getRotation());me.fireEvent('rotationEnd',me,me.getRotation());return!1}}})
;
Ext.define('Ext.chart.navigator.ContainerBase',{extend:'Ext.panel.Panel'})
;
Ext.define('Ext.chart.navigator.NavigatorBase',{extend:'Ext.chart.CartesianChart',onRender:function(){this.callParent();this.setupEvents()},setDocked:function(docked){var me=this,ownerCt=me.getNavigatorContainer();if(!(docked==='top'||docked==='bottom')){Ext.raise("Can only dock to 'top' or 'bottom'.")}
if(docked!==me.dock){if(ownerCt&&ownerCt.moveDocked){ownerCt.moveDocked(me,docked)}else{me.dock=docked}}
return me},getDocked:function(){return this.dock}})
;
Ext.define('Ext.chart.navigator.sprite.RangeMask',{extend:'Ext.draw.sprite.Sprite',alias:'sprite.rangemask',inheritableStatics:{def:{processors:{min:'limited01',max:'limited01',thumbOpacity:'limited01'},defaults:{min:0,max:1,lineWidth:2,miterLimit:1,strokeStyle:'#787878',thumbOpacity:1}}},getBBox:function(isWithoutTransform){var me=this,attr=me.attr,bbox=attr.bbox;bbox.plain={x:0,y:0,width:1,height:1};if(isWithoutTransform){return bbox.plain}
return bbox.transform||(bbox.transform=attr.matrix.transformBBox(bbox.plain))},renderThumb:function(surface,ctx,x,y){var me=this,shapeSprite=me.shapeSprite,textureSprite=me.textureSprite,thumbOpacity=me.attr.thumbOpacity,thumbAttributes={opacity:thumbOpacity,translationX:x,translationY:y};if(!shapeSprite){shapeSprite=me.shapeSprite=new Ext.draw.sprite.Rect({x:-9.5,y:-9.5,width:19,height:19,radius:4,lineWidth:1,fillStyle:{type:'linear',degrees:90,stops:[{offset:0,color:'#EEE'},{offset:1,color:'#FFF'}]},strokeStyle:'#999'});textureSprite=me.textureSprite=new Ext.draw.sprite.Path({path:'M -4, -5, -4, 5 M 0, -5, 0, 5 M 4, -5, 4, 5',strokeStyle:{type:'linear',degrees:90,stops:[{offset:0,color:'#CCC'},{offset:1,color:'#BBB'}]},lineWidth:2})}
ctx.save();shapeSprite.setAttributes(thumbAttributes);shapeSprite.applyTransformations();textureSprite.setAttributes(thumbAttributes);textureSprite.applyTransformations();shapeSprite.useAttributes(ctx);shapeSprite.render(surface,ctx);textureSprite.useAttributes(ctx);textureSprite.render(surface,ctx);ctx.restore()},render:function(surface,ctx){var me=this,attr=me.attr,matrix=attr.matrix.elements,sx=matrix[0],sy=matrix[3],tx=matrix[4],ty=matrix[5],min=attr.min,max=attr.max,s_min=min*sx+tx,s_max=max*sx+tx,s_y=Math.round(0.5*sy+ty);ctx.beginPath();ctx.moveTo(tx,ty);ctx.lineTo(sx+tx,ty);ctx.lineTo(sx+tx,sy+ty);ctx.lineTo(tx,sy+ty);ctx.lineTo(tx,ty);ctx.moveTo(s_min,ty);ctx.lineTo(s_min,sy+ty);ctx.lineTo(s_max,sy+ty);ctx.lineTo(s_max,ty);ctx.lineTo(s_min,ty);ctx.fillStroke(attr,!0);me.renderThumb(surface,ctx,Math.round(s_min),s_y);me.renderThumb(surface,ctx,Math.round(s_max),s_y)}})
;
Ext.define('Ext.chart.navigator.Navigator',{extend:'Ext.chart.navigator.NavigatorBase',isNavigator:!0,requires:['Ext.chart.navigator.sprite.RangeMask'],config:{docked:'bottom',span:'series',insetPadding:0,innerPadding:0,navigatorContainer:null,axis:null,tolerance:20,minimum:0.8,maximum:1,thumbGap:30,autoHideThumbs:!0,width:'100%',height:75},dragType:null,constructor:function(config){var me=this,visibleRange,overlay;config=config||{};visibleRange=[config.minimum||0.8,config.maximum||1];me.callParent([config]);overlay=me.overlaySurface;overlay.element.setStyle({zIndex:100});me.rangeMask=overlay.add({type:'rangemask',min:visibleRange[0],max:visibleRange[1],fillStyle:'rgba(0, 0, 0, .25)'});me.onDragEnd();me.rangeMask.setAnimation({duration:500,customDurations:{min:0,max:0,translationX:0,translationY:0,scalingX:0,scalingY:0,scalingCenterX:0,scalingCenterY:0,fillStyle:0,strokeStyle:0}});me.setVisibleRange(visibleRange)},createSurface:function(id){var surface=this.callParent([id]);if(id==='overlay'){this.overlaySurface=surface}
return surface},applyAxis:function(axis){return this.getNavigatorContainer().getChart().getAxis(axis)},updateAxis:function(axis,oldAxis){var me=this,eventName='visiblerangechange',eventHandler='onAxisVisibleRangeChange';if(oldAxis){oldAxis.un(eventName,eventHandler,me)}
if(axis){axis.on(eventName,eventHandler,me)}
me.axis=axis},getAxis:function(){return this.axis},onAxisVisibleRangeChange:function(axis,visibleRange){this.setVisibleRange(visibleRange)},updateNavigatorContainer:function(navigatorContainer){var me=this,oldChart=me.chart,chart=me.chart=navigatorContainer&&navigatorContainer.getChart(),chartSeriesList=chart&&chart.getSeries(),chartLegendStore=me.chartLegendStore,navigatorSeriesList=[],storeEventName='update',storeEventHandler='onChartLegendStoreUpdate',chartSeries,navigatorSeries,seriesConfig,i;if(oldChart){oldChart.un('layout','afterBoundChartLayout',me);oldChart.un('themechange','onChartThemeChange',me);oldChart.un('storechange','onChartStoreChange',me)}
chart.on('layout','afterBoundChartLayout',me);for(i=0;i<chartSeriesList.length;i++){chartSeries=chartSeriesList[i];seriesConfig=me.getSeriesConfig(chartSeries);navigatorSeries=Ext.create('series.'+seriesConfig.type,seriesConfig);navigatorSeries.parentSeries=chartSeries;chartSeries.navigatorSeries=navigatorSeries;navigatorSeriesList.push(navigatorSeries)}
if(chartLegendStore){chartLegendStore.un(storeEventName,storeEventHandler,me);me.chartLegendStore=null}
if(chart){me.setStore(chart.getStore());me.chartLegendStore=chartLegendStore=chart.getLegendStore();if(chartLegendStore){chartLegendStore.on(storeEventName,storeEventHandler,me)}
chart.on('themechange','onChartThemeChange',me);chart.on('storechange','onChartStoreChange',me);me.onChartThemeChange(chart,chart.getTheme())}
me.setSeries(navigatorSeriesList)},onChartThemeChange:function(chart,theme){this.setTheme(theme)},onChartStoreChange:function(chart,store){this.setStore(store)},addCustomStyle:function(config,style,subStyle){var fillStyle,strokeStyle;style=style||{};subStyle=subStyle||{};config.style=config.style||{};config.subStyle=config.subStyle||{};fillStyle=style&&(style.fillStyle||style.fill);strokeStyle=style&&(style.strokeStyle||style.stroke);if(fillStyle){config.style.fillStyle=fillStyle}
if(strokeStyle){config.style.strokeStyle=strokeStyle}
fillStyle=subStyle&&(subStyle.fillStyle||subStyle.fill);strokeStyle=subStyle&&(subStyle.strokeStyle||subStyle.stroke);if(fillStyle){config.subStyle.fillStyle=fillStyle}
if(strokeStyle){config.subStyle.strokeStyle=strokeStyle}
return config},getSeriesConfig:function(chartSeries){var me=this,style=chartSeries.getStyle(),config;if(chartSeries.isLine){config=me.addCustomStyle({type:'line',fill:!0,xField:chartSeries.getXField(),yField:chartSeries.getYField(),smooth:chartSeries.getSmooth()},style)}else if(chartSeries.isCandleStick){config=me.addCustomStyle({type:'line',fill:!0,xField:chartSeries.getXField(),yField:chartSeries.getCloseField()},style.raiseStyle)}else if(chartSeries.isArea||chartSeries.isBar){config=me.addCustomStyle({type:'area',xField:chartSeries.getXField(),yField:chartSeries.getYField()},style,chartSeries.getSubStyle())}else{Ext.raise("Navigator only works with 'line', 'bar', 'candlestick' and 'area' series.")}
config.style.fillOpacity=0.2;return config},onChartLegendStoreUpdate:function(store,record){var me=this,chart=me.chart,series;if(chart&&record){series=chart.getSeries().map[record.get('series')];if(series&&series.navigatorSeries){series.navigatorSeries.setHiddenByIndex(record.get('index'),record.get('disabled'));me.redraw()}}},setupEvents:function(){var me=this,overlayEl=me.overlaySurface.element;overlayEl.on({scope:me,drag:'onDrag',dragstart:'onDragStart',dragend:'onDragEnd',dragcancel:'onDragEnd',mousemove:'onMouseMove'})},onMouseMove:function(e){var me=this,overlayEl=me.overlaySurface.element,style=overlayEl.dom.style,dragType=me.getDragType(e.pageX-overlayEl.getXY()[0]);switch(dragType){case 'min':case 'max':style.cursor='ew-resize';break;case 'pan':style.cursor='move';break;default:style.cursor='default'}},getDragType:function(x){var me=this,t=me.getTolerance(),width=me.overlaySurface.element.getSize().width,rangeMask=me.rangeMask,min=width*rangeMask.attr.min,max=width*rangeMask.attr.max,dragType;if(x>min+t&&x<max-t){dragType='pan'}else if(x<=min+t&&x>min-t){dragType='min'}else if(x>=max-t&&x<max+t){dragType='max'}
return dragType},onDragStart:function(e){var me=this,x,dragType;if(me.dragType||e&&e.touches&&e.touches.length>1){return}
x=e.touches[0].pageX-me.overlaySurface.element.getXY()[0];dragType=me.getDragType(x);me.rangeMask.attr.thumbOpacity=1;if(dragType){me.dragType=dragType;me.touchId=e.touches[0].identifier;me.dragX=x}},onDrag:function(e){if(e.touch.identifier!==this.touchId){return}
var me=this,overlayEl=me.overlaySurface.element,width=overlayEl.getSize().width,x=e.touches[0].pageX-overlayEl.getXY()[0],thumbGap=me.getThumbGap()/width,rangeMask=me.rangeMask,min=rangeMask.attr.min,max=rangeMask.attr.max,delta=max-min,dragType=me.dragType,drag=me.dragX,dx=(x-drag)/width;if(dragType==='pan'){min+=dx;max+=dx;if(min<0){min=0;max=delta}
if(max>1){max=1;min=max-delta}}else if(dragType==='min'){min+=dx;if(min<0){min=0}
if(min>max-thumbGap){min=max-thumbGap}}else if(dragType==='max'){max+=dx;if(max>1){max=1}
if(max<min+thumbGap){max=min+thumbGap}}else{return}
me.dragX=x;me.setVisibleRange([min,max])},onDragEnd:function(){var me=this,autoHideThumbs=me.getAutoHideThumbs();me.dragType=null;if(autoHideThumbs){me.rangeMask.setAttributes({thumbOpacity:0})}},updateMinimum:function(mininum){if(!this.isConfiguring){this.setVisibleRange([mininum,this.getMaximum()])}},updateMaximum:function(maximum){if(!this.isConfiguring){this.setVisibleRange([this.getMinimum(),maximum])}},getMinimum:function(){return this.rangeMask.attr.min},getMaximum:function(){return this.rangeMask.attr.max},setVisibleRange:function(visibleRange){var me=this,chart=me.chart;me.axis.setVisibleRange(visibleRange);me.rangeMask.setAttributes({min:visibleRange[0],max:visibleRange[1]});me.getSurface('overlay').renderFrame();chart.suspendAnimation();chart.redraw();chart.resumeAnimation()},afterBoundChartLayout:function(){var me=this,spanSeries=me.getSpan()==='series',mainRect=me.chart.getMainRect(),size=me.element.getSize();if(mainRect&&spanSeries){me.setInsetPadding({left:mainRect[0],right:size.width-mainRect[2]-mainRect[0],top:0,bottom:0});me.performLayout()}},afterChartLayout:function(){var me=this,size=me.overlaySurface.element.getSize();me.rangeMask.setAttributes({scalingCenterX:0,scalingCenterY:0,scalingX:size.width,scalingY:size.height})},doDestroy:function(){var chart=this.chart;if(chart&&!chart.destroyed){chart.un('layout','afterBoundChartLayout',this)}
this.callParent()}})
;
Ext.define('Ext.chart.navigator.Container',{extend:'Ext.chart.navigator.ContainerBase',requires:['Ext.chart.CartesianChart','Ext.chart.navigator.Navigator'],xtype:'chartnavigator',config:{chart:null,navigator:{}},layout:'fit',applyChart:function(chart,oldChart){if(oldChart){oldChart.destroy()}
if(chart){if(chart.isCartesian){Ext.raise('Only cartesian charts are supported.')}
if(!chart.isChart){chart.$initParent=this;chart=new Ext.chart.CartesianChart(chart);delete chart.$initParent}}
return chart},legendStore:null,surfaceRects:null,updateChart:function(chart,oldChart){var me=this;if(chart){me.legendStore=chart.getLegendStore();if(!me.items&&me.initItems){me.initItems()}
me.add(chart)}},applyNavigator:function(navigator,oldNavigator){var instance;if(oldNavigator){oldNavigator.destroy()}
if(navigator){navigator.navigatorContainer=navigator.parent=this;instance=new Ext.chart.navigator.Navigator(navigator)}
return instance},preview:function(){this.getNavigator().preview(this.getImage())},download:function(config){config=config||{};config.data=this.getImage().data;this.getNavigator().download(config)},setVisibleRange:function(visibleRange){this.getNavigator().setVisibleRange(visibleRange)},getImage:function(format){var me=this,chart=me.getChart(),navigator=me.getNavigator(),docked=navigator.getDocked(),chartImageSize=chart.bodyElement.getSize(),navigatorImageSize=navigator.bodyElement.getSize(),chartSurfaces=chart.getSurfaces(!0),navigatorSurfaces=navigator.getSurfaces(!0),size={width:chartImageSize.width,height:chartImageSize.height+navigatorImageSize.height},image,imageElement,surfaces,surface;if(docked==='top'){me.shiftSurfaces(chartSurfaces,0,navigatorImageSize.height)}else{me.shiftSurfaces(navigatorSurfaces,0,chartImageSize.height)}
surfaces=chartSurfaces.concat(navigatorSurfaces);surface=surfaces[0];if((Ext.isIE||Ext.isEdge)&&surface.isSVG){image={data:surface.toSVG(size,surfaces),type:'svg-markup'}}else{image=surface.flatten(size,surfaces);if(format==='image'){imageElement=new Image();imageElement.src=image.data;image.data=imageElement;return image}
if(format==='stream'){image.data=image.data.replace(/^data:image\/[^;]+/,'data:application/octet-stream');return image}}
me.unshiftSurfaces(surfaces);return image},shiftSurfaces:function(surfaces,x,y){var ln=surfaces.length,i=0,surface;this.surfaceRects={};for(;i<ln;i++){surface=surfaces[i];this.shiftSurface(surface,x,y)}},shiftSurface:function(surface,x,y){var rect=surface.getRect();this.surfaceRects[surface.getId()]=rect.slice();rect[0]+=x;rect[1]+=y},unshiftSurfaces:function(surfaces){var rects=this.surfaceRects,ln=surfaces.length,i=0,surface,rect,oldRect;if(rects){for(;i<ln;i++){surface=surfaces[i];rect=surface.getRect();oldRect=rects[surface.getId()];if(oldRect){rect[0]=oldRect[0];rect[1]=oldRect[1]}}}
this.surfaceRects=null}})
;
Ext.define('Ext.chart.plugin.ItemEvents',{extend:'Ext.plugin.Abstract',alias:'plugin.chartitemevents',moveEvents:!1,mouseMoveEvents:{mousemove:!0,mouseover:!0,mouseout:!0},itemMouseMoveEvents:{itemmousemove:!0,itemmouseover:!0,itemmouseout:!0},init:function(chart){var handleEvent='handleEvent';this.chart=chart;chart.addElementListener({click:handleEvent,tap:handleEvent,dblclick:handleEvent,mousedown:handleEvent,mousemove:handleEvent,mouseup:handleEvent,mouseover:handleEvent,mouseout:handleEvent,priority:1001,scope:this})},hasItemMouseMoveListeners:function(){var listeners=this.chart.hasListeners,name;for(name in this.itemMouseMoveEvents){if(name in listeners){return!0}}
return!1},handleEvent:function(e){var me=this,chart=me.chart,isMouseMoveEvent=e.type in me.mouseMoveEvents,lastItem=me.lastItem,chartXY,item;if(isMouseMoveEvent&&!me.hasItemMouseMoveListeners()&&!me.moveEvents){return}
chartXY=chart.getEventXY(e);item=chart.getItemForPoint(chartXY[0],chartXY[1]);if(isMouseMoveEvent&&!Ext.Object.equals(item,lastItem)){if(lastItem){chart.fireEvent('itemmouseout',chart,lastItem,e);lastItem.series.fireEvent('itemmouseout',lastItem.series,lastItem,e)}
if(item){chart.fireEvent('itemmouseover',chart,item,e);item.series.fireEvent('itemmouseover',item.series,item,e)}}
if(item){chart.fireEvent('item'+e.type,chart,item,e);item.series.fireEvent('item'+e.type,item.series,item,e)}
me.lastItem=item}})
;
Ext.define('Ext.chart.series.Cartesian',{extend:'Ext.chart.series.Series',config:{xField:null,yField:null,xAxis:null,yAxis:null},directions:['X','Y'],fieldCategoryX:['X'],fieldCategoryY:['Y'],applyXAxis:function(newAxis,oldAxis){return this.getChart().getAxis(newAxis)||oldAxis},applyYAxis:function(newAxis,oldAxis){return this.getChart().getAxis(newAxis)||oldAxis},updateXAxis:function(axis){axis.processData(this)},updateYAxis:function(axis){axis.processData(this)},coordinateX:function(){return this.coordinate('X',0,2)},coordinateY:function(){return this.coordinate('Y',1,2)},getItemForPoint:function(x,y){var me=this,sprite=me.getSprites()[0],store=me.getStore(),point;if(sprite&&!me.getHidden()){point=sprite.getNearestDataPoint(x,y)}
return point?{series:me,sprite:sprite,category:me.getItemInstancing()?'items':'markers',index:point.index,record:store.getData().items[point.index],field:me.getYField(),distance:point.distance}:null},createSprite:function(){var me=this,sprite=me.callParent(),chart=me.getChart(),xAxis=me.getXAxis();sprite.setAttributes({flipXY:chart.getFlipXY(),xAxis:xAxis});if(sprite.setAggregator&&xAxis&&xAxis.getAggregator){if(xAxis.getAggregator){sprite.setAggregator({strategy:xAxis.getAggregator()})}else{sprite.setAggregator({})}}
return sprite},getSprites:function(){var me=this,chart=this.getChart(),sprites=me.sprites;if(!chart){return Ext.emptyArray}
if(!sprites.length){me.createSprite()}
return sprites},getXRange:function(){return[this.dataRange[0],this.dataRange[2]]},getYRange:function(){return[this.dataRange[1],this.dataRange[3]]}})
;
Ext.define('Ext.chart.series.StackedCartesian',{extend:'Ext.chart.series.Cartesian',config:{stacked:!0,splitStacks:!0,fullStack:!1,fullStackTotal:100,hidden:[]},reversedSpriteZOrder:!0,spriteAnimationCount:0,themeColorCount:function(){var me=this,yField=me.getYField();return Ext.isArray(yField)?yField.length:1},updateStacked:function(){this.processData()},updateSplitStacks:function(){this.processData()},coordinateY:function(){return this.coordinateStacked('Y',1,2)},coordinateStacked:function(direction,directionOffset,directionCount){var me=this,store=me.getStore(),items=store.getData().items,itemCount=items.length,axis=me['get'+direction+'Axis'](),hidden=me.getHidden(),splitStacks=me.getSplitStacks(),fullStack=me.getFullStack(),fullStackTotal=me.getFullStackTotal(),range=[0,0],directions=me['fieldCategory'+direction],dataStart=[],posDataStart=[],negDataStart=[],dataEnd,stacked=me.getStacked(),sprites=me.getSprites(),coordinatedData=[],i,j,k,fields,fieldCount,posTotals,negTotals,fieldCategoriesItem,data,attr;if(!sprites.length){return}
for(i=0;i<directions.length;i++){fieldCategoriesItem=directions[i];fields=me.getFields([fieldCategoriesItem]);fieldCount=fields.length;for(j=0;j<itemCount;j++){dataStart[j]=0;posDataStart[j]=0;negDataStart[j]=0}
for(j=0;j<fieldCount;j++){if(!hidden[j]){coordinatedData[j]=me.coordinateData(items,fields[j],axis)}}
if(stacked&&fullStack){posTotals=[];if(splitStacks){negTotals=[]}
for(j=0;j<itemCount;j++){posTotals[j]=0;if(splitStacks){negTotals[j]=0}
for(k=0;k<fieldCount;k++){data=coordinatedData[k];if(!data){continue}
data=data[j];if(data>=0||!splitStacks){posTotals[j]+=data}else if(data<0){negTotals[j]+=data}}}}
for(j=0;j<fieldCount;j++){attr={};if(hidden[j]){attr['dataStart'+fieldCategoriesItem]=dataStart;attr['data'+fieldCategoriesItem]=dataStart;sprites[j].setAttributes(attr);continue}
data=coordinatedData[j];if(stacked){dataEnd=[];for(k=0;k<itemCount;k++){if(!data[k]){data[k]=0}
if(data[k]>=0||!splitStacks){if(fullStack&&posTotals[k]){data[k]*=fullStackTotal/posTotals[k]}
dataStart[k]=posDataStart[k];posDataStart[k]+=data[k];dataEnd[k]=posDataStart[k]}else{if(fullStack&&negTotals[k]){data[k]*=fullStackTotal/negTotals[k]}
dataStart[k]=negDataStart[k];negDataStart[k]+=data[k];dataEnd[k]=negDataStart[k]}}
attr['dataStart'+fieldCategoriesItem]=dataStart;attr['data'+fieldCategoriesItem]=dataEnd;Ext.chart.Util.expandRange(range,dataStart);Ext.chart.Util.expandRange(range,dataEnd)}else{attr['dataStart'+fieldCategoriesItem]=dataStart;attr['data'+fieldCategoriesItem]=data;Ext.chart.Util.expandRange(range,data)}
sprites[j].setAttributes(attr)}}
range=Ext.chart.Util.validateRange(range,me.defaultRange);me.dataRange[directionOffset]=range[0];me.dataRange[directionOffset+directionCount]=range[1];attr={};attr['dataMin'+direction]=range[0];attr['dataMax'+direction]=range[1];for(i=0;i<sprites.length;i++){sprites[i].setAttributes(attr)}},getFields:function(fieldCategory){var me=this,fields=[],ln=fieldCategory.length,i,fieldsItem;for(i=0;i<ln;i++){fieldsItem=me['get'+fieldCategory[i]+'Field']();if(Ext.isArray(fieldsItem)){fields.push.apply(fields,fieldsItem)}else{fields.push(fieldsItem)}}
return fields},updateLabelOverflowPadding:function(labelOverflowPadding){var me=this,label;if(!me.isConfiguring){label=me.getLabel();if(label){label.setAttributes({labelOverflowPadding:labelOverflowPadding})}}},updateLabelData:function(){var me=this,label=me.getLabel();if(label){label.setAttributes({labelOverflowPadding:me.getLabelOverflowPadding()})}
me.callParent()},getSprites:function(){var me=this,chart=me.getChart(),fields=me.getFields(me.fieldCategoryY),itemInstancing=me.getItemInstancing(),sprites=me.sprites,hidden=me.getHidden(),spritesCreated=!1,fieldCount=fields.length,i,sprite;if(!chart){return[]}
for(i=0;i<fieldCount;i++){sprite=sprites[i];if(!sprite){sprite=me.createSprite();sprite.setAttributes({zIndex:(me.reversedSpriteZOrder?-1:1)*i});sprite.setField(fields[i]);spritesCreated=!0;hidden.push(!1);if(itemInstancing){sprite.getMarker('items').getTemplate().setAttributes(me.getStyleByIndex(i))}else{sprite.setAttributes(me.getStyleByIndex(i))}}}
if(spritesCreated){me.updateHidden(hidden)}
return sprites},getItemForPoint:function(x,y){var me=this,sprites=me.getSprites(),store=me.getStore(),hidden=me.getHidden(),minDistance=Infinity,item=null,spriteIndex=-1,pointIndex=-1,point,yField,sprite,i,ln;for(i=0,ln=sprites.length;i<ln;i++){if(hidden[i]){continue}
sprite=sprites[i];point=sprite.getNearestDataPoint(x,y);if(point){if(point.distance<minDistance){minDistance=point.distance;pointIndex=point.index;spriteIndex=i}}}
if(spriteIndex>-1){yField=me.getYField();item={series:me,sprite:sprites[spriteIndex],category:me.getItemInstancing()?'items':'markers',index:pointIndex,record:store.getData().items[pointIndex],field:typeof yField==='string'?yField:yField[spriteIndex],distance:minDistance}}
return item},provideLegendInfo:function(target){var me=this,sprites=me.getSprites(),title=me.getTitle(),field=me.getYField(),hidden=me.getHidden(),single=sprites.length===1,style,fill,i,name;for(i=0;i<sprites.length;i++){style=me.getStyleByIndex(i);fill=style.fillStyle;if(title){if(Ext.isArray(title)){name=title[i]}else if(single){name=title}}
if(!title||!name){if(Ext.isArray(field)){name=field[i]}else{name=me.getId()}}
target.push({name:name,mark:(Ext.isObject(fill)?fill.stops&&fill.stops[0].color:fill)||style.strokeStyle||'black',disabled:hidden[i],series:me.getId(),index:i})}},onSpriteAnimationStart:function(sprite){this.spriteAnimationCount++;if(this.spriteAnimationCount===1){this.fireEvent('animationstart')}},onSpriteAnimationEnd:function(sprite){this.spriteAnimationCount--;if(this.spriteAnimationCount===0){this.fireEvent('animationend')}}})
;
Ext.define('Ext.chart.series.sprite.Series',{extend:'Ext.draw.sprite.Sprite',mixins:{markerHolder:'Ext.chart.MarkerHolder'},inheritableStatics:{def:{processors:{dataMinX:'number',dataMaxX:'number',dataMinY:'number',dataMaxY:'number',rangeX:'data',rangeY:'data',dataX:'data',dataY:'data',labels:'default',labelOverflowPadding:'number'},defaults:{dataMinX:0,dataMaxX:1,dataMinY:0,dataMaxY:1,rangeX:null,rangeY:null,dataX:null,dataY:null,labels:null,labelOverflowPadding:10},triggers:{dataX:'bbox',dataY:'bbox',dataMinX:'bbox',dataMaxX:'bbox',dataMinY:'bbox',dataMaxY:'bbox'}}},config:{store:null,series:null,field:null}})
;
Ext.define('Ext.chart.series.sprite.Cartesian',{extend:'Ext.chart.series.sprite.Series',inheritableStatics:{def:{processors:{selectionTolerance:'number',flipXY:'bool',renderer:'default',visibleMinX:'number',visibleMinY:'number',visibleMaxX:'number',visibleMaxY:'number',innerWidth:'number',innerHeight:'number'},defaults:{selectionTolerance:20,flipXY:!1,renderer:null,transformFillStroke:!1,visibleMinX:0,visibleMinY:0,visibleMaxX:1,visibleMaxY:1,innerWidth:1,innerHeight:1},triggers:{dataX:'dataX,bbox',dataY:'dataY,bbox',visibleMinX:'panzoom',visibleMinY:'panzoom',visibleMaxX:'panzoom',visibleMaxY:'panzoom',innerWidth:'panzoom',innerHeight:'panzoom'},updaters:{dataX:function(attr){this.processDataX();this.scheduleUpdater(attr,'dataY',['dataY'])},dataY:function(){this.processDataY()},panzoom:function(attr){var dx=attr.visibleMaxX-attr.visibleMinX,dy=attr.visibleMaxY-attr.visibleMinY,innerWidth=attr.flipXY?attr.innerHeight:attr.innerWidth,innerHeight=!attr.flipXY?attr.innerHeight:attr.innerWidth,surface=this.getSurface(),isRtl=surface?surface.getInherited().rtl:!1;attr.scalingCenterX=0;attr.scalingCenterY=0;attr.scalingX=innerWidth/dx;attr.scalingY=innerHeight/dy;attr.translationX=-(attr.visibleMinX*attr.scalingX);attr.translationY=-(attr.visibleMinY*attr.scalingY);if(isRtl&&!attr.flipXY){attr.scalingX*=-1;attr.translationX*=-1;attr.translationX+=innerWidth}
this.applyTransformations(!0)}}}},processDataY:Ext.emptyFn,processDataX:Ext.emptyFn,updatePlainBBox:function(plain){var attr=this.attr;plain.x=attr.dataMinX;plain.y=attr.dataMinY;plain.width=attr.dataMaxX-attr.dataMinX;plain.height=attr.dataMaxY-attr.dataMinY},binarySearch:function(key){var dx=this.attr.dataX,start=0,end=dx.length,mid,val;if(key<=dx[0]){return start}
if(key>=dx[end-1]){return end-1}
while(start+1<end){mid=(start+end)>>1;val=dx[mid];if(val===key){return mid}else if(val<key){start=mid}else{end=mid}}
return start},render:function(surface,ctx,surfaceClipRect){var me=this,attr=me.attr,margin=1,inverseMatrix=attr.inverseMatrix.clone(),dataClipRect;inverseMatrix.appendMatrix(surface.inverseMatrix);if(attr.dataX===null||attr.dataX===undefined){return}
if(attr.dataY===null||attr.dataY===undefined){return}
if(inverseMatrix.getXX()*inverseMatrix.getYX()||inverseMatrix.getXY()*inverseMatrix.getYY()){Ext.Logger.warn('Cartesian Series sprite does not support rotation/sheering');return}
dataClipRect=inverseMatrix.transformList([[surfaceClipRect[0]-margin,surfaceClipRect[3]+margin],[surfaceClipRect[0]+surfaceClipRect[2]+margin,-margin]]);dataClipRect=dataClipRect[0].concat(dataClipRect[1]);me.renderClipped(surface,ctx,dataClipRect,surfaceClipRect)},renderClipped:Ext.emptyFn,getIndexNearPoint:function(x,y){var result=this.getNearestDataPoint(x,y);return result?result.index:-1},getNearestDataPoint:function(x,y){var me=this,attr=me.attr,series=me.getSeries(),surface=me.getSurface(),items=me.boundMarkers.items,matrix=attr.matrix,dataX=attr.dataX,dataY=attr.dataY,selectionTolerance=attr.selectionTolerance,minDistance=Infinity,index=-1,result=null,distance,dx,dy,xy,i,ln,end,inc,bbox;if(items){ln=dataX.length;if(series.reversedSpriteZOrder){i=ln-1;end=-1;inc=-1}else{i=0;end=ln;inc=1}
for(;i!==end;i+=inc){bbox=me.getMarkerBBox('items',i);xy=surface.inverseMatrix.transformPoint([x,y]);if(Ext.draw.Draw.isPointInBBox(xy[0],xy[1],bbox)){index=i;minDistance=0;break}}}else{for(i=0,ln=dataX.length;i<ln;i++){xy=matrix.transformPoint([dataX[i],dataY[i]]);xy=surface.matrix.transformPoint(xy);dx=x-xy[0];dy=y-xy[1];distance=Math.sqrt(dx*dx+dy*dy);if(selectionTolerance&&distance>selectionTolerance){continue}
if(distance<minDistance){minDistance=distance;index=i}}}
if(index>-1){result={index:index,distance:minDistance}}
return result}})
;
Ext.define('Ext.chart.series.sprite.StackedCartesian',{extend:'Ext.chart.series.sprite.Cartesian',inheritableStatics:{def:{processors:{groupCount:'number',groupOffset:'number',dataStartY:'data'},defaults:{selectionTolerance:20,groupCount:1,groupOffset:0,dataStartY:null},triggers:{dataStartY:'dataY,bbox'}}}})
;
Ext.define('Ext.chart.series.sprite.Area',{alias:'sprite.areaSeries',extend:'Ext.chart.series.sprite.StackedCartesian',inheritableStatics:{def:{processors:{step:'bool'},defaults:{selectionTolerance:0,step:!1}}},renderClipped:function(surface,ctx,dataClipRect){var me=this,store=me.getStore(),series=me.getSeries(),attr=me.attr,dataX=attr.dataX,dataY=attr.dataY,dataStartY=attr.dataStartY,matrix=attr.matrix,x,y,i,lastX,lastY,startX,startY,xx=matrix.elements[0],dx=matrix.elements[4],yy=matrix.elements[3],dy=matrix.elements[5],surfaceMatrix=me.surfaceMatrix,markerCfg={},min=Math.min(dataClipRect[0],dataClipRect[2]),max=Math.max(dataClipRect[0],dataClipRect[2]),start=Math.max(0,this.binarySearch(min)),end=Math.min(dataX.length-1,this.binarySearch(max)+1),renderer=attr.renderer,rendererData={store:store},rendererChanges;ctx.beginPath();startX=dataX[start]*xx+dx;startY=dataY[start]*yy+dy;ctx.moveTo(startX,startY);if(attr.step){lastY=startY;for(i=start;i<=end;i++){x=dataX[i]*xx+dx;y=dataY[i]*yy+dy;ctx.lineTo(x,lastY);ctx.lineTo(x,lastY=y)}}else{for(i=start;i<=end;i++){x=dataX[i]*xx+dx;y=dataY[i]*yy+dy;ctx.lineTo(x,y)}}
if(dataStartY){if(attr.step){lastX=dataX[end]*xx+dx;for(i=end;i>=start;i--){x=dataX[i]*xx+dx;y=dataStartY[i]*yy+dy;ctx.lineTo(lastX,y);ctx.lineTo(lastX=x,y)}}else{for(i=end;i>=start;i--){x=dataX[i]*xx+dx;y=dataStartY[i]*yy+dy;ctx.lineTo(x,y)}}}else{ctx.lineTo(dataX[end]*xx+dx,y);ctx.lineTo(dataX[end]*xx+dx,dy);ctx.lineTo(startX,dy);ctx.lineTo(startX,dataY[i]*yy+dy)}
if(attr.transformFillStroke){attr.matrix.toContext(ctx)}
ctx.fill();if(attr.transformFillStroke){attr.inverseMatrix.toContext(ctx)}
ctx.beginPath();ctx.moveTo(startX,startY);if(attr.step){for(i=start;i<=end;i++){x=dataX[i]*xx+dx;y=dataY[i]*yy+dy;ctx.lineTo(x,lastY);ctx.lineTo(x,lastY=y);markerCfg.translationX=surfaceMatrix.x(x,y);markerCfg.translationY=surfaceMatrix.y(x,y);if(renderer){rendererChanges=Ext.callback(renderer,null,[me,markerCfg,rendererData,i],0,series);Ext.apply(markerCfg,rendererChanges)}
me.putMarker('markers',markerCfg,i,!renderer)}}else{for(i=start;i<=end;i++){x=dataX[i]*xx+dx;y=dataY[i]*yy+dy;ctx.lineTo(x,y);markerCfg.translationX=surfaceMatrix.x(x,y);markerCfg.translationY=surfaceMatrix.y(x,y);if(renderer){rendererChanges=Ext.callback(renderer,null,[me,markerCfg,rendererData,i],0,series);Ext.apply(markerCfg,rendererChanges)}
me.putMarker('markers',markerCfg,i,!renderer)}}
if(attr.transformFillStroke){attr.matrix.toContext(ctx)}
ctx.stroke()}})
;
Ext.define('Ext.chart.series.Area',{extend:'Ext.chart.series.StackedCartesian',alias:'series.area',type:'area',seriesType:'areaSeries',isArea:!0,requires:['Ext.chart.series.sprite.Area'],config:{splitStacks:!1}})
;
Ext.define('Ext.chart.series.sprite.Bar',{alias:'sprite.barSeries',extend:'Ext.chart.series.sprite.StackedCartesian',inheritableStatics:{def:{processors:{minBarWidth:'number',maxBarWidth:'number',minGapWidth:'number',radius:'number',inGroupGapWidth:'number'},defaults:{minBarWidth:2,maxBarWidth:100,minGapWidth:5,inGroupGapWidth:3,radius:0}}},drawLabel:function(text,dataX,dataStartY,dataY,labelId){var me=this,attr=me.attr,label=me.getMarker('labels'),labelTpl=label.getTemplate(),labelCfg=me.labelCfg||(me.labelCfg={}),surfaceMatrix=me.surfaceMatrix,labelOverflowPadding=attr.labelOverflowPadding,labelDisplay=labelTpl.attr.display,labelOrientation=labelTpl.attr.orientation,isVerticalText=(labelOrientation==='horizontal'&&attr.flipXY)||(labelOrientation==='vertical'&&!attr.flipXY)||!labelOrientation,calloutLine=labelTpl.getCalloutLine(),labelY,halfText,labelBBox,calloutLineLength,changes,hasPendingChanges,params;labelCfg.x=surfaceMatrix.x(dataX,dataY);labelCfg.y=surfaceMatrix.y(dataX,dataY);if(calloutLine){calloutLineLength=calloutLine.length}else{calloutLineLength=0}
if(!attr.flipXY){labelCfg.rotationRads=-Math.PI*0.5}else{labelCfg.rotationRads=0}
labelCfg.calloutVertical=!attr.flipXY;switch(labelOrientation){case 'horizontal':labelCfg.rotationRads=0;labelCfg.calloutVertical=!1;break;case 'vertical':labelCfg.rotationRads=-Math.PI*0.5;labelCfg.calloutVertical=!0;break}
labelCfg.text=text;if(labelTpl.attr.renderer){if(!label.get(labelId)){label.putMarkerFor('labels',{},labelId)}
params=[text,label,labelCfg,{store:me.getStore()},labelId];changes=Ext.callback(labelTpl.attr.renderer,null,params,0,me.getSeries());if(typeof changes==='string'){labelCfg.text=changes}else if(typeof changes==='object'){if('text' in changes){labelCfg.text=changes.text}
hasPendingChanges=!0}}
labelBBox=me.getMarkerBBox('labels',labelId,!0);if(!labelBBox){me.putMarker('labels',labelCfg,labelId);labelBBox=me.getMarkerBBox('labels',labelId,!0)}
if(calloutLineLength>0){halfText=calloutLineLength}else if(calloutLineLength===0){halfText=(isVerticalText?labelBBox.width:labelBBox.height)/2}else{halfText=(isVerticalText?labelBBox.width:labelBBox.height)/2+labelOverflowPadding}
if(dataStartY>dataY){halfText=-halfText}
if(isVerticalText){labelY=(labelDisplay==='insideStart')?dataStartY+halfText:dataY-halfText}else{labelY=(labelDisplay==='insideStart')?dataStartY+labelOverflowPadding*2:dataY-labelOverflowPadding*2}
labelCfg.x=surfaceMatrix.x(dataX,labelY);labelCfg.y=surfaceMatrix.y(dataX,labelY);labelY=(labelDisplay==='insideStart')?dataStartY:dataY;labelCfg.calloutStartX=surfaceMatrix.x(dataX,labelY);labelCfg.calloutStartY=surfaceMatrix.y(dataX,labelY);labelY=(labelDisplay==='insideStart')?dataStartY-halfText:dataY+halfText;labelCfg.calloutPlaceX=surfaceMatrix.x(dataX,labelY);labelCfg.calloutPlaceY=surfaceMatrix.y(dataX,labelY);labelCfg.calloutColor=(calloutLine&&calloutLine.color)||me.attr.fillStyle;if(calloutLine){if(calloutLine.width){labelCfg.calloutWidth=calloutLine.width}}else{labelCfg.calloutColor='none'}
if(dataStartY>dataY){halfText=-halfText}
if(Math.abs(dataY-dataStartY)<=halfText*2||labelDisplay==='outside'){labelCfg.callout=1}else{labelCfg.callout=0}
if(hasPendingChanges){Ext.apply(labelCfg,changes)}
me.putMarker('labels',labelCfg,labelId)},drawBar:function(ctx,surface,rect,left,top,right,bottom,index){var me=this,itemCfg={},renderer=me.attr.renderer,changes;itemCfg.x=left;itemCfg.y=top;itemCfg.width=right-left;itemCfg.height=bottom-top;itemCfg.radius=me.attr.radius;if(renderer){changes=Ext.callback(renderer,null,[me,itemCfg,{store:me.getStore()},index],0,me.getSeries());Ext.apply(itemCfg,changes)}
me.putMarker('items',itemCfg,index,!renderer)},renderClipped:function(surface,ctx,dataClipRect){if(this.cleanRedraw){return}
var me=this,attr=me.attr,dataX=attr.dataX,dataY=attr.dataY,dataText=attr.labels,dataStartY=attr.dataStartY,groupCount=attr.groupCount,groupOffset=attr.groupOffset-(groupCount-1)*0.5,inGroupGapWidth=attr.inGroupGapWidth,lineWidth=ctx.lineWidth,matrix=attr.matrix,xx=matrix.elements[0],yy=matrix.elements[3],dx=matrix.elements[4],dy=surface.roundPixel(matrix.elements[5])-1,maxBarWidth=Math.abs(xx)-attr.minGapWidth,minBarWidth=(Math.min(maxBarWidth,attr.maxBarWidth)-inGroupGapWidth*(groupCount-1))/groupCount,barWidth=surface.roundPixel(Math.max(attr.minBarWidth,minBarWidth)),surfaceMatrix=me.surfaceMatrix,left,right,bottom,top,i,center,halfLineWidth=0.5*attr.lineWidth,min=Math.min(dataClipRect[0],dataClipRect[2]),max=Math.max(dataClipRect[0],dataClipRect[2]),start=Math.max(0,Math.floor(min)),end=Math.min(dataX.length-1,Math.ceil(max)),isDrawLabels=dataText&&me.getMarker('labels'),yLow,yHi;for(i=start;i<=end;i++){yLow=dataStartY?dataStartY[i]:0;yHi=dataY[i];center=dataX[i]*xx+dx+groupOffset*(barWidth+inGroupGapWidth);left=surface.roundPixel(center-barWidth/2)+halfLineWidth;top=surface.roundPixel(yHi*yy+dy+lineWidth);right=surface.roundPixel(center+barWidth/2)-halfLineWidth;bottom=surface.roundPixel(yLow*yy+dy+lineWidth);me.drawBar(ctx,surface,dataClipRect,left,top-halfLineWidth,right,bottom-halfLineWidth,i);if(isDrawLabels&&dataText[i]!=null){me.drawLabel(dataText[i],center,bottom,top,i)}
me.putMarker('markers',{translationX:surfaceMatrix.x(center,top),translationY:surfaceMatrix.y(center,top)},i,!0)}}})
;
Ext.define('Ext.chart.series.Bar',{extend:'Ext.chart.series.StackedCartesian',alias:'series.bar',type:'bar',seriesType:'barSeries',isBar:!0,requires:['Ext.chart.series.sprite.Bar','Ext.draw.sprite.Rect'],config:{itemInstancing:{type:'rect',animation:{customDurations:{x:0,y:0,width:0,height:0,radius:0}}}},getItemForPoint:function(x,y){var chart,padding,isRtl;if(this.getSprites().length){chart=this.getChart();padding=chart.getInnerPadding();isRtl=chart.getInherited().rtl;arguments[0]=x+(isRtl?padding.right:-padding.left);arguments[1]=y+padding.bottom;return this.callParent(arguments)}},updateXAxis:function(xAxis){if(!this.is3D&&!xAxis.isCategory){Ext.raise("'bar' series should be used with a 'category' axis. "+"Please refer to the bar series docs.")}
xAxis.setExpandRangeBy(0.5);this.callParent(arguments)},updateHidden:function(hidden){this.callParent(arguments);this.updateStacked()},updateStacked:function(stacked){var me=this,attributes={},sprites=me.getSprites(),spriteCount=sprites.length,visibleSprites=[],visibleSpriteCount,i;for(i=0;i<spriteCount;i++){if(!sprites[i].attr.hidden){visibleSprites.push(sprites[i])}}
visibleSpriteCount=visibleSprites.length;if(me.getStacked()){attributes.groupCount=1;attributes.groupOffset=0;for(i=0;i<visibleSpriteCount;i++){visibleSprites[i].setAttributes(attributes)}}else{attributes.groupCount=visibleSpriteCount;for(i=0;i<visibleSpriteCount;i++){attributes.groupOffset=i;visibleSprites[i].setAttributes(attributes)}}
me.callParent(arguments)}})
;
Ext.define('Ext.chart.series.sprite.Bar3D',{extend:'Ext.chart.series.sprite.Bar',alias:'sprite.bar3dSeries',requires:['Ext.draw.gradient.Linear'],inheritableStatics:{def:{processors:{depthWidthRatio:'number',saturationFactor:'number',brightnessFactor:'number',colorSpread:'number'},defaults:{depthWidthRatio:1/3,saturationFactor:1,brightnessFactor:1,colorSpread:1,transformFillStroke:!0},triggers:{groupCount:'panzoom'},updaters:{panzoom:function(attr){var me=this,dx=attr.visibleMaxX-attr.visibleMinX,dy=attr.visibleMaxY-attr.visibleMinY,innerWidth=attr.flipXY?attr.innerHeight:attr.innerWidth,innerHeight=!attr.flipXY?attr.innerHeight:attr.innerWidth,surface=me.getSurface(),isRtl=surface?surface.getInherited().rtl:!1;if(isRtl&&!attr.flipXY){attr.translationX=innerWidth+attr.visibleMinX*innerWidth/dx}else{attr.translationX=-attr.visibleMinX*innerWidth/dx}
attr.translationY=-attr.visibleMinY*(innerHeight-me.depth)/dy;attr.scalingX=(isRtl&&!attr.flipXY?-1:1)*innerWidth/dx;attr.scalingY=(innerHeight-me.depth)/dy;attr.scalingCenterX=0;attr.scalingCenterY=0;me.applyTransformations(!0)}}}},config:{showStroke:!1},depth:0,drawBar:function(ctx,surface,clip,left,top,right,bottom,index){var me=this,attr=me.attr,itemCfg={},renderer=attr.renderer,changes,depth,series,params;itemCfg.x=(left+right)*0.5;itemCfg.y=top;itemCfg.width=(right-left)*0.75;itemCfg.height=bottom-top;itemCfg.depth=depth=itemCfg.width*attr.depthWidthRatio;itemCfg.orientation=attr.flipXY?'horizontal':'vertical';itemCfg.saturationFactor=attr.saturationFactor;itemCfg.brightnessFactor=attr.brightnessFactor;itemCfg.colorSpread=attr.colorSpread;if(depth!==me.depth){me.depth=depth;series=me.getSeries();series.fireEvent('depthchange',series,depth)}
if(renderer){params=[me,itemCfg,{store:me.getStore()},index];changes=Ext.callback(renderer,null,params,0,me.getSeries());Ext.apply(itemCfg,changes)}
me.putMarker('items',itemCfg,index,!renderer)}})
;
Ext.define('Ext.chart.sprite.Bar3D',{extend:'Ext.draw.sprite.Sprite',alias:'sprite.bar3d',type:'bar3d',inheritableStatics:{def:{processors:{x:'number',y:'number',width:'number',height:'number',depth:'number',orientation:'enums(vertical,horizontal)',showStroke:'bool',saturationFactor:'number',brightnessFactor:'number',colorSpread:'number'},triggers:{x:'bbox',y:'bbox',width:'bbox',height:'bbox',depth:'bbox',orientation:'bbox'},defaults:{x:0,y:0,width:8,height:8,depth:8,orientation:'vertical',showStroke:!1,saturationFactor:1,brightnessFactor:1,colorSpread:1,lineJoin:'bevel'}}},constructor:function(config){this.callParent([config]);this.topGradient=new Ext.draw.gradient.Linear({});this.rightGradient=new Ext.draw.gradient.Linear({});this.frontGradient=new Ext.draw.gradient.Linear({})},updatePlainBBox:function(plain){var attr=this.attr,x=attr.x,y=attr.y,width=attr.width,height=attr.height,depth=attr.depth;plain.x=x-width*0.5;plain.width=width+depth;if(height>0){plain.y=y;plain.height=height+depth}else{plain.y=y+depth;plain.height=height-depth}},render:function(surface,ctx){var me=this,attr=me.attr,center=attr.x,top=attr.y,bottom=top+attr.height,isNegative=top<bottom,halfWidth=attr.width*0.5,depth=attr.depth,isHorizontal=attr.orientation==='horizontal',isTransparent=attr.globalAlpha<1,fillStyle=attr.fillStyle,color=Ext.util.Color.create(fillStyle.isGradient?fillStyle.getStops()[0].color:fillStyle),saturationFactor=attr.saturationFactor,brightnessFactor=attr.brightnessFactor,colorSpread=attr.colorSpread,hsv=color.getHSV(),bbox={},roundX,roundY,temp;if(!attr.showStroke){ctx.strokeStyle=Ext.util.Color.RGBA_NONE}
if(isNegative){temp=top;top=bottom;bottom=temp}
me.topGradient.setDegrees(isHorizontal?0:80);me.topGradient.setStops([{offset:0,color:Ext.util.Color.fromHSV(hsv[0],Ext.Number.constrain(hsv[1]*saturationFactor,0,1),Ext.Number.constrain((0.5+colorSpread*0.10)*brightnessFactor,0,1))},{offset:1,color:Ext.util.Color.fromHSV(hsv[0],Ext.Number.constrain(hsv[1]*saturationFactor,0,1),Ext.Number.constrain((0.5-colorSpread*0.11)*brightnessFactor,0,1))}]);me.rightGradient.setDegrees(isHorizontal?45:90);me.rightGradient.setStops([{offset:0,color:Ext.util.Color.fromHSV(hsv[0],Ext.Number.constrain(hsv[1]*saturationFactor,0,1),Ext.Number.constrain((0.5-colorSpread*0.14)*brightnessFactor,0,1))},{offset:1,color:Ext.util.Color.fromHSV(hsv[0],Ext.Number.constrain(hsv[1]*(1.0+colorSpread*0.4)*saturationFactor,0,1),Ext.Number.constrain((0.5-colorSpread*0.32)*brightnessFactor,0,1))}]);if(isHorizontal){me.frontGradient.setDegrees(0)}else{me.frontGradient.setRadians(Math.atan2(top-bottom,halfWidth*2))}
me.frontGradient.setStops([{offset:0,color:Ext.util.Color.fromHSV(hsv[0],Ext.Number.constrain(hsv[1]*(1.0-colorSpread*0.1)*saturationFactor,0,1),Ext.Number.constrain((0.5+colorSpread*0.1)*brightnessFactor,0,1))},{offset:1,color:Ext.util.Color.fromHSV(hsv[0],Ext.Number.constrain(hsv[1]*(1.0+colorSpread*0.1)*saturationFactor,0,1),Ext.Number.constrain((0.5-colorSpread*0.23)*brightnessFactor,0,1))}]);if(isTransparent||isNegative){ctx.beginPath();ctx.moveTo(center-halfWidth,bottom);ctx.lineTo(center-halfWidth+depth,bottom+depth);ctx.lineTo(center+halfWidth+depth,bottom+depth);ctx.lineTo(center+halfWidth,bottom);ctx.closePath();bbox.x=center-halfWidth;bbox.y=top;bbox.width=halfWidth+depth;bbox.height=depth;ctx.fillStyle=(isHorizontal?me.rightGradient:me.topGradient).generateGradient(ctx,bbox);ctx.fillStroke(attr)}
if(isTransparent){ctx.beginPath();ctx.moveTo(center-halfWidth,top);ctx.lineTo(center-halfWidth+depth,top+depth);ctx.lineTo(center-halfWidth+depth,bottom+depth);ctx.lineTo(center-halfWidth,bottom);ctx.closePath();bbox.x=center+halfWidth;bbox.y=bottom;bbox.width=depth;bbox.height=top+depth-bottom;ctx.fillStyle=(isHorizontal?me.topGradient:me.rightGradient).generateGradient(ctx,bbox);ctx.fillStroke(attr)}
roundY=surface.roundPixel(top);ctx.beginPath();ctx.moveTo(center-halfWidth,roundY);ctx.lineTo(center-halfWidth+depth,top+depth);ctx.lineTo(center+halfWidth+depth,top+depth);ctx.lineTo(center+halfWidth,roundY);ctx.closePath();bbox.x=center-halfWidth;bbox.y=top;bbox.width=halfWidth+depth;bbox.height=depth;ctx.fillStyle=(isHorizontal?me.rightGradient:me.topGradient).generateGradient(ctx,bbox);ctx.fillStroke(attr);roundX=surface.roundPixel(center+halfWidth);ctx.beginPath();ctx.moveTo(roundX,surface.roundPixel(top));ctx.lineTo(center+halfWidth+depth,top+depth);ctx.lineTo(center+halfWidth+depth,bottom+depth);ctx.lineTo(roundX,bottom);ctx.closePath();bbox.x=center+halfWidth;bbox.y=bottom;bbox.width=depth;bbox.height=top+depth-bottom;ctx.fillStyle=(isHorizontal?me.topGradient:me.rightGradient).generateGradient(ctx,bbox);ctx.fillStroke(attr);roundX=surface.roundPixel(center+halfWidth);roundY=surface.roundPixel(top);ctx.beginPath();ctx.moveTo(center-halfWidth,bottom);ctx.lineTo(center-halfWidth,roundY);ctx.lineTo(roundX,roundY);ctx.lineTo(roundX,bottom);ctx.closePath();bbox.x=center-halfWidth;bbox.y=bottom;bbox.width=halfWidth*2;bbox.height=top-bottom;ctx.fillStyle=me.frontGradient.generateGradient(ctx,bbox);ctx.fillStroke(attr)}})
;
Ext.define('Ext.chart.series.Bar3D',{extend:'Ext.chart.series.Bar',requires:['Ext.chart.series.sprite.Bar3D','Ext.chart.sprite.Bar3D'],alias:'series.bar3d',type:'bar3d',seriesType:'bar3dSeries',is3D:!0,config:{itemInstancing:{type:'bar3d',animation:{customDurations:{x:0,y:0,width:0,height:0,depth:0}}},highlightCfg:{opacity:0.8}},reversedSpriteZOrder:!1,updateXAxis:function(xAxis,oldXAxis){if(xAxis.type!=='category3d'){Ext.raise("'bar3d' series should be used with a 'category3d' axis."+" Please refer to the 'bar3d' series docs.")}
this.callParent([xAxis,oldXAxis])},getDepth:function(){var sprite=this.getSprites()[0];return sprite?(sprite.depth||0):0}})
;
Ext.define('Ext.chart.series.sprite.BoxPlot',{alias:'sprite.boxplotSeries',extend:'Ext.chart.series.sprite.Cartesian',inheritableStatics:{def:{processors:{dataLow:'data',dataQ1:'data',dataQ3:'data',dataHigh:'data',minBoxWidth:'number',maxBoxWidth:'number',minGapWidth:'number'},aliases:{dataMedian:'dataY'},defaults:{minBoxWidth:2,maxBoxWidth:40,minGapWidth:5}}},renderClipped:function(surface,ctx,dataClipRect){if(this.cleanRedraw){return}
var me=this,attr=me.attr,series=me.getSeries(),renderer=attr.renderer,rendererData={store:me.getStore()},itemCfg={},dataX=attr.dataX,dataLow=attr.dataLow,dataQ1=attr.dataQ1,dataMedian=attr.dataY,dataQ3=attr.dataQ3,dataHigh=attr.dataHigh,min=Math.min(dataClipRect[0],dataClipRect[2]),max=Math.max(dataClipRect[0],dataClipRect[2]),start=Math.max(0,Math.floor(min)),end=Math.min(dataX.length-1,Math.ceil(max)),matrix=attr.matrix,xx=matrix.elements[0],yy=matrix.elements[3],dx=matrix.elements[4],dy=matrix.elements[5],maxBoxWidth=Math.abs(xx)-attr.minGapWidth,minBoxWidth=Math.min(maxBoxWidth,attr.maxBoxWidth),boxWidth=Math.round(Math.max(attr.minBoxWidth,minBoxWidth)),x,low,q1,median,q3,high,rendererParams,changes,i;if(renderer){rendererParams=[me,itemCfg,rendererData]}
for(i=start;i<=end;i++){x=dataX[i]*xx+dx;low=dataLow[i]*yy+dy;q1=dataQ1[i]*yy+dy;median=dataMedian[i]*yy+dy;q3=dataQ3[i]*yy+dy;high=dataHigh[i]*yy+dy;itemCfg.x=x;itemCfg.low=low;itemCfg.q1=q1;itemCfg.median=median;itemCfg.q3=q3;itemCfg.high=high;itemCfg.boxWidth=boxWidth;if(renderer){rendererParams[3]=i;changes=Ext.callback(renderer,null,rendererParams,0,series);Ext.apply(itemCfg,changes)}
me.putMarker('items',itemCfg,i,!renderer)}}})
;
Ext.define('Ext.chart.sprite.BoxPlot',{extend:'Ext.draw.sprite.Sprite',alias:'sprite.boxplot',type:'boxplot',inheritableStatics:{def:{processors:{x:'number',low:'number',q1:'number',median:'number',q3:'number',high:'number',boxWidth:'number',whiskerWidth:'number',crisp:'bool'},triggers:{x:'bbox',low:'bbox',high:'bbox',boxWidth:'bbox',whiskerWidth:'bbox',crisp:'bbox'},defaults:{x:0,low:-20,q1:-10,median:0,q3:10,high:20,boxWidth:12,whiskerWidth:0.5,crisp:!0,fillStyle:'#ccc',strokeStyle:'#000'}}},updatePlainBBox:function(plain){var me=this,attr=me.attr,halfLineWidth=attr.lineWidth/2,x=attr.x-attr.boxWidth/2-halfLineWidth,y=attr.high-halfLineWidth,width=attr.boxWidth+attr.lineWidth,height=attr.low-attr.high+attr.lineWidth;plain.x=x;plain.y=y;plain.width=width;plain.height=height},render:function(surface,ctx){var me=this,attr=me.attr;attr.matrix.toContext(ctx);if(attr.crisp){me.crispRender(surface,ctx)}else{me.softRender(surface,ctx)}
var debug=attr.debug||this.statics().debug||Ext.draw.sprite.Sprite.debug;if(debug){this.attr.inverseMatrix.toContext(ctx);if(debug.bbox){this.renderBBox(surface,ctx)}}},softRender:function(surface,ctx){var me=this,attr=me.attr,x=attr.x,low=attr.low,q1=attr.q1,median=attr.median,q3=attr.q3,high=attr.high,halfBoxWidth=attr.boxWidth/2,halfWhiskerWidth=attr.boxWidth*attr.whiskerWidth/2,dash=ctx.getLineDash();ctx.setLineDash([]);ctx.beginPath();ctx.moveTo(x-halfBoxWidth,q3);ctx.lineTo(x+halfBoxWidth,q3);ctx.lineTo(x+halfBoxWidth,q1);ctx.lineTo(x-halfBoxWidth,q1);ctx.closePath();ctx.fillStroke(attr,!0);ctx.setLineDash(dash);ctx.beginPath();ctx.moveTo(x,q3);ctx.lineTo(x,high);ctx.moveTo(x,q1);ctx.lineTo(x,low);ctx.stroke();ctx.setLineDash([]);ctx.beginPath();ctx.moveTo(x-halfWhiskerWidth,low);ctx.lineTo(x+halfWhiskerWidth,low);ctx.moveTo(x-halfBoxWidth,median);ctx.lineTo(x+halfBoxWidth,median);ctx.moveTo(x-halfWhiskerWidth,high);ctx.lineTo(x+halfWhiskerWidth,high);ctx.stroke()},alignLine:function(x,lineWidth){lineWidth=lineWidth||this.attr.lineWidth;x=Math.round(x);if(lineWidth%2===1){x-=0.5}
return x},crispRender:function(surface,ctx){var me=this,attr=me.attr,x=attr.x,low=me.alignLine(attr.low),q1=me.alignLine(attr.q1),median=me.alignLine(attr.median),q3=me.alignLine(attr.q3),high=me.alignLine(attr.high),halfBoxWidth=attr.boxWidth/2,halfWhiskerWidth=attr.boxWidth*attr.whiskerWidth/2,stemX=me.alignLine(x),boxLeft=me.alignLine(x-halfBoxWidth),boxRight=me.alignLine(x+halfBoxWidth),whiskerLeft=stemX+Math.round(-halfWhiskerWidth),whiskerRight=stemX+Math.round(halfWhiskerWidth),dash=ctx.getLineDash();ctx.setLineDash([]);ctx.beginPath();ctx.moveTo(boxLeft,q3);ctx.lineTo(boxRight,q3);ctx.lineTo(boxRight,q1);ctx.lineTo(boxLeft,q1);ctx.closePath();ctx.fillStroke(attr,!0);ctx.setLineDash(dash);ctx.beginPath();ctx.moveTo(stemX,q3);ctx.lineTo(stemX,high);ctx.moveTo(stemX,q1);ctx.lineTo(stemX,low);ctx.stroke();ctx.setLineDash([]);ctx.beginPath();ctx.moveTo(whiskerLeft,low);ctx.lineTo(whiskerRight,low);ctx.moveTo(boxLeft,median);ctx.lineTo(boxRight,median);ctx.moveTo(whiskerLeft,high);ctx.lineTo(whiskerRight,high);ctx.stroke()}})
;
Ext.define('Ext.chart.series.BoxPlot',{extend:'Ext.chart.series.Cartesian',alias:'series.boxplot',type:'boxplot',seriesType:'boxplotSeries',isBoxPlot:!0,requires:['Ext.chart.series.sprite.BoxPlot','Ext.chart.sprite.BoxPlot'],config:{itemInstancing:{type:'boxplot',animation:{customDurations:{x:0,low:0,q1:0,median:0,q3:0,high:0}}},lowField:'low',q1Field:'q1',medianField:'median',q3Field:'q3',highField:'high'},fieldCategoryY:['Low','Q1','Median','Q3','High'],updateXAxis:function(xAxis){xAxis.setExpandRangeBy(0.5);this.callParent(arguments)}})
;
Ext.define('Ext.draw.LimitedCache',{config:{limit:40,feeder:function(){return 0},scope:null},cache:null,constructor:function(config){this.cache={};this.cache.list=[];this.cache.tail=0;this.initConfig(config)},get:function(id){var cache=this.cache,limit=this.getLimit(),feeder=this.getFeeder(),scope=this.getScope()||this;if(cache[id]){return cache[id].value}
if(cache.list[cache.tail]){delete cache[cache.list[cache.tail].cacheId]}
cache[id]=cache.list[cache.tail]={value:feeder.apply(scope,Array.prototype.slice.call(arguments,1)),cacheId:id};cache.tail++;if(cache.tail===limit){cache.tail=0}
return cache[id].value},clear:function(){this.cache={};this.cache.list=[];this.cache.tail=0}})
;
Ext.define("Ext.draw.SegmentTree",{config:{strategy:"double"},time:function(result,last,dataX,dataOpen,dataHigh,dataLow,dataClose){var start=0,lastOffset,lastOffsetEnd,minimum=new Date(dataX[result.startIdx[0]]),maximum=new Date(dataX[result.endIdx[last-1]]),extDate=Ext.Date,units=[[extDate.MILLI,1,'ms1',null],[extDate.MILLI,2,'ms2','ms1'],[extDate.MILLI,5,'ms5','ms1'],[extDate.MILLI,10,'ms10','ms5'],[extDate.MILLI,50,'ms50','ms10'],[extDate.MILLI,100,'ms100','ms50'],[extDate.MILLI,500,'ms500','ms100'],[extDate.SECOND,1,'s1','ms500'],[extDate.SECOND,10,'s10','s1'],[extDate.SECOND,30,'s30','s10'],[extDate.MINUTE,1,'mi1','s10'],[extDate.MINUTE,5,'mi5','mi1'],[extDate.MINUTE,10,'mi10','mi5'],[extDate.MINUTE,30,'mi30','mi10'],[extDate.HOUR,1,'h1','mi30'],[extDate.HOUR,6,'h6','h1'],[extDate.HOUR,12,'h12','h6'],[extDate.DAY,1,'d1','h12'],[extDate.DAY,7,'d7','d1'],[extDate.MONTH,1,'mo1','d1'],[extDate.MONTH,3,'mo3','mo1'],[extDate.MONTH,6,'mo6','mo3'],[extDate.YEAR,1,'y1','mo3'],[extDate.YEAR,5,'y5','y1'],[extDate.YEAR,10,'y10','y5'],[extDate.YEAR,100,'y100','y10']],unitIdx,currentUnit,plainStart=start,plainEnd=last,startIdxs=result.startIdx,endIdxs=result.endIdx,minIdxs=result.minIdx,maxIdxs=result.maxIdx,opens=result.open,closes=result.close,minXs=result.minX,minYs=result.minY,maxXs=result.maxX,maxYs=result.maxY,i,current;for(unitIdx=0;last>start+1&&unitIdx<units.length;unitIdx++){minimum=new Date(dataX[startIdxs[0]]);currentUnit=units[unitIdx];minimum=extDate.align(minimum,currentUnit[0],currentUnit[1]);if(extDate.diff(minimum,maximum,currentUnit[0])>dataX.length*2*currentUnit[1]){continue}
if(currentUnit[3]&&result.map['time_'+currentUnit[3]]){lastOffset=result.map['time_'+currentUnit[3]][0];lastOffsetEnd=result.map['time_'+currentUnit[3]][1]}else{lastOffset=plainStart;lastOffsetEnd=plainEnd}
start=last;current=minimum;startIdxs[last]=startIdxs[lastOffset];endIdxs[last]=endIdxs[lastOffset];minIdxs[last]=minIdxs[lastOffset];maxIdxs[last]=maxIdxs[lastOffset];opens[last]=opens[lastOffset];closes[last]=closes[lastOffset];minXs[last]=minXs[lastOffset];minYs[last]=minYs[lastOffset];maxXs[last]=maxXs[lastOffset];maxYs[last]=maxYs[lastOffset];current=Ext.Date.add(current,currentUnit[0],currentUnit[1]);for(i=lastOffset+1;i<lastOffsetEnd;i++){if(dataX[endIdxs[i]]<+current){endIdxs[last]=endIdxs[i];closes[last]=closes[i];if(maxYs[i]>maxYs[last]){maxYs[last]=maxYs[i];maxXs[last]=maxXs[i];maxIdxs[last]=maxIdxs[i]}
if(minYs[i]<minYs[last]){minYs[last]=minYs[i];minXs[last]=minXs[i];minIdxs[last]=minIdxs[i]}}else{last++;startIdxs[last]=startIdxs[i];endIdxs[last]=endIdxs[i];minIdxs[last]=minIdxs[i];maxIdxs[last]=maxIdxs[i];opens[last]=opens[i];closes[last]=closes[i];minXs[last]=minXs[i];minYs[last]=minYs[i];maxXs[last]=maxXs[i];maxYs[last]=maxYs[i];current=Ext.Date.add(current,currentUnit[0],currentUnit[1])}}
if(last>start){result.map['time_'+currentUnit[2]]=[start,last]}}},"double":function(result,position,dataX,dataOpen,dataHigh,dataLow,dataClose){var offset=0,lastOffset,step=1,i,startIdx,endIdx,minIdx,maxIdx,open,close,minX,minY,maxX,maxY;while(position>offset+1){lastOffset=offset;offset=position;step+=step;for(i=lastOffset;i<offset;i+=2){if(i===offset-1){startIdx=result.startIdx[i];endIdx=result.endIdx[i];minIdx=result.minIdx[i];maxIdx=result.maxIdx[i];open=result.open[i];close=result.close[i];minX=result.minX[i];minY=result.minY[i];maxX=result.maxX[i];maxY=result.maxY[i]}else{startIdx=result.startIdx[i];endIdx=result.endIdx[i+1];open=result.open[i];close=result.close[i];if(result.minY[i]<=result.minY[i+1]){minIdx=result.minIdx[i];minX=result.minX[i];minY=result.minY[i]}else{minIdx=result.minIdx[i+1];minX=result.minX[i+1];minY=result.minY[i+1]}
if(result.maxY[i]>=result.maxY[i+1]){maxIdx=result.maxIdx[i];maxX=result.maxX[i];maxY=result.maxY[i]}else{maxIdx=result.maxIdx[i+1];maxX=result.maxX[i+1];maxY=result.maxY[i+1]}}
result.startIdx[position]=startIdx;result.endIdx[position]=endIdx;result.minIdx[position]=minIdx;result.maxIdx[position]=maxIdx;result.open[position]=open;result.close[position]=close;result.minX[position]=minX;result.minY[position]=minY;result.maxX[position]=maxX;result.maxY[position]=maxY;position++}
result.map['double_'+step]=[offset,position]}},none:Ext.emptyFn,aggregateData:function(dataX,dataOpen,dataHigh,dataLow,dataClose){var length=dataX.length,startIdx=[],endIdx=[],minIdx=[],maxIdx=[],open=[],minX=[],minY=[],maxX=[],maxY=[],close=[],result={startIdx:startIdx,endIdx:endIdx,minIdx:minIdx,maxIdx:maxIdx,open:open,minX:minX,minY:minY,maxX:maxX,maxY:maxY,close:close},i;for(i=0;i<length;i++){startIdx[i]=i;endIdx[i]=i;minIdx[i]=i;maxIdx[i]=i;open[i]=dataOpen[i];minX[i]=dataX[i];minY[i]=dataLow[i];maxX[i]=dataX[i];maxY[i]=dataHigh[i];close[i]=dataClose[i]}
result.map={original:[0,length]};if(length){this[this.getStrategy()](result,length,dataX,dataOpen,dataHigh,dataLow,dataClose)}
return result},binarySearchMin:function(items,start,end,key){var dx=this.dataX,mid,val;if(key<=dx[items.startIdx[0]]){return start}
if(key>=dx[items.startIdx[end-1]]){return end-1}
while(start+1<end){mid=(start+end)>>1;val=dx[items.startIdx[mid]];if(val===key){return mid}else if(val<key){start=mid}else{end=mid}}
return start},binarySearchMax:function(items,start,end,key){var dx=this.dataX,mid,val;if(key<=dx[items.endIdx[0]]){return start}
if(key>=dx[items.endIdx[end-1]]){return end-1}
while(start+1<end){mid=(start+end)>>1;val=dx[items.endIdx[mid]];if(val===key){return mid}else if(val<key){start=mid}else{end=mid}}
return end},constructor:function(config){this.initConfig(config)},setData:function(dataX,dataOpen,dataHigh,dataLow,dataClose){if(!dataHigh){dataClose=dataLow=dataHigh=dataOpen}
this.dataX=dataX;this.dataOpen=dataOpen;this.dataHigh=dataHigh;this.dataLow=dataLow;this.dataClose=dataClose;if(dataX.length===dataHigh.length&&dataX.length===dataLow.length){this.cache=this.aggregateData(dataX,dataOpen,dataHigh,dataLow,dataClose)}},getAggregation:function(min,max,estStep){if(!this.cache){return null}
var minStep=Infinity,range=this.dataX[this.dataX.length-1]-this.dataX[0],cacheMap=this.cache.map,result=cacheMap.original,name,positions,ln,step,minIdx,maxIdx;for(name in cacheMap){positions=cacheMap[name];ln=positions[1]-positions[0]-1;step=range/ln;if(estStep<=step&&step<minStep){result=positions;minStep=step}}
minIdx=Math.max(this.binarySearchMin(this.cache,result[0],result[1],min),result[0]);maxIdx=Math.min(this.binarySearchMax(this.cache,result[0],result[1],max)+1,result[1]);return{data:this.cache,start:minIdx,end:maxIdx}}})
;
Ext.define('Ext.chart.series.sprite.Aggregative',{extend:'Ext.chart.series.sprite.Cartesian',requires:['Ext.draw.LimitedCache','Ext.draw.SegmentTree'],inheritableStatics:{def:{processors:{dataHigh:'data',dataLow:'data',dataClose:'data'},aliases:{dataOpen:'dataY'},defaults:{dataHigh:null,dataLow:null,dataClose:null}}},config:{aggregator:{}},applyAggregator:function(aggregator,oldAggr){return Ext.factory(aggregator,Ext.draw.SegmentTree,oldAggr)},constructor:function(){this.callParent(arguments)},processDataY:function(){var me=this,attr=me.attr,high=attr.dataHigh,low=attr.dataLow,close=attr.dataClose,open=attr.dataY,aggregator;me.callParent(arguments);if(attr.dataX&&open&&open.length>0){aggregator=me.getAggregator();if(high){aggregator.setData(attr.dataX,attr.dataY,high,low,close)}else{aggregator.setData(attr.dataX,attr.dataY)}}},getGapWidth:function(){return 1},renderClipped:function(surface,ctx,dataClipRect,surfaceClipRect){var me=this,min=Math.min(dataClipRect[0],dataClipRect[2]),max=Math.max(dataClipRect[0],dataClipRect[2]),aggregator=me.getAggregator(),aggregates=aggregator&&aggregator.getAggregation(min,max,(max-min)/surfaceClipRect[2]*me.getGapWidth());if(aggregates){me.dataStart=aggregates.data.startIdx[aggregates.start];me.dataEnd=aggregates.data.endIdx[aggregates.end-1];me.renderAggregates(aggregates.data,aggregates.start,aggregates.end,surface,ctx,dataClipRect,surfaceClipRect)}}})
;
Ext.define('Ext.chart.series.sprite.CandleStick',{alias:'sprite.candlestickSeries',extend:'Ext.chart.series.sprite.Aggregative',inheritableStatics:{def:{processors:{raiseStyle:function(n,o){return Ext.merge({},o||{},n)},dropStyle:function(n,o){return Ext.merge({},o||{},n)},barWidth:'number',padding:'number',ohlcType:'enums(candlestick,ohlc)'},defaults:{raiseStyle:{strokeStyle:'green',fillStyle:'green'},dropStyle:{strokeStyle:'red',fillStyle:'red'},barWidth:15,padding:3,lineJoin:'miter',miterLimit:5,ohlcType:'candlestick'},triggers:{raiseStyle:'raiseStyle',dropStyle:'dropStyle'},updaters:{raiseStyle:function(){var me=this,tpl=me.raiseTemplate;if(tpl){tpl.setAttributes(me.attr.raiseStyle)}},dropStyle:function(){var me=this,tpl=me.dropTemplate;if(tpl){tpl.setAttributes(me.attr.dropStyle)}}}}},candlestick:function(ctx,open,high,low,close,mid,halfWidth){var minOC=Math.min(open,close),maxOC=Math.max(open,close);ctx.moveTo(mid,low);ctx.lineTo(mid,minOC);ctx.moveTo(mid+halfWidth,maxOC);ctx.lineTo(mid+halfWidth,minOC);ctx.lineTo(mid-halfWidth,minOC);ctx.lineTo(mid-halfWidth,maxOC);ctx.closePath();ctx.moveTo(mid,high);ctx.lineTo(mid,maxOC)},ohlc:function(ctx,open,high,low,close,mid,halfWidth){ctx.moveTo(mid,high);ctx.lineTo(mid,low);ctx.moveTo(mid,open);ctx.lineTo(mid-halfWidth,open);ctx.moveTo(mid,close);ctx.lineTo(mid+halfWidth,close)},constructor:function(){var me=this,Rect=Ext.draw.sprite.Rect;me.callParent(arguments);me.raiseTemplate=new Rect({parent:me});me.dropTemplate=new Rect({parent:me})},getGapWidth:function(){var attr=this.attr,barWidth=attr.barWidth,padding=attr.padding;return barWidth+padding},renderAggregates:function(aggregates,start,end,surface,ctx,clip){var me=this,attr=me.attr,ohlcType=attr.ohlcType,series=me.getSeries(),matrix=attr.matrix,xx=matrix.getXX(),yy=matrix.getYY(),dx=matrix.getDX(),dy=matrix.getDY(),halfWidth=Math.round(attr.barWidth*0.5),dataX=attr.dataX,opens=aggregates.open,closes=aggregates.close,maxYs=aggregates.maxY,minYs=aggregates.minY,startIdxs=aggregates.startIdx,pixelAdjust=attr.lineWidth*surface.devicePixelRatio/2,renderer=attr.renderer,rendererConfig=renderer&&{},rendererParams,rendererChanges,open,high,low,close,mid,i,template;me.rendererData=me.rendererData||{store:me.getStore()};pixelAdjust-=Math.floor(pixelAdjust);ctx.save();template=me.raiseTemplate;template.useAttributes(ctx,clip);if(!renderer){ctx.beginPath()}
for(i=start;i<end;i++){if(opens[i]<=closes[i]){open=Math.round(opens[i]*yy+dy)+pixelAdjust;high=Math.round(maxYs[i]*yy+dy)+pixelAdjust;low=Math.round(minYs[i]*yy+dy)+pixelAdjust;close=Math.round(closes[i]*yy+dy)+pixelAdjust;mid=Math.round(dataX[startIdxs[i]]*xx+dx)+pixelAdjust;if(renderer){ctx.save();ctx.beginPath();rendererConfig.open=open;rendererConfig.high=high;rendererConfig.low=low;rendererConfig.close=close;rendererConfig.mid=mid;rendererConfig.halfWidth=halfWidth;rendererParams=[me,rendererConfig,me.rendererData,i];rendererChanges=Ext.callback(renderer,null,rendererParams,0,series);Ext.apply(ctx,rendererChanges)}
me[ohlcType](ctx,open,high,low,close,mid,halfWidth);if(renderer){ctx.fillStroke(template.attr);ctx.restore()}}}
if(!renderer){ctx.fillStroke(template.attr)}
ctx.restore();ctx.save();template=me.dropTemplate;template.useAttributes(ctx,clip);if(!renderer){ctx.beginPath()}
for(i=start;i<end;i++){if(opens[i]>closes[i]){open=Math.round(opens[i]*yy+dy)+pixelAdjust;high=Math.round(maxYs[i]*yy+dy)+pixelAdjust;low=Math.round(minYs[i]*yy+dy)+pixelAdjust;close=Math.round(closes[i]*yy+dy)+pixelAdjust;mid=Math.round(dataX[startIdxs[i]]*xx+dx)+pixelAdjust;if(renderer){ctx.save();ctx.beginPath();rendererConfig.open=open;rendererConfig.high=high;rendererConfig.low=low;rendererConfig.close=close;rendererConfig.mid=mid;rendererConfig.halfWidth=halfWidth;rendererParams=[me,rendererConfig,me.rendererData,i];rendererChanges=Ext.callback(renderer,null,rendererParams,0,me.getSeries());Ext.apply(ctx,rendererChanges)}
me[ohlcType](ctx,open,high,low,close,mid,halfWidth);if(renderer){ctx.fillStroke(template.attr);ctx.restore()}}}
if(!renderer){ctx.fillStroke(template.attr)}
ctx.restore()}})
;
Ext.define('Ext.chart.series.CandleStick',{extend:'Ext.chart.series.Cartesian',requires:['Ext.chart.series.sprite.CandleStick'],alias:'series.candlestick',type:'candlestick',seriesType:'candlestickSeries',isCandleStick:!0,config:{openField:null,highField:null,lowField:null,closeField:null},fieldCategoryY:['Open','High','Low','Close'],themeColorCount:function(){return 2}})
;
Ext.define('Ext.chart.series.Polar',{extend:'Ext.chart.series.Series',config:{rotation:0,radius:null,center:[0,0],offsetX:0,offsetY:0,showInLegend:!0,xField:null,yField:null,angleField:null,radiusField:null,xAxis:null,yAxis:null},directions:['X','Y'],fieldCategoryX:['X'],fieldCategoryY:['Y'],deprecatedConfigs:{field:'angleField',lengthField:'radiusField'},constructor:function(config){var me=this,configurator=me.self.getConfigurator(),configs=configurator.configs,p;if(config){for(p in me.deprecatedConfigs){if(p in config&&!(config in configs)){Ext.raise("'"+p+"' config has been deprecated. Please use the '"+me.deprecatedConfigs[p]+"' config instead.")}}}
me.callParent([config])},getXField:function(){return this.getAngleField()},updateXField:function(value){this.setAngleField(value)},getYField:function(){return this.getRadiusField()},updateYField:function(value){this.setRadiusField(value)},applyXAxis:function(newAxis,oldAxis){return this.getChart().getAxis(newAxis)||oldAxis},applyYAxis:function(newAxis,oldAxis){return this.getChart().getAxis(newAxis)||oldAxis},getXRange:function(){return[this.dataRange[0],this.dataRange[2]]},getYRange:function(){return[this.dataRange[1],this.dataRange[3]]},themeColorCount:function(){var me=this,store=me.getStore(),count=store&&store.getCount()||0;return count},isStoreDependantColorCount:!0,getDefaultSpriteConfig:function(){return{type:this.seriesType,renderer:this.getRenderer(),centerX:0,centerY:0,rotationCenterX:0,rotationCenterY:0}},applyRotation:function(rotation){return Ext.draw.sprite.AttributeParser.angle(Ext.draw.Draw.rad(rotation))},updateRotation:function(rotation){var sprites=this.getSprites();if(sprites&&sprites[0]){sprites[0].setAttributes({baseRotation:rotation})}}})
;
Ext.define('Ext.chart.series.Gauge',{alias:'series.gauge',extend:'Ext.chart.series.Polar',type:'gauge',seriesType:'pieslice',requires:['Ext.draw.sprite.Sector'],config:{needle:!1,needleLength:90,needleWidth:4,donut:30,showInLegend:!1,value:null,colors:null,sectors:null,minimum:0,maximum:100,rotation:0,totalAngle:Math.PI/2,rect:[0,0,1,1],center:[0.5,0.75],radius:0.5,wholeDisk:!1},coordinateX:function(){return this.coordinate('X',0,2)},coordinateY:function(){return this.coordinate('Y',1,2)},updateNeedle:function(needle){var me=this,sprites=me.getSprites(),angle=me.valueToAngle(me.getValue());if(sprites&&sprites.length){sprites[0].setAttributes({startAngle:(needle?angle:0),endAngle:angle,strokeOpacity:(needle?1:0),lineWidth:(needle?me.getNeedleWidth():0)});me.doUpdateStyles()}},themeColorCount:function(){var me=this,store=me.getStore(),count=store&&store.getCount()||0;return count+(me.getNeedle()?0:1)},updateColors:function(colors,oldColors){var me=this,sectors=me.getSectors(),sectorCount=sectors&&sectors.length,sprites=me.getSprites(),newColors=Ext.Array.clone(colors),colorCount=colors&&colors.length,i;if(!colorCount||!colors[0]){return}
for(i=0;i<sectorCount;i++){newColors[i+1]=sectors[i].color||newColors[i+1]||colors[i%colorCount]}
if(sprites.length){sprites[0].setAttributes({strokeStyle:newColors[0]})}
this.setSubStyle({fillStyle:newColors,strokeStyle:newColors});this.doUpdateStyles()},updateRect:function(rect){var wholeDisk=this.getWholeDisk(),halfTotalAngle=wholeDisk?Math.PI:this.getTotalAngle()/2,donut=this.getDonut()/100,width,height,radius;if(halfTotalAngle<=Math.PI/2){width=2*Math.sin(halfTotalAngle);height=1-donut*Math.cos(halfTotalAngle)}else{width=2;height=1-Math.cos(halfTotalAngle)}
radius=Math.min(rect[2]/width,rect[3]/height);this.setRadius(radius);this.setCenter([rect[2]/2,radius+(rect[3]-height*radius)/2])},updateCenter:function(center){this.setStyle({centerX:center[0],centerY:center[1],rotationCenterX:center[0],rotationCenterY:center[1]});this.doUpdateStyles()},updateRotation:function(rotation){this.setStyle({rotationRads:rotation-(this.getTotalAngle()+Math.PI)/2});this.doUpdateStyles()},doUpdateShape:function(radius,donut){var me=this,sectors=me.getSectors(),sectorCount=(sectors&&sectors.length)||0,needleLength=me.getNeedleLength()/100,endRhoArray;endRhoArray=[radius*needleLength,radius];while(sectorCount --){endRhoArray.push(radius)}
me.setSubStyle({endRho:endRhoArray,startRho:radius/100*donut});me.doUpdateStyles()},updateRadius:function(radius){var donut=this.getDonut();this.doUpdateShape(radius,donut)},updateDonut:function(donut){var radius=this.getRadius();this.doUpdateShape(radius,donut)},valueToAngle:function(value){value=this.applyValue(value);return this.getTotalAngle()*(value-this.getMinimum())/(this.getMaximum()-this.getMinimum())},applyValue:function(value){return Math.min(this.getMaximum(),Math.max(value,this.getMinimum()))},updateValue:function(value){var me=this,needle=me.getNeedle(),angle=me.valueToAngle(value),sprites=me.getSprites();sprites[0].getRendererData().value=value;sprites[0].setAttributes({startAngle:(needle?angle:0),endAngle:angle});me.doUpdateStyles()},processData:function(){var me=this,store=me.getStore(),record=store&&store.first(),animation,duration,axis,min,max,xField,value;if(record){xField=me.getXField();if(xField){value=record.get(xField)}}
axis=me.getXAxis();if(axis){min=axis.getMinimum();max=axis.getMaximum();animation=axis.getSprites()[0].getAnimation();duration=animation.getDuration();animation.setDuration(0);if(Ext.isNumber(min)){me.setMinimum(min)}else{axis.setMinimum(me.getMinimum())}
if(Ext.isNumber(max)){me.setMaximum(max)}else{axis.setMaximum(me.getMaximum())}
animation.setDuration(duration)}
if(!Ext.isNumber(value)){value=me.getMinimum()}
me.setValue(value)},getDefaultSpriteConfig:function(){return{type:this.seriesType,renderer:this.getRenderer(),animation:{customDurations:{translationX:0,translationY:0,rotationCenterX:0,rotationCenterY:0,centerX:0,centerY:0,startRho:0,endRho:0,baseRotation:0}}}},normalizeSectors:function(sectors){var me=this,sectorCount=(sectors&&sectors.length)||0,i,value,start,end;if(sectorCount){for(i=0;i<sectorCount;i++){value=sectors[i];if(typeof value==='number'){sectors[i]={start:(i>0?sectors[i-1].end:me.getMinimum()),end:Math.min(value,me.getMaximum())};if(i===(sectorCount-1)&&sectors[i].end<me.getMaximum()){sectors[i+1]={start:sectors[i].end,end:me.getMaximum()}}}else{if(typeof value.start==='number'){start=Math.max(value.start,me.getMinimum())}else{start=(i>0?sectors[i-1].end:me.getMinimum())}
if(typeof value.end==='number'){end=Math.min(value.end,me.getMaximum())}else{end=me.getMaximum()}
sectors[i].start=start;sectors[i].end=end}}}else{sectors=[{start:me.getMinimum(),end:me.getMaximum()}]}
return sectors},getSprites:function(){var me=this,store=me.getStore(),value=me.getValue(),label=me.getLabel(),i,ln;if(!store&&!Ext.isNumber(value)){return Ext.emptyArray}
var chart=me.getChart(),animation=me.getAnimation()||chart&&chart.getAnimation(),sprites=me.sprites,spriteIndex=0,sprite,sectors,attr,rendererData,lineWidths=[];if(sprites&&sprites.length){sprites[0].setAnimation(animation);return sprites}
rendererData={store:store,field:me.getXField(),angleField:me.getXField(),value:value,series:me};me.needleSprite=sprite=me.createSprite();sprite.setAttributes({zIndex:10},!0);sprite.setRendererData(rendererData);sprite.setRendererIndex(spriteIndex++);lineWidths.push(me.getNeedleWidth());if(label){label.getTemplate().setField(!0)}
sectors=me.normalizeSectors(me.getSectors());for(i=0,ln=sectors.length;i<ln;i++){attr={startAngle:me.valueToAngle(sectors[i].start),endAngle:me.valueToAngle(sectors[i].end),label:sectors[i].label,fillStyle:sectors[i].color,strokeOpacity:0,doCallout:!1,labelOverflowPadding:-1};Ext.apply(attr,sectors[i].style);sprite=me.createSprite();sprite.setRendererData(rendererData);sprite.setRendererIndex(spriteIndex++);sprite.setAttributes(attr,!0);lineWidths.push(attr.lineWidth)}
me.setSubStyle({lineWidth:lineWidths});me.doUpdateStyles();return sprites},doUpdateStyles:function(){var me=this;me.callParent();if(me.sprites.length){me.needleSprite.setAttributes({startRho:me.getNeedle()?0:(me.getRadius()/100*me.getDonut())})}}})
;
Ext.define('Ext.chart.series.sprite.Line',{alias:'sprite.lineSeries',extend:'Ext.chart.series.sprite.Aggregative',inheritableStatics:{def:{processors:{curve:'default',fillArea:'bool',nullStyle:'enums(gap,connect,origin)',preciseStroke:'bool',xAxis:'default',yCap:'default'},defaults:{curve:{type:'linear'},nullStyle:'connect',fillArea:!1,preciseStroke:!0,xAxis:null,yCap:Math.pow(2,20),yJump:50},triggers:{dataX:'dataX,bbox,curve',dataY:'dataY,bbox,curve',curve:'curve'},updaters:{curve:'curveUpdater'}}},list:null,curveUpdater:function(attr){var me=this,dataX=attr.dataX,dataY=attr.dataY,curve=attr.curve,smoothable=dataX&&dataY&&dataX.length>2&&dataY.length>2,type=curve.type;if(smoothable){if(type==='natural'){me.smoothX=Ext.draw.Draw.naturalSpline(dataX);me.smoothY=Ext.draw.Draw.naturalSpline(dataY)}else if(type==='cardinal'){me.smoothX=Ext.draw.Draw.cardinalSpline(dataX,curve.tension);me.smoothY=Ext.draw.Draw.cardinalSpline(dataY,curve.tension)}else{smoothable=!1}}
if(!smoothable){delete me.smoothX;delete me.smoothY}},updatePlainBBox:function(plain){var attr=this.attr,ymin=Math.min(0,attr.dataMinY),ymax=Math.max(0,attr.dataMaxY);plain.x=attr.dataMinX;plain.y=ymin;plain.width=attr.dataMaxX-attr.dataMinX;plain.height=ymax-ymin},drawStrip:function(ctx,strip){var i,ln;ctx.moveTo(strip[0],strip[1]);for(i=2,ln=strip.length;i<ln;i+=2){ctx.lineTo(strip[i],strip[i+1])}},drawStraightStroke:function(surface,ctx,start,end,list,xAxis){var me=this,attr=me.attr,nullStyle=attr.nullStyle,isConnect=nullStyle==='connect',isOrigin=nullStyle==='origin',renderer=attr.renderer,curve=attr.curve,step=curve.type==='step-after',needMoveTo=!0,ln=list.length,lineConfig={type:'line',smooth:!1,step:step},rendererChanges,params,stripStartX,isValidX0,isValidX,isValidX1,isValidPoint0,isValidPoint,isValidPoint1,isGap,lastValidPoint,px,py,x,y,x0,y0,x1,y1,i,strip=[];ctx.beginPath();for(i=3;i<ln;i+=3){x0=list[i-3];y0=list[i-2];x=list[i];y=list[i+1];x1=list[i+3];y1=list[i+4];isValidX0=Ext.isNumber(x0);isValidX=Ext.isNumber(x);isValidX1=Ext.isNumber(x1);isValidPoint0=isValidX0&&Ext.isNumber(y0);isValidPoint=isValidX&&Ext.isNumber(y);isValidPoint1=isValidX1&&Ext.isNumber(y1);if(isOrigin){if(!isValidPoint0&&isValidX0){y0=xAxis;isValidPoint0=!0}
if(!isValidPoint&&isValidX){y=xAxis;isValidPoint=!0}
if(!isValidPoint1&&isValidX1){y1=xAxis;isValidPoint1=!0}}
if(renderer){lineConfig.x=x;lineConfig.y=y;lineConfig.x0=x0;lineConfig.y0=y0;params=[me,lineConfig,me.rendererData,start+i/3];rendererChanges=Ext.callback(renderer,null,params,0,me.getSeries())}
if(isGap&&isConnect&&isValidPoint0&&lastValidPoint){px=lastValidPoint[0];py=lastValidPoint[1];if(needMoveTo){ctx.beginPath();ctx.moveTo(px,py);strip.push(px,py);stripStartX=px;needMoveTo=!1}
if(step){ctx.lineTo(x0,py);strip.push(x0,py)}
ctx.lineTo(x0,y0);strip.push(x0,y0);lastValidPoint=[x0,y0];isGap=!1}
if(isConnect&&lastValidPoint&&isValidPoint&&!isValidPoint0){x0=lastValidPoint[0];y0=lastValidPoint[1];isValidPoint0=!0}
if(isValidPoint){lastValidPoint=[x,y]}
if(isValidPoint0&&isValidPoint){if(needMoveTo){ctx.beginPath();ctx.moveTo(x0,y0);strip.push(x0,y0);stripStartX=x0;needMoveTo=!1}}else{isGap=!0;continue}
if(step){ctx.lineTo(x,y0);strip.push(x,y0)}
ctx.lineTo(x,y);strip.push(x,y);if(rendererChanges||!isValidPoint1){ctx.save();Ext.apply(ctx,rendererChanges);rendererChanges=null;if(attr.fillArea){ctx.lineTo(x,xAxis);ctx.lineTo(stripStartX,xAxis);ctx.closePath();ctx.fill()}
ctx.beginPath();me.drawStrip(ctx,strip);strip=[];ctx.stroke();ctx.restore();ctx.beginPath();needMoveTo=!0}}},calculateScale:function(count,end){var power=0,n=count;while(n<end&&count>0){power++;n+=count>>power}
return Math.pow(2,power>0?power-1:power)},drawSmoothStroke:function(surface,ctx,start,end,list,xAxis){var me=this,attr=me.attr,step=attr.step,matrix=attr.matrix,renderer=attr.renderer,xx=matrix.getXX(),yy=matrix.getYY(),dx=matrix.getDX(),dy=matrix.getDY(),smoothX=me.smoothX,smoothY=me.smoothY,scale=me.calculateScale(attr.dataX.length,end),cx1,cy1,cx2,cy2,x,y,x0,y0,i,j,changes,params,lineConfig={type:'line',smooth:!0,step:step};ctx.beginPath();ctx.moveTo(smoothX[start*3]*xx+dx,smoothY[start*3]*yy+dy);for(i=0,j=start*3+1;i<list.length-3;i+=3,j+=3*scale){cx1=smoothX[j]*xx+dx;cy1=smoothY[j]*yy+dy;cx2=smoothX[j+1]*xx+dx;cy2=smoothY[j+1]*yy+dy;x=surface.roundPixel(list[i+3]);y=list[i+4];x0=surface.roundPixel(list[i]);y0=list[i+1];if(renderer){lineConfig.x0=x0;lineConfig.y0=y0;lineConfig.cx1=cx1;lineConfig.cy1=cy1;lineConfig.cx2=cx2;lineConfig.cy2=cy2;lineConfig.x=x;lineConfig.y=y;params=[me,lineConfig,me.rendererData,start+i/3+1];changes=Ext.callback(renderer,null,params,0,me.getSeries());ctx.save();Ext.apply(ctx,changes)}
if(attr.fillArea){ctx.moveTo(x0,y0);ctx.bezierCurveTo(cx1,cy1,cx2,cy2,x,y);ctx.lineTo(x,xAxis);ctx.lineTo(x0,xAxis);ctx.lineTo(x0,y0);ctx.closePath();ctx.fill();ctx.beginPath()}
ctx.moveTo(x0,y0);ctx.bezierCurveTo(cx1,cy1,cx2,cy2,x,y);ctx.stroke();ctx.moveTo(x0,y0);ctx.closePath();if(renderer){ctx.restore()}
ctx.beginPath();ctx.moveTo(x,y)}
ctx.beginPath()},drawLabel:function(text,dataX,dataY,labelId,rect){var me=this,attr=me.attr,label=me.getMarker('labels'),labelTpl=label.getTemplate(),labelCfg=me.labelCfg||(me.labelCfg={}),surfaceMatrix=me.surfaceMatrix,labelX,labelY,labelOverflowPadding=attr.labelOverflowPadding,halfHeight,labelBBox,changes,params,hasPendingChanges;labelCfg.x=surfaceMatrix.x(dataX,dataY);labelCfg.y=surfaceMatrix.y(dataX,dataY);if(attr.flipXY){labelCfg.rotationRads=Math.PI*0.5}else{labelCfg.rotationRads=0}
labelCfg.text=text;if(labelTpl.attr.renderer){params=[text,label,labelCfg,me.rendererData,labelId];changes=Ext.callback(labelTpl.attr.renderer,null,params,0,me.getSeries());if(typeof changes==='string'){labelCfg.text=changes}else if(typeof changes==='object'){if('text' in changes){labelCfg.text=changes.text}
hasPendingChanges=!0}}
labelBBox=me.getMarkerBBox('labels',labelId,!0);if(!labelBBox){me.putMarker('labels',labelCfg,labelId);labelBBox=me.getMarkerBBox('labels',labelId,!0)}
halfHeight=labelBBox.height/2;labelX=dataX;switch(labelTpl.attr.display){case 'under':labelY=dataY-halfHeight-labelOverflowPadding;break;case 'rotate':labelX+=labelOverflowPadding;labelY=dataY-labelOverflowPadding;labelCfg.rotationRads=-Math.PI/4;break;default:labelY=dataY+halfHeight+labelOverflowPadding}
labelCfg.x=surfaceMatrix.x(labelX,labelY);labelCfg.y=surfaceMatrix.y(labelX,labelY);if(hasPendingChanges){Ext.apply(labelCfg,changes)}
me.putMarker('labels',labelCfg,labelId)},drawMarker:function(x,y,index){var me=this,attr=me.attr,renderer=attr.renderer,surfaceMatrix=me.surfaceMatrix,markerCfg={},changes,params;if(renderer&&me.getMarker('markers')){markerCfg.type='marker';markerCfg.x=x;markerCfg.y=y;params=[me,markerCfg,me.rendererData,index];changes=Ext.callback(renderer,null,params,0,me.getSeries());if(changes){Ext.apply(markerCfg,changes)}}
markerCfg.translationX=surfaceMatrix.x(x,y);markerCfg.translationY=surfaceMatrix.y(x,y);delete markerCfg.x;delete markerCfg.y;me.putMarker('markers',markerCfg,index,!renderer)},drawStroke:function(surface,ctx,start,end,list,xAxis){var me=this,isSmooth=me.smoothX&&me.smoothY;if(isSmooth){me.drawSmoothStroke(surface,ctx,start,end,list,xAxis)}else{me.drawStraightStroke(surface,ctx,start,end,list,xAxis)}},renderAggregates:function(aggregates,start,end,surface,ctx,clip,rect){var me=this,attr=me.attr,dataX=attr.dataX,dataY=attr.dataY,labels=attr.labels,xAxis=attr.xAxis,yCap=attr.yCap,isSmooth=attr.smooth&&me.smoothX&&me.smoothY,isDrawLabels=labels&&me.getMarker('labels'),isDrawMarkers=me.getMarker('markers'),matrix=attr.matrix,pixel=surface.devicePixelRatio,xx=matrix.getXX(),yy=matrix.getYY(),dx=matrix.getDX(),dy=matrix.getDY(),list=me.list||(me.list=[]),minXs=aggregates.minX,maxXs=aggregates.maxX,minYs=aggregates.minY,maxYs=aggregates.maxY,idx=aggregates.startIdx,isContinuousLine=!0,isValidMinX,isValidMaxX,isValidMinY,isValidMaxY,xAxisOrigin,isVerticalX,x,y,i,index,minX,maxX,minY,maxY,lastPointX,lastPointY,firstPointX,firstPointY;me.rendererData={store:me.getStore()};list.length=0;for(i=start;i<end;i++){minX=minXs[i];maxX=maxXs[i];minY=minYs[i];maxY=maxYs[i];isValidMinX=Ext.isNumber(minX);isValidMinY=Ext.isNumber(minY);isValidMaxX=Ext.isNumber(maxX);isValidMaxY=Ext.isNumber(maxY);if(minX<maxX){list.push(isValidMinX?(minX*xx+dx):null,isValidMinY?(minY*yy+dy):null,idx[i]);list.push(isValidMaxX?(maxX*xx+dx):null,isValidMaxY?(maxY*yy+dy):null,idx[i])}else if(minX>maxX){list.push(isValidMaxX?(maxX*xx+dx):null,isValidMaxY?(maxY*yy+dy):null,idx[i]);list.push(isValidMinX?(minX*xx+dx):null,isValidMinY?(minY*yy+dy):null,idx[i])}else{list.push(isValidMaxX?(maxX*xx+dx):null,isValidMaxY?(maxY*yy+dy):null,idx[i])}}
if(list.length){for(i=0;i<list.length;i+=3){x=list[i];y=list[i+1];if(Ext.isNumber(x)&&Ext.isNumber(y)){if(y>yCap){y=yCap}else if(y<-yCap){y=-yCap}
list[i+1]=y}else{isContinuousLine=!1;continue}
index=list[i+2];if(isDrawMarkers){me.drawMarker(x,y,index)}
if(isDrawLabels&&labels[index]){me.drawLabel(labels[index],x,y,index,rect)}}
me.isContinuousLine=isContinuousLine;if(isSmooth&&!isContinuousLine){Ext.raise("Line smoothing in only supported for gapless data, "+"where all data points are finite numbers.")}
if(xAxis){isVerticalX=xAxis.getAlignment()==='vertical';if(Ext.isNumber(xAxis.floatingAtCoord)){xAxisOrigin=(isVerticalX?rect[2]:rect[3])-xAxis.floatingAtCoord}else{xAxisOrigin=isVerticalX?rect[0]:rect[1]}}else{xAxisOrigin=attr.flipXY?rect[0]:rect[1]}
if(attr.preciseStroke){if(attr.fillArea){ctx.fill()}
if(attr.transformFillStroke){attr.inverseMatrix.toContext(ctx)}
me.drawStroke(surface,ctx,start,end,list,xAxisOrigin);if(attr.transformFillStroke){attr.matrix.toContext(ctx)}
ctx.stroke()}else{me.drawStroke(surface,ctx,start,end,list,xAxisOrigin);if(isContinuousLine&&isSmooth&&attr.fillArea&&!attr.renderer){lastPointX=dataX[dataX.length-1]*xx+dx+pixel;lastPointY=dataY[dataY.length-1]*yy+dy;firstPointX=dataX[0]*xx+dx-pixel;firstPointY=dataY[0]*yy+dy;ctx.lineTo(lastPointX,lastPointY);ctx.lineTo(lastPointX,xAxisOrigin-attr.lineWidth);ctx.lineTo(firstPointX,xAxisOrigin-attr.lineWidth);ctx.lineTo(firstPointX,firstPointY)}
if(attr.transformFillStroke){attr.matrix.toContext(ctx)}
if(attr.fillArea){ctx.fillStroke(attr,!0)}else{ctx.stroke(!0)}}}}})
;
Ext.define('Ext.chart.series.Line',{extend:'Ext.chart.series.Cartesian',alias:'series.line',type:'line',seriesType:'lineSeries',isLine:!0,requires:['Ext.chart.series.sprite.Line'],config:{selectionTolerance:20,curve:{type:'linear'},smooth:null,step:null,nullStyle:'gap',fill:undefined,aggregator:{strategy:'double'}},themeMarkerCount:function(){return 1},getDefaultSpriteConfig:function(){var me=this,parentConfig=me.callParent(arguments),style=Ext.apply({},me.getStyle()),styleWithTheme,fillArea=!1;if(me.config.fill!==undefined){if(me.config.fill){fillArea=!0;if(style.fillStyle===undefined){if(style.strokeStyle===undefined){styleWithTheme=me.getStyleWithTheme();style.fillStyle=styleWithTheme.fillStyle;style.strokeStyle=styleWithTheme.strokeStyle}else{style.fillStyle=style.strokeStyle}}}}else{if(style.fillStyle){fillArea=!0}}
if(!fillArea){delete style.fillStyle}
style=Ext.apply(parentConfig||{},style);return Ext.apply(style,{fillArea:fillArea,selectionTolerance:me.config.selectionTolerance})},updateFill:function(fill){this.withSprite(function(sprite){return sprite.setAttributes({fillArea:fill})})},updateCurve:function(curve){this.withSprite(function(sprite){return sprite.setAttributes({curve:curve})})},getCurve:function(){return this.withSprite(function(sprite){return sprite.attr.curve})},updateNullStyle:function(nullStyle){this.withSprite(function(sprite){return sprite.setAttributes({nullStyle:nullStyle})})},updateSmooth:function(smooth){this.setCurve({type:smooth?'natural':'linear'})},updateStep:function(step){this.setCurve({type:step?'step-after':'linear'})}})
;
Ext.define('Ext.chart.series.sprite.PieSlice',{extend:'Ext.draw.sprite.Sector',mixins:{markerHolder:'Ext.chart.MarkerHolder'},alias:'sprite.pieslice',inheritableStatics:{def:{processors:{doCallout:'bool',label:'string',rotateLabels:'bool',labelOverflowPadding:'number',renderer:'default'},defaults:{doCallout:!0,rotateLabels:!0,label:'',labelOverflowPadding:10,renderer:null}}},config:{rendererData:null,rendererIndex:0,series:null},setGradientBBox:function(ctx,rect){var me=this,attr=me.attr,hasGradients=(attr.fillStyle&&attr.fillStyle.isGradient)||(attr.strokeStyle&&attr.strokeStyle.isGradient);if(hasGradients&&!attr.constrainGradients){var midAngle=me.getMidAngle(),margin=attr.margin,cx=attr.centerX,cy=attr.centerY,r=attr.endRho,matrix=attr.matrix,scaleX=matrix.getScaleX(),scaleY=matrix.getScaleY(),w=scaleX*r,h=scaleY*r,bbox={width:w+w,height:h+h};if(margin){cx+=margin*Math.cos(midAngle);cy+=margin*Math.sin(midAngle)}
bbox.x=matrix.x(cx,cy)-w;bbox.y=matrix.y(cx,cy)-h;ctx.setGradientBBox(bbox)}else{me.callParent([ctx,rect])}},render:function(surface,ctx,rect){var me=this,attr=me.attr,itemCfg={},changes;if(attr.renderer){itemCfg={type:'sector',centerX:attr.centerX,centerY:attr.centerY,margin:attr.margin,startAngle:Math.min(attr.startAngle,attr.endAngle),endAngle:Math.max(attr.startAngle,attr.endAngle),startRho:Math.min(attr.startRho,attr.endRho),endRho:Math.max(attr.startRho,attr.endRho)};changes=Ext.callback(attr.renderer,null,[me,itemCfg,me.getRendererData(),me.getRendererIndex()],0,me.getSeries());me.setAttributes(changes);me.useAttributes(ctx,rect)}
me.callParent([surface,ctx,rect]);if(attr.label&&me.getMarker('labels')){me.placeLabel()}},placeLabel:function(){var me=this,attr=me.attr,attributeId=attr.attributeId,startAngle=Math.min(attr.startAngle,attr.endAngle),endAngle=Math.max(attr.startAngle,attr.endAngle),midAngle=(startAngle+endAngle)*0.5,margin=attr.margin,centerX=attr.centerX,centerY=attr.centerY,sinMidAngle=Math.sin(midAngle),cosMidAngle=Math.cos(midAngle),startRho=Math.min(attr.startRho,attr.endRho)+margin,endRho=Math.max(attr.startRho,attr.endRho)+margin,midRho=(startRho+endRho)*0.5,surfaceMatrix=me.surfaceMatrix,labelCfg=me.labelCfg||(me.labelCfg={}),label=me.getMarker('labels'),labelTpl=label.getTemplate(),hideLessThan=labelTpl.getHideLessThan(),calloutLine=labelTpl.getCalloutLine(),labelBox,x,y,changes,params,calloutLineLength;if(calloutLine){calloutLineLength=calloutLine.length||40}else{calloutLineLength=0}
surfaceMatrix.appendMatrix(attr.matrix);labelCfg.text=attr.label;x=centerX+cosMidAngle*midRho;y=centerY+sinMidAngle*midRho;labelCfg.x=surfaceMatrix.x(x,y);labelCfg.y=surfaceMatrix.y(x,y);x=centerX+cosMidAngle*endRho;y=centerY+sinMidAngle*endRho;labelCfg.calloutStartX=surfaceMatrix.x(x,y);labelCfg.calloutStartY=surfaceMatrix.y(x,y);x=centerX+cosMidAngle*(endRho+calloutLineLength);y=centerY+sinMidAngle*(endRho+calloutLineLength);labelCfg.calloutPlaceX=surfaceMatrix.x(x,y);labelCfg.calloutPlaceY=surfaceMatrix.y(x,y);if(!attr.rotateLabels){labelCfg.rotationRads=0;Ext.log.warn("'series.style.rotateLabels' config is deprecated. "+"Use 'series.label.orientation' config instead.")}else{switch(labelTpl.attr.orientation){case 'horizontal':labelCfg.rotationRads=midAngle+Math.atan2(surfaceMatrix.y(1,0)-surfaceMatrix.y(0,0),surfaceMatrix.x(1,0)-surfaceMatrix.x(0,0))+Math.PI/2;break;case 'vertical':labelCfg.rotationRads=midAngle+Math.atan2(surfaceMatrix.y(1,0)-surfaceMatrix.y(0,0),surfaceMatrix.x(1,0)-surfaceMatrix.x(0,0));break}}
labelCfg.calloutColor=(calloutLine&&calloutLine.color)||me.attr.fillStyle;if(calloutLine){if(calloutLine.width){labelCfg.calloutWidth=calloutLine.width}}else{labelCfg.calloutColor='none'}
labelCfg.globalAlpha=attr.globalAlpha*attr.fillOpacity;if(labelTpl.display!=='none'){labelCfg.hidden=(attr.startAngle==attr.endAngle)}
if(labelTpl.attr.renderer){params=[me.attr.label,label,labelCfg,me.getRendererData(),me.getRendererIndex()];changes=Ext.callback(labelTpl.attr.renderer,null,params,0,me.getSeries());if(typeof changes==='string'){labelCfg.text=changes}else{Ext.apply(labelCfg,changes)}}
me.putMarker('labels',labelCfg,attributeId);labelBox=me.getMarkerBBox('labels',attributeId,!0);if(labelBox){if(attr.doCallout&&((endAngle-startAngle)*endRho>hideLessThan||attr.highlighted)){if(labelTpl.attr.display==='outside'){me.putMarker('labels',{callout:1},attributeId)}else if(labelTpl.attr.display==='inside'){me.putMarker('labels',{callout:0},attributeId)}else{me.putMarker('labels',{callout:1-me.sliceContainsLabel(attr,labelBox)},attributeId)}}else{me.putMarker('labels',{globalAlpha:me.sliceContainsLabel(attr,labelBox)},attributeId)}}},sliceContainsLabel:function(attr,bbox){var padding=attr.labelOverflowPadding,middle=(attr.endRho+attr.startRho)/2,outer=middle+(bbox.width+padding)/2,inner=middle-(bbox.width+padding)/2,sliceAngle,l1,l2,l3;if(padding<0){return 1}
if(bbox.width+padding*2>(attr.endRho-attr.startRho)){return 0}
l1=Math.sqrt(attr.endRho*attr.endRho-outer*outer);l2=Math.sqrt(attr.endRho*attr.endRho-inner*inner);sliceAngle=Math.abs(attr.endAngle-attr.startAngle);l3=(sliceAngle>Math.PI/2?inner:Math.abs(Math.tan(sliceAngle/2))*inner);if(bbox.height+padding*2>Math.min(l1,l2,l3)*2){return 0}
return 1}})
;
Ext.define('Ext.chart.series.Pie',{extend:'Ext.chart.series.Polar',requires:['Ext.chart.series.sprite.PieSlice'],type:'pie',alias:'series.pie',seriesType:'pieslice',isPie:!0,config:{donut:0,rotation:0,clockwise:!0,totalAngle:2*Math.PI,hidden:[],radiusFactor:100,highlightCfg:{margin:20},style:{}},directions:['X'],applyLabel:function(newLabel,oldLabel){if(Ext.isObject(newLabel)&&!Ext.isString(newLabel.orientation)){Ext.apply(newLabel=Ext.Object.chain(newLabel),{orientation:'vertical'})}
return this.callParent([newLabel,oldLabel])},updateLabelData:function(){var me=this,store=me.getStore(),items=store.getData().items,sprites=me.getSprites(),label=me.getLabel(),labelField=label&&label.getTemplate().getField(),hidden=me.getHidden(),i,ln,labels,sprite;if(sprites.length&&labelField){labels=[];for(i=0,ln=items.length;i<ln;i++){labels.push(items[i].get(labelField))}
for(i=0,ln=sprites.length;i<ln;i++){sprite=sprites[i];sprite.setAttributes({label:labels[i]});sprite.putMarker('labels',{hidden:hidden[i]},sprite.attr.attributeId)}}},coordinateX:function(){var me=this,store=me.getStore(),records=store.getData().items,recordCount=records.length,xField=me.getXField(),yField=me.getYField(),x,sumX=0,unit,y,maxY=0,hidden=me.getHidden(),summation=[],i,lastAngle=0,totalAngle=me.getTotalAngle(),clockwise=me.getClockwise()?1:-1,sprites=me.getSprites(),sprite,labels;if(!sprites){return}
for(i=0;i<recordCount;i++){x=Math.abs(Number(records[i].get(xField)))||0;y=yField&&Math.abs(Number(records[i].get(yField)))||0;if(!hidden[i]){sumX+=x;if(y>maxY){maxY=y}}
summation[i]=sumX;if(i>=hidden.length){hidden[i]=!1}}
hidden.length=recordCount;me.maxY=maxY;if(sumX!==0){unit=totalAngle/sumX}
for(i=0;i<recordCount;i++){sprites[i].setAttributes({startAngle:lastAngle,endAngle:lastAngle=(unit?clockwise*summation[i]*unit:0),globalAlpha:1})}
if(recordCount<sprites.length){for(i=recordCount;i<sprites.length;i++){sprite=sprites[i];labels=sprite.getMarker('labels');if(labels){labels.clear(sprite.getId());sprite.releaseMarker('labels')}
sprite.destroy()}
sprites.length=recordCount}
for(i=recordCount;i<sprites.length;i++){sprites[i].setAttributes({startAngle:totalAngle,endAngle:totalAngle,globalAlpha:0})}},updateCenter:function(center){this.setStyle({translationX:center[0]+this.getOffsetX(),translationY:center[1]+this.getOffsetY()});this.doUpdateStyles()},updateRadius:function(radius){this.setStyle({startRho:radius*this.getDonut()*0.01,endRho:radius*this.getRadiusFactor()*0.01});this.doUpdateStyles()},getStyleByIndex:function(i){var me=this,store=me.getStore(),item=store.getAt(i),yField=me.getYField(),radius=me.getRadius(),style={},startRho,endRho,y;if(item){y=yField&&Math.abs(Number(item.get(yField)))||0;startRho=radius*me.getDonut()*0.01;endRho=radius*me.getRadiusFactor()*0.01;style=me.callParent([i]);style.startRho=startRho;style.endRho=me.maxY?(startRho+(endRho-startRho)*y/me.maxY):endRho}
return style},updateDonut:function(donut){var radius=this.getRadius();this.setStyle({startRho:radius*donut*0.01,endRho:radius*this.getRadiusFactor()*0.01});this.doUpdateStyles()},rotationOffset:-Math.PI/2,updateRotation:function(rotation){this.setStyle({rotationRads:rotation+this.rotationOffset});this.doUpdateStyles()},updateTotalAngle:function(totalAngle){this.processData()},getSprites:function(){var me=this,chart=me.getChart(),store=me.getStore();if(!chart||!store){return Ext.emptyArray}
me.getColors();me.getSubStyle();var items=store.getData().items,length=items.length,animation=me.getAnimation()||chart&&chart.getAnimation(),sprites=me.sprites,sprite,spriteCreated=!1,spriteIndex=0,label=me.getLabel(),labelTpl=label&&label.getTemplate(),i,rendererData;rendererData={store:store,field:me.getXField(),angleField:me.getXField(),radiusField:me.getYField(),series:me};for(i=0;i<length;i++){sprite=sprites[i];if(!sprite){sprite=me.createSprite();if(me.getHighlight()){sprite.config.highlight=me.getHighlight();sprite.addModifier('highlight',!0)}
if(labelTpl&&labelTpl.getField()){labelTpl.setAttributes({labelOverflowPadding:me.getLabelOverflowPadding()});labelTpl.getAnimation().setCustomDurations({'callout':200})}
sprite.setAttributes(me.getStyleByIndex(i));sprite.setRendererData(rendererData);spriteCreated=!0}
sprite.setRendererIndex(spriteIndex++);sprite.setAnimation(animation)}
if(spriteCreated){me.doUpdateStyles()}
return me.sprites},betweenAngle:function(x,a,b){var pp=Math.PI*2,offset=this.rotationOffset;if(a===b){return!1}
if(!this.getClockwise()){x*=-1;a*=-1;b*=-1;a-=offset;b-=offset}else{a+=offset;b+=offset}
x-=a;b-=a;x%=pp;b%=pp;x+=pp;b+=pp;x%=pp;b%=pp;return x<b||Ext.Number.isEqual(b,0,1e-8)},getItemByIndex:function(index,category){category=category||'sprites';return this.callParent([index,category])},getItemForAngle:function(angle){var me=this,sprites=me.getSprites(),attr,store,items,hidden,i,ln;angle%=Math.PI*2;while(angle<0){angle+=Math.PI*2}
if(sprites){store=me.getStore();items=store.getData().items;hidden=me.getHidden();for(i=0,ln=store.getCount();i<ln;i++){if(!hidden[i]){attr=sprites[i].attr;if(attr.startAngle<=angle&&attr.endAngle>=angle){return{series:me,sprite:sprites[i],index:i,record:items[i],field:me.getXField()}}}}}
return null},getItemForPoint:function(x,y){var me=this,sprites=me.getSprites(),center=me.getCenter(),offsetX=me.getOffsetX(),offsetY=me.getOffsetY(),dx=x-center[0]+offsetX,dy=y-center[1]+offsetY,store=me.getStore(),donut=me.getDonut(),records=store.getData().items,direction=Math.atan2(dy,dx)-me.getRotation(),radius=Math.sqrt(dx*dx+dy*dy),startRadius=me.getRadius()*donut*0.01,hidden=me.getHidden(),result=null,i,ln,attr,sprite;for(i=0,ln=records.length;i<ln;i++){if(hidden[i]){continue}
sprite=sprites[i];if(!sprite){break}
attr=sprite.attr;if(radius>=startRadius+attr.margin&&radius<=attr.endRho+attr.margin&&me.betweenAngle(direction,attr.startAngle,attr.endAngle)){result={series:me,sprite:sprites[i],index:i,record:records[i],field:me.getXField()};break}}
return result},provideLegendInfo:function(target){var me=this,store=me.getStore(),items,labelField,xField,hidden,i,style,fill;if(store){items=store.getData().items;labelField=me.getLabel().getTemplate().getField();xField=me.getXField();hidden=me.getHidden();for(i=0;i<items.length;i++){style=me.getStyleByIndex(i);fill=style.fillStyle;if(Ext.isObject(fill)){fill=fill.stops&&fill.stops[0].color}
target.push({name:labelField?String(items[i].get(labelField)):xField+' '+i,mark:fill||style.strokeStyle||'black',disabled:hidden[i],series:me.getId(),index:i})}}}})
;
Ext.define('Ext.chart.series.sprite.Pie3DPart',{extend:'Ext.draw.sprite.Path',mixins:{markerHolder:'Ext.chart.MarkerHolder'},alias:'sprite.pie3dPart',inheritableStatics:{def:{processors:{centerX:'number',centerY:'number',startAngle:'number',endAngle:'number',startRho:'number',endRho:'number',margin:'number',thickness:'number',bevelWidth:'number',distortion:'number',baseColor:'color',colorSpread:'number',baseRotation:'number',part:'enums(top,bottom,start,end,innerFront,innerBack,outerFront,outerBack)',label:'string'},aliases:{rho:'endRho'},triggers:{centerX:'path,bbox',centerY:'path,bbox',startAngle:'path,partZIndex',endAngle:'path,partZIndex',startRho:'path',endRho:'path,bbox',margin:'path,bbox',thickness:'path',distortion:'path',baseRotation:'path,partZIndex',baseColor:'partZIndex,partColor',colorSpread:'partColor',part:'path,partZIndex',globalAlpha:'canvas,alpha',fillOpacity:'canvas,alpha'},defaults:{centerX:0,centerY:0,startAngle:Math.PI*2,endAngle:Math.PI*2,startRho:0,endRho:150,margin:0,thickness:35,distortion:0.5,baseRotation:0,baseColor:'white',colorSpread:0.5,miterLimit:1,bevelWidth:5,strokeOpacity:0,part:'top',label:''},updaters:{alpha:'alphaUpdater',partColor:'partColorUpdater',partZIndex:'partZIndexUpdater'}}},config:{renderer:null,rendererData:null,rendererIndex:0,series:null},bevelParams:[],constructor:function(config){this.callParent([config]);this.bevelGradient=new Ext.draw.gradient.Linear({stops:[{offset:0,color:'rgba(255,255,255,0)'},{offset:0.7,color:'rgba(255,255,255,0.6)'},{offset:1,color:'rgba(255,255,255,0)'}]})},updateRenderer:function(){this.setDirty(!0)},updateRendererData:function(){this.setDirty(!0)},updateRendererIndex:function(){this.setDirty(!0)},alphaUpdater:function(attr){var me=this,opacity=attr.globalAlpha,fillOpacity=attr.fillOpacity,oldOpacity=me.oldOpacity,oldFillOpacity=me.oldFillOpacity;if((opacity!==oldOpacity&&(opacity===1||oldOpacity===1))||(fillOpacity!==oldFillOpacity&&(fillOpacity===1||oldFillOpacity===1))){me.scheduleUpdater(attr,'path',['globalAlpha']);me.oldOpacity=opacity;me.oldFillOpacity=fillOpacity}},partColorUpdater:function(attr){var color=Ext.util.Color.fly(attr.baseColor),colorString=color.toString(),colorSpread=attr.colorSpread,fillStyle;switch(attr.part){case 'top':fillStyle=new Ext.draw.gradient.Radial({start:{x:0,y:0,r:0},end:{x:0,y:0,r:1},stops:[{offset:0,color:color.createLighter(0.1*colorSpread)},{offset:1,color:color.createDarker(0.1*colorSpread)}]});break;case 'bottom':fillStyle=new Ext.draw.gradient.Radial({start:{x:0,y:0,r:0},end:{x:0,y:0,r:1},stops:[{offset:0,color:color.createDarker(0.2*colorSpread)},{offset:1,color:color.toString()}]});break;case 'outerFront':case 'outerBack':fillStyle=new Ext.draw.gradient.Linear({stops:[{offset:0,color:color.createDarker(0.15*colorSpread).toString()},{offset:0.3,color:colorString},{offset:0.8,color:color.createLighter(0.2*colorSpread).toString()},{offset:1,color:color.createDarker(0.25*colorSpread).toString()}]});break;case 'start':fillStyle=new Ext.draw.gradient.Linear({stops:[{offset:0,color:color.createDarker(0.1*colorSpread).toString()},{offset:1,color:color.createLighter(0.2*colorSpread).toString()}]});break;case 'end':fillStyle=new Ext.draw.gradient.Linear({stops:[{offset:0,color:color.createDarker(0.1*colorSpread).toString()},{offset:1,color:color.createLighter(0.2*colorSpread).toString()}]});break;case 'innerFront':case 'innerBack':fillStyle=new Ext.draw.gradient.Linear({stops:[{offset:0,color:color.createDarker(0.1*colorSpread).toString()},{offset:0.2,color:color.createLighter(0.2*colorSpread).toString()},{offset:0.7,color:colorString},{offset:1,color:color.createDarker(0.1*colorSpread).toString()}]});break}
attr.fillStyle=fillStyle;attr.canvasAttributes.fillStyle=fillStyle},partZIndexUpdater:function(attr){var normalize=Ext.draw.sprite.AttributeParser.angle,rotation=attr.baseRotation,startAngle=attr.startAngle,endAngle=attr.endAngle,depth;switch(attr.part){case 'top':attr.zIndex=6;break;case 'outerFront':startAngle=normalize(startAngle+rotation);endAngle=normalize(endAngle+rotation);if(startAngle>=0&&endAngle<0){depth=Math.sin(startAngle)}else if(startAngle<=0&&endAngle>0){depth=Math.sin(endAngle)}else if(startAngle>=0&&endAngle>0){if(startAngle>endAngle){depth=0}else{depth=Math.max(Math.sin(startAngle),Math.sin(endAngle))}}else{depth=1}
attr.zIndex=4+depth;break;case 'outerBack':attr.zIndex=1;break;case 'start':attr.zIndex=4+Math.sin(normalize(startAngle+rotation));break;case 'end':attr.zIndex=4+Math.sin(normalize(endAngle+rotation));break;case 'innerFront':attr.zIndex=2;break;case 'innerBack':attr.zIndex=4+Math.sin(normalize((startAngle+endAngle)/2+rotation));break;case 'bottom':attr.zIndex=0;break}
attr.dirtyZIndex=!0},updatePlainBBox:function(plain){var attr=this.attr,part=attr.part,baseRotation=attr.baseRotation,centerX=attr.centerX,centerY=attr.centerY,rho,angle,x,y,sin,cos;if(part==='start'){angle=attr.startAngle+baseRotation}else if(part==='end'){angle=attr.endAngle+baseRotation}
if(Ext.isNumber(angle)){sin=Math.sin(angle);cos=Math.cos(angle);x=Math.min(centerX+cos*attr.startRho,centerX+cos*attr.endRho);y=centerY+sin*attr.startRho*attr.distortion;plain.x=x;plain.y=y;plain.width=cos*(attr.endRho-attr.startRho);plain.height=attr.thickness+sin*(attr.endRho-attr.startRho)*2;return}
if(part==='innerFront'||part==='innerBack'){rho=attr.startRho}else{rho=attr.endRho}
plain.width=rho*2;plain.height=rho*attr.distortion*2+attr.thickness;plain.x=attr.centerX-rho;plain.y=attr.centerY-rho*attr.distortion},updateTransformedBBox:function(transform){if(this.attr.part==='start'||this.attr.part==='end'){return this.callParent(arguments)}
return this.updatePlainBBox(transform)},updatePath:function(path){if(!this.attr.globalAlpha){return}
if(this.attr.endAngle<this.attr.startAngle){return}
this[this.attr.part+'Renderer'](path)},render:function(surface,ctx,rect){var me=this,renderer=me.getRenderer(),attr=me.attr,part=attr.part,itemCfg,changes;if(!attr.globalAlpha||Ext.Number.isEqual(attr.startAngle,attr.endAngle,1e-8)){return}
if(renderer){itemCfg={type:'pie3dPart',part:attr.part,margin:attr.margin,distortion:attr.distortion,centerX:attr.centerX,centerY:attr.centerY,baseRotation:attr.baseRotation,startAngle:attr.startAngle,endAngle:attr.endAngle,startRho:attr.startRho,endRho:attr.endRho};changes=Ext.callback(renderer,null,[me,itemCfg,me.getRendererData(),me.getRendererIndex()],0,me.getSeries());if(changes){if(changes.part){changes.part=part}
me.setAttributes(changes);me.useAttributes(ctx,rect)}}
me.callParent([surface,ctx]);me.bevelRenderer(surface,ctx);if(attr.label&&me.getMarker('labels')){me.placeLabel()}},placeLabel:function(){var me=this,attr=me.attr,attributeId=attr.attributeId,margin=attr.margin,distortion=attr.distortion,centerX=attr.centerX,centerY=attr.centerY,baseRotation=attr.baseRotation,startAngle=attr.startAngle+baseRotation,endAngle=attr.endAngle+baseRotation,midAngle=(startAngle+endAngle)/2,startRho=attr.startRho+margin,endRho=attr.endRho+margin,midRho=(startRho+endRho)/2,sin=Math.sin(midAngle),cos=Math.cos(midAngle),surfaceMatrix=me.surfaceMatrix,label=me.getMarker('labels'),labelTpl=label.getTemplate(),calloutLine=labelTpl.getCalloutLine(),calloutLineLength=calloutLine&&calloutLine.length||40,labelCfg={},rendererParams,rendererChanges,x,y;surfaceMatrix.appendMatrix(attr.matrix);labelCfg.text=attr.label;x=centerX+cos*midRho;y=centerY+sin*midRho*distortion;labelCfg.x=surfaceMatrix.x(x,y);labelCfg.y=surfaceMatrix.y(x,y);x=centerX+cos*endRho;y=centerY+sin*endRho*distortion;labelCfg.calloutStartX=surfaceMatrix.x(x,y);labelCfg.calloutStartY=surfaceMatrix.y(x,y);x=centerX+cos*(endRho+calloutLineLength);y=centerY+sin*(endRho+calloutLineLength)*distortion;labelCfg.calloutPlaceX=surfaceMatrix.x(x,y);labelCfg.calloutPlaceY=surfaceMatrix.y(x,y);labelCfg.calloutWidth=2;if(labelTpl.attr.renderer){rendererParams=[me.attr.label,label,labelCfg,me.getRendererData(),me.getRendererIndex()];rendererChanges=Ext.callback(labelTpl.attr.renderer,null,rendererParams,0,me.getSeries());if(typeof rendererChanges==='string'){labelCfg.text=rendererChanges}else{Ext.apply(labelCfg,rendererChanges)}}
me.putMarker('labels',labelCfg,attributeId);me.putMarker('labels',{callout:1},attributeId)},bevelRenderer:function(surface,ctx){var me=this,attr=me.attr,bevelWidth=attr.bevelWidth,params=me.bevelParams,i;for(i=0;i<params.length;i++){ctx.beginPath();ctx.ellipse.apply(ctx,params[i]);ctx.save();ctx.lineWidth=bevelWidth;ctx.strokeOpacity=bevelWidth?1:0;ctx.strokeGradient=me.bevelGradient;ctx.stroke(attr);ctx.restore()}},lidRenderer:function(path,thickness){var attr=this.attr,margin=attr.margin,distortion=attr.distortion,centerX=attr.centerX,centerY=attr.centerY,baseRotation=attr.baseRotation,startAngle=attr.startAngle+baseRotation,endAngle=attr.endAngle+baseRotation,midAngle=(startAngle+endAngle)/2,startRho=attr.startRho,endRho=attr.endRho,sinEnd=Math.sin(endAngle),cosEnd=Math.cos(endAngle);centerX+=Math.cos(midAngle)*margin;centerY+=Math.sin(midAngle)*margin*distortion;path.ellipse(centerX,centerY+thickness,startRho,startRho*distortion,0,startAngle,endAngle,!1);path.lineTo(centerX+cosEnd*endRho,centerY+thickness+sinEnd*endRho*distortion);path.ellipse(centerX,centerY+thickness,endRho,endRho*distortion,0,endAngle,startAngle,!0);path.closePath()},topRenderer:function(path){this.lidRenderer(path,0)},bottomRenderer:function(path){var attr=this.attr,none=Ext.util.Color.RGBA_NONE;if(attr.globalAlpha<1||attr.fillOpacity<1||attr.shadowColor!==none){this.lidRenderer(path,attr.thickness)}},sideRenderer:function(path,position){var attr=this.attr,margin=attr.margin,centerX=attr.centerX,centerY=attr.centerY,distortion=attr.distortion,baseRotation=attr.baseRotation,startAngle=attr.startAngle+baseRotation,endAngle=attr.endAngle+baseRotation,isFullPie=(!attr.startAngle&&Ext.Number.isEqual(Math.PI*2,attr.endAngle,0.0000001)),thickness=attr.thickness,startRho=attr.startRho,endRho=attr.endRho,angle=(position==='start'&&startAngle)||(position==='end'&&endAngle),sin=Math.sin(angle),cos=Math.cos(angle),isTranslucent=attr.globalAlpha<1,isVisible=position==='start'&&cos<0||position==='end'&&cos>0||isTranslucent,midAngle;if(isVisible&&!isFullPie){midAngle=(startAngle+endAngle)/2;centerX+=Math.cos(midAngle)*margin;centerY+=Math.sin(midAngle)*margin*distortion;path.moveTo(centerX+cos*startRho,centerY+sin*startRho*distortion);path.lineTo(centerX+cos*endRho,centerY+sin*endRho*distortion);path.lineTo(centerX+cos*endRho,centerY+sin*endRho*distortion+thickness);path.lineTo(centerX+cos*startRho,centerY+sin*startRho*distortion+thickness);path.closePath()}},startRenderer:function(path){this.sideRenderer(path,'start')},endRenderer:function(path){this.sideRenderer(path,'end')},rimRenderer:function(path,radius,isDonut,isFront){var me=this,attr=me.attr,margin=attr.margin,centerX=attr.centerX,centerY=attr.centerY,distortion=attr.distortion,baseRotation=attr.baseRotation,normalize=Ext.draw.sprite.AttributeParser.angle,startAngle=attr.startAngle+baseRotation,endAngle=attr.endAngle+baseRotation,midAngle=normalize((startAngle+endAngle)/2),thickness=attr.thickness,isTranslucent=attr.globalAlpha<1,isAllFront,isAllBack,params;me.bevelParams=[];startAngle=normalize(startAngle);endAngle=normalize(endAngle);centerX+=Math.cos(midAngle)*margin;centerY+=Math.sin(midAngle)*margin*distortion;isAllFront=startAngle>=0&&endAngle>=0;isAllBack=startAngle<=0&&endAngle<=0;function renderLeftFrontChunk(){path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,Math.PI,startAngle,!0);path.lineTo(centerX+Math.cos(startAngle)*radius,centerY+Math.sin(startAngle)*radius*distortion);params=[centerX,centerY,radius,radius*distortion,0,startAngle,Math.PI,!1];if(!isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.closePath()}
function renderRightFrontChunk(){path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,0,endAngle,!1);path.lineTo(centerX+Math.cos(endAngle)*radius,centerY+Math.sin(endAngle)*radius*distortion);params=[centerX,centerY,radius,radius*distortion,0,endAngle,0,!0];if(!isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.closePath()}
function renderLeftBackChunk(){path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,Math.PI,endAngle,!1);path.lineTo(centerX+Math.cos(endAngle)*radius,centerY+Math.sin(endAngle)*radius*distortion);params=[centerX,centerY,radius,radius*distortion,0,endAngle,Math.PI,!0];if(isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.closePath()}
function renderRightBackChunk(){path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,startAngle,0,!1);path.lineTo(centerX+radius,centerY);params=[centerX,centerY,radius,radius*distortion,0,0,startAngle,!0];if(isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.closePath()}
if(isFront){if(!isDonut||isTranslucent){if(startAngle>=0&&endAngle<0){renderLeftFrontChunk()}else if(startAngle<=0&&endAngle>0){renderRightFrontChunk()}else if(startAngle<=0&&endAngle<0){if(startAngle>endAngle){path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,0,Math.PI,!1);path.lineTo(centerX-radius,centerY);params=[centerX,centerY,radius,radius*distortion,0,Math.PI,0,!0];if(!isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.closePath()}}else{if(startAngle>endAngle){renderLeftFrontChunk();renderRightFrontChunk()}else{params=[centerX,centerY,radius,radius*distortion,0,startAngle,endAngle,!1];if(isAllFront&&!isDonut||isAllBack&&isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.lineTo(centerX+Math.cos(endAngle)*radius,centerY+Math.sin(endAngle)*radius*distortion+thickness);path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,endAngle,startAngle,!0);path.closePath()}}}}else{if(isDonut||isTranslucent){if(startAngle>=0&&endAngle<0){renderLeftBackChunk()}else if(startAngle<=0&&endAngle>0){renderRightBackChunk()}else if(startAngle<=0&&endAngle<0){if(startAngle>endAngle){renderLeftBackChunk();renderRightBackChunk()}else{path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,startAngle,endAngle,!1);path.lineTo(centerX+Math.cos(endAngle)*radius,centerY+Math.sin(endAngle)*radius*distortion);params=[centerX,centerY,radius,radius*distortion,0,endAngle,startAngle,!0];if(isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.closePath()}}else{if(startAngle>endAngle){path.ellipse(centerX,centerY+thickness,radius,radius*distortion,0,-Math.PI,0,!1);path.lineTo(centerX+radius,centerY);params=[centerX,centerY,radius,radius*distortion,0,0,-Math.PI,!0];if(isDonut){me.bevelParams.push(params)}
path.ellipse.apply(path,params);path.closePath()}}}}},innerFrontRenderer:function(path){this.rimRenderer(path,this.attr.startRho,!0,!0)},innerBackRenderer:function(path){this.rimRenderer(path,this.attr.startRho,!0,!1)},outerFrontRenderer:function(path){this.rimRenderer(path,this.attr.endRho,!1,!0)},outerBackRenderer:function(path){this.rimRenderer(path,this.attr.endRho,!1,!1)}})
;
Ext.define('Ext.chart.series.Pie3D',{extend:'Ext.chart.series.Polar',requires:['Ext.chart.series.sprite.Pie3DPart','Ext.draw.PathUtil'],type:'pie3d',seriesType:'pie3d',alias:'series.pie3d',is3D:!0,config:{rect:[0,0,0,0],thickness:35,distortion:0.5,donut:0,hidden:[],highlightCfg:{margin:20},shadow:!1},rotationOffset:-Math.PI/2,setField:function(value){return this.setXField(value)},getField:function(){return this.getXField()},updateRotation:function(rotation){var attributes={baseRotation:rotation+this.rotationOffset};this.forEachSprite(function(sprite){sprite.setAttributes(attributes)})},updateColors:function(colors){var chart;this.setSubStyle({baseColor:colors});if(!this.isConfiguring){chart=this.getChart();if(chart){chart.refreshLegendStore()}}},applyShadow:function(shadow){if(shadow===!0){shadow={shadowColor:'rgba(0,0,0,0.8)',shadowBlur:30}}else if(!Ext.isObject(shadow)){shadow={shadowColor:Ext.util.Color.RGBA_NONE}}
return shadow},updateShadow:function(shadow){var me=this,sprites=me.getSprites(),spritesPerSlice=me.spritesPerSlice,ln=sprites&&sprites.length,i,sprite;for(i=1;i<ln;i+=spritesPerSlice){sprite=sprites[i];if(sprite.attr.part==='bottom'){sprite.setAttributes(shadow)}}},getStyleByIndex:function(i){var indexStyle=this.callParent([i]),style=this.getStyle(),fillStyle=indexStyle.fillStyle||indexStyle.fill||indexStyle.color,strokeStyle=style.strokeStyle||style.stroke;if(fillStyle){indexStyle.baseColor=fillStyle;delete indexStyle.fillStyle;delete indexStyle.fill;delete indexStyle.color}
if(strokeStyle){indexStyle.strokeStyle=strokeStyle}
return indexStyle},doUpdateStyles:function(){var me=this,sprites=me.getSprites(),spritesPerSlice=me.spritesPerSlice,ln=sprites&&sprites.length,i=0,j=0,k,style;for(;i<ln;i+=spritesPerSlice,j++){style=me.getStyleByIndex(j);for(k=0;k<spritesPerSlice;k++){sprites[i+k].setAttributes(style)}}},coordinateX:function(){var me=this,store=me.getStore(),records=store.getData().items,recordCount=records.length,xField=me.getXField(),animation=me.getAnimation(),rotation=me.getRotation(),hidden=me.getHidden(),sprites=me.getSprites(!0),spriteCount=sprites.length,spritesPerSlice=me.spritesPerSlice,center=me.getCenter(),offsetX=me.getOffsetX(),offsetY=me.getOffsetY(),radius=me.getRadius(),thickness=me.getThickness(),distortion=me.getDistortion(),renderer=me.getRenderer(),rendererData=me.getRendererData(),highlight=me.getHighlight(),lastAngle=0,twoPi=Math.PI*2,delta=1e-10,endAngles=[],sum=0,value,unit,sprite,style,i,j;for(i=0;i<recordCount;i++){value=Math.abs(+records[i].get(xField))||0;if(!hidden[i]){sum+=value}
endAngles[i]=sum;if(i>=hidden.length){hidden[i]=!1}}
if(sum===0){return}
unit=2*Math.PI/sum;for(i=0;i<recordCount;i++){endAngles[i]*=unit}
for(i=0;i<recordCount;i++){style=this.getStyleByIndex(i);for(j=0;j<spritesPerSlice;j++){sprite=sprites[i*spritesPerSlice+j];sprite.setAnimation(animation);sprite.setAttributes({centerX:center[0]+offsetX,centerY:center[1]+offsetY-thickness/2,endRho:radius,startRho:radius*me.getDonut()/100,baseRotation:rotation+me.rotationOffset,startAngle:lastAngle,endAngle:endAngles[i]-delta,thickness:thickness,distortion:distortion,globalAlpha:1});sprite.setAttributes(style);sprite.setConfig({renderer:renderer,rendererData:rendererData,rendererIndex:i})}
lastAngle=endAngles[i]}
for(i*=spritesPerSlice;i<spriteCount;i++){sprite=sprites[i];sprite.setAnimation(animation);sprite.setAttributes({startAngle:twoPi,endAngle:twoPi,globalAlpha:0,baseRotation:rotation+me.rotationOffset})}},updateHighlight:function(highlight,oldHighlight){this.callParent([highlight,oldHighlight]);this.forEachSprite(function(sprite){if(highlight){if(sprite.modifiers.highlight){sprite.modifiers.highlight.setConfig(highlight)}else{sprite.config.highlight=highlight;sprite.addModifier(highlight,!0)}}})},updateLabelData:function(){var me=this,store=me.getStore(),items=store.getData().items,sprites=me.getSprites(),label=me.getLabel(),labelField=label&&label.getTemplate().getField(),hidden=me.getHidden(),spritesPerSlice=me.spritesPerSlice,ln,labels,sprite,name='labels',i,j;if(sprites.length){if(labelField){labels=[];for(j=0,ln=items.length;j<ln;j++){labels.push(items[j].get(labelField))}}
for(i=0,j=0,ln=sprites.length;i<ln;i+=spritesPerSlice,j++){sprite=sprites[i];if(label){if(!sprite.getMarker(name)){sprite.bindMarker(name,label)}
if(labels){sprite.setAttributes({label:labels[j]})}
sprite.putMarker(name,{hidden:hidden[j]},sprite.attr.attributeId)}else{sprite.releaseMarker(name)}}}},applyRadius:function(){var me=this,chart=me.getChart(),padding=chart.getInnerPadding(),rect=chart.getMainRect()||[0,0,1,1],width=rect[2]-padding*2,height=rect[3]-padding*2-me.getThickness(),horizontalRadius=width/2,verticalRadius=horizontalRadius*me.getDistortion(),result;if(verticalRadius>height/2){result=height/(me.getDistortion()*2)}else{result=horizontalRadius}
return Math.max(result,0)},forEachSprite:function(fn){var sprites=this.sprites,ln=sprites.length,i;for(i=0;i<ln;i++){fn(sprites[i],Math.floor(i/this.spritesPerSlice))}},updateRadius:function(radius){var donut;this.getChart();donut=this.getDonut();this.forEachSprite(function(sprite){sprite.setAttributes({endRho:radius,startRho:radius*donut/100})})},updateDonut:function(donut){var radius;this.getChart();radius=this.getRadius();this.forEachSprite(function(sprite){sprite.setAttributes({startRho:radius*donut/100})})},updateCenter:function(center){var offsetX,offsetY,thickness;this.getChart();offsetX=this.getOffsetX();offsetY=this.getOffsetY();thickness=this.getThickness();this.forEachSprite(function(sprite){sprite.setAttributes({centerX:center[0]+offsetX,centerY:center[1]+offsetY-thickness/2})})},updateThickness:function(thickness){var center,offsetY;this.getChart();this.setRadius();center=this.getCenter();offsetY=this.getOffsetY();this.forEachSprite(function(sprite){sprite.setAttributes({thickness:thickness,centerY:center[1]+offsetY-thickness/2})})},updateDistortion:function(distortion){this.getChart();this.setRadius();this.forEachSprite(function(sprite){sprite.setAttributes({distortion:distortion})})},updateOffsetX:function(offsetX){var center;this.getChart();center=this.getCenter();this.forEachSprite(function(sprite){sprite.setAttributes({centerX:center[0]+offsetX})})},updateOffsetY:function(offsetY){var center,thickness;this.getChart();center=this.getCenter();thickness=this.getThickness();this.forEachSprite(function(sprite){sprite.setAttributes({centerY:center[1]+offsetY-thickness/2})})},updateAnimation:function(animation){this.getChart();this.forEachSprite(function(sprite){sprite.setAnimation(animation)})},updateRenderer:function(renderer){var rendererData;this.getChart();rendererData=this.getRendererData();this.forEachSprite(function(sprite,itemIndex){sprite.setConfig({renderer:renderer,rendererData:rendererData,rendererIndex:itemIndex})})},getRendererData:function(){return{store:this.getStore(),angleField:this.getXField(),radiusField:this.getYField(),series:this}},getSprites:function(createMissing){var me=this,store=me.getStore(),sprites=me.sprites;if(!store){return Ext.emptyArray}
if(sprites&&!createMissing){return sprites}
var surface=me.getSurface(),records=store.getData().items,spritesPerSlice=me.spritesPerSlice,partCount=me.partNames.length,recordCount=records.length,sprite,i,j;for(i=0;i<recordCount;i++){if(!sprites[i*spritesPerSlice]){for(j=0;j<partCount;j++){sprite=surface.add({type:'pie3dPart',part:me.partNames[j],series:me});sprite.getAnimation().setDurationOn('baseRotation',0);sprites.push(sprite)}}}
return sprites},betweenAngle:function(x,a,b){var pp=Math.PI*2,offset=this.rotationOffset;a+=offset;b+=offset;x-=a;b-=a;x%=pp;b%=pp;x+=pp;b+=pp;x%=pp;b%=pp;return x<b||b===0},getItemForPoint:function(x,y){var me=this,sprites=me.getSprites(),spritesPerSlice=me.spritesPerSlice,result=null,store,records,hidden,i,ln,sprite,topPartIndex;if(!sprites){return result}
store=me.getStore();records=store.getData().items;hidden=me.getHidden();for(i=0,ln=records.length;i<ln;i++){if(hidden[i]){continue}
topPartIndex=i*spritesPerSlice;sprite=sprites[topPartIndex];if(sprite.hitTest([x,y])){result={series:me,sprite:sprites.slice(topPartIndex,topPartIndex+spritesPerSlice),index:i,record:records[i],category:'sprites',field:me.getXField()};break}}
return result},provideLegendInfo:function(target){var me=this,store=me.getStore(),items,labelField,field,hidden,style,color,i;if(store){items=store.getData().items;labelField=me.getLabel().getTemplate().getField();field=me.getField();hidden=me.getHidden();for(i=0;i<items.length;i++){style=me.getStyleByIndex(i);color=style.baseColor;target.push({name:labelField?String(items[i].get(labelField)):field+' '+i,mark:color||'black',disabled:hidden[i],series:me.getId(),index:i})}}}},function(){var proto=this.prototype,definition=Ext.chart.series.sprite.Pie3DPart.def.getInitialConfig().processors.part;proto.partNames=definition.replace(/^enums\(|\)/g,'').split(',');proto.spritesPerSlice=proto.partNames.length})
;
Ext.define('Ext.chart.series.sprite.Polar',{extend:'Ext.chart.series.sprite.Series',inheritableStatics:{def:{processors:{centerX:'number',centerY:'number',startAngle:'number',endAngle:'number',startRho:'number',endRho:'number',baseRotation:'number'},defaults:{centerX:0,centerY:0,startAngle:0,endAngle:Math.PI,startRho:0,endRho:150,baseRotation:0},triggers:{centerX:'bbox',centerY:'bbox',startAngle:'bbox',endAngle:'bbox',startRho:'bbox',endRho:'bbox',baseRotation:'bbox'}}},updatePlainBBox:function(plain){var attr=this.attr;plain.x=attr.centerX-attr.endRho;plain.y=attr.centerY+attr.endRho;plain.width=attr.endRho*2;plain.height=attr.endRho*2}})
;
Ext.define('Ext.chart.series.sprite.Radar',{alias:'sprite.radar',extend:'Ext.chart.series.sprite.Polar',getDataPointXY:function(index){var me=this,attr=me.attr,centerX=attr.centerX,centerY=attr.centerY,matrix=attr.matrix,minX=attr.dataMinX,maxX=attr.dataMaxX,dataX=attr.dataX,dataY=attr.dataY,endRho=attr.endRho,startRho=attr.startRho,baseRotation=attr.baseRotation,x,y,r,th,ox,oy,maxY;if(attr.rangeY){maxY=attr.rangeY[1]}else{maxY=attr.dataMaxY}
th=(dataX[index]-minX)/(maxX-minX+1)*2*Math.PI+baseRotation;r=dataY[index]/maxY*(endRho-startRho)+startRho;ox=centerX+Math.cos(th)*r;oy=centerY+Math.sin(th)*r;x=matrix.x(ox,oy);y=matrix.y(ox,oy);return[x,y]},render:function(surface,ctx){var me=this,attr=me.attr,dataX=attr.dataX,length=dataX.length,surfaceMatrix=me.surfaceMatrix,markerCfg={},i,x,y,xy;ctx.beginPath();for(i=0;i<length;i++){xy=me.getDataPointXY(i);x=xy[0];y=xy[1];if(i===0){ctx.moveTo(x,y)}
ctx.lineTo(x,y);markerCfg.translationX=surfaceMatrix.x(x,y);markerCfg.translationY=surfaceMatrix.y(x,y);me.putMarker('markers',markerCfg,i,!0)}
ctx.closePath();ctx.fillStroke(attr)}})
;
Ext.define('Ext.chart.series.Radar',{extend:'Ext.chart.series.Polar',type:'radar',seriesType:'radar',alias:'series.radar',requires:['Ext.chart.series.sprite.Radar'],themeColorCount:function(){return 1},isStoreDependantColorCount:!1,themeMarkerCount:function(){return 1},updateAngularAxis:function(axis){axis.processData(this)},updateRadialAxis:function(axis){axis.processData(this)},coordinateX:function(){return this.coordinate('X',0,2)},coordinateY:function(){return this.coordinate('Y',1,2)},updateCenter:function(center){this.setStyle({translationX:center[0]+this.getOffsetX(),translationY:center[1]+this.getOffsetY()});this.doUpdateStyles()},updateRadius:function(radius){this.setStyle({endRho:radius});this.doUpdateStyles()},updateRotation:function(rotation){var me=this,chart=me.getChart(),axes=chart.getAxes(),i,ln,axis;for(i=0,ln=axes.length;i<ln;i++){axis=axes[i];axis.setRotation(rotation)}
me.setStyle({rotationRads:rotation});me.doUpdateStyles()},updateTotalAngle:function(totalAngle){this.processData()},getItemForPoint:function(x,y){var me=this,sprite=me.sprites&&me.sprites[0],attr=sprite.attr,dataX=attr.dataX,length=dataX.length,store=me.getStore(),marker=me.getMarker(),threshhold,item,xy,i,bbox,markers;if(me.getHidden()){return null}
if(sprite&&marker){markers=sprite.getMarker('markers');for(i=0;i<length;i++){bbox=markers.getBBoxFor(i);threshhold=(bbox.width+bbox.height)*0.25;xy=sprite.getDataPointXY(i);if(Math.abs(xy[0]-x)<threshhold&&Math.abs(xy[1]-y)<threshhold){item={series:me,sprite:sprite,index:i,category:'markers',record:store.getData().items[i],field:me.getYField()};return item}}}
return me.callParent(arguments)},getDefaultSpriteConfig:function(){var config=this.callParent(),animation={customDurations:{translationX:0,translationY:0,rotationRads:0,dataMinX:0,dataMaxX:0}};if(config.animation){Ext.apply(config.animation,animation)}else{config.animation=animation}
return config},getSprites:function(){var me=this,chart=me.getChart(),sprites=me.sprites;if(!chart){return Ext.emptyArray}
if(!sprites.length){me.createSprite()}
return sprites},provideLegendInfo:function(target){var me=this,style=me.getSubStyleWithTheme(),fill=style.fillStyle;if(Ext.isArray(fill)){fill=fill[0]}
target.push({name:me.getTitle()||me.getYField()||me.getId(),mark:(Ext.isObject(fill)?fill.stops&&fill.stops[0].color:fill)||style.strokeStyle||'black',disabled:me.getHidden(),series:me.getId(),index:0})}})
;
Ext.define('Ext.chart.series.sprite.Scatter',{alias:'sprite.scatterSeries',extend:'Ext.chart.series.sprite.Cartesian',renderClipped:function(surface,ctx,dataClipRect,surfaceClipRect){if(this.cleanRedraw){return}
var me=this,attr=me.attr,dataX=attr.dataX,dataY=attr.dataY,labels=attr.labels,series=me.getSeries(),isDrawLabels=labels&&me.getMarker('labels'),surfaceMatrix=me.surfaceMatrix,matrix=me.attr.matrix,xx=matrix.getXX(),yy=matrix.getYY(),dx=matrix.getDX(),dy=matrix.getDY(),markerCfg={},changes,params,xScalingDirection=surface.getInherited().rtl&&!attr.flipXY?-1:1,left,right,top,bottom,x,y,i;if(attr.flipXY){left=surfaceClipRect[1]-xx*xScalingDirection;right=surfaceClipRect[1]+surfaceClipRect[3]+xx*xScalingDirection;top=surfaceClipRect[0]-yy;bottom=surfaceClipRect[0]+surfaceClipRect[2]+yy}else{left=surfaceClipRect[0]-xx*xScalingDirection;right=surfaceClipRect[0]+surfaceClipRect[2]+xx*xScalingDirection;top=surfaceClipRect[1]-yy;bottom=surfaceClipRect[1]+surfaceClipRect[3]+yy}
for(i=0;i<dataX.length;i++){x=dataX[i];y=dataY[i];x=x*xx+dx;y=y*yy+dy;if(left<=x&&x<=right&&top<=y&&y<=bottom){if(attr.renderer){markerCfg={type:'markers',translationX:surfaceMatrix.x(x,y),translationY:surfaceMatrix.y(x,y)};params=[me,markerCfg,{store:me.getStore()},i];changes=Ext.callback(attr.renderer,null,params,0,series);markerCfg=Ext.apply(markerCfg,changes)}else{markerCfg.translationX=surfaceMatrix.x(x,y);markerCfg.translationY=surfaceMatrix.y(x,y)}
me.putMarker('markers',markerCfg,i,!attr.renderer);if(isDrawLabels&&labels[i]){me.drawLabel(labels[i],x,y,i,surfaceClipRect)}}}},drawLabel:function(text,dataX,dataY,labelId,rect){var me=this,attr=me.attr,label=me.getMarker('labels'),labelTpl=label.getTemplate(),labelCfg=me.labelCfg||(me.labelCfg={}),surfaceMatrix=me.surfaceMatrix,labelX,labelY,labelOverflowPadding=attr.labelOverflowPadding,flipXY=attr.flipXY,halfHeight,labelBox,changes,params;labelCfg.text=text;labelBox=me.getMarkerBBox('labels',labelId,!0);if(!labelBox){me.putMarker('labels',labelCfg,labelId);labelBox=me.getMarkerBBox('labels',labelId,!0)}
if(flipXY){labelCfg.rotationRads=Math.PI*0.5}else{labelCfg.rotationRads=0}
halfHeight=labelBox.height/2;labelX=dataX;switch(labelTpl.attr.display){case 'under':labelY=dataY-halfHeight-labelOverflowPadding;break;case 'rotate':labelX+=labelOverflowPadding;labelY=dataY-labelOverflowPadding;labelCfg.rotationRads=-Math.PI/4;break;default:labelY=dataY+halfHeight+labelOverflowPadding}
labelCfg.x=surfaceMatrix.x(labelX,labelY);labelCfg.y=surfaceMatrix.y(labelX,labelY);if(labelTpl.attr.renderer){params=[text,label,labelCfg,{store:me.getStore()},labelId];changes=Ext.callback(labelTpl.attr.renderer,null,params,0,me.getSeries());if(typeof changes==='string'){labelCfg.text=changes}else{Ext.apply(labelCfg,changes)}}
me.putMarker('labels',labelCfg,labelId)}})
;
Ext.define('Ext.chart.series.Scatter',{extend:'Ext.chart.series.Cartesian',alias:'series.scatter',type:'scatter',seriesType:'scatterSeries',requires:['Ext.chart.series.sprite.Scatter'],config:{itemInstancing:null,marker:!0},themeMarkerCount:function(){return 1},provideLegendInfo:function(target){var me=this,style=me.getMarkerStyleByIndex(0),fill=style.fillStyle;target.push({name:me.getTitle()||me.getYField()||me.getId(),mark:(Ext.isObject(fill)?fill.stops&&fill.stops[0].color:fill)||style.strokeStyle||'black',disabled:me.getHidden(),series:me.getId(),index:0})}})
;
Ext.define('Ext.chart.theme.Blue',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.blue','chart.theme.Blue'],config:{baseColor:'#4d7fe6'}})
;
Ext.define('Ext.chart.theme.BlueGradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.blue-gradients','chart.theme.Blue:gradients'],config:{baseColor:'#4d7fe6',gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Category1',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category1','chart.theme.Category1'],config:{colors:['#f0a50a','#c20024','#2044ba','#810065','#7eae29']}})
;
Ext.define('Ext.chart.theme.Category1Gradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category1-gradients','chart.theme.Category1:gradients'],config:{colors:['#f0a50a','#c20024','#2044ba','#810065','#7eae29'],gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Category2',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category2','chart.theme.Category2'],config:{colors:['#6d9824','#87146e','#2a9196','#d39006','#1e40ac']}})
;
Ext.define('Ext.chart.theme.Category2Gradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category2-gradients','chart.theme.Category2:gradients'],config:{colors:['#6d9824','#87146e','#2a9196','#d39006','#1e40ac'],gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Category3',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category3','chart.theme.Category3'],config:{colors:['#fbbc29','#ce2e4e','#7e0062','#158b90','#57880e']}})
;
Ext.define('Ext.chart.theme.Category3Gradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category3-gradients','chart.theme.Category3:gradients'],config:{colors:['#fbbc29','#ce2e4e','#7e0062','#158b90','#57880e'],gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Category4',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category4','chart.theme.Category4'],config:{colors:['#ef5773','#fcbd2a','#4f770d','#1d3eaa','#9b001f']}})
;
Ext.define('Ext.chart.theme.Category4Gradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category4-gradients','chart.theme.Category4:gradients'],config:{colors:['#ef5773','#fcbd2a','#4f770d','#1d3eaa','#9b001f'],gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Category5',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category5','chart.theme.Category5'],config:{colors:['#7eae29','#fdbe2a','#910019','#27b4bc','#d74dbc']}})
;
Ext.define('Ext.chart.theme.Category5Gradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category5-gradients','chart.theme.Category5:gradients'],config:{colors:['#7eae29','#fdbe2a','#910019','#27b4bc','#d74dbc'],gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Category6',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category6','chart.theme.Category6'],config:{colors:['#44dce1','#0b2592','#996e05','#7fb325','#b821a1']}})
;
Ext.define('Ext.chart.theme.Category6Gradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.category6-gradients','chart.theme.Category6:gradients'],config:{colors:['#44dce1','#0b2592','#996e05','#7fb325','#b821a1'],gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.DefaultGradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.default-gradients','chart.theme.Base:gradients'],config:{gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Green',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.green','chart.theme.Green'],config:{baseColor:'#b1da5a'}})
;
Ext.define('Ext.chart.theme.GreenGradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.green-gradients','chart.theme.Green:gradients'],config:{baseColor:'#b1da5a',gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Midnight',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.midnight','chart.theme.Midnight'],config:{colors:['#a837ff','#4ac0f2','#ff4d35','#ff8809','#61c102','#ff37ea'],chart:{defaults:{captions:{title:{docked:'top',padding:5,style:{textAlign:'center',fontFamily:'default',fontWeight:'bold',fillStyle:'rgb(224, 224, 227)',fontSize:'default*1.6'}},subtitle:{docked:'top',style:{textAlign:'center',fontFamily:'default',fontWeight:'normal',fillStyle:'rgb(224, 224, 227)',fontSize:'default*1.3'}},credits:{docked:'bottom',padding:5,style:{textAlign:'left',fontFamily:'default',fontWeight:'lighter',fillStyle:'rgb(224, 224, 227)',fontSize:'default'}}},background:'rgb(52, 52, 53)'}},axis:{defaults:{style:{strokeStyle:'rgb(224, 224, 227)'},label:{fillStyle:'rgb(224, 224, 227)'},title:{fillStyle:'rgb(224, 224, 227)'},grid:{strokeStyle:'rgb(112, 112, 115)'}}},series:{defaults:{label:{fillStyle:'rgb(224, 224, 227)'}}},sprites:{text:{fillStyle:'rgb(224, 224, 227)'}},legend:{label:{fillStyle:'white'},border:{lineWidth:2,fillStyle:'rgba(255, 255, 255, 0.3)',strokeStyle:'rgb(150, 150, 150)'},background:'rgb(52, 52, 53)'}}})
;
Ext.define('Ext.chart.theme.Muted',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.muted','chart.theme.Muted'],config:{colors:['#8ca640','#974144','#4091ba','#8e658e','#3b8d8b','#b86465','#d2af69','#6e8852','#3dcc7e','#a6bed1','#cbaa4b','#998baa']}})
;
Ext.define('Ext.chart.theme.Purple',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.purple','chart.theme.Purple'],config:{baseColor:'#da5abd'}})
;
Ext.define('Ext.chart.theme.PurpleGradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.purple-gradients','chart.theme.Purple:gradients'],config:{baseColor:'#da5abd',gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Red',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.red','chart.theme.Red'],config:{baseColor:'#e84b67'}})
;
Ext.define('Ext.chart.theme.RedGradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.red-gradients','chart.theme.Red:gradients'],config:{baseColor:'#e84b67',gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Sky',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.sky','chart.theme.Sky'],config:{baseColor:'#4ce0e7'}})
;
Ext.define('Ext.chart.theme.SkyGradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.sky-gradients','chart.theme.Sky:gradients'],config:{baseColor:'#4ce0e7',gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.chart.theme.Yellow',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.yellow','chart.theme.Yellow'],config:{baseColor:'#fec935'}})
;
Ext.define('Ext.chart.theme.YellowGradients',{extend:'Ext.chart.theme.Base',singleton:!0,alias:['chart.theme.yellow-gradients','chart.theme.Yellow:gradients'],config:{baseColor:'#fec935',gradients:{type:'linear',degrees:90}}})
;
Ext.define('Ext.draw.Point',{requires:['Ext.draw.Draw','Ext.draw.Matrix'],isPoint:!0,x:0,y:0,length:0,angle:0,angleUnits:'degrees',statics:{fly:(function(){var point=null;return function(x,y){if(!point){point=new Ext.draw.Point()}
point.constructor(x,y);return point}})()},constructor:function(x,y){var me=this;if(typeof x==='number'){me.x=x;if(typeof y==='number'){me.y=y}else{me.y=x}}else if(Ext.isArray(x)){me.x=x[0];me.y=x[1]}else if(x){me.x=x.x;me.y=x.y}
me.calculatePolar()},calculateCartesian:function(){var me=this,length=me.length,angle=me.angle;if(me.angleUnits==='degrees'){angle=Ext.draw.Draw.rad(angle)}
me.x=Math.cos(angle)*length;me.y=Math.sin(angle)*length},calculatePolar:function(){var me=this,x=me.x,y=me.y;me.length=Math.sqrt(x*x+y*y);me.angle=Math.atan2(y,x);if(me.angleUnits==='degrees'){me.angle=Ext.draw.Draw.degrees(me.angle)}},setX:function(x){this.x=x;this.calculatePolar()},setY:function(y){this.y=y;this.calculatePolar()},set:function(x,y){this.constructor(x,y)},setAngle:function(angle){this.angle=angle;this.calculateCartesian()},setLength:function(length){this.length=length;this.calculateCartesian()},setPolar:function(angle,length){this.angle=angle;this.length=length;this.calculateCartesian()},clone:function(){return new Ext.draw.Point(this.x,this.y)},add:function(x,y){var fly=Ext.draw.Point.fly(x,y);return new Ext.draw.Point(this.x+fly.x,this.y+fly.y)},sub:function(x,y){var fly=Ext.draw.Point.fly(x,y);return new Ext.draw.Point(this.x-fly.x,this.y-fly.y)},mul:function(n){return new Ext.draw.Point(this.x*n,this.y*n)},div:function(n){return new Ext.draw.Point(this.x/n,this.y/n)},dot:function(x,y){var fly=Ext.draw.Point.fly(x,y);return this.x*fly.x+this.y*fly.y},equals:function(x,y){var fly=Ext.draw.Point.fly(x,y);return this.x===fly.x&&this.y===fly.y},rotate:function(angle,center){var sin,cos,cx,cy,point;if(this.angleUnits==='degrees'){angle=Ext.draw.Draw.rad(angle);sin=Math.sin(angle);cos=Math.cos(angle)}
if(center){cx=center.x;cy=center.y}else{cx=0;cy=0}
point=Ext.draw.Matrix.fly([cos,sin,-sin,cos,cx-cos*cx+cy*sin,cy-cos*cy+cx*-sin]).transformPoint(this);return new Ext.draw.Point(point)},transform:function(matrix){if(matrix&&matrix.isMatrix){return new Ext.draw.Point(matrix.transformPoint(this))}else if(arguments.length===6){return new Ext.draw.Point(Ext.draw.Matrix.fly(arguments).transformPoint(this))}else{Ext.raise("Invalid parameters.")}},round:function(){return new Ext.draw.Point(Math.round(this.x),Math.round(this.y))},ceil:function(){return new Ext.draw.Point(Math.ceil(this.x),Math.ceil(this.y))},floor:function(){return new Ext.draw.Point(Math.floor(this.x),Math.floor(this.y))},abs:function(x,y){return new Ext.draw.Point(Math.abs(this.x),Math.abs(this.y))},normalize:function(factor){var x=this.x,y=this.y,k=(factor||1)/Math.sqrt(x*x+y*y);return new Ext.draw.Point(x*k,y*k)},getDistanceToLine:function(p1,p2){var n,pp1;if(arguments.length===4){p1=new Ext.draw.Point(arguments[0],arguments[1]);p2=new Ext.draw.Point(arguments[2],arguments[3])}
n=p2.sub(p1).normalize();pp1=p1.sub(this);return pp1.sub(n.mul(pp1.dot(n)))},isZero:function(){return this.x===0&&this.y===0},isNumber:function(){return Ext.isNumber(this.x)&&Ext.isNumber(this.y)}})
;
Ext.define('Ext.draw.plugin.SpriteEvents',{extend:'Ext.plugin.Abstract',alias:'plugin.spriteevents',requires:['Ext.draw.overrides.hittest.All'],mouseMoveEvents:{mousemove:!0,mouseover:!0,mouseout:!0},spriteMouseMoveEvents:{spritemousemove:!0,spritemouseover:!0,spritemouseout:!0},init:function(drawContainer){var handleEvent='handleEvent';this.drawContainer=drawContainer;drawContainer.addElementListener({click:handleEvent,dblclick:handleEvent,mousedown:handleEvent,mousemove:handleEvent,mouseup:handleEvent,mouseover:handleEvent,mouseout:handleEvent,priority:1001,scope:this})},hasSpriteMouseMoveListeners:function(){var listeners=this.drawContainer.hasListeners,name;for(name in this.spriteMouseMoveEvents){if(name in listeners){return!0}}
return!1},hitTestEvent:function(e){var items=this.drawContainer.getItems(),surface,sprite,i;for(i=items.length-1;i>=0;i--){surface=items.get(i);sprite=surface.hitTestEvent(e);if(sprite){return sprite}}
return null},handleEvent:function(e){var me=this,drawContainer=me.drawContainer,isMouseMoveEvent=e.type in me.mouseMoveEvents,lastSprite=me.lastSprite,sprite;if(isMouseMoveEvent&&!me.hasSpriteMouseMoveListeners()){return}
sprite=me.hitTestEvent(e);if(isMouseMoveEvent&&!Ext.Object.equals(sprite,lastSprite)){if(lastSprite){drawContainer.fireEvent('spritemouseout',lastSprite,e)}
if(sprite){drawContainer.fireEvent('spritemouseover',sprite,e)}}
if(sprite){drawContainer.fireEvent('sprite'+e.type,sprite,e)}
me.lastSprite=sprite}})
;
Ext.define('Ext.chart.interactions.ItemInfo',{extend:'Ext.chart.interactions.Abstract',type:'iteminfo',alias:'interaction.iteminfo',config:{extjsGestures:{'start':{event:'click',handler:'onInfoGesture'},'move':{event:'mousemove',handler:'onInfoGesture'},'end':{event:'mouseleave',handler:'onInfoGesture'}}},item:null,onInfoGesture:function(e,element){var me=this,item=me.getItemForEvent(e),tooltip=item&&item.series.tooltip;if(tooltip){tooltip.onMouseMove.call(tooltip,e)}
if(item!==me.item){if(item){item.series.showTip(item)}else{me.item.series.hideTip(me.item)}
me.item=item}
return!1}})
;
